@progress/kendo-charts 2.9.0 → 2.10.0-develop.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cdn/js/kendo-charts.js +1 -1
- package/dist/cdn/main.js +1 -1
- package/dist/es/qrcode/encodings/encoders/utf8-encoder.js +3 -2
- package/dist/es/qrcode/encodings/encoding.js +2 -1
- package/dist/es2015/qrcode/encodings/encoders/utf8-encoder.js +3 -2
- package/dist/es2015/qrcode/encodings/encoding.js +2 -1
- package/dist/npm/main.js +8 -4
- package/dist/npm/qrcode.d.ts +2 -1
- package/dist/systemjs/kendo-charts.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("@progress/kendo-drawing")):"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.KendoCharts=e(require("@progress/kendo-drawing")):t.KendoCharts=e(t.KendoDrawing)}(self,(t=>(()=>{"use strict";var e={721:e=>{e.exports=t}},i={};function o(t){var r=i[t];if(void 0!==r)return r.exports;var n=i[t]={exports:{}};return e[t](n,n.exports,o),n.exports}o.d=(t,e)=>{for(var i in e)o.o(e,i)&&!o.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},o.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),o.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};o.r(r),o.d(r,{Aggregates:()=>Jr,ArcGauge:()=>mf,ArcScale:()=>uf,AreaChart:()=>Va,AreaSegment:()=>Oa,ArrowLinearPointer:()=>Vd,Axis:()=>So,AxisGroupRangeTracker:()=>ja,AxisLabel:()=>oo,Bar:()=>Ua,BarChart:()=>Ka,BarLabel:()=>Fa,BarLinearPointer:()=>Nd,Barcode:()=>pg,Box:()=>wi,BoxElement:()=>Ri,BoxPlot:()=>op,BoxPlotChart:()=>ap,BubbleChart:()=>gp,Bullet:()=>xp,BulletChart:()=>_p,Candlestick:()=>Ja,CandlestickChart:()=>ep,CategoricalChart:()=>aa,CategoricalErrorBar:()=>js,CategoricalPlotArea:()=>Ll,CategoryAxis:()=>nr,Chart:()=>Bu,ChartAxis:()=>Xr,ChartContainer:()=>Mp,ChartElement:()=>Li,ChartPane:()=>Zr,ChartPlotArea:()=>Qr,ChartService:()=>mo,ChartWizardCommon:()=>yx,CircularGauge:()=>bf,ClipAnimation:()=>Sa,ClusterLayout:()=>Ya,Crosshair:()=>Pp,CrosshairTooltip:()=>Sp,CurveProcessor:()=>Gr,DateCategoryAxis:()=>fr,DateValueAxis:()=>kr,DefaultAggregates:()=>Xp,DomEventsBuilder:()=>_o,DonutChart:()=>Gh,DonutPlotArea:()=>Xh,DonutSegment:()=>Nh,ErrorBarBase:()=>Vs,ErrorRangeCalculator:()=>an,Extent:()=>iv,FloatElement:()=>Wi,FontLoader:()=>Jt,FormatService:()=>go,Gauge:()=>xd,Gradients:()=>Fi,HashMap:()=>St,Highlight:()=>El,InstanceObserver:()=>Ot,IntlService:()=>ho,Legend:()=>rh,LegendItem:()=>eh,LegendLayout:()=>Gl,LineChart:()=>Ta,LinePoint:()=>ua,LineSegment:()=>fa,LinearGauge:()=>Wd,LinearPointer:()=>Od,LinearScale:()=>Cd,Location:()=>xy,LogarithmicAxis:()=>Tr,Map:()=>cm,Matrix:()=>Ce,MousewheelZoom:()=>Nl,Navigator:()=>Qu,NavigatorHint:()=>Gu,Note:()=>no,NumericAxis:()=>_r,OHLCChart:()=>dl,OHLCPoint:()=>cl,Observable:()=>Xe,Pane:()=>Bp,Pannable:()=>jl,PieAnimation:()=>xh,PieChart:()=>jh,PieChartMixin:()=>Rh,PiePlotArea:()=>Fh,PieSegment:()=>Ih,PlotAreaBase:()=>Dp,PlotAreaEventsMixin:()=>Hp,PlotAreaFactory:()=>sh,Point:()=>xi,PointEventsMixin:()=>la,PolarAxis:()=>Er,QRCode:()=>py,RadarCategoryAxis:()=>Br,RadarLogarithmicAxis:()=>Hr,RadarNumericAxis:()=>Dr,RadialGauge:()=>hf,RadialPointer:()=>af,RadialScale:()=>Jd,RangeAreaChart:()=>ll,RangeAreaPoint:()=>el,RangeBar:()=>qp,RangeBarChart:()=>Qp,RangePointer:()=>yf,Ring:()=>Si,RootElement:()=>Ui,Sankey:()=>Dm,ScatterChart:()=>cp,ScatterErrorBar:()=>lp,ScatterLineChart:()=>_h,Sector:()=>Pi,Selection:()=>hh,SeriesAggregator:()=>Gp,SeriesBinder:()=>on,ShapeBuilder:()=>Mi,ShapeElement:()=>ji,SharedTooltip:()=>fh,Sparkline:()=>Fu,SplineAreaSegment:()=>Ea,SplineSegment:()=>_a,StackWrap:()=>Za,StockChart:()=>$u,TemplateService:()=>yt,Text:()=>qi,TextBox:()=>$i,Title:()=>eo,Tooltip:()=>uh,UserEvents:()=>yi,WaterfallChart:()=>vl,WaterfallSegment:()=>gl,XYPlotArea:()=>Mh,ZoomSelection:()=>Fl,addClass:()=>W,alignPathToPixel:()=>Z,anyHasZIndex:()=>Ds,append:()=>Vt,appendIfNotNull:()=>Fs,applyEventMap:()=>Me,areNumbers:()=>Hs,autoMajorUnit:()=>vi,autoTextColor:()=>fe,barcodeValidator:()=>hg,bindEvents:()=>zt,bindSegments:()=>Us,categoriesCount:()=>Gs,chartBaseTheme:()=>Nx,chartTheme:()=>gu,clockwise:()=>Q,constants:()=>n,convertableToNumber:()=>J,countNumbers:()=>Kr,createHashSet:()=>_e,createOutOfRangePoints:()=>ra,createPatternFill:()=>Ii,createSankeyData:()=>Hm,cycleDown:()=>et,cycleIndex:()=>it,cycleUp:()=>tt,deepExtend:()=>at,defaultErrorHandler:()=>we,defined:()=>jt,deg:()=>Dt,elementOffset:()=>Ft,elementScale:()=>de,elementSize:()=>Ht,elementStyles:()=>ut,equalsIgnoreCase:()=>Ws,evalOptions:()=>Ys,eventCoordinates:()=>Nt,eventElement:()=>Ut,eventMap:()=>Pe,filterSeriesByType:()=>qs,find:()=>le,findAxisByName:()=>Yr,gaugeTheme:()=>du,getAriaTemplate:()=>mt,getField:()=>tn,getSpacing:()=>dt,getSupportedFeatures:()=>ze,getTemplate:()=>vt,getter:()=>_t,grep:()=>wt,hasClasses:()=>kt,hasGradientOverlay:()=>Ks,hasOwnProperty:()=>Ae,hasValue:()=>$s,hashKey:()=>Gt,inArray:()=>Ct,interpolateValue:()=>Pt,isArray:()=>G,isDateAxis:()=>Js,isFunction:()=>ot,isNumber:()=>K,isObject:()=>pt,isPlainObject:()=>Lt,isString:()=>$,keys:()=>ke,last:()=>Wt,limitValue:()=>Xt,logToConsole:()=>q.logToConsole,map:()=>Bt,mousewheelDelta:()=>Et,noop:()=>De,now:()=>Fe,objectKey:()=>Yt,off:()=>Ve,on:()=>Re,parseDateCategory:()=>Qs,qrcodeValidator:()=>ly,rad:()=>qt,rectToBox:()=>Zi,removeClass:()=>Y,renderIcon:()=>ae,round:()=>Zt,sankeyTheme:()=>fu,segmentVisible:()=>Ns,setDefaultOptions:()=>te,singleItemOrArray:()=>ta,sparseArrayLimits:()=>pe,styleValue:()=>lt,unbindEvents:()=>Qt,unclipBox:()=>na,valueOrDefault:()=>Kt});var n={};o.r(n),o.d(n,{DEFAULT_PANE:()=>Yu,NAVIGATOR_AXIS:()=>Xu,NAVIGATOR_PANE:()=>Wu});var s="arc",a="ArrowUp",p="ArrowDown",l="ArrowLeft",h="ArrowRight",c="aria-activedescendant",u="#000",d="bottom",f="center",g="circle",y=3,v="cross",m="date",x="12px sans-serif",b=10,_="end",w=/\{\d+:?/,k="height",A="inside",S="inherit",C="left",P=Number.MAX_VALUE,T=-Number.MAX_VALUE,M="none",O="object",L="outside",B="right",I="roundedRect",E="start",R="string",V="top",z="value",j="#fff",D="width",F="x",H="y",N="pointer",U="horizontal";function G(t){return Array.isArray(t)}function W(t,e){for(var i=G(e)?e:[e],o=0;o<i.length;o++){var r=i[o];-1===t.className.indexOf(r)&&(t.className+=" "+r)}}var X=/\s+/g;function Y(t,e){t&&t.className&&(t.className=t.className.replace(e,"").replace(X," "))}var q=o(721);function Z(t){var e=.5;t.options.stroke&&q.drawing.util.defined(t.options.stroke.width)&&t.options.stroke.width%2==0&&(e=0);for(var i=0;i<t.segments.length;i++)t.segments[i].anchor().round(0).translate(e,e);return t}function Q(t,e){return-t.x*e.y+t.y*e.x<0}function K(t){return"number"==typeof t&&!isNaN(t)}function $(t){return typeof t===R}function J(t){return K(t)||$(t)&&isFinite(t)}function tt(t,e){return(t+1)%e}function et(t,e){var i=t-1;return i<0?e-1:i}function it(t,e){return 1===e||t%e==0?0:t<0?e+t%e:t>=e?t%e:t}function ot(t){return"function"==typeof t}var rt="object",nt="undefined";function st(t,e){for(var i in e)if("__proto__"!==i&&"constructor"!==i){var o,r=e[i],n=typeof r;if((o=n===rt&&null!==r?r.constructor:null)&&o!==Array)if(r instanceof Date)t[i]=new Date(r.getTime());else if(ot(r.clone))t[i]=r.clone();else{var s=t[i];t[i]=typeof s===rt&&s||{},st(t[i],r)}else n!==nt&&(t[i]=r)}return t}function at(t){for(var e=arguments,i=arguments.length,o=1;o<i;o++)st(t,e[o]);return t}function pt(t){return"object"==typeof t}function lt(t){return K(t)?t+"px":t}var ht=/width|height|top|left|bottom|right/i;function ct(t){return ht.test(t)}function ut(t,e){var i=$(e)?[e]:e;if(G(i)){for(var o={},r=window.getComputedStyle(t),n=0;n<i.length;n++){var s=i[n];o[s]=ct(s)?parseFloat(r[s]):r[s]}return o}if(pt(e))for(var a in e)t.style[a]=lt(e[a])}function dt(t,e){void 0===e&&(e=0);var i={top:0,right:0,bottom:0,left:0};return"number"==typeof t?i[V]=i[B]=i[d]=i[C]=t:(i[V]=t[V]||e,i[B]=t[B]||e,i[d]=t[d]||e,i[C]=t[C]||e),i}var ft={compile:function(t){return t}},gt=function(){};gt.register=function(t){ft=t},gt.compile=function(t,e){return ft.compile(t,e)};const yt=gt;function vt(t){var e;return void 0===t&&(t={}),t.template?t.template=e=yt.compile(t.template):ot(t.content)&&(e=t.content),e}function mt(t){var e;return void 0===t&&(t={}),t.ariaTemplate?t.ariaTemplate=e=yt.compile(t.ariaTemplate):ot(t.ariaContent)&&(e=t.ariaContent),e}var xt=/\[(?:(\d+)|['"](.*?)['"])\]|((?:(?!\[.*?\]|\.).)+)/g,bt={};function _t(t){if(bt[t])return bt[t];var e=[];return t.replace(xt,(function(t,i,o,r){e.push(void 0!==i?i:o||r)})),bt[t]=function(t){for(var i=t,o=0;o<e.length&&i;o++)i=i[e[o]];return i},bt[t]}bt[void 0]=function(t){return t};const wt=function(t,e){return t.filter(e)};function kt(t,e){if(t.className)for(var i=e.split(" "),o=0;o<i.length;o++)if(t.className.indexOf&&-1!==t.className.indexOf(i[o]))return!0}var At=function(){this._map=new Map};At.prototype.get=function(t){return this._map.get(t)},At.prototype.set=function(t,e){this._map.set(t,e)};const St=At;function Ct(t,e){if(e)return e.includes(t)}function Pt(t,e,i){return q.drawing.util.round(t+(e-t)*i,y)}var Tt="trigger",Mt=function(t,e){this.observer=t,this.handlerMap=at({},this.handlerMap,e)};Mt.prototype.trigger=function(t,e){var i,o=this.observer,r=this.handlerMap;return r[t]?i=this.callObserver(r[t],e):o[Tt]&&(i=this.callObserver(Tt,t,e)),i},Mt.prototype.callObserver=function(t){for(var e=[],i=arguments.length-1;i-- >0;)e[i]=arguments[i+1];return this.observer[t].apply(this.observer,e)},Mt.prototype.requiresHandlers=function(t){if(this.observer.requiresHandlers)return this.observer.requiresHandlers(t);for(var e=0;e<t.length;e++)if(this.handlerMap[t[e]])return!0};const Ot=Mt;function Lt(t){return"[object Object]"===Object.prototype.toString.call(t)}function Bt(t,e){for(var i=t.length,o=[],r=0;r<i;r++){var n=e(t[r]);q.drawing.util.defined(n)&&o.push(n)}return o}var It=q.support.browser||{};function Et(t){var e=0;return t.wheelDelta?(e=-t.wheelDelta/120,It.webkit&&(e/=2*Math.max(window.devicePixelRatio,.625))):t.detail&&(e=t.detail/3),e>0?Math.ceil(e):Math.floor(e)}var Rt=q.drawing.util,Vt=Rt.append,zt=Rt.bindEvents,jt=Rt.defined,Dt=Rt.deg,Ft=Rt.elementOffset,Ht=Rt.elementSize,Nt=Rt.eventCoordinates,Ut=Rt.eventElement,Gt=Rt.hashKey,Wt=Rt.last,Xt=Rt.limitValue,Yt=Rt.objectKey,qt=Rt.rad,Zt=Rt.round,Qt=Rt.unbindEvents,Kt=Rt.valueOrDefault,$t=function(){};$t.fetchFonts=function(t,e,i){void 0===i&&(i={depth:0}),!t||i.depth>5||!document.fonts||Object.keys(t).forEach((function(o){var r=t[o];"dataSource"!==o&&"$"!==o[0]&&r&&("font"===o?e.push(r):"object"==typeof r&&(i.depth++,$t.fetchFonts(r,e,i),i.depth--))}))},$t.loadFonts=function(t,e){var i=[];if(t.length>0&&document.fonts){try{i=t.map((function(t){return document.fonts.load(t)}))}catch(t){(0,q.logToConsole)(t)}Promise.all(i).then(e,e)}else e()},$t.preloadFonts=function(t,e){var i=[];$t.fetchFonts(t,i),$t.loadFonts(i,e)};const Jt=$t;function te(t,e){var i=t.prototype;i.options?i.options=at({},i.options,e):i.options=e}var ee="k-i-",ie="k-svg-i-",oe=function(t,e){this.element=t,this.options=at({},this.options,e),this.wrapper()};oe.prototype.wrapper=function(){this.addClasses()},oe.prototype.addClasses=function(){},oe.prototype.html=function(){return this.element.outerHTML},te(oe,{name:"",size:"none",themeColor:"none",flip:"default",iconClass:"",stylingOptions:["size","themeColor","fill"]});var re=function(t){function e(e,i){t.call(this,e,i)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.wrapper=function(){var e=this.element.className.split(" ").find((function(t){return t.startsWith(ee)})),i=this.options.icon?""+(this.options.icon.startsWith(ee)?"":ee)+this.options.icon:"";this._className=i,W(this.element,"k-icon"),W(this.element,"k-font-icon"),Y(this.element,e),W(this.element,i),W(this.element,this.options.iconClass||""),t.prototype.wrapper.call(this)},e}(oe);te(re,{name:"HTMLFontIcon",icon:null});var ne=function(t){function e(e,i){e.innerHTML="",t.call(this,e,i)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.wrapper=function(){var e=this.options.icon,i=this.options.iconClass,o=this.element.className.split(" ").find((function(t){return t.startsWith(ie)}));if(!e&&i){var r=i.match(/k-i-(\w+(?:-\w+)*)/);r&&(e=r[1],i=i.replace(r[0],""))}$(e)&&(e=e.replace("k-i-","").replace(/-./g,(function(t){return t[1].toUpperCase()})),e=this.options.svgIcons[e]||this.options.svgIcons[e+"Icon"]);var n=e&&e.name?""+ie+e.name:"";if(this._className=n,W(this.element,"k-svg-icon"),Y(this.element,o),W(this.element,n),W(this.element,i||""),this.element.setAttribute("aria-hidden","true"),e&&Lt(e)){var s=document.createElementNS("http://www.w3.org/2000/svg","svg");s.setAttribute("viewBox",e.viewBox||""),s.setAttribute("focusable","false"),s.innerHTML=e.content||"",this.element.appendChild(s)}t.prototype.wrapper.call(this)},e}(oe);te(ne,{name:"HTMLSvgIcon",icon:null,svgIcons:{}});var se={svg:ne,font:re};function ae(t,e){var i=t,o=e;return i&&(!pt(i)||i instanceof HTMLElement)&&!$(i)||(o=i,i=document.createElement("span")),$(o)&&(o={icon:o}),o.type||(o.type="svg"),se[o.type]?new se[o.type](i,o).html():null}function pe(t){for(var e=P,i=T,o=0,r=t.length;o<r;o++){var n=t[o];null!==n&&isFinite(n)&&(e=Math.min(e,n),i=Math.max(i,n))}return{min:e===P?void 0:e,max:i===T?void 0:i}}function le(t,e){for(var i=0;i<t.length;i++){var o=t[i];if(e(o,i,t))return o}}var he=q.geometry.Matrix,ce=/matrix\((.*)\)/;function ue(t){var e=getComputedStyle(t).transform;return"none"===e?he.unit():function(t){var e=t.match(ce);if(null===e||2!==e.length)return he.unit();var i=e[1].split(",").map((function(t){return parseFloat(t)}));return new(Function.prototype.bind.apply(he,[null].concat(i)))}(e)}function de(t){if(!t)return he.unit();for(var e=ue(t),i=t.parentElement;i;){var o=ue(i);e=e.multiplyCopy(o),i=i.parentElement}return e.b=e.c=e.e=e.f=0,e}const fe=function(t){return new q.Color(t).isDark()?j:u};var ge={},ye=function(t){this._index={},this._values=t?t.slice(0):[];for(var e=0;e<this._values.length;e++)this._index[this._values[e]]=e},ve={size:{configurable:!0}};ye.prototype.values=function(){return this._values.filter((function(t){return t!==ge}))},ye.prototype.has=function(t){return void 0!==this._index[t]},ye.prototype.add=function(t){this.has(t)||(this._index[t]=this._values.length,this._values.push(t))},ye.prototype.delete=function(t){var e=this._index[t];void 0!==e&&(this._values[e]=ge,delete this._index[t])},ye.prototype.clear=function(){this._index={},this._values=[]},ve.size.get=function(){return this._values.length},Object.defineProperties(ye.prototype,ve);var me=function(t){this._set=new Set(t)},xe={size:{configurable:!0}};me.prototype.values=function(){return Array.from(this._set)},me.prototype.has=function(t){return this._set.has(t)},me.prototype.add=function(t){this._set.add(t)},me.prototype.delete=function(t){this._set.delete(t)},me.prototype.clear=function(){this._set.clear()},xe.size.get=function(){return this._set.size},Object.defineProperties(me.prototype,xe);var be=function(){var t=!1;return"function"==typeof Set&&(t=new Set([1]).has(1)),t};function _e(t){return be()?new me(t):new ye(t)}function we(t){throw t}const ke={INSERT:45,DELETE:46,BACKSPACE:8,TAB:9,ENTER:13,ESC:27,LEFT:37,UP:38,RIGHT:39,DOWN:40,END:35,HOME:36,SPACEBAR:32,PAGEUP:33,PAGEDOWN:34,F2:113,F10:121,F12:123,NUMPAD_PLUS:107,NUMPAD_MINUS:109,NUMPAD_DOT:110};function Ae(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var Se=function(){this.height=0,this.width=0,this.data=[]};Se.prototype.clone=function(){var t=new Se;return t.height=this.height,t.width=this.width,t.data=this.data.map((function(t){return t.slice()})),t},Se.prototype.get=function(t,e){var i=this.data[t];return i?i[e]:null},Se.prototype.set=function(t,e,i){var o=this.data[t];null==o&&(o=this.data[t]=[]),o[e]=i,t>=this.height&&(this.height=t+1),e>=this.width&&(this.width=e+1)},Se.prototype.each=function(t,e){for(var i=0;i<this.height;++i)for(var o=0;o<this.width;++o){var r=this.get(i,o);if((e||null!=r)&&void 0!==(r=t(r,i,o)))return r}},Se.prototype.map=function(t,e){var i=new Se;return this.each((function(e,o,r){i.set(o,r,t(e,o,r))}),e),i},Se.prototype.transpose=function(){var t=new Se;return this.each((function(e,i,o){t.set(o,i,e)})),t},Se.prototype.unit=function(t){this.width=this.height=t;for(var e=this.data=new Array(t),i=t;--i>=0;)for(var o=e[i]=new Array(t),r=t;--r>=0;)o[r]=i===r?1:0;return this},Se.prototype.multiply=function(t){for(var e=this,i=new Se,o=0;o<e.height;++o)for(var r=0;r<t.width;++r){for(var n=0,s=0;s<e.width;++s){var a=e.get(o,s),p=t.get(s,r);"number"==typeof a&&"number"==typeof p&&(n+=a*p)}i.set(o,r,n)}return i},Se.prototype.inverse=function(){for(var t=this.width,e=this.augment((new Se).unit(t)),i=e.data,o=function(e){var o=function(t,e,i){for(var o=i(t),r=t,n=t+1;n<e;n++){var s=i(t);s>o&&(o=s,r=t)}return r}(e,t,(function(t){return i[t][e]}));if(!i[o][e])return{v:null};if(e!==o){var r=i[e];i[e]=i[o],i[o]=r}for(var n=e+1;n<t;++n){for(var s=e+1;s<2*t;++s)i[n][s]-=i[e][s]*i[n][e]/i[e][e];i[n][e]=0}},r=0;r<t;++r){var n=o(r);if(n)return n.v}for(var s=0;s<t;++s)for(var a=i[s][s],p=0;p<2*t;++p)i[s][p]/=a;for(var l=t;--l>=0;)for(var h=l;--h>=0;)if(i[h][l])for(var c=2*t;--c>=t;)i[h][c]-=i[l][c]*i[h][l];return e.slice(0,t,t,t)},Se.prototype.augment=function(t){var e=this.clone(),i=e.width;return t.each((function(t,o,r){e.set(o,r+i,t)})),e},Se.prototype.slice=function(t,e,i,o){for(var r=new Se,n=0;n<i;++n)for(var s=0;s<o;++s)r.set(n,s,this.get(t+n,e+s));return r};const Ce=Se;var Pe={down:"pointerdown",move:"pointermove",up:"pointerup",cancel:"pointercancel pointerleave"};function Te(t){return Pe[t]||t}var Me=function(t){return t.replace(/([^ ]+)/g,Te)},Oe=1;function Le(){return"kchart"+Oe++}function Be(){return Le()}var Ie=new WeakMap,Ee=Symbol("id");function Re(t,e,i,o,r){!function(t,e,i,o,r){(G(e)?e:(e||"").split(" ")).forEach((function(e){!function(t,e,i,o,r){var n,s=o;i&&ot(i)&&!o?s=i:i&&function(t){return"string"==typeof t}(i)&&ot(s)&&(n=i);var a=function(e){var i=e.target?e.target.closest(n):null;if(!n||n&&e.target&&i){var o=n?i:e.currentTarget;Object.defineProperty(e,"currentTarget",{value:o}),Object.defineProperty(e,"delegateTarget",{value:t}),s(e)}};s[Ee]||(s[Ee]=Be());var p=Ie.get(t);p||(p=new Map,Ie.set(t,p)),p.set(e+s[Ee],a),t.addEventListener(e,a,Boolean(r))}(t,e,i,o,r)}))}(t,e,i,o,r)}function Ve(t,e,i,o,r){!function(t,e,i,o){(G(e)?e:(e||"").split(" ")).forEach((function(e){!function(t,e,i,o){var r=Ie.get(t);if(r&&i&&i[Ee]){var n=e+i[Ee],s=r.get(n);r.delete(n),s&&t.removeEventListener(e,s,Boolean(o))}}(t,e,i,o)}))}(t,e,i,o)}function ze(){var t=function(t){var e=!1,i={wp:/(Windows Phone(?: OS)?)\s(\d+)\.(\d+(\.\d+)?)/,fire:/(Silk)\/(\d+)\.(\d+(\.\d+)?)/,android:/(Android|Android.*(?:Opera|Firefox).*?\/)\s*(\d+)\.?(\d+(\.\d+)?)?/,iphone:/(iPhone|iPod).*OS\s+(\d+)[._]([\d._]+)/,ipad:/(iPad).*OS\s+(\d+)[._]([\d_]+)/,playbook:/(PlayBook).*?Tablet\s*OS\s*(\d+)\.(\d+(\.\d+)?)/,windows:/(MSIE)\s+(\d+)\.(\d+(\.\d+)?)/,tizen:/(tizen).*?Version\/(\d+)\.(\d+(\.\d+)?)/i,sailfish:/(sailfish).*rv:(\d+)\.(\d+(\.\d+)?).*firefox/i},o={ios:/^i(phone|pad|pod)$/i,android:/^android|fire$/i,windows:/windows/,wp:/wp/,flat:/sailfish|ffos|tizen/i};for(var r in i)if(t.match(i[r])){if("windows"===r&&"plugins"in navigator)return!1;(e={}).device=r,e.name=je(r,o),e[e.name]=!0;break}return e}(navigator.userAgent),e={};return e.mobileOS=t,e}function je(t,e,i){for(var o in e)if(e[o].test(t))return o;return void 0!==i?i:t}function De(){}function Fe(){return(new Date).getTime()}var He="string",Ne="function",Ue=function(){this._defaultPrevented=!0},Ge=function(){return!0===this._defaultPrevented},We=function(){this._events={}};We.prototype.destroy=function(){this.unbind()},We.prototype.bind=function(t,e,i){var o,r,n,s,a=this,p=typeof t===He?[t]:t||[],l=typeof e===Ne;if(void 0===e){for(o in t)a.bind(o,t[o]);return a}var h=function(){var t=p[o];(s=l?e:e[t])&&(i&&(n=s,s=function(){a.unbind(t,s),n.apply(a,arguments)},s.original=n),(a._events[t]=a._events[t]||[]).push(s))};for(o=0,r=p.length;o<r;o++)h();return a},We.prototype.one=function(t,e){return this.bind(t,e,!0)},We.prototype.first=function(t,e){var i,o,r,n=this,s=typeof t===He?[t]:t,a=typeof e===Ne;for(i=0,o=s.length;i<o;i++){var p=s[i];(r=a?e:e[p])&&(n._events[p]=n._events[p]||[]).unshift(r)}return n},We.prototype.trigger=function(t,e){var i,o,r=this,n=r._events[t];if(n){var s=e||{};for(s.sender=r,s._defaultPrevented=!1,s.preventDefault=Ue,s.isDefaultPrevented=Ge,i=0,o=(n=n.slice()).length;i<o;i++)n[i].call(r,s);return!0===s._defaultPrevented}return!1},We.prototype.unbind=function(t,e){var i,o=this,r=o._events[t];if(void 0===t)o._events={};else if(r)if(e)for(i=r.length-1;i>=0;i--)r[i]!==e&&r[i].original!==e||r.splice(i,1);else o._events[t]=[];return o},We.prototype._setEvents=function(t){for(var e=(this.events||[]).length,i=0;i<e;i++){var o=this.events[i];this.options[o]&&t[o]&&(this.unbind(o,this.options[o]),this._events&&this._events[o]&&delete this._events[o])}this.bind(this.events,t)};const Xe=We;var Ye=Object.assign,qe=function(t){t.preventDefault()},Ze=800,Qe=0,Ke="press",$e="hold",Je="select",ti="start",ei="move",ii="end",oi="cancel",ri="tap",ni="doubleTap",si="release",ai="gesturechange",pi="gestureend",li="gesturetap",hi={api:0,touch:0,mouse:9,pointer:9};function ci(t){var e=[],i=t.originalEvent||t,o=t.currentTarget;return t.api?e.push({id:2,event:t,target:t.target,currentTarget:t.target,location:t,type:"api"}):e.push({location:i,event:t,target:t.target,currentTarget:o,id:i.pointerId,type:"pointer"}),e}var ui=function(t,e){var i=this;i.support=ze(),i.invalidZeroEvents=this.support.mobileOS&&this.support.mobileOS.android,i.axis=t,i._updateLocationData(e),i.startLocation=i.location,i.velocity=i.delta=0,i.timeStamp=Fe()};ui.prototype.move=function(t){var e=this,i=t["page"+e.axis],o=Fe(),r=o-e.timeStamp||1;!i&&this.invalidZeroEvents||(e.delta=i-e.location,e._updateLocationData(t),e.initialDelta=i-e.startLocation,e.velocity=e.delta/r,e.timeStamp=o)},ui.prototype._updateLocationData=function(t){var e=this,i=e.axis;e.location=t["page"+i],e.client=t["client"+i],e.screen=t["screen"+i]};var di=function(t,e,i){Ye(this,{x:new ui("X",i.location),y:new ui("Y",i.location),type:i.type,threshold:t.threshold||hi[i.type],userEvents:t,target:e,currentTarget:i.currentTarget,initialTouch:i.target,id:i.id,pressEvent:i,_clicks:t._clicks,supportDoubleTap:t.supportDoubleTap,_moved:!1,_finished:!1})};function fi(t){for(var e=Pe.up.split(" "),i=0,o=e.length;i<o;i++)t(e[i])}di.prototype.press=function(){var t=this;this._holdTimeout=setTimeout((function(){return t._hold()}),this.userEvents.minHold),this._trigger(Ke,this.pressEvent)},di.prototype._tap=function(t){var e=this;e.userEvents._clicks++,1===e.userEvents._clicks&&(e._clickTimeout=setTimeout((function(){1===e.userEvents._clicks?e._trigger(ri,t):e._trigger(ni,t),e.userEvents._clicks=0}),300))},di.prototype._hold=function(){this._trigger($e,this.pressEvent)},di.prototype.move=function(t){var e=this,i="api"!==t.type&&e.userEvents._shouldNotMove;if(!e._finished&&!i){if(e.x.move(t.location),e.y.move(t.location),!e._moved){if(e._withinIgnoreThreshold())return;if(gi.current&&gi.current!==e.userEvents)return e.dispose();e._start(t)}e._finished||e._trigger(ei,t)}},di.prototype.end=function(t){this.endTime=Fe(),this._finished||(this._finished=!0,this._trigger(si,t),this._moved?this._trigger(ii,t):this.supportDoubleTap?this._tap(t):this._trigger(ri,t),clearTimeout(this._holdTimeout),this.dispose())},di.prototype.dispose=function(){var t=this.userEvents.touches||[];this._finished=!0,this.pressEvent=null,clearTimeout(this._holdTimeout);var e=t.indexOf(this);t.splice(e,1)},di.prototype.skip=function(){this.dispose()},di.prototype.cancel=function(){this.dispose()},di.prototype.isMoved=function(){return this._moved},di.prototype._start=function(t){clearTimeout(this._holdTimeout),this.startTime=Fe(),this._moved=!0,this._trigger(ti,t)},di.prototype._trigger=function(t,e){var i=e.event,o={touch:this,x:this.x,y:this.y,target:this.target,event:i};this.userEvents.notify(t,o)&&i.preventDefault()},di.prototype._withinIgnoreThreshold=function(){var t=this.x.initialDelta,e=this.y.initialDelta;return Math.sqrt(t*t+e*e)<=this.threshold};var gi=function(t){function e(e,i){t.call(this);var o,r=this,n=ze();if(this.support=n,i=i||{},this.options=i,o=r.filter=i.filter,r.threshold=i.threshold||Qe,r.minHold=i.minHold||Ze,r.touches=[],r._maxTouches=i.multiTouch?2:1,r.allowSelection=i.allowSelection,r.captureUpIfMoved=i.captureUpIfMoved,r._clicks=0,r.supportDoubleTap=i.supportDoubleTap,Ye(r,{element:e,surface:i.surface||e,stopPropagation:i.stopPropagation,pressed:!1}),this._surfaceMoveHandler=this._move.bind(this),Re(r.surface,Me("move"),this._surfaceMoveHandler),this._surfaceEndHandler=this._end.bind(this),Re(r.surface,Me("up cancel"),this._surfaceEndHandler),this._elementStartHandler=this._start.bind(this),Re(e,Me("down"),o,this._elementStartHandler),e.style["touch-action"]=i.touchAction||"none",i.preventDragEvent&&(this._elementDragStartHandler=qe,Re(e,Me("dragstart"),this._elementDragStartHandler)),this._elementSelectHandler=this._select.bind(this),Re(e,Me("mousedown"),o,this._elementSelectHandler),r.captureUpIfMoved){var s=r.surface;r._preventIfMovingProxy=r.preventIfMoving.bind(r),fi((function(t){s.addEventListener(t,r._preventIfMovingProxy,!0)}))}r.bind([Ke,$e,ri,ni,ti,ei,ii,si,oi,"gesturestart",ai,pi,li,Je],i)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.preventIfMoving=function(t){this._isMoved()&&t.preventDefault()},e.prototype.destroy=function(){var t=this,e=this.options,i=this.element;if(!t._destroyed){if(t._destroyed=!0,t.captureUpIfMoved){var o=t.surface;fi((function(e){o.removeEventListener(e,t._preventIfMovingProxy,!0)}))}Ve(t.surface,Me("move"),this._surfaceMoveHandler),Ve(t.surface,Me("up cancel"),this._surfaceEndHandler),Ve(i,Me("down"),this._elementStartHandler),e.preventDragEvent&&Ve(i,Me("dragstart"),this._elementDragStartHandler),Ve(i,Me("mousedown"),this._elementSelectHandler),t._disposeAll(),t.unbind(),delete t.surface,delete t.element,delete t.currentTarget}},e.prototype.capture=function(){e.current=this},e.prototype.cancel=function(){this._disposeAll(),this.trigger(oi)},e.prototype.notify=function(t,e){var i,o,r,n,s,a,p,l,h=this.touches,c=t;if(this._isMultiTouch()){switch(c){case ei:c=ai;break;case ii:c=pi;break;case ri:c=li}Ye(e,{touches:h},(i=h[0],o=h[1],r=i.x.location,n=i.y.location,p=r-(s=o.x.location),l=n-(a=o.y.location),{center:{x:(r+s)/2,y:(n+a)/2},distance:Math.sqrt(p*p+l*l)}))}return this.trigger(c,Ye(e,{type:c}))},e.prototype.press=function(t,e,i){this._apiCall("_start",t,e,i)},e.prototype.move=function(t,e){this._apiCall("_move",t,e)},e.prototype.end=function(t,e){this._apiCall("_end",t,e)},e.prototype._isMultiTouch=function(){return this.touches.length>1},e.prototype._maxTouchesReached=function(){return this.touches.length>=this._maxTouches},e.prototype._disposeAll=function(){for(var t=this.touches;t.length>0;)t.pop().dispose()},e.prototype._isMoved=function(){return wt(this.touches,(function(t){return t.isMoved()})).length},e.prototype._select=function(t){this.allowSelection&&!this.trigger(Je,{event:t})||t.preventDefault()},e.prototype._start=function(t){if(!(t.which&&t.which>1||this._maxTouchesReached())){var i;e.current=null,this.currentTarget=t.currentTarget,this.stopPropagation&&t.stopPropagation();for(var o=ci(t),r=0;r<o.length&&!this._maxTouchesReached();r++){var n=o[r];if(!(i=this.filter?n.currentTarget:this.element)||0!==i.length){var s=new di(this,i,n);this.touches.push(s),s.press(),this._isMultiTouch()&&this.notify("gesturestart",{})}}}},e.prototype._move=function(t){this._eachTouch("move",t)},e.prototype._end=function(t){this._eachTouch("end",t)},e.prototype._eachTouch=function(t,e){var i,o,r,n,s={},a=ci(e),p=this.touches;for(i=0;i<p.length;i++)s[(o=p[i]).id]=o;for(i=0;i<a.length;i++)(n=s[(r=a[i]).id])&&("move"===t&&"pointer"===r.type&&!this.surface.hasPointerCapture(r.id)&&this.surface.setPointerCapture(r.id),n[t](r))},e.prototype._apiCall=function(t,e,i,o){this[t]({api:!0,pageX:e,pageY:i,clientX:e,clientY:i,target:o||this.element,stopPropagation:De,preventDefault:De})},e.defaultThreshold=function(t){Qe=t},e.minHold=function(t){Ze=t},e}(Xe);const yi=gi;function vi(t,e){var i=Zt(e-t,b-1);if(0===i){if(0===e)return.1;i=Math.abs(e)}var o=Math.pow(10,Math.floor(Math.log(i)/Math.log(10))),r=Zt(i/o,b);return Zt(o*(r<1.904762?.2:r<4.761904?.5:r<9.523809?1:2),b)}var mi=function(t,e){this.x=t||0,this.y=e||0};mi.prototype.clone=function(){return new mi(this.x,this.y)},mi.prototype.equals=function(t){return t&&this.x===t.x&&this.y===t.y},mi.prototype.rotate=function(t,e){var i=qt(e),o=Math.cos(i),r=Math.sin(i),n=t.x,s=t.y,a=this.x,p=this.y;return this.x=Zt(n+(a-n)*o+(p-s)*r,y),this.y=Zt(s+(p-s)*o-(a-n)*r,y),this},mi.prototype.multiply=function(t){return this.x*=t,this.y*=t,this},mi.prototype.distanceTo=function(t){var e=this.x-t.x,i=this.y-t.y;return Math.sqrt(e*e+i*i)},mi.onCircle=function(t,e,i){var o=qt(e);return new mi(t.x-i*Math.cos(o),t.y-i*Math.sin(o))};const xi=mi;var bi=function(t,e,i,o){this.x1=t||0,this.y1=e||0,this.x2=i||0,this.y2=o||0};function _i(t,e,i,o,r){var n=qt(r);return new xi(i+(t-i)*Math.cos(n)+(e-o)*Math.sin(n),o-(t-i)*Math.sin(n)+(e-o)*Math.cos(n))}bi.prototype.equals=function(t){return this.x1===t.x1&&this.x2===t.x2&&this.y1===t.y1&&this.y2===t.y2},bi.prototype.width=function(){return this.x2-this.x1},bi.prototype.height=function(){return this.y2-this.y1},bi.prototype.translate=function(t,e){return this.x1+=t,this.x2+=t,this.y1+=e,this.y2+=e,this},bi.prototype.move=function(t,e){var i=this.height(),o=this.width();return void 0!==t&&(this.x1=t,this.x2=this.x1+o),void 0!==e&&(this.y1=e,this.y2=this.y1+i),this},bi.prototype.wrap=function(t){return this.x1=Math.min(this.x1,t.x1),this.y1=Math.min(this.y1,t.y1),this.x2=Math.max(this.x2,t.x2),this.y2=Math.max(this.y2,t.y2),this},bi.prototype.wrapLimit=function(t,e,i){return this.x1=Math.min(this.x1,Math.max(this.x1-e,t.x1)),this.y1=Math.min(this.y1,Math.max(this.y1-i,t.y1)),this.x2=Math.max(this.x2,Math.min(this.x2+e,t.x2)),this.y2=Math.max(this.y2,Math.min(this.y2+i,t.y2)),this},bi.prototype.wrapPoint=function(t){var e=G(t),i=e?t[0]:t.x,o=e?t[1]:t.y;return this.wrap(new bi(i,o,i,o)),this},bi.prototype.snapTo=function(t,e){return e!==F&&e||(this.x1=t.x1,this.x2=t.x2),e!==H&&e||(this.y1=t.y1,this.y2=t.y2),this},bi.prototype.alignTo=function(t,e){var i=this.height(),o=this.width(),r=e===V||e===d?H:F,n=r===H?i:o;if(e===f){var s=t.center(),a=this.center();this.x1+=s.x-a.x,this.y1+=s.y-a.y}else this[r+1]=e===V||e===C?t[r+1]-n:t[r+2];return this.x2=this.x1+o,this.y2=this.y1+i,this},bi.prototype.shrink=function(t,e){return this.x2-=t,this.y2-=e,this},bi.prototype.expand=function(t,e){return this.shrink(-t,-e),this},bi.prototype.pad=function(t){var e=dt(t);return this.x1-=e.left,this.x2+=e.right,this.y1-=e.top,this.y2+=e.bottom,this},bi.prototype.unpad=function(t){var e=dt(t);return e.left=-e.left,e.top=-e.top,e.right=-e.right,e.bottom=-e.bottom,this.pad(e)},bi.prototype.clone=function(){return new bi(this.x1,this.y1,this.x2,this.y2)},bi.prototype.center=function(){return new xi(this.x1+this.width()/2,this.y1+this.height()/2)},bi.prototype.containsPoint=function(t){return t.x>=this.x1&&t.x<=this.x2&&t.y>=this.y1&&t.y<=this.y2},bi.prototype.points=function(){return[new xi(this.x1,this.y1),new xi(this.x2,this.y1),new xi(this.x2,this.y2),new xi(this.x1,this.y2)]},bi.prototype.getHash=function(){return[this.x1,this.y1,this.x2,this.y2].join(",")},bi.prototype.overlaps=function(t){return!(t.y2<this.y1||this.y2<t.y1||t.x2<this.x1||this.x2<t.x1)},bi.prototype.rotate=function(t){var e=this.width(),i=this.height(),o=this.center(),r=o.x,n=o.y,s=_i(0,0,r,n,t),a=_i(e,0,r,n,t),p=_i(e,i,r,n,t),l=_i(0,i,r,n,t);return e=Math.max(s.x,a.x,p.x,l.x)-Math.min(s.x,a.x,p.x,l.x),i=Math.max(s.y,a.y,p.y,l.y)-Math.min(s.y,a.y,p.y,l.y),this.x2=this.x1+e,this.y2=this.y1+i,this},bi.prototype.toRect=function(){return new q.geometry.Rect([this.x1,this.y1],[this.width(),this.height()])},bi.prototype.hasSize=function(){return 0!==this.width()&&0!==this.height()},bi.prototype.align=function(t,e,i){return e===F?this.alignX(t,i):this.alignY(t,i),this},bi.prototype.alignX=function(t,e){var i=this.width();e===C?(this.x1=t.x1,this.x2=this.x1+i):e===B?(this.x2=t.x2,this.x1=this.x2-i):e===f&&(this.x1=t.x1+(t.width()-i)/2,this.x2=this.x1+i)},bi.prototype.alignY=function(t,e){var i=this.height();e===V?(this.y1=t.y1,this.y2=this.y1+i):e===d?(this.y2=t.y2,this.y1=this.y2-i):e===f&&(this.y1=t.y1+(t.height()-i)/2,this.y2=this.y1+i)};const wi=bi;var ki=function(t,e,i,o,r){this.center=t,this.innerRadius=e,this.radius=i,this.startAngle=o,this.angle=r};function Ai(t,e){return t-e}ki.prototype.clone=function(){return new ki(this.center,this.innerRadius,this.radius,this.startAngle,this.angle)},ki.prototype.middle=function(){return this.startAngle+this.angle/2},ki.prototype.setRadius=function(t,e){return e?this.innerRadius=t:this.radius=t,this},ki.prototype.point=function(t,e){var i=qt(t),o=Math.cos(i),r=Math.sin(i),n=e?this.innerRadius:this.radius,s=Zt(this.center.x-o*n,y),a=Zt(this.center.y-r*n,y);return new xi(s,a)},ki.prototype.adjacentBox=function(t,e,i){var o=this.clone().expand(t),r=o.middle(),n=o.point(r),s=e/2,a=i/2,p=Math.sin(qt(r)),l=Math.cos(qt(r)),h=n.x-s,c=n.y-a;return Math.abs(p)<.9&&(h+=s*-l/Math.abs(l)),Math.abs(l)<.9&&(c+=a*-p/Math.abs(p)),new wi(h,c,h+e,c+i)},ki.prototype.containsPoint=function(t){var e=this.center,i=this.innerRadius,o=this.radius,r=this.startAngle,n=this.startAngle+this.angle,s=t.x-e.x,a=t.y-e.y,p=new xi(s,a),l=this.point(r),h=new xi(l.x-e.x,l.y-e.y),c=this.point(n),u=new xi(c.x-e.x,c.y-e.y),d=Zt(s*s+a*a,y);return(h.equals(p)||Q(h,p))&&!Q(u,p)&&d>=i*i&&d<=o*o},ki.prototype.getBBox=function(){var t,e=new wi(P,P,T,T),i=Zt(this.startAngle%360),o=Zt((i+this.angle)%360),r=this.innerRadius,n=[0,90,180,270,i,o].sort(Ai),s=n.indexOf(i),a=n.indexOf(o);t=i===o?n:s<a?n.slice(s,a+1):[].concat(n.slice(0,a+1),n.slice(s,n.length));for(var p=0;p<t.length;p++){var l=this.point(t[p]);e.wrapPoint(l),e.wrapPoint(l,r)}return r||e.wrapPoint(this.center),e},ki.prototype.expand=function(t){return this.radius+=t,this};const Si=ki;var Ci=function(t){function e(e,i,o,r){t.call(this,e,0,i,o,r)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.expand=function(e){return t.prototype.expand.call(this,e)},e.prototype.clone=function(){return new e(this.center,this.radius,this.startAngle,this.angle)},e.prototype.setRadius=function(t){return this.radius=t,this},e}(Si);const Pi=Ci;var Ti=function(){};Ti.prototype.createRing=function(t,e){var i=t.startAngle+180,o=t.angle+i;(0===t.angle||t.angle>0&&i===o)&&(o+=.001);var r=new q.geometry.Point(t.center.x,t.center.y),n=Math.max(t.radius,0),s=Math.max(t.innerRadius,0),a=new q.geometry.Arc(r,{startAngle:i,endAngle:o,radiusX:n,radiusY:n}),p=q.drawing.Path.fromArc(a,e).close();if(s){a.radiusX=a.radiusY=s;var l=a.pointAt(o);p.lineTo(l.x,l.y),p.arc(o,i,s,s,!0)}else p.lineTo(r.x,r.y);return p},Ti.current=new Ti;const Mi=Ti;var Oi=function(t){this.children=[],this.initOptions(t)};Oi.prototype.initOptions=function(t){this.options=at({},this.options,this.initUserOptions(t))},Oi.prototype.initUserOptions=function(t){return t},Oi.prototype.reflow=function(t){for(var e,i=this.children,o=0;o<i.length;o++){var r=i[o];r.reflow(t),e=e?e.wrap(r.box):r.box.clone()}this.box=e||t},Oi.prototype.destroy=function(){var t=this.children;this.animation&&this.animation.destroy();for(var e=0;e<t.length;e++)t[e].destroy()},Oi.prototype.getRoot=function(){var t=this.parent;return t?t.getRoot():null},Oi.prototype.getSender=function(){var t=this.getService();if(t)return t.sender},Oi.prototype.getService=function(){for(var t=this;t;){if(t.chartService)return t.chartService;t=t.parent}},Oi.prototype.translateChildren=function(t,e){for(var i=this.children,o=i.length,r=0;r<o;r++)i[r].box.translate(t,e)},Oi.prototype.append=function(){for(var t=arguments,e=0;e<arguments.length;e++){var i=t[e];this.children.push(i),i.parent=this}},Oi.prototype.renderVisual=function(){!1!==this.options.visible&&(this.createVisual(),this.addVisual(),this.renderChildren(),this.createAnimation(),this.renderComplete())},Oi.prototype.addVisual=function(){this.visual&&(this.visual.chartElement=this,this.parent&&this.parent.appendVisual(this.visual))},Oi.prototype.renderChildren=function(){for(var t=this.children,e=t.length,i=0;i<e;i++)t[i].renderVisual()},Oi.prototype.createVisual=function(){this.visual=new q.drawing.Group({zIndex:this.options.zIndex,visible:Kt(this.options.visible,!0)})},Oi.prototype.createAnimation=function(){this.visual&&this.options.animation&&(this.animation=q.drawing.Animation.create(this.visual,this.options.animation))},Oi.prototype.appendVisual=function(t){t.chartElement||(t.chartElement=this),t.options.noclip?this.clipRoot().visual.append(t):void 0!==t.options.zIndex?this.stackRoot().stackVisual(t):this.isStackRoot?this.stackVisual(t):this.visual?this.visual.append(t):this.parent.appendVisual(t)},Oi.prototype.clipRoot=function(){return this.parent?this.parent.clipRoot():this},Oi.prototype.stackRoot=function(){return this.parent?this.parent.stackRoot():this},Oi.prototype.stackVisual=function(t){var e,i=t.options.zIndex||0,o=this.visual.children,r=o.length;for(e=0;e<r;e++){var n=o[e];if(Kt(n.options.zIndex,0)>i)break}this.visual.insert(e,t)},Oi.prototype.traverse=function(t){for(var e=this.children,i=e.length,o=0;o<i;o++){var r=e[o];t(r),r.traverse&&r.traverse(t)}},Oi.prototype.closest=function(t){for(var e=this,i=!1;e&&!i;)(i=t(e))||(e=e.parent);if(i)return e},Oi.prototype.renderComplete=function(){},Oi.prototype.hasHighlight=function(){var t=(this.options||{}).highlight;return!(!this.createHighlight||t&&!1===t.visible||!1===this.visible)},Oi.prototype.toggleHighlight=function(t,e){var i=this,o=(this.options||{}).highlight||{},r=o.visual,n=this._highlight;if(!n){var s={fill:{color:j,opacity:e||.2},stroke:{color:j,width:1,opacity:e||.2}};if(r){if(!(n=this._highlight=r(Object.assign(this.highlightVisualArgs(),{createVisual:function(){return i.createHighlight(s)},sender:this.getSender(),series:this.series,dataItem:this.dataItem,category:this.category,value:this.value,percentage:this.percentage,runningTotal:this.runningTotal,total:this.total}))))return}else n=this._highlight=this.createHighlight(s);void 0===n.options.zIndex&&(n.options.zIndex=Kt(o.zIndex,this.options.zIndex)),this.appendVisual(n)}n.visible(t)},Oi.prototype.toggleFocusHighlight=function(t){var e=(this.options||{}).focusHighlight||{},i=this._focusHighlight;if(t||i){if(!i){var o=this.getRoot().options.background,r=fe(o),n={fill:{opacity:e.opacity,color:e.color},stroke:Object.assign({},{color:r},e.border),zIndex:e.zIndex};i=this._focusHighlight=this.createFocusHighlight(n),this.appendVisual(i)}i.visible(t)}},Oi.prototype.createGradientOverlay=function(t,e,i){var o=new q.drawing.Path(Object.assign({stroke:{color:"none"},fill:this.createGradient(i),closed:t.options.closed},e));return o.segments.elements(t.segments.elements()),o},Oi.prototype.createGradient=function(t){if(this.parent)return this.parent.createGradient(t)},Oi.prototype.supportsPointInactiveOpacity=function(){return!0},Oi.prototype.options={};const Li=Oi;var Bi={dots:q.drawing.dotsPattern,verticalStripes:q.drawing.verticalStripesPattern,crosshatch:q.drawing.crosshatchPattern,diagonalStripes:q.drawing.diagonalStripesPattern,grid:q.drawing.gridPattern};function Ii(t,e,i){var o=function(t,e){return ot(t)?t(e):t}(t,i),r=o&&Bi[o.type];return r?r(Object.assign({},e,o)):e}var Ei=function(t){function e(e){t.call(this,e),this.options.margin=dt(this.options.margin),this.options.padding=dt(this.options.padding)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reflow=function(e){var i,o=this,r=this.options,n=r.width,s=r.height,a=r.shrinkToFit,p=n&&s,l=r.margin,h=r.padding,c=r.border.width,u=function(){o.align(e,F,r.align),o.align(e,H,r.vAlign),o.paddingBox=i.clone().unpad(l).unpad(c)},d=e.clone();p&&(d.x2=d.x1+n,d.y2=d.y1+s),a&&d.unpad(l).unpad(c).unpad(h),t.prototype.reflow.call(this,d),i=p?this.box=new wi(0,0,n,s):this.box,a&&p?(u(),d=this.contentBox=this.paddingBox.clone().unpad(h)):(d=this.contentBox=i.clone(),i.pad(h).pad(c).pad(l),u()),this.translateChildren(i.x1-d.x1+l.left+c+h.left,i.y1-d.y1+l.top+c+h.top);for(var f=this.children,g=0;g<f.length;g++){var y=f[g];y.reflow(y.box)}},e.prototype.align=function(t,e,i){this.box.align(t,e,i)},e.prototype.hasBox=function(){var t=this.options;return t.border.width||t.background},e.prototype.createVisual=function(){t.prototype.createVisual.call(this),this.options.visible&&this.hasBox()&&this.visual.append(q.drawing.Path.fromRect(this.paddingBox.toRect(),this.visualStyle()))},e.prototype.visualStyle=function(){var t=this.options,e=t.border||{};return{stroke:{width:e.width,color:e.color,opacity:Kt(e.opacity,t.opacity),dashType:e.dashType},fill:Ii(t.pattern,{color:t.background,opacity:t.opacity},void 0),cursor:t.cursor}},e}(Li);te(Ei,{align:C,vAlign:V,margin:{},padding:{},border:{color:u,width:0},background:"",shrinkToFit:!1,width:0,height:0,visible:!0});const Ri=Ei;function Vi(t,e){e&&(t.options.className=e.className,t.options.role=e.role,t.options.ariaLabel=e.ariaLabel,t.options.ariaRoleDescription=e.ariaRoleDescription,t.options.ariaChecked=e.ariaChecked)}var zi=function(t){function e(e,i){t.call(this,e),this.pointData=i}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getElement=function(){var t=this.options,e=this.paddingBox,i=t.type,o=t.rotation,r=e.center(),n=e.width()/2,s=e.height()/2;if(!t.visible||!this.hasBox())return null;var a,p=this.visualStyle();if(i===g)a=new q.drawing.Circle(new q.geometry.Circle([Zt(e.x1+n,y),Zt(e.y1+s,y)],Math.min(n,s)),p);else if("triangle"===i)a=q.drawing.Path.fromPoints([[e.x1+n,e.y1],[e.x1,e.y2],[e.x2,e.y2]],p).close();else if(i===v)(a=new q.drawing.MultiPath(p)).moveTo(e.x1,e.y1).lineTo(e.x2,e.y2),a.moveTo(e.x1,e.y2).lineTo(e.x2,e.y1);else{var l=e.toRect();if(i===I){var h=Kt(t.borderRadius,l.width()/5);l.setCornerRadius(h)}a=q.drawing.Path.fromRect(l,p)}return o&&a.transform(q.geometry.transform().rotate(-o,[r.x,r.y])),a.options.zIndex=t.zIndex,a},e.prototype.createElement=function(){var t=this,e=this.options.visual,i=this.pointData||{};return e?e({value:i.value,dataItem:i.dataItem,sender:this.getSender(),series:i.series,category:i.category,rect:this.paddingBox.toRect(),options:this.visualOptions(),createVisual:function(){return t.getElement()}}):this.getElement()},e.prototype.visualOptions=function(){var t=this.options;return{background:t.background,border:t.border,margin:t.margin,padding:t.padding,type:t.type,size:t.width,visible:t.visible}},e.prototype.createVisual=function(){this.visual=this.createElement(),Vi(this.visual,this.options.accessibilityOptions)},e}(Ri);te(zi,{type:g,align:f,vAlign:f});const ji=zi;var Di="radial";const Fi={glass:{type:"linear",rotation:0,stops:[{offset:0,color:j,opacity:0},{offset:.25,color:j,opacity:.3},{offset:1,color:j,opacity:0}]},sharpBevel:{type:Di,stops:[{offset:0,color:j,opacity:.55},{offset:.65,color:j,opacity:0},{offset:.95,color:j,opacity:.25}]},roundedBevel:{type:Di,stops:[{offset:.33,color:j,opacity:.06},{offset:.83,color:j,opacity:.2},{offset:.95,color:j,opacity:0}]},roundedGlass:{type:Di,supportVML:!1,stops:[{offset:0,color:j,opacity:0},{offset:.5,color:j,opacity:.3},{offset:.99,color:j,opacity:0}]},sharpGlass:{type:Di,supportVML:!1,stops:[{offset:0,color:j,opacity:.2},{offset:.15,color:j,opacity:.15},{offset:.17,color:j,opacity:.35},{offset:.85,color:j,opacity:.05},{offset:.87,color:j,opacity:.15},{offset:.99,color:j,opacity:0}]},bubbleShadow:{type:Di,center:[.5,.5],radius:.5}};function Hi(t,e){if(t.x1===e.x1&&t.y1===e.y1&&t.x2===e.x2&&t.y2===e.y2)return e;var i=Math.min(t.x1,e.x1),o=Math.max(t.x1,e.x1),r=Math.min(t.x2,e.x2),n=Math.max(t.x2,e.x2),s=Math.min(t.y1,e.y1),a=Math.max(t.y1,e.y1),p=Math.min(t.y2,e.y2),l=Math.max(t.y2,e.y2),h=[];return h[0]=new wi(o,s,r,a),h[1]=new wi(i,a,o,p),h[2]=new wi(r,a,n,p),h[3]=new wi(o,p,r,l),t.x1===i&&t.y1===s||e.x1===i&&e.y1===s?(h[4]=new wi(i,s,o,a),h[5]=new wi(r,p,n,l)):(h[4]=new wi(r,s,n,a),h[5]=new wi(i,p,o,l)),wt(h,(function(t){return t.height()>0&&t.width()>0}))[0]}var Ni=function(t){function e(e){t.call(this,e);var i=this.options;i.width=parseInt(i.width,10),i.height=parseInt(i.height,10),this.gradients={}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reflow=function(){var t=this.options,e=this.children,i=new wi(0,0,t.width,t.height);this.box=i.unpad(t.margin);for(var o=0;o<e.length;o++)e[o].reflow(i),i=Hi(i,e[o].box)||new wi},e.prototype.createVisual=function(){this.visual=new q.drawing.Group,this.createBackground()},e.prototype.createBackground=function(){var t=this.options,e=t.border||{},i=this.box.clone().pad(t.margin).unpad(e.width),o=q.drawing.Path.fromRect(i.toRect(),{stroke:{color:e.width?e.color:"",width:e.width,dashType:e.dashType},fill:{color:t.background,opacity:t.opacity},zIndex:-10});this.visual.append(o)},e.prototype.getRoot=function(){return this},e.prototype.createGradient=function(t){var e,i=this.gradients,o=Yt(t),r=Fi[t.gradient];if(i[o])e=i[o];else{var n=Object.assign({},r,t);"linear"===r.type?e=new q.drawing.LinearGradient(n):(t.innerRadius&&(n.stops=function(t){for(var e=t.stops,i=t.innerRadius/t.radius*100,o=e.length,r=[],n=0;n<o;n++){var s=Object.assign({},e[n]);s.offset=(s.offset*(100-i)+i)/100,r.push(s)}return r}(n)),(e=new q.drawing.RadialGradient(n)).supportVML=!1!==r.supportVML),i[o]=e}return e},e.prototype.cleanGradients=function(){var t=this.gradients;for(var e in t)t[e]._observers=[]},e.prototype.size=function(){var t=this.options;return new wi(0,0,t.width,t.height)},e}(Li);te(Ni,{width:600,height:400,background:j,border:{color:u,width:0},margin:dt(5),zIndex:-2});const Ui=Ni;var Gi=function(t){function e(e){t.call(this,e),this._initDirection()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._initDirection=function(){var t=this.options;t.vertical?(this.groupAxis=F,this.elementAxis=H,this.groupSizeField=D,this.elementSizeField=k,this.groupSpacing=t.spacing,this.elementSpacing=t.vSpacing):(this.groupAxis=H,this.elementAxis=F,this.groupSizeField=k,this.elementSizeField=D,this.groupSpacing=t.vSpacing,this.elementSpacing=t.spacing)},e.prototype.reflow=function(t){this.box=t.clone(),this.reflowChildren()},e.prototype.reflowChildren=function(){var t=this,e=t.box,i=t.elementAxis,o=t.groupAxis,r=t.elementSizeField,n=t.groupSizeField,s=this.groupOptions(),a=s.groups,p=s.groupsSize,l=s.maxGroupElementsSize,h=a.length,c=e[o+1]+this.alignStart(p,e[n]());if(h){for(var u=c,d=0;d<h;d++){for(var f=a[d],g=f.groupElements,y=e[i+1],v=g.length,m=0;m<v;m++){var x=g[m],b=this.elementSize(x),_=u+this.alignStart(b[n],f.groupSize),w=new wi;w[o+1]=_,w[o+2]=_+b[n],w[i+1]=y,w[i+2]=y+b[r],x.reflow(w),y+=b[r]+this.elementSpacing}u+=f.groupSize+this.groupSpacing}e[o+1]=c,e[o+2]=c+p,e[i+2]=e[i+1]+l}},e.prototype.alignStart=function(t,e){var i=0,o=this.options.align;return o===B||o===d?i=e-t:o===f&&(i=(e-t)/2),i},e.prototype.groupOptions=function(){for(var t=this,e=t.box,i=t.children,o=t.elementSizeField,r=t.groupSizeField,n=t.elementSpacing,s=t.groupSpacing,a=Zt(e[o]()),p=i.length,l=[],h=0,c=0,u=0,d=0,f=[],g=0;g<p;g++){var y=i[g];y.box||y.reflow(e);var v=this.elementSize(y);this.options.wrap&&Zt(c+n+v[o])>a&&(l.push({groupElements:f,groupSize:h,groupElementsSize:c}),d=Math.max(d,c),u+=s+h,h=0,c=0,f=[]),h=Math.max(h,v[r]),c>0&&(c+=n),c+=v[o],f.push(y)}return l.push({groupElements:f,groupSize:h,groupElementsSize:c}),{groups:l,groupsSize:u+=h,maxGroupElementsSize:d=Math.max(d,c)}},e.prototype.elementSize=function(t){return{width:t.box.width(),height:t.box.height()}},e.prototype.createVisual=function(){},e}(Li);te(Gi,{vertical:!0,wrap:!0,vSpacing:0,spacing:0});const Wi=Gi;var Xi=q.drawing.Text,Yi=function(t){function e(e,i){t.call(this,i),this.content=e,this.reflow(new wi)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reflow=function(t){var e=this.options,i=e.size=q.drawing.util.measureText(this.content,{font:e.font});this.baseline=i.baseline,this.box=new wi(t.x1,t.y1,t.x1+i.width,t.y1+i.height)},e.prototype.createVisual=function(){var t=this.options,e=t.font,i=t.color,o=t.opacity,r=t.cursor,n=t.stroke,s=t.paintOrder;this.visual=new Xi(this.content,this.box.toRect().topLeft(),{font:e,fill:{color:i,opacity:o},cursor:r,stroke:n,paintOrder:s})},e}(Li);te(Yi,{font:x,color:u});const qi=Yi;function Zi(t){var e=t.origin,i=t.bottomRight();return new wi(e.x,e.y,i.x,i.y)}var Qi=/\n/m,Ki=function(t){function e(e,i,o){t.call(this,i),this.content=e,this.data=o,this._initContainer(),!1!==this.options._autoReflow&&this.reflow(new wi)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._initContainer=function(){var t=this.options,e=String(this.content).split(Qi),i=new Wi({vertical:!0,align:t.align,wrap:!1}),o=at({},t,{opacity:1,animation:null});this.container=i,this.append(i);for(var r=0;r<e.length;r++){var n=new qi(e[r].trim(),o);i.append(n)}},e.prototype.reflow=function(e){var i=this.options,o=i.visual;if(this.container.options.align=i.align,o&&!this._boxReflow){var r=e;r.hasSize()||(this._boxReflow=!0,this.reflow(r),this._boxReflow=!1,r=this.box);var n=this.visual=o(this.visualContext(r));n&&(r=Zi(n.clippedBBox()||new q.geometry.Rect),n.options.zIndex=i.zIndex),this.box=this.contentBox=this.paddingBox=r}else if(t.prototype.reflow.call(this,e),i.rotation){var s=dt(i.margin),a=this.box.unpad(s);this.targetBox=e,this.normalBox=a.clone(),(a=this.rotate()).translate(s.left-s.right,s.top-s.bottom),this.rotatedBox=a.clone(),a.pad(s)}},e.prototype.createVisual=function(){var t=this.options;if(this.visual=new q.drawing.Group({transform:this.rotationTransform(),zIndex:t.zIndex,noclip:t.noclip}),this.hasBox()){var e=q.drawing.Path.fromRect(this.paddingBox.toRect(),this.visualStyle());this.visual.append(e)}},e.prototype.renderVisual=function(){if(this.options.visible)if(this.options.visual){var e=this.visual;e&&!jt(e.options.noclip)&&(e.options.noclip=this.options.noclip),this.addVisual(),this.createAnimation()}else t.prototype.renderVisual.call(this)},e.prototype.visualContext=function(t){var e=this,i={text:this.content,rect:t.toRect(),sender:this.getSender(),options:this.options,createVisual:function(){return e._boxReflow=!0,e.reflow(t),e._boxReflow=!1,e.getDefaultVisual()}};return this.data&&Object.assign(i,this.data),i},e.prototype.getDefaultVisual=function(){this.createVisual(),this.renderChildren();var t=this.visual;return delete this.visual,t},e.prototype.rotate=function(){var t=this.options;return this.box.rotate(t.rotation),this.align(this.targetBox,F,t.align),this.align(this.targetBox,H,t.vAlign),this.box},e.prototype.rotationTransform=function(){var t=this.options.rotation;if(!t)return null;var e=this.normalBox.center(),i=e.x,o=e.y,r=this.rotatedBox.center();return q.geometry.transform().translate(r.x-i,r.y-o).rotate(t,[i,o])},e}(Ri);const $i=Ki;var Ji=function(t){function e(e){t.call(this,e),this._textBox=new $i(this.options.text,Object.assign({},this.options,{vAlign:this.options.position})),this.append(this._textBox)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reflow=function(e){t.prototype.reflow.call(this,e),this.box.snapTo(e,F)},e.buildTitle=function(t,i){var o,r=t;return"string"==typeof t&&(r={text:t}),(r=Object.assign({visible:!0},i,r))&&r.visible&&r.text&&(o=new e(r)),o},e.orderTitles=function(t){var e=[].concat(t),i=e.filter((function(t){return t&&t.options.position!==d})),o=e.filter((function(t){return t&&t.options.position===d}));return to(i),to(o),o.reverse(),i.concat(o)},e}(Li);function to(t){for(var e=1;e<t.length;e++){var i=t[e]._textBox,o=t[e-1]._textBox;o.options.margin=Object.assign(dt(o.options.margin),{bottom:0}),i.options.margin=Object.assign(dt(i.options.margin),{top:0})}}te(Ji,{color:u,position:V,align:f,margin:dt(5),padding:dt(5)});const eo=Ji;var io=function(t){function e(e,i,o,r,n){t.call(this,i,n),this.text=i,this.value=e,this.index=o,this.dataItem=r,this.reflow(new wi)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.visualContext=function(e){var i=t.prototype.visualContext.call(this,e);return i.value=this.value,i.dataItem=this.dataItem,i.format=this.options.format,i.culture=this.options.culture,i},e.prototype.click=function(t,e){t.trigger("axisLabelClick",{element:Ut(e),value:this.value,text:this.text,index:this.index,dataItem:this.dataItem,axis:this.parent.options})},e.prototype.rotate=function(){if(this.options.alignRotation!==f){var e=this.normalBox.toRect(),i=this.rotationTransform();this.box=Zi(e.bbox(i.matrix()))}else t.prototype.rotate.call(this);return this.box},e.prototype.rotationTransform=function(){var e=this.options,i=e.rotation;if(!i)return null;if(e.alignRotation===f)return t.prototype.rotationTransform.call(this);var o=q.geometry.transform().rotate(i).matrix(),r=this.normalBox.toRect(),n=this.targetBox.toRect(),s=e.rotationOrigin||V,a=s===V||s===d?F:H,p=s===V||s===d?H:F,l=s===V||s===C?n.origin:n.bottomRight(),h=r.topLeft().transformCopy(o),c=r.topRight().transformCopy(o),u=r.bottomRight().transformCopy(o),g=r.bottomLeft().transformCopy(o),y=q.geometry.Rect.fromPoints(h,c,u,g),v={};v[p]=n.origin[p]-y.origin[p];var m,x,_=Math.abs(h[p]+v[p]-l[p]),w=Math.abs(c[p]+v[p]-l[p]);Zt(_,b)===Zt(w,b)?(m=h,x=c):w<_?(m=c,x=u):(m=h,x=g);var k=m[a]+(x[a]-m[a])/2;return v[a]=n.center()[a]-k,q.geometry.transform().translate(v.x,v.y).rotate(i)},e}($i);te(io,{_autoReflow:!1});const oo=io;var ro=function(t){function e(e,i,o){t.call(this,i),this.fields=e,this.chartService=o,this.render()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.hide=function(){this.options.visible=!1},e.prototype.show=function(){this.options.visible=!0},e.prototype.render=function(){var t=this,e=this.options;if(e.visible){var i,o,r=e.label,n=e.icon,s=new wi,a=function(){return t},p=n.size,l=this.fields.text;if(jt(r)&&r.visible){var h=vt(r);h?l=h(this.fields):r.format&&(l=this.chartService.format.auto(r.format,l)),r.color||(r.color=r.position===A?"#fff":n.background),this.label=new $i(l,at({},r)),this.label.aliasFor=a,r.position!==A||jt(p)||(n.type===g?p=Math.max(this.label.box.width(),this.label.box.height()):(i=this.label.box.width(),o=this.label.box.height()),s.wrap(this.label.box))}n.width=i||p||7,n.height=o||p||7;var c=new ji(at({},n));c.aliasFor=a,this.marker=c,this.append(c),this.label&&this.append(this.label),c.reflow(new wi),this.wrapperBox=s.wrap(c.box)}},e.prototype.reflow=function(t){var e,i,o,r=this,n=r.options,s=r.label,a=r.marker,p=r.wrapperBox,l=t.center(),h=n.line.length,c=n.position;n.visible&&(Ct(c,[C,B])?c===C?(o=p.alignTo(t,c).translate(-h,t.center().y-p.center().y),n.line.visible&&(e=[t.x1,l.y],this.linePoints=[e,[o.x2,l.y]],i=o.clone().wrapPoint(e))):(o=p.alignTo(t,c).translate(h,t.center().y-p.center().y),n.line.visible&&(e=[t.x2,l.y],this.linePoints=[e,[o.x1,l.y]],i=o.clone().wrapPoint(e))):c===d?(o=p.alignTo(t,c).translate(t.center().x-p.center().x,h),n.line.visible&&(e=[l.x,t.y2],this.linePoints=[e,[l.x,o.y1]],i=o.clone().wrapPoint(e))):(o=p.alignTo(t,c).translate(t.center().x-p.center().x,-h),n.line.visible&&(e=[l.x,t.y1],this.linePoints=[e,[l.x,o.y2]],i=o.clone().wrapPoint(e))),a&&a.reflow(o),s&&(s.reflow(o),a&&(n.label.position===L&&s.box.alignTo(a.box,c),s.reflow(s.box))),this.contentBox=o,this.targetBox=t,this.box=i||o)},e.prototype.createVisual=function(){t.prototype.createVisual.call(this),this.visual.options.noclip=this.options.noclip,this.options.visible&&this.createLine()},e.prototype.renderVisual=function(){var e=this,i=this.options,o=i.visual;i.visible&&o?(this.visual=o(Object.assign(this.fields,{sender:this.getSender(),rect:this.targetBox.toRect(),options:{background:i.background,border:i.background,icon:i.icon,label:i.label,line:i.line,position:i.position,visible:i.visible},createVisual:function(){e.createVisual(),e.renderChildren();var t=e.visual;return delete e.visual,t}})),this.addVisual()):t.prototype.renderVisual.call(this)},e.prototype.createLine=function(){var t=this.options.line;if(this.linePoints){var e=q.drawing.Path.fromPoints(this.linePoints,{stroke:{color:t.color,width:t.width,dashType:t.dashType}});Z(e),this.visual.append(e)}},e.prototype.click=function(t,e){var i=this.eventArgs(e);t.trigger("noteClick",i)||e.preventDefault()},e.prototype.over=function(t,e){var i=this.eventArgs(e);t.trigger("noteHover",i)||e.preventDefault()},e.prototype.out=function(t,e){var i=this.eventArgs(e);t.trigger("noteLeave",i)},e.prototype.eventArgs=function(t){var e=this.options;return Object.assign(this.fields,{element:Ut(t),text:jt(e.label)?e.label.text:"",visual:this.visual})},e}(Ri);te(ro,{icon:{visible:!0,type:g},label:{position:A,visible:!0,align:f,vAlign:f},line:{visible:!0},visible:!0,position:V,zIndex:2});const no=ro;var so={format:function(t,e){return e},toString:function(t){return t},parseDate:function(t){return new Date(t)},firstDay:function(){return 0}},ao=so,po=function(){},lo={implementation:{configurable:!0}};po.register=function(t){ao=t},lo.implementation.get=function(){return ao},Object.defineProperties(po,lo);const ho=po;var co=/\{(\d+)(:[^\}]+)?\}/g,uo=function(t){this._intlService=t},fo={intl:{configurable:!0}};fo.intl.get=function(){return this._intlService||ho.implementation},fo.intl.set=function(t){this._intlService=t},uo.prototype.auto=function(t){for(var e=[],i=arguments.length-1;i-- >0;)e[i]=arguments[i+1];var o=this.intl;return $(t)&&t.match(w)?o.format.apply(o,[t].concat(e)):o.toString(e[0],t)},uo.prototype.localeAuto=function(t,e,i){var o,r=this.intl;return o=$(t)&&t.match(w)?t.replace(co,(function(t,o,n){var s=e[parseInt(o,10)];return r.toString(s,n?n.substring(1):"",i)})):r.toString(e[0],t,i),o},Object.defineProperties(uo.prototype,fo);const go=uo;var yo=function(t,e){void 0===e&&(e={}),this._intlService=e.intlService,this.sender=e.sender||t,this.format=new go(e.intlService),this.chart=t,this.rtl=Boolean(e.rtl)},vo={intl:{configurable:!0}};vo.intl.get=function(){return this._intlService||ho.implementation},vo.intl.set=function(t){this._intlService=t,this.format.intl=t},yo.prototype.notify=function(t,e){this.chart&&this.chart.trigger(t,e)},yo.prototype.isPannable=function(t){var e=((this.chart||{}).options||{}).pannable;return e&&e.lock!==t},Object.defineProperties(yo.prototype,vo);const mo=yo;var xo,bo=function(){};bo.register=function(t){xo=t},bo.create=function(t,e){return xo?xo.create(t,e):new yi(t,Object.assign({},{multiTouch:!0,touchAction:"manipulation"},e))};const _o=bo;function wo(t,e){var i=t.tickX,o=t.tickY,r=t.position,n=new q.drawing.Path({stroke:{width:e.width,color:e.color}});return t.vertical?n.moveTo(i,r).lineTo(i+e.size,r):n.moveTo(r,o).lineTo(r,o+e.size),Z(n),n}function ko(t,e){var i=t.lineStart,o=t.lineEnd,r=t.position,n=new q.drawing.Path({stroke:{width:e.width,color:e.color,dashType:e.dashType}});return t.vertical?n.moveTo(i,r).lineTo(o,r):n.moveTo(r,i).lineTo(r,o),Z(n),n}var Ao=function(t){function e(e,i){void 0===i&&(i=new mo),t.call(this,e),this.chartService=i,this.options.visible||(this.options=at({},this.options,{labels:{visible:!1},line:{visible:!1},margin:0,majorTickSize:0,minorTickSize:0})),this.options.minorTicks=at({},{color:this.options.line.color,width:this.options.line.width,visible:this.options.minorTickType!==M},this.options.minorTicks,{size:this.options.minorTickSize,align:this.options.minorTickType}),this.options.majorTicks=at({},{color:this.options.line.color,width:this.options.line.width,visible:this.options.majorTickType!==M},this.options.majorTicks,{size:this.options.majorTickSize,align:this.options.majorTickType}),this.initFields(),this.options._deferLabels||this.createLabels(),this.createTitle(),this.createNotes()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initFields=function(){},e.prototype.labelsRange=function(){return{min:this.options.labels.skip,max:this.labelsCount()}},e.prototype.normalizeLabelRotation=function(t){var e=t.rotation;pt(e)&&(t.alignRotation=e.align,t.rotation=e.angle)},e.prototype.createLabels=function(){var t=this.options,e=t.vertical?B:f,i=at({},t.labels,{align:e,zIndex:t.zIndex}),o=Math.max(1,i.step);if(this.clearLabels(),i.visible){this.normalizeLabelRotation(i),"auto"===i.rotation&&(i.rotation=0,t.autoRotateLabels=!0);for(var r=this.labelsRange(),n=r.min;n<r.max;n+=o){var s={index:n,count:r.max},a=this.createAxisLabel(n,i,s);a&&(this.append(a),this.labels.push(a))}}},e.prototype.clearLabels=function(){this.children=wt(this.children,(function(t){return!(t instanceof oo)})),this.labels=[]},e.prototype.clearTitle=function(){var t=this;this.title&&(this.children=wt(this.children,(function(e){return e!==t.title})),this.title=void 0)},e.prototype.clear=function(){this.clearLabels(),this.clearTitle()},e.prototype.lineBox=function(){var t=this.options,e=this.box,i=t.vertical,o=t.labels.mirror,r=o?e.x1:e.x2,n=o?e.y2:e.y1,s=t.line.width||0;return i?new wi(r,e.y1,r,e.y2-s):new wi(e.x1,n,e.x2-s,n)},e.prototype.createTitle=function(){var t=this.options,e=at({rotation:t.vertical?-90:0,text:"",zIndex:1,visualSize:!0},t.title);if(e.visible&&e.text){var i=new $i(e.text,e);this.append(i),this.title=i}},e.prototype.createNotes=function(){var t=this.options,e=t.notes,i=e.data||[];this.notes=[];for(var o=0;o<i.length;o++){var r=at({},e,i[o]);r.value=this.parseNoteValue(r.value);var n=new no({value:r.value,text:r.label.text,dataItem:r},r,this.chartService);n.options.visible&&(jt(n.options.position)?t.vertical&&!Ct(n.options.position,[C,B])?n.options.position=t.reverse?C:B:t.vertical||Ct(n.options.position,[V,d])||(n.options.position=t.reverse?d:V):t.vertical?n.options.position=t.reverse?C:B:n.options.position=t.reverse?d:V,this.append(n),this.notes.push(n))}},e.prototype.parseNoteValue=function(t){return t},e.prototype.renderVisual=function(){t.prototype.renderVisual.call(this),this.createPlotBands()},e.prototype.createVisual=function(){t.prototype.createVisual.call(this),this.createBackground(),this.createLine()},e.prototype.gridLinesVisual=function(){var t=this._gridLines;return t||(t=this._gridLines=new q.drawing.Group({zIndex:-2}),this.appendVisual(this._gridLines)),t},e.prototype.createTicks=function(t){var e=this.options,i=this.lineBox(),o=e.labels.mirror,r=e.majorTicks.visible?e.majorUnit:0,n={vertical:e.vertical};function s(e,r,s){var a=e.length,p=Math.max(1,r.step);if(r.visible)for(var l=r.skip;l<a;l+=p)jt(s)&&l%s==0||(n.tickX=o?i.x2:i.x2-r.size,n.tickY=o?i.y1-r.size:i.y1,n.position=e[l],t.append(wo(n,r)))}s(this.getMajorTickPositions(),e.majorTicks),s(this.getMinorTickPositions(),e.minorTicks,r/e.minorUnit)},e.prototype.createLine=function(){var t=this.options,e=t.line,i=this.lineBox();if(e.width>0&&e.visible){var o=new q.drawing.Path({stroke:{width:e.width,color:e.color,dashType:e.dashType}});o.moveTo(i.x1,i.y1).lineTo(i.x2,i.y2),t._alignLines&&Z(o);var r=this._lineGroup=new q.drawing.Group;r.append(o),this.visual.append(r),this.createTicks(r)}},e.prototype.getActualTickSize=function(){var t=this.options,e=0;return t.majorTicks.visible&&t.minorTicks.visible?e=Math.max(t.majorTicks.size,t.minorTicks.size):t.majorTicks.visible?e=t.majorTicks.size:t.minorTicks.visible&&(e=t.minorTicks.size),e},e.prototype.createBackground=function(){var t=this.options,e=this.box,i=t.background;i&&(this._backgroundPath=q.drawing.Path.fromRect(e.toRect(),{fill:{color:i},stroke:null}),this.visual.append(this._backgroundPath))},e.prototype.createPlotBands=function(){var t=this,e=this.options,i=e.plotBands||[],o=e.vertical,r=this.plotArea;if(0!==i.length){for(var n=this._plotbandGroup=new q.drawing.Group({zIndex:-1}),s=wt(this.pane.axes,(function(e){return e.options.vertical!==t.options.vertical}))[0],a=0;a<i.length;a++){var p=i[a],l=void 0,h=void 0,c=p.label,u=void 0;if(o?(l=(s||r.axisX).lineBox(),h=this.getSlot(p.from,p.to,!0)):(l=this.getSlot(p.from,p.to,!0),h=(s||r.axisY).lineBox()),c&&(c.vAlign=c.position||C,u=this.createPlotBandLabel(c,p,new wi(l.x1,h.y1,l.x2,h.y2))),0!==l.width()&&0!==h.height()){var d=new q.geometry.Rect([l.x1,h.y1],[l.width(),h.height()]),f=q.drawing.Path.fromRect(d,{fill:{color:p.color,opacity:p.opacity},stroke:null});n.append(f),u&&n.append(u)}}this.appendVisual(n)}},e.prototype.createPlotBandLabel=function(t,e,i){if(!1===t.visible)return null;var o,r=t.text;if(jt(t)&&t.visible){var n=vt(t);n?r=n({text:r,item:e}):t.format&&(r=this.chartService.format.auto(t.format,r)),t.color||(t.color=this.options.labels.color)}return(o=new $i(r,t)).reflow(i),o.renderVisual(),o.visual},e.prototype.createGridLines=function(t){var e=this.options,i=e.minorGridLines,o=e.majorGridLines,r=e.minorUnit,n=e.vertical,s=t.options.line.visible,a=o.visible?e.majorUnit:0,p=t.lineBox(),l=p[n?"y1":"x1"],h={lineStart:p[n?"x1":"y1"],lineEnd:p[n?"x2":"y2"],vertical:n},c=[],u=this.gridLinesVisual();function d(t,e,i){var o=t.length,r=Math.max(1,e.step);if(e.visible)for(var n=e.skip;n<o;n+=r){var a=Zt(t[n]);Ct(a,c)||n%i==0||s&&l===a||(h.position=a,u.append(ko(h,e)),c.push(a))}}return d(this.getMajorTickPositions(),o),d(this.getMinorTickPositions(),i,a/r),u.children},e.prototype.reflow=function(t){for(var e=this,i=e.options,o=e.labels,r=e.title,n=i.vertical,s=o.length,a=n?D:k,p=r?r.box[a]():0,l=this.getActualTickSize()+i.margin+p,h=((this.getRoot()||{}).box||t)[a](),c=0,u=0;u<s;u++){var d=o[u].box[a]();d+l<=h&&(c=Math.max(c,d))}this.box=n?new wi(t.x1,t.y1,t.x1+c+l,t.y2):new wi(t.x1,t.y1,t.x2,t.y1+c+l),this.arrangeTitle(),this.arrangeLabels(),this.arrangeNotes()},e.prototype.getLabelsTickPositions=function(){return this.getMajorTickPositions()},e.prototype.labelTickIndex=function(t){return t.index},e.prototype.arrangeLabels=function(){for(var t=this.options,e=this.labels,i=this.labelsBetweenTicks(),o=t.vertical,r=t.labels.mirror,n=this.getLabelsTickPositions(),s=0;s<e.length;s++){var a=e[s],p=this.labelTickIndex(a),l=o?a.box.height():a.box.width(),h=n[p],c=n[p+1],u=void 0,d=void 0;o?d=u=i?h+(c-h)/2-l/2:h-l/2:i?(u=h,d=c):d=(u=h-l/2)+l,this.positionLabel(a,r,u,d)}},e.prototype.positionLabel=function(t,e,i,o){void 0===o&&(o=i);var r,n=this.options,s=n.vertical,a=this.lineBox(),p=this.getActualTickSize()+n.margin;if(s){var l=a.x2;e?(l+=p,t.options.rotationOrigin=C):(l-=p+t.box.width(),t.options.rotationOrigin=B),r=t.box.move(l,i)}else{var h=a.y1;e?(h-=p+t.box.height(),t.options.rotationOrigin=d):(h+=p,t.options.rotationOrigin=V),r=new wi(i,h,o,h+t.box.height())}t.reflow(r)},e.prototype.autoRotateLabelAngle=function(t,e){return t.width()<e?0:t.height()>e?-90:-45},e.prototype.autoRotateLabels=function(){if(!this.options.autoRotateLabels||this.options.vertical)return!1;for(var t=this.getMajorTickPositions(),e=this.labels,i=Math.min(e.length,t.length-1),o=0,r=0;r<i;r++){var n=Math.abs(t[r+1]-t[r]),s=e[r].box,a=this.autoRotateLabelAngle(s,n);if(0!==a&&(o=a),-90===o)break}if(0!==o){for(var p=0;p<e.length;p++)e[p].options.rotation=o,e[p].reflow(new wi);return!0}},e.prototype.arrangeTitle=function(){var t=this.options,e=this.title,i=t.labels.mirror,o=t.vertical;e&&(o?(e.options.align=i?B:C,e.options.vAlign=e.options.position):(e.options.align=e.options.position,e.options.vAlign=i?V:d),e.reflow(this.box))},e.prototype.arrangeNotes=function(){for(var t=0;t<this.notes.length;t++){var e=this.notes[t],i=e.options.value,o=void 0;jt(i)?(this.shouldRenderNote(i)?e.show():e.hide(),o=this.noteSlot(i)):e.hide(),e.reflow(o||this.lineBox())}},e.prototype.noteSlot=function(t){return this.getSlot(t)},e.prototype.alignTo=function(t){var e=t.lineBox(),i=this.options.vertical,o=i?H:F;this.box.snapTo(e,o),i?this.box.shrink(0,this.lineBox().height()-e.height()):this.box.shrink(this.lineBox().width()-e.width(),0),this.box[o+1]-=this.lineBox()[o+1]-e[o+1],this.box[o+2]-=this.lineBox()[o+2]-e[o+2]},e.prototype.axisLabelText=function(t,e,i){var o=this,r=vt(e),n=function(){return e.format?o.chartService.format.localeAuto(e.format,[t],e.culture):t};return r?r(Object.assign({},i,{get text(){return n()},value:t,format:e.format,culture:e.culture})):n()},e.prototype.slot=function(t,e,i){var o=this.getSlot(t,e,i);if(o)return o.toRect()},e.prototype.contentBox=function(){var t=this.box.clone(),e=this.labels;if(e.length){var i=this.options.vertical?H:F;if(this.chartService.isPannable(i)){var o=this.maxLabelOffset();t[i+1]-=o.start,t[i+2]+=o.end}else{e[0].options.visible&&t.wrap(e[0].box);var r=e[e.length-1];r.options.visible&&t.wrap(r.box)}}return t},e.prototype.maxLabelOffset=function(){for(var t=this.options,e=t.vertical,i=t.reverse,o=this.labelsBetweenTicks(),r=this.getLabelsTickPositions(),n=e?H:F,s=this.labels,a=i?1:0,p=i?0:1,l=0,h=0,c=0;c<s.length;c++){var u=s[c],d=this.labelTickIndex(u),f=void 0,g=void 0;o?(f=r[d+a],g=r[d+p]):f=g=r[d],l=Math.max(l,f-u.box[n+1]),h=Math.max(h,u.box[n+2]-g)}return{start:l,end:h}},e.prototype.limitRange=function(t,e,i,o,r){var n=this.options;if(t<i&&r<0&&(!jt(n.min)||n.min<=i)||o<e&&r>0&&(!jt(n.max)||o<=n.max))return null;if(e<i&&r>0||o<t&&r<0)return{min:t,max:e};var s=e-t,a=t,p=e;return t<i&&r<0?(a=Xt(t,i,o),p=Xt(t+s,i+s,o)):e>o&&r>0&&(p=Xt(e,i,o),a=Xt(e-s,i,o-s)),{min:a,max:p}},e.prototype.valueRange=function(){return{min:this.seriesMin,max:this.seriesMax}},e.prototype.lineDir=function(){var t=this.options;return(t.vertical?-1:1)*(t.reverse?-1:1)},e.prototype.lineInfo=function(){var t=this.options.vertical,e=this.lineBox(),i=t?e.height():e.width(),o=t?H:F,r=this.lineDir(),n=o+(1===r?1:2).toString();return{axis:o,axisOrigin:n,axisDir:r,lineBox:e,lineSize:i,lineStart:e[n]}},e.prototype.pointOffset=function(t){var e=this.lineInfo(),i=e.axis,o=e.axisDir,r=e.axisOrigin,n=e.lineBox,s=e.lineSize;return(o>0?t[i]-n[r]:n[r]-t[i])/s},e.prototype.scaleToDelta=function(t,e){var i=Xt(t,-.999,.999);return i>0?e*Math.min(1,i):e-e/(1+i)},e.prototype.labelsBetweenTicks=function(){return!this.options.justified},e.prototype.prepareUserOptions=function(){},e}(Li);te(Ao,{labels:{visible:!0,rotation:0,mirror:!1,step:1,skip:0},line:{width:1,color:u,visible:!0},title:{visible:!0,position:f},majorTicks:{align:L,size:4,skip:0,step:1},minorTicks:{align:L,size:3,skip:0,step:1},axisCrossingValue:0,majorTickType:L,minorTickType:M,majorGridLines:{skip:0,step:1},minorGridLines:{visible:!1,width:1,color:u,skip:0,step:1},margin:5,visible:!0,reverse:!1,justified:!0,notes:{label:{text:""}},_alignLines:!0,_deferLabels:!1});const So=Ao;var Co="milliseconds",Po="seconds",To="minutes",Mo="hours",Oo="days",Lo="weeks",Bo="months",Io="years",Eo=6e4,Ro=36e5,Vo=864e5,zo=6048e5,jo=26784e5,Do=31536e6,Fo={years:Do,months:jo,weeks:zo,days:Vo,hours:Ro,minutes:Eo,seconds:1e3,milliseconds:1};function Ho(t,e){return t.getTime()-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Eo}function No(t,e){return new Date(t.getTime()+e)}function Uo(t){var e;return t instanceof Date?e=t:t&&(e=new Date(t)),e}function Go(t,e){return 0===e&&23===t.getHours()&&(t.setHours(t.getHours()+2),!0)}function Wo(t,e,i,o){var r=t;if(t){var n=Uo(t),s=n.getHours();i===Io?Go(r=new Date(n.getFullYear()+e,0,1),0):i===Bo?Go(r=new Date(n.getFullYear(),n.getMonth()+e,1),s):i===Lo?(r=Wo(function(t,e){void 0===e&&(e=0);var i=0,o=t.getDay();if(!isNaN(o))for(;o!==e;)0===o?o=6:o--,i++;return No(t,-i*Vo)}(n,o),7*e,Oo),Go(r,s)):i===Oo?Go(r=new Date(n.getFullYear(),n.getMonth(),n.getDate()+e),s):i===Mo?r=function(t,e){var i=new Date(t);i.setMinutes(0,0,0);var o=(t.getTimezoneOffset()-i.getTimezoneOffset())*Eo;return No(i,o+e*Ro)}(n,e):i===To?(r=No(n,e*Eo)).getSeconds()>0&&r.setSeconds(0):i===Po?r=No(n,1e3*e):i===Co&&(r=No(n,e)),i!==Co&&r.getMilliseconds()>0&&r.setMilliseconds(0)}return r}function Xo(t,e,i){return Wo(Uo(t),0,e,i)}function Yo(t,e,i){var o=Uo(t);return o&&Xo(o,e,i).getTime()===o.getTime()?o:Wo(o,1,e,i)}function qo(t,e){return t&&e?t.getTime()-e.getTime():-1}function Zo(t,e){return t.getTime()-e}function Qo(t){if(G(t)){for(var e=[],i=0;i<t.length;i++)e.push(Qo(t[i]));return e}if(t)return Uo(t).getTime()}function Ko(t,e){return t&&e?Qo(t)===Qo(e):t===e}function $o(t,e,i){return Ho(t,e)/Fo[i]}function Jo(t,e,i,o){var r=Uo(t),n=Uo(e);return(i===Bo?r.getMonth()-n.getMonth()+12*(r.getFullYear()-n.getFullYear())+$o(r,new Date(r.getFullYear(),r.getMonth()),Oo)/new Date(r.getFullYear(),r.getMonth()+1,0).getDate():i===Io?r.getFullYear()-n.getFullYear()+Jo(r,new Date(r.getFullYear(),0),Bo,1)/12:i===Oo||i===Lo?$o(r,n,i):Zo(r,e)/Fo[i])/o}function tr(t,e,i){return i===Io?e.getFullYear()-t.getFullYear():i===Bo?12*tr(t,e,Io)+e.getMonth()-t.getMonth():i===Oo?Math.floor(Zo(e,t)/Vo):Math.floor(Zo(e,t)/Fo[i])}function er(t,e){return $(e)&&t.parseDate(e)||Uo(e)}function ir(t,e){if(G(e)){for(var i=[],o=0;o<e.length;o++)i.push(er(t,e[o]));return i}return er(t,e)}function or(t,e){return K(t.weekStartDay)?t.weekStartDay:e&&e.firstDay?e.firstDay():0}var rr=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initFields=function(){this._ticks={}},e.prototype.categoriesHash=function(){return""},e.prototype.clone=function(){var t=new e(Object.assign({},this.options,{categories:this.options.srcCategories}),this.chartService);return t.createLabels(),t},e.prototype.initUserOptions=function(t){var e=t.categories||[],i=void 0!==t.min,o=void 0!==t.max;if(t.srcCategories=t.categories=e,(i||o)&&e.length){var r,n=i?Math.floor(t.min):0;r=o?t.justified?Math.floor(t.max)+1:Math.ceil(t.max):e.length,t.categories=t.categories.slice(n,r)}return t},e.prototype.rangeIndices=function(){var t=this.options,e=t.categories.length||1;return{min:K(t.min)?t.min%1:0,max:K(t.max)&&t.max%1!=0&&t.max<this.totalRange().max?e-(1-t.max%1):e-(t.justified?1:0)}},e.prototype.range=function(){var t=this.options;return{min:K(t.min)?t.min:0,max:K(t.max)?t.max:this.totalRange().max}},e.prototype.roundedRange=function(){return this.range()},e.prototype.totalRange=function(){var t=this.options;return{min:0,max:Math.max(this._seriesMax||0,t.srcCategories.length)-(t.justified?1:0)}},e.prototype.scaleOptions=function(){var t=this.rangeIndices(),e=t.min,i=t.max,o=this.lineBox();return{scale:(this.options.vertical?o.height():o.width())/(i-e||1)*(this.options.reverse?-1:1),box:o,min:e,max:i}},e.prototype.arrangeLabels=function(){t.prototype.arrangeLabels.call(this),this.hideOutOfRangeLabels()},e.prototype.hideOutOfRangeLabels=function(){var t=this.box,e=this.labels;if(e.length>0){var i=this.options.vertical?H:F,o=t[i+1],r=t[i+2],n=e[0],s=Wt(e);(n.box[i+1]>r||n.box[i+2]<o)&&(n.options.visible=!1),(s.box[i+1]>r||s.box[i+2]<o)&&(s.options.visible=!1)}},e.prototype.getMajorTickPositions=function(){return this.getTicks().majorTicks},e.prototype.getMinorTickPositions=function(){return this.getTicks().minorTicks},e.prototype.getLabelsTickPositions=function(){return this.getTicks().labelTicks},e.prototype.tickIndices=function(t){for(var e=this.rangeIndices(),i=e.min,o=e.max,r=Math.ceil(o),n=Math.floor(i),s=[];n<=r;)s.push(n),n+=t;return s},e.prototype.getTickPositions=function(t){for(var e=this.options,i=e.vertical,o=e.reverse,r=this.scaleOptions(),n=r.scale,s=r.box,a=r.min,p=s[(i?H:F)+(o?2:1)],l=this.tickIndices(t),h=[],c=0;c<l.length;c++)h.push(p+Zt(n*(l[c]-a),y));return h},e.prototype.getTicks=function(){var t=this.options,e=this._ticks,i=this.rangeIndices(),o=this.lineBox(),r=o.getHash()+i.min+","+i.max+t.reverse+t.justified;if(e._hash!==r){var n=t.minorTicks.visible||t.minorGridLines.visible;e._hash=r,e.labelTicks=this.getTickPositions(1),e.majorTicks=this.filterOutOfRangePositions(e.labelTicks,o),e.minorTicks=n?this.filterOutOfRangePositions(this.getTickPositions(.5),o):[]}return e},e.prototype.filterOutOfRangePositions=function(t,e){if(!t.length)return t;for(var i=this.options.vertical?H:F,o=function(t){return e[i+1]<=t&&t<=e[i+2]},r=t.length-1,n=0;!o(t[n])&&n<=r;)n++;for(var s=r;!o(t[s])&&s>=0;)s--;return t.slice(n,s+1)},e.prototype.lineInfo=function(){var t=this.options,e=t.vertical,i=t.reverse,o=this.lineBox(),r=e?o.height():o.width(),n=e?H:F,s=i?-1:1,a=n+(1===s?1:2).toString();return{axis:n,axisOrigin:a,axisDir:s,lineBox:o,lineSize:r,lineStart:o[a]}},e.prototype.lineDir=function(){return this.options.reverse?-1:1},e.prototype.getSlot=function(t,e,i){var o=this.options,r=o.reverse,n=o.justified,s=this.scaleOptions(),a=s.scale,p=s.box,l=s.min,h=this.lineInfo(),c=h.axis,u=h.lineStart,d=p.clone(),f=void 0===e,g=Kt(t,0),y=Kt(e,g);y=Math.max(y-1,g);var v=u+(g-l)*a,m=u+((y=Math.max(g,y))+1-l)*a;return f&&n&&(m=v),i&&(v=Xt(v,p[c+1],p[c+2]),m=Xt(m,p[c+1],p[c+2])),d[c+1]=r?m:v,d[c+2]=r?v:m,d},e.prototype.limitSlot=function(t){var e=this.options.vertical?H:F,i=this.lineBox(),o=t.clone();return o[e+1]=Xt(t[e+1],i[e+1],i[e+2]),o[e+2]=Xt(t[e+2],i[e+1],i[e+2]),o},e.prototype.slot=function(e,i,o){var r=Math.floor(this.options.min||0),n=e,s=i;return"string"==typeof n?n=this.categoryIndex(n):K(n)&&(n-=r),"string"==typeof s?s=this.categoryIndex(s):K(s)&&(s-=r),t.prototype.slot.call(this,n,s,o)},e.prototype.pointCategoryIndex=function(t){var e=this.options,i=e.reverse,o=e.justified,r=e.vertical?H:F,n=this.scaleOptions(),s=n.scale,a=n.box,p=n.min,l=n.max,h=i?l:p,c=a[r+1],u=a[r+2],d=t[r];if(d<c||d>u)return null;var f=h+(d-c)/s,g=f%1;return o?f=Math.round(f):0===g&&f>0&&f--,Math.floor(f)},e.prototype.getCategory=function(t){var e=this.pointCategoryIndex(t);return null===e?null:this.options.categories[e]},e.prototype.categoryIndex=function(t){return this.totalIndex(t)-Math.floor(this.options.min||0)},e.prototype.categoryAt=function(t,e){var i=this.options;return(e?i.srcCategories:i.categories)[t]},e.prototype.categoriesCount=function(){return(this.options.categories||[]).length},e.prototype.translateRange=function(t){var e=this.options,i=this.lineBox(),o=e.vertical?i.height():i.width(),r=e.categories.length,n=Zt(t/(o/r),b);return{min:n,max:r+n}},e.prototype.scaleRange=function(t,e){var i=Math.abs(this.pointOffset(e)),o=this.limitedRangeIndices(),r=o.max-o.min,n=this.scaleToDelta(t,r),s=i*n,a=(1-i)*n,p=o.min+s,l=o.max-a;return l-p<.1&&(l=p+.1),{min:p,max:l}},e.prototype.zoomRange=function(t,e){var i=this.totalRange(),o=i.min,r=i.max,n=this.scaleRange(t,e);return{min:Xt(n.min,o,r),max:Xt(n.max,o,r)}},e.prototype.labelsCount=function(){var t=this.labelsRange();return t.max-t.min},e.prototype.labelsRange=function(){var t=this.options,e=t.justified,i=t.labels,o=this.limitedRangeIndices(!0),r=o.min,n=o.max,s=Math.floor(r);return e?(r=Math.ceil(r),n=Math.floor(n)):(r=Math.floor(r),n=Math.ceil(n)),{min:(r>i.skip?i.skip+i.step*Math.ceil((r-i.skip)/i.step):i.skip)-s,max:(t.categories.length?n+(e?1:0):0)-s}},e.prototype.createAxisLabel=function(t,e,i){var o=this.options,r=o.dataItems?o.dataItems[t]:null,n=Kt(o.categories[t],"");i.dataItem=r;var s=this.axisLabelText(n,e,i);return new oo(n,s,t,r,e)},e.prototype.shouldRenderNote=function(t){var e=this.limitedRangeIndices();return Math.floor(e.min)<=t&&t<=Math.ceil(e.max)},e.prototype.noteSlot=function(t){var e=this.options,i=t-Math.floor(e.min||0);return this.getSlot(i)},e.prototype.arrangeNotes=function(){t.prototype.arrangeNotes.call(this),this.hideOutOfRangeNotes()},e.prototype.hideOutOfRangeNotes=function(){var t=this.notes,e=this.box;if(t&&t.length)for(var i=this.options.vertical?H:F,o=e[i+1],r=e[i+2],n=0;n<t.length;n++){var s=t[n];s.box&&(r<s.box[i+1]||s.box[i+2]<o)&&s.hide()}},e.prototype.pan=function(t){var e=this.limitedRangeIndices(!0),i=this.scaleOptions().scale,o=Zt(t/i,b),r=this.totalRange(),n=e.min+o,s=e.max+o;return this.limitRange(n,s,0,r.max,o)},e.prototype.pointsRange=function(t,e){var i=this.options,o=i.reverse,r=i.vertical?H:F,n=this.limitedRangeIndices(!0),s=this.scaleOptions(),a=s.scale,p=s.box[r+(o?2:1)],l=t[r]-p,h=e[r]-p,c=n.min+l/a,u=n.min+h/a,d=Math.min(c,u),f=Math.max(c,u);if(f-d>=.01)return{min:d,max:f}},e.prototype.valueRange=function(){return this.range()},e.prototype.totalIndex=function(t){var e=this.options,i=this._categoriesMap?this._categoriesMap.get(t):function(t,e){return t instanceof Date?e.findIndex((function(e){return Ko(e,t)})):e.indexOf(t)}(t,e.srcCategories);return i},e.prototype.currentRangeIndices=function(){var t=this.options,e=0;return K(t.min)&&(e=Math.floor(t.min)),{min:e,max:K(t.max)?t.justified?Math.floor(t.max):Math.ceil(t.max)-1:this.totalCount()-1}},e.prototype.limitedRangeIndices=function(t){var e,i=this.options,o=K(i.min)?i.min:0;if(e=K(i.max)?i.max:K(i.min)?o+i.categories.length:this.totalRange().max||1,t){var r=this.totalRange();o=Xt(o,0,r.max),e=Xt(e,0,r.max)}return{min:o,max:e}},e.prototype.totalRangeIndices=function(){return{min:0,max:this.totalRange().max||1}},e.prototype.indexCategories=function(){if(!this._categoriesMap)for(var t=this._categoriesMap=new St,e=this.options.srcCategories,i=0;i<e.length;i++)t.set(e[i],i)},e.prototype.totalCount=function(){return Math.max(this.options.srcCategories.length,this._seriesMax||0)},e}(So);te(rr,{type:"category",vertical:!1,majorGridLines:{visible:!1,width:1,color:u},labels:{zIndex:1},justified:!1,_deferLabels:!0});const nr=rr;var sr={milliseconds:"HH:mm:ss.fff",seconds:"HH:mm:ss",minutes:"HH:mm",hours:"HH:mm",days:"M/d",weeks:"M/d",months:"MMM 'yy",years:"yyyy"},ar=[Co,Po,To,Mo,Oo,Lo,Bo,Io],pr="fit";function lr(t,e){e&&(t._range=void 0);var i=t._range;return i||((i=t._range=pe(t)).min=Uo(i.min),i.max=Uo(i.max)),i}var hr=function(t){this.options=t};hr.prototype.displayIndices=function(){return{min:0,max:1}},hr.prototype.displayRange=function(){return{}},hr.prototype.total=function(){return{}},hr.prototype.valueRange=function(){return{}},hr.prototype.valueIndex=function(){return-1},hr.prototype.values=function(){return[]},hr.prototype.totalIndex=function(){return-1},hr.prototype.valuesCount=function(){return 0},hr.prototype.totalCount=function(){return 0},hr.prototype.dateAt=function(){return null};var cr=function(t,e,i){this.options=i,i.baseUnitStep=i.baseUnitStep||1;var o=i.roundToBaseUnit,r=i.justified;this.start=Wo(t,0,i.baseUnit,i.weekStartDay);var n=this.roundToTotalStep(e),s=!r&&Ko(e,n)&&!i.justifyEnd;this.end=this.roundToTotalStep(e,!r,s?1:0);var a=i.min||t;this.valueStart=this.roundToTotalStep(a),this.displayStart=o?this.valueStart:a;var p=i.max;if(p){var l=!r&&Ko(p,this.roundToTotalStep(p))?-1:0;this.valueEnd=this.roundToTotalStep(p,!1,l),this.displayEnd=o?this.roundToTotalStep(p,!r):i.max}else this.valueEnd=n,this.displayEnd=o||s?this.end:e;this.valueEnd<this.valueStart&&(this.valueEnd=this.valueStart),this.displayEnd<=this.displayStart&&(this.displayEnd=this.roundToTotalStep(this.displayStart,!1,1))};function ur(t,e,i){for(var o,r,n,s=lr(t.categories),a=(t.max||s.max)-(t.min||s.min),p=t.autoBaseUnitSteps,l=t.maxDateGroups,h=t.baseUnit===pr,c=e?ar.indexOf(e):0,u=h?ar[c++]:t.baseUnit,d=a/Fo[u],f=d;!r||d>=l;){o=o||p[u].slice(0);do{n=o.shift()}while(n&&e===u&&n<i);if(n)d=f/(r=n);else{if(u===Wt(ar)){r=Math.ceil(f/l);break}if(!h){d>l&&(r=Math.ceil(f/l));break}u=ar[c++]||Wt(ar),f=a/Fo[u],o=null}}t.baseUnitStep=r,t.baseUnit=u}cr.prototype.displayRange=function(){return{min:this.displayStart,max:this.displayEnd}},cr.prototype.displayIndices=function(){if(!this._indices){var t=this.options,e=t.baseUnit,i=t.baseUnitStep,o=Jo(this.displayStart,this.valueStart,e,i),r=Jo(this.displayEnd,this.valueStart,e,i);this._indices={min:o,max:r}}return this._indices},cr.prototype.total=function(){return{min:this.start,max:this.end}},cr.prototype.totalCount=function(){return this.totalIndex(this.end)+(this.options.justified?1:0)},cr.prototype.valueRange=function(){return{min:this.valueStart,max:this.valueEnd}},cr.prototype.valueIndex=function(t){var e=this.options;return Math.floor(Jo(t,this.valueStart,e.baseUnit,e.baseUnitStep))},cr.prototype.totalIndex=function(t){var e=this.options;return Math.floor(Jo(t,this.start,e.baseUnit,e.baseUnitStep))},cr.prototype.dateIndex=function(t){var e=this.options;return Jo(t,this.valueStart,e.baseUnit,e.baseUnitStep)},cr.prototype.valuesCount=function(){return this.valueIndex(this.valueEnd)+1},cr.prototype.values=function(){var t=this._values;if(!t){var e=this.options,i=this.valueRange();this._values=t=[];for(var o=i.min;o<=i.max;)t.push(o),o=Wo(o,e.baseUnitStep,e.baseUnit,e.weekStartDay)}return t},cr.prototype.dateAt=function(t,e){var i=this.options;return Wo(e?this.start:this.valueStart,i.baseUnitStep*t,i.baseUnit,i.weekStartDay)},cr.prototype.roundToTotalStep=function(t,e,i){var o=this.options,r=o.baseUnit,n=o.baseUnitStep,s=o.weekStartDay,a=this.start,p=Jo(t,a,r,n),l=e?Math.ceil(p):Math.floor(p);return i&&(l+=i),Wo(a,l*n,r,s)};var dr=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.clone=function(){var t=new e(Object.assign({},this.options),this.chartService);return t.createLabels(),t},e.prototype.categoriesHash=function(){var t=this.dataRange.total().min;return this.options.baseUnit+this.options.baseUnitStep+t},e.prototype.initUserOptions=function(t){return t},e.prototype.initFields=function(){t.prototype.initFields.call(this);var e=this.chartService,i=e.intl,o=this.options,r=o.categories||[];if(r._parsed||((r=ir(i,r))._parsed=!0),o=at({roundToBaseUnit:!0},o,{categories:r,min:er(i,o.min),max:er(i,o.max),weekStartDay:or(o,i)}),e.panning&&e.isPannable(o.vertical?H:F)&&(o.roundToBaseUnit=!1),o.userSetBaseUnit=o.userSetBaseUnit||o.baseUnit,o.userSetBaseUnitStep=o.userSetBaseUnitStep||o.baseUnitStep,this.options=o,o.srcCategories=r,r.length>0){var n=lr(r,!0),s=o.maxDivisions,a=function(t){var e=(t.baseUnit||"").toLowerCase();return e!==pr&&!Ct(e,ar)&&function(t){for(var e,i,o=t.categories,r=jt(o)?o.length:0,n=P,s=0;s<r;s++){var a=o[s];if(a&&e){var p=Math.abs(Ho(a,e));0!==p&&(i=(n=Math.min(n,p))>=Do?Io:n>=24192e5?Bo:n>=zo?Lo:n>=Vo?Oo:n>=Ro?Mo:n>=Eo?To:Po)}e=a}t.baseUnit=i||Oo}(t),e!==pr&&"auto"!==t.baseUnitStep||ur(t),t}(o),p=o._forecast;if(p&&(p.before>0&&(n.min=Wo(n.min,-p.before,a.baseUnit,a.weekStartDay)),p.after>0&&(n.max=Wo(n.max,p.after,a.baseUnit,a.weekStartDay))),this.dataRange=new cr(n.min,n.max,a),s){var l=this.dataRange.displayRange(),h=Object.assign({},o,{justified:!0,roundToBaseUnit:!1,baseUnit:"fit",min:l.min,max:l.max,maxDateGroups:s}),c=this.dataRange.options;ur(h,c.baseUnit,c.baseUnitStep),this.divisionRange=new cr(n.min,n.max,h)}else this.divisionRange=this.dataRange}else o.baseUnit=o.baseUnit||Oo,this.dataRange=this.divisionRange=new hr(o);this.rangeLabels=[]},e.prototype.tickIndices=function(e){var i=this.dataRange,o=this.divisionRange,r=o.valuesCount();if(!this.options.maxDivisions||!r)return t.prototype.tickIndices.call(this,e);var n=[],s=o.values(),a=0;this.options.justified||(s=s.concat(o.dateAt(r)),a=.5);for(var p=0;p<s.length;p++)if(n.push(i.dateIndex(s[p])+a),1!==e&&p>=1){var l=n.length-1;n.splice(p,0,n[l-1]+(n[l]-n[l-1])*e)}return n},e.prototype.shouldRenderNote=function(t){var e=this.range(),i=this.options.categories||[];return qo(t,e.min)>=0&&qo(t,e.max)<=0&&i.length},e.prototype.parseNoteValue=function(t){return er(this.chartService.intl,t)},e.prototype.noteSlot=function(t){return this.getSlot(t)},e.prototype.translateRange=function(t){var e=this.options,i=e.baseUnit,o=e.weekStartDay,r=e.vertical,n=this.lineBox(),s=r?n.height():n.width(),a=this.range(),p=s/(a.max-a.min),l=Zt(t/p,b);if(a.min&&a.max){var h=No(e.min||a.min,l),c=No(e.max||a.max,l);a={min:Wo(h,0,i,o),max:Wo(c,0,i,o)}}return a},e.prototype.labelsRange=function(){return{min:this.options.labels.skip,max:this.divisionRange.valuesCount()}},e.prototype.pan=function(t){if(this.isEmpty())return null;var e=this.options,i=this.lineBox(),o=e.vertical?i.height():i.width(),r=this.dataRange.displayRange(),n=r.min,s=r.max,a=this.dataRange.total(),p=Zt(t/(o/(s-n)),b)*(e.reverse?-1:1),l=No(n,p),h=No(s,p),c=this.limitRange(Qo(l),Qo(h),Qo(a.min),Qo(a.max),p);return c?(c.min=Uo(c.min),c.max=Uo(c.max),c.baseUnit=e.baseUnit,c.baseUnitStep=e.baseUnitStep||1,c.userSetBaseUnit=e.userSetBaseUnit,c.userSetBaseUnitStep=e.userSetBaseUnitStep,c):void 0},e.prototype.pointsRange=function(e,i){if(this.isEmpty())return null;var o=t.prototype.pointsRange.call(this,e,i),r=this.dataRange.displayRange(),n=this.dataRange.displayIndices(),s=Zo(r.max,r.min)/(n.max-n.min),a=this.options;return{min:No(r.min,o.min*s),max:No(r.min,o.max*s),baseUnit:a.userSetBaseUnit||a.baseUnit,baseUnitStep:a.userSetBaseUnitStep||a.baseUnitStep}},e.prototype.scaleRange=function(t,e){if(this.isEmpty())return{};var i=this.options,o=i.userSetBaseUnit===pr,r=this.dataRange.total(),n=this.dataRange.displayRange(),s=n.min,a=n.max,p=Math.abs(this.pointOffset(e)),l=a-s,h=this.scaleToDelta(t,l),c=Math.round(p*h),u=Math.round((1-p)*h),d=this.dataRange.options.baseUnit,f=new Date(s.getTime()+c),g=new Date(a.getTime()-u);if(o){var y,v,m=i.autoBaseUnitSteps,x=i.maxDateGroups,b=Wt(m[d])*x*Fo[d],_=Zo(a,s),w=Zo(g,f),k=ar.indexOf(d);if(w<Fo[d]&&d!==Co)d=ar[k-1],f=No(s,v=(_-(x-1)*(y=Wt(m[d]))*Fo[d])/2),g=No(a,-v);else if(w>b&&d!==Io){var A=0;do{k++,d=ar[k],A=0,v=2*Fo[d];do{y=m[d][A],A++}while(A<m[d].length&&v*y<_)}while(d!==Io&&v*y<_);(v=(v*y-_)/2)>0&&(f=No(s,-v),g=No(a,v),f=No(f,Xt(g,r.min,r.max)-g),g=No(g,Xt(f,r.min,r.max)-f))}}return f&&g&&Zo(g,f)>0?{min:f,max:g,baseUnit:i.userSetBaseUnit||i.baseUnit,baseUnitStep:i.userSetBaseUnitStep||i.baseUnitStep}:void 0},e.prototype.zoomRange=function(t,e){var i=this.dataRange.total(),o=this.scaleRange(t,e);if(o){if(o.min<i.min){if(t<0&&this.options.justified){var r=Zo(i.min,o.min);o.max=No(o.max,r)}o.min=i.min}o.max>i.max&&(o.max=i.max)}return o},e.prototype.range=function(){return this.dataRange.displayRange()},e.prototype.createLabels=function(){t.prototype.createLabels.call(this),this.createRangeLabels()},e.prototype.clearLabels=function(){t.prototype.clearLabels.call(this),this.rangeLabels=[]},e.prototype.arrangeLabels=function(){this.arrangeRangeLabels(),t.prototype.arrangeLabels.call(this)},e.prototype.arrangeRangeLabels=function(){var t=this.options,e=this.rangeLabels;if(0!==e.length){var i=this.lineBox(),o=t.vertical,r=t.rangeLabels.mirror||t.labels.mirror,n=e[0];if(n){var s=o?i.y1-n.box.height()/2:i.x1;this.positionLabel(n,r,s)}var a=e[1];if(a){var p=o?i.y2-a.box.height()/2:i.x2;this.positionLabel(a,r,p)}}},e.prototype.autoRotateLabels=function(){t.prototype.autoRotateLabels.call(this),this.autoRotateRangeLabels()},e.prototype.hideOutOfRangeLabels=function(){t.prototype.hideOutOfRangeLabels.call(this),this.hideOverlappingLabels()},e.prototype.hideOverlappingLabels=function(){var t=this.rangeLabels,e=this.labels;if(0!==t.length){var i=t[0];if(i&&i.options.visible)for(var o=0;o<e.length&&s(i,e[o]);o++);var r=t[1];if(r&&r.options.visible)for(var n=e.length-1;n>0&&s(r,e[n]);--n);}function s(t,e){return!(e.options.visible&&!e.box.overlaps(t.box)||(e.options.visible=!1,0))}},e.prototype.contentBox=function(){for(var e=t.prototype.contentBox.call(this),i=this.rangeLabels,o=0;o<i.length;o++){var r=i[o];r.options.visible&&e.wrap(r.box)}return e},e.prototype.createAxisLabel=function(t,e,i){void 0===i&&(i={});var o=this.options,r=o.dataItems&&!o.maxDivisions?o.dataItems[t]:null,n=this.divisionRange.dateAt(t),s=e.dateFormats[this.divisionRange.options.baseUnit];e.format=e.format||s,i.dataItem=r;var a=this.axisLabelText(n,e,i);if(a)return new oo(n,a,t,r,e)},e.prototype.createRangeLabels=function(){var t=this,e=this.divisionRange,i=e.displayStart,o=e.displayEnd,r=this.options,n=Object.assign({},r.labels,r.rangeLabels,{align:f,zIndex:r.zIndex});if(!0===n.visible){this.normalizeLabelRotation(n),n.alignRotation=f,"auto"===n.rotation&&(n.rotation=0,r.autoRotateRangeLabels=!0);var s=n.dateFormats[this.divisionRange.options.baseUnit];n.format=n.format||s;var a=function(e,i,o){if(o){var r=new oo(i,o,e,null,n);t.append(r),t.rangeLabels.push(r)}};a(0,i,this.axisLabelText(i,n,{index:0,count:2})),a(1,o,this.axisLabelText(o,n,{index:1,count:2}))}},e.prototype.autoRotateRangeLabels=function(){var t=this,e=this.rangeLabels;if(this.options.autoRotateRangeLabels&&!this.options.vertical&&2===e.length){var i=function(e,i,o){var r=2*Math.abs(i[o+1]-i[o]),n=t.autoRotateLabelAngle(e.box,r);0!==n&&(e.options.rotation=n,e.reflow(new wi))},o=this.getMajorTickPositions();i(e[0],o,0),i(e[1],o,o.length-2)}},e.prototype.categoryIndex=function(t){return this.dataRange.valueIndex(t)},e.prototype.slot=function(t,e,i){var o=this.dataRange,r=t,n=e;r instanceof Date&&(r=o.dateIndex(r)),n instanceof Date&&(n=o.dateIndex(n));var s=this.getSlot(r,n,i);if(s)return s.toRect()},e.prototype.getSlot=function(e,i,o){var r=e,n=i;return typeof r===O&&(r=this.categoryIndex(r)),typeof n===O&&(n=this.categoryIndex(n)),t.prototype.getSlot.call(this,r,n,o)},e.prototype.valueRange=function(){var t=lr(this.options.srcCategories);return{min:Uo(t.min),max:Uo(t.max)}},e.prototype.categoryAt=function(t,e){return this.dataRange.dateAt(t,e)},e.prototype.categoriesCount=function(){return this.dataRange.valuesCount()},e.prototype.rangeIndices=function(){return this.dataRange.displayIndices()},e.prototype.labelsBetweenTicks=function(){return!this.divisionRange.options.justified},e.prototype.prepareUserOptions=function(){this.isEmpty()||(this.options.categories=this.dataRange.values())},e.prototype.getCategory=function(t){var e=this.pointCategoryIndex(t);return null===e?null:this.dataRange.dateAt(e)},e.prototype.totalIndex=function(t){return this.dataRange.totalIndex(t)},e.prototype.currentRangeIndices=function(){var t=this.dataRange.valueRange();return{min:this.dataRange.totalIndex(t.min),max:this.dataRange.totalIndex(t.max)}},e.prototype.totalRange=function(){return this.dataRange.total()},e.prototype.totalRangeIndices=function(){var t=this.dataRange.total();return{min:this.dataRange.totalIndex(t.min),max:this.dataRange.totalIndex(t.max)}},e.prototype.totalCount=function(){return this.dataRange.totalCount()},e.prototype.isEmpty=function(){return!this.options.srcCategories.length},e.prototype.roundedRange=function(){if(!1!==this.options.roundToBaseUnit||this.isEmpty())return this.range();var t=this.options,e=lr(t.srcCategories);return new cr(e.min,e.max,Object.assign({},t,{justified:!1,roundToBaseUnit:!0,justifyEnd:!1})).displayRange()},e}(nr);te(dr,{type:m,labels:{dateFormats:sr},rangeLabels:{visible:!1},autoBaseUnitSteps:{milliseconds:[1,10,100],seconds:[1,2,5,15,30],minutes:[1,2,5,15,30],hours:[1,2,3],days:[1,2,3],weeks:[1,2],months:[1,2,3,6],years:[1,2,3,5,10,25,50]},maxDateGroups:10});const fr=dr;function gr(t,e){return Zt(Math.floor(t/e)*e,b)}function yr(t,e){return Zt(Math.ceil(t/e)*e,b)}function vr(t){return Math.max(Math.min(t,3e5),-3e5)}var mr=Math.pow(10,1-b),xr=function(t){function e(e,i,o,r){t.call(this,Object.assign({},o,{seriesMin:e,seriesMax:i}),r)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initUserOptions=function(t){var e=function(t,e,i){var o=i.narrowRange,r=function(t,e,i){if(!t&&!e)return 0;var o;if(t>=0&&e>=0){var r=t===e?0:t;if(!1===i||!i&&(e-r)/e>.2)return 0;o=Math.max(0,r-(e-r)/2)}else o=t;return o}(t,e,o),n=function(t,e,i){if(!t&&!e)return 1;var o;if(t<=0&&e<=0){var r=t===e?0:e,n=Math.abs((r-t)/r);if(!1===i||!i&&n>.2)return 0;o=Math.min(0,r-(t-r)/2)}else o=e;return o}(t,e,o),s=vi(r,n),a={majorUnit:s};return!1!==i.roundToMajorUnit&&(r<0&&br(r,s,1/3)&&(r-=s),n>0&&br(n,s,1/3)&&(n+=s)),a.min=gr(r,s),a.max=yr(n,s),a}(t.seriesMin,t.seriesMax,t);return this.totalOptions=function(t,e){return{min:jt(e.min)?Math.min(t.min,e.min):t.min,max:jt(e.max)?Math.max(t.max,e.max):t.max,majorUnit:t.majorUnit}}(e,t),function(t,e){var i,o,r=e;if(e){!function(t,e){for(var i=0;i<e.length;i++){var o=e[i];null===t[o]&&(t[o]=void 0)}}(e,["min","max"]),i=jt(e.min),o=jt(e.max);var n=i||o;n&&e.min===e.max&&(e.min>0?e.min=0:e.max=1),e.majorUnit?(t.min=gr(t.min,e.majorUnit),t.max=yr(t.max,e.majorUnit)):n&&(r=at(t,e),t.majorUnit=vi(r.min,r.max))}t.minorUnit=(r.majorUnit||t.majorUnit)/5;var s=at(t,r);return s.min>=s.max&&(i&&!o?s.max=s.min+s.majorUnit:!i&&o&&(s.min=s.max-s.majorUnit)),s}(e,t)},e.prototype.initFields=function(){this.totalMin=this.totalOptions.min,this.totalMax=this.totalOptions.max,this.totalMajorUnit=this.totalOptions.majorUnit,this.seriesMin=this.options.seriesMin,this.seriesMax=this.options.seriesMax},e.prototype.clone=function(){return new e(this.seriesMin,this.seriesMax,Object.assign({},this.options),this.chartService)},e.prototype.startValue=function(){return 0},e.prototype.range=function(){var t=this.options;return{min:t.min,max:t.max}},e.prototype.getDivisions=function(t){if(0===t)return 1;var e=this.options,i=e.max-e.min;return Math.floor(Zt(i/t,y))+1},e.prototype.getTickPositions=function(t,e){var i=this.options,o=this.lineInfo(),r=o.axisDir,n=o.axisOrigin,s=o.lineBox,a=t*(o.lineSize/(i.max-i.min)),p=this.getDivisions(t),l=[],h=s[n],c=0;e&&(c=e/t);for(var u=0;u<p;u++)u%c!=0&&l.push(Zt(h,y)),h+=a*r;return l},e.prototype.getMajorTickPositions=function(){return this.getTickPositions(this.options.majorUnit)},e.prototype.getMinorTickPositions=function(){return this.getTickPositions(this.options.minorUnit)},e.prototype.getSlot=function(t,e,i){void 0===i&&(i=!1);var o=this.options,r=this.lineInfo(),n=r.axis,s=r.axisDir,a=r.lineBox,p=r.lineSize,l=r.lineStart,h=s*(p/(o.max-o.min)),c=Kt(t,e||0),u=Kt(e,t||0);i&&(c=Xt(c,o.min,o.max),u=Xt(u,o.min,o.max));var d=Math.min(c,u)-o.min,f=Math.max(c,u)-o.min,g=new wi(a.x1,a.y1,a.x1,a.y1);return g[n+1]=vr(l+h*(s>0?d:f)),g[n+2]=vr(l+h*(s>0?f:d)),g},e.prototype.getValue=function(t){var e=this.options,i=Number(e.max),o=Number(e.min),r=this.pointOffset(t);return r<0||r>1?null:Zt(o+r*(i-o),b)},e.prototype.translateRange=function(t){var e=this.options,i=e.vertical,o=e.reverse,r=e.max,n=e.min,s=this.lineInfo().lineSize,a=Zt(t/(s/(r-n)),b);return!i&&!o||i&&o||(a=-a),{min:n+a,max:r+a,offset:a}},e.prototype.labelsCount=function(){return this.getDivisions(this.options.majorUnit)},e.prototype.createAxisLabel=function(t,e,i){var o=this.options,r=Zt(o.min+t*o.majorUnit,b),n=this.axisLabelText(r,e,i);return new oo(r,n,t,null,e)},e.prototype.shouldRenderNote=function(t){var e=this.range();return e.min<=t&&t<=e.max},e.prototype.pan=function(t){var e=this.translateRange(t);return this.limitRange(e.min,e.max,this.totalMin,this.totalMax,e.offset)},e.prototype.pointsRange=function(t,e){var i=this.getValue(t),o=this.getValue(e),r=Math.min(i,o),n=Math.max(i,o);if(this.isValidRange(r,n))return{min:r,max:n}},e.prototype.scaleRange=function(t,e){var i=Math.abs(this.pointOffset(e)),o=this.options.max-this.options.min,r=this.scaleToDelta(t,o),n=i*r,s=(1-i)*r,a=Zt(this.options.min+n,b),p=Zt(this.options.max-s,b);return p-a<mr&&(p=a+mr),{min:a,max:p}},e.prototype.zoomRange=function(t,e){var i=this.totalMin,o=this.totalMax,r=this.scaleRange(t,e);return{min:Xt(r.min,i,o),max:Xt(r.max,i,o),narrowRange:!1}},e.prototype.isValidRange=function(t,e){return e-t>mr},e}(So);function br(t,e,i){var o=Zt(Math.abs(t%e),b);return 0===o||o>e*(1-i)}te(xr,{type:"numeric",min:0,max:1,vertical:!0,majorGridLines:{visible:!0,width:1,color:u},labels:{format:"#.####################"},zIndex:1});const _r=xr;var wr=function(t){function e(e,i,o,r){var n=Uo(e),s=Uo(i),a=r.intl,p=o||{};p=function(t,e,i){var o,r,n=i.min||t,s=i.max||e,a=i.baseUnit||(s&&n?(o=Ho(s,n),r=Mo,o>=Do?r=Io:o>=jo?r=Bo:o>=zo?r=Lo:o>=Vo&&(r=Oo),r):Mo),p=Fo[a],l=i.weekStartDay||0,h=Xo(Qo(n)-1,a,l)||Uo(s),c=Yo(Qo(s)+1,a,l),u=(i.majorUnit?i.majorUnit:void 0)||yr(vi(h.getTime(),c.getTime()),p)/p,d=tr(h,c,a),f=yr(d,u)-d,g=Math.floor(f/2),y=f-g;return i.baseUnit||delete i.baseUnit,i.baseUnit=i.baseUnit||a,i.min=i.min||Wo(h,-g,a,l),i.max=i.max||Wo(c,y,a,l),i.minorUnit=i.minorUnit||u/5,i.majorUnit=u,i}(n,s,p=at(p||{},{min:er(a,p.min),max:er(a,p.max),axisCrossingValue:ir(a,p.axisCrossingValues||p.axisCrossingValue),weekStartDay:or(p,a)})),t.call(this,p,r),this.intlService=a,this.seriesMin=n,this.seriesMax=s;var l=p.weekStartDay||0;this.totalMin=Qo(Xo(Qo(n)-1,p.baseUnit,l)),this.totalMax=Qo(Yo(Qo(s)+1,p.baseUnit,l))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.clone=function(){return new e(this.seriesMin,this.seriesMax,Object.assign({},this.options),this.chartService)},e.prototype.range=function(){var t=this.options;return{min:t.min,max:t.max}},e.prototype.getDivisions=function(t){var e=this.options;return Math.floor(tr(e.min,e.max,e.baseUnit)/t+1)},e.prototype.getTickPositions=function(t){for(var e=this.options,i=this.lineInfo(),o=i.axisDir,r=i.lineSize,n=i.lineStart,s=this.getDivisions(t),a=r/Zo(e.max,e.min),p=e.weekStartDay||0,l=[n],h=1;h<s;h++){var c=n+Zo(Wo(e.min,h*t,e.baseUnit,p),e.min)*a*o;l.push(Zt(c,y))}return l},e.prototype.getMajorTickPositions=function(){return this.getTickPositions(this.options.majorUnit)},e.prototype.getMinorTickPositions=function(){return this.getTickPositions(this.options.minorUnit)},e.prototype.getSlot=function(t,e,i){return _r.prototype.getSlot.call(this,er(this.intlService,t),er(this.intlService,e),i)},e.prototype.getValue=function(t){var e=_r.prototype.getValue.call(this,t);return null!==e?Uo(e):null},e.prototype.labelsCount=function(){return this.getDivisions(this.options.majorUnit)},e.prototype.createAxisLabel=function(t,e,i){var o=this.options,r=t*o.majorUnit,n=o.weekStartDay||0,s=o.min;r>0&&(s=Wo(s,r,o.baseUnit,n));var a=e.dateFormats[o.baseUnit];e.format=e.format||a;var p=this.axisLabelText(s,e,i);return new oo(s,p,t,null,e)},e.prototype.translateRange=function(t){var e=this.options,i=this.lineBox(),o=e.vertical,r=e.reverse,n=o?i.height():i.width(),s=this.range(),a=n/Zo(s.max,s.min),p=Zt(t/a,b);return!o&&!r||o&&r||(p=-p),{min:No(e.min,p),max:No(e.max,p),offset:p}},e.prototype.shouldRenderNote=function(t){var e=this.range();return qo(t,e.min)>=0&&qo(t,e.max)<=0},e.prototype.pan=function(t){var e=this.translateRange(t,!0),i=this.limitRange(Qo(e.min),Qo(e.max),this.totalMin,this.totalMax,e.offset);if(i)return{min:Uo(i.min),max:Uo(i.max)}},e.prototype.pointsRange=function(t,e){var i=this.getValue(t),o=this.getValue(e),r=Math.min(i,o),n=Math.max(i,o);return{min:Uo(r),max:Uo(n)}},e.prototype.scaleRange=function(t,e){var i=Math.abs(this.pointOffset(e)),o=this.options.max-this.options.min,r=this.scaleToDelta(t,o),n=i*r,s=(1-i)*r,a=Uo(Qo(this.options.min)+n),p=Uo(Qo(this.options.max)-s);return p-a<1e3&&(p=Uo(Qo(a)+1e3)),{min:a,max:p}},e.prototype.zoomRange=function(t,e){var i=this.scaleRange(t,e);return{min:Uo(Xt(Qo(i.min),this.totalMin,this.totalMax)),max:Uo(Xt(Qo(i.max),this.totalMin,this.totalMax))}},e}(So);te(wr,{type:m,majorGridLines:{visible:!0,width:1,color:u},labels:{dateFormats:sr}});const kr=wr;var Ar=1e-6,Sr=function(t){function e(e,i,o,r){var n=at({majorUnit:10,min:e,max:i},o),s=n.majorUnit,a=function(t,e){var i=Zt(Pr(t,e),b)%1;return t<=0?e:0!==i&&(i<.3||i>.9)?Math.pow(e,Pr(t,e)+.2):Math.pow(e,Math.ceil(Pr(t,e)))}(i,s),p=function(t,e,i){var o=i.majorUnit,r=t;return t<=0?r=e<=1?Math.pow(o,-2):1:i.narrowRange||(r=Math.pow(o,Math.floor(Pr(t,o)))),r}(e,i,n),l=function(t,e,i,o){var r=i.min,n=i.max;return jt(i.axisCrossingValue)&&i.axisCrossingValue<=0&&Cr(),jt(o.max)?o.max<=0&&Cr():n=e,jt(o.min)?o.min<=0&&Cr():r=t,{min:r,max:n}}(p,a,n,o);n.max=l.max,n.min=l.min,n.minorUnit=o.minorUnit||Zt(s-1,b),t.call(this,n,r),this.totalMin=jt(o.min)?Math.min(p,o.min):p,this.totalMax=jt(o.max)?Math.max(a,o.max):a,this.logMin=Zt(Pr(l.min,s),b),this.logMax=Zt(Pr(l.max,s),b),this.seriesMin=e,this.seriesMax=i,this.createLabels()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.clone=function(){return new e(this.seriesMin,this.seriesMax,Object.assign({},this.options),this.chartService)},e.prototype.startValue=function(){return this.options.min},e.prototype.getSlot=function(t,e,i){var o=this,r=o.options,n=o.logMin,s=o.logMax,a=r.majorUnit,p=r.min,l=r.max,h=this.lineInfo(),c=h.axis,u=h.axisDir,d=h.lineBox,f=h.lineSize,g=h.lineStart,y=u*(f/(s-n)),v=Kt(t,e||1),m=Kt(e,t||1);if(v<=0||m<=0)return null;i&&(v=Xt(v,p,l),m=Xt(m,p,l)),v=Pr(v,a),m=Pr(m,a);var x=Math.min(v,m)-n,b=Math.max(v,m)-n,_=new wi(d.x1,d.y1,d.x1,d.y1);return _[c+1]=vr(g+y*(u>0?x:b)),_[c+2]=vr(g+y*(u>0?b:x)),_},e.prototype.getValue=function(t){var e=this,i=e.options,o=e.logMin,r=e.logMax,n=i.majorUnit,s=this.lineInfo(),a=s.axis,p=s.axisDir,l=s.lineStart,h=s.lineSize,c=(r-o)/h,u=p*(t[a]-l);if(u<0||u>h)return null;var d=o+u*c;return Zt(Math.pow(n,d),b)},e.prototype.range=function(){var t=this.options;return{min:t.min,max:t.max}},e.prototype.translateRange=function(t){var e=this,i=e.options,o=e.logMin,r=e.logMax,n=i.reverse,s=i.vertical,a=i.majorUnit,p=this.lineBox(),l=s?p.height():p.width(),h=Zt(t/(l/(r-o)),b);return!s&&!n||s&&n||(h=-h),{min:Math.pow(a,o+h),max:Math.pow(a,r+h),offset:h}},e.prototype.labelsCount=function(){var t=Math.floor(this.logMax);return Math.floor(t-this.logMin)+1},e.prototype.getMajorTickPositions=function(){var t=[];return this.traverseMajorTicksPositions((function(e){t.push(e)}),{step:1,skip:0}),t},e.prototype.createTicks=function(t){var e=this.options,i=e.majorTicks,o=e.minorTicks,r=e.vertical,n=e.labels.mirror,s=this.lineBox(),a={vertical:r};function p(e,i){a.tickX=n?s.x2:s.x2-i.size,a.tickY=n?s.y1-i.size:s.y1,a.position=e,t.append(wo(a,i))}return i.visible&&this.traverseMajorTicksPositions(p,i),o.visible&&this.traverseMinorTicksPositions(p,o),[]},e.prototype.createGridLines=function(t){var e=this.options,i=e.minorGridLines,o=e.majorGridLines,r=e.vertical,n=t.lineBox(),s={lineStart:n[r?"x1":"y1"],lineEnd:n[r?"x2":"y2"],vertical:r},a=[],p=this.gridLinesVisual();function l(t,e){Ct(t,a)||(s.position=t,p.append(ko(s,e)),a.push(t))}return o.visible&&this.traverseMajorTicksPositions(l,o),i.visible&&this.traverseMinorTicksPositions(l,i),p.children},e.prototype.traverseMajorTicksPositions=function(t,e){for(var i=this.lineInfo(),o=i.lineStart,r=i.step,n=this.logMin,s=this.logMax,a=Math.ceil(n)+e.skip;a<=s;a+=e.step)t(Zt(o+r*(a-n),b),e)},e.prototype.traverseMinorTicksPositions=function(t,e){for(var i=this.options,o=i.min,r=i.max,n=i.minorUnit,s=i.majorUnit,a=this.lineInfo(),p=a.lineStart,l=a.step,h=this.logMin,c=this.logMax,u=Math.floor(h);u<c;u++)for(var d=this._minorIntervalOptions(u),f=e.skip;f<n;f+=e.step){var g=d.value+f*d.minorStep;if(g>r)break;g>=o&&t(Zt(p+l*(Pr(g,s)-h),b),e)}},e.prototype.createAxisLabel=function(t,e,i){var o=Math.ceil(this.logMin+t),r=Math.pow(this.options.majorUnit,o),n=this.axisLabelText(r,e,i);return new oo(r,n,t,null,e)},e.prototype.shouldRenderNote=function(t){var e=this.range();return e.min<=t&&t<=e.max},e.prototype.pan=function(t){var e=this.translateRange(t);return this.limitRange(e.min,e.max,this.totalMin,this.totalMax,e.offset)},e.prototype.pointsRange=function(t,e){var i=this.getValue(t),o=this.getValue(e);return{min:Math.min(i,o),max:Math.max(i,o)}},e.prototype.scaleRange=function(t,e){var i=this.options.majorUnit,o=Pr(this.options.min,i),r=Pr(this.options.max,i),n=Math.abs(this.pointOffset(e)),s=r-o,a=this.scaleToDelta(t,s),p=Math.pow(i,o+n*a),l=Math.pow(i,r-(1-n)*a);return l-p<Ar&&(l=p+Ar),{min:p,max:l}},e.prototype.zoomRange=function(t,e){var i=this.scaleRange(t,e),o=this.totalMin,r=this.totalMax;return{min:Xt(i.min,o,r),max:Xt(i.max,o,r)}},e.prototype._minorIntervalOptions=function(t){var e=this.options,i=e.minorUnit,o=e.majorUnit,r=Math.pow(o,t);return{value:r,minorStep:(Math.pow(o,t+1)-r)/i}},e.prototype.lineInfo=function(){var e=t.prototype.lineInfo.call(this);return e.step=e.axisDir*(e.lineSize/(this.logMax-this.logMin)),e},e}(So);function Cr(){throw new Error("Non positive values cannot be used for a logarithmic axis")}function Pr(t,e){return Math.log(t)/Math.log(e)}te(Sr,{type:"log",majorUnit:10,minorUnit:1,axisCrossingValue:1,vertical:!0,majorGridLines:{visible:!0,width:1,color:u},zIndex:1,_deferLabels:!0});const Tr=Sr;var Mr={createGridLines:function(t){var e,i,o=this.options,r=Math.abs(this.box.center().y-t.lineBox().y1),n=[],s=!1;return o.majorGridLines.visible&&(e=this.majorGridLineAngles(t),s=!0,n=this.renderMajorGridLines(e,r,o.majorGridLines)),o.minorGridLines.visible&&(i=this.minorGridLineAngles(t,s),Vt(n,this.renderMinorGridLines(i,r,o.minorGridLines,t,s))),n},renderMajorGridLines:function(t,e,i){return this.renderGridLines(t,e,i)},renderMinorGridLines:function(t,e,i,o,r){var n=this.radiusCallback&&this.radiusCallback(e,o,r);return this.renderGridLines(t,e,i,n)},renderGridLines:function(t,e,i,o){for(var r={stroke:{width:i.width,color:i.color,dashType:i.dashType}},n=this.box.center(),s=new q.geometry.Circle([n.x,n.y],e),a=this.gridLinesVisual(),p=0;p<t.length;p++){var l=new q.drawing.Path(r);o&&(s.radius=o(t[p])),l.moveTo(s.center).lineTo(s.pointAt(t[p]+180)),a.append(l)}return a.children},gridLineAngles:function(t,e,i,o,r){var n=this,s=this.intervals(e,i,o,r),a=t.options,p=a.visible&&!1!==(a.line||{}).visible;return Bt(s,(function(t){var e=n.intervalAngle(t);if(!p||90!==e)return e}))}};const Or=Mr;var Lr=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.range=function(){return{min:0,max:this.options.categories.length}},e.prototype.reflow=function(t){this.box=t,this.reflowLabels()},e.prototype.lineBox=function(){return this.box},e.prototype.reflowLabels=function(){for(var t=this.labels,e=this.options.labels,i=e.skip||0,o=e.step||1,r=new wi,n=0;n<t.length;n++){t[n].reflow(r);var s=t[n].box;t[n].reflow(this.getSlot(i+n*o).adjacentBox(0,s.width(),s.height()))}},e.prototype.intervals=function(t,e,i,o){void 0===o&&(o=!1);for(var r=this.options,n=r.categories.length/t||1,s=360/n,a=i||1,p=[],l=0,h=e||0;h<n;h+=a)l=r.reverse?360-h*s:h*s,l=Zt(l,y)%360,o&&Ct(l,o)||p.push(l);return p},e.prototype.majorIntervals=function(){return this.intervals(1)},e.prototype.minorIntervals=function(){return this.intervals(.5)},e.prototype.intervalAngle=function(t){return(360+t+this.options.startAngle)%360},e.prototype.majorAngles=function(){var t=this;return Bt(this.majorIntervals(),(function(e){return t.intervalAngle(e)}))},e.prototype.createLine=function(){return[]},e.prototype.majorGridLineAngles=function(t){var e=this.options.majorGridLines;return this.gridLineAngles(t,1,e.skip,e.step)},e.prototype.minorGridLineAngles=function(t,e){var i=this.options,o=i.minorGridLines,r=i.majorGridLines,n=e?this.intervals(1,r.skip,r.step):null;return this.gridLineAngles(t,.5,o.skip,o.step,n)},e.prototype.radiusCallback=function(t,e,i){if(e.options.type!==s){var o=qt(360/(2*this.options.categories.length)),r=Math.cos(o)*t,n=this.majorAngles();return function(e){return!i&&Ct(e,n)?t:r}}},e.prototype.createPlotBands=function(){for(var t=this.options.plotBands||[],e=this._plotbandGroup=new q.drawing.Group({zIndex:-1}),i=0;i<t.length;i++){var o=t[i],r=this.plotBandSlot(o),n=this.getSlot(o.from),s=o.from-Math.floor(o.from);r.startAngle+=s*n.angle;var a=Math.ceil(o.to)-o.to;r.angle-=(a+s)*n.angle;var p=Mi.current.createRing(r,{fill:{color:o.color,opacity:o.opacity},stroke:{opacity:o.opacity}});e.append(p)}this.appendVisual(e)},e.prototype.plotBandSlot=function(t){return this.getSlot(t.from,t.to-1)},e.prototype.getSlot=function(t,e){var i=this.options,o=i.justified,r=this.box,n=this.majorAngles(),s=n.length,a=360/s,p=t;i.reverse&&!o&&(p=(p+1)%s);var l=n[p=Xt(Math.floor(p),0,s-1)];o&&(l-=a/2)<0&&(l+=360);var h=a*(Xt(Math.ceil(e||p),p,s-1)-p+1);return new Si(r.center(),0,r.height()/2,l,h)},e.prototype.slot=function(t,e){var i=this.getSlot(t,e),o=i.startAngle+180,r=o+i.angle;return new q.geometry.Arc([i.center.x,i.center.y],{startAngle:o,endAngle:r,radiusX:i.radius,radiusY:i.radius})},e.prototype.pointCategoryIndex=function(t){for(var e=this.options.categories.length,i=null,o=0;o<e;o++)if(this.getSlot(o).containsPoint(t)){i=o;break}return i},e}(nr);te(Lr,{startAngle:90,labels:{margin:dt(10)},majorGridLines:{visible:!0},justified:!0}),at(Lr.prototype,Or);const Br=Lr;var Ir=function(t){function e(e,i){t.call(this,e,i);var o=this.options;o.minorUnit=o.minorUnit||o.majorUnit/2}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDivisions=function(t){return _r.prototype.getDivisions.call(this,t)-1},e.prototype.reflow=function(t){this.box=t,this.reflowLabels()},e.prototype.reflowLabels=function(){for(var t=this,e=t.options,i=t.labels,o=t.options.labels,r=o.skip||0,n=o.step||1,s=new wi,a=this.intervals(e.majorUnit,r,n),p=0;p<i.length;p++){i[p].reflow(s);var l=i[p].box;i[p].reflow(this.getSlot(a[p]).adjacentBox(0,l.width(),l.height()))}},e.prototype.lineBox=function(){return this.box},e.prototype.intervals=function(t,e,i,o){void 0===o&&(o=!1);for(var r=this.options.min,n=this.getDivisions(t),s=[],a=i||1,p=e||0;p<n;p+=a){var l=(360+r+p*t)%360;o&&Ct(l,o)||s.push(l)}return s},e.prototype.majorIntervals=function(){return this.intervals(this.options.majorUnit)},e.prototype.minorIntervals=function(){return this.intervals(this.options.minorUnit)},e.prototype.intervalAngle=function(t){return(540-t-this.options.startAngle)%360},e.prototype.createLine=function(){return[]},e.prototype.majorGridLineAngles=function(t){var e=this.options.majorGridLines;return this.gridLineAngles(t,this.options.majorUnit,e.skip,e.step)},e.prototype.minorGridLineAngles=function(t,e){var i=this.options,o=i.minorGridLines,r=i.majorGridLines,n=e?this.intervals(i.majorUnit,r.skip,r.step):null;return this.gridLineAngles(t,i.minorUnit,o.skip,o.step,n)},e.prototype.plotBandSlot=function(t){return this.getSlot(t.from,t.to)},e.prototype.getSlot=function(t,e){var i=this.options,o=this.box,r=i.startAngle,n=Xt(t,i.min,i.max),s=Xt(e||n,n,i.max);if(i.reverse&&(n*=-1,s*=-1),(s=(540-s-r)%360)<(n=(540-n-r)%360)){var a=n;n=s,s=a}return new Si(o.center(),0,o.height()/2,n,s-n)},e.prototype.slot=function(t,e){void 0===e&&(e=t);var i,o,r=this.options,n=360-r.startAngle,s=this.getSlot(t,e),a=Math.min(t,e),p=Math.max(t,e);return r.reverse?(i=a,o=p):(i=360-p,o=360-a),i=(i+n)%360,o=(o+n)%360,new q.geometry.Arc([s.center.x,s.center.y],{startAngle:i,endAngle:o,radiusX:s.radius,radiusY:s.radius})},e.prototype.getValue=function(t){var e=this.options,i=this.box.center(),o=t.x-i.x,r=t.y-i.y,n=Math.round(Dt(Math.atan2(r,o))),s=e.startAngle;return e.reverse||(n*=-1,s*=-1),(n+s+360)%360},e.prototype.valueRange=function(){return{min:0,max:2*Math.PI}},e}(So);te(Ir,{type:"polar",startAngle:0,reverse:!1,majorUnit:60,min:0,max:360,labels:{margin:dt(10)},majorGridLines:{color:u,visible:!0,width:1},minorGridLines:{color:"#aaa"}}),at(Ir.prototype,Or,{createPlotBands:Br.prototype.createPlotBands,majorAngles:Br.prototype.majorAngles,range:_r.prototype.range,labelsCount:_r.prototype.labelsCount,createAxisLabel:_r.prototype.createAxisLabel});const Er=Ir;var Rr={options:{majorGridLines:{visible:!0}},createPlotBands:function(){var t=this.options,e=t.majorGridLines.type,i=t.plotBands;void 0===i&&(i=[]);for(var o=this.plotArea.polarAxis,r=o.majorAngles(),n=o.box.center(),a=this._plotbandGroup=new q.drawing.Group({zIndex:-1}),p=0;p<i.length;p++){var l,h=i[p],c={fill:{color:h.color,opacity:h.opacity},stroke:{opacity:h.opacity}},u=this.getSlot(h.from,h.to,!0),d=new Si(n,n.y-u.y2,n.y-u.y1,0,360);l=e===s?Mi.current.createRing(d,c):q.drawing.Path.fromPoints(this.plotBandPoints(d,r),c).close(),a.append(l)}this.appendVisual(a)},plotBandPoints:function(t,e){for(var i=[],o=[],r=[t.center.x,t.center.y],n=new q.geometry.Circle(r,t.innerRadius),s=new q.geometry.Circle(r,t.radius),a=0;a<e.length;a++)i.push(n.pointAt(e[a]+180)),o.push(s.pointAt(e[a]+180));return i.reverse(),i.push(i[0]),o.push(o[0]),o.concat(i)},createGridLines:function(t){var e=this.options,i=this.radarMajorGridLinePositions(),o=t.majorAngles(),r=t.box.center(),n=[];if(e.majorGridLines.visible&&(n=this.renderGridLines(r,i,o,e.majorGridLines)),e.minorGridLines.visible){var s=this.radarMinorGridLinePositions();Vt(n,this.renderGridLines(r,s,o,e.minorGridLines))}return n},renderGridLines:function(t,e,i,o){var r={stroke:{width:o.width,color:o.color,dashType:o.dashType}},n=o.skip;void 0===n&&(n=0);var a=o.step;void 0===a&&(a=0);for(var p=this.gridLinesVisual(),l=n;l<e.length;l+=a){var h=t.y-e[l];if(h>0){var c=new q.geometry.Circle([t.x,t.y],h);if(o.type===s)p.append(new q.drawing.Circle(c,r));else{for(var u=new q.drawing.Path(r),d=0;d<i.length;d++)u.lineTo(c.pointAt(i[d]+180));u.close(),p.append(u)}}}return p.children},getValue:function(t){var e=this.lineBox(),i=this.plotArea.polarAxis,o=i.majorAngles(),r=i.box.center(),n=t.distanceTo(r),a=n;if(this.options.majorGridLines.type!==s&&o.length>1){var p=t.x-r.x,l=t.y-r.y,h=(Dt(Math.atan2(l,p))+540)%360;o.sort((function(t,e){return Vr(t,h)-Vr(e,h)}));var c=90-Vr(o[0],o[1])/2,u=180-Vr(h,o[0])-c;a=n*(Math.sin(qt(u))/Math.sin(qt(c)))}return this.axisType().prototype.getValue.call(this,new xi(e.x1,e.y2-a))}};function Vr(t,e){return 180-Math.abs(Math.abs(t-e)-180)}const zr=Rr;var jr=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.radarMajorGridLinePositions=function(){return this.getTickPositions(this.options.majorUnit)},e.prototype.radarMinorGridLinePositions=function(){var t=this.options,e=0;return t.majorGridLines.visible&&(e=t.majorUnit),this.getTickPositions(t.minorUnit,e)},e.prototype.axisType=function(){return t},e}(_r);at(jr.prototype,zr);const Dr=jr;var Fr=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.radarMajorGridLinePositions=function(){var t=[];return this.traverseMajorTicksPositions((function(e){t.push(e)}),this.options.majorGridLines),t},e.prototype.radarMinorGridLinePositions=function(){var t=[];return this.traverseMinorTicksPositions((function(e){t.push(e)}),this.options.minorGridLines),t},e.prototype.axisType=function(){return t},e}(Tr);at(Fr.prototype,zr);const Hr=Fr;var Nr=function(t){this.closed=t};function Ur(t){return t<=0?-1:1}Nr.prototype.process=function(t){var e=t.slice(0),i=[],o=this.closed,r=e.length;if(r>2&&(this.removeDuplicates(0,e),r=e.length),r<2||2===r&&e[0].equals(e[1]))return i;var n,s,a=e[0],p=e[1],l=e[2];for(i.push(new q.geometry.Segment(a));a.equals(e[r-1]);)o=!0,e.pop(),r--;if(2===r){var h=this.tangent(a,p,F,H);return Wt(i).controlOut(this.firstControlPoint(h,a,p,F,H)),i.push(new q.geometry.Segment(p,this.secondControlPoint(h,a,p,F,H))),i}if(o){a=e[r-1],p=e[0],l=e[1];var c=this.controlPoints(a,p,l);n=c[1],s=c[0]}else{var u=this.tangent(a,p,F,H);n=this.firstControlPoint(u,a,p,F,H)}for(var d=n,f=0;f<=r-3;f++)if(this.removeDuplicates(f,e),f+3<=(r=e.length)){a=e[f],p=e[f+1],l=e[f+2];var g=this.controlPoints(a,p,l);Wt(i).controlOut(d),d=g[1];var y=g[0];i.push(new q.geometry.Segment(p,y))}if(o){a=e[r-2],p=e[r-1],l=e[0];var v=this.controlPoints(a,p,l);Wt(i).controlOut(d),i.push(new q.geometry.Segment(p,v[0])),Wt(i).controlOut(v[1]),i.push(new q.geometry.Segment(l,s))}else{var m=this.tangent(p,l,F,H);Wt(i).controlOut(d),i.push(new q.geometry.Segment(l,this.secondControlPoint(m,p,l,F,H)))}return i},Nr.prototype.removeDuplicates=function(t,e){for(;e[t+1]&&(e[t].equals(e[t+1])||e[t+1].equals(e[t+2]));)e.splice(t+1,1)},Nr.prototype.invertAxis=function(t,e,i){var o=!1;if(t.x===e.x)o=!0;else if(e.x===i.x)(e.y<i.y&&t.y<=e.y||i.y<e.y&&e.y<=t.y)&&(o=!0);else{var r=this.lineFunction(t,e),n=this.calculateFunction(r,i.x);t.y<=e.y&&i.y<=n||e.y<=t.y&&i.y>=n||(o=!0)}return o},Nr.prototype.isLine=function(t,e,i){var o=this.lineFunction(t,e),r=this.calculateFunction(o,i.x);return t.x===e.x&&e.x===i.x||Zt(r,1)===Zt(i.y,1)},Nr.prototype.lineFunction=function(t,e){var i=(e.y-t.y)/(e.x-t.x);return[t.y-i*t.x,i]},Nr.prototype.controlPoints=function(t,e,i){var o,r=F,n=H,s=!1,a=!1;if(this.isLine(t,e,i))o=this.tangent(t,e,F,H);else{var p={x:this.isMonotonicByField(t,e,i,F),y:this.isMonotonicByField(t,e,i,H)};p.x&&p.y?(o=this.tangent(t,i,F,H),s=!0):(this.invertAxis(t,e,i)&&(r=H,n=F),p[r]?o=0:(o=.01*(i[n]<t[n]&&t[n]<=e[n]||t[n]<i[n]&&e[n]<=t[n]?Ur((i[n]-t[n])*(e[r]-t[r])):-Ur((i[r]-t[r])*(e[n]-t[n]))),a=!0))}var l=this.secondControlPoint(o,t,e,r,n);if(a){var h=r;r=n,n=h}var c=this.firstControlPoint(o,e,i,r,n);return s&&(this.restrictControlPoint(t,e,l,o),this.restrictControlPoint(e,i,c,o)),[l,c]},Nr.prototype.restrictControlPoint=function(t,e,i,o){t.y<e.y?e.y<i.y?(i.x=t.x+(e.y-t.y)/o,i.y=e.y):i.y<t.y&&(i.x=e.x-(e.y-t.y)/o,i.y=t.y):i.y<e.y?(i.x=t.x-(t.y-e.y)/o,i.y=e.y):t.y<i.y&&(i.x=e.x+(t.y-e.y)/o,i.y=t.y)},Nr.prototype.tangent=function(t,e,i,o){var r=e[i]-t[i],n=e[o]-t[o];return 0===r?0:n/r},Nr.prototype.isMonotonicByField=function(t,e,i,o){return i[o]>e[o]&&e[o]>t[o]||i[o]<e[o]&&e[o]<t[o]},Nr.prototype.firstControlPoint=function(t,e,i,o,r){var n=e[o],s=.333*(i[o]-n);return this.point(n+s,e[r]+s*t,o,r)},Nr.prototype.secondControlPoint=function(t,e,i,o,r){var n=e[o],s=i[o],a=.333*(s-n);return this.point(s-a,i[r]-a*t,o,r)},Nr.prototype.point=function(t,e,i,o){var r=new q.geometry.Point;return r[i]=t,r[o]=e,r},Nr.prototype.calculateFunction=function(t,e){for(var i=t.length,o=0,r=0;r<i;r++)o+=Math.pow(e,r)*t[r];return o};const Gr=Nr;var Wr=function(t){this._axis=t,this.options=t.options};Wr.prototype.value=function(t){var e=this._axis;return e.getCategory?e.getCategory(t):e.getValue(t)},Wr.prototype.slot=function(t,e,i){return void 0===i&&(i=!0),this._axis.slot(t,e,i)},Wr.prototype.range=function(){return this._axis.range()},Wr.prototype.valueRange=function(){return this._axis.valueRange()};const Xr=Wr;function Yr(t,e){for(var i=0;i<e.length;i++)if(e[i].options.name===t)return e[i].prepareUserOptions(),new Xr(e[i])}var qr=function(t){this.visual=t.visual,this.chartsVisual=t.chartContainer.visual,this._pane=t};qr.prototype.findAxisByName=function(t){return Yr(t,this._pane.axes)};const Zr=qr,Qr=function(t){this._plotArea=t,this.visual=t.visual,this.backgroundVisual=t._bgVisual};function Kr(t){for(var e=t.length,i=0,o=0;o<e;o++)K(t[o])&&i++;return i}var $r={min:function(t){for(var e=t.length,i=P,o=0;o<e;o++){var r=t[o];K(r)&&(i=Math.min(i,r))}return i===P?t[0]:i},max:function(t){for(var e=t.length,i=T,o=0;o<e;o++){var r=t[o];K(r)&&(i=Math.max(i,r))}return i===T?t[0]:i},sum:function(t){for(var e=t.length,i=0,o=0;o<e;o++){var r=t[o];K(r)&&(i+=r)}return i},sumOrNull:function(t){var e=null;return Kr(t)&&(e=$r.sum(t)),e},count:function(t){for(var e=t.length,i=0,o=0;o<e;o++){null!=t[o]&&i++}return i},avg:function(t){var e=Kr(t),i=t[0];return e>0&&(i=$r.sum(t)/e),i},first:function(t){for(var e=t.length,i=0;i<e;i++){var o=t[i];if(null!=o)return o}return t[0]}};const Jr=$r;function tn(t,e){return null===e?e:_t(t)(e)}var en=function(){this._valueFields={},this._otherFields={},this._nullValue={},this._undefinedValue={}};en.prototype.register=function(t,e,i){void 0===e&&(e=[z]),void 0===i&&(i={});for(var o=0;o<t.length;o++){var r=t[o];this._valueFields[r]=e,this._otherFields[r]=i,this._nullValue[r]=this._makeValue(e,null),this._undefinedValue[r]=this._makeValue(e,void 0)}},en.prototype.canonicalFields=function(t){return this.valueFields(t).concat(this.otherFields(t))},en.prototype.valueFields=function(t){return this._valueFields[t.type]||[z]},en.prototype.otherFields=function(t){return this._otherFields[t.type]||[z]},en.prototype.bindPoint=function(t,e,i){var o,r,n=t.data,s=void 0!==i?i:n[e],a={valueFields:{value:s}},p=this.valueFields(t),l=this._otherFields[t.type];if(null===s)r=this._nullValue[t.type];else if(void 0===s)r=this._undefinedValue[t.type];else if(Array.isArray(s)){var h=s.slice(p.length);r=this._bindFromArray(s,p),o=this._bindFromArray(h,l)}else if("object"==typeof s){var c=this.sourceFields(t,p),u=this.sourceFields(t,l);r=this._bindFromObject(s,p,c),o=this._bindFromObject(s,l,u)}return void 0!==r&&(1===p.length?a.valueFields.value=r[p[0]]:a.valueFields=r),a.fields=o||{},a},en.prototype._makeValue=function(t,e){for(var i={},o=t.length,r=0;r<o;r++)i[t[r]]=e;return i},en.prototype._bindFromArray=function(t,e){var i={};if(e)for(var o=Math.min(e.length,t.length),r=0;r<o;r++)i[e[r]]=t[r];return i},en.prototype._bindFromObject=function(t,e,i){void 0===i&&(i=e);var o={};if(e)for(var r=e.length,n=0;n<r;n++){var s=e[n],a=i[n];null!==a&&(o[s]=tn(a,t))}return o},en.prototype.sourceFields=function(t,e){var i=[];if(e)for(var o=e.length,r=0;r<o;r++){var n=e[r],s=n===z?"field":n+"Field";i.push(null!==t[s]?t[s]||n:null)}return i},en.current=new en;const on=en;var rn=/percent(?:\w*)\((\d+)\)/,nn=new RegExp("^stddev(?:\\((\\d+(?:\\.\\d+)?)\\))?$"),sn=function(t,e,i){this.initGlobalRanges(t,e,i)};sn.prototype.initGlobalRanges=function(t,e,i){var o=e.data,r=nn.exec(t);if(r){this.valueGetter=this.createValueGetter(e,i);var n=this.getAverage(o),s=this.getStandardDeviation(o,n,!1),a=r[1]?parseFloat(r[1]):1,p={low:n.value-s*a,high:n.value+s*a};this.globalRange=function(){return p}}else if(t.indexOf&&t.indexOf("stderr")>=0){this.valueGetter=this.createValueGetter(e,i);var l=this.getStandardError(o,this.getAverage(o));this.globalRange=function(t){return{low:t-l,high:t+l}}}},sn.prototype.createValueGetter=function(t,e){var i,o=t.data,r=on.current,n=r.valueFields(t),s=jt(o[0])?o[0]:{};return G(s)?i=_t("["+(e?n.indexOf(e):0)+"]"):K(s)?i=_t():typeof s===O&&(i=_t(r.sourceFields(t,n)[n.indexOf(e)])),i},sn.prototype.getErrorRange=function(t,e){var i,o,r;if(!jt(e))return null;if(this.globalRange)return this.globalRange(t);if(G(e))i=t-e[0],o=t+e[1];else if(K(r=parseFloat(e)))i=t-r,o=t+r;else{if(!(r=rn.exec(e)))throw new Error("Invalid ErrorBar value: "+e);var n=t*(parseFloat(r[1])/100);i=t-Math.abs(n),o=t+Math.abs(n)}return{low:i,high:o}},sn.prototype.getStandardError=function(t,e){return this.getStandardDeviation(t,e,!0)/Math.sqrt(e.count)},sn.prototype.getStandardDeviation=function(t,e,i){for(var o=t.length,r=i?e.count-1:e.count,n=0,s=0;s<o;s++){var a=this.valueGetter(t[s]);K(a)&&(n+=Math.pow(a-e.value,2))}return Math.sqrt(n/r)},sn.prototype.getAverage=function(t){for(var e=t.length,i=0,o=0,r=0;r<e;r++){var n=this.valueGetter(t[r]);K(n)&&(i+=n,o++)}return{value:i/o,count:o}};const an=sn;var pn=q.support.browser||{},ln=600,hn="fadeIn",cn=.8,un=pn.msie?.001:0,dn="errorLow",fn="errorHigh",gn="zero",yn="interpolate",vn="above",mn="below",xn="smooth",bn="step",_n="area",wn="bar",kn="boxPlot",An="bubble",Sn="bullet",Cn="candlestick",Pn="column",Tn="donut",Mn="funnel",On="pyramid",Ln="heatmap",Bn="horizontalWaterfall",In="line",En="ohlc",Rn="pie",Vn="polarArea",zn="polarLine",jn="polarScatter",Dn="radarArea",Fn="radarColumn",Hn="radarLine",Nn="rangeArea",Un="rangeBar",Gn="rangeColumn",Wn="scatter",Xn="scatterLine",Yn="verticalArea",qn="verticalBoxPlot",Zn="verticalBullet",Qn="verticalLine",Kn="verticalRangeArea",$n="waterfall",Jn=[wn,Pn,En,Cn,kn,qn,Sn,Gn,Un,$n,Bn],ts="exponentialTrendline",es="linearTrendline",is="logarithmicTrendline",os="movingAverageTrendline",rs="polynomialTrendline",ns="powerTrendline",ss=[ts,es,is,os,rs,ns],as="legendItemClick",ps="seriesClick",ls="seriesHover",hs="seriesOver",cs="seriesLeave",us="plotAreaHover",ds="plotAreaLeave",fs="drag",gs="dragEnd",ys="dragStart",vs="zoomStart",ms="zoom",xs="zoomEnd",bs="selectStart",_s="select",ws="selectEnd",ks="showTooltip",As="hideTooltip",Ss="graphics-symbol",Cs="k-chart-point",Ps="Point",Ts="log",Ms="category",Os="insideEnd",Ls="outsideEnd",Bs="wheel",Is="drilldown",Es="pattern",Rs=function(t){function e(e,i,o,r,n,s){t.call(this,s),this.low=e,this.high=i,this.isVertical=o,this.chart=r,this.series=n}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reflow=function(t){var e,i=this.options.endCaps,o=this.isVertical,r=this.getAxis().getSlot(this.low,this.high),n=t.center(),s=this.getCapsWidth(t,o),a=o?n.x:n.y,p=a-s,l=a+s;o?(e=[new xi(n.x,r.y1),new xi(n.x,r.y2)],i&&e.push(new xi(p,r.y1),new xi(l,r.y1),new xi(p,r.y2),new xi(l,r.y2)),this.box=new wi(p,r.y1,l,r.y2)):(e=[new xi(r.x1,n.y),new xi(r.x2,n.y)],i&&e.push(new xi(r.x1,p),new xi(r.x1,l),new xi(r.x2,p),new xi(r.x2,l)),this.box=new wi(r.x1,p,r.x2,l)),this.linePoints=e},e.prototype.getCapsWidth=function(t,e){var i=e?t.width():t.height();return Math.min(Math.floor(i/2),4)||4},e.prototype.createVisual=function(){var t=this,e=this.options,i=e.visual;i?this.visual=i({low:this.low,high:this.high,rect:this.box.toRect(),sender:this.getSender(),options:{endCaps:e.endCaps,color:e.color,line:e.line},createVisual:function(){t.createDefaultVisual();var e=t.visual;return delete t.visual,e}}):this.createDefaultVisual()},e.prototype.createDefaultVisual=function(){var e=this.options,i=this.linePoints,o={stroke:{color:e.color,width:e.line.width,dashType:e.line.dashType}};t.prototype.createVisual.call(this);for(var r=0;r<i.length;r+=2){var n=new q.drawing.Path(o).moveTo(i[r].x,i[r].y).lineTo(i[r+1].x,i[r+1].y);Z(n),this.visual.append(n)}},e}(Li);te(Rs,{animation:{type:hn,delay:ln},endCaps:!0,line:{width:2},zIndex:1});const Vs=Rs;var zs=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getAxis=function(){return this.chart.seriesValueAxis(this.series)},e}(Vs);const js=zs;function Ds(t){for(var e=0;e<t.length;e++)if(jt(t[e].zIndex))return!0}function Fs(t,e){null!==e&&t.push(e)}function Hs(t){return Kr(t)===t.length}function Ns(t,e,i){var o=e.visible;if(jt(o))return o;var r=t.pointVisibility;return r?r[i]:void 0}function Us(t){for(var e=t.data,i=[],o=0,r=0,n=0;n<e.length;n++){var s=on.current.bindPoint(t,n),a=s.valueFields.value;$(a)&&(a=parseFloat(a)),K(a)?(s.visible=!1!==Ns(t,s.fields,n),s.value=Math.abs(a),i.push(s),s.visible&&(o+=s.value),0!==a&&r++):i.push(null)}return{total:o,points:i,count:r}}function Gs(t){for(var e=t.length,i=0,o=0;o<e;o++)i=Math.max(i,t[o].data.length);return i}function Ws(t,e){return t&&e?t.toLowerCase()===e.toLowerCase():t===e}var Xs=5;function Ys(t,e,i,o){void 0===i&&(i={}),void 0===o&&(o=!1);var r=i.defaults=i.defaults||{},n=i.depth=i.depth||0,s=!1;if(i.excluded=i.excluded||[],n>Xs)return null;for(var a in t)if(!Ct(a,i.excluded)&&Ae(t,a)){var p=t[a];ot(p)?(s=!0,o||(t[a]=Kt(p(e),r[a]))):pt(p)&&(o||(i.defaults=r[a]),i.depth++,s=Ys(p,e,i,o)||s,i.depth--)}return s}function qs(t,e){for(var i=[],o=[].concat(e),r=0;r<t.length;r++){var n=t[r];Ct(n.type,o)&&i.push(n)}return i}var Zs=new WeakMap;function Qs(t,e,i){if(null===e||"object"!=typeof e)return er(i,t);var o=Zs.get(e);return o||(o=er(i,t),Zs.set(e,o)),o}function Ks(t){var e=t.overlay;return e&&e.gradient&&"none"!==e.gradient}function $s(t){return jt(t)&&null!==t}function Js(t,e){var i=t.type,o=e instanceof Date;return!i&&o||Ws(i,m)}function ta(t){return 1===t.length?t[0]:t}var ea=/area/i;function ia(t,e){var i=on.current.bindPoint(t,null,e).valueFields;for(var o in i)if(J(i[o]))return!0}function oa(t){var e,i,o=t.start,r=t.dir,n=t.min,s=t.max,a=t.getter,p=t.hasItem,l=t.series,h=o;do{p(h+=r)&&(e=ia(l,(i=a(h)).item))}while(n<=h&&h<=s&&!e);if(e)return i}function ra(t,e,i,o,r){var n=e.min,s=e.max,a=n>0&&n<i,p=s+1<i;if(a||p){var l,h,c,u=function(t){return t.missingValues?t.missingValues:ea.test(t.type)||t.stack?gn:yn}(t);u!==yn?(a&&(l=o(n-1)),p&&(h=o(s+1))):(a&&(l=ia(t,(c=o(n-1)).item)?c:oa({start:n,dir:-1,min:0,max:i-1,getter:o,hasItem:r,series:t})),p&&(h=ia(t,(c=o(s+1)).item)?c:oa({start:s,dir:1,min:0,max:i-1,getter:o,hasItem:r,series:t}))),l&&(t._outOfRangeMinPoint=l),h&&(t._outOfRangeMaxPoint=h)}}function na(t,e){return e.forEach((function(e){var i=e&&e.options,o=e&&(e.box||e.wrapperBox);i&&o&&!1!==i.noclip&&!1!==i.visible&&!i.visual&&t.wrap(o)})),t}var sa=function(t){function e(e,i){t.call(this,i),this.plotArea=e,this.chartService=e.chartService,this.categoryAxis=e.seriesCategoryAxis(i.series[0]),this.valueAxisRanges={},this.points=[],this.categoryPoints=[],this.seriesPoints=[],this.seriesOptions=[],this._evalSeries=[],this.render()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.render=function(){this.traverseDataPoints(this.addValue.bind(this))},e.prototype.pointOptions=function(t,e){var i=this.seriesOptions[e];if(!i){var o=this.pointType().prototype.defaults;this.seriesOptions[e]=i=at({},o,{vertical:!this.options.invertAxes},t)}return i},e.prototype.plotValue=function(t){if(!t)return 0;if(this.options.isStacked100&&K(t.value)){for(var e=t.categoryIx,i=this.categoryPoints[e],o=[],r=0,n=0;n<i.length;n++){var s=i[n];if(s){var a=t.series.stack,p=s.series.stack;if(a&&p&&a.group!==p.group)continue;K(s.value)&&(r+=Math.abs(s.value),o.push(Math.abs(s.value)))}}if(r>0)return t.value/r}return t.value},e.prototype.plotRange=function(t,e){void 0===e&&(e=0);var i=this.categoryPoints[t.categoryIx];if(this.options.isStacked){var o=this.plotValue(t),r=o>=0,n=e,s=!1,a=void 0!==t.series.stack?t.series.stack:this.options.defaultStack,p=function(t){return!0===t||typeof t===O&&!t.group};if(a)for(var l=0;l<i.length;l++){var h=i[l];if(t===h)break;var c=void 0!==h.series.stack?h.series.stack:this.options.defaultStack;if(c&&(typeof a!==R||a===c)&&(!p(a)||p(c))&&(!a.group||a.group===c.group)){var u=this.plotValue(h);(u>=0&&r||u<0&&!r)&&(0!==e&&0===u||(n+=u,o+=u,s=!0,this.options.isStacked100&&(o=Math.min(o,1))))}}return s&&(n-=e),[n,o]}var d=t.series,f=this.seriesValueAxis(d),g=this.categoryAxisCrossingValue(f);return[g,J(t.value)?t.value:g]},e.prototype.stackLimits=function(t,e){for(var i=P,o=T,r=0;r<this.categoryPoints.length;r++){var n=this.categoryPoints[r];if(n)for(var s=0;s<n.length;s++){var a=n[s];if(a&&(a.series.stack===e||a.series.axis===t)){var p=this.plotRange(a,0)[1];void 0!==p&&isFinite(p)&&(o=Math.max(o,p),i=Math.min(i,p))}}}return{min:i,max:o}},e.prototype.updateStackRange=function(){var t=this.options,e=t.isStacked,i=t.series,o={};if(e)for(var r=0;r<i.length;r++){var n=i[r],s=n.axis,a=s+n.stack,p=o[a];if(!p){p=this.stackLimits(s,n.stack);var l=this.errorTotals;l&&(l.negative.length&&(p.min=Math.min(p.min,pe(l.negative).min)),l.positive.length&&(p.max=Math.max(p.max,pe(l.positive).max))),p.min!==P||p.max!==T?o[a]=p:p=null}p&&(this.valueAxisRanges[s]=p)}},e.prototype.addErrorBar=function(t,e,i){var o,r=t.value,n=t.series,s=t.seriesIx,a=t.options.errorBars,p=e.fields[dn],l=e.fields[fn];K(p)&&K(l)?o={low:p,high:l}:a&&void 0!==a.value&&(this.seriesErrorRanges=this.seriesErrorRanges||[],this.seriesErrorRanges[s]=this.seriesErrorRanges[s]||new an(a.value,n,z),o=this.seriesErrorRanges[s].getErrorRange(r,a.value)),o&&(t.low=o.low,t.high=o.high,this.addPointErrorBar(t,i))},e.prototype.addPointErrorBar=function(t,e){var i=!this.options.invertAxes,o=t.options.errorBars,r=t.series,n=t.low,s=t.high;if(this.options.isStacked){var a=this.stackedErrorRange(t,e);n=a.low,s=a.high}else{var p={categoryIx:e,series:r};this.updateRange({value:n},p),this.updateRange({value:s},p)}var l=new js(n,s,i,this,r,o);t.errorBars=[l],t.append(l)},e.prototype.stackedErrorRange=function(t,e){var i=this.plotRange(t,0)[1]-t.value,o=t.low+i,r=t.high+i;return this.errorTotals=this.errorTotals||{positive:[],negative:[]},o<0&&(this.errorTotals.negative[e]=Math.min(this.errorTotals.negative[e]||0,o)),r>0&&(this.errorTotals.positive[e]=Math.max(this.errorTotals.positive[e]||0,r)),{low:o,high:r}},e.prototype.addValue=function(t,e){var i=e.categoryIx,o=e.series,r=e.seriesIx,n=this.categoryPoints[i];n||(this.categoryPoints[i]=n=[]);var s=this.seriesPoints[r];s||(this.seriesPoints[r]=s=[]);var a=this.createPoint(t,e);a&&(Object.assign(a,e),a.owner=this,a.noteText=t.fields.noteText,void 0===a.dataItem&&(a.dataItem=o.data[i]),this.addErrorBar(a,t,i)),this.points.push(a),s.push(a),n.push(a),this.updateRange(t.valueFields,e)},e.prototype.evalPointOptions=function(t,e,i){var o=i.categoryIx,r=i.category,n=i.series,s=i.seriesIx,a={defaults:n._defaults,excluded:["data","aggregate","_events","tooltip","content","template","visual","toggle","_outOfRangeMinPoint","_outOfRangeMaxPoint","drilldownSeriesFactory","ariaTemplate","ariaContent"]},p=this._evalSeries[s];void 0===p&&(this._evalSeries[s]=p=Ys(t,{},a,!0));var l=t;return p&&Ys(l=at({},l),{value:e,category:r,index:o,series:n,dataItem:n.data[o]},a),l},e.prototype.updateRange=function(t,e){var i=e.series.axis,o=t.value,r=this.valueAxisRanges[i];isFinite(o)&&null!==o&&((r=this.valueAxisRanges[i]=r||{min:P,max:T}).min=Math.min(r.min,o),r.max=Math.max(r.max,o))},e.prototype.seriesValueAxis=function(t){var e=this.plotArea,i=t.axis,o=i?e.namedValueAxes[i]:e.valueAxis;if(!o)throw new Error("Unable to locate value axis with name "+i);return o},e.prototype.reflow=function(t){var e=this,i=this.categorySlots=[],o=this.points,r=this.categoryAxis,n=0;this.traverseDataPoints((function(t,s){var a=s.categoryIx,p=s.series,l=e.seriesValueAxis(p),h=o[n++],c=i[a];if(c||(i[a]=c=e.categorySlot(r,a,l)),h){var u=e.plotRange(h,l.startValue()),d=e.valueSlot(l,u);if(d){var f=e.pointSlot(c,d);h.aboveAxis=e.aboveAxis(h,l),h.stackValue=u[1],e.options.isStacked100&&(h.percentage=e.plotValue(h)),e.reflowPoint(h,f)}else h.visible=!1}})),this.reflowCategories(i),!this.options.clip&&this.options.limitPoints&&this.points.length&&this.limitPoints(),this.box=t},e.prototype.valueSlot=function(t,e){return t.getSlot(e[0],e[1],!this.options.clip)},e.prototype.limitPoints=function(){for(var t=this.categoryPoints,e=t[0].concat(Wt(t)),i=0;i<e.length;i++)e[i]&&this.limitPoint(e[i])},e.prototype.limitPoint=function(t){var e=this.categoryAxis.limitSlot(t.box);e.equals(t.box)||t.reflow(e)},e.prototype.aboveAxis=function(t,e){var i=this.categoryAxisCrossingValue(e),o=t.value;return e.options.reverse?o<i:o>=i},e.prototype.categoryAxisCrossingValue=function(t){var e=this.categoryAxis,i=t.options;return[].concat(i.axisCrossingValues||i.axisCrossingValue)[e.axisIndex||0]||0},e.prototype.reflowPoint=function(t,e){t.reflow(e)},e.prototype.reflowCategories=function(){},e.prototype.pointSlot=function(t,e){var i=this.options.invertAxes,o=i?e:t,r=i?t:e;return new wi(o.x1,r.y1,o.x2,r.y2)},e.prototype.categorySlot=function(t,e){return t.getSlot(e)},e.prototype.traverseDataPoints=function(t){for(var e=this.options.series,i=Gs(e),o=e.length,r=0;r<o;r++)this._outOfRangeCallback(e[r],"_outOfRangeMinPoint",r,t);for(var n=0;n<i;n++)for(var s=this.categoryAxis.categoryAt(n),a=0;a<o;a++){var p=e[a];t(this.plotArea.bindPoint(p,n),{category:s,categoryIx:n,categoriesCount:i,series:p,seriesIx:a})}for(var l=0;l<o;l++)this._outOfRangeCallback(e[l],"_outOfRangeMaxPoint",l,t)},e.prototype._outOfRangeCallback=function(t,e,i,o){var r=t[e];if(r){var n=r.categoryIx;o(this.plotArea.bindPoint(t,n,r.item),{category:r.category,categoryIx:n,series:t,seriesIx:i,dataItem:r.item})}},e.prototype.formatPointValue=function(t,e){return null===t.value?"":this.chartService.format.auto(e,t.value)},e.prototype.pointValue=function(t){return t.valueFields.value},e}(Li);te(sa,{series:[],invertAxes:!1,isStacked:!1,clip:!0,limitPoints:!0});const aa=sa;var pa={click:function(t,e){return t.trigger(ps,this.eventArgs(e))},hover:function(t,e){return t.trigger(ls,this.eventArgs(e))},over:function(t,e){return t.trigger(hs,this.eventArgs(e))},out:function(t,e){return t.trigger(cs,this.eventArgs(e))},eventArgs:function(t){return{value:this.value,percentage:this.percentage,stackValue:this.stackValue,category:this.category,series:this.series,dataItem:this.dataItem,runningTotal:this.runningTotal,total:this.total,element:Ut(t),originalEvent:t,point:this}}};const la=pa,ha={createNote:function(){var t=this.options.notes,e=this.noteText||t.label.text;!1!==t.visible&&null!=e&&(this.note=new no({value:this.value,text:e,dataItem:this.dataItem,category:this.category,series:this.series},this.options.notes,this.owner.chartService),this.append(this.note))}};var ca=function(t){function e(e,i){t.call(this,i),this.value=e,this.aboveAxis=Kt(this.options.aboveAxis,!0),this.tooltipTracking=!0,this._id=Le()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initOptions=function(t){this.options=Object.assign({},t)},e.prototype.render=function(){var t=this.options.markers;this._rendered||(this._rendered=!0,t.visible&&t.size&&(this.marker=this.createMarker(),this.append(this.marker)),this.createLabel(),this.createNote(),this.errorBar&&this.append(this.errorBar))},e.prototype.createLabel=function(){var t=this.options.labels;t.visible&&(this.label=this.createLabelElement(t),this.append(this.label))},e.prototype.createLabelElement=function(t){return new $i(this.getLabelText(t),Object.assign({},{align:f,vAlign:f,zIndex:Kt(t.zIndex,this.series.zIndex)},t,{margin:Object.assign({},{left:5,right:5},t.margin)}),this.pointData())},e.prototype.getLabelText=function(t){var e=vt(t);return e?e(this.pointData()):t.format?this.formatValue(t.format):this.value},e.prototype.getAriaLabelText=function(){var t=this.options.labels,e=mt(t);return e?e(this.pointData()):this.getLabelText(t)},e.prototype.markerBorder=function(){var t=this.options.markers,e=t.background,i=Object.assign({},{color:this.color},t.border);return void 0===i.color&&(i.color=new q.Color(e).brightness(cn).toHex()),i},e.prototype.createVisual=function(){},e.prototype.createMarker=function(){var t=this.options.markers;return new ji({type:t.type,width:t.size,height:t.size,rotation:t.rotation,background:t.background,border:this.markerBorder(),opacity:t.opacity,pattern:this.options.pattern,zIndex:Kt(t.zIndex,this.series.zIndex),animation:t.animation,visual:t.visual,accessibilityOptions:Object.assign({},{ariaLabel:this.getAriaLabelText(this.options.labels)},this.options.accessibility)},{dataItem:this.dataItem,value:this.value,series:this.series,category:this.category})},e.prototype.markerBox=function(){return this.marker||(this.marker=this.createMarker(),this.marker.reflow(this._childBox)),this.marker.box},e.prototype.reflow=function(t){var e=this.options,i=this.aboveAxis,o=e.vertical;this.render(),this.box=t;var r=t.clone();if(o?i?r.y1-=r.height():r.y2+=r.height():i?r.x1+=r.width():r.x2-=r.width(),this._childBox=r,this.marker&&this.marker.reflow(r),this.reflowLabel(r),this.errorBars)for(var n=0;n<this.errorBars.length;n++)this.errorBars[n].reflow(r);if(this.note){var s=this.markerBox();if(!e.markers.visible||!e.markers.size){var a=s.center();s=new wi(a.x,a.y,a.x,a.y)}this.note.reflow(s)}},e.prototype.reflowLabel=function(t){var e=this.options,i=this.label,o=e.labels.position;i&&(o=(o=o===vn?V:o)===mn?d:o,i.reflow(t),i.box.alignTo(this.markerBox(),o),i.reflow(i.box))},e.prototype.createHighlight=function(){var t=this.options.highlight.markers,e=this.markerBorder().color,i=this.options.markers,o=i.size+(i.border.width||0)+(t.border.width||0),r=new ji({type:i.type,width:o,height:o,rotation:i.rotation,background:t.color||e,border:{color:t.border.color,width:t.border.width,opacity:Kt(t.border.opacity,1)},opacity:Kt(t.opacity,1)});return r.reflow(this._childBox),r.getElement()},e.prototype.highlightVisual=function(){return(this.marker||{}).visual},e.prototype.highlightVisualArgs=function(){var t,e,i=this.marker;if(i)e=i.paddingBox.toRect(),t=i.visual;else{var o=this.options.markers.size,r=o/2,n=this.box.center();e=new q.geometry.Rect([n.x-r,n.y-r],[o,o])}return{options:this.options,rect:e,visual:t}},e.prototype.createFocusHighlight=function(){var t=this.options.markers,e=this.options.focusHighlight,i=t.size+(t.border.width||0),o=new ji({type:t.type,width:i,height:i,rotation:t.rotation,background:e.color,border:e.border,opacity:e.opacity,padding:e.border.width/2,zIndex:e.zIndex});return o.reflow(this._childBox),o.getElement()},e.prototype.tooltipAnchor=function(){var t=this.markerBox(),e=this.owner.pane.clipBox();if(!e||e.overlaps(t)){var i,o,r=t.x2+5,n=C;return this.aboveAxis?(i=t.y1,o=d):(i=t.y2,o=V),{point:new xi(r,i),align:{horizontal:n,vertical:o}}}},e.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},e.prototype.overlapsBox=function(t){return this.markerBox().overlaps(t)},e.prototype.clipElements=function(){this.options.visible=!1},e.prototype.unclipElements=function(){this.label&&(this.label.options.noclip=!0),this.note&&(this.note.options.noclip=!0)},e.prototype.unclipBox=function(){return na(this.markerBox().clone(),[this.label,this.note])},e.prototype.labelBox=function(){return this.label?this.label.box:new wi},e.prototype.noteBox=function(){return this.note?this.note.box:new wi},e.prototype.pointData=function(){return{dataItem:this.dataItem,category:this.category,value:this.value,percentage:this.percentage,stackValue:this.stackValue,series:this.series}},e.prototype.focusVisual=function(){this.marker&&(this.marker.visual&&this.marker.visual.options.set("id",this._id),this.toggleFocusHighlight(!0))},e.prototype.clearFocusFromVisual=function(){this.marker&&(this.marker.visual&&this.marker.visual.options.set("id",""),this.toggleFocusHighlight(!1))},e.prototype.getIndex=function(){return void 0!==this.categoryIx?this.categoryIx:this.pointIx},e}(Li);ca.prototype.defaults={vertical:!0,markers:{visible:!0,background:j,size:8,type:g,border:{width:2},opacity:1},labels:{visible:!1,position:vn,margin:dt(3),padding:dt(4),animation:{type:hn,delay:ln}},notes:{label:{}},highlight:{markers:{border:{color:"#fff",width:2}},zIndex:100},errorBars:{line:{width:1}},accessibility:{tabIndex:0,role:Ss,className:Cs,ariaRoleDescription:Ps}},at(ca.prototype,la),at(ca.prototype,ha);const ua=ca;var da=function(t){function e(e,i,o){t.call(this),this.linePoints=e,this.series=i,this.seriesIx=o}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.points=function(){return this.toGeometryPoints(this.linePoints)},e.prototype.toGeometryPoints=function(t){for(var e=[],i=0,o=t.length;i<o;i++)t[i]&&!1!==t[i].visible&&e.push(t[i]._childBox.toRect().center());return e},e.prototype.createVisual=function(){var t=this,e=this.series.visual;e?(this.visual=e({points:this.toGeometryPoints(this.linePoints),series:this.series,sender:this.getSender(),createVisual:function(){return t.segmentVisual(),t.visual}}),this.visual&&!jt(this.visual.options.zIndex)&&(this.visual.options.zIndex=this.series.zIndex)):this.segmentVisual()},e.prototype.segmentVisual=function(){var t=this.options,e=this.series,i=e.color,o=e._defaults;ot(i)&&o&&(i=o.color);var r=q.drawing.Path.fromPoints(this.points(),{stroke:{color:i,width:e.width,opacity:e.opacity,dashType:e.dashType},zIndex:e.zIndex});t.closed&&r.close(),this.visual=r},e.prototype.aliasFor=function(t,e){return this.parent.getNearestPoint(e.x,e.y,this.seriesIx)},e}(Li);te(da,{closed:!1});const fa=da;var ga={calculateStepPoints:function(t){for(var e=this.parent.plotArea.seriesCategoryAxis(this.series).options,i=e.justified,o=e.vertical,r=e.reverse,n=o?F:H,s=o?H:F,a=r?2:1,p=a,l=ya(t[0],n,a,s,p),h=[l],c=1;c<t.length;c++){var u=ya(t[c],n,a,s,p);if(l[n]!==u[n]){var d=new q.geometry.Point;d[n]=l[n],d[s]=u[s],h.push(d,u)}l=u}return i?l!==Wt(h)&&h.push(l):h.push(ya(Wt(t),n,a,s,r?1:2)),h}};function ya(t,e,i,o,r){var n=t.box,s=new q.geometry.Point;return s[e]=n[e+i],s[o]=n[o+r],s}const va=ga;var ma=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.points=function(){return this.calculateStepPoints(this.linePoints)},e}(fa);at(ma.prototype,va);const xa=ma;var ba=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.segmentVisual=function(){var t=this.series,e=t._defaults,i=t.color;ot(i)&&e&&(i=e.color);var o=new Gr(this.options.closed).process(this.points()),r=new q.drawing.Path({stroke:{color:i,width:t.width,opacity:t.opacity,dashType:t.dashType},zIndex:t.zIndex});r.segments.push.apply(r.segments,o),this.visual=r},e}(fa);const _a=ba;var wa={renderSegments:function(){var t,e=this.options,i=this.seriesPoints,o=e.series,r=i.length;this._segments=[];for(var n=0;n<r;n++){for(var s=o[n],a=this.sortPoints(i[n]),p=a.length,l=[],h=0;h<p;h++){var c=a[h];c?l.push(c):this.seriesMissingValues(s)!==yn&&(l.length>1&&(t=this.createSegment(l,s,n,t),this._addSegment(t)),l=[])}l.length>1&&(t=this.createSegment(l,s,n,t),this._addSegment(t))}this.children.unshift.apply(this.children,this._segments)},_addSegment:function(t){this._segments.push(t),t.parent=this},sortPoints:function(t){return t},seriesMissingValues:function(t){var e=t.missingValues;return!e&&this.options.isStacked?gn:e||yn},getNearestPoint:function(t,e,i){for(var o,r=new xi(t,e),n=this.seriesPoints[i],s=P,a=0;a<n.length;a++){var p=n[a];if(p&&void 0!==p.value&&null!==p.value&&!1!==p.visible){var l=p.box.center().distanceTo(r);l<s&&(o=p,s=l)}}return o}};const ka=wa;var Aa=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.setup=function(){this._setEnd(this.options.box.x1)},e.prototype.step=function(t){var e=this.options.box;this._setEnd(Pt(e.x1,e.x2,t))},e.prototype._setEnd=function(t){var e=this.element,i=e.segments,o=i[1].anchor(),r=i[2].anchor();e.suspend(),o.setX(t),e.resume(),r.setX(t)},e}(q.drawing.Animation);te(Aa,{duration:ln}),q.drawing.AnimationFactory.current.register("clip",Aa);const Sa=Aa,Ca={createAnimation:function(){var t=this.getRoot(),e=(t&&t.options||{}).transitions;if(t&&!1!==e){var i=this.parent&&this.parent.clipBox||t.size(),o=q.drawing.Path.fromRect(i.toRect()),r=e&&!0!==e?e.loading:e;this.visual.clip(o),this.animation=new Sa(o,Object.assign({},{box:i},r)),Ds(this.options.series)&&this._setChildrenAnimation(o)}},_setChildrenAnimation:function(t){for(var e=this.animationPoints(),i=0;i<e.length;i++){var o=e[i];o&&o.visual&&jt(o.visual.options.zIndex)&&o.visual.clip(t)}}};var Pa=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.render=function(){t.prototype.render.call(this),this.updateStackRange(),this.renderSegments()},e.prototype.pointType=function(){return ua},e.prototype.createPoint=function(t,e){var i=e.series,o=e.seriesIx,r=this.seriesMissingValues(i),n=t.valueFields.value;if(null==n){if(r!==gn)return null;n=0}var s=this.pointOptions(i,o);s=this.evalPointOptions(s,n,e);var a=t.fields.color||i.color;ot(i.color)&&(a=s.color);var p=new ua(n,s);return p.color=a,this.append(p),p},e.prototype.plotRange=function(t){var e=this.plotValue(t);if(this.options.isStacked)for(var i=t.categoryIx,o=this.categoryPoints[i],r=0;r<o.length;r++){var n=o[r];if(t===n)break;e+=this.plotValue(n),this.options.isStacked100&&(e=Math.min(e,1))}return[e,e]},e.prototype.createSegment=function(t,e,i){var o=e.style;return new(o===bn?xa:o===xn?_a:fa)(t,e,i)},e.prototype.animationPoints=function(){for(var t=this.points,e=[],i=0;i<t.length;i++)e.push((t[i]||{}).marker);return e.concat(this._segments)},e.prototype.supportsPointInactiveOpacity=function(){return!1},e}(aa);at(Pa.prototype,ka,Ca);const Ta=Pa;var Ma=function(t){function e(e,i,o,r,n){t.call(this,e,i,o),this.prevSegment=r,this.stackPoints=n}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createVisual=function(){var t=this.series,e=t._defaults,i=t.line||{},o=t.color;ot(o)&&e&&(o=e.color),this.visual=new q.drawing.Group({zIndex:t.zIndex}),this.createFill({fill:Ii(t.pattern,{color:o,opacity:t.opacity}),stroke:null}),i.width>0&&!1!==i.visible&&this.createStroke({stroke:at({color:o,opacity:t.opacity,lineCap:"butt"},i)})},e.prototype.strokeSegments=function(){var t=this._strokeSegments;return t||(t=this._strokeSegments=this.createStrokeSegments()),t},e.prototype.createStrokeSegments=function(){return this.segmentsFromPoints(this.points())},e.prototype.stackSegments=function(){return this.prevSegment?this.prevSegment.createStackSegments(this.stackPoints):this.createStackSegments(this.stackPoints)},e.prototype.createStackSegments=function(t){return this.segmentsFromPoints(this.toGeometryPoints(t)).reverse()},e.prototype.segmentsFromPoints=function(t){return t.map((function(t){return new q.geometry.Segment(t)}))},e.prototype.createStroke=function(t){var e=new q.drawing.Path(t);e.segments.push.apply(e.segments,this.strokeSegments()),this.visual.append(e)},e.prototype.hasStackSegment=function(){return this.prevSegment||this.stackPoints&&this.stackPoints.length},e.prototype.createFill=function(t){var e=this.strokeSegments(),i=e.slice(0),o=this.hasStackSegment();if(o){var r=this.stackSegments();Vt(i,r)}var n=new q.drawing.Path(t);n.segments.push.apply(n.segments,i),!o&&e.length>1&&this.fillToAxes(n),this.visual.append(n)},e.prototype.fillToAxes=function(t){var e=this.parent,i=e.options.invertAxes,o=e.seriesValueAxis(this.series),r=e.categoryAxisCrossingValue(o),n=o.getSlot(r,r,!0),s=this.strokeSegments(),a=s[0].anchor(),p=Wt(s).anchor(),l=i?n.x1:n.y1;i?t.lineTo(l,p.y).lineTo(l,a.y):t.lineTo(p.x,l).lineTo(a.x,l)},e}(fa);const Oa=Ma;var La=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createStrokeSegments=function(){return this.segmentsFromPoints(this.calculateStepPoints(this.linePoints))},e.prototype.createStackSegments=function(t){return this.segmentsFromPoints(this.calculateStepPoints(t)).reverse()},e}(Oa);at(La.prototype,va);const Ba=La;var Ia=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createStrokeSegments=function(){var t=new Gr(this.options.closed),e=this.points();return t.process(e)},e.prototype.createStackSegments=function(){for(var t=this.strokeSegments(),e=[],i=t.length-1;i>=0;i--){var o=t[i];e.push(new q.geometry.Segment(o.anchor(),o.controlOut(),o.controlIn()))}return e},e}(Oa);const Ea=Ia;var Ra=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createSegment=function(t,e,i,o){var r,n,s=this.options.isStacked,a=(e.line||{}).style;return s&&i>0&&o&&("gap"!==this.seriesMissingValues(e)?(n=o.linePoints,r=o):n=this._gapStackPoints(t,i,a)),new(a===bn?Ba:a===xn?Ea:Oa)(t,e,i,r,n)},e.prototype.reflow=function(e){t.prototype.reflow.call(this,e);var i=this._stackPoints;if(i)for(var o=0;o<i.length;o++){var r=i[o],n=this.categoryAxis.getSlot(r.categoryIx);r.reflow(n)}},e.prototype._gapStackPoints=function(t,e,i){var o=this.seriesPoints,r=t[0].categoryIx,n=t.length;r<0&&(r=0,n--);var s=r+n,a=this.seriesOptions[0]._outOfRangeMinPoint?1:0,p=[];this._stackPoints=this._stackPoints||[];for(var l=r;l<s;l++){var h=l+a,c=e,u=void 0;do{u=o[--c][h]}while(c>0&&!u);if(u)i!==bn&&l>r&&!o[c][h-1]&&p.push(this._previousSegmentPoint(l,h,h-1,c)),p.push(u),i!==bn&&l+1<s&&!o[c][h+1]&&p.push(this._previousSegmentPoint(l,h,h+1,c));else{var d=this._createGapStackPoint(l);this._stackPoints.push(d),p.push(d)}}return p},e.prototype._previousSegmentPoint=function(t,e,i,o){for(var r,n=this.seriesPoints,s=o;s>0&&!r;)r=n[--s][i];return r?r=n[s][e]:(r=this._createGapStackPoint(t),this._stackPoints.push(r)),r},e.prototype._createGapStackPoint=function(t){var e=this.pointOptions({},0),i=new ua(0,e);return i.categoryIx=t,i.series={},i},e.prototype.seriesMissingValues=function(t){return t.missingValues||gn},e.prototype.supportsPointInactiveOpacity=function(){return!1},e}(Ta);const Va=Ra;var za=function(){this.axisRanges={}};za.prototype.update=function(t){var e=this.axisRanges;for(var i in t){var o=t[i],r=e[i];e[i]=r=r||{min:P,max:T},r.min=Math.min(r.min,o.min),r.max=Math.max(r.max,o.max)}},za.prototype.reset=function(t){this.axisRanges[t]=void 0},za.prototype.query=function(t){return this.axisRanges[t]};const ja=za;var Da=function(t){function e(e,i,o){t.call(this,i),this.textBox=new $i(e,this.options,o),this.append(this.textBox)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createVisual=function(){this.textBox.options.noclip=this.options.noclip},e.prototype.reflow=function(t){var e=this.options,i=e.vertical,o=e.aboveAxis,r=this.children[0],n=r.options,s=r.box,a=r.options.padding,p=t;if(n.align=i?f:C,n.vAlign=i?V:f,e.position===Os)i?(n.vAlign=V,!o&&s.height()<t.height()&&(n.vAlign=d)):n.align=o?B:C;else if(e.position===f)n.vAlign=f,n.align=f;else if("insideBase"===e.position)i?n.vAlign=o?d:V:n.align=o?C:B;else if(e.position===Ls)if(i)if(o){var l=(s.width()-t.width()-a.left-a.right)/2;p=new wi(t.x1-l,t.y1-s.height(),t.x2+l,t.y1)}else p=new wi(t.x1,t.y2,t.x2,t.y2+s.height());else n.align=f,p=o?new wi(t.x2,t.y1,t.x2+s.width(),t.y2):new wi(t.x1-s.width(),t.y1,t.x1,t.y2);e.rotation||(i?a.left=a.right=(p.width()-r.contentBox.width())/2:a.top=a.bottom=(p.height()-r.contentBox.height())/2),r.reflow(p)},e.prototype.alignToClipBox=function(t){var e=this.options.vertical?H:F,i=e+"1",o=e+"2",r=this.children[0],n=this.parent.box;if(n[i]<t[i]||t[o]<n[o]){var s=r.paddingBox.clone();s[i]=Math.max(n[i],t[i]),s[o]=Math.min(n[o],t[o]),this.reflow(s)}},e}(Li);te(Da,{position:Ls,margin:dt(3),padding:dt(4),color:u,background:"",border:{width:1,color:""},aboveAxis:!0,vertical:!1,animation:{type:hn,delay:ln},zIndex:2});const Fa=Da,Ha={addAccessibilityAttributesToVisual:function(){this._id=this._id||Be();var t=Object.assign({},{ariaLabel:this.getAriaLabelText()},this.options.accessibility);Vi(this.visual,t)},getAriaLabelText:function(){var t=this.options.labels,e=mt(t);return e?e(this.pointData()):this.getLabelText(t)},focusVisual:function(){this.visual.options.set("id",this._id),this.toggleFocusHighlight(!0)},clearFocusFromVisual:function(){this.visual.options.set("id",""),this.toggleFocusHighlight(!1)}};var Na=function(t){function e(e,i){t.call(this),this.options=i,this.color=i.color||j,this.aboveAxis=Kt(this.options.aboveAxis,!0),this.value=e}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.render=function(){this._rendered||(this._rendered=!0,this.createLabel(),this.createNote(),this.errorBar&&this.append(this.errorBar))},e.prototype.createLabel=function(){var t=this.options.labels;t.visible&&(this.label=this.createLabelElement(t),this.append(this.label))},e.prototype.createLabelElement=function(t){return new Fa(this.getLabelText(t),at({vertical:this.options.vertical},t),this.pointData())},e.prototype.getLabelText=function(t){var e=vt(t);return e?e(this.pointData()):this.formatValue(t.format)},e.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},e.prototype.reflow=function(t){this.render();var e=this.label;if(this.box=t,e&&(e.options.aboveAxis=this.aboveAxis,e.reflow(t)),this.note&&this.note.reflow(t),this.errorBars)for(var i=0;i<this.errorBars.length;i++)this.errorBars[i].reflow(t)},e.prototype.createVisual=function(){var e=this,i=this.box,o=this.options,r=o.visual;if(!1!==this.visible)if(t.prototype.createVisual.call(this),this.addAccessibilityAttributesToVisual(),r){var n=this.rectVisual=r({category:this.category,dataItem:this.dataItem,value:this.value,sender:this.getSender(),series:this.series,percentage:this.percentage,stackValue:this.stackValue,runningTotal:this.runningTotal,total:this.total,rect:i.toRect(),createVisual:function(){var t=new q.drawing.Group;return e.createRect(t),t},options:o});n&&this.visual.append(n)}else i.width()>0&&i.height()>0&&this.createRect(this.visual)},e.prototype.createRect=function(t){var e=this.options,i=e.border,o=jt(i.opacity)?i.opacity:e.opacity,r=this.box.toRect();r.size.width=Math.round(r.size.width);var n=this.rectVisual=q.drawing.Path.fromRect(r,{fill:Ii(e.pattern,{color:this.color,opacity:e.opacity}),stroke:{color:this.getBorderColor(),width:i.width,opacity:o,dashType:i.dashType}}),s=this.box.width(),a=this.box.height();if((e.vertical?s:a)>6&&(Z(n),(s<1||a<1)&&(n.options.stroke.lineJoin="round")),t.append(n),Ks(e)){var p=this.createGradientOverlay(n,{baseColor:this.color},at({end:e.vertical?void 0:[0,1]},e.overlay));t.append(p)}},e.prototype.createHighlight=function(t){return Z(q.drawing.Path.fromRect(this.box.toRect(),t))},e.prototype.highlightVisual=function(){return this.rectVisual},e.prototype.highlightVisualArgs=function(){return{options:this.options,rect:this.box.toRect(),visual:this.rectVisual}},e.prototype.createFocusHighlight=function(t){var e=this.options.focusHighlight.border.width;return Z(q.drawing.Path.fromRect(this.box.pad(e/2).toRect(),t))},e.prototype.getBorderColor=function(){var t=this.color,e=this.options.border,i=e._brightness||cn,o=e.color;return jt(o)||(o=new q.Color(t).brightness(i).toHex()),o},e.prototype.tooltipAnchor=function(){var t,e,i=this,o=i.options,r=i.box,n=i.aboveAxis,s=this.owner.pane.clipBox()||r,a=C,p=V;if(o.vertical)t=Math.min(r.x2,s.x2)+5,n?e=Math.max(r.y1,s.y1):(e=Math.min(r.y2,s.y2),p=d);else{var l=Math.max(r.x1,s.x1),h=Math.min(r.x2,s.x2);o.isStacked?(p=d,n?(a=B,t=h):t=l,e=Math.max(r.y1,s.y1)-5):(n?t=h+5:(t=l-5,a=B),e=Math.max(r.y1,s.y1))}return{point:new xi(t,e),align:{horizontal:a,vertical:p}}},e.prototype.overlapsBox=function(t){return this.box.overlaps(t)},e.prototype.unclipBox=function(){var t=this.label&&this.label.textBox;return na(this.box.clone(),[t,this.note])},e.prototype.labelBox=function(){var t=this.label&&this.label.textBox;return t?t.box:new wi},e.prototype.noteBox=function(){return this.note?this.note.box:new wi},e.prototype.pointData=function(){return{dataItem:this.dataItem,category:this.category,value:this.value,percentage:this.percentage,stackValue:this.stackValue,runningTotal:this.runningTotal,total:this.total,series:this.series}},e.prototype.getIndex=function(){return this.categoryIx},e}(Li);at(Na.prototype,la),at(Na.prototype,ha),at(Na.prototype,Ha),Na.prototype.defaults={border:{width:1},vertical:!0,overlay:{gradient:"glass"},labels:{visible:!1,format:"{0}"},opacity:1,notes:{label:{}},accessibility:{role:Ss,className:Cs,ariaRoleDescription:Ps}};const Ua=Na;function Ga(t,e){t.forEach(e)}function Wa(t,e){for(var i=t.length,o=i-1;o>=0;o--)e(t[o],o-i-1)}var Xa=function(t){function e(e){t.call(this,e),this.forEach=e.rtl?Wa:Ga}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reflow=function(t){var e=this.options,i=e.vertical,o=e.gap,r=e.spacing,n=this.children,s=n.length,a=i?H:F,p=s+o+r*(s-1),l=(i?t.height():t.width())/p,h=t[a+1]+l*(o/2);this.forEach(n,(function(e,i){var o=(e.box||t).clone();o[a+1]=h,o[a+2]=h+l,e.reflow(o),i<s-1&&(h+=l*r),h+=l}))},e}(Li);te(Xa,{vertical:!1,gap:0,spacing:0});const Ya=Xa;var qa=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reflow=function(t){for(var e=this.options.vertical?F:H,i=this.children,o=i.length,r=this.box=new wi,n=0;n<o;n++){var s=i[n];if(!1!==s.visible){var a=s.box.clone();a.snapTo(t,e),0===n&&(r=this.box=a.clone()),s.reflow(a),r.wrap(a)}}},e}(Li);te(qa,{vertical:!0});const Za=qa;var Qa=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.render=function(){t.prototype.render.call(this),this.updateStackRange()},e.prototype.pointType=function(){return Ua},e.prototype.clusterType=function(){return Ya},e.prototype.stackType=function(){return Za},e.prototype.stackLimits=function(e,i){return t.prototype.stackLimits.call(this,e,i)},e.prototype.createPoint=function(t,e){var i=e.categoryIx,o=e.series,r=e.seriesIx,n=this.options,s=this.children,a=jt(o.stack)?o.stack:n.defaultStack,p=this.pointValue(t),l=this.pointOptions(o,r),h=l.labels;a&&h.position===Ls&&(h.position=Os),l.isStacked=a;var c=t.fields.color||o.color;p<0&&l.negativeColor&&(c=l.negativeColor),l=this.evalPointOptions(l,p,e),ot(o.color)&&(c=l.color);var u=new(this.pointType())(p,l);u.color=c;var d=s[i];return d||(d=new(this.clusterType())({vertical:n.invertAxes,gap:n.gap,spacing:n.spacing,rtl:!n.invertAxes&&(this.chartService||{}).rtl}),this.append(d)),n.isStacked?this.getStackWrap(a,d).append(u):d.append(u),u},e.prototype.getStackWrap=function(t,e){var i,o=typeof t===O?t.group||!0:t,r=e.children;if(typeof o===R||!0===o)for(var n=0;n<r.length;n++)if(r[n]._stackGroup===o){i=r[n];break}return i||((i=new(this.stackType())({vertical:!this.options.invertAxes}))._stackGroup=o,e.append(i)),i},e.prototype.categorySlot=function(t,e,i){var o=this.options,r=t.getSlot(e),n=i.startValue();if(o.isStacked){var s=i.getSlot(n,n,!0),a=o.invertAxes?F:H;r[a+1]=r[a+2]=s[a+1]}return r},e.prototype.reflowCategories=function(t){for(var e=this.children,i=e.length,o=0;o<i;o++)e[o].reflow(t[o])},e.prototype.createAnimation=function(){this._setAnimationOptions(),t.prototype.createAnimation.call(this),Ds(this.options.series)&&this._setChildrenAnimation()},e.prototype._setChildrenAnimation=function(){for(var t=this.points,e=0;e<t.length;e++){var i=t[e],o=i.visual;o&&jt(o.options.zIndex)&&(i.options.animation=this.options.animation,i.createAnimation())}},e.prototype._setAnimationOptions=function(){var t,e=this.options,i=e.animation||{};if(e.isStacked){var o=this.seriesValueAxis(e.series[0]);t=o.getSlot(o.startValue())}else t=this.categoryAxis.getSlot(0);i.origin=new q.geometry.Point(t.x1,t.y1),i.vertical=!e.invertAxes},e}(aa);te(Qa,{animation:{type:wn}});const Ka=Qa;var $a=function(t){function e(e,i){t.call(this,i),this.value=e}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getLabelText=function(t){return this.formatValue(t.format)},e.prototype.reflow=function(t){var e=this,i=e.options,o=e.value,r=e.owner.seriesValueAxis(i),n=r.getSlot(o.open,o.close),s=r.getSlot(o.low,o.high);n.x1=s.x1=t.x1,n.x2=s.x2=t.x2,this.realBody=n;var a=s.center().x,p=[];p.push([[a,s.y1],[a,n.y1]]),p.push([[a,n.y2],[a,s.y2]]),this.lines=p,this.box=s.clone().wrap(n),this._rendered||(this._rendered=!0,this.createNote()),this.reflowNote()},e.prototype.reflowNote=function(){this.note&&this.note.reflow(this.box)},e.prototype.createVisual=function(){t.prototype.createVisual.call(this),this.addAccessibilityAttributesToVisual(),this._mainVisual=this.mainVisual(this.options),this.visual.append(this._mainVisual),this.createOverlay()},e.prototype.mainVisual=function(t){var e=new q.drawing.Group;return this.createBody(e,t),this.createLines(e,t),e},e.prototype.createBody=function(t,e){var i=q.drawing.Path.fromRect(this.realBody.toRect(),{fill:Ii(e.pattern,{color:this.color,opacity:e.opacity}),stroke:null});e.border.width>0&&i.options.set("stroke",{color:this.getBorderColor(e),width:e.border.width,dashType:e.border.dashType,opacity:Kt(e.border.opacity,e.opacity)}),Z(i),t.append(i),Ks(e)&&t.append(this.createGradientOverlay(i,{baseColor:this.color},at({end:e.vertical?void 0:[0,1]},e.overlay)))},e.prototype.createLines=function(t,e){this.drawLines(t,e,this.lines,e.line)},e.prototype.drawLines=function(t,e,i,o){if(i)for(var r={stroke:{color:o.color||this.color,opacity:Kt(o.opacity,e.opacity),width:o.width,dashType:o.dashType,lineCap:"butt"}},n=0;n<i.length;n++){var s=q.drawing.Path.fromPoints(i[n],r);Z(s),t.append(s)}},e.prototype.getBorderColor=function(t){var e=t.border.color;return jt(e)||(e=new q.Color(this.color).brightness(this.options.border._brightness).toHex()),e},e.prototype.createOverlay=function(){var t=q.drawing.Path.fromRect(this.box.toRect(),{fill:{color:j,opacity:0},stroke:null});this.visual.append(t)},e.prototype.createHighlight=function(){var t=this.options.highlight,e=this.color;this.color=t.color||this.color;var i=this.mainVisual(at({},this.options,{line:{color:this.getBorderColor(t)}},t));return this.color=e,i},e.prototype.highlightVisual=function(){return this._mainVisual},e.prototype.highlightVisualArgs=function(){return{options:this.options,rect:this.box.toRect(),visual:this._mainVisual}},e.prototype.tooltipAnchor=function(){var t=this.box,e=this.owner.pane.clipBox()||t;return{point:new xi(t.x2+5,Math.max(t.y1,e.y1)+5),align:{horizontal:C,vertical:V}}},e.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},e.prototype.overlapsBox=function(t){return this.box.overlaps(t)},e.prototype.pointData=function(){return{dataItem:this.dataItem,value:this.value,meanPoints:this.meanPoints,medianPoints:this.medianPoints,whiskerPoints:this.whiskerPoints,stackValue:this.stackValue,series:this.series}},e.prototype.getIndex=function(){return this.categoryIx},e}(Li);$a.prototype.createFocusHighlight=Ua.prototype.createFocusHighlight,te($a,{vertical:!0,border:{_brightness:.8},line:{width:2},overlay:{gradient:"glass"},tooltip:{format:"<table><tr><th colspan='2'>{4:d}</th></tr><tr><td>Open:</td><td>{0:C}</td></tr><tr><td>High:</td><td>{1:C}</td></tr><tr><td>Low:</td><td>{2:C}</td></tr><tr><td>Close:</td><td>{3:C}</td></tr></table>"},labels:{format:""},highlight:{opacity:1,border:{width:1,opacity:1},line:{width:1,opacity:1}},notes:{visible:!0,label:{}},accessibility:{role:Ss,className:Cs,ariaRoleDescription:Ps}}),at($a.prototype,la),at($a.prototype,ha),at($a.prototype,Ha);const Ja=$a;var tp=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reflowCategories=function(t){for(var e=this.children,i=e.length,o=0;o<i;o++)e[o].reflow(t[o])},e.prototype.addValue=function(t,e){var i,o=e.categoryIx,r=e.category,n=e.series,s=e.seriesIx,a=this.children,p=this.options,l=t.valueFields,h=Hs(this.splitValue(l)),c=n.data[o],u=this.categoryPoints[o];u||(this.categoryPoints[o]=u=[]),h&&(i=this.createPoint(t,e));var d=a[o];d||(d=new Ya({vertical:p.invertAxes,gap:p.gap,spacing:p.spacing,rtl:!p.invertAxes&&(this.chartService||{}).rtl}),this.append(d)),i&&(this.updateRange(l,e),d.append(i),i.categoryIx=o,i.category=r,i.series=n,i.seriesIx=s,i.owner=this,i.dataItem=c,i.noteText=t.fields.noteText),this.points.push(i),u.push(i)},e.prototype.pointType=function(){return Ja},e.prototype.createPoint=function(t,e){var i=e.series,o=this.pointType(),r=t.valueFields,n=at({},i),s=t.fields.color||i.color;n=this.evalPointOptions(n,r,e),i.type!==Cn&&i.type!==En||r.open>r.close&&(s=t.fields.downColor||i.downColor||i.color),ot(i.color)&&(s=n.color),n.vertical=!this.options.invertAxes;var a=new o(r,n);return a.color=s,a},e.prototype.splitValue=function(t){return[t.low,t.open,t.close,t.high]},e.prototype.updateRange=function(t,e){var i=e.series.axis,o=this.splitValue(t),r=this.valueAxisRanges[i]||{min:P,max:T};this.valueAxisRanges[i]={min:Math.min.apply(Math,o.concat([r.min])),max:Math.max.apply(Math,o.concat([r.max]))}},e.prototype.formatPointValue=function(t,e){var i=t.value;return this.chartService.format.auto(e,i.open,i.high,i.low,i.close,t.category)},e.prototype.animationPoints=function(){return this.points},e}(aa);at(tp.prototype,Ca);const ep=tp;var ip=function(t){function e(e,i){t.call(this,e,i),this.createNote()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reflow=function(t){var e,i,o=this,r=o.options,n=o.value,s=o.owner.seriesValueAxis(r);this.boxSlot=i=s.getSlot(n.q1,n.q3),this.realBody=i,this.reflowBoxSlot(t),this.whiskerSlot=e=s.getSlot(n.lower,n.upper),this.reflowWhiskerSlot(t);var a=s.getSlot(n.median);if(n.mean){var p=s.getSlot(n.mean);this.meanPoints=this.calcMeanPoints(t,p)}this.whiskerPoints=this.calcWhiskerPoints(i,e),this.medianPoints=this.calcMedianPoints(t,a),this.box=e.clone().wrap(i),this.reflowNote()},e.prototype.reflowBoxSlot=function(t){this.boxSlot.x1=t.x1,this.boxSlot.x2=t.x2},e.prototype.reflowWhiskerSlot=function(t){this.whiskerSlot.x1=t.x1,this.whiskerSlot.x2=t.x2},e.prototype.calcMeanPoints=function(t,e){return[[[t.x1,e.y1],[t.x2,e.y1]]]},e.prototype.calcWhiskerPoints=function(t,e){var i=e.center().x;return[[[i-5,e.y1],[i+5,e.y1],[i,e.y1],[i,t.y1]],[[i-5,e.y2],[i+5,e.y2],[i,e.y2],[i,t.y2]]]},e.prototype.calcMedianPoints=function(t,e){return[[[t.x1,e.y1],[t.x2,e.y1]]]},e.prototype.renderOutliers=function(t){for(var e=this.value,i=e.outliers||[],o=3*Math.abs(e.q3-e.q1),r=[],n=t.markers||{},s=0;s<i.length;s++){var a=i[s],p=at({},(n=a<e.q3+o&&a>e.q1-o?t.outliers:t.extremes).border);jt(p.color)||(jt(this.color)?p.color=this.color:p.color=new q.Color(n.background).brightness(cn).toHex());var l=new ji({type:n.type,width:n.size,height:n.size,rotation:n.rotation,background:n.background,border:p,opacity:n.opacity});l.value=a,r.push(l)}return this.reflowOutliers(r),r},e.prototype.reflowOutliers=function(t){for(var e=this.owner.seriesValueAxis(this.options),i=this.box.center(),o=0;o<t.length;o++){var r=t[o].value,n=e.getSlot(r);this.options.vertical?n.move(i.x):n.move(void 0,i.y),this.box=this.box.wrap(n),t[o].reflow(n)}},e.prototype.mainVisual=function(e){for(var i=t.prototype.mainVisual.call(this,e),o=this.renderOutliers(e),r=0;r<o.length;r++){var n=o[r].getElement();n&&i.append(n)}return i},e.prototype.createLines=function(t,e){this.drawLines(t,e,this.whiskerPoints,e.whiskers),this.drawLines(t,e,this.medianPoints,e.median),this.drawLines(t,e,this.meanPoints,e.mean)},e.prototype.getBorderColor=function(){return(this.options.border||{}).color?this.options.border.color:this.color?this.color:t.prototype.getBorderColor.call(this)},e}(Ja);te(ip,{border:{_brightness:.8},line:{width:2},median:{color:"#f6f6f6"},mean:{width:2,dashType:"dash",color:"#f6f6f6"},overlay:{gradient:"glass"},tooltip:{format:"<table><tr><th colspan='2'>{6:d}</th></tr><tr><td>Lower:</td><td>{0:C}</td></tr><tr><td>Q1:</td><td>{1:C}</td></tr><tr><td>Median:</td><td>{2:C}</td></tr><tr><td>Mean:</td><td>{5:C}</td></tr><tr><td>Q3:</td><td>{3:C}</td></tr><tr><td>Upper:</td><td>{4:C}</td></tr></table>"},highlight:{opacity:1,border:{width:1,opacity:1},line:{width:1,opacity:1}},notes:{visible:!0,label:{}},outliers:{visible:!0,size:8,type:v,background:j,border:{width:2,opacity:1},opacity:0},extremes:{visible:!0,size:8,type:g,background:j,border:{width:2,opacity:1},opacity:0}}),at(ip.prototype,la);const op=ip;var rp=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reflowBoxSlot=function(t){this.boxSlot.y1=t.y1,this.boxSlot.y2=t.y2},e.prototype.reflowWhiskerSlot=function(t){this.whiskerSlot.y1=t.y1,this.whiskerSlot.y2=t.y2},e.prototype.calcMeanPoints=function(t,e){return[[[e.x1,t.y1],[e.x1,t.y2]]]},e.prototype.calcWhiskerPoints=function(t,e){var i=e.center().y;return[[[e.x1,i-5],[e.x1,i+5],[e.x1,i],[t.x1,i]],[[e.x2,i-5],[e.x2,i+5],[e.x2,i],[t.x2,i]]]},e.prototype.calcMedianPoints=function(t,e){return[[[e.x1,t.y1],[e.x1,t.y2]]]},e}(op);const np=rp;var sp=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.addValue=function(t,e){var i,o=e.categoryIx,r=e.category,n=e.series,s=e.seriesIx,a=this.children,p=this.options,l=t.valueFields,h=Hs(this.splitValue(l)),c=n.data[o],u=this.categoryPoints[o];u||(this.categoryPoints[o]=u=[]),h&&(i=this.createPoint(t,e));var d=a[o];d||(d=new Ya({vertical:p.invertAxes,gap:p.gap,spacing:p.spacing,rtl:!p.invertAxes&&(this.chartService||{}).rtl}),this.append(d)),i&&(this.updateRange(l,e),d.append(i),i.categoryIx=o,i.category=r,i.series=n,i.seriesIx=s,i.owner=this,i.dataItem=c),this.points.push(i),u.push(i)},e.prototype.pointType=function(){return this.options.invertAxes?np:op},e.prototype.splitValue=function(t){return[t.lower,t.q1,t.median,t.q3,t.upper]},e.prototype.updateRange=function(t,e){var i=e.series.axis,o=this.splitValue(t).concat(this.filterOutliers(t.outliers));jt(t.mean)&&(o=o.concat(t.mean));var r=this.valueAxisRanges[i]||{min:P,max:T};this.valueAxisRanges[i]={min:Math.min.apply(Math,o.concat([r.min])),max:Math.max.apply(Math,o.concat([r.max]))}},e.prototype.formatPointValue=function(t,e){var i=t.value;return this.chartService.format.auto(e,i.lower,i.q1,i.median,i.q3,i.upper,i.mean,t.category)},e.prototype.filterOutliers=function(t){for(var e=(t||[]).length,i=[],o=0;o<e;o++){var r=t[o];jt(r)&&null!==r&&i.push(r)}return i},e.prototype.supportsPointInactiveOpacity=function(){return!1},e}(ep);const ap=sp;var pp=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getAxis=function(){var t=this.chart.seriesAxes(this.series);return this.isVertical?t.y:t.x},e}(Vs);const lp=pp;var hp=function(t){function e(e,i){t.call(this,i),this.plotArea=e,this.chartService=e.chartService,this._initFields(),this.render()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._initFields=function(){this.xAxisRanges={},this.yAxisRanges={},this.points=[],this.seriesPoints=[],this.seriesOptions=[],this._evalSeries=[]},e.prototype.render=function(){this.traverseDataPoints(this.addValue.bind(this))},e.prototype.addErrorBar=function(t,e,i){var o,r=t.value[e],n=e+"Value",s=e+"ErrorLow",a=e+"ErrorHigh",p=i.seriesIx,l=i.series,h=t.options.errorBars,c=i[s],u=i[a];K(r)&&(K(c)&&K(u)&&(o={low:c,high:u}),h&&jt(h[n])&&(this.seriesErrorRanges=this.seriesErrorRanges||{x:[],y:[]},this.seriesErrorRanges[e][p]=this.seriesErrorRanges[e][p]||new an(h[n],l,e),o=this.seriesErrorRanges[e][p].getErrorRange(r,h[n])),o&&this.addPointErrorBar(o,t,e))},e.prototype.addPointErrorBar=function(t,e,i){var o=t.low,r=t.high,n=e.series,s=e.options.errorBars,a=i===H,p={};e[i+"Low"]=o,e[i+"High"]=r,e.errorBars=e.errorBars||[];var l=new lp(o,r,a,this,n,s);e.errorBars.push(l),e.append(l),p[i]=o,this.updateRange(p,n),p[i]=r,this.updateRange(p,n)},e.prototype.addValue=function(t,e){var i,o=t.x,r=t.y,n=e.seriesIx,s=this.options.series[n],a=this.seriesMissingValues(s),p=this.seriesPoints[n],l=t;$s(o)&&$s(r)||(l=this.createMissingValue(l,a)),l&&((i=this.createPoint(l,e))&&(Object.assign(i,e),this.addErrorBar(i,F,e),this.addErrorBar(i,H,e)),this.updateRange(l,e.series)),this.points.push(i),p.push(i)},e.prototype.seriesMissingValues=function(t){return t.missingValues},e.prototype.createMissingValue=function(){},e.prototype.updateRange=function(t,e){var i=this.chartService.intl,o=e.xAxis,r=e.yAxis,n=t.x,s=t.y,a=this.xAxisRanges[o],p=this.yAxisRanges[r];$s(n)&&(a=this.xAxisRanges[o]=a||{min:P,max:T},$(n)&&(n=er(i,n)),a.min=Math.min(a.min,n),a.max=Math.max(a.max,n)),$s(s)&&(p=this.yAxisRanges[r]=p||{min:P,max:T},$(s)&&(s=er(i,s)),p.min=Math.min(p.min,s),p.max=Math.max(p.max,s))},e.prototype.evalPointOptions=function(t,e,i){var o=i.series,r=i.seriesIx,n={defaults:o._defaults,excluded:["data","tooltip","content","template","visual","toggle","_outOfRangeMinPoint","_outOfRangeMaxPoint","drilldownSeriesFactory","ariaTemplate","ariaContent"]},s=this._evalSeries[r];jt(s)||(this._evalSeries[r]=s=Ys(t,{},n,!0));var a=t;return s&&Ys(a=at({},t),{value:e,series:o,dataItem:i.dataItem},n),a},e.prototype.pointType=function(){return ua},e.prototype.pointOptions=function(t,e){var i=this.seriesOptions[e];if(!i){var o=this.pointType().prototype.defaults;this.seriesOptions[e]=i=at({},o,{markers:{opacity:t.opacity},tooltip:{format:this.options.tooltip.format},labels:{format:this.options.labels.format}},t)}return i},e.prototype.createPoint=function(t,e){var i=e.series,o=this.pointOptions(i,e.seriesIx),r=e.color||i.color;o=this.evalPointOptions(o,t,e),ot(i.color)&&(r=o.color);var n=new ua(t,o);return n.color=r,this.append(n),n},e.prototype.seriesAxes=function(t){var e=t.xAxis,i=t.yAxis,o=this.plotArea,r=e?o.namedXAxes[e]:o.axisX,n=i?o.namedYAxes[i]:o.axisY;if(!r)throw new Error("Unable to locate X axis with name "+e);if(!n)throw new Error("Unable to locate Y axis with name "+i);return{x:r,y:n}},e.prototype.reflow=function(t){var e=this,i=this.points,o=!this.options.clip,r=0;this.traverseDataPoints((function(t,n){var s=i[r++],a=e.seriesAxes(n.series),p=a.x.getSlot(t.x,t.x,o),l=a.y.getSlot(t.y,t.y,o);if(s)if(p&&l){var h=e.pointSlot(p,l);s.reflow(h)}else s.visible=!1})),this.box=t},e.prototype.pointSlot=function(t,e){return new wi(t.x1,e.y1,t.x2,e.y2)},e.prototype.traverseDataPoints=function(t){for(var e=this.options.series,i=this.seriesPoints,o=0;o<e.length;o++){var r=e[o];i[o]||(i[o]=[]);for(var n=0;n<r.data.length;n++){var s=this.plotArea.bindPoint(r,n),a=s.valueFields,p=s.fields;t(a,at({pointIx:n,series:r,seriesIx:o,dataItem:r.data[n],owner:this},p))}}},e.prototype.formatPointValue=function(t,e){var i=t.value;return this.chartService.format.auto(e,i.x,i.y)},e.prototype.animationPoints=function(){for(var t=this.points,e=[],i=0;i<t.length;i++)e.push((t[i]||{}).marker);return e},e}(Li);te(hp,{series:[],tooltip:{format:"{0}, {1}"},labels:{format:"{0}, {1}"},clip:!0}),at(hp.prototype,Ca);const cp=hp;var up=function(t){function e(e,i){t.call(this,e,i),this.category=e.category}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createHighlight=function(){var t=this.options.highlight,e=t.border,i=this.options.markers,o=this.box.center(),r=(i.size+i.border.width+e.width)/2,n=new q.drawing.Group,s=new q.drawing.Circle(new q.geometry.Circle([o.x,o.y+r/5+e.width/2],r+e.width/2),{stroke:{color:"none"},fill:this.createGradient({gradient:"bubbleShadow",color:i.background,stops:[{offset:0,color:i.background,opacity:.3},{offset:1,color:i.background,opacity:0}]})}),a=new q.drawing.Circle(new q.geometry.Circle([o.x,o.y],r),{stroke:{color:e.color||new q.Color(i.background).brightness(cn).toHex(),width:e.width,opacity:e.opacity,dashType:e.dashType},fill:Ii(this.options.pattern,{color:i.background,opacity:t.opacity})});return n.append(s,a),n},e.prototype.createFocusHighlight=function(t){var e=this.options.focusHighlight,i=this.options.markers,o=this.box.center(),r=(i.size+i.border.width)/2+e.border.width/2;return new q.drawing.Circle(new q.geometry.Circle([o.x,o.y],r),t)},e}(ua);up.prototype.defaults=at({},up.prototype.defaults,{labels:{position:f},highlight:{opacity:1,border:{color:"#fff",width:2,opacity:1}}}),up.prototype.defaults.highlight.zIndex=void 0;const dp=up;var fp=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._initFields=function(){this._maxSize=T,t.prototype._initFields.call(this)},e.prototype.addValue=function(e,i){null!==e.size&&(e.size>0||e.size<0&&i.series.negativeValues.visible)?(this._maxSize=Math.max(this._maxSize,Math.abs(e.size)),t.prototype.addValue.call(this,e,i)):(this.points.push(null),this.seriesPoints[i.seriesIx].push(null))},e.prototype.reflow=function(e){this.updateBubblesSize(e),t.prototype.reflow.call(this,e)},e.prototype.pointType=function(){return dp},e.prototype.createPoint=function(t,e){var i=e.series,o=i.data.length,r=e.pointIx*(ln/o),n={delay:r,duration:ln-r,type:An},s=e.color||i.color;t.size<0&&i.negativeValues.visible&&(s=Kt(i.negativeValues.color,s));var a=at({labels:{animation:{delay:r,duration:ln-r}}},this.pointOptions(i,e.seriesIx),{markers:{type:g,border:i.border,opacity:i.opacity,animation:n}});a=this.evalPointOptions(a,t,e),ot(i.color)&&(s=a.color),a.markers.background=s;var p=new dp(t,a);return p.color=s,this.append(p),p},e.prototype.updateBubblesSize=function(t){for(var e=this.options.series,i=Math.min(t.width(),t.height()),o=0;o<e.length;o++)for(var r=e[o],n=this.seriesPoints[o],s=(r.minSize||Math.max(.02*i,10))/2,a=(r.maxSize||.2*i)/2,p=Math.PI*s*s,l=(Math.PI*a*a-p)/this._maxSize,h=0;h<n.length;h++){var c=n[h];if(c){var u=Math.abs(c.value.size)*l,d=Math.sqrt((p+u)/Math.PI),f=Kt(c.options.zIndex,0)+(1-d/a);at(c.options,{zIndex:f,markers:{size:2*d,zIndex:f},labels:{zIndex:f+1}})}}},e.prototype.formatPointValue=function(t,e){var i=t.value;return this.chartService.format.auto(e,i.x,i.y,i.size,t.category)},e.prototype.createAnimation=function(){},e.prototype.createVisual=function(){},e}(cp);te(fp,{tooltip:{format:"{3}"},labels:{format:"{3}"}});const gp=fp;var yp=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(ji);at(yp.prototype,la);const vp=yp;var mp=function(t){function e(e,i){t.call(this,i),this.aboveAxis=this.options.aboveAxis,this.color=i.color||j,this.value=e}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.render=function(){var t=this.options;this._rendered||(this._rendered=!0,jt(this.value.target)&&(this.target=new vp({type:t.target.shape,background:t.target.color||this.color,opacity:t.opacity,zIndex:t.zIndex,border:t.target.border,vAlign:V,align:B}),this.target.value=this.value,this.target.dataItem=this.dataItem,this.target.series=this.series,this.append(this.target)),this.createLabel(),this.createNote())},e.prototype.createLabel=function(){var t=this.options.labels;t.visible&&(this.label=this.createLabelElement(t),this.append(this.label))},e.prototype.createLabelElement=function(t){return new Fa(this.getLabelText(t),t,this.pointData())},e.prototype.getLabelText=function(t){var e=vt(t);return e?e(this.pointData()):this.formatValue(t.format)},e.prototype.reflow=function(t){this.render();var e=this,i=e.options,o=e.target,r=e.owner,n=i.invertAxes,s=r.seriesValueAxis(this.options),a=r.categorySlot(r.categoryAxis,i.categoryIx,s),p=s.getSlot(this.value.target),l=n?p:a,h=n?a:p;if(o){var c=new wi(l.x1,h.y1,l.x2,h.y2);o.options.height=n?c.height():i.target.line.width,o.options.width=n?i.target.line.width:c.width(),o.reflow(c)}var u=this.label;u&&(u.options.aboveAxis=this.aboveAxis,u.reflow(t)),this.note&&this.note.reflow(t),this.box=t},e.prototype.createVisual=function(){t.prototype.createVisual.call(this),this.addAccessibilityAttributesToVisual();var e=this.options,i=q.drawing.Path.fromRect(this.box.toRect(),{fill:Ii(e.pattern,{color:this.color,opacity:e.opacity}),stroke:null});e.border.width>0&&i.options.set("stroke",{color:e.border.color||this.color,width:e.border.width,dashType:e.border.dashType,opacity:Kt(e.border.opacity,e.opacity)}),this.bodyVisual=i,Z(i),this.visual.append(i)},e.prototype.createAnimation=function(){this.bodyVisual&&(this.animation=q.drawing.Animation.create(this.bodyVisual,this.options.animation))},e.prototype.createHighlight=function(t){return q.drawing.Path.fromRect(this.box.toRect(),t)},e.prototype.highlightVisual=function(){return this.bodyVisual},e.prototype.highlightVisualArgs=function(){return{rect:this.box.toRect(),visual:this.bodyVisual,options:this.options}},e.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},e.prototype.pointData=function(){return{dataItem:this.dataItem,category:this.category,value:this.value,series:this.series}},e.prototype.overlapsBox=function(t){return this.box.overlaps(t)},e.prototype.getIndex=function(){return this.categoryIx},e}(Li);mp.prototype.tooltipAnchor=Ua.prototype.tooltipAnchor,mp.prototype.createFocusHighlight=Ua.prototype.createFocusHighlight,te(mp,{border:{width:1},vertical:!1,opacity:1,target:{shape:"",border:{width:0,color:"green"},line:{width:2}},labels:{visible:!1},tooltip:{format:"Current: {0}<br />Target: {1}"},notes:{label:{}},accessibility:{role:Ss,className:Cs,ariaRoleDescription:Ps}}),at(mp.prototype,la),at(mp.prototype,ha),at(mp.prototype,Ha);const xp=mp;var bp=function(t){function e(e,i){!function(t){for(var e=t.series,i=0;i<e.length;i++){var o=e[i],r=o.data;!r||G(r[0])||pt(r[0])||(o.data=[r])}}(i),t.call(this,e,i)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reflowCategories=function(t){for(var e=this.children,i=e.length,o=0;o<i;o++)e[o].reflow(t[o])},e.prototype.plotRange=function(t){var e=t.series,i=this.seriesValueAxis(e),o=this.categoryAxisCrossingValue(i);return[o,t.value.current||o]},e.prototype.createPoint=function(t,e){var i=e.categoryIx,o=e.series,r=this.options,n=this.children,s=t.valueFields,a=at({vertical:!r.invertAxes,overlay:o.overlay,categoryIx:i,invertAxes:r.invertAxes},o),p=t.fields.color||o.color;a=this.evalPointOptions(a,s,e),ot(o.color)&&(p=a.color);var l=new xp(s,a);l.color=p;var h=n[i];return h||(h=new Ya({vertical:r.invertAxes,gap:r.gap,spacing:r.spacing,rtl:!r.invertAxes&&(this.chartService||{}).rtl}),this.append(h)),h.append(l),l},e.prototype.updateRange=function(t,e){var i=t.current,o=t.target,r=e.series.axis,n=this.valueAxisRanges[r];jt(i)&&!isNaN(i)&&jt(o&&!isNaN(o))&&((n=this.valueAxisRanges[r]=n||{min:P,max:T}).min=Math.min(n.min,i,o),n.max=Math.max(n.max,i,o))},e.prototype.formatPointValue=function(t,e){return this.chartService.format.auto(e,t.value.current,t.value.target)},e.prototype.pointValue=function(t){return t.valueFields.current},e.prototype.aboveAxis=function(t){return t.value.current>0},e.prototype.createAnimation=function(){var t=this.points;this._setAnimationOptions();for(var e=0;e<t.length;e++){var i=t[e];i.options.animation=this.options.animation,i.createAnimation()}},e}(aa);bp.prototype._setAnimationOptions=Ka.prototype._setAnimationOptions,te(bp,{animation:{type:wn}});const _p=bp;var wp=function(t,e){this.chartService=t,this.options=at({},this.options,e)};wp.prototype.getStyle=function(t,e){var i=t.background,o=t.border.color;if(e){var r=e.color||e.options.color;i=Kt(i,r),o=Kt(o,r)}var n=void 0!==t.padding?dt(t.padding):{};return"object"==typeof t.padding&&(n.top=void 0!==t.padding.top?n.top:void 0,n.right=void 0!==t.padding.right?n.right:void 0,n.bottom=void 0!==t.padding.bottom?n.bottom:void 0,n.left=void 0!==t.padding.left?n.left:void 0),{backgroundColor:i,borderColor:o,font:t.font,color:t.color,opacity:t.opacity,borderWidth:lt(t.border.width),paddingTop:lt(n.top),paddingBottom:lt(n.bottom),paddingLeft:lt(n.left),paddingRight:lt(n.right)}},wp.prototype.show=function(t,e,i){if(this.chartService){t.format=e.format;var o=this.getStyle(e,i);t.style=o;var r=new q.Color(o.backgroundColor);jt(e.color)||r.isDark()||(t.className="k-chart-tooltip-inverse"),this.chartService.notify(ks,t),this.visible=!0}},wp.prototype.hide=function(){this.chartService&&this.chartService.notify(As),this.visible=!1},wp.prototype.destroy=function(){delete this.chartService},te(wp,{border:{width:1},opacity:1});const kp=wp;var Ap=function(t){function e(e,i,o){t.call(this,e,o),this.crosshair=i,this.formatService=e.format,this.initAxisName()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initAxisName=function(){var t,e=this.crosshair.axis;t=e.plotArea.categoryAxis?e.getCategory?"categoryAxis":"valueAxis":e.options.vertical?"yAxis":"xAxis",this.axisName=t},e.prototype.showAt=function(t){var e=this.crosshair.axis,i=this.options,o=e[i.stickyMode?"getCategory":"getValue"](t),r=o;i.format?r=this.formatService.auto(i.format,o):e.options.type===m&&(r=this.formatService.auto(e.options.labels.dateFormats[e.options.baseUnit],o)),this.show({point:t,anchor:this.getAnchor(),crosshair:this.crosshair,value:r,axisName:this.axisName,axisIndex:this.crosshair.axis.axisIndex},this.options)},e.prototype.hide=function(){this.chartService.notify(As,{crosshair:this.crosshair,axisName:this.axisName,axisIndex:this.crosshair.axis.axisIndex})},e.prototype.getAnchor=function(){var t,e,i,o=this.crosshair,r=this.options,n=r.position,s=r.padding,a=!o.axis.options.vertical,p=o.line.bbox();return a?(t=f,n===d?(e=V,i=p.bottomLeft().translate(0,s)):(e=d,i=p.topLeft().translate(0,-s))):(e=f,n===C?(t=B,i=p.topLeft().translate(-s,0)):(t=C,i=p.topRight().translate(s,0))),{point:i,align:{horizontal:t,vertical:e}}},e}(kp);te(Ap,{padding:10});const Sp=Ap;var Cp=function(t){function e(e,i,o){t.call(this,o),this.axis=i,this.stickyMode=i instanceof nr;var r=this.options.tooltip;r.visible&&(this.tooltip=new Sp(e,this,at({},r,{stickyMode:this.stickyMode})))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.showAt=function(t){this.point=t,this.moveLine(),this.line.visible(!0),this.tooltip&&this.tooltip.showAt(t)},e.prototype.hide=function(){this.line.visible(!1),this.tooltip&&this.tooltip.hide()},e.prototype.moveLine=function(){var t,e=this.axis,i=this.point,o=e.options.vertical,r=this.getBox(),n=o?H:F,s=new q.geometry.Point(r.x1,r.y1);if(t=o?new q.geometry.Point(r.x2,r.y1):new q.geometry.Point(r.x1,r.y2),i)if(this.stickyMode){var a=e.getSlot(e.pointCategoryIndex(i));s[n]=t[n]=a.center()[n]}else s[n]=t[n]=i[n];this.box=r,this.line.moveTo(s).lineTo(t)},e.prototype.getBox=function(){for(var t,e=this.axis,i=e.pane.axes,o=i.length,r=e.options.vertical,n=e.lineBox().clone(),s=r?F:H,a=0;a<o;a++){var p=i[a];p.options.vertical!==r&&(t?t.wrap(p.lineBox()):t=p.lineBox().clone())}return n[s+1]=t[s+1],n[s+2]=t[s+2],n},e.prototype.createVisual=function(){t.prototype.createVisual.call(this);var e=this.options;this.line=new q.drawing.Path({stroke:{color:e.color,width:e.width,opacity:e.opacity,dashType:e.dashType},visible:!1}),this.moveLine(),this.visual.append(this.line)},e.prototype.destroy=function(){this.tooltip&&this.tooltip.destroy(),t.prototype.destroy.call(this)},e}(Li);te(Cp,{color:u,width:2,zIndex:-1,tooltip:{visible:!1}});const Pp=Cp;var Tp=function(t){function e(e,i){t.call(this,e),this.pane=i}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.shouldClip=function(){for(var t=this.children,e=t.length,i=0;i<e;i++)if(!0===t[i].options.clip)return!0;return!1},e.prototype._clipBox=function(){return this.pane.chartsBox()},e.prototype.createVisual=function(){if(this.visual=new q.drawing.Group({zIndex:0}),this.shouldClip()){var t=(this.clipBox=this._clipBox()).toRect(),e=q.drawing.Path.fromRect(t);Z(e),this.visual.clip(e),this.unclipLabels()}},e.prototype.stackRoot=function(){return this},e.prototype.unclipLabels=function(){for(var t=this.children,e=this.clipBox,i=0;i<t.length;i++)for(var o=t[i].points||[],r=o.length,n=0;n<r;n++){var s=o[n];if(s&&!1!==s.visible&&s.overlapsBox&&s.overlapsBox(e))if(s.unclipElements)s.unclipElements();else{var a=s.label,p=s.note;a&&a.options.visible&&(a.alignToClipBox&&a.alignToClipBox(e),a.options.noclip=!0),p&&p.options.visible&&(p.options.noclip=!0)}}},e.prototype.unclipBox=function(){for(var t=this.children,e=this._clipBox(),i=e.clone(),o=0;o<t.length;o++)for(var r=t[o].points||[],n=r.length,s=0;s<n;s++){var a=r[s];if(a&&a.unclipBox&&a.overlapsBox&&!1!==a.visible){if(!a.overlapsBox(e)){a.clipElements&&a.clipElements();continue}var p=a.unclipBox();if(i.overlaps(p)){var l=a.labelBox?a.labelBox():new wi,h=a.noteBox?a.noteBox():new wi,c=Math.max(l.height(),h.height()),u=Math.max(l.width(),h.width());i.wrapLimit(p,u,c)}}}return i},e.prototype.destroy=function(){t.prototype.destroy.call(this),delete this.parent},e}(Li);Tp.prototype.isStackRoot=!0;const Mp=Tp;var Op=function(t){function e(e){t.call(this,e),this.id="pane"+Lp++,this.createTitle(),this.content=new Li,this.chartContainer=new Mp({},this),this.append(this.content),this.axes=[],this.charts=[]}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createTitle=function(){var t=this.options.title;pt(t)&&(t=at({},t,{align:t.position,position:V})),this.title=eo.buildTitle(t,e.prototype.options.title),this.title&&this.append(this.title)},e.prototype.appendAxis=function(t){this.content.append(t),this.axes.push(t),t.pane=this},e.prototype.appendAxisAt=function(t,e){this.content.append(t),this.axes.splice(e,0,t),t.pane=this},e.prototype.appendChart=function(t){this.chartContainer.parent!==this.content&&this.content.append(this.chartContainer),this.charts.push(t),this.chartContainer.append(t),t.pane=this},e.prototype.empty=function(){var t=this.parent;if(t){for(var e=0;e<this.axes.length;e++)t.removeAxis(this.axes[e]);for(var i=0;i<this.charts.length;i++)t.removeChart(this.charts[i])}this.axes=[],this.charts=[],this.content.destroy(),this.content.children=[],this.chartContainer.children=[]},e.prototype.reflow=function(e){var i;Wt(this.children)===this.content&&(i=this.children.pop()),t.prototype.reflow.call(this,e),i&&this.children.push(i),this.title&&(this.contentBox.y1+=this.title.box.height())},e.prototype.unclipBox=function(){return this.chartContainer.unclipBox()},e.prototype.visualStyle=function(){var e=t.prototype.visualStyle.call(this);return e.zIndex=-10,e},e.prototype.renderComplete=function(){this.options.visible&&this.createGridLines()},e.prototype.stackRoot=function(){return this},e.prototype.clipRoot=function(){return this},e.prototype.createGridLines=function(){for(var t=this.axes,e=t.concat(this.parent.axes),i=[],o=[],r=0;r<t.length;r++)for(var n=t[r],s=n.options.vertical,a=s?i:o,p=0;p<e.length;p++)if(0===a.length){var l=e[p];s!==l.options.vertical&&Vt(a,n.createGridLines(l))}},e.prototype.refresh=function(){this.visual.clear(),this.content.parent=null,this.content.createGradient=this.createGradient.bind(this),this.content.renderVisual(),this.content.parent=this,this.title&&this.visual.append(this.title.visual),this.visual.append(this.content.visual),this.renderComplete(),this.notifyRender()},e.prototype.chartsBox=function(){for(var t=this.axes,e=t.length,i=new wi,o=0;o<e;o++){var r=t[o],n=r.options.vertical?H:F,s=r.lineBox();i[n+1]=s[n+1],i[n+2]=s[n+2]}if(0===i.x2)for(var a=this.parent.axes,p=a.length,l=0;l<p;l++){var h=a[l];if(!h.options.vertical){var c=h.lineBox();i.x1=c.x1,i.x2=c.x2}}return i},e.prototype.clipBox=function(){return this.chartContainer.clipBox},e.prototype.notifyRender=function(){var t=this.getService();t&&t.notify("paneRender",{pane:new Zr(this),index:this.paneIndex,name:this.options.name})},e}(Ri),Lp=1;Op.prototype.isStackRoot=!0,te(Op,{zIndex:-1,shrinkToFit:!0,title:{align:C},visible:!0});const Bp=Op;var Ip=function(t){return!1!==t.options.visible},Ep=function(t){function e(e,i,o){t.call(this,i),this.initFields(e,i),this.series=e,this.initSeries(),this.charts=[],this.options.legend=this.options.legend||{},this.options.legend.data=[],this.axes=[],this.crosshairs=[],this.chartService=o,this.originalOptions=i,this.originalSeries=e,this._bindCache=new WeakMap,this.createPanes(),this.render(),this.createCrosshairs()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initFields=function(){},e.prototype.initSeries=function(){for(var t=this.series,e=0;e<t.length;e++)t[e].index=e},e.prototype.bindPoint=function(t,e,i){var o=this._bindCache.get(t);o||(o=[],this._bindCache.set(t,o));var r=o[e];return r||(r=o[e]=on.current.bindPoint(t,e,i)),r},e.prototype.createPanes=function(){for(var t=this.options.title||{},e=this.options.paneDefaults,i=this.options.panes||[],o=Math.max(i.length,1),r=[],n=at({title:{color:t.color}},e),s=0;s<o;s++){var a=at({},n,i[s]);$(a.title)&&(a.title=at({text:a.title},n.title));var p=new Bp(a);p.paneIndex=s,r.push(p),this.append(p)}this.panes=r},e.prototype.crosshairOptions=function(t){return t.options.crosshair},e.prototype.createCrosshairs=function(t){void 0===t&&(t=this.panes);for(var e=0;e<t.length;e++)for(var i=t[e],o=0;o<i.axes.length;o++){var r=i.axes[o],n=this.crosshairOptions(r);if(n&&n.visible){var s=new Pp(this.chartService,r,n);this.crosshairs.push(s),i.content.append(s)}}},e.prototype.removeCrosshairs=function(t){for(var e=this.crosshairs,i=t.axes,o=e.length-1;o>=0;o--)for(var r=0;r<i.length;r++)if(e[o].axis===i[r]){e.splice(o,1);break}},e.prototype.hideCrosshairs=function(){for(var t=this.crosshairs,e=0;e<t.length;e++)t[e].hide()},e.prototype.findPane=function(t){for(var e,i=this.panes,o=0;o<i.length;o++)if(i[o].options.name===t){e=i[o];break}return e||i[0]},e.prototype.findPointPane=function(t){for(var e,i=this.panes,o=0;o<i.length;o++)if(i[o].box.containsPoint(t)){e=i[o];break}return e},e.prototype.appendAxis=function(t){this.findPane(t.options.pane).appendAxis(t),this.axes.push(t),t.plotArea=this},e.prototype.removeAxis=function(t){for(var e=[],i=0;i<this.axes.length;i++){var o=this.axes[i];t!==o?e.push(o):o.destroy()}this.axes=e},e.prototype.appendChart=function(t,e){this.charts.push(t),e?e.appendChart(t):this.append(t)},e.prototype.removeChart=function(t){for(var e=[],i=0;i<this.charts.length;i++){var o=this.charts[i];o!==t?e.push(o):o.destroy()}this.charts=e},e.prototype.addToLegend=function(t){for(var e=t.length,i=this.options.legend,o=i.labels||{},r=i.inactiveItems||{},n=r.labels||{},s=[],a=0;a<e;a++){var p=t[a],l=!1!==p.visible;if(!1!==p.visibleInLegend){var h=p.name,c=l?vt(o):vt(n)||vt(o);c&&(h=c({text:$s(h)?h:"",series:p}));var u=p._defaults,d=p.color;ot(d)&&u&&(d=u.color);var f=void 0,g=void 0;l?(f={},g=d):(f={color:n.color,font:n.font},g=r.markers.color),$s(h)&&""!==h&&s.push({text:h,labels:f,markerColor:g,series:p,active:l})}}Vt(i.data,s)},e.prototype.groupAxes=function(t){for(var e=[],i=[],o=0;o<t.length;o++)for(var r=t[o].axes,n=0;n<r.length;n++){var s=r[n];s.options.vertical?i.push(s):e.push(s)}return{x:e,y:i,any:e.concat(i)}},e.prototype.groupSeriesByPane=function(){for(var t=this.series,e={},i=0;i<t.length;i++){var o=t[i],r=this.seriesPaneName(o);e[r]?e[r].push(o):e[r]=[o]}return e},e.prototype.filterVisibleSeries=function(t){for(var e=[],i=0;i<t.length;i++){var o=t[i];!1!==o.visible&&e.push(o)}return e},e.prototype.reflow=function(t){var e=this.options.plotArea,i=this.panes,o=dt(e.margin);this.box=t.clone().unpad(o),this.reflowArea(i),this.ensureLabelsFit(i)&&(this.reflowPanes(),this.reflowAxes(i),this.reflowCharts(i))},e.prototype.reflowArea=function(t){this.reflowPanes(),this.detachLabels(),this.reflowAxes(t),this.reflowCharts(t)},e.prototype.ensureLabelsFit=function(t){var e=!1;return t.forEach((function(t){var i=t.unclipBox(),o=t.chartContainer._clipBox(),r=dt(t.options.padding||{});i.y1<o.y1+r.top&&(e=!0,r.top=o.y1-i.y1+r.top),i.y2>o.y2-r.bottom&&(e=!0,r.bottom=i.y2-o.y2+r.bottom),i.x1<o.x1+r.left&&(e=!0,r.left=o.x1-i.x1+r.left),i.x2>o.x2-r.right&&(e=!0,r.right=i.x2-o.x2+r.right),e&&(t.options.padding=r)})),e},e.prototype.redraw=function(t){var e=[].concat(t);this.initSeries();var i=this.getRoot();i&&i.cleanGradients();for(var o=0;o<e.length;o++)this.removeCrosshairs(e[o]),e[o].empty();this._bindCache=new WeakMap,this.render(e),this.detachLabels(),this.reflowAxes(this.panes),this.reflowCharts(e),this.createCrosshairs(e);for(var r=0;r<e.length;r++)e[r].refresh()},e.prototype.axisCrossingValues=function(t,e){for(var i=t.options,o=[].concat(i.axisCrossingValues||i.axisCrossingValue),r=e.length-o.length,n=o[0]||0,s=0;s<r;s++)o.push(n);return o},e.prototype.alignAxisTo=function(t,e,i,o){var r=t.getSlot(i,i,!0),n=t.options.reverse?2:1,s=e.getSlot(o,o,!0),a=e.options.reverse?2:1,p=t.box.translate(s[F+a]-r[F+n],s[H+a]-r[H+n]);t.pane!==e.pane&&p.translate(0,t.pane.box.y1-e.pane.box.y1),t.reflow(p)},e.prototype.alignAxes=function(t,e){for(var i=t[0],o=e[0],r=this.axisCrossingValues(i,e),n=this.axisCrossingValues(o,t),s={},a={},p={},l={},h=0;h<e.length;h++){var c=e[h],u=c.pane,f=u.id,g=!1!==c.options.visible,v=zp(t,u)||i,m=r;if(v!==i&&(m=this.axisCrossingValues(v,e)),this.alignAxisTo(c,v,n[h],m[h]),!c.options._overlap){Zt(c.lineBox().x1)===Zt(v.lineBox().x1)&&(s[f]&&c.reflow(c.box.alignTo(s[f].box,C).translate(-c.options.margin,0)),g&&(s[f]=c)),Zt(c.lineBox().x2)===Zt(v.lineBox().x2)&&(c._mirrored||(c.options.labels.mirror=!c.options.labels.mirror,c._mirrored=!0),this.alignAxisTo(c,v,n[h],m[h]),a[f]&&c.reflow(c.box.alignTo(a[f].box,B).translate(c.options.margin,0)),g&&(a[f]=c));var x=zp(e,u)||o;x!==c&&(c.alignTo(x),c.reflow(c.box))}}for(var b=0;b<t.length;b++){var _=t[b],w=_.pane,k=w.id,A=!1!==_.options.visible,S=zp(e,w)||o,P=n;S!==o&&(P=this.axisCrossingValues(S,t)),this.alignAxisTo(_,S,r[b],P[b]),_.options._overlap||(Zt(_.lineBox().y1)===Zt(S.lineBox().y1)&&(_._mirrored||(_.options.labels.mirror=!_.options.labels.mirror,_._mirrored=!0),this.alignAxisTo(_,S,r[b],P[b]),p[k]&&_.reflow(_.box.alignTo(p[k].box,V).translate(0,-_.options.margin)),A&&(p[k]=_)),Zt(_.lineBox().y2,y)===Zt(S.lineBox().y2,y)&&(l[k]&&_.reflow(_.box.alignTo(l[k].box,d).translate(0,_.options.margin)),A&&(l[k]=_)),0!==b&&(_.alignTo(i),_.reflow(_.box)))}},e.prototype.shrinkAxisWidth=function(t){for(var e=this.groupAxes(t).any,i=Vp(e),o=0,r=0;r<t.length;r++){var n=t[r];n.axes.length>0&&(o=Math.max(o,i.width()-n.contentBox.width()))}if(0!==o)for(var s=0;s<e.length;s++){var a=e[s];a.options.vertical||a.reflow(a.box.shrink(o,0))}},e.prototype.shrinkAxisHeight=function(t){for(var e,i=0;i<t.length;i++){var o=t[i],r=o.axes,n=Math.max(0,Vp(r).height()-o.contentBox.height());if(0!==n){for(var s=0;s<r.length;s++){var a=r[s];a.options.vertical&&a.reflow(a.box.shrink(0,n))}e=!0}}return e},e.prototype.fitAxes=function(t){for(var e=this.groupAxes(t).any,i=0,o=0;o<t.length;o++){var r=t[o],n=r.axes,s=r.contentBox;if(n.length>0){var a=Vp(n),p=Math.max(s.y1-a.y1,s.y2-a.y2);i=Math.max(i,s.x1-a.x1);for(var l=0;l<n.length;l++){var h=n[l];h.reflow(h.box.translate(0,p))}}}for(var c=0;c<e.length;c++){var u=e[c];u.reflow(u.box.translate(i,0))}},e.prototype.reflowAxes=function(t){for(var e=this.groupAxes(t),i=0;i<t.length;i++)this.reflowPaneAxes(t[i]);e.x.length>0&&e.y.length>0&&(this.alignAxes(e.x,e.y),this.shrinkAxisWidth(t),this.autoRotateAxisLabels(e),this.alignAxes(e.x,e.y),this.shrinkAxisWidth(t)&&this.alignAxes(e.x,e.y),this.shrinkAxisHeight(t),this.alignAxes(e.x,e.y),this.shrinkAxisHeight(t)&&this.alignAxes(e.x,e.y),this.fitAxes(t))},e.prototype.autoRotateAxisLabels=function(t){for(var e,i=this.panes,o=jp(i),r=0;r<o.length;r++)o[r].autoRotateLabels()&&(e=!0);if(e){for(var n=0;n<i.length;n++)this.reflowPaneAxes(i[n]);t.x.length>0&&t.y.length>0&&(this.alignAxes(t.x,t.y),this.shrinkAxisWidth(i))}},e.prototype.reflowPaneAxes=function(t){var e=t.axes,i=e.length;if(i>0)for(var o=0;o<i;o++)e[o].reflow(t.contentBox)},e.prototype.reflowCharts=function(t){for(var e=this.charts,i=e.length,o=this.box,r=0;r<i;r++){var n=e[r].pane;n&&!Ct(n,t)||e[r].reflow(o)}},e.prototype.reflowPanes=function(){for(var t=this.box,e=this.panes,i=e.length,o=t.height(),r=0,n=t.y1,s=0;s<i;s++){var a=e[s],p=a.options.height;if(a.options.width=t.width(),a.options.height){if(p.indexOf&&p.indexOf("%")){var l=parseInt(p,10)/100;a.options.height=l*t.height()}a.reflow(t.clone()),o-=a.options.height}else r++}for(var h=0;h<i;h++){var c=e[h];c.options.height||(c.options.height=o/r)}for(var u=0;u<i;u++){var d=e[u],f=t.clone().move(t.x1,n);d.reflow(f),n+=d.options.height}},e.prototype.backgroundBox=function(){for(var t,e=this.axes,i=e.length,o=0;o<i;o++)for(var r=e[o],n=0;n<i;n++){var s=e[n];if(r.options.vertical!==s.options.vertical){var a=r.lineBox().clone().wrap(s.lineBox());t=t?t.wrap(a):a}}return t||this.box},e.prototype.chartsBoxes=function(){for(var t=this.panes,e=[],i=0;i<t.length;i++)e.push(t[i].chartsBox());return e},e.prototype.addBackgroundPaths=function(t){for(var e=this.chartsBoxes(),i=0;i<e.length;i++)t.paths.push(q.drawing.Path.fromRect(e[i].toRect()))},e.prototype.backgroundContainsPoint=function(t){for(var e=this.chartsBoxes(),i=0;i<e.length;i++)if(e[i].containsPoint(t))return!0},e.prototype.createVisual=function(){t.prototype.createVisual.call(this);var e,i=this.options.plotArea,o=i.opacity,r=i.background,n=i.border;void 0===n&&(n={}),""!==(e=r)&&null!==e&&"none"!==e&&"transparent"!==e&&jt(e)||(r=j,o=0);var s=this._bgVisual=new q.drawing.MultiPath({fill:{color:r,opacity:o},stroke:{color:n.width?n.color:"",width:n.width,dashType:n.dashType},zIndex:-1});this.addBackgroundPaths(s),this.appendVisual(s)},e.prototype.pointsByCategoryIndex=function(t){var e=this.charts,i=[];if(null!==t)for(var o=0;o<e.length;o++)if("_navigator"!==e[o].pane.options.name){var r=e[o].categoryPoints[t];if(r&&r.length)for(var n=0;n<r.length;n++){var s=r[n];s&&jt(s.value)&&null!==s.value&&i.push(s)}}return i},e.prototype.pointsBySeriesIndex=function(t){return this.filterPoints((function(e){return e.series.index===t}))},e.prototype.pointsByPointIndex=function(t){return this.filterPoints((function(e){return e.getIndex()===t}))},e.prototype.pointsBySeriesName=function(t){return this.filterPoints((function(e){return e.series.name===t}))},e.prototype.filterPoints=function(t){for(var e=this.charts,i=[],o=0;o<e.length;o++)for(var r=e[o].points,n=0;n<r.length;n++){var s=r[n];s&&!1!==s.visible&&t(s)&&i.push(s)}return i},e.prototype.findPoint=function(t){for(var e=this.charts,i=0;i<e.length;i++)for(var o=e[i].points,r=0;r<o.length;r++){var n=o[r];if(n&&!1!==n.visible&&t(n))return n}},e.prototype.paneByPoint=function(t){for(var e=this.panes,i=0;i<e.length;i++){var o=e[i];if(o.box.containsPoint(t))return o}},e.prototype.detachLabels=function(){var t=this.groupAxes(this.panes),e=t.x,i=t.y;this.detachAxisGroupLabels(i,e),this.detachAxisGroupLabels(e,i)},e.prototype.detachAxisGroupLabels=function(t,e){for(var i=0,o=0;o<t.length;o++){var r=t[o],n=r.pane,s=zp(e,n)||e[0],a=o+i,p=this.createLabelAxis(r,a,s);if(p){i++;var l=n.axes.indexOf(r)+i;n.appendAxisAt(p,l)}}},e.prototype.createLabelAxis=function(t,e,i){var o=t.options.labels,r=o.position,n=r!==_&&r!==E,s=o.visible;if(n||!1===s)return null;var a=this.groupAxes(this.panes),p=i.options.vertical?a.x:a.y,l=this.axisCrossingValues(i,p),h=r===_,c=i.range(),u=h?c.max:c.min;if(Xt(l[e],c.min,c.max)-u==0)return null;l.splice(e+1,0,u),i.options.axisCrossingValues=l;var d=t.clone();return t.clear(),d.options.name=void 0,d.options.line.visible=!1,d.options.crosshair=void 0,d.options.notes=void 0,d.options.plotBands=void 0,d},e.prototype.isTrendline=function(t){return t&&Ct(t.type,ss)},e.prototype.trendlineFactory=function(){},e.prototype.createTrendlineSeries=function(){var t=this,e=[];return this.series=this.series.map((function(i){if(!t.isTrendline(i))return i;var o=t.seriesByName(i.for);if(!o)throw new Error('Invalid Configuration: Unable to locate linked series "'+i.for+'" for trendline "'+i.name+'".');var r=on.current.valueFields(o),n=Wt(r),s=t.trendlineFactory(Object.assign({},{field:n},i),o);return s&&(!1===o.visible&&(s.visible=!1),s.color===S&&(s.color=o.color),e.push(s)),s})).filter((function(t){return null!==t})),e},e.prototype.seriesByName=function(t){return this.series.find((function(e){return e.name===t}))},e.prototype.getFirstPoint=function(){for(var t=0;t<this.series.length;t++){var e=this.pointsBySeriesIndex(t).find(Ip);if(e)return e}},e.prototype.getPointBelow=function(t){return this._getNextPoint(t,this._pointsByVertical,1)},e.prototype.getPointAbove=function(t){return this._getNextPoint(t,this._pointsByVertical,-1)},e.prototype.getPointToTheRight=function(t){return this._getNextPoint(t,this._pointsByHorizontal,1)},e.prototype.getPointToTheLeft=function(t){return this._getNextPoint(t,this._pointsByHorizontal,-1)},e.prototype._getNextPoint=function(t,e,i){var o=this,r=e.call(this,t).filter(Ip),n=r.indexOf(t)+i,s=function(i){var r,n=0;do{n+=i,r=e.call(o,t,n).filter(Ip)}while(0===r.length);return r};return n<0?(r=s(-1)).at(-1):n>=r.length?(r=s(1)).at(0):r[n]},e.prototype._pointsByVertical=function(t){return this.pointsByPointIndex(t.getIndex())},e.prototype._pointsByHorizontal=function(t,e){void 0===e&&(e=0);var i=it(t.series.index+e,this.series.length);return this.pointsBySeriesIndex(i)},e}(Li);function Rp(t){return!t.pane.axes.some((function(e){return e.options.vertical===t.options.vertical&&e!==t&&!1!==e.options.visible}))}function Vp(t){for(var e,i=t.length,o=0;o<i;o++){var r=t[o],n=!1!==r.options.visible;if(n||Rp(r)){var s=n?r.contentBox():r.lineBox();e?e.wrap(s):e=s.clone()}}return e||new wi}function zp(t,e){for(var i=0;i<t.length;i++){var o=t[i];if(o&&o.pane===e)return o}}var jp=function(t){return t.reduce((function(t,e){return t.concat(e.axes)}),[])};te(Ep,{series:[],plotArea:{margin:{}},background:"",border:{color:u,width:0},paneDefaults:{title:{}},legend:{inactiveItems:{labels:{color:"#919191"},markers:{color:"#919191"}}}});const Dp=Ep;var Fp={hover:function(t,e){this._dispatchEvent(t,e,us)},click:function(t,e){this._dispatchEvent(t,e,"plotAreaClick")}};const Hp=Fp;var Np=function(t,e,i){var o=e.canonicalFields(t),r=e.valueFields(t),n=e.sourceFields(t,o),s=this._seriesFields=[],a=i.query(t.type),p=t.aggregate||a;this._series=t,this._binder=e;for(var l=0;l<o.length;l++){var h=o[l],c=void 0;if(pt(p))c=p[h];else{if(0!==l&&!Ct(h,r))break;c=p}c&&s.push({canonicalName:h,name:n[l],transform:ot(c)?c:Jr[c]})}};function Up(t,e,i){var o=e,r=t;if(t.indexOf(".")>-1){for(var n=t.split(".");n.length>1;)void 0===o[r=n.shift()]&&(o[r]={}),o=o[r];r=n.shift()}o[r]=i}Np.prototype.aggregatePoints=function(t,e){var i=this._series,o=this._seriesFields,r=this._bindPoints(t||[]),n=r.dataItems[0],s=null;if(n&&!K(n)&&!G(n)){var a=function(){};a.prototype=n,s=new a}for(var p=0;p<o.length;p++){var l=o[p],h=this._bindField(r.values,l.canonicalName),c=l.transform(h,i,r.dataItems,e);if(null!==c&&pt(c)&&void 0===c.length&&!(c instanceof Date)){s=c;break}void 0!==c&&(null===s&&(s={}),Up(l.name,s,c))}return s},Np.prototype._bindPoints=function(t){for(var e=this._binder,i=this._series,o=[],r=[],n=0;n<t.length;n++){var s=t[n];o.push(e.bindPoint(i,s)),r.push(i.data[s])}return{values:o,dataItems:r}},Np.prototype._bindField=function(t,e){for(var i=[],o=t.length,r=0;r<o;r++){var n,s=t[r],a=s.valueFields;n=void 0!==a[e]?a[e]:s.fields[e],i.push(n)}return i};const Gp=Np;var Wp=function(){this._defaults={}};Wp.prototype.register=function(t,e){for(var i=0;i<t.length;i++)this._defaults[t[i]]=e},Wp.prototype.query=function(t){return this._defaults[t]},Wp.current=new Wp;const Xp=Wp;var Yp=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createLabel=function(){var t=this.options.labels,e=at({},t,t.from),i=at({},t,t.to);e.visible&&(this.labelFrom=this.createLabelElement(e),this.append(this.labelFrom)),i.visible&&(this.labelTo=this.createLabelElement(i),this.append(this.labelTo))},e.prototype.reflow=function(t){this.render();var e=this,i=e.labelFrom,o=e.labelTo,r=e.value;this.box=t,i&&(i.options.aboveAxis=r.from>r.to,i.reflow(t)),o&&(o.options.aboveAxis=r.to>r.from,o.reflow(t)),this.note&&this.note.reflow(t)},e}(Ua);Yp.prototype.defaults=at({},Yp.prototype.defaults,{labels:{format:"{0} - {1}"},tooltip:{format:"{1}"}});const qp=Yp;var Zp=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.pointType=function(){return qp},e.prototype.pointValue=function(t){return t.valueFields},e.prototype.formatPointValue=function(t,e){return null===t.value.from&&null===t.value.to?"":this.chartService.format.auto(e,t.value.from,t.value.to)},e.prototype.plotRange=function(t){return t?[t.value.from,t.value.to]:0},e.prototype.updateRange=function(t,e){var i=e.series.axis,o=t.from,r=t.to,n=this.valueAxisRanges[i];null!==t&&K(o)&&K(r)&&((n=this.valueAxisRanges[i]=n||{min:P,max:T}).min=Math.min(n.min,o),n.max=Math.max(n.max,o),n.min=Math.min(n.min,r),n.max=Math.max(n.max,r))},e.prototype.aboveAxis=function(t){var e=t.value;return e.from<e.to},e}(Ka);Zp.prototype.plotLimits=aa.prototype.plotLimits;const Qp=Zp;var Kp=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.aliasFor=function(){return this.parent},e}(ua);const $p=Kp;var Jp="auto",tl=function(t){function e(e,i){t.call(this),this.value=e,this.options=i,this.aboveAxis=Kt(this.options.aboveAxis,!0),this.tooltipTracking=!0,this._id=Be(),this.initLabelsFormat()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.render=function(){if(!this._rendered){this._rendered=!0;var t=this.options,e=t.markers,i=t.labels,o=this.value,r=this.fromPoint=new $p(o,at({},this.options,{labels:i.from,markers:e.from})),n=this.toPoint=new $p(o,at({},this.options,{labels:i.to,markers:e.to}));this.copyFields(r),this.copyFields(n),this.append(r),this.append(n)}},e.prototype.reflow=function(t){this.render();var e=t.from,i=t.to;this.positionLabels(e,i),this.fromPoint.reflow(e),this.toPoint.reflow(i),this.box=this.fromPoint.markerBox().clone().wrap(this.toPoint.markerBox())},e.prototype.createHighlight=function(){var t=new q.drawing.Group;return t.append(this.fromPoint.createHighlight()),t.append(this.toPoint.createHighlight()),t},e.prototype.highlightVisual=function(){return this.visual},e.prototype.highlightVisualArgs=function(){return{options:this.options,from:this.fromPoint.highlightVisualArgs(),to:this.toPoint.highlightVisualArgs()}},e.prototype.createFocusHighlight=function(){var t=new q.drawing.Group;return t.append(this.fromPoint.createFocusHighlight()),t.append(this.toPoint.createFocusHighlight()),t},e.prototype.tooltipAnchor=function(){var t=this.owner.pane.clipBox();if(!t||t.overlaps(this.box)){var e,i,o,r=this.box,n=r.center(),s=C;return this.options.vertical?(e=n.x,i=r.y1-5,o=d):(e=r.x2+5,i=n.y,o=f),{point:new xi(e,i),align:{horizontal:s,vertical:o}}}},e.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},e.prototype.overlapsBox=function(t){return this.box.overlaps(t)},e.prototype.unclipElements=function(){this.fromPoint.unclipElements(),this.toPoint.unclipElements()},e.prototype.initLabelsFormat=function(){var t=this.options.labels;t.format||(t.from&&t.from.format||(t.from=Object.assign({},t.from,{format:"{0}"})),t.to&&t.to.format||(t.to=Object.assign({},t.to,{format:"{1}"})))},e.prototype.positionLabels=function(t,e){var i,o,r=this.options,n=r.labels,s=r.vertical;n.position===Jp&&(s?e.y1<=t.y1?(o=vn,i=mn):(o=mn,i=vn):e.x1<=t.x1?(o=C,i=B):(o=B,i=C),n.from&&n.from.position||(this.fromPoint.options.labels.position=i),n.to&&n.to.position||(this.toPoint.options.labels.position=o))},e.prototype.copyFields=function(t){t.dataItem=this.dataItem,t.category=this.category,t.series=this.series,t.color=this.color,t.owner=this.owner},e.prototype.focusVisual=function(){this.fromPoint.focusVisual()},e.prototype.clearFocusFromVisual=function(){this.toPoint.clearFocusFromVisual()},e.prototype.getIndex=function(){return this.categoryIx},e.prototype.getLabelText=function(t){var e=vt(t);return e?e(this.pointData()):t.format?this.formatValue(t.format):this.value},e.prototype.getAriaLabelText=function(){var t=this.options.labels,e=mt(t);return e?e(this.pointData()):this.getLabelText(t)},e.prototype.pointData=function(){return{dataItem:this.dataItem,category:this.category,value:this.value,percentage:this.percentage,stackValue:this.stackValue,series:this.series}},e}(Li);at(tl.prototype,la),at(tl.prototype,ha),tl.prototype.defaults={markers:{visible:!1,background:j,size:8,type:g,border:{width:2},opacity:1},labels:{visible:!1,margin:dt(3),padding:dt(4),animation:{type:hn,delay:ln},position:Jp},notes:{label:{}},highlight:{markers:{border:{color:j,width:2}},zIndex:100},tooltip:{format:"{0} - {1}"},accessibility:{role:Ss,className:Cs,ariaRoleDescription:Ps}};const el=tl;var il=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createStrokeSegments=function(){return this.segmentsFromPoints(this.toGeometryPoints(this.toPoints()))},e.prototype.stackSegments=function(){var t=this.fromSegments;return this.fromSegments||(t=this.fromSegments=this.segmentsFromPoints(this.toGeometryPoints(this.fromPoints().reverse()))),t},e.prototype.createStroke=function(t){var e=new q.drawing.Path(t),i=new q.drawing.Path(t);e.segments.push.apply(e.segments,this.strokeSegments()),i.segments.push.apply(i.segments,this.stackSegments()),this.visual.append(e),this.visual.append(i)},e.prototype.hasStackSegment=function(){return!0},e.prototype.fromPoints=function(){return this.linePoints.map((function(t){return t.fromPoint}))},e.prototype.toPoints=function(){return this.linePoints.map((function(t){return t.toPoint}))},e}(Oa);const ol=il;var rl=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createStrokeSegments=function(){return this.createCurveSegments(this.toPoints())},e.prototype.stackSegments=function(){var t=this.fromSegments;return this.fromSegments||(t=this.fromSegments=this.createCurveSegments(this.fromPoints().reverse())),t},e.prototype.createCurveSegments=function(t){return(new Gr).process(this.toGeometryPoints(t))},e}(ol);const nl=rl;var sl=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createStrokeSegments=function(){return this.segmentsFromPoints(this.calculateStepPoints(this.toPoints()))},e.prototype.stackSegments=function(){var t=this.fromSegments;return this.fromSegments||(t=this.fromSegments=this.segmentsFromPoints(this.calculateStepPoints(this.fromPoints()))).reverse(),t},e}(ol);at(sl.prototype,va);const al=sl;var pl=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.render=function(){t.prototype.render.call(this),this.renderSegments()},e.prototype.pointType=function(){return el},e.prototype.createPoint=function(t,e){var i=e.series,o=e.seriesIx,r=t.valueFields;if(!$s(r.from)&&!$s(r.to)){if(this.seriesMissingValues(i)!==gn)return null;r={from:0,to:0}}var n=this.pointOptions(i,o);n=this.evalPointOptions(n,r,e);var s=t.fields.color||i.color;ot(i.color)&&(s=n.color);var a=new el(r,n);return a.color=s,this.append(a),a},e.prototype.createSegment=function(t,e,i){var o=(e.line||{}).style;return new("smooth"===o?nl:"step"===o?al:ol)(t,e,i)},e.prototype.plotRange=function(t,e){return t?[t.value.from,t.value.to]:[e,e]},e.prototype.valueSlot=function(t,e){var i=t.getSlot(e[0],e[0],!this.options.clip),o=t.getSlot(e[1],e[1],!this.options.clip);if(i&&o)return{from:i,to:o}},e.prototype.pointSlot=function(t,e){var i,o,r=e.from,n=e.to;return this.options.invertAxes?(i=new wi(r.x1,t.y1,r.x2,t.y2),o=new wi(n.x1,t.y1,n.x2,t.y2)):(i=new wi(t.x1,r.y1,t.x2,r.y2),o=new wi(t.x1,n.y1,t.x2,n.y2)),{from:i,to:o}},e.prototype.addValue=function(e,i){var o=e.valueFields;K(o.from)||(o.from=o.to),K(o.to)||(o.to=o.from),t.prototype.addValue.call(this,e,i)},e.prototype.updateRange=function(t,e){if(null!==t&&K(t.from)&&K(t.to)){var i=e.series.axis,o=this.valueAxisRanges[i]=this.valueAxisRanges[i]||{min:P,max:T},r=t.from,n=t.to;o.min=Math.min(o.min,r,n),o.max=Math.max(o.max,r,n)}},e.prototype.formatPointValue=function(t,e){var i=t.value;return this.chartService.format.auto(e,i.from,i.to)},e.prototype.animationPoints=function(){for(var t=this.points,e=[],i=0;i<t.length;i++){var o=t[i];o&&(e.push((o.fromPoint||{}).marker),e.push((o.toPoint||{}).marker))}return e.concat(this._segments)},e}(aa);at(pl.prototype,ka,Ca);const ll=pl;var hl=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reflow=function(t){var e=this,i=e.options,o=e.value,r=e.owner.seriesValueAxis(i),n=[],s=[],a=[],p=r.getSlot(o.low,o.high),l=r.getSlot(o.open,o.open),h=r.getSlot(o.close,o.close);l.x1=h.x1=p.x1=t.x1,l.x2=h.x2=p.x2=t.x2;var c=p.center().x;n.push([l.x1,l.y1]),n.push([c,l.y1]),s.push([c,h.y1]),s.push([h.x2,h.y1]),a.push([c,p.y1]),a.push([c,p.y2]),this.lines=[n,s,a],this.box=p.clone().wrap(l.clone().wrap(h)),this.reflowNote()},e.prototype.createBody=function(){},e}(Ja);const cl=hl;var ul=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.pointType=function(){return cl},e}(ep);const dl=ul;var fl=function(t){function e(e,i,o){t.call(this),this.from=e,this.to=i,this.series=o}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.linePoints=function(){var t=this.from,e=this.from.box,i=this.to.box,o=[];if(t.isVertical){var r=t.aboveAxis?e.y1:e.y2;o.push([e.x1,r],[i.x2,r])}else{var n=t.aboveAxis?e.x2:e.x1;o.push([n,e.y1],[n,i.y2])}return o},e.prototype.createVisual=function(){t.prototype.createVisual.call(this);var e=this.series.line||{},i=q.drawing.Path.fromPoints(this.linePoints(),{stroke:{color:e.color,width:e.width,opacity:e.opacity,dashType:e.dashType}});Z(i),this.visual.append(i)},e}(Li);te(fl,{animation:{type:hn,delay:ln}});const gl=fl;var yl=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.render=function(){t.prototype.render.call(this),this.createSegments()},e.prototype.traverseDataPoints=function(t){for(var e=this.options.series,i=Gs(e),o=!this.options.invertAxes,r=0;r<e.length;r++)for(var n=e[r],s=0,a=0,p=0;p<i;p++){var l=on.current.bindPoint(n,p),h=l.valueFields.value,c=l.fields.summary,u=s,d=void 0;c?"total"===c.toLowerCase()?(l.valueFields.value=s,u=0,d=s):(l.valueFields.value=a,d=u-a,a=0):K(h)&&(a+=h,d=s+=h),t(l,{category:this.categoryAxis.categoryAt(p),categoryIx:p,series:n,seriesIx:r,total:s,runningTotal:a,from:u,to:d,isVertical:o})}},e.prototype.updateRange=function(e,i){t.prototype.updateRange.call(this,{value:i.to},i)},e.prototype.aboveAxis=function(t){return t.value>=0},e.prototype.plotRange=function(t){return[t.from,t.to]},e.prototype.createSegments=function(){for(var t=this.options.series,e=this.seriesPoints,i=this.segments=[],o=0;o<t.length;o++){var r=t[o],n=e[o];if(n)for(var s=void 0,a=0;a<n.length;a++){var p=n[a];if(p&&s){var l=new gl(s,p,r);i.push(l),this.append(l)}s=p}}},e}(Ka);const vl=yl,ml=function(t,e,i){var o=t[String(e)];return o?o(i):null},xl=function(t,e){for(var i,o,r=0,n=0,s=0,a=0,p=0,l=Number.MAX_VALUE,h=Number.MIN_VALUE,c=0;c<t.length;c++){var u=e(t[c]),d=u.xValue,f=u.yValue;isFinite(d)&&null!==d&&isFinite(f)&&null!==f&&(l=Math.min(d,l),h=Math.max(d,h),p++,r+=d,n+=f,s+=Math.pow(d,2),a+=d*f)}return p>0&&(o=(n-(i=(p*a-r*n)/(p*s-Math.pow(r,2)))*r)/p),{slope:i,intercept:o,count:p,xMin:l,xMax:h}},bl=function(t,e){return t.every((function(t){var i=t.valueFields;return!$s(i[e])||i[e]>0}))},_l=function(t,e){for(var i=[],o=e.totalRangeIndices(),r=e.currentRangeIndices(),n={min:Math.floor(Math.max(r.min-1,o.min)),max:Math.ceil(Math.min(r.max+2,o.max))},s=n.min;s<n.max;s++){var a=s+1;i[s]={category:e.categoryAt(s,!0),value:t(a)}}return i};const wl=function(t,e,i){for(var o=[],r=[],n=Math.max(2,i)-1,s=0,a=0,p=0;p<t.length;p++){var l=e(t[p]),h=l.xValue,c=l.yValue;if(isFinite(c)&&null!==c?(r.push(c),a+=c,s=Math.max(p,s)):r.push(null),p>=n){var u=r.filter((function(t){return null!==t})).length,d=r.shift()||0;if(u>0){var f=a/u;o.push([h,f]),a-=d;continue}}o.push([h,null])}return o.slice(0,s+1)};const kl=function(t,e,i){for(var o=Math.min(Math.max(i||1,1),6)+1,r=new Ce,n=new Ce,s=0,a=Number.MAX_VALUE,p=Number.MIN_VALUE,l=function(t){return t},h=[],c=0;c<t.length;c++){var u=e(t[c]),d=u.xValue,f=u.yValue;if(isFinite(d)&&null!==d&&isFinite(f)&&null!==f){a=Math.min(d,a),p=Math.max(d,p),s++,n.set(c,0,f),r.set(c,0,1),r.set(c,1,d);for(var g=2;g<=o;g++)r.set(c,g,Math.pow(r.get(c,1),g))}else r.set(c,0,0)}return r.width=Math.min(o,s),s>0&&(h=function(t,e){for(var i=t.transpose(),o=i.multiply(t).inverse().multiply(i).multiply(e),r=[],n=0;n<o.height;n++)r.push(o.get(n,0));return r}(r,n),l=function(t){return h.reduce((function(e,i,o){return e+i*Math.pow(t,o)}),0)}),{coefficients:h,count:s,valueMapper:l,xMin:a,xMax:p}};var Al={};Al[ts]=function(t){var e=t.options,i=t.categoryAxis,o=function(t){var e=t.categoryAxis,i=t.options,o=(0,t.seriesValues)();if(!bl(o,i.field))return null;var r,n=xl(o,(r=i.field,function(t){var e=t.categoryIx,i=t.valueFields;return{xValue:e+1,yValue:Math.log(i[r])}})),s=n.slope,a=n.intercept;if(n.count>0){var p=Math.exp(a),l=s;return _l((function(t){return p*Math.exp(l*t)}),e)}return null}({seriesValues:t.seriesValues,categoryAxis:i,options:e});return o?Object.assign({},e,{type:"line",data:o,categoryField:"category",field:"value"}):null},Al[es]=function(t){var e=t.options,i=t.categoryAxis,o=function(t){var e,i=t.categoryAxis,o=t.options,r=xl((0,t.seriesValues)(),(e=o.field,function(t){return{xValue:t.categoryIx+1,yValue:t.valueFields[e]}})),n=r.slope,s=r.intercept;return r.count>0?_l((function(t){return n*t+s}),i):null}({seriesValues:t.seriesValues,categoryAxis:i,options:e});return o?Object.assign({},e,{type:"line",data:o,categoryField:"category",field:"value"}):null},Al[is]=function(t){var e=t.options,i=t.categoryAxis,o=function(t){var e,i=t.categoryAxis,o=t.options,r=xl((0,t.seriesValues)(),(e=o.field,function(t){var i=t.categoryIx,o=t.valueFields;return{xValue:Math.log(i+1),yValue:o[e]}})),n=r.slope,s=r.intercept;if(r.count>0){var a=n,p=s;return _l((function(t){return a*Math.log(t)+p}),i)}return null}({seriesValues:t.seriesValues,categoryAxis:i,options:e});return o?Object.assign({},e,{type:"line",data:o,categoryField:"category",field:"value"}):null},Al[os]=function(t){var e=t.options,i=function(t){var e=t.categoryAxis,i=function(t){var e,i=t.options,o=t.categoryAxis,r=t.seriesValues,n=(i.trendline||{}).period||2,s=o.totalRangeIndices(),a=o.currentRangeIndices(),p={min:Math.floor(Math.max(a.min-n,s.min)),max:Math.ceil(Math.min(a.max+n+2,s.max))};return wl(r(p),(e=i.field,function(t){return{xValue:t.categoryIx,yValue:t.valueFields[e]}}),n)}(t),o=[];return i.forEach((function(t){var i=t[0],r=t[1];o[i]={category:e.categoryAt(i,!0),value:r}})),o.length>0?o:null}(t);return i?Object.assign({},e,{type:"line",data:i,categoryField:"category",field:"value"}):null},Al[rs]=function(t){var e=t.options,i=t.categoryAxis,o=function(t){var e,i=t.seriesValues,o=t.categoryAxis,r=t.options,n=(r.trendline||{}).order,s=kl(i(),(e=r.field,function(t){return{xValue:t.categoryIx+1,yValue:t.valueFields[e]}}),n),a=s.count,p=s.valueMapper;return a>0?_l((function(t){return p(t)}),o):null}({seriesValues:t.seriesValues,categoryAxis:i,options:e});return o?Object.assign({},e,{type:"line",data:o,categoryField:"category",field:"value"}):null},Al[ns]=function(t){var e=t.options,i=t.categoryAxis,o=function(t){var e=t.categoryAxis,i=t.options,o=(0,t.seriesValues)();if(!bl(o,i.field))return null;var r,n=xl(o,(r=i.field,function(t){var e=t.categoryIx,i=t.valueFields;return{xValue:Math.log(e+1),yValue:Math.log(i[r])}})),s=n.slope,a=n.intercept;if(n.count>0){var p=Math.exp(a),l=s;return _l((function(t){return p*Math.pow(t,l)}),e)}return null}({seriesValues:t.seriesValues,categoryAxis:i,options:e});return o?Object.assign({},e,{type:"line",data:o,categoryField:"category",field:"value"}):null};const Sl=Al;var Cl=[_n,Yn,Nn,Kn],Pl=[In,Qn].concat(Cl),Tl=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initFields=function(t){if(this.namedCategoryAxes={},this.namedValueAxes={},this.valueAxisRangeTracker=new ja,this._seriesPointsCache={},this._currentPointsCache={},t.length>0){this.invertAxes=Ct(t[0].type,[wn,Sn,Qn,Yn,Kn,Un,Bn,qn]);for(var e=0;e<t.length;e++){var i=t[e].stack;if(i&&"100%"===i.type){this.stack100=!0;break}}}},e.prototype.render=function(t){void 0===t&&(t=this.panes),this.series=[].concat(this.originalSeries),this.createCategoryAxes(t),this.aggregateCategories(t),this.createTrendlineSeries(t),this.createCategoryAxesLabels(t),this.createCharts(t),this.createValueAxes(t)},e.prototype.removeAxis=function(e){var i=e.options.name;t.prototype.removeAxis.call(this,e),e instanceof nr?delete this.namedCategoryAxes[i]:(this.valueAxisRangeTracker.reset(i),delete this.namedValueAxes[i]),e===this.categoryAxis&&delete this.categoryAxis,e===this.valueAxis&&delete this.valueAxis},e.prototype.trendlineFactory=function(t,e){var i=this.seriesCategoryAxis(t),o=this.seriesValues.bind(this,e.index),r=ml(Sl,t.type,{options:t,categoryAxis:i,seriesValues:o});return r?(r.categoryAxis=e.categoryAxis,r.valueAxis=e.valueAxis,this.filterSeries(r,i)):r},e.prototype.trendlineAggregateForecast=function(){return this.series.map((function(t){return(t.trendline||{}).forecast})).filter((function(t){return void 0!==t})).reduce((function(t,e){return{before:Math.max(t.before,e.before||0),after:Math.max(t.after,e.after||0)}}),{before:0,after:0})},e.prototype.seriesValues=function(t,e){var i=[],o=this.srcSeries[t],r=this.seriesCategoryAxis(o);Ws(r.options.type,m)&&(this._seriesPointsCache={},this._currentPointsCache={},r.options.dataItems=[],o=this.aggregateSeries(o,r,r.totalRangeIndices()));for(var n=e?e.min:0,s=e?e.max:o.data.length,a=n;a<s;a++){var p=this.bindPoint(o,a);i.push({categoryIx:a,category:p.fields.category,valueFields:p.valueFields})}return i},e.prototype.createCharts=function(t){for(var e=this.groupSeriesByPane(),i=0;i<t.length;i++){var o=t[i],r=e[o.options.name||"default"]||[];this.addToLegend(r);var n=this.filterVisibleSeries(r);if(n)for(var s=this.groupSeriesByCategoryAxis(n),a=0;a<s.length;a++)this.createChartGroup(s[a],o)}},e.prototype.createChartGroup=function(t,e){this.createAreaChart(qs(t,[_n,Yn]),e),this.createRangeAreaChart(qs(t,[Nn,Kn]),e),this.createBarChart(qs(t,[Pn,wn]),e),this.createRangeBarChart(qs(t,[Gn,Un]),e),this.createBulletChart(qs(t,[Sn,Zn]),e),this.createCandlestickChart(qs(t,Cn),e),this.createBoxPlotChart(qs(t,[kn,qn]),e),this.createOHLCChart(qs(t,En),e),this.createWaterfallChart(qs(t,[$n,Bn]),e),this.createLineChart(qs(t,[In,Qn]),e)},e.prototype.aggregateCategories=function(t){var e=[].concat(this.series),i=[];this._currentPointsCache={},this._seriesPointsCache=this._seriesPointsCache||{};for(var o=0;o<e.length;o++){var r=e[o];if(!this.isTrendline(r)){var n=this.seriesCategoryAxis(r),s=this.findPane(n.options.pane);r=(Ws(n.options.type,m)||r.categoryField)&&Ct(s,t)?this.aggregateSeries(r,n,n.currentRangeIndices()):this.filterSeries(r,n)}i.push(r)}this._seriesPointsCache=this._currentPointsCache,this._currentPointsCache=null,this.srcSeries=e,this.series=i},e.prototype.filterSeries=function(t,e){var i=(t.data||{}).length;if(e._seriesMax=Math.max(e._seriesMax||0,i),!jt(e.options.min)&&!jt(e.options.max))return t;var o=e.currentRangeIndices(),r=Ct(t.type,Pl),n=at({},t);return n.data=(n.data||[]).slice(o.min,o.max+1),r&&ra(n,o,i,(function(i){return{item:t.data[i],category:e.categoryAt(i,!0),categoryIx:i-o.min}}),(function(e){return jt(t.data[e])})),n},e.prototype.clearSeriesPointsCache=function(){this._seriesPointsCache={}},e.prototype.seriesSourcePoints=function(t,e){var i=t.index+";"+e.categoriesHash();if(this._seriesPointsCache&&this._seriesPointsCache[i])return this._currentPointsCache[i]=this._seriesPointsCache[i],this._seriesPointsCache[i];var o=e.options,r=o.srcCategories,n=Ws(o.type,m),s=t.data,a=[];n||e.indexCategories();for(var p=0;p<s.length;p++){var l=on.current.bindPoint(t,p).fields.category;if(n&&(l=Qs(l,s[p],this.chartService.intl)),void 0===l&&(l=r[p]),null!=l){var h=e.totalIndex(l);a[h]=a[h]||{items:[],category:l},a[h].items.push(p)}}return this._currentPointsCache[i]=a,a},e.prototype.aggregateSeries=function(t,e,i){if(!t.data.length)return t;for(var o=this.seriesSourcePoints(t,e),r=at({},t),n=new Gp(at({},t),on.current,Xp.current),s=r.data=[],a=e.options.dataItems||[],p=function(t){var r=t-i.min,s=o[t];if(s||(s=o[t]={}),s.categoryIx=r,!s.item){var a=e.categoryAt(t,!0);s.category=a,s.item=n.aggregatePoints(s.items,a)}return s},l=i.min;l<=i.max;l++){var h=p(l);s[h.categoryIx]=h.item,h.items&&h.items.length&&(a[h.categoryIx]=h.item)}return Ct(r.type,Pl)&&ra(r,i,e.totalCount(),p,(function(t){return o[t]})),e.options.dataItems=a,r},e.prototype.appendChart=function(e,i){var o=e.options.series,r=this.seriesCategoryAxis(o[0]),n=r.options.categories,s=Math.max(0,Gs(o)-n.length);if(s>0)for(n=r.options.categories=r.options.categories.slice(0);s--;)n.push("");this.valueAxisRangeTracker.update(e.valueAxisRanges),t.prototype.appendChart.call(this,e,i)},e.prototype.seriesPaneName=function(t){var e=this.options,i=t.axis,o=[].concat(e.valueAxis),r=wt(o,(function(t){return t.name===i}))[0],n=((e.panes||[{}])[0]||{}).name||"default";return(r||{}).pane||n},e.prototype.seriesCategoryAxis=function(t){var e=t.categoryAxis,i=e?this.namedCategoryAxes[e]:this.categoryAxis;if(!i)throw new Error("Unable to locate category axis with name "+e);return i},e.prototype.stackableChartOptions=function(t,e){var i=t.some((function(t){return t.stack})),o=t.some((function(t){return t.stack&&"100%"===t.stack.type})),r=e.options.clip;return{defaultStack:t[0].stack,isStacked:i,isStacked100:o,clip:r}},e.prototype.groupSeriesByCategoryAxis=function(t){for(var e=[],i={},o=0;o<t.length;o++){var r=t[o].categoryAxis||"$$default$$";Ae(i,r)||(i[r]=!0,e.push(r))}for(var n=[],s=0;s<e.length;s++){var a=Ol(t,e[s],s);0!==a.length&&n.push(a)}return n},e.prototype.createBarChart=function(t,e){if(0!==t.length){var i=t[0],o=new Ka(this,Object.assign({series:t,invertAxes:this.invertAxes,gap:i.gap,spacing:i.spacing},this.stackableChartOptions(t,e)));this.appendChart(o,e)}},e.prototype.createRangeBarChart=function(t,e){if(0!==t.length){var i=t[0],o=new Qp(this,{series:t,invertAxes:this.invertAxes,gap:i.gap,spacing:i.spacing});this.appendChart(o,e)}},e.prototype.createBulletChart=function(t,e){if(0!==t.length){var i=t[0],o=new _p(this,{series:t,invertAxes:this.invertAxes,gap:i.gap,spacing:i.spacing,clip:e.options.clip});this.appendChart(o,e)}},e.prototype.createLineChart=function(t,e){if(0!==t.length){var i=new Ta(this,Object.assign({invertAxes:this.invertAxes,series:t},this.stackableChartOptions(t,e)));this.appendChart(i,e)}},e.prototype.createAreaChart=function(t,e){if(0!==t.length){var i=new Va(this,Object.assign({invertAxes:this.invertAxes,series:t},this.stackableChartOptions(t,e)));this.appendChart(i,e)}},e.prototype.createRangeAreaChart=function(t,e){if(0!==t.length){var i=new ll(this,{invertAxes:this.invertAxes,series:t,clip:e.options.clip});this.appendChart(i,e)}},e.prototype.createOHLCChart=function(t,e){if(0!==t.length){var i=t[0],o=new dl(this,{invertAxes:this.invertAxes,gap:i.gap,series:t,spacing:i.spacing,clip:e.options.clip});this.appendChart(o,e)}},e.prototype.createCandlestickChart=function(t,e){if(0!==t.length){var i=t[0],o=new ep(this,{invertAxes:this.invertAxes,gap:i.gap,series:t,spacing:i.spacing,clip:e.options.clip});this.appendChart(o,e)}},e.prototype.createBoxPlotChart=function(t,e){if(0!==t.length){var i=t[0],o=new ap(this,{invertAxes:this.invertAxes,gap:i.gap,series:t,spacing:i.spacing,clip:e.options.clip});this.appendChart(o,e)}},e.prototype.createWaterfallChart=function(t,e){if(0!==t.length){var i=t[0],o=new vl(this,{series:t,invertAxes:this.invertAxes,gap:i.gap,spacing:i.spacing});this.appendChart(o,e)}},e.prototype.axisRequiresRounding=function(t,e){for(var i=qs(this.series,Jn),o=0;o<this.series.length;o++){var r=this.series[o];if(Ct(r.type,Cl)){var n=r.line;n&&n.style===bn&&i.push(r)}}for(var s=0;s<i.length;s++){var a=i[s].categoryAxis||"";if(a===t||!a&&0===e)return!0}},e.prototype.aggregatedAxis=function(t,e){for(var i=this.series,o=0;o<i.length;o++){var r=i[o].categoryAxis||"";if((r===t||!r&&0===e)&&i[o].categoryField)return!0}},e.prototype.createCategoryAxesLabels=function(){for(var t=this.axes,e=0;e<t.length;e++)t[e]instanceof nr&&t[e].createLabels()},e.prototype.createCategoryAxes=function(t){for(var e=this.invertAxes,i=[].concat(this.options.categoryAxis),o=[],r=0;r<i.length;r++){var n=i[r];if(Ct(this.findPane(n.pane),t)){var s=n.name,a=n.categories;void 0===a&&(a=[]),n=at({vertical:e,reverse:!e&&this.chartService.rtl,axisCrossingValue:e?P:0},n),jt(n.justified)||(n.justified=this.isJustified()),this.axisRequiresRounding(s,r)&&(n.justified=!1);var p=void 0;if(Js(n,a[0])?(n._forecast=this.trendlineAggregateForecast(),p=new fr(n,this.chartService)):p=new nr(n,this.chartService),i[r].categories=p.options.srcCategories,s){if(this.namedCategoryAxes[s])throw new Error("Category axis with name "+s+" is already defined");this.namedCategoryAxes[s]=p}p.axisIndex=r,o.push(p),this.appendAxis(p)}}var l=this.categoryAxis||o[0];this.categoryAxis=l,e?this.axisY=l:this.axisX=l},e.prototype.isJustified=function(){for(var t=this.series,e=0;e<t.length;e++)if(!Ct(t[e].type,Cl))return!1;return!0},e.prototype.createValueAxes=function(t){var e=this.valueAxisRangeTracker,i=e.query(),o=[].concat(this.options.valueAxis),r=this.invertAxes,n={vertical:!r,reverse:r&&this.chartService.rtl},s=[];this.stack100&&(n.roundToMajorUnit=!1,n.labels={format:"P0"});for(var a=0;a<o.length;a++){var p=o[a];if(Ct(this.findPane(p.pane),t)){var l=p.name,h=Ws(p.type,Ts)?{min:.1,max:1}:{min:0,max:1},c=e.query(l)||i||h;0===a&&c&&i&&(c.min=Math.min(c.min,i.min),c.max=Math.max(c.max,i.max));var u=new(Ws(p.type,Ts)?Tr:_r)(c.min,c.max,at({},n,p),this.chartService);if(l){if(this.namedValueAxes[l])throw new Error("Value axis with name "+l+" is already defined");this.namedValueAxes[l]=u}u.axisIndex=a,s.push(u),this.appendAxis(u)}}var d=this.valueAxis||s[0];this.valueAxis=d,r?this.axisX=d:this.axisY=d},e.prototype._dispatchEvent=function(t,e,i){var o=t._eventCoordinates(e),r=new xi(o.x,o.y),n=this.pointPane(r),s=[],a=[];if(n){for(var p=n.axes,l=0;l<p.length;l++){var h=p[l];h.getValue?Fs(a,h.getValue(r)):Fs(s,h.getCategory(r))}0===s.length&&Fs(s,this.categoryAxis.getCategory(r)),s.length>0&&a.length>0&&t.trigger(i,{element:Ut(e),originalEvent:e,category:ta(s),value:ta(a)})}},e.prototype.pointPane=function(t){for(var e=this.panes,i=0;i<e.length;i++){var o=e[i];if(o.contentBox.containsPoint(t))return o}},e.prototype.updateAxisOptions=function(t,e){Ml(this.options,t,e),Ml(this.originalOptions,t,e)},e.prototype._pointsByVertical=function(t,e){return void 0===e&&(e=0),this.invertAxes?this._siblingsBySeriesIndex(t.series.index,e):this._siblingsByPointIndex(t.getIndex())},e.prototype._pointsByHorizontal=function(t,e){if(void 0===e&&(e=0),this.invertAxes)return this._siblingsByPointIndex(t.getIndex());var i=this._siblingsBySeriesIndex(t.series.index,e);return this.chartService.rtl?i.reverse():i},e.prototype._siblingsByPointIndex=function(t){for(var e=this.charts,i=[],o=0;o<e.length;o++){var r=e[o];if(!r.pane||"_navigator"!==r.pane.options.name){var n=r.points.filter((function(e){return e&&!1!==e.visible&&e.getIndex()===t}));i.push.apply(i,n.sort(this._getSeriesCompareFn(n[0])))}}return i},e.prototype._siblingsBySeriesIndex=function(t,e){var i=it(t+e,this.series.length);return this.pointsBySeriesIndex(i)},e.prototype._getSeriesCompareFn=function(t){var e=this._isInStackedSeries(t);return e&&this.invertAxes||!e&&!this.invertAxes?function(t,e){return t.box.center().x-e.box.center().x}:function(t,e){return t.box.center().y-e.box.center().y}},e.prototype._isInStackedSeries=function(t){var e=Ct(t.series.type,[_n,Yn,Nn,Kn,In,Qn,Hn,Dn]),i=Ct(t.series.type,[Pn,wn]);return e||i&&t.options.isStacked},e}(Dp);function Ml(t,e,i){at([].concat(e instanceof nr?t.categoryAxis:t.valueAxis)[e.axisIndex],i)}function Ol(t,e,i){return wt(t,(function(t){return 0===i&&!t.categoryAxis||t.categoryAxis===e}))}te(Tl,{categoryAxis:{},valueAxis:{}}),at(Tl.prototype,Hp);const Ll=Tl;var Bl=function(){this._points=[]};function Il(){this._defaultPrevented=!0}Bl.prototype.destroy=function(){this._points=[]},Bl.prototype.show=function(t,e){var i=[].concat(t);this.hide();for(var o=0;o<i.length;o++){var r=i[o];r&&r.toggleHighlight&&r.hasHighlight()&&(this.togglePointHighlight(r,!0,e),this._points.push(r))}},Bl.prototype.togglePointHighlight=function(t,e,i){var o=(t.options.highlight||{}).toggle,r=t.options.highlight||{},n=void 0!==i?i:r.inactiveOpacity;if(o){var s={category:t.category,series:t.series,dataItem:t.dataItem,value:t.value,stackValue:t.stackValue,preventDefault:Il,visual:t.highlightVisual(),show:e};o(s),s._defaultPrevented||t.toggleHighlight(e,n)}else t.toggleHighlight(e,n)},Bl.prototype.hide=function(){for(var t=this._points;t.length;){var e=t.pop(),i=e.options.highlight||{};this.togglePointHighlight(e,!1,i.inactiveOpacity)}},Bl.prototype.isHighlighted=function(t){for(var e=this._points,i=0;i<e.length;i++)if(t===e[i])return!0;return!1};const El=Bl;function Rl(t,e){var i=(e||"").toLowerCase(),o=t.event;return"none"===i&&!(o.ctrlKey||o.shiftKey||o.altKey)||o[i+"Key"]}function Vl(t){for(var e={},i=0;i<t.length;i++){var o=t[i];o.axis.options.name&&(e[o.axis.options.name]={min:o.range.min,max:o.range.max})}return e}var zl=function(t,e){this.plotArea=t,this.options=at({},this.options,e)};zl.prototype.start=function(t){return this._active=Rl(t,this.options.key),this._active},zl.prototype.move=function(t){if(this._active){var e=this.axisRanges=this._panAxes(t,F).concat(this._panAxes(t,H));if(e.length)return this.axisRanges=e,Vl(e)}},zl.prototype.end=function(){var t=this._active;return this._active=!1,t},zl.prototype.pan=function(){var t=this.plotArea,e=this.axisRanges;if(e.length){for(var i=0;i<e.length;i++){var o=e[i];t.updateAxisOptions(o.axis,o.range)}t.redraw(t.panes)}},zl.prototype.destroy=function(){delete this.plotArea},zl.prototype._panAxes=function(t,e){var i=this.plotArea,o=-t[e].delta,r=(this.options.lock||"").toLowerCase(),n=[];if(0!==o&&(r||"").toLowerCase()!==e)for(var s=i.axes,a=0;a<s.length;a++){var p=s[a];if(e===F&&!p.options.vertical||e===H&&p.options.vertical){var l=p.pan(o);l&&(l.limitRange=!0,n.push({axis:p,range:l}))}}return n},zl.prototype.options={key:"none",lock:"none"};const jl=zl;var Dl=function(t,e){this.chart=t,this.options=at({},this.options,e),this.createElement()};Dl.prototype.createElement=function(){var t=this._marquee=document.createElement("div");t.className="k-marquee";var e=document.createElement("div");e.className="k-marquee-color",t.appendChild(e)},Dl.prototype.removeElement=function(){this._marquee.parentNode&&this._marquee.parentNode.removeChild(this._marquee)},Dl.prototype.setStyles=function(t){ut(this._marquee,t)},Dl.prototype.start=function(t){if(Rl(t,this.options.key)){var e=this.chart,i=e._eventCoordinates(t),o=this._zoomPane=e._plotArea.paneByPoint(i),r=o?o.chartsBox().clone():null;if(o&&r){var n=this._elementOffset();return r.translate(n.left,n.top),this._zoomPaneClipBox=r,document.body.appendChild(this._marquee),this.setStyles({left:t.pageX+1,top:t.pageY+1,width:0,height:0}),!0}}return!1},Dl.prototype._elementOffset=function(){var t=this.chart.element,e=ut(t,["paddingLeft","paddingTop"]),i=e.paddingLeft,o=e.paddingTop,r=Ft(t);return{left:i+r.left,top:o+r.top}},Dl.prototype.move=function(t){this._zoomPane&&this.setStyles(this._selectionPosition(t))},Dl.prototype.end=function(t){if(this._zoomPane){var e=this._elementOffset(),i=this._selectionPosition(t);i.left-=e.left,i.top-=e.top;var o={x:i.left,y:i.top},r={x:i.left+i.width,y:i.top+i.height};return this._updateAxisRanges(o,r),this.removeElement(),delete this._zoomPane,Vl(this.axisRanges)}},Dl.prototype.zoom=function(){var t=this.axisRanges;if(t&&t.length){for(var e=this.chart._plotArea,i=0;i<t.length;i++){var o=t[i];e.updateAxisOptions(o.axis,o.range)}e.redraw(e.panes)}},Dl.prototype.destroy=function(){this.removeElement(),delete this._marquee,delete this.chart},Dl.prototype._updateAxisRanges=function(t,e){for(var i=(this.options.lock||"").toLowerCase(),o=[],r=this._zoomPane.axes,n=0;n<r.length;n++){var s=r[n],a=s.options.vertical;if((i!==F||a)&&(i!==H||!a)&&jt(s.axisIndex)){var p=s.pointsRange(t,e);p&&o.push({axis:s,range:p})}}this.axisRanges=o},Dl.prototype._selectionPosition=function(t){var e=this._zoomPaneClipBox,i={x:t.x.startLocation,y:t.y.startLocation},o=t.x.location,r=t.y.location,n=(this.options.lock||"").toLowerCase(),s=Math.min(i.x,o),a=Math.min(i.y,r),p=Math.abs(i.x-o),l=Math.abs(i.y-r);return n===F&&(s=e.x1,p=e.width()),n===H&&(a=e.y1,l=e.height()),o>e.x2&&(p=e.x2-i.x),o<e.x1&&(p=i.x-e.x1),r>e.y2&&(l=e.y2-i.y),r<e.y1&&(l=i.y-e.y1),{left:Math.max(s,e.x1),top:Math.max(a,e.y1),width:p,height:l}},Dl.prototype.options={key:"shift",lock:"none"};const Fl=Dl;var Hl=function(t,e){this.chart=t,this.options=at({rate:.3},this.options,e)};Hl.prototype.updateRanges=function(t,e){for(var i=(this.options.lock||"").toLowerCase(),o=[],r=this.chart._plotArea.axes,n=0;n<r.length;n++){var s=r[n],a=s.options.vertical;if((i!==F||a)&&(i!==H||!a)&&s.zoomRange){var p=Xt(this.options.rate,.01,.9),l=s.zoomRange(-t*p,e);l&&o.push({axis:s,range:l})}}return this.axisRanges=o,Vl(o)},Hl.prototype.zoom=function(){var t=this.axisRanges,e=this.chart._plotArea;if(t&&t.length&&e.updateAxisOptions){for(var i=0;i<t.length;i++){var o=t[i];e.updateAxisOptions(o.axis,o.range)}e.redraw(e.panes)}},Hl.prototype.destroy=function(){delete this.chart};const Nl=Hl;var Ul=function(t){function e(e,i){t.call(this,e),this.chartService=i}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.render=function(){var t,e=this.children,i=this.options,o=i.vertical;this.visual=new q.drawing.Layout(null,{spacing:o?0:i.spacing,lineSpacing:o?i.spacing:0,orientation:o?"vertical":U,reverse:i.rtl,alignItems:o?(t=i.rtl,t?_:E):f});for(var r=0;r<e.length;r++){var n=e[r];n.reflow(new wi),n.renderVisual()}},e.prototype.reflow=function(t){this.visual.rect(t.toRect()),this.visual.reflow();var e=this.visual.clippedBBox();this.box=e?Zi(e):new wi},e.prototype.renderVisual=function(){this.addVisual()},e.prototype.createVisual=function(){},e}(Li);const Gl=Ul;var Wl=10,Xl=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.visualStyle=function(){var t=this.markerOptions(),e=t.border;return{stroke:{width:e.width,color:e.color,opacity:Kt(e.opacity,t.opacity),dashType:e.dashType},fill:{color:t.background,opacity:t.opacity},cursor:t.cursor}},e.prototype.markerOptions=function(){return this.options},e.prototype.markerHighlightOptions=function(){var t=this.markerOptions(),e=t.highlight.border.width;return at({},t,{background:t.border.color},t.highlight,t.type===v?{background:t.highlight.border.color,border:{color:t.highlight.background,width:e/2},width:t.width,height:t.height,margin:{top:0,left:0}}:{})},e.prototype.createHighlight=function(){var e=new t(this.markerHighlightOptions()),i=this.paddingBox.clone();return e.reflow(i.pad(e.options.border.width)),this.highlight=[e.getElement()],this.highlight},e}(ji);te(Xl,{border:{width:2},width:8,height:8,background:j,margin:{top:-1,left:-1},vAlign:V,align:C,highlight:{width:Wl,height:Wl,border:{color:j,width:2}}});const Yl=Xl;var ql=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getElement=function(){var t=new q.drawing.Group,e=new q.drawing.MultiPath(this.visualStyle()),i=this.paddingBox,o=i.height()/2;return e.moveTo(i.x1,i.y1+o).lineTo(i.x1,i.y2).lineTo(i.x2,i.y2),t.append(e),t},e}(ji);te(ql,{width:15,height:15,align:B,vAlign:d,margin:{right:-2,bottom:2}});const Zl=ql;var Ql=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getElement=function(){var t=new q.drawing.Group,e=new q.drawing.MultiPath({stroke:{color:this.options.border.color,opacity:this.options.opacity,width:this.options.height,dashType:this.options.dashType}}),i=this.paddingBox,o=i.center().y;return e.moveTo(i.x1,o).lineTo(i.x2,o),t.append(e),t},e.prototype.createHighlight=function(){return this.highlight=[this.createHighlightLine(),this.createHighlightMarker()],this.highlight},e.prototype.createHighlightLine=function(){var t=at({},{border:{color:this.options.border.color,opacity:this.options.border.opacity,dashType:this.options.border.dashType}},this.options.highlight),e=new Zl(t);return e.reflow(this.parent.paddingBox.clone()),this.highlightLine=e.getElement(),this.highlightLine},e.prototype.createHighlightMarker=function(){var e=at({},{background:this.options.background},this.options.highlight.markers),i=new t(e),o=this.parent.paddingBox,r=e.border.width,n=this.parent.box.clone();return n.pad({left:r-o.x1,top:r-o.y1}),i.reflow(n),this.highlightMarker=i.getElement(),this.highlightMarker},e}(ji);te(Ql,{border:{width:0},type:"rect",align:C,vAlign:f,highlight:{border:{width:2},markers:{type:g,width:Wl,height:Wl,border:{width:2,color:j},align:C,vAlign:V}}});const Kl=Ql;var $l=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createHighlight=function(){var e=at({},{background:this.options.background},this.options.highlight.markers),i=new t(e),o=this.paddingBox.clone(),r=this.parent.box.clone();return o.align(r,F,C),o.align(r,H,V),i.reflow(o),this.highlight=[i.getElement()],this.highlight},e}(ji);te($l,{highlight:{markers:{type:g,width:Wl,height:Wl,border:{width:2,color:j},margin:{top:-3,left:-3}}}});const Jl=$l;var th=function(t){function e(e){t.call(this,e),this.createContainer(),e.rtl?(this.createLabel(),this.createMarker()):(this.createMarker(),this.createLabel()),this._id=Be(),this.options.accessibility.ariaChecked=e.active}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createContainer=function(){this.container=new Wi({vertical:!1,wrap:!1,align:f,spacing:this.options.spacing}),this.append(this.container)},e.prototype.createMarker=function(){this.markerWrap=new t({vertical:!1,shrinkToFit:!0,wrap:!1,margin:1,width:22,height:22}),this.container.append(this.markerWrap),this.createMarkerArea(),this.options.markers.visible&&(this._marker=this._createMarker(),this.markerWrap.append(this._marker))},e.prototype.createMarkerArea=function(){var t=this.options,e=t.markerColor,i=t.line;void 0===i&&(i={});var o={border:{color:i.color||e,opacity:i.opacity,dashType:i.dashType}};return this._createLine(o)||this._createMarkerLine(o,i)||this._createSquare()},e.prototype.markerOptions=function(){var t=this.options,e=t.markers;void 0===e&&(e={});var i=t.markerColor,o=e.border;return void 0===o&&(o={}),e.zIndex=void 0,at({},e,{border:{color:o.color||i},highlight:t.highlight.markers})},e.prototype._highlightOptions=function(){var t=this.options;return at({markers:{type:t.markers.type}},t.highlight)},e.prototype._createLine=function(t){var e=this.options;return e.type!==In||e.markers.visible||(this._line=new Kl(at({},{background:e.markerColor,highlight:this._highlightOptions()},t,e.line)),this.markerWrap.append(this._line)),this._line},e.prototype._createMarkerLine=function(t,e){return this.options.type===In&&(this._markerLineArea=new Zl(at({},{border:{width:e.height}},t)),this.markerWrap.append(this._markerLineArea)),this._markerLineArea},e.prototype._reduceSize=function(t,e,i){void 0===i&&(i=.6),"number"==typeof t[e]&&(t[e]=t[e]*i)},e.prototype._createSquare=function(){var t=this.options;if(t.type===_n){var e=t.pattern||(t.series||{}).pattern;e&&("function"==typeof e&&(e=e(t.series)),e=Object.assign({},e),this._reduceSize(e,"gap"),this._reduceSize(e,"width"),this._reduceSize(e,"radius")),this._square=new Jl(Object.assign({},{border:t.border,vAlign:t.markers.visible?d:f,highlight:this._highlightOptions()},t.area,{pattern:e,background:t.area.background||t.markerColor})),this.markerWrap.append(this._square)}return this._square},e.prototype._createMarker=function(){return new Yl(this.markerOptions())},e.prototype._highlightMarkers=function(){this.options.active&&this._toggleHighlight(!0)},e.prototype._restoreMarkers=function(){this._toggleHighlight(!1)},e.prototype._toggleHighlight=function(t){var e=this;if(this.options.highlight.visible){var i=this._marker||this._square||this._line;if(i&&i===this._line&&this._line.visual.visible(!t),i){var o=i.highlight;o||(o=i.createHighlight()).forEach((function(t){return t&&e.markerWrap.appendVisual(t)})),o.forEach((function(e){return e&&e.visible(t)}))}}},e.prototype.createLabel=function(){var t=this.options,e=at({},t.labels);this.container.append(new $i(t.text,e))},e.prototype.getAriaLabelText=function(){return this.options.text},e.prototype.focusVisual=function(){this.visual.options.set("id",this._id),this.toggleFocusHighlight(!0),this._highlightMarkers()},e.prototype.clearFocusFromVisual=function(){this.visual.options.set("id",""),this.toggleFocusHighlight(!1),this._restoreMarkers()},e.prototype.renderComplete=function(){t.prototype.renderComplete.call(this);var e=this.options.cursor||{},i=this._itemOverlay=q.drawing.Path.fromRect(this.container.box.toRect(),{fill:{color:j,opacity:0},stroke:null,cursor:e.style||e});this.appendVisual(i)},e.prototype.click=function(t,e){var i=this.eventArgs(e);!t.trigger(as,i)&&e&&"contextmenu"===e.type&&e.preventDefault()},e.prototype.over=function(t,e){var i=this.eventArgs(e);return t.trigger("legendItemHover",i)||(t._legendItemHover(i.seriesIndex,i.pointIndex),this._highlightMarkers()),!0},e.prototype.out=function(t,e){t._unsetActivePoint(),this._restoreMarkers(),t.trigger("legendItemLeave",this.eventArgs(e))},e.prototype.eventArgs=function(t){var e=this.options;return{element:Ut(t),text:e.text,series:e.series,seriesIndex:e.series.index,pointIndex:e.pointIndex}},e.prototype.createVisual=function(){t.prototype.createVisual.call(this);var e=this.options;if(this.options.visible){var i=at({ariaLabel:void 0!==e.accessibility.ariaLabel?e.accessibility.ariaLabel:e.text},e.accessibility);Vi(this.visual,i)}},e.prototype.renderVisual=function(){var e=this,i=this.options,o=i.visual;o?(this.visual=o({active:i.active,series:i.series,sender:this.getSender(),pointIndex:i.pointIndex,options:{type:i.type,markers:at({background:this.options.markerColor},this.markerOptions()),labels:i.labels},createVisual:function(){e.createVisual(),e.renderChildren(),e.renderComplete();var t=e.visual;return delete e.visual,t}}),this._marker=this._markerLineArea=this._square=this._line=null,this.addVisual()):t.prototype.renderVisual.call(this)},e.prototype.createFocusHighlight=function(t){var e=t.stroke.width;return q.drawing.Path.fromRect(this.container.box.pad(e/2).toRect(),t)},e}(Ri);te(th,{accessibility:{role:"checkbox",className:"k-chart-legend-item",ariaRoleDescription:"Legend item"},markers:{},highlight:{visible:!0,markers:{}}});const eh=th;var ih="custom",oh=function(t){function e(e,i){void 0===i&&(i={}),t.call(this,e),this.chartService=i,Ct(this.options.position,[V,B,d,C,ih])||(this.options.position=B),this.createContainers(),this.createLegendTitle(e.title),this.createItems()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createContainers=function(){var t=this.options,e=t.position,i=t.align,o=e,r=f;e===ih?o=C:Ct(e,[V,d])?(o=i===E?C:i===_?B:f,r=e):i&&(i===E?r=V:i===_&&(r=d)),this.container=new Ri({margin:t.margin,padding:t.padding,background:t.background,border:t.border,vAlign:r,align:o,zIndex:t.zIndex,shrinkToFit:!0}),this.hasTitle()?this.itemsContainer=new Ri({vAlign:r,align:o,zIndex:t.zIndex,shrinkToFit:!0}):this.itemsContainer=this.container,this.append(this.container)},e.prototype.createItems=function(){var t=this.getService(),e=this.options,i=this.isVertical(),o=new Gl({vertical:i,spacing:e.spacing,rtl:t.rtl},t),r=e.data;e.reverse&&(r=r.slice(0).reverse());for(var n=r.length,s=0;s<n;s++){var a=r[s],p=a.series||{},l=p.markers;void 0===l&&(l={});var h=p.dashType,c=p.legendItem,u=p.opacity,d=at({visible:!1!==l.visible,type:g},l);delete d.size;var f=at({},{markers:d,labels:e.labels,rtl:t.rtl,line:Object.assign({},{dashType:h},e.line),area:Object.assign({},{opacity:u},e.area),opacity:u,accessibility:e.accessibility,focusHighlight:e.focusHighlight},e.item,c,a,{markers:e.markers});o.append(new eh(f))}o.render(),this.itemsContainer.append(o)},e.prototype.isVertical=function(){var t=this.options,e=t.orientation,i=t.position;return i===ih&&e!==U||(jt(e)?e!==U:Ct(i,[C,B]))},e.prototype.hasItems=function(){return this.container.children[0].children.length>0},e.prototype.getItems=function(){return this.itemsContainer.children[0].children},e.prototype.reflow=function(t){var e=this.options,i=t.clone();this.hasItems()?(e.position===ih?(this.containerCustomReflow(i),this.box=i):this.containerReflow(i),this.hasTitle()&&(this.title.reflow(new wi(this.container.box.x1,this.title.box.y1,this.container.box.x2,this.title.box.y2)),this.title.box.width()>this.itemsContainer.box.width()&&this.itemsContainer.reflow(new wi(this.container.box.x1,this.itemsContainer.box.y1,this.container.box.x2,this.itemsContainer.box.y2)))):this.box=i},e.prototype.containerReflow=function(t){var e=this.options,i=this.container,o=e.position,r=e.width,n=e.height,s=o===V||o===d?F:H,a=this.isVertical(),p=t.clone(),l=t.clone();o!==C&&o!==B||(l.y1=p.y1=0),a&&n?(l.y2=l.y1+n,l.align(p,H,i.options.vAlign)):!a&&r&&(l.x2=l.x1+r,l.align(p,F,i.options.align)),i.reflow(l);var h=(l=i.box).clone();(e.offsetX||e.offsetY)&&(l.translate(e.offsetX,e.offsetY),i.reflow(l)),h[s+1]=t[s+1],h[s+2]=t[s+2],this.box=h},e.prototype.containerCustomReflow=function(t){var e=this.options,i=this.container,o=e.offsetX,r=e.offsetY,n=e.width,s=e.height,a=this.isVertical(),p=t.clone();a&&s?p.y2=p.y1+s:!a&&n&&(p.x2=p.x1+n),i.reflow(p),p=i.box,i.reflow(new wi(o,r,o+p.width(),r+p.height()))},e.prototype.renderVisual=function(){this.hasItems()&&t.prototype.renderVisual.call(this)},e.prototype.createLegendTitle=function(t){var e=at({},{color:u,position:V,align:f},t),i=e.text;if(t&&!1!==t.visible&&t.text){if(jt(e)&&e.visible){var o=vt(e);o?i=o({text:i}):e.format&&(i=this.chartService.format.auto(e.format,i))}this.title=new $i(i,e),this.createTitleLayout(),this.appendTitleLayoutContent()}},e.prototype.createTitleLayout=function(){this.layout=new Wi({vertical:!0,wrap:!1}),this.container.append(this.layout)},e.prototype.hasTitle=function(){return Boolean(this.options.title&&!1!==this.options.title.visible&&this.options.title.text)},e.prototype.appendTitleLayoutContent=function(){this.options.title.position===d?(this.layout.append(this.itemsContainer),this.layout.append(this.title)):(this.layout.append(this.title),this.layout.append(this.itemsContainer))},e}(Li);te(oh,{position:B,data:[],offsetX:0,offsetY:0,margin:dt(2),padding:dt(5),border:{color:u,width:0},item:{cursor:N,spacing:6},spacing:6,background:"",zIndex:1,markers:{},line:{width:20,height:2,cursor:N,opacity:1},area:{type:"square",align:B,width:15,height:15}});const rh=oh;var nh=function(){this._registry=[]};nh.prototype.register=function(t,e){this._registry.push({type:t,seriesTypes:e})},nh.prototype.create=function(t,e,i){for(var o,r=this._registry,n=r[0],s=0;s<r.length;s++){var a=r[s];o=qs(t,a.seriesTypes);var p=qs(t,ss);if(o.length-p.length>0){n=a;break}}return new n.type(o,e,i)},nh.current=new nh;const sh=nh;function ah(t){var e=document.createElement("div");return t&&(e.className=t),e}function ph(t){for(var e=t;e&&!kt(e,"k-handle");)e=e.parentNode;return e}var lh=function(t,e,i,o){var r=t.element;this.options=at({},this.options,i),this.chart=t,this.observer=o,this.chartElement=r,this.categoryAxis=e,this._dateAxis=this.categoryAxis instanceof fr,this.initOptions(),this.visible=this.options.visible&&r.offsetHeight,this.visible&&(this.createElements(),this.set(this._index(this.options.from),this._index(this.options.to)),this.bindEvents())};lh.prototype.onPane=function(t){return this.categoryAxis.pane===t},lh.prototype.createElements=function(){var t=this.options,e=this.wrapper=ah("k-selector k-pointer-events-none");ut(e,{top:t.offset.top,left:t.offset.left,width:t.width,height:t.height,direction:"ltr"});var i=this.selection=ah("k-selection k-pointer-events-none");this.leftMask=ah("k-mask k-pointer-events-none"),this.rightMask=ah("k-mask k-pointer-events-none"),e.appendChild(this.leftMask),e.appendChild(this.rightMask),e.appendChild(i);var o=this.body=ah("k-selection-bg k-pointer-events-none");i.appendChild(o);var r=this.leftHandle=ah("k-handle k-left-handle k-pointer-events-auto"),n=this.rightHandle=ah("k-handle k-right-handle k-pointer-events-auto");r.appendChild(ah()),n.appendChild(ah()),i.appendChild(r),i.appendChild(n),this.chartElement.appendChild(e);var s=ut(i,["borderLeftWidth","borderRightWidth","height"]),a=ut(r,"height").height,p=ut(n,"height").height;t.selection={border:{left:s.borderLeftWidth,right:s.borderRightWidth}},ut(r,{top:(s.height-a)/2}),ut(n,{top:(s.height-p)/2}),e.style.cssText=e.style.cssText},lh.prototype.bindEvents=function(){var t;!1!==this.options.mousewheel&&(this._mousewheelHandler=this._mousewheel.bind(this),zt(this.chartElement,((t={})[Bs]=this._mousewheelHandler,t))),this._domEvents=_o.create(this.chartElement,{stopPropagation:!0,start:this._start.bind(this),move:this._move.bind(this),end:this._end.bind(this),tap:this._tap.bind(this),press:this._press.bind(this),gesturestart:this._gesturestart.bind(this),gesturechange:this._gesturechange.bind(this),gestureend:this._gestureend.bind(this)})},lh.prototype.initOptions=function(){var t=this.options,e=this.categoryAxis.pane.chartsBox(),i=this.chart.chartService.intl;this._dateAxis&&at(t,{min:er(i,t.min),max:er(i,t.max),from:er(i,t.from),to:er(i,t.to)});var o=ut(this.chartElement,["paddingLeft","paddingTop"]),r=o.paddingLeft,n=o.paddingTop;this.options=at({},{width:e.width(),height:e.height()+.1,padding:{left:r,top:n},offset:{left:e.x1+r,top:e.y1+n},from:t.min,to:t.max},t)},lh.prototype.destroy=function(){var t;this._domEvents&&(this._domEvents.destroy(),delete this._domEvents),clearTimeout(this._mwTimeout),this._state=null,this.wrapper&&(this._mousewheelHandler&&(Qt(this.chartElement,((t={})[Bs]=this._mousewheelHandler,t)),this._mousewheelHandler=null),this.chartElement.removeChild(this.wrapper),this.wrapper=null)},lh.prototype._rangeEventArgs=function(t){return{axis:this.categoryAxis.options,from:this._value(t.from),to:this._value(t.to)}},lh.prototype._pointInPane=function(t,e){var i=this.categoryAxis.pane.box,o=this.chart._toModelCoordinates(t,e);return i.containsPoint(o)},lh.prototype._start=function(t){var e=this.options,i=Ut(t);if(!this._state&&i){var o=Nt(t);if(this._pointInPane(o.x,o.y)){var r=ph(i),n=this.body.getBoundingClientRect(),s=!r&&o.x>=n.x&&o.x<=n.x+n.width&&o.y>=n.y&&o.y<=n.y+n.height;this.chart._unsetActivePoint(),this._state={moveTarget:r,startLocation:t.x?t.x.location:0,inBody:s,range:{from:this._index(e.from),to:this._index(e.to)}};var a=this._rangeEventArgs({from:this._index(e.from),to:this._index(e.to)});this.trigger(bs,a)&&(this._state=null)}}},lh.prototype._press=function(t){var e;(e=this._state?this._state.moveTarget:ph(Ut(t)))&&W(e,"k-handle-active")},lh.prototype._move=function(t){if(this._state){var e=this,i=e._state,o=e.options,r=e.categoryAxis,n=i.range,s=i.moveTarget,a=r.options.reverse,p=this._index(o.from),l=this._index(o.to),h=this._index(o.min),c=this._index(o.max),u=i.startLocation-t.x.location,d=n.from,f=n.to,g=n.to-n.from,y=ut(this.wrapper,"width").width/(r.categoriesCount()-1),v=Math.round(u/y)*(a?-1:1);if(s||i.inBody){var m=s&&kt(s,"k-left-handle"),x=s&&kt(s,"k-right-handle");i.inBody?(n.from=Math.min(Math.max(h,p-v),c-g),n.to=Math.min(n.from+g,c)):m&&!a||x&&a?(n.from=Math.min(Math.max(h,p-v),c-1),n.to=Math.max(n.from+1,n.to)):(m&&a||x&&!a)&&(n.to=Math.min(Math.max(h+1,l-v),c),n.from=Math.min(n.to-1,n.from)),n.from===d&&n.to===f||(this.move(n.from,n.to),this.trigger(_s,this._rangeEventArgs(n)))}}},lh.prototype._end=function(){if(this._state){var t=this._state.moveTarget;t&&Y(t,"k-handle-active");var e=this._state.range;this.set(e.from,e.to),this.trigger(ws,this._rangeEventArgs(e)),delete this._state}},lh.prototype._tap=function(t){var e=this.options,i=this.categoryAxis,o=this.chart._eventCoordinates(t),r=i.pointCategoryIndex(new xi(o.x,i.box.y1)),n=this._index(e.from),s=this._index(e.to),a=this._index(e.min),p=this._index(e.max),l=s-n,h=n+l/2,c={},u=3===t.event.which,d=Math.round(h-r);this._state||u||(this.chart._unsetActivePoint(),i.options.justified||d--,c.from=Math.min(Math.max(a,n-d),p-l),c.to=Math.min(c.from+l,p),this._start(t),this._state&&(this._state.range=c,this.trigger(_s,this._rangeEventArgs(c)),this._end()))},lh.prototype._mousewheel=function(t){var e=this,i=Et(t);if(this._start(t),this._state){var o=this._state.range;t.preventDefault(),t.stopPropagation(),Math.abs(i)>1&&(i*=3),this.options.mousewheel.reverse&&(i*=-1),this.expand(i)&&this.trigger(_s,{axis:this.categoryAxis.options,delta:i,originalEvent:t,from:this._value(o.from),to:this._value(o.to)}),this._mwTimeout&&clearTimeout(this._mwTimeout),this._mwTimeout=setTimeout((function(){e._end()}),150)}},lh.prototype._gesturestart=function(t){var e=this.options,i=t.touches[0];if(this._pointInPane(i.pageX,i.pageY)){this._state={range:{from:this._index(e.from),to:this._index(e.to)}};var o=this._rangeEventArgs(this._state.range);this.trigger(bs,o)?this._state=null:t.preventDefault()}},lh.prototype._gestureend=function(){this._state&&(this.trigger(ws,this._rangeEventArgs(this._state.range)),delete this._state)},lh.prototype._gesturechange=function(t){if(this._state){var e=this,i=e.chart,o=e._state,r=e.options,n=e.categoryAxis,s=o.range,a=i._toModelCoordinates(t.touches[0].x.location).x,p=i._toModelCoordinates(t.touches[1].x.location).x,l=Math.min(a,p),h=Math.max(a,p);t.preventDefault(),s.from=n.pointCategoryIndex(new xi(l))||r.min,s.to=n.pointCategoryIndex(new xi(h))||r.max,this.move(s.from,s.to),this.trigger(_s,this._rangeEventArgs(s))}},lh.prototype._index=function(t){var e=t;return t instanceof Date&&(e=this.categoryAxis.categoryIndex(t)),e},lh.prototype._value=function(t){var e=t;return this._dateAxis&&(e=this.categoryAxis.categoryAt(t))>this.options.max&&(e=this.options.max),e},lh.prototype._slot=function(t){var e=this.categoryAxis,i=this._index(t);return e.getSlot(i,i,!0)},lh.prototype.move=function(t,e){var i=this.options,o=this.categoryAxis.options.reverse,r=i.offset,n=i.padding,s=i.selection.border,a=o?e:t,p=o?t:e,l="x"+(o?2:1),h=this._slot(a),c=Zt(h[l]-r.left+n.left);ut(this.leftMask,{width:c}),ut(this.selection,{left:c}),h=this._slot(p);var u=Zt(i.width-(h[l]-r.left+n.left));ut(this.rightMask,{width:u});var d=i.width-u;d!==i.width&&(d+=s.right),ut(this.rightMask,{left:d}),ut(this.selection,{width:Math.max(i.width-(c+u)-s.right,0)})},lh.prototype.set=function(t,e){var i=this.options,o=this._index(i.min),r=this._index(i.max),n=Xt(this._index(t),o,r),s=Xt(this._index(e),n+1,r);i.visible&&this.move(n,s),i.from=this._value(n),i.to=this._value(s)},lh.prototype.expand=function(t){var e=this.options,i=this._index(e.min),o=this._index(e.max),r=e.mousewheel.zoom,n=this._index(e.from),s=this._index(e.to),a={from:n,to:s},p=at({},a);if(this._state&&(a=this._state.range),r!==B&&(a.from=Xt(Xt(n-t,0,s-1),i,o)),r!==C&&(a.to=Xt(Xt(s+t,a.from+1,o),i,o)),a.from!==p.from||a.to!==p.to)return this.set(a.from,a.to),!0},lh.prototype.zoom=function(t,e){var i=this.options,o=this._index(i.min),r=this._index(i.max),n=this._index(i.from),s=this._index(i.to),a={from:n,to:s},p=at({},a),l=this.categoryAxis.options.reverse,h=F+(l?"2":"1"),c=this.categoryAxis.lineBox(),u=Math.abs(c[h]-e[F]),d=c.width(),f=Zt(u/d,2),g=Zt(f*t),y=Zt((1-f)*t);if(this._state&&(a=this._state.range),a.from=Xt(Xt(n-g,0,s-1),o,r),a.to=Xt(Xt(s+y,a.from+1,r),o,r),a.from!==p.from||a.to!==p.to)return this.set(a.from,a.to),!0},lh.prototype.trigger=function(t,e){return(this.observer||this.chart).trigger(t,e)},te(lh,{visible:!0,mousewheel:{zoom:"both"},min:T,max:P});const hh=lh;var ch=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.show=function(e){if(e&&e.tooltipAnchor&&(!this._current||this._current!==e)){var i=at({},this.options,e.options.tooltip),o=e.tooltipAnchor();o?(this._current=e,t.prototype.show.call(this,{point:e,anchor:o},i,e)):this.hide()}},e.prototype.hide=function(){delete this._current,t.prototype.hide.call(this)},e}(kp);const uh=ch;var dh=function(t){function e(e,i){t.call(this,e.chartService,i),this.plotArea=e,this.formatService=e.chartService.format}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.showAt=function(t,e){var i=wt(t,(function(t){var e=t.series.tooltip;return!(e&&!1===e.visible)}));if(i.length>0){var o=i[0],r=this.plotArea.categoryAxis.getSlot(o.categoryIx),n=e?this._slotAnchor(e,r):this._defaultAnchor(o,r);this.show({anchor:n,shared:!0,points:t,category:o.category,categoryText:this.formatService.auto(this.options.categoryFormat,o.category),series:this.plotArea.series},this.options)}},e.prototype._slotAnchor=function(t,e){return this.plotArea.categoryAxis.options.vertical||(t.x=e.center().x),{point:t,align:{horizontal:"left",vertical:"center"}}},e.prototype._defaultAnchor=function(t,e){var i=t.owner.pane.chartsBox(),o=this.plotArea.categoryAxis.options.vertical,r=i.center(),n=e.center();return{point:o?new xi(r.x,n.y):new xi(n.x,r.y),align:{horizontal:"center",vertical:"center"}}},e}(kp);te(dh,{categoryFormat:"{0:d}"});const fh=dh;var gh=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.setup=function(){var t=this.element,e=this.options;if(t.bbox()){this.origin=e.origin;var i=e.vertical?H:F,o=this.fromScale=new q.geometry.Point(1,1);o[i]=un,t.transform(q.geometry.transform().scale(o.x,o.y))}else this.abort()},e.prototype.step=function(t){var e=Pt(this.fromScale.x,1,t),i=Pt(this.fromScale.y,1,t);this.element.transform(q.geometry.transform().scale(e,i,this.origin))},e.prototype.abort=function(){t.prototype.abort.call(this),this.element.transform(null)},e}(q.drawing.Animation);te(gh,{duration:ln}),q.drawing.AnimationFactory.current.register(wn,gh);var yh=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.setup=function(){var t=this.center=this.element.bbox().center();this.element.transform(q.geometry.transform().scale(un,un,t))},e.prototype.step=function(t){this.element.transform(q.geometry.transform().scale(t,t,this.center))},e}(q.drawing.Animation);te(yh,{easing:"easeOutElastic"}),q.drawing.AnimationFactory.current.register(An,yh);var vh=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.setup=function(){this.fadeTo=this.element.opacity(),this.element.opacity(0)},e.prototype.step=function(t){this.element.opacity(t*this.fadeTo)},e}(q.drawing.Animation);te(vh,{duration:200,easing:"linear"}),q.drawing.AnimationFactory.current.register(hn,vh);var mh=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.setup=function(){this.element.transform(q.geometry.transform().scale(un,un,this.options.center))},e.prototype.step=function(t){this.element.transform(q.geometry.transform().scale(t,t,this.options.center))},e}(q.drawing.Animation);te(mh,{easing:"easeOutElastic",duration:ln}),q.drawing.AnimationFactory.current.register(Rn,mh);const xh=mh;var bh=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.render=function(){t.prototype.render.call(this),this.renderSegments()},e.prototype.createSegment=function(t,e,i){return new(e.style===xn?_a:fa)(t,e,i)},e.prototype.animationPoints=function(){return t.prototype.animationPoints.call(this).concat(this._segments)},e.prototype.createMissingValue=function(t,e){if(e===gn){var i={x:t.x,y:t.y};return $s(i.x)||(i.x=0),$s(i.y)||(i.y=0),i}},e}(cp);at(bh.prototype,ka);const _h=bh,wh=function(t,e,i){var o=[],r=e.xMin,n=e.xMax,s=(i||{}).forecast;s&&(s.before>0&&(r-=s.before),s.after>0&&(n+=s.after));var a=(i||{}).samplingInterval,p=Kt(a,vi(r,n)/10);a<=0&&(p=n-r);for(var l=r;l<=n;l+=p)o.push([l,t(l)]);return o};const kh=function(t){return function(e){var i=e.valueFields;return{xValue:i.x,yValue:i[t]}}},Ah=function(t,e){for(var i=Number.MAX_VALUE,o=Number.MIN_VALUE,r=0;r<t.length;r++){var n=e(t[r]),s=n.xValue,a=n.yValue;isFinite(s)&&null!==s&&isFinite(a)&&null!==a&&(i=Math.min(s,i),o=Math.max(s,o))}return{xMin:i,xMax:o}};var Sh={};Sh[ts]=function(t){var e=t.options,i=function(t){var e=t.options,i=(0,t.seriesValues)();if(!bl(i,e.field))return null;var o,r=xl(i,(o=e.field,function(t){var e=t.valueFields;return{xValue:e.x,yValue:Math.log(e[o])}})),n=r.slope,s=r.intercept,a=r.count,p={xMin:r.xMin,xMax:r.xMax};if(a>0){var l=Math.exp(s),h=n;return wh((function(t){return l*Math.exp(h*t)}),p,e.trendline)}return null}({seriesValues:t.seriesValues,options:e});return i?Object.assign({},e,{type:"scatterLine",data:i}):null},Sh[es]=function(t){var e=t.options,i=function(t){var e=t.options,i=xl((0,t.seriesValues)(),kh(e.field)),o=i.slope,r=i.intercept,n=i.count,s=i.xMin,a=i.xMax;return n>0?wh((function(t){return o*t+r}),{xMin:s,xMax:a},e.trendline):null}({seriesValues:t.seriesValues,options:e});return i?Object.assign({},e,{type:"scatterLine",data:i}):null},Sh[is]=function(t){var e=t.options,i=function(t){var e=t.options,i=(0,t.seriesValues)();if(!bl(i,"x"))return null;var o,r=xl(i,(o=e.field,function(t){var e=t.valueFields;return{xValue:Math.log(e.x),yValue:e[o]}})),n=r.slope,s=r.intercept,a=r.count,p=Ah(i,function(t){return function(e){var i=e.valueFields;return{xValue:i.x,yValue:i[t]}}}(e.field));if(a>0){var l=n,h=s;return wh((function(t){return l*Math.log(t)+h}),p,e.trendline)}return null}({seriesValues:t.seriesValues,options:e});return i?Object.assign({},e,{type:"scatterLine",data:i}):null},Sh[os]=function(t){var e=t.options,i=function(t){var e=t.options,i=t.seriesValues,o=(e.trendline||{}).period||2,r=wl(i({before:o,after:o}),kh(e.field),o);return r.length>0?r:null}(t);return i?Object.assign({},e,{type:"scatterLine",data:i}):null},Sh[rs]=function(t){var e=t.options,i=function(t){var e=t.seriesValues,i=t.options,o=(i.trendline||{}).order,r=kh(i.field),n=kl(e(),r,o),s=n.count,a=n.valueMapper,p=n.xMin,l=n.xMax;return s>0?wh(a,{xMin:p,xMax:l},i.trendline):null}({seriesValues:t.seriesValues,options:e});return i?Object.assign({},e,{type:"scatterLine",data:i}):null},Sh[ns]=function(t){var e=t.options,i=function(t){var e=t.options,i=(0,t.seriesValues)();if(!bl(i,"x"))return null;var o,r=xl(i,(o=e.field,function(t){var e=t.valueFields;return{xValue:Math.log(e.x),yValue:Math.log(e[o])}})),n=r.slope,s=r.intercept,a=r.count,p=Ah(i,kh(e.field));if(a>0){var l=Math.exp(s),h=n;return wh((function(t){return l*Math.pow(t,h)}),p,e.trendline)}return null}({seriesValues:t.seriesValues,options:e});return i?Object.assign({},e,{type:"scatterLine",data:i}):null};const Ch=Sh;var Ph=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initFields=function(){this.namedXAxes={},this.namedYAxes={},this.xAxisRangeTracker=new ja,this.yAxisRangeTracker=new ja},e.prototype.render=function(t){void 0===t&&(t=this.panes),this.series=[].concat(this.originalSeries),this.createTrendlineSeries();for(var e=this.groupSeriesByPane(),i=0;i<t.length;i++){var o=t[i],r=e[o.options.name||"default"]||[];this.addToLegend(r);var n=this.filterVisibleSeries(r);n&&(this.createScatterChart(qs(n,Wn),o),this.createScatterLineChart(qs(n,Xn),o),this.createBubbleChart(qs(n,An),o))}this.createAxes(t)},e.prototype.appendChart=function(e,i){this.xAxisRangeTracker.update(e.xAxisRanges),this.yAxisRangeTracker.update(e.yAxisRanges),t.prototype.appendChart.call(this,e,i)},e.prototype.removeAxis=function(e){var i=e.options.name;t.prototype.removeAxis.call(this,e),e.options.vertical?(this.yAxisRangeTracker.reset(i),delete this.namedYAxes[i]):(this.xAxisRangeTracker.reset(i),delete this.namedXAxes[i]),e===this.axisX&&delete this.axisX,e===this.axisY&&delete this.axisY},e.prototype.seriesPaneName=function(t){var e=this.options,i=t.xAxis,o=[].concat(e.xAxis),r=wt(o,(function(t){return t.name===i}))[0],n=t.yAxis,s=[].concat(e.yAxis),a=wt(s,(function(t){return t.name===n}))[0],p=(e.panes||[{}])[0].name||"default";return(r||{}).pane||(a||{}).pane||p},e.prototype.createScatterChart=function(t,e){t.length>0&&this.appendChart(new cp(this,{series:t,clip:e.options.clip}),e)},e.prototype.createScatterLineChart=function(t,e){t.length>0&&this.appendChart(new _h(this,{series:t,clip:e.options.clip}),e)},e.prototype.createBubbleChart=function(t,e){t.length>0&&this.appendChart(new gp(this,{series:t,clip:e.options.clip}),e)},e.prototype.createXYAxis=function(t,e,i){for(var o,r=t.name,n=e?this.namedYAxes:this.namedXAxes,s=e?this.yAxisRangeTracker:this.xAxisRangeTracker,a=at({reverse:!e&&this.chartService.rtl},t,{vertical:e}),p=Ws(a.type,Ts),l=s.query(),h=p?{min:.1,max:1}:{min:0,max:1},c=s.query(r)||l||h,u=[a.min,a.max],d=this.series,f=0;f<d.length;f++){var g=d[f],y=g[e?"yAxis":"xAxis"];if(y===a.name||0===i&&!y){var v=on.current.bindPoint(g,0).valueFields;u.push(v[e?"y":"x"]);break}}0===i&&l&&(c.min=Math.min(c.min,l.min),c.max=Math.max(c.max,l.max));for(var x=0;x<u.length;x++)if(u[x]instanceof Date){o=!0;break}var b=new(Ws(a.type,m)||!a.type&&o?kr:p?Tr:_r)(c.min,c.max,a,this.chartService);if(b.axisIndex=i,r){if(n[r])throw new Error((e?"Y":"X")+" axis with name "+r+" is already defined");n[r]=b}return this.appendAxis(b),b},e.prototype.createAxes=function(t){for(var e=this.options,i=[].concat(e.xAxis),o=[],r=[].concat(e.yAxis),n=[],s=0;s<i.length;s++)Ct(this.findPane(i[s].pane),t)&&o.push(this.createXYAxis(i[s],!1,s));for(var a=0;a<r.length;a++)Ct(this.findPane(r[a].pane),t)&&n.push(this.createXYAxis(r[a],!0,a));this.axisX=this.axisX||o[0],this.axisY=this.axisY||n[0]},e.prototype._dispatchEvent=function(t,e,i){for(var o=t._eventCoordinates(e),r=new xi(o.x,o.y),n=this.axes,s=n.length,a=[],p=[],l=0;l<s;l++){var h=n[l],c=h.options.vertical?p:a,u=h.getValue(r);null!==u&&c.push(u)}a.length>0&&p.length>0&&t.trigger(i,{element:Ut(e),originalEvent:e,x:ta(a),y:ta(p)})},e.prototype.updateAxisOptions=function(t,e){var i=t.options.vertical,o=this.groupAxes(this.panes),r=(i?o.y:o.x).indexOf(t);Th(this.options,r,i,e),Th(this.originalOptions,r,i,e)},e.prototype.trendlineFactory=function(t,e){var i=this.seriesValues.bind(this,e.index),o=ml(Ch,t.type,{options:t,seriesValues:i});return o&&(o.xAxis=e.xAxis,o.yAxis=e.yAxis),o},e.prototype.seriesValues=function(t){for(var e=[],i=this.series[t],o=0;o<i.data.length;o++){var r=this.bindPoint(i,o);e.push({pointIx:o,valueFields:r.valueFields})}return e},e}(Dp);function Th(t,e,i,o){at([].concat(i?t.yAxis:t.xAxis)[e],o)}te(Ph,{xAxis:{},yAxis:{}}),at(Ph.prototype,Hp);const Mh=Ph;var Oh=function(t){function e(e,i,o){t.call(this,o),this.value=e,this.sector=i}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.render=function(){this._rendered||!1===this.visible||(this._rendered=!0,this.createLabel())},e.prototype.createLabel=function(){var t=this.options.labels,e=this.owner.chartService,i=this.getLabelText(t);if(t.visible&&(i||0===i)){if(t.position===f||t.position===Os)t.color||(t.color=fe(this.options.color)),t.background||(t.background=this.options.color);else{var o=e.theme.seriesDefaults.labels;t.color=t.color||o.color,t.background=t.background||o.background}this.label=new $i(i,at({},t,{align:f,vAlign:"",animation:{type:hn,delay:this.animationDelay}}),this.pointData()),this.append(this.label)}},e.prototype.getLabelText=function(t){var e=vt(t);return e?e(this.pointData()):this.owner.chartService.format.auto(t.format,this.value)},e.prototype.reflow=function(t){this.render(),this.box=t,this.reflowLabel()},e.prototype.reflowLabel=function(){var t=this.options.labels,e=this.label,i=this.sector.clone(),o=t.distance,r=i.middle();if(e){var n,s=e.box.height(),a=e.box.width();if(t.position===f)i.radius=Math.abs((i.radius-s)/2)+s,n=i.point(r),e.reflow(new wi(n.x,n.y-s/2,n.x,n.y));else if(t.position===Os)i.radius=i.radius-s/2,n=i.point(r),e.reflow(new wi(n.x,n.y-s/2,n.x,n.y));else{var p;(n=i.clone().expand(o).point(r)).x>=i.center.x?(p=n.x+a,e.orientation=B):(p=n.x-a,e.orientation=C),e.reflow(new wi(p,n.y-s,n.x,n.y))}}},e.prototype.createVisual=function(){var e=this,i=this.sector,o=this.options;if(t.prototype.createVisual.call(this),this.addAccessibilityAttributesToVisual(),this.value)if(o.visual){var r=(i.startAngle+180)%360,n=o.visual({category:this.category,dataItem:this.dataItem,value:this.value,series:this.series,percentage:this.percentage,center:new q.geometry.Point(i.center.x,i.center.y),radius:i.radius,innerRadius:i.innerRadius,startAngle:r,endAngle:r+i.angle,options:o,sender:this.getSender(),createVisual:function(){var t=new q.drawing.Group;return e.createSegmentVisual(t),t}});n&&this.visual.append(n)}else this.createSegmentVisual(this.visual)},e.prototype.createSegmentVisual=function(t){var e=this.sector,i=this.options,o=i.border||{},r=o.width>0?{stroke:{color:o.color,width:o.width,opacity:o.opacity,dashType:o.dashType}}:{},n=i.color,s=Ii(i.pattern,{color:n,opacity:i.opacity}),a=this.createSegment(e,at({fill:s,stroke:{opacity:i.opacity},zIndex:i.zIndex},r));t.append(a),Ks(i)&&t.append(this.createGradientOverlay(a,{baseColor:n,fallbackFill:s},at({center:[e.center.x,e.center.y],innerRadius:e.innerRadius,radius:e.radius,userSpace:!0},i.overlay)))},e.prototype.createSegment=function(t,e){return e.singleSegment?new q.drawing.Circle(new q.geometry.Circle(new q.geometry.Point(t.center.x,t.center.y),t.radius),e):Mi.current.createRing(t,e)},e.prototype.createAnimation=function(){var e=this.options,i=this.sector.center;at(e,{animation:{center:[i.x,i.y],delay:this.animationDelay}}),t.prototype.createAnimation.call(this)},e.prototype.createHighlight=function(t){var e=this.options.highlight||{},i=e.border||{};return this.createSegment(this.sector,at({},t,{fill:{color:e.color,opacity:e.opacity},stroke:{opacity:i.opacity,width:i.width,color:i.color,dashType:i.dashType}}))},e.prototype.highlightVisual=function(){return this.visual.children[0]},e.prototype.highlightVisualArgs=function(){var t=this.sector;return{options:this.options,radius:t.radius,innerRadius:t.innerRadius,center:new q.geometry.Point(t.center.x,t.center.y),startAngle:t.startAngle,endAngle:t.angle+t.startAngle,visual:this.visual}},e.prototype.createFocusHighlight=function(t){var e=this.options.focusHighlight.border.width,i=this.createSegment(this.sector,at({},t,{stroke:{width:2*e}})),o=new q.drawing.MultiPath;return o.paths.push(q.drawing.Path.fromRect(i.bbox())),o.paths.push(this.createSegment(this.sector,{})),i.clip(o),i},e.prototype.tooltipAnchor=function(){var t,e,i,o,r=this.sector.clone().expand(5),n=r.middle();return{point:r.point(n),align:(t=n+180,e=qt(t),i=Zt(Math.sin(e),b),o=Zt(Math.cos(e),b),{horizontal:Math.abs(i)>Bh?f:o<0?B:C,vertical:Math.abs(i)<Lh?f:i<0?d:V})}},e.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},e.prototype.pointData=function(){return{dataItem:this.dataItem,category:this.category,value:this.value,series:this.series,percentage:this.percentage}},e.prototype.getIndex=function(){return this.index},e}(Li),Lh=Zt(qt(30),b),Bh=Zt(qt(60),b);te(Oh,{color:j,overlay:{gradient:"roundedBevel"},border:{width:.5},labels:{visible:!1,distance:35,font:x,margin:dt(.5),align:g,zIndex:1,position:Ls},animation:{type:Rn},highlight:{visible:!0,border:{width:1}},visible:!0,accessibility:{role:Ss,className:Cs,ariaRoleDescription:Ps}}),at(Oh.prototype,la),at(Oh.prototype,Ha);const Ih=Oh;var Eh={createLegendItem:function(t,e,i){var o=this.options.legend||{},r=o.labels||{},n=o.inactiveItems||{},s=n.labels||{};if(i&&!1!==i.visibleInLegend){var a,p,l=!1!==i.visible,h=l?vt(r):vt(s)||vt(r),c=i.category;h&&(c=h({text:c,series:i.series,dataItem:i.dataItem,percentage:i.percentage,value:t})),l?(a={},p=e.color):(a={color:s.color,font:s.font},p=(n.markers||{}).color),$s(c)&&""!==c&&this.legendItems.push({active:l,pointIndex:i.index,text:c,series:i.series,markerColor:p,pattern:e.pattern,labels:a})}}};const Rh=Eh;var Vh=function(t){function e(e,i){t.call(this,i),this.plotArea=e,this.chartService=e.chartService,this.points=[],this.legendItems=[],this.render()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.render=function(){this.traverseDataPoints(this.addValue.bind(this))},e.prototype.traverseDataPoints=function(t){var e=this.options,i=this.plotArea.options.seriesColors;void 0===i&&(i=[]);for(var o=i.length,r=e.series,n=r.length,s=0;s<n;s++){var a=r[s],p=a.data,l=Us(a),h=l.total,c=l.points,u=l.count,d=360/h,g=void 0;isFinite(d)||(g=360/u);var y=void 0;y=jt(a.startAngle)?a.startAngle:e.startAngle,s!==n-1&&a.labels.position===Ls&&(a.labels.position=f);for(var v=0;v<c.length;v++){var m=c[v];if(m){var x=m.fields,b=m.value,_=m.visible,w=0!==b?g||b*d:0,k=1!==p.length&&Boolean(x.explode);ot(a.color)||(a.color=x.color||i[v%o]),t(b,new Si(null,0,0,y,w),{owner:this,category:jt(x.category)?x.category:"",pattern:jt(x.pattern)?x.pattern:a.pattern,index:v,series:a,seriesIx:s,dataItem:p[v],percentage:0!==h?b/h:0,explode:k,visibleInLegend:x.visibleInLegend,visible:_,zIndex:n-s,animationDelay:this.animationDelay(v,s,n)}),!1!==_&&(y+=w)}}}},e.prototype.evalSegmentOptions=function(t,e,i){var o=i.series;Ys(t,{value:e,series:o,dataItem:i.dataItem,category:i.category,percentage:i.percentage},{defaults:o._defaults,excluded:["data","content","template","visual","toggle","ariaTemplate","ariaContent"]})},e.prototype.addValue=function(t,e,i){var o=at({},i.series,{index:i.index});if(o.pattern=i.pattern||o.pattern,this.evalSegmentOptions(o,t,i),this.createLegendItem(t,o,i),!1!==i.visible){var r=new Ih(t,e,o);Object.assign(r,i),this.append(r),this.points.push(r)}},e.prototype.reflow=function(t){var e=this,i=e.options,o=e.points,r=e.seriesConfigs;void 0===r&&(r=[]);var n=o.length,s=t.clone(),a=Math.min(s.width(),s.height()),p=a/2,l=a-.85*a,h=new wi(s.x1,s.y1,s.x1+a,s.y1+a),c=h.center(),u=s.center(),d=i.series.length,f=[],g=[],y=Kt(i.padding,l);this.targetBox=t,y=y>p-5?p-5:y,h.translate(u.x-c.x,u.y-c.y);for(var v=p-y,m=new xi(v+h.x1+y,v+h.y1+y),x=0;x<n;x++){var b=o[x],_=b.sector,w=b.seriesIx;if(_.radius=v,_.center=m,r.length){var k=r[w];_.innerRadius=k.innerRadius,_.radius=k.radius}w===d-1&&b.explode&&(_.center=_.clone().setRadius(.15*_.radius).point(_.middle())),b.reflow(h);var A=b.label;A&&A.options.position===Ls&&w===d-1&&(A.orientation===B?g.push(A):f.push(A))}f.length>0&&(f.sort(this.labelComparator(!0)),this.leftLabelsReflow(f)),g.length>0&&(g.sort(this.labelComparator(!1)),this.rightLabelsReflow(g)),this.box=h},e.prototype.leftLabelsReflow=function(t){var e=this.distanceBetweenLabels(t);this.distributeLabels(e,t)},e.prototype.rightLabelsReflow=function(t){var e=this.distanceBetweenLabels(t);this.distributeLabels(e,t)},e.prototype.distanceBetweenLabels=function(t){var e=Wt(this.points),i=e.sector,o=t.length-1,r=i.radius+e.options.labels.distance,n=[],s=t[0].box,a=Zt(s.y1-(i.center.y-r-s.height()-s.height()/2));n.push(a);for(var p=0;p<o;p++){var l=t[p+1].box;s=t[p].box,a=Zt(l.y1-s.y2),n.push(a)}return a=Zt(i.center.y+r-t[o].box.y2-t[o].box.height()/2),n.push(a),n},e.prototype.distributeLabels=function(t,e){for(var i,o,r,n=t.length,s=0;s<n;s++)for(r=-t[s],i=o=s;r>0&&(i>=0||o<n);)r=this._takeDistance(t,s,--i,r),r=this._takeDistance(t,s,++o,r);this.reflowLabels(t,e)},e.prototype._takeDistance=function(t,e,i,o){var r=o;if(t[i]>0){var n=Math.min(t[i],r);r-=n,t[i]-=n,t[e]+=n}return r},e.prototype.reflowLabels=function(t,e){var i,o=Wt(this.points),r=o.sector,n=o.options.labels,s=e.length,a=n.distance,p=r.center.y-(r.radius+a)-e[0].box.height();t[0]+=2;for(var l=0;l<s;l++){var h=e[l],c=h.box;p+=t[l],i=this.hAlignLabel(c.x2,r.clone().expand(a),p,p+c.height(),h.orientation===B),h.orientation===B?(n.align!==g&&(i=r.radius+r.center.x+a),h.reflow(new wi(i+c.width(),p,i,p))):(n.align!==g&&(i=r.center.x-r.radius-a),h.reflow(new wi(i-c.width(),p,i,p))),p+=c.height()}},e.prototype.createVisual=function(){var e=this.options.connectors,i=this.points,o=i.length;t.prototype.createVisual.call(this),this._connectorLines=[];for(var r=0;r<o;r++){var n=i[r],s=n.sector,a=n.label,p=s.middle(),l=(n.options.connectors||{}).color||e.color;if(a){var h=new q.drawing.Path({stroke:{color:l,width:e.width},animation:{type:hn,delay:n.animationDelay}});if(a.options.position===Ls){var c=a.box,u=s.center,d=s.point(p),f=new xi(c.x1,c.center().y),g=void 0,y=void 0,v=void 0;d=s.clone().expand(e.padding).point(p),h.moveTo(d.x,d.y),a.orientation===B?(v=zh(u,d,f,y=new xi(c.x1-e.padding,c.center().y)),f=new xi(y.x-4,y.y),(v=v||f).x=Math.min(v.x,f.x),this.pointInCircle(v,s.center,s.radius+4)||v.x<s.center.x?(g=s.center.x+s.radius+4,n.options.labels.align!==Pn?g<f.x?h.lineTo(g,d.y):h.lineTo(d.x+8,d.y):h.lineTo(g,d.y),h.lineTo(f.x,y.y)):(v.y=y.y,h.lineTo(v.x,v.y))):(v=zh(u,d,f,y=new xi(c.x2+e.padding,c.center().y)),f=new xi(y.x+4,y.y),(v=v||f).x=Math.max(v.x,f.x),this.pointInCircle(v,s.center,s.radius+4)||v.x>s.center.x?(g=s.center.x-s.radius-4,n.options.labels.align!==Pn?g>f.x?h.lineTo(g,d.y):h.lineTo(d.x-8,d.y):h.lineTo(g,d.y),h.lineTo(f.x,y.y)):(v.y=y.y,h.lineTo(v.x,v.y))),h.lineTo(y.x,y.y),this._connectorLines.push(h),this.visual.append(h)}}}},e.prototype.renderVisual=function(){if(t.prototype.renderVisual.call(this),le(this.options.series,(function(t){return t.autoFit}))){var e=this.targetBox,i=this.box.center(),o=this.visual.bbox();if(!o)return;var r=o.bottomRight(),n=Math.min((i.y-e.y1)/(i.y-o.origin.y),(e.y2-i.y)/(r.y-i.y),(i.x-e.x1)/(i.x-o.origin.x),(e.x2-i.x)/(r.x-i.x));n<1&&this.visual.transform(q.geometry.transform().scale(n,n,[i.x,i.y]))}},e.prototype.labelComparator=function(t){var e=t?-1:1;return function(t,i){return((t.parent.sector.middle()+270)%360-(i.parent.sector.middle()+270)%360)*e}},e.prototype.hAlignLabel=function(t,e,i,o,r){var n=e.radius,s=e.center,a=s.x,p=s.y,l=Math.min(Math.abs(p-i),Math.abs(p-o));return l>n?t:a+Math.sqrt(n*n-l*l)*(r?1:-1)},e.prototype.pointInCircle=function(t,e,i){return Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2)<Math.pow(i,2)},e.prototype.formatPointValue=function(t,e){return this.chartService.format.auto(e,t.value)},e.prototype.animationDelay=function(t){return 70*t},e.prototype.stackRoot=function(){return this},e}(Li);function zh(t,e,i,o){var r,n=(o.x-i.x)*(t.y-i.y)-(o.y-i.y)*(t.x-i.x),s=(o.y-i.y)*(e.x-t.x)-(o.x-i.x)*(e.y-t.y);if(0!==s){var a=n/s;r=new xi(t.x+a*(e.x-t.x),t.y+a*(e.y-t.y))}return r}te(Vh,{startAngle:90,connectors:{width:2,color:"#939393",padding:8},inactiveItems:{markers:{},labels:{}}}),at(Vh.prototype,Rh),Vh.prototype.isStackRoot=!0;const jh=Vh;var Dh=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.render=function(){this.createPieChart(this.series)},e.prototype.createPieChart=function(t){var e=t[0],i=new jh(this,{series:t,padding:e.padding,startAngle:e.startAngle,connectors:e.connectors,legend:this.options.legend});this.appendChart(i)},e.prototype.appendChart=function(e,i){t.prototype.appendChart.call(this,e,i),Vt(this.options.legend.data,e.legendItems)},e.prototype.getPointBelow=function(t){return this.getPointToTheRight(t)},e.prototype.getPointAbove=function(t){return this.getPointToTheLeft(t)},e}(Dp);const Fh=Dh;var Hh=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reflowLabel=function(){var e=this.options.labels,i=this.label,o=this.sector.clone(),r=o.middle();if(i){var n=i.box.height();if(e.position===f){o.radius-=(o.radius-o.innerRadius)/2;var s=o.point(r);i.reflow(new wi(s.x,s.y-n/2,s.x,s.y))}else t.prototype.reflowLabel.call(this)}},e.prototype.createSegment=function(t,e){return Mi.current.createRing(t,e)},e}(Ih);te(Hh,{overlay:{gradient:"roundedGlass"},labels:{position:f},animation:{type:Rn}}),at(Hh.prototype,la);const Nh=Hh;var Uh=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.addValue=function(t,e,i){var o=at({},i.series,{index:i.index});if(o.pattern=i.pattern||o.pattern,this.evalSegmentOptions(o,t,i),this.createLegendItem(t,o,i),!1!==i.visible){var r=new Nh(t,e,o);Object.assign(r,i),this.append(r),this.points.push(r)}},e.prototype.reflow=function(e){for(var i,o=this.options,r=e.clone(),n=Math.min(r.width(),r.height()),s=n/2,a=n-.85*n,p=o.series,l=p.length,h=Kt(o.padding,a),c=s-(h=h>s-5?s-5:h),u=0,d=0;d<l;d++){var f=p[d];0===d&&jt(f.holeSize)&&(i=f.holeSize,c-=f.holeSize),jt(f.size)?c-=f.size:u++,jt(f.margin)&&d!==l-1&&(c-=f.margin)}jt(i)||(c-=i=(s-h)/(l+.75)*.75);var g,y=i,v=0;this.seriesConfigs=[];for(var m=0;m<l;m++){var x=p[m];g=(y+=v)+Kt(x.size,c/u),this.seriesConfigs.push({innerRadius:y,radius:g}),v=x.margin||0,y=g}t.prototype.reflow.call(this,e)},e.prototype.animationDelay=function(t,e,i){return 50*t+ln*(e+1)/(i+1)},e}(jh);te(Uh,{startAngle:90,connectors:{width:2,color:"#939393",padding:8}});const Gh=Uh;var Wh=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.render=function(){this.createDonutChart(this.series)},e.prototype.createDonutChart=function(t){var e=t[0],i=new Gh(this,{series:t,padding:e.padding,connectors:e.connectors,legend:this.options.legend});this.appendChart(i)},e.prototype.getPointBelow=function(t){return this._getNextPoint(t,this._pointsByVertical,-1)},e.prototype.getPointAbove=function(t){return this._getNextPoint(t,this._pointsByVertical,1)},e}(Fh);const Xh=Wh;var Yh=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initFields=function(){this.valueAxisRangeTracker=new ja},e.prototype.render=function(){this.addToLegend(this.series),this.createPolarAxis(),this.createCharts(),this.createValueAxis()},e.prototype.alignAxes=function(){var t=this.valueAxis,e=t.range(),i=t.options.reverse?e.max:e.min,o=t.getSlot(i),r=this.polarAxis.getSlot(0).center,n=t.box.translate(r.x-o.x1,r.y-o.y1);t.reflow(n)},e.prototype.createValueAxis=function(){var t,e,i=this.valueAxisRangeTracker.query(),o=this.valueAxisOptions({roundToMajorUnit:!1,zIndex:-1});o.type===Ts?(t=Hr,e={min:.1,max:1}):(t=Dr,e={min:0,max:1});var r=i||e,n=new t(r.min,r.max,o,this.chartService);this.valueAxis=n,this.appendAxis(n)},e.prototype.reflowAxes=function(){var t=this,e=t.options.plotArea,i=t.valueAxis,o=t.polarAxis,r=t.box,n=.15*Math.min(r.width(),r.height()),s=dt(e.padding||{},n),a=r.clone().unpad(s),p=a.clone();p.y2=p.y1+Math.min(p.width(),p.height()),p.align(a,H,f);var l=p.clone().shrink(0,p.height()/2);o.reflow(p),i.reflow(l);var h=i.lineBox().height()-i.box.height();i.reflow(i.box.unpad({top:h})),this.axisBox=p,this.alignAxes(p)},e.prototype.backgroundBox=function(){return this.box},e.prototype.detachLabels=function(){},e}(Dp);const qh=Yh;var Zh=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.pointSlot=function(t,e){var i=t.center.y-e.y1,o=xi.onCircle(t.center,t.startAngle,i);return new wi(o.x,o.y,o.x,o.y)},e}(cp);te(Zh,{clip:!1});const Qh=Zh;var Kh=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(_h);Kh.prototype.pointSlot=Qh.prototype.pointSlot,te(Kh,{clip:!1});const $h=Kh;var Jh=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.fillToAxes=function(t){var e=this._polarAxisCenter();t.lineTo(e.x,e.y)},e.prototype._polarAxisCenter=function(){return this.parent.plotArea.polarAxis.box.center()},e.prototype.strokeSegments=function(){var t=this._strokeSegments;if(!t){var e=this._polarAxisCenter(),i=new Gr(!1),o=this.points();o.push(e),(t=this._strokeSegments=i.process(o)).pop()}return t},e}(Ea);const tc=Jh;var ec=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.fillToAxes=function(t){var e=this.parent.plotArea.polarAxis.box.center(),i=new q.geometry.Segment([e.x,e.y]);t.segments.unshift(i),t.segments.push(i)},e}(Oa);const ic=ec;var oc=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createSegment=function(t,e,i){return(e.line||{}).style===xn?new tc(t,e,i):new ic(t,e,i)},e.prototype.createMissingValue=function(t,e){var i;return $s(t.x)&&e!==yn&&(i={x:t.x,y:t.y},e===gn&&(i.y=0)),i},e.prototype.seriesMissingValues=function(t){return t.missingValues||gn},e.prototype._hasMissingValuesGap=function(){for(var t=this.options.series,e=0;e<t.length;e++)if("gap"===this.seriesMissingValues(t[e]))return!0},e.prototype.sortPoints=function(t){if(t.sort(rc),this._hasMissingValuesGap())for(var e=0;e<t.length;e++){var i=t[e];i&&($s(i.value.y)||"gap"!==this.seriesMissingValues(i.series)||delete t[e])}return t},e}($h);function rc(t,e){return t.value.x-e.value.x}const nc=oc;var sc=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createPolarAxis=function(){var t=new Er(this.options.xAxis,this.chartService);this.polarAxis=t,this.axisX=t,this.appendAxis(t)},e.prototype.render=function(){this.series=[].concat(this.originalSeries),this.createTrendlineSeries(),t.prototype.render.call(this)},e.prototype.valueAxisOptions=function(t){return at(t,{majorGridLines:{type:s},minorGridLines:{type:s}},this.options.yAxis)},e.prototype.createValueAxis=function(){t.prototype.createValueAxis.call(this),this.axisY=this.valueAxis},e.prototype.trendlineFactory=function(t,e){var i=Mh.prototype.trendlineFactory.call(this,t,e);return i&&(i.type=zn),i},e.prototype.appendChart=function(t,e){this.valueAxisRangeTracker.update(t.yAxisRanges),Dp.prototype.appendChart.call(this,t,e)},e.prototype.createCharts=function(){var t=this.filterVisibleSeries(this.series),e=this.panes[0];this.createLineChart(qs(t,[zn]),e),this.createScatterChart(qs(t,[jn]),e),this.createAreaChart(qs(t,[Vn]),e)},e.prototype.createLineChart=function(t,e){if(0!==t.length){var i=new $h(this,{series:t});this.appendChart(i,e)}},e.prototype.createScatterChart=function(t,e){if(0!==t.length){var i=new Qh(this,{series:t});this.appendChart(i,e)}},e.prototype.createAreaChart=function(t,e){if(0!==t.length){var i=new nc(this,{series:t});this.appendChart(i,e)}},e.prototype._dispatchEvent=function(t,e,i){var o=t._eventCoordinates(e),r=new xi(o.x,o.y),n=this.axisX.getValue(r),s=this.axisY.getValue(r);null!==n&&null!==s&&t.trigger(i,{element:Ut(e),x:n,y:s})},e.prototype.createCrosshairs=function(){},e}(qh);te(sc,{xAxis:{},yAxis:{}}),at(sc.prototype,Hp,{seriesValues:Mh.prototype.seriesValues});const ac=sc;var pc=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.pointSlot=function(t,e){var i=t.center.y-e.y1,o=xi.onCircle(t.center,t.middle(),i);return new wi(o.x,o.y,o.x,o.y)},e.prototype.renderSegments=function(){if(t.prototype.renderSegments.call(this),this._segments&&this._segments.length>1)for(var e=function(t){for(var e=[],i=0;i<t.length;i++){var o=t[i];e[o.seriesIx]=e[o.seriesIx]||[],e[o.seriesIx].push(o)}return e}(this._segments),i=0;i<e.length;i++){var o=e[i];if(o&&o.length>1){var r=o[0].linePoints[0],n=Wt(o),s=Wt(n.linePoints),a=0===r.categoryIx,p=s.categoryIx===s.categoriesCount-1;a&&p&&Wt(o).linePoints.push(r)}}},e.prototype.createSegment=function(t,e,i){var o=new(e.style===xn?_a:fa)(t,e,i),r=this.seriesMissingValues(e);return t.length!==e.data.length&&r!==yn||(o.options.closed=!0),o},e}(Ta);te(pc,{clip:!1,limitPoints:!1});const lc=pc;var hc=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.fillToAxes=function(){},e}(Ea);const cc=hc;var uc=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.fillToAxes=function(){},e}(Oa);const dc=uc;var fc=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createSegment=function(t,e,i,o){var r,n,s,a=this.options.isStacked,p=(e.line||{}).style;return a&&i>0&&o&&(n=o.linePoints.slice(0),r=o),p===xn?(s=new cc(t,e,i,r,n)).options.closed=!0:(t.push(t[0]),s=new dc(t,e,i,r,n)),s},e.prototype.seriesMissingValues=function(t){return t.missingValues||gn},e}(lc);const gc=fc;var yc=function(t){function e(e,i){t.call(this,e,null,i)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getIndex=function(){return this.categoryIx},e}(Nh);te(yc,{overlay:{gradient:"none"},labels:{distance:10}});const vc=yc;var mc=function(t){function e(e){t.call(this,e),this.forEach=e.rtl?Wa:Ga}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reflow=function(t){var e=this.options,i=this.children,o=e.gap,r=e.spacing,n=i.length,s=n+o+r*(n-1),a=t.angle/s,p=t.startAngle+a*(o/2);this.forEach(i,(function(e){var i=t.clone();i.startAngle=p,i.angle=a,e.sector&&(i.radius=e.sector.radius),e.reflow(i),e.sector=i,p+=a+a*r}))},e}(Li);te(mc,{gap:1,spacing:0});const xc=mc;var bc=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reflow=function(t){var e=this.options.reverse,i=this.children,o=i.length,r=e?o-1:0,n=e?-1:1;this.box=new wi;for(var s=r;s>=0&&s<o;s+=n){var a=i[s].sector;a.startAngle=t.startAngle,a.angle=t.angle}},e}(Li);const _c=bc;var wc=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.pointType=function(){return vc},e.prototype.clusterType=function(){return xc},e.prototype.stackType=function(){return _c},e.prototype.categorySlot=function(t,e){return t.getSlot(e)},e.prototype.pointSlot=function(t,e){var i=t.clone(),o=t.center.y;return i.radius=o-e.y1,i.innerRadius=o-e.y2,i},e.prototype.reflowPoint=function(t,e){t.sector=e,t.reflow()},e.prototype.createAnimation=function(){this.options.animation.center=this.box.toRect().center(),t.prototype.createAnimation.call(this)},e}(Ka);wc.prototype.reflow=aa.prototype.reflow,te(wc,{clip:!1,limitPoints:!1,animation:{type:"pie"}});const kc=wc;var Ac=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createPolarAxis=function(){var t=new Br(this.options.categoryAxis,this.chartService);this.polarAxis=t,this.categoryAxis=t,this.appendAxis(t),this.aggregateCategories(),this.createTrendlineSeries(),this.createCategoryAxesLabels()},e.prototype.valueAxisOptions=function(t){return this._hasBarCharts&&at(t,{majorGridLines:{type:s},minorGridLines:{type:s}}),this._isStacked100&&at(t,{roundToMajorUnit:!1,labels:{format:"P0"}}),at(t,this.options.valueAxis)},e.prototype.aggregateCategories=function(){Ll.prototype.aggregateCategories.call(this,this.panes)},e.prototype.createCategoryAxesLabels=function(){Ll.prototype.createCategoryAxesLabels.call(this,this.panes)},e.prototype.filterSeries=function(t){return t},e.prototype.trendlineFactory=function(t,e){var i=Ll.prototype.trendlineFactory.call(this,t,e);return i&&(i.type=Hn),i},e.prototype.createCharts=function(){var t=this.filterVisibleSeries(this.series),e=this.panes[0];this.createAreaChart(qs(t,[Dn]),e),this.createLineChart(qs(t,[Hn]),e),this.createBarChart(qs(t,[Fn]),e)},e.prototype.chartOptions=function(t){var e={series:t},i=t[0];if(i){var o=this.filterVisibleSeries(t),r=i.stack;e.isStacked=r&&o.length>1,e.isStacked100=r&&"100%"===r.type&&o.length>1,e.isStacked100&&(this._isStacked100=!0)}return e},e.prototype.createAreaChart=function(t,e){if(0!==t.length){var i=new gc(this,this.chartOptions(t));this.appendChart(i,e)}},e.prototype.createLineChart=function(t,e){if(0!==t.length){var i=new lc(this,this.chartOptions(t));this.appendChart(i,e)}},e.prototype.createBarChart=function(t,e){if(0!==t.length){var i=t[0],o=this.chartOptions(t),r=this.filterVisibleSeries(t),n=r.some((function(t){return t.stack})),s=r.some((function(t){return t.stack&&"100%"===t.stack.type}));o.gap=i.gap,o.spacing=i.spacing,o.defaultStack=i.stack&&r.length>1,o.isStacked=n&&r.length>1,o.isStacked100=s&&r.length>1;var a=new kc(this,o);this.appendChart(a,e),this._hasBarCharts=!0}},e.prototype.seriesCategoryAxis=function(){return this.categoryAxis},e.prototype._dispatchEvent=function(t,e,i){var o=t._eventCoordinates(e),r=new xi(o.x,o.y),n=this.categoryAxis.getCategory(r),s=this.valueAxis.getValue(r);null!==n&&null!==s&&t.trigger(i,{element:Ut(e),category:n,value:s})},e.prototype.createCrosshairs=function(){},e.prototype._pointsByVertical=function(e){return t.prototype._pointsByVertical.call(this,e).sort(this._getSeriesCompareFn())},e.prototype._getSeriesCompareFn=function(){return function(t,e){return e.value-t.value}},e}(qh);at(Ac.prototype,Hp,{appendChart:Ll.prototype.appendChart,aggregateSeries:Ll.prototype.aggregateSeries,seriesSourcePoints:Ll.prototype.seriesSourcePoints,seriesValues:Ll.prototype.seriesValues}),te(Ac,{categoryAxis:{categories:[]},valueAxis:{}});const Sc=Ac;var Cc=function(t){function e(e,i,o){t.call(this,i),this.value=e,this.options.index=o.index}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getLabelText=function(t){var e=vt(t);return e?e(this.pointData()):t.format?this.formatValue(t.format):this.value},e.prototype.reflow=function(t){var e=this.points,i=this.children[0],o=Math.min(e[0].x,e[3].x),r=Math.max(e[1].x,e[2].x);this.box=new wi(o,e[0].y,r,e[2].y),i&&i.reflow(new wi(t.x1,e[0].y,t.x2,e[2].y))},e.prototype.createVisual=function(){var e,i=this,o=this.options;t.prototype.createVisual.call(this),this.addAccessibilityAttributesToVisual(),(e=o.visual?o.visual({category:this.category,dataItem:this.dataItem,value:this.value,series:this.series,percentage:this.percentage,points:this.points,options:o,sender:this.getSender(),createVisual:function(){return i.createPath()}}):this.createPath())&&this.visual.append(e)},e.prototype.createPath=function(){var t=this.options,e=t.border;return q.drawing.Path.fromPoints(this.points,{fill:Ii(t.pattern,{color:t.color,opacity:t.opacity}),stroke:{color:e.color,opacity:e.opacity,width:e.width}}).close()},e.prototype.createHighlight=function(t){return q.drawing.Path.fromPoints(this.points,t)},e.prototype.highlightVisual=function(){return this.visual.children[0]},e.prototype.highlightVisualArgs=function(){var t=q.drawing.Path.fromPoints(this.points).close();return{options:this.options,path:t}},e.prototype.createFocusHighlight=function(t){var e=this.options.focusHighlight.border.width,i=q.drawing.Path.fromPoints(this.points,at({},t,{stroke:{width:2*e}})).close(),o=new q.drawing.MultiPath;return o.paths.push(q.drawing.Path.fromRect(this.box.clone().pad(e).toRect())),o.paths.push(q.drawing.Path.fromPoints(this.points)),i.clip(o),i},e.prototype.tooltipAnchor=function(){var t=this.box;return{point:new xi(t.center().x,t.y1),align:{horizontal:"center",vertical:"top"}}},e.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},e.prototype.pointData=function(){return{dataItem:this.dataItem,category:this.category,value:this.value,series:this.series,percentage:this.percentage}},e.prototype.getIndex=function(){return this.index},e}(Li);te(Cc,{color:j,border:{width:1},labels:{format:""},accessibility:{role:Ss,className:Cs,ariaRoleDescription:Ps}}),at(Cc.prototype,la),at(Cc.prototype,Ha);const Pc=Cc;var Tc=function(t){function e(e,i){t.call(this,i),this.plotArea=e,this.chartService=e.chartService,this.points=[],this.labels=[],this.legendItems=[],this.render()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.formatPointValue=function(t,e){return this.plotArea.chartService.format.auto(e,t.value)},e.prototype.render=function(){var t=this.options,e=this.plotArea.options.seriesColors;void 0===e&&(e=[]);var i=t.series[0],o=i.data;if(o)for(var r=Us(i),n=r.total,s=r.points,a=0;a<s.length;a++){var p=s[a];if(p){var l=p.fields;ot(i.color)||(i.color=l.color||e[a%e.length]),l=at({index:a,owner:this,series:i,seriesIx:0,dataItem:o[a],percentage:p.value/n},l,{visible:p.visible});var h=p.valueFields.value,c=this.createSegment(h,l),u=this.createLabel(h,l);c&&u&&c.append(u)}}},e.prototype.evalSegmentOptions=function(t,e,i){var o=i.series;Ys(t,{value:e,series:o,dataItem:i.dataItem,index:i.index},{defaults:o._defaults,excluded:["data","content","template","toggle","visual","ariaTemplate","ariaContent"]})},e.prototype.createSegment=function(t,e){var i=at({},e.series);if(i.pattern=e.pattern||i.pattern,this.evalSegmentOptions(i,t,e),this.createLegendItem(t,i,e),!1!==e.visible){var o=new Pc(t,i,e);return Object.assign(o,e),this.append(o),this.points.push(o),o}},e.prototype.createLabel=function(t,e){var i=e.series,o=e.dataItem,r=at({},this.options.labels,i.labels),n=t;if(r.visible){var s=vt(r),a={dataItem:o,value:t,percentage:e.percentage,category:e.category,series:i};s?n=s(a):r.format&&(n=this.chartService.format.auto(r.format,n)),r.color||(r.color=fe(i.color),r.background||(r.background=i.color)),this.evalSegmentOptions(r,t,e);var p=new $i(n,at({vAlign:r.position},r),a);return this.labels.push(p),p}},e.prototype.labelPadding=function(){for(var t=this.labels,e={left:0,right:0},i=0;i<t.length;i++){var o=t[i].options.align;if(o!==f){var r=t[i].box.width();o===C?e.left=Math.max(e.left,r):e.right=Math.max(e.right,r)}}return e},e.prototype.dynamicSlopeReflow=function(t,e,i){for(var o=this.options,r=this.points,n=r.length,s=r[0],a=s,p=0;p<r.length;p++)r[p].percentage>a.percentage&&(a=r[p]);for(var l=s.percentage/a.percentage*e,h=(e-l)/2,c=0,u=0;u<n;u++){var d=r[u].percentage,f=r[u+1],g=f?f.percentage:d,y=r[u].points=[],v=o.dynamicHeight?i*d:i/n,m=void 0;m=Xt(m=d?(e-l*(g/d))/2:g?0:e/2,0,e),y.push(new q.geometry.Point(t.x1+h,t.y1+c)),y.push(new q.geometry.Point(t.x1+e-h,t.y1+c)),y.push(new q.geometry.Point(t.x1+e-m,t.y1+v+c)),y.push(new q.geometry.Point(t.x1+m,t.y1+v+c)),h=m,c+=v+o.segmentSpacing,l=Xt(e-2*m,0,e)}},e.prototype.constantSlopeReflow=function(t,e,i){for(var o=this.options,r=this.points,n=r.length,s=o.neckRatio<=1,a=s?o.neckRatio*e:e,p=s?0:(e-e/o.neckRatio)/2,l=((s?e:e-2*p)-a)/2,h=0,c=0;c<n;c++){var u=r[c].points=[],d=r[c].percentage,f=o.dynamicHeight?l*d:l/n,g=o.dynamicHeight?i*d:i/n;u.push(new q.geometry.Point(t.x1+p,t.y1+h)),u.push(new q.geometry.Point(t.x1+e-p,t.y1+h)),u.push(new q.geometry.Point(t.x1+e-p-f,t.y1+g+h)),u.push(new q.geometry.Point(t.x1+p+f,t.y1+g+h)),p+=f,h+=g+o.segmentSpacing}},e.prototype.reflow=function(t){var e=this.points,i=e.length;if(i){var o=this.options,r=t.clone().unpad(this.labelPadding()),n=r.height()-o.segmentSpacing*(i-1),s=r.width();o.dynamicSlope?this.dynamicSlopeReflow(r,s,n):this.constantSlopeReflow(r,s,n);for(var a=0;a<i;a++)e[a].reflow(t)}},e}(Li);te(Tc,{neckRatio:.3,width:300,dynamicSlope:!1,dynamicHeight:!0,segmentSpacing:0,labels:{visible:!1,align:f,position:f,zIndex:1}}),at(Tc.prototype,Rh);const Mc=Tc;var Oc=function(t){function e(e,i){i.dynamicSlope=!1,i.neckRatio=1e6,t.call(this,e,i)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Mc);const Lc=Oc;var Bc=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.render=function(){this.createChart(Mc,qs(this.series,[Mn])),this.createChart(Lc,qs(this.series,[On]))},e.prototype.createChart=function(t,e){var i=e[0];if(i){var o=new t(this,{series:e,legend:this.options.legend,neckRatio:i.neckRatio,dynamicHeight:i.dynamicHeight,dynamicSlope:i.dynamicSlope,segmentSpacing:i.segmentSpacing,highlight:i.highlight});this.appendChart(o)}},e.prototype.appendChart=function(e,i){t.prototype.appendChart.call(this,e,i),Vt(this.options.legend.data,e.legendItems)},e.prototype._pointsByVertical=function(t){return this.pointsBySeriesIndex(t.series.index)},e.prototype.getPointToTheRight=function(t){return this.getPointBelow(t)},e.prototype.getPointToTheLeft=function(t){return this.getPointAbove(t)},e}(Dp);const Ic=Bc;var Ec=function(t){function e(e,i){t.call(this),this.options=i,this.color=i.color||j,this.value=e}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.render=function(){this._rendered||(this._rendered=!0,this.createMarker(),this.createLabel(),this.createNote())},e.prototype.createLabel=function(){var t=this.options.labels;t.visible&&(this.label=this.createLabelElement(t),this.append(this.label))},e.prototype.createLabelElement=function(t){var e=t.color;return e||(e=fe(this.color)),new $i(this.getLabelText(t),at({align:f,vAlign:f,margin:{left:5,right:5},zIndex:Kt(t.zIndex,this.series.zIndex)},t,{color:e}),this.pointData())},e.prototype.getLabelText=function(t){var e=vt(t);return e?e(this.pointData()):this.formatValue(t.format)},e.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},e.prototype.reflow=function(t){this.render();var e=this.label;this.box=t,e&&e.reflow(this.markerBox()),this.note&&this.note.reflow(t),this.marker.reflow(this.markerBox())},e.prototype.createVisual=function(){t.prototype.createVisual.call(this),this.addAccessibilityAttributesToVisual()},e.prototype.markerBox=function(){var t=this.options.markers,e=t.border,i=this.box.toRect(),o=Kt(t.type,"rect")===I,r=Kt(e.width,o?1:0),n=Math.round(r/2);if(t.size){var s=i.center();i.size.width=i.size.height=t.size,i.origin.x=Math.round(s.x-i.size.width/2),i.origin.y=Math.round(s.y-i.size.height/2)}return i.size.width-=r,i.size.height-=r,i.origin.y+=n+.5,i.origin.x+=n+.5,Zi(i)},e.prototype.markerBorder=function(){var t=this.options,e=t.markers.border,i=Kt(e.opacity,t.opacity);return{color:e.color||this.color,width:e.width,opacity:i,dashType:e.dashType}},e.prototype.createMarker=function(){var t=this.options,e=t.markers,i=new ji({type:Kt(e.type,"rect"),width:e.size,height:e.size,rotation:e.rotation,background:this.color,border:this.markerBorder(),pattern:t.pattern,borderRadius:e.borderRadius,opacity:this.series.opacity||t.opacity,zIndex:Kt(t.zIndex,this.series.zIndex),animation:t.animation,visual:t.visual},{dataItem:this.dataItem,value:this.value,series:this.series,category:this.category});this.marker=i,this.append(i)},e.prototype.createHighlight=function(t){var e=this.options,i=this.options.highlight.markers||this.options.markers,o=new ji({type:Kt(i.type,"rect"),width:i.size,height:i.size,rotation:i.rotation,background:i.color||this.color,border:this.markerBorder(),borderRadius:i.borderRadius,opacity:this.series.opacity||e.opacity,zIndex:Kt(e.zIndex,this.series.zIndex)});o.reflow(this.markerBox());var r=o.getElement();return r.options.fill=t.fill,r.options.stroke=t.stroke,r},e.prototype.highlightVisual=function(){return this.rectVisual},e.prototype.highlightVisualArgs=function(){return{options:this.options,rect:this.box.toRect(),visual:this.rectVisual}},e.prototype.createFocusHighlight=function(){var t=this.options.markers,e=this.options.focusHighlight,i=new ji({type:Kt(t.type,"rect"),width:t.size,height:t.size,rotation:t.rotation,background:e.color,border:e.border,borderRadius:t.borderRadius,padding:e.border.width/2,zIndex:e.zIndex});return i.reflow(this.markerBox()),i.getElement()},e.prototype.tooltipAnchor=function(){var t=this.box.center().x,e=this.box.y1-5;return{point:new xi(t,e),align:{horizontal:f,vertical:d}}},e.prototype.overlapsBox=function(t){return this.box.overlaps(t)},e.prototype.unclipElements=function(){},e.prototype.pointData=function(){return{x:this.value.x,y:this.value.y,value:this.value.value,dataItem:this.dataItem,series:this.series}},e}(Li);at(Ec.prototype,la),at(Ec.prototype,ha),at(Ec.prototype,Ha),Ec.prototype.defaults={markers:{type:"rect",borderRadius:4,border:{color:"transparent"}},padding:{top:1},labels:{visible:!1,padding:3},opacity:1,notes:{label:{}},accessibility:{role:Ss,className:Cs,ariaRoleDescription:Ps}};const Rc=Ec;var Vc=function(t){function e(e,i){t.call(this,i),this.plotArea=e,this.chartService=e.chartService,this._initFields(),this.render()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._initFields=function(){this.points=[],this.seriesOptions=[],this.valueRange={min:P,max:T},this._evalSeries=[]},e.prototype.render=function(){this.setRange(),this.traverseDataPoints(this.addValue.bind(this))},e.prototype.setRange=function(){for(var t=this.options.series,e=0;e<t.length;e++)for(var i=t[e],o=0;o<i.data.length;o++){var r=this.plotArea.bindPoint(i,o).valueFields;jt(r.value)&&null!==r.value&&(this.valueRange.min=Math.min(this.valueRange.min,r.value),this.valueRange.max=Math.max(this.valueRange.max,r.value))}},e.prototype.addValue=function(t,e){var i;t&&jt(t.value)&&null!==t.value&&(i=this.createPoint(t,e))&&Object.assign(i,e),this.points.push(i)},e.prototype.evalPointOptions=function(t,e,i){var o=i.series,r=i.seriesIx,n={defaults:o._defaults,excluded:["data","tooltip","content","template","visual","toggle","drilldownSeriesFactory","ariaTemplate","ariaContent"]},s=this._evalSeries[r];jt(s)||(this._evalSeries[r]=s=Ys(t,{},n,!0));var a=t;return s&&Ys(a=at({},t),{value:e,series:o,dataItem:i.dataItem,min:this.valueRange.min,max:this.valueRange.max},n),a},e.prototype.pointType=function(){return Rc},e.prototype.pointOptions=function(t,e){var i=this.seriesOptions[e];if(!i){var o=this.pointType().prototype.defaults;this.seriesOptions[e]=i=at({},o,{markers:{opacity:t.opacity},tooltip:{format:this.options.tooltip.format},labels:{format:this.options.labels.format}},t)}return Object.assign({},i)},e.prototype.createPoint=function(t,e){var i=e.series,o=this.pointOptions(i,e.seriesIx),r=e.color||i.color;o.pattern=e.pattern||o.pattern,o=this.evalPointOptions(o,t,e),ot(i.color)?r=o.color:0!==this.valueRange.max&&(r=function(t,e){void 0===e&&(e=.05);var i=(0,q.parseColor)(t),o=1-e;return function(t){var e=i.toHSL(),r=100-e.l,n=o-t;return e.l+=Math.min(n*r,r),e.toCss()}}(r)(t.value/this.valueRange.max));var n=new Rc(t,o);return n.color=r,this.append(n),n},e.prototype.seriesAxes=function(t){var e=t.xAxis,i=t.yAxis,o=this.plotArea,r=e?o.namedXAxes[e]:o.axisX,n=i?o.namedYAxes[i]:o.axisY;if(!r)throw new Error("Unable to locate X axis with name "+e);if(!n)throw new Error("Unable to locate Y axis with name "+i);return{xAxis:r,yAxis:n}},e.prototype.reflow=function(t){var e=this,i=this.points,o=!this.options.clip,r=0;this.traverseDataPoints((function(t,n){var s=i[r++],a=e.seriesAxes(n.series),p=a.xAxis,l=a.yAxis,h=p.categoryIndex(t.x),c=l.categoryIndex(t.y),u=p.getSlot(h,h,o),d=l.getSlot(c,c,o);if(s)if(u&&d){var f=e.pointSlot(u,d);s.reflow(f)}else s.visible=!1})),this.box=t},e.prototype.pointSlot=function(t,e){return new wi(t.x1,e.y1,t.x2,e.y2)},e.prototype.traverseDataPoints=function(t){for(var e=this.options.series,i=0;i<e.length;i++)for(var o=e[i],r=this.seriesAxes(o),n=r.xAxis,s=r.yAxis,a=n.currentRangeIndices(),p=s.currentRangeIndices(),l=0;l<o.data.length;l++){var h=this.plotArea.bindPoint(o,l),c=h.valueFields,u=h.fields,d=n.totalIndex(c.x),f=s.totalIndex(c.y),g=a.min<=d&&d<=a.max,y=p.min<=f&&f<=p.max;g&&y&&t(c,at({pointIx:l,series:o,seriesIx:i,dataItem:o.data[l],owner:this},u))}},e.prototype.formatPointValue=function(t,e){var i=t.value;return this.chartService.format.auto(e,i.x,i.y,i.value)},e.prototype.animationPoints=function(){for(var t=this.points,e=[],i=0;i<t.length;i++)e.push((t[i]||{}).marker);return e},e}(Li);te(Vc,{series:[],tooltip:{format:"{0}, {1}: {2}"},labels:{format:"{2}"},clip:!0});const zc=Vc;var jc=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initFields=function(){this.namedXAxes={},this.namedYAxes={}},e.prototype.render=function(t){void 0===t&&(t=this.panes),this.bindCategories(),this.createAxes(t),this.createCharts(t),this.createAxisLabels()},e.prototype.bindCategories=function(){for(var t=this.srcSeries||this.series,e=0;e<t.length;e++){for(var i=t[e],o=i.data||[],r=this.seriesAxes(i),n=r.xAxis,s=r.yAxis,a=_e(n.categories||[]),p=_e(s.categories||[]),l=0;l<o.length;l++){var h=on.current.bindPoint(i,l).valueFields,c=h.x,u=h.y;a.has(c)||a.add(c),p.has(u)||p.add(u)}n.categories=a.values(),s.categories=p.values()}},e.prototype.createCharts=function(t){for(var e=this.groupSeriesByPane(),i=0;i<t.length;i++){var o=t[i],r=e[o.options.name||"default"]||[];this.addToLegend(r);var n=this.filterVisibleSeries(r);n&&this.createHeatmapChart(qs(n,[Ln]),o)}},e.prototype.createHeatmapChart=function(t,e){var i=new zc(this,{series:t});this.appendChart(i,e)},e.prototype.seriesPaneName=function(t){var e=this.options,i=t.xAxis,o=[].concat(e.xAxis),r=wt(o,(function(t){return t.name===i}))[0],n=t.yAxis,s=[].concat(e.yAxis),a=wt(s,(function(t){return t.name===n}))[0],p=(e.panes||[{}])[0].name||"default";return(r||{}).pane||(a||{}).pane||p},e.prototype.seriesAxes=function(t){var e,i,o=this.options,r=[].concat(o.xAxis),n=t.xAxis;e=n?r.find((function(t){return t.name===n})):r[0];var s=[].concat(o.yAxis),a=t.yAxis;if(i=a?s.find((function(t){return t.name===a})):s[0],!e)throw new Error("Unable to locate X axis with name "+n);if(!i)throw new Error("Unable to locate Y axis with name "+a);return{xAxis:e,yAxis:i}},e.prototype.createAxisLabels=function(){for(var t=this.axes,e=0;e<t.length;e++)t[e].createLabels()},e.prototype.createXYAxis=function(t,e,i){for(var o,r=t.name,n=e?this.namedYAxes:this.namedXAxes,s=Object.assign({axisCrossingValue:0},t,{vertical:e,reverse:e||this.chartService.rtl?!t.reverse:t.reverse,justified:!1}),a=s.categories?s.categories[0]:null,p=[s.min,s.max,a],l=this.series,h=0;h<l.length;h++){var c=l[h],u=c[e?"yAxis":"xAxis"];if(u===s.name||0===i&&!u){var d=on.current.bindPoint(c,0).valueFields;p.push(d[e?"y":"x"]);break}}for(var f=0;f<p.length;f++)if(p[f]instanceof Date){o=!0;break}var g=new(Ws(s.type,m)||!s.type&&o?fr:nr)(s,this.chartService);if(g.axisIndex=i,r){if(n[r])throw new Error((e?"Y":"X")+" axis with name "+r+" is already defined");n[r]=g}return this.appendAxis(g),g.indexCategories(),g},e.prototype.createAxes=function(t){for(var e=this.options,i=[].concat(e.xAxis),o=[],r=[].concat(e.yAxis),n=[],s=0;s<i.length;s++)Ct(this.findPane(i[s].pane),t)&&o.push(this.createXYAxis(i[s],!1,s));for(var a=0;a<r.length;a++)Ct(this.findPane(r[a].pane),t)&&n.push(this.createXYAxis(r[a],!0,a));this.axisX=this.axisX||o[0],this.axisY=this.axisY||n[0]},e.prototype.removeAxis=function(e){var i=e.options.name;t.prototype.removeAxis.call(this,e),e.options.vertical?delete this.namedYAxes[i]:delete this.namedXAxes[i],e===this.axisX&&delete this.axisX,e===this.axisY&&delete this.axisY},e.prototype._dispatchEvent=function(t,e,i){for(var o=t._eventCoordinates(e),r=new xi(o.x,o.y),n=this.axes,s=n.length,a=[],p=[],l=0;l<s;l++){var h=n[l];Fs(h.options.vertical?p:a,h.getCategory(r))}a.length>0&&p.length>0&&t.trigger(i,{element:Ut(e),originalEvent:e,x:ta(a),y:ta(p)})},e.prototype.updateAxisOptions=function(t,e){var i=t.options.vertical,o=this.groupAxes(this.panes),r=(i?o.y:o.x).indexOf(t);Fc(this.options,r,i,e),Fc(this.originalOptions,r,i,e)},e.prototype.crosshairOptions=function(t){return Object.assign({},t.options.crosshair,{zIndex:0})},e.prototype._pointsByVertical=function(t,e){var i=this;void 0===e&&(e=0);var o=this.axisX.options.reverse?-1*e:e,r=this.axisX.children,n=this._getPointAxisXIndex(t)+o,s=r[n=it(n,r.length)].value,a=this.filterPoints((function(t){return Dc(t.pointData().x,s)})).sort((function(t,e){return i._getPointAxisYIndex(t)-i._getPointAxisYIndex(e)}));return this.axisY.options.reverse?a.reverse():a},e.prototype._pointsByHorizontal=function(t,e){var i=this;void 0===e&&(e=0);var o=this.axisY.options.reverse?-1*e:e,r=this.axisY.children,n=this._getPointAxisYIndex(t)+o,s=r[n=it(n,r.length)].value,a=this.filterPoints((function(t){return Dc(t.pointData().y,s)})).sort((function(t,e){return i._getPointAxisXIndex(t)-i._getPointAxisXIndex(e)}));return this.axisX.options.reverse?a.reverse():a},e.prototype._getPointAxisXIndex=function(t){return this._getPointAxisIndex(this.axisX,t.pointData().x)},e.prototype._getPointAxisYIndex=function(t){return this._getPointAxisIndex(this.axisY,t.pointData().y)},e.prototype._getPointAxisIndex=function(t,e){return t.children.findIndex((function(t){return Dc(e,t.value)}))},e}(Dp);function Dc(t,e){return t instanceof Date&&e instanceof Date?Ko(t,e):t===e}function Fc(t,e,i,o){at([].concat(i?t.yAxis:t.xAxis)[e],o)}te(jc,{xAxis:{},yAxis:{}}),at(jc.prototype,Hp);const Hc=jc;var Nc="color",Uc="first",Gc="max",Wc="min",Xc="noteText";sh.current.register(Ll,[wn,Pn,In,Qn,_n,Yn,Cn,En,Sn,Zn,kn,qn,Gn,Un,$n,Bn,Nn,Kn].concat(ss)),sh.current.register(Mh,[Wn,Xn,An].concat(ss)),sh.current.register(Fh,[Rn]),sh.current.register(Xh,[Tn]),sh.current.register(Ic,[Mn,On]),sh.current.register(ac,[Vn,zn,jn].concat(ss)),sh.current.register(Sc,[Dn,Fn,Hn].concat(ss)),sh.current.register(Hc,[Ln]),on.current.register([wn,Pn,In,Qn,_n,Yn],[z],[Ms,Nc,Xc,dn,fn,Is,Es]),on.current.register([Gn,Un,Nn,Kn],["from","to"],[Ms,Nc,Xc,Is,Es]),on.current.register([$n,Bn],[z],[Ms,Nc,Xc,"summary",Is,Es]),on.current.register([Vn,zn,jn],[F,H],[Nc,Is,Es]),on.current.register([Dn,Fn,Hn],[z],[Ms,Nc,Is,Es]),on.current.register([Mn,On],[z],[Ms,Nc,"visibleInLegend","visible",Is,Es]),Xp.current.register([wn,Pn,In,Qn,_n,Yn,$n,Bn],{value:Gc,color:Uc,noteText:Uc,errorLow:Wc,errorHigh:Gc}),Xp.current.register([Gn,Un,Nn,Kn],{from:Wc,to:Gc,color:Uc,noteText:Uc}),Xp.current.register([Dn,Fn,Hn],{value:Gc,color:Uc}),on.current.register([Wn,Xn,An],[F,H],[Nc,Xc,"xErrorLow","xErrorHigh","yErrorLow","yErrorHigh"]),on.current.register([An],[F,H,"size"],[Nc,Ms,Xc,Es]),on.current.register([Ln],[F,H,z],[Nc,Xc,Es]),on.current.register([Cn,En],["open","high","low","close"],[Ms,Nc,"downColor",Xc,Es]),Xp.current.register([Cn,En],{open:Gc,high:Gc,low:Wc,close:Gc,color:Uc,downColor:Uc,noteText:Uc}),on.current.register([kn,qn],["lower","q1","median","q3","upper","mean","outliers"],[Ms,Nc,Xc,Is,Es]),Xp.current.register([kn,qn],{lower:Gc,q1:Gc,median:Gc,q3:Gc,upper:Gc,mean:Gc,outliers:Uc,color:Uc,noteText:Uc}),on.current.register([Sn,Zn],["current","target"],[Ms,Nc,"visibleInLegend",Xc,Is,Es]),Xp.current.register([Sn,Zn],{current:Gc,target:Gc,color:Uc,noteText:Uc}),on.current.register([Rn,Tn],[z],[Ms,Nc,"explode","visibleInLegend","visible",Is,Es]);for(var Yc="--kendo-chart-series-",qc=function(t){return t.ownerDocument.defaultView.getComputedStyle(t)},Zc={},Qc=function(t,e){var i=qc(t).getPropertyValue(e);return/^color-mix/i.test(i)&&(i=function(t,e){if(Zc[t])return Zc[t];var i=e.style.color;e.style.color=t;var o=qc(e).color;return e.style.color=i,Zc[t]=o,o}(i,t)),i},Kc=function(t,e){return parseFloat(qc(t).getPropertyValue(e))},$c=function(t,e,i,o){var r=qc(t);return[r.getPropertyValue(e),r.getPropertyValue(i),r.getPropertyValue(o)||r.fontFamily].join(" ")},Jc={},tu=1;tu<=30;tu++)Jc["series-color-"+tu]=""+Yc+tu;var eu=function(t){for(var e=qc(t),i=[],o=1,r=e.getPropertyValue(""+Yc+o);r||o<=30;)i.push(r),o++,r=e.getPropertyValue(""+Yc+o);return i},iu={text:"--kendo-chart-text",chartBg:"--kendo-chart-bg",fontWeight:"--kendo-font-weight",fontFamily:"--kendo-font-family"},ou={majorLines:"--kendo-chart-major-lines",minorLines:"--kendo-chart-minor-lines",areaOpacity:"--kendo-chart-area-opacity",surface:"--kendo-color-surface",primaryBg:"--kendo-chart-primary-bg",crosshairBg:"--kendo-chart-crosshair-bg",axisLabelFontSize:"--kendo-chart-label-font-size",axisLabelFontWeight:"--kendo-font-weight",axisLabelFontFamily:"--kendo-font-family",chartFontSize:"--kendo-chart-font-size",paneTitleFontSize:"--kendo-chart-pane-title-font-size",paneTitleFontWeight:"--kendo-chart-pane-title-font-weight",titleFontSize:"--kendo-chart-title-font-size",titleFontWeight:"--kendo-font-weight",errorBarsBg:"--kendo-chart-error-bars-bg",areaInactiveOpacity:"--kendo-chart-area-inactive-opacity",lineInactiveOpacity:"--kendo-chart-line-inactive-opacity",bulletTarget:"--kendo-chart-bullet-target",notesBg:"--kendo-chart-notes-bg",notesBorder:"--kendo-chart-notes-border",notesLines:"--kendo-chart-notes-lines",inactive:"--kendo-chart-inactive"},ru=function(t){return $c(t,iu.fontWeight,ou.chartFontSize,iu.fontFamily)},nu=function(t){return $c(t,ou.paneTitleFontWeight,ou.paneTitleFontSize,iu.fontFamily)},su=function(t){return Qc(t,iu.text)},au=function(t){return{color:su(t),font:$c(t,iu.fontWeight,ou.titleFontSize,iu.fontFamily)}},pu=function(t){var e=su(t);return{labels:{color:e,font:ru(t)},title:{color:e}}},lu=function(t){var e=Qc(t,ou.inactive);return Object.assign({},{inactiveItems:{labels:{color:e},markers:{color:e}}},pu(t))},hu=Object.assign({},iu,ou,Jc),cu=Object.assign({},iu,{linksColor:"--kendo-color-subtle"},Jc),uu=Object.assign({},iu,{gaugePointer:"--kendo-chart-gauge-pointer",gaugeTrack:"--kendo-chart-gauge-track"}),du=function(t){var e=uu,i=su(t);return{pointer:{color:Qc(t,e.gaugePointer)},scale:{labels:{color:i},rangePlaceholderColor:Qc(t,e.gaugeTrack),minorTicks:{color:i},majorTicks:{color:i},line:{color:i}}}},fu=function(t){var e=cu;return{labels:{color:su(t),font:ru(t),stroke:{color:Qc(t,e.chartBg)}},links:{color:Qc(t,e.linksColor)},nodeColors:eu(t),title:au(t),legend:pu(t)}},gu=function(t){var e=hu,i=Qc(t,e.majorLines),o=Qc(t,e.text),r=$c(t,e.axisLabelFontWeight,e.axisLabelFontSize,e.axisLabelFontFamily),n=Qc(t,e.chartBg),s=function(t){return{icon:{background:Qc(t,ou.notesBg),border:{color:Qc(t,ou.notesBorder)}},line:{color:Qc(t,ou.notesLines)},label:{font:ru(t)}}}(t),a=Kc(t,e.areaOpacity),p=Qc(t,e.surface),l=Qc(t,e.primaryBg),h=function(){return{downColor:i,mean:{color:p},median:{color:p},whiskers:{color:l}}},c=function(){return{line:{color:i}}},u=function(){return{opacity:a,highlight:{inactiveOpacity:Kc(t,e.areaInactiveOpacity)}}},d=function(){return{highlight:{inactiveOpacity:Kc(t,e.lineInactiveOpacity)}}},f=function(){return{target:{color:o}}};return{axisDefaults:{crosshair:{color:Qc(t,e.crosshairBg)},labels:{color:o,font:r},line:{color:i},majorGridLines:{color:i},minorGridLines:{color:Qc(t,e.minorLines)},notes:structuredClone(s),title:{color:o,font:ru(t)}},chartArea:{background:n},legend:lu(t),seriesColors:eu(t),seriesDefaults:{area:u(),verticalArea:u(),radarArea:u(),boxPlot:h(),verticalBoxPlot:h(),bullet:f(),verticalBullet:f(),horizontalWaterfall:c(),waterfall:c(),line:d(),verticalLine:d(),candlestick:{downColor:o,line:{color:o}},errorBars:{color:Qc(t,e.errorBarsBg)},icon:{border:{color:i}},labels:{background:n,color:o,font:r,opacity:a},notes:structuredClone(s)},subtitle:{color:o,font:nu(t)},title:au(t),paneDefaults:{title:{font:nu(t)}}}},yu=[Ms,z,F,H],vu="mousedown",mu="mousemove",xu="contextmenu",bu="mouseleave",_u="keydown",wu="focus",ku="blur",Au="k-chart-overlay-top",Su=function(t,e,i,o){var r=this;void 0===o&&(o={}),this.observers=[],this.addObserver(o.observer),this.chartService=new mo(this,o),this.chartService.theme=i,this._initElement(t);var n=at({},this.options,e);this._originalOptions=at({},n),this._theme=i,this._initTheme(n,i),this._focusState={},this._initHandlers(),this._createSurface=o.createSurface||q.drawing.Surface.create.bind(q.drawing.Surface),this._initSurface(),this.bindCategories(),Jt.preloadFonts(e,(function(){r.fontLoaded=!0,r._destroyed||(r.trigger("init"),r._redraw(),r._attachEvents(),r._restoreOverlayElement(),r._initStyleObserver())}))};function Cu(t,e){if(t)for(var i=0;i<t.length;i++)if(t[i].category===e)return[t[i]]}function Pu(t){delete t.bar,delete t.column,delete t.rangeColumn,delete t.line,delete t.verticalLine,delete t.pie,delete t.donut,delete t.area,delete t.verticalArea,delete t.scatter,delete t.scatterLine,delete t.bubble,delete t.candlestick,delete t.ohlc,delete t.boxPlot,delete t.bullet,delete t.verticalBullet,delete t.polarArea,delete t.polarLine,delete t.radarArea,delete t.radarLine,delete t.waterfall}function Tu(t){for(var e={},i=0;i<t.length;i++){var o=t[i],r=o.options.name;r&&(e[r]=o.range())}return e}Su.prototype._initStyleObserver=function(){var t=this;this._destroyStyleObserver(),this.options.observeStyles&&(this._stylesObserver=function(t,e,i){var o=getComputedStyle(t),r=new Map;i.forEach((function(t){r.set(t,o.getPropertyValue(t))}));var n=!1,s=setInterval((function(){n||(n=!0,requestAnimationFrame((function(){n=!1,function(){if(t.isConnected){var n=!1;i.forEach((function(t){var e=o.getPropertyValue(t);r.get(t)!==e&&(r.set(t,e),n=!0)})),n&&e()}}()})))}),500);return{disconnect:function(){clearInterval(s),r.clear()}}}(this.element,(function(){t.trigger("styleChanged")}),Object.values(hu)))},Su.prototype._destroyStyleObserver=function(){this._stylesObserver&&(this._stylesObserver.disconnect(),this._stylesObserver=null)},Su.prototype._initElement=function(t){this._setElementClass(t),t.style.position="relative",t.tabIndex=t.getAttribute("tabindex")?t.getAttribute("tabindex"):0,t.setAttribute("role","graphics-document document");for(var e=t.childNodes.length-1;e>=0;e--){var i=t.childNodes[e];kt(i,"k-chart-overlay")?this.overlayElement=i:t.removeChild(i)}this.element=t},Su.prototype._setElementClass=function(t){W(t,"k-chart")},Su.prototype._restoreOverlayElement=function(){this.overlayElement&&(this._hasSeriesData()?this.overlayElement.style.display="none":(!this.options.title||this.options.title&&this.options.title.position!==d?W(this.overlayElement,Au):Y(this.overlayElement,Au),this.overlayElement.style.display=""),this.overlayElement.parentElement!==this.element&&this.element.appendChild(this.overlayElement))},Su.prototype._hasSeriesData=function(){var t=this.options.series||[];return t.length>0&&t.some((function(t){return t.data&&t.data.length>0}))},Su.prototype._initTheme=function(t,e){for(var i=[],o=t.series||[],r=0;r<o.length;r++)i.push(Object.assign({},o[r]));t.series=i,function(t){for(var e=yu,i=0;i<e.length;i++){var o=e[i]+"Axes";t[o]&&(t[e[i]+"Axis"]=t[o],delete t[o])}}(t),this.applyDefaults(t,e),null===t.seriesColors&&delete t.seriesColors,$(t.title)&&(t.title={text:t.title}),this.options=at({},e,t),this.applySeriesColors()},Su.prototype.getSize=function(){var t=this.options.chartArea||{};return{width:t.width?parseInt(t.width,10):Math.floor(this.element.offsetWidth),height:t.height?parseInt(t.height,10):Math.floor(this.element.offsetHeight)}},Su.prototype.resize=function(t){var e=this.getSize(),i=this._size,o=e.width>0||e.height>0;t||o&&(!i||e.width!==i.width||e.height!==i.height)?(this._size=e,this._resize(e,t),this.trigger("resize",e)):o&&this._selections&&le(this._selections,(function(t){return!t.visible}))&&(this._destroySelections(),this._setupSelection())},Su.prototype._resize=function(){this._noTransitionsRedraw()},Su.prototype.redraw=function(t){if(this.applyDefaults(this.options),this.applySeriesColors(),t){var e=this._model._plotArea,i=e.findPane(t);e.redraw(i)}else this._redraw()},Su.prototype.getAxis=function(t){return Yr(t,this._plotArea.axes)},Su.prototype.findAxisByName=function(t){return this.getAxis(t)},Su.prototype.findPaneByName=function(t){for(var e=this._plotArea.panes,i=0;i<e.length;i++)if(e[i].options.name===t)return new Zr(e[i])},Su.prototype.findPaneByIndex=function(t){var e=this._plotArea.panes;if(e[t])return new Zr(e[t])},Su.prototype.plotArea=function(){return new Qr(this._plotArea)},Su.prototype.toggleHighlight=function(t,e){var i,o,r,n=this._plotArea,s=(n.srcSeries||n.series||[])[0];ot(e)?i=n.filterPoints(e):(pt(e)?(o=e.series,r=e.category):o=r=e,i=s.type===Tn?Cu(n.pointsBySeriesName(o),r):Ct(s.type,[Rn,Mn,On])?Cu((n.charts[0]||{}).points,r):n.pointsBySeriesName(o)),i&&this.togglePointsHighlight(t,i)},Su.prototype.togglePointsHighlight=function(t,e){for(var i=this._highlight,o=0;o<e.length;o++)i.togglePointHighlight(e[o],t)},Su.prototype.showTooltip=function(t){var e,i,o=this._sharedTooltip(),r=this._tooltip,n=this._plotArea;if(ot(t)?(e=n.findPoint(t))&&o&&(i=e.categoryIx):o&&jt(t)&&(i=n.categoryAxis.categoryIndex(t)),o){if(i>=0){var s=this._plotArea.pointsByCategoryIndex(i);r.showAt(s)}}else e&&r.show(e)},Su.prototype.hideTooltip=function(){this._tooltip.hide()},Su.prototype._initSurface=function(){var t=this.surface,e=this._surfaceWrap(),i=this.options.chartArea||{};i.width&&Ht(e,{width:i.width}),i.height&&Ht(e,{height:i.height}),t&&t.options.type===this.options.renderAs?(this.surface.clear(),this.surface.resize()):(this._destroySurface(),this.surface=this._createSurface(e,{type:this.options.renderAs}),this.surface.bind("mouseenter",this._surfaceMouseenterHandler),this.surface.bind("mouseleave",this._surfaceMouseleaveHandler)),this.element._kendoExportVisual=this._kendoExportVisual.bind(this)},Su.prototype._surfaceWrap=function(){return this.element},Su.prototype._redraw=function(){var t=this._getModel();this._size={width:t.options.width,height:t.options.height},this._destroyView(),this._setElementAccessibilityAttributes(),this._model=t,this._plotArea=t._plotArea,this._legend=t._legend,t.renderVisual();var e=this.options.transitions;!1!==e&&t.traverse((function(t){if(t.animation){var i=e&&!0!==e?e.loading:e;t.animation.options=Object.assign({},t.animation.options,i),t.animation.setup()}})),this._initSurface(),this.surface.draw(t.visual),!1!==e&&t.traverse((function(t){t.animation&&t.animation.play()})),this._tooltip=this._createTooltip(),this._highlight=new El,this._setupSelection(),this._createPannable(),this._createZoomSelection(),this._createMousewheelZoom(),this._setComputedStyles(),this.trigger("render"),Lu(this._plotArea.panes),this._navState||this._cancelDomEvents(),this._redrawFocusHighlight()},Su.prototype._setComputedStyles=function(){var t=this.titleHeight();this.element.style.setProperty("--kendo-chart-computed-title-height",t+"px")},Su.prototype._redrawFocusHighlight=function(){if(!this._destroyed){var t=this._focusState,e=t.legendInFocus,i=t.preserveHighlight;e&&i&&(this._focusElement(this._getFocusedLegendItem(),!1),this._focusState.preserveHighlight=!1)}},Su.prototype._setElementAccessibilityAttributes=function(){var t=this.options.title,e=$(t)?t:t.description||t.text;e&&this.element.setAttribute("aria-roledescription",e)},Su.prototype._kendoExportVisual=function(t){if(t&&t.width&&t.height){var e=this._originalOptions.chartArea||{},i={width:e.width||t.width,height:e.height||t.height};return this.exportVisual(i)}return this.exportVisual()},Su.prototype.exportVisual=function(t){var e;if(t&&(t.width||t.height||t.options)){var i=this.options,o=at({},t.options,{chartArea:{width:t.width,height:t.height}});Ou(this._originalOptions,o),this.options=at({},this._originalOptions,o),this._initTheme(this.options,this._theme),this.bindCategories();var r=this._getModel();r.renderVisual(),Lu(r._plotArea.panes),e=r.visual,this.options=i}else e=this.surface.exportVisual();return e},Su.prototype._sharedTooltip=function(){return this._plotArea instanceof Ll&&this.options.tooltip&&this.options.tooltip.shared},Su.prototype._createPannable=function(){var t=this.options;!1!==t.pannable&&(this._pannable=new jl(this._plotArea,t.pannable))},Su.prototype._createZoomSelection=function(){var t=this.options.zoomable,e=(t||{}).selection;!1!==t&&!1!==e&&(this._zoomSelection=new Fl(this,e))},Su.prototype._createMousewheelZoom=function(){var t=this.options.zoomable,e=(t||{}).mousewheel;!1!==t&&!1!==e&&(this._mousewheelZoom=new Nl(this,e))},Su.prototype._toggleDragZoomEvents=function(){var t=this.options.pannable,e=this.options.zoomable,i=(e||{}).selection,o=(e||{}).mousewheel,r=!(t||!1!==e&&!1!==i||this.requiresHandlers([ys,fs,gs])),n=(!1===e||!1===o)&&!this.requiresHandlers([vs,ms,xs]),s=this.element;this._dragZoomEnabled&&r&&n?(s.style.touchAction=this._touchAction||"",this._dragZoomEnabled=!1):this._dragZoomEnabled||r&&n||(s.style.touchAction="none",this._dragZoomEnabled=!0),this._toggleDomEvents(!r,!n)},Su.prototype._toggleDomEvents=function(t,e){var i=this.domEvents;i&&(i.toggleDrag&&i.toggleDrag(t),i.toggleZoom&&i.toggleZoom(e))},Su.prototype._createTooltip=function(){var t=this.options.tooltip;return this._sharedTooltip()?this._createSharedTooltip(t):new uh(this.chartService,t)},Su.prototype._createSharedTooltip=function(t){return new fh(this._plotArea,t)},Su.prototype.applyDefaults=function(t,e){!function(t,e){var i,o,r,n=(e||{}).axisDefaults||{};function s(t){var e=(t||{}).color||o.color,r=at({},n,n[i],o,o[i],{line:{color:e},labels:{color:e},title:{color:e}},t);return delete r[i],r}for(var a=0;a<yu.length;a++)i=yu[a]+"Axis",o=t.axisDefaults||{},r=(r=[].concat(t[i])).map(s),t[i]=r.length>1?r:r[0]}(t,e),function(t,e){var i=t.series,o=i.length,r=t.seriesDefaults,n=at({},t.seriesDefaults),s=e?at({},e.seriesDefaults):{},a=at({},s);Pu(n),Pu(a);for(var p=0;p<o;p++){var l=i[p].type||t.seriesDefaults.type,h=at({data:[]},a,s[l],{tooltip:t.tooltip},n,r[l]);i[p]._defaults=h,i[p]=at({},h,i[p]),i[p].data=i[p].data||[]}}(t,e)},Su.prototype.applySeriesColors=function(){for(var t=this.options,e=t.series,i=t.seriesColors||[],o=0;o<e.length;o++){var r=e[o],n=i[o%i.length],s=r._defaults;r.color=r.color||n,s&&(s.color=s.color||n)}},Su.prototype._getModel=function(){var t=this.options,e=this._createPlotArea(),i=new Ui(this._modelOptions());i.chart=this,i._plotArea=e;var o=eo.buildTitle(t.title),r=eo.buildTitle(t.subtitle,{align:t.title.align,position:t.title.position});if(i.append.apply(i,eo.orderTitles([o,r])),t.legend&&t.legend.visible){var n=new rh(e.options.legend,this.chartService);i.append(n),i._legend=n}return i.append(e),i.reflow(),this._setTitleBox(o,r),i},Su.prototype._setTitleBox=function(t,e){if(t||e){this._titleBox=(t||e).box.clone();var i=t?t.options.position:"",o=e?e.options.position:"",r=o!==d;i===o&&e?this._titleBox.wrap(e.box):t&&e&&r&&(this._titleBox=e.box.clone())}},Su.prototype._modelOptions=function(){var t=this.options,e=this.getSize();return at({transitions:t.transitions,width:e.width||600,height:e.height||400},t.chartArea)},Su.prototype._createPlotArea=function(t){var e=this.options;return sh.current.create(t?[]:e.series,e,this.chartService)},Su.prototype._setupSelection=function(){for(var t=this._plotArea.axes,e=this._selections=[],i=0;i<t.length;i++){var o=t[i],r=o.options;if(o instanceof nr&&r.select&&!r.vertical){var n=o.range(),s=new hh(this,o,at({min:n.min,max:n.max},r.select));e.push(s)}}},Su.prototype._selectStart=function(t){return this.trigger(bs,t)},Su.prototype._select=function(t){return this.trigger(_s,t)},Su.prototype._selectEnd=function(t){return this.trigger(ws,t)},Su.prototype._initHandlers=function(){this._clickHandler=this._click.bind(this),this._keydownHandler=this._keydown.bind(this),this._focusHandler=this._focus.bind(this),this._blurHandler=this._blur.bind(this),this._mousedownHandler=this._mousedown.bind(this),this._mousewheelHandler=this._mousewheel.bind(this),this._mouseleaveHandler=this._mouseleave.bind(this),this._surfaceMouseenterHandler=this._mouseover.bind(this),this._surfaceMouseleaveHandler=this._mouseout.bind(this),this._mousemoveThrottled=(0,q.throttle)(this._mousemove.bind(this),20)},Su.prototype.addObserver=function(t){t&&this.observers.push(t)},Su.prototype.removeObserver=function(t){var e=this.observers.indexOf(t);e>=0&&this.observers.splice(e,1)},Su.prototype.requiresHandlers=function(t){for(var e=this.observers,i=0;i<e.length;i++)if(e[i].requiresHandlers(t))return!0},Su.prototype.trigger=function(t,e){void 0===e&&(e={}),e.sender=this,t===ks?e.anchor.point=this._toDocumentCoordinates(e.anchor.point):t===hs?this._updateDrilldownPoint(e.point):t===cs?this._resetDrilldownPoint():t===ps?(this._focusPoint(e.point),this._startDrilldown(e.point)):t===as&&this._focusLegendItem(e);for(var i=this.observers,o=!1,r=0;r<i.length;r++)i[r].trigger(t,e)&&(o=!0);return o},Su.prototype.titleHeight=function(){return this._titleBox?this._titleBox.height():0},Su.prototype._attachEvents=function(){var t,e,i=this.element;this._touchAction=i.style.touchAction,zt(i,((t={})[xu]=this._clickHandler,t[Bs]=this._mousewheelHandler,t[bu]=this._mouseleaveHandler,t[_u]=this._keydownHandler,t[vu]=this._mousedownHandler,t[wu]=this._focusHandler,t[ku]=this._blurHandler,t)),this._shouldAttachMouseMove()&&zt(i,((e={})[mu]=this._mousemoveThrottled,e)),this.domEvents=_o.create(this.element,{start:this._start.bind(this),move:this._move.bind(this),end:this._end.bind(this),tap:this._tap.bind(this),gesturestart:this._gesturestart.bind(this),gesturechange:this._gesturechange.bind(this),gestureend:this._gestureend.bind(this)}),this._toggleDragZoomEvents()},Su.prototype._mouseleave=function(t){this._hoveredPoint&&(this._hoveredPoint.out(this,t),this._hoveredPoint=null),this._plotAreaHovered&&(this._plotAreaHovered=!1,this.trigger(ds)),this._hasInactiveOpacity()&&this._activeChartInstance&&(this._applySeriesOpacity(this._activeChartInstance.children,null,!0),this._updateSeriesOpacity(null,!0))},Su.prototype._cancelDomEvents=function(){this.domEvents&&this.domEvents.cancel&&this.domEvents.cancel()},Su.prototype._gesturestart=function(t){this._mousewheelZoom&&!this._stopChartHandlers(t)&&(this._gestureDistance=t.distance,this._unsetActivePoint(),this._clearFocusedElement(),this.surface.suspendTracking())},Su.prototype._gestureend=function(t){this._zooming&&!this._stopChartHandlers(t)&&(this.surface&&this.surface.resumeTracking(),this._zooming=!1,this.trigger(xs,{}))},Su.prototype._gesturechange=function(t){var e=this._mousewheelZoom;if(e&&!this._stopChartHandlers(t)){t.preventDefault();var i=this._gestureDistance,o=-t.distance/i+1;if(Math.abs(o)>=.1){o=Math.round(10*o),this._gestureDistance=t.distance;var r={delta:o,axisRanges:Tu(this._plotArea.axes),originalEvent:t};if(this._zooming||!this.trigger(vs,r)){var n=this._eventCoordinates(t);this._zooming||(this._zooming=!0),(r.axisRanges=e.updateRanges(o,n))&&!this.trigger(ms,r)&&e.zoom()}}}},Su.prototype._mouseout=function(t){if(t.element){var e=this._drawingChartElement(t.element,t);e&&e.leave&&e.leave(this,t.originalEvent)}},Su.prototype._start=function(t){var e=this._eventCoordinates(t);!this._stopChartHandlers(t)&&this._plotArea.backgroundContainsPoint(e)&&(this.requiresHandlers([ys,fs,gs])&&this._startNavigation(t,e,ys),this._pannable&&this._pannable.start(t)&&(this.surface.suspendTracking(),this._unsetActivePoint(),this._clearFocusedElement(),this._suppressHover=!0,this.chartService.panning=!0),this._zoomSelection&&this._zoomSelection.start(t)&&this.trigger(vs,{axisRanges:Tu(this._plotArea.axes),originalEvent:t}))},Su.prototype._move=function(t){var e=this._navState,i=this._pannable;if(!this._stopChartHandlers(t)){if(i){var o=i.move(t);o&&!this.trigger(fs,{axisRanges:o,originalEvent:t})&&i.pan()}else if(e){for(var r={},n=e.axes,s=0;s<n.length;s++){var a=n[s];if(a.options.name){var p=a.options.vertical?t.y:t.x,l=p.startLocation-p.location;0!==l&&(r[a.options.name]=a.translateRange(l))}}e.axisRanges=r,this.trigger(fs,{axisRanges:r,originalEvent:t})}this._zoomSelection&&this._zoomSelection.move(t)}},Su.prototype._end=function(t){if(!this._stopChartHandlers(t)){var e=this._pannable;if(e&&e.end(t)?(this.surface.resumeTracking(),this.trigger(gs,{axisRanges:Tu(this._plotArea.axes),originalEvent:t}),this._suppressHover=!1,this.chartService.panning=!1):this._endNavigation(t,gs),this._zoomSelection){var i=this._zoomSelection.end(t);i&&!this.trigger(ms,{axisRanges:i,originalEvent:t})&&(this._zoomSelection.zoom(),this.trigger(xs,{axisRanges:i,originalEvent:t}))}}},Su.prototype._stopChartHandlers=function(t){var e=this._selections||[];if(!e.length)return!1;var i=this._eventCoordinates(t),o=this._plotArea.paneByPoint(i);if(o)for(var r=0;r<e.length;r++)if(e[r].onPane(o))return!0},Su.prototype._mousewheelZoomRate=function(){var t=(this.options.zoomable||{}).mousewheel||{};return Kt(t.rate,.3)},Su.prototype._mousewheel=function(t){var e=this,i=Et(t),o=this._mousewheelZoom,r=this._eventCoordinates(t);if(!this._stopChartHandlers(t)&&this._plotArea.backgroundContainsPoint(r))if(o){var n={delta:i,axisRanges:Tu(this._plotArea.axes),originalEvent:t};!this._zooming&&this.trigger(vs,n)||(t.preventDefault(),this._zooming||(this._unsetActivePoint(),this._clearFocusedElement(),this.surface.suspendTracking(),this._zooming=!0),this._mwTimeout&&clearTimeout(this._mwTimeout),n.axisRanges=o.updateRanges(i,r),n.axisRanges&&!this.trigger(ms,n)&&o.zoom(),this._mwTimeout=setTimeout((function(){e.trigger(xs,n),e._zooming=!1,e.surface&&e.surface.resumeTracking()}),150))}else{var s=this._navState;if(s||this._startNavigation(t,r,vs)||(s=this._navState),s){var a=s.totalDelta||i;s.totalDelta=a+i;for(var p=this._navState.axes,l={},h=0;h<p.length;h++){var c=p[h],u=c.options.name;u&&(l[u]=c.scaleRange(-a*this._mousewheelZoomRate(),r))}this.trigger(ms,{delta:i,axisRanges:l,originalEvent:t}),this._mwTimeout&&clearTimeout(this._mwTimeout),this._mwTimeout=setTimeout((function(){e._endNavigation(t,xs)}),150)}}},Su.prototype._startNavigation=function(t,e,i){var o=this._model._plotArea,r=o.findPointPane(e),n=o.axes.slice(0);if(r){var s=Tu(n);this.trigger(i,{axisRanges:s,originalEvent:t})?this._cancelDomEvents():(this._suppressHover=!0,this._unsetActivePoint(),this._clearFocusedElement(),this._navState={axisRanges:s,pane:r,axes:n})}},Su.prototype._endNavigation=function(t,e){this._navState&&(this.trigger(e,{axisRanges:this._navState.axisRanges,originalEvent:t}),this._suppressHover=!1,this._navState=null)},Su.prototype._getChartElement=function(t,e){var i=this.surface.eventTarget(t);if(i)return this._drawingChartElement(i,t,e)},Su.prototype._drawingChartElement=function(t,e,i){for(var o,r=t;r&&!o;)o=r.chartElement,r=r.parent;if(o)return o.aliasFor&&(o=o.aliasFor(e,this._eventCoordinates(e))),i&&(o=o.closest(i))&&o.aliasFor&&(o=o.aliasFor()),o},Su.prototype._eventCoordinates=function(t){var e=Nt(t);return this._toModelCoordinates(e.x,e.y)},Su.prototype._elementPadding=function(){if(!this._padding){var t=ut(this.element,["paddingLeft","paddingTop"]),e=t.paddingLeft,i=t.paddingTop;this._padding={top:i,left:e}}return this._padding},Su.prototype._toDocumentCoordinates=function(t){var e=this._elementPadding(),i=Ft(this.element);return{left:Zt(t.x+e.left+i.left),top:Zt(t.y+e.top+i.top)}},Su.prototype._toModelCoordinates=function(t,e){var i=this.element,o=Ft(i),r=this._elementPadding(),n=de(i).invert(),s=new q.geometry.Point(t-o.left-r.left,e-o.top-r.top).transform(n);return new xi(s.x,s.y)},Su.prototype._tap=function(t){var e=this,i=this.surface.eventTarget(t),o=this._drawingChartElement(i,t),r=this._sharedTooltip();this._startHover(i,t)||r||this._unsetActivePoint(),r&&this._trackSharedTooltip(this._eventCoordinates(t),t,!0),this._propagateClick(o,t),this.handlingTap=!0,setTimeout((function(){e.handlingTap=!1}),0)},Su.prototype._click=function(t){var e=this._getChartElement(t);this._propagateClick(e,t)},Su.prototype._propagateClick=function(t,e){for(var i=t;i;)i.click&&i.click(this,e),i=i.parent},Su.prototype._isLegendBeforeChart=function(){var t=this.options.legend.position,e=this._legend;return e&&e.hasItems()&&(t===V||t===C)},Su.prototype._focus=function(){this._preventInitialPointFocus||(this._isLegendBeforeChart()?this._focusFirstLegendItem():this._focusFirstPoint()),this._preventInitialPointFocus=!1},Su.prototype._keydown=function(t){var e=this._focusState,i=e.legendInFocus,o=e.focusedElement,r=this._legend;if("Tab"===t.key){this._clearFocusedElement();var n=this._isLegendBeforeChart();i&&n!==t.shiftKey?this._navigatePoints(t):!i&&n===t.shiftKey&&r.hasItems()&&this._navigateLegend(t)}else"Escape"===t.key?(o&&t.stopPropagation(),this._tooltip&&this._tooltip.visible?this._hideTooltip():this._blur()):"Enter"===t.key?o&&(this._focusState.preserveHighlight=!0,this._propagateClick(o,t),this._focusElement(o)):i?this._navigateLegend(t):this._navigatePoints(t)},Su.prototype._navigatePoints=function(t){var e=this,i=this._focusState,o=this._plotArea;if(i.legendInFocus=!1,!i.focusedElement)return this._focusFirstPoint(),void t.preventDefault();var r=function(o){i.focusedPoint=o,e._focusElement(i.focusedPoint),e._displayTooltip(o),t.preventDefault()};switch(t.key){case h:r(o.getPointToTheRight(i.focusedPoint));break;case l:r(o.getPointToTheLeft(i.focusedPoint));break;case p:r(o.getPointBelow(i.focusedPoint));break;case a:r(o.getPointAbove(i.focusedPoint))}},Su.prototype._navigateLegend=function(t){var e=this,i=this,o=i._focusState,r=i._legend,n=i.chartService.rtl;if(o.legendInFocus=!0,!o.focusedElement)return this._focusFirstLegendItem(),void t.preventDefault();var s=r.getItems().length,c=function(i){o.focusedLegendItemIndex=i(o.focusedLegendItemIndex,s),e._focusElement(e._getFocusedLegendItem()),t.preventDefault()};switch(t.key){case a:case l:c(n?tt:et);break;case p:case h:c(n?et:tt)}},Su.prototype._focusFirstPoint=function(){var t=this._focusState.focusedPoint=this._plotArea.getFirstPoint();t&&(this._focusElement(t),this._displayTooltip(t))},Su.prototype._hasFocus=function(){return this.element.ownerDocument.activeElement===this.element},Su.prototype._mousedown=function(){this._hasFocus()||(this._preventInitialPointFocus=!0)},Su.prototype._focusChart=function(){this._hasFocus()||(this._preventInitialPointFocus=!0,this.element.focus())},Su.prototype._focusPoint=function(t){this._focusState.focusedPoint=t,this._focusChart(),this._focusElement(t,!0)},Su.prototype._focusFirstLegendItem=function(){var t=this._focusState;t.focusedLegendItemIndex=0,this._focusElement(this._getFocusedLegendItem()),t.legendInFocus=!0,this._hideTooltip()},Su.prototype._focusLegendItem=function(t){var e=this._focusState;e.focusedLegendItemIndex=this._legend.getItems().findIndex((function(e){return e.options.series.index===t.seriesIndex&&e.options.pointIndex===t.pointIndex})),e.legendInFocus=!0,this._focusChart(),this._focusElement(this._getFocusedLegendItem(),!0)},Su.prototype._getFocusedLegendItem=function(){var t=this._focusState;return this._legend.getItems()[t.focusedLegendItemIndex]},Su.prototype._focusElement=function(t,e){var i=this._focusState;if(this._clearFocusedElement(),t&&(i.focusedElement=t,this._setElementActiveDescendant(t),!e))if(t.focusVisual(),i.legendInFocus){var o=t.options;this._showSeriesInactiveOpacity(o.series.index,o.pointIndex)}else this._showInactiveOpacity(t)},Su.prototype._clearFocusedElement=function(){var t=this._focusState;t&&(t.focusedElement&&t.focusedElement.clearFocusFromVisual&&(t.focusedElement.clearFocusFromVisual(),this._clearElementActiveDescendant()),t.focusedElement=null)},Su.prototype._setElementActiveDescendant=function(t){"canvas"===this.options.renderAs&&(this._pseudoFocusedElement=this._createPseudoFocusedElement(t),this.element.append(this._pseudoFocusedElement)),this.element.setAttribute(c,t._id)},Su.prototype._clearElementActiveDescendant=function(){this._pseudoFocusedElement&&(this._pseudoFocusedElement.remove(),this._pseudoFocusedElement=null),this.element.removeAttribute(c)},Su.prototype._createPseudoFocusedElement=function(t){var e=document.createElement("div"),i=t.options.accessibility;e.id=t._id,e.setAttribute("aria-label",t.getAriaLabelText()),e.setAttribute("role",i.role),e.setAttribute("aria-roledescription",i.ariaRoleDescription);var o=i.ariaChecked;return jt(o)&&e.setAttribute("aria-checked",o),e},Su.prototype._blur=function(){this._focusState.legendInFocus=!1,this._clearFocusedElement(),this._hideInactiveOpacity()},Su.prototype._startHover=function(t,e){if(this._suppressHover)return!1;var i=this._drawingChartElement(t,e,(function(t){return(t.hover||t.over)&&!(t instanceof Dp)})),o=this._activePoint;return this._updateHoveredPoint(i,e),i&&o!==i&&i.hover&&(this._activePoint=i,this._sharedTooltip()||i.hover(this,e)||(this._displayTooltip(i),this._showInactiveOpacity(i))),i},Su.prototype._displayTooltip=function(t){at({},this.options.tooltip,t.options.tooltip).visible&&(this._sharedTooltip()&&t.box?this._trackSharedTooltip(t.box.center(),{}):this._tooltip.show(t))},Su.prototype._hideTooltip=function(){this._tooltip&&this._tooltip.hide()},Su.prototype._displayInactiveOpacity=function(t,e,i){var o=this._activeChartInstance=this._chartInstanceFromPoint(t);if(o)if(e)this._updateSeriesOpacity(t),this._applySeriesOpacity(o.children,null,!0),this._applySeriesOpacity(o.children,t.series),this._highlight.show(i||t);else{var r;if(!o.supportsPointInactiveOpacity())return void this._highlight.show(t);(r=this._getInactivePoints(t,o))&&r.length&&this._highlight.show(r,this._getInactiveOpacityForSeries(t.series))}},Su.prototype._getInactivePoints=function(t,e){return this._getAllPointsOfType(e,t.constructor).filter((function(e){return e!==t}))},Su.prototype._getAllPointsOfType=function(t,e){for(var i=[],o=0;o<t.children.length;o++){var r=t.children[o];r.constructor===e?i.push(r):r.children&&r.children.length&&(i=i.concat(this._getAllPointsOfType(r,e)))}return i},Su.prototype._updateHoveredPoint=function(t,e){var i=this._hoveredPoint;i&&i!==t&&(i.out(this,e),this._hoveredPoint=null),t&&i!==t&&t.over&&(this._hoveredPoint=t,t.over(this,e))},Su.prototype._updateDrilldownPoint=function(t){t&&t.series&&on.current.bindPoint(t.series,null,t.dataItem).fields.drilldown&&(this._drilldownState={cursor:this.element.style.cursor},this.element.style.cursor="pointer")},Su.prototype._resetDrilldownPoint=function(){this._drilldownState&&(this.element.style.cursor=this._drilldownState.cursor,this._drilldownState=null)},Su.prototype._startDrilldown=function(t){if(t&&t.series){var e=t.series,i=on.current.bindPoint(e,null,t.dataItem).fields.drilldown;if(i){var o={series:e,point:t,value:i,sender:this};this.trigger("drilldown",o)}}},Su.prototype._updateSeriesOpacity=function(t,e){for(var i=this._plotArea,o=i.series.length,r=0;r<o;r++){var n=i.series[r],s=this._getDefaultOpacityForSeries(n),a=this._getInactiveOpacityForSeries(n);e||n===t.series?(n.opacity=s,n.line&&(n.line.opacity=s)):(n.defaultOpacity=s,n.opacity=a,n.line&&(n.line.opacity=a))}},Su.prototype._applySeriesOpacity=function(t,e,i,o){for(var r=0;r<t.length;r++){var n=t[r],s=n.series||o;if(s&&(s.highlight||{}).visible&&n.visual){var a=o?o.opacity:n.series.opacity;(s!==e||i)&&n.visual.opacity(i?1:a)}n.children&&n.children.length&&this._applySeriesOpacity(n.children,e,i,n.series)}},Su.prototype._chartInstanceFromPoint=function(t){for(var e=t.parent;e&&!e.plotArea;)e=e.parent;return e},Su.prototype._showInactiveOpacity=function(t){var e=this._plotArea.series.length>1;this._hasInactiveOpacity()?this._displayInactiveOpacity(t,e):this._highlight.show(t)},Su.prototype._hideInactiveOpacity=function(t){var e=this._plotArea.series.length>1;this._hasInactiveOpacity()&&(e&&this._activeChartInstance&&(this._updateSeriesOpacity(t,!0),this._applySeriesOpacity(this._activeChartInstance.children,null,!0),this._activeChartInstance=null),this._highlight&&this._highlight.hide(),this._activePoint=null)},Su.prototype._hasInactiveOpacity=function(){var t=void 0!==this.options.seriesDefaults.highlight.inactiveOpacity,e=this.options.series.filter((function(t){return void 0!==t.highlight.inactiveOpacity})).length>0;return t||e},Su.prototype._getInactiveOpacityForSeries=function(t){var e=this.options.seriesDefaults.highlight.inactiveOpacity,i=t.highlight.inactiveOpacity;return void 0!==i?i:void 0!==e?e:void 0!==t.opacity?t.opacity:1},Su.prototype._getDefaultOpacityForSeries=function(t){return t.defaultOpacity||t.opacity||1},Su.prototype._mouseover=function(t){var e,i=this._startHover(t.element,t.originalEvent);i&&i.tooltipTracking&&!this._mouseMoveTrackHandler&&!this._sharedTooltip()&&(this._mouseMoveTrackHandler=this._mouseMoveTracking.bind(this),zt(document,((e={})[mu]=this._mouseMoveTrackHandler,e)))},Su.prototype._mouseMoveTracking=function(t){var e,i=this,o=i.options,r=i._tooltip,n=i._highlight,s=i._activePoint,a=this._eventCoordinates(t);if(this._plotArea.box.containsPoint(a)){if(s&&s.tooltipTracking&&s.series&&s.parent.getNearestPoint){var p=s.parent.getNearestPoint(a.x,a.y,s.seriesIx);p&&p!==s&&(this._activePoint=p,p.hover(this,t)||(at({},o.tooltip,p.options.tooltip).visible&&r.show(p),n.show(p)))}}else Qt(document,((e={})[mu]=this._mouseMoveTrackHandler,e)),this._unsetActivePoint(),this._clearFocusedElement(),this._mouseMoveTrackHandler=null,this._hideInactiveOpacity(s)},Su.prototype._mousemove=function(t){var e=this._eventCoordinates(t),i=this._plotArea;if(this._trackCrosshairs(e),i.hover){var o=i.backgroundContainsPoint(e);o?(this._plotAreaHovered=!0,this._plotArea.hover(this,t)):this._plotAreaHovered&&!o&&(this._plotAreaHovered=!1,this.trigger(ds))}this._sharedTooltip()&&this._trackSharedTooltip(e,t)},Su.prototype._trackCrosshairs=function(t){for(var e=this._plotArea.crosshairs,i=0;i<e.length;i++){var o=e[i];o.box.containsPoint(t)?o.showAt(t):o.hide()}},Su.prototype._trackSharedTooltip=function(t,e,i){if(!this._suppressHover){var o=this,r=o.options.tooltip,n=o._plotArea,s=o._plotArea.categoryAxis,a=o._tooltip,p=o._highlight;if(n.backgroundContainsPoint(t)){var l=s.pointCategoryIndex(t);if(l!==this._tooltipCategoryIx||!this._sharedHighlight&&i){var h=n.pointsByCategoryIndex(l),c=h.map((function(t){return t.eventArgs(e)})),u=c[0]||{};u.categoryPoints=c,h.length>0&&!this.trigger(ls,u)?(r.visible&&a.showAt(h,t),p.show(h),this._sharedHighlight=!0):a.hide(),this._tooltipCategoryIx=l}else i&&this._sharedHighlight&&(p.hide(),a.hide(),this._sharedHighlight=!1)}else this._sharedHighlight&&(p.hide(),a.hide(),this._tooltipCategoryIx=null,this._sharedHighlight=!1)}},Su.prototype.hideElements=function(t){var e=this._plotArea;this._mousemoveThrottled.cancel(),e.hideCrosshairs(),this._unsetActivePoint(t)},Su.prototype._unsetActivePoint=function(t){var e=this._highlight;this._activePoint=null,this._hoveredPoint=null,t&&t.keepTooltipOpen||this._hideTooltip(),this._tooltipCategoryIx=null,this._sharedHighlight=!1,e&&e.hide()},Su.prototype._deferRedraw=function(){this._redraw()},Su.prototype._clearRedrawTimeout=function(){this._redrawTimeout&&(clearInterval(this._redrawTimeout),this._redrawTimeout=null)},Su.prototype.bindCategories=function(){for(var t=this.options,e=[].concat(t.categoryAxis),i=0;i<e.length;i++){var o=e[i];!1!==o.autoBind&&this.bindCategoryAxisFromSeries(o,i)}},Su.prototype.bindCategoryAxisFromSeries=function(t,e){var i=this,o=new Set,r=this.options.series.filter((function(i){return i.categoryAxis===t.name||!i.categoryAxis&&0===e})),n=r.some((function(t){return Boolean(t.categoryField)})),s=r.filter((function(t){return t.data&&t.data.length>0})),a=s.map((function(t){return on.current.bindPoint(t,0).fields.category})),p=a.reduce((function(e,i){return e||Js(t,i)}),!1);if(s.filter((function(t,e){return t.categoryField||jt(a[e])})).forEach((function(t){return t.data.forEach((function(e,r){var n=on.current.bindPoint(t,r).fields.category;if(p){var s=Qs(n,e,i.chartService.intl);n=s?s.getTime():void 0}o.add(n)}))})),o.size>0){var l=Array.from(o.values());p&&(l=l.sort().map((function(t){return t&&new Date(t)}))),t.categories=l}else n&&(t.categories=[])},Su.prototype._isBindable=function(t){for(var e=on.current.valueFields(t),i=!0,o=0;o<e.length;o++){var r=e[o];if(r===z?r="field":r+="Field",!jt(t[r])){i=!1;break}}return i},Su.prototype._noTransitionsRedraw=function(){var t,e=this.options;!1!==e.transitions&&(t=e.transitions,e.transitions=!1),this._redraw(),t&&(e.transitions=t)},Su.prototype._legendItemHover=function(t,e){this._showSeriesInactiveOpacity(t,e)},Su.prototype._showSeriesInactiveOpacity=function(t,e){var i,o=this._plotArea,r=this._highlight,n=(o.srcSeries||o.series)[t];if(i=Ct(n.type,[Rn,Tn,Mn,On])?o.findPoint((function(i){return i.series.index===t&&i.index===e})):o.pointsBySeriesIndex(t),this._hasInactiveOpacity()&&n.visible&&i){var s=o.series.length>1,a=i.length?i[0]:i;this._displayInactiveOpacity(a,s,i)}else r.show(i)},Su.prototype._shouldAttachMouseMove=function(){return this._plotArea.crosshairs.length||this._tooltip&&this._sharedTooltip()||this.requiresHandlers([us,ds])},Su.prototype.updateMouseMoveHandler=function(){var t,e;Qt(this.element,((t={})[mu]=this._mousemoveThrottled,t)),this._shouldAttachMouseMove()&&zt(this.element,((e={})[mu]=this._mousemoveThrottled,e))},Su.prototype.applyTheme=function(t){var e=this,i=Object.assign({},this._originalOptions);requestAnimationFrame((function(){e.applyOptions(i,t),e.noTransitionsRedraw()}))},Su.prototype.applyOptions=function(t,e){Ou(this._originalOptions,t),this._originalOptions=at(this._originalOptions,t),this.options=at({},this._originalOptions),e&&(this._theme=e,this.chartService.theme=e),this._initTheme(this.options,this._theme),this._toggleDragZoomEvents()},Su.prototype.setOptions=function(t,e){this.applyOptions(t,e),this.bindCategories(),this.redraw(),this.updateMouseMoveHandler(),this._restoreOverlayElement(),this._initStyleObserver()},Su.prototype.setDirection=function(t){this.chartService.rtl=Boolean(t),this.surface&&"svg"===this.surface.type&&this._destroySurface()},Su.prototype.setIntlService=function(t){this.chartService.intl=t},Su.prototype.noTransitionsRedraw=function(){this._noTransitionsRedraw()},Su.prototype.destroy=function(){var t,e;this._destroyed=!0,Qt(this.element,((t={})[xu]=this._clickHandler,t[Bs]=this._mousewheelHandler,t[mu]=this._mousemoveThrottled,t[bu]=this._mouseleaveHandler,t[vu]=this._mousedownHandler,t[_u]=this._keydownHandler,t[wu]=this._focusHandler,t[ku]=this._blurHandler,t)),this.domEvents&&(this.domEvents.destroy(),delete this.domEvents),this._mouseMoveTrackHandler&&Qt(document,((e={})[mu]=this._mouseMoveTrackHandler,e)),this._focusState=null,this.element._kendoExportVisual=null,this._destroyView(),this._destroySurface(),this._clearRedrawTimeout(),this._destroyStyleObserver()},Su.prototype._destroySurface=function(){var t=this.surface;t&&(t.unbind("mouseenter",this._surfaceMouseenterHandler),t.unbind("mouseleave",this._surfaceMouseleaveHandler),t.destroy(),this.surface=null)},Su.prototype._destroySelections=function(){var t=this._selections;if(t)for(;t.length>0;)t.shift().destroy()},Su.prototype._destroyView=function(){var t=this._model;t&&(t.destroy(),this._model=null),this._unsetActivePoint(),this._clearFocusedElement(),this._resetDrilldownPoint(),this._destroySelections(),this._tooltip&&this._tooltip.destroy(),this._highlight&&this._highlight.destroy(),this._zoomSelection&&(this._zoomSelection.destroy(),delete this._zoomSelection),this._pannable&&(this._pannable.destroy(),delete this._pannable),this._mousewheelZoom&&(this._mousewheelZoom.destroy(),delete this._mousewheelZoom)};var Mu=["data","categories"];function Ou(t,e){for(var i in e)if(!Ct(i,Mu)&&Ae(e,i)){var o=e[i],r=t[i];if(jt(r)){var n=null===o;n||!jt(o)?(delete t[i],n&&delete e[i]):r&&pt(o)&&pt(r)&&Ou(r,o)}}}function Lu(t){for(var e=0;e<t.length;e++)t[e].notifyRender()}te(Su,{renderAs:"",chartArea:{},legend:{visible:!0,labels:{},accessibility:{},focusHighlight:{border:{opacity:1,color:u,width:2}}},categoryAxis:{},seriesDefaults:{type:Pn,data:[],highlight:{visible:!0},labels:{},negativeValues:{visible:!1},accessibility:{},focusHighlight:{border:{opacity:1,width:2},zIndex:200}},series:[],seriesColors:null,tooltip:{visible:!1},transitions:!0,observeStyles:!1,valueAxis:{narrowRange:!1},plotArea:{},title:{},xAxis:{},yAxis:{},panes:[{}],pannable:!1,zoomable:!1});const Bu=Su;var Iu=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._slotAnchor=function(t,e){var i=this.plotArea.categoryAxis.options.vertical,o=i?{horizontal:"left",vertical:"center"}:{horizontal:"center",vertical:"bottom"};return{point:i?new xi(this.plotArea.box.x2,e.center().y):new xi(e.center().x,-2),align:o}},e.prototype._defaultAnchor=function(t,e){return this._slotAnchor({},e)},e}(fh);const Eu=Iu;var Ru=[wn,Sn];function Vu(t){for(var e=[],i=0;i<t.length;i++){var o=t[i];e[i]=o.style.display,o.style.display="none"}return e}function zu(t,e){for(var i=0;i<t.length;i++)t[i].style.display=e[i]}function ju(t){return K(t)?[t]:t}var Du=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._setElementClass=function(t){W(t,"k-sparkline")},e.prototype._initElement=function(e){t.prototype._initElement.call(this,e),this._initialWidth=Math.floor(Ht(e).width)},e.prototype._resize=function(){var e=this.element,i=Vu(e.childNodes);this._initialWidth=Math.floor(Ht(e).width),zu(e.childNodes,i),t.prototype._resize.call(this)},e.prototype._modelOptions=function(){var t=this.options,e=this._surfaceWrap(),i=Vu(e.childNodes),o=document.createElement("span");o.innerHTML=" ",e.appendChild(o);var r=at({width:this._autoWidth,height:Ht(e).height,transitions:t.transitions},t.chartArea,{inline:!0,align:!1});return Ht(e,{width:r.width,height:r.height}),e.removeChild(o),zu(e.childNodes,i),this.surface&&this.surface.resize(),r},e.prototype._surfaceWrap=function(){if(!this.stage){var t=this.stage=document.createElement("span");this.element.appendChild(t)}return this.stage},e.prototype._createPlotArea=function(e){var i=t.prototype._createPlotArea.call(this,e);return this._autoWidth=this._initialWidth||this._calculateWidth(i),i},e.prototype._calculateWidth=function(t){for(var e=this.options,i=dt(e.chartArea.margin),o=t.charts,r=this._surfaceWrap(),n=0,s=0;s<o.length;s++){var a=o[s],p=(a.options.series||[])[0];if(p){if(p.type===wn)return 150;if(p.type===Sn)return 150;if(p.type===Rn)return Ht(r).height;var l=a.categoryAxis;if(l){var h=l.categoriesCount()*(!a.options.isStacked&&Ct(p.type,[Pn,Zn])?a.seriesOptions.length:1);n=Math.max(n,h)}}}var c=n*e.pointWidth;return c>0&&(c+=i.left+i.right),c},e.prototype._createSharedTooltip=function(t){return new Eu(this._plotArea,t)},e.normalizeOptions=function(t){var e=ju(t);return(e=G(e)?{seriesDefaults:{data:e}}:at({},e)).series||(e.series=[{data:ju(e.data)}]),at(e,{seriesDefaults:{type:e.type}}),(Ct(e.series[0].type,Ru)||Ct(e.seriesDefaults.type,Ru))&&(e=at({},{categoryAxis:{crosshair:{visible:!1}}},e)),e},e}(Bu);te(Du,{chartArea:{margin:2},axisDefaults:{visible:!1,majorGridLines:{visible:!1},valueAxis:{narrowRange:!0}},seriesDefaults:{type:"line",area:{line:{width:.5}},bar:{stack:!0},padding:2,width:.5,overlay:{gradient:null},highlight:{visible:!1},border:{width:0},markers:{size:2,visible:!1}},tooltip:{visible:!0,shared:!0},categoryAxis:{crosshair:{visible:!0,tooltip:{visible:!1}}},legend:{visible:!1},transitions:!1,pointWidth:5,panes:[{clip:!1}]});const Fu=Du,Hu=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.setup=function(){this._initialOpacity=parseFloat(ut(this.element,"opacity").opacity)},e.prototype.step=function(t){ut(this.element,{opacity:String(Pt(this._initialOpacity,0,t))})},e.prototype.abort=function(){t.prototype.abort.call(this),ut(this.element,{display:"none",opacity:String(this._initialOpacity)})},e.prototype.cancel=function(){t.prototype.abort.call(this),ut(this.element,{opacity:String(this._initialOpacity)})},e}(q.drawing.Animation);function Nu(t,e){var i=document.createElement("div");return i.className=t,e&&(i.style.cssText=e),i}var Uu=function(t,e,i){this.options=at({},this.options,i),this.container=t,this.chartService=e;var o=ut(t,["paddingLeft","paddingTop"]);this.chartPadding={top:o.paddingTop,left:o.paddingLeft},this.createElements(),t.appendChild(this.element)};Uu.prototype.createElements=function(){var t=this.element=Nu("k-navigator-hint","display: none; position: absolute; top: 1px; left: 1px;"),e=this.tooltip=Nu("k-tooltip k-chart-tooltip"),i=this.scroll=Nu("k-scroll");e.innerHTML=" ",t.appendChild(e),t.appendChild(i)},Uu.prototype.show=function(t,e,i){var o=this,r=o.element,n=o.options,s=o.scroll,a=o.tooltip,p=Uo(Qo(t)+Qo(e-t)/2),l=.4*i.width(),h=i.center().x-l,c=(i.center().x-h)/(n.max-n.min),u=p-n.min,d=this.chartService.intl.format(n.format,t,e),f=vt(n);this.clearHideTimeout(),this._visible||(ut(r,{visibility:"hidden",display:"block"}),this._visible=!0),f&&(d=f({from:t,to:e})),a.innerHTML=d,ut(a,{left:i.center().x-a.offsetWidth/2,top:i.y1});var g=ut(a,["marginTop","borderTopWidth","height"]);ut(s,{width:l,left:h+u*c,top:i.y1+g.marginTop+g.borderTopWidth+g.height/2}),ut(r,{visibility:"visible"})},Uu.prototype.clearHideTimeout=function(){this._hideTimeout&&clearTimeout(this._hideTimeout),this._hideAnimation&&this._hideAnimation.cancel()},Uu.prototype.hide=function(){var t=this;this.clearHideTimeout(),this._hideTimeout=setTimeout((function(){t._visible=!1,t._hideAnimation=new Hu(t.element),t._hideAnimation.setup(),t._hideAnimation.play()}),this.options.hideDelay)},Uu.prototype.destroy=function(){this.clearHideTimeout(),this.container&&this.container.removeChild(this.element),delete this.container,delete this.chartService,delete this.element,delete this.tooltip,delete this.scroll},te(Uu,{format:"{0:d} - {1:d}",hideDelay:500});const Gu=Uu;var Wu="_navigator",Xu=Wu,Yu="_default",qu=function(t){var e;this.chart=t;var i=this.options=at({},this.options,t.options.navigator),o=i.select;o&&(o.from=this.parseDate(o.from),o.to=this.parseDate(o.to)),jt(i.hint.visible)||(i.hint.visible=i.visible),this.chartObserver=new Ot(this,((e={})[fs]="_drag",e[gs]="_dragEnd",e[ms]="_zoom",e[xs]="_zoomEnd",e)),t.addObserver(this.chartObserver)};function Zu(){}qu.prototype.parseDate=function(t){return er(this.chart.chartService.intl,t)},qu.prototype.clean=function(){this.selection&&(this.selection.destroy(),this.selection=null),this.hint&&(this.hint.destroy(),this.hint=null)},qu.prototype.destroy=function(){this.chart&&(this.chart.removeObserver(this.chartObserver),delete this.chart),this.clean()},qu.prototype.redraw=function(){this._redrawSelf(),this.initSelection()},qu.prototype.initSelection=function(){var t,e=this.chart,i=this.options,o=this.mainAxis(),r=o.roundedRange(),n=r.min,s=r.max,a=i.select,p=a.from,l=a.to,h=a.mousewheel,c=(t=o,Zu.prototype=t,new Zu);0!==o.categoriesCount()&&(this.clean(),c.box=o.box,this.selection=new hh(e,c,{min:n,max:s,from:p||n,to:l||s,mousewheel:Kt(h,{zoom:"left"}),visible:i.visible},new Ot(this,{selectStart:"_selectStart",select:"_select",selectEnd:"_selectEnd"})),i.hint.visible&&(this.hint=new Gu(e.element,e.chartService,{min:n,max:s,template:vt(i.hint),format:i.hint.format})))},qu.prototype.setRange=function(){var t=this.chart._createPlotArea(!0).namedCategoryAxes[Xu].roundedRange(),e=t.min,i=t.max,o=this.options.select||{},r=o.from||e;r<e&&(r=e);var n=o.to||i;n>i&&(n=i),this.options.select=at({},o,{from:r,to:n}),this.filterAxes()},qu.prototype._redrawSelf=function(t){var e=this.chart._plotArea;e&&e.redraw(Wt(e.panes),t)},qu.prototype.redrawSlaves=function(){var t=this.chart,e=t._plotArea,i=e.panes.filter((function(t){return t.options.name!==Wu}));e.srcSeries=t.options.series,e.options.categoryAxis=t.options.categoryAxis,e.clearSeriesPointsCache(),e.redraw(i)},qu.prototype._drag=function(t){var e,i=this.chart,o=this.selection,r=i._eventCoordinates(t.originalEvent),n=this.mainAxis(),s=n.roundedRange(),a=n.pane.box.containsPoint(r),p=i._plotArea.categoryAxis,l=t.axisRanges[p.options.name],h=this.options.select;if(l&&!a&&o){e=h.from&&h.to?Qo(h.to)-Qo(h.from):Qo(o.options.to)-Qo(o.options.from);var c=Uo(Xt(Qo(l.min),s.min,Qo(s.max)-e)),u=Uo(Xt(Qo(c)+e,Qo(s.min)+e,s.max));this.options.select={from:c,to:u},this.options.liveDrag&&(this.filterAxes(),this.redrawSlaves()),o.set(c,u),this.showHint(c,u)}},qu.prototype._dragEnd=function(){this.filterAxes(),this.filter(),this.redrawSlaves(),this.hint&&this.hint.hide()},qu.prototype.readSelection=function(){var t=this.selection.options,e=t.from,i=t.to,o=this.options.select;o.from=e,o.to=i},qu.prototype.filterAxes=function(){var t=this.options.select;void 0===t&&(t={});for(var e=this.chart.options.categoryAxis,i=t.from,o=t.to,r=0;r<e.length;r++){var n=e[r];n.pane!==Wu&&(n.min=i,n.max=o)}},qu.prototype.filter=function(){var t=this.chart,e=this.options.select;if(t.requiresHandlers(["navigatorFilter"])){var i=this.mainAxis(),o={from:e.from,to:e.to};if("category"!==i.options.type){var r=new fr(at({baseUnit:"fit"},t.options.categoryAxis[0],{categories:[e.from,e.to]}),t.chartService).options;o.from=Wo(r.min,-r.baseUnitStep,r.baseUnit),o.to=Wo(r.max,r.baseUnitStep,r.baseUnit)}this.chart.trigger("navigatorFilter",o)}},qu.prototype._zoom=function(t){var e=this,i=e.chart._plotArea.categoryAxis,o=e.selection,r=e.options,n=r.select,s=r.liveDrag,a=this.mainAxis(),p=t.delta;if(o){var l=a.categoryIndex(o.options.from),h=a.categoryIndex(o.options.to),c=this.chart._eventCoordinates(t.originalEvent);t.originalEvent.preventDefault(),Math.abs(p)>1&&(p*=3),h-l>1?(o.zoom(p,c),this.readSelection()):(i.options.min=n.from,n.from=i.scaleRange(-t.delta*this.chart._mousewheelZoomRate(),c).min),s&&(this.filterAxes(),this.redrawSlaves()),o.set(n.from,n.to),this.showHint(this.options.select.from,this.options.select.to)}},qu.prototype._zoomEnd=function(t){this._dragEnd(t)},qu.prototype.showHint=function(t,e){var i=this.chart._plotArea;this.hint&&this.hint.show(t,e,i.backgroundBox())},qu.prototype._selectStart=function(t){return this.chart._selectStart(t)},qu.prototype._select=function(t){return this.showHint(t.from,t.to),this.chart._select(t)},qu.prototype._selectEnd=function(t){return this.hint&&this.hint.hide(),this.readSelection(),this.filterAxes(),this.filter(),this.redrawSlaves(),this.chart._selectEnd(t)},qu.prototype.mainAxis=function(){var t=this.chart._plotArea;if(t)return t.namedCategoryAxes[Xu]},qu.prototype.select=function(t,e){var i=this.options.select;return t&&e&&(i.from=this.parseDate(t),i.to=this.parseDate(e),this.filterAxes(),this.filter(),this.redrawSlaves(),this.selection.set(t,e)),{from:i.from,to:i.to}},qu.setup=function(t,e){if(void 0===t&&(t={}),void 0===e&&(e={}),!t.__navi){t.__navi=!0;var i=at({},e.navigator,t.navigator),o=t.panes=[].concat(t.panes),r=at({},i.pane,{name:Wu});i.visible||(r.visible=!1,r.height=.1),"top"!==t.navigator.position?o.push(r):o.unshift(r),o.forEach((function(t){t.name=t.name||Yu})),qu.attachAxes(t,i),qu.attachSeries(t,i,e)}},qu.attachAxes=function(t,e){var i=e.series||[],o=t.categoryAxis=[].concat(t.categoryAxis),r=t.valueAxis=[].concat(t.valueAxis);o.concat(r).forEach((function(t){t.pane=t.pane||Yu}));var n=0===qs(i,Jn).length,s=at({type:"date",pane:Wu,roundToBaseUnit:!n,justified:n,_collapse:!1,majorTicks:{visible:!0},tooltip:{visible:!1},labels:{step:1},autoBind:e.autoBindElements,autoBaseUnitSteps:{minutes:[1],hours:[1,2],days:[1,2],weeks:[],months:[1],years:[1]}}),a=e.categoryAxis;o.push(at({},s,{maxDateGroups:200},a,{name:Xu,title:null,baseUnit:"fit",baseUnitStep:"auto",labels:{visible:!1},majorTicks:{visible:!1}}),at({},s,a,{name:Xu+"_labels",maxDateGroups:20,baseUnitStep:"auto",labels:{position:""},plotBands:[],autoBaseUnitSteps:{minutes:[]},_overlap:!0}),at({},s,a,{name:Xu+"_ticks",maxDateGroups:200,majorTicks:{width:.5},plotBands:[],title:null,labels:{visible:!1,mirror:!0},_overlap:!0})),r.push(at({name:Xu,pane:Wu,majorGridLines:{visible:!1},visible:!1},e.valueAxis))},qu.attachSeries=function(t,e,i){for(var o=t.series=t.series||[],r=[].concat(e.series||[]),n=i.seriesColors,s=e.seriesDefaults,a=0;a<r.length;a++)o.push(at({color:n[a%n.length],categoryField:e.dateField,visibleInLegend:!1,tooltip:{visible:!1}},s,r[a],{axis:Xu,categoryAxis:Xu,autoBind:e.autoBindElements}))};const Qu=qu;var Ku=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.applyDefaults=function(e,i){var o=Ht(this.element).width||600,r=i,n={seriesDefaults:{categoryField:e.dateField},axisDefaults:{categoryAxis:{name:"default",majorGridLines:{visible:!1},labels:{step:2},majorTicks:{visible:!1},maxDateGroups:Math.floor(o/28)}}};r&&(r=at({},r,n)),Qu.setup(e,r),t.prototype.applyDefaults.call(this,e,r)},e.prototype._setElementClass=function(t){W(t,"k-chart k-stockchart")},e.prototype.setOptions=function(e){this.destroyNavigator(),t.prototype.setOptions.call(this,e)},e.prototype.noTransitionsRedraw=function(){var t=this.options.transitions;this.options.transitions=!1,this._fullRedraw(),this.options.transitions=t},e.prototype._resize=function(){this.noTransitionsRedraw()},e.prototype._redraw=function(){var t=this.navigator;!this._dirty()&&t&&t.options.partialRedraw?t.redrawSlaves():this._fullRedraw()},e.prototype._dirty=function(){var t=this.options,e=[].concat(t.series,t.navigator.series),i=wt(e,(function(t){return t&&t.visible})).length,o=this._seriesCount!==i;return this._seriesCount=i,o},e.prototype._fullRedraw=function(){var e=this.navigator;e||(e=this.navigator=new Qu(this),this.trigger("navigatorCreated",{navigator:e})),e.clean(),e.setRange(),t.prototype._redraw.call(this),e.initSelection()},e.prototype._trackSharedTooltip=function(e){var i=this._plotArea.paneByPoint(e);i&&i.options.name===Wu?this._unsetActivePoint():t.prototype._trackSharedTooltip.call(this,e)},e.prototype.bindCategories=function(){t.prototype.bindCategories.call(this),this.copyNavigatorCategories()},e.prototype.copyNavigatorCategories=function(){for(var t,e=[].concat(this.options.categoryAxis),i=0;i<e.length;i++){var o=e[i];o.name===Xu?t=o.categories:t&&o.pane===Wu&&(o.categories=t)}},e.prototype.destroyNavigator=function(){this.navigator&&(this.navigator.destroy(),this.navigator=null)},e.prototype.destroy=function(){this.destroyNavigator(),t.prototype.destroy.call(this)},e.prototype._stopChartHandlers=function(e){var i=this._eventCoordinates(e),o=this._plotArea.paneByPoint(i);return t.prototype._stopChartHandlers.call(this,e)||o&&o.options.name===Wu},e.prototype._toggleDragZoomEvents=function(){this._dragZoomEnabled||(this.element.style.touchAction="none",this._dragZoomEnabled=!0)},e}(Bu);te(Ku,{dateField:"date",axisDefaults:{categoryAxis:{type:"date",baseUnit:"fit",justified:!0},valueAxis:{narrowRange:!0,labels:{format:"C"}}},navigator:{select:{},seriesDefaults:{markers:{visible:!1},tooltip:{visible:!1},highlight:{visible:!1},line:{width:2}},hint:{},visible:!0},tooltip:{visible:!0},legend:{visible:!1}});const $u=Ku;var Ju=150,td="arrowPointer",ed="barPointer",id=.5,od=Math.PI/180,rd="inside",nd="linear",sd="outside",ad="radialPointer",pd="radialRangePointer";function ld(t,e){var i=t.getOrigin(),o=t.getSize(),r=dt(e);return t.setOrigin([i.x-r.left,i.y-r.top]),t.setSize([o.width+(r.left+r.right),o.height+(r.top+r.bottom)]),t}var hd=q.drawing.Group,cd=q.drawing.Path,ud=q.drawing.Text;function dd(t,e){var i=t.box,o=t.children[0].box,r=e.border||{},n=e.background||"",s=cd.fromRect(new q.geometry.Rect([i.x1,i.y1],[i.width(),i.height()]),{stroke:{}}),a=new ud(t.text,new q.geometry.Point(o.x1,o.y1),{font:e.font,fill:{color:e.color}}),p=ld(a.bbox().clone(),e.padding),l=cd.fromRect(p,{stroke:{color:r.width?r.color:"",width:r.width,opacity:r.opacity,dashType:r.dashType,lineJoin:"round",lineCap:"round"},fill:{color:n}}),h=new hd;return h.append(s),h.append(l),h.append(a),h}function fd(t,e,i){var o=jt(t.from)?t.from:T,r=jt(t.to)?t.to:P;return t.from=Math.max(Math.min(r,o),e),t.to=Math.min(Math.max(r,o),i),t}function gd(t,e){var i=dt(e);return i.left=-i.left,i.top=-i.top,i.right=-i.right,i.bottom=-i.bottom,ld(t,i)}var yd=q.drawing.Path,vd=q.drawing.Surface,md=function(t,e,i,o){void 0===o&&(o={}),this.element=t,this.theme=i,this.contextService=new mo(this,o),this._originalOptions=at({},this.options,e),this.options=at({},this._originalOptions),this._initTheme(i),this.redraw()};md.prototype.destroy=function(){this.surface&&(this.surface.destroy(),this.surface=null),delete this.element,delete this.surfaceElement},md.prototype.value=function(t){var e=this.pointers[0];if(0===arguments.length)return e.value();e.value(t),this._setValueOptions(t)},md.prototype._draw=function(){var t=this.surface;t.clear(),t.draw(this._visuals)},md.prototype.exportVisual=function(){return this._visuals},md.prototype.allValues=function(t){var e=this.pointers,i=[];if(0===arguments.length){for(var o=0;o<e.length;o++)i.push(e[o].value());return i}if(G(t))for(var r=0;r<t.length;r++)K(t[r])&&e[r].value(t[r]);this._setValueOptions(t)},md.prototype._setValueOptions=function(t){for(var e=[].concat(this.options.pointer),i=[].concat(t),o=0;o<i.length;o++)e[o].value=i[o]},md.prototype.resize=function(){this.noTransitionsRedraw()},md.prototype.noTransitionsRedraw=function(){var t=this.options.transitions;this._toggleTransitions(!1),this.redraw(),this._toggleTransitions(t)},md.prototype.redraw=function(){var t=this._surfaceSize(),e=new q.geometry.Rect([0,0],[t.width,t.height]);this._initSurface(),this.gaugeArea=this._createGaugeArea(),this._createModel();var i=gd(e.bbox(),this._gaugeAreaMargin);this.reflow(i)},md.prototype.setOptions=function(t,e){this._originalOptions=at(this._originalOptions,t),this.options=at({},this._originalOptions),this._initTheme(e),this.redraw()},md.prototype.setDirection=function(t){this.contextService.rtl=Boolean(t),this.surface&&"svg"===this.surface.type&&(this.surface.destroy(),this.surface=null)},md.prototype.setIntlService=function(t){this.contextService.intl=t},md.prototype._initTheme=function(t){var e=t||this.theme||{};this.theme=e,this.options=at({},e,this.options);var i=this.options,o=i.pointer;if(G(o)){for(var r=[],n=0;n<o.length;n++)r.push(at({},e.pointer,o[n]));i.pointer=r}},md.prototype._createGaugeArea=function(){var t=this.options.gaugeArea,e=this.surface.size(),i=t.border||{},o=new q.geometry.Rect([0,0],[e.width,e.height]);return this._gaugeAreaMargin=t.margin||5,i.width>0&&(o=gd(o,i.width)),yd.fromRect(o,{stroke:{color:i.width?i.color:"",width:i.width,opacity:i.opacity,dashType:i.dashType,lineJoin:"round",lineCap:"round"},fill:{color:t.background}})},md.prototype._initSurface=function(){var t=this.options,e=this.surface,i=this._surfaceElement(),o=this._surfaceSize();Ht(i,o),e&&e.options.type===t.renderAs?(this.surface.clear(),this.surface.resize()):(e&&e.destroy(),this.surface=vd.create(i,{type:t.renderAs}))},md.prototype._surfaceSize=function(){var t=this.options,e=this._getSize();return t.gaugeArea&&at(e,t.gaugeArea),e},md.prototype._surfaceElement=function(){return this.surfaceElement||(this.surfaceElement=document.createElement("div"),this.element.appendChild(this.surfaceElement)),this.surfaceElement},md.prototype.getSize=function(){return this._getSize()},md.prototype._getSize=function(){var t=this.element,e=this._defaultSize(),i=t.offsetWidth,o=t.offsetHeight;return i||(i=e.width),o||(o=e.height),{width:i,height:o}},md.prototype._defaultSize=function(){return{width:200,height:200}},md.prototype._toggleTransitions=function(t){this.options.transitions=t;for(var e=0;e<this.pointers.length;e++)this.pointers[e].options.animation.transitions=t},te(md,{plotArea:{},theme:"default",renderAs:"",pointer:{},scale:{},gaugeArea:{}});const xd=md;var bd=q.drawing.Path,_d=q.drawing.Group,wd=q.geometry.Point;function kd(t,e){var i,o,r=t.position,n=t.tickX,s=t.tickY;return t.vertical?(i=new wd(n,r),o=new wd(n+e.size,r)):(i=new wd(r,s),o=new wd(r,s+e.size)),new bd({stroke:{color:e.color,width:e.width}}).moveTo(i).lineTo(o)}function Ad(t,e,i,o){var r=e.length;if(o.visible)for(var n=i.mirror,s=i.lineBox,a=o.skip;a<r;a+=o.step)a%o.skipUnit!=0&&(i.tickX=n?s.x2:s.x2-o.size,i.tickY=n?s.y1-o.size:s.y1,i.position=e[a],t.append(kd(i,o)))}var Sd=function(t){function e(e,i){var o=e||{};!jt(o.reverse)&&!1===o.vertical&&(i||{}).rtl&&(o=Object.assign({},o,{reverse:!0})),t.call(this,0,1,o,i),this.options.minorUnit=this.options.minorUnit||this.options.majorUnit/10}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initUserOptions=function(t){var e=at({},this.options,t);return(e=at({},e,{labels:{mirror:e.mirror}})).majorUnit=e.majorUnit||vi(e.min,e.max),e},e.prototype.initFields=function(){},e.prototype.render=function(){var t=this.elements=new _d,e=this.renderLabels(),i=this.renderLine(),o=this.renderTicks(),r=this.renderRanges();return t.append(i,e,o,r),t},e.prototype.renderRanges=function(){for(var t=this.options,e=t.min,i=t.max,o=t.vertical,r=t.labels.mirror,n=t.ranges||[],s=new _d,a=n.length,p=t.rangeSize||t.minorTicks.size/2,l=0;l<a;l++){var h=fd(n[l],e,i),c=this.getSlot(h.from,h.to),u=o?this.lineBox():c,d=o?c:this.lineBox();o?u.x1-=p*(r?-1:1):d.y2+=p*(r?-1:1),s.append(bd.fromRect(new q.geometry.Rect([u.x1,d.y1],[u.x2-u.x1,d.y2-d.y1]),{fill:{color:h.color,opacity:h.opacity},stroke:{}}))}return s},e.prototype.renderLabels=function(){for(var t=this.labels,e=this.options,i=new _d,o=0;o<t.length;o++)i.append(dd(t[o],e.labels));return i},e.prototype.renderLine=function(){var t=this.options.line,e=this.lineBox(),i=new _d;if(t.width>0&&t.visible){var o=new bd({stroke:{color:t.color,dashType:t.dashType,width:t.width}});o.moveTo(e.x1,e.y1).lineTo(e.x2,e.y2),i.append(o)}return i},e.prototype.renderTicks=function(){var t=new _d,e=this.options,i=e.majorTicks.visible?e.majorUnit:0,o={vertical:e.vertical,mirror:e.labels.mirror,lineBox:this.lineBox()};return Ad(t,this.getMajorTickPositions(),o,e.majorTicks),Ad(t,this.getMinorTickPositions(),o,at({},{skipUnit:i/e.minorUnit},e.minorTicks)),t},e}(_r);te(Sd,{min:0,max:50,majorTicks:{size:15,align:rd,color:u,width:id,visible:!0},minorTicks:{size:10,align:rd,color:u,width:id,visible:!0},line:{width:id},labels:{position:rd,padding:2},mirror:!1,_alignLines:!1});const Cd=Sd;var Pd=function(t,e){var i=t.options,o=i.min,r=i.max,n=this.options=at({},this.options,e);n.fill=n.color,this.scale=t,jt(n.value)?n.value=Xt(n.value,o,r):n.value=o};Pd.prototype.value=function(t){var e=this.options,i=e.value;if(0===arguments.length)return i;var o=this.scale.options,r=o.min,n=o.max;e._oldValue=jt(e._oldValue)?e.value:r,e.value=Xt(t,r,n),this.elements&&this.repaint()},te(Pd,{color:u});const Td=Pd;var Md=function(t){function e(e,i){t.call(this,e,i),this.options=at({track:{visible:jt(i.track)}},this.options)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reflow=function(){var t,e,i,o=this.options,r=this.scale,n=r.options,s=n.mirror,a=n.vertical,p=r.lineBox(),l=o.track.size||o.size,h=o.size/2,c=dt(o.margin),u=a?c[s?"left":"right"]:c[s?"bottom":"top"];u=s?-u:u,a?(i=new wi(p.x1+u,p.y1,p.x1+u,p.y2),s?i.x1-=l:i.x2+=l,o.shape!==ed&&(t=e=new wi(p.x2+u,p.y1-h,p.x2+u,p.y2+h))):(i=new wi(p.x1,p.y1-u,p.x2,p.y1-u),s?i.y2+=l:i.y1-=l,o.shape!==ed&&(t=e=new wi(p.x1-h,p.y1-u,p.x2+h,p.y1-u))),this.trackBox=i,this.pointerRangeBox=e,this.box=t||i.clone().pad(o.border.width)},e.prototype.getElementOptions=function(){var t=this.options;return{fill:{color:t.color,opacity:t.opacity},stroke:jt(t.border)?{color:t.border.width?t.border.color||t.color:"",width:t.border.width,dashType:t.border.dashType,opacity:t.opacity}:null}},e.prototype._margin=function(){var t=this.scale,e=this.options,i=t.options,o=i.mirror,r=i.vertical,n=dt(e.margin);return r?n[o?"left":"right"]:n[o?"bottom":"top"]},e}(Td);te(Md,{shape:ed,track:{border:{width:1}},color:u,border:{width:1},opacity:1,margin:dt(3),animation:{type:ed},visible:!0});const Od=Md;var Ld=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.setup=function(){var t=this.options,e=t.margin,i=t.from,o=t.to,r=t.vertical,n=r?"x1":"y1";t.mirror===r?(i[n]-=e,o[n]-=e):(i[n]+=e,o[n]+=e);var s=this.fromScale=new q.geometry.Point(i.x1,i.y1),a=this.toScale=new q.geometry.Point(o.x1,o.y1);0!==t.duration&&(t.duration=Math.max(s.distanceTo(a)/t.duration*1e3,1))},e.prototype.step=function(t){var e=Pt(this.fromScale.x,this.toScale.x,t),i=Pt(this.fromScale.y,this.toScale.y,t);this.element.transform(q.geometry.transform().translate(e,i))},e}(q.drawing.Animation);te(Ld,{easing:nd,duration:250}),q.drawing.AnimationFactory.current.register(td,Ld);const Bd=Ld;var Id=q.geometry.Point,Ed=q.drawing.Path,Rd=function(t){function e(e,i){t.call(this,e,i),jt(this.options.size)||(this.options.size=.6*this.scale.options.majorTicks.size)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.pointerShape=function(){var t=this.scale,e=this.options.size,i=e/2,o=t.options.mirror?-1:1;return t.options.vertical?[new Id(0,0-i),new Id(0-o*e,0),new Id(0,0+i)]:[new Id(0-i,0),new Id(0,0+o*e),new Id(0+i,0)]},e.prototype.repaint=function(){var t=this.scale,e=this.options,i=new Bd(this.elements,at(e.animation,{vertical:t.options.vertical,mirror:t.options.mirror,margin:this._margin(e.margin),from:t.getSlot(e._oldValue),to:t.getSlot(e.value)}));!1===e.animation.transitions&&(i.options.duration=0),i.setup(),i.play()},e.prototype.render=function(){var t=this.scale,e=this.options,i=this.getElementOptions(),o=this.pointerShape(e.value);e.animation.type=td;var r=new Ed({stroke:i.stroke,fill:i.fill}).moveTo(o[0]).lineTo(o[1]).lineTo(o[2]).close(),n=t.getSlot(e.value);return r.transform(q.geometry.transform().translate(n.x1,n.y1)),this.elements=r,r},e}(Od);const Vd=Rd;var zd=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.setup=function(){var t=this.options,e=this.axis=t.vertical?H:F,i=this.to=t.newPoints[0][e],o=this.from=t.oldPoints[0][e];0!==t.duration&&(t.duration=Math.max(Math.abs(i-o)/t.speed*1e3,1)),this._set(o)},e.prototype.step=function(t){var e=Pt(this.from,this.to,t);this._set(e)},e.prototype._set=function(t){var e="set"+this.axis.toUpperCase(),i=this.options.newPoints;i[0][e](t),i[1][e](t)},e}(q.drawing.Animation);te(zd,{easing:nd,speed:250}),q.drawing.AnimationFactory.current.register(ed,zd);const jd=zd;var Dd=q.drawing.Group,Fd=q.drawing.Path,Hd=function(t){function e(e,i){t.call(this,e,i),jt(this.options.size)||(this.options.size=.3*this.scale.options.majorTicks.size)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.pointerShape=function(t){var e=this.scale,i=this.options,o=e.options,r=o.mirror,n=o.vertical,s=r===n?-1:1,a=i.size*s,p=e.getSlot(e.options.min),l=e.getSlot(t),h=n?H:F,c=n?F:H,u=this._margin()*s,d=new q.geometry.Point;d[h]=p[h+"1"],d[c]=p[c+"1"];var f=new q.geometry.Point;f[h]=l[h+"1"],f[c]=l[c+"1"],n?(d.translate(u,0),f.translate(u,0)):(d.translate(0,u),f.translate(0,u));var g=f.clone(),y=d.clone();return n?(g.translate(a,0),y.translate(a,0)):(g.translate(0,a),y.translate(0,a)),[d,f,g,y]},e.prototype.repaint=function(){var t=this.scale,e=this.options,i=this.pointerShape(e.value),o=this.pointerPath,r=this.pointerShape(e._oldValue);o.moveTo(i[0]).lineTo(i[1]).lineTo(i[2]).lineTo(i[3]).close();var n=new jd(o,at(e.animation,{reverse:t.options.reverse,vertical:t.options.vertical,oldPoints:[r[1],r[2]],newPoints:[i[1],i[2]]}));!1===e.animation.transitions&&(n.options.duration=0),n.setup(),n.play()},e.prototype.render=function(){var t=new Dd,e=this.getElementOptions();this.options.track.visible&&t.append(this.renderTrack());var i=this.pointerPath=new Fd({stroke:e.stroke,fill:e.fill});return t.append(i),this.elements=t,t},e.prototype.renderTrack=function(){var t=this.options.track,e=t.border||{},i=this.trackBox.clone().pad(e.width||0);return Fd.fromRect(i.toRect(),{fill:{color:t.color,opacity:t.opacity},stroke:{color:e.width?e.color||t.color:"",width:e.width,dashType:e.dashType}})},e}(Od);const Nd=Hd;var Ud=q.drawing.Group,Gd=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reflow=function(t){var e=this.pointers,i=t.origin.x,o=t.origin.y,r=new wi(i,o,i+t.width(),o+t.height());this.scale.reflow(r),this._shrinkScaleWidth(r);for(var n=0;n<e.length;n++)e[n].reflow();this.bbox=this._getBox(r),this._alignElements(),this._shrinkElements(),this._buildVisual(),this._draw()},e.prototype._buildVisual=function(){var t=new Ud,e=this.scale.render(),i=this.pointers;t.append(this.gaugeArea),t.append(e);for(var o=0;o<i.length;o++){var r=i[o];t.append(r.render()),r.value(r.options.value)}this._visuals=t},e.prototype._createModel=function(){var t=this.options,e=this.scale=new Cd(t.scale,this.contextService);this.pointers=[];var i=t.pointer;i=G(i)?i:[i];for(var o=0;o<i.length;o++){var r=at({},i[o],{animation:{transitions:t.transitions}}),n="arrow"===r.shape?Vd:Nd;this.pointers.push(new n(e,r))}},e.prototype._defaultSize=function(){var t=this.options.scale.vertical;return{width:t?60:200,height:t?200:60}},e.prototype._getBox=function(t){for(var e,i=this.scale,o=this.pointers,r=t.center(),n=o[0].box.clone().wrap(i.box),s=0;s<o.length;s++)n.wrap(o[s].box.clone());return i.options.vertical?(e=n.width()/2,n=new wi(r.x-e,t.y1,r.x+e,t.y2)):(e=n.height()/2,n=new wi(t.x1,r.y-e,t.x2,r.y+e)),n},e.prototype._alignElements=function(){for(var t,e=this.scale,i=this.pointers,o=e.box,r=i[0].box.clone().wrap(e.box),n=this.bbox,s=0;s<i.length;s++)r.wrap(i[s].box.clone());e.options.vertical?(t=n.center().x-r.center().x,e.reflow(new wi(o.x1+t,n.y1,o.x2+t,n.y2))):(t=n.center().y-r.center().y,e.reflow(new wi(o.x1,o.y1+t,o.x2,o.y2+t)));for(var a=0;a<i.length;a++)i[a].reflow(this.bbox)},e.prototype._shrinkScaleWidth=function(t){var e=this.scale;if(!e.options.vertical){var i=e.contentBox().width()-t.width();i>0&&(e.box.shrink(i,0),e.box.alignTo(t,"center"),e.reflow(e.box))}},e.prototype._shrinkElements=function(){for(var t=this.scale,e=this.pointers,i=t.box.clone(),o=t.options.vertical?"y":"x",r=e[0].box,n=0;n<e.length;n++)r.wrap(e[n].box.clone());i[o+1]+=Math.max(i[o+1]-r[o+1],0),i[o+2]-=Math.max(r[o+2]-i[o+2],0),t.reflow(i);for(var s=0;s<e.length;s++)e[s].reflow(this.bbox)},e}(xd);te(Gd,{transitions:!0,gaugeArea:{background:""},scale:{vertical:!0}});const Wd=Gd;var Xd=180,Yd=q.drawing.Arc,qd=q.drawing.Path,Zd=q.drawing.Group;function Qd(t,e,i,o){var r=new Zd,n=t.center,s=t.getRadiusX();if(o.visible)for(var a=0;a<e.length;a++){var p=t.pointAt(e[a]),l=new q.geometry.Point(n.x+s-o.size,n.y).rotate(e[a],n);r.append(new qd({stroke:{color:o.color,width:o.width}}).moveTo(p).lineTo(l))}return r}function Kd(t,e,i,o){return{from:t,to:e,color:i,opacity:o}}var $d=function(t){function e(e,i){t.call(this,0,1,e,i)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initUserOptions=function(t){var e=at({},this.options,t);return e.majorUnit=e.majorUnit||vi(e.min,e.max),e.minorUnit=e.minorUnit||e.majorUnit/10,e},e.prototype.initFields=function(){},e.prototype.render=function(t,e){var i=this.renderArc(t,e);this.bbox=i.bbox(),this.labelElements=this.renderLabels(),this.ticks=this.renderTicks(),this.ranges=this.renderRanges()},e.prototype.reflow=function(t){var e=t.center(),i=Math.min(t.height(),t.width())/2;if(!jt(this.bbox))return this.render(e,i);this.bbox=this.arc.bbox(),this.radius(this.arc.getRadiusX()),this.repositionRanges(),this.renderLabels()},e.prototype.slotAngle=function(t){var e=this.options,i=e.min,o=e.max,r=e.reverse,n=e.startAngle,s=e.endAngle,a=s-n;return(r?s-(t-i)/(o-i)*a:(t-i)/(o-i)*a+n)+Xd},e.prototype.hasRanges=function(){var t=this.options.ranges;return t&&t.length},e.prototype.ticksSize=function(){var t=this.options,e=t.majorTicks,i=t.minorTicks,o=0;return e.visible&&(o=e.size),i.visible&&(o=Math.max(i.size,o)),o},e.prototype.labelsCount=function(){var e=t.prototype.labelsCount.call(this),i=this.options;return i.endAngle-i.startAngle>=360&&i.max%i.majorUnit==0&&(e-=1),e},e.prototype.renderLabels=function(){var t=this.options,e=this.arc.clone(),i=e.getRadiusX(),o=this.tickAngles(e,t.majorUnit),r=t.rangeSize=t.rangeSize||.1*i,n=new Zd,s=.05*i;jt(t.rangeDistance)?s=t.rangeDistance:t.rangeDistance=s;var a=t.labels,p=a.position===rd,l=jt(this.labelElements);p&&(i-=this.ticksSize(),this.hasRanges()&&!l&&(i-=r+s),e.setRadiusX(i).setRadiusY(i));for(var h=this.labels,c=h.length,u=dt(a.padding),d=(u.left+u.right)/2,f=(u.top+u.bottom)/2,g=0;g<c;g++){var y=h[g],v=y.box.width()/2,m=y.box.height()/2,x=o[g],b=(x-Xd)*od,_=e.pointAt(x),w=_.x+Math.cos(b)*(v+d)*(p?1:-1),k=_.y+Math.sin(b)*(m+f)*(p?1:-1);y.reflow(new wi(w-v,k-m,w+v,k+m));var A=new q.geometry.Point(y.box.x1,y.box.y1),S=void 0;if(l){var C=(S=this.labelElements.children[g]).bbox().origin,P=S.transform()||q.geometry.transform();P.translate(A.x-C.x,A.y-C.y),S.transform(P)}else S=dd(y,t.labels),n.append(S);this.bbox=q.geometry.Rect.union(this.bbox,S.bbox())}return n},e.prototype.repositionRanges=function(){var t=this.ranges.children;if(t.length>0){var e=this.options,i=e.rangeDistance,o=e.rangeSize,r=this.getRangeRadius();this.options.labels.position===rd&&(r+=o+i);for(var n=r+o/2,s=0;s<t.length;s++)t[s]._geometry.setRadiusX(n).setRadiusY(n);this.bbox=q.geometry.Rect.union(this.bbox,this.ranges.bbox())}},e.prototype.renderRanges=function(){var t=this.rangeSegments(),e=t.length,i=new Zd;if(e){var o=this.options,r=o.rangeSize,n=o.reverse,s=o.rangeDistance,a=this.getRangeRadius();this.radius(this.radius()-r-s);for(var p=0;p<e;p++){var l=t[p],h=this.slotAngle(l[n?"to":"from"]),c=this.slotAngle(l[n?"from":"to"]);c-h!=0&&i.append(this.createRange(h,c,a,l))}}return i},e.prototype.createRange=function(t,e,i,o){var r=this.options.rangeSize,n=new q.geometry.Arc(this.arc.center,{radiusX:i+r/2,radiusY:i+r/2,startAngle:t,endAngle:e});return new Yd(n,{stroke:{width:r,color:o.color,opacity:o.opacity,lineCap:o.lineCap}})},e.prototype.rangeSegments=function(){var t=this.options,e=t.ranges||[],i=e.length,o=[];if(i){var r=t.min,n=t.max,s=t.rangePlaceholderColor;o.push(Kd(r,n,s));for(var a=0;a<i;a++)for(var p=fd(e[a],r,n),l=o.length,h=0;h<l;h++){var c=o[h];if(c.from<=p.from&&p.from<=c.to){o.push(Kd(p.from,p.to,p.color,p.opacity)),c.from<=p.to&&p.to<=c.to&&o.push(Kd(p.to,c.to,s,p.opacity)),c.to=p.from;break}}}return o},e.prototype.getRangeRadius=function(){var t=this.arc,e=this.options,i=e.rangeSize,o=e.rangeDistance,r=e.majorTicks.size;return e.labels.position===sd?t.getRadiusX()-r-o-i:t.getRadiusX()-i},e.prototype.renderArc=function(t,e){var i=this.options;return this.arc=new q.geometry.Arc(t,{radiusX:e,radiusY:e,startAngle:i.startAngle+Xd,endAngle:i.endAngle+Xd})},e.prototype.renderTicks=function(){var t=this.arc,e=this.options,i=t.clone();this.majorTickAngles=this.tickAngles(t,e.majorUnit),this.majorTicks=Qd(i,this.majorTickAngles,e.majorUnit,e.majorTicks);var o=new Zd;o.append(this.majorTicks);var r=e.majorTicks.size,n=e.minorTicks.size;if(this._tickDifference=r-n,e.labels.position===sd){var s=i.getRadiusX();i.setRadiusX(s-r+n).setRadiusY(s-r+n)}return this.minorTickAngles=this.normalizeTickAngles(this.tickAngles(t,e.minorUnit)),this.minorTicks=Qd(i,this.minorTickAngles,e.minorUnit,e.minorTicks),o.append(this.minorTicks),o},e.prototype.normalizeTickAngles=function(t){for(var e=this.options,i=e.majorUnit/e.minorUnit,o=t.length-1;o>=0;o--)o%i==0&&t.splice(o,1);return t},e.prototype.tickAngles=function(t,e){var i=this.options,o=i.reverse,r=i.max-i.min,n=t.endAngle-t.startAngle,s=r/e,a=t.startAngle,p=n/s;o&&(a+=n,p=-p),n>=360&&i.max%e==0&&(s-=1);for(var l=[],h=0;h<s;h++)l.push(Zt(a,y)),a+=p;return Zt(a)<=t.endAngle&&l.push(a),l},e.prototype.radius=function(t){if(!t)return this.arc.getRadiusX();this.arc.setRadiusX(t).setRadiusY(t),this.repositionTicks(this.majorTicks.children,this.majorTickAngles),this.repositionTicks(this.minorTicks.children,this.minorTickAngles,!0)},e.prototype.repositionTicks=function(t,e,i){var o=i&&this._tickDifference||0,r=this.arc,n=r.getRadiusX();i&&this.options.labels.position===sd&&0!==o&&(r=this.arc.clone()).setRadiusX(n-o).setRadiusY(n-o);for(var s=0;s<t.length;s++){var a=r.pointAt(e[s]),p=t[s].segments,l=a.x-p[0].anchor().x,h=a.y-p[0].anchor().y;t[s].transform((new q.geometry.transform).translate(l,h))}},e}(_r);te($d,{min:0,max:100,majorTicks:{size:15,align:rd,color:u,width:id,visible:!0},minorTicks:{size:10,align:rd,color:u,width:id,visible:!0},startAngle:-30,endAngle:210,labels:{position:rd,padding:2}});const Jd=$d;var tf=function(t){function e(e,i){t.call(this,e,i);var o=this.options;o.duration=Math.max(Math.abs(o.newAngle-o.oldAngle)/o.duration*1e3,1)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.step=function(t){var e=this.options,i=Pt(e.oldAngle,e.newAngle,t);this.element.transform(q.geometry.transform().rotate(i,e.center))},e}(q.drawing.Animation);te(tf,{easing:nd,duration:Ju}),q.drawing.AnimationFactory.current.register(ad,tf);const ef=tf;var of=q.drawing.Circle,rf=q.drawing.Group,nf=q.drawing.Path,sf=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.setAngle=function(t){this.elements.transform(q.geometry.transform().rotate(t,this.center))},e.prototype.repaint=function(){var t=this.scale,e=this.options,i=t.slotAngle(e._oldValue),o=t.slotAngle(e.value);!1===e.animation.transitions?this.setAngle(o):new ef(this.elements,at(e.animation,{oldAngle:i,newAngle:o})).play()},e.prototype.render=function(){var t=this.scale,e=this.options,i=new rf;return!1!==e.animation&&at(e.animation,{startAngle:0,center:t.arc.center,reverse:t.options.reverse}),i.append(this._renderNeedle(),this._renderCap()),this.elements=i,this.setAngle(od),i},e.prototype.reflow=function(t){var e=this.center=t.center,i=Xt(this.options.length||1,.1,1.5),o=this.radius=t.getRadiusX()*i,r=this.capSize=Math.round(o*this.options.cap.size);this.bbox=q.geometry.Rect.fromPoints(new q.geometry.Point(e.x-r,e.y-r),new q.geometry.Point(e.x+r,e.y+r))},e.prototype._renderNeedle=function(){var t=this.scale.options.minorTicks.size,e=this.center,i=this.options.color,o=new nf({fill:{color:i},stroke:{color:i,width:id}});return o.moveTo(e.x+this.radius-t,e.y).lineTo(e.x,e.y-this.capSize/2).lineTo(e.x,e.y+this.capSize/2).close(),o},e.prototype._renderCap=function(){var t=this.options,e=t.cap.color||t.color,i=new q.geometry.Circle(this.center,this.capSize);return new of(i,{fill:{color:e},stroke:{color:e}})},e}(Td);te(sf,{cap:{size:.05},arrow:{width:16,height:14},animation:{type:ad,duration:Ju}});const af=sf;var pf=q.drawing.Group,lf=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reflow=function(t){var e=this.pointers;this.scale.reflow(t),this._initialPlotArea=this.scale.bbox;for(var i=0;i<e.length;i++)e[i].reflow(this.scale.arc),this._initialPlotArea=q.geometry.Rect.union(this._initialPlotArea,e[i].bbox);this.fitScale(t),this.alignScale(t),this._buildVisual(this.gaugeArea,e,this.scale),this._draw()},e.prototype._buildVisual=function(t,e,i){var o=this._visuals=new pf;o.append(t),o.append(i.ticks),o.append(i.ranges),this._buildPointers(e),o.append(i.labelElements)},e.prototype._buildPointers=function(t){for(var e=0;e<t.length;e++){var i=t[e];i.render(),this._visuals.append(i.elements),i.value(i.options.value)}},e.prototype.fitScale=function(t){for(var e,i,o,r,n,s=this.scale.arc,a=this._initialPlotArea,p=Math.abs(this.getDiff(a,t)),l=Zt(p,y),h=Zt(-p,y),c=0,u=0;!(!(u++<100)||(c=n===o?c+1:0)>5||l!==r&&0<=(e=this.getPlotBox(l,t,s))&&e<=2||h!==r&&0<=(o=this.getPlotBox(h,t,s))&&o<=2||(r=e>0&&o>0?2*l:e<0&&o<0?2*h:Zt((l+h)/2||1,y),0<=(i=this.getPlotBox(r,t,s))&&i<=2));)n=o,i>0?(h=r,o=i):(l=r,e=i)},e.prototype.getPlotBox=function(t,e,i){var o=this.scale,r=this.pointers,n=i.getRadiusX(),s=i.clone();s.setRadiusX(n+t).setRadiusY(n+t),o.arc=s,o.reflow(e),this.plotBbox=o.bbox;for(var a=0;a<r.length;a++)r[a].reflow(s),this.plotBbox=q.geometry.Rect.union(this.plotBbox,r[a].bbox);return this.getDiff(this.plotBbox,e)},e.prototype.getDiff=function(t,e){return Math.min(e.width()-t.width(),e.height()-t.height())},e.prototype.alignScale=function(t){var e=this.plotBbox.center(),i=t.center(),o=e.x-i.x,r=e.y-i.y,n=this.scale,s=this.pointers;n.arc.center.x-=o,n.arc.center.y-=r,n.reflow(t);for(var a=0;a<s.length;a++)s[a].reflow(n.arc),this.plotBbox=q.geometry.Rect.union(n.bbox,s[a].bbox)},e.prototype._createModel=function(){var t=this.options,e=t.pointer,i=this.scale=new Jd(t.scale,this.contextService);this.pointers=[];for(var o=G(e)?e:[e],r=0;r<o.length;r++){var n=new af(i,at({},o[r],{animation:{transitions:t.transitions}}));this.pointers.push(n)}},e}(xd);te(lf,{transitions:!0,gaugeArea:{background:""}});const hf=lf;var cf=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.rangeSegments=function(){var t=this.options;return[{from:t.min,to:t.max,color:t.rangePlaceholderColor,lineCap:t.rangeLineCap}]},e.prototype.hasRanges=function(){return!0},e.prototype.placeholderRangeAngle=function(t){var e=this.ranges.children[0].geometry();this.options.reverse?e.setEndAngle(t):e.setStartAngle(t)},e.prototype.addRange=function(t,e,i){var o=this.options.reverse,r=this.slotAngle(o?e:t),n=this.slotAngle(o?t:e),s=this.createRange(r,n,this.getRangeRadius(),i);return this.ranges.append(s),s},e}(Jd);te(cf,{min:0,max:100,majorTicks:{visible:!1},minorTicks:{visible:!1},labels:{visible:!1},startAngle:0,endAngle:180,rangeLineCap:"round"});const uf=cf;var df=function(t){function e(e,i){t.call(this,e,i);var o=this.options,r=Math.abs(o.newAngle-o.oldAngle)/o.duration*1e3;o.duration=Xt(r,Ju,800);var n=e.elements.options.get("stroke.color"),s=e.currentColor();n!==s&&(this.startColor=new q.Color(n),this.color=new q.Color(s))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.step=function(t){var e=this,i=e.options,o=e.startColor,r=e.color,n=Pt(i.oldAngle,i.newAngle,t);if(this.element.angle(n),r){var s=Zt(Pt(o.r,r.r,t)),a=Zt(Pt(o.g,r.g,t)),p=Zt(Pt(o.b,r.b,t));this.element.stroke(new q.Color(s,a,p).toHex())}},e}(q.drawing.Animation);te(df,{easing:nd,duration:Ju}),q.drawing.AnimationFactory.current.register(pd,df);const ff=df;var gf=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.repaint=function(){var t=this.scale,e=this.options,i=t.slotAngle(e._oldValue),o=t.slotAngle(e.value);this.animation&&this.animation.abort(),!1===e.animation.transitions?(this.angle(o),this.stroke(this.currentColor())):(this.animation=new ff(this,at(e.animation,{oldAngle:i,newAngle:o})),this.animation.play())},e.prototype.angle=function(t){var e=this.elements.geometry();this.scale.options.reverse?e.setStartAngle(t):e.setEndAngle(t),this.scale.placeholderRangeAngle(t)},e.prototype.stroke=function(t){this.elements.stroke(t)},e.prototype.render=function(){if(!this.elements){var t=this.scale,e=this.options;!1!==e.animation&&at(e.animation,{startAngle:0,center:t.arc.center,reverse:t.options.reverse}),this.elements=t.addRange(t.options.min,this.options.value,{color:this.currentColor(),opacity:e.opacity,lineCap:t.options.rangeLineCap})}},e.prototype.currentColor=function(){var t=this.scale.options,e=t.min,i=t.max,o=this.options,r=o.colors,n=o.color,s=o.value,a=K(s)?s:e;if(r)for(var p=0;p<r.length;p++){var l=r[p],h=l.color,c=l.from;void 0===c&&(c=e);var u=l.to;if(void 0===u&&(u=i),c<=a&&a<=u)return h}return n},e.prototype.reflow=function(){this.render(),this.bbox=this.elements.bbox()},e}(Td);te(gf,{animation:{type:pd,duration:Ju}});const yf=gf;var vf=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._initTheme=function(e){t.prototype._initTheme.call(this,e),this.options.color=this.options.color||(this.theme.pointer||{}).color},e.prototype._createModel=function(){var t=this.options,e=this.scale=new uf(t.scale,this.contextService),i=new yf(e,at({},{colors:t.colors,color:t.color,value:t.value,opacity:t.opacity,animation:{transitions:t.transitions}}));this.pointers=[i]},e.prototype._buildPointers=function(t){for(var e=0;e<t.length;e++){var i=t[e];i.render(),i.value(i.options.value)}},e.prototype._setValueOptions=function(t){this.options.value=t},e.prototype.currentColor=function(){var t=this.pointers[0];if(t)return t.currentColor()},e.prototype.centerLabelPosition=function(t,e){var i=this.getSize(),o=this.scale.arc.center,r=o.x-t/2,n=o.y-e/2;if(t<i.width){var s=r+t;r=Math.max(r,0),s>i.width&&(r-=s-i.width)}if(e<i.height){var a=this.scale.bbox,p=a.bottomRight().y,l=n+e;n=Math.max(n,a.origin.y),l>p&&(n-=l-p)}return{left:r,top:n}},e}(hf);const mf=vf;var xf=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._createModel=function(){var e=this.options.scale;"number"!=typeof e.startAngle&&(e.startAngle=90),e.endAngle=e.startAngle+360,t.prototype._createModel.call(this)},e}(mf);const bf=xf;var _f=function(t){this.setOptions(t),this.initProperties()};_f.prototype.initProperties=function(){},_f.prototype.setOptions=function(t){this.options=Object.assign({},this.options,t),this.quietZoneLength=this.options.addQuietZone?2*this.options.quietZoneLength:0},_f.prototype.encode=function(t,e,i){var o=jt(t)?String(t):t;return this.initValue(o,e,i),this.options.addQuietZone&&this.addQuietZone(),this.addData(),this.options.addQuietZone&&this.addQuietZone(),{baseUnit:this.baseUnit,pattern:this.pattern}},_f.prototype.initValue=function(){},_f.prototype.addQuietZone=function(){this.pattern.push(this.options.quietZoneLength||10)},_f.prototype.addData=function(){},_f.prototype.invalidCharacterError=function(t){throw new Error('Character "'+t+'" is not valid for symbology '+this.name+".")},te(_f,{quietZoneLength:10,addQuietZone:!0,addCheckSum:!0});var wf=Object.assign,kf=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),wf(this,{name:"Code 11",characterMap:["111121","211121","121121","221111","112121","212111","122111","111221","211211","211111","112111"],cCheckSumTotal:10,kCheckSumTotal:9,kCheckSumMinLength:10,checkSumMod:11,DASH_VALUE:10,DASH:"-",START:"112211",STOP:"11221"})},e.prototype.initValue=function(t,e){this.pattern=[],this.value=t,this.width=e,this.totalUnits=0},e.prototype.addData=function(){var t=this.value;this.addPattern(this.START);for(var e=0;e<t.length;e++)this.addCharacter(t.charAt(e));this.options.addCheckSum&&this.addCheckSum(),this.addPattern(this.STOP),this.setBaseUnit()},e.prototype.setBaseUnit=function(){this.baseUnit=this.width/(this.totalUnits+this.quietZoneLength)},e.prototype.addCheckSum=function(){var t=this.value,e=t.length,i=this.getWeightedSum(t,e,this.cCheckSumTotal)%this.checkSumMod;if(this.checksum=String(i),this.addPattern(this.characterMap[i]),++e>=this.kCheckSumMinLength){var o=(i+this.getWeightedSum(t,e,this.kCheckSumTotal))%this.checkSumMod;this.checksum+=o,this.addPattern(this.characterMap[o])}},e.prototype.getWeightedSum=function(t,e,i){for(var o=0,r=0;r<t.length;r++)o+=this.weightedValue(this.getValue(t.charAt(r)),e,r,i);return o},e.prototype.weightedValue=function(t,e,i,o){return((e-i)%o||o)*t},e.prototype.getValue=function(t){return isNaN(t)?(t!==this.DASH&&this.invalidCharacterError(t),this.DASH_VALUE):parseInt(t,10)},e.prototype.addCharacter=function(t){var e=this.getValue(t),i=this.characterMap[e];this.addPattern(i)},e.prototype.addPattern=function(t){for(var e,i=0;i<t.length;i++)e=parseInt(t.charAt(i),10),this.pattern.push(e),this.totalUnits+=e},e}(_f);te(kf,{addCheckSum:!0});var Af=Object.assign,Sf=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),Af(this,{minBaseUnitLength:.7})},e.prototype.addData=function(){var t=this.value;this.addStart();for(var e=0;e<t.length;e++)this.addCharacter(t.charAt(e));this.options.addCheckSum&&this.pushCheckSum(),this.addStop(),this.prepareValues()},e.prototype.addCharacter=function(t){var e=this.characterMap[t];e||this.invalidCharacterError(t),this.addBase(e)},e.prototype.addBase=function(){},e}(_f),Cf=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),Af(this,{name:"Code 39",checkSumMod:43,minRatio:2.5,maxRatio:3,gapWidth:1,splitCharacter:"|",patternMappings:{b:"1|",w:"1|",B:"ratio|",W:"ratio|"},characterMap:{0:{pattern:"bwbWBwBwb",value:0},1:{pattern:"BwbWbwbwB",value:1},2:{pattern:"bwBWbwbwB",value:2},3:{pattern:"BwBWbwbwb",value:3},4:{pattern:"bwbWBwbwB",value:4},5:{pattern:"BwbWBwbwb",value:5},6:{pattern:"bwBWBwbwb",value:6},7:{pattern:"bwbWbwBwB",value:7},8:{pattern:"BwbWbwBwb",value:8},9:{pattern:"bwBWbwBwb",value:9},A:{pattern:"BwbwbWbwB",value:10},B:{pattern:"bwBwbWbwB",value:11},C:{pattern:"BwBwbWbwb",value:12},D:{pattern:"bwbwBWbwB",value:13},E:{pattern:"BwbwBWbwb",value:14},F:{pattern:"bwBwBWbwb",value:15},G:{pattern:"bwbwbWBwB",value:16},H:{pattern:"BwbwbWBwb",value:17},I:{pattern:"bwBwbWBwb",value:18},J:{pattern:"bwbwBWBwb",value:19},K:{pattern:"BwbwbwbWB",value:20},L:{pattern:"bwBwbwbWB",value:21},M:{pattern:"BwBwbwbWb",value:22},N:{pattern:"bwbwBwbWB",value:23},O:{pattern:"BwbwBwbWb",value:24},P:{pattern:"bwBwBwbWb",value:25},Q:{pattern:"bwbwbwBWB",value:26},R:{pattern:"BwbwbwBWb",value:27},S:{pattern:"bwBwbwBWb",value:28},T:{pattern:"bwbwBwBWb",value:29},U:{pattern:"BWbwbwbwB",value:30},V:{pattern:"bWBwbwbwB",value:31},W:{pattern:"BWBwbwbwb",value:32},X:{pattern:"bWbwBwbwB",value:33},Y:{pattern:"BWbwBwbwb",value:34},Z:{pattern:"bWBwBwbwb",value:35},"-":{pattern:"bWbwbwBwB",value:36},".":{pattern:"BWbwbwBwb",value:37}," ":{pattern:"bWBwbwBwb",value:38},$:{pattern:"bWbWbWbwb",value:39},"/":{pattern:"bWbWbwbWb",value:40},"+":{pattern:"bWbwbWbWb",value:41},"%":{pattern:"bwbWbWbWb",value:42},START:{pattern:"bWbwBwBwb"}}})},e.prototype.initValue=function(t,e,i){this.width=e,this.height=i,this.value=t,this.dataLength=t.length,this.pattern=[],this.patternString=""},e.prototype.prepareValues=function(){var t,e=this.minBaseUnitLength,i=this.minRatio,o=Math.ceil(Math.max(.15*this.width,24)),r=this.maxRatio;if(this.height<o)throw new Error("Insufficient height for Code39 encoding: the current height is "+this.height+"px and the minimum height is "+o+"px.");for(t=this.getBaseUnit(r);t<e&&r>i;)r=parseFloat((r-.1).toFixed(1)),t=this.getBaseUnit(r);if(t<e){var n=Math.ceil(this.getBaseWidth(i)*e);throw new Error("Insufficient width for Code39 encoding: the current width is "+this.width+'px and the minimum width for value "'+this.value+'" is '+n+"px.")}this.ratio=r,this.baseUnit=t,this.patternString=this.patternString.substring(0,this.patternString.length-1),this.pattern=this.pattern.concat(this.patternString.replace(/ratio/g,r).split(this.splitCharacter))},e.prototype.getBaseUnit=function(t){return this.width/this.getBaseWidth(t)},e.prototype.getBaseWidth=function(t){var e=3*(t+2);return this.quietZoneLength+e*(this.dataLength+2)+this.gapWidth*(this.dataLength+1)},e.prototype.addStart=function(){this.addPattern(this.characterMap.START.pattern),this.addCharacterGap()},e.prototype.addBase=function(t){this.addPattern(t.pattern),this.addCharacterGap()},e.prototype.addStop=function(){this.addPattern(this.characterMap.START.pattern)},e.prototype.addPattern=function(t){for(var e=0;e<t.length;e++)this.patternString+=this.patternMappings[t.charAt(e)]},e.prototype.addCharacterGap=function(){this.patternString+=this.gapWidth+this.splitCharacter},e}(Sf);te(Cf,{addCheckSum:!1});var Pf={addCharacter:function(t){this.characterMap[t]?this.addBase(this.characterMap[t]):t.charCodeAt(0)>127?this.invalidCharacterError(t):this.addExtended(t.charCodeAt(0))},addExtended:function(t){for(var e,i=0;i<this.extendedMappings.length;i++)if(e=this.extendedMappings[i].call(this,t)){for(var o=0;o<e.length;o++){var r=e[o];this.addBase(r)}return void(this.dataLength+=e.length-1)}},extendedMappings:[function(t){if(97<=t&&t<=122)return[this.characterMap[this.shiftCharacters[0]],this.characterMap[String.fromCharCode(t-32)]]},function(t){if(33<=t&&t<=58)return[this.characterMap[this.shiftCharacters[1]],this.characterMap[String.fromCharCode(t+32)]]},function(t){if(1<=t&&t<=26)return[this.characterMap[this.shiftCharacters[2]],this.characterMap[String.fromCharCode(t+64)]]},function(t){var e,i;if(this.specialAsciiCodes[t]){e=[];for(var o=0;o<this.specialAsciiCodes[t].length;o++)e.push(this.characterMap[this.shiftCharacters[3]]),e.push(this.characterMap[this.specialAsciiCodes[t][o]])}else i=6*Math.floor(t/32)+(t-27)%32+64,e=[this.characterMap[this.shiftCharacters[3]],this.characterMap[String.fromCharCode(i)]];return e}],specialAsciiCodes:{0:["U"],64:["V"],96:["W"],127:["T","X","Y","Z"]},shiftValuesAsciiCodes:{39:36,40:47,41:43,42:37},characterMap:{"+":!1,"/":!1,$:!1,"%":!1},shiftCharacters:["SHIFT0","SHIFT1","SHIFT2","SHIFT3"]},Tf=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),at(this,Pf,{name:"Code 39 extended",characterMap:{SHIFT0:{pattern:"bWbwbWbWb",value:41},SHIFT1:{pattern:"bWbWbwbWb",value:40},SHIFT2:{pattern:"bWbWbWbwb",value:39},SHIFT3:{pattern:"bwbWbWbWb",value:42}}})},e}(Cf),Mf=Object.assign,Of=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),Mf(this,{name:"Code 93",cCheckSumTotal:20,kCheckSumTotal:15,checkSumMod:47,characterMap:{0:{pattern:"131112",value:0},1:{pattern:"111213",value:1},2:{pattern:"111312",value:2},3:{pattern:"111411",value:3},4:{pattern:"121113",value:4},5:{pattern:"121212",value:5},6:{pattern:"121311",value:6},7:{pattern:"111114",value:7},8:{pattern:"131211",value:8},9:{pattern:"141111",value:9},A:{pattern:"211113",value:10},B:{pattern:"211212",value:11},C:{pattern:"211311",value:12},D:{pattern:"221112",value:13},E:{pattern:"221211",value:14},F:{pattern:"231111",value:15},G:{pattern:"112113",value:16},H:{pattern:"112212",value:17},I:{pattern:"112311",value:18},J:{pattern:"122112",value:19},K:{pattern:"132111",value:20},L:{pattern:"111123",value:21},M:{pattern:"111222",value:22},N:{pattern:"111321",value:23},O:{pattern:"121122",value:24},P:{pattern:"131121",value:25},Q:{pattern:"212112",value:26},R:{pattern:"212211",value:27},S:{pattern:"211122",value:28},T:{pattern:"211221",value:29},U:{pattern:"221121",value:30},V:{pattern:"222111",value:31},W:{pattern:"112122",value:32},X:{pattern:"112221",value:33},Y:{pattern:"122121",value:34},Z:{pattern:"123111",value:35},"-":{pattern:"121131",value:36},".":{pattern:"311112",value:37}," ":{pattern:"311211",value:38},$:{pattern:"321111",value:39},"/":{pattern:"112131",value:40},"+":{pattern:"113121",value:41},"%":{pattern:"211131",value:42},SHIFT0:{pattern:"122211",value:46},SHIFT1:{pattern:"311121",value:45},SHIFT2:{pattern:"121221",value:43},SHIFT3:{pattern:"312111",value:44},START:{pattern:"111141"},TERMINATION_BAR:"1"}})},e.prototype.initValue=function(t,e,i){this.value=t,this.width=e,this.height=i,this.pattern=[],this.values=[],this.dataLength=t.length},e.prototype.prepareValues=function(){var t=Math.ceil(Math.max(.15*this.width,24));if(this.height<t)throw new Error("Insufficient height for Code93 encoding: the current height is "+this.height+"px, the minimum required height is "+t+"px.");if(this.setBaseUnit(),this.baseUnit<this.minBaseUnitLength){var e=Math.ceil(this.minBaseUnitLength*(this.width/this.baseUnit));throw new Error("Insufficient width for Code93 encoding: the current width is "+this.width+'px and the minimum required width for value "'+this.value+'" is '+e+"px.")}},e.prototype.setBaseUnit=function(){this.baseUnit=this.width/(9*(this.dataLength+2+2)+this.quietZoneLength+1)},e.prototype.addStart=function(){var t=this.characterMap.START.pattern;this.addPattern(t)},e.prototype.addStop=function(){this.addStart(),this.pattern.push(this.characterMap.TERMINATION_BAR)},e.prototype.addBase=function(t){this.addPattern(t.pattern),this.values.push(t.value)},e.prototype.pushCheckSum=function(){var t,e=this._getCheckValues();this.checksum=e.join("");for(var i=0;i<e.length;i++)t=this.characterMap[this._findCharacterByValue(e[i])],this.addPattern(t.pattern)},e.prototype._getCheckValues=function(){var t,e,i=this.values,o=i.length,r=0;for(e=o-1;e>=0;e--)r+=this.weightedValue(i[e],o-e,this.cCheckSumTotal);for(t=r%this.checkSumMod,r=this.weightedValue(t,1,this.kCheckSumTotal),e=o-1;e>=0;e--)r+=this.weightedValue(i[e],o-e+1,this.kCheckSumTotal);return[t,r%this.checkSumMod]},e.prototype._findCharacterByValue=function(t){for(var e in this.characterMap)if(this.characterMap[e].value===t)return e},e.prototype.weightedValue=function(t,e,i){return(e%i||i)*t},e.prototype.addPattern=function(t){for(var e,i=0;i<t.length;i++)e=parseInt(t.charAt(i),10),this.pattern.push(e)},e}(Sf),Lf=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),at(this,Pf,{name:"Code 93 extended",pushCheckSum:function(){var t,e=this._getCheckValues();this.checksum=e.join("");for(var i=0;i<e.length;i++)if(t=e[i],this.shiftValuesAsciiCodes[t])this.addExtended(this.shiftValuesAsciiCodes[t]);else{var o=this._findCharacterByValue(t);this.addPattern(this.characterMap[o].pattern)}}})},e}(Of),Bf=/^\d+$/,If=Object.assign,Ef=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),If(this,{name:"Postnet",START:"2",VALID_CODE_LENGTHS:[5,9,11],DIGIT_SEPARATOR:"-",characterMap:["22111","11122","11212","11221","12112","12121","12211","21112","21121","21211"]})},e.prototype.initValue=function(t,e,i){this.height=i,this.width=e,this.baseHeight=i/2,this.value=t.replace(new RegExp(this.DIGIT_SEPARATOR,"g"),""),this.pattern=[],this.validate(this.value),this.checkSum=0,this.setBaseUnit()},e.prototype.addData=function(){var t=this.value;this.addPattern(this.START);for(var e=0;e<t.length;e++)this.addCharacter(t.charAt(e));this.options.addCheckSum&&this.addCheckSum(),this.addPattern(this.START),this.pattern.pop()},e.prototype.addCharacter=function(t){var e=this.characterMap[t];this.checkSum+=parseInt(t,10),this.addPattern(e)},e.prototype.addCheckSum=function(){this.checksum=(10-this.checkSum%10)%10,this.addCharacter(this.checksum)},e.prototype.setBaseUnit=function(){this.baseUnit=this.width/(10*(this.value.length+1)+3+this.quietZoneLength)},e.prototype.validate=function(t){if(Bf.test(t)||this.invalidCharacterError(t.match(/[^0-9]/)[0]),!Ct(t.length,this.VALID_CODE_LENGTHS))throw new Error("Invalid value length. Valid lengths for the Postnet symbology are "+this.VALID_CODE_LENGTHS.join(",")+".")},e.prototype.addPattern=function(t){for(var e,i=0;i<t.length;i++)e=this.height-this.baseHeight*t.charAt(i),this.pattern.push({width:1,y1:e,y2:this.height}),this.pattern.push(1)},e}(_f),Rf=/^\d+$/,Vf=/^[a-z0-9]+$/i,zf=Object.assign,jf=function(t){this.encoding=t,this.initProperties()};jf.prototype.initProperties=function(){},jf.prototype.addStart=function(){},jf.prototype.is=function(){},jf.prototype.isCode=function(){return!1},jf.prototype.move=function(){},jf.prototype.pushState=function(){};var Df=function(t){function e(e,i){t.call(this,e),this.states=i,this._initMoves(i)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),at(this,{FNC4:"FNC4",SHIFT:98})},e.prototype.addStart=function(){this.encoding.addPattern(this.START)},e.prototype.is=function(t,e){var i=t.charCodeAt(e);return this.isCode(i)},e.prototype.move=function(t){for(var e=0;!this._moves[e].call(this,t)&&e<this._moves.length;)e++},e.prototype.pushState=function(t){var e,i=this.states,o=t.value,r=o.length;if(Ct("C",i)){var n=o.substr(t.index).match(/\d{4,}/g);n&&(r=o.indexOf(n[0],t.index))}for(;(e=t.value.charCodeAt(t.index))>=0&&this.isCode(e)&&t.index<r;)this.encoding.addPattern(this.getValue(e)),t.index++},e.prototype._initMoves=function(t){this._moves=[],Ct(this.FNC4,t)&&this._moves.push(this._moveFNC),Ct(this.shiftKey,t)&&this._moves.push(this._shiftState),this._moves.push(this._moveState)},e.prototype._moveFNC=function(t){if(t.fnc)return t.fnc=!1,t.previousState===this.key},e.prototype._shiftState=function(t){if(t.previousState===this.shiftKey&&(t.index+1>=t.value.length||this.encoding[this.shiftKey].is(t.value,t.index+1)))return this.encoding.addPattern(this.SHIFT),t.shifted=!0,!0},e.prototype._moveState=function(){return this.encoding.addPattern(this.MOVE),!0},e}(jf),Ff={};Ff.A=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),zf(this,{key:"A",shiftKey:"B",MOVE:101,START:103})},e.prototype.isCode=function(t){return 0<=t&&t<96},e.prototype.getValue=function(t){return t<32?t+64:t-32},e}(Df),Ff.B=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),zf(this,{key:"B",shiftKey:"A",MOVE:100,START:104})},e.prototype.isCode=function(t){return 32<=t&&t<128},e.prototype.getValue=function(t){return t-32},e}(Df),Ff.C=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),zf(this,{key:"C",MOVE:99,START:105})},e.prototype.addStart=function(){this.encoding.addPattern(this.START)},e.prototype.is=function(t,e){var i=Yf(t,e,4);return(e+4<=t.length||2===t.length)&&Rf.test(i)},e.prototype.move=function(){this.encoding.addPattern(this.MOVE)},e.prototype.pushState=function(t){for(var e;(e=Yf(t.value,t.index,2))&&Rf.test(e)&&2===e.length;)this.encoding.addPattern(parseInt(e,10)),t.index+=2},e.prototype.getValue=function(t){return t},e}(jf),Ff.FNC4=function(t){function e(e,i){t.call(this,e),this._initSubStates(i)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),zf(this,{key:"FNC4",dependentStates:["A","B"]})},e.prototype.addStart=function(t){var e=t.value.charCodeAt(0)-128,i=this._getSubState(e);this.encoding[i].addStart()},e.prototype.is=function(t,e){var i=t.charCodeAt(e);return this.isCode(i)},e.prototype.isCode=function(t){return 128<=t&&t<256},e.prototype.pushState=function(t){var e,i=this._initSubState(t),o=this.encoding,r=i.value.length;if(t.index+=r,r<3)for(;i.index<r;i.index++)e=i.value.charCodeAt(i.index),i.state=this._getSubState(e),i.previousState!==i.state&&(i.previousState=i.state,o[i.state].move(i)),o.addPattern(o[i.state].MOVE),o.addPattern(o[i.state].getValue(e));else i.state!==i.previousState&&o[i.state].move(i),this._pushStart(i),o.pushData(i,this.subStates),t.index<t.value.length&&this._pushStart(i);t.fnc=!0,t.state=i.state},e.prototype._pushStart=function(t){this.encoding.addPattern(this.encoding[t.state].MOVE),this.encoding.addPattern(this.encoding[t.state].MOVE)},e.prototype._initSubState=function(t){var e={value:this._getAll(t.value,t.index),index:0};return e.state=this._getSubState(e.value.charCodeAt(0)),e.previousState=t.previousState===this.key?e.state:t.previousState,e},e.prototype._initSubStates=function(t){this.subStates=[];for(var e=0;e<t.length;e++)Ct(t[e],this.dependentStates)&&this.subStates.push(t[e])},e.prototype._getSubState=function(t){for(var e=0;e<this.subStates.length;e++)if(this.encoding[this.subStates[e]].isCode(t))return this.subStates[e]},e.prototype._getAll=function(t,e){for(var i,o="",r=e;(i=t.charCodeAt(r++))&&this.isCode(i);)o+=String.fromCharCode(i-128);return o},e}(jf),Ff.FNC1=function(t){function e(e,i){t.call(this,e),this.states=i}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),zf(this,{key:"FNC1",startState:"C",startAI:"(",endAI:")",dependentStates:["C","B"],applicationIdentifiers:{22:{max:29,type:"alphanumeric"},402:{length:17},7004:{max:4,type:"alphanumeric"},242:{max:6,type:"alphanumeric"},8020:{max:25,type:"alphanumeric"},703:{min:3,max:30,type:"alphanumeric"},8008:{min:8,max:12,type:"alphanumeric"},253:{min:13,max:17,type:"alphanumeric"},8003:{min:14,max:30,type:"alphanumeric"},multiKey:[{ids:["15","17","8005","8100"],ranges:[[11,13],[310,316],[320,336],[340,369]],type:{length:6}},{ids:["240","241","250","251","400","401","403","7002","8004","8007","8110"],ranges:[[-9]],type:{max:30,type:"alphanumeric"}},{ids:["7001"],ranges:[[410,414]],type:{length:13}},{ids:["10","21","254","420","8002"],type:{max:20,type:"alphanumeric"}},{ids:["00","8006","8017","8018"],type:{length:18}},{ids:["01","02","8001"],type:{length:14}},{ids:["422"],ranges:[[424,426]],type:{length:3}},{ids:["20","8102"],type:{length:2}},{ids:["30","37"],type:{max:8,type:"alphanumeric"}},{ids:["390","392"],type:{max:15,type:"alphanumeric"}},{ids:["421","423"],type:{min:3,max:15,type:"alphanumeric"}},{ids:["391","393"],type:{min:3,max:18,type:"alphanumeric"}},{ids:["7003","8101"],type:{length:10}}]},START:102})},e.prototype.addStart=function(){this.encoding[this.startState].addStart()},e.prototype.is=function(){return Ct(this.key,this.states)},e.prototype.pushState=function(t){var e,i,o,r=this.encoding,n=t.value.replace(/\s/g,""),s=new RegExp("["+this.startAI+this.endAI+"]","g"),a=t.index,p={state:this.startState};for(r.addPattern(this.START);;){if(p.index=0,(e=(o=n.charAt(a)===this.startAI?2:0)>0?this.getBySeparator(n,a):this.getByLength(n,a)).ai.length)i=a+o+e.id.length+e.ai.length;else if((i=n.indexOf(this.startAI,a+1))<0){if(a+e.ai.max+e.id.length+o<n.length)throw new Error("Separators are required after variable length identifiers");i=n.length}if(p.value=n.substring(a,i).replace(s,""),this.validate(e,p.value),r.pushData(p,this.dependentStates),i>=n.length)break;a=i,p.state!==this.startState&&(r[this.startState].move(p),p.state=this.startState),e.ai.length||r.addPattern(this.START)}t.index=t.value.length},e.prototype.validate=function(t,e){var i=e.substr(t.id.length),o=t.ai;if(!o.type&&!Rf.test(i))throw new Error("Application identifier "+t.id+" is numeric only but contains non numeric character(s).");if("alphanumeric"===o.type&&!Vf.test(i))throw new Error("Application identifier "+t.id+" is alphanumeric only but contains non alphanumeric character(s).");if(o.length&&o.length!==i.length)throw new Error("Application identifier "+t.id+" must be "+o.length+" characters long.");if(o.min&&o.min>i.length)throw new Error("Application identifier "+t.id+" must be at least "+o.min+" characters long.");if(o.max&&o.max<i.length)throw new Error("Application identifier "+t.id+" must be at most "+o.max+" characters long.")},e.prototype.getByLength=function(t,e){for(var i,o,r=2;r<=4;r++)if(i=Yf(t,e,r),o=this.getApplicationIdentifier(i)||this.getApplicationIdentifier(i.substring(0,i.length-1)))return{id:i,ai:o};this.unsupportedAIError(i)},e.prototype.unsupportedAIError=function(t){throw new Error("'"+t+"' is not a supported Application Identifier")},e.prototype.getBySeparator=function(t,e){var i=t.indexOf(this.startAI,e),o=t.indexOf(this.endAI,i),r=t.substring(i+1,o),n=this.getApplicationIdentifier(r)||this.getApplicationIdentifier(r.substr(r.length-1));return n||this.unsupportedAIError(r),{ai:n,id:r}},e.prototype.getApplicationIdentifier=function(t){var e=this.applicationIdentifiers,i=e.multiKey;if(e[t])return e[t];for(var o=0;o<i.length;o++){if(i[o].ids&&Ct(t,i[o].ids))return i[o].type;if(i[o].ranges)for(var r=i[o].ranges,n=0;n<r.length;n++)if(r[n][0]<=t&&t<=r[n][1])return i[o].type}},e}(jf);var Hf=function(t){function e(e){t.call(this,e),this._initStates()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),zf(this,{characterMap:[212222,222122,222221,121223,121322,131222,122213,122312,132212,221213,221312,231212,112232,122132,122231,113222,123122,123221,223211,221132,221231,213212,223112,312131,311222,321122,321221,312212,322112,322211,212123,212321,232121,111323,131123,131321,112313,132113,132311,211313,231113,231311,112133,112331,132131,113123,113321,133121,313121,211331,231131,213113,213311,213131,311123,311321,331121,312113,312311,332111,314111,221411,431111,111224,111422,121124,121421,141122,141221,112214,112412,122114,122411,142112,142211,241211,221114,413111,241112,134111,111242,121142,121241,114212,124112,124211,411212,421112,421211,212141,214121,412121,111143,111341,131141,114113,114311,411113,411311,113141,114131,311141,411131,211412,211214,211232,2331112],STOP:106})},e.prototype._initStates=function(){for(var t=0;t<this.states.length;t++)this[this.states[t]]=new Ff[this.states[t]](this,this.states)},e.prototype.initValue=function(t,e,i){this.pattern=[],this.value=t,this.width=e,this.height=i,this.checkSum=0,this.totalUnits=0,this.index=0,this.position=1},e.prototype.addData=function(){var t={value:this.value,index:0,state:""};0!==this.value.length&&(t.state=t.previousState=this.getNextState(t,this.states),this.addStart(t),this.pushData(t,this.states),this.addCheckSum(),this.addStop(),this.setBaseUnit())},e.prototype.pushData=function(t,e){for(;this[t.state].pushState(t),!(t.index>=t.value.length);)if(t.shifted){var i=t.state;t.state=t.previousState,t.previousState=i,t.shifted=!1}else t.previousState=t.state,t.state=this.getNextState(t,e),this[t.state].move(t)},e.prototype.addStart=function(t){this[t.state].addStart(t),this.position=1},e.prototype.addCheckSum=function(){this.checksum=this.checkSum%103,this.addPattern(this.checksum)},e.prototype.addStop=function(){this.addPattern(this.STOP)},e.prototype.setBaseUnit=function(){this.baseUnit=this.width/(this.totalUnits+this.quietZoneLength)},e.prototype.addPattern=function(t){for(var e,i=this.characterMap[t].toString(),o=0;o<i.length;o++)e=parseInt(i.charAt(o),10),this.pattern.push(e),this.totalUnits+=e;this.checkSum+=t*this.position++},e.prototype.getNextState=function(t,e){for(var i=0;i<e.length;i++)if(this[e[i]].is(t.value,t.index))return e[i];this.invalidCharacterError(t.value.charAt(t.index))},e}(_f),Nf=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),zf(this,{name:"Code 128 A",states:["A"]})},e}(Hf),Uf=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),zf(this,{name:"Code 128 B",states:["B"]})},e}(Hf),Gf=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),zf(this,{name:"Code 128 C",states:["C"]})},e}(Hf),Wf=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),zf(this,{name:"Code 128",states:["C","B","A","FNC4"]})},e}(Hf),Xf=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),zf(this,{name:"Code GS1-128",states:["FNC1","C","B"]})},e}(Hf);function Yf(t,e,i){return t.substring(e,e+i)}var qf=Object.assign,Zf=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),qf(this,{characterMap:["12121212","12121221","12122112","12122121","12211212","12211221","12212112","12212121","21121212","21121221"],START:"21",STOP:"121",checkSumType:"",checkSums:tg})},e.prototype.initValue=function(t,e){this.pattern=[],this.value=t,this.checkSumLength=0,this.width=e},e.prototype.setBaseUnit=function(){this.baseUnit=this.width/(12*(this.value.length+this.checkSumLength)+this.quietZoneLength+7)},e.prototype.addData=function(){var t=this.value;this.addPattern(this.START);for(var e=0;e<t.length;e++)this.addCharacter(t.charAt(e));this.options.addCheckSum&&this.addCheckSum(),this.addPattern(this.STOP),this.setBaseUnit()},e.prototype.addCharacter=function(t){var e=this.characterMap[t];e||this.invalidCharacterError(t),this.addPattern(e)},e.prototype.addPattern=function(t){for(var e=0;e<t.length;e++)this.pattern.push(parseInt(t.charAt(e),10))},e.prototype.addCheckSum=function(){var t=this.checkSums[this.checkSumType].call(this.checkSums,this.value);this.checksum=t.join("");for(var e=0;e<t.length;e++)this.checkSumLength++,this.addPattern(this.characterMap[t[e]])},e}(_f),Qf=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),qf(this,{name:"MSI Modulo10",checkSumType:"Modulo10"})},e}(Zf),Kf=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),qf(this,{name:"MSI Modulo11",checkSumType:"Modulo11"})},e}(Zf),$f=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),qf(this,{name:"MSI Modulo10 Modulo10",checkSumType:"Modulo10Modulo10"})},e}(Zf),Jf=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),qf(this,{name:"MSI Modulo11 Modulo10",checkSumType:"Modulo11Modulo10"})},e}(Zf),tg={Modulo10:function(t){var e,i,o,r=[0,""],n=t.length%2;for(e=0;e<t.length;e++)r[(e+n)%2]+=parseInt(t.charAt(e),10);for(o=r[0],i=(2*r[1]).toString(),e=0;e<i.length;e++)o+=parseInt(i.charAt(e),10);return[(10-o%10)%10]},Modulo11:function(t){for(var e,i=0,o=t.length,r=0;r<o;r++)i+=(((o-r)%6||6)+1)*t.charAt(r);return 10!=(e=(11-i%11)%11)?[e]:[1,0]},Modulo11Modulo10:function(t){var e,i=this.Modulo11(t);return e=t+i[0],i.concat(this.Modulo10(e))},Modulo10Modulo10:function(t){var e,i=this.Modulo10(t);return e=t+i[0],i.concat(this.Modulo10(e))}},eg=Object.assign,ig=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),eg(this,{name:"EAN 13",keyTable:["000000","001011","001101","001110","010011","011001","011100","010101","010110","011010"],characterMap:{digits:[[3,2,1,1],[2,2,2,1],[2,1,2,2],[1,4,1,1],[1,1,3,2],[1,2,3,1],[1,1,1,4],[1,3,1,2],[1,2,1,3],[3,1,1,2]],start:[1,1,1],middle:[1,1,1,1,1]}})},e.prototype.initValue=function(t,e,i){var o=String(t);if(12!==o.length||/\D/.test(o))throw new Error('The value of the "EAN13" encoding should be 12 symbols');this.pattern=[],this.options.height=i,this.baseUnit=e/(95+this.quietZoneLength),this.value=o,this.checksum=this.calculateChecksum(),this.leftKey=o[0],this.leftPart=o.substr(1,6),this.rightPart=o.substr(7)+this.checksum},e.prototype.addData=function(){this.addPieces(this.characterMap.start),this.addSide(this.leftPart,this.leftKey),this.addPieces(this.characterMap.middle),this.addSide(this.rightPart),this.addPieces(this.characterMap.start)},e.prototype.addSide=function(t,e){for(var i=0;i<t.length;i++)e&&parseInt(this.keyTable[e].charAt(i),10)?this.addPieces(Array.prototype.slice.call(this.characterMap.digits[t.charAt(i)]).reverse(),!0):this.addPieces(this.characterMap.digits[t.charAt(i)],!0)},e.prototype.addPieces=function(t,e){for(var i=0;i<t.length;i++)e?this.pattern.push({y1:0,y2:.95*this.options.height,width:t[i]}):this.pattern.push(t[i])},e.prototype.calculateChecksum=function(){for(var t=0,e=0,i=this.value.split("").reverse().join(""),o=0;o<i.length;o++)o%2?e+=parseInt(i.charAt(o),10):t+=parseInt(i.charAt(o),10);return(10-(3*t+e)%10)%10},e}(_f),og=Object.assign,rg=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),og(this,{name:"EAN 8"})},e.prototype.initValue=function(t,e,i){if(7!==t.length||/\D/.test(t))throw new Error("Invalid value provided");this.value=t,this.options.height=i,this.checksum=this.calculateChecksum(this.value),this.leftPart=this.value.substr(0,4),this.rightPart=this.value.substr(4)+this.checksum,this.pattern=[],this.baseUnit=e/(67+this.quietZoneLength)},e}(ig),ng={code11:kf,code39:Cf,code39extended:Tf,code93:Of,code93extended:Lf,code128:Wf,code128a:Nf,code128b:Uf,code128c:Gf};function sg(t,e){var i=t.style.display;"canvas"===e&&(t.style.display="block");var o={width:t.clientWidth,height:t.clientHeight};return t.style.display=i,o}ng["gs1-128"]=Xf,ng.msimod10=Qf,ng.msimod11=Kf,ng.msimod1010=$f,ng.msimod1110=Jf,ng.postnet=Ef,ng.ean8=rg,ng.ean13=ig;var ag=function(t,e,i){void 0===i&&(i=we),this.options=at({},this.options,e),this.element=t,this.onError=i,this._initElement(),this._initSurface(),this._setOptions(e),e&&jt(e.value)&&this.redraw()};ag.prototype.destroy=function(){this._destroySurface()},ag.prototype._initElement=function(){W(this.element,"k-barcode")},ag.prototype._initSurface=function(){var t=this.options,e=this.surface;e&&e.options.type===t.renderAs||(this._destroySurface(),this._initSurfaceElement(),this.surface=this._createSurface())},ag.prototype._createSurface=function(){return q.drawing.Surface.create(this.surfaceElement,{type:this.options.renderAs})},ag.prototype._destroySurface=function(){this.surface&&(this.surface.destroy(),this.surface=null,this._destroySurfaceElement())},ag.prototype._initSurfaceElement=function(){this.surfaceElement||(this.surfaceElement=document.createElement("div"),this.surfaceElement.style.position="relative",this.element.appendChild(this.surfaceElement))},ag.prototype._destroySurfaceElement=function(){this.surfaceElement&&this.surfaceElement.parentNode&&(this.surfaceElement.parentNode.removeChild(this.surfaceElement),this.surfaceElement=null)},ag.prototype.setOptions=function(t){this._setOptions(t),this._initSurface(),this.redraw()},ag.prototype.redraw=function(){var t=this._getSize();this.surface.clear(),this.surface.setSize({width:t.width,height:t.height}),this.createVisual(),this.surface.draw(this.visual)},ag.prototype.getSize=function(){return{width:this.element.offsetWidth,height:this.element.offsetHeight}},ag.prototype._resize=function(){this.redraw()},ag.prototype.createVisual=function(){this.visual=this._render()},ag.prototype._render=function(){var t,e,i=this.options,o=i.value,r=i.text,n=dt(r.margin),s=this._getSize(),a=i.border||{},p=this.encoding,l=new wi(0,0,s.width,s.height).unpad(a.width).unpad(i.padding),h=l.height(),c=new q.drawing.Group;this.contentBox=l,c.append(this._getBackground(s)),r.visible&&(h-=q.drawing.util.measureText(o,{font:r.font}).height+n.top+n.bottom);try{t=p.encode(o,l.width(),h)}catch(t){return this.onError(t),c}return r.visible&&(e=o,i.checksum&&jt(p.checksum)&&(e+=" "+p.checksum),c.append(this._getText(e))),this.barHeight=h,this._bandsGroup=this._getBands(t.pattern,t.baseUnit),c.append(this._bandsGroup),c},ag.prototype.exportVisual=function(){return this._render()},ag.prototype._getSize=function(){var t=sg(this.element,this.options.renderAs),e=new q.geometry.Size(300,100);return t.width>0&&(e.width=t.width),t.height>0&&(e.height=t.height),this.options.width&&(e.width=this.options.width),this.options.height&&(e.height=this.options.height),e},ag.prototype.value=function(t){if(!jt(t))return this.options.value;this.options.value=String(t),this.redraw()},ag.prototype._getBands=function(t,e){for(var i,o,r=this.contentBox,n=r.x1,s=new q.drawing.Group,a=0;a<t.length;a++){if(i=(o=pt(t[a])?t[a]:{width:t[a],y1:0,y2:this.barHeight}).width*e,a%2){var p=q.geometry.Rect.fromPoints(new q.geometry.Point(n,o.y1+r.y1),new q.geometry.Point(n+i,o.y2+r.y1)),l=q.drawing.Path.fromRect(p,{fill:{color:this.options.color},stroke:null});s.append(l)}n+=i}return s},ag.prototype._getBackground=function(t){var e=this.options,i=e.border||{},o=new wi(0,0,t.width,t.height).unpad(i.width/2);return q.drawing.Path.fromRect(o.toRect(),{fill:{color:e.background},stroke:{color:i.width?i.color:"",width:i.width,dashType:i.dashType}})},ag.prototype._getText=function(t){var e=this.options.text,i=this._textbox=new $i(t,{font:e.font,color:e.color,align:"center",vAlign:"bottom",margin:e.margin});return i.reflow(this.contentBox),i.renderVisual(),i.visual},ag.prototype._setOptions=function(t){if(this.type=(t.type||this.options.type).toLowerCase(),"upca"===this.type&&(this.type="ean13",t.value="0"+t.value),"upce"===this.type&&(this.type="ean8",t.value="0"+t.value),!ng[this.type])throw new Error("Encoding '"+this.type+"' is not supported.");this.encoding=new ng[this.type],this.options=at({},this.options,t)},te(ag,{name:"Barcode",renderAs:"svg",value:"",type:"code39",checksum:!1,width:0,height:0,color:"black",background:"white",text:{visible:!0,font:"16px Consolas, Monaco, Sans Mono, monospace, sans-serif",color:"black",margin:{top:0,bottom:0,left:0,right:0}},border:{width:0,dashType:"solid",color:"black"},padding:{top:0,bottom:0,left:0,right:0}});const pg=ag;var lg={width:500,height:100};const hg=function(t,e){if(void 0===e&&(e=lg),!t)throw new Error("Please specify barcode type to validate.");var i=t.toLowerCase(),o="";if("upca"===i?(i="ean13",o="0"):"upce"===i&&(i="ean8",o="0"),!ng[i])throw new Error("Encoding '"+t+"' is not supported.");return function(t,e,i){return function(o){try{t.encode(i+o,e.width,e.height)}catch(t){return{valid:!1,error:t}}return{valid:!0}}}(new ng[i],e,o)};var cg=Object.assign;function ug(t,e){for(var i=[],o=0;o<t.length;)i.push(t.substring(o,o+e)),o+=e;return i}function dg(t,e){var i=Number(t).toString(2);return i.length<e&&(i=new Array(e-i.length+1).join(0)+i),i}function fg(t){return parseInt(t,2)}var gg=function(t){this.matrix=t,this.row=t.length-1,this.column=t.length-1,this.startColumn=this.column,this.dir=-1,this.c=0};gg.prototype.move=function(){this.row+=this.dir*this.c,this.c^=1,this.column=this.startColumn-this.c},gg.prototype.getNextCell=function(){for(;void 0!==this.matrix[this.row][this.column];)this.move(),(this.row<0||this.row>=this.matrix.length)&&(this.dir=-this.dir,this.startColumn-=8!==this.startColumn?2:3,this.column=this.startColumn,this.row=this.dir<0?this.matrix.length-1:0);return{row:this.row,column:this.column}},gg.prototype.getNextRemainderCell=function(){if(this.move(),void 0===this.matrix[this.row][this.column])return{row:this.row,column:this.column}};var yg=function(t,e){this.dataString=t,this.version=e},vg="alphanumeric",mg=/^\d+/,xg="A-Z0-9 $%*+./:-",bg=new RegExp("^[A-Z $%*+./:-]+"),_g=new RegExp("^["+xg+"]+"),wg=new RegExp("^[^"+xg+"]+");function kg(t,e,i,o,r){var n,s,a=mg.exec(t),p=a?a[0]:"",l=bg.exec(t),h=l?l[0]:"",c=_g.exec(t),u=c?c[0]:"";return p&&(p.length>=e||t.length===p.length||p.length>=i&&!_g.test(t.charAt(p.length)))?(n="numeric",s=p):u&&(t.length===u.length||u.length>=o||r===vg)?(n=vg,s=p||h):(n="byte",s=u?u+wg.exec(t.substring(u.length))[0]:wg.exec(t)[0]),{mode:n,modeString:s}}var Ag=function(){this.initProperties()};Ag.prototype.initProperties=function(){cg(this,{modeIndicator:"",bitsInCharacterCount:[]})},Ag.prototype.getVersionIndex=function(t){return t<10?0:t>26?2:1},Ag.prototype.getBitsCharacterCount=function(t){return this.bitsInCharacterCount[this.getVersionIndex(t||40)]},Ag.prototype.getModeCountString=function(t,e){return this.modeIndicator+dg(t,this.getBitsCharacterCount(e))},Ag.prototype.encode=function(){},Ag.prototype.getStringBitsLength=function(){},Ag.prototype.getValue=function(){};var Sg=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),cg(this,{bitsInCharacterCount:[10,12,14],modeIndicator:"0001"})},e.prototype.getValue=function(t){return parseInt(t,10)},e.prototype.encode=function(t,e){var i,o=ug(t,3),r=this.getModeCountString(t.length,e);for(i=0;i<o.length-1;i++)r+=dg(o[i],10);return r+dg(o[i],1+3*o[i].length)},e.prototype.getStringBitsLength=function(t,e){var i=t%3;return 4+this.getBitsCharacterCount(e)+10*Math.floor(t/3)+3*i+(0===i?0:1)},e}(Ag),Cg=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),cg(this,{characters:{0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,G:16,H:17,I:18,J:19,K:20,L:21,M:22,N:23,O:24,P:25,Q:26,R:27,S:28,T:29,U:30,V:31,W:32,X:33,Y:34,Z:35," ":36,$:37,"%":38,"*":39,"+":40,"-":41,".":42,"/":43,":":44},bitsInCharacterCount:[9,11,13],modeIndicator:"0010"})},e.prototype.getValue=function(t){return this.characters[t]},e.prototype.encode=function(t,e){var i,o=ug(t,2),r=this.getModeCountString(t.length,e);for(i=0;i<o.length-1;i++)r+=dg(45*this.getValue(o[i].charAt(0))+this.getValue(o[i].charAt(1)),11);return r+dg(2===o[i].length?45*this.getValue(o[i].charAt(0))+this.getValue(o[i].charAt(1)):this.getValue(o[i].charAt(0)),1+5*o[i].length)},e.prototype.getStringBitsLength=function(t,e){return 4+this.getBitsCharacterCount(e)+11*Math.floor(t/2)+t%2*6},e}(Ag),Pg=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),cg(this,{bitsInCharacterCount:[8,16,16],modeIndicator:"0100"})},e.prototype.getValue=function(t){var e=t.charCodeAt(0);if(e<=127||160<=e&&e<=255)return e;throw new Error('Unsupported character in QR Code: "'+t+'".')},e.prototype.encode=function(t,e){for(var i=this.getModeCountString(t.length,e),o=0;o<t.length;o++)i+=dg(this.getValue(t.charAt(o)),8);return i},e.prototype.getStringBitsLength=function(t,e){return 4+this.getBitsCharacterCount(e)+8*t},e}(Ag),Tg={};Tg.numeric=new Sg,Tg.alphanumeric=new Cg,Tg.byte=new Pg;var Mg=[{L:{groups:[[1,19]],totalDataCodewords:19,errorCodewordsPerBlock:7},M:{groups:[[1,16]],totalDataCodewords:16,errorCodewordsPerBlock:10},Q:{groups:[[1,13]],totalDataCodewords:13,errorCodewordsPerBlock:13},H:{groups:[[1,9]],totalDataCodewords:9,errorCodewordsPerBlock:17}},{L:{groups:[[1,34]],totalDataCodewords:34,errorCodewordsPerBlock:10},M:{groups:[[1,28]],totalDataCodewords:28,errorCodewordsPerBlock:16},Q:{groups:[[1,22]],totalDataCodewords:22,errorCodewordsPerBlock:22},H:{groups:[[1,16]],totalDataCodewords:16,errorCodewordsPerBlock:28}},{L:{groups:[[1,55]],totalDataCodewords:55,errorCodewordsPerBlock:15},M:{groups:[[1,44]],totalDataCodewords:44,errorCodewordsPerBlock:26},Q:{groups:[[2,17]],totalDataCodewords:34,errorCodewordsPerBlock:18},H:{groups:[[2,13]],totalDataCodewords:26,errorCodewordsPerBlock:22}},{L:{groups:[[1,80]],totalDataCodewords:80,errorCodewordsPerBlock:20},M:{groups:[[2,32]],totalDataCodewords:64,errorCodewordsPerBlock:18},Q:{groups:[[2,24]],totalDataCodewords:48,errorCodewordsPerBlock:26},H:{groups:[[4,9]],totalDataCodewords:36,errorCodewordsPerBlock:16}},{L:{groups:[[1,108]],totalDataCodewords:108,errorCodewordsPerBlock:26},M:{groups:[[2,43]],totalDataCodewords:86,errorCodewordsPerBlock:24},Q:{groups:[[2,15],[2,16]],totalDataCodewords:62,errorCodewordsPerBlock:18},H:{groups:[[2,11],[2,12]],totalDataCodewords:46,errorCodewordsPerBlock:22}},{L:{groups:[[2,68]],totalDataCodewords:136,errorCodewordsPerBlock:18},M:{groups:[[4,27]],totalDataCodewords:108,errorCodewordsPerBlock:16},Q:{groups:[[4,19]],totalDataCodewords:76,errorCodewordsPerBlock:24},H:{groups:[[4,15]],totalDataCodewords:60,errorCodewordsPerBlock:28}},{L:{groups:[[2,78]],totalDataCodewords:156,errorCodewordsPerBlock:20},M:{groups:[[4,31]],totalDataCodewords:124,errorCodewordsPerBlock:18},Q:{groups:[[2,14],[4,15]],totalDataCodewords:88,errorCodewordsPerBlock:18},H:{groups:[[4,13],[1,14]],totalDataCodewords:66,errorCodewordsPerBlock:26}},{L:{groups:[[2,97]],totalDataCodewords:194,errorCodewordsPerBlock:24},M:{groups:[[2,38],[2,39]],totalDataCodewords:154,errorCodewordsPerBlock:22},Q:{groups:[[4,18],[2,19]],totalDataCodewords:110,errorCodewordsPerBlock:22},H:{groups:[[4,14],[2,15]],totalDataCodewords:86,errorCodewordsPerBlock:26}},{L:{groups:[[2,116]],totalDataCodewords:232,errorCodewordsPerBlock:30},M:{groups:[[3,36],[2,37]],totalDataCodewords:182,errorCodewordsPerBlock:22},Q:{groups:[[4,16],[4,17]],totalDataCodewords:132,errorCodewordsPerBlock:20},H:{groups:[[4,12],[4,13]],totalDataCodewords:100,errorCodewordsPerBlock:24}},{L:{groups:[[2,68],[2,69]],totalDataCodewords:274,errorCodewordsPerBlock:18},M:{groups:[[4,43],[1,44]],totalDataCodewords:216,errorCodewordsPerBlock:26},Q:{groups:[[6,19],[2,20]],totalDataCodewords:154,errorCodewordsPerBlock:24},H:{groups:[[6,15],[2,16]],totalDataCodewords:122,errorCodewordsPerBlock:28}},{L:{groups:[[4,81]],totalDataCodewords:324,errorCodewordsPerBlock:20},M:{groups:[[1,50],[4,51]],totalDataCodewords:254,errorCodewordsPerBlock:30},Q:{groups:[[4,22],[4,23]],totalDataCodewords:180,errorCodewordsPerBlock:28},H:{groups:[[3,12],[8,13]],totalDataCodewords:140,errorCodewordsPerBlock:24}},{L:{groups:[[2,92],[2,93]],totalDataCodewords:370,errorCodewordsPerBlock:24},M:{groups:[[6,36],[2,37]],totalDataCodewords:290,errorCodewordsPerBlock:22},Q:{groups:[[4,20],[6,21]],totalDataCodewords:206,errorCodewordsPerBlock:26},H:{groups:[[7,14],[4,15]],totalDataCodewords:158,errorCodewordsPerBlock:28}},{L:{groups:[[4,107]],totalDataCodewords:428,errorCodewordsPerBlock:26},M:{groups:[[8,37],[1,38]],totalDataCodewords:334,errorCodewordsPerBlock:22},Q:{groups:[[8,20],[4,21]],totalDataCodewords:244,errorCodewordsPerBlock:24},H:{groups:[[12,11],[4,12]],totalDataCodewords:180,errorCodewordsPerBlock:22}},{L:{groups:[[3,115],[1,116]],totalDataCodewords:461,errorCodewordsPerBlock:30},M:{groups:[[4,40],[5,41]],totalDataCodewords:365,errorCodewordsPerBlock:24},Q:{groups:[[11,16],[5,17]],totalDataCodewords:261,errorCodewordsPerBlock:20},H:{groups:[[11,12],[5,13]],totalDataCodewords:197,errorCodewordsPerBlock:24}},{L:{groups:[[5,87],[1,88]],totalDataCodewords:523,errorCodewordsPerBlock:22},M:{groups:[[5,41],[5,42]],totalDataCodewords:415,errorCodewordsPerBlock:24},Q:{groups:[[5,24],[7,25]],totalDataCodewords:295,errorCodewordsPerBlock:30},H:{groups:[[11,12],[7,13]],totalDataCodewords:223,errorCodewordsPerBlock:24}},{L:{groups:[[5,98],[1,99]],totalDataCodewords:589,errorCodewordsPerBlock:24},M:{groups:[[7,45],[3,46]],totalDataCodewords:453,errorCodewordsPerBlock:28},Q:{groups:[[15,19],[2,20]],totalDataCodewords:325,errorCodewordsPerBlock:24},H:{groups:[[3,15],[13,16]],totalDataCodewords:253,errorCodewordsPerBlock:30}},{L:{groups:[[1,107],[5,108]],totalDataCodewords:647,errorCodewordsPerBlock:28},M:{groups:[[10,46],[1,47]],totalDataCodewords:507,errorCodewordsPerBlock:28},Q:{groups:[[1,22],[15,23]],totalDataCodewords:367,errorCodewordsPerBlock:28},H:{groups:[[2,14],[17,15]],totalDataCodewords:283,errorCodewordsPerBlock:28}},{L:{groups:[[5,120],[1,121]],totalDataCodewords:721,errorCodewordsPerBlock:30},M:{groups:[[9,43],[4,44]],totalDataCodewords:563,errorCodewordsPerBlock:26},Q:{groups:[[17,22],[1,23]],totalDataCodewords:397,errorCodewordsPerBlock:28},H:{groups:[[2,14],[19,15]],totalDataCodewords:313,errorCodewordsPerBlock:28}},{L:{groups:[[3,113],[4,114]],totalDataCodewords:795,errorCodewordsPerBlock:28},M:{groups:[[3,44],[11,45]],totalDataCodewords:627,errorCodewordsPerBlock:26},Q:{groups:[[17,21],[4,22]],totalDataCodewords:445,errorCodewordsPerBlock:26},H:{groups:[[9,13],[16,14]],totalDataCodewords:341,errorCodewordsPerBlock:26}},{L:{groups:[[3,107],[5,108]],totalDataCodewords:861,errorCodewordsPerBlock:28},M:{groups:[[3,41],[13,42]],totalDataCodewords:669,errorCodewordsPerBlock:26},Q:{groups:[[15,24],[5,25]],totalDataCodewords:485,errorCodewordsPerBlock:30},H:{groups:[[15,15],[10,16]],totalDataCodewords:385,errorCodewordsPerBlock:28}},{L:{groups:[[4,116],[4,117]],totalDataCodewords:932,errorCodewordsPerBlock:28},M:{groups:[[17,42]],totalDataCodewords:714,errorCodewordsPerBlock:26},Q:{groups:[[17,22],[6,23]],totalDataCodewords:512,errorCodewordsPerBlock:28},H:{groups:[[19,16],[6,17]],totalDataCodewords:406,errorCodewordsPerBlock:30}},{L:{groups:[[2,111],[7,112]],totalDataCodewords:1006,errorCodewordsPerBlock:28},M:{groups:[[17,46]],totalDataCodewords:782,errorCodewordsPerBlock:28},Q:{groups:[[7,24],[16,25]],totalDataCodewords:568,errorCodewordsPerBlock:30},H:{groups:[[34,13]],totalDataCodewords:442,errorCodewordsPerBlock:24}},{L:{groups:[[4,121],[5,122]],totalDataCodewords:1094,errorCodewordsPerBlock:30},M:{groups:[[4,47],[14,48]],totalDataCodewords:860,errorCodewordsPerBlock:28},Q:{groups:[[11,24],[14,25]],totalDataCodewords:614,errorCodewordsPerBlock:30},H:{groups:[[16,15],[14,16]],totalDataCodewords:464,errorCodewordsPerBlock:30}},{L:{groups:[[6,117],[4,118]],totalDataCodewords:1174,errorCodewordsPerBlock:30},M:{groups:[[6,45],[14,46]],totalDataCodewords:914,errorCodewordsPerBlock:28},Q:{groups:[[11,24],[16,25]],totalDataCodewords:664,errorCodewordsPerBlock:30},H:{groups:[[30,16],[2,17]],totalDataCodewords:514,errorCodewordsPerBlock:30}},{L:{groups:[[8,106],[4,107]],totalDataCodewords:1276,errorCodewordsPerBlock:26},M:{groups:[[8,47],[13,48]],totalDataCodewords:1e3,errorCodewordsPerBlock:28},Q:{groups:[[7,24],[22,25]],totalDataCodewords:718,errorCodewordsPerBlock:30},H:{groups:[[22,15],[13,16]],totalDataCodewords:538,errorCodewordsPerBlock:30}},{L:{groups:[[10,114],[2,115]],totalDataCodewords:1370,errorCodewordsPerBlock:28},M:{groups:[[19,46],[4,47]],totalDataCodewords:1062,errorCodewordsPerBlock:28},Q:{groups:[[28,22],[6,23]],totalDataCodewords:754,errorCodewordsPerBlock:28},H:{groups:[[33,16],[4,17]],totalDataCodewords:596,errorCodewordsPerBlock:30}},{L:{groups:[[8,122],[4,123]],totalDataCodewords:1468,errorCodewordsPerBlock:30},M:{groups:[[22,45],[3,46]],totalDataCodewords:1128,errorCodewordsPerBlock:28},Q:{groups:[[8,23],[26,24]],totalDataCodewords:808,errorCodewordsPerBlock:30},H:{groups:[[12,15],[28,16]],totalDataCodewords:628,errorCodewordsPerBlock:30}},{L:{groups:[[3,117],[10,118]],totalDataCodewords:1531,errorCodewordsPerBlock:30},M:{groups:[[3,45],[23,46]],totalDataCodewords:1193,errorCodewordsPerBlock:28},Q:{groups:[[4,24],[31,25]],totalDataCodewords:871,errorCodewordsPerBlock:30},H:{groups:[[11,15],[31,16]],totalDataCodewords:661,errorCodewordsPerBlock:30}},{L:{groups:[[7,116],[7,117]],totalDataCodewords:1631,errorCodewordsPerBlock:30},M:{groups:[[21,45],[7,46]],totalDataCodewords:1267,errorCodewordsPerBlock:28},Q:{groups:[[1,23],[37,24]],totalDataCodewords:911,errorCodewordsPerBlock:30},H:{groups:[[19,15],[26,16]],totalDataCodewords:701,errorCodewordsPerBlock:30}},{L:{groups:[[5,115],[10,116]],totalDataCodewords:1735,errorCodewordsPerBlock:30},M:{groups:[[19,47],[10,48]],totalDataCodewords:1373,errorCodewordsPerBlock:28},Q:{groups:[[15,24],[25,25]],totalDataCodewords:985,errorCodewordsPerBlock:30},H:{groups:[[23,15],[25,16]],totalDataCodewords:745,errorCodewordsPerBlock:30}},{L:{groups:[[13,115],[3,116]],totalDataCodewords:1843,errorCodewordsPerBlock:30},M:{groups:[[2,46],[29,47]],totalDataCodewords:1455,errorCodewordsPerBlock:28},Q:{groups:[[42,24],[1,25]],totalDataCodewords:1033,errorCodewordsPerBlock:30},H:{groups:[[23,15],[28,16]],totalDataCodewords:793,errorCodewordsPerBlock:30}},{L:{groups:[[17,115]],totalDataCodewords:1955,errorCodewordsPerBlock:30},M:{groups:[[10,46],[23,47]],totalDataCodewords:1541,errorCodewordsPerBlock:28},Q:{groups:[[10,24],[35,25]],totalDataCodewords:1115,errorCodewordsPerBlock:30},H:{groups:[[19,15],[35,16]],totalDataCodewords:845,errorCodewordsPerBlock:30}},{L:{groups:[[17,115],[1,116]],totalDataCodewords:2071,errorCodewordsPerBlock:30},M:{groups:[[14,46],[21,47]],totalDataCodewords:1631,errorCodewordsPerBlock:28},Q:{groups:[[29,24],[19,25]],totalDataCodewords:1171,errorCodewordsPerBlock:30},H:{groups:[[11,15],[46,16]],totalDataCodewords:901,errorCodewordsPerBlock:30}},{L:{groups:[[13,115],[6,116]],totalDataCodewords:2191,errorCodewordsPerBlock:30},M:{groups:[[14,46],[23,47]],totalDataCodewords:1725,errorCodewordsPerBlock:28},Q:{groups:[[44,24],[7,25]],totalDataCodewords:1231,errorCodewordsPerBlock:30},H:{groups:[[59,16],[1,17]],totalDataCodewords:961,errorCodewordsPerBlock:30}},{L:{groups:[[12,121],[7,122]],totalDataCodewords:2306,errorCodewordsPerBlock:30},M:{groups:[[12,47],[26,48]],totalDataCodewords:1812,errorCodewordsPerBlock:28},Q:{groups:[[39,24],[14,25]],totalDataCodewords:1286,errorCodewordsPerBlock:30},H:{groups:[[22,15],[41,16]],totalDataCodewords:986,errorCodewordsPerBlock:30}},{L:{groups:[[6,121],[14,122]],totalDataCodewords:2434,errorCodewordsPerBlock:30},M:{groups:[[6,47],[34,48]],totalDataCodewords:1914,errorCodewordsPerBlock:28},Q:{groups:[[46,24],[10,25]],totalDataCodewords:1354,errorCodewordsPerBlock:30},H:{groups:[[2,15],[64,16]],totalDataCodewords:1054,errorCodewordsPerBlock:30}},{L:{groups:[[17,122],[4,123]],totalDataCodewords:2566,errorCodewordsPerBlock:30},M:{groups:[[29,46],[14,47]],totalDataCodewords:1992,errorCodewordsPerBlock:28},Q:{groups:[[49,24],[10,25]],totalDataCodewords:1426,errorCodewordsPerBlock:30},H:{groups:[[24,15],[46,16]],totalDataCodewords:1096,errorCodewordsPerBlock:30}},{L:{groups:[[4,122],[18,123]],totalDataCodewords:2702,errorCodewordsPerBlock:30},M:{groups:[[13,46],[32,47]],totalDataCodewords:2102,errorCodewordsPerBlock:28},Q:{groups:[[48,24],[14,25]],totalDataCodewords:1502,errorCodewordsPerBlock:30},H:{groups:[[42,15],[32,16]],totalDataCodewords:1142,errorCodewordsPerBlock:30}},{L:{groups:[[20,117],[4,118]],totalDataCodewords:2812,errorCodewordsPerBlock:30},M:{groups:[[40,47],[7,48]],totalDataCodewords:2216,errorCodewordsPerBlock:28},Q:{groups:[[43,24],[22,25]],totalDataCodewords:1582,errorCodewordsPerBlock:30},H:{groups:[[10,15],[67,16]],totalDataCodewords:1222,errorCodewordsPerBlock:30}},{L:{groups:[[19,118],[6,119]],totalDataCodewords:2956,errorCodewordsPerBlock:30},M:{groups:[[18,47],[31,48]],totalDataCodewords:2334,errorCodewordsPerBlock:28},Q:{groups:[[34,24],[34,25]],totalDataCodewords:1666,errorCodewordsPerBlock:30},H:{groups:[[20,15],[61,16]],totalDataCodewords:1276,errorCodewordsPerBlock:30}}];function Og(t,e){var i=0,o=Mg.length-1,r=Math.floor(Mg.length/2);do{t<Mg[r][e].totalDataCodewords?o=r:i=r,r=i+Math.floor((o-i)/2)}while(o-i>1);return t<=Mg[i][e].totalDataCodewords?r+1:o+1}var Lg=function(){};Lg.prototype.getEncodingResult=function(t,e){var i=function(t){var e,i=[],o=0,r=t;for(i.push(kg(r,8,5,8,e)),e=i[0].mode,r=r.substr(i[0].modeString.length);r.length>0;){var n=kg(r,17,9,16,e);n.mode!==e?(e=n.mode,i.push(n),o++):i[o].modeString+=n.modeString,r=r.substr(n.modeString.length)}return i}(t),o=function(t){for(var e=0,i=0;i<t.length;i++)e+=Tg[t[i].mode].getStringBitsLength(t[i].modeString.length);return Math.ceil(e/8)}(i),r=Og(o,e),n=function(t,e){for(var i="",o=0;o<t.length;o++)i+=Tg[t[o].mode].encode(t[o].modeString,e);return i}(i,r);return new yg(n,r)};var Bg=function(){this.initProperties(),this.mode=Tg[this.encodingMode]};Bg.prototype.initProperties=function(){cg(this,{encodingMode:"byte",utfBOM:"111011111011101110111111",initialModeCountStringLength:20,ranges:[128,2048,65536,2097152,67108864]})},Bg.prototype.getEncodingResult=function(t,e){var i=this.encode(t),o=Og(this.getDataCodewordsCount(i),e),r=this.mode.getModeCountString(i.length/8,o)+i;return new yg(r,o)},Bg.prototype.getDataCodewordsCount=function(t){var e=t.length;return Math.ceil((this.initialModeCountStringLength+e)/8)},Bg.prototype.encode=function(t){for(var e=this.utfBOM,i=0;i<t.length;i++)e+=this.encodeCharacter(t.charCodeAt(i));return e},Bg.prototype.encodeCharacter=function(t){var e=this.getBytesCount(t),i=e-1,o="";if(1===e)o=dg(t,8);else{for(var r=8-e,n=0;n<i;n++)o=dg(t>>6*n&63|128,8)+o;o=(t>>6*i|255>>r<<r).toString(2)+o}return o},Bg.prototype.getBytesCount=function(t){for(var e=this.ranges,i=0;i<e.length;i++)if(t<e[i])return i+1};var Ig={1:0},Eg={0:1},Rg={15:20,16:20,18:24,19:24,22:20,24:22,26:24,28:20,30:20,31:24,32:28,33:24,36:18,37:22,39:20,40:24},Vg=[1,0,1,1,1],zg=[1,0,1],jg={L:"01",M:"00",Q:"11",H:"10"},Dg=["11101100","00010001"],Fg=[function(t,e){return(t+e)%2==0},function(t,e){return t%2==0},function(t,e){return e%3==0},function(t,e){return(t+e)%3==0},function(t,e){return(Math.floor(t/2)+Math.floor(e/3))%2==0},function(t,e){return t*e%2+t*e%3==0},function(t,e){return(t*e%2+t*e%3)%2==0},function(t,e){return((t+e)%2+t*e%3)%2==0}],Hg=[[1,0],[1,25,0]];function Ng(t,e,i,o){for(var r=0;r<t.length;r++)t[r][i][o]=e}function Ug(t,e,i,o){for(var r=0;r<Fg.length;r++)t[r][i][o]=Fg[r](i,o)?1^e:parseInt(e,10)}function Gg(t,e){for(var i=[],o=t.length-2;o>=0;o--)i[o]=t[o]^e[o];return i}function Wg(t,e){for(var i=[],o=0;o<t.length;o++)for(var r=0;r<e.length;r++)void 0===i[o+r]?i[o+r]=(t[o]+(e[r]>=0?e[r]:0))%255:i[o+r]=Ig[Eg[i[o+r]]^Eg[(t[o]+e[r])%255]];return i}function Xg(t,e){var i=[],o=t.length-1;do{i[o]=Eg[(t[o]+e)%255],o--}while(void 0!==t[o]);return i}function Yg(t,e){var i,o,r=Hg[e-1],n=new Array(e).concat(t),s=new Array(n.length-r.length).concat(r),a=t.length,p=[];for(o=0;o<a;o++)i=Xg(s,Ig[n[n.length-1]]),s.splice(0,1),n=Gg(i,n);for(o=n.length-1;o>=0;o--)p[e-1-o]=dg(n[o],8);return p}function qg(t,e,i){var o=fg(e),r=e.length-1,n=t<<r,s=dg(t,i-r),a=function(t,e){var i=e.toString(2).length,o=t.toString(2).length,r=t;do{o=(r^=e<<o-i).toString(2).length}while(o>=i);return r}(n,o);return s+dg(a,r)}function Zg(t,e){return parseInt(t.charAt(e),10)}function Qg(t,e){var i,o,r=t[0],n=0,s=e.length;for(i=0,o=8;i<=8;i++)6!==i&&Ng(t,Zg(e,s-1-n++),i,o);for(i=8,o=7;o>=0;o--)6!==o&&Ng(t,Zg(e,s-1-n++),i,o);for(n=0,o=r.length-1,i=8;o>=r.length-8;o--)Ng(t,Zg(e,s-1-n++),i,o);for(Ng(t,1,r.length-8,8),i=r.length-7,o=8;i<r.length;i++)Ng(t,Zg(e,s-1-n++),i,o)}function Kg(t,e){for(var i,o,r,n=t[0].length,s=n-11,a=n-11,p=0;p<e.length;p++)i=Math.floor(p/3),o=p%3,Ng(t,r=Zg(e,e.length-p-1),0+i,s+o),Ng(t,r,a+o,0+i)}function $g(t,e,i,o){for(var r,n=e.length+2,s=e.length+1,a=0;a<e.length;a++)for(var p=a;p<n-a;p++)Ng(t,r=e[a],i+p,o+a),Ng(t,r,i+a,o+p),Ng(t,r,i+s-p,o+s-a),Ng(t,r,i+s-a,o+s-p)}function Jg(t,e,i,o){var r=i,n=o,s=t[0];do{Ng(t,0,r,o),Ng(t,0,i,n),r+=e[0],n+=e[1]}while(r>=0&&r<s.length)}function ty(t,e,i,o,r){e[t][o]=(e[t][o]<<1^r)%128,93===e[t][o]&&(i[t]+=40)}function ey(t,e,i,o,r,n){i[t][n]===o?r[t][n]++:(i[t][n]=o,r[t][n]>=5&&(e[t]+=3+r[t][n]-5),r[t][n]=1)}function iy(t,e){var i=Math.floor(t/e*100),o=i%5,r=Math.abs(i-o-50),n=Math.abs(i+5-o-50);return 10*Math.min(r/5,n/5)}function oy(t,e,i){var o=function(t){return t&&t.toLowerCase().indexOf("utf_8")>=0?new Bg:new Lg}(i),r=o.getEncodingResult(t,e),n=r.version,s=Mg[n-1][e],a=function(t,e){for(var i,o,r,n,s,a=0,p=[],l=[],h=e.groups,c=0;c<h.length;c++){r=h[c][0];for(var u=0;u<r;u++){o=h[c][1],i=[],n=[];for(var d=1;d<=o;d++)s=t.substring(a,a+8),i.push(s),n[o-d]=fg(s),a+=8;p.push(i),l.push(Yg(n,e.errorCodewordsPerBlock))}}return[p,l]}(function(t,e){for(var i=8*e,o=0,r=0,n=t;n.length<i&&o<4;)n+="0000".charAt(o++);for(n.length%8!=0&&(n+=new Array(9-n.length%8).join("0"));n.length<i;)n+=Dg[r],r^=1;return n}(r.dataString,s.totalDataCodewords),s),p=function(t){for(var e=[],i=17+4*t,o=0;o<Fg.length;o++){e[o]=new Array(i);for(var r=0;r<i;r++)e[o][r]=new Array(i)}return e}(n);!function(t){var e=t[0].length;$g(t,Vg,0,0),Jg(t,[-1,-1],7,7),$g(t,Vg,e-7,0),Jg(t,[1,-1],e-8,7),$g(t,Vg,0,e-7),Jg(t,[-1,1],7,e-8)}(p),function(t,e){if(!(e<2)){var i,o,r=t[0],n=r.length,s=Math.floor(e/7),a=[6],p=0;for((i=Rg[e])?o=(n-13-i)/s:i=o=(n-13)/(s+1),a.push(a[p++]+i);a[p]+o<n;)a.push(a[p++]+o);for(var l=0;l<a.length;l++)for(var h=0;h<a.length;h++)void 0===r[a[l]][a[h]]&&$g(t,zg,a[l]-2,a[h]-2)}}(p,n),function(t){for(var e=1,i=t[0].length,o=8;o<i-8;o++)Ng(t,e,6,o),Ng(t,e,o,6),e^=1}(p),n>=7&&Kg(p,dg(0,18)),Qg(p,dg(0,15)),function(t,e){for(var i,o,r,n=new gg(t[0]),s=0;s<e.length;s++)for(i=e[s],o=0;i.length>0;){for(var a=0;a<i.length;a++)for(var p=0;p<8;p++)r=n.getNextCell(),Ug(t,i[a][o].charAt(p),r.row,r.column);for(o++;i[0]&&o===i[0].length;)i.splice(0,1)}for(;r=n.getNextRemainderCell();)Ug(t,0,r.row,r.column)}(p,a);var l=function(t){var e,i,o=[],r=[],n=[],s=[],a=[],p=t[0].length;for(i=0;i<t.length;i++)o[i]=0,n[i]=0,a[i]=[0,0],s[i]=[0,0],r[i]=[];for(var l=0;l<p;l++)for(var h=0;h<p;h++)for(var c=0;c<t.length;c++)e=t[c],n[c]+=parseInt(e[l][h],10),r[c][0]===e[l][h]&&l+1<p&&h-1>=0&&e[l+1][h]===r[c][0]&&e[l+1][h-1]===r[c][0]&&(o[c]+=3),ty(c,s,o,0,e[l][h]),ty(c,s,o,1,e[h][l]),ey(c,o,r,e[l][h],a,0),ey(c,o,r,e[h][l],a,1);var u,d=p*p,f=Number.MAX_VALUE;for(i=0;i<o.length;i++)o[i]+=iy(n[i],d),o[i]<f&&(f=o[i],u=i);return u}(p),h=p[l];return n>=7&&Kg([h],function(t){return qg(t,"1111100100101",18)}(n)),Qg([h],function(t){var e,i="";if(0===fg(t))return"101010000010010";e=qg(fg(t),"10100110111",15);for(var o=0;o<e.length;o++)i+=e.charAt(o)^"101010000010010".charAt(o);return i}(jg[e]+dg(l,3))),h}!function(){var t,e;for(e=1;e<255;e++)(t=2*Eg[e-1])>255&&(t^=285),Eg[e]=t,Ig[t]=e;t=2*Eg[e-1]^285,Eg[e]=t,Eg[-1]=0}(),function(){for(var t=2;t<=68;t++){var e=Hg[t-1],i=[t,0];Hg[t]=Wg(e,i)}}();var ry=Math.round,ny=[[0,1],[1,1],[1,2],[2,2],[2,1],[3,1],[3,0],[2,0],[2,-1],[1,-1],[1,0]],sy=[[0,1],[1,1],[1,0]],ay=function(t,e,i){void 0===i&&(i=we),this.options=at({},this.options,e),this.element=t,this.wrapper=this.element,this.onError=i,this._initElement(),this._initSurface(),this.setOptions(e)};ay.prototype.destroy=function(){this._destroySurface()},ay.prototype._initElement=function(){W(this.element,"k-qrcode")},ay.prototype._initSurface=function(){var t=this.options,e=this.surface;e&&e.options.type===t.renderAs||(this._destroySurface(),this._initSurfaceElement(),this.surface=this._createSurface())},ay.prototype._createSurface=function(){return q.drawing.Surface.create(this.surfaceElement,{type:this.options.renderAs})},ay.prototype._destroySurface=function(){this.surface&&(this.surface.destroy(),this.surface=null,this._destroySurfaceElement())},ay.prototype._initSurfaceElement=function(){this.surfaceElement||(this.surfaceElement=document.createElement("div"),this.surfaceElement.style.position="relative",this.element.appendChild(this.surfaceElement))},ay.prototype._destroySurfaceElement=function(){this.surfaceElement&&this.surfaceElement.parentNode&&(this.surfaceElement.parentNode.removeChild(this.surfaceElement),this.surfaceElement=null)},ay.prototype.redraw=function(){var t=this._getSize();this.surface.clear(),this.surface.setSize({width:t,height:t}),this.createVisual(),this.surface.draw(this.visual)},ay.prototype.getSize=function(){var t=this.element,e=t.clientWidth,i=t.clientHeight,o={width:0,height:0};return e>0&&(o.width=e),i&&(o.height=i),o},ay.prototype._resize=function(){this.redraw()},ay.prototype.createVisual=function(){this.visual=this._render()},ay.prototype.exportVisual=function(){return this._render()},ay.prototype._render=function(){var t,e,i,o,r,n=this._value,s=this.options.border||{},a=this.options.padding||0,p=s.width||0;s.width=p;var l=new q.drawing.Group;try{n&&(i=oy(n,this.options.errorCorrection,this.options.encoding),r=(o=this._getSize())-2*(p+a),t=this._calculateBaseUnit(r,i.length),e=p+a+(r-i.length*t)/2,l.append(this._renderBackground(o,s)),l.append(this._renderMatrix(i,t,e)),this._hasCustomLogo()?l.append(this._renderLogo(o,t)):this._isSwiss()&&l.append(this._renderSwissCode(o,t)))}catch(t){this.onError(t)}return l},ay.prototype._renderLogo=function(t,e){var i,o=ry(t/2),r=this._getLogoSize(7*e),n=this.options.overlay.imageUrl,s={x:o-r.width/2,y:o-r.height/2};return i=new q.geometry.Rect(new q.geometry.Point(s.x,s.y),new q.geometry.Size(r.width,r.height)),new q.drawing.Image(n,i)},ay.prototype._renderSwissCode=function(t,e){var i=this._getLogoSize(7*e),o=(i=Math.max(i.width,i.height))/4,r=o/2,n=t/2,s={},a=new q.drawing.Group;return s.x=s.y=Math.ceil(n-e-i/2),a.append(this._renderShape(s,Math.ceil(i+2*e),sy,"#fff")),s.x=s.y=n-i/2,a.append(this._renderShape(s,i,sy,this.options.color)),s.x=n+r-i/2,s.y=n+r+o-i/2,a.append(this._renderShape(s,o,ny,"#fff")),a},ay.prototype._renderShape=function(t,e,i,o){var r=new q.drawing.MultiPath({fill:{color:o},stroke:null});r.moveTo(t.x,t.y);for(var n=0;n<i.length;n++)r.lineTo(t.x+e*i[n][0],t.y+e*i[n][1]);return r.close(),r},ay.prototype._getSize=function(){var t;if(this.options.size)t=parseInt(this.options.size,10);else{var e=sg(this.element,this.options.renderAs),i=Math.min(e.width,e.height);t=i>0?i:200}return t},ay.prototype._calculateBaseUnit=function(t,e){var i=Math.floor(t/e);if(i<1){var o=Math.ceil(1*e);this.onError(new Error("Insufficient size for QR Code: the current size is "+t+"px and the minimum size is "+o+"px."))}else i*e>=t&&i-1>=1&&i--;return i},ay.prototype._renderMatrix=function(t,e,i){for(var o=new q.drawing.MultiPath({fill:{color:this.options.color},stroke:null}),r=0;r<t.length;r++)for(var n=i+r*e,s=0;s<t.length;){for(;0===t[r][s]&&s<t.length;)s++;if(s<t.length){for(var a=s;1===t[r][s];)s++;var p=ry(i+a*e),l=ry(n),h=ry(i+s*e),c=ry(n+e);o.moveTo(p,l).lineTo(p,c).lineTo(h,c).lineTo(h,l).close()}}return o},ay.prototype._renderBackground=function(t,e){var i=new wi(0,0,t,t).unpad(e.width/2);return q.drawing.Path.fromRect(i.toRect(),{fill:{color:this.options.background},stroke:{color:e.color,width:e.width}})},ay.prototype.setOptions=function(t){var e=t||{};this.options=cg(this.options,e),void 0!==t.value&&(this._value=String(this.options.value)),this._initSurface(),this.redraw()},ay.prototype.value=function(t){if(void 0===t)return this._value;this._value=String(t),this.redraw()},ay.prototype._hasCustomLogo=function(){return Boolean(this.options.overlay.imageUrl)},ay.prototype._isSwiss=function(){return"swiss"===this.options.overlay.type},ay.prototype._getLogoSize=function(t){var e=this.options.overlay.width,i=this.options.overlay.height;return e||i?e&&!i?i=e:!e&&i&&(e=i):e=i=t,{width:e,height:i}},te(ay,{name:"QRCode",renderAs:"svg",encoding:"ISO_8859_1",value:"",errorCorrection:"L",background:"#fff",color:"#000",size:"",padding:0,border:{color:"",width:0},overlay:{type:"image",imageUrl:"",width:0,height:0}});const py=ay,ly=function(t){return void 0===t&&(t="ISO_8859_1"),function(e){try{oy(e,"L",t)}catch(t){return{valid:!1,error:t}}return{valid:!0}}};var hy={WGS84:{a:6378137,b:6356752.314245179,f:.0033528106647474805,e:.08181919084262149}};function cy(t){return t*t}var uy=Math,dy=uy.abs,fy=uy.atan,gy=uy.atan2,yy=uy.cos,vy=uy.sin,my=uy.tan,xy=function(t,e){this.initProperties(),1===arguments.length?(this.lat=t[0],this.lng=t[1]):(this.lat=t,this.lng=e)};xy.prototype.initProperties=function(){at(this,{DISTANCE_ITERATIONS:100,DISTANCE_CONVERGENCE:1e-12,DISTANCE_PRECISION:2,FORMAT:"{0:N6}{1:N6}"})},xy.prototype.toArray=function(){return[this.lat,this.lng]},xy.prototype.equals=function(t){return t&&t.lat===this.lat&&t.lng===this.lng},xy.prototype.clone=function(){return new xy(this.lat,this.lng)},xy.prototype.round=function(t){return this.lng=Zt(this.lng,t),this.lat=Zt(this.lat,t),this},xy.prototype.wrap=function(){return this.lng=this.lng%180,this.lat=this.lat%90,this},xy.prototype.distanceTo=function(t,e){return this.greatCircleTo(t,e).distance},xy.prototype.destination=function(t,e,i){var o=qt(e),r=i||hy.WGS84,n=qt(this.lat),s=qt(this.lng),a=t/r.a,p=uy.asin(vy(n)*yy(a)+yy(n)*vy(a)*yy(o)),l=s+gy(vy(o)*vy(a)*yy(n),yy(a)-vy(n)*vy(p));return new xy(Dt(p),Dt(l))},xy.prototype.greatCircleTo=function(t,e){var i=xy.create(i),o=e||hy.WGS84;if(!i||this.clone().round(8).equals(i.clone().round(8)))return{distance:0,azimuthFrom:0,azimuthTo:0};for(var r,n,s,a,p,l,h,c,u=o.a,d=o.b,f=o.f,g=qt(i.lng-this.lng),y=fy((1-f)*my(qt(this.lat))),v=vy(y),m=yy(y),x=fy((1-f)*my(qt(i.lat))),b=vy(x),_=yy(x),w=g,k=this.DISTANCE_ITERATIONS,A=!1;!A&&k-- >0;){n=vy(w),s=yy(w),a=uy.sqrt(cy(_*n)+cy(m*b-v*_*s)),c=gy(a,l=v*b+m*_*s);var S=m*_*n/a;h=0,0!=(p=1-cy(S))&&(h=l-2*v*b/p),r=w;var C=f/16*p*(4+f*(4-3*p));w=g+(1-C)*f*S*(c+C*a*(h+C*l*(2*cy(h)-1))),A=dy(w-r)<=this.DISTANCE_CONVERGENCE}var P=p*(cy(u)-cy(d))/cy(d),T=1+P/16384*(4096+P*(P*(320-175*P)-768)),M=P/1024*(256+P*(P*(74-47*P)-128)),O=M*a*(h+M/4*(l*(2*cy(h)-1)-M/6*h*(4*cy(a)-3)*(4*cy(h)-3))),L=gy(_*n,m*b-v*_*s),B=gy(m*n,-v*_+m*b*s);return{distance:Zt(d*T*(c-O),this.DISTANCE_PRECISION),azimuthFrom:Dt(L),azimuthTo:Dt(B)}},xy.prototype.toString=function(){return String(this.lat)+","+String(this.lng)},xy.fromLngLat=function(t){return new xy(t[1],t[0])},xy.fromLatLng=function(t){return new xy(t[0],t[1])},xy.create=function(t,e){if(jt(t))return t instanceof xy?t.clone():1===arguments.length&&2===t.length?xy.fromLatLng(t):new xy(t,e)};var by=Math,_y=by.atan,wy=by.exp,ky=by.pow,Ay=by.sin,Sy=by.log,Cy=by.tan,Py=q.geometry.Point,Ty=by.PI,My=Ty/2,Oy=Ty/4,Ly=Ty/180,By=hy.WGS84,Iy=function(t){this.initProperties(),this._initOptions(t)};Iy.prototype._initOptions=function(t){this.options=at({},this.options,t)},Iy.prototype.initProperties=function(){at(this,{MAX_LNG:180,MAX_LAT:85.0840590501,INVERSE_ITERATIONS:15,INVERSE_CONVERGENCE:1e-12})},Iy.prototype.forward=function(t,e){var i=this,o=i.options,r=o.datum.a,n=o.centralMeridian,s=Xt(t.lat,-i.MAX_LAT,i.MAX_LAT),a=e?Xt(t.lng,-i.MAX_LNG,i.MAX_LNG):t.lng,p=qt(a-n)*r,l=i._projectLat(s);return new Py(p,l)},Iy.prototype._projectLat=function(t){var e=this.options.datum,i=e.e,o=e.a,r=qt(t),n=Cy(Oy+r/2),s=i*Ay(r),a=ky((1-s)/(1+s),i/2);return o*Sy(n*a)},Iy.prototype.inverse=function(t,e){var i=this,o=i.options,r=o.datum.a,n=o.centralMeridian,s=t.x/(Ly*r)+n,a=Xt(i._inverseY(t.y),-i.MAX_LAT,i.MAX_LAT);return e&&(s=Xt(s,-i.MAX_LNG,i.MAX_LNG)),new xy(a,s)},Iy.prototype._inverseY=function(t){var e,i=this,o=i.options.datum,r=o.a,n=o.e,s=n/2,a=wy(-t/r),p=My-2*_y(a);for(e=0;e<=i.INVERSE_ITERATIONS;e++){var l=n*Ay(p),h=ky((1-l)/(1+l),s),c=My-2*_y(a*h)-p;if(p+=c,by.abs(c)<=i.INVERSE_CONVERGENCE)break}return Dt(p)},te(Iy,{centralMeridian:0,datum:By});var Ey=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),at(this,{MAX_LAT:85.0511287798})},e.prototype._projectLat=function(t){var e=this.options.datum.a,i=qt(t),o=Cy(Oy+i/2);return e*Sy(o)},e.prototype._inverseY=function(t){var e=this.options.datum.a,i=wy(-t/e);return Dt(My-2*_y(i))},e}(Iy),Ry=function(){};Ry.prototype.forward=function(t){return new Py(t.lng,t.lat)},Ry.prototype.inverse=function(t){return new xy(t.y,t.x)};var Vy=function(){var t=this._proj=new Ey,e=this.c=2*Ty*t.options.datum.a;this._tm=q.geometry.transform().translate(.5,.5).scale(1/e,-1/e),this._itm=q.geometry.transform().scale(e,-e).translate(-.5,-.5)};Vy.prototype.toPoint=function(t,e,i){return this._proj.forward(t,i).transform(this._tm).scale(e||1)},Vy.prototype.toLocation=function(t,e,i){var o=t.clone().scale(1/(e||1)).transform(this._itm);return this._proj.inverse(o,i)};var zy=function(){this._proj=new Iy};zy.prototype.toPoint=function(t){return this._proj.forward(t)},zy.prototype.toLocation=function(t){return this._proj.inverse(t)};var jy=function(){this._proj=new Ry};jy.prototype.toPoint=function(t){return this._proj.forward(t)},jy.prototype.toLocation=function(t){return this._proj.inverse(t)},Object.assign;var Dy=function(t,e){return t.bind(e)},Fy=function(t){var e=document.createElement("div");return e.innerHTML=t,e.firstChild},Hy=function(t){for(;t.firstChild;)t.removeChild(t.firstChild)},Ny=function(t,e){e.insertBefore(t,e.firstChild)},Uy=function(t){return t&&String(t).endsWith("px")?t:String(t)+"px"},Gy=function(t,e){var i=t.prototype;i.events?e.forEach((function(t){i.events.indexOf(t)<0&&i.events.push(t)})):i.events=e},Wy=function(t){switch(t){case"topLeft":return"k-top-start";case"topRight":return"k-top-end";case"bottomLeft":return"k-bottom-start";case"bottomRight":return"k-bottom-end"}return[].join(" ")},Xy=function(t){function e(e,i){t.call(this),this.element=e,this._initOptions(i),this.items=[],W(this.element,"k-widget k-attribution")}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._initOptions=function(t){this.options=at({},this.options,t)},e.prototype.filter=function(t,e){this._extent=t,this._zoom=e,this._render()},e.prototype.add=function(t){var e=t;jt(t)&&("string"==typeof t&&(e={text:t}),this.items.push(e),this._render())},e.prototype.remove=function(t){for(var e=[],i=0;i<this.items.length;i++){var o=this.items[i];o.text!==t&&e.push(o)}this.items=e,this._render()},e.prototype.clear=function(){this.items=[],Hy(this.element)},e.prototype._render=function(){for(var t=[],e=0;e<this.items.length;e++){var i=this.items[e],o=this._itemText(i);""!==o&&t.push(o)}t.length>0?(Hy(this.element),function(t,e){var i=document.createElement("div");for(i.innerHTML=t;i.childNodes.length>0;)e.appendChild(i.childNodes[0])}(t.join(this.options.separator),this.element),this.showElement()):this.hideElement()},e.prototype.hideElement=function(){this.element.style.display="none"},e.prototype.showElement=function(){this.element.style.display=""},e.prototype._itemText=function(t){var e="",i=this._inZoomLevel(t.minZoom,t.maxZoom),o=this._inArea(t.extent);return i&&o&&(e+=t.text),e},e.prototype._inZoomLevel=function(t,e){var i=Kt(t,-Number.MAX_VALUE),o=Kt(e,Number.MAX_VALUE);return this._zoom>i&&this._zoom<o},e.prototype._inArea=function(t){var e=!0;return t&&(e=t.contains(this._extent)),e},e}(Xe);te(Xy,{name:"Attribution",separator:" | "});var Yy={up:{className:"k-navigator-n",iconClass:"k-i-caret-alt-up"},down:{className:"k-navigator-s",iconClass:"k-i-caret-alt-down"},right:{className:"k-navigator-e",iconClass:"k-i-caret-alt-right"},left:{className:"k-navigator-w",iconClass:"k-i-caret-alt-left"}};function qy(t,e){var i='<button type="button" class="k-button k-button-square k-rounded-full k-button-flat k-button-flat-base k-icon-button '+Yy[t].className+'" aria-label="move '+t+'">'+ae({icon:"caret-alt-"+t,iconClass:"k-button-icon",svgIcons:e.svgIcons,type:e.type})+"</button>";return Fy(i)}var Zy=function(t){function e(e,i){t.call(this),this.element=e,this._initOptions(i);var o=qy("up",i.icons),r=qy("right",i.icons),n=qy("down",i.icons),s=qy("left",i.icons);this.element.appendChild(o),this.element.appendChild(r),this.element.appendChild(n),this.element.appendChild(s),W(this.element,"k-widget k-navigator"),Re(this.element,"click",".k-button",Dy(this._click,this));var a=this.element.parentNode.closest("[data-role]");this._keyroot=a||this.element,this._tabindex(this._keyroot),this._keydownHandler=Dy(this._keydown,this),Re(this._keyroot,"keydown",this._keydownHandler)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.destroy=function(){this.dispose()},e.prototype.dispose=function(){Ve(this._keyroot,"keydown",this._keydownHandler)},e.prototype._tabindex=function(t){var e=t||this.wrapper||this.element,i=this.element,o="tabindex",r=e.getAttribute(o)||i.getAttribute(o);i.removeAttribute(o),e.setAttribute(o,isNaN(r)?0:r)},e.prototype._initOptions=function(t){this.options=at({},this.options,t)},e.prototype._pan=function(t,e){var i=this.options.panStep;this.trigger("pan",{x:t*i,y:e*i})},e.prototype._click=function(t){var e=0,i=0,o=t.currentTarget;o.matches(".k-navigator-n")?i=1:o.matches(".k-navigator-s")?i=-1:o.matches(".k-navigator-e")?e=1:o.matches(".k-navigator-w")&&(e=-1),this._pan(e,i),t.preventDefault()},e.prototype._keydown=function(t){switch(t.which){case ke.UP:this._pan(0,1),t.preventDefault();break;case ke.DOWN:this._pan(0,-1),t.preventDefault();break;case ke.RIGHT:this._pan(1,0),t.preventDefault();break;case ke.LEFT:this._pan(-1,0),t.preventDefault()}},e}(Xe);function Qy(t,e,i){var o='<button type="button" class="k-button k-button-md k-rounded-md k-button-solid k-button-solid-base k-icon-button k-zoom-'+t+'" title="zoom-'+t+'" aria-label="zoom-'+t+'">'+ae({icon:e,iconClass:"k-button-icon",svgIcons:i.svgIcons,type:i.type})+"</button>";return Fy(o)}te(Zy,{name:"Navigator",panStep:1}),Gy(Zy,["pan"]);var Ky="change",$y=function(t){function e(e,i,o){t.call(this),this.element=e,this._initOptions(i);var r=Qy("in","plus",o),n=Qy("out","minus",o);this.element.appendChild(r),this.element.appendChild(n),this.element.setAttribute("role","group"),W(this.element,"k-widget k-zoom-control k-button-group k-group-horizontal"),this._clickHandler=this._click.bind(this),Re(this.element,"click",".k-button",this._clickHandler);var s=this.element.parentNode.closest("[data-role]");this._keyroot=s||this.element,this._tabindex(this._keyroot),this._keydownHandler=this._keydown.bind(this),Re(this._keyroot,"keydown",this._keydownHandler)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.destroy=function(){this.element&&Ve(this.element,"click",this._clickHandler),this._keyroot&&Ve(this._keyroot,"keydown",this._keydownHandler)},e.prototype._tabindex=function(t){var e=t||this.wrapper||this.element,i=this.element,o="tabindex",r=e.getAttribute(o)||i.getAttribute(o);i.removeAttribute(o),e.setAttribute(o,isNaN(r)?0:r)},e.prototype._initOptions=function(t){this.options=at({},this.options,t)},e.prototype._change=function(t){var e=this.options.zoomStep;this.trigger(Ky,{delta:t*e})},e.prototype._click=function(t){var e=1;kt(t.currentTarget,"k-zoom-out")&&(e=-1),this._change(e),t.preventDefault()},e.prototype._keydown=function(t){switch(t.which){case ke.NUMPAD_PLUS:case 187:case 61:this._change(1);break;case ke.NUMPAD_MINUS:case 189:case 173:this._change(-1)}},e}(Xe);te($y,{name:"ZoomControl",zoomStep:1}),Gy($y,[Ky]);var Jy=Math,tv=Jy.max,ev=Jy.min,iv=function(t,e){var i=xy.create(t),o=xy.create(e);i.lng+180>o.lng+180&&i.lat+90<o.lat+90?(this.se=i,this.nw=o):(this.se=o,this.nw=i)},ov={World:{configurable:!0}};iv.prototype.contains=function(t){var e=this.nw,i=this.se,o=Kt(t.lng,t[1]),r=Kt(t.lat,t[0]);return t&&o+180>=e.lng+180&&o+180<=i.lng+180&&r+90>=i.lat+90&&r+90<=e.lat+90},iv.prototype.center=function(){var t=this.nw,e=this.se,i=t.lng+(e.lng-t.lng)/2,o=t.lat+(e.lat-t.lat)/2;return new xy(o,i)},iv.prototype.containsAny=function(t){for(var e=!1,i=0;i<t.length;i++)e=e||this.contains(t[i]);return e},iv.prototype.include=function(t){var e=this.nw,i=this.se,o=Kt(t.lng,t[1]),r=Kt(t.lat,t[0]);e.lng=ev(e.lng,o),e.lat=tv(e.lat,r),i.lng=tv(i.lng,o),i.lat=ev(i.lat,r)},iv.prototype.includeAll=function(t){for(var e=0;e<t.length;e++)this.include(t[e])},iv.prototype.edges=function(){var t=this.nw,e=this.se;return{nw:this.nw,ne:new xy(t.lat,e.lng),se:this.se,sw:new xy(e.lat,t.lng)}},iv.prototype.toArray=function(){var t=this.nw,e=this.se;return[t,new xy(t.lat,e.lng),e,new xy(e.lat,t.lng)]},iv.prototype.overlaps=function(t){return this.containsAny(t.toArray())||t.containsAny(this.toArray())},iv.create=function(t,e){return t instanceof iv?t:t&&e?new iv(t,e):t&&4===t.length&&!e?new iv([t[0],t[1]],[t[2],t[3]]):void 0},ov.World.get=function(){return new iv([90,-180],[-90,180])},Object.defineProperties(iv,ov);var rv="centerChange",nv=function(t,e){this.widgetService=t,this.options=at({},this.options,e),this.offset={x:0,y:0}},sv={anchor:{configurable:!0}};nv.prototype.show=function(t,e){this.location!==e.location&&(this.anchor=t,this.location=e.location,this.widgetService.notify("showTooltip",Object.assign({anchor:this.anchor},e)),this.visible=!0)},nv.prototype.hide=function(){this.widgetService&&this.widgetService.notify("hideTooltip"),this.visible=!1,this.location=null},sv.anchor.get=function(){return this._anchor},sv.anchor.set=function(t){var e=this.widgetService.widget._toDocumentCoordinates({x:t.left-this.offset.x,y:t.top-this.offset.y});this._anchor={left:e.left,top:e.top}},nv.prototype.destroy=function(){this.widgetService=null},Object.defineProperties(nv.prototype,sv),te(nv,{border:{width:1},opacity:1});var av=function(t,e){this.support=ze(),this._initOptions(e),this.map=t;var i=document.createElement("div");W(i,"k-layer"),i.style.zIndex=this.options.zIndex,i.style.opacity=this.options.opacity,this.element=i,t.scrollElement.appendChild(this.element),this._beforeReset=this._beforeReset.bind(this),this._reset=this._reset.bind(this),this._resize=this._resize.bind(this),this._panEnd=this._panEnd.bind(this),this._activate(),this._updateAttribution()};av.prototype.destroy=function(){this._deactivate()},av.prototype._initOptions=function(t){this.options=at({},this.options,t)},av.prototype.show=function(){this.reset(),this._activate(),this._applyExtent(!0)},av.prototype.hide=function(){this._deactivate(),this._setVisibility(!1)},av.prototype.reset=function(){this._beforeReset(),this._reset()},av.prototype._reset=function(){this._applyExtent()},av.prototype._beforeReset=function(){},av.prototype._resize=function(){},av.prototype._panEnd=function(){this._applyExtent()},av.prototype._applyExtent=function(){var t=this.options,e=this.map.zoom(),i=!jt(t.minZoom)||e>=t.minZoom,o=!jt(t.maxZoom)||e<=t.maxZoom,r=iv.create(t.extent),n=!r||r.overlaps(this.map.extent());this._setVisibility(i&&o&&n)},av.prototype._setVisibility=function(t){this.element.style.display=t?"":"none"},av.prototype._activate=function(){var t=this.map;this._deactivate(),t.bind("beforeReset",this._beforeReset),t.bind("reset",this._reset),t.bind("resize",this._resize),t.bind("panEnd",this._panEnd)},av.prototype._deactivate=function(){var t=this.map;t.unbind("beforeReset",this._beforeReset),t.unbind("reset",this._reset),t.unbind("resize",this._resize),t.unbind("panEnd",this._panEnd)},av.prototype._updateAttribution=function(){var t=this.map.attribution;t&&t.add(this.options.attribution)},av.prototype._readData=function(){return this.options.data||[]},av.prototype._hasData=function(){return this._data&&this._data.length>0},av.prototype._layerIndex=function(){return(this.map.layers||[]).indexOf(this)};var pv=Math,lv=q.geometry.Point;function hv(t){return ot(t)?t:yt.compile(t)}function cv(t){return new lv(Zt(t.x),Zt(t.y))}function uv(t){var e=t;return"string"!=typeof t&&(e+="px"),e}var dv=function(t){function e(e,i){t.call(this,e,i),"string"==typeof this.options.subdomains&&(this.options.subdomains=this.options.subdomains.split(""));var o=this._viewType();this._view=new o(this.element,this.options)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.destroy=function(){t.prototype.destroy.call(this),this._view.destroy(),this._view=null},e.prototype._beforeReset=function(){var t=this.map,e=t.locationToLayer(t.extent().nw).round();this._view.viewOrigin(e)},e.prototype._reset=function(){t.prototype._reset.call(this),this._updateView(),this._view.reset()},e.prototype._viewType=function(){return fv},e.prototype._activate=function(){t.prototype._activate.call(this),this.support.mobileOS||(this._pan||(this._pan=(0,q.throttle)(this._render.bind(this),100)),this.map.bind("pan",this._pan))},e.prototype._deactivate=function(){t.prototype._deactivate.call(this),this._pan&&this.map.unbind("pan",this._pan)},e.prototype._updateView=function(){var t=this._view,e=this.map,i=e.extent(),o={nw:e.locationToLayer(i.nw).round(),se:e.locationToLayer(i.se).round()};t.center(e.locationToLayer(e.center())),t.extent(o),t.zoom(e.zoom())},e.prototype._resize=function(){this._render()},e.prototype._panEnd=function(e){t.prototype._panEnd.call(this,e),this._render()},e.prototype._render=function(){this._updateView(),this._view.render()},e}(av);te(dv,{tileSize:256,subdomains:["a","b","c"],urlTemplate:"",zIndex:1});var fv=function(t,e){this.element=t,this._initOptions(e),this.pool=new yv};fv.prototype._initOptions=function(t){this.options=at({},this.options,t)},fv.prototype.center=function(t){this._center=t},fv.prototype.extent=function(t){this._extent=t},fv.prototype.viewOrigin=function(t){this._viewOrigin=t},fv.prototype.zoom=function(t){this._zoom=t},fv.prototype.pointToTileIndex=function(t){return new lv(pv.floor(t.x/this.options.tileSize),pv.floor(t.y/this.options.tileSize))},fv.prototype.tileCount=function(){var t=this.size(),e=this.pointToTileIndex(this._extent.nw),i=this._extent.nw,o=this.indexToPoint(e).translate(-i.x,-i.y);return{x:pv.ceil((pv.abs(o.x)+t.width)/this.options.tileSize),y:pv.ceil((pv.abs(o.y)+t.height)/this.options.tileSize)}},fv.prototype.size=function(){var t=this._extent.nw,e=this._extent.se.clone().translate(-t.x,-t.y);return{width:e.x,height:e.y}},fv.prototype.indexToPoint=function(t){var e=t.x,i=t.y;return new lv(e*this.options.tileSize,i*this.options.tileSize)},fv.prototype.subdomainText=function(){var t=this.options.subdomains;return t[this.subdomainIndex++%t.length]},fv.prototype.destroy=function(){Hy(this.element),this.pool.empty()},fv.prototype.reset=function(){this.pool.reset(),this.subdomainIndex=0,this.render()},fv.prototype.render=function(){var t,e,i,o=this.tileCount(),r=this.pointToTileIndex(this._extent.nw);for(e=0;e<o.x;e++)for(i=0;i<o.y;i++)(t=this.createTile({x:r.x+e,y:r.y+i})).visible||t.show()},fv.prototype.createTile=function(t){var e=this.tileOptions(t),i=this.pool.get(this._center,e);return i.element.parentNode||this.element.append(i.element),i},fv.prototype.tileOptions=function(t){var e=this.wrapIndex(t),i=this.indexToPoint(t),o=this._viewOrigin,r=i.clone().translate(-o.x,-o.y);return{index:e,currentIndex:t,point:i,offset:cv(r),zoom:this._zoom,size:this.options.tileSize,subdomain:this.subdomainText(),urlTemplate:this.options.urlTemplate,errorUrlTemplate:this.options.errorUrlTemplate}},fv.prototype.wrapIndex=function(t){var e=pv.pow(2,this._zoom);return{x:this.wrapValue(t.x,e),y:Xt(t.y,0,e-1)}},fv.prototype.wrapValue=function(t,e){var i=pv.abs(t)%e;return t>=0?i:e-(0===i?e:i)};var gv=function(t,e){this.id=t,this.visible=!0,this._initOptions(e),this.createElement(),this.show()};gv.prototype.destroy=function(){var t=this.element,e=t?t.parentNode:null;t&&(e&&e.removeChild(t),this.element=null)},gv.prototype._initOptions=function(t){this.options=at({},this.options,t)},gv.prototype.createElement=function(){var t=document.createElement("img"),e=this.options.size+"px";t.setAttribute("alt",""),t.style.position="absolute",t.style.display="block",t.style.width=t.style.maxWidth=e,t.style.height=t.style.maxHeight=e,this.element=t},gv.prototype.show=function(){var t=this.element;t.style.top=uv(this.options.offset.y),t.style.left=uv(this.options.offset.x);var e=this.url();e&&t.setAttribute("src",e),t.style.visibility="visible",this.visible=!0},gv.prototype.hide=function(){this.element.style.visibility="hidden",this.visible=!1},gv.prototype.url=function(){return hv(this.options.urlTemplate)(this.urlOptions())},gv.prototype.errorUrl=function(){return hv(this.options.errorUrlTemplate)(this.urlOptions())},gv.prototype.urlOptions=function(){var t=this.options;return{zoom:t.zoom,subdomain:t.subdomain,z:t.zoom,x:t.index.x,y:t.index.y,s:t.subdomain,quadkey:t.quadkey,q:t.quadkey,culture:t.culture,c:t.culture}},te(gv,{urlTemplate:"",errorUrlTemplate:""});var yv=function(){this._items=[]};yv.prototype.get=function(t,e){return this._items.length>=this.options.maxSize&&this._remove(t),this._create(e)},yv.prototype.empty=function(){for(var t=this._items,e=0;e<t.length;e++)t[e].destroy();this._items=[]},yv.prototype.reset=function(){for(var t=this._items,e=0;e<t.length;e++)t[e].hide()},yv.prototype._create=function(t){for(var e,i=this._items,o=Gt(t.point.toString()+t.offset.toString()+t.zoom+t.urlTemplate),r=0;r<i.length;r++)if(i[r].id===o){e=i[r];break}return e?e.show():(e=new gv(o,t),this._items.push(e)),e},yv.prototype._remove=function(t){for(var e=this._items,i=-1,o=-1,r=0;r<e.length;r++){var n=e[r].options.point.distanceTo(t);n>i&&!e[r].visible&&(o=r,i=n)}-1!==o&&(e[o].destroy(),e.splice(o,1))},te(yv,{maxSize:100});var vv=Object.assign,mv="change",xv=function(t){function e(e,i){t.call(this);var o=this,r=e[0]||e;o.capture=!1,r.addEventListener?(Pe.down.split(" ").forEach((function(t){r.addEventListener(t,Dy(o._press,o),!0)})),Pe.up.split(" ").forEach((function(t){r.addEventListener(t,Dy(o._release,o),!0)}))):(Pe.down.split(" ").forEach((function(t){r.attachEvent(t,Dy(o._press,o))})),Pe.up.split(" ").forEach((function(t){r.attachEvent(t,Dy(o._release,o))}))),o.bind(["press","release"],i||{})}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.captureNext=function(){this.capture=!0},e.prototype.cancelCapture=function(){this.capture=!1},e.prototype._press=function(t){this.trigger("press"),this.capture&&t.preventDefault()},e.prototype._release=function(t){var e=this;e.trigger("release"),e.capture&&(t.preventDefault(),e.cancelCapture())},e}(Xe),bv=function(t){function e(e){t.call(this);var i=this;i.forcedEnabled=!1,vv(i,e),i.scale=1,i.horizontal?(i.measure="offsetWidth",i.scrollSize="scrollWidth",i.axis="x"):(i.measure="offsetHeight",i.scrollSize="scrollHeight",i.axis="y")}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.makeVirtual=function(){vv(this,{virtual:!0,forcedEnabled:!0,_virtualMin:0,_virtualMax:0})},e.prototype.virtualSize=function(t,e){this._virtualMin===t&&this._virtualMax===e||(this._virtualMin=t,this._virtualMax=e,this.update())},e.prototype.outOfBounds=function(t){return t>this.max||t<this.min},e.prototype.forceEnabled=function(){this.forcedEnabled=!0},e.prototype.getSize=function(){return this.container[this.measure]},e.prototype.getTotal=function(){return this.element[this.scrollSize]},e.prototype.rescale=function(t){this.scale=t},e.prototype.update=function(t){var e=this,i=e.virtual?e._virtualMax:e.getTotal(),o=i*e.scale,r=e.getSize();(0!==i||e.forcedEnabled)&&(e.max=e.virtual?-e._virtualMin:0,e.size=r,e.total=o,e.min=Math.min(e.max,r-o),e.minScale=r/i,e.centerOffset=(o-r)/2,e.enabled=e.forcedEnabled||o>r,t||e.trigger(mv,e))},e}(Xe),_v=function(t){function e(e){t.call(this);var i=this;i.x=new bv(vv({horizontal:!0},e)),i.y=new bv(vv({horizontal:!1},e)),i.container=e.container,i.forcedMinScale=e.minScale,i.maxScale=e.maxScale||100,i.bind(mv,e)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.rescale=function(t){this.x.rescale(t),this.y.rescale(t),this.refresh()},e.prototype.centerCoordinates=function(){return{x:Math.min(0,-this.x.centerOffset),y:Math.min(0,-this.y.centerOffset)}},e.prototype.refresh=function(){var t=this;t.x.update(),t.y.update(),t.enabled=t.x.enabled||t.y.enabled,t.minScale=t.forcedMinScale||Math.min(t.x.minScale,t.y.minScale),t.fitScale=Math.max(t.x.minScale,t.y.minScale),t.trigger(mv)},e}(Xe),wv=function(t){function e(e){t.call(this),vv(this,e)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.outOfBounds=function(){return this.dimension.outOfBounds(this.movable[this.axis])},e.prototype.dragMove=function(t){var e=this,i=e.dimension,o=e.axis,r=e.movable,n=r[o]+t;if(i.enabled){var s=t;(n<i.min&&t<0||n>i.max&&t>0)&&(s*=e.resistance),r.translateAxis(o,s),e.trigger(mv,e)}},e}(Xe),kv=function(t){var e,i,o,r,n=this;vv(n,{elastic:!0},t),o=n.elastic?.5:0,r=n.movable,n.x=e=new wv({axis:"x",dimension:n.dimensions.x,resistance:o,movable:r}),n.y=i=new wv({axis:"y",dimension:n.dimensions.y,resistance:o,movable:r}),n.userEvents.bind(["press","move","end","gesturestart","gesturechange"],{gesturestart:function(t){n.gesture=t,n.offset=Ft(n.dimensions.container)},press:function(t){var e=t.event.target.closest("a");e&&e.matches("[data-navigate-on-press=true]")&&t.sender.cancel()},gesturechange:function(t){var o,s=n.gesture,a=s.center,p=t.center,l=t.distance/s.distance,h=n.dimensions.minScale,c=n.dimensions.maxScale;r.scale<=h&&l<1&&(l+=.8*(1-l)),r.scale*l>=c&&(l=c/r.scale);var u=r.x+n.offset.left,d=r.y+n.offset.top;o={x:(u-a.x)*l+p.x-u,y:(d-a.y)*l+p.y-d},r.scaleWith(l),e.dragMove(o.x),i.dragMove(o.y),n.dimensions.rescale(r.scale),n.gesture=t,t.preventDefault()},move:function(t){t.event.target.tagName.match(/textarea|input/i)||(e.dimension.enabled||i.dimension.enabled?(e.dragMove(t.x.delta),i.dragMove(t.y.delta),t.preventDefault()):t.touch.skip())},end:function(t){t.preventDefault()}})},Av=function(t,e,i){return"translate3d("+t+"px,"+e+"px,0) scale("+i+")"},Sv=function(t){function e(e){t.call(this);var i=this;i.element=e,i.element.style.transformOrigin="left top",i.x=0,i.y=0,i.scale=1;var o=Av(i.x,i.y,i.scale);i.element.style.transform=o,i._saveCoordinates(o)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.translateAxis=function(t,e){this[t]+=e,this.refresh()},e.prototype.scaleTo=function(t){this.scale=t,this.refresh()},e.prototype.scaleWith=function(t){this.scale*=t,this.refresh()},e.prototype.translate=function(t){this.x+=t.x,this.y+=t.y,this.refresh()},e.prototype.moveAxis=function(t,e){this[t]=e,this.refresh()},e.prototype.moveTo=function(t){vv(this,t),this.refresh()},e.prototype.refresh=function(){var t,e=this,i=e.x,o=e.y;e.round&&(i=Math.round(i),o=Math.round(o)),(t=Av(i,o,e.scale))!==e.coordinates&&(e.element.style.transform=t,e._saveCoordinates(t),e.trigger(mv))},e.prototype._saveCoordinates=function(t){this.coordinates=t},e}(Xe),Cv=q.drawing.Group,Pv=function(t){function e(e,i){t.call(this,e,i),this._pan=Dy(this._pan,this),this.surface=q.drawing.Surface.create(this.element,{width:e.scrollElement.clientWidth,height:e.scrollElement.clientHeight}),this._initRoot(),this.movable=new Sv(this.surface.element),this._markers=[],this._click=this._handler("shapeClick"),this.surface.bind("click",this._click),this._mouseleave=this._handler("shapeMouseLeave"),this.surface.bind("mouseleave",this._mouseleave),this.surface.bind("mouseenter",this._mouseenter.bind(this))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.destroy=function(){t.prototype.destroy.call(this),this.surface.destroy()},e.prototype._reset=function(){t.prototype._reset.call(this),this._translateSurface(),this._data=this._readData(),this._hasData()&&this._load(this._data)},e.prototype._initRoot=function(){this._root=new Cv,this.surface.draw(this._root)},e.prototype._beforeReset=function(){this.surface.clear(),this._initRoot()},e.prototype._resize=function(){this.surface.size(this.map.size())},e.prototype._readData=function(){var e=t.prototype._readData.call(this);return"FeatureCollection"===e.type?e.features:"GeometryCollection"===e.type?e.geometries:e},e.prototype._load=function(t){this._data=t,this._clearMarkers(),this._loader||(this._loader=new Tv(this.map,this.options.style,this));for(var e=new Cv,i=0;i<t.length;i++){var o=this._loader.parse(t[i]);o&&e.append(o)}this._root.clear(),this._root.append(e)},e.prototype.shapeCreated=function(t){var e=!1;if(t instanceof q.drawing.Circle&&this.map.options.renderPointsAsMarkers&&(e=jt(this._createMarker(t))),!e){var i={layer:this,shape:t};e=this.map.trigger("shapeCreated",i)}return e},e.prototype.featureCreated=function(t){t.layer=this,this.map.trigger("shapeFeatureCreated",t)},e.prototype._createMarker=function(t){var e=this.map.markers.bind({location:t.location},t.dataItem);return e&&this._markers.push(e),e},e.prototype._clearMarkers=function(){for(var t=0;t<this._markers.length;t++)this.map.markers.remove(this._markers[t]);this._markers=[]},e.prototype._pan=function(){this._panning||(this._panning=!0,this.surface.suspendTracking())},e.prototype._panEnd=function(e){t.prototype._panEnd.call(this,e),this._translateSurface(),this.surface.resumeTracking(),this._panning=!1},e.prototype._translateSurface=function(){var t=this.map,e=t.locationToView(t.extent().nw);this.surface.translate&&(this.surface.translate(e),this.movable.moveTo({x:e.x,y:e.y}))},e.prototype._eventArgs=function(t){return{layer:this,layerIndex:this._layerIndex(),shape:t.element,shapeIndex:(this._data||[]).indexOf(t.element.dataItem),originalEvent:t.originalEvent}},e.prototype._handler=function(t){var e=this;return function(i){i.element&&e.map.trigger(t,e._eventArgs(i))}},e.prototype._mouseenter=function(t){if(t.element){this.map.trigger("shapeMouseEnter",this._eventArgs(t));var e=t.element,i=this._tooltipAnchor(t);this.map._tooltip.show(i,this._tooltipContext(e))}},e.prototype._tooltipContext=function(t){return{type:"shape",layerIndex:this._layerIndex(),className:"k-map-shape-tooltip",dataItem:t.dataItem,location:t.location}},e.prototype._tooltipAnchor=function(t){var e=this.map.eventOffset(t.originalEvent);return{top:e.y,left:e.x}},e.prototype._activate=function(){t.prototype._activate.call(this),this._panHandler=Dy(this._pan,this),this.map.bind("pan",this.panHandler)},e.prototype._deactivate=function(){t.prototype._deactivate.call(this),this.map.unbind("pan",this._panHandler)},e}(av);te(Pv,{autoBind:!0,zIndex:100});var Tv=function(t,e,i){this.observer=i,this.locator=t,this.style=e};Tv.prototype.parse=function(t){var e=new Cv,i=!0;return"Feature"===t.type?(i=!1,this._loadGeometryTo(e,t.geometry,t),this._featureCreated(e,t)):this._loadGeometryTo(e,t,t),i&&e.children.length<2&&(e=e.children[0]),e},Tv.prototype._shapeCreated=function(t){var e=!1;return this.observer&&this.observer.shapeCreated&&(e=this.observer.shapeCreated(t)),e},Tv.prototype._featureCreated=function(t,e){this.observer&&this.observer.featureCreated&&this.observer.featureCreated({group:t,dataItem:e,properties:e.properties})},Tv.prototype._loadGeometryTo=function(t,e,i){var o,r,n=e.coordinates;switch(e.type){case"LineString":r=this._loadPolygon(t,[n],i),this._setLineFill(r);break;case"MultiLineString":for(o=0;o<n.length;o++)r=this._loadPolygon(t,[n[o]],i),this._setLineFill(r);break;case"Polygon":this._loadPolygon(t,n,i);break;case"MultiPolygon":for(o=0;o<n.length;o++)this._loadPolygon(t,n[o],i);break;case"Point":this._loadPoint(t,n,i);break;case"MultiPoint":for(o=0;o<n.length;o++)this._loadPoint(t,n[o],i)}},Tv.prototype._setLineFill=function(t){var e=t.segments;(e.length<4||!e[0].anchor().equals(Wt(e).anchor()))&&(t.options.fill=null)},Tv.prototype._loadShape=function(t,e){return this._shapeCreated(e)||t.append(e),e},Tv.prototype._loadPolygon=function(t,e,i){var o=this._buildPolygon(e);return o.dataItem=i,o.location=this.locator.viewToLocation(o.bbox().center()),this._loadShape(t,o)},Tv.prototype._buildPolygon=function(t){for(var e=new(t.length>1?q.drawing.MultiPath:q.drawing.Path)(this.style),i=0;i<t.length;i++)for(var o=0;o<t[i].length;o++){var r=this.locator.locationToView(xy.fromLngLat(t[i][o]));0===o?e.moveTo(r.x,r.y):e.lineTo(r.x,r.y)}return e},Tv.prototype._loadPoint=function(t,e,i){var o=xy.fromLngLat(e),r=this.locator.locationToView(o),n=new q.geometry.Circle(r,10),s=new q.drawing.Circle(n,this.style);return s.dataItem=i,s.location=o,this._loadShape(t,s)};var Mv=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._readData=function(){return this.options.data||[]},e.prototype._load=function(t){if(this._data=t,this.surface.clear(),0!==t.length){var e=this.options,i=_t(e.valueField),o=t.slice(0);o.sort((function(t,e){return i(e)-i(t)}));for(var r,n=this._scaleType(),s=_t(this.options.locationField),a=0;a<o.length;a++){var p=o[a],l=s(p),h=i(p);if(jt(l)&&jt(h)){r||(r=new n([0,h],[e.minSize,e.maxSize])),l=xy.create(l);var c=this.map.locationToView(l),u=r.map(h),d=this._createSymbol({center:c,size:u,style:e.style,dataItem:p,location:l});d.dataItem=p,d.location=l,d.value=h,this._drawSymbol(d)}}}},e.prototype._scaleType=function(){var t=this.options.scale;return ot(t)?t:Lv[t]},e.prototype._createSymbol=function(t){var e=this.options.symbol;return ot(e)||(e=Bv[e]),e(t)},e.prototype._drawSymbol=function(t){var e={layer:this,shape:t};this.map.trigger("shapeCreated",e)||this.surface.draw(t)},e.prototype._tooltipContext=function(t){return{type:"bubble",layerIndex:this._layerIndex(),className:"k-map-bubble-tooltip",dataItem:t.dataItem,location:t.location,value:t.value}},e.prototype._tooltipAnchor=function(t){var e=t.element.bbox().center();return{top:e.y,left:e.x}},e}(Pv);te(Mv,{locationField:"location",valueField:"value",minSize:0,maxSize:100,scale:"sqrt",symbol:"circle",zIndex:200});var Ov=function(t,e){this._domain=t,this._range=e;var i=Math.sqrt(t[1])-Math.sqrt(t[0]),o=e[1]-e[0];this._ratio=o/i};Ov.prototype.map=function(t){var e=(Math.sqrt(t)-Math.sqrt(this._domain[0]))*this._ratio;return this._range[0]+e};var Lv={sqrt:Ov},Bv={circle:function(t){var e=new q.geometry.Circle(t.center,t.size/2);return new q.drawing.Circle(e,t.style)},square:function(t){var e=new q.drawing.Path(t.style),i=t.size/2,o=t.center;return e.moveTo(o.x-i,o.y-i).lineTo(o.x+i,o.y-i).lineTo(o.x+i,o.y+i).lineTo(o.x-i,o.y+i).close(),e}},Iv="click",Ev="mouseenter",Rv="mouseleave",Vv=Object.assign,zv="k-marker",jv="."+zv,Dv=function(t){function e(e,i){t.call(this,e,i),this._markerClickHandler=Dy(this._markerClick,this),Re(this.element,Iv,jv,this._markerClickHandler),this.items=[],this._load(this._readData())}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.destroy=function(){t.prototype.destroy.call(this),Ve(this.element,Iv,this._markerClickHandler),this.clear()},e.prototype.add=function(t){if(!G(t))return this._addOne(t);for(var e=0;e<t.length;e++)this._addOne(t[e])},e.prototype.remove=function(t){t.destroy();var e=(this.items||[]).indexOf(t);e>-1&&this.items.splice(e,1)},e.prototype.clear=function(){for(var t=0;t<this.items.length;t++)this.items[t].destroy();this.items=[]},e.prototype.update=function(t){var e=t.location();if(e){t.showAt(this.map.locationToView(e));var i={marker:t,layer:this};this.map.trigger("markerActivate",i)}},e.prototype._reset=function(){t.prototype._reset.call(this);for(var e=this.items,i=0;i<e.length;i++)this.update(e[i])},e.prototype.bind=function(t,e){var i=Fv.create(t,this.options);i.dataItem=e;var o={marker:i,layer:this};if(!this.map.trigger("markerCreated",o))return this.add(i),i},e.prototype._addOne=function(t){var e=Fv.create(t,this.options);return e.addTo(this),e},e.prototype._readData=function(){return this.options.data||[]},e.prototype._load=function(t){this._data=t,this.clear();for(var e=_t(this.options.locationField),i=_t(this.options.titleField),o=0;o<t.length;o++){var r=t[o];this.bind({location:e(r),title:i(r)},r)}},e.prototype._markerClick=function(t){var e=t.currentTarget._kendoNode,i={layer:this,layerIndex:this._layerIndex(),marker:e,markerIndex:(this.items||[]).indexOf(e),originalEvent:t};this.map.trigger("markerClick",i)},e.prototype._markerMouseEnter=function(t){var e=this._createMarkerEventArgs(t);this.map.trigger("markerMouseEnter",e)},e.prototype._markerMouseLeave=function(t){var e=this._createMarkerEventArgs(t);this.map.trigger("markerMouseLeave",e)},e.prototype._createMarkerEventArgs=function(t){var e=t.marker;return Vv({},{layer:this,layerIndex:this._layerIndex(),marker:e,markerIndex:(this.items||[]).indexOf(e)},t)},e}(av);te(Dv,{zIndex:1e3,autoBind:!0,locationField:"location",titleField:"title",template:""});var Fv=function(t){this.options=t||{}};Fv.prototype.destroy=function(){this.layer=null,this.unbindEvents(),this.hide()},Fv.prototype.addTo=function(t){this.layer=t.markers||t,this.layer.items.push(this),this.layer.update(this)},Fv.prototype.location=function(t){return t?(this.options.location=xy.create(t).toArray(),this.layer&&this.layer.update(this),this):xy.create(this.options.location)},Fv.prototype.showAt=function(t){this.render(),this._anchor={left:Math.round(t.x),top:Math.round(t.y)},this.element.style.left=Uy(this._anchor.left),this.element.style.top=Uy(this._anchor.top)},Fv.prototype.hide=function(){this.element&&(this.element.remove(),this.element=null)},Fv.prototype.bindEvents=function(){this.element&&(this._mouseEnterHandler=Dy(this._mouseEnter,this),Re(this.element,Ev,jv,this._mouseEnterHandler),this._mouseLeaveHandler=Dy(this._mouseLeave,this),Re(this.element,Rv,jv,this._mouseLeaveHandler))},Fv.prototype.unbindEvents=function(){this.element&&(Ve(this.element,Ev,this._mouseEnterHandler),Ve(this.element,Rv,this._mouseLeaveHandler))},Fv.prototype.render=function(){if(!this.element){var t=this.options,e=this.layer,i=document.createElement("span");if(W(i,zv),this.options.template){var o=this._compileTemplate(this.options.template)(this.dataItem),r=Fy(o);i.appendChild(r)}else if(t.svgIcon)ae(i,{icon:t.svgIcon,iconClass:"k-icon-xxl",svgIcons:this.options.icons.svgIcons,type:"svg"});else{var n={icon:"map-marker",iconClass:"k-icon-xxl",svgIcons:this.options.icons.svgIcons,type:this.options.icons.type};t.shape?"pinTarget"===t.shape?(n.icon="map-marker-target",ae(i,n)):"pin"===t.shape?ae(i,n):W(i,"k-icon k-icon-xxl k-i-marker-"+(t.shape||"pin").replace(/([a-z][A-Z])/g,(function(t){return t.charAt(0)+"-"+t.charAt(1).toLowerCase()}))):ae(i,n)}t.title&&i.setAttribute("title",t.title);var s=t.attributes||{};Object.keys(s).forEach((function(t){i.setAttribute(t,s[t])})),i._kendoNode=this,i.style.zIndex=t.zIndex,this.element=i,e&&e.element.appendChild(this.element),this.bindEvents()}},Fv.prototype._mouseEnter=function(t){var e=this._createEventArgs(t);this.layer._markerMouseEnter(e),this.layer.map._tooltip.show({top:this._anchor.top-this.element.offsetHeight,left:this._anchor.left},this._tooltipContext())},Fv.prototype._tooltipContext=function(){return{type:"marker",layerIndex:this.layer._layerIndex(),className:"k-map-marker-tooltip",dataItem:this.dataItem,title:this.options.title,location:this.location()}},Fv.prototype._mouseLeave=function(t){var e=this._createEventArgs(t);this.layer._markerMouseLeave(e)},Fv.prototype._createEventArgs=function(t){return{marker:this,originalEvent:t}},Fv.prototype._compileTemplate=function(t){return yt.compile(t,{paramName:"dataItem",useWithBlock:!1})},Fv.create=function(t,e){return t instanceof Fv?t:new Fv(at({},e,t))};var Hv=Object.assign;function Nv(t){window.requestAnimationFrame(t)}var Uv=function(){var t=this;t._tickProxy=Dy(t._tick,t),t._started=!1};Uv.prototype.tick=function(){},Uv.prototype.done=function(){},Uv.prototype.onEnd=function(){},Uv.prototype.onCancel=function(){},Uv.prototype.start=function(){this.enabled()&&(this.done()?this.onEnd():(this._started=!0,Nv(this._tickProxy)))},Uv.prototype.enabled=function(){return!0},Uv.prototype.cancel=function(){this._started=!1,this.onCancel()},Uv.prototype._tick=function(){var t=this;t._started&&(t.tick(),t.done()?(t._started=!1,t.onEnd()):Nv(t._tickProxy))};var Gv=function(t){function e(e){t.call(this),Hv(this,e)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.done=function(){return this.timePassed()>=this.duration},e.prototype.timePassed=function(){return Math.min(this.duration,Fe()-this.startDate)},e.prototype.moveTo=function(t){var e=this,i=e.movable;e.initial=i[e.axis],e.delta=t.location-e.initial,e.duration="number"==typeof t.duration?t.duration:300,e.tick=e._easeProxy(t.ease),e.startDate=Fe(),e.start()},e.prototype._easeProxy=function(t){var e=this;return function(){e.movable.moveAxis(e.axis,t(e.timePassed(),e.initial,e.delta,e.duration))}},e.easeOutExpo=function(t,e,i,o){return t===o?e+i:i*(1-Math.pow(2,-10*t/o))+e},e}(Uv),Wv=Object.assign,Xv=Math.abs,Yv="change",qv="scroll",Zv=function(t){function e(e){t.call(this,e);var i=this;Wv(i,e),i.userEvents.bind("gestureend",i.start.bind(this)),i.tapCapture.bind("press",i.cancel.bind(this))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.enabled=function(){return this.movable.scale<this.dimensions.minScale},e.prototype.done=function(){return this.dimensions.minScale-this.movable.scale<.01},e.prototype.tick=function(){var t=this.movable;t.scaleWith(1.1),this.dimensions.rescale(t.scale)},e.prototype.onEnd=function(){var t=this.movable;t.scaleTo(this.dimensions.minScale),this.dimensions.rescale(t.scale)},e}(Uv),Qv=function(t){function e(e){t.call(this);var i=this;Wv(i,e,{transition:new Gv({axis:e.axis,movable:e.movable,onEnd:function(){i._end()}})}),i.tapCapture.bind("press",(function(){i.cancel()})),i.userEvents.bind("end",Dy(i.start,i)),i.userEvents.bind("gestureend",Dy(i.start,i)),i.userEvents.bind("tap",Dy(i.onEnd,i))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.onCancel=function(){this.transition.cancel()},e.prototype.freeze=function(t){this.cancel(),this._moveTo(t)},e.prototype.onEnd=function(){var t=this;t.paneAxis.outOfBounds()?t._snapBack():t._end()},e.prototype.done=function(){return Xv(this.velocity)<1},e.prototype.start=function(e){var i,o=this;o.dimension.enabled&&(o.paneAxis.outOfBounds()?o.transition._started?(o.transition.cancel(),o.velocity=Math.min(e.touch[o.axis].velocity*o.velocityMultiplier,55),t.prototype.start.call(this)):o._snapBack():(i=2===e.touch.id?0:e.touch[o.axis].velocity,o.velocity=Math.max(Math.min(i*o.velocityMultiplier,55),-55),o.tapCapture.captureNext(),t.prototype.start.call(this)))},e.prototype.tick=function(){var t=this,e=t.dimension,i=t.paneAxis.outOfBounds()?.5:t.friction,o=t.velocity*=i,r=t.movable[t.axis]+o;!t.elastic&&e.outOfBounds(r)&&(r=Math.max(Math.min(r,e.max),e.min),t.velocity=0),t.movable.moveAxis(t.axis,r)},e.prototype._end=function(){this.tapCapture.cancelCapture(),this.end()},e.prototype._snapBack=function(){var t=this,e=t.dimension,i=t.movable[t.axis]>e.max?e.max:e.min;t._moveTo(i)},e.prototype._moveTo=function(t){this.transition.moveTo({location:t,duration:500,ease:Gv.easeOutExpo})},e}(Uv),Kv=function(t){function e(e){t.call(this,e),Wv(this,e,{origin:{},destination:{},offset:{}})}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.tick=function(){this._updateCoordinates(),this.moveTo(this.origin)},e.prototype.done=function(){return Xv(this.offset.y)<5&&Xv(this.offset.x)<5},e.prototype.onEnd=function(){this.moveTo(this.destination),this.callback&&this.callback.call()},e.prototype.setCoordinates=function(t,e){this.offset={},this.origin=t,this.destination=e},e.prototype.setCallback=function(t){t&&ot(t)?this.callback=t:t=void 0},e.prototype._updateCoordinates=function(){this.offset={x:(this.destination.x-this.origin.x)/4,y:(this.destination.y-this.origin.y)/4},this.origin={y:this.origin.y+this.offset.y,x:this.origin.x+this.offset.x}},e}(Uv),$v=function(t){var e=this,i="x"===t.axis,o=Fy('<div class="km-touch-scrollbar km-'+(i?"horizontal":"vertical")+'-scrollbar" />');Wv(e,t,{element:o,elementSize:0,movable:new Sv(o),scrollMovable:t.movable,alwaysVisible:t.alwaysVisible,size:i?"width":"height"}),e.scrollMovable.bind(Yv,e.refresh.bind(e)),e.container.appendChild(o),t.alwaysVisible&&e.show()};$v.prototype.refresh=function(){var t=this,e=t.axis,i=t.dimension,o=i.size,r=t.scrollMovable,n=o/i.total,s=Math.round(-r[e]*n),a=Math.round(o*n);this.element.style.display=n>=1?"none":"",s+a>o?a=o-s:s<0&&(a+=s,s=0),t.elementSize!==a&&(t.element.style[t.size]=a+"px",t.elementSize=a),t.movable.moveAxis(e,s)},$v.prototype.show=function(){this.element.style.opacity=.7,this.element.style.visibility="visible"},$v.prototype.hide=function(){this.alwaysVisible||(this.element.style.opacity=0)};var Jv=function(t){function e(e,i){t.call(this);var o=this;this.element=e,this._initOptions(i);var r,n=(navigator.userAgent,(r=ze().mobileOS).ios||r.android);o._native=o.options.useNative&&n;var s=Fy('<div class="km-scroll-header"/>');if(o._native)return W(e,"km-native-scroller"),Ny(s,e),void Wv(o,{scrollElement:e,fixedContainer:e.children[0]});e.style.overflow="hidden",W(e,"km-scroll-wrapper"),function(t,e){for(t.appendChild(e);t.firstChild!==e;)e.appendChild(t.firstChild)}(e,Fy('<div class="km-scroll-container"/>')),Ny(s,e);var a=e.children[1],p=new xv(e),l=new Sv(a),h=new _v({element:a,container:e,forcedEnabled:o.options.zoom}),c=this.options.avoidScrolling,u=new yi(e,{touchAction:"none",allowSelection:!0,preventDragEvent:!0,captureUpIfMoved:!0,multiTouch:o.options.zoom,supportDoubleTap:o.options.supportDoubleTap,start:function(t){h.refresh();var e=Xv(t.x.velocity),i=Xv(t.y.velocity),r=2*e>=i,n=2*i>=e;!o.fixedContainer.contains(t.event.target)&&!c(t)&&o.enabled&&(h.x.enabled&&r||h.y.enabled&&n)?u.capture():u.cancel()}}),d=new kv({movable:l,dimensions:h,userEvents:u,elastic:o.options.elastic}),f=new Zv({movable:l,dimensions:h,userEvents:u,tapCapture:p}),g=new Kv({moveTo:function(t){o.scrollTo(t.x,t.y)}});l.bind(Yv,(function(){o.scrollTop=-l.y,o.scrollLeft=-l.x,o.trigger(qv,{scrollTop:o.scrollTop,scrollLeft:o.scrollLeft})})),o.options.mousewheelScrolling&&(this._wheelScrollHandler=this._wheelScroll.bind(this),Re(e,"wheel",this._wheelScrollHandler)),Wv(o,{movable:l,dimensions:h,zoomSnapBack:f,animatedScroller:g,userEvents:u,pane:d,tapCapture:p,pulled:!1,enabled:!0,scrollElement:a,scrollTop:0,scrollLeft:0,fixedContainer:e.children[0]}),o._initAxis("x"),o._initAxis("y"),o._wheelEnd=function(){o._wheel=!1,o.userEvents.end(0,o._wheelY)},h.refresh(),o.options.pullToRefresh&&o._initPullToRefresh()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._initOptions=function(t){this.options=at({},this.options,t)},e.prototype._wheelScroll=function(t){if(!t.ctrlKey){this._wheel||(this._wheel=!0,this._wheelY=0,this.userEvents.press(0,this._wheelY)),clearTimeout(this._wheelTimeout),this._wheelTimeout=setTimeout(this._wheelEnd,50);var e=function(t){var e,i=t.wheelDeltaY;return t.wheelDelta?(void 0===i||i)&&(e=t.wheelDelta):t.detail&&t.axis===t.VERTICAL_AXIS&&(e=10*-t.detail),e}(t);e&&(this._wheelY+=e,this.userEvents.move(0,this._wheelY)),t.preventDefault()}},e.prototype.makeVirtual=function(){this.dimensions.y.makeVirtual()},e.prototype.virtualSize=function(t,e){this.dimensions.y.virtualSize(t,e)},e.prototype.height=function(){return this.dimensions.y.size},e.prototype.scrollHeight=function(){return this.scrollElement.scrollHeight},e.prototype.scrollWidth=function(){return this.scrollElement.scrollWidth},e.prototype._resize=function(){this._native||this.contentResized()},e.prototype.setOptions=function(t){this._initOptions(t),t.pullToRefresh&&this._initPullToRefresh()},e.prototype.reset=function(){this._native?this.scrollElement.scrollTop(0):(this.movable.moveTo({x:0,y:0}),this._scale(1))},e.prototype.contentResized=function(){this.dimensions.refresh(),this.pane.x.outOfBounds()&&this.movable.moveAxis("x",this.dimensions.x.min),this.pane.y.outOfBounds()&&this.movable.moveAxis("y",this.dimensions.y.min)},e.prototype.zoomOut=function(){var t=this.dimensions;t.refresh(),this._scale(t.fitScale),this.movable.moveTo(t.centerCoordinates())},e.prototype.enable=function(){this.enabled=!0},e.prototype.disable=function(){this.enabled=!1},e.prototype.scrollTo=function(t,e){this._native?(this.scrollElement.scrollLeft(Xv(t)),this.scrollElement.scrollTop(Xv(e))):(this.dimensions.refresh(),this.movable.moveTo({x:t,y:e}))},e.prototype.animatedScrollTo=function(t,e,i){var o,r;this._native?this.scrollTo(t,e):(o={x:this.movable.x,y:this.movable.y},r={x:t,y:e},this.animatedScroller.setCoordinates(o,r),this.animatedScroller.setCallback(i),this.animatedScroller.start())},e.prototype.pullHandled=function(){},e.prototype.destroy=function(){Ve(this.element,"wheel",this._wheelScrollHandler),this.userEvents&&this.userEvents.destroy()},e.prototype._scale=function(t){this.dimensions.rescale(t),this.movable.scaleTo(t)},e.prototype._initPullToRefresh=function(){},e.prototype._dragEnd=function(){},e.prototype._paneChange=function(){},e.prototype._initAxis=function(t){var e=this,i=e.movable,o=e.dimensions[t],r=e.tapCapture,n=e.pane[t],s=new $v({axis:t,movable:i,dimension:o,container:e.element,alwaysVisible:e.options.visibleScrollHints});o.bind(Yv,(function(){s.refresh()})),n.bind(Yv,(function(){s.show()})),e[t+"inertia"]=new Qv({axis:t,paneAxis:n,movable:i,tapCapture:r,userEvents:e.userEvents,dimension:o,elastic:e.options.elastic,friction:e.options.friction||.96,velocityMultiplier:e.options.velocityMultiplier||10,end:function(){s.hide(),e.trigger("scrollEnd",{axis:t,scrollTop:e.scrollTop,scrollLeft:e.scrollLeft})}})},e}(Xe);te(Jv,{name:"Scroller",zoom:!1,pullOffset:140,visibleScrollHints:!1,elastic:!0,useNative:!1,mousewheelScrolling:!0,avoidScrolling:function(){return!1},pullToRefresh:!1,messages:{pullTemplate:"Pull to refresh",releaseTemplate:"Release to refresh",refreshTemplate:"Refreshing"}}),Gy(Jv,["pull",qv,"resize"]);var tm=function(t,e){void 0===e&&(e={}),this.sender=e.sender||t,this.widget=t,this.rtl=Boolean(e.rtl)};tm.prototype.notify=function(t,e){this.widget&&this.widget.trigger(t,e)};const em=tm;var im=Math,om=im.min,rm=im.pow,nm=q.geometry.Point,sm="marker",am="location",pm="wheel",lm={bubble:Mv,shape:Pv,tile:dv};lm[sm]=Dv;var hm=function(t){function e(e,i,o,r){void 0===i&&(i={}),void 0===o&&(o={}),void 0===r&&(r={}),t.call(this),this._init(e,i,o,r)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.destroy=function(){this.scroller.destroy(),this._tooltip&&this._tooltip.destroy(),this.navigator&&this.navigator.destroy(),this.attribution&&this.attribution.destroy(),this.zoomControl&&this.zoomControl.destroy(),G(this.markers)?this.markers.forEach((function(t){t.destroy()})):this.markers.destroy();for(var e=0;e<this.layers.length;e++)this.layers[e].destroy();Ve(this.element,pm,this._mousewheelHandler),t.prototype.destroy.call(this)},e.prototype._init=function(t,e,i,o){void 0===e&&(e={}),void 0===i&&(i={}),void 0===o&&(o={}),this.support=ze(),this.context=o,this.initObserver(o),this.initServices(o),this._notifyObserver("init"),this._initOptions(e),this._setEvents(e),this.crs=new Vy,this._initElement(t),this._viewOrigin=this._getOrigin(),this._tooltip=this._createTooltip(),this._initScroller(),this._initMarkers(),this._initControls(),this._initLayers(),this._reset();var r=(0,q.throttle)(this._mousewheel.bind(this),50);this._mousewheelHandler=function(t){t.preventDefault(),r(t)},Re(this.element,pm,this._mousewheelHandler)},e.prototype._initOptions=function(t){this.options=at({},this.options,t)},e.prototype._initElement=function(t){this.element=t,W(t,"k-map"),t.style.position="relative",t.setAttribute("data-role","map"),Hy(t);var e=Fy("<div />");this.element.appendChild(e)},e.prototype.initServices=function(t){void 0===t&&(t={}),this.widgetService=new em(this,t)},e.prototype.initObserver=function(t){void 0===t&&(t={}),this.observers=[],this.addObserver(t.observer)},e.prototype.addObserver=function(t){t&&this.observers.push(t)},e.prototype.removeObserver=function(t){var e=this.observers.indexOf(t);e>=0&&this.observers.splice(e,1)},e.prototype.requiresHandlers=function(t){for(var e=this.observers,i=0;i<e.length;i++)if(e[i].requiresHandlers(t))return!0},e.prototype.trigger=function(e,i){void 0===i&&(i={}),i.sender=this;for(var o=this.observers,r=!1,n=0;n<o.length;n++)o[n].trigger(e,i)&&(r=!0);return r||t.prototype.trigger.call(this,e,i),r},e.prototype._notifyObserver=function(t,e){void 0===e&&(e={}),e.sender=this;for(var i=this.observers,o=!1,r=0;r<i.length;r++)i[r].trigger(t,e)&&(o=!0);return o},e.prototype.zoom=function(t){var e,i=this.options;if(jt(t)){var o=im.round(Xt(t,i.minZoom,i.maxZoom));i.zoom!==o&&(i.zoom=o,this.widgetService.notify("zoomChange",{zoom:i.zoom}),this._reset()),e=this}else e=i.zoom;return e},e.prototype.center=function(t){var e;if(t){var i=xy.create(t),o=xy.create(this.options.center);i.equals(o)||(this.options.center=i.toArray(),this.widgetService.notify(rv,{center:this.options.center}),this._reset()),e=this}else e=xy.create(this.options.center);return e},e.prototype.extent=function(t){var e;return t?(this._setExtent(t),e=this):e=this._getExtent(),e},e.prototype.setOptions=function(t){void 0===t&&(t={});var e=this.element;this.destroy(),Hy(e),this._init(e,t,{},this.context),this._reset()},e.prototype.locationToLayer=function(t,e){var i=!this.options.wraparound,o=xy.create(t);return this.crs.toPoint(o,this._layerSize(e),i)},e.prototype.layerToLocation=function(t,e){var i=!this.options.wraparound,o=nm.create(t);return this.crs.toLocation(o,this._layerSize(e),i)},e.prototype.locationToView=function(t){var e=xy.create(t),i=this.locationToLayer(this._viewOrigin);return this.locationToLayer(e).translateWith(i.scale(-1))},e.prototype.viewToLocation=function(t,e){var i=this.locationToLayer(this._getOrigin(),e),o=nm.create(t).clone().translateWith(i);return this.layerToLocation(o,e)},e.prototype.eventOffset=function(t){var e,i,o=Ft(this.element);if(t.x&&t.x[am]||t.y&&t.y[am])e=t.x[am]-o.left,i=t.y[am]-o.top;else{var r=t.originalEvent||t;e=Kt(r.pageX,r.clientX)-o.left,i=Kt(r.pageY,r.clientY)-o.top}return new q.geometry.Point(e,i)},e.prototype.eventToView=function(t){var e=this.eventOffset(t);return this.locationToView(this.viewToLocation(e))},e.prototype.eventToLayer=function(t){return this.locationToLayer(this.eventToLocation(t))},e.prototype.eventToLocation=function(t){var e=this.eventOffset(t);return this.viewToLocation(e)},e.prototype.viewSize=function(){var t=this.element,e=this._layerSize(),i=t.clientWidth;return this.options.wraparound||(i=om(e,i)),{width:i,height:om(e,t.clientHeight)}},e.prototype.exportVisual=function(){return this._reset(),!1},e.prototype.hideTooltip=function(){this._tooltip&&this._tooltip.hide()},e.prototype._setOrigin=function(t,e){var i,o=this.viewSize(),r=this._origin=xy.create(t);return(i=this.locationToLayer(r,e)).x+=o.width/2,i.y+=o.height/2,this.options.center=this.layerToLocation(i,e).toArray(),this.widgetService.notify(rv,{center:this.options.center}),this},e.prototype._getOrigin=function(t){var e,i=this.viewSize();return!t&&this._origin||((e=this.locationToLayer(this.center())).x-=i.width/2,e.y-=i.height/2,this._origin=this.layerToLocation(e)),this._origin},e.prototype._setExtent=function(t){var e=iv.create(t),i=e.se.clone();this.options.wraparound&&i.lng<0&&t.nw.lng>0&&(i.lng=180+(180+i.lng));var o=new iv(e.nw,i);this.center(o.center());var r,n=this.element.clientWidth,s=this.element.clientHeight;for(r=this.options.maxZoom;r>=this.options.minZoom;r--){var a=this.locationToLayer(o.nw,r),p=this.locationToLayer(o.se,r),l=im.abs(p.x-a.x),h=im.abs(p.y-a.y);if(l<=n&&h<=s)break}this.zoom(r)},e.prototype._getExtent=function(){var t=this._getOrigin(),e=this.locationToLayer(t),i=this.viewSize();e.x+=i.width,e.y+=i.height;var o=this.layerToLocation(e);return new iv(t,o)},e.prototype._zoomAround=function(t,e){this._setOrigin(this.layerToLocation(t,e),e),this.zoom(e)},e.prototype._initControls=function(){var t=this.options.controls;t.attribution&&this._createAttribution(t.attribution),this.support.mobileOS||(t.navigator&&this._createNavigator(t.navigator),t.zoom&&this._createZoomControl(t.zoom))},e.prototype._createControlElement=function(t,e){var i=t.position||e,o="."+Wy(i).replace(" ","."),r=this.element.querySelector(".k-map-controls"+o)||[];if(0===r.length){var n=document.createElement("div");W(n,"k-map-controls "+Wy(i)),r=n,this.element.appendChild(r)}var s=document.createElement("div");return r.appendChild(s),s},e.prototype._createAttribution=function(t){var e=this._createControlElement(t,"bottomRight");this.attribution=new Xy(e,t)},e.prototype._createNavigator=function(t){var e=this._createControlElement(t,"topLeft"),i=this.navigator=new Zy(e,at({},t,{icons:this.options.icons}));this._navigatorPan=this._navigatorPan.bind(this),i.bind("pan",this._navigatorPan),this._navigatorCenter=this._navigatorCenter.bind(this),i.bind("center",this._navigatorCenter)},e.prototype._navigatorPan=function(t){var e=this.scroller,i=e.scrollLeft+t.x,o=e.scrollTop-t.y,r=this._virtualSize,n=this.element.clientWidth,s=this.element.clientHeight;i=Xt(i,r.x.min,r.x.max-n),o=Xt(o,r.y.min,r.y.max-s),this.scroller.one("scroll",Dy(this._scrollEnd,this)),this.scroller.scrollTo(-i,-o)},e.prototype._navigatorCenter=function(){this.center(this.options.center)},e.prototype._createZoomControl=function(t){var e=this._createControlElement(t,"topLeft"),i=this.zoomControl=new $y(e,t,this.options.icons);this._zoomControlChange=this._zoomControlChange.bind(this),i.bind("change",this._zoomControlChange)},e.prototype._zoomControlChange=function(t){this.trigger("zoomStart",{originalEvent:t})||(this.zoom(this.zoom()+t.delta),this.trigger("zoomEnd",{originalEvent:t}))},e.prototype._initScroller=function(){var t=this.support.mobileOS?.93:.9,e=!1!==this.options.zoomable,i=this.scroller=new Jv(this.element.children[0],{friction:t,velocityMultiplier:5,zoom:e,mousewheelScrolling:!1,supportDoubleTap:!0});i.bind("scroll",Dy(this._scroll,this)),i.bind("scrollEnd",Dy(this._scrollEnd,this)),i.userEvents.bind("gesturestart",Dy(this._scaleStart,this)),i.userEvents.bind("gestureend",Dy(this._scale,this)),i.userEvents.bind("doubleTap",Dy(this._doubleTap,this)),i.userEvents.bind("tap",Dy(this._tap,this)),this.scrollElement=i.scrollElement},e.prototype._initLayers=function(){for(var t=this.options.layers,e=this.layers=[],i=0;i<t.length;i++){var o=t[i],r=this._createLayer(o);e.push(r)}},e.prototype._createLayer=function(t){var e=t.type||"shape",i=this.options.layerDefaults[e],o=e===sm?at({},this.options.markerDefaults,t,{icons:this.options.icons}):at({},i,t),r=new(0,lm[e])(this,o);return e===sm&&(this.markers=r),r},e.prototype._createTooltip=function(){return new nv(this.widgetService,this.options.tooltip)},e.prototype._initMarkers=function(){(this.options.layers||[]).filter((function(t){return t&&t.type===sm})).length>0||(this.markers=new Dv(this,at({},this.options.markerDefaults,{icons:this.options.icons})),this.markers.add(this.options.markers))},e.prototype._scroll=function(t){var e=this.locationToLayer(this._viewOrigin).round(),i=t.sender.movable,o=new q.geometry.Point(i.x,i.y).scale(-1).scale(1/i.scale);e.x+=o.x,e.y+=o.y,this._scrollOffset=o,this._tooltip.offset=o,this.hideTooltip(),this._setOrigin(this.layerToLocation(e)),this.trigger("pan",{originalEvent:t,origin:this._getOrigin(),center:this.center()})},e.prototype._scrollEnd=function(t){this._scrollOffset&&this._panComplete()&&(this._scrollOffset=null,this._panEndTimestamp=Fe(),this.trigger("panEnd",{originalEvent:t,origin:this._getOrigin(),center:this.center()}))},e.prototype._panComplete=function(){return Fe()-(this._panEndTimestamp||0)>50},e.prototype._scaleStart=function(t){if(this.trigger("zoomStart",{originalEvent:t})){var e=t.touches[1];e&&e.cancel()}},e.prototype._scale=function(t){var e=this.scroller.movable.scale,i=this._scaleToZoom(e),o=new q.geometry.Point(t.center.x,t.center.y),r=this.viewToLocation(o,i),n=this.locationToLayer(r,i).translate(-o.x,-o.y);this._zoomAround(n,i),this.trigger("zoomEnd",{originalEvent:t})},e.prototype._scaleToZoom=function(t){var e=this._layerSize()*t/this.options.minSize,i=im.log(e)/im.log(2);return im.round(i)},e.prototype._reset=function(){this.attribution&&this.attribution.filter(this.center(),this.zoom()),this._viewOrigin=this._getOrigin(!0),this._resetScroller(),this.hideTooltip(),this.trigger("beforeReset"),this.trigger("reset")},e.prototype._resetScroller=function(){var t=this.scroller,e=t.dimensions.x,i=t.dimensions.y,o=this._layerSize(),r=this.extent().nw,n=this.locationToLayer(r).round();t.movable.round=!0,t.reset(),t.userEvents.cancel();var s=this.zoom();t.dimensions.forcedMinScale=rm(2,this.options.minZoom-s),t.dimensions.maxScale=rm(2,this.options.maxZoom-s);var a={min:-n.x,max:o-n.x},p={min:-n.y,max:o-n.y};if(this.options.wraparound&&(a.max=20*o,a.min=-a.max),!1===this.options.pannable){var l=this.viewSize();a.min=p.min=0,a.max=l.width,p.max=l.height}e.makeVirtual(),i.makeVirtual(),e.virtualSize(a.min,a.max),i.virtualSize(p.min,p.max),this._virtualSize={x:a,y:p}},e.prototype._renderLayers=function(){},e.prototype._layerSize=function(t){var e=Kt(t,this.options.zoom);return this.options.minSize*rm(2,e)},e.prototype._tap=function(t){if(this._panComplete()){var e=this.eventOffset(t);this.hideTooltip(),this.trigger("click",{originalEvent:t,location:this.viewToLocation(e)})}},e.prototype._doubleTap=function(t){if(!1!==this.options.zoomable&&!this.trigger("zoomStart",{originalEvent:t})){var e=this.zoom()+1,i=this.eventOffset(t),o=this.viewToLocation(i),r=this.locationToLayer(o,e).translate(-i.x,-i.y);this._zoomAround(r,e),this.trigger("zoomEnd",{originalEvent:t})}},e.prototype._mousewheel=function(t){var e=Et(t)>0?-1:1,i=this.options,o=this.zoom(),r=Xt(o+e,i.minZoom,i.maxZoom);if(!1!==i.zoomable&&r!==o&&!this.trigger("zoomStart",{originalEvent:t})){var n=this.eventOffset(t),s=this.viewToLocation(n),a=this.locationToLayer(s,r).translate(-n.x,-n.y);this._zoomAround(a,r),this.trigger("zoomEnd",{originalEvent:t})}},e.prototype._toDocumentCoordinates=function(t){var e=Ft(this.element);return{left:Zt(t.x+e.left),top:Zt(t.y+e.top)}},e}(Xe);te(hm,{name:"Map",controls:{attribution:!0,navigator:{panStep:100},zoom:!0},layers:[],layerDefaults:{shape:{style:{fill:{color:"#fff"},stroke:{color:"#aaa",width:.5}}},bubble:{style:{fill:{color:"#fff",opacity:.5},stroke:{color:"#aaa",width:.5}}},marker:{shape:"pinTarget",tooltip:{position:"top"}}},center:[0,0],icons:{type:"font",svgIcons:{}},zoom:3,minSize:256,minZoom:1,maxZoom:19,markers:[],markerDefaults:{shape:"pinTarget",tooltip:{position:"top"}},wraparound:!0,renderPointsAsMarkers:!1}),Gy(hm,["beforeReset","click","markerActivate","markerClick","markerCreated","markerMouseEnter","markerMouseLeave","pan","panEnd","reset","shapeClick","shapeCreated","shapeFeatureCreated","shapeMouseEnter","shapeMouseLeave","zoomEnd","zoomStart"]);const cm=hm;var um=function(t,e){return t.map(e).reduce((function(t,e){return t+e}),0)},dm=function(t,e){return t.y0===e.y0?t.index-e.index:t.y0+t.y1-e.y0-e.y1},fm=function(t,e){return dm(t.source,e.source)},gm=function(t,e){return dm(t.target,e.target)},ym=function(t){return t.value};function vm(t){t.forEach((function(t){t.targetLinks.forEach((function(t){t.source.sourceLinks.sort(gm)})),t.sourceLinks.forEach((function(t){t.target.targetLinks.sort(fm)}))}))}var mm=function(t,e){return"left"===t.align?t.depth:"right"===t.align?e-t.height:t.sourceLinks.length?t.depth:e},xm=function(t){var e=t.nodesOptions,i=e.offset;void 0===i&&(i={});var o=e.align;this.data={nodes:t.nodes.map((function(t){return at({},{offset:i,align:o},t)})),links:t.links.map((function(t){return at({},t)}))},this.width=t.width,this.height=t.height,this.offsetX=t.offsetX||0,this.offsetY=t.offsetY||0,this.nodeWidth=t.nodesOptions.width,this.nodePadding=t.nodesOptions.padding,this.reverse=t.reverse,this.targetColumnIndex=t.targetColumnIndex,this.loops=t.loops,this.autoLayout=t.autoLayout};xm.prototype.calculate=function(){var t=this.data,e=t.nodes,i=t.links;this.connectLinksToNodes(e,i),this.calculateNodeValues(e);var o=this.calculateNodeHeights(e);if(o)return{nodes:[],links:[],columns:[],circularLinks:o};this.calculateNodeDepths(e);var r=this.calculateNodeColumns(e);return this.calculateNodeBreadths(r),this.applyNodesOffset(e),this.calculateLinkBreadths(e),Object.assign({},this.data,{columns:r})},xm.prototype.connectLinksToNodes=function(t,e){var i=new Map;t.forEach((function(t,e){t.index=e,t.sourceLinks=[],t.targetLinks=[],t.id=void 0!==t.id?t.id:t.label.text,i.set(t.id,t)})),e.forEach((function(t){t.source=i.get(t.sourceId),t.target=i.get(t.targetId),t.source.sourceLinks.push(t),t.target.targetLinks.push(t)}))},xm.prototype.calculateNodeValues=function(t){t.forEach((function(t){t.value=Math.max(um(t.sourceLinks,ym),um(t.targetLinks,ym))}))},xm.prototype.calculateNodeDepths=function(t){for(var e=new Set(t),i=new Set,o=0;e.size;){for(var r=Array.from(e),n=0;n<r.length;n++){var s=r[n];s.depth=o;for(var a=0;a<s.sourceLinks.length;a++){var p=s.sourceLinks[a];i.add(p.target)}}o++,e=i,i=new Set}},xm.prototype.calculateNodeHeights=function(t){for(var e=t.length,i=new Set(t),o=new Set,r=0,n=function(t){t.height=r,t.targetLinks.forEach((function(t){o.add(t.source)}))};i.size;){if(i.forEach(n),++r>e)return!0;i=o,o=new Set}return!1},xm.prototype.calculateNodeColumns=function(t){for(var e,i,o=(e=t,i=function(t){return t.depth},Math.max.apply(null,e.map(i))),r=(this.width-this.offsetX-this.nodeWidth)/o,n=new Array(o+1),s=0;s<t.length;s++){var a=t[s],p=Math.max(0,Math.min(o,mm(a,o)));a.x0=this.offsetX+p*r,a.x1=a.x0+this.nodeWidth,a.layer=p,n[p]=n[p]||[],n[p].push(a)}return n},xm.prototype.calculateNodeBreadths=function(t){var e,i,o=this,r=(e=t,i=function(t){return(o.height-o.offsetY-(t.length-1)*o.nodePadding)/um(t,ym)},Math.min.apply(null,e.map(i)));if(t.forEach((function(t){var e=o.offsetY;t.forEach((function(t){t.y0=e,t.y1=e+t.value*r,e=t.y1+o.nodePadding,t.sourceLinks.forEach((function(t){t.width=t.value*r}))})),e=(o.height-e+o.nodePadding)/(t.length+1),t.forEach((function(t,i){t.y0+=e*(i+1),t.y1+=e*(i+1)}))})),!1!==this.autoLayout)for(var n=void 0!==this.loops?this.loops:t.length-1,s=this.targetColumnIndex||1,a=0;a<n;a++)this.reverse?(this.uncurlLinksToRight(t,s),this.uncurlLinksToLeft(t,s)):(this.uncurlLinksToLeft(t,s),this.uncurlLinksToRight(t,s));t.forEach(vm)},xm.prototype.applyNodesOffset=function(t){t.forEach((function(t){var e=(t.offset?t.offset.left:0)||0,i=(t.offset?t.offset.top:0)||0;t.x0+=e,t.x1+=e,t.y0+=i,t.y1+=i}))},xm.prototype.calculateLinkBreadths=function(t){t.forEach((function(t){var e=t.sourceLinks,i=t.targetLinks,o=t.y0,r=o;e.forEach((function(t){t.x0=t.source.x1,t.y0=o+t.width/2,o+=t.width})),i.forEach((function(t){t.x1=t.target.x0,t.y1=r+t.width/2,r+=t.width}))}))},xm.prototype.uncurlLinksToRight=function(t,e){for(var i=this,o=t.length,r=e;r<o;r++){var n=t[r];n.forEach((function(t){var e=0,o=0;t.targetLinks.forEach((function(r){var n=r.value*(t.layer-r.source.layer);e+=i.targetTopPos(r.source,t)*n,o+=n}));var r=0===e?0:e/o-t.y0;t.y0+=r,t.y1+=r,vm([t])})),n.sort(dm),this.arrangeNodesVertically(n)}},xm.prototype.uncurlLinksToLeft=function(t,e){for(var i=this,o=t.length-1-e;o>=0;o--){for(var r=t[o],n=function(t){var e=r[t],o=0,n=0;e.sourceLinks.forEach((function(t){var r=t.value*(t.target.layer-e.layer);o+=i.sourceTopPos(e,t.target)*r,n+=r}));var s=0===o?0:o/n-e.y0;e.y0+=s,e.y1+=s,vm([e])},s=0;s<r.length;s++)n(s);r.sort(dm),this.arrangeNodesVertically(r)}},xm.prototype.arrangeNodesVertically=function(t){var e=t.length-1;this.arrangeUp(t,this.height,e),this.arrangeDown(t,this.offsetY,0)},xm.prototype.arrangeDown=function(t,e,i){for(var o=e,r=i;r<t.length;r++){var n=t[r],s=Math.max(0,o-n.y0);n.y0+=s,n.y1+=s,o=n.y1+this.nodePadding}},xm.prototype.arrangeUp=function(t,e,i){for(var o=e,r=i;r>=0;--r){var n=t[r],s=Math.max(0,n.y1-o);n.y0-=s,n.y1-=s,o=n.y0-this.nodePadding}},xm.prototype.sourceTopPos=function(t,e){for(var i=e.y0-(e.targetLinks.length-1)*this.nodePadding/2,o=0;o<e.targetLinks.length;o++){var r=e.targetLinks[o];if(r.source===t)break;i+=r.width+this.nodePadding}for(var n=0;n<t.sourceLinks.length;n++){var s=t.sourceLinks[n];if(s.target===e)break;i-=s.width}return i},xm.prototype.targetTopPos=function(t,e){for(var i=t.y0-(t.sourceLinks.length-1)*this.nodePadding/2,o=0;o<t.sourceLinks.length;o++){var r=t.sourceLinks[o];if(r.target===e)break;i+=r.width+this.nodePadding}for(var n=0;n<e.targetLinks.length;n++){var s=e.targetLinks[n];if(s.source===t)break;i-=s.width}return i};var bm=function(t){return new xm(t).calculate()};function _m(t,e,i,o,r,n){var s=(n-e)*(i-t),a=(o-e)*(r-t);return s>a?1:s===a?0:-1}var wm=function(t){this.options=at({},this.options,t),this.createVisual()};wm.prototype.createVisual=function(){this.visual=this.createElement()},wm.prototype.exportVisual=function(){return this.visual},wm.prototype.createElement=function(){var t=this,e=this.options.visual;return e?e({sender:this.getSender(),options:this.visualOptions(),createVisual:function(){return t.getElement()}}):this.getElement()},wm.prototype.getSender=function(){return this};var km=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getElement=function(){return q.drawing.Path.fromRect(this.getRect(),this.visualOptions())},e.prototype.getRect=function(){var t=this.options.node;return new q.geometry.Rect([t.x0,t.y0],[t.x1-t.x0,t.y1-t.y0])},e.prototype.getLabelText=function(t){var e=t.labels.ariaTemplate;if(e)return e({node:t.node})},e.prototype.visualOptions=function(){var t=at({},this.options,this.options.node),e=this.getLabelText(t);return{fill:{color:t.color,opacity:t.opacity},stroke:{width:0},className:"k-sankey-node",role:"graphics-symbol",ariaRoleDescription:"Node",ariaLabel:e}},e.prototype.createFocusHighlight=function(){if(this.options.navigatable)return this._highlight=q.drawing.Path.fromRect(this.getRect(),{stroke:this.options.focusHighlight.border,visible:!1}),this._highlight},e.prototype.focus=function(t){if(this._highlight){var e=(t||{}).highlight;void 0===e&&(e=!0),e&&this._highlight.options.set("visible",!0);var i=this.options.node.id;this.visual.options.set("id",i),this.options.root()&&this.options.root().setAttribute(c,i)}},e.prototype.blur=function(){this._highlight&&(this._highlight.options.set("visible",!1),this.visual.options.set("id",""),this.options.root()&&this.options.root().removeAttribute(c))},e}(wm),Am=function(t,e,i){return t.color||e[i%e.length]},Sm=function(t,e,i,o){var r=at({},e,e.node);return at({},{color:Am(t,i,o)},r,{node:t},{visual:t.visual,opacity:t.opacity,offset:t.offset,color:t.color})},Cm=function(t,e,i,o,r){var n=1-r,s=n*n,a=r*r;return t*s*n+3*e*r*s+3*i*a*n+o*a*r},Pm=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getElement=function(){var t=this.options.link,e=t.x0,i=t.x1,o=t.y0,r=t.y1,n=(e+i)/2;return new q.drawing.Path(this.visualOptions()).moveTo(e,o).curveTo([n,o],[n,r],[i,r])},e.prototype.getLabelText=function(t){var e=t.labels.ariaTemplate;if(e)return e({link:t.link})},e.prototype.visualOptions=function(){var t=this.options,e=this.options.link,i=this.getLabelText(t);return{stroke:{width:t.link.width,color:e.color||t.color,opacity:jt(e.opacity)?e.opacity:t.opacity},role:"graphics-symbol",ariaRoleDescription:"Link",ariaLabel:i}},e.prototype.createFocusHighlight=function(){if(this.options.navigatable){var t=this.options.link,e=t.x0,i=t.x1,o=t.y0,r=t.y1,n=(e+i)/2,s=t.width/2,a=function(t,e){var i=t.width/2,o=e?t.x1:t.x0,r=e?t.x0:t.x1,n=e?t.y1:t.y0,s=e?t.y0:t.y1,a=(o+r)/2,p=[a,Cm(n,n,s,s,.5)],l=.4999,h=[Cm(o,a,a,r,l),Cm(n,n,s,s,l)],c=function(t,e,i,o,r){var n,s,a=(t+i)/2,p=(e+o)/2;if(e===o)n=0,s=r/2;else if(t===i)n=r/2,s=0;else{var l=-1/((o-e)/(i-t));s=l*(n=r/2/Math.sqrt(1+l*l))}return{P1:{x:a-n,y:p-s},P2:{x:a+n,y:p+s}}}(p[0],p[1],h[0],h[1],t.width),u=[a,Cm(n+i,n+i,s+i,s+i,.5)],d=c.P1.y>c.P2.y?c.P1:c.P2,f=(n>s?1:-1)*i,g=o,y=r;return a-((function(t,e,i,o,r){var n=(t.x+e.x)/2,s=(t.y+e.y)/2,a=e.x-t.x,p=-(e.y-t.y),l=a,h=Math.sqrt(p*p+l*l),c=n+(p=p/h*i),u=s+(l=l/h*i),d=n-p,f=s-l,g=r.x-o.x,y=r.y-o.y,v=y*(c-d)-g*(u-f);if(Math.abs(v)<1e-10)return null;var m=(g*(f-o.y)-y*(d-o.x))/v,x=((c-d)*(f-o.y)-(u-f)*(d-o.x))/v;return m>=0&&m<=1&&x>=0&&x<=1?{x:d+m*(c-d)}:null}(d,{x:u[0],y:u[1]},i,{x:u[0],y:u[1]},{x:Math.max(1,u[0]+f),y:u[1]})||{x:(u[0]+d.x)/2}).x-.125*g-.125*y)/.75}(t,this.options.rtl);this._highlight=new q.drawing.Path({stroke:this.options.focusHighlight.border,visible:!1}).moveTo(e,o+s).lineTo(e,o-s).curveTo([n+a,o-s],[n+a,r-s],[i,r-s]).lineTo(i,r+s).curveTo([n-a,r+s],[n-a,o+s],[e,o+s])}},e.prototype.focus=function(t){if(this._highlight){var e=(t||{}).highlight;void 0===e&&(e=!0),e&&this._highlight.options.set("visible",!0);var i=this.options.link.sourceId+"->"+this.options.link.targetId;this.visual.options.set("id",i),this.options.root()&&this.options.root().setAttribute(c,i)}},e.prototype.blur=function(){this._highlight&&(this._highlight.options.set("visible",!1),this.visual.options.set("id",""),this.options.root()&&this.options.root().removeAttribute(c))},e}(wm),Tm="inside",Mm="before",Om="after",Lm=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getElement=function(){var t=at({},this.options,this.options.node.label),e=t.node,i=t.diagramMinX,o=t.diagramMaxX,r=t.text,n=t.offset,s=t.rtl,a=t.position;if(s&&a!==Tm&&(a=a===Mm?Om:Mm),!t.visible||!r)return null;var p=new wi(e.x0,e.y0,e.x1,e.y1),l=this.visualOptions();s&&!l.align&&(l.align="right");var h=new $i(r,l);h.reflow(new wi);var c=h.box,u=p.center().y-c.height()/2,d=e.x1+c.width()>o,f=e.x0-c.width()<i,g=a===Mm||a===Tm&&d?Mm:Om;s&&(g=a===Om||a===Tm&&f?Om:Mm);var y=[g===Mm?e.x0-c.width():e.x1,u],v=new wi(y[0],y[1],y[0]+c.width(),y[1]+c.height());return v.translate(n.left||0,n.top||0),h.reflow(v),h.renderVisual(),h.visual},e.prototype.visualOptions=function(){var t=at({},this.options,this.options.node.label);return{color:t.color,font:t.font,border:t.border,margin:t.margin,padding:t.padding,align:t.align,paintOrder:t.paintOrder,stroke:t.stroke}},e}(wm);te(Lm,{position:Tm});var Bm=function(t,e,i,o,r){return at({},e,{node:t,diagramMinX:o,diagramMaxX:r,rtl:i,visual:t.label.visual,visible:t.label.visible,margin:t.label.margin,padding:t.label.padding,border:t.label.border,align:t.label.align,offset:t.label.offset})},Im=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getElement=function(){var t=this.options,e=t.drawingRect,i=t.text;if(!1===t.visible||!i)return null;var o=eo.buildTitle(i,t);return o.reflow(e),o.renderVisual(),o.visual},e.prototype.createElement=function(){return this.getElement()},e}(wm);te(Im,{align:f,border:{width:0},margin:dt(5),padding:dt(5)});var Em=function(t,e){return t.node.x0-e.node.x0!=0?t.node.x0-e.node.x0:t.node.y0-e.node.y0},Rm=function(t,e){return t.node.x1-e.node.x1!=0?t.node.x1-e.node.x1:e.node.y0-t.node.y0},Vm=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getElement=function(){var t=this.options,e=t.drawingRect,i=t.rtl,o=t.nodes;void 0===o&&(o=[]);var r=t.item,n=t.position;if(!1===t.visible||!o.length)return null;var s,a=t.labels||{};a.content&&(s=vt(a));var p=o.map((function(t){var e=t.label&&t.label.text||"";return{text:s?s({text:e,node:t}):e,area:{background:void 0!==r.areaBackground?r.areaBackground:t.color,opacity:void 0!==r.areaOpacity?r.areaOpacity:t.opacity},node:t}}));p.sort(function(t){return t?Rm:Em}(i));var l=i&&n!==C&&n!==B,h=new rh(Object.assign({},t,{data:p,reverse:l}),{rtl:i});return h.reflow(e),h.renderVisual(),h.visual},e.prototype.createElement=function(){return this.getElement()},e}(wm);te(Vm,{markers:{visible:!1},item:{type:_n,cursor:N,opacity:1},position:d,align:f,accessibility:{role:"presentation",ariaLabel:null,ariaRoleDescription:null},border:{width:0}});var zm="link",jm="node",Dm=function(t){function e(e,i,o){t.call(this),this._initTheme(o),this._setOptions(i),this._initElement(e),this._initSurface(),i&&i.data&&(this._redraw(),this._initResizeObserver(),this._initNavigation(e))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.destroy=function(){this.unbind(),this._destroySurface(),this._destroyResizeObserver(),this.element&&(this.element.removeEventListener("keydown",this._keydownHandler),this.element.removeEventListener("focus",this._focusHandler),this.element.removeEventListener("mousedown",this._onDownHandler),this.element.removeEventListener("touchstart",this._onDownHandler),this.element.removeEventListener("pointerdown",this._onDownHandler)),this._focusState=null,this.element=null},e.prototype._initElement=function(t){this.element=t,W(t,["k-chart","k-sankey"]),t.setAttribute("role","graphics-document");var e=this.options.title;e.text&&t.setAttribute("aria-label",e.text),e.description&&t.setAttribute("aria-roledescription",e.description)},e.prototype._initSurface=function(){this.surface||(this._destroySurface(),this._initSurfaceElement(),this.surface=this._createSurface())},e.prototype._initNavigation=function(t){t.tabIndex=t.getAttribute("tabindex")||0,this.options.disableKeyboardNavigation||(this._keydownHandler=this._keydown.bind(this),this._focusHandler=this._focus.bind(this),this._blurHandler=this._blur.bind(this),this._onDownHandler=this._onDown.bind(this),t.addEventListener("keydown",this._keydownHandler),t.addEventListener("focus",this._focusHandler),t.addEventListener("blur",this._blurHandler),t.addEventListener("mousedown",this._onDownHandler),t.addEventListener("touchstart",this._onDownHandler),t.addEventListener("pointerdown",this._onDownHandler),this._focusState={node:this.firstFocusableNode(),link:null})},e.prototype.firstFocusableNode=function(){return this.columns[0][0]},e.prototype._initResizeObserver=function(){var t=this,e=new ResizeObserver((function(e){e.forEach((function(e){var i=e.contentRect,o=i.width,r=i.height;e.target!==t.element||t.size&&t.size.width===o&&t.size.height===r||(t.size={width:o,height:r},t.surface.setSize(t.size),t.resize=!0,t._redraw())}))}));this._resizeObserver=e,e.observe(this.element)},e.prototype._createSurface=function(){return q.drawing.Surface.create(this.surfaceElement,{mouseenter:this._mouseenter.bind(this),mouseleave:this._mouseleave.bind(this),mousemove:this._mousemove.bind(this),click:this._click.bind(this)})},e.prototype._initTheme=function(t){var e=t||this.theme||{};this.theme=e,this.options=at({},e,this.options)},e.prototype.setLinksOpacity=function(t){var e=this;this.linksVisuals.forEach((function(i){e.setOpacity(i,t,i.linkOptions.opacity)}))},e.prototype.setLinksInactivityOpacity=function(t){var e=this;this.linksVisuals.forEach((function(i){e.setOpacity(i,t,i.linkOptions.highlight.inactiveOpacity)}))},e.prototype.setOpacity=function(t,e,i){t.options.set("stroke",Object.assign({},t.options.stroke,{opacity:jt(i)?i:e}))},e.prototype.trigger=function(e,i){var o=i.element.dataItem,r=i.element.type,n=Object.assign({},i,{type:e,targetType:r,dataItem:o});return t.prototype.trigger.call(this,e,n)},e.prototype._mouseenter=function(t){var e=t.element,i=e.type===zm,o=e.type===jm,r=Boolean(e.chartElement&&e.chartElement.options.node);if(!(i&&this.trigger("linkEnter",t)||o&&this.trigger("nodeEnter",t))){var n=this.options.links.highlight;if(i)this.setLinksInactivityOpacity(n.inactiveOpacity),this.setOpacity(e,n.opacity,e.linkOptions.highlight.opacity);else if(o)this.highlightLinks(e,n);else if(r){var s=this.nodesVisuals.get(e.chartElement.options.node.id);this.highlightLinks(s,n)}}},e.prototype._mouseleave=function(t){var e=this,i=t.element,o=i.type===zm,r=i.type===jm,n=Boolean(i.chartElement&&i.chartElement.options.node),s=t.originalEvent.relatedTarget;o&&s&&"text"===s.nodeName||((o||r)&&(this.tooltipTimeOut&&(clearTimeout(this.tooltipTimeOut),this.tooltipTimeOut=null),this.tooltipShown=!1,this.trigger("tooltipHide",t)),o&&this.trigger("linkLeave",t)||r&&this.trigger("nodeLeave",t)||(o||r||n)&&this.linksVisuals.forEach((function(t){e.setOpacity(t,e.options.links.opacity,t.linkOptions.opacity)})))},e.prototype._mousemove=function(t){var e=this,i=this.options.tooltip,o=i.followPointer,r=i.delay,n=t.element,s=n.type;if(!(s!==zm&&s!==jm||this.tooltipShown&&!o)){var a=t.originalEvent,p=this.element.getBoundingClientRect(),l=a.clientX-p.left<p.width/2,h=a.clientY-p.top<p.height/2;if(t.tooltipData={popupOffset:{left:a.pageX,top:a.pageY},popupAlign:{horizontal:l?"left":"right",vertical:h?"top":"bottom"}},s===jm){var c=n.dataItem,u=c.sourceLinks,d=c.targetLinks,f=d.length?d:u;t.nodeValue=f.reduce((function(t,e){return t+e.value}),0)}this.tooltipTimeOut&&(clearTimeout(this.tooltipTimeOut),this.tooltipTimeOut=null);var g=o&&this.tooltipShown?0:r;this.tooltipTimeOut=setTimeout((function(){e.trigger("tooltipShow",t),e.tooltipShown=!0,e.tooltipTimeOut=null}),g)}},e.prototype._click=function(t){var e=t.element,i=e.dataItem,o=e.type===zm,r=e.type===jm,n=this._focusState||{};if(r)!n.link&&this.sameNode(n.node,i)||(this._focusState={node:i,link:null},this._focusNode({highlight:!1})),this.trigger("nodeClick",t);else if(o){var s={sourceId:i.source.id,targetId:i.target.id,value:i.value};this.sameLink(n.link,s)||(this._focusState={node:i.source,link:s},this._focusLink({highlight:!1})),this.trigger("linkClick",t)}},e.prototype.sameNode=function(t,e){return t&&e&&t.id===e.id},e.prototype.sameLink=function(t,e){return t&&e&&t.sourceId===e.sourceId&&t.targetId===e.targetId},e.prototype._focusNode=function(t){this._cleanFocusHighlight();var e=this._focusState.node;this.models.map.get(e.id).focus(t)},e.prototype._focusLink=function(t){this._cleanFocusHighlight();var e=this._focusState.link;this.models.map.get(e.sourceId+"-"+e.targetId).focus(t)},e.prototype._focusNextNode=function(t){void 0===t&&(t=1);var e=this._focusState.node,i=this.columns.findIndex((function(t){return t.find((function(t){return t.id===e.id}))})),o=this.columns[i],r=o.findIndex((function(t){return t.id===e.id})),n=o[r+t];n&&(this._focusState.node=n,this._focusNode())},e.prototype._focusNextLink=function(t){void 0===t&&(t=1);var e=this._focusState.node,i=this._focusState.link,o=e.sourceLinks.findIndex((function(t){return t.sourceId===i.sourceId&&t.targetId===i.targetId})),r=e.targetLinks.findIndex((function(t){return t.sourceId===i.sourceId&&t.targetId===i.targetId}));if(-1!==o){var n=e.sourceLinks[o+t];n&&(this._focusState.link=n,this._focusLink())}else if(-1!==r){var s=e.targetLinks[r+t];s&&(this._focusState.link=s,this._focusLink())}},e.prototype._focusSourceNode=function(){var t=this._focusState.link,e=this.models.map.get(t.sourceId);this._focusState={node:e.options.node,link:null},this._focusNode()},e.prototype._focusTargetNode=function(){var t=this._focusState.link,e=this.models.map.get(t.targetId);this._focusState={node:e.options.node,link:null},this._focusNode()},e.prototype._focusSourceLink=function(){var t=this._focusState.node.sourceLinks[0];t&&(this._focusState.link=t,this._focusLink())},e.prototype._focusTargetLink=function(){var t=this._focusState.node.targetLinks[0];t&&(this._focusState.link=t,this._focusLink())},e.prototype._focus=function(){this._skipFocusHighlight||(this._focusState.link?this._focusLink():this._focusNode()),this._skipFocusHighlight=!1},e.prototype._blur=function(){this._cleanFocusHighlight()},e.prototype._onDown=function(){this._hasFocus()||(this._skipFocusHighlight=!0)},e.prototype._hasFocus=function(){return this.element.ownerDocument.activeElement===this.element},e.prototype._cleanFocusHighlight=function(){this.models.nodes.forEach((function(t){return t.blur()})),this.models.links.forEach((function(t){return t.blur()}))},e.prototype._keydown=function(t){var e=this["on"+t.key],i=this.options.rtl;i&&"ArrowLeft"===t.key?e=this.onArrowRight:i&&"ArrowRight"===t.key&&(e=this.onArrowLeft),e&&e.call(this,t)},e.prototype.onEscape=function(t){t.preventDefault(),this._focusState={node:this.firstFocusableNode(),link:null},this._focusNode()},e.prototype.onArrowDown=function(t){t.preventDefault(),this._focusState.link?this._focusNextLink(1):this._focusNextNode(1)},e.prototype.onArrowUp=function(t){t.preventDefault(),this._focusState.link?this._focusNextLink(-1):this._focusNextNode(-1)},e.prototype.onArrowLeft=function(t){t.preventDefault(),this._focusState.link?this._focusSourceNode():this._focusTargetLink()},e.prototype.onArrowRight=function(t){t.preventDefault(),this._focusState.link?this._focusTargetNode():this._focusSourceLink()},e.prototype.highlightLinks=function(t,e){var i=this;t&&(this.setLinksInactivityOpacity(e.inactiveOpacity),t.links.forEach((function(t){i.setOpacity(t,e.opacity,t.linkOptions.highlight.opacity)})))},e.prototype._destroySurface=function(){this.surface&&(this.surface.destroy(),this.surface=null,this._destroySurfaceElement())},e.prototype._destroyResizeObserver=function(){this._resizeObserver&&(this._resizeObserver.disconnect(),this._resizeObserver=null)},e.prototype._initSurfaceElement=function(){this.surfaceElement||(this.surfaceElement=document.createElement("div"),this.element.appendChild(this.surfaceElement))},e.prototype._destroySurfaceElement=function(){this.surfaceElement&&this.surfaceElement.parentNode&&(this.surfaceElement.parentNode.removeChild(this.surfaceElement),this.surfaceElement=null)},e.prototype.setOptions=function(t,e){this._setOptions(t),this._initTheme(e),this._initSurface(),this._redraw()},e.prototype._redraw=function(){this.surface.clear();var t=this._getSize(),e=t.width,i=t.height;this.size={width:e,height:i},this.surface.setSize(this.size),this.createVisual(),this.surface.draw(this.visual)},e.prototype._getSize=function(){return this.element.getBoundingClientRect()},e.prototype.createVisual=function(){this.visual=this._render()},e.prototype.titleBox=function(t,e){return t&&!1!==t.visible&&t.text?new Im(Object.assign({},{drawingRect:e},t)).exportVisual().chartElement.box:null},e.prototype.legendBox=function(t,e,i){return t&&!1!==t.visible?new Vm(Object.assign({},{nodes:e},t,{drawingRect:i})).exportVisual().chartElement.box:null},e.prototype.calculateSankey=function(t,e){var i=e.title,o=e.legend,r=e.data,n=e.nodes,s=e.labels,a=e.nodeColors,p=e.disableAutoLayout,l=e.disableKeyboardNavigation,h=e.rtl,c=!p,u=((n.focusHighlight||{}).border||{}).width||0,f=l?0:u/2,g=new wi(0,0,t.width,t.height);g.unpad(f);var y=this.titleBox(i,g),v=g.clone();if(y){var m=y.height();i.position===V?(g.unpad({top:m}),v=new wi(0,m,t.width,t.height)):(g.shrink(0,m),v=new wi(0,0,t.width,t.height-m))}var x=this.legendBox(o,r.nodes,v),b=o&&o.position||Vm.prototype.options.position;x&&(b===C&&g.unpad({left:x.width()}),b===B&&g.shrink(x.width(),0),b===V&&g.unpad({top:x.height()}),b===d&&g.shrink(0,x.height()));var _=bm(Object.assign({},t,{offsetX:0,offsetY:0,width:g.width(),height:g.height()})),w=_.nodes,k=_.circularLinks;if(k)return console.warn("Circular links detected. Kendo Sankey diagram does not support circular links."),{sankey:{nodes:[],links:[],columns:[[]],circularLinks:k},legendBox:x,titleBox:y};var A=new wi,S=w.reduce((function(t,e){return Math.min(t,e.x0)}),1/0),P=w.reduce((function(t,e){return Math.max(t,e.x1)}),0);w.forEach((function(t,e){if(h){var i=t.x0,o=t.x1;t.x0=P-o,t.x1=P-i}var r=Sm(t,n,a,e),p=new km(r);A.wrap(Zi(p.exportVisual().rawBBox()));var l=new Lm(Bm(t,s,h,S,P)).exportVisual();l&&A.wrap(Zi(l.rawBBox()))}));var T=g.x1,M=g.y1,O=g.width()+T,L=g.height()+M;if(O-=A.x2>g.width()?A.x2-g.width():0,L-=A.y2>g.height()?A.y2-g.height():0,T+=A.x1<0?-A.x1:0,M+=A.y1<0?-A.y1:0,!1===c)return{sankey:bm(Object.assign({},t,{offsetX:T,offsetY:M,width:O,height:L,autoLayout:!1})),legendBox:x,titleBox:y};if(this.resize&&c&&this.permutation)return this.resize=!1,{sankey:bm(Object.assign({},t,{offsetX:T,offsetY:M,width:O,height:L},this.permutation)),legendBox:x,titleBox:y};for(var I=bm(Object.assign({},t,{offsetX:T,offsetY:M,width:O,height:L,autoLayout:!1})).columns.length,E=[],R=function(e,i){var o=function(t){for(var e,i,o,r,n,s,a=0,p=t.length,l=0;l<p;l++)for(var h=t[l],c=l+1;c<p;c++){var u=t[c];i=u,void 0,void 0,void 0,void 0,o=_m((e=h).x0,e.y0,e.x1,e.y1,i.x1,i.y1),r=_m(e.x0,e.y0,e.x1,e.y1,i.x0,i.y0),n=_m(e.x0,e.y0,i.x0,i.y0,i.x1,i.y1),s=_m(e.x1,e.y1,i.x0,i.y0,i.x1,i.y1),o!==r&&n!==s&&(a+=Math.min(h.value,u.value))}return a}(bm(Object.assign({},t,{offsetX:T,offsetY:M,width:O,height:L,loops:2,targetColumnIndex:e,reverse:i})).links);return E.push({crosses:o,reverse:i,targetColumnIndex:e}),0===o},z=1;z<=I-1&&!R(z,!1)&&!R(z,!0);z++);var j=Math.min.apply(null,E.map((function(t){return t.crosses}))),D=E.find((function(t){return t.crosses===j}));return this.permutation={targetColumnIndex:D.targetColumnIndex,reverse:D.reverse},{sankey:bm(Object.assign({},t,{offsetX:T,offsetY:M,width:O,height:L},this.permutation)),legendBox:x,titleBox:y}},e.prototype._render=function(t,e){var i=t||this.options,o=e||this,r=i.labels,n=i.nodes,s=i.links,a=i.nodeColors,p=i.title,l=i.legend,h=i.rtl,c=i.disableKeyboardNavigation,u=i.data,d=o.size,f=d.width,g=d.height,y=Object.assign({},u,{width:f,height:g,nodesOptions:n,title:p,legend:l}),v=this.calculateSankey(y,i),m=v.sankey,x=v.titleBox,b=v.legendBox;h&&function(t){var e=t.nodes,i=t.links,o=Math.min.apply(Math,e.map((function(t){return t.x0}))),r=Math.max.apply(Math,e.map((function(t){return t.x1})))-o;e.forEach((function(t){var e=r-(t.x1-2*o),i=r-(t.x0-2*o);t.x0=e,t.x1=i})),i.forEach((function(t){var e=r-(t.x1-2*o),i=r-(t.x0-2*o);t.x1=e,t.x0=i}))}(m);var _=m.nodes,w=m.links,k=m.columns;o.columns=k.map((function(t){var e=t.slice();return e.sort((function(t,e){return t.y0-e.y0})),e}));var A=new q.drawing.Group({clip:q.drawing.Path.fromRect(new q.geometry.Rect([0,0],[f,g]))});if(x){var S=new Im(Object.assign({},p,{drawingRect:x})).exportVisual();A.append(S)}if(m.circularLinks)return A;var C=new Map;o.nodesVisuals=C;var P={nodes:[],links:[],map:new Map};o.models=P;var T=[];_.forEach((function(t,e){var i=Sm(t,n,a,e);i.root=function(){return o.element},i.navigatable=!0!==c;var r=new km(i),s=r.exportVisual();s.links=[],s.type=jm,t.color=i.color,t.opacity=i.opacity,s.dataItem=Object.assign({},u.nodes[e],{color:i.color,opacity:i.opacity,sourceLinks:t.sourceLinks.map((function(t){return{sourceId:t.sourceId,targetId:t.targetId,value:t.value}})),targetLinks:t.targetLinks.map((function(t){return{sourceId:t.sourceId,targetId:t.targetId,value:t.value}}))}),C.set(t.id,s),P.nodes.push(r),P.map.set(t.id,r),A.append(s),r.createFocusHighlight(),r._highlight&&T.push(r._highlight)}));var M=w.slice().sort((function(t,e){return e.value-t.value})),O=[];o.linksVisuals=O,M.forEach((function(t){var e=t.source,i=t.target,r=C.get(e.id),n=C.get(i.id),a=function(t,e,i,o){var r=at({},e,{link:t,opacity:t.opacity,color:t.color,colorType:t.colorType,visual:t.visual,highlight:t.highlight});return"source"===r.colorType?r.color=i.options.fill.color:"target"===r.colorType&&(r.color=o.options.fill.color),r}(t,s,r,n);a.root=function(){return o.element},a.navigatable=!0!==c,a.rtl=h;var p=new Pm(a),l=p.exportVisual();l.type=zm,l.dataItem={source:Object.assign({},r.dataItem),target:Object.assign({},n.dataItem),value:t.value},l.linkOptions=a,O.push(l),r.links.push(l),n.links.push(l),P.links.push(p),P.map.set(e.id+"-"+i.id,p),p.createFocusHighlight(),p._highlight&&T.push(p._highlight),A.append(l)}));var L=_.reduce((function(t,e){return Math.min(t,e.x0)}),1/0),B=_.reduce((function(t,e){return Math.max(t,e.x1)}),0);if(_.forEach((function(t){var e=Bm(t,r,h,L,B),i=new Lm(e).exportVisual();i&&A.append(i)})),b){var I=new Vm(Object.assign({},l,{rtl:h,drawingRect:b,nodes:_})).exportVisual();A.append(I)}if(0!==T.length){var E=new q.drawing.Group;E.append.apply(E,T),A.append(E)}return A},e.prototype.exportVisual=function(t){var e=t&&t.options?at({},this.options,t.options):this.options,i={size:{width:jt(t&&t.width)?t.width:this.size.width,height:jt(t&&t.height)?t.height:this.size.height}};return this._render(e,i)},e.prototype._setOptions=function(t){this.options=at({},this.options,t)},e}(Xe),Fm={opacity:1,width:2,color:u};te(Dm,{title:{position:V},labels:{visible:!0,margin:{left:8,right:8},padding:0,border:{width:0},paintOrder:"stroke",stroke:{lineJoin:"round",width:1},offset:{left:0,top:0}},nodes:{width:24,padding:16,opacity:1,align:"stretch",offset:{left:0,top:0},focusHighlight:{border:Object.assign({},Fm)},labels:{ariaTemplate:function(t){return t.node.label.text}}},links:{colorType:"static",opacity:.4,highlight:{opacity:.8,inactiveOpacity:.2},focusHighlight:{border:Object.assign({},Fm)},labels:{ariaTemplate:function(t){var e=t.link;return e.source.label.text+" to "+e.target.label.text}}},tooltip:{followPointer:!1,delay:200}});var Hm=function(t,e,i){var o=new Set,r=new Map,n=new Map;t.forEach((function(t){e.forEach((function(e){o.add(e.value(t))}));for(var s=0;s<e.length-1;s++){var a=e[s].value(t),p=e[s+1].value(t),l=a+"_"+p,h=i.value(t),c=r.get(l);void 0!==c?r.set(l,c+h):(r.set(l,h),n.set(l,{source:a,target:p}))}}));var s=new Map,a=Array.from(o).map((function(t,e){return s.set(t,e),{id:e,label:{text:String(t)}}})),p=Array.from(r).map((function(t){var e=t[0],i=t[1],o=n.get(e),r=o.source,a=o.target;return{sourceId:s.get(r),targetId:s.get(a),value:i}}));return{nodes:a,links:p}},Nm=Object.freeze({seriesType:0,stacked:1,categoryAxisX:2,valueAxisY:3,seriesChange:4,areaMarginLeft:5,areaMarginRight:6,areaMarginTop:7,areaMarginBottom:8,areaBackground:9,titleText:10,titleFontName:11,titleFontSize:12,titleColor:13,subtitleText:14,subtitleFontName:15,subtitleFontSize:16,subtitleColor:17,seriesColor:18,seriesLabel:19,legendVisible:20,legendFontName:21,legendFontSize:22,legendColor:23,legendPosition:24,categoryAxisTitleText:25,categoryAxisTitleFontName:26,categoryAxisTitleFontSize:27,categoryAxisTitleColor:28,categoryAxisLabelsFontName:29,categoryAxisLabelsFontSize:30,categoryAxisLabelsColor:31,categoryAxisLabelsRotation:32,categoryAxisReverseOrder:33,valueAxisTitleText:34,valueAxisTitleFontName:35,valueAxisTitleFontSize:36,valueAxisTitleColor:37,valueAxisLabelsFormat:38,valueAxisLabelsFontName:39,valueAxisLabelsFontSize:40,valueAxisLabelsColor:41,valueAxisLabelsRotation:42}),Um="12px",Gm="16px",Wm=[{text:"Arial",value:"Arial, Helvetica, sans-serif",style:{fontFamily:"Arial, Helvetica, sans-serif"}},{text:"Courier New",value:"'Courier New', Courier, monospace",style:{fontFamily:"'Courier New', Courier, monospace"}},{text:"Georgia",value:"Georgia, serif",style:{fontFamily:"Georgia, serif"}},{text:"Impact",value:"Impact, Charcoal, sans-serif",style:{fontFamily:"Impact, Charcoal, sans-serif"}},{text:"Lucida Console",value:"'Lucida Console', Monaco, monospace",style:{fontFamily:"'Lucida Console', Monaco, monospace"}},{text:"Tahoma",value:"Tahoma, Geneva, sans-serif",style:{fontFamily:"Tahoma, Geneva, sans-serif"}},{text:"Times New Roman",value:"'Times New Roman', Times,serif",style:{fontFamily:"'Times New Roman', Times,serif"}},{text:"Trebuchet MS",value:"'Trebuchet MS', Helvetica, sans-serif",style:{fontFamily:"'Trebuchet MS', Helvetica, sans-serif"}},{text:"Verdana",value:"Verdana, Geneva, sans-serif",style:{fontFamily:"Verdana, Geneva, sans-serif"}}],Xm=Wm[0].value,Ym="line",qm="scatter",Zm=["column","bar",Ym,qm],Qm={type:Ym,width:0};function Km(t){return t&&Zm.includes(t)}var $m=["string","date","number"],Jm=["number"],tx={bar:[{axisType:"category",types:$m},{axisType:"value",types:Jm}],column:[{axisType:"category",types:$m},{axisType:"value",types:Jm}],line:[{axisType:"category",types:$m},{axisType:"value",types:Jm}],pie:[{axisType:"category",types:$m},{axisType:"value",types:Jm,count:1}],scatter:[{axisType:"category",types:$m},{axisType:"value",types:Jm}]};function ex(t,e){return((e||"")+" "+(t||"")).trim()}function ix(t){var e=(t||"").indexOf(" ");return{size:t&&t.substring(0,e),name:t&&t.substring(e+1)}}var ox=function(t,e,i){var o=ix(i).size;return t?ex(t,o||e):""},rx=function(t,e,i){var o=ix(i).name;return t?ex(o||e,t):""},nx=function(t){return null!=t},sx=function(t){var e=structuredClone(t[0]);return e.forEach((function(e,i){if(!nx(e.value))for(var o=0;o<t.length;o++){var r=t[o][i].value;if(nx(r)){e.value=r;break}}})),e},ax=function(t,e){var i=[],o=sx(t);e.types.forEach((function(t){o.forEach((function(e,o){typeof e.value===t&&i.push(o)}))}));var r=i.findIndex((function(e){var i=t.map((function(t){return t[e].value}));return new Set(i).size===i.length}));return Math.max(r,0)},px=function(t,e){var i=[],o=sx(t);return e.forEach((function(t){t.types.forEach((function(t){o.forEach((function(e,o){typeof e.value===t&&i.push(o)}))}))})),i},lx=function(){return structuredClone({columns:[],data:[],series:[],initialSeries:[],categoryAxis:[{categories:[],labels:{visible:!0,rotation:"auto"},title:{text:""}}],valueAxis:[{labels:{visible:!0,rotation:"auto"}}],area:{margin:{left:void 0,right:void 0,top:void 0,bottom:void 0}},title:{text:""},subtitle:{text:""},stack:!1})},hx=function(t,e,i){var o=lx();o.seriesType=e,o.data=t||[],o.legend={visible:!0,position:"bottom"};var r=tx[e];if(!r||!t.length)return o;var n=t[0].slice();o.columns=t[0].map((function(t){return String(t.field)}));var s=r.find((function(t){return"category"===t.axisType})),a=-1;s&&(a=i&&i.categoryAxis?o.columns.indexOf(i.categoryAxis):ax(t,s));var p=r.filter((function(t){return"value"===t.axisType})),l=px(t,p);l.includes(a)&&(l.length>1?l=l.filter((function(t){return t!==a})):a=-1);var h=[];l.forEach((function(i){var o=n[i],r=[];t.forEach((function(t){r.push(t[i].value)})),h.push(Object.assign({},{name:o.field,type:e,data:r,stack:!1,labels:{visible:!1}},e===qm?Qm:{}))}));var c=a>-1?t.map((function(t){return String(nx(t[a].value)?t[a].value:" ")})):[];return h.length&&(o.series=h.map((function(t,e){return Object.assign({},t,{id:e})})),o.initialSeries=structuredClone(o.series)),o.categoryAxis=[{categories:c,labels:{visible:!0,rotation:"auto"}}],o.categoryField=o.columns[a],o},cx=function(t,e,i){var o=lx();o.seriesType=e,o.data=t||[];var r=tx[e];if(!r||!t.length)return o;var n=t[0].map((function(t){return t.field})),s=r.find((function(t){return"category"===t.axisType})),a=-1;s&&(a=i&&i.categoryAxis?n.indexOf(i.categoryAxis):ax(t,s));var p=r.filter((function(t){return"value"===t.axisType})),l=[];(l=i&&i.valueAxis?[n.indexOf(i.valueAxis)]:px(t,p)).includes(a)&&l.length>1&&(l=l.filter((function(t){return t!==a}))),"number"==typeof p[0].count&&(l=l.slice(0,p[0].count));var h=a>-1?t.map((function(t){return String(t[a].value)})):[],c=[];return t.forEach((function(t){var e={};l.forEach((function(i){var o=t[i];e[o.field]=o.value||0,e[t[a].field]=t[a].value||" "})),c.push(e)})),o.columns=n,o.categoryAxis=[{categories:h,title:{text:""}}],o.series=[{id:0,data:c,type:e,name:n[a],labels:{visible:!0},categoryField:n[a],field:n[l[0]]}],o.categoryField=n[a],o.valueField=n[l[0]],o.initialSeries=structuredClone(o.series),o};function ux(t,e){return(Km(e)?hx:cx)(t,e)}function dx(t,e){var i=structuredClone(e);if(i.legend=t.legend,i.area=t.area,i.title=t.title,i.subtitle=t.subtitle,i.series.length===t.series.length)for(var o=0;o<i.series.length;o++)i.series[o].color=t.series[o].color,i.series[o].labels=t.series[o].labels;return t.series.every((function(t){return t.labels&&t.labels.visible}))&&Km(i.seriesType)&&Km(t.seriesType)&&i.series.forEach((function(t){t.labels=t.labels||{},t.labels.visible=!0})),i}function fx(t,e,i){var o=Object.assign({},t);switch(e){case Nm.seriesType:return ux(o.data,i);case Nm.stacked:return o.series=o.series.map((function(t){return Object.assign({},t,{stack:i})})),o.stack=i,o;case Nm.categoryAxisX:if(o.seriesType&&Km(o.seriesType)){var r=hx(o.data,o.seriesType,{categoryAxis:i});return function(t,e){if(void 0!==t.stack){e.stack=t.stack;for(var i=0;i<e.series.length;i++)e.series[i].stack=t.stack}}(o,r),dx(o,r)}return"pie"===o.seriesType?dx(o,cx(o.data,o.seriesType,{categoryAxis:i})):o;case Nm.valueAxisY:return"pie"===o.seriesType?dx(o,cx(o.data,o.seriesType,{categoryAxis:o.categoryField,valueAxis:i})):o;case Nm.seriesChange:return o.series=i,o;case Nm.areaMarginLeft:return o.area=Object.assign({},o.area,{margin:Object.assign({},o.area&&o.area.margin||{},{left:i})}),o;case Nm.areaMarginRight:return o.area=Object.assign({},o.area,{margin:Object.assign({},o.area&&o.area.margin||{},{right:i})}),o;case Nm.areaMarginTop:return o.area=Object.assign({},o.area,{margin:Object.assign({},o.area&&o.area.margin||{},{top:i})}),o;case Nm.areaMarginBottom:return o.area=Object.assign({},o.area,{margin:Object.assign({},o.area&&o.area.margin||{},{bottom:i})}),o;case Nm.areaBackground:return o.area=Object.assign({},o.area,{background:i}),o;case Nm.titleText:return o.title=Object.assign({},o.title,{text:i}),o;case Nm.titleFontName:return o.title=Object.assign({},o.title,{font:ox(i,"20px",o.title&&o.title.font)}),o;case Nm.titleFontSize:return o.title=Object.assign({},o.title,{font:rx(i,Xm,o.title&&o.title.font)}),o;case Nm.titleColor:return o.title=Object.assign({},o.title,{color:i}),o;case Nm.subtitleText:return o.subtitle=Object.assign({},o.subtitle,{text:i}),o;case Nm.subtitleFontName:return o.subtitle=Object.assign({},o.subtitle,{font:ox(i,"16px",o.subtitle&&o.subtitle.font)}),o;case Nm.subtitleFontSize:return o.subtitle=Object.assign({},o.subtitle,{font:rx(i,Xm,o.subtitle&&o.subtitle.font)}),o;case Nm.subtitleColor:return o.subtitle=Object.assign({},o.subtitle,{color:i}),o;case Nm.seriesColor:return o.series=o.series.map((function(t){return Object.assign({},t,{color:i.seriesName===t.name?i.color:t.color})})),o;case Nm.seriesLabel:return o.series=o.series.map((function(t){return i.all||i.seriesName===t.name?Object.assign({},t,{labels:{visible:i.visible}}):t})),o;case Nm.legendVisible:return o.legend=Object.assign({},o.legend,{visible:i}),o;case Nm.legendFontName:var n=o.legend||{};return o.legend=Object.assign({},n,{labels:Object.assign({},n.labels,{font:ox(i,Um,n.labels&&n.labels.font)})}),o;case Nm.legendFontSize:var s=o.legend||{};return o.legend=Object.assign({},s,{labels:Object.assign({},s.labels,{font:rx(i,Xm,s.labels&&s.labels.font)})}),o;case Nm.legendColor:var a=o.legend||{};return o.legend=Object.assign({},a,{labels:Object.assign({},a.labels,{color:i})}),o;case Nm.legendPosition:return o.legend=Object.assign({},o.legend,{position:i}),o;case Nm.categoryAxisTitleText:return o.categoryAxis=(o.categoryAxis||[]).map((function(t){return Object.assign({},t,{title:Object.assign({},t.title,{text:i})})})),o;case Nm.categoryAxisTitleFontName:return o.categoryAxis=(o.categoryAxis||[]).map((function(t){return Object.assign({},t,{title:Object.assign({},t.title,{font:ox(i,Gm,t.title&&t.title.font)})})})),o;case Nm.categoryAxisTitleFontSize:return o.categoryAxis=(o.categoryAxis||[]).map((function(t){return Object.assign({},t,{title:Object.assign({},t.title,{font:rx(i,Xm,t.title&&t.title.font)})})})),o;case Nm.categoryAxisTitleColor:return o.categoryAxis=(o.categoryAxis||[]).map((function(t){return Object.assign({},t,{title:Object.assign({},t.title,{color:i})})})),o;case Nm.categoryAxisLabelsFontName:return o.categoryAxis=(o.categoryAxis||[]).map((function(t){return Object.assign({},t,{labels:Object.assign({},t.labels,{font:ox(i,Um,t.labels&&t.labels.font)})})})),o;case Nm.categoryAxisLabelsFontSize:return o.categoryAxis=(o.categoryAxis||[]).map((function(t){return Object.assign({},t,{labels:Object.assign({},t.labels,{font:rx(i,Xm,t.labels&&t.labels.font)})})})),o;case Nm.categoryAxisLabelsColor:return o.categoryAxis=(o.categoryAxis||[]).map((function(t){return Object.assign({},t,{labels:Object.assign({},t.labels,{color:i})})})),o;case Nm.categoryAxisLabelsRotation:var p=nx(i)?i:"auto";return o.categoryAxis=(o.categoryAxis||[]).map((function(t){return Object.assign({},t,{labels:Object.assign({},t.labels,{rotation:p})})})),o;case Nm.categoryAxisReverseOrder:return o.categoryAxis=(o.categoryAxis||[]).map((function(t){return Object.assign({},t,{reverse:i})})),o;case Nm.valueAxisTitleText:return o.valueAxis&&0!==o.valueAxis.length?o.valueAxis=(o.valueAxis||[]).map((function(t){return Object.assign({},t,{title:Object.assign({},t.title,{text:i})})})):o.valueAxis=[{title:{text:i}}],o;case Nm.valueAxisTitleFontName:return o.valueAxis=(o.valueAxis||[]).map((function(t){return Object.assign({},t,{title:Object.assign({},t.title,{font:ox(i,Gm,t.title&&t.title.font)})})})),o;case Nm.valueAxisTitleFontSize:return o.valueAxis=(o.valueAxis||[]).map((function(t){return Object.assign({},t,{title:Object.assign({},t.title,{font:rx(i,Xm,t.title&&t.title.font)})})})),o;case Nm.valueAxisTitleColor:return o.valueAxis=(o.valueAxis||[]).map((function(t){return Object.assign({},t,{title:Object.assign({},t.title,{color:i})})})),o;case Nm.valueAxisLabelsFormat:return o.valueAxis=(o.valueAxis||[]).map((function(t){return Object.assign({},t,{labels:Object.assign({},t.labels,{format:i})})})),o;case Nm.valueAxisLabelsFontName:return o.valueAxis=(o.valueAxis||[]).map((function(t){return Object.assign({},t,{labels:Object.assign({},t.labels,{font:ox(i,Um,t.labels&&t.labels.font)})})})),o;case Nm.valueAxisLabelsFontSize:return o.valueAxis=(o.valueAxis||[]).map((function(t){return Object.assign({},t,{labels:Object.assign({},t.labels,{font:rx(i,Xm,t.labels&&t.labels.font)})})})),o;case Nm.valueAxisLabelsColor:return o.valueAxis=(o.valueAxis||[]).map((function(t){return Object.assign({},t,{labels:Object.assign({},t.labels,{color:i})})})),o;case Nm.valueAxisLabelsRotation:var l=nx(i)?i:"auto";return o.valueAxis=(o.valueAxis||[]).map((function(t){return Object.assign({},t,{labels:Object.assign({},t.labels,{rotation:l})})})),o;default:return o}}var gx=Object.freeze({windowTitle:"Chart Preview",exportButton:"Export",exportPDFButton:"PDF File",exportSVGButton:"SVG File",exportPNGButton:"PNG File",tabChart:"Chart",tabData:"Data",tabFormat:"Format",barChart:"Bar Chart",barChartBar:"Bar",barChartStackedBar:"Stacked Bar",barChart100StackedBar:"100% Stacked Bar",pieChart:"Pie Chart",pieChartPie:"Pie",columnChart:"Column Chart",columnChartColumn:"Column",columnChartStackedColumn:"Stacked Column",columnChart100StackedColumn:"100% Stacked Column",lineChart:"Line Chart",lineChartLine:"Line",lineChartStackedLine:"Stacked Line",lineChart100StackedLine:"100% Stacked Line",scatterChart:"Scatter Chart",scatterChartScatter:"Scatter",configuration:"Configuration",configurationCategoryAxis:"Category Axis",configurationXAxis:"X Axis",configurationValueAxis:"Value Axis",configurationSeries:"Series",configurationSeriesAdd:"Add",formatChartArea:"Chart Area",formatChartAreaMargins:"Margins",formatChartAreaMarginsAuto:"Auto",formatChartAreaMarginsLeft:"Left",formatChartAreaMarginsRight:"Right",formatChartAreaMarginsTop:"Top",formatChartAreaMarginsBottom:"Bottom",formatChartAreaBackground:"Background",formatChartAreaBackgroundColor:"Color",formatTitle:"Title",formatTitleApplyTo:"Apply to",formatTitleChartTitle:"Chart Title",formatTitleChartSubtitle:"Chart Subtitle",formatTitleLabel:"Title",formatTitleFont:"Font",formatTitleFontPlaceholder:"(inherited font)",formatTitleSize:"Size",formatTitleSizePlaceholder:"px",formatTitleColor:"Color",formatSeries:"Series",formatSeriesApplyTo:"Apply to",formatSeriesAllSeries:"All Series",formatSeriesColor:"Color",formatSeriesShowLabels:"Show Labels",formatLegend:"Legend",formatLegendShowLegend:"Show Legend",formatLegendFont:"Font",formatLegendFontPlaceholder:"(inherited font)",formatLegendSize:"Size",formatLegendSizePlaceholder:"px",formatLegendColor:"Color",formatLegendPosition:"Position",formatLegendPositionTop:"Top",formatLegendPositionBottom:"Bottom",formatLegendPositionLeft:"Left",formatLegendPositionRight:"Right",formatCategoryAxis:"Category Axis",formatXAxis:"X Axis",formatCategoryAxisTitle:"Title",formatCategoryAxisTitlePlaceholder:"Axis Title",formatCategoryAxisTitleFont:"Font",formatCategoryAxisTitleFontPlaceholder:"(inherited font)",formatCategoryAxisTitleSize:"Size",formatCategoryAxisTitleSizePlaceholder:"px",formatCategoryAxisTitleColor:"Color",formatCategoryAxisLabels:"Labels",formatCategoryAxisLabelsFont:"Font",formatCategoryAxisLabelsFontPlaceholder:"(inherited font)",formatCategoryAxisLabelsSize:"Size",formatCategoryAxisLabelsSizePlaceholder:"px",formatCategoryAxisLabelsColor:"Color",formatCategoryAxisLabelsRotation:"Rotation",formatCategoryAxisLabelsRotationAuto:"Auto",formatCategoryAxisLabelsReverseOrder:"Reverse Order",formatValueAxis:"Value Axis",formatYAxis:"Y Axis",formatValueAxisTitle:"Title",formatValueAxisTitlePlaceholder:"Axis Title",formatValueAxisTitleFont:"Font",formatValueAxisTitleFontPlaceholder:"(inherited font)",formatValueAxisTitleSize:"Size",formatValueAxisTitleSizePlaceholder:"px",formatValueAxisTitleColor:"Color",formatValueAxisLabels:"Labels",formatValueAxisLabelsFormat:"Label Format",formatValueAxisLabelsFormatText:"Text",formatValueAxisLabelsFormatNumber:"Number",formatValueAxisLabelsFormatCurrency:"Currency",formatValueAxisLabelsFormatPercent:"Percent",formatValueAxisLabelsFont:"Font",formatValueAxisLabelsFontPlaceholder:"(inherited font)",formatValueAxisLabelsSize:"Size",formatValueAxisLabelsSizePlaceholder:"px",formatValueAxisLabelsColor:"Color",formatValueAxisLabelsRotation:"Rotation",formatValueAxisLabelsRotationAuto:"Auto"}),yx=Object.freeze({getWizardDataFromDataRows:function(t){var e=[];return t.forEach((function(t){var i=t.dataItem,o=t.dataColumns,r=[];o.forEach((function(t){r.push({field:t.title||t.field,value:_t(t.field)(i)})})),e.push(r)})),e},ActionTypes:Nm,createInitialState:function(t,e,i){var o=ux(t,i&&i.seriesType||e);return void 0!==(i&&i.stack)?fx(o,Nm.stacked,i.stack):o},createState:ux,fontNames:Wm,fontSizes:[{text:"10",value:"10px"},{text:"12",value:"12px"},{text:"14",value:"14px"},{text:"16",value:"16px"},{text:"20",value:"20px"},{text:"28",value:"28px"},{text:"42",value:"42px"},{text:"56",value:"56px"}],isCategorical:Km,mergeStates:dx,parseFont:ix,updateState:fx,messages:gx}),vx=1.5,mx=.4,xx="#000",bx="Arial, Helvetica, sans-serif",_x="11px "+bx,wx="12px "+bx,kx="16px "+bx,Ax="transparent",Sx="#fff",Cx={type:In},Px={type:_n},Tx=Object.assign({},Px,{markers:{visible:!1},highlight:{visible:!1}}),Mx=function(){return{icon:{border:{width:1}},label:{font:wx,padding:3},line:{length:10,width:2},legendItem:Tx,visible:!0}},Ox=function(){return{highlight:{markers:{border:{}}},line:{opacity:1,width:0},markers:{size:6,visible:!1},legendItem:Px,opacity:.4}},Lx=function(){return{highlight:{markers:{border:{}}},line:{opacity:1,width:0},markers:{size:6,visible:!1},legendItem:Px,opacity:.4}},Bx=function(){return{outliersField:"",meanField:"",border:{_brightness:.8,width:1},downColor:Sx,gap:1,highlight:{border:{opacity:1,width:2},whiskers:{width:3},mean:{width:2},median:{width:2}},mean:{width:2},median:{width:2},spacing:.3,whiskers:{width:2},legendItem:Tx}},Ix=function(){return{gap:vx,spacing:mx,target:{color:"#ff0000"},legendItem:Tx}},Ex=function(){return{width:2,legendItem:Cx}},Rx=function(){return{line:{opacity:1,width:0},markers:{size:6,visible:!1},legendItem:Px,opacity:.5}},Vx=function(){return{markers:{visible:!1},legendItem:Cx,width:2}},zx=function(){return{gap:.5,line:{color:xx,width:1},legendItem:Tx,spacing:mx}},jx=function(){return{labels:{background:"",color:"",padding:{top:5,bottom:5,left:7,right:7}},legendItem:Tx}},Dx=jx,Fx=function(t){return Object.assign({color:S,trendline:{},markers:{visible:!1},width:1,dashType:"longDash",legendItem:Cx},t)},Hx=function(t){return{visible:!0,labels:{font:_x},overlay:t.gradients?{}:{gradient:"none"},area:Ox(),rangeArea:Lx(),verticalRangeArea:Lx(),bar:{gap:vx,spacing:mx,legendItem:Tx},boxPlot:Bx(),bubble:{border:{width:0},labels:{background:Ax},legendItem:Tx,opacity:.6},bullet:Ix(),candlestick:{border:{_brightness:.8,width:1},downColor:Sx,gap:1,highlight:{border:{opacity:1,width:2},line:{width:2}},line:{color:xx,width:1},legendItem:Tx,spacing:.3},column:{gap:vx,spacing:mx,legendItem:Tx},heatmap:{labels:{color:"",background:Ax,visible:!0},highlight:{border:{width:0}},legendItem:Tx},pie:{labels:{background:"",color:"",padding:{top:5,bottom:5,left:7,right:7}},legendItem:Tx},donut:{margin:1,legendItem:Tx},funnel:jx(),pyramid:Dx(),horizontalWaterfall:zx(),line:Ex(),notes:Mx(),ohlc:{gap:1,highlight:{line:{opacity:1,width:3}},line:{width:1},legendItem:Tx,spacing:.3},radarArea:Rx(),radarLine:Vx(),radarColumn:{legendItem:Tx},polarArea:Rx(),polarLine:Vx(),polarScatter:{legendItem:Cx},rangeBar:{gap:vx,spacing:mx,legendItem:Tx},rangeColumn:{gap:vx,spacing:mx,legendItem:Tx},scatter:{legendItem:Cx},scatterLine:{width:1,legendItem:Cx},verticalArea:Ox(),verticalBoxPlot:Bx(),verticalBullet:Ix(),verticalLine:Ex(),waterfall:zx(),linearTrendline:Fx(),exponentialTrendline:Fx({style:"smooth"}),logarithmicTrendline:Fx({style:"smooth"}),polynomialTrendline:Fx({style:"smooth"}),powerTrendline:Fx({style:"smooth"}),movingAverageTrendline:Fx()}},Nx=function(t){return void 0===t&&(t={}),{axisDefaults:{labels:{font:wx},notes:Mx(),title:{font:kx,margin:5}},categoryAxis:{majorGridLines:{visible:!0}},navigator:{pane:{height:90,margin:{top:10}}},seriesDefaults:Hx(t),title:{font:kx},subtitle:{font:wx},legend:{labels:{font:wx}}}};return r})()));
|
|
1
|
+
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("@progress/kendo-drawing")):"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.KendoCharts=e(require("@progress/kendo-drawing")):t.KendoCharts=e(t.KendoDrawing)}(self,(t=>(()=>{"use strict";var e={721:e=>{e.exports=t}},i={};function o(t){var r=i[t];if(void 0!==r)return r.exports;var n=i[t]={exports:{}};return e[t](n,n.exports,o),n.exports}o.d=(t,e)=>{for(var i in e)o.o(e,i)&&!o.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},o.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),o.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};o.r(r),o.d(r,{Aggregates:()=>Jr,ArcGauge:()=>mf,ArcScale:()=>uf,AreaChart:()=>Va,AreaSegment:()=>Oa,ArrowLinearPointer:()=>Vd,Axis:()=>So,AxisGroupRangeTracker:()=>ja,AxisLabel:()=>oo,Bar:()=>Ua,BarChart:()=>Ka,BarLabel:()=>Fa,BarLinearPointer:()=>Nd,Barcode:()=>pg,Box:()=>wi,BoxElement:()=>Ri,BoxPlot:()=>op,BoxPlotChart:()=>ap,BubbleChart:()=>gp,Bullet:()=>xp,BulletChart:()=>_p,Candlestick:()=>Ja,CandlestickChart:()=>ep,CategoricalChart:()=>aa,CategoricalErrorBar:()=>js,CategoricalPlotArea:()=>Ll,CategoryAxis:()=>nr,Chart:()=>Bu,ChartAxis:()=>Xr,ChartContainer:()=>Mp,ChartElement:()=>Li,ChartPane:()=>Zr,ChartPlotArea:()=>Qr,ChartService:()=>mo,ChartWizardCommon:()=>yx,CircularGauge:()=>bf,ClipAnimation:()=>Sa,ClusterLayout:()=>Ya,Crosshair:()=>Pp,CrosshairTooltip:()=>Sp,CurveProcessor:()=>Gr,DateCategoryAxis:()=>fr,DateValueAxis:()=>kr,DefaultAggregates:()=>Xp,DomEventsBuilder:()=>_o,DonutChart:()=>Gh,DonutPlotArea:()=>Xh,DonutSegment:()=>Nh,ErrorBarBase:()=>Vs,ErrorRangeCalculator:()=>an,Extent:()=>iv,FloatElement:()=>Wi,FontLoader:()=>Jt,FormatService:()=>go,Gauge:()=>xd,Gradients:()=>Fi,HashMap:()=>St,Highlight:()=>El,InstanceObserver:()=>Ot,IntlService:()=>ho,Legend:()=>rh,LegendItem:()=>eh,LegendLayout:()=>Gl,LineChart:()=>Ta,LinePoint:()=>ua,LineSegment:()=>fa,LinearGauge:()=>Wd,LinearPointer:()=>Od,LinearScale:()=>Cd,Location:()=>xy,LogarithmicAxis:()=>Tr,Map:()=>cm,Matrix:()=>Ce,MousewheelZoom:()=>Nl,Navigator:()=>Qu,NavigatorHint:()=>Gu,Note:()=>no,NumericAxis:()=>_r,OHLCChart:()=>dl,OHLCPoint:()=>cl,Observable:()=>Xe,Pane:()=>Bp,Pannable:()=>jl,PieAnimation:()=>xh,PieChart:()=>jh,PieChartMixin:()=>Rh,PiePlotArea:()=>Fh,PieSegment:()=>Ih,PlotAreaBase:()=>Dp,PlotAreaEventsMixin:()=>Hp,PlotAreaFactory:()=>sh,Point:()=>xi,PointEventsMixin:()=>la,PolarAxis:()=>Er,QRCode:()=>py,RadarCategoryAxis:()=>Br,RadarLogarithmicAxis:()=>Hr,RadarNumericAxis:()=>Dr,RadialGauge:()=>hf,RadialPointer:()=>af,RadialScale:()=>Jd,RangeAreaChart:()=>ll,RangeAreaPoint:()=>el,RangeBar:()=>qp,RangeBarChart:()=>Qp,RangePointer:()=>yf,Ring:()=>Si,RootElement:()=>Ui,Sankey:()=>Dm,ScatterChart:()=>cp,ScatterErrorBar:()=>lp,ScatterLineChart:()=>_h,Sector:()=>Pi,Selection:()=>hh,SeriesAggregator:()=>Gp,SeriesBinder:()=>on,ShapeBuilder:()=>Mi,ShapeElement:()=>ji,SharedTooltip:()=>fh,Sparkline:()=>Fu,SplineAreaSegment:()=>Ea,SplineSegment:()=>_a,StackWrap:()=>Za,StockChart:()=>$u,TemplateService:()=>yt,Text:()=>qi,TextBox:()=>$i,Title:()=>eo,Tooltip:()=>uh,UserEvents:()=>yi,WaterfallChart:()=>vl,WaterfallSegment:()=>gl,XYPlotArea:()=>Mh,ZoomSelection:()=>Fl,addClass:()=>W,alignPathToPixel:()=>Z,anyHasZIndex:()=>Ds,append:()=>Vt,appendIfNotNull:()=>Fs,applyEventMap:()=>Me,areNumbers:()=>Hs,autoMajorUnit:()=>vi,autoTextColor:()=>fe,barcodeValidator:()=>hg,bindEvents:()=>zt,bindSegments:()=>Us,categoriesCount:()=>Gs,chartBaseTheme:()=>Nx,chartTheme:()=>gu,clockwise:()=>Q,constants:()=>n,convertableToNumber:()=>J,countNumbers:()=>Kr,createHashSet:()=>_e,createOutOfRangePoints:()=>ra,createPatternFill:()=>Ii,createSankeyData:()=>Hm,cycleDown:()=>et,cycleIndex:()=>it,cycleUp:()=>tt,deepExtend:()=>at,defaultErrorHandler:()=>we,defined:()=>jt,deg:()=>Dt,elementOffset:()=>Ft,elementScale:()=>de,elementSize:()=>Ht,elementStyles:()=>ut,equalsIgnoreCase:()=>Ws,evalOptions:()=>Ys,eventCoordinates:()=>Nt,eventElement:()=>Ut,eventMap:()=>Pe,filterSeriesByType:()=>qs,find:()=>le,findAxisByName:()=>Yr,gaugeTheme:()=>du,getAriaTemplate:()=>mt,getField:()=>tn,getSpacing:()=>dt,getSupportedFeatures:()=>ze,getTemplate:()=>vt,getter:()=>_t,grep:()=>wt,hasClasses:()=>kt,hasGradientOverlay:()=>Ks,hasOwnProperty:()=>Ae,hasValue:()=>$s,hashKey:()=>Gt,inArray:()=>Ct,interpolateValue:()=>Pt,isArray:()=>G,isDateAxis:()=>Js,isFunction:()=>ot,isNumber:()=>K,isObject:()=>pt,isPlainObject:()=>Lt,isString:()=>$,keys:()=>ke,last:()=>Wt,limitValue:()=>Xt,logToConsole:()=>q.logToConsole,map:()=>Bt,mousewheelDelta:()=>Et,noop:()=>De,now:()=>Fe,objectKey:()=>Yt,off:()=>Ve,on:()=>Re,parseDateCategory:()=>Qs,qrcodeValidator:()=>ly,rad:()=>qt,rectToBox:()=>Zi,removeClass:()=>Y,renderIcon:()=>ae,round:()=>Zt,sankeyTheme:()=>fu,segmentVisible:()=>Ns,setDefaultOptions:()=>te,singleItemOrArray:()=>ta,sparseArrayLimits:()=>pe,styleValue:()=>lt,unbindEvents:()=>Qt,unclipBox:()=>na,valueOrDefault:()=>Kt});var n={};o.r(n),o.d(n,{DEFAULT_PANE:()=>Yu,NAVIGATOR_AXIS:()=>Xu,NAVIGATOR_PANE:()=>Wu});var s="arc",a="ArrowUp",p="ArrowDown",l="ArrowLeft",h="ArrowRight",c="aria-activedescendant",u="#000",d="bottom",f="center",g="circle",y=3,v="cross",m="date",x="12px sans-serif",b=10,_="end",w=/\{\d+:?/,k="height",A="inside",S="inherit",C="left",P=Number.MAX_VALUE,T=-Number.MAX_VALUE,M="none",O="object",L="outside",B="right",I="roundedRect",E="start",R="string",V="top",z="value",j="#fff",D="width",F="x",H="y",N="pointer",U="horizontal";function G(t){return Array.isArray(t)}function W(t,e){for(var i=G(e)?e:[e],o=0;o<i.length;o++){var r=i[o];-1===t.className.indexOf(r)&&(t.className+=" "+r)}}var X=/\s+/g;function Y(t,e){t&&t.className&&(t.className=t.className.replace(e,"").replace(X," "))}var q=o(721);function Z(t){var e=.5;t.options.stroke&&q.drawing.util.defined(t.options.stroke.width)&&t.options.stroke.width%2==0&&(e=0);for(var i=0;i<t.segments.length;i++)t.segments[i].anchor().round(0).translate(e,e);return t}function Q(t,e){return-t.x*e.y+t.y*e.x<0}function K(t){return"number"==typeof t&&!isNaN(t)}function $(t){return typeof t===R}function J(t){return K(t)||$(t)&&isFinite(t)}function tt(t,e){return(t+1)%e}function et(t,e){var i=t-1;return i<0?e-1:i}function it(t,e){return 1===e||t%e==0?0:t<0?e+t%e:t>=e?t%e:t}function ot(t){return"function"==typeof t}var rt="object",nt="undefined";function st(t,e){for(var i in e)if("__proto__"!==i&&"constructor"!==i){var o,r=e[i],n=typeof r;if((o=n===rt&&null!==r?r.constructor:null)&&o!==Array)if(r instanceof Date)t[i]=new Date(r.getTime());else if(ot(r.clone))t[i]=r.clone();else{var s=t[i];t[i]=typeof s===rt&&s||{},st(t[i],r)}else n!==nt&&(t[i]=r)}return t}function at(t){for(var e=arguments,i=arguments.length,o=1;o<i;o++)st(t,e[o]);return t}function pt(t){return"object"==typeof t}function lt(t){return K(t)?t+"px":t}var ht=/width|height|top|left|bottom|right/i;function ct(t){return ht.test(t)}function ut(t,e){var i=$(e)?[e]:e;if(G(i)){for(var o={},r=window.getComputedStyle(t),n=0;n<i.length;n++){var s=i[n];o[s]=ct(s)?parseFloat(r[s]):r[s]}return o}if(pt(e))for(var a in e)t.style[a]=lt(e[a])}function dt(t,e){void 0===e&&(e=0);var i={top:0,right:0,bottom:0,left:0};return"number"==typeof t?i[V]=i[B]=i[d]=i[C]=t:(i[V]=t[V]||e,i[B]=t[B]||e,i[d]=t[d]||e,i[C]=t[C]||e),i}var ft={compile:function(t){return t}},gt=function(){};gt.register=function(t){ft=t},gt.compile=function(t,e){return ft.compile(t,e)};const yt=gt;function vt(t){var e;return void 0===t&&(t={}),t.template?t.template=e=yt.compile(t.template):ot(t.content)&&(e=t.content),e}function mt(t){var e;return void 0===t&&(t={}),t.ariaTemplate?t.ariaTemplate=e=yt.compile(t.ariaTemplate):ot(t.ariaContent)&&(e=t.ariaContent),e}var xt=/\[(?:(\d+)|['"](.*?)['"])\]|((?:(?!\[.*?\]|\.).)+)/g,bt={};function _t(t){if(bt[t])return bt[t];var e=[];return t.replace(xt,(function(t,i,o,r){e.push(void 0!==i?i:o||r)})),bt[t]=function(t){for(var i=t,o=0;o<e.length&&i;o++)i=i[e[o]];return i},bt[t]}bt[void 0]=function(t){return t};const wt=function(t,e){return t.filter(e)};function kt(t,e){if(t.className)for(var i=e.split(" "),o=0;o<i.length;o++)if(t.className.indexOf&&-1!==t.className.indexOf(i[o]))return!0}var At=function(){this._map=new Map};At.prototype.get=function(t){return this._map.get(t)},At.prototype.set=function(t,e){this._map.set(t,e)};const St=At;function Ct(t,e){if(e)return e.includes(t)}function Pt(t,e,i){return q.drawing.util.round(t+(e-t)*i,y)}var Tt="trigger",Mt=function(t,e){this.observer=t,this.handlerMap=at({},this.handlerMap,e)};Mt.prototype.trigger=function(t,e){var i,o=this.observer,r=this.handlerMap;return r[t]?i=this.callObserver(r[t],e):o[Tt]&&(i=this.callObserver(Tt,t,e)),i},Mt.prototype.callObserver=function(t){for(var e=[],i=arguments.length-1;i-- >0;)e[i]=arguments[i+1];return this.observer[t].apply(this.observer,e)},Mt.prototype.requiresHandlers=function(t){if(this.observer.requiresHandlers)return this.observer.requiresHandlers(t);for(var e=0;e<t.length;e++)if(this.handlerMap[t[e]])return!0};const Ot=Mt;function Lt(t){return"[object Object]"===Object.prototype.toString.call(t)}function Bt(t,e){for(var i=t.length,o=[],r=0;r<i;r++){var n=e(t[r]);q.drawing.util.defined(n)&&o.push(n)}return o}var It=q.support.browser||{};function Et(t){var e=0;return t.wheelDelta?(e=-t.wheelDelta/120,It.webkit&&(e/=2*Math.max(window.devicePixelRatio,.625))):t.detail&&(e=t.detail/3),e>0?Math.ceil(e):Math.floor(e)}var Rt=q.drawing.util,Vt=Rt.append,zt=Rt.bindEvents,jt=Rt.defined,Dt=Rt.deg,Ft=Rt.elementOffset,Ht=Rt.elementSize,Nt=Rt.eventCoordinates,Ut=Rt.eventElement,Gt=Rt.hashKey,Wt=Rt.last,Xt=Rt.limitValue,Yt=Rt.objectKey,qt=Rt.rad,Zt=Rt.round,Qt=Rt.unbindEvents,Kt=Rt.valueOrDefault,$t=function(){};$t.fetchFonts=function(t,e,i){void 0===i&&(i={depth:0}),!t||i.depth>5||!document.fonts||Object.keys(t).forEach((function(o){var r=t[o];"dataSource"!==o&&"$"!==o[0]&&r&&("font"===o?e.push(r):"object"==typeof r&&(i.depth++,$t.fetchFonts(r,e,i),i.depth--))}))},$t.loadFonts=function(t,e){var i=[];if(t.length>0&&document.fonts){try{i=t.map((function(t){return document.fonts.load(t)}))}catch(t){(0,q.logToConsole)(t)}Promise.all(i).then(e,e)}else e()},$t.preloadFonts=function(t,e){var i=[];$t.fetchFonts(t,i),$t.loadFonts(i,e)};const Jt=$t;function te(t,e){var i=t.prototype;i.options?i.options=at({},i.options,e):i.options=e}var ee="k-i-",ie="k-svg-i-",oe=function(t,e){this.element=t,this.options=at({},this.options,e),this.wrapper()};oe.prototype.wrapper=function(){this.addClasses()},oe.prototype.addClasses=function(){},oe.prototype.html=function(){return this.element.outerHTML},te(oe,{name:"",size:"none",themeColor:"none",flip:"default",iconClass:"",stylingOptions:["size","themeColor","fill"]});var re=function(t){function e(e,i){t.call(this,e,i)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.wrapper=function(){var e=this.element.className.split(" ").find((function(t){return t.startsWith(ee)})),i=this.options.icon?""+(this.options.icon.startsWith(ee)?"":ee)+this.options.icon:"";this._className=i,W(this.element,"k-icon"),W(this.element,"k-font-icon"),Y(this.element,e),W(this.element,i),W(this.element,this.options.iconClass||""),t.prototype.wrapper.call(this)},e}(oe);te(re,{name:"HTMLFontIcon",icon:null});var ne=function(t){function e(e,i){e.innerHTML="",t.call(this,e,i)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.wrapper=function(){var e=this.options.icon,i=this.options.iconClass,o=this.element.className.split(" ").find((function(t){return t.startsWith(ie)}));if(!e&&i){var r=i.match(/k-i-(\w+(?:-\w+)*)/);r&&(e=r[1],i=i.replace(r[0],""))}$(e)&&(e=e.replace("k-i-","").replace(/-./g,(function(t){return t[1].toUpperCase()})),e=this.options.svgIcons[e]||this.options.svgIcons[e+"Icon"]);var n=e&&e.name?""+ie+e.name:"";if(this._className=n,W(this.element,"k-svg-icon"),Y(this.element,o),W(this.element,n),W(this.element,i||""),this.element.setAttribute("aria-hidden","true"),e&&Lt(e)){var s=document.createElementNS("http://www.w3.org/2000/svg","svg");s.setAttribute("viewBox",e.viewBox||""),s.setAttribute("focusable","false"),s.innerHTML=e.content||"",this.element.appendChild(s)}t.prototype.wrapper.call(this)},e}(oe);te(ne,{name:"HTMLSvgIcon",icon:null,svgIcons:{}});var se={svg:ne,font:re};function ae(t,e){var i=t,o=e;return i&&(!pt(i)||i instanceof HTMLElement)&&!$(i)||(o=i,i=document.createElement("span")),$(o)&&(o={icon:o}),o.type||(o.type="svg"),se[o.type]?new se[o.type](i,o).html():null}function pe(t){for(var e=P,i=T,o=0,r=t.length;o<r;o++){var n=t[o];null!==n&&isFinite(n)&&(e=Math.min(e,n),i=Math.max(i,n))}return{min:e===P?void 0:e,max:i===T?void 0:i}}function le(t,e){for(var i=0;i<t.length;i++){var o=t[i];if(e(o,i,t))return o}}var he=q.geometry.Matrix,ce=/matrix\((.*)\)/;function ue(t){var e=getComputedStyle(t).transform;return"none"===e?he.unit():function(t){var e=t.match(ce);if(null===e||2!==e.length)return he.unit();var i=e[1].split(",").map((function(t){return parseFloat(t)}));return new(Function.prototype.bind.apply(he,[null].concat(i)))}(e)}function de(t){if(!t)return he.unit();for(var e=ue(t),i=t.parentElement;i;){var o=ue(i);e=e.multiplyCopy(o),i=i.parentElement}return e.b=e.c=e.e=e.f=0,e}const fe=function(t){return new q.Color(t).isDark()?j:u};var ge={},ye=function(t){this._index={},this._values=t?t.slice(0):[];for(var e=0;e<this._values.length;e++)this._index[this._values[e]]=e},ve={size:{configurable:!0}};ye.prototype.values=function(){return this._values.filter((function(t){return t!==ge}))},ye.prototype.has=function(t){return void 0!==this._index[t]},ye.prototype.add=function(t){this.has(t)||(this._index[t]=this._values.length,this._values.push(t))},ye.prototype.delete=function(t){var e=this._index[t];void 0!==e&&(this._values[e]=ge,delete this._index[t])},ye.prototype.clear=function(){this._index={},this._values=[]},ve.size.get=function(){return this._values.length},Object.defineProperties(ye.prototype,ve);var me=function(t){this._set=new Set(t)},xe={size:{configurable:!0}};me.prototype.values=function(){return Array.from(this._set)},me.prototype.has=function(t){return this._set.has(t)},me.prototype.add=function(t){this._set.add(t)},me.prototype.delete=function(t){this._set.delete(t)},me.prototype.clear=function(){this._set.clear()},xe.size.get=function(){return this._set.size},Object.defineProperties(me.prototype,xe);var be=function(){var t=!1;return"function"==typeof Set&&(t=new Set([1]).has(1)),t};function _e(t){return be()?new me(t):new ye(t)}function we(t){throw t}const ke={INSERT:45,DELETE:46,BACKSPACE:8,TAB:9,ENTER:13,ESC:27,LEFT:37,UP:38,RIGHT:39,DOWN:40,END:35,HOME:36,SPACEBAR:32,PAGEUP:33,PAGEDOWN:34,F2:113,F10:121,F12:123,NUMPAD_PLUS:107,NUMPAD_MINUS:109,NUMPAD_DOT:110};function Ae(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var Se=function(){this.height=0,this.width=0,this.data=[]};Se.prototype.clone=function(){var t=new Se;return t.height=this.height,t.width=this.width,t.data=this.data.map((function(t){return t.slice()})),t},Se.prototype.get=function(t,e){var i=this.data[t];return i?i[e]:null},Se.prototype.set=function(t,e,i){var o=this.data[t];null==o&&(o=this.data[t]=[]),o[e]=i,t>=this.height&&(this.height=t+1),e>=this.width&&(this.width=e+1)},Se.prototype.each=function(t,e){for(var i=0;i<this.height;++i)for(var o=0;o<this.width;++o){var r=this.get(i,o);if((e||null!=r)&&void 0!==(r=t(r,i,o)))return r}},Se.prototype.map=function(t,e){var i=new Se;return this.each((function(e,o,r){i.set(o,r,t(e,o,r))}),e),i},Se.prototype.transpose=function(){var t=new Se;return this.each((function(e,i,o){t.set(o,i,e)})),t},Se.prototype.unit=function(t){this.width=this.height=t;for(var e=this.data=new Array(t),i=t;--i>=0;)for(var o=e[i]=new Array(t),r=t;--r>=0;)o[r]=i===r?1:0;return this},Se.prototype.multiply=function(t){for(var e=this,i=new Se,o=0;o<e.height;++o)for(var r=0;r<t.width;++r){for(var n=0,s=0;s<e.width;++s){var a=e.get(o,s),p=t.get(s,r);"number"==typeof a&&"number"==typeof p&&(n+=a*p)}i.set(o,r,n)}return i},Se.prototype.inverse=function(){for(var t=this.width,e=this.augment((new Se).unit(t)),i=e.data,o=function(e){var o=function(t,e,i){for(var o=i(t),r=t,n=t+1;n<e;n++){var s=i(t);s>o&&(o=s,r=t)}return r}(e,t,(function(t){return i[t][e]}));if(!i[o][e])return{v:null};if(e!==o){var r=i[e];i[e]=i[o],i[o]=r}for(var n=e+1;n<t;++n){for(var s=e+1;s<2*t;++s)i[n][s]-=i[e][s]*i[n][e]/i[e][e];i[n][e]=0}},r=0;r<t;++r){var n=o(r);if(n)return n.v}for(var s=0;s<t;++s)for(var a=i[s][s],p=0;p<2*t;++p)i[s][p]/=a;for(var l=t;--l>=0;)for(var h=l;--h>=0;)if(i[h][l])for(var c=2*t;--c>=t;)i[h][c]-=i[l][c]*i[h][l];return e.slice(0,t,t,t)},Se.prototype.augment=function(t){var e=this.clone(),i=e.width;return t.each((function(t,o,r){e.set(o,r+i,t)})),e},Se.prototype.slice=function(t,e,i,o){for(var r=new Se,n=0;n<i;++n)for(var s=0;s<o;++s)r.set(n,s,this.get(t+n,e+s));return r};const Ce=Se;var Pe={down:"pointerdown",move:"pointermove",up:"pointerup",cancel:"pointercancel pointerleave"};function Te(t){return Pe[t]||t}var Me=function(t){return t.replace(/([^ ]+)/g,Te)},Oe=1;function Le(){return"kchart"+Oe++}function Be(){return Le()}var Ie=new WeakMap,Ee=Symbol("id");function Re(t,e,i,o,r){!function(t,e,i,o,r){(G(e)?e:(e||"").split(" ")).forEach((function(e){!function(t,e,i,o,r){var n,s=o;i&&ot(i)&&!o?s=i:i&&function(t){return"string"==typeof t}(i)&&ot(s)&&(n=i);var a=function(e){var i=e.target?e.target.closest(n):null;if(!n||n&&e.target&&i){var o=n?i:e.currentTarget;Object.defineProperty(e,"currentTarget",{value:o}),Object.defineProperty(e,"delegateTarget",{value:t}),s(e)}};s[Ee]||(s[Ee]=Be());var p=Ie.get(t);p||(p=new Map,Ie.set(t,p)),p.set(e+s[Ee],a),t.addEventListener(e,a,Boolean(r))}(t,e,i,o,r)}))}(t,e,i,o,r)}function Ve(t,e,i,o,r){!function(t,e,i,o){(G(e)?e:(e||"").split(" ")).forEach((function(e){!function(t,e,i,o){var r=Ie.get(t);if(r&&i&&i[Ee]){var n=e+i[Ee],s=r.get(n);r.delete(n),s&&t.removeEventListener(e,s,Boolean(o))}}(t,e,i,o)}))}(t,e,i,o)}function ze(){var t=function(t){var e=!1,i={wp:/(Windows Phone(?: OS)?)\s(\d+)\.(\d+(\.\d+)?)/,fire:/(Silk)\/(\d+)\.(\d+(\.\d+)?)/,android:/(Android|Android.*(?:Opera|Firefox).*?\/)\s*(\d+)\.?(\d+(\.\d+)?)?/,iphone:/(iPhone|iPod).*OS\s+(\d+)[._]([\d._]+)/,ipad:/(iPad).*OS\s+(\d+)[._]([\d_]+)/,playbook:/(PlayBook).*?Tablet\s*OS\s*(\d+)\.(\d+(\.\d+)?)/,windows:/(MSIE)\s+(\d+)\.(\d+(\.\d+)?)/,tizen:/(tizen).*?Version\/(\d+)\.(\d+(\.\d+)?)/i,sailfish:/(sailfish).*rv:(\d+)\.(\d+(\.\d+)?).*firefox/i},o={ios:/^i(phone|pad|pod)$/i,android:/^android|fire$/i,windows:/windows/,wp:/wp/,flat:/sailfish|ffos|tizen/i};for(var r in i)if(t.match(i[r])){if("windows"===r&&"plugins"in navigator)return!1;(e={}).device=r,e.name=je(r,o),e[e.name]=!0;break}return e}(navigator.userAgent),e={};return e.mobileOS=t,e}function je(t,e,i){for(var o in e)if(e[o].test(t))return o;return void 0!==i?i:t}function De(){}function Fe(){return(new Date).getTime()}var He="string",Ne="function",Ue=function(){this._defaultPrevented=!0},Ge=function(){return!0===this._defaultPrevented},We=function(){this._events={}};We.prototype.destroy=function(){this.unbind()},We.prototype.bind=function(t,e,i){var o,r,n,s,a=this,p=typeof t===He?[t]:t||[],l=typeof e===Ne;if(void 0===e){for(o in t)a.bind(o,t[o]);return a}var h=function(){var t=p[o];(s=l?e:e[t])&&(i&&(n=s,s=function(){a.unbind(t,s),n.apply(a,arguments)},s.original=n),(a._events[t]=a._events[t]||[]).push(s))};for(o=0,r=p.length;o<r;o++)h();return a},We.prototype.one=function(t,e){return this.bind(t,e,!0)},We.prototype.first=function(t,e){var i,o,r,n=this,s=typeof t===He?[t]:t,a=typeof e===Ne;for(i=0,o=s.length;i<o;i++){var p=s[i];(r=a?e:e[p])&&(n._events[p]=n._events[p]||[]).unshift(r)}return n},We.prototype.trigger=function(t,e){var i,o,r=this,n=r._events[t];if(n){var s=e||{};for(s.sender=r,s._defaultPrevented=!1,s.preventDefault=Ue,s.isDefaultPrevented=Ge,i=0,o=(n=n.slice()).length;i<o;i++)n[i].call(r,s);return!0===s._defaultPrevented}return!1},We.prototype.unbind=function(t,e){var i,o=this,r=o._events[t];if(void 0===t)o._events={};else if(r)if(e)for(i=r.length-1;i>=0;i--)r[i]!==e&&r[i].original!==e||r.splice(i,1);else o._events[t]=[];return o},We.prototype._setEvents=function(t){for(var e=(this.events||[]).length,i=0;i<e;i++){var o=this.events[i];this.options[o]&&t[o]&&(this.unbind(o,this.options[o]),this._events&&this._events[o]&&delete this._events[o])}this.bind(this.events,t)};const Xe=We;var Ye=Object.assign,qe=function(t){t.preventDefault()},Ze=800,Qe=0,Ke="press",$e="hold",Je="select",ti="start",ei="move",ii="end",oi="cancel",ri="tap",ni="doubleTap",si="release",ai="gesturechange",pi="gestureend",li="gesturetap",hi={api:0,touch:0,mouse:9,pointer:9};function ci(t){var e=[],i=t.originalEvent||t,o=t.currentTarget;return t.api?e.push({id:2,event:t,target:t.target,currentTarget:t.target,location:t,type:"api"}):e.push({location:i,event:t,target:t.target,currentTarget:o,id:i.pointerId,type:"pointer"}),e}var ui=function(t,e){var i=this;i.support=ze(),i.invalidZeroEvents=this.support.mobileOS&&this.support.mobileOS.android,i.axis=t,i._updateLocationData(e),i.startLocation=i.location,i.velocity=i.delta=0,i.timeStamp=Fe()};ui.prototype.move=function(t){var e=this,i=t["page"+e.axis],o=Fe(),r=o-e.timeStamp||1;!i&&this.invalidZeroEvents||(e.delta=i-e.location,e._updateLocationData(t),e.initialDelta=i-e.startLocation,e.velocity=e.delta/r,e.timeStamp=o)},ui.prototype._updateLocationData=function(t){var e=this,i=e.axis;e.location=t["page"+i],e.client=t["client"+i],e.screen=t["screen"+i]};var di=function(t,e,i){Ye(this,{x:new ui("X",i.location),y:new ui("Y",i.location),type:i.type,threshold:t.threshold||hi[i.type],userEvents:t,target:e,currentTarget:i.currentTarget,initialTouch:i.target,id:i.id,pressEvent:i,_clicks:t._clicks,supportDoubleTap:t.supportDoubleTap,_moved:!1,_finished:!1})};function fi(t){for(var e=Pe.up.split(" "),i=0,o=e.length;i<o;i++)t(e[i])}di.prototype.press=function(){var t=this;this._holdTimeout=setTimeout((function(){return t._hold()}),this.userEvents.minHold),this._trigger(Ke,this.pressEvent)},di.prototype._tap=function(t){var e=this;e.userEvents._clicks++,1===e.userEvents._clicks&&(e._clickTimeout=setTimeout((function(){1===e.userEvents._clicks?e._trigger(ri,t):e._trigger(ni,t),e.userEvents._clicks=0}),300))},di.prototype._hold=function(){this._trigger($e,this.pressEvent)},di.prototype.move=function(t){var e=this,i="api"!==t.type&&e.userEvents._shouldNotMove;if(!e._finished&&!i){if(e.x.move(t.location),e.y.move(t.location),!e._moved){if(e._withinIgnoreThreshold())return;if(gi.current&&gi.current!==e.userEvents)return e.dispose();e._start(t)}e._finished||e._trigger(ei,t)}},di.prototype.end=function(t){this.endTime=Fe(),this._finished||(this._finished=!0,this._trigger(si,t),this._moved?this._trigger(ii,t):this.supportDoubleTap?this._tap(t):this._trigger(ri,t),clearTimeout(this._holdTimeout),this.dispose())},di.prototype.dispose=function(){var t=this.userEvents.touches||[];this._finished=!0,this.pressEvent=null,clearTimeout(this._holdTimeout);var e=t.indexOf(this);t.splice(e,1)},di.prototype.skip=function(){this.dispose()},di.prototype.cancel=function(){this.dispose()},di.prototype.isMoved=function(){return this._moved},di.prototype._start=function(t){clearTimeout(this._holdTimeout),this.startTime=Fe(),this._moved=!0,this._trigger(ti,t)},di.prototype._trigger=function(t,e){var i=e.event,o={touch:this,x:this.x,y:this.y,target:this.target,event:i};this.userEvents.notify(t,o)&&i.preventDefault()},di.prototype._withinIgnoreThreshold=function(){var t=this.x.initialDelta,e=this.y.initialDelta;return Math.sqrt(t*t+e*e)<=this.threshold};var gi=function(t){function e(e,i){t.call(this);var o,r=this,n=ze();if(this.support=n,i=i||{},this.options=i,o=r.filter=i.filter,r.threshold=i.threshold||Qe,r.minHold=i.minHold||Ze,r.touches=[],r._maxTouches=i.multiTouch?2:1,r.allowSelection=i.allowSelection,r.captureUpIfMoved=i.captureUpIfMoved,r._clicks=0,r.supportDoubleTap=i.supportDoubleTap,Ye(r,{element:e,surface:i.surface||e,stopPropagation:i.stopPropagation,pressed:!1}),this._surfaceMoveHandler=this._move.bind(this),Re(r.surface,Me("move"),this._surfaceMoveHandler),this._surfaceEndHandler=this._end.bind(this),Re(r.surface,Me("up cancel"),this._surfaceEndHandler),this._elementStartHandler=this._start.bind(this),Re(e,Me("down"),o,this._elementStartHandler),e.style["touch-action"]=i.touchAction||"none",i.preventDragEvent&&(this._elementDragStartHandler=qe,Re(e,Me("dragstart"),this._elementDragStartHandler)),this._elementSelectHandler=this._select.bind(this),Re(e,Me("mousedown"),o,this._elementSelectHandler),r.captureUpIfMoved){var s=r.surface;r._preventIfMovingProxy=r.preventIfMoving.bind(r),fi((function(t){s.addEventListener(t,r._preventIfMovingProxy,!0)}))}r.bind([Ke,$e,ri,ni,ti,ei,ii,si,oi,"gesturestart",ai,pi,li,Je],i)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.preventIfMoving=function(t){this._isMoved()&&t.preventDefault()},e.prototype.destroy=function(){var t=this,e=this.options,i=this.element;if(!t._destroyed){if(t._destroyed=!0,t.captureUpIfMoved){var o=t.surface;fi((function(e){o.removeEventListener(e,t._preventIfMovingProxy,!0)}))}Ve(t.surface,Me("move"),this._surfaceMoveHandler),Ve(t.surface,Me("up cancel"),this._surfaceEndHandler),Ve(i,Me("down"),this._elementStartHandler),e.preventDragEvent&&Ve(i,Me("dragstart"),this._elementDragStartHandler),Ve(i,Me("mousedown"),this._elementSelectHandler),t._disposeAll(),t.unbind(),delete t.surface,delete t.element,delete t.currentTarget}},e.prototype.capture=function(){e.current=this},e.prototype.cancel=function(){this._disposeAll(),this.trigger(oi)},e.prototype.notify=function(t,e){var i,o,r,n,s,a,p,l,h=this.touches,c=t;if(this._isMultiTouch()){switch(c){case ei:c=ai;break;case ii:c=pi;break;case ri:c=li}Ye(e,{touches:h},(i=h[0],o=h[1],r=i.x.location,n=i.y.location,p=r-(s=o.x.location),l=n-(a=o.y.location),{center:{x:(r+s)/2,y:(n+a)/2},distance:Math.sqrt(p*p+l*l)}))}return this.trigger(c,Ye(e,{type:c}))},e.prototype.press=function(t,e,i){this._apiCall("_start",t,e,i)},e.prototype.move=function(t,e){this._apiCall("_move",t,e)},e.prototype.end=function(t,e){this._apiCall("_end",t,e)},e.prototype._isMultiTouch=function(){return this.touches.length>1},e.prototype._maxTouchesReached=function(){return this.touches.length>=this._maxTouches},e.prototype._disposeAll=function(){for(var t=this.touches;t.length>0;)t.pop().dispose()},e.prototype._isMoved=function(){return wt(this.touches,(function(t){return t.isMoved()})).length},e.prototype._select=function(t){this.allowSelection&&!this.trigger(Je,{event:t})||t.preventDefault()},e.prototype._start=function(t){if(!(t.which&&t.which>1||this._maxTouchesReached())){var i;e.current=null,this.currentTarget=t.currentTarget,this.stopPropagation&&t.stopPropagation();for(var o=ci(t),r=0;r<o.length&&!this._maxTouchesReached();r++){var n=o[r];if(!(i=this.filter?n.currentTarget:this.element)||0!==i.length){var s=new di(this,i,n);this.touches.push(s),s.press(),this._isMultiTouch()&&this.notify("gesturestart",{})}}}},e.prototype._move=function(t){this._eachTouch("move",t)},e.prototype._end=function(t){this._eachTouch("end",t)},e.prototype._eachTouch=function(t,e){var i,o,r,n,s={},a=ci(e),p=this.touches;for(i=0;i<p.length;i++)s[(o=p[i]).id]=o;for(i=0;i<a.length;i++)(n=s[(r=a[i]).id])&&("move"===t&&"pointer"===r.type&&!this.surface.hasPointerCapture(r.id)&&this.surface.setPointerCapture(r.id),n[t](r))},e.prototype._apiCall=function(t,e,i,o){this[t]({api:!0,pageX:e,pageY:i,clientX:e,clientY:i,target:o||this.element,stopPropagation:De,preventDefault:De})},e.defaultThreshold=function(t){Qe=t},e.minHold=function(t){Ze=t},e}(Xe);const yi=gi;function vi(t,e){var i=Zt(e-t,b-1);if(0===i){if(0===e)return.1;i=Math.abs(e)}var o=Math.pow(10,Math.floor(Math.log(i)/Math.log(10))),r=Zt(i/o,b);return Zt(o*(r<1.904762?.2:r<4.761904?.5:r<9.523809?1:2),b)}var mi=function(t,e){this.x=t||0,this.y=e||0};mi.prototype.clone=function(){return new mi(this.x,this.y)},mi.prototype.equals=function(t){return t&&this.x===t.x&&this.y===t.y},mi.prototype.rotate=function(t,e){var i=qt(e),o=Math.cos(i),r=Math.sin(i),n=t.x,s=t.y,a=this.x,p=this.y;return this.x=Zt(n+(a-n)*o+(p-s)*r,y),this.y=Zt(s+(p-s)*o-(a-n)*r,y),this},mi.prototype.multiply=function(t){return this.x*=t,this.y*=t,this},mi.prototype.distanceTo=function(t){var e=this.x-t.x,i=this.y-t.y;return Math.sqrt(e*e+i*i)},mi.onCircle=function(t,e,i){var o=qt(e);return new mi(t.x-i*Math.cos(o),t.y-i*Math.sin(o))};const xi=mi;var bi=function(t,e,i,o){this.x1=t||0,this.y1=e||0,this.x2=i||0,this.y2=o||0};function _i(t,e,i,o,r){var n=qt(r);return new xi(i+(t-i)*Math.cos(n)+(e-o)*Math.sin(n),o-(t-i)*Math.sin(n)+(e-o)*Math.cos(n))}bi.prototype.equals=function(t){return this.x1===t.x1&&this.x2===t.x2&&this.y1===t.y1&&this.y2===t.y2},bi.prototype.width=function(){return this.x2-this.x1},bi.prototype.height=function(){return this.y2-this.y1},bi.prototype.translate=function(t,e){return this.x1+=t,this.x2+=t,this.y1+=e,this.y2+=e,this},bi.prototype.move=function(t,e){var i=this.height(),o=this.width();return void 0!==t&&(this.x1=t,this.x2=this.x1+o),void 0!==e&&(this.y1=e,this.y2=this.y1+i),this},bi.prototype.wrap=function(t){return this.x1=Math.min(this.x1,t.x1),this.y1=Math.min(this.y1,t.y1),this.x2=Math.max(this.x2,t.x2),this.y2=Math.max(this.y2,t.y2),this},bi.prototype.wrapLimit=function(t,e,i){return this.x1=Math.min(this.x1,Math.max(this.x1-e,t.x1)),this.y1=Math.min(this.y1,Math.max(this.y1-i,t.y1)),this.x2=Math.max(this.x2,Math.min(this.x2+e,t.x2)),this.y2=Math.max(this.y2,Math.min(this.y2+i,t.y2)),this},bi.prototype.wrapPoint=function(t){var e=G(t),i=e?t[0]:t.x,o=e?t[1]:t.y;return this.wrap(new bi(i,o,i,o)),this},bi.prototype.snapTo=function(t,e){return e!==F&&e||(this.x1=t.x1,this.x2=t.x2),e!==H&&e||(this.y1=t.y1,this.y2=t.y2),this},bi.prototype.alignTo=function(t,e){var i=this.height(),o=this.width(),r=e===V||e===d?H:F,n=r===H?i:o;if(e===f){var s=t.center(),a=this.center();this.x1+=s.x-a.x,this.y1+=s.y-a.y}else this[r+1]=e===V||e===C?t[r+1]-n:t[r+2];return this.x2=this.x1+o,this.y2=this.y1+i,this},bi.prototype.shrink=function(t,e){return this.x2-=t,this.y2-=e,this},bi.prototype.expand=function(t,e){return this.shrink(-t,-e),this},bi.prototype.pad=function(t){var e=dt(t);return this.x1-=e.left,this.x2+=e.right,this.y1-=e.top,this.y2+=e.bottom,this},bi.prototype.unpad=function(t){var e=dt(t);return e.left=-e.left,e.top=-e.top,e.right=-e.right,e.bottom=-e.bottom,this.pad(e)},bi.prototype.clone=function(){return new bi(this.x1,this.y1,this.x2,this.y2)},bi.prototype.center=function(){return new xi(this.x1+this.width()/2,this.y1+this.height()/2)},bi.prototype.containsPoint=function(t){return t.x>=this.x1&&t.x<=this.x2&&t.y>=this.y1&&t.y<=this.y2},bi.prototype.points=function(){return[new xi(this.x1,this.y1),new xi(this.x2,this.y1),new xi(this.x2,this.y2),new xi(this.x1,this.y2)]},bi.prototype.getHash=function(){return[this.x1,this.y1,this.x2,this.y2].join(",")},bi.prototype.overlaps=function(t){return!(t.y2<this.y1||this.y2<t.y1||t.x2<this.x1||this.x2<t.x1)},bi.prototype.rotate=function(t){var e=this.width(),i=this.height(),o=this.center(),r=o.x,n=o.y,s=_i(0,0,r,n,t),a=_i(e,0,r,n,t),p=_i(e,i,r,n,t),l=_i(0,i,r,n,t);return e=Math.max(s.x,a.x,p.x,l.x)-Math.min(s.x,a.x,p.x,l.x),i=Math.max(s.y,a.y,p.y,l.y)-Math.min(s.y,a.y,p.y,l.y),this.x2=this.x1+e,this.y2=this.y1+i,this},bi.prototype.toRect=function(){return new q.geometry.Rect([this.x1,this.y1],[this.width(),this.height()])},bi.prototype.hasSize=function(){return 0!==this.width()&&0!==this.height()},bi.prototype.align=function(t,e,i){return e===F?this.alignX(t,i):this.alignY(t,i),this},bi.prototype.alignX=function(t,e){var i=this.width();e===C?(this.x1=t.x1,this.x2=this.x1+i):e===B?(this.x2=t.x2,this.x1=this.x2-i):e===f&&(this.x1=t.x1+(t.width()-i)/2,this.x2=this.x1+i)},bi.prototype.alignY=function(t,e){var i=this.height();e===V?(this.y1=t.y1,this.y2=this.y1+i):e===d?(this.y2=t.y2,this.y1=this.y2-i):e===f&&(this.y1=t.y1+(t.height()-i)/2,this.y2=this.y1+i)};const wi=bi;var ki=function(t,e,i,o,r){this.center=t,this.innerRadius=e,this.radius=i,this.startAngle=o,this.angle=r};function Ai(t,e){return t-e}ki.prototype.clone=function(){return new ki(this.center,this.innerRadius,this.radius,this.startAngle,this.angle)},ki.prototype.middle=function(){return this.startAngle+this.angle/2},ki.prototype.setRadius=function(t,e){return e?this.innerRadius=t:this.radius=t,this},ki.prototype.point=function(t,e){var i=qt(t),o=Math.cos(i),r=Math.sin(i),n=e?this.innerRadius:this.radius,s=Zt(this.center.x-o*n,y),a=Zt(this.center.y-r*n,y);return new xi(s,a)},ki.prototype.adjacentBox=function(t,e,i){var o=this.clone().expand(t),r=o.middle(),n=o.point(r),s=e/2,a=i/2,p=Math.sin(qt(r)),l=Math.cos(qt(r)),h=n.x-s,c=n.y-a;return Math.abs(p)<.9&&(h+=s*-l/Math.abs(l)),Math.abs(l)<.9&&(c+=a*-p/Math.abs(p)),new wi(h,c,h+e,c+i)},ki.prototype.containsPoint=function(t){var e=this.center,i=this.innerRadius,o=this.radius,r=this.startAngle,n=this.startAngle+this.angle,s=t.x-e.x,a=t.y-e.y,p=new xi(s,a),l=this.point(r),h=new xi(l.x-e.x,l.y-e.y),c=this.point(n),u=new xi(c.x-e.x,c.y-e.y),d=Zt(s*s+a*a,y);return(h.equals(p)||Q(h,p))&&!Q(u,p)&&d>=i*i&&d<=o*o},ki.prototype.getBBox=function(){var t,e=new wi(P,P,T,T),i=Zt(this.startAngle%360),o=Zt((i+this.angle)%360),r=this.innerRadius,n=[0,90,180,270,i,o].sort(Ai),s=n.indexOf(i),a=n.indexOf(o);t=i===o?n:s<a?n.slice(s,a+1):[].concat(n.slice(0,a+1),n.slice(s,n.length));for(var p=0;p<t.length;p++){var l=this.point(t[p]);e.wrapPoint(l),e.wrapPoint(l,r)}return r||e.wrapPoint(this.center),e},ki.prototype.expand=function(t){return this.radius+=t,this};const Si=ki;var Ci=function(t){function e(e,i,o,r){t.call(this,e,0,i,o,r)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.expand=function(e){return t.prototype.expand.call(this,e)},e.prototype.clone=function(){return new e(this.center,this.radius,this.startAngle,this.angle)},e.prototype.setRadius=function(t){return this.radius=t,this},e}(Si);const Pi=Ci;var Ti=function(){};Ti.prototype.createRing=function(t,e){var i=t.startAngle+180,o=t.angle+i;(0===t.angle||t.angle>0&&i===o)&&(o+=.001);var r=new q.geometry.Point(t.center.x,t.center.y),n=Math.max(t.radius,0),s=Math.max(t.innerRadius,0),a=new q.geometry.Arc(r,{startAngle:i,endAngle:o,radiusX:n,radiusY:n}),p=q.drawing.Path.fromArc(a,e).close();if(s){a.radiusX=a.radiusY=s;var l=a.pointAt(o);p.lineTo(l.x,l.y),p.arc(o,i,s,s,!0)}else p.lineTo(r.x,r.y);return p},Ti.current=new Ti;const Mi=Ti;var Oi=function(t){this.children=[],this.initOptions(t)};Oi.prototype.initOptions=function(t){this.options=at({},this.options,this.initUserOptions(t))},Oi.prototype.initUserOptions=function(t){return t},Oi.prototype.reflow=function(t){for(var e,i=this.children,o=0;o<i.length;o++){var r=i[o];r.reflow(t),e=e?e.wrap(r.box):r.box.clone()}this.box=e||t},Oi.prototype.destroy=function(){var t=this.children;this.animation&&this.animation.destroy();for(var e=0;e<t.length;e++)t[e].destroy()},Oi.prototype.getRoot=function(){var t=this.parent;return t?t.getRoot():null},Oi.prototype.getSender=function(){var t=this.getService();if(t)return t.sender},Oi.prototype.getService=function(){for(var t=this;t;){if(t.chartService)return t.chartService;t=t.parent}},Oi.prototype.translateChildren=function(t,e){for(var i=this.children,o=i.length,r=0;r<o;r++)i[r].box.translate(t,e)},Oi.prototype.append=function(){for(var t=arguments,e=0;e<arguments.length;e++){var i=t[e];this.children.push(i),i.parent=this}},Oi.prototype.renderVisual=function(){!1!==this.options.visible&&(this.createVisual(),this.addVisual(),this.renderChildren(),this.createAnimation(),this.renderComplete())},Oi.prototype.addVisual=function(){this.visual&&(this.visual.chartElement=this,this.parent&&this.parent.appendVisual(this.visual))},Oi.prototype.renderChildren=function(){for(var t=this.children,e=t.length,i=0;i<e;i++)t[i].renderVisual()},Oi.prototype.createVisual=function(){this.visual=new q.drawing.Group({zIndex:this.options.zIndex,visible:Kt(this.options.visible,!0)})},Oi.prototype.createAnimation=function(){this.visual&&this.options.animation&&(this.animation=q.drawing.Animation.create(this.visual,this.options.animation))},Oi.prototype.appendVisual=function(t){t.chartElement||(t.chartElement=this),t.options.noclip?this.clipRoot().visual.append(t):void 0!==t.options.zIndex?this.stackRoot().stackVisual(t):this.isStackRoot?this.stackVisual(t):this.visual?this.visual.append(t):this.parent.appendVisual(t)},Oi.prototype.clipRoot=function(){return this.parent?this.parent.clipRoot():this},Oi.prototype.stackRoot=function(){return this.parent?this.parent.stackRoot():this},Oi.prototype.stackVisual=function(t){var e,i=t.options.zIndex||0,o=this.visual.children,r=o.length;for(e=0;e<r;e++){var n=o[e];if(Kt(n.options.zIndex,0)>i)break}this.visual.insert(e,t)},Oi.prototype.traverse=function(t){for(var e=this.children,i=e.length,o=0;o<i;o++){var r=e[o];t(r),r.traverse&&r.traverse(t)}},Oi.prototype.closest=function(t){for(var e=this,i=!1;e&&!i;)(i=t(e))||(e=e.parent);if(i)return e},Oi.prototype.renderComplete=function(){},Oi.prototype.hasHighlight=function(){var t=(this.options||{}).highlight;return!(!this.createHighlight||t&&!1===t.visible||!1===this.visible)},Oi.prototype.toggleHighlight=function(t,e){var i=this,o=(this.options||{}).highlight||{},r=o.visual,n=this._highlight;if(!n){var s={fill:{color:j,opacity:e||.2},stroke:{color:j,width:1,opacity:e||.2}};if(r){if(!(n=this._highlight=r(Object.assign(this.highlightVisualArgs(),{createVisual:function(){return i.createHighlight(s)},sender:this.getSender(),series:this.series,dataItem:this.dataItem,category:this.category,value:this.value,percentage:this.percentage,runningTotal:this.runningTotal,total:this.total}))))return}else n=this._highlight=this.createHighlight(s);void 0===n.options.zIndex&&(n.options.zIndex=Kt(o.zIndex,this.options.zIndex)),this.appendVisual(n)}n.visible(t)},Oi.prototype.toggleFocusHighlight=function(t){var e=(this.options||{}).focusHighlight||{},i=this._focusHighlight;if(t||i){if(!i){var o=this.getRoot().options.background,r=fe(o),n={fill:{opacity:e.opacity,color:e.color},stroke:Object.assign({},{color:r},e.border),zIndex:e.zIndex};i=this._focusHighlight=this.createFocusHighlight(n),this.appendVisual(i)}i.visible(t)}},Oi.prototype.createGradientOverlay=function(t,e,i){var o=new q.drawing.Path(Object.assign({stroke:{color:"none"},fill:this.createGradient(i),closed:t.options.closed},e));return o.segments.elements(t.segments.elements()),o},Oi.prototype.createGradient=function(t){if(this.parent)return this.parent.createGradient(t)},Oi.prototype.supportsPointInactiveOpacity=function(){return!0},Oi.prototype.options={};const Li=Oi;var Bi={dots:q.drawing.dotsPattern,verticalStripes:q.drawing.verticalStripesPattern,crosshatch:q.drawing.crosshatchPattern,diagonalStripes:q.drawing.diagonalStripesPattern,grid:q.drawing.gridPattern};function Ii(t,e,i){var o=function(t,e){return ot(t)?t(e):t}(t,i),r=o&&Bi[o.type];return r?r(Object.assign({},e,o)):e}var Ei=function(t){function e(e){t.call(this,e),this.options.margin=dt(this.options.margin),this.options.padding=dt(this.options.padding)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reflow=function(e){var i,o=this,r=this.options,n=r.width,s=r.height,a=r.shrinkToFit,p=n&&s,l=r.margin,h=r.padding,c=r.border.width,u=function(){o.align(e,F,r.align),o.align(e,H,r.vAlign),o.paddingBox=i.clone().unpad(l).unpad(c)},d=e.clone();p&&(d.x2=d.x1+n,d.y2=d.y1+s),a&&d.unpad(l).unpad(c).unpad(h),t.prototype.reflow.call(this,d),i=p?this.box=new wi(0,0,n,s):this.box,a&&p?(u(),d=this.contentBox=this.paddingBox.clone().unpad(h)):(d=this.contentBox=i.clone(),i.pad(h).pad(c).pad(l),u()),this.translateChildren(i.x1-d.x1+l.left+c+h.left,i.y1-d.y1+l.top+c+h.top);for(var f=this.children,g=0;g<f.length;g++){var y=f[g];y.reflow(y.box)}},e.prototype.align=function(t,e,i){this.box.align(t,e,i)},e.prototype.hasBox=function(){var t=this.options;return t.border.width||t.background},e.prototype.createVisual=function(){t.prototype.createVisual.call(this),this.options.visible&&this.hasBox()&&this.visual.append(q.drawing.Path.fromRect(this.paddingBox.toRect(),this.visualStyle()))},e.prototype.visualStyle=function(){var t=this.options,e=t.border||{};return{stroke:{width:e.width,color:e.color,opacity:Kt(e.opacity,t.opacity),dashType:e.dashType},fill:Ii(t.pattern,{color:t.background,opacity:t.opacity},void 0),cursor:t.cursor}},e}(Li);te(Ei,{align:C,vAlign:V,margin:{},padding:{},border:{color:u,width:0},background:"",shrinkToFit:!1,width:0,height:0,visible:!0});const Ri=Ei;function Vi(t,e){e&&(t.options.className=e.className,t.options.role=e.role,t.options.ariaLabel=e.ariaLabel,t.options.ariaRoleDescription=e.ariaRoleDescription,t.options.ariaChecked=e.ariaChecked)}var zi=function(t){function e(e,i){t.call(this,e),this.pointData=i}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getElement=function(){var t=this.options,e=this.paddingBox,i=t.type,o=t.rotation,r=e.center(),n=e.width()/2,s=e.height()/2;if(!t.visible||!this.hasBox())return null;var a,p=this.visualStyle();if(i===g)a=new q.drawing.Circle(new q.geometry.Circle([Zt(e.x1+n,y),Zt(e.y1+s,y)],Math.min(n,s)),p);else if("triangle"===i)a=q.drawing.Path.fromPoints([[e.x1+n,e.y1],[e.x1,e.y2],[e.x2,e.y2]],p).close();else if(i===v)(a=new q.drawing.MultiPath(p)).moveTo(e.x1,e.y1).lineTo(e.x2,e.y2),a.moveTo(e.x1,e.y2).lineTo(e.x2,e.y1);else{var l=e.toRect();if(i===I){var h=Kt(t.borderRadius,l.width()/5);l.setCornerRadius(h)}a=q.drawing.Path.fromRect(l,p)}return o&&a.transform(q.geometry.transform().rotate(-o,[r.x,r.y])),a.options.zIndex=t.zIndex,a},e.prototype.createElement=function(){var t=this,e=this.options.visual,i=this.pointData||{};return e?e({value:i.value,dataItem:i.dataItem,sender:this.getSender(),series:i.series,category:i.category,rect:this.paddingBox.toRect(),options:this.visualOptions(),createVisual:function(){return t.getElement()}}):this.getElement()},e.prototype.visualOptions=function(){var t=this.options;return{background:t.background,border:t.border,margin:t.margin,padding:t.padding,type:t.type,size:t.width,visible:t.visible}},e.prototype.createVisual=function(){this.visual=this.createElement(),Vi(this.visual,this.options.accessibilityOptions)},e}(Ri);te(zi,{type:g,align:f,vAlign:f});const ji=zi;var Di="radial";const Fi={glass:{type:"linear",rotation:0,stops:[{offset:0,color:j,opacity:0},{offset:.25,color:j,opacity:.3},{offset:1,color:j,opacity:0}]},sharpBevel:{type:Di,stops:[{offset:0,color:j,opacity:.55},{offset:.65,color:j,opacity:0},{offset:.95,color:j,opacity:.25}]},roundedBevel:{type:Di,stops:[{offset:.33,color:j,opacity:.06},{offset:.83,color:j,opacity:.2},{offset:.95,color:j,opacity:0}]},roundedGlass:{type:Di,supportVML:!1,stops:[{offset:0,color:j,opacity:0},{offset:.5,color:j,opacity:.3},{offset:.99,color:j,opacity:0}]},sharpGlass:{type:Di,supportVML:!1,stops:[{offset:0,color:j,opacity:.2},{offset:.15,color:j,opacity:.15},{offset:.17,color:j,opacity:.35},{offset:.85,color:j,opacity:.05},{offset:.87,color:j,opacity:.15},{offset:.99,color:j,opacity:0}]},bubbleShadow:{type:Di,center:[.5,.5],radius:.5}};function Hi(t,e){if(t.x1===e.x1&&t.y1===e.y1&&t.x2===e.x2&&t.y2===e.y2)return e;var i=Math.min(t.x1,e.x1),o=Math.max(t.x1,e.x1),r=Math.min(t.x2,e.x2),n=Math.max(t.x2,e.x2),s=Math.min(t.y1,e.y1),a=Math.max(t.y1,e.y1),p=Math.min(t.y2,e.y2),l=Math.max(t.y2,e.y2),h=[];return h[0]=new wi(o,s,r,a),h[1]=new wi(i,a,o,p),h[2]=new wi(r,a,n,p),h[3]=new wi(o,p,r,l),t.x1===i&&t.y1===s||e.x1===i&&e.y1===s?(h[4]=new wi(i,s,o,a),h[5]=new wi(r,p,n,l)):(h[4]=new wi(r,s,n,a),h[5]=new wi(i,p,o,l)),wt(h,(function(t){return t.height()>0&&t.width()>0}))[0]}var Ni=function(t){function e(e){t.call(this,e);var i=this.options;i.width=parseInt(i.width,10),i.height=parseInt(i.height,10),this.gradients={}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reflow=function(){var t=this.options,e=this.children,i=new wi(0,0,t.width,t.height);this.box=i.unpad(t.margin);for(var o=0;o<e.length;o++)e[o].reflow(i),i=Hi(i,e[o].box)||new wi},e.prototype.createVisual=function(){this.visual=new q.drawing.Group,this.createBackground()},e.prototype.createBackground=function(){var t=this.options,e=t.border||{},i=this.box.clone().pad(t.margin).unpad(e.width),o=q.drawing.Path.fromRect(i.toRect(),{stroke:{color:e.width?e.color:"",width:e.width,dashType:e.dashType},fill:{color:t.background,opacity:t.opacity},zIndex:-10});this.visual.append(o)},e.prototype.getRoot=function(){return this},e.prototype.createGradient=function(t){var e,i=this.gradients,o=Yt(t),r=Fi[t.gradient];if(i[o])e=i[o];else{var n=Object.assign({},r,t);"linear"===r.type?e=new q.drawing.LinearGradient(n):(t.innerRadius&&(n.stops=function(t){for(var e=t.stops,i=t.innerRadius/t.radius*100,o=e.length,r=[],n=0;n<o;n++){var s=Object.assign({},e[n]);s.offset=(s.offset*(100-i)+i)/100,r.push(s)}return r}(n)),(e=new q.drawing.RadialGradient(n)).supportVML=!1!==r.supportVML),i[o]=e}return e},e.prototype.cleanGradients=function(){var t=this.gradients;for(var e in t)t[e]._observers=[]},e.prototype.size=function(){var t=this.options;return new wi(0,0,t.width,t.height)},e}(Li);te(Ni,{width:600,height:400,background:j,border:{color:u,width:0},margin:dt(5),zIndex:-2});const Ui=Ni;var Gi=function(t){function e(e){t.call(this,e),this._initDirection()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._initDirection=function(){var t=this.options;t.vertical?(this.groupAxis=F,this.elementAxis=H,this.groupSizeField=D,this.elementSizeField=k,this.groupSpacing=t.spacing,this.elementSpacing=t.vSpacing):(this.groupAxis=H,this.elementAxis=F,this.groupSizeField=k,this.elementSizeField=D,this.groupSpacing=t.vSpacing,this.elementSpacing=t.spacing)},e.prototype.reflow=function(t){this.box=t.clone(),this.reflowChildren()},e.prototype.reflowChildren=function(){var t=this,e=t.box,i=t.elementAxis,o=t.groupAxis,r=t.elementSizeField,n=t.groupSizeField,s=this.groupOptions(),a=s.groups,p=s.groupsSize,l=s.maxGroupElementsSize,h=a.length,c=e[o+1]+this.alignStart(p,e[n]());if(h){for(var u=c,d=0;d<h;d++){for(var f=a[d],g=f.groupElements,y=e[i+1],v=g.length,m=0;m<v;m++){var x=g[m],b=this.elementSize(x),_=u+this.alignStart(b[n],f.groupSize),w=new wi;w[o+1]=_,w[o+2]=_+b[n],w[i+1]=y,w[i+2]=y+b[r],x.reflow(w),y+=b[r]+this.elementSpacing}u+=f.groupSize+this.groupSpacing}e[o+1]=c,e[o+2]=c+p,e[i+2]=e[i+1]+l}},e.prototype.alignStart=function(t,e){var i=0,o=this.options.align;return o===B||o===d?i=e-t:o===f&&(i=(e-t)/2),i},e.prototype.groupOptions=function(){for(var t=this,e=t.box,i=t.children,o=t.elementSizeField,r=t.groupSizeField,n=t.elementSpacing,s=t.groupSpacing,a=Zt(e[o]()),p=i.length,l=[],h=0,c=0,u=0,d=0,f=[],g=0;g<p;g++){var y=i[g];y.box||y.reflow(e);var v=this.elementSize(y);this.options.wrap&&Zt(c+n+v[o])>a&&(l.push({groupElements:f,groupSize:h,groupElementsSize:c}),d=Math.max(d,c),u+=s+h,h=0,c=0,f=[]),h=Math.max(h,v[r]),c>0&&(c+=n),c+=v[o],f.push(y)}return l.push({groupElements:f,groupSize:h,groupElementsSize:c}),{groups:l,groupsSize:u+=h,maxGroupElementsSize:d=Math.max(d,c)}},e.prototype.elementSize=function(t){return{width:t.box.width(),height:t.box.height()}},e.prototype.createVisual=function(){},e}(Li);te(Gi,{vertical:!0,wrap:!0,vSpacing:0,spacing:0});const Wi=Gi;var Xi=q.drawing.Text,Yi=function(t){function e(e,i){t.call(this,i),this.content=e,this.reflow(new wi)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reflow=function(t){var e=this.options,i=e.size=q.drawing.util.measureText(this.content,{font:e.font});this.baseline=i.baseline,this.box=new wi(t.x1,t.y1,t.x1+i.width,t.y1+i.height)},e.prototype.createVisual=function(){var t=this.options,e=t.font,i=t.color,o=t.opacity,r=t.cursor,n=t.stroke,s=t.paintOrder;this.visual=new Xi(this.content,this.box.toRect().topLeft(),{font:e,fill:{color:i,opacity:o},cursor:r,stroke:n,paintOrder:s})},e}(Li);te(Yi,{font:x,color:u});const qi=Yi;function Zi(t){var e=t.origin,i=t.bottomRight();return new wi(e.x,e.y,i.x,i.y)}var Qi=/\n/m,Ki=function(t){function e(e,i,o){t.call(this,i),this.content=e,this.data=o,this._initContainer(),!1!==this.options._autoReflow&&this.reflow(new wi)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._initContainer=function(){var t=this.options,e=String(this.content).split(Qi),i=new Wi({vertical:!0,align:t.align,wrap:!1}),o=at({},t,{opacity:1,animation:null});this.container=i,this.append(i);for(var r=0;r<e.length;r++){var n=new qi(e[r].trim(),o);i.append(n)}},e.prototype.reflow=function(e){var i=this.options,o=i.visual;if(this.container.options.align=i.align,o&&!this._boxReflow){var r=e;r.hasSize()||(this._boxReflow=!0,this.reflow(r),this._boxReflow=!1,r=this.box);var n=this.visual=o(this.visualContext(r));n&&(r=Zi(n.clippedBBox()||new q.geometry.Rect),n.options.zIndex=i.zIndex),this.box=this.contentBox=this.paddingBox=r}else if(t.prototype.reflow.call(this,e),i.rotation){var s=dt(i.margin),a=this.box.unpad(s);this.targetBox=e,this.normalBox=a.clone(),(a=this.rotate()).translate(s.left-s.right,s.top-s.bottom),this.rotatedBox=a.clone(),a.pad(s)}},e.prototype.createVisual=function(){var t=this.options;if(this.visual=new q.drawing.Group({transform:this.rotationTransform(),zIndex:t.zIndex,noclip:t.noclip}),this.hasBox()){var e=q.drawing.Path.fromRect(this.paddingBox.toRect(),this.visualStyle());this.visual.append(e)}},e.prototype.renderVisual=function(){if(this.options.visible)if(this.options.visual){var e=this.visual;e&&!jt(e.options.noclip)&&(e.options.noclip=this.options.noclip),this.addVisual(),this.createAnimation()}else t.prototype.renderVisual.call(this)},e.prototype.visualContext=function(t){var e=this,i={text:this.content,rect:t.toRect(),sender:this.getSender(),options:this.options,createVisual:function(){return e._boxReflow=!0,e.reflow(t),e._boxReflow=!1,e.getDefaultVisual()}};return this.data&&Object.assign(i,this.data),i},e.prototype.getDefaultVisual=function(){this.createVisual(),this.renderChildren();var t=this.visual;return delete this.visual,t},e.prototype.rotate=function(){var t=this.options;return this.box.rotate(t.rotation),this.align(this.targetBox,F,t.align),this.align(this.targetBox,H,t.vAlign),this.box},e.prototype.rotationTransform=function(){var t=this.options.rotation;if(!t)return null;var e=this.normalBox.center(),i=e.x,o=e.y,r=this.rotatedBox.center();return q.geometry.transform().translate(r.x-i,r.y-o).rotate(t,[i,o])},e}(Ri);const $i=Ki;var Ji=function(t){function e(e){t.call(this,e),this._textBox=new $i(this.options.text,Object.assign({},this.options,{vAlign:this.options.position})),this.append(this._textBox)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reflow=function(e){t.prototype.reflow.call(this,e),this.box.snapTo(e,F)},e.buildTitle=function(t,i){var o,r=t;return"string"==typeof t&&(r={text:t}),(r=Object.assign({visible:!0},i,r))&&r.visible&&r.text&&(o=new e(r)),o},e.orderTitles=function(t){var e=[].concat(t),i=e.filter((function(t){return t&&t.options.position!==d})),o=e.filter((function(t){return t&&t.options.position===d}));return to(i),to(o),o.reverse(),i.concat(o)},e}(Li);function to(t){for(var e=1;e<t.length;e++){var i=t[e]._textBox,o=t[e-1]._textBox;o.options.margin=Object.assign(dt(o.options.margin),{bottom:0}),i.options.margin=Object.assign(dt(i.options.margin),{top:0})}}te(Ji,{color:u,position:V,align:f,margin:dt(5),padding:dt(5)});const eo=Ji;var io=function(t){function e(e,i,o,r,n){t.call(this,i,n),this.text=i,this.value=e,this.index=o,this.dataItem=r,this.reflow(new wi)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.visualContext=function(e){var i=t.prototype.visualContext.call(this,e);return i.value=this.value,i.dataItem=this.dataItem,i.format=this.options.format,i.culture=this.options.culture,i},e.prototype.click=function(t,e){t.trigger("axisLabelClick",{element:Ut(e),value:this.value,text:this.text,index:this.index,dataItem:this.dataItem,axis:this.parent.options})},e.prototype.rotate=function(){if(this.options.alignRotation!==f){var e=this.normalBox.toRect(),i=this.rotationTransform();this.box=Zi(e.bbox(i.matrix()))}else t.prototype.rotate.call(this);return this.box},e.prototype.rotationTransform=function(){var e=this.options,i=e.rotation;if(!i)return null;if(e.alignRotation===f)return t.prototype.rotationTransform.call(this);var o=q.geometry.transform().rotate(i).matrix(),r=this.normalBox.toRect(),n=this.targetBox.toRect(),s=e.rotationOrigin||V,a=s===V||s===d?F:H,p=s===V||s===d?H:F,l=s===V||s===C?n.origin:n.bottomRight(),h=r.topLeft().transformCopy(o),c=r.topRight().transformCopy(o),u=r.bottomRight().transformCopy(o),g=r.bottomLeft().transformCopy(o),y=q.geometry.Rect.fromPoints(h,c,u,g),v={};v[p]=n.origin[p]-y.origin[p];var m,x,_=Math.abs(h[p]+v[p]-l[p]),w=Math.abs(c[p]+v[p]-l[p]);Zt(_,b)===Zt(w,b)?(m=h,x=c):w<_?(m=c,x=u):(m=h,x=g);var k=m[a]+(x[a]-m[a])/2;return v[a]=n.center()[a]-k,q.geometry.transform().translate(v.x,v.y).rotate(i)},e}($i);te(io,{_autoReflow:!1});const oo=io;var ro=function(t){function e(e,i,o){t.call(this,i),this.fields=e,this.chartService=o,this.render()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.hide=function(){this.options.visible=!1},e.prototype.show=function(){this.options.visible=!0},e.prototype.render=function(){var t=this,e=this.options;if(e.visible){var i,o,r=e.label,n=e.icon,s=new wi,a=function(){return t},p=n.size,l=this.fields.text;if(jt(r)&&r.visible){var h=vt(r);h?l=h(this.fields):r.format&&(l=this.chartService.format.auto(r.format,l)),r.color||(r.color=r.position===A?"#fff":n.background),this.label=new $i(l,at({},r)),this.label.aliasFor=a,r.position!==A||jt(p)||(n.type===g?p=Math.max(this.label.box.width(),this.label.box.height()):(i=this.label.box.width(),o=this.label.box.height()),s.wrap(this.label.box))}n.width=i||p||7,n.height=o||p||7;var c=new ji(at({},n));c.aliasFor=a,this.marker=c,this.append(c),this.label&&this.append(this.label),c.reflow(new wi),this.wrapperBox=s.wrap(c.box)}},e.prototype.reflow=function(t){var e,i,o,r=this,n=r.options,s=r.label,a=r.marker,p=r.wrapperBox,l=t.center(),h=n.line.length,c=n.position;n.visible&&(Ct(c,[C,B])?c===C?(o=p.alignTo(t,c).translate(-h,t.center().y-p.center().y),n.line.visible&&(e=[t.x1,l.y],this.linePoints=[e,[o.x2,l.y]],i=o.clone().wrapPoint(e))):(o=p.alignTo(t,c).translate(h,t.center().y-p.center().y),n.line.visible&&(e=[t.x2,l.y],this.linePoints=[e,[o.x1,l.y]],i=o.clone().wrapPoint(e))):c===d?(o=p.alignTo(t,c).translate(t.center().x-p.center().x,h),n.line.visible&&(e=[l.x,t.y2],this.linePoints=[e,[l.x,o.y1]],i=o.clone().wrapPoint(e))):(o=p.alignTo(t,c).translate(t.center().x-p.center().x,-h),n.line.visible&&(e=[l.x,t.y1],this.linePoints=[e,[l.x,o.y2]],i=o.clone().wrapPoint(e))),a&&a.reflow(o),s&&(s.reflow(o),a&&(n.label.position===L&&s.box.alignTo(a.box,c),s.reflow(s.box))),this.contentBox=o,this.targetBox=t,this.box=i||o)},e.prototype.createVisual=function(){t.prototype.createVisual.call(this),this.visual.options.noclip=this.options.noclip,this.options.visible&&this.createLine()},e.prototype.renderVisual=function(){var e=this,i=this.options,o=i.visual;i.visible&&o?(this.visual=o(Object.assign(this.fields,{sender:this.getSender(),rect:this.targetBox.toRect(),options:{background:i.background,border:i.background,icon:i.icon,label:i.label,line:i.line,position:i.position,visible:i.visible},createVisual:function(){e.createVisual(),e.renderChildren();var t=e.visual;return delete e.visual,t}})),this.addVisual()):t.prototype.renderVisual.call(this)},e.prototype.createLine=function(){var t=this.options.line;if(this.linePoints){var e=q.drawing.Path.fromPoints(this.linePoints,{stroke:{color:t.color,width:t.width,dashType:t.dashType}});Z(e),this.visual.append(e)}},e.prototype.click=function(t,e){var i=this.eventArgs(e);t.trigger("noteClick",i)||e.preventDefault()},e.prototype.over=function(t,e){var i=this.eventArgs(e);t.trigger("noteHover",i)||e.preventDefault()},e.prototype.out=function(t,e){var i=this.eventArgs(e);t.trigger("noteLeave",i)},e.prototype.eventArgs=function(t){var e=this.options;return Object.assign(this.fields,{element:Ut(t),text:jt(e.label)?e.label.text:"",visual:this.visual})},e}(Ri);te(ro,{icon:{visible:!0,type:g},label:{position:A,visible:!0,align:f,vAlign:f},line:{visible:!0},visible:!0,position:V,zIndex:2});const no=ro;var so={format:function(t,e){return e},toString:function(t){return t},parseDate:function(t){return new Date(t)},firstDay:function(){return 0}},ao=so,po=function(){},lo={implementation:{configurable:!0}};po.register=function(t){ao=t},lo.implementation.get=function(){return ao},Object.defineProperties(po,lo);const ho=po;var co=/\{(\d+)(:[^\}]+)?\}/g,uo=function(t){this._intlService=t},fo={intl:{configurable:!0}};fo.intl.get=function(){return this._intlService||ho.implementation},fo.intl.set=function(t){this._intlService=t},uo.prototype.auto=function(t){for(var e=[],i=arguments.length-1;i-- >0;)e[i]=arguments[i+1];var o=this.intl;return $(t)&&t.match(w)?o.format.apply(o,[t].concat(e)):o.toString(e[0],t)},uo.prototype.localeAuto=function(t,e,i){var o,r=this.intl;return o=$(t)&&t.match(w)?t.replace(co,(function(t,o,n){var s=e[parseInt(o,10)];return r.toString(s,n?n.substring(1):"",i)})):r.toString(e[0],t,i),o},Object.defineProperties(uo.prototype,fo);const go=uo;var yo=function(t,e){void 0===e&&(e={}),this._intlService=e.intlService,this.sender=e.sender||t,this.format=new go(e.intlService),this.chart=t,this.rtl=Boolean(e.rtl)},vo={intl:{configurable:!0}};vo.intl.get=function(){return this._intlService||ho.implementation},vo.intl.set=function(t){this._intlService=t,this.format.intl=t},yo.prototype.notify=function(t,e){this.chart&&this.chart.trigger(t,e)},yo.prototype.isPannable=function(t){var e=((this.chart||{}).options||{}).pannable;return e&&e.lock!==t},Object.defineProperties(yo.prototype,vo);const mo=yo;var xo,bo=function(){};bo.register=function(t){xo=t},bo.create=function(t,e){return xo?xo.create(t,e):new yi(t,Object.assign({},{multiTouch:!0,touchAction:"manipulation"},e))};const _o=bo;function wo(t,e){var i=t.tickX,o=t.tickY,r=t.position,n=new q.drawing.Path({stroke:{width:e.width,color:e.color}});return t.vertical?n.moveTo(i,r).lineTo(i+e.size,r):n.moveTo(r,o).lineTo(r,o+e.size),Z(n),n}function ko(t,e){var i=t.lineStart,o=t.lineEnd,r=t.position,n=new q.drawing.Path({stroke:{width:e.width,color:e.color,dashType:e.dashType}});return t.vertical?n.moveTo(i,r).lineTo(o,r):n.moveTo(r,i).lineTo(r,o),Z(n),n}var Ao=function(t){function e(e,i){void 0===i&&(i=new mo),t.call(this,e),this.chartService=i,this.options.visible||(this.options=at({},this.options,{labels:{visible:!1},line:{visible:!1},margin:0,majorTickSize:0,minorTickSize:0})),this.options.minorTicks=at({},{color:this.options.line.color,width:this.options.line.width,visible:this.options.minorTickType!==M},this.options.minorTicks,{size:this.options.minorTickSize,align:this.options.minorTickType}),this.options.majorTicks=at({},{color:this.options.line.color,width:this.options.line.width,visible:this.options.majorTickType!==M},this.options.majorTicks,{size:this.options.majorTickSize,align:this.options.majorTickType}),this.initFields(),this.options._deferLabels||this.createLabels(),this.createTitle(),this.createNotes()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initFields=function(){},e.prototype.labelsRange=function(){return{min:this.options.labels.skip,max:this.labelsCount()}},e.prototype.normalizeLabelRotation=function(t){var e=t.rotation;pt(e)&&(t.alignRotation=e.align,t.rotation=e.angle)},e.prototype.createLabels=function(){var t=this.options,e=t.vertical?B:f,i=at({},t.labels,{align:e,zIndex:t.zIndex}),o=Math.max(1,i.step);if(this.clearLabels(),i.visible){this.normalizeLabelRotation(i),"auto"===i.rotation&&(i.rotation=0,t.autoRotateLabels=!0);for(var r=this.labelsRange(),n=r.min;n<r.max;n+=o){var s={index:n,count:r.max},a=this.createAxisLabel(n,i,s);a&&(this.append(a),this.labels.push(a))}}},e.prototype.clearLabels=function(){this.children=wt(this.children,(function(t){return!(t instanceof oo)})),this.labels=[]},e.prototype.clearTitle=function(){var t=this;this.title&&(this.children=wt(this.children,(function(e){return e!==t.title})),this.title=void 0)},e.prototype.clear=function(){this.clearLabels(),this.clearTitle()},e.prototype.lineBox=function(){var t=this.options,e=this.box,i=t.vertical,o=t.labels.mirror,r=o?e.x1:e.x2,n=o?e.y2:e.y1,s=t.line.width||0;return i?new wi(r,e.y1,r,e.y2-s):new wi(e.x1,n,e.x2-s,n)},e.prototype.createTitle=function(){var t=this.options,e=at({rotation:t.vertical?-90:0,text:"",zIndex:1,visualSize:!0},t.title);if(e.visible&&e.text){var i=new $i(e.text,e);this.append(i),this.title=i}},e.prototype.createNotes=function(){var t=this.options,e=t.notes,i=e.data||[];this.notes=[];for(var o=0;o<i.length;o++){var r=at({},e,i[o]);r.value=this.parseNoteValue(r.value);var n=new no({value:r.value,text:r.label.text,dataItem:r},r,this.chartService);n.options.visible&&(jt(n.options.position)?t.vertical&&!Ct(n.options.position,[C,B])?n.options.position=t.reverse?C:B:t.vertical||Ct(n.options.position,[V,d])||(n.options.position=t.reverse?d:V):t.vertical?n.options.position=t.reverse?C:B:n.options.position=t.reverse?d:V,this.append(n),this.notes.push(n))}},e.prototype.parseNoteValue=function(t){return t},e.prototype.renderVisual=function(){t.prototype.renderVisual.call(this),this.createPlotBands()},e.prototype.createVisual=function(){t.prototype.createVisual.call(this),this.createBackground(),this.createLine()},e.prototype.gridLinesVisual=function(){var t=this._gridLines;return t||(t=this._gridLines=new q.drawing.Group({zIndex:-2}),this.appendVisual(this._gridLines)),t},e.prototype.createTicks=function(t){var e=this.options,i=this.lineBox(),o=e.labels.mirror,r=e.majorTicks.visible?e.majorUnit:0,n={vertical:e.vertical};function s(e,r,s){var a=e.length,p=Math.max(1,r.step);if(r.visible)for(var l=r.skip;l<a;l+=p)jt(s)&&l%s==0||(n.tickX=o?i.x2:i.x2-r.size,n.tickY=o?i.y1-r.size:i.y1,n.position=e[l],t.append(wo(n,r)))}s(this.getMajorTickPositions(),e.majorTicks),s(this.getMinorTickPositions(),e.minorTicks,r/e.minorUnit)},e.prototype.createLine=function(){var t=this.options,e=t.line,i=this.lineBox();if(e.width>0&&e.visible){var o=new q.drawing.Path({stroke:{width:e.width,color:e.color,dashType:e.dashType}});o.moveTo(i.x1,i.y1).lineTo(i.x2,i.y2),t._alignLines&&Z(o);var r=this._lineGroup=new q.drawing.Group;r.append(o),this.visual.append(r),this.createTicks(r)}},e.prototype.getActualTickSize=function(){var t=this.options,e=0;return t.majorTicks.visible&&t.minorTicks.visible?e=Math.max(t.majorTicks.size,t.minorTicks.size):t.majorTicks.visible?e=t.majorTicks.size:t.minorTicks.visible&&(e=t.minorTicks.size),e},e.prototype.createBackground=function(){var t=this.options,e=this.box,i=t.background;i&&(this._backgroundPath=q.drawing.Path.fromRect(e.toRect(),{fill:{color:i},stroke:null}),this.visual.append(this._backgroundPath))},e.prototype.createPlotBands=function(){var t=this,e=this.options,i=e.plotBands||[],o=e.vertical,r=this.plotArea;if(0!==i.length){for(var n=this._plotbandGroup=new q.drawing.Group({zIndex:-1}),s=wt(this.pane.axes,(function(e){return e.options.vertical!==t.options.vertical}))[0],a=0;a<i.length;a++){var p=i[a],l=void 0,h=void 0,c=p.label,u=void 0;if(o?(l=(s||r.axisX).lineBox(),h=this.getSlot(p.from,p.to,!0)):(l=this.getSlot(p.from,p.to,!0),h=(s||r.axisY).lineBox()),c&&(c.vAlign=c.position||C,u=this.createPlotBandLabel(c,p,new wi(l.x1,h.y1,l.x2,h.y2))),0!==l.width()&&0!==h.height()){var d=new q.geometry.Rect([l.x1,h.y1],[l.width(),h.height()]),f=q.drawing.Path.fromRect(d,{fill:{color:p.color,opacity:p.opacity},stroke:null});n.append(f),u&&n.append(u)}}this.appendVisual(n)}},e.prototype.createPlotBandLabel=function(t,e,i){if(!1===t.visible)return null;var o,r=t.text;if(jt(t)&&t.visible){var n=vt(t);n?r=n({text:r,item:e}):t.format&&(r=this.chartService.format.auto(t.format,r)),t.color||(t.color=this.options.labels.color)}return(o=new $i(r,t)).reflow(i),o.renderVisual(),o.visual},e.prototype.createGridLines=function(t){var e=this.options,i=e.minorGridLines,o=e.majorGridLines,r=e.minorUnit,n=e.vertical,s=t.options.line.visible,a=o.visible?e.majorUnit:0,p=t.lineBox(),l=p[n?"y1":"x1"],h={lineStart:p[n?"x1":"y1"],lineEnd:p[n?"x2":"y2"],vertical:n},c=[],u=this.gridLinesVisual();function d(t,e,i){var o=t.length,r=Math.max(1,e.step);if(e.visible)for(var n=e.skip;n<o;n+=r){var a=Zt(t[n]);Ct(a,c)||n%i==0||s&&l===a||(h.position=a,u.append(ko(h,e)),c.push(a))}}return d(this.getMajorTickPositions(),o),d(this.getMinorTickPositions(),i,a/r),u.children},e.prototype.reflow=function(t){for(var e=this,i=e.options,o=e.labels,r=e.title,n=i.vertical,s=o.length,a=n?D:k,p=r?r.box[a]():0,l=this.getActualTickSize()+i.margin+p,h=((this.getRoot()||{}).box||t)[a](),c=0,u=0;u<s;u++){var d=o[u].box[a]();d+l<=h&&(c=Math.max(c,d))}this.box=n?new wi(t.x1,t.y1,t.x1+c+l,t.y2):new wi(t.x1,t.y1,t.x2,t.y1+c+l),this.arrangeTitle(),this.arrangeLabels(),this.arrangeNotes()},e.prototype.getLabelsTickPositions=function(){return this.getMajorTickPositions()},e.prototype.labelTickIndex=function(t){return t.index},e.prototype.arrangeLabels=function(){for(var t=this.options,e=this.labels,i=this.labelsBetweenTicks(),o=t.vertical,r=t.labels.mirror,n=this.getLabelsTickPositions(),s=0;s<e.length;s++){var a=e[s],p=this.labelTickIndex(a),l=o?a.box.height():a.box.width(),h=n[p],c=n[p+1],u=void 0,d=void 0;o?d=u=i?h+(c-h)/2-l/2:h-l/2:i?(u=h,d=c):d=(u=h-l/2)+l,this.positionLabel(a,r,u,d)}},e.prototype.positionLabel=function(t,e,i,o){void 0===o&&(o=i);var r,n=this.options,s=n.vertical,a=this.lineBox(),p=this.getActualTickSize()+n.margin;if(s){var l=a.x2;e?(l+=p,t.options.rotationOrigin=C):(l-=p+t.box.width(),t.options.rotationOrigin=B),r=t.box.move(l,i)}else{var h=a.y1;e?(h-=p+t.box.height(),t.options.rotationOrigin=d):(h+=p,t.options.rotationOrigin=V),r=new wi(i,h,o,h+t.box.height())}t.reflow(r)},e.prototype.autoRotateLabelAngle=function(t,e){return t.width()<e?0:t.height()>e?-90:-45},e.prototype.autoRotateLabels=function(){if(!this.options.autoRotateLabels||this.options.vertical)return!1;for(var t=this.getMajorTickPositions(),e=this.labels,i=Math.min(e.length,t.length-1),o=0,r=0;r<i;r++){var n=Math.abs(t[r+1]-t[r]),s=e[r].box,a=this.autoRotateLabelAngle(s,n);if(0!==a&&(o=a),-90===o)break}if(0!==o){for(var p=0;p<e.length;p++)e[p].options.rotation=o,e[p].reflow(new wi);return!0}},e.prototype.arrangeTitle=function(){var t=this.options,e=this.title,i=t.labels.mirror,o=t.vertical;e&&(o?(e.options.align=i?B:C,e.options.vAlign=e.options.position):(e.options.align=e.options.position,e.options.vAlign=i?V:d),e.reflow(this.box))},e.prototype.arrangeNotes=function(){for(var t=0;t<this.notes.length;t++){var e=this.notes[t],i=e.options.value,o=void 0;jt(i)?(this.shouldRenderNote(i)?e.show():e.hide(),o=this.noteSlot(i)):e.hide(),e.reflow(o||this.lineBox())}},e.prototype.noteSlot=function(t){return this.getSlot(t)},e.prototype.alignTo=function(t){var e=t.lineBox(),i=this.options.vertical,o=i?H:F;this.box.snapTo(e,o),i?this.box.shrink(0,this.lineBox().height()-e.height()):this.box.shrink(this.lineBox().width()-e.width(),0),this.box[o+1]-=this.lineBox()[o+1]-e[o+1],this.box[o+2]-=this.lineBox()[o+2]-e[o+2]},e.prototype.axisLabelText=function(t,e,i){var o=this,r=vt(e),n=function(){return e.format?o.chartService.format.localeAuto(e.format,[t],e.culture):t};return r?r(Object.assign({},i,{get text(){return n()},value:t,format:e.format,culture:e.culture})):n()},e.prototype.slot=function(t,e,i){var o=this.getSlot(t,e,i);if(o)return o.toRect()},e.prototype.contentBox=function(){var t=this.box.clone(),e=this.labels;if(e.length){var i=this.options.vertical?H:F;if(this.chartService.isPannable(i)){var o=this.maxLabelOffset();t[i+1]-=o.start,t[i+2]+=o.end}else{e[0].options.visible&&t.wrap(e[0].box);var r=e[e.length-1];r.options.visible&&t.wrap(r.box)}}return t},e.prototype.maxLabelOffset=function(){for(var t=this.options,e=t.vertical,i=t.reverse,o=this.labelsBetweenTicks(),r=this.getLabelsTickPositions(),n=e?H:F,s=this.labels,a=i?1:0,p=i?0:1,l=0,h=0,c=0;c<s.length;c++){var u=s[c],d=this.labelTickIndex(u),f=void 0,g=void 0;o?(f=r[d+a],g=r[d+p]):f=g=r[d],l=Math.max(l,f-u.box[n+1]),h=Math.max(h,u.box[n+2]-g)}return{start:l,end:h}},e.prototype.limitRange=function(t,e,i,o,r){var n=this.options;if(t<i&&r<0&&(!jt(n.min)||n.min<=i)||o<e&&r>0&&(!jt(n.max)||o<=n.max))return null;if(e<i&&r>0||o<t&&r<0)return{min:t,max:e};var s=e-t,a=t,p=e;return t<i&&r<0?(a=Xt(t,i,o),p=Xt(t+s,i+s,o)):e>o&&r>0&&(p=Xt(e,i,o),a=Xt(e-s,i,o-s)),{min:a,max:p}},e.prototype.valueRange=function(){return{min:this.seriesMin,max:this.seriesMax}},e.prototype.lineDir=function(){var t=this.options;return(t.vertical?-1:1)*(t.reverse?-1:1)},e.prototype.lineInfo=function(){var t=this.options.vertical,e=this.lineBox(),i=t?e.height():e.width(),o=t?H:F,r=this.lineDir(),n=o+(1===r?1:2).toString();return{axis:o,axisOrigin:n,axisDir:r,lineBox:e,lineSize:i,lineStart:e[n]}},e.prototype.pointOffset=function(t){var e=this.lineInfo(),i=e.axis,o=e.axisDir,r=e.axisOrigin,n=e.lineBox,s=e.lineSize;return(o>0?t[i]-n[r]:n[r]-t[i])/s},e.prototype.scaleToDelta=function(t,e){var i=Xt(t,-.999,.999);return i>0?e*Math.min(1,i):e-e/(1+i)},e.prototype.labelsBetweenTicks=function(){return!this.options.justified},e.prototype.prepareUserOptions=function(){},e}(Li);te(Ao,{labels:{visible:!0,rotation:0,mirror:!1,step:1,skip:0},line:{width:1,color:u,visible:!0},title:{visible:!0,position:f},majorTicks:{align:L,size:4,skip:0,step:1},minorTicks:{align:L,size:3,skip:0,step:1},axisCrossingValue:0,majorTickType:L,minorTickType:M,majorGridLines:{skip:0,step:1},minorGridLines:{visible:!1,width:1,color:u,skip:0,step:1},margin:5,visible:!0,reverse:!1,justified:!0,notes:{label:{text:""}},_alignLines:!0,_deferLabels:!1});const So=Ao;var Co="milliseconds",Po="seconds",To="minutes",Mo="hours",Oo="days",Lo="weeks",Bo="months",Io="years",Eo=6e4,Ro=36e5,Vo=864e5,zo=6048e5,jo=26784e5,Do=31536e6,Fo={years:Do,months:jo,weeks:zo,days:Vo,hours:Ro,minutes:Eo,seconds:1e3,milliseconds:1};function Ho(t,e){return t.getTime()-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Eo}function No(t,e){return new Date(t.getTime()+e)}function Uo(t){var e;return t instanceof Date?e=t:t&&(e=new Date(t)),e}function Go(t,e){return 0===e&&23===t.getHours()&&(t.setHours(t.getHours()+2),!0)}function Wo(t,e,i,o){var r=t;if(t){var n=Uo(t),s=n.getHours();i===Io?Go(r=new Date(n.getFullYear()+e,0,1),0):i===Bo?Go(r=new Date(n.getFullYear(),n.getMonth()+e,1),s):i===Lo?(r=Wo(function(t,e){void 0===e&&(e=0);var i=0,o=t.getDay();if(!isNaN(o))for(;o!==e;)0===o?o=6:o--,i++;return No(t,-i*Vo)}(n,o),7*e,Oo),Go(r,s)):i===Oo?Go(r=new Date(n.getFullYear(),n.getMonth(),n.getDate()+e),s):i===Mo?r=function(t,e){var i=new Date(t);i.setMinutes(0,0,0);var o=(t.getTimezoneOffset()-i.getTimezoneOffset())*Eo;return No(i,o+e*Ro)}(n,e):i===To?(r=No(n,e*Eo)).getSeconds()>0&&r.setSeconds(0):i===Po?r=No(n,1e3*e):i===Co&&(r=No(n,e)),i!==Co&&r.getMilliseconds()>0&&r.setMilliseconds(0)}return r}function Xo(t,e,i){return Wo(Uo(t),0,e,i)}function Yo(t,e,i){var o=Uo(t);return o&&Xo(o,e,i).getTime()===o.getTime()?o:Wo(o,1,e,i)}function qo(t,e){return t&&e?t.getTime()-e.getTime():-1}function Zo(t,e){return t.getTime()-e}function Qo(t){if(G(t)){for(var e=[],i=0;i<t.length;i++)e.push(Qo(t[i]));return e}if(t)return Uo(t).getTime()}function Ko(t,e){return t&&e?Qo(t)===Qo(e):t===e}function $o(t,e,i){return Ho(t,e)/Fo[i]}function Jo(t,e,i,o){var r=Uo(t),n=Uo(e);return(i===Bo?r.getMonth()-n.getMonth()+12*(r.getFullYear()-n.getFullYear())+$o(r,new Date(r.getFullYear(),r.getMonth()),Oo)/new Date(r.getFullYear(),r.getMonth()+1,0).getDate():i===Io?r.getFullYear()-n.getFullYear()+Jo(r,new Date(r.getFullYear(),0),Bo,1)/12:i===Oo||i===Lo?$o(r,n,i):Zo(r,e)/Fo[i])/o}function tr(t,e,i){return i===Io?e.getFullYear()-t.getFullYear():i===Bo?12*tr(t,e,Io)+e.getMonth()-t.getMonth():i===Oo?Math.floor(Zo(e,t)/Vo):Math.floor(Zo(e,t)/Fo[i])}function er(t,e){return $(e)&&t.parseDate(e)||Uo(e)}function ir(t,e){if(G(e)){for(var i=[],o=0;o<e.length;o++)i.push(er(t,e[o]));return i}return er(t,e)}function or(t,e){return K(t.weekStartDay)?t.weekStartDay:e&&e.firstDay?e.firstDay():0}var rr=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initFields=function(){this._ticks={}},e.prototype.categoriesHash=function(){return""},e.prototype.clone=function(){var t=new e(Object.assign({},this.options,{categories:this.options.srcCategories}),this.chartService);return t.createLabels(),t},e.prototype.initUserOptions=function(t){var e=t.categories||[],i=void 0!==t.min,o=void 0!==t.max;if(t.srcCategories=t.categories=e,(i||o)&&e.length){var r,n=i?Math.floor(t.min):0;r=o?t.justified?Math.floor(t.max)+1:Math.ceil(t.max):e.length,t.categories=t.categories.slice(n,r)}return t},e.prototype.rangeIndices=function(){var t=this.options,e=t.categories.length||1;return{min:K(t.min)?t.min%1:0,max:K(t.max)&&t.max%1!=0&&t.max<this.totalRange().max?e-(1-t.max%1):e-(t.justified?1:0)}},e.prototype.range=function(){var t=this.options;return{min:K(t.min)?t.min:0,max:K(t.max)?t.max:this.totalRange().max}},e.prototype.roundedRange=function(){return this.range()},e.prototype.totalRange=function(){var t=this.options;return{min:0,max:Math.max(this._seriesMax||0,t.srcCategories.length)-(t.justified?1:0)}},e.prototype.scaleOptions=function(){var t=this.rangeIndices(),e=t.min,i=t.max,o=this.lineBox();return{scale:(this.options.vertical?o.height():o.width())/(i-e||1)*(this.options.reverse?-1:1),box:o,min:e,max:i}},e.prototype.arrangeLabels=function(){t.prototype.arrangeLabels.call(this),this.hideOutOfRangeLabels()},e.prototype.hideOutOfRangeLabels=function(){var t=this.box,e=this.labels;if(e.length>0){var i=this.options.vertical?H:F,o=t[i+1],r=t[i+2],n=e[0],s=Wt(e);(n.box[i+1]>r||n.box[i+2]<o)&&(n.options.visible=!1),(s.box[i+1]>r||s.box[i+2]<o)&&(s.options.visible=!1)}},e.prototype.getMajorTickPositions=function(){return this.getTicks().majorTicks},e.prototype.getMinorTickPositions=function(){return this.getTicks().minorTicks},e.prototype.getLabelsTickPositions=function(){return this.getTicks().labelTicks},e.prototype.tickIndices=function(t){for(var e=this.rangeIndices(),i=e.min,o=e.max,r=Math.ceil(o),n=Math.floor(i),s=[];n<=r;)s.push(n),n+=t;return s},e.prototype.getTickPositions=function(t){for(var e=this.options,i=e.vertical,o=e.reverse,r=this.scaleOptions(),n=r.scale,s=r.box,a=r.min,p=s[(i?H:F)+(o?2:1)],l=this.tickIndices(t),h=[],c=0;c<l.length;c++)h.push(p+Zt(n*(l[c]-a),y));return h},e.prototype.getTicks=function(){var t=this.options,e=this._ticks,i=this.rangeIndices(),o=this.lineBox(),r=o.getHash()+i.min+","+i.max+t.reverse+t.justified;if(e._hash!==r){var n=t.minorTicks.visible||t.minorGridLines.visible;e._hash=r,e.labelTicks=this.getTickPositions(1),e.majorTicks=this.filterOutOfRangePositions(e.labelTicks,o),e.minorTicks=n?this.filterOutOfRangePositions(this.getTickPositions(.5),o):[]}return e},e.prototype.filterOutOfRangePositions=function(t,e){if(!t.length)return t;for(var i=this.options.vertical?H:F,o=function(t){return e[i+1]<=t&&t<=e[i+2]},r=t.length-1,n=0;!o(t[n])&&n<=r;)n++;for(var s=r;!o(t[s])&&s>=0;)s--;return t.slice(n,s+1)},e.prototype.lineInfo=function(){var t=this.options,e=t.vertical,i=t.reverse,o=this.lineBox(),r=e?o.height():o.width(),n=e?H:F,s=i?-1:1,a=n+(1===s?1:2).toString();return{axis:n,axisOrigin:a,axisDir:s,lineBox:o,lineSize:r,lineStart:o[a]}},e.prototype.lineDir=function(){return this.options.reverse?-1:1},e.prototype.getSlot=function(t,e,i){var o=this.options,r=o.reverse,n=o.justified,s=this.scaleOptions(),a=s.scale,p=s.box,l=s.min,h=this.lineInfo(),c=h.axis,u=h.lineStart,d=p.clone(),f=void 0===e,g=Kt(t,0),y=Kt(e,g);y=Math.max(y-1,g);var v=u+(g-l)*a,m=u+((y=Math.max(g,y))+1-l)*a;return f&&n&&(m=v),i&&(v=Xt(v,p[c+1],p[c+2]),m=Xt(m,p[c+1],p[c+2])),d[c+1]=r?m:v,d[c+2]=r?v:m,d},e.prototype.limitSlot=function(t){var e=this.options.vertical?H:F,i=this.lineBox(),o=t.clone();return o[e+1]=Xt(t[e+1],i[e+1],i[e+2]),o[e+2]=Xt(t[e+2],i[e+1],i[e+2]),o},e.prototype.slot=function(e,i,o){var r=Math.floor(this.options.min||0),n=e,s=i;return"string"==typeof n?n=this.categoryIndex(n):K(n)&&(n-=r),"string"==typeof s?s=this.categoryIndex(s):K(s)&&(s-=r),t.prototype.slot.call(this,n,s,o)},e.prototype.pointCategoryIndex=function(t){var e=this.options,i=e.reverse,o=e.justified,r=e.vertical?H:F,n=this.scaleOptions(),s=n.scale,a=n.box,p=n.min,l=n.max,h=i?l:p,c=a[r+1],u=a[r+2],d=t[r];if(d<c||d>u)return null;var f=h+(d-c)/s,g=f%1;return o?f=Math.round(f):0===g&&f>0&&f--,Math.floor(f)},e.prototype.getCategory=function(t){var e=this.pointCategoryIndex(t);return null===e?null:this.options.categories[e]},e.prototype.categoryIndex=function(t){return this.totalIndex(t)-Math.floor(this.options.min||0)},e.prototype.categoryAt=function(t,e){var i=this.options;return(e?i.srcCategories:i.categories)[t]},e.prototype.categoriesCount=function(){return(this.options.categories||[]).length},e.prototype.translateRange=function(t){var e=this.options,i=this.lineBox(),o=e.vertical?i.height():i.width(),r=e.categories.length,n=Zt(t/(o/r),b);return{min:n,max:r+n}},e.prototype.scaleRange=function(t,e){var i=Math.abs(this.pointOffset(e)),o=this.limitedRangeIndices(),r=o.max-o.min,n=this.scaleToDelta(t,r),s=i*n,a=(1-i)*n,p=o.min+s,l=o.max-a;return l-p<.1&&(l=p+.1),{min:p,max:l}},e.prototype.zoomRange=function(t,e){var i=this.totalRange(),o=i.min,r=i.max,n=this.scaleRange(t,e);return{min:Xt(n.min,o,r),max:Xt(n.max,o,r)}},e.prototype.labelsCount=function(){var t=this.labelsRange();return t.max-t.min},e.prototype.labelsRange=function(){var t=this.options,e=t.justified,i=t.labels,o=this.limitedRangeIndices(!0),r=o.min,n=o.max,s=Math.floor(r);return e?(r=Math.ceil(r),n=Math.floor(n)):(r=Math.floor(r),n=Math.ceil(n)),{min:(r>i.skip?i.skip+i.step*Math.ceil((r-i.skip)/i.step):i.skip)-s,max:(t.categories.length?n+(e?1:0):0)-s}},e.prototype.createAxisLabel=function(t,e,i){var o=this.options,r=o.dataItems?o.dataItems[t]:null,n=Kt(o.categories[t],"");i.dataItem=r;var s=this.axisLabelText(n,e,i);return new oo(n,s,t,r,e)},e.prototype.shouldRenderNote=function(t){var e=this.limitedRangeIndices();return Math.floor(e.min)<=t&&t<=Math.ceil(e.max)},e.prototype.noteSlot=function(t){var e=this.options,i=t-Math.floor(e.min||0);return this.getSlot(i)},e.prototype.arrangeNotes=function(){t.prototype.arrangeNotes.call(this),this.hideOutOfRangeNotes()},e.prototype.hideOutOfRangeNotes=function(){var t=this.notes,e=this.box;if(t&&t.length)for(var i=this.options.vertical?H:F,o=e[i+1],r=e[i+2],n=0;n<t.length;n++){var s=t[n];s.box&&(r<s.box[i+1]||s.box[i+2]<o)&&s.hide()}},e.prototype.pan=function(t){var e=this.limitedRangeIndices(!0),i=this.scaleOptions().scale,o=Zt(t/i,b),r=this.totalRange(),n=e.min+o,s=e.max+o;return this.limitRange(n,s,0,r.max,o)},e.prototype.pointsRange=function(t,e){var i=this.options,o=i.reverse,r=i.vertical?H:F,n=this.limitedRangeIndices(!0),s=this.scaleOptions(),a=s.scale,p=s.box[r+(o?2:1)],l=t[r]-p,h=e[r]-p,c=n.min+l/a,u=n.min+h/a,d=Math.min(c,u),f=Math.max(c,u);if(f-d>=.01)return{min:d,max:f}},e.prototype.valueRange=function(){return this.range()},e.prototype.totalIndex=function(t){var e=this.options,i=this._categoriesMap?this._categoriesMap.get(t):function(t,e){return t instanceof Date?e.findIndex((function(e){return Ko(e,t)})):e.indexOf(t)}(t,e.srcCategories);return i},e.prototype.currentRangeIndices=function(){var t=this.options,e=0;return K(t.min)&&(e=Math.floor(t.min)),{min:e,max:K(t.max)?t.justified?Math.floor(t.max):Math.ceil(t.max)-1:this.totalCount()-1}},e.prototype.limitedRangeIndices=function(t){var e,i=this.options,o=K(i.min)?i.min:0;if(e=K(i.max)?i.max:K(i.min)?o+i.categories.length:this.totalRange().max||1,t){var r=this.totalRange();o=Xt(o,0,r.max),e=Xt(e,0,r.max)}return{min:o,max:e}},e.prototype.totalRangeIndices=function(){return{min:0,max:this.totalRange().max||1}},e.prototype.indexCategories=function(){if(!this._categoriesMap)for(var t=this._categoriesMap=new St,e=this.options.srcCategories,i=0;i<e.length;i++)t.set(e[i],i)},e.prototype.totalCount=function(){return Math.max(this.options.srcCategories.length,this._seriesMax||0)},e}(So);te(rr,{type:"category",vertical:!1,majorGridLines:{visible:!1,width:1,color:u},labels:{zIndex:1},justified:!1,_deferLabels:!0});const nr=rr;var sr={milliseconds:"HH:mm:ss.fff",seconds:"HH:mm:ss",minutes:"HH:mm",hours:"HH:mm",days:"M/d",weeks:"M/d",months:"MMM 'yy",years:"yyyy"},ar=[Co,Po,To,Mo,Oo,Lo,Bo,Io],pr="fit";function lr(t,e){e&&(t._range=void 0);var i=t._range;return i||((i=t._range=pe(t)).min=Uo(i.min),i.max=Uo(i.max)),i}var hr=function(t){this.options=t};hr.prototype.displayIndices=function(){return{min:0,max:1}},hr.prototype.displayRange=function(){return{}},hr.prototype.total=function(){return{}},hr.prototype.valueRange=function(){return{}},hr.prototype.valueIndex=function(){return-1},hr.prototype.values=function(){return[]},hr.prototype.totalIndex=function(){return-1},hr.prototype.valuesCount=function(){return 0},hr.prototype.totalCount=function(){return 0},hr.prototype.dateAt=function(){return null};var cr=function(t,e,i){this.options=i,i.baseUnitStep=i.baseUnitStep||1;var o=i.roundToBaseUnit,r=i.justified;this.start=Wo(t,0,i.baseUnit,i.weekStartDay);var n=this.roundToTotalStep(e),s=!r&&Ko(e,n)&&!i.justifyEnd;this.end=this.roundToTotalStep(e,!r,s?1:0);var a=i.min||t;this.valueStart=this.roundToTotalStep(a),this.displayStart=o?this.valueStart:a;var p=i.max;if(p){var l=!r&&Ko(p,this.roundToTotalStep(p))?-1:0;this.valueEnd=this.roundToTotalStep(p,!1,l),this.displayEnd=o?this.roundToTotalStep(p,!r):i.max}else this.valueEnd=n,this.displayEnd=o||s?this.end:e;this.valueEnd<this.valueStart&&(this.valueEnd=this.valueStart),this.displayEnd<=this.displayStart&&(this.displayEnd=this.roundToTotalStep(this.displayStart,!1,1))};function ur(t,e,i){for(var o,r,n,s=lr(t.categories),a=(t.max||s.max)-(t.min||s.min),p=t.autoBaseUnitSteps,l=t.maxDateGroups,h=t.baseUnit===pr,c=e?ar.indexOf(e):0,u=h?ar[c++]:t.baseUnit,d=a/Fo[u],f=d;!r||d>=l;){o=o||p[u].slice(0);do{n=o.shift()}while(n&&e===u&&n<i);if(n)d=f/(r=n);else{if(u===Wt(ar)){r=Math.ceil(f/l);break}if(!h){d>l&&(r=Math.ceil(f/l));break}u=ar[c++]||Wt(ar),f=a/Fo[u],o=null}}t.baseUnitStep=r,t.baseUnit=u}cr.prototype.displayRange=function(){return{min:this.displayStart,max:this.displayEnd}},cr.prototype.displayIndices=function(){if(!this._indices){var t=this.options,e=t.baseUnit,i=t.baseUnitStep,o=Jo(this.displayStart,this.valueStart,e,i),r=Jo(this.displayEnd,this.valueStart,e,i);this._indices={min:o,max:r}}return this._indices},cr.prototype.total=function(){return{min:this.start,max:this.end}},cr.prototype.totalCount=function(){return this.totalIndex(this.end)+(this.options.justified?1:0)},cr.prototype.valueRange=function(){return{min:this.valueStart,max:this.valueEnd}},cr.prototype.valueIndex=function(t){var e=this.options;return Math.floor(Jo(t,this.valueStart,e.baseUnit,e.baseUnitStep))},cr.prototype.totalIndex=function(t){var e=this.options;return Math.floor(Jo(t,this.start,e.baseUnit,e.baseUnitStep))},cr.prototype.dateIndex=function(t){var e=this.options;return Jo(t,this.valueStart,e.baseUnit,e.baseUnitStep)},cr.prototype.valuesCount=function(){return this.valueIndex(this.valueEnd)+1},cr.prototype.values=function(){var t=this._values;if(!t){var e=this.options,i=this.valueRange();this._values=t=[];for(var o=i.min;o<=i.max;)t.push(o),o=Wo(o,e.baseUnitStep,e.baseUnit,e.weekStartDay)}return t},cr.prototype.dateAt=function(t,e){var i=this.options;return Wo(e?this.start:this.valueStart,i.baseUnitStep*t,i.baseUnit,i.weekStartDay)},cr.prototype.roundToTotalStep=function(t,e,i){var o=this.options,r=o.baseUnit,n=o.baseUnitStep,s=o.weekStartDay,a=this.start,p=Jo(t,a,r,n),l=e?Math.ceil(p):Math.floor(p);return i&&(l+=i),Wo(a,l*n,r,s)};var dr=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.clone=function(){var t=new e(Object.assign({},this.options),this.chartService);return t.createLabels(),t},e.prototype.categoriesHash=function(){var t=this.dataRange.total().min;return this.options.baseUnit+this.options.baseUnitStep+t},e.prototype.initUserOptions=function(t){return t},e.prototype.initFields=function(){t.prototype.initFields.call(this);var e=this.chartService,i=e.intl,o=this.options,r=o.categories||[];if(r._parsed||((r=ir(i,r))._parsed=!0),o=at({roundToBaseUnit:!0},o,{categories:r,min:er(i,o.min),max:er(i,o.max),weekStartDay:or(o,i)}),e.panning&&e.isPannable(o.vertical?H:F)&&(o.roundToBaseUnit=!1),o.userSetBaseUnit=o.userSetBaseUnit||o.baseUnit,o.userSetBaseUnitStep=o.userSetBaseUnitStep||o.baseUnitStep,this.options=o,o.srcCategories=r,r.length>0){var n=lr(r,!0),s=o.maxDivisions,a=function(t){var e=(t.baseUnit||"").toLowerCase();return e!==pr&&!Ct(e,ar)&&function(t){for(var e,i,o=t.categories,r=jt(o)?o.length:0,n=P,s=0;s<r;s++){var a=o[s];if(a&&e){var p=Math.abs(Ho(a,e));0!==p&&(i=(n=Math.min(n,p))>=Do?Io:n>=24192e5?Bo:n>=zo?Lo:n>=Vo?Oo:n>=Ro?Mo:n>=Eo?To:Po)}e=a}t.baseUnit=i||Oo}(t),e!==pr&&"auto"!==t.baseUnitStep||ur(t),t}(o),p=o._forecast;if(p&&(p.before>0&&(n.min=Wo(n.min,-p.before,a.baseUnit,a.weekStartDay)),p.after>0&&(n.max=Wo(n.max,p.after,a.baseUnit,a.weekStartDay))),this.dataRange=new cr(n.min,n.max,a),s){var l=this.dataRange.displayRange(),h=Object.assign({},o,{justified:!0,roundToBaseUnit:!1,baseUnit:"fit",min:l.min,max:l.max,maxDateGroups:s}),c=this.dataRange.options;ur(h,c.baseUnit,c.baseUnitStep),this.divisionRange=new cr(n.min,n.max,h)}else this.divisionRange=this.dataRange}else o.baseUnit=o.baseUnit||Oo,this.dataRange=this.divisionRange=new hr(o);this.rangeLabels=[]},e.prototype.tickIndices=function(e){var i=this.dataRange,o=this.divisionRange,r=o.valuesCount();if(!this.options.maxDivisions||!r)return t.prototype.tickIndices.call(this,e);var n=[],s=o.values(),a=0;this.options.justified||(s=s.concat(o.dateAt(r)),a=.5);for(var p=0;p<s.length;p++)if(n.push(i.dateIndex(s[p])+a),1!==e&&p>=1){var l=n.length-1;n.splice(p,0,n[l-1]+(n[l]-n[l-1])*e)}return n},e.prototype.shouldRenderNote=function(t){var e=this.range(),i=this.options.categories||[];return qo(t,e.min)>=0&&qo(t,e.max)<=0&&i.length},e.prototype.parseNoteValue=function(t){return er(this.chartService.intl,t)},e.prototype.noteSlot=function(t){return this.getSlot(t)},e.prototype.translateRange=function(t){var e=this.options,i=e.baseUnit,o=e.weekStartDay,r=e.vertical,n=this.lineBox(),s=r?n.height():n.width(),a=this.range(),p=s/(a.max-a.min),l=Zt(t/p,b);if(a.min&&a.max){var h=No(e.min||a.min,l),c=No(e.max||a.max,l);a={min:Wo(h,0,i,o),max:Wo(c,0,i,o)}}return a},e.prototype.labelsRange=function(){return{min:this.options.labels.skip,max:this.divisionRange.valuesCount()}},e.prototype.pan=function(t){if(this.isEmpty())return null;var e=this.options,i=this.lineBox(),o=e.vertical?i.height():i.width(),r=this.dataRange.displayRange(),n=r.min,s=r.max,a=this.dataRange.total(),p=Zt(t/(o/(s-n)),b)*(e.reverse?-1:1),l=No(n,p),h=No(s,p),c=this.limitRange(Qo(l),Qo(h),Qo(a.min),Qo(a.max),p);return c?(c.min=Uo(c.min),c.max=Uo(c.max),c.baseUnit=e.baseUnit,c.baseUnitStep=e.baseUnitStep||1,c.userSetBaseUnit=e.userSetBaseUnit,c.userSetBaseUnitStep=e.userSetBaseUnitStep,c):void 0},e.prototype.pointsRange=function(e,i){if(this.isEmpty())return null;var o=t.prototype.pointsRange.call(this,e,i),r=this.dataRange.displayRange(),n=this.dataRange.displayIndices(),s=Zo(r.max,r.min)/(n.max-n.min),a=this.options;return{min:No(r.min,o.min*s),max:No(r.min,o.max*s),baseUnit:a.userSetBaseUnit||a.baseUnit,baseUnitStep:a.userSetBaseUnitStep||a.baseUnitStep}},e.prototype.scaleRange=function(t,e){if(this.isEmpty())return{};var i=this.options,o=i.userSetBaseUnit===pr,r=this.dataRange.total(),n=this.dataRange.displayRange(),s=n.min,a=n.max,p=Math.abs(this.pointOffset(e)),l=a-s,h=this.scaleToDelta(t,l),c=Math.round(p*h),u=Math.round((1-p)*h),d=this.dataRange.options.baseUnit,f=new Date(s.getTime()+c),g=new Date(a.getTime()-u);if(o){var y,v,m=i.autoBaseUnitSteps,x=i.maxDateGroups,b=Wt(m[d])*x*Fo[d],_=Zo(a,s),w=Zo(g,f),k=ar.indexOf(d);if(w<Fo[d]&&d!==Co)d=ar[k-1],f=No(s,v=(_-(x-1)*(y=Wt(m[d]))*Fo[d])/2),g=No(a,-v);else if(w>b&&d!==Io){var A=0;do{k++,d=ar[k],A=0,v=2*Fo[d];do{y=m[d][A],A++}while(A<m[d].length&&v*y<_)}while(d!==Io&&v*y<_);(v=(v*y-_)/2)>0&&(f=No(s,-v),g=No(a,v),f=No(f,Xt(g,r.min,r.max)-g),g=No(g,Xt(f,r.min,r.max)-f))}}return f&&g&&Zo(g,f)>0?{min:f,max:g,baseUnit:i.userSetBaseUnit||i.baseUnit,baseUnitStep:i.userSetBaseUnitStep||i.baseUnitStep}:void 0},e.prototype.zoomRange=function(t,e){var i=this.dataRange.total(),o=this.scaleRange(t,e);if(o){if(o.min<i.min){if(t<0&&this.options.justified){var r=Zo(i.min,o.min);o.max=No(o.max,r)}o.min=i.min}o.max>i.max&&(o.max=i.max)}return o},e.prototype.range=function(){return this.dataRange.displayRange()},e.prototype.createLabels=function(){t.prototype.createLabels.call(this),this.createRangeLabels()},e.prototype.clearLabels=function(){t.prototype.clearLabels.call(this),this.rangeLabels=[]},e.prototype.arrangeLabels=function(){this.arrangeRangeLabels(),t.prototype.arrangeLabels.call(this)},e.prototype.arrangeRangeLabels=function(){var t=this.options,e=this.rangeLabels;if(0!==e.length){var i=this.lineBox(),o=t.vertical,r=t.rangeLabels.mirror||t.labels.mirror,n=e[0];if(n){var s=o?i.y1-n.box.height()/2:i.x1;this.positionLabel(n,r,s)}var a=e[1];if(a){var p=o?i.y2-a.box.height()/2:i.x2;this.positionLabel(a,r,p)}}},e.prototype.autoRotateLabels=function(){t.prototype.autoRotateLabels.call(this),this.autoRotateRangeLabels()},e.prototype.hideOutOfRangeLabels=function(){t.prototype.hideOutOfRangeLabels.call(this),this.hideOverlappingLabels()},e.prototype.hideOverlappingLabels=function(){var t=this.rangeLabels,e=this.labels;if(0!==t.length){var i=t[0];if(i&&i.options.visible)for(var o=0;o<e.length&&s(i,e[o]);o++);var r=t[1];if(r&&r.options.visible)for(var n=e.length-1;n>0&&s(r,e[n]);--n);}function s(t,e){return!(e.options.visible&&!e.box.overlaps(t.box)||(e.options.visible=!1,0))}},e.prototype.contentBox=function(){for(var e=t.prototype.contentBox.call(this),i=this.rangeLabels,o=0;o<i.length;o++){var r=i[o];r.options.visible&&e.wrap(r.box)}return e},e.prototype.createAxisLabel=function(t,e,i){void 0===i&&(i={});var o=this.options,r=o.dataItems&&!o.maxDivisions?o.dataItems[t]:null,n=this.divisionRange.dateAt(t),s=e.dateFormats[this.divisionRange.options.baseUnit];e.format=e.format||s,i.dataItem=r;var a=this.axisLabelText(n,e,i);if(a)return new oo(n,a,t,r,e)},e.prototype.createRangeLabels=function(){var t=this,e=this.divisionRange,i=e.displayStart,o=e.displayEnd,r=this.options,n=Object.assign({},r.labels,r.rangeLabels,{align:f,zIndex:r.zIndex});if(!0===n.visible){this.normalizeLabelRotation(n),n.alignRotation=f,"auto"===n.rotation&&(n.rotation=0,r.autoRotateRangeLabels=!0);var s=n.dateFormats[this.divisionRange.options.baseUnit];n.format=n.format||s;var a=function(e,i,o){if(o){var r=new oo(i,o,e,null,n);t.append(r),t.rangeLabels.push(r)}};a(0,i,this.axisLabelText(i,n,{index:0,count:2})),a(1,o,this.axisLabelText(o,n,{index:1,count:2}))}},e.prototype.autoRotateRangeLabels=function(){var t=this,e=this.rangeLabels;if(this.options.autoRotateRangeLabels&&!this.options.vertical&&2===e.length){var i=function(e,i,o){var r=2*Math.abs(i[o+1]-i[o]),n=t.autoRotateLabelAngle(e.box,r);0!==n&&(e.options.rotation=n,e.reflow(new wi))},o=this.getMajorTickPositions();i(e[0],o,0),i(e[1],o,o.length-2)}},e.prototype.categoryIndex=function(t){return this.dataRange.valueIndex(t)},e.prototype.slot=function(t,e,i){var o=this.dataRange,r=t,n=e;r instanceof Date&&(r=o.dateIndex(r)),n instanceof Date&&(n=o.dateIndex(n));var s=this.getSlot(r,n,i);if(s)return s.toRect()},e.prototype.getSlot=function(e,i,o){var r=e,n=i;return typeof r===O&&(r=this.categoryIndex(r)),typeof n===O&&(n=this.categoryIndex(n)),t.prototype.getSlot.call(this,r,n,o)},e.prototype.valueRange=function(){var t=lr(this.options.srcCategories);return{min:Uo(t.min),max:Uo(t.max)}},e.prototype.categoryAt=function(t,e){return this.dataRange.dateAt(t,e)},e.prototype.categoriesCount=function(){return this.dataRange.valuesCount()},e.prototype.rangeIndices=function(){return this.dataRange.displayIndices()},e.prototype.labelsBetweenTicks=function(){return!this.divisionRange.options.justified},e.prototype.prepareUserOptions=function(){this.isEmpty()||(this.options.categories=this.dataRange.values())},e.prototype.getCategory=function(t){var e=this.pointCategoryIndex(t);return null===e?null:this.dataRange.dateAt(e)},e.prototype.totalIndex=function(t){return this.dataRange.totalIndex(t)},e.prototype.currentRangeIndices=function(){var t=this.dataRange.valueRange();return{min:this.dataRange.totalIndex(t.min),max:this.dataRange.totalIndex(t.max)}},e.prototype.totalRange=function(){return this.dataRange.total()},e.prototype.totalRangeIndices=function(){var t=this.dataRange.total();return{min:this.dataRange.totalIndex(t.min),max:this.dataRange.totalIndex(t.max)}},e.prototype.totalCount=function(){return this.dataRange.totalCount()},e.prototype.isEmpty=function(){return!this.options.srcCategories.length},e.prototype.roundedRange=function(){if(!1!==this.options.roundToBaseUnit||this.isEmpty())return this.range();var t=this.options,e=lr(t.srcCategories);return new cr(e.min,e.max,Object.assign({},t,{justified:!1,roundToBaseUnit:!0,justifyEnd:!1})).displayRange()},e}(nr);te(dr,{type:m,labels:{dateFormats:sr},rangeLabels:{visible:!1},autoBaseUnitSteps:{milliseconds:[1,10,100],seconds:[1,2,5,15,30],minutes:[1,2,5,15,30],hours:[1,2,3],days:[1,2,3],weeks:[1,2],months:[1,2,3,6],years:[1,2,3,5,10,25,50]},maxDateGroups:10});const fr=dr;function gr(t,e){return Zt(Math.floor(t/e)*e,b)}function yr(t,e){return Zt(Math.ceil(t/e)*e,b)}function vr(t){return Math.max(Math.min(t,3e5),-3e5)}var mr=Math.pow(10,1-b),xr=function(t){function e(e,i,o,r){t.call(this,Object.assign({},o,{seriesMin:e,seriesMax:i}),r)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initUserOptions=function(t){var e=function(t,e,i){var o=i.narrowRange,r=function(t,e,i){if(!t&&!e)return 0;var o;if(t>=0&&e>=0){var r=t===e?0:t;if(!1===i||!i&&(e-r)/e>.2)return 0;o=Math.max(0,r-(e-r)/2)}else o=t;return o}(t,e,o),n=function(t,e,i){if(!t&&!e)return 1;var o;if(t<=0&&e<=0){var r=t===e?0:e,n=Math.abs((r-t)/r);if(!1===i||!i&&n>.2)return 0;o=Math.min(0,r-(t-r)/2)}else o=e;return o}(t,e,o),s=vi(r,n),a={majorUnit:s};return!1!==i.roundToMajorUnit&&(r<0&&br(r,s,1/3)&&(r-=s),n>0&&br(n,s,1/3)&&(n+=s)),a.min=gr(r,s),a.max=yr(n,s),a}(t.seriesMin,t.seriesMax,t);return this.totalOptions=function(t,e){return{min:jt(e.min)?Math.min(t.min,e.min):t.min,max:jt(e.max)?Math.max(t.max,e.max):t.max,majorUnit:t.majorUnit}}(e,t),function(t,e){var i,o,r=e;if(e){!function(t,e){for(var i=0;i<e.length;i++){var o=e[i];null===t[o]&&(t[o]=void 0)}}(e,["min","max"]),i=jt(e.min),o=jt(e.max);var n=i||o;n&&e.min===e.max&&(e.min>0?e.min=0:e.max=1),e.majorUnit?(t.min=gr(t.min,e.majorUnit),t.max=yr(t.max,e.majorUnit)):n&&(r=at(t,e),t.majorUnit=vi(r.min,r.max))}t.minorUnit=(r.majorUnit||t.majorUnit)/5;var s=at(t,r);return s.min>=s.max&&(i&&!o?s.max=s.min+s.majorUnit:!i&&o&&(s.min=s.max-s.majorUnit)),s}(e,t)},e.prototype.initFields=function(){this.totalMin=this.totalOptions.min,this.totalMax=this.totalOptions.max,this.totalMajorUnit=this.totalOptions.majorUnit,this.seriesMin=this.options.seriesMin,this.seriesMax=this.options.seriesMax},e.prototype.clone=function(){return new e(this.seriesMin,this.seriesMax,Object.assign({},this.options),this.chartService)},e.prototype.startValue=function(){return 0},e.prototype.range=function(){var t=this.options;return{min:t.min,max:t.max}},e.prototype.getDivisions=function(t){if(0===t)return 1;var e=this.options,i=e.max-e.min;return Math.floor(Zt(i/t,y))+1},e.prototype.getTickPositions=function(t,e){var i=this.options,o=this.lineInfo(),r=o.axisDir,n=o.axisOrigin,s=o.lineBox,a=t*(o.lineSize/(i.max-i.min)),p=this.getDivisions(t),l=[],h=s[n],c=0;e&&(c=e/t);for(var u=0;u<p;u++)u%c!=0&&l.push(Zt(h,y)),h+=a*r;return l},e.prototype.getMajorTickPositions=function(){return this.getTickPositions(this.options.majorUnit)},e.prototype.getMinorTickPositions=function(){return this.getTickPositions(this.options.minorUnit)},e.prototype.getSlot=function(t,e,i){void 0===i&&(i=!1);var o=this.options,r=this.lineInfo(),n=r.axis,s=r.axisDir,a=r.lineBox,p=r.lineSize,l=r.lineStart,h=s*(p/(o.max-o.min)),c=Kt(t,e||0),u=Kt(e,t||0);i&&(c=Xt(c,o.min,o.max),u=Xt(u,o.min,o.max));var d=Math.min(c,u)-o.min,f=Math.max(c,u)-o.min,g=new wi(a.x1,a.y1,a.x1,a.y1);return g[n+1]=vr(l+h*(s>0?d:f)),g[n+2]=vr(l+h*(s>0?f:d)),g},e.prototype.getValue=function(t){var e=this.options,i=Number(e.max),o=Number(e.min),r=this.pointOffset(t);return r<0||r>1?null:Zt(o+r*(i-o),b)},e.prototype.translateRange=function(t){var e=this.options,i=e.vertical,o=e.reverse,r=e.max,n=e.min,s=this.lineInfo().lineSize,a=Zt(t/(s/(r-n)),b);return!i&&!o||i&&o||(a=-a),{min:n+a,max:r+a,offset:a}},e.prototype.labelsCount=function(){return this.getDivisions(this.options.majorUnit)},e.prototype.createAxisLabel=function(t,e,i){var o=this.options,r=Zt(o.min+t*o.majorUnit,b),n=this.axisLabelText(r,e,i);return new oo(r,n,t,null,e)},e.prototype.shouldRenderNote=function(t){var e=this.range();return e.min<=t&&t<=e.max},e.prototype.pan=function(t){var e=this.translateRange(t);return this.limitRange(e.min,e.max,this.totalMin,this.totalMax,e.offset)},e.prototype.pointsRange=function(t,e){var i=this.getValue(t),o=this.getValue(e),r=Math.min(i,o),n=Math.max(i,o);if(this.isValidRange(r,n))return{min:r,max:n}},e.prototype.scaleRange=function(t,e){var i=Math.abs(this.pointOffset(e)),o=this.options.max-this.options.min,r=this.scaleToDelta(t,o),n=i*r,s=(1-i)*r,a=Zt(this.options.min+n,b),p=Zt(this.options.max-s,b);return p-a<mr&&(p=a+mr),{min:a,max:p}},e.prototype.zoomRange=function(t,e){var i=this.totalMin,o=this.totalMax,r=this.scaleRange(t,e);return{min:Xt(r.min,i,o),max:Xt(r.max,i,o),narrowRange:!1}},e.prototype.isValidRange=function(t,e){return e-t>mr},e}(So);function br(t,e,i){var o=Zt(Math.abs(t%e),b);return 0===o||o>e*(1-i)}te(xr,{type:"numeric",min:0,max:1,vertical:!0,majorGridLines:{visible:!0,width:1,color:u},labels:{format:"#.####################"},zIndex:1});const _r=xr;var wr=function(t){function e(e,i,o,r){var n=Uo(e),s=Uo(i),a=r.intl,p=o||{};p=function(t,e,i){var o,r,n=i.min||t,s=i.max||e,a=i.baseUnit||(s&&n?(o=Ho(s,n),r=Mo,o>=Do?r=Io:o>=jo?r=Bo:o>=zo?r=Lo:o>=Vo&&(r=Oo),r):Mo),p=Fo[a],l=i.weekStartDay||0,h=Xo(Qo(n)-1,a,l)||Uo(s),c=Yo(Qo(s)+1,a,l),u=(i.majorUnit?i.majorUnit:void 0)||yr(vi(h.getTime(),c.getTime()),p)/p,d=tr(h,c,a),f=yr(d,u)-d,g=Math.floor(f/2),y=f-g;return i.baseUnit||delete i.baseUnit,i.baseUnit=i.baseUnit||a,i.min=i.min||Wo(h,-g,a,l),i.max=i.max||Wo(c,y,a,l),i.minorUnit=i.minorUnit||u/5,i.majorUnit=u,i}(n,s,p=at(p||{},{min:er(a,p.min),max:er(a,p.max),axisCrossingValue:ir(a,p.axisCrossingValues||p.axisCrossingValue),weekStartDay:or(p,a)})),t.call(this,p,r),this.intlService=a,this.seriesMin=n,this.seriesMax=s;var l=p.weekStartDay||0;this.totalMin=Qo(Xo(Qo(n)-1,p.baseUnit,l)),this.totalMax=Qo(Yo(Qo(s)+1,p.baseUnit,l))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.clone=function(){return new e(this.seriesMin,this.seriesMax,Object.assign({},this.options),this.chartService)},e.prototype.range=function(){var t=this.options;return{min:t.min,max:t.max}},e.prototype.getDivisions=function(t){var e=this.options;return Math.floor(tr(e.min,e.max,e.baseUnit)/t+1)},e.prototype.getTickPositions=function(t){for(var e=this.options,i=this.lineInfo(),o=i.axisDir,r=i.lineSize,n=i.lineStart,s=this.getDivisions(t),a=r/Zo(e.max,e.min),p=e.weekStartDay||0,l=[n],h=1;h<s;h++){var c=n+Zo(Wo(e.min,h*t,e.baseUnit,p),e.min)*a*o;l.push(Zt(c,y))}return l},e.prototype.getMajorTickPositions=function(){return this.getTickPositions(this.options.majorUnit)},e.prototype.getMinorTickPositions=function(){return this.getTickPositions(this.options.minorUnit)},e.prototype.getSlot=function(t,e,i){return _r.prototype.getSlot.call(this,er(this.intlService,t),er(this.intlService,e),i)},e.prototype.getValue=function(t){var e=_r.prototype.getValue.call(this,t);return null!==e?Uo(e):null},e.prototype.labelsCount=function(){return this.getDivisions(this.options.majorUnit)},e.prototype.createAxisLabel=function(t,e,i){var o=this.options,r=t*o.majorUnit,n=o.weekStartDay||0,s=o.min;r>0&&(s=Wo(s,r,o.baseUnit,n));var a=e.dateFormats[o.baseUnit];e.format=e.format||a;var p=this.axisLabelText(s,e,i);return new oo(s,p,t,null,e)},e.prototype.translateRange=function(t){var e=this.options,i=this.lineBox(),o=e.vertical,r=e.reverse,n=o?i.height():i.width(),s=this.range(),a=n/Zo(s.max,s.min),p=Zt(t/a,b);return!o&&!r||o&&r||(p=-p),{min:No(e.min,p),max:No(e.max,p),offset:p}},e.prototype.shouldRenderNote=function(t){var e=this.range();return qo(t,e.min)>=0&&qo(t,e.max)<=0},e.prototype.pan=function(t){var e=this.translateRange(t,!0),i=this.limitRange(Qo(e.min),Qo(e.max),this.totalMin,this.totalMax,e.offset);if(i)return{min:Uo(i.min),max:Uo(i.max)}},e.prototype.pointsRange=function(t,e){var i=this.getValue(t),o=this.getValue(e),r=Math.min(i,o),n=Math.max(i,o);return{min:Uo(r),max:Uo(n)}},e.prototype.scaleRange=function(t,e){var i=Math.abs(this.pointOffset(e)),o=this.options.max-this.options.min,r=this.scaleToDelta(t,o),n=i*r,s=(1-i)*r,a=Uo(Qo(this.options.min)+n),p=Uo(Qo(this.options.max)-s);return p-a<1e3&&(p=Uo(Qo(a)+1e3)),{min:a,max:p}},e.prototype.zoomRange=function(t,e){var i=this.scaleRange(t,e);return{min:Uo(Xt(Qo(i.min),this.totalMin,this.totalMax)),max:Uo(Xt(Qo(i.max),this.totalMin,this.totalMax))}},e}(So);te(wr,{type:m,majorGridLines:{visible:!0,width:1,color:u},labels:{dateFormats:sr}});const kr=wr;var Ar=1e-6,Sr=function(t){function e(e,i,o,r){var n=at({majorUnit:10,min:e,max:i},o),s=n.majorUnit,a=function(t,e){var i=Zt(Pr(t,e),b)%1;return t<=0?e:0!==i&&(i<.3||i>.9)?Math.pow(e,Pr(t,e)+.2):Math.pow(e,Math.ceil(Pr(t,e)))}(i,s),p=function(t,e,i){var o=i.majorUnit,r=t;return t<=0?r=e<=1?Math.pow(o,-2):1:i.narrowRange||(r=Math.pow(o,Math.floor(Pr(t,o)))),r}(e,i,n),l=function(t,e,i,o){var r=i.min,n=i.max;return jt(i.axisCrossingValue)&&i.axisCrossingValue<=0&&Cr(),jt(o.max)?o.max<=0&&Cr():n=e,jt(o.min)?o.min<=0&&Cr():r=t,{min:r,max:n}}(p,a,n,o);n.max=l.max,n.min=l.min,n.minorUnit=o.minorUnit||Zt(s-1,b),t.call(this,n,r),this.totalMin=jt(o.min)?Math.min(p,o.min):p,this.totalMax=jt(o.max)?Math.max(a,o.max):a,this.logMin=Zt(Pr(l.min,s),b),this.logMax=Zt(Pr(l.max,s),b),this.seriesMin=e,this.seriesMax=i,this.createLabels()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.clone=function(){return new e(this.seriesMin,this.seriesMax,Object.assign({},this.options),this.chartService)},e.prototype.startValue=function(){return this.options.min},e.prototype.getSlot=function(t,e,i){var o=this,r=o.options,n=o.logMin,s=o.logMax,a=r.majorUnit,p=r.min,l=r.max,h=this.lineInfo(),c=h.axis,u=h.axisDir,d=h.lineBox,f=h.lineSize,g=h.lineStart,y=u*(f/(s-n)),v=Kt(t,e||1),m=Kt(e,t||1);if(v<=0||m<=0)return null;i&&(v=Xt(v,p,l),m=Xt(m,p,l)),v=Pr(v,a),m=Pr(m,a);var x=Math.min(v,m)-n,b=Math.max(v,m)-n,_=new wi(d.x1,d.y1,d.x1,d.y1);return _[c+1]=vr(g+y*(u>0?x:b)),_[c+2]=vr(g+y*(u>0?b:x)),_},e.prototype.getValue=function(t){var e=this,i=e.options,o=e.logMin,r=e.logMax,n=i.majorUnit,s=this.lineInfo(),a=s.axis,p=s.axisDir,l=s.lineStart,h=s.lineSize,c=(r-o)/h,u=p*(t[a]-l);if(u<0||u>h)return null;var d=o+u*c;return Zt(Math.pow(n,d),b)},e.prototype.range=function(){var t=this.options;return{min:t.min,max:t.max}},e.prototype.translateRange=function(t){var e=this,i=e.options,o=e.logMin,r=e.logMax,n=i.reverse,s=i.vertical,a=i.majorUnit,p=this.lineBox(),l=s?p.height():p.width(),h=Zt(t/(l/(r-o)),b);return!s&&!n||s&&n||(h=-h),{min:Math.pow(a,o+h),max:Math.pow(a,r+h),offset:h}},e.prototype.labelsCount=function(){var t=Math.floor(this.logMax);return Math.floor(t-this.logMin)+1},e.prototype.getMajorTickPositions=function(){var t=[];return this.traverseMajorTicksPositions((function(e){t.push(e)}),{step:1,skip:0}),t},e.prototype.createTicks=function(t){var e=this.options,i=e.majorTicks,o=e.minorTicks,r=e.vertical,n=e.labels.mirror,s=this.lineBox(),a={vertical:r};function p(e,i){a.tickX=n?s.x2:s.x2-i.size,a.tickY=n?s.y1-i.size:s.y1,a.position=e,t.append(wo(a,i))}return i.visible&&this.traverseMajorTicksPositions(p,i),o.visible&&this.traverseMinorTicksPositions(p,o),[]},e.prototype.createGridLines=function(t){var e=this.options,i=e.minorGridLines,o=e.majorGridLines,r=e.vertical,n=t.lineBox(),s={lineStart:n[r?"x1":"y1"],lineEnd:n[r?"x2":"y2"],vertical:r},a=[],p=this.gridLinesVisual();function l(t,e){Ct(t,a)||(s.position=t,p.append(ko(s,e)),a.push(t))}return o.visible&&this.traverseMajorTicksPositions(l,o),i.visible&&this.traverseMinorTicksPositions(l,i),p.children},e.prototype.traverseMajorTicksPositions=function(t,e){for(var i=this.lineInfo(),o=i.lineStart,r=i.step,n=this.logMin,s=this.logMax,a=Math.ceil(n)+e.skip;a<=s;a+=e.step)t(Zt(o+r*(a-n),b),e)},e.prototype.traverseMinorTicksPositions=function(t,e){for(var i=this.options,o=i.min,r=i.max,n=i.minorUnit,s=i.majorUnit,a=this.lineInfo(),p=a.lineStart,l=a.step,h=this.logMin,c=this.logMax,u=Math.floor(h);u<c;u++)for(var d=this._minorIntervalOptions(u),f=e.skip;f<n;f+=e.step){var g=d.value+f*d.minorStep;if(g>r)break;g>=o&&t(Zt(p+l*(Pr(g,s)-h),b),e)}},e.prototype.createAxisLabel=function(t,e,i){var o=Math.ceil(this.logMin+t),r=Math.pow(this.options.majorUnit,o),n=this.axisLabelText(r,e,i);return new oo(r,n,t,null,e)},e.prototype.shouldRenderNote=function(t){var e=this.range();return e.min<=t&&t<=e.max},e.prototype.pan=function(t){var e=this.translateRange(t);return this.limitRange(e.min,e.max,this.totalMin,this.totalMax,e.offset)},e.prototype.pointsRange=function(t,e){var i=this.getValue(t),o=this.getValue(e);return{min:Math.min(i,o),max:Math.max(i,o)}},e.prototype.scaleRange=function(t,e){var i=this.options.majorUnit,o=Pr(this.options.min,i),r=Pr(this.options.max,i),n=Math.abs(this.pointOffset(e)),s=r-o,a=this.scaleToDelta(t,s),p=Math.pow(i,o+n*a),l=Math.pow(i,r-(1-n)*a);return l-p<Ar&&(l=p+Ar),{min:p,max:l}},e.prototype.zoomRange=function(t,e){var i=this.scaleRange(t,e),o=this.totalMin,r=this.totalMax;return{min:Xt(i.min,o,r),max:Xt(i.max,o,r)}},e.prototype._minorIntervalOptions=function(t){var e=this.options,i=e.minorUnit,o=e.majorUnit,r=Math.pow(o,t);return{value:r,minorStep:(Math.pow(o,t+1)-r)/i}},e.prototype.lineInfo=function(){var e=t.prototype.lineInfo.call(this);return e.step=e.axisDir*(e.lineSize/(this.logMax-this.logMin)),e},e}(So);function Cr(){throw new Error("Non positive values cannot be used for a logarithmic axis")}function Pr(t,e){return Math.log(t)/Math.log(e)}te(Sr,{type:"log",majorUnit:10,minorUnit:1,axisCrossingValue:1,vertical:!0,majorGridLines:{visible:!0,width:1,color:u},zIndex:1,_deferLabels:!0});const Tr=Sr;var Mr={createGridLines:function(t){var e,i,o=this.options,r=Math.abs(this.box.center().y-t.lineBox().y1),n=[],s=!1;return o.majorGridLines.visible&&(e=this.majorGridLineAngles(t),s=!0,n=this.renderMajorGridLines(e,r,o.majorGridLines)),o.minorGridLines.visible&&(i=this.minorGridLineAngles(t,s),Vt(n,this.renderMinorGridLines(i,r,o.minorGridLines,t,s))),n},renderMajorGridLines:function(t,e,i){return this.renderGridLines(t,e,i)},renderMinorGridLines:function(t,e,i,o,r){var n=this.radiusCallback&&this.radiusCallback(e,o,r);return this.renderGridLines(t,e,i,n)},renderGridLines:function(t,e,i,o){for(var r={stroke:{width:i.width,color:i.color,dashType:i.dashType}},n=this.box.center(),s=new q.geometry.Circle([n.x,n.y],e),a=this.gridLinesVisual(),p=0;p<t.length;p++){var l=new q.drawing.Path(r);o&&(s.radius=o(t[p])),l.moveTo(s.center).lineTo(s.pointAt(t[p]+180)),a.append(l)}return a.children},gridLineAngles:function(t,e,i,o,r){var n=this,s=this.intervals(e,i,o,r),a=t.options,p=a.visible&&!1!==(a.line||{}).visible;return Bt(s,(function(t){var e=n.intervalAngle(t);if(!p||90!==e)return e}))}};const Or=Mr;var Lr=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.range=function(){return{min:0,max:this.options.categories.length}},e.prototype.reflow=function(t){this.box=t,this.reflowLabels()},e.prototype.lineBox=function(){return this.box},e.prototype.reflowLabels=function(){for(var t=this.labels,e=this.options.labels,i=e.skip||0,o=e.step||1,r=new wi,n=0;n<t.length;n++){t[n].reflow(r);var s=t[n].box;t[n].reflow(this.getSlot(i+n*o).adjacentBox(0,s.width(),s.height()))}},e.prototype.intervals=function(t,e,i,o){void 0===o&&(o=!1);for(var r=this.options,n=r.categories.length/t||1,s=360/n,a=i||1,p=[],l=0,h=e||0;h<n;h+=a)l=r.reverse?360-h*s:h*s,l=Zt(l,y)%360,o&&Ct(l,o)||p.push(l);return p},e.prototype.majorIntervals=function(){return this.intervals(1)},e.prototype.minorIntervals=function(){return this.intervals(.5)},e.prototype.intervalAngle=function(t){return(360+t+this.options.startAngle)%360},e.prototype.majorAngles=function(){var t=this;return Bt(this.majorIntervals(),(function(e){return t.intervalAngle(e)}))},e.prototype.createLine=function(){return[]},e.prototype.majorGridLineAngles=function(t){var e=this.options.majorGridLines;return this.gridLineAngles(t,1,e.skip,e.step)},e.prototype.minorGridLineAngles=function(t,e){var i=this.options,o=i.minorGridLines,r=i.majorGridLines,n=e?this.intervals(1,r.skip,r.step):null;return this.gridLineAngles(t,.5,o.skip,o.step,n)},e.prototype.radiusCallback=function(t,e,i){if(e.options.type!==s){var o=qt(360/(2*this.options.categories.length)),r=Math.cos(o)*t,n=this.majorAngles();return function(e){return!i&&Ct(e,n)?t:r}}},e.prototype.createPlotBands=function(){for(var t=this.options.plotBands||[],e=this._plotbandGroup=new q.drawing.Group({zIndex:-1}),i=0;i<t.length;i++){var o=t[i],r=this.plotBandSlot(o),n=this.getSlot(o.from),s=o.from-Math.floor(o.from);r.startAngle+=s*n.angle;var a=Math.ceil(o.to)-o.to;r.angle-=(a+s)*n.angle;var p=Mi.current.createRing(r,{fill:{color:o.color,opacity:o.opacity},stroke:{opacity:o.opacity}});e.append(p)}this.appendVisual(e)},e.prototype.plotBandSlot=function(t){return this.getSlot(t.from,t.to-1)},e.prototype.getSlot=function(t,e){var i=this.options,o=i.justified,r=this.box,n=this.majorAngles(),s=n.length,a=360/s,p=t;i.reverse&&!o&&(p=(p+1)%s);var l=n[p=Xt(Math.floor(p),0,s-1)];o&&(l-=a/2)<0&&(l+=360);var h=a*(Xt(Math.ceil(e||p),p,s-1)-p+1);return new Si(r.center(),0,r.height()/2,l,h)},e.prototype.slot=function(t,e){var i=this.getSlot(t,e),o=i.startAngle+180,r=o+i.angle;return new q.geometry.Arc([i.center.x,i.center.y],{startAngle:o,endAngle:r,radiusX:i.radius,radiusY:i.radius})},e.prototype.pointCategoryIndex=function(t){for(var e=this.options.categories.length,i=null,o=0;o<e;o++)if(this.getSlot(o).containsPoint(t)){i=o;break}return i},e}(nr);te(Lr,{startAngle:90,labels:{margin:dt(10)},majorGridLines:{visible:!0},justified:!0}),at(Lr.prototype,Or);const Br=Lr;var Ir=function(t){function e(e,i){t.call(this,e,i);var o=this.options;o.minorUnit=o.minorUnit||o.majorUnit/2}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDivisions=function(t){return _r.prototype.getDivisions.call(this,t)-1},e.prototype.reflow=function(t){this.box=t,this.reflowLabels()},e.prototype.reflowLabels=function(){for(var t=this,e=t.options,i=t.labels,o=t.options.labels,r=o.skip||0,n=o.step||1,s=new wi,a=this.intervals(e.majorUnit,r,n),p=0;p<i.length;p++){i[p].reflow(s);var l=i[p].box;i[p].reflow(this.getSlot(a[p]).adjacentBox(0,l.width(),l.height()))}},e.prototype.lineBox=function(){return this.box},e.prototype.intervals=function(t,e,i,o){void 0===o&&(o=!1);for(var r=this.options.min,n=this.getDivisions(t),s=[],a=i||1,p=e||0;p<n;p+=a){var l=(360+r+p*t)%360;o&&Ct(l,o)||s.push(l)}return s},e.prototype.majorIntervals=function(){return this.intervals(this.options.majorUnit)},e.prototype.minorIntervals=function(){return this.intervals(this.options.minorUnit)},e.prototype.intervalAngle=function(t){return(540-t-this.options.startAngle)%360},e.prototype.createLine=function(){return[]},e.prototype.majorGridLineAngles=function(t){var e=this.options.majorGridLines;return this.gridLineAngles(t,this.options.majorUnit,e.skip,e.step)},e.prototype.minorGridLineAngles=function(t,e){var i=this.options,o=i.minorGridLines,r=i.majorGridLines,n=e?this.intervals(i.majorUnit,r.skip,r.step):null;return this.gridLineAngles(t,i.minorUnit,o.skip,o.step,n)},e.prototype.plotBandSlot=function(t){return this.getSlot(t.from,t.to)},e.prototype.getSlot=function(t,e){var i=this.options,o=this.box,r=i.startAngle,n=Xt(t,i.min,i.max),s=Xt(e||n,n,i.max);if(i.reverse&&(n*=-1,s*=-1),(s=(540-s-r)%360)<(n=(540-n-r)%360)){var a=n;n=s,s=a}return new Si(o.center(),0,o.height()/2,n,s-n)},e.prototype.slot=function(t,e){void 0===e&&(e=t);var i,o,r=this.options,n=360-r.startAngle,s=this.getSlot(t,e),a=Math.min(t,e),p=Math.max(t,e);return r.reverse?(i=a,o=p):(i=360-p,o=360-a),i=(i+n)%360,o=(o+n)%360,new q.geometry.Arc([s.center.x,s.center.y],{startAngle:i,endAngle:o,radiusX:s.radius,radiusY:s.radius})},e.prototype.getValue=function(t){var e=this.options,i=this.box.center(),o=t.x-i.x,r=t.y-i.y,n=Math.round(Dt(Math.atan2(r,o))),s=e.startAngle;return e.reverse||(n*=-1,s*=-1),(n+s+360)%360},e.prototype.valueRange=function(){return{min:0,max:2*Math.PI}},e}(So);te(Ir,{type:"polar",startAngle:0,reverse:!1,majorUnit:60,min:0,max:360,labels:{margin:dt(10)},majorGridLines:{color:u,visible:!0,width:1},minorGridLines:{color:"#aaa"}}),at(Ir.prototype,Or,{createPlotBands:Br.prototype.createPlotBands,majorAngles:Br.prototype.majorAngles,range:_r.prototype.range,labelsCount:_r.prototype.labelsCount,createAxisLabel:_r.prototype.createAxisLabel});const Er=Ir;var Rr={options:{majorGridLines:{visible:!0}},createPlotBands:function(){var t=this.options,e=t.majorGridLines.type,i=t.plotBands;void 0===i&&(i=[]);for(var o=this.plotArea.polarAxis,r=o.majorAngles(),n=o.box.center(),a=this._plotbandGroup=new q.drawing.Group({zIndex:-1}),p=0;p<i.length;p++){var l,h=i[p],c={fill:{color:h.color,opacity:h.opacity},stroke:{opacity:h.opacity}},u=this.getSlot(h.from,h.to,!0),d=new Si(n,n.y-u.y2,n.y-u.y1,0,360);l=e===s?Mi.current.createRing(d,c):q.drawing.Path.fromPoints(this.plotBandPoints(d,r),c).close(),a.append(l)}this.appendVisual(a)},plotBandPoints:function(t,e){for(var i=[],o=[],r=[t.center.x,t.center.y],n=new q.geometry.Circle(r,t.innerRadius),s=new q.geometry.Circle(r,t.radius),a=0;a<e.length;a++)i.push(n.pointAt(e[a]+180)),o.push(s.pointAt(e[a]+180));return i.reverse(),i.push(i[0]),o.push(o[0]),o.concat(i)},createGridLines:function(t){var e=this.options,i=this.radarMajorGridLinePositions(),o=t.majorAngles(),r=t.box.center(),n=[];if(e.majorGridLines.visible&&(n=this.renderGridLines(r,i,o,e.majorGridLines)),e.minorGridLines.visible){var s=this.radarMinorGridLinePositions();Vt(n,this.renderGridLines(r,s,o,e.minorGridLines))}return n},renderGridLines:function(t,e,i,o){var r={stroke:{width:o.width,color:o.color,dashType:o.dashType}},n=o.skip;void 0===n&&(n=0);var a=o.step;void 0===a&&(a=0);for(var p=this.gridLinesVisual(),l=n;l<e.length;l+=a){var h=t.y-e[l];if(h>0){var c=new q.geometry.Circle([t.x,t.y],h);if(o.type===s)p.append(new q.drawing.Circle(c,r));else{for(var u=new q.drawing.Path(r),d=0;d<i.length;d++)u.lineTo(c.pointAt(i[d]+180));u.close(),p.append(u)}}}return p.children},getValue:function(t){var e=this.lineBox(),i=this.plotArea.polarAxis,o=i.majorAngles(),r=i.box.center(),n=t.distanceTo(r),a=n;if(this.options.majorGridLines.type!==s&&o.length>1){var p=t.x-r.x,l=t.y-r.y,h=(Dt(Math.atan2(l,p))+540)%360;o.sort((function(t,e){return Vr(t,h)-Vr(e,h)}));var c=90-Vr(o[0],o[1])/2,u=180-Vr(h,o[0])-c;a=n*(Math.sin(qt(u))/Math.sin(qt(c)))}return this.axisType().prototype.getValue.call(this,new xi(e.x1,e.y2-a))}};function Vr(t,e){return 180-Math.abs(Math.abs(t-e)-180)}const zr=Rr;var jr=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.radarMajorGridLinePositions=function(){return this.getTickPositions(this.options.majorUnit)},e.prototype.radarMinorGridLinePositions=function(){var t=this.options,e=0;return t.majorGridLines.visible&&(e=t.majorUnit),this.getTickPositions(t.minorUnit,e)},e.prototype.axisType=function(){return t},e}(_r);at(jr.prototype,zr);const Dr=jr;var Fr=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.radarMajorGridLinePositions=function(){var t=[];return this.traverseMajorTicksPositions((function(e){t.push(e)}),this.options.majorGridLines),t},e.prototype.radarMinorGridLinePositions=function(){var t=[];return this.traverseMinorTicksPositions((function(e){t.push(e)}),this.options.minorGridLines),t},e.prototype.axisType=function(){return t},e}(Tr);at(Fr.prototype,zr);const Hr=Fr;var Nr=function(t){this.closed=t};function Ur(t){return t<=0?-1:1}Nr.prototype.process=function(t){var e=t.slice(0),i=[],o=this.closed,r=e.length;if(r>2&&(this.removeDuplicates(0,e),r=e.length),r<2||2===r&&e[0].equals(e[1]))return i;var n,s,a=e[0],p=e[1],l=e[2];for(i.push(new q.geometry.Segment(a));a.equals(e[r-1]);)o=!0,e.pop(),r--;if(2===r){var h=this.tangent(a,p,F,H);return Wt(i).controlOut(this.firstControlPoint(h,a,p,F,H)),i.push(new q.geometry.Segment(p,this.secondControlPoint(h,a,p,F,H))),i}if(o){a=e[r-1],p=e[0],l=e[1];var c=this.controlPoints(a,p,l);n=c[1],s=c[0]}else{var u=this.tangent(a,p,F,H);n=this.firstControlPoint(u,a,p,F,H)}for(var d=n,f=0;f<=r-3;f++)if(this.removeDuplicates(f,e),f+3<=(r=e.length)){a=e[f],p=e[f+1],l=e[f+2];var g=this.controlPoints(a,p,l);Wt(i).controlOut(d),d=g[1];var y=g[0];i.push(new q.geometry.Segment(p,y))}if(o){a=e[r-2],p=e[r-1],l=e[0];var v=this.controlPoints(a,p,l);Wt(i).controlOut(d),i.push(new q.geometry.Segment(p,v[0])),Wt(i).controlOut(v[1]),i.push(new q.geometry.Segment(l,s))}else{var m=this.tangent(p,l,F,H);Wt(i).controlOut(d),i.push(new q.geometry.Segment(l,this.secondControlPoint(m,p,l,F,H)))}return i},Nr.prototype.removeDuplicates=function(t,e){for(;e[t+1]&&(e[t].equals(e[t+1])||e[t+1].equals(e[t+2]));)e.splice(t+1,1)},Nr.prototype.invertAxis=function(t,e,i){var o=!1;if(t.x===e.x)o=!0;else if(e.x===i.x)(e.y<i.y&&t.y<=e.y||i.y<e.y&&e.y<=t.y)&&(o=!0);else{var r=this.lineFunction(t,e),n=this.calculateFunction(r,i.x);t.y<=e.y&&i.y<=n||e.y<=t.y&&i.y>=n||(o=!0)}return o},Nr.prototype.isLine=function(t,e,i){var o=this.lineFunction(t,e),r=this.calculateFunction(o,i.x);return t.x===e.x&&e.x===i.x||Zt(r,1)===Zt(i.y,1)},Nr.prototype.lineFunction=function(t,e){var i=(e.y-t.y)/(e.x-t.x);return[t.y-i*t.x,i]},Nr.prototype.controlPoints=function(t,e,i){var o,r=F,n=H,s=!1,a=!1;if(this.isLine(t,e,i))o=this.tangent(t,e,F,H);else{var p={x:this.isMonotonicByField(t,e,i,F),y:this.isMonotonicByField(t,e,i,H)};p.x&&p.y?(o=this.tangent(t,i,F,H),s=!0):(this.invertAxis(t,e,i)&&(r=H,n=F),p[r]?o=0:(o=.01*(i[n]<t[n]&&t[n]<=e[n]||t[n]<i[n]&&e[n]<=t[n]?Ur((i[n]-t[n])*(e[r]-t[r])):-Ur((i[r]-t[r])*(e[n]-t[n]))),a=!0))}var l=this.secondControlPoint(o,t,e,r,n);if(a){var h=r;r=n,n=h}var c=this.firstControlPoint(o,e,i,r,n);return s&&(this.restrictControlPoint(t,e,l,o),this.restrictControlPoint(e,i,c,o)),[l,c]},Nr.prototype.restrictControlPoint=function(t,e,i,o){t.y<e.y?e.y<i.y?(i.x=t.x+(e.y-t.y)/o,i.y=e.y):i.y<t.y&&(i.x=e.x-(e.y-t.y)/o,i.y=t.y):i.y<e.y?(i.x=t.x-(t.y-e.y)/o,i.y=e.y):t.y<i.y&&(i.x=e.x+(t.y-e.y)/o,i.y=t.y)},Nr.prototype.tangent=function(t,e,i,o){var r=e[i]-t[i],n=e[o]-t[o];return 0===r?0:n/r},Nr.prototype.isMonotonicByField=function(t,e,i,o){return i[o]>e[o]&&e[o]>t[o]||i[o]<e[o]&&e[o]<t[o]},Nr.prototype.firstControlPoint=function(t,e,i,o,r){var n=e[o],s=.333*(i[o]-n);return this.point(n+s,e[r]+s*t,o,r)},Nr.prototype.secondControlPoint=function(t,e,i,o,r){var n=e[o],s=i[o],a=.333*(s-n);return this.point(s-a,i[r]-a*t,o,r)},Nr.prototype.point=function(t,e,i,o){var r=new q.geometry.Point;return r[i]=t,r[o]=e,r},Nr.prototype.calculateFunction=function(t,e){for(var i=t.length,o=0,r=0;r<i;r++)o+=Math.pow(e,r)*t[r];return o};const Gr=Nr;var Wr=function(t){this._axis=t,this.options=t.options};Wr.prototype.value=function(t){var e=this._axis;return e.getCategory?e.getCategory(t):e.getValue(t)},Wr.prototype.slot=function(t,e,i){return void 0===i&&(i=!0),this._axis.slot(t,e,i)},Wr.prototype.range=function(){return this._axis.range()},Wr.prototype.valueRange=function(){return this._axis.valueRange()};const Xr=Wr;function Yr(t,e){for(var i=0;i<e.length;i++)if(e[i].options.name===t)return e[i].prepareUserOptions(),new Xr(e[i])}var qr=function(t){this.visual=t.visual,this.chartsVisual=t.chartContainer.visual,this._pane=t};qr.prototype.findAxisByName=function(t){return Yr(t,this._pane.axes)};const Zr=qr,Qr=function(t){this._plotArea=t,this.visual=t.visual,this.backgroundVisual=t._bgVisual};function Kr(t){for(var e=t.length,i=0,o=0;o<e;o++)K(t[o])&&i++;return i}var $r={min:function(t){for(var e=t.length,i=P,o=0;o<e;o++){var r=t[o];K(r)&&(i=Math.min(i,r))}return i===P?t[0]:i},max:function(t){for(var e=t.length,i=T,o=0;o<e;o++){var r=t[o];K(r)&&(i=Math.max(i,r))}return i===T?t[0]:i},sum:function(t){for(var e=t.length,i=0,o=0;o<e;o++){var r=t[o];K(r)&&(i+=r)}return i},sumOrNull:function(t){var e=null;return Kr(t)&&(e=$r.sum(t)),e},count:function(t){for(var e=t.length,i=0,o=0;o<e;o++){null!=t[o]&&i++}return i},avg:function(t){var e=Kr(t),i=t[0];return e>0&&(i=$r.sum(t)/e),i},first:function(t){for(var e=t.length,i=0;i<e;i++){var o=t[i];if(null!=o)return o}return t[0]}};const Jr=$r;function tn(t,e){return null===e?e:_t(t)(e)}var en=function(){this._valueFields={},this._otherFields={},this._nullValue={},this._undefinedValue={}};en.prototype.register=function(t,e,i){void 0===e&&(e=[z]),void 0===i&&(i={});for(var o=0;o<t.length;o++){var r=t[o];this._valueFields[r]=e,this._otherFields[r]=i,this._nullValue[r]=this._makeValue(e,null),this._undefinedValue[r]=this._makeValue(e,void 0)}},en.prototype.canonicalFields=function(t){return this.valueFields(t).concat(this.otherFields(t))},en.prototype.valueFields=function(t){return this._valueFields[t.type]||[z]},en.prototype.otherFields=function(t){return this._otherFields[t.type]||[z]},en.prototype.bindPoint=function(t,e,i){var o,r,n=t.data,s=void 0!==i?i:n[e],a={valueFields:{value:s}},p=this.valueFields(t),l=this._otherFields[t.type];if(null===s)r=this._nullValue[t.type];else if(void 0===s)r=this._undefinedValue[t.type];else if(Array.isArray(s)){var h=s.slice(p.length);r=this._bindFromArray(s,p),o=this._bindFromArray(h,l)}else if("object"==typeof s){var c=this.sourceFields(t,p),u=this.sourceFields(t,l);r=this._bindFromObject(s,p,c),o=this._bindFromObject(s,l,u)}return void 0!==r&&(1===p.length?a.valueFields.value=r[p[0]]:a.valueFields=r),a.fields=o||{},a},en.prototype._makeValue=function(t,e){for(var i={},o=t.length,r=0;r<o;r++)i[t[r]]=e;return i},en.prototype._bindFromArray=function(t,e){var i={};if(e)for(var o=Math.min(e.length,t.length),r=0;r<o;r++)i[e[r]]=t[r];return i},en.prototype._bindFromObject=function(t,e,i){void 0===i&&(i=e);var o={};if(e)for(var r=e.length,n=0;n<r;n++){var s=e[n],a=i[n];null!==a&&(o[s]=tn(a,t))}return o},en.prototype.sourceFields=function(t,e){var i=[];if(e)for(var o=e.length,r=0;r<o;r++){var n=e[r],s=n===z?"field":n+"Field";i.push(null!==t[s]?t[s]||n:null)}return i},en.current=new en;const on=en;var rn=/percent(?:\w*)\((\d+)\)/,nn=new RegExp("^stddev(?:\\((\\d+(?:\\.\\d+)?)\\))?$"),sn=function(t,e,i){this.initGlobalRanges(t,e,i)};sn.prototype.initGlobalRanges=function(t,e,i){var o=e.data,r=nn.exec(t);if(r){this.valueGetter=this.createValueGetter(e,i);var n=this.getAverage(o),s=this.getStandardDeviation(o,n,!1),a=r[1]?parseFloat(r[1]):1,p={low:n.value-s*a,high:n.value+s*a};this.globalRange=function(){return p}}else if(t.indexOf&&t.indexOf("stderr")>=0){this.valueGetter=this.createValueGetter(e,i);var l=this.getStandardError(o,this.getAverage(o));this.globalRange=function(t){return{low:t-l,high:t+l}}}},sn.prototype.createValueGetter=function(t,e){var i,o=t.data,r=on.current,n=r.valueFields(t),s=jt(o[0])?o[0]:{};return G(s)?i=_t("["+(e?n.indexOf(e):0)+"]"):K(s)?i=_t():typeof s===O&&(i=_t(r.sourceFields(t,n)[n.indexOf(e)])),i},sn.prototype.getErrorRange=function(t,e){var i,o,r;if(!jt(e))return null;if(this.globalRange)return this.globalRange(t);if(G(e))i=t-e[0],o=t+e[1];else if(K(r=parseFloat(e)))i=t-r,o=t+r;else{if(!(r=rn.exec(e)))throw new Error("Invalid ErrorBar value: "+e);var n=t*(parseFloat(r[1])/100);i=t-Math.abs(n),o=t+Math.abs(n)}return{low:i,high:o}},sn.prototype.getStandardError=function(t,e){return this.getStandardDeviation(t,e,!0)/Math.sqrt(e.count)},sn.prototype.getStandardDeviation=function(t,e,i){for(var o=t.length,r=i?e.count-1:e.count,n=0,s=0;s<o;s++){var a=this.valueGetter(t[s]);K(a)&&(n+=Math.pow(a-e.value,2))}return Math.sqrt(n/r)},sn.prototype.getAverage=function(t){for(var e=t.length,i=0,o=0,r=0;r<e;r++){var n=this.valueGetter(t[r]);K(n)&&(i+=n,o++)}return{value:i/o,count:o}};const an=sn;var pn=q.support.browser||{},ln=600,hn="fadeIn",cn=.8,un=pn.msie?.001:0,dn="errorLow",fn="errorHigh",gn="zero",yn="interpolate",vn="above",mn="below",xn="smooth",bn="step",_n="area",wn="bar",kn="boxPlot",An="bubble",Sn="bullet",Cn="candlestick",Pn="column",Tn="donut",Mn="funnel",On="pyramid",Ln="heatmap",Bn="horizontalWaterfall",In="line",En="ohlc",Rn="pie",Vn="polarArea",zn="polarLine",jn="polarScatter",Dn="radarArea",Fn="radarColumn",Hn="radarLine",Nn="rangeArea",Un="rangeBar",Gn="rangeColumn",Wn="scatter",Xn="scatterLine",Yn="verticalArea",qn="verticalBoxPlot",Zn="verticalBullet",Qn="verticalLine",Kn="verticalRangeArea",$n="waterfall",Jn=[wn,Pn,En,Cn,kn,qn,Sn,Gn,Un,$n,Bn],ts="exponentialTrendline",es="linearTrendline",is="logarithmicTrendline",os="movingAverageTrendline",rs="polynomialTrendline",ns="powerTrendline",ss=[ts,es,is,os,rs,ns],as="legendItemClick",ps="seriesClick",ls="seriesHover",hs="seriesOver",cs="seriesLeave",us="plotAreaHover",ds="plotAreaLeave",fs="drag",gs="dragEnd",ys="dragStart",vs="zoomStart",ms="zoom",xs="zoomEnd",bs="selectStart",_s="select",ws="selectEnd",ks="showTooltip",As="hideTooltip",Ss="graphics-symbol",Cs="k-chart-point",Ps="Point",Ts="log",Ms="category",Os="insideEnd",Ls="outsideEnd",Bs="wheel",Is="drilldown",Es="pattern",Rs=function(t){function e(e,i,o,r,n,s){t.call(this,s),this.low=e,this.high=i,this.isVertical=o,this.chart=r,this.series=n}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reflow=function(t){var e,i=this.options.endCaps,o=this.isVertical,r=this.getAxis().getSlot(this.low,this.high),n=t.center(),s=this.getCapsWidth(t,o),a=o?n.x:n.y,p=a-s,l=a+s;o?(e=[new xi(n.x,r.y1),new xi(n.x,r.y2)],i&&e.push(new xi(p,r.y1),new xi(l,r.y1),new xi(p,r.y2),new xi(l,r.y2)),this.box=new wi(p,r.y1,l,r.y2)):(e=[new xi(r.x1,n.y),new xi(r.x2,n.y)],i&&e.push(new xi(r.x1,p),new xi(r.x1,l),new xi(r.x2,p),new xi(r.x2,l)),this.box=new wi(r.x1,p,r.x2,l)),this.linePoints=e},e.prototype.getCapsWidth=function(t,e){var i=e?t.width():t.height();return Math.min(Math.floor(i/2),4)||4},e.prototype.createVisual=function(){var t=this,e=this.options,i=e.visual;i?this.visual=i({low:this.low,high:this.high,rect:this.box.toRect(),sender:this.getSender(),options:{endCaps:e.endCaps,color:e.color,line:e.line},createVisual:function(){t.createDefaultVisual();var e=t.visual;return delete t.visual,e}}):this.createDefaultVisual()},e.prototype.createDefaultVisual=function(){var e=this.options,i=this.linePoints,o={stroke:{color:e.color,width:e.line.width,dashType:e.line.dashType}};t.prototype.createVisual.call(this);for(var r=0;r<i.length;r+=2){var n=new q.drawing.Path(o).moveTo(i[r].x,i[r].y).lineTo(i[r+1].x,i[r+1].y);Z(n),this.visual.append(n)}},e}(Li);te(Rs,{animation:{type:hn,delay:ln},endCaps:!0,line:{width:2},zIndex:1});const Vs=Rs;var zs=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getAxis=function(){return this.chart.seriesValueAxis(this.series)},e}(Vs);const js=zs;function Ds(t){for(var e=0;e<t.length;e++)if(jt(t[e].zIndex))return!0}function Fs(t,e){null!==e&&t.push(e)}function Hs(t){return Kr(t)===t.length}function Ns(t,e,i){var o=e.visible;if(jt(o))return o;var r=t.pointVisibility;return r?r[i]:void 0}function Us(t){for(var e=t.data,i=[],o=0,r=0,n=0;n<e.length;n++){var s=on.current.bindPoint(t,n),a=s.valueFields.value;$(a)&&(a=parseFloat(a)),K(a)?(s.visible=!1!==Ns(t,s.fields,n),s.value=Math.abs(a),i.push(s),s.visible&&(o+=s.value),0!==a&&r++):i.push(null)}return{total:o,points:i,count:r}}function Gs(t){for(var e=t.length,i=0,o=0;o<e;o++)i=Math.max(i,t[o].data.length);return i}function Ws(t,e){return t&&e?t.toLowerCase()===e.toLowerCase():t===e}var Xs=5;function Ys(t,e,i,o){void 0===i&&(i={}),void 0===o&&(o=!1);var r=i.defaults=i.defaults||{},n=i.depth=i.depth||0,s=!1;if(i.excluded=i.excluded||[],n>Xs)return null;for(var a in t)if(!Ct(a,i.excluded)&&Ae(t,a)){var p=t[a];ot(p)?(s=!0,o||(t[a]=Kt(p(e),r[a]))):pt(p)&&(o||(i.defaults=r[a]),i.depth++,s=Ys(p,e,i,o)||s,i.depth--)}return s}function qs(t,e){for(var i=[],o=[].concat(e),r=0;r<t.length;r++){var n=t[r];Ct(n.type,o)&&i.push(n)}return i}var Zs=new WeakMap;function Qs(t,e,i){if(null===e||"object"!=typeof e)return er(i,t);var o=Zs.get(e);return o||(o=er(i,t),Zs.set(e,o)),o}function Ks(t){var e=t.overlay;return e&&e.gradient&&"none"!==e.gradient}function $s(t){return jt(t)&&null!==t}function Js(t,e){var i=t.type,o=e instanceof Date;return!i&&o||Ws(i,m)}function ta(t){return 1===t.length?t[0]:t}var ea=/area/i;function ia(t,e){var i=on.current.bindPoint(t,null,e).valueFields;for(var o in i)if(J(i[o]))return!0}function oa(t){var e,i,o=t.start,r=t.dir,n=t.min,s=t.max,a=t.getter,p=t.hasItem,l=t.series,h=o;do{p(h+=r)&&(e=ia(l,(i=a(h)).item))}while(n<=h&&h<=s&&!e);if(e)return i}function ra(t,e,i,o,r){var n=e.min,s=e.max,a=n>0&&n<i,p=s+1<i;if(a||p){var l,h,c,u=function(t){return t.missingValues?t.missingValues:ea.test(t.type)||t.stack?gn:yn}(t);u!==yn?(a&&(l=o(n-1)),p&&(h=o(s+1))):(a&&(l=ia(t,(c=o(n-1)).item)?c:oa({start:n,dir:-1,min:0,max:i-1,getter:o,hasItem:r,series:t})),p&&(h=ia(t,(c=o(s+1)).item)?c:oa({start:s,dir:1,min:0,max:i-1,getter:o,hasItem:r,series:t}))),l&&(t._outOfRangeMinPoint=l),h&&(t._outOfRangeMaxPoint=h)}}function na(t,e){return e.forEach((function(e){var i=e&&e.options,o=e&&(e.box||e.wrapperBox);i&&o&&!1!==i.noclip&&!1!==i.visible&&!i.visual&&t.wrap(o)})),t}var sa=function(t){function e(e,i){t.call(this,i),this.plotArea=e,this.chartService=e.chartService,this.categoryAxis=e.seriesCategoryAxis(i.series[0]),this.valueAxisRanges={},this.points=[],this.categoryPoints=[],this.seriesPoints=[],this.seriesOptions=[],this._evalSeries=[],this.render()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.render=function(){this.traverseDataPoints(this.addValue.bind(this))},e.prototype.pointOptions=function(t,e){var i=this.seriesOptions[e];if(!i){var o=this.pointType().prototype.defaults;this.seriesOptions[e]=i=at({},o,{vertical:!this.options.invertAxes},t)}return i},e.prototype.plotValue=function(t){if(!t)return 0;if(this.options.isStacked100&&K(t.value)){for(var e=t.categoryIx,i=this.categoryPoints[e],o=[],r=0,n=0;n<i.length;n++){var s=i[n];if(s){var a=t.series.stack,p=s.series.stack;if(a&&p&&a.group!==p.group)continue;K(s.value)&&(r+=Math.abs(s.value),o.push(Math.abs(s.value)))}}if(r>0)return t.value/r}return t.value},e.prototype.plotRange=function(t,e){void 0===e&&(e=0);var i=this.categoryPoints[t.categoryIx];if(this.options.isStacked){var o=this.plotValue(t),r=o>=0,n=e,s=!1,a=void 0!==t.series.stack?t.series.stack:this.options.defaultStack,p=function(t){return!0===t||typeof t===O&&!t.group};if(a)for(var l=0;l<i.length;l++){var h=i[l];if(t===h)break;var c=void 0!==h.series.stack?h.series.stack:this.options.defaultStack;if(c&&(typeof a!==R||a===c)&&(!p(a)||p(c))&&(!a.group||a.group===c.group)){var u=this.plotValue(h);(u>=0&&r||u<0&&!r)&&(0!==e&&0===u||(n+=u,o+=u,s=!0,this.options.isStacked100&&(o=Math.min(o,1))))}}return s&&(n-=e),[n,o]}var d=t.series,f=this.seriesValueAxis(d),g=this.categoryAxisCrossingValue(f);return[g,J(t.value)?t.value:g]},e.prototype.stackLimits=function(t,e){for(var i=P,o=T,r=0;r<this.categoryPoints.length;r++){var n=this.categoryPoints[r];if(n)for(var s=0;s<n.length;s++){var a=n[s];if(a&&(a.series.stack===e||a.series.axis===t)){var p=this.plotRange(a,0)[1];void 0!==p&&isFinite(p)&&(o=Math.max(o,p),i=Math.min(i,p))}}}return{min:i,max:o}},e.prototype.updateStackRange=function(){var t=this.options,e=t.isStacked,i=t.series,o={};if(e)for(var r=0;r<i.length;r++){var n=i[r],s=n.axis,a=s+n.stack,p=o[a];if(!p){p=this.stackLimits(s,n.stack);var l=this.errorTotals;l&&(l.negative.length&&(p.min=Math.min(p.min,pe(l.negative).min)),l.positive.length&&(p.max=Math.max(p.max,pe(l.positive).max))),p.min!==P||p.max!==T?o[a]=p:p=null}p&&(this.valueAxisRanges[s]=p)}},e.prototype.addErrorBar=function(t,e,i){var o,r=t.value,n=t.series,s=t.seriesIx,a=t.options.errorBars,p=e.fields[dn],l=e.fields[fn];K(p)&&K(l)?o={low:p,high:l}:a&&void 0!==a.value&&(this.seriesErrorRanges=this.seriesErrorRanges||[],this.seriesErrorRanges[s]=this.seriesErrorRanges[s]||new an(a.value,n,z),o=this.seriesErrorRanges[s].getErrorRange(r,a.value)),o&&(t.low=o.low,t.high=o.high,this.addPointErrorBar(t,i))},e.prototype.addPointErrorBar=function(t,e){var i=!this.options.invertAxes,o=t.options.errorBars,r=t.series,n=t.low,s=t.high;if(this.options.isStacked){var a=this.stackedErrorRange(t,e);n=a.low,s=a.high}else{var p={categoryIx:e,series:r};this.updateRange({value:n},p),this.updateRange({value:s},p)}var l=new js(n,s,i,this,r,o);t.errorBars=[l],t.append(l)},e.prototype.stackedErrorRange=function(t,e){var i=this.plotRange(t,0)[1]-t.value,o=t.low+i,r=t.high+i;return this.errorTotals=this.errorTotals||{positive:[],negative:[]},o<0&&(this.errorTotals.negative[e]=Math.min(this.errorTotals.negative[e]||0,o)),r>0&&(this.errorTotals.positive[e]=Math.max(this.errorTotals.positive[e]||0,r)),{low:o,high:r}},e.prototype.addValue=function(t,e){var i=e.categoryIx,o=e.series,r=e.seriesIx,n=this.categoryPoints[i];n||(this.categoryPoints[i]=n=[]);var s=this.seriesPoints[r];s||(this.seriesPoints[r]=s=[]);var a=this.createPoint(t,e);a&&(Object.assign(a,e),a.owner=this,a.noteText=t.fields.noteText,void 0===a.dataItem&&(a.dataItem=o.data[i]),this.addErrorBar(a,t,i)),this.points.push(a),s.push(a),n.push(a),this.updateRange(t.valueFields,e)},e.prototype.evalPointOptions=function(t,e,i){var o=i.categoryIx,r=i.category,n=i.series,s=i.seriesIx,a={defaults:n._defaults,excluded:["data","aggregate","_events","tooltip","content","template","visual","toggle","_outOfRangeMinPoint","_outOfRangeMaxPoint","drilldownSeriesFactory","ariaTemplate","ariaContent"]},p=this._evalSeries[s];void 0===p&&(this._evalSeries[s]=p=Ys(t,{},a,!0));var l=t;return p&&Ys(l=at({},l),{value:e,category:r,index:o,series:n,dataItem:n.data[o]},a),l},e.prototype.updateRange=function(t,e){var i=e.series.axis,o=t.value,r=this.valueAxisRanges[i];isFinite(o)&&null!==o&&((r=this.valueAxisRanges[i]=r||{min:P,max:T}).min=Math.min(r.min,o),r.max=Math.max(r.max,o))},e.prototype.seriesValueAxis=function(t){var e=this.plotArea,i=t.axis,o=i?e.namedValueAxes[i]:e.valueAxis;if(!o)throw new Error("Unable to locate value axis with name "+i);return o},e.prototype.reflow=function(t){var e=this,i=this.categorySlots=[],o=this.points,r=this.categoryAxis,n=0;this.traverseDataPoints((function(t,s){var a=s.categoryIx,p=s.series,l=e.seriesValueAxis(p),h=o[n++],c=i[a];if(c||(i[a]=c=e.categorySlot(r,a,l)),h){var u=e.plotRange(h,l.startValue()),d=e.valueSlot(l,u);if(d){var f=e.pointSlot(c,d);h.aboveAxis=e.aboveAxis(h,l),h.stackValue=u[1],e.options.isStacked100&&(h.percentage=e.plotValue(h)),e.reflowPoint(h,f)}else h.visible=!1}})),this.reflowCategories(i),!this.options.clip&&this.options.limitPoints&&this.points.length&&this.limitPoints(),this.box=t},e.prototype.valueSlot=function(t,e){return t.getSlot(e[0],e[1],!this.options.clip)},e.prototype.limitPoints=function(){for(var t=this.categoryPoints,e=t[0].concat(Wt(t)),i=0;i<e.length;i++)e[i]&&this.limitPoint(e[i])},e.prototype.limitPoint=function(t){var e=this.categoryAxis.limitSlot(t.box);e.equals(t.box)||t.reflow(e)},e.prototype.aboveAxis=function(t,e){var i=this.categoryAxisCrossingValue(e),o=t.value;return e.options.reverse?o<i:o>=i},e.prototype.categoryAxisCrossingValue=function(t){var e=this.categoryAxis,i=t.options;return[].concat(i.axisCrossingValues||i.axisCrossingValue)[e.axisIndex||0]||0},e.prototype.reflowPoint=function(t,e){t.reflow(e)},e.prototype.reflowCategories=function(){},e.prototype.pointSlot=function(t,e){var i=this.options.invertAxes,o=i?e:t,r=i?t:e;return new wi(o.x1,r.y1,o.x2,r.y2)},e.prototype.categorySlot=function(t,e){return t.getSlot(e)},e.prototype.traverseDataPoints=function(t){for(var e=this.options.series,i=Gs(e),o=e.length,r=0;r<o;r++)this._outOfRangeCallback(e[r],"_outOfRangeMinPoint",r,t);for(var n=0;n<i;n++)for(var s=this.categoryAxis.categoryAt(n),a=0;a<o;a++){var p=e[a];t(this.plotArea.bindPoint(p,n),{category:s,categoryIx:n,categoriesCount:i,series:p,seriesIx:a})}for(var l=0;l<o;l++)this._outOfRangeCallback(e[l],"_outOfRangeMaxPoint",l,t)},e.prototype._outOfRangeCallback=function(t,e,i,o){var r=t[e];if(r){var n=r.categoryIx;o(this.plotArea.bindPoint(t,n,r.item),{category:r.category,categoryIx:n,series:t,seriesIx:i,dataItem:r.item})}},e.prototype.formatPointValue=function(t,e){return null===t.value?"":this.chartService.format.auto(e,t.value)},e.prototype.pointValue=function(t){return t.valueFields.value},e}(Li);te(sa,{series:[],invertAxes:!1,isStacked:!1,clip:!0,limitPoints:!0});const aa=sa;var pa={click:function(t,e){return t.trigger(ps,this.eventArgs(e))},hover:function(t,e){return t.trigger(ls,this.eventArgs(e))},over:function(t,e){return t.trigger(hs,this.eventArgs(e))},out:function(t,e){return t.trigger(cs,this.eventArgs(e))},eventArgs:function(t){return{value:this.value,percentage:this.percentage,stackValue:this.stackValue,category:this.category,series:this.series,dataItem:this.dataItem,runningTotal:this.runningTotal,total:this.total,element:Ut(t),originalEvent:t,point:this}}};const la=pa,ha={createNote:function(){var t=this.options.notes,e=this.noteText||t.label.text;!1!==t.visible&&null!=e&&(this.note=new no({value:this.value,text:e,dataItem:this.dataItem,category:this.category,series:this.series},this.options.notes,this.owner.chartService),this.append(this.note))}};var ca=function(t){function e(e,i){t.call(this,i),this.value=e,this.aboveAxis=Kt(this.options.aboveAxis,!0),this.tooltipTracking=!0,this._id=Le()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initOptions=function(t){this.options=Object.assign({},t)},e.prototype.render=function(){var t=this.options.markers;this._rendered||(this._rendered=!0,t.visible&&t.size&&(this.marker=this.createMarker(),this.append(this.marker)),this.createLabel(),this.createNote(),this.errorBar&&this.append(this.errorBar))},e.prototype.createLabel=function(){var t=this.options.labels;t.visible&&(this.label=this.createLabelElement(t),this.append(this.label))},e.prototype.createLabelElement=function(t){return new $i(this.getLabelText(t),Object.assign({},{align:f,vAlign:f,zIndex:Kt(t.zIndex,this.series.zIndex)},t,{margin:Object.assign({},{left:5,right:5},t.margin)}),this.pointData())},e.prototype.getLabelText=function(t){var e=vt(t);return e?e(this.pointData()):t.format?this.formatValue(t.format):this.value},e.prototype.getAriaLabelText=function(){var t=this.options.labels,e=mt(t);return e?e(this.pointData()):this.getLabelText(t)},e.prototype.markerBorder=function(){var t=this.options.markers,e=t.background,i=Object.assign({},{color:this.color},t.border);return void 0===i.color&&(i.color=new q.Color(e).brightness(cn).toHex()),i},e.prototype.createVisual=function(){},e.prototype.createMarker=function(){var t=this.options.markers;return new ji({type:t.type,width:t.size,height:t.size,rotation:t.rotation,background:t.background,border:this.markerBorder(),opacity:t.opacity,pattern:this.options.pattern,zIndex:Kt(t.zIndex,this.series.zIndex),animation:t.animation,visual:t.visual,accessibilityOptions:Object.assign({},{ariaLabel:this.getAriaLabelText(this.options.labels)},this.options.accessibility)},{dataItem:this.dataItem,value:this.value,series:this.series,category:this.category})},e.prototype.markerBox=function(){return this.marker||(this.marker=this.createMarker(),this.marker.reflow(this._childBox)),this.marker.box},e.prototype.reflow=function(t){var e=this.options,i=this.aboveAxis,o=e.vertical;this.render(),this.box=t;var r=t.clone();if(o?i?r.y1-=r.height():r.y2+=r.height():i?r.x1+=r.width():r.x2-=r.width(),this._childBox=r,this.marker&&this.marker.reflow(r),this.reflowLabel(r),this.errorBars)for(var n=0;n<this.errorBars.length;n++)this.errorBars[n].reflow(r);if(this.note){var s=this.markerBox();if(!e.markers.visible||!e.markers.size){var a=s.center();s=new wi(a.x,a.y,a.x,a.y)}this.note.reflow(s)}},e.prototype.reflowLabel=function(t){var e=this.options,i=this.label,o=e.labels.position;i&&(o=(o=o===vn?V:o)===mn?d:o,i.reflow(t),i.box.alignTo(this.markerBox(),o),i.reflow(i.box))},e.prototype.createHighlight=function(){var t=this.options.highlight.markers,e=this.markerBorder().color,i=this.options.markers,o=i.size+(i.border.width||0)+(t.border.width||0),r=new ji({type:i.type,width:o,height:o,rotation:i.rotation,background:t.color||e,border:{color:t.border.color,width:t.border.width,opacity:Kt(t.border.opacity,1)},opacity:Kt(t.opacity,1)});return r.reflow(this._childBox),r.getElement()},e.prototype.highlightVisual=function(){return(this.marker||{}).visual},e.prototype.highlightVisualArgs=function(){var t,e,i=this.marker;if(i)e=i.paddingBox.toRect(),t=i.visual;else{var o=this.options.markers.size,r=o/2,n=this.box.center();e=new q.geometry.Rect([n.x-r,n.y-r],[o,o])}return{options:this.options,rect:e,visual:t}},e.prototype.createFocusHighlight=function(){var t=this.options.markers,e=this.options.focusHighlight,i=t.size+(t.border.width||0),o=new ji({type:t.type,width:i,height:i,rotation:t.rotation,background:e.color,border:e.border,opacity:e.opacity,padding:e.border.width/2,zIndex:e.zIndex});return o.reflow(this._childBox),o.getElement()},e.prototype.tooltipAnchor=function(){var t=this.markerBox(),e=this.owner.pane.clipBox();if(!e||e.overlaps(t)){var i,o,r=t.x2+5,n=C;return this.aboveAxis?(i=t.y1,o=d):(i=t.y2,o=V),{point:new xi(r,i),align:{horizontal:n,vertical:o}}}},e.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},e.prototype.overlapsBox=function(t){return this.markerBox().overlaps(t)},e.prototype.clipElements=function(){this.options.visible=!1},e.prototype.unclipElements=function(){this.label&&(this.label.options.noclip=!0),this.note&&(this.note.options.noclip=!0)},e.prototype.unclipBox=function(){return na(this.markerBox().clone(),[this.label,this.note])},e.prototype.labelBox=function(){return this.label?this.label.box:new wi},e.prototype.noteBox=function(){return this.note?this.note.box:new wi},e.prototype.pointData=function(){return{dataItem:this.dataItem,category:this.category,value:this.value,percentage:this.percentage,stackValue:this.stackValue,series:this.series}},e.prototype.focusVisual=function(){this.marker&&(this.marker.visual&&this.marker.visual.options.set("id",this._id),this.toggleFocusHighlight(!0))},e.prototype.clearFocusFromVisual=function(){this.marker&&(this.marker.visual&&this.marker.visual.options.set("id",""),this.toggleFocusHighlight(!1))},e.prototype.getIndex=function(){return void 0!==this.categoryIx?this.categoryIx:this.pointIx},e}(Li);ca.prototype.defaults={vertical:!0,markers:{visible:!0,background:j,size:8,type:g,border:{width:2},opacity:1},labels:{visible:!1,position:vn,margin:dt(3),padding:dt(4),animation:{type:hn,delay:ln}},notes:{label:{}},highlight:{markers:{border:{color:"#fff",width:2}},zIndex:100},errorBars:{line:{width:1}},accessibility:{tabIndex:0,role:Ss,className:Cs,ariaRoleDescription:Ps}},at(ca.prototype,la),at(ca.prototype,ha);const ua=ca;var da=function(t){function e(e,i,o){t.call(this),this.linePoints=e,this.series=i,this.seriesIx=o}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.points=function(){return this.toGeometryPoints(this.linePoints)},e.prototype.toGeometryPoints=function(t){for(var e=[],i=0,o=t.length;i<o;i++)t[i]&&!1!==t[i].visible&&e.push(t[i]._childBox.toRect().center());return e},e.prototype.createVisual=function(){var t=this,e=this.series.visual;e?(this.visual=e({points:this.toGeometryPoints(this.linePoints),series:this.series,sender:this.getSender(),createVisual:function(){return t.segmentVisual(),t.visual}}),this.visual&&!jt(this.visual.options.zIndex)&&(this.visual.options.zIndex=this.series.zIndex)):this.segmentVisual()},e.prototype.segmentVisual=function(){var t=this.options,e=this.series,i=e.color,o=e._defaults;ot(i)&&o&&(i=o.color);var r=q.drawing.Path.fromPoints(this.points(),{stroke:{color:i,width:e.width,opacity:e.opacity,dashType:e.dashType},zIndex:e.zIndex});t.closed&&r.close(),this.visual=r},e.prototype.aliasFor=function(t,e){return this.parent.getNearestPoint(e.x,e.y,this.seriesIx)},e}(Li);te(da,{closed:!1});const fa=da;var ga={calculateStepPoints:function(t){for(var e=this.parent.plotArea.seriesCategoryAxis(this.series).options,i=e.justified,o=e.vertical,r=e.reverse,n=o?F:H,s=o?H:F,a=r?2:1,p=a,l=ya(t[0],n,a,s,p),h=[l],c=1;c<t.length;c++){var u=ya(t[c],n,a,s,p);if(l[n]!==u[n]){var d=new q.geometry.Point;d[n]=l[n],d[s]=u[s],h.push(d,u)}l=u}return i?l!==Wt(h)&&h.push(l):h.push(ya(Wt(t),n,a,s,r?1:2)),h}};function ya(t,e,i,o,r){var n=t.box,s=new q.geometry.Point;return s[e]=n[e+i],s[o]=n[o+r],s}const va=ga;var ma=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.points=function(){return this.calculateStepPoints(this.linePoints)},e}(fa);at(ma.prototype,va);const xa=ma;var ba=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.segmentVisual=function(){var t=this.series,e=t._defaults,i=t.color;ot(i)&&e&&(i=e.color);var o=new Gr(this.options.closed).process(this.points()),r=new q.drawing.Path({stroke:{color:i,width:t.width,opacity:t.opacity,dashType:t.dashType},zIndex:t.zIndex});r.segments.push.apply(r.segments,o),this.visual=r},e}(fa);const _a=ba;var wa={renderSegments:function(){var t,e=this.options,i=this.seriesPoints,o=e.series,r=i.length;this._segments=[];for(var n=0;n<r;n++){for(var s=o[n],a=this.sortPoints(i[n]),p=a.length,l=[],h=0;h<p;h++){var c=a[h];c?l.push(c):this.seriesMissingValues(s)!==yn&&(l.length>1&&(t=this.createSegment(l,s,n,t),this._addSegment(t)),l=[])}l.length>1&&(t=this.createSegment(l,s,n,t),this._addSegment(t))}this.children.unshift.apply(this.children,this._segments)},_addSegment:function(t){this._segments.push(t),t.parent=this},sortPoints:function(t){return t},seriesMissingValues:function(t){var e=t.missingValues;return!e&&this.options.isStacked?gn:e||yn},getNearestPoint:function(t,e,i){for(var o,r=new xi(t,e),n=this.seriesPoints[i],s=P,a=0;a<n.length;a++){var p=n[a];if(p&&void 0!==p.value&&null!==p.value&&!1!==p.visible){var l=p.box.center().distanceTo(r);l<s&&(o=p,s=l)}}return o}};const ka=wa;var Aa=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.setup=function(){this._setEnd(this.options.box.x1)},e.prototype.step=function(t){var e=this.options.box;this._setEnd(Pt(e.x1,e.x2,t))},e.prototype._setEnd=function(t){var e=this.element,i=e.segments,o=i[1].anchor(),r=i[2].anchor();e.suspend(),o.setX(t),e.resume(),r.setX(t)},e}(q.drawing.Animation);te(Aa,{duration:ln}),q.drawing.AnimationFactory.current.register("clip",Aa);const Sa=Aa,Ca={createAnimation:function(){var t=this.getRoot(),e=(t&&t.options||{}).transitions;if(t&&!1!==e){var i=this.parent&&this.parent.clipBox||t.size(),o=q.drawing.Path.fromRect(i.toRect()),r=e&&!0!==e?e.loading:e;this.visual.clip(o),this.animation=new Sa(o,Object.assign({},{box:i},r)),Ds(this.options.series)&&this._setChildrenAnimation(o)}},_setChildrenAnimation:function(t){for(var e=this.animationPoints(),i=0;i<e.length;i++){var o=e[i];o&&o.visual&&jt(o.visual.options.zIndex)&&o.visual.clip(t)}}};var Pa=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.render=function(){t.prototype.render.call(this),this.updateStackRange(),this.renderSegments()},e.prototype.pointType=function(){return ua},e.prototype.createPoint=function(t,e){var i=e.series,o=e.seriesIx,r=this.seriesMissingValues(i),n=t.valueFields.value;if(null==n){if(r!==gn)return null;n=0}var s=this.pointOptions(i,o);s=this.evalPointOptions(s,n,e);var a=t.fields.color||i.color;ot(i.color)&&(a=s.color);var p=new ua(n,s);return p.color=a,this.append(p),p},e.prototype.plotRange=function(t){var e=this.plotValue(t);if(this.options.isStacked)for(var i=t.categoryIx,o=this.categoryPoints[i],r=0;r<o.length;r++){var n=o[r];if(t===n)break;e+=this.plotValue(n),this.options.isStacked100&&(e=Math.min(e,1))}return[e,e]},e.prototype.createSegment=function(t,e,i){var o=e.style;return new(o===bn?xa:o===xn?_a:fa)(t,e,i)},e.prototype.animationPoints=function(){for(var t=this.points,e=[],i=0;i<t.length;i++)e.push((t[i]||{}).marker);return e.concat(this._segments)},e.prototype.supportsPointInactiveOpacity=function(){return!1},e}(aa);at(Pa.prototype,ka,Ca);const Ta=Pa;var Ma=function(t){function e(e,i,o,r,n){t.call(this,e,i,o),this.prevSegment=r,this.stackPoints=n}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createVisual=function(){var t=this.series,e=t._defaults,i=t.line||{},o=t.color;ot(o)&&e&&(o=e.color),this.visual=new q.drawing.Group({zIndex:t.zIndex}),this.createFill({fill:Ii(t.pattern,{color:o,opacity:t.opacity}),stroke:null}),i.width>0&&!1!==i.visible&&this.createStroke({stroke:at({color:o,opacity:t.opacity,lineCap:"butt"},i)})},e.prototype.strokeSegments=function(){var t=this._strokeSegments;return t||(t=this._strokeSegments=this.createStrokeSegments()),t},e.prototype.createStrokeSegments=function(){return this.segmentsFromPoints(this.points())},e.prototype.stackSegments=function(){return this.prevSegment?this.prevSegment.createStackSegments(this.stackPoints):this.createStackSegments(this.stackPoints)},e.prototype.createStackSegments=function(t){return this.segmentsFromPoints(this.toGeometryPoints(t)).reverse()},e.prototype.segmentsFromPoints=function(t){return t.map((function(t){return new q.geometry.Segment(t)}))},e.prototype.createStroke=function(t){var e=new q.drawing.Path(t);e.segments.push.apply(e.segments,this.strokeSegments()),this.visual.append(e)},e.prototype.hasStackSegment=function(){return this.prevSegment||this.stackPoints&&this.stackPoints.length},e.prototype.createFill=function(t){var e=this.strokeSegments(),i=e.slice(0),o=this.hasStackSegment();if(o){var r=this.stackSegments();Vt(i,r)}var n=new q.drawing.Path(t);n.segments.push.apply(n.segments,i),!o&&e.length>1&&this.fillToAxes(n),this.visual.append(n)},e.prototype.fillToAxes=function(t){var e=this.parent,i=e.options.invertAxes,o=e.seriesValueAxis(this.series),r=e.categoryAxisCrossingValue(o),n=o.getSlot(r,r,!0),s=this.strokeSegments(),a=s[0].anchor(),p=Wt(s).anchor(),l=i?n.x1:n.y1;i?t.lineTo(l,p.y).lineTo(l,a.y):t.lineTo(p.x,l).lineTo(a.x,l)},e}(fa);const Oa=Ma;var La=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createStrokeSegments=function(){return this.segmentsFromPoints(this.calculateStepPoints(this.linePoints))},e.prototype.createStackSegments=function(t){return this.segmentsFromPoints(this.calculateStepPoints(t)).reverse()},e}(Oa);at(La.prototype,va);const Ba=La;var Ia=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createStrokeSegments=function(){var t=new Gr(this.options.closed),e=this.points();return t.process(e)},e.prototype.createStackSegments=function(){for(var t=this.strokeSegments(),e=[],i=t.length-1;i>=0;i--){var o=t[i];e.push(new q.geometry.Segment(o.anchor(),o.controlOut(),o.controlIn()))}return e},e}(Oa);const Ea=Ia;var Ra=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createSegment=function(t,e,i,o){var r,n,s=this.options.isStacked,a=(e.line||{}).style;return s&&i>0&&o&&("gap"!==this.seriesMissingValues(e)?(n=o.linePoints,r=o):n=this._gapStackPoints(t,i,a)),new(a===bn?Ba:a===xn?Ea:Oa)(t,e,i,r,n)},e.prototype.reflow=function(e){t.prototype.reflow.call(this,e);var i=this._stackPoints;if(i)for(var o=0;o<i.length;o++){var r=i[o],n=this.categoryAxis.getSlot(r.categoryIx);r.reflow(n)}},e.prototype._gapStackPoints=function(t,e,i){var o=this.seriesPoints,r=t[0].categoryIx,n=t.length;r<0&&(r=0,n--);var s=r+n,a=this.seriesOptions[0]._outOfRangeMinPoint?1:0,p=[];this._stackPoints=this._stackPoints||[];for(var l=r;l<s;l++){var h=l+a,c=e,u=void 0;do{u=o[--c][h]}while(c>0&&!u);if(u)i!==bn&&l>r&&!o[c][h-1]&&p.push(this._previousSegmentPoint(l,h,h-1,c)),p.push(u),i!==bn&&l+1<s&&!o[c][h+1]&&p.push(this._previousSegmentPoint(l,h,h+1,c));else{var d=this._createGapStackPoint(l);this._stackPoints.push(d),p.push(d)}}return p},e.prototype._previousSegmentPoint=function(t,e,i,o){for(var r,n=this.seriesPoints,s=o;s>0&&!r;)r=n[--s][i];return r?r=n[s][e]:(r=this._createGapStackPoint(t),this._stackPoints.push(r)),r},e.prototype._createGapStackPoint=function(t){var e=this.pointOptions({},0),i=new ua(0,e);return i.categoryIx=t,i.series={},i},e.prototype.seriesMissingValues=function(t){return t.missingValues||gn},e.prototype.supportsPointInactiveOpacity=function(){return!1},e}(Ta);const Va=Ra;var za=function(){this.axisRanges={}};za.prototype.update=function(t){var e=this.axisRanges;for(var i in t){var o=t[i],r=e[i];e[i]=r=r||{min:P,max:T},r.min=Math.min(r.min,o.min),r.max=Math.max(r.max,o.max)}},za.prototype.reset=function(t){this.axisRanges[t]=void 0},za.prototype.query=function(t){return this.axisRanges[t]};const ja=za;var Da=function(t){function e(e,i,o){t.call(this,i),this.textBox=new $i(e,this.options,o),this.append(this.textBox)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createVisual=function(){this.textBox.options.noclip=this.options.noclip},e.prototype.reflow=function(t){var e=this.options,i=e.vertical,o=e.aboveAxis,r=this.children[0],n=r.options,s=r.box,a=r.options.padding,p=t;if(n.align=i?f:C,n.vAlign=i?V:f,e.position===Os)i?(n.vAlign=V,!o&&s.height()<t.height()&&(n.vAlign=d)):n.align=o?B:C;else if(e.position===f)n.vAlign=f,n.align=f;else if("insideBase"===e.position)i?n.vAlign=o?d:V:n.align=o?C:B;else if(e.position===Ls)if(i)if(o){var l=(s.width()-t.width()-a.left-a.right)/2;p=new wi(t.x1-l,t.y1-s.height(),t.x2+l,t.y1)}else p=new wi(t.x1,t.y2,t.x2,t.y2+s.height());else n.align=f,p=o?new wi(t.x2,t.y1,t.x2+s.width(),t.y2):new wi(t.x1-s.width(),t.y1,t.x1,t.y2);e.rotation||(i?a.left=a.right=(p.width()-r.contentBox.width())/2:a.top=a.bottom=(p.height()-r.contentBox.height())/2),r.reflow(p)},e.prototype.alignToClipBox=function(t){var e=this.options.vertical?H:F,i=e+"1",o=e+"2",r=this.children[0],n=this.parent.box;if(n[i]<t[i]||t[o]<n[o]){var s=r.paddingBox.clone();s[i]=Math.max(n[i],t[i]),s[o]=Math.min(n[o],t[o]),this.reflow(s)}},e}(Li);te(Da,{position:Ls,margin:dt(3),padding:dt(4),color:u,background:"",border:{width:1,color:""},aboveAxis:!0,vertical:!1,animation:{type:hn,delay:ln},zIndex:2});const Fa=Da,Ha={addAccessibilityAttributesToVisual:function(){this._id=this._id||Be();var t=Object.assign({},{ariaLabel:this.getAriaLabelText()},this.options.accessibility);Vi(this.visual,t)},getAriaLabelText:function(){var t=this.options.labels,e=mt(t);return e?e(this.pointData()):this.getLabelText(t)},focusVisual:function(){this.visual.options.set("id",this._id),this.toggleFocusHighlight(!0)},clearFocusFromVisual:function(){this.visual.options.set("id",""),this.toggleFocusHighlight(!1)}};var Na=function(t){function e(e,i){t.call(this),this.options=i,this.color=i.color||j,this.aboveAxis=Kt(this.options.aboveAxis,!0),this.value=e}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.render=function(){this._rendered||(this._rendered=!0,this.createLabel(),this.createNote(),this.errorBar&&this.append(this.errorBar))},e.prototype.createLabel=function(){var t=this.options.labels;t.visible&&(this.label=this.createLabelElement(t),this.append(this.label))},e.prototype.createLabelElement=function(t){return new Fa(this.getLabelText(t),at({vertical:this.options.vertical},t),this.pointData())},e.prototype.getLabelText=function(t){var e=vt(t);return e?e(this.pointData()):this.formatValue(t.format)},e.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},e.prototype.reflow=function(t){this.render();var e=this.label;if(this.box=t,e&&(e.options.aboveAxis=this.aboveAxis,e.reflow(t)),this.note&&this.note.reflow(t),this.errorBars)for(var i=0;i<this.errorBars.length;i++)this.errorBars[i].reflow(t)},e.prototype.createVisual=function(){var e=this,i=this.box,o=this.options,r=o.visual;if(!1!==this.visible)if(t.prototype.createVisual.call(this),this.addAccessibilityAttributesToVisual(),r){var n=this.rectVisual=r({category:this.category,dataItem:this.dataItem,value:this.value,sender:this.getSender(),series:this.series,percentage:this.percentage,stackValue:this.stackValue,runningTotal:this.runningTotal,total:this.total,rect:i.toRect(),createVisual:function(){var t=new q.drawing.Group;return e.createRect(t),t},options:o});n&&this.visual.append(n)}else i.width()>0&&i.height()>0&&this.createRect(this.visual)},e.prototype.createRect=function(t){var e=this.options,i=e.border,o=jt(i.opacity)?i.opacity:e.opacity,r=this.box.toRect();r.size.width=Math.round(r.size.width);var n=this.rectVisual=q.drawing.Path.fromRect(r,{fill:Ii(e.pattern,{color:this.color,opacity:e.opacity}),stroke:{color:this.getBorderColor(),width:i.width,opacity:o,dashType:i.dashType}}),s=this.box.width(),a=this.box.height();if((e.vertical?s:a)>6&&(Z(n),(s<1||a<1)&&(n.options.stroke.lineJoin="round")),t.append(n),Ks(e)){var p=this.createGradientOverlay(n,{baseColor:this.color},at({end:e.vertical?void 0:[0,1]},e.overlay));t.append(p)}},e.prototype.createHighlight=function(t){return Z(q.drawing.Path.fromRect(this.box.toRect(),t))},e.prototype.highlightVisual=function(){return this.rectVisual},e.prototype.highlightVisualArgs=function(){return{options:this.options,rect:this.box.toRect(),visual:this.rectVisual}},e.prototype.createFocusHighlight=function(t){var e=this.options.focusHighlight.border.width;return Z(q.drawing.Path.fromRect(this.box.pad(e/2).toRect(),t))},e.prototype.getBorderColor=function(){var t=this.color,e=this.options.border,i=e._brightness||cn,o=e.color;return jt(o)||(o=new q.Color(t).brightness(i).toHex()),o},e.prototype.tooltipAnchor=function(){var t,e,i=this,o=i.options,r=i.box,n=i.aboveAxis,s=this.owner.pane.clipBox()||r,a=C,p=V;if(o.vertical)t=Math.min(r.x2,s.x2)+5,n?e=Math.max(r.y1,s.y1):(e=Math.min(r.y2,s.y2),p=d);else{var l=Math.max(r.x1,s.x1),h=Math.min(r.x2,s.x2);o.isStacked?(p=d,n?(a=B,t=h):t=l,e=Math.max(r.y1,s.y1)-5):(n?t=h+5:(t=l-5,a=B),e=Math.max(r.y1,s.y1))}return{point:new xi(t,e),align:{horizontal:a,vertical:p}}},e.prototype.overlapsBox=function(t){return this.box.overlaps(t)},e.prototype.unclipBox=function(){var t=this.label&&this.label.textBox;return na(this.box.clone(),[t,this.note])},e.prototype.labelBox=function(){var t=this.label&&this.label.textBox;return t?t.box:new wi},e.prototype.noteBox=function(){return this.note?this.note.box:new wi},e.prototype.pointData=function(){return{dataItem:this.dataItem,category:this.category,value:this.value,percentage:this.percentage,stackValue:this.stackValue,runningTotal:this.runningTotal,total:this.total,series:this.series}},e.prototype.getIndex=function(){return this.categoryIx},e}(Li);at(Na.prototype,la),at(Na.prototype,ha),at(Na.prototype,Ha),Na.prototype.defaults={border:{width:1},vertical:!0,overlay:{gradient:"glass"},labels:{visible:!1,format:"{0}"},opacity:1,notes:{label:{}},accessibility:{role:Ss,className:Cs,ariaRoleDescription:Ps}};const Ua=Na;function Ga(t,e){t.forEach(e)}function Wa(t,e){for(var i=t.length,o=i-1;o>=0;o--)e(t[o],o-i-1)}var Xa=function(t){function e(e){t.call(this,e),this.forEach=e.rtl?Wa:Ga}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reflow=function(t){var e=this.options,i=e.vertical,o=e.gap,r=e.spacing,n=this.children,s=n.length,a=i?H:F,p=s+o+r*(s-1),l=(i?t.height():t.width())/p,h=t[a+1]+l*(o/2);this.forEach(n,(function(e,i){var o=(e.box||t).clone();o[a+1]=h,o[a+2]=h+l,e.reflow(o),i<s-1&&(h+=l*r),h+=l}))},e}(Li);te(Xa,{vertical:!1,gap:0,spacing:0});const Ya=Xa;var qa=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reflow=function(t){for(var e=this.options.vertical?F:H,i=this.children,o=i.length,r=this.box=new wi,n=0;n<o;n++){var s=i[n];if(!1!==s.visible){var a=s.box.clone();a.snapTo(t,e),0===n&&(r=this.box=a.clone()),s.reflow(a),r.wrap(a)}}},e}(Li);te(qa,{vertical:!0});const Za=qa;var Qa=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.render=function(){t.prototype.render.call(this),this.updateStackRange()},e.prototype.pointType=function(){return Ua},e.prototype.clusterType=function(){return Ya},e.prototype.stackType=function(){return Za},e.prototype.stackLimits=function(e,i){return t.prototype.stackLimits.call(this,e,i)},e.prototype.createPoint=function(t,e){var i=e.categoryIx,o=e.series,r=e.seriesIx,n=this.options,s=this.children,a=jt(o.stack)?o.stack:n.defaultStack,p=this.pointValue(t),l=this.pointOptions(o,r),h=l.labels;a&&h.position===Ls&&(h.position=Os),l.isStacked=a;var c=t.fields.color||o.color;p<0&&l.negativeColor&&(c=l.negativeColor),l=this.evalPointOptions(l,p,e),ot(o.color)&&(c=l.color);var u=new(this.pointType())(p,l);u.color=c;var d=s[i];return d||(d=new(this.clusterType())({vertical:n.invertAxes,gap:n.gap,spacing:n.spacing,rtl:!n.invertAxes&&(this.chartService||{}).rtl}),this.append(d)),n.isStacked?this.getStackWrap(a,d).append(u):d.append(u),u},e.prototype.getStackWrap=function(t,e){var i,o=typeof t===O?t.group||!0:t,r=e.children;if(typeof o===R||!0===o)for(var n=0;n<r.length;n++)if(r[n]._stackGroup===o){i=r[n];break}return i||((i=new(this.stackType())({vertical:!this.options.invertAxes}))._stackGroup=o,e.append(i)),i},e.prototype.categorySlot=function(t,e,i){var o=this.options,r=t.getSlot(e),n=i.startValue();if(o.isStacked){var s=i.getSlot(n,n,!0),a=o.invertAxes?F:H;r[a+1]=r[a+2]=s[a+1]}return r},e.prototype.reflowCategories=function(t){for(var e=this.children,i=e.length,o=0;o<i;o++)e[o].reflow(t[o])},e.prototype.createAnimation=function(){this._setAnimationOptions(),t.prototype.createAnimation.call(this),Ds(this.options.series)&&this._setChildrenAnimation()},e.prototype._setChildrenAnimation=function(){for(var t=this.points,e=0;e<t.length;e++){var i=t[e],o=i.visual;o&&jt(o.options.zIndex)&&(i.options.animation=this.options.animation,i.createAnimation())}},e.prototype._setAnimationOptions=function(){var t,e=this.options,i=e.animation||{};if(e.isStacked){var o=this.seriesValueAxis(e.series[0]);t=o.getSlot(o.startValue())}else t=this.categoryAxis.getSlot(0);i.origin=new q.geometry.Point(t.x1,t.y1),i.vertical=!e.invertAxes},e}(aa);te(Qa,{animation:{type:wn}});const Ka=Qa;var $a=function(t){function e(e,i){t.call(this,i),this.value=e}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getLabelText=function(t){return this.formatValue(t.format)},e.prototype.reflow=function(t){var e=this,i=e.options,o=e.value,r=e.owner.seriesValueAxis(i),n=r.getSlot(o.open,o.close),s=r.getSlot(o.low,o.high);n.x1=s.x1=t.x1,n.x2=s.x2=t.x2,this.realBody=n;var a=s.center().x,p=[];p.push([[a,s.y1],[a,n.y1]]),p.push([[a,n.y2],[a,s.y2]]),this.lines=p,this.box=s.clone().wrap(n),this._rendered||(this._rendered=!0,this.createNote()),this.reflowNote()},e.prototype.reflowNote=function(){this.note&&this.note.reflow(this.box)},e.prototype.createVisual=function(){t.prototype.createVisual.call(this),this.addAccessibilityAttributesToVisual(),this._mainVisual=this.mainVisual(this.options),this.visual.append(this._mainVisual),this.createOverlay()},e.prototype.mainVisual=function(t){var e=new q.drawing.Group;return this.createBody(e,t),this.createLines(e,t),e},e.prototype.createBody=function(t,e){var i=q.drawing.Path.fromRect(this.realBody.toRect(),{fill:Ii(e.pattern,{color:this.color,opacity:e.opacity}),stroke:null});e.border.width>0&&i.options.set("stroke",{color:this.getBorderColor(e),width:e.border.width,dashType:e.border.dashType,opacity:Kt(e.border.opacity,e.opacity)}),Z(i),t.append(i),Ks(e)&&t.append(this.createGradientOverlay(i,{baseColor:this.color},at({end:e.vertical?void 0:[0,1]},e.overlay)))},e.prototype.createLines=function(t,e){this.drawLines(t,e,this.lines,e.line)},e.prototype.drawLines=function(t,e,i,o){if(i)for(var r={stroke:{color:o.color||this.color,opacity:Kt(o.opacity,e.opacity),width:o.width,dashType:o.dashType,lineCap:"butt"}},n=0;n<i.length;n++){var s=q.drawing.Path.fromPoints(i[n],r);Z(s),t.append(s)}},e.prototype.getBorderColor=function(t){var e=t.border.color;return jt(e)||(e=new q.Color(this.color).brightness(this.options.border._brightness).toHex()),e},e.prototype.createOverlay=function(){var t=q.drawing.Path.fromRect(this.box.toRect(),{fill:{color:j,opacity:0},stroke:null});this.visual.append(t)},e.prototype.createHighlight=function(){var t=this.options.highlight,e=this.color;this.color=t.color||this.color;var i=this.mainVisual(at({},this.options,{line:{color:this.getBorderColor(t)}},t));return this.color=e,i},e.prototype.highlightVisual=function(){return this._mainVisual},e.prototype.highlightVisualArgs=function(){return{options:this.options,rect:this.box.toRect(),visual:this._mainVisual}},e.prototype.tooltipAnchor=function(){var t=this.box,e=this.owner.pane.clipBox()||t;return{point:new xi(t.x2+5,Math.max(t.y1,e.y1)+5),align:{horizontal:C,vertical:V}}},e.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},e.prototype.overlapsBox=function(t){return this.box.overlaps(t)},e.prototype.pointData=function(){return{dataItem:this.dataItem,value:this.value,meanPoints:this.meanPoints,medianPoints:this.medianPoints,whiskerPoints:this.whiskerPoints,stackValue:this.stackValue,series:this.series}},e.prototype.getIndex=function(){return this.categoryIx},e}(Li);$a.prototype.createFocusHighlight=Ua.prototype.createFocusHighlight,te($a,{vertical:!0,border:{_brightness:.8},line:{width:2},overlay:{gradient:"glass"},tooltip:{format:"<table><tr><th colspan='2'>{4:d}</th></tr><tr><td>Open:</td><td>{0:C}</td></tr><tr><td>High:</td><td>{1:C}</td></tr><tr><td>Low:</td><td>{2:C}</td></tr><tr><td>Close:</td><td>{3:C}</td></tr></table>"},labels:{format:""},highlight:{opacity:1,border:{width:1,opacity:1},line:{width:1,opacity:1}},notes:{visible:!0,label:{}},accessibility:{role:Ss,className:Cs,ariaRoleDescription:Ps}}),at($a.prototype,la),at($a.prototype,ha),at($a.prototype,Ha);const Ja=$a;var tp=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reflowCategories=function(t){for(var e=this.children,i=e.length,o=0;o<i;o++)e[o].reflow(t[o])},e.prototype.addValue=function(t,e){var i,o=e.categoryIx,r=e.category,n=e.series,s=e.seriesIx,a=this.children,p=this.options,l=t.valueFields,h=Hs(this.splitValue(l)),c=n.data[o],u=this.categoryPoints[o];u||(this.categoryPoints[o]=u=[]),h&&(i=this.createPoint(t,e));var d=a[o];d||(d=new Ya({vertical:p.invertAxes,gap:p.gap,spacing:p.spacing,rtl:!p.invertAxes&&(this.chartService||{}).rtl}),this.append(d)),i&&(this.updateRange(l,e),d.append(i),i.categoryIx=o,i.category=r,i.series=n,i.seriesIx=s,i.owner=this,i.dataItem=c,i.noteText=t.fields.noteText),this.points.push(i),u.push(i)},e.prototype.pointType=function(){return Ja},e.prototype.createPoint=function(t,e){var i=e.series,o=this.pointType(),r=t.valueFields,n=at({},i),s=t.fields.color||i.color;n=this.evalPointOptions(n,r,e),i.type!==Cn&&i.type!==En||r.open>r.close&&(s=t.fields.downColor||i.downColor||i.color),ot(i.color)&&(s=n.color),n.vertical=!this.options.invertAxes;var a=new o(r,n);return a.color=s,a},e.prototype.splitValue=function(t){return[t.low,t.open,t.close,t.high]},e.prototype.updateRange=function(t,e){var i=e.series.axis,o=this.splitValue(t),r=this.valueAxisRanges[i]||{min:P,max:T};this.valueAxisRanges[i]={min:Math.min.apply(Math,o.concat([r.min])),max:Math.max.apply(Math,o.concat([r.max]))}},e.prototype.formatPointValue=function(t,e){var i=t.value;return this.chartService.format.auto(e,i.open,i.high,i.low,i.close,t.category)},e.prototype.animationPoints=function(){return this.points},e}(aa);at(tp.prototype,Ca);const ep=tp;var ip=function(t){function e(e,i){t.call(this,e,i),this.createNote()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reflow=function(t){var e,i,o=this,r=o.options,n=o.value,s=o.owner.seriesValueAxis(r);this.boxSlot=i=s.getSlot(n.q1,n.q3),this.realBody=i,this.reflowBoxSlot(t),this.whiskerSlot=e=s.getSlot(n.lower,n.upper),this.reflowWhiskerSlot(t);var a=s.getSlot(n.median);if(n.mean){var p=s.getSlot(n.mean);this.meanPoints=this.calcMeanPoints(t,p)}this.whiskerPoints=this.calcWhiskerPoints(i,e),this.medianPoints=this.calcMedianPoints(t,a),this.box=e.clone().wrap(i),this.reflowNote()},e.prototype.reflowBoxSlot=function(t){this.boxSlot.x1=t.x1,this.boxSlot.x2=t.x2},e.prototype.reflowWhiskerSlot=function(t){this.whiskerSlot.x1=t.x1,this.whiskerSlot.x2=t.x2},e.prototype.calcMeanPoints=function(t,e){return[[[t.x1,e.y1],[t.x2,e.y1]]]},e.prototype.calcWhiskerPoints=function(t,e){var i=e.center().x;return[[[i-5,e.y1],[i+5,e.y1],[i,e.y1],[i,t.y1]],[[i-5,e.y2],[i+5,e.y2],[i,e.y2],[i,t.y2]]]},e.prototype.calcMedianPoints=function(t,e){return[[[t.x1,e.y1],[t.x2,e.y1]]]},e.prototype.renderOutliers=function(t){for(var e=this.value,i=e.outliers||[],o=3*Math.abs(e.q3-e.q1),r=[],n=t.markers||{},s=0;s<i.length;s++){var a=i[s],p=at({},(n=a<e.q3+o&&a>e.q1-o?t.outliers:t.extremes).border);jt(p.color)||(jt(this.color)?p.color=this.color:p.color=new q.Color(n.background).brightness(cn).toHex());var l=new ji({type:n.type,width:n.size,height:n.size,rotation:n.rotation,background:n.background,border:p,opacity:n.opacity});l.value=a,r.push(l)}return this.reflowOutliers(r),r},e.prototype.reflowOutliers=function(t){for(var e=this.owner.seriesValueAxis(this.options),i=this.box.center(),o=0;o<t.length;o++){var r=t[o].value,n=e.getSlot(r);this.options.vertical?n.move(i.x):n.move(void 0,i.y),this.box=this.box.wrap(n),t[o].reflow(n)}},e.prototype.mainVisual=function(e){for(var i=t.prototype.mainVisual.call(this,e),o=this.renderOutliers(e),r=0;r<o.length;r++){var n=o[r].getElement();n&&i.append(n)}return i},e.prototype.createLines=function(t,e){this.drawLines(t,e,this.whiskerPoints,e.whiskers),this.drawLines(t,e,this.medianPoints,e.median),this.drawLines(t,e,this.meanPoints,e.mean)},e.prototype.getBorderColor=function(){return(this.options.border||{}).color?this.options.border.color:this.color?this.color:t.prototype.getBorderColor.call(this)},e}(Ja);te(ip,{border:{_brightness:.8},line:{width:2},median:{color:"#f6f6f6"},mean:{width:2,dashType:"dash",color:"#f6f6f6"},overlay:{gradient:"glass"},tooltip:{format:"<table><tr><th colspan='2'>{6:d}</th></tr><tr><td>Lower:</td><td>{0:C}</td></tr><tr><td>Q1:</td><td>{1:C}</td></tr><tr><td>Median:</td><td>{2:C}</td></tr><tr><td>Mean:</td><td>{5:C}</td></tr><tr><td>Q3:</td><td>{3:C}</td></tr><tr><td>Upper:</td><td>{4:C}</td></tr></table>"},highlight:{opacity:1,border:{width:1,opacity:1},line:{width:1,opacity:1}},notes:{visible:!0,label:{}},outliers:{visible:!0,size:8,type:v,background:j,border:{width:2,opacity:1},opacity:0},extremes:{visible:!0,size:8,type:g,background:j,border:{width:2,opacity:1},opacity:0}}),at(ip.prototype,la);const op=ip;var rp=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reflowBoxSlot=function(t){this.boxSlot.y1=t.y1,this.boxSlot.y2=t.y2},e.prototype.reflowWhiskerSlot=function(t){this.whiskerSlot.y1=t.y1,this.whiskerSlot.y2=t.y2},e.prototype.calcMeanPoints=function(t,e){return[[[e.x1,t.y1],[e.x1,t.y2]]]},e.prototype.calcWhiskerPoints=function(t,e){var i=e.center().y;return[[[e.x1,i-5],[e.x1,i+5],[e.x1,i],[t.x1,i]],[[e.x2,i-5],[e.x2,i+5],[e.x2,i],[t.x2,i]]]},e.prototype.calcMedianPoints=function(t,e){return[[[e.x1,t.y1],[e.x1,t.y2]]]},e}(op);const np=rp;var sp=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.addValue=function(t,e){var i,o=e.categoryIx,r=e.category,n=e.series,s=e.seriesIx,a=this.children,p=this.options,l=t.valueFields,h=Hs(this.splitValue(l)),c=n.data[o],u=this.categoryPoints[o];u||(this.categoryPoints[o]=u=[]),h&&(i=this.createPoint(t,e));var d=a[o];d||(d=new Ya({vertical:p.invertAxes,gap:p.gap,spacing:p.spacing,rtl:!p.invertAxes&&(this.chartService||{}).rtl}),this.append(d)),i&&(this.updateRange(l,e),d.append(i),i.categoryIx=o,i.category=r,i.series=n,i.seriesIx=s,i.owner=this,i.dataItem=c),this.points.push(i),u.push(i)},e.prototype.pointType=function(){return this.options.invertAxes?np:op},e.prototype.splitValue=function(t){return[t.lower,t.q1,t.median,t.q3,t.upper]},e.prototype.updateRange=function(t,e){var i=e.series.axis,o=this.splitValue(t).concat(this.filterOutliers(t.outliers));jt(t.mean)&&(o=o.concat(t.mean));var r=this.valueAxisRanges[i]||{min:P,max:T};this.valueAxisRanges[i]={min:Math.min.apply(Math,o.concat([r.min])),max:Math.max.apply(Math,o.concat([r.max]))}},e.prototype.formatPointValue=function(t,e){var i=t.value;return this.chartService.format.auto(e,i.lower,i.q1,i.median,i.q3,i.upper,i.mean,t.category)},e.prototype.filterOutliers=function(t){for(var e=(t||[]).length,i=[],o=0;o<e;o++){var r=t[o];jt(r)&&null!==r&&i.push(r)}return i},e.prototype.supportsPointInactiveOpacity=function(){return!1},e}(ep);const ap=sp;var pp=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getAxis=function(){var t=this.chart.seriesAxes(this.series);return this.isVertical?t.y:t.x},e}(Vs);const lp=pp;var hp=function(t){function e(e,i){t.call(this,i),this.plotArea=e,this.chartService=e.chartService,this._initFields(),this.render()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._initFields=function(){this.xAxisRanges={},this.yAxisRanges={},this.points=[],this.seriesPoints=[],this.seriesOptions=[],this._evalSeries=[]},e.prototype.render=function(){this.traverseDataPoints(this.addValue.bind(this))},e.prototype.addErrorBar=function(t,e,i){var o,r=t.value[e],n=e+"Value",s=e+"ErrorLow",a=e+"ErrorHigh",p=i.seriesIx,l=i.series,h=t.options.errorBars,c=i[s],u=i[a];K(r)&&(K(c)&&K(u)&&(o={low:c,high:u}),h&&jt(h[n])&&(this.seriesErrorRanges=this.seriesErrorRanges||{x:[],y:[]},this.seriesErrorRanges[e][p]=this.seriesErrorRanges[e][p]||new an(h[n],l,e),o=this.seriesErrorRanges[e][p].getErrorRange(r,h[n])),o&&this.addPointErrorBar(o,t,e))},e.prototype.addPointErrorBar=function(t,e,i){var o=t.low,r=t.high,n=e.series,s=e.options.errorBars,a=i===H,p={};e[i+"Low"]=o,e[i+"High"]=r,e.errorBars=e.errorBars||[];var l=new lp(o,r,a,this,n,s);e.errorBars.push(l),e.append(l),p[i]=o,this.updateRange(p,n),p[i]=r,this.updateRange(p,n)},e.prototype.addValue=function(t,e){var i,o=t.x,r=t.y,n=e.seriesIx,s=this.options.series[n],a=this.seriesMissingValues(s),p=this.seriesPoints[n],l=t;$s(o)&&$s(r)||(l=this.createMissingValue(l,a)),l&&((i=this.createPoint(l,e))&&(Object.assign(i,e),this.addErrorBar(i,F,e),this.addErrorBar(i,H,e)),this.updateRange(l,e.series)),this.points.push(i),p.push(i)},e.prototype.seriesMissingValues=function(t){return t.missingValues},e.prototype.createMissingValue=function(){},e.prototype.updateRange=function(t,e){var i=this.chartService.intl,o=e.xAxis,r=e.yAxis,n=t.x,s=t.y,a=this.xAxisRanges[o],p=this.yAxisRanges[r];$s(n)&&(a=this.xAxisRanges[o]=a||{min:P,max:T},$(n)&&(n=er(i,n)),a.min=Math.min(a.min,n),a.max=Math.max(a.max,n)),$s(s)&&(p=this.yAxisRanges[r]=p||{min:P,max:T},$(s)&&(s=er(i,s)),p.min=Math.min(p.min,s),p.max=Math.max(p.max,s))},e.prototype.evalPointOptions=function(t,e,i){var o=i.series,r=i.seriesIx,n={defaults:o._defaults,excluded:["data","tooltip","content","template","visual","toggle","_outOfRangeMinPoint","_outOfRangeMaxPoint","drilldownSeriesFactory","ariaTemplate","ariaContent"]},s=this._evalSeries[r];jt(s)||(this._evalSeries[r]=s=Ys(t,{},n,!0));var a=t;return s&&Ys(a=at({},t),{value:e,series:o,dataItem:i.dataItem},n),a},e.prototype.pointType=function(){return ua},e.prototype.pointOptions=function(t,e){var i=this.seriesOptions[e];if(!i){var o=this.pointType().prototype.defaults;this.seriesOptions[e]=i=at({},o,{markers:{opacity:t.opacity},tooltip:{format:this.options.tooltip.format},labels:{format:this.options.labels.format}},t)}return i},e.prototype.createPoint=function(t,e){var i=e.series,o=this.pointOptions(i,e.seriesIx),r=e.color||i.color;o=this.evalPointOptions(o,t,e),ot(i.color)&&(r=o.color);var n=new ua(t,o);return n.color=r,this.append(n),n},e.prototype.seriesAxes=function(t){var e=t.xAxis,i=t.yAxis,o=this.plotArea,r=e?o.namedXAxes[e]:o.axisX,n=i?o.namedYAxes[i]:o.axisY;if(!r)throw new Error("Unable to locate X axis with name "+e);if(!n)throw new Error("Unable to locate Y axis with name "+i);return{x:r,y:n}},e.prototype.reflow=function(t){var e=this,i=this.points,o=!this.options.clip,r=0;this.traverseDataPoints((function(t,n){var s=i[r++],a=e.seriesAxes(n.series),p=a.x.getSlot(t.x,t.x,o),l=a.y.getSlot(t.y,t.y,o);if(s)if(p&&l){var h=e.pointSlot(p,l);s.reflow(h)}else s.visible=!1})),this.box=t},e.prototype.pointSlot=function(t,e){return new wi(t.x1,e.y1,t.x2,e.y2)},e.prototype.traverseDataPoints=function(t){for(var e=this.options.series,i=this.seriesPoints,o=0;o<e.length;o++){var r=e[o];i[o]||(i[o]=[]);for(var n=0;n<r.data.length;n++){var s=this.plotArea.bindPoint(r,n),a=s.valueFields,p=s.fields;t(a,at({pointIx:n,series:r,seriesIx:o,dataItem:r.data[n],owner:this},p))}}},e.prototype.formatPointValue=function(t,e){var i=t.value;return this.chartService.format.auto(e,i.x,i.y)},e.prototype.animationPoints=function(){for(var t=this.points,e=[],i=0;i<t.length;i++)e.push((t[i]||{}).marker);return e},e}(Li);te(hp,{series:[],tooltip:{format:"{0}, {1}"},labels:{format:"{0}, {1}"},clip:!0}),at(hp.prototype,Ca);const cp=hp;var up=function(t){function e(e,i){t.call(this,e,i),this.category=e.category}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createHighlight=function(){var t=this.options.highlight,e=t.border,i=this.options.markers,o=this.box.center(),r=(i.size+i.border.width+e.width)/2,n=new q.drawing.Group,s=new q.drawing.Circle(new q.geometry.Circle([o.x,o.y+r/5+e.width/2],r+e.width/2),{stroke:{color:"none"},fill:this.createGradient({gradient:"bubbleShadow",color:i.background,stops:[{offset:0,color:i.background,opacity:.3},{offset:1,color:i.background,opacity:0}]})}),a=new q.drawing.Circle(new q.geometry.Circle([o.x,o.y],r),{stroke:{color:e.color||new q.Color(i.background).brightness(cn).toHex(),width:e.width,opacity:e.opacity,dashType:e.dashType},fill:Ii(this.options.pattern,{color:i.background,opacity:t.opacity})});return n.append(s,a),n},e.prototype.createFocusHighlight=function(t){var e=this.options.focusHighlight,i=this.options.markers,o=this.box.center(),r=(i.size+i.border.width)/2+e.border.width/2;return new q.drawing.Circle(new q.geometry.Circle([o.x,o.y],r),t)},e}(ua);up.prototype.defaults=at({},up.prototype.defaults,{labels:{position:f},highlight:{opacity:1,border:{color:"#fff",width:2,opacity:1}}}),up.prototype.defaults.highlight.zIndex=void 0;const dp=up;var fp=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._initFields=function(){this._maxSize=T,t.prototype._initFields.call(this)},e.prototype.addValue=function(e,i){null!==e.size&&(e.size>0||e.size<0&&i.series.negativeValues.visible)?(this._maxSize=Math.max(this._maxSize,Math.abs(e.size)),t.prototype.addValue.call(this,e,i)):(this.points.push(null),this.seriesPoints[i.seriesIx].push(null))},e.prototype.reflow=function(e){this.updateBubblesSize(e),t.prototype.reflow.call(this,e)},e.prototype.pointType=function(){return dp},e.prototype.createPoint=function(t,e){var i=e.series,o=i.data.length,r=e.pointIx*(ln/o),n={delay:r,duration:ln-r,type:An},s=e.color||i.color;t.size<0&&i.negativeValues.visible&&(s=Kt(i.negativeValues.color,s));var a=at({labels:{animation:{delay:r,duration:ln-r}}},this.pointOptions(i,e.seriesIx),{markers:{type:g,border:i.border,opacity:i.opacity,animation:n}});a=this.evalPointOptions(a,t,e),ot(i.color)&&(s=a.color),a.markers.background=s;var p=new dp(t,a);return p.color=s,this.append(p),p},e.prototype.updateBubblesSize=function(t){for(var e=this.options.series,i=Math.min(t.width(),t.height()),o=0;o<e.length;o++)for(var r=e[o],n=this.seriesPoints[o],s=(r.minSize||Math.max(.02*i,10))/2,a=(r.maxSize||.2*i)/2,p=Math.PI*s*s,l=(Math.PI*a*a-p)/this._maxSize,h=0;h<n.length;h++){var c=n[h];if(c){var u=Math.abs(c.value.size)*l,d=Math.sqrt((p+u)/Math.PI),f=Kt(c.options.zIndex,0)+(1-d/a);at(c.options,{zIndex:f,markers:{size:2*d,zIndex:f},labels:{zIndex:f+1}})}}},e.prototype.formatPointValue=function(t,e){var i=t.value;return this.chartService.format.auto(e,i.x,i.y,i.size,t.category)},e.prototype.createAnimation=function(){},e.prototype.createVisual=function(){},e}(cp);te(fp,{tooltip:{format:"{3}"},labels:{format:"{3}"}});const gp=fp;var yp=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(ji);at(yp.prototype,la);const vp=yp;var mp=function(t){function e(e,i){t.call(this,i),this.aboveAxis=this.options.aboveAxis,this.color=i.color||j,this.value=e}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.render=function(){var t=this.options;this._rendered||(this._rendered=!0,jt(this.value.target)&&(this.target=new vp({type:t.target.shape,background:t.target.color||this.color,opacity:t.opacity,zIndex:t.zIndex,border:t.target.border,vAlign:V,align:B}),this.target.value=this.value,this.target.dataItem=this.dataItem,this.target.series=this.series,this.append(this.target)),this.createLabel(),this.createNote())},e.prototype.createLabel=function(){var t=this.options.labels;t.visible&&(this.label=this.createLabelElement(t),this.append(this.label))},e.prototype.createLabelElement=function(t){return new Fa(this.getLabelText(t),t,this.pointData())},e.prototype.getLabelText=function(t){var e=vt(t);return e?e(this.pointData()):this.formatValue(t.format)},e.prototype.reflow=function(t){this.render();var e=this,i=e.options,o=e.target,r=e.owner,n=i.invertAxes,s=r.seriesValueAxis(this.options),a=r.categorySlot(r.categoryAxis,i.categoryIx,s),p=s.getSlot(this.value.target),l=n?p:a,h=n?a:p;if(o){var c=new wi(l.x1,h.y1,l.x2,h.y2);o.options.height=n?c.height():i.target.line.width,o.options.width=n?i.target.line.width:c.width(),o.reflow(c)}var u=this.label;u&&(u.options.aboveAxis=this.aboveAxis,u.reflow(t)),this.note&&this.note.reflow(t),this.box=t},e.prototype.createVisual=function(){t.prototype.createVisual.call(this),this.addAccessibilityAttributesToVisual();var e=this.options,i=q.drawing.Path.fromRect(this.box.toRect(),{fill:Ii(e.pattern,{color:this.color,opacity:e.opacity}),stroke:null});e.border.width>0&&i.options.set("stroke",{color:e.border.color||this.color,width:e.border.width,dashType:e.border.dashType,opacity:Kt(e.border.opacity,e.opacity)}),this.bodyVisual=i,Z(i),this.visual.append(i)},e.prototype.createAnimation=function(){this.bodyVisual&&(this.animation=q.drawing.Animation.create(this.bodyVisual,this.options.animation))},e.prototype.createHighlight=function(t){return q.drawing.Path.fromRect(this.box.toRect(),t)},e.prototype.highlightVisual=function(){return this.bodyVisual},e.prototype.highlightVisualArgs=function(){return{rect:this.box.toRect(),visual:this.bodyVisual,options:this.options}},e.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},e.prototype.pointData=function(){return{dataItem:this.dataItem,category:this.category,value:this.value,series:this.series}},e.prototype.overlapsBox=function(t){return this.box.overlaps(t)},e.prototype.getIndex=function(){return this.categoryIx},e}(Li);mp.prototype.tooltipAnchor=Ua.prototype.tooltipAnchor,mp.prototype.createFocusHighlight=Ua.prototype.createFocusHighlight,te(mp,{border:{width:1},vertical:!1,opacity:1,target:{shape:"",border:{width:0,color:"green"},line:{width:2}},labels:{visible:!1},tooltip:{format:"Current: {0}<br />Target: {1}"},notes:{label:{}},accessibility:{role:Ss,className:Cs,ariaRoleDescription:Ps}}),at(mp.prototype,la),at(mp.prototype,ha),at(mp.prototype,Ha);const xp=mp;var bp=function(t){function e(e,i){!function(t){for(var e=t.series,i=0;i<e.length;i++){var o=e[i],r=o.data;!r||G(r[0])||pt(r[0])||(o.data=[r])}}(i),t.call(this,e,i)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reflowCategories=function(t){for(var e=this.children,i=e.length,o=0;o<i;o++)e[o].reflow(t[o])},e.prototype.plotRange=function(t){var e=t.series,i=this.seriesValueAxis(e),o=this.categoryAxisCrossingValue(i);return[o,t.value.current||o]},e.prototype.createPoint=function(t,e){var i=e.categoryIx,o=e.series,r=this.options,n=this.children,s=t.valueFields,a=at({vertical:!r.invertAxes,overlay:o.overlay,categoryIx:i,invertAxes:r.invertAxes},o),p=t.fields.color||o.color;a=this.evalPointOptions(a,s,e),ot(o.color)&&(p=a.color);var l=new xp(s,a);l.color=p;var h=n[i];return h||(h=new Ya({vertical:r.invertAxes,gap:r.gap,spacing:r.spacing,rtl:!r.invertAxes&&(this.chartService||{}).rtl}),this.append(h)),h.append(l),l},e.prototype.updateRange=function(t,e){var i=t.current,o=t.target,r=e.series.axis,n=this.valueAxisRanges[r];jt(i)&&!isNaN(i)&&jt(o&&!isNaN(o))&&((n=this.valueAxisRanges[r]=n||{min:P,max:T}).min=Math.min(n.min,i,o),n.max=Math.max(n.max,i,o))},e.prototype.formatPointValue=function(t,e){return this.chartService.format.auto(e,t.value.current,t.value.target)},e.prototype.pointValue=function(t){return t.valueFields.current},e.prototype.aboveAxis=function(t){return t.value.current>0},e.prototype.createAnimation=function(){var t=this.points;this._setAnimationOptions();for(var e=0;e<t.length;e++){var i=t[e];i.options.animation=this.options.animation,i.createAnimation()}},e}(aa);bp.prototype._setAnimationOptions=Ka.prototype._setAnimationOptions,te(bp,{animation:{type:wn}});const _p=bp;var wp=function(t,e){this.chartService=t,this.options=at({},this.options,e)};wp.prototype.getStyle=function(t,e){var i=t.background,o=t.border.color;if(e){var r=e.color||e.options.color;i=Kt(i,r),o=Kt(o,r)}var n=void 0!==t.padding?dt(t.padding):{};return"object"==typeof t.padding&&(n.top=void 0!==t.padding.top?n.top:void 0,n.right=void 0!==t.padding.right?n.right:void 0,n.bottom=void 0!==t.padding.bottom?n.bottom:void 0,n.left=void 0!==t.padding.left?n.left:void 0),{backgroundColor:i,borderColor:o,font:t.font,color:t.color,opacity:t.opacity,borderWidth:lt(t.border.width),paddingTop:lt(n.top),paddingBottom:lt(n.bottom),paddingLeft:lt(n.left),paddingRight:lt(n.right)}},wp.prototype.show=function(t,e,i){if(this.chartService){t.format=e.format;var o=this.getStyle(e,i);t.style=o;var r=new q.Color(o.backgroundColor);jt(e.color)||r.isDark()||(t.className="k-chart-tooltip-inverse"),this.chartService.notify(ks,t),this.visible=!0}},wp.prototype.hide=function(){this.chartService&&this.chartService.notify(As),this.visible=!1},wp.prototype.destroy=function(){delete this.chartService},te(wp,{border:{width:1},opacity:1});const kp=wp;var Ap=function(t){function e(e,i,o){t.call(this,e,o),this.crosshair=i,this.formatService=e.format,this.initAxisName()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initAxisName=function(){var t,e=this.crosshair.axis;t=e.plotArea.categoryAxis?e.getCategory?"categoryAxis":"valueAxis":e.options.vertical?"yAxis":"xAxis",this.axisName=t},e.prototype.showAt=function(t){var e=this.crosshair.axis,i=this.options,o=e[i.stickyMode?"getCategory":"getValue"](t),r=o;i.format?r=this.formatService.auto(i.format,o):e.options.type===m&&(r=this.formatService.auto(e.options.labels.dateFormats[e.options.baseUnit],o)),this.show({point:t,anchor:this.getAnchor(),crosshair:this.crosshair,value:r,axisName:this.axisName,axisIndex:this.crosshair.axis.axisIndex},this.options)},e.prototype.hide=function(){this.chartService.notify(As,{crosshair:this.crosshair,axisName:this.axisName,axisIndex:this.crosshair.axis.axisIndex})},e.prototype.getAnchor=function(){var t,e,i,o=this.crosshair,r=this.options,n=r.position,s=r.padding,a=!o.axis.options.vertical,p=o.line.bbox();return a?(t=f,n===d?(e=V,i=p.bottomLeft().translate(0,s)):(e=d,i=p.topLeft().translate(0,-s))):(e=f,n===C?(t=B,i=p.topLeft().translate(-s,0)):(t=C,i=p.topRight().translate(s,0))),{point:i,align:{horizontal:t,vertical:e}}},e}(kp);te(Ap,{padding:10});const Sp=Ap;var Cp=function(t){function e(e,i,o){t.call(this,o),this.axis=i,this.stickyMode=i instanceof nr;var r=this.options.tooltip;r.visible&&(this.tooltip=new Sp(e,this,at({},r,{stickyMode:this.stickyMode})))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.showAt=function(t){this.point=t,this.moveLine(),this.line.visible(!0),this.tooltip&&this.tooltip.showAt(t)},e.prototype.hide=function(){this.line.visible(!1),this.tooltip&&this.tooltip.hide()},e.prototype.moveLine=function(){var t,e=this.axis,i=this.point,o=e.options.vertical,r=this.getBox(),n=o?H:F,s=new q.geometry.Point(r.x1,r.y1);if(t=o?new q.geometry.Point(r.x2,r.y1):new q.geometry.Point(r.x1,r.y2),i)if(this.stickyMode){var a=e.getSlot(e.pointCategoryIndex(i));s[n]=t[n]=a.center()[n]}else s[n]=t[n]=i[n];this.box=r,this.line.moveTo(s).lineTo(t)},e.prototype.getBox=function(){for(var t,e=this.axis,i=e.pane.axes,o=i.length,r=e.options.vertical,n=e.lineBox().clone(),s=r?F:H,a=0;a<o;a++){var p=i[a];p.options.vertical!==r&&(t?t.wrap(p.lineBox()):t=p.lineBox().clone())}return n[s+1]=t[s+1],n[s+2]=t[s+2],n},e.prototype.createVisual=function(){t.prototype.createVisual.call(this);var e=this.options;this.line=new q.drawing.Path({stroke:{color:e.color,width:e.width,opacity:e.opacity,dashType:e.dashType},visible:!1}),this.moveLine(),this.visual.append(this.line)},e.prototype.destroy=function(){this.tooltip&&this.tooltip.destroy(),t.prototype.destroy.call(this)},e}(Li);te(Cp,{color:u,width:2,zIndex:-1,tooltip:{visible:!1}});const Pp=Cp;var Tp=function(t){function e(e,i){t.call(this,e),this.pane=i}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.shouldClip=function(){for(var t=this.children,e=t.length,i=0;i<e;i++)if(!0===t[i].options.clip)return!0;return!1},e.prototype._clipBox=function(){return this.pane.chartsBox()},e.prototype.createVisual=function(){if(this.visual=new q.drawing.Group({zIndex:0}),this.shouldClip()){var t=(this.clipBox=this._clipBox()).toRect(),e=q.drawing.Path.fromRect(t);Z(e),this.visual.clip(e),this.unclipLabels()}},e.prototype.stackRoot=function(){return this},e.prototype.unclipLabels=function(){for(var t=this.children,e=this.clipBox,i=0;i<t.length;i++)for(var o=t[i].points||[],r=o.length,n=0;n<r;n++){var s=o[n];if(s&&!1!==s.visible&&s.overlapsBox&&s.overlapsBox(e))if(s.unclipElements)s.unclipElements();else{var a=s.label,p=s.note;a&&a.options.visible&&(a.alignToClipBox&&a.alignToClipBox(e),a.options.noclip=!0),p&&p.options.visible&&(p.options.noclip=!0)}}},e.prototype.unclipBox=function(){for(var t=this.children,e=this._clipBox(),i=e.clone(),o=0;o<t.length;o++)for(var r=t[o].points||[],n=r.length,s=0;s<n;s++){var a=r[s];if(a&&a.unclipBox&&a.overlapsBox&&!1!==a.visible){if(!a.overlapsBox(e)){a.clipElements&&a.clipElements();continue}var p=a.unclipBox();if(i.overlaps(p)){var l=a.labelBox?a.labelBox():new wi,h=a.noteBox?a.noteBox():new wi,c=Math.max(l.height(),h.height()),u=Math.max(l.width(),h.width());i.wrapLimit(p,u,c)}}}return i},e.prototype.destroy=function(){t.prototype.destroy.call(this),delete this.parent},e}(Li);Tp.prototype.isStackRoot=!0;const Mp=Tp;var Op=function(t){function e(e){t.call(this,e),this.id="pane"+Lp++,this.createTitle(),this.content=new Li,this.chartContainer=new Mp({},this),this.append(this.content),this.axes=[],this.charts=[]}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createTitle=function(){var t=this.options.title;pt(t)&&(t=at({},t,{align:t.position,position:V})),this.title=eo.buildTitle(t,e.prototype.options.title),this.title&&this.append(this.title)},e.prototype.appendAxis=function(t){this.content.append(t),this.axes.push(t),t.pane=this},e.prototype.appendAxisAt=function(t,e){this.content.append(t),this.axes.splice(e,0,t),t.pane=this},e.prototype.appendChart=function(t){this.chartContainer.parent!==this.content&&this.content.append(this.chartContainer),this.charts.push(t),this.chartContainer.append(t),t.pane=this},e.prototype.empty=function(){var t=this.parent;if(t){for(var e=0;e<this.axes.length;e++)t.removeAxis(this.axes[e]);for(var i=0;i<this.charts.length;i++)t.removeChart(this.charts[i])}this.axes=[],this.charts=[],this.content.destroy(),this.content.children=[],this.chartContainer.children=[]},e.prototype.reflow=function(e){var i;Wt(this.children)===this.content&&(i=this.children.pop()),t.prototype.reflow.call(this,e),i&&this.children.push(i),this.title&&(this.contentBox.y1+=this.title.box.height())},e.prototype.unclipBox=function(){return this.chartContainer.unclipBox()},e.prototype.visualStyle=function(){var e=t.prototype.visualStyle.call(this);return e.zIndex=-10,e},e.prototype.renderComplete=function(){this.options.visible&&this.createGridLines()},e.prototype.stackRoot=function(){return this},e.prototype.clipRoot=function(){return this},e.prototype.createGridLines=function(){for(var t=this.axes,e=t.concat(this.parent.axes),i=[],o=[],r=0;r<t.length;r++)for(var n=t[r],s=n.options.vertical,a=s?i:o,p=0;p<e.length;p++)if(0===a.length){var l=e[p];s!==l.options.vertical&&Vt(a,n.createGridLines(l))}},e.prototype.refresh=function(){this.visual.clear(),this.content.parent=null,this.content.createGradient=this.createGradient.bind(this),this.content.renderVisual(),this.content.parent=this,this.title&&this.visual.append(this.title.visual),this.visual.append(this.content.visual),this.renderComplete(),this.notifyRender()},e.prototype.chartsBox=function(){for(var t=this.axes,e=t.length,i=new wi,o=0;o<e;o++){var r=t[o],n=r.options.vertical?H:F,s=r.lineBox();i[n+1]=s[n+1],i[n+2]=s[n+2]}if(0===i.x2)for(var a=this.parent.axes,p=a.length,l=0;l<p;l++){var h=a[l];if(!h.options.vertical){var c=h.lineBox();i.x1=c.x1,i.x2=c.x2}}return i},e.prototype.clipBox=function(){return this.chartContainer.clipBox},e.prototype.notifyRender=function(){var t=this.getService();t&&t.notify("paneRender",{pane:new Zr(this),index:this.paneIndex,name:this.options.name})},e}(Ri),Lp=1;Op.prototype.isStackRoot=!0,te(Op,{zIndex:-1,shrinkToFit:!0,title:{align:C},visible:!0});const Bp=Op;var Ip=function(t){return!1!==t.options.visible},Ep=function(t){function e(e,i,o){t.call(this,i),this.initFields(e,i),this.series=e,this.initSeries(),this.charts=[],this.options.legend=this.options.legend||{},this.options.legend.data=[],this.axes=[],this.crosshairs=[],this.chartService=o,this.originalOptions=i,this.originalSeries=e,this._bindCache=new WeakMap,this.createPanes(),this.render(),this.createCrosshairs()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initFields=function(){},e.prototype.initSeries=function(){for(var t=this.series,e=0;e<t.length;e++)t[e].index=e},e.prototype.bindPoint=function(t,e,i){var o=this._bindCache.get(t);o||(o=[],this._bindCache.set(t,o));var r=o[e];return r||(r=o[e]=on.current.bindPoint(t,e,i)),r},e.prototype.createPanes=function(){for(var t=this.options.title||{},e=this.options.paneDefaults,i=this.options.panes||[],o=Math.max(i.length,1),r=[],n=at({title:{color:t.color}},e),s=0;s<o;s++){var a=at({},n,i[s]);$(a.title)&&(a.title=at({text:a.title},n.title));var p=new Bp(a);p.paneIndex=s,r.push(p),this.append(p)}this.panes=r},e.prototype.crosshairOptions=function(t){return t.options.crosshair},e.prototype.createCrosshairs=function(t){void 0===t&&(t=this.panes);for(var e=0;e<t.length;e++)for(var i=t[e],o=0;o<i.axes.length;o++){var r=i.axes[o],n=this.crosshairOptions(r);if(n&&n.visible){var s=new Pp(this.chartService,r,n);this.crosshairs.push(s),i.content.append(s)}}},e.prototype.removeCrosshairs=function(t){for(var e=this.crosshairs,i=t.axes,o=e.length-1;o>=0;o--)for(var r=0;r<i.length;r++)if(e[o].axis===i[r]){e.splice(o,1);break}},e.prototype.hideCrosshairs=function(){for(var t=this.crosshairs,e=0;e<t.length;e++)t[e].hide()},e.prototype.findPane=function(t){for(var e,i=this.panes,o=0;o<i.length;o++)if(i[o].options.name===t){e=i[o];break}return e||i[0]},e.prototype.findPointPane=function(t){for(var e,i=this.panes,o=0;o<i.length;o++)if(i[o].box.containsPoint(t)){e=i[o];break}return e},e.prototype.appendAxis=function(t){this.findPane(t.options.pane).appendAxis(t),this.axes.push(t),t.plotArea=this},e.prototype.removeAxis=function(t){for(var e=[],i=0;i<this.axes.length;i++){var o=this.axes[i];t!==o?e.push(o):o.destroy()}this.axes=e},e.prototype.appendChart=function(t,e){this.charts.push(t),e?e.appendChart(t):this.append(t)},e.prototype.removeChart=function(t){for(var e=[],i=0;i<this.charts.length;i++){var o=this.charts[i];o!==t?e.push(o):o.destroy()}this.charts=e},e.prototype.addToLegend=function(t){for(var e=t.length,i=this.options.legend,o=i.labels||{},r=i.inactiveItems||{},n=r.labels||{},s=[],a=0;a<e;a++){var p=t[a],l=!1!==p.visible;if(!1!==p.visibleInLegend){var h=p.name,c=l?vt(o):vt(n)||vt(o);c&&(h=c({text:$s(h)?h:"",series:p}));var u=p._defaults,d=p.color;ot(d)&&u&&(d=u.color);var f=void 0,g=void 0;l?(f={},g=d):(f={color:n.color,font:n.font},g=r.markers.color),$s(h)&&""!==h&&s.push({text:h,labels:f,markerColor:g,series:p,active:l})}}Vt(i.data,s)},e.prototype.groupAxes=function(t){for(var e=[],i=[],o=0;o<t.length;o++)for(var r=t[o].axes,n=0;n<r.length;n++){var s=r[n];s.options.vertical?i.push(s):e.push(s)}return{x:e,y:i,any:e.concat(i)}},e.prototype.groupSeriesByPane=function(){for(var t=this.series,e={},i=0;i<t.length;i++){var o=t[i],r=this.seriesPaneName(o);e[r]?e[r].push(o):e[r]=[o]}return e},e.prototype.filterVisibleSeries=function(t){for(var e=[],i=0;i<t.length;i++){var o=t[i];!1!==o.visible&&e.push(o)}return e},e.prototype.reflow=function(t){var e=this.options.plotArea,i=this.panes,o=dt(e.margin);this.box=t.clone().unpad(o),this.reflowArea(i),this.ensureLabelsFit(i)&&(this.reflowPanes(),this.reflowAxes(i),this.reflowCharts(i))},e.prototype.reflowArea=function(t){this.reflowPanes(),this.detachLabels(),this.reflowAxes(t),this.reflowCharts(t)},e.prototype.ensureLabelsFit=function(t){var e=!1;return t.forEach((function(t){var i=t.unclipBox(),o=t.chartContainer._clipBox(),r=dt(t.options.padding||{});i.y1<o.y1+r.top&&(e=!0,r.top=o.y1-i.y1+r.top),i.y2>o.y2-r.bottom&&(e=!0,r.bottom=i.y2-o.y2+r.bottom),i.x1<o.x1+r.left&&(e=!0,r.left=o.x1-i.x1+r.left),i.x2>o.x2-r.right&&(e=!0,r.right=i.x2-o.x2+r.right),e&&(t.options.padding=r)})),e},e.prototype.redraw=function(t){var e=[].concat(t);this.initSeries();var i=this.getRoot();i&&i.cleanGradients();for(var o=0;o<e.length;o++)this.removeCrosshairs(e[o]),e[o].empty();this._bindCache=new WeakMap,this.render(e),this.detachLabels(),this.reflowAxes(this.panes),this.reflowCharts(e),this.createCrosshairs(e);for(var r=0;r<e.length;r++)e[r].refresh()},e.prototype.axisCrossingValues=function(t,e){for(var i=t.options,o=[].concat(i.axisCrossingValues||i.axisCrossingValue),r=e.length-o.length,n=o[0]||0,s=0;s<r;s++)o.push(n);return o},e.prototype.alignAxisTo=function(t,e,i,o){var r=t.getSlot(i,i,!0),n=t.options.reverse?2:1,s=e.getSlot(o,o,!0),a=e.options.reverse?2:1,p=t.box.translate(s[F+a]-r[F+n],s[H+a]-r[H+n]);t.pane!==e.pane&&p.translate(0,t.pane.box.y1-e.pane.box.y1),t.reflow(p)},e.prototype.alignAxes=function(t,e){for(var i=t[0],o=e[0],r=this.axisCrossingValues(i,e),n=this.axisCrossingValues(o,t),s={},a={},p={},l={},h=0;h<e.length;h++){var c=e[h],u=c.pane,f=u.id,g=!1!==c.options.visible,v=zp(t,u)||i,m=r;if(v!==i&&(m=this.axisCrossingValues(v,e)),this.alignAxisTo(c,v,n[h],m[h]),!c.options._overlap){Zt(c.lineBox().x1)===Zt(v.lineBox().x1)&&(s[f]&&c.reflow(c.box.alignTo(s[f].box,C).translate(-c.options.margin,0)),g&&(s[f]=c)),Zt(c.lineBox().x2)===Zt(v.lineBox().x2)&&(c._mirrored||(c.options.labels.mirror=!c.options.labels.mirror,c._mirrored=!0),this.alignAxisTo(c,v,n[h],m[h]),a[f]&&c.reflow(c.box.alignTo(a[f].box,B).translate(c.options.margin,0)),g&&(a[f]=c));var x=zp(e,u)||o;x!==c&&(c.alignTo(x),c.reflow(c.box))}}for(var b=0;b<t.length;b++){var _=t[b],w=_.pane,k=w.id,A=!1!==_.options.visible,S=zp(e,w)||o,P=n;S!==o&&(P=this.axisCrossingValues(S,t)),this.alignAxisTo(_,S,r[b],P[b]),_.options._overlap||(Zt(_.lineBox().y1)===Zt(S.lineBox().y1)&&(_._mirrored||(_.options.labels.mirror=!_.options.labels.mirror,_._mirrored=!0),this.alignAxisTo(_,S,r[b],P[b]),p[k]&&_.reflow(_.box.alignTo(p[k].box,V).translate(0,-_.options.margin)),A&&(p[k]=_)),Zt(_.lineBox().y2,y)===Zt(S.lineBox().y2,y)&&(l[k]&&_.reflow(_.box.alignTo(l[k].box,d).translate(0,_.options.margin)),A&&(l[k]=_)),0!==b&&(_.alignTo(i),_.reflow(_.box)))}},e.prototype.shrinkAxisWidth=function(t){for(var e=this.groupAxes(t).any,i=Vp(e),o=0,r=0;r<t.length;r++){var n=t[r];n.axes.length>0&&(o=Math.max(o,i.width()-n.contentBox.width()))}if(0!==o)for(var s=0;s<e.length;s++){var a=e[s];a.options.vertical||a.reflow(a.box.shrink(o,0))}},e.prototype.shrinkAxisHeight=function(t){for(var e,i=0;i<t.length;i++){var o=t[i],r=o.axes,n=Math.max(0,Vp(r).height()-o.contentBox.height());if(0!==n){for(var s=0;s<r.length;s++){var a=r[s];a.options.vertical&&a.reflow(a.box.shrink(0,n))}e=!0}}return e},e.prototype.fitAxes=function(t){for(var e=this.groupAxes(t).any,i=0,o=0;o<t.length;o++){var r=t[o],n=r.axes,s=r.contentBox;if(n.length>0){var a=Vp(n),p=Math.max(s.y1-a.y1,s.y2-a.y2);i=Math.max(i,s.x1-a.x1);for(var l=0;l<n.length;l++){var h=n[l];h.reflow(h.box.translate(0,p))}}}for(var c=0;c<e.length;c++){var u=e[c];u.reflow(u.box.translate(i,0))}},e.prototype.reflowAxes=function(t){for(var e=this.groupAxes(t),i=0;i<t.length;i++)this.reflowPaneAxes(t[i]);e.x.length>0&&e.y.length>0&&(this.alignAxes(e.x,e.y),this.shrinkAxisWidth(t),this.autoRotateAxisLabels(e),this.alignAxes(e.x,e.y),this.shrinkAxisWidth(t)&&this.alignAxes(e.x,e.y),this.shrinkAxisHeight(t),this.alignAxes(e.x,e.y),this.shrinkAxisHeight(t)&&this.alignAxes(e.x,e.y),this.fitAxes(t))},e.prototype.autoRotateAxisLabels=function(t){for(var e,i=this.panes,o=jp(i),r=0;r<o.length;r++)o[r].autoRotateLabels()&&(e=!0);if(e){for(var n=0;n<i.length;n++)this.reflowPaneAxes(i[n]);t.x.length>0&&t.y.length>0&&(this.alignAxes(t.x,t.y),this.shrinkAxisWidth(i))}},e.prototype.reflowPaneAxes=function(t){var e=t.axes,i=e.length;if(i>0)for(var o=0;o<i;o++)e[o].reflow(t.contentBox)},e.prototype.reflowCharts=function(t){for(var e=this.charts,i=e.length,o=this.box,r=0;r<i;r++){var n=e[r].pane;n&&!Ct(n,t)||e[r].reflow(o)}},e.prototype.reflowPanes=function(){for(var t=this.box,e=this.panes,i=e.length,o=t.height(),r=0,n=t.y1,s=0;s<i;s++){var a=e[s],p=a.options.height;if(a.options.width=t.width(),a.options.height){if(p.indexOf&&p.indexOf("%")){var l=parseInt(p,10)/100;a.options.height=l*t.height()}a.reflow(t.clone()),o-=a.options.height}else r++}for(var h=0;h<i;h++){var c=e[h];c.options.height||(c.options.height=o/r)}for(var u=0;u<i;u++){var d=e[u],f=t.clone().move(t.x1,n);d.reflow(f),n+=d.options.height}},e.prototype.backgroundBox=function(){for(var t,e=this.axes,i=e.length,o=0;o<i;o++)for(var r=e[o],n=0;n<i;n++){var s=e[n];if(r.options.vertical!==s.options.vertical){var a=r.lineBox().clone().wrap(s.lineBox());t=t?t.wrap(a):a}}return t||this.box},e.prototype.chartsBoxes=function(){for(var t=this.panes,e=[],i=0;i<t.length;i++)e.push(t[i].chartsBox());return e},e.prototype.addBackgroundPaths=function(t){for(var e=this.chartsBoxes(),i=0;i<e.length;i++)t.paths.push(q.drawing.Path.fromRect(e[i].toRect()))},e.prototype.backgroundContainsPoint=function(t){for(var e=this.chartsBoxes(),i=0;i<e.length;i++)if(e[i].containsPoint(t))return!0},e.prototype.createVisual=function(){t.prototype.createVisual.call(this);var e,i=this.options.plotArea,o=i.opacity,r=i.background,n=i.border;void 0===n&&(n={}),""!==(e=r)&&null!==e&&"none"!==e&&"transparent"!==e&&jt(e)||(r=j,o=0);var s=this._bgVisual=new q.drawing.MultiPath({fill:{color:r,opacity:o},stroke:{color:n.width?n.color:"",width:n.width,dashType:n.dashType},zIndex:-1});this.addBackgroundPaths(s),this.appendVisual(s)},e.prototype.pointsByCategoryIndex=function(t){var e=this.charts,i=[];if(null!==t)for(var o=0;o<e.length;o++)if("_navigator"!==e[o].pane.options.name){var r=e[o].categoryPoints[t];if(r&&r.length)for(var n=0;n<r.length;n++){var s=r[n];s&&jt(s.value)&&null!==s.value&&i.push(s)}}return i},e.prototype.pointsBySeriesIndex=function(t){return this.filterPoints((function(e){return e.series.index===t}))},e.prototype.pointsByPointIndex=function(t){return this.filterPoints((function(e){return e.getIndex()===t}))},e.prototype.pointsBySeriesName=function(t){return this.filterPoints((function(e){return e.series.name===t}))},e.prototype.filterPoints=function(t){for(var e=this.charts,i=[],o=0;o<e.length;o++)for(var r=e[o].points,n=0;n<r.length;n++){var s=r[n];s&&!1!==s.visible&&t(s)&&i.push(s)}return i},e.prototype.findPoint=function(t){for(var e=this.charts,i=0;i<e.length;i++)for(var o=e[i].points,r=0;r<o.length;r++){var n=o[r];if(n&&!1!==n.visible&&t(n))return n}},e.prototype.paneByPoint=function(t){for(var e=this.panes,i=0;i<e.length;i++){var o=e[i];if(o.box.containsPoint(t))return o}},e.prototype.detachLabels=function(){var t=this.groupAxes(this.panes),e=t.x,i=t.y;this.detachAxisGroupLabels(i,e),this.detachAxisGroupLabels(e,i)},e.prototype.detachAxisGroupLabels=function(t,e){for(var i=0,o=0;o<t.length;o++){var r=t[o],n=r.pane,s=zp(e,n)||e[0],a=o+i,p=this.createLabelAxis(r,a,s);if(p){i++;var l=n.axes.indexOf(r)+i;n.appendAxisAt(p,l)}}},e.prototype.createLabelAxis=function(t,e,i){var o=t.options.labels,r=o.position,n=r!==_&&r!==E,s=o.visible;if(n||!1===s)return null;var a=this.groupAxes(this.panes),p=i.options.vertical?a.x:a.y,l=this.axisCrossingValues(i,p),h=r===_,c=i.range(),u=h?c.max:c.min;if(Xt(l[e],c.min,c.max)-u==0)return null;l.splice(e+1,0,u),i.options.axisCrossingValues=l;var d=t.clone();return t.clear(),d.options.name=void 0,d.options.line.visible=!1,d.options.crosshair=void 0,d.options.notes=void 0,d.options.plotBands=void 0,d},e.prototype.isTrendline=function(t){return t&&Ct(t.type,ss)},e.prototype.trendlineFactory=function(){},e.prototype.createTrendlineSeries=function(){var t=this,e=[];return this.series=this.series.map((function(i){if(!t.isTrendline(i))return i;var o=t.seriesByName(i.for);if(!o)throw new Error('Invalid Configuration: Unable to locate linked series "'+i.for+'" for trendline "'+i.name+'".');var r=on.current.valueFields(o),n=Wt(r),s=t.trendlineFactory(Object.assign({},{field:n},i),o);return s&&(!1===o.visible&&(s.visible=!1),s.color===S&&(s.color=o.color),e.push(s)),s})).filter((function(t){return null!==t})),e},e.prototype.seriesByName=function(t){return this.series.find((function(e){return e.name===t}))},e.prototype.getFirstPoint=function(){for(var t=0;t<this.series.length;t++){var e=this.pointsBySeriesIndex(t).find(Ip);if(e)return e}},e.prototype.getPointBelow=function(t){return this._getNextPoint(t,this._pointsByVertical,1)},e.prototype.getPointAbove=function(t){return this._getNextPoint(t,this._pointsByVertical,-1)},e.prototype.getPointToTheRight=function(t){return this._getNextPoint(t,this._pointsByHorizontal,1)},e.prototype.getPointToTheLeft=function(t){return this._getNextPoint(t,this._pointsByHorizontal,-1)},e.prototype._getNextPoint=function(t,e,i){var o=this,r=e.call(this,t).filter(Ip),n=r.indexOf(t)+i,s=function(i){var r,n=0;do{n+=i,r=e.call(o,t,n).filter(Ip)}while(0===r.length);return r};return n<0?(r=s(-1)).at(-1):n>=r.length?(r=s(1)).at(0):r[n]},e.prototype._pointsByVertical=function(t){return this.pointsByPointIndex(t.getIndex())},e.prototype._pointsByHorizontal=function(t,e){void 0===e&&(e=0);var i=it(t.series.index+e,this.series.length);return this.pointsBySeriesIndex(i)},e}(Li);function Rp(t){return!t.pane.axes.some((function(e){return e.options.vertical===t.options.vertical&&e!==t&&!1!==e.options.visible}))}function Vp(t){for(var e,i=t.length,o=0;o<i;o++){var r=t[o],n=!1!==r.options.visible;if(n||Rp(r)){var s=n?r.contentBox():r.lineBox();e?e.wrap(s):e=s.clone()}}return e||new wi}function zp(t,e){for(var i=0;i<t.length;i++){var o=t[i];if(o&&o.pane===e)return o}}var jp=function(t){return t.reduce((function(t,e){return t.concat(e.axes)}),[])};te(Ep,{series:[],plotArea:{margin:{}},background:"",border:{color:u,width:0},paneDefaults:{title:{}},legend:{inactiveItems:{labels:{color:"#919191"},markers:{color:"#919191"}}}});const Dp=Ep;var Fp={hover:function(t,e){this._dispatchEvent(t,e,us)},click:function(t,e){this._dispatchEvent(t,e,"plotAreaClick")}};const Hp=Fp;var Np=function(t,e,i){var o=e.canonicalFields(t),r=e.valueFields(t),n=e.sourceFields(t,o),s=this._seriesFields=[],a=i.query(t.type),p=t.aggregate||a;this._series=t,this._binder=e;for(var l=0;l<o.length;l++){var h=o[l],c=void 0;if(pt(p))c=p[h];else{if(0!==l&&!Ct(h,r))break;c=p}c&&s.push({canonicalName:h,name:n[l],transform:ot(c)?c:Jr[c]})}};function Up(t,e,i){var o=e,r=t;if(t.indexOf(".")>-1){for(var n=t.split(".");n.length>1;)void 0===o[r=n.shift()]&&(o[r]={}),o=o[r];r=n.shift()}o[r]=i}Np.prototype.aggregatePoints=function(t,e){var i=this._series,o=this._seriesFields,r=this._bindPoints(t||[]),n=r.dataItems[0],s=null;if(n&&!K(n)&&!G(n)){var a=function(){};a.prototype=n,s=new a}for(var p=0;p<o.length;p++){var l=o[p],h=this._bindField(r.values,l.canonicalName),c=l.transform(h,i,r.dataItems,e);if(null!==c&&pt(c)&&void 0===c.length&&!(c instanceof Date)){s=c;break}void 0!==c&&(null===s&&(s={}),Up(l.name,s,c))}return s},Np.prototype._bindPoints=function(t){for(var e=this._binder,i=this._series,o=[],r=[],n=0;n<t.length;n++){var s=t[n];o.push(e.bindPoint(i,s)),r.push(i.data[s])}return{values:o,dataItems:r}},Np.prototype._bindField=function(t,e){for(var i=[],o=t.length,r=0;r<o;r++){var n,s=t[r],a=s.valueFields;n=void 0!==a[e]?a[e]:s.fields[e],i.push(n)}return i};const Gp=Np;var Wp=function(){this._defaults={}};Wp.prototype.register=function(t,e){for(var i=0;i<t.length;i++)this._defaults[t[i]]=e},Wp.prototype.query=function(t){return this._defaults[t]},Wp.current=new Wp;const Xp=Wp;var Yp=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createLabel=function(){var t=this.options.labels,e=at({},t,t.from),i=at({},t,t.to);e.visible&&(this.labelFrom=this.createLabelElement(e),this.append(this.labelFrom)),i.visible&&(this.labelTo=this.createLabelElement(i),this.append(this.labelTo))},e.prototype.reflow=function(t){this.render();var e=this,i=e.labelFrom,o=e.labelTo,r=e.value;this.box=t,i&&(i.options.aboveAxis=r.from>r.to,i.reflow(t)),o&&(o.options.aboveAxis=r.to>r.from,o.reflow(t)),this.note&&this.note.reflow(t)},e}(Ua);Yp.prototype.defaults=at({},Yp.prototype.defaults,{labels:{format:"{0} - {1}"},tooltip:{format:"{1}"}});const qp=Yp;var Zp=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.pointType=function(){return qp},e.prototype.pointValue=function(t){return t.valueFields},e.prototype.formatPointValue=function(t,e){return null===t.value.from&&null===t.value.to?"":this.chartService.format.auto(e,t.value.from,t.value.to)},e.prototype.plotRange=function(t){return t?[t.value.from,t.value.to]:0},e.prototype.updateRange=function(t,e){var i=e.series.axis,o=t.from,r=t.to,n=this.valueAxisRanges[i];null!==t&&K(o)&&K(r)&&((n=this.valueAxisRanges[i]=n||{min:P,max:T}).min=Math.min(n.min,o),n.max=Math.max(n.max,o),n.min=Math.min(n.min,r),n.max=Math.max(n.max,r))},e.prototype.aboveAxis=function(t){var e=t.value;return e.from<e.to},e}(Ka);Zp.prototype.plotLimits=aa.prototype.plotLimits;const Qp=Zp;var Kp=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.aliasFor=function(){return this.parent},e}(ua);const $p=Kp;var Jp="auto",tl=function(t){function e(e,i){t.call(this),this.value=e,this.options=i,this.aboveAxis=Kt(this.options.aboveAxis,!0),this.tooltipTracking=!0,this._id=Be(),this.initLabelsFormat()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.render=function(){if(!this._rendered){this._rendered=!0;var t=this.options,e=t.markers,i=t.labels,o=this.value,r=this.fromPoint=new $p(o,at({},this.options,{labels:i.from,markers:e.from})),n=this.toPoint=new $p(o,at({},this.options,{labels:i.to,markers:e.to}));this.copyFields(r),this.copyFields(n),this.append(r),this.append(n)}},e.prototype.reflow=function(t){this.render();var e=t.from,i=t.to;this.positionLabels(e,i),this.fromPoint.reflow(e),this.toPoint.reflow(i),this.box=this.fromPoint.markerBox().clone().wrap(this.toPoint.markerBox())},e.prototype.createHighlight=function(){var t=new q.drawing.Group;return t.append(this.fromPoint.createHighlight()),t.append(this.toPoint.createHighlight()),t},e.prototype.highlightVisual=function(){return this.visual},e.prototype.highlightVisualArgs=function(){return{options:this.options,from:this.fromPoint.highlightVisualArgs(),to:this.toPoint.highlightVisualArgs()}},e.prototype.createFocusHighlight=function(){var t=new q.drawing.Group;return t.append(this.fromPoint.createFocusHighlight()),t.append(this.toPoint.createFocusHighlight()),t},e.prototype.tooltipAnchor=function(){var t=this.owner.pane.clipBox();if(!t||t.overlaps(this.box)){var e,i,o,r=this.box,n=r.center(),s=C;return this.options.vertical?(e=n.x,i=r.y1-5,o=d):(e=r.x2+5,i=n.y,o=f),{point:new xi(e,i),align:{horizontal:s,vertical:o}}}},e.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},e.prototype.overlapsBox=function(t){return this.box.overlaps(t)},e.prototype.unclipElements=function(){this.fromPoint.unclipElements(),this.toPoint.unclipElements()},e.prototype.initLabelsFormat=function(){var t=this.options.labels;t.format||(t.from&&t.from.format||(t.from=Object.assign({},t.from,{format:"{0}"})),t.to&&t.to.format||(t.to=Object.assign({},t.to,{format:"{1}"})))},e.prototype.positionLabels=function(t,e){var i,o,r=this.options,n=r.labels,s=r.vertical;n.position===Jp&&(s?e.y1<=t.y1?(o=vn,i=mn):(o=mn,i=vn):e.x1<=t.x1?(o=C,i=B):(o=B,i=C),n.from&&n.from.position||(this.fromPoint.options.labels.position=i),n.to&&n.to.position||(this.toPoint.options.labels.position=o))},e.prototype.copyFields=function(t){t.dataItem=this.dataItem,t.category=this.category,t.series=this.series,t.color=this.color,t.owner=this.owner},e.prototype.focusVisual=function(){this.fromPoint.focusVisual()},e.prototype.clearFocusFromVisual=function(){this.toPoint.clearFocusFromVisual()},e.prototype.getIndex=function(){return this.categoryIx},e.prototype.getLabelText=function(t){var e=vt(t);return e?e(this.pointData()):t.format?this.formatValue(t.format):this.value},e.prototype.getAriaLabelText=function(){var t=this.options.labels,e=mt(t);return e?e(this.pointData()):this.getLabelText(t)},e.prototype.pointData=function(){return{dataItem:this.dataItem,category:this.category,value:this.value,percentage:this.percentage,stackValue:this.stackValue,series:this.series}},e}(Li);at(tl.prototype,la),at(tl.prototype,ha),tl.prototype.defaults={markers:{visible:!1,background:j,size:8,type:g,border:{width:2},opacity:1},labels:{visible:!1,margin:dt(3),padding:dt(4),animation:{type:hn,delay:ln},position:Jp},notes:{label:{}},highlight:{markers:{border:{color:j,width:2}},zIndex:100},tooltip:{format:"{0} - {1}"},accessibility:{role:Ss,className:Cs,ariaRoleDescription:Ps}};const el=tl;var il=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createStrokeSegments=function(){return this.segmentsFromPoints(this.toGeometryPoints(this.toPoints()))},e.prototype.stackSegments=function(){var t=this.fromSegments;return this.fromSegments||(t=this.fromSegments=this.segmentsFromPoints(this.toGeometryPoints(this.fromPoints().reverse()))),t},e.prototype.createStroke=function(t){var e=new q.drawing.Path(t),i=new q.drawing.Path(t);e.segments.push.apply(e.segments,this.strokeSegments()),i.segments.push.apply(i.segments,this.stackSegments()),this.visual.append(e),this.visual.append(i)},e.prototype.hasStackSegment=function(){return!0},e.prototype.fromPoints=function(){return this.linePoints.map((function(t){return t.fromPoint}))},e.prototype.toPoints=function(){return this.linePoints.map((function(t){return t.toPoint}))},e}(Oa);const ol=il;var rl=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createStrokeSegments=function(){return this.createCurveSegments(this.toPoints())},e.prototype.stackSegments=function(){var t=this.fromSegments;return this.fromSegments||(t=this.fromSegments=this.createCurveSegments(this.fromPoints().reverse())),t},e.prototype.createCurveSegments=function(t){return(new Gr).process(this.toGeometryPoints(t))},e}(ol);const nl=rl;var sl=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createStrokeSegments=function(){return this.segmentsFromPoints(this.calculateStepPoints(this.toPoints()))},e.prototype.stackSegments=function(){var t=this.fromSegments;return this.fromSegments||(t=this.fromSegments=this.segmentsFromPoints(this.calculateStepPoints(this.fromPoints()))).reverse(),t},e}(ol);at(sl.prototype,va);const al=sl;var pl=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.render=function(){t.prototype.render.call(this),this.renderSegments()},e.prototype.pointType=function(){return el},e.prototype.createPoint=function(t,e){var i=e.series,o=e.seriesIx,r=t.valueFields;if(!$s(r.from)&&!$s(r.to)){if(this.seriesMissingValues(i)!==gn)return null;r={from:0,to:0}}var n=this.pointOptions(i,o);n=this.evalPointOptions(n,r,e);var s=t.fields.color||i.color;ot(i.color)&&(s=n.color);var a=new el(r,n);return a.color=s,this.append(a),a},e.prototype.createSegment=function(t,e,i){var o=(e.line||{}).style;return new("smooth"===o?nl:"step"===o?al:ol)(t,e,i)},e.prototype.plotRange=function(t,e){return t?[t.value.from,t.value.to]:[e,e]},e.prototype.valueSlot=function(t,e){var i=t.getSlot(e[0],e[0],!this.options.clip),o=t.getSlot(e[1],e[1],!this.options.clip);if(i&&o)return{from:i,to:o}},e.prototype.pointSlot=function(t,e){var i,o,r=e.from,n=e.to;return this.options.invertAxes?(i=new wi(r.x1,t.y1,r.x2,t.y2),o=new wi(n.x1,t.y1,n.x2,t.y2)):(i=new wi(t.x1,r.y1,t.x2,r.y2),o=new wi(t.x1,n.y1,t.x2,n.y2)),{from:i,to:o}},e.prototype.addValue=function(e,i){var o=e.valueFields;K(o.from)||(o.from=o.to),K(o.to)||(o.to=o.from),t.prototype.addValue.call(this,e,i)},e.prototype.updateRange=function(t,e){if(null!==t&&K(t.from)&&K(t.to)){var i=e.series.axis,o=this.valueAxisRanges[i]=this.valueAxisRanges[i]||{min:P,max:T},r=t.from,n=t.to;o.min=Math.min(o.min,r,n),o.max=Math.max(o.max,r,n)}},e.prototype.formatPointValue=function(t,e){var i=t.value;return this.chartService.format.auto(e,i.from,i.to)},e.prototype.animationPoints=function(){for(var t=this.points,e=[],i=0;i<t.length;i++){var o=t[i];o&&(e.push((o.fromPoint||{}).marker),e.push((o.toPoint||{}).marker))}return e.concat(this._segments)},e}(aa);at(pl.prototype,ka,Ca);const ll=pl;var hl=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reflow=function(t){var e=this,i=e.options,o=e.value,r=e.owner.seriesValueAxis(i),n=[],s=[],a=[],p=r.getSlot(o.low,o.high),l=r.getSlot(o.open,o.open),h=r.getSlot(o.close,o.close);l.x1=h.x1=p.x1=t.x1,l.x2=h.x2=p.x2=t.x2;var c=p.center().x;n.push([l.x1,l.y1]),n.push([c,l.y1]),s.push([c,h.y1]),s.push([h.x2,h.y1]),a.push([c,p.y1]),a.push([c,p.y2]),this.lines=[n,s,a],this.box=p.clone().wrap(l.clone().wrap(h)),this.reflowNote()},e.prototype.createBody=function(){},e}(Ja);const cl=hl;var ul=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.pointType=function(){return cl},e}(ep);const dl=ul;var fl=function(t){function e(e,i,o){t.call(this),this.from=e,this.to=i,this.series=o}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.linePoints=function(){var t=this.from,e=this.from.box,i=this.to.box,o=[];if(t.isVertical){var r=t.aboveAxis?e.y1:e.y2;o.push([e.x1,r],[i.x2,r])}else{var n=t.aboveAxis?e.x2:e.x1;o.push([n,e.y1],[n,i.y2])}return o},e.prototype.createVisual=function(){t.prototype.createVisual.call(this);var e=this.series.line||{},i=q.drawing.Path.fromPoints(this.linePoints(),{stroke:{color:e.color,width:e.width,opacity:e.opacity,dashType:e.dashType}});Z(i),this.visual.append(i)},e}(Li);te(fl,{animation:{type:hn,delay:ln}});const gl=fl;var yl=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.render=function(){t.prototype.render.call(this),this.createSegments()},e.prototype.traverseDataPoints=function(t){for(var e=this.options.series,i=Gs(e),o=!this.options.invertAxes,r=0;r<e.length;r++)for(var n=e[r],s=0,a=0,p=0;p<i;p++){var l=on.current.bindPoint(n,p),h=l.valueFields.value,c=l.fields.summary,u=s,d=void 0;c?"total"===c.toLowerCase()?(l.valueFields.value=s,u=0,d=s):(l.valueFields.value=a,d=u-a,a=0):K(h)&&(a+=h,d=s+=h),t(l,{category:this.categoryAxis.categoryAt(p),categoryIx:p,series:n,seriesIx:r,total:s,runningTotal:a,from:u,to:d,isVertical:o})}},e.prototype.updateRange=function(e,i){t.prototype.updateRange.call(this,{value:i.to},i)},e.prototype.aboveAxis=function(t){return t.value>=0},e.prototype.plotRange=function(t){return[t.from,t.to]},e.prototype.createSegments=function(){for(var t=this.options.series,e=this.seriesPoints,i=this.segments=[],o=0;o<t.length;o++){var r=t[o],n=e[o];if(n)for(var s=void 0,a=0;a<n.length;a++){var p=n[a];if(p&&s){var l=new gl(s,p,r);i.push(l),this.append(l)}s=p}}},e}(Ka);const vl=yl,ml=function(t,e,i){var o=t[String(e)];return o?o(i):null},xl=function(t,e){for(var i,o,r=0,n=0,s=0,a=0,p=0,l=Number.MAX_VALUE,h=Number.MIN_VALUE,c=0;c<t.length;c++){var u=e(t[c]),d=u.xValue,f=u.yValue;isFinite(d)&&null!==d&&isFinite(f)&&null!==f&&(l=Math.min(d,l),h=Math.max(d,h),p++,r+=d,n+=f,s+=Math.pow(d,2),a+=d*f)}return p>0&&(o=(n-(i=(p*a-r*n)/(p*s-Math.pow(r,2)))*r)/p),{slope:i,intercept:o,count:p,xMin:l,xMax:h}},bl=function(t,e){return t.every((function(t){var i=t.valueFields;return!$s(i[e])||i[e]>0}))},_l=function(t,e){for(var i=[],o=e.totalRangeIndices(),r=e.currentRangeIndices(),n={min:Math.floor(Math.max(r.min-1,o.min)),max:Math.ceil(Math.min(r.max+2,o.max))},s=n.min;s<n.max;s++){var a=s+1;i[s]={category:e.categoryAt(s,!0),value:t(a)}}return i};const wl=function(t,e,i){for(var o=[],r=[],n=Math.max(2,i)-1,s=0,a=0,p=0;p<t.length;p++){var l=e(t[p]),h=l.xValue,c=l.yValue;if(isFinite(c)&&null!==c?(r.push(c),a+=c,s=Math.max(p,s)):r.push(null),p>=n){var u=r.filter((function(t){return null!==t})).length,d=r.shift()||0;if(u>0){var f=a/u;o.push([h,f]),a-=d;continue}}o.push([h,null])}return o.slice(0,s+1)};const kl=function(t,e,i){for(var o=Math.min(Math.max(i||1,1),6)+1,r=new Ce,n=new Ce,s=0,a=Number.MAX_VALUE,p=Number.MIN_VALUE,l=function(t){return t},h=[],c=0;c<t.length;c++){var u=e(t[c]),d=u.xValue,f=u.yValue;if(isFinite(d)&&null!==d&&isFinite(f)&&null!==f){a=Math.min(d,a),p=Math.max(d,p),s++,n.set(c,0,f),r.set(c,0,1),r.set(c,1,d);for(var g=2;g<=o;g++)r.set(c,g,Math.pow(r.get(c,1),g))}else r.set(c,0,0)}return r.width=Math.min(o,s),s>0&&(h=function(t,e){for(var i=t.transpose(),o=i.multiply(t).inverse().multiply(i).multiply(e),r=[],n=0;n<o.height;n++)r.push(o.get(n,0));return r}(r,n),l=function(t){return h.reduce((function(e,i,o){return e+i*Math.pow(t,o)}),0)}),{coefficients:h,count:s,valueMapper:l,xMin:a,xMax:p}};var Al={};Al[ts]=function(t){var e=t.options,i=t.categoryAxis,o=function(t){var e=t.categoryAxis,i=t.options,o=(0,t.seriesValues)();if(!bl(o,i.field))return null;var r,n=xl(o,(r=i.field,function(t){var e=t.categoryIx,i=t.valueFields;return{xValue:e+1,yValue:Math.log(i[r])}})),s=n.slope,a=n.intercept;if(n.count>0){var p=Math.exp(a),l=s;return _l((function(t){return p*Math.exp(l*t)}),e)}return null}({seriesValues:t.seriesValues,categoryAxis:i,options:e});return o?Object.assign({},e,{type:"line",data:o,categoryField:"category",field:"value"}):null},Al[es]=function(t){var e=t.options,i=t.categoryAxis,o=function(t){var e,i=t.categoryAxis,o=t.options,r=xl((0,t.seriesValues)(),(e=o.field,function(t){return{xValue:t.categoryIx+1,yValue:t.valueFields[e]}})),n=r.slope,s=r.intercept;return r.count>0?_l((function(t){return n*t+s}),i):null}({seriesValues:t.seriesValues,categoryAxis:i,options:e});return o?Object.assign({},e,{type:"line",data:o,categoryField:"category",field:"value"}):null},Al[is]=function(t){var e=t.options,i=t.categoryAxis,o=function(t){var e,i=t.categoryAxis,o=t.options,r=xl((0,t.seriesValues)(),(e=o.field,function(t){var i=t.categoryIx,o=t.valueFields;return{xValue:Math.log(i+1),yValue:o[e]}})),n=r.slope,s=r.intercept;if(r.count>0){var a=n,p=s;return _l((function(t){return a*Math.log(t)+p}),i)}return null}({seriesValues:t.seriesValues,categoryAxis:i,options:e});return o?Object.assign({},e,{type:"line",data:o,categoryField:"category",field:"value"}):null},Al[os]=function(t){var e=t.options,i=function(t){var e=t.categoryAxis,i=function(t){var e,i=t.options,o=t.categoryAxis,r=t.seriesValues,n=(i.trendline||{}).period||2,s=o.totalRangeIndices(),a=o.currentRangeIndices(),p={min:Math.floor(Math.max(a.min-n,s.min)),max:Math.ceil(Math.min(a.max+n+2,s.max))};return wl(r(p),(e=i.field,function(t){return{xValue:t.categoryIx,yValue:t.valueFields[e]}}),n)}(t),o=[];return i.forEach((function(t){var i=t[0],r=t[1];o[i]={category:e.categoryAt(i,!0),value:r}})),o.length>0?o:null}(t);return i?Object.assign({},e,{type:"line",data:i,categoryField:"category",field:"value"}):null},Al[rs]=function(t){var e=t.options,i=t.categoryAxis,o=function(t){var e,i=t.seriesValues,o=t.categoryAxis,r=t.options,n=(r.trendline||{}).order,s=kl(i(),(e=r.field,function(t){return{xValue:t.categoryIx+1,yValue:t.valueFields[e]}}),n),a=s.count,p=s.valueMapper;return a>0?_l((function(t){return p(t)}),o):null}({seriesValues:t.seriesValues,categoryAxis:i,options:e});return o?Object.assign({},e,{type:"line",data:o,categoryField:"category",field:"value"}):null},Al[ns]=function(t){var e=t.options,i=t.categoryAxis,o=function(t){var e=t.categoryAxis,i=t.options,o=(0,t.seriesValues)();if(!bl(o,i.field))return null;var r,n=xl(o,(r=i.field,function(t){var e=t.categoryIx,i=t.valueFields;return{xValue:Math.log(e+1),yValue:Math.log(i[r])}})),s=n.slope,a=n.intercept;if(n.count>0){var p=Math.exp(a),l=s;return _l((function(t){return p*Math.pow(t,l)}),e)}return null}({seriesValues:t.seriesValues,categoryAxis:i,options:e});return o?Object.assign({},e,{type:"line",data:o,categoryField:"category",field:"value"}):null};const Sl=Al;var Cl=[_n,Yn,Nn,Kn],Pl=[In,Qn].concat(Cl),Tl=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initFields=function(t){if(this.namedCategoryAxes={},this.namedValueAxes={},this.valueAxisRangeTracker=new ja,this._seriesPointsCache={},this._currentPointsCache={},t.length>0){this.invertAxes=Ct(t[0].type,[wn,Sn,Qn,Yn,Kn,Un,Bn,qn]);for(var e=0;e<t.length;e++){var i=t[e].stack;if(i&&"100%"===i.type){this.stack100=!0;break}}}},e.prototype.render=function(t){void 0===t&&(t=this.panes),this.series=[].concat(this.originalSeries),this.createCategoryAxes(t),this.aggregateCategories(t),this.createTrendlineSeries(t),this.createCategoryAxesLabels(t),this.createCharts(t),this.createValueAxes(t)},e.prototype.removeAxis=function(e){var i=e.options.name;t.prototype.removeAxis.call(this,e),e instanceof nr?delete this.namedCategoryAxes[i]:(this.valueAxisRangeTracker.reset(i),delete this.namedValueAxes[i]),e===this.categoryAxis&&delete this.categoryAxis,e===this.valueAxis&&delete this.valueAxis},e.prototype.trendlineFactory=function(t,e){var i=this.seriesCategoryAxis(t),o=this.seriesValues.bind(this,e.index),r=ml(Sl,t.type,{options:t,categoryAxis:i,seriesValues:o});return r?(r.categoryAxis=e.categoryAxis,r.valueAxis=e.valueAxis,this.filterSeries(r,i)):r},e.prototype.trendlineAggregateForecast=function(){return this.series.map((function(t){return(t.trendline||{}).forecast})).filter((function(t){return void 0!==t})).reduce((function(t,e){return{before:Math.max(t.before,e.before||0),after:Math.max(t.after,e.after||0)}}),{before:0,after:0})},e.prototype.seriesValues=function(t,e){var i=[],o=this.srcSeries[t],r=this.seriesCategoryAxis(o);Ws(r.options.type,m)&&(this._seriesPointsCache={},this._currentPointsCache={},r.options.dataItems=[],o=this.aggregateSeries(o,r,r.totalRangeIndices()));for(var n=e?e.min:0,s=e?e.max:o.data.length,a=n;a<s;a++){var p=this.bindPoint(o,a);i.push({categoryIx:a,category:p.fields.category,valueFields:p.valueFields})}return i},e.prototype.createCharts=function(t){for(var e=this.groupSeriesByPane(),i=0;i<t.length;i++){var o=t[i],r=e[o.options.name||"default"]||[];this.addToLegend(r);var n=this.filterVisibleSeries(r);if(n)for(var s=this.groupSeriesByCategoryAxis(n),a=0;a<s.length;a++)this.createChartGroup(s[a],o)}},e.prototype.createChartGroup=function(t,e){this.createAreaChart(qs(t,[_n,Yn]),e),this.createRangeAreaChart(qs(t,[Nn,Kn]),e),this.createBarChart(qs(t,[Pn,wn]),e),this.createRangeBarChart(qs(t,[Gn,Un]),e),this.createBulletChart(qs(t,[Sn,Zn]),e),this.createCandlestickChart(qs(t,Cn),e),this.createBoxPlotChart(qs(t,[kn,qn]),e),this.createOHLCChart(qs(t,En),e),this.createWaterfallChart(qs(t,[$n,Bn]),e),this.createLineChart(qs(t,[In,Qn]),e)},e.prototype.aggregateCategories=function(t){var e=[].concat(this.series),i=[];this._currentPointsCache={},this._seriesPointsCache=this._seriesPointsCache||{};for(var o=0;o<e.length;o++){var r=e[o];if(!this.isTrendline(r)){var n=this.seriesCategoryAxis(r),s=this.findPane(n.options.pane);r=(Ws(n.options.type,m)||r.categoryField)&&Ct(s,t)?this.aggregateSeries(r,n,n.currentRangeIndices()):this.filterSeries(r,n)}i.push(r)}this._seriesPointsCache=this._currentPointsCache,this._currentPointsCache=null,this.srcSeries=e,this.series=i},e.prototype.filterSeries=function(t,e){var i=(t.data||{}).length;if(e._seriesMax=Math.max(e._seriesMax||0,i),!jt(e.options.min)&&!jt(e.options.max))return t;var o=e.currentRangeIndices(),r=Ct(t.type,Pl),n=at({},t);return n.data=(n.data||[]).slice(o.min,o.max+1),r&&ra(n,o,i,(function(i){return{item:t.data[i],category:e.categoryAt(i,!0),categoryIx:i-o.min}}),(function(e){return jt(t.data[e])})),n},e.prototype.clearSeriesPointsCache=function(){this._seriesPointsCache={}},e.prototype.seriesSourcePoints=function(t,e){var i=t.index+";"+e.categoriesHash();if(this._seriesPointsCache&&this._seriesPointsCache[i])return this._currentPointsCache[i]=this._seriesPointsCache[i],this._seriesPointsCache[i];var o=e.options,r=o.srcCategories,n=Ws(o.type,m),s=t.data,a=[];n||e.indexCategories();for(var p=0;p<s.length;p++){var l=on.current.bindPoint(t,p).fields.category;if(n&&(l=Qs(l,s[p],this.chartService.intl)),void 0===l&&(l=r[p]),null!=l){var h=e.totalIndex(l);a[h]=a[h]||{items:[],category:l},a[h].items.push(p)}}return this._currentPointsCache[i]=a,a},e.prototype.aggregateSeries=function(t,e,i){if(!t.data.length)return t;for(var o=this.seriesSourcePoints(t,e),r=at({},t),n=new Gp(at({},t),on.current,Xp.current),s=r.data=[],a=e.options.dataItems||[],p=function(t){var r=t-i.min,s=o[t];if(s||(s=o[t]={}),s.categoryIx=r,!s.item){var a=e.categoryAt(t,!0);s.category=a,s.item=n.aggregatePoints(s.items,a)}return s},l=i.min;l<=i.max;l++){var h=p(l);s[h.categoryIx]=h.item,h.items&&h.items.length&&(a[h.categoryIx]=h.item)}return Ct(r.type,Pl)&&ra(r,i,e.totalCount(),p,(function(t){return o[t]})),e.options.dataItems=a,r},e.prototype.appendChart=function(e,i){var o=e.options.series,r=this.seriesCategoryAxis(o[0]),n=r.options.categories,s=Math.max(0,Gs(o)-n.length);if(s>0)for(n=r.options.categories=r.options.categories.slice(0);s--;)n.push("");this.valueAxisRangeTracker.update(e.valueAxisRanges),t.prototype.appendChart.call(this,e,i)},e.prototype.seriesPaneName=function(t){var e=this.options,i=t.axis,o=[].concat(e.valueAxis),r=wt(o,(function(t){return t.name===i}))[0],n=((e.panes||[{}])[0]||{}).name||"default";return(r||{}).pane||n},e.prototype.seriesCategoryAxis=function(t){var e=t.categoryAxis,i=e?this.namedCategoryAxes[e]:this.categoryAxis;if(!i)throw new Error("Unable to locate category axis with name "+e);return i},e.prototype.stackableChartOptions=function(t,e){var i=t.some((function(t){return t.stack})),o=t.some((function(t){return t.stack&&"100%"===t.stack.type})),r=e.options.clip;return{defaultStack:t[0].stack,isStacked:i,isStacked100:o,clip:r}},e.prototype.groupSeriesByCategoryAxis=function(t){for(var e=[],i={},o=0;o<t.length;o++){var r=t[o].categoryAxis||"$$default$$";Ae(i,r)||(i[r]=!0,e.push(r))}for(var n=[],s=0;s<e.length;s++){var a=Ol(t,e[s],s);0!==a.length&&n.push(a)}return n},e.prototype.createBarChart=function(t,e){if(0!==t.length){var i=t[0],o=new Ka(this,Object.assign({series:t,invertAxes:this.invertAxes,gap:i.gap,spacing:i.spacing},this.stackableChartOptions(t,e)));this.appendChart(o,e)}},e.prototype.createRangeBarChart=function(t,e){if(0!==t.length){var i=t[0],o=new Qp(this,{series:t,invertAxes:this.invertAxes,gap:i.gap,spacing:i.spacing});this.appendChart(o,e)}},e.prototype.createBulletChart=function(t,e){if(0!==t.length){var i=t[0],o=new _p(this,{series:t,invertAxes:this.invertAxes,gap:i.gap,spacing:i.spacing,clip:e.options.clip});this.appendChart(o,e)}},e.prototype.createLineChart=function(t,e){if(0!==t.length){var i=new Ta(this,Object.assign({invertAxes:this.invertAxes,series:t},this.stackableChartOptions(t,e)));this.appendChart(i,e)}},e.prototype.createAreaChart=function(t,e){if(0!==t.length){var i=new Va(this,Object.assign({invertAxes:this.invertAxes,series:t},this.stackableChartOptions(t,e)));this.appendChart(i,e)}},e.prototype.createRangeAreaChart=function(t,e){if(0!==t.length){var i=new ll(this,{invertAxes:this.invertAxes,series:t,clip:e.options.clip});this.appendChart(i,e)}},e.prototype.createOHLCChart=function(t,e){if(0!==t.length){var i=t[0],o=new dl(this,{invertAxes:this.invertAxes,gap:i.gap,series:t,spacing:i.spacing,clip:e.options.clip});this.appendChart(o,e)}},e.prototype.createCandlestickChart=function(t,e){if(0!==t.length){var i=t[0],o=new ep(this,{invertAxes:this.invertAxes,gap:i.gap,series:t,spacing:i.spacing,clip:e.options.clip});this.appendChart(o,e)}},e.prototype.createBoxPlotChart=function(t,e){if(0!==t.length){var i=t[0],o=new ap(this,{invertAxes:this.invertAxes,gap:i.gap,series:t,spacing:i.spacing,clip:e.options.clip});this.appendChart(o,e)}},e.prototype.createWaterfallChart=function(t,e){if(0!==t.length){var i=t[0],o=new vl(this,{series:t,invertAxes:this.invertAxes,gap:i.gap,spacing:i.spacing});this.appendChart(o,e)}},e.prototype.axisRequiresRounding=function(t,e){for(var i=qs(this.series,Jn),o=0;o<this.series.length;o++){var r=this.series[o];if(Ct(r.type,Cl)){var n=r.line;n&&n.style===bn&&i.push(r)}}for(var s=0;s<i.length;s++){var a=i[s].categoryAxis||"";if(a===t||!a&&0===e)return!0}},e.prototype.aggregatedAxis=function(t,e){for(var i=this.series,o=0;o<i.length;o++){var r=i[o].categoryAxis||"";if((r===t||!r&&0===e)&&i[o].categoryField)return!0}},e.prototype.createCategoryAxesLabels=function(){for(var t=this.axes,e=0;e<t.length;e++)t[e]instanceof nr&&t[e].createLabels()},e.prototype.createCategoryAxes=function(t){for(var e=this.invertAxes,i=[].concat(this.options.categoryAxis),o=[],r=0;r<i.length;r++){var n=i[r];if(Ct(this.findPane(n.pane),t)){var s=n.name,a=n.categories;void 0===a&&(a=[]),n=at({vertical:e,reverse:!e&&this.chartService.rtl,axisCrossingValue:e?P:0},n),jt(n.justified)||(n.justified=this.isJustified()),this.axisRequiresRounding(s,r)&&(n.justified=!1);var p=void 0;if(Js(n,a[0])?(n._forecast=this.trendlineAggregateForecast(),p=new fr(n,this.chartService)):p=new nr(n,this.chartService),i[r].categories=p.options.srcCategories,s){if(this.namedCategoryAxes[s])throw new Error("Category axis with name "+s+" is already defined");this.namedCategoryAxes[s]=p}p.axisIndex=r,o.push(p),this.appendAxis(p)}}var l=this.categoryAxis||o[0];this.categoryAxis=l,e?this.axisY=l:this.axisX=l},e.prototype.isJustified=function(){for(var t=this.series,e=0;e<t.length;e++)if(!Ct(t[e].type,Cl))return!1;return!0},e.prototype.createValueAxes=function(t){var e=this.valueAxisRangeTracker,i=e.query(),o=[].concat(this.options.valueAxis),r=this.invertAxes,n={vertical:!r,reverse:r&&this.chartService.rtl},s=[];this.stack100&&(n.roundToMajorUnit=!1,n.labels={format:"P0"});for(var a=0;a<o.length;a++){var p=o[a];if(Ct(this.findPane(p.pane),t)){var l=p.name,h=Ws(p.type,Ts)?{min:.1,max:1}:{min:0,max:1},c=e.query(l)||i||h;0===a&&c&&i&&(c.min=Math.min(c.min,i.min),c.max=Math.max(c.max,i.max));var u=new(Ws(p.type,Ts)?Tr:_r)(c.min,c.max,at({},n,p),this.chartService);if(l){if(this.namedValueAxes[l])throw new Error("Value axis with name "+l+" is already defined");this.namedValueAxes[l]=u}u.axisIndex=a,s.push(u),this.appendAxis(u)}}var d=this.valueAxis||s[0];this.valueAxis=d,r?this.axisX=d:this.axisY=d},e.prototype._dispatchEvent=function(t,e,i){var o=t._eventCoordinates(e),r=new xi(o.x,o.y),n=this.pointPane(r),s=[],a=[];if(n){for(var p=n.axes,l=0;l<p.length;l++){var h=p[l];h.getValue?Fs(a,h.getValue(r)):Fs(s,h.getCategory(r))}0===s.length&&Fs(s,this.categoryAxis.getCategory(r)),s.length>0&&a.length>0&&t.trigger(i,{element:Ut(e),originalEvent:e,category:ta(s),value:ta(a)})}},e.prototype.pointPane=function(t){for(var e=this.panes,i=0;i<e.length;i++){var o=e[i];if(o.contentBox.containsPoint(t))return o}},e.prototype.updateAxisOptions=function(t,e){Ml(this.options,t,e),Ml(this.originalOptions,t,e)},e.prototype._pointsByVertical=function(t,e){return void 0===e&&(e=0),this.invertAxes?this._siblingsBySeriesIndex(t.series.index,e):this._siblingsByPointIndex(t.getIndex())},e.prototype._pointsByHorizontal=function(t,e){if(void 0===e&&(e=0),this.invertAxes)return this._siblingsByPointIndex(t.getIndex());var i=this._siblingsBySeriesIndex(t.series.index,e);return this.chartService.rtl?i.reverse():i},e.prototype._siblingsByPointIndex=function(t){for(var e=this.charts,i=[],o=0;o<e.length;o++){var r=e[o];if(!r.pane||"_navigator"!==r.pane.options.name){var n=r.points.filter((function(e){return e&&!1!==e.visible&&e.getIndex()===t}));i.push.apply(i,n.sort(this._getSeriesCompareFn(n[0])))}}return i},e.prototype._siblingsBySeriesIndex=function(t,e){var i=it(t+e,this.series.length);return this.pointsBySeriesIndex(i)},e.prototype._getSeriesCompareFn=function(t){var e=this._isInStackedSeries(t);return e&&this.invertAxes||!e&&!this.invertAxes?function(t,e){return t.box.center().x-e.box.center().x}:function(t,e){return t.box.center().y-e.box.center().y}},e.prototype._isInStackedSeries=function(t){var e=Ct(t.series.type,[_n,Yn,Nn,Kn,In,Qn,Hn,Dn]),i=Ct(t.series.type,[Pn,wn]);return e||i&&t.options.isStacked},e}(Dp);function Ml(t,e,i){at([].concat(e instanceof nr?t.categoryAxis:t.valueAxis)[e.axisIndex],i)}function Ol(t,e,i){return wt(t,(function(t){return 0===i&&!t.categoryAxis||t.categoryAxis===e}))}te(Tl,{categoryAxis:{},valueAxis:{}}),at(Tl.prototype,Hp);const Ll=Tl;var Bl=function(){this._points=[]};function Il(){this._defaultPrevented=!0}Bl.prototype.destroy=function(){this._points=[]},Bl.prototype.show=function(t,e){var i=[].concat(t);this.hide();for(var o=0;o<i.length;o++){var r=i[o];r&&r.toggleHighlight&&r.hasHighlight()&&(this.togglePointHighlight(r,!0,e),this._points.push(r))}},Bl.prototype.togglePointHighlight=function(t,e,i){var o=(t.options.highlight||{}).toggle,r=t.options.highlight||{},n=void 0!==i?i:r.inactiveOpacity;if(o){var s={category:t.category,series:t.series,dataItem:t.dataItem,value:t.value,stackValue:t.stackValue,preventDefault:Il,visual:t.highlightVisual(),show:e};o(s),s._defaultPrevented||t.toggleHighlight(e,n)}else t.toggleHighlight(e,n)},Bl.prototype.hide=function(){for(var t=this._points;t.length;){var e=t.pop(),i=e.options.highlight||{};this.togglePointHighlight(e,!1,i.inactiveOpacity)}},Bl.prototype.isHighlighted=function(t){for(var e=this._points,i=0;i<e.length;i++)if(t===e[i])return!0;return!1};const El=Bl;function Rl(t,e){var i=(e||"").toLowerCase(),o=t.event;return"none"===i&&!(o.ctrlKey||o.shiftKey||o.altKey)||o[i+"Key"]}function Vl(t){for(var e={},i=0;i<t.length;i++){var o=t[i];o.axis.options.name&&(e[o.axis.options.name]={min:o.range.min,max:o.range.max})}return e}var zl=function(t,e){this.plotArea=t,this.options=at({},this.options,e)};zl.prototype.start=function(t){return this._active=Rl(t,this.options.key),this._active},zl.prototype.move=function(t){if(this._active){var e=this.axisRanges=this._panAxes(t,F).concat(this._panAxes(t,H));if(e.length)return this.axisRanges=e,Vl(e)}},zl.prototype.end=function(){var t=this._active;return this._active=!1,t},zl.prototype.pan=function(){var t=this.plotArea,e=this.axisRanges;if(e.length){for(var i=0;i<e.length;i++){var o=e[i];t.updateAxisOptions(o.axis,o.range)}t.redraw(t.panes)}},zl.prototype.destroy=function(){delete this.plotArea},zl.prototype._panAxes=function(t,e){var i=this.plotArea,o=-t[e].delta,r=(this.options.lock||"").toLowerCase(),n=[];if(0!==o&&(r||"").toLowerCase()!==e)for(var s=i.axes,a=0;a<s.length;a++){var p=s[a];if(e===F&&!p.options.vertical||e===H&&p.options.vertical){var l=p.pan(o);l&&(l.limitRange=!0,n.push({axis:p,range:l}))}}return n},zl.prototype.options={key:"none",lock:"none"};const jl=zl;var Dl=function(t,e){this.chart=t,this.options=at({},this.options,e),this.createElement()};Dl.prototype.createElement=function(){var t=this._marquee=document.createElement("div");t.className="k-marquee";var e=document.createElement("div");e.className="k-marquee-color",t.appendChild(e)},Dl.prototype.removeElement=function(){this._marquee.parentNode&&this._marquee.parentNode.removeChild(this._marquee)},Dl.prototype.setStyles=function(t){ut(this._marquee,t)},Dl.prototype.start=function(t){if(Rl(t,this.options.key)){var e=this.chart,i=e._eventCoordinates(t),o=this._zoomPane=e._plotArea.paneByPoint(i),r=o?o.chartsBox().clone():null;if(o&&r){var n=this._elementOffset();return r.translate(n.left,n.top),this._zoomPaneClipBox=r,document.body.appendChild(this._marquee),this.setStyles({left:t.pageX+1,top:t.pageY+1,width:0,height:0}),!0}}return!1},Dl.prototype._elementOffset=function(){var t=this.chart.element,e=ut(t,["paddingLeft","paddingTop"]),i=e.paddingLeft,o=e.paddingTop,r=Ft(t);return{left:i+r.left,top:o+r.top}},Dl.prototype.move=function(t){this._zoomPane&&this.setStyles(this._selectionPosition(t))},Dl.prototype.end=function(t){if(this._zoomPane){var e=this._elementOffset(),i=this._selectionPosition(t);i.left-=e.left,i.top-=e.top;var o={x:i.left,y:i.top},r={x:i.left+i.width,y:i.top+i.height};return this._updateAxisRanges(o,r),this.removeElement(),delete this._zoomPane,Vl(this.axisRanges)}},Dl.prototype.zoom=function(){var t=this.axisRanges;if(t&&t.length){for(var e=this.chart._plotArea,i=0;i<t.length;i++){var o=t[i];e.updateAxisOptions(o.axis,o.range)}e.redraw(e.panes)}},Dl.prototype.destroy=function(){this.removeElement(),delete this._marquee,delete this.chart},Dl.prototype._updateAxisRanges=function(t,e){for(var i=(this.options.lock||"").toLowerCase(),o=[],r=this._zoomPane.axes,n=0;n<r.length;n++){var s=r[n],a=s.options.vertical;if((i!==F||a)&&(i!==H||!a)&&jt(s.axisIndex)){var p=s.pointsRange(t,e);p&&o.push({axis:s,range:p})}}this.axisRanges=o},Dl.prototype._selectionPosition=function(t){var e=this._zoomPaneClipBox,i={x:t.x.startLocation,y:t.y.startLocation},o=t.x.location,r=t.y.location,n=(this.options.lock||"").toLowerCase(),s=Math.min(i.x,o),a=Math.min(i.y,r),p=Math.abs(i.x-o),l=Math.abs(i.y-r);return n===F&&(s=e.x1,p=e.width()),n===H&&(a=e.y1,l=e.height()),o>e.x2&&(p=e.x2-i.x),o<e.x1&&(p=i.x-e.x1),r>e.y2&&(l=e.y2-i.y),r<e.y1&&(l=i.y-e.y1),{left:Math.max(s,e.x1),top:Math.max(a,e.y1),width:p,height:l}},Dl.prototype.options={key:"shift",lock:"none"};const Fl=Dl;var Hl=function(t,e){this.chart=t,this.options=at({rate:.3},this.options,e)};Hl.prototype.updateRanges=function(t,e){for(var i=(this.options.lock||"").toLowerCase(),o=[],r=this.chart._plotArea.axes,n=0;n<r.length;n++){var s=r[n],a=s.options.vertical;if((i!==F||a)&&(i!==H||!a)&&s.zoomRange){var p=Xt(this.options.rate,.01,.9),l=s.zoomRange(-t*p,e);l&&o.push({axis:s,range:l})}}return this.axisRanges=o,Vl(o)},Hl.prototype.zoom=function(){var t=this.axisRanges,e=this.chart._plotArea;if(t&&t.length&&e.updateAxisOptions){for(var i=0;i<t.length;i++){var o=t[i];e.updateAxisOptions(o.axis,o.range)}e.redraw(e.panes)}},Hl.prototype.destroy=function(){delete this.chart};const Nl=Hl;var Ul=function(t){function e(e,i){t.call(this,e),this.chartService=i}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.render=function(){var t,e=this.children,i=this.options,o=i.vertical;this.visual=new q.drawing.Layout(null,{spacing:o?0:i.spacing,lineSpacing:o?i.spacing:0,orientation:o?"vertical":U,reverse:i.rtl,alignItems:o?(t=i.rtl,t?_:E):f});for(var r=0;r<e.length;r++){var n=e[r];n.reflow(new wi),n.renderVisual()}},e.prototype.reflow=function(t){this.visual.rect(t.toRect()),this.visual.reflow();var e=this.visual.clippedBBox();this.box=e?Zi(e):new wi},e.prototype.renderVisual=function(){this.addVisual()},e.prototype.createVisual=function(){},e}(Li);const Gl=Ul;var Wl=10,Xl=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.visualStyle=function(){var t=this.markerOptions(),e=t.border;return{stroke:{width:e.width,color:e.color,opacity:Kt(e.opacity,t.opacity),dashType:e.dashType},fill:{color:t.background,opacity:t.opacity},cursor:t.cursor}},e.prototype.markerOptions=function(){return this.options},e.prototype.markerHighlightOptions=function(){var t=this.markerOptions(),e=t.highlight.border.width;return at({},t,{background:t.border.color},t.highlight,t.type===v?{background:t.highlight.border.color,border:{color:t.highlight.background,width:e/2},width:t.width,height:t.height,margin:{top:0,left:0}}:{})},e.prototype.createHighlight=function(){var e=new t(this.markerHighlightOptions()),i=this.paddingBox.clone();return e.reflow(i.pad(e.options.border.width)),this.highlight=[e.getElement()],this.highlight},e}(ji);te(Xl,{border:{width:2},width:8,height:8,background:j,margin:{top:-1,left:-1},vAlign:V,align:C,highlight:{width:Wl,height:Wl,border:{color:j,width:2}}});const Yl=Xl;var ql=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getElement=function(){var t=new q.drawing.Group,e=new q.drawing.MultiPath(this.visualStyle()),i=this.paddingBox,o=i.height()/2;return e.moveTo(i.x1,i.y1+o).lineTo(i.x1,i.y2).lineTo(i.x2,i.y2),t.append(e),t},e}(ji);te(ql,{width:15,height:15,align:B,vAlign:d,margin:{right:-2,bottom:2}});const Zl=ql;var Ql=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getElement=function(){var t=new q.drawing.Group,e=new q.drawing.MultiPath({stroke:{color:this.options.border.color,opacity:this.options.opacity,width:this.options.height,dashType:this.options.dashType}}),i=this.paddingBox,o=i.center().y;return e.moveTo(i.x1,o).lineTo(i.x2,o),t.append(e),t},e.prototype.createHighlight=function(){return this.highlight=[this.createHighlightLine(),this.createHighlightMarker()],this.highlight},e.prototype.createHighlightLine=function(){var t=at({},{border:{color:this.options.border.color,opacity:this.options.border.opacity,dashType:this.options.border.dashType}},this.options.highlight),e=new Zl(t);return e.reflow(this.parent.paddingBox.clone()),this.highlightLine=e.getElement(),this.highlightLine},e.prototype.createHighlightMarker=function(){var e=at({},{background:this.options.background},this.options.highlight.markers),i=new t(e),o=this.parent.paddingBox,r=e.border.width,n=this.parent.box.clone();return n.pad({left:r-o.x1,top:r-o.y1}),i.reflow(n),this.highlightMarker=i.getElement(),this.highlightMarker},e}(ji);te(Ql,{border:{width:0},type:"rect",align:C,vAlign:f,highlight:{border:{width:2},markers:{type:g,width:Wl,height:Wl,border:{width:2,color:j},align:C,vAlign:V}}});const Kl=Ql;var $l=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createHighlight=function(){var e=at({},{background:this.options.background},this.options.highlight.markers),i=new t(e),o=this.paddingBox.clone(),r=this.parent.box.clone();return o.align(r,F,C),o.align(r,H,V),i.reflow(o),this.highlight=[i.getElement()],this.highlight},e}(ji);te($l,{highlight:{markers:{type:g,width:Wl,height:Wl,border:{width:2,color:j},margin:{top:-3,left:-3}}}});const Jl=$l;var th=function(t){function e(e){t.call(this,e),this.createContainer(),e.rtl?(this.createLabel(),this.createMarker()):(this.createMarker(),this.createLabel()),this._id=Be(),this.options.accessibility.ariaChecked=e.active}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createContainer=function(){this.container=new Wi({vertical:!1,wrap:!1,align:f,spacing:this.options.spacing}),this.append(this.container)},e.prototype.createMarker=function(){this.markerWrap=new t({vertical:!1,shrinkToFit:!0,wrap:!1,margin:1,width:22,height:22}),this.container.append(this.markerWrap),this.createMarkerArea(),this.options.markers.visible&&(this._marker=this._createMarker(),this.markerWrap.append(this._marker))},e.prototype.createMarkerArea=function(){var t=this.options,e=t.markerColor,i=t.line;void 0===i&&(i={});var o={border:{color:i.color||e,opacity:i.opacity,dashType:i.dashType}};return this._createLine(o)||this._createMarkerLine(o,i)||this._createSquare()},e.prototype.markerOptions=function(){var t=this.options,e=t.markers;void 0===e&&(e={});var i=t.markerColor,o=e.border;return void 0===o&&(o={}),e.zIndex=void 0,at({},e,{border:{color:o.color||i},highlight:t.highlight.markers})},e.prototype._highlightOptions=function(){var t=this.options;return at({markers:{type:t.markers.type}},t.highlight)},e.prototype._createLine=function(t){var e=this.options;return e.type!==In||e.markers.visible||(this._line=new Kl(at({},{background:e.markerColor,highlight:this._highlightOptions()},t,e.line)),this.markerWrap.append(this._line)),this._line},e.prototype._createMarkerLine=function(t,e){return this.options.type===In&&(this._markerLineArea=new Zl(at({},{border:{width:e.height}},t)),this.markerWrap.append(this._markerLineArea)),this._markerLineArea},e.prototype._reduceSize=function(t,e,i){void 0===i&&(i=.6),"number"==typeof t[e]&&(t[e]=t[e]*i)},e.prototype._createSquare=function(){var t=this.options;if(t.type===_n){var e=t.pattern||(t.series||{}).pattern;e&&("function"==typeof e&&(e=e(t.series)),e=Object.assign({},e),this._reduceSize(e,"gap"),this._reduceSize(e,"width"),this._reduceSize(e,"radius")),this._square=new Jl(Object.assign({},{border:t.border,vAlign:t.markers.visible?d:f,highlight:this._highlightOptions()},t.area,{pattern:e,background:t.area.background||t.markerColor})),this.markerWrap.append(this._square)}return this._square},e.prototype._createMarker=function(){return new Yl(this.markerOptions())},e.prototype._highlightMarkers=function(){this.options.active&&this._toggleHighlight(!0)},e.prototype._restoreMarkers=function(){this._toggleHighlight(!1)},e.prototype._toggleHighlight=function(t){var e=this;if(this.options.highlight.visible){var i=this._marker||this._square||this._line;if(i&&i===this._line&&this._line.visual.visible(!t),i){var o=i.highlight;o||(o=i.createHighlight()).forEach((function(t){return t&&e.markerWrap.appendVisual(t)})),o.forEach((function(e){return e&&e.visible(t)}))}}},e.prototype.createLabel=function(){var t=this.options,e=at({},t.labels);this.container.append(new $i(t.text,e))},e.prototype.getAriaLabelText=function(){return this.options.text},e.prototype.focusVisual=function(){this.visual.options.set("id",this._id),this.toggleFocusHighlight(!0),this._highlightMarkers()},e.prototype.clearFocusFromVisual=function(){this.visual.options.set("id",""),this.toggleFocusHighlight(!1),this._restoreMarkers()},e.prototype.renderComplete=function(){t.prototype.renderComplete.call(this);var e=this.options.cursor||{},i=this._itemOverlay=q.drawing.Path.fromRect(this.container.box.toRect(),{fill:{color:j,opacity:0},stroke:null,cursor:e.style||e});this.appendVisual(i)},e.prototype.click=function(t,e){var i=this.eventArgs(e);!t.trigger(as,i)&&e&&"contextmenu"===e.type&&e.preventDefault()},e.prototype.over=function(t,e){var i=this.eventArgs(e);return t.trigger("legendItemHover",i)||(t._legendItemHover(i.seriesIndex,i.pointIndex),this._highlightMarkers()),!0},e.prototype.out=function(t,e){t._unsetActivePoint(),this._restoreMarkers(),t.trigger("legendItemLeave",this.eventArgs(e))},e.prototype.eventArgs=function(t){var e=this.options;return{element:Ut(t),text:e.text,series:e.series,seriesIndex:e.series.index,pointIndex:e.pointIndex}},e.prototype.createVisual=function(){t.prototype.createVisual.call(this);var e=this.options;if(this.options.visible){var i=at({ariaLabel:void 0!==e.accessibility.ariaLabel?e.accessibility.ariaLabel:e.text},e.accessibility);Vi(this.visual,i)}},e.prototype.renderVisual=function(){var e=this,i=this.options,o=i.visual;o?(this.visual=o({active:i.active,series:i.series,sender:this.getSender(),pointIndex:i.pointIndex,options:{type:i.type,markers:at({background:this.options.markerColor},this.markerOptions()),labels:i.labels},createVisual:function(){e.createVisual(),e.renderChildren(),e.renderComplete();var t=e.visual;return delete e.visual,t}}),this._marker=this._markerLineArea=this._square=this._line=null,this.addVisual()):t.prototype.renderVisual.call(this)},e.prototype.createFocusHighlight=function(t){var e=t.stroke.width;return q.drawing.Path.fromRect(this.container.box.pad(e/2).toRect(),t)},e}(Ri);te(th,{accessibility:{role:"checkbox",className:"k-chart-legend-item",ariaRoleDescription:"Legend item"},markers:{},highlight:{visible:!0,markers:{}}});const eh=th;var ih="custom",oh=function(t){function e(e,i){void 0===i&&(i={}),t.call(this,e),this.chartService=i,Ct(this.options.position,[V,B,d,C,ih])||(this.options.position=B),this.createContainers(),this.createLegendTitle(e.title),this.createItems()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createContainers=function(){var t=this.options,e=t.position,i=t.align,o=e,r=f;e===ih?o=C:Ct(e,[V,d])?(o=i===E?C:i===_?B:f,r=e):i&&(i===E?r=V:i===_&&(r=d)),this.container=new Ri({margin:t.margin,padding:t.padding,background:t.background,border:t.border,vAlign:r,align:o,zIndex:t.zIndex,shrinkToFit:!0}),this.hasTitle()?this.itemsContainer=new Ri({vAlign:r,align:o,zIndex:t.zIndex,shrinkToFit:!0}):this.itemsContainer=this.container,this.append(this.container)},e.prototype.createItems=function(){var t=this.getService(),e=this.options,i=this.isVertical(),o=new Gl({vertical:i,spacing:e.spacing,rtl:t.rtl},t),r=e.data;e.reverse&&(r=r.slice(0).reverse());for(var n=r.length,s=0;s<n;s++){var a=r[s],p=a.series||{},l=p.markers;void 0===l&&(l={});var h=p.dashType,c=p.legendItem,u=p.opacity,d=at({visible:!1!==l.visible,type:g},l);delete d.size;var f=at({},{markers:d,labels:e.labels,rtl:t.rtl,line:Object.assign({},{dashType:h},e.line),area:Object.assign({},{opacity:u},e.area),opacity:u,accessibility:e.accessibility,focusHighlight:e.focusHighlight},e.item,c,a,{markers:e.markers});o.append(new eh(f))}o.render(),this.itemsContainer.append(o)},e.prototype.isVertical=function(){var t=this.options,e=t.orientation,i=t.position;return i===ih&&e!==U||(jt(e)?e!==U:Ct(i,[C,B]))},e.prototype.hasItems=function(){return this.container.children[0].children.length>0},e.prototype.getItems=function(){return this.itemsContainer.children[0].children},e.prototype.reflow=function(t){var e=this.options,i=t.clone();this.hasItems()?(e.position===ih?(this.containerCustomReflow(i),this.box=i):this.containerReflow(i),this.hasTitle()&&(this.title.reflow(new wi(this.container.box.x1,this.title.box.y1,this.container.box.x2,this.title.box.y2)),this.title.box.width()>this.itemsContainer.box.width()&&this.itemsContainer.reflow(new wi(this.container.box.x1,this.itemsContainer.box.y1,this.container.box.x2,this.itemsContainer.box.y2)))):this.box=i},e.prototype.containerReflow=function(t){var e=this.options,i=this.container,o=e.position,r=e.width,n=e.height,s=o===V||o===d?F:H,a=this.isVertical(),p=t.clone(),l=t.clone();o!==C&&o!==B||(l.y1=p.y1=0),a&&n?(l.y2=l.y1+n,l.align(p,H,i.options.vAlign)):!a&&r&&(l.x2=l.x1+r,l.align(p,F,i.options.align)),i.reflow(l);var h=(l=i.box).clone();(e.offsetX||e.offsetY)&&(l.translate(e.offsetX,e.offsetY),i.reflow(l)),h[s+1]=t[s+1],h[s+2]=t[s+2],this.box=h},e.prototype.containerCustomReflow=function(t){var e=this.options,i=this.container,o=e.offsetX,r=e.offsetY,n=e.width,s=e.height,a=this.isVertical(),p=t.clone();a&&s?p.y2=p.y1+s:!a&&n&&(p.x2=p.x1+n),i.reflow(p),p=i.box,i.reflow(new wi(o,r,o+p.width(),r+p.height()))},e.prototype.renderVisual=function(){this.hasItems()&&t.prototype.renderVisual.call(this)},e.prototype.createLegendTitle=function(t){var e=at({},{color:u,position:V,align:f},t),i=e.text;if(t&&!1!==t.visible&&t.text){if(jt(e)&&e.visible){var o=vt(e);o?i=o({text:i}):e.format&&(i=this.chartService.format.auto(e.format,i))}this.title=new $i(i,e),this.createTitleLayout(),this.appendTitleLayoutContent()}},e.prototype.createTitleLayout=function(){this.layout=new Wi({vertical:!0,wrap:!1}),this.container.append(this.layout)},e.prototype.hasTitle=function(){return Boolean(this.options.title&&!1!==this.options.title.visible&&this.options.title.text)},e.prototype.appendTitleLayoutContent=function(){this.options.title.position===d?(this.layout.append(this.itemsContainer),this.layout.append(this.title)):(this.layout.append(this.title),this.layout.append(this.itemsContainer))},e}(Li);te(oh,{position:B,data:[],offsetX:0,offsetY:0,margin:dt(2),padding:dt(5),border:{color:u,width:0},item:{cursor:N,spacing:6},spacing:6,background:"",zIndex:1,markers:{},line:{width:20,height:2,cursor:N,opacity:1},area:{type:"square",align:B,width:15,height:15}});const rh=oh;var nh=function(){this._registry=[]};nh.prototype.register=function(t,e){this._registry.push({type:t,seriesTypes:e})},nh.prototype.create=function(t,e,i){for(var o,r=this._registry,n=r[0],s=0;s<r.length;s++){var a=r[s];o=qs(t,a.seriesTypes);var p=qs(t,ss);if(o.length-p.length>0){n=a;break}}return new n.type(o,e,i)},nh.current=new nh;const sh=nh;function ah(t){var e=document.createElement("div");return t&&(e.className=t),e}function ph(t){for(var e=t;e&&!kt(e,"k-handle");)e=e.parentNode;return e}var lh=function(t,e,i,o){var r=t.element;this.options=at({},this.options,i),this.chart=t,this.observer=o,this.chartElement=r,this.categoryAxis=e,this._dateAxis=this.categoryAxis instanceof fr,this.initOptions(),this.visible=this.options.visible&&r.offsetHeight,this.visible&&(this.createElements(),this.set(this._index(this.options.from),this._index(this.options.to)),this.bindEvents())};lh.prototype.onPane=function(t){return this.categoryAxis.pane===t},lh.prototype.createElements=function(){var t=this.options,e=this.wrapper=ah("k-selector k-pointer-events-none");ut(e,{top:t.offset.top,left:t.offset.left,width:t.width,height:t.height,direction:"ltr"});var i=this.selection=ah("k-selection k-pointer-events-none");this.leftMask=ah("k-mask k-pointer-events-none"),this.rightMask=ah("k-mask k-pointer-events-none"),e.appendChild(this.leftMask),e.appendChild(this.rightMask),e.appendChild(i);var o=this.body=ah("k-selection-bg k-pointer-events-none");i.appendChild(o);var r=this.leftHandle=ah("k-handle k-left-handle k-pointer-events-auto"),n=this.rightHandle=ah("k-handle k-right-handle k-pointer-events-auto");r.appendChild(ah()),n.appendChild(ah()),i.appendChild(r),i.appendChild(n),this.chartElement.appendChild(e);var s=ut(i,["borderLeftWidth","borderRightWidth","height"]),a=ut(r,"height").height,p=ut(n,"height").height;t.selection={border:{left:s.borderLeftWidth,right:s.borderRightWidth}},ut(r,{top:(s.height-a)/2}),ut(n,{top:(s.height-p)/2}),e.style.cssText=e.style.cssText},lh.prototype.bindEvents=function(){var t;!1!==this.options.mousewheel&&(this._mousewheelHandler=this._mousewheel.bind(this),zt(this.chartElement,((t={})[Bs]=this._mousewheelHandler,t))),this._domEvents=_o.create(this.chartElement,{stopPropagation:!0,start:this._start.bind(this),move:this._move.bind(this),end:this._end.bind(this),tap:this._tap.bind(this),press:this._press.bind(this),gesturestart:this._gesturestart.bind(this),gesturechange:this._gesturechange.bind(this),gestureend:this._gestureend.bind(this)})},lh.prototype.initOptions=function(){var t=this.options,e=this.categoryAxis.pane.chartsBox(),i=this.chart.chartService.intl;this._dateAxis&&at(t,{min:er(i,t.min),max:er(i,t.max),from:er(i,t.from),to:er(i,t.to)});var o=ut(this.chartElement,["paddingLeft","paddingTop"]),r=o.paddingLeft,n=o.paddingTop;this.options=at({},{width:e.width(),height:e.height()+.1,padding:{left:r,top:n},offset:{left:e.x1+r,top:e.y1+n},from:t.min,to:t.max},t)},lh.prototype.destroy=function(){var t;this._domEvents&&(this._domEvents.destroy(),delete this._domEvents),clearTimeout(this._mwTimeout),this._state=null,this.wrapper&&(this._mousewheelHandler&&(Qt(this.chartElement,((t={})[Bs]=this._mousewheelHandler,t)),this._mousewheelHandler=null),this.chartElement.removeChild(this.wrapper),this.wrapper=null)},lh.prototype._rangeEventArgs=function(t){return{axis:this.categoryAxis.options,from:this._value(t.from),to:this._value(t.to)}},lh.prototype._pointInPane=function(t,e){var i=this.categoryAxis.pane.box,o=this.chart._toModelCoordinates(t,e);return i.containsPoint(o)},lh.prototype._start=function(t){var e=this.options,i=Ut(t);if(!this._state&&i){var o=Nt(t);if(this._pointInPane(o.x,o.y)){var r=ph(i),n=this.body.getBoundingClientRect(),s=!r&&o.x>=n.x&&o.x<=n.x+n.width&&o.y>=n.y&&o.y<=n.y+n.height;this.chart._unsetActivePoint(),this._state={moveTarget:r,startLocation:t.x?t.x.location:0,inBody:s,range:{from:this._index(e.from),to:this._index(e.to)}};var a=this._rangeEventArgs({from:this._index(e.from),to:this._index(e.to)});this.trigger(bs,a)&&(this._state=null)}}},lh.prototype._press=function(t){var e;(e=this._state?this._state.moveTarget:ph(Ut(t)))&&W(e,"k-handle-active")},lh.prototype._move=function(t){if(this._state){var e=this,i=e._state,o=e.options,r=e.categoryAxis,n=i.range,s=i.moveTarget,a=r.options.reverse,p=this._index(o.from),l=this._index(o.to),h=this._index(o.min),c=this._index(o.max),u=i.startLocation-t.x.location,d=n.from,f=n.to,g=n.to-n.from,y=ut(this.wrapper,"width").width/(r.categoriesCount()-1),v=Math.round(u/y)*(a?-1:1);if(s||i.inBody){var m=s&&kt(s,"k-left-handle"),x=s&&kt(s,"k-right-handle");i.inBody?(n.from=Math.min(Math.max(h,p-v),c-g),n.to=Math.min(n.from+g,c)):m&&!a||x&&a?(n.from=Math.min(Math.max(h,p-v),c-1),n.to=Math.max(n.from+1,n.to)):(m&&a||x&&!a)&&(n.to=Math.min(Math.max(h+1,l-v),c),n.from=Math.min(n.to-1,n.from)),n.from===d&&n.to===f||(this.move(n.from,n.to),this.trigger(_s,this._rangeEventArgs(n)))}}},lh.prototype._end=function(){if(this._state){var t=this._state.moveTarget;t&&Y(t,"k-handle-active");var e=this._state.range;this.set(e.from,e.to),this.trigger(ws,this._rangeEventArgs(e)),delete this._state}},lh.prototype._tap=function(t){var e=this.options,i=this.categoryAxis,o=this.chart._eventCoordinates(t),r=i.pointCategoryIndex(new xi(o.x,i.box.y1)),n=this._index(e.from),s=this._index(e.to),a=this._index(e.min),p=this._index(e.max),l=s-n,h=n+l/2,c={},u=3===t.event.which,d=Math.round(h-r);this._state||u||(this.chart._unsetActivePoint(),i.options.justified||d--,c.from=Math.min(Math.max(a,n-d),p-l),c.to=Math.min(c.from+l,p),this._start(t),this._state&&(this._state.range=c,this.trigger(_s,this._rangeEventArgs(c)),this._end()))},lh.prototype._mousewheel=function(t){var e=this,i=Et(t);if(this._start(t),this._state){var o=this._state.range;t.preventDefault(),t.stopPropagation(),Math.abs(i)>1&&(i*=3),this.options.mousewheel.reverse&&(i*=-1),this.expand(i)&&this.trigger(_s,{axis:this.categoryAxis.options,delta:i,originalEvent:t,from:this._value(o.from),to:this._value(o.to)}),this._mwTimeout&&clearTimeout(this._mwTimeout),this._mwTimeout=setTimeout((function(){e._end()}),150)}},lh.prototype._gesturestart=function(t){var e=this.options,i=t.touches[0];if(this._pointInPane(i.pageX,i.pageY)){this._state={range:{from:this._index(e.from),to:this._index(e.to)}};var o=this._rangeEventArgs(this._state.range);this.trigger(bs,o)?this._state=null:t.preventDefault()}},lh.prototype._gestureend=function(){this._state&&(this.trigger(ws,this._rangeEventArgs(this._state.range)),delete this._state)},lh.prototype._gesturechange=function(t){if(this._state){var e=this,i=e.chart,o=e._state,r=e.options,n=e.categoryAxis,s=o.range,a=i._toModelCoordinates(t.touches[0].x.location).x,p=i._toModelCoordinates(t.touches[1].x.location).x,l=Math.min(a,p),h=Math.max(a,p);t.preventDefault(),s.from=n.pointCategoryIndex(new xi(l))||r.min,s.to=n.pointCategoryIndex(new xi(h))||r.max,this.move(s.from,s.to),this.trigger(_s,this._rangeEventArgs(s))}},lh.prototype._index=function(t){var e=t;return t instanceof Date&&(e=this.categoryAxis.categoryIndex(t)),e},lh.prototype._value=function(t){var e=t;return this._dateAxis&&(e=this.categoryAxis.categoryAt(t))>this.options.max&&(e=this.options.max),e},lh.prototype._slot=function(t){var e=this.categoryAxis,i=this._index(t);return e.getSlot(i,i,!0)},lh.prototype.move=function(t,e){var i=this.options,o=this.categoryAxis.options.reverse,r=i.offset,n=i.padding,s=i.selection.border,a=o?e:t,p=o?t:e,l="x"+(o?2:1),h=this._slot(a),c=Zt(h[l]-r.left+n.left);ut(this.leftMask,{width:c}),ut(this.selection,{left:c}),h=this._slot(p);var u=Zt(i.width-(h[l]-r.left+n.left));ut(this.rightMask,{width:u});var d=i.width-u;d!==i.width&&(d+=s.right),ut(this.rightMask,{left:d}),ut(this.selection,{width:Math.max(i.width-(c+u)-s.right,0)})},lh.prototype.set=function(t,e){var i=this.options,o=this._index(i.min),r=this._index(i.max),n=Xt(this._index(t),o,r),s=Xt(this._index(e),n+1,r);i.visible&&this.move(n,s),i.from=this._value(n),i.to=this._value(s)},lh.prototype.expand=function(t){var e=this.options,i=this._index(e.min),o=this._index(e.max),r=e.mousewheel.zoom,n=this._index(e.from),s=this._index(e.to),a={from:n,to:s},p=at({},a);if(this._state&&(a=this._state.range),r!==B&&(a.from=Xt(Xt(n-t,0,s-1),i,o)),r!==C&&(a.to=Xt(Xt(s+t,a.from+1,o),i,o)),a.from!==p.from||a.to!==p.to)return this.set(a.from,a.to),!0},lh.prototype.zoom=function(t,e){var i=this.options,o=this._index(i.min),r=this._index(i.max),n=this._index(i.from),s=this._index(i.to),a={from:n,to:s},p=at({},a),l=this.categoryAxis.options.reverse,h=F+(l?"2":"1"),c=this.categoryAxis.lineBox(),u=Math.abs(c[h]-e[F]),d=c.width(),f=Zt(u/d,2),g=Zt(f*t),y=Zt((1-f)*t);if(this._state&&(a=this._state.range),a.from=Xt(Xt(n-g,0,s-1),o,r),a.to=Xt(Xt(s+y,a.from+1,r),o,r),a.from!==p.from||a.to!==p.to)return this.set(a.from,a.to),!0},lh.prototype.trigger=function(t,e){return(this.observer||this.chart).trigger(t,e)},te(lh,{visible:!0,mousewheel:{zoom:"both"},min:T,max:P});const hh=lh;var ch=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.show=function(e){if(e&&e.tooltipAnchor&&(!this._current||this._current!==e)){var i=at({},this.options,e.options.tooltip),o=e.tooltipAnchor();o?(this._current=e,t.prototype.show.call(this,{point:e,anchor:o},i,e)):this.hide()}},e.prototype.hide=function(){delete this._current,t.prototype.hide.call(this)},e}(kp);const uh=ch;var dh=function(t){function e(e,i){t.call(this,e.chartService,i),this.plotArea=e,this.formatService=e.chartService.format}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.showAt=function(t,e){var i=wt(t,(function(t){var e=t.series.tooltip;return!(e&&!1===e.visible)}));if(i.length>0){var o=i[0],r=this.plotArea.categoryAxis.getSlot(o.categoryIx),n=e?this._slotAnchor(e,r):this._defaultAnchor(o,r);this.show({anchor:n,shared:!0,points:t,category:o.category,categoryText:this.formatService.auto(this.options.categoryFormat,o.category),series:this.plotArea.series},this.options)}},e.prototype._slotAnchor=function(t,e){return this.plotArea.categoryAxis.options.vertical||(t.x=e.center().x),{point:t,align:{horizontal:"left",vertical:"center"}}},e.prototype._defaultAnchor=function(t,e){var i=t.owner.pane.chartsBox(),o=this.plotArea.categoryAxis.options.vertical,r=i.center(),n=e.center();return{point:o?new xi(r.x,n.y):new xi(n.x,r.y),align:{horizontal:"center",vertical:"center"}}},e}(kp);te(dh,{categoryFormat:"{0:d}"});const fh=dh;var gh=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.setup=function(){var t=this.element,e=this.options;if(t.bbox()){this.origin=e.origin;var i=e.vertical?H:F,o=this.fromScale=new q.geometry.Point(1,1);o[i]=un,t.transform(q.geometry.transform().scale(o.x,o.y))}else this.abort()},e.prototype.step=function(t){var e=Pt(this.fromScale.x,1,t),i=Pt(this.fromScale.y,1,t);this.element.transform(q.geometry.transform().scale(e,i,this.origin))},e.prototype.abort=function(){t.prototype.abort.call(this),this.element.transform(null)},e}(q.drawing.Animation);te(gh,{duration:ln}),q.drawing.AnimationFactory.current.register(wn,gh);var yh=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.setup=function(){var t=this.center=this.element.bbox().center();this.element.transform(q.geometry.transform().scale(un,un,t))},e.prototype.step=function(t){this.element.transform(q.geometry.transform().scale(t,t,this.center))},e}(q.drawing.Animation);te(yh,{easing:"easeOutElastic"}),q.drawing.AnimationFactory.current.register(An,yh);var vh=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.setup=function(){this.fadeTo=this.element.opacity(),this.element.opacity(0)},e.prototype.step=function(t){this.element.opacity(t*this.fadeTo)},e}(q.drawing.Animation);te(vh,{duration:200,easing:"linear"}),q.drawing.AnimationFactory.current.register(hn,vh);var mh=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.setup=function(){this.element.transform(q.geometry.transform().scale(un,un,this.options.center))},e.prototype.step=function(t){this.element.transform(q.geometry.transform().scale(t,t,this.options.center))},e}(q.drawing.Animation);te(mh,{easing:"easeOutElastic",duration:ln}),q.drawing.AnimationFactory.current.register(Rn,mh);const xh=mh;var bh=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.render=function(){t.prototype.render.call(this),this.renderSegments()},e.prototype.createSegment=function(t,e,i){return new(e.style===xn?_a:fa)(t,e,i)},e.prototype.animationPoints=function(){return t.prototype.animationPoints.call(this).concat(this._segments)},e.prototype.createMissingValue=function(t,e){if(e===gn){var i={x:t.x,y:t.y};return $s(i.x)||(i.x=0),$s(i.y)||(i.y=0),i}},e}(cp);at(bh.prototype,ka);const _h=bh,wh=function(t,e,i){var o=[],r=e.xMin,n=e.xMax,s=(i||{}).forecast;s&&(s.before>0&&(r-=s.before),s.after>0&&(n+=s.after));var a=(i||{}).samplingInterval,p=Kt(a,vi(r,n)/10);a<=0&&(p=n-r);for(var l=r;l<=n;l+=p)o.push([l,t(l)]);return o};const kh=function(t){return function(e){var i=e.valueFields;return{xValue:i.x,yValue:i[t]}}},Ah=function(t,e){for(var i=Number.MAX_VALUE,o=Number.MIN_VALUE,r=0;r<t.length;r++){var n=e(t[r]),s=n.xValue,a=n.yValue;isFinite(s)&&null!==s&&isFinite(a)&&null!==a&&(i=Math.min(s,i),o=Math.max(s,o))}return{xMin:i,xMax:o}};var Sh={};Sh[ts]=function(t){var e=t.options,i=function(t){var e=t.options,i=(0,t.seriesValues)();if(!bl(i,e.field))return null;var o,r=xl(i,(o=e.field,function(t){var e=t.valueFields;return{xValue:e.x,yValue:Math.log(e[o])}})),n=r.slope,s=r.intercept,a=r.count,p={xMin:r.xMin,xMax:r.xMax};if(a>0){var l=Math.exp(s),h=n;return wh((function(t){return l*Math.exp(h*t)}),p,e.trendline)}return null}({seriesValues:t.seriesValues,options:e});return i?Object.assign({},e,{type:"scatterLine",data:i}):null},Sh[es]=function(t){var e=t.options,i=function(t){var e=t.options,i=xl((0,t.seriesValues)(),kh(e.field)),o=i.slope,r=i.intercept,n=i.count,s=i.xMin,a=i.xMax;return n>0?wh((function(t){return o*t+r}),{xMin:s,xMax:a},e.trendline):null}({seriesValues:t.seriesValues,options:e});return i?Object.assign({},e,{type:"scatterLine",data:i}):null},Sh[is]=function(t){var e=t.options,i=function(t){var e=t.options,i=(0,t.seriesValues)();if(!bl(i,"x"))return null;var o,r=xl(i,(o=e.field,function(t){var e=t.valueFields;return{xValue:Math.log(e.x),yValue:e[o]}})),n=r.slope,s=r.intercept,a=r.count,p=Ah(i,function(t){return function(e){var i=e.valueFields;return{xValue:i.x,yValue:i[t]}}}(e.field));if(a>0){var l=n,h=s;return wh((function(t){return l*Math.log(t)+h}),p,e.trendline)}return null}({seriesValues:t.seriesValues,options:e});return i?Object.assign({},e,{type:"scatterLine",data:i}):null},Sh[os]=function(t){var e=t.options,i=function(t){var e=t.options,i=t.seriesValues,o=(e.trendline||{}).period||2,r=wl(i({before:o,after:o}),kh(e.field),o);return r.length>0?r:null}(t);return i?Object.assign({},e,{type:"scatterLine",data:i}):null},Sh[rs]=function(t){var e=t.options,i=function(t){var e=t.seriesValues,i=t.options,o=(i.trendline||{}).order,r=kh(i.field),n=kl(e(),r,o),s=n.count,a=n.valueMapper,p=n.xMin,l=n.xMax;return s>0?wh(a,{xMin:p,xMax:l},i.trendline):null}({seriesValues:t.seriesValues,options:e});return i?Object.assign({},e,{type:"scatterLine",data:i}):null},Sh[ns]=function(t){var e=t.options,i=function(t){var e=t.options,i=(0,t.seriesValues)();if(!bl(i,"x"))return null;var o,r=xl(i,(o=e.field,function(t){var e=t.valueFields;return{xValue:Math.log(e.x),yValue:Math.log(e[o])}})),n=r.slope,s=r.intercept,a=r.count,p=Ah(i,kh(e.field));if(a>0){var l=Math.exp(s),h=n;return wh((function(t){return l*Math.pow(t,h)}),p,e.trendline)}return null}({seriesValues:t.seriesValues,options:e});return i?Object.assign({},e,{type:"scatterLine",data:i}):null};const Ch=Sh;var Ph=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initFields=function(){this.namedXAxes={},this.namedYAxes={},this.xAxisRangeTracker=new ja,this.yAxisRangeTracker=new ja},e.prototype.render=function(t){void 0===t&&(t=this.panes),this.series=[].concat(this.originalSeries),this.createTrendlineSeries();for(var e=this.groupSeriesByPane(),i=0;i<t.length;i++){var o=t[i],r=e[o.options.name||"default"]||[];this.addToLegend(r);var n=this.filterVisibleSeries(r);n&&(this.createScatterChart(qs(n,Wn),o),this.createScatterLineChart(qs(n,Xn),o),this.createBubbleChart(qs(n,An),o))}this.createAxes(t)},e.prototype.appendChart=function(e,i){this.xAxisRangeTracker.update(e.xAxisRanges),this.yAxisRangeTracker.update(e.yAxisRanges),t.prototype.appendChart.call(this,e,i)},e.prototype.removeAxis=function(e){var i=e.options.name;t.prototype.removeAxis.call(this,e),e.options.vertical?(this.yAxisRangeTracker.reset(i),delete this.namedYAxes[i]):(this.xAxisRangeTracker.reset(i),delete this.namedXAxes[i]),e===this.axisX&&delete this.axisX,e===this.axisY&&delete this.axisY},e.prototype.seriesPaneName=function(t){var e=this.options,i=t.xAxis,o=[].concat(e.xAxis),r=wt(o,(function(t){return t.name===i}))[0],n=t.yAxis,s=[].concat(e.yAxis),a=wt(s,(function(t){return t.name===n}))[0],p=(e.panes||[{}])[0].name||"default";return(r||{}).pane||(a||{}).pane||p},e.prototype.createScatterChart=function(t,e){t.length>0&&this.appendChart(new cp(this,{series:t,clip:e.options.clip}),e)},e.prototype.createScatterLineChart=function(t,e){t.length>0&&this.appendChart(new _h(this,{series:t,clip:e.options.clip}),e)},e.prototype.createBubbleChart=function(t,e){t.length>0&&this.appendChart(new gp(this,{series:t,clip:e.options.clip}),e)},e.prototype.createXYAxis=function(t,e,i){for(var o,r=t.name,n=e?this.namedYAxes:this.namedXAxes,s=e?this.yAxisRangeTracker:this.xAxisRangeTracker,a=at({reverse:!e&&this.chartService.rtl},t,{vertical:e}),p=Ws(a.type,Ts),l=s.query(),h=p?{min:.1,max:1}:{min:0,max:1},c=s.query(r)||l||h,u=[a.min,a.max],d=this.series,f=0;f<d.length;f++){var g=d[f],y=g[e?"yAxis":"xAxis"];if(y===a.name||0===i&&!y){var v=on.current.bindPoint(g,0).valueFields;u.push(v[e?"y":"x"]);break}}0===i&&l&&(c.min=Math.min(c.min,l.min),c.max=Math.max(c.max,l.max));for(var x=0;x<u.length;x++)if(u[x]instanceof Date){o=!0;break}var b=new(Ws(a.type,m)||!a.type&&o?kr:p?Tr:_r)(c.min,c.max,a,this.chartService);if(b.axisIndex=i,r){if(n[r])throw new Error((e?"Y":"X")+" axis with name "+r+" is already defined");n[r]=b}return this.appendAxis(b),b},e.prototype.createAxes=function(t){for(var e=this.options,i=[].concat(e.xAxis),o=[],r=[].concat(e.yAxis),n=[],s=0;s<i.length;s++)Ct(this.findPane(i[s].pane),t)&&o.push(this.createXYAxis(i[s],!1,s));for(var a=0;a<r.length;a++)Ct(this.findPane(r[a].pane),t)&&n.push(this.createXYAxis(r[a],!0,a));this.axisX=this.axisX||o[0],this.axisY=this.axisY||n[0]},e.prototype._dispatchEvent=function(t,e,i){for(var o=t._eventCoordinates(e),r=new xi(o.x,o.y),n=this.axes,s=n.length,a=[],p=[],l=0;l<s;l++){var h=n[l],c=h.options.vertical?p:a,u=h.getValue(r);null!==u&&c.push(u)}a.length>0&&p.length>0&&t.trigger(i,{element:Ut(e),originalEvent:e,x:ta(a),y:ta(p)})},e.prototype.updateAxisOptions=function(t,e){var i=t.options.vertical,o=this.groupAxes(this.panes),r=(i?o.y:o.x).indexOf(t);Th(this.options,r,i,e),Th(this.originalOptions,r,i,e)},e.prototype.trendlineFactory=function(t,e){var i=this.seriesValues.bind(this,e.index),o=ml(Ch,t.type,{options:t,seriesValues:i});return o&&(o.xAxis=e.xAxis,o.yAxis=e.yAxis),o},e.prototype.seriesValues=function(t){for(var e=[],i=this.series[t],o=0;o<i.data.length;o++){var r=this.bindPoint(i,o);e.push({pointIx:o,valueFields:r.valueFields})}return e},e}(Dp);function Th(t,e,i,o){at([].concat(i?t.yAxis:t.xAxis)[e],o)}te(Ph,{xAxis:{},yAxis:{}}),at(Ph.prototype,Hp);const Mh=Ph;var Oh=function(t){function e(e,i,o){t.call(this,o),this.value=e,this.sector=i}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.render=function(){this._rendered||!1===this.visible||(this._rendered=!0,this.createLabel())},e.prototype.createLabel=function(){var t=this.options.labels,e=this.owner.chartService,i=this.getLabelText(t);if(t.visible&&(i||0===i)){if(t.position===f||t.position===Os)t.color||(t.color=fe(this.options.color)),t.background||(t.background=this.options.color);else{var o=e.theme.seriesDefaults.labels;t.color=t.color||o.color,t.background=t.background||o.background}this.label=new $i(i,at({},t,{align:f,vAlign:"",animation:{type:hn,delay:this.animationDelay}}),this.pointData()),this.append(this.label)}},e.prototype.getLabelText=function(t){var e=vt(t);return e?e(this.pointData()):this.owner.chartService.format.auto(t.format,this.value)},e.prototype.reflow=function(t){this.render(),this.box=t,this.reflowLabel()},e.prototype.reflowLabel=function(){var t=this.options.labels,e=this.label,i=this.sector.clone(),o=t.distance,r=i.middle();if(e){var n,s=e.box.height(),a=e.box.width();if(t.position===f)i.radius=Math.abs((i.radius-s)/2)+s,n=i.point(r),e.reflow(new wi(n.x,n.y-s/2,n.x,n.y));else if(t.position===Os)i.radius=i.radius-s/2,n=i.point(r),e.reflow(new wi(n.x,n.y-s/2,n.x,n.y));else{var p;(n=i.clone().expand(o).point(r)).x>=i.center.x?(p=n.x+a,e.orientation=B):(p=n.x-a,e.orientation=C),e.reflow(new wi(p,n.y-s,n.x,n.y))}}},e.prototype.createVisual=function(){var e=this,i=this.sector,o=this.options;if(t.prototype.createVisual.call(this),this.addAccessibilityAttributesToVisual(),this.value)if(o.visual){var r=(i.startAngle+180)%360,n=o.visual({category:this.category,dataItem:this.dataItem,value:this.value,series:this.series,percentage:this.percentage,center:new q.geometry.Point(i.center.x,i.center.y),radius:i.radius,innerRadius:i.innerRadius,startAngle:r,endAngle:r+i.angle,options:o,sender:this.getSender(),createVisual:function(){var t=new q.drawing.Group;return e.createSegmentVisual(t),t}});n&&this.visual.append(n)}else this.createSegmentVisual(this.visual)},e.prototype.createSegmentVisual=function(t){var e=this.sector,i=this.options,o=i.border||{},r=o.width>0?{stroke:{color:o.color,width:o.width,opacity:o.opacity,dashType:o.dashType}}:{},n=i.color,s=Ii(i.pattern,{color:n,opacity:i.opacity}),a=this.createSegment(e,at({fill:s,stroke:{opacity:i.opacity},zIndex:i.zIndex},r));t.append(a),Ks(i)&&t.append(this.createGradientOverlay(a,{baseColor:n,fallbackFill:s},at({center:[e.center.x,e.center.y],innerRadius:e.innerRadius,radius:e.radius,userSpace:!0},i.overlay)))},e.prototype.createSegment=function(t,e){return e.singleSegment?new q.drawing.Circle(new q.geometry.Circle(new q.geometry.Point(t.center.x,t.center.y),t.radius),e):Mi.current.createRing(t,e)},e.prototype.createAnimation=function(){var e=this.options,i=this.sector.center;at(e,{animation:{center:[i.x,i.y],delay:this.animationDelay}}),t.prototype.createAnimation.call(this)},e.prototype.createHighlight=function(t){var e=this.options.highlight||{},i=e.border||{};return this.createSegment(this.sector,at({},t,{fill:{color:e.color,opacity:e.opacity},stroke:{opacity:i.opacity,width:i.width,color:i.color,dashType:i.dashType}}))},e.prototype.highlightVisual=function(){return this.visual.children[0]},e.prototype.highlightVisualArgs=function(){var t=this.sector;return{options:this.options,radius:t.radius,innerRadius:t.innerRadius,center:new q.geometry.Point(t.center.x,t.center.y),startAngle:t.startAngle,endAngle:t.angle+t.startAngle,visual:this.visual}},e.prototype.createFocusHighlight=function(t){var e=this.options.focusHighlight.border.width,i=this.createSegment(this.sector,at({},t,{stroke:{width:2*e}})),o=new q.drawing.MultiPath;return o.paths.push(q.drawing.Path.fromRect(i.bbox())),o.paths.push(this.createSegment(this.sector,{})),i.clip(o),i},e.prototype.tooltipAnchor=function(){var t,e,i,o,r=this.sector.clone().expand(5),n=r.middle();return{point:r.point(n),align:(t=n+180,e=qt(t),i=Zt(Math.sin(e),b),o=Zt(Math.cos(e),b),{horizontal:Math.abs(i)>Bh?f:o<0?B:C,vertical:Math.abs(i)<Lh?f:i<0?d:V})}},e.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},e.prototype.pointData=function(){return{dataItem:this.dataItem,category:this.category,value:this.value,series:this.series,percentage:this.percentage}},e.prototype.getIndex=function(){return this.index},e}(Li),Lh=Zt(qt(30),b),Bh=Zt(qt(60),b);te(Oh,{color:j,overlay:{gradient:"roundedBevel"},border:{width:.5},labels:{visible:!1,distance:35,font:x,margin:dt(.5),align:g,zIndex:1,position:Ls},animation:{type:Rn},highlight:{visible:!0,border:{width:1}},visible:!0,accessibility:{role:Ss,className:Cs,ariaRoleDescription:Ps}}),at(Oh.prototype,la),at(Oh.prototype,Ha);const Ih=Oh;var Eh={createLegendItem:function(t,e,i){var o=this.options.legend||{},r=o.labels||{},n=o.inactiveItems||{},s=n.labels||{};if(i&&!1!==i.visibleInLegend){var a,p,l=!1!==i.visible,h=l?vt(r):vt(s)||vt(r),c=i.category;h&&(c=h({text:c,series:i.series,dataItem:i.dataItem,percentage:i.percentage,value:t})),l?(a={},p=e.color):(a={color:s.color,font:s.font},p=(n.markers||{}).color),$s(c)&&""!==c&&this.legendItems.push({active:l,pointIndex:i.index,text:c,series:i.series,markerColor:p,pattern:e.pattern,labels:a})}}};const Rh=Eh;var Vh=function(t){function e(e,i){t.call(this,i),this.plotArea=e,this.chartService=e.chartService,this.points=[],this.legendItems=[],this.render()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.render=function(){this.traverseDataPoints(this.addValue.bind(this))},e.prototype.traverseDataPoints=function(t){var e=this.options,i=this.plotArea.options.seriesColors;void 0===i&&(i=[]);for(var o=i.length,r=e.series,n=r.length,s=0;s<n;s++){var a=r[s],p=a.data,l=Us(a),h=l.total,c=l.points,u=l.count,d=360/h,g=void 0;isFinite(d)||(g=360/u);var y=void 0;y=jt(a.startAngle)?a.startAngle:e.startAngle,s!==n-1&&a.labels.position===Ls&&(a.labels.position=f);for(var v=0;v<c.length;v++){var m=c[v];if(m){var x=m.fields,b=m.value,_=m.visible,w=0!==b?g||b*d:0,k=1!==p.length&&Boolean(x.explode);ot(a.color)||(a.color=x.color||i[v%o]),t(b,new Si(null,0,0,y,w),{owner:this,category:jt(x.category)?x.category:"",pattern:jt(x.pattern)?x.pattern:a.pattern,index:v,series:a,seriesIx:s,dataItem:p[v],percentage:0!==h?b/h:0,explode:k,visibleInLegend:x.visibleInLegend,visible:_,zIndex:n-s,animationDelay:this.animationDelay(v,s,n)}),!1!==_&&(y+=w)}}}},e.prototype.evalSegmentOptions=function(t,e,i){var o=i.series;Ys(t,{value:e,series:o,dataItem:i.dataItem,category:i.category,percentage:i.percentage},{defaults:o._defaults,excluded:["data","content","template","visual","toggle","ariaTemplate","ariaContent"]})},e.prototype.addValue=function(t,e,i){var o=at({},i.series,{index:i.index});if(o.pattern=i.pattern||o.pattern,this.evalSegmentOptions(o,t,i),this.createLegendItem(t,o,i),!1!==i.visible){var r=new Ih(t,e,o);Object.assign(r,i),this.append(r),this.points.push(r)}},e.prototype.reflow=function(t){var e=this,i=e.options,o=e.points,r=e.seriesConfigs;void 0===r&&(r=[]);var n=o.length,s=t.clone(),a=Math.min(s.width(),s.height()),p=a/2,l=a-.85*a,h=new wi(s.x1,s.y1,s.x1+a,s.y1+a),c=h.center(),u=s.center(),d=i.series.length,f=[],g=[],y=Kt(i.padding,l);this.targetBox=t,y=y>p-5?p-5:y,h.translate(u.x-c.x,u.y-c.y);for(var v=p-y,m=new xi(v+h.x1+y,v+h.y1+y),x=0;x<n;x++){var b=o[x],_=b.sector,w=b.seriesIx;if(_.radius=v,_.center=m,r.length){var k=r[w];_.innerRadius=k.innerRadius,_.radius=k.radius}w===d-1&&b.explode&&(_.center=_.clone().setRadius(.15*_.radius).point(_.middle())),b.reflow(h);var A=b.label;A&&A.options.position===Ls&&w===d-1&&(A.orientation===B?g.push(A):f.push(A))}f.length>0&&(f.sort(this.labelComparator(!0)),this.leftLabelsReflow(f)),g.length>0&&(g.sort(this.labelComparator(!1)),this.rightLabelsReflow(g)),this.box=h},e.prototype.leftLabelsReflow=function(t){var e=this.distanceBetweenLabels(t);this.distributeLabels(e,t)},e.prototype.rightLabelsReflow=function(t){var e=this.distanceBetweenLabels(t);this.distributeLabels(e,t)},e.prototype.distanceBetweenLabels=function(t){var e=Wt(this.points),i=e.sector,o=t.length-1,r=i.radius+e.options.labels.distance,n=[],s=t[0].box,a=Zt(s.y1-(i.center.y-r-s.height()-s.height()/2));n.push(a);for(var p=0;p<o;p++){var l=t[p+1].box;s=t[p].box,a=Zt(l.y1-s.y2),n.push(a)}return a=Zt(i.center.y+r-t[o].box.y2-t[o].box.height()/2),n.push(a),n},e.prototype.distributeLabels=function(t,e){for(var i,o,r,n=t.length,s=0;s<n;s++)for(r=-t[s],i=o=s;r>0&&(i>=0||o<n);)r=this._takeDistance(t,s,--i,r),r=this._takeDistance(t,s,++o,r);this.reflowLabels(t,e)},e.prototype._takeDistance=function(t,e,i,o){var r=o;if(t[i]>0){var n=Math.min(t[i],r);r-=n,t[i]-=n,t[e]+=n}return r},e.prototype.reflowLabels=function(t,e){var i,o=Wt(this.points),r=o.sector,n=o.options.labels,s=e.length,a=n.distance,p=r.center.y-(r.radius+a)-e[0].box.height();t[0]+=2;for(var l=0;l<s;l++){var h=e[l],c=h.box;p+=t[l],i=this.hAlignLabel(c.x2,r.clone().expand(a),p,p+c.height(),h.orientation===B),h.orientation===B?(n.align!==g&&(i=r.radius+r.center.x+a),h.reflow(new wi(i+c.width(),p,i,p))):(n.align!==g&&(i=r.center.x-r.radius-a),h.reflow(new wi(i-c.width(),p,i,p))),p+=c.height()}},e.prototype.createVisual=function(){var e=this.options.connectors,i=this.points,o=i.length;t.prototype.createVisual.call(this),this._connectorLines=[];for(var r=0;r<o;r++){var n=i[r],s=n.sector,a=n.label,p=s.middle(),l=(n.options.connectors||{}).color||e.color;if(a){var h=new q.drawing.Path({stroke:{color:l,width:e.width},animation:{type:hn,delay:n.animationDelay}});if(a.options.position===Ls){var c=a.box,u=s.center,d=s.point(p),f=new xi(c.x1,c.center().y),g=void 0,y=void 0,v=void 0;d=s.clone().expand(e.padding).point(p),h.moveTo(d.x,d.y),a.orientation===B?(v=zh(u,d,f,y=new xi(c.x1-e.padding,c.center().y)),f=new xi(y.x-4,y.y),(v=v||f).x=Math.min(v.x,f.x),this.pointInCircle(v,s.center,s.radius+4)||v.x<s.center.x?(g=s.center.x+s.radius+4,n.options.labels.align!==Pn?g<f.x?h.lineTo(g,d.y):h.lineTo(d.x+8,d.y):h.lineTo(g,d.y),h.lineTo(f.x,y.y)):(v.y=y.y,h.lineTo(v.x,v.y))):(v=zh(u,d,f,y=new xi(c.x2+e.padding,c.center().y)),f=new xi(y.x+4,y.y),(v=v||f).x=Math.max(v.x,f.x),this.pointInCircle(v,s.center,s.radius+4)||v.x>s.center.x?(g=s.center.x-s.radius-4,n.options.labels.align!==Pn?g>f.x?h.lineTo(g,d.y):h.lineTo(d.x-8,d.y):h.lineTo(g,d.y),h.lineTo(f.x,y.y)):(v.y=y.y,h.lineTo(v.x,v.y))),h.lineTo(y.x,y.y),this._connectorLines.push(h),this.visual.append(h)}}}},e.prototype.renderVisual=function(){if(t.prototype.renderVisual.call(this),le(this.options.series,(function(t){return t.autoFit}))){var e=this.targetBox,i=this.box.center(),o=this.visual.bbox();if(!o)return;var r=o.bottomRight(),n=Math.min((i.y-e.y1)/(i.y-o.origin.y),(e.y2-i.y)/(r.y-i.y),(i.x-e.x1)/(i.x-o.origin.x),(e.x2-i.x)/(r.x-i.x));n<1&&this.visual.transform(q.geometry.transform().scale(n,n,[i.x,i.y]))}},e.prototype.labelComparator=function(t){var e=t?-1:1;return function(t,i){return((t.parent.sector.middle()+270)%360-(i.parent.sector.middle()+270)%360)*e}},e.prototype.hAlignLabel=function(t,e,i,o,r){var n=e.radius,s=e.center,a=s.x,p=s.y,l=Math.min(Math.abs(p-i),Math.abs(p-o));return l>n?t:a+Math.sqrt(n*n-l*l)*(r?1:-1)},e.prototype.pointInCircle=function(t,e,i){return Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2)<Math.pow(i,2)},e.prototype.formatPointValue=function(t,e){return this.chartService.format.auto(e,t.value)},e.prototype.animationDelay=function(t){return 70*t},e.prototype.stackRoot=function(){return this},e}(Li);function zh(t,e,i,o){var r,n=(o.x-i.x)*(t.y-i.y)-(o.y-i.y)*(t.x-i.x),s=(o.y-i.y)*(e.x-t.x)-(o.x-i.x)*(e.y-t.y);if(0!==s){var a=n/s;r=new xi(t.x+a*(e.x-t.x),t.y+a*(e.y-t.y))}return r}te(Vh,{startAngle:90,connectors:{width:2,color:"#939393",padding:8},inactiveItems:{markers:{},labels:{}}}),at(Vh.prototype,Rh),Vh.prototype.isStackRoot=!0;const jh=Vh;var Dh=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.render=function(){this.createPieChart(this.series)},e.prototype.createPieChart=function(t){var e=t[0],i=new jh(this,{series:t,padding:e.padding,startAngle:e.startAngle,connectors:e.connectors,legend:this.options.legend});this.appendChart(i)},e.prototype.appendChart=function(e,i){t.prototype.appendChart.call(this,e,i),Vt(this.options.legend.data,e.legendItems)},e.prototype.getPointBelow=function(t){return this.getPointToTheRight(t)},e.prototype.getPointAbove=function(t){return this.getPointToTheLeft(t)},e}(Dp);const Fh=Dh;var Hh=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reflowLabel=function(){var e=this.options.labels,i=this.label,o=this.sector.clone(),r=o.middle();if(i){var n=i.box.height();if(e.position===f){o.radius-=(o.radius-o.innerRadius)/2;var s=o.point(r);i.reflow(new wi(s.x,s.y-n/2,s.x,s.y))}else t.prototype.reflowLabel.call(this)}},e.prototype.createSegment=function(t,e){return Mi.current.createRing(t,e)},e}(Ih);te(Hh,{overlay:{gradient:"roundedGlass"},labels:{position:f},animation:{type:Rn}}),at(Hh.prototype,la);const Nh=Hh;var Uh=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.addValue=function(t,e,i){var o=at({},i.series,{index:i.index});if(o.pattern=i.pattern||o.pattern,this.evalSegmentOptions(o,t,i),this.createLegendItem(t,o,i),!1!==i.visible){var r=new Nh(t,e,o);Object.assign(r,i),this.append(r),this.points.push(r)}},e.prototype.reflow=function(e){for(var i,o=this.options,r=e.clone(),n=Math.min(r.width(),r.height()),s=n/2,a=n-.85*n,p=o.series,l=p.length,h=Kt(o.padding,a),c=s-(h=h>s-5?s-5:h),u=0,d=0;d<l;d++){var f=p[d];0===d&&jt(f.holeSize)&&(i=f.holeSize,c-=f.holeSize),jt(f.size)?c-=f.size:u++,jt(f.margin)&&d!==l-1&&(c-=f.margin)}jt(i)||(c-=i=(s-h)/(l+.75)*.75);var g,y=i,v=0;this.seriesConfigs=[];for(var m=0;m<l;m++){var x=p[m];g=(y+=v)+Kt(x.size,c/u),this.seriesConfigs.push({innerRadius:y,radius:g}),v=x.margin||0,y=g}t.prototype.reflow.call(this,e)},e.prototype.animationDelay=function(t,e,i){return 50*t+ln*(e+1)/(i+1)},e}(jh);te(Uh,{startAngle:90,connectors:{width:2,color:"#939393",padding:8}});const Gh=Uh;var Wh=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.render=function(){this.createDonutChart(this.series)},e.prototype.createDonutChart=function(t){var e=t[0],i=new Gh(this,{series:t,padding:e.padding,connectors:e.connectors,legend:this.options.legend});this.appendChart(i)},e.prototype.getPointBelow=function(t){return this._getNextPoint(t,this._pointsByVertical,-1)},e.prototype.getPointAbove=function(t){return this._getNextPoint(t,this._pointsByVertical,1)},e}(Fh);const Xh=Wh;var Yh=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initFields=function(){this.valueAxisRangeTracker=new ja},e.prototype.render=function(){this.addToLegend(this.series),this.createPolarAxis(),this.createCharts(),this.createValueAxis()},e.prototype.alignAxes=function(){var t=this.valueAxis,e=t.range(),i=t.options.reverse?e.max:e.min,o=t.getSlot(i),r=this.polarAxis.getSlot(0).center,n=t.box.translate(r.x-o.x1,r.y-o.y1);t.reflow(n)},e.prototype.createValueAxis=function(){var t,e,i=this.valueAxisRangeTracker.query(),o=this.valueAxisOptions({roundToMajorUnit:!1,zIndex:-1});o.type===Ts?(t=Hr,e={min:.1,max:1}):(t=Dr,e={min:0,max:1});var r=i||e,n=new t(r.min,r.max,o,this.chartService);this.valueAxis=n,this.appendAxis(n)},e.prototype.reflowAxes=function(){var t=this,e=t.options.plotArea,i=t.valueAxis,o=t.polarAxis,r=t.box,n=.15*Math.min(r.width(),r.height()),s=dt(e.padding||{},n),a=r.clone().unpad(s),p=a.clone();p.y2=p.y1+Math.min(p.width(),p.height()),p.align(a,H,f);var l=p.clone().shrink(0,p.height()/2);o.reflow(p),i.reflow(l);var h=i.lineBox().height()-i.box.height();i.reflow(i.box.unpad({top:h})),this.axisBox=p,this.alignAxes(p)},e.prototype.backgroundBox=function(){return this.box},e.prototype.detachLabels=function(){},e}(Dp);const qh=Yh;var Zh=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.pointSlot=function(t,e){var i=t.center.y-e.y1,o=xi.onCircle(t.center,t.startAngle,i);return new wi(o.x,o.y,o.x,o.y)},e}(cp);te(Zh,{clip:!1});const Qh=Zh;var Kh=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(_h);Kh.prototype.pointSlot=Qh.prototype.pointSlot,te(Kh,{clip:!1});const $h=Kh;var Jh=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.fillToAxes=function(t){var e=this._polarAxisCenter();t.lineTo(e.x,e.y)},e.prototype._polarAxisCenter=function(){return this.parent.plotArea.polarAxis.box.center()},e.prototype.strokeSegments=function(){var t=this._strokeSegments;if(!t){var e=this._polarAxisCenter(),i=new Gr(!1),o=this.points();o.push(e),(t=this._strokeSegments=i.process(o)).pop()}return t},e}(Ea);const tc=Jh;var ec=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.fillToAxes=function(t){var e=this.parent.plotArea.polarAxis.box.center(),i=new q.geometry.Segment([e.x,e.y]);t.segments.unshift(i),t.segments.push(i)},e}(Oa);const ic=ec;var oc=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createSegment=function(t,e,i){return(e.line||{}).style===xn?new tc(t,e,i):new ic(t,e,i)},e.prototype.createMissingValue=function(t,e){var i;return $s(t.x)&&e!==yn&&(i={x:t.x,y:t.y},e===gn&&(i.y=0)),i},e.prototype.seriesMissingValues=function(t){return t.missingValues||gn},e.prototype._hasMissingValuesGap=function(){for(var t=this.options.series,e=0;e<t.length;e++)if("gap"===this.seriesMissingValues(t[e]))return!0},e.prototype.sortPoints=function(t){if(t.sort(rc),this._hasMissingValuesGap())for(var e=0;e<t.length;e++){var i=t[e];i&&($s(i.value.y)||"gap"!==this.seriesMissingValues(i.series)||delete t[e])}return t},e}($h);function rc(t,e){return t.value.x-e.value.x}const nc=oc;var sc=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createPolarAxis=function(){var t=new Er(this.options.xAxis,this.chartService);this.polarAxis=t,this.axisX=t,this.appendAxis(t)},e.prototype.render=function(){this.series=[].concat(this.originalSeries),this.createTrendlineSeries(),t.prototype.render.call(this)},e.prototype.valueAxisOptions=function(t){return at(t,{majorGridLines:{type:s},minorGridLines:{type:s}},this.options.yAxis)},e.prototype.createValueAxis=function(){t.prototype.createValueAxis.call(this),this.axisY=this.valueAxis},e.prototype.trendlineFactory=function(t,e){var i=Mh.prototype.trendlineFactory.call(this,t,e);return i&&(i.type=zn),i},e.prototype.appendChart=function(t,e){this.valueAxisRangeTracker.update(t.yAxisRanges),Dp.prototype.appendChart.call(this,t,e)},e.prototype.createCharts=function(){var t=this.filterVisibleSeries(this.series),e=this.panes[0];this.createLineChart(qs(t,[zn]),e),this.createScatterChart(qs(t,[jn]),e),this.createAreaChart(qs(t,[Vn]),e)},e.prototype.createLineChart=function(t,e){if(0!==t.length){var i=new $h(this,{series:t});this.appendChart(i,e)}},e.prototype.createScatterChart=function(t,e){if(0!==t.length){var i=new Qh(this,{series:t});this.appendChart(i,e)}},e.prototype.createAreaChart=function(t,e){if(0!==t.length){var i=new nc(this,{series:t});this.appendChart(i,e)}},e.prototype._dispatchEvent=function(t,e,i){var o=t._eventCoordinates(e),r=new xi(o.x,o.y),n=this.axisX.getValue(r),s=this.axisY.getValue(r);null!==n&&null!==s&&t.trigger(i,{element:Ut(e),x:n,y:s})},e.prototype.createCrosshairs=function(){},e}(qh);te(sc,{xAxis:{},yAxis:{}}),at(sc.prototype,Hp,{seriesValues:Mh.prototype.seriesValues});const ac=sc;var pc=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.pointSlot=function(t,e){var i=t.center.y-e.y1,o=xi.onCircle(t.center,t.middle(),i);return new wi(o.x,o.y,o.x,o.y)},e.prototype.renderSegments=function(){if(t.prototype.renderSegments.call(this),this._segments&&this._segments.length>1)for(var e=function(t){for(var e=[],i=0;i<t.length;i++){var o=t[i];e[o.seriesIx]=e[o.seriesIx]||[],e[o.seriesIx].push(o)}return e}(this._segments),i=0;i<e.length;i++){var o=e[i];if(o&&o.length>1){var r=o[0].linePoints[0],n=Wt(o),s=Wt(n.linePoints),a=0===r.categoryIx,p=s.categoryIx===s.categoriesCount-1;a&&p&&Wt(o).linePoints.push(r)}}},e.prototype.createSegment=function(t,e,i){var o=new(e.style===xn?_a:fa)(t,e,i),r=this.seriesMissingValues(e);return t.length!==e.data.length&&r!==yn||(o.options.closed=!0),o},e}(Ta);te(pc,{clip:!1,limitPoints:!1});const lc=pc;var hc=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.fillToAxes=function(){},e}(Ea);const cc=hc;var uc=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.fillToAxes=function(){},e}(Oa);const dc=uc;var fc=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createSegment=function(t,e,i,o){var r,n,s,a=this.options.isStacked,p=(e.line||{}).style;return a&&i>0&&o&&(n=o.linePoints.slice(0),r=o),p===xn?(s=new cc(t,e,i,r,n)).options.closed=!0:(t.push(t[0]),s=new dc(t,e,i,r,n)),s},e.prototype.seriesMissingValues=function(t){return t.missingValues||gn},e}(lc);const gc=fc;var yc=function(t){function e(e,i){t.call(this,e,null,i)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getIndex=function(){return this.categoryIx},e}(Nh);te(yc,{overlay:{gradient:"none"},labels:{distance:10}});const vc=yc;var mc=function(t){function e(e){t.call(this,e),this.forEach=e.rtl?Wa:Ga}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reflow=function(t){var e=this.options,i=this.children,o=e.gap,r=e.spacing,n=i.length,s=n+o+r*(n-1),a=t.angle/s,p=t.startAngle+a*(o/2);this.forEach(i,(function(e){var i=t.clone();i.startAngle=p,i.angle=a,e.sector&&(i.radius=e.sector.radius),e.reflow(i),e.sector=i,p+=a+a*r}))},e}(Li);te(mc,{gap:1,spacing:0});const xc=mc;var bc=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reflow=function(t){var e=this.options.reverse,i=this.children,o=i.length,r=e?o-1:0,n=e?-1:1;this.box=new wi;for(var s=r;s>=0&&s<o;s+=n){var a=i[s].sector;a.startAngle=t.startAngle,a.angle=t.angle}},e}(Li);const _c=bc;var wc=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.pointType=function(){return vc},e.prototype.clusterType=function(){return xc},e.prototype.stackType=function(){return _c},e.prototype.categorySlot=function(t,e){return t.getSlot(e)},e.prototype.pointSlot=function(t,e){var i=t.clone(),o=t.center.y;return i.radius=o-e.y1,i.innerRadius=o-e.y2,i},e.prototype.reflowPoint=function(t,e){t.sector=e,t.reflow()},e.prototype.createAnimation=function(){this.options.animation.center=this.box.toRect().center(),t.prototype.createAnimation.call(this)},e}(Ka);wc.prototype.reflow=aa.prototype.reflow,te(wc,{clip:!1,limitPoints:!1,animation:{type:"pie"}});const kc=wc;var Ac=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createPolarAxis=function(){var t=new Br(this.options.categoryAxis,this.chartService);this.polarAxis=t,this.categoryAxis=t,this.appendAxis(t),this.aggregateCategories(),this.createTrendlineSeries(),this.createCategoryAxesLabels()},e.prototype.valueAxisOptions=function(t){return this._hasBarCharts&&at(t,{majorGridLines:{type:s},minorGridLines:{type:s}}),this._isStacked100&&at(t,{roundToMajorUnit:!1,labels:{format:"P0"}}),at(t,this.options.valueAxis)},e.prototype.aggregateCategories=function(){Ll.prototype.aggregateCategories.call(this,this.panes)},e.prototype.createCategoryAxesLabels=function(){Ll.prototype.createCategoryAxesLabels.call(this,this.panes)},e.prototype.filterSeries=function(t){return t},e.prototype.trendlineFactory=function(t,e){var i=Ll.prototype.trendlineFactory.call(this,t,e);return i&&(i.type=Hn),i},e.prototype.createCharts=function(){var t=this.filterVisibleSeries(this.series),e=this.panes[0];this.createAreaChart(qs(t,[Dn]),e),this.createLineChart(qs(t,[Hn]),e),this.createBarChart(qs(t,[Fn]),e)},e.prototype.chartOptions=function(t){var e={series:t},i=t[0];if(i){var o=this.filterVisibleSeries(t),r=i.stack;e.isStacked=r&&o.length>1,e.isStacked100=r&&"100%"===r.type&&o.length>1,e.isStacked100&&(this._isStacked100=!0)}return e},e.prototype.createAreaChart=function(t,e){if(0!==t.length){var i=new gc(this,this.chartOptions(t));this.appendChart(i,e)}},e.prototype.createLineChart=function(t,e){if(0!==t.length){var i=new lc(this,this.chartOptions(t));this.appendChart(i,e)}},e.prototype.createBarChart=function(t,e){if(0!==t.length){var i=t[0],o=this.chartOptions(t),r=this.filterVisibleSeries(t),n=r.some((function(t){return t.stack})),s=r.some((function(t){return t.stack&&"100%"===t.stack.type}));o.gap=i.gap,o.spacing=i.spacing,o.defaultStack=i.stack&&r.length>1,o.isStacked=n&&r.length>1,o.isStacked100=s&&r.length>1;var a=new kc(this,o);this.appendChart(a,e),this._hasBarCharts=!0}},e.prototype.seriesCategoryAxis=function(){return this.categoryAxis},e.prototype._dispatchEvent=function(t,e,i){var o=t._eventCoordinates(e),r=new xi(o.x,o.y),n=this.categoryAxis.getCategory(r),s=this.valueAxis.getValue(r);null!==n&&null!==s&&t.trigger(i,{element:Ut(e),category:n,value:s})},e.prototype.createCrosshairs=function(){},e.prototype._pointsByVertical=function(e){return t.prototype._pointsByVertical.call(this,e).sort(this._getSeriesCompareFn())},e.prototype._getSeriesCompareFn=function(){return function(t,e){return e.value-t.value}},e}(qh);at(Ac.prototype,Hp,{appendChart:Ll.prototype.appendChart,aggregateSeries:Ll.prototype.aggregateSeries,seriesSourcePoints:Ll.prototype.seriesSourcePoints,seriesValues:Ll.prototype.seriesValues}),te(Ac,{categoryAxis:{categories:[]},valueAxis:{}});const Sc=Ac;var Cc=function(t){function e(e,i,o){t.call(this,i),this.value=e,this.options.index=o.index}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getLabelText=function(t){var e=vt(t);return e?e(this.pointData()):t.format?this.formatValue(t.format):this.value},e.prototype.reflow=function(t){var e=this.points,i=this.children[0],o=Math.min(e[0].x,e[3].x),r=Math.max(e[1].x,e[2].x);this.box=new wi(o,e[0].y,r,e[2].y),i&&i.reflow(new wi(t.x1,e[0].y,t.x2,e[2].y))},e.prototype.createVisual=function(){var e,i=this,o=this.options;t.prototype.createVisual.call(this),this.addAccessibilityAttributesToVisual(),(e=o.visual?o.visual({category:this.category,dataItem:this.dataItem,value:this.value,series:this.series,percentage:this.percentage,points:this.points,options:o,sender:this.getSender(),createVisual:function(){return i.createPath()}}):this.createPath())&&this.visual.append(e)},e.prototype.createPath=function(){var t=this.options,e=t.border;return q.drawing.Path.fromPoints(this.points,{fill:Ii(t.pattern,{color:t.color,opacity:t.opacity}),stroke:{color:e.color,opacity:e.opacity,width:e.width}}).close()},e.prototype.createHighlight=function(t){return q.drawing.Path.fromPoints(this.points,t)},e.prototype.highlightVisual=function(){return this.visual.children[0]},e.prototype.highlightVisualArgs=function(){var t=q.drawing.Path.fromPoints(this.points).close();return{options:this.options,path:t}},e.prototype.createFocusHighlight=function(t){var e=this.options.focusHighlight.border.width,i=q.drawing.Path.fromPoints(this.points,at({},t,{stroke:{width:2*e}})).close(),o=new q.drawing.MultiPath;return o.paths.push(q.drawing.Path.fromRect(this.box.clone().pad(e).toRect())),o.paths.push(q.drawing.Path.fromPoints(this.points)),i.clip(o),i},e.prototype.tooltipAnchor=function(){var t=this.box;return{point:new xi(t.center().x,t.y1),align:{horizontal:"center",vertical:"top"}}},e.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},e.prototype.pointData=function(){return{dataItem:this.dataItem,category:this.category,value:this.value,series:this.series,percentage:this.percentage}},e.prototype.getIndex=function(){return this.index},e}(Li);te(Cc,{color:j,border:{width:1},labels:{format:""},accessibility:{role:Ss,className:Cs,ariaRoleDescription:Ps}}),at(Cc.prototype,la),at(Cc.prototype,Ha);const Pc=Cc;var Tc=function(t){function e(e,i){t.call(this,i),this.plotArea=e,this.chartService=e.chartService,this.points=[],this.labels=[],this.legendItems=[],this.render()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.formatPointValue=function(t,e){return this.plotArea.chartService.format.auto(e,t.value)},e.prototype.render=function(){var t=this.options,e=this.plotArea.options.seriesColors;void 0===e&&(e=[]);var i=t.series[0],o=i.data;if(o)for(var r=Us(i),n=r.total,s=r.points,a=0;a<s.length;a++){var p=s[a];if(p){var l=p.fields;ot(i.color)||(i.color=l.color||e[a%e.length]),l=at({index:a,owner:this,series:i,seriesIx:0,dataItem:o[a],percentage:p.value/n},l,{visible:p.visible});var h=p.valueFields.value,c=this.createSegment(h,l),u=this.createLabel(h,l);c&&u&&c.append(u)}}},e.prototype.evalSegmentOptions=function(t,e,i){var o=i.series;Ys(t,{value:e,series:o,dataItem:i.dataItem,index:i.index},{defaults:o._defaults,excluded:["data","content","template","toggle","visual","ariaTemplate","ariaContent"]})},e.prototype.createSegment=function(t,e){var i=at({},e.series);if(i.pattern=e.pattern||i.pattern,this.evalSegmentOptions(i,t,e),this.createLegendItem(t,i,e),!1!==e.visible){var o=new Pc(t,i,e);return Object.assign(o,e),this.append(o),this.points.push(o),o}},e.prototype.createLabel=function(t,e){var i=e.series,o=e.dataItem,r=at({},this.options.labels,i.labels),n=t;if(r.visible){var s=vt(r),a={dataItem:o,value:t,percentage:e.percentage,category:e.category,series:i};s?n=s(a):r.format&&(n=this.chartService.format.auto(r.format,n)),r.color||(r.color=fe(i.color),r.background||(r.background=i.color)),this.evalSegmentOptions(r,t,e);var p=new $i(n,at({vAlign:r.position},r),a);return this.labels.push(p),p}},e.prototype.labelPadding=function(){for(var t=this.labels,e={left:0,right:0},i=0;i<t.length;i++){var o=t[i].options.align;if(o!==f){var r=t[i].box.width();o===C?e.left=Math.max(e.left,r):e.right=Math.max(e.right,r)}}return e},e.prototype.dynamicSlopeReflow=function(t,e,i){for(var o=this.options,r=this.points,n=r.length,s=r[0],a=s,p=0;p<r.length;p++)r[p].percentage>a.percentage&&(a=r[p]);for(var l=s.percentage/a.percentage*e,h=(e-l)/2,c=0,u=0;u<n;u++){var d=r[u].percentage,f=r[u+1],g=f?f.percentage:d,y=r[u].points=[],v=o.dynamicHeight?i*d:i/n,m=void 0;m=Xt(m=d?(e-l*(g/d))/2:g?0:e/2,0,e),y.push(new q.geometry.Point(t.x1+h,t.y1+c)),y.push(new q.geometry.Point(t.x1+e-h,t.y1+c)),y.push(new q.geometry.Point(t.x1+e-m,t.y1+v+c)),y.push(new q.geometry.Point(t.x1+m,t.y1+v+c)),h=m,c+=v+o.segmentSpacing,l=Xt(e-2*m,0,e)}},e.prototype.constantSlopeReflow=function(t,e,i){for(var o=this.options,r=this.points,n=r.length,s=o.neckRatio<=1,a=s?o.neckRatio*e:e,p=s?0:(e-e/o.neckRatio)/2,l=((s?e:e-2*p)-a)/2,h=0,c=0;c<n;c++){var u=r[c].points=[],d=r[c].percentage,f=o.dynamicHeight?l*d:l/n,g=o.dynamicHeight?i*d:i/n;u.push(new q.geometry.Point(t.x1+p,t.y1+h)),u.push(new q.geometry.Point(t.x1+e-p,t.y1+h)),u.push(new q.geometry.Point(t.x1+e-p-f,t.y1+g+h)),u.push(new q.geometry.Point(t.x1+p+f,t.y1+g+h)),p+=f,h+=g+o.segmentSpacing}},e.prototype.reflow=function(t){var e=this.points,i=e.length;if(i){var o=this.options,r=t.clone().unpad(this.labelPadding()),n=r.height()-o.segmentSpacing*(i-1),s=r.width();o.dynamicSlope?this.dynamicSlopeReflow(r,s,n):this.constantSlopeReflow(r,s,n);for(var a=0;a<i;a++)e[a].reflow(t)}},e}(Li);te(Tc,{neckRatio:.3,width:300,dynamicSlope:!1,dynamicHeight:!0,segmentSpacing:0,labels:{visible:!1,align:f,position:f,zIndex:1}}),at(Tc.prototype,Rh);const Mc=Tc;var Oc=function(t){function e(e,i){i.dynamicSlope=!1,i.neckRatio=1e6,t.call(this,e,i)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Mc);const Lc=Oc;var Bc=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.render=function(){this.createChart(Mc,qs(this.series,[Mn])),this.createChart(Lc,qs(this.series,[On]))},e.prototype.createChart=function(t,e){var i=e[0];if(i){var o=new t(this,{series:e,legend:this.options.legend,neckRatio:i.neckRatio,dynamicHeight:i.dynamicHeight,dynamicSlope:i.dynamicSlope,segmentSpacing:i.segmentSpacing,highlight:i.highlight});this.appendChart(o)}},e.prototype.appendChart=function(e,i){t.prototype.appendChart.call(this,e,i),Vt(this.options.legend.data,e.legendItems)},e.prototype._pointsByVertical=function(t){return this.pointsBySeriesIndex(t.series.index)},e.prototype.getPointToTheRight=function(t){return this.getPointBelow(t)},e.prototype.getPointToTheLeft=function(t){return this.getPointAbove(t)},e}(Dp);const Ic=Bc;var Ec=function(t){function e(e,i){t.call(this),this.options=i,this.color=i.color||j,this.value=e}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.render=function(){this._rendered||(this._rendered=!0,this.createMarker(),this.createLabel(),this.createNote())},e.prototype.createLabel=function(){var t=this.options.labels;t.visible&&(this.label=this.createLabelElement(t),this.append(this.label))},e.prototype.createLabelElement=function(t){var e=t.color;return e||(e=fe(this.color)),new $i(this.getLabelText(t),at({align:f,vAlign:f,margin:{left:5,right:5},zIndex:Kt(t.zIndex,this.series.zIndex)},t,{color:e}),this.pointData())},e.prototype.getLabelText=function(t){var e=vt(t);return e?e(this.pointData()):this.formatValue(t.format)},e.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},e.prototype.reflow=function(t){this.render();var e=this.label;this.box=t,e&&e.reflow(this.markerBox()),this.note&&this.note.reflow(t),this.marker.reflow(this.markerBox())},e.prototype.createVisual=function(){t.prototype.createVisual.call(this),this.addAccessibilityAttributesToVisual()},e.prototype.markerBox=function(){var t=this.options.markers,e=t.border,i=this.box.toRect(),o=Kt(t.type,"rect")===I,r=Kt(e.width,o?1:0),n=Math.round(r/2);if(t.size){var s=i.center();i.size.width=i.size.height=t.size,i.origin.x=Math.round(s.x-i.size.width/2),i.origin.y=Math.round(s.y-i.size.height/2)}return i.size.width-=r,i.size.height-=r,i.origin.y+=n+.5,i.origin.x+=n+.5,Zi(i)},e.prototype.markerBorder=function(){var t=this.options,e=t.markers.border,i=Kt(e.opacity,t.opacity);return{color:e.color||this.color,width:e.width,opacity:i,dashType:e.dashType}},e.prototype.createMarker=function(){var t=this.options,e=t.markers,i=new ji({type:Kt(e.type,"rect"),width:e.size,height:e.size,rotation:e.rotation,background:this.color,border:this.markerBorder(),pattern:t.pattern,borderRadius:e.borderRadius,opacity:this.series.opacity||t.opacity,zIndex:Kt(t.zIndex,this.series.zIndex),animation:t.animation,visual:t.visual},{dataItem:this.dataItem,value:this.value,series:this.series,category:this.category});this.marker=i,this.append(i)},e.prototype.createHighlight=function(t){var e=this.options,i=this.options.highlight.markers||this.options.markers,o=new ji({type:Kt(i.type,"rect"),width:i.size,height:i.size,rotation:i.rotation,background:i.color||this.color,border:this.markerBorder(),borderRadius:i.borderRadius,opacity:this.series.opacity||e.opacity,zIndex:Kt(e.zIndex,this.series.zIndex)});o.reflow(this.markerBox());var r=o.getElement();return r.options.fill=t.fill,r.options.stroke=t.stroke,r},e.prototype.highlightVisual=function(){return this.rectVisual},e.prototype.highlightVisualArgs=function(){return{options:this.options,rect:this.box.toRect(),visual:this.rectVisual}},e.prototype.createFocusHighlight=function(){var t=this.options.markers,e=this.options.focusHighlight,i=new ji({type:Kt(t.type,"rect"),width:t.size,height:t.size,rotation:t.rotation,background:e.color,border:e.border,borderRadius:t.borderRadius,padding:e.border.width/2,zIndex:e.zIndex});return i.reflow(this.markerBox()),i.getElement()},e.prototype.tooltipAnchor=function(){var t=this.box.center().x,e=this.box.y1-5;return{point:new xi(t,e),align:{horizontal:f,vertical:d}}},e.prototype.overlapsBox=function(t){return this.box.overlaps(t)},e.prototype.unclipElements=function(){},e.prototype.pointData=function(){return{x:this.value.x,y:this.value.y,value:this.value.value,dataItem:this.dataItem,series:this.series}},e}(Li);at(Ec.prototype,la),at(Ec.prototype,ha),at(Ec.prototype,Ha),Ec.prototype.defaults={markers:{type:"rect",borderRadius:4,border:{color:"transparent"}},padding:{top:1},labels:{visible:!1,padding:3},opacity:1,notes:{label:{}},accessibility:{role:Ss,className:Cs,ariaRoleDescription:Ps}};const Rc=Ec;var Vc=function(t){function e(e,i){t.call(this,i),this.plotArea=e,this.chartService=e.chartService,this._initFields(),this.render()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._initFields=function(){this.points=[],this.seriesOptions=[],this.valueRange={min:P,max:T},this._evalSeries=[]},e.prototype.render=function(){this.setRange(),this.traverseDataPoints(this.addValue.bind(this))},e.prototype.setRange=function(){for(var t=this.options.series,e=0;e<t.length;e++)for(var i=t[e],o=0;o<i.data.length;o++){var r=this.plotArea.bindPoint(i,o).valueFields;jt(r.value)&&null!==r.value&&(this.valueRange.min=Math.min(this.valueRange.min,r.value),this.valueRange.max=Math.max(this.valueRange.max,r.value))}},e.prototype.addValue=function(t,e){var i;t&&jt(t.value)&&null!==t.value&&(i=this.createPoint(t,e))&&Object.assign(i,e),this.points.push(i)},e.prototype.evalPointOptions=function(t,e,i){var o=i.series,r=i.seriesIx,n={defaults:o._defaults,excluded:["data","tooltip","content","template","visual","toggle","drilldownSeriesFactory","ariaTemplate","ariaContent"]},s=this._evalSeries[r];jt(s)||(this._evalSeries[r]=s=Ys(t,{},n,!0));var a=t;return s&&Ys(a=at({},t),{value:e,series:o,dataItem:i.dataItem,min:this.valueRange.min,max:this.valueRange.max},n),a},e.prototype.pointType=function(){return Rc},e.prototype.pointOptions=function(t,e){var i=this.seriesOptions[e];if(!i){var o=this.pointType().prototype.defaults;this.seriesOptions[e]=i=at({},o,{markers:{opacity:t.opacity},tooltip:{format:this.options.tooltip.format},labels:{format:this.options.labels.format}},t)}return Object.assign({},i)},e.prototype.createPoint=function(t,e){var i=e.series,o=this.pointOptions(i,e.seriesIx),r=e.color||i.color;o.pattern=e.pattern||o.pattern,o=this.evalPointOptions(o,t,e),ot(i.color)?r=o.color:0!==this.valueRange.max&&(r=function(t,e){void 0===e&&(e=.05);var i=(0,q.parseColor)(t),o=1-e;return function(t){var e=i.toHSL(),r=100-e.l,n=o-t;return e.l+=Math.min(n*r,r),e.toCss()}}(r)(t.value/this.valueRange.max));var n=new Rc(t,o);return n.color=r,this.append(n),n},e.prototype.seriesAxes=function(t){var e=t.xAxis,i=t.yAxis,o=this.plotArea,r=e?o.namedXAxes[e]:o.axisX,n=i?o.namedYAxes[i]:o.axisY;if(!r)throw new Error("Unable to locate X axis with name "+e);if(!n)throw new Error("Unable to locate Y axis with name "+i);return{xAxis:r,yAxis:n}},e.prototype.reflow=function(t){var e=this,i=this.points,o=!this.options.clip,r=0;this.traverseDataPoints((function(t,n){var s=i[r++],a=e.seriesAxes(n.series),p=a.xAxis,l=a.yAxis,h=p.categoryIndex(t.x),c=l.categoryIndex(t.y),u=p.getSlot(h,h,o),d=l.getSlot(c,c,o);if(s)if(u&&d){var f=e.pointSlot(u,d);s.reflow(f)}else s.visible=!1})),this.box=t},e.prototype.pointSlot=function(t,e){return new wi(t.x1,e.y1,t.x2,e.y2)},e.prototype.traverseDataPoints=function(t){for(var e=this.options.series,i=0;i<e.length;i++)for(var o=e[i],r=this.seriesAxes(o),n=r.xAxis,s=r.yAxis,a=n.currentRangeIndices(),p=s.currentRangeIndices(),l=0;l<o.data.length;l++){var h=this.plotArea.bindPoint(o,l),c=h.valueFields,u=h.fields,d=n.totalIndex(c.x),f=s.totalIndex(c.y),g=a.min<=d&&d<=a.max,y=p.min<=f&&f<=p.max;g&&y&&t(c,at({pointIx:l,series:o,seriesIx:i,dataItem:o.data[l],owner:this},u))}},e.prototype.formatPointValue=function(t,e){var i=t.value;return this.chartService.format.auto(e,i.x,i.y,i.value)},e.prototype.animationPoints=function(){for(var t=this.points,e=[],i=0;i<t.length;i++)e.push((t[i]||{}).marker);return e},e}(Li);te(Vc,{series:[],tooltip:{format:"{0}, {1}: {2}"},labels:{format:"{2}"},clip:!0});const zc=Vc;var jc=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initFields=function(){this.namedXAxes={},this.namedYAxes={}},e.prototype.render=function(t){void 0===t&&(t=this.panes),this.bindCategories(),this.createAxes(t),this.createCharts(t),this.createAxisLabels()},e.prototype.bindCategories=function(){for(var t=this.srcSeries||this.series,e=0;e<t.length;e++){for(var i=t[e],o=i.data||[],r=this.seriesAxes(i),n=r.xAxis,s=r.yAxis,a=_e(n.categories||[]),p=_e(s.categories||[]),l=0;l<o.length;l++){var h=on.current.bindPoint(i,l).valueFields,c=h.x,u=h.y;a.has(c)||a.add(c),p.has(u)||p.add(u)}n.categories=a.values(),s.categories=p.values()}},e.prototype.createCharts=function(t){for(var e=this.groupSeriesByPane(),i=0;i<t.length;i++){var o=t[i],r=e[o.options.name||"default"]||[];this.addToLegend(r);var n=this.filterVisibleSeries(r);n&&this.createHeatmapChart(qs(n,[Ln]),o)}},e.prototype.createHeatmapChart=function(t,e){var i=new zc(this,{series:t});this.appendChart(i,e)},e.prototype.seriesPaneName=function(t){var e=this.options,i=t.xAxis,o=[].concat(e.xAxis),r=wt(o,(function(t){return t.name===i}))[0],n=t.yAxis,s=[].concat(e.yAxis),a=wt(s,(function(t){return t.name===n}))[0],p=(e.panes||[{}])[0].name||"default";return(r||{}).pane||(a||{}).pane||p},e.prototype.seriesAxes=function(t){var e,i,o=this.options,r=[].concat(o.xAxis),n=t.xAxis;e=n?r.find((function(t){return t.name===n})):r[0];var s=[].concat(o.yAxis),a=t.yAxis;if(i=a?s.find((function(t){return t.name===a})):s[0],!e)throw new Error("Unable to locate X axis with name "+n);if(!i)throw new Error("Unable to locate Y axis with name "+a);return{xAxis:e,yAxis:i}},e.prototype.createAxisLabels=function(){for(var t=this.axes,e=0;e<t.length;e++)t[e].createLabels()},e.prototype.createXYAxis=function(t,e,i){for(var o,r=t.name,n=e?this.namedYAxes:this.namedXAxes,s=Object.assign({axisCrossingValue:0},t,{vertical:e,reverse:e||this.chartService.rtl?!t.reverse:t.reverse,justified:!1}),a=s.categories?s.categories[0]:null,p=[s.min,s.max,a],l=this.series,h=0;h<l.length;h++){var c=l[h],u=c[e?"yAxis":"xAxis"];if(u===s.name||0===i&&!u){var d=on.current.bindPoint(c,0).valueFields;p.push(d[e?"y":"x"]);break}}for(var f=0;f<p.length;f++)if(p[f]instanceof Date){o=!0;break}var g=new(Ws(s.type,m)||!s.type&&o?fr:nr)(s,this.chartService);if(g.axisIndex=i,r){if(n[r])throw new Error((e?"Y":"X")+" axis with name "+r+" is already defined");n[r]=g}return this.appendAxis(g),g.indexCategories(),g},e.prototype.createAxes=function(t){for(var e=this.options,i=[].concat(e.xAxis),o=[],r=[].concat(e.yAxis),n=[],s=0;s<i.length;s++)Ct(this.findPane(i[s].pane),t)&&o.push(this.createXYAxis(i[s],!1,s));for(var a=0;a<r.length;a++)Ct(this.findPane(r[a].pane),t)&&n.push(this.createXYAxis(r[a],!0,a));this.axisX=this.axisX||o[0],this.axisY=this.axisY||n[0]},e.prototype.removeAxis=function(e){var i=e.options.name;t.prototype.removeAxis.call(this,e),e.options.vertical?delete this.namedYAxes[i]:delete this.namedXAxes[i],e===this.axisX&&delete this.axisX,e===this.axisY&&delete this.axisY},e.prototype._dispatchEvent=function(t,e,i){for(var o=t._eventCoordinates(e),r=new xi(o.x,o.y),n=this.axes,s=n.length,a=[],p=[],l=0;l<s;l++){var h=n[l];Fs(h.options.vertical?p:a,h.getCategory(r))}a.length>0&&p.length>0&&t.trigger(i,{element:Ut(e),originalEvent:e,x:ta(a),y:ta(p)})},e.prototype.updateAxisOptions=function(t,e){var i=t.options.vertical,o=this.groupAxes(this.panes),r=(i?o.y:o.x).indexOf(t);Fc(this.options,r,i,e),Fc(this.originalOptions,r,i,e)},e.prototype.crosshairOptions=function(t){return Object.assign({},t.options.crosshair,{zIndex:0})},e.prototype._pointsByVertical=function(t,e){var i=this;void 0===e&&(e=0);var o=this.axisX.options.reverse?-1*e:e,r=this.axisX.children,n=this._getPointAxisXIndex(t)+o,s=r[n=it(n,r.length)].value,a=this.filterPoints((function(t){return Dc(t.pointData().x,s)})).sort((function(t,e){return i._getPointAxisYIndex(t)-i._getPointAxisYIndex(e)}));return this.axisY.options.reverse?a.reverse():a},e.prototype._pointsByHorizontal=function(t,e){var i=this;void 0===e&&(e=0);var o=this.axisY.options.reverse?-1*e:e,r=this.axisY.children,n=this._getPointAxisYIndex(t)+o,s=r[n=it(n,r.length)].value,a=this.filterPoints((function(t){return Dc(t.pointData().y,s)})).sort((function(t,e){return i._getPointAxisXIndex(t)-i._getPointAxisXIndex(e)}));return this.axisX.options.reverse?a.reverse():a},e.prototype._getPointAxisXIndex=function(t){return this._getPointAxisIndex(this.axisX,t.pointData().x)},e.prototype._getPointAxisYIndex=function(t){return this._getPointAxisIndex(this.axisY,t.pointData().y)},e.prototype._getPointAxisIndex=function(t,e){return t.children.findIndex((function(t){return Dc(e,t.value)}))},e}(Dp);function Dc(t,e){return t instanceof Date&&e instanceof Date?Ko(t,e):t===e}function Fc(t,e,i,o){at([].concat(i?t.yAxis:t.xAxis)[e],o)}te(jc,{xAxis:{},yAxis:{}}),at(jc.prototype,Hp);const Hc=jc;var Nc="color",Uc="first",Gc="max",Wc="min",Xc="noteText";sh.current.register(Ll,[wn,Pn,In,Qn,_n,Yn,Cn,En,Sn,Zn,kn,qn,Gn,Un,$n,Bn,Nn,Kn].concat(ss)),sh.current.register(Mh,[Wn,Xn,An].concat(ss)),sh.current.register(Fh,[Rn]),sh.current.register(Xh,[Tn]),sh.current.register(Ic,[Mn,On]),sh.current.register(ac,[Vn,zn,jn].concat(ss)),sh.current.register(Sc,[Dn,Fn,Hn].concat(ss)),sh.current.register(Hc,[Ln]),on.current.register([wn,Pn,In,Qn,_n,Yn],[z],[Ms,Nc,Xc,dn,fn,Is,Es]),on.current.register([Gn,Un,Nn,Kn],["from","to"],[Ms,Nc,Xc,Is,Es]),on.current.register([$n,Bn],[z],[Ms,Nc,Xc,"summary",Is,Es]),on.current.register([Vn,zn,jn],[F,H],[Nc,Is,Es]),on.current.register([Dn,Fn,Hn],[z],[Ms,Nc,Is,Es]),on.current.register([Mn,On],[z],[Ms,Nc,"visibleInLegend","visible",Is,Es]),Xp.current.register([wn,Pn,In,Qn,_n,Yn,$n,Bn],{value:Gc,color:Uc,noteText:Uc,errorLow:Wc,errorHigh:Gc}),Xp.current.register([Gn,Un,Nn,Kn],{from:Wc,to:Gc,color:Uc,noteText:Uc}),Xp.current.register([Dn,Fn,Hn],{value:Gc,color:Uc}),on.current.register([Wn,Xn,An],[F,H],[Nc,Xc,"xErrorLow","xErrorHigh","yErrorLow","yErrorHigh"]),on.current.register([An],[F,H,"size"],[Nc,Ms,Xc,Es]),on.current.register([Ln],[F,H,z],[Nc,Xc,Es]),on.current.register([Cn,En],["open","high","low","close"],[Ms,Nc,"downColor",Xc,Es]),Xp.current.register([Cn,En],{open:Gc,high:Gc,low:Wc,close:Gc,color:Uc,downColor:Uc,noteText:Uc}),on.current.register([kn,qn],["lower","q1","median","q3","upper","mean","outliers"],[Ms,Nc,Xc,Is,Es]),Xp.current.register([kn,qn],{lower:Gc,q1:Gc,median:Gc,q3:Gc,upper:Gc,mean:Gc,outliers:Uc,color:Uc,noteText:Uc}),on.current.register([Sn,Zn],["current","target"],[Ms,Nc,"visibleInLegend",Xc,Is,Es]),Xp.current.register([Sn,Zn],{current:Gc,target:Gc,color:Uc,noteText:Uc}),on.current.register([Rn,Tn],[z],[Ms,Nc,"explode","visibleInLegend","visible",Is,Es]);for(var Yc="--kendo-chart-series-",qc=function(t){return t.ownerDocument.defaultView.getComputedStyle(t)},Zc={},Qc=function(t,e){var i=qc(t).getPropertyValue(e);return/^color-mix/i.test(i)&&(i=function(t,e){if(Zc[t])return Zc[t];var i=e.style.color;e.style.color=t;var o=qc(e).color;return e.style.color=i,Zc[t]=o,o}(i,t)),i},Kc=function(t,e){return parseFloat(qc(t).getPropertyValue(e))},$c=function(t,e,i,o){var r=qc(t);return[r.getPropertyValue(e),r.getPropertyValue(i),r.getPropertyValue(o)||r.fontFamily].join(" ")},Jc={},tu=1;tu<=30;tu++)Jc["series-color-"+tu]=""+Yc+tu;var eu=function(t){for(var e=qc(t),i=[],o=1,r=e.getPropertyValue(""+Yc+o);r||o<=30;)i.push(r),o++,r=e.getPropertyValue(""+Yc+o);return i},iu={text:"--kendo-chart-text",chartBg:"--kendo-chart-bg",fontWeight:"--kendo-font-weight",fontFamily:"--kendo-font-family"},ou={majorLines:"--kendo-chart-major-lines",minorLines:"--kendo-chart-minor-lines",areaOpacity:"--kendo-chart-area-opacity",surface:"--kendo-color-surface",primaryBg:"--kendo-chart-primary-bg",crosshairBg:"--kendo-chart-crosshair-bg",axisLabelFontSize:"--kendo-chart-label-font-size",axisLabelFontWeight:"--kendo-font-weight",axisLabelFontFamily:"--kendo-font-family",chartFontSize:"--kendo-chart-font-size",paneTitleFontSize:"--kendo-chart-pane-title-font-size",paneTitleFontWeight:"--kendo-chart-pane-title-font-weight",titleFontSize:"--kendo-chart-title-font-size",titleFontWeight:"--kendo-font-weight",errorBarsBg:"--kendo-chart-error-bars-bg",areaInactiveOpacity:"--kendo-chart-area-inactive-opacity",lineInactiveOpacity:"--kendo-chart-line-inactive-opacity",bulletTarget:"--kendo-chart-bullet-target",notesBg:"--kendo-chart-notes-bg",notesBorder:"--kendo-chart-notes-border",notesLines:"--kendo-chart-notes-lines",inactive:"--kendo-chart-inactive"},ru=function(t){return $c(t,iu.fontWeight,ou.chartFontSize,iu.fontFamily)},nu=function(t){return $c(t,ou.paneTitleFontWeight,ou.paneTitleFontSize,iu.fontFamily)},su=function(t){return Qc(t,iu.text)},au=function(t){return{color:su(t),font:$c(t,iu.fontWeight,ou.titleFontSize,iu.fontFamily)}},pu=function(t){var e=su(t);return{labels:{color:e,font:ru(t)},title:{color:e}}},lu=function(t){var e=Qc(t,ou.inactive);return Object.assign({},{inactiveItems:{labels:{color:e},markers:{color:e}}},pu(t))},hu=Object.assign({},iu,ou,Jc),cu=Object.assign({},iu,{linksColor:"--kendo-color-subtle"},Jc),uu=Object.assign({},iu,{gaugePointer:"--kendo-chart-gauge-pointer",gaugeTrack:"--kendo-chart-gauge-track"}),du=function(t){var e=uu,i=su(t);return{pointer:{color:Qc(t,e.gaugePointer)},scale:{labels:{color:i},rangePlaceholderColor:Qc(t,e.gaugeTrack),minorTicks:{color:i},majorTicks:{color:i},line:{color:i}}}},fu=function(t){var e=cu;return{labels:{color:su(t),font:ru(t),stroke:{color:Qc(t,e.chartBg)}},links:{color:Qc(t,e.linksColor)},nodeColors:eu(t),title:au(t),legend:pu(t)}},gu=function(t){var e=hu,i=Qc(t,e.majorLines),o=Qc(t,e.text),r=$c(t,e.axisLabelFontWeight,e.axisLabelFontSize,e.axisLabelFontFamily),n=Qc(t,e.chartBg),s=function(t){return{icon:{background:Qc(t,ou.notesBg),border:{color:Qc(t,ou.notesBorder)}},line:{color:Qc(t,ou.notesLines)},label:{font:ru(t)}}}(t),a=Kc(t,e.areaOpacity),p=Qc(t,e.surface),l=Qc(t,e.primaryBg),h=function(){return{downColor:i,mean:{color:p},median:{color:p},whiskers:{color:l}}},c=function(){return{line:{color:i}}},u=function(){return{opacity:a,highlight:{inactiveOpacity:Kc(t,e.areaInactiveOpacity)}}},d=function(){return{highlight:{inactiveOpacity:Kc(t,e.lineInactiveOpacity)}}},f=function(){return{target:{color:o}}};return{axisDefaults:{crosshair:{color:Qc(t,e.crosshairBg)},labels:{color:o,font:r},line:{color:i},majorGridLines:{color:i},minorGridLines:{color:Qc(t,e.minorLines)},notes:structuredClone(s),title:{color:o,font:ru(t)}},chartArea:{background:n},legend:lu(t),seriesColors:eu(t),seriesDefaults:{area:u(),verticalArea:u(),radarArea:u(),boxPlot:h(),verticalBoxPlot:h(),bullet:f(),verticalBullet:f(),horizontalWaterfall:c(),waterfall:c(),line:d(),verticalLine:d(),candlestick:{downColor:o,line:{color:o}},errorBars:{color:Qc(t,e.errorBarsBg)},icon:{border:{color:i}},labels:{background:n,color:o,font:r,opacity:a},notes:structuredClone(s)},subtitle:{color:o,font:nu(t)},title:au(t),paneDefaults:{title:{font:nu(t)}}}},yu=[Ms,z,F,H],vu="mousedown",mu="mousemove",xu="contextmenu",bu="mouseleave",_u="keydown",wu="focus",ku="blur",Au="k-chart-overlay-top",Su=function(t,e,i,o){var r=this;void 0===o&&(o={}),this.observers=[],this.addObserver(o.observer),this.chartService=new mo(this,o),this.chartService.theme=i,this._initElement(t);var n=at({},this.options,e);this._originalOptions=at({},n),this._theme=i,this._initTheme(n,i),this._focusState={},this._initHandlers(),this._createSurface=o.createSurface||q.drawing.Surface.create.bind(q.drawing.Surface),this._initSurface(),this.bindCategories(),Jt.preloadFonts(e,(function(){r.fontLoaded=!0,r._destroyed||(r.trigger("init"),r._redraw(),r._attachEvents(),r._restoreOverlayElement(),r._initStyleObserver())}))};function Cu(t,e){if(t)for(var i=0;i<t.length;i++)if(t[i].category===e)return[t[i]]}function Pu(t){delete t.bar,delete t.column,delete t.rangeColumn,delete t.line,delete t.verticalLine,delete t.pie,delete t.donut,delete t.area,delete t.verticalArea,delete t.scatter,delete t.scatterLine,delete t.bubble,delete t.candlestick,delete t.ohlc,delete t.boxPlot,delete t.bullet,delete t.verticalBullet,delete t.polarArea,delete t.polarLine,delete t.radarArea,delete t.radarLine,delete t.waterfall}function Tu(t){for(var e={},i=0;i<t.length;i++){var o=t[i],r=o.options.name;r&&(e[r]=o.range())}return e}Su.prototype._initStyleObserver=function(){var t=this;this._destroyStyleObserver(),this.options.observeStyles&&(this._stylesObserver=function(t,e,i){var o=getComputedStyle(t),r=new Map;i.forEach((function(t){r.set(t,o.getPropertyValue(t))}));var n=!1,s=setInterval((function(){n||(n=!0,requestAnimationFrame((function(){n=!1,function(){if(t.isConnected){var n=!1;i.forEach((function(t){var e=o.getPropertyValue(t);r.get(t)!==e&&(r.set(t,e),n=!0)})),n&&e()}}()})))}),500);return{disconnect:function(){clearInterval(s),r.clear()}}}(this.element,(function(){t.trigger("styleChanged")}),Object.values(hu)))},Su.prototype._destroyStyleObserver=function(){this._stylesObserver&&(this._stylesObserver.disconnect(),this._stylesObserver=null)},Su.prototype._initElement=function(t){this._setElementClass(t),t.style.position="relative",t.tabIndex=t.getAttribute("tabindex")?t.getAttribute("tabindex"):0,t.setAttribute("role","graphics-document document");for(var e=t.childNodes.length-1;e>=0;e--){var i=t.childNodes[e];kt(i,"k-chart-overlay")?this.overlayElement=i:t.removeChild(i)}this.element=t},Su.prototype._setElementClass=function(t){W(t,"k-chart")},Su.prototype._restoreOverlayElement=function(){this.overlayElement&&(this._hasSeriesData()?this.overlayElement.style.display="none":(!this.options.title||this.options.title&&this.options.title.position!==d?W(this.overlayElement,Au):Y(this.overlayElement,Au),this.overlayElement.style.display=""),this.overlayElement.parentElement!==this.element&&this.element.appendChild(this.overlayElement))},Su.prototype._hasSeriesData=function(){var t=this.options.series||[];return t.length>0&&t.some((function(t){return t.data&&t.data.length>0}))},Su.prototype._initTheme=function(t,e){for(var i=[],o=t.series||[],r=0;r<o.length;r++)i.push(Object.assign({},o[r]));t.series=i,function(t){for(var e=yu,i=0;i<e.length;i++){var o=e[i]+"Axes";t[o]&&(t[e[i]+"Axis"]=t[o],delete t[o])}}(t),this.applyDefaults(t,e),null===t.seriesColors&&delete t.seriesColors,$(t.title)&&(t.title={text:t.title}),this.options=at({},e,t),this.applySeriesColors()},Su.prototype.getSize=function(){var t=this.options.chartArea||{};return{width:t.width?parseInt(t.width,10):Math.floor(this.element.offsetWidth),height:t.height?parseInt(t.height,10):Math.floor(this.element.offsetHeight)}},Su.prototype.resize=function(t){var e=this.getSize(),i=this._size,o=e.width>0||e.height>0;t||o&&(!i||e.width!==i.width||e.height!==i.height)?(this._size=e,this._resize(e,t),this.trigger("resize",e)):o&&this._selections&&le(this._selections,(function(t){return!t.visible}))&&(this._destroySelections(),this._setupSelection())},Su.prototype._resize=function(){this._noTransitionsRedraw()},Su.prototype.redraw=function(t){if(this.applyDefaults(this.options),this.applySeriesColors(),t){var e=this._model._plotArea,i=e.findPane(t);e.redraw(i)}else this._redraw()},Su.prototype.getAxis=function(t){return Yr(t,this._plotArea.axes)},Su.prototype.findAxisByName=function(t){return this.getAxis(t)},Su.prototype.findPaneByName=function(t){for(var e=this._plotArea.panes,i=0;i<e.length;i++)if(e[i].options.name===t)return new Zr(e[i])},Su.prototype.findPaneByIndex=function(t){var e=this._plotArea.panes;if(e[t])return new Zr(e[t])},Su.prototype.plotArea=function(){return new Qr(this._plotArea)},Su.prototype.toggleHighlight=function(t,e){var i,o,r,n=this._plotArea,s=(n.srcSeries||n.series||[])[0];ot(e)?i=n.filterPoints(e):(pt(e)?(o=e.series,r=e.category):o=r=e,i=s.type===Tn?Cu(n.pointsBySeriesName(o),r):Ct(s.type,[Rn,Mn,On])?Cu((n.charts[0]||{}).points,r):n.pointsBySeriesName(o)),i&&this.togglePointsHighlight(t,i)},Su.prototype.togglePointsHighlight=function(t,e){for(var i=this._highlight,o=0;o<e.length;o++)i.togglePointHighlight(e[o],t)},Su.prototype.showTooltip=function(t){var e,i,o=this._sharedTooltip(),r=this._tooltip,n=this._plotArea;if(ot(t)?(e=n.findPoint(t))&&o&&(i=e.categoryIx):o&&jt(t)&&(i=n.categoryAxis.categoryIndex(t)),o){if(i>=0){var s=this._plotArea.pointsByCategoryIndex(i);r.showAt(s)}}else e&&r.show(e)},Su.prototype.hideTooltip=function(){this._tooltip.hide()},Su.prototype._initSurface=function(){var t=this.surface,e=this._surfaceWrap(),i=this.options.chartArea||{};i.width&&Ht(e,{width:i.width}),i.height&&Ht(e,{height:i.height}),t&&t.options.type===this.options.renderAs?(this.surface.clear(),this.surface.resize()):(this._destroySurface(),this.surface=this._createSurface(e,{type:this.options.renderAs}),this.surface.bind("mouseenter",this._surfaceMouseenterHandler),this.surface.bind("mouseleave",this._surfaceMouseleaveHandler)),this.element._kendoExportVisual=this._kendoExportVisual.bind(this)},Su.prototype._surfaceWrap=function(){return this.element},Su.prototype._redraw=function(){var t=this._getModel();this._size={width:t.options.width,height:t.options.height},this._destroyView(),this._setElementAccessibilityAttributes(),this._model=t,this._plotArea=t._plotArea,this._legend=t._legend,t.renderVisual();var e=this.options.transitions;!1!==e&&t.traverse((function(t){if(t.animation){var i=e&&!0!==e?e.loading:e;t.animation.options=Object.assign({},t.animation.options,i),t.animation.setup()}})),this._initSurface(),this.surface.draw(t.visual),!1!==e&&t.traverse((function(t){t.animation&&t.animation.play()})),this._tooltip=this._createTooltip(),this._highlight=new El,this._setupSelection(),this._createPannable(),this._createZoomSelection(),this._createMousewheelZoom(),this._setComputedStyles(),this.trigger("render"),Lu(this._plotArea.panes),this._navState||this._cancelDomEvents(),this._redrawFocusHighlight()},Su.prototype._setComputedStyles=function(){var t=this.titleHeight();this.element.style.setProperty("--kendo-chart-computed-title-height",t+"px")},Su.prototype._redrawFocusHighlight=function(){if(!this._destroyed){var t=this._focusState,e=t.legendInFocus,i=t.preserveHighlight;e&&i&&(this._focusElement(this._getFocusedLegendItem(),!1),this._focusState.preserveHighlight=!1)}},Su.prototype._setElementAccessibilityAttributes=function(){var t=this.options.title,e=$(t)?t:t.description||t.text;e&&this.element.setAttribute("aria-roledescription",e)},Su.prototype._kendoExportVisual=function(t){if(t&&t.width&&t.height){var e=this._originalOptions.chartArea||{},i={width:e.width||t.width,height:e.height||t.height};return this.exportVisual(i)}return this.exportVisual()},Su.prototype.exportVisual=function(t){var e;if(t&&(t.width||t.height||t.options)){var i=this.options,o=at({},t.options,{chartArea:{width:t.width,height:t.height}});Ou(this._originalOptions,o),this.options=at({},this._originalOptions,o),this._initTheme(this.options,this._theme),this.bindCategories();var r=this._getModel();r.renderVisual(),Lu(r._plotArea.panes),e=r.visual,this.options=i}else e=this.surface.exportVisual();return e},Su.prototype._sharedTooltip=function(){return this._plotArea instanceof Ll&&this.options.tooltip&&this.options.tooltip.shared},Su.prototype._createPannable=function(){var t=this.options;!1!==t.pannable&&(this._pannable=new jl(this._plotArea,t.pannable))},Su.prototype._createZoomSelection=function(){var t=this.options.zoomable,e=(t||{}).selection;!1!==t&&!1!==e&&(this._zoomSelection=new Fl(this,e))},Su.prototype._createMousewheelZoom=function(){var t=this.options.zoomable,e=(t||{}).mousewheel;!1!==t&&!1!==e&&(this._mousewheelZoom=new Nl(this,e))},Su.prototype._toggleDragZoomEvents=function(){var t=this.options.pannable,e=this.options.zoomable,i=(e||{}).selection,o=(e||{}).mousewheel,r=!(t||!1!==e&&!1!==i||this.requiresHandlers([ys,fs,gs])),n=(!1===e||!1===o)&&!this.requiresHandlers([vs,ms,xs]),s=this.element;this._dragZoomEnabled&&r&&n?(s.style.touchAction=this._touchAction||"",this._dragZoomEnabled=!1):this._dragZoomEnabled||r&&n||(s.style.touchAction="none",this._dragZoomEnabled=!0),this._toggleDomEvents(!r,!n)},Su.prototype._toggleDomEvents=function(t,e){var i=this.domEvents;i&&(i.toggleDrag&&i.toggleDrag(t),i.toggleZoom&&i.toggleZoom(e))},Su.prototype._createTooltip=function(){var t=this.options.tooltip;return this._sharedTooltip()?this._createSharedTooltip(t):new uh(this.chartService,t)},Su.prototype._createSharedTooltip=function(t){return new fh(this._plotArea,t)},Su.prototype.applyDefaults=function(t,e){!function(t,e){var i,o,r,n=(e||{}).axisDefaults||{};function s(t){var e=(t||{}).color||o.color,r=at({},n,n[i],o,o[i],{line:{color:e},labels:{color:e},title:{color:e}},t);return delete r[i],r}for(var a=0;a<yu.length;a++)i=yu[a]+"Axis",o=t.axisDefaults||{},r=(r=[].concat(t[i])).map(s),t[i]=r.length>1?r:r[0]}(t,e),function(t,e){var i=t.series,o=i.length,r=t.seriesDefaults,n=at({},t.seriesDefaults),s=e?at({},e.seriesDefaults):{},a=at({},s);Pu(n),Pu(a);for(var p=0;p<o;p++){var l=i[p].type||t.seriesDefaults.type,h=at({data:[]},a,s[l],{tooltip:t.tooltip},n,r[l]);i[p]._defaults=h,i[p]=at({},h,i[p]),i[p].data=i[p].data||[]}}(t,e)},Su.prototype.applySeriesColors=function(){for(var t=this.options,e=t.series,i=t.seriesColors||[],o=0;o<e.length;o++){var r=e[o],n=i[o%i.length],s=r._defaults;r.color=r.color||n,s&&(s.color=s.color||n)}},Su.prototype._getModel=function(){var t=this.options,e=this._createPlotArea(),i=new Ui(this._modelOptions());i.chart=this,i._plotArea=e;var o=eo.buildTitle(t.title),r=eo.buildTitle(t.subtitle,{align:t.title.align,position:t.title.position});if(i.append.apply(i,eo.orderTitles([o,r])),t.legend&&t.legend.visible){var n=new rh(e.options.legend,this.chartService);i.append(n),i._legend=n}return i.append(e),i.reflow(),this._setTitleBox(o,r),i},Su.prototype._setTitleBox=function(t,e){if(t||e){this._titleBox=(t||e).box.clone();var i=t?t.options.position:"",o=e?e.options.position:"",r=o!==d;i===o&&e?this._titleBox.wrap(e.box):t&&e&&r&&(this._titleBox=e.box.clone())}},Su.prototype._modelOptions=function(){var t=this.options,e=this.getSize();return at({transitions:t.transitions,width:e.width||600,height:e.height||400},t.chartArea)},Su.prototype._createPlotArea=function(t){var e=this.options;return sh.current.create(t?[]:e.series,e,this.chartService)},Su.prototype._setupSelection=function(){for(var t=this._plotArea.axes,e=this._selections=[],i=0;i<t.length;i++){var o=t[i],r=o.options;if(o instanceof nr&&r.select&&!r.vertical){var n=o.range(),s=new hh(this,o,at({min:n.min,max:n.max},r.select));e.push(s)}}},Su.prototype._selectStart=function(t){return this.trigger(bs,t)},Su.prototype._select=function(t){return this.trigger(_s,t)},Su.prototype._selectEnd=function(t){return this.trigger(ws,t)},Su.prototype._initHandlers=function(){this._clickHandler=this._click.bind(this),this._keydownHandler=this._keydown.bind(this),this._focusHandler=this._focus.bind(this),this._blurHandler=this._blur.bind(this),this._mousedownHandler=this._mousedown.bind(this),this._mousewheelHandler=this._mousewheel.bind(this),this._mouseleaveHandler=this._mouseleave.bind(this),this._surfaceMouseenterHandler=this._mouseover.bind(this),this._surfaceMouseleaveHandler=this._mouseout.bind(this),this._mousemoveThrottled=(0,q.throttle)(this._mousemove.bind(this),20)},Su.prototype.addObserver=function(t){t&&this.observers.push(t)},Su.prototype.removeObserver=function(t){var e=this.observers.indexOf(t);e>=0&&this.observers.splice(e,1)},Su.prototype.requiresHandlers=function(t){for(var e=this.observers,i=0;i<e.length;i++)if(e[i].requiresHandlers(t))return!0},Su.prototype.trigger=function(t,e){void 0===e&&(e={}),e.sender=this,t===ks?e.anchor.point=this._toDocumentCoordinates(e.anchor.point):t===hs?this._updateDrilldownPoint(e.point):t===cs?this._resetDrilldownPoint():t===ps?(this._focusPoint(e.point),this._startDrilldown(e.point)):t===as&&this._focusLegendItem(e);for(var i=this.observers,o=!1,r=0;r<i.length;r++)i[r].trigger(t,e)&&(o=!0);return o},Su.prototype.titleHeight=function(){return this._titleBox?this._titleBox.height():0},Su.prototype._attachEvents=function(){var t,e,i=this.element;this._touchAction=i.style.touchAction,zt(i,((t={})[xu]=this._clickHandler,t[Bs]=this._mousewheelHandler,t[bu]=this._mouseleaveHandler,t[_u]=this._keydownHandler,t[vu]=this._mousedownHandler,t[wu]=this._focusHandler,t[ku]=this._blurHandler,t)),this._shouldAttachMouseMove()&&zt(i,((e={})[mu]=this._mousemoveThrottled,e)),this.domEvents=_o.create(this.element,{start:this._start.bind(this),move:this._move.bind(this),end:this._end.bind(this),tap:this._tap.bind(this),gesturestart:this._gesturestart.bind(this),gesturechange:this._gesturechange.bind(this),gestureend:this._gestureend.bind(this)}),this._toggleDragZoomEvents()},Su.prototype._mouseleave=function(t){this._hoveredPoint&&(this._hoveredPoint.out(this,t),this._hoveredPoint=null),this._plotAreaHovered&&(this._plotAreaHovered=!1,this.trigger(ds)),this._hasInactiveOpacity()&&this._activeChartInstance&&(this._applySeriesOpacity(this._activeChartInstance.children,null,!0),this._updateSeriesOpacity(null,!0))},Su.prototype._cancelDomEvents=function(){this.domEvents&&this.domEvents.cancel&&this.domEvents.cancel()},Su.prototype._gesturestart=function(t){this._mousewheelZoom&&!this._stopChartHandlers(t)&&(this._gestureDistance=t.distance,this._unsetActivePoint(),this._clearFocusedElement(),this.surface.suspendTracking())},Su.prototype._gestureend=function(t){this._zooming&&!this._stopChartHandlers(t)&&(this.surface&&this.surface.resumeTracking(),this._zooming=!1,this.trigger(xs,{}))},Su.prototype._gesturechange=function(t){var e=this._mousewheelZoom;if(e&&!this._stopChartHandlers(t)){t.preventDefault();var i=this._gestureDistance,o=-t.distance/i+1;if(Math.abs(o)>=.1){o=Math.round(10*o),this._gestureDistance=t.distance;var r={delta:o,axisRanges:Tu(this._plotArea.axes),originalEvent:t};if(this._zooming||!this.trigger(vs,r)){var n=this._eventCoordinates(t);this._zooming||(this._zooming=!0),(r.axisRanges=e.updateRanges(o,n))&&!this.trigger(ms,r)&&e.zoom()}}}},Su.prototype._mouseout=function(t){if(t.element){var e=this._drawingChartElement(t.element,t);e&&e.leave&&e.leave(this,t.originalEvent)}},Su.prototype._start=function(t){var e=this._eventCoordinates(t);!this._stopChartHandlers(t)&&this._plotArea.backgroundContainsPoint(e)&&(this.requiresHandlers([ys,fs,gs])&&this._startNavigation(t,e,ys),this._pannable&&this._pannable.start(t)&&(this.surface.suspendTracking(),this._unsetActivePoint(),this._clearFocusedElement(),this._suppressHover=!0,this.chartService.panning=!0),this._zoomSelection&&this._zoomSelection.start(t)&&this.trigger(vs,{axisRanges:Tu(this._plotArea.axes),originalEvent:t}))},Su.prototype._move=function(t){var e=this._navState,i=this._pannable;if(!this._stopChartHandlers(t)){if(i){var o=i.move(t);o&&!this.trigger(fs,{axisRanges:o,originalEvent:t})&&i.pan()}else if(e){for(var r={},n=e.axes,s=0;s<n.length;s++){var a=n[s];if(a.options.name){var p=a.options.vertical?t.y:t.x,l=p.startLocation-p.location;0!==l&&(r[a.options.name]=a.translateRange(l))}}e.axisRanges=r,this.trigger(fs,{axisRanges:r,originalEvent:t})}this._zoomSelection&&this._zoomSelection.move(t)}},Su.prototype._end=function(t){if(!this._stopChartHandlers(t)){var e=this._pannable;if(e&&e.end(t)?(this.surface.resumeTracking(),this.trigger(gs,{axisRanges:Tu(this._plotArea.axes),originalEvent:t}),this._suppressHover=!1,this.chartService.panning=!1):this._endNavigation(t,gs),this._zoomSelection){var i=this._zoomSelection.end(t);i&&!this.trigger(ms,{axisRanges:i,originalEvent:t})&&(this._zoomSelection.zoom(),this.trigger(xs,{axisRanges:i,originalEvent:t}))}}},Su.prototype._stopChartHandlers=function(t){var e=this._selections||[];if(!e.length)return!1;var i=this._eventCoordinates(t),o=this._plotArea.paneByPoint(i);if(o)for(var r=0;r<e.length;r++)if(e[r].onPane(o))return!0},Su.prototype._mousewheelZoomRate=function(){var t=(this.options.zoomable||{}).mousewheel||{};return Kt(t.rate,.3)},Su.prototype._mousewheel=function(t){var e=this,i=Et(t),o=this._mousewheelZoom,r=this._eventCoordinates(t);if(!this._stopChartHandlers(t)&&this._plotArea.backgroundContainsPoint(r))if(o){var n={delta:i,axisRanges:Tu(this._plotArea.axes),originalEvent:t};!this._zooming&&this.trigger(vs,n)||(t.preventDefault(),this._zooming||(this._unsetActivePoint(),this._clearFocusedElement(),this.surface.suspendTracking(),this._zooming=!0),this._mwTimeout&&clearTimeout(this._mwTimeout),n.axisRanges=o.updateRanges(i,r),n.axisRanges&&!this.trigger(ms,n)&&o.zoom(),this._mwTimeout=setTimeout((function(){e.trigger(xs,n),e._zooming=!1,e.surface&&e.surface.resumeTracking()}),150))}else{var s=this._navState;if(s||this._startNavigation(t,r,vs)||(s=this._navState),s){var a=s.totalDelta||i;s.totalDelta=a+i;for(var p=this._navState.axes,l={},h=0;h<p.length;h++){var c=p[h],u=c.options.name;u&&(l[u]=c.scaleRange(-a*this._mousewheelZoomRate(),r))}this.trigger(ms,{delta:i,axisRanges:l,originalEvent:t}),this._mwTimeout&&clearTimeout(this._mwTimeout),this._mwTimeout=setTimeout((function(){e._endNavigation(t,xs)}),150)}}},Su.prototype._startNavigation=function(t,e,i){var o=this._model._plotArea,r=o.findPointPane(e),n=o.axes.slice(0);if(r){var s=Tu(n);this.trigger(i,{axisRanges:s,originalEvent:t})?this._cancelDomEvents():(this._suppressHover=!0,this._unsetActivePoint(),this._clearFocusedElement(),this._navState={axisRanges:s,pane:r,axes:n})}},Su.prototype._endNavigation=function(t,e){this._navState&&(this.trigger(e,{axisRanges:this._navState.axisRanges,originalEvent:t}),this._suppressHover=!1,this._navState=null)},Su.prototype._getChartElement=function(t,e){var i=this.surface.eventTarget(t);if(i)return this._drawingChartElement(i,t,e)},Su.prototype._drawingChartElement=function(t,e,i){for(var o,r=t;r&&!o;)o=r.chartElement,r=r.parent;if(o)return o.aliasFor&&(o=o.aliasFor(e,this._eventCoordinates(e))),i&&(o=o.closest(i))&&o.aliasFor&&(o=o.aliasFor()),o},Su.prototype._eventCoordinates=function(t){var e=Nt(t);return this._toModelCoordinates(e.x,e.y)},Su.prototype._elementPadding=function(){if(!this._padding){var t=ut(this.element,["paddingLeft","paddingTop"]),e=t.paddingLeft,i=t.paddingTop;this._padding={top:i,left:e}}return this._padding},Su.prototype._toDocumentCoordinates=function(t){var e=this._elementPadding(),i=Ft(this.element);return{left:Zt(t.x+e.left+i.left),top:Zt(t.y+e.top+i.top)}},Su.prototype._toModelCoordinates=function(t,e){var i=this.element,o=Ft(i),r=this._elementPadding(),n=de(i).invert(),s=new q.geometry.Point(t-o.left-r.left,e-o.top-r.top).transform(n);return new xi(s.x,s.y)},Su.prototype._tap=function(t){var e=this,i=this.surface.eventTarget(t),o=this._drawingChartElement(i,t),r=this._sharedTooltip();this._startHover(i,t)||r||this._unsetActivePoint(),r&&this._trackSharedTooltip(this._eventCoordinates(t),t,!0),this._propagateClick(o,t),this.handlingTap=!0,setTimeout((function(){e.handlingTap=!1}),0)},Su.prototype._click=function(t){var e=this._getChartElement(t);this._propagateClick(e,t)},Su.prototype._propagateClick=function(t,e){for(var i=t;i;)i.click&&i.click(this,e),i=i.parent},Su.prototype._isLegendBeforeChart=function(){var t=this.options.legend.position,e=this._legend;return e&&e.hasItems()&&(t===V||t===C)},Su.prototype._focus=function(){this._preventInitialPointFocus||(this._isLegendBeforeChart()?this._focusFirstLegendItem():this._focusFirstPoint()),this._preventInitialPointFocus=!1},Su.prototype._keydown=function(t){var e=this._focusState,i=e.legendInFocus,o=e.focusedElement,r=this._legend;if("Tab"===t.key){this._clearFocusedElement();var n=this._isLegendBeforeChart();i&&n!==t.shiftKey?this._navigatePoints(t):!i&&n===t.shiftKey&&r.hasItems()&&this._navigateLegend(t)}else"Escape"===t.key?(o&&t.stopPropagation(),this._tooltip&&this._tooltip.visible?this._hideTooltip():this._blur()):"Enter"===t.key?o&&(this._focusState.preserveHighlight=!0,this._propagateClick(o,t),this._focusElement(o)):i?this._navigateLegend(t):this._navigatePoints(t)},Su.prototype._navigatePoints=function(t){var e=this,i=this._focusState,o=this._plotArea;if(i.legendInFocus=!1,!i.focusedElement)return this._focusFirstPoint(),void t.preventDefault();var r=function(o){i.focusedPoint=o,e._focusElement(i.focusedPoint),e._displayTooltip(o),t.preventDefault()};switch(t.key){case h:r(o.getPointToTheRight(i.focusedPoint));break;case l:r(o.getPointToTheLeft(i.focusedPoint));break;case p:r(o.getPointBelow(i.focusedPoint));break;case a:r(o.getPointAbove(i.focusedPoint))}},Su.prototype._navigateLegend=function(t){var e=this,i=this,o=i._focusState,r=i._legend,n=i.chartService.rtl;if(o.legendInFocus=!0,!o.focusedElement)return this._focusFirstLegendItem(),void t.preventDefault();var s=r.getItems().length,c=function(i){o.focusedLegendItemIndex=i(o.focusedLegendItemIndex,s),e._focusElement(e._getFocusedLegendItem()),t.preventDefault()};switch(t.key){case a:case l:c(n?tt:et);break;case p:case h:c(n?et:tt)}},Su.prototype._focusFirstPoint=function(){var t=this._focusState.focusedPoint=this._plotArea.getFirstPoint();t&&(this._focusElement(t),this._displayTooltip(t))},Su.prototype._hasFocus=function(){return this.element.ownerDocument.activeElement===this.element},Su.prototype._mousedown=function(){this._hasFocus()||(this._preventInitialPointFocus=!0)},Su.prototype._focusChart=function(){this._hasFocus()||(this._preventInitialPointFocus=!0,this.element.focus())},Su.prototype._focusPoint=function(t){this._focusState.focusedPoint=t,this._focusChart(),this._focusElement(t,!0)},Su.prototype._focusFirstLegendItem=function(){var t=this._focusState;t.focusedLegendItemIndex=0,this._focusElement(this._getFocusedLegendItem()),t.legendInFocus=!0,this._hideTooltip()},Su.prototype._focusLegendItem=function(t){var e=this._focusState;e.focusedLegendItemIndex=this._legend.getItems().findIndex((function(e){return e.options.series.index===t.seriesIndex&&e.options.pointIndex===t.pointIndex})),e.legendInFocus=!0,this._focusChart(),this._focusElement(this._getFocusedLegendItem(),!0)},Su.prototype._getFocusedLegendItem=function(){var t=this._focusState;return this._legend.getItems()[t.focusedLegendItemIndex]},Su.prototype._focusElement=function(t,e){var i=this._focusState;if(this._clearFocusedElement(),t&&(i.focusedElement=t,this._setElementActiveDescendant(t),!e))if(t.focusVisual(),i.legendInFocus){var o=t.options;this._showSeriesInactiveOpacity(o.series.index,o.pointIndex)}else this._showInactiveOpacity(t)},Su.prototype._clearFocusedElement=function(){var t=this._focusState;t&&(t.focusedElement&&t.focusedElement.clearFocusFromVisual&&(t.focusedElement.clearFocusFromVisual(),this._clearElementActiveDescendant()),t.focusedElement=null)},Su.prototype._setElementActiveDescendant=function(t){"canvas"===this.options.renderAs&&(this._pseudoFocusedElement=this._createPseudoFocusedElement(t),this.element.append(this._pseudoFocusedElement)),this.element.setAttribute(c,t._id)},Su.prototype._clearElementActiveDescendant=function(){this._pseudoFocusedElement&&(this._pseudoFocusedElement.remove(),this._pseudoFocusedElement=null),this.element.removeAttribute(c)},Su.prototype._createPseudoFocusedElement=function(t){var e=document.createElement("div"),i=t.options.accessibility;e.id=t._id,e.setAttribute("aria-label",t.getAriaLabelText()),e.setAttribute("role",i.role),e.setAttribute("aria-roledescription",i.ariaRoleDescription);var o=i.ariaChecked;return jt(o)&&e.setAttribute("aria-checked",o),e},Su.prototype._blur=function(){this._focusState.legendInFocus=!1,this._clearFocusedElement(),this._hideInactiveOpacity()},Su.prototype._startHover=function(t,e){if(this._suppressHover)return!1;var i=this._drawingChartElement(t,e,(function(t){return(t.hover||t.over)&&!(t instanceof Dp)})),o=this._activePoint;return this._updateHoveredPoint(i,e),i&&o!==i&&i.hover&&(this._activePoint=i,this._sharedTooltip()||i.hover(this,e)||(this._displayTooltip(i),this._showInactiveOpacity(i))),i},Su.prototype._displayTooltip=function(t){at({},this.options.tooltip,t.options.tooltip).visible&&(this._sharedTooltip()&&t.box?this._trackSharedTooltip(t.box.center(),{}):this._tooltip.show(t))},Su.prototype._hideTooltip=function(){this._tooltip&&this._tooltip.hide()},Su.prototype._displayInactiveOpacity=function(t,e,i){var o=this._activeChartInstance=this._chartInstanceFromPoint(t);if(o)if(e)this._updateSeriesOpacity(t),this._applySeriesOpacity(o.children,null,!0),this._applySeriesOpacity(o.children,t.series),this._highlight.show(i||t);else{var r;if(!o.supportsPointInactiveOpacity())return void this._highlight.show(t);(r=this._getInactivePoints(t,o))&&r.length&&this._highlight.show(r,this._getInactiveOpacityForSeries(t.series))}},Su.prototype._getInactivePoints=function(t,e){return this._getAllPointsOfType(e,t.constructor).filter((function(e){return e!==t}))},Su.prototype._getAllPointsOfType=function(t,e){for(var i=[],o=0;o<t.children.length;o++){var r=t.children[o];r.constructor===e?i.push(r):r.children&&r.children.length&&(i=i.concat(this._getAllPointsOfType(r,e)))}return i},Su.prototype._updateHoveredPoint=function(t,e){var i=this._hoveredPoint;i&&i!==t&&(i.out(this,e),this._hoveredPoint=null),t&&i!==t&&t.over&&(this._hoveredPoint=t,t.over(this,e))},Su.prototype._updateDrilldownPoint=function(t){t&&t.series&&on.current.bindPoint(t.series,null,t.dataItem).fields.drilldown&&(this._drilldownState={cursor:this.element.style.cursor},this.element.style.cursor="pointer")},Su.prototype._resetDrilldownPoint=function(){this._drilldownState&&(this.element.style.cursor=this._drilldownState.cursor,this._drilldownState=null)},Su.prototype._startDrilldown=function(t){if(t&&t.series){var e=t.series,i=on.current.bindPoint(e,null,t.dataItem).fields.drilldown;if(i){var o={series:e,point:t,value:i,sender:this};this.trigger("drilldown",o)}}},Su.prototype._updateSeriesOpacity=function(t,e){for(var i=this._plotArea,o=i.series.length,r=0;r<o;r++){var n=i.series[r],s=this._getDefaultOpacityForSeries(n),a=this._getInactiveOpacityForSeries(n);e||n===t.series?(n.opacity=s,n.line&&(n.line.opacity=s)):(n.defaultOpacity=s,n.opacity=a,n.line&&(n.line.opacity=a))}},Su.prototype._applySeriesOpacity=function(t,e,i,o){for(var r=0;r<t.length;r++){var n=t[r],s=n.series||o;if(s&&(s.highlight||{}).visible&&n.visual){var a=o?o.opacity:n.series.opacity;(s!==e||i)&&n.visual.opacity(i?1:a)}n.children&&n.children.length&&this._applySeriesOpacity(n.children,e,i,n.series)}},Su.prototype._chartInstanceFromPoint=function(t){for(var e=t.parent;e&&!e.plotArea;)e=e.parent;return e},Su.prototype._showInactiveOpacity=function(t){var e=this._plotArea.series.length>1;this._hasInactiveOpacity()?this._displayInactiveOpacity(t,e):this._highlight.show(t)},Su.prototype._hideInactiveOpacity=function(t){var e=this._plotArea.series.length>1;this._hasInactiveOpacity()&&(e&&this._activeChartInstance&&(this._updateSeriesOpacity(t,!0),this._applySeriesOpacity(this._activeChartInstance.children,null,!0),this._activeChartInstance=null),this._highlight&&this._highlight.hide(),this._activePoint=null)},Su.prototype._hasInactiveOpacity=function(){var t=void 0!==this.options.seriesDefaults.highlight.inactiveOpacity,e=this.options.series.filter((function(t){return void 0!==t.highlight.inactiveOpacity})).length>0;return t||e},Su.prototype._getInactiveOpacityForSeries=function(t){var e=this.options.seriesDefaults.highlight.inactiveOpacity,i=t.highlight.inactiveOpacity;return void 0!==i?i:void 0!==e?e:void 0!==t.opacity?t.opacity:1},Su.prototype._getDefaultOpacityForSeries=function(t){return t.defaultOpacity||t.opacity||1},Su.prototype._mouseover=function(t){var e,i=this._startHover(t.element,t.originalEvent);i&&i.tooltipTracking&&!this._mouseMoveTrackHandler&&!this._sharedTooltip()&&(this._mouseMoveTrackHandler=this._mouseMoveTracking.bind(this),zt(document,((e={})[mu]=this._mouseMoveTrackHandler,e)))},Su.prototype._mouseMoveTracking=function(t){var e,i=this,o=i.options,r=i._tooltip,n=i._highlight,s=i._activePoint,a=this._eventCoordinates(t);if(this._plotArea.box.containsPoint(a)){if(s&&s.tooltipTracking&&s.series&&s.parent.getNearestPoint){var p=s.parent.getNearestPoint(a.x,a.y,s.seriesIx);p&&p!==s&&(this._activePoint=p,p.hover(this,t)||(at({},o.tooltip,p.options.tooltip).visible&&r.show(p),n.show(p)))}}else Qt(document,((e={})[mu]=this._mouseMoveTrackHandler,e)),this._unsetActivePoint(),this._clearFocusedElement(),this._mouseMoveTrackHandler=null,this._hideInactiveOpacity(s)},Su.prototype._mousemove=function(t){var e=this._eventCoordinates(t),i=this._plotArea;if(this._trackCrosshairs(e),i.hover){var o=i.backgroundContainsPoint(e);o?(this._plotAreaHovered=!0,this._plotArea.hover(this,t)):this._plotAreaHovered&&!o&&(this._plotAreaHovered=!1,this.trigger(ds))}this._sharedTooltip()&&this._trackSharedTooltip(e,t)},Su.prototype._trackCrosshairs=function(t){for(var e=this._plotArea.crosshairs,i=0;i<e.length;i++){var o=e[i];o.box.containsPoint(t)?o.showAt(t):o.hide()}},Su.prototype._trackSharedTooltip=function(t,e,i){if(!this._suppressHover){var o=this,r=o.options.tooltip,n=o._plotArea,s=o._plotArea.categoryAxis,a=o._tooltip,p=o._highlight;if(n.backgroundContainsPoint(t)){var l=s.pointCategoryIndex(t);if(l!==this._tooltipCategoryIx||!this._sharedHighlight&&i){var h=n.pointsByCategoryIndex(l),c=h.map((function(t){return t.eventArgs(e)})),u=c[0]||{};u.categoryPoints=c,h.length>0&&!this.trigger(ls,u)?(r.visible&&a.showAt(h,t),p.show(h),this._sharedHighlight=!0):a.hide(),this._tooltipCategoryIx=l}else i&&this._sharedHighlight&&(p.hide(),a.hide(),this._sharedHighlight=!1)}else this._sharedHighlight&&(p.hide(),a.hide(),this._tooltipCategoryIx=null,this._sharedHighlight=!1)}},Su.prototype.hideElements=function(t){var e=this._plotArea;this._mousemoveThrottled.cancel(),e.hideCrosshairs(),this._unsetActivePoint(t)},Su.prototype._unsetActivePoint=function(t){var e=this._highlight;this._activePoint=null,this._hoveredPoint=null,t&&t.keepTooltipOpen||this._hideTooltip(),this._tooltipCategoryIx=null,this._sharedHighlight=!1,e&&e.hide()},Su.prototype._deferRedraw=function(){this._redraw()},Su.prototype._clearRedrawTimeout=function(){this._redrawTimeout&&(clearInterval(this._redrawTimeout),this._redrawTimeout=null)},Su.prototype.bindCategories=function(){for(var t=this.options,e=[].concat(t.categoryAxis),i=0;i<e.length;i++){var o=e[i];!1!==o.autoBind&&this.bindCategoryAxisFromSeries(o,i)}},Su.prototype.bindCategoryAxisFromSeries=function(t,e){var i=this,o=new Set,r=this.options.series.filter((function(i){return i.categoryAxis===t.name||!i.categoryAxis&&0===e})),n=r.some((function(t){return Boolean(t.categoryField)})),s=r.filter((function(t){return t.data&&t.data.length>0})),a=s.map((function(t){return on.current.bindPoint(t,0).fields.category})),p=a.reduce((function(e,i){return e||Js(t,i)}),!1);if(s.filter((function(t,e){return t.categoryField||jt(a[e])})).forEach((function(t){return t.data.forEach((function(e,r){var n=on.current.bindPoint(t,r).fields.category;if(p){var s=Qs(n,e,i.chartService.intl);n=s?s.getTime():void 0}o.add(n)}))})),o.size>0){var l=Array.from(o.values());p&&(l=l.sort().map((function(t){return t&&new Date(t)}))),t.categories=l}else n&&(t.categories=[])},Su.prototype._isBindable=function(t){for(var e=on.current.valueFields(t),i=!0,o=0;o<e.length;o++){var r=e[o];if(r===z?r="field":r+="Field",!jt(t[r])){i=!1;break}}return i},Su.prototype._noTransitionsRedraw=function(){var t,e=this.options;!1!==e.transitions&&(t=e.transitions,e.transitions=!1),this._redraw(),t&&(e.transitions=t)},Su.prototype._legendItemHover=function(t,e){this._showSeriesInactiveOpacity(t,e)},Su.prototype._showSeriesInactiveOpacity=function(t,e){var i,o=this._plotArea,r=this._highlight,n=(o.srcSeries||o.series)[t];if(i=Ct(n.type,[Rn,Tn,Mn,On])?o.findPoint((function(i){return i.series.index===t&&i.index===e})):o.pointsBySeriesIndex(t),this._hasInactiveOpacity()&&n.visible&&i){var s=o.series.length>1,a=i.length?i[0]:i;this._displayInactiveOpacity(a,s,i)}else r.show(i)},Su.prototype._shouldAttachMouseMove=function(){return this._plotArea.crosshairs.length||this._tooltip&&this._sharedTooltip()||this.requiresHandlers([us,ds])},Su.prototype.updateMouseMoveHandler=function(){var t,e;Qt(this.element,((t={})[mu]=this._mousemoveThrottled,t)),this._shouldAttachMouseMove()&&zt(this.element,((e={})[mu]=this._mousemoveThrottled,e))},Su.prototype.applyTheme=function(t){var e=this,i=Object.assign({},this._originalOptions);requestAnimationFrame((function(){e.applyOptions(i,t),e.noTransitionsRedraw()}))},Su.prototype.applyOptions=function(t,e){Ou(this._originalOptions,t),this._originalOptions=at(this._originalOptions,t),this.options=at({},this._originalOptions),e&&(this._theme=e,this.chartService.theme=e),this._initTheme(this.options,this._theme),this._toggleDragZoomEvents()},Su.prototype.setOptions=function(t,e){this.applyOptions(t,e),this.bindCategories(),this.redraw(),this.updateMouseMoveHandler(),this._restoreOverlayElement(),this._initStyleObserver()},Su.prototype.setDirection=function(t){this.chartService.rtl=Boolean(t),this.surface&&"svg"===this.surface.type&&this._destroySurface()},Su.prototype.setIntlService=function(t){this.chartService.intl=t},Su.prototype.noTransitionsRedraw=function(){this._noTransitionsRedraw()},Su.prototype.destroy=function(){var t,e;this._destroyed=!0,Qt(this.element,((t={})[xu]=this._clickHandler,t[Bs]=this._mousewheelHandler,t[mu]=this._mousemoveThrottled,t[bu]=this._mouseleaveHandler,t[vu]=this._mousedownHandler,t[_u]=this._keydownHandler,t[wu]=this._focusHandler,t[ku]=this._blurHandler,t)),this.domEvents&&(this.domEvents.destroy(),delete this.domEvents),this._mouseMoveTrackHandler&&Qt(document,((e={})[mu]=this._mouseMoveTrackHandler,e)),this._focusState=null,this.element._kendoExportVisual=null,this._destroyView(),this._destroySurface(),this._clearRedrawTimeout(),this._destroyStyleObserver()},Su.prototype._destroySurface=function(){var t=this.surface;t&&(t.unbind("mouseenter",this._surfaceMouseenterHandler),t.unbind("mouseleave",this._surfaceMouseleaveHandler),t.destroy(),this.surface=null)},Su.prototype._destroySelections=function(){var t=this._selections;if(t)for(;t.length>0;)t.shift().destroy()},Su.prototype._destroyView=function(){var t=this._model;t&&(t.destroy(),this._model=null),this._unsetActivePoint(),this._clearFocusedElement(),this._resetDrilldownPoint(),this._destroySelections(),this._tooltip&&this._tooltip.destroy(),this._highlight&&this._highlight.destroy(),this._zoomSelection&&(this._zoomSelection.destroy(),delete this._zoomSelection),this._pannable&&(this._pannable.destroy(),delete this._pannable),this._mousewheelZoom&&(this._mousewheelZoom.destroy(),delete this._mousewheelZoom)};var Mu=["data","categories"];function Ou(t,e){for(var i in e)if(!Ct(i,Mu)&&Ae(e,i)){var o=e[i],r=t[i];if(jt(r)){var n=null===o;n||!jt(o)?(delete t[i],n&&delete e[i]):r&&pt(o)&&pt(r)&&Ou(r,o)}}}function Lu(t){for(var e=0;e<t.length;e++)t[e].notifyRender()}te(Su,{renderAs:"",chartArea:{},legend:{visible:!0,labels:{},accessibility:{},focusHighlight:{border:{opacity:1,color:u,width:2}}},categoryAxis:{},seriesDefaults:{type:Pn,data:[],highlight:{visible:!0},labels:{},negativeValues:{visible:!1},accessibility:{},focusHighlight:{border:{opacity:1,width:2},zIndex:200}},series:[],seriesColors:null,tooltip:{visible:!1},transitions:!0,observeStyles:!1,valueAxis:{narrowRange:!1},plotArea:{},title:{},xAxis:{},yAxis:{},panes:[{}],pannable:!1,zoomable:!1});const Bu=Su;var Iu=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._slotAnchor=function(t,e){var i=this.plotArea.categoryAxis.options.vertical,o=i?{horizontal:"left",vertical:"center"}:{horizontal:"center",vertical:"bottom"};return{point:i?new xi(this.plotArea.box.x2,e.center().y):new xi(e.center().x,-2),align:o}},e.prototype._defaultAnchor=function(t,e){return this._slotAnchor({},e)},e}(fh);const Eu=Iu;var Ru=[wn,Sn];function Vu(t){for(var e=[],i=0;i<t.length;i++){var o=t[i];e[i]=o.style.display,o.style.display="none"}return e}function zu(t,e){for(var i=0;i<t.length;i++)t[i].style.display=e[i]}function ju(t){return K(t)?[t]:t}var Du=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._setElementClass=function(t){W(t,"k-sparkline")},e.prototype._initElement=function(e){t.prototype._initElement.call(this,e),this._initialWidth=Math.floor(Ht(e).width)},e.prototype._resize=function(){var e=this.element,i=Vu(e.childNodes);this._initialWidth=Math.floor(Ht(e).width),zu(e.childNodes,i),t.prototype._resize.call(this)},e.prototype._modelOptions=function(){var t=this.options,e=this._surfaceWrap(),i=Vu(e.childNodes),o=document.createElement("span");o.innerHTML=" ",e.appendChild(o);var r=at({width:this._autoWidth,height:Ht(e).height,transitions:t.transitions},t.chartArea,{inline:!0,align:!1});return Ht(e,{width:r.width,height:r.height}),e.removeChild(o),zu(e.childNodes,i),this.surface&&this.surface.resize(),r},e.prototype._surfaceWrap=function(){if(!this.stage){var t=this.stage=document.createElement("span");this.element.appendChild(t)}return this.stage},e.prototype._createPlotArea=function(e){var i=t.prototype._createPlotArea.call(this,e);return this._autoWidth=this._initialWidth||this._calculateWidth(i),i},e.prototype._calculateWidth=function(t){for(var e=this.options,i=dt(e.chartArea.margin),o=t.charts,r=this._surfaceWrap(),n=0,s=0;s<o.length;s++){var a=o[s],p=(a.options.series||[])[0];if(p){if(p.type===wn)return 150;if(p.type===Sn)return 150;if(p.type===Rn)return Ht(r).height;var l=a.categoryAxis;if(l){var h=l.categoriesCount()*(!a.options.isStacked&&Ct(p.type,[Pn,Zn])?a.seriesOptions.length:1);n=Math.max(n,h)}}}var c=n*e.pointWidth;return c>0&&(c+=i.left+i.right),c},e.prototype._createSharedTooltip=function(t){return new Eu(this._plotArea,t)},e.normalizeOptions=function(t){var e=ju(t);return(e=G(e)?{seriesDefaults:{data:e}}:at({},e)).series||(e.series=[{data:ju(e.data)}]),at(e,{seriesDefaults:{type:e.type}}),(Ct(e.series[0].type,Ru)||Ct(e.seriesDefaults.type,Ru))&&(e=at({},{categoryAxis:{crosshair:{visible:!1}}},e)),e},e}(Bu);te(Du,{chartArea:{margin:2},axisDefaults:{visible:!1,majorGridLines:{visible:!1},valueAxis:{narrowRange:!0}},seriesDefaults:{type:"line",area:{line:{width:.5}},bar:{stack:!0},padding:2,width:.5,overlay:{gradient:null},highlight:{visible:!1},border:{width:0},markers:{size:2,visible:!1}},tooltip:{visible:!0,shared:!0},categoryAxis:{crosshair:{visible:!0,tooltip:{visible:!1}}},legend:{visible:!1},transitions:!1,pointWidth:5,panes:[{clip:!1}]});const Fu=Du,Hu=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.setup=function(){this._initialOpacity=parseFloat(ut(this.element,"opacity").opacity)},e.prototype.step=function(t){ut(this.element,{opacity:String(Pt(this._initialOpacity,0,t))})},e.prototype.abort=function(){t.prototype.abort.call(this),ut(this.element,{display:"none",opacity:String(this._initialOpacity)})},e.prototype.cancel=function(){t.prototype.abort.call(this),ut(this.element,{opacity:String(this._initialOpacity)})},e}(q.drawing.Animation);function Nu(t,e){var i=document.createElement("div");return i.className=t,e&&(i.style.cssText=e),i}var Uu=function(t,e,i){this.options=at({},this.options,i),this.container=t,this.chartService=e;var o=ut(t,["paddingLeft","paddingTop"]);this.chartPadding={top:o.paddingTop,left:o.paddingLeft},this.createElements(),t.appendChild(this.element)};Uu.prototype.createElements=function(){var t=this.element=Nu("k-navigator-hint","display: none; position: absolute; top: 1px; left: 1px;"),e=this.tooltip=Nu("k-tooltip k-chart-tooltip"),i=this.scroll=Nu("k-scroll");e.innerHTML=" ",t.appendChild(e),t.appendChild(i)},Uu.prototype.show=function(t,e,i){var o=this,r=o.element,n=o.options,s=o.scroll,a=o.tooltip,p=Uo(Qo(t)+Qo(e-t)/2),l=.4*i.width(),h=i.center().x-l,c=(i.center().x-h)/(n.max-n.min),u=p-n.min,d=this.chartService.intl.format(n.format,t,e),f=vt(n);this.clearHideTimeout(),this._visible||(ut(r,{visibility:"hidden",display:"block"}),this._visible=!0),f&&(d=f({from:t,to:e})),a.innerHTML=d,ut(a,{left:i.center().x-a.offsetWidth/2,top:i.y1});var g=ut(a,["marginTop","borderTopWidth","height"]);ut(s,{width:l,left:h+u*c,top:i.y1+g.marginTop+g.borderTopWidth+g.height/2}),ut(r,{visibility:"visible"})},Uu.prototype.clearHideTimeout=function(){this._hideTimeout&&clearTimeout(this._hideTimeout),this._hideAnimation&&this._hideAnimation.cancel()},Uu.prototype.hide=function(){var t=this;this.clearHideTimeout(),this._hideTimeout=setTimeout((function(){t._visible=!1,t._hideAnimation=new Hu(t.element),t._hideAnimation.setup(),t._hideAnimation.play()}),this.options.hideDelay)},Uu.prototype.destroy=function(){this.clearHideTimeout(),this.container&&this.container.removeChild(this.element),delete this.container,delete this.chartService,delete this.element,delete this.tooltip,delete this.scroll},te(Uu,{format:"{0:d} - {1:d}",hideDelay:500});const Gu=Uu;var Wu="_navigator",Xu=Wu,Yu="_default",qu=function(t){var e;this.chart=t;var i=this.options=at({},this.options,t.options.navigator),o=i.select;o&&(o.from=this.parseDate(o.from),o.to=this.parseDate(o.to)),jt(i.hint.visible)||(i.hint.visible=i.visible),this.chartObserver=new Ot(this,((e={})[fs]="_drag",e[gs]="_dragEnd",e[ms]="_zoom",e[xs]="_zoomEnd",e)),t.addObserver(this.chartObserver)};function Zu(){}qu.prototype.parseDate=function(t){return er(this.chart.chartService.intl,t)},qu.prototype.clean=function(){this.selection&&(this.selection.destroy(),this.selection=null),this.hint&&(this.hint.destroy(),this.hint=null)},qu.prototype.destroy=function(){this.chart&&(this.chart.removeObserver(this.chartObserver),delete this.chart),this.clean()},qu.prototype.redraw=function(){this._redrawSelf(),this.initSelection()},qu.prototype.initSelection=function(){var t,e=this.chart,i=this.options,o=this.mainAxis(),r=o.roundedRange(),n=r.min,s=r.max,a=i.select,p=a.from,l=a.to,h=a.mousewheel,c=(t=o,Zu.prototype=t,new Zu);0!==o.categoriesCount()&&(this.clean(),c.box=o.box,this.selection=new hh(e,c,{min:n,max:s,from:p||n,to:l||s,mousewheel:Kt(h,{zoom:"left"}),visible:i.visible},new Ot(this,{selectStart:"_selectStart",select:"_select",selectEnd:"_selectEnd"})),i.hint.visible&&(this.hint=new Gu(e.element,e.chartService,{min:n,max:s,template:vt(i.hint),format:i.hint.format})))},qu.prototype.setRange=function(){var t=this.chart._createPlotArea(!0).namedCategoryAxes[Xu].roundedRange(),e=t.min,i=t.max,o=this.options.select||{},r=o.from||e;r<e&&(r=e);var n=o.to||i;n>i&&(n=i),this.options.select=at({},o,{from:r,to:n}),this.filterAxes()},qu.prototype._redrawSelf=function(t){var e=this.chart._plotArea;e&&e.redraw(Wt(e.panes),t)},qu.prototype.redrawSlaves=function(){var t=this.chart,e=t._plotArea,i=e.panes.filter((function(t){return t.options.name!==Wu}));e.srcSeries=t.options.series,e.options.categoryAxis=t.options.categoryAxis,e.clearSeriesPointsCache(),e.redraw(i)},qu.prototype._drag=function(t){var e,i=this.chart,o=this.selection,r=i._eventCoordinates(t.originalEvent),n=this.mainAxis(),s=n.roundedRange(),a=n.pane.box.containsPoint(r),p=i._plotArea.categoryAxis,l=t.axisRanges[p.options.name],h=this.options.select;if(l&&!a&&o){e=h.from&&h.to?Qo(h.to)-Qo(h.from):Qo(o.options.to)-Qo(o.options.from);var c=Uo(Xt(Qo(l.min),s.min,Qo(s.max)-e)),u=Uo(Xt(Qo(c)+e,Qo(s.min)+e,s.max));this.options.select={from:c,to:u},this.options.liveDrag&&(this.filterAxes(),this.redrawSlaves()),o.set(c,u),this.showHint(c,u)}},qu.prototype._dragEnd=function(){this.filterAxes(),this.filter(),this.redrawSlaves(),this.hint&&this.hint.hide()},qu.prototype.readSelection=function(){var t=this.selection.options,e=t.from,i=t.to,o=this.options.select;o.from=e,o.to=i},qu.prototype.filterAxes=function(){var t=this.options.select;void 0===t&&(t={});for(var e=this.chart.options.categoryAxis,i=t.from,o=t.to,r=0;r<e.length;r++){var n=e[r];n.pane!==Wu&&(n.min=i,n.max=o)}},qu.prototype.filter=function(){var t=this.chart,e=this.options.select;if(t.requiresHandlers(["navigatorFilter"])){var i=this.mainAxis(),o={from:e.from,to:e.to};if("category"!==i.options.type){var r=new fr(at({baseUnit:"fit"},t.options.categoryAxis[0],{categories:[e.from,e.to]}),t.chartService).options;o.from=Wo(r.min,-r.baseUnitStep,r.baseUnit),o.to=Wo(r.max,r.baseUnitStep,r.baseUnit)}this.chart.trigger("navigatorFilter",o)}},qu.prototype._zoom=function(t){var e=this,i=e.chart._plotArea.categoryAxis,o=e.selection,r=e.options,n=r.select,s=r.liveDrag,a=this.mainAxis(),p=t.delta;if(o){var l=a.categoryIndex(o.options.from),h=a.categoryIndex(o.options.to),c=this.chart._eventCoordinates(t.originalEvent);t.originalEvent.preventDefault(),Math.abs(p)>1&&(p*=3),h-l>1?(o.zoom(p,c),this.readSelection()):(i.options.min=n.from,n.from=i.scaleRange(-t.delta*this.chart._mousewheelZoomRate(),c).min),s&&(this.filterAxes(),this.redrawSlaves()),o.set(n.from,n.to),this.showHint(this.options.select.from,this.options.select.to)}},qu.prototype._zoomEnd=function(t){this._dragEnd(t)},qu.prototype.showHint=function(t,e){var i=this.chart._plotArea;this.hint&&this.hint.show(t,e,i.backgroundBox())},qu.prototype._selectStart=function(t){return this.chart._selectStart(t)},qu.prototype._select=function(t){return this.showHint(t.from,t.to),this.chart._select(t)},qu.prototype._selectEnd=function(t){return this.hint&&this.hint.hide(),this.readSelection(),this.filterAxes(),this.filter(),this.redrawSlaves(),this.chart._selectEnd(t)},qu.prototype.mainAxis=function(){var t=this.chart._plotArea;if(t)return t.namedCategoryAxes[Xu]},qu.prototype.select=function(t,e){var i=this.options.select;return t&&e&&(i.from=this.parseDate(t),i.to=this.parseDate(e),this.filterAxes(),this.filter(),this.redrawSlaves(),this.selection.set(t,e)),{from:i.from,to:i.to}},qu.setup=function(t,e){if(void 0===t&&(t={}),void 0===e&&(e={}),!t.__navi){t.__navi=!0;var i=at({},e.navigator,t.navigator),o=t.panes=[].concat(t.panes),r=at({},i.pane,{name:Wu});i.visible||(r.visible=!1,r.height=.1),"top"!==t.navigator.position?o.push(r):o.unshift(r),o.forEach((function(t){t.name=t.name||Yu})),qu.attachAxes(t,i),qu.attachSeries(t,i,e)}},qu.attachAxes=function(t,e){var i=e.series||[],o=t.categoryAxis=[].concat(t.categoryAxis),r=t.valueAxis=[].concat(t.valueAxis);o.concat(r).forEach((function(t){t.pane=t.pane||Yu}));var n=0===qs(i,Jn).length,s=at({type:"date",pane:Wu,roundToBaseUnit:!n,justified:n,_collapse:!1,majorTicks:{visible:!0},tooltip:{visible:!1},labels:{step:1},autoBind:e.autoBindElements,autoBaseUnitSteps:{minutes:[1],hours:[1,2],days:[1,2],weeks:[],months:[1],years:[1]}}),a=e.categoryAxis;o.push(at({},s,{maxDateGroups:200},a,{name:Xu,title:null,baseUnit:"fit",baseUnitStep:"auto",labels:{visible:!1},majorTicks:{visible:!1}}),at({},s,a,{name:Xu+"_labels",maxDateGroups:20,baseUnitStep:"auto",labels:{position:""},plotBands:[],autoBaseUnitSteps:{minutes:[]},_overlap:!0}),at({},s,a,{name:Xu+"_ticks",maxDateGroups:200,majorTicks:{width:.5},plotBands:[],title:null,labels:{visible:!1,mirror:!0},_overlap:!0})),r.push(at({name:Xu,pane:Wu,majorGridLines:{visible:!1},visible:!1},e.valueAxis))},qu.attachSeries=function(t,e,i){for(var o=t.series=t.series||[],r=[].concat(e.series||[]),n=i.seriesColors,s=e.seriesDefaults,a=0;a<r.length;a++)o.push(at({color:n[a%n.length],categoryField:e.dateField,visibleInLegend:!1,tooltip:{visible:!1}},s,r[a],{axis:Xu,categoryAxis:Xu,autoBind:e.autoBindElements}))};const Qu=qu;var Ku=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.applyDefaults=function(e,i){var o=Ht(this.element).width||600,r=i,n={seriesDefaults:{categoryField:e.dateField},axisDefaults:{categoryAxis:{name:"default",majorGridLines:{visible:!1},labels:{step:2},majorTicks:{visible:!1},maxDateGroups:Math.floor(o/28)}}};r&&(r=at({},r,n)),Qu.setup(e,r),t.prototype.applyDefaults.call(this,e,r)},e.prototype._setElementClass=function(t){W(t,"k-chart k-stockchart")},e.prototype.setOptions=function(e){this.destroyNavigator(),t.prototype.setOptions.call(this,e)},e.prototype.noTransitionsRedraw=function(){var t=this.options.transitions;this.options.transitions=!1,this._fullRedraw(),this.options.transitions=t},e.prototype._resize=function(){this.noTransitionsRedraw()},e.prototype._redraw=function(){var t=this.navigator;!this._dirty()&&t&&t.options.partialRedraw?t.redrawSlaves():this._fullRedraw()},e.prototype._dirty=function(){var t=this.options,e=[].concat(t.series,t.navigator.series),i=wt(e,(function(t){return t&&t.visible})).length,o=this._seriesCount!==i;return this._seriesCount=i,o},e.prototype._fullRedraw=function(){var e=this.navigator;e||(e=this.navigator=new Qu(this),this.trigger("navigatorCreated",{navigator:e})),e.clean(),e.setRange(),t.prototype._redraw.call(this),e.initSelection()},e.prototype._trackSharedTooltip=function(e){var i=this._plotArea.paneByPoint(e);i&&i.options.name===Wu?this._unsetActivePoint():t.prototype._trackSharedTooltip.call(this,e)},e.prototype.bindCategories=function(){t.prototype.bindCategories.call(this),this.copyNavigatorCategories()},e.prototype.copyNavigatorCategories=function(){for(var t,e=[].concat(this.options.categoryAxis),i=0;i<e.length;i++){var o=e[i];o.name===Xu?t=o.categories:t&&o.pane===Wu&&(o.categories=t)}},e.prototype.destroyNavigator=function(){this.navigator&&(this.navigator.destroy(),this.navigator=null)},e.prototype.destroy=function(){this.destroyNavigator(),t.prototype.destroy.call(this)},e.prototype._stopChartHandlers=function(e){var i=this._eventCoordinates(e),o=this._plotArea.paneByPoint(i);return t.prototype._stopChartHandlers.call(this,e)||o&&o.options.name===Wu},e.prototype._toggleDragZoomEvents=function(){this._dragZoomEnabled||(this.element.style.touchAction="none",this._dragZoomEnabled=!0)},e}(Bu);te(Ku,{dateField:"date",axisDefaults:{categoryAxis:{type:"date",baseUnit:"fit",justified:!0},valueAxis:{narrowRange:!0,labels:{format:"C"}}},navigator:{select:{},seriesDefaults:{markers:{visible:!1},tooltip:{visible:!1},highlight:{visible:!1},line:{width:2}},hint:{},visible:!0},tooltip:{visible:!0},legend:{visible:!1}});const $u=Ku;var Ju=150,td="arrowPointer",ed="barPointer",id=.5,od=Math.PI/180,rd="inside",nd="linear",sd="outside",ad="radialPointer",pd="radialRangePointer";function ld(t,e){var i=t.getOrigin(),o=t.getSize(),r=dt(e);return t.setOrigin([i.x-r.left,i.y-r.top]),t.setSize([o.width+(r.left+r.right),o.height+(r.top+r.bottom)]),t}var hd=q.drawing.Group,cd=q.drawing.Path,ud=q.drawing.Text;function dd(t,e){var i=t.box,o=t.children[0].box,r=e.border||{},n=e.background||"",s=cd.fromRect(new q.geometry.Rect([i.x1,i.y1],[i.width(),i.height()]),{stroke:{}}),a=new ud(t.text,new q.geometry.Point(o.x1,o.y1),{font:e.font,fill:{color:e.color}}),p=ld(a.bbox().clone(),e.padding),l=cd.fromRect(p,{stroke:{color:r.width?r.color:"",width:r.width,opacity:r.opacity,dashType:r.dashType,lineJoin:"round",lineCap:"round"},fill:{color:n}}),h=new hd;return h.append(s),h.append(l),h.append(a),h}function fd(t,e,i){var o=jt(t.from)?t.from:T,r=jt(t.to)?t.to:P;return t.from=Math.max(Math.min(r,o),e),t.to=Math.min(Math.max(r,o),i),t}function gd(t,e){var i=dt(e);return i.left=-i.left,i.top=-i.top,i.right=-i.right,i.bottom=-i.bottom,ld(t,i)}var yd=q.drawing.Path,vd=q.drawing.Surface,md=function(t,e,i,o){void 0===o&&(o={}),this.element=t,this.theme=i,this.contextService=new mo(this,o),this._originalOptions=at({},this.options,e),this.options=at({},this._originalOptions),this._initTheme(i),this.redraw()};md.prototype.destroy=function(){this.surface&&(this.surface.destroy(),this.surface=null),delete this.element,delete this.surfaceElement},md.prototype.value=function(t){var e=this.pointers[0];if(0===arguments.length)return e.value();e.value(t),this._setValueOptions(t)},md.prototype._draw=function(){var t=this.surface;t.clear(),t.draw(this._visuals)},md.prototype.exportVisual=function(){return this._visuals},md.prototype.allValues=function(t){var e=this.pointers,i=[];if(0===arguments.length){for(var o=0;o<e.length;o++)i.push(e[o].value());return i}if(G(t))for(var r=0;r<t.length;r++)K(t[r])&&e[r].value(t[r]);this._setValueOptions(t)},md.prototype._setValueOptions=function(t){for(var e=[].concat(this.options.pointer),i=[].concat(t),o=0;o<i.length;o++)e[o].value=i[o]},md.prototype.resize=function(){this.noTransitionsRedraw()},md.prototype.noTransitionsRedraw=function(){var t=this.options.transitions;this._toggleTransitions(!1),this.redraw(),this._toggleTransitions(t)},md.prototype.redraw=function(){var t=this._surfaceSize(),e=new q.geometry.Rect([0,0],[t.width,t.height]);this._initSurface(),this.gaugeArea=this._createGaugeArea(),this._createModel();var i=gd(e.bbox(),this._gaugeAreaMargin);this.reflow(i)},md.prototype.setOptions=function(t,e){this._originalOptions=at(this._originalOptions,t),this.options=at({},this._originalOptions),this._initTheme(e),this.redraw()},md.prototype.setDirection=function(t){this.contextService.rtl=Boolean(t),this.surface&&"svg"===this.surface.type&&(this.surface.destroy(),this.surface=null)},md.prototype.setIntlService=function(t){this.contextService.intl=t},md.prototype._initTheme=function(t){var e=t||this.theme||{};this.theme=e,this.options=at({},e,this.options);var i=this.options,o=i.pointer;if(G(o)){for(var r=[],n=0;n<o.length;n++)r.push(at({},e.pointer,o[n]));i.pointer=r}},md.prototype._createGaugeArea=function(){var t=this.options.gaugeArea,e=this.surface.size(),i=t.border||{},o=new q.geometry.Rect([0,0],[e.width,e.height]);return this._gaugeAreaMargin=t.margin||5,i.width>0&&(o=gd(o,i.width)),yd.fromRect(o,{stroke:{color:i.width?i.color:"",width:i.width,opacity:i.opacity,dashType:i.dashType,lineJoin:"round",lineCap:"round"},fill:{color:t.background}})},md.prototype._initSurface=function(){var t=this.options,e=this.surface,i=this._surfaceElement(),o=this._surfaceSize();Ht(i,o),e&&e.options.type===t.renderAs?(this.surface.clear(),this.surface.resize()):(e&&e.destroy(),this.surface=vd.create(i,{type:t.renderAs}))},md.prototype._surfaceSize=function(){var t=this.options,e=this._getSize();return t.gaugeArea&&at(e,t.gaugeArea),e},md.prototype._surfaceElement=function(){return this.surfaceElement||(this.surfaceElement=document.createElement("div"),this.element.appendChild(this.surfaceElement)),this.surfaceElement},md.prototype.getSize=function(){return this._getSize()},md.prototype._getSize=function(){var t=this.element,e=this._defaultSize(),i=t.offsetWidth,o=t.offsetHeight;return i||(i=e.width),o||(o=e.height),{width:i,height:o}},md.prototype._defaultSize=function(){return{width:200,height:200}},md.prototype._toggleTransitions=function(t){this.options.transitions=t;for(var e=0;e<this.pointers.length;e++)this.pointers[e].options.animation.transitions=t},te(md,{plotArea:{},theme:"default",renderAs:"",pointer:{},scale:{},gaugeArea:{}});const xd=md;var bd=q.drawing.Path,_d=q.drawing.Group,wd=q.geometry.Point;function kd(t,e){var i,o,r=t.position,n=t.tickX,s=t.tickY;return t.vertical?(i=new wd(n,r),o=new wd(n+e.size,r)):(i=new wd(r,s),o=new wd(r,s+e.size)),new bd({stroke:{color:e.color,width:e.width}}).moveTo(i).lineTo(o)}function Ad(t,e,i,o){var r=e.length;if(o.visible)for(var n=i.mirror,s=i.lineBox,a=o.skip;a<r;a+=o.step)a%o.skipUnit!=0&&(i.tickX=n?s.x2:s.x2-o.size,i.tickY=n?s.y1-o.size:s.y1,i.position=e[a],t.append(kd(i,o)))}var Sd=function(t){function e(e,i){var o=e||{};!jt(o.reverse)&&!1===o.vertical&&(i||{}).rtl&&(o=Object.assign({},o,{reverse:!0})),t.call(this,0,1,o,i),this.options.minorUnit=this.options.minorUnit||this.options.majorUnit/10}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initUserOptions=function(t){var e=at({},this.options,t);return(e=at({},e,{labels:{mirror:e.mirror}})).majorUnit=e.majorUnit||vi(e.min,e.max),e},e.prototype.initFields=function(){},e.prototype.render=function(){var t=this.elements=new _d,e=this.renderLabels(),i=this.renderLine(),o=this.renderTicks(),r=this.renderRanges();return t.append(i,e,o,r),t},e.prototype.renderRanges=function(){for(var t=this.options,e=t.min,i=t.max,o=t.vertical,r=t.labels.mirror,n=t.ranges||[],s=new _d,a=n.length,p=t.rangeSize||t.minorTicks.size/2,l=0;l<a;l++){var h=fd(n[l],e,i),c=this.getSlot(h.from,h.to),u=o?this.lineBox():c,d=o?c:this.lineBox();o?u.x1-=p*(r?-1:1):d.y2+=p*(r?-1:1),s.append(bd.fromRect(new q.geometry.Rect([u.x1,d.y1],[u.x2-u.x1,d.y2-d.y1]),{fill:{color:h.color,opacity:h.opacity},stroke:{}}))}return s},e.prototype.renderLabels=function(){for(var t=this.labels,e=this.options,i=new _d,o=0;o<t.length;o++)i.append(dd(t[o],e.labels));return i},e.prototype.renderLine=function(){var t=this.options.line,e=this.lineBox(),i=new _d;if(t.width>0&&t.visible){var o=new bd({stroke:{color:t.color,dashType:t.dashType,width:t.width}});o.moveTo(e.x1,e.y1).lineTo(e.x2,e.y2),i.append(o)}return i},e.prototype.renderTicks=function(){var t=new _d,e=this.options,i=e.majorTicks.visible?e.majorUnit:0,o={vertical:e.vertical,mirror:e.labels.mirror,lineBox:this.lineBox()};return Ad(t,this.getMajorTickPositions(),o,e.majorTicks),Ad(t,this.getMinorTickPositions(),o,at({},{skipUnit:i/e.minorUnit},e.minorTicks)),t},e}(_r);te(Sd,{min:0,max:50,majorTicks:{size:15,align:rd,color:u,width:id,visible:!0},minorTicks:{size:10,align:rd,color:u,width:id,visible:!0},line:{width:id},labels:{position:rd,padding:2},mirror:!1,_alignLines:!1});const Cd=Sd;var Pd=function(t,e){var i=t.options,o=i.min,r=i.max,n=this.options=at({},this.options,e);n.fill=n.color,this.scale=t,jt(n.value)?n.value=Xt(n.value,o,r):n.value=o};Pd.prototype.value=function(t){var e=this.options,i=e.value;if(0===arguments.length)return i;var o=this.scale.options,r=o.min,n=o.max;e._oldValue=jt(e._oldValue)?e.value:r,e.value=Xt(t,r,n),this.elements&&this.repaint()},te(Pd,{color:u});const Td=Pd;var Md=function(t){function e(e,i){t.call(this,e,i),this.options=at({track:{visible:jt(i.track)}},this.options)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reflow=function(){var t,e,i,o=this.options,r=this.scale,n=r.options,s=n.mirror,a=n.vertical,p=r.lineBox(),l=o.track.size||o.size,h=o.size/2,c=dt(o.margin),u=a?c[s?"left":"right"]:c[s?"bottom":"top"];u=s?-u:u,a?(i=new wi(p.x1+u,p.y1,p.x1+u,p.y2),s?i.x1-=l:i.x2+=l,o.shape!==ed&&(t=e=new wi(p.x2+u,p.y1-h,p.x2+u,p.y2+h))):(i=new wi(p.x1,p.y1-u,p.x2,p.y1-u),s?i.y2+=l:i.y1-=l,o.shape!==ed&&(t=e=new wi(p.x1-h,p.y1-u,p.x2+h,p.y1-u))),this.trackBox=i,this.pointerRangeBox=e,this.box=t||i.clone().pad(o.border.width)},e.prototype.getElementOptions=function(){var t=this.options;return{fill:{color:t.color,opacity:t.opacity},stroke:jt(t.border)?{color:t.border.width?t.border.color||t.color:"",width:t.border.width,dashType:t.border.dashType,opacity:t.opacity}:null}},e.prototype._margin=function(){var t=this.scale,e=this.options,i=t.options,o=i.mirror,r=i.vertical,n=dt(e.margin);return r?n[o?"left":"right"]:n[o?"bottom":"top"]},e}(Td);te(Md,{shape:ed,track:{border:{width:1}},color:u,border:{width:1},opacity:1,margin:dt(3),animation:{type:ed},visible:!0});const Od=Md;var Ld=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.setup=function(){var t=this.options,e=t.margin,i=t.from,o=t.to,r=t.vertical,n=r?"x1":"y1";t.mirror===r?(i[n]-=e,o[n]-=e):(i[n]+=e,o[n]+=e);var s=this.fromScale=new q.geometry.Point(i.x1,i.y1),a=this.toScale=new q.geometry.Point(o.x1,o.y1);0!==t.duration&&(t.duration=Math.max(s.distanceTo(a)/t.duration*1e3,1))},e.prototype.step=function(t){var e=Pt(this.fromScale.x,this.toScale.x,t),i=Pt(this.fromScale.y,this.toScale.y,t);this.element.transform(q.geometry.transform().translate(e,i))},e}(q.drawing.Animation);te(Ld,{easing:nd,duration:250}),q.drawing.AnimationFactory.current.register(td,Ld);const Bd=Ld;var Id=q.geometry.Point,Ed=q.drawing.Path,Rd=function(t){function e(e,i){t.call(this,e,i),jt(this.options.size)||(this.options.size=.6*this.scale.options.majorTicks.size)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.pointerShape=function(){var t=this.scale,e=this.options.size,i=e/2,o=t.options.mirror?-1:1;return t.options.vertical?[new Id(0,0-i),new Id(0-o*e,0),new Id(0,0+i)]:[new Id(0-i,0),new Id(0,0+o*e),new Id(0+i,0)]},e.prototype.repaint=function(){var t=this.scale,e=this.options,i=new Bd(this.elements,at(e.animation,{vertical:t.options.vertical,mirror:t.options.mirror,margin:this._margin(e.margin),from:t.getSlot(e._oldValue),to:t.getSlot(e.value)}));!1===e.animation.transitions&&(i.options.duration=0),i.setup(),i.play()},e.prototype.render=function(){var t=this.scale,e=this.options,i=this.getElementOptions(),o=this.pointerShape(e.value);e.animation.type=td;var r=new Ed({stroke:i.stroke,fill:i.fill}).moveTo(o[0]).lineTo(o[1]).lineTo(o[2]).close(),n=t.getSlot(e.value);return r.transform(q.geometry.transform().translate(n.x1,n.y1)),this.elements=r,r},e}(Od);const Vd=Rd;var zd=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.setup=function(){var t=this.options,e=this.axis=t.vertical?H:F,i=this.to=t.newPoints[0][e],o=this.from=t.oldPoints[0][e];0!==t.duration&&(t.duration=Math.max(Math.abs(i-o)/t.speed*1e3,1)),this._set(o)},e.prototype.step=function(t){var e=Pt(this.from,this.to,t);this._set(e)},e.prototype._set=function(t){var e="set"+this.axis.toUpperCase(),i=this.options.newPoints;i[0][e](t),i[1][e](t)},e}(q.drawing.Animation);te(zd,{easing:nd,speed:250}),q.drawing.AnimationFactory.current.register(ed,zd);const jd=zd;var Dd=q.drawing.Group,Fd=q.drawing.Path,Hd=function(t){function e(e,i){t.call(this,e,i),jt(this.options.size)||(this.options.size=.3*this.scale.options.majorTicks.size)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.pointerShape=function(t){var e=this.scale,i=this.options,o=e.options,r=o.mirror,n=o.vertical,s=r===n?-1:1,a=i.size*s,p=e.getSlot(e.options.min),l=e.getSlot(t),h=n?H:F,c=n?F:H,u=this._margin()*s,d=new q.geometry.Point;d[h]=p[h+"1"],d[c]=p[c+"1"];var f=new q.geometry.Point;f[h]=l[h+"1"],f[c]=l[c+"1"],n?(d.translate(u,0),f.translate(u,0)):(d.translate(0,u),f.translate(0,u));var g=f.clone(),y=d.clone();return n?(g.translate(a,0),y.translate(a,0)):(g.translate(0,a),y.translate(0,a)),[d,f,g,y]},e.prototype.repaint=function(){var t=this.scale,e=this.options,i=this.pointerShape(e.value),o=this.pointerPath,r=this.pointerShape(e._oldValue);o.moveTo(i[0]).lineTo(i[1]).lineTo(i[2]).lineTo(i[3]).close();var n=new jd(o,at(e.animation,{reverse:t.options.reverse,vertical:t.options.vertical,oldPoints:[r[1],r[2]],newPoints:[i[1],i[2]]}));!1===e.animation.transitions&&(n.options.duration=0),n.setup(),n.play()},e.prototype.render=function(){var t=new Dd,e=this.getElementOptions();this.options.track.visible&&t.append(this.renderTrack());var i=this.pointerPath=new Fd({stroke:e.stroke,fill:e.fill});return t.append(i),this.elements=t,t},e.prototype.renderTrack=function(){var t=this.options.track,e=t.border||{},i=this.trackBox.clone().pad(e.width||0);return Fd.fromRect(i.toRect(),{fill:{color:t.color,opacity:t.opacity},stroke:{color:e.width?e.color||t.color:"",width:e.width,dashType:e.dashType}})},e}(Od);const Nd=Hd;var Ud=q.drawing.Group,Gd=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reflow=function(t){var e=this.pointers,i=t.origin.x,o=t.origin.y,r=new wi(i,o,i+t.width(),o+t.height());this.scale.reflow(r),this._shrinkScaleWidth(r);for(var n=0;n<e.length;n++)e[n].reflow();this.bbox=this._getBox(r),this._alignElements(),this._shrinkElements(),this._buildVisual(),this._draw()},e.prototype._buildVisual=function(){var t=new Ud,e=this.scale.render(),i=this.pointers;t.append(this.gaugeArea),t.append(e);for(var o=0;o<i.length;o++){var r=i[o];t.append(r.render()),r.value(r.options.value)}this._visuals=t},e.prototype._createModel=function(){var t=this.options,e=this.scale=new Cd(t.scale,this.contextService);this.pointers=[];var i=t.pointer;i=G(i)?i:[i];for(var o=0;o<i.length;o++){var r=at({},i[o],{animation:{transitions:t.transitions}}),n="arrow"===r.shape?Vd:Nd;this.pointers.push(new n(e,r))}},e.prototype._defaultSize=function(){var t=this.options.scale.vertical;return{width:t?60:200,height:t?200:60}},e.prototype._getBox=function(t){for(var e,i=this.scale,o=this.pointers,r=t.center(),n=o[0].box.clone().wrap(i.box),s=0;s<o.length;s++)n.wrap(o[s].box.clone());return i.options.vertical?(e=n.width()/2,n=new wi(r.x-e,t.y1,r.x+e,t.y2)):(e=n.height()/2,n=new wi(t.x1,r.y-e,t.x2,r.y+e)),n},e.prototype._alignElements=function(){for(var t,e=this.scale,i=this.pointers,o=e.box,r=i[0].box.clone().wrap(e.box),n=this.bbox,s=0;s<i.length;s++)r.wrap(i[s].box.clone());e.options.vertical?(t=n.center().x-r.center().x,e.reflow(new wi(o.x1+t,n.y1,o.x2+t,n.y2))):(t=n.center().y-r.center().y,e.reflow(new wi(o.x1,o.y1+t,o.x2,o.y2+t)));for(var a=0;a<i.length;a++)i[a].reflow(this.bbox)},e.prototype._shrinkScaleWidth=function(t){var e=this.scale;if(!e.options.vertical){var i=e.contentBox().width()-t.width();i>0&&(e.box.shrink(i,0),e.box.alignTo(t,"center"),e.reflow(e.box))}},e.prototype._shrinkElements=function(){for(var t=this.scale,e=this.pointers,i=t.box.clone(),o=t.options.vertical?"y":"x",r=e[0].box,n=0;n<e.length;n++)r.wrap(e[n].box.clone());i[o+1]+=Math.max(i[o+1]-r[o+1],0),i[o+2]-=Math.max(r[o+2]-i[o+2],0),t.reflow(i);for(var s=0;s<e.length;s++)e[s].reflow(this.bbox)},e}(xd);te(Gd,{transitions:!0,gaugeArea:{background:""},scale:{vertical:!0}});const Wd=Gd;var Xd=180,Yd=q.drawing.Arc,qd=q.drawing.Path,Zd=q.drawing.Group;function Qd(t,e,i,o){var r=new Zd,n=t.center,s=t.getRadiusX();if(o.visible)for(var a=0;a<e.length;a++){var p=t.pointAt(e[a]),l=new q.geometry.Point(n.x+s-o.size,n.y).rotate(e[a],n);r.append(new qd({stroke:{color:o.color,width:o.width}}).moveTo(p).lineTo(l))}return r}function Kd(t,e,i,o){return{from:t,to:e,color:i,opacity:o}}var $d=function(t){function e(e,i){t.call(this,0,1,e,i)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initUserOptions=function(t){var e=at({},this.options,t);return e.majorUnit=e.majorUnit||vi(e.min,e.max),e.minorUnit=e.minorUnit||e.majorUnit/10,e},e.prototype.initFields=function(){},e.prototype.render=function(t,e){var i=this.renderArc(t,e);this.bbox=i.bbox(),this.labelElements=this.renderLabels(),this.ticks=this.renderTicks(),this.ranges=this.renderRanges()},e.prototype.reflow=function(t){var e=t.center(),i=Math.min(t.height(),t.width())/2;if(!jt(this.bbox))return this.render(e,i);this.bbox=this.arc.bbox(),this.radius(this.arc.getRadiusX()),this.repositionRanges(),this.renderLabels()},e.prototype.slotAngle=function(t){var e=this.options,i=e.min,o=e.max,r=e.reverse,n=e.startAngle,s=e.endAngle,a=s-n;return(r?s-(t-i)/(o-i)*a:(t-i)/(o-i)*a+n)+Xd},e.prototype.hasRanges=function(){var t=this.options.ranges;return t&&t.length},e.prototype.ticksSize=function(){var t=this.options,e=t.majorTicks,i=t.minorTicks,o=0;return e.visible&&(o=e.size),i.visible&&(o=Math.max(i.size,o)),o},e.prototype.labelsCount=function(){var e=t.prototype.labelsCount.call(this),i=this.options;return i.endAngle-i.startAngle>=360&&i.max%i.majorUnit==0&&(e-=1),e},e.prototype.renderLabels=function(){var t=this.options,e=this.arc.clone(),i=e.getRadiusX(),o=this.tickAngles(e,t.majorUnit),r=t.rangeSize=t.rangeSize||.1*i,n=new Zd,s=.05*i;jt(t.rangeDistance)?s=t.rangeDistance:t.rangeDistance=s;var a=t.labels,p=a.position===rd,l=jt(this.labelElements);p&&(i-=this.ticksSize(),this.hasRanges()&&!l&&(i-=r+s),e.setRadiusX(i).setRadiusY(i));for(var h=this.labels,c=h.length,u=dt(a.padding),d=(u.left+u.right)/2,f=(u.top+u.bottom)/2,g=0;g<c;g++){var y=h[g],v=y.box.width()/2,m=y.box.height()/2,x=o[g],b=(x-Xd)*od,_=e.pointAt(x),w=_.x+Math.cos(b)*(v+d)*(p?1:-1),k=_.y+Math.sin(b)*(m+f)*(p?1:-1);y.reflow(new wi(w-v,k-m,w+v,k+m));var A=new q.geometry.Point(y.box.x1,y.box.y1),S=void 0;if(l){var C=(S=this.labelElements.children[g]).bbox().origin,P=S.transform()||q.geometry.transform();P.translate(A.x-C.x,A.y-C.y),S.transform(P)}else S=dd(y,t.labels),n.append(S);this.bbox=q.geometry.Rect.union(this.bbox,S.bbox())}return n},e.prototype.repositionRanges=function(){var t=this.ranges.children;if(t.length>0){var e=this.options,i=e.rangeDistance,o=e.rangeSize,r=this.getRangeRadius();this.options.labels.position===rd&&(r+=o+i);for(var n=r+o/2,s=0;s<t.length;s++)t[s]._geometry.setRadiusX(n).setRadiusY(n);this.bbox=q.geometry.Rect.union(this.bbox,this.ranges.bbox())}},e.prototype.renderRanges=function(){var t=this.rangeSegments(),e=t.length,i=new Zd;if(e){var o=this.options,r=o.rangeSize,n=o.reverse,s=o.rangeDistance,a=this.getRangeRadius();this.radius(this.radius()-r-s);for(var p=0;p<e;p++){var l=t[p],h=this.slotAngle(l[n?"to":"from"]),c=this.slotAngle(l[n?"from":"to"]);c-h!=0&&i.append(this.createRange(h,c,a,l))}}return i},e.prototype.createRange=function(t,e,i,o){var r=this.options.rangeSize,n=new q.geometry.Arc(this.arc.center,{radiusX:i+r/2,radiusY:i+r/2,startAngle:t,endAngle:e});return new Yd(n,{stroke:{width:r,color:o.color,opacity:o.opacity,lineCap:o.lineCap}})},e.prototype.rangeSegments=function(){var t=this.options,e=t.ranges||[],i=e.length,o=[];if(i){var r=t.min,n=t.max,s=t.rangePlaceholderColor;o.push(Kd(r,n,s));for(var a=0;a<i;a++)for(var p=fd(e[a],r,n),l=o.length,h=0;h<l;h++){var c=o[h];if(c.from<=p.from&&p.from<=c.to){o.push(Kd(p.from,p.to,p.color,p.opacity)),c.from<=p.to&&p.to<=c.to&&o.push(Kd(p.to,c.to,s,p.opacity)),c.to=p.from;break}}}return o},e.prototype.getRangeRadius=function(){var t=this.arc,e=this.options,i=e.rangeSize,o=e.rangeDistance,r=e.majorTicks.size;return e.labels.position===sd?t.getRadiusX()-r-o-i:t.getRadiusX()-i},e.prototype.renderArc=function(t,e){var i=this.options;return this.arc=new q.geometry.Arc(t,{radiusX:e,radiusY:e,startAngle:i.startAngle+Xd,endAngle:i.endAngle+Xd})},e.prototype.renderTicks=function(){var t=this.arc,e=this.options,i=t.clone();this.majorTickAngles=this.tickAngles(t,e.majorUnit),this.majorTicks=Qd(i,this.majorTickAngles,e.majorUnit,e.majorTicks);var o=new Zd;o.append(this.majorTicks);var r=e.majorTicks.size,n=e.minorTicks.size;if(this._tickDifference=r-n,e.labels.position===sd){var s=i.getRadiusX();i.setRadiusX(s-r+n).setRadiusY(s-r+n)}return this.minorTickAngles=this.normalizeTickAngles(this.tickAngles(t,e.minorUnit)),this.minorTicks=Qd(i,this.minorTickAngles,e.minorUnit,e.minorTicks),o.append(this.minorTicks),o},e.prototype.normalizeTickAngles=function(t){for(var e=this.options,i=e.majorUnit/e.minorUnit,o=t.length-1;o>=0;o--)o%i==0&&t.splice(o,1);return t},e.prototype.tickAngles=function(t,e){var i=this.options,o=i.reverse,r=i.max-i.min,n=t.endAngle-t.startAngle,s=r/e,a=t.startAngle,p=n/s;o&&(a+=n,p=-p),n>=360&&i.max%e==0&&(s-=1);for(var l=[],h=0;h<s;h++)l.push(Zt(a,y)),a+=p;return Zt(a)<=t.endAngle&&l.push(a),l},e.prototype.radius=function(t){if(!t)return this.arc.getRadiusX();this.arc.setRadiusX(t).setRadiusY(t),this.repositionTicks(this.majorTicks.children,this.majorTickAngles),this.repositionTicks(this.minorTicks.children,this.minorTickAngles,!0)},e.prototype.repositionTicks=function(t,e,i){var o=i&&this._tickDifference||0,r=this.arc,n=r.getRadiusX();i&&this.options.labels.position===sd&&0!==o&&(r=this.arc.clone()).setRadiusX(n-o).setRadiusY(n-o);for(var s=0;s<t.length;s++){var a=r.pointAt(e[s]),p=t[s].segments,l=a.x-p[0].anchor().x,h=a.y-p[0].anchor().y;t[s].transform((new q.geometry.transform).translate(l,h))}},e}(_r);te($d,{min:0,max:100,majorTicks:{size:15,align:rd,color:u,width:id,visible:!0},minorTicks:{size:10,align:rd,color:u,width:id,visible:!0},startAngle:-30,endAngle:210,labels:{position:rd,padding:2}});const Jd=$d;var tf=function(t){function e(e,i){t.call(this,e,i);var o=this.options;o.duration=Math.max(Math.abs(o.newAngle-o.oldAngle)/o.duration*1e3,1)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.step=function(t){var e=this.options,i=Pt(e.oldAngle,e.newAngle,t);this.element.transform(q.geometry.transform().rotate(i,e.center))},e}(q.drawing.Animation);te(tf,{easing:nd,duration:Ju}),q.drawing.AnimationFactory.current.register(ad,tf);const ef=tf;var of=q.drawing.Circle,rf=q.drawing.Group,nf=q.drawing.Path,sf=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.setAngle=function(t){this.elements.transform(q.geometry.transform().rotate(t,this.center))},e.prototype.repaint=function(){var t=this.scale,e=this.options,i=t.slotAngle(e._oldValue),o=t.slotAngle(e.value);!1===e.animation.transitions?this.setAngle(o):new ef(this.elements,at(e.animation,{oldAngle:i,newAngle:o})).play()},e.prototype.render=function(){var t=this.scale,e=this.options,i=new rf;return!1!==e.animation&&at(e.animation,{startAngle:0,center:t.arc.center,reverse:t.options.reverse}),i.append(this._renderNeedle(),this._renderCap()),this.elements=i,this.setAngle(od),i},e.prototype.reflow=function(t){var e=this.center=t.center,i=Xt(this.options.length||1,.1,1.5),o=this.radius=t.getRadiusX()*i,r=this.capSize=Math.round(o*this.options.cap.size);this.bbox=q.geometry.Rect.fromPoints(new q.geometry.Point(e.x-r,e.y-r),new q.geometry.Point(e.x+r,e.y+r))},e.prototype._renderNeedle=function(){var t=this.scale.options.minorTicks.size,e=this.center,i=this.options.color,o=new nf({fill:{color:i},stroke:{color:i,width:id}});return o.moveTo(e.x+this.radius-t,e.y).lineTo(e.x,e.y-this.capSize/2).lineTo(e.x,e.y+this.capSize/2).close(),o},e.prototype._renderCap=function(){var t=this.options,e=t.cap.color||t.color,i=new q.geometry.Circle(this.center,this.capSize);return new of(i,{fill:{color:e},stroke:{color:e}})},e}(Td);te(sf,{cap:{size:.05},arrow:{width:16,height:14},animation:{type:ad,duration:Ju}});const af=sf;var pf=q.drawing.Group,lf=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reflow=function(t){var e=this.pointers;this.scale.reflow(t),this._initialPlotArea=this.scale.bbox;for(var i=0;i<e.length;i++)e[i].reflow(this.scale.arc),this._initialPlotArea=q.geometry.Rect.union(this._initialPlotArea,e[i].bbox);this.fitScale(t),this.alignScale(t),this._buildVisual(this.gaugeArea,e,this.scale),this._draw()},e.prototype._buildVisual=function(t,e,i){var o=this._visuals=new pf;o.append(t),o.append(i.ticks),o.append(i.ranges),this._buildPointers(e),o.append(i.labelElements)},e.prototype._buildPointers=function(t){for(var e=0;e<t.length;e++){var i=t[e];i.render(),this._visuals.append(i.elements),i.value(i.options.value)}},e.prototype.fitScale=function(t){for(var e,i,o,r,n,s=this.scale.arc,a=this._initialPlotArea,p=Math.abs(this.getDiff(a,t)),l=Zt(p,y),h=Zt(-p,y),c=0,u=0;!(!(u++<100)||(c=n===o?c+1:0)>5||l!==r&&0<=(e=this.getPlotBox(l,t,s))&&e<=2||h!==r&&0<=(o=this.getPlotBox(h,t,s))&&o<=2||(r=e>0&&o>0?2*l:e<0&&o<0?2*h:Zt((l+h)/2||1,y),0<=(i=this.getPlotBox(r,t,s))&&i<=2));)n=o,i>0?(h=r,o=i):(l=r,e=i)},e.prototype.getPlotBox=function(t,e,i){var o=this.scale,r=this.pointers,n=i.getRadiusX(),s=i.clone();s.setRadiusX(n+t).setRadiusY(n+t),o.arc=s,o.reflow(e),this.plotBbox=o.bbox;for(var a=0;a<r.length;a++)r[a].reflow(s),this.plotBbox=q.geometry.Rect.union(this.plotBbox,r[a].bbox);return this.getDiff(this.plotBbox,e)},e.prototype.getDiff=function(t,e){return Math.min(e.width()-t.width(),e.height()-t.height())},e.prototype.alignScale=function(t){var e=this.plotBbox.center(),i=t.center(),o=e.x-i.x,r=e.y-i.y,n=this.scale,s=this.pointers;n.arc.center.x-=o,n.arc.center.y-=r,n.reflow(t);for(var a=0;a<s.length;a++)s[a].reflow(n.arc),this.plotBbox=q.geometry.Rect.union(n.bbox,s[a].bbox)},e.prototype._createModel=function(){var t=this.options,e=t.pointer,i=this.scale=new Jd(t.scale,this.contextService);this.pointers=[];for(var o=G(e)?e:[e],r=0;r<o.length;r++){var n=new af(i,at({},o[r],{animation:{transitions:t.transitions}}));this.pointers.push(n)}},e}(xd);te(lf,{transitions:!0,gaugeArea:{background:""}});const hf=lf;var cf=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.rangeSegments=function(){var t=this.options;return[{from:t.min,to:t.max,color:t.rangePlaceholderColor,lineCap:t.rangeLineCap}]},e.prototype.hasRanges=function(){return!0},e.prototype.placeholderRangeAngle=function(t){var e=this.ranges.children[0].geometry();this.options.reverse?e.setEndAngle(t):e.setStartAngle(t)},e.prototype.addRange=function(t,e,i){var o=this.options.reverse,r=this.slotAngle(o?e:t),n=this.slotAngle(o?t:e),s=this.createRange(r,n,this.getRangeRadius(),i);return this.ranges.append(s),s},e}(Jd);te(cf,{min:0,max:100,majorTicks:{visible:!1},minorTicks:{visible:!1},labels:{visible:!1},startAngle:0,endAngle:180,rangeLineCap:"round"});const uf=cf;var df=function(t){function e(e,i){t.call(this,e,i);var o=this.options,r=Math.abs(o.newAngle-o.oldAngle)/o.duration*1e3;o.duration=Xt(r,Ju,800);var n=e.elements.options.get("stroke.color"),s=e.currentColor();n!==s&&(this.startColor=new q.Color(n),this.color=new q.Color(s))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.step=function(t){var e=this,i=e.options,o=e.startColor,r=e.color,n=Pt(i.oldAngle,i.newAngle,t);if(this.element.angle(n),r){var s=Zt(Pt(o.r,r.r,t)),a=Zt(Pt(o.g,r.g,t)),p=Zt(Pt(o.b,r.b,t));this.element.stroke(new q.Color(s,a,p).toHex())}},e}(q.drawing.Animation);te(df,{easing:nd,duration:Ju}),q.drawing.AnimationFactory.current.register(pd,df);const ff=df;var gf=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.repaint=function(){var t=this.scale,e=this.options,i=t.slotAngle(e._oldValue),o=t.slotAngle(e.value);this.animation&&this.animation.abort(),!1===e.animation.transitions?(this.angle(o),this.stroke(this.currentColor())):(this.animation=new ff(this,at(e.animation,{oldAngle:i,newAngle:o})),this.animation.play())},e.prototype.angle=function(t){var e=this.elements.geometry();this.scale.options.reverse?e.setStartAngle(t):e.setEndAngle(t),this.scale.placeholderRangeAngle(t)},e.prototype.stroke=function(t){this.elements.stroke(t)},e.prototype.render=function(){if(!this.elements){var t=this.scale,e=this.options;!1!==e.animation&&at(e.animation,{startAngle:0,center:t.arc.center,reverse:t.options.reverse}),this.elements=t.addRange(t.options.min,this.options.value,{color:this.currentColor(),opacity:e.opacity,lineCap:t.options.rangeLineCap})}},e.prototype.currentColor=function(){var t=this.scale.options,e=t.min,i=t.max,o=this.options,r=o.colors,n=o.color,s=o.value,a=K(s)?s:e;if(r)for(var p=0;p<r.length;p++){var l=r[p],h=l.color,c=l.from;void 0===c&&(c=e);var u=l.to;if(void 0===u&&(u=i),c<=a&&a<=u)return h}return n},e.prototype.reflow=function(){this.render(),this.bbox=this.elements.bbox()},e}(Td);te(gf,{animation:{type:pd,duration:Ju}});const yf=gf;var vf=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._initTheme=function(e){t.prototype._initTheme.call(this,e),this.options.color=this.options.color||(this.theme.pointer||{}).color},e.prototype._createModel=function(){var t=this.options,e=this.scale=new uf(t.scale,this.contextService),i=new yf(e,at({},{colors:t.colors,color:t.color,value:t.value,opacity:t.opacity,animation:{transitions:t.transitions}}));this.pointers=[i]},e.prototype._buildPointers=function(t){for(var e=0;e<t.length;e++){var i=t[e];i.render(),i.value(i.options.value)}},e.prototype._setValueOptions=function(t){this.options.value=t},e.prototype.currentColor=function(){var t=this.pointers[0];if(t)return t.currentColor()},e.prototype.centerLabelPosition=function(t,e){var i=this.getSize(),o=this.scale.arc.center,r=o.x-t/2,n=o.y-e/2;if(t<i.width){var s=r+t;r=Math.max(r,0),s>i.width&&(r-=s-i.width)}if(e<i.height){var a=this.scale.bbox,p=a.bottomRight().y,l=n+e;n=Math.max(n,a.origin.y),l>p&&(n-=l-p)}return{left:r,top:n}},e}(hf);const mf=vf;var xf=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._createModel=function(){var e=this.options.scale;"number"!=typeof e.startAngle&&(e.startAngle=90),e.endAngle=e.startAngle+360,t.prototype._createModel.call(this)},e}(mf);const bf=xf;var _f=function(t){this.setOptions(t),this.initProperties()};_f.prototype.initProperties=function(){},_f.prototype.setOptions=function(t){this.options=Object.assign({},this.options,t),this.quietZoneLength=this.options.addQuietZone?2*this.options.quietZoneLength:0},_f.prototype.encode=function(t,e,i){var o=jt(t)?String(t):t;return this.initValue(o,e,i),this.options.addQuietZone&&this.addQuietZone(),this.addData(),this.options.addQuietZone&&this.addQuietZone(),{baseUnit:this.baseUnit,pattern:this.pattern}},_f.prototype.initValue=function(){},_f.prototype.addQuietZone=function(){this.pattern.push(this.options.quietZoneLength||10)},_f.prototype.addData=function(){},_f.prototype.invalidCharacterError=function(t){throw new Error('Character "'+t+'" is not valid for symbology '+this.name+".")},te(_f,{quietZoneLength:10,addQuietZone:!0,addCheckSum:!0});var wf=Object.assign,kf=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),wf(this,{name:"Code 11",characterMap:["111121","211121","121121","221111","112121","212111","122111","111221","211211","211111","112111"],cCheckSumTotal:10,kCheckSumTotal:9,kCheckSumMinLength:10,checkSumMod:11,DASH_VALUE:10,DASH:"-",START:"112211",STOP:"11221"})},e.prototype.initValue=function(t,e){this.pattern=[],this.value=t,this.width=e,this.totalUnits=0},e.prototype.addData=function(){var t=this.value;this.addPattern(this.START);for(var e=0;e<t.length;e++)this.addCharacter(t.charAt(e));this.options.addCheckSum&&this.addCheckSum(),this.addPattern(this.STOP),this.setBaseUnit()},e.prototype.setBaseUnit=function(){this.baseUnit=this.width/(this.totalUnits+this.quietZoneLength)},e.prototype.addCheckSum=function(){var t=this.value,e=t.length,i=this.getWeightedSum(t,e,this.cCheckSumTotal)%this.checkSumMod;if(this.checksum=String(i),this.addPattern(this.characterMap[i]),++e>=this.kCheckSumMinLength){var o=(i+this.getWeightedSum(t,e,this.kCheckSumTotal))%this.checkSumMod;this.checksum+=o,this.addPattern(this.characterMap[o])}},e.prototype.getWeightedSum=function(t,e,i){for(var o=0,r=0;r<t.length;r++)o+=this.weightedValue(this.getValue(t.charAt(r)),e,r,i);return o},e.prototype.weightedValue=function(t,e,i,o){return((e-i)%o||o)*t},e.prototype.getValue=function(t){return isNaN(t)?(t!==this.DASH&&this.invalidCharacterError(t),this.DASH_VALUE):parseInt(t,10)},e.prototype.addCharacter=function(t){var e=this.getValue(t),i=this.characterMap[e];this.addPattern(i)},e.prototype.addPattern=function(t){for(var e,i=0;i<t.length;i++)e=parseInt(t.charAt(i),10),this.pattern.push(e),this.totalUnits+=e},e}(_f);te(kf,{addCheckSum:!0});var Af=Object.assign,Sf=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),Af(this,{minBaseUnitLength:.7})},e.prototype.addData=function(){var t=this.value;this.addStart();for(var e=0;e<t.length;e++)this.addCharacter(t.charAt(e));this.options.addCheckSum&&this.pushCheckSum(),this.addStop(),this.prepareValues()},e.prototype.addCharacter=function(t){var e=this.characterMap[t];e||this.invalidCharacterError(t),this.addBase(e)},e.prototype.addBase=function(){},e}(_f),Cf=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),Af(this,{name:"Code 39",checkSumMod:43,minRatio:2.5,maxRatio:3,gapWidth:1,splitCharacter:"|",patternMappings:{b:"1|",w:"1|",B:"ratio|",W:"ratio|"},characterMap:{0:{pattern:"bwbWBwBwb",value:0},1:{pattern:"BwbWbwbwB",value:1},2:{pattern:"bwBWbwbwB",value:2},3:{pattern:"BwBWbwbwb",value:3},4:{pattern:"bwbWBwbwB",value:4},5:{pattern:"BwbWBwbwb",value:5},6:{pattern:"bwBWBwbwb",value:6},7:{pattern:"bwbWbwBwB",value:7},8:{pattern:"BwbWbwBwb",value:8},9:{pattern:"bwBWbwBwb",value:9},A:{pattern:"BwbwbWbwB",value:10},B:{pattern:"bwBwbWbwB",value:11},C:{pattern:"BwBwbWbwb",value:12},D:{pattern:"bwbwBWbwB",value:13},E:{pattern:"BwbwBWbwb",value:14},F:{pattern:"bwBwBWbwb",value:15},G:{pattern:"bwbwbWBwB",value:16},H:{pattern:"BwbwbWBwb",value:17},I:{pattern:"bwBwbWBwb",value:18},J:{pattern:"bwbwBWBwb",value:19},K:{pattern:"BwbwbwbWB",value:20},L:{pattern:"bwBwbwbWB",value:21},M:{pattern:"BwBwbwbWb",value:22},N:{pattern:"bwbwBwbWB",value:23},O:{pattern:"BwbwBwbWb",value:24},P:{pattern:"bwBwBwbWb",value:25},Q:{pattern:"bwbwbwBWB",value:26},R:{pattern:"BwbwbwBWb",value:27},S:{pattern:"bwBwbwBWb",value:28},T:{pattern:"bwbwBwBWb",value:29},U:{pattern:"BWbwbwbwB",value:30},V:{pattern:"bWBwbwbwB",value:31},W:{pattern:"BWBwbwbwb",value:32},X:{pattern:"bWbwBwbwB",value:33},Y:{pattern:"BWbwBwbwb",value:34},Z:{pattern:"bWBwBwbwb",value:35},"-":{pattern:"bWbwbwBwB",value:36},".":{pattern:"BWbwbwBwb",value:37}," ":{pattern:"bWBwbwBwb",value:38},$:{pattern:"bWbWbWbwb",value:39},"/":{pattern:"bWbWbwbWb",value:40},"+":{pattern:"bWbwbWbWb",value:41},"%":{pattern:"bwbWbWbWb",value:42},START:{pattern:"bWbwBwBwb"}}})},e.prototype.initValue=function(t,e,i){this.width=e,this.height=i,this.value=t,this.dataLength=t.length,this.pattern=[],this.patternString=""},e.prototype.prepareValues=function(){var t,e=this.minBaseUnitLength,i=this.minRatio,o=Math.ceil(Math.max(.15*this.width,24)),r=this.maxRatio;if(this.height<o)throw new Error("Insufficient height for Code39 encoding: the current height is "+this.height+"px and the minimum height is "+o+"px.");for(t=this.getBaseUnit(r);t<e&&r>i;)r=parseFloat((r-.1).toFixed(1)),t=this.getBaseUnit(r);if(t<e){var n=Math.ceil(this.getBaseWidth(i)*e);throw new Error("Insufficient width for Code39 encoding: the current width is "+this.width+'px and the minimum width for value "'+this.value+'" is '+n+"px.")}this.ratio=r,this.baseUnit=t,this.patternString=this.patternString.substring(0,this.patternString.length-1),this.pattern=this.pattern.concat(this.patternString.replace(/ratio/g,r).split(this.splitCharacter))},e.prototype.getBaseUnit=function(t){return this.width/this.getBaseWidth(t)},e.prototype.getBaseWidth=function(t){var e=3*(t+2);return this.quietZoneLength+e*(this.dataLength+2)+this.gapWidth*(this.dataLength+1)},e.prototype.addStart=function(){this.addPattern(this.characterMap.START.pattern),this.addCharacterGap()},e.prototype.addBase=function(t){this.addPattern(t.pattern),this.addCharacterGap()},e.prototype.addStop=function(){this.addPattern(this.characterMap.START.pattern)},e.prototype.addPattern=function(t){for(var e=0;e<t.length;e++)this.patternString+=this.patternMappings[t.charAt(e)]},e.prototype.addCharacterGap=function(){this.patternString+=this.gapWidth+this.splitCharacter},e}(Sf);te(Cf,{addCheckSum:!1});var Pf={addCharacter:function(t){this.characterMap[t]?this.addBase(this.characterMap[t]):t.charCodeAt(0)>127?this.invalidCharacterError(t):this.addExtended(t.charCodeAt(0))},addExtended:function(t){for(var e,i=0;i<this.extendedMappings.length;i++)if(e=this.extendedMappings[i].call(this,t)){for(var o=0;o<e.length;o++){var r=e[o];this.addBase(r)}return void(this.dataLength+=e.length-1)}},extendedMappings:[function(t){if(97<=t&&t<=122)return[this.characterMap[this.shiftCharacters[0]],this.characterMap[String.fromCharCode(t-32)]]},function(t){if(33<=t&&t<=58)return[this.characterMap[this.shiftCharacters[1]],this.characterMap[String.fromCharCode(t+32)]]},function(t){if(1<=t&&t<=26)return[this.characterMap[this.shiftCharacters[2]],this.characterMap[String.fromCharCode(t+64)]]},function(t){var e,i;if(this.specialAsciiCodes[t]){e=[];for(var o=0;o<this.specialAsciiCodes[t].length;o++)e.push(this.characterMap[this.shiftCharacters[3]]),e.push(this.characterMap[this.specialAsciiCodes[t][o]])}else i=6*Math.floor(t/32)+(t-27)%32+64,e=[this.characterMap[this.shiftCharacters[3]],this.characterMap[String.fromCharCode(i)]];return e}],specialAsciiCodes:{0:["U"],64:["V"],96:["W"],127:["T","X","Y","Z"]},shiftValuesAsciiCodes:{39:36,40:47,41:43,42:37},characterMap:{"+":!1,"/":!1,$:!1,"%":!1},shiftCharacters:["SHIFT0","SHIFT1","SHIFT2","SHIFT3"]},Tf=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),at(this,Pf,{name:"Code 39 extended",characterMap:{SHIFT0:{pattern:"bWbwbWbWb",value:41},SHIFT1:{pattern:"bWbWbwbWb",value:40},SHIFT2:{pattern:"bWbWbWbwb",value:39},SHIFT3:{pattern:"bwbWbWbWb",value:42}}})},e}(Cf),Mf=Object.assign,Of=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),Mf(this,{name:"Code 93",cCheckSumTotal:20,kCheckSumTotal:15,checkSumMod:47,characterMap:{0:{pattern:"131112",value:0},1:{pattern:"111213",value:1},2:{pattern:"111312",value:2},3:{pattern:"111411",value:3},4:{pattern:"121113",value:4},5:{pattern:"121212",value:5},6:{pattern:"121311",value:6},7:{pattern:"111114",value:7},8:{pattern:"131211",value:8},9:{pattern:"141111",value:9},A:{pattern:"211113",value:10},B:{pattern:"211212",value:11},C:{pattern:"211311",value:12},D:{pattern:"221112",value:13},E:{pattern:"221211",value:14},F:{pattern:"231111",value:15},G:{pattern:"112113",value:16},H:{pattern:"112212",value:17},I:{pattern:"112311",value:18},J:{pattern:"122112",value:19},K:{pattern:"132111",value:20},L:{pattern:"111123",value:21},M:{pattern:"111222",value:22},N:{pattern:"111321",value:23},O:{pattern:"121122",value:24},P:{pattern:"131121",value:25},Q:{pattern:"212112",value:26},R:{pattern:"212211",value:27},S:{pattern:"211122",value:28},T:{pattern:"211221",value:29},U:{pattern:"221121",value:30},V:{pattern:"222111",value:31},W:{pattern:"112122",value:32},X:{pattern:"112221",value:33},Y:{pattern:"122121",value:34},Z:{pattern:"123111",value:35},"-":{pattern:"121131",value:36},".":{pattern:"311112",value:37}," ":{pattern:"311211",value:38},$:{pattern:"321111",value:39},"/":{pattern:"112131",value:40},"+":{pattern:"113121",value:41},"%":{pattern:"211131",value:42},SHIFT0:{pattern:"122211",value:46},SHIFT1:{pattern:"311121",value:45},SHIFT2:{pattern:"121221",value:43},SHIFT3:{pattern:"312111",value:44},START:{pattern:"111141"},TERMINATION_BAR:"1"}})},e.prototype.initValue=function(t,e,i){this.value=t,this.width=e,this.height=i,this.pattern=[],this.values=[],this.dataLength=t.length},e.prototype.prepareValues=function(){var t=Math.ceil(Math.max(.15*this.width,24));if(this.height<t)throw new Error("Insufficient height for Code93 encoding: the current height is "+this.height+"px, the minimum required height is "+t+"px.");if(this.setBaseUnit(),this.baseUnit<this.minBaseUnitLength){var e=Math.ceil(this.minBaseUnitLength*(this.width/this.baseUnit));throw new Error("Insufficient width for Code93 encoding: the current width is "+this.width+'px and the minimum required width for value "'+this.value+'" is '+e+"px.")}},e.prototype.setBaseUnit=function(){this.baseUnit=this.width/(9*(this.dataLength+2+2)+this.quietZoneLength+1)},e.prototype.addStart=function(){var t=this.characterMap.START.pattern;this.addPattern(t)},e.prototype.addStop=function(){this.addStart(),this.pattern.push(this.characterMap.TERMINATION_BAR)},e.prototype.addBase=function(t){this.addPattern(t.pattern),this.values.push(t.value)},e.prototype.pushCheckSum=function(){var t,e=this._getCheckValues();this.checksum=e.join("");for(var i=0;i<e.length;i++)t=this.characterMap[this._findCharacterByValue(e[i])],this.addPattern(t.pattern)},e.prototype._getCheckValues=function(){var t,e,i=this.values,o=i.length,r=0;for(e=o-1;e>=0;e--)r+=this.weightedValue(i[e],o-e,this.cCheckSumTotal);for(t=r%this.checkSumMod,r=this.weightedValue(t,1,this.kCheckSumTotal),e=o-1;e>=0;e--)r+=this.weightedValue(i[e],o-e+1,this.kCheckSumTotal);return[t,r%this.checkSumMod]},e.prototype._findCharacterByValue=function(t){for(var e in this.characterMap)if(this.characterMap[e].value===t)return e},e.prototype.weightedValue=function(t,e,i){return(e%i||i)*t},e.prototype.addPattern=function(t){for(var e,i=0;i<t.length;i++)e=parseInt(t.charAt(i),10),this.pattern.push(e)},e}(Sf),Lf=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),at(this,Pf,{name:"Code 93 extended",pushCheckSum:function(){var t,e=this._getCheckValues();this.checksum=e.join("");for(var i=0;i<e.length;i++)if(t=e[i],this.shiftValuesAsciiCodes[t])this.addExtended(this.shiftValuesAsciiCodes[t]);else{var o=this._findCharacterByValue(t);this.addPattern(this.characterMap[o].pattern)}}})},e}(Of),Bf=/^\d+$/,If=Object.assign,Ef=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),If(this,{name:"Postnet",START:"2",VALID_CODE_LENGTHS:[5,9,11],DIGIT_SEPARATOR:"-",characterMap:["22111","11122","11212","11221","12112","12121","12211","21112","21121","21211"]})},e.prototype.initValue=function(t,e,i){this.height=i,this.width=e,this.baseHeight=i/2,this.value=t.replace(new RegExp(this.DIGIT_SEPARATOR,"g"),""),this.pattern=[],this.validate(this.value),this.checkSum=0,this.setBaseUnit()},e.prototype.addData=function(){var t=this.value;this.addPattern(this.START);for(var e=0;e<t.length;e++)this.addCharacter(t.charAt(e));this.options.addCheckSum&&this.addCheckSum(),this.addPattern(this.START),this.pattern.pop()},e.prototype.addCharacter=function(t){var e=this.characterMap[t];this.checkSum+=parseInt(t,10),this.addPattern(e)},e.prototype.addCheckSum=function(){this.checksum=(10-this.checkSum%10)%10,this.addCharacter(this.checksum)},e.prototype.setBaseUnit=function(){this.baseUnit=this.width/(10*(this.value.length+1)+3+this.quietZoneLength)},e.prototype.validate=function(t){if(Bf.test(t)||this.invalidCharacterError(t.match(/[^0-9]/)[0]),!Ct(t.length,this.VALID_CODE_LENGTHS))throw new Error("Invalid value length. Valid lengths for the Postnet symbology are "+this.VALID_CODE_LENGTHS.join(",")+".")},e.prototype.addPattern=function(t){for(var e,i=0;i<t.length;i++)e=this.height-this.baseHeight*t.charAt(i),this.pattern.push({width:1,y1:e,y2:this.height}),this.pattern.push(1)},e}(_f),Rf=/^\d+$/,Vf=/^[a-z0-9]+$/i,zf=Object.assign,jf=function(t){this.encoding=t,this.initProperties()};jf.prototype.initProperties=function(){},jf.prototype.addStart=function(){},jf.prototype.is=function(){},jf.prototype.isCode=function(){return!1},jf.prototype.move=function(){},jf.prototype.pushState=function(){};var Df=function(t){function e(e,i){t.call(this,e),this.states=i,this._initMoves(i)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),at(this,{FNC4:"FNC4",SHIFT:98})},e.prototype.addStart=function(){this.encoding.addPattern(this.START)},e.prototype.is=function(t,e){var i=t.charCodeAt(e);return this.isCode(i)},e.prototype.move=function(t){for(var e=0;!this._moves[e].call(this,t)&&e<this._moves.length;)e++},e.prototype.pushState=function(t){var e,i=this.states,o=t.value,r=o.length;if(Ct("C",i)){var n=o.substr(t.index).match(/\d{4,}/g);n&&(r=o.indexOf(n[0],t.index))}for(;(e=t.value.charCodeAt(t.index))>=0&&this.isCode(e)&&t.index<r;)this.encoding.addPattern(this.getValue(e)),t.index++},e.prototype._initMoves=function(t){this._moves=[],Ct(this.FNC4,t)&&this._moves.push(this._moveFNC),Ct(this.shiftKey,t)&&this._moves.push(this._shiftState),this._moves.push(this._moveState)},e.prototype._moveFNC=function(t){if(t.fnc)return t.fnc=!1,t.previousState===this.key},e.prototype._shiftState=function(t){if(t.previousState===this.shiftKey&&(t.index+1>=t.value.length||this.encoding[this.shiftKey].is(t.value,t.index+1)))return this.encoding.addPattern(this.SHIFT),t.shifted=!0,!0},e.prototype._moveState=function(){return this.encoding.addPattern(this.MOVE),!0},e}(jf),Ff={};Ff.A=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),zf(this,{key:"A",shiftKey:"B",MOVE:101,START:103})},e.prototype.isCode=function(t){return 0<=t&&t<96},e.prototype.getValue=function(t){return t<32?t+64:t-32},e}(Df),Ff.B=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),zf(this,{key:"B",shiftKey:"A",MOVE:100,START:104})},e.prototype.isCode=function(t){return 32<=t&&t<128},e.prototype.getValue=function(t){return t-32},e}(Df),Ff.C=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),zf(this,{key:"C",MOVE:99,START:105})},e.prototype.addStart=function(){this.encoding.addPattern(this.START)},e.prototype.is=function(t,e){var i=Yf(t,e,4);return(e+4<=t.length||2===t.length)&&Rf.test(i)},e.prototype.move=function(){this.encoding.addPattern(this.MOVE)},e.prototype.pushState=function(t){for(var e;(e=Yf(t.value,t.index,2))&&Rf.test(e)&&2===e.length;)this.encoding.addPattern(parseInt(e,10)),t.index+=2},e.prototype.getValue=function(t){return t},e}(jf),Ff.FNC4=function(t){function e(e,i){t.call(this,e),this._initSubStates(i)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),zf(this,{key:"FNC4",dependentStates:["A","B"]})},e.prototype.addStart=function(t){var e=t.value.charCodeAt(0)-128,i=this._getSubState(e);this.encoding[i].addStart()},e.prototype.is=function(t,e){var i=t.charCodeAt(e);return this.isCode(i)},e.prototype.isCode=function(t){return 128<=t&&t<256},e.prototype.pushState=function(t){var e,i=this._initSubState(t),o=this.encoding,r=i.value.length;if(t.index+=r,r<3)for(;i.index<r;i.index++)e=i.value.charCodeAt(i.index),i.state=this._getSubState(e),i.previousState!==i.state&&(i.previousState=i.state,o[i.state].move(i)),o.addPattern(o[i.state].MOVE),o.addPattern(o[i.state].getValue(e));else i.state!==i.previousState&&o[i.state].move(i),this._pushStart(i),o.pushData(i,this.subStates),t.index<t.value.length&&this._pushStart(i);t.fnc=!0,t.state=i.state},e.prototype._pushStart=function(t){this.encoding.addPattern(this.encoding[t.state].MOVE),this.encoding.addPattern(this.encoding[t.state].MOVE)},e.prototype._initSubState=function(t){var e={value:this._getAll(t.value,t.index),index:0};return e.state=this._getSubState(e.value.charCodeAt(0)),e.previousState=t.previousState===this.key?e.state:t.previousState,e},e.prototype._initSubStates=function(t){this.subStates=[];for(var e=0;e<t.length;e++)Ct(t[e],this.dependentStates)&&this.subStates.push(t[e])},e.prototype._getSubState=function(t){for(var e=0;e<this.subStates.length;e++)if(this.encoding[this.subStates[e]].isCode(t))return this.subStates[e]},e.prototype._getAll=function(t,e){for(var i,o="",r=e;(i=t.charCodeAt(r++))&&this.isCode(i);)o+=String.fromCharCode(i-128);return o},e}(jf),Ff.FNC1=function(t){function e(e,i){t.call(this,e),this.states=i}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),zf(this,{key:"FNC1",startState:"C",startAI:"(",endAI:")",dependentStates:["C","B"],applicationIdentifiers:{22:{max:29,type:"alphanumeric"},402:{length:17},7004:{max:4,type:"alphanumeric"},242:{max:6,type:"alphanumeric"},8020:{max:25,type:"alphanumeric"},703:{min:3,max:30,type:"alphanumeric"},8008:{min:8,max:12,type:"alphanumeric"},253:{min:13,max:17,type:"alphanumeric"},8003:{min:14,max:30,type:"alphanumeric"},multiKey:[{ids:["15","17","8005","8100"],ranges:[[11,13],[310,316],[320,336],[340,369]],type:{length:6}},{ids:["240","241","250","251","400","401","403","7002","8004","8007","8110"],ranges:[[-9]],type:{max:30,type:"alphanumeric"}},{ids:["7001"],ranges:[[410,414]],type:{length:13}},{ids:["10","21","254","420","8002"],type:{max:20,type:"alphanumeric"}},{ids:["00","8006","8017","8018"],type:{length:18}},{ids:["01","02","8001"],type:{length:14}},{ids:["422"],ranges:[[424,426]],type:{length:3}},{ids:["20","8102"],type:{length:2}},{ids:["30","37"],type:{max:8,type:"alphanumeric"}},{ids:["390","392"],type:{max:15,type:"alphanumeric"}},{ids:["421","423"],type:{min:3,max:15,type:"alphanumeric"}},{ids:["391","393"],type:{min:3,max:18,type:"alphanumeric"}},{ids:["7003","8101"],type:{length:10}}]},START:102})},e.prototype.addStart=function(){this.encoding[this.startState].addStart()},e.prototype.is=function(){return Ct(this.key,this.states)},e.prototype.pushState=function(t){var e,i,o,r=this.encoding,n=t.value.replace(/\s/g,""),s=new RegExp("["+this.startAI+this.endAI+"]","g"),a=t.index,p={state:this.startState};for(r.addPattern(this.START);;){if(p.index=0,(e=(o=n.charAt(a)===this.startAI?2:0)>0?this.getBySeparator(n,a):this.getByLength(n,a)).ai.length)i=a+o+e.id.length+e.ai.length;else if((i=n.indexOf(this.startAI,a+1))<0){if(a+e.ai.max+e.id.length+o<n.length)throw new Error("Separators are required after variable length identifiers");i=n.length}if(p.value=n.substring(a,i).replace(s,""),this.validate(e,p.value),r.pushData(p,this.dependentStates),i>=n.length)break;a=i,p.state!==this.startState&&(r[this.startState].move(p),p.state=this.startState),e.ai.length||r.addPattern(this.START)}t.index=t.value.length},e.prototype.validate=function(t,e){var i=e.substr(t.id.length),o=t.ai;if(!o.type&&!Rf.test(i))throw new Error("Application identifier "+t.id+" is numeric only but contains non numeric character(s).");if("alphanumeric"===o.type&&!Vf.test(i))throw new Error("Application identifier "+t.id+" is alphanumeric only but contains non alphanumeric character(s).");if(o.length&&o.length!==i.length)throw new Error("Application identifier "+t.id+" must be "+o.length+" characters long.");if(o.min&&o.min>i.length)throw new Error("Application identifier "+t.id+" must be at least "+o.min+" characters long.");if(o.max&&o.max<i.length)throw new Error("Application identifier "+t.id+" must be at most "+o.max+" characters long.")},e.prototype.getByLength=function(t,e){for(var i,o,r=2;r<=4;r++)if(i=Yf(t,e,r),o=this.getApplicationIdentifier(i)||this.getApplicationIdentifier(i.substring(0,i.length-1)))return{id:i,ai:o};this.unsupportedAIError(i)},e.prototype.unsupportedAIError=function(t){throw new Error("'"+t+"' is not a supported Application Identifier")},e.prototype.getBySeparator=function(t,e){var i=t.indexOf(this.startAI,e),o=t.indexOf(this.endAI,i),r=t.substring(i+1,o),n=this.getApplicationIdentifier(r)||this.getApplicationIdentifier(r.substr(r.length-1));return n||this.unsupportedAIError(r),{ai:n,id:r}},e.prototype.getApplicationIdentifier=function(t){var e=this.applicationIdentifiers,i=e.multiKey;if(e[t])return e[t];for(var o=0;o<i.length;o++){if(i[o].ids&&Ct(t,i[o].ids))return i[o].type;if(i[o].ranges)for(var r=i[o].ranges,n=0;n<r.length;n++)if(r[n][0]<=t&&t<=r[n][1])return i[o].type}},e}(jf);var Hf=function(t){function e(e){t.call(this,e),this._initStates()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),zf(this,{characterMap:[212222,222122,222221,121223,121322,131222,122213,122312,132212,221213,221312,231212,112232,122132,122231,113222,123122,123221,223211,221132,221231,213212,223112,312131,311222,321122,321221,312212,322112,322211,212123,212321,232121,111323,131123,131321,112313,132113,132311,211313,231113,231311,112133,112331,132131,113123,113321,133121,313121,211331,231131,213113,213311,213131,311123,311321,331121,312113,312311,332111,314111,221411,431111,111224,111422,121124,121421,141122,141221,112214,112412,122114,122411,142112,142211,241211,221114,413111,241112,134111,111242,121142,121241,114212,124112,124211,411212,421112,421211,212141,214121,412121,111143,111341,131141,114113,114311,411113,411311,113141,114131,311141,411131,211412,211214,211232,2331112],STOP:106})},e.prototype._initStates=function(){for(var t=0;t<this.states.length;t++)this[this.states[t]]=new Ff[this.states[t]](this,this.states)},e.prototype.initValue=function(t,e,i){this.pattern=[],this.value=t,this.width=e,this.height=i,this.checkSum=0,this.totalUnits=0,this.index=0,this.position=1},e.prototype.addData=function(){var t={value:this.value,index:0,state:""};0!==this.value.length&&(t.state=t.previousState=this.getNextState(t,this.states),this.addStart(t),this.pushData(t,this.states),this.addCheckSum(),this.addStop(),this.setBaseUnit())},e.prototype.pushData=function(t,e){for(;this[t.state].pushState(t),!(t.index>=t.value.length);)if(t.shifted){var i=t.state;t.state=t.previousState,t.previousState=i,t.shifted=!1}else t.previousState=t.state,t.state=this.getNextState(t,e),this[t.state].move(t)},e.prototype.addStart=function(t){this[t.state].addStart(t),this.position=1},e.prototype.addCheckSum=function(){this.checksum=this.checkSum%103,this.addPattern(this.checksum)},e.prototype.addStop=function(){this.addPattern(this.STOP)},e.prototype.setBaseUnit=function(){this.baseUnit=this.width/(this.totalUnits+this.quietZoneLength)},e.prototype.addPattern=function(t){for(var e,i=this.characterMap[t].toString(),o=0;o<i.length;o++)e=parseInt(i.charAt(o),10),this.pattern.push(e),this.totalUnits+=e;this.checkSum+=t*this.position++},e.prototype.getNextState=function(t,e){for(var i=0;i<e.length;i++)if(this[e[i]].is(t.value,t.index))return e[i];this.invalidCharacterError(t.value.charAt(t.index))},e}(_f),Nf=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),zf(this,{name:"Code 128 A",states:["A"]})},e}(Hf),Uf=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),zf(this,{name:"Code 128 B",states:["B"]})},e}(Hf),Gf=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),zf(this,{name:"Code 128 C",states:["C"]})},e}(Hf),Wf=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),zf(this,{name:"Code 128",states:["C","B","A","FNC4"]})},e}(Hf),Xf=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),zf(this,{name:"Code GS1-128",states:["FNC1","C","B"]})},e}(Hf);function Yf(t,e,i){return t.substring(e,e+i)}var qf=Object.assign,Zf=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),qf(this,{characterMap:["12121212","12121221","12122112","12122121","12211212","12211221","12212112","12212121","21121212","21121221"],START:"21",STOP:"121",checkSumType:"",checkSums:tg})},e.prototype.initValue=function(t,e){this.pattern=[],this.value=t,this.checkSumLength=0,this.width=e},e.prototype.setBaseUnit=function(){this.baseUnit=this.width/(12*(this.value.length+this.checkSumLength)+this.quietZoneLength+7)},e.prototype.addData=function(){var t=this.value;this.addPattern(this.START);for(var e=0;e<t.length;e++)this.addCharacter(t.charAt(e));this.options.addCheckSum&&this.addCheckSum(),this.addPattern(this.STOP),this.setBaseUnit()},e.prototype.addCharacter=function(t){var e=this.characterMap[t];e||this.invalidCharacterError(t),this.addPattern(e)},e.prototype.addPattern=function(t){for(var e=0;e<t.length;e++)this.pattern.push(parseInt(t.charAt(e),10))},e.prototype.addCheckSum=function(){var t=this.checkSums[this.checkSumType].call(this.checkSums,this.value);this.checksum=t.join("");for(var e=0;e<t.length;e++)this.checkSumLength++,this.addPattern(this.characterMap[t[e]])},e}(_f),Qf=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),qf(this,{name:"MSI Modulo10",checkSumType:"Modulo10"})},e}(Zf),Kf=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),qf(this,{name:"MSI Modulo11",checkSumType:"Modulo11"})},e}(Zf),$f=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),qf(this,{name:"MSI Modulo10 Modulo10",checkSumType:"Modulo10Modulo10"})},e}(Zf),Jf=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),qf(this,{name:"MSI Modulo11 Modulo10",checkSumType:"Modulo11Modulo10"})},e}(Zf),tg={Modulo10:function(t){var e,i,o,r=[0,""],n=t.length%2;for(e=0;e<t.length;e++)r[(e+n)%2]+=parseInt(t.charAt(e),10);for(o=r[0],i=(2*r[1]).toString(),e=0;e<i.length;e++)o+=parseInt(i.charAt(e),10);return[(10-o%10)%10]},Modulo11:function(t){for(var e,i=0,o=t.length,r=0;r<o;r++)i+=(((o-r)%6||6)+1)*t.charAt(r);return 10!=(e=(11-i%11)%11)?[e]:[1,0]},Modulo11Modulo10:function(t){var e,i=this.Modulo11(t);return e=t+i[0],i.concat(this.Modulo10(e))},Modulo10Modulo10:function(t){var e,i=this.Modulo10(t);return e=t+i[0],i.concat(this.Modulo10(e))}},eg=Object.assign,ig=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),eg(this,{name:"EAN 13",keyTable:["000000","001011","001101","001110","010011","011001","011100","010101","010110","011010"],characterMap:{digits:[[3,2,1,1],[2,2,2,1],[2,1,2,2],[1,4,1,1],[1,1,3,2],[1,2,3,1],[1,1,1,4],[1,3,1,2],[1,2,1,3],[3,1,1,2]],start:[1,1,1],middle:[1,1,1,1,1]}})},e.prototype.initValue=function(t,e,i){var o=String(t);if(12!==o.length||/\D/.test(o))throw new Error('The value of the "EAN13" encoding should be 12 symbols');this.pattern=[],this.options.height=i,this.baseUnit=e/(95+this.quietZoneLength),this.value=o,this.checksum=this.calculateChecksum(),this.leftKey=o[0],this.leftPart=o.substr(1,6),this.rightPart=o.substr(7)+this.checksum},e.prototype.addData=function(){this.addPieces(this.characterMap.start),this.addSide(this.leftPart,this.leftKey),this.addPieces(this.characterMap.middle),this.addSide(this.rightPart),this.addPieces(this.characterMap.start)},e.prototype.addSide=function(t,e){for(var i=0;i<t.length;i++)e&&parseInt(this.keyTable[e].charAt(i),10)?this.addPieces(Array.prototype.slice.call(this.characterMap.digits[t.charAt(i)]).reverse(),!0):this.addPieces(this.characterMap.digits[t.charAt(i)],!0)},e.prototype.addPieces=function(t,e){for(var i=0;i<t.length;i++)e?this.pattern.push({y1:0,y2:.95*this.options.height,width:t[i]}):this.pattern.push(t[i])},e.prototype.calculateChecksum=function(){for(var t=0,e=0,i=this.value.split("").reverse().join(""),o=0;o<i.length;o++)o%2?e+=parseInt(i.charAt(o),10):t+=parseInt(i.charAt(o),10);return(10-(3*t+e)%10)%10},e}(_f),og=Object.assign,rg=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),og(this,{name:"EAN 8"})},e.prototype.initValue=function(t,e,i){if(7!==t.length||/\D/.test(t))throw new Error("Invalid value provided");this.value=t,this.options.height=i,this.checksum=this.calculateChecksum(this.value),this.leftPart=this.value.substr(0,4),this.rightPart=this.value.substr(4)+this.checksum,this.pattern=[],this.baseUnit=e/(67+this.quietZoneLength)},e}(ig),ng={code11:kf,code39:Cf,code39extended:Tf,code93:Of,code93extended:Lf,code128:Wf,code128a:Nf,code128b:Uf,code128c:Gf};function sg(t,e){var i=t.style.display;"canvas"===e&&(t.style.display="block");var o={width:t.clientWidth,height:t.clientHeight};return t.style.display=i,o}ng["gs1-128"]=Xf,ng.msimod10=Qf,ng.msimod11=Kf,ng.msimod1010=$f,ng.msimod1110=Jf,ng.postnet=Ef,ng.ean8=rg,ng.ean13=ig;var ag=function(t,e,i){void 0===i&&(i=we),this.options=at({},this.options,e),this.element=t,this.onError=i,this._initElement(),this._initSurface(),this._setOptions(e),e&&jt(e.value)&&this.redraw()};ag.prototype.destroy=function(){this._destroySurface()},ag.prototype._initElement=function(){W(this.element,"k-barcode")},ag.prototype._initSurface=function(){var t=this.options,e=this.surface;e&&e.options.type===t.renderAs||(this._destroySurface(),this._initSurfaceElement(),this.surface=this._createSurface())},ag.prototype._createSurface=function(){return q.drawing.Surface.create(this.surfaceElement,{type:this.options.renderAs})},ag.prototype._destroySurface=function(){this.surface&&(this.surface.destroy(),this.surface=null,this._destroySurfaceElement())},ag.prototype._initSurfaceElement=function(){this.surfaceElement||(this.surfaceElement=document.createElement("div"),this.surfaceElement.style.position="relative",this.element.appendChild(this.surfaceElement))},ag.prototype._destroySurfaceElement=function(){this.surfaceElement&&this.surfaceElement.parentNode&&(this.surfaceElement.parentNode.removeChild(this.surfaceElement),this.surfaceElement=null)},ag.prototype.setOptions=function(t){this._setOptions(t),this._initSurface(),this.redraw()},ag.prototype.redraw=function(){var t=this._getSize();this.surface.clear(),this.surface.setSize({width:t.width,height:t.height}),this.createVisual(),this.surface.draw(this.visual)},ag.prototype.getSize=function(){return{width:this.element.offsetWidth,height:this.element.offsetHeight}},ag.prototype._resize=function(){this.redraw()},ag.prototype.createVisual=function(){this.visual=this._render()},ag.prototype._render=function(){var t,e,i=this.options,o=i.value,r=i.text,n=dt(r.margin),s=this._getSize(),a=i.border||{},p=this.encoding,l=new wi(0,0,s.width,s.height).unpad(a.width).unpad(i.padding),h=l.height(),c=new q.drawing.Group;this.contentBox=l,c.append(this._getBackground(s)),r.visible&&(h-=q.drawing.util.measureText(o,{font:r.font}).height+n.top+n.bottom);try{t=p.encode(o,l.width(),h)}catch(t){return this.onError(t),c}return r.visible&&(e=o,i.checksum&&jt(p.checksum)&&(e+=" "+p.checksum),c.append(this._getText(e))),this.barHeight=h,this._bandsGroup=this._getBands(t.pattern,t.baseUnit),c.append(this._bandsGroup),c},ag.prototype.exportVisual=function(){return this._render()},ag.prototype._getSize=function(){var t=sg(this.element,this.options.renderAs),e=new q.geometry.Size(300,100);return t.width>0&&(e.width=t.width),t.height>0&&(e.height=t.height),this.options.width&&(e.width=this.options.width),this.options.height&&(e.height=this.options.height),e},ag.prototype.value=function(t){if(!jt(t))return this.options.value;this.options.value=String(t),this.redraw()},ag.prototype._getBands=function(t,e){for(var i,o,r=this.contentBox,n=r.x1,s=new q.drawing.Group,a=0;a<t.length;a++){if(i=(o=pt(t[a])?t[a]:{width:t[a],y1:0,y2:this.barHeight}).width*e,a%2){var p=q.geometry.Rect.fromPoints(new q.geometry.Point(n,o.y1+r.y1),new q.geometry.Point(n+i,o.y2+r.y1)),l=q.drawing.Path.fromRect(p,{fill:{color:this.options.color},stroke:null});s.append(l)}n+=i}return s},ag.prototype._getBackground=function(t){var e=this.options,i=e.border||{},o=new wi(0,0,t.width,t.height).unpad(i.width/2);return q.drawing.Path.fromRect(o.toRect(),{fill:{color:e.background},stroke:{color:i.width?i.color:"",width:i.width,dashType:i.dashType}})},ag.prototype._getText=function(t){var e=this.options.text,i=this._textbox=new $i(t,{font:e.font,color:e.color,align:"center",vAlign:"bottom",margin:e.margin});return i.reflow(this.contentBox),i.renderVisual(),i.visual},ag.prototype._setOptions=function(t){if(this.type=(t.type||this.options.type).toLowerCase(),"upca"===this.type&&(this.type="ean13",t.value="0"+t.value),"upce"===this.type&&(this.type="ean8",t.value="0"+t.value),!ng[this.type])throw new Error("Encoding '"+this.type+"' is not supported.");this.encoding=new ng[this.type],this.options=at({},this.options,t)},te(ag,{name:"Barcode",renderAs:"svg",value:"",type:"code39",checksum:!1,width:0,height:0,color:"black",background:"white",text:{visible:!0,font:"16px Consolas, Monaco, Sans Mono, monospace, sans-serif",color:"black",margin:{top:0,bottom:0,left:0,right:0}},border:{width:0,dashType:"solid",color:"black"},padding:{top:0,bottom:0,left:0,right:0}});const pg=ag;var lg={width:500,height:100};const hg=function(t,e){if(void 0===e&&(e=lg),!t)throw new Error("Please specify barcode type to validate.");var i=t.toLowerCase(),o="";if("upca"===i?(i="ean13",o="0"):"upce"===i&&(i="ean8",o="0"),!ng[i])throw new Error("Encoding '"+t+"' is not supported.");return function(t,e,i){return function(o){try{t.encode(i+o,e.width,e.height)}catch(t){return{valid:!1,error:t}}return{valid:!0}}}(new ng[i],e,o)};var cg=Object.assign;function ug(t,e){for(var i=[],o=0;o<t.length;)i.push(t.substring(o,o+e)),o+=e;return i}function dg(t,e){var i=Number(t).toString(2);return i.length<e&&(i=new Array(e-i.length+1).join(0)+i),i}function fg(t){return parseInt(t,2)}var gg=function(t){this.matrix=t,this.row=t.length-1,this.column=t.length-1,this.startColumn=this.column,this.dir=-1,this.c=0};gg.prototype.move=function(){this.row+=this.dir*this.c,this.c^=1,this.column=this.startColumn-this.c},gg.prototype.getNextCell=function(){for(;void 0!==this.matrix[this.row][this.column];)this.move(),(this.row<0||this.row>=this.matrix.length)&&(this.dir=-this.dir,this.startColumn-=8!==this.startColumn?2:3,this.column=this.startColumn,this.row=this.dir<0?this.matrix.length-1:0);return{row:this.row,column:this.column}},gg.prototype.getNextRemainderCell=function(){if(this.move(),void 0===this.matrix[this.row][this.column])return{row:this.row,column:this.column}};var yg=function(t,e){this.dataString=t,this.version=e},vg="alphanumeric",mg=/^\d+/,xg="A-Z0-9 $%*+./:-",bg=new RegExp("^[A-Z $%*+./:-]+"),_g=new RegExp("^["+xg+"]+"),wg=new RegExp("^[^"+xg+"]+");function kg(t,e,i,o,r){var n,s,a=mg.exec(t),p=a?a[0]:"",l=bg.exec(t),h=l?l[0]:"",c=_g.exec(t),u=c?c[0]:"";return p&&(p.length>=e||t.length===p.length||p.length>=i&&!_g.test(t.charAt(p.length)))?(n="numeric",s=p):u&&(t.length===u.length||u.length>=o||r===vg)?(n=vg,s=p||h):(n="byte",s=u?u+wg.exec(t.substring(u.length))[0]:wg.exec(t)[0]),{mode:n,modeString:s}}var Ag=function(){this.initProperties()};Ag.prototype.initProperties=function(){cg(this,{modeIndicator:"",bitsInCharacterCount:[]})},Ag.prototype.getVersionIndex=function(t){return t<10?0:t>26?2:1},Ag.prototype.getBitsCharacterCount=function(t){return this.bitsInCharacterCount[this.getVersionIndex(t||40)]},Ag.prototype.getModeCountString=function(t,e){return this.modeIndicator+dg(t,this.getBitsCharacterCount(e))},Ag.prototype.encode=function(){},Ag.prototype.getStringBitsLength=function(){},Ag.prototype.getValue=function(){};var Sg=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),cg(this,{bitsInCharacterCount:[10,12,14],modeIndicator:"0001"})},e.prototype.getValue=function(t){return parseInt(t,10)},e.prototype.encode=function(t,e){var i,o=ug(t,3),r=this.getModeCountString(t.length,e);for(i=0;i<o.length-1;i++)r+=dg(o[i],10);return r+dg(o[i],1+3*o[i].length)},e.prototype.getStringBitsLength=function(t,e){var i=t%3;return 4+this.getBitsCharacterCount(e)+10*Math.floor(t/3)+3*i+(0===i?0:1)},e}(Ag),Cg=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),cg(this,{characters:{0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,G:16,H:17,I:18,J:19,K:20,L:21,M:22,N:23,O:24,P:25,Q:26,R:27,S:28,T:29,U:30,V:31,W:32,X:33,Y:34,Z:35," ":36,$:37,"%":38,"*":39,"+":40,"-":41,".":42,"/":43,":":44},bitsInCharacterCount:[9,11,13],modeIndicator:"0010"})},e.prototype.getValue=function(t){return this.characters[t]},e.prototype.encode=function(t,e){var i,o=ug(t,2),r=this.getModeCountString(t.length,e);for(i=0;i<o.length-1;i++)r+=dg(45*this.getValue(o[i].charAt(0))+this.getValue(o[i].charAt(1)),11);return r+dg(2===o[i].length?45*this.getValue(o[i].charAt(0))+this.getValue(o[i].charAt(1)):this.getValue(o[i].charAt(0)),1+5*o[i].length)},e.prototype.getStringBitsLength=function(t,e){return 4+this.getBitsCharacterCount(e)+11*Math.floor(t/2)+t%2*6},e}(Ag),Pg=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),cg(this,{bitsInCharacterCount:[8,16,16],modeIndicator:"0100"})},e.prototype.getValue=function(t){var e=t.charCodeAt(0);if(e<=127||160<=e&&e<=255)return e;throw new Error('Unsupported character in QR Code: "'+t+'".')},e.prototype.encode=function(t,e){for(var i=this.getModeCountString(t.length,e),o=0;o<t.length;o++)i+=dg(this.getValue(t.charAt(o)),8);return i},e.prototype.getStringBitsLength=function(t,e){return 4+this.getBitsCharacterCount(e)+8*t},e}(Ag),Tg={};Tg.numeric=new Sg,Tg.alphanumeric=new Cg,Tg.byte=new Pg;var Mg=[{L:{groups:[[1,19]],totalDataCodewords:19,errorCodewordsPerBlock:7},M:{groups:[[1,16]],totalDataCodewords:16,errorCodewordsPerBlock:10},Q:{groups:[[1,13]],totalDataCodewords:13,errorCodewordsPerBlock:13},H:{groups:[[1,9]],totalDataCodewords:9,errorCodewordsPerBlock:17}},{L:{groups:[[1,34]],totalDataCodewords:34,errorCodewordsPerBlock:10},M:{groups:[[1,28]],totalDataCodewords:28,errorCodewordsPerBlock:16},Q:{groups:[[1,22]],totalDataCodewords:22,errorCodewordsPerBlock:22},H:{groups:[[1,16]],totalDataCodewords:16,errorCodewordsPerBlock:28}},{L:{groups:[[1,55]],totalDataCodewords:55,errorCodewordsPerBlock:15},M:{groups:[[1,44]],totalDataCodewords:44,errorCodewordsPerBlock:26},Q:{groups:[[2,17]],totalDataCodewords:34,errorCodewordsPerBlock:18},H:{groups:[[2,13]],totalDataCodewords:26,errorCodewordsPerBlock:22}},{L:{groups:[[1,80]],totalDataCodewords:80,errorCodewordsPerBlock:20},M:{groups:[[2,32]],totalDataCodewords:64,errorCodewordsPerBlock:18},Q:{groups:[[2,24]],totalDataCodewords:48,errorCodewordsPerBlock:26},H:{groups:[[4,9]],totalDataCodewords:36,errorCodewordsPerBlock:16}},{L:{groups:[[1,108]],totalDataCodewords:108,errorCodewordsPerBlock:26},M:{groups:[[2,43]],totalDataCodewords:86,errorCodewordsPerBlock:24},Q:{groups:[[2,15],[2,16]],totalDataCodewords:62,errorCodewordsPerBlock:18},H:{groups:[[2,11],[2,12]],totalDataCodewords:46,errorCodewordsPerBlock:22}},{L:{groups:[[2,68]],totalDataCodewords:136,errorCodewordsPerBlock:18},M:{groups:[[4,27]],totalDataCodewords:108,errorCodewordsPerBlock:16},Q:{groups:[[4,19]],totalDataCodewords:76,errorCodewordsPerBlock:24},H:{groups:[[4,15]],totalDataCodewords:60,errorCodewordsPerBlock:28}},{L:{groups:[[2,78]],totalDataCodewords:156,errorCodewordsPerBlock:20},M:{groups:[[4,31]],totalDataCodewords:124,errorCodewordsPerBlock:18},Q:{groups:[[2,14],[4,15]],totalDataCodewords:88,errorCodewordsPerBlock:18},H:{groups:[[4,13],[1,14]],totalDataCodewords:66,errorCodewordsPerBlock:26}},{L:{groups:[[2,97]],totalDataCodewords:194,errorCodewordsPerBlock:24},M:{groups:[[2,38],[2,39]],totalDataCodewords:154,errorCodewordsPerBlock:22},Q:{groups:[[4,18],[2,19]],totalDataCodewords:110,errorCodewordsPerBlock:22},H:{groups:[[4,14],[2,15]],totalDataCodewords:86,errorCodewordsPerBlock:26}},{L:{groups:[[2,116]],totalDataCodewords:232,errorCodewordsPerBlock:30},M:{groups:[[3,36],[2,37]],totalDataCodewords:182,errorCodewordsPerBlock:22},Q:{groups:[[4,16],[4,17]],totalDataCodewords:132,errorCodewordsPerBlock:20},H:{groups:[[4,12],[4,13]],totalDataCodewords:100,errorCodewordsPerBlock:24}},{L:{groups:[[2,68],[2,69]],totalDataCodewords:274,errorCodewordsPerBlock:18},M:{groups:[[4,43],[1,44]],totalDataCodewords:216,errorCodewordsPerBlock:26},Q:{groups:[[6,19],[2,20]],totalDataCodewords:154,errorCodewordsPerBlock:24},H:{groups:[[6,15],[2,16]],totalDataCodewords:122,errorCodewordsPerBlock:28}},{L:{groups:[[4,81]],totalDataCodewords:324,errorCodewordsPerBlock:20},M:{groups:[[1,50],[4,51]],totalDataCodewords:254,errorCodewordsPerBlock:30},Q:{groups:[[4,22],[4,23]],totalDataCodewords:180,errorCodewordsPerBlock:28},H:{groups:[[3,12],[8,13]],totalDataCodewords:140,errorCodewordsPerBlock:24}},{L:{groups:[[2,92],[2,93]],totalDataCodewords:370,errorCodewordsPerBlock:24},M:{groups:[[6,36],[2,37]],totalDataCodewords:290,errorCodewordsPerBlock:22},Q:{groups:[[4,20],[6,21]],totalDataCodewords:206,errorCodewordsPerBlock:26},H:{groups:[[7,14],[4,15]],totalDataCodewords:158,errorCodewordsPerBlock:28}},{L:{groups:[[4,107]],totalDataCodewords:428,errorCodewordsPerBlock:26},M:{groups:[[8,37],[1,38]],totalDataCodewords:334,errorCodewordsPerBlock:22},Q:{groups:[[8,20],[4,21]],totalDataCodewords:244,errorCodewordsPerBlock:24},H:{groups:[[12,11],[4,12]],totalDataCodewords:180,errorCodewordsPerBlock:22}},{L:{groups:[[3,115],[1,116]],totalDataCodewords:461,errorCodewordsPerBlock:30},M:{groups:[[4,40],[5,41]],totalDataCodewords:365,errorCodewordsPerBlock:24},Q:{groups:[[11,16],[5,17]],totalDataCodewords:261,errorCodewordsPerBlock:20},H:{groups:[[11,12],[5,13]],totalDataCodewords:197,errorCodewordsPerBlock:24}},{L:{groups:[[5,87],[1,88]],totalDataCodewords:523,errorCodewordsPerBlock:22},M:{groups:[[5,41],[5,42]],totalDataCodewords:415,errorCodewordsPerBlock:24},Q:{groups:[[5,24],[7,25]],totalDataCodewords:295,errorCodewordsPerBlock:30},H:{groups:[[11,12],[7,13]],totalDataCodewords:223,errorCodewordsPerBlock:24}},{L:{groups:[[5,98],[1,99]],totalDataCodewords:589,errorCodewordsPerBlock:24},M:{groups:[[7,45],[3,46]],totalDataCodewords:453,errorCodewordsPerBlock:28},Q:{groups:[[15,19],[2,20]],totalDataCodewords:325,errorCodewordsPerBlock:24},H:{groups:[[3,15],[13,16]],totalDataCodewords:253,errorCodewordsPerBlock:30}},{L:{groups:[[1,107],[5,108]],totalDataCodewords:647,errorCodewordsPerBlock:28},M:{groups:[[10,46],[1,47]],totalDataCodewords:507,errorCodewordsPerBlock:28},Q:{groups:[[1,22],[15,23]],totalDataCodewords:367,errorCodewordsPerBlock:28},H:{groups:[[2,14],[17,15]],totalDataCodewords:283,errorCodewordsPerBlock:28}},{L:{groups:[[5,120],[1,121]],totalDataCodewords:721,errorCodewordsPerBlock:30},M:{groups:[[9,43],[4,44]],totalDataCodewords:563,errorCodewordsPerBlock:26},Q:{groups:[[17,22],[1,23]],totalDataCodewords:397,errorCodewordsPerBlock:28},H:{groups:[[2,14],[19,15]],totalDataCodewords:313,errorCodewordsPerBlock:28}},{L:{groups:[[3,113],[4,114]],totalDataCodewords:795,errorCodewordsPerBlock:28},M:{groups:[[3,44],[11,45]],totalDataCodewords:627,errorCodewordsPerBlock:26},Q:{groups:[[17,21],[4,22]],totalDataCodewords:445,errorCodewordsPerBlock:26},H:{groups:[[9,13],[16,14]],totalDataCodewords:341,errorCodewordsPerBlock:26}},{L:{groups:[[3,107],[5,108]],totalDataCodewords:861,errorCodewordsPerBlock:28},M:{groups:[[3,41],[13,42]],totalDataCodewords:669,errorCodewordsPerBlock:26},Q:{groups:[[15,24],[5,25]],totalDataCodewords:485,errorCodewordsPerBlock:30},H:{groups:[[15,15],[10,16]],totalDataCodewords:385,errorCodewordsPerBlock:28}},{L:{groups:[[4,116],[4,117]],totalDataCodewords:932,errorCodewordsPerBlock:28},M:{groups:[[17,42]],totalDataCodewords:714,errorCodewordsPerBlock:26},Q:{groups:[[17,22],[6,23]],totalDataCodewords:512,errorCodewordsPerBlock:28},H:{groups:[[19,16],[6,17]],totalDataCodewords:406,errorCodewordsPerBlock:30}},{L:{groups:[[2,111],[7,112]],totalDataCodewords:1006,errorCodewordsPerBlock:28},M:{groups:[[17,46]],totalDataCodewords:782,errorCodewordsPerBlock:28},Q:{groups:[[7,24],[16,25]],totalDataCodewords:568,errorCodewordsPerBlock:30},H:{groups:[[34,13]],totalDataCodewords:442,errorCodewordsPerBlock:24}},{L:{groups:[[4,121],[5,122]],totalDataCodewords:1094,errorCodewordsPerBlock:30},M:{groups:[[4,47],[14,48]],totalDataCodewords:860,errorCodewordsPerBlock:28},Q:{groups:[[11,24],[14,25]],totalDataCodewords:614,errorCodewordsPerBlock:30},H:{groups:[[16,15],[14,16]],totalDataCodewords:464,errorCodewordsPerBlock:30}},{L:{groups:[[6,117],[4,118]],totalDataCodewords:1174,errorCodewordsPerBlock:30},M:{groups:[[6,45],[14,46]],totalDataCodewords:914,errorCodewordsPerBlock:28},Q:{groups:[[11,24],[16,25]],totalDataCodewords:664,errorCodewordsPerBlock:30},H:{groups:[[30,16],[2,17]],totalDataCodewords:514,errorCodewordsPerBlock:30}},{L:{groups:[[8,106],[4,107]],totalDataCodewords:1276,errorCodewordsPerBlock:26},M:{groups:[[8,47],[13,48]],totalDataCodewords:1e3,errorCodewordsPerBlock:28},Q:{groups:[[7,24],[22,25]],totalDataCodewords:718,errorCodewordsPerBlock:30},H:{groups:[[22,15],[13,16]],totalDataCodewords:538,errorCodewordsPerBlock:30}},{L:{groups:[[10,114],[2,115]],totalDataCodewords:1370,errorCodewordsPerBlock:28},M:{groups:[[19,46],[4,47]],totalDataCodewords:1062,errorCodewordsPerBlock:28},Q:{groups:[[28,22],[6,23]],totalDataCodewords:754,errorCodewordsPerBlock:28},H:{groups:[[33,16],[4,17]],totalDataCodewords:596,errorCodewordsPerBlock:30}},{L:{groups:[[8,122],[4,123]],totalDataCodewords:1468,errorCodewordsPerBlock:30},M:{groups:[[22,45],[3,46]],totalDataCodewords:1128,errorCodewordsPerBlock:28},Q:{groups:[[8,23],[26,24]],totalDataCodewords:808,errorCodewordsPerBlock:30},H:{groups:[[12,15],[28,16]],totalDataCodewords:628,errorCodewordsPerBlock:30}},{L:{groups:[[3,117],[10,118]],totalDataCodewords:1531,errorCodewordsPerBlock:30},M:{groups:[[3,45],[23,46]],totalDataCodewords:1193,errorCodewordsPerBlock:28},Q:{groups:[[4,24],[31,25]],totalDataCodewords:871,errorCodewordsPerBlock:30},H:{groups:[[11,15],[31,16]],totalDataCodewords:661,errorCodewordsPerBlock:30}},{L:{groups:[[7,116],[7,117]],totalDataCodewords:1631,errorCodewordsPerBlock:30},M:{groups:[[21,45],[7,46]],totalDataCodewords:1267,errorCodewordsPerBlock:28},Q:{groups:[[1,23],[37,24]],totalDataCodewords:911,errorCodewordsPerBlock:30},H:{groups:[[19,15],[26,16]],totalDataCodewords:701,errorCodewordsPerBlock:30}},{L:{groups:[[5,115],[10,116]],totalDataCodewords:1735,errorCodewordsPerBlock:30},M:{groups:[[19,47],[10,48]],totalDataCodewords:1373,errorCodewordsPerBlock:28},Q:{groups:[[15,24],[25,25]],totalDataCodewords:985,errorCodewordsPerBlock:30},H:{groups:[[23,15],[25,16]],totalDataCodewords:745,errorCodewordsPerBlock:30}},{L:{groups:[[13,115],[3,116]],totalDataCodewords:1843,errorCodewordsPerBlock:30},M:{groups:[[2,46],[29,47]],totalDataCodewords:1455,errorCodewordsPerBlock:28},Q:{groups:[[42,24],[1,25]],totalDataCodewords:1033,errorCodewordsPerBlock:30},H:{groups:[[23,15],[28,16]],totalDataCodewords:793,errorCodewordsPerBlock:30}},{L:{groups:[[17,115]],totalDataCodewords:1955,errorCodewordsPerBlock:30},M:{groups:[[10,46],[23,47]],totalDataCodewords:1541,errorCodewordsPerBlock:28},Q:{groups:[[10,24],[35,25]],totalDataCodewords:1115,errorCodewordsPerBlock:30},H:{groups:[[19,15],[35,16]],totalDataCodewords:845,errorCodewordsPerBlock:30}},{L:{groups:[[17,115],[1,116]],totalDataCodewords:2071,errorCodewordsPerBlock:30},M:{groups:[[14,46],[21,47]],totalDataCodewords:1631,errorCodewordsPerBlock:28},Q:{groups:[[29,24],[19,25]],totalDataCodewords:1171,errorCodewordsPerBlock:30},H:{groups:[[11,15],[46,16]],totalDataCodewords:901,errorCodewordsPerBlock:30}},{L:{groups:[[13,115],[6,116]],totalDataCodewords:2191,errorCodewordsPerBlock:30},M:{groups:[[14,46],[23,47]],totalDataCodewords:1725,errorCodewordsPerBlock:28},Q:{groups:[[44,24],[7,25]],totalDataCodewords:1231,errorCodewordsPerBlock:30},H:{groups:[[59,16],[1,17]],totalDataCodewords:961,errorCodewordsPerBlock:30}},{L:{groups:[[12,121],[7,122]],totalDataCodewords:2306,errorCodewordsPerBlock:30},M:{groups:[[12,47],[26,48]],totalDataCodewords:1812,errorCodewordsPerBlock:28},Q:{groups:[[39,24],[14,25]],totalDataCodewords:1286,errorCodewordsPerBlock:30},H:{groups:[[22,15],[41,16]],totalDataCodewords:986,errorCodewordsPerBlock:30}},{L:{groups:[[6,121],[14,122]],totalDataCodewords:2434,errorCodewordsPerBlock:30},M:{groups:[[6,47],[34,48]],totalDataCodewords:1914,errorCodewordsPerBlock:28},Q:{groups:[[46,24],[10,25]],totalDataCodewords:1354,errorCodewordsPerBlock:30},H:{groups:[[2,15],[64,16]],totalDataCodewords:1054,errorCodewordsPerBlock:30}},{L:{groups:[[17,122],[4,123]],totalDataCodewords:2566,errorCodewordsPerBlock:30},M:{groups:[[29,46],[14,47]],totalDataCodewords:1992,errorCodewordsPerBlock:28},Q:{groups:[[49,24],[10,25]],totalDataCodewords:1426,errorCodewordsPerBlock:30},H:{groups:[[24,15],[46,16]],totalDataCodewords:1096,errorCodewordsPerBlock:30}},{L:{groups:[[4,122],[18,123]],totalDataCodewords:2702,errorCodewordsPerBlock:30},M:{groups:[[13,46],[32,47]],totalDataCodewords:2102,errorCodewordsPerBlock:28},Q:{groups:[[48,24],[14,25]],totalDataCodewords:1502,errorCodewordsPerBlock:30},H:{groups:[[42,15],[32,16]],totalDataCodewords:1142,errorCodewordsPerBlock:30}},{L:{groups:[[20,117],[4,118]],totalDataCodewords:2812,errorCodewordsPerBlock:30},M:{groups:[[40,47],[7,48]],totalDataCodewords:2216,errorCodewordsPerBlock:28},Q:{groups:[[43,24],[22,25]],totalDataCodewords:1582,errorCodewordsPerBlock:30},H:{groups:[[10,15],[67,16]],totalDataCodewords:1222,errorCodewordsPerBlock:30}},{L:{groups:[[19,118],[6,119]],totalDataCodewords:2956,errorCodewordsPerBlock:30},M:{groups:[[18,47],[31,48]],totalDataCodewords:2334,errorCodewordsPerBlock:28},Q:{groups:[[34,24],[34,25]],totalDataCodewords:1666,errorCodewordsPerBlock:30},H:{groups:[[20,15],[61,16]],totalDataCodewords:1276,errorCodewordsPerBlock:30}}];function Og(t,e){var i=0,o=Mg.length-1,r=Math.floor(Mg.length/2);do{t<Mg[r][e].totalDataCodewords?o=r:i=r,r=i+Math.floor((o-i)/2)}while(o-i>1);return t<=Mg[i][e].totalDataCodewords?r+1:o+1}var Lg=function(){};Lg.prototype.getEncodingResult=function(t,e){var i=function(t){var e,i=[],o=0,r=t;for(i.push(kg(r,8,5,8,e)),e=i[0].mode,r=r.substr(i[0].modeString.length);r.length>0;){var n=kg(r,17,9,16,e);n.mode!==e?(e=n.mode,i.push(n),o++):i[o].modeString+=n.modeString,r=r.substr(n.modeString.length)}return i}(t),o=function(t){for(var e=0,i=0;i<t.length;i++)e+=Tg[t[i].mode].getStringBitsLength(t[i].modeString.length);return Math.ceil(e/8)}(i),r=Og(o,e),n=function(t,e){for(var i="",o=0;o<t.length;o++)i+=Tg[t[o].mode].encode(t[o].modeString,e);return i}(i,r);return new yg(n,r)};var Bg=function(t){void 0===t&&(t={}),this.includeBOM=void 0===t.includeBOM||t.includeBOM,this.initProperties(),this.mode=Tg[this.encodingMode]};Bg.prototype.initProperties=function(){cg(this,{encodingMode:"byte",utfBOM:"111011111011101110111111",initialModeCountStringLength:20,ranges:[128,2048,65536,2097152,67108864]})},Bg.prototype.getEncodingResult=function(t,e){var i=this.encode(t),o=Og(this.getDataCodewordsCount(i),e),r=this.mode.getModeCountString(i.length/8,o)+i;return new yg(r,o)},Bg.prototype.getDataCodewordsCount=function(t){var e=t.length;return Math.ceil((this.initialModeCountStringLength+e)/8)},Bg.prototype.encode=function(t){for(var e=this.includeBOM?this.utfBOM:"",i=0;i<t.length;i++)e+=this.encodeCharacter(t.charCodeAt(i));return e},Bg.prototype.encodeCharacter=function(t){var e=this.getBytesCount(t),i=e-1,o="";if(1===e)o=dg(t,8);else{for(var r=8-e,n=0;n<i;n++)o=dg(t>>6*n&63|128,8)+o;o=(t>>6*i|255>>r<<r).toString(2)+o}return o},Bg.prototype.getBytesCount=function(t){for(var e=this.ranges,i=0;i<e.length;i++)if(t<e[i])return i+1};var Ig={1:0},Eg={0:1},Rg={15:20,16:20,18:24,19:24,22:20,24:22,26:24,28:20,30:20,31:24,32:28,33:24,36:18,37:22,39:20,40:24},Vg=[1,0,1,1,1],zg=[1,0,1],jg={L:"01",M:"00",Q:"11",H:"10"},Dg=["11101100","00010001"],Fg=[function(t,e){return(t+e)%2==0},function(t,e){return t%2==0},function(t,e){return e%3==0},function(t,e){return(t+e)%3==0},function(t,e){return(Math.floor(t/2)+Math.floor(e/3))%2==0},function(t,e){return t*e%2+t*e%3==0},function(t,e){return(t*e%2+t*e%3)%2==0},function(t,e){return((t+e)%2+t*e%3)%2==0}],Hg=[[1,0],[1,25,0]];function Ng(t,e,i,o){for(var r=0;r<t.length;r++)t[r][i][o]=e}function Ug(t,e,i,o){for(var r=0;r<Fg.length;r++)t[r][i][o]=Fg[r](i,o)?1^e:parseInt(e,10)}function Gg(t,e){for(var i=[],o=t.length-2;o>=0;o--)i[o]=t[o]^e[o];return i}function Wg(t,e){for(var i=[],o=0;o<t.length;o++)for(var r=0;r<e.length;r++)void 0===i[o+r]?i[o+r]=(t[o]+(e[r]>=0?e[r]:0))%255:i[o+r]=Ig[Eg[i[o+r]]^Eg[(t[o]+e[r])%255]];return i}function Xg(t,e){var i=[],o=t.length-1;do{i[o]=Eg[(t[o]+e)%255],o--}while(void 0!==t[o]);return i}function Yg(t,e){var i,o,r=Hg[e-1],n=new Array(e).concat(t),s=new Array(n.length-r.length).concat(r),a=t.length,p=[];for(o=0;o<a;o++)i=Xg(s,Ig[n[n.length-1]]),s.splice(0,1),n=Gg(i,n);for(o=n.length-1;o>=0;o--)p[e-1-o]=dg(n[o],8);return p}function qg(t,e,i){var o=fg(e),r=e.length-1,n=t<<r,s=dg(t,i-r),a=function(t,e){var i=e.toString(2).length,o=t.toString(2).length,r=t;do{o=(r^=e<<o-i).toString(2).length}while(o>=i);return r}(n,o);return s+dg(a,r)}function Zg(t,e){return parseInt(t.charAt(e),10)}function Qg(t,e){var i,o,r=t[0],n=0,s=e.length;for(i=0,o=8;i<=8;i++)6!==i&&Ng(t,Zg(e,s-1-n++),i,o);for(i=8,o=7;o>=0;o--)6!==o&&Ng(t,Zg(e,s-1-n++),i,o);for(n=0,o=r.length-1,i=8;o>=r.length-8;o--)Ng(t,Zg(e,s-1-n++),i,o);for(Ng(t,1,r.length-8,8),i=r.length-7,o=8;i<r.length;i++)Ng(t,Zg(e,s-1-n++),i,o)}function Kg(t,e){for(var i,o,r,n=t[0].length,s=n-11,a=n-11,p=0;p<e.length;p++)i=Math.floor(p/3),o=p%3,Ng(t,r=Zg(e,e.length-p-1),0+i,s+o),Ng(t,r,a+o,0+i)}function $g(t,e,i,o){for(var r,n=e.length+2,s=e.length+1,a=0;a<e.length;a++)for(var p=a;p<n-a;p++)Ng(t,r=e[a],i+p,o+a),Ng(t,r,i+a,o+p),Ng(t,r,i+s-p,o+s-a),Ng(t,r,i+s-a,o+s-p)}function Jg(t,e,i,o){var r=i,n=o,s=t[0];do{Ng(t,0,r,o),Ng(t,0,i,n),r+=e[0],n+=e[1]}while(r>=0&&r<s.length)}function ty(t,e,i,o,r){e[t][o]=(e[t][o]<<1^r)%128,93===e[t][o]&&(i[t]+=40)}function ey(t,e,i,o,r,n){i[t][n]===o?r[t][n]++:(i[t][n]=o,r[t][n]>=5&&(e[t]+=3+r[t][n]-5),r[t][n]=1)}function iy(t,e){var i=Math.floor(t/e*100),o=i%5,r=Math.abs(i-o-50),n=Math.abs(i+5-o-50);return 10*Math.min(r/5,n/5)}function oy(t,e,i){var o=function(t){if(t&&t.toLowerCase().indexOf("utf_8")>=0){var e=t.toLowerCase().indexOf("no_bom")<0;return new Bg({includeBOM:e})}return new Lg}(i),r=o.getEncodingResult(t,e),n=r.version,s=Mg[n-1][e],a=function(t,e){for(var i,o,r,n,s,a=0,p=[],l=[],h=e.groups,c=0;c<h.length;c++){r=h[c][0];for(var u=0;u<r;u++){o=h[c][1],i=[],n=[];for(var d=1;d<=o;d++)s=t.substring(a,a+8),i.push(s),n[o-d]=fg(s),a+=8;p.push(i),l.push(Yg(n,e.errorCodewordsPerBlock))}}return[p,l]}(function(t,e){for(var i=8*e,o=0,r=0,n=t;n.length<i&&o<4;)n+="0000".charAt(o++);for(n.length%8!=0&&(n+=new Array(9-n.length%8).join("0"));n.length<i;)n+=Dg[r],r^=1;return n}(r.dataString,s.totalDataCodewords),s),p=function(t){for(var e=[],i=17+4*t,o=0;o<Fg.length;o++){e[o]=new Array(i);for(var r=0;r<i;r++)e[o][r]=new Array(i)}return e}(n);!function(t){var e=t[0].length;$g(t,Vg,0,0),Jg(t,[-1,-1],7,7),$g(t,Vg,e-7,0),Jg(t,[1,-1],e-8,7),$g(t,Vg,0,e-7),Jg(t,[-1,1],7,e-8)}(p),function(t,e){if(!(e<2)){var i,o,r=t[0],n=r.length,s=Math.floor(e/7),a=[6],p=0;for((i=Rg[e])?o=(n-13-i)/s:i=o=(n-13)/(s+1),a.push(a[p++]+i);a[p]+o<n;)a.push(a[p++]+o);for(var l=0;l<a.length;l++)for(var h=0;h<a.length;h++)void 0===r[a[l]][a[h]]&&$g(t,zg,a[l]-2,a[h]-2)}}(p,n),function(t){for(var e=1,i=t[0].length,o=8;o<i-8;o++)Ng(t,e,6,o),Ng(t,e,o,6),e^=1}(p),n>=7&&Kg(p,dg(0,18)),Qg(p,dg(0,15)),function(t,e){for(var i,o,r,n=new gg(t[0]),s=0;s<e.length;s++)for(i=e[s],o=0;i.length>0;){for(var a=0;a<i.length;a++)for(var p=0;p<8;p++)r=n.getNextCell(),Ug(t,i[a][o].charAt(p),r.row,r.column);for(o++;i[0]&&o===i[0].length;)i.splice(0,1)}for(;r=n.getNextRemainderCell();)Ug(t,0,r.row,r.column)}(p,a);var l=function(t){var e,i,o=[],r=[],n=[],s=[],a=[],p=t[0].length;for(i=0;i<t.length;i++)o[i]=0,n[i]=0,a[i]=[0,0],s[i]=[0,0],r[i]=[];for(var l=0;l<p;l++)for(var h=0;h<p;h++)for(var c=0;c<t.length;c++)e=t[c],n[c]+=parseInt(e[l][h],10),r[c][0]===e[l][h]&&l+1<p&&h-1>=0&&e[l+1][h]===r[c][0]&&e[l+1][h-1]===r[c][0]&&(o[c]+=3),ty(c,s,o,0,e[l][h]),ty(c,s,o,1,e[h][l]),ey(c,o,r,e[l][h],a,0),ey(c,o,r,e[h][l],a,1);var u,d=p*p,f=Number.MAX_VALUE;for(i=0;i<o.length;i++)o[i]+=iy(n[i],d),o[i]<f&&(f=o[i],u=i);return u}(p),h=p[l];return n>=7&&Kg([h],function(t){return qg(t,"1111100100101",18)}(n)),Qg([h],function(t){var e,i="";if(0===fg(t))return"101010000010010";e=qg(fg(t),"10100110111",15);for(var o=0;o<e.length;o++)i+=e.charAt(o)^"101010000010010".charAt(o);return i}(jg[e]+dg(l,3))),h}!function(){var t,e;for(e=1;e<255;e++)(t=2*Eg[e-1])>255&&(t^=285),Eg[e]=t,Ig[t]=e;t=2*Eg[e-1]^285,Eg[e]=t,Eg[-1]=0}(),function(){for(var t=2;t<=68;t++){var e=Hg[t-1],i=[t,0];Hg[t]=Wg(e,i)}}();var ry=Math.round,ny=[[0,1],[1,1],[1,2],[2,2],[2,1],[3,1],[3,0],[2,0],[2,-1],[1,-1],[1,0]],sy=[[0,1],[1,1],[1,0]],ay=function(t,e,i){void 0===i&&(i=we),this.options=at({},this.options,e),this.element=t,this.wrapper=this.element,this.onError=i,this._initElement(),this._initSurface(),this.setOptions(e)};ay.prototype.destroy=function(){this._destroySurface()},ay.prototype._initElement=function(){W(this.element,"k-qrcode")},ay.prototype._initSurface=function(){var t=this.options,e=this.surface;e&&e.options.type===t.renderAs||(this._destroySurface(),this._initSurfaceElement(),this.surface=this._createSurface())},ay.prototype._createSurface=function(){return q.drawing.Surface.create(this.surfaceElement,{type:this.options.renderAs})},ay.prototype._destroySurface=function(){this.surface&&(this.surface.destroy(),this.surface=null,this._destroySurfaceElement())},ay.prototype._initSurfaceElement=function(){this.surfaceElement||(this.surfaceElement=document.createElement("div"),this.surfaceElement.style.position="relative",this.element.appendChild(this.surfaceElement))},ay.prototype._destroySurfaceElement=function(){this.surfaceElement&&this.surfaceElement.parentNode&&(this.surfaceElement.parentNode.removeChild(this.surfaceElement),this.surfaceElement=null)},ay.prototype.redraw=function(){var t=this._getSize();this.surface.clear(),this.surface.setSize({width:t,height:t}),this.createVisual(),this.surface.draw(this.visual)},ay.prototype.getSize=function(){var t=this.element,e=t.clientWidth,i=t.clientHeight,o={width:0,height:0};return e>0&&(o.width=e),i&&(o.height=i),o},ay.prototype._resize=function(){this.redraw()},ay.prototype.createVisual=function(){this.visual=this._render()},ay.prototype.exportVisual=function(){return this._render()},ay.prototype._render=function(){var t,e,i,o,r,n=this._value,s=this.options.border||{},a=this.options.padding||0,p=s.width||0;s.width=p;var l=new q.drawing.Group;try{n&&(i=oy(n,this.options.errorCorrection,this.options.encoding),r=(o=this._getSize())-2*(p+a),t=this._calculateBaseUnit(r,i.length),e=p+a+(r-i.length*t)/2,l.append(this._renderBackground(o,s)),l.append(this._renderMatrix(i,t,e)),this._hasCustomLogo()?l.append(this._renderLogo(o,t)):this._isSwiss()&&l.append(this._renderSwissCode(o,t)))}catch(t){this.onError(t)}return l},ay.prototype._renderLogo=function(t,e){var i,o=ry(t/2),r=this._getLogoSize(7*e),n=this.options.overlay.imageUrl,s={x:o-r.width/2,y:o-r.height/2};return i=new q.geometry.Rect(new q.geometry.Point(s.x,s.y),new q.geometry.Size(r.width,r.height)),new q.drawing.Image(n,i)},ay.prototype._renderSwissCode=function(t,e){var i=this._getLogoSize(7*e),o=(i=Math.max(i.width,i.height))/4,r=o/2,n=t/2,s={},a=new q.drawing.Group;return s.x=s.y=Math.ceil(n-e-i/2),a.append(this._renderShape(s,Math.ceil(i+2*e),sy,"#fff")),s.x=s.y=n-i/2,a.append(this._renderShape(s,i,sy,this.options.color)),s.x=n+r-i/2,s.y=n+r+o-i/2,a.append(this._renderShape(s,o,ny,"#fff")),a},ay.prototype._renderShape=function(t,e,i,o){var r=new q.drawing.MultiPath({fill:{color:o},stroke:null});r.moveTo(t.x,t.y);for(var n=0;n<i.length;n++)r.lineTo(t.x+e*i[n][0],t.y+e*i[n][1]);return r.close(),r},ay.prototype._getSize=function(){var t;if(this.options.size)t=parseInt(this.options.size,10);else{var e=sg(this.element,this.options.renderAs),i=Math.min(e.width,e.height);t=i>0?i:200}return t},ay.prototype._calculateBaseUnit=function(t,e){var i=Math.floor(t/e);if(i<1){var o=Math.ceil(1*e);this.onError(new Error("Insufficient size for QR Code: the current size is "+t+"px and the minimum size is "+o+"px."))}else i*e>=t&&i-1>=1&&i--;return i},ay.prototype._renderMatrix=function(t,e,i){for(var o=new q.drawing.MultiPath({fill:{color:this.options.color},stroke:null}),r=0;r<t.length;r++)for(var n=i+r*e,s=0;s<t.length;){for(;0===t[r][s]&&s<t.length;)s++;if(s<t.length){for(var a=s;1===t[r][s];)s++;var p=ry(i+a*e),l=ry(n),h=ry(i+s*e),c=ry(n+e);o.moveTo(p,l).lineTo(p,c).lineTo(h,c).lineTo(h,l).close()}}return o},ay.prototype._renderBackground=function(t,e){var i=new wi(0,0,t,t).unpad(e.width/2);return q.drawing.Path.fromRect(i.toRect(),{fill:{color:this.options.background},stroke:{color:e.color,width:e.width}})},ay.prototype.setOptions=function(t){var e=t||{};this.options=cg(this.options,e),void 0!==t.value&&(this._value=String(this.options.value)),this._initSurface(),this.redraw()},ay.prototype.value=function(t){if(void 0===t)return this._value;this._value=String(t),this.redraw()},ay.prototype._hasCustomLogo=function(){return Boolean(this.options.overlay.imageUrl)},ay.prototype._isSwiss=function(){return"swiss"===this.options.overlay.type},ay.prototype._getLogoSize=function(t){var e=this.options.overlay.width,i=this.options.overlay.height;return e||i?e&&!i?i=e:!e&&i&&(e=i):e=i=t,{width:e,height:i}},te(ay,{name:"QRCode",renderAs:"svg",encoding:"ISO_8859_1",value:"",errorCorrection:"L",background:"#fff",color:"#000",size:"",padding:0,border:{color:"",width:0},overlay:{type:"image",imageUrl:"",width:0,height:0}});const py=ay,ly=function(t){return void 0===t&&(t="ISO_8859_1"),function(e){try{oy(e,"L",t)}catch(t){return{valid:!1,error:t}}return{valid:!0}}};var hy={WGS84:{a:6378137,b:6356752.314245179,f:.0033528106647474805,e:.08181919084262149}};function cy(t){return t*t}var uy=Math,dy=uy.abs,fy=uy.atan,gy=uy.atan2,yy=uy.cos,vy=uy.sin,my=uy.tan,xy=function(t,e){this.initProperties(),1===arguments.length?(this.lat=t[0],this.lng=t[1]):(this.lat=t,this.lng=e)};xy.prototype.initProperties=function(){at(this,{DISTANCE_ITERATIONS:100,DISTANCE_CONVERGENCE:1e-12,DISTANCE_PRECISION:2,FORMAT:"{0:N6}{1:N6}"})},xy.prototype.toArray=function(){return[this.lat,this.lng]},xy.prototype.equals=function(t){return t&&t.lat===this.lat&&t.lng===this.lng},xy.prototype.clone=function(){return new xy(this.lat,this.lng)},xy.prototype.round=function(t){return this.lng=Zt(this.lng,t),this.lat=Zt(this.lat,t),this},xy.prototype.wrap=function(){return this.lng=this.lng%180,this.lat=this.lat%90,this},xy.prototype.distanceTo=function(t,e){return this.greatCircleTo(t,e).distance},xy.prototype.destination=function(t,e,i){var o=qt(e),r=i||hy.WGS84,n=qt(this.lat),s=qt(this.lng),a=t/r.a,p=uy.asin(vy(n)*yy(a)+yy(n)*vy(a)*yy(o)),l=s+gy(vy(o)*vy(a)*yy(n),yy(a)-vy(n)*vy(p));return new xy(Dt(p),Dt(l))},xy.prototype.greatCircleTo=function(t,e){var i=xy.create(i),o=e||hy.WGS84;if(!i||this.clone().round(8).equals(i.clone().round(8)))return{distance:0,azimuthFrom:0,azimuthTo:0};for(var r,n,s,a,p,l,h,c,u=o.a,d=o.b,f=o.f,g=qt(i.lng-this.lng),y=fy((1-f)*my(qt(this.lat))),v=vy(y),m=yy(y),x=fy((1-f)*my(qt(i.lat))),b=vy(x),_=yy(x),w=g,k=this.DISTANCE_ITERATIONS,A=!1;!A&&k-- >0;){n=vy(w),s=yy(w),a=uy.sqrt(cy(_*n)+cy(m*b-v*_*s)),c=gy(a,l=v*b+m*_*s);var S=m*_*n/a;h=0,0!=(p=1-cy(S))&&(h=l-2*v*b/p),r=w;var C=f/16*p*(4+f*(4-3*p));w=g+(1-C)*f*S*(c+C*a*(h+C*l*(2*cy(h)-1))),A=dy(w-r)<=this.DISTANCE_CONVERGENCE}var P=p*(cy(u)-cy(d))/cy(d),T=1+P/16384*(4096+P*(P*(320-175*P)-768)),M=P/1024*(256+P*(P*(74-47*P)-128)),O=M*a*(h+M/4*(l*(2*cy(h)-1)-M/6*h*(4*cy(a)-3)*(4*cy(h)-3))),L=gy(_*n,m*b-v*_*s),B=gy(m*n,-v*_+m*b*s);return{distance:Zt(d*T*(c-O),this.DISTANCE_PRECISION),azimuthFrom:Dt(L),azimuthTo:Dt(B)}},xy.prototype.toString=function(){return String(this.lat)+","+String(this.lng)},xy.fromLngLat=function(t){return new xy(t[1],t[0])},xy.fromLatLng=function(t){return new xy(t[0],t[1])},xy.create=function(t,e){if(jt(t))return t instanceof xy?t.clone():1===arguments.length&&2===t.length?xy.fromLatLng(t):new xy(t,e)};var by=Math,_y=by.atan,wy=by.exp,ky=by.pow,Ay=by.sin,Sy=by.log,Cy=by.tan,Py=q.geometry.Point,Ty=by.PI,My=Ty/2,Oy=Ty/4,Ly=Ty/180,By=hy.WGS84,Iy=function(t){this.initProperties(),this._initOptions(t)};Iy.prototype._initOptions=function(t){this.options=at({},this.options,t)},Iy.prototype.initProperties=function(){at(this,{MAX_LNG:180,MAX_LAT:85.0840590501,INVERSE_ITERATIONS:15,INVERSE_CONVERGENCE:1e-12})},Iy.prototype.forward=function(t,e){var i=this,o=i.options,r=o.datum.a,n=o.centralMeridian,s=Xt(t.lat,-i.MAX_LAT,i.MAX_LAT),a=e?Xt(t.lng,-i.MAX_LNG,i.MAX_LNG):t.lng,p=qt(a-n)*r,l=i._projectLat(s);return new Py(p,l)},Iy.prototype._projectLat=function(t){var e=this.options.datum,i=e.e,o=e.a,r=qt(t),n=Cy(Oy+r/2),s=i*Ay(r),a=ky((1-s)/(1+s),i/2);return o*Sy(n*a)},Iy.prototype.inverse=function(t,e){var i=this,o=i.options,r=o.datum.a,n=o.centralMeridian,s=t.x/(Ly*r)+n,a=Xt(i._inverseY(t.y),-i.MAX_LAT,i.MAX_LAT);return e&&(s=Xt(s,-i.MAX_LNG,i.MAX_LNG)),new xy(a,s)},Iy.prototype._inverseY=function(t){var e,i=this,o=i.options.datum,r=o.a,n=o.e,s=n/2,a=wy(-t/r),p=My-2*_y(a);for(e=0;e<=i.INVERSE_ITERATIONS;e++){var l=n*Ay(p),h=ky((1-l)/(1+l),s),c=My-2*_y(a*h)-p;if(p+=c,by.abs(c)<=i.INVERSE_CONVERGENCE)break}return Dt(p)},te(Iy,{centralMeridian:0,datum:By});var Ey=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),at(this,{MAX_LAT:85.0511287798})},e.prototype._projectLat=function(t){var e=this.options.datum.a,i=qt(t),o=Cy(Oy+i/2);return e*Sy(o)},e.prototype._inverseY=function(t){var e=this.options.datum.a,i=wy(-t/e);return Dt(My-2*_y(i))},e}(Iy),Ry=function(){};Ry.prototype.forward=function(t){return new Py(t.lng,t.lat)},Ry.prototype.inverse=function(t){return new xy(t.y,t.x)};var Vy=function(){var t=this._proj=new Ey,e=this.c=2*Ty*t.options.datum.a;this._tm=q.geometry.transform().translate(.5,.5).scale(1/e,-1/e),this._itm=q.geometry.transform().scale(e,-e).translate(-.5,-.5)};Vy.prototype.toPoint=function(t,e,i){return this._proj.forward(t,i).transform(this._tm).scale(e||1)},Vy.prototype.toLocation=function(t,e,i){var o=t.clone().scale(1/(e||1)).transform(this._itm);return this._proj.inverse(o,i)};var zy=function(){this._proj=new Iy};zy.prototype.toPoint=function(t){return this._proj.forward(t)},zy.prototype.toLocation=function(t){return this._proj.inverse(t)};var jy=function(){this._proj=new Ry};jy.prototype.toPoint=function(t){return this._proj.forward(t)},jy.prototype.toLocation=function(t){return this._proj.inverse(t)},Object.assign;var Dy=function(t,e){return t.bind(e)},Fy=function(t){var e=document.createElement("div");return e.innerHTML=t,e.firstChild},Hy=function(t){for(;t.firstChild;)t.removeChild(t.firstChild)},Ny=function(t,e){e.insertBefore(t,e.firstChild)},Uy=function(t){return t&&String(t).endsWith("px")?t:String(t)+"px"},Gy=function(t,e){var i=t.prototype;i.events?e.forEach((function(t){i.events.indexOf(t)<0&&i.events.push(t)})):i.events=e},Wy=function(t){switch(t){case"topLeft":return"k-top-start";case"topRight":return"k-top-end";case"bottomLeft":return"k-bottom-start";case"bottomRight":return"k-bottom-end"}return[].join(" ")},Xy=function(t){function e(e,i){t.call(this),this.element=e,this._initOptions(i),this.items=[],W(this.element,"k-widget k-attribution")}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._initOptions=function(t){this.options=at({},this.options,t)},e.prototype.filter=function(t,e){this._extent=t,this._zoom=e,this._render()},e.prototype.add=function(t){var e=t;jt(t)&&("string"==typeof t&&(e={text:t}),this.items.push(e),this._render())},e.prototype.remove=function(t){for(var e=[],i=0;i<this.items.length;i++){var o=this.items[i];o.text!==t&&e.push(o)}this.items=e,this._render()},e.prototype.clear=function(){this.items=[],Hy(this.element)},e.prototype._render=function(){for(var t=[],e=0;e<this.items.length;e++){var i=this.items[e],o=this._itemText(i);""!==o&&t.push(o)}t.length>0?(Hy(this.element),function(t,e){var i=document.createElement("div");for(i.innerHTML=t;i.childNodes.length>0;)e.appendChild(i.childNodes[0])}(t.join(this.options.separator),this.element),this.showElement()):this.hideElement()},e.prototype.hideElement=function(){this.element.style.display="none"},e.prototype.showElement=function(){this.element.style.display=""},e.prototype._itemText=function(t){var e="",i=this._inZoomLevel(t.minZoom,t.maxZoom),o=this._inArea(t.extent);return i&&o&&(e+=t.text),e},e.prototype._inZoomLevel=function(t,e){var i=Kt(t,-Number.MAX_VALUE),o=Kt(e,Number.MAX_VALUE);return this._zoom>i&&this._zoom<o},e.prototype._inArea=function(t){var e=!0;return t&&(e=t.contains(this._extent)),e},e}(Xe);te(Xy,{name:"Attribution",separator:" | "});var Yy={up:{className:"k-navigator-n",iconClass:"k-i-caret-alt-up"},down:{className:"k-navigator-s",iconClass:"k-i-caret-alt-down"},right:{className:"k-navigator-e",iconClass:"k-i-caret-alt-right"},left:{className:"k-navigator-w",iconClass:"k-i-caret-alt-left"}};function qy(t,e){var i='<button type="button" class="k-button k-button-square k-rounded-full k-button-flat k-button-flat-base k-icon-button '+Yy[t].className+'" aria-label="move '+t+'">'+ae({icon:"caret-alt-"+t,iconClass:"k-button-icon",svgIcons:e.svgIcons,type:e.type})+"</button>";return Fy(i)}var Zy=function(t){function e(e,i){t.call(this),this.element=e,this._initOptions(i);var o=qy("up",i.icons),r=qy("right",i.icons),n=qy("down",i.icons),s=qy("left",i.icons);this.element.appendChild(o),this.element.appendChild(r),this.element.appendChild(n),this.element.appendChild(s),W(this.element,"k-widget k-navigator"),Re(this.element,"click",".k-button",Dy(this._click,this));var a=this.element.parentNode.closest("[data-role]");this._keyroot=a||this.element,this._tabindex(this._keyroot),this._keydownHandler=Dy(this._keydown,this),Re(this._keyroot,"keydown",this._keydownHandler)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.destroy=function(){this.dispose()},e.prototype.dispose=function(){Ve(this._keyroot,"keydown",this._keydownHandler)},e.prototype._tabindex=function(t){var e=t||this.wrapper||this.element,i=this.element,o="tabindex",r=e.getAttribute(o)||i.getAttribute(o);i.removeAttribute(o),e.setAttribute(o,isNaN(r)?0:r)},e.prototype._initOptions=function(t){this.options=at({},this.options,t)},e.prototype._pan=function(t,e){var i=this.options.panStep;this.trigger("pan",{x:t*i,y:e*i})},e.prototype._click=function(t){var e=0,i=0,o=t.currentTarget;o.matches(".k-navigator-n")?i=1:o.matches(".k-navigator-s")?i=-1:o.matches(".k-navigator-e")?e=1:o.matches(".k-navigator-w")&&(e=-1),this._pan(e,i),t.preventDefault()},e.prototype._keydown=function(t){switch(t.which){case ke.UP:this._pan(0,1),t.preventDefault();break;case ke.DOWN:this._pan(0,-1),t.preventDefault();break;case ke.RIGHT:this._pan(1,0),t.preventDefault();break;case ke.LEFT:this._pan(-1,0),t.preventDefault()}},e}(Xe);function Qy(t,e,i){var o='<button type="button" class="k-button k-button-md k-rounded-md k-button-solid k-button-solid-base k-icon-button k-zoom-'+t+'" title="zoom-'+t+'" aria-label="zoom-'+t+'">'+ae({icon:e,iconClass:"k-button-icon",svgIcons:i.svgIcons,type:i.type})+"</button>";return Fy(o)}te(Zy,{name:"Navigator",panStep:1}),Gy(Zy,["pan"]);var Ky="change",$y=function(t){function e(e,i,o){t.call(this),this.element=e,this._initOptions(i);var r=Qy("in","plus",o),n=Qy("out","minus",o);this.element.appendChild(r),this.element.appendChild(n),this.element.setAttribute("role","group"),W(this.element,"k-widget k-zoom-control k-button-group k-group-horizontal"),this._clickHandler=this._click.bind(this),Re(this.element,"click",".k-button",this._clickHandler);var s=this.element.parentNode.closest("[data-role]");this._keyroot=s||this.element,this._tabindex(this._keyroot),this._keydownHandler=this._keydown.bind(this),Re(this._keyroot,"keydown",this._keydownHandler)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.destroy=function(){this.element&&Ve(this.element,"click",this._clickHandler),this._keyroot&&Ve(this._keyroot,"keydown",this._keydownHandler)},e.prototype._tabindex=function(t){var e=t||this.wrapper||this.element,i=this.element,o="tabindex",r=e.getAttribute(o)||i.getAttribute(o);i.removeAttribute(o),e.setAttribute(o,isNaN(r)?0:r)},e.prototype._initOptions=function(t){this.options=at({},this.options,t)},e.prototype._change=function(t){var e=this.options.zoomStep;this.trigger(Ky,{delta:t*e})},e.prototype._click=function(t){var e=1;kt(t.currentTarget,"k-zoom-out")&&(e=-1),this._change(e),t.preventDefault()},e.prototype._keydown=function(t){switch(t.which){case ke.NUMPAD_PLUS:case 187:case 61:this._change(1);break;case ke.NUMPAD_MINUS:case 189:case 173:this._change(-1)}},e}(Xe);te($y,{name:"ZoomControl",zoomStep:1}),Gy($y,[Ky]);var Jy=Math,tv=Jy.max,ev=Jy.min,iv=function(t,e){var i=xy.create(t),o=xy.create(e);i.lng+180>o.lng+180&&i.lat+90<o.lat+90?(this.se=i,this.nw=o):(this.se=o,this.nw=i)},ov={World:{configurable:!0}};iv.prototype.contains=function(t){var e=this.nw,i=this.se,o=Kt(t.lng,t[1]),r=Kt(t.lat,t[0]);return t&&o+180>=e.lng+180&&o+180<=i.lng+180&&r+90>=i.lat+90&&r+90<=e.lat+90},iv.prototype.center=function(){var t=this.nw,e=this.se,i=t.lng+(e.lng-t.lng)/2,o=t.lat+(e.lat-t.lat)/2;return new xy(o,i)},iv.prototype.containsAny=function(t){for(var e=!1,i=0;i<t.length;i++)e=e||this.contains(t[i]);return e},iv.prototype.include=function(t){var e=this.nw,i=this.se,o=Kt(t.lng,t[1]),r=Kt(t.lat,t[0]);e.lng=ev(e.lng,o),e.lat=tv(e.lat,r),i.lng=tv(i.lng,o),i.lat=ev(i.lat,r)},iv.prototype.includeAll=function(t){for(var e=0;e<t.length;e++)this.include(t[e])},iv.prototype.edges=function(){var t=this.nw,e=this.se;return{nw:this.nw,ne:new xy(t.lat,e.lng),se:this.se,sw:new xy(e.lat,t.lng)}},iv.prototype.toArray=function(){var t=this.nw,e=this.se;return[t,new xy(t.lat,e.lng),e,new xy(e.lat,t.lng)]},iv.prototype.overlaps=function(t){return this.containsAny(t.toArray())||t.containsAny(this.toArray())},iv.create=function(t,e){return t instanceof iv?t:t&&e?new iv(t,e):t&&4===t.length&&!e?new iv([t[0],t[1]],[t[2],t[3]]):void 0},ov.World.get=function(){return new iv([90,-180],[-90,180])},Object.defineProperties(iv,ov);var rv="centerChange",nv=function(t,e){this.widgetService=t,this.options=at({},this.options,e),this.offset={x:0,y:0}},sv={anchor:{configurable:!0}};nv.prototype.show=function(t,e){this.location!==e.location&&(this.anchor=t,this.location=e.location,this.widgetService.notify("showTooltip",Object.assign({anchor:this.anchor},e)),this.visible=!0)},nv.prototype.hide=function(){this.widgetService&&this.widgetService.notify("hideTooltip"),this.visible=!1,this.location=null},sv.anchor.get=function(){return this._anchor},sv.anchor.set=function(t){var e=this.widgetService.widget._toDocumentCoordinates({x:t.left-this.offset.x,y:t.top-this.offset.y});this._anchor={left:e.left,top:e.top}},nv.prototype.destroy=function(){this.widgetService=null},Object.defineProperties(nv.prototype,sv),te(nv,{border:{width:1},opacity:1});var av=function(t,e){this.support=ze(),this._initOptions(e),this.map=t;var i=document.createElement("div");W(i,"k-layer"),i.style.zIndex=this.options.zIndex,i.style.opacity=this.options.opacity,this.element=i,t.scrollElement.appendChild(this.element),this._beforeReset=this._beforeReset.bind(this),this._reset=this._reset.bind(this),this._resize=this._resize.bind(this),this._panEnd=this._panEnd.bind(this),this._activate(),this._updateAttribution()};av.prototype.destroy=function(){this._deactivate()},av.prototype._initOptions=function(t){this.options=at({},this.options,t)},av.prototype.show=function(){this.reset(),this._activate(),this._applyExtent(!0)},av.prototype.hide=function(){this._deactivate(),this._setVisibility(!1)},av.prototype.reset=function(){this._beforeReset(),this._reset()},av.prototype._reset=function(){this._applyExtent()},av.prototype._beforeReset=function(){},av.prototype._resize=function(){},av.prototype._panEnd=function(){this._applyExtent()},av.prototype._applyExtent=function(){var t=this.options,e=this.map.zoom(),i=!jt(t.minZoom)||e>=t.minZoom,o=!jt(t.maxZoom)||e<=t.maxZoom,r=iv.create(t.extent),n=!r||r.overlaps(this.map.extent());this._setVisibility(i&&o&&n)},av.prototype._setVisibility=function(t){this.element.style.display=t?"":"none"},av.prototype._activate=function(){var t=this.map;this._deactivate(),t.bind("beforeReset",this._beforeReset),t.bind("reset",this._reset),t.bind("resize",this._resize),t.bind("panEnd",this._panEnd)},av.prototype._deactivate=function(){var t=this.map;t.unbind("beforeReset",this._beforeReset),t.unbind("reset",this._reset),t.unbind("resize",this._resize),t.unbind("panEnd",this._panEnd)},av.prototype._updateAttribution=function(){var t=this.map.attribution;t&&t.add(this.options.attribution)},av.prototype._readData=function(){return this.options.data||[]},av.prototype._hasData=function(){return this._data&&this._data.length>0},av.prototype._layerIndex=function(){return(this.map.layers||[]).indexOf(this)};var pv=Math,lv=q.geometry.Point;function hv(t){return ot(t)?t:yt.compile(t)}function cv(t){return new lv(Zt(t.x),Zt(t.y))}function uv(t){var e=t;return"string"!=typeof t&&(e+="px"),e}var dv=function(t){function e(e,i){t.call(this,e,i),"string"==typeof this.options.subdomains&&(this.options.subdomains=this.options.subdomains.split(""));var o=this._viewType();this._view=new o(this.element,this.options)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.destroy=function(){t.prototype.destroy.call(this),this._view.destroy(),this._view=null},e.prototype._beforeReset=function(){var t=this.map,e=t.locationToLayer(t.extent().nw).round();this._view.viewOrigin(e)},e.prototype._reset=function(){t.prototype._reset.call(this),this._updateView(),this._view.reset()},e.prototype._viewType=function(){return fv},e.prototype._activate=function(){t.prototype._activate.call(this),this.support.mobileOS||(this._pan||(this._pan=(0,q.throttle)(this._render.bind(this),100)),this.map.bind("pan",this._pan))},e.prototype._deactivate=function(){t.prototype._deactivate.call(this),this._pan&&this.map.unbind("pan",this._pan)},e.prototype._updateView=function(){var t=this._view,e=this.map,i=e.extent(),o={nw:e.locationToLayer(i.nw).round(),se:e.locationToLayer(i.se).round()};t.center(e.locationToLayer(e.center())),t.extent(o),t.zoom(e.zoom())},e.prototype._resize=function(){this._render()},e.prototype._panEnd=function(e){t.prototype._panEnd.call(this,e),this._render()},e.prototype._render=function(){this._updateView(),this._view.render()},e}(av);te(dv,{tileSize:256,subdomains:["a","b","c"],urlTemplate:"",zIndex:1});var fv=function(t,e){this.element=t,this._initOptions(e),this.pool=new yv};fv.prototype._initOptions=function(t){this.options=at({},this.options,t)},fv.prototype.center=function(t){this._center=t},fv.prototype.extent=function(t){this._extent=t},fv.prototype.viewOrigin=function(t){this._viewOrigin=t},fv.prototype.zoom=function(t){this._zoom=t},fv.prototype.pointToTileIndex=function(t){return new lv(pv.floor(t.x/this.options.tileSize),pv.floor(t.y/this.options.tileSize))},fv.prototype.tileCount=function(){var t=this.size(),e=this.pointToTileIndex(this._extent.nw),i=this._extent.nw,o=this.indexToPoint(e).translate(-i.x,-i.y);return{x:pv.ceil((pv.abs(o.x)+t.width)/this.options.tileSize),y:pv.ceil((pv.abs(o.y)+t.height)/this.options.tileSize)}},fv.prototype.size=function(){var t=this._extent.nw,e=this._extent.se.clone().translate(-t.x,-t.y);return{width:e.x,height:e.y}},fv.prototype.indexToPoint=function(t){var e=t.x,i=t.y;return new lv(e*this.options.tileSize,i*this.options.tileSize)},fv.prototype.subdomainText=function(){var t=this.options.subdomains;return t[this.subdomainIndex++%t.length]},fv.prototype.destroy=function(){Hy(this.element),this.pool.empty()},fv.prototype.reset=function(){this.pool.reset(),this.subdomainIndex=0,this.render()},fv.prototype.render=function(){var t,e,i,o=this.tileCount(),r=this.pointToTileIndex(this._extent.nw);for(e=0;e<o.x;e++)for(i=0;i<o.y;i++)(t=this.createTile({x:r.x+e,y:r.y+i})).visible||t.show()},fv.prototype.createTile=function(t){var e=this.tileOptions(t),i=this.pool.get(this._center,e);return i.element.parentNode||this.element.append(i.element),i},fv.prototype.tileOptions=function(t){var e=this.wrapIndex(t),i=this.indexToPoint(t),o=this._viewOrigin,r=i.clone().translate(-o.x,-o.y);return{index:e,currentIndex:t,point:i,offset:cv(r),zoom:this._zoom,size:this.options.tileSize,subdomain:this.subdomainText(),urlTemplate:this.options.urlTemplate,errorUrlTemplate:this.options.errorUrlTemplate}},fv.prototype.wrapIndex=function(t){var e=pv.pow(2,this._zoom);return{x:this.wrapValue(t.x,e),y:Xt(t.y,0,e-1)}},fv.prototype.wrapValue=function(t,e){var i=pv.abs(t)%e;return t>=0?i:e-(0===i?e:i)};var gv=function(t,e){this.id=t,this.visible=!0,this._initOptions(e),this.createElement(),this.show()};gv.prototype.destroy=function(){var t=this.element,e=t?t.parentNode:null;t&&(e&&e.removeChild(t),this.element=null)},gv.prototype._initOptions=function(t){this.options=at({},this.options,t)},gv.prototype.createElement=function(){var t=document.createElement("img"),e=this.options.size+"px";t.setAttribute("alt",""),t.style.position="absolute",t.style.display="block",t.style.width=t.style.maxWidth=e,t.style.height=t.style.maxHeight=e,this.element=t},gv.prototype.show=function(){var t=this.element;t.style.top=uv(this.options.offset.y),t.style.left=uv(this.options.offset.x);var e=this.url();e&&t.setAttribute("src",e),t.style.visibility="visible",this.visible=!0},gv.prototype.hide=function(){this.element.style.visibility="hidden",this.visible=!1},gv.prototype.url=function(){return hv(this.options.urlTemplate)(this.urlOptions())},gv.prototype.errorUrl=function(){return hv(this.options.errorUrlTemplate)(this.urlOptions())},gv.prototype.urlOptions=function(){var t=this.options;return{zoom:t.zoom,subdomain:t.subdomain,z:t.zoom,x:t.index.x,y:t.index.y,s:t.subdomain,quadkey:t.quadkey,q:t.quadkey,culture:t.culture,c:t.culture}},te(gv,{urlTemplate:"",errorUrlTemplate:""});var yv=function(){this._items=[]};yv.prototype.get=function(t,e){return this._items.length>=this.options.maxSize&&this._remove(t),this._create(e)},yv.prototype.empty=function(){for(var t=this._items,e=0;e<t.length;e++)t[e].destroy();this._items=[]},yv.prototype.reset=function(){for(var t=this._items,e=0;e<t.length;e++)t[e].hide()},yv.prototype._create=function(t){for(var e,i=this._items,o=Gt(t.point.toString()+t.offset.toString()+t.zoom+t.urlTemplate),r=0;r<i.length;r++)if(i[r].id===o){e=i[r];break}return e?e.show():(e=new gv(o,t),this._items.push(e)),e},yv.prototype._remove=function(t){for(var e=this._items,i=-1,o=-1,r=0;r<e.length;r++){var n=e[r].options.point.distanceTo(t);n>i&&!e[r].visible&&(o=r,i=n)}-1!==o&&(e[o].destroy(),e.splice(o,1))},te(yv,{maxSize:100});var vv=Object.assign,mv="change",xv=function(t){function e(e,i){t.call(this);var o=this,r=e[0]||e;o.capture=!1,r.addEventListener?(Pe.down.split(" ").forEach((function(t){r.addEventListener(t,Dy(o._press,o),!0)})),Pe.up.split(" ").forEach((function(t){r.addEventListener(t,Dy(o._release,o),!0)}))):(Pe.down.split(" ").forEach((function(t){r.attachEvent(t,Dy(o._press,o))})),Pe.up.split(" ").forEach((function(t){r.attachEvent(t,Dy(o._release,o))}))),o.bind(["press","release"],i||{})}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.captureNext=function(){this.capture=!0},e.prototype.cancelCapture=function(){this.capture=!1},e.prototype._press=function(t){this.trigger("press"),this.capture&&t.preventDefault()},e.prototype._release=function(t){var e=this;e.trigger("release"),e.capture&&(t.preventDefault(),e.cancelCapture())},e}(Xe),bv=function(t){function e(e){t.call(this);var i=this;i.forcedEnabled=!1,vv(i,e),i.scale=1,i.horizontal?(i.measure="offsetWidth",i.scrollSize="scrollWidth",i.axis="x"):(i.measure="offsetHeight",i.scrollSize="scrollHeight",i.axis="y")}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.makeVirtual=function(){vv(this,{virtual:!0,forcedEnabled:!0,_virtualMin:0,_virtualMax:0})},e.prototype.virtualSize=function(t,e){this._virtualMin===t&&this._virtualMax===e||(this._virtualMin=t,this._virtualMax=e,this.update())},e.prototype.outOfBounds=function(t){return t>this.max||t<this.min},e.prototype.forceEnabled=function(){this.forcedEnabled=!0},e.prototype.getSize=function(){return this.container[this.measure]},e.prototype.getTotal=function(){return this.element[this.scrollSize]},e.prototype.rescale=function(t){this.scale=t},e.prototype.update=function(t){var e=this,i=e.virtual?e._virtualMax:e.getTotal(),o=i*e.scale,r=e.getSize();(0!==i||e.forcedEnabled)&&(e.max=e.virtual?-e._virtualMin:0,e.size=r,e.total=o,e.min=Math.min(e.max,r-o),e.minScale=r/i,e.centerOffset=(o-r)/2,e.enabled=e.forcedEnabled||o>r,t||e.trigger(mv,e))},e}(Xe),_v=function(t){function e(e){t.call(this);var i=this;i.x=new bv(vv({horizontal:!0},e)),i.y=new bv(vv({horizontal:!1},e)),i.container=e.container,i.forcedMinScale=e.minScale,i.maxScale=e.maxScale||100,i.bind(mv,e)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.rescale=function(t){this.x.rescale(t),this.y.rescale(t),this.refresh()},e.prototype.centerCoordinates=function(){return{x:Math.min(0,-this.x.centerOffset),y:Math.min(0,-this.y.centerOffset)}},e.prototype.refresh=function(){var t=this;t.x.update(),t.y.update(),t.enabled=t.x.enabled||t.y.enabled,t.minScale=t.forcedMinScale||Math.min(t.x.minScale,t.y.minScale),t.fitScale=Math.max(t.x.minScale,t.y.minScale),t.trigger(mv)},e}(Xe),wv=function(t){function e(e){t.call(this),vv(this,e)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.outOfBounds=function(){return this.dimension.outOfBounds(this.movable[this.axis])},e.prototype.dragMove=function(t){var e=this,i=e.dimension,o=e.axis,r=e.movable,n=r[o]+t;if(i.enabled){var s=t;(n<i.min&&t<0||n>i.max&&t>0)&&(s*=e.resistance),r.translateAxis(o,s),e.trigger(mv,e)}},e}(Xe),kv=function(t){var e,i,o,r,n=this;vv(n,{elastic:!0},t),o=n.elastic?.5:0,r=n.movable,n.x=e=new wv({axis:"x",dimension:n.dimensions.x,resistance:o,movable:r}),n.y=i=new wv({axis:"y",dimension:n.dimensions.y,resistance:o,movable:r}),n.userEvents.bind(["press","move","end","gesturestart","gesturechange"],{gesturestart:function(t){n.gesture=t,n.offset=Ft(n.dimensions.container)},press:function(t){var e=t.event.target.closest("a");e&&e.matches("[data-navigate-on-press=true]")&&t.sender.cancel()},gesturechange:function(t){var o,s=n.gesture,a=s.center,p=t.center,l=t.distance/s.distance,h=n.dimensions.minScale,c=n.dimensions.maxScale;r.scale<=h&&l<1&&(l+=.8*(1-l)),r.scale*l>=c&&(l=c/r.scale);var u=r.x+n.offset.left,d=r.y+n.offset.top;o={x:(u-a.x)*l+p.x-u,y:(d-a.y)*l+p.y-d},r.scaleWith(l),e.dragMove(o.x),i.dragMove(o.y),n.dimensions.rescale(r.scale),n.gesture=t,t.preventDefault()},move:function(t){t.event.target.tagName.match(/textarea|input/i)||(e.dimension.enabled||i.dimension.enabled?(e.dragMove(t.x.delta),i.dragMove(t.y.delta),t.preventDefault()):t.touch.skip())},end:function(t){t.preventDefault()}})},Av=function(t,e,i){return"translate3d("+t+"px,"+e+"px,0) scale("+i+")"},Sv=function(t){function e(e){t.call(this);var i=this;i.element=e,i.element.style.transformOrigin="left top",i.x=0,i.y=0,i.scale=1;var o=Av(i.x,i.y,i.scale);i.element.style.transform=o,i._saveCoordinates(o)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.translateAxis=function(t,e){this[t]+=e,this.refresh()},e.prototype.scaleTo=function(t){this.scale=t,this.refresh()},e.prototype.scaleWith=function(t){this.scale*=t,this.refresh()},e.prototype.translate=function(t){this.x+=t.x,this.y+=t.y,this.refresh()},e.prototype.moveAxis=function(t,e){this[t]=e,this.refresh()},e.prototype.moveTo=function(t){vv(this,t),this.refresh()},e.prototype.refresh=function(){var t,e=this,i=e.x,o=e.y;e.round&&(i=Math.round(i),o=Math.round(o)),(t=Av(i,o,e.scale))!==e.coordinates&&(e.element.style.transform=t,e._saveCoordinates(t),e.trigger(mv))},e.prototype._saveCoordinates=function(t){this.coordinates=t},e}(Xe),Cv=q.drawing.Group,Pv=function(t){function e(e,i){t.call(this,e,i),this._pan=Dy(this._pan,this),this.surface=q.drawing.Surface.create(this.element,{width:e.scrollElement.clientWidth,height:e.scrollElement.clientHeight}),this._initRoot(),this.movable=new Sv(this.surface.element),this._markers=[],this._click=this._handler("shapeClick"),this.surface.bind("click",this._click),this._mouseleave=this._handler("shapeMouseLeave"),this.surface.bind("mouseleave",this._mouseleave),this.surface.bind("mouseenter",this._mouseenter.bind(this))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.destroy=function(){t.prototype.destroy.call(this),this.surface.destroy()},e.prototype._reset=function(){t.prototype._reset.call(this),this._translateSurface(),this._data=this._readData(),this._hasData()&&this._load(this._data)},e.prototype._initRoot=function(){this._root=new Cv,this.surface.draw(this._root)},e.prototype._beforeReset=function(){this.surface.clear(),this._initRoot()},e.prototype._resize=function(){this.surface.size(this.map.size())},e.prototype._readData=function(){var e=t.prototype._readData.call(this);return"FeatureCollection"===e.type?e.features:"GeometryCollection"===e.type?e.geometries:e},e.prototype._load=function(t){this._data=t,this._clearMarkers(),this._loader||(this._loader=new Tv(this.map,this.options.style,this));for(var e=new Cv,i=0;i<t.length;i++){var o=this._loader.parse(t[i]);o&&e.append(o)}this._root.clear(),this._root.append(e)},e.prototype.shapeCreated=function(t){var e=!1;if(t instanceof q.drawing.Circle&&this.map.options.renderPointsAsMarkers&&(e=jt(this._createMarker(t))),!e){var i={layer:this,shape:t};e=this.map.trigger("shapeCreated",i)}return e},e.prototype.featureCreated=function(t){t.layer=this,this.map.trigger("shapeFeatureCreated",t)},e.prototype._createMarker=function(t){var e=this.map.markers.bind({location:t.location},t.dataItem);return e&&this._markers.push(e),e},e.prototype._clearMarkers=function(){for(var t=0;t<this._markers.length;t++)this.map.markers.remove(this._markers[t]);this._markers=[]},e.prototype._pan=function(){this._panning||(this._panning=!0,this.surface.suspendTracking())},e.prototype._panEnd=function(e){t.prototype._panEnd.call(this,e),this._translateSurface(),this.surface.resumeTracking(),this._panning=!1},e.prototype._translateSurface=function(){var t=this.map,e=t.locationToView(t.extent().nw);this.surface.translate&&(this.surface.translate(e),this.movable.moveTo({x:e.x,y:e.y}))},e.prototype._eventArgs=function(t){return{layer:this,layerIndex:this._layerIndex(),shape:t.element,shapeIndex:(this._data||[]).indexOf(t.element.dataItem),originalEvent:t.originalEvent}},e.prototype._handler=function(t){var e=this;return function(i){i.element&&e.map.trigger(t,e._eventArgs(i))}},e.prototype._mouseenter=function(t){if(t.element){this.map.trigger("shapeMouseEnter",this._eventArgs(t));var e=t.element,i=this._tooltipAnchor(t);this.map._tooltip.show(i,this._tooltipContext(e))}},e.prototype._tooltipContext=function(t){return{type:"shape",layerIndex:this._layerIndex(),className:"k-map-shape-tooltip",dataItem:t.dataItem,location:t.location}},e.prototype._tooltipAnchor=function(t){var e=this.map.eventOffset(t.originalEvent);return{top:e.y,left:e.x}},e.prototype._activate=function(){t.prototype._activate.call(this),this._panHandler=Dy(this._pan,this),this.map.bind("pan",this.panHandler)},e.prototype._deactivate=function(){t.prototype._deactivate.call(this),this.map.unbind("pan",this._panHandler)},e}(av);te(Pv,{autoBind:!0,zIndex:100});var Tv=function(t,e,i){this.observer=i,this.locator=t,this.style=e};Tv.prototype.parse=function(t){var e=new Cv,i=!0;return"Feature"===t.type?(i=!1,this._loadGeometryTo(e,t.geometry,t),this._featureCreated(e,t)):this._loadGeometryTo(e,t,t),i&&e.children.length<2&&(e=e.children[0]),e},Tv.prototype._shapeCreated=function(t){var e=!1;return this.observer&&this.observer.shapeCreated&&(e=this.observer.shapeCreated(t)),e},Tv.prototype._featureCreated=function(t,e){this.observer&&this.observer.featureCreated&&this.observer.featureCreated({group:t,dataItem:e,properties:e.properties})},Tv.prototype._loadGeometryTo=function(t,e,i){var o,r,n=e.coordinates;switch(e.type){case"LineString":r=this._loadPolygon(t,[n],i),this._setLineFill(r);break;case"MultiLineString":for(o=0;o<n.length;o++)r=this._loadPolygon(t,[n[o]],i),this._setLineFill(r);break;case"Polygon":this._loadPolygon(t,n,i);break;case"MultiPolygon":for(o=0;o<n.length;o++)this._loadPolygon(t,n[o],i);break;case"Point":this._loadPoint(t,n,i);break;case"MultiPoint":for(o=0;o<n.length;o++)this._loadPoint(t,n[o],i)}},Tv.prototype._setLineFill=function(t){var e=t.segments;(e.length<4||!e[0].anchor().equals(Wt(e).anchor()))&&(t.options.fill=null)},Tv.prototype._loadShape=function(t,e){return this._shapeCreated(e)||t.append(e),e},Tv.prototype._loadPolygon=function(t,e,i){var o=this._buildPolygon(e);return o.dataItem=i,o.location=this.locator.viewToLocation(o.bbox().center()),this._loadShape(t,o)},Tv.prototype._buildPolygon=function(t){for(var e=new(t.length>1?q.drawing.MultiPath:q.drawing.Path)(this.style),i=0;i<t.length;i++)for(var o=0;o<t[i].length;o++){var r=this.locator.locationToView(xy.fromLngLat(t[i][o]));0===o?e.moveTo(r.x,r.y):e.lineTo(r.x,r.y)}return e},Tv.prototype._loadPoint=function(t,e,i){var o=xy.fromLngLat(e),r=this.locator.locationToView(o),n=new q.geometry.Circle(r,10),s=new q.drawing.Circle(n,this.style);return s.dataItem=i,s.location=o,this._loadShape(t,s)};var Mv=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._readData=function(){return this.options.data||[]},e.prototype._load=function(t){if(this._data=t,this.surface.clear(),0!==t.length){var e=this.options,i=_t(e.valueField),o=t.slice(0);o.sort((function(t,e){return i(e)-i(t)}));for(var r,n=this._scaleType(),s=_t(this.options.locationField),a=0;a<o.length;a++){var p=o[a],l=s(p),h=i(p);if(jt(l)&&jt(h)){r||(r=new n([0,h],[e.minSize,e.maxSize])),l=xy.create(l);var c=this.map.locationToView(l),u=r.map(h),d=this._createSymbol({center:c,size:u,style:e.style,dataItem:p,location:l});d.dataItem=p,d.location=l,d.value=h,this._drawSymbol(d)}}}},e.prototype._scaleType=function(){var t=this.options.scale;return ot(t)?t:Lv[t]},e.prototype._createSymbol=function(t){var e=this.options.symbol;return ot(e)||(e=Bv[e]),e(t)},e.prototype._drawSymbol=function(t){var e={layer:this,shape:t};this.map.trigger("shapeCreated",e)||this.surface.draw(t)},e.prototype._tooltipContext=function(t){return{type:"bubble",layerIndex:this._layerIndex(),className:"k-map-bubble-tooltip",dataItem:t.dataItem,location:t.location,value:t.value}},e.prototype._tooltipAnchor=function(t){var e=t.element.bbox().center();return{top:e.y,left:e.x}},e}(Pv);te(Mv,{locationField:"location",valueField:"value",minSize:0,maxSize:100,scale:"sqrt",symbol:"circle",zIndex:200});var Ov=function(t,e){this._domain=t,this._range=e;var i=Math.sqrt(t[1])-Math.sqrt(t[0]),o=e[1]-e[0];this._ratio=o/i};Ov.prototype.map=function(t){var e=(Math.sqrt(t)-Math.sqrt(this._domain[0]))*this._ratio;return this._range[0]+e};var Lv={sqrt:Ov},Bv={circle:function(t){var e=new q.geometry.Circle(t.center,t.size/2);return new q.drawing.Circle(e,t.style)},square:function(t){var e=new q.drawing.Path(t.style),i=t.size/2,o=t.center;return e.moveTo(o.x-i,o.y-i).lineTo(o.x+i,o.y-i).lineTo(o.x+i,o.y+i).lineTo(o.x-i,o.y+i).close(),e}},Iv="click",Ev="mouseenter",Rv="mouseleave",Vv=Object.assign,zv="k-marker",jv="."+zv,Dv=function(t){function e(e,i){t.call(this,e,i),this._markerClickHandler=Dy(this._markerClick,this),Re(this.element,Iv,jv,this._markerClickHandler),this.items=[],this._load(this._readData())}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.destroy=function(){t.prototype.destroy.call(this),Ve(this.element,Iv,this._markerClickHandler),this.clear()},e.prototype.add=function(t){if(!G(t))return this._addOne(t);for(var e=0;e<t.length;e++)this._addOne(t[e])},e.prototype.remove=function(t){t.destroy();var e=(this.items||[]).indexOf(t);e>-1&&this.items.splice(e,1)},e.prototype.clear=function(){for(var t=0;t<this.items.length;t++)this.items[t].destroy();this.items=[]},e.prototype.update=function(t){var e=t.location();if(e){t.showAt(this.map.locationToView(e));var i={marker:t,layer:this};this.map.trigger("markerActivate",i)}},e.prototype._reset=function(){t.prototype._reset.call(this);for(var e=this.items,i=0;i<e.length;i++)this.update(e[i])},e.prototype.bind=function(t,e){var i=Fv.create(t,this.options);i.dataItem=e;var o={marker:i,layer:this};if(!this.map.trigger("markerCreated",o))return this.add(i),i},e.prototype._addOne=function(t){var e=Fv.create(t,this.options);return e.addTo(this),e},e.prototype._readData=function(){return this.options.data||[]},e.prototype._load=function(t){this._data=t,this.clear();for(var e=_t(this.options.locationField),i=_t(this.options.titleField),o=0;o<t.length;o++){var r=t[o];this.bind({location:e(r),title:i(r)},r)}},e.prototype._markerClick=function(t){var e=t.currentTarget._kendoNode,i={layer:this,layerIndex:this._layerIndex(),marker:e,markerIndex:(this.items||[]).indexOf(e),originalEvent:t};this.map.trigger("markerClick",i)},e.prototype._markerMouseEnter=function(t){var e=this._createMarkerEventArgs(t);this.map.trigger("markerMouseEnter",e)},e.prototype._markerMouseLeave=function(t){var e=this._createMarkerEventArgs(t);this.map.trigger("markerMouseLeave",e)},e.prototype._createMarkerEventArgs=function(t){var e=t.marker;return Vv({},{layer:this,layerIndex:this._layerIndex(),marker:e,markerIndex:(this.items||[]).indexOf(e)},t)},e}(av);te(Dv,{zIndex:1e3,autoBind:!0,locationField:"location",titleField:"title",template:""});var Fv=function(t){this.options=t||{}};Fv.prototype.destroy=function(){this.layer=null,this.unbindEvents(),this.hide()},Fv.prototype.addTo=function(t){this.layer=t.markers||t,this.layer.items.push(this),this.layer.update(this)},Fv.prototype.location=function(t){return t?(this.options.location=xy.create(t).toArray(),this.layer&&this.layer.update(this),this):xy.create(this.options.location)},Fv.prototype.showAt=function(t){this.render(),this._anchor={left:Math.round(t.x),top:Math.round(t.y)},this.element.style.left=Uy(this._anchor.left),this.element.style.top=Uy(this._anchor.top)},Fv.prototype.hide=function(){this.element&&(this.element.remove(),this.element=null)},Fv.prototype.bindEvents=function(){this.element&&(this._mouseEnterHandler=Dy(this._mouseEnter,this),Re(this.element,Ev,jv,this._mouseEnterHandler),this._mouseLeaveHandler=Dy(this._mouseLeave,this),Re(this.element,Rv,jv,this._mouseLeaveHandler))},Fv.prototype.unbindEvents=function(){this.element&&(Ve(this.element,Ev,this._mouseEnterHandler),Ve(this.element,Rv,this._mouseLeaveHandler))},Fv.prototype.render=function(){if(!this.element){var t=this.options,e=this.layer,i=document.createElement("span");if(W(i,zv),this.options.template){var o=this._compileTemplate(this.options.template)(this.dataItem),r=Fy(o);i.appendChild(r)}else if(t.svgIcon)ae(i,{icon:t.svgIcon,iconClass:"k-icon-xxl",svgIcons:this.options.icons.svgIcons,type:"svg"});else{var n={icon:"map-marker",iconClass:"k-icon-xxl",svgIcons:this.options.icons.svgIcons,type:this.options.icons.type};t.shape?"pinTarget"===t.shape?(n.icon="map-marker-target",ae(i,n)):"pin"===t.shape?ae(i,n):W(i,"k-icon k-icon-xxl k-i-marker-"+(t.shape||"pin").replace(/([a-z][A-Z])/g,(function(t){return t.charAt(0)+"-"+t.charAt(1).toLowerCase()}))):ae(i,n)}t.title&&i.setAttribute("title",t.title);var s=t.attributes||{};Object.keys(s).forEach((function(t){i.setAttribute(t,s[t])})),i._kendoNode=this,i.style.zIndex=t.zIndex,this.element=i,e&&e.element.appendChild(this.element),this.bindEvents()}},Fv.prototype._mouseEnter=function(t){var e=this._createEventArgs(t);this.layer._markerMouseEnter(e),this.layer.map._tooltip.show({top:this._anchor.top-this.element.offsetHeight,left:this._anchor.left},this._tooltipContext())},Fv.prototype._tooltipContext=function(){return{type:"marker",layerIndex:this.layer._layerIndex(),className:"k-map-marker-tooltip",dataItem:this.dataItem,title:this.options.title,location:this.location()}},Fv.prototype._mouseLeave=function(t){var e=this._createEventArgs(t);this.layer._markerMouseLeave(e)},Fv.prototype._createEventArgs=function(t){return{marker:this,originalEvent:t}},Fv.prototype._compileTemplate=function(t){return yt.compile(t,{paramName:"dataItem",useWithBlock:!1})},Fv.create=function(t,e){return t instanceof Fv?t:new Fv(at({},e,t))};var Hv=Object.assign;function Nv(t){window.requestAnimationFrame(t)}var Uv=function(){var t=this;t._tickProxy=Dy(t._tick,t),t._started=!1};Uv.prototype.tick=function(){},Uv.prototype.done=function(){},Uv.prototype.onEnd=function(){},Uv.prototype.onCancel=function(){},Uv.prototype.start=function(){this.enabled()&&(this.done()?this.onEnd():(this._started=!0,Nv(this._tickProxy)))},Uv.prototype.enabled=function(){return!0},Uv.prototype.cancel=function(){this._started=!1,this.onCancel()},Uv.prototype._tick=function(){var t=this;t._started&&(t.tick(),t.done()?(t._started=!1,t.onEnd()):Nv(t._tickProxy))};var Gv=function(t){function e(e){t.call(this),Hv(this,e)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.done=function(){return this.timePassed()>=this.duration},e.prototype.timePassed=function(){return Math.min(this.duration,Fe()-this.startDate)},e.prototype.moveTo=function(t){var e=this,i=e.movable;e.initial=i[e.axis],e.delta=t.location-e.initial,e.duration="number"==typeof t.duration?t.duration:300,e.tick=e._easeProxy(t.ease),e.startDate=Fe(),e.start()},e.prototype._easeProxy=function(t){var e=this;return function(){e.movable.moveAxis(e.axis,t(e.timePassed(),e.initial,e.delta,e.duration))}},e.easeOutExpo=function(t,e,i,o){return t===o?e+i:i*(1-Math.pow(2,-10*t/o))+e},e}(Uv),Wv=Object.assign,Xv=Math.abs,Yv="change",qv="scroll",Zv=function(t){function e(e){t.call(this,e);var i=this;Wv(i,e),i.userEvents.bind("gestureend",i.start.bind(this)),i.tapCapture.bind("press",i.cancel.bind(this))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.enabled=function(){return this.movable.scale<this.dimensions.minScale},e.prototype.done=function(){return this.dimensions.minScale-this.movable.scale<.01},e.prototype.tick=function(){var t=this.movable;t.scaleWith(1.1),this.dimensions.rescale(t.scale)},e.prototype.onEnd=function(){var t=this.movable;t.scaleTo(this.dimensions.minScale),this.dimensions.rescale(t.scale)},e}(Uv),Qv=function(t){function e(e){t.call(this);var i=this;Wv(i,e,{transition:new Gv({axis:e.axis,movable:e.movable,onEnd:function(){i._end()}})}),i.tapCapture.bind("press",(function(){i.cancel()})),i.userEvents.bind("end",Dy(i.start,i)),i.userEvents.bind("gestureend",Dy(i.start,i)),i.userEvents.bind("tap",Dy(i.onEnd,i))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.onCancel=function(){this.transition.cancel()},e.prototype.freeze=function(t){this.cancel(),this._moveTo(t)},e.prototype.onEnd=function(){var t=this;t.paneAxis.outOfBounds()?t._snapBack():t._end()},e.prototype.done=function(){return Xv(this.velocity)<1},e.prototype.start=function(e){var i,o=this;o.dimension.enabled&&(o.paneAxis.outOfBounds()?o.transition._started?(o.transition.cancel(),o.velocity=Math.min(e.touch[o.axis].velocity*o.velocityMultiplier,55),t.prototype.start.call(this)):o._snapBack():(i=2===e.touch.id?0:e.touch[o.axis].velocity,o.velocity=Math.max(Math.min(i*o.velocityMultiplier,55),-55),o.tapCapture.captureNext(),t.prototype.start.call(this)))},e.prototype.tick=function(){var t=this,e=t.dimension,i=t.paneAxis.outOfBounds()?.5:t.friction,o=t.velocity*=i,r=t.movable[t.axis]+o;!t.elastic&&e.outOfBounds(r)&&(r=Math.max(Math.min(r,e.max),e.min),t.velocity=0),t.movable.moveAxis(t.axis,r)},e.prototype._end=function(){this.tapCapture.cancelCapture(),this.end()},e.prototype._snapBack=function(){var t=this,e=t.dimension,i=t.movable[t.axis]>e.max?e.max:e.min;t._moveTo(i)},e.prototype._moveTo=function(t){this.transition.moveTo({location:t,duration:500,ease:Gv.easeOutExpo})},e}(Uv),Kv=function(t){function e(e){t.call(this,e),Wv(this,e,{origin:{},destination:{},offset:{}})}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.tick=function(){this._updateCoordinates(),this.moveTo(this.origin)},e.prototype.done=function(){return Xv(this.offset.y)<5&&Xv(this.offset.x)<5},e.prototype.onEnd=function(){this.moveTo(this.destination),this.callback&&this.callback.call()},e.prototype.setCoordinates=function(t,e){this.offset={},this.origin=t,this.destination=e},e.prototype.setCallback=function(t){t&&ot(t)?this.callback=t:t=void 0},e.prototype._updateCoordinates=function(){this.offset={x:(this.destination.x-this.origin.x)/4,y:(this.destination.y-this.origin.y)/4},this.origin={y:this.origin.y+this.offset.y,x:this.origin.x+this.offset.x}},e}(Uv),$v=function(t){var e=this,i="x"===t.axis,o=Fy('<div class="km-touch-scrollbar km-'+(i?"horizontal":"vertical")+'-scrollbar" />');Wv(e,t,{element:o,elementSize:0,movable:new Sv(o),scrollMovable:t.movable,alwaysVisible:t.alwaysVisible,size:i?"width":"height"}),e.scrollMovable.bind(Yv,e.refresh.bind(e)),e.container.appendChild(o),t.alwaysVisible&&e.show()};$v.prototype.refresh=function(){var t=this,e=t.axis,i=t.dimension,o=i.size,r=t.scrollMovable,n=o/i.total,s=Math.round(-r[e]*n),a=Math.round(o*n);this.element.style.display=n>=1?"none":"",s+a>o?a=o-s:s<0&&(a+=s,s=0),t.elementSize!==a&&(t.element.style[t.size]=a+"px",t.elementSize=a),t.movable.moveAxis(e,s)},$v.prototype.show=function(){this.element.style.opacity=.7,this.element.style.visibility="visible"},$v.prototype.hide=function(){this.alwaysVisible||(this.element.style.opacity=0)};var Jv=function(t){function e(e,i){t.call(this);var o=this;this.element=e,this._initOptions(i);var r,n=(navigator.userAgent,(r=ze().mobileOS).ios||r.android);o._native=o.options.useNative&&n;var s=Fy('<div class="km-scroll-header"/>');if(o._native)return W(e,"km-native-scroller"),Ny(s,e),void Wv(o,{scrollElement:e,fixedContainer:e.children[0]});e.style.overflow="hidden",W(e,"km-scroll-wrapper"),function(t,e){for(t.appendChild(e);t.firstChild!==e;)e.appendChild(t.firstChild)}(e,Fy('<div class="km-scroll-container"/>')),Ny(s,e);var a=e.children[1],p=new xv(e),l=new Sv(a),h=new _v({element:a,container:e,forcedEnabled:o.options.zoom}),c=this.options.avoidScrolling,u=new yi(e,{touchAction:"none",allowSelection:!0,preventDragEvent:!0,captureUpIfMoved:!0,multiTouch:o.options.zoom,supportDoubleTap:o.options.supportDoubleTap,start:function(t){h.refresh();var e=Xv(t.x.velocity),i=Xv(t.y.velocity),r=2*e>=i,n=2*i>=e;!o.fixedContainer.contains(t.event.target)&&!c(t)&&o.enabled&&(h.x.enabled&&r||h.y.enabled&&n)?u.capture():u.cancel()}}),d=new kv({movable:l,dimensions:h,userEvents:u,elastic:o.options.elastic}),f=new Zv({movable:l,dimensions:h,userEvents:u,tapCapture:p}),g=new Kv({moveTo:function(t){o.scrollTo(t.x,t.y)}});l.bind(Yv,(function(){o.scrollTop=-l.y,o.scrollLeft=-l.x,o.trigger(qv,{scrollTop:o.scrollTop,scrollLeft:o.scrollLeft})})),o.options.mousewheelScrolling&&(this._wheelScrollHandler=this._wheelScroll.bind(this),Re(e,"wheel",this._wheelScrollHandler)),Wv(o,{movable:l,dimensions:h,zoomSnapBack:f,animatedScroller:g,userEvents:u,pane:d,tapCapture:p,pulled:!1,enabled:!0,scrollElement:a,scrollTop:0,scrollLeft:0,fixedContainer:e.children[0]}),o._initAxis("x"),o._initAxis("y"),o._wheelEnd=function(){o._wheel=!1,o.userEvents.end(0,o._wheelY)},h.refresh(),o.options.pullToRefresh&&o._initPullToRefresh()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._initOptions=function(t){this.options=at({},this.options,t)},e.prototype._wheelScroll=function(t){if(!t.ctrlKey){this._wheel||(this._wheel=!0,this._wheelY=0,this.userEvents.press(0,this._wheelY)),clearTimeout(this._wheelTimeout),this._wheelTimeout=setTimeout(this._wheelEnd,50);var e=function(t){var e,i=t.wheelDeltaY;return t.wheelDelta?(void 0===i||i)&&(e=t.wheelDelta):t.detail&&t.axis===t.VERTICAL_AXIS&&(e=10*-t.detail),e}(t);e&&(this._wheelY+=e,this.userEvents.move(0,this._wheelY)),t.preventDefault()}},e.prototype.makeVirtual=function(){this.dimensions.y.makeVirtual()},e.prototype.virtualSize=function(t,e){this.dimensions.y.virtualSize(t,e)},e.prototype.height=function(){return this.dimensions.y.size},e.prototype.scrollHeight=function(){return this.scrollElement.scrollHeight},e.prototype.scrollWidth=function(){return this.scrollElement.scrollWidth},e.prototype._resize=function(){this._native||this.contentResized()},e.prototype.setOptions=function(t){this._initOptions(t),t.pullToRefresh&&this._initPullToRefresh()},e.prototype.reset=function(){this._native?this.scrollElement.scrollTop(0):(this.movable.moveTo({x:0,y:0}),this._scale(1))},e.prototype.contentResized=function(){this.dimensions.refresh(),this.pane.x.outOfBounds()&&this.movable.moveAxis("x",this.dimensions.x.min),this.pane.y.outOfBounds()&&this.movable.moveAxis("y",this.dimensions.y.min)},e.prototype.zoomOut=function(){var t=this.dimensions;t.refresh(),this._scale(t.fitScale),this.movable.moveTo(t.centerCoordinates())},e.prototype.enable=function(){this.enabled=!0},e.prototype.disable=function(){this.enabled=!1},e.prototype.scrollTo=function(t,e){this._native?(this.scrollElement.scrollLeft(Xv(t)),this.scrollElement.scrollTop(Xv(e))):(this.dimensions.refresh(),this.movable.moveTo({x:t,y:e}))},e.prototype.animatedScrollTo=function(t,e,i){var o,r;this._native?this.scrollTo(t,e):(o={x:this.movable.x,y:this.movable.y},r={x:t,y:e},this.animatedScroller.setCoordinates(o,r),this.animatedScroller.setCallback(i),this.animatedScroller.start())},e.prototype.pullHandled=function(){},e.prototype.destroy=function(){Ve(this.element,"wheel",this._wheelScrollHandler),this.userEvents&&this.userEvents.destroy()},e.prototype._scale=function(t){this.dimensions.rescale(t),this.movable.scaleTo(t)},e.prototype._initPullToRefresh=function(){},e.prototype._dragEnd=function(){},e.prototype._paneChange=function(){},e.prototype._initAxis=function(t){var e=this,i=e.movable,o=e.dimensions[t],r=e.tapCapture,n=e.pane[t],s=new $v({axis:t,movable:i,dimension:o,container:e.element,alwaysVisible:e.options.visibleScrollHints});o.bind(Yv,(function(){s.refresh()})),n.bind(Yv,(function(){s.show()})),e[t+"inertia"]=new Qv({axis:t,paneAxis:n,movable:i,tapCapture:r,userEvents:e.userEvents,dimension:o,elastic:e.options.elastic,friction:e.options.friction||.96,velocityMultiplier:e.options.velocityMultiplier||10,end:function(){s.hide(),e.trigger("scrollEnd",{axis:t,scrollTop:e.scrollTop,scrollLeft:e.scrollLeft})}})},e}(Xe);te(Jv,{name:"Scroller",zoom:!1,pullOffset:140,visibleScrollHints:!1,elastic:!0,useNative:!1,mousewheelScrolling:!0,avoidScrolling:function(){return!1},pullToRefresh:!1,messages:{pullTemplate:"Pull to refresh",releaseTemplate:"Release to refresh",refreshTemplate:"Refreshing"}}),Gy(Jv,["pull",qv,"resize"]);var tm=function(t,e){void 0===e&&(e={}),this.sender=e.sender||t,this.widget=t,this.rtl=Boolean(e.rtl)};tm.prototype.notify=function(t,e){this.widget&&this.widget.trigger(t,e)};const em=tm;var im=Math,om=im.min,rm=im.pow,nm=q.geometry.Point,sm="marker",am="location",pm="wheel",lm={bubble:Mv,shape:Pv,tile:dv};lm[sm]=Dv;var hm=function(t){function e(e,i,o,r){void 0===i&&(i={}),void 0===o&&(o={}),void 0===r&&(r={}),t.call(this),this._init(e,i,o,r)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.destroy=function(){this.scroller.destroy(),this._tooltip&&this._tooltip.destroy(),this.navigator&&this.navigator.destroy(),this.attribution&&this.attribution.destroy(),this.zoomControl&&this.zoomControl.destroy(),G(this.markers)?this.markers.forEach((function(t){t.destroy()})):this.markers.destroy();for(var e=0;e<this.layers.length;e++)this.layers[e].destroy();Ve(this.element,pm,this._mousewheelHandler),t.prototype.destroy.call(this)},e.prototype._init=function(t,e,i,o){void 0===e&&(e={}),void 0===i&&(i={}),void 0===o&&(o={}),this.support=ze(),this.context=o,this.initObserver(o),this.initServices(o),this._notifyObserver("init"),this._initOptions(e),this._setEvents(e),this.crs=new Vy,this._initElement(t),this._viewOrigin=this._getOrigin(),this._tooltip=this._createTooltip(),this._initScroller(),this._initMarkers(),this._initControls(),this._initLayers(),this._reset();var r=(0,q.throttle)(this._mousewheel.bind(this),50);this._mousewheelHandler=function(t){t.preventDefault(),r(t)},Re(this.element,pm,this._mousewheelHandler)},e.prototype._initOptions=function(t){this.options=at({},this.options,t)},e.prototype._initElement=function(t){this.element=t,W(t,"k-map"),t.style.position="relative",t.setAttribute("data-role","map"),Hy(t);var e=Fy("<div />");this.element.appendChild(e)},e.prototype.initServices=function(t){void 0===t&&(t={}),this.widgetService=new em(this,t)},e.prototype.initObserver=function(t){void 0===t&&(t={}),this.observers=[],this.addObserver(t.observer)},e.prototype.addObserver=function(t){t&&this.observers.push(t)},e.prototype.removeObserver=function(t){var e=this.observers.indexOf(t);e>=0&&this.observers.splice(e,1)},e.prototype.requiresHandlers=function(t){for(var e=this.observers,i=0;i<e.length;i++)if(e[i].requiresHandlers(t))return!0},e.prototype.trigger=function(e,i){void 0===i&&(i={}),i.sender=this;for(var o=this.observers,r=!1,n=0;n<o.length;n++)o[n].trigger(e,i)&&(r=!0);return r||t.prototype.trigger.call(this,e,i),r},e.prototype._notifyObserver=function(t,e){void 0===e&&(e={}),e.sender=this;for(var i=this.observers,o=!1,r=0;r<i.length;r++)i[r].trigger(t,e)&&(o=!0);return o},e.prototype.zoom=function(t){var e,i=this.options;if(jt(t)){var o=im.round(Xt(t,i.minZoom,i.maxZoom));i.zoom!==o&&(i.zoom=o,this.widgetService.notify("zoomChange",{zoom:i.zoom}),this._reset()),e=this}else e=i.zoom;return e},e.prototype.center=function(t){var e;if(t){var i=xy.create(t),o=xy.create(this.options.center);i.equals(o)||(this.options.center=i.toArray(),this.widgetService.notify(rv,{center:this.options.center}),this._reset()),e=this}else e=xy.create(this.options.center);return e},e.prototype.extent=function(t){var e;return t?(this._setExtent(t),e=this):e=this._getExtent(),e},e.prototype.setOptions=function(t){void 0===t&&(t={});var e=this.element;this.destroy(),Hy(e),this._init(e,t,{},this.context),this._reset()},e.prototype.locationToLayer=function(t,e){var i=!this.options.wraparound,o=xy.create(t);return this.crs.toPoint(o,this._layerSize(e),i)},e.prototype.layerToLocation=function(t,e){var i=!this.options.wraparound,o=nm.create(t);return this.crs.toLocation(o,this._layerSize(e),i)},e.prototype.locationToView=function(t){var e=xy.create(t),i=this.locationToLayer(this._viewOrigin);return this.locationToLayer(e).translateWith(i.scale(-1))},e.prototype.viewToLocation=function(t,e){var i=this.locationToLayer(this._getOrigin(),e),o=nm.create(t).clone().translateWith(i);return this.layerToLocation(o,e)},e.prototype.eventOffset=function(t){var e,i,o=Ft(this.element);if(t.x&&t.x[am]||t.y&&t.y[am])e=t.x[am]-o.left,i=t.y[am]-o.top;else{var r=t.originalEvent||t;e=Kt(r.pageX,r.clientX)-o.left,i=Kt(r.pageY,r.clientY)-o.top}return new q.geometry.Point(e,i)},e.prototype.eventToView=function(t){var e=this.eventOffset(t);return this.locationToView(this.viewToLocation(e))},e.prototype.eventToLayer=function(t){return this.locationToLayer(this.eventToLocation(t))},e.prototype.eventToLocation=function(t){var e=this.eventOffset(t);return this.viewToLocation(e)},e.prototype.viewSize=function(){var t=this.element,e=this._layerSize(),i=t.clientWidth;return this.options.wraparound||(i=om(e,i)),{width:i,height:om(e,t.clientHeight)}},e.prototype.exportVisual=function(){return this._reset(),!1},e.prototype.hideTooltip=function(){this._tooltip&&this._tooltip.hide()},e.prototype._setOrigin=function(t,e){var i,o=this.viewSize(),r=this._origin=xy.create(t);return(i=this.locationToLayer(r,e)).x+=o.width/2,i.y+=o.height/2,this.options.center=this.layerToLocation(i,e).toArray(),this.widgetService.notify(rv,{center:this.options.center}),this},e.prototype._getOrigin=function(t){var e,i=this.viewSize();return!t&&this._origin||((e=this.locationToLayer(this.center())).x-=i.width/2,e.y-=i.height/2,this._origin=this.layerToLocation(e)),this._origin},e.prototype._setExtent=function(t){var e=iv.create(t),i=e.se.clone();this.options.wraparound&&i.lng<0&&t.nw.lng>0&&(i.lng=180+(180+i.lng));var o=new iv(e.nw,i);this.center(o.center());var r,n=this.element.clientWidth,s=this.element.clientHeight;for(r=this.options.maxZoom;r>=this.options.minZoom;r--){var a=this.locationToLayer(o.nw,r),p=this.locationToLayer(o.se,r),l=im.abs(p.x-a.x),h=im.abs(p.y-a.y);if(l<=n&&h<=s)break}this.zoom(r)},e.prototype._getExtent=function(){var t=this._getOrigin(),e=this.locationToLayer(t),i=this.viewSize();e.x+=i.width,e.y+=i.height;var o=this.layerToLocation(e);return new iv(t,o)},e.prototype._zoomAround=function(t,e){this._setOrigin(this.layerToLocation(t,e),e),this.zoom(e)},e.prototype._initControls=function(){var t=this.options.controls;t.attribution&&this._createAttribution(t.attribution),this.support.mobileOS||(t.navigator&&this._createNavigator(t.navigator),t.zoom&&this._createZoomControl(t.zoom))},e.prototype._createControlElement=function(t,e){var i=t.position||e,o="."+Wy(i).replace(" ","."),r=this.element.querySelector(".k-map-controls"+o)||[];if(0===r.length){var n=document.createElement("div");W(n,"k-map-controls "+Wy(i)),r=n,this.element.appendChild(r)}var s=document.createElement("div");return r.appendChild(s),s},e.prototype._createAttribution=function(t){var e=this._createControlElement(t,"bottomRight");this.attribution=new Xy(e,t)},e.prototype._createNavigator=function(t){var e=this._createControlElement(t,"topLeft"),i=this.navigator=new Zy(e,at({},t,{icons:this.options.icons}));this._navigatorPan=this._navigatorPan.bind(this),i.bind("pan",this._navigatorPan),this._navigatorCenter=this._navigatorCenter.bind(this),i.bind("center",this._navigatorCenter)},e.prototype._navigatorPan=function(t){var e=this.scroller,i=e.scrollLeft+t.x,o=e.scrollTop-t.y,r=this._virtualSize,n=this.element.clientWidth,s=this.element.clientHeight;i=Xt(i,r.x.min,r.x.max-n),o=Xt(o,r.y.min,r.y.max-s),this.scroller.one("scroll",Dy(this._scrollEnd,this)),this.scroller.scrollTo(-i,-o)},e.prototype._navigatorCenter=function(){this.center(this.options.center)},e.prototype._createZoomControl=function(t){var e=this._createControlElement(t,"topLeft"),i=this.zoomControl=new $y(e,t,this.options.icons);this._zoomControlChange=this._zoomControlChange.bind(this),i.bind("change",this._zoomControlChange)},e.prototype._zoomControlChange=function(t){this.trigger("zoomStart",{originalEvent:t})||(this.zoom(this.zoom()+t.delta),this.trigger("zoomEnd",{originalEvent:t}))},e.prototype._initScroller=function(){var t=this.support.mobileOS?.93:.9,e=!1!==this.options.zoomable,i=this.scroller=new Jv(this.element.children[0],{friction:t,velocityMultiplier:5,zoom:e,mousewheelScrolling:!1,supportDoubleTap:!0});i.bind("scroll",Dy(this._scroll,this)),i.bind("scrollEnd",Dy(this._scrollEnd,this)),i.userEvents.bind("gesturestart",Dy(this._scaleStart,this)),i.userEvents.bind("gestureend",Dy(this._scale,this)),i.userEvents.bind("doubleTap",Dy(this._doubleTap,this)),i.userEvents.bind("tap",Dy(this._tap,this)),this.scrollElement=i.scrollElement},e.prototype._initLayers=function(){for(var t=this.options.layers,e=this.layers=[],i=0;i<t.length;i++){var o=t[i],r=this._createLayer(o);e.push(r)}},e.prototype._createLayer=function(t){var e=t.type||"shape",i=this.options.layerDefaults[e],o=e===sm?at({},this.options.markerDefaults,t,{icons:this.options.icons}):at({},i,t),r=new(0,lm[e])(this,o);return e===sm&&(this.markers=r),r},e.prototype._createTooltip=function(){return new nv(this.widgetService,this.options.tooltip)},e.prototype._initMarkers=function(){(this.options.layers||[]).filter((function(t){return t&&t.type===sm})).length>0||(this.markers=new Dv(this,at({},this.options.markerDefaults,{icons:this.options.icons})),this.markers.add(this.options.markers))},e.prototype._scroll=function(t){var e=this.locationToLayer(this._viewOrigin).round(),i=t.sender.movable,o=new q.geometry.Point(i.x,i.y).scale(-1).scale(1/i.scale);e.x+=o.x,e.y+=o.y,this._scrollOffset=o,this._tooltip.offset=o,this.hideTooltip(),this._setOrigin(this.layerToLocation(e)),this.trigger("pan",{originalEvent:t,origin:this._getOrigin(),center:this.center()})},e.prototype._scrollEnd=function(t){this._scrollOffset&&this._panComplete()&&(this._scrollOffset=null,this._panEndTimestamp=Fe(),this.trigger("panEnd",{originalEvent:t,origin:this._getOrigin(),center:this.center()}))},e.prototype._panComplete=function(){return Fe()-(this._panEndTimestamp||0)>50},e.prototype._scaleStart=function(t){if(this.trigger("zoomStart",{originalEvent:t})){var e=t.touches[1];e&&e.cancel()}},e.prototype._scale=function(t){var e=this.scroller.movable.scale,i=this._scaleToZoom(e),o=new q.geometry.Point(t.center.x,t.center.y),r=this.viewToLocation(o,i),n=this.locationToLayer(r,i).translate(-o.x,-o.y);this._zoomAround(n,i),this.trigger("zoomEnd",{originalEvent:t})},e.prototype._scaleToZoom=function(t){var e=this._layerSize()*t/this.options.minSize,i=im.log(e)/im.log(2);return im.round(i)},e.prototype._reset=function(){this.attribution&&this.attribution.filter(this.center(),this.zoom()),this._viewOrigin=this._getOrigin(!0),this._resetScroller(),this.hideTooltip(),this.trigger("beforeReset"),this.trigger("reset")},e.prototype._resetScroller=function(){var t=this.scroller,e=t.dimensions.x,i=t.dimensions.y,o=this._layerSize(),r=this.extent().nw,n=this.locationToLayer(r).round();t.movable.round=!0,t.reset(),t.userEvents.cancel();var s=this.zoom();t.dimensions.forcedMinScale=rm(2,this.options.minZoom-s),t.dimensions.maxScale=rm(2,this.options.maxZoom-s);var a={min:-n.x,max:o-n.x},p={min:-n.y,max:o-n.y};if(this.options.wraparound&&(a.max=20*o,a.min=-a.max),!1===this.options.pannable){var l=this.viewSize();a.min=p.min=0,a.max=l.width,p.max=l.height}e.makeVirtual(),i.makeVirtual(),e.virtualSize(a.min,a.max),i.virtualSize(p.min,p.max),this._virtualSize={x:a,y:p}},e.prototype._renderLayers=function(){},e.prototype._layerSize=function(t){var e=Kt(t,this.options.zoom);return this.options.minSize*rm(2,e)},e.prototype._tap=function(t){if(this._panComplete()){var e=this.eventOffset(t);this.hideTooltip(),this.trigger("click",{originalEvent:t,location:this.viewToLocation(e)})}},e.prototype._doubleTap=function(t){if(!1!==this.options.zoomable&&!this.trigger("zoomStart",{originalEvent:t})){var e=this.zoom()+1,i=this.eventOffset(t),o=this.viewToLocation(i),r=this.locationToLayer(o,e).translate(-i.x,-i.y);this._zoomAround(r,e),this.trigger("zoomEnd",{originalEvent:t})}},e.prototype._mousewheel=function(t){var e=Et(t)>0?-1:1,i=this.options,o=this.zoom(),r=Xt(o+e,i.minZoom,i.maxZoom);if(!1!==i.zoomable&&r!==o&&!this.trigger("zoomStart",{originalEvent:t})){var n=this.eventOffset(t),s=this.viewToLocation(n),a=this.locationToLayer(s,r).translate(-n.x,-n.y);this._zoomAround(a,r),this.trigger("zoomEnd",{originalEvent:t})}},e.prototype._toDocumentCoordinates=function(t){var e=Ft(this.element);return{left:Zt(t.x+e.left),top:Zt(t.y+e.top)}},e}(Xe);te(hm,{name:"Map",controls:{attribution:!0,navigator:{panStep:100},zoom:!0},layers:[],layerDefaults:{shape:{style:{fill:{color:"#fff"},stroke:{color:"#aaa",width:.5}}},bubble:{style:{fill:{color:"#fff",opacity:.5},stroke:{color:"#aaa",width:.5}}},marker:{shape:"pinTarget",tooltip:{position:"top"}}},center:[0,0],icons:{type:"font",svgIcons:{}},zoom:3,minSize:256,minZoom:1,maxZoom:19,markers:[],markerDefaults:{shape:"pinTarget",tooltip:{position:"top"}},wraparound:!0,renderPointsAsMarkers:!1}),Gy(hm,["beforeReset","click","markerActivate","markerClick","markerCreated","markerMouseEnter","markerMouseLeave","pan","panEnd","reset","shapeClick","shapeCreated","shapeFeatureCreated","shapeMouseEnter","shapeMouseLeave","zoomEnd","zoomStart"]);const cm=hm;var um=function(t,e){return t.map(e).reduce((function(t,e){return t+e}),0)},dm=function(t,e){return t.y0===e.y0?t.index-e.index:t.y0+t.y1-e.y0-e.y1},fm=function(t,e){return dm(t.source,e.source)},gm=function(t,e){return dm(t.target,e.target)},ym=function(t){return t.value};function vm(t){t.forEach((function(t){t.targetLinks.forEach((function(t){t.source.sourceLinks.sort(gm)})),t.sourceLinks.forEach((function(t){t.target.targetLinks.sort(fm)}))}))}var mm=function(t,e){return"left"===t.align?t.depth:"right"===t.align?e-t.height:t.sourceLinks.length?t.depth:e},xm=function(t){var e=t.nodesOptions,i=e.offset;void 0===i&&(i={});var o=e.align;this.data={nodes:t.nodes.map((function(t){return at({},{offset:i,align:o},t)})),links:t.links.map((function(t){return at({},t)}))},this.width=t.width,this.height=t.height,this.offsetX=t.offsetX||0,this.offsetY=t.offsetY||0,this.nodeWidth=t.nodesOptions.width,this.nodePadding=t.nodesOptions.padding,this.reverse=t.reverse,this.targetColumnIndex=t.targetColumnIndex,this.loops=t.loops,this.autoLayout=t.autoLayout};xm.prototype.calculate=function(){var t=this.data,e=t.nodes,i=t.links;this.connectLinksToNodes(e,i),this.calculateNodeValues(e);var o=this.calculateNodeHeights(e);if(o)return{nodes:[],links:[],columns:[],circularLinks:o};this.calculateNodeDepths(e);var r=this.calculateNodeColumns(e);return this.calculateNodeBreadths(r),this.applyNodesOffset(e),this.calculateLinkBreadths(e),Object.assign({},this.data,{columns:r})},xm.prototype.connectLinksToNodes=function(t,e){var i=new Map;t.forEach((function(t,e){t.index=e,t.sourceLinks=[],t.targetLinks=[],t.id=void 0!==t.id?t.id:t.label.text,i.set(t.id,t)})),e.forEach((function(t){t.source=i.get(t.sourceId),t.target=i.get(t.targetId),t.source.sourceLinks.push(t),t.target.targetLinks.push(t)}))},xm.prototype.calculateNodeValues=function(t){t.forEach((function(t){t.value=Math.max(um(t.sourceLinks,ym),um(t.targetLinks,ym))}))},xm.prototype.calculateNodeDepths=function(t){for(var e=new Set(t),i=new Set,o=0;e.size;){for(var r=Array.from(e),n=0;n<r.length;n++){var s=r[n];s.depth=o;for(var a=0;a<s.sourceLinks.length;a++){var p=s.sourceLinks[a];i.add(p.target)}}o++,e=i,i=new Set}},xm.prototype.calculateNodeHeights=function(t){for(var e=t.length,i=new Set(t),o=new Set,r=0,n=function(t){t.height=r,t.targetLinks.forEach((function(t){o.add(t.source)}))};i.size;){if(i.forEach(n),++r>e)return!0;i=o,o=new Set}return!1},xm.prototype.calculateNodeColumns=function(t){for(var e,i,o=(e=t,i=function(t){return t.depth},Math.max.apply(null,e.map(i))),r=(this.width-this.offsetX-this.nodeWidth)/o,n=new Array(o+1),s=0;s<t.length;s++){var a=t[s],p=Math.max(0,Math.min(o,mm(a,o)));a.x0=this.offsetX+p*r,a.x1=a.x0+this.nodeWidth,a.layer=p,n[p]=n[p]||[],n[p].push(a)}return n},xm.prototype.calculateNodeBreadths=function(t){var e,i,o=this,r=(e=t,i=function(t){return(o.height-o.offsetY-(t.length-1)*o.nodePadding)/um(t,ym)},Math.min.apply(null,e.map(i)));if(t.forEach((function(t){var e=o.offsetY;t.forEach((function(t){t.y0=e,t.y1=e+t.value*r,e=t.y1+o.nodePadding,t.sourceLinks.forEach((function(t){t.width=t.value*r}))})),e=(o.height-e+o.nodePadding)/(t.length+1),t.forEach((function(t,i){t.y0+=e*(i+1),t.y1+=e*(i+1)}))})),!1!==this.autoLayout)for(var n=void 0!==this.loops?this.loops:t.length-1,s=this.targetColumnIndex||1,a=0;a<n;a++)this.reverse?(this.uncurlLinksToRight(t,s),this.uncurlLinksToLeft(t,s)):(this.uncurlLinksToLeft(t,s),this.uncurlLinksToRight(t,s));t.forEach(vm)},xm.prototype.applyNodesOffset=function(t){t.forEach((function(t){var e=(t.offset?t.offset.left:0)||0,i=(t.offset?t.offset.top:0)||0;t.x0+=e,t.x1+=e,t.y0+=i,t.y1+=i}))},xm.prototype.calculateLinkBreadths=function(t){t.forEach((function(t){var e=t.sourceLinks,i=t.targetLinks,o=t.y0,r=o;e.forEach((function(t){t.x0=t.source.x1,t.y0=o+t.width/2,o+=t.width})),i.forEach((function(t){t.x1=t.target.x0,t.y1=r+t.width/2,r+=t.width}))}))},xm.prototype.uncurlLinksToRight=function(t,e){for(var i=this,o=t.length,r=e;r<o;r++){var n=t[r];n.forEach((function(t){var e=0,o=0;t.targetLinks.forEach((function(r){var n=r.value*(t.layer-r.source.layer);e+=i.targetTopPos(r.source,t)*n,o+=n}));var r=0===e?0:e/o-t.y0;t.y0+=r,t.y1+=r,vm([t])})),n.sort(dm),this.arrangeNodesVertically(n)}},xm.prototype.uncurlLinksToLeft=function(t,e){for(var i=this,o=t.length-1-e;o>=0;o--){for(var r=t[o],n=function(t){var e=r[t],o=0,n=0;e.sourceLinks.forEach((function(t){var r=t.value*(t.target.layer-e.layer);o+=i.sourceTopPos(e,t.target)*r,n+=r}));var s=0===o?0:o/n-e.y0;e.y0+=s,e.y1+=s,vm([e])},s=0;s<r.length;s++)n(s);r.sort(dm),this.arrangeNodesVertically(r)}},xm.prototype.arrangeNodesVertically=function(t){var e=t.length-1;this.arrangeUp(t,this.height,e),this.arrangeDown(t,this.offsetY,0)},xm.prototype.arrangeDown=function(t,e,i){for(var o=e,r=i;r<t.length;r++){var n=t[r],s=Math.max(0,o-n.y0);n.y0+=s,n.y1+=s,o=n.y1+this.nodePadding}},xm.prototype.arrangeUp=function(t,e,i){for(var o=e,r=i;r>=0;--r){var n=t[r],s=Math.max(0,n.y1-o);n.y0-=s,n.y1-=s,o=n.y0-this.nodePadding}},xm.prototype.sourceTopPos=function(t,e){for(var i=e.y0-(e.targetLinks.length-1)*this.nodePadding/2,o=0;o<e.targetLinks.length;o++){var r=e.targetLinks[o];if(r.source===t)break;i+=r.width+this.nodePadding}for(var n=0;n<t.sourceLinks.length;n++){var s=t.sourceLinks[n];if(s.target===e)break;i-=s.width}return i},xm.prototype.targetTopPos=function(t,e){for(var i=t.y0-(t.sourceLinks.length-1)*this.nodePadding/2,o=0;o<t.sourceLinks.length;o++){var r=t.sourceLinks[o];if(r.target===e)break;i+=r.width+this.nodePadding}for(var n=0;n<e.targetLinks.length;n++){var s=e.targetLinks[n];if(s.source===t)break;i-=s.width}return i};var bm=function(t){return new xm(t).calculate()};function _m(t,e,i,o,r,n){var s=(n-e)*(i-t),a=(o-e)*(r-t);return s>a?1:s===a?0:-1}var wm=function(t){this.options=at({},this.options,t),this.createVisual()};wm.prototype.createVisual=function(){this.visual=this.createElement()},wm.prototype.exportVisual=function(){return this.visual},wm.prototype.createElement=function(){var t=this,e=this.options.visual;return e?e({sender:this.getSender(),options:this.visualOptions(),createVisual:function(){return t.getElement()}}):this.getElement()},wm.prototype.getSender=function(){return this};var km=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getElement=function(){return q.drawing.Path.fromRect(this.getRect(),this.visualOptions())},e.prototype.getRect=function(){var t=this.options.node;return new q.geometry.Rect([t.x0,t.y0],[t.x1-t.x0,t.y1-t.y0])},e.prototype.getLabelText=function(t){var e=t.labels.ariaTemplate;if(e)return e({node:t.node})},e.prototype.visualOptions=function(){var t=at({},this.options,this.options.node),e=this.getLabelText(t);return{fill:{color:t.color,opacity:t.opacity},stroke:{width:0},className:"k-sankey-node",role:"graphics-symbol",ariaRoleDescription:"Node",ariaLabel:e}},e.prototype.createFocusHighlight=function(){if(this.options.navigatable)return this._highlight=q.drawing.Path.fromRect(this.getRect(),{stroke:this.options.focusHighlight.border,visible:!1}),this._highlight},e.prototype.focus=function(t){if(this._highlight){var e=(t||{}).highlight;void 0===e&&(e=!0),e&&this._highlight.options.set("visible",!0);var i=this.options.node.id;this.visual.options.set("id",i),this.options.root()&&this.options.root().setAttribute(c,i)}},e.prototype.blur=function(){this._highlight&&(this._highlight.options.set("visible",!1),this.visual.options.set("id",""),this.options.root()&&this.options.root().removeAttribute(c))},e}(wm),Am=function(t,e,i){return t.color||e[i%e.length]},Sm=function(t,e,i,o){var r=at({},e,e.node);return at({},{color:Am(t,i,o)},r,{node:t},{visual:t.visual,opacity:t.opacity,offset:t.offset,color:t.color})},Cm=function(t,e,i,o,r){var n=1-r,s=n*n,a=r*r;return t*s*n+3*e*r*s+3*i*a*n+o*a*r},Pm=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getElement=function(){var t=this.options.link,e=t.x0,i=t.x1,o=t.y0,r=t.y1,n=(e+i)/2;return new q.drawing.Path(this.visualOptions()).moveTo(e,o).curveTo([n,o],[n,r],[i,r])},e.prototype.getLabelText=function(t){var e=t.labels.ariaTemplate;if(e)return e({link:t.link})},e.prototype.visualOptions=function(){var t=this.options,e=this.options.link,i=this.getLabelText(t);return{stroke:{width:t.link.width,color:e.color||t.color,opacity:jt(e.opacity)?e.opacity:t.opacity},role:"graphics-symbol",ariaRoleDescription:"Link",ariaLabel:i}},e.prototype.createFocusHighlight=function(){if(this.options.navigatable){var t=this.options.link,e=t.x0,i=t.x1,o=t.y0,r=t.y1,n=(e+i)/2,s=t.width/2,a=function(t,e){var i=t.width/2,o=e?t.x1:t.x0,r=e?t.x0:t.x1,n=e?t.y1:t.y0,s=e?t.y0:t.y1,a=(o+r)/2,p=[a,Cm(n,n,s,s,.5)],l=.4999,h=[Cm(o,a,a,r,l),Cm(n,n,s,s,l)],c=function(t,e,i,o,r){var n,s,a=(t+i)/2,p=(e+o)/2;if(e===o)n=0,s=r/2;else if(t===i)n=r/2,s=0;else{var l=-1/((o-e)/(i-t));s=l*(n=r/2/Math.sqrt(1+l*l))}return{P1:{x:a-n,y:p-s},P2:{x:a+n,y:p+s}}}(p[0],p[1],h[0],h[1],t.width),u=[a,Cm(n+i,n+i,s+i,s+i,.5)],d=c.P1.y>c.P2.y?c.P1:c.P2,f=(n>s?1:-1)*i,g=o,y=r;return a-((function(t,e,i,o,r){var n=(t.x+e.x)/2,s=(t.y+e.y)/2,a=e.x-t.x,p=-(e.y-t.y),l=a,h=Math.sqrt(p*p+l*l),c=n+(p=p/h*i),u=s+(l=l/h*i),d=n-p,f=s-l,g=r.x-o.x,y=r.y-o.y,v=y*(c-d)-g*(u-f);if(Math.abs(v)<1e-10)return null;var m=(g*(f-o.y)-y*(d-o.x))/v,x=((c-d)*(f-o.y)-(u-f)*(d-o.x))/v;return m>=0&&m<=1&&x>=0&&x<=1?{x:d+m*(c-d)}:null}(d,{x:u[0],y:u[1]},i,{x:u[0],y:u[1]},{x:Math.max(1,u[0]+f),y:u[1]})||{x:(u[0]+d.x)/2}).x-.125*g-.125*y)/.75}(t,this.options.rtl);this._highlight=new q.drawing.Path({stroke:this.options.focusHighlight.border,visible:!1}).moveTo(e,o+s).lineTo(e,o-s).curveTo([n+a,o-s],[n+a,r-s],[i,r-s]).lineTo(i,r+s).curveTo([n-a,r+s],[n-a,o+s],[e,o+s])}},e.prototype.focus=function(t){if(this._highlight){var e=(t||{}).highlight;void 0===e&&(e=!0),e&&this._highlight.options.set("visible",!0);var i=this.options.link.sourceId+"->"+this.options.link.targetId;this.visual.options.set("id",i),this.options.root()&&this.options.root().setAttribute(c,i)}},e.prototype.blur=function(){this._highlight&&(this._highlight.options.set("visible",!1),this.visual.options.set("id",""),this.options.root()&&this.options.root().removeAttribute(c))},e}(wm),Tm="inside",Mm="before",Om="after",Lm=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getElement=function(){var t=at({},this.options,this.options.node.label),e=t.node,i=t.diagramMinX,o=t.diagramMaxX,r=t.text,n=t.offset,s=t.rtl,a=t.position;if(s&&a!==Tm&&(a=a===Mm?Om:Mm),!t.visible||!r)return null;var p=new wi(e.x0,e.y0,e.x1,e.y1),l=this.visualOptions();s&&!l.align&&(l.align="right");var h=new $i(r,l);h.reflow(new wi);var c=h.box,u=p.center().y-c.height()/2,d=e.x1+c.width()>o,f=e.x0-c.width()<i,g=a===Mm||a===Tm&&d?Mm:Om;s&&(g=a===Om||a===Tm&&f?Om:Mm);var y=[g===Mm?e.x0-c.width():e.x1,u],v=new wi(y[0],y[1],y[0]+c.width(),y[1]+c.height());return v.translate(n.left||0,n.top||0),h.reflow(v),h.renderVisual(),h.visual},e.prototype.visualOptions=function(){var t=at({},this.options,this.options.node.label);return{color:t.color,font:t.font,border:t.border,margin:t.margin,padding:t.padding,align:t.align,paintOrder:t.paintOrder,stroke:t.stroke}},e}(wm);te(Lm,{position:Tm});var Bm=function(t,e,i,o,r){return at({},e,{node:t,diagramMinX:o,diagramMaxX:r,rtl:i,visual:t.label.visual,visible:t.label.visible,margin:t.label.margin,padding:t.label.padding,border:t.label.border,align:t.label.align,offset:t.label.offset})},Im=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getElement=function(){var t=this.options,e=t.drawingRect,i=t.text;if(!1===t.visible||!i)return null;var o=eo.buildTitle(i,t);return o.reflow(e),o.renderVisual(),o.visual},e.prototype.createElement=function(){return this.getElement()},e}(wm);te(Im,{align:f,border:{width:0},margin:dt(5),padding:dt(5)});var Em=function(t,e){return t.node.x0-e.node.x0!=0?t.node.x0-e.node.x0:t.node.y0-e.node.y0},Rm=function(t,e){return t.node.x1-e.node.x1!=0?t.node.x1-e.node.x1:e.node.y0-t.node.y0},Vm=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getElement=function(){var t=this.options,e=t.drawingRect,i=t.rtl,o=t.nodes;void 0===o&&(o=[]);var r=t.item,n=t.position;if(!1===t.visible||!o.length)return null;var s,a=t.labels||{};a.content&&(s=vt(a));var p=o.map((function(t){var e=t.label&&t.label.text||"";return{text:s?s({text:e,node:t}):e,area:{background:void 0!==r.areaBackground?r.areaBackground:t.color,opacity:void 0!==r.areaOpacity?r.areaOpacity:t.opacity},node:t}}));p.sort(function(t){return t?Rm:Em}(i));var l=i&&n!==C&&n!==B,h=new rh(Object.assign({},t,{data:p,reverse:l}),{rtl:i});return h.reflow(e),h.renderVisual(),h.visual},e.prototype.createElement=function(){return this.getElement()},e}(wm);te(Vm,{markers:{visible:!1},item:{type:_n,cursor:N,opacity:1},position:d,align:f,accessibility:{role:"presentation",ariaLabel:null,ariaRoleDescription:null},border:{width:0}});var zm="link",jm="node",Dm=function(t){function e(e,i,o){t.call(this),this._initTheme(o),this._setOptions(i),this._initElement(e),this._initSurface(),i&&i.data&&(this._redraw(),this._initResizeObserver(),this._initNavigation(e))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.destroy=function(){this.unbind(),this._destroySurface(),this._destroyResizeObserver(),this.element&&(this.element.removeEventListener("keydown",this._keydownHandler),this.element.removeEventListener("focus",this._focusHandler),this.element.removeEventListener("mousedown",this._onDownHandler),this.element.removeEventListener("touchstart",this._onDownHandler),this.element.removeEventListener("pointerdown",this._onDownHandler)),this._focusState=null,this.element=null},e.prototype._initElement=function(t){this.element=t,W(t,["k-chart","k-sankey"]),t.setAttribute("role","graphics-document");var e=this.options.title;e.text&&t.setAttribute("aria-label",e.text),e.description&&t.setAttribute("aria-roledescription",e.description)},e.prototype._initSurface=function(){this.surface||(this._destroySurface(),this._initSurfaceElement(),this.surface=this._createSurface())},e.prototype._initNavigation=function(t){t.tabIndex=t.getAttribute("tabindex")||0,this.options.disableKeyboardNavigation||(this._keydownHandler=this._keydown.bind(this),this._focusHandler=this._focus.bind(this),this._blurHandler=this._blur.bind(this),this._onDownHandler=this._onDown.bind(this),t.addEventListener("keydown",this._keydownHandler),t.addEventListener("focus",this._focusHandler),t.addEventListener("blur",this._blurHandler),t.addEventListener("mousedown",this._onDownHandler),t.addEventListener("touchstart",this._onDownHandler),t.addEventListener("pointerdown",this._onDownHandler),this._focusState={node:this.firstFocusableNode(),link:null})},e.prototype.firstFocusableNode=function(){return this.columns[0][0]},e.prototype._initResizeObserver=function(){var t=this,e=new ResizeObserver((function(e){e.forEach((function(e){var i=e.contentRect,o=i.width,r=i.height;e.target!==t.element||t.size&&t.size.width===o&&t.size.height===r||(t.size={width:o,height:r},t.surface.setSize(t.size),t.resize=!0,t._redraw())}))}));this._resizeObserver=e,e.observe(this.element)},e.prototype._createSurface=function(){return q.drawing.Surface.create(this.surfaceElement,{mouseenter:this._mouseenter.bind(this),mouseleave:this._mouseleave.bind(this),mousemove:this._mousemove.bind(this),click:this._click.bind(this)})},e.prototype._initTheme=function(t){var e=t||this.theme||{};this.theme=e,this.options=at({},e,this.options)},e.prototype.setLinksOpacity=function(t){var e=this;this.linksVisuals.forEach((function(i){e.setOpacity(i,t,i.linkOptions.opacity)}))},e.prototype.setLinksInactivityOpacity=function(t){var e=this;this.linksVisuals.forEach((function(i){e.setOpacity(i,t,i.linkOptions.highlight.inactiveOpacity)}))},e.prototype.setOpacity=function(t,e,i){t.options.set("stroke",Object.assign({},t.options.stroke,{opacity:jt(i)?i:e}))},e.prototype.trigger=function(e,i){var o=i.element.dataItem,r=i.element.type,n=Object.assign({},i,{type:e,targetType:r,dataItem:o});return t.prototype.trigger.call(this,e,n)},e.prototype._mouseenter=function(t){var e=t.element,i=e.type===zm,o=e.type===jm,r=Boolean(e.chartElement&&e.chartElement.options.node);if(!(i&&this.trigger("linkEnter",t)||o&&this.trigger("nodeEnter",t))){var n=this.options.links.highlight;if(i)this.setLinksInactivityOpacity(n.inactiveOpacity),this.setOpacity(e,n.opacity,e.linkOptions.highlight.opacity);else if(o)this.highlightLinks(e,n);else if(r){var s=this.nodesVisuals.get(e.chartElement.options.node.id);this.highlightLinks(s,n)}}},e.prototype._mouseleave=function(t){var e=this,i=t.element,o=i.type===zm,r=i.type===jm,n=Boolean(i.chartElement&&i.chartElement.options.node),s=t.originalEvent.relatedTarget;o&&s&&"text"===s.nodeName||((o||r)&&(this.tooltipTimeOut&&(clearTimeout(this.tooltipTimeOut),this.tooltipTimeOut=null),this.tooltipShown=!1,this.trigger("tooltipHide",t)),o&&this.trigger("linkLeave",t)||r&&this.trigger("nodeLeave",t)||(o||r||n)&&this.linksVisuals.forEach((function(t){e.setOpacity(t,e.options.links.opacity,t.linkOptions.opacity)})))},e.prototype._mousemove=function(t){var e=this,i=this.options.tooltip,o=i.followPointer,r=i.delay,n=t.element,s=n.type;if(!(s!==zm&&s!==jm||this.tooltipShown&&!o)){var a=t.originalEvent,p=this.element.getBoundingClientRect(),l=a.clientX-p.left<p.width/2,h=a.clientY-p.top<p.height/2;if(t.tooltipData={popupOffset:{left:a.pageX,top:a.pageY},popupAlign:{horizontal:l?"left":"right",vertical:h?"top":"bottom"}},s===jm){var c=n.dataItem,u=c.sourceLinks,d=c.targetLinks,f=d.length?d:u;t.nodeValue=f.reduce((function(t,e){return t+e.value}),0)}this.tooltipTimeOut&&(clearTimeout(this.tooltipTimeOut),this.tooltipTimeOut=null);var g=o&&this.tooltipShown?0:r;this.tooltipTimeOut=setTimeout((function(){e.trigger("tooltipShow",t),e.tooltipShown=!0,e.tooltipTimeOut=null}),g)}},e.prototype._click=function(t){var e=t.element,i=e.dataItem,o=e.type===zm,r=e.type===jm,n=this._focusState||{};if(r)!n.link&&this.sameNode(n.node,i)||(this._focusState={node:i,link:null},this._focusNode({highlight:!1})),this.trigger("nodeClick",t);else if(o){var s={sourceId:i.source.id,targetId:i.target.id,value:i.value};this.sameLink(n.link,s)||(this._focusState={node:i.source,link:s},this._focusLink({highlight:!1})),this.trigger("linkClick",t)}},e.prototype.sameNode=function(t,e){return t&&e&&t.id===e.id},e.prototype.sameLink=function(t,e){return t&&e&&t.sourceId===e.sourceId&&t.targetId===e.targetId},e.prototype._focusNode=function(t){this._cleanFocusHighlight();var e=this._focusState.node;this.models.map.get(e.id).focus(t)},e.prototype._focusLink=function(t){this._cleanFocusHighlight();var e=this._focusState.link;this.models.map.get(e.sourceId+"-"+e.targetId).focus(t)},e.prototype._focusNextNode=function(t){void 0===t&&(t=1);var e=this._focusState.node,i=this.columns.findIndex((function(t){return t.find((function(t){return t.id===e.id}))})),o=this.columns[i],r=o.findIndex((function(t){return t.id===e.id})),n=o[r+t];n&&(this._focusState.node=n,this._focusNode())},e.prototype._focusNextLink=function(t){void 0===t&&(t=1);var e=this._focusState.node,i=this._focusState.link,o=e.sourceLinks.findIndex((function(t){return t.sourceId===i.sourceId&&t.targetId===i.targetId})),r=e.targetLinks.findIndex((function(t){return t.sourceId===i.sourceId&&t.targetId===i.targetId}));if(-1!==o){var n=e.sourceLinks[o+t];n&&(this._focusState.link=n,this._focusLink())}else if(-1!==r){var s=e.targetLinks[r+t];s&&(this._focusState.link=s,this._focusLink())}},e.prototype._focusSourceNode=function(){var t=this._focusState.link,e=this.models.map.get(t.sourceId);this._focusState={node:e.options.node,link:null},this._focusNode()},e.prototype._focusTargetNode=function(){var t=this._focusState.link,e=this.models.map.get(t.targetId);this._focusState={node:e.options.node,link:null},this._focusNode()},e.prototype._focusSourceLink=function(){var t=this._focusState.node.sourceLinks[0];t&&(this._focusState.link=t,this._focusLink())},e.prototype._focusTargetLink=function(){var t=this._focusState.node.targetLinks[0];t&&(this._focusState.link=t,this._focusLink())},e.prototype._focus=function(){this._skipFocusHighlight||(this._focusState.link?this._focusLink():this._focusNode()),this._skipFocusHighlight=!1},e.prototype._blur=function(){this._cleanFocusHighlight()},e.prototype._onDown=function(){this._hasFocus()||(this._skipFocusHighlight=!0)},e.prototype._hasFocus=function(){return this.element.ownerDocument.activeElement===this.element},e.prototype._cleanFocusHighlight=function(){this.models.nodes.forEach((function(t){return t.blur()})),this.models.links.forEach((function(t){return t.blur()}))},e.prototype._keydown=function(t){var e=this["on"+t.key],i=this.options.rtl;i&&"ArrowLeft"===t.key?e=this.onArrowRight:i&&"ArrowRight"===t.key&&(e=this.onArrowLeft),e&&e.call(this,t)},e.prototype.onEscape=function(t){t.preventDefault(),this._focusState={node:this.firstFocusableNode(),link:null},this._focusNode()},e.prototype.onArrowDown=function(t){t.preventDefault(),this._focusState.link?this._focusNextLink(1):this._focusNextNode(1)},e.prototype.onArrowUp=function(t){t.preventDefault(),this._focusState.link?this._focusNextLink(-1):this._focusNextNode(-1)},e.prototype.onArrowLeft=function(t){t.preventDefault(),this._focusState.link?this._focusSourceNode():this._focusTargetLink()},e.prototype.onArrowRight=function(t){t.preventDefault(),this._focusState.link?this._focusTargetNode():this._focusSourceLink()},e.prototype.highlightLinks=function(t,e){var i=this;t&&(this.setLinksInactivityOpacity(e.inactiveOpacity),t.links.forEach((function(t){i.setOpacity(t,e.opacity,t.linkOptions.highlight.opacity)})))},e.prototype._destroySurface=function(){this.surface&&(this.surface.destroy(),this.surface=null,this._destroySurfaceElement())},e.prototype._destroyResizeObserver=function(){this._resizeObserver&&(this._resizeObserver.disconnect(),this._resizeObserver=null)},e.prototype._initSurfaceElement=function(){this.surfaceElement||(this.surfaceElement=document.createElement("div"),this.element.appendChild(this.surfaceElement))},e.prototype._destroySurfaceElement=function(){this.surfaceElement&&this.surfaceElement.parentNode&&(this.surfaceElement.parentNode.removeChild(this.surfaceElement),this.surfaceElement=null)},e.prototype.setOptions=function(t,e){this._setOptions(t),this._initTheme(e),this._initSurface(),this._redraw()},e.prototype._redraw=function(){this.surface.clear();var t=this._getSize(),e=t.width,i=t.height;this.size={width:e,height:i},this.surface.setSize(this.size),this.createVisual(),this.surface.draw(this.visual)},e.prototype._getSize=function(){return this.element.getBoundingClientRect()},e.prototype.createVisual=function(){this.visual=this._render()},e.prototype.titleBox=function(t,e){return t&&!1!==t.visible&&t.text?new Im(Object.assign({},{drawingRect:e},t)).exportVisual().chartElement.box:null},e.prototype.legendBox=function(t,e,i){return t&&!1!==t.visible?new Vm(Object.assign({},{nodes:e},t,{drawingRect:i})).exportVisual().chartElement.box:null},e.prototype.calculateSankey=function(t,e){var i=e.title,o=e.legend,r=e.data,n=e.nodes,s=e.labels,a=e.nodeColors,p=e.disableAutoLayout,l=e.disableKeyboardNavigation,h=e.rtl,c=!p,u=((n.focusHighlight||{}).border||{}).width||0,f=l?0:u/2,g=new wi(0,0,t.width,t.height);g.unpad(f);var y=this.titleBox(i,g),v=g.clone();if(y){var m=y.height();i.position===V?(g.unpad({top:m}),v=new wi(0,m,t.width,t.height)):(g.shrink(0,m),v=new wi(0,0,t.width,t.height-m))}var x=this.legendBox(o,r.nodes,v),b=o&&o.position||Vm.prototype.options.position;x&&(b===C&&g.unpad({left:x.width()}),b===B&&g.shrink(x.width(),0),b===V&&g.unpad({top:x.height()}),b===d&&g.shrink(0,x.height()));var _=bm(Object.assign({},t,{offsetX:0,offsetY:0,width:g.width(),height:g.height()})),w=_.nodes,k=_.circularLinks;if(k)return console.warn("Circular links detected. Kendo Sankey diagram does not support circular links."),{sankey:{nodes:[],links:[],columns:[[]],circularLinks:k},legendBox:x,titleBox:y};var A=new wi,S=w.reduce((function(t,e){return Math.min(t,e.x0)}),1/0),P=w.reduce((function(t,e){return Math.max(t,e.x1)}),0);w.forEach((function(t,e){if(h){var i=t.x0,o=t.x1;t.x0=P-o,t.x1=P-i}var r=Sm(t,n,a,e),p=new km(r);A.wrap(Zi(p.exportVisual().rawBBox()));var l=new Lm(Bm(t,s,h,S,P)).exportVisual();l&&A.wrap(Zi(l.rawBBox()))}));var T=g.x1,M=g.y1,O=g.width()+T,L=g.height()+M;if(O-=A.x2>g.width()?A.x2-g.width():0,L-=A.y2>g.height()?A.y2-g.height():0,T+=A.x1<0?-A.x1:0,M+=A.y1<0?-A.y1:0,!1===c)return{sankey:bm(Object.assign({},t,{offsetX:T,offsetY:M,width:O,height:L,autoLayout:!1})),legendBox:x,titleBox:y};if(this.resize&&c&&this.permutation)return this.resize=!1,{sankey:bm(Object.assign({},t,{offsetX:T,offsetY:M,width:O,height:L},this.permutation)),legendBox:x,titleBox:y};for(var I=bm(Object.assign({},t,{offsetX:T,offsetY:M,width:O,height:L,autoLayout:!1})).columns.length,E=[],R=function(e,i){var o=function(t){for(var e,i,o,r,n,s,a=0,p=t.length,l=0;l<p;l++)for(var h=t[l],c=l+1;c<p;c++){var u=t[c];i=u,void 0,void 0,void 0,void 0,o=_m((e=h).x0,e.y0,e.x1,e.y1,i.x1,i.y1),r=_m(e.x0,e.y0,e.x1,e.y1,i.x0,i.y0),n=_m(e.x0,e.y0,i.x0,i.y0,i.x1,i.y1),s=_m(e.x1,e.y1,i.x0,i.y0,i.x1,i.y1),o!==r&&n!==s&&(a+=Math.min(h.value,u.value))}return a}(bm(Object.assign({},t,{offsetX:T,offsetY:M,width:O,height:L,loops:2,targetColumnIndex:e,reverse:i})).links);return E.push({crosses:o,reverse:i,targetColumnIndex:e}),0===o},z=1;z<=I-1&&!R(z,!1)&&!R(z,!0);z++);var j=Math.min.apply(null,E.map((function(t){return t.crosses}))),D=E.find((function(t){return t.crosses===j}));return this.permutation={targetColumnIndex:D.targetColumnIndex,reverse:D.reverse},{sankey:bm(Object.assign({},t,{offsetX:T,offsetY:M,width:O,height:L},this.permutation)),legendBox:x,titleBox:y}},e.prototype._render=function(t,e){var i=t||this.options,o=e||this,r=i.labels,n=i.nodes,s=i.links,a=i.nodeColors,p=i.title,l=i.legend,h=i.rtl,c=i.disableKeyboardNavigation,u=i.data,d=o.size,f=d.width,g=d.height,y=Object.assign({},u,{width:f,height:g,nodesOptions:n,title:p,legend:l}),v=this.calculateSankey(y,i),m=v.sankey,x=v.titleBox,b=v.legendBox;h&&function(t){var e=t.nodes,i=t.links,o=Math.min.apply(Math,e.map((function(t){return t.x0}))),r=Math.max.apply(Math,e.map((function(t){return t.x1})))-o;e.forEach((function(t){var e=r-(t.x1-2*o),i=r-(t.x0-2*o);t.x0=e,t.x1=i})),i.forEach((function(t){var e=r-(t.x1-2*o),i=r-(t.x0-2*o);t.x1=e,t.x0=i}))}(m);var _=m.nodes,w=m.links,k=m.columns;o.columns=k.map((function(t){var e=t.slice();return e.sort((function(t,e){return t.y0-e.y0})),e}));var A=new q.drawing.Group({clip:q.drawing.Path.fromRect(new q.geometry.Rect([0,0],[f,g]))});if(x){var S=new Im(Object.assign({},p,{drawingRect:x})).exportVisual();A.append(S)}if(m.circularLinks)return A;var C=new Map;o.nodesVisuals=C;var P={nodes:[],links:[],map:new Map};o.models=P;var T=[];_.forEach((function(t,e){var i=Sm(t,n,a,e);i.root=function(){return o.element},i.navigatable=!0!==c;var r=new km(i),s=r.exportVisual();s.links=[],s.type=jm,t.color=i.color,t.opacity=i.opacity,s.dataItem=Object.assign({},u.nodes[e],{color:i.color,opacity:i.opacity,sourceLinks:t.sourceLinks.map((function(t){return{sourceId:t.sourceId,targetId:t.targetId,value:t.value}})),targetLinks:t.targetLinks.map((function(t){return{sourceId:t.sourceId,targetId:t.targetId,value:t.value}}))}),C.set(t.id,s),P.nodes.push(r),P.map.set(t.id,r),A.append(s),r.createFocusHighlight(),r._highlight&&T.push(r._highlight)}));var M=w.slice().sort((function(t,e){return e.value-t.value})),O=[];o.linksVisuals=O,M.forEach((function(t){var e=t.source,i=t.target,r=C.get(e.id),n=C.get(i.id),a=function(t,e,i,o){var r=at({},e,{link:t,opacity:t.opacity,color:t.color,colorType:t.colorType,visual:t.visual,highlight:t.highlight});return"source"===r.colorType?r.color=i.options.fill.color:"target"===r.colorType&&(r.color=o.options.fill.color),r}(t,s,r,n);a.root=function(){return o.element},a.navigatable=!0!==c,a.rtl=h;var p=new Pm(a),l=p.exportVisual();l.type=zm,l.dataItem={source:Object.assign({},r.dataItem),target:Object.assign({},n.dataItem),value:t.value},l.linkOptions=a,O.push(l),r.links.push(l),n.links.push(l),P.links.push(p),P.map.set(e.id+"-"+i.id,p),p.createFocusHighlight(),p._highlight&&T.push(p._highlight),A.append(l)}));var L=_.reduce((function(t,e){return Math.min(t,e.x0)}),1/0),B=_.reduce((function(t,e){return Math.max(t,e.x1)}),0);if(_.forEach((function(t){var e=Bm(t,r,h,L,B),i=new Lm(e).exportVisual();i&&A.append(i)})),b){var I=new Vm(Object.assign({},l,{rtl:h,drawingRect:b,nodes:_})).exportVisual();A.append(I)}if(0!==T.length){var E=new q.drawing.Group;E.append.apply(E,T),A.append(E)}return A},e.prototype.exportVisual=function(t){var e=t&&t.options?at({},this.options,t.options):this.options,i={size:{width:jt(t&&t.width)?t.width:this.size.width,height:jt(t&&t.height)?t.height:this.size.height}};return this._render(e,i)},e.prototype._setOptions=function(t){this.options=at({},this.options,t)},e}(Xe),Fm={opacity:1,width:2,color:u};te(Dm,{title:{position:V},labels:{visible:!0,margin:{left:8,right:8},padding:0,border:{width:0},paintOrder:"stroke",stroke:{lineJoin:"round",width:1},offset:{left:0,top:0}},nodes:{width:24,padding:16,opacity:1,align:"stretch",offset:{left:0,top:0},focusHighlight:{border:Object.assign({},Fm)},labels:{ariaTemplate:function(t){return t.node.label.text}}},links:{colorType:"static",opacity:.4,highlight:{opacity:.8,inactiveOpacity:.2},focusHighlight:{border:Object.assign({},Fm)},labels:{ariaTemplate:function(t){var e=t.link;return e.source.label.text+" to "+e.target.label.text}}},tooltip:{followPointer:!1,delay:200}});var Hm=function(t,e,i){var o=new Set,r=new Map,n=new Map;t.forEach((function(t){e.forEach((function(e){o.add(e.value(t))}));for(var s=0;s<e.length-1;s++){var a=e[s].value(t),p=e[s+1].value(t),l=a+"_"+p,h=i.value(t),c=r.get(l);void 0!==c?r.set(l,c+h):(r.set(l,h),n.set(l,{source:a,target:p}))}}));var s=new Map,a=Array.from(o).map((function(t,e){return s.set(t,e),{id:e,label:{text:String(t)}}})),p=Array.from(r).map((function(t){var e=t[0],i=t[1],o=n.get(e),r=o.source,a=o.target;return{sourceId:s.get(r),targetId:s.get(a),value:i}}));return{nodes:a,links:p}},Nm=Object.freeze({seriesType:0,stacked:1,categoryAxisX:2,valueAxisY:3,seriesChange:4,areaMarginLeft:5,areaMarginRight:6,areaMarginTop:7,areaMarginBottom:8,areaBackground:9,titleText:10,titleFontName:11,titleFontSize:12,titleColor:13,subtitleText:14,subtitleFontName:15,subtitleFontSize:16,subtitleColor:17,seriesColor:18,seriesLabel:19,legendVisible:20,legendFontName:21,legendFontSize:22,legendColor:23,legendPosition:24,categoryAxisTitleText:25,categoryAxisTitleFontName:26,categoryAxisTitleFontSize:27,categoryAxisTitleColor:28,categoryAxisLabelsFontName:29,categoryAxisLabelsFontSize:30,categoryAxisLabelsColor:31,categoryAxisLabelsRotation:32,categoryAxisReverseOrder:33,valueAxisTitleText:34,valueAxisTitleFontName:35,valueAxisTitleFontSize:36,valueAxisTitleColor:37,valueAxisLabelsFormat:38,valueAxisLabelsFontName:39,valueAxisLabelsFontSize:40,valueAxisLabelsColor:41,valueAxisLabelsRotation:42}),Um="12px",Gm="16px",Wm=[{text:"Arial",value:"Arial, Helvetica, sans-serif",style:{fontFamily:"Arial, Helvetica, sans-serif"}},{text:"Courier New",value:"'Courier New', Courier, monospace",style:{fontFamily:"'Courier New', Courier, monospace"}},{text:"Georgia",value:"Georgia, serif",style:{fontFamily:"Georgia, serif"}},{text:"Impact",value:"Impact, Charcoal, sans-serif",style:{fontFamily:"Impact, Charcoal, sans-serif"}},{text:"Lucida Console",value:"'Lucida Console', Monaco, monospace",style:{fontFamily:"'Lucida Console', Monaco, monospace"}},{text:"Tahoma",value:"Tahoma, Geneva, sans-serif",style:{fontFamily:"Tahoma, Geneva, sans-serif"}},{text:"Times New Roman",value:"'Times New Roman', Times,serif",style:{fontFamily:"'Times New Roman', Times,serif"}},{text:"Trebuchet MS",value:"'Trebuchet MS', Helvetica, sans-serif",style:{fontFamily:"'Trebuchet MS', Helvetica, sans-serif"}},{text:"Verdana",value:"Verdana, Geneva, sans-serif",style:{fontFamily:"Verdana, Geneva, sans-serif"}}],Xm=Wm[0].value,Ym="line",qm="scatter",Zm=["column","bar",Ym,qm],Qm={type:Ym,width:0};function Km(t){return t&&Zm.includes(t)}var $m=["string","date","number"],Jm=["number"],tx={bar:[{axisType:"category",types:$m},{axisType:"value",types:Jm}],column:[{axisType:"category",types:$m},{axisType:"value",types:Jm}],line:[{axisType:"category",types:$m},{axisType:"value",types:Jm}],pie:[{axisType:"category",types:$m},{axisType:"value",types:Jm,count:1}],scatter:[{axisType:"category",types:$m},{axisType:"value",types:Jm}]};function ex(t,e){return((e||"")+" "+(t||"")).trim()}function ix(t){var e=(t||"").indexOf(" ");return{size:t&&t.substring(0,e),name:t&&t.substring(e+1)}}var ox=function(t,e,i){var o=ix(i).size;return t?ex(t,o||e):""},rx=function(t,e,i){var o=ix(i).name;return t?ex(o||e,t):""},nx=function(t){return null!=t},sx=function(t){var e=structuredClone(t[0]);return e.forEach((function(e,i){if(!nx(e.value))for(var o=0;o<t.length;o++){var r=t[o][i].value;if(nx(r)){e.value=r;break}}})),e},ax=function(t,e){var i=[],o=sx(t);e.types.forEach((function(t){o.forEach((function(e,o){typeof e.value===t&&i.push(o)}))}));var r=i.findIndex((function(e){var i=t.map((function(t){return t[e].value}));return new Set(i).size===i.length}));return Math.max(r,0)},px=function(t,e){var i=[],o=sx(t);return e.forEach((function(t){t.types.forEach((function(t){o.forEach((function(e,o){typeof e.value===t&&i.push(o)}))}))})),i},lx=function(){return structuredClone({columns:[],data:[],series:[],initialSeries:[],categoryAxis:[{categories:[],labels:{visible:!0,rotation:"auto"},title:{text:""}}],valueAxis:[{labels:{visible:!0,rotation:"auto"}}],area:{margin:{left:void 0,right:void 0,top:void 0,bottom:void 0}},title:{text:""},subtitle:{text:""},stack:!1})},hx=function(t,e,i){var o=lx();o.seriesType=e,o.data=t||[],o.legend={visible:!0,position:"bottom"};var r=tx[e];if(!r||!t.length)return o;var n=t[0].slice();o.columns=t[0].map((function(t){return String(t.field)}));var s=r.find((function(t){return"category"===t.axisType})),a=-1;s&&(a=i&&i.categoryAxis?o.columns.indexOf(i.categoryAxis):ax(t,s));var p=r.filter((function(t){return"value"===t.axisType})),l=px(t,p);l.includes(a)&&(l.length>1?l=l.filter((function(t){return t!==a})):a=-1);var h=[];l.forEach((function(i){var o=n[i],r=[];t.forEach((function(t){r.push(t[i].value)})),h.push(Object.assign({},{name:o.field,type:e,data:r,stack:!1,labels:{visible:!1}},e===qm?Qm:{}))}));var c=a>-1?t.map((function(t){return String(nx(t[a].value)?t[a].value:" ")})):[];return h.length&&(o.series=h.map((function(t,e){return Object.assign({},t,{id:e})})),o.initialSeries=structuredClone(o.series)),o.categoryAxis=[{categories:c,labels:{visible:!0,rotation:"auto"}}],o.categoryField=o.columns[a],o},cx=function(t,e,i){var o=lx();o.seriesType=e,o.data=t||[];var r=tx[e];if(!r||!t.length)return o;var n=t[0].map((function(t){return t.field})),s=r.find((function(t){return"category"===t.axisType})),a=-1;s&&(a=i&&i.categoryAxis?n.indexOf(i.categoryAxis):ax(t,s));var p=r.filter((function(t){return"value"===t.axisType})),l=[];(l=i&&i.valueAxis?[n.indexOf(i.valueAxis)]:px(t,p)).includes(a)&&l.length>1&&(l=l.filter((function(t){return t!==a}))),"number"==typeof p[0].count&&(l=l.slice(0,p[0].count));var h=a>-1?t.map((function(t){return String(t[a].value)})):[],c=[];return t.forEach((function(t){var e={};l.forEach((function(i){var o=t[i];e[o.field]=o.value||0,e[t[a].field]=t[a].value||" "})),c.push(e)})),o.columns=n,o.categoryAxis=[{categories:h,title:{text:""}}],o.series=[{id:0,data:c,type:e,name:n[a],labels:{visible:!0},categoryField:n[a],field:n[l[0]]}],o.categoryField=n[a],o.valueField=n[l[0]],o.initialSeries=structuredClone(o.series),o};function ux(t,e){return(Km(e)?hx:cx)(t,e)}function dx(t,e){var i=structuredClone(e);if(i.legend=t.legend,i.area=t.area,i.title=t.title,i.subtitle=t.subtitle,i.series.length===t.series.length)for(var o=0;o<i.series.length;o++)i.series[o].color=t.series[o].color,i.series[o].labels=t.series[o].labels;return t.series.every((function(t){return t.labels&&t.labels.visible}))&&Km(i.seriesType)&&Km(t.seriesType)&&i.series.forEach((function(t){t.labels=t.labels||{},t.labels.visible=!0})),i}function fx(t,e,i){var o=Object.assign({},t);switch(e){case Nm.seriesType:return ux(o.data,i);case Nm.stacked:return o.series=o.series.map((function(t){return Object.assign({},t,{stack:i})})),o.stack=i,o;case Nm.categoryAxisX:if(o.seriesType&&Km(o.seriesType)){var r=hx(o.data,o.seriesType,{categoryAxis:i});return function(t,e){if(void 0!==t.stack){e.stack=t.stack;for(var i=0;i<e.series.length;i++)e.series[i].stack=t.stack}}(o,r),dx(o,r)}return"pie"===o.seriesType?dx(o,cx(o.data,o.seriesType,{categoryAxis:i})):o;case Nm.valueAxisY:return"pie"===o.seriesType?dx(o,cx(o.data,o.seriesType,{categoryAxis:o.categoryField,valueAxis:i})):o;case Nm.seriesChange:return o.series=i,o;case Nm.areaMarginLeft:return o.area=Object.assign({},o.area,{margin:Object.assign({},o.area&&o.area.margin||{},{left:i})}),o;case Nm.areaMarginRight:return o.area=Object.assign({},o.area,{margin:Object.assign({},o.area&&o.area.margin||{},{right:i})}),o;case Nm.areaMarginTop:return o.area=Object.assign({},o.area,{margin:Object.assign({},o.area&&o.area.margin||{},{top:i})}),o;case Nm.areaMarginBottom:return o.area=Object.assign({},o.area,{margin:Object.assign({},o.area&&o.area.margin||{},{bottom:i})}),o;case Nm.areaBackground:return o.area=Object.assign({},o.area,{background:i}),o;case Nm.titleText:return o.title=Object.assign({},o.title,{text:i}),o;case Nm.titleFontName:return o.title=Object.assign({},o.title,{font:ox(i,"20px",o.title&&o.title.font)}),o;case Nm.titleFontSize:return o.title=Object.assign({},o.title,{font:rx(i,Xm,o.title&&o.title.font)}),o;case Nm.titleColor:return o.title=Object.assign({},o.title,{color:i}),o;case Nm.subtitleText:return o.subtitle=Object.assign({},o.subtitle,{text:i}),o;case Nm.subtitleFontName:return o.subtitle=Object.assign({},o.subtitle,{font:ox(i,"16px",o.subtitle&&o.subtitle.font)}),o;case Nm.subtitleFontSize:return o.subtitle=Object.assign({},o.subtitle,{font:rx(i,Xm,o.subtitle&&o.subtitle.font)}),o;case Nm.subtitleColor:return o.subtitle=Object.assign({},o.subtitle,{color:i}),o;case Nm.seriesColor:return o.series=o.series.map((function(t){return Object.assign({},t,{color:i.seriesName===t.name?i.color:t.color})})),o;case Nm.seriesLabel:return o.series=o.series.map((function(t){return i.all||i.seriesName===t.name?Object.assign({},t,{labels:{visible:i.visible}}):t})),o;case Nm.legendVisible:return o.legend=Object.assign({},o.legend,{visible:i}),o;case Nm.legendFontName:var n=o.legend||{};return o.legend=Object.assign({},n,{labels:Object.assign({},n.labels,{font:ox(i,Um,n.labels&&n.labels.font)})}),o;case Nm.legendFontSize:var s=o.legend||{};return o.legend=Object.assign({},s,{labels:Object.assign({},s.labels,{font:rx(i,Xm,s.labels&&s.labels.font)})}),o;case Nm.legendColor:var a=o.legend||{};return o.legend=Object.assign({},a,{labels:Object.assign({},a.labels,{color:i})}),o;case Nm.legendPosition:return o.legend=Object.assign({},o.legend,{position:i}),o;case Nm.categoryAxisTitleText:return o.categoryAxis=(o.categoryAxis||[]).map((function(t){return Object.assign({},t,{title:Object.assign({},t.title,{text:i})})})),o;case Nm.categoryAxisTitleFontName:return o.categoryAxis=(o.categoryAxis||[]).map((function(t){return Object.assign({},t,{title:Object.assign({},t.title,{font:ox(i,Gm,t.title&&t.title.font)})})})),o;case Nm.categoryAxisTitleFontSize:return o.categoryAxis=(o.categoryAxis||[]).map((function(t){return Object.assign({},t,{title:Object.assign({},t.title,{font:rx(i,Xm,t.title&&t.title.font)})})})),o;case Nm.categoryAxisTitleColor:return o.categoryAxis=(o.categoryAxis||[]).map((function(t){return Object.assign({},t,{title:Object.assign({},t.title,{color:i})})})),o;case Nm.categoryAxisLabelsFontName:return o.categoryAxis=(o.categoryAxis||[]).map((function(t){return Object.assign({},t,{labels:Object.assign({},t.labels,{font:ox(i,Um,t.labels&&t.labels.font)})})})),o;case Nm.categoryAxisLabelsFontSize:return o.categoryAxis=(o.categoryAxis||[]).map((function(t){return Object.assign({},t,{labels:Object.assign({},t.labels,{font:rx(i,Xm,t.labels&&t.labels.font)})})})),o;case Nm.categoryAxisLabelsColor:return o.categoryAxis=(o.categoryAxis||[]).map((function(t){return Object.assign({},t,{labels:Object.assign({},t.labels,{color:i})})})),o;case Nm.categoryAxisLabelsRotation:var p=nx(i)?i:"auto";return o.categoryAxis=(o.categoryAxis||[]).map((function(t){return Object.assign({},t,{labels:Object.assign({},t.labels,{rotation:p})})})),o;case Nm.categoryAxisReverseOrder:return o.categoryAxis=(o.categoryAxis||[]).map((function(t){return Object.assign({},t,{reverse:i})})),o;case Nm.valueAxisTitleText:return o.valueAxis&&0!==o.valueAxis.length?o.valueAxis=(o.valueAxis||[]).map((function(t){return Object.assign({},t,{title:Object.assign({},t.title,{text:i})})})):o.valueAxis=[{title:{text:i}}],o;case Nm.valueAxisTitleFontName:return o.valueAxis=(o.valueAxis||[]).map((function(t){return Object.assign({},t,{title:Object.assign({},t.title,{font:ox(i,Gm,t.title&&t.title.font)})})})),o;case Nm.valueAxisTitleFontSize:return o.valueAxis=(o.valueAxis||[]).map((function(t){return Object.assign({},t,{title:Object.assign({},t.title,{font:rx(i,Xm,t.title&&t.title.font)})})})),o;case Nm.valueAxisTitleColor:return o.valueAxis=(o.valueAxis||[]).map((function(t){return Object.assign({},t,{title:Object.assign({},t.title,{color:i})})})),o;case Nm.valueAxisLabelsFormat:return o.valueAxis=(o.valueAxis||[]).map((function(t){return Object.assign({},t,{labels:Object.assign({},t.labels,{format:i})})})),o;case Nm.valueAxisLabelsFontName:return o.valueAxis=(o.valueAxis||[]).map((function(t){return Object.assign({},t,{labels:Object.assign({},t.labels,{font:ox(i,Um,t.labels&&t.labels.font)})})})),o;case Nm.valueAxisLabelsFontSize:return o.valueAxis=(o.valueAxis||[]).map((function(t){return Object.assign({},t,{labels:Object.assign({},t.labels,{font:rx(i,Xm,t.labels&&t.labels.font)})})})),o;case Nm.valueAxisLabelsColor:return o.valueAxis=(o.valueAxis||[]).map((function(t){return Object.assign({},t,{labels:Object.assign({},t.labels,{color:i})})})),o;case Nm.valueAxisLabelsRotation:var l=nx(i)?i:"auto";return o.valueAxis=(o.valueAxis||[]).map((function(t){return Object.assign({},t,{labels:Object.assign({},t.labels,{rotation:l})})})),o;default:return o}}var gx=Object.freeze({windowTitle:"Chart Preview",exportButton:"Export",exportPDFButton:"PDF File",exportSVGButton:"SVG File",exportPNGButton:"PNG File",tabChart:"Chart",tabData:"Data",tabFormat:"Format",barChart:"Bar Chart",barChartBar:"Bar",barChartStackedBar:"Stacked Bar",barChart100StackedBar:"100% Stacked Bar",pieChart:"Pie Chart",pieChartPie:"Pie",columnChart:"Column Chart",columnChartColumn:"Column",columnChartStackedColumn:"Stacked Column",columnChart100StackedColumn:"100% Stacked Column",lineChart:"Line Chart",lineChartLine:"Line",lineChartStackedLine:"Stacked Line",lineChart100StackedLine:"100% Stacked Line",scatterChart:"Scatter Chart",scatterChartScatter:"Scatter",configuration:"Configuration",configurationCategoryAxis:"Category Axis",configurationXAxis:"X Axis",configurationValueAxis:"Value Axis",configurationSeries:"Series",configurationSeriesAdd:"Add",formatChartArea:"Chart Area",formatChartAreaMargins:"Margins",formatChartAreaMarginsAuto:"Auto",formatChartAreaMarginsLeft:"Left",formatChartAreaMarginsRight:"Right",formatChartAreaMarginsTop:"Top",formatChartAreaMarginsBottom:"Bottom",formatChartAreaBackground:"Background",formatChartAreaBackgroundColor:"Color",formatTitle:"Title",formatTitleApplyTo:"Apply to",formatTitleChartTitle:"Chart Title",formatTitleChartSubtitle:"Chart Subtitle",formatTitleLabel:"Title",formatTitleFont:"Font",formatTitleFontPlaceholder:"(inherited font)",formatTitleSize:"Size",formatTitleSizePlaceholder:"px",formatTitleColor:"Color",formatSeries:"Series",formatSeriesApplyTo:"Apply to",formatSeriesAllSeries:"All Series",formatSeriesColor:"Color",formatSeriesShowLabels:"Show Labels",formatLegend:"Legend",formatLegendShowLegend:"Show Legend",formatLegendFont:"Font",formatLegendFontPlaceholder:"(inherited font)",formatLegendSize:"Size",formatLegendSizePlaceholder:"px",formatLegendColor:"Color",formatLegendPosition:"Position",formatLegendPositionTop:"Top",formatLegendPositionBottom:"Bottom",formatLegendPositionLeft:"Left",formatLegendPositionRight:"Right",formatCategoryAxis:"Category Axis",formatXAxis:"X Axis",formatCategoryAxisTitle:"Title",formatCategoryAxisTitlePlaceholder:"Axis Title",formatCategoryAxisTitleFont:"Font",formatCategoryAxisTitleFontPlaceholder:"(inherited font)",formatCategoryAxisTitleSize:"Size",formatCategoryAxisTitleSizePlaceholder:"px",formatCategoryAxisTitleColor:"Color",formatCategoryAxisLabels:"Labels",formatCategoryAxisLabelsFont:"Font",formatCategoryAxisLabelsFontPlaceholder:"(inherited font)",formatCategoryAxisLabelsSize:"Size",formatCategoryAxisLabelsSizePlaceholder:"px",formatCategoryAxisLabelsColor:"Color",formatCategoryAxisLabelsRotation:"Rotation",formatCategoryAxisLabelsRotationAuto:"Auto",formatCategoryAxisLabelsReverseOrder:"Reverse Order",formatValueAxis:"Value Axis",formatYAxis:"Y Axis",formatValueAxisTitle:"Title",formatValueAxisTitlePlaceholder:"Axis Title",formatValueAxisTitleFont:"Font",formatValueAxisTitleFontPlaceholder:"(inherited font)",formatValueAxisTitleSize:"Size",formatValueAxisTitleSizePlaceholder:"px",formatValueAxisTitleColor:"Color",formatValueAxisLabels:"Labels",formatValueAxisLabelsFormat:"Label Format",formatValueAxisLabelsFormatText:"Text",formatValueAxisLabelsFormatNumber:"Number",formatValueAxisLabelsFormatCurrency:"Currency",formatValueAxisLabelsFormatPercent:"Percent",formatValueAxisLabelsFont:"Font",formatValueAxisLabelsFontPlaceholder:"(inherited font)",formatValueAxisLabelsSize:"Size",formatValueAxisLabelsSizePlaceholder:"px",formatValueAxisLabelsColor:"Color",formatValueAxisLabelsRotation:"Rotation",formatValueAxisLabelsRotationAuto:"Auto"}),yx=Object.freeze({getWizardDataFromDataRows:function(t){var e=[];return t.forEach((function(t){var i=t.dataItem,o=t.dataColumns,r=[];o.forEach((function(t){r.push({field:t.title||t.field,value:_t(t.field)(i)})})),e.push(r)})),e},ActionTypes:Nm,createInitialState:function(t,e,i){var o=ux(t,i&&i.seriesType||e);return void 0!==(i&&i.stack)?fx(o,Nm.stacked,i.stack):o},createState:ux,fontNames:Wm,fontSizes:[{text:"10",value:"10px"},{text:"12",value:"12px"},{text:"14",value:"14px"},{text:"16",value:"16px"},{text:"20",value:"20px"},{text:"28",value:"28px"},{text:"42",value:"42px"},{text:"56",value:"56px"}],isCategorical:Km,mergeStates:dx,parseFont:ix,updateState:fx,messages:gx}),vx=1.5,mx=.4,xx="#000",bx="Arial, Helvetica, sans-serif",_x="11px "+bx,wx="12px "+bx,kx="16px "+bx,Ax="transparent",Sx="#fff",Cx={type:In},Px={type:_n},Tx=Object.assign({},Px,{markers:{visible:!1},highlight:{visible:!1}}),Mx=function(){return{icon:{border:{width:1}},label:{font:wx,padding:3},line:{length:10,width:2},legendItem:Tx,visible:!0}},Ox=function(){return{highlight:{markers:{border:{}}},line:{opacity:1,width:0},markers:{size:6,visible:!1},legendItem:Px,opacity:.4}},Lx=function(){return{highlight:{markers:{border:{}}},line:{opacity:1,width:0},markers:{size:6,visible:!1},legendItem:Px,opacity:.4}},Bx=function(){return{outliersField:"",meanField:"",border:{_brightness:.8,width:1},downColor:Sx,gap:1,highlight:{border:{opacity:1,width:2},whiskers:{width:3},mean:{width:2},median:{width:2}},mean:{width:2},median:{width:2},spacing:.3,whiskers:{width:2},legendItem:Tx}},Ix=function(){return{gap:vx,spacing:mx,target:{color:"#ff0000"},legendItem:Tx}},Ex=function(){return{width:2,legendItem:Cx}},Rx=function(){return{line:{opacity:1,width:0},markers:{size:6,visible:!1},legendItem:Px,opacity:.5}},Vx=function(){return{markers:{visible:!1},legendItem:Cx,width:2}},zx=function(){return{gap:.5,line:{color:xx,width:1},legendItem:Tx,spacing:mx}},jx=function(){return{labels:{background:"",color:"",padding:{top:5,bottom:5,left:7,right:7}},legendItem:Tx}},Dx=jx,Fx=function(t){return Object.assign({color:S,trendline:{},markers:{visible:!1},width:1,dashType:"longDash",legendItem:Cx},t)},Hx=function(t){return{visible:!0,labels:{font:_x},overlay:t.gradients?{}:{gradient:"none"},area:Ox(),rangeArea:Lx(),verticalRangeArea:Lx(),bar:{gap:vx,spacing:mx,legendItem:Tx},boxPlot:Bx(),bubble:{border:{width:0},labels:{background:Ax},legendItem:Tx,opacity:.6},bullet:Ix(),candlestick:{border:{_brightness:.8,width:1},downColor:Sx,gap:1,highlight:{border:{opacity:1,width:2},line:{width:2}},line:{color:xx,width:1},legendItem:Tx,spacing:.3},column:{gap:vx,spacing:mx,legendItem:Tx},heatmap:{labels:{color:"",background:Ax,visible:!0},highlight:{border:{width:0}},legendItem:Tx},pie:{labels:{background:"",color:"",padding:{top:5,bottom:5,left:7,right:7}},legendItem:Tx},donut:{margin:1,legendItem:Tx},funnel:jx(),pyramid:Dx(),horizontalWaterfall:zx(),line:Ex(),notes:Mx(),ohlc:{gap:1,highlight:{line:{opacity:1,width:3}},line:{width:1},legendItem:Tx,spacing:.3},radarArea:Rx(),radarLine:Vx(),radarColumn:{legendItem:Tx},polarArea:Rx(),polarLine:Vx(),polarScatter:{legendItem:Cx},rangeBar:{gap:vx,spacing:mx,legendItem:Tx},rangeColumn:{gap:vx,spacing:mx,legendItem:Tx},scatter:{legendItem:Cx},scatterLine:{width:1,legendItem:Cx},verticalArea:Ox(),verticalBoxPlot:Bx(),verticalBullet:Ix(),verticalLine:Ex(),waterfall:zx(),linearTrendline:Fx(),exponentialTrendline:Fx({style:"smooth"}),logarithmicTrendline:Fx({style:"smooth"}),polynomialTrendline:Fx({style:"smooth"}),powerTrendline:Fx({style:"smooth"}),movingAverageTrendline:Fx()}},Nx=function(t){return void 0===t&&(t={}),{axisDefaults:{labels:{font:wx},notes:Mx(),title:{font:kx,margin:5}},categoryAxis:{majorGridLines:{visible:!0}},navigator:{pane:{height:90,margin:{top:10}}},seriesDefaults:Hx(t),title:{font:kx},subtitle:{font:wx},legend:{labels:{font:wx}}}};return r})()));
|