@lightningchart/lcjs
Version:
A high-performance charting library.
2 lines • 1.47 MB
JavaScript
/* LightningChart JS v8.3.1 */
import*as t from"immutable";import{Record as i}from"immutable";import s from"earcut";class e{constructor(){this.u=!0}S(){return this.u}}class h extends e{constructor(t,i){super(),this.M=t,this._=t,this.u=i}C(t){return t!==this.M&&(this._=this.M,this.M=t,this.u=!0),this}T(){return this.M}S(){return super.S()}}const r=(t,i)=>({x:t,y:i}),n=(t,i)=>({x:t,y:i}),o=(t,i,s)=>({position:t,high:i,low:s}),a=(t,i,s)=>({x:t,y:i,z:s}),l=t=>{const i=Array(0),s=Array(0);return t.length>0&&t.forEach((t=>{i.push(r(t.position,t.high)),s.push(r(t.position,t.low))})),[i,s]},u=(t,i)=>({min:t,max:i}),c=(t,i,s,e)=>({x:t,y:i,width:s,height:e}),d=(t,i=!0)=>new h(t,i),f=(t=0,i=0,s=0,e=0)=>({left:t,top:i,right:s,bottom:e}),A=f,g=(t,i)=>({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}),v=i({type:"color",r:1,g:1,b:1,a:1});class y extends v{constructor(t){super(t)}toUint32(){return void 0!==this.F||(this.F=L(this.getR(),this.getG(),this.getB(),this.getA())),this.F}toString(){return`color:${this.r},${this.g},${this.b},${this.a}`}setA(t){return this.set("a",t/255)}setR(t){return this.set("r",t/255)}setG(t){return this.set("g",t/255)}setB(t){return this.set("b",t/255)}getA(){return 255*this.get("a")}getR(){return 255*this.get("r")}getG(){return 255*this.get("g")}getB(){return 255*this.get("b")}getHighlight(){return this.I||(this.I=new y({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.I}getLighter(){return this.L||(this.L=new y({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.L}getDarker(){return this.P||(this.P=new y({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.P}toRGBAString(){return`rgba(${(255*this.r).toFixed(0)},${(255*this.g).toFixed(0)},${(255*this.b).toFixed(0)},${this.a})`}}const p=t=>!(!t||"object"!=typeof t||!("type"in t)||"color"!==t.type),m=(t,i,s,e=255)=>new y({r:t/255,g:i/255,b:s/255,a:e/255}),S=t=>{const i=t.startsWith("#")?t.substring(1):t.startsWith("0x")?t.substr(2):t;switch(i.length){case 8:return new y({r:Number(`0x${i.substring(0,2)}`)/255,g:Number(`0x${i.substring(2,4)}`)/255,b:Number(`0x${i.substring(4,6)}`)/255,a:Number(`0x${i.substring(6,8)}`)/255});case 6:return new y({r:Number(`0x${i.substring(0,2)}`)/255,g:Number(`0x${i.substring(2,4)}`)/255,b:Number(`0x${i.substring(4,6)}`)/255});case 4:return new y({r:Number(`0x${i.charAt(0)}${i.charAt(0)}`)/255,g:Number(`0x${i.charAt(1)}${i.charAt(1)}`)/255,b:Number(`0x${i.charAt(2)}${i.charAt(2)}`)/255,a:Number(`0x${i.charAt(3)}${i.charAt(3)}`)/255});case 3:return new y({r:Number(`0x${i.charAt(0)}${i.charAt(0)}`)/255,g:Number(`0x${i.charAt(1)}${i.charAt(1)}`)/255,b:Number(`0x${i.charAt(2)}${i.charAt(2)}`)/255});default:throw new Error(`ColorHEX parsing error | input: ${t}`)}},b=(t,i=1,s=1)=>{let e,h,r;t/=360;const n=Math.floor(6*t),o=6*t-n,a=s*(1-i),l=s*(1-o*i),u=s*(1-(1-o)*i);switch(n%6){case 0:e=s,h=u,r=a;break;case 1:e=l,h=s,r=a;break;case 2:e=a,h=s,r=u;break;case 3:e=a,h=l,r=s;break;case 4:e=u,h=a,r=s;break;default:e=s,h=a,r=l}return new y({r:e,g:h,b:r})},x=t=>{const i=t.r,s=t.g,e=t.b,h=Math.max(i,s,e),r=Math.min(i,s,e);let n=0;const o=h,a=h-r,l=0===h?0:a/h;if(h===r)n=0;else{switch(h){case i:n=(s-e)/a+(s<e?6:0);break;case s:n=(e-i)/a+2;break;case e:n=(i-s)/a+4}n/=6}return[360*n,l,o]},M=(t,i,s)=>{var e,h,r,n,o,a=0,l=0,u=0;switch(r=s*(1-i),n=s*(1-(h=6*(t/=360)-(e=Math.floor(6*t)))*i),o=s*(1-(1-h)*i),e%6){case 0:a=s,l=o,u=r;break;case 1:a=n,l=s,u=r;break;case 2:a=r,l=s,u=o;break;case 3:a=r,l=n,u=s;break;case 4:a=o,l=r,u=s;break;case 5:a=s,l=r,u=n}return[255*a,255*l,255*u]},w=t=>{try{if(t.startsWith("rgba")){const i=t.substr(5).slice(0,-1),s=JSON.parse(`[${i}]`);return m(s[0],s[1],s[2],255*s[3])}if(t.startsWith("rgb")){const i=t.substr(4).slice(0,-1),s=JSON.parse(`[${i}]`);return m(s[0],s[1],s[2])}if(t.startsWith("hsl")){const i=t.substr(4).slice(0,-1).split(",").map(parseFloat),s=k(i[0],i[1],i[2]);return m(s[0],s[1],s[2])}return t.startsWith("#")||t.startsWith("0x")?S(t):S(T(t))}catch(t){}return console.warn(`ColorCSS parsing error: ${t}`),S("#fff")},_=t=>m(255&t,255&(t>>=8),255&(t>>=8),255&(t>>=8)),k=(t,i,s)=>{i/=100,s/=100;const e=(1-Math.abs(2*s-1))*i,h=t/60,r=e*(1-Math.abs(h%2-1));let n=[];isNaN(t)?n=[0,0,0]:h<=1?n=[e,r,0]:h<=2?n=[r,e,0]:h<=3?n=[0,e,r]:h<=4?n=[0,r,e]:h<=5?n=[r,0,e]:h<=6&&(n=[e,0,r]);const o=s-.5*e;return[Math.round(255*(n[0]+o)),Math.round(255*(n[1]+o)),Math.round(255*(n[2]+o))]},C={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"},T=t=>{const i=C[t.toLowerCase()];if(i)return i;throw new Error(`Unknown color code: ${t}`)},F=new y({}),I=m(0,0,0,0),L=(t,i,s,e=255)=>(e<<24|s<<16|i<<8|t)>>>0,P=t=>L(255*t.r,255*t.g,255*t.b,255*t.a),B=i({type:"font",size:14,family:"Arial",weight:"normal",style:"normal",variant:!1});class D extends B{constructor(t){super(t)}setSize(t){return this.set("size",t)}setFamily(t){return this.set("family",t)}setWeight(t){return this.set("weight",t)}setStyle(t){return this.set("style",t)}setVariant(t){return this.set("variant",t)}getSize(){return this.get("size")}getFamily(){return this.get("family")}getWeight(){return this.get("weight")}getStyle(){return this.get("style")}getVariant(){return this.get("variant")}}const E=t=>!(!t||"object"!=typeof t||!("type"in t)||"font"!==t.type),R=new D;var O,z;!function(t){t.circle="circle",t.ellipse="ellipse"}(O||(O={})),function(t){t.closestSide="closest-side",t.closestCorner="closest-corner",t.farthestSide="farthest-side",t.farthestCorner="farthest-corner"}(z||(z={}));const V=i({type:"fillstyle",fillType:"radial-gradient",ditheringEnabled:!0,stops:[{color:S("#f00"),offset:0},{color:S("#0f0"),offset:1}],position:r(.5,.5),shape:O.ellipse,extent:z.farthestCorner});class N extends V{constructor(t){if(super(t),null===t||t&&null===t.stops||t&&t.stops&&!Array.isArray(t.stops)||t&&t.stops&&Array.isArray(t.stops)&&t.stops.length<2)throw new Error("RadialGradientFill requires minimum two color stops to be defined.")}toString(){return`radialGradientFill:${this.shape},${this.ditheringEnabled},${this.extent},${this.position.x},${this.position.y},${this.stops.map((t=>`${t.offset},${t.color.toString()}`)).join(",")}`}toCSS(){return`radial-gradient(${this.shape} ${this.extent} at ${100*this.position.x}% ${100*this.position.y}%, ${this.stops.map((t=>`${t.color.toString()} ${100*t.offset}%`)).join(", ")})`}setColorStops(t){if(t.length<2)throw new Error("Minimum of two color stops required");return this.set("stops",t)}getColorStops(){return this.get("stops")}setPosition(t){return this.set("position",t)}getPosition(){return this.get("position")}setShape(t){return this.set("shape",t)}getShape(){return this.get("shape")}setExtent(t){return this.set("extent",t)}getExtent(){return this.get("extent")}setDitheringEnabled(t){return this.set("ditheringEnabled",t)}getDitheringEnabled(){return this.get("ditheringEnabled")}}const G=t=>!!(t&&"object"==typeof t&&"type"in t&&"fillstyle"===t.type&&"fillType"in t&&"radial-gradient"===t.fillType),$=i({type:"fillstyle",fillType:"linear-gradient",stops:[{color:S("#f00"),offset:0},{color:S("#0f0"),offset:1}],angle:0});class U extends ${constructor(t){if(super(t),null===t||t&&null===t.stops||t&&t.stops&&!Array.isArray(t.stops)||t&&t.stops&&Array.isArray(t.stops)&&t.stops.length<2)throw new Error("LinearGradientFill requires minimum two color stops to be defined.")}toString(){return`linearGradientFill:${this.angle},${this.stops.map((t=>`${t.offset},${t.color.toString()}`)).join(",")}`}toCSS(){return`linear-gradient(${this.angle}deg, ${this.stops.map((t=>`${t.color.toString()} ${100*t.offset}%`)).join(", ")})`}setColorStops(t){if(t.length<2)throw new Error("Minimum of two color stops required");const i=t.sort(((t,i)=>t.offset-i.offset));return this.set("stops",i)}getColorStops(){return this.get("stops")}setAngle(t,i){return this.set("angle",i?function(t){return 180*t/Math.PI}(t):t)}getAngle(t){return t?he(this.get("angle")):this.get("angle")}}const j=t=>!!(t&&"object"==typeof t&&"type"in t&&"fillstyle"===t.type&&"fillType"in t&&"linear-gradient"===t.fillType);class H{constructor(t,i,s,e){this.D=new Dt,this.cellIndex=t,this.cellSpan=i,this.cellsAmount=s,this.observedAmount=e,this.x=new Y,this.y=new Y,this.z=new Y;const h={...t},r={...i};if(e){const t=t=>{const i=t.value;this.cellsAmount.x=i.reduce(Ls,0),this.cellIndex.x=i.reduce(((t,i,s)=>s>=h.x?t:t+i),0),this.cellSpan.x=i.reduce(((t,i,s)=>s>=h.x&&s<h.x+r.x?t+i:t),0),this.D.R("cellresize",{})};e.x.O("change",t),t({value:e.x.T()});const i=t=>{const i=t.value;this.cellsAmount.y=i.reduce(Ls,0),this.cellIndex.y=i.reduce(((t,i,s)=>s>=h.y?t:t+i),0),this.cellSpan.y=i.reduce(((t,i,s)=>s>=h.y&&s<h.y+r.y?t+i:t),0),this.D.R("cellresize",{})};e.y.O("change",i),i({value:e.y.T()}),this.V=()=>{e.x.N("change",t),e.y.N("change",i)}}}G(){return this.V&&(this.V(),this.V=void 0),this}addEventListener(t,i,s){this.D.addEventListener(t,i,s)}removeEventListener(t,i){this.D.removeEventListener(t,i)}}class Y extends e{constructor(){super(...arguments),this.$=0,this.U=10,this.j=1,this.H=!1}Y(){return!1}W(){return this.u=!1,this}X(){return this.u=!0,this}getInnerStart(){return this.$}getInnerEnd(){return this.U}getInnerInterval(){return Math.abs(this.getInnerEnd()-this.getInnerStart())}Z(t,i){return this.$=t,this.U=i,this.J(),this}K(t){return this.j=t,this.J(),this}q(t){return t/this.j}J(){const t=this.q(this.U-this.$),i=this.j;void 0!==this.tt&&!1!==ui(t,this.tt)||(this.u=!0,this.it=i,this.tt=t);let s=this.$;this.U;let e=0;this.H&&(s=0,this.U,this.$,e=this.$);const h=t,r=s+.5*h*i;this.st={displacement:r,scaling:h,highPrecisionOffset:e}}et(){return this.tt}ht(){return this.U<this.$}rt(){return this.st}nt(t,i){return!0}}class W{constructor(){this.ot=!0}getInnerStart(){return this.$}getInnerEnd(){return this.U}getInnerInterval(){return Math.abs(this.U-this.$)}Z(t,i){return t===this.$&&i===this.U||(this.ot=!0),this.$=t,this.U=i,this}W(){return this.ot=!1,this}X(){return this.ot=!0,this}}class X extends W{constructor(t,i,s,e){if(super(),this.ut=!0,this.ct=!0,this.dt=[0,0],this.ft=!0,this.At=t,this.vt=i,this.yt=s,this.St=t,this.bt=i,e){const t=t=>{this.xt(t.value)};e.O("change",t),this.xt(e.T()),this.Mt=()=>e.N("change",t)}}Y(){return this.ct}K(t){return this.j=t,this.ct=!0,this}wt(t){return this.dt=t.map(Math.abs),this.ft=!0,this}_t(){return this.At/this.yt*this.j+this.dt[0]}kt(){return(this.At+this.vt)/this.yt*this.j-this.dt[1]}Ct(){return this.getCellSize()-this.Tt()}Ft(){return this.j}getCellSize(){return this.It(this.j)}Tt(){return this.dt[0]+this.dt[1]}Lt(){return this.dt}xt(t){this.yt=t.reduce(Ls,0),this.At=t.reduce(((t,i,s)=>s>=this.St?t:t+i),0),this.vt=t.reduce(((t,i,s)=>s>=this.St&&s<this.St+this.bt?t+i:t),0),this.ut=!0,this.Pt()}It(t){return t*this.vt/this.yt}W(){return super.W(),this.ct=!1,this.ft=!1,this.ut=!1,this}X(){return super.X(),this.ct=!0,this.ft=!0,this.ut=!0,this}}class Z extends X{constructor(t,i,s,e){super(t,i,s,e),this.H=!1,this.Bt=!1,this.Dt=0,this.j=1e3,this.Z(0,10),this.J()}Et(){return this.Bt}nt(t,i,s,e,h){if(t===i)return!1;const r=Math.abs(e-s),n=Math.abs(i-t);if(!this.H){const s=Ni(t,i,this.getCellSize());if(void 0===s)return!1;if(n>s)return!0;const e=(i+t)/2,o=(h?s/2:r/2)*(t>i?-1:1);return{start:e-o,end:e+o}}const o=10**-(12-Math.log10(Math.max(Math.abs(t),1)));if(n>o)return!0;const a=(i+t)/2,l=(h?o/2:r/2)*(t>i?-1:1);return{start:a-l,end:a+l}}Pt(){this.J()}Rt(t){return this._t()+(t-this.$)/(this.U-this.$)*(this.kt()-this._t())}Ot(t){return this.$+(t-this._t())/(this.kt()-this._t())*(this.U-this.$)}Z(t,i){return super.Z(t,i),this.J(),this}wt(t){return super.wt(t),this.J(),this}K(t){return super.K(t),this.zt=J(this.U-this.$,this.dt,this.j,this.vt,this.yt),this.J(),this}Vt(){return this.H=!0,this}Nt(){return this.H}Gt(){return Math.abs(this.$t)}Ut(){return this.Gt()/this.zt}jt(){return this.Ht}Yt(){return this.Wt}getPixelSize(){return this.zt}rt(){return this.st}X(){return super.X(),this.Bt=!0,this}W(){return super.W(),this.Bt=!1,this}Xt(t,i=ve.Numeric){return i(t,{start:this.$,end:this.U})}Zt(){const t=Math.abs(this.getInnerEnd()).toString().length,i=Math.abs(this.getInnerStart()).toString().length;return t>i?t:i}Jt(t){return J(t,this.dt,this.j,this.vt,this.yt)}J(){let t=this.$,i=this.U,s=0;this.H&&(t=0,i=this.U-this.$,s=this.$);const e=i-t,h=J(e,this.dt,this.j,this.vt,this.yt);this.Wt=this.$-this.dt[0]*h,this.Ht=this.U+this.dt[1]*h;const r=t-this.dt[0]*h,n=i+this.dt[1]*h-r,o=n-this.$t,a=Math.abs(o/h),l=e-this.Dt,u=Math.abs(l/h);(!this.st||a>=.4||u>=.4)&&(this.Dt=e,this.$t=n,this.zt=h,this.Bt=!0);const c=this.$t*this.yt/(2*this.vt),d=-(r-this.$t*this.At/this.vt)-c,f=2*this._t()/this.j-1,A=2*this.kt()/this.j-1-f;this.st={displacement:d,scaling:c,highPrecisionOffset:s,viewportStart:f,viewportSize:A,scaleStartLog:0,scaleIntervalLog:0}}Qt(t,i){return t+this.zt*i}}const J=(t,i,s,e=1,h=1)=>t/(s*e/h-(i[0]+i[1]));class Q{Kt(t,i){return"x"in t?(this.x=t.x,this.y=t.y):(this.x=t,this.y=i),this}W(){return this.x.W(),this.y.W(),this}X(){return this.x.X(),this.y.X(),this}K(t,i){return"object"==typeof t?(this.x.K(t.x),this.y.K(t.y)):(this.x.K(t),this.y.K(i)),this}Ft(){return r(this.x.Ft(),this.y.Ft())}qt(t){return this.x.wt(t),this}ti(t){return this.y.wt(t),this}Tt(){return r(this.x.Tt(),this.y.Tt())}ii(t,i){return this.x.Z(t,i),this}si(t,i){return this.y.Z(t,i),this}getInnerIntervalPixels(){const t=this.x.getCellSize(),i=this.y.getCellSize();return{x:t-this.x.Tt(),y:i-this.y.Tt()}}ei(){return this.x.Et()||this.y.Et()}}class K extends Q{constructor(){super(...arguments),this.hi="LinearScaleXY"}ri(t,i,s,e){return this.x=new Z(t.x,i.x,s.x,e?e.x:void 0),this.y=new Z(t.y,i.y,s.y,e?e.y:void 0),this}Nt(){return this.x.Nt()||this.y.Nt()}ni(){return r(this.x.getPixelSize(),this.y.getPixelSize())}rt(){return{x:this.x.rt(),y:this.y.rt()}}Qt(t,i){const s=this.ni();return{x:t.x+i.x*s.x,y:t.y+i.y*s.y}}oi(t,i,s,e){const h=this.ni(),r=Xs(t,i);return r.x*=e,r.y*=e,{x:t.x+s*h.x*r.x,y:t.y+s*h.y*r.y}}}class q extends Q{constructor(){super(...arguments),this.hi="MixedScaleXY"}Nt(){return!1}Qt(t,i){const s=this.x.Rt(t.x),e=this.y.Rt(t.y),h={x:s+i.x,y:e+i.y};return{x:this.x.Ot(h.x),y:this.y.Ot(h.y)}}oi(t,i,s,e){const h={x:this.x.Rt(t.x),y:this.y.Rt(t.y)},r={x:this.x.Rt(i.x),y:this.y.Rt(i.y)},n=Ws(Ks(r,h)),o=Xs(r,h),a={x:h.x+n.x*e+o.x*s,y:h.y+n.y*e+o.y*s};return{x:this.x.Ot(a.x),y:this.y.Ot(a.y)}}rt(){const t=this.x.rt(),i=this.y.rt();return{uScaleStart:[this.x.$,this.y.$],uScaleInterval:[this.x.U-this.x.$,this.y.U-this.y.$],uScaleStartLog:[t.scaleStartLog,i.scaleStartLog],uScaleIntervalLog:[t.scaleIntervalLog,i.scaleIntervalLog],uViewportStart:[t.viewportStart,i.viewportStart],uViewportSize:[t.viewportSize,i.viewportSize]}}}const tt={d1:t=>new t.scale1DConstructor(0,1,1,void 0),d2:t=>(new t.scaleXYConstructor).ri({x:0,y:0},{x:1,y:1},{x:1,y:1},void 0),d3:()=>new H({x:0,y:0},{x:1,y:1},{x:1,y:1},void 0)},it=(t,i,s)=>i===s?t:s.Ot(i.Rt(t)),st=(t,i,s)=>{if(i===s)return t;const e=i instanceof Q?i.x:i.x instanceof Q?i.x.x:i.x.ai,h=i instanceof Q?i.y:i.y instanceof Q?i.y.y:i.y.ai,r=s instanceof Q?s.x:s.x instanceof Q?s.x.x:s.x.ai,n=s instanceof Q?s.y:s.y instanceof Q?s.y.y:s.y.ai;return{...t,x:it(t.x,e,r),y:it(t.y,h,n)}},et=(t,i,s)=>{const e=t(i,s);return t=>new Ie({color:e(t)})},ht=(t,i,s)=>{const e=t(i+1,s);return t=>new N({stops:[{offset:0,color:e(t)},{offset:1,color:e(t).getDarker()}]})},rt=(t,i,s,e)=>{const h=t(i+1,e);return t=>new U({stops:[{offset:0,color:h(t).getDarker()},{offset:.5,color:h(t)},{offset:1,color:h(t).getDarker()}],angle:s||90})},nt=(...t)=>{if(0===t.length)return{remove:li};let i=!1;const s=t.map((s=>{const e=e=>{((s,e,h)=>{i||(i=!0,t.filter((t=>t!==s)).forEach((t=>t.li(e,h,!1,s.getStopped(),"synchronizedAxis"))),i=!1)})(s,e.start,e.end)};return s.addEventListener("intervalchange",e),e}));let e=!1;const h=t.map((i=>{const s=s=>{((i,s)=>{e||(e=!0,t.filter((t=>t!==i)).forEach((t=>t.setStopped(s))),e=!1)})(i,s.isStopped)};return i.addEventListener("stoppedchange",s),s}));return{remove:()=>{t.forEach(((t,i)=>{t.removeEventListener("intervalchange",s[i]),t.removeEventListener("stoppedchange",h[i])}))}}},ot=(t,i,s,e)=>{if(!s||0===s.length)throw new Error("Invalid use regularColorSteps 'colorPalette' is undefined or empty");const h=null==e?void 0:e.formatLabels,r=null==e?void 0:e.alpha;return s.map(((e,n)=>{const o=t+n/(s.length-1)*(i-t);return{color:void 0!==r?e.setA(r):e,value:o,label:h?h(o):void 0}}))},at=(t,i)=>{const s=null!=i?i:t=>t;return{levels:t.steps.map((t=>s({value:t.value},t)))}},lt=t=>t&&"object"==typeof t&&"column"in t&&"row"in t,ut=t=>t&&"object"==typeof t&&"z"in t&&"column"in t&&"row"in t,ct=t=>t&&"object"==typeof t&&"position"in t&&"open"in t&&"high"in t&&"isPacked"in t,dt=t=>t&&"object"==typeof t&&"annulus"in t&&"sector"in t,ft=t=>t&&"object"==typeof t&&"index"in t,At=t=>t&&"object"==typeof t&&"xSize"in t&&"ySize"in t&&"zSize"in t,gt=t=>t&&"object"==typeof t&&"figure"in t&&"positionAndSize"in t,vt=t=>t&&"object"==typeof t&&"figure"in t&&"start"in t&&"end"in t&&"median"in t&&"upperQuartile"in t,yt=t=>t&&"object"==typeof t&&"figure"in t&&"x"in t&&"radiusX"in t&&"radiusY"in t,pt=t=>t&&"object"==typeof t&&"figure"in t&&"x"in t&&"coordinates"in t,mt=t=>t&&"object"==typeof t&&"figure"in t&&"startX"in t&&"endX"in t,St=t=>t&&"object"==typeof t&&"x"in t&&"y"in t,bt=t=>!0===t.isLcjsArtificialEvent,xt=(t,i,s,e)=>s<0?t:s>1?i:m(t.getR()+s*(i.getR()-t.getR()),t.getG()+s*(i.getG()-t.getG()),t.getB()+s*(i.getB()-t.getB()),void 0===e?t.getA()+s*(i.getA()-t.getA()):e);var Mt;!function(t){t[t.Nearest=0]="Nearest",t[t.NearestX=1]="NearestX",t[t.NearestY=2]="NearestY"}(Mt||(Mt={}));const wt=(t,i,s,e,h,r,n,o,a,l)=>{const u=t.length;if(0===u)return;const c=e?1:0,d=u-(h?2:1);if(s===Mt.Nearest)return _t(t,i,r,n,c,d);if(s===Mt.NearestX||s===Mt.NearestY){if("boolean"==typeof l&&("x"===a&&s===Mt.NearestX||"y"===a&&s===Mt.NearestY))return Tt(t,st(i,n,r),a,l,c,d);if(s===Mt.NearestX)return kt(t,st(i,n,r),o,c,d);if(s===Mt.NearestY)return Ct(t,st(i,n,r),o,c,d)}},_t=(t,i,s,e,h,r)=>{let n,o=Number.MAX_VALUE;for(let a=h;a<=r;a+=1){const h=t[a];if(!Number.isNaN(h.x)&&!Number.isNaN(h.y)){const t=st(h,s,e),r=(t.x-i.x)**2+(t.y-i.y)**2;r<o&&(o=r,n=a)}}return n},kt=(t,i,s,e,h)=>{if(i.x<s.min.x||i.x>s.max.x)return;let r,n=Number.MAX_VALUE;for(let s=e;s<=h;s+=1){const e=t[s],h=e.x>i.x?e.x-i.x:i.x-e.x;h<n&&!Number.isNaN(e.x)&&!Number.isNaN(e.y)&&(n=h,r=s)}return r},Ct=(t,i,s,e,h)=>{if(i.y<s.min.y||i.y>s.max.y)return;let r,n=Number.MAX_VALUE;for(let s=e;s<=h;s+=1){const e=t[s],h=e.y>i.y?e.y-i.y:i.y-e.y;h<n&&!Number.isNaN(e.x)&&!Number.isNaN(e.y)&&(n=h,r=s)}return r},Tt=(t,i,s,e,h,r)=>{const n="x"===s,o=n?i.x:i.y,a=t[h],l=t[r],u=a.x<l.x?a.x:l.x,c=a.y<l.y?a.y:l.y,d=a.x>l.x?a.x:l.x,f=a.y>l.y?a.y:l.y;if(n&&(o<u||o>d)||!n&&(o<c||o>f))return;let A=h,g=Math.floor((h+r)/2),v=r,y=-1;for(;;){const i=o-(n?t[g].x:t[g].y);if(i*(e?-1:1)>0)A=Math.min(g+1,v),y=Math.floor((A+v)/2);else{if(0===Math.abs(i))return g;v=Math.max(g-1,A),y=Math.floor((A+v)/2)}if(y===g){const s=g>h?Math.abs(o-(n?t[g-1].x:t[g-1].y)):xs,e=g<r?Math.abs(o-(n?t[g+1].x:t[g+1].y)):xs,a=Math.abs(i);switch(Math.min(a,s,e)){case s:return g-1;case e:return g+1;default:return g}}else g=y}},Ft=(t,i,s,e,h,r)=>{const n="x"===s,o=n?i.x:i.y,a=t[h],l=t[r],u=a.x<l.x?a.x:l.x,c=a.y<l.y?a.y:l.y,d=a.x>l.x?a.x:l.x,f=a.y>l.y?a.y:l.y;if(n&&(o<u||o>d)||!n&&(o<c||o>f))return;let A=h,g=Math.floor((h+r)/2),v=r,y=-1;for(;;){const s=o-(n?t[g].x:t[g].y);if(s*(e?-1:1)>0)A=Math.min(g+1,v),y=Math.floor((A+v)/2);else{if(0===Math.abs(s))return{a:g,b:g,lerpAmount:0};v=Math.max(g-1,A),y=Math.floor((A+v)/2)}if(y===g){if(s*(e?-1:1)<0&&g>h){const s=t[g-1],e=t[g];return{a:g-1,b:g,lerpAmount:n?(i.x-s.x)/(e.x-s.x):(i.y-s.y)/(e.y-s.y)}}if(g<r){const s=t[g],e=t[g+1];return{a:g,b:g+1,lerpAmount:n?(i.x-s.x)/(e.x-s.x):(i.y-s.y)/(e.y-s.y)}}return{a:g,b:g,lerpAmount:0}}g=y}};let It=0;class Lt{constructor(t,i,s){this.ui=d(!0),this.ci=!1,this.di=!0,this.fi=!1,this.Ai=void 0,this.gi=0,this.D=new Dt,this.yi=t,this.pi=i,this.mi=s,this.Si=It,It+=1,this.bi=t.xi.highlightColorOffset}Mi(){let t;return this.wi("DataPattern",(i=>(t=i.pattern,!0))),"ProgressiveX"===t||"RegressiveX"===t?Mt.NearestX:"ProgressiveY"===t||"RegressiveY"===t?Mt.NearestY:Mt.Nearest}_i(){}addEventListener(t,i,s){this.D.addEventListener(t,i,s)}R(t,i,s,e){this.D.R(t,i,{collectionMember:s,info:e})}removeEventListener(t,i){this.D.removeEventListener(t,i)}ki(t){return void 0!==this.mi.find((i=>i.type===t))}wi(t,i){var s;return!!this.ki(t)&&!0===i(null===(s=this.mi.find((i=>i.type===t)))||void 0===s?void 0:s.args)}dispose(){return this.ci||(this.yi.Ci(this),this.ci=!0,this.pi(this),this.D.R("dispose",{})),this}isDisposed(){return this.ci}setVisible(t){const i=this.di;return this.di=t,!t&&i&&this.ui.T()&&this.yi.Ci(this),this}getVisible(){return this.di}setPointerEvents(t){const i=this.ui.T();return this.ui.C(t),t||i&&this.yi.Ci(this),this}getPointerEvents(){return this.ui.T()}Ti(t){return this.Ai=t,this}Fi(){return this.Ai?this.Ai:Pt}Ii(t){return this.gi=t,this}Li(){return this.gi}Pi(t){return this.bi=t,this}Bi(){return this.bi}}const Pt=u(r(0,0),r(0,0)),Bt={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};class Dt{constructor(){this.Di=new Array,this.Ei=[],this.ui=!0,this.Ri=!1,this.Oi=new Map}setPointerEvents(t){this.ui=t,this.Ei.forEach((i=>i.setPointerEvents(t)))}getPointerEvents(){return this.ui}addEventListener(t,i,s){this.Di.push({listener:i,key:t,options:s||{}})}removeEventListener(t,i){const s=this.Di.findIndex((t=>t.listener===i));s>=0&&this.Di.splice(s,1)}set draggable(t){this.Ri=t,this.Ei.forEach((i=>{i.fi=t}))}get draggable(){return this.Ri}R(t,i,s=void 0){const e=this.Di.slice();for(let h=e.length-1;h>=0;h-=1){const r=e[h];r.key===t&&(r.listener(i,s),!0===r.options.once&&this.removeEventListener(t,r.listener))}}zi(t,i){const s=[];Object.keys(Bt).forEach((e=>{const h=(t,s)=>{const h=Et(t)?{clientX:t.changedTouches[0].clientX,clientY:t.changedTouches[0].clientY}:t,r=(null==i?void 0:i.getExtraData)&&void 0!==h.clientX?i.getExtraData(h,s.collectionMember,s.info):{};this.R(e,t,r),!t.defaultPrevented&&(null==i?void 0:i.continueIfNotPrevented)&&i.continueIfNotPrevented(e,t,r)};t.addEventListener(e,h),s.push((()=>t.removeEventListener(e,h)))})),this.Ei.push(t);const e=()=>{const i=this.Ei.indexOf(t);i>=0&&this.Ei.splice(i,1),s.forEach((t=>t()))};t.addEventListener("dispose",e),s.push((()=>t.removeEventListener("dispose",e))),this.Oi.set(t,(()=>{s.forEach((t=>t()))})),t.fi=this.Ri,t.setPointerEvents(this.ui)}Vi(){this.Oi.forEach((t=>t())),this.Oi.clear(),this.Ei.length=0}Ni(t,i){const s=[];Object.keys(Bt).forEach((e=>{const h=(t,s)=>{const h=i(s.collectionMember);h&&this.R(e,t,h)};t.addEventListener(e,h),s.push((()=>t.removeEventListener(e,h)))})),this.Ei.push(t);const e=()=>{const i=this.Ei.indexOf(t);i>=0&&this.Ei.splice(i,1),s.forEach((t=>t()))};t.addEventListener("dispose",e),s.push((()=>t.removeEventListener("dispose",e))),this.Oi.set(t,(()=>{s.forEach((t=>t()))})),t.setPointerEvents(this.ui),t.fi=this.Ri}Gi(t){Object.keys(Bt).forEach((i=>{t.addEventListener(i,((t,s)=>{this.R(i,t,s)}))})),t.setPointerEvents(this.ui),t.draggable=this.Ri}}const Et=t=>!(!t||"object"!=typeof t||!("touches"in t)),Rt={linear:(t,i,s)=>{const e=i-t;return h=>h<s?t+e/s*h:i},easeIn:(t,i,s)=>e=>e<s?t+Math.abs(2*(Math.sqrt(.5)*e/s)**2)*(i-t):i,easeOut:(t,i,s)=>e=>e<s?t+Math.abs(1-2*(Math.sqrt(.5)*(1-e/s))**2)*(i-t):i,ease:(t,i,s)=>e=>e<s?t+(e<s/2?.5*(e/s*2)**2.5:.5+.5*(1-(1-2*(e/s-.5))**2.5))*(i-t):i,logarithmic:t=>{const i=$i(t);return(s,e,h)=>{const r=i(s),n=i(e);return i=>i<h?t**(r+Math.abs(1-2*(Math.sqrt(.5)*(1-i/h))**2)*(n-r)):e}}};class Ot{constructor(t,i,s,e=Rt.linear,h){this.delta=0,this.nextAnimations=new Array,this.$i=!1,this.easing=Rt.linear,this.isOver=()=>(this.delta===this.duration||this.$i)&&0===this.nextAnimations.length,this.D=new Dt,this.values=t,this.action=i,this.duration=s,this.easing=e,this.Ui=h,this.eases=t.map((([t,i])=>e(t,i,s)))}ji(){this.D.R("start",{})}start(){return this.Ui.includes(this)||this.Ui.push(this),this}addNextAnimations(t){return t instanceof Array?t.forEach((t=>this.nextAnimations.push(t))):this.nextAnimations.push(t),this}NextAnimation(t,i,s=this.duration,e=this.easing){const h=new Ot(t,i,s,e,this.Ui);return this.nextAnimations.push(h),h}finish(t=!0){if(this.$i=!0,this.Ui.splice(this.Ui.indexOf(this),1),this.nextAnimations.length>0){const i=this.nextAnimations[0];return t&&this.D.Di.forEach((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.R("end",{nextAnimation:i}),this.D.R("everyAnimationEnd",{nextAnimation:i})),i}t&&(this.D.R("end",{nextAnimation:void 0}),this.D.R("everyAnimationEnd",{nextAnimation:void 0}),this.D.R("allAnimationEnd",{}))}finishAll(t=!0){let i=this;for(;i;)i=i.finish(t)}getFinalValues(){return this.nextAnimations.length>0?this.nextAnimations[this.nextAnimations.length-1].values.map(oi):this.values.map(oi)}getTimeUntilFinish(){let t=this.duration-this.delta;for(let i=0;i<this.nextAnimations.length;i+=1)t+=this.nextAnimations[i].duration-this.nextAnimations[i].delta;return t}addEventListener(t,i,s){this.D.addEventListener(t,i,s)}removeEventListener(t,i){this.D.removeEventListener(t,i)}}const zt=(t,i=60)=>{i>60&&console.log("Note: Animator FPS is usually capped at 60 by the browser!");const s=[];let e,h,r=0;const n=()=>{e=void 0;const o=Date.now();h=h||o,r=o-h,r/1e3>=1/i&&(h=Date.now()-r%(1e3/i),s.forEach((t=>{0===t.delta&&t.ji(),t.delta+=r-r%(1e3/i),t.delta>t.duration&&(t.delta=t.duration),t.action(t.eases.map((i=>i(t.delta)))),t.delta===t.duration&&t.finish()})),t()),s.length>0?e=hi.requestAnimationFrame(n):(e=void 0,h=void 0)};return(t=1e3,i=Rt.linear)=>(h,r,o=t)=>{const a=new Ot(h,r,o,i,s).start();return e||(e=hi.requestAnimationFrame(n)),a}};var Vt;!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"}(Vt||(Vt={}));const Nt=i({type:"fillstyle",fillType:"image",source:void 0,surroundingColor:m(0,0,0,0),sourceMissingColor:m(0,0,0,0),fitMode:Vt.Fill});class Gt extends Nt{constructor(t){super(t)}setSource(t){return this.set("source",t)}getSource(){return this.get("source")}setSurroundingColor(t){return p(t)?this.set("surroundingColor",t):this.set("surroundingColor",t(this.get("surroundingColor")))}getSurroundingColor(){return this.get("surroundingColor")}setSourceMissingColor(t){return p(t)?this.set("sourceMissingColor",t):this.set("sourceMissingColor",t(this.get("sourceMissingColor")))}getSourceMissingColor(){return this.get("sourceMissingColor")}setFitMode(t){return this.set("fitMode",t)}getFitMode(){return this.get("fitMode")}toString(){return`imagefill:${this.fitMode}`}toCSS(){return`url(${this.getSource().src})`}}const $t=t=>!!(t&&"object"==typeof t&&"type"in t&&"fillstyle"===t.type&&"fillType"in t&&"image"===t.fillType),Ut=i({type:"linestyle",lineType:"empty"}),jt=new class extends Ut{constructor(){super(...arguments),this.thickness=0}setThickness(t){return this}getThickness(){return 0}Hi(){return 0}setFillStyle(t){return this}getFillStyle(){return ke}},Ht=t=>!(!t||"object"!=typeof t||!("lineType"in t)||"empty"!==t.lineType),Yt=-34028234663852886e22,Wt="-340282346638528859811704183484516925440.0";var Xt,Zt,Jt,Qt;!function(t){t[t.Content=0]="Content",t[t.PaddedContent=1]="PaddedContent",t[t.PaddedBackground=2]="PaddedBackground",t[t.Everything=3]="Everything"}(Xt||(Xt={})),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"}(Zt||(Zt={})),function(t){t[t.notDraggable=0]="notDraggable",t[t.draggable=1]="draggable",t[t.onlyHorizontal=2]="onlyHorizontal",t[t.onlyVertical=3]="onlyVertical"}(Jt||(Jt={})),function(t){t[t.Up=0]="Up",t[t.Right=1]="Right",t[t.Down=2]="Down",t[t.Left=3]="Left"}(Qt||(Qt={}));const Kt=t=>"getHighlight"in t&&"setHighlight"in t,qt=(t,i,s)=>void 0===t||"number"==typeof t||"string"==typeof t?t:Array.isArray(t)?t.slice(i,s):t.subarray(i,s),ti=(...t)=>{const i=t=>t&&"object"==typeof t&&!Array.isArray(t);return t.reduce(((t,s)=>s?(Object.keys(s).forEach((e=>{const h=t[e],r=s[e];i(h)&&i(r)?t[e]=ti(h,r):t[e]=r})),t):t),{})},ii=t=>{if(t.resourcesBaseUrl){const i=t.styleFactory(t.resourcesBaseUrl),s=$t(i)&&i.getSource(),e=s&&s instanceof Image?s:void 0;return null==e||e.addEventListener("error",(()=>{ls(t.resourcesBaseUrl,e.src,"Theme resource",{shouldCrash:!1})})),i}const i=`${hi.location.origin}/resources`,s=t.styleFactory(i);if($t(s)){const i=s.getSource();i instanceof Image&&i.addEventListener("error",(()=>{const s=t.styleFactory("https://lcjs-resources.lightningchart.com/v1"),e=$t(s)&&s.getSource(),h=e&&e instanceof Image?e:void 0;hi.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==h||h.addEventListener("load",(()=>{t.apply(s)})),null==h||h.addEventListener("error",(()=>{ls(t.resourcesBaseUrl,i.src,"Theme resource",{shouldCrash:!1})}))}))}return s};let si=0;const ei=()=>{const t=Date.now().toString(36),i=(1048575&si++).toString(36);return`${t}-${Math.floor(4294967295*Math.random()).toString(36)}-${i}`};let hi="undefined"!=typeof window?window:"undefined"!=typeof global&&global._lcjs?global._lcjs:{};const ri=(t,i)=>t.x===i.x&&t.y===i.y,ni=t=>t!==xs&&t!==Ms&&!Number.isNaN(t)&&Number.isFinite(t)&&t!==1/0&&t!==-1/0,oi=t=>t[1],ai=t=>t.dispose(),li=()=>{},ui=(t,i)=>t===i,ci=(t,i,s)=>s>i?Math.min(Math.max(t,i),s):Math.min(Math.max(t,s),i),di=t=>Array.prototype.concat.apply([],t),fi=(t,i)=>void 0===t||Number.isNaN(t)?i:t,Ai=t=>t.Yi(),gi=t=>t.Wi(),vi=t=>t.Xi(),yi=t=>t.Zi(),pi=t=>t.min.x,mi=t=>t.max.x,Si=t=>t.min.y,bi=t=>t.max.y,xi=(t,i,s,e,h)=>{if(t.length>0){let r=h?e(h):void 0;for(let e=0;e<t.length;e+=1){const h=i(t[e]);void 0!==h&&(r=void 0!==r?s(r,h):h)}return r}if(h)return e(h)},Mi=r(0,1),wi=r(1,0),_i=r(0,-1),ki=r(-1,0),Ci=r(0,0),Ti=t=>{switch(t){case Qt.Up:return Mi;case Qt.Right:return wi;case Qt.Down:return _i;case Qt.Left:return ki;default:return Ci}},Fi=t=>t===Qt.Left||t===Qt.Right,Ii=t=>{t.stopPropagation(),t.preventDefault()},Li=(t,i)=>{if(!i)return t;const s=t.length,e=new Float32Array(2*s);let h=0;for(let i=0;i<s;i+=1){const s=t[i],r=Math.fround(s);e[h+0]=r,e[h+1]=s-r,h+=2}return e},Pi=(t,i,s=Float32Array)=>{if(!i){const i=t.length,e=new s(2*i);let h=0;for(let s=0;s<i;s+=1){const i=t[s];e[h+0]=i.x,e[h+1]=i.y,h+=2}return e}const e=t.length,h=new s(4*e);let r=0;for(let i=0;i<e;i+=1){const s=t[i],e=Math.fround(s.x),n=Math.fround(s.y);h[r+0]=e,h[r+1]=n,h[r+2]=s.x-e,h[r+3]=s.y-n,r+=4}return h},Bi=(t,i)=>{if(!i){const i=t.length,s=new Float32Array(3*i);let e=0;for(let h=0;h<i;h+=1){const i=t[h];s[e+0]=i.x,s[e+1]=i.y,s[e+2]=i.z,e+=3}return s}const s=t.length,e=new Float32Array(6*s);let h=0;for(let i=0;i<s;i+=1){const s=t[i],r=Math.fround(s.x),n=Math.fround(s.y),o=Math.fround(s.z);e[h+0]=r,e[h+1]=n,e[h+2]=o,e[h+3]=s.x-r,e[h+4]=s.y-n,e[h+5]=s.z-o,h+=6}return e},Di=(t,i,s,e,h)=>t||i||s||e?!t||i||s||e||h?t||!i||s||e||h?t||i||!s||e||h?t||i||s||!e||h?(r,n,o)=>{const a=3+(h?3:0)+(t?4:0)+(i?1:0)+(s?1:0)+(e?3:0),l=r.length,u=new Float32Array(l*a);let c=0,d=c;if(h){for(let t=0;t<l;t+=1){const i=r[t],s=Math.fround(i.x),e=Math.fround(i.y),h=Math.fround(i.z);u[d+0]=s,u[d+1]=e,u[d+2]=h,u[d+3]=i.x-s,u[d+4]=i.y-e,u[d+5]=i.z-h,d+=a}c+=6}else{for(let t=0;t<l;t+=1){const i=r[t];u[d+0]=i.x,u[d+1]=i.y,u[d+2]=i.z,d+=a}c+=3}if(t){const t=o&&Be(o)&&o.getFallbackColor()||F;d=c;for(let i=0;i<l;i+=1){const s=r[i].color||t;u[d+0]=s.r,u[d+1]=s.g,u[d+2]=s.b,u[d+3]=s.a,d+=a}c+=4}if(i){const t=n&&n.getSize();let i=1;"number"==typeof t&&(i=t),d=c;for(let t=0;t<l;t+=1){const s=r[t],e=void 0!==s.size?s.size:i;u[d+0]=e,d+=a}c+=1}if(s){d=c;for(let t=0;t<l;t+=1){const i=r[t];u[d+0]=void 0!==i.value?i.value:Yt,d+=a}c+=1}if(e){const t=n&&n.getSize();let i={x:1,y:1,z:1};"object"==typeof t&&(i=t),d=c;for(let t=0;t<l;t+=1){const s=r[t],e=void 0!==s.sizeAxisX?s.sizeAxisX:i.x,h=void 0!==s.sizeAxisY?s.sizeAxisY:i.y,n=void 0!==s.sizeAxisZ?s.sizeAxisZ:i.z;u[d+0]=e,u[d+1]=h,u[d+2]=n,d+=a}c+=3}return u}:(t,i,s)=>Ei(t,i):(t,i,s)=>zi(t):(t,i,s)=>Oi(t,i):(t,i,s)=>Ri(t,s):(t,i,s)=>Bi(t,h),Ei=(t,i)=>{const s=i&&i.getSize();let e={x:1,y:1,z:1};"object"==typeof s&&(e=s);const h=t.length,r=new Float32Array(6*h);let n=0;for(let i=0;i<h;i+=1){const s=t[i];r[n+0]=s.x,r[n+1]=s.y,r[n+2]=s.z;const h=void 0!==s.sizeAxisX?s.sizeAxisX:e.x,o=void 0!==s.sizeAxisY?s.sizeAxisY:e.y,a=void 0!==s.sizeAxisZ?s.sizeAxisZ:e.z;r[n+3]=h,r[n+4]=o,r[n+5]=a,n+=6}return r},Ri=(t,i)=>{const s=i&&Be(i)&&i.getFallbackColor()||F,e=t.length,h=new Float32Array(7*e);for(let i=0,r=0;i<e;i+=1){const e=t[i];h[r+0]=e.x,h[r+1]=e.y,h[r+2]=e.z;const n=e.color||s;h[r+3]=n.r,h[r+4]=n.g,h[r+5]=n.b,h[r+6]=n.a,r+=7}return h},Oi=(t,i)=>{const s=i&&i.getSize();let e=1;"number"==typeof s&&(e=s);const h=t.length,r=new Float32Array(4*h);for(let i=0,s=0;i<h;i+=1){const h=t[i];r[s+0]=h.x,r[s+1]=h.y,r[s+2]=h.z;const n=void 0!==h.size?h.size:e;r[s+3]=n,s+=4}return r},zi=t=>{const i=t.length,s=new Float32Array(4*i);for(let e=0,h=0;e<i;e+=1){const i=t[e];s[h+0]=i.x,s[h+1]=i.y,s[h+2]=i.z,s[h+3]=void 0!==i.value?i.value:Yt,h+=4}return s},Vi=t=>i=>{const s=t.indexOf(i);s>=0&&t.splice(s,1)},Ni=(t,i,s)=>{const e=((t,i)=>{if(i<xs&&i>Ms&&t<xs&&t>Ms){const s=Math.abs(t/2**23),e=Math.abs(i/2**23),h=Math.min(s,e);return 10**Math.floor(Math.log10(h))}})(t,i);if(void 0!==e)return e*s},Gi=t=>{let i=t.length;for(let s=0;s<i-1;s+=1)t[s].x===t[s+1].x&&t[s].y===t[s+1].y&&(t.splice(s,1),s-=1,i-=1);return t},$i=t=>{const i=Math.log(t);return t=>Math.log(t)/i},Ui=$i(Math.E),ji=(t,i)=>{const s=i[t];return s?s():void 0},Hi=(t,i)=>{let s;if(i)s=i;else{const i={x:0,y:0};for(let s=0;s<t.length;s+=1)i.x+=t[s].x/t.length,i.y+=t[s].y/t.length;s=i}return t.sort(((t,i)=>re(Ks(t,s))-re(Ks(i,s))))},Yi=(t,i,s)=>{if(0===t.length)return!1===s.canReturnB?i.slice():i;const e=i.length;if(e<1e5)return t.push.apply(t,i),t;for(let s=0;s<e;s+=1)t.push(i[s]);return t},Wi=t=>255===t.getA()?t:t.setA(255),Xi=(()=>{const t=m(0,0,0);return i=>(i=Wi(i),new U({angle:180,stops:[{offset:0,color:i},{offset:1,color:xt(i,t,.5)}]}))})(),Zi=(()=>{const t=(t,i)=>{var s;if(t){if(Le(t)){if(0===t.getColor().getA())return;return t.getColor()}if(G(t)||j(t)){const i=t.getColorStops();return 2===i.length?i[1].color:null===(s=i[0])||void 0===s?void 0:s.color}return Re(t)&&void 0!==i?t.lut.getColors(i,void 0):void 0}};return(i,s,e)=>{var h;const r=[];if(e.fill&&r.push(e.fill),e.fill2&&r.push(e.fill2),e.stroke){const t=e.stroke.getFillStyle();t!==ke&&("stroke"===(null===(h=e.behavior)||void 0===h?void 0:h.priority)?r.unshift(t):r.push(t))}if(e.point3D){const t=e.point3D;r.push(t.getFillStyle())}let n;if(e.behavior&&!0===e.behavior.colorStep){const[s,h]=r.reduce(((i,s)=>{if(i[0]&&i[1])return i;const h=t(s,e.lutValue);return h&&(void 0===i[0]?i[0]=h:i[1]=h),i}),[void 0,void 0]);n=s&&h?(o=s)===(a=h)||o.getR()===a.getR()&&o.getG()===a.getG()&&o.getB()===a.getB()?Xi(o):(o=Wi(o),a=Wi(a),new U({angle:0,stops:[{offset:0,color:a},{offset:.5,color:a},{offset:.5,color:o},{offset:1,color:o}]})):i.uiButtonFillStyle}else{const h=r.reduce(((i,s)=>i||t(s,e.lutValue)),void 0);n=h?s?new Ie({color:h}):Xi(h):i.uiButtonFillStyle}var o,a;return n}})(),Ji=(t,i)=>{const s=t;if(Re(s))return{lut:s.getPalette(),lookUpProperty:s.getLookUpProperty(),valueRange:i}},Qi=t=>{let i=0;return()=>(i+=1,`${t}-${i}`)},Ki=(t,i)=>{let s="string"==typeof t?t:String(t);const e=s.indexOf(".");let h=e>=0?e:s.length;for(;h<i;h+=1)s=`0${s}`;return s},qi=(t,i)=>"function"==typeof t?t(i):t,ts=(t,i)=>i(),is=()=>new Error("LightningChart JS encountered an unexpected error.\nPlease report this issue to https://lightningchart.com/js-charts/docs/contact"),ss=t=>t===ws||t.min.x===ws.min.x&&t.max.x===ws.max.x&&t.min.y===ws.min.y&&t.max.y===ws.max.y,es=t=>Array.from(new Set(t)),hs=t=>t.filter((t=>void 0!==t)),rs=t=>"boolean"==typeof t?t?1:0:t>1?1:t<0?0:t,ns=(t,i)=>{throw new Error(i)},os=t=>{let i;return()=>i||(i=t(),i)},as=t=>{if(t===jt)return 0;const i=t.getThickness();return i<0?1:1*i},ls=(t,i,s,e)=>{const h=`LightningChart JS Resources not found.\nresourcesBaseUrl: "${t}"\ninitiator: ${s}\nresource url: ${i}\nFor more information, please see https://lightningchart.com/js-charts/docs/troubleshooting/error-resources-not-found/`;if(e.shouldCrash)throw hi.alert(h),new Error(h);hi.console.warn(h)},us=(t,i,s,e=0)=>{if(t<s(e)||s(i)<t)return;const h=i;for(;e!==i;){const h=Math.ceil((e+i)/2);t<s(h)?i=h-1:e=h}const r=Math.abs(t-s(e));return e<h&&Math.abs(t-s(e+1))<r?e+1:e},cs=()=>{const t=new Map;return{Ji:i=>(Object.keys(Bt).forEach((s=>{i.addEventListener(s,((i,e)=>{const h=e.collectionMember&&t.get(e.collectionMember);if(!h)return;const r=Et(i)?{clientX:i.changedTouches[0].clientX,clientY:i.changedTouches[0].clientY}:i,n=h.Qi(e.info,r,e.collectionMember);h.D.R(s,i,n)}))})),i),Ki:(i,s)=>{t.set(i,s)},Vi:()=>{t.clear()}}},ds={left:0,right:0,top:0,bottom:0},fs=()=>Math.round(Math.random()*Number.MAX_SAFE_INTEGER),As=(t,i,s)=>{i&&i.qi();const e=s();return Object.keys(e).forEach((i=>{const s=i,h=e[s];t.addEventListener(s,h)})),{ts:t,qi:()=>{Object.entries(e).forEach((([i,s])=>{const e=i,h=s;t.removeEventListener(e,h)}))}}},gs=(t,i,s)=>{let e;const h=()=>(e=s(),e),r={...t,resolve:()=>e||h()};for(const t of Object.keys(i))Object.defineProperty(r,t,{get:function(){return e?e[t]:h()[t]}});return r},vs=t=>{if(t)return"resolve"in t?t.resolve():t},ys=t=>{let i=t;return{es:t=>{const s=i;return i=s+t,[s,t]}}},ps=t=>{const i=Date.now();hi.document.body.addEventListener(t,(t=>{Date.now()-i>500||(t.stopPropagation(),t.preventDefault())}),{once:!0,capture:!0})},ms=()=>{const t=hi.performance.now();hi.document.body.addEventListener("contextmenu",(i=>{hi.performance.now()-t>5e3||i.preventDefault()}),{once:!0})},Ss=()=>{const t=hi.performance.now();hi.document.body.addEventListener("touchstart",(i=>{hi.performance.now()-t>5e3||i.preventDefault()}),{once:!0})},bs={add:(t,i)=>a(t.x+i,t.y+i,t.z+i),addVec(t,...i){const s={x:t.x,y:t.y,z:t.z};for(const t of i)s.x+=t.x,s.y+=t.y,s.z+=t.z;return s},subtract:(t,i)=>a(t.x-i,t.y-i,t.z-i),subtractVec(t,...i){const s={x:t.x,y:t.y,z:t.z};for(const t of i)s.x-=t.x,s.y-=t.y,s.z-=t.z;return s},multiply:(t,i)=>a(t.x*i,t.y*i,t.z*i),divide:(t,i)=>a(t.x/i,t.y/i,t.z/i),multiplyVec(t,...i){const s={x:t.x,y:t.y,z:t.z};for(const t of i)s.x*=t.x,s.y*=t.y,s.z*=t.z;return s},divideVec(t,...i){const s={x:t.x,y:t.y,z:t.z};for(const t of i)s.x/=t.x,s.y/=t.y,s.z/=t.z;return s},length:t=>Math.sqrt(t.x*t.x+t.y*t.y+t.z*t.z),normalize:t=>bs.divide(t,bs.length(t)),dot:(t,i)=>t.x*i.x+t.y*i.y+t.z*i.z,cross:(t,i)=>a(t.y*i.z-t.z*i.y,t.z*i.x-t.x*i.z,t.x*i.y-t.y*i.x),angle:(t,i)=>Math.acos(bs.dot(t,i)/(bs.length(t)*bs.length(i))),rotateAroundAxis(t,i,s){const e=Math.cos(s),h=Math.sin(s),r=bs.dot(i,t),n=bs.cross(i,t);return bs.addVec(bs.multiply(t,e),bs.addVec(bs.multiply(i,(1-e)*r),bs.multiply(n,h)))},lerp:(t,i,s)=>(s=ci(s,0,1),bs.addVec(bs.multiply(t,1-s),bs.multiply(i,s))),equals:(t,i)=>ui(t.x,i.x)&&ui(t.y,i.y)&&ui(t.z,i.z),abs:t=>({x:Math.abs(t.x),y:Math.abs(t.y),z:Math.abs(t.z)}),sign:t=>({x:Math.sign(t.x),y:Math.sign(t.y),z:Math.sign(t.z)})},xs=Number.MAX_VALUE,Ms=-Number.MAX_VALUE,ws=u(r(xs,xs),r(Ms,Ms)),_s=u(a(xs,xs,xs),a(Ms,Ms,Ms)),ks=(t,i)=>{const s=Math.log(t)/Math.log(i);return Math.floor((t=>(Math.ceil(t)-t<1e-4?t=Math.ceil(t):t-Math.floor(t)<1e-4&&(t=Math.floor(t)),t))(s))},Cs=(t,i)=>!(i.min.x>t.max.x||i.max.x<t.min.x||i.min.y>t.max.y||i.max.y<t.min.y),Ts=(t,i)=>!(t[1].x<i[0].x||t[0].x>i[1].x||t[3].y<i[0].y||t[0].y>i[3].y),Fs=(t,i)=>({min:{x:Math.min(t[0].x,i[0].x),y:Math.min(t[0].y,i[0].y)},max:{x:Math.max(t[2].x,i[2].x),y:Math.max(t[2].y,i[2].y)}}),Is=t=>{const i=t.length;for(let s=0;s<i;s+=1)for(let e=s+1;e<i;e+=1)if(Cs(t[s],t[e]))return!0;return!1},Ls=(t,i)=>i+t,Ps=(t,i,s)=>{const e=Ks(i,t),h=e.x*e.x+e.y*e.y;if(0===h)return t;const n=Ks(s,t),o=(n.x*e.x+n.y*e.y)/h;return o<=0?t:o>=1?i:r(t.x+o*e.x,t.y+o*e.y)},Bs=(t,i,s)=>s>i?t>=i&&t<=s:t>=s&&t<=i,Ds=(t,i)=>{const s=t.x-i.x,e=t.y-i.y;return Math.sqrt(s*s+e*e)},Es=(t,i)=>{const s=t.x-i.x,e=t.y-i.y;return s*s+e*e},Rs=(t,i,s)=>{let e=s.x-i.x,h=s.y-i.y;const r=e*e+h*h;if(r<.01)return Number.MAX_VALUE;const n=((t.x-i.x)*e+(t.y-i.y)*h)/r,o=i.x+n*e,a=i.y+n*h;return e=t.x-o,h=t.y-a,e*e+h*h},Os=(t,i,s)=>Qs(t,Js(Ks(i,t),s)),zs=(t,i,s)=>bs.addVec(t,bs.multiply(bs.subtractVec(i,t),s));function Vs(t){const i=t.length;if(i>0){let s=t[0].x,e=t[0].x,h=t[0].y,n=t[0].y;for(let r=1;r<i;r+=1){const i=t[r];i.x>s&&(s=i.x),i.x<e&&(e=i.x),i.y>h&&(h=i.y),i.y<n&&(n=i.y)}return u(r(e,n),r(s,h))}return ws}function Ns(t){const i=t.length;if(i>0){let s=t[0].x,e=t[0].x,h=t[0].y,r=t[0].y,n=t[0].z,o=t[0].z;for(let a=0;a<i;a+=1){const i=t[a];i.x>s&&(s=i.x),i.x<e&&(e=i.x),i.y>h&&(h=i.y),i.y<r&&(r=i.y),i.z>n&&(n=i.z),i.z<o&&(o=i.z)}return u(a(e,r,o),a(s,h,n))}return _s}const Gs=(...t)=>{const i={min:{x:xs,y:xs},max:{x:Ms,y:Ms}};for(const s of t)i.min.x=i.min.x<s.min.x?i.min.x:s.min.x,i.max.x=i.max.x>s.max.x?i.max.x:s.max.x,i.min.y=i.min.y<s.min.y?i.min.y:s.min.y,i.max.y=i.max.y>s.max.y?i.max.y:s.max.y;return i},$s=(t,i)=>u(a(t.min.x<i.min.x?t.min.x:i.min.x,t.min.y<i.min.y?t.min.y:i.min.y,t.min.z<i.min.z?t.min.z:i.min.z),a(t.max.x>i.max.x?t.max.x:i.max.x,t.max.y>i.max.y?t.max.y:i.max.y,t.max.z>i.max.z?t.max.z:i.max.z));function Us(t,i,s,e){const h=t.x-e.x,r=t.y-e.y,n=e.x-s.x,o=s.y-e.y,a=o*h+n*r,l=(e.y-i.y)*h+(i.x-e.x)*r,u=o*(i.x-e.x)+n*(i.y-e.y);return u<0?a<=0&&l<=0&&a+l>=u:a>=0&&l>=0&&a+l<=u}const js=(t,i,s)=>!(t.x>s.x||t.y>s.y||t.x<i.x||t.y<i.y);function Hs(t,i,s){return r(Math.cos(s)*(t.x-i.x)+Math.sin(s)*(t.y-i.y)+i.x,-Math.sin(s)*(t.x-i.x)+Math.cos(s)*(t.y-i.y)+i.y)}function Ys(t,i){return r(t.x-i.x,t.y-i.y)}function Ws(t){const i=Zs(t);return 0===i?r(0,0):r(t.x/i,t.y/i)}function Xs(t,i){let s={x:i.x-t.x,y:i.y-t.y};s=Ws(s);const e=Math.PI/2,h=s.x;return s.x=-Math.sin(e)*s.y,s.y=h*Math.sin(e),s}function Zs(t){return Math.sqrt(t.x*t.x+t.y*t.y)}function Js(t,i){return r(t.x*i,t.y*i)}function Qs(t,i){return r(t.x+i.x,t.y+i.y)}function Ks(t,i){return r(t.x-i.x,t.y-i.y)}function qs(t,i){return r(t.x*i.x,t.y*i.y)}function te(t,i){return r(t.x/i.x,t.y/i.y)}function ie(t){return Js(t,-1)}function se(t,i){return t.x*i.x+t.y*i.y}const ee=(t,i,s)=>{const e=(s.y-i.y)/(s.x-i.x),h=i.y+(t-i.x)*e;return r(t,h)};function he(t){return t*Math.PI/180}function re(t){return 180*Math.atan2(t.y,t.x)/Math.PI}function ne(t){return r(Math.cos(t),Math.sin(t))}const oe=(t,i,s,e)=>{let h,n,o,a;if(i.x-t.x!=0||e.x-s.x!=0)return i.x-t.x==0?(o=i.x,n=(e.y-s.y)/(e.x-s.x),a=n*(o-s.x)+s.y):e.x-s.x==0?(o=e.x,h=(i.y-t.y)/(i.x-t.x),a=h*(o-t.x)+t.y):(h=(i.y-t.y)/(i.x-t.x),n=(e.y-s.y)/(e.x-s.x),o=(s.y-n*s.x+h*t.x-t.y)/(h-n),a=h*(o-t.x)+t.y),r(o,a)},ae=(t,i)=>{const s=t.length,e=i.length,h=new Uint16Array(s+e);return h.set(t,0),h.set(i,s),h};class le extends X{constructor(t,i,s,e){super(t,i,s,e),this.hs={internal:10,function:ue(10),number:10},this.j=1e3,this.Z(1,1e3),this.st=this.rs()}nt(t,i,s,e,h){if(t===i)return!1;const r=Math.min(t,i)<de,n=Math.max(t,i)>fe;return!r&&!n||!!h&&(i>t?{start:r?de:t,end:n?fe:i}:{start:n?fe:t,end:r?de:i})}Rt(t){const i=this._t(),s=this.kt(),e=Math.max(t,de);return i+(this.hs.function(e)-this.st.scaleStartLog)/this.st.scaleIntervalLog*(s-i)}Ot(t){const i=this._t(),s=(t-i)/(this.kt()-i),e=this.st.scaleStartLog+s*this.st.scaleIntervalLog;return this.hs.number**e}Pt(){this.hs&&this.rs()}Z(t,i){return super.Z(t,i),this.hs&&this.rs(),this}wt(t){return super.wt(t),this.hs&&this.rs(),this}K(t){return super.K(t),this.hs&&this.rs(),this}ns(t){return this.hs={internal:t,function:ue(t),number:ce(t)},this}ls(){return this.hs.internal}Qt(t,i){const s=this.Rt(t)+i;return this.Ot(s)}Et(){return this.ct||this.ot||this.ft||this.ut}rs(){const t=this.hs.function(this.$),i=this.hs.function(this.U)-t,s=2*this._t()/this.j-1,e=2*this.kt()/this.j-1-s;return this.st={scaleStartLog:t,scaleIntervalLog:i,viewportStart:s,viewportSize:e},this.st}rt(){return this.st}}const ue=t=>"e"===t?Ui:$i(t),ce=t=>"e"===t?Math.E:t,de=.9*10**-20,fe=1.1*10**25,Ae=[{prefix:"T",unit:10**12},{prefix:"B",unit:10**9},{prefix:"M",unit:1e6},{prefix:"K",unit:1e3}],ge=(t,i,s)=>{const e=Math.abs(s-i);if(0===e)return t.toFixed(0);const h=Math.max(2-ks(e,10),0);return t.toFixed(h)},ve={Numeric:(t,i)=>{const{start:s,end:e}=i;return ge(t,s,e)},NumericUnits:(t,i)=>{const{start:s,end:e}=i,h=Math.abs(e-s),r=t<0;t=Math.abs(t);let n="",o="";if(h>=1e3&&t>1e3){let i="";for(const s of Ae){const e=Math.round(1e3*t/s.unit)/1e3;if(e>=1){i=e.toString(),o=s.prefix;break}}n=(r?"-":"")+i}else{let i=String(Math.floor(t));const s=ks(t,1e3);for(let t=1;t<=s;t+=1){const s=i.length-(3*t+(t-1));i=`${i.substring(0,s)} ${i.substring(s,i.length)}`}n=(r?"-":"")+i+(h<=10?((t,i)=>{if(0===i)return"";let s=(Math.abs(t)-Math.abs(Math.floor(t))).toString().substring(1);return s.length>i&&(s=s.substring(0,i+1)),s})(t,2-ks(h,10)):"")}return n+=o,n},LogarithmicExponentsRounded:(t,i,s,e=10)=>{const h=ue(e)(t);return`${e}${ye(h)}`},LogarithmicExponents:(t,i,s,e=10)=>{const h=ue(e),r=Math.floor(h(t)),n=t/ce(e)**r;return`${Math.round(n)}×${e}${ye(r)}`},LogarithmicExtreme:(t,i,s,e=10)=>{const h=ue(e),r=Math.floor(h(t));return`${(t/ce(e)**r).toFixed(2)}×${e}${ye(r)}`},LogarithmicNoExponents:(t,i,s,e=10)=>{const h=ue(e);if("e"===e)return`${Math.floor(h(t))}e`;const r=t.toString();if(t>1)return r;const n=Math.floor(h(t));return t.toFixed(Math.abs(n))},Scientific:(t,i)=>{const{start:s,end:e}=i,h=Math.max(Math.abs(s),Math.abs(e)),r=Math.floor(Math.log10(h));return 0===t?`0.00e${r<0?"":"+"}${r}`:t.toExponential(2)}},ye=t=>Math.round(t).toString().split("").map((t=>{switch(t){case"0":return"⁰";case"1":return"¹";case"2":return"²";case"3":return"³";case"4":return"⁴";case"5":return"⁵";case"6":return"⁶";case"7":return"⁷";case"8":return"⁸";case"9":return"⁹";case"-":return"⁻";default:return t}})).join(""),pe=(t,i)=>t.value-i.value,me=i({type:"lut",steps:[],title:"",units:"",interpolate:!0,color:m(0,0,0,255),length:0,min:0,max:0,subranges:[],isValid:!1,percentageValues:!1,formatter:(t,i)=>ge(t,i.min,i.max)}),Se=t=>{const{steps:i}=t,s=i.length;i.sort(pe);const[e,h]=s>0?[i[0].value,i[s-1].value]:[0,0],r=s>0?s-1:0,n=Array(r);for(let t=0;t<r;t+=1)n[t]={min:i[t],max:i[t+1]};return{min:e,max:h,length:s,steps:i,subranges:n,isValid:s>0&&e!==h}};class be extends me{constructor(t){super(((t,i)=>({steps:t.steps,title:t.title,units:t.units,interpolate:t.interpolate,percentageValues:t.percentageValues,color:t.color,formatter:t.formatter,length:i.length,min:i.min,max:i.max,subranges:i.subranges,isValid:i.is