@lightningchart/lcjs
Version:
A high-performance charting library.
2 lines • 1.66 MB
JavaScript
/* LightningChart JS v7.1.1 */
import*as t from"immutable";import{Record as i}from"immutable";import n from"earcut";var r,e,o,s=(r=function(t,i){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])},r(t,i)},function(t,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}r(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}),u=function(){function t(){this.o=!0}return t.prototype.u=function(){return this.o},t}(),a=function(t){function i(i,n){var r=t.call(this)||this;return r.S=i,r.M=i,r.o=n,r}return s(i,t),i.prototype.C=function(t){return t!==this.S&&(this.M=this.S,this.S=t,this.o=!0),this},i.prototype._=function(){return this.S},i.prototype.u=function(){return t.prototype.u.call(this)},i}(u),h=function(t,i){return{x:t,y:i}},f=function(t,i){return{x:t,y:i}},c=function(t,i,n){return{position:t,high:i,low:n}},l=function(t,i,n){return{x:t,y:i,z:n}},v=function(t){var i=Array(0),n=Array(0);return t.length>0&&t.forEach((function(t){i.push(h(t.position,t.high)),n.push(h(t.position,t.low))})),[i,n]},d=function(t,i){return{min:t,max:i}},y=function(t,i,n,r){return{x:t,y:i,width:n,height:r}},A=function(t,i){return void 0===i&&(i=!0),new a(t,i)},b=function(t,i,n,r){return void 0===t&&(t=0),void 0===i&&(i=0),void 0===n&&(n=0),void 0===r&&(r=0),{left:t,top:i,right:n,bottom:r}},p=b,m=function(t,i){return{left:void 0!==i.left?i.left:t.left,top:void 0!==i.top?i.top:t.top,right:void 0!==i.right?i.right:t.right,bottom:void 0!==i.bottom?i.bottom:t.bottom}},g=function(){var t=function(i,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])},t(i,n)};return function(i,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=i}t(i,n),i.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),x=function(t){function i(i){return t.call(this,i)||this}return g(i,t),i.prototype.toUint32=function(){return void 0!==this.T||(this.T=D(this.getR(),this.getG(),this.getB(),this.getA())),this.T},i.prototype.toString=function(){return"color:".concat(this.r,",").concat(this.g,",").concat(this.b,",").concat(this.a)},i.prototype.setA=function(t){return this.set("a",t/255)},i.prototype.setR=function(t){return this.set("r",t/255)},i.prototype.setG=function(t){return this.set("g",t/255)},i.prototype.setB=function(t){return this.set("b",t/255)},i.prototype.getA=function(){return 255*this.get("a")},i.prototype.getR=function(){return 255*this.get("r")},i.prototype.getG=function(){return 255*this.get("g")},i.prototype.getB=function(){return 255*this.get("b")},i.prototype.getHighlight=function(){return this.O||(this.O=new i({r:this.r+.45*(1-this.r),g:this.g+.45*(1-this.g),b:this.b+.45*(1-this.b),a:this.a<1?this.a+.45*(1-this.a):1})),this.O},i.prototype.getLighter=function(){return this.F||(this.F=new i({r:this.r+.4*(1-this.r),g:this.g+.4*(1-this.g),b:this.b+.4*(1-this.b),a:this.a})),this.F},i.prototype.getDarker=function(){return this.I||(this.I=new i({r:this.r-.4*(1-this.r),g:this.g-.4*(1-this.g),b:this.b-.4*(1-this.b),a:this.a})),this.I},i.prototype.toRGBAString=function(){return"rgba(".concat((255*this.r).toFixed(0),",").concat((255*this.g).toFixed(0),",").concat((255*this.b).toFixed(0),",").concat(this.a,")")},i}(i({type:"color",r:1,g:1,b:1,a:1})),S=function(t){return!(!t||"object"!=typeof t||!("type"in t)||"color"!==t.type)},w=function(t,i,n,r){return void 0===r&&(r=255),new x({r:t/255,g:i/255,b:n/255,a:r/255})},M=function(t){var i=t.startsWith("#")?t.substring(1):t.startsWith("0x")?t.substr(2):t;switch(i.length){case 8:return new x({r:Number("0x".concat(i.substring(0,2)))/255,g:Number("0x".concat(i.substring(2,4)))/255,b:Number("0x".concat(i.substring(4,6)))/255,a:Number("0x".concat(i.substring(6,8)))/255});case 6:return new x({r:Number("0x".concat(i.substring(0,2)))/255,g:Number("0x".concat(i.substring(2,4)))/255,b:Number("0x".concat(i.substring(4,6)))/255});case 4:return new x({r:Number("0x".concat(i.charAt(0)).concat(i.charAt(0)))/255,g:Number("0x".concat(i.charAt(1)).concat(i.charAt(1)))/255,b:Number("0x".concat(i.charAt(2)).concat(i.charAt(2)))/255,a:Number("0x".concat(i.charAt(3)).concat(i.charAt(3)))/255});case 3:return new x({r:Number("0x".concat(i.charAt(0)).concat(i.charAt(0)))/255,g:Number("0x".concat(i.charAt(1)).concat(i.charAt(1)))/255,b:Number("0x".concat(i.charAt(2)).concat(i.charAt(2)))/255});default:throw new Error("ColorHEX parsing error | input: ".concat(t))}},C=function(t,i,n){var r,e,o;void 0===i&&(i=1),void 0===n&&(n=1),t/=360;var s=Math.floor(6*t),u=6*t-s,a=n*(1-i),h=n*(1-u*i),f=n*(1-(1-u)*i);switch(s%6){case 0:r=n,e=f,o=a;break;case 1:r=h,e=n,o=a;break;case 2:r=a,e=n,o=f;break;case 3:r=a,e=h,o=n;break;case 4:r=f,e=a,o=n;break;default:r=n,e=a,o=h}return new x({r:r,g:e,b:o})},_=function(t){try{if(t.startsWith("rgba")){var i=t.substr(5).slice(0,-1),n=JSON.parse("[".concat(i,"]"));return w(n[0],n[1],n[2],255*n[3])}if(t.startsWith("rgb"))return i=t.substr(4).slice(0,-1),n=JSON.parse("[".concat(i,"]")),w(n[0],n[1],n[2]);if(t.startsWith("hsl")){n=t.substr(4).slice(0,-1).split(",").map(parseFloat);var r=k(n[0],n[1],n[2]);return w(r[0],r[1],r[2])}return t.startsWith("#")||t.startsWith("0x")?M(t):M(F(t))}catch(t){}return console.warn("ColorCSS parsing error: ".concat(t)),M("#fff")},T=function(t){return w(255&t,255&(t>>=8),255&(t>>=8),255&(t>>=8))},k=function(t,i,n){i/=100,n/=100;var r=(1-Math.abs(2*n-1))*i,e=t/60,o=r*(1-Math.abs(e%2-1)),s=[];isNaN(t)?s=[0,0,0]:e<=1?s=[r,o,0]:e<=2?s=[o,r,0]:e<=3?s=[0,r,o]:e<=4?s=[0,o,r]:e<=5?s=[o,0,r]:e<=6&&(s=[r,0,o]);var u=n-.5*r;return[Math.round(255*(s[0]+u)),Math.round(255*(s[1]+u)),Math.round(255*(s[2]+u))]},O={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgrey:"#d3d3d3",lightgreen:"#90ee90",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#d87093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},F=function(t){var i=O[t.toLowerCase()];if(i)return i;throw new Error("Unknown color code: ".concat(t))},I=new x({}),j=w(0,0,0,0),D=function(t,i,n,r){return void 0===r&&(r=255),(r<<24|n<<16|i<<8|t)>>>0},B=function(t){return D(255*t.r,255*t.g,255*t.b,255*t.a)},P=function(){var t=function(i,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])},t(i,n)};return function(i,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=i}t(i,n),i.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),E=function(){return E=Object.assign||function(t){for(var i,n=1,r=arguments.length;n<r;n++)for(var e in i=arguments[n])Object.prototype.hasOwnProperty.call(i,e)&&(t[e]=i[e]);return t},E.apply(this,arguments)},L=function(t,i){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,e,o=n.call(t),s=[];try{for(;(void 0===i||i-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(t){e={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(e)throw e.error}}return s},z=function(t,i){return t.value-i.value},R=i({type:"lut",steps:[],title:"",units:"",interpolate:!0,color:w(0,0,0,255),length:0,min:0,max:0,subranges:[],isValid:!1,percentageValues:!1}),V=function(t){var i=t.steps,n=i.length;i.sort(z);for(var r=L(n>0?[i[0].value,i[n-1].value]:[0,0],2),e=r[0],o=r[1],s=n>0?n-1:0,u=Array(s),a=0;a<s;a+=1)u[a]={min:i[a],max:i[a+1]};return{min:e,max:o,length:n,steps:i,subranges:u,isValid:n>0&&e!==o}},N=function(t){function i(i){var n=V(i);return t.call(this,function(t,i){return{steps:t.steps,title:t.title,units:t.units,interpolate:t.interpolate,percentageValues:t.percentageValues,color:t.color,length:i.length,min:i.min,max:i.max,subranges:i.subranges,isValid:i.isValid}}(i,n))||this}return P(i,t),i.prototype.toString=function(){return"LUT:interpolate=".concat(this.interpolate,",steps=").concat(this.steps.length,",percentage=").concat(this.percentageValues)},i.prototype.setSteps=function(t){return this.merge(V(E(E({},this),{steps:t})))},i.prototype.getSteps=function(){return this.get("steps")},i.prototype.setTitle=function(t){return this.set("title",t)},i.prototype.getTitle=function(){return this.get("title")},i.prototype.setUnits=function(t){return this.set("units",t)},i.prototype.getUnits=function(){return this.get("units")},i.prototype.setInterpolation=function(t){return this.set("interpolate",t)},i.prototype.getInterpolation=function(){return this.get("interpolate")},i.prototype.setFallbackColor=function(t){return this.set("color",t)},i.prototype.getFallbackColor=function(){return this.get("color")},i.prototype.setPercentageValues=function(t){return this.set("percentageValues",t)},i.prototype.getPercentageValues=function(){return this.get("percentageValues")},i.prototype.getColors=function(t,i){if(Array.isArray(t)){if(Array.isArray(t[0])){for(var n=t,r=n.length,e=n[0].length,o=function(t,i,n){if(n||2===arguments.length)for(var r,e=0,o=i.length;e<o;e++)!r&&e in i||(r||(r=Array.prototype.slice.call(i,0,e)),r[e]=i[e]);return t.concat(r||Array.prototype.slice.call(i))}([],L(Array(r)),!1).map((function(){return Array(e)})),s=0;s<r;s+=1)for(var u=0;u<e;u+=1)o[s][u]=this.j(n[s][u],i);return o}for(var a=t,h=a.length,f=Array(h),c=0;c<h;c+=1)f[c]=this.j(a[c],i);return f}return this.j(t,i)},i.prototype.j=function(t,i){var n,r,e,o=this.steps,s=o.length;if(0===s)return this.getFallbackColor();if(1===s)return o[0].color||this.color;if(this.percentageValues,this.percentageValues&&i&&(t=Math.max(Math.min((t-i.min)/(i.max-i.min),1),0)),this.interpolate){for(var u=0;u<s-1;u+=1){var a=o[u],h=o[u+1],f=Math.min(a.value,h.value),c=Math.max(a.value,h.value);if(t>=f&&t<=c){if(f===c)return a.color;var l=(t-a.value)/(h.value-a.value);return n=a.color,r=h.color,e=l,new x({r:n.r+(r.r-n.r)*e,g:n.g+(r.g-n.g)*e,b:n.b+(r.b-n.b)*e,a:n.a+(r.a-n.a)*e})}}return t<o[0].value?o[0].color:o[s-1].color}for(u=s-1;u>=0;u-=1)if(t>=o[u].value)return o[u].color;return o[0].color},i}(R),G=function(t){return!(!t||"object"!=typeof t||!("type"in t)||"lut"!==t.type)},U=function(){var t=function(i,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])},t(i,n)};return function(i,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=i}t(i,n),i.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Y=function(){return Y=Object.assign||function(t){for(var i,n=1,r=arguments.length;n<r;n++)for(var e in i=arguments[n])Object.prototype.hasOwnProperty.call(i,e)&&(t[e]=i[e]);return t},Y.apply(this,arguments)},W=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return U(i,t),i.prototype.toString=function(){return"emptyFill"},i}(i({type:"fillstyle",fillType:"empty"})),X=new W,H=function(t){return!!(t&&"object"==typeof t&&"type"in t&&"fillstyle"===t.type&&"fillType"in t&&"empty"===t.fillType)},Z=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return U(i,t),i}(i({type:"fillstyle",fillType:"solid",color:w(255,255,255)})),Q=function(t){function i(i){return t.call(this,Y(Y({},i),{fillType:"solid"}))||this}return U(i,t),i.prototype.toString=function(){return"solidFill:".concat(this.color.toString())},i.prototype.setColor=function(t){return S(t)?this.set("color",t):this.set("color",t(this.get("color")))},i.prototype.getColor=function(){return this.get("color")},i.prototype.setA=function(t){return this.setColor(this.getColor().setA(t))},i.prototype.setR=function(t){return this.setColor(this.getColor().setR(t))},i.prototype.setG=function(t){return this.setColor(this.getColor().setG(t))},i.prototype.setB=function(t){return this.setColor(this.getColor().setB(t))},i}(Z),J=function(t){return!!(t&&"object"==typeof t&&"type"in t&&"fillstyle"===t.type&&"fillType"in t&&"solid"===t.fillType)},K=function(t){function i(i){return t.call(this,Y(Y({},i),{fillType:"individual"}))||this}return U(i,t),i.prototype.toString=function(){return"individualPointFill:".concat(this.color.toString())},i.prototype.setFallbackColor=function(t){return S(t)?this.set("color",t):this.set("color",t(this.get("color")))},i.prototype.getFallbackColor=function(){return this.get("color")},i}(Z),q=function(t){return!!(t&&"object"==typeof t&&"type"in t&&"fillstyle"===t.type&&"fillType"in t&&"individual"===t.fillType)},$=function(t){function i(i){return t.call(this,Y(Y({},i),{fillType:"palette"}))||this}return U(i,t),i.prototype.toString=function(){return"palettedFill:lut=".concat(this.lut.toString(),",lookUpProperty=").concat(this.lookUpProperty)},i.prototype.getPalette=function(){return this.get("lut")},i.prototype.setLookUpProperty=function(t){return"function"==typeof t?this.set("lookUpProperty",t(this.get("lookUpProperty"))):this.set("lookUpProperty",t)},i.prototype.getLookUpProperty=function(){return this.get("lookUpProperty")},i}(i({type:"fillstyle",fillType:"palette",lut:new N({steps:[]}),lookUpProperty:"value"})),tt=function(t){return!!(t&&"object"==typeof t&&"type"in t&&"fillstyle"===t.type&&"fillType"in t&&"palette"===t.fillType)},it=function(){var t=function(i,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])},t(i,n)};return function(i,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=i}t(i,n),i.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();!function(t){t.circle="circle",t.ellipse="ellipse"}(e||(e={})),function(t){t.closestSide="closest-side",t.closestCorner="closest-corner",t.farthestSide="farthest-side",t.farthestCorner="farthest-corner"}(o||(o={}));var nt,rt=function(t){function i(i){var n=t.call(this,i)||this;if(null===i||i&&null===i.stops||i&&i.stops&&!Array.isArray(i.stops)||i&&i.stops&&Array.isArray(i.stops)&&i.stops.length<2)throw new Error("RadialGradientFill requires minimum two color stops to be defined.");return n}return it(i,t),i.prototype.toString=function(){return"radialGradientFill:".concat(this.shape,",").concat(this.ditheringEnabled,",").concat(this.extent,",").concat(this.position.x,",").concat(this.position.y,",").concat(this.stops.map((function(t){return"".concat(t.offset,",").concat(t.color.toString())})).join(","))},i.prototype.setColorStops=function(t){if(t.length<2)throw new Error("Minimum of two color stops required");return this.set("stops",t)},i.prototype.getColorStops=function(){return this.get("stops")},i.prototype.setPosition=function(t){return this.set("position",t)},i.prototype.getPosition=function(){return this.get("position")},i.prototype.setShape=function(t){return this.set("shape",t)},i.prototype.getShape=function(){return this.get("shape")},i.prototype.setExtent=function(t){return this.set("extent",t)},i.prototype.getExtent=function(){return this.get("extent")},i.prototype.setDitheringEnabled=function(t){return this.set("ditheringEnabled",t)},i.prototype.getDitheringEnabled=function(){return this.get("ditheringEnabled")},i}(i({type:"fillstyle",fillType:"radial-gradient",ditheringEnabled:!0,stops:[{color:M("#f00"),offset:0},{color:M("#0f0"),offset:1}],position:h(.5,.5),shape:e.ellipse,extent:o.farthestCorner})),et=function(t){return!!(t&&"object"==typeof t&&"type"in t&&"fillstyle"===t.type&&"fillType"in t&&"radial-gradient"===t.fillType)},ot=function(t){function i(i){var n=t.call(this,i)||this;if(null===i||i&&null===i.stops||i&&i.stops&&!Array.isArray(i.stops)||i&&i.stops&&Array.isArray(i.stops)&&i.stops.length<2)throw new Error("LinearGradientFill requires minimum two color stops to be defined.");return n}return it(i,t),i.prototype.toString=function(){return"linearGradientFill:".concat(this.angle,",").concat(this.stops.map((function(t){return"".concat(t.offset,",").concat(t.color.toString())})).join(","))},i.prototype.setColorStops=function(t){if(t.length<2)throw new Error("Minimum of two color stops required");var i=t.sort((function(t,i){return t.offset-i.offset}));return this.set("stops",i)},i.prototype.getColorStops=function(){return this.get("stops")},i.prototype.setAngle=function(t,i){return this.set("angle",i?function(t){return 180*t/Math.PI}(t):t)},i.prototype.getAngle=function(t){return t?mr(this.get("angle")):this.get("angle")},i}(i({type:"fillstyle",fillType:"linear-gradient",stops:[{color:M("#f00"),offset:0},{color:M("#0f0"),offset:1}],angle:0})),st=function(t){return!!(t&&"object"==typeof t&&"type"in t&&"fillstyle"===t.type&&"fillType"in t&&"linear-gradient"===t.fillType)},ut=function(){var t=function(i,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])},t(i,n)};return function(i,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=i}t(i,n),i.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),at=function(){return at=Object.assign||function(t){for(var i,n=1,r=arguments.length;n<r;n++)for(var e in i=arguments[n])Object.prototype.hasOwnProperty.call(i,e)&&(t[e]=i[e]);return t},at.apply(this,arguments)},ht=function(){function t(t,i,n,r){var e=this;this.D=new Yt,this.cellIndex=t,this.cellSpan=i,this.cellsAmount=n,this.observedAmount=r,this.x=new ft,this.y=new ft,this.z=new ft;var o=at({},t),s=at({},i);if(r){var u=function(t){var i=t.value;e.cellsAmount.x=i.reduce(Zn,0),e.cellIndex.x=i.reduce((function(t,i,n){return n>=o.x?t:t+i}),0),e.cellSpan.x=i.reduce((function(t,i,n){return n>=o.x&&n<o.x+s.x?t+i:t}),0),e.D.P("cellresize",{})};r.x.L("change",u),u({value:r.x._()});var a=function(t){var i=t.value;e.cellsAmount.y=i.reduce(Zn,0),e.cellIndex.y=i.reduce((function(t,i,n){return n>=o.y?t:t+i}),0),e.cellSpan.y=i.reduce((function(t,i,n){return n>=o.y&&n<o.y+s.y?t+i:t}),0),e.D.P("cellresize",{})};r.y.L("change",a),a({value:r.y._()}),this.R=function(){r.x.V("change",u),r.y.V("change",a)}}}return t.prototype.N=function(){return this.R&&(this.R(),this.R=void 0),this},t.prototype.addEventListener=function(t,i,n){this.D.addEventListener(t,i,n)},t.prototype.removeEventListener=function(t,i){this.D.removeEventListener(t,i)},t}(),ft=function(t){function i(){var i=null!==t&&t.apply(this,arguments)||this;return i.G=0,i.U=10,i.Y=1,i}return ut(i,t),i.prototype.W=function(){return this.o=!1,this},i.prototype.X=function(){return this.o=!0,this},i.prototype.getInnerStart=function(){return this.G},i.prototype.getInnerEnd=function(){return this.U},i.prototype.getInnerInterval=function(){return Math.abs(this.getInnerEnd()-this.getInnerStart())},i.prototype.H=function(t,i){return this.G=t,this.U=i,this.Z(),this},i.prototype.J=function(t){return this.Y=t,this.Z(),this},i.prototype.K=function(t){return t/this.Y},i.prototype.Z=function(){var t=this.K(this.U-this.G),i=this.Y;void 0!==this.q&&!1!==Ci(t,this.q)||(this.o=!0,this.$=i,this.q=t)},i.prototype.tt=function(){return this.q},i.prototype.it=function(){return this.$},i.prototype.nt=function(){return this.U<this.G},i.prototype.rt=function(t,i){return!0},i}(u),ct=function(){return ct=Object.assign||function(t){for(var i,n=1,r=arguments.length;n<r;n++)for(var e in i=arguments[n])Object.prototype.hasOwnProperty.call(i,e)&&(t[e]=i[e]);return t},ct.apply(this,arguments)},lt={d1:function(t){return new t.scale1DConstructor(0,1,1,void 0)},d2:function(t){return(new t.scaleXYConstructor).et({x:0,y:0},{x:1,y:1},{x:1,y:1},void 0)},d3:function(){return new ht({x:0,y:0},{x:1,y:1},{x:1,y:1},void 0)}},vt=function(t,i,n){return i===n?t:n.ot(i.st(t))},dt=function(t,i,n){if(i===n)return t;var r=i instanceof Nr?i.x:i.x instanceof Nr?i.x.x:i.x.ut,e=i instanceof Nr?i.y:i.y instanceof Nr?i.y.y:i.y.ut,o=n instanceof Nr?n.x:n.x instanceof Nr?n.x.x:n.x.ut,s=n instanceof Nr?n.y:n.y instanceof Nr?n.y.y:n.y.ut;return ct(ct({},t),{x:vt(t.x,r,o),y:vt(t.y,e,s)})},yt=function(t,i,n){var r=t(i,n);return function(t){return new Q({color:r(t)})}},At=function(t,i,n){var r=t(i+1,n);return function(t){return new rt({stops:[{offset:0,color:r(t)},{offset:1,color:r(t).getDarker()}]})}},bt=function(t,i,n,r){var e=t(i+1,r);return function(t){return new ot({stops:[{offset:0,color:e(t).getDarker()},{offset:.5,color:e(t)},{offset:1,color:e(t).getDarker()}],angle:n||90})}},pt=function(){for(var t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];if(0===t.length)return{remove:Mi};var n=!1,r=t.map((function(i){var r=function(r){!function(i,r,e){n||(n=!0,t.filter((function(t){return t!==i})).forEach((function(t){return t.ht(r,e,!1,i.getStopped(),"synchronizedAxis")})),n=!1)}(i,r.start,r.end)};return i.addEventListener("intervalchange",r),r})),e=!1,o=t.map((function(i){var n=function(n){!function(i,n){e||(e=!0,t.filter((function(t){return t!==i})).forEach((function(t){return t.setStopped(n)})),e=!1)}(i,n.isStopped)};return i.addEventListener("stoppedchange",n),n}));return{remove:function(){t.forEach((function(t,i){t.removeEventListener("intervalchange",r[i]),t.removeEventListener("stoppedchange",o[i])}))}}},mt=function(t,i,n,r){if(!n||0===n.length)throw new Error("Invalid use regularColorSteps 'colorPalette' is undefined or empty");var e=null==r?void 0:r.formatLabels,o=null==r?void 0:r.alpha;return n.map((function(r,s){var u=t+s/(n.length-1)*(i-t);return{color:void 0!==o?r.setA(o):r,value:u,label:e?e(u):void 0}}))},gt=function(t){return t&&"object"==typeof t&&"column"in t&&"row"in t},xt=function(t){return t&&"object"==typeof t&&"z"in t&&"column"in t&&"row"in t},St=function(t){return t&&"object"==typeof t&&"position"in t&&"open"in t&&"high"in t&&"isPacked"in t},wt=function(t){return t&&"object"==typeof t&&"annulus"in t&&"sector"in t},Mt=function(t){return t&&"object"==typeof t&&"index"in t},Ct=function(t){return t&&"object"==typeof t&&"xSize"in t&&"ySize"in t&&"zSize"in t},_t=function(t){return t&&"object"==typeof t&&"figure"in t&&"x1"in t&&"y2"in t&&"height"in t},Tt=function(t){return t&&"object"==typeof t&&"figure"in t&&"start"in t&&"end"in t&&"median"in t&&"upperQuartile"in t},kt=function(t){return t&&"object"==typeof t&&"figure"in t&&"x"in t&&"radiusX"in t&&"radiusY"in t},Ot=function(t){return t&&"object"==typeof t&&"figure"in t&&"x"in t&&"coordinates"in t},Ft=function(t){return t&&"object"==typeof t&&"figure"in t&&"startX"in t&&"endX"in t},It=function(t){return t&&"object"==typeof t&&"x"in t&&"y"in t},jt=function(t){return!0===t.isLcjsArtificialEvent};!function(t){t[t.Nearest=0]="Nearest",t[t.NearestX=1]="NearestX",t[t.NearestY=2]="NearestY"}(nt||(nt={}));var Dt,Bt=function(t,i,n,r,e,o,s,u,a,h){var f=t.length;if(0!==f){var c=r?1:0,l=f-(e?2:1);if(n===nt.Nearest)return Pt(t,i,o,s,c,l);if(n===nt.NearestX||n===nt.NearestY){if("boolean"==typeof h&&("x"===a&&n===nt.NearestX||"y"===a&&n===nt.NearestY))return zt(t,dt(i,s,o),a,h,c,l);if(n===nt.NearestX)return Et(t,dt(i,s,o),u,c,l);if(n===nt.NearestY)return Lt(t,dt(i,s,o),u,c,l)}}},Pt=function(t,i,n,r,e,o){for(var s,u=Number.MAX_VALUE,a=e;a<=o;a+=1){var h=t[a];if(!Number.isNaN(h.x)&&!Number.isNaN(h.y)){var f=dt(h,n,r),c=Math.pow(f.x-i.x,2)+Math.pow(f.y-i.y,2);c<u&&(u=c,s=a)}}return s},Et=function(t,i,n,r,e){if(!(i.x<n.min.x||i.x>n.max.x)){for(var o,s=Number.MAX_VALUE,u=r;u<=e;u+=1){var a=t[u],h=a.x>i.x?a.x-i.x:i.x-a.x;h<s&&!Number.isNaN(a.x)&&!Number.isNaN(a.y)&&(s=h,o=u)}return o}},Lt=function(t,i,n,r,e){if(!(i.y<n.min.y||i.y>n.max.y)){for(var o,s=Number.MAX_VALUE,u=r;u<=e;u+=1){var a=t[u],h=a.y>i.y?a.y-i.y:i.y-a.y;h<s&&!Number.isNaN(a.x)&&!Number.isNaN(a.y)&&(s=h,o=u)}return o}},zt=function(t,i,n,r,e,o){var s="x"===n,u=s?i.x:i.y,a=t[e],h=t[o],f=a.x<h.x?a.x:h.x,c=a.y<h.y?a.y:h.y,l=a.x>h.x?a.x:h.x,v=a.y>h.y?a.y:h.y;if(!(s&&(u<f||u>l)||!s&&(u<c||u>v)))for(var d=e,y=Math.floor((e+o)/2),A=o,b=-1;;){var p=u-(s?t[y].x:t[y].y);if(p*(r?-1:1)>0)d=Math.min(y+1,A),b=Math.floor((d+A)/2);else{if(0===Math.abs(p))return y;A=Math.max(y-1,d),b=Math.floor((d+A)/2)}if(b===y){var m=y>e?Math.abs(u-(s?t[y-1].x:t[y-1].y)):Rn,g=y<o?Math.abs(u-(s?t[y+1].x:t[y+1].y)):Rn,x=Math.abs(p);switch(Math.min(x,m,g)){case m:return y-1;case g:return y+1;default:return y}}else y=b}},Rt=function(t,i,n,r,e,o){var s="x"===n,u=s?i.x:i.y,a=t[e],h=t[o],f=a.x<h.x?a.x:h.x,c=a.y<h.y?a.y:h.y,l=a.x>h.x?a.x:h.x,v=a.y>h.y?a.y:h.y;if(!(s&&(u<f||u>l)||!s&&(u<c||u>v)))for(var d=e,y=Math.floor((e+o)/2),A=o,b=-1;;){var p=u-(s?t[y].x:t[y].y);if(p*(r?-1:1)>0)d=Math.min(y+1,A),b=Math.floor((d+A)/2);else{if(0===Math.abs(p))return{a:y,b:y,lerpAmount:0};A=Math.max(y-1,d),b=Math.floor((d+A)/2)}if(b===y){if(p*(r?-1:1)<0&&y>e){var m=t[y-1],g=t[y];return{a:y-1,b:y,lerpAmount:s?(i.x-m.x)/(g.x-m.x):(i.y-m.y)/(g.y-m.y)}}return y<o?(m=t[y],g=t[y+1],{a:y,b:y+1,lerpAmount:s?(i.x-m.x)/(g.x-m.x):(i.y-m.y)/(g.y-m.y)}):{a:y,b:y,lerpAmount:0}}y=b}},Vt=0,Nt=function(){function t(t,i,n){this.ft=A(!0),this.ct=!1,this.vt=!0,this.dt=!1,this.yt=void 0,this.At=0,this.D=new Yt,this.bt=t,this.xt=i,this.St=n,this.wt=Vt,Vt+=1,this.Mt=t.Ct.highlightColorOffset}return t.prototype._t=function(){var t;return this.Tt("DataPattern",(function(i){return t=i.pattern,!0})),"ProgressiveX"===t||"RegressiveX"===t?nt.NearestX:"ProgressiveY"===t||"RegressiveY"===t?nt.NearestY:nt.Nearest},t.prototype.kt=function(){},t.prototype.addEventListener=function(t,i,n){this.D.addEventListener(t,i,n)},t.prototype.P=function(t,i,n,r){this.D.P(t,i,{collectionMember:n,info:r})},t.prototype.removeEventListener=function(t,i){this.D.removeEventListener(t,i)},t.prototype.Ot=function(t){return void 0!==this.St.find((function(i){return i.type===t}))},t.prototype.Tt=function(t,i){var n;return!!this.Ot(t)&&!0===i(null===(n=this.St.find((function(i){return i.type===t})))||void 0===n?void 0:n.args)},t.prototype.dispose=function(){return this.ct||(this.bt.Ft(this),this.ct=!0,this.xt(this),this.D.P("dispose",{})),this},t.prototype.isDisposed=function(){return this.ct},t.prototype.setVisible=function(t){var i=this.vt;return this.vt=t,!t&&i&&this.ft._()&&this.bt.Ft(this),this},t.prototype.getVisible=function(){return this.vt},t.prototype.setPointerEvents=function(t){var i=this.ft._();return this.ft.C(t),t||i&&this.bt.Ft(this),this},t.prototype.getPointerEvents=function(){return this.ft._()},t.prototype.It=function(t){return this.yt=t,this},t.prototype.jt=function(){return this.yt?this.yt:Gt},t.prototype.Dt=function(t){return this.At=t,this},t.prototype.Bt=function(){return this.At},t.prototype.Pt=function(t){return this.Mt=t,this},t.prototype.Et=function(){return this.Mt},t}(),Gt=d(h(0,0),h(0,0)),Ut={click:!0,contextmenu:!0,dblclick:!0,gotpointercapture:!0,lostpointercapture:!0,pointercancel:!0,pointerdown:!0,pointerenter:!0,pointerleave:!0,pointermove:!0,pointerout:!0,pointerover:!0,pointerup:!0,touchcancel:!0,touchend:!0,touchmove:!0,touchstart:!0,wheel:!0,drag:!0,dragend:!0,dragenter:!0,dragleave:!0,dragover:!0,dragstart:!0,drop:!0},Yt=function(){function t(){this.Lt=new Array,this.zt=[],this.ft=!0,this.Rt=!1}return t.prototype.setPointerEvents=function(t){this.ft=t,this.zt.forEach((function(i){return i.setPointerEvents(t)}))},t.prototype.getPointerEvents=function(){return this.ft},t.prototype.addEventListener=function(t,i,n){this.Lt.push({listener:i,key:t,options:n||{}})},t.prototype.removeEventListener=function(t,i){var n=this.Lt.findIndex((function(t){return t.listener===i}));n>=0&&this.Lt.splice(n,1)},Object.defineProperty(t.prototype,"draggable",{get:function(){return this.Rt},set:function(t){this.Rt=t,this.zt.forEach((function(i){i.dt=t}))},enumerable:!1,configurable:!0}),t.prototype.P=function(t,i,n){var r=this;void 0===n&&(n=void 0),this.Lt.slice().reverse().forEach((function(e){e.key===t&&(e.listener(i,n),!0===e.options.once&&r.removeEventListener(t,e.listener))}))},t.prototype.Vt=function(t,i){var n=this;Object.keys(Ut).forEach((function(r){t.addEventListener(r,(function(t,e){var o=Wt(t)?{clientX:t.changedTouches[0].clientX,clientY:t.changedTouches[0].clientY}:t,s=(null==i?void 0:i.getExtraData)&&void 0!==o.clientX?i.getExtraData(o,e.collectionMember,e.info):{};n.P(r,t,s),!t.defaultPrevented&&(null==i?void 0:i.continueIfNotPrevented)&&i.continueIfNotPrevented(r,t,s)}))})),this.zt.push(t),t.addEventListener("dispose",(function(){var i=n.zt.indexOf(t);i>=0&&n.zt.splice(i,1)})),t.dt=this.Rt,t.setPointerEvents(this.ft)},t.prototype.Nt=function(t,i){var n=this;Object.keys(Ut).forEach((function(r){t.addEventListener(r,(function(t,e){var o=i(e.collectionMember);o&&n.P(r,t,o)}))})),this.zt.push(t),t.addEventListener("dispose",(function(){var i=n.zt.indexOf(t);i>=0&&n.zt.splice(i,1)})),t.setPointerEvents(this.ft),t.dt=this.Rt},t.prototype.Gt=function(t){var i=this;Object.keys(Ut).forEach((function(n){t.addEventListener(n,(function(t,r){i.P(n,t,r)}))})),t.setPointerEvents(this.ft),t.draggable=this.Rt},t}(),Wt=function(t){return!(!t||"object"!=typeof t||!("touches"in t))},Xt={linear:function(t,i,n){var r=i-t;return function(e){return e<n?t+r/n*e:i}},easeIn:function(t,i,n){return function(r){return r<n?t+Math.abs(2*Math.pow(Math.sqrt(.5)*r/n,2))*(i-t):i}},easeOut:function(t,i,n){return function(r){return r<n?t+Math.abs(1-2*Math.pow(Math.sqrt(.5)*(1-r/n),2))*(i-t):i}},ease:function(t,i,n){return function(r){return r<n?t+(r<n/2?.5*Math.pow(r/n*2,2.5):.5+.5*(1-Math.pow(1-2*(r/n-.5),2.5)))*(i-t):i}},logarithmic:function(t){var i=nn(t);return function(n,r,e){var o=i(n),s=i(r);return function(i){return i<e?Math.pow(t,o+Math.abs(1-2*Math.pow(Math.sqrt(.5)*(1-i/e),2))*(s-o)):r}}}},Ht=function(){function t(t,i,n,r,e){void 0===r&&(r=Xt.linear);var o=this;this.delta=0,this.nextAnimations=new Array,this.Ut=!1,this.easing=Xt.linear,this.isOver=function(){return(o.delta===o.duration||o.Ut)&&0===o.nextAnimations.length},this.D=new Yt,this.values=t,this.action=i,this.duration=n,this.easing=r,this.Yt=e,this.eases=t.map((function(t){var i=function(t,i){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,e,o=n.call(t),s=[];try{for(;(void 0===i||i-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(t){e={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(e)throw e.error}}return s}(t,2),e=i[0],o=i[1];return r(e,o,n)}))}return t.prototype.Wt=function(){this.D.P("start",{})},t.prototype.start=function(){return this.Yt.includes(this)||this.Yt.push(this),this},t.prototype.addNextAnimations=function(t){var i=this;return t instanceof Array?t.forEach((function(t){return i.nextAnimations.push(t)})):this.nextAnimations.push(t),this},t.prototype.NextAnimation=function(i,n,r,e){void 0===r&&(r=this.duration),void 0===e&&(e=this.easing);var o=new t(i,n,r,e,this.Yt);return this.nextAnimations.push(o),o},t.prototype.finish=function(t){if(void 0===t&&(t=!0),this.Ut=!0,this.Yt.splice(this.Yt.indexOf(this),1),this.nextAnimations.length>0){var i=this.nextAnimations[0];return t&&this.D.Lt.forEach((function(t){"allAnimationEnd"===t.key&&i.addEventListener("allAnimationEnd",t.listener),"everyAnimationEnd"===t.key&&i.addEventListener("everyAnimationEnd",t.listener)})),i.addNextAnimations(this.nextAnimations.slice(1)),i.start(),t&&(this.D.P("end",{nextAnimation:i}),this.D.P("everyAnimationEnd",{nextAnimation:i})),i}t&&(this.D.P("end",{nextAnimation:void 0}),this.D.P("everyAnimationEnd",{nextAnimation:void 0}),this.D.P("allAnimationEnd",{}))},t.prototype.finishAll=function(t){void 0===t&&(t=!0);for(var i=this;i;)i=i.finish(t)},t.prototype.getFinalValues=function(){return this.nextAnimations.length>0?this.nextAnimations[this.nextAnimations.length-1].values.map(Si):this.values.map(Si)},t.prototype.getTimeUntilFinish=function(){for(var t=this.duration-this.delta,i=0;i<this.nextAnimations.length;i+=1)t+=this.nextAnimations[i].duration-this.nextAnimations[i].delta;return t},t.prototype.addEventListener=function(t,i,n){this.D.addEventListener(t,i,n)},t.prototype.removeEventListener=function(t,i){this.D.removeEventListener(t,i)},t}(),Zt=function(t,i){void 0===i&&(i=60),i>60&&console.log("Note: Animator FPS is usually capped at 60 by the browser!");var n,r,e=[],o=0,s=function(){n=void 0;var u=Date.now();(o=u-(r=r||u))/1e3>=1/i&&(r=Date.now()-o%(1e3/i),e.forEach((function(t){0===t.delta&&t.Wt(),t.delta+=o-o%(1e3/i),t.delta>t.duration&&(t.delta=t.duration),t.action(t.eases.map((function(i){return i(t.delta)}))),t.delta===t.duration&&t.finish()})),t()),e.length>0?n=mi.requestAnimationFrame(s):(n=void 0,r=void 0)};return function(t,i){return void 0===t&&(t=1e3),void 0===i&&(i=Xt.linear),function(r,o,u){void 0===u&&(u=t);var a=new Ht(r,o,u,i,e).start();return n||(n=mi.requestAnimationFrame(s)),a}}},Qt=function(){var t=function(i,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])},t(i,n)};return function(i,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=i}t(i,n),i.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();!function(t){t[t.Fill=0]="Fill",t[t.Fit=1]="Fit",t[t.Stretch=2]="Stretch",t[t.Center=3]="Center",t[t.Tile=4]="Tile"}(Dt||(Dt={}));var Jt,Kt=function(t){function i(i){return t.call(this,i)||this}return Qt(i,t),i.prototype.setSource=function(t){return this.set("source",t)},i.prototype.getSource=function(){return this.get("source")},i.prototype.setSurroundingColor=function(t){return S(t)?this.set("surroundingColor",t):this.set("surroundingColor",t(this.get("surroundingColor")))},i.prototype.getSurroundingColor=function(){return this.get("surroundingColor")},i.prototype.setSourceMissingColor=function(t){return S(t)?this.set("sourceMissingColor",t):this.set("sourceMissingColor",t(this.get("sourceMissingColor")))},i.prototype.getSourceMissingColor=function(){return this.get("sourceMissingColor")},i.prototype.setFitMode=function(t){return this.set("fitMode",t)},i.prototype.getFitMode=function(){return this.get("fitMode")},i.prototype.toString=function(){return"imagefill:".concat(this.fitMode)},i}(i({type:"fillstyle",fillType:"image",source:void 0,surroundingColor:w(0,0,0,0),sourceMissingColor:w(0,0,0,0),fitMode:Dt.Fill})),qt=function(t){return!!(t&&"object"==typeof t&&"type"in t&&"fillstyle"===t.type&&"fillType"in t&&"image"===t.fillType)},$t=function(){var t=function(i,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])},t(i,n)};return function(i,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=i}t(i,n),i.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ti=new(function(t){function i(){var i=null!==t&&t.apply(this,arguments)||this;return i.thickness=0,i}return $t(i,t),i.prototype.setThickness=function(t){return this},i.prototype.getThickness=function(){return 0},i.prototype.Xt=function(){return 0},i.prototype.setFillStyle=function(t){return this},i.prototype.getFillStyle=function(){return X},i}(i({type:"linestyle",lineType:"empty"}))),ii=function(t){return!(!t||"object"!=typeof t||!("lineType"in t)||"empty"!==t.lineType)},ni=-34028234663852886e22,ri="-340282346638528859811704183484516925440.0",ei=function(){var t=function(i,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])},t(i,n)};return function(i,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=i}t(i,n),i.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),oi=function(t){function i(n,r){var e,o="ChartError: ".concat(n," ").concat(r?"in ".concat(r.constructor.name):"");return e=t.call(this,o)||this,Object.setPrototypeOf(e,i.prototype),e}return ei(i,t),i}(Error);Jt=Error,ei((function t(i,n){var r,e="Axis Error: ".concat(i," ").concat(n?"in ".concat(n.constructor.name):"");return r=Jt.call(this,e)||this,Object.setPrototypeOf(r,t.prototype),r}),Jt);var si,ui,ai,hi,fi=function(t){function i(n,r,e){void 0===e&&(e=!1);var o,s="EngineError: ".concat(n," ").concat(r?"in ".concat(r.constructor.name):"");return o=t.call(this,s)||this,e&&mi.alert(s),Object.setPrototypeOf(o,i.prototype),o}return ei(i,t),i}(Error),ci=function(t){function i(n){var r=t.call(this,n)||this;return Object.setPrototypeOf(r,i.prototype),r}return ei(i,t),i}(fi);!function(t){ei((function i(n){var r,e="UnImplemented Error: ".concat(n,"() is not implemented!");return r=t.call(this,e)||this,Object.setPrototypeOf(r,i.prototype),r}),t)}(Error),function(t){t[t.Content=0]="Content",t[t.PaddedContent=1]="PaddedContent",t[t.PaddedBackground=2]="PaddedBackground",t[t.Everything=3]="Everything"}(si||(si={})),function(t){t[t.never=0]="never",t[t.always=1]="always",t[t.whenHovered=2]="whenHovered",t[t.whenDragged=3]="whenDragged",t[t.whenNotDragged=4]="whenNotDragged",t[t.whenHoveredOrDragged=5]="whenHoveredOrDragged"}(ui||(ui={})),function(t){t[t.notDraggable=0]="notDraggable",t[t.draggable=1]="draggable",t[t.onlyHorizontal=2]="onlyHorizontal",t[t.onlyVertical=3]="onlyVertical"}(ai||(ai={})),function(t){t[t.Up=0]="Up",t[t.Right=1]="Right",t[t.Down=2]="Down",t[t.Left=3]="Left"}(hi||(hi={}));var li,vi,di=function(){return di=Object.assign||function(t){for(var i,n=1,r=arguments.length;n<r;n++)for(var e in i=arguments[n])Object.prototype.hasOwnProperty.call(i,e)&&(t[e]=i[e]);return t},di.apply(this,arguments)},yi=function(t,i){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,e,o=n.call(t),s=[];try{for(;(void 0===i||i-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(t){e={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(e)throw e.error}}return s},Ai=function(t){var i="function"==typeof Symbol&&Symbol.iterator,n=i&&t[i],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(i?"Object is not iterable.":"Symbol.iterator is not defined.")},bi=function(){for(var t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];var n=function(t){return t&&"object"==typeof t&&!Array.isArray(t)};return t.reduce((function(t,i){return i?(Object.keys(i).forEach((function(r){var e=t[r],o=i[r];n(e)&&n(o)?t[r]=bi(e,o):t[r]=o})),t):t}),{})},pi=function(t){if(t.resourcesBaseUrl){var i=t.styleFactory(t.resourcesBaseUrl),n=qt(i)&&i.getSource(),r=n&&n instanceof Image?n:void 0;return null==r||r.addEventListener("error",(function(){Cn(t.resourcesBaseUrl,r.src,"Theme resource",{shouldCrash:!1})})),i}var e="".concat(mi.location.origin,"/resources"),o=t.styleFactory(e);if(qt(o)){var s=o.getSource();s instanceof Image&&s.addEventListener("error",(function(){var i=t.styleFactory("https://lcjs-resources.lightningchart.com/v1"),n=qt(i)&&i.getSource(),r=n&&n instanceof Image?n:void 0;mi.console.warn("LightningChart JS warning | fallbacking to publicly hosted asset resources.\nFor more information, please see https://lightningchart.com/js-charts/docs/troubleshooting/warning-using-publicly-hosted-resources/"),null==r||r.addEventListener("load",(function(){t.apply(i)})),null==r||r.addEventListener("error",(function(){Cn(t.resourcesBaseUrl,s.src,"Theme resource",{shouldCrash:!1})}))}))}return o},mi="undefined"!=typeof window?window:"undefined"!=typeof global&&global._lcjs?global._lcjs:{},gi=function(t,i){return t.x===i.x&&t.y===i.y},xi=function(t){return t!==Rn&&t!==Vn&&!Number.isNaN(t)&&Number.isFinite(t)&&t!==1/0&&t!==-1/0},Si=function(t){return t[1]},wi=function(t){return t.dispose()},Mi=function(){},Ci=function(t,i){return t===i},_i=function(t,i,n){return n>i?Math.min(Math.max(t,i),n):Math.min(Math.max(t,n),i)},Ti=function(t){return Array.prototype.concat.apply([],t)},ki=function(t,i){var n=i&&void 0!==i.row.start?i.row.start:0,r=i&&void 0!==i.row.end?i.row.end:t.y,e=i&&void 0!==i.column.start?i.column.start:0,o=i&&void 0!==i.column.end?i.column.end:t.x;return[Math.min(n,r),Math.max(n,r),Math.min(e,o),Math.max(e,o)]},Oi=function(t,i){for(;i;)t.push(t.shift()),i-=1},Fi=function(t){var i,n,r=[];try{for(var e=Ai(t),o=e.next();!o.done;o=e.next()){var s=o.value;r.push(s.slice())}}catch(t){i={error:t}}finally{try{o&&!o.done&&(n=e.return)&&n.call(e)}finally{if(i)throw i.error}}return r},Ii=function(t,i){return void 0===t||Number.isNaN(t)?i:t},ji=function(t){return t.Ht()},Di=function(t){return t.Zt()},Bi=function(t){return t.Qt()},Pi=function(t){return t.Jt()},Ei=function(t){return t.min.x},Li=function(t){return t.max.x},zi=function(t){return t.min.y},Ri=function(t){return t.max.y},Vi=function(t,i,n,r,e){if(t.length>0){for(var o=e?r(e):void 0,s=0;s<t.length;s+=1){var u=i(t[s]);void 0!==u&&(o=void 0!==o?n(o,u):u)}return o}if(e)return r(e)},Ni=function(t,i){return t.position===i.position&&t.high===i.high&&t.low===i.low},Gi=h(0,1),Ui=h(1,0),Yi=h(0,-1),Wi=h(-1,0),Xi=h(0,0),Hi=function(t){switch(t){case hi.Up:return Gi;case hi.Right:return Ui;case hi.Down:return Yi;case hi.Left:return Wi;default:return Xi}},Zi=function(t){return t===hi.Left||t===hi.Right},Qi=function(t){t.stopPropagation(),t.preventDefault()},Ji=function(t,i){if(!i)return t;for(var n=t.length,r=new Float32Array(2*n),e=0,o=0;o<n;o+=1){var s=t[o],u=Math.fround(s);r[e+0]=u,r[e+1]=s-u,e+=2}return r},Ki=function(t,i,n){if(void 0===n&&(n=Float32Array),!i){for(var r=t.length,e=new n(2*r),o=0,s=0;s<r;s+=1){var u=t[s];e[o+0]=u.x,e[o+1]=u.y,o+=2}return e}var a=t.length,h=new n(4*a),f=0;for(s=0;s<a;s+=1){u=t[s];var c=Math.fround(u.x),l=Math.fround(u.y);h[f+0]=c,h[f+1]=l,h[f+2]=u.x-c,h[f+3]=u.y-l,f+=4}return h},qi=function(t){for(var i=t.length,n=new Float32Array(3*i),r=0,e=0;e<i;e+=1){var o=t[e];n[r+0]=o.x,n[r+1]=o.y,n[r+2]=o.z,r+=3}return n},$i=function(t){return function(i){var n=t.indexOf(i);n>=0&&t.splice(n,1)}},tn=function(t){for(var i=t.length,n=0;n<i-1;n+=1)t[n].x===t[n+1].x&&t[n].y===t[n+1].y&&(t.splice(n,1),n-=1,i-=1);return t},nn=function(t){var i=Math.log(t);return function(t){return Math.log(t)/i}},rn=nn(Math.E),en=function(t,i){var n=i[t];return n?n():void 0},on=function(t,i){var n;if(i)n=i;else{for(var r={x:0,y:0},e=0;e<t.length;e+=1)r.x+=t[e].x/t.length,r.y+=t[e].y/t.length;n=r}return t.sort((function(t,i){return gr(lr(t,n))-gr(lr(i,n))}))},sn=function(t,i,n){if(0===t.length)return!1===n.canReturnB?i.slice():i;var r=i.length;if(r<1e5)return t.push.apply(t,i),t;for(var e=0;e<r;e+=1)t.push(i[e]);return t},un=function(t,i,n){return n<0?t:n>1?i:w(t.getR()+n*(i.getR()-t.getR()),t.getG()+n*(i.getG()-t.getG()),t.getB()+n*(i.getB()-t.getB()),t.getA()+n*(i.getA()-t.getA()))},an=function(t){return 255===t.getA()?t:t.setA(255)},hn=(li=w(0,0,0),function(t){return t=an(t),new ot({angle:180,stops:[{offset:0,color:t},{offset:1,color:un(t,li,.5)}]})}),fn=(vi=function(t){var i;if(t){if(J(t)){if(0===t.getColor().getA())return;return t.getColor()}if(et(t)||st(t)){var n=t.getColorStops();return 3===n.length?n[1].color:null===(i=n[0])||void 0===i?void 0:i.color}tt(t)}},function(t,i,n,r){var e,o,s,u,a=[];if(r.fill&&a.push(r.fill),r.fill2&&a.push(r.fill2),r.stroke){var h=r.stroke.getFillStyle();h!==X&&("stroke"===(null===(e=r.behavior)||void 0===e?void 0:e.priority)?a.unshift(h):a.push(h))}if(r.point3D){var f=r.point3D;a.push(f.getFillStyle())}if(r.behavior&&!0===r.behavior.colorStep){var c=yi(a.reduce((function(t,i){if(t[0]&&t[1])return t;var n=vi(i);return n&&(void 0===t[0]?t[0]=n:t[1]=n),t}),[void 0,void 0]),2),l=c[0],v=c[1];o=l&&v?(s=l)===(u=v)||s.getR()===u.getR()&&s.getG()===u.getG()&&s.getB()===u.getB()?hn(s):(s=an(s),u=an(u),new ot({angle:0,stops:[{offset:0,color:u},{offset:.5,color:u},{offset:.5,color:s},{offset:1,color:s}]})):i.uiButtonFillStyle}else{var d=a.reduce((function(t,i){return t||vi(i)}),void 0);o=d?n?new Q({color:d}):hn(d):i.uiButtonFillStyle}t.setButtonOnFillStyle(o)}),cn=function(t,i){var n=t;if(tt(n))return{lut:n.getPalette(),lookUpProperty:n.getLookUpProperty(),valueRange:i}},ln=function(t){var i=0;return function(){return i+=1,"".concat(t,"-").concat(i)}},vn=function(t,i){for(var n="string"==typeof t?t:String(t),r=n.indexOf("."),e=r>=0?r:n.length;e<i;e+=1)n="0".concat(n);return n},dn=function(t,i){return"function"==typeof t?t(i):t},yn=function(t,i){return i()},An=function(){return new Error("LightningChart JS encountered an unexpected error.\nPlease report this issue to https://lightningchart.com/js-charts/docs/contact")};new Q({color:w(255,255,255,1)});var bn=function(t){return t===Nn||t.min.x===Nn.min.x&&t.max.x===Nn.max.x&&t.min.y===Nn.min.y&&t.max.y===Nn.max.y},pn=function(t){return Array.from(new Set(t))},mn=function(t){return t.filter((function(t){return void 0!==t}))},gn=function(t){return"boolean"==typeof t?t?1:0:t>1?1:t<0?0:t},xn=function(t,i,n){i.length<=0||(t.setText(n.label).setOn(i[0].getVisible()),n.style&&t.setButtonOnFillStyle(n.style),n.toggleVisibilityOnClick&&t.addEventListener("switch",(function(t){i.forEach((function(i){return i.setVisible(t.state)}))})),t.addEventListener("pointerenter",(function(){i.forEach((function(t){return t.setHighlight(!0)}))})),t.addEventListener("pointerleave",(function(){i.forEach((function(t){return t.setHighlight(!1)}))})),i.forEach((function(i){return i.addEventListener("pointerenter",(function(){return t.setHighlight(!0)}))})),i.forEach((function(i){return i.addEventListener("pointerleave",(function(){return t.setHighlight(!1)}))})))},Sn=function(t,i){throw new Error(i)},wn=function(t){var i;return function(){return i||(i=t())}},Mn=function(t){if(t===ti)return 0;var i=t.getThickness();return i<0?1:1*i},Cn=function(t,i,n,r){var e=r.shouldCrash,o='LightningChart JS Resources not found.\nresourcesBaseUrl: "'.concat(t,'"\ninitiator: ').concat(n,"\nresource url: ").concat(i,"\nFor more information, please see https://lightningchart.com/js-charts/docs/troubleshooting/error-resources-not-found/");if(e)throw mi.alert(o),new Error(o);mi.console.warn(o)},_n=function(t,i,n,r){if(void 0===r&&(r=0),!(t<n(r)||n(i)<t)){for(var e=i;r!==i;){var o=Math.ceil((r+i)/2);t<n(o)?i=o-1:r=o}var s=Math.abs(t-n(r));return r<e&&Math.abs(t-n(r+1))<s?r+1:r}},Tn=function(){var t=new Map;return{Kt:function(i){return Object.keys(Ut).forEach((function(n){i.addEventListener(n,(function(i,r){var e=r.collectionMember&&t.get(r.collectionMember);if(e){var o=Wt(i)?{clientX:i.changedTouches[0].clientX,clientY:i.changedTouches[0].clientY}:i,s=e.qt(r.info,o);e.D.P(n,i,s)}}))})),i},$t:function(i,n){t.set(i,n)},ti:function(){t.clear()}}},kn={left:0,right:0,top:0,bottom:0},On=function(){return Math.round(Math.random()*Number.MAX_SAFE_INTEGER)},Fn=function(t,i,n){i&&i.ii();var r=n();return Object.keys(r).forEach((function(i){var n=i,e=r[n];t.addEventListener(n,e)})),{ni:t,ii:function(){Object.entries(r).forEach((function(i){var n=yi(i,2),r