@progress/kendo-charts 1.23.0-dev.202201170823 → 1.23.0-dev.202202150641
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/barcode/barcode.js +8 -7
- package/dist/es/barcode/surface-size.js +19 -0
- package/dist/es/chart/heatmap-chart/color-scale.js +1 -1
- package/dist/es/chart/heatmap-chart/heatmap-chart.js +1 -1
- package/dist/es/core/numeric-axis.js +2 -1
- package/dist/es/map/attribution.js +7 -6
- package/dist/es/map/layers/marker.js +0 -1
- package/dist/es/map/layers/shape.js +0 -1
- package/dist/es/map/layers/tile.js +13 -3
- package/dist/es/map/map.js +38 -22
- package/dist/es/map/navigator.js +3 -2
- package/dist/es/map/scroller/observable.js +24 -0
- package/dist/es/map/scroller/user-events.js +1 -0
- package/dist/es/qrcode/qrcode.js +5 -1
- package/dist/es2015/barcode/barcode.js +8 -7
- package/dist/es2015/barcode/surface-size.js +19 -0
- package/dist/es2015/chart/heatmap-chart/color-scale.js +1 -1
- package/dist/es2015/chart/heatmap-chart/heatmap-chart.js +1 -1
- package/dist/es2015/core/numeric-axis.js +2 -1
- package/dist/es2015/map/attribution.js +3 -2
- package/dist/es2015/map/layers/marker.js +0 -1
- package/dist/es2015/map/layers/shape.js +0 -1
- package/dist/es2015/map/layers/tile.js +13 -3
- package/dist/es2015/map/map.js +33 -23
- package/dist/es2015/map/navigator.js +3 -2
- package/dist/es2015/map/scroller/observable.js +22 -0
- package/dist/es2015/map/scroller/user-events.js +1 -0
- package/dist/es2015/qrcode/qrcode.js +5 -1
- package/dist/npm/main.js +253 -182
- package/dist/systemjs/kendo-charts.js +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.KendoCharts=e():t.KendoCharts=e()}(window,(function(){return function(t){var e={};function o(i){if(e[i])return e[i].exports;var r=e[i]={i:i,l:!1,exports:{}};return t[i].call(r.exports,r,r.exports,o),r.l=!0,r.exports}return o.m=t,o.c=e,o.d=function(t,e,i){o.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},o.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},o.t=function(t,e){if(1&e&&(t=o(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(o.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)o.d(i,r,function(e){return t[e]}.bind(null,r));return i},o.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return o.d(e,"a",e),e},o.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},o.p="",o(o.s=3)}({3:function(t,e,o){"use strict";o.r(e),o.d(e,"autoMajorUnit",(function(){return dn})),o.d(e,"Point",(function(){return fn})),o.d(e,"Box",(function(){return gn})),o.d(e,"Ring",(function(){return mn})),o.d(e,"Sector",(function(){return xn})),o.d(e,"ShapeBuilder",(function(){return bn})),o.d(e,"ShapeElement",(function(){return Pn})),o.d(e,"ChartElement",(function(){return Cn})),o.d(e,"BoxElement",(function(){return Sn})),o.d(e,"RootElement",(function(){return Bn})),o.d(e,"FloatElement",(function(){return En})),o.d(e,"Text",(function(){return In})),o.d(e,"TextBox",(function(){return Vn})),o.d(e,"Title",(function(){return Fn})),o.d(e,"AxisLabel",(function(){return Un})),o.d(e,"Axis",(function(){return hs})),o.d(e,"Note",(function(){return Wn})),o.d(e,"CategoryAxis",(function(){return Bs})),o.d(e,"DateCategoryAxis",(function(){return Hs})),o.d(e,"DateValueAxis",(function(){return Zs})),o.d(e,"NumericAxis",(function(){return Xs})),o.d(e,"LogarithmicAxis",(function(){return Js})),o.d(e,"PolarAxis",(function(){return ra})),o.d(e,"RadarCategoryAxis",(function(){return oa})),o.d(e,"RadarNumericAxis",(function(){return pa})),o.d(e,"RadarLogarithmicAxis",(function(){return ca})),o.d(e,"CurveProcessor",(function(){return ua})),o.d(e,"Gradients",(function(){return Tn})),o.d(e,"rectToBox",(function(){return jn})),o.d(e,"ChartAxis",(function(){return da})),o.d(e,"ChartPane",(function(){return ga})),o.d(e,"ChartPlotArea",(function(){return va})),o.d(e,"findAxisByName",(function(){return fa})),o.d(e,"Aggregates",(function(){return _a})),o.d(e,"AreaChart",(function(){return up})),o.d(e,"AreaSegment",(function(){return pp})),o.d(e,"AxisGroupRangeTracker",(function(){return dp})),o.d(e,"Bar",(function(){return mp})),o.d(e,"BarChart",(function(){return Ap})),o.d(e,"BarLabel",(function(){return yp})),o.d(e,"BoxPlotChart",(function(){return Lp})),o.d(e,"BoxPlot",(function(){return Ep})),o.d(e,"BubbleChart",(function(){return Up})),o.d(e,"Bullet",(function(){return Xp})),o.d(e,"BulletChart",(function(){return Zp})),o.d(e,"CandlestickChart",(function(){return Bp})),o.d(e,"Candlestick",(function(){return Tp})),o.d(e,"CategoricalChart",(function(){return Ua})),o.d(e,"CategoricalErrorBar",(function(){return Va})),o.d(e,"CategoricalPlotArea",(function(){return Jh})),o.d(e,"Chart",(function(){return Nl})),o.d(e,"ChartContainer",(function(){return ih})),o.d(e,"ClipAnimation",(function(){return ip})),o.d(e,"ClusterLayout",(function(){return wp})),o.d(e,"Crosshair",(function(){return eh})),o.d(e,"CrosshairTooltip",(function(){return Jp})),o.d(e,"DefaultAggregates",(function(){return Mh})),o.d(e,"DonutChart",(function(){return Wc})),o.d(e,"DonutPlotArea",(function(){return qc})),o.d(e,"DonutSegment",(function(){return Uc})),o.d(e,"ErrorBarBase",(function(){return Da})),o.d(e,"ErrorRangeCalculator",(function(){return Aa})),o.d(e,"Highlight",(function(){return ec})),o.d(e,"SharedTooltip",(function(){return bc})),o.d(e,"Legend",(function(){return uc})),o.d(e,"LegendItem",(function(){return cc})),o.d(e,"LegendLayout",(function(){return hc})),o.d(e,"LineChart",(function(){return ap})),o.d(e,"LinePoint",(function(){return Xa})),o.d(e,"LineSegment",(function(){return Za})),o.d(e,"Pane",(function(){return sh})),o.d(e,"PieAnimation",(function(){return Ac})),o.d(e,"PieChart",(function(){return Hc})),o.d(e,"PieChartMixin",(function(){return jc})),o.d(e,"PiePlotArea",(function(){return Fc})),o.d(e,"PieSegment",(function(){return Ic})),o.d(e,"PlotAreaBase",(function(){return kh})),o.d(e,"PlotAreaEventsMixin",(function(){return Sh})),o.d(e,"PlotAreaFactory",(function(){return fc})),o.d(e,"PointEventsMixin",(function(){return Ga})),o.d(e,"RangeBar",(function(){return Bh})),o.d(e,"RangeBarChart",(function(){return Eh})),o.d(e,"RangeAreaPoint",(function(){return Ih})),o.d(e,"RangeAreaChart",(function(){return Nh})),o.d(e,"ScatterChart",(function(){return Vp})),o.d(e,"ScatterErrorBar",(function(){return Ip})),o.d(e,"ScatterLineChart",(function(){return Tc})),o.d(e,"Selection",(function(){return mc})),o.d(e,"SeriesAggregator",(function(){return Ph})),o.d(e,"SeriesBinder",(function(){return Ca})),o.d(e,"SplineSegment",(function(){return tp})),o.d(e,"SplineAreaSegment",(function(){return lp})),o.d(e,"StackWrap",(function(){return kp})),o.d(e,"Tooltip",(function(){return xc})),o.d(e,"OHLCChart",(function(){return Gh})),o.d(e,"OHLCPoint",(function(){return Uh})),o.d(e,"WaterfallChart",(function(){return Xh})),o.d(e,"WaterfallSegment",(function(){return qh})),o.d(e,"XYPlotArea",(function(){return Bc})),o.d(e,"MousewheelZoom",(function(){return pc})),o.d(e,"ZoomSelection",(function(){return ac})),o.d(e,"Pannable",(function(){return nc})),o.d(e,"anyHasZIndex",(function(){return rp})),o.d(e,"appendIfNotNull",(function(){return ah})),o.d(e,"areNumbers",(function(){return Mp})),o.d(e,"bindSegments",(function(){return hh})),o.d(e,"categoriesCount",(function(){return Fa})),o.d(e,"countNumbers",(function(){return ma})),o.d(e,"equalsIgnoreCase",(function(){return ch})),o.d(e,"evalOptions",(function(){return Ha})),o.d(e,"filterSeriesByType",(function(){return lh})),o.d(e,"getDateField",(function(){return uh})),o.d(e,"getField",(function(){return ba})),o.d(e,"hasGradientOverlay",(function(){return gp})),o.d(e,"hasValue",(function(){return jp})),o.d(e,"isDateAxis",(function(){return dh})),o.d(e,"segmentVisible",(function(){return ph})),o.d(e,"singleItemOrArray",(function(){return fh})),o.d(e,"createOutOfRangePoints",(function(){return mh})),o.d(e,"ChartService",(function(){return is})),o.d(e,"DomEventsBuilder",(function(){return ns})),o.d(e,"FormatService",(function(){return Jn})),o.d(e,"IntlService",(function(){return Zn})),o.d(e,"TemplateService",(function(){return dr})),o.d(e,"Sparkline",(function(){return Zl})),o.d(e,"Navigator",(function(){return iu})),o.d(e,"NavigatorHint",(function(){return Jl})),o.d(e,"StockChart",(function(){return nu})),o.d(e,"constants",(function(){return h})),o.d(e,"Gauge",(function(){return vu})),o.d(e,"LinearGauge",(function(){return Fu})),o.d(e,"LinearPointer",(function(){return Tu})),o.d(e,"ArrowLinearPointer",(function(){return Eu})),o.d(e,"BarLinearPointer",(function(){return Du})),o.d(e,"LinearScale",(function(){return ku})),o.d(e,"RadialGauge",(function(){return rd})),o.d(e,"RadialPointer",(function(){return ed})),o.d(e,"RadialScale",(function(){return Yu})),o.d(e,"ArcGauge",(function(){return ld})),o.d(e,"RangePointer",(function(){return cd})),o.d(e,"ArcScale",(function(){return sd})),o.d(e,"CircularGauge",(function(){return ud})),o.d(e,"Barcode",(function(){return Jd})),o.d(e,"barcodeValidator",(function(){return ef})),o.d(e,"QRCode",(function(){return ry})),o.d(e,"qrcodeValidator",(function(){return ny})),o.d(e,"Map",(function(){return bv})),o.d(e,"addClass",(function(){return P})),o.d(e,"removeClass",(function(){return M})),o.d(e,"alignPathToPixel",(function(){return Ki})),o.d(e,"clockwise",(function(){return $i})),o.d(e,"convertableToNumber",(function(){return er})),o.d(e,"deepExtend",(function(){return rr})),o.d(e,"elementStyles",(function(){return hr})),o.d(e,"getSpacing",(function(){return cr})),o.d(e,"getTemplate",(function(){return fr})),o.d(e,"getter",(function(){return vr})),o.d(e,"grep",(function(){return mr})),o.d(e,"hasClasses",(function(){return xr})),o.d(e,"HashMap",(function(){return br})),o.d(e,"inArray",(function(){return wr})),o.d(e,"interpolateValue",(function(){return Cr})),o.d(e,"InstanceObserver",(function(){return Sr})),o.d(e,"isArray",(function(){return A})),o.d(e,"isFunction",(function(){return or})),o.d(e,"isNumber",(function(){return Ji})),o.d(e,"isObject",(function(){return nr})),o.d(e,"isString",(function(){return tr})),o.d(e,"map",(function(){return Ar})),o.d(e,"mousewheelDelta",(function(){return Tr})),o.d(e,"FontLoader",(function(){return Xr})),o.d(e,"setDefaultOptions",(function(){return Yr})),o.d(e,"sparseArrayLimits",(function(){return Zr})),o.d(e,"styleValue",(function(){return sr})),o.d(e,"find",(function(){return Qr})),o.d(e,"elementScale",(function(){return tn})),o.d(e,"autoTextColor",(function(){return rn})),o.d(e,"createHashSet",(function(){return cn})),o.d(e,"defaultErrorHandler",(function(){return ln})),o.d(e,"keys",(function(){return un})),o.d(e,"append",(function(){return Or})),o.d(e,"bindEvents",(function(){return Br})),o.d(e,"Class",(function(){return O})),o.d(e,"defined",(function(){return Rr})),o.d(e,"deg",(function(){return Er})),o.d(e,"elementOffset",(function(){return zr})),o.d(e,"elementSize",(function(){return Lr})),o.d(e,"eventCoordinates",(function(){return Ir})),o.d(e,"eventElement",(function(){return jr})),o.d(e,"hashKey",(function(){return Dr})),o.d(e,"last",(function(){return Vr})),o.d(e,"limitValue",(function(){return Hr})),o.d(e,"logToConsole",(function(){return fo})),o.d(e,"objectKey",(function(){return Fr})),o.d(e,"rad",(function(){return Nr})),o.d(e,"round",(function(){return Ur})),o.d(e,"unbindEvents",(function(){return Gr})),o.d(e,"valueOrDefault",(function(){return Wr})),o.d(e,"chartBaseTheme",(function(){return Pv}));var i={};o.r(i),o.d(i,"swing",(function(){return De})),o.d(i,"linear",(function(){return Ve})),o.d(i,"easeOutElastic",(function(){return He}));var r={};o.r(r),o.d(r,"Surface",(function(){return oi})),o.d(r,"RootNode",(function(){return Lo})),o.d(r,"Node",(function(){return To})),o.d(r,"GroupNode",(function(){return Uo})),o.d(r,"ArcNode",(function(){return Fo})),o.d(r,"CircleNode",(function(){return No})),o.d(r,"RectNode",(function(){return $o})),o.d(r,"ImageNode",(function(){return Qo})),o.d(r,"TextNode",(function(){return ei})),o.d(r,"PathNode",(function(){return Ho})),o.d(r,"MultiPathNode",(function(){return Ko})),o.d(r,"DefinitionNode",(function(){return zo})),o.d(r,"ClipNode",(function(){return Eo})),o.d(r,"GradientStopNode",(function(){return Mo})),o.d(r,"LinearGradientNode",(function(){return Bo})),o.d(r,"RadialGradientNode",(function(){return Ro})),o.d(r,"exportGroup",(function(){return Ni}));var n={};o.r(n),o.d(n,"Surface",(function(){return Di})),o.d(n,"RootNode",(function(){return ci})),o.d(n,"Node",(function(){return ai})),o.d(n,"GroupNode",(function(){return pi})),o.d(n,"ArcNode",(function(){return Oi})),o.d(n,"CircleNode",(function(){return Bi})),o.d(n,"RectNode",(function(){return zi})),o.d(n,"ImageNode",(function(){return Ri})),o.d(n,"TextNode",(function(){return Li})),o.d(n,"PathNode",(function(){return Mi})),o.d(n,"MultiPathNode",(function(){return Ei}));var s={};o.r(s),o.d(s,"append",(function(){return le})),o.d(s,"arabicToRoman",(function(){return Gi})),o.d(s,"createPromise",(function(){return ii})),o.d(s,"defined",(function(){return R})),o.d(s,"definitionId",(function(){return $})),o.d(s,"deg",(function(){return lt})),o.d(s,"encodeBase64",(function(){return Xi})),o.d(s,"eventCoordinates",(function(){return ao})),o.d(s,"eventElement",(function(){return ro})),o.d(s,"isTransparent",(function(){return tt})),o.d(s,"last",(function(){return Dt})),o.d(s,"limitValue",(function(){return Yt})),o.d(s,"mergeSort",(function(){return Yi})),o.d(s,"now",(function(){return Ue})),o.d(s,"promiseAll",(function(){return ri})),o.d(s,"rad",(function(){return N})),o.d(s,"round",(function(){return D})),o.d(s,"valueOrDefault",(function(){return J})),o.d(s,"bindEvents",(function(){return Io})),o.d(s,"elementOffset",(function(){return so})),o.d(s,"elementSize",(function(){return io})),o.d(s,"elementStyles",(function(){return eo})),o.d(s,"unbindEvents",(function(){return jo})),o.d(s,"elementPadding",(function(){return no})),o.d(s,"elementScale",(function(){return co})),o.d(s,"DEG_TO_RAD",(function(){return V})),o.d(s,"MAX_NUM",(function(){return H})),o.d(s,"MIN_NUM",(function(){return F})),o.d(s,"LRUCache",(function(){return $t})),o.d(s,"TextMetrics",(function(){return se})),o.d(s,"measureText",(function(){return ae})),o.d(s,"objectKey",(function(){return ee})),o.d(s,"hashKey",(function(){return oe})),o.d(s,"normalizeText",(function(){return te}));var a={};o.r(a),o.d(a,"HasObservers",(function(){return B})),o.d(a,"Element",(function(){return et})),o.d(a,"Circle",(function(){return ct})),o.d(a,"Arc",(function(){return Kt})),o.d(a,"Path",(function(){return Zt})),o.d(a,"MultiPath",(function(){return Qt})),o.d(a,"Text",(function(){return pe})),o.d(a,"Image",(function(){return he})),o.d(a,"Group",(function(){return ue})),o.d(a,"Layout",(function(){return xe})),o.d(a,"Rect",(function(){return _e})),o.d(a,"align",(function(){return we})),o.d(a,"vAlign",(function(){return Ce})),o.d(a,"stack",(function(){return Ae})),o.d(a,"vStack",(function(){return Pe})),o.d(a,"wrap",(function(){return Me})),o.d(a,"vWrap",(function(){return Oe})),o.d(a,"fit",(function(){return Be})),o.d(a,"LinearGradient",(function(){return Ie})),o.d(a,"RadialGradient",(function(){return je})),o.d(a,"GradientStop",(function(){return ze})),o.d(a,"Gradient",(function(){return Le})),o.d(a,"Animation",(function(){return Xe})),o.d(a,"AnimationFactory",(function(){return qe})),o.d(a,"PathParser",(function(){return Ye})),o.d(a,"parsePath",(function(){return Wt})),o.d(a,"BaseNode",(function(){return Ze})),o.d(a,"OptionsStore",(function(){return z})),o.d(a,"Surface",(function(){return Fi})),o.d(a,"SurfaceFactory",(function(){return Hi})),o.d(a,"exportImage",(function(){return Zi})),o.d(a,"exportSVG",(function(){return Qi})),o.d(a,"QuadNode",(function(){return ui})),o.d(a,"ShapesQuadTree",(function(){return fi})),o.d(a,"svg",(function(){return r})),o.d(a,"canvas",(function(){return n})),o.d(a,"util",(function(){return s}));var p={};o.r(p),o.d(p,"Circle",(function(){return rt})),o.d(p,"Arc",(function(){return vt})),o.d(p,"Rect",(function(){return Y})),o.d(p,"Point",(function(){return q})),o.d(p,"Segment",(function(){return jt})),o.d(p,"Matrix",(function(){return G})),o.d(p,"Size",(function(){return X})),o.d(p,"toMatrix",(function(){return W})),o.d(p,"Transformation",(function(){return Z})),o.d(p,"transform",(function(){return Q}));var h={};o.r(h),o.d(h,"NAVIGATOR_AXIS",(function(){return eu})),o.d(h,"NAVIGATOR_PANE",(function(){return tu}));var c="arc",l="#000",u="bottom",d="center",f="circle",y="date",g=/\{\d+:?/,v="left",m=Number.MAX_VALUE,x=-Number.MAX_VALUE,_="right",b="top",w="value",C="#fff",k="x",S="y";function A(t){return Array.isArray(t)}function P(t,e){for(var o=A(e)?e:[e],i=0;i<o.length;i++){var r=o[i];-1===t.className.indexOf(r)&&(t.className+=" "+r)}}var T=/\s+/g;function M(t,e){t&&t.className&&(t.className=t.className.replace(e,"").replace(T," "))}var O=function(){},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.observers=function(){return this._observers=this._observers||[],this._observers},e.prototype.addObserver=function(t){return this._observers?this._observers.push(t):this._observers=[t],this},e.prototype.removeObserver=function(t){var e=this.observers(),o=e.indexOf(t);return-1!==o&&e.splice(o,1),this},e.prototype.trigger=function(t,e){var o=this._observers;if(o&&!this._suspended)for(var i=0;i<o.length;i++){var r=o[i];r[t]&&r[t](e)}return this},e.prototype.optionsChange=function(t){void 0===t&&(t={}),t.element=this,this.trigger("optionsChange",t)},e.prototype.geometryChange=function(){this.trigger("geometryChange",{element:this})},e.prototype.suspend=function(){return this._suspended=(this._suspended||0)+1,this},e.prototype.resume=function(){return this._suspended=Math.max((this._suspended||0)-1,0),this},e.prototype._observerField=function(t,e){this[t]&&this[t].removeObserver(this),this[t]=e,e.addObserver(this)},e}(O);function R(t){return void 0!==t}var E={}.toString,z=function(t){function e(e,o){for(var i in void 0===o&&(o=""),t.call(this),this.prefix=o,e){var r=e[i];r=this._wrap(r,i),this[i]=r}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.get=function(t){for(var e=t.split("."),o=this;e.length&&o;){o=o[e.shift()]}return o},e.prototype.set=function(t,e){this.get(t)!==e&&(this._set(t,this._wrap(e,t)),this.optionsChange({field:this.prefix+t,value:e}))},e.prototype._set=function(t,o){var i=t.indexOf(".")>=0,r=this,n=t;if(i){for(var s=n.split("."),a=this.prefix;s.length>1;){a+=(n=s.shift())+".";var p=r[n];p||((p=new e({},a)).addObserver(this),r[n]=p),r=p}n=s[0]}r._clear(n),r[n]=o},e.prototype._clear=function(t){var e=this[t];e&&e.removeObserver&&e.removeObserver(this)},e.prototype._wrap=function(t,o){var i=E.call(t),r=t;return null!==r&&R(r)&&"[object Object]"===i&&(t instanceof e||t instanceof O||(r=new e(r,this.prefix+o+".")),r.addObserver(this)),r},e}(B);function L(t){return function(e){return this[t]!==e&&(this[t]=e,this.geometryChange()),this}}function I(t){return function(){return this[t]}}var j=function(t,e){var o=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}(t);return function(t,e){for(var o=0;o<e.length;o++){var i=e[o],r=i.charAt(0).toUpperCase()+i.substring(1,i.length);t["set"+r]=L(i),t["get"+r]=I(i)}}(o.prototype,e),o};function D(t,e){var o,i=(o=e)?Math.pow(10,o):1;return Math.round(t*i)/i}var V=Math.PI/180,H=Number.MAX_VALUE,F=-Number.MAX_VALUE;function N(t){return t*V}var U=function(t){function e(e,o,i,r,n,s){void 0===e&&(e=0),void 0===o&&(o=0),void 0===i&&(i=0),void 0===r&&(r=0),void 0===n&&(n=0),void 0===s&&(s=0),t.call(this),this.a=e,this.b=o,this.c=i,this.d=r,this.e=n,this.f=s}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.multiplyCopy=function(t){return new e(this.a*t.a+this.c*t.b,this.b*t.a+this.d*t.b,this.a*t.c+this.c*t.d,this.b*t.c+this.d*t.d,this.a*t.e+this.c*t.f+this.e,this.b*t.e+this.d*t.f+this.f)},e.prototype.invert=function(){var t=this.a,o=this.b,i=this.c,r=this.d,n=this.e,s=this.f,a=t*r-o*i;return 0===a?null:new e(r/a,-o/a,-i/a,t/a,(i*s-r*n)/a,(o*n-t*s)/a)},e.prototype.clone=function(){return new e(this.a,this.b,this.c,this.d,this.e,this.f)},e.prototype.equals=function(t){return!!t&&(this.a===t.a&&this.b===t.b&&this.c===t.c&&this.d===t.d&&this.e===t.e&&this.f===t.f)},e.prototype.round=function(t){return this.a=D(this.a,t),this.b=D(this.b,t),this.c=D(this.c,t),this.d=D(this.d,t),this.e=D(this.e,t),this.f=D(this.f,t),this},e.prototype.toArray=function(t){var e=[this.a,this.b,this.c,this.d,this.e,this.f];if(R(t))for(var o=0;o<e.length;o++)e[o]=D(e[o],t);return e},e.prototype.toString=function(t,e){return void 0===e&&(e=","),this.toArray(t).join(e)},e.translate=function(t,o){return new e(1,0,0,1,t,o)},e.unit=function(){return new e(1,0,0,1,0,0)},e.rotate=function(t,o,i){var r=new e;return r.a=Math.cos(N(t)),r.b=Math.sin(N(t)),r.c=-r.b,r.d=r.a,r.e=o-o*r.a+i*r.b||0,r.f=i-i*r.a-o*r.b||0,r},e.scale=function(t,o){return new e(t,0,0,o,0,0)},e}(O);U.IDENTITY=U.unit();var G=U;function W(t){return t&&"function"==typeof t.matrix?t.matrix():t}var q=function(t){function e(e,o){t.call(this),this.x=e||0,this.y=o||0}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var o={ZERO:{configurable:!0}};return e.prototype.equals=function(t){return t&&t.x===this.x&&t.y===this.y},e.prototype.clone=function(){return new e(this.x,this.y)},e.prototype.rotate=function(t,o){var i=e.create(o)||e.ZERO;return this.transform(G.rotate(t,i.x,i.y))},e.prototype.translate=function(t,e){return this.x+=t,this.y+=e,this.geometryChange(),this},e.prototype.translateWith=function(t){return this.translate(t.x,t.y)},e.prototype.move=function(t,e){return this.x=this.y=0,this.translate(t,e)},e.prototype.scale=function(t,e){return void 0===e&&(e=t),this.x*=t,this.y*=e,this.geometryChange(),this},e.prototype.scaleCopy=function(t,e){return this.clone().scale(t,e)},e.prototype.transform=function(t){var e=W(t),o=this.x,i=this.y;return this.x=e.a*o+e.c*i+e.e,this.y=e.b*o+e.d*i+e.f,this.geometryChange(),this},e.prototype.transformCopy=function(t){var e=this.clone();return t&&e.transform(t),e},e.prototype.distanceTo=function(t){var e=this.x-t.x,o=this.y-t.y;return Math.sqrt(e*e+o*o)},e.prototype.round=function(t){return this.x=D(this.x,t),this.y=D(this.y,t),this.geometryChange(),this},e.prototype.toArray=function(t){var e=R(t);return[e?D(this.x,t):this.x,e?D(this.y,t):this.y]},e.prototype.toString=function(t,e){void 0===e&&(e=" ");var o=this.x,i=this.y;return R(t)&&(o=D(o,t),i=D(i,t)),o+e+i},e.create=function(t,o){if(R(t))return t instanceof e?t:1===arguments.length&&2===t.length?new e(t[0],t[1]):new e(t,o)},e.min=function(){for(var t=arguments,o=H,i=H,r=0;r<arguments.length;r++){var n=t[r];o=Math.min(n.x,o),i=Math.min(n.y,i)}return new e(o,i)},e.max=function(){for(var t=arguments,o=F,i=F,r=0;r<arguments.length;r++){var n=t[r];o=Math.max(n.x,o),i=Math.max(n.y,i)}return new e(o,i)},e.minPoint=function(){return new e(F,F)},e.maxPoint=function(){return new e(H,H)},o.ZERO.get=function(){return new e(0,0)},Object.defineProperties(e,o),e}(j(B,["x","y"])),X=function(t){function e(e,o){t.call(this),this.width=e||0,this.height=o||0}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var o={ZERO:{configurable:!0}};return e.prototype.equals=function(t){return t&&t.width===this.width&&t.height===this.height},e.prototype.clone=function(){return new e(this.width,this.height)},e.prototype.toArray=function(t){var e=R(t);return[e?D(this.width,t):this.width,e?D(this.height,t):this.height]},e.create=function(t,o){if(R(t))return t instanceof e?t:1===arguments.length&&2===t.length?new e(t[0],t[1]):new e(t,o)},o.ZERO.get=function(){return new e(0,0)},Object.defineProperties(e,o),e}(j(B,["width","height"])),Y=function(t){function e(e,o,i){void 0===e&&(e=new q),void 0===o&&(o=new X),void 0===i&&(i=0),t.call(this),this.setOrigin(e),this.setSize(o),this.setCornerRadius(i)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.clone=function(){return new e(this.origin.clone(),this.size.clone())},e.prototype.equals=function(t){return t&&t.origin.equals(this.origin)&&t.size.equals(this.size)},e.prototype.setOrigin=function(t){return this._observerField("origin",q.create(t)),this.geometryChange(),this},e.prototype.getOrigin=function(){return this.origin},e.prototype.setCornerRadius=function(t){return this.cornerRadius=Array.isArray(t)?t:[t,t],this.geometryChange(),this},e.prototype.getCornerRadius=function(){return this.cornerRadius},e.prototype.setSize=function(t){return this._observerField("size",X.create(t)),this.geometryChange(),this},e.prototype.getSize=function(){return this.size},e.prototype.width=function(){return this.size.width},e.prototype.height=function(){return this.size.height},e.prototype.topLeft=function(){return this.origin.clone()},e.prototype.bottomRight=function(){return this.origin.clone().translate(this.width(),this.height())},e.prototype.topRight=function(){return this.origin.clone().translate(this.width(),0)},e.prototype.bottomLeft=function(){return this.origin.clone().translate(0,this.height())},e.prototype.center=function(){return this.origin.clone().translate(this.width()/2,this.height()/2)},e.prototype.bbox=function(t){var o=this.topLeft().transformCopy(t),i=this.topRight().transformCopy(t),r=this.bottomRight().transformCopy(t),n=this.bottomLeft().transformCopy(t);return e.fromPoints(o,i,r,n)},e.prototype.transformCopy=function(t){return e.fromPoints(this.topLeft().transform(t),this.bottomRight().transform(t))},e.prototype.expand=function(t,e){return void 0===e&&(e=t),this.size.width+=2*t,this.size.height+=2*e,this.origin.translate(-t,-e),this},e.prototype.expandCopy=function(t,e){return this.clone().expand(t,e)},e.prototype.containsPoint=function(t){var e=this.origin,o=this.bottomRight();return!(t.x<e.x||t.y<e.y||o.x<t.x||o.y<t.y)},e.prototype._isOnPath=function(t,e){var o=this.expandCopy(e,e),i=this.expandCopy(-e,-e);return o.containsPoint(t)&&!i.containsPoint(t)},e.fromPoints=function(){var t=q.min.apply(null,arguments),o=q.max.apply(null,arguments),i=new X(o.x-t.x,o.y-t.y);return new e(t,i)},e.union=function(t,o){return e.fromPoints(q.min(t.topLeft(),o.topLeft()),q.max(t.bottomRight(),o.bottomRight()))},e.intersect=function(t,o){var i={left:t.topLeft().x,top:t.topLeft().y,right:t.bottomRight().x,bottom:t.bottomRight().y},r={left:o.topLeft().x,top:o.topLeft().y,right:o.bottomRight().x,bottom:o.bottomRight().y};if(i.left<=r.right&&r.left<=i.right&&i.top<=r.bottom&&r.top<=i.bottom)return e.fromPoints(new q(Math.max(i.left,r.left),Math.max(i.top,r.top)),new q(Math.min(i.right,r.right),Math.min(i.bottom,r.bottom)))},e}(B),Z=function(t){function e(e){void 0===e&&(e=G.unit()),t.call(this),this._matrix=e}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.clone=function(){return new e(this._matrix.clone())},e.prototype.equals=function(t){return t&&t._matrix.equals(this._matrix)},e.prototype.translate=function(t,e){return this._matrix=this._matrix.multiplyCopy(G.translate(t,e)),this._optionsChange(),this},e.prototype.scale=function(t,e,o){void 0===e&&(e=t),void 0===o&&(o=null);var i=o;return i&&(i=q.create(i),this._matrix=this._matrix.multiplyCopy(G.translate(i.x,i.y))),this._matrix=this._matrix.multiplyCopy(G.scale(t,e)),i&&(this._matrix=this._matrix.multiplyCopy(G.translate(-i.x,-i.y))),this._optionsChange(),this},e.prototype.rotate=function(t,e){var o=q.create(e)||q.ZERO;return this._matrix=this._matrix.multiplyCopy(G.rotate(t,o.x,o.y)),this._optionsChange(),this},e.prototype.multiply=function(t){var e=W(t);return this._matrix=this._matrix.multiplyCopy(e),this._optionsChange(),this},e.prototype.matrix=function(t){return t?(this._matrix=t,this._optionsChange(),this):this._matrix},e.prototype._optionsChange=function(){this.optionsChange({field:"transform",value:this})},e}(B);function Q(t){return null===t?null:t instanceof Z?t:new Z(t)}var K=1;function $(){return"kdef"+K++}function J(t,e){return R(t)?t:e}function tt(t){return""===t||null===t||"none"===t||"transparent"===t||!R(t)}var et=function(t){function e(e){t.call(this),this._initOptions(e)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var o={nodeType:{configurable:!0}};return o.nodeType.get=function(){return"Rect"},e.prototype._initOptions=function(t){void 0===t&&(t={});var e=t.clip,o=t.transform;o&&(t.transform=Q(o)),e&&!e.id&&(e.id=$()),this.options=new z(t),this.options.addObserver(this)},e.prototype.transform=function(t){if(!R(t))return this.options.get("transform");this.options.set("transform",Q(t))},e.prototype.parentTransform=function(){for(var t,e=this;e.parent;){var o=(e=e.parent).transform();o&&(t=o.matrix().multiplyCopy(t||G.unit()))}if(t)return Q(t)},e.prototype.currentTransform=function(t){void 0===t&&(t=this.parentTransform());var e,o=W(this.transform()),i=W(t);if(e=o&&i?i.multiplyCopy(o):o||i)return Q(e)},e.prototype.visible=function(t){return R(t)?(this.options.set("visible",t),this):!1!==this.options.get("visible")},e.prototype.clip=function(t){var e=this.options;return R(t)?(t&&!t.id&&(t.id=$()),e.set("clip",t),this):e.get("clip")},e.prototype.opacity=function(t){return R(t)?(this.options.set("opacity",t),this):J(this.options.get("opacity"),1)},e.prototype.clippedBBox=function(t){var e=this._clippedBBox(t);if(e){var o=this.clip();return o?Y.intersect(e,o.bbox(t)):e}},e.prototype.containsPoint=function(t,e){if(this.visible()){var o=this.currentTransform(e),i=t;return o&&(i=t.transformCopy(o.matrix().invert())),this._hasFill()&&this._containsPoint(i)||this._isOnPath&&this._hasStroke()&&this._isOnPath(i)}return!1},e.prototype._hasFill=function(){var t=this.options.fill;return t&&!tt(t.color)},e.prototype._hasStroke=function(){var t=this.options.stroke;return t&&t.width>0&&!tt(t.color)},e.prototype._clippedBBox=function(t){return this.bbox(t)},Object.defineProperties(e.prototype,o),e}(B);function ot(t,e,o,i){var r=0,n=0;return i&&(r=Math.atan2(i.c*o,i.a*e),0!==i.b&&(n=Math.atan2(i.d*o,i.b*e))),{x:r,y:n}}var it=Math.PI/2,rt=function(t){function e(e,o){void 0===e&&(e=new q),void 0===o&&(o=0),t.call(this),this.setCenter(e),this.setRadius(o)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.setCenter=function(t){return this._observerField("center",q.create(t)),this.geometryChange(),this},e.prototype.getCenter=function(){return this.center},e.prototype.equals=function(t){return t&&t.center.equals(this.center)&&t.radius===this.radius},e.prototype.clone=function(){return new e(this.center.clone(),this.radius)},e.prototype.pointAt=function(t){return this._pointAt(N(t))},e.prototype.bbox=function(t){for(var e=ot(this.center,this.radius,this.radius,t),o=q.maxPoint(),i=q.minPoint(),r=0;r<4;r++){var n=this._pointAt(e.x+r*it).transformCopy(t),s=this._pointAt(e.y+r*it).transformCopy(t),a=new q(n.x,s.y);o=q.min(o,a),i=q.max(i,a)}return Y.fromPoints(o,i)},e.prototype._pointAt=function(t){var e=this.center,o=this.radius;return new q(e.x+o*Math.cos(t),e.y+o*Math.sin(t))},e.prototype.containsPoint=function(t){var e=this.center,o=this.radius;return Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2)<=Math.pow(o,2)},e.prototype._isOnPath=function(t,e){var o=this.center,i=this.radius,r=o.distanceTo(t);return i-e<=r&&r<=i+e},e}(j(B,["radius"])),nt=function(t){return 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.fill=function(t,e){var o=this.options;if(R(t)){if(t&&"Gradient"!==t.nodeType){var i={color:t};R(e)&&(i.opacity=e),o.set("fill",i)}else o.set("fill",t);return this}return o.get("fill")},e.prototype.stroke=function(t,e,o){return R(t)?(this.options.set("stroke.color",t),R(e)&&this.options.set("stroke.width",e),R(o)&&this.options.set("stroke.opacity",o),this):this.options.get("stroke")},e}(t)},st=G.IDENTITY.toString(),at=function(t){return 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.bbox=function(t){var e,o=W(this.currentTransform(t)),i=o?o.toString():st;this._bboxCache&&this._matrixHash===i?e=this._bboxCache.clone():(e=this._bbox(o),this._bboxCache=e?e.clone():null,this._matrixHash=i);var r=this.options.get("stroke.width");return r&&e&&e.expand(r/2),e},e.prototype.geometryChange=function(){delete this._bboxCache,this.trigger("geometryChange",{element:this})},e}(t)};function pt(t){var e="_"+t;return function(t){return R(t)?(this._observerField(e,t),this.geometryChange(),this):this[e]}}var ht=function(t,e){void 0===e&&(e=["geometry"]);var o=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}(t);return function(t,e){for(var o=0;o<e.length;o++)t[e[o]]=pt(e[o])}(o.prototype,e),o},ct=function(t){function e(e,o){void 0===e&&(e=new rt),void 0===o&&(o={}),t.call(this,o),this.geometry(e),R(this.options.stroke)||this.stroke("#000")}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var o={nodeType:{configurable:!0}};return o.nodeType.get=function(){return"Circle"},e.prototype.rawBBox=function(){return this._geometry.bbox()},e.prototype._bbox=function(t){return this._geometry.bbox(t)},e.prototype._containsPoint=function(t){return this.geometry().containsPoint(t)},e.prototype._isOnPath=function(t){return this.geometry()._isOnPath(t,this.options.stroke.width/2)},Object.defineProperties(e.prototype,o),e}(nt(at(ht(et))));function lt(t){return t/V}function ut(t,e,o){return void 0===o&&(o=10),0===D(Math.abs(t-e),o)}function dt(t,e,o){return t<e||ut(t,e,o)}var ft=Math.pow;function yt(t,e,o,i,r,n){var s=D((r-t)/o,3),a=D((n-e)/i,3);return D(lt(Math.atan2(a,s)))}function gt(t,e){for(var o=t;o<e;)o+=90;return o}var vt=function(t){function e(e,o){void 0===e&&(e=new q),void 0===o&&(o={}),t.call(this),this.setCenter(e),this.radiusX=o.radiusX,this.radiusY=o.radiusY||o.radiusX,this.startAngle=o.startAngle,this.endAngle=o.endAngle,this.anticlockwise=o.anticlockwise||!1,this.xRotation=o.xRotation}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.clone=function(){return new e(this.center,{radiusX:this.radiusX,radiusY:this.radiusY,startAngle:this.startAngle,endAngle:this.endAngle,anticlockwise:this.anticlockwise})},e.prototype.setCenter=function(t){return this._observerField("center",q.create(t)),this.geometryChange(),this},e.prototype.getCenter=function(){return this.center},e.prototype.pointAt=function(t){var e=this.center,o=N(t);return new q(e.x+this.radiusX*Math.cos(o),e.y+this.radiusY*Math.sin(o))},e.prototype.curvePoints=function(){var t,e=this.startAngle,o=this.anticlockwise?-1:1,i=[this.pointAt(e)],r=this._arcInterval(),n=r.endAngle-r.startAngle,s=Math.ceil(n/45),a=n/s,p=e;this.xRotation&&(t=Q().rotate(this.xRotation,this.center));for(var h=1;h<=s;h++){var c=p+o*a,l=this._intervalCurvePoints(p,c,t);i.push(l.cp1,l.cp2,l.p2),p=c}return i},e.prototype.bbox=function(t){for(var e=this._arcInterval(),o=e.startAngle,i=e.endAngle,r=ot(this.center,this.radiusX,this.radiusY,t),n=lt(r.x),s=lt(r.y),a=this.pointAt(i).transformCopy(t),p=gt(n,o),h=gt(s,o),c=this.pointAt(o).transformCopy(t),l=q.min(c,a),u=q.max(c,a);p<i||h<i;){var d=void 0;p<i&&(d=this.pointAt(p).transformCopy(t),p+=90);var f=void 0;h<i&&(f=this.pointAt(h).transformCopy(t),h+=90),c=new q(d.x,f.y),l=q.min(l,c),u=q.max(u,c)}return Y.fromPoints(l,u)},e.prototype._arcInterval=function(){var t=this.startAngle,e=this.endAngle,o=this.anticlockwise;if(o){var i=t;t=e,e=i}return(t>e||o&&t===e)&&(e+=360),{startAngle:t,endAngle:e}},e.prototype._intervalCurvePoints=function(t,e,o){var i=this.pointAt(t),r=this.pointAt(e),n=this._derivativeAt(t),s=this._derivativeAt(e),a=(N(e)-N(t))/3,p=new q(i.x+a*n.x,i.y+a*n.y),h=new q(r.x-a*s.x,r.y-a*s.y);return o&&(i.transform(o),r.transform(o),p.transform(o),h.transform(o)),{p1:i,cp1:p,cp2:h,p2:r}},e.prototype._derivativeAt=function(t){var e=N(t);return new q(-this.radiusX*Math.sin(e),this.radiusY*Math.cos(e))},e.prototype.containsPoint=function(t){var e,o=this._arcInterval(),i=o.endAngle-o.startAngle,r=this.center,n=this.radiusX,s=this.radiusY,a=r.distanceTo(t),p=Math.atan2(t.y-r.y,t.x-r.x),h=n*s/Math.sqrt(ft(n,2)*ft(Math.sin(p),2)+ft(s,2)*ft(Math.cos(p),2)),c=this.pointAt(this.startAngle).round(10),l=this.pointAt(this.endAngle).round(10),u=function(t,e,o,i){var r=e.x-t.x,n=i.x-o.x,s=e.y-t.y,a=i.y-o.y,p=t.x-o.x,h=t.y-o.y,c=r*a-n*s,l=(r*h-s*p)/c,u=(n*h-a*p)/c;if(l>=0&&l<=1&&u>=0&&u<=1)return new q(t.x+u*r,t.y+u*s)}(r,t.round(10),c,l);if(i<180)e=u&&dt(r.distanceTo(u),a)&&dt(a,h);else{var d=yt(r.x,r.y,n,s,t.x,t.y);360!==d&&(d=(360+d)%360);var f=o.startAngle<=d&&d<=o.endAngle;e=f&&dt(a,h)||!f&&(!u||u.equals(t))}return e},e.prototype._isOnPath=function(t,e){var o=this._arcInterval(),i=this.center,r=yt(i.x,i.y,this.radiusX,this.radiusY,t.x,t.y);return 360!==r&&(r=(360+r)%360),o.startAngle<=r&&r<=o.endAngle&&this.pointAt(r).distanceTo(t)<=e},e.fromPoints=function(t,o,i,r,n,s,a){var p=function(t){var e=t.x1,o=t.y1,i=t.x2,r=t.y2,n=t.rx,s=t.ry,a=t.largeArc,p=t.swipe,h=t.rotation;void 0===h&&(h=0);var c=N(h),l=Math.cos(c),u=Math.sin(c),d=l*(e-i)/2+u*(o-r)/2,f=-u*(e-i)/2+l*(o-r)/2,y=a!==p?1:-1,g=Math.pow(d,2),v=Math.pow(f,2),m=Math.pow(n,2),x=Math.pow(s,2),_=g/m+v/x;_>1&&(_=Math.sqrt(g/m+v/x),n*=_,m=Math.pow(n,2),s*=_,x=Math.pow(s,2));var b=y*Math.sqrt((m*x-m*v-x*g)/(m*v+x*g));isNaN(b)&&(b=0);var w=b*(n*f)/s,C=s*d*-b/n,k=l*w-u*C+(e+i)/2,S=u*w+l*C+(o+r)/2,A=(d-w)/n,P=(f-C)/s,T=-(d+w)/n,M=-(f+C)/s,O=(P>=0?1:-1)*lt(Math.acos(A/Math.sqrt(A*A+P*P))),B=D((A*T+P*M)/(Math.sqrt(A*A+P*P)*Math.sqrt(T*T+M*M)),10),R=(A*M-P*T>=0?1:-1)*lt(Math.acos(B));!p&&R>0&&(R-=360);p&&R<0&&(R+=360);var E=O+R,z=E>=0?1:-1;return E=Math.abs(E)%360*z,{center:new q(k,S),startAngle:O,endAngle:E,radiusX:n,radiusY:s,xRotation:h}}({x1:t.x,y1:t.y,x2:o.x,y2:o.y,rx:i,ry:r,largeArc:n,swipe:s,rotation:a});return new e(p.center,{startAngle:p.startAngle,endAngle:p.endAngle,radiusX:p.radiusX,radiusY:p.radiusY,xRotation:p.xRotation,anticlockwise:0===s})},e}(j(B,["radiusX","radiusY","startAngle","endAngle","anticlockwise"])),mt=[].push,xt=[].pop,_t=[].splice,bt=[].shift,wt=[].slice,Ct=[].unshift,kt=function(t){function e(e){void 0===e&&(e=[]),t.call(this),this.length=0,this._splice(0,e.length,e)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.elements=function(t){return t?(this._splice(0,this.length,t),this._change(),this):this.slice(0)},e.prototype.push=function(){var t=arguments,e=mt.apply(this,t);return this._add(t),e},e.prototype.slice=function(){return wt.call(this)},e.prototype.pop=function(){var t=this.length,e=xt.apply(this);return t&&this._remove([e]),e},e.prototype.splice=function(t,e){var o=wt.call(arguments,2),i=this._splice(t,e,o);return this._change(),i},e.prototype.shift=function(){var t=this.length,e=bt.apply(this);return t&&this._remove([e]),e},e.prototype.unshift=function(){var t=arguments,e=Ct.apply(this,t);return this._add(t),e},e.prototype.indexOf=function(t){for(var e=this.length,o=0;o<e;o++)if(this[o]===t)return o;return-1},e.prototype._splice=function(t,e,o){var i=_t.apply(this,[t,e].concat(o));return this._clearObserver(i),this._setObserver(o),i},e.prototype._add=function(t){this._setObserver(t),this._change()},e.prototype._remove=function(t){this._clearObserver(t),this._change()},e.prototype._setObserver=function(t){for(var e=0;e<t.length;e++)t[e].addObserver(this)},e.prototype._clearObserver=function(t){for(var e=0;e<t.length;e++)t[e].removeObserver(this)},e.prototype._change=function(){},e}(B),St=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._change=function(){this.geometryChange()},e}(kt);function At(t,e,o){var i=lt(Math.atan2(e.y-t.y,e.x-t.x));return o.transformCopy(Q().rotate(-i,t)).x<t.x}function Pt(t,e,o){var i=1-t;return Math.pow(i,3)*o[0][e]+3*Math.pow(i,2)*t*o[1][e]+3*Math.pow(t,2)*i*o[2][e]+Math.pow(t,3)*o[3][e]}function Tt(t,e){return[-t[0][e]+3*t[1][e]-3*t[2][e]+t[3][e],3*(t[0][e]-2*t[1][e]+t[2][e]),3*(-t[0][e]+t[1][e]),t[0][e]]}var Mt=function(t){function e(e,o){void 0===e&&(e=0),void 0===o&&(o=0),t.call(this),this.real=e,this.img=o}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.add=function(t){return new e(D(this.real+t.real,10),D(this.img+t.img,10))},e.prototype.addConstant=function(t){return new e(this.real+t,this.img)},e.prototype.negate=function(){return new e(-this.real,-this.img)},e.prototype.multiply=function(t){return new e(this.real*t.real-this.img*t.img,this.real*t.img+this.img*t.real)},e.prototype.multiplyConstant=function(t){return new e(this.real*t,this.img*t)},e.prototype.nthRoot=function(t){var o=Math.atan2(this.img,this.real),i=Math.sqrt(Math.pow(this.img,2)+Math.pow(this.real,2)),r=Math.pow(i,1/t);return new e(r*Math.cos(o/t),r*Math.sin(o/t))},e.prototype.equals=function(t){return this.real===t.real&&this.img===t.img},e.prototype.isReal=function(){return 0===this.img},e}(O);function Ot(t){return t<0?-1:1}function Bt(t,e,o,i){if(0===t)return function(t,e,o){var i=Math.sqrt(Math.pow(e,2)-4*t*o);return[(-e+i)/(2*t),(-e-i)/(2*t)]}(e,o,i);var r,n,s,a,p,h,c,l=(3*t*o-Math.pow(e,2))/(3*Math.pow(t,2)),u=(2*Math.pow(e,3)-9*t*e*o+27*Math.pow(t,2)*i)/(27*Math.pow(t,3)),d=Math.pow(l/3,3)+Math.pow(u/2,2),f=new Mt(0,1),y=-e/(3*t);d<0?(r=new Mt(-u/2,Math.sqrt(-d)).nthRoot(3),n=new Mt(-u/2,-Math.sqrt(-d)).nthRoot(3)):(r=-u/2+Math.sqrt(d),r=new Mt(Ot(r)*Math.pow(Math.abs(r),1/3)),n=-u/2-Math.sqrt(d),n=new Mt(Ot(n)*Math.pow(Math.abs(n),1/3))),s=r.add(n),h=r.add(n).multiplyConstant(-.5),c=r.add(n.negate()).multiplyConstant(Math.sqrt(3)/2),a=h.add(f.multiply(c)),p=h.add(f.negate().multiply(c));var g=[];return s.isReal()&&g.push(D(s.real+y,10)),a.isReal()&&g.push(D(a.real+y,10)),p.isReal()&&g.push(D(p.real+y,10)),g}function Rt(t,e,o,i,r){for(var n,s=Tt(t,i),a=Bt(s[0],s[1],s[2],s[3]-e[i]),p=0;p<a.length;p++)if(0<=a[p]&&a[p]<=1&&(n=Pt(a[p],o,t),Math.abs(n-e[o])<=r))return!0}function Et(t,e,o){var i;if(t.x!==e.x){var r=Math.min(t.x,e.x),n=Math.max(t.x,e.x),s=Math.min(t.y,e.y),a=Math.max(t.y,e.y),p=r<=o.x&&o.x<n;i=s===a?o.y<=s&&p:p&&(a-s)*((t.x-e.x)*(t.y-e.y)>0?o.x-r:n-o.x)/(n-r)+s-o.y>=0}return i?1:0}function zt(t){var e="_"+t;return function(t){return R(t)?(this._observerField(e,q.create(t)),this.geometryChange(),this):this[e]}}var Lt=function(t,e){var o=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}(t);return function(t,e){for(var o=0;o<e.length;o++)t[e[o]]=zt(e[o])}(o.prototype,e),o};function It(t){for(var e=t.length,o=H,i=F,r=0;r<e;r++)i=Math.max(i,t[r]),o=Math.min(o,t[r]);return{min:o,max:i}}var jt=function(t){function e(e,o,i){t.call(this),this.anchor(e||new q),this.controlIn(o),this.controlOut(i)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.bboxTo=function(t,e){var o=this.anchor().transformCopy(e),i=t.anchor().transformCopy(e);return this.controlOut()&&t.controlIn()?this._curveBoundingBox(o,this.controlOut().transformCopy(e),t.controlIn().transformCopy(e),i):this._lineBoundingBox(o,i)},e.prototype._lineBoundingBox=function(t,e){return Y.fromPoints(t,e)},e.prototype._curveBoundingBox=function(t,e,o,i){var r=[t,e,o,i],n=this._curveExtremesFor(r,"x"),s=this._curveExtremesFor(r,"y"),a=It([n.min,n.max,t.x,i.x]),p=It([s.min,s.max,t.y,i.y]);return Y.fromPoints(new q(a.min,p.min),new q(a.max,p.max))},e.prototype._curveExtremesFor=function(t,e){var o=this._curveExtremes(t[0][e],t[1][e],t[2][e],t[3][e]);return{min:Pt(o.min,e,t),max:Pt(o.max,e,t)}},e.prototype._curveExtremes=function(t,e,o,i){var r=t-3*e+3*o-i,n=-2*(t-2*e+o),s=t-e,a=Math.sqrt(n*n-4*r*s),p=0,h=1;0===r?0!==n&&(p=h=-s/n):isNaN(a)||(p=(-n+a)/(2*r),h=(-n-a)/(2*r));var c=Math.max(Math.min(p,h),0);(c<0||c>1)&&(c=0);var l=Math.min(Math.max(p,h),1);return(l>1||l<0)&&(l=1),{min:c,max:l}},e.prototype._intersectionsTo=function(t,e){return this.controlOut()&&t.controlIn()?function(t,e,o){for(var i,r=Tt(t,"x"),n=Bt(r[0],r[1],r[2],r[3]-e.x),s=0,a=0;a<n.length;a++)(ut(i=Pt(n[a],"y",t),e.y)||i>e.y)&&((0===n[a]||1===n[a])&&o.bottomRight().x>e.x||0<n[a]&&n[a]<1)&&s++;return s}([this.anchor(),this.controlOut(),t.controlIn(),t.anchor()],e,this.bboxTo(t)):Et(this.anchor(),t.anchor(),e)},e.prototype._isOnCurveTo=function(t,e,o,i){if(this.bboxTo(t).expand(o,o).containsPoint(e)){var r=this.anchor(),n=this.controlOut(),s=t.controlIn(),a=t.anchor();if("start"===i&&r.distanceTo(e)<=o)return!At(r,n,e);if("end"===i&&a.distanceTo(e)<=o)return!At(a,s,e);var p=[r,n,s,a];if(Rt(p,e,"x","y",o)||Rt(p,e,"y","x",o))return!0;var h=Q().rotate(45,e),c=[r.transformCopy(h),n.transformCopy(h),s.transformCopy(h),a.transformCopy(h)];return Rt(c,e,"x","y",o)||Rt(c,e,"y","x",o)}},e.prototype._isOnLineTo=function(t,e,o){var i=this.anchor(),r=t.anchor(),n=lt(Math.atan2(r.y-i.y,r.x-i.x));return new Y([i.x,i.y-o/2],[i.distanceTo(r),o]).containsPoint(e.transformCopy(Q().rotate(-n,i)))},e.prototype._isOnPathTo=function(t,e,o,i){return this.controlOut()&&t.controlIn()?this._isOnCurveTo(t,e,o/2,i):this._isOnLineTo(t,e,o)},e}(Lt(B,["anchor","controlIn","controlOut"]));function Dt(t){if(t)return t[t.length-1]}function Vt(t,e,o){for(var i=e?0:1,r=0;r<t.length;r+=2)t.splice(r+i,0,o)}function Ht(t,e){if(t&&e)return e.scaleCopy(2).translate(-t.x,-t.y)}function Ft(t,e,o){var i=e.clone().scale(2/3);return{controlOut:i.clone().translateWith(t.scaleCopy(1/3)),controlIn:i.translateWith(o.scaleCopy(1/3))}}var Nt={l:function(t,e){for(var o=e.parameters,i=e.position,r=0;r<o.length;r+=2){var n=new q(o[r],o[r+1]);e.isRelative&&n.translateWith(i),t.lineTo(n.x,n.y),i.x=n.x,i.y=n.y}},c:function(t,e){for(var o=e.parameters,i=e.position,r=0;r<o.length;r+=6){var n=new q(o[r],o[r+1]),s=new q(o[r+2],o[r+3]),a=new q(o[r+4],o[r+5]);e.isRelative&&(s.translateWith(i),n.translateWith(i),a.translateWith(i)),t.curveTo(n,s,a),i.x=a.x,i.y=a.y}},v:function(t,e){var o=e.isRelative?0:e.position.x;Vt(e.parameters,!0,o),this.l(t,e)},h:function(t,e){var o=e.isRelative?0:e.position.y;Vt(e.parameters,!1,o),this.l(t,e)},a:function(t,e){for(var o=e.parameters,i=e.position,r=0;r<o.length;r+=7){var n=o[r],s=o[r+1],a=o[r+2],p=o[r+3],h=o[r+4],c=new q(o[r+5],o[r+6]);e.isRelative&&c.translateWith(i),i.x===c.x&&i.y===c.y||(t.arcTo(c,n,s,p,h,a),i.x=c.x,i.y=c.y)}},s:function(t,e){var o,i=e.parameters,r=e.position,n=e.previousCommand;"s"!==n&&"c"!==n||(o=Dt(Dt(t.paths).segments).controlIn());for(var s=0;s<i.length;s+=4){var a=new q(i[s],i[s+1]),p=new q(i[s+2],i[s+3]),h=void 0;e.isRelative&&(a.translateWith(r),p.translateWith(r)),h=o?Ht(o,r):r.clone(),o=a,t.curveTo(h,a,p),r.x=p.x,r.y=p.y}},q:function(t,e){for(var o=e.parameters,i=e.position,r=0;r<o.length;r+=4){var n=new q(o[r],o[r+1]),s=new q(o[r+2],o[r+3]);e.isRelative&&(n.translateWith(i),s.translateWith(i));var a=Ft(i,n,s);t.curveTo(a.controlOut,a.controlIn,s),i.x=s.x,i.y=s.y}},t:function(t,e){var o,i=e.parameters,r=e.position,n=e.previousCommand;"q"!==n&&"t"!==n||(o=Dt(Dt(t.paths).segments).controlIn().clone().translateWith(r.scaleCopy(-1/3)).scale(1.5));for(var s=0;s<i.length;s+=2){var a=new q(i[s],i[s+1]);e.isRelative&&a.translateWith(r),o=o?Ht(o,r):r.clone();var p=Ft(r,o,a);t.curveTo(p.controlOut,p.controlIn,a),r.x=a.x,r.y=a.y}}},Ut=/([a-df-z]{1})([^a-df-z]*)(z)?/gi,Gt=/[,\s]?([+\-]?(?:\d*\.\d+|\d+)(?:[eE][+\-]?\d+)?)/g;var Wt=function(t,e){var o,i=new q;return e.replace(Ut,(function(e,r,n,s){var a=r.toLowerCase(),p=a===r,h=function(t){var e=[];return t.replace(Gt,(function(t,o){e.push(parseFloat(o))})),e}(n.trim());if("m"===a&&(p?(i.x+=h[0],i.y+=h[1]):(i.x=h[0],i.y=h[1]),t.moveTo(i.x,i.y),h.length>2&&(a="l",h.splice(0,2))),Nt[a])Nt[a](t,{parameters:h,position:i,isRelative:p,previousCommand:o}),s&&"z"===s.toLowerCase()&&t.close();else if("m"!==a)throw new Error("Error while parsing SVG path. Unsupported command: "+a);o=a})),t};function qt(t,e,o){for(var i,r=0;r<t.length;r++){var n=t[r];if(n.visible()){var s=e?n.bbox(o):n.rawBBox();s&&(i=i?Y.union(i,s):s)}}return i}function Xt(t,e){for(var o,i=0;i<t.length;i++){var r=t[i];if(r.visible()){var n=r.clippedBBox(e);n&&(o=o?Y.union(o,n):n)}}return o}function Yt(t,e,o){return Math.max(Math.min(t,o),e)}var Zt=function(t){function e(e){t.call(this,e),this.segments=new St,this.segments.addObserver(this),R(this.options.stroke)||(this.stroke("#000"),R(this.options.stroke.lineJoin)||this.options.set("stroke.lineJoin","miter"))}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var o={nodeType:{configurable:!0}};return e.parse=function(t,e){return Qt.parse(t,e)},o.nodeType.get=function(){return"Path"},e.prototype.moveTo=function(t,e){return this.suspend(),this.segments.elements([]),this.resume(),this.lineTo(t,e),this},e.prototype.lineTo=function(t,e){var o=R(e)?new q(t,e):t,i=new jt(o);return this.segments.push(i),this},e.prototype.curveTo=function(t,e,o){if(this.segments.length>0){var i=Dt(this.segments),r=new jt(o,e);this.suspend(),i.controlOut(t),this.resume(),this.segments.push(r)}return this},e.prototype.arc=function(t,e,o,i,r){if(this.segments.length>0){var n=Dt(this.segments).anchor(),s=N(t),a=new q(n.x-o*Math.cos(s),n.y-i*Math.sin(s)),p=new vt(a,{startAngle:t,endAngle:e,radiusX:o,radiusY:i,anticlockwise:r});this._addArcSegments(p)}return this},e.prototype.arcTo=function(t,e,o,i,r,n){if(this.segments.length>0){var s=Dt(this.segments).anchor(),a=vt.fromPoints(s,q.create(t),e,o,i,r,n);this._addArcSegments(a)}return this},e.prototype._addArcSegments=function(t){this.suspend();for(var e=t.curvePoints(),o=1;o<e.length;o+=3)this.curveTo(e[o],e[o+1],e[o+2]);this.resume(),this.geometryChange()},e.prototype.close=function(){return this.options.closed=!0,this.geometryChange(),this},e.prototype.rawBBox=function(){return this._bbox()},e.prototype._containsPoint=function(t){for(var e,o,i=this.segments,r=i.length,n=0,s=1;s<r;s++)e=i[s-1],o=i[s],n+=e._intersectionsTo(o,t);return!this.options.closed&&i[0].anchor().equals(i[r-1].anchor())||(n+=Et(i[0].anchor(),i[r-1].anchor(),t)),n%2!=0},e.prototype._isOnPath=function(t,e){var o=this.segments,i=o.length,r=e||this.options.stroke.width;if(i>1){if(o[0]._isOnPathTo(o[1],t,r,"start"))return!0;for(var n=2;n<=i-2;n++)if(o[n-1]._isOnPathTo(o[n],t,r))return!0;if(o[i-2]._isOnPathTo(o[i-1],t,r,"end"))return!0}return!1},e.prototype._bbox=function(t){var e,o=this.segments,i=o.length;if(1===i){var r=o[0].anchor().transformCopy(t);e=new Y(r,X.ZERO)}else if(i>0)for(var n=1;n<i;n++){var s=o[n-1].bboxTo(o[n],t);e=e?Y.union(e,s):s}return e},e.fromRect=function(t,o){var i=new e(o),r=t.cornerRadius,n=r[0],s=r[1];if(0===n&&0===s)i.moveTo(t.topLeft()).lineTo(t.topRight()).lineTo(t.bottomRight()).lineTo(t.bottomLeft()).close();else{var a=t.origin,p=a.x,h=a.y,c=t.width(),l=t.height();n=Yt(n,0,c/2),s=Yt(s,0,l/2),i.moveTo(p+n,h).lineTo(p+c-n,h).arcTo([p+c,h+s],n,s,!1).lineTo(p+c,h+l-s).arcTo([p+c-n,h+l],n,s,!1).lineTo(p+n,h+l).arcTo([p,h+l-s],n,s,!1).lineTo(p,h+s).arcTo([p+n,h],n,s,!1)}return i},e.fromPoints=function(t,o){if(t){for(var i=new e(o),r=0;r<t.length;r++){var n=q.create(t[r]);n&&(0===r?i.moveTo(n):i.lineTo(n))}return i}},e.fromArc=function(t,o){var i=new e(o),r=t.startAngle,n=t.pointAt(r);return i.moveTo(n.x,n.y),i.arc(r,t.endAngle,t.radiusX,t.radiusY,t.anticlockwise),i},Object.defineProperties(e.prototype,o),e}(nt(at(et))),Qt=function(t){function e(e){t.call(this,e),this.paths=new St,this.paths.addObserver(this),R(this.options.stroke)||this.stroke("#000")}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var o={nodeType:{configurable:!0}};return e.parse=function(t,o){var i=new e(o);return Wt(i,t)},o.nodeType.get=function(){return"MultiPath"},e.prototype.moveTo=function(t,e){var o=new Zt;return o.moveTo(t,e),this.paths.push(o),this},e.prototype.lineTo=function(t,e){return this.paths.length>0&&Dt(this.paths).lineTo(t,e),this},e.prototype.curveTo=function(t,e,o){return this.paths.length>0&&Dt(this.paths).curveTo(t,e,o),this},e.prototype.arc=function(t,e,o,i,r){return this.paths.length>0&&Dt(this.paths).arc(t,e,o,i,r),this},e.prototype.arcTo=function(t,e,o,i,r,n){return this.paths.length>0&&Dt(this.paths).arcTo(t,e,o,i,r,n),this},e.prototype.close=function(){return this.paths.length>0&&Dt(this.paths).close(),this},e.prototype._bbox=function(t){return qt(this.paths,!0,t)},e.prototype.rawBBox=function(){return qt(this.paths,!1)},e.prototype._containsPoint=function(t){for(var e=this.paths,o=0;o<e.length;o++)if(e[o]._containsPoint(t))return!0;return!1},e.prototype._isOnPath=function(t){for(var e=this.paths,o=this.options.stroke.width,i=0;i<e.length;i++)if(e[i]._isOnPath(t,o))return!0;return!1},e.prototype._clippedBBox=function(t){return Xt(this.paths,this.currentTransform(t))},Object.defineProperties(e.prototype,o),e}(nt(at(et))),Kt=function(t){function e(e,o){void 0===e&&(e=new vt),void 0===o&&(o={}),t.call(this,o),this.geometry(e),R(this.options.stroke)||this.stroke("#000")}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var o={nodeType:{configurable:!0}};return o.nodeType.get=function(){return"Arc"},e.prototype._bbox=function(t){return this._geometry.bbox(t)},e.prototype.rawBBox=function(){return this.geometry().bbox()},e.prototype.toPath=function(){var t=new Zt,e=this.geometry().curvePoints();if(e.length>0){t.moveTo(e[0].x,e[0].y);for(var o=1;o<e.length;o+=3)t.curveTo(e[o],e[o+1],e[o+2])}return t},e.prototype._containsPoint=function(t){return this.geometry().containsPoint(t)},e.prototype._isOnPath=function(t){return this.geometry()._isOnPath(t,this.options.stroke.width/2)},Object.defineProperties(e.prototype,o),e}(nt(at(ht(et)))),$t=function(t){function e(e){t.call(this),this._size=e,this._length=0,this._map={}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.put=function(t,e){var o=this._map,i={key:t,value:e};o[t]=i,this._head?(this._tail.newer=i,i.older=this._tail,this._tail=i):this._head=this._tail=i,this._length>=this._size?(o[this._head.key]=null,this._head=this._head.newer,this._head.older=null):this._length++},e.prototype.get=function(t){var e=this._map[t];if(e)return e===this._head&&e!==this._tail&&(this._head=e.newer,this._head.older=null),e!==this._tail&&(e.older&&(e.older.newer=e.newer,e.newer.older=e.older),e.older=this._tail,e.newer=null,this._tail.newer=e,this._tail=e),e.value},e}(O),Jt=/\r?\n|\r|\t/g;function te(t){return String(t).replace(Jt," ")}function ee(t){var e=[];for(var o in t)e.push(o+t[o]);return e.sort().join("")}function oe(t){for(var e=2166136261,o=0;o<t.length;++o)e+=(e<<1)+(e<<4)+(e<<7)+(e<<8)+(e<<24),e^=t.charCodeAt(o);return e>>>0}var ie,re={baselineMarkerSize:1};"undefined"!=typeof document&&((ie=document.createElement("div")).style.cssText="position: absolute !important; top: -4000px !important; width: auto !important; height: auto !important;padding: 0 !important; margin: 0 !important; border: 0 !important;line-height: normal !important; visibility: hidden !important; white-space: pre!important;");var ne=function(t){function e(e){t.call(this),this._cache=new $t(1e3),this.options=Object.assign({},re,e)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.measure=function(t,e,o){if(void 0===o&&(o={}),null==t)return{width:0,height:0,baseline:0};var i=oe(t+ee(e)),r=this._cache.get(i);if(r)return r;var n={width:0,height:0,baseline:0},s=o.box||ie,a=this._baselineMarker().cloneNode(!1);for(var p in e){var h=e[p];void 0!==h&&(s.style[p]=h)}var c=!1!==o.normalizeText?te(t):String(t);return s.textContent=c,s.appendChild(a),document.body.appendChild(s),c.length&&(n.width=s.offsetWidth-this.options.baselineMarkerSize,n.height=s.offsetHeight,n.baseline=a.offsetTop+this.options.baselineMarkerSize),n.width>0&&n.height>0&&this._cache.put(i,n),s.parentNode.removeChild(s),n},e.prototype._baselineMarker=function(){var t=document.createElement("div");return t.style.cssText="display: inline-block; vertical-align: baseline;width: "+this.options.baselineMarkerSize+"px; height: "+this.options.baselineMarkerSize+"px;overflow: hidden;",t},e}(O);ne.current=new ne;var se=ne;function ae(t,e,o){return se.current.measure(t,e,o)}var pe=function(t){function e(e,o,i){void 0===o&&(o=new q),void 0===i&&(i={}),t.call(this,i),this.content(e),this.position(o),this.options.font||(this.options.font="12px sans-serif"),R(this.options.fill)||this.fill("#000")}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var o={nodeType:{configurable:!0}};return o.nodeType.get=function(){return"Text"},e.prototype.content=function(t){return R(t)?(this.options.set("content",t),this):this.options.get("content")},e.prototype.measure=function(){return ae(this.content(),{font:this.options.get("font")})},e.prototype.rect=function(){var t=this.measure(),e=this.position().clone();return new Y(e,[t.width,t.height])},e.prototype.bbox=function(t){var e=W(this.currentTransform(t));return this.rect().bbox(e)},e.prototype.rawBBox=function(){return this.rect().bbox()},e.prototype._containsPoint=function(t){return this.rect().containsPoint(t)},Object.defineProperties(e.prototype,o),e}(nt(Lt(et,["position"]))),he=function(t){function e(e,o,i){void 0===o&&(o=new Y),void 0===i&&(i={}),t.call(this,i),this.src(e),this.rect(o)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var o={nodeType:{configurable:!0}};return o.nodeType.get=function(){return"Image"},e.prototype.src=function(t){return R(t)?(this.options.set("src",t),this):this.options.get("src")},e.prototype.bbox=function(t){var e=W(this.currentTransform(t));return this._rect.bbox(e)},e.prototype.rawBBox=function(){return this._rect.bbox()},e.prototype._containsPoint=function(t){return this._rect.containsPoint(t)},e.prototype._hasFill=function(){return this.src()},Object.defineProperties(e.prototype,o),e}(ht(et,["rect"])),ce=function(t,e){return function(t){function o(){t.apply(this,arguments)}return t&&(o.__proto__=t),o.prototype=Object.create(t&&t.prototype),o.prototype.constructor=o,o.prototype.traverse=function(t){for(var o=this[e],i=0;i<o.length;i++){var r=o[i];r.traverse?r.traverse(t):t(r)}return this},o}(t)};function le(t,e){return t.push.apply(t,e),t}var ue=function(t){function e(e){t.call(this,e),this.children=[]}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var o={nodeType:{configurable:!0}};return o.nodeType.get=function(){return"Group"},e.prototype.childrenChange=function(t,e,o){this.trigger("childrenChange",{action:t,items:e,index:o})},e.prototype.append=function(){return le(this.children,arguments),this._reparent(arguments,this),this.childrenChange("add",arguments),this},e.prototype.insert=function(t,e){return this.children.splice(t,0,e),e.parent=this,this.childrenChange("add",[e],t),this},e.prototype.insertAt=function(t,e){return this.insert(e,t)},e.prototype.remove=function(t){var e=this.children.indexOf(t);return e>=0&&(this.children.splice(e,1),t.parent=null,this.childrenChange("remove",[t],e)),this},e.prototype.removeAt=function(t){if(0<=t&&t<this.children.length){var e=this.children[t];this.children.splice(t,1),e.parent=null,this.childrenChange("remove",[e],t)}return this},e.prototype.clear=function(){var t=this.children;return this.children=[],this._reparent(t,null),this.childrenChange("remove",t,0),this},e.prototype.bbox=function(t){return qt(this.children,!0,this.currentTransform(t))},e.prototype.rawBBox=function(){return qt(this.children,!1)},e.prototype._clippedBBox=function(t){return Xt(this.children,this.currentTransform(t))},e.prototype.currentTransform=function(t){return et.prototype.currentTransform.call(this,t)||null},e.prototype.containsPoint=function(t,e){if(this.visible())for(var o=this.children,i=this.currentTransform(e),r=0;r<o.length;r++)if(o[r].containsPoint(t,i))return!0;return!1},e.prototype._reparent=function(t,e){for(var o=0;o<t.length;o++){var i=t[o],r=i.parent;r&&r!==this&&r.remove&&r.remove(i),i.parent=e}},Object.defineProperties(e.prototype,o),e}(ce(et,"children"));function de(t,e,o){var i=o.transform()||Q(),r=i.matrix();r.e+=t.x-e.origin.x,r.f+=t.y-e.origin.y,i.matrix(r),o.transform(i)}function fe(t,e,o,i,r){return"start"===o?e.origin[i]:"end"===o?e.origin[i]+e.size[r]-t:e.origin[i]+(e.size[r]-t)/2}function ye(t,e,o,i,r){return"start"===o?e.origin[i]+e.size[r]-t:"end"===o?e.origin[i]:e.origin[i]+(e.size[r]-t)/2}var ge={alignContent:"start",justifyContent:"start",alignItems:"start",spacing:0,orientation:"horizontal",lineSpacing:0,wrap:!0,revers:!1},ve=function(t,e){t.forEach(e)},me=function(t,e){for(var o=t.length-1;o>=0;o--)e(t[o],o)},xe=function(t){function e(e,o){t.call(this,Object.assign({},ge,o)),this._rect=e,this._fieldMap={}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.rect=function(t){return t?(this._rect=t,this):this._rect},e.prototype._initMap=function(){var t=this.options,e=this._fieldMap;"horizontal"===t.orientation?(e.sizeField="width",e.groupsSizeField="height",e.groupAxis="x",e.groupsAxis="y"):(e.sizeField="height",e.groupsSizeField="width",e.groupAxis="y",e.groupsAxis="x"),t.reverse?(this.forEach=me,this.justifyAlign=ye):(this.forEach=ve,this.justifyAlign=fe)},e.prototype.reflow=function(){if(this._rect&&0!==this.children.length){this._initMap(),this.options.transform&&this.transform(null);for(var t,e,o,i=this.options,r=this._rect,n=this._initGroups(),s=n.groups,a=n.groupsSize,p=this._fieldMap,h=p.sizeField,c=p.groupsSizeField,l=p.groupAxis,u=p.groupsAxis,d=new q,f=new q,y=new X,g=fe(a,r,i.alignContent,u,c),v=function(r,n){var s=e.elements[n];f[l]=t,f[u]=fe(r.size[c],o,i.alignItems,u,c),de(f,r,s),t+=r.size[h]+i.spacing},m=0;m<s.length;m++)e=s[m],d[l]=t=this.justifyAlign(e.size,r,i.justifyContent,l,h),d[u]=g,y[h]=e.size,y[c]=e.lineSize,o=new Y(d,y),this.forEach(e.bboxes,v),g+=e.lineSize+i.lineSpacing;if(!i.wrap&&e.size>r.size[h]){var x=r.size[h]/o.size[h],_=o.topLeft().scale(x,x),b=fe(o.size[c]*x,r,i.alignContent,u,c),w=Q();"x"===l?w.translate(r.origin.x-_.x,b-_.y):w.translate(b-_.x,r.origin.y-_.y),w.scale(x,x),this.transform(w)}}},e.prototype._initGroups=function(){for(var t=this.options,e=this.children,o=t.lineSpacing,i=t.wrap,r=t.spacing,n=this._fieldMap.sizeField,s=this._newGroup(),a=[],p=function(){a.push(s),h+=s.lineSize+o},h=-o,c=0;c<e.length;c++){var l=e[c],u=e[c].clippedBBox();l.visible()&&u&&(i&&s.size+u.size[n]+r>this._rect.size[n]?0===s.bboxes.length?(this._addToGroup(s,u,l),p(),s=this._newGroup()):(p(),s=this._newGroup(),this._addToGroup(s,u,l)):this._addToGroup(s,u,l))}return s.bboxes.length&&p(),{groups:a,groupsSize:h}},e.prototype._addToGroup=function(t,e,o){t.size+=e.size[this._fieldMap.sizeField]+this.options.spacing,t.lineSize=Math.max(e.size[this._fieldMap.groupsSizeField],t.lineSize),t.bboxes.push(e),t.elements.push(o)},e.prototype._newGroup=function(){return{lineSize:0,size:-this.options.spacing,bboxes:[],elements:[]}},e}(ue),_e=function(t){function e(e,o){void 0===e&&(e=new Y),void 0===o&&(o={}),t.call(this,o),this.geometry(e),R(this.options.stroke)||this.stroke("#000")}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var o={nodeType:{configurable:!0}};return o.nodeType.get=function(){return"Rect"},e.prototype._bbox=function(t){return this._geometry.bbox(t)},e.prototype.rawBBox=function(){return this._geometry.bbox()},e.prototype._containsPoint=function(t){return this._geometry.containsPoint(t)},e.prototype._isOnPath=function(t){return this.geometry()._isOnPath(t,this.options.stroke.width/2)},Object.defineProperties(e.prototype,o),e}(nt(at(ht(et))));function be(t,e,o,i,r){for(var n=0;n<t.length;n++){var s=t[n].clippedBBox();if(s){var a=s.origin.clone();a[i]=fe(s.size[r],e,o||"start",i,r),de(a,s,t[n])}}}function we(t,e,o){be(t,e,o,"x","width")}function Ce(t,e,o){be(t,e,o,"y","height")}function ke(t,e,o,i){if(t.length>1)for(var r=new q,n=t[0].bbox,s=1;s<t.length;s++){var a=t[s].element,p=t[s].bbox;r[e]=n.origin[e]+n.size[i],r[o]=p.origin[o],de(r,p,a),p.origin[e]=r[e],n=p}}function Se(t){for(var e=[],o=0;o<t.length;o++){var i=t[o],r=i.clippedBBox();r&&e.push({element:i,bbox:r})}return e}function Ae(t){ke(Se(t),"x","y","width")}function Pe(t){ke(Se(t),"y","x","height")}function Te(t,e,o,i,r){for(var n=function(t,e,o){for(var i,r,n=e.size[o],s=[],a=[],p=0,h=function(){a.push({element:i,bbox:r})},c=0;c<t.length;c++)if(i=t[c],r=i.clippedBBox()){var l=r.size[o];p+l>n?a.length?(s.push(a),a=[],h(),p=l):(h(),s.push(a),a=[],p=0):(h(),p+=l)}return a.length&&s.push(a),s}(t,e,r),s=e.origin.clone(),a=[],p=0;p<n.length;p++){var h=n[p],c=h[0];s[i]=c.bbox.origin[i],de(s,c.bbox,c.element),c.bbox.origin[o]=s[o],ke(h,o,i,r),a.push([]);for(var l=0;l<h.length;l++)a[p].push(h[l].element)}return a}function Me(t,e){return Te(t,e,"x","y","width")}function Oe(t,e){return Te(t,e,"y","x","height")}function Be(t,e){var o=t.clippedBBox();if(o){var i=o.size,r=e.size;if(r.width<i.width||r.height<i.height){var n=Math.min(r.width/i.width,r.height/i.height),s=t.transform()||Q();s.scale(n,n),t.transform(s)}}}var Re=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._change=function(){this.optionsChange({field:"stops"})},e}(kt);function Ee(t){return function(e){return R(e)?(this.options.set(t,e),this):this.options.get(t)}}var ze=function(t){function e(e,o,i){t.call(this),this.options=new z({offset:e,color:o,opacity:R(i)?i:1}),this.options.addObserver(this)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.create=function(t){if(R(t))return t instanceof e?t:t.length>1?new e(t[0],t[1],t[2]):new e(t.offset,t.color,t.opacity)},e}(function(t,e){var o=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}(t);return function(t,e){for(var o=0;o<e.length;o++)t[e[o]]=Ee(e[o])}(o.prototype,e),o}(B,["offset","color","opacity"])),Le=function(t){function e(e){void 0===e&&(e={}),t.call(this),this.stops=new Re(this._createStops(e.stops)),this.stops.addObserver(this),this._userSpace=e.userSpace,this.id=$()}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var o={nodeType:{configurable:!0}};return o.nodeType.get=function(){return"Gradient"},e.prototype.userSpace=function(t){return R(t)?(this._userSpace=t,this.optionsChange(),this):this._userSpace},e.prototype._createStops=function(t){void 0===t&&(t=[]);for(var e=[],o=0;o<t.length;o++)e.push(ze.create(t[o]));return e},e.prototype.addStop=function(t,e,o){this.stops.push(new ze(t,e,o))},e.prototype.removeStop=function(t){var e=this.stops.indexOf(t);e>=0&&this.stops.splice(e,1)},e.prototype.optionsChange=function(t){this.trigger("optionsChange",{field:"gradient"+(t?"."+t.field:""),value:this})},e.prototype.geometryChange=function(){this.optionsChange()},Object.defineProperties(e.prototype,o),e}(B),Ie=function(t){function e(e){void 0===e&&(e={}),t.call(this,e),this.start(e.start||new q),this.end(e.end||new q(1,0))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Lt(Le,["start","end"])),je=function(t){function e(e){void 0===e&&(e={}),t.call(this,e),this.center(e.center||new q),this._radius=R(e.radius)?e.radius:1,this._fallbackFill=e.fallbackFill}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.radius=function(t){return R(t)?(this._radius=t,this.geometryChange(),this):this._radius},e.prototype.fallbackFill=function(t){return R(t)?(this._fallbackFill=t,this.optionsChange(),this):this._fallbackFill},e}(Lt(Le,["center"]));function De(t){return.5-Math.cos(t*Math.PI)/2}function Ve(t){return t}function He(t,e,o,i){var r=1.70158,n=0,s=i;return 0===t?o:1===t?o+i:(n||(n=.5),s<Math.abs(i)?(s=i,r=n/4):r=n/(2*Math.PI)*Math.asin(i/s),s*Math.pow(2,-10*t)*Math.sin((Number(t)-r)*(1.1*Math.PI)/n)+i+o)}var Fe,Ne,Ue=Date.now||function(){return(new Date).getTime()},Ge=function(t){var e="undefined"!=typeof window?window:{},o=e.requestAnimationFrame||e.webkitRequestAnimationFrame||e.mozRequestAnimationFrame||e.oRequestAnimationFrame||e.msRequestAnimationFrame||function(t){setTimeout(t,1e3/60)};(Ge=function(t){return o.call(e,t)})(t)},We=Ge,qe=function(t){function e(){t.call(this),this._items=[]}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var o={current:{configurable:!0}};return o.current.get=function(){return Fe||(Fe=new e),Fe},e.prototype.register=function(t,e){this._items.push({name:t,type:e})},e.prototype.create=function(t,e){var o,i=this._items;if(e&&e.type)for(var r=e.type.toLowerCase(),n=0;n<i.length;n++)if(i[n].name.toLowerCase()===r){o=i[n];break}if(o)return new o.type(t,e)},Object.defineProperties(e,o),e}(O),Xe=function(t){function e(e,o){t.call(this),this.options=Object.assign({},this.options,o),this.element=e}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var o={options:{configurable:!0}};return e.create=function(t,e,o){return qe.current.create(t,e,o)},o.options.get=function(){return this._options||{duration:500,easing:"swing"}},o.options.set=function(t){this._options=t},e.prototype.setup=function(){},e.prototype.step=function(){},e.prototype.play=function(){var t=this,e=this.options,o=e.duration,r=e.delay;void 0===r&&(r=0);var n=i[e.easing],s=Ue()+r,a=s+o;0===o?(this.step(1),this.abort()):setTimeout((function(){var e=function(){if(!t._stopped){var i=Ue(),r=Yt(i-s,0,o),p=n(r/o,r,0,1,o);t.step(p),i<a?We(e):t.abort()}};e()}),r)},e.prototype.abort=function(){this._stopped=!0},e.prototype.destroy=function(){this.abort()},Object.defineProperties(e.prototype,o),e}(O),Ye=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var o={current:{configurable:!0}};return o.current.get=function(){return Ne||(Ne=new e),Ne},e.prototype.parse=function(t,e){var o=new Qt(e);return Wt(o,t)},Object.defineProperties(e,o),e}(O),Ze=function(t){function e(e){t.call(this),this.childNodes=[],this.parent=null,e&&(this.srcElement=e,this.observe())}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.destroy=function(){this.srcElement&&this.srcElement.removeObserver(this);for(var t=this.childNodes,e=0;e<t.length;e++)this.childNodes[e].destroy();this.parent=null},e.prototype.load=function(){},e.prototype.observe=function(){this.srcElement&&this.srcElement.addObserver(this)},e.prototype.append=function(t){this.childNodes.push(t),t.parent=this},e.prototype.insertAt=function(t,e){this.childNodes.splice(e,0,t),t.parent=this},e.prototype.remove=function(t,e){for(var o=t+e,i=t;i<o;i++)this.childNodes[i].removeSelf();this.childNodes.splice(t,e)},e.prototype.removeSelf=function(){this.clear(),this.destroy()},e.prototype.clear=function(){this.remove(0,this.childNodes.length)},e.prototype.invalidate=function(){this.parent&&this.parent.invalidate()},e.prototype.geometryChange=function(){this.invalidate()},e.prototype.optionsChange=function(){this.invalidate()},e.prototype.childrenChange=function(t){"add"===t.action?this.load(t.items,t.index):"remove"===t.action&&this.remove(t.index,t.items.length),this.invalidate()},e}(O),Qe=function(t){function e(){t.call(this),this._events={}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.bind=function(t,e,o){var i=arguments,r=this,n=$e(t),s=Ke(e),a=n.length;if(void 0===e){for(var p in t)r.bind(p,t[p]);return this}for(var h=function(t){var a=n[t],p=s?e:e[a];if(p){if(o){var h=p;(p=function(){r.unbind(a,p),h.apply(r,i)}).original=h}(r._events[a]=r._events[a]||[]).push(p)}},c=0;c<a;c++)h(c);return this},e.prototype.one=function(t,e){return this.bind(t,e,!0)},e.prototype.first=function(t,e){for(var o=$e(t),i=Ke(e),r=0,n=o.length;r<n;r++){var s=o[r],a=i?e:e[s];if(a)(this._events[s]=this._events[s]||[]).unshift(a)}return this},e.prototype.trigger=function(t,e){void 0===e&&(e={});var o=this._events[t];if(o){var i=o.length;e.sender=this,e._defaultPrevented=!1,e.preventDefault=Je,e.isDefaultPrevented=to,o=o.slice();for(var r=0;r<i;r++)o[r].call(this,e);return!0===e._defaultPrevented}return!1},e.prototype.unbind=function(t,e){var o=this._events[t];if(void 0===t)this._events={};else if(o)if(e)for(var i=o.length-1;i>=0;i--)o[i]!==e&&o[i].original!==e||o.splice(i,1);else this._events[t]=[];return this},e}(O);function Ke(t){return"function"==typeof t}function $e(t){return"string"==typeof t?[t]:t}function Je(){this._defaultPrevented=!0}function to(){return!0===this._defaultPrevented}function eo(t,e){for(var o={},i=window.getComputedStyle(t)||{},r=Array.isArray(e)?e:[e],n=0;n<r.length;n++){var s=r[n];o[s]=i[s]}return o}function oo(t){return isNaN(t)?t:t+"px"}function io(t,e){if(!e){var o=eo(t,["width","height"]);return{width:parseInt(o.width,10),height:parseInt(o.height,10)}}var i=e.width,r=e.height;R(i)&&(t.style.width=oo(i)),R(r)&&(t.style.height=oo(r))}function ro(t){return void 0===t&&(t={}),t.touch?t.touch.initialTouch:t.target}function no(t){var e=eo(t,["paddingLeft","paddingTop"]),o=e.paddingLeft,i=e.paddingTop;return{top:parseFloat(i),left:parseFloat(o)}}function so(t){var e=t.getBoundingClientRect(),o=document.documentElement;return{top:e.top+(window.pageYOffset||o.scrollTop)-(o.clientTop||0),left:e.left+(window.pageXOffset||o.scrollLeft)-(o.clientLeft||0)}}function ao(t){return R((t.x||{}).location)?{x:t.x.location,y:t.y.location}:{x:t.pageX||t.clientX||0,y:t.pageY||t.clientY||0}}var po=/matrix\((.*)\)/;function ho(t){var e=getComputedStyle(t).transform;return"none"===e?G.unit():function(t){var e=t.match(po);if(null===e||2!==e.length)return G.unit();var o=e[1].split(",").map((function(t){return parseFloat(t)}));return new(Function.prototype.bind.apply(G,[null].concat(o)))}(e)}function co(t){if(!t)return G.unit();for(var e=ho(t),o=t.parentElement;o;){var i=ho(o);e=e.multiplyCopy(i),o=o.parentElement}return e.b=e.c=e.e=e.f=0,e}var lo=["click","mouseenter","mouseleave","mousemove","resize"],uo=function(t){function e(e,o){t.call(this),this.options=Object.assign({},o),this.element=e,this.element._kendoExportVisual=this.exportVisual.bind(this),this._click=this._handler("click"),this._mouseenter=this._handler("mouseenter"),this._mouseleave=this._handler("mouseleave"),this._mousemove=this._handler("mousemove"),this._visual=new ue,io(e,this.options),this.bind(lo,this.options),this._enableTracking()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.draw=function(t){this._visual.children.push(t)},e.prototype.clear=function(){this._visual.children=[]},e.prototype.destroy=function(){this._visual=null,this.element._kendoExportVisual=null,this.unbind()},e.prototype.eventTarget=function(t){for(var e,o=ro(t);!e&&o&&(e=o._kendoNode,o!==this.element);)o=o.parentElement;if(e)return e.srcElement},e.prototype.exportVisual=function(){return this._visual},e.prototype.getSize=function(){return io(this.element)},e.prototype.currentSize=function(t){if(!t)return this._size;this._size=t},e.prototype.setSize=function(t){io(this.element,t),this.currentSize(t),this._resize()},e.prototype.resize=function(t){var e=this.getSize(),o=this.currentSize();(t||(e.width>0||e.height>0)&&(!o||e.width!==o.width||e.height!==o.height))&&(this.currentSize(e),this._resize(e,t),this.trigger("resize",e))},e.prototype.size=function(t){if(!t)return this.getSize();this.setSize(t)},e.prototype.suspendTracking=function(){this._suspendedTracking=!0},e.prototype.resumeTracking=function(){this._suspendedTracking=!1},e.prototype._enableTracking=function(){},e.prototype._resize=function(){},e.prototype._handler=function(t){var e=this;return function(o){var i=e.eventTarget(o);i&&!e._suspendedTracking&&e.trigger(t,{element:i,originalEvent:o,type:t})}},e.prototype._elementOffset=function(){var t=this.element,e=no(t),o=so(t),i=o.left,r=o.top;return{left:i+e.left,top:r+e.top}},e.prototype._surfacePoint=function(t){var e=this._elementOffset(),o=ao(t),i=o.x-e.left,r=o.y-e.top,n=co(this.element).invert();return new q(i,r).transform(n)},e}(Qe);function fo(t){var e=window.console;void 0!==e&&e.log&&e.log(t)}function yo(t,e){return R(e)&&null!==e?" "+t+'="'+e+'" ':""}function go(t){for(var e="",o=0;o<t.length;o++)e+=yo(t[o][0],t[o][1]);return e}function vo(t){for(var e="",o=0;o<t.length;o++){var i=t[o][1];R(i)&&(e+=t[o][0]+":"+i+";")}if(""!==e)return e}var mo={},xo="http://www.w3.org/2000/svg",_o=function(t,e){t.innerHTML=e};if("undefined"!=typeof document){var bo=document.createElement("div"),wo="undefined"!=typeof DOMParser;bo.innerHTML="<svg xmlns='http://www.w3.org/2000/svg'></svg>",wo&&bo.firstChild.namespaceURI!==xo&&(_o=function(t,e){var o=(new DOMParser).parseFromString(e,"text/xml"),i=document.adoptNode(o.documentElement);t.innerHTML="",t.appendChild(i)})}var Co=_o;var ko=null,So={get browser(){return"undefined"==typeof window||ko?ko:ko=function(t){var e={edge:/(edge)[ \/]([\w.]+)/i,webkit:/(chrome)[ \/]([\w.]+)/i,safari:/(webkit)[ \/]([\w.]+)/i,opera:/(opera)(?:.*version|)[ \/]([\w.]+)/i,msie:/(msie\s|trident.*? rv:)([\w.]+)/i,mozilla:/(mozilla)(?:.*? rv:([\w.]+))/i},o={};for(var i in e)if(e.hasOwnProperty(i)){var r=t.match(e[i]);if(r){o[i]=!0,o[r[1].toLowerCase().split(" ")[0].split("/")[0]]=!0,o.version=parseInt(document.documentMode||r[2],10);break}}return o}(window.navigator.userAgent)}},Ao={clip:"clip-path",fill:"fill"};function Po(t,e){return"clip"===t||"fill"===t&&(!e||"Gradient"===e.nodeType)}var To=function(t){function e(e,o){t.call(this,e),this.definitions={},this.options=o}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.destroy=function(){this.element&&(this.element._kendoNode=null,this.element=null),this.clearDefinitions(),t.prototype.destroy.call(this)},e.prototype.load=function(t,e){for(var o=0;o<t.length;o++){var i=t[o],r=i.children,n=new mo[i.nodeType](i,this.options);R(e)?this.insertAt(n,e):this.append(n),n.createDefinitions(),r&&r.length>0&&n.load(r);var s=this.element;s&&n.attachTo(s,e)}},e.prototype.root=function(){for(var t=this;t.parent;)t=t.parent;return t},e.prototype.attachTo=function(t,e){var o=document.createElement("div");Co(o,"<svg xmlns='"+xo+"' version='1.1'>"+this.render()+"</svg>");var i=o.firstChild.firstChild;i&&(R(e)?t.insertBefore(i,t.childNodes[e]||null):t.appendChild(i),this.setElement(i))},e.prototype.setElement=function(t){this.element&&(this.element._kendoNode=null),this.element=t,this.element._kendoNode=this;for(var e=this.childNodes,o=0;o<e.length;o++){var i=t.childNodes[o];e[o].setElement(i)}},e.prototype.clear=function(){this.clearDefinitions(),this.element&&(this.element.innerHTML="");for(var t=this.childNodes,e=0;e<t.length;e++)t[e].destroy();this.childNodes=[]},e.prototype.removeSelf=function(){if(this.element){var e=this.element.parentNode;e&&e.removeChild(this.element),this.element=null}t.prototype.removeSelf.call(this)},e.prototype.template=function(){return this.renderChildren()},e.prototype.render=function(){return this.template()},e.prototype.renderChildren=function(){for(var t=this.childNodes,e="",o=0;o<t.length;o++)e+=t[o].render();return e},e.prototype.optionsChange=function(e){var o=e.field,i=e.value;"visible"===o?this.css("display",i?"":"none"):Ao[o]&&Po(o,i)?this.updateDefinition(o,i):"opacity"===o?this.attr("opacity",i):"cursor"===o?this.css("cursor",i):"id"===o&&(i?this.attr("id",i):this.removeAttr("id")),t.prototype.optionsChange.call(this,e)},e.prototype.attr=function(t,e){this.element&&this.element.setAttribute(t,e)},e.prototype.allAttr=function(t){for(var e=0;e<t.length;e++)this.attr(t[e][0],t[e][1])},e.prototype.css=function(t,e){this.element&&(this.element.style[t]=e)},e.prototype.allCss=function(t){for(var e=0;e<t.length;e++)this.css(t[e][0],t[e][1])},e.prototype.removeAttr=function(t){this.element&&this.element.removeAttribute(t)},e.prototype.mapTransform=function(t){var e=[];return t&&e.push(["transform","matrix("+t.matrix().toString(6)+")"]),e},e.prototype.renderTransform=function(){return go(this.mapTransform(this.srcElement.transform()))},e.prototype.transformChange=function(t){t?this.allAttr(this.mapTransform(t)):this.removeAttr("transform")},e.prototype.mapStyle=function(){var t=this.srcElement.options,e=[["cursor",t.cursor]];return!1===t.visible&&e.push(["display","none"]),e},e.prototype.renderStyle=function(){return yo("style",vo(this.mapStyle(!0)))},e.prototype.renderOpacity=function(){return yo("opacity",this.srcElement.options.opacity)},e.prototype.renderId=function(){return yo("id",this.srcElement.options.id)},e.prototype.createDefinitions=function(){var t=this.srcElement,e=this.definitions;if(t){var o,i=t.options;for(var r in Ao){var n=i.get(r);n&&Po(r,n)&&(e[r]=n,o=!0)}o&&this.definitionChange({action:"add",definitions:e})}},e.prototype.definitionChange=function(t){this.parent&&this.parent.definitionChange(t)},e.prototype.updateDefinition=function(t,e){var o=this.definitions,i=o[t],r=Ao[t],n={};i&&(n[t]=i,this.definitionChange({action:"remove",definitions:n}),delete o[t]),e?(n[t]=e,this.definitionChange({action:"add",definitions:n}),o[t]=e,this.attr(r,this.refUrl(e.id))):i&&this.removeAttr(r)},e.prototype.clearDefinitions=function(){var t=this.definitions;this.definitionChange({action:"remove",definitions:t}),this.definitions={}},e.prototype.renderDefinitions=function(){return go(this.mapDefinitions())},e.prototype.mapDefinitions=function(){var t=this.definitions,e=[];for(var o in t)e.push([Ao[o],this.refUrl(t[o].id)]);return e},e.prototype.refUrl=function(t){var e=(this.options||{}).skipBaseHref,o=this.baseUrl().replace(/'/g,"\\'");return"url("+(e?"":o)+"#"+t+")"},e.prototype.baseUrl=function(){return function(){var t=document.getElementsByTagName("base")[0],e=document.location.href,o="";if(t&&!(So.browser||{}).msie){var i=e.indexOf("#");-1!==i&&(e=e.substring(0,i)),o=e}return o}()},e}(Ze),Mo=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.template=function(){return"<stop "+this.renderOffset()+" "+this.renderStyle()+" />"},e.prototype.renderOffset=function(){return yo("offset",this.srcElement.offset())},e.prototype.mapStyle=function(){var t=this.srcElement;return[["stop-color",t.color()],["stop-opacity",t.opacity()]]},e.prototype.optionsChange=function(t){"offset"===t.field?this.attr(t.field,t.value):"color"!==t.field&&"opacity"!==t.field||this.css("stop-"+t.field,t.value)},e}(To),Oo=function(t){function e(e){t.call(this,e),this.id=e.id,this.loadStops()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.loadStops=function(){for(var t=this.srcElement.stops,e=this.element,o=0;o<t.length;o++){var i=new Mo(t[o]);this.append(i),e&&i.attachTo(e)}},e.prototype.optionsChange=function(t){"gradient.stops"===t.field?(Ze.prototype.clear.call(this),this.loadStops()):"gradient"===t.field&&this.allAttr(this.mapCoordinates())},e.prototype.renderCoordinates=function(){return go(this.mapCoordinates())},e.prototype.mapSpace=function(){return["gradientUnits",this.srcElement.userSpace()?"userSpaceOnUse":"objectBoundingBox"]},e}(To),Bo=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.template=function(){return"<linearGradient id='"+this.id+"' "+this.renderCoordinates()+">"+this.renderChildren()+"</linearGradient>"},e.prototype.mapCoordinates=function(){var t=this.srcElement,e=t.start(),o=t.end();return[["x1",e.x],["y1",e.y],["x2",o.x],["y2",o.y],this.mapSpace()]},e}(Oo),Ro=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.template=function(){return"<radialGradient id='"+this.id+"' "+this.renderCoordinates()+">"+this.renderChildren()+"</radialGradient>"},e.prototype.mapCoordinates=function(){var t=this.srcElement,e=t.center(),o=t.radius();return[["cx",e.x],["cy",e.y],["r",o],this.mapSpace()]},e}(Oo),Eo=function(t){function e(e){t.call(this),this.srcElement=e,this.id=e.id,this.load([e])}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.template=function(){return"<clipPath id='"+this.id+"'>"+this.renderChildren()+"</clipPath>"},e}(To),zo=function(t){function e(){t.call(this),this.definitionMap={}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.attachTo=function(t){this.element=t},e.prototype.template=function(){return"<defs>"+this.renderChildren()+"</defs>"},e.prototype.definitionChange=function(t){var e=t.definitions,o=t.action;"add"===o?this.addDefinitions(e):"remove"===o&&this.removeDefinitions(e)},e.prototype.createDefinition=function(t,e){var o;return"clip"===t?o=Eo:"fill"===t&&(e instanceof Ie?o=Bo:e instanceof je&&(o=Ro)),new o(e)},e.prototype.addDefinitions=function(t){for(var e in t)this.addDefinition(e,t[e])},e.prototype.addDefinition=function(t,e){var o=this.element,i=this.definitionMap,r=e.id,n=i[r];if(n)n.count++;else{var s=this.createDefinition(t,e);i[r]={element:s,count:1},this.append(s),o&&s.attachTo(this.element)}},e.prototype.removeDefinitions=function(t){for(var e in t)this.removeDefinition(t[e])},e.prototype.removeDefinition=function(t){var e=this.definitionMap,o=t.id,i=e[o];i&&(i.count--,0===i.count&&(this.remove(this.childNodes.indexOf(i.element),1),delete e[o]))},e}(To),Lo=function(t){function e(e){t.call(this),this.options=e,this.defs=new zo}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.attachTo=function(t){this.element=t,this.defs.attachTo(t.firstElementChild)},e.prototype.clear=function(){Ze.prototype.clear.call(this)},e.prototype.template=function(){return this.defs.render()+this.renderChildren()},e.prototype.definitionChange=function(t){this.defs.definitionChange(t)},e}(To);function Io(t,e){for(var o in e)for(var i=o.trim().split(" "),r=0;r<i.length;r++)t.addEventListener(i[r],e[o],!1)}function jo(t,e){for(var o in void 0===e&&(e={}),e)for(var i=o.trim().split(" "),r=0;r<i.length;r++)t.removeEventListener(i[r],e[o],!1)}var Do={dot:[1.5,3.5],dash:[4,3.5],longdash:[8,3.5],dashdot:[3.5,3.5,1.5,3.5],longdashdot:[8,3.5,1.5,3.5],longdashdotdot:[8,3.5,1.5,3.5,1.5,3.5]},Vo={"fill.opacity":"fill-opacity","stroke.color":"stroke","stroke.width":"stroke-width","stroke.opacity":"stroke-opacity"},Ho=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.geometryChange=function(){this.attr("d",this.renderData()),this.invalidate()},e.prototype.optionsChange=function(e){switch(e.field){case"fill":e.value?this.allAttr(this.mapFill(e.value)):this.removeAttr("fill");break;case"fill.color":this.allAttr(this.mapFill({color:e.value}));break;case"stroke":e.value?this.allAttr(this.mapStroke(e.value)):this.removeAttr("stroke");break;case"transform":this.transformChange(e.value);break;default:var o=Vo[e.field];o&&this.attr(o,e.value)}t.prototype.optionsChange.call(this,e)},e.prototype.content=function(){this.element&&(this.element.textContent=this.srcElement.content())},e.prototype.renderData=function(){return this.printPath(this.srcElement)},e.prototype.printPath=function(t){var e=t.segments,o=e.length;if(o>0){for(var i,r,n=[],s=1;s<o;s++){var a=this.segmentType(e[s-1],e[s]);a!==r&&(r=a,n.push(a)),"L"===a?n.push(this.printPoints(e[s].anchor())):n.push(this.printPoints(e[s-1].controlOut(),e[s].controlIn(),e[s].anchor()))}return i="M"+this.printPoints(e[0].anchor())+" "+n.join(" "),t.options.closed&&(i+="Z"),i}},e.prototype.printPoints=function(){for(var t=arguments,e=t.length,o=[],i=0;i<e;i++)o.push(t[i].toString(3));return o.join(" ")},e.prototype.segmentType=function(t,e){return t.controlOut()&&e.controlIn()?"C":"L"},e.prototype.mapStroke=function(t){var e=[];return t&&!tt(t.color)?(e.push(["stroke",t.color]),e.push(["stroke-width",t.width]),e.push(["stroke-linecap",this.renderLinecap(t)]),e.push(["stroke-linejoin",t.lineJoin]),R(t.opacity)&&e.push(["stroke-opacity",t.opacity]),R(t.dashType)&&e.push(["stroke-dasharray",this.renderDashType(t)])):e.push(["stroke","none"]),e},e.prototype.renderStroke=function(){return go(this.mapStroke(this.srcElement.options.stroke))},e.prototype.renderDashType=function(t){var e=t.dashType,o=t.width;if(void 0===o&&(o=1),e&&"solid"!==e){for(var i=Do[e.toLowerCase()],r=[],n=0;n<i.length;n++)r.push(i[n]*o);return r.join(" ")}},e.prototype.renderLinecap=function(t){var e=t.dashType,o=t.lineCap;return e&&"solid"!==e?"butt":o},e.prototype.mapFill=function(t){var e=[];return t&&"Gradient"===t.nodeType||(t&&!tt(t.color)?(e.push(["fill",t.color]),R(t.opacity)&&e.push(["fill-opacity",t.opacity])):e.push(["fill","none"])),e},e.prototype.renderFill=function(){return go(this.mapFill(this.srcElement.options.fill))},e.prototype.template=function(){return"<path "+this.renderId()+" "+this.renderStyle()+" "+this.renderOpacity()+" "+yo("d",this.renderData())+this.renderStroke()+this.renderFill()+this.renderDefinitions()+this.renderTransform()+"></path>"},e}(To),Fo=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.renderData=function(){return this.printPath(this.srcElement.toPath())},e}(Ho),No=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.geometryChange=function(){var t=this.center();this.attr("cx",t.x),this.attr("cy",t.y),this.attr("r",this.radius()),this.invalidate()},e.prototype.center=function(){return this.srcElement.geometry().center},e.prototype.radius=function(){return this.srcElement.geometry().radius},e.prototype.template=function(){return"<circle "+this.renderId()+" "+this.renderStyle()+" "+this.renderOpacity()+"cx='"+this.center().x+"' cy='"+this.center().y+"' r='"+this.radius()+"'"+this.renderStroke()+" "+this.renderFill()+" "+this.renderDefinitions()+this.renderTransform()+" ></circle>"},e}(Ho),Uo=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.template=function(){return"<g"+(this.renderId()+this.renderTransform()+this.renderStyle()+this.renderOpacity()+this.renderDefinitions())+">"+this.renderChildren()+"</g>"},e.prototype.optionsChange=function(e){"transform"===e.field&&this.transformChange(e.value),t.prototype.optionsChange.call(this,e)},e}(To),Go=/&/g,Wo=/</g,qo=/"/g,Xo=/'/g,Yo=/>/g;function Zo(t){return String(t).replace(Go,"&").replace(Wo,"<").replace(Yo,">").replace(qo,""").replace(Xo,"'")}var Qo=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.geometryChange=function(){this.allAttr(this.mapPosition()),this.invalidate()},e.prototype.optionsChange=function(e){"src"===e.field&&this.allAttr(this.mapSource()),t.prototype.optionsChange.call(this,e)},e.prototype.mapPosition=function(){var t=this.srcElement.rect(),e=t.topLeft();return[["x",e.x],["y",e.y],["width",t.width()+"px"],["height",t.height()+"px"]]},e.prototype.renderPosition=function(){return go(this.mapPosition())},e.prototype.mapSource=function(t){var e=this.srcElement.src();return t&&(e=Zo(e)),[["xlink:href",e]]},e.prototype.renderSource=function(){return go(this.mapSource(!0))},e.prototype.template=function(){return"<image preserveAspectRatio='none' "+this.renderId()+" "+this.renderStyle()+" "+this.renderTransform()+" "+this.renderOpacity()+this.renderPosition()+" "+this.renderSource()+" "+this.renderDefinitions()+"></image>"},e}(Ho),Ko=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.renderData=function(){var t=this.srcElement.paths;if(t.length>0){for(var e=[],o=0;o<t.length;o++)e.push(this.printPath(t[o]));return e.join(" ")}},e}(Ho),$o=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.geometryChange=function(){var t=this.srcElement.geometry();this.attr("x",t.origin.x),this.attr("y",t.origin.y),this.attr("width",t.size.width),this.attr("height",t.size.height),this.attr("rx",t.cornerRadius[0]),this.attr("ry",t.cornerRadius[1]),this.invalidate()},e.prototype.size=function(){return this.srcElement.geometry().size},e.prototype.origin=function(){return this.srcElement.geometry().origin},e.prototype.rx=function(){return this.srcElement.geometry().cornerRadius[0]},e.prototype.ry=function(){return this.srcElement.geometry().cornerRadius[1]},e.prototype.template=function(){return"<rect "+this.renderId()+" "+this.renderStyle()+" "+this.renderOpacity()+" x='"+this.origin().x+"' y='"+this.origin().y+"' rx='"+this.rx()+"' ry='"+this.ry()+"' width='"+this.size().width+"' height='"+this.size().height+"' "+this.renderStroke()+" "+this.renderFill()+" "+this.renderDefinitions()+" "+this.renderTransform()+" />"},e}(Ho),Jo=/&(?:[a-zA-Z]+|#\d+);/g;function ti(t){if(!t||"string"!=typeof t||!Jo.test(t))return t;var e=ti._element;return Jo.lastIndex=0,t.replace(Jo,(function(t){return e.innerHTML=t,e.textContent||e.innerText}))}"undefined"!=typeof document&&(ti._element=document.createElement("span"));var ei=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.geometryChange=function(){var t=this.pos();this.attr("x",t.x),this.attr("y",t.y),this.invalidate()},e.prototype.optionsChange=function(e){"font"===e.field?(this.attr("style",vo(this.mapStyle())),this.geometryChange()):"content"===e.field&&t.prototype.content.call(this,this.srcElement.content()),t.prototype.optionsChange.call(this,e)},e.prototype.mapStyle=function(e){var o=t.prototype.mapStyle.call(this,e),i=this.srcElement.options.font;return e&&(i=Zo(i)),o.push(["font",i],["white-space","pre"]),o},e.prototype.pos=function(){var t=this.srcElement.position(),e=this.srcElement.measure();return t.clone().setY(t.y+e.baseline)},e.prototype.renderContent=function(){var t=this.srcElement.content();return te(t=Zo(t=ti(t)))},e.prototype.renderTextAnchor=function(){var t;return!(this.options||{}).rtl||So.browser.msie||So.browser.edge||(t="end"),yo("text-anchor",t)},e.prototype.template=function(){return"<text "+this.renderId()+" "+this.renderTextAnchor()+" "+this.renderStyle()+" "+this.renderOpacity()+"x='"+this.pos().x+"' y='"+this.pos().y+"' "+this.renderStroke()+" "+this.renderTransform()+" "+this.renderDefinitions()+this.renderFill()+">"+this.renderContent()+"</text>"},e}(Ho);mo.Arc=Fo,mo.Circle=No,mo.Group=Uo,mo.Image=Qo,mo.MultiPath=Ko,mo.Path=Ho,mo.Rect=$o,mo.Text=ei;var oi=function(t){function e(e,o){t.call(this,e,o),this._root=new Lo(Object.assign({rtl:"rtl"===eo(e,"direction").direction},this.options)),Co(this.element,this._template()),this._rootElement=this.element.firstElementChild,function(t){var e;try{e=t.getScreenCTM?t.getScreenCTM():null}catch(t){}if(e){var o=-e.e%1,i=-e.f%1,r=t.style;0===o&&0===i||(r.left=o+"px",r.top=i+"px")}}(this._rootElement),this._root.attachTo(this._rootElement),Io(this.element,{click:this._click,mouseover:this._mouseenter,mouseout:this._mouseleave,mousemove:this._mousemove}),this.resize()}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var o={type:{configurable:!0}};return o.type.get=function(){return"svg"},e.prototype.destroy=function(){this._root&&(this._root.destroy(),this._root=null,this._rootElement=null,jo(this.element,{click:this._click,mouseover:this._mouseenter,mouseout:this._mouseleave,mousemove:this._mousemove})),t.prototype.destroy.call(this)},e.prototype.translate=function(t){var e=Math.round(t.x)+" "+Math.round(t.y)+" "+this._size.width+" "+this._size.height;this._offset=t,this._rootElement.setAttribute("viewBox",e)},e.prototype.draw=function(e){t.prototype.draw.call(this,e),this._root.load([e])},e.prototype.clear=function(){t.prototype.clear.call(this),this._root.clear()},e.prototype.svg=function(){return"<?xml version='1.0' ?>"+this._template()},e.prototype.exportVisual=function(){var t=this._visual,e=this._offset;if(e){var o=new ue;o.children.push(t),o.transform(Q().translate(-e.x,-e.y)),t=o}return t},e.prototype._resize=function(){this._offset&&this.translate(this._offset)},e.prototype._template=function(){return"<svg style='width: 100%; height: 100%; overflow: hidden;' xmlns='"+xo+"' xmlns:xlink='http://www.w3.org/1999/xlink' version='1.1'>"+this._root.render()+"</svg>"},Object.defineProperties(e.prototype,o),e}(uo);function ii(){var t,e,o=new Promise((function(i,r){t=function(t){return o._state="resolved",i(t),o},e=function(t){return o._state="rejected",r(t),o}}));return o._state="pending",o.resolve=t,o.reject=e,o.state=function(){return o._state},o}function ri(t){return Promise.all(t)}var ni={};function si(t,e){var o=e.segments;if(0!==o.length){var i=o[0],r=i.anchor();t.moveTo(r.x,r.y);for(var n=1;n<o.length;n++){r=(i=o[n]).anchor();var s=o[n-1].controlOut(),a=i.controlIn();s&&a?t.bezierCurveTo(s.x,s.y,a.x,a.y,r.x,r.y):t.lineTo(r.x,r.y)}e.options.closed&&t.closePath()}}var ai=function(t){function e(e){t.call(this,e),e&&this.initClip()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initClip=function(){var t=this.srcElement.clip();t&&(this.clip=t,t.addObserver(this))},e.prototype.clear=function(){this.srcElement&&this.srcElement.removeObserver(this),this.clearClip(),t.prototype.clear.call(this)},e.prototype.clearClip=function(){this.clip&&(this.clip.removeObserver(this),delete this.clip)},e.prototype.setClip=function(t){this.clip&&(t.beginPath(),si(t,this.clip),t.clip())},e.prototype.optionsChange=function(e){"clip"===e.field&&(this.clearClip(),this.initClip()),t.prototype.optionsChange.call(this,e)},e.prototype.setTransform=function(t){if(this.srcElement){var e=this.srcElement.transform();e&&t.transform.apply(t,e.matrix().toArray(6))}},e.prototype.loadElements=function(t,e,o){for(var i=0;i<t.length;i++){var r=t[i],n=r.children,s=new ni[r.nodeType](r,o);n&&n.length>0&&s.load(n,e,o),R(e)?this.insertAt(s,e):this.append(s)}},e.prototype.load=function(t,e,o){this.loadElements(t,e,o),this.invalidate()},e.prototype.setOpacity=function(t){if(this.srcElement){var e=this.srcElement.opacity();R(e)&&this.globalAlpha(t,e)}},e.prototype.globalAlpha=function(t,e){var o=e;o&&t.globalAlpha&&(o*=t.globalAlpha),t.globalAlpha=o},e.prototype.visible=function(){var t=this.srcElement;return!t||t&&!1!==t.options.visible},e}(Ze),pi=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.renderTo=function(t){if(this.visible()){t.save(),this.setTransform(t),this.setClip(t),this.setOpacity(t);for(var e=this.childNodes,o=0;o<e.length;o++){var i=e[o];i.visible()&&i.renderTo(t)}t.restore()}},e}(ce(ai,"childNodes"));function hi(t,e){var o,i=0;if(!e||e<=0)return t;var r=function(){var r=Ue()-i,n=arguments,s=function(){t.apply(null,n),i=Ue()};if(!i)return s();o&&clearTimeout(o),r>e?s():o=setTimeout(s,e-r)};return r.cancel=function(){clearTimeout(o)},r}var ci=function(t){function e(e,o){t.call(this),this.canvas=e,this.size=o,this.ctx=e.getContext("2d");var i=this._invalidate.bind(this);this.invalidate=hi((function(){We(i)}),1e3/60)}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.canvas=null,this.ctx=null},e.prototype.load=function(t,e,o){this.loadElements(t,e,o),this._invalidate()},e.prototype._rescale=function(t){var e=this.canvas,o=this.size;e.width=o.width*t,e.height=o.height*t,this.ctx.scale(t,t)},e.prototype._devicePixelRatio=function(){return"number"==typeof window.devicePixelRatio?window.devicePixelRatio:1},e.prototype._invalidate=function(t){if(this.ctx){var e=t&&t.fixedScale?1:this._devicePixelRatio();this._rescale(e),this.ctx.clearRect(0,0,this.canvas.width,this.canvas.height),this.renderTo(this.ctx)}},e}(ce(pi,"childNodes")),li=function(t){function e(){t.call(this),this.shapes=[]}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._add=function(t,e){this.shapes.push({bbox:e,shape:t}),t._quadNode=this},e.prototype.pointShapes=function(t){for(var e=this.shapes,o=e.length,i=[],r=0;r<o;r++)e[r].bbox.containsPoint(t)&&i.push(e[r].shape);return i},e.prototype.insert=function(t,e){this._add(t,e)},e.prototype.remove=function(t){for(var e=this.shapes,o=e.length,i=0;i<o;i++)if(e[i].shape===t){e.splice(i,1);break}},e}(O),ui=function(t){function e(e){t.call(this),this.children=[],this.rect=e}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.inBounds=function(t){var e=this.rect,o=e.bottomRight(),i=t.bottomRight(),r=e.origin.x<=t.origin.x&&e.origin.y<=t.origin.y&&i.x<=o.x&&i.y<=o.y;return r},e.prototype.pointShapes=function(e){for(var o=this.children,i=o.length,r=t.prototype.pointShapes.call(this,e),n=0;n<i;n++)le(r,o[n].pointShapes(e));return r},e.prototype.insert=function(t,e){var o=this.children,i=!1;if(this.inBounds(e)){if(this.shapes.length<4)this._add(t,e);else{o.length||this._initChildren();for(var r=0;r<o.length;r++)if(o[r].insert(t,e)){i=!0;break}i||this._add(t,e)}i=!0}return i},e.prototype._initChildren=function(){var t=this.rect,o=this.children,i=t.center(),r=t.width()/2,n=t.height()/2;o.push(new e(new Y([t.origin.x,t.origin.y],[r,n])),new e(new Y([i.x,t.origin.y],[r,n])),new e(new Y([t.origin.x,i.y],[r,n])),new e(new Y([i.x,i.y],[r,n])))},e}(li);function di(t,e){return t._zIndex<e._zIndex?1:t._zIndex>e._zIndex?-1:0}var fi=function(t){function e(){t.call(this),this.initRoots()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initRoots=function(){this.rootMap={},this.root=new li,this.rootElements=[]},e.prototype.clear=function(){for(var t=this.rootElements,e=0;e<t.length;e++)this.remove(t[e]);this.initRoots()},e.prototype.pointShape=function(t){var e=(this.rootMap[Math.floor(t.x/3e3)]||{})[Math.floor(t.y/3e3)],o=this.root.pointShapes(t);e&&(o=o.concat(e.pointShapes(t))),this.assignZindex(o),o.sort(di);for(var i=0;i<o.length;i++)if(o[i].containsPoint(t))return o[i]},e.prototype.assignZindex=function(t){for(var e=0;e<t.length;e++){for(var o=t[e],i=0,r=Math.pow(1e4,75),n=[];o;)n.push(o),o=o.parent;for(;n.length;)i+=(((o=n.pop()).parent?o.parent.children:this.rootElements).indexOf(o)+1)*r,r/=1e4;t[e]._zIndex=i}},e.prototype.optionsChange=function(t){"transform"!==t.field&&"stroke.width"!==t.field||this.bboxChange(t.element)},e.prototype.geometryChange=function(t){this.bboxChange(t.element)},e.prototype.bboxChange=function(t){if("Group"===t.nodeType)for(var e=0;e<t.children.length;e++)this.bboxChange(t.children[e]);else t._quadNode&&t._quadNode.remove(t),this._insertShape(t)},e.prototype.add=function(t){var e=Array.isArray(t)?t.slice(0):[t];le(this.rootElements,e),this._insert(e)},e.prototype.childrenChange=function(t){if("remove"===t.action)for(var e=0;e<t.items.length;e++)this.remove(t.items[e]);else this._insert(Array.prototype.slice.call(t.items,0))},e.prototype._insert=function(t){for(var e;t.length>0;)(e=t.pop()).addObserver(this),"Group"===e.nodeType?le(t,e.children):this._insertShape(e)},e.prototype._insertShape=function(t){var e=t.bbox();if(e){var o=this.getSectors(e),i=o[0][0],r=o[1][0];if(this.inRoot(o))this.root.insert(t,e);else{var n=this.rootMap;n[i]||(n[i]={}),n[i][r]||(n[i][r]=new ui(new Y([3e3*i,3e3*r],[3e3,3e3]))),n[i][r].insert(t,e)}}},e.prototype.remove=function(t){if(t.removeObserver(this),"Group"===t.nodeType)for(var e=t.children,o=0;o<e.length;o++)this.remove(e[o]);else t._quadNode&&(t._quadNode.remove(t),delete t._quadNode)},e.prototype.inRoot=function(t){return t[0].length>1||t[1].length>1},e.prototype.getSectors=function(t){for(var e=t.bottomRight(),o=Math.floor(e.x/3e3),i=Math.floor(e.y/3e3),r=[[],[]],n=Math.floor(t.origin.x/3e3);n<=o;n++)r[0].push(n);for(var s=Math.floor(t.origin.y/3e3);s<=i;s++)r[1].push(s);return r},e}(O),yi=function(t){t.bind("mouseenter",this._mouseenter.bind(this)),t.bind("mouseleave",this._mouseleave.bind(this)),this.element=t.element};yi.prototype.clear=function(){this._resetCursor()},yi.prototype.destroy=function(){this._resetCursor(),delete this.element},yi.prototype._mouseenter=function(t){var e=this._shapeCursor(t);e?(this._current||(this._defaultCursor=this._getCursor()),this._setCursor(e)):this._resetCursor()},yi.prototype._mouseleave=function(){this._resetCursor()},yi.prototype._shapeCursor=function(t){for(var e=t.element;e&&!R(e.options.cursor);)e=e.parent;if(e)return e.options.cursor},yi.prototype._getCursor=function(){if(this.element)return this.element.style.cursor},yi.prototype._setCursor=function(t){this.element&&(this.element.style.cursor=t,this._current=t)},yi.prototype._resetCursor=function(){this._current&&(this._setCursor(this._defaultCursor||""),delete this._current)};var gi=yi,vi={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgrey:"a9a9a9",darkgreen:"006400",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",grey:"808080",green:"008000",greenyellow:"adff2f",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgrey:"d3d3d3",lightgreen:"90ee90",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"778899",lightslategrey:"778899",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"00ff00",limegreen:"32cd32",linen:"faf0e6",magenta:"ff00ff",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370d8",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"d87093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",red:"ff0000",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"ffffff",whitesmoke:"f5f5f5",yellow:"ffff00",yellowgreen:"9acd32"},mi=So.browser,xi=function(t){var e=Object.keys(vi);e.push("transparent");var o=new RegExp("^("+e.join("|")+")(\\W|$)","i");return xi=function(t){return o.exec(t)},o.exec(t)},_i=function(t){function e(){t.call(this)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.toHSV=function(){return this},e.prototype.toRGB=function(){return this},e.prototype.toHex=function(t){return this.toBytes().toHex(t)},e.prototype.toBytes=function(){return this},e.prototype.toCss=function(t){return"#"+this.toHex(t)},e.prototype.toCssRgba=function(){var t=this.toBytes();return"rgba("+t.r+", "+t.g+", "+t.b+", "+parseFloat(Number(this.a).toFixed(3))+")"},e.prototype.toDisplay=function(){return mi.msie&&mi.version<9?this.toCss():this.toCssRgba()},e.prototype.equals=function(t){return t===this||null!==t&&this.toCssRgba()===Ti(t).toCssRgba()},e.prototype.diff=function(t){if(null===t)return NaN;var e=this.toBytes(),o=t.toBytes();return Math.sqrt(Math.pow(.3*(e.r-o.r),2)+Math.pow(.59*(e.g-o.g),2)+Math.pow(.11*(e.b-o.b),2))},e.prototype.clone=function(){var t=this.toBytes();return t===this&&(t=new wi(t.r,t.g,t.b,t.a)),t},e}(O),bi=function(t){function e(e,o,i,r){t.call(this),this.r=e,this.g=o,this.b=i,this.a=r}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.toHSV=function(){var t,e,o=this.r,i=this.g,r=this.b,n=Math.min(o,i,r),s=Math.max(o,i,r),a=s-n,p=s;return 0===a?new ki(0,0,p,this.a):(0!==s?(e=a/s,t=o===s?(i-r)/a:i===s?2+(r-o)/a:4+(o-i)/a,(t*=60)<0&&(t+=360)):(e=0,t=-1),new ki(t,e,p,this.a))},e.prototype.toHSL=function(){var t,e,o=this.r,i=this.g,r=this.b,n=Math.max(o,i,r),s=Math.min(o,i,r),a=(n+s)/2;if(n===s)t=e=0;else{var p=n-s;switch(e=a>.5?p/(2-n-s):p/(n+s),n){case o:t=(i-r)/p+(i<r?6:0);break;case i:t=(r-o)/p+2;break;case r:t=(o-i)/p+4}}return new Si(60*t,100*e,100*a,this.a)},e.prototype.toBytes=function(){return new wi(255*this.r,255*this.g,255*this.b,this.a)},e}(_i),wi=function(t){function e(e,o,i,r){t.call(this,Math.round(e),Math.round(o),Math.round(i),r)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.toRGB=function(){return new t(this.r/255,this.g/255,this.b/255,this.a)},e.prototype.toHSV=function(){return this.toRGB().toHSV()},e.prototype.toHSL=function(){return this.toRGB().toHSL()},e.prototype.toHex=function(t){var e=Ci(this.r,2)+Ci(this.g,2)+Ci(this.b,2);return t&&t.alpha&&(e+=Ci(Math.round(255*this.a),2)),e},e.prototype.toBytes=function(){return this},e}(bi);function Ci(t,e,o){void 0===o&&(o="0");for(var i=t.toString(16);e>i.length;)i=o+i;return i}var ki=function(t){function e(e,o,i,r){t.call(this),this.h=e,this.s=o,this.v=i,this.a=r}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.toRGB=function(){var t,e,o,i=this.h,r=this.s,n=this.v;if(0===r)t=e=o=n;else{i/=60;var s=Math.floor(i),a=i-s,p=n*(1-r),h=n*(1-r*a),c=n*(1-r*(1-a));switch(s){case 0:t=n,e=c,o=p;break;case 1:t=h,e=n,o=p;break;case 2:t=p,e=n,o=c;break;case 3:t=p,e=h,o=n;break;case 4:t=c,e=p,o=n;break;default:t=n,e=p,o=h}}return new bi(t,e,o,this.a)},e.prototype.toHSL=function(){return this.toRGB().toHSL()},e.prototype.toBytes=function(){return this.toRGB().toBytes()},e}(_i),Si=function(t){function e(e,o,i,r){t.call(this),this.h=e,this.s=o,this.l=i,this.a=r}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.toRGB=function(){var t,e,o,i=this.h/360,r=this.s/100,n=this.l/100;if(0===r)t=e=o=n;else{var s=n<.5?n*(1+r):n+r-n*r,a=2*n-s;t=Ai(a,s,i+1/3),e=Ai(a,s,i),o=Ai(a,s,i-1/3)}return new bi(t,e,o,this.a)},e.prototype.toHSV=function(){return this.toRGB().toHSV()},e.prototype.toBytes=function(){return this.toRGB().toBytes()},e}(_i);function Ai(t,e,o){var i=o;return i<0&&(i+=1),i>1&&(i-=1),i<1/6?t+6*(e-t)*i:i<.5?e:i<2/3?t+(e-t)*(2/3-i)*6:t}function Pi(t){return parseFloat(parseFloat(parseInt(t,16)/255).toFixed(3))}function Ti(t,e){var o,i;if(null==t||"none"===t)return null;if(t instanceof _i)return t;var r=t.toLowerCase();if(o=xi(r))return(r="transparent"===o[1]?new bi(1,1,1,0):Ti(vi[o[1]],e)).match=[o[1]],r;if((o=/^#?([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})\b/i.exec(r))?i=new wi(parseInt(o[1],16),parseInt(o[2],16),parseInt(o[3],16),1):(o=/^#?([0-9a-f])([0-9a-f])([0-9a-f])\b/i.exec(r))?i=new wi(parseInt(o[1]+o[1],16),parseInt(o[2]+o[2],16),parseInt(o[3]+o[3],16),1):(o=/^#?([0-9a-f])([0-9a-f])([0-9a-f])([0-9a-f])\b/i.exec(r))?i=new wi(parseInt(o[1]+o[1],16),parseInt(o[2]+o[2],16),parseInt(o[3]+o[3],16),Pi(o[4]+o[4])):(o=/^#?([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})\b/i.exec(r))?i=new wi(parseInt(o[1],16),parseInt(o[2],16),parseInt(o[3],16),Pi(o[4])):(o=/^rgb\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*\)/.exec(r))?i=new wi(parseInt(o[1],10),parseInt(o[2],10),parseInt(o[3],10),1):(o=/^rgba\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9.]+)\s*\)/.exec(r))?i=new wi(parseInt(o[1],10),parseInt(o[2],10),parseInt(o[3],10),parseFloat(o[4])):(o=/^rgb\(\s*([0-9]*\.?[0-9]+)%\s*,\s*([0-9]*\.?[0-9]+)%\s*,\s*([0-9]*\.?[0-9]+)%\s*\)/.exec(r))?i=new bi(parseFloat(o[1])/100,parseFloat(o[2])/100,parseFloat(o[3])/100,1):(o=/^rgba\(\s*([0-9]*\.?[0-9]+)%\s*,\s*([0-9]*\.?[0-9]+)%\s*,\s*([0-9]*\.?[0-9]+)%\s*,\s*([0-9.]+)\s*\)/.exec(r))&&(i=new bi(parseFloat(o[1])/100,parseFloat(o[2])/100,parseFloat(o[3])/100,parseFloat(o[4]))),i)i.match=o;else if(!e)throw new Error("Cannot parse color: "+r);return i}var Mi=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.renderTo=function(t){t.save(),this.setTransform(t),this.setClip(t),this.setOpacity(t),t.beginPath(),this.renderPoints(t,this.srcElement),this.setLineDash(t),this.setLineCap(t),this.setLineJoin(t),this.setFill(t),this.setStroke(t),t.restore()},e.prototype.setFill=function(t){var e=this.srcElement.options.fill,o=!1;return e&&("Gradient"===e.nodeType?(this.setGradientFill(t,e),o=!0):tt(e.color)||(t.fillStyle=e.color,t.save(),this.globalAlpha(t,e.opacity),t.fill(),t.restore(),o=!0)),o},e.prototype.setGradientFill=function(t,e){var o,i=this.srcElement.rawBBox();if(e instanceof Ie){var r=e.start(),n=e.end();o=t.createLinearGradient(r.x,r.y,n.x,n.y)}else if(e instanceof je){var s=e.center();o=t.createRadialGradient(s.x,s.y,0,s.x,s.y,e.radius())}!function(t,e){for(var o=0;o<e.length;o++){var i=e[o],r=Ti(i.color());r.a*=i.opacity(),t.addColorStop(i.offset(),r.toCssRgba())}}(o,e.stops),t.save(),e.userSpace()||t.transform(i.width(),0,0,i.height(),i.origin.x,i.origin.y),t.fillStyle=o,t.fill(),t.restore()},e.prototype.setStroke=function(t){var e=this.srcElement.options.stroke;if(e&&!tt(e.color)&&e.width>0)return t.strokeStyle=e.color,t.lineWidth=J(e.width,1),t.save(),this.globalAlpha(t,e.opacity),t.stroke(),t.restore(),!0},e.prototype.dashType=function(){var t=this.srcElement.options.stroke;if(t&&t.dashType)return t.dashType.toLowerCase()},e.prototype.setLineDash=function(t){var e=this.dashType();if(e&&"solid"!==e){var o=Do[e];t.setLineDash?t.setLineDash(o):(t.mozDash=o,t.webkitLineDash=o)}},e.prototype.setLineCap=function(t){var e=this.dashType(),o=this.srcElement.options.stroke;e&&"solid"!==e?t.lineCap="butt":o&&o.lineCap&&(t.lineCap=o.lineCap)},e.prototype.setLineJoin=function(t){var e=this.srcElement.options.stroke;e&&e.lineJoin&&(t.lineJoin=e.lineJoin)},e.prototype.renderPoints=function(t,e){si(t,e)},e}(ai),Oi=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.renderPoints=function(t){si(t,this.srcElement.toPath())},e}(Mi),Bi=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.renderPoints=function(t){var e=this.srcElement.geometry(),o=e.center,i=e.radius;t.arc(o.x,o.y,i,0,2*Math.PI)},e}(Mi),Ri=function(t){function e(e,o){t.call(this,e),this.onLoad=this.onLoad.bind(this),this.onError=this.onError.bind(this),this.loading=ii();var i=this.img=new Image;o&&!/^data:/i.test(e.src())&&(i.crossOrigin=o),i.src=e.src(),i.complete?this.onLoad():(i.onload=this.onLoad,i.onerror=this.onError)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.renderTo=function(t){"resolved"===this.loading.state()&&(t.save(),this.setTransform(t),this.setClip(t),this.drawImage(t),t.restore())},e.prototype.optionsChange=function(e){"src"===e.field?(this.loading=ii(),this.img.src=this.srcElement.src()):t.prototype.optionsChange.call(this,e)},e.prototype.onLoad=function(){this.loading.resolve(),this.invalidate()},e.prototype.onError=function(){this.loading.reject(new Error("Unable to load image '"+this.img.src+"'. Check for connectivity and verify CORS headers."))},e.prototype.drawImage=function(t){var e=this.srcElement.rect(),o=e.topLeft();t.drawImage(this.img,o.x,o.y,e.width(),e.height())},e}(Mi),Ei=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.renderPoints=function(t){for(var e=this.srcElement.paths,o=0;o<e.length;o++)si(t,e[o])},e}(Mi),zi=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.renderPoints=function(e){var o=this.srcElement.geometry(),i=o.cornerRadius,r=i[0],n=i[1];if(0===r&&0===n){var s=o.origin,a=o.size;e.rect(s.x,s.y,a.width,a.height)}else t.prototype.renderPoints.call(this,e,Zt.fromRect(o))},e}(Mi),Li=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.renderTo=function(t){var e=this.srcElement,o=e.position(),i=e.measure();t.save(),this.setTransform(t),this.setClip(t),this.setOpacity(t),t.beginPath(),t.font=e.options.font,t.textAlign="left",this.setFill(t)&&t.fillText(e.content(),o.x,o.y+i.baseline),this.setStroke(t)&&(this.setLineDash(t),t.strokeText(e.content(),o.x,o.y+i.baseline)),t.restore()},e}(Mi);ni.Arc=Oi,ni.Circle=Bi,ni.Group=pi,ni.Image=Ri,ni.MultiPath=Ei,ni.Path=Mi,ni.Rect=zi,ni.Text=Li;var Ii,ji,Di=function(t){function e(e,o){t.call(this,e,o),this.element.innerHTML=this._template(this);var i=this.element.firstElementChild,r=io(e);i.width=r.width,i.height=r.height,this._rootElement=i,this._root=new ci(i,r),this._mouseTrackHandler=this._trackMouse.bind(this),Io(this.element,{click:this._mouseTrackHandler,mousemove:this._mouseTrackHandler})}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var o={type:{configurable:!0}};return o.type.get=function(){return"canvas"},e.prototype.destroy=function(){t.prototype.destroy.call(this),this._root&&(this._root.destroy(),this._root=null),this._searchTree&&(this._searchTree.clear(),delete this._searchTree),this._cursor&&(this._cursor.destroy(),delete this._cursor),jo(this.element,{click:this._mouseTrackHandler,mousemove:this._mouseTrackHandler})},e.prototype.draw=function(e){t.prototype.draw.call(this,e),this._root.load([e],void 0,this.options.cors),this._searchTree&&this._searchTree.add([e])},e.prototype.clear=function(){t.prototype.clear.call(this),this._root.clear(),this._searchTree&&this._searchTree.clear(),this._cursor&&this._cursor.clear()},e.prototype.eventTarget=function(t){if(this._searchTree){var e=this._surfacePoint(t);return this._searchTree.pointShape(e)}},e.prototype.image=function(){var t=this._root,e=this._rootElement,o=[];t.traverse((function(t){t.loading&&o.push(t.loading)}));var i=ii(),r=function(){t._invalidate({fixedScale:!0});try{var o=e.toDataURL();i.resolve(o)}catch(t){i.reject(t)}};return ri(o).then(r,r),i},e.prototype.suspendTracking=function(){t.prototype.suspendTracking.call(this),this._searchTree&&(this._searchTree.clear(),delete this._searchTree)},e.prototype.resumeTracking=function(){if(t.prototype.resumeTracking.call(this),!this._searchTree){this._searchTree=new fi;for(var e=this._root.childNodes,o=[],i=0;i<e.length;i++)o.push(e[i].srcElement);this._searchTree.add(o)}},e.prototype._resize=function(){this._rootElement.width=this._size.width,this._rootElement.height=this._size.height,this._root.size=this._size,this._root.invalidate()},e.prototype._template=function(){return"<canvas style='width: 100%; height: 100%;'></canvas>"},e.prototype._enableTracking=function(){this._searchTree=new fi,this._cursor=new gi(this),t.prototype._enableTracking.call(this)},e.prototype._trackMouse=function(t){if(!this._suspendedTracking){var e=this.eventTarget(t);if("click"!==t.type){var o=this._currentShape;o&&o!==e&&this.trigger("mouseleave",{element:o,originalEvent:t,type:"mouseleave"}),e&&o!==e&&this.trigger("mouseenter",{element:e,originalEvent:t,type:"mouseenter"}),this.trigger("mousemove",{element:e,originalEvent:t,type:"mousemove"}),this._currentShape=e}else e&&this.trigger("click",{element:e,originalEvent:t,type:"click"})}},Object.defineProperties(e.prototype,o),e}(uo),Vi=function(){return"undefined"!=typeof document},Hi=function(t){function e(){t.call(this),this._items=[{name:"svg",type:oi},{name:"canvas",type:Di}]}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var o={support:{configurable:!0},current:{configurable:!0}};return o.support.get=function(){return ji||(ji={canvas:Vi()&&document.createElement("canvas").getContext,svg:Vi()&&document.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1")}),ji},o.current.get=function(){return Ii||(Ii=new e),Ii},e.prototype.create=function(t,e){var o=this._items,i=o[0];if(e&&e.type)for(var r=e.type.toLowerCase(),n=0;n<o.length;n++)if(o[n].name===r){i=o[n];break}if(i)return new i.type(t,e);fo("Warning: Unable to create Kendo UI Drawing Surface. Possible causes:\n- The browser does not support SVG and Canvas. User agent: "+navigator.userAgent)},Object.defineProperties(e,o),e}(O),Fi=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var o={support:{configurable:!0}};return o.support.get=function(){return Hi.support},e.create=function(t,e){return Hi.current.create(t,e)},Object.defineProperties(e,o),e}(uo);function Ni(t){var e=new Lo({skipBaseHref:!0}),o=t.clippedBBox(),i=t;if(o){var r=o.getOrigin(),n=new ue;n.transform(Q().translate(-r.x,-r.y)),n.children.push(t),i=n}e.load([i]);var s="<?xml version='1.0' ?><svg xmlns='"+xo+"' xmlns:xlink='http://www.w3.org/1999/xlink' version='1.1'>"+e.render()+"</svg>";return e.destroy(),s}var Ui={1:"i",10:"x",100:"c",2:"ii",20:"xx",200:"cc",3:"iii",30:"xxx",300:"ccc",4:"iv",40:"xl",400:"cd",5:"v",50:"l",500:"d",6:"vi",60:"lx",600:"dc",7:"vii",70:"lxx",700:"dcc",8:"viii",80:"lxxx",800:"dccc",9:"ix",90:"xc",900:"cm",1e3:"m"};function Gi(t){for(var e=[1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],o="";t>0;)t<e[0]?e.shift():(o+=Ui[e[0]],t-=e[0]);return o}var Wi=String.fromCharCode;var qi="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function Xi(t){for(var e="",o=0,i=function(t){for(var e="",o=0;o<t.length;o++){var i=t.charCodeAt(o);if(55296<=i&&i<=56319){var r=i,n=t.charCodeAt(++o);isNaN(n)||(i=1024*(r-55296)+(n-56320)+65536)}i<128?e+=Wi(i):i<2048?(e+=Wi(192|i>>>6),e+=Wi(128|63&i)):i<65536?(e+=Wi(224|i>>>12),e+=Wi(128|i>>>6&63),e+=Wi(128|63&i)):i<1114111&&(e+=Wi(240|i>>>18),e+=Wi(128|i>>>12&63),e+=Wi(128|i>>>6&63),e+=Wi(128|63&i))}return e}(t);o<i.length;){var r=i.charCodeAt(o++),n=i.charCodeAt(o++),s=i.charCodeAt(o++),a=r>>2,p=(3&r)<<4|n>>4,h=(15&n)<<2|s>>6,c=63&s;isNaN(n)?h=c=64:isNaN(s)&&(c=64),e=e+qi.charAt(a)+qi.charAt(p)+qi.charAt(h)+qi.charAt(c)}return e}function Yi(t,e){if(t.length<2)return t.slice();return function t(o){if(o.length<=1)return o;var i=Math.floor(o.length/2),r=o.slice(0,i),n=o.slice(i);return function(t,o){for(var i=[],r=0,n=0,s=0;r<t.length&&n<o.length;)e(t[r],o[n])<=0?i[s++]=t[r++]:i[s++]=o[n++];return r<t.length&&i.push.apply(i,t.slice(r)),n<o.length&&i.push.apply(i,o.slice(n)),i}(r=t(r),n=t(n))}(t)}function Zi(t,e){var o={width:"800px",height:"600px",cors:"Anonymous"},i=t,r=t.clippedBBox();if(r){var n=r.getOrigin();(i=new ue).transform(Q().translate(-n.x,-n.y)),i.children.push(t);var s=r.getSize();o.width=s.width+"px",o.height=s.height+"px"}var a=Object.assign(o,e),p=document.createElement("div"),h=p.style;h.display="none",h.width=a.width,h.height=a.height,document.body.appendChild(p);var c=new Di(p,a);c.suspendTracking(),c.draw(i);var l=c.image(),u=function(){c.destroy(),document.body.removeChild(p)};return l.then(u,u),l}function Qi(t,e){var o=Ni(t);return e&&e.raw||(o="data:image/svg+xml;base64,"+Xi(o)),ii().resolve(o)}function Ki(t){var e=.5;t.options.stroke&&a.util.defined(t.options.stroke.width)&&t.options.stroke.width%2==0&&(e=0);for(var o=0;o<t.segments.length;o++)t.segments[o].anchor().round(0).translate(e,e);return t}function $i(t,e){return-t.x*e.y+t.y*e.x<0}function Ji(t){return"number"==typeof t&&!isNaN(t)}function tr(t){return"string"==typeof t}function er(t){return Ji(t)||tr(t)&&isFinite(t)}function or(t){return"function"==typeof t}function ir(t,e){for(var o in e){var i=e[o],r=typeof i,n=void 0;if((n="object"===r&&null!==i?i.constructor:null)&&n!==Array)if(i instanceof Date)t[o]=new Date(i.getTime());else if(or(i.clone))t[o]=i.clone();else{var s=t[o];t[o]="object"==typeof s&&s||{},ir(t[o],i)}else"undefined"!==r&&(t[o]=i)}return t}function rr(t){for(var e=arguments,o=arguments.length,i=1;i<o;i++)ir(t,e[i]);return t}function nr(t){return"object"==typeof t}function sr(t){return Ji(t)?t+"px":t}var ar=/width|height|top|left|bottom|right/i;function pr(t){return ar.test(t)}function hr(t,e){var o=tr(e)?[e]:e;if(A(o)){for(var i={},r=window.getComputedStyle(t),n=0;n<o.length;n++){var s=o[n];i[s]=pr(s)?parseFloat(r[s]):r[s]}return i}if(nr(e))for(var a in e)t.style[a]=sr(e[a])}function cr(t,e){void 0===e&&(e=0);var o={top:0,right:0,bottom:0,left:0};return"number"==typeof t?o.top=o[_]=o[u]=o[v]=t:(o.top=t.top||e,o[_]=t[_]||e,o[u]=t[u]||e,o[v]=t[v]||e),o}var lr={compile:function(t){return t}},ur=function(){};ur.register=function(t){lr=t},ur.compile=function(t){return lr.compile(t)};var dr=ur;function fr(t){var e;return void 0===t&&(t={}),t.template?t.template=e=dr.compile(t.template):or(t.content)&&(e=t.content),e}var yr=/\[(?:(\d+)|['"](.*?)['"])\]|((?:(?!\[.*?\]|\.).)+)/g,gr={};function vr(t){if(gr[t])return gr[t];var e=[];return t.replace(yr,(function(t,o,i,r){e.push(a.util.defined(o)?o:i||r)})),gr[t]=function(t){for(var o=t,i=0;i<e.length&&o;i++)o=o[e[i]];return o},gr[t]}function mr(t,e){for(var o=t.length,i=[],r=0;r<o;r++)e(t[r])&&i.push(t[r]);return i}function xr(t,e){if(t.className)for(var o=e.split(" "),i=0;i<o.length;i++)if(-1!==t.className.indexOf(o[i]))return!0}gr[void 0]=function(t){return t};var _r=function(){this._map={}};_r.prototype.get=function(t){return this._map[this._key(t)]},_r.prototype.set=function(t,e){this._map[this._key(t)]=e},_r.prototype._key=function(t){return t instanceof Date?t.getTime():t};var br=_r;function wr(t,e){if(e)return-1!==e.indexOf(t)}function Cr(t,e,o){return a.util.round(t+(e-t)*o,3)}var kr=function(t,e){this.observer=t,this.handlerMap=rr({},this.handlerMap,e)};kr.prototype.trigger=function(t,e){var o,i=this.observer,r=this.handlerMap;return r[t]?o=this.callObserver(r[t],e):i.trigger&&(o=this.callObserver("trigger",t,e)),o},kr.prototype.callObserver=function(t){for(var e=[],o=arguments.length-1;o-- >0;)e[o]=arguments[o+1];return this.observer[t].apply(this.observer,e)},kr.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};var Sr=kr;function Ar(t,e){for(var o=t.length,i=[],r=0;r<o;r++){var n=e(t[r]);a.util.defined(n)&&i.push(n)}return i}var Pr=So.browser||{};function Tr(t){var e=0;return t.wheelDelta?(e=-t.wheelDelta/120,Pr.webkit&&(e/=2*Math.max(window.devicePixelRatio,.625))):t.detail&&(e=t.detail/3),e=e>0?Math.ceil(e):Math.floor(e)}var Mr=a.util,Or=Mr.append,Br=Mr.bindEvents,Rr=Mr.defined,Er=Mr.deg,zr=Mr.elementOffset,Lr=Mr.elementSize,Ir=Mr.eventCoordinates,jr=Mr.eventElement,Dr=Mr.hashKey,Vr=Mr.last,Hr=Mr.limitValue,Fr=Mr.objectKey,Nr=Mr.rad,Ur=Mr.round,Gr=Mr.unbindEvents,Wr=Mr.valueOrDefault,qr=function(){};qr.fetchFonts=function(t,e,o){void 0===o&&(o={depth:0});!t||o.depth>5||!document.fonts||Object.keys(t).forEach((function(i){var r=t[i];"dataSource"!==i&&"$"!==i[0]&&r&&("font"===i?e.push(r):"object"==typeof r&&(o.depth++,qr.fetchFonts(r,e,o),o.depth--))}))},qr.loadFonts=function(t,e){var o=[];if(t.length>0&&document.fonts){try{o=t.map((function(t){return document.fonts.load(t)}))}catch(t){fo(t)}Promise.all(o).then(e,e)}else e()},qr.preloadFonts=function(t,e){var o=[];qr.fetchFonts(t,o),qr.loadFonts(o,e)};var Xr=qr;function Yr(t,e){var o=t.prototype;o.options?o.options=rr({},o.options,e):o.options=e}function Zr(t){for(var e=m,o=x,i=0,r=t.length;i<r;i++){var n=t[i];null!==n&&isFinite(n)&&(e=Math.min(e,n),o=Math.max(o,n))}return{min:e===m?void 0:e,max:o===x?void 0:o}}function Qr(t,e){for(var o=0;o<t.length;o++){var i=t[o];if(e(i,o,t))return i}}var Kr=p.Matrix,$r=/matrix\((.*)\)/;function Jr(t){var e=getComputedStyle(t).transform;return"none"===e?Kr.unit():function(t){var e=t.match($r);if(null===e||2!==e.length)return Kr.unit();var o=e[1].split(",").map((function(t){return parseFloat(t)}));return new(Function.prototype.bind.apply(Kr,[null].concat(o)))}(e)}function tn(t){if(!t)return Kr.unit();for(var e=Jr(t),o=t.parentElement;o;){var i=Jr(o);e=e.multiplyCopy(i),o=o.parentElement}return e.b=e.c=e.e=e.f=0,e}var en=function(t){function e(o){var i=this;if(t.call(this),1===arguments.length)for(var r=e.formats,n=this.resolveColor(o),s=0;s<r.length;s++){var a=r[s].re,p=r[s].process,h=a.exec(n);if(h){var c=p(h);i.r=c[0],i.g=c[1],i.b=c[2]}}else this.r=arguments[0],this.g=arguments[1],this.b=arguments[2];this.r=this.normalizeByte(this.r),this.g=this.normalizeByte(this.g),this.b=this.normalizeByte(this.b)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.toHex=function(){var t=this.padDigit,e=this.r.toString(16),o=this.g.toString(16),i=this.b.toString(16);return"#"+t(e)+t(o)+t(i)},e.prototype.resolveColor=function(t){var o=t||"black";return"#"===o.charAt(0)&&(o=o.substr(1,6)),o=(o=o.replace(/ /g,"")).toLowerCase(),o=e.namedColors[o]||o},e.prototype.normalizeByte=function(t){return t<0||isNaN(t)?0:t>255?255:t},e.prototype.padDigit=function(t){return 1===t.length?"0"+t:t},e.prototype.brightness=function(t){var e=Math.round;return this.r=e(this.normalizeByte(this.r*t)),this.g=e(this.normalizeByte(this.g*t)),this.b=e(this.normalizeByte(this.b*t)),this},e.prototype.percBrightness=function(){return Math.sqrt(.241*this.r*this.r+.691*this.g*this.g+.068*this.b*this.b)},e.prototype.isDark=function(){return this.percBrightness()<180},e.fromBytes=function(t,e,o,i){return new wi(t,e,o,null!=i?i:1)},e.fromRGB=function(t,e,o,i){return new bi(t,e,o,null!=i?i:1)},e.fromHSV=function(t,e,o,i){return new ki(t,e,o,null!=i?i:1)},e.fromHSL=function(t,e,o,i){return new Si(t,e,o,null!=i?i:1)},e}(O);en.formats=[{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,process:function(t){return[parseInt(t[1],10),parseInt(t[2],10),parseInt(t[3],10)]}},{re:/^(\w{2})(\w{2})(\w{2})$/,process:function(t){return[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]}},{re:/^(\w{1})(\w{1})(\w{1})$/,process:function(t){return[parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),parseInt(t[3]+t[3],16)]}}],en.namedColors=vi;var on=en;var rn=function(t){return new on(t).isDark()?C:l},nn={},sn=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},an={size:{configurable:!0}};sn.prototype.values=function(){return this._values.filter((function(t){return t!==nn}))},sn.prototype.has=function(t){return void 0!==this._index[t]},sn.prototype.add=function(t){this.has(t)||(this._index[t]=this._values.length,this._values.push(t))},sn.prototype.delete=function(t){var e=this._index[t];void 0!==e&&(this._values[e]=nn,delete this._index[t])},sn.prototype.clear=function(){this._index={},this._values=[]},an.size.get=function(){return this._values.length},Object.defineProperties(sn.prototype,an);var pn=function(t){this._set=new Set(t)},hn={size:{configurable:!0}};pn.prototype.values=function(){return Array.from(this._set)},pn.prototype.has=function(t){return this._set.has(t)},pn.prototype.add=function(t){this._set.add(t)},pn.prototype.delete=function(t){this._set.delete(t)},pn.prototype.clear=function(){this._set.clear()},hn.size.get=function(){return this._set.size},Object.defineProperties(pn.prototype,hn);function cn(t){return function(){var t=!1;"function"==typeof Set&&(t=new Set([1]).has(1));return t}()?new pn(t):new sn(t)}function ln(t){throw t}var un={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 dn(t,e){var o=Ur(e-t,9);if(0===o){if(0===e)return.1;o=Math.abs(e)}var i=Math.pow(10,Math.floor(Math.log(o)/Math.log(10))),r=Ur(o/i,10);return Ur(i*(r<1.904762?.2:r<4.761904?.5:r<9.523809?1:2),10)}var fn=function(t){function e(e,o){t.call(this),this.x=e||0,this.y=o||0}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.clone=function(){return new e(this.x,this.y)},e.prototype.equals=function(t){return t&&this.x===t.x&&this.y===t.y},e.prototype.rotate=function(t,e){var o=Nr(e),i=Math.cos(o),r=Math.sin(o),n=t.x,s=t.y,a=this.x,p=this.y;return this.x=Ur(n+(a-n)*i+(p-s)*r,3),this.y=Ur(s+(p-s)*i-(a-n)*r,3),this},e.prototype.multiply=function(t){return this.x*=t,this.y*=t,this},e.prototype.distanceTo=function(t){var e=this.x-t.x,o=this.y-t.y;return Math.sqrt(e*e+o*o)},e.onCircle=function(t,o,i){var r=Nr(o);return new e(t.x-i*Math.cos(r),t.y-i*Math.sin(r))},e}(O);function yn(t,e,o,i,r){var n=Nr(r);return new fn(o+(t-o)*Math.cos(n)+(e-i)*Math.sin(n),i-(t-o)*Math.sin(n)+(e-i)*Math.cos(n))}var gn=function(t){function e(e,o,i,r){t.call(this),this.x1=e||0,this.y1=o||0,this.x2=i||0,this.y2=r||0}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.equals=function(t){return this.x1===t.x1&&this.x2===t.x2&&this.y1===t.y1&&this.y2===t.y2},e.prototype.width=function(){return this.x2-this.x1},e.prototype.height=function(){return this.y2-this.y1},e.prototype.translate=function(t,e){return this.x1+=t,this.x2+=t,this.y1+=e,this.y2+=e,this},e.prototype.move=function(t,e){var o=this.height(),i=this.width();return Rr(t)&&(this.x1=t,this.x2=this.x1+i),Rr(e)&&(this.y1=e,this.y2=this.y1+o),this},e.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},e.prototype.wrapPoint=function(t){var o=A(t),i=o?t[0]:t.x,r=o?t[1]:t.y;return this.wrap(new e(i,r,i,r)),this},e.prototype.snapTo=function(t,e){return e!==k&&e||(this.x1=t.x1,this.x2=t.x2),e!==S&&e||(this.y1=t.y1,this.y2=t.y2),this},e.prototype.alignTo=function(t,e){var o=this.height(),i=this.width(),r=e===b||e===u?S:k,n=r===S?o:i;if(e===d){var s=t.center(),a=this.center();this.x1+=s.x-a.x,this.y1+=s.y-a.y}else this[r+1]=e===b||e===v?t[r+1]-n:t[r+2];return this.x2=this.x1+i,this.y2=this.y1+o,this},e.prototype.shrink=function(t,e){return this.x2-=t,this.y2-=e,this},e.prototype.expand=function(t,e){return this.shrink(-t,-e),this},e.prototype.pad=function(t){var e=cr(t);return this.x1-=e.left,this.x2+=e.right,this.y1-=e.top,this.y2+=e.bottom,this},e.prototype.unpad=function(t){var e=cr(t);return e.left=-e.left,e.top=-e.top,e.right=-e.right,e.bottom=-e.bottom,this.pad(e)},e.prototype.clone=function(){return new e(this.x1,this.y1,this.x2,this.y2)},e.prototype.center=function(){return new fn(this.x1+this.width()/2,this.y1+this.height()/2)},e.prototype.containsPoint=function(t){return t.x>=this.x1&&t.x<=this.x2&&t.y>=this.y1&&t.y<=this.y2},e.prototype.points=function(){return[new fn(this.x1,this.y1),new fn(this.x2,this.y1),new fn(this.x2,this.y2),new fn(this.x1,this.y2)]},e.prototype.getHash=function(){return[this.x1,this.y1,this.x2,this.y2].join(",")},e.prototype.overlaps=function(t){return!(t.y2<this.y1||this.y2<t.y1||t.x2<this.x1||this.x2<t.x1)},e.prototype.rotate=function(t){var e=this.width(),o=this.height(),i=this.center(),r=i.x,n=i.y,s=yn(0,0,r,n,t),a=yn(e,0,r,n,t),p=yn(e,o,r,n,t),h=yn(0,o,r,n,t);return e=Math.max(s.x,a.x,p.x,h.x)-Math.min(s.x,a.x,p.x,h.x),o=Math.max(s.y,a.y,p.y,h.y)-Math.min(s.y,a.y,p.y,h.y),this.x2=this.x1+e,this.y2=this.y1+o,this},e.prototype.toRect=function(){return new p.Rect([this.x1,this.y1],[this.width(),this.height()])},e.prototype.hasSize=function(){return 0!==this.width()&&0!==this.height()},e.prototype.align=function(t,e,o){var i=e+1,r=e+2,n=e===k?"width":"height",s=this[n]();wr(o,[v,b])?(this[i]=t[i],this[r]=this[i]+s):wr(o,[_,u])?(this[r]=t[r],this[i]=this[r]-s):o===d&&(this[i]=t[i]+(t[n]()-s)/2,this[r]=this[i]+s)},e}(O);function vn(t,e){return t-e}var mn=function(t){function e(e,o,i,r,n){t.call(this),this.center=e,this.innerRadius=o,this.radius=i,this.startAngle=r,this.angle=n}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.clone=function(){return new e(this.center,this.innerRadius,this.radius,this.startAngle,this.angle)},e.prototype.middle=function(){return this.startAngle+this.angle/2},e.prototype.setRadius=function(t,e){return e?this.innerRadius=t:this.radius=t,this},e.prototype.point=function(t,e){var o=Nr(t),i=Math.cos(o),r=Math.sin(o),n=e?this.innerRadius:this.radius,s=Ur(this.center.x-i*n,3),a=Ur(this.center.y-r*n,3);return new fn(s,a)},e.prototype.adjacentBox=function(t,e,o){var i=this.clone().expand(t),r=i.middle(),n=i.point(r),s=e/2,a=o/2,p=Math.sin(Nr(r)),h=Math.cos(Nr(r)),c=n.x-s,l=n.y-a;return Math.abs(p)<.9&&(c+=s*-h/Math.abs(h)),Math.abs(h)<.9&&(l+=a*-p/Math.abs(p)),new gn(c,l,c+e,l+o)},e.prototype.containsPoint=function(t){var e=this.center,o=this.innerRadius,i=this.radius,r=this.startAngle,n=this.startAngle+this.angle,s=t.x-e.x,a=t.y-e.y,p=new fn(s,a),h=this.point(r),c=new fn(h.x-e.x,h.y-e.y),l=this.point(n),u=new fn(l.x-e.x,l.y-e.y),d=Ur(s*s+a*a,3);return(c.equals(p)||$i(c,p))&&!$i(u,p)&&d>=o*o&&d<=i*i},e.prototype.getBBox=function(){var t,e=new gn(m,m,x,x),o=Ur(this.startAngle%360),i=Ur((o+this.angle)%360),r=this.innerRadius,n=[0,90,180,270,o,i].sort(vn),s=n.indexOf(o),a=n.indexOf(i);t=o===i?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 h=this.point(t[p]);e.wrapPoint(h),e.wrapPoint(h,r)}return r||e.wrapPoint(this.center),e},e.prototype.expand=function(t){return this.radius+=t,this},e}(O),xn=function(t){function e(e,o,i,r){t.call(this,e,0,o,i,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}(mn),_n=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.createRing=function(t,e){var o=t.startAngle+180,i=t.angle+o;t.angle>0&&o===i&&(i+=.001);var r=new p.Point(t.center.x,t.center.y),n=Math.max(t.radius,0),s=Math.max(t.innerRadius,0),h=new p.Arc(r,{startAngle:o,endAngle:i,radiusX:n,radiusY:n}),c=a.Path.fromArc(h,e).close();if(s){h.radiusX=h.radiusY=s;var l=h.pointAt(i);c.lineTo(l.x,l.y),c.arc(i,o,s,s,!0)}else c.lineTo(r.x,r.y);return c},e}(O);_n.current=new _n;var bn=_n,wn=function(t){function e(e){t.call(this),this.children=[],this.options=rr({},this.options,this.initUserOptions(e))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initUserOptions=function(t){return t},e.prototype.reflow=function(t){for(var e,o=this.children,i=0;i<o.length;i++){var r=o[i];r.reflow(t),e=e?e.wrap(r.box):r.box.clone()}this.box=e||t},e.prototype.destroy=function(){var t=this.children;this.animation&&this.animation.destroy();for(var e=0;e<t.length;e++)t[e].destroy()},e.prototype.getRoot=function(){var t=this.parent;return t?t.getRoot():null},e.prototype.getSender=function(){var t=this.getService();if(t)return t.sender},e.prototype.getService=function(){for(var t=this;t;){if(t.chartService)return t.chartService;t=t.parent}},e.prototype.translateChildren=function(t,e){for(var o=this.children,i=o.length,r=0;r<i;r++)o[r].box.translate(t,e)},e.prototype.append=function(){for(var t=arguments,e=0;e<arguments.length;e++){var o=t[e];this.children.push(o),o.parent=this}},e.prototype.renderVisual=function(){!1!==this.options.visible&&(this.createVisual(),this.addVisual(),this.renderChildren(),this.createAnimation(),this.renderComplete())},e.prototype.addVisual=function(){this.visual&&(this.visual.chartElement=this,this.parent&&this.parent.appendVisual(this.visual))},e.prototype.renderChildren=function(){for(var t=this.children,e=t.length,o=0;o<e;o++)t[o].renderVisual()},e.prototype.createVisual=function(){this.visual=new a.Group({zIndex:this.options.zIndex,visible:Wr(this.options.visible,!0)})},e.prototype.createAnimation=function(){this.visual&&this.options.animation&&(this.animation=a.Animation.create(this.visual,this.options.animation))},e.prototype.appendVisual=function(t){t.chartElement||(t.chartElement=this),t.options.noclip?this.clipRoot().visual.append(t):Rr(t.options.zIndex)?this.stackRoot().stackVisual(t):this.isStackRoot?this.stackVisual(t):this.visual?this.visual.append(t):this.parent.appendVisual(t)},e.prototype.clipRoot=function(){return this.parent?this.parent.clipRoot():this},e.prototype.stackRoot=function(){return this.parent?this.parent.stackRoot():this},e.prototype.stackVisual=function(t){var e,o=t.options.zIndex||0,i=this.visual.children,r=i.length;for(e=0;e<r;e++){var n=i[e];if(Wr(n.options.zIndex,0)>o)break}this.visual.insert(e,t)},e.prototype.traverse=function(t){for(var e=this.children,o=e.length,i=0;i<o;i++){var r=e[i];t(r),r.traverse&&r.traverse(t)}},e.prototype.closest=function(t){for(var e=this,o=!1;e&&!o;)(o=t(e))||(e=e.parent);if(o)return e},e.prototype.renderComplete=function(){},e.prototype.hasHighlight=function(){var t=(this.options||{}).highlight;return!(!this.createHighlight||t&&!1===t.visible)},e.prototype.toggleHighlight=function(t,e){var o=this,i=(this.options||{}).highlight||{},r=i.visual,n=this._highlight;if(!n){var s={fill:{color:C,opacity:e||.2},stroke:{color:C,width:1,opacity:e||.2}};if(r){if(!(n=this._highlight=r(Object.assign(this.highlightVisualArgs(),{createVisual:function(){return o.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);Rr(n.options.zIndex)||(n.options.zIndex=Wr(i.zIndex,this.options.zIndex)),this.appendVisual(n)}n.visible(t)},e.prototype.createGradientOverlay=function(t,e,o){var i=new a.Path(Object.assign({stroke:{color:"none"},fill:this.createGradient(o),closed:t.options.closed},e));return i.segments.elements(t.segments.elements()),i},e.prototype.createGradient=function(t){if(this.parent)return this.parent.createGradient(t)},e.prototype.supportsPointInactiveOpacity=function(){return!0},e}(O);wn.prototype.options={};var Cn=wn,kn=function(t){function e(e){t.call(this,e),this.options.margin=cr(this.options.margin),this.options.padding=cr(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 o,i=this,r=this.options,n=r.width,s=r.height,a=r.shrinkToFit,p=n&&s,h=r.margin,c=r.padding,l=r.border.width,u=function(){i.align(e,k,r.align),i.align(e,S,r.vAlign),i.paddingBox=o.clone().unpad(h).unpad(l)},d=e.clone();p&&(d.x2=d.x1+n,d.y2=d.y1+s),a&&d.unpad(h).unpad(l).unpad(c),t.prototype.reflow.call(this,d),o=p?this.box=new gn(0,0,n,s):this.box,a&&p?(u(),d=this.contentBox=this.paddingBox.clone().unpad(c)):(d=this.contentBox=o.clone(),o.pad(c).pad(l).pad(h),u()),this.translateChildren(o.x1-d.x1+h.left+l+c.left,o.y1-d.y1+h.top+l+c.top);for(var f=this.children,y=0;y<f.length;y++){var g=f[y];g.reflow(g.box)}},e.prototype.align=function(t,e,o){this.box.align(t,e,o)},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(a.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:Wr(e.opacity,t.opacity),dashType:e.dashType},fill:{color:t.background,opacity:t.opacity},cursor:t.cursor}},e}(Cn);Yr(kn,{align:v,vAlign:b,margin:{},padding:{},border:{color:l,width:0},background:"",shrinkToFit:!1,width:0,height:0,visible:!0});var Sn=kn,An=function(t){function e(e,o){t.call(this,e),this.pointData=o}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,o=t.type,i=t.rotation,r=e.center(),n=e.width()/2,s=e.height()/2;if(!t.visible||!this.hasBox())return null;var h,c=this.visualStyle();if(o===f)h=new a.Circle(new p.Circle([Ur(e.x1+n,3),Ur(e.y1+s,3)],Math.min(n,s)),c);else if("triangle"===o)h=a.Path.fromPoints([[e.x1+n,e.y1],[e.x1,e.y2],[e.x2,e.y2]],c).close();else if("cross"===o)(h=new a.MultiPath(c)).moveTo(e.x1,e.y1).lineTo(e.x2,e.y2),h.moveTo(e.x1,e.y2).lineTo(e.x2,e.y1);else{var l=e.toRect();if("roundedRect"===o){var u=Wr(t.borderRadius,l.width()/5);l.setCornerRadius(u)}h=a.Path.fromRect(l,c)}return i&&h.transform(p.transform().rotate(-i,[r.x,r.y])),h.options.zIndex=t.zIndex,h},e.prototype.createElement=function(){var t=this,e=this.options.visual,o=this.pointData||{};return e?e({value:o.value,dataItem:o.dataItem,sender:this.getSender(),series:o.series,category:o.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()},e}(Sn);Yr(An,{type:f,align:d,vAlign:d});var Pn=An,Tn={glass:{type:"linear",rotation:0,stops:[{offset:0,color:C,opacity:0},{offset:.25,color:C,opacity:.3},{offset:1,color:C,opacity:0}]},sharpBevel:{type:"radial",stops:[{offset:0,color:C,opacity:.55},{offset:.65,color:C,opacity:0},{offset:.95,color:C,opacity:.25}]},roundedBevel:{type:"radial",stops:[{offset:.33,color:C,opacity:.06},{offset:.83,color:C,opacity:.2},{offset:.95,color:C,opacity:0}]},roundedGlass:{type:"radial",supportVML:!1,stops:[{offset:0,color:C,opacity:0},{offset:.5,color:C,opacity:.3},{offset:.99,color:C,opacity:0}]},sharpGlass:{type:"radial",supportVML:!1,stops:[{offset:0,color:C,opacity:.2},{offset:.15,color:C,opacity:.15},{offset:.17,color:C,opacity:.35},{offset:.85,color:C,opacity:.05},{offset:.87,color:C,opacity:.15},{offset:.99,color:C,opacity:0}]},bubbleShadow:{type:"radial",center:[.5,.5],radius:.5}};function Mn(t,e){if(t.x1===e.x1&&t.y1===e.y1&&t.x2===e.x2&&t.y2===e.y2)return e;var o=Math.min(t.x1,e.x1),i=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),h=Math.max(t.y2,e.y2),c=[];return c[0]=new gn(i,s,r,a),c[1]=new gn(o,a,i,p),c[2]=new gn(r,a,n,p),c[3]=new gn(i,p,r,h),t.x1===o&&t.y1===s||e.x1===o&&e.y1===s?(c[4]=new gn(o,s,i,a),c[5]=new gn(r,p,n,h)):(c[4]=new gn(r,s,n,a),c[5]=new gn(o,p,i,h)),mr(c,(function(t){return t.height()>0&&t.width()>0}))[0]}var On=function(t){function e(e){t.call(this,e);var o=this.options;o.width=parseInt(o.width,10),o.height=parseInt(o.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,o=new gn(0,0,t.width,t.height);this.box=o.unpad(t.margin);for(var i=0;i<e.length;i++)e[i].reflow(o),o=Mn(o,e[i].box)||new gn},e.prototype.createVisual=function(){this.visual=new a.Group,this.createBackground()},e.prototype.createBackground=function(){var t=this.options,e=t.border||{},o=this.box.clone().pad(t.margin).unpad(e.width),i=a.Path.fromRect(o.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(i)},e.prototype.getRoot=function(){return this},e.prototype.createGradient=function(t){var e,o=this.gradients,i=Fr(t),r=Tn[t.gradient];if(o[i])e=o[i];else{var n=Object.assign({},r,t);"linear"===r.type?e=new a.LinearGradient(n):(t.innerRadius&&(n.stops=function(t){for(var e=t.stops,o=t.innerRadius/t.radius*100,i=e.length,r=[],n=0;n<i;n++){var s=Object.assign({},e[n]);s.offset=(s.offset*(100-o)+o)/100,r.push(s)}return r}(n)),(e=new a.RadialGradient(n)).supportVML=!1!==r.supportVML),o[i]=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 gn(0,0,t.width,t.height)},e}(Cn);Yr(On,{width:600,height:400,background:C,border:{color:l,width:0},margin:cr(5),zIndex:-2});var Bn=On,Rn=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=k,this.elementAxis=S,this.groupSizeField="width",this.elementSizeField="height",this.groupSpacing=t.spacing,this.elementSpacing=t.vSpacing):(this.groupAxis=S,this.elementAxis=k,this.groupSizeField="height",this.elementSizeField="width",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.box,e=this.elementAxis,o=this.groupAxis,i=this.elementSizeField,r=this.groupSizeField,n=this.groupOptions(),s=n.groups,a=n.groupsSize,p=n.maxGroupElementsSize,h=s.length,c=t[o+1]+this.alignStart(a,t[r]());if(h){for(var l=c,u=0;u<h;u++){for(var d=s[u],f=d.groupElements,y=t[e+1],g=f.length,v=0;v<g;v++){var m=f[v],x=this.elementSize(m),_=l+this.alignStart(x[r],d.groupSize),b=new gn;b[o+1]=_,b[o+2]=_+x[r],b[e+1]=y,b[e+2]=y+x[i],m.reflow(b),y+=x[i]+this.elementSpacing}l+=d.groupSize+this.groupSpacing}t[o+1]=c,t[o+2]=c+a,t[e+2]=t[e+1]+p}},e.prototype.alignStart=function(t,e){var o=0,i=this.options.align;return i===_||i===u?o=e-t:i===d&&(o=(e-t)/2),o},e.prototype.groupOptions=function(){for(var t=this.box,e=this.children,o=this.elementSizeField,i=this.groupSizeField,r=this.elementSpacing,n=this.groupSpacing,s=Ur(t[o]()),a=e.length,p=[],h=0,c=0,l=0,u=0,d=[],f=0;f<a;f++){var y=e[f];y.box||y.reflow(t);var g=this.elementSize(y);this.options.wrap&&Ur(c+r+g[o])>s&&(p.push({groupElements:d,groupSize:h,groupElementsSize:c}),u=Math.max(u,c),l+=n+h,h=0,c=0,d=[]),h=Math.max(h,g[i]),c>0&&(c+=r),c+=g[o],d.push(y)}return p.push({groupElements:d,groupSize:h,groupElementsSize:c}),{groups:p,groupsSize:l+=h,maxGroupElementsSize:u=Math.max(u,c)}},e.prototype.elementSize=function(t){return{width:t.box.width(),height:t.box.height()}},e.prototype.createVisual=function(){},e}(Cn);Yr(Rn,{vertical:!0,wrap:!0,vSpacing:0,spacing:0});var En=Rn,zn=a.Text,Ln=function(t){function e(e,o){t.call(this,o),this.content=e,this.reflow(new gn)}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,o=e.size=a.util.measureText(this.content,{font:e.font});this.baseline=o.baseline,this.box=new gn(t.x1,t.y1,t.x1+o.width,t.y1+o.height)},e.prototype.createVisual=function(){var t=this.options,e=t.font,o=t.color,i=t.opacity,r=t.cursor;this.visual=new zn(this.content,this.box.toRect().topLeft(),{font:e,fill:{color:o,opacity:i},cursor:r})},e}(Cn);Yr(Ln,{font:"12px sans-serif",color:l});var In=Ln;function jn(t){var e=t.origin,o=t.bottomRight();return new gn(e.x,e.y,o.x,o.y)}var Dn=/\n/m,Vn=function(t){function e(e,o,i){t.call(this,o),this.content=e,this.data=i,this._initContainer(),!1!==this.options._autoReflow&&this.reflow(new gn)}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(Dn),o=new En({vertical:!0,align:t.align,wrap:!1}),i=rr({},t,{opacity:1,animation:null});this.container=o,this.append(o);for(var r=0;r<e.length;r++){var n=new In(e[r].trim(),i);o.append(n)}},e.prototype.reflow=function(e){var o=this.options,i=o.visual;if(this.container.options.align=o.align,i&&!this._boxReflow){var r=e;r.hasSize()||(this._boxReflow=!0,this.reflow(r),this._boxReflow=!1,r=this.box);var n=this.visual=i(this.visualContext(r));n&&(r=jn(n.clippedBBox()||new p.Rect),n.options.zIndex=o.zIndex),this.box=this.contentBox=this.paddingBox=r}else if(t.prototype.reflow.call(this,e),o.rotation){var s=cr(o.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 a.Group({transform:this.rotationTransform(),zIndex:t.zIndex,noclip:t.noclip}),this.hasBox()){var e=a.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&&!Rr(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,o={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(o,this.data),o},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,k,t.align),this.align(this.targetBox,S,t.vAlign),this.box},e.prototype.rotationTransform=function(){var t=this.options.rotation;if(!t)return null;var e=this.normalBox.center(),o=e.x,i=e.y,r=this.rotatedBox.center();return p.transform().translate(r.x-o,r.y-i).rotate(t,[o,i])},e}(Sn),Hn=function(t){function e(e){t.call(this,e),this.append(new Vn(this.options.text,Object.assign({},this.options,{vAlign:this.options.position})))}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,k)},e.buildTitle=function(t,o,i){var r,n=t;return"string"==typeof t&&(n={text:t}),(n=Object.assign({visible:!0},i,n))&&n.visible&&n.text&&(r=new e(n),o.append(r)),r},e}(Cn);Yr(Hn,{color:l,position:b,align:d,margin:cr(5),padding:cr(5)});var Fn=Hn,Nn=function(t){function e(e,o,i,r,n){t.call(this,o,n),this.text=o,this.value=e,this.index=i,this.dataItem=r,this.reflow(new gn)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.visualContext=function(e){var o=t.prototype.visualContext.call(this,e);return o.value=this.value,o.dataItem=this.dataItem,o.format=this.options.format,o.culture=this.options.culture,o},e.prototype.click=function(t,e){t.trigger("axisLabelClick",{element:jr(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!==d){var e=this.normalBox.toRect(),o=this.rotationTransform();this.box=jn(e.bbox(o.matrix()))}else t.prototype.rotate.call(this);return this.box},e.prototype.rotationTransform=function(){var e=this.options,o=e.rotation;if(!o)return null;if(e.alignRotation===d)return t.prototype.rotationTransform.call(this);var i=p.transform().rotate(o).matrix(),r=this.normalBox.toRect(),n=this.targetBox.toRect(),s=e.rotationOrigin||b,a=s===b||s===u?k:S,h=s===b||s===u?S:k,c=s===b||s===v?n.origin:n.bottomRight(),l=r.topLeft().transformCopy(i),f=r.topRight().transformCopy(i),y=r.bottomRight().transformCopy(i),g=r.bottomLeft().transformCopy(i),m=p.Rect.fromPoints(l,f,y,g),x={};x[h]=n.origin[h]-m.origin[h];var _,w,C=Math.abs(l[h]+x[h]-c[h]),A=Math.abs(f[h]+x[h]-c[h]);Ur(C,10)===Ur(A,10)?(_=l,w=f):A<C?(_=f,w=y):(_=l,w=g);var P=_[a]+(w[a]-_[a])/2;return x[a]=n.center()[a]-P,p.transform().translate(x.x,x.y).rotate(o)},e}(Vn);Yr(Nn,{_autoReflow:!1});var Un=Nn,Gn=function(t){function e(e,o,i){t.call(this,o),this.fields=e,this.chartService=i,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 o,i,r=e.label,n=e.icon,s=new gn,a=function(){return t},p=n.size,h=this.fields.text;if(Rr(r)&&r.visible){var c=fr(r);c?h=c(this.fields):r.format&&(h=this.chartService.format.auto(r.format,h)),r.color||(r.color="inside"===r.position?"#fff":n.background),this.label=new Vn(h,rr({},r)),this.label.aliasFor=a,"inside"!==r.position||Rr(p)||(n.type===f?p=Math.max(this.label.box.width(),this.label.box.height()):(o=this.label.box.width(),i=this.label.box.height()),s.wrap(this.label.box))}n.width=o||p||7,n.height=i||p||7;var l=new Pn(rr({},n));l.aliasFor=a,this.marker=l,this.append(l),this.label&&this.append(this.label),l.reflow(new gn),this.wrapperBox=s.wrap(l.box)}},e.prototype.reflow=function(t){var e,o,i,r=this.options,n=this.label,s=this.marker,a=this.wrapperBox,p=t.center(),h=r.line.length,c=r.position;r.visible&&(wr(c,[v,_])?c===v?(i=a.alignTo(t,c).translate(-h,t.center().y-a.center().y),r.line.visible&&(e=[t.x1,p.y],this.linePoints=[e,[i.x2,p.y]],o=i.clone().wrapPoint(e))):(i=a.alignTo(t,c).translate(h,t.center().y-a.center().y),r.line.visible&&(e=[t.x2,p.y],this.linePoints=[e,[i.x1,p.y]],o=i.clone().wrapPoint(e))):c===u?(i=a.alignTo(t,c).translate(t.center().x-a.center().x,h),r.line.visible&&(e=[p.x,t.y2],this.linePoints=[e,[p.x,i.y1]],o=i.clone().wrapPoint(e))):(i=a.alignTo(t,c).translate(t.center().x-a.center().x,-h),r.line.visible&&(e=[p.x,t.y1],this.linePoints=[e,[p.x,i.y2]],o=i.clone().wrapPoint(e))),s&&s.reflow(i),n&&(n.reflow(i),s&&("outside"===r.label.position&&n.box.alignTo(s.box,c),n.reflow(n.box))),this.contentBox=i,this.targetBox=t,this.box=o||i)},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,o=this.options,i=o.visual;o.visible&&i?(this.visual=i(Object.assign(this.fields,{sender:this.getSender(),rect:this.targetBox.toRect(),options:{background:o.background,border:o.background,icon:o.icon,label:o.label,line:o.line,position:o.position,visible:o.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=a.Path.fromPoints(this.linePoints,{stroke:{color:t.color,width:t.width,dashType:t.dashType}});Ki(e),this.visual.append(e)}},e.prototype.click=function(t,e){var o=this.eventArgs(e);t.trigger("noteClick",o)||e.preventDefault()},e.prototype.over=function(t,e){var o=this.eventArgs(e);t.trigger("noteHover",o)||e.preventDefault()},e.prototype.out=function(t,e){var o=this.eventArgs(e);t.trigger("noteLeave",o)},e.prototype.eventArgs=function(t){var e=this.options;return Object.assign(this.fields,{element:jr(t),text:Rr(e.label)?e.label.text:"",visual:this.visual})},e}(Sn);Yr(Gn,{icon:{visible:!0,type:f},label:{position:"inside",visible:!0,align:d,vAlign:d},line:{visible:!0},visible:!0,position:b,zIndex:2});var Wn=Gn,qn={format:function(t,e){return e},toString:function(t){return t},parseDate:function(t){return new Date(t)},firstDay:function(){return 0}},Xn=function(){},Yn={implementation:{configurable:!0}};Xn.register=function(t){qn=t},Yn.implementation.get=function(){return qn},Object.defineProperties(Xn,Yn);var Zn=Xn,Qn=/\{(\d+)(:[^\}]+)?\}/g,Kn=function(t){this._intlService=t},$n={intl:{configurable:!0}};$n.intl.get=function(){return this._intlService||Zn.implementation},$n.intl.set=function(t){this._intlService=t},Kn.prototype.auto=function(t){for(var e=[],o=arguments.length-1;o-- >0;)e[o]=arguments[o+1];var i=this.intl;return tr(t)&&t.match(g)?i.format.apply(i,[t].concat(e)):i.toString(e[0],t)},Kn.prototype.localeAuto=function(t,e,o){var i=this.intl;return tr(t)&&t.match(g)?t.replace(Qn,(function(t,r,n){var s=e[parseInt(r,10)];return i.toString(s,n?n.substring(1):"",o)})):i.toString(e[0],t,o)},Object.defineProperties(Kn.prototype,$n);var Jn=Kn,ts=function(t,e){void 0===e&&(e={}),this._intlService=e.intlService,this.sender=e.sender||t,this.format=new Jn(e.intlService),this.chart=t,this.rtl=Boolean(e.rtl)},es={intl:{configurable:!0}};es.intl.get=function(){return this._intlService||Zn.implementation},es.intl.set=function(t){this._intlService=t,this.format.intl=t},ts.prototype.notify=function(t,e){this.chart&&this.chart.trigger(t,e)},ts.prototype.isPannable=function(t){var e=((this.chart||{}).options||{}).pannable;return e&&e.lock!==t},Object.defineProperties(ts.prototype,es);var os,is=ts,rs=function(){};rs.register=function(t){os=t},rs.create=function(t,e){if(os)return os.create(t,e)};var ns=rs;function ss(t,e){var o=t.tickX,i=t.tickY,r=t.position,n=new a.Path({stroke:{width:e.width,color:e.color}});return t.vertical?n.moveTo(o,r).lineTo(o+e.size,r):n.moveTo(r,i).lineTo(r,i+e.size),Ki(n),n}function as(t,e){var o=t.lineStart,i=t.lineEnd,r=t.position,n=new a.Path({stroke:{width:e.width,color:e.color,dashType:e.dashType}});return t.vertical?n.moveTo(o,r).lineTo(i,r):n.moveTo(r,o).lineTo(r,i),Ki(n),n}var ps=function(t){function e(e,o){void 0===o&&(o=new is),t.call(this,e),this.chartService=o,this.options.visible||(this.options=rr({},this.options,{labels:{visible:!1},line:{visible:!1},margin:0,majorTickSize:0,minorTickSize:0})),this.options.minorTicks=rr({},{color:this.options.line.color,width:this.options.line.width,visible:"none"!==this.options.minorTickType},this.options.minorTicks,{size:this.options.minorTickSize,align:this.options.minorTickType}),this.options.majorTicks=rr({},{color:this.options.line.color,width:this.options.line.width,visible:"none"!==this.options.majorTickType},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;nr(e)&&(t.alignRotation=e.align,t.rotation=e.angle)},e.prototype.createLabels=function(){var t=this.options,e=t.vertical?_:d,o=rr({},t.labels,{align:e,zIndex:t.zIndex}),i=Math.max(1,o.step);if(this.clearLabels(),o.visible){this.normalizeLabelRotation(o),"auto"===o.rotation&&(o.rotation=0,t.autoRotateLabels=!0);for(var r=this.labelsRange(),n=r.min;n<r.max;n+=i){var s={index:n,count:r.max},a=this.createAxisLabel(n,o,s);a&&(this.append(a),this.labels.push(a))}}},e.prototype.clearLabels=function(){this.children=mr(this.children,(function(t){return!(t instanceof Un)})),this.labels=[]},e.prototype.clearTitle=function(){var t=this;this.title&&(this.children=mr(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,o=t.vertical,i=t.labels.mirror,r=i?e.x1:e.x2,n=i?e.y2:e.y1,s=t.line.width||0;return o?new gn(r,e.y1,r,e.y2-s):new gn(e.x1,n,e.x2-s,n)},e.prototype.createTitle=function(){var t=this.options,e=rr({rotation:t.vertical?-90:0,text:"",zIndex:1,visualSize:!0},t.title);if(e.visible&&e.text){var o=new Vn(e.text,e);this.append(o),this.title=o}},e.prototype.createNotes=function(){var t=this.options,e=t.notes,o=e.data||[];this.notes=[];for(var i=0;i<o.length;i++){var r=rr({},e,o[i]);r.value=this.parseNoteValue(r.value);var n=new Wn({value:r.value,text:r.label.text,dataItem:r},r,this.chartService);n.options.visible&&(Rr(n.options.position)?t.vertical&&!wr(n.options.position,[v,_])?n.options.position=t.reverse?v:_:t.vertical||wr(n.options.position,[b,u])||(n.options.position=t.reverse?u:b):t.vertical?n.options.position=t.reverse?v:_:n.options.position=t.reverse?u:b,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 a.Group({zIndex:-2}),this.appendVisual(this._gridLines)),t},e.prototype.createTicks=function(t){var e=this.options,o=this.lineBox(),i=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 h=r.skip;h<a;h+=p)Rr(s)&&h%s==0||(n.tickX=i?o.x2:o.x2-r.size,n.tickY=i?o.y1-r.size:o.y1,n.position=e[h],t.append(ss(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,o=this.lineBox();if(e.width>0&&e.visible){var i=new a.Path({stroke:{width:e.width,color:e.color,dashType:e.dashType}});i.moveTo(o.x1,o.y1).lineTo(o.x2,o.y2),t._alignLines&&Ki(i);var r=this._lineGroup=new a.Group;r.append(i),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,o=t.background;o&&(this._backgroundPath=a.Path.fromRect(e.toRect(),{fill:{color:o},stroke:null}),this.visual.append(this._backgroundPath))},e.prototype.createPlotBands=function(){var t=this,e=this.options,o=e.plotBands||[],i=e.vertical,r=this.plotArea;if(0!==o.length){for(var n=this._plotbandGroup=new a.Group({zIndex:-1}),s=mr(this.pane.axes,(function(e){return e.options.vertical!==t.options.vertical}))[0],h=0;h<o.length;h++){var c=o[h],l=void 0,u=void 0,d=c.label,f=void 0;if(i?(l=(s||r.axisX).lineBox(),u=this.getSlot(c.from,c.to,!0)):(l=this.getSlot(c.from,c.to,!0),u=(s||r.axisY).lineBox()),d&&(d.vAlign=d.position||v,f=this.createPlotBandLabel(d,c,new gn(l.x1,u.y1,l.x2,u.y2))),0!==l.width()&&0!==u.height()){var y=new p.Rect([l.x1,u.y1],[l.width(),u.height()]),g=a.Path.fromRect(y,{fill:{color:c.color,opacity:c.opacity},stroke:null});n.append(g),f&&n.append(f)}}this.appendVisual(n)}},e.prototype.createPlotBandLabel=function(t,e,o){if(!1===t.visible)return null;var i,r=t.text;if(Rr(t)&&t.visible){var n=fr(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(i=new Vn(r,t)).reflow(o),i.renderVisual(),i.visual},e.prototype.createGridLines=function(t){var e=this.options,o=e.minorGridLines,i=e.majorGridLines,r=e.minorUnit,n=e.vertical,s=t.options.line.visible,a=i.visible?e.majorUnit:0,p=t.lineBox(),h=p[n?"y1":"x1"],c={lineStart:p[n?"x1":"y1"],lineEnd:p[n?"x2":"y2"],vertical:n},l=[],u=this.gridLinesVisual();function d(t,e,o){var i=t.length,r=Math.max(1,e.step);if(e.visible)for(var n=e.skip;n<i;n+=r){var a=Ur(t[n]);wr(a,l)||n%o==0||s&&h===a||(c.position=a,u.append(as(c,e)),l.push(a))}}return d(this.getMajorTickPositions(),i),d(this.getMinorTickPositions(),o,a/r),u.children},e.prototype.reflow=function(t){for(var e=this.options,o=this.labels,i=this.title,r=e.vertical,n=o.length,s=r?"width":"height",a=i?i.box[s]():0,p=this.getActualTickSize()+e.margin+a,h=((this.getRoot()||{}).box||t)[s](),c=0,l=0;l<n;l++){var u=o[l].box[s]();u+p<=h&&(c=Math.max(c,u))}this.box=r?new gn(t.x1,t.y1,t.x1+c+p,t.y2):new gn(t.x1,t.y1,t.x2,t.y1+c+p),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,o=this.labelsBetweenTicks(),i=t.vertical,r=t.labels.mirror,n=this.getLabelsTickPositions(),s=0;s<e.length;s++){var a=e[s],p=this.labelTickIndex(a),h=i?a.box.height():a.box.width(),c=n[p],l=n[p+1],u=void 0,d=void 0;if(i){if(o)u=c+(l-c)/2-h/2;else u=c-h/2;d=u}else o?(u=c,d=l):d=(u=c-h/2)+h;this.positionLabel(a,r,u,d)}},e.prototype.positionLabel=function(t,e,o,i){void 0===i&&(i=o);var r,n=this.options,s=n.vertical,a=this.lineBox(),p=this.getActualTickSize()+n.margin;if(s){var h=a.x2;e?(h+=p,t.options.rotationOrigin=v):(h-=p+t.box.width(),t.options.rotationOrigin=_),r=t.box.move(h,o)}else{var c=a.y1;e?(c-=p+t.box.height(),t.options.rotationOrigin=u):(c+=p,t.options.rotationOrigin=b),r=new gn(o,c,i,c+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,o=Math.min(e.length,t.length-1),i=0,r=0;r<o;r++){var n=Math.abs(t[r+1]-t[r]),s=e[r].box,a=this.autoRotateLabelAngle(s,n);if(0!==a&&(i=a),-90===i)break}if(0!==i){for(var p=0;p<e.length;p++)e[p].options.rotation=i,e[p].reflow(new gn);return!0}},e.prototype.arrangeTitle=function(){var t=this.options,e=this.title,o=t.labels.mirror,i=t.vertical;e&&(i?(e.options.align=o?_:v,e.options.vAlign=e.options.position):(e.options.align=e.options.position,e.options.vAlign=o?b:u),e.reflow(this.box))},e.prototype.arrangeNotes=function(){for(var t=0;t<this.notes.length;t++){var e=this.notes[t],o=e.options.value,i=void 0;Rr(o)?(this.shouldRenderNote(o)?e.show():e.hide(),i=this.noteSlot(o)):e.hide(),e.reflow(i||this.lineBox())}},e.prototype.noteSlot=function(t){return this.getSlot(t)},e.prototype.alignTo=function(t){var e=t.lineBox(),o=this.options.vertical,i=o?S:k;this.box.snapTo(e,i),o?this.box.shrink(0,this.lineBox().height()-e.height()):this.box.shrink(this.lineBox().width()-e.width(),0),this.box[i+1]-=this.lineBox()[i+1]-e[i+1],this.box[i+2]-=this.lineBox()[i+2]-e[i+2]},e.prototype.axisLabelText=function(t,e,o){var i,r=this,n=fr(e),s=function(){return e.format?r.chartService.format.localeAuto(e.format,[t],e.culture):t};n?i=n(Object.assign({},o,{get text(){return s()},value:t,format:e.format,culture:e.culture})):i=s();return i},e.prototype.slot=function(t,e,o){var i=this.getSlot(t,e,o);if(i)return i.toRect()},e.prototype.contentBox=function(){var t=this.box.clone(),e=this.labels;if(e.length){var o=this.options.vertical?S:k;if(this.chartService.isPannable(o)){var i=this.maxLabelOffset();t[o+1]-=i.start,t[o+2]+=i.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,o=t.reverse,i=this.labelsBetweenTicks(),r=this.getLabelsTickPositions(),n=e?S:k,s=this.labels,a=o?1:0,p=o?0:1,h=0,c=0,l=0;l<s.length;l++){var u=s[l],d=this.labelTickIndex(u),f=void 0,y=void 0;i?(f=r[d+a],y=r[d+p]):f=y=r[d],h=Math.max(h,f-u.box[n+1]),c=Math.max(c,u.box[n+2]-y)}return{start:h,end:c}},e.prototype.limitRange=function(t,e,o,i,r){var n=this.options;if(t<o&&r<0&&(!Rr(n.min)||n.min<=o)||i<e&&r>0&&(!Rr(n.max)||i<=n.max))return null;if(e<o&&r>0||i<t&&r<0)return{min:t,max:e};var s=e-t,a=t,p=e;return t<o&&r<0?(a=Hr(t,o,i),p=Hr(t+s,o+s,i)):e>i&&r>0&&(p=Hr(e,o,i),a=Hr(e-s,o,i-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(),o=t?e.height():e.width(),i=t?S:k,r=this.lineDir(),n=i+(1===r?1:2).toString();return{axis:i,axisOrigin:n,axisDir:r,lineBox:e,lineSize:o,lineStart:e[n]}},e.prototype.pointOffset=function(t){var e=this.lineInfo(),o=e.axis,i=e.axisDir,r=e.axisOrigin,n=e.lineBox,s=e.lineSize;return(i>0?t[o]-n[r]:n[r]-t[o])/s},e.prototype.scaleToDelta=function(t,e){var o=Hr(t,-.999,.999);return o>0?e*Math.min(1,o):e-e/(1+o)},e.prototype.labelsBetweenTicks=function(){return!this.options.justified},e.prototype.prepareUserOptions=function(){},e}(Cn);Yr(ps,{labels:{visible:!0,rotation:0,mirror:!1,step:1,skip:0},line:{width:1,color:l,visible:!0},title:{visible:!0,position:d},majorTicks:{align:"outside",size:4,skip:0,step:1},minorTicks:{align:"outside",size:3,skip:0,step:1},axisCrossingValue:0,majorTickType:"outside",minorTickType:"none",majorGridLines:{skip:0,step:1},minorGridLines:{visible:!1,width:1,color:l,skip:0,step:1},margin:5,visible:!0,reverse:!1,justified:!0,notes:{label:{text:""}},_alignLines:!0,_deferLabels:!1});var hs=ps,cs="days",ls="years",us={years:31536e6,months:26784e5,weeks:6048e5,days:864e5,hours:36e5,minutes:6e4,seconds:1e3,milliseconds:1};function ds(t,e){return t.getTime()-e-6e4*(t.getTimezoneOffset()-e.getTimezoneOffset())}function fs(t,e){return new Date(t.getTime()+e)}function ys(t){var e;return t instanceof Date?e=t:t&&(e=new Date(t)),e}function gs(t,e){return 0===e&&23===t.getHours()&&(t.setHours(t.getHours()+2),!0)}function vs(t,e,o,i){var r=t;if(t){var n=ys(t),s=n.getHours();o===ls?gs(r=new Date(n.getFullYear()+e,0,1),0):"months"===o?gs(r=new Date(n.getFullYear(),n.getMonth()+e,1),s):"weeks"===o?gs(r=vs(function(t,e){void 0===e&&(e=0);var o=0,i=t.getDay();if(!isNaN(i))for(;i!==e;)0===i?i=6:i--,o++;return fs(t,864e5*-o)}(n,i),7*e,cs),s):o===cs?gs(r=new Date(n.getFullYear(),n.getMonth(),n.getDate()+e),s):"hours"===o?r=function(t,e){var o=new Date(t);o.setMinutes(0,0,0);var i=6e4*(t.getTimezoneOffset()-o.getTimezoneOffset());return fs(o,i+36e5*e)}(n,e):"minutes"===o?(r=fs(n,6e4*e)).getSeconds()>0&&r.setSeconds(0):"seconds"===o?r=fs(n,1e3*e):"milliseconds"===o&&(r=fs(n,e)),"milliseconds"!==o&&r.getMilliseconds()>0&&r.setMilliseconds(0)}return r}function ms(t,e,o){return vs(ys(t),0,e,o)}function xs(t,e,o){var i=ys(t);return i&&ms(i,e,o).getTime()===i.getTime()?i:vs(i,1,e,o)}function _s(t,e){return t&&e?t.getTime()-e.getTime():-1}function bs(t,e){return t.getTime()-e}function ws(t){if(A(t)){for(var e=[],o=0;o<t.length;o++)e.push(ws(t[o]));return e}if(t)return ys(t).getTime()}function Cs(t,e){return t&&e?ws(t)===ws(e):t===e}function ks(t,e,o){return ds(t,e)/us[o]}function Ss(t,e,o,i){var r=ys(t),n=ys(e);return("months"===o?r.getMonth()-n.getMonth()+12*(r.getFullYear()-n.getFullYear())+ks(r,new Date(r.getFullYear(),r.getMonth()),cs)/new Date(r.getFullYear(),r.getMonth()+1,0).getDate():o===ls?r.getFullYear()-n.getFullYear()+Ss(r,new Date(r.getFullYear(),0),"months",1)/12:o===cs||"weeks"===o?ks(r,n,o):bs(r,e)/us[o])/i}function As(t,e,o){return o===ls?e.getFullYear()-t.getFullYear():"months"===o?12*As(t,e,ls)+e.getMonth()-t.getMonth():o===cs?Math.floor(bs(e,t)/864e5):Math.floor(bs(e,t)/us[o])}function Ps(t,e){return tr(e)&&t.parseDate(e)||ys(e)}function Ts(t,e){if(A(e)){for(var o=[],i=0;i<e.length;i++)o.push(Ps(t,e[i]));return o}return Ps(t,e)}function Ms(t,e){return Ji(t.weekStartDay)?t.weekStartDay:e&&e.firstDay?e.firstDay():0}var Os=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||[],o=Rr(t.min),i=Rr(t.max);if(t.srcCategories=t.categories=e,(o||i)&&e.length){var r,n=o?Math.floor(t.min):0;r=i?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:Ji(t.min)?t.min%1:0,max:Ji(t.max)&&t.max%1!=0&&t.max<this.totalRange().max?e-(1-t.max%1):e-(t.justified?1:0)}},e.prototype.totalRangeIndices=function(t){var e,o=this.options,i=Ji(o.min)?o.min:0;if(e=Ji(o.max)?o.max:Ji(o.min)?i+o.categories.length:this.totalRange().max||1,t){var r=this.totalRange();i=Hr(i,0,r.max),e=Hr(e,0,r.max)}return{min:i,max:e}},e.prototype.range=function(){var t=this.options;return{min:Ji(t.min)?t.min:0,max:Ji(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,o=t.max,i=this.lineBox();return{scale:(this.options.vertical?i.height():i.width())/(o-e||1)*(this.options.reverse?-1:1),box:i,min:e,max:o}},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 o=this.options.vertical?S:k,i=t[o+1],r=t[o+2],n=e[0],s=Vr(e);(n.box[o+1]>r||n.box[o+2]<i)&&(n.options.visible=!1),(s.box[o+1]>r||s.box[o+2]<i)&&(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(),o=e.min,i=e.max,r=Math.ceil(i),n=Math.floor(o),s=[];n<=r;)s.push(n),n+=t;return s},e.prototype.getTickPositions=function(t){for(var e=this.options,o=e.vertical,i=e.reverse,r=this.scaleOptions(),n=r.scale,s=r.box,a=r.min,p=s[(o?S:k)+(i?2:1)],h=this.tickIndices(t),c=[],l=0;l<h.length;l++)c.push(p+Ur(n*(h[l]-a),3));return c},e.prototype.getTicks=function(){var t=this.options,e=this._ticks,o=this.rangeIndices(),i=this.lineBox(),r=i.getHash()+o.min+","+o.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,i),e.minorTicks=n?this.filterOutOfRangePositions(this.getTickPositions(.5),i):[]}return e},e.prototype.filterOutOfRangePositions=function(t,e){if(!t.length)return t;for(var o=this.options.vertical?S:k,i=function(t){return e[o+1]<=t&&t<=e[o+2]},r=t.length-1,n=0;!i(t[n])&&n<=r;)n++;for(var s=r;!i(t[s])&&s>=0;)s--;return t.slice(n,s+1)},e.prototype.lineInfo=function(){var t=this.options,e=t.vertical,o=t.reverse,i=this.lineBox(),r=e?i.height():i.width(),n=e?S:k,s=o?-1:1,a=n+(1===s?1:2).toString();return{axis:n,axisOrigin:a,axisDir:s,lineBox:i,lineSize:r,lineStart:i[a]}},e.prototype.lineDir=function(){return this.options.reverse?-1:1},e.prototype.getSlot=function(t,e,o){var i=this.options,r=i.reverse,n=i.justified,s=this.scaleOptions(),a=s.scale,p=s.box,h=s.min,c=this.lineInfo(),l=c.axis,u=c.lineStart,d=p.clone(),f=!Rr(e),y=Wr(t,0),g=Wr(e,y);g=Math.max(g-1,y);var v=u+(y-h)*a,m=u+((g=Math.max(y,g))+1-h)*a;return f&&n&&(m=v),o&&(v=Hr(v,p[l+1],p[l+2]),m=Hr(m,p[l+1],p[l+2])),d[l+1]=r?m:v,d[l+2]=r?v:m,d},e.prototype.limitSlot=function(t){var e=this.options.vertical?S:k,o=this.lineBox(),i=t.clone();return i[e+1]=Hr(t[e+1],o[e+1],o[e+2]),i[e+2]=Hr(t[e+2],o[e+1],o[e+2]),i},e.prototype.slot=function(e,o,i){var r=Math.floor(this.options.min||0),n=e,s=o;return"string"==typeof n?n=this.categoryIndex(n):Ji(n)&&(n-=r),"string"==typeof s?s=this.categoryIndex(s):Ji(s)&&(s-=r),t.prototype.slot.call(this,n,s,i)},e.prototype.pointCategoryIndex=function(t){var e=this.options,o=e.reverse,i=e.justified,r=e.vertical?S:k,n=this.scaleOptions(),s=n.scale,a=n.box,p=n.min,h=n.max,c=o?h:p,l=a[r+1],u=a[r+2],d=t[r];if(d<l||d>u)return null;var f=c+(d-l)/s,y=f%1;return i?f=Math.round(f):0===y&&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 o=this.options;return(e?o.srcCategories:o.categories)[t]},e.prototype.categoriesCount=function(){return(this.options.categories||[]).length},e.prototype.translateRange=function(t){var e=this.options,o=this.lineBox(),i=e.vertical?o.height():o.width(),r=e.categories.length,n=Ur(t/(i/r),10);return{min:n,max:r+n}},e.prototype.scaleRange=function(t,e){var o=Math.abs(this.pointOffset(e)),i=this.totalRangeIndices(),r=i.max-i.min,n=this.scaleToDelta(t,r),s=o*n,a=(1-o)*n,p=i.min+s,h=i.max-a;return h-p<.1&&(h=p+.1),{min:p,max:h}},e.prototype.zoomRange=function(t,e){var o=this.totalRange(),i=o.min,r=o.max,n=this.scaleRange(t,e);return{min:Hr(n.min,i,r),max:Hr(n.max,i,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,o=t.labels,i=this.totalRangeIndices(!0),r=i.min,n=i.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>o.skip?o.skip+o.step*Math.ceil((r-o.skip)/o.step):o.skip)-s,max:(t.categories.length?n+(e?1:0):0)-s}},e.prototype.createAxisLabel=function(t,e,o){var i=this.options,r=i.dataItems?i.dataItems[t]:null,n=Wr(i.categories[t],"");o.dataItem=r;var s=this.axisLabelText(n,e,o);return new Un(n,s,t,r,e)},e.prototype.shouldRenderNote=function(t){var e=this.totalRangeIndices();return Math.floor(e.min)<=t&&t<=Math.ceil(e.max)},e.prototype.noteSlot=function(t){var e=this.options,o=t-Math.floor(e.min||0);return this.getSlot(o)},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 o=this.options.vertical?S:k,i=e[o+1],r=e[o+2],n=0;n<t.length;n++){var s=t[n];s.box&&(r<s.box[o+1]||s.box[o+2]<i)&&s.hide()}},e.prototype.pan=function(t){var e=this.totalRangeIndices(!0),o=this.scaleOptions().scale,i=Ur(t/o,10),r=this.totalRange(),n=e.min+i,s=e.max+i;return this.limitRange(n,s,0,r.max,i)},e.prototype.pointsRange=function(t,e){var o=this.options,i=o.reverse,r=o.vertical?S:k,n=this.totalRangeIndices(!0),s=this.scaleOptions(),a=s.scale,p=s.box[r+(i?2:1)],h=t[r]-p,c=e[r]-p,l=n.min+h/a,u=n.min+c/a,d=Math.min(l,u),f=Math.max(l,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;return this._categoriesMap?this._categoriesMap.get(t):function(t,e){if(t instanceof Date){for(var o=e.length,i=0;i<o;i++)if(Cs(e[i],t))return i;return-1}return e.indexOf(t)}(t,e.srcCategories)},e.prototype.currentRangeIndices=function(){var t=this.options,e=0;return Ji(t.min)&&(e=Math.floor(t.min)),{min:e,max:Ji(t.max)?t.justified?Math.floor(t.max):Math.ceil(t.max)-1:this.totalCount()-1}},e.prototype.mapCategories=function(){if(!this._categoriesMap)for(var t=this._categoriesMap=new br,e=this.options.srcCategories,o=0;o<e.length;o++)t.set(e[o],o)},e.prototype.totalCount=function(){return Math.max(this.options.srcCategories.length,this._seriesMax||0)},e}(hs);Yr(Os,{type:"category",vertical:!1,majorGridLines:{visible:!1,width:1,color:l},labels:{zIndex:1},justified:!1,_deferLabels:!0});var Bs=Os,Rs={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"},Es=["milliseconds","seconds","minutes","hours",cs,"weeks","months",ls];function zs(t){var e=t._range;return e||((e=t._range=Zr(t)).min=ys(e.min),e.max=ys(e.max)),e}var Ls=function(t){this.options=t};Ls.prototype.displayIndices=function(){return{min:0,max:1}},Ls.prototype.displayRange=function(){return{}},Ls.prototype.total=function(){return{}},Ls.prototype.valueRange=function(){return{}},Ls.prototype.valueIndex=function(){return-1},Ls.prototype.values=function(){return[]},Ls.prototype.totalIndex=function(){return-1},Ls.prototype.valuesCount=function(){return 0},Ls.prototype.totalCount=function(){return 0},Ls.prototype.dateAt=function(){return null};var Is=function(t,e,o){this.options=o,o.baseUnitStep=o.baseUnitStep||1;var i=o.roundToBaseUnit,r=o.justified;this.start=vs(t,0,o.baseUnit,o.weekStartDay);var n=this.roundToTotalStep(e),s=!r&&Cs(e,n)&&!o.justifyEnd;this.end=this.roundToTotalStep(e,!r,s?1:0);var a=o.min||t;this.valueStart=this.roundToTotalStep(a),this.displayStart=i?this.valueStart:a;var p=o.max;if(p){var h=!r&&Cs(p,this.roundToTotalStep(p))?-1:0;this.valueEnd=this.roundToTotalStep(p,!1,h),this.displayEnd=i?this.roundToTotalStep(p,!r):o.max}else this.valueEnd=n,this.displayEnd=i||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 js(t,e,o){for(var i,r,n,s=zs(t.categories),a=(t.max||s.max)-(t.min||s.min),p=t.autoBaseUnitSteps,h=t.maxDateGroups,c="fit"===t.baseUnit,l=e?Es.indexOf(e):0,u=c?Es[l++]:t.baseUnit,d=a/us[u],f=d;!r||d>=h;){i=i||p[u].slice(0);do{n=i.shift()}while(n&&e===u&&n<o);if(n)d=f/(r=n);else{if(u===Vr(Es)){r=Math.ceil(f/h);break}if(!c){d>h&&(r=Math.ceil(f/h));break}u=Es[l++]||Vr(Es),f=a/us[u],i=null}}t.baseUnitStep=r,t.baseUnit=u}function Ds(t){var e=(t.baseUnit||"").toLowerCase();return"fit"!==e&&!wr(e,Es)&&function(t){for(var e,o,i=t.categories,r=Rr(i)?i.length:0,n=m,s=0;s<r;s++){var a=i[s];if(a&&e){var p=ds(a,e);p>0&&(o=(n=Math.min(n,p))>=31536e6?ls:n>=24192e5?"months":n>=6048e5?"weeks":n>=864e5?cs:n>=36e5?"hours":n>=6e4?"minutes":"seconds")}e=a}t.baseUnit=o||cs}(t),"fit"!==e&&"auto"!==t.baseUnitStep||js(t),t}Is.prototype.displayRange=function(){return{min:this.displayStart,max:this.displayEnd}},Is.prototype.displayIndices=function(){if(!this._indices){var t=this.options,e=t.baseUnit,o=t.baseUnitStep,i=Ss(this.displayStart,this.valueStart,e,o),r=Ss(this.displayEnd,this.valueStart,e,o);this._indices={min:i,max:r}}return this._indices},Is.prototype.total=function(){return{min:this.start,max:this.end}},Is.prototype.totalCount=function(){return this.totalIndex(this.end)+(this.options.justified?1:0)},Is.prototype.valueRange=function(){return{min:this.valueStart,max:this.valueEnd}},Is.prototype.valueIndex=function(t){var e=this.options;return Math.floor(Ss(t,this.valueStart,e.baseUnit,e.baseUnitStep))},Is.prototype.totalIndex=function(t){var e=this.options;return Math.floor(Ss(t,this.start,e.baseUnit,e.baseUnitStep))},Is.prototype.dateIndex=function(t){var e=this.options;return Ss(t,this.valueStart,e.baseUnit,e.baseUnitStep)},Is.prototype.valuesCount=function(){return this.valueIndex(this.valueEnd)+1},Is.prototype.values=function(){var t=this._values;if(!t){var e=this.options,o=this.valueRange();this._values=t=[];for(var i=o.min;i<=o.max;)t.push(i),i=vs(i,e.baseUnitStep,e.baseUnit,e.weekStartDay)}return t},Is.prototype.dateAt=function(t,e){var o=this.options;return vs(e?this.start:this.valueStart,o.baseUnitStep*t,o.baseUnit,o.weekStartDay)},Is.prototype.roundToTotalStep=function(t,e,o){var i=this.options,r=i.baseUnit,n=i.baseUnitStep,s=i.weekStartDay,a=this.start,p=Ss(t,a,r,n),h=e?Math.ceil(p):Math.floor(p);return o&&(h+=o),vs(a,h*n,r,s)};var Vs=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,o=e.intl,i=this.options,r=i.categories||[];if(r._parsed||((r=Ts(o,r))._parsed=!0),i=rr({roundToBaseUnit:!0},i,{categories:r,min:Ps(o,i.min),max:Ps(o,i.max),weekStartDay:Ms(i,o)}),e.panning&&e.isPannable(i.vertical?S:k)&&(i.roundToBaseUnit=!1),i.userSetBaseUnit=i.userSetBaseUnit||i.baseUnit,i.userSetBaseUnitStep=i.userSetBaseUnitStep||i.baseUnitStep,this.options=i,i.srcCategories=r,r.length>0){var n=zs(r),s=i.maxDivisions;if(this.dataRange=new Is(n.min,n.max,Ds(i)),s){var a=this.dataRange.displayRange(),p=Object.assign({},i,{justified:!0,roundToBaseUnit:!1,baseUnit:"fit",min:a.min,max:a.max,maxDateGroups:s}),h=this.dataRange.options;js(p,h.baseUnit,h.baseUnitStep),this.divisionRange=new Is(n.min,n.max,p)}else this.divisionRange=this.dataRange}else i.baseUnit=i.baseUnit||cs,this.dataRange=this.divisionRange=new Ls(i);this.rangeLabels=[]},e.prototype.tickIndices=function(e){var o=this.dataRange,i=this.divisionRange,r=i.valuesCount();if(!this.options.maxDivisions||!r)return t.prototype.tickIndices.call(this,e);var n=[],s=i.values(),a=0;this.options.justified||(s=s.concat(i.dateAt(r)),a=.5);for(var p=0;p<s.length;p++)if(n.push(o.dateIndex(s[p])+a),1!==e&&p>=1){var h=n.length-1;n.splice(p,0,n[h-1]+(n[h]-n[h-1])*e)}return n},e.prototype.shouldRenderNote=function(t){var e=this.range(),o=this.options.categories||[];return _s(t,e.min)>=0&&_s(t,e.max)<=0&&o.length},e.prototype.parseNoteValue=function(t){return Ps(this.chartService.intl,t)},e.prototype.noteSlot=function(t){return this.getSlot(t)},e.prototype.translateRange=function(t){var e=this.options,o=e.baseUnit,i=e.weekStartDay,r=e.vertical,n=this.lineBox(),s=r?n.height():n.width(),a=this.range(),p=s/(a.max-a.min),h=Ur(t/p,10);if(a.min&&a.max){var c=fs(e.min||a.min,h),l=fs(e.max||a.max,h);a={min:vs(c,0,o,i),max:vs(l,0,o,i)}}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,o=this.lineBox(),i=e.vertical?o.height():o.width(),r=this.dataRange.displayRange(),n=r.min,s=r.max,a=this.dataRange.total(),p=Ur(t/(i/(s-n)),10)*(e.reverse?-1:1),h=fs(n,p),c=fs(s,p),l=this.limitRange(ws(h),ws(c),ws(a.min),ws(a.max),p);return l?(l.min=ys(l.min),l.max=ys(l.max),l.baseUnit=e.baseUnit,l.baseUnitStep=e.baseUnitStep||1,l.userSetBaseUnit=e.userSetBaseUnit,l.userSetBaseUnitStep=e.userSetBaseUnitStep,l):void 0},e.prototype.pointsRange=function(e,o){if(this.isEmpty())return null;var i=t.prototype.pointsRange.call(this,e,o),r=this.dataRange.displayRange(),n=this.dataRange.displayIndices(),s=bs(r.max,r.min)/(n.max-n.min),a=this.options;return{min:fs(r.min,i.min*s),max:fs(r.min,i.max*s),baseUnit:a.userSetBaseUnit||a.baseUnit,baseUnitStep:a.userSetBaseUnitStep||a.baseUnitStep}},e.prototype.scaleRange=function(t,e){if(this.isEmpty())return{};var o=this.options,i="fit"===o.userSetBaseUnit,r=this.dataRange.total(),n=this.dataRange.displayRange(),s=n.min,a=n.max,p=Math.abs(this.pointOffset(e)),h=a-s,c=this.scaleToDelta(t,h),l=Math.round(p*c),u=Math.round((1-p)*c),d=this.dataRange.options.baseUnit,f=new Date(s.getTime()+l),y=new Date(a.getTime()-u);if(i){var g,v,m=o.autoBaseUnitSteps,x=o.maxDateGroups,_=Vr(m[d])*x*us[d],b=bs(a,s),w=bs(y,f),C=Es.indexOf(d);if(w<us[d]&&"milliseconds"!==d)d=Es[C-1],f=fs(s,v=(b-(x-1)*(g=Vr(m[d]))*us[d])/2),y=fs(a,-v);else if(w>_&&d!==ls){var k=0;do{C++,d=Es[C],k=0,v=2*us[d];do{g=m[d][k],k++}while(k<m[d].length&&v*g<b)}while(d!==ls&&v*g<b);(v=(v*g-b)/2)>0&&(f=fs(s,-v),y=fs(a,v),f=fs(f,Hr(y,r.min,r.max)-y),y=fs(y,Hr(f,r.min,r.max)-f))}}return f&&y&&bs(y,f)>0?{min:f,max:y,baseUnit:o.userSetBaseUnit||o.baseUnit,baseUnitStep:o.userSetBaseUnitStep||o.baseUnitStep}:void 0},e.prototype.zoomRange=function(t,e){var o=this.dataRange.total(),i=this.scaleRange(t,e);return i&&(i.min<o.min&&(i.min=o.min),i.max>o.max&&(i.max=o.max)),i},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 o=this.lineBox(),i=t.vertical,r=t.rangeLabels.mirror||t.labels.mirror,n=e[0];if(n){var s=i?o.y1-n.box.height()/2:o.x1;this.positionLabel(n,r,s)}var a=e[1];if(a){var p=i?o.y2-a.box.height()/2:o.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 o=t[0];if(o&&o.options.visible)for(var i=0;i<e.length;i++){if(!s(o,e[i]))break}var r=t[1];if(r&&r.options.visible)for(var n=e.length-1;n>0;--n){if(!s(r,e[n]))break}}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),o=this.rangeLabels,i=0;i<o.length;i++){var r=o[i];r.options.visible&&e.wrap(r.box)}return e},e.prototype.createAxisLabel=function(t,e,o){void 0===o&&(o={});var i=this.options,r=i.dataItems&&!i.maxDivisions?i.dataItems[t]:null,n=this.divisionRange.dateAt(t),s=e.dateFormats[this.divisionRange.options.baseUnit];e.format=e.format||s,o.dataItem=r;var a=this.axisLabelText(n,e,o);if(a)return new Un(n,a,t,r,e)},e.prototype.createRangeLabels=function(){var t=this,e=this.divisionRange,o=e.displayStart,i=e.displayEnd,r=this.options,n=Object.assign({},r.labels,r.rangeLabels,{align:d,zIndex:r.zIndex});if(!0===n.visible){this.normalizeLabelRotation(n),n.alignRotation=d,"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,o,i){if(i){var r=new Un(o,i,e,null,n);t.append(r),t.rangeLabels.push(r)}};a(0,o,this.axisLabelText(o,n,{index:0,count:2})),a(1,i,this.axisLabelText(i,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 o=function(e,o,i){var r=2*Math.abs(o[i+1]-o[i]),n=t.autoRotateLabelAngle(e.box,r);0!==n&&(e.options.rotation=n,e.reflow(new gn))},i=this.getMajorTickPositions();o(e[0],i,0),o(e[1],i,i.length-2)}},e.prototype.categoryIndex=function(t){return this.dataRange.valueIndex(t)},e.prototype.slot=function(t,e,o){var i=this.dataRange,r=t,n=e;r instanceof Date&&(r=i.dateIndex(r)),n instanceof Date&&(n=i.dateIndex(n));var s=this.getSlot(r,n,o);if(s)return s.toRect()},e.prototype.getSlot=function(e,o,i){var r=e,n=o;return"object"==typeof r&&(r=this.categoryIndex(r)),"object"==typeof n&&(n=this.categoryIndex(n)),t.prototype.getSlot.call(this,r,n,i)},e.prototype.valueRange=function(){var t=zs(this.options.srcCategories);return{min:ys(t.min),max:ys(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.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=zs(t.srcCategories);return new Is(e.min,e.max,Object.assign({},t,{justified:!1,roundToBaseUnit:!0,justifyEnd:t.justified})).displayRange()},e}(Bs);Yr(Vs,{type:y,labels:{dateFormats:Rs},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});var Hs=Vs;function Fs(t,e){return Ur(Math.floor(t/e)*e,10)}function Ns(t,e){return Ur(Math.ceil(t/e)*e,10)}function Us(t){return Math.max(Math.min(t,3e5),-3e5)}var Gs=Math.pow(10,-9),Ws=function(t){function e(e,o,i,r){t.call(this,Object.assign({},i,{seriesMin:e,seriesMax:o}),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,o){var i=o.narrowRange,r=function(t,e,o){if(!t&&!e)return 0;var i;if(t>=0&&e>=0){var r=t===e?0:t;if(!1===o||!o&&(e-r)/e>.2)return 0;i=Math.max(0,r-(e-r)/2)}else i=t;return i}(t,e,i),n=function(t,e,o){if(!t&&!e)return 1;var i;if(t<=0&&e<=0){var r=t===e?0:e,n=Math.abs((r-t)/r);if(!1===o||!o&&n>.2)return 0;i=Math.min(0,r-(t-r)/2)}else i=e;return i}(t,e,i),s=dn(r,n),a={majorUnit:s};!1!==o.roundToMajorUnit&&(r<0&&qs(r,s,1/3)&&(r-=s),n>0&&qs(n,s,1/3)&&(n+=s));return a.min=Fs(r,s),a.max=Ns(n,s),a}(t.seriesMin,t.seriesMax,t);return this.totalOptions=function(t,e){return{min:Rr(e.min)?Math.min(t.min,e.min):t.min,max:Rr(e.max)?Math.max(t.max,e.max):t.max,majorUnit:t.majorUnit}}(e,t),function(t,e){var o,i,r=e;if(e){!function(t,e){for(var o=0;o<e.length;o++){var i=e[o];null===t[i]&&(t[i]=void 0)}}(e,["min","max"]),o=Rr(e.min),i=Rr(e.max);var n=o||i;n&&e.min===e.max&&(e.min>0?e.min=0:e.max=1),e.majorUnit?(t.min=Fs(t.min,e.majorUnit),t.max=Ns(t.max,e.majorUnit)):n&&(r=rr(t,e),t.majorUnit=dn(r.min,r.max))}t.minorUnit=(r.majorUnit||t.majorUnit)/5;var s=rr(t,r);s.min>=s.max&&(o&&!i?s.max=s.min+s.majorUnit:!o&&i&&(s.min=s.max-s.majorUnit));return 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,o=e.max-e.min;return Math.floor(Ur(o/t,3))+1},e.prototype.getTickPositions=function(t,e){var o=this.options,i=this.lineInfo(),r=i.axisDir,n=i.axisOrigin,s=i.lineBox,a=t*(i.lineSize/(o.max-o.min)),p=this.getDivisions(t),h=[],c=s[n],l=0;e&&(l=e/t);for(var u=0;u<p;u++)u%l!=0&&h.push(Ur(c,3)),c+=a*r;return h},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,o){void 0===o&&(o=!1);var i=this.options,r=this.lineInfo(),n=r.axis,s=r.axisDir,a=r.lineBox,p=r.lineSize,h=r.lineStart,c=s*(p/(i.max-i.min)),l=Wr(t,e||0),u=Wr(e,t||0);o&&(l=Hr(l,i.min,i.max),u=Hr(u,i.min,i.max));var d=Math.min(l,u)-i.min,f=Math.max(l,u)-i.min,y=new gn(a.x1,a.y1,a.x1,a.y1);return y[n+1]=Us(h+c*(s>0?d:f)),y[n+2]=Us(h+c*(s>0?f:d)),y},e.prototype.getValue=function(t){var e=this.options,o=Number(e.max),i=Number(e.min),r=this.pointOffset(t);return r<0||r>1?null:Ur(i+r*(o-i),10)},e.prototype.translateRange=function(t){var e=this.options,o=e.vertical,i=e.reverse,r=e.max,n=e.min,s=this.lineInfo().lineSize,a=Ur(t/(s/(r-n)),10);return!o&&!i||o&&i||(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,o){var i=this.options,r=Ur(i.min+t*i.majorUnit,10),n=this.axisLabelText(r,e,o);return new Un(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 o=this.getValue(t),i=this.getValue(e),r=Math.min(o,i),n=Math.max(o,i);if(this.isValidRange(r,n))return{min:r,max:n}},e.prototype.scaleRange=function(t,e){var o=Math.abs(this.pointOffset(e)),i=this.options.max-this.options.min,r=this.scaleToDelta(t,i),n=o*r,s=(1-o)*r,a=Ur(this.options.min+n,10),p=Ur(this.options.max-s,10);return p-a<Gs&&(p=a+Gs),{min:a,max:p}},e.prototype.zoomRange=function(t,e){var o=this.totalMin,i=this.totalMax,r=this.scaleRange(t,e);return{min:Hr(r.min,o,i),max:Hr(r.max,o,i)}},e.prototype.isValidRange=function(t,e){return e-t>Gs},e}(hs);function qs(t,e,o){var i=Ur(Math.abs(t%e),10);return 0===i||i>e*(1-o)}Yr(Ws,{type:"numeric",min:0,max:1,vertical:!0,majorGridLines:{visible:!0,width:1,color:l},labels:{format:"#.####################"},zIndex:1});var Xs=Ws,Ys=function(t){function e(e,o,i,r){var n=ys(e),s=ys(o),a=r.intl,p=i||{};p=function(t,e,o){var i=o.min||t,r=o.max||e,n=o.baseUnit||(r&&i?function(t){var e="hours";t>=31536e6?e=ls:t>=26784e5?e="months":t>=6048e5?e="weeks":t>=864e5&&(e=cs);return e}(ds(r,i)):"hours"),s=us[n],a=o.weekStartDay||0,p=ms(ws(i)-1,n,a)||ys(r),h=xs(ws(r)+1,n,a),c=(o.majorUnit?o.majorUnit:void 0)||Ns(dn(p.getTime(),h.getTime()),s)/s,l=As(p,h,n),u=Ns(l,c)-l,d=Math.floor(u/2),f=u-d;o.baseUnit||delete o.baseUnit;return o.baseUnit=o.baseUnit||n,o.min=o.min||vs(p,-d,n,a),o.max=o.max||vs(h,f,n,a),o.minorUnit=o.minorUnit||c/5,o.majorUnit=c,o}(n,s,p=rr(p||{},{min:Ps(a,p.min),max:Ps(a,p.max),axisCrossingValue:Ts(a,p.axisCrossingValues||p.axisCrossingValue),weekStartDay:Ms(p,a)})),t.call(this,p,r),this.intlService=a,this.seriesMin=n,this.seriesMax=s;var h=p.weekStartDay||0;this.totalMin=ws(ms(ws(n)-1,p.baseUnit,h)),this.totalMax=ws(xs(ws(s)+1,p.baseUnit,h))}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(As(e.min,e.max,e.baseUnit)/t+1)},e.prototype.getTickPositions=function(t){for(var e=this.options,o=this.lineInfo(),i=o.axisDir,r=o.lineSize,n=o.lineStart,s=this.getDivisions(t),a=r/bs(e.max,e.min),p=e.weekStartDay||0,h=[n],c=1;c<s;c++){var l=n+bs(vs(e.min,c*t,e.baseUnit,p),e.min)*a*i;h.push(Ur(l,3))}return h},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,o){return Xs.prototype.getSlot.call(this,Ps(this.intlService,t),Ps(this.intlService,e),o)},e.prototype.getValue=function(t){var e=Xs.prototype.getValue.call(this,t);return null!==e?ys(e):null},e.prototype.labelsCount=function(){return this.getDivisions(this.options.majorUnit)},e.prototype.createAxisLabel=function(t,e,o){var i=this.options,r=t*i.majorUnit,n=i.weekStartDay||0,s=i.min;r>0&&(s=vs(s,r,i.baseUnit,n));var a=e.dateFormats[i.baseUnit];e.format=e.format||a;var p=this.axisLabelText(s,e,o);return new Un(s,p,t,null,e)},e.prototype.translateRange=function(t){var e=this.options,o=this.lineBox(),i=e.vertical,r=e.reverse,n=i?o.height():o.width(),s=this.range(),a=n/bs(s.max,s.min),p=Ur(t/a,10);return!i&&!r||i&&r||(p=-p),{min:fs(e.min,p),max:fs(e.max,p),offset:p}},e.prototype.shouldRenderNote=function(t){var e=this.range();return _s(t,e.min)>=0&&_s(t,e.max)<=0},e.prototype.pan=function(t){var e=this.translateRange(t,!0),o=this.limitRange(ws(e.min),ws(e.max),this.totalMin,this.totalMax,e.offset);if(o)return{min:ys(o.min),max:ys(o.max)}},e.prototype.pointsRange=function(t,e){var o=this.getValue(t),i=this.getValue(e),r=Math.min(o,i),n=Math.max(o,i);return{min:ys(r),max:ys(n)}},e.prototype.scaleRange=function(t,e){var o=Math.abs(this.pointOffset(e)),i=this.options.max-this.options.min,r=this.scaleToDelta(t,i),n=o*r,s=(1-o)*r,a=ys(ws(this.options.min)+n),p=ys(ws(this.options.max)-s);return p-a<1e3&&(p=ys(ws(a)+1e3)),{min:a,max:p}},e.prototype.zoomRange=function(t,e){var o=this.scaleRange(t,e);return{min:ys(Hr(ws(o.min),this.totalMin,this.totalMax)),max:ys(Hr(ws(o.max),this.totalMin,this.totalMax))}},e}(hs);Yr(Ys,{type:y,majorGridLines:{visible:!0,width:1,color:l},labels:{dateFormats:Rs}});var Zs=Ys,Qs=function(t){function e(e,o,i,r){var n=rr({majorUnit:10,min:e,max:o},i),s=n.majorUnit,a=function(t,e){var o,i=Ur($s(t,e),10)%1;o=t<=0?e:0!==i&&(i<.3||i>.9)?Math.pow(e,$s(t,e)+.2):Math.pow(e,Math.ceil($s(t,e)));return o}(o,s),p=function(t,e,o){var i=o.majorUnit,r=t;t<=0?r=e<=1?Math.pow(i,-2):1:o.narrowRange||(r=Math.pow(i,Math.floor($s(t,i))));return r}(e,o,n),h=function(t,e,o,i){var r=o.min,n=o.max;Rr(o.axisCrossingValue)&&o.axisCrossingValue<=0&&Ks();Rr(i.max)?i.max<=0&&Ks():n=e;Rr(i.min)?i.min<=0&&Ks():r=t;return{min:r,max:n}}(p,a,n,i);n.max=h.max,n.min=h.min,n.minorUnit=i.minorUnit||Ur(s-1,10),t.call(this,n,r),this.totalMin=Rr(i.min)?Math.min(p,i.min):p,this.totalMax=Rr(i.max)?Math.max(a,i.max):a,this.logMin=Ur($s(h.min,s),10),this.logMax=Ur($s(h.max,s),10),this.seriesMin=e,this.seriesMax=o,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,o){var i=this.options,r=this.logMin,n=this.logMax,s=i.majorUnit,a=i.min,p=i.max,h=this.lineInfo(),c=h.axis,l=h.axisDir,u=h.lineBox,d=h.lineSize,f=h.lineStart,y=l*(d/(n-r)),g=Wr(t,e||1),v=Wr(e,t||1);if(g<=0||v<=0)return null;o&&(g=Hr(g,a,p),v=Hr(v,a,p)),g=$s(g,s),v=$s(v,s);var m=Math.min(g,v)-r,x=Math.max(g,v)-r,_=new gn(u.x1,u.y1,u.x1,u.y1);return _[c+1]=Us(f+y*(l>0?m:x)),_[c+2]=Us(f+y*(l>0?x:m)),_},e.prototype.getValue=function(t){var e=this.options,o=this.logMin,i=this.logMax,r=e.majorUnit,n=this.lineInfo(),s=n.axis,a=n.axisDir,p=n.lineStart,h=n.lineSize,c=(i-o)/h,l=a*(t[s]-p);if(l<0||l>h)return null;var u=o+l*c;return Ur(Math.pow(r,u),10)},e.prototype.range=function(){var t=this.options;return{min:t.min,max:t.max}},e.prototype.translateRange=function(t){var e=this.options,o=this.logMin,i=this.logMax,r=e.reverse,n=e.vertical,s=e.majorUnit,a=this.lineBox(),p=n?a.height():a.width(),h=Ur(t/(p/(i-o)),10);return!n&&!r||n&&r||(h=-h),{min:Math.pow(s,o+h),max:Math.pow(s,i+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,o=e.majorTicks,i=e.minorTicks,r=e.vertical,n=e.labels.mirror,s=this.lineBox(),a={vertical:r};function p(e,o){a.tickX=n?s.x2:s.x2-o.size,a.tickY=n?s.y1-o.size:s.y1,a.position=e,t.append(ss(a,o))}return o.visible&&this.traverseMajorTicksPositions(p,o),i.visible&&this.traverseMinorTicksPositions(p,i),[]},e.prototype.createGridLines=function(t){var e=this.options,o=e.minorGridLines,i=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 h(t,e){wr(t,a)||(s.position=t,p.append(as(s,e)),a.push(t))}return i.visible&&this.traverseMajorTicksPositions(h,i),o.visible&&this.traverseMinorTicksPositions(h,o),p.children},e.prototype.traverseMajorTicksPositions=function(t,e){for(var o=this.lineInfo(),i=o.lineStart,r=o.step,n=this.logMin,s=this.logMax,a=Math.ceil(n)+e.skip;a<=s;a+=e.step){t(Ur(i+r*(a-n),10),e)}},e.prototype.traverseMinorTicksPositions=function(t,e){for(var o=this.options,i=o.min,r=o.max,n=o.minorUnit,s=o.majorUnit,a=this.lineInfo(),p=a.lineStart,h=a.step,c=this.logMin,l=this.logMax,u=Math.floor(c);u<l;u++)for(var d=this._minorIntervalOptions(u),f=e.skip;f<n;f+=e.step){var y=d.value+f*d.minorStep;if(y>r)break;if(y>=i)t(Ur(p+h*($s(y,s)-c),10),e)}},e.prototype.createAxisLabel=function(t,e,o){var i=Math.ceil(this.logMin+t),r=Math.pow(this.options.majorUnit,i),n=this.axisLabelText(r,e,o);return new Un(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 o=this.getValue(t),i=this.getValue(e);return{min:Math.min(o,i),max:Math.max(o,i)}},e.prototype.scaleRange=function(t,e){var o=this.options.majorUnit,i=$s(this.options.min,o),r=$s(this.options.max,o),n=Math.abs(this.pointOffset(e)),s=r-i,a=this.scaleToDelta(t,s),p=Math.pow(o,i+n*a),h=Math.pow(o,r-(1-n)*a);return h-p<1e-6&&(h=p+1e-6),{min:p,max:h}},e.prototype.zoomRange=function(t,e){var o=this.scaleRange(t,e),i=this.totalMin,r=this.totalMax;return{min:Hr(o.min,i,r),max:Hr(o.max,i,r)}},e.prototype._minorIntervalOptions=function(t){var e=this.options,o=e.minorUnit,i=e.majorUnit,r=Math.pow(i,t);return{value:r,minorStep:(Math.pow(i,t+1)-r)/o}},e.prototype.lineInfo=function(){var e=t.prototype.lineInfo.call(this);return e.step=e.axisDir*(e.lineSize/(this.logMax-this.logMin)),e},e}(hs);function Ks(){throw new Error("Non positive values cannot be used for a logarithmic axis")}function $s(t,e){return Math.log(t)/Math.log(e)}Yr(Qs,{type:"log",majorUnit:10,minorUnit:1,axisCrossingValue:1,vertical:!0,majorGridLines:{visible:!0,width:1,color:l},zIndex:1,_deferLabels:!0});var Js=Qs,ta={createGridLines:function(t){var e,o,i=this.options,r=Math.abs(this.box.center().y-t.lineBox().y1),n=[],s=!1;return i.majorGridLines.visible&&(e=this.majorGridLineAngles(t),s=!0,n=this.renderMajorGridLines(e,r,i.majorGridLines)),i.minorGridLines.visible&&(o=this.minorGridLineAngles(t,s),Or(n,this.renderMinorGridLines(o,r,i.minorGridLines,t,s))),n},renderMajorGridLines:function(t,e,o){return this.renderGridLines(t,e,o)},renderMinorGridLines:function(t,e,o,i,r){var n=this.radiusCallback&&this.radiusCallback(e,i,r);return this.renderGridLines(t,e,o,n)},renderGridLines:function(t,e,o,i){for(var r={stroke:{width:o.width,color:o.color,dashType:o.dashType}},n=this.box.center(),s=new p.Circle([n.x,n.y],e),h=this.gridLinesVisual(),c=0;c<t.length;c++){var l=new a.Path(r);i&&(s.radius=i(t[c])),l.moveTo(s.center).lineTo(s.pointAt(t[c]+180)),h.append(l)}return h.children},gridLineAngles:function(t,e,o,i,r){var n=this,s=this.intervals(e,o,i,r),a=t.options,p=a.visible&&!1!==(a.line||{}).visible;return Ar(s,(function(t){var e=n.intervalAngle(t);if(!p||90!==e)return e}))}},ea=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,o=e.skip||0,i=e.step||1,r=new gn,n=0;n<t.length;n++){t[n].reflow(r);var s=t[n].box;t[n].reflow(this.getSlot(o+n*i).adjacentBox(0,s.width(),s.height()))}},e.prototype.intervals=function(t,e,o,i){void 0===i&&(i=!1);for(var r=this.options,n=r.categories.length/t||1,s=360/n,a=o||1,p=[],h=0,c=e||0;c<n;c+=a)h=r.reverse?360-c*s:c*s,h=Ur(h,3)%360,i&&wr(h,i)||p.push(h);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 Ar(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 o=this.options,i=o.minorGridLines,r=o.majorGridLines,n=e?this.intervals(1,r.skip,r.step):null;return this.gridLineAngles(t,.5,i.skip,i.step,n)},e.prototype.radiusCallback=function(t,e,o){if(e.options.type!==c){var i=Nr(360/(2*this.options.categories.length)),r=Math.cos(i)*t,n=this.majorAngles(),s=function(e){return!o&&wr(e,n)?t:r};return s}},e.prototype.createPlotBands=function(){for(var t=this.options.plotBands||[],e=this._plotbandGroup=new a.Group({zIndex:-1}),o=0;o<t.length;o++){var i=t[o],r=this.plotBandSlot(i),n=this.getSlot(i.from),s=i.from-Math.floor(i.from);r.startAngle+=s*n.angle;var p=Math.ceil(i.to)-i.to;r.angle-=(p+s)*n.angle;var h=bn.current.createRing(r,{fill:{color:i.color,opacity:i.opacity},stroke:{opacity:i.opacity}});e.append(h)}this.appendVisual(e)},e.prototype.plotBandSlot=function(t){return this.getSlot(t.from,t.to-1)},e.prototype.getSlot=function(t,e){var o=this.options,i=o.justified,r=this.box,n=this.majorAngles(),s=n.length,a=360/s,p=t;o.reverse&&!i&&(p=(p+1)%s);var h=n[p=Hr(Math.floor(p),0,s-1)];i&&(h-=a/2)<0&&(h+=360);var c=a*(Hr(Math.ceil(e||p),p,s-1)-p+1);return new mn(r.center(),0,r.height()/2,h,c)},e.prototype.slot=function(t,e){var o=this.getSlot(t,e),i=o.startAngle+180,r=i+o.angle;return new p.Arc([o.center.x,o.center.y],{startAngle:i,endAngle:r,radiusX:o.radius,radiusY:o.radius})},e.prototype.pointCategoryIndex=function(t){for(var e=this.options.categories.length,o=null,i=0;i<e;i++){if(this.getSlot(i).containsPoint(t)){o=i;break}}return o},e}(Bs);Yr(ea,{startAngle:90,labels:{margin:cr(10)},majorGridLines:{visible:!0},justified:!0}),rr(ea.prototype,ta);var oa=ea,ia=function(t){function e(e,o){t.call(this,e,o);var i=this.options;i.minorUnit=i.minorUnit||i.majorUnit/2}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDivisions=function(t){return Xs.prototype.getDivisions.call(this,t)-1},e.prototype.reflow=function(t){this.box=t,this.reflowLabels()},e.prototype.reflowLabels=function(){for(var t=this.options,e=this.labels,o=this.options.labels,i=o.skip||0,r=o.step||1,n=new gn,s=this.intervals(t.majorUnit,i,r),a=0;a<e.length;a++){e[a].reflow(n);var p=e[a].box;e[a].reflow(this.getSlot(s[a]).adjacentBox(0,p.width(),p.height()))}},e.prototype.lineBox=function(){return this.box},e.prototype.intervals=function(t,e,o,i){void 0===i&&(i=!1);for(var r=this.options.min,n=this.getDivisions(t),s=[],a=o||1,p=e||0;p<n;p+=a){var h=(360+r+p*t)%360;i&&wr(h,i)||s.push(h)}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 o=this.options,i=o.minorGridLines,r=o.majorGridLines,n=e?this.intervals(o.majorUnit,r.skip,r.step):null;return this.gridLineAngles(t,o.minorUnit,i.skip,i.step,n)},e.prototype.plotBandSlot=function(t){return this.getSlot(t.from,t.to)},e.prototype.getSlot=function(t,e){var o=this.options,i=this.box,r=o.startAngle,n=Hr(t,o.min,o.max),s=Hr(e||n,n,o.max);if(o.reverse&&(n*=-1,s*=-1),(s=(540-s-r)%360)<(n=(540-n-r)%360)){var a=n;n=s,s=a}return new mn(i.center(),0,i.height()/2,n,s-n)},e.prototype.slot=function(t,e){void 0===e&&(e=t);var o,i,r=this.options,n=360-r.startAngle,s=this.getSlot(t,e),a=Math.min(t,e),h=Math.max(t,e);return r.reverse?(o=a,i=h):(o=360-h,i=360-a),o=(o+n)%360,i=(i+n)%360,new p.Arc([s.center.x,s.center.y],{startAngle:o,endAngle:i,radiusX:s.radius,radiusY:s.radius})},e.prototype.getValue=function(t){var e=this.options,o=this.box.center(),i=t.x-o.x,r=t.y-o.y,n=Math.round(Er(Math.atan2(r,i))),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}(hs);Yr(ia,{type:"polar",startAngle:0,reverse:!1,majorUnit:60,min:0,max:360,labels:{margin:cr(10)},majorGridLines:{color:l,visible:!0,width:1},minorGridLines:{color:"#aaa"}}),rr(ia.prototype,ta,{createPlotBands:oa.prototype.createPlotBands,majorAngles:oa.prototype.majorAngles,range:Xs.prototype.range,labelsCount:Xs.prototype.labelsCount,createAxisLabel:Xs.prototype.createAxisLabel});var ra=ia;function na(t,e){return 180-Math.abs(Math.abs(t-e)-180)}var sa={options:{majorGridLines:{visible:!0}},createPlotBands:function(){var t=this.options,e=t.majorGridLines.type,o=t.plotBands;void 0===o&&(o=[]);for(var i=this.plotArea.polarAxis,r=i.majorAngles(),n=i.box.center(),s=this._plotbandGroup=new a.Group({zIndex:-1}),p=0;p<o.length;p++){var h=o[p],l={fill:{color:h.color,opacity:h.opacity},stroke:{opacity:h.opacity}},u=this.getSlot(h.from,h.to,!0),d=new mn(n,n.y-u.y2,n.y-u.y1,0,360),f=void 0;f=e===c?bn.current.createRing(d,l):a.Path.fromPoints(this.plotBandPoints(d,r),l).close(),s.append(f)}this.appendVisual(s)},plotBandPoints:function(t,e){for(var o=[],i=[],r=[t.center.x,t.center.y],n=new p.Circle(r,t.innerRadius),s=new p.Circle(r,t.radius),a=0;a<e.length;a++)o.push(n.pointAt(e[a]+180)),i.push(s.pointAt(e[a]+180));return o.reverse(),o.push(o[0]),i.push(i[0]),i.concat(o)},createGridLines:function(t){var e=this.options,o=this.radarMajorGridLinePositions(),i=t.majorAngles(),r=t.box.center(),n=[];if(e.majorGridLines.visible&&(n=this.renderGridLines(r,o,i,e.majorGridLines)),e.minorGridLines.visible){var s=this.radarMinorGridLinePositions();Or(n,this.renderGridLines(r,s,i,e.minorGridLines))}return n},renderGridLines:function(t,e,o,i){var r={stroke:{width:i.width,color:i.color,dashType:i.dashType}},n=i.skip;void 0===n&&(n=0);var s=i.step;void 0===s&&(s=0);for(var h=this.gridLinesVisual(),l=n;l<e.length;l+=s){var u=t.y-e[l];if(u>0){var d=new p.Circle([t.x,t.y],u);if(i.type===c)h.append(new a.Circle(d,r));else{for(var f=new a.Path(r),y=0;y<o.length;y++)f.lineTo(d.pointAt(o[y]+180));f.close(),h.append(f)}}}return h.children},getValue:function(t){var e=this.lineBox(),o=this.plotArea.polarAxis,i=o.majorAngles(),r=o.box.center(),n=t.distanceTo(r),s=n;if(this.options.majorGridLines.type!==c&&i.length>1){var a=t.x-r.x,p=t.y-r.y,h=(Er(Math.atan2(p,a))+540)%360;i.sort((function(t,e){return na(t,h)-na(e,h)}));var l=90-na(i[0],i[1])/2,u=180-na(h,i[0])-l;s=n*(Math.sin(Nr(u))/Math.sin(Nr(l)))}return this.axisType().prototype.getValue.call(this,new fn(e.x1,e.y2-s))}},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.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}(Xs);rr(aa.prototype,sa);var pa=aa,ha=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}(Js);rr(ha.prototype,sa);var ca=ha;function la(t){return t<=0?-1:1}var ua=function(t){function e(e){t.call(this),this.closed=e}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.process=function(t){var e=t.slice(0),o=[],i=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 o;var n,s,a=e[0],h=e[1],c=e[2];for(o.push(new p.Segment(a));a.equals(e[r-1]);)i=!0,e.pop(),r--;if(2===r){var l=this.tangent(a,h,k,S);return Vr(o).controlOut(this.firstControlPoint(l,a,h,k,S)),o.push(new p.Segment(h,this.secondControlPoint(l,a,h,k,S))),o}if(i){a=e[r-1],h=e[0],c=e[1];var u=this.controlPoints(a,h,c);n=u[1],s=u[0]}else{var d=this.tangent(a,h,k,S);n=this.firstControlPoint(d,a,h,k,S)}for(var f=n,y=0;y<=r-3;y++)if(this.removeDuplicates(y,e),y+3<=(r=e.length)){a=e[y],h=e[y+1],c=e[y+2];var g=this.controlPoints(a,h,c);Vr(o).controlOut(f),f=g[1];var v=g[0];o.push(new p.Segment(h,v))}if(i){a=e[r-2],h=e[r-1],c=e[0];var m=this.controlPoints(a,h,c);Vr(o).controlOut(f),o.push(new p.Segment(h,m[0])),Vr(o).controlOut(m[1]),o.push(new p.Segment(c,s))}else{var x=this.tangent(h,c,k,S);Vr(o).controlOut(f),o.push(new p.Segment(c,this.secondControlPoint(x,h,c,k,S)))}return o},e.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)},e.prototype.invertAxis=function(t,e,o){var i=!1;if(t.x===e.x)i=!0;else if(e.x===o.x)(e.y<o.y&&t.y<=e.y||o.y<e.y&&e.y<=t.y)&&(i=!0);else{var r=this.lineFunction(t,e),n=this.calculateFunction(r,o.x);t.y<=e.y&&o.y<=n||e.y<=t.y&&o.y>=n||(i=!0)}return i},e.prototype.isLine=function(t,e,o){var i=this.lineFunction(t,e),r=this.calculateFunction(i,o.x);return t.x===e.x&&e.x===o.x||Ur(r,1)===Ur(o.y,1)},e.prototype.lineFunction=function(t,e){var o=(e.y-t.y)/(e.x-t.x);return[t.y-o*t.x,o]},e.prototype.controlPoints=function(t,e,o){var i,r=k,n=S,s=!1,a=!1;if(this.isLine(t,e,o))i=this.tangent(t,e,k,S);else{var p={x:this.isMonotonicByField(t,e,o,k),y:this.isMonotonicByField(t,e,o,S)};if(p.x&&p.y)i=this.tangent(t,o,k,S),s=!0;else if(this.invertAxis(t,e,o)&&(r=S,n=k),p[r])i=0;else i=.01*(o[n]<t[n]&&t[n]<=e[n]||t[n]<o[n]&&e[n]<=t[n]?la((o[n]-t[n])*(e[r]-t[r])):-la((o[r]-t[r])*(e[n]-t[n]))),a=!0}var h=this.secondControlPoint(i,t,e,r,n);if(a){var c=r;r=n,n=c}var l=this.firstControlPoint(i,e,o,r,n);return s&&(this.restrictControlPoint(t,e,h,i),this.restrictControlPoint(e,o,l,i)),[h,l]},e.prototype.restrictControlPoint=function(t,e,o,i){t.y<e.y?e.y<o.y?(o.x=t.x+(e.y-t.y)/i,o.y=e.y):o.y<t.y&&(o.x=e.x-(e.y-t.y)/i,o.y=t.y):o.y<e.y?(o.x=t.x-(t.y-e.y)/i,o.y=e.y):t.y<o.y&&(o.x=e.x+(t.y-e.y)/i,o.y=t.y)},e.prototype.tangent=function(t,e,o,i){var r,n=e[o]-t[o],s=e[i]-t[i];return r=0===n?0:s/n,r},e.prototype.isMonotonicByField=function(t,e,o,i){return o[i]>e[i]&&e[i]>t[i]||o[i]<e[i]&&e[i]<t[i]},e.prototype.firstControlPoint=function(t,e,o,i,r){var n=e[i],s=.333*(o[i]-n);return this.point(n+s,e[r]+s*t,i,r)},e.prototype.secondControlPoint=function(t,e,o,i,r){var n=e[i],s=o[i],a=.333*(s-n);return this.point(s-a,o[r]-a*t,i,r)},e.prototype.point=function(t,e,o,i){var r=new p.Point;return r[o]=t,r[i]=e,r},e.prototype.calculateFunction=function(t,e){for(var o=t.length,i=0,r=0;r<o;r++)i+=Math.pow(e,r)*t[r];return i},e}(O),da=function(t){function e(e){t.call(this),this._axis=e,this.options=e.options}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.value=function(t){var e=this._axis,o=e.getCategory?e.getCategory(t):e.getValue(t);return o},e.prototype.slot=function(t,e,o){return void 0===o&&(o=!0),this._axis.slot(t,e,o)},e.prototype.range=function(){return this._axis.range()},e.prototype.valueRange=function(){return this._axis.valueRange()},e}(O);function fa(t,e){for(var o=0;o<e.length;o++)if(e[o].options.name===t)return e[o].prepareUserOptions(),new da(e[o])}var ya=function(t){this.visual=t.visual,this.chartsVisual=t.chartContainer.visual,this._pane=t};ya.prototype.findAxisByName=function(t){return fa(t,this._pane.axes)};var ga=ya,va=function(t){function e(e){t.call(this),this._plotArea=e,this.visual=e.visual,this.backgroundVisual=e._bgVisual}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(O);function ma(t){for(var e=t.length,o=0,i=0;i<e;i++){Ji(t[i])&&o++}return o}var xa={min:function(t){for(var e=t.length,o=m,i=0;i<e;i++){var r=t[i];Ji(r)&&(o=Math.min(o,r))}return o===m?t[0]:o},max:function(t){for(var e=t.length,o=x,i=0;i<e;i++){var r=t[i];Ji(r)&&(o=Math.max(o,r))}return o===x?t[0]:o},sum:function(t){for(var e=t.length,o=0,i=0;i<e;i++){var r=t[i];Ji(r)&&(o+=r)}return o},sumOrNull:function(t){var e=null;return ma(t)&&(e=xa.sum(t)),e},count:function(t){for(var e=t.length,o=0,i=0;i<e;i++){var r=t[i];null!==r&&Rr(r)&&o++}return o},avg:function(t){var e=ma(t),o=t[0];return e>0&&(o=xa.sum(t)/e),o},first:function(t){for(var e=t.length,o=0;o<e;o++){var i=t[o];if(null!==i&&Rr(i))return i}return t[0]}},_a=xa;function ba(t,e){return null===e?e:vr(t)(e)}var wa=function(t){function e(){t.call(this),this._valueFields={},this._otherFields={},this._nullValue={},this._undefinedValue={}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.register=function(t,e,o){void 0===e&&(e=[w]),void 0===o&&(o={});for(var i=0;i<t.length;i++){var r=t[i];this._valueFields[r]=e,this._otherFields[r]=o,this._nullValue[r]=this._makeValue(e,null),this._undefinedValue[r]=this._makeValue(e,void 0)}},e.prototype.canonicalFields=function(t){return this.valueFields(t).concat(this.otherFields(t))},e.prototype.valueFields=function(t){return this._valueFields[t.type]||[w]},e.prototype.otherFields=function(t){return this._otherFields[t.type]||[w]},e.prototype.bindPoint=function(t,e,o){var i,r,n=t.data,s=Rr(o)?o:n[e],a={valueFields:{value:s}},p=this.valueFields(t),h=this._otherFields[t.type];if(null===s)r=this._nullValue[t.type];else if(Rr(s)){if(Array.isArray(s)){var c=s.slice(p.length);r=this._bindFromArray(s,p),i=this._bindFromArray(c,h)}else if("object"==typeof s){var l=this.sourceFields(t,p),u=this.sourceFields(t,h);r=this._bindFromObject(s,p,l),i=this._bindFromObject(s,h,u)}}else r=this._undefinedValue[t.type];return Rr(r)&&(1===p.length?a.valueFields.value=r[p[0]]:a.valueFields=r),a.fields=i||{},a},e.prototype._makeValue=function(t,e){for(var o={},i=t.length,r=0;r<i;r++){o[t[r]]=e}return o},e.prototype._bindFromArray=function(t,e){var o={};if(e)for(var i=Math.min(e.length,t.length),r=0;r<i;r++)o[e[r]]=t[r];return o},e.prototype._bindFromObject=function(t,e,o){void 0===o&&(o=e);var i={};if(e)for(var r=e.length,n=0;n<r;n++){var s=e[n],a=o[n];null!==a&&(i[s]=ba(a,t))}return i},e.prototype.sourceFields=function(t,e){var o=[];if(e)for(var i=e.length,r=0;r<i;r++){var n=e[r],s=n===w?"field":n+"Field";o.push(null!==t[s]?t[s]||n:null)}return o},e}(O);wa.current=new wa;var Ca=wa,ka=/percent(?:\w*)\((\d+)\)/,Sa=new RegExp("^stddev(?:\\((\\d+(?:\\.\\d+)?)\\))?$"),Aa=function(t){function e(e,o,i){t.call(this),this.initGlobalRanges(e,o,i)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initGlobalRanges=function(t,e,o){var i=e.data,r=Sa.exec(t);if(r){this.valueGetter=this.createValueGetter(e,o);var n=this.getAverage(i),s=this.getStandardDeviation(i,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,o);var h=this.getStandardError(i,this.getAverage(i));this.globalRange=function(t){return{low:t-h,high:t+h}}}},e.prototype.createValueGetter=function(t,e){var o,i=t.data,r=Ca.current,n=r.valueFields(t),s=Rr(i[0])?i[0]:{};if(A(s))o=vr("["+(e?n.indexOf(e):0)+"]");else if(Ji(s))o=vr();else if("object"==typeof s){o=vr(r.sourceFields(t,n)[n.indexOf(e)])}return o},e.prototype.getErrorRange=function(t,e){var o,i,r;if(!Rr(e))return null;if(this.globalRange)return this.globalRange(t);if(A(e))o=t-e[0],i=t+e[1];else if(Ji(r=parseFloat(e)))o=t-r,i=t+r;else{if(!(r=ka.exec(e)))throw new Error("Invalid ErrorBar value: "+e);var n=t*(parseFloat(r[1])/100);o=t-Math.abs(n),i=t+Math.abs(n)}return{low:o,high:i}},e.prototype.getStandardError=function(t,e){return this.getStandardDeviation(t,e,!0)/Math.sqrt(e.count)},e.prototype.getStandardDeviation=function(t,e,o){for(var i=t.length,r=o?e.count-1:e.count,n=0,s=0;s<i;s++){var a=this.valueGetter(t[s]);Ji(a)&&(n+=Math.pow(a-e.value,2))}return Math.sqrt(n/r)},e.prototype.getAverage=function(t){for(var e=t.length,o=0,i=0,r=0;r<e;r++){var n=this.valueGetter(t[r]);Ji(n)&&(o+=n,i++)}return{value:o/i,count:i}},e}(O),Pa=So.browser||{},Ta=Pa.msie?.001:0,Ma="zero",Oa="bar",Ba="column",Ra="line",Ea="pie",za="verticalLine",La=[Oa,Ba,"ohlc","candlestick","boxPlot","verticalBoxPlot","bullet","rangeColumn","rangeBar","waterfall","horizontalWaterfall"],Ia="DOMMouseScroll mousewheel",ja=function(t){function e(e,o,i,r,n,s){t.call(this,s),this.low=e,this.high=o,this.isVertical=i,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,o=this.options.endCaps,i=this.isVertical,r=this.getAxis().getSlot(this.low,this.high),n=t.center(),s=this.getCapsWidth(t,i),a=i?n.x:n.y,p=a-s,h=a+s;i?(e=[new fn(n.x,r.y1),new fn(n.x,r.y2)],o&&e.push(new fn(p,r.y1),new fn(h,r.y1),new fn(p,r.y2),new fn(h,r.y2)),this.box=new gn(p,r.y1,h,r.y2)):(e=[new fn(r.x1,n.y),new fn(r.x2,n.y)],o&&e.push(new fn(r.x1,p),new fn(r.x1,h),new fn(r.x2,p),new fn(r.x2,h)),this.box=new gn(r.x1,p,r.x2,h)),this.linePoints=e},e.prototype.getCapsWidth=function(t,e){var o=e?t.width():t.height();return Math.min(Math.floor(o/2),4)||4},e.prototype.createVisual=function(){var t=this,e=this.options,o=e.visual;o?this.visual=o({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,o=this.linePoints,i={stroke:{color:e.color,width:e.line.width,dashType:e.line.dashType}};t.prototype.createVisual.call(this);for(var r=0;r<o.length;r+=2){var n=new a.Path(i).moveTo(o[r].x,o[r].y).lineTo(o[r+1].x,o[r+1].y);Ki(n),this.visual.append(n)}},e}(Cn);Yr(ja,{animation:{type:"fadeIn",delay:600},endCaps:!0,line:{width:2},zIndex:1});var Da=ja,Va=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}(Da);function Ha(t,e,o,i){void 0===o&&(o={}),void 0===i&&(i=!1);var r=o.defaults=o.defaults||{},n=o.depth=o.depth||0,s=!1;if(o.excluded=o.excluded||[],n>5)return null;for(var a in t)if(!wr(a,o.excluded)&&t.hasOwnProperty(a)){var p=t[a];or(p)?(s=!0,i||(t[a]=Wr(p(e),r[a]))):nr(p)&&(i||(o.defaults=r[a]),o.depth++,s=Ha(p,e,o,i)||s,o.depth--)}return s}function Fa(t){for(var e=t.length,o=0,i=0;i<e;i++)o=Math.max(o,t[i].data.length);return o}var Na=function(t){function e(e,o){t.call(this,o),this.plotArea=e,this.chartService=e.chartService,this.categoryAxis=e.seriesCategoryAxis(o.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 o=this.seriesOptions[e];if(!o){var i=this.pointType().prototype.defaults;this.seriesOptions[e]=o=rr({},i,{vertical:!this.options.invertAxes},t)}return o},e.prototype.plotValue=function(t){if(!t)return 0;if(this.options.isStacked100&&Ji(t.value)){for(var e=t.categoryIx,o=this.categoryPoints[e],i=[],r=0,n=0;n<o.length;n++){var s=o[n];if(s){var a=t.series.stack,p=s.series.stack;if(a&&p&&a.group!==p.group)continue;Ji(s.value)&&(r+=Math.abs(s.value),i.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 o=this.categoryPoints[t.categoryIx];if(this.options.isStacked){for(var i=this.plotValue(t),r=i>=0,n=e,s=!1,a=0;a<o.length;a++){var p=o[a];if(t===p)break;var h=t.series.stack,c=p.series.stack;if(h&&c){if("string"==typeof h&&h!==c)continue;if(h.group&&h.group!==c.group)continue}var l=this.plotValue(p);(l>=0&&r||l<0&&!r)&&(n+=l,i+=l,s=!0,this.options.isStacked100&&(i=Math.min(i,1)))}return s&&(n-=e),[n,i]}var u=t.series,d=this.seriesValueAxis(u),f=this.categoryAxisCrossingValue(d);return[f,er(t.value)?t.value:f]},e.prototype.stackLimits=function(t,e){for(var o=m,i=x,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];Rr(p)&&isFinite(p)&&(i=Math.max(i,p),o=Math.min(o,p))}}}return{min:o,max:i}},e.prototype.updateStackRange=function(){var t=this.options,e=t.isStacked,o=t.series,i={};if(e)for(var r=0;r<o.length;r++){var n=o[r],s=n.axis,a=s+n.stack,p=i[a];if(!p){p=this.stackLimits(s,n.stack);var h=this.errorTotals;h&&(h.negative.length&&(p.min=Math.min(p.min,Zr(h.negative).min)),h.positive.length&&(p.max=Math.max(p.max,Zr(h.positive).max))),p.min!==m||p.max!==x?i[a]=p:p=null}p&&(this.valueAxisRanges[s]=p)}},e.prototype.addErrorBar=function(t,e,o){var i,r=t.value,n=t.series,s=t.seriesIx,a=t.options.errorBars,p=e.fields.errorLow,h=e.fields.errorHigh;Ji(p)&&Ji(h)?i={low:p,high:h}:a&&Rr(a.value)&&(this.seriesErrorRanges=this.seriesErrorRanges||[],this.seriesErrorRanges[s]=this.seriesErrorRanges[s]||new Aa(a.value,n,w),i=this.seriesErrorRanges[s].getErrorRange(r,a.value)),i&&(t.low=i.low,t.high=i.high,this.addPointErrorBar(t,o))},e.prototype.addPointErrorBar=function(t,e){var o=!this.options.invertAxes,i=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 h=new Va(n,s,o,this,r,i);t.errorBars=[h],t.append(h)},e.prototype.stackedErrorRange=function(t,e){var o=this.plotRange(t,0)[1]-t.value,i=t.low+o,r=t.high+o;return this.errorTotals=this.errorTotals||{positive:[],negative:[]},i<0&&(this.errorTotals.negative[e]=Math.min(this.errorTotals.negative[e]||0,i)),r>0&&(this.errorTotals.positive[e]=Math.max(this.errorTotals.positive[e]||0,r)),{low:i,high:r}},e.prototype.addValue=function(t,e){var o=e.categoryIx,i=e.series,r=e.seriesIx,n=this.categoryPoints[o];n||(this.categoryPoints[o]=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,Rr(a.dataItem)||(a.dataItem=i.data[o]),this.addErrorBar(a,t,o)),this.points.push(a),s.push(a),n.push(a),this.updateRange(t.valueFields,e)},e.prototype.evalPointOptions=function(t,e,o,i,r,n){var s={defaults:r._defaults,excluded:["data","aggregate","_events","tooltip","content","template","visual","toggle","_outOfRangeMinPoint","_outOfRangeMaxPoint"]},a=this._evalSeries[n];Rr(a)||(this._evalSeries[n]=a=Ha(t,{},s,!0));var p=t;return a&&Ha(p=rr({},p),{value:e,category:o,index:i,series:r,dataItem:r.data[i]},s),p},e.prototype.updateRange=function(t,e){var o=e.series.axis,i=t.value,r=this.valueAxisRanges[o];isFinite(i)&&null!==i&&((r=this.valueAxisRanges[o]=r||{min:m,max:x}).min=Math.min(r.min,i),r.max=Math.max(r.max,i))},e.prototype.seriesValueAxis=function(t){var e=this.plotArea,o=t.axis,i=o?e.namedValueAxes[o]:e.valueAxis;if(!i)throw new Error("Unable to locate value axis with name "+o);return i},e.prototype.reflow=function(t){var e=this,o=this.categorySlots=[],i=this.points,r=this.categoryAxis,n=0;this.traverseDataPoints((function(t,s){var a=s.categoryIx,p=s.series,h=e.seriesValueAxis(p),c=i[n++],l=o[a];if(l||(o[a]=l=e.categorySlot(r,a,h)),c){var u=e.plotRange(c,h.startValue()),d=e.valueSlot(h,u);if(d){var f=e.pointSlot(l,d);c.aboveAxis=e.aboveAxis(c,h),c.stackValue=u[1],e.options.isStacked100&&(c.percentage=e.plotValue(c)),e.reflowPoint(c,f)}else c.visible=!1}})),this.reflowCategories(o),!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(Vr(t)),o=0;o<e.length;o++)e[o]&&this.limitPoint(e[o])},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 o=this.categoryAxisCrossingValue(e),i=t.value;return e.options.reverse?i<o:i>=o},e.prototype.categoryAxisCrossingValue=function(t){var e=this.categoryAxis,o=t.options;return[].concat(o.axisCrossingValues||o.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 o=this.options.invertAxes,i=o?e:t,r=o?t:e;return new gn(i.x1,r.y1,i.x2,r.y2)},e.prototype.categorySlot=function(t,e){return t.getSlot(e)},e.prototype.traverseDataPoints=function(t){for(var e=this.options.series,o=Fa(e),i=e.length,r=0;r<i;r++)this._outOfRangeCallback(e[r],"_outOfRangeMinPoint",r,t);for(var n=0;n<o;n++)for(var s=0;s<i;s++){var a=e[s],p=this.categoryAxis.categoryAt(n);t(this._bindPoint(a,s,n),{category:p,categoryIx:n,categoriesCount:o,series:a,seriesIx:s})}for(var h=0;h<i;h++)this._outOfRangeCallback(e[h],"_outOfRangeMaxPoint",h,t)},e.prototype._outOfRangeCallback=function(t,e,o,i){var r=t[e];if(r){var n=r.categoryIx;i(this._bindPoint(t,o,n,r.item),{category:r.category,categoryIx:n,series:t,seriesIx:o,dataItem:r.item})}},e.prototype._bindPoint=function(t,e,o,i){this._bindCache||(this._bindCache=[]);var r=this._bindCache[e];r||(r=this._bindCache[e]=[]);var n=r[o];return n||(n=r[o]=Ca.current.bindPoint(t,o,i)),n},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}(Cn);Yr(Na,{series:[],invertAxes:!1,isStacked:!1,clip:!0,limitPoints:!0});var Ua=Na,Ga={click:function(t,e){return t.trigger("seriesClick",this.eventArgs(e))},hover:function(t,e){return t.trigger("seriesHover",this.eventArgs(e))},over:function(t,e){return t.trigger("seriesOver",this.eventArgs(e))},out:function(t,e){return t.trigger("seriesLeave",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:jr(t),originalEvent:t,point:this}}},Wa={createNote:function(){var t=this.options.notes,e=this.noteText||t.label.text;!1!==t.visible&&Rr(e)&&null!==e&&(this.note=new Wn({value:this.value,text:e,dataItem:this.dataItem,category:this.category,series:this.series},this.options.notes,this.owner.chartService),this.append(this.note))}},qa=function(t){function e(e,o){t.call(this),this.value=e,this.options=o,this.aboveAxis=Wr(this.options.aboveAxis,!0),this.tooltipTracking=!0}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.render=function(){var t=this.options,e=t.markers,o=t.labels;if(!this._rendered){if(this._rendered=!0,e.visible&&e.size&&(this.marker=this.createMarker(),this.append(this.marker)),o.visible){var i=fr(o),r=this.pointData(),n=this.value;i?n=i(r):o.format&&(n=this.formatValue(o.format)),this.label=new Vn(n,rr({align:d,vAlign:d,margin:{left:5,right:5},zIndex:Wr(o.zIndex,this.series.zIndex)},o),r),this.append(this.label)}this.createNote(),this.errorBar&&this.append(this.errorBar)}},e.prototype.markerBorder=function(){var t=this.options.markers,e=t.background,o=rr({color:this.color},t.border);return Rr(o.color)||(o.color=new on(e).brightness(.8).toHex()),o},e.prototype.createVisual=function(){},e.prototype.createMarker=function(){var t=this.options.markers;return new Pn({type:t.type,width:t.size,height:t.size,rotation:t.rotation,background:t.background,border:this.markerBorder(),opacity:this.series.opacity||t.opacity,zIndex:Wr(t.zIndex,this.series.zIndex),animation:t.animation,visual:t.visual},{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,o=this.aboveAxis,i=e.vertical;this.render(),this.box=t;var r=t.clone();if(i?o?r.y1-=r.height():r.y2+=r.height():o?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 gn(a.x,a.y,a.x,a.y)}this.note.reflow(s)}},e.prototype.reflowLabel=function(t){var e=this.options,o=this.label,i=e.labels.position;o&&(i="below"===(i="above"===i?b:i)?u:i,o.reflow(t),o.box.alignTo(this.markerBox(),i),o.reflow(o.box))},e.prototype.createHighlight=function(){var t=this.options.highlight.markers,e=this.markerBorder().color,o=this.options.markers,i=o.size+(o.border.width||0)+(t.border.width||0),r=new Pn({type:o.type,width:i,height:i,rotation:o.rotation,background:t.color||e,border:{color:t.border.color,width:t.border.width,opacity:Wr(t.border.opacity,1)},opacity:Wr(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,o=this.marker;if(o)e=o.paddingBox.toRect(),t=o.visual;else{var i=this.options.markers.size,r=i/2,n=this.box.center();e=new p.Rect([n.x-r,n.y-r],[i,i])}return{options:this.options,rect:e,visual:t}},e.prototype.tooltipAnchor=function(){var t=this.markerBox(),e=this.owner.pane.clipBox();if(!e||e.overlaps(t)){var o,i,r=t.x2+5;return this.aboveAxis?(o=t.y1,i=u):(o=t.y2,i=b),{point:new fn(r,o),align:{horizontal:"left",vertical:i}}}},e.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},e.prototype.overlapsBox=function(t){return this.markerBox().overlaps(t)},e.prototype.unclipElements=function(){this.label&&(this.label.options.noclip=!0),this.note&&(this.note.options.noclip=!0)},e.prototype.pointData=function(){return{dataItem:this.dataItem,category:this.category,value:this.value,percentage:this.percentage,stackValue:this.stackValue,series:this.series}},e}(Cn);qa.prototype.defaults={vertical:!0,markers:{visible:!0,background:C,size:8,type:f,border:{width:2},opacity:1},labels:{visible:!1,position:"above",margin:cr(3),padding:cr(4),animation:{type:"fadeIn",delay:600}},notes:{label:{}},highlight:{markers:{border:{color:"#fff",width:2}},zIndex:100},errorBars:{line:{width:1}}},rr(qa.prototype,Ga),rr(qa.prototype,Wa);var Xa=qa,Ya=function(t){function e(e,o,i){t.call(this),this.linePoints=e,this.series=o,this.seriesIx=i}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=[],o=0,i=t.length;o<i;o++)t[o]&&!1!==t[o].visible&&e.push(t[o]._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&&!Rr(this.visual.options.zIndex)&&(this.visual.options.zIndex=this.series.zIndex)):this.segmentVisual()},e.prototype.segmentVisual=function(){var t=this.options,e=this.series,o=e.color,i=e._defaults;or(o)&&i&&(o=i.color);var r=a.Path.fromPoints(this.points(),{stroke:{color:o,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}(Cn);Yr(Ya,{closed:!1});var Za=Ya;function Qa(t,e,o,i,r){var n=t.box,s=new p.Point;return s[e]=n[e+o],s[i]=n[i+r],s}var Ka={calculateStepPoints:function(t){for(var e=this.parent.plotArea.seriesCategoryAxis(this.series).options,o=e.justified,i=e.vertical,r=e.reverse,n=i?k:S,s=i?S:k,a=r?2:1,h=a,c=Qa(t[0],n,a,s,h),l=[c],u=1;u<t.length;u++){var d=Qa(t[u],n,a,s,h);if(c[n]!==d[n]){var f=new p.Point;f[n]=c[n],f[s]=d[s],l.push(f,d)}c=d}return o?c!==Vr(l)&&l.push(c):l.push(Qa(Vr(t),n,a,s,r?1:2)),l}},$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.points=function(){return this.calculateStepPoints(this.linePoints)},e}(Za);rr($a.prototype,Ka);var Ja=$a,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.segmentVisual=function(){var t=this.series,e=t._defaults,o=t.color;or(o)&&e&&(o=e.color);var i=new ua(this.options.closed).process(this.points()),r=new a.Path({stroke:{color:o,width:t.width,opacity:t.opacity,dashType:t.dashType},zIndex:t.zIndex});r.segments.push.apply(r.segments,i),this.visual=r},e}(Za),ep={renderSegments:function(){var t,e=this.options,o=this.seriesPoints,i=e.series,r=o.length;this._segments=[];for(var n=0;n<r;n++){for(var s=i[n],a=this.sortPoints(o[n]),p=a.length,h=[],c=0;c<p;c++){var l=a[c];l?h.push(l):"interpolate"!==this.seriesMissingValues(s)&&(h.length>1&&(t=this.createSegment(h,s,n,t),this._addSegment(t)),h=[])}h.length>1&&(t=this.createSegment(h,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?Ma:e||"interpolate"},getNearestPoint:function(t,e,o){for(var i,r=new fn(t,e),n=this.seriesPoints[o],s=m,a=0;a<n.length;a++){var p=n[a];if(p&&Rr(p.value)&&null!==p.value&&!1!==p.visible){var h=p.box.center().distanceTo(r);h<s&&(i=p,s=h)}}return i}},op=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(Cr(e.x1,e.x2,t))},e.prototype._setEnd=function(t){var e=this.element,o=e.segments,i=o[1].anchor(),r=o[2].anchor();e.suspend(),i.setX(t),e.resume(),r.setX(t)},e}(a.Animation);Yr(op,{duration:600}),a.AnimationFactory.current.register("clip",op);var ip=op;function rp(t){for(var e=0;e<t.length;e++)if(Rr(t[e].zIndex))return!0}var np={createAnimation:function(){var t=this.getRoot();if(t&&!1!==(t.options||{}).transitions){var e=t.size(),o=a.Path.fromRect(e.toRect());this.visual.clip(o),this.animation=new ip(o,{box:e}),rp(this.options.series)&&this._setChildrenAnimation(o)}},_setChildrenAnimation:function(t){for(var e=this.animationPoints(),o=0;o<e.length;o++){var i=e[o];i&&i.visual&&Rr(i.visual.options.zIndex)&&i.visual.clip(t)}}},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.render=function(){t.prototype.render.call(this),this.updateStackRange(),this.renderSegments()},e.prototype.pointType=function(){return Xa},e.prototype.createPoint=function(t,e){var o=e.categoryIx,i=e.category,r=e.series,n=e.seriesIx,s=this.seriesMissingValues(r),a=t.valueFields.value;if(!Rr(a)||null===a){if(s!==Ma)return null;a=0}var p=this.pointOptions(r,n);p=this.evalPointOptions(p,a,i,o,r,n);var h=t.fields.color||r.color;or(r.color)&&(h=p.color);var c=new Xa(a,p);return c.color=h,this.append(c),c},e.prototype.plotRange=function(t){var e=this.plotValue(t);if(this.options.isStacked)for(var o=t.categoryIx,i=this.categoryPoints[o],r=0;r<i.length;r++){var n=i[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,o){var i=e.style;return new("step"===i?Ja:"smooth"===i?tp:Za)(t,e,o)},e.prototype.animationPoints=function(){for(var t=this.points,e=[],o=0;o<t.length;o++)e.push((t[o]||{}).marker);return e.concat(this._segments)},e.prototype.supportsPointInactiveOpacity=function(){return!1},e}(Ua);rr(sp.prototype,ep,np);var ap=sp,pp=function(t){function e(e,o,i,r,n){t.call(this,e,o,i),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,o=t.line||{},i=t.color;or(i)&&e&&(i=e.color),this.visual=new a.Group({zIndex:t.zIndex}),this.createFill({fill:{color:i,opacity:t.opacity},stroke:null}),o.width>0&&!1!==o.visible&&this.createStroke({stroke:rr({color:i,opacity:t.opacity,lineCap:"butt"},o)})},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 p.Segment(t)}))},e.prototype.createStroke=function(t){var e=new a.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(),o=e.slice(0),i=this.hasStackSegment();if(i){var r=this.stackSegments();Or(o,r)}var n=new a.Path(t);n.segments.push.apply(n.segments,o),!i&&e.length>1&&this.fillToAxes(n),this.visual.append(n)},e.prototype.fillToAxes=function(t){var e=this.parent,o=e.options.invertAxes,i=e.seriesValueAxis(this.series),r=e.categoryAxisCrossingValue(i),n=i.getSlot(r,r,!0),s=this.strokeSegments(),a=s[0].anchor(),p=Vr(s).anchor(),h=o?n.x1:n.y1;o?t.lineTo(h,p.y).lineTo(h,a.y):t.lineTo(p.x,h).lineTo(a.x,h)},e}(Za),hp=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}(pp);rr(hp.prototype,Ka);var cp=hp,lp=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 ua(this.options.closed),e=this.points();return t.process(e)},e.prototype.createStackSegments=function(){for(var t=this.strokeSegments(),e=[],o=t.length-1;o>=0;o--){var i=t[o];e.push(new p.Segment(i.anchor(),i.controlOut(),i.controlIn()))}return e},e}(pp),up=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,o,i){var r,n,s=this.options.isStacked,a=(e.line||{}).style;s&&o>0&&i&&("gap"!==this.seriesMissingValues(e)?(n=i.linePoints,r=i):n=this._gapStackPoints(t,o,a));return new("step"===a?cp:"smooth"===a?lp:pp)(t,e,o,r,n)},e.prototype.reflow=function(e){t.prototype.reflow.call(this,e);var o=this._stackPoints;if(o)for(var i=0;i<o.length;i++){var r=o[i],n=this.categoryAxis.getSlot(r.categoryIx);r.reflow(n)}},e.prototype._gapStackPoints=function(t,e,o){var i=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 h=r;h<s;h++){var c=h+a,l=e,u=void 0;do{u=i[--l][c]}while(l>0&&!u);if(u)"step"!==o&&h>r&&!i[l][c-1]&&p.push(this._previousSegmentPoint(h,c,c-1,l)),p.push(u),"step"!==o&&h+1<s&&!i[l][c+1]&&p.push(this._previousSegmentPoint(h,c,c+1,l));else{var d=this._createGapStackPoint(h);this._stackPoints.push(d),p.push(d)}}return p},e.prototype._previousSegmentPoint=function(t,e,o,i){for(var r,n=this.seriesPoints,s=i;s>0&&!r;)r=n[--s][o];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),o=new Xa(0,e);return o.categoryIx=t,o.series={},o},e.prototype.seriesMissingValues=function(t){return t.missingValues||Ma},e.prototype.supportsPointInactiveOpacity=function(){return!1},e}(ap),dp=function(t){function e(){t.call(this),this.axisRanges={}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.update=function(t){var e=this.axisRanges;for(var o in t){var i=t[o],r=e[o];e[o]=r=r||{min:m,max:x},r.min=Math.min(r.min,i.min),r.max=Math.max(r.max,i.max)}},e.prototype.reset=function(t){this.axisRanges[t]=void 0},e.prototype.query=function(t){return this.axisRanges[t]},e}(O),fp=function(t){function e(e,o,i){t.call(this,o),this.textBox=new Vn(e,this.options,i),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,o=e.vertical,i=e.aboveAxis,r=this.children[0],n=r.options,s=r.box,a=r.options.padding,p=t;n.align=o?d:v,n.vAlign=o?b:d,"insideEnd"===e.position?o?(n.vAlign=b,!i&&s.height()<t.height()&&(n.vAlign=u)):n.align=i?_:v:e.position===d?(n.vAlign=d,n.align=d):"insideBase"===e.position?o?n.vAlign=i?u:b:n.align=i?v:_:"outsideEnd"===e.position&&(o?p=i?new gn(t.x1,t.y1-s.height(),t.x2,t.y1):new gn(t.x1,t.y2,t.x2,t.y2+s.height()):(n.align=d,p=i?new gn(t.x2,t.y1,t.x2+s.width(),t.y2):new gn(t.x1-s.width(),t.y1,t.x1,t.y2))),e.rotation||(o?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?S:k,o=e+"1",i=e+"2",r=this.children[0],n=this.parent.box;if(n[o]<t[o]||t[i]<n[i]){var s=r.paddingBox.clone();s[o]=Math.max(n[o],t[o]),s[i]=Math.min(n[i],t[i]),this.reflow(s)}},e}(Cn);Yr(fp,{position:"outsideEnd",margin:cr(3),padding:cr(4),color:l,background:"",border:{width:1,color:""},aboveAxis:!0,vertical:!1,animation:{type:"fadeIn",delay:600},zIndex:2});var yp=fp;function gp(t){var e=t.overlay;return e&&e.gradient&&"none"!==e.gradient}var vp=function(t){function e(e,o){t.call(this),this.options=o,this.color=o.color||C,this.aboveAxis=Wr(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,e=t.labels;if(e.visible){var o,i=this.pointData(),r=fr(e);o=r?r(i):this.formatValue(e.format),this.label=new yp(o,rr({vertical:t.vertical},e),i),this.append(this.label)}},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 o=0;o<this.errorBars.length;o++)this.errorBars[o].reflow(t)},e.prototype.createVisual=function(){var e=this,o=this.box,i=this.options,r=i.visual;if(!1!==this.visible)if(t.prototype.createVisual.call(this),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:o.toRect(),createVisual:function(){var t=new a.Group;return e.createRect(t),t},options:i});n&&this.visual.append(n)}else o.width()>0&&o.height()>0&&this.createRect(this.visual)},e.prototype.createRect=function(t){var e=this.options,o=e.border,i=Rr(o.opacity)?o.opacity:e.opacity,r=this.box.toRect();r.size.width=Math.round(r.size.width);var n=this.rectVisual=a.Path.fromRect(r,{fill:{color:this.color,opacity:e.opacity},stroke:{color:this.getBorderColor(),width:o.width,opacity:i,dashType:o.dashType}}),s=this.box.width(),p=this.box.height();if((e.vertical?s:p)>6&&(Ki(n),(s<1||p<1)&&(n.options.stroke.lineJoin="round")),t.append(n),gp(e)){var h=this.createGradientOverlay(n,{baseColor:this.color},rr({end:e.vertical?void 0:[0,1]},e.overlay));t.append(h)}},e.prototype.createHighlight=function(t){return Ki(a.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.getBorderColor=function(){var t=this.color,e=this.options.border,o=e._brightness||.8,i=e.color;return Rr(i)||(i=new on(t).brightness(o).toHex()),i},e.prototype.tooltipAnchor=function(){var t,e,o=this.options,i=this.box,r=this.aboveAxis,n=this.owner.pane.clipBox()||i,s=v,a=b;if(o.vertical)t=Math.min(i.x2,n.x2)+5,r?e=Math.max(i.y1,n.y1):(e=Math.min(i.y2,n.y2),a=u);else{var p=Math.max(i.x1,n.x1),h=Math.min(i.x2,n.x2);o.isStacked?(a=u,r?(s=_,t=h):t=p,e=Math.max(i.y1,n.y1)-5):(r?t=h+5:(t=p-5,s=_),e=Math.max(i.y1,n.y1))}return{point:new fn(t,e),align:{horizontal:s,vertical:a}}},e.prototype.overlapsBox=function(t){return this.box.overlaps(t)},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}(Cn);rr(vp.prototype,Ga),rr(vp.prototype,Wa),vp.prototype.defaults={border:{width:1},vertical:!0,overlay:{gradient:"glass"},labels:{visible:!1,format:"{0}"},opacity:1,notes:{label:{}}};var mp=vp;function xp(t,e){t.forEach(e)}function _p(t,e){for(var o=t.length,i=o-1;i>=0;i--)e(t[i],i-o-1)}var bp=function(t){function e(e){t.call(this,e),this.forEach=e.rtl?_p:xp}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,o=e.vertical,i=e.gap,r=e.spacing,n=this.children,s=n.length,a=o?S:k,p=s+i+r*(s-1),h=(o?t.height():t.width())/p,c=t[a+1]+h*(i/2);this.forEach(n,(function(e,o){var i=(e.box||t).clone();i[a+1]=c,i[a+2]=c+h,e.reflow(i),o<s-1&&(c+=h*r),c+=h}))},e}(Cn);Yr(bp,{vertical:!1,gap:0,spacing:0});var wp=bp,Cp=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?k:S,o=this.children,i=o.length,r=this.box=new gn,n=0;n<i;n++){var s=o[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}(Cn);Yr(Cp,{vertical:!0});var kp=Cp,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.render=function(){t.prototype.render.call(this),this.updateStackRange()},e.prototype.pointType=function(){return mp},e.prototype.clusterType=function(){return wp},e.prototype.stackType=function(){return kp},e.prototype.stackLimits=function(e,o){return t.prototype.stackLimits.call(this,e,o)},e.prototype.createPoint=function(t,e){var o=e.categoryIx,i=e.category,r=e.series,n=e.seriesIx,s=this.options,a=this.children,p=s.isStacked,h=this.pointValue(t),c=this.pointOptions(r,n),l=c.labels;p&&"outsideEnd"===l.position&&(l.position="insideEnd"),c.isStacked=p;var u=t.fields.color||r.color;h<0&&c.negativeColor&&(u=c.negativeColor),c=this.evalPointOptions(c,h,i,o,r,n),or(r.color)&&(u=c.color);var d=new(this.pointType())(h,c);d.color=u;var f=a[o];f||(f=new(this.clusterType())({vertical:s.invertAxes,gap:s.gap,spacing:s.spacing,rtl:!s.invertAxes&&(this.chartService||{}).rtl}),this.append(f));p?this.getStackWrap(r,f).append(d):f.append(d);return d},e.prototype.getStackWrap=function(t,e){var o,i=t.stack,r=i&&i.group||i,n=e.children;if("string"==typeof r){for(var s=0;s<n.length;s++)if(n[s]._stackGroup===r){o=n[s];break}}else o=n[0];o||((o=new(this.stackType())({vertical:!this.options.invertAxes}))._stackGroup=r,e.append(o));return o},e.prototype.categorySlot=function(t,e,o){var i=this.options,r=t.getSlot(e),n=o.startValue();if(i.isStacked){var s=o.getSlot(n,n,!0),a=i.invertAxes?k:S;r[a+1]=r[a+2]=s[a+1]}return r},e.prototype.reflowCategories=function(t){for(var e=this.children,o=e.length,i=0;i<o;i++)e[i].reflow(t[i])},e.prototype.createAnimation=function(){this._setAnimationOptions(),t.prototype.createAnimation.call(this),rp(this.options.series)&&this._setChildrenAnimation()},e.prototype._setChildrenAnimation=function(){for(var t=this.points,e=0;e<t.length;e++){var o=t[e],i=o.visual;i&&Rr(i.options.zIndex)&&(o.options.animation=this.options.animation,o.createAnimation())}},e.prototype._setAnimationOptions=function(){var t,e=this.options,o=e.animation||{};if(e.isStacked){var i=this.seriesValueAxis(e.series[0]);t=i.getSlot(i.startValue())}else t=this.categoryAxis.getSlot(0);o.origin=new p.Point(t.x1,t.y1),o.vertical=!e.invertAxes},e}(Ua);Yr(Sp,{animation:{type:Oa}});var Ap=Sp,Pp=function(t){function e(e,o){t.call(this,o),this.value=e}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,o=this.value,i=this.owner.seriesValueAxis(e),r=i.getSlot(o.open,o.close),n=i.getSlot(o.low,o.high);r.x1=n.x1=t.x1,r.x2=n.x2=t.x2,this.realBody=r;var s=n.center().x,a=[];a.push([[s,n.y1],[s,r.y1]]),a.push([[s,r.y2],[s,n.y2]]),this.lines=a,this.box=n.clone().wrap(r),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._mainVisual=this.mainVisual(this.options),this.visual.append(this._mainVisual),this.createOverlay()},e.prototype.mainVisual=function(t){var e=new a.Group;return this.createBody(e,t),this.createLines(e,t),e},e.prototype.createBody=function(t,e){var o=a.Path.fromRect(this.realBody.toRect(),{fill:{color:this.color,opacity:e.opacity},stroke:null});e.border.width>0&&o.options.set("stroke",{color:this.getBorderColor(),width:e.border.width,dashType:e.border.dashType,opacity:Wr(e.border.opacity,e.opacity)}),Ki(o),t.append(o),gp(e)&&t.append(this.createGradientOverlay(o,{baseColor:this.color},rr({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,o,i){if(o)for(var r={stroke:{color:i.color||this.color,opacity:Wr(i.opacity,e.opacity),width:i.width,dashType:i.dashType,lineCap:"butt"}},n=0;n<o.length;n++){var s=a.Path.fromPoints(o[n],r);Ki(s),t.append(s)}},e.prototype.getBorderColor=function(){var t=this.options.border,e=t.color;return Rr(e)||(e=new on(this.color).brightness(t._brightness).toHex()),e},e.prototype.createOverlay=function(){var t=a.Path.fromRect(this.box.toRect(),{fill:{color:C,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 o=this.mainVisual(rr({},this.options,{line:{color:this.getBorderColor()}},t));return this.color=e,o},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 fn(t.x2+5,Math.max(t.y1,e.y1)+5),align:{horizontal:v,vertical:b}}},e.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},e.prototype.overlapsBox=function(t){return this.box.overlaps(t)},e}(Cn);Yr(Pp,{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>"},highlight:{opacity:1,border:{width:1,opacity:1},line:{width:1,opacity:1}},notes:{visible:!0,label:{}}}),rr(Pp.prototype,Ga),rr(Pp.prototype,Wa);var Tp=Pp;function Mp(t){return ma(t)===t.length}var Op=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,o=e.length,i=0;i<o;i++)e[i].reflow(t[i])},e.prototype.addValue=function(t,e){var o,i=e.categoryIx,r=e.category,n=e.series,s=e.seriesIx,a=this.children,p=this.options,h=t.valueFields,c=Mp(this.splitValue(h)),l=n.data[i],u=this.categoryPoints[i];u||(this.categoryPoints[i]=u=[]),c&&(o=this.createPoint(t,e));var d=a[i];d||(d=new wp({vertical:p.invertAxes,gap:p.gap,spacing:p.spacing,rtl:!p.invertAxes&&(this.chartService||{}).rtl}),this.append(d)),o&&(this.updateRange(h,e),d.append(o),o.categoryIx=i,o.category=r,o.series=n,o.seriesIx=s,o.owner=this,o.dataItem=l,o.noteText=t.fields.noteText),this.points.push(o),u.push(o)},e.prototype.pointType=function(){return Tp},e.prototype.createPoint=function(t,e){var o=e.categoryIx,i=e.category,r=e.series,n=e.seriesIx,s=this.pointType(),a=t.valueFields,p=rr({},r),h=t.fields.color||r.color;p=this.evalPointOptions(p,a,i,o,r,n),"candlestick"===r.type&&a.open>a.close&&(h=t.fields.downColor||r.downColor||r.color),or(r.color)&&(h=p.color),p.vertical=!this.options.invertAxes;var c=new s(a,p);return c.color=h,c},e.prototype.splitValue=function(t){return[t.low,t.open,t.close,t.high]},e.prototype.updateRange=function(t,e){var o=e.series.axis,i=this.splitValue(t),r=this.valueAxisRanges[o];r=this.valueAxisRanges[o]=r||{min:m,max:x},r=this.valueAxisRanges[o]={min:Math.min.apply(Math,i.concat([r.min])),max:Math.max.apply(Math,i.concat([r.max]))}},e.prototype.formatPointValue=function(t,e){var o=t.value;return this.chartService.format.auto(e,o.open,o.high,o.low,o.close,t.category)},e.prototype.animationPoints=function(){return this.points},e}(Ua);rr(Op.prototype,np);var Bp=Op,Rp=function(t){function e(e,o){t.call(this,e,o),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,o,i=this.options,r=this.value,n=this.owner.seriesValueAxis(i);this.boxSlot=o=n.getSlot(r.q1,r.q3),this.realBody=o,this.reflowBoxSlot(t),this.whiskerSlot=e=n.getSlot(r.lower,r.upper),this.reflowWhiskerSlot(t);var s=n.getSlot(r.median);if(r.mean){var a=n.getSlot(r.mean);this.meanPoints=this.calcMeanPoints(t,a)}this.whiskerPoints=this.calcWhiskerPoints(o,e),this.medianPoints=this.calcMedianPoints(t,s),this.box=e.clone().wrap(o),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 o=e.center().x;return[[[o-5,e.y1],[o+5,e.y1],[o,e.y1],[o,t.y1]],[[o-5,e.y2],[o+5,e.y2],[o,e.y2],[o,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,o=e.outliers||[],i=3*Math.abs(e.q3-e.q1),r=[],n=t.markers||{},s=0;s<o.length;s++){var a=o[s],p=rr({},(n=a<e.q3+i&&a>e.q1-i?t.outliers:t.extremes).border);Rr(p.color)||(Rr(this.color)?p.color=this.color:p.color=new on(n.background).brightness(.8).toHex());var h=new Pn({type:n.type,width:n.size,height:n.size,rotation:n.rotation,background:n.background,border:p,opacity:n.opacity});h.value=a,r.push(h)}return this.reflowOutliers(r),r},e.prototype.reflowOutliers=function(t){for(var e=this.owner.seriesValueAxis(this.options),o=this.box.center(),i=0;i<t.length;i++){var r=t[i].value,n=e.getSlot(r);this.options.vertical?n.move(o.x):n.move(void 0,o.y),this.box=this.box.wrap(n),t[i].reflow(n)}},e.prototype.mainVisual=function(e){for(var o=t.prototype.mainVisual.call(this,e),i=this.renderOutliers(e),r=0;r<i.length;r++){var n=i[r].getElement();n&&o.append(n)}return o},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}(Tp);Yr(Rp,{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:"cross",background:C,border:{width:2,opacity:1},opacity:0},extremes:{visible:!0,size:8,type:f,background:C,border:{width:2,opacity:1},opacity:0}}),rr(Rp.prototype,Ga);var Ep=Rp,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.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 o=e.center().y;return[[[e.x1,o-5],[e.x1,o+5],[e.x1,o],[t.x1,o]],[[e.x2,o-5],[e.x2,o+5],[e.x2,o],[t.x2,o]]]},e.prototype.calcMedianPoints=function(t,e){return[[[e.x1,t.y1],[e.x1,t.y2]]]},e}(Ep),Lp=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 o,i=e.categoryIx,r=e.category,n=e.series,s=e.seriesIx,a=this.children,p=this.options,h=t.valueFields,c=Mp(this.splitValue(h)),l=n.data[i],u=this.categoryPoints[i];u||(this.categoryPoints[i]=u=[]),c&&(o=this.createPoint(t,e));var d=a[i];d||(d=new wp({vertical:p.invertAxes,gap:p.gap,spacing:p.spacing,rtl:!p.invertAxes&&(this.chartService||{}).rtl}),this.append(d)),o&&(this.updateRange(h,e),d.append(o),o.categoryIx=i,o.category=r,o.series=n,o.seriesIx=s,o.owner=this,o.dataItem=l),this.points.push(o),u.push(o)},e.prototype.pointType=function(){return this.options.invertAxes?zp:Ep},e.prototype.splitValue=function(t){return[t.lower,t.q1,t.median,t.q3,t.upper]},e.prototype.updateRange=function(t,e){var o=e.series.axis,i=this.valueAxisRanges[o],r=this.splitValue(t).concat(this.filterOutliers(t.outliers));Rr(t.mean)&&(r=r.concat(t.mean)),i=this.valueAxisRanges[o]=i||{min:m,max:x},i=this.valueAxisRanges[o]={min:Math.min.apply(Math,r.concat([i.min])),max:Math.max.apply(Math,r.concat([i.max]))}},e.prototype.formatPointValue=function(t,e){var o=t.value;return this.chartService.format.auto(e,o.lower,o.q1,o.median,o.q3,o.upper,o.mean,t.category)},e.prototype.filterOutliers=function(t){for(var e=(t||[]).length,o=[],i=0;i<e;i++){var r=t[i];Rr(r)&&null!==r&&o.push(r)}return o},e.prototype.supportsPointInactiveOpacity=function(){return!1},e}(Bp),Ip=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}(Da);function jp(t){return Rr(t)&&null!==t}var Dp=function(t){function e(e,o){t.call(this,o),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,o){var i,r=t.value[e],n=e+"Value",s=e+"ErrorLow",a=e+"ErrorHigh",p=o.seriesIx,h=o.series,c=t.options.errorBars,l=o[s],u=o[a];Ji(r)&&(Ji(l)&&Ji(u)&&(i={low:l,high:u}),c&&Rr(c[n])&&(this.seriesErrorRanges=this.seriesErrorRanges||{x:[],y:[]},this.seriesErrorRanges[e][p]=this.seriesErrorRanges[e][p]||new Aa(c[n],h,e),i=this.seriesErrorRanges[e][p].getErrorRange(r,c[n])),i&&this.addPointErrorBar(i,t,e))},e.prototype.addPointErrorBar=function(t,e,o){var i=t.low,r=t.high,n=e.series,s=e.options.errorBars,a=o===S,p={};e[o+"Low"]=i,e[o+"High"]=r,e.errorBars=e.errorBars||[];var h=new Ip(i,r,a,this,n,s);e.errorBars.push(h),e.append(h),p[o]=i,this.updateRange(p,n),p[o]=r,this.updateRange(p,n)},e.prototype.addValue=function(t,e){var o,i=t.x,r=t.y,n=e.seriesIx,s=this.options.series[n],a=this.seriesMissingValues(s),p=this.seriesPoints[n],h=t;jp(i)&&jp(r)||(h=this.createMissingValue(h,a)),h&&((o=this.createPoint(h,e))&&(Object.assign(o,e),this.addErrorBar(o,k,e),this.addErrorBar(o,S,e)),this.updateRange(h,e.series)),this.points.push(o),p.push(o)},e.prototype.seriesMissingValues=function(t){return t.missingValues},e.prototype.createMissingValue=function(){},e.prototype.updateRange=function(t,e){var o=this.chartService.intl,i=e.xAxis,r=e.yAxis,n=t.x,s=t.y,a=this.xAxisRanges[i],p=this.yAxisRanges[r];jp(n)&&(a=this.xAxisRanges[i]=a||{min:m,max:x},tr(n)&&(n=Ps(o,n)),a.min=Math.min(a.min,n),a.max=Math.max(a.max,n)),jp(s)&&(p=this.yAxisRanges[r]=p||{min:m,max:x},tr(s)&&(s=Ps(o,s)),p.min=Math.min(p.min,s),p.max=Math.max(p.max,s))},e.prototype.evalPointOptions=function(t,e,o){var i=o.series,r=o.seriesIx,n={defaults:i._defaults,excluded:["data","tooltip","content","template","visual","toggle","_outOfRangeMinPoint","_outOfRangeMaxPoint"]},s=this._evalSeries[r];Rr(s)||(this._evalSeries[r]=s=Ha(t,{},n,!0));var a=t;return s&&Ha(a=rr({},t),{value:e,series:i,dataItem:o.dataItem},n),a},e.prototype.pointType=function(){return Xa},e.prototype.pointOptions=function(t,e){var o=this.seriesOptions[e];if(!o){var i=this.pointType().prototype.defaults;this.seriesOptions[e]=o=rr({},i,{markers:{opacity:t.opacity},tooltip:{format:this.options.tooltip.format},labels:{format:this.options.labels.format}},t)}return o},e.prototype.createPoint=function(t,e){var o=e.series,i=this.pointOptions(o,e.seriesIx),r=e.color||o.color;i=this.evalPointOptions(i,t,e),or(o.color)&&(r=i.color);var n=new Xa(t,i);return n.color=r,this.append(n),n},e.prototype.seriesAxes=function(t){var e=t.xAxis,o=t.yAxis,i=this.plotArea,r=e?i.namedXAxes[e]:i.axisX,n=o?i.namedYAxes[o]:i.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 "+o);return{x:r,y:n}},e.prototype.reflow=function(t){var e=this,o=this.points,i=!this.options.clip,r=0;this.traverseDataPoints((function(t,n){var s=o[r++],a=e.seriesAxes(n.series),p=a.x.getSlot(t.x,t.x,i),h=a.y.getSlot(t.y,t.y,i);if(s)if(p&&h){var c=e.pointSlot(p,h);s.reflow(c)}else s.visible=!1})),this.box=t},e.prototype.pointSlot=function(t,e){return new gn(t.x1,e.y1,t.x2,e.y2)},e.prototype.traverseDataPoints=function(t){for(var e=this.options.series,o=this.seriesPoints,i=0;i<e.length;i++){var r=e[i];o[i]||(o[i]=[]);for(var n=0;n<r.data.length;n++){var s=this._bindPoint(r,i,n),a=s.valueFields,p=s.fields;t(a,rr({pointIx:n,series:r,seriesIx:i,dataItem:r.data[n],owner:this},p))}}},e.prototype.formatPointValue=function(t,e){var o=t.value;return this.chartService.format.auto(e,o.x,o.y)},e.prototype.animationPoints=function(){for(var t=this.points,e=[],o=0;o<t.length;o++)e.push((t[o]||{}).marker);return e},e}(Cn);Yr(Dp,{series:[],tooltip:{format:"{0}, {1}"},labels:{format:"{0}, {1}"},clip:!0}),rr(Dp.prototype,np,{_bindPoint:Ua.prototype._bindPoint});var Vp=Dp,Hp=function(t){function e(e,o){t.call(this,e,o),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,o=this.options.markers,i=this.box.center(),r=(o.size+o.border.width+e.width)/2,n=new a.Group,s=new a.Circle(new p.Circle([i.x,i.y+r/5+e.width/2],r+e.width/2),{stroke:{color:"none"},fill:this.createGradient({gradient:"bubbleShadow",color:o.background,stops:[{offset:0,color:o.background,opacity:.3},{offset:1,color:o.background,opacity:0}]})}),h=new a.Circle(new p.Circle([i.x,i.y],r),{stroke:{color:e.color||new on(o.background).brightness(.8).toHex(),width:e.width,opacity:e.opacity},fill:{color:o.background,opacity:t.opacity}});return n.append(s,h),n},e}(Xa);Hp.prototype.defaults=rr({},Hp.prototype.defaults,{labels:{position:d},highlight:{opacity:1,border:{color:"#fff",width:2,opacity:1}}}),Hp.prototype.defaults.highlight.zIndex=void 0;var Fp=Hp,Np=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=x,t.prototype._initFields.call(this)},e.prototype.addValue=function(e,o){null!==e.size&&(e.size>0||e.size<0&&o.series.negativeValues.visible)?(this._maxSize=Math.max(this._maxSize,Math.abs(e.size)),t.prototype.addValue.call(this,e,o)):(this.points.push(null),this.seriesPoints[o.seriesIx].push(null))},e.prototype.reflow=function(e){this.updateBubblesSize(e),t.prototype.reflow.call(this,e)},e.prototype.pointType=function(){return Fp},e.prototype.createPoint=function(t,e){var o=e.series,i=o.data.length,r=e.pointIx*(600/i),n={delay:r,duration:600-r,type:"bubble"},s=e.color||o.color;t.size<0&&o.negativeValues.visible&&(s=Wr(o.negativeValues.color,s));var a=rr({labels:{animation:{delay:r,duration:600-r}}},this.pointOptions(o,e.seriesIx),{markers:{type:f,border:o.border,opacity:o.opacity,animation:n}});a=this.evalPointOptions(a,t,e),or(o.color)&&(s=a.color),a.markers.background=s;var p=new Fp(t,a);return p.color=s,this.append(p),p},e.prototype.updateBubblesSize=function(t){for(var e=this.options.series,o=Math.min(t.width(),t.height()),i=0;i<e.length;i++)for(var r=e[i],n=this.seriesPoints[i],s=(r.minSize||Math.max(.02*o,10))/2,a=(r.maxSize||.2*o)/2,p=Math.PI*s*s,h=(Math.PI*a*a-p)/this._maxSize,c=0;c<n.length;c++){var l=n[c];if(l){var u=Math.abs(l.value.size)*h,d=Math.sqrt((p+u)/Math.PI),f=Wr(l.options.zIndex,0)+(1-d/a);rr(l.options,{zIndex:f,markers:{size:2*d,zIndex:f},labels:{zIndex:f+1}})}}},e.prototype.formatPointValue=function(t,e){var o=t.value;return this.chartService.format.auto(e,o.x,o.y,o.size,t.category)},e.prototype.createAnimation=function(){},e.prototype.createVisual=function(){},e}(Vp);Yr(Np,{tooltip:{format:"{3}"},labels:{format:"{3}"}});var Up=Np,Gp=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}(Pn);rr(Gp.prototype,Ga);var Wp=Gp,qp=function(t){function e(e,o){t.call(this,o),this.aboveAxis=this.options.aboveAxis,this.color=o.color||C,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,Rr(this.value.target)&&(this.target=new Wp({type:t.target.shape,background:t.target.color||this.color,opacity:t.opacity,zIndex:t.zIndex,border:t.target.border,vAlign:b,align:_}),this.target.value=this.value,this.target.dataItem=this.dataItem,this.target.series=this.series,this.append(this.target)),this.createNote())},e.prototype.reflow=function(t){this.render();var e=this.options,o=this.target,i=this.owner,r=e.invertAxes,n=i.seriesValueAxis(this.options),s=i.categorySlot(i.categoryAxis,e.categoryIx,n),a=n.getSlot(this.value.target),p=r?a:s,h=r?s:a;if(o){var c=new gn(p.x1,h.y1,p.x2,h.y2);o.options.height=r?c.height():e.target.line.width,o.options.width=r?e.target.line.width:c.width(),o.reflow(c)}this.note&&this.note.reflow(t),this.box=t},e.prototype.createVisual=function(){t.prototype.createVisual.call(this);var e=this.options,o=a.Path.fromRect(this.box.toRect(),{fill:{color:this.color,opacity:e.opacity},stroke:null});e.border.width>0&&o.options.set("stroke",{color:e.border.color||this.color,width:e.border.width,dashType:e.border.dashType,opacity:Wr(e.border.opacity,e.opacity)}),this.bodyVisual=o,Ki(o),this.visual.append(o)},e.prototype.createAnimation=function(){this.bodyVisual&&(this.animation=a.Animation.create(this.bodyVisual,this.options.animation))},e.prototype.createHighlight=function(t){return a.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}(Cn);qp.prototype.tooltipAnchor=mp.prototype.tooltipAnchor,Yr(qp,{border:{width:1},vertical:!1,opacity:1,target:{shape:"",border:{width:0,color:"green"},line:{width:2}},tooltip:{format:"Current: {0}<br />Target: {1}"}}),rr(qp.prototype,Ga),rr(qp.prototype,Wa);var Xp=qp,Yp=function(t){function e(e,o){!function(t){for(var e=t.series,o=0;o<e.length;o++){var i=e[o],r=i.data;!r||A(r[0])||nr(r[0])||(i.data=[r])}}(o),t.call(this,e,o)}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,o=e.length,i=0;i<o;i++)e[i].reflow(t[i])},e.prototype.plotRange=function(t){var e=t.series,o=this.seriesValueAxis(e),i=this.categoryAxisCrossingValue(o);return[i,t.value.current||i]},e.prototype.createPoint=function(t,e){var o=e.categoryIx,i=e.category,r=e.series,n=e.seriesIx,s=this.options,a=this.children,p=t.valueFields,h=rr({vertical:!s.invertAxes,overlay:r.overlay,categoryIx:o,invertAxes:s.invertAxes},r),c=t.fields.color||r.color;h=this.evalPointOptions(h,p,i,o,r,n),or(r.color)&&(c=h.color);var l=new Xp(p,h);l.color=c;var u=a[o];return u||(u=new wp({vertical:s.invertAxes,gap:s.gap,spacing:s.spacing,rtl:!s.invertAxes&&(this.chartService||{}).rtl}),this.append(u)),u.append(l),l},e.prototype.updateRange=function(t,e){var o=t.current,i=t.target,r=e.series.axis,n=this.valueAxisRanges[r];Rr(o)&&!isNaN(o)&&Rr(i&&!isNaN(i))&&((n=this.valueAxisRanges[r]=n||{min:m,max:x}).min=Math.min(n.min,o,i),n.max=Math.max(n.max,o,i))},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 o=t[e];o.options.animation=this.options.animation,o.createAnimation()}},e}(Ua);Yp.prototype._setAnimationOptions=Ap.prototype._setAnimationOptions,Yr(Yp,{animation:{type:Oa}});var Zp=Yp,Qp=function(t){function e(e,o){t.call(this),this.chartService=e,this.options=rr({},this.options,o)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getStyle=function(t,e){var o=t.background,i=t.border.color;if(e){var r=e.color||e.options.color;o=Wr(o,r),i=Wr(i,r)}var n=cr(t.padding||{},"auto");return{backgroundColor:o,borderColor:i,font:t.font,color:t.color,opacity:t.opacity,borderWidth:sr(t.border.width),paddingTop:sr(n.top),paddingBottom:sr(n.bottom),paddingLeft:sr(n.left),paddingRight:sr(n.right)}},e.prototype.show=function(t,e,o){t.format=e.format;var i=this.getStyle(e,o);t.style=i;var r=new on(i.backgroundColor);Rr(e.color)||r.isDark()||(t.className="k-chart-tooltip-inverse"),this.chartService.notify("showTooltip",t),this.visible=!0},e.prototype.hide=function(){this.chartService&&this.chartService.notify("hideTooltip"),this.visible=!1},e.prototype.destroy=function(){delete this.chartService},e}(O);Yr(Qp,{border:{width:1},opacity:1});var Kp=Qp,$p=function(t){function e(e,o,i){t.call(this,e,i),this.crosshair=o,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,o=this.options,i=e[o.stickyMode?"getCategory":"getValue"](t),r=i;o.format?r=this.formatService.auto(o.format,i):e.options.type===y&&(r=this.formatService.auto(e.options.labels.dateFormats[e.options.baseUnit],i)),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("hideTooltip",{crosshair:this.crosshair,axisName:this.axisName,axisIndex:this.crosshair.axis.axisIndex})},e.prototype.getAnchor=function(){var t,e,o,i=this.crosshair,r=this.options,n=r.position,s=r.padding,a=!i.axis.options.vertical,p=i.line.bbox();return a?(t=d,n===u?(e=b,o=p.bottomLeft().translate(0,s)):(e=u,o=p.topLeft().translate(0,-s))):(e=d,n===v?(t=_,o=p.topLeft().translate(-s,0)):(t=v,o=p.topRight().translate(s,0))),{point:o,align:{horizontal:t,vertical:e}}},e}(Kp);Yr($p,{padding:10});var Jp=$p,th=function(t){function e(e,o,i){t.call(this,i),this.axis=o,this.stickyMode=o instanceof Bs;var r=this.options.tooltip;r.visible&&(this.tooltip=new Jp(e,this,rr({},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,o=this.point,i=e.options.vertical,r=this.getBox(),n=i?S:k,s=new p.Point(r.x1,r.y1);if(t=i?new p.Point(r.x2,r.y1):new p.Point(r.x1,r.y2),o)if(this.stickyMode){var a=e.getSlot(e.pointCategoryIndex(o));s[n]=t[n]=a.center()[n]}else s[n]=t[n]=o[n];this.box=r,this.line.moveTo(s).lineTo(t)},e.prototype.getBox=function(){for(var t,e=this.axis,o=e.pane.axes,i=o.length,r=e.options.vertical,n=e.lineBox().clone(),s=r?k:S,a=0;a<i;a++){var p=o[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 a.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}(Cn);Yr(th,{color:l,width:2,zIndex:-1,tooltip:{visible:!1}});var eh=th,oh=function(t){function e(e,o){t.call(this,e),this.pane=o}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,o=0;o<e;o++)if(!0===t[o].options.clip)return!0;return!1},e.prototype._clipBox=function(){return this.pane.chartsBox()},e.prototype.createVisual=function(){if(this.visual=new a.Group({zIndex:0}),this.shouldClip()){var t=(this.clipBox=this._clipBox()).toRect(),e=a.Path.fromRect(t);Ki(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,o=0;o<t.length;o++)for(var i=t[o].points||{},r=i.length,n=0;n<r;n++){var s=i[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.destroy=function(){t.prototype.destroy.call(this),delete this.parent},e}(Cn);oh.prototype.isStackRoot=!0;var ih=oh,rh=function(t){function e(e){t.call(this,e),this.id="pane"+nh++,this.createTitle(),this.content=new Cn,this.chartContainer=new ih({},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;nr(t)&&(t=rr({},t,{align:t.position,position:b})),this.title=Fn.buildTitle(t,this,e.prototype.options.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 o=0;o<this.charts.length;o++)t.removeChart(this.charts[o])}this.axes=[],this.charts=[],this.content.destroy(),this.content.children=[],this.chartContainer.children=[]},e.prototype.reflow=function(e){var o;Vr(this.children)===this.content&&(o=this.children.pop()),t.prototype.reflow.call(this,e),o&&this.children.push(o),this.title&&(this.contentBox.y1+=this.title.box.height())},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),o=[],i=[],r=0;r<t.length;r++)for(var n=t[r],s=n.options.vertical,a=s?o:i,p=0;p<e.length;p++)if(0===a.length){var h=e[p];s!==h.options.vertical&&Or(a,n.createGridLines(h))}},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,o=new gn,i=0;i<e;i++){var r=t[i],n=r.options.vertical?S:k,s=r.lineBox();o[n+1]=s[n+1],o[n+2]=s[n+2]}if(0===o.x2)for(var a=this.parent.axes,p=a.length,h=0;h<p;h++){var c=a[h];if(!c.options.vertical){var l=c.lineBox();o.x1=l.x1,o.x2=l.x2}}return o},e.prototype.clipBox=function(){return this.chartContainer.clipBox},e.prototype.notifyRender=function(){var t=this.getService();t&&t.notify("paneRender",{pane:new ga(this),index:this.paneIndex,name:this.options.name})},e}(Sn),nh=1;rh.prototype.isStackRoot=!0,Yr(rh,{zIndex:-1,shrinkToFit:!0,title:{align:v},visible:!0});var sh=rh;function ah(t,e){null!==e&&t.push(e)}function ph(t,e,o){var i=e.visible;if(Rr(i))return i;var r=t.pointVisibility;return r?r[o]:void 0}function hh(t){for(var e=t.data,o=[],i=0,r=0,n=0;n<e.length;n++){var s=Ca.current.bindPoint(t,n),a=s.valueFields.value;tr(a)&&(a=parseFloat(a)),Ji(a)?(s.visible=!1!==ph(t,s.fields,n),s.value=Math.abs(a),o.push(s),s.visible&&(i+=s.value),0!==a&&r++):o.push(null)}return{total:i,points:o,count:r}}function ch(t,e){return t&&e?t.toLowerCase()===e.toLowerCase():t===e}function lh(t,e){for(var o=[],i=[].concat(e),r=0;r<t.length;r++){var n=t[r];wr(n.type,i)&&o.push(n)}return o}function uh(t,e,o){if(null===e)return e;var i="_date_"+t,r=e[i];return r||(r=Ps(o,vr(t)(e)),e[i]=r),r}function dh(t,e){var o=t.type,i=e instanceof Date;return!o&&i||ch(o,y)}function fh(t){return 1===t.length?t[0]:t}var yh=/area/i;function gh(t,e){var o=Ca.current.bindPoint(t,null,e).valueFields;for(var i in o)if(er(o[i]))return!0}function vh(t){var e,o,i=t.start,r=t.dir,n=t.min,s=t.max,a=t.getter,p=t.hasItem,h=t.series,c=i;do{p(c+=r)&&(e=gh(h,(o=a(c)).item))}while(n<=c&&c<=s&&!e);if(e)return o}function mh(t,e,o,i,r){var n=e.min,s=e.max,a=n>0&&n<o,p=s+1<o;if(a||p){var h,c,l;if("interpolate"!==function(t){return t.missingValues?t.missingValues:yh.test(t.type)||t.stack?Ma:"interpolate"}(t))a&&(h=i(n-1)),p&&(c=i(s+1));else a&&(h=gh(t,(l=i(n-1)).item)?l:vh({start:n,dir:-1,min:0,max:o-1,getter:i,hasItem:r,series:t})),p&&(c=gh(t,(l=i(s+1)).item)?l:vh({start:s,dir:1,min:0,max:o-1,getter:i,hasItem:r,series:t}));h&&(t._outOfRangeMinPoint=h),c&&(t._outOfRangeMaxPoint=c)}}var xh=function(t){function e(e,o,i){t.call(this,o),this.initFields(e,o),this.series=e,this.initSeries(),this.charts=[],this.options.legend=this.options.legend||{},this.options.legend.items=[],this.axes=[],this.crosshairs=[],this.chartService=i,this.originalOptions=o,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.createPanes=function(){for(var t=this.options.title||{},e=this.options.paneDefaults,o=this.options.panes||[],i=Math.max(o.length,1),r=[],n=rr({title:{color:t.color}},e),s=0;s<i;s++){var a=rr({},n,o[s]);tr(a.title)&&(a.title=rr({text:a.title},n.title));var p=new sh(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 o=t[e],i=0;i<o.axes.length;i++){var r=o.axes[i],n=this.crosshairOptions(r);if(n&&n.visible){var s=new eh(this.chartService,r,n);this.crosshairs.push(s),o.content.append(s)}}},e.prototype.removeCrosshairs=function(t){for(var e=this.crosshairs,o=t.axes,i=e.length-1;i>=0;i--)for(var r=0;r<o.length;r++)if(e[i].axis===o[r]){e.splice(i,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,o=this.panes,i=0;i<o.length;i++)if(o[i].options.name===t){e=o[i];break}return e||o[0]},e.prototype.findPointPane=function(t){for(var e,o=this.panes,i=0;i<o.length;i++)if(o[i].box.containsPoint(t)){e=o[i];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=[],o=0;o<this.axes.length;o++){var i=this.axes[o];t!==i?e.push(i):i.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=[],o=0;o<this.charts.length;o++){var i=this.charts[o];i!==t?e.push(i):i.destroy()}this.charts=e},e.prototype.addToLegend=function(t){for(var e=t.length,o=this.options.legend,i=o.labels||{},r=o.inactiveItems||{},n=r.labels||{},s=[],a=0;a<e;a++){var p=t[a],h=!1!==p.visible;if(!1!==p.visibleInLegend){var c=p.name,l=h?fr(i):fr(n)||fr(i);l&&(c=l({text:jp(c)?c:"",series:p}));var u=p._defaults,d=p.color;or(d)&&u&&(d=u.color);var f=void 0,y=void 0;h?(f={},y=d):(f={color:n.color,font:n.font},y=r.markers.color),jp(c)&&""!==c&&s.push({text:c,labels:f,markerColor:y,series:p,active:h})}}Or(o.items,s)},e.prototype.groupAxes=function(t){for(var e=[],o=[],i=0;i<t.length;i++)for(var r=t[i].axes,n=0;n<r.length;n++){var s=r[n];s.options.vertical?o.push(s):e.push(s)}return{x:e,y:o,any:e.concat(o)}},e.prototype.groupSeriesByPane=function(){for(var t=this.series,e={},o=0;o<t.length;o++){var i=t[o],r=this.seriesPaneName(i);e[r]?e[r].push(i):e[r]=[i]}return e},e.prototype.filterVisibleSeries=function(t){for(var e=[],o=0;o<t.length;o++){var i=t[o];!1!==i.visible&&e.push(i)}return e},e.prototype.reflow=function(t){var e=this.options.plotArea,o=this.panes,i=cr(e.margin);this.box=t.clone().unpad(i),this.reflowPanes(),this.detachLabels(),this.reflowAxes(o),this.reflowCharts(o)},e.prototype.redraw=function(t){var e=[].concat(t);this.initSeries();var o=this.getRoot();o&&o.cleanGradients();for(var i=0;i<e.length;i++)this.removeCrosshairs(e[i]),e[i].empty();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 o=t.options,i=[].concat(o.axisCrossingValues||o.axisCrossingValue),r=e.length-i.length,n=i[0]||0,s=0;s<r;s++)i.push(n);return i},e.prototype.alignAxisTo=function(t,e,o,i){var r=t.getSlot(o,o,!0),n=t.options.reverse?2:1,s=e.getSlot(i,i,!0),a=e.options.reverse?2:1,p=t.box.translate(s[k+a]-r[k+n],s[S+a]-r[S+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 o=t[0],i=e[0],r=this.axisCrossingValues(o,e),n=this.axisCrossingValues(i,t),s={},a={},p={},h={},c=0;c<e.length;c++){var l=e[c],d=l.pane,f=d.id,y=!1!==l.options.visible,g=wh(t,d)||o,m=r;g!==o&&(m=this.axisCrossingValues(g,e)),this.alignAxisTo(l,g,n[c],m[c]),l.options._overlap||(Ur(l.lineBox().x1)===Ur(g.lineBox().x1)&&(s[f]&&l.reflow(l.box.alignTo(s[f].box,v).translate(-l.options.margin,0)),y&&(s[f]=l)),Ur(l.lineBox().x2)===Ur(g.lineBox().x2)&&(l._mirrored||(l.options.labels.mirror=!l.options.labels.mirror,l._mirrored=!0),this.alignAxisTo(l,g,n[c],m[c]),a[f]&&l.reflow(l.box.alignTo(a[f].box,_).translate(l.options.margin,0)),y&&(a[f]=l)),0!==c&&i.pane===l.pane&&(l.alignTo(i),l.reflow(l.box)))}for(var x=0;x<t.length;x++){var w=t[x],C=w.pane,k=C.id,S=!1!==w.options.visible,A=wh(e,C)||i,P=n;A!==i&&(P=this.axisCrossingValues(A,t)),this.alignAxisTo(w,A,r[x],P[x]),w.options._overlap||(Ur(w.lineBox().y1)===Ur(A.lineBox().y1)&&(w._mirrored||(w.options.labels.mirror=!w.options.labels.mirror,w._mirrored=!0),this.alignAxisTo(w,A,r[x],P[x]),p[k]&&w.reflow(w.box.alignTo(p[k].box,b).translate(0,-w.options.margin)),S&&(p[k]=w)),Ur(w.lineBox().y2,3)===Ur(A.lineBox().y2,3)&&(h[k]&&w.reflow(w.box.alignTo(h[k].box,u).translate(0,w.options.margin)),S&&(h[k]=w)),0!==x&&(w.alignTo(o),w.reflow(w.box)))}},e.prototype.shrinkAxisWidth=function(t){for(var e=this.groupAxes(t).any,o=bh(e),i=0,r=0;r<t.length;r++){var n=t[r];n.axes.length>0&&(i=Math.max(i,o.width()-n.contentBox.width()))}if(0!==i)for(var s=0;s<e.length;s++){var a=e[s];a.options.vertical||a.reflow(a.box.shrink(i,0))}},e.prototype.shrinkAxisHeight=function(t){for(var e,o=0;o<t.length;o++){var i=t[o],r=i.axes,n=Math.max(0,bh(r).height()-i.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,o=0,i=0;i<t.length;i++){var r=t[i],n=r.axes,s=r.contentBox;if(n.length>0){var a=bh(n),p=Math.max(s.y1-a.y1,s.y2-a.y2);o=Math.max(o,s.x1-a.x1);for(var h=0;h<n.length;h++){var c=n[h];c.reflow(c.box.translate(0,p))}}}for(var l=0;l<e.length;l++){var u=e[l];u.reflow(u.box.translate(o,0))}},e.prototype.reflowAxes=function(t){for(var e=this.groupAxes(t),o=0;o<t.length;o++)this.reflowPaneAxes(t[o]);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,o=this.panes,i=Ch(o),r=0;r<i.length;r++){i[r].autoRotateLabels()&&(e=!0)}if(e){for(var n=0;n<o.length;n++)this.reflowPaneAxes(o[n]);t.x.length>0&&t.y.length>0&&(this.alignAxes(t.x,t.y),this.shrinkAxisWidth(o))}},e.prototype.reflowPaneAxes=function(t){var e=t.axes,o=e.length;if(o>0)for(var i=0;i<o;i++)e[i].reflow(t.contentBox)},e.prototype.reflowCharts=function(t){for(var e=this.charts,o=e.length,i=this.box,r=0;r<o;r++){var n=e[r].pane;n&&!wr(n,t)||e[r].reflow(i)}},e.prototype.reflowPanes=function(){for(var t=this.box,e=this.panes,o=e.length,i=t.height(),r=0,n=t.y1,s=0;s<o;s++){var a=e[s],p=a.options.height;if(a.options.width=t.width(),a.options.height){if(p.indexOf&&p.indexOf("%")){var h=parseInt(p,10)/100;a.options.height=h*t.height()}a.reflow(t.clone()),i-=a.options.height}else r++}for(var c=0;c<o;c++){var l=e[c];l.options.height||(l.options.height=i/r)}for(var u=0;u<o;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,o=e.length,i=0;i<o;i++)for(var r=e[i],n=0;n<o;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=[],o=0;o<t.length;o++)e.push(t[o].chartsBox());return e},e.prototype.addBackgroundPaths=function(t){for(var e=this.chartsBoxes(),o=0;o<e.length;o++)t.paths.push(a.Path.fromRect(e[o].toRect()))},e.prototype.backgroundContainsPoint=function(t){for(var e=this.chartsBoxes(),o=0;o<e.length;o++)if(e[o].containsPoint(t))return!0},e.prototype.createVisual=function(){t.prototype.createVisual.call(this);var e,o=this.options.plotArea,i=o.opacity,r=o.background,n=o.border;void 0===n&&(n={}),""!==(e=r)&&null!==e&&"none"!==e&&"transparent"!==e&&Rr(e)||(r=C,i=0);var s=this._bgVisual=new a.MultiPath({fill:{color:r,opacity:i},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,o=[];if(null!==t)for(var i=0;i<e.length;i++){if("_navigator"!==e[i].pane.options.name){var r=e[i].categoryPoints[t];if(r&&r.length)for(var n=0;n<r.length;n++){var s=r[n];s&&Rr(s.value)&&null!==s.value&&o.push(s)}}}return o},e.prototype.pointsBySeriesIndex=function(t){return this.filterPoints((function(e){return e.series.index===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,o=[],i=0;i<e.length;i++)for(var r=e[i].points,n=0;n<r.length;n++){var s=r[n];s&&!1!==s.visible&&t(s)&&o.push(s)}return o},e.prototype.findPoint=function(t){for(var e=this.charts,o=0;o<e.length;o++)for(var i=e[o].points,r=0;r<i.length;r++){var n=i[r];if(n&&!1!==n.visible&&t(n))return n}},e.prototype.paneByPoint=function(t){for(var e=this.panes,o=0;o<e.length;o++){var i=e[o];if(i.box.containsPoint(t))return i}},e.prototype.detachLabels=function(){var t=this.groupAxes(this.panes),e=t.x,o=t.y;this.detachAxisGroupLabels(o,e),this.detachAxisGroupLabels(e,o)},e.prototype.detachAxisGroupLabels=function(t,e){for(var o=0,i=0;i<t.length;i++){var r=t[i],n=r.pane,s=wh(e,n)||e[0],a=i+o,p=this.createLabelAxis(r,a,s);if(p){o++;var h=n.axes.indexOf(r)+o;n.appendAxisAt(p,h)}}},e.prototype.createLabelAxis=function(t,e,o){var i=t.options.labels,r=i.position,n="end"!==r&&"start"!==r,s=i.visible;if(n||!1===s)return null;var a=this.groupAxes(this.panes),p=o.options.vertical?a.x:a.y,h=this.axisCrossingValues(o,p),c="end"===r,l=o.range(),u=c?l.max:l.min;if(Hr(h[e],l.min,l.max)-u==0)return null;h.splice(e+1,0,u),o.options.axisCrossingValues=h;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}(Cn);function _h(t){return!t.pane.axes.some((function(e){return e.options.vertical===t.options.vertical&&e!==t&&!1!==e.options.visible}))}function bh(t){for(var e,o=t.length,i=0;i<o;i++){var r=t[i],n=!1!==r.options.visible;if(n||_h(r)){var s=n?r.contentBox():r.lineBox();e?e.wrap(s):e=s.clone()}}return e||new gn}function wh(t,e){for(var o=0;o<t.length;o++){var i=t[o];if(i&&i.pane===e)return i}}var Ch=function(t){return t.reduce((function(t,e){return t.concat(e.axes)}),[])};Yr(xh,{series:[],plotArea:{margin:{}},background:"",border:{color:l,width:0},paneDefaults:{title:{}},legend:{inactiveItems:{labels:{color:"#919191"},markers:{color:"#919191"}}}});var kh=xh,Sh={hover:function(t,e){this._dispatchEvent(t,e,"plotAreaHover")},click:function(t,e){this._dispatchEvent(t,e,"plotAreaClick")}};function Ah(t,e,o){var i=e,r=t;if(t.indexOf(".")>-1){for(var n=t.split(".");n.length>1;)r=n.shift(),Rr(i[r])||(i[r]={}),i=i[r];r=n.shift()}i[r]=o}var Ph=function(t){function e(e,o,i){t.call(this);var r=o.canonicalFields(e),n=o.valueFields(e),s=o.sourceFields(e,r),a=this._seriesFields=[],p=i.query(e.type),h=e.aggregate||p;this._series=e,this._binder=o;for(var c=0;c<r.length;c++){var l=r[c],u=void 0;if(nr(h))u=h[l];else{if(0!==c&&!wr(l,n))break;u=h}u&&a.push({canonicalName:l,name:s[c],transform:or(u)?u:_a[u]})}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.aggregatePoints=function(t,e){var o=this._series,i=this._seriesFields,r=this._bindPoints(t||[]),n=r.dataItems[0],s={};if(n&&!Ji(n)&&!A(n)){var a=function(){};a.prototype=n,s=new a}for(var p=0;p<i.length;p++){var h=i[p],c=this._bindField(r.values,h.canonicalName),l=h.transform(c,o,r.dataItems,e);if(!(null===l||!nr(l)||Rr(l.length)||l instanceof Date)){s=l;break}Rr(l)&&Ah(h.name,s,l)}return s},e.prototype._bindPoints=function(t){for(var e=this._binder,o=this._series,i=[],r=[],n=0;n<t.length;n++){var s=t[n];i.push(e.bindPoint(o,s)),r.push(o.data[s])}return{values:i,dataItems:r}},e.prototype._bindField=function(t,e){for(var o=[],i=t.length,r=0;r<i;r++){var n=t[r],s=n.valueFields,a=void 0;a=Rr(s[e])?s[e]:n.fields[e],o.push(a)}return o},e}(O),Th=function(t){function e(){t.call(this),this._defaults={}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.register=function(t,e){for(var o=0;o<t.length;o++)this._defaults[t[o]]=e},e.prototype.query=function(t){return this._defaults[t]},e}(O);Th.current=new Th;var Mh=Th,Oh=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=rr({},t,t.from),o=rr({},t,t.to);e.visible&&(this.labelFrom=this._createLabel(e),this.append(this.labelFrom)),o.visible&&(this.labelTo=this._createLabel(o),this.append(this.labelTo))},e.prototype._createLabel=function(t){var e,o=fr(t),i=this.pointData();return e=o?o(i):this.formatValue(t.format),new yp(e,rr({vertical:this.options.vertical},t),i)},e.prototype.reflow=function(t){this.render();var e=this.labelFrom,o=this.labelTo,i=this.value;this.box=t,e&&(e.options.aboveAxis=i.from>i.to,e.reflow(t)),o&&(o.options.aboveAxis=i.to>i.from,o.reflow(t)),this.note&&this.note.reflow(t)},e}(mp);Oh.prototype.defaults=rr({},Oh.prototype.defaults,{labels:{format:"{0} - {1}"},tooltip:{format:"{1}"}});var Bh=Oh,Rh=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 Bh},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 o=e.series.axis,i=t.from,r=t.to,n=this.valueAxisRanges[o];null!==t&&Ji(i)&&Ji(r)&&((n=this.valueAxisRanges[o]=n||{min:m,max:x}).min=Math.min(n.min,i),n.max=Math.max(n.max,i),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}(Ap);Rh.prototype.plotLimits=Ua.prototype.plotLimits;var Eh=Rh,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.aliasFor=function(){return this.parent},e}(Xa),Lh=function(t){function e(e,o){t.call(this),this.value=e,this.options=o,this.aboveAxis=Wr(this.options.aboveAxis,!0),this.tooltipTracking=!0,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,o=t.labels,i=this.value,r=this.fromPoint=new zh(i,rr({},this.options,{labels:o.from,markers:e.from})),n=this.toPoint=new zh(i,rr({},this.options,{labels:o.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,o=t.to;this.positionLabels(e,o),this.fromPoint.reflow(e),this.toPoint.reflow(o),this.box=this.fromPoint.markerBox().clone().wrap(this.toPoint.markerBox())},e.prototype.createHighlight=function(){var t=new a.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.tooltipAnchor=function(){var t=this.owner.pane.clipBox();if(!t||t.overlaps(this.box)){var e,o,i,r=this.box,n=r.center();return this.options.vertical?(e=n.x,o=r.y1-5,i=u):(e=r.x2+5,o=n.y,i=d),{point:new fn(e,o),align:{horizontal:"left",vertical:i}}}},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 o,i,r=this.options,n=r.labels,s=r.vertical;"auto"===n.position&&(s?e.y1<=t.y1?(i="above",o="below"):(i="below",o="above"):e.x1<=t.x1?(i=v,o=_):(i=_,o=v),n.from&&n.from.position||(this.fromPoint.options.labels.position=o),n.to&&n.to.position||(this.toPoint.options.labels.position=i))},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}(Cn);rr(Lh.prototype,Ga),rr(Lh.prototype,Wa),Lh.prototype.defaults={markers:{visible:!1,background:C,size:8,type:f,border:{width:2},opacity:1},labels:{visible:!1,margin:cr(3),padding:cr(4),animation:{type:"fadeIn",delay:600},position:"auto"},notes:{label:{}},highlight:{markers:{border:{color:C,width:2}},zIndex:100},tooltip:{format:"{0} - {1}"}};var Ih=Lh,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.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 a.Path(t),o=new a.Path(t);e.segments.push.apply(e.segments,this.strokeSegments()),o.segments.push.apply(o.segments,this.stackSegments()),this.visual.append(e),this.visual.append(o)},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}(pp),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.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 ua).process(this.toGeometryPoints(t))},e}(jh),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.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}(jh);rr(Vh.prototype,Ka);var Hh=Vh,Fh=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 Ih},e.prototype.createPoint=function(t,e){var o=e.categoryIx,i=e.category,r=e.series,n=e.seriesIx,s=t.valueFields;if(!jp(s.from)&&!jp(s.to)){if(this.seriesMissingValues(r)!==Ma)return null;s={from:0,to:0}}var a=this.pointOptions(r,n);a=this.evalPointOptions(a,s,i,o,r,n);var p=t.fields.color||r.color;or(r.color)&&(p=a.color);var h=new Ih(s,a);return h.color=p,this.append(h),h},e.prototype.createSegment=function(t,e,o){var i=(e.line||{}).style;return new("smooth"===i?Dh:"step"===i?Hh:jh)(t,e,o)},e.prototype.plotRange=function(t,e){return t?[t.value.from,t.value.to]:[e,e]},e.prototype.valueSlot=function(t,e){var o=t.getSlot(e[0],e[0],!this.options.clip),i=t.getSlot(e[1],e[1],!this.options.clip);if(o&&i)return{from:o,to:i}},e.prototype.pointSlot=function(t,e){var o,i,r=e.from,n=e.to;return this.options.invertAxes?(o=new gn(r.x1,t.y1,r.x2,t.y2),i=new gn(n.x1,t.y1,n.x2,t.y2)):(o=new gn(t.x1,r.y1,t.x2,r.y2),i=new gn(t.x1,n.y1,t.x2,n.y2)),{from:o,to:i}},e.prototype.addValue=function(e,o){var i=e.valueFields;Ji(i.from)||(i.from=i.to),Ji(i.to)||(i.to=i.from),t.prototype.addValue.call(this,e,o)},e.prototype.updateRange=function(t,e){if(null!==t&&Ji(t.from)&&Ji(t.to)){var o=e.series.axis,i=this.valueAxisRanges[o]=this.valueAxisRanges[o]||{min:m,max:x},r=t.from,n=t.to;i.min=Math.min(i.min,r,n),i.max=Math.max(i.max,r,n)}},e.prototype.formatPointValue=function(t,e){var o=t.value;return this.chartService.format.auto(e,o.from,o.to)},e.prototype.animationPoints=function(){for(var t=this.points,e=[],o=0;o<t.length;o++){var i=t[o];i&&(e.push((i.fromPoint||{}).marker),e.push((i.toPoint||{}).marker))}return e.concat(this._segments)},e}(Ua);rr(Fh.prototype,ep,np);var Nh=Fh,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.reflow=function(t){var e=this.options,o=this.value,i=this.owner.seriesValueAxis(e),r=[],n=[],s=[],a=i.getSlot(o.low,o.high),p=i.getSlot(o.open,o.open),h=i.getSlot(o.close,o.close);p.x1=h.x1=a.x1=t.x1,p.x2=h.x2=a.x2=t.x2;var c=a.center().x;r.push([p.x1,p.y1]),r.push([c,p.y1]),n.push([c,h.y1]),n.push([h.x2,h.y1]),s.push([c,a.y1]),s.push([c,a.y2]),this.lines=[r,n,s],this.box=a.clone().wrap(p.clone().wrap(h)),this.reflowNote()},e.prototype.createBody=function(){},e}(Tp),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.pointType=function(){return Uh},e}(Bp),Wh=function(t){function e(e,o,i){t.call(this),this.from=e,this.to=o,this.series=i}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,o=this.to.box,i=[];if(t.isVertical){var r=t.aboveAxis?e.y1:e.y2;i.push([e.x1,r],[o.x2,r])}else{var n=t.aboveAxis?e.x2:e.x1;i.push([n,e.y1],[n,o.y2])}return i},e.prototype.createVisual=function(){t.prototype.createVisual.call(this);var e=this.series.line||{},o=a.Path.fromPoints(this.linePoints(),{stroke:{color:e.color,width:e.width,opacity:e.opacity,dashType:e.dashType}});Ki(o),this.visual.append(o)},e}(Cn);Yr(Wh,{animation:{type:"fadeIn",delay:600}});var qh=Wh,Xh=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,o=Fa(e),i=!this.options.invertAxes,r=0;r<e.length;r++)for(var n=e[r],s=0,a=0,p=0;p<o;p++){var h=Ca.current.bindPoint(n,p),c=h.valueFields.value,l=h.fields.summary,u=s,d=void 0;l?"total"===l.toLowerCase()?(h.valueFields.value=s,u=0,d=s):(h.valueFields.value=a,d=u-a,a=0):Ji(c)&&(a+=c,d=s+=c),t(h,{category:this.categoryAxis.categoryAt(p),categoryIx:p,series:n,seriesIx:r,total:s,runningTotal:a,from:u,to:d,isVertical:i})}},e.prototype.updateRange=function(e,o){t.prototype.updateRange.call(this,{value:o.to},o)},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,o=this.segments=[],i=0;i<t.length;i++){var r=t[i],n=e[i];if(n)for(var s=void 0,a=0;a<n.length;a++){var p=n[a];if(p&&s){var h=new qh(s,p,r);o.push(h),this.append(h)}s=p}}},e}(Ap),Yh=["area","verticalArea","rangeArea","verticalRangeArea"],Zh=[Ra,za].concat(Yh),Qh=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 dp,t.length>0){this.invertAxes=wr(t[0].type,[Oa,"bullet",za,"verticalArea","verticalRangeArea","rangeBar","horizontalWaterfall","verticalBoxPlot"]);for(var e=0;e<t.length;e++){var o=t[e].stack;if(o&&"100%"===o.type){this.stack100=!0;break}}}},e.prototype.render=function(t){void 0===t&&(t=this.panes),this.createCategoryAxes(t),this.aggregateCategories(t),this.createCategoryAxesLabels(t),this.createCharts(t),this.createValueAxes(t)},e.prototype.removeAxis=function(e){var o=e.options.name;t.prototype.removeAxis.call(this,e),e instanceof Bs?delete this.namedCategoryAxes[o]:(this.valueAxisRangeTracker.reset(o),delete this.namedValueAxes[o]),e===this.categoryAxis&&delete this.categoryAxis,e===this.valueAxis&&delete this.valueAxis},e.prototype.createCharts=function(t){for(var e=this.groupSeriesByPane(),o=0;o<t.length;o++){var i=t[o],r=e[i.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],i)}},e.prototype.createChartGroup=function(t,e){this.createAreaChart(lh(t,["area","verticalArea"]),e),this.createRangeAreaChart(lh(t,["rangeArea","verticalRangeArea"]),e),this.createBarChart(lh(t,[Ba,Oa]),e),this.createRangeBarChart(lh(t,["rangeColumn","rangeBar"]),e),this.createBulletChart(lh(t,["bullet","verticalBullet"]),e),this.createCandlestickChart(lh(t,"candlestick"),e),this.createBoxPlotChart(lh(t,["boxPlot","verticalBoxPlot"]),e),this.createOHLCChart(lh(t,"ohlc"),e),this.createWaterfallChart(lh(t,["waterfall","horizontalWaterfall"]),e),this.createLineChart(lh(t,[Ra,za]),e)},e.prototype.aggregateCategories=function(t){var e=this.srcSeries||this.series,o=[];this._currentPointsCache={},this._seriesPointsCache=this._seriesPointsCache||{};for(var i=0;i<e.length;i++){var r=e[i],n=this.seriesCategoryAxis(r),s=this.findPane(n.options.pane);r=(ch(n.options.type,y)||r.categoryField)&&wr(s,t)?this.aggregateSeries(r,n):this.filterSeries(r,n),o.push(r)}this._seriesPointsCache=this._currentPointsCache,this._currentPointsCache=null,this.srcSeries=e,this.series=o},e.prototype.filterSeries=function(t,e){var o=(t.data||{}).length;if(e._seriesMax=Math.max(e._seriesMax||0,o),!Ji(e.options.min)&&!Ji(e.options.max))return t;var i=e.currentRangeIndices(),r=wr(t.type,Zh),n=rr({},t);return n.data=(n.data||[]).slice(i.min,i.max+1),r&&mh(n,i,o,(function(o){return{item:t.data[o],category:e.categoryAt(o,!0),categoryIx:o-i.min}}),(function(e){return Rr(t.data[e])})),n},e.prototype.clearSeriesPointsCache=function(){this._seriesPointsCache={}},e.prototype.seriesSourcePoints=function(t,e){var o=t.index+";"+e.categoriesHash();if(this._seriesPointsCache[o])return this._currentPointsCache[o]=this._seriesPointsCache[o],this._seriesPointsCache[o];var i=e.options,r=i.srcCategories,n=ch(i.type,y),s=t.data,a=n?uh:ba,p=[];n||e.mapCategories();for(var h=0;h<s.length;h++){var c=void 0;if(c=t.categoryField?a(t.categoryField,s[h],this.chartService.intl):r[h],Rr(c)&&null!==c){var l=e.totalIndex(c);p[l]=p[l]||{items:[],category:c},p[l].items.push(h)}}return this._currentPointsCache[o]=p,p},e.prototype.aggregateSeries=function(t,e){if(!t.data.length)return t;for(var o=this.seriesSourcePoints(t,e),i=rr({},t),r=new Ph(rr({},t),Ca.current,Mh.current),n=i.data=[],s=e.options.dataItems||[],a=e.currentRangeIndices(),p=function(t){var i=t-a.min,n=o[t];if(n||(n=o[t]={}),n.categoryIx=i,!n.item){var s=e.categoryAt(t,!0);n.category=s,n.item=r.aggregatePoints(n.items,s)}return n},h=a.min;h<=a.max;h++){var c=p(h);n[c.categoryIx]=c.item,c.items&&c.items.length&&(s[c.categoryIx]=c.item)}return wr(i.type,Zh)&&mh(i,a,e.totalCount(),p,(function(t){return o[t]})),e.options.dataItems=s,i},e.prototype.appendChart=function(e,o){var i=e.options.series,r=this.seriesCategoryAxis(i[0]),n=r.options.categories,s=Math.max(0,Fa(i)-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,o)},e.prototype.seriesPaneName=function(t){var e=this.options,o=t.axis,i=mr([].concat(e.valueAxis),(function(t){return t.name===o}))[0],r=((e.panes||[{}])[0]||{}).name||"default";return(i||{}).pane||r},e.prototype.seriesCategoryAxis=function(t){var e=t.categoryAxis,o=e?this.namedCategoryAxes[e]:this.categoryAxis;if(!o)throw new Error("Unable to locate category axis with name "+e);return o},e.prototype.stackableChartOptions=function(t,e){var o=t.stack;return{isStacked:o,isStacked100:o&&"100%"===o.type,clip:e.options.clip}},e.prototype.groupSeriesByCategoryAxis=function(t){for(var e=[],o={},i=0;i<t.length;i++){var r=t[i].categoryAxis||"$$default$$";o.hasOwnProperty(r)||(o[r]=!0,e.push(r))}for(var n=[],s=0;s<e.length;s++){var a=$h(t,e[s],s);0!==a.length&&n.push(a)}return n},e.prototype.createBarChart=function(t,e){if(0!==t.length){var o=t[0],i=new Ap(this,Object.assign({series:t,invertAxes:this.invertAxes,gap:o.gap,spacing:o.spacing},this.stackableChartOptions(o,e)));this.appendChart(i,e)}},e.prototype.createRangeBarChart=function(t,e){if(0!==t.length){var o=t[0],i=new Eh(this,{series:t,invertAxes:this.invertAxes,gap:o.gap,spacing:o.spacing});this.appendChart(i,e)}},e.prototype.createBulletChart=function(t,e){if(0!==t.length){var o=t[0],i=new Zp(this,{series:t,invertAxes:this.invertAxes,gap:o.gap,spacing:o.spacing,clip:e.options.clip});this.appendChart(i,e)}},e.prototype.createLineChart=function(t,e){if(0!==t.length){var o=t[0],i=new ap(this,Object.assign({invertAxes:this.invertAxes,series:t},this.stackableChartOptions(o,e)));this.appendChart(i,e)}},e.prototype.createAreaChart=function(t,e){if(0!==t.length){var o=t[0],i=new up(this,Object.assign({invertAxes:this.invertAxes,series:t},this.stackableChartOptions(o,e)));this.appendChart(i,e)}},e.prototype.createRangeAreaChart=function(t,e){if(0!==t.length){var o=new Nh(this,{invertAxes:this.invertAxes,series:t,clip:e.options.clip});this.appendChart(o,e)}},e.prototype.createOHLCChart=function(t,e){if(0!==t.length){var o=t[0],i=new Gh(this,{invertAxes:this.invertAxes,gap:o.gap,series:t,spacing:o.spacing,clip:e.options.clip});this.appendChart(i,e)}},e.prototype.createCandlestickChart=function(t,e){if(0!==t.length){var o=t[0],i=new Bp(this,{invertAxes:this.invertAxes,gap:o.gap,series:t,spacing:o.spacing,clip:e.options.clip});this.appendChart(i,e)}},e.prototype.createBoxPlotChart=function(t,e){if(0!==t.length){var o=t[0],i=new Lp(this,{invertAxes:this.invertAxes,gap:o.gap,series:t,spacing:o.spacing,clip:e.options.clip});this.appendChart(i,e)}},e.prototype.createWaterfallChart=function(t,e){if(0!==t.length){var o=t[0],i=new Xh(this,{series:t,invertAxes:this.invertAxes,gap:o.gap,spacing:o.spacing});this.appendChart(i,e)}},e.prototype.axisRequiresRounding=function(t,e){for(var o=lh(this.series,La),i=0;i<this.series.length;i++){var r=this.series[i];if(wr(r.type,Yh)){var n=r.line;n&&"step"===n.style&&o.push(r)}}for(var s=0;s<o.length;s++){var a=o[s].categoryAxis||"";if(a===t||!a&&0===e)return!0}},e.prototype.aggregatedAxis=function(t,e){for(var o=this.series,i=0;i<o.length;i++){var r=o[i].categoryAxis||"";if((r===t||!r&&0===e)&&o[i].categoryField)return!0}},e.prototype.createCategoryAxesLabels=function(){for(var t=this.axes,e=0;e<t.length;e++)t[e]instanceof Bs&&t[e].createLabels()},e.prototype.createCategoryAxes=function(t){for(var e=this.invertAxes,o=[].concat(this.options.categoryAxis),i=[],r=0;r<o.length;r++){var n=o[r];if(wr(this.findPane(n.pane),t)){var s=n.name,a=n.categories;void 0===a&&(a=[]),n=rr({vertical:e,reverse:!e&&this.chartService.rtl,axisCrossingValue:e?m:0},n),Rr(n.justified)||(n.justified=this.isJustified()),this.axisRequiresRounding(s,r)&&(n.justified=!1);var p=void 0;if(p=dh(n,a[0])?new Hs(n,this.chartService):new Bs(n,this.chartService),o[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,i.push(p),this.appendAxis(p)}}var h=this.categoryAxis||i[0];this.categoryAxis=h,e?this.axisY=h:this.axisX=h},e.prototype.isJustified=function(){for(var t=this.series,e=0;e<t.length;e++){if(!wr(t[e].type,Yh))return!1}return!0},e.prototype.createValueAxes=function(t){var e=this.valueAxisRangeTracker,o=e.query(),i=[].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<i.length;a++){var p=i[a];if(wr(this.findPane(p.pane),t)){var h=p.name,c=ch(p.type,"log")?{min:.1,max:1}:{min:0,max:1},l=e.query(h)||o||c;0===a&&l&&o&&(l.min=Math.min(l.min,o.min),l.max=Math.max(l.max,o.max));var u=new(ch(p.type,"log")?Js:Xs)(l.min,l.max,rr({},n,p),this.chartService);if(h){if(this.namedValueAxes[h])throw new Error("Value axis with name "+h+" is already defined");this.namedValueAxes[h]=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,o){var i=t._eventCoordinates(e),r=new fn(i.x,i.y),n=this.pointPane(r),s=[],a=[];if(n){for(var p=n.axes,h=0;h<p.length;h++){var c=p[h];c.getValue?ah(a,c.getValue(r)):ah(s,c.getCategory(r))}0===s.length&&ah(s,this.categoryAxis.getCategory(r)),s.length>0&&a.length>0&&t.trigger(o,{element:jr(e),originalEvent:e,category:fh(s),value:fh(a)})}},e.prototype.pointPane=function(t){for(var e=this.panes,o=0;o<e.length;o++){var i=e[o];if(i.contentBox.containsPoint(t))return i}},e.prototype.updateAxisOptions=function(t,e){Kh(this.options,t,e),Kh(this.originalOptions,t,e)},e}(kh);function Kh(t,e,o){rr([].concat(e instanceof Bs?t.categoryAxis:t.valueAxis)[e.axisIndex],o)}function $h(t,e,o){return mr(t,(function(t){return 0===o&&!t.categoryAxis||t.categoryAxis===e}))}Yr(Qh,{categoryAxis:{},valueAxis:{}}),rr(Qh.prototype,Sh);var Jh=Qh;function tc(){this._defaultPrevented=!0}var ec=function(t){function e(){t.call(this),this._points=[]}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.destroy=function(){this._points=[]},e.prototype.show=function(t,e){var o=[].concat(t);this.hide();for(var i=0;i<o.length;i++){var r=o[i];r&&r.toggleHighlight&&r.hasHighlight()&&(this.togglePointHighlight(r,!0,e),this._points.push(r))}},e.prototype.togglePointHighlight=function(t,e,o){var i=(t.options.highlight||{}).toggle;if(i){var r={category:t.category,series:t.series,dataItem:t.dataItem,value:t.value,stackValue:t.stackValue,preventDefault:tc,visual:t.highlightVisual(),show:e};i(r),r._defaultPrevented||t.toggleHighlight(e,o)}else t.toggleHighlight(e,o)},e.prototype.hide=function(){for(var t=this._points;t.length;)this.togglePointHighlight(t.pop(),!1)},e.prototype.isHighlighted=function(t){for(var e=this._points,o=0;o<e.length;o++){if(t===e[o])return!0}return!1},e}(O);function oc(t,e){var o=(e||"").toLowerCase(),i=t.event;return"none"===o&&!(i.ctrlKey||i.shiftKey||i.altKey)||i[o+"Key"]}function ic(t){for(var e={},o=0;o<t.length;o++){var i=t[o];i.axis.options.name&&(e[i.axis.options.name]={min:i.range.min,max:i.range.max})}return e}var rc=function(t){function e(e,o){t.call(this),this.plotArea=e,this.options=rr({},this.options,o)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.start=function(t){return this._active=oc(t,this.options.key),this._active},e.prototype.move=function(t){if(this._active){var e=this.axisRanges=this._panAxes(t,k).concat(this._panAxes(t,S));if(e.length)return this.axisRanges=e,ic(e)}},e.prototype.end=function(){var t=this._active;return this._active=!1,t},e.prototype.pan=function(){var t=this.plotArea,e=this.axisRanges;if(e.length){for(var o=0;o<e.length;o++){var i=e[o];t.updateAxisOptions(i.axis,i.range)}t.redraw(t.panes)}},e.prototype.destroy=function(){delete this.plotArea},e.prototype._panAxes=function(t,e){var o=this.plotArea,i=-t[e].delta,r=(this.options.lock||"").toLowerCase(),n=[];if(0!==i&&(r||"").toLowerCase()!==e)for(var s=o.axes,a=0;a<s.length;a++){var p=s[a];if(e===k&&!p.options.vertical||e===S&&p.options.vertical){var h=p.pan(i);h&&(h.limitRange=!0,n.push({axis:p,range:h}))}}return n},e}(O);rc.prototype.options={key:"none",lock:"none"};var nc=rc,sc=function(t){function e(e,o){t.call(this),this.chart=e,this.options=rr({},this.options,o),this.createElement()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.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)},e.prototype.removeElement=function(){this._marquee.parentNode&&this._marquee.parentNode.removeChild(this._marquee)},e.prototype.setStyles=function(t){hr(this._marquee,t)},e.prototype.start=function(t){if(oc(t,this.options.key)){var e=this.chart,o=e._eventCoordinates(t),i=this._zoomPane=e._plotArea.paneByPoint(o),r=i?i.chartsBox().clone():null;if(i&&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},e.prototype._elementOffset=function(){var t=this.chart.element,e=hr(t,["paddingLeft","paddingTop"]),o=e.paddingLeft,i=e.paddingTop,r=zr(t);return{left:o+r.left,top:i+r.top}},e.prototype.move=function(t){this._zoomPane&&this.setStyles(this._selectionPosition(t))},e.prototype.end=function(t){if(this._zoomPane){var e=this._elementOffset(),o=this._selectionPosition(t);o.left-=e.left,o.top-=e.top;var i={x:o.left,y:o.top},r={x:o.left+o.width,y:o.top+o.height};return this._updateAxisRanges(i,r),this.removeElement(),delete this._zoomPane,ic(this.axisRanges)}},e.prototype.zoom=function(){var t=this.axisRanges;if(t&&t.length){for(var e=this.chart._plotArea,o=0;o<t.length;o++){var i=t[o];e.updateAxisOptions(i.axis,i.range)}e.redraw(e.panes)}},e.prototype.destroy=function(){this.removeElement(),delete this._marquee,delete this.chart},e.prototype._updateAxisRanges=function(t,e){for(var o=(this.options.lock||"").toLowerCase(),i=[],r=this._zoomPane.axes,n=0;n<r.length;n++){var s=r[n],a=s.options.vertical;if((o!==k||a)&&(o!==S||!a)&&Rr(s.axisIndex)){var p=s.pointsRange(t,e);p&&i.push({axis:s,range:p})}}this.axisRanges=i},e.prototype._selectionPosition=function(t){var e=this._zoomPaneClipBox,o={x:t.x.startLocation,y:t.y.startLocation},i=t.x.location,r=t.y.location,n=(this.options.lock||"").toLowerCase(),s=Math.min(o.x,i),a=Math.min(o.y,r),p=Math.abs(o.x-i),h=Math.abs(o.y-r);return n===k&&(s=e.x1,p=e.width()),n===S&&(a=e.y1,h=e.height()),i>e.x2&&(p=e.x2-o.x),i<e.x1&&(p=o.x-e.x1),r>e.y2&&(h=e.y2-o.y),r<e.y1&&(h=o.y-e.y1),{left:Math.max(s,e.x1),top:Math.max(a,e.y1),width:p,height:h}},e}(O);sc.prototype.options={key:"shift",lock:"none"};var ac=sc,pc=function(t){function e(e,o){t.call(this),this.chart=e,this.options=rr({rate:.3},this.options,o)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.updateRanges=function(t,e){for(var o=(this.options.lock||"").toLowerCase(),i=[],r=this.chart._plotArea.axes,n=0;n<r.length;n++){var s=r[n],a=s.options.vertical;if((o!==k||a)&&(o!==S||!a)&&s.zoomRange){var p=Hr(this.options.rate,.01,.9),h=s.zoomRange(-t*p,e);h&&i.push({axis:s,range:h})}}return this.axisRanges=i,ic(i)},e.prototype.zoom=function(){var t=this.axisRanges,e=this.chart._plotArea;if(t&&t.length&&e.updateAxisOptions){for(var o=0;o<t.length;o++){var i=t[o];e.updateAxisOptions(i.axis,i.range)}e.redraw(e.panes)}},e.prototype.destroy=function(){delete this.chart},e}(O),hc=function(t){function e(e,o){t.call(this,e),this.chartService=o}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.render=function(){var t=this.children,e=this.options,o=e.vertical;this.visual=new a.Layout(null,{spacing:o?0:e.spacing,lineSpacing:o?e.spacing:0,orientation:o?"vertical":"horizontal",reverse:e.rtl,alignItems:o?"start":"center"});for(var i=0;i<t.length;i++){var r=t[i];r.reflow(new gn),r.renderVisual()}},e.prototype.reflow=function(t){this.visual.rect(t.toRect()),this.visual.reflow();var e=this.visual.clippedBBox();this.box=e?jn(e):new gn},e.prototype.renderVisual=function(){this.addVisual()},e.prototype.createVisual=function(){},e}(Cn),cc=function(t){function e(e){t.call(this,e),this.createContainer(),e.rtl?(this.createLabel(),this.createMarker()):(this.createMarker(),this.createLabel())}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createContainer=function(){this.container=new En({vertical:!1,wrap:!1,align:d,spacing:this.options.spacing}),this.append(this.container)},e.prototype.createMarker=function(){this.container.append(new Pn(this.markerOptions()))},e.prototype.markerOptions=function(){var t=this.options,e=t.markerColor;return rr({},t.markers,{background:e,border:{color:e}})},e.prototype.createLabel=function(){var t=this.options,e=rr({},t.labels);this.container.append(new Vn(t.text,e))},e.prototype.renderComplete=function(){t.prototype.renderComplete.call(this);var e=this.options.cursor||{},o=this._itemOverlay=a.Path.fromRect(this.container.box.toRect(),{fill:{color:C,opacity:0},stroke:null,cursor:e.style||e});this.appendVisual(o)},e.prototype.click=function(t,e){var o=this.eventArgs(e);!t.trigger("legendItemClick",o)&&e&&"contextmenu"===e.type&&e.preventDefault()},e.prototype.over=function(t,e){var o=this.eventArgs(e);return t.trigger("legendItemHover",o)||t._legendItemHover(o.seriesIndex,o.pointIndex),!0},e.prototype.out=function(t,e){t._unsetActivePoint(),t.trigger("legendItemLeave",this.eventArgs(e))},e.prototype.eventArgs=function(t){var e=this.options;return{element:jr(t),text:e.text,series:e.series,seriesIndex:e.series.index,pointIndex:e.pointIndex}},e.prototype.renderVisual=function(){var e=this,o=this.options,i=o.visual;i?(this.visual=i({active:o.active,series:o.series,sender:this.getSender(),pointIndex:o.pointIndex,options:{markers:this.markerOptions(),labels:o.labels},createVisual:function(){e.createVisual(),e.renderChildren(),e.renderComplete();var t=e.visual;return delete e.visual,t}}),this.addVisual()):t.prototype.renderVisual.call(this)},e}(Sn),lc=function(t){function e(e,o){void 0===o&&(o={}),t.call(this,e),this.chartService=o,wr(this.options.position,[b,_,u,v,"custom"])||(this.options.position=_),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,o=t.align,i=e,r=d;"custom"===e?i=v:wr(e,[b,u])?(i="start"===o?v:"end"===o?_:d,r=e):o&&("start"===o?r=b:"end"===o&&(r=u)),this.container=new Sn({margin:t.margin,padding:t.padding,background:t.background,border:t.border,vAlign:r,align:i,zIndex:t.zIndex,shrinkToFit:!0}),this.hasTitle()?this.itemsContainer=new Sn({vAlign:r,align:i,zIndex:t.zIndex,shrinkToFit:!0}):this.itemsContainer=this.container,this.append(this.container)},e.prototype.createItems=function(){var t=this.getService(),e=this.options,o=this.isVertical(),i=new hc({vertical:o,spacing:e.spacing,rtl:t.rtl},t),r=e.items;e.reverse&&(r=r.slice(0).reverse());for(var n=r.length,s=0;s<n;s++){var a=r[s];i.append(new cc(rr({},{markers:e.markers,labels:e.labels,rtl:t.rtl},e.item,a)))}i.render(),this.itemsContainer.append(i)},e.prototype.isVertical=function(){var t=this.options,e=t.orientation,o=t.position;return"custom"===o&&"horizontal"!==e||(Rr(e)?"horizontal"!==e:wr(o,[v,_]))},e.prototype.hasItems=function(){return this.container.children[0].children.length>0},e.prototype.reflow=function(t){var e=this.options,o=t.clone();this.hasItems()?("custom"===e.position?(this.containerCustomReflow(o),this.box=o):this.containerReflow(o),this.hasTitle()&&this.title.reflow(new gn(this.container.box.x1,this.title.box.y1,this.container.box.x2,this.title.box.y2))):this.box=o},e.prototype.containerReflow=function(t){var e=this.options,o=this.container,i=e.position,r=e.width,n=e.height,s=i===b||i===u?k:S,a=this.isVertical(),p=t.clone(),h=t.clone();i!==v&&i!==_||(h.y1=p.y1=0),a&&n?(h.y2=h.y1+n,h.align(p,S,o.options.vAlign)):!a&&r&&(h.x2=h.x1+r,h.align(p,k,o.options.align)),o.reflow(h);var c=(h=o.box).clone();(e.offsetX||e.offsetY)&&(h.translate(e.offsetX,e.offsetY),o.reflow(h)),c[s+1]=t[s+1],c[s+2]=t[s+2],this.box=c},e.prototype.containerCustomReflow=function(t){var e=this.options,o=this.container,i=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),o.reflow(p),p=o.box,o.reflow(new gn(i,r,i+p.width(),r+p.height()))},e.prototype.renderVisual=function(){this.hasItems()&&t.prototype.renderVisual.call(this)},e.prototype.createLegendTitle=function(t){var e=rr({},{color:l,position:b,align:d},t),o=e.text;if(t&&!1!==t.visible){if(Rr(e)&&e.visible){var i=fr(e);i?o=i({text:o}):e.format&&(o=this.chartService.format.auto(e.format,o))}this.title=new Vn(o,e),this.createTitleLayout(),this.appendTitleLayoutContent()}},e.prototype.createTitleLayout=function(){this.layout=new En({vertical:!0,wrap:!1}),this.container.append(this.layout)},e.prototype.hasTitle=function(){return Boolean(this.options.title&&!1!==this.options.title.visible)},e.prototype.appendTitleLayoutContent=function(){this.options.title.position===u?(this.layout.append(this.itemsContainer),this.layout.append(this.title)):(this.layout.append(this.title),this.layout.append(this.itemsContainer))},e}(Cn);Yr(lc,{position:_,items:[],offsetX:0,offsetY:0,margin:cr(5),padding:cr(5),border:{color:l,width:0},item:{cursor:"pointer",spacing:6},spacing:6,background:"",zIndex:1,markers:{border:{width:0},width:15,height:3,type:"rect",align:v,vAlign:d}});var uc=lc,dc=function(t){function e(){t.call(this),this._registry=[]}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.register=function(t,e){this._registry.push({type:t,seriesTypes:e})},e.prototype.create=function(t,e,o){for(var i,r=this._registry,n=r[0],s=0;s<r.length;s++){var a=r[s];if((i=lh(t,a.seriesTypes)).length>0){n=a;break}}return new n.type(i,e,o)},e}(O);dc.current=new dc;var fc=dc;function yc(t){var e=document.createElement("div");return t&&(e.className=t),e}function gc(t){for(var e=t;e&&!xr(e,"k-handle");)e=e.parentNode;return e}var vc=function(t){function e(e,o,i,r){t.call(this);var n=e.element;this.options=rr({},this.options,i),this.chart=e,this.observer=r,this.chartElement=n,this.categoryAxis=o,this._dateAxis=this.categoryAxis instanceof Hs,this.initOptions(),this.visible=this.options.visible&&n.offsetHeight,this.visible&&(this.createElements(),this.set(this._index(this.options.from),this._index(this.options.to)),this.bindEvents())}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.onPane=function(t){return this.categoryAxis.pane===t},e.prototype.createElements=function(){var t=this.options,e=this.wrapper=yc("k-selector");hr(e,{top:t.offset.top,left:t.offset.left,width:t.width,height:t.height,direction:"ltr"});var o=this.selection=yc("k-selection");this.leftMask=yc("k-mask"),this.rightMask=yc("k-mask"),e.appendChild(this.leftMask),e.appendChild(this.rightMask),e.appendChild(o),o.appendChild(yc("k-selection-bg"));var i=this.leftHandle=yc("k-handle k-left-handle"),r=this.rightHandle=yc("k-handle k-right-handle");i.appendChild(yc()),r.appendChild(yc()),o.appendChild(i),o.appendChild(r),this.chartElement.appendChild(e);var n=hr(o,["borderLeftWidth","borderRightWidth","height"]),s=hr(i,"height").height,a=hr(r,"height").height;t.selection={border:{left:n.borderLeftWidth,right:n.borderRightWidth}},hr(i,{top:(n.height-s)/2}),hr(r,{top:(n.height-a)/2}),e.style.cssText=e.style.cssText},e.prototype.bindEvents=function(){var t;!1!==this.options.mousewheel&&(this._mousewheelHandler=this._mousewheel.bind(this),Br(this.wrapper,((t={})[Ia]=this._mousewheelHandler,t))),this._domEvents=ns.create(this.wrapper,{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)})},e.prototype.initOptions=function(){var t=this.options,e=this.categoryAxis.pane.chartsBox(),o=this.chart.chartService.intl;this._dateAxis&&rr(t,{min:Ps(o,t.min),max:Ps(o,t.max),from:Ps(o,t.from),to:Ps(o,t.to)});var i=hr(this.chartElement,["paddingLeft","paddingTop"]),r=i.paddingLeft,n=i.paddingTop;this.options=rr({},{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)},e.prototype.destroy=function(){var t;this._domEvents&&(this._domEvents.destroy(),delete this._domEvents),clearTimeout(this._mwTimeout),this._state=null,this.wrapper&&(this._mousewheelHandler&&(Gr(this.wrapper,((t={})[Ia]=this._mousewheelHandler,t)),this._mousewheelHandler=null),this.chartElement.removeChild(this.wrapper),this.wrapper=null)},e.prototype._rangeEventArgs=function(t){return{axis:this.categoryAxis.options,from:this._value(t.from),to:this._value(t.to)}},e.prototype._start=function(t){var e=this.options,o=jr(t);if(!this._state&&o){this.chart._unsetActivePoint(),this._state={moveTarget:gc(o)||o,startLocation:t.x?t.x.location:0,range:{from:this._index(e.from),to:this._index(e.to)}};var i=this._rangeEventArgs({from:this._index(e.from),to:this._index(e.to)});this.trigger("selectStart",i)&&(this._state=null)}},e.prototype._press=function(t){var e;(e=this._state?this._state.moveTarget:gc(jr(t)))&&P(e,"k-handle-active")},e.prototype._move=function(t){if(this._state){var e=this._state,o=this.options,i=this.categoryAxis,r=e.range,n=e.moveTarget,s=i.options.reverse,a=this._index(o.from),p=this._index(o.to),h=this._index(o.min),c=this._index(o.max),l=e.startLocation-t.x.location,u=r.from,d=r.to,f=r.to-r.from,y=hr(this.wrapper,"width").width/(i.categoriesCount()-1),g=Math.round(l/y)*(s?-1:1);if(n){var v=xr(n,"k-left-handle"),m=xr(n,"k-right-handle");xr(n,"k-selection k-selection-bg")?(r.from=Math.min(Math.max(h,a-g),c-f),r.to=Math.min(r.from+f,c)):v&&!s||m&&s?(r.from=Math.min(Math.max(h,a-g),c-1),r.to=Math.max(r.from+1,r.to)):(v&&s||m&&!s)&&(r.to=Math.min(Math.max(h+1,p-g),c),r.from=Math.min(r.to-1,r.from)),r.from===u&&r.to===d||(this.move(r.from,r.to),this.trigger("select",this._rangeEventArgs(r)))}}},e.prototype._end=function(){if(this._state){var t=this._state.moveTarget;t&&M(t,"k-handle-active");var e=this._state.range;this.set(e.from,e.to),this.trigger("selectEnd",this._rangeEventArgs(e)),delete this._state}},e.prototype._tap=function(t){var e=this.options,o=this.categoryAxis,i=this.chart._eventCoordinates(t),r=o.pointCategoryIndex(new fn(i.x,o.box.y1)),n=this._index(e.from),s=this._index(e.to),a=this._index(e.min),p=this._index(e.max),h=s-n,c=n+h/2,l={},u=3===t.event.which,d=Math.round(c-r);this._state||u||(this.chart._unsetActivePoint(),o.options.justified||d--,l.from=Math.min(Math.max(a,n-d),p-h),l.to=Math.min(l.from+h,p),this._start(t),this._state&&(this._state.range=l,this.trigger("select",this._rangeEventArgs(l)),this._end()))},e.prototype._mousewheel=function(t){var e=this,o=Tr(t);if(this._start({target:this.selection}),this._state){var i=this._state.range;t.preventDefault(),t.stopPropagation(),Math.abs(o)>1&&(o*=3),this.options.mousewheel.reverse&&(o*=-1),this.expand(o)&&this.trigger("select",{axis:this.categoryAxis.options,delta:o,originalEvent:t,from:this._value(i.from),to:this._value(i.to)}),this._mwTimeout&&clearTimeout(this._mwTimeout),this._mwTimeout=setTimeout((function(){e._end()}),150)}},e.prototype._gesturestart=function(t){var e=this.options;this._state={range:{from:this._index(e.from),to:this._index(e.to)}};var o=this._rangeEventArgs(this._state.range);this.trigger("selectStart",o)?this._state=null:t.preventDefault()},e.prototype._gestureend=function(){this._state&&(this.trigger("selectEnd",this._rangeEventArgs(this._state.range)),delete this._state)},e.prototype._gesturechange=function(t){var e=this.chart,o=this._state,i=this.options,r=this.categoryAxis,n=o.range,s=e._toModelCoordinates(t.touches[0].x.location).x,a=e._toModelCoordinates(t.touches[1].x.location).x,p=Math.min(s,a),h=Math.max(s,a);t.preventDefault(),n.from=r.pointCategoryIndex(new fn(p))||i.min,n.to=r.pointCategoryIndex(new fn(h))||i.max,this.move(n.from,n.to),this.trigger("select",this._rangeEventArgs(n))},e.prototype._index=function(t){var e=t;return t instanceof Date&&(e=this.categoryAxis.categoryIndex(t)),e},e.prototype._value=function(t){var e=t;return this._dateAxis&&(e=this.categoryAxis.categoryAt(t))>this.options.max&&(e=this.options.max),e},e.prototype._slot=function(t){var e=this.categoryAxis,o=this._index(t);return e.getSlot(o,o,!0)},e.prototype.move=function(t,e){var o=this.options,i=this.categoryAxis.options.reverse,r=o.offset,n=o.padding,s=o.selection.border,a=i?e:t,p=i?t:e,h="x"+(i?2:1),c=this._slot(a),l=Ur(c[h]-r.left+n.left);hr(this.leftMask,{width:l}),hr(this.selection,{left:l}),c=this._slot(p);var u=Ur(o.width-(c[h]-r.left+n.left));hr(this.rightMask,{width:u});var d=o.width-u;d!==o.width&&(d+=s.right),hr(this.rightMask,{left:d}),hr(this.selection,{width:Math.max(o.width-(l+u)-s.right,0)})},e.prototype.set=function(t,e){var o=this.options,i=this._index(o.min),r=this._index(o.max),n=Hr(this._index(t),i,r),s=Hr(this._index(e),n+1,r);o.visible&&this.move(n,s),o.from=this._value(n),o.to=this._value(s)},e.prototype.expand=function(t){var e=this.options,o=this._index(e.min),i=this._index(e.max),r=e.mousewheel.zoom,n=this._index(e.from),s=this._index(e.to),a={from:n,to:s},p=rr({},a);if(this._state&&(a=this._state.range),r!==_&&(a.from=Hr(Hr(n-t,0,s-1),o,i)),r!==v&&(a.to=Hr(Hr(s+t,a.from+1,i),o,i)),a.from!==p.from||a.to!==p.to)return this.set(a.from,a.to),!0},e.prototype.zoom=function(t,e){var o=this.options,i=this._index(o.min),r=this._index(o.max),n=this._index(o.from),s=this._index(o.to),a={from:n,to:s},p=rr({},a),h=this.categoryAxis.options.reverse,c=k+(h?"2":"1"),l=this.categoryAxis.lineBox(),u=Math.abs(l[c]-e.x),d=l.width(),f=Ur(u/d,2),y=Ur(f*t),g=Ur((1-f)*t);if(this._state&&(a=this._state.range),a.from=Hr(Hr(n-y,0,s-1),i,r),a.to=Hr(Hr(s+g,a.from+1,r),i,r),a.from!==p.from||a.to!==p.to)return this.set(a.from,a.to),!0},e.prototype.trigger=function(t,e){return(this.observer||this.chart).trigger(t,e)},e}(O);Yr(vc,{visible:!0,mousewheel:{zoom:"both"},min:x,max:m});var mc=vc,xc=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 o=rr({},this.options,e.options.tooltip),i=e.tooltipAnchor();i?(this._current=e,t.prototype.show.call(this,{point:e,anchor:i},o,e)):this.hide()}},e.prototype.hide=function(){delete this._current,t.prototype.hide.call(this)},e}(Kp),_c=function(t){function e(e,o){t.call(this,e.chartService,o),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 o=mr(t,(function(t){var e=t.series.tooltip;return!(e&&!1===e.visible)}));if(o.length>0){var i=o[0],r=this.plotArea.categoryAxis.getSlot(i.categoryIx),n=e?this._slotAnchor(e,r):this._defaultAnchor(i,r);this.show({anchor:n,shared:!0,points:t,category:i.category,categoryText:this.formatService.auto(this.options.categoryFormat,i.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 o=t.owner.pane.chartsBox(),i=this.plotArea.categoryAxis.options.vertical,r=o.center(),n=e.center();return{point:i?new fn(r.x,n.y):new fn(n.x,r.y),align:{horizontal:"center",vertical:"center"}}},e}(Kp);Yr(_c,{categoryFormat:"{0:d}"});var bc=_c,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.setup=function(){var t=this.element,e=this.options;if(t.bbox()){this.origin=e.origin;var o=e.vertical?S:k,i=this.fromScale=new p.Point(1,1);i[o]=Ta,t.transform(p.transform().scale(i.x,i.y))}else this.abort()},e.prototype.step=function(t){var e=Cr(this.fromScale.x,1,t),o=Cr(this.fromScale.y,1,t);this.element.transform(p.transform().scale(e,o,this.origin))},e.prototype.abort=function(){t.prototype.abort.call(this),this.element.transform(null)},e}(a.Animation);Yr(wc,{duration:600}),a.AnimationFactory.current.register(Oa,wc);var Cc=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(p.transform().scale(Ta,Ta,t))},e.prototype.step=function(t){this.element.transform(p.transform().scale(t,t,this.center))},e}(a.Animation);Yr(Cc,{easing:"easeOutElastic"}),a.AnimationFactory.current.register("bubble",Cc);var kc=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}(a.Animation);Yr(kc,{duration:200,easing:"linear"}),a.AnimationFactory.current.register("fadeIn",kc);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.setup=function(){this.element.transform(p.transform().scale(Ta,Ta,this.options.center))},e.prototype.step=function(t){this.element.transform(p.transform().scale(t,t,this.options.center))},e}(a.Animation);Yr(Sc,{easing:"easeOutElastic",duration:600}),a.AnimationFactory.current.register(Ea,Sc);var Ac=Sc,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.render=function(){t.prototype.render.call(this),this.renderSegments()},e.prototype.createSegment=function(t,e,o){return new("smooth"===e.style?tp:Za)(t,e,o)},e.prototype.animationPoints=function(){return t.prototype.animationPoints.call(this).concat(this._segments)},e.prototype.createMissingValue=function(t,e){if(e===Ma){var o={x:t.x,y:t.y};return jp(o.x)||(o.x=0),jp(o.y)||(o.y=0),o}},e}(Vp);rr(Pc.prototype,ep);var Tc=Pc,Mc=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 dp,this.yAxisRangeTracker=new dp},e.prototype.render=function(t){void 0===t&&(t=this.panes);for(var e=this.groupSeriesByPane(),o=0;o<t.length;o++){var i=t[o],r=e[i.options.name||"default"]||[];this.addToLegend(r);var n=this.filterVisibleSeries(r);n&&(this.createScatterChart(lh(n,"scatter"),i),this.createScatterLineChart(lh(n,"scatterLine"),i),this.createBubbleChart(lh(n,"bubble"),i))}this.createAxes(t)},e.prototype.appendChart=function(e,o){this.xAxisRangeTracker.update(e.xAxisRanges),this.yAxisRangeTracker.update(e.yAxisRanges),t.prototype.appendChart.call(this,e,o)},e.prototype.removeAxis=function(e){var o=e.options.name;t.prototype.removeAxis.call(this,e),e.options.vertical?(this.yAxisRangeTracker.reset(o),delete this.namedYAxes[o]):(this.xAxisRangeTracker.reset(o),delete this.namedXAxes[o]),e===this.axisX&&delete this.axisX,e===this.axisY&&delete this.axisY},e.prototype.seriesPaneName=function(t){var e=this.options,o=t.xAxis,i=mr([].concat(e.xAxis),(function(t){return t.name===o}))[0],r=t.yAxis,n=mr([].concat(e.yAxis),(function(t){return t.name===r}))[0],s=(e.panes||[{}])[0].name||"default";return(i||{}).pane||(n||{}).pane||s},e.prototype.createScatterChart=function(t,e){t.length>0&&this.appendChart(new Vp(this,{series:t,clip:e.options.clip}),e)},e.prototype.createScatterLineChart=function(t,e){t.length>0&&this.appendChart(new Tc(this,{series:t,clip:e.options.clip}),e)},e.prototype.createBubbleChart=function(t,e){t.length>0&&this.appendChart(new Up(this,{series:t,clip:e.options.clip}),e)},e.prototype.createXYAxis=function(t,e,o){for(var i,r=t.name,n=e?this.namedYAxes:this.namedXAxes,s=e?this.yAxisRangeTracker:this.xAxisRangeTracker,a=rr({reverse:!e&&this.chartService.rtl},t,{vertical:e}),p=ch(a.type,"log"),h=s.query(),c=p?{min:.1,max:1}:{min:0,max:1},l=s.query(r)||h||c,u=[a.min,a.max],d=this.series,f=0;f<d.length;f++){var g=d[f],v=g[e?"yAxis":"xAxis"];if(v===a.name||0===o&&!v){var m=Ca.current.bindPoint(g,0).valueFields;u.push(m[e?"y":"x"]);break}}0===o&&h&&(l.min=Math.min(l.min,h.min),l.max=Math.max(l.max,h.max));for(var x=0;x<u.length;x++)if(u[x]instanceof Date){i=!0;break}var _=new(ch(a.type,y)||!a.type&&i?Zs:p?Js:Xs)(l.min,l.max,a,this.chartService);if(_.axisIndex=o,r){if(n[r])throw new Error((e?"Y":"X")+" axis with name "+r+" is already defined");n[r]=_}return this.appendAxis(_),_},e.prototype.createAxes=function(t){for(var e=this.options,o=[].concat(e.xAxis),i=[],r=[].concat(e.yAxis),n=[],s=0;s<o.length;s++){wr(this.findPane(o[s].pane),t)&&i.push(this.createXYAxis(o[s],!1,s))}for(var a=0;a<r.length;a++){wr(this.findPane(r[a].pane),t)&&n.push(this.createXYAxis(r[a],!0,a))}this.axisX=this.axisX||i[0],this.axisY=this.axisY||n[0]},e.prototype._dispatchEvent=function(t,e,o){for(var i=t._eventCoordinates(e),r=new fn(i.x,i.y),n=this.axes,s=n.length,a=[],p=[],h=0;h<s;h++){var c=n[h],l=c.options.vertical?p:a,u=c.getValue(r);null!==u&&l.push(u)}a.length>0&&p.length>0&&t.trigger(o,{element:jr(e),originalEvent:e,x:fh(a),y:fh(p)})},e.prototype.updateAxisOptions=function(t,e){var o=t.options.vertical,i=this.groupAxes(this.panes),r=(o?i.y:i.x).indexOf(t);Oc(this.options,r,o,e),Oc(this.originalOptions,r,o,e)},e}(kh);function Oc(t,e,o,i){rr([].concat(o?t.yAxis:t.xAxis)[e],i)}Yr(Mc,{xAxis:{},yAxis:{}}),rr(Mc.prototype,Sh);var Bc=Mc,Rc=function(t){function e(e,o,i){t.call(this,i),this.value=e,this.sector=o}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.render=function(){var t=this.options.labels,e=this.owner.chartService,o=this.value;if(!this._rendered&&!1!==this.visible){this._rendered=!0;var i=fr(t),r=this.pointData();if(i?o=i(r):t.format&&(o=e.format.auto(t.format,o)),t.visible&&(o||0===o)){if(t.position===d||"insideEnd"===t.position)t.color||(t.color=rn(this.options.color)),t.background||(t.background=this.options.color);else{var n=e.theme.seriesDefaults.labels;t.color=t.color||n.color,t.background=t.background||n.background}this.label=new Vn(o,rr({},t,{align:d,vAlign:"",animation:{type:"fadeIn",delay:this.animationDelay}}),r),this.append(this.label)}}},e.prototype.reflow=function(t){this.render(),this.box=t,this.reflowLabel()},e.prototype.reflowLabel=function(){var t=this.options.labels,e=this.label,o=this.sector.clone(),i=t.distance,r=o.middle();if(e){var n,s=e.box.height(),a=e.box.width();if(t.position===d)o.radius=Math.abs((o.radius-s)/2)+s,n=o.point(r),e.reflow(new gn(n.x,n.y-s/2,n.x,n.y));else if("insideEnd"===t.position)o.radius=o.radius-s/2,n=o.point(r),e.reflow(new gn(n.x,n.y-s/2,n.x,n.y));else{var p;(n=o.clone().expand(i).point(r)).x>=o.center.x?(p=n.x+a,e.orientation=_):(p=n.x-a,e.orientation=v),e.reflow(new gn(p,n.y-s,n.x,n.y))}}},e.prototype.createVisual=function(){var e=this,o=this.sector,i=this.options;if(t.prototype.createVisual.call(this),this.value)if(i.visual){var r=(o.startAngle+180)%360,n=i.visual({category:this.category,dataItem:this.dataItem,value:this.value,series:this.series,percentage:this.percentage,center:new p.Point(o.center.x,o.center.y),radius:o.radius,innerRadius:o.innerRadius,startAngle:r,endAngle:r+o.angle,options:i,sender:this.getSender(),createVisual:function(){var t=new a.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,o=this.options,i=o.border||{},r=i.width>0?{stroke:{color:i.color,width:i.width,opacity:i.opacity,dashType:i.dashType}}:{},n=o.color,s={color:n,opacity:o.opacity},a=this.createSegment(e,rr({fill:s,stroke:{opacity:o.opacity},zIndex:o.zIndex},r));t.append(a),gp(o)&&t.append(this.createGradientOverlay(a,{baseColor:n,fallbackFill:s},rr({center:[e.center.x,e.center.y],innerRadius:e.innerRadius,radius:e.radius,userSpace:!0},o.overlay)))},e.prototype.createSegment=function(t,e){return e.singleSegment?new a.Circle(new p.Circle(new p.Point(t.center.x,t.center.y),t.radius),e):bn.current.createRing(t,e)},e.prototype.createAnimation=function(){var e=this.options,o=this.sector.center;rr(e,{animation:{center:[o.x,o.y],delay:this.animationDelay}}),t.prototype.createAnimation.call(this)},e.prototype.createHighlight=function(t){var e=this.options.highlight||{},o=e.border||{};return this.createSegment(this.sector,rr({},t,{fill:{color:e.color,opacity:e.opacity},stroke:{opacity:o.opacity,width:o.width,color:o.color}}))},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 p.Point(t.center.x,t.center.y),startAngle:t.startAngle,endAngle:t.angle+t.startAngle,visual:this.visual}},e.prototype.tooltipAnchor=function(){var t=this.sector.clone().expand(5),e=t.middle();return{point:t.point(e),align:Lc(e+180)}},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}(Cn),Ec=Ur(Nr(30),10),zc=Ur(Nr(60),10);function Lc(t){var e=Nr(t),o=Ur(Math.sin(e),10),i=Ur(Math.cos(e),10);return{horizontal:Math.abs(o)>zc?d:i<0?_:v,vertical:Math.abs(o)<Ec?d:o<0?u:b}}Yr(Rc,{color:C,overlay:{gradient:"roundedBevel"},border:{width:.5},labels:{visible:!1,distance:35,font:"12px sans-serif",margin:cr(.5),align:f,zIndex:1,position:"outsideEnd"},animation:{type:Ea},highlight:{visible:!0,border:{width:1}},visible:!0}),rr(Rc.prototype,Ga);var Ic=Rc,jc={createLegendItem:function(t,e,o){var i=this.options.legend||{},r=i.labels||{},n=i.inactiveItems||{},s=n.labels||{};if(o&&!1!==o.visibleInLegend){var a,p,h=!1!==o.visible,c=h?fr(r):fr(s)||fr(r),l=o.category;c&&(l=c({text:l,series:o.series,dataItem:o.dataItem,percentage:o.percentage,value:t})),h?(a={},p=e.color):(a={color:s.color,font:s.font},p=(n.markers||{}).color),jp(l)&&""!==l&&this.legendItems.push({active:h,pointIndex:o.index,text:l,series:o.series,markerColor:p,labels:a})}}},Dc=function(t){function e(e,o){t.call(this,o),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,o=this.plotArea.options.seriesColors;void 0===o&&(o=[]);for(var i=o.length,r=e.series,n=r.length,s=0;s<n;s++){var a=r[s],p=a.data,h=hh(a),c=h.total,l=h.points,u=h.count,f=360/c,y=void 0;isFinite(f)||(y=360/u);var g=void 0;g=Rr(a.startAngle)?a.startAngle:e.startAngle,s!==n-1&&"outsideEnd"===a.labels.position&&(a.labels.position=d);for(var v=0;v<l.length;v++){var m=l[v];if(m){var x=m.fields,_=m.value,b=m.visible,w=0!==_?y||_*f:0,C=1!==p.length&&Boolean(x.explode);or(a.color)||(a.color=x.color||o[v%i]),t(m.valueFields.value,new mn(null,0,0,g,w),{owner:this,category:Rr(x.category)?x.category:"",index:v,series:a,seriesIx:s,dataItem:p[v],percentage:0!==c?_/c:0,explode:C,visibleInLegend:x.visibleInLegend,visible:b,zIndex:n-s,animationDelay:this.animationDelay(v,s,n)}),!1!==b&&(g+=w)}}}},e.prototype.evalSegmentOptions=function(t,e,o){var i=o.series;Ha(t,{value:e,series:i,dataItem:o.dataItem,category:o.category,percentage:o.percentage},{defaults:i._defaults,excluded:["data","content","template","visual","toggle"]})},e.prototype.addValue=function(t,e,o){var i=rr({},o.series,{index:o.index});if(this.evalSegmentOptions(i,t,o),this.createLegendItem(t,i,o),!1!==o.visible){var r=new Ic(t,e,i);Object.assign(r,o),this.append(r),this.points.push(r)}},e.prototype.reflow=function(t){var e=this.options,o=this.points,i=this.seriesConfigs;void 0===i&&(i=[]);var r=o.length,n=t.clone(),s=Math.min(n.width(),n.height()),a=s/2,p=s-.85*s,h=new gn(n.x1,n.y1,n.x1+s,n.y1+s),c=h.center(),l=n.center(),u=e.series.length,d=[],f=[],y=Wr(e.padding,p);this.targetBox=t,y=y>a-5?a-5:y,h.translate(l.x-c.x,l.y-c.y);for(var g=a-y,v=new fn(g+h.x1+y,g+h.y1+y),m=0;m<r;m++){var x=o[m],b=x.sector,w=x.seriesIx;if(b.radius=g,b.center=v,i.length){var C=i[w];b.innerRadius=C.innerRadius,b.radius=C.radius}w===u-1&&x.explode&&(b.center=b.clone().setRadius(.15*b.radius).point(b.middle())),x.reflow(h);var k=x.label;k&&"outsideEnd"===k.options.position&&w===u-1&&(k.orientation===_?f.push(k):d.push(k))}d.length>0&&(d.sort(this.labelComparator(!0)),this.leftLabelsReflow(d)),f.length>0&&(f.sort(this.labelComparator(!1)),this.rightLabelsReflow(f)),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=Vr(this.points),o=e.sector,i=t.length-1,r=o.radius+e.options.labels.distance,n=[],s=t[0].box,a=Ur(s.y1-(o.center.y-r-s.height()-s.height()/2));n.push(a);for(var p=0;p<i;p++){var h=t[p+1].box;s=t[p].box,a=Ur(h.y1-s.y2),n.push(a)}return a=Ur(o.center.y+r-t[i].box.y2-t[i].box.height()/2),n.push(a),n},e.prototype.distributeLabels=function(t,e){for(var o,i,r,n=t.length,s=0;s<n;s++)for(r=-t[s],o=i=s;r>0&&(o>=0||i<n);)r=this._takeDistance(t,s,--o,r),r=this._takeDistance(t,s,++i,r);this.reflowLabels(t,e)},e.prototype._takeDistance=function(t,e,o,i){var r=i;if(t[o]>0){var n=Math.min(t[o],r);r-=n,t[o]-=n,t[e]+=n}return r},e.prototype.reflowLabels=function(t,e){var o,i=Vr(this.points),r=i.sector,n=i.options.labels,s=e.length,a=n.distance,p=r.center.y-(r.radius+a)-e[0].box.height();t[0]+=2;for(var h=0;h<s;h++){var c=e[h],l=c.box;p+=t[h],o=this.hAlignLabel(l.x2,r.clone().expand(a),p,p+l.height(),c.orientation===_),c.orientation===_?(n.align!==f&&(o=r.radius+r.center.x+a),c.reflow(new gn(o+l.width(),p,o,p))):(n.align!==f&&(o=r.center.x-r.radius-a),c.reflow(new gn(o-l.width(),p,o,p))),p+=l.height()}},e.prototype.createVisual=function(){var e=this.options.connectors,o=this.points,i=o.length;t.prototype.createVisual.call(this),this._connectorLines=[];for(var r=0;r<i;r++){var n=o[r],s=n.sector,p=n.label,h=s.middle(),c=(n.options.connectors||{}).color||e.color;if(p){var l=new a.Path({stroke:{color:c,width:e.width},animation:{type:"fadeIn",delay:n.animationDelay}});if("outsideEnd"===p.options.position){var u=p.box,d=s.center,f=s.point(h),y=new fn(u.x1,u.center().y),g=void 0,v=void 0,m=void 0;f=s.clone().expand(e.padding).point(h),l.moveTo(f.x,f.y),p.orientation===_?(m=Vc(d,f,y,v=new fn(u.x1-e.padding,u.center().y)),y=new fn(v.x-4,v.y),(m=m||y).x=Math.min(m.x,y.x),this.pointInCircle(m,s.center,s.radius+4)||m.x<s.center.x?(g=s.center.x+s.radius+4,n.options.labels.align!==Ba?g<y.x?l.lineTo(g,f.y):l.lineTo(f.x+8,f.y):l.lineTo(g,f.y),l.lineTo(y.x,v.y)):(m.y=v.y,l.lineTo(m.x,m.y))):(m=Vc(d,f,y,v=new fn(u.x2+e.padding,u.center().y)),y=new fn(v.x+4,v.y),(m=m||y).x=Math.max(m.x,y.x),this.pointInCircle(m,s.center,s.radius+4)||m.x>s.center.x?(g=s.center.x-s.radius-4,n.options.labels.align!==Ba?g>y.x?l.lineTo(g,f.y):l.lineTo(f.x-8,f.y):l.lineTo(g,f.y),l.lineTo(y.x,v.y)):(m.y=v.y,l.lineTo(m.x,m.y))),l.lineTo(v.x,v.y),this._connectorLines.push(l),this.visual.append(l)}}}},e.prototype.renderVisual=function(){if(t.prototype.renderVisual.call(this),Qr(this.options.series,(function(t){return t.autoFit}))){var e=this.targetBox,o=this.box.center(),i=this.visual.bbox();if(!i)return;var r=i.bottomRight(),n=Math.min((o.y-e.y1)/(o.y-i.origin.y),(e.y2-o.y)/(r.y-o.y),(o.x-e.x1)/(o.x-i.origin.x),(e.x2-o.x)/(r.x-o.x));n<1&&this.visual.transform(p.transform().scale(n,n,[o.x,o.y]))}},e.prototype.labelComparator=function(t){var e=t?-1:1;return function(t,o){return((t.parent.sector.middle()+270)%360-(o.parent.sector.middle()+270)%360)*e}},e.prototype.hAlignLabel=function(t,e,o,i,r){var n=e.radius,s=e.center,a=s.x,p=s.y,h=Math.min(Math.abs(p-o),Math.abs(p-i));return h>n?t:a+Math.sqrt(n*n-h*h)*(r?1:-1)},e.prototype.pointInCircle=function(t,e,o){return Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2)<Math.pow(o,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}(Cn);function Vc(t,e,o,i){var r,n=(i.x-o.x)*(t.y-o.y)-(i.y-o.y)*(t.x-o.x),s=(i.y-o.y)*(e.x-t.x)-(i.x-o.x)*(e.y-t.y);if(0!==s){var a=n/s;r=new fn(t.x+a*(e.x-t.x),t.y+a*(e.y-t.y))}return r}Yr(Dc,{startAngle:90,connectors:{width:2,color:"#939393",padding:8},inactiveItems:{markers:{},labels:{}}}),rr(Dc.prototype,jc),Dc.prototype.isStackRoot=!0;var Hc=Dc,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.render=function(){this.createPieChart(this.series)},e.prototype.createPieChart=function(t){var e=t[0],o=new Hc(this,{series:t,padding:e.padding,startAngle:e.startAngle,connectors:e.connectors,legend:this.options.legend});this.appendChart(o)},e.prototype.appendChart=function(e,o){t.prototype.appendChart.call(this,e,o),Or(this.options.legend.items,e.legendItems)},e}(kh),Nc=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,o=this.label,i=this.sector.clone(),r=i.middle();if(o){var n=o.box.height();if(e.position===d){i.radius-=(i.radius-i.innerRadius)/2;var s=i.point(r);o.reflow(new gn(s.x,s.y-n/2,s.x,s.y))}else t.prototype.reflowLabel.call(this)}},e.prototype.createSegment=function(t,e){return bn.current.createRing(t,e)},e}(Ic);Yr(Nc,{overlay:{gradient:"roundedGlass"},labels:{position:d},animation:{type:Ea}}),rr(Nc.prototype,Ga);var Uc=Nc,Gc=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,o){var i=rr({},o.series,{index:o.index});if(this.evalSegmentOptions(i,t,o),this.createLegendItem(t,i,o),t&&!1!==o.visible){var r=new Uc(t,e,i);Object.assign(r,o),this.append(r),this.points.push(r)}},e.prototype.reflow=function(e){for(var o,i=this.options,r=e.clone(),n=Math.min(r.width(),r.height()),s=n/2,a=n-.85*n,p=i.series,h=p.length,c=Wr(i.padding,a),l=s-(c=c>s-5?s-5:c),u=0,d=0;d<h;d++){var f=p[d];0===d&&Rr(f.holeSize)&&(o=f.holeSize,l-=f.holeSize),Rr(f.size)?l-=f.size:u++,Rr(f.margin)&&d!==h-1&&(l-=f.margin)}Rr(o)||(l-=o=.75*((s-c)/(h+.75)));var y,g=o,v=0;this.seriesConfigs=[];for(var m=0;m<h;m++){var x=p[m];y=(g+=v)+Wr(x.size,l/u),this.seriesConfigs.push({innerRadius:g,radius:y}),v=x.margin||0,g=y}t.prototype.reflow.call(this,e)},e.prototype.animationDelay=function(t,e,o){return 50*t+600*(e+1)/(o+1)},e}(Hc);Yr(Gc,{startAngle:90,connectors:{width:2,color:"#939393",padding:8}});var Wc=Gc,qc=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],o=new Wc(this,{series:t,padding:e.padding,connectors:e.connectors,legend:this.options.legend});this.appendChart(o)},e}(Fc),Xc=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 dp},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(),o=t.options.reverse?e.max:e.min,i=t.getSlot(o),r=this.polarAxis.getSlot(0).center,n=t.box.translate(r.x-i.x1,r.y-i.y1);t.reflow(n)},e.prototype.createValueAxis=function(){var t,e,o=this.valueAxisRangeTracker,i=o.query(),r=this.valueAxisOptions({roundToMajorUnit:!1,zIndex:-1});"log"===r.type?(t=ca,e={min:.1,max:1}):(t=pa,e={min:0,max:1});var n=o.query(name)||i||e;n&&i&&(n.min=Math.min(n.min,i.min),n.max=Math.max(n.max,i.max));var s=new t(n.min,n.max,r,this.chartService);this.valueAxis=s,this.appendAxis(s)},e.prototype.reflowAxes=function(){var t=this.options.plotArea,e=this.valueAxis,o=this.polarAxis,i=this.box,r=.15*Math.min(i.width(),i.height()),n=cr(t.padding||{},r),s=i.clone().unpad(n),a=s.clone();a.y2=a.y1+Math.min(a.width(),a.height()),a.align(s,S,d);var p=a.clone().shrink(0,a.height()/2);o.reflow(a),e.reflow(p);var h=e.lineBox().height()-e.box.height();e.reflow(e.box.unpad({top:h})),this.axisBox=a,this.alignAxes(a)},e.prototype.backgroundBox=function(){return this.box},e.prototype.detachLabels=function(){},e}(kh),Yc=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 o=t.center.y-e.y1,i=fn.onCircle(t.center,t.startAngle,o);return new gn(i.x,i.y,i.x,i.y)},e}(Vp);Yr(Yc,{clip:!1});var Zc=Yc,Qc=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}(Tc);Qc.prototype.pointSlot=Zc.prototype.pointSlot,Yr(Qc,{clip:!1});var Kc=Qc,$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.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(),o=new ua(!1),i=this.points();i.push(e),(t=this._strokeSegments=o.process(i)).pop()}return t},e}(lp),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.fillToAxes=function(t){var e=this.parent.plotArea.polarAxis.box.center(),o=new p.Segment([e.x,e.y]);t.segments.unshift(o),t.segments.push(o)},e}(pp);function tl(t,e){return t.value.x-e.value.x}var el=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,o){return"smooth"===(e.line||{}).style?new $c(t,e,o):new Jc(t,e,o)},e.prototype.createMissingValue=function(t,e){var o;return jp(t.x)&&"interpolate"!==e&&(o={x:t.x,y:t.y},e===Ma&&(o.y=0)),o},e.prototype.seriesMissingValues=function(t){return t.missingValues||Ma},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(tl),this._hasMissingValuesGap())for(var e=0;e<t.length;e++){var o=t[e];if(o)jp(o.value.y)||"gap"!==this.seriesMissingValues(o.series)||delete t[e]}return t},e}(Kc),ol=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 ra(this.options.xAxis,this.chartService);this.polarAxis=t,this.axisX=t,this.appendAxis(t)},e.prototype.valueAxisOptions=function(t){return rr(t,{majorGridLines:{type:c},minorGridLines:{type:c}},this.options.yAxis)},e.prototype.createValueAxis=function(){t.prototype.createValueAxis.call(this),this.axisY=this.valueAxis},e.prototype.appendChart=function(t,e){this.valueAxisRangeTracker.update(t.yAxisRanges),kh.prototype.appendChart.call(this,t,e)},e.prototype.createCharts=function(){var t=this.filterVisibleSeries(this.series),e=this.panes[0];this.createLineChart(lh(t,["polarLine"]),e),this.createScatterChart(lh(t,["polarScatter"]),e),this.createAreaChart(lh(t,["polarArea"]),e)},e.prototype.createLineChart=function(t,e){if(0!==t.length){var o=new Kc(this,{series:t});this.appendChart(o,e)}},e.prototype.createScatterChart=function(t,e){if(0!==t.length){var o=new Zc(this,{series:t});this.appendChart(o,e)}},e.prototype.createAreaChart=function(t,e){if(0!==t.length){var o=new el(this,{series:t});this.appendChart(o,e)}},e.prototype._dispatchEvent=function(t,e,o){var i=t._eventCoordinates(e),r=new fn(i.x,i.y),n=this.axisX.getValue(r),s=this.axisY.getValue(r);null!==n&&null!==s&&t.trigger(o,{element:jr(e),x:n,y:s})},e.prototype.createCrosshairs=function(){},e}(Xc);Yr(ol,{xAxis:{},yAxis:{}}),rr(ol.prototype,Sh);var il=ol;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.pointSlot=function(t,e){var o=t.center.y-e.y1,i=fn.onCircle(t.center,t.middle(),o);return new gn(i.x,i.y,i.x,i.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=[],o=0;o<t.length;o++){var i=t[o];e[i.seriesIx]=e[i.seriesIx]||[],e[i.seriesIx].push(i)}return e}(this._segments),o=0;o<e.length;o++){var i=e[o];if(i&&i.length>1){var r=i[0].linePoints[0],n=Vr(i),s=Vr(n.linePoints),a=0===r.categoryIx,p=s.categoryIx===s.categoriesCount-1;a&&p&&Vr(i).linePoints.push(r)}}},e.prototype.createSegment=function(t,e,o){var i=new("smooth"===e.style?tp:Za)(t,e,o),r=this.seriesMissingValues(e);return t.length!==e.data.length&&"interpolate"!==r||(i.options.closed=!0),i},e}(ap);Yr(rl,{clip:!1,limitPoints:!1});var nl=rl,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.fillToAxes=function(){},e}(lp),al=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}(pp),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.createSegment=function(t,e,o,i){var r,n,s,a=this.options.isStacked,p=(e.line||{}).style;return a&&o>0&&i&&(n=i.linePoints.slice(0),r=i),"smooth"===p?(s=new sl(t,e,o,r,n)).options.closed=!0:(t.push(t[0]),s=new al(t,e,o,r,n)),s},e.prototype.seriesMissingValues=function(t){return t.missingValues||Ma},e}(nl),hl=function(t){function e(e,o){t.call(this,e,null,o)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Uc);Yr(hl,{overlay:{gradient:"none"},labels:{distance:10}});var cl=hl,ll=function(t){function e(e){t.call(this,e),this.forEach=e.rtl?_p:xp}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,o=this.children,i=e.gap,r=e.spacing,n=o.length,s=n+i+r*(n-1),a=t.angle/s,p=t.startAngle+a*(i/2);this.forEach(o,(function(e){var o=t.clone();o.startAngle=p,o.angle=a,e.sector&&(o.radius=e.sector.radius),e.reflow(o),e.sector=o,p+=a+a*r}))},e}(Cn);Yr(ll,{gap:1,spacing:0});var ul=ll,dl=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,o=this.children,i=o.length,r=e?i-1:0,n=e?-1:1;this.box=new gn;for(var s=r;s>=0&&s<i;s+=n){var a=o[s].sector;a.startAngle=t.startAngle,a.angle=t.angle}},e}(Cn),fl=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.prototype.clusterType=function(){return ul},e.prototype.stackType=function(){return dl},e.prototype.categorySlot=function(t,e){return t.getSlot(e)},e.prototype.pointSlot=function(t,e){var o=t.clone(),i=t.center.y;return o.radius=i-e.y1,o.innerRadius=i-e.y2,o},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}(Ap);fl.prototype.reflow=Ua.prototype.reflow,Yr(fl,{clip:!1,limitPoints:!1,animation:{type:"pie"}});var yl=fl,gl=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 oa(this.options.categoryAxis,this.chartService);this.polarAxis=t,this.categoryAxis=t,this.appendAxis(t),this.aggregateCategories(),this.createCategoryAxesLabels()},e.prototype.valueAxisOptions=function(t){return this._hasBarCharts&&rr(t,{majorGridLines:{type:c},minorGridLines:{type:c}}),this._isStacked100&&rr(t,{roundToMajorUnit:!1,labels:{format:"P0"}}),rr(t,this.options.valueAxis)},e.prototype.aggregateCategories=function(){Jh.prototype.aggregateCategories.call(this,this.panes)},e.prototype.createCategoryAxesLabels=function(){Jh.prototype.createCategoryAxesLabels.call(this,this.panes)},e.prototype.filterSeries=function(t){return t},e.prototype.createCharts=function(){var t=this.filterVisibleSeries(this.series),e=this.panes[0];this.createAreaChart(lh(t,["radarArea"]),e),this.createLineChart(lh(t,["radarLine"]),e),this.createBarChart(lh(t,["radarColumn"]),e)},e.prototype.chartOptions=function(t){var e={series:t},o=t[0];if(o){var i=this.filterVisibleSeries(t),r=o.stack;e.isStacked=r&&i.length>1,e.isStacked100=r&&"100%"===r.type&&i.length>1,e.isStacked100&&(this._isStacked100=!0)}return e},e.prototype.createAreaChart=function(t,e){if(0!==t.length){var o=new pl(this,this.chartOptions(t));this.appendChart(o,e)}},e.prototype.createLineChart=function(t,e){if(0!==t.length){var o=new nl(this,this.chartOptions(t));this.appendChart(o,e)}},e.prototype.createBarChart=function(t,e){if(0!==t.length){var o=t[0],i=this.chartOptions(t);i.gap=o.gap,i.spacing=o.spacing;var r=new yl(this,i);this.appendChart(r,e),this._hasBarCharts=!0}},e.prototype.seriesCategoryAxis=function(){return this.categoryAxis},e.prototype._dispatchEvent=function(t,e,o){var i=t._eventCoordinates(e),r=new fn(i.x,i.y),n=this.categoryAxis.getCategory(r),s=this.valueAxis.getValue(r);null!==n&&null!==s&&t.trigger(o,{element:jr(e),category:n,value:s})},e.prototype.createCrosshairs=function(){},e}(Xc);rr(gl.prototype,Sh,{appendChart:Jh.prototype.appendChart,aggregateSeries:Jh.prototype.aggregateSeries,seriesSourcePoints:Jh.prototype.seriesSourcePoints}),Yr(gl,{categoryAxis:{categories:[]},valueAxis:{}});var vl=gl,ml=function(t){function e(e,o,i){t.call(this,o),this.value=e,this.options.index=i.index}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reflow=function(t){var e=this.points,o=this.children[0];this.box=new gn(e[0].x,e[0].y,e[1].x,e[2].y),o&&o.reflow(new gn(t.x1,e[0].y,t.x2,e[2].y))},e.prototype.createVisual=function(){var e,o=this,i=this.options;t.prototype.createVisual.call(this),(e=i.visual?i.visual({category:this.category,dataItem:this.dataItem,value:this.value,series:this.series,percentage:this.percentage,points:this.points,options:i,sender:this.getSender(),createVisual:function(){return o.createPath()}}):this.createPath())&&this.visual.append(e)},e.prototype.createPath=function(){var t=this.options,e=t.border;return a.Path.fromPoints(this.points,{fill:{color:t.color,opacity:t.opacity},stroke:{color:e.color,opacity:e.opacity,width:e.width}}).close()},e.prototype.createHighlight=function(t){return a.Path.fromPoints(this.points,t)},e.prototype.highlightVisual=function(){return this.visual.children[0]},e.prototype.highlightVisualArgs=function(){var t=a.Path.fromPoints(this.points).close();return{options:this.options,path:t}},e.prototype.tooltipAnchor=function(){var t=this.box;return{point:new fn(t.center().x,t.y1),align:{horizontal:"center",vertical:"top"}}},e.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},e}(Cn);Yr(ml,{color:C,border:{width:1}}),rr(ml.prototype,Ga);var xl=ml,_l=function(t){function e(e,o){t.call(this,o),this.plotArea=e,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.chartService.format.auto(e,t.value)},e.prototype.render=function(){var t=this.options,e=this.plotArea.options.seriesColors;void 0===e&&(e=[]);var o=t.series[0],i=o.data;if(i)for(var r=hh(o),n=r.total,s=r.points,a=0;a<s.length;a++){var p=s[a];if(p){var h=p.fields;or(o.color)||(o.color=h.color||e[a%e.length]),h=rr({index:a,owner:this,series:o,dataItem:i[a],percentage:p.value/n},h,{visible:p.visible});var c=p.valueFields.value,l=this.createSegment(c,h),u=this.createLabel(c,h);l&&u&&l.append(u)}}},e.prototype.evalSegmentOptions=function(t,e,o){var i=o.series;Ha(t,{value:e,series:i,dataItem:o.dataItem,index:o.index},{defaults:i._defaults,excluded:["data","content","template","toggle","visual"]})},e.prototype.createSegment=function(t,e){var o=rr({},e.series);if(this.evalSegmentOptions(o,t,e),this.createLegendItem(t,o,e),!1!==e.visible){var i=new xl(t,o,e);return Object.assign(i,e),this.append(i),this.points.push(i),i}},e.prototype.createLabel=function(t,e){var o=e.series,i=e.dataItem,r=rr({},this.options.labels,o.labels),n=t;if(r.visible){var s=fr(r),a={dataItem:i,value:t,percentage:e.percentage,category:e.category,series:o};s?n=s(a):r.format&&(n=this.plotArea.chartService.format.auto(r.format,n)),r.color||(r.color=rn(o.color),r.background||(r.background=o.color)),this.evalSegmentOptions(r,t,e);var p=new Vn(n,rr({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},o=0;o<t.length;o++){var i=t[o].options.align;if(i!==d){var r=t[o].box.width();i===v?e.left=Math.max(e.left,r):e.right=Math.max(e.right,r)}}return e},e.prototype.dynamicSlopeReflow=function(t,e,o){for(var i=this.options,r=this.points,n=r.length,s=r[0],a=s,h=0;h<r.length;h++)r[h].percentage>a.percentage&&(a=r[h]);for(var c=s.percentage/a.percentage*e,l=(e-c)/2,u=0,d=0;d<n;d++){var f=r[d].percentage,y=r[d+1],g=y?y.percentage:f,v=r[d].points=[],m=i.dynamicHeight?o*f:o/n,x=void 0;x=Hr(x=f?(e-c*(g/f))/2:g?0:e/2,0,e),v.push(new p.Point(t.x1+l,t.y1+u)),v.push(new p.Point(t.x1+e-l,t.y1+u)),v.push(new p.Point(t.x1+e-x,t.y1+m+u)),v.push(new p.Point(t.x1+x,t.y1+m+u)),l=x,u+=m+i.segmentSpacing,c=Hr(e-2*x,0,e)}},e.prototype.constantSlopeReflow=function(t,e,o){for(var i=this.options,r=this.points,n=r.length,s=i.neckRatio<=1,a=s?i.neckRatio*e:e,h=s?0:(e-e/i.neckRatio)/2,c=((s?e:e-2*h)-a)/2,l=0,u=0;u<n;u++){var d=r[u].points=[],f=r[u].percentage,y=i.dynamicHeight?c*f:c/n,g=i.dynamicHeight?o*f:o/n;d.push(new p.Point(t.x1+h,t.y1+l)),d.push(new p.Point(t.x1+e-h,t.y1+l)),d.push(new p.Point(t.x1+e-h-y,t.y1+g+l)),d.push(new p.Point(t.x1+h+y,t.y1+g+l)),h+=y,l+=g+i.segmentSpacing}},e.prototype.reflow=function(t){var e=this.points,o=e.length;if(o){var i=this.options,r=t.clone().unpad(this.labelPadding()),n=r.height()-i.segmentSpacing*(o-1),s=r.width();i.dynamicSlope?this.dynamicSlopeReflow(r,s,n):this.constantSlopeReflow(r,s,n);for(var a=0;a<o;a++)e[a].reflow(t)}},e}(Cn);Yr(_l,{neckRatio:.3,width:300,dynamicSlope:!1,dynamicHeight:!0,segmentSpacing:0,labels:{visible:!1,align:d,position:d,zIndex:1}}),rr(_l.prototype,jc);var bl=_l,wl=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.createFunnelChart(this.series)},e.prototype.createFunnelChart=function(t){var e=t[0],o=new bl(this,{series:t,legend:this.options.legend,neckRatio:e.neckRatio,dynamicHeight:e.dynamicHeight,dynamicSlope:e.dynamicSlope,segmentSpacing:e.segmentSpacing,highlight:e.highlight});this.appendChart(o)},e.prototype.appendChart=function(e,o){t.prototype.appendChart.call(this,e,o),Or(this.options.legend.items,e.legendItems)},e}(kh),Cl=function(t,e){void 0===e&&(e=.05);var o=Ti(t),i=1-e;return function(t){var e=o.toHSL(),r=100-e.l,n=i-t;return e.l+=Math.min(n*r,r),e.toCss()}},kl=function(t){function e(e,o){t.call(this),this.options=o,this.color=o.color||C,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;if(t.visible){var e,o=this.pointData(),i=fr(t),r=t.color;e=i?i(o):this.formatValue(t.format),r||(r=rn(this.color)),this.label=new Vn(e,rr({align:d,vAlign:d,margin:{left:5,right:5},zIndex:Wr(t.zIndex,this.series.zIndex)},t,{color:r}),o),this.append(this.label)}},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.markerBox=function(){var t=this.options.markers,e=t.border,o=this.box.toRect(),i="roundedRect"===Wr(t.type,"rect"),r=Wr(e.width,i?1:0),n=Math.round(r/2);if(t.size){var s=o.center();o.size.width=o.size.height=t.size,o.origin.x=Math.round(s.x-o.size.width/2),o.origin.y=Math.round(s.y-o.size.height/2)}return o.size.width-=r,o.size.height-=r,o.origin.y+=n+.5,o.origin.x+=n+.5,jn(o)},e.prototype.markerBorder=function(){var t=this.options,e=t.markers.border,o=Wr(e.opacity,t.opacity);return{color:e.color||this.color,width:e.width,opacity:o,dashType:e.dashType}},e.prototype.createMarker=function(){var t=this.options,e=t.markers,o=new Pn({type:Wr(e.type,"rect"),width:e.size,height:e.size,rotation:e.rotation,background:this.color,border:this.markerBorder(),borderRadius:e.borderRadius,opacity:this.series.opacity||t.opacity,zIndex:Wr(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=o,this.append(o)},e.prototype.createHighlight=function(t){var e=this.options,o=this.options.highlight.markers||this.options.markers,i=new Pn({type:Wr(o.type,"rect"),width:o.size,height:o.size,rotation:o.rotation,background:o.color||this.color,border:this.markerBorder(),borderRadius:o.borderRadius,opacity:this.series.opacity||e.opacity,zIndex:Wr(e.zIndex,this.series.zIndex)});i.reflow(this.markerBox());var r=i.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.tooltipAnchor=function(){var t=this.box.center().x,e=this.box.y1-5;return{point:new fn(t,e),align:{horizontal:d,vertical:u}}},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}(Cn);rr(kl.prototype,Ga),rr(kl.prototype,Wa),kl.prototype.defaults={markers:{type:"rect",borderRadius:4,border:{color:"transparent"}},padding:{top:1},labels:{visible:!1,padding:3},opacity:1,notes:{label:{}}};var Sl=kl,Al=function(t){function e(e,o){t.call(this,o),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:m,max:x},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 o=t[e],i=0;i<o.data.length;i++){var r=this._bindPoint(o,e,i).valueFields;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 o;t&&(o=this.createPoint(t,e))&&Object.assign(o,e),this.points.push(o)},e.prototype.evalPointOptions=function(t,e,o){var i=o.series,r=o.seriesIx,n={defaults:i._defaults,excluded:["data","tooltip","content","template","visual","toggle"]},s=this._evalSeries[r];Rr(s)||(this._evalSeries[r]=s=Ha(t,{},n,!0));var a=t;return s&&Ha(a=rr({},t),{value:e,series:i,dataItem:o.dataItem,min:this.valueRange.min,max:this.valueRange.max},n),a},e.prototype.pointType=function(){return Sl},e.prototype.pointOptions=function(t,e){var o=this.seriesOptions[e];if(!o){var i=this.pointType().prototype.defaults;this.seriesOptions[e]=o=rr({},i,{markers:{opacity:t.opacity},tooltip:{format:this.options.tooltip.format},labels:{format:this.options.labels.format}},t)}return o},e.prototype.createPoint=function(t,e){var o=e.series,i=this.pointOptions(o,e.seriesIx),r=e.color||o.color;(i=this.evalPointOptions(i,t,e),or(o.color))?r=i.color:r=Cl(r)(t.value/this.valueRange.max);var n=new Sl(t,i);return n.color=r,this.append(n),n},e.prototype.seriesAxes=function(t){var e=t.xAxis,o=t.yAxis,i=this.plotArea,r=e?i.namedXAxes[e]:i.axisX,n=o?i.namedYAxes[o]:i.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 "+o);return{xAxis:r,yAxis:n}},e.prototype.reflow=function(t){var e=this,o=this.points,i=!this.options.clip,r=0;this.traverseDataPoints((function(t,n){var s=o[r++],a=e.seriesAxes(n.series),p=a.xAxis,h=a.yAxis,c=p.categoryIndex(t.x),l=h.categoryIndex(t.y),u=p.getSlot(c,c,i),d=h.getSlot(l,l,i);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 gn(t.x1,e.y1,t.x2,e.y2)},e.prototype.traverseDataPoints=function(t){for(var e=this.options.series,o=0;o<e.length;o++)for(var i=e[o],r=this.seriesAxes(i),n=r.xAxis,s=r.yAxis,a=n.currentRangeIndices(),p=s.currentRangeIndices(),h=0;h<i.data.length;h++){var c=this._bindPoint(i,o,h),l=c.valueFields,u=c.fields,d=n.totalIndex(l.x),f=s.totalIndex(l.y),y=a.min<=d&&d<=a.max,g=p.min<=f&&f<=p.max;y&&g&&t(l,rr({pointIx:h,series:i,seriesIx:o,dataItem:i.data[h],owner:this},u))}},e.prototype.formatPointValue=function(t,e){var o=t.value;return this.chartService.format.auto(e,o.x,o.y,o.value)},e.prototype.animationPoints=function(){for(var t=this.points,e=[],o=0;o<t.length;o++)e.push((t[o]||{}).marker);return e},e}(Cn);Yr(Al,{series:[],tooltip:{format:"{0}, {1}: {2}"},labels:{format:"{2}"},clip:!0}),rr(Al.prototype,{_bindPoint:Ua.prototype._bindPoint});var Pl=Al,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(){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 o=t[e],i=o.data||[],r=this.seriesAxes(o),n=r.xAxis,s=r.yAxis,a=cn(n.categories||[]),p=cn(s.categories||[]),h=0;h<i.length;h++){var c=Ca.current.bindPoint(o,h).valueFields,l=c.x,u=c.y;a.has(l)||a.add(l),p.has(u)||p.add(u)}n.categories=a.values(),s.categories=p.values()}},e.prototype.createCharts=function(t){for(var e=this.groupSeriesByPane(),o=0;o<t.length;o++){var i=t[o],r=e[i.options.name||"default"]||[];this.addToLegend(r);var n=this.filterVisibleSeries(r);n&&this.createHeatmapChart(lh(n,["heatmap"]),i)}},e.prototype.createHeatmapChart=function(t,e){var o=new Pl(this,{series:t});this.appendChart(o,e)},e.prototype.seriesPaneName=function(t){var e=this.options,o=t.xAxis,i=mr([].concat(e.xAxis),(function(t){return t.name===o}))[0],r=t.yAxis,n=mr([].concat(e.yAxis),(function(t){return t.name===r}))[0],s=(e.panes||[{}])[0].name||"default";return(i||{}).pane||(n||{}).pane||s},e.prototype.seriesAxes=function(t){var e,o,i=this.options,r=[].concat(i.xAxis),n=t.xAxis;e=n?r.find((function(t){return t.name===n})):r[0];var s=[].concat(i.yAxis),a=t.yAxis;if(o=a?s.find((function(t){return t.name===a})):s[0],!e)throw new Error("Unable to locate X axis with name "+n);if(!o)throw new Error("Unable to locate Y axis with name "+a);return{xAxis:e,yAxis:o}},e.prototype.createAxisLabels=function(){for(var t=this.axes,e=0;e<t.length;e++)t[e].createLabels()},e.prototype.createXYAxis=function(t,e,o){for(var i,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],h=this.series,c=0;c<h.length;c++){var l=h[c],u=l[e?"yAxis":"xAxis"];if(u===s.name||0===o&&!u){var d=Ca.current.bindPoint(l,0).valueFields;p.push(d[e?"y":"x"]);break}}for(var f=0;f<p.length;f++)if(p[f]instanceof Date){i=!0;break}var g=new(ch(s.type,y)||!s.type&&i?Hs:Bs)(s,this.chartService);if(g.axisIndex=o,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.mapCategories(),g},e.prototype.createAxes=function(t){for(var e=this.options,o=[].concat(e.xAxis),i=[],r=[].concat(e.yAxis),n=[],s=0;s<o.length;s++){wr(this.findPane(o[s].pane),t)&&i.push(this.createXYAxis(o[s],!1,s))}for(var a=0;a<r.length;a++){wr(this.findPane(r[a].pane),t)&&n.push(this.createXYAxis(r[a],!0,a))}this.axisX=this.axisX||i[0],this.axisY=this.axisY||n[0]},e.prototype.removeAxis=function(e){var o=e.options.name;t.prototype.removeAxis.call(this,e),e.options.vertical?delete this.namedYAxes[o]:delete this.namedXAxes[o],e===this.axisX&&delete this.axisX,e===this.axisY&&delete this.axisY},e.prototype._dispatchEvent=function(t,e,o){for(var i=t._eventCoordinates(e),r=new fn(i.x,i.y),n=this.axes,s=n.length,a=[],p=[],h=0;h<s;h++){var c=n[h];ah(c.options.vertical?p:a,c.getCategory(r))}a.length>0&&p.length>0&&t.trigger(o,{element:jr(e),originalEvent:e,x:fh(a),y:fh(p)})},e.prototype.updateAxisOptions=function(t,e){var o=t.options.vertical,i=this.groupAxes(this.panes),r=(o?i.y:i.x).indexOf(t);Ml(this.options,r,o,e),Ml(this.originalOptions,r,o,e)},e.prototype.crosshairOptions=function(t){return Object.assign({},t.options.crosshair,{zIndex:0})},e}(kh);function Ml(t,e,o,i){rr([].concat(o?t.yAxis:t.xAxis)[e],i)}Yr(Tl,{xAxis:{},yAxis:{}}),rr(Tl.prototype,Sh);var Ol=Tl,Bl="color",Rl="first",El="max";fc.current.register(Jh,[Oa,Ba,Ra,za,"area","verticalArea","candlestick","ohlc","bullet","verticalBullet","boxPlot","verticalBoxPlot","rangeColumn","rangeBar","waterfall","horizontalWaterfall","rangeArea","verticalRangeArea"]),fc.current.register(Bc,["scatter","scatterLine","bubble"]),fc.current.register(Fc,[Ea]),fc.current.register(qc,["donut"]),fc.current.register(wl,["funnel"]),fc.current.register(il,["polarArea","polarLine","polarScatter"]),fc.current.register(vl,["radarArea","radarColumn","radarLine"]),fc.current.register(Ol,["heatmap"]),Ca.current.register([Oa,Ba,Ra,za,"area","verticalArea"],[w],["category",Bl,"noteText","errorLow","errorHigh"]),Ca.current.register(["rangeColumn","rangeBar","rangeArea","verticalRangeArea"],["from","to"],["category",Bl,"noteText"]),Ca.current.register(["waterfall","horizontalWaterfall"],[w],["category",Bl,"noteText","summary"]),Ca.current.register(["polarArea","polarLine","polarScatter"],[k,S],[Bl]),Ca.current.register(["radarArea","radarColumn","radarLine"],[w],[Bl]),Ca.current.register(["funnel"],[w],["category",Bl,"visibleInLegend","visible"]),Mh.current.register([Oa,Ba,Ra,za,"area","verticalArea","waterfall","horizontalWaterfall"],{value:El,color:Rl,noteText:Rl,errorLow:"min",errorHigh:El}),Mh.current.register(["rangeColumn","rangeBar","rangeArea","verticalRangeArea"],{from:"min",to:El,color:Rl,noteText:Rl}),Mh.current.register(["radarArea","radarColumn","radarLine"],{value:El,color:Rl}),Ca.current.register(["scatter","scatterLine","bubble"],[k,S],[Bl,"noteText","xErrorLow","xErrorHigh","yErrorLow","yErrorHigh"]),Ca.current.register(["bubble"],[k,S,"size"],[Bl,"category","noteText"]),Ca.current.register(["heatmap"],[k,S,w],[Bl,"noteText"]),Ca.current.register(["candlestick","ohlc"],["open","high","low","close"],["category",Bl,"downColor","noteText"]),Mh.current.register(["candlestick","ohlc"],{open:El,high:El,low:"min",close:El,color:Rl,downColor:Rl,noteText:Rl}),Ca.current.register(["boxPlot","verticalBoxPlot"],["lower","q1","median","q3","upper","mean","outliers"],["category",Bl,"noteText"]),Mh.current.register(["boxPlot","verticalBoxPlot"],{lower:El,q1:El,median:El,q3:El,upper:El,mean:El,outliers:Rl,color:Rl,noteText:Rl}),Ca.current.register(["bullet","verticalBullet"],["current","target"],["category",Bl,"visibleInLegend","noteText"]),Mh.current.register(["bullet","verticalBullet"],{current:El,target:El,color:Rl,noteText:Rl}),Ca.current.register([Ea,"donut"],[w],["category",Bl,"explode","visibleInLegend","visible"]);var zl=["category",w,k,S],Ll=function(t){function e(e,o,i,r){var n=this;void 0===r&&(r={}),t.call(this),this.observers=[],this.addObserver(r.observer),this.chartService=new is(this,r),this.chartService.theme=i,this._initElement(e);var s=rr({},this.options,o);this._originalOptions=rr({},s),this._theme=i,this._initTheme(s,i),this._initHandlers(),this._initSurface(),this.bindCategories(),Xr.preloadFonts(o,(function(){n.fontLoaded=!0,n._destroyed||(n.trigger("init"),n._redraw(),n._attachEvents())}))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._initElement=function(t){for(this._setElementClass(t),t.style.position="relative";t.firstChild;)t.removeChild(t.firstChild);this.element=t},e.prototype._setElementClass=function(t){P(t,"k-chart")},e.prototype._initTheme=function(t,e){for(var o=[],i=t.series||[],r=0;r<i.length;r++)o.push(Object.assign({},i[r]));t.series=o,function(t){for(var e=zl,o=0;o<e.length;o++){var i=e[o]+"Axes";t[i]&&(t[e[o]+"Axis"]=t[i],delete t[i])}}(t),this.applyDefaults(t,e),null===t.seriesColors&&delete t.seriesColors,this.options=rr({},e,t),this.applySeriesColors()},e.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)}},e.prototype.resize=function(t){var e=this.getSize(),o=this._size,i=e.width>0||e.height>0;t||i&&(!o||e.width!==o.width||e.height!==o.height)?(this._size=e,this._resize(e,t),this.trigger("resize",e)):i&&this._selections&&Qr(this._selections,(function(t){return!t.visible}))&&(this._destroySelections(),this._setupSelection())},e.prototype._resize=function(){this._noTransitionsRedraw()},e.prototype.redraw=function(t){if(this.applyDefaults(this.options),this.applySeriesColors(),t){var e=this._model._plotArea,o=e.findPane(t);e.redraw(o)}else this._redraw()},e.prototype.getAxis=function(t){return fa(t,this._plotArea.axes)},e.prototype.findAxisByName=function(t){return this.getAxis(t)},e.prototype.findPaneByName=function(t){for(var e=this._plotArea.panes,o=0;o<e.length;o++)if(e[o].options.name===t)return new ga(e[o])},e.prototype.findPaneByIndex=function(t){var e=this._plotArea.panes;if(e[t])return new ga(e[t])},e.prototype.plotArea=function(){return new va(this._plotArea)},e.prototype.toggleHighlight=function(t,e){var o,i,r,n=this._plotArea,s=(n.srcSeries||n.series||[])[0];or(e)?o=n.filterPoints(e):(nr(e)?(i=e.series,r=e.category):i=r=e,o="donut"===s.type?Il(n.pointsBySeriesName(i),r):s.type===Ea||"funnel"===s.type?Il((n.charts[0]||{}).points,r):n.pointsBySeriesName(i));o&&this.togglePointsHighlight(t,o)},e.prototype.togglePointsHighlight=function(t,e){for(var o=this._highlight,i=0;i<e.length;i++)o.togglePointHighlight(e[i],t)},e.prototype.showTooltip=function(t){var e,o,i=this._sharedTooltip(),r=this._tooltip,n=this._plotArea;if(or(t)?(e=n.findPoint(t))&&i&&(o=e.categoryIx):i&&Rr(t)&&(o=n.categoryAxis.categoryIndex(t)),i){if(o>=0){var s=this._plotArea.pointsByCategoryIndex(o);r.showAt(s)}}else e&&r.show(e)},e.prototype.hideTooltip=function(){this._tooltip.hide()},e.prototype._initSurface=function(){var t=this.surface,e=this._surfaceWrap(),o=this.options.chartArea||{};o.width&&Lr(e,{width:o.width}),o.height&&Lr(e,{height:o.height}),t&&t.options.type===this.options.renderAs?(this.surface.clear(),this.surface.resize()):(this._destroySurface(),this.surface=a.Surface.create(e,{type:this.options.renderAs}),this.surface.bind("mouseenter",this._surfaceMouseenterHandler),this.surface.bind("mouseleave",this._surfaceMouseleaveHandler))},e.prototype._surfaceWrap=function(){return this.element},e.prototype._redraw=function(){var t=this._getModel();this._size={width:t.options.width,height:t.options.height},this._destroyView(),this._model=t,this._plotArea=t._plotArea,t.renderVisual(),!1!==this.options.transitions&&t.traverse((function(t){t.animation&&t.animation.setup()})),this._initSurface(),this.surface.draw(t.visual),!1!==this.options.transitions&&t.traverse((function(t){t.animation&&t.animation.play()})),this._tooltip=this._createTooltip(),this._highlight=new ec,this._setupSelection(),this._createPannable(),this._createZoomSelection(),this._createMousewheelZoom(),this.trigger("render"),Fl(this._plotArea.panes),this._navState||this._cancelDomEvents()},e.prototype.exportVisual=function(t){var e;if(t&&(t.width||t.height||t.options)){var o=this.options,i=rr({},t.options,{chartArea:{width:t.width,height:t.height}});Hl(this._originalOptions,i),this.options=rr({},this._originalOptions,i),this._initTheme(this.options,this._theme),this.bindCategories();var r=this._getModel();r.renderVisual(),Fl(r._plotArea.panes),e=r.visual,this.options=o}else e=this.surface.exportVisual();return e},e.prototype._sharedTooltip=function(){return this._plotArea instanceof Jh&&this.options.tooltip&&this.options.tooltip.shared},e.prototype._createPannable=function(){var t=this.options;!1!==t.pannable&&(this._pannable=new nc(this._plotArea,t.pannable))},e.prototype._createZoomSelection=function(){var t=this.options.zoomable,e=(t||{}).selection;!1!==t&&!1!==e&&(this._zoomSelection=new ac(this,e))},e.prototype._createMousewheelZoom=function(){var t=this.options.zoomable,e=(t||{}).mousewheel;!1!==t&&!1!==e&&(this._mousewheelZoom=new pc(this,e))},e.prototype._toggleDragZoomEvents=function(){var t=this.options.pannable,e=this.options.zoomable,o=(e||{}).selection,i=(e||{}).mousewheel,r=!(t||!1!==e&&!1!==o||this.requiresHandlers(["dragStart","drag","dragEnd"])),n=(!1===e||!1===i)&&!this.requiresHandlers(["zoomStart","zoom","zoomEnd"]),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)},e.prototype._toggleDomEvents=function(t,e){var o=this.domEvents;o&&(o.toggleDrag&&o.toggleDrag(t),o.toggleZoom&&o.toggleZoom(e))},e.prototype._createTooltip=function(){var t=this.options.tooltip;return this._sharedTooltip()?this._createSharedTooltip(t):new xc(this.chartService,t)},e.prototype._createSharedTooltip=function(t){return new bc(this._plotArea,t)},e.prototype.applyDefaults=function(t,e){!function(t,e){var o,i,r,n=(e||{}).axisDefaults||{};function s(t){var e=(t||{}).color||i.color,r=rr({},n,n[o],i,i[o],{line:{color:e},labels:{color:e},title:{color:e}},t);return delete r[o],r}for(var a=0;a<zl.length;a++)o=zl[a]+"Axis",i=t.axisDefaults||{},r=(r=[].concat(t[o])).map(s),t[o]=r.length>1?r:r[0]}(t,e),function(t,e){var o=t.series,i=o.length,r=t.seriesDefaults,n=rr({},t.seriesDefaults),s=e?rr({},e.seriesDefaults):{},a=rr({},s);jl(n),jl(a);for(var p=0;p<i;p++){var h=o[p].type||t.seriesDefaults.type,c=rr({data:[]},a,s[h],{tooltip:t.tooltip},n,r[h]);o[p]._defaults=c,o[p]=rr({},c,o[p]),o[p].data=o[p].data||[]}}(t,e)},e.prototype.applySeriesColors=function(){for(var t=this.options,e=t.series,o=t.seriesColors||[],i=0;i<e.length;i++){var r=e[i],n=o[i%o.length],s=r._defaults;r.color=r.color||n,s&&(s.color=s.color||n)}},e.prototype._getModel=function(){var t=this.options,e=this._createPlotArea(),o=new Bn(this._modelOptions());return o.chart=this,o._plotArea=e,Fn.buildTitle(t.title,o),t.legend&&t.legend.visible&&o.append(new uc(e.options.legend,this.chartService)),o.append(e),o.reflow(),o},e.prototype._modelOptions=function(){var t=this.options,e=this.getSize();return rr({transitions:t.transitions,width:e.width||600,height:e.height||400},t.chartArea)},e.prototype._createPlotArea=function(t){var e=this.options;return fc.current.create(t?[]:e.series,e,this.chartService)},e.prototype._setupSelection=function(){for(var t=this._plotArea.axes,e=this._selections=[],o=0;o<t.length;o++){var i=t[o],r=i.options;if(i instanceof Bs&&r.select&&!r.vertical){var n=i.range(),s=new mc(this,i,rr({min:n.min,max:n.max},r.select));e.push(s)}}},e.prototype._selectStart=function(t){return this.trigger("selectStart",t)},e.prototype._select=function(t){return this.trigger("select",t)},e.prototype._selectEnd=function(t){return this.trigger("selectEnd",t)},e.prototype._initHandlers=function(){this._clickHandler=this._click.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._mousemove=hi(this._mousemove.bind(this),20)},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,o=0;o<e.length;o++)if(e[o].requiresHandlers(t))return!0},e.prototype.trigger=function(t,e){void 0===e&&(e={}),"showTooltip"===t&&(e.anchor.point=this._toDocumentCoordinates(e.anchor.point)),e.sender=this;for(var o=this.observers,i=!1,r=0;r<o.length;r++)o[r].trigger(t,e)&&(i=!0);return i},e.prototype._attachEvents=function(){var t,e,o=this.element;this._touchAction=o.style.touchAction,Br(o,((t={}).contextmenu=this._clickHandler,t[Ia]=this._mousewheelHandler,t.mouseleave=this._mouseleaveHandler,t)),this._shouldAttachMouseMove()&&Br(o,((e={}).mousemove=this._mousemove,e)),this.domEvents=ns.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()},e.prototype._mouseleave=function(t){this._hoveredPoint&&(this._hoveredPoint.out(this,t),this._hoveredPoint=null),this._plotArea.hovered&&(this.trigger("plotAreaLeave"),this._plotArea.hovered=!1)},e.prototype._cancelDomEvents=function(){this.domEvents&&this.domEvents.cancel&&this.domEvents.cancel()},e.prototype._gesturestart=function(t){this._mousewheelZoom&&!this._stopChartHandlers(t)&&(this._gestureDistance=t.distance,this._unsetActivePoint(),this.surface.suspendTracking())},e.prototype._gestureend=function(t){this._zooming&&!this._stopChartHandlers(t)&&(this.surface&&this.surface.resumeTracking(),this._zooming=!1,this.trigger("zoomEnd",{}))},e.prototype._gesturechange=function(t){var e=this._mousewheelZoom;if(e&&!this._stopChartHandlers(t)){t.preventDefault();var o=this._gestureDistance,i=-t.distance/o+1;if(Math.abs(i)>=.1){i=Math.round(10*i),this._gestureDistance=t.distance;var r={delta:i,axisRanges:Dl(this._plotArea.axes),originalEvent:t};if(this._zooming||!this.trigger("zoomStart",r)){var n=this._eventCoordinates(t);this._zooming||(this._zooming=!0),(r.axisRanges=e.updateRanges(i,n))&&!this.trigger("zoom",r)&&e.zoom()}}}},e.prototype._mouseout=function(t){if(t.element){var e=this._drawingChartElement(t.element,t);e&&e.leave&&e.leave(this,t.originalEvent)}},e.prototype._start=function(t){var e=this._eventCoordinates(t);!this._stopChartHandlers(t)&&this._plotArea.backgroundContainsPoint(e)&&(this.requiresHandlers(["dragStart","drag","dragEnd"])&&this._startNavigation(t,e,"dragStart"),this._pannable&&this._pannable.start(t)&&(this.surface.suspendTracking(),this._unsetActivePoint(),this._suppressHover=!0,this.chartService.panning=!0),this._zoomSelection&&this._zoomSelection.start(t)&&this.trigger("zoomStart",{axisRanges:Dl(this._plotArea.axes),originalEvent:t}))},e.prototype._move=function(t){var e=this._navState,o=this._pannable;if(!this._stopChartHandlers(t)){if(o){var i=o.move(t);i&&!this.trigger("drag",{axisRanges:i,originalEvent:t})&&o.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,h=p.startLocation-p.location;0!==h&&(r[a.options.name]=a.translateRange(h))}}e.axisRanges=r,this.trigger("drag",{axisRanges:r,originalEvent:t})}this._zoomSelection&&this._zoomSelection.move(t)}},e.prototype._end=function(t){if(!this._stopChartHandlers(t)){var e=this._pannable;if(e&&e.end(t)?(this.surface.resumeTracking(),this.trigger("dragEnd",{axisRanges:Dl(this._plotArea.axes),originalEvent:t}),this._suppressHover=!1,this.chartService.panning=!1):this._endNavigation(t,"dragEnd"),this._zoomSelection){var o=this._zoomSelection.end(t);o&&!this.trigger("zoom",{axisRanges:o,originalEvent:t})&&(this._zoomSelection.zoom(),this.trigger("zoomEnd",{axisRanges:o,originalEvent:t}))}}},e.prototype._stopChartHandlers=function(t){var e=this._selections||[];if(!e.length)return!1;var o=this._eventCoordinates(t),i=this._plotArea.paneByPoint(o);if(i)for(var r=0;r<e.length;r++)if(e[r].onPane(i))return!0},e.prototype._mousewheelZoomRate=function(){var t=(this.options.zoomable||{}).mousewheel||{};return Wr(t.rate,.3)},e.prototype._mousewheel=function(t){var e=this,o=Tr(t),i=this._mousewheelZoom,r=this._eventCoordinates(t);if(!this._stopChartHandlers(t)&&this._plotArea.backgroundContainsPoint(r))if(i){var n={delta:o,axisRanges:Dl(this._plotArea.axes),originalEvent:t};!this._zooming&&this.trigger("zoomStart",n)||(t.preventDefault(),this._zooming||(this._unsetActivePoint(),this.surface.suspendTracking(),this._zooming=!0),this._mwTimeout&&clearTimeout(this._mwTimeout),n.axisRanges=i.updateRanges(o,r),n.axisRanges&&!this.trigger("zoom",n)&&i.zoom(),this._mwTimeout=setTimeout((function(){e.trigger("zoomEnd",n),e._zooming=!1,e.surface&&e.surface.resumeTracking()}),150))}else{var s=this._navState;if(!s)this._startNavigation(t,r,"zoomStart")||(s=this._navState);if(s){var a=s.totalDelta||o;s.totalDelta=a+o;for(var p=this._navState.axes,h={},c=0;c<p.length;c++){var l=p[c],u=l.options.name;u&&(h[u]=l.scaleRange(-a*this._mousewheelZoomRate(),r))}this.trigger("zoom",{delta:o,axisRanges:h,originalEvent:t}),this._mwTimeout&&clearTimeout(this._mwTimeout),this._mwTimeout=setTimeout((function(){e._endNavigation(t,"zoomEnd")}),150)}}},e.prototype._startNavigation=function(t,e,o){var i=this._model._plotArea,r=i.findPointPane(e),n=i.axes.slice(0);if(r){var s=Dl(n);this.trigger(o,{axisRanges:s,originalEvent:t})?this._cancelDomEvents():(this._suppressHover=!0,this._unsetActivePoint(),this._navState={axisRanges:s,pane:r,axes:n})}},e.prototype._endNavigation=function(t,e){this._navState&&(this.trigger(e,{axisRanges:this._navState.axisRanges,originalEvent:t}),this._suppressHover=!1,this._navState=null)},e.prototype._getChartElement=function(t,e){var o=this.surface.eventTarget(t);if(o)return this._drawingChartElement(o,t,e)},e.prototype._drawingChartElement=function(t,e,o){for(var i,r=t;r&&!i;)i=r.chartElement,r=r.parent;if(i)return i.aliasFor&&(i=i.aliasFor(e,this._eventCoordinates(e))),o&&(i=i.closest(o))&&i.aliasFor&&(i=i.aliasFor()),i},e.prototype._eventCoordinates=function(t){var e=Ir(t);return this._toModelCoordinates(e.x,e.y)},e.prototype._elementPadding=function(){if(!this._padding){var t=hr(this.element,["paddingLeft","paddingTop"]),e=t.paddingLeft,o=t.paddingTop;this._padding={top:o,left:e}}return this._padding},e.prototype._toDocumentCoordinates=function(t){var e=this._elementPadding(),o=zr(this.element);return{left:Ur(t.x+e.left+o.left),top:Ur(t.y+e.top+o.top)}},e.prototype._toModelCoordinates=function(t,e){var o=this.element,i=zr(o),r=this._elementPadding(),n=tn(o).invert(),s=new p.Point(t-i.left-r.left,e-i.top-r.top).transform(n);return new fn(s.x,s.y)},e.prototype._tap=function(t){var e=this,o=this.surface.eventTarget(t),i=this._drawingChartElement(o,t),r=this._sharedTooltip();this._startHover(o,t)||r||this._unsetActivePoint(),r&&this._trackSharedTooltip(this._eventCoordinates(t),t,!0),this._propagateClick(i,t),this.handlingTap=!0,setTimeout((function(){e.handlingTap=!1}),0)},e.prototype._click=function(t){var e=this._getChartElement(t);this._propagateClick(e,t)},e.prototype._propagateClick=function(t,e){for(var o=t;o;)o.click&&o.click(this,e),o=o.parent},e.prototype._startHover=function(t,e){if(this._suppressHover)return!1;var o=this._drawingChartElement(t,e,(function(t){return(t.hover||t.over)&&!(t instanceof kh)})),i=this._activePoint,r=this._plotArea.series.length>1,n=this._hasInactiveOpacity();return this._updateHoveredPoint(o,e),o&&i!==o&&o.hover?(this._activePoint=o,this._sharedTooltip()||o.hover(this,e)||(this._displayTooltip(o),n?this._displayInactiveOpacity(o,r):this._highlight.show(o))):!o&&n&&(r&&this._activeChartInstance&&(this._updateSeriesOpacity(o,!0),this._applySeriesOpacity(this._activeChartInstance.children,null,!0),this._activeChartInstance=null),this._highlight&&this._highlight.hide(),this._activePoint=null),o},e.prototype._displayTooltip=function(t){rr({},this.options.tooltip,t.options.tooltip).visible&&this._tooltip.show(t)},e.prototype._displayInactiveOpacity=function(t,e,o){var i=this._activeChartInstance=this._chartInstanceFromPoint(t);if(i)if(e)this._updateSeriesOpacity(t),this._applySeriesOpacity(i.children,null,!0),this._applySeriesOpacity(i.children,t.series),this._highlight.show(o||t);else{var r;if(!i.supportsPointInactiveOpacity())return void this._highlight.show(t);(r=this._getInactivePoints(t,i))&&r.length&&this._highlight.show(r,1-this._getInactiveOpacityForSeries(t.series))}},e.prototype._getInactivePoints=function(t,e){return this._getAllPointsOfType(e,t.constructor).filter((function(e){return e!==t}))},e.prototype._getAllPointsOfType=function(t,e){for(var o=[],i=0;i<t.children.length;i++){var r=t.children[i];r.constructor===e?o.push(r):r.children&&r.children.length&&(o=o.concat(this._getAllPointsOfType(r,e)))}return o},e.prototype._updateHoveredPoint=function(t,e){var o=this._hoveredPoint;o&&o!==t&&(o.out(this,e),this._hoveredPoint=null),t&&o!==t&&t.over&&(this._hoveredPoint=t,t.over(this,e))},e.prototype._updateSeriesOpacity=function(t,e){for(var o=this._plotArea,i=o.series.length,r=0;r<i;r++){var n=o.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))}},e.prototype._applySeriesOpacity=function(t,e,o,i){for(var r=0;r<t.length;r++){var n=t[r],s=n.series||i;if(s&&(s.highlight||{}).visible&&n.visual){var a=i?i.opacity:n.series.opacity;(s!==e||o)&&n.visual.opacity(o?1:a)}n.children&&n.children.length&&this._applySeriesOpacity(n.children,e,o,n.series)}},e.prototype._chartInstanceFromPoint=function(t){for(var e=t.parent;e&&!e.plotArea;)e=e.parent;return e},e.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},e.prototype._getInactiveOpacityForSeries=function(t){var e=this.options.seriesDefaults.highlight.inactiveOpacity;return t.highlight.inactiveOpacity||e||t.opacity||1},e.prototype._getDefaultOpacityForSeries=function(t){return t.defaultOpacity||t.opacity||1},e.prototype._mouseover=function(t){var e,o=this._startHover(t.element,t.originalEvent);o&&o.tooltipTracking&&!this._mouseMoveTrackHandler&&!this._sharedTooltip()&&(this._mouseMoveTrackHandler=this._mouseMoveTracking.bind(this),Br(document,((e={}).mousemove=this._mouseMoveTrackHandler,e)))},e.prototype._mouseMoveTracking=function(t){var e,o=this.options,i=this._tooltip,r=this._highlight,n=this._activePoint,s=this._eventCoordinates(t);if(this._plotArea.box.containsPoint(s)){if(n&&n.tooltipTracking&&n.series&&n.parent.getNearestPoint){var a=n.parent.getNearestPoint(s.x,s.y,n.seriesIx);if(a&&a!==n)if(this._activePoint=a,!a.hover(this,t))rr({},o.tooltip,a.options.tooltip).visible&&i.show(a),r.show(a)}}else Gr(document,((e={}).mousemove=this._mouseMoveTrackHandler,e)),this._unsetActivePoint(),this._mouseMoveTrackHandler=null},e.prototype._mousemove=function(t){var e=this._eventCoordinates(t),o=this._plotArea;if(this._trackCrosshairs(e),o.hover){var i=o.backgroundContainsPoint(e);i?(o.hovered=!0,this._plotArea.hover(this,t)):o.hovered&&!i&&(this.trigger("plotAreaLeave"),o.hovered=!1)}this._sharedTooltip()&&this._trackSharedTooltip(e,t)},e.prototype._trackCrosshairs=function(t){for(var e=this._plotArea.crosshairs,o=0;o<e.length;o++){var i=e[o];i.box.containsPoint(t)?i.showAt(t):i.hide()}},e.prototype._trackSharedTooltip=function(t,e,o){if(!this._suppressHover){var i=this.options.tooltip,r=this._plotArea,n=this._plotArea.categoryAxis,s=this._tooltip,a=this._highlight;if(r.backgroundContainsPoint(t)){var p=n.pointCategoryIndex(t);if(p!==this._tooltipCategoryIx||!this._sharedHighlight&&o){var h=r.pointsByCategoryIndex(p),c=h.map((function(t){return t.eventArgs(e)})),l=c[0]||{};l.categoryPoints=c,h.length>0&&!this.trigger("seriesHover",l)?(i.visible&&s.showAt(h,t),a.show(h),this._sharedHighlight=!0):s.hide(),this._tooltipCategoryIx=p}else o&&this._sharedHighlight&&(a.hide(),s.hide(),this._sharedHighlight=!1)}else this._sharedHighlight&&(a.hide(),s.hide(),this._tooltipCategoryIx=null,this._sharedHighlight=!1)}},e.prototype.hideElements=function(t){var e=this._plotArea;this._mousemove.cancel(),e.hideCrosshairs(),this._unsetActivePoint(t)},e.prototype._unsetActivePoint=function(t){var e=this._tooltip,o=this._highlight;this._activePoint=null,this._hoveredPoint=null,!e||t&&t.keepTooltipOpen||e.hide(),this._tooltipCategoryIx=null,this._sharedHighlight=!1,o&&o.hide()},e.prototype._deferRedraw=function(){this._redraw()},e.prototype._clearRedrawTimeout=function(){this._redrawTimeout&&(clearInterval(this._redrawTimeout),this._redrawTimeout=null)},e.prototype.bindCategories=function(){for(var t=this.options,e=[].concat(t.categoryAxis),o=0;o<e.length;o++){var i=e[o];!1!==i.autoBind&&this.bindCategoryAxisFromSeries(i,o)}},e.prototype.bindCategoryAxisFromSeries=function(t,e){for(var o,i=this.options.series,r=i.length,n=new br,s=[],a=!1,p=0;p<r;p++){var h=i[p],c=h.categoryAxis===t.name||!h.categoryAxis&&0===e,l=h.data,u=l.length,d=h.categoryField&&c;if(a=d||a,d&&u>0)for(var f=(o=dh(t,ba(h.categoryField,l[0])))?uh:ba,y=0;y<u;y++){var g=l[y],v=f(h.categoryField,g,this.chartService.intl);!o&&n.get(v)||(s.push([v,g]),o||n.set(v,!0))}}if(s.length>0){o&&(s=function(t,e){void 0===e&&(e=_s);for(var o=function(t,e){void 0===e&&(e=_s);for(var o=1,i=t.length;o<i;o++)if(e(t[o],t[o-1])<0){t.sort(e);break}return t}(t,e),i=o.length,r=i>0?[o[0]]:[],n=1;n<i;n++)0!==e(o[n],Vr(r))&&r.push(o[n]);return r}(s,(function(t,e){return _s(t[0],e[0])})));var m=function(t){for(var e=t.length,o=[],i=0;i<e;i++)for(var r=t[i],n=r.length,s=0;s<n;s++)o[s]=o[s]||[],o[s].push(r[s]);return o}(s);t.categories=m[0]}else a&&(t.categories=[])},e.prototype._isBindable=function(t){for(var e=Ca.current.valueFields(t),o=!0,i=0;i<e.length;i++){var r=e[i];if(r===w?r="field":r+="Field",!Rr(t[r])){o=!1;break}}return o},e.prototype._noTransitionsRedraw=function(){var t,e=this.options;!1!==e.transitions&&(e.transitions=!1,t=!0),this._redraw(),t&&(e.transitions=!0)},e.prototype._legendItemHover=function(t,e){var o,i=this._plotArea,r=this._highlight,n=(i.srcSeries||i.series)[t];if(o=wr(n.type,[Ea,"donut","funnel"])?i.findPoint((function(o){return o.series.index===t&&o.index===e})):i.pointsBySeriesIndex(t),this._hasInactiveOpacity()&&n.visible&&o){var s=i.series.length>1,a=o.length?o[0]:o;this._displayInactiveOpacity(a,s,o)}else r.show(o)},e.prototype._shouldAttachMouseMove=function(){return this._plotArea.crosshairs.length||this._tooltip&&this._sharedTooltip()||this.requiresHandlers(["plotAreaHover","plotAreaLeave"])},e.prototype.updateMouseMoveHandler=function(){var t,e;Gr(this.element,((t={}).mousemove=this._mousemove,t)),this._shouldAttachMouseMove()&&Br(this.element,((e={}).mousemove=this._mousemove,e))},e.prototype.applyOptions=function(t,e){Hl(this._originalOptions,t),this._originalOptions=rr(this._originalOptions,t),this.options=rr({},this._originalOptions),e&&(this._theme=e,this.chartService.theme=e),this._initTheme(this.options,this._theme),this._toggleDragZoomEvents()},e.prototype.setOptions=function(t,e){this.applyOptions(t,e),this.bindCategories(),this.redraw(),this.updateMouseMoveHandler()},e.prototype.setDirection=function(t){this.chartService.rtl=Boolean(t),this.surface&&"svg"===this.surface.type&&this._destroySurface()},e.prototype.setIntlService=function(t){this.chartService.intl=t},e.prototype.noTransitionsRedraw=function(){this._noTransitionsRedraw()},e.prototype.destroy=function(){var t,e;this._destroyed=!0,Gr(this.element,((t={}).contextmenu=this._clickHandler,t[Ia]=this._mousewheelHandler,t.mousemove=this._mousemove,t.mouseleave=this._mouseleaveHandler,t)),this.domEvents&&(this.domEvents.destroy(),delete this.domEvents),this._mouseMoveTrackHandler&&Gr(document,((e={}).mousemove=this._mouseMoveTrackHandler,e)),this._destroyView(),this._destroySurface(),this._clearRedrawTimeout()},e.prototype._destroySurface=function(){var t=this.surface;t&&(t.unbind("mouseenter",this._surfaceMouseenterHandler),t.unbind("mouseleave",this._surfaceMouseleaveHandler),t.destroy(),this.surface=null)},e.prototype._destroySelections=function(){var t=this._selections;if(t)for(;t.length>0;)t.shift().destroy()},e.prototype._destroyView=function(){var t=this._model;t&&(t.destroy(),this._model=null),this._unsetActivePoint(),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)},e}(O);function Il(t,e){if(t)for(var o=0;o<t.length;o++)if(t[o].category===e)return[t[o]]}function jl(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 Dl(t){for(var e={},o=0;o<t.length;o++){var i=t[o],r=i.options.name;r&&(e[r]=i.range())}return e}var Vl=["data","categories"];function Hl(t,e){for(var o in e)if(!wr(o,Vl)&&e.hasOwnProperty(o)){var i=e[o],r=t[o];if(Rr(r)){var n=null===i;n||!Rr(i)?(delete t[o],n&&delete e[o]):r&&nr(i)&&nr(r)&&Hl(r,i)}}}function Fl(t){for(var e=0;e<t.length;e++)t[e].notifyRender()}Yr(Ll,{renderAs:"",chartArea:{},legend:{visible:!0,labels:{}},categoryAxis:{},seriesDefaults:{type:Ba,data:[],highlight:{visible:!0},labels:{},negativeValues:{visible:!1}},series:[],seriesColors:null,tooltip:{visible:!1},transitions:!0,valueAxis:{},plotArea:{},title:{},xAxis:{},yAxis:{},panes:[{}],pannable:!1,zoomable:!1});var Nl=Ll,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._slotAnchor=function(t,e){var o=this.plotArea.categoryAxis.options.vertical,i=o?{horizontal:"left",vertical:"center"}:{horizontal:"center",vertical:"bottom"};return{point:o?new fn(this.plotArea.box.x2,e.center().y):new fn(e.center().x,-2),align:i}},e.prototype._defaultAnchor=function(t,e){return this._slotAnchor({},e)},e}(bc),Gl=[Oa,"bullet"];function Wl(t){for(var e=[],o=0;o<t.length;o++){var i=t[o];e[o]=i.style.display,i.style.display="none"}return e}function ql(t,e){for(var o=0;o<t.length;o++)t[o].style.display=e[o]}function Xl(t){return Ji(t)?[t]:t}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._setElementClass=function(t){P(t,"k-sparkline")},e.prototype._initElement=function(e){t.prototype._initElement.call(this,e),this._initialWidth=Math.floor(Lr(e).width)},e.prototype._resize=function(){var e=this.element,o=Wl(e.childNodes);this._initialWidth=Math.floor(Lr(e).width),ql(e.childNodes,o),t.prototype._resize.call(this)},e.prototype._modelOptions=function(){var t=this.options,e=this._surfaceWrap(),o=Wl(e.childNodes),i=document.createElement("span");i.innerHTML=" ",e.appendChild(i);var r=rr({width:this._autoWidth,height:Lr(e).height,transitions:t.transitions},t.chartArea,{inline:!0,align:!1});return Lr(e,{width:r.width,height:r.height}),e.removeChild(i),ql(e.childNodes,o),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 o=t.prototype._createPlotArea.call(this,e);return this._autoWidth=this._initialWidth||this._calculateWidth(o),o},e.prototype._calculateWidth=function(t){for(var e=this.options,o=cr(e.chartArea.margin),i=t.charts,r=this._surfaceWrap(),n=0,s=0;s<i.length;s++){var a=i[s],p=(a.options.series||[])[0];if(p){if(p.type===Oa)return 150;if("bullet"===p.type)return 150;if(p.type===Ea)return Lr(r).height;var h=a.categoryAxis;if(h){var c=h.categoriesCount()*(!a.options.isStacked&&wr(p.type,[Ba,"verticalBullet"])?a.seriesOptions.length:1);n=Math.max(n,c)}}}var l=n*e.pointWidth;return l>0&&(l+=o.left+o.right),l},e.prototype._createSharedTooltip=function(t){return new Ul(this._plotArea,t)},e.normalizeOptions=function(t){var e=Xl(t);return(e=A(e)?{seriesDefaults:{data:e}}:rr({},e)).series||(e.series=[{data:Xl(e.data)}]),rr(e,{seriesDefaults:{type:e.type}}),(wr(e.series[0].type,Gl)||wr(e.seriesDefaults.type,Gl))&&(e=rr({},{categoryAxis:{crosshair:{visible:!1}}},e)),e},e}(Nl);Yr(Yl,{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}]});var Zl=Yl,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.setup=function(){this._initialOpacity=parseFloat(hr(this.element,"opacity").opacity)},e.prototype.step=function(t){hr(this.element,{opacity:String(Cr(this._initialOpacity,0,t))})},e.prototype.abort=function(){t.prototype.abort.call(this),hr(this.element,{display:"none",opacity:String(this._initialOpacity)})},e.prototype.cancel=function(){t.prototype.abort.call(this),hr(this.element,{opacity:String(this._initialOpacity)})},e}(a.Animation);function Kl(t,e){var o=document.createElement("div");return o.className=t,e&&(o.style.cssText=e),o}var $l=function(t){function e(e,o,i){t.call(this),this.options=rr({},this.options,i),this.container=e,this.chartService=o;var r=hr(e,["paddingLeft","paddingTop"]);this.chartPadding={top:r.paddingTop,left:r.paddingLeft},this.createElements(),e.appendChild(this.element)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createElements=function(){var t=this.element=Kl("k-navigator-hint","display: none; position: absolute; top: 1px; left: 1px;"),e=this.tooltip=Kl("k-tooltip k-chart-tooltip"),o=this.scroll=Kl("k-scroll");e.innerHTML=" ",t.appendChild(e),t.appendChild(o)},e.prototype.show=function(t,e,o){var i=this.element,r=this.options,n=this.scroll,s=this.tooltip,a=ys(ws(t)+ws(e-t)/2),p=.4*o.width(),h=o.center().x-p,c=(o.center().x-h)/(r.max-r.min),l=a-r.min,u=this.chartService.intl.format(r.format,t,e),d=fr(r);this.clearHideTimeout(),this._visible||(hr(i,{visibility:"hidden",display:"block"}),this._visible=!0),d&&(u=d({from:t,to:e})),s.innerHTML=u,hr(s,{left:o.center().x-s.offsetWidth/2,top:o.y1});var f=hr(s,["marginTop","borderTopWidth","height"]);hr(n,{width:p,left:h+l*c,top:o.y1+f.marginTop+f.borderTopWidth+f.height/2}),hr(i,{visibility:"visible"})},e.prototype.clearHideTimeout=function(){this._hideTimeout&&clearTimeout(this._hideTimeout),this._hideAnimation&&this._hideAnimation.cancel()},e.prototype.hide=function(){var t=this;this.clearHideTimeout(),this._hideTimeout=setTimeout((function(){t._visible=!1,t._hideAnimation=new Ql(t.element),t._hideAnimation.setup(),t._hideAnimation.play()}),this.options.hideDelay)},e.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},e}(O);Yr($l,{format:"{0:d} - {1:d}",hideDelay:500});var Jl=$l,tu="_navigator",eu=tu;function ou(){}var iu=function(t){function e(e){var o;t.call(this),this.chart=e;var i=this.options=rr({},this.options,e.options.navigator),r=i.select;r&&(r.from=this.parseDate(r.from),r.to=this.parseDate(r.to)),Rr(i.hint.visible)||(i.hint.visible=i.visible),this.chartObserver=new Sr(this,((o={}).drag="_drag",o.dragEnd="_dragEnd",o.zoom="_zoom",o.zoomEnd="_zoomEnd",o)),e.addObserver(this.chartObserver)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.parseDate=function(t){return Ps(this.chart.chartService.intl,t)},e.prototype.clean=function(){this.selection&&(this.selection.destroy(),this.selection=null),this.hint&&(this.hint.destroy(),this.hint=null)},e.prototype.destroy=function(){this.chart&&(this.chart.removeObserver(this.chartObserver),delete this.chart),this.clean()},e.prototype.redraw=function(){this._redrawSelf(),this.initSelection()},e.prototype.initSelection=function(){var t,e=this.chart,o=this.options,i=this.mainAxis(),r=i.roundedRange(),n=r.min,s=r.max,a=o.select,p=a.from,h=a.to,c=a.mousewheel,l=(t=i,ou.prototype=t,new ou);0!==i.categoriesCount()&&(this.clean(),l.box=i.box,this.selection=new mc(e,l,{min:n,max:s,from:p||n,to:h||s,mousewheel:Wr(c,{zoom:"left"}),visible:o.visible},new Sr(this,{selectStart:"_selectStart",select:"_select",selectEnd:"_selectEnd"})),o.hint.visible&&(this.hint=new Jl(e.element,e.chartService,{min:n,max:s,template:fr(o.hint),format:o.hint.format})))},e.prototype.setRange=function(){var t=this.chart._createPlotArea(!0).namedCategoryAxes[eu].roundedRange(),e=t.min,o=t.max,i=this.options.select||{},r=i.from||e;r<e&&(r=e);var n=i.to||o;n>o&&(n=o),this.options.select=rr({},i,{from:r,to:n}),this.filterAxes()},e.prototype._redrawSelf=function(t){var e=this.chart._plotArea;e&&e.redraw(Vr(e.panes),t)},e.prototype.redrawSlaves=function(){var t=this.chart,e=t._plotArea,o=e.panes.slice(0,-1);e.srcSeries=t.options.series,e.options.categoryAxis=t.options.categoryAxis,e.clearSeriesPointsCache(),e.redraw(o)},e.prototype._drag=function(t){var e,o=this.chart,i=this.selection,r=o._eventCoordinates(t.originalEvent),n=this.mainAxis(),s=n.roundedRange(),a=n.pane.box.containsPoint(r),p=o._plotArea.categoryAxis,h=t.axisRanges[p.options.name],c=this.options.select;if(h&&!a&&i){e=c.from&&c.to?ws(c.to)-ws(c.from):ws(i.options.to)-ws(i.options.from);var l=ys(Hr(ws(h.min),s.min,ws(s.max)-e)),u=ys(Hr(ws(l)+e,ws(s.min)+e,s.max));this.options.select={from:l,to:u},this.options.liveDrag&&(this.filterAxes(),this.redrawSlaves()),i.set(l,u),this.showHint(l,u)}},e.prototype._dragEnd=function(){this.filterAxes(),this.filter(),this.redrawSlaves(),this.hint&&this.hint.hide()},e.prototype.readSelection=function(){var t=this.selection.options,e=t.from,o=t.to,i=this.options.select;i.from=e,i.to=o},e.prototype.filterAxes=function(){var t=this.options.select;void 0===t&&(t={});for(var e=this.chart.options.categoryAxis,o=t.from,i=t.to,r=0;r<e.length;r++){var n=e[r];n.pane!==tu&&(n.min=o,n.max=i)}},e.prototype.filter=function(){var t=this.chart,e=this.options.select;if(t.requiresHandlers(["navigatorFilter"])){var o=this.mainAxis(),i={from:e.from,to:e.to};if("category"!==o.options.type){var r=new Hs(rr({baseUnit:"fit"},t.options.categoryAxis[0],{categories:[e.from,e.to]}),t.chartService).options;i.from=vs(r.min,-r.baseUnitStep,r.baseUnit),i.to=vs(r.max,r.baseUnitStep,r.baseUnit)}this.chart.trigger("navigatorFilter",i)}},e.prototype._zoom=function(t){var e=this.chart._plotArea.categoryAxis,o=this.selection,i=this.options,r=i.select,n=i.liveDrag,s=this.mainAxis(),a=t.delta;if(o){var p=s.categoryIndex(o.options.from),h=s.categoryIndex(o.options.to),c=this.chart._eventCoordinates(t.originalEvent);t.originalEvent.preventDefault(),Math.abs(a)>1&&(a*=3),h-p>1?(o.zoom(a,c),this.readSelection()):(e.options.min=r.from,r.from=e.scaleRange(-t.delta*this.chart._mousewheelZoomRate(),c).min),n&&(this.filterAxes(),this.redrawSlaves()),o.set(r.from,r.to),this.showHint(this.options.select.from,this.options.select.to)}},e.prototype._zoomEnd=function(t){this._dragEnd(t)},e.prototype.showHint=function(t,e){var o=this.chart._plotArea;this.hint&&this.hint.show(t,e,o.backgroundBox())},e.prototype._selectStart=function(t){return this.chart._selectStart(t)},e.prototype._select=function(t){return this.showHint(t.from,t.to),this.chart._select(t)},e.prototype._selectEnd=function(t){return this.hint&&this.hint.hide(),this.readSelection(),this.filterAxes(),this.filter(),this.redrawSlaves(),this.chart._selectEnd(t)},e.prototype.mainAxis=function(){var t=this.chart._plotArea;if(t)return t.namedCategoryAxes[eu]},e.prototype.select=function(t,e){var o=this.options.select;return t&&e&&(o.from=this.parseDate(t),o.to=this.parseDate(e),this.filterAxes(),this.filter(),this.redrawSlaves(),this.selection.set(t,e)),{from:o.from,to:o.to}},e.setup=function(t,o){if(void 0===t&&(t={}),void 0===o&&(o={}),!t.__navi){t.__navi=!0;var i=rr({},o.navigator,t.navigator),r=t.panes=[].concat(t.panes),n=rr({},i.pane,{name:tu});i.visible||(n.visible=!1,n.height=.1),r.push(n),e.attachAxes(t,i),e.attachSeries(t,i,o)}},e.attachAxes=function(t,e){var o=e.series||[],i=t.categoryAxis=[].concat(t.categoryAxis),r=t.valueAxis=[].concat(t.valueAxis),n=0===lh(o,La).length,s=rr({type:"date",pane:tu,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;i.push(rr({},s,{maxDateGroups:200},a,{name:eu,title:null,baseUnit:"fit",baseUnitStep:"auto",labels:{visible:!1},majorTicks:{visible:!1}}),rr({},s,a,{name:eu+"_labels",maxDateGroups:20,baseUnitStep:"auto",labels:{position:""},plotBands:[],autoBaseUnitSteps:{minutes:[]},_overlap:!0}),rr({},s,a,{name:eu+"_ticks",maxDateGroups:200,majorTicks:{width:.5},plotBands:[],title:null,labels:{visible:!1,mirror:!0},_overlap:!0})),r.push(rr({name:eu,pane:tu,majorGridLines:{visible:!1},visible:!1},e.valueAxis))},e.attachSeries=function(t,e,o){for(var i=t.series=t.series||[],r=[].concat(e.series||[]),n=o.seriesColors,s=e.seriesDefaults,a=0;a<r.length;a++)i.push(rr({color:n[a%n.length],categoryField:e.dateField,visibleInLegend:!1,tooltip:{visible:!1}},s,r[a],{axis:eu,categoryAxis:eu,autoBind:e.autoBindElements}))},e}(O),ru=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,o){var i=Lr(this.element).width||600,r=o,n={seriesDefaults:{categoryField:e.dateField},axisDefaults:{categoryAxis:{name:"default",majorGridLines:{visible:!1},labels:{step:2},majorTicks:{visible:!1},maxDateGroups:Math.floor(i/28)}}};r&&(r=rr({},r,n)),iu.setup(e,r),t.prototype.applyDefaults.call(this,e,r)},e.prototype._setElementClass=function(t){P(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=mr([].concat(t.series,t.navigator.series),(function(t){return t&&t.visible})).length,o=this._seriesCount!==e;return this._seriesCount=e,o},e.prototype._fullRedraw=function(){var e=this.navigator;e||(e=this.navigator=new iu(this),this.trigger("navigatorCreated",{navigator:e})),e.clean(),e.setRange(),t.prototype._redraw.call(this),e.initSelection()},e.prototype._trackSharedTooltip=function(e){var o=this._plotArea.paneByPoint(e);o&&o.options.name===tu?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),o=0;o<e.length;o++){var i=e[o];i.name===eu?t=i.categories:t&&i.pane===tu&&(i.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 o=this._eventCoordinates(e),i=this._plotArea.paneByPoint(o);return t.prototype._stopChartHandlers.call(this,e)||i&&i.options.name===tu},e.prototype._toggleDragZoomEvents=function(){this._dragZoomEnabled||(this.element.style.touchAction="none",this._dragZoomEnabled=!0)},e}(Nl);Yr(ru,{dateField:"date",axisDefaults:{categoryAxis:{type:"date",baseUnit:"fit",justified:!0},valueAxis:{narrowRange:!0,labels:{format:"C"}}},navigator:{select:{},seriesDefaults:{markers:{visible:!1},tooltip:{visible:!0},line:{width:2}},hint:{},visible:!0},tooltip:{visible:!0},legend:{visible:!1}});var nu=ru,su=Math.PI/180;function au(t,e){var o=t.getOrigin(),i=t.getSize(),r=cr(e);return t.setOrigin([o.x-r.left,o.y-r.top]),t.setSize([i.width+(r.left+r.right),i.height+(r.top+r.bottom)]),t}var pu=a.Group,hu=a.Path,cu=a.Text;function lu(t,e){var o=t.box,i=t.children[0].box,r=e.border||{},n=e.background||"",s=hu.fromRect(new p.Rect([o.x1,o.y1],[o.width(),o.height()]),{stroke:{}}),a=new cu(t.text,new p.Point(i.x1,i.y1),{font:e.font,fill:{color:e.color}}),h=au(a.bbox().clone(),e.padding),c=hu.fromRect(h,{stroke:{color:r.width?r.color:"",width:r.width,opacity:r.opacity,dashType:r.dashType,lineJoin:"round",lineCap:"round"},fill:{color:n}}),l=new pu;return l.append(s),l.append(c),l.append(a),l}function uu(t,e,o){var i=Rr(t.from)?t.from:x,r=Rr(t.to)?t.to:m;return t.from=Math.max(Math.min(r,i),e),t.to=Math.min(Math.max(r,i),o),t}function du(t,e){var o=cr(e);return o.left=-o.left,o.top=-o.top,o.right=-o.right,o.bottom=-o.bottom,au(t,o)}var fu=a.Path,yu=a.Surface,gu=function(t){function e(e,o,i,r){void 0===r&&(r={}),t.call(this),this.element=e,this.theme=i,this.contextService=new is(this,r),this._originalOptions=rr({},this.options,o),this.options=rr({},this._originalOptions),this._initTheme(i),this.redraw()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.destroy=function(){this.surface&&(this.surface.destroy(),this.surface=null),delete this.element,delete this.surfaceElement},e.prototype.value=function(t){var e=this.pointers[0];if(0===arguments.length)return e.value();e.value(t),this._setValueOptions(t)},e.prototype._draw=function(){var t=this.surface;t.clear(),t.draw(this._visuals)},e.prototype.exportVisual=function(){return this._visuals},e.prototype.allValues=function(t){var e=this.pointers,o=[];if(0===arguments.length){for(var i=0;i<e.length;i++)o.push(e[i].value());return o}if(A(t))for(var r=0;r<t.length;r++)Ji(t[r])&&e[r].value(t[r]);this._setValueOptions(t)},e.prototype._setValueOptions=function(t){for(var e=[].concat(this.options.pointer),o=[].concat(t),i=0;i<o.length;i++)e[i].value=o[i]},e.prototype.resize=function(){this.noTransitionsRedraw()},e.prototype.noTransitionsRedraw=function(){var t=this.options.transitions;this._toggleTransitions(!1),this.redraw(),this._toggleTransitions(t)},e.prototype.redraw=function(){var t=this._surfaceSize(),e=new p.Rect([0,0],[t.width,t.height]);this._initSurface(),this.gaugeArea=this._createGaugeArea(),this._createModel();var o=du(e.bbox(),this._gaugeAreaMargin);this.reflow(o)},e.prototype.setOptions=function(t,e){this._originalOptions=rr(this._originalOptions,t),this.options=rr({},this._originalOptions),this._initTheme(e),this.redraw()},e.prototype.setDirection=function(t){this.contextService.rtl=Boolean(t),this.surface&&"svg"===this.surface.type&&(this.surface.destroy(),this.surface=null)},e.prototype.setIntlService=function(t){this.contextService.intl=t},e.prototype._initTheme=function(t){var e=t||this.theme||{};this.theme=e,this.options=rr({},e,this.options);var o=this.options,i=o.pointer;if(A(i)){for(var r=[],n=0;n<i.length;n++)r.push(rr({},e.pointer,i[n]));o.pointer=r}},e.prototype._createGaugeArea=function(){var t=this.options.gaugeArea,e=this.surface.size(),o=t.border||{},i=new p.Rect([0,0],[e.width,e.height]);return this._gaugeAreaMargin=t.margin||5,o.width>0&&(i=du(i,o.width)),fu.fromRect(i,{stroke:{color:o.width?o.color:"",width:o.width,dashType:o.dashType,lineJoin:"round",lineCap:"round"},fill:{color:t.background}})},e.prototype._initSurface=function(){var t=this.options,e=this.surface,o=this._surfaceElement(),i=this._surfaceSize();Lr(o,i),e&&e.options.type===t.renderAs?(this.surface.clear(),this.surface.resize()):(e&&e.destroy(),this.surface=yu.create(o,{type:t.renderAs}))},e.prototype._surfaceSize=function(){var t=this.options,e=this._getSize();return t.gaugeArea&&rr(e,t.gaugeArea),e},e.prototype._surfaceElement=function(){return this.surfaceElement||(this.surfaceElement=document.createElement("div"),this.element.appendChild(this.surfaceElement)),this.surfaceElement},e.prototype.getSize=function(){return this._getSize()},e.prototype._getSize=function(){var t=this.element,e=this._defaultSize(),o=t.offsetWidth,i=t.offsetHeight;return o||(o=e.width),i||(i=e.height),{width:o,height:i}},e.prototype._defaultSize=function(){return{width:200,height:200}},e.prototype._toggleTransitions=function(t){this.options.transitions=t;for(var e=0;e<this.pointers.length;e++)this.pointers[e].options.animation.transitions=t},e}(O);Yr(gu,{plotArea:{},theme:"default",renderAs:"",pointer:{},scale:{},gaugeArea:{}});var vu=gu,mu=a.Path,xu=a.Group,_u=p.Point;function bu(t,e){var o,i,r=t.position,n=t.tickX,s=t.tickY;return t.vertical?(o=new _u(n,r),i=new _u(n+e.size,r)):(o=new _u(r,s),i=new _u(r,s+e.size)),new mu({stroke:{color:e.color,width:e.width}}).moveTo(o).lineTo(i)}function wu(t,e,o,i){var r=e.length;if(i.visible)for(var n=o.mirror,s=o.lineBox,a=i.skip;a<r;a+=i.step)a%i.skipUnit!=0&&(o.tickX=n?s.x2:s.x2-i.size,o.tickY=n?s.y1-i.size:s.y1,o.position=e[a],t.append(bu(o,i)))}var Cu=function(t){function e(e,o){var i=e||{};!Rr(i.reverse)&&!1===i.vertical&&(o||{}).rtl&&(i=Object.assign({},i,{reverse:!0})),t.call(this,0,1,i,o),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=rr({},this.options,t);return(e=rr({},e,{labels:{mirror:e.mirror}})).majorUnit=e.majorUnit||dn(e.min,e.max),e},e.prototype.initFields=function(){},e.prototype.render=function(){var t=this.elements=new xu,e=this.renderLabels(),o=this.renderLine(),i=this.renderTicks(),r=this.renderRanges();return t.append(o,e,i,r),t},e.prototype.renderRanges=function(){for(var t=this.options,e=t.min,o=t.max,i=t.vertical,r=t.labels.mirror,n=t.ranges||[],s=new xu,a=n.length,h=t.rangeSize||t.minorTicks.size/2,c=0;c<a;c++){var l=uu(n[c],e,o),u=this.getSlot(l.from,l.to),d=i?this.lineBox():u,f=i?u:this.lineBox();i?d.x1-=h*(r?-1:1):f.y2+=h*(r?-1:1),s.append(mu.fromRect(new p.Rect([d.x1,f.y1],[d.x2-d.x1,f.y2-f.y1]),{fill:{color:l.color,opacity:l.opacity},stroke:{}}))}return s},e.prototype.renderLabels=function(){for(var t=this.labels,e=this.options,o=new xu,i=0;i<t.length;i++)o.append(lu(t[i],e.labels));return o},e.prototype.renderLine=function(){var t=this.options.line,e=this.lineBox(),o=new xu;if(t.width>0&&t.visible){var i=new mu({stroke:{color:t.color,dashType:t.dashType,width:t.width}});i.moveTo(e.x1,e.y1).lineTo(e.x2,e.y2),o.append(i)}return o},e.prototype.renderTicks=function(){var t=new xu,e=this.options,o=e.majorTicks.visible?e.majorUnit:0,i={vertical:e.vertical,mirror:e.labels.mirror,lineBox:this.lineBox()};return wu(t,this.getMajorTickPositions(),i,e.majorTicks),wu(t,this.getMinorTickPositions(),i,rr({},{skipUnit:o/e.minorUnit},e.minorTicks)),t},e}(Xs);Yr(Cu,{min:0,max:50,majorTicks:{size:15,align:"inside",color:l,width:.5,visible:!0},minorTicks:{size:10,align:"inside",color:l,width:.5,visible:!0},line:{width:.5},labels:{position:"inside",padding:2},mirror:!1,_alignLines:!1});var ku=Cu,Su=function(t){function e(e,o){t.call(this);var i=e.options,r=i.min,n=i.max,s=this.options=rr({},this.options,o);s.fill=s.color,this.scale=e,Rr(s.value)?s.value=Hr(s.value,r,n):s.value=r}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.value=function(t){var e=this.options,o=e.value;if(0===arguments.length)return o;var i=this.scale.options,r=i.min,n=i.max;e._oldValue=Rr(e._oldValue)?e.value:r,e.value=Hr(t,r,n),this.elements&&this.repaint()},e}(O);Yr(Su,{color:l});var Au=Su,Pu=function(t){function e(e,o){t.call(this,e,o),this.options=rr({track:{visible:Rr(o.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,o,i=this.options,r=this.scale,n=r.options,s=n.mirror,a=n.vertical,p=r.lineBox(),h=i.track.size||i.size,c=i.size/2,l=cr(i.margin),u=a?l[s?"left":"right"]:l[s?"bottom":"top"];u=s?-u:u,a?(o=new gn(p.x1+u,p.y1,p.x1+u,p.y2),s?o.x1-=h:o.x2+=h,"barPointer"!==i.shape&&(t=e=new gn(p.x2+u,p.y1-c,p.x2+u,p.y2+c))):(o=new gn(p.x1,p.y1-u,p.x2,p.y1-u),s?o.y2+=h:o.y1-=h,"barPointer"!==i.shape&&(t=e=new gn(p.x1-c,p.y1-u,p.x2+c,p.y1-u))),this.trackBox=o,this.pointerRangeBox=e,this.box=t||o.clone().pad(i.border.width)},e.prototype.getElementOptions=function(){var t=this.options;return{fill:{color:t.color,opacity:t.opacity},stroke:Rr(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,o=t.options,i=o.mirror,r=o.vertical,n=cr(e.margin);return r?n[i?"left":"right"]:n[i?"bottom":"top"]},e}(Au);Yr(Pu,{shape:"barPointer",track:{border:{width:1}},color:l,border:{width:1},opacity:1,margin:cr(3),animation:{type:"barPointer"},visible:!0});var Tu=Pu,Mu=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,o=t.from,i=t.to,r=t.vertical,n=r?"x1":"y1";t.mirror===r?(o[n]-=e,i[n]-=e):(o[n]+=e,i[n]+=e);var s=this.fromScale=new p.Point(o.x1,o.y1),a=this.toScale=new p.Point(i.x1,i.y1);0!==t.duration&&(t.duration=Math.max(s.distanceTo(a)/t.duration*1e3,1))},e.prototype.step=function(t){var e=Cr(this.fromScale.x,this.toScale.x,t),o=Cr(this.fromScale.y,this.toScale.y,t);this.element.transform(p.transform().translate(e,o))},e}(a.Animation);Yr(Mu,{easing:"linear",duration:250}),a.AnimationFactory.current.register("arrowPointer",Mu);var Ou=Mu,Bu=p.Point,Ru=a.Path,Eu=function(t){function e(e,o){t.call(this,e,o),Rr(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,o=e/2,i=t.options.mirror?-1:1;return t.options.vertical?[new Bu(0,0-o),new Bu(0-i*e,0),new Bu(0,0+o)]:[new Bu(0-o,0),new Bu(0,0+i*e),new Bu(0+o,0)]},e.prototype.repaint=function(){var t=this.scale,e=this.options,o=new Ou(this.elements,rr(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&&(o.options.duration=0),o.setup(),o.play()},e.prototype.render=function(){var t=this.scale,e=this.options,o=this.getElementOptions(),i=this.pointerShape(e.value);e.animation.type="arrowPointer";var r=new Ru({stroke:o.stroke,fill:o.fill}).moveTo(i[0]).lineTo(i[1]).lineTo(i[2]).close(),n=t.getSlot(e.value);return r.transform(p.transform().translate(n.x1,n.y1)),this.elements=r,r},e}(Tu),zu=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?S:k,o=this.to=t.newPoints[0][e],i=this.from=t.oldPoints[0][e];0!==t.duration&&(t.duration=Math.max(Math.abs(o-i)/t.speed*1e3,1)),this._set(i)},e.prototype.step=function(t){var e=Cr(this.from,this.to,t);this._set(e)},e.prototype._set=function(t){var e="set"+this.axis.toUpperCase(),o=this.options.newPoints;o[0][e](t),o[1][e](t)},e}(a.Animation);Yr(zu,{easing:"linear",speed:250}),a.AnimationFactory.current.register("barPointer",zu);var Lu=zu,Iu=a.Group,ju=a.Path,Du=function(t){function e(e,o){t.call(this,e,o),Rr(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,o=this.options,i=e.options,r=i.mirror,n=i.vertical,s=r===n?-1:1,a=o.size*s,h=e.getSlot(e.options.min),c=e.getSlot(t),l=n?S:k,u=n?k:S,d=this._margin()*s,f=new p.Point;f[l]=h[l+"1"],f[u]=h[u+"1"];var y=new p.Point;y[l]=c[l+"1"],y[u]=c[u+"1"],n?(f.translate(d,0),y.translate(d,0)):(f.translate(0,d),y.translate(0,d));var g=y.clone(),v=f.clone();return n?(g.translate(a,0),v.translate(a,0)):(g.translate(0,a),v.translate(0,a)),[f,y,g,v]},e.prototype.repaint=function(){var t=this.scale,e=this.options,o=this.pointerShape(e.value),i=this.pointerPath,r=this.pointerShape(e._oldValue);i.moveTo(o[0]).lineTo(o[1]).lineTo(o[2]).lineTo(o[3]).close();var n=new Lu(i,rr(e.animation,{reverse:t.options.reverse,vertical:t.options.vertical,oldPoints:[r[1],r[2]],newPoints:[o[1],o[2]]}));!1===e.animation.transitions&&(n.options.duration=0),n.setup(),n.play()},e.prototype.render=function(){var t=new Iu,e=this.getElementOptions();this.options.track.visible&&t.append(this.renderTrack());var o=this.pointerPath=new ju({stroke:e.stroke,fill:e.fill});return t.append(o),this.elements=t,t},e.prototype.renderTrack=function(){var t=this.options.track,e=t.border||{},o=this.trackBox.clone().pad(e.width||0);return new ju.fromRect(o.toRect(),{fill:{color:t.color,opacity:t.opacity},stroke:{color:e.width?e.color||t.color:"",width:e.width,dashType:e.dashType}})},e}(Tu),Vu=a.Group,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.reflow=function(t){var e=this.pointers,o=t.origin.x,i=t.origin.y,r=new gn(o,i,o+t.width(),i+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 Vu,e=this.scale.render(),o=this.pointers;t.append(this.gaugeArea),t.append(e);for(var i=0;i<o.length;i++){var r=o[i];t.append(r.render()),r.value(r.options.value)}this._visuals=t},e.prototype._createModel=function(){var t=this.options,e=this.scale=new ku(t.scale,this.contextService);this.pointers=[];var o=t.pointer;o=A(o)?o:[o];for(var i=0;i<o.length;i++){var r=rr({},o[i],{animation:{transitions:t.transitions}}),n="arrow"===r.shape?Eu:Du;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,o=this.scale,i=this.pointers,r=t.center(),n=i[0].box.clone().wrap(o.box),s=0;s<i.length;s++)n.wrap(i[s].box.clone());return o.options.vertical?(e=n.width()/2,n=new gn(r.x-e,t.y1,r.x+e,t.y2)):(e=n.height()/2,n=new gn(t.x1,r.y-e,t.x2,r.y+e)),n},e.prototype._alignElements=function(){for(var t,e=this.scale,o=this.pointers,i=e.box,r=o[0].box.clone().wrap(e.box),n=this.bbox,s=0;s<o.length;s++)r.wrap(o[s].box.clone());e.options.vertical?(t=n.center().x-r.center().x,e.reflow(new gn(i.x1+t,n.y1,i.x2+t,n.y2))):(t=n.center().y-r.center().y,e.reflow(new gn(i.x1,i.y1+t,i.x2,i.y2+t)));for(var a=0;a<o.length;a++)o[a].reflow(this.bbox)},e.prototype._shrinkScaleWidth=function(t){var e=this.scale;if(!e.options.vertical){var o=e.contentBox().width()-t.width();o>0&&(e.box.shrink(o,0),e.box.alignTo(t,"center"),e.reflow(e.box))}},e.prototype._shrinkElements=function(){for(var t=this.scale,e=this.pointers,o=t.box.clone(),i=t.options.vertical?"y":"x",r=e[0].box,n=0;n<e.length;n++)r.wrap(e[n].box.clone());o[i+1]+=Math.max(o[i+1]-r[i+1],0),o[i+2]-=Math.max(r[i+2]-o[i+2],0),t.reflow(o);for(var s=0;s<e.length;s++)e[s].reflow(this.bbox)},e}(vu);Yr(Hu,{transitions:!0,gaugeArea:{background:""},scale:{vertical:!0}});var Fu=Hu,Nu=a.Arc,Uu=a.Path,Gu=a.Group;function Wu(t,e,o,i){var r=new Gu,n=t.center,s=t.getRadiusX();if(i.visible)for(var a=0;a<e.length;a++){var h=t.pointAt(e[a]),c=new p.Point(n.x+s-i.size,n.y).rotate(e[a],n);r.append(new Uu({stroke:{color:i.color,width:i.width}}).moveTo(h).lineTo(c))}return r}function qu(t,e,o,i){return{from:t,to:e,color:o,opacity:i}}var Xu=function(t){function e(e,o){t.call(this,0,1,e,o)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initUserOptions=function(t){var e=rr({},this.options,t);return e.majorUnit=e.majorUnit||dn(e.min,e.max),e.minorUnit=e.minorUnit||e.majorUnit/10,e},e.prototype.initFields=function(){},e.prototype.render=function(t,e){var o=this.renderArc(t,e);this.bbox=o.bbox(),this.labelElements=this.renderLabels(),this.ticks=this.renderTicks(),this.ranges=this.renderRanges()},e.prototype.reflow=function(t){var e=t.center(),o=Math.min(t.height(),t.width())/2;if(!Rr(this.bbox))return this.render(e,o);this.bbox=this.arc.bbox(),this.radius(this.arc.getRadiusX()),this.repositionRanges(),this.renderLabels()},e.prototype.slotAngle=function(t){var e=this.options,o=e.min,i=e.max,r=e.reverse,n=e.startAngle,s=e.endAngle,a=s-n;return(r?s-(t-o)/(i-o)*a:(t-o)/(i-o)*a+n)+180},e.prototype.hasRanges=function(){var t=this.options.ranges;return t&&t.length},e.prototype.ticksSize=function(){var t=this.options,e=t.majorTicks,o=t.minorTicks,i=0;return e.visible&&(i=e.size),o.visible&&(i=Math.max(o.size,i)),i},e.prototype.labelsCount=function(){var e=t.prototype.labelsCount.call(this),o=this.options;return o.endAngle-o.startAngle>=360&&o.max%o.majorUnit==0&&(e-=1),e},e.prototype.renderLabels=function(){var t=this.options,e=this.arc.clone(),o=e.getRadiusX(),i=this.tickAngles(e,t.majorUnit),r=t.rangeSize=t.rangeSize||.1*o,n=new Gu,s=.05*o;Rr(t.rangeDistance)?s=t.rangeDistance:t.rangeDistance=s;var a=t.labels,h="inside"===a.position,c=Rr(this.labelElements);h&&(o-=this.ticksSize(),this.hasRanges()&&!c&&(o-=r+s),e.setRadiusX(o).setRadiusY(o));for(var l=this.labels,u=l.length,d=cr(a.padding),f=(d.left+d.right)/2,y=(d.top+d.bottom)/2,g=0;g<u;g++){var v=l[g],m=v.box.width()/2,x=v.box.height()/2,_=i[g],b=(_-180)*su,w=e.pointAt(_),C=w.x+Math.cos(b)*(m+f)*(h?1:-1),k=w.y+Math.sin(b)*(x+y)*(h?1:-1);v.reflow(new gn(C-m,k-x,C+m,k+x));var S=new p.Point(v.box.x1,v.box.y1),A=void 0;if(c){var P=(A=this.labelElements.children[g]).bbox().origin,T=A.transform()||p.transform();T.translate(S.x-P.x,S.y-P.y),A.transform(T)}else A=lu(v,t.labels),n.append(A);this.bbox=p.Rect.union(this.bbox,A.bbox())}return n},e.prototype.repositionRanges=function(){var t=this.ranges.children;if(t.length>0){var e=this.options,o=e.rangeDistance,i=e.rangeSize,r=this.getRangeRadius();"inside"===this.options.labels.position&&(r+=i+o);for(var n=r+i/2,s=0;s<t.length;s++)t[s]._geometry.setRadiusX(n).setRadiusY(n);this.bbox=p.Rect.union(this.bbox,this.ranges.bbox())}},e.prototype.renderRanges=function(){var t=this.rangeSegments(),e=t.length,o=new Gu;if(e){var i=this.options,r=i.rangeSize,n=i.reverse,s=i.rangeDistance,a=this.getRangeRadius();this.radius(this.radius()-r-s);for(var p=0;p<e;p++){var h=t[p],c=this.slotAngle(h[n?"to":"from"]),l=this.slotAngle(h[n?"from":"to"]);l-c!=0&&o.append(this.createRange(c,l,a,h))}}return o},e.prototype.createRange=function(t,e,o,i){var r=this.options.rangeSize,n=new p.Arc(this.arc.center,{radiusX:o+r/2,radiusY:o+r/2,startAngle:t,endAngle:e});return new Nu(n,{stroke:{width:r,color:i.color,opacity:i.opacity,lineCap:i.lineCap}})},e.prototype.rangeSegments=function(){var t=this.options,e=t.ranges||[],o=e.length,i=[];if(o){var r=t.min,n=t.max,s=t.rangePlaceholderColor;i.push(qu(r,n,s));for(var a=0;a<o;a++)for(var p=uu(e[a],r,n),h=i.length,c=0;c<h;c++){var l=i[c];if(l.from<=p.from&&p.from<=l.to){i.push(qu(p.from,p.to,p.color,p.opacity)),l.from<=p.to&&p.to<=l.to&&i.push(qu(p.to,l.to,s,p.opacity)),l.to=p.from;break}}}return i},e.prototype.getRangeRadius=function(){var t=this.arc,e=this.options,o=e.rangeSize,i=e.rangeDistance,r=e.majorTicks.size;return"outside"===e.labels.position?t.getRadiusX()-r-i-o:t.getRadiusX()-o},e.prototype.renderArc=function(t,e){var o=this.options;return this.arc=new p.Arc(t,{radiusX:e,radiusY:e,startAngle:o.startAngle+180,endAngle:o.endAngle+180})},e.prototype.renderTicks=function(){var t=this.arc,e=this.options,o=t.clone();this.majorTickAngles=this.tickAngles(t,e.majorUnit),this.majorTicks=Wu(o,this.majorTickAngles,e.majorUnit,e.majorTicks);var i=new Gu;i.append(this.majorTicks);var r=e.majorTicks.size,n=e.minorTicks.size;if(this._tickDifference=r-n,"outside"===e.labels.position){var s=o.getRadiusX();o.setRadiusX(s-r+n).setRadiusY(s-r+n)}return this.minorTickAngles=this.normalizeTickAngles(this.tickAngles(t,e.minorUnit)),this.minorTicks=Wu(o,this.minorTickAngles,e.minorUnit,e.minorTicks),i.append(this.minorTicks),i},e.prototype.normalizeTickAngles=function(t){for(var e=this.options,o=e.majorUnit/e.minorUnit,i=t.length-1;i>=0;i--)i%o==0&&t.splice(i,1);return t},e.prototype.tickAngles=function(t,e){var o=this.options,i=o.reverse,r=o.max-o.min,n=t.endAngle-t.startAngle,s=r/e,a=t.startAngle,p=n/s;i&&(a+=n,p=-p),n>=360&&o.max%e==0&&(s-=1);for(var h=[],c=0;c<s;c++)h.push(Ur(a,3)),a+=p;return Ur(a)<=t.endAngle&&h.push(a),h},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,o){var i=o&&this._tickDifference||0,r=this.arc,n=r.getRadiusX();o&&"outside"===this.options.labels.position&&0!==i&&(r=this.arc.clone()).setRadiusX(n-i).setRadiusY(n-i);for(var s=0;s<t.length;s++){var a=r.pointAt(e[s]),h=t[s].segments,c=a.x-h[0].anchor().x,l=a.y-h[0].anchor().y;t[s].transform((new p.transform).translate(c,l))}},e}(Xs);Yr(Xu,{min:0,max:100,majorTicks:{size:15,align:"inside",color:l,width:.5,visible:!0},minorTicks:{size:10,align:"inside",color:l,width:.5,visible:!0},startAngle:-30,endAngle:210,labels:{position:"inside",padding:2}});var Yu=Xu,Zu=function(t){function e(e,o){t.call(this,e,o);var i=this.options;i.duration=Math.max(Math.abs(i.newAngle-i.oldAngle)/i.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,o=Cr(e.oldAngle,e.newAngle,t);this.element.transform(p.transform().rotate(o,e.center))},e}(a.Animation);Yr(Zu,{easing:"linear",duration:150}),a.AnimationFactory.current.register("radialPointer",Zu);var Qu=Zu,Ku=a.Circle,$u=a.Group,Ju=a.Path,td=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(p.transform().rotate(t,this.center))},e.prototype.repaint=function(){var t=this.scale,e=this.options,o=t.slotAngle(e._oldValue),i=t.slotAngle(e.value);!1===e.animation.transitions?this.setAngle(i):new Qu(this.elements,rr(e.animation,{oldAngle:o,newAngle:i})).play()},e.prototype.render=function(){var t=this.scale,e=this.options,o=new $u;return!1!==e.animation&&rr(e.animation,{startAngle:0,center:t.arc.center,reverse:t.options.reverse}),o.append(this._renderNeedle(),this._renderCap()),this.elements=o,this.setAngle(su),o},e.prototype.reflow=function(t){var e=this.center=t.center,o=Hr(this.options.length||1,.1,1.5),i=this.radius=t.getRadiusX()*o,r=this.capSize=Math.round(i*this.options.cap.size);this.bbox=p.Rect.fromPoints(new p.Point(e.x-r,e.y-r),new p.Point(e.x+r,e.y+r))},e.prototype._renderNeedle=function(){var t=this.scale.options.minorTicks.size,e=this.center,o=this.options.color,i=new Ju({fill:{color:o},stroke:{color:o,width:.5}});return i.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(),i},e.prototype._renderCap=function(){var t=this.options,e=t.cap.color||t.color,o=new p.Circle(this.center,this.capSize);return new Ku(o,{fill:{color:e},stroke:{color:e}})},e}(Au);Yr(td,{cap:{size:.05},arrow:{width:16,height:14},animation:{type:"radialPointer",duration:150}});var ed=td,od=a.Group,id=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 o=0;o<e.length;o++)e[o].reflow(this.scale.arc),this._initialPlotArea=p.Rect.union(this._initialPlotArea,e[o].bbox);this.fitScale(t),this.alignScale(t),this._buildVisual(this.gaugeArea,e,this.scale),this._draw()},e.prototype._buildVisual=function(t,e,o){var i=this._visuals=new od;i.append(t),i.append(o.ticks),i.append(o.ranges),this._buildPointers(e),i.append(o.labelElements)},e.prototype._buildPointers=function(t){for(var e=0;e<t.length;e++){var o=t[e];o.render(),this._visuals.append(o.elements),o.value(o.options.value)}},e.prototype.fitScale=function(t){for(var e,o,i,r,n,s=this.scale.arc,a=this._initialPlotArea,p=Math.abs(this.getDiff(a,t)),h=Ur(p,3),c=Ur(-p,3),l=0,u=0;!(!(u++<100)||(l=n===i?l+1:0)>5||h!==r&&0<=(e=this.getPlotBox(h,t,s))&&e<=2||c!==r&&0<=(i=this.getPlotBox(c,t,s))&&i<=2||(r=e>0&&i>0?2*h:e<0&&i<0?2*c:Ur((h+c)/2||1,3),0<=(o=this.getPlotBox(r,t,s))&&o<=2));)n=i,o>0?(c=r,i=o):(h=r,e=o)},e.prototype.getPlotBox=function(t,e,o){var i=this.scale,r=this.pointers,n=o.getRadiusX(),s=o.clone();s.setRadiusX(n+t).setRadiusY(n+t),i.arc=s,i.reflow(e),this.plotBbox=i.bbox;for(var a=0;a<r.length;a++)r[a].reflow(s),this.plotBbox=p.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(),o=t.center(),i=e.x-o.x,r=e.y-o.y,n=this.scale,s=this.pointers;n.arc.center.x-=i,n.arc.center.y-=r,n.reflow(t);for(var a=0;a<s.length;a++)s[a].reflow(n.arc),this.plotBbox=p.Rect.union(n.bbox,s[a].bbox)},e.prototype._createModel=function(){var t=this.options,e=t.pointer,o=this.scale=new Yu(t.scale,this.contextService);this.pointers=[];for(var i=A(e)?e:[e],r=0;r<i.length;r++){var n=new ed(o,rr({},i[r],{animation:{transitions:t.transitions}}));this.pointers.push(n)}},e}(vu);Yr(id,{transitions:!0,gaugeArea:{background:""}});var rd=id,nd=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,o){var i=this.options.reverse,r=this.slotAngle(i?e:t),n=this.slotAngle(i?t:e),s=this.createRange(r,n,this.getRangeRadius(),o);return this.ranges.append(s),s},e}(Yu);Yr(nd,{min:0,max:100,majorTicks:{visible:!1},minorTicks:{visible:!1},labels:{visible:!1},startAngle:0,endAngle:180,rangeLineCap:"round"});var sd=nd,ad=function(t){function e(e,o){t.call(this,e,o);var i=this.options,r=Math.abs(i.newAngle-i.oldAngle)/i.duration*1e3;i.duration=Hr(r,150,800);var n=e.elements.options.get("stroke.color"),s=e.currentColor();n!==s&&(this.startColor=new on(n),this.color=new on(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.options,o=this.startColor,i=this.color,r=Cr(e.oldAngle,e.newAngle,t);if(this.element.angle(r),i){var n=Ur(Cr(o.r,i.r,t)),s=Ur(Cr(o.g,i.g,t)),a=Ur(Cr(o.b,i.b,t));this.element.stroke(new on(n,s,a).toHex())}},e}(a.Animation);Yr(ad,{easing:"linear",duration:150}),a.AnimationFactory.current.register("radialRangePointer",ad);var pd=ad,hd=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,o=t.slotAngle(e._oldValue),i=t.slotAngle(e.value);this.animation&&this.animation.abort(),!1===e.animation.transitions?(this.angle(i),this.stroke(this.currentColor())):(this.animation=new pd(this,rr(e.animation,{oldAngle:o,newAngle:i})),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&&rr(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,o=t.max,i=this.options,r=i.colors,n=i.color,s=i.value,a=Ji(s)?s:e;if(r)for(var p=0;p<r.length;p++){var h=r[p],c=h.color,l=h.from;void 0===l&&(l=e);var u=h.to;if(void 0===u&&(u=o),l<=a&&a<=u)return c}return n},e.prototype.reflow=function(){this.render(),this.bbox=this.elements.bbox()},e}(Au);Yr(hd,{animation:{type:"radialRangePointer",duration:150}});var cd=hd,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._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 sd(t.scale,this.contextService),o=new cd(e,rr({},{colors:t.colors,color:t.color,value:t.value,opacity:t.opacity,animation:{transitions:t.transitions}}));this.pointers=[o]},e.prototype._buildPointers=function(t){for(var e=0;e<t.length;e++){var o=t[e];o.render(),o.value(o.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 o=this.getSize(),i=this.scale.arc.center,r=i.x-t/2,n=i.y-e/2;if(t<o.width){var s=r+t;r=Math.max(r,0),s>o.width&&(r-=s-o.width)}if(e<o.height){var a=this.scale.bbox,p=a.bottomRight().y,h=n+e;n=Math.max(n,a.origin.y),h>p&&(n-=h-p)}return{left:r,top:n}},e}(rd),ud=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}(ld),dd=function(t){function e(e){t.call(this),this.setOptions(e),this.initProperties()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){},e.prototype.setOptions=function(t){this.options=Object.assign({},this.options,t),this.quietZoneLength=this.options.addQuietZone?2*this.options.quietZoneLength:0},e.prototype.encode=function(t,e,o){var i=Rr(t)?String(t):t;return this.initValue(i,e,o),this.options.addQuietZone&&this.addQuietZone(),this.addData(),this.options.addQuietZone&&this.addQuietZone(),{baseUnit:this.baseUnit,pattern:this.pattern}},e.prototype.initValue=function(){},e.prototype.addQuietZone=function(){this.pattern.push(this.options.quietZoneLength||10)},e.prototype.addData=function(){},e.prototype.invalidCharacterError=function(t){throw new Error('Character "'+t+'" is not valid for symbology '+this.name+".")},e}(O);Yr(dd,{quietZoneLength:10,addQuietZone:!0,addCheckSum:!0});var fd=Object.assign,yd=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),fd(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,o=this.getWeightedSum(t,e,this.cCheckSumTotal)%this.checkSumMod;if(this.checksum=String(o),this.addPattern(this.characterMap[o]),++e>=this.kCheckSumMinLength){var i=(o+this.getWeightedSum(t,e,this.kCheckSumTotal))%this.checkSumMod;this.checksum+=i,this.addPattern(this.characterMap[i])}},e.prototype.getWeightedSum=function(t,e,o){for(var i=0,r=0;r<t.length;r++)i+=this.weightedValue(this.getValue(t.charAt(r)),e,r,o);return i},e.prototype.weightedValue=function(t,e,o,i){return((e-o)%i||i)*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),o=this.characterMap[e];this.addPattern(o)},e.prototype.addPattern=function(t){for(var e,o=0;o<t.length;o++)e=parseInt(t.charAt(o),10),this.pattern.push(e),this.totalUnits+=e},e}(dd);Yr(yd,{addCheckSum:!0});var gd=Object.assign,vd=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),gd(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}(dd),md=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),gd(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,o){this.width=e,this.height=o,this.value=t,this.dataLength=t.length,this.pattern=[],this.patternString=""},e.prototype.prepareValues=function(){var t,e=this.minBaseUnitLength,o=this.minRatio,i=Math.ceil(Math.max(.15*this.width,24)),r=this.maxRatio;if(this.height<i)throw new Error("Insufficient height for Code39 encoding: the current height is "+this.height+"px and the minimum height is "+i+"px.");for(t=this.getBaseUnit(r);t<e&&r>o;)r=parseFloat((r-.1).toFixed(1)),t=this.getBaseUnit(r);if(t<e){var n=Math.ceil(this.getBaseWidth(o)*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}(vd);Yr(md,{addCheckSum:!1});var xd={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,o=0;o<this.extendedMappings.length;o++)if(e=this.extendedMappings[o].call(this,t)){for(var i=0;i<e.length;i++){var r=e[i];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,o;if(this.specialAsciiCodes[t]){e=[];for(var i=0;i<this.specialAsciiCodes[t].length;i++)e.push(this.characterMap[this.shiftCharacters[3]]),e.push(this.characterMap[this.specialAsciiCodes[t][i]])}else o=6*Math.floor(t/32)+(t-27)%32+64,e=[this.characterMap[this.shiftCharacters[3]],this.characterMap[String.fromCharCode(o)]];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"]},_d=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),rr(this,xd,{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}(md),bd=Object.assign,wd=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),bd(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,o){this.value=t,this.width=e,this.height=o,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 o=0;o<e.length;o++)t=this.characterMap[this._findCharacterByValue(e[o])],this.addPattern(t.pattern)},e.prototype._getCheckValues=function(){var t,e,o=this.values,i=o.length,r=0;for(e=i-1;e>=0;e--)r+=this.weightedValue(o[e],i-e,this.cCheckSumTotal);for(t=r%this.checkSumMod,r=this.weightedValue(t,1,this.kCheckSumTotal),e=i-1;e>=0;e--)r+=this.weightedValue(o[e],i-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,o){return(e%o||o)*t},e.prototype.addPattern=function(t){for(var e,o=0;o<t.length;o++)e=parseInt(t.charAt(o),10),this.pattern.push(e)},e}(vd),Cd=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),rr(this,xd,{name:"Code 93 extended",pushCheckSum:function(){var t,e=this._getCheckValues();this.checksum=e.join("");for(var o=0;o<e.length;o++)if(t=e[o],this.shiftValuesAsciiCodes[t])this.addExtended(this.shiftValuesAsciiCodes[t]);else{var i=this._findCharacterByValue(t);this.addPattern(this.characterMap[i].pattern)}}})},e}(wd),kd=/^\d+$/,Sd=Object.assign,Ad=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),Sd(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,o){this.height=o,this.width=e,this.baseHeight=o/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(kd.test(t)||this.invalidCharacterError(t.match(/[^0-9]/)[0]),!wr(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,o=0;o<t.length;o++)e=this.height-this.baseHeight*t.charAt(o),this.pattern.push({width:1,y1:e,y2:this.height}),this.pattern.push(1)},e}(dd),Pd=/^\d+$/,Td=/^[a-z0-9]+$/i,Md=Object.assign,Od=function(t){function e(e){t.call(this),this.encoding=e,this.initProperties()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){},e.prototype.addStart=function(){},e.prototype.is=function(){},e.prototype.isCode=function(){return!1},e.prototype.move=function(){},e.prototype.pushState=function(){},e}(O),Bd=function(t){function e(e,o){t.call(this,e),this.states=o,this._initMoves(o)}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),rr(this,{FNC4:"FNC4",SHIFT:98})},e.prototype.addStart=function(){this.encoding.addPattern(this.START)},e.prototype.is=function(t,e){var o=t.charCodeAt(e);return this.isCode(o)},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,o=this.states,i=t.value,r=i.length;if(wr("C",o)){var n=i.substr(t.index).match(/\d{4,}/g);n&&(r=i.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=[],wr(this.FNC4,t)&&this._moves.push(this._moveFNC),wr(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}(Od),Rd={};Rd.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),Md(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}(Bd),Rd.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),Md(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}(Bd),Rd.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),Md(this,{key:"C",MOVE:99,START:105})},e.prototype.addStart=function(){this.encoding.addPattern(this.START)},e.prototype.is=function(t,e){var o=Vd(t,e,4);return(e+4<=t.length||2===t.length)&&Pd.test(o)},e.prototype.move=function(){this.encoding.addPattern(this.MOVE)},e.prototype.pushState=function(t){for(var e;(e=Vd(t.value,t.index,2))&&Pd.test(e)&&2===e.length;)this.encoding.addPattern(parseInt(e,10)),t.index+=2},e.prototype.getValue=function(t){return t},e}(Od),Rd.FNC4=function(t){function e(e,o){t.call(this,e),this._initSubStates(o)}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),Md(this,{key:"FNC4",dependentStates:["A","B"]})},e.prototype.addStart=function(t){var e=t.value.charCodeAt(0)-128,o=this._getSubState(e);this.encoding[o].addStart()},e.prototype.is=function(t,e){var o=t.charCodeAt(e);return this.isCode(o)},e.prototype.isCode=function(t){return 128<=t&&t<256},e.prototype.pushState=function(t){var e,o=this._initSubState(t),i=this.encoding,r=o.value.length;if(t.index+=r,r<3)for(;o.index<r;o.index++)e=o.value.charCodeAt(o.index),o.state=this._getSubState(e),o.previousState!==o.state&&(o.previousState=o.state,i[o.state].move(o)),i.addPattern(i[o.state].MOVE),i.addPattern(i[o.state].getValue(e));else o.state!==o.previousState&&i[o.state].move(o),this._pushStart(o),i.pushData(o,this.subStates),t.index<t.value.length&&this._pushStart(o);t.fnc=!0,t.state=o.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++)wr(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 o,i="",r=e;(o=t.charCodeAt(r++))&&this.isCode(o);)i+=String.fromCharCode(o-128);return i},e}(Od),Rd.FNC1=function(t){function e(e,o){t.call(this,e),this.states=o}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),Md(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 wr(this.key,this.states)},e.prototype.pushState=function(t){var e,o,i,r=this.encoding,n=t.value.replace(/\s/g,""),s=new RegExp("["+this.startAI+this.endAI+"]","g"),a=t.index,p={state:this.startState};r.addPattern(this.START);for(;;){if(p.index=0,(e=(i=n.charAt(a)===this.startAI?2:0)>0?this.getBySeparator(n,a):this.getByLength(n,a)).ai.length)o=a+i+e.id.length+e.ai.length;else if((o=n.indexOf(this.startAI,a+1))<0){if(a+e.ai.max+e.id.length+i<n.length)throw new Error("Separators are required after variable length identifiers");o=n.length}if(p.value=n.substring(a,o).replace(s,""),this.validate(e,p.value),r.pushData(p,this.dependentStates),o>=n.length)break;a=o,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 o=e.substr(t.id.length),i=t.ai;if(!i.type&&!Pd.test(o))throw new Error("Application identifier "+t.id+" is numeric only but contains non numeric character(s).");if("alphanumeric"===i.type&&!Td.test(o))throw new Error("Application identifier "+t.id+" is alphanumeric only but contains non alphanumeric character(s).");if(i.length&&i.length!==o.length)throw new Error("Application identifier "+t.id+" must be "+i.length+" characters long.");if(i.min&&i.min>o.length)throw new Error("Application identifier "+t.id+" must be at least "+i.min+" characters long.");if(i.max&&i.max<o.length)throw new Error("Application identifier "+t.id+" must be at most "+i.max+" characters long.")},e.prototype.getByLength=function(t,e){for(var o,i,r=2;r<=4;r++)if(o=Vd(t,e,r),i=this.getApplicationIdentifier(o)||this.getApplicationIdentifier(o.substring(0,o.length-1)))return{id:o,ai:i};this.unsupportedAIError(o)},e.prototype.unsupportedAIError=function(t){throw new Error("'"+t+"' is not a supported Application Identifier")},e.prototype.getBySeparator=function(t,e){var o=t.indexOf(this.startAI,e),i=t.indexOf(this.endAI,o),r=t.substring(o+1,i),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,o=e.multiKey;if(e[t])return e[t];for(var i=0;i<o.length;i++){if(o[i].ids&&wr(t,o[i].ids))return o[i].type;if(o[i].ranges)for(var r=o[i].ranges,n=0;n<r.length;n++)if(r[n][0]<=t&&t<=r[n][1])return o[i].type}},e}(Od);var Ed=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),Md(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 Rd[this.states[t]](this,this.states)},e.prototype.initValue=function(t,e,o){this.pattern=[],this.value=t,this.width=e,this.height=o,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 o=t.state;t.state=t.previousState,t.previousState=o,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,o=this.characterMap[t].toString(),i=0;i<o.length;i++)e=parseInt(o.charAt(i),10),this.pattern.push(e),this.totalUnits+=e;this.checkSum+=t*this.position++},e.prototype.getNextState=function(t,e){for(var o=0;o<e.length;o++)if(this[e[o]].is(t.value,t.index))return e[o];this.invalidCharacterError(t.value.charAt(t.index))},e}(dd),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.initProperties=function(){t.prototype.initProperties.call(this),Md(this,{name:"Code 128 A",states:["A"]})},e}(Ed),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.initProperties=function(){t.prototype.initProperties.call(this),Md(this,{name:"Code 128 B",states:["B"]})},e}(Ed),Id=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),Md(this,{name:"Code 128 C",states:["C"]})},e}(Ed),jd=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),Md(this,{name:"Code 128",states:["C","B","A","FNC4"]})},e}(Ed),Dd=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),Md(this,{name:"Code GS1-128",states:["FNC1","C","B"]})},e}(Ed);function Vd(t,e,o){return t.substring(e,e+o)}var Hd=Object.assign,Fd=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),Hd(this,{characterMap:["12121212","12121221","12122112","12122121","12211212","12211221","12212112","12212121","21121212","21121221"],START:"21",STOP:"121",checkSumType:"",checkSums:qd})},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}(dd),Nd=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),Hd(this,{name:"MSI Modulo10",checkSumType:"Modulo10"})},e}(Fd),Ud=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),Hd(this,{name:"MSI Modulo11",checkSumType:"Modulo11"})},e}(Fd),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.initProperties=function(){t.prototype.initProperties.call(this),Hd(this,{name:"MSI Modulo10 Modulo10",checkSumType:"Modulo10Modulo10"})},e}(Fd),Wd=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),Hd(this,{name:"MSI Modulo11 Modulo10",checkSumType:"Modulo11Modulo10"})},e}(Fd),qd={Modulo10:function(t){var e,o,i,r=[0,""],n=t.length%2;for(e=0;e<t.length;e++)r[(e+n)%2]+=parseInt(t.charAt(e),10);for(i=r[0],o=(2*r[1]).toString(),e=0;e<o.length;e++)i+=parseInt(o.charAt(e),10);return[(10-i%10)%10]},Modulo11:function(t){for(var e,o=0,i=t.length,r=0;r<i;r++)o+=(((i-r)%6||6)+1)*t.charAt(r);return 10!==(e=(11-o%11)%11)?[e]:[1,0]},Modulo11Modulo10:function(t){var e,o=this.Modulo11(t);return e=t+o[0],o.concat(this.Modulo10(e))},Modulo10Modulo10:function(t){var e,o=this.Modulo10(t);return e=t+o[0],o.concat(this.Modulo10(e))}},Xd=Object.assign,Yd=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),Xd(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,o){var i=String(t);if(12!==i.length||/\D/.test(i))throw new Error('The value of the "EAN13" encoding should be 12 symbols');this.pattern=[],this.options.height=o,this.baseUnit=e/(95+this.quietZoneLength),this.value=i,this.checksum=this.calculateChecksum(),this.leftKey=i[0],this.leftPart=i.substr(1,6),this.rightPart=i.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 o=0;o<t.length;o++)e&&parseInt(this.keyTable[e].charAt(o),10)?this.addPieces(Array.prototype.slice.call(this.characterMap.digits[t.charAt(o)]).reverse(),!0):this.addPieces(this.characterMap.digits[t.charAt(o)],!0)},e.prototype.addPieces=function(t,e){for(var o=0;o<t.length;o++)e?this.pattern.push({y1:0,y2:.95*this.options.height,width:t[o]}):this.pattern.push(t[o])},e.prototype.calculateChecksum=function(){for(var t=0,e=0,o=this.value.split("").reverse().join(""),i=0;i<o.length;i++)i%2?e+=parseInt(o.charAt(i),10):t+=parseInt(o.charAt(i),10);return(10-(3*t+e)%10)%10},e}(dd),Zd=Object.assign,Qd=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),Zd(this,{name:"EAN 8"})},e.prototype.initValue=function(t,e,o){if(7!==t.length||/\D/.test(t))throw new Error("Invalid value provided");this.value=t,this.options.height=o,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}(Yd),Kd={code11:yd,code39:md,code39extended:_d,code93:wd,code93extended:Cd,code128:jd,code128a:zd,code128b:Ld,code128c:Id};Kd["gs1-128"]=Dd,Kd.msimod10=Nd,Kd.msimod11=Ud,Kd.msimod1010=Gd,Kd.msimod1110=Wd,Kd.postnet=Ad,Kd.ean8=Qd,Kd.ean13=Yd;var $d=function(t){function e(e,o,i){void 0===i&&(i=ln),t.call(this),this.options=rr({},this.options,o),this.element=e,this.onError=i,this._initElement(),this._initSurface(),this._setOptions(o),o&&Rr(o.value)&&this.redraw()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.destroy=function(){this._destroySurface()},e.prototype._initElement=function(){P(this.element,"k-barcode")},e.prototype._initSurface=function(){var t=this.options,e=this.surface;e&&e.options.type===t.renderAs||(this._destroySurface(),this._initSurfaceElement(),this.surface=this._createSurface())},e.prototype._createSurface=function(){return a.Surface.create(this.surfaceElement,{type:this.options.renderAs})},e.prototype._destroySurface=function(){this.surface&&(this.surface.destroy(),this.surface=null,this._destroySurfaceElement())},e.prototype._initSurfaceElement=function(){this.surfaceElement||(this.surfaceElement=document.createElement("div"),this.surfaceElement.style.position="relative",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){this._setOptions(t),this.redraw()},e.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)},e.prototype.getSize=function(){return{width:this.element.offsetWidth,height:this.element.offsetHeight}},e.prototype._resize=function(){this.redraw()},e.prototype.createVisual=function(){this.visual=this._render()},e.prototype._render=function(){var t,e,o=this.options,i=o.value,r=o.text,n=cr(r.margin),s=this._getSize(),p=o.border||{},h=this.encoding,c=new gn(0,0,s.width,s.height).unpad(p.width).unpad(o.padding),l=c.height(),u=new a.Group;this.contentBox=c,u.append(this._getBackground(s)),r.visible&&(l-=a.util.measureText(i,{font:r.font}).height+n.top+n.bottom);try{t=h.encode(i,c.width(),l)}catch(t){return this.onError(t),u}return r.visible&&(e=i,o.checksum&&Rr(h.checksum)&&(e+=" "+h.checksum),u.append(this._getText(e))),this.barHeight=l,this._bandsGroup=this._getBands(t.pattern,t.baseUnit),u.append(this._bandsGroup),u},e.prototype.exportVisual=function(){return this._render()},e.prototype._getSize=function(){var t=this.element,e=t.clientWidth,o=t.clientHeight,i=new p.Size(300,100);return e>0&&(i.width=e),o&&(i.height=o),this.options.width&&(i.width=this.options.width),this.options.height&&(i.height=this.options.height),i},e.prototype.value=function(t){if(!Rr(t))return this.options.value;this.options.value=String(t),this.redraw()},e.prototype._getBands=function(t,e){for(var o,i,r=this.contentBox,n=r.x1,s=new a.Group,h=0;h<t.length;h++){if(o=(i=nr(t[h])?t[h]:{width:t[h],y1:0,y2:this.barHeight}).width*e,h%2){var c=p.Rect.fromPoints(new p.Point(n,i.y1+r.y1),new p.Point(n+o,i.y2+r.y1)),l=a.Path.fromRect(c,{fill:{color:this.options.color},stroke:null});s.append(l)}n+=o}return s},e.prototype._getBackground=function(t){var e=this.options,o=e.border||{},i=new gn(0,0,t.width,t.height).unpad(o.width/2);return a.Path.fromRect(i.toRect(),{fill:{color:e.background},stroke:{color:o.width?o.color:"",width:o.width,dashType:o.dashType}})},e.prototype._getText=function(t){var e=this.options.text,o=this._textbox=new Vn(t,{font:e.font,color:e.color,align:"center",vAlign:"bottom",margin:e.margin});return o.reflow(this.contentBox),o.renderVisual(),o.visual},e.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),!Kd[this.type])throw new Error("Encoding '"+this.type+"' is not supported.");this.encoding=new Kd[this.type],this.options=rr({},this.options,t)},e}(O);Yr($d,{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}});var Jd=$d,tf={width:500,height:100};var ef=function(t,e){if(void 0===e&&(e=tf),!t)throw new Error("Please specify barcode type to validate.");var o=t.toLowerCase(),i="";if("upca"===o?(o="ean13",i="0"):"upce"===o&&(o="ean8",i="0"),!Kd[o])throw new Error("Encoding '"+t+"' is not supported.");return function(t,e,o){return function(i){try{t.encode(o+i,e.width,e.height)}catch(t){return{valid:!1,error:t}}return{valid:!0}}}(new Kd[o],e,i)},of=Object.assign;function rf(t,e){for(var o=[],i=0;i<t.length;)o.push(t.substring(i,i+e)),i+=e;return o}function nf(t,e){var o=Number(t).toString(2);return o.length<e&&(o=new Array(e-o.length+1).join(0)+o),o}function sf(t){return parseInt(t,2)}var af=function(t){function e(e){t.call(this),this.matrix=e,this.row=e.length-1,this.column=e.length-1,this.startColumn=this.column,this.dir=-1,this.c=0}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.move=function(){this.row+=this.dir*this.c,this.c^=1,this.column=this.startColumn-this.c},e.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}},e.prototype.getNextRemainderCell=function(){if(this.move(),void 0===this.matrix[this.row][this.column])return{row:this.row,column:this.column}},e}(O),pf=function(t){function e(e,o){t.call(this),this.dataString=e,this.version=o}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(O),hf=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.getEncodingResult=function(t,e){var o=function(t){var e,o=[],i=0,r=t;o.push(If(r,8,5,8,e)),e=o[0].mode,r=r.substr(o[0].modeString.length);for(;r.length>0;){var n=If(r,17,9,16,e);n.mode!==e?(e=n.mode,o.push(n),i++):o[i].modeString+=n.modeString,r=r.substr(n.modeString.length)}return o}(t),i=jf(function(t){for(var e,o=0,i=0;i<t.length;i++)e=ff[t[i].mode],o+=e.getStringBitsLength(t[i].modeString.length);return Math.ceil(o/8)}(o),e),r=function(t,e){for(var o,i="",r=0;r<t.length;r++)o=ff[t[r].mode],i+=o.encode(t[r].modeString,e);return i}(o,i);return new pf(r,i)},e}(O),cf=function(t){function e(){t.call(this),this.initProperties()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){of(this,{modeIndicator:"",bitsInCharacterCount:[]})},e.prototype.getVersionIndex=function(t){return t<10?0:t>26?2:1},e.prototype.getBitsCharacterCount=function(t){return this.bitsInCharacterCount[this.getVersionIndex(t||40)]},e.prototype.getModeCountString=function(t,e){return this.modeIndicator+nf(t,this.getBitsCharacterCount(e))},e.prototype.encode=function(){},e.prototype.getStringBitsLength=function(){},e.prototype.getValue=function(){},e}(O),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),of(this,{bitsInCharacterCount:[10,12,14],modeIndicator:"0001"})},e.prototype.getValue=function(t){return parseInt(t,10)},e.prototype.encode=function(t,e){var o,i=rf(t,3),r=this.getModeCountString(t.length,e);for(o=0;o<i.length-1;o++)r+=nf(i[o],10);return r+nf(i[o],1+3*i[o].length)},e.prototype.getStringBitsLength=function(t,e){var o=t%3;return 4+this.getBitsCharacterCount(e)+10*Math.floor(t/3)+3*o+(0===o?0:1)},e}(cf),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),of(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 o,i=rf(t,2),r=this.getModeCountString(t.length,e);for(o=0;o<i.length-1;o++)r+=nf(45*this.getValue(i[o].charAt(0))+this.getValue(i[o].charAt(1)),11);return r+nf(2===i[o].length?45*this.getValue(i[o].charAt(0))+this.getValue(i[o].charAt(1)):this.getValue(i[o].charAt(0)),1+5*i[o].length)},e.prototype.getStringBitsLength=function(t,e){return 4+this.getBitsCharacterCount(e)+11*Math.floor(t/2)+t%2*6},e}(cf),df=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),of(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 o=this.getModeCountString(t.length,e),i=0;i<t.length;i++)o+=nf(this.getValue(t.charAt(i)),8);return o},e.prototype.getStringBitsLength=function(t,e){return 4+this.getBitsCharacterCount(e)+8*t},e}(cf),ff={};ff.numeric=new lf,ff.alphanumeric=new uf,ff.byte=new df;var yf=function(t){function e(){t.call(this),this.initProperties(),this.mode=ff[this.encodingMode]}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){of(this,{encodingMode:"byte",utfBOM:"111011111011101110111111",initialModeCountStringLength:20,ranges:[128,2048,65536,2097152,67108864]})},e.prototype.getEncodingResult=function(t,e){var o=this.encode(t),i=jf(this.getDataCodewordsCount(o),e),r=this.mode.getModeCountString(o.length/8,i)+o;return new pf(r,i)},e.prototype.getDataCodewordsCount=function(t){var e=t.length;return Math.ceil((this.initialModeCountStringLength+e)/8)},e.prototype.encode=function(t){for(var e=this.utfBOM,o=0;o<t.length;o++)e+=this.encodeCharacter(t.charCodeAt(o));return e},e.prototype.encodeCharacter=function(t){var e=this.getBytesCount(t),o=e-1,i="";if(1===e)i=nf(t,8);else{for(var r=8-e,n=0;n<o;n++)i=nf(t>>6*n&63|128,8)+i;i=(t>>6*o|255>>r<<r).toString(2)+i}return i},e.prototype.getBytesCount=function(t){for(var e=this.ranges,o=0;o<e.length;o++)if(t<e[o])return o+1},e}(O),gf=[{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}}],vf={1:0},mf={0:1},xf={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},_f=[1,0,1,1,1],bf=[1,0,1],wf={L:"01",M:"00",Q:"11",H:"10"},Cf=["11101100","00010001"],kf=[function(t,e){return(t+e)%2==0},function(t){return t%2==0},function(t){return t%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}],Sf=/^\d+/,Af=new RegExp("^[A-Z $%*+./:-]+"),Pf=new RegExp("^[A-Z0-9 $%*+./:-]+"),Tf=new RegExp("^[^A-Z0-9 $%*+./:-]+"),Mf=[[1,0],[1,25,0]];function Of(t,e,o,i){for(var r=0;r<t.length;r++)t[r][o][i]=e}function Bf(t,e,o,i){for(var r=0;r<kf.length;r++)t[r][o][i]=kf[r](o,i)?1^e:parseInt(e,10)}function Rf(t,e){for(var o=[],i=t.length-2;i>=0;i--)o[i]=t[i]^e[i];return o}function Ef(t,e){for(var o=[],i=0;i<t.length;i++)for(var r=0;r<e.length;r++)void 0===o[i+r]?o[i+r]=(t[i]+(e[r]>=0?e[r]:0))%255:o[i+r]=vf[mf[o[i+r]]^mf[(t[i]+e[r])%255]];return o}function zf(t,e){var o=[],i=t.length-1;do{o[i]=mf[(t[i]+e)%255],i--}while(void 0!==t[i]);return o}function Lf(t,e){var o,i,r=Mf[e-1],n=new Array(e).concat(t),s=new Array(n.length-r.length).concat(r),a=t.length,p=[];for(i=0;i<a;i++)o=zf(s,vf[n[n.length-1]]),s.splice(0,1),n=Rf(o,n);for(i=n.length-1;i>=0;i--)p[e-1-i]=nf(n[i],8);return p}function If(t,e,o,i,r){var n,s,a=Sf.exec(t),p=a?a[0]:"",h=Af.exec(t),c=h?h[0]:"",l=Pf.exec(t),u=l?l[0]:"";return p&&(p.length>=e||t.length===p.length||p.length>=o&&!Pf.test(t.charAt(p.length)))?(n="numeric",s=p):u&&(t.length===u.length||u.length>=i||"alphanumeric"===r)?(n="alphanumeric",s=p||c):(n="byte",s=u?u+Tf.exec(t.substring(u.length))[0]:Tf.exec(t)[0]),{mode:n,modeString:s}}function jf(t,e){var o=0,i=gf.length-1,r=Math.floor(gf.length/2);do{t<gf[r][e].totalDataCodewords?i=r:o=r,r=o+Math.floor((i-o)/2)}while(i-o>1);return t<=gf[o][e].totalDataCodewords?r+1:i+1}function Df(t,e,o){var i=sf(e),r=e.length-1,n=t<<r,s=nf(t,o-r),a=function(t,e){var o=e.toString(2).length,i=t.toString(2).length,r=t;do{i=(r^=e<<i-o).toString(2).length}while(i>=o);return r}(n,i);return a=s+nf(a,r)}function Vf(t,e){return parseInt(t.charAt(e),10)}function Hf(t,e){var o,i,r=t[0],n=0,s=e.length;for(o=0,i=8;o<=8;o++)6!==o&&Of(t,Vf(e,s-1-n++),o,i);for(o=8,i=7;i>=0;i--)6!==i&&Of(t,Vf(e,s-1-n++),o,i);for(n=0,i=r.length-1,o=8;i>=r.length-8;i--)Of(t,Vf(e,s-1-n++),o,i);for(Of(t,1,r.length-8,8),o=r.length-7,i=8;o<r.length;o++)Of(t,Vf(e,s-1-n++),o,i)}function Ff(t,e){for(var o,i,r,n=t[0].length,s=n-11,a=n-11,p=0;p<e.length;p++)o=Math.floor(p/3),i=p%3,Of(t,r=Vf(e,e.length-p-1),0+o,s+i),Of(t,r,a+i,0+o)}function Nf(t,e,o,i){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++)Of(t,r=e[a],o+p,i+a),Of(t,r,o+a,i+p),Of(t,r,o+s-p,i+s-a),Of(t,r,o+s-a,i+s-p)}function Uf(t,e,o,i){var r=o,n=i,s=t[0];do{Of(t,0,r,i),Of(t,0,o,n),r+=e[0],n+=e[1]}while(r>=0&&r<s.length)}function Gf(t,e,o,i,r){e[t][i]=(e[t][i]<<1^r)%128,93===e[t][i]&&(o[t]+=40)}function Wf(t,e,o,i,r,n){o[t][n]===i?r[t][n]++:(o[t][n]=i,r[t][n]>=5&&(e[t]+=3+r[t][n]-5),r[t][n]=1)}function qf(t,e){var o=Math.floor(t/e*100),i=o%5,r=Math.abs(o-i-50),n=Math.abs(o+5-i-50);return 10*Math.min(r/5,n/5)}function Xf(t,e,o){var i=function(t){return t&&t.toLowerCase().indexOf("utf_8")>=0?new yf:new hf}(o).getEncodingResult(t,e),r=i.version,n=gf[r-1][e],s=function(t,e){for(var o,i,r,n,s,a=0,p=[],h=[],c=e.groups,l=0;l<c.length;l++){r=c[l][0];for(var u=0;u<r;u++){i=c[l][1],o=[],n=[];for(var d=1;d<=i;d++)s=t.substring(a,a+8),o.push(s),n[i-d]=sf(s),a+=8;p.push(o),h.push(Lf(n,e.errorCodewordsPerBlock))}}return[p,h]}(function(t,e){for(var o=8*e,i=0,r=0,n=t;n.length<o&&i<"0000".length;)n+="0000".charAt(i++);for(n.length%8!=0&&(n+=new Array(9-n.length%8).join("0"));n.length<o;)n+=Cf[r],r^=1;return n}(i.dataString,n.totalDataCodewords),n),a=function(t){for(var e=[],o=17+4*t,i=0;i<kf.length;i++){e[i]=new Array(o);for(var r=0;r<o;r++)e[i][r]=new Array(o)}return e}(r);!function(t){var e=t[0].length;Nf(t,_f,0,0),Uf(t,[-1,-1],7,7),Nf(t,_f,e-7,0),Uf(t,[1,-1],e-8,7),Nf(t,_f,0,e-7),Uf(t,[-1,1],7,e-8)}(a),function(t,e){if(!(e<2)){var o,i,r=t[0],n=r.length,s=Math.floor(e/7),a=[6],p=0;for((o=xf[e])?i=(n-13-o)/s:o=i=(n-13)/(s+1),a.push(a[p++]+o);a[p]+i<n;)a.push(a[p++]+i);for(var h=0;h<a.length;h++)for(var c=0;c<a.length;c++)void 0===r[a[h]][a[c]]&&Nf(t,bf,a[h]-2,a[c]-2)}}(a,r),function(t){for(var e=1,o=t[0].length,i=8;i<o-8;i++)Of(t,e,6,i),Of(t,e,i,6),e^=1}(a),r>=7&&Ff(a,nf(0,18)),Hf(a,nf(0,15)),function(t,e){for(var o,i,r,n=new af(t[0]),s=0;s<e.length;s++)for(o=e[s],i=0;o.length>0;){for(var a=0;a<o.length;a++)for(var p=0;p<8;p++)r=n.getNextCell(),Bf(t,o[a][i].charAt(p),r.row,r.column);for(i++;o[0]&&i===o[0].length;)o.splice(0,1)}for(;r=n.getNextRemainderCell();)Bf(t,0,r.row,r.column)}(a,s);var p=function(t){var e,o,i=[],r=[],n=[],s=[],a=[],p=t[0].length;for(o=0;o<t.length;o++)i[o]=0,n[o]=0,a[o]=[0,0],s[o]=[0,0],r[o]=[];for(var h=0;h<p;h++)for(var c=0;c<p;c++)for(var l=0;l<t.length;l++)e=t[l],n[l]+=parseInt(e[h][c],10),r[l][0]===e[h][c]&&h+1<p&&c-1>=0&&e[h+1][c]===r[l][0]&&e[h+1][c-1]===r[l][0]&&(i[l]+=3),Gf(l,s,i,0,e[h][c]),Gf(l,s,i,1,e[c][h]),Wf(l,i,r,e[h][c],a,0),Wf(l,i,r,e[c][h],a,1);var u,d=p*p,f=Number.MAX_VALUE;for(o=0;o<i.length;o++)i[o]+=qf(n[o],d),i[o]<f&&(f=i[o],u=o);return u}(a),h=a[p];return r>=7&&Ff([h],function(t){return Df(t,"1111100100101",18)}(r)),Hf([h],function(t){var e,o="";if(0===sf(t))return"101010000010010";e=Df(sf(t),"10100110111",15);for(var i=0;i<e.length;i++)o+=e.charAt(i)^"101010000010010".charAt(i);return o}(wf[e]+nf(p,3))),h}!function(){var t,e;for(e=1;e<255;e++)(t=2*mf[e-1])>255&&(t^=285),mf[e]=t,vf[t]=e;t=2*mf[e-1]^285,mf[e]=t,mf[-1]=0}(),function(){for(var t=2;t<=68;t++){var e=Mf[t-1],o=[t,0];Mf[t]=Ef(e,o)}}();var Yf=Math.round,Zf=[[0,1],[1,1],[1,2],[2,2],[2,1],[3,1],[3,0],[2,0],[2,-1],[1,-1],[1,0]],Qf=[[0,1],[1,1],[1,0]],Kf=200,$f="L",Jf="#fff",ty="#000",ey=1,oy=7,iy=function(t){function e(e,o,i){void 0===i&&(i=ln),t.call(this),this.options=rr({},this.options,o),this.element=e,this.wrapper=this.element,this.onError=i,this._initElement(),this._initSurface(),this.setOptions(o)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.destroy=function(){this._destroySurface()},e.prototype._initElement=function(){P(this.element,"k-qrcode")},e.prototype._initSurface=function(){var t=this.options,e=this.surface;e&&e.options.type===t.renderAs||(this._destroySurface(),this._initSurfaceElement(),this.surface=this._createSurface())},e.prototype._createSurface=function(){return a.Surface.create(this.surfaceElement,{type:this.options.renderAs})},e.prototype._destroySurface=function(){this.surface&&(this.surface.destroy(),this.surface=null,this._destroySurfaceElement())},e.prototype._initSurfaceElement=function(){this.surfaceElement||(this.surfaceElement=document.createElement("div"),this.surfaceElement.style.position="relative",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.redraw=function(){var t=this._getSize();this.surface.clear(),this.surface.setSize({width:t,height:t}),this.createVisual(),this.surface.draw(this.visual)},e.prototype.getSize=function(){var t=this.element,e=t.clientWidth,o=t.clientHeight,i={width:0,height:0};return e>0&&(i.width=e),o&&(i.height=o),i},e.prototype._resize=function(){this.redraw()},e.prototype.createVisual=function(){this.visual=this._render()},e.prototype.exportVisual=function(){return this._render()},e.prototype._render=function(){var t,e,o,i,r,n=this._value,s=this.options.border||{},p=this.options.padding||0,h=s.width||0;s.width=h;var c=new a.Group;try{n&&(o=Xf(n,this.options.errorCorrection,this.options.encoding),r=(i=this._getSize())-2*(h+p),t=this._calculateBaseUnit(r,o.length),e=h+p+(r-o.length*t)/2,c.append(this._renderBackground(i,s)),c.append(this._renderMatrix(o,t,e)),this._hasCustomLogo()?c.append(this._renderLogo(i,t)):this._isSwiss()&&c.append(this._renderSwissCode(i,t)))}catch(t){this.onError(t)}return c},e.prototype._renderLogo=function(t,e){var o,i=Yf(t/2),r=this._getLogoSize(e*oy),n=this.options.overlay.imageUrl,s={x:i-r.width/2,y:i-r.height/2};return o=new p.Rect(new p.Point(s.x,s.y),new p.Size(r.width,r.height)),new a.Image(n,o)},e.prototype._renderSwissCode=function(t,e){var o=this._getLogoSize(e*oy),i=(o=Math.max(o.width,o.height))/4,r=i/2,n=t/2,s={},p=new a.Group;return s.x=s.y=Math.ceil(n-e-o/2),p.append(this._renderShape(s,Math.ceil(o+2*e),Qf,"#fff")),s.x=s.y=n-o/2,p.append(this._renderShape(s,o,Qf,this.options.color)),s.x=n+r-o/2,s.y=n+r+i-o/2,p.append(this._renderShape(s,i,Zf,"#fff")),p},e.prototype._renderShape=function(t,e,o,i){var r=new a.MultiPath({fill:{color:i},stroke:null});r.moveTo(t.x,t.y);for(var n=0;n<o.length;n++)r.lineTo(t.x+e*o[n][0],t.y+e*o[n][1]);return r.close(),r},e.prototype._getSize=function(){var t;if(this.options.size)t=parseInt(this.options.size,10);else{var e=this.element,o=Math.min(e.clientWidth,e.clientHeight);t=o>0?o:Kf}return t},e.prototype._calculateBaseUnit=function(t,e){var o=Math.floor(t/e);if(o<ey){var i=Math.ceil(e*ey);this.onError(new Error("Insufficient size for QR Code: the current size is "+t+"px and the minimum size is "+i+"px."))}else o*e>=t&&o-1>=ey&&o--;return o},e.prototype._renderMatrix=function(t,e,o){for(var i=new a.MultiPath({fill:{color:this.options.color},stroke:null}),r=0;r<t.length;r++)for(var n=o+r*e,s=0;s<t.length;){for(;0===t[r][s]&&s<t.length;)s++;if(s<t.length){for(var p=s;1===t[r][s];)s++;var h=Yf(o+p*e),c=Yf(n),l=Yf(o+s*e),u=Yf(n+e);i.moveTo(h,c).lineTo(h,u).lineTo(l,u).lineTo(l,c).close()}}return i},e.prototype._renderBackground=function(t,e){var o=new gn(0,0,t,t).unpad(e.width/2);return a.Path.fromRect(o.toRect(),{fill:{color:this.options.background},stroke:{color:e.color,width:e.width}})},e.prototype.setOptions=function(t){var e=t||{};this.options=of(this.options,e),void 0!==t.value&&(this._value=String(this.options.value)),this.redraw()},e.prototype.value=function(t){if(void 0===t)return this._value;this._value=String(t),this.redraw()},e.prototype._hasCustomLogo=function(){return Boolean(this.options.overlay.imageUrl)},e.prototype._isSwiss=function(){return"swiss"===this.options.overlay.type},e.prototype._getLogoSize=function(t){var e=this.options.overlay.width,o=this.options.overlay.height;return e||o?e&&!o?o=e:!e&&o&&(e=o):e=o=t,{width:e,height:o}},e}(O);Yr(iy,{name:"QRCode",renderAs:"svg",encoding:"ISO_8859_1",value:"",errorCorrection:$f,background:Jf,color:ty,size:"",padding:0,border:{color:"",width:0},overlay:{type:"image",imageUrl:"",width:0,height:0}});var ry=iy;var ny=function(t){return void 0===t&&(t="ISO_8859_1"),function(e){try{Xf(e,"L",t)}catch(t){return{valid:!1,error:t}}return{valid:!0}}},sy={WGS84:{a:6378137,b:6356752.314245179,f:.0033528106647474805,e:.08181919084262149}};function ay(t){return t*t}var py=Math,hy=py.abs,cy=py.atan,ly=py.atan2,uy=py.cos,dy=py.sin,fy=py.tan,yy=function(t){function e(e,o){t.call(this),this.initProperties(),1===arguments.length?(this.lat=e[0],this.lng=e[1]):(this.lat=e,this.lng=o)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){rr(this,{DISTANCE_ITERATIONS:100,DISTANCE_CONVERGENCE:1e-12,DISTANCE_PRECISION:2,FORMAT:"{0:N6}{1:N6}"})},e.prototype.toArray=function(){return[this.lat,this.lng]},e.prototype.equals=function(t){return t&&t.lat===this.lat&&t.lng===this.lng},e.prototype.clone=function(){return new e(this.lat,this.lng)},e.prototype.round=function(t){return this.lng=Ur(this.lng,t),this.lat=Ur(this.lat,t),this},e.prototype.wrap=function(){return this.lng=this.lng%180,this.lat=this.lat%90,this},e.prototype.distanceTo=function(t,e){return this.greatCircleTo(t,e).distance},e.prototype.destination=function(t,o,i){var r=Nr(o),n=i||sy.WGS84,s=Nr(this.lat),a=Nr(this.lng),p=t/n.a,h=py.asin(dy(s)*uy(p)+uy(s)*dy(p)*uy(r)),c=a+ly(dy(r)*dy(p)*uy(s),uy(p)-dy(s)*dy(h));return new e(Er(h),Er(c))},e.prototype.greatCircleTo=function(t,o){var i=e.create(i),r=o||sy.WGS84;if(!i||this.clone().round(8).equals(i.clone().round(8)))return{distance:0,azimuthFrom:0,azimuthTo:0};for(var n,s,a,p,h,c,l,u,d=r.a,f=r.b,y=r.f,g=Nr(i.lng-this.lng),v=cy((1-y)*fy(Nr(this.lat))),m=dy(v),x=uy(v),_=cy((1-y)*fy(Nr(i.lat))),b=dy(_),w=uy(_),C=g,k=this.DISTANCE_ITERATIONS,S=!1;!S&&k-- >0;){s=dy(C),a=uy(C),p=py.sqrt(ay(w*s)+ay(x*b-m*w*a)),u=ly(p,c=m*b+x*w*a);var A=x*w*s/p;l=0,0!==(h=1-ay(A))&&(l=c-2*m*b/h),n=C;var P=y/16*h*(4+y*(4-3*h));C=g+(1-P)*y*A*(u+P*p*(l+P*c*(2*ay(l)-1))),S=hy(C-n)<=this.DISTANCE_CONVERGENCE}var T=h*(ay(d)-ay(f))/ay(f),M=1+T/16384*(4096+T*(T*(320-175*T)-768)),O=T/1024*(256+T*(T*(74-47*T)-128)),B=O*p*(l+O/4*(c*(2*ay(l)-1)-O/6*l*(4*ay(p)-3)*(4*ay(l)-3))),R=ly(w*s,x*b-m*w*a),E=ly(x*s,-m*w+x*b*a);return{distance:Ur(f*M*(u-B),this.DISTANCE_PRECISION),azimuthFrom:Er(R),azimuthTo:Er(E)}},e.prototype.toString=function(){return String(this.lat)+","+String(this.lng)},e.fromLngLat=function(t){return new e(t[1],t[0])},e.fromLatLng=function(t){return new e(t[0],t[1])},e.create=function(t,o){if(Rr(t))return t instanceof e?t.clone():1===arguments.length&&2===t.length?e.fromLatLng(t):new e(t,o)},e}(O),gy=Math,vy=gy.atan,my=gy.exp,xy=gy.pow,_y=gy.sin,by=gy.log,wy=gy.tan,Cy=p.Point,ky=gy.PI,Sy=ky/2,Ay=ky/4,Py=ky/180,Ty=sy.WGS84,My=function(t){function e(e){t.call(this),this.initProperties(),this._initOptions(e)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._initOptions=function(t){this.options=rr({},this.options,t)},e.prototype.initProperties=function(){rr(this,{MAX_LNG:180,MAX_LAT:85.0840590501,INVERSE_ITERATIONS:15,INVERSE_CONVERGENCE:1e-12})},e.prototype.forward=function(t,e){var o=this.options,i=o.datum.a,r=o.centralMeridian,n=Hr(t.lat,-this.MAX_LAT,this.MAX_LAT),s=e?Hr(t.lng,-this.MAX_LNG,this.MAX_LNG):t.lng,a=Nr(s-r)*i,p=this._projectLat(n);return new Cy(a,p)},e.prototype._projectLat=function(t){var e=this.options.datum,o=e.e,i=e.a,r=Nr(t),n=wy(Ay+r/2),s=o*_y(r),a=xy((1-s)/(1+s),o/2);return i*by(n*a)},e.prototype.inverse=function(t,e){var o=this.options,i=o.datum.a,r=o.centralMeridian,n=t.x/(Py*i)+r,s=Hr(this._inverseY(t.y),-this.MAX_LAT,this.MAX_LAT);return e&&(n=Hr(n,-this.MAX_LNG,this.MAX_LNG)),new yy(s,n)},e.prototype._inverseY=function(t){var e,o=this.options.datum,i=o.a,r=o.e,n=r/2,s=my(-t/i),a=Sy-2*vy(s);for(e=0;e<=this.INVERSE_ITERATIONS;e++){var p=r*_y(a),h=xy((1-p)/(1+p),n),c=Sy-2*vy(s*h)-a;if(a+=c,gy.abs(c)<=this.INVERSE_CONVERGENCE)break}return Er(a)},e}(O);Yr(My,{centralMeridian:0,datum:Ty});var Oy=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),rr(this,{MAX_LAT:85.0511287798})},e.prototype._projectLat=function(t){var e=this.options.datum.a,o=Nr(t),i=wy(Ay+o/2);return e*by(i)},e.prototype._inverseY=function(t){var e=this.options.datum.a,o=my(-t/e);return Er(Sy-2*vy(o))},e}(My),By=function(t){function e(){t.call(this);var e=this._proj=new Oy,o=this.c=2*ky*e.options.datum.a;this._tm=p.transform().translate(.5,.5).scale(1/o,-1/o),this._itm=p.transform().scale(o,-o).translate(-.5,-.5)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.toPoint=function(t,e,o){return this._proj.forward(t,o).transform(this._tm).scale(e||1)},e.prototype.toLocation=function(t,e,o){var i=t.clone().scale(1/(e||1)).transform(this._itm);return this._proj.inverse(i,o)},e}(O),Ry=Object.defineProperty,Ey=(Object.assign,function(t){var e=document.createElement("div");return e.innerHTML=t,e.firstChild}),zy=function(t){for(;t.firstChild;)t.removeChild(t.firstChild)},Ly=function(t,e){e.insertBefore(t,e.firstChild)},Iy=function(t){return t.replace(/([a-z][A-Z])/g,(function(t){return t.charAt(0)+"-"+t.charAt(1).toLowerCase()}))},jy=function(t){return t&&String(t).endsWith("px")?t:String(t)+"px"},Dy=function(t){var e,o=!1,i=[],r={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_]+)/,meego:/(MeeGo).+NokiaBrowser\/(\d+)\.([\d\._]+)/,webos:/(webOS)\/(\d+)\.(\d+(\.\d+)?)/,blackberry:/(BlackBerry|BB10).*?Version\/(\d+)\.(\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,ffos:/(Mobile).*rv:(\d+)\.(\d+(\.\d+)?).*Firefox/},n={ios:/^i(phone|pad|pod)$/i,android:/^android|fire$/i,blackberry:/^blackberry|playbook/i,windows:/windows/,wp:/wp/,flat:/sailfish|ffos|tizen/i,meego:/meego/},s={tablet:/playbook|ipad|fire/i},a={omini:/Opera\sMini/i,omobile:/Opera\sMobi/i,firefox:/Firefox|Fennec/i,mobilesafari:/version\/.*safari/i,ie:/MSIE|Windows\sPhone/i,chrome:/chrome|crios/i,webkit:/webkit/i};for(var p in r)if(r.hasOwnProperty(p)&&(i=t.match(r[p]))){if("windows"===p&&"plugins"in navigator)return!1;(o={}).device=p,o.tablet=Vy(p,s,!1),o.browser=Vy(t,a,"default"),o.name=Vy(p,n),o[o.name]=!0,o.majorVersion=i[2],o.minorVersion=(i[3]||"0").replace("_","."),e=o.minorVersion.replace(".","").substr(0,2),o.flatVersion=o.majorVersion+e+new Array(3-(e.length<3?e.length:2)).join("0");break}return o};function Vy(t,e,o){for(var i in e)if(e.hasOwnProperty(i)&&e[i].test(t))return i;return void 0!==o?o:t}var Hy=function(){var t={down:"touchstart mousedown",move:"mousemove touchmove",up:"mouseup touchend touchcancel",cancel:"mouseleave touchcancel"},e=Fy();return e.touch&&(e.mobileOS.ios||e.mobileOS.android)?t={down:"touchstart",move:"touchmove",up:"touchend touchcancel",cancel:"touchcancel"}:e.pointers?t={down:"pointerdown",move:"pointermove",up:"pointerup",cancel:"pointercancel pointerleave"}:e.msPointers&&(t={down:"MSPointerDown",move:"MSPointerMove",up:"MSPointerUp",cancel:"MSPointerCancel MSPointerLeave"}),t},Fy=function(){var t=Dy(navigator.userAgent),e=function(t){var e=!1,o=[],i={edge:/(edge)[ \/]([\w.]+)/i,webkit:/(chrome|crios)[ \/]([\w.]+)/i,safari:/(webkit)[ \/]([\w.]+)/i,opera:/(opera)(?:.*version|)[ \/]([\w.]+)/i,msie:/(msie\s|trident.*? rv:)([\w.]+)/i,mozilla:/(mozilla)(?:.*? rv:([\w.]+)|)/i};for(var r in i)if(i.hasOwnProperty(r)&&(o=t.match(i[r]))){(e={})[r]=!0,e[o[1].toLowerCase().split(" ")[0].split("/")[0]]=!0,e.version=parseInt(document.documentMode||o[2],10);break}return e}(navigator.userAgent),o=e.chrome,i=e.crios,r=e.mozilla,n=e.safari,s={};s.mobileOS=t,s.touch="ontouchstart"in window,s.pointers=!o&&!i&&!r&&!n&&window.PointerEvent,s.msPointers=!o&&window.MSPointerEvent,s.mouseAndTouchPresent=s.touch&&!(s.mobileOS.ios||s.mobileOS.android),s.eventCapture=document.documentElement.addEventListener;var a=document.createElement("table"),p=s.transitions=!1,h=s.transforms=!1;return["Moz","webkit","O","ms"].forEach((function(t){var e="string"==typeof a.style[t+"Transition"];if(e||"string"==typeof a.style[t+"Transform"]){var o=t.toLowerCase();return h={css:"ms"!==o?"-"+o+"-":"",prefix:t,event:"o"===o||"webkit"===o?o:""},e&&((p=h).event=p.event?p.event+"TransitionEnd":"transitionend"),!1}})),a=null,s.transforms=h,s.transitions=p,s.delayedClick=function(){if(s.touch){if(s.mobileOS.ios)return!0;if(s.mobileOS.android){if(!s.browser.chrome)return!0;if(s.browser.version<32)return!1;var t=document.querySelector("meta[name=viewport]");return!(t?t.getAttribute("content"):"").match(/user-scalable=no/i)}}return!1},s},Ny=function(t,e){return t.bind(e)};var Uy=function(t,e,o,i,r){Gy(t,e,o,i,r)},Gy=function(t,e,o,i,r){(A(e)?e:(e||"").split(" ")).forEach((function(e){Wy(t,e,o,i,r)}))},Wy=function(t,e,o,i,r){var n,s=i;o&&or(o)&&!i?s=o:o&&"string"==typeof o&&or(s)&&(n=o),t.addEventListener(e,(function(e){var o=e.target?e.target.closest(n):null;if(!n||n&&e.target&&o){var i=n?o:e.currentTarget;Ry(e,"currentTarget",{value:i}),Ry(e,"delegateTarget",{value:t}),s(e)}}),Boolean(r))},qy=function(t,e,o,i,r){Xy(t,e,o,i,r)},Xy=function(t,e,o,i){(A(e)?e:(e||"").split(" ")).forEach((function(e){Yy(t,e,o,i)}))},Yy=function(t,e,o,i){t.removeEventListener(e,o,Boolean(i))},Zy=Hy(navigator.userAgent);function Qy(t){return Zy[t]||t}var Ky=/([^ ]+)/g,$y=function(t){return t.replace(Ky,Qy)},Jy=function(t,e){var o=t.prototype;o.events?e.forEach((function(t){o.events.indexOf(t)<0&&o.events.push(t)})):o.events=e},tg=function(){return Number(new Date)},eg=function(){},og=dr.compile,ig=function(t){function e(e,o){t.call(this),this.element=e,this._initOptions(o),this.items=[],P(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=rr({},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;Rr(t)&&("string"==typeof t&&(e={text:t}),this.items.push(e),this._render())},e.prototype.remove=function(t){for(var e=[],o=0;o<this.items.length;o++){var i=this.items[o];i.text!==t&&e.push(i)}this.items=e,this._render()},e.prototype.clear=function(){this.items=[],zy(this.element)},e.prototype._render=function(){for(var t=[],e=og(this.options.itemTemplate),o=0;o<this.items.length;o++){var i=this.items[o],r=this._itemText(i);""!==r&&t.push(e({text:r}))}t.length>0?(zy(this.element),function(t,e){var o=document.createElement("div");for(o.innerHTML=t;o.childNodes.length>0;)e.appendChild(o.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="",o=this._inZoomLevel(t.minZoom,t.maxZoom),i=this._inArea(t.extent);return o&&i&&(e+=t.text),e},e.prototype._inZoomLevel=function(t,e){var o=Wr(t,-Number.MAX_VALUE),i=Wr(e,Number.MAX_VALUE);return this._zoom>o&&this._zoom<i},e.prototype._inArea=function(t){var e=!0;return t&&(e=t.contains(this._extent)),e},e}(O);Yr(ig,{name:"Attribution",separator:" | ",itemTemplate:"#= text #"});var rg=function(){this._defaultPrevented=!0},ng=function(){return!0===this._defaultPrevented},sg=function(t){function e(){t.call(this),this._events={}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.bind=function(t,e,o){var i,r,n,s,a=this,p="string"==typeof t?[t]:t||[],h="function"==typeof e;if(void 0===e){for(i in t)a.bind(i,t[i]);return a}var c=function(){var t=p[i];(s=h?e:e[t])&&(o&&(n=s,(s=function(){a.unbind(t,s),n.apply(a,arguments)}).original=n),(a._events[t]=a._events[t]||[]).push(s))};for(i=0,r=p.length;i<r;i++)c();return a},e.prototype.one=function(t,e){return this.bind(t,e,!0)},e.prototype.first=function(t,e){var o,i,r,n="string"==typeof t?[t]:t,s="function"==typeof e;for(o=0,i=n.length;o<i;o++){var a=n[o];(r=s?e:e[a])&&(this._events[a]=this._events[a]||[]).unshift(r)}return this},e.prototype.trigger=function(t,e){var o,i,r=this._events[t];if(r){var n=e||{};for(n.sender=this,n._defaultPrevented=!1,n.preventDefault=rg,n.isDefaultPrevented=ng,o=0,i=(r=r.slice()).length;o<i;o++)r[o].call(this,n);return!0===n._defaultPrevented}return!1},e.prototype.unbind=function(t,e){var o,i=this._events[t];if(void 0===t)this._events={};else if(i)if(e)for(o=i.length-1;o>=0;o--)i[o]!==e&&i[o].original!==e||i.splice(o,1);else this._events[t]=[];return this},e}(O),ag={up:{className:"k-navigator-n",iconClass:"k-i-arrow-n"},down:{className:"k-navigator-s",iconClass:"k-i-arrow-s"},right:{className:"k-navigator-e",iconClass:"k-i-arrow-e"},left:{className:"k-navigator-w",iconClass:"k-i-arrow-w"}};function pg(t){var e='<button class="k-button k-button-square k-rounded-full k-button-flat k-button-flat-base k-icon-button '+ag[t].className+'" aria-label="move '+t+'"><span class="k-icon '+ag[t].iconClass+'" /></button>';return Ey(e)}var hg=function(t){function e(e,o){t.call(this),this.element=e,this._initOptions(o);var i=pg("up"),r=pg("right"),n=pg("down"),s=pg("left");this.element.appendChild(i),this.element.appendChild(r),this.element.appendChild(n),this.element.appendChild(s),P(this.element,"k-widget k-navigator"),Uy(this.element,"click",".k-button",Ny(this._click,this));var a=this.element.parentNode.closest("[data-role]");this._keyroot=a||this.element,this._tabindex(this._keyroot),Uy(this._keyroot,"keydown",Ny(this._keydown,this))}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(){qy(this._keyroot,this._keydown)},e.prototype._tabindex=function(t){var e=t||this.wrapper||this.element,o=this.element,i=e.getAttribute("tabindex")||o.getAttribute("tabindex");o.removeAttribute("tabindex"),e.setAttribute("tabindex",isNaN(i)?0:i)},e.prototype._initOptions=function(t){this.options=rr({},this.options,t)},e.prototype._pan=function(t,e){var o=this.options.panStep;this.trigger("pan",{x:t*o,y:e*o})},e.prototype._click=function(t){var e=0,o=0,i=t.currentTarget;i.matches(".k-navigator-n")?o=1:i.matches(".k-navigator-s")?o=-1:i.matches(".k-navigator-e")?e=1:i.matches(".k-navigator-w")&&(e=-1),this._pan(e,o),t.preventDefault()},e.prototype._keydown=function(t){switch(t.which){case un.UP:this._pan(0,1),t.preventDefault();break;case un.DOWN:this._pan(0,-1),t.preventDefault();break;case un.RIGHT:this._pan(1,0),t.preventDefault();break;case un.LEFT:this._pan(-1,0),t.preventDefault()}},e}(sg);function cg(t,e){return Ey('<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+'"><span class="k-icon '+e+'"></span></button>')}Yr(hg,{name:"Navigator",panStep:1}),Jy(hg,["pan"]);var lg=function(t){function e(e,o){t.call(this),this.element=e,this._initOptions(o);var i=cg("in","k-i-plus"),r=cg("out","k-i-minus");this.element.appendChild(i),this.element.appendChild(r),P(this.element,"k-widget k-zoom-control k-button-group k-group-horizontal"),this._clickHandler=this._click.bind(this),Uy(this.element,"click",".k-button",this._clickHandler);var n=this.element.parentNode.closest("[data-role]");this._keyroot=n||this.element,this._tabindex(this._keyroot),this._keydownHandler=this._keydown.bind(this),Uy(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&&qy(this.element,"click",this._clickHandler),this._keyroot&&qy(this._keyroot,"keydown",this._keydownHandler)},e.prototype._tabindex=function(t){var e=t||this.wrapper||this.element,o=this.element,i=e.getAttribute("tabindex")||o.getAttribute("tabindex");o.removeAttribute("tabindex"),e.setAttribute("tabindex",isNaN(i)?0:i)},e.prototype._initOptions=function(t){this.options=rr({},this.options,t)},e.prototype._change=function(t){var e=this.options.zoomStep;this.trigger("change",{delta:t*e})},e.prototype._click=function(t){var e=1;xr(t.currentTarget,"k-zoom-out")&&(e=-1),this._change(e),t.preventDefault()},e.prototype._keydown=function(t){switch(t.which){case un.NUMPAD_PLUS:case 187:case 61:this._change(1);break;case un.NUMPAD_MINUS:case 189:case 173:this._change(-1)}},e}(sg);Yr(lg,{name:"ZoomControl",zoomStep:1}),Jy(lg,["change"]);var ug=Math,dg=ug.max,fg=ug.min,yg=function(t){function e(e,o){t.call(this);var i=yy.create(e),r=yy.create(o);i.lng+180>r.lng+180&&i.lat+90<r.lat+90?(this.se=i,this.nw=r):(this.se=r,this.nw=i)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var o={World:{configurable:!0}};return e.prototype.contains=function(t){var e=this.nw,o=this.se,i=Wr(t.lng,t[1]),r=Wr(t.lat,t[0]);return t&&i+180>=e.lng+180&&i+180<=o.lng+180&&r+90>=o.lat+90&&r+90<=e.lat+90},e.prototype.center=function(){var t=this.nw,e=this.se,o=t.lng+(e.lng-t.lng)/2,i=t.lat+(e.lat-t.lat)/2;return new yy(i,o)},e.prototype.containsAny=function(t){for(var e=!1,o=0;o<t.length;o++)e=e||this.contains(t[o]);return e},e.prototype.include=function(t){var e=this.nw,o=this.se,i=Wr(t.lng,t[1]),r=Wr(t.lat,t[0]);e.lng=fg(e.lng,i),e.lat=dg(e.lat,r),o.lng=dg(o.lng,i),o.lat=fg(o.lat,r)},e.prototype.includeAll=function(t){for(var e=0;e<t.length;e++)this.include(t[e])},e.prototype.edges=function(){var t=this.nw,e=this.se;return{nw:this.nw,ne:new yy(t.lat,e.lng),se:this.se,sw:new yy(e.lat,t.lng)}},e.prototype.toArray=function(){var t=this.nw,e=this.se;return[t,new yy(t.lat,e.lng),e,new yy(e.lat,t.lng)]},e.prototype.overlaps=function(t){return this.containsAny(t.toArray())||t.containsAny(this.toArray())},e.create=function(t,o){return t instanceof e?t:t&&o?new e(t,o):t&&4===t.length&&!o?new e([t[0],t[1]],[t[2],t[3]]):void 0},o.World.get=function(){return new e([90,-180],[-90,180])},Object.defineProperties(e,o),e}(O),gg=function(t){function e(e,o){t.call(this),this.support=Fy(),this._initOptions(o),this.map=e;var i=document.createElement("div");P(i,"k-layer"),i.style.zIndex=this.options.zIndex,i.style.opacity=this.options.opacity,this.element=i,e.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()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.destroy=function(){this._deactivate()},e.prototype._initOptions=function(t){this.options=rr({},this.options,t)},e.prototype.show=function(){this.reset(),this._activate(),this._applyExtent(!0)},e.prototype.hide=function(){this._deactivate(),this._setVisibility(!1)},e.prototype.reset=function(){this._beforeReset(),this._reset()},e.prototype._reset=function(){this._applyExtent()},e.prototype._beforeReset=function(){},e.prototype._resize=function(){},e.prototype._panEnd=function(){this._applyExtent()},e.prototype._applyExtent=function(){var t=this.options,e=this.map.zoom(),o=!Rr(t.minZoom)||e>=t.minZoom,i=!Rr(t.maxZoom)||e<=t.maxZoom,r=yg.create(t.extent),n=!r||r.overlaps(this.map.extent());this._setVisibility(o&&i&&n)},e.prototype._setVisibility=function(t){this.element.style.display=t?"":"none"},e.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)},e.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)},e.prototype._updateAttribution=function(){var t=this.map.attribution;t&&t.add(this.options.attribution)},e.prototype._readData=function(){return this.options.data||[]},e.prototype._hasData=function(){return this._data&&this._data.length>0},e}(O),vg=Math,mg=dr.compile,xg=p.Point;function _g(t){return new xg(Ur(t.x),Ur(t.y))}function bg(t){var e=t;return"string"!=typeof t&&(e+="px"),e}var wg=function(t){function e(e,o){t.call(this,e,o),"string"==typeof this.options.subdomains&&(this.options.subdomains=this.options.subdomains.split(""));var i=this._viewType();this._view=new i(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 Cg},e.prototype._activate=function(){t.prototype._activate.call(this),this.support.mobileOS||(this._pan||(this._pan=hi(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,o=e.extent(),i={nw:e.locationToLayer(o.nw).round(),se:e.locationToLayer(o.se).round()};t.center(e.locationToLayer(e.center())),t.extent(i),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}(gg);Yr(wg,{tileSize:256,subdomains:["a","b","c"],urlTemplate:"",zIndex:1});var Cg=function(t){function e(e,o){t.call(this),this.element=e,this._initOptions(o),this.pool=new Sg}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._initOptions=function(t){this.options=rr({},this.options,t)},e.prototype.center=function(t){this._center=t},e.prototype.extent=function(t){this._extent=t},e.prototype.viewOrigin=function(t){this._viewOrigin=t},e.prototype.zoom=function(t){this._zoom=t},e.prototype.pointToTileIndex=function(t){return new xg(vg.floor(t.x/this.options.tileSize),vg.floor(t.y/this.options.tileSize))},e.prototype.tileCount=function(){var t=this.size(),e=this.pointToTileIndex(this._extent.nw),o=this._extent.nw,i=this.indexToPoint(e).translate(-o.x,-o.y);return{x:vg.ceil((vg.abs(i.x)+t.width)/this.options.tileSize),y:vg.ceil((vg.abs(i.y)+t.height)/this.options.tileSize)}},e.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}},e.prototype.indexToPoint=function(t){var e=t.x,o=t.y;return new xg(e*this.options.tileSize,o*this.options.tileSize)},e.prototype.subdomainText=function(){var t=this.options.subdomains;return t[this.subdomainIndex++%t.length]},e.prototype.destroy=function(){this.element.empty(),this.pool.empty()},e.prototype.reset=function(){this.pool.reset(),this.subdomainIndex=0,this.render()},e.prototype.render=function(){var t,e,o,i=this.tileCount(),r=this.pointToTileIndex(this._extent.nw);for(e=0;e<i.x;e++)for(o=0;o<i.y;o++)(t=this.createTile({x:r.x+e,y:r.y+o})).visible||t.show()},e.prototype.createTile=function(t){var e=this.tileOptions(t),o=this.pool.get(this._center,e);return o.element.parentNode||this.element.append(o.element),o},e.prototype.tileOptions=function(t){var e=this.wrapIndex(t),o=this.indexToPoint(t),i=this._viewOrigin,r=o.clone().translate(-i.x,-i.y);return{index:e,currentIndex:t,point:o,offset:_g(r),zoom:this._zoom,size:this.options.tileSize,subdomain:this.subdomainText(),urlTemplate:this.options.urlTemplate,errorUrlTemplate:this.options.errorUrlTemplate}},e.prototype.wrapIndex=function(t){var e=vg.pow(2,this._zoom);return{x:this.wrapValue(t.x,e),y:Hr(t.y,0,e-1)}},e.prototype.wrapValue=function(t,e){var o=vg.abs(t)%e;return t>=0?o:e-(0===o?e:o)},e}(O),kg=function(t){function e(e,o){t.call(this),this.id=e,this.visible=!0,this._initOptions(o),this.createElement(),this.show()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.destroy=function(){this.element&&(this.element.remove(),this.element=null)},e.prototype._initOptions=function(t){this.options=rr({},this.options,t)},e.prototype.createElement=function(){var t=document.createElement("img");P(t,"k-layer"),t.style.position="absolute",t.style.display="block",t.style.width=this.options.size,t.style.height=this.options.size,this.element=t},e.prototype.show=function(){var t=this.element;t.style.top=bg(this.options.offset.y),t.style.left=bg(this.options.offset.x);var e=this.url();e&&t.setAttribute("src",e),t.style.visibility="visible",this.visible=!0},e.prototype.hide=function(){this.element.style.visibility="hidden",this.visible=!1},e.prototype.url=function(){return mg(this.options.urlTemplate)(this.urlOptions())},e.prototype.errorUrl=function(){return mg(this.options.errorUrlTemplate)(this.urlOptions())},e.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}},e}(O);Yr(kg,{urlTemplate:"",errorUrlTemplate:""});var Sg=function(t){function e(){t.call(this),this._items=[]}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.get=function(t,e){return this._items.length>=this.options.maxSize&&this._remove(t),this._create(e)},e.prototype.empty=function(){for(var t=this._items,e=0;e<t.length;e++)t[e].destroy();this._items=[]},e.prototype.reset=function(){for(var t=this._items,e=0;e<t.length;e++)t[e].hide()},e.prototype._create=function(t){for(var e,o=this._items,i=Dr(t.point.toString()+t.offset.toString()+t.zoom+t.urlTemplate),r=0;r<o.length;r++)if(o[r].id===i){e=o[r];break}return e?e.show():(e=new kg(i,t),this._items.push(e)),e},e.prototype._remove=function(t){for(var e=this._items,o=-1,i=-1,r=0;r<e.length;r++){var n=e[r].options.point.distanceTo(t);n>o&&!e[r].visible&&(i=r,o=n)}-1!==i&&(e[i].destroy(),e.splice(i,1))},e}(O);Yr(Sg,{maxSize:100});var Ag=Object.assign,Pg=function(t){function e(e,o){t.call(this);var i=this,r=e[0]||e;i.capture=!1;var n=Hy(navigator.userAgent);r.addEventListener?(n.down.split(" ").forEach((function(t){r.addEventListener(t,Ny(i._press,i),!0)})),n.up.split(" ").forEach((function(t){r.addEventListener(t,Ny(i._release,i),!0)}))):(n.down.split(" ").forEach((function(t){r.attachEvent(t,Ny(i._press,i))})),n.up.split(" ").forEach((function(t){r.attachEvent(t,Ny(i._release,i))}))),i.bind(["press","release"],o||{})}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){this.trigger("release"),this.capture&&(t.preventDefault(),this.cancelCapture())},e}(sg),Tg=function(t){function e(e){t.call(this);this.forcedEnabled=!1,Ag(this,e),this.scale=1,this.horizontal?(this.measure="offsetWidth",this.scrollSize="scrollWidth",this.axis="x"):(this.measure="offsetHeight",this.scrollSize="scrollHeight",this.axis="y")}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.makeVirtual=function(){Ag(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.virtual?this._virtualMax:this.getTotal(),o=e*this.scale,i=this.getSize();(0!==e||this.forcedEnabled)&&(this.max=this.virtual?-this._virtualMin:0,this.size=i,this.total=o,this.min=Math.min(this.max,i-o),this.minScale=i/e,this.centerOffset=(o-i)/2,this.enabled=this.forcedEnabled||o>i,t||this.trigger("change",this))},e}(sg),Mg=function(t){function e(e){t.call(this);this.x=new Tg(Ag({horizontal:!0},e)),this.y=new Tg(Ag({horizontal:!1},e)),this.container=e.container,this.forcedMinScale=e.minScale,this.maxScale=e.maxScale||100,this.bind("change",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(){this.x.update(),this.y.update(),this.enabled=this.x.enabled||this.y.enabled,this.minScale=this.forcedMinScale||Math.min(this.x.minScale,this.y.minScale),this.fitScale=Math.max(this.x.minScale,this.y.minScale),this.trigger("change")},e}(sg),Og=function(t){function e(e){t.call(this),Ag(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.dimension,o=this.axis,i=this.movable,r=i[o]+t;if(e.enabled){var n=t;(r<e.min&&t<0||r>e.max&&t>0)&&(n*=this.resistance),i.translateAxis(o,n),this.trigger("change",this)}},e}(sg),Bg=function(t){function e(e){t.call(this);var o,i,r,n,s=this;Ag(s,{elastic:!0},e),r=s.elastic?.5:0,n=s.movable,s.x=o=new Og({axis:"x",dimension:s.dimensions.x,resistance:r,movable:n}),s.y=i=new Og({axis:"y",dimension:s.dimensions.y,resistance:r,movable:n}),s.userEvents.bind(["press","move","end","gesturestart","gesturechange"],{gesturestart:function(t){s.gesture=t,s.offset=zr(s.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 e,r=s.gesture,a=r.center,p=t.center,h=t.distance/r.distance,c=s.dimensions.minScale,l=s.dimensions.maxScale;n.scale<=c&&h<1&&(h+=.8*(1-h)),n.scale*h>=l&&(h=l/n.scale);var u=n.x+s.offset.left,d=n.y+s.offset.top;e={x:(u-a.x)*h+p.x-u,y:(d-a.y)*h+p.y-d},n.scaleWith(h),o.dragMove(e.x),i.dragMove(e.y),s.dimensions.rescale(n.scale),s.gesture=t,t.preventDefault()},move:function(t){t.event.target.tagName.match(/textarea|input/i)||(o.dimension.enabled||i.dimension.enabled?(o.dragMove(t.x.delta),i.dragMove(t.y.delta),t.preventDefault()):t.touch.skip())},end:function(t){t.preventDefault()}})}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(O),Rg=function(t,e,o){return"translate3d("+t+"px,"+e+"px,0) scale("+o+")"},Eg=function(t){function e(e){t.call(this);this.support=Fy(),this.transformStyle=this.support.transitions.prefix+"Transform",this.element=e,this.element.style.webkitTransformOrigin="left top",this.x=0,this.y=0,this.scale=1;var o=Rg(this.x,this.y,this.scale);this.element.style[this.transformStyle]=o,this._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){Ag(this,t),this.refresh()},e.prototype.refresh=function(){var t,e=this.x,o=this.y;this.round&&(e=Math.round(e),o=Math.round(o)),(t=Rg(e,o,this.scale))!==this.coordinates&&(this.element.style[this.transformStyle]=t,this._saveCoordinates(t),this.trigger("change"))},e.prototype._saveCoordinates=function(t){this.coordinates=t},e}(sg),zg=a.Group,Lg=function(t){function e(e,o){t.call(this,e,o),this._pan=Ny(this._pan,this),this.surface=a.Surface.create(this.element,{width:e.scrollElement.clientWidth,height:e.scrollElement.clientHeight}),this._initRoot(),this.movable=new Eg(this.surface.element),this._markers=[],this._click=this._handler("shapeClick"),this.surface.bind("click",this._click),this._mouseenter=this._handler("shapeMouseEnter"),this.surface.bind("mouseenter",this._mouseenter),this._mouseleave=this._handler("shapeMouseLeave"),this.surface.bind("mouseleave",this._mouseleave)}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(),this.dataSource.unbind("change",this._dataChange)},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 zg,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 Ig(this.map,this.options.style,this));for(var e=new zg,o=0;o<t.length;o++){var i=this._loader.parse(t[o]);i&&e.append(i)}this._root.clear(),this._root.append(e)},e.prototype.shapeCreated=function(t){var e=!1;if(t instanceof a.Circle&&this.map.options.renderPointsAsMarkers&&(e=Rr(this._createMarker(t))),!e){var o={layer:this,shape:t};e=this.map.trigger("shapeCreated",o)}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._handler=function(t){var e=this;return function(o){if(o.element){var i={layer:e,layerIndex:(e.map.layers||[]).indexOf(e),shape:o.element,shapeIndex:(e._data||[]).indexOf(o.element.dataItem),originalEvent:o.originalEvent};e.map.trigger(t,i)}}},e.prototype._activate=function(){t.prototype._activate.call(this),this._panHandler=Ny(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}(gg);Yr(Lg,{autoBind:!0,zIndex:100});var Ig=function(t){function e(e,o,i){t.call(this),this.observer=i,this.locator=e,this.style=o}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.parse=function(t){var e=new zg,o=!0;return"Feature"===t.type?(o=!1,this._loadGeometryTo(e,t.geometry,t),this._featureCreated(e,t)):this._loadGeometryTo(e,t,t),o&&e.children.length<2&&(e=e.children[0]),e},e.prototype._shapeCreated=function(t){var e=!1;return this.observer&&this.observer.shapeCreated&&(e=this.observer.shapeCreated(t)),e},e.prototype._featureCreated=function(t,e){this.observer&&this.observer.featureCreated&&this.observer.featureCreated({group:t,dataItem:e,properties:e.properties})},e.prototype._loadGeometryTo=function(t,e,o){var i,r,n=e.coordinates;switch(e.type){case"LineString":r=this._loadPolygon(t,[n],o),this._setLineFill(r);break;case"MultiLineString":for(i=0;i<n.length;i++)r=this._loadPolygon(t,[n[i]],o),this._setLineFill(r);break;case"Polygon":this._loadPolygon(t,n,o);break;case"MultiPolygon":for(i=0;i<n.length;i++)this._loadPolygon(t,n[i],o);break;case"Point":this._loadPoint(t,n,o);break;case"MultiPoint":for(i=0;i<n.length;i++)this._loadPoint(t,n[i],o)}},e.prototype._setLineFill=function(t){var e=t.segments;(e.length<4||!e[0].anchor().equals(Vr(e).anchor()))&&(t.options.fill=null)},e.prototype._loadShape=function(t,e){return this._shapeCreated(e)||t.append(e),e},e.prototype._loadPolygon=function(t,e,o){var i=this._buildPolygon(e);return i.dataItem=o,this._loadShape(t,i)},e.prototype._buildPolygon=function(t){for(var e=new(t.length>1?a.MultiPath:a.Path)(this.style),o=0;o<t.length;o++)for(var i=0;i<t[o].length;i++){var r=this.locator.locationToView(yy.fromLngLat(t[o][i]));0===i?e.moveTo(r.x,r.y):e.lineTo(r.x,r.y)}return e},e.prototype._loadPoint=function(t,e,o){var i=yy.fromLngLat(e),r=this.locator.locationToView(i),n=new p.Circle(r,10),s=new a.Circle(n,this.style);return s.dataItem=o,s.location=i,this._loadShape(t,s)},e}(O),jg=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,o=vr(e.valueField),i=t.slice(0);i.sort((function(t,e){return o(e)-o(t)}));for(var r,n=this._scaleType(),s=vr(this.options.locationField),a=0;a<i.length;a++){var p=i[a],h=s(p),c=o(p);if(Rr(h)&&Rr(c)){r||(r=new n([0,c],[e.minSize,e.maxSize])),h=yy.create(h);var l=this.map.locationToView(h),u=r.map(c),d=this._createSymbol({center:l,size:u,style:e.style,dataItem:p,location:h});d.dataItem=p,d.location=h,d.value=c,this._drawSymbol(d)}}}},e.prototype._scaleType=function(){var t=this.options.scale;return or(t)?t:Dg[t]},e.prototype._createSymbol=function(t){var e=this.options.symbol;return or(e)||(e=Vg[e]),e(t)},e.prototype._drawSymbol=function(t){var e={layer:this,shape:t};this.map.trigger("shapeCreated",e)||this.surface.draw(t)},e}(Lg);Yr(jg,{locationField:"location",valueField:"value",minSize:0,maxSize:100,scale:"sqrt",symbol:"circle",zIndex:200});var Dg={sqrt:function(t){function e(e,o){t.call(this),this._domain=e,this._range=o;var i=Math.sqrt(e[1])-Math.sqrt(e[0]),r=o[1]-o[0];this._ratio=r/i}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.map=function(t){var e=(Math.sqrt(t)-Math.sqrt(this._domain[0]))*this._ratio;return this._range[0]+e},e}(O)},Vg={circle:function(t){var e=new p.Circle(t.center,t.size/2);return new a.Circle(e,t.style)},square:function(t){var e=new a.Path(t.style),o=t.size/2,i=t.center;return e.moveTo(i.x-o,i.y-o).lineTo(i.x+o,i.y-o).lineTo(i.x+o,i.y+o).lineTo(i.x-o,i.y+o).close(),e}},Hg=Object.assign,Fg=document,Ng=Math,Ug=function(t){function e(e,o){t.call(this,e,o),this._markerClickHandler=Ny(this._markerClick,this),Uy(this.element,"click",".k-marker",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),qy(this.element,"click",this._markerClickHandler),this.clear()},e.prototype.add=function(t){if(!A(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 o={marker:t,layer:this};this.map.trigger("markerActivate",o)}},e.prototype._reset=function(){t.prototype._reset.call(this);for(var e=this.items,o=0;o<e.length;o++)this.update(e[o])},e.prototype.bind=function(t,e){var o=Gg.create(t,this.options);o.dataItem=e;var i={marker:o,layer:this};if(!this.map.trigger("markerCreated",i))return this.add(o),o},e.prototype._addOne=function(t){var e=Gg.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=vr(this.options.locationField),o=vr(this.options.titleField),i=0;i<t.length;i++){var r=t[i];this.bind({location:e(r),title:o(r)},r)}},e.prototype._markerClick=function(t){var e=this.map.layers||[],o=t.target._kendoNode,i={layer:this,layerIndex:e.indexOf(this),marker:o,markerIndex:(this.items||[]).indexOf(o),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 Hg({},{layer:this,layerIndex:this.map.layers.indexOf(this),marker:e,markerIndex:(this.items||[]).indexOf(e)},t)},e}(gg);Yr(Ug,{zIndex:1e3,autoBind:!0,dataSource:{},locationField:"location",titleField:"title"});var Gg=function(t){function e(e){t.call(this),this.options=e||{}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.destroy=function(){this.layer=null,this.unbindEvents(),this.hide()},e.prototype.addTo=function(t){this.layer=t.markers||t,this.layer.items.push(this),this.layer.update(this)},e.prototype.location=function(t){return t?(this.options.location=yy.create(t).toArray(),this.layer&&this.layer.update(this),this):yy.create(this.options.location)},e.prototype.showAt=function(t){this.render(),this.element.style.left=jy(Ng.round(t.x)),this.element.style.top=jy(Ng.round(t.y)),this.tooltip&&this.tooltip.popup&&this.tooltip.popup._position()},e.prototype.hide=function(){this.element&&(this.element.remove(),this.element=null),this.tooltip&&(this.tooltip.destroy(),this.tooltip=null)},e.prototype.bindEvents=function(){this.element&&(this._mouseEnterHandler=Ny(this._mouseEnter,this),Uy(this.element,"mouseenter",".k-marker",this._mouseEnterHandler),this._mouseLeaveHandler=Ny(this._mouseLeave,this),Uy(this.element,"mouseleave",".k-marker",this._mouseLeaveHandler))},e.prototype.unbindEvents=function(){this.element&&(qy(this.element,"mouseenter",this._mouseEnterHandler),qy(this.element,"mouseleave",this._mouseLeaveHandler))},e.prototype.render=function(){if(!this.element){var t=this.options,e=this.layer,o=Fg.createElement("span");P(o,"k-marker k-icon k-i-marker-"+Iy(t.shape||"pin")),o.setAttribute("title",t.title);var i=t.attributes||{};Object.keys(i).forEach((function(t){o.setAttributett(t,i[t])})),o._kendoNode=this,o.style.zIndex=t.zIndex,this.element=o,e&&e.element.appendChild(this.element),this.bindEvents(),this.renderTooltip()}},e.prototype._mouseEnter=function(t){var e=this._createEventArgs(t);this.layer._markerMouseEnter(e)},e.prototype._mouseLeave=function(t){var e=this._createEventArgs(t);this.layer._markerMouseLeave(e)},e.prototype._createEventArgs=function(t){return{marker:this,originalEvent:t}},e.prototype.renderTooltip=function(){},e.create=function(t,o){return t instanceof e?t:new e(rr({},o,t))},e}(O),Wg=Object.assign;function qg(t){window.requestAnimationFrame(t)}var Xg=function(t){function e(){t.call(this);this._tickProxy=Ny(this._tick,this),this._started=!1}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.tick=function(){},e.prototype.done=function(){},e.prototype.onEnd=function(){},e.prototype.onCancel=function(){},e.prototype.start=function(){this.enabled()&&(this.done()?this.onEnd():(this._started=!0,qg(this._tickProxy)))},e.prototype.enabled=function(){return!0},e.prototype.cancel=function(){this._started=!1,this.onCancel()},e.prototype._tick=function(){this._started&&(this.tick(),this.done()?(this._started=!1,this.onEnd()):qg(this._tickProxy))},e}(O),Yg=function(t){function e(e){t.call(this),Wg(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,tg()-this.startDate)},e.prototype.moveTo=function(t){var e=this.movable;this.initial=e[this.axis],this.delta=t.location-this.initial,this.duration="number"==typeof t.duration?t.duration:300,this.tick=this._easeProxy(t.ease),this.startDate=tg(),this.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,o,i){return t===i?e+o:o*(1-Math.pow(2,-10*t/i))+e},e}(Xg),Zg=Object.assign,Qg=function(t){t.preventDefault()},Kg=800,$g=0,Jg={api:0,touch:0,mouse:9,pointer:9};function tv(t){var e,o,i,r=Fy(),n=[],s=t.originalEvent||t,a=t.currentTarget,p=0;if(t.api)n.push({id:2,event:t,target:t.target,currentTarget:t.target,location:t,type:"api"});else if(t.type.match(/touch/))for(e=(o=s?s.changedTouches:[]).length;p<e;p++)i=o[p],n.push({location:i,event:t,target:i.target,currentTarget:a,id:i.identifier,type:"touch"});else r.pointers||r.msPointers?n.push({location:s,event:t,target:t.target,currentTarget:a,id:s.pointerId,type:"pointer"}):n.push({id:1,event:t,target:t.target,currentTarget:a,location:t,type:"mouse"});return n}var ev=function(t){function e(e,o){t.call(this);this.support=Fy(),this.invalidZeroEvents=this.support.mobileOS&&this.support.mobileOS.android,this.axis=e,this._updateLocationData(o),this.startLocation=this.location,this.velocity=this.delta=0,this.timeStamp=tg()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.move=function(t){var e=t["page"+this.axis],o=tg(),i=o-this.timeStamp||1;!e&&this.invalidZeroEvents||(this.delta=e-this.location,this._updateLocationData(t),this.initialDelta=e-this.startLocation,this.velocity=this.delta/i,this.timeStamp=o)},e.prototype._updateLocationData=function(t){var e=this.axis;this.location=t["page"+e],this.client=t["client"+e],this.screen=t["screen"+e]},e}(O),ov=function(t){function e(e,o,i){t.call(this),Zg(this,{x:new ev("X",i.location),y:new ev("Y",i.location),type:i.type,useClickAsTap:e.useClickAsTap,threshold:e.threshold||Jg[i.type],userEvents:e,target:o,currentTarget:i.currentTarget,initialTouch:i.target,id:i.id,pressEvent:i,_clicks:e._clicks,supportDoubleTap:e.supportDoubleTap,_moved:!1,_finished:!1})}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.press=function(){this._holdTimeout=setTimeout(Ny(this._hold,this),this.userEvents.minHold),this._trigger("press",this.pressEvent)},e.prototype._tap=function(t){var e=this;e.userEvents._clicks++,1===e.userEvents._clicks&&(e._clickTimeout=setTimeout((function(){1===e.userEvents._clicks?e._trigger("tap",t):e._trigger("doubleTap",t),e.userEvents._clicks=0}),300))},e.prototype._hold=function(){this._trigger("hold",this.pressEvent)},e.prototype.move=function(t){var e="api"!==t.type&&this.userEvents._shouldNotMove;if(!this._finished&&!e){if(this.x.move(t.location),this.y.move(t.location),!this._moved){if(this._withinIgnoreThreshold())return;if(rv.current&&rv.current!==this.userEvents)return this.dispose();this._start(t)}this._finished||this._trigger("move",t)}},e.prototype.end=function(t){this.endTime=tg(),this._finished||(this._finished=!0,this._trigger("release",t),this._moved?this._trigger("end",t):this.useClickAsTap||(this.supportDoubleTap?this._tap(t):this._trigger("tap",t)),clearTimeout(this._holdTimeout),this.dispose())},e.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)},e.prototype.skip=function(){this.dispose()},e.prototype.cancel=function(){this.dispose()},e.prototype.isMoved=function(){return this._moved},e.prototype._start=function(t){clearTimeout(this._holdTimeout),this.startTime=tg(),this._moved=!0,this._trigger("start",t)},e.prototype._trigger=function(t,e){var o=e.event,i={touch:this,x:this.x,y:this.y,target:this.target,event:o};this.userEvents.notify(t,i)&&o.preventDefault()},e.prototype._withinIgnoreThreshold=function(){var t=this.x.initialDelta,e=this.y.initialDelta;return Math.sqrt(t*t+e*e)<=this.threshold},e}(O);function iv(t){for(var e=Hy(navigator.userAgent).up.split(" "),o=0,i=e.length;o<i;o++)t(e[o])}var rv=function(t){function e(e,o){t.call(this);var i,r=Fy();this.support=r,o=o||{},i=this.filter=o.filter,this.threshold=o.threshold||$g,this.minHold=o.minHold||Kg,this.touches=[],this._maxTouches=o.multiTouch?2:1,this.allowSelection=o.allowSelection,this.captureUpIfMoved=o.captureUpIfMoved,this.useClickAsTap=!o.fastTap&&!r.delayedClick(),this._clicks=0,this.supportDoubleTap=o.supportDoubleTap;var n=!r.touch||r.mouseAndTouchPresent;if(Zg(this,{element:e,surface:o.global&&n?e.ownerDocument.documentElement:o.surface||e,stopPropagation:o.stopPropagation,pressed:!1}),this._surfaceMoveHandler=Ny(this._move,this),Uy(this.surface,$y("move"),this._surfaceMoveHandler),this._surfaceEndHandler=Ny(this._end,this),Uy(this.surface,$y("up cancel"),this._surfaceEndHandler),this._elementStartHandler=Ny(this._start,this),Uy(e,$y("down"),i,this._elementStartHandler),this.useClickAsTap&&(this._elementClickHandler=Ny(this._click,this),Uy(e,$y("click"),i,this._elementClickHandler)),r.pointers||r.msPointers)if(r.browser.version<11){e.style["-ms-touch-action"]=o.touchAction&&"none"!==o.touchAction?"pinch-zoom double-tap-zoom "+o.touchAction:"pinch-zoom double-tap-zoom"}else e.style["touch-action"]=o.touchAction||"none";if(o.preventDragEvent&&(this._elementDragStartHandler=Qg,Uy(e,$y("dragstart"),this._elementDragStartHandler)),this._elementSelectHandler=Ny(this._select,this),Uy(e,$y("mousedown"),i,this._elementSelectHandler),this.captureUpIfMoved&&r.eventCapture){var s=this.surface,a=Ny(this.preventIfMoving,this);iv((function(t){s.addEventListener(t,a,!0)}))}this.bind(["press","hold","tap","doubleTap","start","move","end","release","cancel","gesturestart","gesturechange","gestureend","gesturetap","select"],o)}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,o=this.element;if(!t._destroyed){if(t._destroyed=!0,t.captureUpIfMoved&&this.support.eventCapture){var i=t.surface;iv((function(e){i.removeEventListener(e,t.preventIfMoving)}))}qy(t.surface,$y("move"),this._surfaceMoveHandler),qy(t.surface,$y("up cancel"),this._surfaceEndHandler),qy(o,$y("down"),this._elementStartHandler),t.useClickAsTap&&qy(o,$y("click"),this._elementClickHandler),e.preventDragEvent&&qy(o,$y("dragstart"),this._elementDragStartHandler),qy(o,$y("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("cancel")},e.prototype.notify=function(t,e){var o,i,r,n,s,a,p,h,c=this.touches,l=t;if(this._isMultiTouch()){switch(l){case"move":l="gesturechange";break;case"end":l="gestureend";break;case"tap":l="gesturetap"}Zg(e,{touches:c},(o=c[0],i=c[1],r=o.x.location,n=o.y.location,s=i.x.location,a=i.y.location,p=r-s,h=n-a,{center:{x:(r+s)/2,y:(n+a)/2},distance:Math.sqrt(p*p+h*h)}))}return this.trigger(l,Zg(e,{type:l}))},e.prototype.press=function(t,e,o){this._apiCall("_start",t,e,o)},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 mr(this.touches,(function(t){return t.isMoved()})).length},e.prototype._select=function(t){this.allowSelection&&!this.trigger("select",{event:t})||t.preventDefault()},e.prototype._start=function(t){var o,i,r=0,n=this.filter,s=tv(t),a=s.length,p=t.which;if(!(p&&p>1||this._maxTouchesReached()))for(e.current=null,this.currentTarget=t.currentTarget,this.stopPropagation&&t.stopPropagation();r<a&&!this._maxTouchesReached();r++)i=s[r],(o=n?i.currentTarget:this.element)&&0===o.length||(i=new ov(this,o,i),this.touches.push(i),i.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._click=function(t){var e={touch:{initialTouch:t.target,target:t.currentTarget,endTime:tg(),x:{location:t.pageX,client:t.clientX},y:{location:t.pageY,client:t.clientY}},x:t.pageX,y:t.pageY,target:t.currentTarget,event:t,type:"tap"};this.trigger("tap",e)&&t.preventDefault()},e.prototype._eachTouch=function(t,e){var o,i,r,n,s={},a=tv(e),p=this.touches;for(o=0;o<p.length;o++)s[(i=p[o]).id]=i;for(o=0;o<a.length;o++)(n=s[(r=a[o]).id])&&n[t](r)},e.prototype._apiCall=function(t,e,o,i){this[t]({api:!0,pageX:e,pageY:o,clientX:e,clientY:o,target:i||this.element,stopPropagation:eg,preventDefault:eg})},e.defaultThreshold=function(t){$g=t},e.minHold=function(t){Kg=t},e}(sg),nv=Object.assign,sv=Math.abs,av=function(t){function e(e){t.call(this,e);nv(this,e),this.userEvents.bind("gestureend",this.start.bind(this)),this.tapCapture.bind("press",this.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}(Xg),pv=function(t){function e(e){t.call(this);var o=this;nv(o,e,{transition:new Yg({axis:e.axis,movable:e.movable,onEnd:function(){o._end()}})}),o.tapCapture.bind("press",(function(){o.cancel()})),o.userEvents.bind("end",Ny(o.start,o)),o.userEvents.bind("gestureend",Ny(o.start,o)),o.userEvents.bind("tap",Ny(o.onEnd,o))}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(){this.paneAxis.outOfBounds()?this._snapBack():this._end()},e.prototype.done=function(){return sv(this.velocity)<1},e.prototype.start=function(e){var o;this.dimension.enabled&&(this.paneAxis.outOfBounds()?this.transition._started?(this.transition.cancel(),this.velocity=Math.min(e.touch[this.axis].velocity*this.velocityMultiplier,55),t.prototype.start.call(this)):this._snapBack():(o=2===e.touch.id?0:e.touch[this.axis].velocity,this.velocity=Math.max(Math.min(o*this.velocityMultiplier,55),-55),this.tapCapture.captureNext(),t.prototype.start.call(this)))},e.prototype.tick=function(){var t=this.dimension,e=this.paneAxis.outOfBounds()?.5:this.friction,o=this.velocity*=e,i=this.movable[this.axis]+o;!this.elastic&&t.outOfBounds(i)&&(i=Math.max(Math.min(i,t.max),t.min),this.velocity=0),this.movable.moveAxis(this.axis,i)},e.prototype._end=function(){this.tapCapture.cancelCapture(),this.end()},e.prototype._snapBack=function(){var t=this.dimension,e=this.movable[this.axis]>t.max?t.max:t.min;this._moveTo(e)},e.prototype._moveTo=function(t){this.transition.moveTo({location:t,duration:500,ease:Yg.easeOutExpo})},e}(Xg),hv=function(t){function e(e){t.call(this,e);nv(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 sv(this.offset.y)<5&&sv(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&&or(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}(Xg),cv=function(t){function e(e){t.call(this);var o="x"===e.axis,i=Ey('<div class="km-touch-scrollbar km-'+(o?"horizontal":"vertical")+'-scrollbar" />');nv(this,e,{element:i,elementSize:0,movable:new Eg(i),scrollMovable:e.movable,alwaysVisible:e.alwaysVisible,size:o?"width":"height"}),this.scrollMovable.bind("change",this.refresh.bind(this)),this.container.appendChild(i),e.alwaysVisible&&this.show()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.refresh=function(){var t=this.axis,e=this.dimension,o=e.size,i=this.scrollMovable,r=o/e.total,n=Math.round(-i[t]*r),s=Math.round(o*r);this.element.style.display=r>=1?"none":"",n+s>o?s=o-n:n<0&&(s+=n,n=0),this.elementSize!==s&&(this.element.style[this.size]=s+"px",this.elementSize=s),this.movable.moveAxis(t,n)},e.prototype.show=function(){this.element.style.opacity=.7,this.element.style.visibility="visible"},e.prototype.hide=function(){this.alwaysVisible||(this.element.style.opacity=0)},e}(O),lv=function(t){function e(e,o){t.call(this);var i=this;this.element=e,this._initOptions(o);var r,n,s=(r=navigator.userAgent,(n=Dy(r)).ios||n.android);i._native=i.options.useNative&&s;var a=Ey('<div class="km-scroll-header"/>');if(i._native)return P(e,"km-native-scroller"),Ly(a,e),void nv(i,{scrollElement:e,fixedContainer:e.children[0]});e.style.overflow="hidden",P(e,"km-scroll-wrapper"),function(t,e){for(t.appendChild(e);t.firstChild!==e;)e.appendChild(t.firstChild)}(e,Ey('<div class="km-scroll-container"/>')),Ly(a,e);var p=e.children[1],h=new Pg(e),c=new Eg(p),l=new Mg({element:p,container:e,forcedEnabled:i.options.zoom}),u=this.options.avoidScrolling,d=new rv(e,{touchAction:"pan-y",fastTap:!0,allowSelection:!0,preventDragEvent:!0,captureUpIfMoved:!0,multiTouch:i.options.zoom,supportDoubleTap:i.options.supportDoubleTap,start:function(t){l.refresh();var e=sv(t.x.velocity),o=sv(t.y.velocity),r=2*e>=o,n=2*o>=e;!function(t,e){return t===e||function(t,e){if(!e)return!1;for(var o=e.parentNode;null!==o;){if(o===t)return!0;o=o.parentNode}return!1}(t,e)}(i.fixedContainer,t.event.target)&&!u(t)&&i.enabled&&(l.x.enabled&&r||l.y.enabled&&n)?d.capture():d.cancel()}}),f=new Bg({movable:c,dimensions:l,userEvents:d,elastic:i.options.elastic}),y=new av({movable:c,dimensions:l,userEvents:d,tapCapture:h}),g=new hv({moveTo:function(t){i.scrollTo(t.x,t.y)}});c.bind("change",(function(){i.scrollTop=-c.y,i.scrollLeft=-c.x,i.trigger("scroll",{scrollTop:i.scrollTop,scrollLeft:i.scrollLeft})})),i.options.mousewheelScrolling&&(this._wheelScrollHandler=this._wheelScroll.bind(this),Uy(e,"DOMMouseScroll mousewheel",this._wheelScrollHandler)),nv(i,{movable:c,dimensions:l,zoomSnapBack:y,animatedScroller:g,userEvents:d,pane:f,tapCapture:h,pulled:!1,enabled:!0,scrollElement:p,scrollTop:0,scrollLeft:0,fixedContainer:e.children[0]}),i._initAxis("x"),i._initAxis("y"),i._wheelEnd=function(){i._wheel=!1,i.userEvents.end(0,i._wheelY)},l.refresh(),i.options.pullToRefresh&&i._initPullToRefresh()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._initOptions=function(t){this.options=rr({},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,o=t.originalEvent||t,i=o.wheelDeltaY;return o.wheelDelta?(void 0===i||i)&&(e=o.wheelDelta):o.detail&&o.axis===o.VERTICAL_AXIS&&(e=10*-o.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(sv(t)),this.scrollElement.scrollTop(sv(e))):(this.dimensions.refresh(),this.movable.moveTo({x:t,y:e}))},e.prototype.animatedScrollTo=function(t,e,o){var i,r;this._native?this.scrollTo(t,e):(i={x:this.movable.x,y:this.movable.y},r={x:t,y:e},this.animatedScroller.setCoordinates(i,r),this.animatedScroller.setCallback(o),this.animatedScroller.start())},e.prototype.pullHandled=function(){},e.prototype.destroy=function(){var t=this.element;qy(t,"DOMMouseScroll mousewheel",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,o=e.movable,i=e.dimensions[t],r=e.tapCapture,n=e.pane[t],s=new cv({axis:t,movable:o,dimension:i,container:e.element,alwaysVisible:e.options.visibleScrollHints});i.bind("change",(function(){s.refresh()})),n.bind("change",(function(){s.show()})),e[t+"inertia"]=new pv({axis:t,paneAxis:n,movable:o,tapCapture:r,userEvents:e.userEvents,dimension:i,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}(sg);Yr(lv,{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"}}),Jy(lv,["pull","scroll","resize"]);var uv=function(t,e){void 0===e&&(e={}),this.sender=e.sender||t,this.widget=t,this.rtl=Boolean(e.rtl)};uv.prototype.notify=function(t,e){this.widget&&this.widget.trigger(t,e)};var dv=uv,fv=Math,yv=fv.min,gv=fv.pow,vv=p.Point,mv={bubble:jg,shape:Lg,tile:wg};function xv(t){var e=[];if(t)for(var o=Iy(t).split("-"),i=0;i<o.length;i++)e.push("k-pos-"+o[i]);return e.join(" ")}mv.marker=Ug;var _v=function(t){function e(e,o,i,r){void 0===o&&(o={}),void 0===i&&(i={}),void 0===r&&(r={}),t.call(this),this.support=Fy(),this.initObserver(r),this.initServices(r),this._initOptions(o),this.bind(this.events,o),this.crs=new By,this._initElement(e),this._viewOrigin=this._getOrigin(),this._initScroller(),this._initMarkers(),this._initControls(),this._initLayers(),this._reset(),this._mousewheelHandler=this._mousewheel.bind(this),Uy(this.element,"DOMMouseScroll mousewheel",this._mousewheelHandler)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.destroy=function(){this.scroller.destroy(),this.navigator&&this.navigator.destroy(),this.attribution&&this.attribution.destroy(),this.zoomControl&&this.zoomControl.destroy(),A(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();qy(this.element,"DOMMouseScroll mousewheel",this._mousewheelHandler),t.prototype.destroy.call(this)},e.prototype._initOptions=function(t){this.options=rr({},this.options,t)},e.prototype._initElement=function(t){this.element=t,P(t,"k-map"),t.style.position="relative",t.setAttribute("data-role","map"),zy(t);var e=Ey("<div />");this.element.appendChild(e)},e.prototype.initServices=function(t){void 0===t&&(t={}),this.widgetService=new dv(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,o=0;o<e.length;o++)if(e[o].requiresHandlers(t))return!0},e.prototype.trigger=function(e,o){void 0===o&&(o={}),o.sender=this;for(var i=this.observers,r=!1,n=0;n<i.length;n++)i[n].trigger(e,o)&&(r=!0);return r||t.prototype.trigger.call(this,e,o),r},e.prototype._notifyObserver=function(t,e){void 0===e&&(e={}),e.sender=this;for(var o=this.observers,i=!1,r=0;r<o.length;r++)o[r].trigger(t,e)&&(i=!0);return i},e.prototype.zoom=function(t){var e,o=this.options;if(Rr(t)){var i=fv.round(Hr(t,o.minZoom,o.maxZoom));o.zoom!==i&&(o.zoom=i,this._reset()),e=this}else e=o.zoom;return e},e.prototype.center=function(t){var e;return t?(this.options.center=yy.create(t).toArray(),this._reset(),e=this):e=yy.create(this.options.center),e},e.prototype.extent=function(t){var e;return t?(this._setExtent(t),e=this):e=this._getExtent(),e},e.prototype.setOptions=function(e){t.prototype.setOptions.call(this,e),this._reset()},e.prototype.locationToLayer=function(t,e){var o=!this.options.wraparound,i=yy.create(t);return this.crs.toPoint(i,this._layerSize(e),o)},e.prototype.layerToLocation=function(t,e){var o=!this.options.wraparound,i=vv.create(t);return this.crs.toLocation(i,this._layerSize(e),o)},e.prototype.locationToView=function(t){var e=yy.create(t),o=this.locationToLayer(this._viewOrigin);return this.locationToLayer(e).translateWith(o.scale(-1))},e.prototype.viewToLocation=function(t,e){var o=this.locationToLayer(this._getOrigin(),e),i=vv.create(t).clone().translateWith(o);return this.layerToLocation(i,e)},e.prototype.eventOffset=function(t){var e,o,i=zr(this.element);if(t.x&&t.x.location||t.y&&t.y.location)e=t.x.location-i.left,o=t.y.location-i.top;else{var r=t.originalEvent||t;e=Wr(r.pageX,r.clientX)-i.left,o=Wr(r.pageY,r.clientY)-i.top}return new p.Point(e,o)},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(),o=t.clientWidth;return this.options.wraparound||(o=yv(e,o)),{width:o,height:yv(e,t.clientHeight)}},e.prototype.exportVisual=function(){return this._reset(),!1},e.prototype._setOrigin=function(t,e){var o,i=this.viewSize(),r=this._origin=yy.create(t);return(o=this.locationToLayer(r,e)).x+=i.width/2,o.y+=i.height/2,this.options.center=this.layerToLocation(o,e).toArray(),this},e.prototype._getOrigin=function(t){var e,o=this.viewSize();return!t&&this._origin||((e=this.locationToLayer(this.center())).x-=o.width/2,e.y-=o.height/2,this._origin=this.layerToLocation(e)),this._origin},e.prototype._setExtent=function(t){var e=yg.create(t),o=e.se.clone();this.options.wraparound&&o.lng<0&&t.nw.lng>0&&(o.lng=180+(180+o.lng));var i=new yg(e.nw,o);this.center(i.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(i.nw,r),p=this.locationToLayer(i.se,r),h=fv.abs(p.x-a.x),c=fv.abs(p.y-a.y);if(h<=n&&c<=s)break}this.zoom(r)},e.prototype._getExtent=function(){var t=this._getOrigin(),e=this.locationToLayer(t),o=this.viewSize();e.x+=o.width,e.y+=o.height;var i=this.layerToLocation(e);return new yg(t,i)},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 o=t.position||e,i="."+xv(o).replace(" ","."),r=this.element.querySelector(".k-map-controls"+i)||[];if(0===r.length){var n=document.createElement("div");P(n,"k-map-controls "+xv(o)),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 ig(e,t)},e.prototype._createNavigator=function(t){var e=this._createControlElement(t,"topLeft"),o=this.navigator=new hg(e,t);this._navigatorPan=this._navigatorPan.bind(this),o.bind("pan",this._navigatorPan),this._navigatorCenter=this._navigatorCenter.bind(this),o.bind("center",this._navigatorCenter)},e.prototype._navigatorPan=function(t){var e=this.scroller,o=e.scrollLeft+t.x,i=e.scrollTop-t.y,r=this._virtualSize,n=this.element.clientWidth,s=this.element.clientHeight;o=Hr(o,r.x.min,r.x.max-n),i=Hr(i,r.y.min,r.y.max-s),this.scroller.one("scroll",Ny(this._scrollEnd,this)),this.scroller.scrollTo(-o,-i)},e.prototype._navigatorCenter=function(){this.center(this.options.center)},e.prototype._createZoomControl=function(t){var e=this._createControlElement(t,"topLeft"),o=this.zoomControl=new lg(e,t);this._zoomControlChange=this._zoomControlChange.bind(this),o.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,o=this.scroller=new lv(this.element.children[0],{friction:t,velocityMultiplier:5,zoom:e,mousewheelScrolling:!1,supportDoubleTap:!0});o.bind("scroll",Ny(this._scroll,this)),o.bind("scrollEnd",Ny(this._scrollEnd,this)),o.userEvents.bind("gesturestart",Ny(this._scaleStart,this)),o.userEvents.bind("gestureend",Ny(this._scale,this)),o.userEvents.bind("doubleTap",Ny(this._doubleTap,this)),o.userEvents.bind("tap",Ny(this._tap,this)),this.scrollElement=o.scrollElement},e.prototype._initLayers=function(){for(var t=this.options.layers,e=this.layers=[],o=0;o<t.length;o++){var i=t[o],r=this._createLayer(i);e.push(r)}},e.prototype._createLayer=function(t){var e=t.type||"shape",o=this.options.layerDefaults[e],i=rr({},"marker"===e?this.options.markerDefaults:o,t),r=new(0,mv[e])(this,i);return"marker"===e&&(this.markers=r),r},e.prototype._initMarkers=function(){(this.options.layers||[]).filter((function(t){return t&&"marker"===t.type})).length>0||(this.markers=new Ug(this,this.options.markerDefaults),this.markers.add(this.options.markers))},e.prototype._scroll=function(t){var e=this.locationToLayer(this._viewOrigin).round(),o=t.sender.movable,i=new p.Point(o.x,o.y).scale(-1).scale(1/o.scale);e.x+=i.x,e.y+=i.y,this._scrollOffset=i,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=tg(),this.trigger("panEnd",{originalEvent:t,origin:this._getOrigin(),center:this.center()}))},e.prototype._panComplete=function(){return tg()-(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,o=this._scaleToZoom(e),i=new p.Point(t.center.x,t.center.y),r=this.viewToLocation(i,o),n=this.locationToLayer(r,o).translate(-i.x,-i.y);this._zoomAround(n,o),this.trigger("zoomEnd",{originalEvent:t})},e.prototype._scaleToZoom=function(t){var e=this._layerSize()*t/this.options.minSize,o=fv.log(e)/fv.log(2);return fv.round(o)},e.prototype._reset=function(){this.attribution&&this.attribution.filter(this.center(),this.zoom()),this._viewOrigin=this._getOrigin(!0),this._resetScroller(),this.trigger("beforeReset"),this.trigger("reset")},e.prototype._resetScroller=function(){var t=this.scroller,e=t.dimensions.x,o=t.dimensions.y,i=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=gv(2,this.options.minZoom-s),t.dimensions.maxScale=gv(2,this.options.maxZoom-s);var a={min:-n.x,max:i-n.x},p={min:-n.y,max:i-n.y};if(this.options.wraparound&&(a.max=20*i,a.min=-a.max),!1===this.options.pannable){var h=this.viewSize();a.min=p.min=0,a.max=h.width,p.max=h.height}e.makeVirtual(),o.makeVirtual(),e.virtualSize(a.min,a.max),o.virtualSize(p.min,p.max),this._virtualSize={x:a,y:p}},e.prototype._renderLayers=function(){},e.prototype._layerSize=function(t){var e=Wr(t,this.options.zoom);return this.options.minSize*gv(2,e)},e.prototype._tap=function(t){if(this._panComplete()){var e=this.eventOffset(t);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,o=this.eventOffset(t),i=this.viewToLocation(o),r=this.locationToLayer(i,e).translate(-o.x,-o.y);this._zoomAround(r,e),this.trigger("zoomEnd",{originalEvent:t})}},e.prototype._mousewheel=function(t){t.preventDefault();var e=Tr(t)>0?-1:1,o=this.options,i=this.zoom(),r=Hr(i+e,o.minZoom,o.maxZoom);if(!1!==o.zoomable&&r!==i&&!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}(sg);Yr(_v,{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],zoom:3,minSize:256,minZoom:1,maxZoom:19,markers:[],markerDefaults:{shape:"pinTarget",tooltip:{position:"top"}},wraparound:!0,renderPointsAsMarkers:!1}),Jy(_v,["beforeReset","click","markerActivate","markerClick","markerCreated","markerMouseEnter","markerMouseLeave","pan","panEnd","reset","shapeClick","shapeCreated","shapeFeatureCreated","shapeMouseEnter","shapeMouseLeave","zoomEnd","zoomStart"]);var bv=_v,wv="Arial, Helvetica, sans-serif",Cv="12px "+wv,kv="16px "+wv,Sv=function(){return{icon:{border:{width:1}},label:{font:Cv,padding:3},line:{length:10,width:2},visible:!0}},Av=function(t){return{visible:!0,labels:{font:"11px Arial, Helvetica, sans-serif"},overlay:t.gradients?{}:{gradient:"none"},area:{highlight:{markers:{border:{}}},line:{opacity:1,width:0},markers:{size:6,visible:!1},opacity:.4},rangeArea:{highlight:{markers:{border:{}}},line:{opacity:1,width:0},markers:{size:6,visible:!1},opacity:.4},verticalRangeArea:{highlight:{markers:{border:{}}},line:{opacity:1,width:0},markers:{size:6,visible:!1},opacity:.4},bar:{gap:1.5,spacing:.4},boxPlot:{outliersField:"",meanField:"",border:{_brightness:.8,width:1},downColor:"#fff",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}},bubble:{border:{width:0},labels:{background:"transparent"},opacity:.6},bullet:{gap:1.5,spacing:.4,target:{color:"#ff0000"}},candlestick:{border:{_brightness:.8,width:1},downColor:"#fff",gap:1,highlight:{border:{opacity:1,width:2},line:{width:2}},line:{color:"#000",width:1},spacing:.3},column:{gap:1.5,spacing:.4},heatmap:{labels:{color:"",background:"transparent",visible:!0},highlight:{border:{width:0}}},pie:{labels:{background:"",color:"",padding:{top:5,bottom:5,left:7,right:7}}},donut:{margin:1},funnel:{labels:{background:"",color:"",padding:{top:5,bottom:5,left:7,right:7}}},horizontalWaterfall:{gap:.5,line:{color:"#000",width:1},spacing:.4},line:{width:2},notes:Sv(),ohlc:{gap:1,highlight:{line:{opacity:1,width:3}},line:{width:1},spacing:.3},radarArea:{line:{opacity:1,width:0},markers:{size:6,visible:!1},opacity:.5},radarLine:{markers:{visible:!1},width:2},polarArea:{line:{opacity:1,width:0},markers:{size:6,visible:!1},opacity:.5},polarLine:{markers:{visible:!1},width:2},rangeBar:{gap:1.5,spacing:.4},rangeColumn:{gap:1.5,spacing:.4},scatterLine:{width:1},verticalArea:{highlight:{markers:{border:{}}},line:{opacity:1,width:0},markers:{size:6,visible:!1},opacity:.4},verticalBoxPlot:{outliersField:"",meanField:"",border:{_brightness:.8,width:1},downColor:"#fff",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}},verticalBullet:{gap:1.5,spacing:.4,target:{color:"#ff0000"}},verticalLine:{width:2},waterfall:{gap:.5,line:{color:"#000",width:1},spacing:.4}}},Pv=function(t){return void 0===t&&(t={}),{axisDefaults:{labels:{font:Cv},notes:Sv(),title:{font:kv,margin:5}},categoryAxis:{majorGridLines:{visible:!0}},navigator:{pane:{height:90,margin:{top:10}}},seriesDefaults:Av(t),title:{font:kv},legend:{labels:{font:Cv}}}}}})}));
|
|
1
|
+
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.KendoCharts=e():t.KendoCharts=e()}(window,(function(){return function(t){var e={};function o(i){if(e[i])return e[i].exports;var r=e[i]={i:i,l:!1,exports:{}};return t[i].call(r.exports,r,r.exports,o),r.l=!0,r.exports}return o.m=t,o.c=e,o.d=function(t,e,i){o.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},o.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},o.t=function(t,e){if(1&e&&(t=o(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(o.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)o.d(i,r,function(e){return t[e]}.bind(null,r));return i},o.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return o.d(e,"a",e),e},o.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},o.p="",o(o.s=3)}({3:function(t,e,o){"use strict";o.r(e),o.d(e,"autoMajorUnit",(function(){return dn})),o.d(e,"Point",(function(){return fn})),o.d(e,"Box",(function(){return vn})),o.d(e,"Ring",(function(){return mn})),o.d(e,"Sector",(function(){return xn})),o.d(e,"ShapeBuilder",(function(){return bn})),o.d(e,"ShapeElement",(function(){return Pn})),o.d(e,"ChartElement",(function(){return Cn})),o.d(e,"BoxElement",(function(){return Sn})),o.d(e,"RootElement",(function(){return Bn})),o.d(e,"FloatElement",(function(){return En})),o.d(e,"Text",(function(){return In})),o.d(e,"TextBox",(function(){return Vn})),o.d(e,"Title",(function(){return Fn})),o.d(e,"AxisLabel",(function(){return Un})),o.d(e,"Axis",(function(){return hs})),o.d(e,"Note",(function(){return Wn})),o.d(e,"CategoryAxis",(function(){return Bs})),o.d(e,"DateCategoryAxis",(function(){return Hs})),o.d(e,"DateValueAxis",(function(){return Zs})),o.d(e,"NumericAxis",(function(){return Xs})),o.d(e,"LogarithmicAxis",(function(){return Js})),o.d(e,"PolarAxis",(function(){return ra})),o.d(e,"RadarCategoryAxis",(function(){return oa})),o.d(e,"RadarNumericAxis",(function(){return pa})),o.d(e,"RadarLogarithmicAxis",(function(){return ca})),o.d(e,"CurveProcessor",(function(){return ua})),o.d(e,"Gradients",(function(){return Tn})),o.d(e,"rectToBox",(function(){return jn})),o.d(e,"ChartAxis",(function(){return da})),o.d(e,"ChartPane",(function(){return va})),o.d(e,"ChartPlotArea",(function(){return ga})),o.d(e,"findAxisByName",(function(){return fa})),o.d(e,"Aggregates",(function(){return _a})),o.d(e,"AreaChart",(function(){return up})),o.d(e,"AreaSegment",(function(){return pp})),o.d(e,"AxisGroupRangeTracker",(function(){return dp})),o.d(e,"Bar",(function(){return mp})),o.d(e,"BarChart",(function(){return Ap})),o.d(e,"BarLabel",(function(){return yp})),o.d(e,"BoxPlotChart",(function(){return Lp})),o.d(e,"BoxPlot",(function(){return Ep})),o.d(e,"BubbleChart",(function(){return Up})),o.d(e,"Bullet",(function(){return Xp})),o.d(e,"BulletChart",(function(){return Zp})),o.d(e,"CandlestickChart",(function(){return Bp})),o.d(e,"Candlestick",(function(){return Tp})),o.d(e,"CategoricalChart",(function(){return Ua})),o.d(e,"CategoricalErrorBar",(function(){return Va})),o.d(e,"CategoricalPlotArea",(function(){return Jh})),o.d(e,"Chart",(function(){return Nl})),o.d(e,"ChartContainer",(function(){return ih})),o.d(e,"ClipAnimation",(function(){return ip})),o.d(e,"ClusterLayout",(function(){return wp})),o.d(e,"Crosshair",(function(){return eh})),o.d(e,"CrosshairTooltip",(function(){return Jp})),o.d(e,"DefaultAggregates",(function(){return Mh})),o.d(e,"DonutChart",(function(){return Wc})),o.d(e,"DonutPlotArea",(function(){return qc})),o.d(e,"DonutSegment",(function(){return Uc})),o.d(e,"ErrorBarBase",(function(){return Da})),o.d(e,"ErrorRangeCalculator",(function(){return Aa})),o.d(e,"Highlight",(function(){return ec})),o.d(e,"SharedTooltip",(function(){return bc})),o.d(e,"Legend",(function(){return uc})),o.d(e,"LegendItem",(function(){return cc})),o.d(e,"LegendLayout",(function(){return hc})),o.d(e,"LineChart",(function(){return ap})),o.d(e,"LinePoint",(function(){return Xa})),o.d(e,"LineSegment",(function(){return Za})),o.d(e,"Pane",(function(){return sh})),o.d(e,"PieAnimation",(function(){return Ac})),o.d(e,"PieChart",(function(){return Hc})),o.d(e,"PieChartMixin",(function(){return jc})),o.d(e,"PiePlotArea",(function(){return Fc})),o.d(e,"PieSegment",(function(){return Ic})),o.d(e,"PlotAreaBase",(function(){return kh})),o.d(e,"PlotAreaEventsMixin",(function(){return Sh})),o.d(e,"PlotAreaFactory",(function(){return fc})),o.d(e,"PointEventsMixin",(function(){return Ga})),o.d(e,"RangeBar",(function(){return Bh})),o.d(e,"RangeBarChart",(function(){return Eh})),o.d(e,"RangeAreaPoint",(function(){return Ih})),o.d(e,"RangeAreaChart",(function(){return Nh})),o.d(e,"ScatterChart",(function(){return Vp})),o.d(e,"ScatterErrorBar",(function(){return Ip})),o.d(e,"ScatterLineChart",(function(){return Tc})),o.d(e,"Selection",(function(){return mc})),o.d(e,"SeriesAggregator",(function(){return Ph})),o.d(e,"SeriesBinder",(function(){return Ca})),o.d(e,"SplineSegment",(function(){return tp})),o.d(e,"SplineAreaSegment",(function(){return lp})),o.d(e,"StackWrap",(function(){return kp})),o.d(e,"Tooltip",(function(){return xc})),o.d(e,"OHLCChart",(function(){return Gh})),o.d(e,"OHLCPoint",(function(){return Uh})),o.d(e,"WaterfallChart",(function(){return Xh})),o.d(e,"WaterfallSegment",(function(){return qh})),o.d(e,"XYPlotArea",(function(){return Bc})),o.d(e,"MousewheelZoom",(function(){return pc})),o.d(e,"ZoomSelection",(function(){return ac})),o.d(e,"Pannable",(function(){return nc})),o.d(e,"anyHasZIndex",(function(){return rp})),o.d(e,"appendIfNotNull",(function(){return ah})),o.d(e,"areNumbers",(function(){return Mp})),o.d(e,"bindSegments",(function(){return hh})),o.d(e,"categoriesCount",(function(){return Fa})),o.d(e,"countNumbers",(function(){return ma})),o.d(e,"equalsIgnoreCase",(function(){return ch})),o.d(e,"evalOptions",(function(){return Ha})),o.d(e,"filterSeriesByType",(function(){return lh})),o.d(e,"getDateField",(function(){return uh})),o.d(e,"getField",(function(){return ba})),o.d(e,"hasGradientOverlay",(function(){return vp})),o.d(e,"hasValue",(function(){return jp})),o.d(e,"isDateAxis",(function(){return dh})),o.d(e,"segmentVisible",(function(){return ph})),o.d(e,"singleItemOrArray",(function(){return fh})),o.d(e,"createOutOfRangePoints",(function(){return mh})),o.d(e,"ChartService",(function(){return is})),o.d(e,"DomEventsBuilder",(function(){return ns})),o.d(e,"FormatService",(function(){return Jn})),o.d(e,"IntlService",(function(){return Zn})),o.d(e,"TemplateService",(function(){return dr})),o.d(e,"Sparkline",(function(){return Zl})),o.d(e,"Navigator",(function(){return iu})),o.d(e,"NavigatorHint",(function(){return Jl})),o.d(e,"StockChart",(function(){return nu})),o.d(e,"constants",(function(){return h})),o.d(e,"Gauge",(function(){return gu})),o.d(e,"LinearGauge",(function(){return Fu})),o.d(e,"LinearPointer",(function(){return Tu})),o.d(e,"ArrowLinearPointer",(function(){return Eu})),o.d(e,"BarLinearPointer",(function(){return Du})),o.d(e,"LinearScale",(function(){return ku})),o.d(e,"RadialGauge",(function(){return rd})),o.d(e,"RadialPointer",(function(){return ed})),o.d(e,"RadialScale",(function(){return Yu})),o.d(e,"ArcGauge",(function(){return ld})),o.d(e,"RangePointer",(function(){return cd})),o.d(e,"ArcScale",(function(){return sd})),o.d(e,"CircularGauge",(function(){return ud})),o.d(e,"Barcode",(function(){return tf})),o.d(e,"barcodeValidator",(function(){return of})),o.d(e,"QRCode",(function(){return ny})),o.d(e,"qrcodeValidator",(function(){return sy})),o.d(e,"Map",(function(){return wg})),o.d(e,"addClass",(function(){return P})),o.d(e,"removeClass",(function(){return M})),o.d(e,"alignPathToPixel",(function(){return Ki})),o.d(e,"clockwise",(function(){return $i})),o.d(e,"convertableToNumber",(function(){return er})),o.d(e,"deepExtend",(function(){return rr})),o.d(e,"elementStyles",(function(){return hr})),o.d(e,"getSpacing",(function(){return cr})),o.d(e,"getTemplate",(function(){return fr})),o.d(e,"getter",(function(){return gr})),o.d(e,"grep",(function(){return mr})),o.d(e,"hasClasses",(function(){return xr})),o.d(e,"HashMap",(function(){return br})),o.d(e,"inArray",(function(){return wr})),o.d(e,"interpolateValue",(function(){return Cr})),o.d(e,"InstanceObserver",(function(){return Sr})),o.d(e,"isArray",(function(){return A})),o.d(e,"isFunction",(function(){return or})),o.d(e,"isNumber",(function(){return Ji})),o.d(e,"isObject",(function(){return nr})),o.d(e,"isString",(function(){return tr})),o.d(e,"map",(function(){return Ar})),o.d(e,"mousewheelDelta",(function(){return Tr})),o.d(e,"FontLoader",(function(){return Xr})),o.d(e,"setDefaultOptions",(function(){return Yr})),o.d(e,"sparseArrayLimits",(function(){return Zr})),o.d(e,"styleValue",(function(){return sr})),o.d(e,"find",(function(){return Qr})),o.d(e,"elementScale",(function(){return tn})),o.d(e,"autoTextColor",(function(){return rn})),o.d(e,"createHashSet",(function(){return cn})),o.d(e,"defaultErrorHandler",(function(){return ln})),o.d(e,"keys",(function(){return un})),o.d(e,"append",(function(){return Or})),o.d(e,"bindEvents",(function(){return Br})),o.d(e,"Class",(function(){return O})),o.d(e,"defined",(function(){return Rr})),o.d(e,"deg",(function(){return Er})),o.d(e,"elementOffset",(function(){return zr})),o.d(e,"elementSize",(function(){return Lr})),o.d(e,"eventCoordinates",(function(){return Ir})),o.d(e,"eventElement",(function(){return jr})),o.d(e,"hashKey",(function(){return Dr})),o.d(e,"last",(function(){return Vr})),o.d(e,"limitValue",(function(){return Hr})),o.d(e,"logToConsole",(function(){return fo})),o.d(e,"objectKey",(function(){return Fr})),o.d(e,"rad",(function(){return Nr})),o.d(e,"round",(function(){return Ur})),o.d(e,"unbindEvents",(function(){return Gr})),o.d(e,"valueOrDefault",(function(){return Wr})),o.d(e,"chartBaseTheme",(function(){return Tg}));var i={};o.r(i),o.d(i,"swing",(function(){return De})),o.d(i,"linear",(function(){return Ve})),o.d(i,"easeOutElastic",(function(){return He}));var r={};o.r(r),o.d(r,"Surface",(function(){return oi})),o.d(r,"RootNode",(function(){return Lo})),o.d(r,"Node",(function(){return To})),o.d(r,"GroupNode",(function(){return Uo})),o.d(r,"ArcNode",(function(){return Fo})),o.d(r,"CircleNode",(function(){return No})),o.d(r,"RectNode",(function(){return $o})),o.d(r,"ImageNode",(function(){return Qo})),o.d(r,"TextNode",(function(){return ei})),o.d(r,"PathNode",(function(){return Ho})),o.d(r,"MultiPathNode",(function(){return Ko})),o.d(r,"DefinitionNode",(function(){return zo})),o.d(r,"ClipNode",(function(){return Eo})),o.d(r,"GradientStopNode",(function(){return Mo})),o.d(r,"LinearGradientNode",(function(){return Bo})),o.d(r,"RadialGradientNode",(function(){return Ro})),o.d(r,"exportGroup",(function(){return Ni}));var n={};o.r(n),o.d(n,"Surface",(function(){return Di})),o.d(n,"RootNode",(function(){return ci})),o.d(n,"Node",(function(){return ai})),o.d(n,"GroupNode",(function(){return pi})),o.d(n,"ArcNode",(function(){return Oi})),o.d(n,"CircleNode",(function(){return Bi})),o.d(n,"RectNode",(function(){return zi})),o.d(n,"ImageNode",(function(){return Ri})),o.d(n,"TextNode",(function(){return Li})),o.d(n,"PathNode",(function(){return Mi})),o.d(n,"MultiPathNode",(function(){return Ei}));var s={};o.r(s),o.d(s,"append",(function(){return le})),o.d(s,"arabicToRoman",(function(){return Gi})),o.d(s,"createPromise",(function(){return ii})),o.d(s,"defined",(function(){return R})),o.d(s,"definitionId",(function(){return $})),o.d(s,"deg",(function(){return lt})),o.d(s,"encodeBase64",(function(){return Xi})),o.d(s,"eventCoordinates",(function(){return ao})),o.d(s,"eventElement",(function(){return ro})),o.d(s,"isTransparent",(function(){return tt})),o.d(s,"last",(function(){return Dt})),o.d(s,"limitValue",(function(){return Yt})),o.d(s,"mergeSort",(function(){return Yi})),o.d(s,"now",(function(){return Ue})),o.d(s,"promiseAll",(function(){return ri})),o.d(s,"rad",(function(){return N})),o.d(s,"round",(function(){return D})),o.d(s,"valueOrDefault",(function(){return J})),o.d(s,"bindEvents",(function(){return Io})),o.d(s,"elementOffset",(function(){return so})),o.d(s,"elementSize",(function(){return io})),o.d(s,"elementStyles",(function(){return eo})),o.d(s,"unbindEvents",(function(){return jo})),o.d(s,"elementPadding",(function(){return no})),o.d(s,"elementScale",(function(){return co})),o.d(s,"DEG_TO_RAD",(function(){return V})),o.d(s,"MAX_NUM",(function(){return H})),o.d(s,"MIN_NUM",(function(){return F})),o.d(s,"LRUCache",(function(){return $t})),o.d(s,"TextMetrics",(function(){return se})),o.d(s,"measureText",(function(){return ae})),o.d(s,"objectKey",(function(){return ee})),o.d(s,"hashKey",(function(){return oe})),o.d(s,"normalizeText",(function(){return te}));var a={};o.r(a),o.d(a,"HasObservers",(function(){return B})),o.d(a,"Element",(function(){return et})),o.d(a,"Circle",(function(){return ct})),o.d(a,"Arc",(function(){return Kt})),o.d(a,"Path",(function(){return Zt})),o.d(a,"MultiPath",(function(){return Qt})),o.d(a,"Text",(function(){return pe})),o.d(a,"Image",(function(){return he})),o.d(a,"Group",(function(){return ue})),o.d(a,"Layout",(function(){return xe})),o.d(a,"Rect",(function(){return _e})),o.d(a,"align",(function(){return we})),o.d(a,"vAlign",(function(){return Ce})),o.d(a,"stack",(function(){return Ae})),o.d(a,"vStack",(function(){return Pe})),o.d(a,"wrap",(function(){return Me})),o.d(a,"vWrap",(function(){return Oe})),o.d(a,"fit",(function(){return Be})),o.d(a,"LinearGradient",(function(){return Ie})),o.d(a,"RadialGradient",(function(){return je})),o.d(a,"GradientStop",(function(){return ze})),o.d(a,"Gradient",(function(){return Le})),o.d(a,"Animation",(function(){return Xe})),o.d(a,"AnimationFactory",(function(){return qe})),o.d(a,"PathParser",(function(){return Ye})),o.d(a,"parsePath",(function(){return Wt})),o.d(a,"BaseNode",(function(){return Ze})),o.d(a,"OptionsStore",(function(){return z})),o.d(a,"Surface",(function(){return Fi})),o.d(a,"SurfaceFactory",(function(){return Hi})),o.d(a,"exportImage",(function(){return Zi})),o.d(a,"exportSVG",(function(){return Qi})),o.d(a,"QuadNode",(function(){return ui})),o.d(a,"ShapesQuadTree",(function(){return fi})),o.d(a,"svg",(function(){return r})),o.d(a,"canvas",(function(){return n})),o.d(a,"util",(function(){return s}));var p={};o.r(p),o.d(p,"Circle",(function(){return rt})),o.d(p,"Arc",(function(){return gt})),o.d(p,"Rect",(function(){return Y})),o.d(p,"Point",(function(){return q})),o.d(p,"Segment",(function(){return jt})),o.d(p,"Matrix",(function(){return G})),o.d(p,"Size",(function(){return X})),o.d(p,"toMatrix",(function(){return W})),o.d(p,"Transformation",(function(){return Z})),o.d(p,"transform",(function(){return Q}));var h={};o.r(h),o.d(h,"NAVIGATOR_AXIS",(function(){return eu})),o.d(h,"NAVIGATOR_PANE",(function(){return tu}));var c="arc",l="#000",u="bottom",d="center",f="circle",y="date",v=/\{\d+:?/,g="left",m=Number.MAX_VALUE,x=-Number.MAX_VALUE,_="right",b="top",w="value",C="#fff",k="x",S="y";function A(t){return Array.isArray(t)}function P(t,e){for(var o=A(e)?e:[e],i=0;i<o.length;i++){var r=o[i];-1===t.className.indexOf(r)&&(t.className+=" "+r)}}var T=/\s+/g;function M(t,e){t&&t.className&&(t.className=t.className.replace(e,"").replace(T," "))}var O=function(){},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.observers=function(){return this._observers=this._observers||[],this._observers},e.prototype.addObserver=function(t){return this._observers?this._observers.push(t):this._observers=[t],this},e.prototype.removeObserver=function(t){var e=this.observers(),o=e.indexOf(t);return-1!==o&&e.splice(o,1),this},e.prototype.trigger=function(t,e){var o=this._observers;if(o&&!this._suspended)for(var i=0;i<o.length;i++){var r=o[i];r[t]&&r[t](e)}return this},e.prototype.optionsChange=function(t){void 0===t&&(t={}),t.element=this,this.trigger("optionsChange",t)},e.prototype.geometryChange=function(){this.trigger("geometryChange",{element:this})},e.prototype.suspend=function(){return this._suspended=(this._suspended||0)+1,this},e.prototype.resume=function(){return this._suspended=Math.max((this._suspended||0)-1,0),this},e.prototype._observerField=function(t,e){this[t]&&this[t].removeObserver(this),this[t]=e,e.addObserver(this)},e}(O);function R(t){return void 0!==t}var E={}.toString,z=function(t){function e(e,o){for(var i in void 0===o&&(o=""),t.call(this),this.prefix=o,e){var r=e[i];r=this._wrap(r,i),this[i]=r}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.get=function(t){for(var e=t.split("."),o=this;e.length&&o;){o=o[e.shift()]}return o},e.prototype.set=function(t,e){this.get(t)!==e&&(this._set(t,this._wrap(e,t)),this.optionsChange({field:this.prefix+t,value:e}))},e.prototype._set=function(t,o){var i=t.indexOf(".")>=0,r=this,n=t;if(i){for(var s=n.split("."),a=this.prefix;s.length>1;){a+=(n=s.shift())+".";var p=r[n];p||((p=new e({},a)).addObserver(this),r[n]=p),r=p}n=s[0]}r._clear(n),r[n]=o},e.prototype._clear=function(t){var e=this[t];e&&e.removeObserver&&e.removeObserver(this)},e.prototype._wrap=function(t,o){var i=E.call(t),r=t;return null!==r&&R(r)&&"[object Object]"===i&&(t instanceof e||t instanceof O||(r=new e(r,this.prefix+o+".")),r.addObserver(this)),r},e}(B);function L(t){return function(e){return this[t]!==e&&(this[t]=e,this.geometryChange()),this}}function I(t){return function(){return this[t]}}var j=function(t,e){var o=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}(t);return function(t,e){for(var o=0;o<e.length;o++){var i=e[o],r=i.charAt(0).toUpperCase()+i.substring(1,i.length);t["set"+r]=L(i),t["get"+r]=I(i)}}(o.prototype,e),o};function D(t,e){var o,i=(o=e)?Math.pow(10,o):1;return Math.round(t*i)/i}var V=Math.PI/180,H=Number.MAX_VALUE,F=-Number.MAX_VALUE;function N(t){return t*V}var U=function(t){function e(e,o,i,r,n,s){void 0===e&&(e=0),void 0===o&&(o=0),void 0===i&&(i=0),void 0===r&&(r=0),void 0===n&&(n=0),void 0===s&&(s=0),t.call(this),this.a=e,this.b=o,this.c=i,this.d=r,this.e=n,this.f=s}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.multiplyCopy=function(t){return new e(this.a*t.a+this.c*t.b,this.b*t.a+this.d*t.b,this.a*t.c+this.c*t.d,this.b*t.c+this.d*t.d,this.a*t.e+this.c*t.f+this.e,this.b*t.e+this.d*t.f+this.f)},e.prototype.invert=function(){var t=this.a,o=this.b,i=this.c,r=this.d,n=this.e,s=this.f,a=t*r-o*i;return 0===a?null:new e(r/a,-o/a,-i/a,t/a,(i*s-r*n)/a,(o*n-t*s)/a)},e.prototype.clone=function(){return new e(this.a,this.b,this.c,this.d,this.e,this.f)},e.prototype.equals=function(t){return!!t&&(this.a===t.a&&this.b===t.b&&this.c===t.c&&this.d===t.d&&this.e===t.e&&this.f===t.f)},e.prototype.round=function(t){return this.a=D(this.a,t),this.b=D(this.b,t),this.c=D(this.c,t),this.d=D(this.d,t),this.e=D(this.e,t),this.f=D(this.f,t),this},e.prototype.toArray=function(t){var e=[this.a,this.b,this.c,this.d,this.e,this.f];if(R(t))for(var o=0;o<e.length;o++)e[o]=D(e[o],t);return e},e.prototype.toString=function(t,e){return void 0===e&&(e=","),this.toArray(t).join(e)},e.translate=function(t,o){return new e(1,0,0,1,t,o)},e.unit=function(){return new e(1,0,0,1,0,0)},e.rotate=function(t,o,i){var r=new e;return r.a=Math.cos(N(t)),r.b=Math.sin(N(t)),r.c=-r.b,r.d=r.a,r.e=o-o*r.a+i*r.b||0,r.f=i-i*r.a-o*r.b||0,r},e.scale=function(t,o){return new e(t,0,0,o,0,0)},e}(O);U.IDENTITY=U.unit();var G=U;function W(t){return t&&"function"==typeof t.matrix?t.matrix():t}var q=function(t){function e(e,o){t.call(this),this.x=e||0,this.y=o||0}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var o={ZERO:{configurable:!0}};return e.prototype.equals=function(t){return t&&t.x===this.x&&t.y===this.y},e.prototype.clone=function(){return new e(this.x,this.y)},e.prototype.rotate=function(t,o){var i=e.create(o)||e.ZERO;return this.transform(G.rotate(t,i.x,i.y))},e.prototype.translate=function(t,e){return this.x+=t,this.y+=e,this.geometryChange(),this},e.prototype.translateWith=function(t){return this.translate(t.x,t.y)},e.prototype.move=function(t,e){return this.x=this.y=0,this.translate(t,e)},e.prototype.scale=function(t,e){return void 0===e&&(e=t),this.x*=t,this.y*=e,this.geometryChange(),this},e.prototype.scaleCopy=function(t,e){return this.clone().scale(t,e)},e.prototype.transform=function(t){var e=W(t),o=this.x,i=this.y;return this.x=e.a*o+e.c*i+e.e,this.y=e.b*o+e.d*i+e.f,this.geometryChange(),this},e.prototype.transformCopy=function(t){var e=this.clone();return t&&e.transform(t),e},e.prototype.distanceTo=function(t){var e=this.x-t.x,o=this.y-t.y;return Math.sqrt(e*e+o*o)},e.prototype.round=function(t){return this.x=D(this.x,t),this.y=D(this.y,t),this.geometryChange(),this},e.prototype.toArray=function(t){var e=R(t);return[e?D(this.x,t):this.x,e?D(this.y,t):this.y]},e.prototype.toString=function(t,e){void 0===e&&(e=" ");var o=this.x,i=this.y;return R(t)&&(o=D(o,t),i=D(i,t)),o+e+i},e.create=function(t,o){if(R(t))return t instanceof e?t:1===arguments.length&&2===t.length?new e(t[0],t[1]):new e(t,o)},e.min=function(){for(var t=arguments,o=H,i=H,r=0;r<arguments.length;r++){var n=t[r];o=Math.min(n.x,o),i=Math.min(n.y,i)}return new e(o,i)},e.max=function(){for(var t=arguments,o=F,i=F,r=0;r<arguments.length;r++){var n=t[r];o=Math.max(n.x,o),i=Math.max(n.y,i)}return new e(o,i)},e.minPoint=function(){return new e(F,F)},e.maxPoint=function(){return new e(H,H)},o.ZERO.get=function(){return new e(0,0)},Object.defineProperties(e,o),e}(j(B,["x","y"])),X=function(t){function e(e,o){t.call(this),this.width=e||0,this.height=o||0}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var o={ZERO:{configurable:!0}};return e.prototype.equals=function(t){return t&&t.width===this.width&&t.height===this.height},e.prototype.clone=function(){return new e(this.width,this.height)},e.prototype.toArray=function(t){var e=R(t);return[e?D(this.width,t):this.width,e?D(this.height,t):this.height]},e.create=function(t,o){if(R(t))return t instanceof e?t:1===arguments.length&&2===t.length?new e(t[0],t[1]):new e(t,o)},o.ZERO.get=function(){return new e(0,0)},Object.defineProperties(e,o),e}(j(B,["width","height"])),Y=function(t){function e(e,o,i){void 0===e&&(e=new q),void 0===o&&(o=new X),void 0===i&&(i=0),t.call(this),this.setOrigin(e),this.setSize(o),this.setCornerRadius(i)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.clone=function(){return new e(this.origin.clone(),this.size.clone())},e.prototype.equals=function(t){return t&&t.origin.equals(this.origin)&&t.size.equals(this.size)},e.prototype.setOrigin=function(t){return this._observerField("origin",q.create(t)),this.geometryChange(),this},e.prototype.getOrigin=function(){return this.origin},e.prototype.setCornerRadius=function(t){return this.cornerRadius=Array.isArray(t)?t:[t,t],this.geometryChange(),this},e.prototype.getCornerRadius=function(){return this.cornerRadius},e.prototype.setSize=function(t){return this._observerField("size",X.create(t)),this.geometryChange(),this},e.prototype.getSize=function(){return this.size},e.prototype.width=function(){return this.size.width},e.prototype.height=function(){return this.size.height},e.prototype.topLeft=function(){return this.origin.clone()},e.prototype.bottomRight=function(){return this.origin.clone().translate(this.width(),this.height())},e.prototype.topRight=function(){return this.origin.clone().translate(this.width(),0)},e.prototype.bottomLeft=function(){return this.origin.clone().translate(0,this.height())},e.prototype.center=function(){return this.origin.clone().translate(this.width()/2,this.height()/2)},e.prototype.bbox=function(t){var o=this.topLeft().transformCopy(t),i=this.topRight().transformCopy(t),r=this.bottomRight().transformCopy(t),n=this.bottomLeft().transformCopy(t);return e.fromPoints(o,i,r,n)},e.prototype.transformCopy=function(t){return e.fromPoints(this.topLeft().transform(t),this.bottomRight().transform(t))},e.prototype.expand=function(t,e){return void 0===e&&(e=t),this.size.width+=2*t,this.size.height+=2*e,this.origin.translate(-t,-e),this},e.prototype.expandCopy=function(t,e){return this.clone().expand(t,e)},e.prototype.containsPoint=function(t){var e=this.origin,o=this.bottomRight();return!(t.x<e.x||t.y<e.y||o.x<t.x||o.y<t.y)},e.prototype._isOnPath=function(t,e){var o=this.expandCopy(e,e),i=this.expandCopy(-e,-e);return o.containsPoint(t)&&!i.containsPoint(t)},e.fromPoints=function(){var t=q.min.apply(null,arguments),o=q.max.apply(null,arguments),i=new X(o.x-t.x,o.y-t.y);return new e(t,i)},e.union=function(t,o){return e.fromPoints(q.min(t.topLeft(),o.topLeft()),q.max(t.bottomRight(),o.bottomRight()))},e.intersect=function(t,o){var i={left:t.topLeft().x,top:t.topLeft().y,right:t.bottomRight().x,bottom:t.bottomRight().y},r={left:o.topLeft().x,top:o.topLeft().y,right:o.bottomRight().x,bottom:o.bottomRight().y};if(i.left<=r.right&&r.left<=i.right&&i.top<=r.bottom&&r.top<=i.bottom)return e.fromPoints(new q(Math.max(i.left,r.left),Math.max(i.top,r.top)),new q(Math.min(i.right,r.right),Math.min(i.bottom,r.bottom)))},e}(B),Z=function(t){function e(e){void 0===e&&(e=G.unit()),t.call(this),this._matrix=e}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.clone=function(){return new e(this._matrix.clone())},e.prototype.equals=function(t){return t&&t._matrix.equals(this._matrix)},e.prototype.translate=function(t,e){return this._matrix=this._matrix.multiplyCopy(G.translate(t,e)),this._optionsChange(),this},e.prototype.scale=function(t,e,o){void 0===e&&(e=t),void 0===o&&(o=null);var i=o;return i&&(i=q.create(i),this._matrix=this._matrix.multiplyCopy(G.translate(i.x,i.y))),this._matrix=this._matrix.multiplyCopy(G.scale(t,e)),i&&(this._matrix=this._matrix.multiplyCopy(G.translate(-i.x,-i.y))),this._optionsChange(),this},e.prototype.rotate=function(t,e){var o=q.create(e)||q.ZERO;return this._matrix=this._matrix.multiplyCopy(G.rotate(t,o.x,o.y)),this._optionsChange(),this},e.prototype.multiply=function(t){var e=W(t);return this._matrix=this._matrix.multiplyCopy(e),this._optionsChange(),this},e.prototype.matrix=function(t){return t?(this._matrix=t,this._optionsChange(),this):this._matrix},e.prototype._optionsChange=function(){this.optionsChange({field:"transform",value:this})},e}(B);function Q(t){return null===t?null:t instanceof Z?t:new Z(t)}var K=1;function $(){return"kdef"+K++}function J(t,e){return R(t)?t:e}function tt(t){return""===t||null===t||"none"===t||"transparent"===t||!R(t)}var et=function(t){function e(e){t.call(this),this._initOptions(e)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var o={nodeType:{configurable:!0}};return o.nodeType.get=function(){return"Rect"},e.prototype._initOptions=function(t){void 0===t&&(t={});var e=t.clip,o=t.transform;o&&(t.transform=Q(o)),e&&!e.id&&(e.id=$()),this.options=new z(t),this.options.addObserver(this)},e.prototype.transform=function(t){if(!R(t))return this.options.get("transform");this.options.set("transform",Q(t))},e.prototype.parentTransform=function(){for(var t,e=this;e.parent;){var o=(e=e.parent).transform();o&&(t=o.matrix().multiplyCopy(t||G.unit()))}if(t)return Q(t)},e.prototype.currentTransform=function(t){void 0===t&&(t=this.parentTransform());var e,o=W(this.transform()),i=W(t);if(e=o&&i?i.multiplyCopy(o):o||i)return Q(e)},e.prototype.visible=function(t){return R(t)?(this.options.set("visible",t),this):!1!==this.options.get("visible")},e.prototype.clip=function(t){var e=this.options;return R(t)?(t&&!t.id&&(t.id=$()),e.set("clip",t),this):e.get("clip")},e.prototype.opacity=function(t){return R(t)?(this.options.set("opacity",t),this):J(this.options.get("opacity"),1)},e.prototype.clippedBBox=function(t){var e=this._clippedBBox(t);if(e){var o=this.clip();return o?Y.intersect(e,o.bbox(t)):e}},e.prototype.containsPoint=function(t,e){if(this.visible()){var o=this.currentTransform(e),i=t;return o&&(i=t.transformCopy(o.matrix().invert())),this._hasFill()&&this._containsPoint(i)||this._isOnPath&&this._hasStroke()&&this._isOnPath(i)}return!1},e.prototype._hasFill=function(){var t=this.options.fill;return t&&!tt(t.color)},e.prototype._hasStroke=function(){var t=this.options.stroke;return t&&t.width>0&&!tt(t.color)},e.prototype._clippedBBox=function(t){return this.bbox(t)},Object.defineProperties(e.prototype,o),e}(B);function ot(t,e,o,i){var r=0,n=0;return i&&(r=Math.atan2(i.c*o,i.a*e),0!==i.b&&(n=Math.atan2(i.d*o,i.b*e))),{x:r,y:n}}var it=Math.PI/2,rt=function(t){function e(e,o){void 0===e&&(e=new q),void 0===o&&(o=0),t.call(this),this.setCenter(e),this.setRadius(o)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.setCenter=function(t){return this._observerField("center",q.create(t)),this.geometryChange(),this},e.prototype.getCenter=function(){return this.center},e.prototype.equals=function(t){return t&&t.center.equals(this.center)&&t.radius===this.radius},e.prototype.clone=function(){return new e(this.center.clone(),this.radius)},e.prototype.pointAt=function(t){return this._pointAt(N(t))},e.prototype.bbox=function(t){for(var e=ot(this.center,this.radius,this.radius,t),o=q.maxPoint(),i=q.minPoint(),r=0;r<4;r++){var n=this._pointAt(e.x+r*it).transformCopy(t),s=this._pointAt(e.y+r*it).transformCopy(t),a=new q(n.x,s.y);o=q.min(o,a),i=q.max(i,a)}return Y.fromPoints(o,i)},e.prototype._pointAt=function(t){var e=this.center,o=this.radius;return new q(e.x+o*Math.cos(t),e.y+o*Math.sin(t))},e.prototype.containsPoint=function(t){var e=this.center,o=this.radius;return Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2)<=Math.pow(o,2)},e.prototype._isOnPath=function(t,e){var o=this.center,i=this.radius,r=o.distanceTo(t);return i-e<=r&&r<=i+e},e}(j(B,["radius"])),nt=function(t){return 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.fill=function(t,e){var o=this.options;if(R(t)){if(t&&"Gradient"!==t.nodeType){var i={color:t};R(e)&&(i.opacity=e),o.set("fill",i)}else o.set("fill",t);return this}return o.get("fill")},e.prototype.stroke=function(t,e,o){return R(t)?(this.options.set("stroke.color",t),R(e)&&this.options.set("stroke.width",e),R(o)&&this.options.set("stroke.opacity",o),this):this.options.get("stroke")},e}(t)},st=G.IDENTITY.toString(),at=function(t){return 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.bbox=function(t){var e,o=W(this.currentTransform(t)),i=o?o.toString():st;this._bboxCache&&this._matrixHash===i?e=this._bboxCache.clone():(e=this._bbox(o),this._bboxCache=e?e.clone():null,this._matrixHash=i);var r=this.options.get("stroke.width");return r&&e&&e.expand(r/2),e},e.prototype.geometryChange=function(){delete this._bboxCache,this.trigger("geometryChange",{element:this})},e}(t)};function pt(t){var e="_"+t;return function(t){return R(t)?(this._observerField(e,t),this.geometryChange(),this):this[e]}}var ht=function(t,e){void 0===e&&(e=["geometry"]);var o=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}(t);return function(t,e){for(var o=0;o<e.length;o++)t[e[o]]=pt(e[o])}(o.prototype,e),o},ct=function(t){function e(e,o){void 0===e&&(e=new rt),void 0===o&&(o={}),t.call(this,o),this.geometry(e),R(this.options.stroke)||this.stroke("#000")}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var o={nodeType:{configurable:!0}};return o.nodeType.get=function(){return"Circle"},e.prototype.rawBBox=function(){return this._geometry.bbox()},e.prototype._bbox=function(t){return this._geometry.bbox(t)},e.prototype._containsPoint=function(t){return this.geometry().containsPoint(t)},e.prototype._isOnPath=function(t){return this.geometry()._isOnPath(t,this.options.stroke.width/2)},Object.defineProperties(e.prototype,o),e}(nt(at(ht(et))));function lt(t){return t/V}function ut(t,e,o){return void 0===o&&(o=10),0===D(Math.abs(t-e),o)}function dt(t,e,o){return t<e||ut(t,e,o)}var ft=Math.pow;function yt(t,e,o,i,r,n){var s=D((r-t)/o,3),a=D((n-e)/i,3);return D(lt(Math.atan2(a,s)))}function vt(t,e){for(var o=t;o<e;)o+=90;return o}var gt=function(t){function e(e,o){void 0===e&&(e=new q),void 0===o&&(o={}),t.call(this),this.setCenter(e),this.radiusX=o.radiusX,this.radiusY=o.radiusY||o.radiusX,this.startAngle=o.startAngle,this.endAngle=o.endAngle,this.anticlockwise=o.anticlockwise||!1,this.xRotation=o.xRotation}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.clone=function(){return new e(this.center,{radiusX:this.radiusX,radiusY:this.radiusY,startAngle:this.startAngle,endAngle:this.endAngle,anticlockwise:this.anticlockwise})},e.prototype.setCenter=function(t){return this._observerField("center",q.create(t)),this.geometryChange(),this},e.prototype.getCenter=function(){return this.center},e.prototype.pointAt=function(t){var e=this.center,o=N(t);return new q(e.x+this.radiusX*Math.cos(o),e.y+this.radiusY*Math.sin(o))},e.prototype.curvePoints=function(){var t,e=this.startAngle,o=this.anticlockwise?-1:1,i=[this.pointAt(e)],r=this._arcInterval(),n=r.endAngle-r.startAngle,s=Math.ceil(n/45),a=n/s,p=e;this.xRotation&&(t=Q().rotate(this.xRotation,this.center));for(var h=1;h<=s;h++){var c=p+o*a,l=this._intervalCurvePoints(p,c,t);i.push(l.cp1,l.cp2,l.p2),p=c}return i},e.prototype.bbox=function(t){for(var e=this._arcInterval(),o=e.startAngle,i=e.endAngle,r=ot(this.center,this.radiusX,this.radiusY,t),n=lt(r.x),s=lt(r.y),a=this.pointAt(i).transformCopy(t),p=vt(n,o),h=vt(s,o),c=this.pointAt(o).transformCopy(t),l=q.min(c,a),u=q.max(c,a);p<i||h<i;){var d=void 0;p<i&&(d=this.pointAt(p).transformCopy(t),p+=90);var f=void 0;h<i&&(f=this.pointAt(h).transformCopy(t),h+=90),c=new q(d.x,f.y),l=q.min(l,c),u=q.max(u,c)}return Y.fromPoints(l,u)},e.prototype._arcInterval=function(){var t=this.startAngle,e=this.endAngle,o=this.anticlockwise;if(o){var i=t;t=e,e=i}return(t>e||o&&t===e)&&(e+=360),{startAngle:t,endAngle:e}},e.prototype._intervalCurvePoints=function(t,e,o){var i=this.pointAt(t),r=this.pointAt(e),n=this._derivativeAt(t),s=this._derivativeAt(e),a=(N(e)-N(t))/3,p=new q(i.x+a*n.x,i.y+a*n.y),h=new q(r.x-a*s.x,r.y-a*s.y);return o&&(i.transform(o),r.transform(o),p.transform(o),h.transform(o)),{p1:i,cp1:p,cp2:h,p2:r}},e.prototype._derivativeAt=function(t){var e=N(t);return new q(-this.radiusX*Math.sin(e),this.radiusY*Math.cos(e))},e.prototype.containsPoint=function(t){var e,o=this._arcInterval(),i=o.endAngle-o.startAngle,r=this.center,n=this.radiusX,s=this.radiusY,a=r.distanceTo(t),p=Math.atan2(t.y-r.y,t.x-r.x),h=n*s/Math.sqrt(ft(n,2)*ft(Math.sin(p),2)+ft(s,2)*ft(Math.cos(p),2)),c=this.pointAt(this.startAngle).round(10),l=this.pointAt(this.endAngle).round(10),u=function(t,e,o,i){var r=e.x-t.x,n=i.x-o.x,s=e.y-t.y,a=i.y-o.y,p=t.x-o.x,h=t.y-o.y,c=r*a-n*s,l=(r*h-s*p)/c,u=(n*h-a*p)/c;if(l>=0&&l<=1&&u>=0&&u<=1)return new q(t.x+u*r,t.y+u*s)}(r,t.round(10),c,l);if(i<180)e=u&&dt(r.distanceTo(u),a)&&dt(a,h);else{var d=yt(r.x,r.y,n,s,t.x,t.y);360!==d&&(d=(360+d)%360);var f=o.startAngle<=d&&d<=o.endAngle;e=f&&dt(a,h)||!f&&(!u||u.equals(t))}return e},e.prototype._isOnPath=function(t,e){var o=this._arcInterval(),i=this.center,r=yt(i.x,i.y,this.radiusX,this.radiusY,t.x,t.y);return 360!==r&&(r=(360+r)%360),o.startAngle<=r&&r<=o.endAngle&&this.pointAt(r).distanceTo(t)<=e},e.fromPoints=function(t,o,i,r,n,s,a){var p=function(t){var e=t.x1,o=t.y1,i=t.x2,r=t.y2,n=t.rx,s=t.ry,a=t.largeArc,p=t.swipe,h=t.rotation;void 0===h&&(h=0);var c=N(h),l=Math.cos(c),u=Math.sin(c),d=l*(e-i)/2+u*(o-r)/2,f=-u*(e-i)/2+l*(o-r)/2,y=a!==p?1:-1,v=Math.pow(d,2),g=Math.pow(f,2),m=Math.pow(n,2),x=Math.pow(s,2),_=v/m+g/x;_>1&&(_=Math.sqrt(v/m+g/x),n*=_,m=Math.pow(n,2),s*=_,x=Math.pow(s,2));var b=y*Math.sqrt((m*x-m*g-x*v)/(m*g+x*v));isNaN(b)&&(b=0);var w=b*(n*f)/s,C=s*d*-b/n,k=l*w-u*C+(e+i)/2,S=u*w+l*C+(o+r)/2,A=(d-w)/n,P=(f-C)/s,T=-(d+w)/n,M=-(f+C)/s,O=(P>=0?1:-1)*lt(Math.acos(A/Math.sqrt(A*A+P*P))),B=D((A*T+P*M)/(Math.sqrt(A*A+P*P)*Math.sqrt(T*T+M*M)),10),R=(A*M-P*T>=0?1:-1)*lt(Math.acos(B));!p&&R>0&&(R-=360);p&&R<0&&(R+=360);var E=O+R,z=E>=0?1:-1;return E=Math.abs(E)%360*z,{center:new q(k,S),startAngle:O,endAngle:E,radiusX:n,radiusY:s,xRotation:h}}({x1:t.x,y1:t.y,x2:o.x,y2:o.y,rx:i,ry:r,largeArc:n,swipe:s,rotation:a});return new e(p.center,{startAngle:p.startAngle,endAngle:p.endAngle,radiusX:p.radiusX,radiusY:p.radiusY,xRotation:p.xRotation,anticlockwise:0===s})},e}(j(B,["radiusX","radiusY","startAngle","endAngle","anticlockwise"])),mt=[].push,xt=[].pop,_t=[].splice,bt=[].shift,wt=[].slice,Ct=[].unshift,kt=function(t){function e(e){void 0===e&&(e=[]),t.call(this),this.length=0,this._splice(0,e.length,e)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.elements=function(t){return t?(this._splice(0,this.length,t),this._change(),this):this.slice(0)},e.prototype.push=function(){var t=arguments,e=mt.apply(this,t);return this._add(t),e},e.prototype.slice=function(){return wt.call(this)},e.prototype.pop=function(){var t=this.length,e=xt.apply(this);return t&&this._remove([e]),e},e.prototype.splice=function(t,e){var o=wt.call(arguments,2),i=this._splice(t,e,o);return this._change(),i},e.prototype.shift=function(){var t=this.length,e=bt.apply(this);return t&&this._remove([e]),e},e.prototype.unshift=function(){var t=arguments,e=Ct.apply(this,t);return this._add(t),e},e.prototype.indexOf=function(t){for(var e=this.length,o=0;o<e;o++)if(this[o]===t)return o;return-1},e.prototype._splice=function(t,e,o){var i=_t.apply(this,[t,e].concat(o));return this._clearObserver(i),this._setObserver(o),i},e.prototype._add=function(t){this._setObserver(t),this._change()},e.prototype._remove=function(t){this._clearObserver(t),this._change()},e.prototype._setObserver=function(t){for(var e=0;e<t.length;e++)t[e].addObserver(this)},e.prototype._clearObserver=function(t){for(var e=0;e<t.length;e++)t[e].removeObserver(this)},e.prototype._change=function(){},e}(B),St=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._change=function(){this.geometryChange()},e}(kt);function At(t,e,o){var i=lt(Math.atan2(e.y-t.y,e.x-t.x));return o.transformCopy(Q().rotate(-i,t)).x<t.x}function Pt(t,e,o){var i=1-t;return Math.pow(i,3)*o[0][e]+3*Math.pow(i,2)*t*o[1][e]+3*Math.pow(t,2)*i*o[2][e]+Math.pow(t,3)*o[3][e]}function Tt(t,e){return[-t[0][e]+3*t[1][e]-3*t[2][e]+t[3][e],3*(t[0][e]-2*t[1][e]+t[2][e]),3*(-t[0][e]+t[1][e]),t[0][e]]}var Mt=function(t){function e(e,o){void 0===e&&(e=0),void 0===o&&(o=0),t.call(this),this.real=e,this.img=o}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.add=function(t){return new e(D(this.real+t.real,10),D(this.img+t.img,10))},e.prototype.addConstant=function(t){return new e(this.real+t,this.img)},e.prototype.negate=function(){return new e(-this.real,-this.img)},e.prototype.multiply=function(t){return new e(this.real*t.real-this.img*t.img,this.real*t.img+this.img*t.real)},e.prototype.multiplyConstant=function(t){return new e(this.real*t,this.img*t)},e.prototype.nthRoot=function(t){var o=Math.atan2(this.img,this.real),i=Math.sqrt(Math.pow(this.img,2)+Math.pow(this.real,2)),r=Math.pow(i,1/t);return new e(r*Math.cos(o/t),r*Math.sin(o/t))},e.prototype.equals=function(t){return this.real===t.real&&this.img===t.img},e.prototype.isReal=function(){return 0===this.img},e}(O);function Ot(t){return t<0?-1:1}function Bt(t,e,o,i){if(0===t)return function(t,e,o){var i=Math.sqrt(Math.pow(e,2)-4*t*o);return[(-e+i)/(2*t),(-e-i)/(2*t)]}(e,o,i);var r,n,s,a,p,h,c,l=(3*t*o-Math.pow(e,2))/(3*Math.pow(t,2)),u=(2*Math.pow(e,3)-9*t*e*o+27*Math.pow(t,2)*i)/(27*Math.pow(t,3)),d=Math.pow(l/3,3)+Math.pow(u/2,2),f=new Mt(0,1),y=-e/(3*t);d<0?(r=new Mt(-u/2,Math.sqrt(-d)).nthRoot(3),n=new Mt(-u/2,-Math.sqrt(-d)).nthRoot(3)):(r=-u/2+Math.sqrt(d),r=new Mt(Ot(r)*Math.pow(Math.abs(r),1/3)),n=-u/2-Math.sqrt(d),n=new Mt(Ot(n)*Math.pow(Math.abs(n),1/3))),s=r.add(n),h=r.add(n).multiplyConstant(-.5),c=r.add(n.negate()).multiplyConstant(Math.sqrt(3)/2),a=h.add(f.multiply(c)),p=h.add(f.negate().multiply(c));var v=[];return s.isReal()&&v.push(D(s.real+y,10)),a.isReal()&&v.push(D(a.real+y,10)),p.isReal()&&v.push(D(p.real+y,10)),v}function Rt(t,e,o,i,r){for(var n,s=Tt(t,i),a=Bt(s[0],s[1],s[2],s[3]-e[i]),p=0;p<a.length;p++)if(0<=a[p]&&a[p]<=1&&(n=Pt(a[p],o,t),Math.abs(n-e[o])<=r))return!0}function Et(t,e,o){var i;if(t.x!==e.x){var r=Math.min(t.x,e.x),n=Math.max(t.x,e.x),s=Math.min(t.y,e.y),a=Math.max(t.y,e.y),p=r<=o.x&&o.x<n;i=s===a?o.y<=s&&p:p&&(a-s)*((t.x-e.x)*(t.y-e.y)>0?o.x-r:n-o.x)/(n-r)+s-o.y>=0}return i?1:0}function zt(t){var e="_"+t;return function(t){return R(t)?(this._observerField(e,q.create(t)),this.geometryChange(),this):this[e]}}var Lt=function(t,e){var o=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}(t);return function(t,e){for(var o=0;o<e.length;o++)t[e[o]]=zt(e[o])}(o.prototype,e),o};function It(t){for(var e=t.length,o=H,i=F,r=0;r<e;r++)i=Math.max(i,t[r]),o=Math.min(o,t[r]);return{min:o,max:i}}var jt=function(t){function e(e,o,i){t.call(this),this.anchor(e||new q),this.controlIn(o),this.controlOut(i)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.bboxTo=function(t,e){var o=this.anchor().transformCopy(e),i=t.anchor().transformCopy(e);return this.controlOut()&&t.controlIn()?this._curveBoundingBox(o,this.controlOut().transformCopy(e),t.controlIn().transformCopy(e),i):this._lineBoundingBox(o,i)},e.prototype._lineBoundingBox=function(t,e){return Y.fromPoints(t,e)},e.prototype._curveBoundingBox=function(t,e,o,i){var r=[t,e,o,i],n=this._curveExtremesFor(r,"x"),s=this._curveExtremesFor(r,"y"),a=It([n.min,n.max,t.x,i.x]),p=It([s.min,s.max,t.y,i.y]);return Y.fromPoints(new q(a.min,p.min),new q(a.max,p.max))},e.prototype._curveExtremesFor=function(t,e){var o=this._curveExtremes(t[0][e],t[1][e],t[2][e],t[3][e]);return{min:Pt(o.min,e,t),max:Pt(o.max,e,t)}},e.prototype._curveExtremes=function(t,e,o,i){var r=t-3*e+3*o-i,n=-2*(t-2*e+o),s=t-e,a=Math.sqrt(n*n-4*r*s),p=0,h=1;0===r?0!==n&&(p=h=-s/n):isNaN(a)||(p=(-n+a)/(2*r),h=(-n-a)/(2*r));var c=Math.max(Math.min(p,h),0);(c<0||c>1)&&(c=0);var l=Math.min(Math.max(p,h),1);return(l>1||l<0)&&(l=1),{min:c,max:l}},e.prototype._intersectionsTo=function(t,e){return this.controlOut()&&t.controlIn()?function(t,e,o){for(var i,r=Tt(t,"x"),n=Bt(r[0],r[1],r[2],r[3]-e.x),s=0,a=0;a<n.length;a++)(ut(i=Pt(n[a],"y",t),e.y)||i>e.y)&&((0===n[a]||1===n[a])&&o.bottomRight().x>e.x||0<n[a]&&n[a]<1)&&s++;return s}([this.anchor(),this.controlOut(),t.controlIn(),t.anchor()],e,this.bboxTo(t)):Et(this.anchor(),t.anchor(),e)},e.prototype._isOnCurveTo=function(t,e,o,i){if(this.bboxTo(t).expand(o,o).containsPoint(e)){var r=this.anchor(),n=this.controlOut(),s=t.controlIn(),a=t.anchor();if("start"===i&&r.distanceTo(e)<=o)return!At(r,n,e);if("end"===i&&a.distanceTo(e)<=o)return!At(a,s,e);var p=[r,n,s,a];if(Rt(p,e,"x","y",o)||Rt(p,e,"y","x",o))return!0;var h=Q().rotate(45,e),c=[r.transformCopy(h),n.transformCopy(h),s.transformCopy(h),a.transformCopy(h)];return Rt(c,e,"x","y",o)||Rt(c,e,"y","x",o)}},e.prototype._isOnLineTo=function(t,e,o){var i=this.anchor(),r=t.anchor(),n=lt(Math.atan2(r.y-i.y,r.x-i.x));return new Y([i.x,i.y-o/2],[i.distanceTo(r),o]).containsPoint(e.transformCopy(Q().rotate(-n,i)))},e.prototype._isOnPathTo=function(t,e,o,i){return this.controlOut()&&t.controlIn()?this._isOnCurveTo(t,e,o/2,i):this._isOnLineTo(t,e,o)},e}(Lt(B,["anchor","controlIn","controlOut"]));function Dt(t){if(t)return t[t.length-1]}function Vt(t,e,o){for(var i=e?0:1,r=0;r<t.length;r+=2)t.splice(r+i,0,o)}function Ht(t,e){if(t&&e)return e.scaleCopy(2).translate(-t.x,-t.y)}function Ft(t,e,o){var i=e.clone().scale(2/3);return{controlOut:i.clone().translateWith(t.scaleCopy(1/3)),controlIn:i.translateWith(o.scaleCopy(1/3))}}var Nt={l:function(t,e){for(var o=e.parameters,i=e.position,r=0;r<o.length;r+=2){var n=new q(o[r],o[r+1]);e.isRelative&&n.translateWith(i),t.lineTo(n.x,n.y),i.x=n.x,i.y=n.y}},c:function(t,e){for(var o=e.parameters,i=e.position,r=0;r<o.length;r+=6){var n=new q(o[r],o[r+1]),s=new q(o[r+2],o[r+3]),a=new q(o[r+4],o[r+5]);e.isRelative&&(s.translateWith(i),n.translateWith(i),a.translateWith(i)),t.curveTo(n,s,a),i.x=a.x,i.y=a.y}},v:function(t,e){var o=e.isRelative?0:e.position.x;Vt(e.parameters,!0,o),this.l(t,e)},h:function(t,e){var o=e.isRelative?0:e.position.y;Vt(e.parameters,!1,o),this.l(t,e)},a:function(t,e){for(var o=e.parameters,i=e.position,r=0;r<o.length;r+=7){var n=o[r],s=o[r+1],a=o[r+2],p=o[r+3],h=o[r+4],c=new q(o[r+5],o[r+6]);e.isRelative&&c.translateWith(i),i.x===c.x&&i.y===c.y||(t.arcTo(c,n,s,p,h,a),i.x=c.x,i.y=c.y)}},s:function(t,e){var o,i=e.parameters,r=e.position,n=e.previousCommand;"s"!==n&&"c"!==n||(o=Dt(Dt(t.paths).segments).controlIn());for(var s=0;s<i.length;s+=4){var a=new q(i[s],i[s+1]),p=new q(i[s+2],i[s+3]),h=void 0;e.isRelative&&(a.translateWith(r),p.translateWith(r)),h=o?Ht(o,r):r.clone(),o=a,t.curveTo(h,a,p),r.x=p.x,r.y=p.y}},q:function(t,e){for(var o=e.parameters,i=e.position,r=0;r<o.length;r+=4){var n=new q(o[r],o[r+1]),s=new q(o[r+2],o[r+3]);e.isRelative&&(n.translateWith(i),s.translateWith(i));var a=Ft(i,n,s);t.curveTo(a.controlOut,a.controlIn,s),i.x=s.x,i.y=s.y}},t:function(t,e){var o,i=e.parameters,r=e.position,n=e.previousCommand;"q"!==n&&"t"!==n||(o=Dt(Dt(t.paths).segments).controlIn().clone().translateWith(r.scaleCopy(-1/3)).scale(1.5));for(var s=0;s<i.length;s+=2){var a=new q(i[s],i[s+1]);e.isRelative&&a.translateWith(r),o=o?Ht(o,r):r.clone();var p=Ft(r,o,a);t.curveTo(p.controlOut,p.controlIn,a),r.x=a.x,r.y=a.y}}},Ut=/([a-df-z]{1})([^a-df-z]*)(z)?/gi,Gt=/[,\s]?([+\-]?(?:\d*\.\d+|\d+)(?:[eE][+\-]?\d+)?)/g;var Wt=function(t,e){var o,i=new q;return e.replace(Ut,(function(e,r,n,s){var a=r.toLowerCase(),p=a===r,h=function(t){var e=[];return t.replace(Gt,(function(t,o){e.push(parseFloat(o))})),e}(n.trim());if("m"===a&&(p?(i.x+=h[0],i.y+=h[1]):(i.x=h[0],i.y=h[1]),t.moveTo(i.x,i.y),h.length>2&&(a="l",h.splice(0,2))),Nt[a])Nt[a](t,{parameters:h,position:i,isRelative:p,previousCommand:o}),s&&"z"===s.toLowerCase()&&t.close();else if("m"!==a)throw new Error("Error while parsing SVG path. Unsupported command: "+a);o=a})),t};function qt(t,e,o){for(var i,r=0;r<t.length;r++){var n=t[r];if(n.visible()){var s=e?n.bbox(o):n.rawBBox();s&&(i=i?Y.union(i,s):s)}}return i}function Xt(t,e){for(var o,i=0;i<t.length;i++){var r=t[i];if(r.visible()){var n=r.clippedBBox(e);n&&(o=o?Y.union(o,n):n)}}return o}function Yt(t,e,o){return Math.max(Math.min(t,o),e)}var Zt=function(t){function e(e){t.call(this,e),this.segments=new St,this.segments.addObserver(this),R(this.options.stroke)||(this.stroke("#000"),R(this.options.stroke.lineJoin)||this.options.set("stroke.lineJoin","miter"))}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var o={nodeType:{configurable:!0}};return e.parse=function(t,e){return Qt.parse(t,e)},o.nodeType.get=function(){return"Path"},e.prototype.moveTo=function(t,e){return this.suspend(),this.segments.elements([]),this.resume(),this.lineTo(t,e),this},e.prototype.lineTo=function(t,e){var o=R(e)?new q(t,e):t,i=new jt(o);return this.segments.push(i),this},e.prototype.curveTo=function(t,e,o){if(this.segments.length>0){var i=Dt(this.segments),r=new jt(o,e);this.suspend(),i.controlOut(t),this.resume(),this.segments.push(r)}return this},e.prototype.arc=function(t,e,o,i,r){if(this.segments.length>0){var n=Dt(this.segments).anchor(),s=N(t),a=new q(n.x-o*Math.cos(s),n.y-i*Math.sin(s)),p=new gt(a,{startAngle:t,endAngle:e,radiusX:o,radiusY:i,anticlockwise:r});this._addArcSegments(p)}return this},e.prototype.arcTo=function(t,e,o,i,r,n){if(this.segments.length>0){var s=Dt(this.segments).anchor(),a=gt.fromPoints(s,q.create(t),e,o,i,r,n);this._addArcSegments(a)}return this},e.prototype._addArcSegments=function(t){this.suspend();for(var e=t.curvePoints(),o=1;o<e.length;o+=3)this.curveTo(e[o],e[o+1],e[o+2]);this.resume(),this.geometryChange()},e.prototype.close=function(){return this.options.closed=!0,this.geometryChange(),this},e.prototype.rawBBox=function(){return this._bbox()},e.prototype._containsPoint=function(t){for(var e,o,i=this.segments,r=i.length,n=0,s=1;s<r;s++)e=i[s-1],o=i[s],n+=e._intersectionsTo(o,t);return!this.options.closed&&i[0].anchor().equals(i[r-1].anchor())||(n+=Et(i[0].anchor(),i[r-1].anchor(),t)),n%2!=0},e.prototype._isOnPath=function(t,e){var o=this.segments,i=o.length,r=e||this.options.stroke.width;if(i>1){if(o[0]._isOnPathTo(o[1],t,r,"start"))return!0;for(var n=2;n<=i-2;n++)if(o[n-1]._isOnPathTo(o[n],t,r))return!0;if(o[i-2]._isOnPathTo(o[i-1],t,r,"end"))return!0}return!1},e.prototype._bbox=function(t){var e,o=this.segments,i=o.length;if(1===i){var r=o[0].anchor().transformCopy(t);e=new Y(r,X.ZERO)}else if(i>0)for(var n=1;n<i;n++){var s=o[n-1].bboxTo(o[n],t);e=e?Y.union(e,s):s}return e},e.fromRect=function(t,o){var i=new e(o),r=t.cornerRadius,n=r[0],s=r[1];if(0===n&&0===s)i.moveTo(t.topLeft()).lineTo(t.topRight()).lineTo(t.bottomRight()).lineTo(t.bottomLeft()).close();else{var a=t.origin,p=a.x,h=a.y,c=t.width(),l=t.height();n=Yt(n,0,c/2),s=Yt(s,0,l/2),i.moveTo(p+n,h).lineTo(p+c-n,h).arcTo([p+c,h+s],n,s,!1).lineTo(p+c,h+l-s).arcTo([p+c-n,h+l],n,s,!1).lineTo(p+n,h+l).arcTo([p,h+l-s],n,s,!1).lineTo(p,h+s).arcTo([p+n,h],n,s,!1)}return i},e.fromPoints=function(t,o){if(t){for(var i=new e(o),r=0;r<t.length;r++){var n=q.create(t[r]);n&&(0===r?i.moveTo(n):i.lineTo(n))}return i}},e.fromArc=function(t,o){var i=new e(o),r=t.startAngle,n=t.pointAt(r);return i.moveTo(n.x,n.y),i.arc(r,t.endAngle,t.radiusX,t.radiusY,t.anticlockwise),i},Object.defineProperties(e.prototype,o),e}(nt(at(et))),Qt=function(t){function e(e){t.call(this,e),this.paths=new St,this.paths.addObserver(this),R(this.options.stroke)||this.stroke("#000")}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var o={nodeType:{configurable:!0}};return e.parse=function(t,o){var i=new e(o);return Wt(i,t)},o.nodeType.get=function(){return"MultiPath"},e.prototype.moveTo=function(t,e){var o=new Zt;return o.moveTo(t,e),this.paths.push(o),this},e.prototype.lineTo=function(t,e){return this.paths.length>0&&Dt(this.paths).lineTo(t,e),this},e.prototype.curveTo=function(t,e,o){return this.paths.length>0&&Dt(this.paths).curveTo(t,e,o),this},e.prototype.arc=function(t,e,o,i,r){return this.paths.length>0&&Dt(this.paths).arc(t,e,o,i,r),this},e.prototype.arcTo=function(t,e,o,i,r,n){return this.paths.length>0&&Dt(this.paths).arcTo(t,e,o,i,r,n),this},e.prototype.close=function(){return this.paths.length>0&&Dt(this.paths).close(),this},e.prototype._bbox=function(t){return qt(this.paths,!0,t)},e.prototype.rawBBox=function(){return qt(this.paths,!1)},e.prototype._containsPoint=function(t){for(var e=this.paths,o=0;o<e.length;o++)if(e[o]._containsPoint(t))return!0;return!1},e.prototype._isOnPath=function(t){for(var e=this.paths,o=this.options.stroke.width,i=0;i<e.length;i++)if(e[i]._isOnPath(t,o))return!0;return!1},e.prototype._clippedBBox=function(t){return Xt(this.paths,this.currentTransform(t))},Object.defineProperties(e.prototype,o),e}(nt(at(et))),Kt=function(t){function e(e,o){void 0===e&&(e=new gt),void 0===o&&(o={}),t.call(this,o),this.geometry(e),R(this.options.stroke)||this.stroke("#000")}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var o={nodeType:{configurable:!0}};return o.nodeType.get=function(){return"Arc"},e.prototype._bbox=function(t){return this._geometry.bbox(t)},e.prototype.rawBBox=function(){return this.geometry().bbox()},e.prototype.toPath=function(){var t=new Zt,e=this.geometry().curvePoints();if(e.length>0){t.moveTo(e[0].x,e[0].y);for(var o=1;o<e.length;o+=3)t.curveTo(e[o],e[o+1],e[o+2])}return t},e.prototype._containsPoint=function(t){return this.geometry().containsPoint(t)},e.prototype._isOnPath=function(t){return this.geometry()._isOnPath(t,this.options.stroke.width/2)},Object.defineProperties(e.prototype,o),e}(nt(at(ht(et)))),$t=function(t){function e(e){t.call(this),this._size=e,this._length=0,this._map={}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.put=function(t,e){var o=this._map,i={key:t,value:e};o[t]=i,this._head?(this._tail.newer=i,i.older=this._tail,this._tail=i):this._head=this._tail=i,this._length>=this._size?(o[this._head.key]=null,this._head=this._head.newer,this._head.older=null):this._length++},e.prototype.get=function(t){var e=this._map[t];if(e)return e===this._head&&e!==this._tail&&(this._head=e.newer,this._head.older=null),e!==this._tail&&(e.older&&(e.older.newer=e.newer,e.newer.older=e.older),e.older=this._tail,e.newer=null,this._tail.newer=e,this._tail=e),e.value},e}(O),Jt=/\r?\n|\r|\t/g;function te(t){return String(t).replace(Jt," ")}function ee(t){var e=[];for(var o in t)e.push(o+t[o]);return e.sort().join("")}function oe(t){for(var e=2166136261,o=0;o<t.length;++o)e+=(e<<1)+(e<<4)+(e<<7)+(e<<8)+(e<<24),e^=t.charCodeAt(o);return e>>>0}var ie,re={baselineMarkerSize:1};"undefined"!=typeof document&&((ie=document.createElement("div")).style.cssText="position: absolute !important; top: -4000px !important; width: auto !important; height: auto !important;padding: 0 !important; margin: 0 !important; border: 0 !important;line-height: normal !important; visibility: hidden !important; white-space: pre!important;");var ne=function(t){function e(e){t.call(this),this._cache=new $t(1e3),this.options=Object.assign({},re,e)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.measure=function(t,e,o){if(void 0===o&&(o={}),null==t)return{width:0,height:0,baseline:0};var i=oe(t+ee(e)),r=this._cache.get(i);if(r)return r;var n={width:0,height:0,baseline:0},s=o.box||ie,a=this._baselineMarker().cloneNode(!1);for(var p in e){var h=e[p];void 0!==h&&(s.style[p]=h)}var c=!1!==o.normalizeText?te(t):String(t);return s.textContent=c,s.appendChild(a),document.body.appendChild(s),c.length&&(n.width=s.offsetWidth-this.options.baselineMarkerSize,n.height=s.offsetHeight,n.baseline=a.offsetTop+this.options.baselineMarkerSize),n.width>0&&n.height>0&&this._cache.put(i,n),s.parentNode.removeChild(s),n},e.prototype._baselineMarker=function(){var t=document.createElement("div");return t.style.cssText="display: inline-block; vertical-align: baseline;width: "+this.options.baselineMarkerSize+"px; height: "+this.options.baselineMarkerSize+"px;overflow: hidden;",t},e}(O);ne.current=new ne;var se=ne;function ae(t,e,o){return se.current.measure(t,e,o)}var pe=function(t){function e(e,o,i){void 0===o&&(o=new q),void 0===i&&(i={}),t.call(this,i),this.content(e),this.position(o),this.options.font||(this.options.font="12px sans-serif"),R(this.options.fill)||this.fill("#000")}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var o={nodeType:{configurable:!0}};return o.nodeType.get=function(){return"Text"},e.prototype.content=function(t){return R(t)?(this.options.set("content",t),this):this.options.get("content")},e.prototype.measure=function(){return ae(this.content(),{font:this.options.get("font")})},e.prototype.rect=function(){var t=this.measure(),e=this.position().clone();return new Y(e,[t.width,t.height])},e.prototype.bbox=function(t){var e=W(this.currentTransform(t));return this.rect().bbox(e)},e.prototype.rawBBox=function(){return this.rect().bbox()},e.prototype._containsPoint=function(t){return this.rect().containsPoint(t)},Object.defineProperties(e.prototype,o),e}(nt(Lt(et,["position"]))),he=function(t){function e(e,o,i){void 0===o&&(o=new Y),void 0===i&&(i={}),t.call(this,i),this.src(e),this.rect(o)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var o={nodeType:{configurable:!0}};return o.nodeType.get=function(){return"Image"},e.prototype.src=function(t){return R(t)?(this.options.set("src",t),this):this.options.get("src")},e.prototype.bbox=function(t){var e=W(this.currentTransform(t));return this._rect.bbox(e)},e.prototype.rawBBox=function(){return this._rect.bbox()},e.prototype._containsPoint=function(t){return this._rect.containsPoint(t)},e.prototype._hasFill=function(){return this.src()},Object.defineProperties(e.prototype,o),e}(ht(et,["rect"])),ce=function(t,e){return function(t){function o(){t.apply(this,arguments)}return t&&(o.__proto__=t),o.prototype=Object.create(t&&t.prototype),o.prototype.constructor=o,o.prototype.traverse=function(t){for(var o=this[e],i=0;i<o.length;i++){var r=o[i];r.traverse?r.traverse(t):t(r)}return this},o}(t)};function le(t,e){return t.push.apply(t,e),t}var ue=function(t){function e(e){t.call(this,e),this.children=[]}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var o={nodeType:{configurable:!0}};return o.nodeType.get=function(){return"Group"},e.prototype.childrenChange=function(t,e,o){this.trigger("childrenChange",{action:t,items:e,index:o})},e.prototype.append=function(){return le(this.children,arguments),this._reparent(arguments,this),this.childrenChange("add",arguments),this},e.prototype.insert=function(t,e){return this.children.splice(t,0,e),e.parent=this,this.childrenChange("add",[e],t),this},e.prototype.insertAt=function(t,e){return this.insert(e,t)},e.prototype.remove=function(t){var e=this.children.indexOf(t);return e>=0&&(this.children.splice(e,1),t.parent=null,this.childrenChange("remove",[t],e)),this},e.prototype.removeAt=function(t){if(0<=t&&t<this.children.length){var e=this.children[t];this.children.splice(t,1),e.parent=null,this.childrenChange("remove",[e],t)}return this},e.prototype.clear=function(){var t=this.children;return this.children=[],this._reparent(t,null),this.childrenChange("remove",t,0),this},e.prototype.bbox=function(t){return qt(this.children,!0,this.currentTransform(t))},e.prototype.rawBBox=function(){return qt(this.children,!1)},e.prototype._clippedBBox=function(t){return Xt(this.children,this.currentTransform(t))},e.prototype.currentTransform=function(t){return et.prototype.currentTransform.call(this,t)||null},e.prototype.containsPoint=function(t,e){if(this.visible())for(var o=this.children,i=this.currentTransform(e),r=0;r<o.length;r++)if(o[r].containsPoint(t,i))return!0;return!1},e.prototype._reparent=function(t,e){for(var o=0;o<t.length;o++){var i=t[o],r=i.parent;r&&r!==this&&r.remove&&r.remove(i),i.parent=e}},Object.defineProperties(e.prototype,o),e}(ce(et,"children"));function de(t,e,o){var i=o.transform()||Q(),r=i.matrix();r.e+=t.x-e.origin.x,r.f+=t.y-e.origin.y,i.matrix(r),o.transform(i)}function fe(t,e,o,i,r){return"start"===o?e.origin[i]:"end"===o?e.origin[i]+e.size[r]-t:e.origin[i]+(e.size[r]-t)/2}function ye(t,e,o,i,r){return"start"===o?e.origin[i]+e.size[r]-t:"end"===o?e.origin[i]:e.origin[i]+(e.size[r]-t)/2}var ve={alignContent:"start",justifyContent:"start",alignItems:"start",spacing:0,orientation:"horizontal",lineSpacing:0,wrap:!0,revers:!1},ge=function(t,e){t.forEach(e)},me=function(t,e){for(var o=t.length-1;o>=0;o--)e(t[o],o)},xe=function(t){function e(e,o){t.call(this,Object.assign({},ve,o)),this._rect=e,this._fieldMap={}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.rect=function(t){return t?(this._rect=t,this):this._rect},e.prototype._initMap=function(){var t=this.options,e=this._fieldMap;"horizontal"===t.orientation?(e.sizeField="width",e.groupsSizeField="height",e.groupAxis="x",e.groupsAxis="y"):(e.sizeField="height",e.groupsSizeField="width",e.groupAxis="y",e.groupsAxis="x"),t.reverse?(this.forEach=me,this.justifyAlign=ye):(this.forEach=ge,this.justifyAlign=fe)},e.prototype.reflow=function(){if(this._rect&&0!==this.children.length){this._initMap(),this.options.transform&&this.transform(null);for(var t,e,o,i=this.options,r=this._rect,n=this._initGroups(),s=n.groups,a=n.groupsSize,p=this._fieldMap,h=p.sizeField,c=p.groupsSizeField,l=p.groupAxis,u=p.groupsAxis,d=new q,f=new q,y=new X,v=fe(a,r,i.alignContent,u,c),g=function(r,n){var s=e.elements[n];f[l]=t,f[u]=fe(r.size[c],o,i.alignItems,u,c),de(f,r,s),t+=r.size[h]+i.spacing},m=0;m<s.length;m++)e=s[m],d[l]=t=this.justifyAlign(e.size,r,i.justifyContent,l,h),d[u]=v,y[h]=e.size,y[c]=e.lineSize,o=new Y(d,y),this.forEach(e.bboxes,g),v+=e.lineSize+i.lineSpacing;if(!i.wrap&&e.size>r.size[h]){var x=r.size[h]/o.size[h],_=o.topLeft().scale(x,x),b=fe(o.size[c]*x,r,i.alignContent,u,c),w=Q();"x"===l?w.translate(r.origin.x-_.x,b-_.y):w.translate(b-_.x,r.origin.y-_.y),w.scale(x,x),this.transform(w)}}},e.prototype._initGroups=function(){for(var t=this.options,e=this.children,o=t.lineSpacing,i=t.wrap,r=t.spacing,n=this._fieldMap.sizeField,s=this._newGroup(),a=[],p=function(){a.push(s),h+=s.lineSize+o},h=-o,c=0;c<e.length;c++){var l=e[c],u=e[c].clippedBBox();l.visible()&&u&&(i&&s.size+u.size[n]+r>this._rect.size[n]?0===s.bboxes.length?(this._addToGroup(s,u,l),p(),s=this._newGroup()):(p(),s=this._newGroup(),this._addToGroup(s,u,l)):this._addToGroup(s,u,l))}return s.bboxes.length&&p(),{groups:a,groupsSize:h}},e.prototype._addToGroup=function(t,e,o){t.size+=e.size[this._fieldMap.sizeField]+this.options.spacing,t.lineSize=Math.max(e.size[this._fieldMap.groupsSizeField],t.lineSize),t.bboxes.push(e),t.elements.push(o)},e.prototype._newGroup=function(){return{lineSize:0,size:-this.options.spacing,bboxes:[],elements:[]}},e}(ue),_e=function(t){function e(e,o){void 0===e&&(e=new Y),void 0===o&&(o={}),t.call(this,o),this.geometry(e),R(this.options.stroke)||this.stroke("#000")}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var o={nodeType:{configurable:!0}};return o.nodeType.get=function(){return"Rect"},e.prototype._bbox=function(t){return this._geometry.bbox(t)},e.prototype.rawBBox=function(){return this._geometry.bbox()},e.prototype._containsPoint=function(t){return this._geometry.containsPoint(t)},e.prototype._isOnPath=function(t){return this.geometry()._isOnPath(t,this.options.stroke.width/2)},Object.defineProperties(e.prototype,o),e}(nt(at(ht(et))));function be(t,e,o,i,r){for(var n=0;n<t.length;n++){var s=t[n].clippedBBox();if(s){var a=s.origin.clone();a[i]=fe(s.size[r],e,o||"start",i,r),de(a,s,t[n])}}}function we(t,e,o){be(t,e,o,"x","width")}function Ce(t,e,o){be(t,e,o,"y","height")}function ke(t,e,o,i){if(t.length>1)for(var r=new q,n=t[0].bbox,s=1;s<t.length;s++){var a=t[s].element,p=t[s].bbox;r[e]=n.origin[e]+n.size[i],r[o]=p.origin[o],de(r,p,a),p.origin[e]=r[e],n=p}}function Se(t){for(var e=[],o=0;o<t.length;o++){var i=t[o],r=i.clippedBBox();r&&e.push({element:i,bbox:r})}return e}function Ae(t){ke(Se(t),"x","y","width")}function Pe(t){ke(Se(t),"y","x","height")}function Te(t,e,o,i,r){for(var n=function(t,e,o){for(var i,r,n=e.size[o],s=[],a=[],p=0,h=function(){a.push({element:i,bbox:r})},c=0;c<t.length;c++)if(i=t[c],r=i.clippedBBox()){var l=r.size[o];p+l>n?a.length?(s.push(a),a=[],h(),p=l):(h(),s.push(a),a=[],p=0):(h(),p+=l)}return a.length&&s.push(a),s}(t,e,r),s=e.origin.clone(),a=[],p=0;p<n.length;p++){var h=n[p],c=h[0];s[i]=c.bbox.origin[i],de(s,c.bbox,c.element),c.bbox.origin[o]=s[o],ke(h,o,i,r),a.push([]);for(var l=0;l<h.length;l++)a[p].push(h[l].element)}return a}function Me(t,e){return Te(t,e,"x","y","width")}function Oe(t,e){return Te(t,e,"y","x","height")}function Be(t,e){var o=t.clippedBBox();if(o){var i=o.size,r=e.size;if(r.width<i.width||r.height<i.height){var n=Math.min(r.width/i.width,r.height/i.height),s=t.transform()||Q();s.scale(n,n),t.transform(s)}}}var Re=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._change=function(){this.optionsChange({field:"stops"})},e}(kt);function Ee(t){return function(e){return R(e)?(this.options.set(t,e),this):this.options.get(t)}}var ze=function(t){function e(e,o,i){t.call(this),this.options=new z({offset:e,color:o,opacity:R(i)?i:1}),this.options.addObserver(this)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.create=function(t){if(R(t))return t instanceof e?t:t.length>1?new e(t[0],t[1],t[2]):new e(t.offset,t.color,t.opacity)},e}(function(t,e){var o=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}(t);return function(t,e){for(var o=0;o<e.length;o++)t[e[o]]=Ee(e[o])}(o.prototype,e),o}(B,["offset","color","opacity"])),Le=function(t){function e(e){void 0===e&&(e={}),t.call(this),this.stops=new Re(this._createStops(e.stops)),this.stops.addObserver(this),this._userSpace=e.userSpace,this.id=$()}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var o={nodeType:{configurable:!0}};return o.nodeType.get=function(){return"Gradient"},e.prototype.userSpace=function(t){return R(t)?(this._userSpace=t,this.optionsChange(),this):this._userSpace},e.prototype._createStops=function(t){void 0===t&&(t=[]);for(var e=[],o=0;o<t.length;o++)e.push(ze.create(t[o]));return e},e.prototype.addStop=function(t,e,o){this.stops.push(new ze(t,e,o))},e.prototype.removeStop=function(t){var e=this.stops.indexOf(t);e>=0&&this.stops.splice(e,1)},e.prototype.optionsChange=function(t){this.trigger("optionsChange",{field:"gradient"+(t?"."+t.field:""),value:this})},e.prototype.geometryChange=function(){this.optionsChange()},Object.defineProperties(e.prototype,o),e}(B),Ie=function(t){function e(e){void 0===e&&(e={}),t.call(this,e),this.start(e.start||new q),this.end(e.end||new q(1,0))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Lt(Le,["start","end"])),je=function(t){function e(e){void 0===e&&(e={}),t.call(this,e),this.center(e.center||new q),this._radius=R(e.radius)?e.radius:1,this._fallbackFill=e.fallbackFill}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.radius=function(t){return R(t)?(this._radius=t,this.geometryChange(),this):this._radius},e.prototype.fallbackFill=function(t){return R(t)?(this._fallbackFill=t,this.optionsChange(),this):this._fallbackFill},e}(Lt(Le,["center"]));function De(t){return.5-Math.cos(t*Math.PI)/2}function Ve(t){return t}function He(t,e,o,i){var r=1.70158,n=0,s=i;return 0===t?o:1===t?o+i:(n||(n=.5),s<Math.abs(i)?(s=i,r=n/4):r=n/(2*Math.PI)*Math.asin(i/s),s*Math.pow(2,-10*t)*Math.sin((Number(t)-r)*(1.1*Math.PI)/n)+i+o)}var Fe,Ne,Ue=Date.now||function(){return(new Date).getTime()},Ge=function(t){var e="undefined"!=typeof window?window:{},o=e.requestAnimationFrame||e.webkitRequestAnimationFrame||e.mozRequestAnimationFrame||e.oRequestAnimationFrame||e.msRequestAnimationFrame||function(t){setTimeout(t,1e3/60)};(Ge=function(t){return o.call(e,t)})(t)},We=Ge,qe=function(t){function e(){t.call(this),this._items=[]}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var o={current:{configurable:!0}};return o.current.get=function(){return Fe||(Fe=new e),Fe},e.prototype.register=function(t,e){this._items.push({name:t,type:e})},e.prototype.create=function(t,e){var o,i=this._items;if(e&&e.type)for(var r=e.type.toLowerCase(),n=0;n<i.length;n++)if(i[n].name.toLowerCase()===r){o=i[n];break}if(o)return new o.type(t,e)},Object.defineProperties(e,o),e}(O),Xe=function(t){function e(e,o){t.call(this),this.options=Object.assign({},this.options,o),this.element=e}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var o={options:{configurable:!0}};return e.create=function(t,e,o){return qe.current.create(t,e,o)},o.options.get=function(){return this._options||{duration:500,easing:"swing"}},o.options.set=function(t){this._options=t},e.prototype.setup=function(){},e.prototype.step=function(){},e.prototype.play=function(){var t=this,e=this.options,o=e.duration,r=e.delay;void 0===r&&(r=0);var n=i[e.easing],s=Ue()+r,a=s+o;0===o?(this.step(1),this.abort()):setTimeout((function(){var e=function(){if(!t._stopped){var i=Ue(),r=Yt(i-s,0,o),p=n(r/o,r,0,1,o);t.step(p),i<a?We(e):t.abort()}};e()}),r)},e.prototype.abort=function(){this._stopped=!0},e.prototype.destroy=function(){this.abort()},Object.defineProperties(e.prototype,o),e}(O),Ye=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var o={current:{configurable:!0}};return o.current.get=function(){return Ne||(Ne=new e),Ne},e.prototype.parse=function(t,e){var o=new Qt(e);return Wt(o,t)},Object.defineProperties(e,o),e}(O),Ze=function(t){function e(e){t.call(this),this.childNodes=[],this.parent=null,e&&(this.srcElement=e,this.observe())}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.destroy=function(){this.srcElement&&this.srcElement.removeObserver(this);for(var t=this.childNodes,e=0;e<t.length;e++)this.childNodes[e].destroy();this.parent=null},e.prototype.load=function(){},e.prototype.observe=function(){this.srcElement&&this.srcElement.addObserver(this)},e.prototype.append=function(t){this.childNodes.push(t),t.parent=this},e.prototype.insertAt=function(t,e){this.childNodes.splice(e,0,t),t.parent=this},e.prototype.remove=function(t,e){for(var o=t+e,i=t;i<o;i++)this.childNodes[i].removeSelf();this.childNodes.splice(t,e)},e.prototype.removeSelf=function(){this.clear(),this.destroy()},e.prototype.clear=function(){this.remove(0,this.childNodes.length)},e.prototype.invalidate=function(){this.parent&&this.parent.invalidate()},e.prototype.geometryChange=function(){this.invalidate()},e.prototype.optionsChange=function(){this.invalidate()},e.prototype.childrenChange=function(t){"add"===t.action?this.load(t.items,t.index):"remove"===t.action&&this.remove(t.index,t.items.length),this.invalidate()},e}(O),Qe=function(t){function e(){t.call(this),this._events={}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.bind=function(t,e,o){var i=arguments,r=this,n=$e(t),s=Ke(e),a=n.length;if(void 0===e){for(var p in t)r.bind(p,t[p]);return this}for(var h=function(t){var a=n[t],p=s?e:e[a];if(p){if(o){var h=p;(p=function(){r.unbind(a,p),h.apply(r,i)}).original=h}(r._events[a]=r._events[a]||[]).push(p)}},c=0;c<a;c++)h(c);return this},e.prototype.one=function(t,e){return this.bind(t,e,!0)},e.prototype.first=function(t,e){for(var o=$e(t),i=Ke(e),r=0,n=o.length;r<n;r++){var s=o[r],a=i?e:e[s];if(a)(this._events[s]=this._events[s]||[]).unshift(a)}return this},e.prototype.trigger=function(t,e){void 0===e&&(e={});var o=this._events[t];if(o){var i=o.length;e.sender=this,e._defaultPrevented=!1,e.preventDefault=Je,e.isDefaultPrevented=to,o=o.slice();for(var r=0;r<i;r++)o[r].call(this,e);return!0===e._defaultPrevented}return!1},e.prototype.unbind=function(t,e){var o=this._events[t];if(void 0===t)this._events={};else if(o)if(e)for(var i=o.length-1;i>=0;i--)o[i]!==e&&o[i].original!==e||o.splice(i,1);else this._events[t]=[];return this},e}(O);function Ke(t){return"function"==typeof t}function $e(t){return"string"==typeof t?[t]:t}function Je(){this._defaultPrevented=!0}function to(){return!0===this._defaultPrevented}function eo(t,e){for(var o={},i=window.getComputedStyle(t)||{},r=Array.isArray(e)?e:[e],n=0;n<r.length;n++){var s=r[n];o[s]=i[s]}return o}function oo(t){return isNaN(t)?t:t+"px"}function io(t,e){if(!e){var o=eo(t,["width","height"]);return{width:parseInt(o.width,10),height:parseInt(o.height,10)}}var i=e.width,r=e.height;R(i)&&(t.style.width=oo(i)),R(r)&&(t.style.height=oo(r))}function ro(t){return void 0===t&&(t={}),t.touch?t.touch.initialTouch:t.target}function no(t){var e=eo(t,["paddingLeft","paddingTop"]),o=e.paddingLeft,i=e.paddingTop;return{top:parseFloat(i),left:parseFloat(o)}}function so(t){var e=t.getBoundingClientRect(),o=document.documentElement;return{top:e.top+(window.pageYOffset||o.scrollTop)-(o.clientTop||0),left:e.left+(window.pageXOffset||o.scrollLeft)-(o.clientLeft||0)}}function ao(t){return R((t.x||{}).location)?{x:t.x.location,y:t.y.location}:{x:t.pageX||t.clientX||0,y:t.pageY||t.clientY||0}}var po=/matrix\((.*)\)/;function ho(t){var e=getComputedStyle(t).transform;return"none"===e?G.unit():function(t){var e=t.match(po);if(null===e||2!==e.length)return G.unit();var o=e[1].split(",").map((function(t){return parseFloat(t)}));return new(Function.prototype.bind.apply(G,[null].concat(o)))}(e)}function co(t){if(!t)return G.unit();for(var e=ho(t),o=t.parentElement;o;){var i=ho(o);e=e.multiplyCopy(i),o=o.parentElement}return e.b=e.c=e.e=e.f=0,e}var lo=["click","mouseenter","mouseleave","mousemove","resize"],uo=function(t){function e(e,o){t.call(this),this.options=Object.assign({},o),this.element=e,this.element._kendoExportVisual=this.exportVisual.bind(this),this._click=this._handler("click"),this._mouseenter=this._handler("mouseenter"),this._mouseleave=this._handler("mouseleave"),this._mousemove=this._handler("mousemove"),this._visual=new ue,io(e,this.options),this.bind(lo,this.options),this._enableTracking()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.draw=function(t){this._visual.children.push(t)},e.prototype.clear=function(){this._visual.children=[]},e.prototype.destroy=function(){this._visual=null,this.element._kendoExportVisual=null,this.unbind()},e.prototype.eventTarget=function(t){for(var e,o=ro(t);!e&&o&&(e=o._kendoNode,o!==this.element);)o=o.parentElement;if(e)return e.srcElement},e.prototype.exportVisual=function(){return this._visual},e.prototype.getSize=function(){return io(this.element)},e.prototype.currentSize=function(t){if(!t)return this._size;this._size=t},e.prototype.setSize=function(t){io(this.element,t),this.currentSize(t),this._resize()},e.prototype.resize=function(t){var e=this.getSize(),o=this.currentSize();(t||(e.width>0||e.height>0)&&(!o||e.width!==o.width||e.height!==o.height))&&(this.currentSize(e),this._resize(e,t),this.trigger("resize",e))},e.prototype.size=function(t){if(!t)return this.getSize();this.setSize(t)},e.prototype.suspendTracking=function(){this._suspendedTracking=!0},e.prototype.resumeTracking=function(){this._suspendedTracking=!1},e.prototype._enableTracking=function(){},e.prototype._resize=function(){},e.prototype._handler=function(t){var e=this;return function(o){var i=e.eventTarget(o);i&&!e._suspendedTracking&&e.trigger(t,{element:i,originalEvent:o,type:t})}},e.prototype._elementOffset=function(){var t=this.element,e=no(t),o=so(t),i=o.left,r=o.top;return{left:i+e.left,top:r+e.top}},e.prototype._surfacePoint=function(t){var e=this._elementOffset(),o=ao(t),i=o.x-e.left,r=o.y-e.top,n=co(this.element).invert();return new q(i,r).transform(n)},e}(Qe);function fo(t){var e=window.console;void 0!==e&&e.log&&e.log(t)}function yo(t,e){return R(e)&&null!==e?" "+t+'="'+e+'" ':""}function vo(t){for(var e="",o=0;o<t.length;o++)e+=yo(t[o][0],t[o][1]);return e}function go(t){for(var e="",o=0;o<t.length;o++){var i=t[o][1];R(i)&&(e+=t[o][0]+":"+i+";")}if(""!==e)return e}var mo={},xo="http://www.w3.org/2000/svg",_o=function(t,e){t.innerHTML=e};if("undefined"!=typeof document){var bo=document.createElement("div"),wo="undefined"!=typeof DOMParser;bo.innerHTML="<svg xmlns='http://www.w3.org/2000/svg'></svg>",wo&&bo.firstChild.namespaceURI!==xo&&(_o=function(t,e){var o=(new DOMParser).parseFromString(e,"text/xml"),i=document.adoptNode(o.documentElement);t.innerHTML="",t.appendChild(i)})}var Co=_o;var ko=null,So={get browser(){return"undefined"==typeof window||ko?ko:ko=function(t){var e={edge:/(edge)[ \/]([\w.]+)/i,webkit:/(chrome)[ \/]([\w.]+)/i,safari:/(webkit)[ \/]([\w.]+)/i,opera:/(opera)(?:.*version|)[ \/]([\w.]+)/i,msie:/(msie\s|trident.*? rv:)([\w.]+)/i,mozilla:/(mozilla)(?:.*? rv:([\w.]+))/i},o={};for(var i in e)if(e.hasOwnProperty(i)){var r=t.match(e[i]);if(r){o[i]=!0,o[r[1].toLowerCase().split(" ")[0].split("/")[0]]=!0,o.version=parseInt(document.documentMode||r[2],10);break}}return o}(window.navigator.userAgent)}},Ao={clip:"clip-path",fill:"fill"};function Po(t,e){return"clip"===t||"fill"===t&&(!e||"Gradient"===e.nodeType)}var To=function(t){function e(e,o){t.call(this,e),this.definitions={},this.options=o}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.destroy=function(){this.element&&(this.element._kendoNode=null,this.element=null),this.clearDefinitions(),t.prototype.destroy.call(this)},e.prototype.load=function(t,e){for(var o=0;o<t.length;o++){var i=t[o],r=i.children,n=new mo[i.nodeType](i,this.options);R(e)?this.insertAt(n,e):this.append(n),n.createDefinitions(),r&&r.length>0&&n.load(r);var s=this.element;s&&n.attachTo(s,e)}},e.prototype.root=function(){for(var t=this;t.parent;)t=t.parent;return t},e.prototype.attachTo=function(t,e){var o=document.createElement("div");Co(o,"<svg xmlns='"+xo+"' version='1.1'>"+this.render()+"</svg>");var i=o.firstChild.firstChild;i&&(R(e)?t.insertBefore(i,t.childNodes[e]||null):t.appendChild(i),this.setElement(i))},e.prototype.setElement=function(t){this.element&&(this.element._kendoNode=null),this.element=t,this.element._kendoNode=this;for(var e=this.childNodes,o=0;o<e.length;o++){var i=t.childNodes[o];e[o].setElement(i)}},e.prototype.clear=function(){this.clearDefinitions(),this.element&&(this.element.innerHTML="");for(var t=this.childNodes,e=0;e<t.length;e++)t[e].destroy();this.childNodes=[]},e.prototype.removeSelf=function(){if(this.element){var e=this.element.parentNode;e&&e.removeChild(this.element),this.element=null}t.prototype.removeSelf.call(this)},e.prototype.template=function(){return this.renderChildren()},e.prototype.render=function(){return this.template()},e.prototype.renderChildren=function(){for(var t=this.childNodes,e="",o=0;o<t.length;o++)e+=t[o].render();return e},e.prototype.optionsChange=function(e){var o=e.field,i=e.value;"visible"===o?this.css("display",i?"":"none"):Ao[o]&&Po(o,i)?this.updateDefinition(o,i):"opacity"===o?this.attr("opacity",i):"cursor"===o?this.css("cursor",i):"id"===o&&(i?this.attr("id",i):this.removeAttr("id")),t.prototype.optionsChange.call(this,e)},e.prototype.attr=function(t,e){this.element&&this.element.setAttribute(t,e)},e.prototype.allAttr=function(t){for(var e=0;e<t.length;e++)this.attr(t[e][0],t[e][1])},e.prototype.css=function(t,e){this.element&&(this.element.style[t]=e)},e.prototype.allCss=function(t){for(var e=0;e<t.length;e++)this.css(t[e][0],t[e][1])},e.prototype.removeAttr=function(t){this.element&&this.element.removeAttribute(t)},e.prototype.mapTransform=function(t){var e=[];return t&&e.push(["transform","matrix("+t.matrix().toString(6)+")"]),e},e.prototype.renderTransform=function(){return vo(this.mapTransform(this.srcElement.transform()))},e.prototype.transformChange=function(t){t?this.allAttr(this.mapTransform(t)):this.removeAttr("transform")},e.prototype.mapStyle=function(){var t=this.srcElement.options,e=[["cursor",t.cursor]];return!1===t.visible&&e.push(["display","none"]),e},e.prototype.renderStyle=function(){return yo("style",go(this.mapStyle(!0)))},e.prototype.renderOpacity=function(){return yo("opacity",this.srcElement.options.opacity)},e.prototype.renderId=function(){return yo("id",this.srcElement.options.id)},e.prototype.createDefinitions=function(){var t=this.srcElement,e=this.definitions;if(t){var o,i=t.options;for(var r in Ao){var n=i.get(r);n&&Po(r,n)&&(e[r]=n,o=!0)}o&&this.definitionChange({action:"add",definitions:e})}},e.prototype.definitionChange=function(t){this.parent&&this.parent.definitionChange(t)},e.prototype.updateDefinition=function(t,e){var o=this.definitions,i=o[t],r=Ao[t],n={};i&&(n[t]=i,this.definitionChange({action:"remove",definitions:n}),delete o[t]),e?(n[t]=e,this.definitionChange({action:"add",definitions:n}),o[t]=e,this.attr(r,this.refUrl(e.id))):i&&this.removeAttr(r)},e.prototype.clearDefinitions=function(){var t=this.definitions;this.definitionChange({action:"remove",definitions:t}),this.definitions={}},e.prototype.renderDefinitions=function(){return vo(this.mapDefinitions())},e.prototype.mapDefinitions=function(){var t=this.definitions,e=[];for(var o in t)e.push([Ao[o],this.refUrl(t[o].id)]);return e},e.prototype.refUrl=function(t){var e=(this.options||{}).skipBaseHref,o=this.baseUrl().replace(/'/g,"\\'");return"url("+(e?"":o)+"#"+t+")"},e.prototype.baseUrl=function(){return function(){var t=document.getElementsByTagName("base")[0],e=document.location.href,o="";if(t&&!(So.browser||{}).msie){var i=e.indexOf("#");-1!==i&&(e=e.substring(0,i)),o=e}return o}()},e}(Ze),Mo=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.template=function(){return"<stop "+this.renderOffset()+" "+this.renderStyle()+" />"},e.prototype.renderOffset=function(){return yo("offset",this.srcElement.offset())},e.prototype.mapStyle=function(){var t=this.srcElement;return[["stop-color",t.color()],["stop-opacity",t.opacity()]]},e.prototype.optionsChange=function(t){"offset"===t.field?this.attr(t.field,t.value):"color"!==t.field&&"opacity"!==t.field||this.css("stop-"+t.field,t.value)},e}(To),Oo=function(t){function e(e){t.call(this,e),this.id=e.id,this.loadStops()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.loadStops=function(){for(var t=this.srcElement.stops,e=this.element,o=0;o<t.length;o++){var i=new Mo(t[o]);this.append(i),e&&i.attachTo(e)}},e.prototype.optionsChange=function(t){"gradient.stops"===t.field?(Ze.prototype.clear.call(this),this.loadStops()):"gradient"===t.field&&this.allAttr(this.mapCoordinates())},e.prototype.renderCoordinates=function(){return vo(this.mapCoordinates())},e.prototype.mapSpace=function(){return["gradientUnits",this.srcElement.userSpace()?"userSpaceOnUse":"objectBoundingBox"]},e}(To),Bo=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.template=function(){return"<linearGradient id='"+this.id+"' "+this.renderCoordinates()+">"+this.renderChildren()+"</linearGradient>"},e.prototype.mapCoordinates=function(){var t=this.srcElement,e=t.start(),o=t.end();return[["x1",e.x],["y1",e.y],["x2",o.x],["y2",o.y],this.mapSpace()]},e}(Oo),Ro=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.template=function(){return"<radialGradient id='"+this.id+"' "+this.renderCoordinates()+">"+this.renderChildren()+"</radialGradient>"},e.prototype.mapCoordinates=function(){var t=this.srcElement,e=t.center(),o=t.radius();return[["cx",e.x],["cy",e.y],["r",o],this.mapSpace()]},e}(Oo),Eo=function(t){function e(e){t.call(this),this.srcElement=e,this.id=e.id,this.load([e])}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.template=function(){return"<clipPath id='"+this.id+"'>"+this.renderChildren()+"</clipPath>"},e}(To),zo=function(t){function e(){t.call(this),this.definitionMap={}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.attachTo=function(t){this.element=t},e.prototype.template=function(){return"<defs>"+this.renderChildren()+"</defs>"},e.prototype.definitionChange=function(t){var e=t.definitions,o=t.action;"add"===o?this.addDefinitions(e):"remove"===o&&this.removeDefinitions(e)},e.prototype.createDefinition=function(t,e){var o;return"clip"===t?o=Eo:"fill"===t&&(e instanceof Ie?o=Bo:e instanceof je&&(o=Ro)),new o(e)},e.prototype.addDefinitions=function(t){for(var e in t)this.addDefinition(e,t[e])},e.prototype.addDefinition=function(t,e){var o=this.element,i=this.definitionMap,r=e.id,n=i[r];if(n)n.count++;else{var s=this.createDefinition(t,e);i[r]={element:s,count:1},this.append(s),o&&s.attachTo(this.element)}},e.prototype.removeDefinitions=function(t){for(var e in t)this.removeDefinition(t[e])},e.prototype.removeDefinition=function(t){var e=this.definitionMap,o=t.id,i=e[o];i&&(i.count--,0===i.count&&(this.remove(this.childNodes.indexOf(i.element),1),delete e[o]))},e}(To),Lo=function(t){function e(e){t.call(this),this.options=e,this.defs=new zo}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.attachTo=function(t){this.element=t,this.defs.attachTo(t.firstElementChild)},e.prototype.clear=function(){Ze.prototype.clear.call(this)},e.prototype.template=function(){return this.defs.render()+this.renderChildren()},e.prototype.definitionChange=function(t){this.defs.definitionChange(t)},e}(To);function Io(t,e){for(var o in e)for(var i=o.trim().split(" "),r=0;r<i.length;r++)t.addEventListener(i[r],e[o],!1)}function jo(t,e){for(var o in void 0===e&&(e={}),e)for(var i=o.trim().split(" "),r=0;r<i.length;r++)t.removeEventListener(i[r],e[o],!1)}var Do={dot:[1.5,3.5],dash:[4,3.5],longdash:[8,3.5],dashdot:[3.5,3.5,1.5,3.5],longdashdot:[8,3.5,1.5,3.5],longdashdotdot:[8,3.5,1.5,3.5,1.5,3.5]},Vo={"fill.opacity":"fill-opacity","stroke.color":"stroke","stroke.width":"stroke-width","stroke.opacity":"stroke-opacity"},Ho=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.geometryChange=function(){this.attr("d",this.renderData()),this.invalidate()},e.prototype.optionsChange=function(e){switch(e.field){case"fill":e.value?this.allAttr(this.mapFill(e.value)):this.removeAttr("fill");break;case"fill.color":this.allAttr(this.mapFill({color:e.value}));break;case"stroke":e.value?this.allAttr(this.mapStroke(e.value)):this.removeAttr("stroke");break;case"transform":this.transformChange(e.value);break;default:var o=Vo[e.field];o&&this.attr(o,e.value)}t.prototype.optionsChange.call(this,e)},e.prototype.content=function(){this.element&&(this.element.textContent=this.srcElement.content())},e.prototype.renderData=function(){return this.printPath(this.srcElement)},e.prototype.printPath=function(t){var e=t.segments,o=e.length;if(o>0){for(var i,r,n=[],s=1;s<o;s++){var a=this.segmentType(e[s-1],e[s]);a!==r&&(r=a,n.push(a)),"L"===a?n.push(this.printPoints(e[s].anchor())):n.push(this.printPoints(e[s-1].controlOut(),e[s].controlIn(),e[s].anchor()))}return i="M"+this.printPoints(e[0].anchor())+" "+n.join(" "),t.options.closed&&(i+="Z"),i}},e.prototype.printPoints=function(){for(var t=arguments,e=t.length,o=[],i=0;i<e;i++)o.push(t[i].toString(3));return o.join(" ")},e.prototype.segmentType=function(t,e){return t.controlOut()&&e.controlIn()?"C":"L"},e.prototype.mapStroke=function(t){var e=[];return t&&!tt(t.color)?(e.push(["stroke",t.color]),e.push(["stroke-width",t.width]),e.push(["stroke-linecap",this.renderLinecap(t)]),e.push(["stroke-linejoin",t.lineJoin]),R(t.opacity)&&e.push(["stroke-opacity",t.opacity]),R(t.dashType)&&e.push(["stroke-dasharray",this.renderDashType(t)])):e.push(["stroke","none"]),e},e.prototype.renderStroke=function(){return vo(this.mapStroke(this.srcElement.options.stroke))},e.prototype.renderDashType=function(t){var e=t.dashType,o=t.width;if(void 0===o&&(o=1),e&&"solid"!==e){for(var i=Do[e.toLowerCase()],r=[],n=0;n<i.length;n++)r.push(i[n]*o);return r.join(" ")}},e.prototype.renderLinecap=function(t){var e=t.dashType,o=t.lineCap;return e&&"solid"!==e?"butt":o},e.prototype.mapFill=function(t){var e=[];return t&&"Gradient"===t.nodeType||(t&&!tt(t.color)?(e.push(["fill",t.color]),R(t.opacity)&&e.push(["fill-opacity",t.opacity])):e.push(["fill","none"])),e},e.prototype.renderFill=function(){return vo(this.mapFill(this.srcElement.options.fill))},e.prototype.template=function(){return"<path "+this.renderId()+" "+this.renderStyle()+" "+this.renderOpacity()+" "+yo("d",this.renderData())+this.renderStroke()+this.renderFill()+this.renderDefinitions()+this.renderTransform()+"></path>"},e}(To),Fo=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.renderData=function(){return this.printPath(this.srcElement.toPath())},e}(Ho),No=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.geometryChange=function(){var t=this.center();this.attr("cx",t.x),this.attr("cy",t.y),this.attr("r",this.radius()),this.invalidate()},e.prototype.center=function(){return this.srcElement.geometry().center},e.prototype.radius=function(){return this.srcElement.geometry().radius},e.prototype.template=function(){return"<circle "+this.renderId()+" "+this.renderStyle()+" "+this.renderOpacity()+"cx='"+this.center().x+"' cy='"+this.center().y+"' r='"+this.radius()+"'"+this.renderStroke()+" "+this.renderFill()+" "+this.renderDefinitions()+this.renderTransform()+" ></circle>"},e}(Ho),Uo=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.template=function(){return"<g"+(this.renderId()+this.renderTransform()+this.renderStyle()+this.renderOpacity()+this.renderDefinitions())+">"+this.renderChildren()+"</g>"},e.prototype.optionsChange=function(e){"transform"===e.field&&this.transformChange(e.value),t.prototype.optionsChange.call(this,e)},e}(To),Go=/&/g,Wo=/</g,qo=/"/g,Xo=/'/g,Yo=/>/g;function Zo(t){return String(t).replace(Go,"&").replace(Wo,"<").replace(Yo,">").replace(qo,""").replace(Xo,"'")}var Qo=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.geometryChange=function(){this.allAttr(this.mapPosition()),this.invalidate()},e.prototype.optionsChange=function(e){"src"===e.field&&this.allAttr(this.mapSource()),t.prototype.optionsChange.call(this,e)},e.prototype.mapPosition=function(){var t=this.srcElement.rect(),e=t.topLeft();return[["x",e.x],["y",e.y],["width",t.width()+"px"],["height",t.height()+"px"]]},e.prototype.renderPosition=function(){return vo(this.mapPosition())},e.prototype.mapSource=function(t){var e=this.srcElement.src();return t&&(e=Zo(e)),[["xlink:href",e]]},e.prototype.renderSource=function(){return vo(this.mapSource(!0))},e.prototype.template=function(){return"<image preserveAspectRatio='none' "+this.renderId()+" "+this.renderStyle()+" "+this.renderTransform()+" "+this.renderOpacity()+this.renderPosition()+" "+this.renderSource()+" "+this.renderDefinitions()+"></image>"},e}(Ho),Ko=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.renderData=function(){var t=this.srcElement.paths;if(t.length>0){for(var e=[],o=0;o<t.length;o++)e.push(this.printPath(t[o]));return e.join(" ")}},e}(Ho),$o=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.geometryChange=function(){var t=this.srcElement.geometry();this.attr("x",t.origin.x),this.attr("y",t.origin.y),this.attr("width",t.size.width),this.attr("height",t.size.height),this.attr("rx",t.cornerRadius[0]),this.attr("ry",t.cornerRadius[1]),this.invalidate()},e.prototype.size=function(){return this.srcElement.geometry().size},e.prototype.origin=function(){return this.srcElement.geometry().origin},e.prototype.rx=function(){return this.srcElement.geometry().cornerRadius[0]},e.prototype.ry=function(){return this.srcElement.geometry().cornerRadius[1]},e.prototype.template=function(){return"<rect "+this.renderId()+" "+this.renderStyle()+" "+this.renderOpacity()+" x='"+this.origin().x+"' y='"+this.origin().y+"' rx='"+this.rx()+"' ry='"+this.ry()+"' width='"+this.size().width+"' height='"+this.size().height+"' "+this.renderStroke()+" "+this.renderFill()+" "+this.renderDefinitions()+" "+this.renderTransform()+" />"},e}(Ho),Jo=/&(?:[a-zA-Z]+|#\d+);/g;function ti(t){if(!t||"string"!=typeof t||!Jo.test(t))return t;var e=ti._element;return Jo.lastIndex=0,t.replace(Jo,(function(t){return e.innerHTML=t,e.textContent||e.innerText}))}"undefined"!=typeof document&&(ti._element=document.createElement("span"));var ei=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.geometryChange=function(){var t=this.pos();this.attr("x",t.x),this.attr("y",t.y),this.invalidate()},e.prototype.optionsChange=function(e){"font"===e.field?(this.attr("style",go(this.mapStyle())),this.geometryChange()):"content"===e.field&&t.prototype.content.call(this,this.srcElement.content()),t.prototype.optionsChange.call(this,e)},e.prototype.mapStyle=function(e){var o=t.prototype.mapStyle.call(this,e),i=this.srcElement.options.font;return e&&(i=Zo(i)),o.push(["font",i],["white-space","pre"]),o},e.prototype.pos=function(){var t=this.srcElement.position(),e=this.srcElement.measure();return t.clone().setY(t.y+e.baseline)},e.prototype.renderContent=function(){var t=this.srcElement.content();return te(t=Zo(t=ti(t)))},e.prototype.renderTextAnchor=function(){var t;return!(this.options||{}).rtl||So.browser.msie||So.browser.edge||(t="end"),yo("text-anchor",t)},e.prototype.template=function(){return"<text "+this.renderId()+" "+this.renderTextAnchor()+" "+this.renderStyle()+" "+this.renderOpacity()+"x='"+this.pos().x+"' y='"+this.pos().y+"' "+this.renderStroke()+" "+this.renderTransform()+" "+this.renderDefinitions()+this.renderFill()+">"+this.renderContent()+"</text>"},e}(Ho);mo.Arc=Fo,mo.Circle=No,mo.Group=Uo,mo.Image=Qo,mo.MultiPath=Ko,mo.Path=Ho,mo.Rect=$o,mo.Text=ei;var oi=function(t){function e(e,o){t.call(this,e,o),this._root=new Lo(Object.assign({rtl:"rtl"===eo(e,"direction").direction},this.options)),Co(this.element,this._template()),this._rootElement=this.element.firstElementChild,function(t){var e;try{e=t.getScreenCTM?t.getScreenCTM():null}catch(t){}if(e){var o=-e.e%1,i=-e.f%1,r=t.style;0===o&&0===i||(r.left=o+"px",r.top=i+"px")}}(this._rootElement),this._root.attachTo(this._rootElement),Io(this.element,{click:this._click,mouseover:this._mouseenter,mouseout:this._mouseleave,mousemove:this._mousemove}),this.resize()}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var o={type:{configurable:!0}};return o.type.get=function(){return"svg"},e.prototype.destroy=function(){this._root&&(this._root.destroy(),this._root=null,this._rootElement=null,jo(this.element,{click:this._click,mouseover:this._mouseenter,mouseout:this._mouseleave,mousemove:this._mousemove})),t.prototype.destroy.call(this)},e.prototype.translate=function(t){var e=Math.round(t.x)+" "+Math.round(t.y)+" "+this._size.width+" "+this._size.height;this._offset=t,this._rootElement.setAttribute("viewBox",e)},e.prototype.draw=function(e){t.prototype.draw.call(this,e),this._root.load([e])},e.prototype.clear=function(){t.prototype.clear.call(this),this._root.clear()},e.prototype.svg=function(){return"<?xml version='1.0' ?>"+this._template()},e.prototype.exportVisual=function(){var t=this._visual,e=this._offset;if(e){var o=new ue;o.children.push(t),o.transform(Q().translate(-e.x,-e.y)),t=o}return t},e.prototype._resize=function(){this._offset&&this.translate(this._offset)},e.prototype._template=function(){return"<svg style='width: 100%; height: 100%; overflow: hidden;' xmlns='"+xo+"' xmlns:xlink='http://www.w3.org/1999/xlink' version='1.1'>"+this._root.render()+"</svg>"},Object.defineProperties(e.prototype,o),e}(uo);function ii(){var t,e,o=new Promise((function(i,r){t=function(t){return o._state="resolved",i(t),o},e=function(t){return o._state="rejected",r(t),o}}));return o._state="pending",o.resolve=t,o.reject=e,o.state=function(){return o._state},o}function ri(t){return Promise.all(t)}var ni={};function si(t,e){var o=e.segments;if(0!==o.length){var i=o[0],r=i.anchor();t.moveTo(r.x,r.y);for(var n=1;n<o.length;n++){r=(i=o[n]).anchor();var s=o[n-1].controlOut(),a=i.controlIn();s&&a?t.bezierCurveTo(s.x,s.y,a.x,a.y,r.x,r.y):t.lineTo(r.x,r.y)}e.options.closed&&t.closePath()}}var ai=function(t){function e(e){t.call(this,e),e&&this.initClip()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initClip=function(){var t=this.srcElement.clip();t&&(this.clip=t,t.addObserver(this))},e.prototype.clear=function(){this.srcElement&&this.srcElement.removeObserver(this),this.clearClip(),t.prototype.clear.call(this)},e.prototype.clearClip=function(){this.clip&&(this.clip.removeObserver(this),delete this.clip)},e.prototype.setClip=function(t){this.clip&&(t.beginPath(),si(t,this.clip),t.clip())},e.prototype.optionsChange=function(e){"clip"===e.field&&(this.clearClip(),this.initClip()),t.prototype.optionsChange.call(this,e)},e.prototype.setTransform=function(t){if(this.srcElement){var e=this.srcElement.transform();e&&t.transform.apply(t,e.matrix().toArray(6))}},e.prototype.loadElements=function(t,e,o){for(var i=0;i<t.length;i++){var r=t[i],n=r.children,s=new ni[r.nodeType](r,o);n&&n.length>0&&s.load(n,e,o),R(e)?this.insertAt(s,e):this.append(s)}},e.prototype.load=function(t,e,o){this.loadElements(t,e,o),this.invalidate()},e.prototype.setOpacity=function(t){if(this.srcElement){var e=this.srcElement.opacity();R(e)&&this.globalAlpha(t,e)}},e.prototype.globalAlpha=function(t,e){var o=e;o&&t.globalAlpha&&(o*=t.globalAlpha),t.globalAlpha=o},e.prototype.visible=function(){var t=this.srcElement;return!t||t&&!1!==t.options.visible},e}(Ze),pi=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.renderTo=function(t){if(this.visible()){t.save(),this.setTransform(t),this.setClip(t),this.setOpacity(t);for(var e=this.childNodes,o=0;o<e.length;o++){var i=e[o];i.visible()&&i.renderTo(t)}t.restore()}},e}(ce(ai,"childNodes"));function hi(t,e){var o,i=0;if(!e||e<=0)return t;var r=function(){var r=Ue()-i,n=arguments,s=function(){t.apply(null,n),i=Ue()};if(!i)return s();o&&clearTimeout(o),r>e?s():o=setTimeout(s,e-r)};return r.cancel=function(){clearTimeout(o)},r}var ci=function(t){function e(e,o){t.call(this),this.canvas=e,this.size=o,this.ctx=e.getContext("2d");var i=this._invalidate.bind(this);this.invalidate=hi((function(){We(i)}),1e3/60)}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.canvas=null,this.ctx=null},e.prototype.load=function(t,e,o){this.loadElements(t,e,o),this._invalidate()},e.prototype._rescale=function(t){var e=this.canvas,o=this.size;e.width=o.width*t,e.height=o.height*t,this.ctx.scale(t,t)},e.prototype._devicePixelRatio=function(){return"number"==typeof window.devicePixelRatio?window.devicePixelRatio:1},e.prototype._invalidate=function(t){if(this.ctx){var e=t&&t.fixedScale?1:this._devicePixelRatio();this._rescale(e),this.ctx.clearRect(0,0,this.canvas.width,this.canvas.height),this.renderTo(this.ctx)}},e}(ce(pi,"childNodes")),li=function(t){function e(){t.call(this),this.shapes=[]}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._add=function(t,e){this.shapes.push({bbox:e,shape:t}),t._quadNode=this},e.prototype.pointShapes=function(t){for(var e=this.shapes,o=e.length,i=[],r=0;r<o;r++)e[r].bbox.containsPoint(t)&&i.push(e[r].shape);return i},e.prototype.insert=function(t,e){this._add(t,e)},e.prototype.remove=function(t){for(var e=this.shapes,o=e.length,i=0;i<o;i++)if(e[i].shape===t){e.splice(i,1);break}},e}(O),ui=function(t){function e(e){t.call(this),this.children=[],this.rect=e}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.inBounds=function(t){var e=this.rect,o=e.bottomRight(),i=t.bottomRight(),r=e.origin.x<=t.origin.x&&e.origin.y<=t.origin.y&&i.x<=o.x&&i.y<=o.y;return r},e.prototype.pointShapes=function(e){for(var o=this.children,i=o.length,r=t.prototype.pointShapes.call(this,e),n=0;n<i;n++)le(r,o[n].pointShapes(e));return r},e.prototype.insert=function(t,e){var o=this.children,i=!1;if(this.inBounds(e)){if(this.shapes.length<4)this._add(t,e);else{o.length||this._initChildren();for(var r=0;r<o.length;r++)if(o[r].insert(t,e)){i=!0;break}i||this._add(t,e)}i=!0}return i},e.prototype._initChildren=function(){var t=this.rect,o=this.children,i=t.center(),r=t.width()/2,n=t.height()/2;o.push(new e(new Y([t.origin.x,t.origin.y],[r,n])),new e(new Y([i.x,t.origin.y],[r,n])),new e(new Y([t.origin.x,i.y],[r,n])),new e(new Y([i.x,i.y],[r,n])))},e}(li);function di(t,e){return t._zIndex<e._zIndex?1:t._zIndex>e._zIndex?-1:0}var fi=function(t){function e(){t.call(this),this.initRoots()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initRoots=function(){this.rootMap={},this.root=new li,this.rootElements=[]},e.prototype.clear=function(){for(var t=this.rootElements,e=0;e<t.length;e++)this.remove(t[e]);this.initRoots()},e.prototype.pointShape=function(t){var e=(this.rootMap[Math.floor(t.x/3e3)]||{})[Math.floor(t.y/3e3)],o=this.root.pointShapes(t);e&&(o=o.concat(e.pointShapes(t))),this.assignZindex(o),o.sort(di);for(var i=0;i<o.length;i++)if(o[i].containsPoint(t))return o[i]},e.prototype.assignZindex=function(t){for(var e=0;e<t.length;e++){for(var o=t[e],i=0,r=Math.pow(1e4,75),n=[];o;)n.push(o),o=o.parent;for(;n.length;)i+=(((o=n.pop()).parent?o.parent.children:this.rootElements).indexOf(o)+1)*r,r/=1e4;t[e]._zIndex=i}},e.prototype.optionsChange=function(t){"transform"!==t.field&&"stroke.width"!==t.field||this.bboxChange(t.element)},e.prototype.geometryChange=function(t){this.bboxChange(t.element)},e.prototype.bboxChange=function(t){if("Group"===t.nodeType)for(var e=0;e<t.children.length;e++)this.bboxChange(t.children[e]);else t._quadNode&&t._quadNode.remove(t),this._insertShape(t)},e.prototype.add=function(t){var e=Array.isArray(t)?t.slice(0):[t];le(this.rootElements,e),this._insert(e)},e.prototype.childrenChange=function(t){if("remove"===t.action)for(var e=0;e<t.items.length;e++)this.remove(t.items[e]);else this._insert(Array.prototype.slice.call(t.items,0))},e.prototype._insert=function(t){for(var e;t.length>0;)(e=t.pop()).addObserver(this),"Group"===e.nodeType?le(t,e.children):this._insertShape(e)},e.prototype._insertShape=function(t){var e=t.bbox();if(e){var o=this.getSectors(e),i=o[0][0],r=o[1][0];if(this.inRoot(o))this.root.insert(t,e);else{var n=this.rootMap;n[i]||(n[i]={}),n[i][r]||(n[i][r]=new ui(new Y([3e3*i,3e3*r],[3e3,3e3]))),n[i][r].insert(t,e)}}},e.prototype.remove=function(t){if(t.removeObserver(this),"Group"===t.nodeType)for(var e=t.children,o=0;o<e.length;o++)this.remove(e[o]);else t._quadNode&&(t._quadNode.remove(t),delete t._quadNode)},e.prototype.inRoot=function(t){return t[0].length>1||t[1].length>1},e.prototype.getSectors=function(t){for(var e=t.bottomRight(),o=Math.floor(e.x/3e3),i=Math.floor(e.y/3e3),r=[[],[]],n=Math.floor(t.origin.x/3e3);n<=o;n++)r[0].push(n);for(var s=Math.floor(t.origin.y/3e3);s<=i;s++)r[1].push(s);return r},e}(O),yi=function(t){t.bind("mouseenter",this._mouseenter.bind(this)),t.bind("mouseleave",this._mouseleave.bind(this)),this.element=t.element};yi.prototype.clear=function(){this._resetCursor()},yi.prototype.destroy=function(){this._resetCursor(),delete this.element},yi.prototype._mouseenter=function(t){var e=this._shapeCursor(t);e?(this._current||(this._defaultCursor=this._getCursor()),this._setCursor(e)):this._resetCursor()},yi.prototype._mouseleave=function(){this._resetCursor()},yi.prototype._shapeCursor=function(t){for(var e=t.element;e&&!R(e.options.cursor);)e=e.parent;if(e)return e.options.cursor},yi.prototype._getCursor=function(){if(this.element)return this.element.style.cursor},yi.prototype._setCursor=function(t){this.element&&(this.element.style.cursor=t,this._current=t)},yi.prototype._resetCursor=function(){this._current&&(this._setCursor(this._defaultCursor||""),delete this._current)};var vi=yi,gi={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgrey:"a9a9a9",darkgreen:"006400",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",grey:"808080",green:"008000",greenyellow:"adff2f",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgrey:"d3d3d3",lightgreen:"90ee90",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"778899",lightslategrey:"778899",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"00ff00",limegreen:"32cd32",linen:"faf0e6",magenta:"ff00ff",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370d8",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"d87093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",red:"ff0000",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"ffffff",whitesmoke:"f5f5f5",yellow:"ffff00",yellowgreen:"9acd32"},mi=So.browser,xi=function(t){var e=Object.keys(gi);e.push("transparent");var o=new RegExp("^("+e.join("|")+")(\\W|$)","i");return xi=function(t){return o.exec(t)},o.exec(t)},_i=function(t){function e(){t.call(this)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.toHSV=function(){return this},e.prototype.toRGB=function(){return this},e.prototype.toHex=function(t){return this.toBytes().toHex(t)},e.prototype.toBytes=function(){return this},e.prototype.toCss=function(t){return"#"+this.toHex(t)},e.prototype.toCssRgba=function(){var t=this.toBytes();return"rgba("+t.r+", "+t.g+", "+t.b+", "+parseFloat(Number(this.a).toFixed(3))+")"},e.prototype.toDisplay=function(){return mi.msie&&mi.version<9?this.toCss():this.toCssRgba()},e.prototype.equals=function(t){return t===this||null!==t&&this.toCssRgba()===Ti(t).toCssRgba()},e.prototype.diff=function(t){if(null===t)return NaN;var e=this.toBytes(),o=t.toBytes();return Math.sqrt(Math.pow(.3*(e.r-o.r),2)+Math.pow(.59*(e.g-o.g),2)+Math.pow(.11*(e.b-o.b),2))},e.prototype.clone=function(){var t=this.toBytes();return t===this&&(t=new wi(t.r,t.g,t.b,t.a)),t},e}(O),bi=function(t){function e(e,o,i,r){t.call(this),this.r=e,this.g=o,this.b=i,this.a=r}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.toHSV=function(){var t,e,o=this.r,i=this.g,r=this.b,n=Math.min(o,i,r),s=Math.max(o,i,r),a=s-n,p=s;return 0===a?new ki(0,0,p,this.a):(0!==s?(e=a/s,t=o===s?(i-r)/a:i===s?2+(r-o)/a:4+(o-i)/a,(t*=60)<0&&(t+=360)):(e=0,t=-1),new ki(t,e,p,this.a))},e.prototype.toHSL=function(){var t,e,o=this.r,i=this.g,r=this.b,n=Math.max(o,i,r),s=Math.min(o,i,r),a=(n+s)/2;if(n===s)t=e=0;else{var p=n-s;switch(e=a>.5?p/(2-n-s):p/(n+s),n){case o:t=(i-r)/p+(i<r?6:0);break;case i:t=(r-o)/p+2;break;case r:t=(o-i)/p+4}}return new Si(60*t,100*e,100*a,this.a)},e.prototype.toBytes=function(){return new wi(255*this.r,255*this.g,255*this.b,this.a)},e}(_i),wi=function(t){function e(e,o,i,r){t.call(this,Math.round(e),Math.round(o),Math.round(i),r)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.toRGB=function(){return new t(this.r/255,this.g/255,this.b/255,this.a)},e.prototype.toHSV=function(){return this.toRGB().toHSV()},e.prototype.toHSL=function(){return this.toRGB().toHSL()},e.prototype.toHex=function(t){var e=Ci(this.r,2)+Ci(this.g,2)+Ci(this.b,2);return t&&t.alpha&&(e+=Ci(Math.round(255*this.a),2)),e},e.prototype.toBytes=function(){return this},e}(bi);function Ci(t,e,o){void 0===o&&(o="0");for(var i=t.toString(16);e>i.length;)i=o+i;return i}var ki=function(t){function e(e,o,i,r){t.call(this),this.h=e,this.s=o,this.v=i,this.a=r}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.toRGB=function(){var t,e,o,i=this.h,r=this.s,n=this.v;if(0===r)t=e=o=n;else{i/=60;var s=Math.floor(i),a=i-s,p=n*(1-r),h=n*(1-r*a),c=n*(1-r*(1-a));switch(s){case 0:t=n,e=c,o=p;break;case 1:t=h,e=n,o=p;break;case 2:t=p,e=n,o=c;break;case 3:t=p,e=h,o=n;break;case 4:t=c,e=p,o=n;break;default:t=n,e=p,o=h}}return new bi(t,e,o,this.a)},e.prototype.toHSL=function(){return this.toRGB().toHSL()},e.prototype.toBytes=function(){return this.toRGB().toBytes()},e}(_i),Si=function(t){function e(e,o,i,r){t.call(this),this.h=e,this.s=o,this.l=i,this.a=r}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.toRGB=function(){var t,e,o,i=this.h/360,r=this.s/100,n=this.l/100;if(0===r)t=e=o=n;else{var s=n<.5?n*(1+r):n+r-n*r,a=2*n-s;t=Ai(a,s,i+1/3),e=Ai(a,s,i),o=Ai(a,s,i-1/3)}return new bi(t,e,o,this.a)},e.prototype.toHSV=function(){return this.toRGB().toHSV()},e.prototype.toBytes=function(){return this.toRGB().toBytes()},e}(_i);function Ai(t,e,o){var i=o;return i<0&&(i+=1),i>1&&(i-=1),i<1/6?t+6*(e-t)*i:i<.5?e:i<2/3?t+(e-t)*(2/3-i)*6:t}function Pi(t){return parseFloat(parseFloat(parseInt(t,16)/255).toFixed(3))}function Ti(t,e){var o,i;if(null==t||"none"===t)return null;if(t instanceof _i)return t;var r=t.toLowerCase();if(o=xi(r))return(r="transparent"===o[1]?new bi(1,1,1,0):Ti(gi[o[1]],e)).match=[o[1]],r;if((o=/^#?([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})\b/i.exec(r))?i=new wi(parseInt(o[1],16),parseInt(o[2],16),parseInt(o[3],16),1):(o=/^#?([0-9a-f])([0-9a-f])([0-9a-f])\b/i.exec(r))?i=new wi(parseInt(o[1]+o[1],16),parseInt(o[2]+o[2],16),parseInt(o[3]+o[3],16),1):(o=/^#?([0-9a-f])([0-9a-f])([0-9a-f])([0-9a-f])\b/i.exec(r))?i=new wi(parseInt(o[1]+o[1],16),parseInt(o[2]+o[2],16),parseInt(o[3]+o[3],16),Pi(o[4]+o[4])):(o=/^#?([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})\b/i.exec(r))?i=new wi(parseInt(o[1],16),parseInt(o[2],16),parseInt(o[3],16),Pi(o[4])):(o=/^rgb\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*\)/.exec(r))?i=new wi(parseInt(o[1],10),parseInt(o[2],10),parseInt(o[3],10),1):(o=/^rgba\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9.]+)\s*\)/.exec(r))?i=new wi(parseInt(o[1],10),parseInt(o[2],10),parseInt(o[3],10),parseFloat(o[4])):(o=/^rgb\(\s*([0-9]*\.?[0-9]+)%\s*,\s*([0-9]*\.?[0-9]+)%\s*,\s*([0-9]*\.?[0-9]+)%\s*\)/.exec(r))?i=new bi(parseFloat(o[1])/100,parseFloat(o[2])/100,parseFloat(o[3])/100,1):(o=/^rgba\(\s*([0-9]*\.?[0-9]+)%\s*,\s*([0-9]*\.?[0-9]+)%\s*,\s*([0-9]*\.?[0-9]+)%\s*,\s*([0-9.]+)\s*\)/.exec(r))&&(i=new bi(parseFloat(o[1])/100,parseFloat(o[2])/100,parseFloat(o[3])/100,parseFloat(o[4]))),i)i.match=o;else if(!e)throw new Error("Cannot parse color: "+r);return i}var Mi=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.renderTo=function(t){t.save(),this.setTransform(t),this.setClip(t),this.setOpacity(t),t.beginPath(),this.renderPoints(t,this.srcElement),this.setLineDash(t),this.setLineCap(t),this.setLineJoin(t),this.setFill(t),this.setStroke(t),t.restore()},e.prototype.setFill=function(t){var e=this.srcElement.options.fill,o=!1;return e&&("Gradient"===e.nodeType?(this.setGradientFill(t,e),o=!0):tt(e.color)||(t.fillStyle=e.color,t.save(),this.globalAlpha(t,e.opacity),t.fill(),t.restore(),o=!0)),o},e.prototype.setGradientFill=function(t,e){var o,i=this.srcElement.rawBBox();if(e instanceof Ie){var r=e.start(),n=e.end();o=t.createLinearGradient(r.x,r.y,n.x,n.y)}else if(e instanceof je){var s=e.center();o=t.createRadialGradient(s.x,s.y,0,s.x,s.y,e.radius())}!function(t,e){for(var o=0;o<e.length;o++){var i=e[o],r=Ti(i.color());r.a*=i.opacity(),t.addColorStop(i.offset(),r.toCssRgba())}}(o,e.stops),t.save(),e.userSpace()||t.transform(i.width(),0,0,i.height(),i.origin.x,i.origin.y),t.fillStyle=o,t.fill(),t.restore()},e.prototype.setStroke=function(t){var e=this.srcElement.options.stroke;if(e&&!tt(e.color)&&e.width>0)return t.strokeStyle=e.color,t.lineWidth=J(e.width,1),t.save(),this.globalAlpha(t,e.opacity),t.stroke(),t.restore(),!0},e.prototype.dashType=function(){var t=this.srcElement.options.stroke;if(t&&t.dashType)return t.dashType.toLowerCase()},e.prototype.setLineDash=function(t){var e=this.dashType();if(e&&"solid"!==e){var o=Do[e];t.setLineDash?t.setLineDash(o):(t.mozDash=o,t.webkitLineDash=o)}},e.prototype.setLineCap=function(t){var e=this.dashType(),o=this.srcElement.options.stroke;e&&"solid"!==e?t.lineCap="butt":o&&o.lineCap&&(t.lineCap=o.lineCap)},e.prototype.setLineJoin=function(t){var e=this.srcElement.options.stroke;e&&e.lineJoin&&(t.lineJoin=e.lineJoin)},e.prototype.renderPoints=function(t,e){si(t,e)},e}(ai),Oi=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.renderPoints=function(t){si(t,this.srcElement.toPath())},e}(Mi),Bi=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.renderPoints=function(t){var e=this.srcElement.geometry(),o=e.center,i=e.radius;t.arc(o.x,o.y,i,0,2*Math.PI)},e}(Mi),Ri=function(t){function e(e,o){t.call(this,e),this.onLoad=this.onLoad.bind(this),this.onError=this.onError.bind(this),this.loading=ii();var i=this.img=new Image;o&&!/^data:/i.test(e.src())&&(i.crossOrigin=o),i.src=e.src(),i.complete?this.onLoad():(i.onload=this.onLoad,i.onerror=this.onError)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.renderTo=function(t){"resolved"===this.loading.state()&&(t.save(),this.setTransform(t),this.setClip(t),this.drawImage(t),t.restore())},e.prototype.optionsChange=function(e){"src"===e.field?(this.loading=ii(),this.img.src=this.srcElement.src()):t.prototype.optionsChange.call(this,e)},e.prototype.onLoad=function(){this.loading.resolve(),this.invalidate()},e.prototype.onError=function(){this.loading.reject(new Error("Unable to load image '"+this.img.src+"'. Check for connectivity and verify CORS headers."))},e.prototype.drawImage=function(t){var e=this.srcElement.rect(),o=e.topLeft();t.drawImage(this.img,o.x,o.y,e.width(),e.height())},e}(Mi),Ei=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.renderPoints=function(t){for(var e=this.srcElement.paths,o=0;o<e.length;o++)si(t,e[o])},e}(Mi),zi=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.renderPoints=function(e){var o=this.srcElement.geometry(),i=o.cornerRadius,r=i[0],n=i[1];if(0===r&&0===n){var s=o.origin,a=o.size;e.rect(s.x,s.y,a.width,a.height)}else t.prototype.renderPoints.call(this,e,Zt.fromRect(o))},e}(Mi),Li=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.renderTo=function(t){var e=this.srcElement,o=e.position(),i=e.measure();t.save(),this.setTransform(t),this.setClip(t),this.setOpacity(t),t.beginPath(),t.font=e.options.font,t.textAlign="left",this.setFill(t)&&t.fillText(e.content(),o.x,o.y+i.baseline),this.setStroke(t)&&(this.setLineDash(t),t.strokeText(e.content(),o.x,o.y+i.baseline)),t.restore()},e}(Mi);ni.Arc=Oi,ni.Circle=Bi,ni.Group=pi,ni.Image=Ri,ni.MultiPath=Ei,ni.Path=Mi,ni.Rect=zi,ni.Text=Li;var Ii,ji,Di=function(t){function e(e,o){t.call(this,e,o),this.element.innerHTML=this._template(this);var i=this.element.firstElementChild,r=io(e);i.width=r.width,i.height=r.height,this._rootElement=i,this._root=new ci(i,r),this._mouseTrackHandler=this._trackMouse.bind(this),Io(this.element,{click:this._mouseTrackHandler,mousemove:this._mouseTrackHandler})}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var o={type:{configurable:!0}};return o.type.get=function(){return"canvas"},e.prototype.destroy=function(){t.prototype.destroy.call(this),this._root&&(this._root.destroy(),this._root=null),this._searchTree&&(this._searchTree.clear(),delete this._searchTree),this._cursor&&(this._cursor.destroy(),delete this._cursor),jo(this.element,{click:this._mouseTrackHandler,mousemove:this._mouseTrackHandler})},e.prototype.draw=function(e){t.prototype.draw.call(this,e),this._root.load([e],void 0,this.options.cors),this._searchTree&&this._searchTree.add([e])},e.prototype.clear=function(){t.prototype.clear.call(this),this._root.clear(),this._searchTree&&this._searchTree.clear(),this._cursor&&this._cursor.clear()},e.prototype.eventTarget=function(t){if(this._searchTree){var e=this._surfacePoint(t);return this._searchTree.pointShape(e)}},e.prototype.image=function(){var t=this._root,e=this._rootElement,o=[];t.traverse((function(t){t.loading&&o.push(t.loading)}));var i=ii(),r=function(){t._invalidate({fixedScale:!0});try{var o=e.toDataURL();i.resolve(o)}catch(t){i.reject(t)}};return ri(o).then(r,r),i},e.prototype.suspendTracking=function(){t.prototype.suspendTracking.call(this),this._searchTree&&(this._searchTree.clear(),delete this._searchTree)},e.prototype.resumeTracking=function(){if(t.prototype.resumeTracking.call(this),!this._searchTree){this._searchTree=new fi;for(var e=this._root.childNodes,o=[],i=0;i<e.length;i++)o.push(e[i].srcElement);this._searchTree.add(o)}},e.prototype._resize=function(){this._rootElement.width=this._size.width,this._rootElement.height=this._size.height,this._root.size=this._size,this._root.invalidate()},e.prototype._template=function(){return"<canvas style='width: 100%; height: 100%;'></canvas>"},e.prototype._enableTracking=function(){this._searchTree=new fi,this._cursor=new vi(this),t.prototype._enableTracking.call(this)},e.prototype._trackMouse=function(t){if(!this._suspendedTracking){var e=this.eventTarget(t);if("click"!==t.type){var o=this._currentShape;o&&o!==e&&this.trigger("mouseleave",{element:o,originalEvent:t,type:"mouseleave"}),e&&o!==e&&this.trigger("mouseenter",{element:e,originalEvent:t,type:"mouseenter"}),this.trigger("mousemove",{element:e,originalEvent:t,type:"mousemove"}),this._currentShape=e}else e&&this.trigger("click",{element:e,originalEvent:t,type:"click"})}},Object.defineProperties(e.prototype,o),e}(uo),Vi=function(){return"undefined"!=typeof document},Hi=function(t){function e(){t.call(this),this._items=[{name:"svg",type:oi},{name:"canvas",type:Di}]}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var o={support:{configurable:!0},current:{configurable:!0}};return o.support.get=function(){return ji||(ji={canvas:Vi()&&document.createElement("canvas").getContext,svg:Vi()&&document.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1")}),ji},o.current.get=function(){return Ii||(Ii=new e),Ii},e.prototype.create=function(t,e){var o=this._items,i=o[0];if(e&&e.type)for(var r=e.type.toLowerCase(),n=0;n<o.length;n++)if(o[n].name===r){i=o[n];break}if(i)return new i.type(t,e);fo("Warning: Unable to create Kendo UI Drawing Surface. Possible causes:\n- The browser does not support SVG and Canvas. User agent: "+navigator.userAgent)},Object.defineProperties(e,o),e}(O),Fi=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var o={support:{configurable:!0}};return o.support.get=function(){return Hi.support},e.create=function(t,e){return Hi.current.create(t,e)},Object.defineProperties(e,o),e}(uo);function Ni(t){var e=new Lo({skipBaseHref:!0}),o=t.clippedBBox(),i=t;if(o){var r=o.getOrigin(),n=new ue;n.transform(Q().translate(-r.x,-r.y)),n.children.push(t),i=n}e.load([i]);var s="<?xml version='1.0' ?><svg xmlns='"+xo+"' xmlns:xlink='http://www.w3.org/1999/xlink' version='1.1'>"+e.render()+"</svg>";return e.destroy(),s}var Ui={1:"i",10:"x",100:"c",2:"ii",20:"xx",200:"cc",3:"iii",30:"xxx",300:"ccc",4:"iv",40:"xl",400:"cd",5:"v",50:"l",500:"d",6:"vi",60:"lx",600:"dc",7:"vii",70:"lxx",700:"dcc",8:"viii",80:"lxxx",800:"dccc",9:"ix",90:"xc",900:"cm",1e3:"m"};function Gi(t){for(var e=[1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],o="";t>0;)t<e[0]?e.shift():(o+=Ui[e[0]],t-=e[0]);return o}var Wi=String.fromCharCode;var qi="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function Xi(t){for(var e="",o=0,i=function(t){for(var e="",o=0;o<t.length;o++){var i=t.charCodeAt(o);if(55296<=i&&i<=56319){var r=i,n=t.charCodeAt(++o);isNaN(n)||(i=1024*(r-55296)+(n-56320)+65536)}i<128?e+=Wi(i):i<2048?(e+=Wi(192|i>>>6),e+=Wi(128|63&i)):i<65536?(e+=Wi(224|i>>>12),e+=Wi(128|i>>>6&63),e+=Wi(128|63&i)):i<1114111&&(e+=Wi(240|i>>>18),e+=Wi(128|i>>>12&63),e+=Wi(128|i>>>6&63),e+=Wi(128|63&i))}return e}(t);o<i.length;){var r=i.charCodeAt(o++),n=i.charCodeAt(o++),s=i.charCodeAt(o++),a=r>>2,p=(3&r)<<4|n>>4,h=(15&n)<<2|s>>6,c=63&s;isNaN(n)?h=c=64:isNaN(s)&&(c=64),e=e+qi.charAt(a)+qi.charAt(p)+qi.charAt(h)+qi.charAt(c)}return e}function Yi(t,e){if(t.length<2)return t.slice();return function t(o){if(o.length<=1)return o;var i=Math.floor(o.length/2),r=o.slice(0,i),n=o.slice(i);return function(t,o){for(var i=[],r=0,n=0,s=0;r<t.length&&n<o.length;)e(t[r],o[n])<=0?i[s++]=t[r++]:i[s++]=o[n++];return r<t.length&&i.push.apply(i,t.slice(r)),n<o.length&&i.push.apply(i,o.slice(n)),i}(r=t(r),n=t(n))}(t)}function Zi(t,e){var o={width:"800px",height:"600px",cors:"Anonymous"},i=t,r=t.clippedBBox();if(r){var n=r.getOrigin();(i=new ue).transform(Q().translate(-n.x,-n.y)),i.children.push(t);var s=r.getSize();o.width=s.width+"px",o.height=s.height+"px"}var a=Object.assign(o,e),p=document.createElement("div"),h=p.style;h.display="none",h.width=a.width,h.height=a.height,document.body.appendChild(p);var c=new Di(p,a);c.suspendTracking(),c.draw(i);var l=c.image(),u=function(){c.destroy(),document.body.removeChild(p)};return l.then(u,u),l}function Qi(t,e){var o=Ni(t);return e&&e.raw||(o="data:image/svg+xml;base64,"+Xi(o)),ii().resolve(o)}function Ki(t){var e=.5;t.options.stroke&&a.util.defined(t.options.stroke.width)&&t.options.stroke.width%2==0&&(e=0);for(var o=0;o<t.segments.length;o++)t.segments[o].anchor().round(0).translate(e,e);return t}function $i(t,e){return-t.x*e.y+t.y*e.x<0}function Ji(t){return"number"==typeof t&&!isNaN(t)}function tr(t){return"string"==typeof t}function er(t){return Ji(t)||tr(t)&&isFinite(t)}function or(t){return"function"==typeof t}function ir(t,e){for(var o in e){var i=e[o],r=typeof i,n=void 0;if((n="object"===r&&null!==i?i.constructor:null)&&n!==Array)if(i instanceof Date)t[o]=new Date(i.getTime());else if(or(i.clone))t[o]=i.clone();else{var s=t[o];t[o]="object"==typeof s&&s||{},ir(t[o],i)}else"undefined"!==r&&(t[o]=i)}return t}function rr(t){for(var e=arguments,o=arguments.length,i=1;i<o;i++)ir(t,e[i]);return t}function nr(t){return"object"==typeof t}function sr(t){return Ji(t)?t+"px":t}var ar=/width|height|top|left|bottom|right/i;function pr(t){return ar.test(t)}function hr(t,e){var o=tr(e)?[e]:e;if(A(o)){for(var i={},r=window.getComputedStyle(t),n=0;n<o.length;n++){var s=o[n];i[s]=pr(s)?parseFloat(r[s]):r[s]}return i}if(nr(e))for(var a in e)t.style[a]=sr(e[a])}function cr(t,e){void 0===e&&(e=0);var o={top:0,right:0,bottom:0,left:0};return"number"==typeof t?o.top=o[_]=o[u]=o[g]=t:(o.top=t.top||e,o[_]=t[_]||e,o[u]=t[u]||e,o[g]=t[g]||e),o}var lr={compile:function(t){return t}},ur=function(){};ur.register=function(t){lr=t},ur.compile=function(t){return lr.compile(t)};var dr=ur;function fr(t){var e;return void 0===t&&(t={}),t.template?t.template=e=dr.compile(t.template):or(t.content)&&(e=t.content),e}var yr=/\[(?:(\d+)|['"](.*?)['"])\]|((?:(?!\[.*?\]|\.).)+)/g,vr={};function gr(t){if(vr[t])return vr[t];var e=[];return t.replace(yr,(function(t,o,i,r){e.push(a.util.defined(o)?o:i||r)})),vr[t]=function(t){for(var o=t,i=0;i<e.length&&o;i++)o=o[e[i]];return o},vr[t]}function mr(t,e){for(var o=t.length,i=[],r=0;r<o;r++)e(t[r])&&i.push(t[r]);return i}function xr(t,e){if(t.className)for(var o=e.split(" "),i=0;i<o.length;i++)if(-1!==t.className.indexOf(o[i]))return!0}vr[void 0]=function(t){return t};var _r=function(){this._map={}};_r.prototype.get=function(t){return this._map[this._key(t)]},_r.prototype.set=function(t,e){this._map[this._key(t)]=e},_r.prototype._key=function(t){return t instanceof Date?t.getTime():t};var br=_r;function wr(t,e){if(e)return-1!==e.indexOf(t)}function Cr(t,e,o){return a.util.round(t+(e-t)*o,3)}var kr=function(t,e){this.observer=t,this.handlerMap=rr({},this.handlerMap,e)};kr.prototype.trigger=function(t,e){var o,i=this.observer,r=this.handlerMap;return r[t]?o=this.callObserver(r[t],e):i.trigger&&(o=this.callObserver("trigger",t,e)),o},kr.prototype.callObserver=function(t){for(var e=[],o=arguments.length-1;o-- >0;)e[o]=arguments[o+1];return this.observer[t].apply(this.observer,e)},kr.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};var Sr=kr;function Ar(t,e){for(var o=t.length,i=[],r=0;r<o;r++){var n=e(t[r]);a.util.defined(n)&&i.push(n)}return i}var Pr=So.browser||{};function Tr(t){var e=0;return t.wheelDelta?(e=-t.wheelDelta/120,Pr.webkit&&(e/=2*Math.max(window.devicePixelRatio,.625))):t.detail&&(e=t.detail/3),e=e>0?Math.ceil(e):Math.floor(e)}var Mr=a.util,Or=Mr.append,Br=Mr.bindEvents,Rr=Mr.defined,Er=Mr.deg,zr=Mr.elementOffset,Lr=Mr.elementSize,Ir=Mr.eventCoordinates,jr=Mr.eventElement,Dr=Mr.hashKey,Vr=Mr.last,Hr=Mr.limitValue,Fr=Mr.objectKey,Nr=Mr.rad,Ur=Mr.round,Gr=Mr.unbindEvents,Wr=Mr.valueOrDefault,qr=function(){};qr.fetchFonts=function(t,e,o){void 0===o&&(o={depth:0});!t||o.depth>5||!document.fonts||Object.keys(t).forEach((function(i){var r=t[i];"dataSource"!==i&&"$"!==i[0]&&r&&("font"===i?e.push(r):"object"==typeof r&&(o.depth++,qr.fetchFonts(r,e,o),o.depth--))}))},qr.loadFonts=function(t,e){var o=[];if(t.length>0&&document.fonts){try{o=t.map((function(t){return document.fonts.load(t)}))}catch(t){fo(t)}Promise.all(o).then(e,e)}else e()},qr.preloadFonts=function(t,e){var o=[];qr.fetchFonts(t,o),qr.loadFonts(o,e)};var Xr=qr;function Yr(t,e){var o=t.prototype;o.options?o.options=rr({},o.options,e):o.options=e}function Zr(t){for(var e=m,o=x,i=0,r=t.length;i<r;i++){var n=t[i];null!==n&&isFinite(n)&&(e=Math.min(e,n),o=Math.max(o,n))}return{min:e===m?void 0:e,max:o===x?void 0:o}}function Qr(t,e){for(var o=0;o<t.length;o++){var i=t[o];if(e(i,o,t))return i}}var Kr=p.Matrix,$r=/matrix\((.*)\)/;function Jr(t){var e=getComputedStyle(t).transform;return"none"===e?Kr.unit():function(t){var e=t.match($r);if(null===e||2!==e.length)return Kr.unit();var o=e[1].split(",").map((function(t){return parseFloat(t)}));return new(Function.prototype.bind.apply(Kr,[null].concat(o)))}(e)}function tn(t){if(!t)return Kr.unit();for(var e=Jr(t),o=t.parentElement;o;){var i=Jr(o);e=e.multiplyCopy(i),o=o.parentElement}return e.b=e.c=e.e=e.f=0,e}var en=function(t){function e(o){var i=this;if(t.call(this),1===arguments.length)for(var r=e.formats,n=this.resolveColor(o),s=0;s<r.length;s++){var a=r[s].re,p=r[s].process,h=a.exec(n);if(h){var c=p(h);i.r=c[0],i.g=c[1],i.b=c[2]}}else this.r=arguments[0],this.g=arguments[1],this.b=arguments[2];this.r=this.normalizeByte(this.r),this.g=this.normalizeByte(this.g),this.b=this.normalizeByte(this.b)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.toHex=function(){var t=this.padDigit,e=this.r.toString(16),o=this.g.toString(16),i=this.b.toString(16);return"#"+t(e)+t(o)+t(i)},e.prototype.resolveColor=function(t){var o=t||"black";return"#"===o.charAt(0)&&(o=o.substr(1,6)),o=(o=o.replace(/ /g,"")).toLowerCase(),o=e.namedColors[o]||o},e.prototype.normalizeByte=function(t){return t<0||isNaN(t)?0:t>255?255:t},e.prototype.padDigit=function(t){return 1===t.length?"0"+t:t},e.prototype.brightness=function(t){var e=Math.round;return this.r=e(this.normalizeByte(this.r*t)),this.g=e(this.normalizeByte(this.g*t)),this.b=e(this.normalizeByte(this.b*t)),this},e.prototype.percBrightness=function(){return Math.sqrt(.241*this.r*this.r+.691*this.g*this.g+.068*this.b*this.b)},e.prototype.isDark=function(){return this.percBrightness()<180},e.fromBytes=function(t,e,o,i){return new wi(t,e,o,null!=i?i:1)},e.fromRGB=function(t,e,o,i){return new bi(t,e,o,null!=i?i:1)},e.fromHSV=function(t,e,o,i){return new ki(t,e,o,null!=i?i:1)},e.fromHSL=function(t,e,o,i){return new Si(t,e,o,null!=i?i:1)},e}(O);en.formats=[{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,process:function(t){return[parseInt(t[1],10),parseInt(t[2],10),parseInt(t[3],10)]}},{re:/^(\w{2})(\w{2})(\w{2})$/,process:function(t){return[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]}},{re:/^(\w{1})(\w{1})(\w{1})$/,process:function(t){return[parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),parseInt(t[3]+t[3],16)]}}],en.namedColors=gi;var on=en;var rn=function(t){return new on(t).isDark()?C:l},nn={},sn=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},an={size:{configurable:!0}};sn.prototype.values=function(){return this._values.filter((function(t){return t!==nn}))},sn.prototype.has=function(t){return void 0!==this._index[t]},sn.prototype.add=function(t){this.has(t)||(this._index[t]=this._values.length,this._values.push(t))},sn.prototype.delete=function(t){var e=this._index[t];void 0!==e&&(this._values[e]=nn,delete this._index[t])},sn.prototype.clear=function(){this._index={},this._values=[]},an.size.get=function(){return this._values.length},Object.defineProperties(sn.prototype,an);var pn=function(t){this._set=new Set(t)},hn={size:{configurable:!0}};pn.prototype.values=function(){return Array.from(this._set)},pn.prototype.has=function(t){return this._set.has(t)},pn.prototype.add=function(t){this._set.add(t)},pn.prototype.delete=function(t){this._set.delete(t)},pn.prototype.clear=function(){this._set.clear()},hn.size.get=function(){return this._set.size},Object.defineProperties(pn.prototype,hn);function cn(t){return function(){var t=!1;"function"==typeof Set&&(t=new Set([1]).has(1));return t}()?new pn(t):new sn(t)}function ln(t){throw t}var un={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 dn(t,e){var o=Ur(e-t,9);if(0===o){if(0===e)return.1;o=Math.abs(e)}var i=Math.pow(10,Math.floor(Math.log(o)/Math.log(10))),r=Ur(o/i,10);return Ur(i*(r<1.904762?.2:r<4.761904?.5:r<9.523809?1:2),10)}var fn=function(t){function e(e,o){t.call(this),this.x=e||0,this.y=o||0}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.clone=function(){return new e(this.x,this.y)},e.prototype.equals=function(t){return t&&this.x===t.x&&this.y===t.y},e.prototype.rotate=function(t,e){var o=Nr(e),i=Math.cos(o),r=Math.sin(o),n=t.x,s=t.y,a=this.x,p=this.y;return this.x=Ur(n+(a-n)*i+(p-s)*r,3),this.y=Ur(s+(p-s)*i-(a-n)*r,3),this},e.prototype.multiply=function(t){return this.x*=t,this.y*=t,this},e.prototype.distanceTo=function(t){var e=this.x-t.x,o=this.y-t.y;return Math.sqrt(e*e+o*o)},e.onCircle=function(t,o,i){var r=Nr(o);return new e(t.x-i*Math.cos(r),t.y-i*Math.sin(r))},e}(O);function yn(t,e,o,i,r){var n=Nr(r);return new fn(o+(t-o)*Math.cos(n)+(e-i)*Math.sin(n),i-(t-o)*Math.sin(n)+(e-i)*Math.cos(n))}var vn=function(t){function e(e,o,i,r){t.call(this),this.x1=e||0,this.y1=o||0,this.x2=i||0,this.y2=r||0}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.equals=function(t){return this.x1===t.x1&&this.x2===t.x2&&this.y1===t.y1&&this.y2===t.y2},e.prototype.width=function(){return this.x2-this.x1},e.prototype.height=function(){return this.y2-this.y1},e.prototype.translate=function(t,e){return this.x1+=t,this.x2+=t,this.y1+=e,this.y2+=e,this},e.prototype.move=function(t,e){var o=this.height(),i=this.width();return Rr(t)&&(this.x1=t,this.x2=this.x1+i),Rr(e)&&(this.y1=e,this.y2=this.y1+o),this},e.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},e.prototype.wrapPoint=function(t){var o=A(t),i=o?t[0]:t.x,r=o?t[1]:t.y;return this.wrap(new e(i,r,i,r)),this},e.prototype.snapTo=function(t,e){return e!==k&&e||(this.x1=t.x1,this.x2=t.x2),e!==S&&e||(this.y1=t.y1,this.y2=t.y2),this},e.prototype.alignTo=function(t,e){var o=this.height(),i=this.width(),r=e===b||e===u?S:k,n=r===S?o:i;if(e===d){var s=t.center(),a=this.center();this.x1+=s.x-a.x,this.y1+=s.y-a.y}else this[r+1]=e===b||e===g?t[r+1]-n:t[r+2];return this.x2=this.x1+i,this.y2=this.y1+o,this},e.prototype.shrink=function(t,e){return this.x2-=t,this.y2-=e,this},e.prototype.expand=function(t,e){return this.shrink(-t,-e),this},e.prototype.pad=function(t){var e=cr(t);return this.x1-=e.left,this.x2+=e.right,this.y1-=e.top,this.y2+=e.bottom,this},e.prototype.unpad=function(t){var e=cr(t);return e.left=-e.left,e.top=-e.top,e.right=-e.right,e.bottom=-e.bottom,this.pad(e)},e.prototype.clone=function(){return new e(this.x1,this.y1,this.x2,this.y2)},e.prototype.center=function(){return new fn(this.x1+this.width()/2,this.y1+this.height()/2)},e.prototype.containsPoint=function(t){return t.x>=this.x1&&t.x<=this.x2&&t.y>=this.y1&&t.y<=this.y2},e.prototype.points=function(){return[new fn(this.x1,this.y1),new fn(this.x2,this.y1),new fn(this.x2,this.y2),new fn(this.x1,this.y2)]},e.prototype.getHash=function(){return[this.x1,this.y1,this.x2,this.y2].join(",")},e.prototype.overlaps=function(t){return!(t.y2<this.y1||this.y2<t.y1||t.x2<this.x1||this.x2<t.x1)},e.prototype.rotate=function(t){var e=this.width(),o=this.height(),i=this.center(),r=i.x,n=i.y,s=yn(0,0,r,n,t),a=yn(e,0,r,n,t),p=yn(e,o,r,n,t),h=yn(0,o,r,n,t);return e=Math.max(s.x,a.x,p.x,h.x)-Math.min(s.x,a.x,p.x,h.x),o=Math.max(s.y,a.y,p.y,h.y)-Math.min(s.y,a.y,p.y,h.y),this.x2=this.x1+e,this.y2=this.y1+o,this},e.prototype.toRect=function(){return new p.Rect([this.x1,this.y1],[this.width(),this.height()])},e.prototype.hasSize=function(){return 0!==this.width()&&0!==this.height()},e.prototype.align=function(t,e,o){var i=e+1,r=e+2,n=e===k?"width":"height",s=this[n]();wr(o,[g,b])?(this[i]=t[i],this[r]=this[i]+s):wr(o,[_,u])?(this[r]=t[r],this[i]=this[r]-s):o===d&&(this[i]=t[i]+(t[n]()-s)/2,this[r]=this[i]+s)},e}(O);function gn(t,e){return t-e}var mn=function(t){function e(e,o,i,r,n){t.call(this),this.center=e,this.innerRadius=o,this.radius=i,this.startAngle=r,this.angle=n}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.clone=function(){return new e(this.center,this.innerRadius,this.radius,this.startAngle,this.angle)},e.prototype.middle=function(){return this.startAngle+this.angle/2},e.prototype.setRadius=function(t,e){return e?this.innerRadius=t:this.radius=t,this},e.prototype.point=function(t,e){var o=Nr(t),i=Math.cos(o),r=Math.sin(o),n=e?this.innerRadius:this.radius,s=Ur(this.center.x-i*n,3),a=Ur(this.center.y-r*n,3);return new fn(s,a)},e.prototype.adjacentBox=function(t,e,o){var i=this.clone().expand(t),r=i.middle(),n=i.point(r),s=e/2,a=o/2,p=Math.sin(Nr(r)),h=Math.cos(Nr(r)),c=n.x-s,l=n.y-a;return Math.abs(p)<.9&&(c+=s*-h/Math.abs(h)),Math.abs(h)<.9&&(l+=a*-p/Math.abs(p)),new vn(c,l,c+e,l+o)},e.prototype.containsPoint=function(t){var e=this.center,o=this.innerRadius,i=this.radius,r=this.startAngle,n=this.startAngle+this.angle,s=t.x-e.x,a=t.y-e.y,p=new fn(s,a),h=this.point(r),c=new fn(h.x-e.x,h.y-e.y),l=this.point(n),u=new fn(l.x-e.x,l.y-e.y),d=Ur(s*s+a*a,3);return(c.equals(p)||$i(c,p))&&!$i(u,p)&&d>=o*o&&d<=i*i},e.prototype.getBBox=function(){var t,e=new vn(m,m,x,x),o=Ur(this.startAngle%360),i=Ur((o+this.angle)%360),r=this.innerRadius,n=[0,90,180,270,o,i].sort(gn),s=n.indexOf(o),a=n.indexOf(i);t=o===i?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 h=this.point(t[p]);e.wrapPoint(h),e.wrapPoint(h,r)}return r||e.wrapPoint(this.center),e},e.prototype.expand=function(t){return this.radius+=t,this},e}(O),xn=function(t){function e(e,o,i,r){t.call(this,e,0,o,i,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}(mn),_n=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.createRing=function(t,e){var o=t.startAngle+180,i=t.angle+o;t.angle>0&&o===i&&(i+=.001);var r=new p.Point(t.center.x,t.center.y),n=Math.max(t.radius,0),s=Math.max(t.innerRadius,0),h=new p.Arc(r,{startAngle:o,endAngle:i,radiusX:n,radiusY:n}),c=a.Path.fromArc(h,e).close();if(s){h.radiusX=h.radiusY=s;var l=h.pointAt(i);c.lineTo(l.x,l.y),c.arc(i,o,s,s,!0)}else c.lineTo(r.x,r.y);return c},e}(O);_n.current=new _n;var bn=_n,wn=function(t){function e(e){t.call(this),this.children=[],this.options=rr({},this.options,this.initUserOptions(e))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initUserOptions=function(t){return t},e.prototype.reflow=function(t){for(var e,o=this.children,i=0;i<o.length;i++){var r=o[i];r.reflow(t),e=e?e.wrap(r.box):r.box.clone()}this.box=e||t},e.prototype.destroy=function(){var t=this.children;this.animation&&this.animation.destroy();for(var e=0;e<t.length;e++)t[e].destroy()},e.prototype.getRoot=function(){var t=this.parent;return t?t.getRoot():null},e.prototype.getSender=function(){var t=this.getService();if(t)return t.sender},e.prototype.getService=function(){for(var t=this;t;){if(t.chartService)return t.chartService;t=t.parent}},e.prototype.translateChildren=function(t,e){for(var o=this.children,i=o.length,r=0;r<i;r++)o[r].box.translate(t,e)},e.prototype.append=function(){for(var t=arguments,e=0;e<arguments.length;e++){var o=t[e];this.children.push(o),o.parent=this}},e.prototype.renderVisual=function(){!1!==this.options.visible&&(this.createVisual(),this.addVisual(),this.renderChildren(),this.createAnimation(),this.renderComplete())},e.prototype.addVisual=function(){this.visual&&(this.visual.chartElement=this,this.parent&&this.parent.appendVisual(this.visual))},e.prototype.renderChildren=function(){for(var t=this.children,e=t.length,o=0;o<e;o++)t[o].renderVisual()},e.prototype.createVisual=function(){this.visual=new a.Group({zIndex:this.options.zIndex,visible:Wr(this.options.visible,!0)})},e.prototype.createAnimation=function(){this.visual&&this.options.animation&&(this.animation=a.Animation.create(this.visual,this.options.animation))},e.prototype.appendVisual=function(t){t.chartElement||(t.chartElement=this),t.options.noclip?this.clipRoot().visual.append(t):Rr(t.options.zIndex)?this.stackRoot().stackVisual(t):this.isStackRoot?this.stackVisual(t):this.visual?this.visual.append(t):this.parent.appendVisual(t)},e.prototype.clipRoot=function(){return this.parent?this.parent.clipRoot():this},e.prototype.stackRoot=function(){return this.parent?this.parent.stackRoot():this},e.prototype.stackVisual=function(t){var e,o=t.options.zIndex||0,i=this.visual.children,r=i.length;for(e=0;e<r;e++){var n=i[e];if(Wr(n.options.zIndex,0)>o)break}this.visual.insert(e,t)},e.prototype.traverse=function(t){for(var e=this.children,o=e.length,i=0;i<o;i++){var r=e[i];t(r),r.traverse&&r.traverse(t)}},e.prototype.closest=function(t){for(var e=this,o=!1;e&&!o;)(o=t(e))||(e=e.parent);if(o)return e},e.prototype.renderComplete=function(){},e.prototype.hasHighlight=function(){var t=(this.options||{}).highlight;return!(!this.createHighlight||t&&!1===t.visible)},e.prototype.toggleHighlight=function(t,e){var o=this,i=(this.options||{}).highlight||{},r=i.visual,n=this._highlight;if(!n){var s={fill:{color:C,opacity:e||.2},stroke:{color:C,width:1,opacity:e||.2}};if(r){if(!(n=this._highlight=r(Object.assign(this.highlightVisualArgs(),{createVisual:function(){return o.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);Rr(n.options.zIndex)||(n.options.zIndex=Wr(i.zIndex,this.options.zIndex)),this.appendVisual(n)}n.visible(t)},e.prototype.createGradientOverlay=function(t,e,o){var i=new a.Path(Object.assign({stroke:{color:"none"},fill:this.createGradient(o),closed:t.options.closed},e));return i.segments.elements(t.segments.elements()),i},e.prototype.createGradient=function(t){if(this.parent)return this.parent.createGradient(t)},e.prototype.supportsPointInactiveOpacity=function(){return!0},e}(O);wn.prototype.options={};var Cn=wn,kn=function(t){function e(e){t.call(this,e),this.options.margin=cr(this.options.margin),this.options.padding=cr(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 o,i=this,r=this.options,n=r.width,s=r.height,a=r.shrinkToFit,p=n&&s,h=r.margin,c=r.padding,l=r.border.width,u=function(){i.align(e,k,r.align),i.align(e,S,r.vAlign),i.paddingBox=o.clone().unpad(h).unpad(l)},d=e.clone();p&&(d.x2=d.x1+n,d.y2=d.y1+s),a&&d.unpad(h).unpad(l).unpad(c),t.prototype.reflow.call(this,d),o=p?this.box=new vn(0,0,n,s):this.box,a&&p?(u(),d=this.contentBox=this.paddingBox.clone().unpad(c)):(d=this.contentBox=o.clone(),o.pad(c).pad(l).pad(h),u()),this.translateChildren(o.x1-d.x1+h.left+l+c.left,o.y1-d.y1+h.top+l+c.top);for(var f=this.children,y=0;y<f.length;y++){var v=f[y];v.reflow(v.box)}},e.prototype.align=function(t,e,o){this.box.align(t,e,o)},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(a.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:Wr(e.opacity,t.opacity),dashType:e.dashType},fill:{color:t.background,opacity:t.opacity},cursor:t.cursor}},e}(Cn);Yr(kn,{align:g,vAlign:b,margin:{},padding:{},border:{color:l,width:0},background:"",shrinkToFit:!1,width:0,height:0,visible:!0});var Sn=kn,An=function(t){function e(e,o){t.call(this,e),this.pointData=o}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,o=t.type,i=t.rotation,r=e.center(),n=e.width()/2,s=e.height()/2;if(!t.visible||!this.hasBox())return null;var h,c=this.visualStyle();if(o===f)h=new a.Circle(new p.Circle([Ur(e.x1+n,3),Ur(e.y1+s,3)],Math.min(n,s)),c);else if("triangle"===o)h=a.Path.fromPoints([[e.x1+n,e.y1],[e.x1,e.y2],[e.x2,e.y2]],c).close();else if("cross"===o)(h=new a.MultiPath(c)).moveTo(e.x1,e.y1).lineTo(e.x2,e.y2),h.moveTo(e.x1,e.y2).lineTo(e.x2,e.y1);else{var l=e.toRect();if("roundedRect"===o){var u=Wr(t.borderRadius,l.width()/5);l.setCornerRadius(u)}h=a.Path.fromRect(l,c)}return i&&h.transform(p.transform().rotate(-i,[r.x,r.y])),h.options.zIndex=t.zIndex,h},e.prototype.createElement=function(){var t=this,e=this.options.visual,o=this.pointData||{};return e?e({value:o.value,dataItem:o.dataItem,sender:this.getSender(),series:o.series,category:o.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()},e}(Sn);Yr(An,{type:f,align:d,vAlign:d});var Pn=An,Tn={glass:{type:"linear",rotation:0,stops:[{offset:0,color:C,opacity:0},{offset:.25,color:C,opacity:.3},{offset:1,color:C,opacity:0}]},sharpBevel:{type:"radial",stops:[{offset:0,color:C,opacity:.55},{offset:.65,color:C,opacity:0},{offset:.95,color:C,opacity:.25}]},roundedBevel:{type:"radial",stops:[{offset:.33,color:C,opacity:.06},{offset:.83,color:C,opacity:.2},{offset:.95,color:C,opacity:0}]},roundedGlass:{type:"radial",supportVML:!1,stops:[{offset:0,color:C,opacity:0},{offset:.5,color:C,opacity:.3},{offset:.99,color:C,opacity:0}]},sharpGlass:{type:"radial",supportVML:!1,stops:[{offset:0,color:C,opacity:.2},{offset:.15,color:C,opacity:.15},{offset:.17,color:C,opacity:.35},{offset:.85,color:C,opacity:.05},{offset:.87,color:C,opacity:.15},{offset:.99,color:C,opacity:0}]},bubbleShadow:{type:"radial",center:[.5,.5],radius:.5}};function Mn(t,e){if(t.x1===e.x1&&t.y1===e.y1&&t.x2===e.x2&&t.y2===e.y2)return e;var o=Math.min(t.x1,e.x1),i=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),h=Math.max(t.y2,e.y2),c=[];return c[0]=new vn(i,s,r,a),c[1]=new vn(o,a,i,p),c[2]=new vn(r,a,n,p),c[3]=new vn(i,p,r,h),t.x1===o&&t.y1===s||e.x1===o&&e.y1===s?(c[4]=new vn(o,s,i,a),c[5]=new vn(r,p,n,h)):(c[4]=new vn(r,s,n,a),c[5]=new vn(o,p,i,h)),mr(c,(function(t){return t.height()>0&&t.width()>0}))[0]}var On=function(t){function e(e){t.call(this,e);var o=this.options;o.width=parseInt(o.width,10),o.height=parseInt(o.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,o=new vn(0,0,t.width,t.height);this.box=o.unpad(t.margin);for(var i=0;i<e.length;i++)e[i].reflow(o),o=Mn(o,e[i].box)||new vn},e.prototype.createVisual=function(){this.visual=new a.Group,this.createBackground()},e.prototype.createBackground=function(){var t=this.options,e=t.border||{},o=this.box.clone().pad(t.margin).unpad(e.width),i=a.Path.fromRect(o.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(i)},e.prototype.getRoot=function(){return this},e.prototype.createGradient=function(t){var e,o=this.gradients,i=Fr(t),r=Tn[t.gradient];if(o[i])e=o[i];else{var n=Object.assign({},r,t);"linear"===r.type?e=new a.LinearGradient(n):(t.innerRadius&&(n.stops=function(t){for(var e=t.stops,o=t.innerRadius/t.radius*100,i=e.length,r=[],n=0;n<i;n++){var s=Object.assign({},e[n]);s.offset=(s.offset*(100-o)+o)/100,r.push(s)}return r}(n)),(e=new a.RadialGradient(n)).supportVML=!1!==r.supportVML),o[i]=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 vn(0,0,t.width,t.height)},e}(Cn);Yr(On,{width:600,height:400,background:C,border:{color:l,width:0},margin:cr(5),zIndex:-2});var Bn=On,Rn=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=k,this.elementAxis=S,this.groupSizeField="width",this.elementSizeField="height",this.groupSpacing=t.spacing,this.elementSpacing=t.vSpacing):(this.groupAxis=S,this.elementAxis=k,this.groupSizeField="height",this.elementSizeField="width",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.box,e=this.elementAxis,o=this.groupAxis,i=this.elementSizeField,r=this.groupSizeField,n=this.groupOptions(),s=n.groups,a=n.groupsSize,p=n.maxGroupElementsSize,h=s.length,c=t[o+1]+this.alignStart(a,t[r]());if(h){for(var l=c,u=0;u<h;u++){for(var d=s[u],f=d.groupElements,y=t[e+1],v=f.length,g=0;g<v;g++){var m=f[g],x=this.elementSize(m),_=l+this.alignStart(x[r],d.groupSize),b=new vn;b[o+1]=_,b[o+2]=_+x[r],b[e+1]=y,b[e+2]=y+x[i],m.reflow(b),y+=x[i]+this.elementSpacing}l+=d.groupSize+this.groupSpacing}t[o+1]=c,t[o+2]=c+a,t[e+2]=t[e+1]+p}},e.prototype.alignStart=function(t,e){var o=0,i=this.options.align;return i===_||i===u?o=e-t:i===d&&(o=(e-t)/2),o},e.prototype.groupOptions=function(){for(var t=this.box,e=this.children,o=this.elementSizeField,i=this.groupSizeField,r=this.elementSpacing,n=this.groupSpacing,s=Ur(t[o]()),a=e.length,p=[],h=0,c=0,l=0,u=0,d=[],f=0;f<a;f++){var y=e[f];y.box||y.reflow(t);var v=this.elementSize(y);this.options.wrap&&Ur(c+r+v[o])>s&&(p.push({groupElements:d,groupSize:h,groupElementsSize:c}),u=Math.max(u,c),l+=n+h,h=0,c=0,d=[]),h=Math.max(h,v[i]),c>0&&(c+=r),c+=v[o],d.push(y)}return p.push({groupElements:d,groupSize:h,groupElementsSize:c}),{groups:p,groupsSize:l+=h,maxGroupElementsSize:u=Math.max(u,c)}},e.prototype.elementSize=function(t){return{width:t.box.width(),height:t.box.height()}},e.prototype.createVisual=function(){},e}(Cn);Yr(Rn,{vertical:!0,wrap:!0,vSpacing:0,spacing:0});var En=Rn,zn=a.Text,Ln=function(t){function e(e,o){t.call(this,o),this.content=e,this.reflow(new vn)}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,o=e.size=a.util.measureText(this.content,{font:e.font});this.baseline=o.baseline,this.box=new vn(t.x1,t.y1,t.x1+o.width,t.y1+o.height)},e.prototype.createVisual=function(){var t=this.options,e=t.font,o=t.color,i=t.opacity,r=t.cursor;this.visual=new zn(this.content,this.box.toRect().topLeft(),{font:e,fill:{color:o,opacity:i},cursor:r})},e}(Cn);Yr(Ln,{font:"12px sans-serif",color:l});var In=Ln;function jn(t){var e=t.origin,o=t.bottomRight();return new vn(e.x,e.y,o.x,o.y)}var Dn=/\n/m,Vn=function(t){function e(e,o,i){t.call(this,o),this.content=e,this.data=i,this._initContainer(),!1!==this.options._autoReflow&&this.reflow(new vn)}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(Dn),o=new En({vertical:!0,align:t.align,wrap:!1}),i=rr({},t,{opacity:1,animation:null});this.container=o,this.append(o);for(var r=0;r<e.length;r++){var n=new In(e[r].trim(),i);o.append(n)}},e.prototype.reflow=function(e){var o=this.options,i=o.visual;if(this.container.options.align=o.align,i&&!this._boxReflow){var r=e;r.hasSize()||(this._boxReflow=!0,this.reflow(r),this._boxReflow=!1,r=this.box);var n=this.visual=i(this.visualContext(r));n&&(r=jn(n.clippedBBox()||new p.Rect),n.options.zIndex=o.zIndex),this.box=this.contentBox=this.paddingBox=r}else if(t.prototype.reflow.call(this,e),o.rotation){var s=cr(o.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 a.Group({transform:this.rotationTransform(),zIndex:t.zIndex,noclip:t.noclip}),this.hasBox()){var e=a.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&&!Rr(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,o={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(o,this.data),o},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,k,t.align),this.align(this.targetBox,S,t.vAlign),this.box},e.prototype.rotationTransform=function(){var t=this.options.rotation;if(!t)return null;var e=this.normalBox.center(),o=e.x,i=e.y,r=this.rotatedBox.center();return p.transform().translate(r.x-o,r.y-i).rotate(t,[o,i])},e}(Sn),Hn=function(t){function e(e){t.call(this,e),this.append(new Vn(this.options.text,Object.assign({},this.options,{vAlign:this.options.position})))}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,k)},e.buildTitle=function(t,o,i){var r,n=t;return"string"==typeof t&&(n={text:t}),(n=Object.assign({visible:!0},i,n))&&n.visible&&n.text&&(r=new e(n),o.append(r)),r},e}(Cn);Yr(Hn,{color:l,position:b,align:d,margin:cr(5),padding:cr(5)});var Fn=Hn,Nn=function(t){function e(e,o,i,r,n){t.call(this,o,n),this.text=o,this.value=e,this.index=i,this.dataItem=r,this.reflow(new vn)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.visualContext=function(e){var o=t.prototype.visualContext.call(this,e);return o.value=this.value,o.dataItem=this.dataItem,o.format=this.options.format,o.culture=this.options.culture,o},e.prototype.click=function(t,e){t.trigger("axisLabelClick",{element:jr(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!==d){var e=this.normalBox.toRect(),o=this.rotationTransform();this.box=jn(e.bbox(o.matrix()))}else t.prototype.rotate.call(this);return this.box},e.prototype.rotationTransform=function(){var e=this.options,o=e.rotation;if(!o)return null;if(e.alignRotation===d)return t.prototype.rotationTransform.call(this);var i=p.transform().rotate(o).matrix(),r=this.normalBox.toRect(),n=this.targetBox.toRect(),s=e.rotationOrigin||b,a=s===b||s===u?k:S,h=s===b||s===u?S:k,c=s===b||s===g?n.origin:n.bottomRight(),l=r.topLeft().transformCopy(i),f=r.topRight().transformCopy(i),y=r.bottomRight().transformCopy(i),v=r.bottomLeft().transformCopy(i),m=p.Rect.fromPoints(l,f,y,v),x={};x[h]=n.origin[h]-m.origin[h];var _,w,C=Math.abs(l[h]+x[h]-c[h]),A=Math.abs(f[h]+x[h]-c[h]);Ur(C,10)===Ur(A,10)?(_=l,w=f):A<C?(_=f,w=y):(_=l,w=v);var P=_[a]+(w[a]-_[a])/2;return x[a]=n.center()[a]-P,p.transform().translate(x.x,x.y).rotate(o)},e}(Vn);Yr(Nn,{_autoReflow:!1});var Un=Nn,Gn=function(t){function e(e,o,i){t.call(this,o),this.fields=e,this.chartService=i,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 o,i,r=e.label,n=e.icon,s=new vn,a=function(){return t},p=n.size,h=this.fields.text;if(Rr(r)&&r.visible){var c=fr(r);c?h=c(this.fields):r.format&&(h=this.chartService.format.auto(r.format,h)),r.color||(r.color="inside"===r.position?"#fff":n.background),this.label=new Vn(h,rr({},r)),this.label.aliasFor=a,"inside"!==r.position||Rr(p)||(n.type===f?p=Math.max(this.label.box.width(),this.label.box.height()):(o=this.label.box.width(),i=this.label.box.height()),s.wrap(this.label.box))}n.width=o||p||7,n.height=i||p||7;var l=new Pn(rr({},n));l.aliasFor=a,this.marker=l,this.append(l),this.label&&this.append(this.label),l.reflow(new vn),this.wrapperBox=s.wrap(l.box)}},e.prototype.reflow=function(t){var e,o,i,r=this.options,n=this.label,s=this.marker,a=this.wrapperBox,p=t.center(),h=r.line.length,c=r.position;r.visible&&(wr(c,[g,_])?c===g?(i=a.alignTo(t,c).translate(-h,t.center().y-a.center().y),r.line.visible&&(e=[t.x1,p.y],this.linePoints=[e,[i.x2,p.y]],o=i.clone().wrapPoint(e))):(i=a.alignTo(t,c).translate(h,t.center().y-a.center().y),r.line.visible&&(e=[t.x2,p.y],this.linePoints=[e,[i.x1,p.y]],o=i.clone().wrapPoint(e))):c===u?(i=a.alignTo(t,c).translate(t.center().x-a.center().x,h),r.line.visible&&(e=[p.x,t.y2],this.linePoints=[e,[p.x,i.y1]],o=i.clone().wrapPoint(e))):(i=a.alignTo(t,c).translate(t.center().x-a.center().x,-h),r.line.visible&&(e=[p.x,t.y1],this.linePoints=[e,[p.x,i.y2]],o=i.clone().wrapPoint(e))),s&&s.reflow(i),n&&(n.reflow(i),s&&("outside"===r.label.position&&n.box.alignTo(s.box,c),n.reflow(n.box))),this.contentBox=i,this.targetBox=t,this.box=o||i)},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,o=this.options,i=o.visual;o.visible&&i?(this.visual=i(Object.assign(this.fields,{sender:this.getSender(),rect:this.targetBox.toRect(),options:{background:o.background,border:o.background,icon:o.icon,label:o.label,line:o.line,position:o.position,visible:o.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=a.Path.fromPoints(this.linePoints,{stroke:{color:t.color,width:t.width,dashType:t.dashType}});Ki(e),this.visual.append(e)}},e.prototype.click=function(t,e){var o=this.eventArgs(e);t.trigger("noteClick",o)||e.preventDefault()},e.prototype.over=function(t,e){var o=this.eventArgs(e);t.trigger("noteHover",o)||e.preventDefault()},e.prototype.out=function(t,e){var o=this.eventArgs(e);t.trigger("noteLeave",o)},e.prototype.eventArgs=function(t){var e=this.options;return Object.assign(this.fields,{element:jr(t),text:Rr(e.label)?e.label.text:"",visual:this.visual})},e}(Sn);Yr(Gn,{icon:{visible:!0,type:f},label:{position:"inside",visible:!0,align:d,vAlign:d},line:{visible:!0},visible:!0,position:b,zIndex:2});var Wn=Gn,qn={format:function(t,e){return e},toString:function(t){return t},parseDate:function(t){return new Date(t)},firstDay:function(){return 0}},Xn=function(){},Yn={implementation:{configurable:!0}};Xn.register=function(t){qn=t},Yn.implementation.get=function(){return qn},Object.defineProperties(Xn,Yn);var Zn=Xn,Qn=/\{(\d+)(:[^\}]+)?\}/g,Kn=function(t){this._intlService=t},$n={intl:{configurable:!0}};$n.intl.get=function(){return this._intlService||Zn.implementation},$n.intl.set=function(t){this._intlService=t},Kn.prototype.auto=function(t){for(var e=[],o=arguments.length-1;o-- >0;)e[o]=arguments[o+1];var i=this.intl;return tr(t)&&t.match(v)?i.format.apply(i,[t].concat(e)):i.toString(e[0],t)},Kn.prototype.localeAuto=function(t,e,o){var i=this.intl;return tr(t)&&t.match(v)?t.replace(Qn,(function(t,r,n){var s=e[parseInt(r,10)];return i.toString(s,n?n.substring(1):"",o)})):i.toString(e[0],t,o)},Object.defineProperties(Kn.prototype,$n);var Jn=Kn,ts=function(t,e){void 0===e&&(e={}),this._intlService=e.intlService,this.sender=e.sender||t,this.format=new Jn(e.intlService),this.chart=t,this.rtl=Boolean(e.rtl)},es={intl:{configurable:!0}};es.intl.get=function(){return this._intlService||Zn.implementation},es.intl.set=function(t){this._intlService=t,this.format.intl=t},ts.prototype.notify=function(t,e){this.chart&&this.chart.trigger(t,e)},ts.prototype.isPannable=function(t){var e=((this.chart||{}).options||{}).pannable;return e&&e.lock!==t},Object.defineProperties(ts.prototype,es);var os,is=ts,rs=function(){};rs.register=function(t){os=t},rs.create=function(t,e){if(os)return os.create(t,e)};var ns=rs;function ss(t,e){var o=t.tickX,i=t.tickY,r=t.position,n=new a.Path({stroke:{width:e.width,color:e.color}});return t.vertical?n.moveTo(o,r).lineTo(o+e.size,r):n.moveTo(r,i).lineTo(r,i+e.size),Ki(n),n}function as(t,e){var o=t.lineStart,i=t.lineEnd,r=t.position,n=new a.Path({stroke:{width:e.width,color:e.color,dashType:e.dashType}});return t.vertical?n.moveTo(o,r).lineTo(i,r):n.moveTo(r,o).lineTo(r,i),Ki(n),n}var ps=function(t){function e(e,o){void 0===o&&(o=new is),t.call(this,e),this.chartService=o,this.options.visible||(this.options=rr({},this.options,{labels:{visible:!1},line:{visible:!1},margin:0,majorTickSize:0,minorTickSize:0})),this.options.minorTicks=rr({},{color:this.options.line.color,width:this.options.line.width,visible:"none"!==this.options.minorTickType},this.options.minorTicks,{size:this.options.minorTickSize,align:this.options.minorTickType}),this.options.majorTicks=rr({},{color:this.options.line.color,width:this.options.line.width,visible:"none"!==this.options.majorTickType},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;nr(e)&&(t.alignRotation=e.align,t.rotation=e.angle)},e.prototype.createLabels=function(){var t=this.options,e=t.vertical?_:d,o=rr({},t.labels,{align:e,zIndex:t.zIndex}),i=Math.max(1,o.step);if(this.clearLabels(),o.visible){this.normalizeLabelRotation(o),"auto"===o.rotation&&(o.rotation=0,t.autoRotateLabels=!0);for(var r=this.labelsRange(),n=r.min;n<r.max;n+=i){var s={index:n,count:r.max},a=this.createAxisLabel(n,o,s);a&&(this.append(a),this.labels.push(a))}}},e.prototype.clearLabels=function(){this.children=mr(this.children,(function(t){return!(t instanceof Un)})),this.labels=[]},e.prototype.clearTitle=function(){var t=this;this.title&&(this.children=mr(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,o=t.vertical,i=t.labels.mirror,r=i?e.x1:e.x2,n=i?e.y2:e.y1,s=t.line.width||0;return o?new vn(r,e.y1,r,e.y2-s):new vn(e.x1,n,e.x2-s,n)},e.prototype.createTitle=function(){var t=this.options,e=rr({rotation:t.vertical?-90:0,text:"",zIndex:1,visualSize:!0},t.title);if(e.visible&&e.text){var o=new Vn(e.text,e);this.append(o),this.title=o}},e.prototype.createNotes=function(){var t=this.options,e=t.notes,o=e.data||[];this.notes=[];for(var i=0;i<o.length;i++){var r=rr({},e,o[i]);r.value=this.parseNoteValue(r.value);var n=new Wn({value:r.value,text:r.label.text,dataItem:r},r,this.chartService);n.options.visible&&(Rr(n.options.position)?t.vertical&&!wr(n.options.position,[g,_])?n.options.position=t.reverse?g:_:t.vertical||wr(n.options.position,[b,u])||(n.options.position=t.reverse?u:b):t.vertical?n.options.position=t.reverse?g:_:n.options.position=t.reverse?u:b,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 a.Group({zIndex:-2}),this.appendVisual(this._gridLines)),t},e.prototype.createTicks=function(t){var e=this.options,o=this.lineBox(),i=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 h=r.skip;h<a;h+=p)Rr(s)&&h%s==0||(n.tickX=i?o.x2:o.x2-r.size,n.tickY=i?o.y1-r.size:o.y1,n.position=e[h],t.append(ss(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,o=this.lineBox();if(e.width>0&&e.visible){var i=new a.Path({stroke:{width:e.width,color:e.color,dashType:e.dashType}});i.moveTo(o.x1,o.y1).lineTo(o.x2,o.y2),t._alignLines&&Ki(i);var r=this._lineGroup=new a.Group;r.append(i),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,o=t.background;o&&(this._backgroundPath=a.Path.fromRect(e.toRect(),{fill:{color:o},stroke:null}),this.visual.append(this._backgroundPath))},e.prototype.createPlotBands=function(){var t=this,e=this.options,o=e.plotBands||[],i=e.vertical,r=this.plotArea;if(0!==o.length){for(var n=this._plotbandGroup=new a.Group({zIndex:-1}),s=mr(this.pane.axes,(function(e){return e.options.vertical!==t.options.vertical}))[0],h=0;h<o.length;h++){var c=o[h],l=void 0,u=void 0,d=c.label,f=void 0;if(i?(l=(s||r.axisX).lineBox(),u=this.getSlot(c.from,c.to,!0)):(l=this.getSlot(c.from,c.to,!0),u=(s||r.axisY).lineBox()),d&&(d.vAlign=d.position||g,f=this.createPlotBandLabel(d,c,new vn(l.x1,u.y1,l.x2,u.y2))),0!==l.width()&&0!==u.height()){var y=new p.Rect([l.x1,u.y1],[l.width(),u.height()]),v=a.Path.fromRect(y,{fill:{color:c.color,opacity:c.opacity},stroke:null});n.append(v),f&&n.append(f)}}this.appendVisual(n)}},e.prototype.createPlotBandLabel=function(t,e,o){if(!1===t.visible)return null;var i,r=t.text;if(Rr(t)&&t.visible){var n=fr(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(i=new Vn(r,t)).reflow(o),i.renderVisual(),i.visual},e.prototype.createGridLines=function(t){var e=this.options,o=e.minorGridLines,i=e.majorGridLines,r=e.minorUnit,n=e.vertical,s=t.options.line.visible,a=i.visible?e.majorUnit:0,p=t.lineBox(),h=p[n?"y1":"x1"],c={lineStart:p[n?"x1":"y1"],lineEnd:p[n?"x2":"y2"],vertical:n},l=[],u=this.gridLinesVisual();function d(t,e,o){var i=t.length,r=Math.max(1,e.step);if(e.visible)for(var n=e.skip;n<i;n+=r){var a=Ur(t[n]);wr(a,l)||n%o==0||s&&h===a||(c.position=a,u.append(as(c,e)),l.push(a))}}return d(this.getMajorTickPositions(),i),d(this.getMinorTickPositions(),o,a/r),u.children},e.prototype.reflow=function(t){for(var e=this.options,o=this.labels,i=this.title,r=e.vertical,n=o.length,s=r?"width":"height",a=i?i.box[s]():0,p=this.getActualTickSize()+e.margin+a,h=((this.getRoot()||{}).box||t)[s](),c=0,l=0;l<n;l++){var u=o[l].box[s]();u+p<=h&&(c=Math.max(c,u))}this.box=r?new vn(t.x1,t.y1,t.x1+c+p,t.y2):new vn(t.x1,t.y1,t.x2,t.y1+c+p),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,o=this.labelsBetweenTicks(),i=t.vertical,r=t.labels.mirror,n=this.getLabelsTickPositions(),s=0;s<e.length;s++){var a=e[s],p=this.labelTickIndex(a),h=i?a.box.height():a.box.width(),c=n[p],l=n[p+1],u=void 0,d=void 0;if(i){if(o)u=c+(l-c)/2-h/2;else u=c-h/2;d=u}else o?(u=c,d=l):d=(u=c-h/2)+h;this.positionLabel(a,r,u,d)}},e.prototype.positionLabel=function(t,e,o,i){void 0===i&&(i=o);var r,n=this.options,s=n.vertical,a=this.lineBox(),p=this.getActualTickSize()+n.margin;if(s){var h=a.x2;e?(h+=p,t.options.rotationOrigin=g):(h-=p+t.box.width(),t.options.rotationOrigin=_),r=t.box.move(h,o)}else{var c=a.y1;e?(c-=p+t.box.height(),t.options.rotationOrigin=u):(c+=p,t.options.rotationOrigin=b),r=new vn(o,c,i,c+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,o=Math.min(e.length,t.length-1),i=0,r=0;r<o;r++){var n=Math.abs(t[r+1]-t[r]),s=e[r].box,a=this.autoRotateLabelAngle(s,n);if(0!==a&&(i=a),-90===i)break}if(0!==i){for(var p=0;p<e.length;p++)e[p].options.rotation=i,e[p].reflow(new vn);return!0}},e.prototype.arrangeTitle=function(){var t=this.options,e=this.title,o=t.labels.mirror,i=t.vertical;e&&(i?(e.options.align=o?_:g,e.options.vAlign=e.options.position):(e.options.align=e.options.position,e.options.vAlign=o?b:u),e.reflow(this.box))},e.prototype.arrangeNotes=function(){for(var t=0;t<this.notes.length;t++){var e=this.notes[t],o=e.options.value,i=void 0;Rr(o)?(this.shouldRenderNote(o)?e.show():e.hide(),i=this.noteSlot(o)):e.hide(),e.reflow(i||this.lineBox())}},e.prototype.noteSlot=function(t){return this.getSlot(t)},e.prototype.alignTo=function(t){var e=t.lineBox(),o=this.options.vertical,i=o?S:k;this.box.snapTo(e,i),o?this.box.shrink(0,this.lineBox().height()-e.height()):this.box.shrink(this.lineBox().width()-e.width(),0),this.box[i+1]-=this.lineBox()[i+1]-e[i+1],this.box[i+2]-=this.lineBox()[i+2]-e[i+2]},e.prototype.axisLabelText=function(t,e,o){var i,r=this,n=fr(e),s=function(){return e.format?r.chartService.format.localeAuto(e.format,[t],e.culture):t};n?i=n(Object.assign({},o,{get text(){return s()},value:t,format:e.format,culture:e.culture})):i=s();return i},e.prototype.slot=function(t,e,o){var i=this.getSlot(t,e,o);if(i)return i.toRect()},e.prototype.contentBox=function(){var t=this.box.clone(),e=this.labels;if(e.length){var o=this.options.vertical?S:k;if(this.chartService.isPannable(o)){var i=this.maxLabelOffset();t[o+1]-=i.start,t[o+2]+=i.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,o=t.reverse,i=this.labelsBetweenTicks(),r=this.getLabelsTickPositions(),n=e?S:k,s=this.labels,a=o?1:0,p=o?0:1,h=0,c=0,l=0;l<s.length;l++){var u=s[l],d=this.labelTickIndex(u),f=void 0,y=void 0;i?(f=r[d+a],y=r[d+p]):f=y=r[d],h=Math.max(h,f-u.box[n+1]),c=Math.max(c,u.box[n+2]-y)}return{start:h,end:c}},e.prototype.limitRange=function(t,e,o,i,r){var n=this.options;if(t<o&&r<0&&(!Rr(n.min)||n.min<=o)||i<e&&r>0&&(!Rr(n.max)||i<=n.max))return null;if(e<o&&r>0||i<t&&r<0)return{min:t,max:e};var s=e-t,a=t,p=e;return t<o&&r<0?(a=Hr(t,o,i),p=Hr(t+s,o+s,i)):e>i&&r>0&&(p=Hr(e,o,i),a=Hr(e-s,o,i-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(),o=t?e.height():e.width(),i=t?S:k,r=this.lineDir(),n=i+(1===r?1:2).toString();return{axis:i,axisOrigin:n,axisDir:r,lineBox:e,lineSize:o,lineStart:e[n]}},e.prototype.pointOffset=function(t){var e=this.lineInfo(),o=e.axis,i=e.axisDir,r=e.axisOrigin,n=e.lineBox,s=e.lineSize;return(i>0?t[o]-n[r]:n[r]-t[o])/s},e.prototype.scaleToDelta=function(t,e){var o=Hr(t,-.999,.999);return o>0?e*Math.min(1,o):e-e/(1+o)},e.prototype.labelsBetweenTicks=function(){return!this.options.justified},e.prototype.prepareUserOptions=function(){},e}(Cn);Yr(ps,{labels:{visible:!0,rotation:0,mirror:!1,step:1,skip:0},line:{width:1,color:l,visible:!0},title:{visible:!0,position:d},majorTicks:{align:"outside",size:4,skip:0,step:1},minorTicks:{align:"outside",size:3,skip:0,step:1},axisCrossingValue:0,majorTickType:"outside",minorTickType:"none",majorGridLines:{skip:0,step:1},minorGridLines:{visible:!1,width:1,color:l,skip:0,step:1},margin:5,visible:!0,reverse:!1,justified:!0,notes:{label:{text:""}},_alignLines:!0,_deferLabels:!1});var hs=ps,cs="days",ls="years",us={years:31536e6,months:26784e5,weeks:6048e5,days:864e5,hours:36e5,minutes:6e4,seconds:1e3,milliseconds:1};function ds(t,e){return t.getTime()-e-6e4*(t.getTimezoneOffset()-e.getTimezoneOffset())}function fs(t,e){return new Date(t.getTime()+e)}function ys(t){var e;return t instanceof Date?e=t:t&&(e=new Date(t)),e}function vs(t,e){return 0===e&&23===t.getHours()&&(t.setHours(t.getHours()+2),!0)}function gs(t,e,o,i){var r=t;if(t){var n=ys(t),s=n.getHours();o===ls?vs(r=new Date(n.getFullYear()+e,0,1),0):"months"===o?vs(r=new Date(n.getFullYear(),n.getMonth()+e,1),s):"weeks"===o?vs(r=gs(function(t,e){void 0===e&&(e=0);var o=0,i=t.getDay();if(!isNaN(i))for(;i!==e;)0===i?i=6:i--,o++;return fs(t,864e5*-o)}(n,i),7*e,cs),s):o===cs?vs(r=new Date(n.getFullYear(),n.getMonth(),n.getDate()+e),s):"hours"===o?r=function(t,e){var o=new Date(t);o.setMinutes(0,0,0);var i=6e4*(t.getTimezoneOffset()-o.getTimezoneOffset());return fs(o,i+36e5*e)}(n,e):"minutes"===o?(r=fs(n,6e4*e)).getSeconds()>0&&r.setSeconds(0):"seconds"===o?r=fs(n,1e3*e):"milliseconds"===o&&(r=fs(n,e)),"milliseconds"!==o&&r.getMilliseconds()>0&&r.setMilliseconds(0)}return r}function ms(t,e,o){return gs(ys(t),0,e,o)}function xs(t,e,o){var i=ys(t);return i&&ms(i,e,o).getTime()===i.getTime()?i:gs(i,1,e,o)}function _s(t,e){return t&&e?t.getTime()-e.getTime():-1}function bs(t,e){return t.getTime()-e}function ws(t){if(A(t)){for(var e=[],o=0;o<t.length;o++)e.push(ws(t[o]));return e}if(t)return ys(t).getTime()}function Cs(t,e){return t&&e?ws(t)===ws(e):t===e}function ks(t,e,o){return ds(t,e)/us[o]}function Ss(t,e,o,i){var r=ys(t),n=ys(e);return("months"===o?r.getMonth()-n.getMonth()+12*(r.getFullYear()-n.getFullYear())+ks(r,new Date(r.getFullYear(),r.getMonth()),cs)/new Date(r.getFullYear(),r.getMonth()+1,0).getDate():o===ls?r.getFullYear()-n.getFullYear()+Ss(r,new Date(r.getFullYear(),0),"months",1)/12:o===cs||"weeks"===o?ks(r,n,o):bs(r,e)/us[o])/i}function As(t,e,o){return o===ls?e.getFullYear()-t.getFullYear():"months"===o?12*As(t,e,ls)+e.getMonth()-t.getMonth():o===cs?Math.floor(bs(e,t)/864e5):Math.floor(bs(e,t)/us[o])}function Ps(t,e){return tr(e)&&t.parseDate(e)||ys(e)}function Ts(t,e){if(A(e)){for(var o=[],i=0;i<e.length;i++)o.push(Ps(t,e[i]));return o}return Ps(t,e)}function Ms(t,e){return Ji(t.weekStartDay)?t.weekStartDay:e&&e.firstDay?e.firstDay():0}var Os=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||[],o=Rr(t.min),i=Rr(t.max);if(t.srcCategories=t.categories=e,(o||i)&&e.length){var r,n=o?Math.floor(t.min):0;r=i?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:Ji(t.min)?t.min%1:0,max:Ji(t.max)&&t.max%1!=0&&t.max<this.totalRange().max?e-(1-t.max%1):e-(t.justified?1:0)}},e.prototype.totalRangeIndices=function(t){var e,o=this.options,i=Ji(o.min)?o.min:0;if(e=Ji(o.max)?o.max:Ji(o.min)?i+o.categories.length:this.totalRange().max||1,t){var r=this.totalRange();i=Hr(i,0,r.max),e=Hr(e,0,r.max)}return{min:i,max:e}},e.prototype.range=function(){var t=this.options;return{min:Ji(t.min)?t.min:0,max:Ji(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,o=t.max,i=this.lineBox();return{scale:(this.options.vertical?i.height():i.width())/(o-e||1)*(this.options.reverse?-1:1),box:i,min:e,max:o}},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 o=this.options.vertical?S:k,i=t[o+1],r=t[o+2],n=e[0],s=Vr(e);(n.box[o+1]>r||n.box[o+2]<i)&&(n.options.visible=!1),(s.box[o+1]>r||s.box[o+2]<i)&&(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(),o=e.min,i=e.max,r=Math.ceil(i),n=Math.floor(o),s=[];n<=r;)s.push(n),n+=t;return s},e.prototype.getTickPositions=function(t){for(var e=this.options,o=e.vertical,i=e.reverse,r=this.scaleOptions(),n=r.scale,s=r.box,a=r.min,p=s[(o?S:k)+(i?2:1)],h=this.tickIndices(t),c=[],l=0;l<h.length;l++)c.push(p+Ur(n*(h[l]-a),3));return c},e.prototype.getTicks=function(){var t=this.options,e=this._ticks,o=this.rangeIndices(),i=this.lineBox(),r=i.getHash()+o.min+","+o.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,i),e.minorTicks=n?this.filterOutOfRangePositions(this.getTickPositions(.5),i):[]}return e},e.prototype.filterOutOfRangePositions=function(t,e){if(!t.length)return t;for(var o=this.options.vertical?S:k,i=function(t){return e[o+1]<=t&&t<=e[o+2]},r=t.length-1,n=0;!i(t[n])&&n<=r;)n++;for(var s=r;!i(t[s])&&s>=0;)s--;return t.slice(n,s+1)},e.prototype.lineInfo=function(){var t=this.options,e=t.vertical,o=t.reverse,i=this.lineBox(),r=e?i.height():i.width(),n=e?S:k,s=o?-1:1,a=n+(1===s?1:2).toString();return{axis:n,axisOrigin:a,axisDir:s,lineBox:i,lineSize:r,lineStart:i[a]}},e.prototype.lineDir=function(){return this.options.reverse?-1:1},e.prototype.getSlot=function(t,e,o){var i=this.options,r=i.reverse,n=i.justified,s=this.scaleOptions(),a=s.scale,p=s.box,h=s.min,c=this.lineInfo(),l=c.axis,u=c.lineStart,d=p.clone(),f=!Rr(e),y=Wr(t,0),v=Wr(e,y);v=Math.max(v-1,y);var g=u+(y-h)*a,m=u+((v=Math.max(y,v))+1-h)*a;return f&&n&&(m=g),o&&(g=Hr(g,p[l+1],p[l+2]),m=Hr(m,p[l+1],p[l+2])),d[l+1]=r?m:g,d[l+2]=r?g:m,d},e.prototype.limitSlot=function(t){var e=this.options.vertical?S:k,o=this.lineBox(),i=t.clone();return i[e+1]=Hr(t[e+1],o[e+1],o[e+2]),i[e+2]=Hr(t[e+2],o[e+1],o[e+2]),i},e.prototype.slot=function(e,o,i){var r=Math.floor(this.options.min||0),n=e,s=o;return"string"==typeof n?n=this.categoryIndex(n):Ji(n)&&(n-=r),"string"==typeof s?s=this.categoryIndex(s):Ji(s)&&(s-=r),t.prototype.slot.call(this,n,s,i)},e.prototype.pointCategoryIndex=function(t){var e=this.options,o=e.reverse,i=e.justified,r=e.vertical?S:k,n=this.scaleOptions(),s=n.scale,a=n.box,p=n.min,h=n.max,c=o?h:p,l=a[r+1],u=a[r+2],d=t[r];if(d<l||d>u)return null;var f=c+(d-l)/s,y=f%1;return i?f=Math.round(f):0===y&&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 o=this.options;return(e?o.srcCategories:o.categories)[t]},e.prototype.categoriesCount=function(){return(this.options.categories||[]).length},e.prototype.translateRange=function(t){var e=this.options,o=this.lineBox(),i=e.vertical?o.height():o.width(),r=e.categories.length,n=Ur(t/(i/r),10);return{min:n,max:r+n}},e.prototype.scaleRange=function(t,e){var o=Math.abs(this.pointOffset(e)),i=this.totalRangeIndices(),r=i.max-i.min,n=this.scaleToDelta(t,r),s=o*n,a=(1-o)*n,p=i.min+s,h=i.max-a;return h-p<.1&&(h=p+.1),{min:p,max:h}},e.prototype.zoomRange=function(t,e){var o=this.totalRange(),i=o.min,r=o.max,n=this.scaleRange(t,e);return{min:Hr(n.min,i,r),max:Hr(n.max,i,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,o=t.labels,i=this.totalRangeIndices(!0),r=i.min,n=i.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>o.skip?o.skip+o.step*Math.ceil((r-o.skip)/o.step):o.skip)-s,max:(t.categories.length?n+(e?1:0):0)-s}},e.prototype.createAxisLabel=function(t,e,o){var i=this.options,r=i.dataItems?i.dataItems[t]:null,n=Wr(i.categories[t],"");o.dataItem=r;var s=this.axisLabelText(n,e,o);return new Un(n,s,t,r,e)},e.prototype.shouldRenderNote=function(t){var e=this.totalRangeIndices();return Math.floor(e.min)<=t&&t<=Math.ceil(e.max)},e.prototype.noteSlot=function(t){var e=this.options,o=t-Math.floor(e.min||0);return this.getSlot(o)},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 o=this.options.vertical?S:k,i=e[o+1],r=e[o+2],n=0;n<t.length;n++){var s=t[n];s.box&&(r<s.box[o+1]||s.box[o+2]<i)&&s.hide()}},e.prototype.pan=function(t){var e=this.totalRangeIndices(!0),o=this.scaleOptions().scale,i=Ur(t/o,10),r=this.totalRange(),n=e.min+i,s=e.max+i;return this.limitRange(n,s,0,r.max,i)},e.prototype.pointsRange=function(t,e){var o=this.options,i=o.reverse,r=o.vertical?S:k,n=this.totalRangeIndices(!0),s=this.scaleOptions(),a=s.scale,p=s.box[r+(i?2:1)],h=t[r]-p,c=e[r]-p,l=n.min+h/a,u=n.min+c/a,d=Math.min(l,u),f=Math.max(l,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;return this._categoriesMap?this._categoriesMap.get(t):function(t,e){if(t instanceof Date){for(var o=e.length,i=0;i<o;i++)if(Cs(e[i],t))return i;return-1}return e.indexOf(t)}(t,e.srcCategories)},e.prototype.currentRangeIndices=function(){var t=this.options,e=0;return Ji(t.min)&&(e=Math.floor(t.min)),{min:e,max:Ji(t.max)?t.justified?Math.floor(t.max):Math.ceil(t.max)-1:this.totalCount()-1}},e.prototype.mapCategories=function(){if(!this._categoriesMap)for(var t=this._categoriesMap=new br,e=this.options.srcCategories,o=0;o<e.length;o++)t.set(e[o],o)},e.prototype.totalCount=function(){return Math.max(this.options.srcCategories.length,this._seriesMax||0)},e}(hs);Yr(Os,{type:"category",vertical:!1,majorGridLines:{visible:!1,width:1,color:l},labels:{zIndex:1},justified:!1,_deferLabels:!0});var Bs=Os,Rs={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"},Es=["milliseconds","seconds","minutes","hours",cs,"weeks","months",ls];function zs(t){var e=t._range;return e||((e=t._range=Zr(t)).min=ys(e.min),e.max=ys(e.max)),e}var Ls=function(t){this.options=t};Ls.prototype.displayIndices=function(){return{min:0,max:1}},Ls.prototype.displayRange=function(){return{}},Ls.prototype.total=function(){return{}},Ls.prototype.valueRange=function(){return{}},Ls.prototype.valueIndex=function(){return-1},Ls.prototype.values=function(){return[]},Ls.prototype.totalIndex=function(){return-1},Ls.prototype.valuesCount=function(){return 0},Ls.prototype.totalCount=function(){return 0},Ls.prototype.dateAt=function(){return null};var Is=function(t,e,o){this.options=o,o.baseUnitStep=o.baseUnitStep||1;var i=o.roundToBaseUnit,r=o.justified;this.start=gs(t,0,o.baseUnit,o.weekStartDay);var n=this.roundToTotalStep(e),s=!r&&Cs(e,n)&&!o.justifyEnd;this.end=this.roundToTotalStep(e,!r,s?1:0);var a=o.min||t;this.valueStart=this.roundToTotalStep(a),this.displayStart=i?this.valueStart:a;var p=o.max;if(p){var h=!r&&Cs(p,this.roundToTotalStep(p))?-1:0;this.valueEnd=this.roundToTotalStep(p,!1,h),this.displayEnd=i?this.roundToTotalStep(p,!r):o.max}else this.valueEnd=n,this.displayEnd=i||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 js(t,e,o){for(var i,r,n,s=zs(t.categories),a=(t.max||s.max)-(t.min||s.min),p=t.autoBaseUnitSteps,h=t.maxDateGroups,c="fit"===t.baseUnit,l=e?Es.indexOf(e):0,u=c?Es[l++]:t.baseUnit,d=a/us[u],f=d;!r||d>=h;){i=i||p[u].slice(0);do{n=i.shift()}while(n&&e===u&&n<o);if(n)d=f/(r=n);else{if(u===Vr(Es)){r=Math.ceil(f/h);break}if(!c){d>h&&(r=Math.ceil(f/h));break}u=Es[l++]||Vr(Es),f=a/us[u],i=null}}t.baseUnitStep=r,t.baseUnit=u}function Ds(t){var e=(t.baseUnit||"").toLowerCase();return"fit"!==e&&!wr(e,Es)&&function(t){for(var e,o,i=t.categories,r=Rr(i)?i.length:0,n=m,s=0;s<r;s++){var a=i[s];if(a&&e){var p=ds(a,e);p>0&&(o=(n=Math.min(n,p))>=31536e6?ls:n>=24192e5?"months":n>=6048e5?"weeks":n>=864e5?cs:n>=36e5?"hours":n>=6e4?"minutes":"seconds")}e=a}t.baseUnit=o||cs}(t),"fit"!==e&&"auto"!==t.baseUnitStep||js(t),t}Is.prototype.displayRange=function(){return{min:this.displayStart,max:this.displayEnd}},Is.prototype.displayIndices=function(){if(!this._indices){var t=this.options,e=t.baseUnit,o=t.baseUnitStep,i=Ss(this.displayStart,this.valueStart,e,o),r=Ss(this.displayEnd,this.valueStart,e,o);this._indices={min:i,max:r}}return this._indices},Is.prototype.total=function(){return{min:this.start,max:this.end}},Is.prototype.totalCount=function(){return this.totalIndex(this.end)+(this.options.justified?1:0)},Is.prototype.valueRange=function(){return{min:this.valueStart,max:this.valueEnd}},Is.prototype.valueIndex=function(t){var e=this.options;return Math.floor(Ss(t,this.valueStart,e.baseUnit,e.baseUnitStep))},Is.prototype.totalIndex=function(t){var e=this.options;return Math.floor(Ss(t,this.start,e.baseUnit,e.baseUnitStep))},Is.prototype.dateIndex=function(t){var e=this.options;return Ss(t,this.valueStart,e.baseUnit,e.baseUnitStep)},Is.prototype.valuesCount=function(){return this.valueIndex(this.valueEnd)+1},Is.prototype.values=function(){var t=this._values;if(!t){var e=this.options,o=this.valueRange();this._values=t=[];for(var i=o.min;i<=o.max;)t.push(i),i=gs(i,e.baseUnitStep,e.baseUnit,e.weekStartDay)}return t},Is.prototype.dateAt=function(t,e){var o=this.options;return gs(e?this.start:this.valueStart,o.baseUnitStep*t,o.baseUnit,o.weekStartDay)},Is.prototype.roundToTotalStep=function(t,e,o){var i=this.options,r=i.baseUnit,n=i.baseUnitStep,s=i.weekStartDay,a=this.start,p=Ss(t,a,r,n),h=e?Math.ceil(p):Math.floor(p);return o&&(h+=o),gs(a,h*n,r,s)};var Vs=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,o=e.intl,i=this.options,r=i.categories||[];if(r._parsed||((r=Ts(o,r))._parsed=!0),i=rr({roundToBaseUnit:!0},i,{categories:r,min:Ps(o,i.min),max:Ps(o,i.max),weekStartDay:Ms(i,o)}),e.panning&&e.isPannable(i.vertical?S:k)&&(i.roundToBaseUnit=!1),i.userSetBaseUnit=i.userSetBaseUnit||i.baseUnit,i.userSetBaseUnitStep=i.userSetBaseUnitStep||i.baseUnitStep,this.options=i,i.srcCategories=r,r.length>0){var n=zs(r),s=i.maxDivisions;if(this.dataRange=new Is(n.min,n.max,Ds(i)),s){var a=this.dataRange.displayRange(),p=Object.assign({},i,{justified:!0,roundToBaseUnit:!1,baseUnit:"fit",min:a.min,max:a.max,maxDateGroups:s}),h=this.dataRange.options;js(p,h.baseUnit,h.baseUnitStep),this.divisionRange=new Is(n.min,n.max,p)}else this.divisionRange=this.dataRange}else i.baseUnit=i.baseUnit||cs,this.dataRange=this.divisionRange=new Ls(i);this.rangeLabels=[]},e.prototype.tickIndices=function(e){var o=this.dataRange,i=this.divisionRange,r=i.valuesCount();if(!this.options.maxDivisions||!r)return t.prototype.tickIndices.call(this,e);var n=[],s=i.values(),a=0;this.options.justified||(s=s.concat(i.dateAt(r)),a=.5);for(var p=0;p<s.length;p++)if(n.push(o.dateIndex(s[p])+a),1!==e&&p>=1){var h=n.length-1;n.splice(p,0,n[h-1]+(n[h]-n[h-1])*e)}return n},e.prototype.shouldRenderNote=function(t){var e=this.range(),o=this.options.categories||[];return _s(t,e.min)>=0&&_s(t,e.max)<=0&&o.length},e.prototype.parseNoteValue=function(t){return Ps(this.chartService.intl,t)},e.prototype.noteSlot=function(t){return this.getSlot(t)},e.prototype.translateRange=function(t){var e=this.options,o=e.baseUnit,i=e.weekStartDay,r=e.vertical,n=this.lineBox(),s=r?n.height():n.width(),a=this.range(),p=s/(a.max-a.min),h=Ur(t/p,10);if(a.min&&a.max){var c=fs(e.min||a.min,h),l=fs(e.max||a.max,h);a={min:gs(c,0,o,i),max:gs(l,0,o,i)}}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,o=this.lineBox(),i=e.vertical?o.height():o.width(),r=this.dataRange.displayRange(),n=r.min,s=r.max,a=this.dataRange.total(),p=Ur(t/(i/(s-n)),10)*(e.reverse?-1:1),h=fs(n,p),c=fs(s,p),l=this.limitRange(ws(h),ws(c),ws(a.min),ws(a.max),p);return l?(l.min=ys(l.min),l.max=ys(l.max),l.baseUnit=e.baseUnit,l.baseUnitStep=e.baseUnitStep||1,l.userSetBaseUnit=e.userSetBaseUnit,l.userSetBaseUnitStep=e.userSetBaseUnitStep,l):void 0},e.prototype.pointsRange=function(e,o){if(this.isEmpty())return null;var i=t.prototype.pointsRange.call(this,e,o),r=this.dataRange.displayRange(),n=this.dataRange.displayIndices(),s=bs(r.max,r.min)/(n.max-n.min),a=this.options;return{min:fs(r.min,i.min*s),max:fs(r.min,i.max*s),baseUnit:a.userSetBaseUnit||a.baseUnit,baseUnitStep:a.userSetBaseUnitStep||a.baseUnitStep}},e.prototype.scaleRange=function(t,e){if(this.isEmpty())return{};var o=this.options,i="fit"===o.userSetBaseUnit,r=this.dataRange.total(),n=this.dataRange.displayRange(),s=n.min,a=n.max,p=Math.abs(this.pointOffset(e)),h=a-s,c=this.scaleToDelta(t,h),l=Math.round(p*c),u=Math.round((1-p)*c),d=this.dataRange.options.baseUnit,f=new Date(s.getTime()+l),y=new Date(a.getTime()-u);if(i){var v,g,m=o.autoBaseUnitSteps,x=o.maxDateGroups,_=Vr(m[d])*x*us[d],b=bs(a,s),w=bs(y,f),C=Es.indexOf(d);if(w<us[d]&&"milliseconds"!==d)d=Es[C-1],f=fs(s,g=(b-(x-1)*(v=Vr(m[d]))*us[d])/2),y=fs(a,-g);else if(w>_&&d!==ls){var k=0;do{C++,d=Es[C],k=0,g=2*us[d];do{v=m[d][k],k++}while(k<m[d].length&&g*v<b)}while(d!==ls&&g*v<b);(g=(g*v-b)/2)>0&&(f=fs(s,-g),y=fs(a,g),f=fs(f,Hr(y,r.min,r.max)-y),y=fs(y,Hr(f,r.min,r.max)-f))}}return f&&y&&bs(y,f)>0?{min:f,max:y,baseUnit:o.userSetBaseUnit||o.baseUnit,baseUnitStep:o.userSetBaseUnitStep||o.baseUnitStep}:void 0},e.prototype.zoomRange=function(t,e){var o=this.dataRange.total(),i=this.scaleRange(t,e);return i&&(i.min<o.min&&(i.min=o.min),i.max>o.max&&(i.max=o.max)),i},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 o=this.lineBox(),i=t.vertical,r=t.rangeLabels.mirror||t.labels.mirror,n=e[0];if(n){var s=i?o.y1-n.box.height()/2:o.x1;this.positionLabel(n,r,s)}var a=e[1];if(a){var p=i?o.y2-a.box.height()/2:o.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 o=t[0];if(o&&o.options.visible)for(var i=0;i<e.length;i++){if(!s(o,e[i]))break}var r=t[1];if(r&&r.options.visible)for(var n=e.length-1;n>0;--n){if(!s(r,e[n]))break}}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),o=this.rangeLabels,i=0;i<o.length;i++){var r=o[i];r.options.visible&&e.wrap(r.box)}return e},e.prototype.createAxisLabel=function(t,e,o){void 0===o&&(o={});var i=this.options,r=i.dataItems&&!i.maxDivisions?i.dataItems[t]:null,n=this.divisionRange.dateAt(t),s=e.dateFormats[this.divisionRange.options.baseUnit];e.format=e.format||s,o.dataItem=r;var a=this.axisLabelText(n,e,o);if(a)return new Un(n,a,t,r,e)},e.prototype.createRangeLabels=function(){var t=this,e=this.divisionRange,o=e.displayStart,i=e.displayEnd,r=this.options,n=Object.assign({},r.labels,r.rangeLabels,{align:d,zIndex:r.zIndex});if(!0===n.visible){this.normalizeLabelRotation(n),n.alignRotation=d,"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,o,i){if(i){var r=new Un(o,i,e,null,n);t.append(r),t.rangeLabels.push(r)}};a(0,o,this.axisLabelText(o,n,{index:0,count:2})),a(1,i,this.axisLabelText(i,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 o=function(e,o,i){var r=2*Math.abs(o[i+1]-o[i]),n=t.autoRotateLabelAngle(e.box,r);0!==n&&(e.options.rotation=n,e.reflow(new vn))},i=this.getMajorTickPositions();o(e[0],i,0),o(e[1],i,i.length-2)}},e.prototype.categoryIndex=function(t){return this.dataRange.valueIndex(t)},e.prototype.slot=function(t,e,o){var i=this.dataRange,r=t,n=e;r instanceof Date&&(r=i.dateIndex(r)),n instanceof Date&&(n=i.dateIndex(n));var s=this.getSlot(r,n,o);if(s)return s.toRect()},e.prototype.getSlot=function(e,o,i){var r=e,n=o;return"object"==typeof r&&(r=this.categoryIndex(r)),"object"==typeof n&&(n=this.categoryIndex(n)),t.prototype.getSlot.call(this,r,n,i)},e.prototype.valueRange=function(){var t=zs(this.options.srcCategories);return{min:ys(t.min),max:ys(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.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=zs(t.srcCategories);return new Is(e.min,e.max,Object.assign({},t,{justified:!1,roundToBaseUnit:!0,justifyEnd:t.justified})).displayRange()},e}(Bs);Yr(Vs,{type:y,labels:{dateFormats:Rs},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});var Hs=Vs;function Fs(t,e){return Ur(Math.floor(t/e)*e,10)}function Ns(t,e){return Ur(Math.ceil(t/e)*e,10)}function Us(t){return Math.max(Math.min(t,3e5),-3e5)}var Gs=Math.pow(10,-9),Ws=function(t){function e(e,o,i,r){t.call(this,Object.assign({},i,{seriesMin:e,seriesMax:o}),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,o){var i=o.narrowRange,r=function(t,e,o){if(!t&&!e)return 0;var i;if(t>=0&&e>=0){var r=t===e?0:t;if(!1===o||!o&&(e-r)/e>.2)return 0;i=Math.max(0,r-(e-r)/2)}else i=t;return i}(t,e,i),n=function(t,e,o){if(!t&&!e)return 1;var i;if(t<=0&&e<=0){var r=t===e?0:e,n=Math.abs((r-t)/r);if(!1===o||!o&&n>.2)return 0;i=Math.min(0,r-(t-r)/2)}else i=e;return i}(t,e,i),s=dn(r,n),a={majorUnit:s};!1!==o.roundToMajorUnit&&(r<0&&qs(r,s,1/3)&&(r-=s),n>0&&qs(n,s,1/3)&&(n+=s));return a.min=Fs(r,s),a.max=Ns(n,s),a}(t.seriesMin,t.seriesMax,t);return this.totalOptions=function(t,e){return{min:Rr(e.min)?Math.min(t.min,e.min):t.min,max:Rr(e.max)?Math.max(t.max,e.max):t.max,majorUnit:t.majorUnit}}(e,t),function(t,e){var o,i,r=e;if(e){!function(t,e){for(var o=0;o<e.length;o++){var i=e[o];null===t[i]&&(t[i]=void 0)}}(e,["min","max"]),o=Rr(e.min),i=Rr(e.max);var n=o||i;n&&e.min===e.max&&(e.min>0?e.min=0:e.max=1),e.majorUnit?(t.min=Fs(t.min,e.majorUnit),t.max=Ns(t.max,e.majorUnit)):n&&(r=rr(t,e),t.majorUnit=dn(r.min,r.max))}t.minorUnit=(r.majorUnit||t.majorUnit)/5;var s=rr(t,r);s.min>=s.max&&(o&&!i?s.max=s.min+s.majorUnit:!o&&i&&(s.min=s.max-s.majorUnit));return 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,o=e.max-e.min;return Math.floor(Ur(o/t,3))+1},e.prototype.getTickPositions=function(t,e){var o=this.options,i=this.lineInfo(),r=i.axisDir,n=i.axisOrigin,s=i.lineBox,a=t*(i.lineSize/(o.max-o.min)),p=this.getDivisions(t),h=[],c=s[n],l=0;e&&(l=e/t);for(var u=0;u<p;u++)u%l!=0&&h.push(Ur(c,3)),c+=a*r;return h},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,o){void 0===o&&(o=!1);var i=this.options,r=this.lineInfo(),n=r.axis,s=r.axisDir,a=r.lineBox,p=r.lineSize,h=r.lineStart,c=s*(p/(i.max-i.min)),l=Wr(t,e||0),u=Wr(e,t||0);o&&(l=Hr(l,i.min,i.max),u=Hr(u,i.min,i.max));var d=Math.min(l,u)-i.min,f=Math.max(l,u)-i.min,y=new vn(a.x1,a.y1,a.x1,a.y1);return y[n+1]=Us(h+c*(s>0?d:f)),y[n+2]=Us(h+c*(s>0?f:d)),y},e.prototype.getValue=function(t){var e=this.options,o=Number(e.max),i=Number(e.min),r=this.pointOffset(t);return r<0||r>1?null:Ur(i+r*(o-i),10)},e.prototype.translateRange=function(t){var e=this.options,o=e.vertical,i=e.reverse,r=e.max,n=e.min,s=this.lineInfo().lineSize,a=Ur(t/(s/(r-n)),10);return!o&&!i||o&&i||(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,o){var i=this.options,r=Ur(i.min+t*i.majorUnit,10),n=this.axisLabelText(r,e,o);return new Un(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 o=this.getValue(t),i=this.getValue(e),r=Math.min(o,i),n=Math.max(o,i);if(this.isValidRange(r,n))return{min:r,max:n}},e.prototype.scaleRange=function(t,e){var o=Math.abs(this.pointOffset(e)),i=this.options.max-this.options.min,r=this.scaleToDelta(t,i),n=o*r,s=(1-o)*r,a=Ur(this.options.min+n,10),p=Ur(this.options.max-s,10);return p-a<Gs&&(p=a+Gs),{min:a,max:p}},e.prototype.zoomRange=function(t,e){var o=this.totalMin,i=this.totalMax,r=this.scaleRange(t,e);return{min:Hr(r.min,o,i),max:Hr(r.max,o,i),narrowRange:!1}},e.prototype.isValidRange=function(t,e){return e-t>Gs},e}(hs);function qs(t,e,o){var i=Ur(Math.abs(t%e),10);return 0===i||i>e*(1-o)}Yr(Ws,{type:"numeric",min:0,max:1,vertical:!0,majorGridLines:{visible:!0,width:1,color:l},labels:{format:"#.####################"},zIndex:1});var Xs=Ws,Ys=function(t){function e(e,o,i,r){var n=ys(e),s=ys(o),a=r.intl,p=i||{};p=function(t,e,o){var i=o.min||t,r=o.max||e,n=o.baseUnit||(r&&i?function(t){var e="hours";t>=31536e6?e=ls:t>=26784e5?e="months":t>=6048e5?e="weeks":t>=864e5&&(e=cs);return e}(ds(r,i)):"hours"),s=us[n],a=o.weekStartDay||0,p=ms(ws(i)-1,n,a)||ys(r),h=xs(ws(r)+1,n,a),c=(o.majorUnit?o.majorUnit:void 0)||Ns(dn(p.getTime(),h.getTime()),s)/s,l=As(p,h,n),u=Ns(l,c)-l,d=Math.floor(u/2),f=u-d;o.baseUnit||delete o.baseUnit;return o.baseUnit=o.baseUnit||n,o.min=o.min||gs(p,-d,n,a),o.max=o.max||gs(h,f,n,a),o.minorUnit=o.minorUnit||c/5,o.majorUnit=c,o}(n,s,p=rr(p||{},{min:Ps(a,p.min),max:Ps(a,p.max),axisCrossingValue:Ts(a,p.axisCrossingValues||p.axisCrossingValue),weekStartDay:Ms(p,a)})),t.call(this,p,r),this.intlService=a,this.seriesMin=n,this.seriesMax=s;var h=p.weekStartDay||0;this.totalMin=ws(ms(ws(n)-1,p.baseUnit,h)),this.totalMax=ws(xs(ws(s)+1,p.baseUnit,h))}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(As(e.min,e.max,e.baseUnit)/t+1)},e.prototype.getTickPositions=function(t){for(var e=this.options,o=this.lineInfo(),i=o.axisDir,r=o.lineSize,n=o.lineStart,s=this.getDivisions(t),a=r/bs(e.max,e.min),p=e.weekStartDay||0,h=[n],c=1;c<s;c++){var l=n+bs(gs(e.min,c*t,e.baseUnit,p),e.min)*a*i;h.push(Ur(l,3))}return h},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,o){return Xs.prototype.getSlot.call(this,Ps(this.intlService,t),Ps(this.intlService,e),o)},e.prototype.getValue=function(t){var e=Xs.prototype.getValue.call(this,t);return null!==e?ys(e):null},e.prototype.labelsCount=function(){return this.getDivisions(this.options.majorUnit)},e.prototype.createAxisLabel=function(t,e,o){var i=this.options,r=t*i.majorUnit,n=i.weekStartDay||0,s=i.min;r>0&&(s=gs(s,r,i.baseUnit,n));var a=e.dateFormats[i.baseUnit];e.format=e.format||a;var p=this.axisLabelText(s,e,o);return new Un(s,p,t,null,e)},e.prototype.translateRange=function(t){var e=this.options,o=this.lineBox(),i=e.vertical,r=e.reverse,n=i?o.height():o.width(),s=this.range(),a=n/bs(s.max,s.min),p=Ur(t/a,10);return!i&&!r||i&&r||(p=-p),{min:fs(e.min,p),max:fs(e.max,p),offset:p}},e.prototype.shouldRenderNote=function(t){var e=this.range();return _s(t,e.min)>=0&&_s(t,e.max)<=0},e.prototype.pan=function(t){var e=this.translateRange(t,!0),o=this.limitRange(ws(e.min),ws(e.max),this.totalMin,this.totalMax,e.offset);if(o)return{min:ys(o.min),max:ys(o.max)}},e.prototype.pointsRange=function(t,e){var o=this.getValue(t),i=this.getValue(e),r=Math.min(o,i),n=Math.max(o,i);return{min:ys(r),max:ys(n)}},e.prototype.scaleRange=function(t,e){var o=Math.abs(this.pointOffset(e)),i=this.options.max-this.options.min,r=this.scaleToDelta(t,i),n=o*r,s=(1-o)*r,a=ys(ws(this.options.min)+n),p=ys(ws(this.options.max)-s);return p-a<1e3&&(p=ys(ws(a)+1e3)),{min:a,max:p}},e.prototype.zoomRange=function(t,e){var o=this.scaleRange(t,e);return{min:ys(Hr(ws(o.min),this.totalMin,this.totalMax)),max:ys(Hr(ws(o.max),this.totalMin,this.totalMax))}},e}(hs);Yr(Ys,{type:y,majorGridLines:{visible:!0,width:1,color:l},labels:{dateFormats:Rs}});var Zs=Ys,Qs=function(t){function e(e,o,i,r){var n=rr({majorUnit:10,min:e,max:o},i),s=n.majorUnit,a=function(t,e){var o,i=Ur($s(t,e),10)%1;o=t<=0?e:0!==i&&(i<.3||i>.9)?Math.pow(e,$s(t,e)+.2):Math.pow(e,Math.ceil($s(t,e)));return o}(o,s),p=function(t,e,o){var i=o.majorUnit,r=t;t<=0?r=e<=1?Math.pow(i,-2):1:o.narrowRange||(r=Math.pow(i,Math.floor($s(t,i))));return r}(e,o,n),h=function(t,e,o,i){var r=o.min,n=o.max;Rr(o.axisCrossingValue)&&o.axisCrossingValue<=0&&Ks();Rr(i.max)?i.max<=0&&Ks():n=e;Rr(i.min)?i.min<=0&&Ks():r=t;return{min:r,max:n}}(p,a,n,i);n.max=h.max,n.min=h.min,n.minorUnit=i.minorUnit||Ur(s-1,10),t.call(this,n,r),this.totalMin=Rr(i.min)?Math.min(p,i.min):p,this.totalMax=Rr(i.max)?Math.max(a,i.max):a,this.logMin=Ur($s(h.min,s),10),this.logMax=Ur($s(h.max,s),10),this.seriesMin=e,this.seriesMax=o,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,o){var i=this.options,r=this.logMin,n=this.logMax,s=i.majorUnit,a=i.min,p=i.max,h=this.lineInfo(),c=h.axis,l=h.axisDir,u=h.lineBox,d=h.lineSize,f=h.lineStart,y=l*(d/(n-r)),v=Wr(t,e||1),g=Wr(e,t||1);if(v<=0||g<=0)return null;o&&(v=Hr(v,a,p),g=Hr(g,a,p)),v=$s(v,s),g=$s(g,s);var m=Math.min(v,g)-r,x=Math.max(v,g)-r,_=new vn(u.x1,u.y1,u.x1,u.y1);return _[c+1]=Us(f+y*(l>0?m:x)),_[c+2]=Us(f+y*(l>0?x:m)),_},e.prototype.getValue=function(t){var e=this.options,o=this.logMin,i=this.logMax,r=e.majorUnit,n=this.lineInfo(),s=n.axis,a=n.axisDir,p=n.lineStart,h=n.lineSize,c=(i-o)/h,l=a*(t[s]-p);if(l<0||l>h)return null;var u=o+l*c;return Ur(Math.pow(r,u),10)},e.prototype.range=function(){var t=this.options;return{min:t.min,max:t.max}},e.prototype.translateRange=function(t){var e=this.options,o=this.logMin,i=this.logMax,r=e.reverse,n=e.vertical,s=e.majorUnit,a=this.lineBox(),p=n?a.height():a.width(),h=Ur(t/(p/(i-o)),10);return!n&&!r||n&&r||(h=-h),{min:Math.pow(s,o+h),max:Math.pow(s,i+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,o=e.majorTicks,i=e.minorTicks,r=e.vertical,n=e.labels.mirror,s=this.lineBox(),a={vertical:r};function p(e,o){a.tickX=n?s.x2:s.x2-o.size,a.tickY=n?s.y1-o.size:s.y1,a.position=e,t.append(ss(a,o))}return o.visible&&this.traverseMajorTicksPositions(p,o),i.visible&&this.traverseMinorTicksPositions(p,i),[]},e.prototype.createGridLines=function(t){var e=this.options,o=e.minorGridLines,i=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 h(t,e){wr(t,a)||(s.position=t,p.append(as(s,e)),a.push(t))}return i.visible&&this.traverseMajorTicksPositions(h,i),o.visible&&this.traverseMinorTicksPositions(h,o),p.children},e.prototype.traverseMajorTicksPositions=function(t,e){for(var o=this.lineInfo(),i=o.lineStart,r=o.step,n=this.logMin,s=this.logMax,a=Math.ceil(n)+e.skip;a<=s;a+=e.step){t(Ur(i+r*(a-n),10),e)}},e.prototype.traverseMinorTicksPositions=function(t,e){for(var o=this.options,i=o.min,r=o.max,n=o.minorUnit,s=o.majorUnit,a=this.lineInfo(),p=a.lineStart,h=a.step,c=this.logMin,l=this.logMax,u=Math.floor(c);u<l;u++)for(var d=this._minorIntervalOptions(u),f=e.skip;f<n;f+=e.step){var y=d.value+f*d.minorStep;if(y>r)break;if(y>=i)t(Ur(p+h*($s(y,s)-c),10),e)}},e.prototype.createAxisLabel=function(t,e,o){var i=Math.ceil(this.logMin+t),r=Math.pow(this.options.majorUnit,i),n=this.axisLabelText(r,e,o);return new Un(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 o=this.getValue(t),i=this.getValue(e);return{min:Math.min(o,i),max:Math.max(o,i)}},e.prototype.scaleRange=function(t,e){var o=this.options.majorUnit,i=$s(this.options.min,o),r=$s(this.options.max,o),n=Math.abs(this.pointOffset(e)),s=r-i,a=this.scaleToDelta(t,s),p=Math.pow(o,i+n*a),h=Math.pow(o,r-(1-n)*a);return h-p<1e-6&&(h=p+1e-6),{min:p,max:h}},e.prototype.zoomRange=function(t,e){var o=this.scaleRange(t,e),i=this.totalMin,r=this.totalMax;return{min:Hr(o.min,i,r),max:Hr(o.max,i,r)}},e.prototype._minorIntervalOptions=function(t){var e=this.options,o=e.minorUnit,i=e.majorUnit,r=Math.pow(i,t);return{value:r,minorStep:(Math.pow(i,t+1)-r)/o}},e.prototype.lineInfo=function(){var e=t.prototype.lineInfo.call(this);return e.step=e.axisDir*(e.lineSize/(this.logMax-this.logMin)),e},e}(hs);function Ks(){throw new Error("Non positive values cannot be used for a logarithmic axis")}function $s(t,e){return Math.log(t)/Math.log(e)}Yr(Qs,{type:"log",majorUnit:10,minorUnit:1,axisCrossingValue:1,vertical:!0,majorGridLines:{visible:!0,width:1,color:l},zIndex:1,_deferLabels:!0});var Js=Qs,ta={createGridLines:function(t){var e,o,i=this.options,r=Math.abs(this.box.center().y-t.lineBox().y1),n=[],s=!1;return i.majorGridLines.visible&&(e=this.majorGridLineAngles(t),s=!0,n=this.renderMajorGridLines(e,r,i.majorGridLines)),i.minorGridLines.visible&&(o=this.minorGridLineAngles(t,s),Or(n,this.renderMinorGridLines(o,r,i.minorGridLines,t,s))),n},renderMajorGridLines:function(t,e,o){return this.renderGridLines(t,e,o)},renderMinorGridLines:function(t,e,o,i,r){var n=this.radiusCallback&&this.radiusCallback(e,i,r);return this.renderGridLines(t,e,o,n)},renderGridLines:function(t,e,o,i){for(var r={stroke:{width:o.width,color:o.color,dashType:o.dashType}},n=this.box.center(),s=new p.Circle([n.x,n.y],e),h=this.gridLinesVisual(),c=0;c<t.length;c++){var l=new a.Path(r);i&&(s.radius=i(t[c])),l.moveTo(s.center).lineTo(s.pointAt(t[c]+180)),h.append(l)}return h.children},gridLineAngles:function(t,e,o,i,r){var n=this,s=this.intervals(e,o,i,r),a=t.options,p=a.visible&&!1!==(a.line||{}).visible;return Ar(s,(function(t){var e=n.intervalAngle(t);if(!p||90!==e)return e}))}},ea=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,o=e.skip||0,i=e.step||1,r=new vn,n=0;n<t.length;n++){t[n].reflow(r);var s=t[n].box;t[n].reflow(this.getSlot(o+n*i).adjacentBox(0,s.width(),s.height()))}},e.prototype.intervals=function(t,e,o,i){void 0===i&&(i=!1);for(var r=this.options,n=r.categories.length/t||1,s=360/n,a=o||1,p=[],h=0,c=e||0;c<n;c+=a)h=r.reverse?360-c*s:c*s,h=Ur(h,3)%360,i&&wr(h,i)||p.push(h);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 Ar(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 o=this.options,i=o.minorGridLines,r=o.majorGridLines,n=e?this.intervals(1,r.skip,r.step):null;return this.gridLineAngles(t,.5,i.skip,i.step,n)},e.prototype.radiusCallback=function(t,e,o){if(e.options.type!==c){var i=Nr(360/(2*this.options.categories.length)),r=Math.cos(i)*t,n=this.majorAngles(),s=function(e){return!o&&wr(e,n)?t:r};return s}},e.prototype.createPlotBands=function(){for(var t=this.options.plotBands||[],e=this._plotbandGroup=new a.Group({zIndex:-1}),o=0;o<t.length;o++){var i=t[o],r=this.plotBandSlot(i),n=this.getSlot(i.from),s=i.from-Math.floor(i.from);r.startAngle+=s*n.angle;var p=Math.ceil(i.to)-i.to;r.angle-=(p+s)*n.angle;var h=bn.current.createRing(r,{fill:{color:i.color,opacity:i.opacity},stroke:{opacity:i.opacity}});e.append(h)}this.appendVisual(e)},e.prototype.plotBandSlot=function(t){return this.getSlot(t.from,t.to-1)},e.prototype.getSlot=function(t,e){var o=this.options,i=o.justified,r=this.box,n=this.majorAngles(),s=n.length,a=360/s,p=t;o.reverse&&!i&&(p=(p+1)%s);var h=n[p=Hr(Math.floor(p),0,s-1)];i&&(h-=a/2)<0&&(h+=360);var c=a*(Hr(Math.ceil(e||p),p,s-1)-p+1);return new mn(r.center(),0,r.height()/2,h,c)},e.prototype.slot=function(t,e){var o=this.getSlot(t,e),i=o.startAngle+180,r=i+o.angle;return new p.Arc([o.center.x,o.center.y],{startAngle:i,endAngle:r,radiusX:o.radius,radiusY:o.radius})},e.prototype.pointCategoryIndex=function(t){for(var e=this.options.categories.length,o=null,i=0;i<e;i++){if(this.getSlot(i).containsPoint(t)){o=i;break}}return o},e}(Bs);Yr(ea,{startAngle:90,labels:{margin:cr(10)},majorGridLines:{visible:!0},justified:!0}),rr(ea.prototype,ta);var oa=ea,ia=function(t){function e(e,o){t.call(this,e,o);var i=this.options;i.minorUnit=i.minorUnit||i.majorUnit/2}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDivisions=function(t){return Xs.prototype.getDivisions.call(this,t)-1},e.prototype.reflow=function(t){this.box=t,this.reflowLabels()},e.prototype.reflowLabels=function(){for(var t=this.options,e=this.labels,o=this.options.labels,i=o.skip||0,r=o.step||1,n=new vn,s=this.intervals(t.majorUnit,i,r),a=0;a<e.length;a++){e[a].reflow(n);var p=e[a].box;e[a].reflow(this.getSlot(s[a]).adjacentBox(0,p.width(),p.height()))}},e.prototype.lineBox=function(){return this.box},e.prototype.intervals=function(t,e,o,i){void 0===i&&(i=!1);for(var r=this.options.min,n=this.getDivisions(t),s=[],a=o||1,p=e||0;p<n;p+=a){var h=(360+r+p*t)%360;i&&wr(h,i)||s.push(h)}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 o=this.options,i=o.minorGridLines,r=o.majorGridLines,n=e?this.intervals(o.majorUnit,r.skip,r.step):null;return this.gridLineAngles(t,o.minorUnit,i.skip,i.step,n)},e.prototype.plotBandSlot=function(t){return this.getSlot(t.from,t.to)},e.prototype.getSlot=function(t,e){var o=this.options,i=this.box,r=o.startAngle,n=Hr(t,o.min,o.max),s=Hr(e||n,n,o.max);if(o.reverse&&(n*=-1,s*=-1),(s=(540-s-r)%360)<(n=(540-n-r)%360)){var a=n;n=s,s=a}return new mn(i.center(),0,i.height()/2,n,s-n)},e.prototype.slot=function(t,e){void 0===e&&(e=t);var o,i,r=this.options,n=360-r.startAngle,s=this.getSlot(t,e),a=Math.min(t,e),h=Math.max(t,e);return r.reverse?(o=a,i=h):(o=360-h,i=360-a),o=(o+n)%360,i=(i+n)%360,new p.Arc([s.center.x,s.center.y],{startAngle:o,endAngle:i,radiusX:s.radius,radiusY:s.radius})},e.prototype.getValue=function(t){var e=this.options,o=this.box.center(),i=t.x-o.x,r=t.y-o.y,n=Math.round(Er(Math.atan2(r,i))),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}(hs);Yr(ia,{type:"polar",startAngle:0,reverse:!1,majorUnit:60,min:0,max:360,labels:{margin:cr(10)},majorGridLines:{color:l,visible:!0,width:1},minorGridLines:{color:"#aaa"}}),rr(ia.prototype,ta,{createPlotBands:oa.prototype.createPlotBands,majorAngles:oa.prototype.majorAngles,range:Xs.prototype.range,labelsCount:Xs.prototype.labelsCount,createAxisLabel:Xs.prototype.createAxisLabel});var ra=ia;function na(t,e){return 180-Math.abs(Math.abs(t-e)-180)}var sa={options:{majorGridLines:{visible:!0}},createPlotBands:function(){var t=this.options,e=t.majorGridLines.type,o=t.plotBands;void 0===o&&(o=[]);for(var i=this.plotArea.polarAxis,r=i.majorAngles(),n=i.box.center(),s=this._plotbandGroup=new a.Group({zIndex:-1}),p=0;p<o.length;p++){var h=o[p],l={fill:{color:h.color,opacity:h.opacity},stroke:{opacity:h.opacity}},u=this.getSlot(h.from,h.to,!0),d=new mn(n,n.y-u.y2,n.y-u.y1,0,360),f=void 0;f=e===c?bn.current.createRing(d,l):a.Path.fromPoints(this.plotBandPoints(d,r),l).close(),s.append(f)}this.appendVisual(s)},plotBandPoints:function(t,e){for(var o=[],i=[],r=[t.center.x,t.center.y],n=new p.Circle(r,t.innerRadius),s=new p.Circle(r,t.radius),a=0;a<e.length;a++)o.push(n.pointAt(e[a]+180)),i.push(s.pointAt(e[a]+180));return o.reverse(),o.push(o[0]),i.push(i[0]),i.concat(o)},createGridLines:function(t){var e=this.options,o=this.radarMajorGridLinePositions(),i=t.majorAngles(),r=t.box.center(),n=[];if(e.majorGridLines.visible&&(n=this.renderGridLines(r,o,i,e.majorGridLines)),e.minorGridLines.visible){var s=this.radarMinorGridLinePositions();Or(n,this.renderGridLines(r,s,i,e.minorGridLines))}return n},renderGridLines:function(t,e,o,i){var r={stroke:{width:i.width,color:i.color,dashType:i.dashType}},n=i.skip;void 0===n&&(n=0);var s=i.step;void 0===s&&(s=0);for(var h=this.gridLinesVisual(),l=n;l<e.length;l+=s){var u=t.y-e[l];if(u>0){var d=new p.Circle([t.x,t.y],u);if(i.type===c)h.append(new a.Circle(d,r));else{for(var f=new a.Path(r),y=0;y<o.length;y++)f.lineTo(d.pointAt(o[y]+180));f.close(),h.append(f)}}}return h.children},getValue:function(t){var e=this.lineBox(),o=this.plotArea.polarAxis,i=o.majorAngles(),r=o.box.center(),n=t.distanceTo(r),s=n;if(this.options.majorGridLines.type!==c&&i.length>1){var a=t.x-r.x,p=t.y-r.y,h=(Er(Math.atan2(p,a))+540)%360;i.sort((function(t,e){return na(t,h)-na(e,h)}));var l=90-na(i[0],i[1])/2,u=180-na(h,i[0])-l;s=n*(Math.sin(Nr(u))/Math.sin(Nr(l)))}return this.axisType().prototype.getValue.call(this,new fn(e.x1,e.y2-s))}},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.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}(Xs);rr(aa.prototype,sa);var pa=aa,ha=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}(Js);rr(ha.prototype,sa);var ca=ha;function la(t){return t<=0?-1:1}var ua=function(t){function e(e){t.call(this),this.closed=e}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.process=function(t){var e=t.slice(0),o=[],i=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 o;var n,s,a=e[0],h=e[1],c=e[2];for(o.push(new p.Segment(a));a.equals(e[r-1]);)i=!0,e.pop(),r--;if(2===r){var l=this.tangent(a,h,k,S);return Vr(o).controlOut(this.firstControlPoint(l,a,h,k,S)),o.push(new p.Segment(h,this.secondControlPoint(l,a,h,k,S))),o}if(i){a=e[r-1],h=e[0],c=e[1];var u=this.controlPoints(a,h,c);n=u[1],s=u[0]}else{var d=this.tangent(a,h,k,S);n=this.firstControlPoint(d,a,h,k,S)}for(var f=n,y=0;y<=r-3;y++)if(this.removeDuplicates(y,e),y+3<=(r=e.length)){a=e[y],h=e[y+1],c=e[y+2];var v=this.controlPoints(a,h,c);Vr(o).controlOut(f),f=v[1];var g=v[0];o.push(new p.Segment(h,g))}if(i){a=e[r-2],h=e[r-1],c=e[0];var m=this.controlPoints(a,h,c);Vr(o).controlOut(f),o.push(new p.Segment(h,m[0])),Vr(o).controlOut(m[1]),o.push(new p.Segment(c,s))}else{var x=this.tangent(h,c,k,S);Vr(o).controlOut(f),o.push(new p.Segment(c,this.secondControlPoint(x,h,c,k,S)))}return o},e.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)},e.prototype.invertAxis=function(t,e,o){var i=!1;if(t.x===e.x)i=!0;else if(e.x===o.x)(e.y<o.y&&t.y<=e.y||o.y<e.y&&e.y<=t.y)&&(i=!0);else{var r=this.lineFunction(t,e),n=this.calculateFunction(r,o.x);t.y<=e.y&&o.y<=n||e.y<=t.y&&o.y>=n||(i=!0)}return i},e.prototype.isLine=function(t,e,o){var i=this.lineFunction(t,e),r=this.calculateFunction(i,o.x);return t.x===e.x&&e.x===o.x||Ur(r,1)===Ur(o.y,1)},e.prototype.lineFunction=function(t,e){var o=(e.y-t.y)/(e.x-t.x);return[t.y-o*t.x,o]},e.prototype.controlPoints=function(t,e,o){var i,r=k,n=S,s=!1,a=!1;if(this.isLine(t,e,o))i=this.tangent(t,e,k,S);else{var p={x:this.isMonotonicByField(t,e,o,k),y:this.isMonotonicByField(t,e,o,S)};if(p.x&&p.y)i=this.tangent(t,o,k,S),s=!0;else if(this.invertAxis(t,e,o)&&(r=S,n=k),p[r])i=0;else i=.01*(o[n]<t[n]&&t[n]<=e[n]||t[n]<o[n]&&e[n]<=t[n]?la((o[n]-t[n])*(e[r]-t[r])):-la((o[r]-t[r])*(e[n]-t[n]))),a=!0}var h=this.secondControlPoint(i,t,e,r,n);if(a){var c=r;r=n,n=c}var l=this.firstControlPoint(i,e,o,r,n);return s&&(this.restrictControlPoint(t,e,h,i),this.restrictControlPoint(e,o,l,i)),[h,l]},e.prototype.restrictControlPoint=function(t,e,o,i){t.y<e.y?e.y<o.y?(o.x=t.x+(e.y-t.y)/i,o.y=e.y):o.y<t.y&&(o.x=e.x-(e.y-t.y)/i,o.y=t.y):o.y<e.y?(o.x=t.x-(t.y-e.y)/i,o.y=e.y):t.y<o.y&&(o.x=e.x+(t.y-e.y)/i,o.y=t.y)},e.prototype.tangent=function(t,e,o,i){var r,n=e[o]-t[o],s=e[i]-t[i];return r=0===n?0:s/n,r},e.prototype.isMonotonicByField=function(t,e,o,i){return o[i]>e[i]&&e[i]>t[i]||o[i]<e[i]&&e[i]<t[i]},e.prototype.firstControlPoint=function(t,e,o,i,r){var n=e[i],s=.333*(o[i]-n);return this.point(n+s,e[r]+s*t,i,r)},e.prototype.secondControlPoint=function(t,e,o,i,r){var n=e[i],s=o[i],a=.333*(s-n);return this.point(s-a,o[r]-a*t,i,r)},e.prototype.point=function(t,e,o,i){var r=new p.Point;return r[o]=t,r[i]=e,r},e.prototype.calculateFunction=function(t,e){for(var o=t.length,i=0,r=0;r<o;r++)i+=Math.pow(e,r)*t[r];return i},e}(O),da=function(t){function e(e){t.call(this),this._axis=e,this.options=e.options}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.value=function(t){var e=this._axis,o=e.getCategory?e.getCategory(t):e.getValue(t);return o},e.prototype.slot=function(t,e,o){return void 0===o&&(o=!0),this._axis.slot(t,e,o)},e.prototype.range=function(){return this._axis.range()},e.prototype.valueRange=function(){return this._axis.valueRange()},e}(O);function fa(t,e){for(var o=0;o<e.length;o++)if(e[o].options.name===t)return e[o].prepareUserOptions(),new da(e[o])}var ya=function(t){this.visual=t.visual,this.chartsVisual=t.chartContainer.visual,this._pane=t};ya.prototype.findAxisByName=function(t){return fa(t,this._pane.axes)};var va=ya,ga=function(t){function e(e){t.call(this),this._plotArea=e,this.visual=e.visual,this.backgroundVisual=e._bgVisual}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(O);function ma(t){for(var e=t.length,o=0,i=0;i<e;i++){Ji(t[i])&&o++}return o}var xa={min:function(t){for(var e=t.length,o=m,i=0;i<e;i++){var r=t[i];Ji(r)&&(o=Math.min(o,r))}return o===m?t[0]:o},max:function(t){for(var e=t.length,o=x,i=0;i<e;i++){var r=t[i];Ji(r)&&(o=Math.max(o,r))}return o===x?t[0]:o},sum:function(t){for(var e=t.length,o=0,i=0;i<e;i++){var r=t[i];Ji(r)&&(o+=r)}return o},sumOrNull:function(t){var e=null;return ma(t)&&(e=xa.sum(t)),e},count:function(t){for(var e=t.length,o=0,i=0;i<e;i++){var r=t[i];null!==r&&Rr(r)&&o++}return o},avg:function(t){var e=ma(t),o=t[0];return e>0&&(o=xa.sum(t)/e),o},first:function(t){for(var e=t.length,o=0;o<e;o++){var i=t[o];if(null!==i&&Rr(i))return i}return t[0]}},_a=xa;function ba(t,e){return null===e?e:gr(t)(e)}var wa=function(t){function e(){t.call(this),this._valueFields={},this._otherFields={},this._nullValue={},this._undefinedValue={}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.register=function(t,e,o){void 0===e&&(e=[w]),void 0===o&&(o={});for(var i=0;i<t.length;i++){var r=t[i];this._valueFields[r]=e,this._otherFields[r]=o,this._nullValue[r]=this._makeValue(e,null),this._undefinedValue[r]=this._makeValue(e,void 0)}},e.prototype.canonicalFields=function(t){return this.valueFields(t).concat(this.otherFields(t))},e.prototype.valueFields=function(t){return this._valueFields[t.type]||[w]},e.prototype.otherFields=function(t){return this._otherFields[t.type]||[w]},e.prototype.bindPoint=function(t,e,o){var i,r,n=t.data,s=Rr(o)?o:n[e],a={valueFields:{value:s}},p=this.valueFields(t),h=this._otherFields[t.type];if(null===s)r=this._nullValue[t.type];else if(Rr(s)){if(Array.isArray(s)){var c=s.slice(p.length);r=this._bindFromArray(s,p),i=this._bindFromArray(c,h)}else if("object"==typeof s){var l=this.sourceFields(t,p),u=this.sourceFields(t,h);r=this._bindFromObject(s,p,l),i=this._bindFromObject(s,h,u)}}else r=this._undefinedValue[t.type];return Rr(r)&&(1===p.length?a.valueFields.value=r[p[0]]:a.valueFields=r),a.fields=i||{},a},e.prototype._makeValue=function(t,e){for(var o={},i=t.length,r=0;r<i;r++){o[t[r]]=e}return o},e.prototype._bindFromArray=function(t,e){var o={};if(e)for(var i=Math.min(e.length,t.length),r=0;r<i;r++)o[e[r]]=t[r];return o},e.prototype._bindFromObject=function(t,e,o){void 0===o&&(o=e);var i={};if(e)for(var r=e.length,n=0;n<r;n++){var s=e[n],a=o[n];null!==a&&(i[s]=ba(a,t))}return i},e.prototype.sourceFields=function(t,e){var o=[];if(e)for(var i=e.length,r=0;r<i;r++){var n=e[r],s=n===w?"field":n+"Field";o.push(null!==t[s]?t[s]||n:null)}return o},e}(O);wa.current=new wa;var Ca=wa,ka=/percent(?:\w*)\((\d+)\)/,Sa=new RegExp("^stddev(?:\\((\\d+(?:\\.\\d+)?)\\))?$"),Aa=function(t){function e(e,o,i){t.call(this),this.initGlobalRanges(e,o,i)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initGlobalRanges=function(t,e,o){var i=e.data,r=Sa.exec(t);if(r){this.valueGetter=this.createValueGetter(e,o);var n=this.getAverage(i),s=this.getStandardDeviation(i,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,o);var h=this.getStandardError(i,this.getAverage(i));this.globalRange=function(t){return{low:t-h,high:t+h}}}},e.prototype.createValueGetter=function(t,e){var o,i=t.data,r=Ca.current,n=r.valueFields(t),s=Rr(i[0])?i[0]:{};if(A(s))o=gr("["+(e?n.indexOf(e):0)+"]");else if(Ji(s))o=gr();else if("object"==typeof s){o=gr(r.sourceFields(t,n)[n.indexOf(e)])}return o},e.prototype.getErrorRange=function(t,e){var o,i,r;if(!Rr(e))return null;if(this.globalRange)return this.globalRange(t);if(A(e))o=t-e[0],i=t+e[1];else if(Ji(r=parseFloat(e)))o=t-r,i=t+r;else{if(!(r=ka.exec(e)))throw new Error("Invalid ErrorBar value: "+e);var n=t*(parseFloat(r[1])/100);o=t-Math.abs(n),i=t+Math.abs(n)}return{low:o,high:i}},e.prototype.getStandardError=function(t,e){return this.getStandardDeviation(t,e,!0)/Math.sqrt(e.count)},e.prototype.getStandardDeviation=function(t,e,o){for(var i=t.length,r=o?e.count-1:e.count,n=0,s=0;s<i;s++){var a=this.valueGetter(t[s]);Ji(a)&&(n+=Math.pow(a-e.value,2))}return Math.sqrt(n/r)},e.prototype.getAverage=function(t){for(var e=t.length,o=0,i=0,r=0;r<e;r++){var n=this.valueGetter(t[r]);Ji(n)&&(o+=n,i++)}return{value:o/i,count:i}},e}(O),Pa=So.browser||{},Ta=Pa.msie?.001:0,Ma="zero",Oa="bar",Ba="column",Ra="line",Ea="pie",za="verticalLine",La=[Oa,Ba,"ohlc","candlestick","boxPlot","verticalBoxPlot","bullet","rangeColumn","rangeBar","waterfall","horizontalWaterfall"],Ia="DOMMouseScroll mousewheel",ja=function(t){function e(e,o,i,r,n,s){t.call(this,s),this.low=e,this.high=o,this.isVertical=i,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,o=this.options.endCaps,i=this.isVertical,r=this.getAxis().getSlot(this.low,this.high),n=t.center(),s=this.getCapsWidth(t,i),a=i?n.x:n.y,p=a-s,h=a+s;i?(e=[new fn(n.x,r.y1),new fn(n.x,r.y2)],o&&e.push(new fn(p,r.y1),new fn(h,r.y1),new fn(p,r.y2),new fn(h,r.y2)),this.box=new vn(p,r.y1,h,r.y2)):(e=[new fn(r.x1,n.y),new fn(r.x2,n.y)],o&&e.push(new fn(r.x1,p),new fn(r.x1,h),new fn(r.x2,p),new fn(r.x2,h)),this.box=new vn(r.x1,p,r.x2,h)),this.linePoints=e},e.prototype.getCapsWidth=function(t,e){var o=e?t.width():t.height();return Math.min(Math.floor(o/2),4)||4},e.prototype.createVisual=function(){var t=this,e=this.options,o=e.visual;o?this.visual=o({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,o=this.linePoints,i={stroke:{color:e.color,width:e.line.width,dashType:e.line.dashType}};t.prototype.createVisual.call(this);for(var r=0;r<o.length;r+=2){var n=new a.Path(i).moveTo(o[r].x,o[r].y).lineTo(o[r+1].x,o[r+1].y);Ki(n),this.visual.append(n)}},e}(Cn);Yr(ja,{animation:{type:"fadeIn",delay:600},endCaps:!0,line:{width:2},zIndex:1});var Da=ja,Va=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}(Da);function Ha(t,e,o,i){void 0===o&&(o={}),void 0===i&&(i=!1);var r=o.defaults=o.defaults||{},n=o.depth=o.depth||0,s=!1;if(o.excluded=o.excluded||[],n>5)return null;for(var a in t)if(!wr(a,o.excluded)&&t.hasOwnProperty(a)){var p=t[a];or(p)?(s=!0,i||(t[a]=Wr(p(e),r[a]))):nr(p)&&(i||(o.defaults=r[a]),o.depth++,s=Ha(p,e,o,i)||s,o.depth--)}return s}function Fa(t){for(var e=t.length,o=0,i=0;i<e;i++)o=Math.max(o,t[i].data.length);return o}var Na=function(t){function e(e,o){t.call(this,o),this.plotArea=e,this.chartService=e.chartService,this.categoryAxis=e.seriesCategoryAxis(o.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 o=this.seriesOptions[e];if(!o){var i=this.pointType().prototype.defaults;this.seriesOptions[e]=o=rr({},i,{vertical:!this.options.invertAxes},t)}return o},e.prototype.plotValue=function(t){if(!t)return 0;if(this.options.isStacked100&&Ji(t.value)){for(var e=t.categoryIx,o=this.categoryPoints[e],i=[],r=0,n=0;n<o.length;n++){var s=o[n];if(s){var a=t.series.stack,p=s.series.stack;if(a&&p&&a.group!==p.group)continue;Ji(s.value)&&(r+=Math.abs(s.value),i.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 o=this.categoryPoints[t.categoryIx];if(this.options.isStacked){for(var i=this.plotValue(t),r=i>=0,n=e,s=!1,a=0;a<o.length;a++){var p=o[a];if(t===p)break;var h=t.series.stack,c=p.series.stack;if(h&&c){if("string"==typeof h&&h!==c)continue;if(h.group&&h.group!==c.group)continue}var l=this.plotValue(p);(l>=0&&r||l<0&&!r)&&(n+=l,i+=l,s=!0,this.options.isStacked100&&(i=Math.min(i,1)))}return s&&(n-=e),[n,i]}var u=t.series,d=this.seriesValueAxis(u),f=this.categoryAxisCrossingValue(d);return[f,er(t.value)?t.value:f]},e.prototype.stackLimits=function(t,e){for(var o=m,i=x,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];Rr(p)&&isFinite(p)&&(i=Math.max(i,p),o=Math.min(o,p))}}}return{min:o,max:i}},e.prototype.updateStackRange=function(){var t=this.options,e=t.isStacked,o=t.series,i={};if(e)for(var r=0;r<o.length;r++){var n=o[r],s=n.axis,a=s+n.stack,p=i[a];if(!p){p=this.stackLimits(s,n.stack);var h=this.errorTotals;h&&(h.negative.length&&(p.min=Math.min(p.min,Zr(h.negative).min)),h.positive.length&&(p.max=Math.max(p.max,Zr(h.positive).max))),p.min!==m||p.max!==x?i[a]=p:p=null}p&&(this.valueAxisRanges[s]=p)}},e.prototype.addErrorBar=function(t,e,o){var i,r=t.value,n=t.series,s=t.seriesIx,a=t.options.errorBars,p=e.fields.errorLow,h=e.fields.errorHigh;Ji(p)&&Ji(h)?i={low:p,high:h}:a&&Rr(a.value)&&(this.seriesErrorRanges=this.seriesErrorRanges||[],this.seriesErrorRanges[s]=this.seriesErrorRanges[s]||new Aa(a.value,n,w),i=this.seriesErrorRanges[s].getErrorRange(r,a.value)),i&&(t.low=i.low,t.high=i.high,this.addPointErrorBar(t,o))},e.prototype.addPointErrorBar=function(t,e){var o=!this.options.invertAxes,i=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 h=new Va(n,s,o,this,r,i);t.errorBars=[h],t.append(h)},e.prototype.stackedErrorRange=function(t,e){var o=this.plotRange(t,0)[1]-t.value,i=t.low+o,r=t.high+o;return this.errorTotals=this.errorTotals||{positive:[],negative:[]},i<0&&(this.errorTotals.negative[e]=Math.min(this.errorTotals.negative[e]||0,i)),r>0&&(this.errorTotals.positive[e]=Math.max(this.errorTotals.positive[e]||0,r)),{low:i,high:r}},e.prototype.addValue=function(t,e){var o=e.categoryIx,i=e.series,r=e.seriesIx,n=this.categoryPoints[o];n||(this.categoryPoints[o]=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,Rr(a.dataItem)||(a.dataItem=i.data[o]),this.addErrorBar(a,t,o)),this.points.push(a),s.push(a),n.push(a),this.updateRange(t.valueFields,e)},e.prototype.evalPointOptions=function(t,e,o,i,r,n){var s={defaults:r._defaults,excluded:["data","aggregate","_events","tooltip","content","template","visual","toggle","_outOfRangeMinPoint","_outOfRangeMaxPoint"]},a=this._evalSeries[n];Rr(a)||(this._evalSeries[n]=a=Ha(t,{},s,!0));var p=t;return a&&Ha(p=rr({},p),{value:e,category:o,index:i,series:r,dataItem:r.data[i]},s),p},e.prototype.updateRange=function(t,e){var o=e.series.axis,i=t.value,r=this.valueAxisRanges[o];isFinite(i)&&null!==i&&((r=this.valueAxisRanges[o]=r||{min:m,max:x}).min=Math.min(r.min,i),r.max=Math.max(r.max,i))},e.prototype.seriesValueAxis=function(t){var e=this.plotArea,o=t.axis,i=o?e.namedValueAxes[o]:e.valueAxis;if(!i)throw new Error("Unable to locate value axis with name "+o);return i},e.prototype.reflow=function(t){var e=this,o=this.categorySlots=[],i=this.points,r=this.categoryAxis,n=0;this.traverseDataPoints((function(t,s){var a=s.categoryIx,p=s.series,h=e.seriesValueAxis(p),c=i[n++],l=o[a];if(l||(o[a]=l=e.categorySlot(r,a,h)),c){var u=e.plotRange(c,h.startValue()),d=e.valueSlot(h,u);if(d){var f=e.pointSlot(l,d);c.aboveAxis=e.aboveAxis(c,h),c.stackValue=u[1],e.options.isStacked100&&(c.percentage=e.plotValue(c)),e.reflowPoint(c,f)}else c.visible=!1}})),this.reflowCategories(o),!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(Vr(t)),o=0;o<e.length;o++)e[o]&&this.limitPoint(e[o])},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 o=this.categoryAxisCrossingValue(e),i=t.value;return e.options.reverse?i<o:i>=o},e.prototype.categoryAxisCrossingValue=function(t){var e=this.categoryAxis,o=t.options;return[].concat(o.axisCrossingValues||o.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 o=this.options.invertAxes,i=o?e:t,r=o?t:e;return new vn(i.x1,r.y1,i.x2,r.y2)},e.prototype.categorySlot=function(t,e){return t.getSlot(e)},e.prototype.traverseDataPoints=function(t){for(var e=this.options.series,o=Fa(e),i=e.length,r=0;r<i;r++)this._outOfRangeCallback(e[r],"_outOfRangeMinPoint",r,t);for(var n=0;n<o;n++)for(var s=0;s<i;s++){var a=e[s],p=this.categoryAxis.categoryAt(n);t(this._bindPoint(a,s,n),{category:p,categoryIx:n,categoriesCount:o,series:a,seriesIx:s})}for(var h=0;h<i;h++)this._outOfRangeCallback(e[h],"_outOfRangeMaxPoint",h,t)},e.prototype._outOfRangeCallback=function(t,e,o,i){var r=t[e];if(r){var n=r.categoryIx;i(this._bindPoint(t,o,n,r.item),{category:r.category,categoryIx:n,series:t,seriesIx:o,dataItem:r.item})}},e.prototype._bindPoint=function(t,e,o,i){this._bindCache||(this._bindCache=[]);var r=this._bindCache[e];r||(r=this._bindCache[e]=[]);var n=r[o];return n||(n=r[o]=Ca.current.bindPoint(t,o,i)),n},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}(Cn);Yr(Na,{series:[],invertAxes:!1,isStacked:!1,clip:!0,limitPoints:!0});var Ua=Na,Ga={click:function(t,e){return t.trigger("seriesClick",this.eventArgs(e))},hover:function(t,e){return t.trigger("seriesHover",this.eventArgs(e))},over:function(t,e){return t.trigger("seriesOver",this.eventArgs(e))},out:function(t,e){return t.trigger("seriesLeave",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:jr(t),originalEvent:t,point:this}}},Wa={createNote:function(){var t=this.options.notes,e=this.noteText||t.label.text;!1!==t.visible&&Rr(e)&&null!==e&&(this.note=new Wn({value:this.value,text:e,dataItem:this.dataItem,category:this.category,series:this.series},this.options.notes,this.owner.chartService),this.append(this.note))}},qa=function(t){function e(e,o){t.call(this),this.value=e,this.options=o,this.aboveAxis=Wr(this.options.aboveAxis,!0),this.tooltipTracking=!0}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.render=function(){var t=this.options,e=t.markers,o=t.labels;if(!this._rendered){if(this._rendered=!0,e.visible&&e.size&&(this.marker=this.createMarker(),this.append(this.marker)),o.visible){var i=fr(o),r=this.pointData(),n=this.value;i?n=i(r):o.format&&(n=this.formatValue(o.format)),this.label=new Vn(n,rr({align:d,vAlign:d,margin:{left:5,right:5},zIndex:Wr(o.zIndex,this.series.zIndex)},o),r),this.append(this.label)}this.createNote(),this.errorBar&&this.append(this.errorBar)}},e.prototype.markerBorder=function(){var t=this.options.markers,e=t.background,o=rr({color:this.color},t.border);return Rr(o.color)||(o.color=new on(e).brightness(.8).toHex()),o},e.prototype.createVisual=function(){},e.prototype.createMarker=function(){var t=this.options.markers;return new Pn({type:t.type,width:t.size,height:t.size,rotation:t.rotation,background:t.background,border:this.markerBorder(),opacity:this.series.opacity||t.opacity,zIndex:Wr(t.zIndex,this.series.zIndex),animation:t.animation,visual:t.visual},{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,o=this.aboveAxis,i=e.vertical;this.render(),this.box=t;var r=t.clone();if(i?o?r.y1-=r.height():r.y2+=r.height():o?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 vn(a.x,a.y,a.x,a.y)}this.note.reflow(s)}},e.prototype.reflowLabel=function(t){var e=this.options,o=this.label,i=e.labels.position;o&&(i="below"===(i="above"===i?b:i)?u:i,o.reflow(t),o.box.alignTo(this.markerBox(),i),o.reflow(o.box))},e.prototype.createHighlight=function(){var t=this.options.highlight.markers,e=this.markerBorder().color,o=this.options.markers,i=o.size+(o.border.width||0)+(t.border.width||0),r=new Pn({type:o.type,width:i,height:i,rotation:o.rotation,background:t.color||e,border:{color:t.border.color,width:t.border.width,opacity:Wr(t.border.opacity,1)},opacity:Wr(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,o=this.marker;if(o)e=o.paddingBox.toRect(),t=o.visual;else{var i=this.options.markers.size,r=i/2,n=this.box.center();e=new p.Rect([n.x-r,n.y-r],[i,i])}return{options:this.options,rect:e,visual:t}},e.prototype.tooltipAnchor=function(){var t=this.markerBox(),e=this.owner.pane.clipBox();if(!e||e.overlaps(t)){var o,i,r=t.x2+5;return this.aboveAxis?(o=t.y1,i=u):(o=t.y2,i=b),{point:new fn(r,o),align:{horizontal:"left",vertical:i}}}},e.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},e.prototype.overlapsBox=function(t){return this.markerBox().overlaps(t)},e.prototype.unclipElements=function(){this.label&&(this.label.options.noclip=!0),this.note&&(this.note.options.noclip=!0)},e.prototype.pointData=function(){return{dataItem:this.dataItem,category:this.category,value:this.value,percentage:this.percentage,stackValue:this.stackValue,series:this.series}},e}(Cn);qa.prototype.defaults={vertical:!0,markers:{visible:!0,background:C,size:8,type:f,border:{width:2},opacity:1},labels:{visible:!1,position:"above",margin:cr(3),padding:cr(4),animation:{type:"fadeIn",delay:600}},notes:{label:{}},highlight:{markers:{border:{color:"#fff",width:2}},zIndex:100},errorBars:{line:{width:1}}},rr(qa.prototype,Ga),rr(qa.prototype,Wa);var Xa=qa,Ya=function(t){function e(e,o,i){t.call(this),this.linePoints=e,this.series=o,this.seriesIx=i}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=[],o=0,i=t.length;o<i;o++)t[o]&&!1!==t[o].visible&&e.push(t[o]._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&&!Rr(this.visual.options.zIndex)&&(this.visual.options.zIndex=this.series.zIndex)):this.segmentVisual()},e.prototype.segmentVisual=function(){var t=this.options,e=this.series,o=e.color,i=e._defaults;or(o)&&i&&(o=i.color);var r=a.Path.fromPoints(this.points(),{stroke:{color:o,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}(Cn);Yr(Ya,{closed:!1});var Za=Ya;function Qa(t,e,o,i,r){var n=t.box,s=new p.Point;return s[e]=n[e+o],s[i]=n[i+r],s}var Ka={calculateStepPoints:function(t){for(var e=this.parent.plotArea.seriesCategoryAxis(this.series).options,o=e.justified,i=e.vertical,r=e.reverse,n=i?k:S,s=i?S:k,a=r?2:1,h=a,c=Qa(t[0],n,a,s,h),l=[c],u=1;u<t.length;u++){var d=Qa(t[u],n,a,s,h);if(c[n]!==d[n]){var f=new p.Point;f[n]=c[n],f[s]=d[s],l.push(f,d)}c=d}return o?c!==Vr(l)&&l.push(c):l.push(Qa(Vr(t),n,a,s,r?1:2)),l}},$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.points=function(){return this.calculateStepPoints(this.linePoints)},e}(Za);rr($a.prototype,Ka);var Ja=$a,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.segmentVisual=function(){var t=this.series,e=t._defaults,o=t.color;or(o)&&e&&(o=e.color);var i=new ua(this.options.closed).process(this.points()),r=new a.Path({stroke:{color:o,width:t.width,opacity:t.opacity,dashType:t.dashType},zIndex:t.zIndex});r.segments.push.apply(r.segments,i),this.visual=r},e}(Za),ep={renderSegments:function(){var t,e=this.options,o=this.seriesPoints,i=e.series,r=o.length;this._segments=[];for(var n=0;n<r;n++){for(var s=i[n],a=this.sortPoints(o[n]),p=a.length,h=[],c=0;c<p;c++){var l=a[c];l?h.push(l):"interpolate"!==this.seriesMissingValues(s)&&(h.length>1&&(t=this.createSegment(h,s,n,t),this._addSegment(t)),h=[])}h.length>1&&(t=this.createSegment(h,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?Ma:e||"interpolate"},getNearestPoint:function(t,e,o){for(var i,r=new fn(t,e),n=this.seriesPoints[o],s=m,a=0;a<n.length;a++){var p=n[a];if(p&&Rr(p.value)&&null!==p.value&&!1!==p.visible){var h=p.box.center().distanceTo(r);h<s&&(i=p,s=h)}}return i}},op=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(Cr(e.x1,e.x2,t))},e.prototype._setEnd=function(t){var e=this.element,o=e.segments,i=o[1].anchor(),r=o[2].anchor();e.suspend(),i.setX(t),e.resume(),r.setX(t)},e}(a.Animation);Yr(op,{duration:600}),a.AnimationFactory.current.register("clip",op);var ip=op;function rp(t){for(var e=0;e<t.length;e++)if(Rr(t[e].zIndex))return!0}var np={createAnimation:function(){var t=this.getRoot();if(t&&!1!==(t.options||{}).transitions){var e=t.size(),o=a.Path.fromRect(e.toRect());this.visual.clip(o),this.animation=new ip(o,{box:e}),rp(this.options.series)&&this._setChildrenAnimation(o)}},_setChildrenAnimation:function(t){for(var e=this.animationPoints(),o=0;o<e.length;o++){var i=e[o];i&&i.visual&&Rr(i.visual.options.zIndex)&&i.visual.clip(t)}}},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.render=function(){t.prototype.render.call(this),this.updateStackRange(),this.renderSegments()},e.prototype.pointType=function(){return Xa},e.prototype.createPoint=function(t,e){var o=e.categoryIx,i=e.category,r=e.series,n=e.seriesIx,s=this.seriesMissingValues(r),a=t.valueFields.value;if(!Rr(a)||null===a){if(s!==Ma)return null;a=0}var p=this.pointOptions(r,n);p=this.evalPointOptions(p,a,i,o,r,n);var h=t.fields.color||r.color;or(r.color)&&(h=p.color);var c=new Xa(a,p);return c.color=h,this.append(c),c},e.prototype.plotRange=function(t){var e=this.plotValue(t);if(this.options.isStacked)for(var o=t.categoryIx,i=this.categoryPoints[o],r=0;r<i.length;r++){var n=i[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,o){var i=e.style;return new("step"===i?Ja:"smooth"===i?tp:Za)(t,e,o)},e.prototype.animationPoints=function(){for(var t=this.points,e=[],o=0;o<t.length;o++)e.push((t[o]||{}).marker);return e.concat(this._segments)},e.prototype.supportsPointInactiveOpacity=function(){return!1},e}(Ua);rr(sp.prototype,ep,np);var ap=sp,pp=function(t){function e(e,o,i,r,n){t.call(this,e,o,i),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,o=t.line||{},i=t.color;or(i)&&e&&(i=e.color),this.visual=new a.Group({zIndex:t.zIndex}),this.createFill({fill:{color:i,opacity:t.opacity},stroke:null}),o.width>0&&!1!==o.visible&&this.createStroke({stroke:rr({color:i,opacity:t.opacity,lineCap:"butt"},o)})},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 p.Segment(t)}))},e.prototype.createStroke=function(t){var e=new a.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(),o=e.slice(0),i=this.hasStackSegment();if(i){var r=this.stackSegments();Or(o,r)}var n=new a.Path(t);n.segments.push.apply(n.segments,o),!i&&e.length>1&&this.fillToAxes(n),this.visual.append(n)},e.prototype.fillToAxes=function(t){var e=this.parent,o=e.options.invertAxes,i=e.seriesValueAxis(this.series),r=e.categoryAxisCrossingValue(i),n=i.getSlot(r,r,!0),s=this.strokeSegments(),a=s[0].anchor(),p=Vr(s).anchor(),h=o?n.x1:n.y1;o?t.lineTo(h,p.y).lineTo(h,a.y):t.lineTo(p.x,h).lineTo(a.x,h)},e}(Za),hp=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}(pp);rr(hp.prototype,Ka);var cp=hp,lp=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 ua(this.options.closed),e=this.points();return t.process(e)},e.prototype.createStackSegments=function(){for(var t=this.strokeSegments(),e=[],o=t.length-1;o>=0;o--){var i=t[o];e.push(new p.Segment(i.anchor(),i.controlOut(),i.controlIn()))}return e},e}(pp),up=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,o,i){var r,n,s=this.options.isStacked,a=(e.line||{}).style;s&&o>0&&i&&("gap"!==this.seriesMissingValues(e)?(n=i.linePoints,r=i):n=this._gapStackPoints(t,o,a));return new("step"===a?cp:"smooth"===a?lp:pp)(t,e,o,r,n)},e.prototype.reflow=function(e){t.prototype.reflow.call(this,e);var o=this._stackPoints;if(o)for(var i=0;i<o.length;i++){var r=o[i],n=this.categoryAxis.getSlot(r.categoryIx);r.reflow(n)}},e.prototype._gapStackPoints=function(t,e,o){var i=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 h=r;h<s;h++){var c=h+a,l=e,u=void 0;do{u=i[--l][c]}while(l>0&&!u);if(u)"step"!==o&&h>r&&!i[l][c-1]&&p.push(this._previousSegmentPoint(h,c,c-1,l)),p.push(u),"step"!==o&&h+1<s&&!i[l][c+1]&&p.push(this._previousSegmentPoint(h,c,c+1,l));else{var d=this._createGapStackPoint(h);this._stackPoints.push(d),p.push(d)}}return p},e.prototype._previousSegmentPoint=function(t,e,o,i){for(var r,n=this.seriesPoints,s=i;s>0&&!r;)r=n[--s][o];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),o=new Xa(0,e);return o.categoryIx=t,o.series={},o},e.prototype.seriesMissingValues=function(t){return t.missingValues||Ma},e.prototype.supportsPointInactiveOpacity=function(){return!1},e}(ap),dp=function(t){function e(){t.call(this),this.axisRanges={}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.update=function(t){var e=this.axisRanges;for(var o in t){var i=t[o],r=e[o];e[o]=r=r||{min:m,max:x},r.min=Math.min(r.min,i.min),r.max=Math.max(r.max,i.max)}},e.prototype.reset=function(t){this.axisRanges[t]=void 0},e.prototype.query=function(t){return this.axisRanges[t]},e}(O),fp=function(t){function e(e,o,i){t.call(this,o),this.textBox=new Vn(e,this.options,i),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,o=e.vertical,i=e.aboveAxis,r=this.children[0],n=r.options,s=r.box,a=r.options.padding,p=t;n.align=o?d:g,n.vAlign=o?b:d,"insideEnd"===e.position?o?(n.vAlign=b,!i&&s.height()<t.height()&&(n.vAlign=u)):n.align=i?_:g:e.position===d?(n.vAlign=d,n.align=d):"insideBase"===e.position?o?n.vAlign=i?u:b:n.align=i?g:_:"outsideEnd"===e.position&&(o?p=i?new vn(t.x1,t.y1-s.height(),t.x2,t.y1):new vn(t.x1,t.y2,t.x2,t.y2+s.height()):(n.align=d,p=i?new vn(t.x2,t.y1,t.x2+s.width(),t.y2):new vn(t.x1-s.width(),t.y1,t.x1,t.y2))),e.rotation||(o?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?S:k,o=e+"1",i=e+"2",r=this.children[0],n=this.parent.box;if(n[o]<t[o]||t[i]<n[i]){var s=r.paddingBox.clone();s[o]=Math.max(n[o],t[o]),s[i]=Math.min(n[i],t[i]),this.reflow(s)}},e}(Cn);Yr(fp,{position:"outsideEnd",margin:cr(3),padding:cr(4),color:l,background:"",border:{width:1,color:""},aboveAxis:!0,vertical:!1,animation:{type:"fadeIn",delay:600},zIndex:2});var yp=fp;function vp(t){var e=t.overlay;return e&&e.gradient&&"none"!==e.gradient}var gp=function(t){function e(e,o){t.call(this),this.options=o,this.color=o.color||C,this.aboveAxis=Wr(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,e=t.labels;if(e.visible){var o,i=this.pointData(),r=fr(e);o=r?r(i):this.formatValue(e.format),this.label=new yp(o,rr({vertical:t.vertical},e),i),this.append(this.label)}},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 o=0;o<this.errorBars.length;o++)this.errorBars[o].reflow(t)},e.prototype.createVisual=function(){var e=this,o=this.box,i=this.options,r=i.visual;if(!1!==this.visible)if(t.prototype.createVisual.call(this),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:o.toRect(),createVisual:function(){var t=new a.Group;return e.createRect(t),t},options:i});n&&this.visual.append(n)}else o.width()>0&&o.height()>0&&this.createRect(this.visual)},e.prototype.createRect=function(t){var e=this.options,o=e.border,i=Rr(o.opacity)?o.opacity:e.opacity,r=this.box.toRect();r.size.width=Math.round(r.size.width);var n=this.rectVisual=a.Path.fromRect(r,{fill:{color:this.color,opacity:e.opacity},stroke:{color:this.getBorderColor(),width:o.width,opacity:i,dashType:o.dashType}}),s=this.box.width(),p=this.box.height();if((e.vertical?s:p)>6&&(Ki(n),(s<1||p<1)&&(n.options.stroke.lineJoin="round")),t.append(n),vp(e)){var h=this.createGradientOverlay(n,{baseColor:this.color},rr({end:e.vertical?void 0:[0,1]},e.overlay));t.append(h)}},e.prototype.createHighlight=function(t){return Ki(a.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.getBorderColor=function(){var t=this.color,e=this.options.border,o=e._brightness||.8,i=e.color;return Rr(i)||(i=new on(t).brightness(o).toHex()),i},e.prototype.tooltipAnchor=function(){var t,e,o=this.options,i=this.box,r=this.aboveAxis,n=this.owner.pane.clipBox()||i,s=g,a=b;if(o.vertical)t=Math.min(i.x2,n.x2)+5,r?e=Math.max(i.y1,n.y1):(e=Math.min(i.y2,n.y2),a=u);else{var p=Math.max(i.x1,n.x1),h=Math.min(i.x2,n.x2);o.isStacked?(a=u,r?(s=_,t=h):t=p,e=Math.max(i.y1,n.y1)-5):(r?t=h+5:(t=p-5,s=_),e=Math.max(i.y1,n.y1))}return{point:new fn(t,e),align:{horizontal:s,vertical:a}}},e.prototype.overlapsBox=function(t){return this.box.overlaps(t)},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}(Cn);rr(gp.prototype,Ga),rr(gp.prototype,Wa),gp.prototype.defaults={border:{width:1},vertical:!0,overlay:{gradient:"glass"},labels:{visible:!1,format:"{0}"},opacity:1,notes:{label:{}}};var mp=gp;function xp(t,e){t.forEach(e)}function _p(t,e){for(var o=t.length,i=o-1;i>=0;i--)e(t[i],i-o-1)}var bp=function(t){function e(e){t.call(this,e),this.forEach=e.rtl?_p:xp}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,o=e.vertical,i=e.gap,r=e.spacing,n=this.children,s=n.length,a=o?S:k,p=s+i+r*(s-1),h=(o?t.height():t.width())/p,c=t[a+1]+h*(i/2);this.forEach(n,(function(e,o){var i=(e.box||t).clone();i[a+1]=c,i[a+2]=c+h,e.reflow(i),o<s-1&&(c+=h*r),c+=h}))},e}(Cn);Yr(bp,{vertical:!1,gap:0,spacing:0});var wp=bp,Cp=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?k:S,o=this.children,i=o.length,r=this.box=new vn,n=0;n<i;n++){var s=o[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}(Cn);Yr(Cp,{vertical:!0});var kp=Cp,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.render=function(){t.prototype.render.call(this),this.updateStackRange()},e.prototype.pointType=function(){return mp},e.prototype.clusterType=function(){return wp},e.prototype.stackType=function(){return kp},e.prototype.stackLimits=function(e,o){return t.prototype.stackLimits.call(this,e,o)},e.prototype.createPoint=function(t,e){var o=e.categoryIx,i=e.category,r=e.series,n=e.seriesIx,s=this.options,a=this.children,p=s.isStacked,h=this.pointValue(t),c=this.pointOptions(r,n),l=c.labels;p&&"outsideEnd"===l.position&&(l.position="insideEnd"),c.isStacked=p;var u=t.fields.color||r.color;h<0&&c.negativeColor&&(u=c.negativeColor),c=this.evalPointOptions(c,h,i,o,r,n),or(r.color)&&(u=c.color);var d=new(this.pointType())(h,c);d.color=u;var f=a[o];f||(f=new(this.clusterType())({vertical:s.invertAxes,gap:s.gap,spacing:s.spacing,rtl:!s.invertAxes&&(this.chartService||{}).rtl}),this.append(f));p?this.getStackWrap(r,f).append(d):f.append(d);return d},e.prototype.getStackWrap=function(t,e){var o,i=t.stack,r=i&&i.group||i,n=e.children;if("string"==typeof r){for(var s=0;s<n.length;s++)if(n[s]._stackGroup===r){o=n[s];break}}else o=n[0];o||((o=new(this.stackType())({vertical:!this.options.invertAxes}))._stackGroup=r,e.append(o));return o},e.prototype.categorySlot=function(t,e,o){var i=this.options,r=t.getSlot(e),n=o.startValue();if(i.isStacked){var s=o.getSlot(n,n,!0),a=i.invertAxes?k:S;r[a+1]=r[a+2]=s[a+1]}return r},e.prototype.reflowCategories=function(t){for(var e=this.children,o=e.length,i=0;i<o;i++)e[i].reflow(t[i])},e.prototype.createAnimation=function(){this._setAnimationOptions(),t.prototype.createAnimation.call(this),rp(this.options.series)&&this._setChildrenAnimation()},e.prototype._setChildrenAnimation=function(){for(var t=this.points,e=0;e<t.length;e++){var o=t[e],i=o.visual;i&&Rr(i.options.zIndex)&&(o.options.animation=this.options.animation,o.createAnimation())}},e.prototype._setAnimationOptions=function(){var t,e=this.options,o=e.animation||{};if(e.isStacked){var i=this.seriesValueAxis(e.series[0]);t=i.getSlot(i.startValue())}else t=this.categoryAxis.getSlot(0);o.origin=new p.Point(t.x1,t.y1),o.vertical=!e.invertAxes},e}(Ua);Yr(Sp,{animation:{type:Oa}});var Ap=Sp,Pp=function(t){function e(e,o){t.call(this,o),this.value=e}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,o=this.value,i=this.owner.seriesValueAxis(e),r=i.getSlot(o.open,o.close),n=i.getSlot(o.low,o.high);r.x1=n.x1=t.x1,r.x2=n.x2=t.x2,this.realBody=r;var s=n.center().x,a=[];a.push([[s,n.y1],[s,r.y1]]),a.push([[s,r.y2],[s,n.y2]]),this.lines=a,this.box=n.clone().wrap(r),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._mainVisual=this.mainVisual(this.options),this.visual.append(this._mainVisual),this.createOverlay()},e.prototype.mainVisual=function(t){var e=new a.Group;return this.createBody(e,t),this.createLines(e,t),e},e.prototype.createBody=function(t,e){var o=a.Path.fromRect(this.realBody.toRect(),{fill:{color:this.color,opacity:e.opacity},stroke:null});e.border.width>0&&o.options.set("stroke",{color:this.getBorderColor(),width:e.border.width,dashType:e.border.dashType,opacity:Wr(e.border.opacity,e.opacity)}),Ki(o),t.append(o),vp(e)&&t.append(this.createGradientOverlay(o,{baseColor:this.color},rr({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,o,i){if(o)for(var r={stroke:{color:i.color||this.color,opacity:Wr(i.opacity,e.opacity),width:i.width,dashType:i.dashType,lineCap:"butt"}},n=0;n<o.length;n++){var s=a.Path.fromPoints(o[n],r);Ki(s),t.append(s)}},e.prototype.getBorderColor=function(){var t=this.options.border,e=t.color;return Rr(e)||(e=new on(this.color).brightness(t._brightness).toHex()),e},e.prototype.createOverlay=function(){var t=a.Path.fromRect(this.box.toRect(),{fill:{color:C,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 o=this.mainVisual(rr({},this.options,{line:{color:this.getBorderColor()}},t));return this.color=e,o},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 fn(t.x2+5,Math.max(t.y1,e.y1)+5),align:{horizontal:g,vertical:b}}},e.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},e.prototype.overlapsBox=function(t){return this.box.overlaps(t)},e}(Cn);Yr(Pp,{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>"},highlight:{opacity:1,border:{width:1,opacity:1},line:{width:1,opacity:1}},notes:{visible:!0,label:{}}}),rr(Pp.prototype,Ga),rr(Pp.prototype,Wa);var Tp=Pp;function Mp(t){return ma(t)===t.length}var Op=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,o=e.length,i=0;i<o;i++)e[i].reflow(t[i])},e.prototype.addValue=function(t,e){var o,i=e.categoryIx,r=e.category,n=e.series,s=e.seriesIx,a=this.children,p=this.options,h=t.valueFields,c=Mp(this.splitValue(h)),l=n.data[i],u=this.categoryPoints[i];u||(this.categoryPoints[i]=u=[]),c&&(o=this.createPoint(t,e));var d=a[i];d||(d=new wp({vertical:p.invertAxes,gap:p.gap,spacing:p.spacing,rtl:!p.invertAxes&&(this.chartService||{}).rtl}),this.append(d)),o&&(this.updateRange(h,e),d.append(o),o.categoryIx=i,o.category=r,o.series=n,o.seriesIx=s,o.owner=this,o.dataItem=l,o.noteText=t.fields.noteText),this.points.push(o),u.push(o)},e.prototype.pointType=function(){return Tp},e.prototype.createPoint=function(t,e){var o=e.categoryIx,i=e.category,r=e.series,n=e.seriesIx,s=this.pointType(),a=t.valueFields,p=rr({},r),h=t.fields.color||r.color;p=this.evalPointOptions(p,a,i,o,r,n),"candlestick"===r.type&&a.open>a.close&&(h=t.fields.downColor||r.downColor||r.color),or(r.color)&&(h=p.color),p.vertical=!this.options.invertAxes;var c=new s(a,p);return c.color=h,c},e.prototype.splitValue=function(t){return[t.low,t.open,t.close,t.high]},e.prototype.updateRange=function(t,e){var o=e.series.axis,i=this.splitValue(t),r=this.valueAxisRanges[o];r=this.valueAxisRanges[o]=r||{min:m,max:x},r=this.valueAxisRanges[o]={min:Math.min.apply(Math,i.concat([r.min])),max:Math.max.apply(Math,i.concat([r.max]))}},e.prototype.formatPointValue=function(t,e){var o=t.value;return this.chartService.format.auto(e,o.open,o.high,o.low,o.close,t.category)},e.prototype.animationPoints=function(){return this.points},e}(Ua);rr(Op.prototype,np);var Bp=Op,Rp=function(t){function e(e,o){t.call(this,e,o),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,o,i=this.options,r=this.value,n=this.owner.seriesValueAxis(i);this.boxSlot=o=n.getSlot(r.q1,r.q3),this.realBody=o,this.reflowBoxSlot(t),this.whiskerSlot=e=n.getSlot(r.lower,r.upper),this.reflowWhiskerSlot(t);var s=n.getSlot(r.median);if(r.mean){var a=n.getSlot(r.mean);this.meanPoints=this.calcMeanPoints(t,a)}this.whiskerPoints=this.calcWhiskerPoints(o,e),this.medianPoints=this.calcMedianPoints(t,s),this.box=e.clone().wrap(o),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 o=e.center().x;return[[[o-5,e.y1],[o+5,e.y1],[o,e.y1],[o,t.y1]],[[o-5,e.y2],[o+5,e.y2],[o,e.y2],[o,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,o=e.outliers||[],i=3*Math.abs(e.q3-e.q1),r=[],n=t.markers||{},s=0;s<o.length;s++){var a=o[s],p=rr({},(n=a<e.q3+i&&a>e.q1-i?t.outliers:t.extremes).border);Rr(p.color)||(Rr(this.color)?p.color=this.color:p.color=new on(n.background).brightness(.8).toHex());var h=new Pn({type:n.type,width:n.size,height:n.size,rotation:n.rotation,background:n.background,border:p,opacity:n.opacity});h.value=a,r.push(h)}return this.reflowOutliers(r),r},e.prototype.reflowOutliers=function(t){for(var e=this.owner.seriesValueAxis(this.options),o=this.box.center(),i=0;i<t.length;i++){var r=t[i].value,n=e.getSlot(r);this.options.vertical?n.move(o.x):n.move(void 0,o.y),this.box=this.box.wrap(n),t[i].reflow(n)}},e.prototype.mainVisual=function(e){for(var o=t.prototype.mainVisual.call(this,e),i=this.renderOutliers(e),r=0;r<i.length;r++){var n=i[r].getElement();n&&o.append(n)}return o},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}(Tp);Yr(Rp,{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:"cross",background:C,border:{width:2,opacity:1},opacity:0},extremes:{visible:!0,size:8,type:f,background:C,border:{width:2,opacity:1},opacity:0}}),rr(Rp.prototype,Ga);var Ep=Rp,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.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 o=e.center().y;return[[[e.x1,o-5],[e.x1,o+5],[e.x1,o],[t.x1,o]],[[e.x2,o-5],[e.x2,o+5],[e.x2,o],[t.x2,o]]]},e.prototype.calcMedianPoints=function(t,e){return[[[e.x1,t.y1],[e.x1,t.y2]]]},e}(Ep),Lp=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 o,i=e.categoryIx,r=e.category,n=e.series,s=e.seriesIx,a=this.children,p=this.options,h=t.valueFields,c=Mp(this.splitValue(h)),l=n.data[i],u=this.categoryPoints[i];u||(this.categoryPoints[i]=u=[]),c&&(o=this.createPoint(t,e));var d=a[i];d||(d=new wp({vertical:p.invertAxes,gap:p.gap,spacing:p.spacing,rtl:!p.invertAxes&&(this.chartService||{}).rtl}),this.append(d)),o&&(this.updateRange(h,e),d.append(o),o.categoryIx=i,o.category=r,o.series=n,o.seriesIx=s,o.owner=this,o.dataItem=l),this.points.push(o),u.push(o)},e.prototype.pointType=function(){return this.options.invertAxes?zp:Ep},e.prototype.splitValue=function(t){return[t.lower,t.q1,t.median,t.q3,t.upper]},e.prototype.updateRange=function(t,e){var o=e.series.axis,i=this.valueAxisRanges[o],r=this.splitValue(t).concat(this.filterOutliers(t.outliers));Rr(t.mean)&&(r=r.concat(t.mean)),i=this.valueAxisRanges[o]=i||{min:m,max:x},i=this.valueAxisRanges[o]={min:Math.min.apply(Math,r.concat([i.min])),max:Math.max.apply(Math,r.concat([i.max]))}},e.prototype.formatPointValue=function(t,e){var o=t.value;return this.chartService.format.auto(e,o.lower,o.q1,o.median,o.q3,o.upper,o.mean,t.category)},e.prototype.filterOutliers=function(t){for(var e=(t||[]).length,o=[],i=0;i<e;i++){var r=t[i];Rr(r)&&null!==r&&o.push(r)}return o},e.prototype.supportsPointInactiveOpacity=function(){return!1},e}(Bp),Ip=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}(Da);function jp(t){return Rr(t)&&null!==t}var Dp=function(t){function e(e,o){t.call(this,o),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,o){var i,r=t.value[e],n=e+"Value",s=e+"ErrorLow",a=e+"ErrorHigh",p=o.seriesIx,h=o.series,c=t.options.errorBars,l=o[s],u=o[a];Ji(r)&&(Ji(l)&&Ji(u)&&(i={low:l,high:u}),c&&Rr(c[n])&&(this.seriesErrorRanges=this.seriesErrorRanges||{x:[],y:[]},this.seriesErrorRanges[e][p]=this.seriesErrorRanges[e][p]||new Aa(c[n],h,e),i=this.seriesErrorRanges[e][p].getErrorRange(r,c[n])),i&&this.addPointErrorBar(i,t,e))},e.prototype.addPointErrorBar=function(t,e,o){var i=t.low,r=t.high,n=e.series,s=e.options.errorBars,a=o===S,p={};e[o+"Low"]=i,e[o+"High"]=r,e.errorBars=e.errorBars||[];var h=new Ip(i,r,a,this,n,s);e.errorBars.push(h),e.append(h),p[o]=i,this.updateRange(p,n),p[o]=r,this.updateRange(p,n)},e.prototype.addValue=function(t,e){var o,i=t.x,r=t.y,n=e.seriesIx,s=this.options.series[n],a=this.seriesMissingValues(s),p=this.seriesPoints[n],h=t;jp(i)&&jp(r)||(h=this.createMissingValue(h,a)),h&&((o=this.createPoint(h,e))&&(Object.assign(o,e),this.addErrorBar(o,k,e),this.addErrorBar(o,S,e)),this.updateRange(h,e.series)),this.points.push(o),p.push(o)},e.prototype.seriesMissingValues=function(t){return t.missingValues},e.prototype.createMissingValue=function(){},e.prototype.updateRange=function(t,e){var o=this.chartService.intl,i=e.xAxis,r=e.yAxis,n=t.x,s=t.y,a=this.xAxisRanges[i],p=this.yAxisRanges[r];jp(n)&&(a=this.xAxisRanges[i]=a||{min:m,max:x},tr(n)&&(n=Ps(o,n)),a.min=Math.min(a.min,n),a.max=Math.max(a.max,n)),jp(s)&&(p=this.yAxisRanges[r]=p||{min:m,max:x},tr(s)&&(s=Ps(o,s)),p.min=Math.min(p.min,s),p.max=Math.max(p.max,s))},e.prototype.evalPointOptions=function(t,e,o){var i=o.series,r=o.seriesIx,n={defaults:i._defaults,excluded:["data","tooltip","content","template","visual","toggle","_outOfRangeMinPoint","_outOfRangeMaxPoint"]},s=this._evalSeries[r];Rr(s)||(this._evalSeries[r]=s=Ha(t,{},n,!0));var a=t;return s&&Ha(a=rr({},t),{value:e,series:i,dataItem:o.dataItem},n),a},e.prototype.pointType=function(){return Xa},e.prototype.pointOptions=function(t,e){var o=this.seriesOptions[e];if(!o){var i=this.pointType().prototype.defaults;this.seriesOptions[e]=o=rr({},i,{markers:{opacity:t.opacity},tooltip:{format:this.options.tooltip.format},labels:{format:this.options.labels.format}},t)}return o},e.prototype.createPoint=function(t,e){var o=e.series,i=this.pointOptions(o,e.seriesIx),r=e.color||o.color;i=this.evalPointOptions(i,t,e),or(o.color)&&(r=i.color);var n=new Xa(t,i);return n.color=r,this.append(n),n},e.prototype.seriesAxes=function(t){var e=t.xAxis,o=t.yAxis,i=this.plotArea,r=e?i.namedXAxes[e]:i.axisX,n=o?i.namedYAxes[o]:i.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 "+o);return{x:r,y:n}},e.prototype.reflow=function(t){var e=this,o=this.points,i=!this.options.clip,r=0;this.traverseDataPoints((function(t,n){var s=o[r++],a=e.seriesAxes(n.series),p=a.x.getSlot(t.x,t.x,i),h=a.y.getSlot(t.y,t.y,i);if(s)if(p&&h){var c=e.pointSlot(p,h);s.reflow(c)}else s.visible=!1})),this.box=t},e.prototype.pointSlot=function(t,e){return new vn(t.x1,e.y1,t.x2,e.y2)},e.prototype.traverseDataPoints=function(t){for(var e=this.options.series,o=this.seriesPoints,i=0;i<e.length;i++){var r=e[i];o[i]||(o[i]=[]);for(var n=0;n<r.data.length;n++){var s=this._bindPoint(r,i,n),a=s.valueFields,p=s.fields;t(a,rr({pointIx:n,series:r,seriesIx:i,dataItem:r.data[n],owner:this},p))}}},e.prototype.formatPointValue=function(t,e){var o=t.value;return this.chartService.format.auto(e,o.x,o.y)},e.prototype.animationPoints=function(){for(var t=this.points,e=[],o=0;o<t.length;o++)e.push((t[o]||{}).marker);return e},e}(Cn);Yr(Dp,{series:[],tooltip:{format:"{0}, {1}"},labels:{format:"{0}, {1}"},clip:!0}),rr(Dp.prototype,np,{_bindPoint:Ua.prototype._bindPoint});var Vp=Dp,Hp=function(t){function e(e,o){t.call(this,e,o),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,o=this.options.markers,i=this.box.center(),r=(o.size+o.border.width+e.width)/2,n=new a.Group,s=new a.Circle(new p.Circle([i.x,i.y+r/5+e.width/2],r+e.width/2),{stroke:{color:"none"},fill:this.createGradient({gradient:"bubbleShadow",color:o.background,stops:[{offset:0,color:o.background,opacity:.3},{offset:1,color:o.background,opacity:0}]})}),h=new a.Circle(new p.Circle([i.x,i.y],r),{stroke:{color:e.color||new on(o.background).brightness(.8).toHex(),width:e.width,opacity:e.opacity},fill:{color:o.background,opacity:t.opacity}});return n.append(s,h),n},e}(Xa);Hp.prototype.defaults=rr({},Hp.prototype.defaults,{labels:{position:d},highlight:{opacity:1,border:{color:"#fff",width:2,opacity:1}}}),Hp.prototype.defaults.highlight.zIndex=void 0;var Fp=Hp,Np=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=x,t.prototype._initFields.call(this)},e.prototype.addValue=function(e,o){null!==e.size&&(e.size>0||e.size<0&&o.series.negativeValues.visible)?(this._maxSize=Math.max(this._maxSize,Math.abs(e.size)),t.prototype.addValue.call(this,e,o)):(this.points.push(null),this.seriesPoints[o.seriesIx].push(null))},e.prototype.reflow=function(e){this.updateBubblesSize(e),t.prototype.reflow.call(this,e)},e.prototype.pointType=function(){return Fp},e.prototype.createPoint=function(t,e){var o=e.series,i=o.data.length,r=e.pointIx*(600/i),n={delay:r,duration:600-r,type:"bubble"},s=e.color||o.color;t.size<0&&o.negativeValues.visible&&(s=Wr(o.negativeValues.color,s));var a=rr({labels:{animation:{delay:r,duration:600-r}}},this.pointOptions(o,e.seriesIx),{markers:{type:f,border:o.border,opacity:o.opacity,animation:n}});a=this.evalPointOptions(a,t,e),or(o.color)&&(s=a.color),a.markers.background=s;var p=new Fp(t,a);return p.color=s,this.append(p),p},e.prototype.updateBubblesSize=function(t){for(var e=this.options.series,o=Math.min(t.width(),t.height()),i=0;i<e.length;i++)for(var r=e[i],n=this.seriesPoints[i],s=(r.minSize||Math.max(.02*o,10))/2,a=(r.maxSize||.2*o)/2,p=Math.PI*s*s,h=(Math.PI*a*a-p)/this._maxSize,c=0;c<n.length;c++){var l=n[c];if(l){var u=Math.abs(l.value.size)*h,d=Math.sqrt((p+u)/Math.PI),f=Wr(l.options.zIndex,0)+(1-d/a);rr(l.options,{zIndex:f,markers:{size:2*d,zIndex:f},labels:{zIndex:f+1}})}}},e.prototype.formatPointValue=function(t,e){var o=t.value;return this.chartService.format.auto(e,o.x,o.y,o.size,t.category)},e.prototype.createAnimation=function(){},e.prototype.createVisual=function(){},e}(Vp);Yr(Np,{tooltip:{format:"{3}"},labels:{format:"{3}"}});var Up=Np,Gp=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}(Pn);rr(Gp.prototype,Ga);var Wp=Gp,qp=function(t){function e(e,o){t.call(this,o),this.aboveAxis=this.options.aboveAxis,this.color=o.color||C,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,Rr(this.value.target)&&(this.target=new Wp({type:t.target.shape,background:t.target.color||this.color,opacity:t.opacity,zIndex:t.zIndex,border:t.target.border,vAlign:b,align:_}),this.target.value=this.value,this.target.dataItem=this.dataItem,this.target.series=this.series,this.append(this.target)),this.createNote())},e.prototype.reflow=function(t){this.render();var e=this.options,o=this.target,i=this.owner,r=e.invertAxes,n=i.seriesValueAxis(this.options),s=i.categorySlot(i.categoryAxis,e.categoryIx,n),a=n.getSlot(this.value.target),p=r?a:s,h=r?s:a;if(o){var c=new vn(p.x1,h.y1,p.x2,h.y2);o.options.height=r?c.height():e.target.line.width,o.options.width=r?e.target.line.width:c.width(),o.reflow(c)}this.note&&this.note.reflow(t),this.box=t},e.prototype.createVisual=function(){t.prototype.createVisual.call(this);var e=this.options,o=a.Path.fromRect(this.box.toRect(),{fill:{color:this.color,opacity:e.opacity},stroke:null});e.border.width>0&&o.options.set("stroke",{color:e.border.color||this.color,width:e.border.width,dashType:e.border.dashType,opacity:Wr(e.border.opacity,e.opacity)}),this.bodyVisual=o,Ki(o),this.visual.append(o)},e.prototype.createAnimation=function(){this.bodyVisual&&(this.animation=a.Animation.create(this.bodyVisual,this.options.animation))},e.prototype.createHighlight=function(t){return a.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}(Cn);qp.prototype.tooltipAnchor=mp.prototype.tooltipAnchor,Yr(qp,{border:{width:1},vertical:!1,opacity:1,target:{shape:"",border:{width:0,color:"green"},line:{width:2}},tooltip:{format:"Current: {0}<br />Target: {1}"}}),rr(qp.prototype,Ga),rr(qp.prototype,Wa);var Xp=qp,Yp=function(t){function e(e,o){!function(t){for(var e=t.series,o=0;o<e.length;o++){var i=e[o],r=i.data;!r||A(r[0])||nr(r[0])||(i.data=[r])}}(o),t.call(this,e,o)}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,o=e.length,i=0;i<o;i++)e[i].reflow(t[i])},e.prototype.plotRange=function(t){var e=t.series,o=this.seriesValueAxis(e),i=this.categoryAxisCrossingValue(o);return[i,t.value.current||i]},e.prototype.createPoint=function(t,e){var o=e.categoryIx,i=e.category,r=e.series,n=e.seriesIx,s=this.options,a=this.children,p=t.valueFields,h=rr({vertical:!s.invertAxes,overlay:r.overlay,categoryIx:o,invertAxes:s.invertAxes},r),c=t.fields.color||r.color;h=this.evalPointOptions(h,p,i,o,r,n),or(r.color)&&(c=h.color);var l=new Xp(p,h);l.color=c;var u=a[o];return u||(u=new wp({vertical:s.invertAxes,gap:s.gap,spacing:s.spacing,rtl:!s.invertAxes&&(this.chartService||{}).rtl}),this.append(u)),u.append(l),l},e.prototype.updateRange=function(t,e){var o=t.current,i=t.target,r=e.series.axis,n=this.valueAxisRanges[r];Rr(o)&&!isNaN(o)&&Rr(i&&!isNaN(i))&&((n=this.valueAxisRanges[r]=n||{min:m,max:x}).min=Math.min(n.min,o,i),n.max=Math.max(n.max,o,i))},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 o=t[e];o.options.animation=this.options.animation,o.createAnimation()}},e}(Ua);Yp.prototype._setAnimationOptions=Ap.prototype._setAnimationOptions,Yr(Yp,{animation:{type:Oa}});var Zp=Yp,Qp=function(t){function e(e,o){t.call(this),this.chartService=e,this.options=rr({},this.options,o)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getStyle=function(t,e){var o=t.background,i=t.border.color;if(e){var r=e.color||e.options.color;o=Wr(o,r),i=Wr(i,r)}var n=cr(t.padding||{},"auto");return{backgroundColor:o,borderColor:i,font:t.font,color:t.color,opacity:t.opacity,borderWidth:sr(t.border.width),paddingTop:sr(n.top),paddingBottom:sr(n.bottom),paddingLeft:sr(n.left),paddingRight:sr(n.right)}},e.prototype.show=function(t,e,o){t.format=e.format;var i=this.getStyle(e,o);t.style=i;var r=new on(i.backgroundColor);Rr(e.color)||r.isDark()||(t.className="k-chart-tooltip-inverse"),this.chartService.notify("showTooltip",t),this.visible=!0},e.prototype.hide=function(){this.chartService&&this.chartService.notify("hideTooltip"),this.visible=!1},e.prototype.destroy=function(){delete this.chartService},e}(O);Yr(Qp,{border:{width:1},opacity:1});var Kp=Qp,$p=function(t){function e(e,o,i){t.call(this,e,i),this.crosshair=o,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,o=this.options,i=e[o.stickyMode?"getCategory":"getValue"](t),r=i;o.format?r=this.formatService.auto(o.format,i):e.options.type===y&&(r=this.formatService.auto(e.options.labels.dateFormats[e.options.baseUnit],i)),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("hideTooltip",{crosshair:this.crosshair,axisName:this.axisName,axisIndex:this.crosshair.axis.axisIndex})},e.prototype.getAnchor=function(){var t,e,o,i=this.crosshair,r=this.options,n=r.position,s=r.padding,a=!i.axis.options.vertical,p=i.line.bbox();return a?(t=d,n===u?(e=b,o=p.bottomLeft().translate(0,s)):(e=u,o=p.topLeft().translate(0,-s))):(e=d,n===g?(t=_,o=p.topLeft().translate(-s,0)):(t=g,o=p.topRight().translate(s,0))),{point:o,align:{horizontal:t,vertical:e}}},e}(Kp);Yr($p,{padding:10});var Jp=$p,th=function(t){function e(e,o,i){t.call(this,i),this.axis=o,this.stickyMode=o instanceof Bs;var r=this.options.tooltip;r.visible&&(this.tooltip=new Jp(e,this,rr({},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,o=this.point,i=e.options.vertical,r=this.getBox(),n=i?S:k,s=new p.Point(r.x1,r.y1);if(t=i?new p.Point(r.x2,r.y1):new p.Point(r.x1,r.y2),o)if(this.stickyMode){var a=e.getSlot(e.pointCategoryIndex(o));s[n]=t[n]=a.center()[n]}else s[n]=t[n]=o[n];this.box=r,this.line.moveTo(s).lineTo(t)},e.prototype.getBox=function(){for(var t,e=this.axis,o=e.pane.axes,i=o.length,r=e.options.vertical,n=e.lineBox().clone(),s=r?k:S,a=0;a<i;a++){var p=o[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 a.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}(Cn);Yr(th,{color:l,width:2,zIndex:-1,tooltip:{visible:!1}});var eh=th,oh=function(t){function e(e,o){t.call(this,e),this.pane=o}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,o=0;o<e;o++)if(!0===t[o].options.clip)return!0;return!1},e.prototype._clipBox=function(){return this.pane.chartsBox()},e.prototype.createVisual=function(){if(this.visual=new a.Group({zIndex:0}),this.shouldClip()){var t=(this.clipBox=this._clipBox()).toRect(),e=a.Path.fromRect(t);Ki(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,o=0;o<t.length;o++)for(var i=t[o].points||{},r=i.length,n=0;n<r;n++){var s=i[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.destroy=function(){t.prototype.destroy.call(this),delete this.parent},e}(Cn);oh.prototype.isStackRoot=!0;var ih=oh,rh=function(t){function e(e){t.call(this,e),this.id="pane"+nh++,this.createTitle(),this.content=new Cn,this.chartContainer=new ih({},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;nr(t)&&(t=rr({},t,{align:t.position,position:b})),this.title=Fn.buildTitle(t,this,e.prototype.options.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 o=0;o<this.charts.length;o++)t.removeChart(this.charts[o])}this.axes=[],this.charts=[],this.content.destroy(),this.content.children=[],this.chartContainer.children=[]},e.prototype.reflow=function(e){var o;Vr(this.children)===this.content&&(o=this.children.pop()),t.prototype.reflow.call(this,e),o&&this.children.push(o),this.title&&(this.contentBox.y1+=this.title.box.height())},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),o=[],i=[],r=0;r<t.length;r++)for(var n=t[r],s=n.options.vertical,a=s?o:i,p=0;p<e.length;p++)if(0===a.length){var h=e[p];s!==h.options.vertical&&Or(a,n.createGridLines(h))}},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,o=new vn,i=0;i<e;i++){var r=t[i],n=r.options.vertical?S:k,s=r.lineBox();o[n+1]=s[n+1],o[n+2]=s[n+2]}if(0===o.x2)for(var a=this.parent.axes,p=a.length,h=0;h<p;h++){var c=a[h];if(!c.options.vertical){var l=c.lineBox();o.x1=l.x1,o.x2=l.x2}}return o},e.prototype.clipBox=function(){return this.chartContainer.clipBox},e.prototype.notifyRender=function(){var t=this.getService();t&&t.notify("paneRender",{pane:new va(this),index:this.paneIndex,name:this.options.name})},e}(Sn),nh=1;rh.prototype.isStackRoot=!0,Yr(rh,{zIndex:-1,shrinkToFit:!0,title:{align:g},visible:!0});var sh=rh;function ah(t,e){null!==e&&t.push(e)}function ph(t,e,o){var i=e.visible;if(Rr(i))return i;var r=t.pointVisibility;return r?r[o]:void 0}function hh(t){for(var e=t.data,o=[],i=0,r=0,n=0;n<e.length;n++){var s=Ca.current.bindPoint(t,n),a=s.valueFields.value;tr(a)&&(a=parseFloat(a)),Ji(a)?(s.visible=!1!==ph(t,s.fields,n),s.value=Math.abs(a),o.push(s),s.visible&&(i+=s.value),0!==a&&r++):o.push(null)}return{total:i,points:o,count:r}}function ch(t,e){return t&&e?t.toLowerCase()===e.toLowerCase():t===e}function lh(t,e){for(var o=[],i=[].concat(e),r=0;r<t.length;r++){var n=t[r];wr(n.type,i)&&o.push(n)}return o}function uh(t,e,o){if(null===e)return e;var i="_date_"+t,r=e[i];return r||(r=Ps(o,gr(t)(e)),e[i]=r),r}function dh(t,e){var o=t.type,i=e instanceof Date;return!o&&i||ch(o,y)}function fh(t){return 1===t.length?t[0]:t}var yh=/area/i;function vh(t,e){var o=Ca.current.bindPoint(t,null,e).valueFields;for(var i in o)if(er(o[i]))return!0}function gh(t){var e,o,i=t.start,r=t.dir,n=t.min,s=t.max,a=t.getter,p=t.hasItem,h=t.series,c=i;do{p(c+=r)&&(e=vh(h,(o=a(c)).item))}while(n<=c&&c<=s&&!e);if(e)return o}function mh(t,e,o,i,r){var n=e.min,s=e.max,a=n>0&&n<o,p=s+1<o;if(a||p){var h,c,l;if("interpolate"!==function(t){return t.missingValues?t.missingValues:yh.test(t.type)||t.stack?Ma:"interpolate"}(t))a&&(h=i(n-1)),p&&(c=i(s+1));else a&&(h=vh(t,(l=i(n-1)).item)?l:gh({start:n,dir:-1,min:0,max:o-1,getter:i,hasItem:r,series:t})),p&&(c=vh(t,(l=i(s+1)).item)?l:gh({start:s,dir:1,min:0,max:o-1,getter:i,hasItem:r,series:t}));h&&(t._outOfRangeMinPoint=h),c&&(t._outOfRangeMaxPoint=c)}}var xh=function(t){function e(e,o,i){t.call(this,o),this.initFields(e,o),this.series=e,this.initSeries(),this.charts=[],this.options.legend=this.options.legend||{},this.options.legend.items=[],this.axes=[],this.crosshairs=[],this.chartService=i,this.originalOptions=o,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.createPanes=function(){for(var t=this.options.title||{},e=this.options.paneDefaults,o=this.options.panes||[],i=Math.max(o.length,1),r=[],n=rr({title:{color:t.color}},e),s=0;s<i;s++){var a=rr({},n,o[s]);tr(a.title)&&(a.title=rr({text:a.title},n.title));var p=new sh(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 o=t[e],i=0;i<o.axes.length;i++){var r=o.axes[i],n=this.crosshairOptions(r);if(n&&n.visible){var s=new eh(this.chartService,r,n);this.crosshairs.push(s),o.content.append(s)}}},e.prototype.removeCrosshairs=function(t){for(var e=this.crosshairs,o=t.axes,i=e.length-1;i>=0;i--)for(var r=0;r<o.length;r++)if(e[i].axis===o[r]){e.splice(i,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,o=this.panes,i=0;i<o.length;i++)if(o[i].options.name===t){e=o[i];break}return e||o[0]},e.prototype.findPointPane=function(t){for(var e,o=this.panes,i=0;i<o.length;i++)if(o[i].box.containsPoint(t)){e=o[i];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=[],o=0;o<this.axes.length;o++){var i=this.axes[o];t!==i?e.push(i):i.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=[],o=0;o<this.charts.length;o++){var i=this.charts[o];i!==t?e.push(i):i.destroy()}this.charts=e},e.prototype.addToLegend=function(t){for(var e=t.length,o=this.options.legend,i=o.labels||{},r=o.inactiveItems||{},n=r.labels||{},s=[],a=0;a<e;a++){var p=t[a],h=!1!==p.visible;if(!1!==p.visibleInLegend){var c=p.name,l=h?fr(i):fr(n)||fr(i);l&&(c=l({text:jp(c)?c:"",series:p}));var u=p._defaults,d=p.color;or(d)&&u&&(d=u.color);var f=void 0,y=void 0;h?(f={},y=d):(f={color:n.color,font:n.font},y=r.markers.color),jp(c)&&""!==c&&s.push({text:c,labels:f,markerColor:y,series:p,active:h})}}Or(o.items,s)},e.prototype.groupAxes=function(t){for(var e=[],o=[],i=0;i<t.length;i++)for(var r=t[i].axes,n=0;n<r.length;n++){var s=r[n];s.options.vertical?o.push(s):e.push(s)}return{x:e,y:o,any:e.concat(o)}},e.prototype.groupSeriesByPane=function(){for(var t=this.series,e={},o=0;o<t.length;o++){var i=t[o],r=this.seriesPaneName(i);e[r]?e[r].push(i):e[r]=[i]}return e},e.prototype.filterVisibleSeries=function(t){for(var e=[],o=0;o<t.length;o++){var i=t[o];!1!==i.visible&&e.push(i)}return e},e.prototype.reflow=function(t){var e=this.options.plotArea,o=this.panes,i=cr(e.margin);this.box=t.clone().unpad(i),this.reflowPanes(),this.detachLabels(),this.reflowAxes(o),this.reflowCharts(o)},e.prototype.redraw=function(t){var e=[].concat(t);this.initSeries();var o=this.getRoot();o&&o.cleanGradients();for(var i=0;i<e.length;i++)this.removeCrosshairs(e[i]),e[i].empty();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 o=t.options,i=[].concat(o.axisCrossingValues||o.axisCrossingValue),r=e.length-i.length,n=i[0]||0,s=0;s<r;s++)i.push(n);return i},e.prototype.alignAxisTo=function(t,e,o,i){var r=t.getSlot(o,o,!0),n=t.options.reverse?2:1,s=e.getSlot(i,i,!0),a=e.options.reverse?2:1,p=t.box.translate(s[k+a]-r[k+n],s[S+a]-r[S+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 o=t[0],i=e[0],r=this.axisCrossingValues(o,e),n=this.axisCrossingValues(i,t),s={},a={},p={},h={},c=0;c<e.length;c++){var l=e[c],d=l.pane,f=d.id,y=!1!==l.options.visible,v=wh(t,d)||o,m=r;v!==o&&(m=this.axisCrossingValues(v,e)),this.alignAxisTo(l,v,n[c],m[c]),l.options._overlap||(Ur(l.lineBox().x1)===Ur(v.lineBox().x1)&&(s[f]&&l.reflow(l.box.alignTo(s[f].box,g).translate(-l.options.margin,0)),y&&(s[f]=l)),Ur(l.lineBox().x2)===Ur(v.lineBox().x2)&&(l._mirrored||(l.options.labels.mirror=!l.options.labels.mirror,l._mirrored=!0),this.alignAxisTo(l,v,n[c],m[c]),a[f]&&l.reflow(l.box.alignTo(a[f].box,_).translate(l.options.margin,0)),y&&(a[f]=l)),0!==c&&i.pane===l.pane&&(l.alignTo(i),l.reflow(l.box)))}for(var x=0;x<t.length;x++){var w=t[x],C=w.pane,k=C.id,S=!1!==w.options.visible,A=wh(e,C)||i,P=n;A!==i&&(P=this.axisCrossingValues(A,t)),this.alignAxisTo(w,A,r[x],P[x]),w.options._overlap||(Ur(w.lineBox().y1)===Ur(A.lineBox().y1)&&(w._mirrored||(w.options.labels.mirror=!w.options.labels.mirror,w._mirrored=!0),this.alignAxisTo(w,A,r[x],P[x]),p[k]&&w.reflow(w.box.alignTo(p[k].box,b).translate(0,-w.options.margin)),S&&(p[k]=w)),Ur(w.lineBox().y2,3)===Ur(A.lineBox().y2,3)&&(h[k]&&w.reflow(w.box.alignTo(h[k].box,u).translate(0,w.options.margin)),S&&(h[k]=w)),0!==x&&(w.alignTo(o),w.reflow(w.box)))}},e.prototype.shrinkAxisWidth=function(t){for(var e=this.groupAxes(t).any,o=bh(e),i=0,r=0;r<t.length;r++){var n=t[r];n.axes.length>0&&(i=Math.max(i,o.width()-n.contentBox.width()))}if(0!==i)for(var s=0;s<e.length;s++){var a=e[s];a.options.vertical||a.reflow(a.box.shrink(i,0))}},e.prototype.shrinkAxisHeight=function(t){for(var e,o=0;o<t.length;o++){var i=t[o],r=i.axes,n=Math.max(0,bh(r).height()-i.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,o=0,i=0;i<t.length;i++){var r=t[i],n=r.axes,s=r.contentBox;if(n.length>0){var a=bh(n),p=Math.max(s.y1-a.y1,s.y2-a.y2);o=Math.max(o,s.x1-a.x1);for(var h=0;h<n.length;h++){var c=n[h];c.reflow(c.box.translate(0,p))}}}for(var l=0;l<e.length;l++){var u=e[l];u.reflow(u.box.translate(o,0))}},e.prototype.reflowAxes=function(t){for(var e=this.groupAxes(t),o=0;o<t.length;o++)this.reflowPaneAxes(t[o]);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,o=this.panes,i=Ch(o),r=0;r<i.length;r++){i[r].autoRotateLabels()&&(e=!0)}if(e){for(var n=0;n<o.length;n++)this.reflowPaneAxes(o[n]);t.x.length>0&&t.y.length>0&&(this.alignAxes(t.x,t.y),this.shrinkAxisWidth(o))}},e.prototype.reflowPaneAxes=function(t){var e=t.axes,o=e.length;if(o>0)for(var i=0;i<o;i++)e[i].reflow(t.contentBox)},e.prototype.reflowCharts=function(t){for(var e=this.charts,o=e.length,i=this.box,r=0;r<o;r++){var n=e[r].pane;n&&!wr(n,t)||e[r].reflow(i)}},e.prototype.reflowPanes=function(){for(var t=this.box,e=this.panes,o=e.length,i=t.height(),r=0,n=t.y1,s=0;s<o;s++){var a=e[s],p=a.options.height;if(a.options.width=t.width(),a.options.height){if(p.indexOf&&p.indexOf("%")){var h=parseInt(p,10)/100;a.options.height=h*t.height()}a.reflow(t.clone()),i-=a.options.height}else r++}for(var c=0;c<o;c++){var l=e[c];l.options.height||(l.options.height=i/r)}for(var u=0;u<o;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,o=e.length,i=0;i<o;i++)for(var r=e[i],n=0;n<o;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=[],o=0;o<t.length;o++)e.push(t[o].chartsBox());return e},e.prototype.addBackgroundPaths=function(t){for(var e=this.chartsBoxes(),o=0;o<e.length;o++)t.paths.push(a.Path.fromRect(e[o].toRect()))},e.prototype.backgroundContainsPoint=function(t){for(var e=this.chartsBoxes(),o=0;o<e.length;o++)if(e[o].containsPoint(t))return!0},e.prototype.createVisual=function(){t.prototype.createVisual.call(this);var e,o=this.options.plotArea,i=o.opacity,r=o.background,n=o.border;void 0===n&&(n={}),""!==(e=r)&&null!==e&&"none"!==e&&"transparent"!==e&&Rr(e)||(r=C,i=0);var s=this._bgVisual=new a.MultiPath({fill:{color:r,opacity:i},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,o=[];if(null!==t)for(var i=0;i<e.length;i++){if("_navigator"!==e[i].pane.options.name){var r=e[i].categoryPoints[t];if(r&&r.length)for(var n=0;n<r.length;n++){var s=r[n];s&&Rr(s.value)&&null!==s.value&&o.push(s)}}}return o},e.prototype.pointsBySeriesIndex=function(t){return this.filterPoints((function(e){return e.series.index===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,o=[],i=0;i<e.length;i++)for(var r=e[i].points,n=0;n<r.length;n++){var s=r[n];s&&!1!==s.visible&&t(s)&&o.push(s)}return o},e.prototype.findPoint=function(t){for(var e=this.charts,o=0;o<e.length;o++)for(var i=e[o].points,r=0;r<i.length;r++){var n=i[r];if(n&&!1!==n.visible&&t(n))return n}},e.prototype.paneByPoint=function(t){for(var e=this.panes,o=0;o<e.length;o++){var i=e[o];if(i.box.containsPoint(t))return i}},e.prototype.detachLabels=function(){var t=this.groupAxes(this.panes),e=t.x,o=t.y;this.detachAxisGroupLabels(o,e),this.detachAxisGroupLabels(e,o)},e.prototype.detachAxisGroupLabels=function(t,e){for(var o=0,i=0;i<t.length;i++){var r=t[i],n=r.pane,s=wh(e,n)||e[0],a=i+o,p=this.createLabelAxis(r,a,s);if(p){o++;var h=n.axes.indexOf(r)+o;n.appendAxisAt(p,h)}}},e.prototype.createLabelAxis=function(t,e,o){var i=t.options.labels,r=i.position,n="end"!==r&&"start"!==r,s=i.visible;if(n||!1===s)return null;var a=this.groupAxes(this.panes),p=o.options.vertical?a.x:a.y,h=this.axisCrossingValues(o,p),c="end"===r,l=o.range(),u=c?l.max:l.min;if(Hr(h[e],l.min,l.max)-u==0)return null;h.splice(e+1,0,u),o.options.axisCrossingValues=h;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}(Cn);function _h(t){return!t.pane.axes.some((function(e){return e.options.vertical===t.options.vertical&&e!==t&&!1!==e.options.visible}))}function bh(t){for(var e,o=t.length,i=0;i<o;i++){var r=t[i],n=!1!==r.options.visible;if(n||_h(r)){var s=n?r.contentBox():r.lineBox();e?e.wrap(s):e=s.clone()}}return e||new vn}function wh(t,e){for(var o=0;o<t.length;o++){var i=t[o];if(i&&i.pane===e)return i}}var Ch=function(t){return t.reduce((function(t,e){return t.concat(e.axes)}),[])};Yr(xh,{series:[],plotArea:{margin:{}},background:"",border:{color:l,width:0},paneDefaults:{title:{}},legend:{inactiveItems:{labels:{color:"#919191"},markers:{color:"#919191"}}}});var kh=xh,Sh={hover:function(t,e){this._dispatchEvent(t,e,"plotAreaHover")},click:function(t,e){this._dispatchEvent(t,e,"plotAreaClick")}};function Ah(t,e,o){var i=e,r=t;if(t.indexOf(".")>-1){for(var n=t.split(".");n.length>1;)r=n.shift(),Rr(i[r])||(i[r]={}),i=i[r];r=n.shift()}i[r]=o}var Ph=function(t){function e(e,o,i){t.call(this);var r=o.canonicalFields(e),n=o.valueFields(e),s=o.sourceFields(e,r),a=this._seriesFields=[],p=i.query(e.type),h=e.aggregate||p;this._series=e,this._binder=o;for(var c=0;c<r.length;c++){var l=r[c],u=void 0;if(nr(h))u=h[l];else{if(0!==c&&!wr(l,n))break;u=h}u&&a.push({canonicalName:l,name:s[c],transform:or(u)?u:_a[u]})}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.aggregatePoints=function(t,e){var o=this._series,i=this._seriesFields,r=this._bindPoints(t||[]),n=r.dataItems[0],s={};if(n&&!Ji(n)&&!A(n)){var a=function(){};a.prototype=n,s=new a}for(var p=0;p<i.length;p++){var h=i[p],c=this._bindField(r.values,h.canonicalName),l=h.transform(c,o,r.dataItems,e);if(!(null===l||!nr(l)||Rr(l.length)||l instanceof Date)){s=l;break}Rr(l)&&Ah(h.name,s,l)}return s},e.prototype._bindPoints=function(t){for(var e=this._binder,o=this._series,i=[],r=[],n=0;n<t.length;n++){var s=t[n];i.push(e.bindPoint(o,s)),r.push(o.data[s])}return{values:i,dataItems:r}},e.prototype._bindField=function(t,e){for(var o=[],i=t.length,r=0;r<i;r++){var n=t[r],s=n.valueFields,a=void 0;a=Rr(s[e])?s[e]:n.fields[e],o.push(a)}return o},e}(O),Th=function(t){function e(){t.call(this),this._defaults={}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.register=function(t,e){for(var o=0;o<t.length;o++)this._defaults[t[o]]=e},e.prototype.query=function(t){return this._defaults[t]},e}(O);Th.current=new Th;var Mh=Th,Oh=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=rr({},t,t.from),o=rr({},t,t.to);e.visible&&(this.labelFrom=this._createLabel(e),this.append(this.labelFrom)),o.visible&&(this.labelTo=this._createLabel(o),this.append(this.labelTo))},e.prototype._createLabel=function(t){var e,o=fr(t),i=this.pointData();return e=o?o(i):this.formatValue(t.format),new yp(e,rr({vertical:this.options.vertical},t),i)},e.prototype.reflow=function(t){this.render();var e=this.labelFrom,o=this.labelTo,i=this.value;this.box=t,e&&(e.options.aboveAxis=i.from>i.to,e.reflow(t)),o&&(o.options.aboveAxis=i.to>i.from,o.reflow(t)),this.note&&this.note.reflow(t)},e}(mp);Oh.prototype.defaults=rr({},Oh.prototype.defaults,{labels:{format:"{0} - {1}"},tooltip:{format:"{1}"}});var Bh=Oh,Rh=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 Bh},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 o=e.series.axis,i=t.from,r=t.to,n=this.valueAxisRanges[o];null!==t&&Ji(i)&&Ji(r)&&((n=this.valueAxisRanges[o]=n||{min:m,max:x}).min=Math.min(n.min,i),n.max=Math.max(n.max,i),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}(Ap);Rh.prototype.plotLimits=Ua.prototype.plotLimits;var Eh=Rh,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.aliasFor=function(){return this.parent},e}(Xa),Lh=function(t){function e(e,o){t.call(this),this.value=e,this.options=o,this.aboveAxis=Wr(this.options.aboveAxis,!0),this.tooltipTracking=!0,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,o=t.labels,i=this.value,r=this.fromPoint=new zh(i,rr({},this.options,{labels:o.from,markers:e.from})),n=this.toPoint=new zh(i,rr({},this.options,{labels:o.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,o=t.to;this.positionLabels(e,o),this.fromPoint.reflow(e),this.toPoint.reflow(o),this.box=this.fromPoint.markerBox().clone().wrap(this.toPoint.markerBox())},e.prototype.createHighlight=function(){var t=new a.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.tooltipAnchor=function(){var t=this.owner.pane.clipBox();if(!t||t.overlaps(this.box)){var e,o,i,r=this.box,n=r.center();return this.options.vertical?(e=n.x,o=r.y1-5,i=u):(e=r.x2+5,o=n.y,i=d),{point:new fn(e,o),align:{horizontal:"left",vertical:i}}}},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 o,i,r=this.options,n=r.labels,s=r.vertical;"auto"===n.position&&(s?e.y1<=t.y1?(i="above",o="below"):(i="below",o="above"):e.x1<=t.x1?(i=g,o=_):(i=_,o=g),n.from&&n.from.position||(this.fromPoint.options.labels.position=o),n.to&&n.to.position||(this.toPoint.options.labels.position=i))},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}(Cn);rr(Lh.prototype,Ga),rr(Lh.prototype,Wa),Lh.prototype.defaults={markers:{visible:!1,background:C,size:8,type:f,border:{width:2},opacity:1},labels:{visible:!1,margin:cr(3),padding:cr(4),animation:{type:"fadeIn",delay:600},position:"auto"},notes:{label:{}},highlight:{markers:{border:{color:C,width:2}},zIndex:100},tooltip:{format:"{0} - {1}"}};var Ih=Lh,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.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 a.Path(t),o=new a.Path(t);e.segments.push.apply(e.segments,this.strokeSegments()),o.segments.push.apply(o.segments,this.stackSegments()),this.visual.append(e),this.visual.append(o)},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}(pp),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.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 ua).process(this.toGeometryPoints(t))},e}(jh),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.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}(jh);rr(Vh.prototype,Ka);var Hh=Vh,Fh=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 Ih},e.prototype.createPoint=function(t,e){var o=e.categoryIx,i=e.category,r=e.series,n=e.seriesIx,s=t.valueFields;if(!jp(s.from)&&!jp(s.to)){if(this.seriesMissingValues(r)!==Ma)return null;s={from:0,to:0}}var a=this.pointOptions(r,n);a=this.evalPointOptions(a,s,i,o,r,n);var p=t.fields.color||r.color;or(r.color)&&(p=a.color);var h=new Ih(s,a);return h.color=p,this.append(h),h},e.prototype.createSegment=function(t,e,o){var i=(e.line||{}).style;return new("smooth"===i?Dh:"step"===i?Hh:jh)(t,e,o)},e.prototype.plotRange=function(t,e){return t?[t.value.from,t.value.to]:[e,e]},e.prototype.valueSlot=function(t,e){var o=t.getSlot(e[0],e[0],!this.options.clip),i=t.getSlot(e[1],e[1],!this.options.clip);if(o&&i)return{from:o,to:i}},e.prototype.pointSlot=function(t,e){var o,i,r=e.from,n=e.to;return this.options.invertAxes?(o=new vn(r.x1,t.y1,r.x2,t.y2),i=new vn(n.x1,t.y1,n.x2,t.y2)):(o=new vn(t.x1,r.y1,t.x2,r.y2),i=new vn(t.x1,n.y1,t.x2,n.y2)),{from:o,to:i}},e.prototype.addValue=function(e,o){var i=e.valueFields;Ji(i.from)||(i.from=i.to),Ji(i.to)||(i.to=i.from),t.prototype.addValue.call(this,e,o)},e.prototype.updateRange=function(t,e){if(null!==t&&Ji(t.from)&&Ji(t.to)){var o=e.series.axis,i=this.valueAxisRanges[o]=this.valueAxisRanges[o]||{min:m,max:x},r=t.from,n=t.to;i.min=Math.min(i.min,r,n),i.max=Math.max(i.max,r,n)}},e.prototype.formatPointValue=function(t,e){var o=t.value;return this.chartService.format.auto(e,o.from,o.to)},e.prototype.animationPoints=function(){for(var t=this.points,e=[],o=0;o<t.length;o++){var i=t[o];i&&(e.push((i.fromPoint||{}).marker),e.push((i.toPoint||{}).marker))}return e.concat(this._segments)},e}(Ua);rr(Fh.prototype,ep,np);var Nh=Fh,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.reflow=function(t){var e=this.options,o=this.value,i=this.owner.seriesValueAxis(e),r=[],n=[],s=[],a=i.getSlot(o.low,o.high),p=i.getSlot(o.open,o.open),h=i.getSlot(o.close,o.close);p.x1=h.x1=a.x1=t.x1,p.x2=h.x2=a.x2=t.x2;var c=a.center().x;r.push([p.x1,p.y1]),r.push([c,p.y1]),n.push([c,h.y1]),n.push([h.x2,h.y1]),s.push([c,a.y1]),s.push([c,a.y2]),this.lines=[r,n,s],this.box=a.clone().wrap(p.clone().wrap(h)),this.reflowNote()},e.prototype.createBody=function(){},e}(Tp),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.pointType=function(){return Uh},e}(Bp),Wh=function(t){function e(e,o,i){t.call(this),this.from=e,this.to=o,this.series=i}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,o=this.to.box,i=[];if(t.isVertical){var r=t.aboveAxis?e.y1:e.y2;i.push([e.x1,r],[o.x2,r])}else{var n=t.aboveAxis?e.x2:e.x1;i.push([n,e.y1],[n,o.y2])}return i},e.prototype.createVisual=function(){t.prototype.createVisual.call(this);var e=this.series.line||{},o=a.Path.fromPoints(this.linePoints(),{stroke:{color:e.color,width:e.width,opacity:e.opacity,dashType:e.dashType}});Ki(o),this.visual.append(o)},e}(Cn);Yr(Wh,{animation:{type:"fadeIn",delay:600}});var qh=Wh,Xh=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,o=Fa(e),i=!this.options.invertAxes,r=0;r<e.length;r++)for(var n=e[r],s=0,a=0,p=0;p<o;p++){var h=Ca.current.bindPoint(n,p),c=h.valueFields.value,l=h.fields.summary,u=s,d=void 0;l?"total"===l.toLowerCase()?(h.valueFields.value=s,u=0,d=s):(h.valueFields.value=a,d=u-a,a=0):Ji(c)&&(a+=c,d=s+=c),t(h,{category:this.categoryAxis.categoryAt(p),categoryIx:p,series:n,seriesIx:r,total:s,runningTotal:a,from:u,to:d,isVertical:i})}},e.prototype.updateRange=function(e,o){t.prototype.updateRange.call(this,{value:o.to},o)},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,o=this.segments=[],i=0;i<t.length;i++){var r=t[i],n=e[i];if(n)for(var s=void 0,a=0;a<n.length;a++){var p=n[a];if(p&&s){var h=new qh(s,p,r);o.push(h),this.append(h)}s=p}}},e}(Ap),Yh=["area","verticalArea","rangeArea","verticalRangeArea"],Zh=[Ra,za].concat(Yh),Qh=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 dp,t.length>0){this.invertAxes=wr(t[0].type,[Oa,"bullet",za,"verticalArea","verticalRangeArea","rangeBar","horizontalWaterfall","verticalBoxPlot"]);for(var e=0;e<t.length;e++){var o=t[e].stack;if(o&&"100%"===o.type){this.stack100=!0;break}}}},e.prototype.render=function(t){void 0===t&&(t=this.panes),this.createCategoryAxes(t),this.aggregateCategories(t),this.createCategoryAxesLabels(t),this.createCharts(t),this.createValueAxes(t)},e.prototype.removeAxis=function(e){var o=e.options.name;t.prototype.removeAxis.call(this,e),e instanceof Bs?delete this.namedCategoryAxes[o]:(this.valueAxisRangeTracker.reset(o),delete this.namedValueAxes[o]),e===this.categoryAxis&&delete this.categoryAxis,e===this.valueAxis&&delete this.valueAxis},e.prototype.createCharts=function(t){for(var e=this.groupSeriesByPane(),o=0;o<t.length;o++){var i=t[o],r=e[i.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],i)}},e.prototype.createChartGroup=function(t,e){this.createAreaChart(lh(t,["area","verticalArea"]),e),this.createRangeAreaChart(lh(t,["rangeArea","verticalRangeArea"]),e),this.createBarChart(lh(t,[Ba,Oa]),e),this.createRangeBarChart(lh(t,["rangeColumn","rangeBar"]),e),this.createBulletChart(lh(t,["bullet","verticalBullet"]),e),this.createCandlestickChart(lh(t,"candlestick"),e),this.createBoxPlotChart(lh(t,["boxPlot","verticalBoxPlot"]),e),this.createOHLCChart(lh(t,"ohlc"),e),this.createWaterfallChart(lh(t,["waterfall","horizontalWaterfall"]),e),this.createLineChart(lh(t,[Ra,za]),e)},e.prototype.aggregateCategories=function(t){var e=this.srcSeries||this.series,o=[];this._currentPointsCache={},this._seriesPointsCache=this._seriesPointsCache||{};for(var i=0;i<e.length;i++){var r=e[i],n=this.seriesCategoryAxis(r),s=this.findPane(n.options.pane);r=(ch(n.options.type,y)||r.categoryField)&&wr(s,t)?this.aggregateSeries(r,n):this.filterSeries(r,n),o.push(r)}this._seriesPointsCache=this._currentPointsCache,this._currentPointsCache=null,this.srcSeries=e,this.series=o},e.prototype.filterSeries=function(t,e){var o=(t.data||{}).length;if(e._seriesMax=Math.max(e._seriesMax||0,o),!Ji(e.options.min)&&!Ji(e.options.max))return t;var i=e.currentRangeIndices(),r=wr(t.type,Zh),n=rr({},t);return n.data=(n.data||[]).slice(i.min,i.max+1),r&&mh(n,i,o,(function(o){return{item:t.data[o],category:e.categoryAt(o,!0),categoryIx:o-i.min}}),(function(e){return Rr(t.data[e])})),n},e.prototype.clearSeriesPointsCache=function(){this._seriesPointsCache={}},e.prototype.seriesSourcePoints=function(t,e){var o=t.index+";"+e.categoriesHash();if(this._seriesPointsCache[o])return this._currentPointsCache[o]=this._seriesPointsCache[o],this._seriesPointsCache[o];var i=e.options,r=i.srcCategories,n=ch(i.type,y),s=t.data,a=n?uh:ba,p=[];n||e.mapCategories();for(var h=0;h<s.length;h++){var c=void 0;if(c=t.categoryField?a(t.categoryField,s[h],this.chartService.intl):r[h],Rr(c)&&null!==c){var l=e.totalIndex(c);p[l]=p[l]||{items:[],category:c},p[l].items.push(h)}}return this._currentPointsCache[o]=p,p},e.prototype.aggregateSeries=function(t,e){if(!t.data.length)return t;for(var o=this.seriesSourcePoints(t,e),i=rr({},t),r=new Ph(rr({},t),Ca.current,Mh.current),n=i.data=[],s=e.options.dataItems||[],a=e.currentRangeIndices(),p=function(t){var i=t-a.min,n=o[t];if(n||(n=o[t]={}),n.categoryIx=i,!n.item){var s=e.categoryAt(t,!0);n.category=s,n.item=r.aggregatePoints(n.items,s)}return n},h=a.min;h<=a.max;h++){var c=p(h);n[c.categoryIx]=c.item,c.items&&c.items.length&&(s[c.categoryIx]=c.item)}return wr(i.type,Zh)&&mh(i,a,e.totalCount(),p,(function(t){return o[t]})),e.options.dataItems=s,i},e.prototype.appendChart=function(e,o){var i=e.options.series,r=this.seriesCategoryAxis(i[0]),n=r.options.categories,s=Math.max(0,Fa(i)-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,o)},e.prototype.seriesPaneName=function(t){var e=this.options,o=t.axis,i=mr([].concat(e.valueAxis),(function(t){return t.name===o}))[0],r=((e.panes||[{}])[0]||{}).name||"default";return(i||{}).pane||r},e.prototype.seriesCategoryAxis=function(t){var e=t.categoryAxis,o=e?this.namedCategoryAxes[e]:this.categoryAxis;if(!o)throw new Error("Unable to locate category axis with name "+e);return o},e.prototype.stackableChartOptions=function(t,e){var o=t.stack;return{isStacked:o,isStacked100:o&&"100%"===o.type,clip:e.options.clip}},e.prototype.groupSeriesByCategoryAxis=function(t){for(var e=[],o={},i=0;i<t.length;i++){var r=t[i].categoryAxis||"$$default$$";o.hasOwnProperty(r)||(o[r]=!0,e.push(r))}for(var n=[],s=0;s<e.length;s++){var a=$h(t,e[s],s);0!==a.length&&n.push(a)}return n},e.prototype.createBarChart=function(t,e){if(0!==t.length){var o=t[0],i=new Ap(this,Object.assign({series:t,invertAxes:this.invertAxes,gap:o.gap,spacing:o.spacing},this.stackableChartOptions(o,e)));this.appendChart(i,e)}},e.prototype.createRangeBarChart=function(t,e){if(0!==t.length){var o=t[0],i=new Eh(this,{series:t,invertAxes:this.invertAxes,gap:o.gap,spacing:o.spacing});this.appendChart(i,e)}},e.prototype.createBulletChart=function(t,e){if(0!==t.length){var o=t[0],i=new Zp(this,{series:t,invertAxes:this.invertAxes,gap:o.gap,spacing:o.spacing,clip:e.options.clip});this.appendChart(i,e)}},e.prototype.createLineChart=function(t,e){if(0!==t.length){var o=t[0],i=new ap(this,Object.assign({invertAxes:this.invertAxes,series:t},this.stackableChartOptions(o,e)));this.appendChart(i,e)}},e.prototype.createAreaChart=function(t,e){if(0!==t.length){var o=t[0],i=new up(this,Object.assign({invertAxes:this.invertAxes,series:t},this.stackableChartOptions(o,e)));this.appendChart(i,e)}},e.prototype.createRangeAreaChart=function(t,e){if(0!==t.length){var o=new Nh(this,{invertAxes:this.invertAxes,series:t,clip:e.options.clip});this.appendChart(o,e)}},e.prototype.createOHLCChart=function(t,e){if(0!==t.length){var o=t[0],i=new Gh(this,{invertAxes:this.invertAxes,gap:o.gap,series:t,spacing:o.spacing,clip:e.options.clip});this.appendChart(i,e)}},e.prototype.createCandlestickChart=function(t,e){if(0!==t.length){var o=t[0],i=new Bp(this,{invertAxes:this.invertAxes,gap:o.gap,series:t,spacing:o.spacing,clip:e.options.clip});this.appendChart(i,e)}},e.prototype.createBoxPlotChart=function(t,e){if(0!==t.length){var o=t[0],i=new Lp(this,{invertAxes:this.invertAxes,gap:o.gap,series:t,spacing:o.spacing,clip:e.options.clip});this.appendChart(i,e)}},e.prototype.createWaterfallChart=function(t,e){if(0!==t.length){var o=t[0],i=new Xh(this,{series:t,invertAxes:this.invertAxes,gap:o.gap,spacing:o.spacing});this.appendChart(i,e)}},e.prototype.axisRequiresRounding=function(t,e){for(var o=lh(this.series,La),i=0;i<this.series.length;i++){var r=this.series[i];if(wr(r.type,Yh)){var n=r.line;n&&"step"===n.style&&o.push(r)}}for(var s=0;s<o.length;s++){var a=o[s].categoryAxis||"";if(a===t||!a&&0===e)return!0}},e.prototype.aggregatedAxis=function(t,e){for(var o=this.series,i=0;i<o.length;i++){var r=o[i].categoryAxis||"";if((r===t||!r&&0===e)&&o[i].categoryField)return!0}},e.prototype.createCategoryAxesLabels=function(){for(var t=this.axes,e=0;e<t.length;e++)t[e]instanceof Bs&&t[e].createLabels()},e.prototype.createCategoryAxes=function(t){for(var e=this.invertAxes,o=[].concat(this.options.categoryAxis),i=[],r=0;r<o.length;r++){var n=o[r];if(wr(this.findPane(n.pane),t)){var s=n.name,a=n.categories;void 0===a&&(a=[]),n=rr({vertical:e,reverse:!e&&this.chartService.rtl,axisCrossingValue:e?m:0},n),Rr(n.justified)||(n.justified=this.isJustified()),this.axisRequiresRounding(s,r)&&(n.justified=!1);var p=void 0;if(p=dh(n,a[0])?new Hs(n,this.chartService):new Bs(n,this.chartService),o[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,i.push(p),this.appendAxis(p)}}var h=this.categoryAxis||i[0];this.categoryAxis=h,e?this.axisY=h:this.axisX=h},e.prototype.isJustified=function(){for(var t=this.series,e=0;e<t.length;e++){if(!wr(t[e].type,Yh))return!1}return!0},e.prototype.createValueAxes=function(t){var e=this.valueAxisRangeTracker,o=e.query(),i=[].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<i.length;a++){var p=i[a];if(wr(this.findPane(p.pane),t)){var h=p.name,c=ch(p.type,"log")?{min:.1,max:1}:{min:0,max:1},l=e.query(h)||o||c;0===a&&l&&o&&(l.min=Math.min(l.min,o.min),l.max=Math.max(l.max,o.max));var u=new(ch(p.type,"log")?Js:Xs)(l.min,l.max,rr({},n,p),this.chartService);if(h){if(this.namedValueAxes[h])throw new Error("Value axis with name "+h+" is already defined");this.namedValueAxes[h]=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,o){var i=t._eventCoordinates(e),r=new fn(i.x,i.y),n=this.pointPane(r),s=[],a=[];if(n){for(var p=n.axes,h=0;h<p.length;h++){var c=p[h];c.getValue?ah(a,c.getValue(r)):ah(s,c.getCategory(r))}0===s.length&&ah(s,this.categoryAxis.getCategory(r)),s.length>0&&a.length>0&&t.trigger(o,{element:jr(e),originalEvent:e,category:fh(s),value:fh(a)})}},e.prototype.pointPane=function(t){for(var e=this.panes,o=0;o<e.length;o++){var i=e[o];if(i.contentBox.containsPoint(t))return i}},e.prototype.updateAxisOptions=function(t,e){Kh(this.options,t,e),Kh(this.originalOptions,t,e)},e}(kh);function Kh(t,e,o){rr([].concat(e instanceof Bs?t.categoryAxis:t.valueAxis)[e.axisIndex],o)}function $h(t,e,o){return mr(t,(function(t){return 0===o&&!t.categoryAxis||t.categoryAxis===e}))}Yr(Qh,{categoryAxis:{},valueAxis:{}}),rr(Qh.prototype,Sh);var Jh=Qh;function tc(){this._defaultPrevented=!0}var ec=function(t){function e(){t.call(this),this._points=[]}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.destroy=function(){this._points=[]},e.prototype.show=function(t,e){var o=[].concat(t);this.hide();for(var i=0;i<o.length;i++){var r=o[i];r&&r.toggleHighlight&&r.hasHighlight()&&(this.togglePointHighlight(r,!0,e),this._points.push(r))}},e.prototype.togglePointHighlight=function(t,e,o){var i=(t.options.highlight||{}).toggle;if(i){var r={category:t.category,series:t.series,dataItem:t.dataItem,value:t.value,stackValue:t.stackValue,preventDefault:tc,visual:t.highlightVisual(),show:e};i(r),r._defaultPrevented||t.toggleHighlight(e,o)}else t.toggleHighlight(e,o)},e.prototype.hide=function(){for(var t=this._points;t.length;)this.togglePointHighlight(t.pop(),!1)},e.prototype.isHighlighted=function(t){for(var e=this._points,o=0;o<e.length;o++){if(t===e[o])return!0}return!1},e}(O);function oc(t,e){var o=(e||"").toLowerCase(),i=t.event;return"none"===o&&!(i.ctrlKey||i.shiftKey||i.altKey)||i[o+"Key"]}function ic(t){for(var e={},o=0;o<t.length;o++){var i=t[o];i.axis.options.name&&(e[i.axis.options.name]={min:i.range.min,max:i.range.max})}return e}var rc=function(t){function e(e,o){t.call(this),this.plotArea=e,this.options=rr({},this.options,o)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.start=function(t){return this._active=oc(t,this.options.key),this._active},e.prototype.move=function(t){if(this._active){var e=this.axisRanges=this._panAxes(t,k).concat(this._panAxes(t,S));if(e.length)return this.axisRanges=e,ic(e)}},e.prototype.end=function(){var t=this._active;return this._active=!1,t},e.prototype.pan=function(){var t=this.plotArea,e=this.axisRanges;if(e.length){for(var o=0;o<e.length;o++){var i=e[o];t.updateAxisOptions(i.axis,i.range)}t.redraw(t.panes)}},e.prototype.destroy=function(){delete this.plotArea},e.prototype._panAxes=function(t,e){var o=this.plotArea,i=-t[e].delta,r=(this.options.lock||"").toLowerCase(),n=[];if(0!==i&&(r||"").toLowerCase()!==e)for(var s=o.axes,a=0;a<s.length;a++){var p=s[a];if(e===k&&!p.options.vertical||e===S&&p.options.vertical){var h=p.pan(i);h&&(h.limitRange=!0,n.push({axis:p,range:h}))}}return n},e}(O);rc.prototype.options={key:"none",lock:"none"};var nc=rc,sc=function(t){function e(e,o){t.call(this),this.chart=e,this.options=rr({},this.options,o),this.createElement()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.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)},e.prototype.removeElement=function(){this._marquee.parentNode&&this._marquee.parentNode.removeChild(this._marquee)},e.prototype.setStyles=function(t){hr(this._marquee,t)},e.prototype.start=function(t){if(oc(t,this.options.key)){var e=this.chart,o=e._eventCoordinates(t),i=this._zoomPane=e._plotArea.paneByPoint(o),r=i?i.chartsBox().clone():null;if(i&&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},e.prototype._elementOffset=function(){var t=this.chart.element,e=hr(t,["paddingLeft","paddingTop"]),o=e.paddingLeft,i=e.paddingTop,r=zr(t);return{left:o+r.left,top:i+r.top}},e.prototype.move=function(t){this._zoomPane&&this.setStyles(this._selectionPosition(t))},e.prototype.end=function(t){if(this._zoomPane){var e=this._elementOffset(),o=this._selectionPosition(t);o.left-=e.left,o.top-=e.top;var i={x:o.left,y:o.top},r={x:o.left+o.width,y:o.top+o.height};return this._updateAxisRanges(i,r),this.removeElement(),delete this._zoomPane,ic(this.axisRanges)}},e.prototype.zoom=function(){var t=this.axisRanges;if(t&&t.length){for(var e=this.chart._plotArea,o=0;o<t.length;o++){var i=t[o];e.updateAxisOptions(i.axis,i.range)}e.redraw(e.panes)}},e.prototype.destroy=function(){this.removeElement(),delete this._marquee,delete this.chart},e.prototype._updateAxisRanges=function(t,e){for(var o=(this.options.lock||"").toLowerCase(),i=[],r=this._zoomPane.axes,n=0;n<r.length;n++){var s=r[n],a=s.options.vertical;if((o!==k||a)&&(o!==S||!a)&&Rr(s.axisIndex)){var p=s.pointsRange(t,e);p&&i.push({axis:s,range:p})}}this.axisRanges=i},e.prototype._selectionPosition=function(t){var e=this._zoomPaneClipBox,o={x:t.x.startLocation,y:t.y.startLocation},i=t.x.location,r=t.y.location,n=(this.options.lock||"").toLowerCase(),s=Math.min(o.x,i),a=Math.min(o.y,r),p=Math.abs(o.x-i),h=Math.abs(o.y-r);return n===k&&(s=e.x1,p=e.width()),n===S&&(a=e.y1,h=e.height()),i>e.x2&&(p=e.x2-o.x),i<e.x1&&(p=o.x-e.x1),r>e.y2&&(h=e.y2-o.y),r<e.y1&&(h=o.y-e.y1),{left:Math.max(s,e.x1),top:Math.max(a,e.y1),width:p,height:h}},e}(O);sc.prototype.options={key:"shift",lock:"none"};var ac=sc,pc=function(t){function e(e,o){t.call(this),this.chart=e,this.options=rr({rate:.3},this.options,o)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.updateRanges=function(t,e){for(var o=(this.options.lock||"").toLowerCase(),i=[],r=this.chart._plotArea.axes,n=0;n<r.length;n++){var s=r[n],a=s.options.vertical;if((o!==k||a)&&(o!==S||!a)&&s.zoomRange){var p=Hr(this.options.rate,.01,.9),h=s.zoomRange(-t*p,e);h&&i.push({axis:s,range:h})}}return this.axisRanges=i,ic(i)},e.prototype.zoom=function(){var t=this.axisRanges,e=this.chart._plotArea;if(t&&t.length&&e.updateAxisOptions){for(var o=0;o<t.length;o++){var i=t[o];e.updateAxisOptions(i.axis,i.range)}e.redraw(e.panes)}},e.prototype.destroy=function(){delete this.chart},e}(O),hc=function(t){function e(e,o){t.call(this,e),this.chartService=o}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.render=function(){var t=this.children,e=this.options,o=e.vertical;this.visual=new a.Layout(null,{spacing:o?0:e.spacing,lineSpacing:o?e.spacing:0,orientation:o?"vertical":"horizontal",reverse:e.rtl,alignItems:o?"start":"center"});for(var i=0;i<t.length;i++){var r=t[i];r.reflow(new vn),r.renderVisual()}},e.prototype.reflow=function(t){this.visual.rect(t.toRect()),this.visual.reflow();var e=this.visual.clippedBBox();this.box=e?jn(e):new vn},e.prototype.renderVisual=function(){this.addVisual()},e.prototype.createVisual=function(){},e}(Cn),cc=function(t){function e(e){t.call(this,e),this.createContainer(),e.rtl?(this.createLabel(),this.createMarker()):(this.createMarker(),this.createLabel())}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createContainer=function(){this.container=new En({vertical:!1,wrap:!1,align:d,spacing:this.options.spacing}),this.append(this.container)},e.prototype.createMarker=function(){this.container.append(new Pn(this.markerOptions()))},e.prototype.markerOptions=function(){var t=this.options,e=t.markerColor;return rr({},t.markers,{background:e,border:{color:e}})},e.prototype.createLabel=function(){var t=this.options,e=rr({},t.labels);this.container.append(new Vn(t.text,e))},e.prototype.renderComplete=function(){t.prototype.renderComplete.call(this);var e=this.options.cursor||{},o=this._itemOverlay=a.Path.fromRect(this.container.box.toRect(),{fill:{color:C,opacity:0},stroke:null,cursor:e.style||e});this.appendVisual(o)},e.prototype.click=function(t,e){var o=this.eventArgs(e);!t.trigger("legendItemClick",o)&&e&&"contextmenu"===e.type&&e.preventDefault()},e.prototype.over=function(t,e){var o=this.eventArgs(e);return t.trigger("legendItemHover",o)||t._legendItemHover(o.seriesIndex,o.pointIndex),!0},e.prototype.out=function(t,e){t._unsetActivePoint(),t.trigger("legendItemLeave",this.eventArgs(e))},e.prototype.eventArgs=function(t){var e=this.options;return{element:jr(t),text:e.text,series:e.series,seriesIndex:e.series.index,pointIndex:e.pointIndex}},e.prototype.renderVisual=function(){var e=this,o=this.options,i=o.visual;i?(this.visual=i({active:o.active,series:o.series,sender:this.getSender(),pointIndex:o.pointIndex,options:{markers:this.markerOptions(),labels:o.labels},createVisual:function(){e.createVisual(),e.renderChildren(),e.renderComplete();var t=e.visual;return delete e.visual,t}}),this.addVisual()):t.prototype.renderVisual.call(this)},e}(Sn),lc=function(t){function e(e,o){void 0===o&&(o={}),t.call(this,e),this.chartService=o,wr(this.options.position,[b,_,u,g,"custom"])||(this.options.position=_),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,o=t.align,i=e,r=d;"custom"===e?i=g:wr(e,[b,u])?(i="start"===o?g:"end"===o?_:d,r=e):o&&("start"===o?r=b:"end"===o&&(r=u)),this.container=new Sn({margin:t.margin,padding:t.padding,background:t.background,border:t.border,vAlign:r,align:i,zIndex:t.zIndex,shrinkToFit:!0}),this.hasTitle()?this.itemsContainer=new Sn({vAlign:r,align:i,zIndex:t.zIndex,shrinkToFit:!0}):this.itemsContainer=this.container,this.append(this.container)},e.prototype.createItems=function(){var t=this.getService(),e=this.options,o=this.isVertical(),i=new hc({vertical:o,spacing:e.spacing,rtl:t.rtl},t),r=e.items;e.reverse&&(r=r.slice(0).reverse());for(var n=r.length,s=0;s<n;s++){var a=r[s];i.append(new cc(rr({},{markers:e.markers,labels:e.labels,rtl:t.rtl},e.item,a)))}i.render(),this.itemsContainer.append(i)},e.prototype.isVertical=function(){var t=this.options,e=t.orientation,o=t.position;return"custom"===o&&"horizontal"!==e||(Rr(e)?"horizontal"!==e:wr(o,[g,_]))},e.prototype.hasItems=function(){return this.container.children[0].children.length>0},e.prototype.reflow=function(t){var e=this.options,o=t.clone();this.hasItems()?("custom"===e.position?(this.containerCustomReflow(o),this.box=o):this.containerReflow(o),this.hasTitle()&&this.title.reflow(new vn(this.container.box.x1,this.title.box.y1,this.container.box.x2,this.title.box.y2))):this.box=o},e.prototype.containerReflow=function(t){var e=this.options,o=this.container,i=e.position,r=e.width,n=e.height,s=i===b||i===u?k:S,a=this.isVertical(),p=t.clone(),h=t.clone();i!==g&&i!==_||(h.y1=p.y1=0),a&&n?(h.y2=h.y1+n,h.align(p,S,o.options.vAlign)):!a&&r&&(h.x2=h.x1+r,h.align(p,k,o.options.align)),o.reflow(h);var c=(h=o.box).clone();(e.offsetX||e.offsetY)&&(h.translate(e.offsetX,e.offsetY),o.reflow(h)),c[s+1]=t[s+1],c[s+2]=t[s+2],this.box=c},e.prototype.containerCustomReflow=function(t){var e=this.options,o=this.container,i=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),o.reflow(p),p=o.box,o.reflow(new vn(i,r,i+p.width(),r+p.height()))},e.prototype.renderVisual=function(){this.hasItems()&&t.prototype.renderVisual.call(this)},e.prototype.createLegendTitle=function(t){var e=rr({},{color:l,position:b,align:d},t),o=e.text;if(t&&!1!==t.visible){if(Rr(e)&&e.visible){var i=fr(e);i?o=i({text:o}):e.format&&(o=this.chartService.format.auto(e.format,o))}this.title=new Vn(o,e),this.createTitleLayout(),this.appendTitleLayoutContent()}},e.prototype.createTitleLayout=function(){this.layout=new En({vertical:!0,wrap:!1}),this.container.append(this.layout)},e.prototype.hasTitle=function(){return Boolean(this.options.title&&!1!==this.options.title.visible)},e.prototype.appendTitleLayoutContent=function(){this.options.title.position===u?(this.layout.append(this.itemsContainer),this.layout.append(this.title)):(this.layout.append(this.title),this.layout.append(this.itemsContainer))},e}(Cn);Yr(lc,{position:_,items:[],offsetX:0,offsetY:0,margin:cr(5),padding:cr(5),border:{color:l,width:0},item:{cursor:"pointer",spacing:6},spacing:6,background:"",zIndex:1,markers:{border:{width:0},width:15,height:3,type:"rect",align:g,vAlign:d}});var uc=lc,dc=function(t){function e(){t.call(this),this._registry=[]}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.register=function(t,e){this._registry.push({type:t,seriesTypes:e})},e.prototype.create=function(t,e,o){for(var i,r=this._registry,n=r[0],s=0;s<r.length;s++){var a=r[s];if((i=lh(t,a.seriesTypes)).length>0){n=a;break}}return new n.type(i,e,o)},e}(O);dc.current=new dc;var fc=dc;function yc(t){var e=document.createElement("div");return t&&(e.className=t),e}function vc(t){for(var e=t;e&&!xr(e,"k-handle");)e=e.parentNode;return e}var gc=function(t){function e(e,o,i,r){t.call(this);var n=e.element;this.options=rr({},this.options,i),this.chart=e,this.observer=r,this.chartElement=n,this.categoryAxis=o,this._dateAxis=this.categoryAxis instanceof Hs,this.initOptions(),this.visible=this.options.visible&&n.offsetHeight,this.visible&&(this.createElements(),this.set(this._index(this.options.from),this._index(this.options.to)),this.bindEvents())}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.onPane=function(t){return this.categoryAxis.pane===t},e.prototype.createElements=function(){var t=this.options,e=this.wrapper=yc("k-selector");hr(e,{top:t.offset.top,left:t.offset.left,width:t.width,height:t.height,direction:"ltr"});var o=this.selection=yc("k-selection");this.leftMask=yc("k-mask"),this.rightMask=yc("k-mask"),e.appendChild(this.leftMask),e.appendChild(this.rightMask),e.appendChild(o),o.appendChild(yc("k-selection-bg"));var i=this.leftHandle=yc("k-handle k-left-handle"),r=this.rightHandle=yc("k-handle k-right-handle");i.appendChild(yc()),r.appendChild(yc()),o.appendChild(i),o.appendChild(r),this.chartElement.appendChild(e);var n=hr(o,["borderLeftWidth","borderRightWidth","height"]),s=hr(i,"height").height,a=hr(r,"height").height;t.selection={border:{left:n.borderLeftWidth,right:n.borderRightWidth}},hr(i,{top:(n.height-s)/2}),hr(r,{top:(n.height-a)/2}),e.style.cssText=e.style.cssText},e.prototype.bindEvents=function(){var t;!1!==this.options.mousewheel&&(this._mousewheelHandler=this._mousewheel.bind(this),Br(this.wrapper,((t={})[Ia]=this._mousewheelHandler,t))),this._domEvents=ns.create(this.wrapper,{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)})},e.prototype.initOptions=function(){var t=this.options,e=this.categoryAxis.pane.chartsBox(),o=this.chart.chartService.intl;this._dateAxis&&rr(t,{min:Ps(o,t.min),max:Ps(o,t.max),from:Ps(o,t.from),to:Ps(o,t.to)});var i=hr(this.chartElement,["paddingLeft","paddingTop"]),r=i.paddingLeft,n=i.paddingTop;this.options=rr({},{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)},e.prototype.destroy=function(){var t;this._domEvents&&(this._domEvents.destroy(),delete this._domEvents),clearTimeout(this._mwTimeout),this._state=null,this.wrapper&&(this._mousewheelHandler&&(Gr(this.wrapper,((t={})[Ia]=this._mousewheelHandler,t)),this._mousewheelHandler=null),this.chartElement.removeChild(this.wrapper),this.wrapper=null)},e.prototype._rangeEventArgs=function(t){return{axis:this.categoryAxis.options,from:this._value(t.from),to:this._value(t.to)}},e.prototype._start=function(t){var e=this.options,o=jr(t);if(!this._state&&o){this.chart._unsetActivePoint(),this._state={moveTarget:vc(o)||o,startLocation:t.x?t.x.location:0,range:{from:this._index(e.from),to:this._index(e.to)}};var i=this._rangeEventArgs({from:this._index(e.from),to:this._index(e.to)});this.trigger("selectStart",i)&&(this._state=null)}},e.prototype._press=function(t){var e;(e=this._state?this._state.moveTarget:vc(jr(t)))&&P(e,"k-handle-active")},e.prototype._move=function(t){if(this._state){var e=this._state,o=this.options,i=this.categoryAxis,r=e.range,n=e.moveTarget,s=i.options.reverse,a=this._index(o.from),p=this._index(o.to),h=this._index(o.min),c=this._index(o.max),l=e.startLocation-t.x.location,u=r.from,d=r.to,f=r.to-r.from,y=hr(this.wrapper,"width").width/(i.categoriesCount()-1),v=Math.round(l/y)*(s?-1:1);if(n){var g=xr(n,"k-left-handle"),m=xr(n,"k-right-handle");xr(n,"k-selection k-selection-bg")?(r.from=Math.min(Math.max(h,a-v),c-f),r.to=Math.min(r.from+f,c)):g&&!s||m&&s?(r.from=Math.min(Math.max(h,a-v),c-1),r.to=Math.max(r.from+1,r.to)):(g&&s||m&&!s)&&(r.to=Math.min(Math.max(h+1,p-v),c),r.from=Math.min(r.to-1,r.from)),r.from===u&&r.to===d||(this.move(r.from,r.to),this.trigger("select",this._rangeEventArgs(r)))}}},e.prototype._end=function(){if(this._state){var t=this._state.moveTarget;t&&M(t,"k-handle-active");var e=this._state.range;this.set(e.from,e.to),this.trigger("selectEnd",this._rangeEventArgs(e)),delete this._state}},e.prototype._tap=function(t){var e=this.options,o=this.categoryAxis,i=this.chart._eventCoordinates(t),r=o.pointCategoryIndex(new fn(i.x,o.box.y1)),n=this._index(e.from),s=this._index(e.to),a=this._index(e.min),p=this._index(e.max),h=s-n,c=n+h/2,l={},u=3===t.event.which,d=Math.round(c-r);this._state||u||(this.chart._unsetActivePoint(),o.options.justified||d--,l.from=Math.min(Math.max(a,n-d),p-h),l.to=Math.min(l.from+h,p),this._start(t),this._state&&(this._state.range=l,this.trigger("select",this._rangeEventArgs(l)),this._end()))},e.prototype._mousewheel=function(t){var e=this,o=Tr(t);if(this._start({target:this.selection}),this._state){var i=this._state.range;t.preventDefault(),t.stopPropagation(),Math.abs(o)>1&&(o*=3),this.options.mousewheel.reverse&&(o*=-1),this.expand(o)&&this.trigger("select",{axis:this.categoryAxis.options,delta:o,originalEvent:t,from:this._value(i.from),to:this._value(i.to)}),this._mwTimeout&&clearTimeout(this._mwTimeout),this._mwTimeout=setTimeout((function(){e._end()}),150)}},e.prototype._gesturestart=function(t){var e=this.options;this._state={range:{from:this._index(e.from),to:this._index(e.to)}};var o=this._rangeEventArgs(this._state.range);this.trigger("selectStart",o)?this._state=null:t.preventDefault()},e.prototype._gestureend=function(){this._state&&(this.trigger("selectEnd",this._rangeEventArgs(this._state.range)),delete this._state)},e.prototype._gesturechange=function(t){var e=this.chart,o=this._state,i=this.options,r=this.categoryAxis,n=o.range,s=e._toModelCoordinates(t.touches[0].x.location).x,a=e._toModelCoordinates(t.touches[1].x.location).x,p=Math.min(s,a),h=Math.max(s,a);t.preventDefault(),n.from=r.pointCategoryIndex(new fn(p))||i.min,n.to=r.pointCategoryIndex(new fn(h))||i.max,this.move(n.from,n.to),this.trigger("select",this._rangeEventArgs(n))},e.prototype._index=function(t){var e=t;return t instanceof Date&&(e=this.categoryAxis.categoryIndex(t)),e},e.prototype._value=function(t){var e=t;return this._dateAxis&&(e=this.categoryAxis.categoryAt(t))>this.options.max&&(e=this.options.max),e},e.prototype._slot=function(t){var e=this.categoryAxis,o=this._index(t);return e.getSlot(o,o,!0)},e.prototype.move=function(t,e){var o=this.options,i=this.categoryAxis.options.reverse,r=o.offset,n=o.padding,s=o.selection.border,a=i?e:t,p=i?t:e,h="x"+(i?2:1),c=this._slot(a),l=Ur(c[h]-r.left+n.left);hr(this.leftMask,{width:l}),hr(this.selection,{left:l}),c=this._slot(p);var u=Ur(o.width-(c[h]-r.left+n.left));hr(this.rightMask,{width:u});var d=o.width-u;d!==o.width&&(d+=s.right),hr(this.rightMask,{left:d}),hr(this.selection,{width:Math.max(o.width-(l+u)-s.right,0)})},e.prototype.set=function(t,e){var o=this.options,i=this._index(o.min),r=this._index(o.max),n=Hr(this._index(t),i,r),s=Hr(this._index(e),n+1,r);o.visible&&this.move(n,s),o.from=this._value(n),o.to=this._value(s)},e.prototype.expand=function(t){var e=this.options,o=this._index(e.min),i=this._index(e.max),r=e.mousewheel.zoom,n=this._index(e.from),s=this._index(e.to),a={from:n,to:s},p=rr({},a);if(this._state&&(a=this._state.range),r!==_&&(a.from=Hr(Hr(n-t,0,s-1),o,i)),r!==g&&(a.to=Hr(Hr(s+t,a.from+1,i),o,i)),a.from!==p.from||a.to!==p.to)return this.set(a.from,a.to),!0},e.prototype.zoom=function(t,e){var o=this.options,i=this._index(o.min),r=this._index(o.max),n=this._index(o.from),s=this._index(o.to),a={from:n,to:s},p=rr({},a),h=this.categoryAxis.options.reverse,c=k+(h?"2":"1"),l=this.categoryAxis.lineBox(),u=Math.abs(l[c]-e.x),d=l.width(),f=Ur(u/d,2),y=Ur(f*t),v=Ur((1-f)*t);if(this._state&&(a=this._state.range),a.from=Hr(Hr(n-y,0,s-1),i,r),a.to=Hr(Hr(s+v,a.from+1,r),i,r),a.from!==p.from||a.to!==p.to)return this.set(a.from,a.to),!0},e.prototype.trigger=function(t,e){return(this.observer||this.chart).trigger(t,e)},e}(O);Yr(gc,{visible:!0,mousewheel:{zoom:"both"},min:x,max:m});var mc=gc,xc=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 o=rr({},this.options,e.options.tooltip),i=e.tooltipAnchor();i?(this._current=e,t.prototype.show.call(this,{point:e,anchor:i},o,e)):this.hide()}},e.prototype.hide=function(){delete this._current,t.prototype.hide.call(this)},e}(Kp),_c=function(t){function e(e,o){t.call(this,e.chartService,o),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 o=mr(t,(function(t){var e=t.series.tooltip;return!(e&&!1===e.visible)}));if(o.length>0){var i=o[0],r=this.plotArea.categoryAxis.getSlot(i.categoryIx),n=e?this._slotAnchor(e,r):this._defaultAnchor(i,r);this.show({anchor:n,shared:!0,points:t,category:i.category,categoryText:this.formatService.auto(this.options.categoryFormat,i.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 o=t.owner.pane.chartsBox(),i=this.plotArea.categoryAxis.options.vertical,r=o.center(),n=e.center();return{point:i?new fn(r.x,n.y):new fn(n.x,r.y),align:{horizontal:"center",vertical:"center"}}},e}(Kp);Yr(_c,{categoryFormat:"{0:d}"});var bc=_c,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.setup=function(){var t=this.element,e=this.options;if(t.bbox()){this.origin=e.origin;var o=e.vertical?S:k,i=this.fromScale=new p.Point(1,1);i[o]=Ta,t.transform(p.transform().scale(i.x,i.y))}else this.abort()},e.prototype.step=function(t){var e=Cr(this.fromScale.x,1,t),o=Cr(this.fromScale.y,1,t);this.element.transform(p.transform().scale(e,o,this.origin))},e.prototype.abort=function(){t.prototype.abort.call(this),this.element.transform(null)},e}(a.Animation);Yr(wc,{duration:600}),a.AnimationFactory.current.register(Oa,wc);var Cc=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(p.transform().scale(Ta,Ta,t))},e.prototype.step=function(t){this.element.transform(p.transform().scale(t,t,this.center))},e}(a.Animation);Yr(Cc,{easing:"easeOutElastic"}),a.AnimationFactory.current.register("bubble",Cc);var kc=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}(a.Animation);Yr(kc,{duration:200,easing:"linear"}),a.AnimationFactory.current.register("fadeIn",kc);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.setup=function(){this.element.transform(p.transform().scale(Ta,Ta,this.options.center))},e.prototype.step=function(t){this.element.transform(p.transform().scale(t,t,this.options.center))},e}(a.Animation);Yr(Sc,{easing:"easeOutElastic",duration:600}),a.AnimationFactory.current.register(Ea,Sc);var Ac=Sc,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.render=function(){t.prototype.render.call(this),this.renderSegments()},e.prototype.createSegment=function(t,e,o){return new("smooth"===e.style?tp:Za)(t,e,o)},e.prototype.animationPoints=function(){return t.prototype.animationPoints.call(this).concat(this._segments)},e.prototype.createMissingValue=function(t,e){if(e===Ma){var o={x:t.x,y:t.y};return jp(o.x)||(o.x=0),jp(o.y)||(o.y=0),o}},e}(Vp);rr(Pc.prototype,ep);var Tc=Pc,Mc=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 dp,this.yAxisRangeTracker=new dp},e.prototype.render=function(t){void 0===t&&(t=this.panes);for(var e=this.groupSeriesByPane(),o=0;o<t.length;o++){var i=t[o],r=e[i.options.name||"default"]||[];this.addToLegend(r);var n=this.filterVisibleSeries(r);n&&(this.createScatterChart(lh(n,"scatter"),i),this.createScatterLineChart(lh(n,"scatterLine"),i),this.createBubbleChart(lh(n,"bubble"),i))}this.createAxes(t)},e.prototype.appendChart=function(e,o){this.xAxisRangeTracker.update(e.xAxisRanges),this.yAxisRangeTracker.update(e.yAxisRanges),t.prototype.appendChart.call(this,e,o)},e.prototype.removeAxis=function(e){var o=e.options.name;t.prototype.removeAxis.call(this,e),e.options.vertical?(this.yAxisRangeTracker.reset(o),delete this.namedYAxes[o]):(this.xAxisRangeTracker.reset(o),delete this.namedXAxes[o]),e===this.axisX&&delete this.axisX,e===this.axisY&&delete this.axisY},e.prototype.seriesPaneName=function(t){var e=this.options,o=t.xAxis,i=mr([].concat(e.xAxis),(function(t){return t.name===o}))[0],r=t.yAxis,n=mr([].concat(e.yAxis),(function(t){return t.name===r}))[0],s=(e.panes||[{}])[0].name||"default";return(i||{}).pane||(n||{}).pane||s},e.prototype.createScatterChart=function(t,e){t.length>0&&this.appendChart(new Vp(this,{series:t,clip:e.options.clip}),e)},e.prototype.createScatterLineChart=function(t,e){t.length>0&&this.appendChart(new Tc(this,{series:t,clip:e.options.clip}),e)},e.prototype.createBubbleChart=function(t,e){t.length>0&&this.appendChart(new Up(this,{series:t,clip:e.options.clip}),e)},e.prototype.createXYAxis=function(t,e,o){for(var i,r=t.name,n=e?this.namedYAxes:this.namedXAxes,s=e?this.yAxisRangeTracker:this.xAxisRangeTracker,a=rr({reverse:!e&&this.chartService.rtl},t,{vertical:e}),p=ch(a.type,"log"),h=s.query(),c=p?{min:.1,max:1}:{min:0,max:1},l=s.query(r)||h||c,u=[a.min,a.max],d=this.series,f=0;f<d.length;f++){var v=d[f],g=v[e?"yAxis":"xAxis"];if(g===a.name||0===o&&!g){var m=Ca.current.bindPoint(v,0).valueFields;u.push(m[e?"y":"x"]);break}}0===o&&h&&(l.min=Math.min(l.min,h.min),l.max=Math.max(l.max,h.max));for(var x=0;x<u.length;x++)if(u[x]instanceof Date){i=!0;break}var _=new(ch(a.type,y)||!a.type&&i?Zs:p?Js:Xs)(l.min,l.max,a,this.chartService);if(_.axisIndex=o,r){if(n[r])throw new Error((e?"Y":"X")+" axis with name "+r+" is already defined");n[r]=_}return this.appendAxis(_),_},e.prototype.createAxes=function(t){for(var e=this.options,o=[].concat(e.xAxis),i=[],r=[].concat(e.yAxis),n=[],s=0;s<o.length;s++){wr(this.findPane(o[s].pane),t)&&i.push(this.createXYAxis(o[s],!1,s))}for(var a=0;a<r.length;a++){wr(this.findPane(r[a].pane),t)&&n.push(this.createXYAxis(r[a],!0,a))}this.axisX=this.axisX||i[0],this.axisY=this.axisY||n[0]},e.prototype._dispatchEvent=function(t,e,o){for(var i=t._eventCoordinates(e),r=new fn(i.x,i.y),n=this.axes,s=n.length,a=[],p=[],h=0;h<s;h++){var c=n[h],l=c.options.vertical?p:a,u=c.getValue(r);null!==u&&l.push(u)}a.length>0&&p.length>0&&t.trigger(o,{element:jr(e),originalEvent:e,x:fh(a),y:fh(p)})},e.prototype.updateAxisOptions=function(t,e){var o=t.options.vertical,i=this.groupAxes(this.panes),r=(o?i.y:i.x).indexOf(t);Oc(this.options,r,o,e),Oc(this.originalOptions,r,o,e)},e}(kh);function Oc(t,e,o,i){rr([].concat(o?t.yAxis:t.xAxis)[e],i)}Yr(Mc,{xAxis:{},yAxis:{}}),rr(Mc.prototype,Sh);var Bc=Mc,Rc=function(t){function e(e,o,i){t.call(this,i),this.value=e,this.sector=o}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.render=function(){var t=this.options.labels,e=this.owner.chartService,o=this.value;if(!this._rendered&&!1!==this.visible){this._rendered=!0;var i=fr(t),r=this.pointData();if(i?o=i(r):t.format&&(o=e.format.auto(t.format,o)),t.visible&&(o||0===o)){if(t.position===d||"insideEnd"===t.position)t.color||(t.color=rn(this.options.color)),t.background||(t.background=this.options.color);else{var n=e.theme.seriesDefaults.labels;t.color=t.color||n.color,t.background=t.background||n.background}this.label=new Vn(o,rr({},t,{align:d,vAlign:"",animation:{type:"fadeIn",delay:this.animationDelay}}),r),this.append(this.label)}}},e.prototype.reflow=function(t){this.render(),this.box=t,this.reflowLabel()},e.prototype.reflowLabel=function(){var t=this.options.labels,e=this.label,o=this.sector.clone(),i=t.distance,r=o.middle();if(e){var n,s=e.box.height(),a=e.box.width();if(t.position===d)o.radius=Math.abs((o.radius-s)/2)+s,n=o.point(r),e.reflow(new vn(n.x,n.y-s/2,n.x,n.y));else if("insideEnd"===t.position)o.radius=o.radius-s/2,n=o.point(r),e.reflow(new vn(n.x,n.y-s/2,n.x,n.y));else{var p;(n=o.clone().expand(i).point(r)).x>=o.center.x?(p=n.x+a,e.orientation=_):(p=n.x-a,e.orientation=g),e.reflow(new vn(p,n.y-s,n.x,n.y))}}},e.prototype.createVisual=function(){var e=this,o=this.sector,i=this.options;if(t.prototype.createVisual.call(this),this.value)if(i.visual){var r=(o.startAngle+180)%360,n=i.visual({category:this.category,dataItem:this.dataItem,value:this.value,series:this.series,percentage:this.percentage,center:new p.Point(o.center.x,o.center.y),radius:o.radius,innerRadius:o.innerRadius,startAngle:r,endAngle:r+o.angle,options:i,sender:this.getSender(),createVisual:function(){var t=new a.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,o=this.options,i=o.border||{},r=i.width>0?{stroke:{color:i.color,width:i.width,opacity:i.opacity,dashType:i.dashType}}:{},n=o.color,s={color:n,opacity:o.opacity},a=this.createSegment(e,rr({fill:s,stroke:{opacity:o.opacity},zIndex:o.zIndex},r));t.append(a),vp(o)&&t.append(this.createGradientOverlay(a,{baseColor:n,fallbackFill:s},rr({center:[e.center.x,e.center.y],innerRadius:e.innerRadius,radius:e.radius,userSpace:!0},o.overlay)))},e.prototype.createSegment=function(t,e){return e.singleSegment?new a.Circle(new p.Circle(new p.Point(t.center.x,t.center.y),t.radius),e):bn.current.createRing(t,e)},e.prototype.createAnimation=function(){var e=this.options,o=this.sector.center;rr(e,{animation:{center:[o.x,o.y],delay:this.animationDelay}}),t.prototype.createAnimation.call(this)},e.prototype.createHighlight=function(t){var e=this.options.highlight||{},o=e.border||{};return this.createSegment(this.sector,rr({},t,{fill:{color:e.color,opacity:e.opacity},stroke:{opacity:o.opacity,width:o.width,color:o.color}}))},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 p.Point(t.center.x,t.center.y),startAngle:t.startAngle,endAngle:t.angle+t.startAngle,visual:this.visual}},e.prototype.tooltipAnchor=function(){var t=this.sector.clone().expand(5),e=t.middle();return{point:t.point(e),align:Lc(e+180)}},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}(Cn),Ec=Ur(Nr(30),10),zc=Ur(Nr(60),10);function Lc(t){var e=Nr(t),o=Ur(Math.sin(e),10),i=Ur(Math.cos(e),10);return{horizontal:Math.abs(o)>zc?d:i<0?_:g,vertical:Math.abs(o)<Ec?d:o<0?u:b}}Yr(Rc,{color:C,overlay:{gradient:"roundedBevel"},border:{width:.5},labels:{visible:!1,distance:35,font:"12px sans-serif",margin:cr(.5),align:f,zIndex:1,position:"outsideEnd"},animation:{type:Ea},highlight:{visible:!0,border:{width:1}},visible:!0}),rr(Rc.prototype,Ga);var Ic=Rc,jc={createLegendItem:function(t,e,o){var i=this.options.legend||{},r=i.labels||{},n=i.inactiveItems||{},s=n.labels||{};if(o&&!1!==o.visibleInLegend){var a,p,h=!1!==o.visible,c=h?fr(r):fr(s)||fr(r),l=o.category;c&&(l=c({text:l,series:o.series,dataItem:o.dataItem,percentage:o.percentage,value:t})),h?(a={},p=e.color):(a={color:s.color,font:s.font},p=(n.markers||{}).color),jp(l)&&""!==l&&this.legendItems.push({active:h,pointIndex:o.index,text:l,series:o.series,markerColor:p,labels:a})}}},Dc=function(t){function e(e,o){t.call(this,o),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,o=this.plotArea.options.seriesColors;void 0===o&&(o=[]);for(var i=o.length,r=e.series,n=r.length,s=0;s<n;s++){var a=r[s],p=a.data,h=hh(a),c=h.total,l=h.points,u=h.count,f=360/c,y=void 0;isFinite(f)||(y=360/u);var v=void 0;v=Rr(a.startAngle)?a.startAngle:e.startAngle,s!==n-1&&"outsideEnd"===a.labels.position&&(a.labels.position=d);for(var g=0;g<l.length;g++){var m=l[g];if(m){var x=m.fields,_=m.value,b=m.visible,w=0!==_?y||_*f:0,C=1!==p.length&&Boolean(x.explode);or(a.color)||(a.color=x.color||o[g%i]),t(m.valueFields.value,new mn(null,0,0,v,w),{owner:this,category:Rr(x.category)?x.category:"",index:g,series:a,seriesIx:s,dataItem:p[g],percentage:0!==c?_/c:0,explode:C,visibleInLegend:x.visibleInLegend,visible:b,zIndex:n-s,animationDelay:this.animationDelay(g,s,n)}),!1!==b&&(v+=w)}}}},e.prototype.evalSegmentOptions=function(t,e,o){var i=o.series;Ha(t,{value:e,series:i,dataItem:o.dataItem,category:o.category,percentage:o.percentage},{defaults:i._defaults,excluded:["data","content","template","visual","toggle"]})},e.prototype.addValue=function(t,e,o){var i=rr({},o.series,{index:o.index});if(this.evalSegmentOptions(i,t,o),this.createLegendItem(t,i,o),!1!==o.visible){var r=new Ic(t,e,i);Object.assign(r,o),this.append(r),this.points.push(r)}},e.prototype.reflow=function(t){var e=this.options,o=this.points,i=this.seriesConfigs;void 0===i&&(i=[]);var r=o.length,n=t.clone(),s=Math.min(n.width(),n.height()),a=s/2,p=s-.85*s,h=new vn(n.x1,n.y1,n.x1+s,n.y1+s),c=h.center(),l=n.center(),u=e.series.length,d=[],f=[],y=Wr(e.padding,p);this.targetBox=t,y=y>a-5?a-5:y,h.translate(l.x-c.x,l.y-c.y);for(var v=a-y,g=new fn(v+h.x1+y,v+h.y1+y),m=0;m<r;m++){var x=o[m],b=x.sector,w=x.seriesIx;if(b.radius=v,b.center=g,i.length){var C=i[w];b.innerRadius=C.innerRadius,b.radius=C.radius}w===u-1&&x.explode&&(b.center=b.clone().setRadius(.15*b.radius).point(b.middle())),x.reflow(h);var k=x.label;k&&"outsideEnd"===k.options.position&&w===u-1&&(k.orientation===_?f.push(k):d.push(k))}d.length>0&&(d.sort(this.labelComparator(!0)),this.leftLabelsReflow(d)),f.length>0&&(f.sort(this.labelComparator(!1)),this.rightLabelsReflow(f)),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=Vr(this.points),o=e.sector,i=t.length-1,r=o.radius+e.options.labels.distance,n=[],s=t[0].box,a=Ur(s.y1-(o.center.y-r-s.height()-s.height()/2));n.push(a);for(var p=0;p<i;p++){var h=t[p+1].box;s=t[p].box,a=Ur(h.y1-s.y2),n.push(a)}return a=Ur(o.center.y+r-t[i].box.y2-t[i].box.height()/2),n.push(a),n},e.prototype.distributeLabels=function(t,e){for(var o,i,r,n=t.length,s=0;s<n;s++)for(r=-t[s],o=i=s;r>0&&(o>=0||i<n);)r=this._takeDistance(t,s,--o,r),r=this._takeDistance(t,s,++i,r);this.reflowLabels(t,e)},e.prototype._takeDistance=function(t,e,o,i){var r=i;if(t[o]>0){var n=Math.min(t[o],r);r-=n,t[o]-=n,t[e]+=n}return r},e.prototype.reflowLabels=function(t,e){var o,i=Vr(this.points),r=i.sector,n=i.options.labels,s=e.length,a=n.distance,p=r.center.y-(r.radius+a)-e[0].box.height();t[0]+=2;for(var h=0;h<s;h++){var c=e[h],l=c.box;p+=t[h],o=this.hAlignLabel(l.x2,r.clone().expand(a),p,p+l.height(),c.orientation===_),c.orientation===_?(n.align!==f&&(o=r.radius+r.center.x+a),c.reflow(new vn(o+l.width(),p,o,p))):(n.align!==f&&(o=r.center.x-r.radius-a),c.reflow(new vn(o-l.width(),p,o,p))),p+=l.height()}},e.prototype.createVisual=function(){var e=this.options.connectors,o=this.points,i=o.length;t.prototype.createVisual.call(this),this._connectorLines=[];for(var r=0;r<i;r++){var n=o[r],s=n.sector,p=n.label,h=s.middle(),c=(n.options.connectors||{}).color||e.color;if(p){var l=new a.Path({stroke:{color:c,width:e.width},animation:{type:"fadeIn",delay:n.animationDelay}});if("outsideEnd"===p.options.position){var u=p.box,d=s.center,f=s.point(h),y=new fn(u.x1,u.center().y),v=void 0,g=void 0,m=void 0;f=s.clone().expand(e.padding).point(h),l.moveTo(f.x,f.y),p.orientation===_?(m=Vc(d,f,y,g=new fn(u.x1-e.padding,u.center().y)),y=new fn(g.x-4,g.y),(m=m||y).x=Math.min(m.x,y.x),this.pointInCircle(m,s.center,s.radius+4)||m.x<s.center.x?(v=s.center.x+s.radius+4,n.options.labels.align!==Ba?v<y.x?l.lineTo(v,f.y):l.lineTo(f.x+8,f.y):l.lineTo(v,f.y),l.lineTo(y.x,g.y)):(m.y=g.y,l.lineTo(m.x,m.y))):(m=Vc(d,f,y,g=new fn(u.x2+e.padding,u.center().y)),y=new fn(g.x+4,g.y),(m=m||y).x=Math.max(m.x,y.x),this.pointInCircle(m,s.center,s.radius+4)||m.x>s.center.x?(v=s.center.x-s.radius-4,n.options.labels.align!==Ba?v>y.x?l.lineTo(v,f.y):l.lineTo(f.x-8,f.y):l.lineTo(v,f.y),l.lineTo(y.x,g.y)):(m.y=g.y,l.lineTo(m.x,m.y))),l.lineTo(g.x,g.y),this._connectorLines.push(l),this.visual.append(l)}}}},e.prototype.renderVisual=function(){if(t.prototype.renderVisual.call(this),Qr(this.options.series,(function(t){return t.autoFit}))){var e=this.targetBox,o=this.box.center(),i=this.visual.bbox();if(!i)return;var r=i.bottomRight(),n=Math.min((o.y-e.y1)/(o.y-i.origin.y),(e.y2-o.y)/(r.y-o.y),(o.x-e.x1)/(o.x-i.origin.x),(e.x2-o.x)/(r.x-o.x));n<1&&this.visual.transform(p.transform().scale(n,n,[o.x,o.y]))}},e.prototype.labelComparator=function(t){var e=t?-1:1;return function(t,o){return((t.parent.sector.middle()+270)%360-(o.parent.sector.middle()+270)%360)*e}},e.prototype.hAlignLabel=function(t,e,o,i,r){var n=e.radius,s=e.center,a=s.x,p=s.y,h=Math.min(Math.abs(p-o),Math.abs(p-i));return h>n?t:a+Math.sqrt(n*n-h*h)*(r?1:-1)},e.prototype.pointInCircle=function(t,e,o){return Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2)<Math.pow(o,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}(Cn);function Vc(t,e,o,i){var r,n=(i.x-o.x)*(t.y-o.y)-(i.y-o.y)*(t.x-o.x),s=(i.y-o.y)*(e.x-t.x)-(i.x-o.x)*(e.y-t.y);if(0!==s){var a=n/s;r=new fn(t.x+a*(e.x-t.x),t.y+a*(e.y-t.y))}return r}Yr(Dc,{startAngle:90,connectors:{width:2,color:"#939393",padding:8},inactiveItems:{markers:{},labels:{}}}),rr(Dc.prototype,jc),Dc.prototype.isStackRoot=!0;var Hc=Dc,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.render=function(){this.createPieChart(this.series)},e.prototype.createPieChart=function(t){var e=t[0],o=new Hc(this,{series:t,padding:e.padding,startAngle:e.startAngle,connectors:e.connectors,legend:this.options.legend});this.appendChart(o)},e.prototype.appendChart=function(e,o){t.prototype.appendChart.call(this,e,o),Or(this.options.legend.items,e.legendItems)},e}(kh),Nc=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,o=this.label,i=this.sector.clone(),r=i.middle();if(o){var n=o.box.height();if(e.position===d){i.radius-=(i.radius-i.innerRadius)/2;var s=i.point(r);o.reflow(new vn(s.x,s.y-n/2,s.x,s.y))}else t.prototype.reflowLabel.call(this)}},e.prototype.createSegment=function(t,e){return bn.current.createRing(t,e)},e}(Ic);Yr(Nc,{overlay:{gradient:"roundedGlass"},labels:{position:d},animation:{type:Ea}}),rr(Nc.prototype,Ga);var Uc=Nc,Gc=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,o){var i=rr({},o.series,{index:o.index});if(this.evalSegmentOptions(i,t,o),this.createLegendItem(t,i,o),t&&!1!==o.visible){var r=new Uc(t,e,i);Object.assign(r,o),this.append(r),this.points.push(r)}},e.prototype.reflow=function(e){for(var o,i=this.options,r=e.clone(),n=Math.min(r.width(),r.height()),s=n/2,a=n-.85*n,p=i.series,h=p.length,c=Wr(i.padding,a),l=s-(c=c>s-5?s-5:c),u=0,d=0;d<h;d++){var f=p[d];0===d&&Rr(f.holeSize)&&(o=f.holeSize,l-=f.holeSize),Rr(f.size)?l-=f.size:u++,Rr(f.margin)&&d!==h-1&&(l-=f.margin)}Rr(o)||(l-=o=.75*((s-c)/(h+.75)));var y,v=o,g=0;this.seriesConfigs=[];for(var m=0;m<h;m++){var x=p[m];y=(v+=g)+Wr(x.size,l/u),this.seriesConfigs.push({innerRadius:v,radius:y}),g=x.margin||0,v=y}t.prototype.reflow.call(this,e)},e.prototype.animationDelay=function(t,e,o){return 50*t+600*(e+1)/(o+1)},e}(Hc);Yr(Gc,{startAngle:90,connectors:{width:2,color:"#939393",padding:8}});var Wc=Gc,qc=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],o=new Wc(this,{series:t,padding:e.padding,connectors:e.connectors,legend:this.options.legend});this.appendChart(o)},e}(Fc),Xc=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 dp},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(),o=t.options.reverse?e.max:e.min,i=t.getSlot(o),r=this.polarAxis.getSlot(0).center,n=t.box.translate(r.x-i.x1,r.y-i.y1);t.reflow(n)},e.prototype.createValueAxis=function(){var t,e,o=this.valueAxisRangeTracker,i=o.query(),r=this.valueAxisOptions({roundToMajorUnit:!1,zIndex:-1});"log"===r.type?(t=ca,e={min:.1,max:1}):(t=pa,e={min:0,max:1});var n=o.query(name)||i||e;n&&i&&(n.min=Math.min(n.min,i.min),n.max=Math.max(n.max,i.max));var s=new t(n.min,n.max,r,this.chartService);this.valueAxis=s,this.appendAxis(s)},e.prototype.reflowAxes=function(){var t=this.options.plotArea,e=this.valueAxis,o=this.polarAxis,i=this.box,r=.15*Math.min(i.width(),i.height()),n=cr(t.padding||{},r),s=i.clone().unpad(n),a=s.clone();a.y2=a.y1+Math.min(a.width(),a.height()),a.align(s,S,d);var p=a.clone().shrink(0,a.height()/2);o.reflow(a),e.reflow(p);var h=e.lineBox().height()-e.box.height();e.reflow(e.box.unpad({top:h})),this.axisBox=a,this.alignAxes(a)},e.prototype.backgroundBox=function(){return this.box},e.prototype.detachLabels=function(){},e}(kh),Yc=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 o=t.center.y-e.y1,i=fn.onCircle(t.center,t.startAngle,o);return new vn(i.x,i.y,i.x,i.y)},e}(Vp);Yr(Yc,{clip:!1});var Zc=Yc,Qc=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}(Tc);Qc.prototype.pointSlot=Zc.prototype.pointSlot,Yr(Qc,{clip:!1});var Kc=Qc,$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.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(),o=new ua(!1),i=this.points();i.push(e),(t=this._strokeSegments=o.process(i)).pop()}return t},e}(lp),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.fillToAxes=function(t){var e=this.parent.plotArea.polarAxis.box.center(),o=new p.Segment([e.x,e.y]);t.segments.unshift(o),t.segments.push(o)},e}(pp);function tl(t,e){return t.value.x-e.value.x}var el=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,o){return"smooth"===(e.line||{}).style?new $c(t,e,o):new Jc(t,e,o)},e.prototype.createMissingValue=function(t,e){var o;return jp(t.x)&&"interpolate"!==e&&(o={x:t.x,y:t.y},e===Ma&&(o.y=0)),o},e.prototype.seriesMissingValues=function(t){return t.missingValues||Ma},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(tl),this._hasMissingValuesGap())for(var e=0;e<t.length;e++){var o=t[e];if(o)jp(o.value.y)||"gap"!==this.seriesMissingValues(o.series)||delete t[e]}return t},e}(Kc),ol=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 ra(this.options.xAxis,this.chartService);this.polarAxis=t,this.axisX=t,this.appendAxis(t)},e.prototype.valueAxisOptions=function(t){return rr(t,{majorGridLines:{type:c},minorGridLines:{type:c}},this.options.yAxis)},e.prototype.createValueAxis=function(){t.prototype.createValueAxis.call(this),this.axisY=this.valueAxis},e.prototype.appendChart=function(t,e){this.valueAxisRangeTracker.update(t.yAxisRanges),kh.prototype.appendChart.call(this,t,e)},e.prototype.createCharts=function(){var t=this.filterVisibleSeries(this.series),e=this.panes[0];this.createLineChart(lh(t,["polarLine"]),e),this.createScatterChart(lh(t,["polarScatter"]),e),this.createAreaChart(lh(t,["polarArea"]),e)},e.prototype.createLineChart=function(t,e){if(0!==t.length){var o=new Kc(this,{series:t});this.appendChart(o,e)}},e.prototype.createScatterChart=function(t,e){if(0!==t.length){var o=new Zc(this,{series:t});this.appendChart(o,e)}},e.prototype.createAreaChart=function(t,e){if(0!==t.length){var o=new el(this,{series:t});this.appendChart(o,e)}},e.prototype._dispatchEvent=function(t,e,o){var i=t._eventCoordinates(e),r=new fn(i.x,i.y),n=this.axisX.getValue(r),s=this.axisY.getValue(r);null!==n&&null!==s&&t.trigger(o,{element:jr(e),x:n,y:s})},e.prototype.createCrosshairs=function(){},e}(Xc);Yr(ol,{xAxis:{},yAxis:{}}),rr(ol.prototype,Sh);var il=ol;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.pointSlot=function(t,e){var o=t.center.y-e.y1,i=fn.onCircle(t.center,t.middle(),o);return new vn(i.x,i.y,i.x,i.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=[],o=0;o<t.length;o++){var i=t[o];e[i.seriesIx]=e[i.seriesIx]||[],e[i.seriesIx].push(i)}return e}(this._segments),o=0;o<e.length;o++){var i=e[o];if(i&&i.length>1){var r=i[0].linePoints[0],n=Vr(i),s=Vr(n.linePoints),a=0===r.categoryIx,p=s.categoryIx===s.categoriesCount-1;a&&p&&Vr(i).linePoints.push(r)}}},e.prototype.createSegment=function(t,e,o){var i=new("smooth"===e.style?tp:Za)(t,e,o),r=this.seriesMissingValues(e);return t.length!==e.data.length&&"interpolate"!==r||(i.options.closed=!0),i},e}(ap);Yr(rl,{clip:!1,limitPoints:!1});var nl=rl,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.fillToAxes=function(){},e}(lp),al=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}(pp),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.createSegment=function(t,e,o,i){var r,n,s,a=this.options.isStacked,p=(e.line||{}).style;return a&&o>0&&i&&(n=i.linePoints.slice(0),r=i),"smooth"===p?(s=new sl(t,e,o,r,n)).options.closed=!0:(t.push(t[0]),s=new al(t,e,o,r,n)),s},e.prototype.seriesMissingValues=function(t){return t.missingValues||Ma},e}(nl),hl=function(t){function e(e,o){t.call(this,e,null,o)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Uc);Yr(hl,{overlay:{gradient:"none"},labels:{distance:10}});var cl=hl,ll=function(t){function e(e){t.call(this,e),this.forEach=e.rtl?_p:xp}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,o=this.children,i=e.gap,r=e.spacing,n=o.length,s=n+i+r*(n-1),a=t.angle/s,p=t.startAngle+a*(i/2);this.forEach(o,(function(e){var o=t.clone();o.startAngle=p,o.angle=a,e.sector&&(o.radius=e.sector.radius),e.reflow(o),e.sector=o,p+=a+a*r}))},e}(Cn);Yr(ll,{gap:1,spacing:0});var ul=ll,dl=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,o=this.children,i=o.length,r=e?i-1:0,n=e?-1:1;this.box=new vn;for(var s=r;s>=0&&s<i;s+=n){var a=o[s].sector;a.startAngle=t.startAngle,a.angle=t.angle}},e}(Cn),fl=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.prototype.clusterType=function(){return ul},e.prototype.stackType=function(){return dl},e.prototype.categorySlot=function(t,e){return t.getSlot(e)},e.prototype.pointSlot=function(t,e){var o=t.clone(),i=t.center.y;return o.radius=i-e.y1,o.innerRadius=i-e.y2,o},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}(Ap);fl.prototype.reflow=Ua.prototype.reflow,Yr(fl,{clip:!1,limitPoints:!1,animation:{type:"pie"}});var yl=fl,vl=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 oa(this.options.categoryAxis,this.chartService);this.polarAxis=t,this.categoryAxis=t,this.appendAxis(t),this.aggregateCategories(),this.createCategoryAxesLabels()},e.prototype.valueAxisOptions=function(t){return this._hasBarCharts&&rr(t,{majorGridLines:{type:c},minorGridLines:{type:c}}),this._isStacked100&&rr(t,{roundToMajorUnit:!1,labels:{format:"P0"}}),rr(t,this.options.valueAxis)},e.prototype.aggregateCategories=function(){Jh.prototype.aggregateCategories.call(this,this.panes)},e.prototype.createCategoryAxesLabels=function(){Jh.prototype.createCategoryAxesLabels.call(this,this.panes)},e.prototype.filterSeries=function(t){return t},e.prototype.createCharts=function(){var t=this.filterVisibleSeries(this.series),e=this.panes[0];this.createAreaChart(lh(t,["radarArea"]),e),this.createLineChart(lh(t,["radarLine"]),e),this.createBarChart(lh(t,["radarColumn"]),e)},e.prototype.chartOptions=function(t){var e={series:t},o=t[0];if(o){var i=this.filterVisibleSeries(t),r=o.stack;e.isStacked=r&&i.length>1,e.isStacked100=r&&"100%"===r.type&&i.length>1,e.isStacked100&&(this._isStacked100=!0)}return e},e.prototype.createAreaChart=function(t,e){if(0!==t.length){var o=new pl(this,this.chartOptions(t));this.appendChart(o,e)}},e.prototype.createLineChart=function(t,e){if(0!==t.length){var o=new nl(this,this.chartOptions(t));this.appendChart(o,e)}},e.prototype.createBarChart=function(t,e){if(0!==t.length){var o=t[0],i=this.chartOptions(t);i.gap=o.gap,i.spacing=o.spacing;var r=new yl(this,i);this.appendChart(r,e),this._hasBarCharts=!0}},e.prototype.seriesCategoryAxis=function(){return this.categoryAxis},e.prototype._dispatchEvent=function(t,e,o){var i=t._eventCoordinates(e),r=new fn(i.x,i.y),n=this.categoryAxis.getCategory(r),s=this.valueAxis.getValue(r);null!==n&&null!==s&&t.trigger(o,{element:jr(e),category:n,value:s})},e.prototype.createCrosshairs=function(){},e}(Xc);rr(vl.prototype,Sh,{appendChart:Jh.prototype.appendChart,aggregateSeries:Jh.prototype.aggregateSeries,seriesSourcePoints:Jh.prototype.seriesSourcePoints}),Yr(vl,{categoryAxis:{categories:[]},valueAxis:{}});var gl=vl,ml=function(t){function e(e,o,i){t.call(this,o),this.value=e,this.options.index=i.index}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reflow=function(t){var e=this.points,o=this.children[0];this.box=new vn(e[0].x,e[0].y,e[1].x,e[2].y),o&&o.reflow(new vn(t.x1,e[0].y,t.x2,e[2].y))},e.prototype.createVisual=function(){var e,o=this,i=this.options;t.prototype.createVisual.call(this),(e=i.visual?i.visual({category:this.category,dataItem:this.dataItem,value:this.value,series:this.series,percentage:this.percentage,points:this.points,options:i,sender:this.getSender(),createVisual:function(){return o.createPath()}}):this.createPath())&&this.visual.append(e)},e.prototype.createPath=function(){var t=this.options,e=t.border;return a.Path.fromPoints(this.points,{fill:{color:t.color,opacity:t.opacity},stroke:{color:e.color,opacity:e.opacity,width:e.width}}).close()},e.prototype.createHighlight=function(t){return a.Path.fromPoints(this.points,t)},e.prototype.highlightVisual=function(){return this.visual.children[0]},e.prototype.highlightVisualArgs=function(){var t=a.Path.fromPoints(this.points).close();return{options:this.options,path:t}},e.prototype.tooltipAnchor=function(){var t=this.box;return{point:new fn(t.center().x,t.y1),align:{horizontal:"center",vertical:"top"}}},e.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},e}(Cn);Yr(ml,{color:C,border:{width:1}}),rr(ml.prototype,Ga);var xl=ml,_l=function(t){function e(e,o){t.call(this,o),this.plotArea=e,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.chartService.format.auto(e,t.value)},e.prototype.render=function(){var t=this.options,e=this.plotArea.options.seriesColors;void 0===e&&(e=[]);var o=t.series[0],i=o.data;if(i)for(var r=hh(o),n=r.total,s=r.points,a=0;a<s.length;a++){var p=s[a];if(p){var h=p.fields;or(o.color)||(o.color=h.color||e[a%e.length]),h=rr({index:a,owner:this,series:o,dataItem:i[a],percentage:p.value/n},h,{visible:p.visible});var c=p.valueFields.value,l=this.createSegment(c,h),u=this.createLabel(c,h);l&&u&&l.append(u)}}},e.prototype.evalSegmentOptions=function(t,e,o){var i=o.series;Ha(t,{value:e,series:i,dataItem:o.dataItem,index:o.index},{defaults:i._defaults,excluded:["data","content","template","toggle","visual"]})},e.prototype.createSegment=function(t,e){var o=rr({},e.series);if(this.evalSegmentOptions(o,t,e),this.createLegendItem(t,o,e),!1!==e.visible){var i=new xl(t,o,e);return Object.assign(i,e),this.append(i),this.points.push(i),i}},e.prototype.createLabel=function(t,e){var o=e.series,i=e.dataItem,r=rr({},this.options.labels,o.labels),n=t;if(r.visible){var s=fr(r),a={dataItem:i,value:t,percentage:e.percentage,category:e.category,series:o};s?n=s(a):r.format&&(n=this.plotArea.chartService.format.auto(r.format,n)),r.color||(r.color=rn(o.color),r.background||(r.background=o.color)),this.evalSegmentOptions(r,t,e);var p=new Vn(n,rr({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},o=0;o<t.length;o++){var i=t[o].options.align;if(i!==d){var r=t[o].box.width();i===g?e.left=Math.max(e.left,r):e.right=Math.max(e.right,r)}}return e},e.prototype.dynamicSlopeReflow=function(t,e,o){for(var i=this.options,r=this.points,n=r.length,s=r[0],a=s,h=0;h<r.length;h++)r[h].percentage>a.percentage&&(a=r[h]);for(var c=s.percentage/a.percentage*e,l=(e-c)/2,u=0,d=0;d<n;d++){var f=r[d].percentage,y=r[d+1],v=y?y.percentage:f,g=r[d].points=[],m=i.dynamicHeight?o*f:o/n,x=void 0;x=Hr(x=f?(e-c*(v/f))/2:v?0:e/2,0,e),g.push(new p.Point(t.x1+l,t.y1+u)),g.push(new p.Point(t.x1+e-l,t.y1+u)),g.push(new p.Point(t.x1+e-x,t.y1+m+u)),g.push(new p.Point(t.x1+x,t.y1+m+u)),l=x,u+=m+i.segmentSpacing,c=Hr(e-2*x,0,e)}},e.prototype.constantSlopeReflow=function(t,e,o){for(var i=this.options,r=this.points,n=r.length,s=i.neckRatio<=1,a=s?i.neckRatio*e:e,h=s?0:(e-e/i.neckRatio)/2,c=((s?e:e-2*h)-a)/2,l=0,u=0;u<n;u++){var d=r[u].points=[],f=r[u].percentage,y=i.dynamicHeight?c*f:c/n,v=i.dynamicHeight?o*f:o/n;d.push(new p.Point(t.x1+h,t.y1+l)),d.push(new p.Point(t.x1+e-h,t.y1+l)),d.push(new p.Point(t.x1+e-h-y,t.y1+v+l)),d.push(new p.Point(t.x1+h+y,t.y1+v+l)),h+=y,l+=v+i.segmentSpacing}},e.prototype.reflow=function(t){var e=this.points,o=e.length;if(o){var i=this.options,r=t.clone().unpad(this.labelPadding()),n=r.height()-i.segmentSpacing*(o-1),s=r.width();i.dynamicSlope?this.dynamicSlopeReflow(r,s,n):this.constantSlopeReflow(r,s,n);for(var a=0;a<o;a++)e[a].reflow(t)}},e}(Cn);Yr(_l,{neckRatio:.3,width:300,dynamicSlope:!1,dynamicHeight:!0,segmentSpacing:0,labels:{visible:!1,align:d,position:d,zIndex:1}}),rr(_l.prototype,jc);var bl=_l,wl=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.createFunnelChart(this.series)},e.prototype.createFunnelChart=function(t){var e=t[0],o=new bl(this,{series:t,legend:this.options.legend,neckRatio:e.neckRatio,dynamicHeight:e.dynamicHeight,dynamicSlope:e.dynamicSlope,segmentSpacing:e.segmentSpacing,highlight:e.highlight});this.appendChart(o)},e.prototype.appendChart=function(e,o){t.prototype.appendChart.call(this,e,o),Or(this.options.legend.items,e.legendItems)},e}(kh),Cl=function(t,e){void 0===e&&(e=.05);var o=Ti(t),i=1-e;return function(t){var e=o.toHSL(),r=100-e.l,n=i-t;return e.l+=Math.min(n*r,r),e.toCss()}},kl=function(t){function e(e,o){t.call(this),this.options=o,this.color=o.color||C,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;if(t.visible){var e,o=this.pointData(),i=fr(t),r=t.color;e=i?i(o):this.formatValue(t.format),r||(r=rn(this.color)),this.label=new Vn(e,rr({align:d,vAlign:d,margin:{left:5,right:5},zIndex:Wr(t.zIndex,this.series.zIndex)},t,{color:r}),o),this.append(this.label)}},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.markerBox=function(){var t=this.options.markers,e=t.border,o=this.box.toRect(),i="roundedRect"===Wr(t.type,"rect"),r=Wr(e.width,i?1:0),n=Math.round(r/2);if(t.size){var s=o.center();o.size.width=o.size.height=t.size,o.origin.x=Math.round(s.x-o.size.width/2),o.origin.y=Math.round(s.y-o.size.height/2)}return o.size.width-=r,o.size.height-=r,o.origin.y+=n+.5,o.origin.x+=n+.5,jn(o)},e.prototype.markerBorder=function(){var t=this.options,e=t.markers.border,o=Wr(e.opacity,t.opacity);return{color:e.color||this.color,width:e.width,opacity:o,dashType:e.dashType}},e.prototype.createMarker=function(){var t=this.options,e=t.markers,o=new Pn({type:Wr(e.type,"rect"),width:e.size,height:e.size,rotation:e.rotation,background:this.color,border:this.markerBorder(),borderRadius:e.borderRadius,opacity:this.series.opacity||t.opacity,zIndex:Wr(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=o,this.append(o)},e.prototype.createHighlight=function(t){var e=this.options,o=this.options.highlight.markers||this.options.markers,i=new Pn({type:Wr(o.type,"rect"),width:o.size,height:o.size,rotation:o.rotation,background:o.color||this.color,border:this.markerBorder(),borderRadius:o.borderRadius,opacity:this.series.opacity||e.opacity,zIndex:Wr(e.zIndex,this.series.zIndex)});i.reflow(this.markerBox());var r=i.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.tooltipAnchor=function(){var t=this.box.center().x,e=this.box.y1-5;return{point:new fn(t,e),align:{horizontal:d,vertical:u}}},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}(Cn);rr(kl.prototype,Ga),rr(kl.prototype,Wa),kl.prototype.defaults={markers:{type:"rect",borderRadius:4,border:{color:"transparent"}},padding:{top:1},labels:{visible:!1,padding:3},opacity:1,notes:{label:{}}};var Sl=kl,Al=function(t){function e(e,o){t.call(this,o),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:m,max:x},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 o=t[e],i=0;i<o.data.length;i++){var r=this._bindPoint(o,e,i).valueFields;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 o;t&&(o=this.createPoint(t,e))&&Object.assign(o,e),this.points.push(o)},e.prototype.evalPointOptions=function(t,e,o){var i=o.series,r=o.seriesIx,n={defaults:i._defaults,excluded:["data","tooltip","content","template","visual","toggle"]},s=this._evalSeries[r];Rr(s)||(this._evalSeries[r]=s=Ha(t,{},n,!0));var a=t;return s&&Ha(a=rr({},t),{value:e,series:i,dataItem:o.dataItem,min:this.valueRange.min,max:this.valueRange.max},n),a},e.prototype.pointType=function(){return Sl},e.prototype.pointOptions=function(t,e){var o=this.seriesOptions[e];if(!o){var i=this.pointType().prototype.defaults;this.seriesOptions[e]=o=rr({},i,{markers:{opacity:t.opacity},tooltip:{format:this.options.tooltip.format},labels:{format:this.options.labels.format}},t)}return o},e.prototype.createPoint=function(t,e){var o=e.series,i=this.pointOptions(o,e.seriesIx),r=e.color||o.color;if(i=this.evalPointOptions(i,t,e),or(o.color))r=i.color;else if(0!==this.valueRange.max){r=Cl(r)(t.value/this.valueRange.max)}var n=new Sl(t,i);return n.color=r,this.append(n),n},e.prototype.seriesAxes=function(t){var e=t.xAxis,o=t.yAxis,i=this.plotArea,r=e?i.namedXAxes[e]:i.axisX,n=o?i.namedYAxes[o]:i.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 "+o);return{xAxis:r,yAxis:n}},e.prototype.reflow=function(t){var e=this,o=this.points,i=!this.options.clip,r=0;this.traverseDataPoints((function(t,n){var s=o[r++],a=e.seriesAxes(n.series),p=a.xAxis,h=a.yAxis,c=p.categoryIndex(t.x),l=h.categoryIndex(t.y),u=p.getSlot(c,c,i),d=h.getSlot(l,l,i);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 vn(t.x1,e.y1,t.x2,e.y2)},e.prototype.traverseDataPoints=function(t){for(var e=this.options.series,o=0;o<e.length;o++)for(var i=e[o],r=this.seriesAxes(i),n=r.xAxis,s=r.yAxis,a=n.currentRangeIndices(),p=s.currentRangeIndices(),h=0;h<i.data.length;h++){var c=this._bindPoint(i,o,h),l=c.valueFields,u=c.fields,d=n.totalIndex(l.x),f=s.totalIndex(l.y),y=a.min<=d&&d<=a.max,v=p.min<=f&&f<=p.max;y&&v&&t(l,rr({pointIx:h,series:i,seriesIx:o,dataItem:i.data[h],owner:this},u))}},e.prototype.formatPointValue=function(t,e){var o=t.value;return this.chartService.format.auto(e,o.x,o.y,o.value)},e.prototype.animationPoints=function(){for(var t=this.points,e=[],o=0;o<t.length;o++)e.push((t[o]||{}).marker);return e},e}(Cn);Yr(Al,{series:[],tooltip:{format:"{0}, {1}: {2}"},labels:{format:"{2}"},clip:!0}),rr(Al.prototype,{_bindPoint:Ua.prototype._bindPoint});var Pl=Al,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(){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 o=t[e],i=o.data||[],r=this.seriesAxes(o),n=r.xAxis,s=r.yAxis,a=cn(n.categories||[]),p=cn(s.categories||[]),h=0;h<i.length;h++){var c=Ca.current.bindPoint(o,h).valueFields,l=c.x,u=c.y;a.has(l)||a.add(l),p.has(u)||p.add(u)}n.categories=a.values(),s.categories=p.values()}},e.prototype.createCharts=function(t){for(var e=this.groupSeriesByPane(),o=0;o<t.length;o++){var i=t[o],r=e[i.options.name||"default"]||[];this.addToLegend(r);var n=this.filterVisibleSeries(r);n&&this.createHeatmapChart(lh(n,["heatmap"]),i)}},e.prototype.createHeatmapChart=function(t,e){var o=new Pl(this,{series:t});this.appendChart(o,e)},e.prototype.seriesPaneName=function(t){var e=this.options,o=t.xAxis,i=mr([].concat(e.xAxis),(function(t){return t.name===o}))[0],r=t.yAxis,n=mr([].concat(e.yAxis),(function(t){return t.name===r}))[0],s=(e.panes||[{}])[0].name||"default";return(i||{}).pane||(n||{}).pane||s},e.prototype.seriesAxes=function(t){var e,o,i=this.options,r=[].concat(i.xAxis),n=t.xAxis;e=n?r.find((function(t){return t.name===n})):r[0];var s=[].concat(i.yAxis),a=t.yAxis;if(o=a?s.find((function(t){return t.name===a})):s[0],!e)throw new Error("Unable to locate X axis with name "+n);if(!o)throw new Error("Unable to locate Y axis with name "+a);return{xAxis:e,yAxis:o}},e.prototype.createAxisLabels=function(){for(var t=this.axes,e=0;e<t.length;e++)t[e].createLabels()},e.prototype.createXYAxis=function(t,e,o){for(var i,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],h=this.series,c=0;c<h.length;c++){var l=h[c],u=l[e?"yAxis":"xAxis"];if(u===s.name||0===o&&!u){var d=Ca.current.bindPoint(l,0).valueFields;p.push(d[e?"y":"x"]);break}}for(var f=0;f<p.length;f++)if(p[f]instanceof Date){i=!0;break}var v=new(ch(s.type,y)||!s.type&&i?Hs:Bs)(s,this.chartService);if(v.axisIndex=o,r){if(n[r])throw new Error((e?"Y":"X")+" axis with name "+r+" is already defined");n[r]=v}return this.appendAxis(v),v.mapCategories(),v},e.prototype.createAxes=function(t){for(var e=this.options,o=[].concat(e.xAxis),i=[],r=[].concat(e.yAxis),n=[],s=0;s<o.length;s++){wr(this.findPane(o[s].pane),t)&&i.push(this.createXYAxis(o[s],!1,s))}for(var a=0;a<r.length;a++){wr(this.findPane(r[a].pane),t)&&n.push(this.createXYAxis(r[a],!0,a))}this.axisX=this.axisX||i[0],this.axisY=this.axisY||n[0]},e.prototype.removeAxis=function(e){var o=e.options.name;t.prototype.removeAxis.call(this,e),e.options.vertical?delete this.namedYAxes[o]:delete this.namedXAxes[o],e===this.axisX&&delete this.axisX,e===this.axisY&&delete this.axisY},e.prototype._dispatchEvent=function(t,e,o){for(var i=t._eventCoordinates(e),r=new fn(i.x,i.y),n=this.axes,s=n.length,a=[],p=[],h=0;h<s;h++){var c=n[h];ah(c.options.vertical?p:a,c.getCategory(r))}a.length>0&&p.length>0&&t.trigger(o,{element:jr(e),originalEvent:e,x:fh(a),y:fh(p)})},e.prototype.updateAxisOptions=function(t,e){var o=t.options.vertical,i=this.groupAxes(this.panes),r=(o?i.y:i.x).indexOf(t);Ml(this.options,r,o,e),Ml(this.originalOptions,r,o,e)},e.prototype.crosshairOptions=function(t){return Object.assign({},t.options.crosshair,{zIndex:0})},e}(kh);function Ml(t,e,o,i){rr([].concat(o?t.yAxis:t.xAxis)[e],i)}Yr(Tl,{xAxis:{},yAxis:{}}),rr(Tl.prototype,Sh);var Ol=Tl,Bl="color",Rl="first",El="max";fc.current.register(Jh,[Oa,Ba,Ra,za,"area","verticalArea","candlestick","ohlc","bullet","verticalBullet","boxPlot","verticalBoxPlot","rangeColumn","rangeBar","waterfall","horizontalWaterfall","rangeArea","verticalRangeArea"]),fc.current.register(Bc,["scatter","scatterLine","bubble"]),fc.current.register(Fc,[Ea]),fc.current.register(qc,["donut"]),fc.current.register(wl,["funnel"]),fc.current.register(il,["polarArea","polarLine","polarScatter"]),fc.current.register(gl,["radarArea","radarColumn","radarLine"]),fc.current.register(Ol,["heatmap"]),Ca.current.register([Oa,Ba,Ra,za,"area","verticalArea"],[w],["category",Bl,"noteText","errorLow","errorHigh"]),Ca.current.register(["rangeColumn","rangeBar","rangeArea","verticalRangeArea"],["from","to"],["category",Bl,"noteText"]),Ca.current.register(["waterfall","horizontalWaterfall"],[w],["category",Bl,"noteText","summary"]),Ca.current.register(["polarArea","polarLine","polarScatter"],[k,S],[Bl]),Ca.current.register(["radarArea","radarColumn","radarLine"],[w],[Bl]),Ca.current.register(["funnel"],[w],["category",Bl,"visibleInLegend","visible"]),Mh.current.register([Oa,Ba,Ra,za,"area","verticalArea","waterfall","horizontalWaterfall"],{value:El,color:Rl,noteText:Rl,errorLow:"min",errorHigh:El}),Mh.current.register(["rangeColumn","rangeBar","rangeArea","verticalRangeArea"],{from:"min",to:El,color:Rl,noteText:Rl}),Mh.current.register(["radarArea","radarColumn","radarLine"],{value:El,color:Rl}),Ca.current.register(["scatter","scatterLine","bubble"],[k,S],[Bl,"noteText","xErrorLow","xErrorHigh","yErrorLow","yErrorHigh"]),Ca.current.register(["bubble"],[k,S,"size"],[Bl,"category","noteText"]),Ca.current.register(["heatmap"],[k,S,w],[Bl,"noteText"]),Ca.current.register(["candlestick","ohlc"],["open","high","low","close"],["category",Bl,"downColor","noteText"]),Mh.current.register(["candlestick","ohlc"],{open:El,high:El,low:"min",close:El,color:Rl,downColor:Rl,noteText:Rl}),Ca.current.register(["boxPlot","verticalBoxPlot"],["lower","q1","median","q3","upper","mean","outliers"],["category",Bl,"noteText"]),Mh.current.register(["boxPlot","verticalBoxPlot"],{lower:El,q1:El,median:El,q3:El,upper:El,mean:El,outliers:Rl,color:Rl,noteText:Rl}),Ca.current.register(["bullet","verticalBullet"],["current","target"],["category",Bl,"visibleInLegend","noteText"]),Mh.current.register(["bullet","verticalBullet"],{current:El,target:El,color:Rl,noteText:Rl}),Ca.current.register([Ea,"donut"],[w],["category",Bl,"explode","visibleInLegend","visible"]);var zl=["category",w,k,S],Ll=function(t){function e(e,o,i,r){var n=this;void 0===r&&(r={}),t.call(this),this.observers=[],this.addObserver(r.observer),this.chartService=new is(this,r),this.chartService.theme=i,this._initElement(e);var s=rr({},this.options,o);this._originalOptions=rr({},s),this._theme=i,this._initTheme(s,i),this._initHandlers(),this._initSurface(),this.bindCategories(),Xr.preloadFonts(o,(function(){n.fontLoaded=!0,n._destroyed||(n.trigger("init"),n._redraw(),n._attachEvents())}))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._initElement=function(t){for(this._setElementClass(t),t.style.position="relative";t.firstChild;)t.removeChild(t.firstChild);this.element=t},e.prototype._setElementClass=function(t){P(t,"k-chart")},e.prototype._initTheme=function(t,e){for(var o=[],i=t.series||[],r=0;r<i.length;r++)o.push(Object.assign({},i[r]));t.series=o,function(t){for(var e=zl,o=0;o<e.length;o++){var i=e[o]+"Axes";t[i]&&(t[e[o]+"Axis"]=t[i],delete t[i])}}(t),this.applyDefaults(t,e),null===t.seriesColors&&delete t.seriesColors,this.options=rr({},e,t),this.applySeriesColors()},e.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)}},e.prototype.resize=function(t){var e=this.getSize(),o=this._size,i=e.width>0||e.height>0;t||i&&(!o||e.width!==o.width||e.height!==o.height)?(this._size=e,this._resize(e,t),this.trigger("resize",e)):i&&this._selections&&Qr(this._selections,(function(t){return!t.visible}))&&(this._destroySelections(),this._setupSelection())},e.prototype._resize=function(){this._noTransitionsRedraw()},e.prototype.redraw=function(t){if(this.applyDefaults(this.options),this.applySeriesColors(),t){var e=this._model._plotArea,o=e.findPane(t);e.redraw(o)}else this._redraw()},e.prototype.getAxis=function(t){return fa(t,this._plotArea.axes)},e.prototype.findAxisByName=function(t){return this.getAxis(t)},e.prototype.findPaneByName=function(t){for(var e=this._plotArea.panes,o=0;o<e.length;o++)if(e[o].options.name===t)return new va(e[o])},e.prototype.findPaneByIndex=function(t){var e=this._plotArea.panes;if(e[t])return new va(e[t])},e.prototype.plotArea=function(){return new ga(this._plotArea)},e.prototype.toggleHighlight=function(t,e){var o,i,r,n=this._plotArea,s=(n.srcSeries||n.series||[])[0];or(e)?o=n.filterPoints(e):(nr(e)?(i=e.series,r=e.category):i=r=e,o="donut"===s.type?Il(n.pointsBySeriesName(i),r):s.type===Ea||"funnel"===s.type?Il((n.charts[0]||{}).points,r):n.pointsBySeriesName(i));o&&this.togglePointsHighlight(t,o)},e.prototype.togglePointsHighlight=function(t,e){for(var o=this._highlight,i=0;i<e.length;i++)o.togglePointHighlight(e[i],t)},e.prototype.showTooltip=function(t){var e,o,i=this._sharedTooltip(),r=this._tooltip,n=this._plotArea;if(or(t)?(e=n.findPoint(t))&&i&&(o=e.categoryIx):i&&Rr(t)&&(o=n.categoryAxis.categoryIndex(t)),i){if(o>=0){var s=this._plotArea.pointsByCategoryIndex(o);r.showAt(s)}}else e&&r.show(e)},e.prototype.hideTooltip=function(){this._tooltip.hide()},e.prototype._initSurface=function(){var t=this.surface,e=this._surfaceWrap(),o=this.options.chartArea||{};o.width&&Lr(e,{width:o.width}),o.height&&Lr(e,{height:o.height}),t&&t.options.type===this.options.renderAs?(this.surface.clear(),this.surface.resize()):(this._destroySurface(),this.surface=a.Surface.create(e,{type:this.options.renderAs}),this.surface.bind("mouseenter",this._surfaceMouseenterHandler),this.surface.bind("mouseleave",this._surfaceMouseleaveHandler))},e.prototype._surfaceWrap=function(){return this.element},e.prototype._redraw=function(){var t=this._getModel();this._size={width:t.options.width,height:t.options.height},this._destroyView(),this._model=t,this._plotArea=t._plotArea,t.renderVisual(),!1!==this.options.transitions&&t.traverse((function(t){t.animation&&t.animation.setup()})),this._initSurface(),this.surface.draw(t.visual),!1!==this.options.transitions&&t.traverse((function(t){t.animation&&t.animation.play()})),this._tooltip=this._createTooltip(),this._highlight=new ec,this._setupSelection(),this._createPannable(),this._createZoomSelection(),this._createMousewheelZoom(),this.trigger("render"),Fl(this._plotArea.panes),this._navState||this._cancelDomEvents()},e.prototype.exportVisual=function(t){var e;if(t&&(t.width||t.height||t.options)){var o=this.options,i=rr({},t.options,{chartArea:{width:t.width,height:t.height}});Hl(this._originalOptions,i),this.options=rr({},this._originalOptions,i),this._initTheme(this.options,this._theme),this.bindCategories();var r=this._getModel();r.renderVisual(),Fl(r._plotArea.panes),e=r.visual,this.options=o}else e=this.surface.exportVisual();return e},e.prototype._sharedTooltip=function(){return this._plotArea instanceof Jh&&this.options.tooltip&&this.options.tooltip.shared},e.prototype._createPannable=function(){var t=this.options;!1!==t.pannable&&(this._pannable=new nc(this._plotArea,t.pannable))},e.prototype._createZoomSelection=function(){var t=this.options.zoomable,e=(t||{}).selection;!1!==t&&!1!==e&&(this._zoomSelection=new ac(this,e))},e.prototype._createMousewheelZoom=function(){var t=this.options.zoomable,e=(t||{}).mousewheel;!1!==t&&!1!==e&&(this._mousewheelZoom=new pc(this,e))},e.prototype._toggleDragZoomEvents=function(){var t=this.options.pannable,e=this.options.zoomable,o=(e||{}).selection,i=(e||{}).mousewheel,r=!(t||!1!==e&&!1!==o||this.requiresHandlers(["dragStart","drag","dragEnd"])),n=(!1===e||!1===i)&&!this.requiresHandlers(["zoomStart","zoom","zoomEnd"]),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)},e.prototype._toggleDomEvents=function(t,e){var o=this.domEvents;o&&(o.toggleDrag&&o.toggleDrag(t),o.toggleZoom&&o.toggleZoom(e))},e.prototype._createTooltip=function(){var t=this.options.tooltip;return this._sharedTooltip()?this._createSharedTooltip(t):new xc(this.chartService,t)},e.prototype._createSharedTooltip=function(t){return new bc(this._plotArea,t)},e.prototype.applyDefaults=function(t,e){!function(t,e){var o,i,r,n=(e||{}).axisDefaults||{};function s(t){var e=(t||{}).color||i.color,r=rr({},n,n[o],i,i[o],{line:{color:e},labels:{color:e},title:{color:e}},t);return delete r[o],r}for(var a=0;a<zl.length;a++)o=zl[a]+"Axis",i=t.axisDefaults||{},r=(r=[].concat(t[o])).map(s),t[o]=r.length>1?r:r[0]}(t,e),function(t,e){var o=t.series,i=o.length,r=t.seriesDefaults,n=rr({},t.seriesDefaults),s=e?rr({},e.seriesDefaults):{},a=rr({},s);jl(n),jl(a);for(var p=0;p<i;p++){var h=o[p].type||t.seriesDefaults.type,c=rr({data:[]},a,s[h],{tooltip:t.tooltip},n,r[h]);o[p]._defaults=c,o[p]=rr({},c,o[p]),o[p].data=o[p].data||[]}}(t,e)},e.prototype.applySeriesColors=function(){for(var t=this.options,e=t.series,o=t.seriesColors||[],i=0;i<e.length;i++){var r=e[i],n=o[i%o.length],s=r._defaults;r.color=r.color||n,s&&(s.color=s.color||n)}},e.prototype._getModel=function(){var t=this.options,e=this._createPlotArea(),o=new Bn(this._modelOptions());return o.chart=this,o._plotArea=e,Fn.buildTitle(t.title,o),t.legend&&t.legend.visible&&o.append(new uc(e.options.legend,this.chartService)),o.append(e),o.reflow(),o},e.prototype._modelOptions=function(){var t=this.options,e=this.getSize();return rr({transitions:t.transitions,width:e.width||600,height:e.height||400},t.chartArea)},e.prototype._createPlotArea=function(t){var e=this.options;return fc.current.create(t?[]:e.series,e,this.chartService)},e.prototype._setupSelection=function(){for(var t=this._plotArea.axes,e=this._selections=[],o=0;o<t.length;o++){var i=t[o],r=i.options;if(i instanceof Bs&&r.select&&!r.vertical){var n=i.range(),s=new mc(this,i,rr({min:n.min,max:n.max},r.select));e.push(s)}}},e.prototype._selectStart=function(t){return this.trigger("selectStart",t)},e.prototype._select=function(t){return this.trigger("select",t)},e.prototype._selectEnd=function(t){return this.trigger("selectEnd",t)},e.prototype._initHandlers=function(){this._clickHandler=this._click.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._mousemove=hi(this._mousemove.bind(this),20)},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,o=0;o<e.length;o++)if(e[o].requiresHandlers(t))return!0},e.prototype.trigger=function(t,e){void 0===e&&(e={}),"showTooltip"===t&&(e.anchor.point=this._toDocumentCoordinates(e.anchor.point)),e.sender=this;for(var o=this.observers,i=!1,r=0;r<o.length;r++)o[r].trigger(t,e)&&(i=!0);return i},e.prototype._attachEvents=function(){var t,e,o=this.element;this._touchAction=o.style.touchAction,Br(o,((t={}).contextmenu=this._clickHandler,t[Ia]=this._mousewheelHandler,t.mouseleave=this._mouseleaveHandler,t)),this._shouldAttachMouseMove()&&Br(o,((e={}).mousemove=this._mousemove,e)),this.domEvents=ns.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()},e.prototype._mouseleave=function(t){this._hoveredPoint&&(this._hoveredPoint.out(this,t),this._hoveredPoint=null),this._plotArea.hovered&&(this.trigger("plotAreaLeave"),this._plotArea.hovered=!1)},e.prototype._cancelDomEvents=function(){this.domEvents&&this.domEvents.cancel&&this.domEvents.cancel()},e.prototype._gesturestart=function(t){this._mousewheelZoom&&!this._stopChartHandlers(t)&&(this._gestureDistance=t.distance,this._unsetActivePoint(),this.surface.suspendTracking())},e.prototype._gestureend=function(t){this._zooming&&!this._stopChartHandlers(t)&&(this.surface&&this.surface.resumeTracking(),this._zooming=!1,this.trigger("zoomEnd",{}))},e.prototype._gesturechange=function(t){var e=this._mousewheelZoom;if(e&&!this._stopChartHandlers(t)){t.preventDefault();var o=this._gestureDistance,i=-t.distance/o+1;if(Math.abs(i)>=.1){i=Math.round(10*i),this._gestureDistance=t.distance;var r={delta:i,axisRanges:Dl(this._plotArea.axes),originalEvent:t};if(this._zooming||!this.trigger("zoomStart",r)){var n=this._eventCoordinates(t);this._zooming||(this._zooming=!0),(r.axisRanges=e.updateRanges(i,n))&&!this.trigger("zoom",r)&&e.zoom()}}}},e.prototype._mouseout=function(t){if(t.element){var e=this._drawingChartElement(t.element,t);e&&e.leave&&e.leave(this,t.originalEvent)}},e.prototype._start=function(t){var e=this._eventCoordinates(t);!this._stopChartHandlers(t)&&this._plotArea.backgroundContainsPoint(e)&&(this.requiresHandlers(["dragStart","drag","dragEnd"])&&this._startNavigation(t,e,"dragStart"),this._pannable&&this._pannable.start(t)&&(this.surface.suspendTracking(),this._unsetActivePoint(),this._suppressHover=!0,this.chartService.panning=!0),this._zoomSelection&&this._zoomSelection.start(t)&&this.trigger("zoomStart",{axisRanges:Dl(this._plotArea.axes),originalEvent:t}))},e.prototype._move=function(t){var e=this._navState,o=this._pannable;if(!this._stopChartHandlers(t)){if(o){var i=o.move(t);i&&!this.trigger("drag",{axisRanges:i,originalEvent:t})&&o.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,h=p.startLocation-p.location;0!==h&&(r[a.options.name]=a.translateRange(h))}}e.axisRanges=r,this.trigger("drag",{axisRanges:r,originalEvent:t})}this._zoomSelection&&this._zoomSelection.move(t)}},e.prototype._end=function(t){if(!this._stopChartHandlers(t)){var e=this._pannable;if(e&&e.end(t)?(this.surface.resumeTracking(),this.trigger("dragEnd",{axisRanges:Dl(this._plotArea.axes),originalEvent:t}),this._suppressHover=!1,this.chartService.panning=!1):this._endNavigation(t,"dragEnd"),this._zoomSelection){var o=this._zoomSelection.end(t);o&&!this.trigger("zoom",{axisRanges:o,originalEvent:t})&&(this._zoomSelection.zoom(),this.trigger("zoomEnd",{axisRanges:o,originalEvent:t}))}}},e.prototype._stopChartHandlers=function(t){var e=this._selections||[];if(!e.length)return!1;var o=this._eventCoordinates(t),i=this._plotArea.paneByPoint(o);if(i)for(var r=0;r<e.length;r++)if(e[r].onPane(i))return!0},e.prototype._mousewheelZoomRate=function(){var t=(this.options.zoomable||{}).mousewheel||{};return Wr(t.rate,.3)},e.prototype._mousewheel=function(t){var e=this,o=Tr(t),i=this._mousewheelZoom,r=this._eventCoordinates(t);if(!this._stopChartHandlers(t)&&this._plotArea.backgroundContainsPoint(r))if(i){var n={delta:o,axisRanges:Dl(this._plotArea.axes),originalEvent:t};!this._zooming&&this.trigger("zoomStart",n)||(t.preventDefault(),this._zooming||(this._unsetActivePoint(),this.surface.suspendTracking(),this._zooming=!0),this._mwTimeout&&clearTimeout(this._mwTimeout),n.axisRanges=i.updateRanges(o,r),n.axisRanges&&!this.trigger("zoom",n)&&i.zoom(),this._mwTimeout=setTimeout((function(){e.trigger("zoomEnd",n),e._zooming=!1,e.surface&&e.surface.resumeTracking()}),150))}else{var s=this._navState;if(!s)this._startNavigation(t,r,"zoomStart")||(s=this._navState);if(s){var a=s.totalDelta||o;s.totalDelta=a+o;for(var p=this._navState.axes,h={},c=0;c<p.length;c++){var l=p[c],u=l.options.name;u&&(h[u]=l.scaleRange(-a*this._mousewheelZoomRate(),r))}this.trigger("zoom",{delta:o,axisRanges:h,originalEvent:t}),this._mwTimeout&&clearTimeout(this._mwTimeout),this._mwTimeout=setTimeout((function(){e._endNavigation(t,"zoomEnd")}),150)}}},e.prototype._startNavigation=function(t,e,o){var i=this._model._plotArea,r=i.findPointPane(e),n=i.axes.slice(0);if(r){var s=Dl(n);this.trigger(o,{axisRanges:s,originalEvent:t})?this._cancelDomEvents():(this._suppressHover=!0,this._unsetActivePoint(),this._navState={axisRanges:s,pane:r,axes:n})}},e.prototype._endNavigation=function(t,e){this._navState&&(this.trigger(e,{axisRanges:this._navState.axisRanges,originalEvent:t}),this._suppressHover=!1,this._navState=null)},e.prototype._getChartElement=function(t,e){var o=this.surface.eventTarget(t);if(o)return this._drawingChartElement(o,t,e)},e.prototype._drawingChartElement=function(t,e,o){for(var i,r=t;r&&!i;)i=r.chartElement,r=r.parent;if(i)return i.aliasFor&&(i=i.aliasFor(e,this._eventCoordinates(e))),o&&(i=i.closest(o))&&i.aliasFor&&(i=i.aliasFor()),i},e.prototype._eventCoordinates=function(t){var e=Ir(t);return this._toModelCoordinates(e.x,e.y)},e.prototype._elementPadding=function(){if(!this._padding){var t=hr(this.element,["paddingLeft","paddingTop"]),e=t.paddingLeft,o=t.paddingTop;this._padding={top:o,left:e}}return this._padding},e.prototype._toDocumentCoordinates=function(t){var e=this._elementPadding(),o=zr(this.element);return{left:Ur(t.x+e.left+o.left),top:Ur(t.y+e.top+o.top)}},e.prototype._toModelCoordinates=function(t,e){var o=this.element,i=zr(o),r=this._elementPadding(),n=tn(o).invert(),s=new p.Point(t-i.left-r.left,e-i.top-r.top).transform(n);return new fn(s.x,s.y)},e.prototype._tap=function(t){var e=this,o=this.surface.eventTarget(t),i=this._drawingChartElement(o,t),r=this._sharedTooltip();this._startHover(o,t)||r||this._unsetActivePoint(),r&&this._trackSharedTooltip(this._eventCoordinates(t),t,!0),this._propagateClick(i,t),this.handlingTap=!0,setTimeout((function(){e.handlingTap=!1}),0)},e.prototype._click=function(t){var e=this._getChartElement(t);this._propagateClick(e,t)},e.prototype._propagateClick=function(t,e){for(var o=t;o;)o.click&&o.click(this,e),o=o.parent},e.prototype._startHover=function(t,e){if(this._suppressHover)return!1;var o=this._drawingChartElement(t,e,(function(t){return(t.hover||t.over)&&!(t instanceof kh)})),i=this._activePoint,r=this._plotArea.series.length>1,n=this._hasInactiveOpacity();return this._updateHoveredPoint(o,e),o&&i!==o&&o.hover?(this._activePoint=o,this._sharedTooltip()||o.hover(this,e)||(this._displayTooltip(o),n?this._displayInactiveOpacity(o,r):this._highlight.show(o))):!o&&n&&(r&&this._activeChartInstance&&(this._updateSeriesOpacity(o,!0),this._applySeriesOpacity(this._activeChartInstance.children,null,!0),this._activeChartInstance=null),this._highlight&&this._highlight.hide(),this._activePoint=null),o},e.prototype._displayTooltip=function(t){rr({},this.options.tooltip,t.options.tooltip).visible&&this._tooltip.show(t)},e.prototype._displayInactiveOpacity=function(t,e,o){var i=this._activeChartInstance=this._chartInstanceFromPoint(t);if(i)if(e)this._updateSeriesOpacity(t),this._applySeriesOpacity(i.children,null,!0),this._applySeriesOpacity(i.children,t.series),this._highlight.show(o||t);else{var r;if(!i.supportsPointInactiveOpacity())return void this._highlight.show(t);(r=this._getInactivePoints(t,i))&&r.length&&this._highlight.show(r,1-this._getInactiveOpacityForSeries(t.series))}},e.prototype._getInactivePoints=function(t,e){return this._getAllPointsOfType(e,t.constructor).filter((function(e){return e!==t}))},e.prototype._getAllPointsOfType=function(t,e){for(var o=[],i=0;i<t.children.length;i++){var r=t.children[i];r.constructor===e?o.push(r):r.children&&r.children.length&&(o=o.concat(this._getAllPointsOfType(r,e)))}return o},e.prototype._updateHoveredPoint=function(t,e){var o=this._hoveredPoint;o&&o!==t&&(o.out(this,e),this._hoveredPoint=null),t&&o!==t&&t.over&&(this._hoveredPoint=t,t.over(this,e))},e.prototype._updateSeriesOpacity=function(t,e){for(var o=this._plotArea,i=o.series.length,r=0;r<i;r++){var n=o.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))}},e.prototype._applySeriesOpacity=function(t,e,o,i){for(var r=0;r<t.length;r++){var n=t[r],s=n.series||i;if(s&&(s.highlight||{}).visible&&n.visual){var a=i?i.opacity:n.series.opacity;(s!==e||o)&&n.visual.opacity(o?1:a)}n.children&&n.children.length&&this._applySeriesOpacity(n.children,e,o,n.series)}},e.prototype._chartInstanceFromPoint=function(t){for(var e=t.parent;e&&!e.plotArea;)e=e.parent;return e},e.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},e.prototype._getInactiveOpacityForSeries=function(t){var e=this.options.seriesDefaults.highlight.inactiveOpacity;return t.highlight.inactiveOpacity||e||t.opacity||1},e.prototype._getDefaultOpacityForSeries=function(t){return t.defaultOpacity||t.opacity||1},e.prototype._mouseover=function(t){var e,o=this._startHover(t.element,t.originalEvent);o&&o.tooltipTracking&&!this._mouseMoveTrackHandler&&!this._sharedTooltip()&&(this._mouseMoveTrackHandler=this._mouseMoveTracking.bind(this),Br(document,((e={}).mousemove=this._mouseMoveTrackHandler,e)))},e.prototype._mouseMoveTracking=function(t){var e,o=this.options,i=this._tooltip,r=this._highlight,n=this._activePoint,s=this._eventCoordinates(t);if(this._plotArea.box.containsPoint(s)){if(n&&n.tooltipTracking&&n.series&&n.parent.getNearestPoint){var a=n.parent.getNearestPoint(s.x,s.y,n.seriesIx);if(a&&a!==n)if(this._activePoint=a,!a.hover(this,t))rr({},o.tooltip,a.options.tooltip).visible&&i.show(a),r.show(a)}}else Gr(document,((e={}).mousemove=this._mouseMoveTrackHandler,e)),this._unsetActivePoint(),this._mouseMoveTrackHandler=null},e.prototype._mousemove=function(t){var e=this._eventCoordinates(t),o=this._plotArea;if(this._trackCrosshairs(e),o.hover){var i=o.backgroundContainsPoint(e);i?(o.hovered=!0,this._plotArea.hover(this,t)):o.hovered&&!i&&(this.trigger("plotAreaLeave"),o.hovered=!1)}this._sharedTooltip()&&this._trackSharedTooltip(e,t)},e.prototype._trackCrosshairs=function(t){for(var e=this._plotArea.crosshairs,o=0;o<e.length;o++){var i=e[o];i.box.containsPoint(t)?i.showAt(t):i.hide()}},e.prototype._trackSharedTooltip=function(t,e,o){if(!this._suppressHover){var i=this.options.tooltip,r=this._plotArea,n=this._plotArea.categoryAxis,s=this._tooltip,a=this._highlight;if(r.backgroundContainsPoint(t)){var p=n.pointCategoryIndex(t);if(p!==this._tooltipCategoryIx||!this._sharedHighlight&&o){var h=r.pointsByCategoryIndex(p),c=h.map((function(t){return t.eventArgs(e)})),l=c[0]||{};l.categoryPoints=c,h.length>0&&!this.trigger("seriesHover",l)?(i.visible&&s.showAt(h,t),a.show(h),this._sharedHighlight=!0):s.hide(),this._tooltipCategoryIx=p}else o&&this._sharedHighlight&&(a.hide(),s.hide(),this._sharedHighlight=!1)}else this._sharedHighlight&&(a.hide(),s.hide(),this._tooltipCategoryIx=null,this._sharedHighlight=!1)}},e.prototype.hideElements=function(t){var e=this._plotArea;this._mousemove.cancel(),e.hideCrosshairs(),this._unsetActivePoint(t)},e.prototype._unsetActivePoint=function(t){var e=this._tooltip,o=this._highlight;this._activePoint=null,this._hoveredPoint=null,!e||t&&t.keepTooltipOpen||e.hide(),this._tooltipCategoryIx=null,this._sharedHighlight=!1,o&&o.hide()},e.prototype._deferRedraw=function(){this._redraw()},e.prototype._clearRedrawTimeout=function(){this._redrawTimeout&&(clearInterval(this._redrawTimeout),this._redrawTimeout=null)},e.prototype.bindCategories=function(){for(var t=this.options,e=[].concat(t.categoryAxis),o=0;o<e.length;o++){var i=e[o];!1!==i.autoBind&&this.bindCategoryAxisFromSeries(i,o)}},e.prototype.bindCategoryAxisFromSeries=function(t,e){for(var o,i=this.options.series,r=i.length,n=new br,s=[],a=!1,p=0;p<r;p++){var h=i[p],c=h.categoryAxis===t.name||!h.categoryAxis&&0===e,l=h.data,u=l.length,d=h.categoryField&&c;if(a=d||a,d&&u>0)for(var f=(o=dh(t,ba(h.categoryField,l[0])))?uh:ba,y=0;y<u;y++){var v=l[y],g=f(h.categoryField,v,this.chartService.intl);!o&&n.get(g)||(s.push([g,v]),o||n.set(g,!0))}}if(s.length>0){o&&(s=function(t,e){void 0===e&&(e=_s);for(var o=function(t,e){void 0===e&&(e=_s);for(var o=1,i=t.length;o<i;o++)if(e(t[o],t[o-1])<0){t.sort(e);break}return t}(t,e),i=o.length,r=i>0?[o[0]]:[],n=1;n<i;n++)0!==e(o[n],Vr(r))&&r.push(o[n]);return r}(s,(function(t,e){return _s(t[0],e[0])})));var m=function(t){for(var e=t.length,o=[],i=0;i<e;i++)for(var r=t[i],n=r.length,s=0;s<n;s++)o[s]=o[s]||[],o[s].push(r[s]);return o}(s);t.categories=m[0]}else a&&(t.categories=[])},e.prototype._isBindable=function(t){for(var e=Ca.current.valueFields(t),o=!0,i=0;i<e.length;i++){var r=e[i];if(r===w?r="field":r+="Field",!Rr(t[r])){o=!1;break}}return o},e.prototype._noTransitionsRedraw=function(){var t,e=this.options;!1!==e.transitions&&(e.transitions=!1,t=!0),this._redraw(),t&&(e.transitions=!0)},e.prototype._legendItemHover=function(t,e){var o,i=this._plotArea,r=this._highlight,n=(i.srcSeries||i.series)[t];if(o=wr(n.type,[Ea,"donut","funnel"])?i.findPoint((function(o){return o.series.index===t&&o.index===e})):i.pointsBySeriesIndex(t),this._hasInactiveOpacity()&&n.visible&&o){var s=i.series.length>1,a=o.length?o[0]:o;this._displayInactiveOpacity(a,s,o)}else r.show(o)},e.prototype._shouldAttachMouseMove=function(){return this._plotArea.crosshairs.length||this._tooltip&&this._sharedTooltip()||this.requiresHandlers(["plotAreaHover","plotAreaLeave"])},e.prototype.updateMouseMoveHandler=function(){var t,e;Gr(this.element,((t={}).mousemove=this._mousemove,t)),this._shouldAttachMouseMove()&&Br(this.element,((e={}).mousemove=this._mousemove,e))},e.prototype.applyOptions=function(t,e){Hl(this._originalOptions,t),this._originalOptions=rr(this._originalOptions,t),this.options=rr({},this._originalOptions),e&&(this._theme=e,this.chartService.theme=e),this._initTheme(this.options,this._theme),this._toggleDragZoomEvents()},e.prototype.setOptions=function(t,e){this.applyOptions(t,e),this.bindCategories(),this.redraw(),this.updateMouseMoveHandler()},e.prototype.setDirection=function(t){this.chartService.rtl=Boolean(t),this.surface&&"svg"===this.surface.type&&this._destroySurface()},e.prototype.setIntlService=function(t){this.chartService.intl=t},e.prototype.noTransitionsRedraw=function(){this._noTransitionsRedraw()},e.prototype.destroy=function(){var t,e;this._destroyed=!0,Gr(this.element,((t={}).contextmenu=this._clickHandler,t[Ia]=this._mousewheelHandler,t.mousemove=this._mousemove,t.mouseleave=this._mouseleaveHandler,t)),this.domEvents&&(this.domEvents.destroy(),delete this.domEvents),this._mouseMoveTrackHandler&&Gr(document,((e={}).mousemove=this._mouseMoveTrackHandler,e)),this._destroyView(),this._destroySurface(),this._clearRedrawTimeout()},e.prototype._destroySurface=function(){var t=this.surface;t&&(t.unbind("mouseenter",this._surfaceMouseenterHandler),t.unbind("mouseleave",this._surfaceMouseleaveHandler),t.destroy(),this.surface=null)},e.prototype._destroySelections=function(){var t=this._selections;if(t)for(;t.length>0;)t.shift().destroy()},e.prototype._destroyView=function(){var t=this._model;t&&(t.destroy(),this._model=null),this._unsetActivePoint(),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)},e}(O);function Il(t,e){if(t)for(var o=0;o<t.length;o++)if(t[o].category===e)return[t[o]]}function jl(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 Dl(t){for(var e={},o=0;o<t.length;o++){var i=t[o],r=i.options.name;r&&(e[r]=i.range())}return e}var Vl=["data","categories"];function Hl(t,e){for(var o in e)if(!wr(o,Vl)&&e.hasOwnProperty(o)){var i=e[o],r=t[o];if(Rr(r)){var n=null===i;n||!Rr(i)?(delete t[o],n&&delete e[o]):r&&nr(i)&&nr(r)&&Hl(r,i)}}}function Fl(t){for(var e=0;e<t.length;e++)t[e].notifyRender()}Yr(Ll,{renderAs:"",chartArea:{},legend:{visible:!0,labels:{}},categoryAxis:{},seriesDefaults:{type:Ba,data:[],highlight:{visible:!0},labels:{},negativeValues:{visible:!1}},series:[],seriesColors:null,tooltip:{visible:!1},transitions:!0,valueAxis:{},plotArea:{},title:{},xAxis:{},yAxis:{},panes:[{}],pannable:!1,zoomable:!1});var Nl=Ll,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._slotAnchor=function(t,e){var o=this.plotArea.categoryAxis.options.vertical,i=o?{horizontal:"left",vertical:"center"}:{horizontal:"center",vertical:"bottom"};return{point:o?new fn(this.plotArea.box.x2,e.center().y):new fn(e.center().x,-2),align:i}},e.prototype._defaultAnchor=function(t,e){return this._slotAnchor({},e)},e}(bc),Gl=[Oa,"bullet"];function Wl(t){for(var e=[],o=0;o<t.length;o++){var i=t[o];e[o]=i.style.display,i.style.display="none"}return e}function ql(t,e){for(var o=0;o<t.length;o++)t[o].style.display=e[o]}function Xl(t){return Ji(t)?[t]:t}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._setElementClass=function(t){P(t,"k-sparkline")},e.prototype._initElement=function(e){t.prototype._initElement.call(this,e),this._initialWidth=Math.floor(Lr(e).width)},e.prototype._resize=function(){var e=this.element,o=Wl(e.childNodes);this._initialWidth=Math.floor(Lr(e).width),ql(e.childNodes,o),t.prototype._resize.call(this)},e.prototype._modelOptions=function(){var t=this.options,e=this._surfaceWrap(),o=Wl(e.childNodes),i=document.createElement("span");i.innerHTML=" ",e.appendChild(i);var r=rr({width:this._autoWidth,height:Lr(e).height,transitions:t.transitions},t.chartArea,{inline:!0,align:!1});return Lr(e,{width:r.width,height:r.height}),e.removeChild(i),ql(e.childNodes,o),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 o=t.prototype._createPlotArea.call(this,e);return this._autoWidth=this._initialWidth||this._calculateWidth(o),o},e.prototype._calculateWidth=function(t){for(var e=this.options,o=cr(e.chartArea.margin),i=t.charts,r=this._surfaceWrap(),n=0,s=0;s<i.length;s++){var a=i[s],p=(a.options.series||[])[0];if(p){if(p.type===Oa)return 150;if("bullet"===p.type)return 150;if(p.type===Ea)return Lr(r).height;var h=a.categoryAxis;if(h){var c=h.categoriesCount()*(!a.options.isStacked&&wr(p.type,[Ba,"verticalBullet"])?a.seriesOptions.length:1);n=Math.max(n,c)}}}var l=n*e.pointWidth;return l>0&&(l+=o.left+o.right),l},e.prototype._createSharedTooltip=function(t){return new Ul(this._plotArea,t)},e.normalizeOptions=function(t){var e=Xl(t);return(e=A(e)?{seriesDefaults:{data:e}}:rr({},e)).series||(e.series=[{data:Xl(e.data)}]),rr(e,{seriesDefaults:{type:e.type}}),(wr(e.series[0].type,Gl)||wr(e.seriesDefaults.type,Gl))&&(e=rr({},{categoryAxis:{crosshair:{visible:!1}}},e)),e},e}(Nl);Yr(Yl,{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}]});var Zl=Yl,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.setup=function(){this._initialOpacity=parseFloat(hr(this.element,"opacity").opacity)},e.prototype.step=function(t){hr(this.element,{opacity:String(Cr(this._initialOpacity,0,t))})},e.prototype.abort=function(){t.prototype.abort.call(this),hr(this.element,{display:"none",opacity:String(this._initialOpacity)})},e.prototype.cancel=function(){t.prototype.abort.call(this),hr(this.element,{opacity:String(this._initialOpacity)})},e}(a.Animation);function Kl(t,e){var o=document.createElement("div");return o.className=t,e&&(o.style.cssText=e),o}var $l=function(t){function e(e,o,i){t.call(this),this.options=rr({},this.options,i),this.container=e,this.chartService=o;var r=hr(e,["paddingLeft","paddingTop"]);this.chartPadding={top:r.paddingTop,left:r.paddingLeft},this.createElements(),e.appendChild(this.element)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createElements=function(){var t=this.element=Kl("k-navigator-hint","display: none; position: absolute; top: 1px; left: 1px;"),e=this.tooltip=Kl("k-tooltip k-chart-tooltip"),o=this.scroll=Kl("k-scroll");e.innerHTML=" ",t.appendChild(e),t.appendChild(o)},e.prototype.show=function(t,e,o){var i=this.element,r=this.options,n=this.scroll,s=this.tooltip,a=ys(ws(t)+ws(e-t)/2),p=.4*o.width(),h=o.center().x-p,c=(o.center().x-h)/(r.max-r.min),l=a-r.min,u=this.chartService.intl.format(r.format,t,e),d=fr(r);this.clearHideTimeout(),this._visible||(hr(i,{visibility:"hidden",display:"block"}),this._visible=!0),d&&(u=d({from:t,to:e})),s.innerHTML=u,hr(s,{left:o.center().x-s.offsetWidth/2,top:o.y1});var f=hr(s,["marginTop","borderTopWidth","height"]);hr(n,{width:p,left:h+l*c,top:o.y1+f.marginTop+f.borderTopWidth+f.height/2}),hr(i,{visibility:"visible"})},e.prototype.clearHideTimeout=function(){this._hideTimeout&&clearTimeout(this._hideTimeout),this._hideAnimation&&this._hideAnimation.cancel()},e.prototype.hide=function(){var t=this;this.clearHideTimeout(),this._hideTimeout=setTimeout((function(){t._visible=!1,t._hideAnimation=new Ql(t.element),t._hideAnimation.setup(),t._hideAnimation.play()}),this.options.hideDelay)},e.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},e}(O);Yr($l,{format:"{0:d} - {1:d}",hideDelay:500});var Jl=$l,tu="_navigator",eu=tu;function ou(){}var iu=function(t){function e(e){var o;t.call(this),this.chart=e;var i=this.options=rr({},this.options,e.options.navigator),r=i.select;r&&(r.from=this.parseDate(r.from),r.to=this.parseDate(r.to)),Rr(i.hint.visible)||(i.hint.visible=i.visible),this.chartObserver=new Sr(this,((o={}).drag="_drag",o.dragEnd="_dragEnd",o.zoom="_zoom",o.zoomEnd="_zoomEnd",o)),e.addObserver(this.chartObserver)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.parseDate=function(t){return Ps(this.chart.chartService.intl,t)},e.prototype.clean=function(){this.selection&&(this.selection.destroy(),this.selection=null),this.hint&&(this.hint.destroy(),this.hint=null)},e.prototype.destroy=function(){this.chart&&(this.chart.removeObserver(this.chartObserver),delete this.chart),this.clean()},e.prototype.redraw=function(){this._redrawSelf(),this.initSelection()},e.prototype.initSelection=function(){var t,e=this.chart,o=this.options,i=this.mainAxis(),r=i.roundedRange(),n=r.min,s=r.max,a=o.select,p=a.from,h=a.to,c=a.mousewheel,l=(t=i,ou.prototype=t,new ou);0!==i.categoriesCount()&&(this.clean(),l.box=i.box,this.selection=new mc(e,l,{min:n,max:s,from:p||n,to:h||s,mousewheel:Wr(c,{zoom:"left"}),visible:o.visible},new Sr(this,{selectStart:"_selectStart",select:"_select",selectEnd:"_selectEnd"})),o.hint.visible&&(this.hint=new Jl(e.element,e.chartService,{min:n,max:s,template:fr(o.hint),format:o.hint.format})))},e.prototype.setRange=function(){var t=this.chart._createPlotArea(!0).namedCategoryAxes[eu].roundedRange(),e=t.min,o=t.max,i=this.options.select||{},r=i.from||e;r<e&&(r=e);var n=i.to||o;n>o&&(n=o),this.options.select=rr({},i,{from:r,to:n}),this.filterAxes()},e.prototype._redrawSelf=function(t){var e=this.chart._plotArea;e&&e.redraw(Vr(e.panes),t)},e.prototype.redrawSlaves=function(){var t=this.chart,e=t._plotArea,o=e.panes.slice(0,-1);e.srcSeries=t.options.series,e.options.categoryAxis=t.options.categoryAxis,e.clearSeriesPointsCache(),e.redraw(o)},e.prototype._drag=function(t){var e,o=this.chart,i=this.selection,r=o._eventCoordinates(t.originalEvent),n=this.mainAxis(),s=n.roundedRange(),a=n.pane.box.containsPoint(r),p=o._plotArea.categoryAxis,h=t.axisRanges[p.options.name],c=this.options.select;if(h&&!a&&i){e=c.from&&c.to?ws(c.to)-ws(c.from):ws(i.options.to)-ws(i.options.from);var l=ys(Hr(ws(h.min),s.min,ws(s.max)-e)),u=ys(Hr(ws(l)+e,ws(s.min)+e,s.max));this.options.select={from:l,to:u},this.options.liveDrag&&(this.filterAxes(),this.redrawSlaves()),i.set(l,u),this.showHint(l,u)}},e.prototype._dragEnd=function(){this.filterAxes(),this.filter(),this.redrawSlaves(),this.hint&&this.hint.hide()},e.prototype.readSelection=function(){var t=this.selection.options,e=t.from,o=t.to,i=this.options.select;i.from=e,i.to=o},e.prototype.filterAxes=function(){var t=this.options.select;void 0===t&&(t={});for(var e=this.chart.options.categoryAxis,o=t.from,i=t.to,r=0;r<e.length;r++){var n=e[r];n.pane!==tu&&(n.min=o,n.max=i)}},e.prototype.filter=function(){var t=this.chart,e=this.options.select;if(t.requiresHandlers(["navigatorFilter"])){var o=this.mainAxis(),i={from:e.from,to:e.to};if("category"!==o.options.type){var r=new Hs(rr({baseUnit:"fit"},t.options.categoryAxis[0],{categories:[e.from,e.to]}),t.chartService).options;i.from=gs(r.min,-r.baseUnitStep,r.baseUnit),i.to=gs(r.max,r.baseUnitStep,r.baseUnit)}this.chart.trigger("navigatorFilter",i)}},e.prototype._zoom=function(t){var e=this.chart._plotArea.categoryAxis,o=this.selection,i=this.options,r=i.select,n=i.liveDrag,s=this.mainAxis(),a=t.delta;if(o){var p=s.categoryIndex(o.options.from),h=s.categoryIndex(o.options.to),c=this.chart._eventCoordinates(t.originalEvent);t.originalEvent.preventDefault(),Math.abs(a)>1&&(a*=3),h-p>1?(o.zoom(a,c),this.readSelection()):(e.options.min=r.from,r.from=e.scaleRange(-t.delta*this.chart._mousewheelZoomRate(),c).min),n&&(this.filterAxes(),this.redrawSlaves()),o.set(r.from,r.to),this.showHint(this.options.select.from,this.options.select.to)}},e.prototype._zoomEnd=function(t){this._dragEnd(t)},e.prototype.showHint=function(t,e){var o=this.chart._plotArea;this.hint&&this.hint.show(t,e,o.backgroundBox())},e.prototype._selectStart=function(t){return this.chart._selectStart(t)},e.prototype._select=function(t){return this.showHint(t.from,t.to),this.chart._select(t)},e.prototype._selectEnd=function(t){return this.hint&&this.hint.hide(),this.readSelection(),this.filterAxes(),this.filter(),this.redrawSlaves(),this.chart._selectEnd(t)},e.prototype.mainAxis=function(){var t=this.chart._plotArea;if(t)return t.namedCategoryAxes[eu]},e.prototype.select=function(t,e){var o=this.options.select;return t&&e&&(o.from=this.parseDate(t),o.to=this.parseDate(e),this.filterAxes(),this.filter(),this.redrawSlaves(),this.selection.set(t,e)),{from:o.from,to:o.to}},e.setup=function(t,o){if(void 0===t&&(t={}),void 0===o&&(o={}),!t.__navi){t.__navi=!0;var i=rr({},o.navigator,t.navigator),r=t.panes=[].concat(t.panes),n=rr({},i.pane,{name:tu});i.visible||(n.visible=!1,n.height=.1),r.push(n),e.attachAxes(t,i),e.attachSeries(t,i,o)}},e.attachAxes=function(t,e){var o=e.series||[],i=t.categoryAxis=[].concat(t.categoryAxis),r=t.valueAxis=[].concat(t.valueAxis),n=0===lh(o,La).length,s=rr({type:"date",pane:tu,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;i.push(rr({},s,{maxDateGroups:200},a,{name:eu,title:null,baseUnit:"fit",baseUnitStep:"auto",labels:{visible:!1},majorTicks:{visible:!1}}),rr({},s,a,{name:eu+"_labels",maxDateGroups:20,baseUnitStep:"auto",labels:{position:""},plotBands:[],autoBaseUnitSteps:{minutes:[]},_overlap:!0}),rr({},s,a,{name:eu+"_ticks",maxDateGroups:200,majorTicks:{width:.5},plotBands:[],title:null,labels:{visible:!1,mirror:!0},_overlap:!0})),r.push(rr({name:eu,pane:tu,majorGridLines:{visible:!1},visible:!1},e.valueAxis))},e.attachSeries=function(t,e,o){for(var i=t.series=t.series||[],r=[].concat(e.series||[]),n=o.seriesColors,s=e.seriesDefaults,a=0;a<r.length;a++)i.push(rr({color:n[a%n.length],categoryField:e.dateField,visibleInLegend:!1,tooltip:{visible:!1}},s,r[a],{axis:eu,categoryAxis:eu,autoBind:e.autoBindElements}))},e}(O),ru=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,o){var i=Lr(this.element).width||600,r=o,n={seriesDefaults:{categoryField:e.dateField},axisDefaults:{categoryAxis:{name:"default",majorGridLines:{visible:!1},labels:{step:2},majorTicks:{visible:!1},maxDateGroups:Math.floor(i/28)}}};r&&(r=rr({},r,n)),iu.setup(e,r),t.prototype.applyDefaults.call(this,e,r)},e.prototype._setElementClass=function(t){P(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=mr([].concat(t.series,t.navigator.series),(function(t){return t&&t.visible})).length,o=this._seriesCount!==e;return this._seriesCount=e,o},e.prototype._fullRedraw=function(){var e=this.navigator;e||(e=this.navigator=new iu(this),this.trigger("navigatorCreated",{navigator:e})),e.clean(),e.setRange(),t.prototype._redraw.call(this),e.initSelection()},e.prototype._trackSharedTooltip=function(e){var o=this._plotArea.paneByPoint(e);o&&o.options.name===tu?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),o=0;o<e.length;o++){var i=e[o];i.name===eu?t=i.categories:t&&i.pane===tu&&(i.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 o=this._eventCoordinates(e),i=this._plotArea.paneByPoint(o);return t.prototype._stopChartHandlers.call(this,e)||i&&i.options.name===tu},e.prototype._toggleDragZoomEvents=function(){this._dragZoomEnabled||(this.element.style.touchAction="none",this._dragZoomEnabled=!0)},e}(Nl);Yr(ru,{dateField:"date",axisDefaults:{categoryAxis:{type:"date",baseUnit:"fit",justified:!0},valueAxis:{narrowRange:!0,labels:{format:"C"}}},navigator:{select:{},seriesDefaults:{markers:{visible:!1},tooltip:{visible:!0},line:{width:2}},hint:{},visible:!0},tooltip:{visible:!0},legend:{visible:!1}});var nu=ru,su=Math.PI/180;function au(t,e){var o=t.getOrigin(),i=t.getSize(),r=cr(e);return t.setOrigin([o.x-r.left,o.y-r.top]),t.setSize([i.width+(r.left+r.right),i.height+(r.top+r.bottom)]),t}var pu=a.Group,hu=a.Path,cu=a.Text;function lu(t,e){var o=t.box,i=t.children[0].box,r=e.border||{},n=e.background||"",s=hu.fromRect(new p.Rect([o.x1,o.y1],[o.width(),o.height()]),{stroke:{}}),a=new cu(t.text,new p.Point(i.x1,i.y1),{font:e.font,fill:{color:e.color}}),h=au(a.bbox().clone(),e.padding),c=hu.fromRect(h,{stroke:{color:r.width?r.color:"",width:r.width,opacity:r.opacity,dashType:r.dashType,lineJoin:"round",lineCap:"round"},fill:{color:n}}),l=new pu;return l.append(s),l.append(c),l.append(a),l}function uu(t,e,o){var i=Rr(t.from)?t.from:x,r=Rr(t.to)?t.to:m;return t.from=Math.max(Math.min(r,i),e),t.to=Math.min(Math.max(r,i),o),t}function du(t,e){var o=cr(e);return o.left=-o.left,o.top=-o.top,o.right=-o.right,o.bottom=-o.bottom,au(t,o)}var fu=a.Path,yu=a.Surface,vu=function(t){function e(e,o,i,r){void 0===r&&(r={}),t.call(this),this.element=e,this.theme=i,this.contextService=new is(this,r),this._originalOptions=rr({},this.options,o),this.options=rr({},this._originalOptions),this._initTheme(i),this.redraw()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.destroy=function(){this.surface&&(this.surface.destroy(),this.surface=null),delete this.element,delete this.surfaceElement},e.prototype.value=function(t){var e=this.pointers[0];if(0===arguments.length)return e.value();e.value(t),this._setValueOptions(t)},e.prototype._draw=function(){var t=this.surface;t.clear(),t.draw(this._visuals)},e.prototype.exportVisual=function(){return this._visuals},e.prototype.allValues=function(t){var e=this.pointers,o=[];if(0===arguments.length){for(var i=0;i<e.length;i++)o.push(e[i].value());return o}if(A(t))for(var r=0;r<t.length;r++)Ji(t[r])&&e[r].value(t[r]);this._setValueOptions(t)},e.prototype._setValueOptions=function(t){for(var e=[].concat(this.options.pointer),o=[].concat(t),i=0;i<o.length;i++)e[i].value=o[i]},e.prototype.resize=function(){this.noTransitionsRedraw()},e.prototype.noTransitionsRedraw=function(){var t=this.options.transitions;this._toggleTransitions(!1),this.redraw(),this._toggleTransitions(t)},e.prototype.redraw=function(){var t=this._surfaceSize(),e=new p.Rect([0,0],[t.width,t.height]);this._initSurface(),this.gaugeArea=this._createGaugeArea(),this._createModel();var o=du(e.bbox(),this._gaugeAreaMargin);this.reflow(o)},e.prototype.setOptions=function(t,e){this._originalOptions=rr(this._originalOptions,t),this.options=rr({},this._originalOptions),this._initTheme(e),this.redraw()},e.prototype.setDirection=function(t){this.contextService.rtl=Boolean(t),this.surface&&"svg"===this.surface.type&&(this.surface.destroy(),this.surface=null)},e.prototype.setIntlService=function(t){this.contextService.intl=t},e.prototype._initTheme=function(t){var e=t||this.theme||{};this.theme=e,this.options=rr({},e,this.options);var o=this.options,i=o.pointer;if(A(i)){for(var r=[],n=0;n<i.length;n++)r.push(rr({},e.pointer,i[n]));o.pointer=r}},e.prototype._createGaugeArea=function(){var t=this.options.gaugeArea,e=this.surface.size(),o=t.border||{},i=new p.Rect([0,0],[e.width,e.height]);return this._gaugeAreaMargin=t.margin||5,o.width>0&&(i=du(i,o.width)),fu.fromRect(i,{stroke:{color:o.width?o.color:"",width:o.width,dashType:o.dashType,lineJoin:"round",lineCap:"round"},fill:{color:t.background}})},e.prototype._initSurface=function(){var t=this.options,e=this.surface,o=this._surfaceElement(),i=this._surfaceSize();Lr(o,i),e&&e.options.type===t.renderAs?(this.surface.clear(),this.surface.resize()):(e&&e.destroy(),this.surface=yu.create(o,{type:t.renderAs}))},e.prototype._surfaceSize=function(){var t=this.options,e=this._getSize();return t.gaugeArea&&rr(e,t.gaugeArea),e},e.prototype._surfaceElement=function(){return this.surfaceElement||(this.surfaceElement=document.createElement("div"),this.element.appendChild(this.surfaceElement)),this.surfaceElement},e.prototype.getSize=function(){return this._getSize()},e.prototype._getSize=function(){var t=this.element,e=this._defaultSize(),o=t.offsetWidth,i=t.offsetHeight;return o||(o=e.width),i||(i=e.height),{width:o,height:i}},e.prototype._defaultSize=function(){return{width:200,height:200}},e.prototype._toggleTransitions=function(t){this.options.transitions=t;for(var e=0;e<this.pointers.length;e++)this.pointers[e].options.animation.transitions=t},e}(O);Yr(vu,{plotArea:{},theme:"default",renderAs:"",pointer:{},scale:{},gaugeArea:{}});var gu=vu,mu=a.Path,xu=a.Group,_u=p.Point;function bu(t,e){var o,i,r=t.position,n=t.tickX,s=t.tickY;return t.vertical?(o=new _u(n,r),i=new _u(n+e.size,r)):(o=new _u(r,s),i=new _u(r,s+e.size)),new mu({stroke:{color:e.color,width:e.width}}).moveTo(o).lineTo(i)}function wu(t,e,o,i){var r=e.length;if(i.visible)for(var n=o.mirror,s=o.lineBox,a=i.skip;a<r;a+=i.step)a%i.skipUnit!=0&&(o.tickX=n?s.x2:s.x2-i.size,o.tickY=n?s.y1-i.size:s.y1,o.position=e[a],t.append(bu(o,i)))}var Cu=function(t){function e(e,o){var i=e||{};!Rr(i.reverse)&&!1===i.vertical&&(o||{}).rtl&&(i=Object.assign({},i,{reverse:!0})),t.call(this,0,1,i,o),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=rr({},this.options,t);return(e=rr({},e,{labels:{mirror:e.mirror}})).majorUnit=e.majorUnit||dn(e.min,e.max),e},e.prototype.initFields=function(){},e.prototype.render=function(){var t=this.elements=new xu,e=this.renderLabels(),o=this.renderLine(),i=this.renderTicks(),r=this.renderRanges();return t.append(o,e,i,r),t},e.prototype.renderRanges=function(){for(var t=this.options,e=t.min,o=t.max,i=t.vertical,r=t.labels.mirror,n=t.ranges||[],s=new xu,a=n.length,h=t.rangeSize||t.minorTicks.size/2,c=0;c<a;c++){var l=uu(n[c],e,o),u=this.getSlot(l.from,l.to),d=i?this.lineBox():u,f=i?u:this.lineBox();i?d.x1-=h*(r?-1:1):f.y2+=h*(r?-1:1),s.append(mu.fromRect(new p.Rect([d.x1,f.y1],[d.x2-d.x1,f.y2-f.y1]),{fill:{color:l.color,opacity:l.opacity},stroke:{}}))}return s},e.prototype.renderLabels=function(){for(var t=this.labels,e=this.options,o=new xu,i=0;i<t.length;i++)o.append(lu(t[i],e.labels));return o},e.prototype.renderLine=function(){var t=this.options.line,e=this.lineBox(),o=new xu;if(t.width>0&&t.visible){var i=new mu({stroke:{color:t.color,dashType:t.dashType,width:t.width}});i.moveTo(e.x1,e.y1).lineTo(e.x2,e.y2),o.append(i)}return o},e.prototype.renderTicks=function(){var t=new xu,e=this.options,o=e.majorTicks.visible?e.majorUnit:0,i={vertical:e.vertical,mirror:e.labels.mirror,lineBox:this.lineBox()};return wu(t,this.getMajorTickPositions(),i,e.majorTicks),wu(t,this.getMinorTickPositions(),i,rr({},{skipUnit:o/e.minorUnit},e.minorTicks)),t},e}(Xs);Yr(Cu,{min:0,max:50,majorTicks:{size:15,align:"inside",color:l,width:.5,visible:!0},minorTicks:{size:10,align:"inside",color:l,width:.5,visible:!0},line:{width:.5},labels:{position:"inside",padding:2},mirror:!1,_alignLines:!1});var ku=Cu,Su=function(t){function e(e,o){t.call(this);var i=e.options,r=i.min,n=i.max,s=this.options=rr({},this.options,o);s.fill=s.color,this.scale=e,Rr(s.value)?s.value=Hr(s.value,r,n):s.value=r}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.value=function(t){var e=this.options,o=e.value;if(0===arguments.length)return o;var i=this.scale.options,r=i.min,n=i.max;e._oldValue=Rr(e._oldValue)?e.value:r,e.value=Hr(t,r,n),this.elements&&this.repaint()},e}(O);Yr(Su,{color:l});var Au=Su,Pu=function(t){function e(e,o){t.call(this,e,o),this.options=rr({track:{visible:Rr(o.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,o,i=this.options,r=this.scale,n=r.options,s=n.mirror,a=n.vertical,p=r.lineBox(),h=i.track.size||i.size,c=i.size/2,l=cr(i.margin),u=a?l[s?"left":"right"]:l[s?"bottom":"top"];u=s?-u:u,a?(o=new vn(p.x1+u,p.y1,p.x1+u,p.y2),s?o.x1-=h:o.x2+=h,"barPointer"!==i.shape&&(t=e=new vn(p.x2+u,p.y1-c,p.x2+u,p.y2+c))):(o=new vn(p.x1,p.y1-u,p.x2,p.y1-u),s?o.y2+=h:o.y1-=h,"barPointer"!==i.shape&&(t=e=new vn(p.x1-c,p.y1-u,p.x2+c,p.y1-u))),this.trackBox=o,this.pointerRangeBox=e,this.box=t||o.clone().pad(i.border.width)},e.prototype.getElementOptions=function(){var t=this.options;return{fill:{color:t.color,opacity:t.opacity},stroke:Rr(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,o=t.options,i=o.mirror,r=o.vertical,n=cr(e.margin);return r?n[i?"left":"right"]:n[i?"bottom":"top"]},e}(Au);Yr(Pu,{shape:"barPointer",track:{border:{width:1}},color:l,border:{width:1},opacity:1,margin:cr(3),animation:{type:"barPointer"},visible:!0});var Tu=Pu,Mu=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,o=t.from,i=t.to,r=t.vertical,n=r?"x1":"y1";t.mirror===r?(o[n]-=e,i[n]-=e):(o[n]+=e,i[n]+=e);var s=this.fromScale=new p.Point(o.x1,o.y1),a=this.toScale=new p.Point(i.x1,i.y1);0!==t.duration&&(t.duration=Math.max(s.distanceTo(a)/t.duration*1e3,1))},e.prototype.step=function(t){var e=Cr(this.fromScale.x,this.toScale.x,t),o=Cr(this.fromScale.y,this.toScale.y,t);this.element.transform(p.transform().translate(e,o))},e}(a.Animation);Yr(Mu,{easing:"linear",duration:250}),a.AnimationFactory.current.register("arrowPointer",Mu);var Ou=Mu,Bu=p.Point,Ru=a.Path,Eu=function(t){function e(e,o){t.call(this,e,o),Rr(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,o=e/2,i=t.options.mirror?-1:1;return t.options.vertical?[new Bu(0,0-o),new Bu(0-i*e,0),new Bu(0,0+o)]:[new Bu(0-o,0),new Bu(0,0+i*e),new Bu(0+o,0)]},e.prototype.repaint=function(){var t=this.scale,e=this.options,o=new Ou(this.elements,rr(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&&(o.options.duration=0),o.setup(),o.play()},e.prototype.render=function(){var t=this.scale,e=this.options,o=this.getElementOptions(),i=this.pointerShape(e.value);e.animation.type="arrowPointer";var r=new Ru({stroke:o.stroke,fill:o.fill}).moveTo(i[0]).lineTo(i[1]).lineTo(i[2]).close(),n=t.getSlot(e.value);return r.transform(p.transform().translate(n.x1,n.y1)),this.elements=r,r},e}(Tu),zu=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?S:k,o=this.to=t.newPoints[0][e],i=this.from=t.oldPoints[0][e];0!==t.duration&&(t.duration=Math.max(Math.abs(o-i)/t.speed*1e3,1)),this._set(i)},e.prototype.step=function(t){var e=Cr(this.from,this.to,t);this._set(e)},e.prototype._set=function(t){var e="set"+this.axis.toUpperCase(),o=this.options.newPoints;o[0][e](t),o[1][e](t)},e}(a.Animation);Yr(zu,{easing:"linear",speed:250}),a.AnimationFactory.current.register("barPointer",zu);var Lu=zu,Iu=a.Group,ju=a.Path,Du=function(t){function e(e,o){t.call(this,e,o),Rr(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,o=this.options,i=e.options,r=i.mirror,n=i.vertical,s=r===n?-1:1,a=o.size*s,h=e.getSlot(e.options.min),c=e.getSlot(t),l=n?S:k,u=n?k:S,d=this._margin()*s,f=new p.Point;f[l]=h[l+"1"],f[u]=h[u+"1"];var y=new p.Point;y[l]=c[l+"1"],y[u]=c[u+"1"],n?(f.translate(d,0),y.translate(d,0)):(f.translate(0,d),y.translate(0,d));var v=y.clone(),g=f.clone();return n?(v.translate(a,0),g.translate(a,0)):(v.translate(0,a),g.translate(0,a)),[f,y,v,g]},e.prototype.repaint=function(){var t=this.scale,e=this.options,o=this.pointerShape(e.value),i=this.pointerPath,r=this.pointerShape(e._oldValue);i.moveTo(o[0]).lineTo(o[1]).lineTo(o[2]).lineTo(o[3]).close();var n=new Lu(i,rr(e.animation,{reverse:t.options.reverse,vertical:t.options.vertical,oldPoints:[r[1],r[2]],newPoints:[o[1],o[2]]}));!1===e.animation.transitions&&(n.options.duration=0),n.setup(),n.play()},e.prototype.render=function(){var t=new Iu,e=this.getElementOptions();this.options.track.visible&&t.append(this.renderTrack());var o=this.pointerPath=new ju({stroke:e.stroke,fill:e.fill});return t.append(o),this.elements=t,t},e.prototype.renderTrack=function(){var t=this.options.track,e=t.border||{},o=this.trackBox.clone().pad(e.width||0);return new ju.fromRect(o.toRect(),{fill:{color:t.color,opacity:t.opacity},stroke:{color:e.width?e.color||t.color:"",width:e.width,dashType:e.dashType}})},e}(Tu),Vu=a.Group,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.reflow=function(t){var e=this.pointers,o=t.origin.x,i=t.origin.y,r=new vn(o,i,o+t.width(),i+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 Vu,e=this.scale.render(),o=this.pointers;t.append(this.gaugeArea),t.append(e);for(var i=0;i<o.length;i++){var r=o[i];t.append(r.render()),r.value(r.options.value)}this._visuals=t},e.prototype._createModel=function(){var t=this.options,e=this.scale=new ku(t.scale,this.contextService);this.pointers=[];var o=t.pointer;o=A(o)?o:[o];for(var i=0;i<o.length;i++){var r=rr({},o[i],{animation:{transitions:t.transitions}}),n="arrow"===r.shape?Eu:Du;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,o=this.scale,i=this.pointers,r=t.center(),n=i[0].box.clone().wrap(o.box),s=0;s<i.length;s++)n.wrap(i[s].box.clone());return o.options.vertical?(e=n.width()/2,n=new vn(r.x-e,t.y1,r.x+e,t.y2)):(e=n.height()/2,n=new vn(t.x1,r.y-e,t.x2,r.y+e)),n},e.prototype._alignElements=function(){for(var t,e=this.scale,o=this.pointers,i=e.box,r=o[0].box.clone().wrap(e.box),n=this.bbox,s=0;s<o.length;s++)r.wrap(o[s].box.clone());e.options.vertical?(t=n.center().x-r.center().x,e.reflow(new vn(i.x1+t,n.y1,i.x2+t,n.y2))):(t=n.center().y-r.center().y,e.reflow(new vn(i.x1,i.y1+t,i.x2,i.y2+t)));for(var a=0;a<o.length;a++)o[a].reflow(this.bbox)},e.prototype._shrinkScaleWidth=function(t){var e=this.scale;if(!e.options.vertical){var o=e.contentBox().width()-t.width();o>0&&(e.box.shrink(o,0),e.box.alignTo(t,"center"),e.reflow(e.box))}},e.prototype._shrinkElements=function(){for(var t=this.scale,e=this.pointers,o=t.box.clone(),i=t.options.vertical?"y":"x",r=e[0].box,n=0;n<e.length;n++)r.wrap(e[n].box.clone());o[i+1]+=Math.max(o[i+1]-r[i+1],0),o[i+2]-=Math.max(r[i+2]-o[i+2],0),t.reflow(o);for(var s=0;s<e.length;s++)e[s].reflow(this.bbox)},e}(gu);Yr(Hu,{transitions:!0,gaugeArea:{background:""},scale:{vertical:!0}});var Fu=Hu,Nu=a.Arc,Uu=a.Path,Gu=a.Group;function Wu(t,e,o,i){var r=new Gu,n=t.center,s=t.getRadiusX();if(i.visible)for(var a=0;a<e.length;a++){var h=t.pointAt(e[a]),c=new p.Point(n.x+s-i.size,n.y).rotate(e[a],n);r.append(new Uu({stroke:{color:i.color,width:i.width}}).moveTo(h).lineTo(c))}return r}function qu(t,e,o,i){return{from:t,to:e,color:o,opacity:i}}var Xu=function(t){function e(e,o){t.call(this,0,1,e,o)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initUserOptions=function(t){var e=rr({},this.options,t);return e.majorUnit=e.majorUnit||dn(e.min,e.max),e.minorUnit=e.minorUnit||e.majorUnit/10,e},e.prototype.initFields=function(){},e.prototype.render=function(t,e){var o=this.renderArc(t,e);this.bbox=o.bbox(),this.labelElements=this.renderLabels(),this.ticks=this.renderTicks(),this.ranges=this.renderRanges()},e.prototype.reflow=function(t){var e=t.center(),o=Math.min(t.height(),t.width())/2;if(!Rr(this.bbox))return this.render(e,o);this.bbox=this.arc.bbox(),this.radius(this.arc.getRadiusX()),this.repositionRanges(),this.renderLabels()},e.prototype.slotAngle=function(t){var e=this.options,o=e.min,i=e.max,r=e.reverse,n=e.startAngle,s=e.endAngle,a=s-n;return(r?s-(t-o)/(i-o)*a:(t-o)/(i-o)*a+n)+180},e.prototype.hasRanges=function(){var t=this.options.ranges;return t&&t.length},e.prototype.ticksSize=function(){var t=this.options,e=t.majorTicks,o=t.minorTicks,i=0;return e.visible&&(i=e.size),o.visible&&(i=Math.max(o.size,i)),i},e.prototype.labelsCount=function(){var e=t.prototype.labelsCount.call(this),o=this.options;return o.endAngle-o.startAngle>=360&&o.max%o.majorUnit==0&&(e-=1),e},e.prototype.renderLabels=function(){var t=this.options,e=this.arc.clone(),o=e.getRadiusX(),i=this.tickAngles(e,t.majorUnit),r=t.rangeSize=t.rangeSize||.1*o,n=new Gu,s=.05*o;Rr(t.rangeDistance)?s=t.rangeDistance:t.rangeDistance=s;var a=t.labels,h="inside"===a.position,c=Rr(this.labelElements);h&&(o-=this.ticksSize(),this.hasRanges()&&!c&&(o-=r+s),e.setRadiusX(o).setRadiusY(o));for(var l=this.labels,u=l.length,d=cr(a.padding),f=(d.left+d.right)/2,y=(d.top+d.bottom)/2,v=0;v<u;v++){var g=l[v],m=g.box.width()/2,x=g.box.height()/2,_=i[v],b=(_-180)*su,w=e.pointAt(_),C=w.x+Math.cos(b)*(m+f)*(h?1:-1),k=w.y+Math.sin(b)*(x+y)*(h?1:-1);g.reflow(new vn(C-m,k-x,C+m,k+x));var S=new p.Point(g.box.x1,g.box.y1),A=void 0;if(c){var P=(A=this.labelElements.children[v]).bbox().origin,T=A.transform()||p.transform();T.translate(S.x-P.x,S.y-P.y),A.transform(T)}else A=lu(g,t.labels),n.append(A);this.bbox=p.Rect.union(this.bbox,A.bbox())}return n},e.prototype.repositionRanges=function(){var t=this.ranges.children;if(t.length>0){var e=this.options,o=e.rangeDistance,i=e.rangeSize,r=this.getRangeRadius();"inside"===this.options.labels.position&&(r+=i+o);for(var n=r+i/2,s=0;s<t.length;s++)t[s]._geometry.setRadiusX(n).setRadiusY(n);this.bbox=p.Rect.union(this.bbox,this.ranges.bbox())}},e.prototype.renderRanges=function(){var t=this.rangeSegments(),e=t.length,o=new Gu;if(e){var i=this.options,r=i.rangeSize,n=i.reverse,s=i.rangeDistance,a=this.getRangeRadius();this.radius(this.radius()-r-s);for(var p=0;p<e;p++){var h=t[p],c=this.slotAngle(h[n?"to":"from"]),l=this.slotAngle(h[n?"from":"to"]);l-c!=0&&o.append(this.createRange(c,l,a,h))}}return o},e.prototype.createRange=function(t,e,o,i){var r=this.options.rangeSize,n=new p.Arc(this.arc.center,{radiusX:o+r/2,radiusY:o+r/2,startAngle:t,endAngle:e});return new Nu(n,{stroke:{width:r,color:i.color,opacity:i.opacity,lineCap:i.lineCap}})},e.prototype.rangeSegments=function(){var t=this.options,e=t.ranges||[],o=e.length,i=[];if(o){var r=t.min,n=t.max,s=t.rangePlaceholderColor;i.push(qu(r,n,s));for(var a=0;a<o;a++)for(var p=uu(e[a],r,n),h=i.length,c=0;c<h;c++){var l=i[c];if(l.from<=p.from&&p.from<=l.to){i.push(qu(p.from,p.to,p.color,p.opacity)),l.from<=p.to&&p.to<=l.to&&i.push(qu(p.to,l.to,s,p.opacity)),l.to=p.from;break}}}return i},e.prototype.getRangeRadius=function(){var t=this.arc,e=this.options,o=e.rangeSize,i=e.rangeDistance,r=e.majorTicks.size;return"outside"===e.labels.position?t.getRadiusX()-r-i-o:t.getRadiusX()-o},e.prototype.renderArc=function(t,e){var o=this.options;return this.arc=new p.Arc(t,{radiusX:e,radiusY:e,startAngle:o.startAngle+180,endAngle:o.endAngle+180})},e.prototype.renderTicks=function(){var t=this.arc,e=this.options,o=t.clone();this.majorTickAngles=this.tickAngles(t,e.majorUnit),this.majorTicks=Wu(o,this.majorTickAngles,e.majorUnit,e.majorTicks);var i=new Gu;i.append(this.majorTicks);var r=e.majorTicks.size,n=e.minorTicks.size;if(this._tickDifference=r-n,"outside"===e.labels.position){var s=o.getRadiusX();o.setRadiusX(s-r+n).setRadiusY(s-r+n)}return this.minorTickAngles=this.normalizeTickAngles(this.tickAngles(t,e.minorUnit)),this.minorTicks=Wu(o,this.minorTickAngles,e.minorUnit,e.minorTicks),i.append(this.minorTicks),i},e.prototype.normalizeTickAngles=function(t){for(var e=this.options,o=e.majorUnit/e.minorUnit,i=t.length-1;i>=0;i--)i%o==0&&t.splice(i,1);return t},e.prototype.tickAngles=function(t,e){var o=this.options,i=o.reverse,r=o.max-o.min,n=t.endAngle-t.startAngle,s=r/e,a=t.startAngle,p=n/s;i&&(a+=n,p=-p),n>=360&&o.max%e==0&&(s-=1);for(var h=[],c=0;c<s;c++)h.push(Ur(a,3)),a+=p;return Ur(a)<=t.endAngle&&h.push(a),h},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,o){var i=o&&this._tickDifference||0,r=this.arc,n=r.getRadiusX();o&&"outside"===this.options.labels.position&&0!==i&&(r=this.arc.clone()).setRadiusX(n-i).setRadiusY(n-i);for(var s=0;s<t.length;s++){var a=r.pointAt(e[s]),h=t[s].segments,c=a.x-h[0].anchor().x,l=a.y-h[0].anchor().y;t[s].transform((new p.transform).translate(c,l))}},e}(Xs);Yr(Xu,{min:0,max:100,majorTicks:{size:15,align:"inside",color:l,width:.5,visible:!0},minorTicks:{size:10,align:"inside",color:l,width:.5,visible:!0},startAngle:-30,endAngle:210,labels:{position:"inside",padding:2}});var Yu=Xu,Zu=function(t){function e(e,o){t.call(this,e,o);var i=this.options;i.duration=Math.max(Math.abs(i.newAngle-i.oldAngle)/i.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,o=Cr(e.oldAngle,e.newAngle,t);this.element.transform(p.transform().rotate(o,e.center))},e}(a.Animation);Yr(Zu,{easing:"linear",duration:150}),a.AnimationFactory.current.register("radialPointer",Zu);var Qu=Zu,Ku=a.Circle,$u=a.Group,Ju=a.Path,td=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(p.transform().rotate(t,this.center))},e.prototype.repaint=function(){var t=this.scale,e=this.options,o=t.slotAngle(e._oldValue),i=t.slotAngle(e.value);!1===e.animation.transitions?this.setAngle(i):new Qu(this.elements,rr(e.animation,{oldAngle:o,newAngle:i})).play()},e.prototype.render=function(){var t=this.scale,e=this.options,o=new $u;return!1!==e.animation&&rr(e.animation,{startAngle:0,center:t.arc.center,reverse:t.options.reverse}),o.append(this._renderNeedle(),this._renderCap()),this.elements=o,this.setAngle(su),o},e.prototype.reflow=function(t){var e=this.center=t.center,o=Hr(this.options.length||1,.1,1.5),i=this.radius=t.getRadiusX()*o,r=this.capSize=Math.round(i*this.options.cap.size);this.bbox=p.Rect.fromPoints(new p.Point(e.x-r,e.y-r),new p.Point(e.x+r,e.y+r))},e.prototype._renderNeedle=function(){var t=this.scale.options.minorTicks.size,e=this.center,o=this.options.color,i=new Ju({fill:{color:o},stroke:{color:o,width:.5}});return i.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(),i},e.prototype._renderCap=function(){var t=this.options,e=t.cap.color||t.color,o=new p.Circle(this.center,this.capSize);return new Ku(o,{fill:{color:e},stroke:{color:e}})},e}(Au);Yr(td,{cap:{size:.05},arrow:{width:16,height:14},animation:{type:"radialPointer",duration:150}});var ed=td,od=a.Group,id=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 o=0;o<e.length;o++)e[o].reflow(this.scale.arc),this._initialPlotArea=p.Rect.union(this._initialPlotArea,e[o].bbox);this.fitScale(t),this.alignScale(t),this._buildVisual(this.gaugeArea,e,this.scale),this._draw()},e.prototype._buildVisual=function(t,e,o){var i=this._visuals=new od;i.append(t),i.append(o.ticks),i.append(o.ranges),this._buildPointers(e),i.append(o.labelElements)},e.prototype._buildPointers=function(t){for(var e=0;e<t.length;e++){var o=t[e];o.render(),this._visuals.append(o.elements),o.value(o.options.value)}},e.prototype.fitScale=function(t){for(var e,o,i,r,n,s=this.scale.arc,a=this._initialPlotArea,p=Math.abs(this.getDiff(a,t)),h=Ur(p,3),c=Ur(-p,3),l=0,u=0;!(!(u++<100)||(l=n===i?l+1:0)>5||h!==r&&0<=(e=this.getPlotBox(h,t,s))&&e<=2||c!==r&&0<=(i=this.getPlotBox(c,t,s))&&i<=2||(r=e>0&&i>0?2*h:e<0&&i<0?2*c:Ur((h+c)/2||1,3),0<=(o=this.getPlotBox(r,t,s))&&o<=2));)n=i,o>0?(c=r,i=o):(h=r,e=o)},e.prototype.getPlotBox=function(t,e,o){var i=this.scale,r=this.pointers,n=o.getRadiusX(),s=o.clone();s.setRadiusX(n+t).setRadiusY(n+t),i.arc=s,i.reflow(e),this.plotBbox=i.bbox;for(var a=0;a<r.length;a++)r[a].reflow(s),this.plotBbox=p.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(),o=t.center(),i=e.x-o.x,r=e.y-o.y,n=this.scale,s=this.pointers;n.arc.center.x-=i,n.arc.center.y-=r,n.reflow(t);for(var a=0;a<s.length;a++)s[a].reflow(n.arc),this.plotBbox=p.Rect.union(n.bbox,s[a].bbox)},e.prototype._createModel=function(){var t=this.options,e=t.pointer,o=this.scale=new Yu(t.scale,this.contextService);this.pointers=[];for(var i=A(e)?e:[e],r=0;r<i.length;r++){var n=new ed(o,rr({},i[r],{animation:{transitions:t.transitions}}));this.pointers.push(n)}},e}(gu);Yr(id,{transitions:!0,gaugeArea:{background:""}});var rd=id,nd=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,o){var i=this.options.reverse,r=this.slotAngle(i?e:t),n=this.slotAngle(i?t:e),s=this.createRange(r,n,this.getRangeRadius(),o);return this.ranges.append(s),s},e}(Yu);Yr(nd,{min:0,max:100,majorTicks:{visible:!1},minorTicks:{visible:!1},labels:{visible:!1},startAngle:0,endAngle:180,rangeLineCap:"round"});var sd=nd,ad=function(t){function e(e,o){t.call(this,e,o);var i=this.options,r=Math.abs(i.newAngle-i.oldAngle)/i.duration*1e3;i.duration=Hr(r,150,800);var n=e.elements.options.get("stroke.color"),s=e.currentColor();n!==s&&(this.startColor=new on(n),this.color=new on(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.options,o=this.startColor,i=this.color,r=Cr(e.oldAngle,e.newAngle,t);if(this.element.angle(r),i){var n=Ur(Cr(o.r,i.r,t)),s=Ur(Cr(o.g,i.g,t)),a=Ur(Cr(o.b,i.b,t));this.element.stroke(new on(n,s,a).toHex())}},e}(a.Animation);Yr(ad,{easing:"linear",duration:150}),a.AnimationFactory.current.register("radialRangePointer",ad);var pd=ad,hd=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,o=t.slotAngle(e._oldValue),i=t.slotAngle(e.value);this.animation&&this.animation.abort(),!1===e.animation.transitions?(this.angle(i),this.stroke(this.currentColor())):(this.animation=new pd(this,rr(e.animation,{oldAngle:o,newAngle:i})),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&&rr(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,o=t.max,i=this.options,r=i.colors,n=i.color,s=i.value,a=Ji(s)?s:e;if(r)for(var p=0;p<r.length;p++){var h=r[p],c=h.color,l=h.from;void 0===l&&(l=e);var u=h.to;if(void 0===u&&(u=o),l<=a&&a<=u)return c}return n},e.prototype.reflow=function(){this.render(),this.bbox=this.elements.bbox()},e}(Au);Yr(hd,{animation:{type:"radialRangePointer",duration:150}});var cd=hd,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._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 sd(t.scale,this.contextService),o=new cd(e,rr({},{colors:t.colors,color:t.color,value:t.value,opacity:t.opacity,animation:{transitions:t.transitions}}));this.pointers=[o]},e.prototype._buildPointers=function(t){for(var e=0;e<t.length;e++){var o=t[e];o.render(),o.value(o.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 o=this.getSize(),i=this.scale.arc.center,r=i.x-t/2,n=i.y-e/2;if(t<o.width){var s=r+t;r=Math.max(r,0),s>o.width&&(r-=s-o.width)}if(e<o.height){var a=this.scale.bbox,p=a.bottomRight().y,h=n+e;n=Math.max(n,a.origin.y),h>p&&(n-=h-p)}return{left:r,top:n}},e}(rd),ud=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}(ld),dd=function(t){function e(e){t.call(this),this.setOptions(e),this.initProperties()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){},e.prototype.setOptions=function(t){this.options=Object.assign({},this.options,t),this.quietZoneLength=this.options.addQuietZone?2*this.options.quietZoneLength:0},e.prototype.encode=function(t,e,o){var i=Rr(t)?String(t):t;return this.initValue(i,e,o),this.options.addQuietZone&&this.addQuietZone(),this.addData(),this.options.addQuietZone&&this.addQuietZone(),{baseUnit:this.baseUnit,pattern:this.pattern}},e.prototype.initValue=function(){},e.prototype.addQuietZone=function(){this.pattern.push(this.options.quietZoneLength||10)},e.prototype.addData=function(){},e.prototype.invalidCharacterError=function(t){throw new Error('Character "'+t+'" is not valid for symbology '+this.name+".")},e}(O);Yr(dd,{quietZoneLength:10,addQuietZone:!0,addCheckSum:!0});var fd=Object.assign,yd=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),fd(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,o=this.getWeightedSum(t,e,this.cCheckSumTotal)%this.checkSumMod;if(this.checksum=String(o),this.addPattern(this.characterMap[o]),++e>=this.kCheckSumMinLength){var i=(o+this.getWeightedSum(t,e,this.kCheckSumTotal))%this.checkSumMod;this.checksum+=i,this.addPattern(this.characterMap[i])}},e.prototype.getWeightedSum=function(t,e,o){for(var i=0,r=0;r<t.length;r++)i+=this.weightedValue(this.getValue(t.charAt(r)),e,r,o);return i},e.prototype.weightedValue=function(t,e,o,i){return((e-o)%i||i)*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),o=this.characterMap[e];this.addPattern(o)},e.prototype.addPattern=function(t){for(var e,o=0;o<t.length;o++)e=parseInt(t.charAt(o),10),this.pattern.push(e),this.totalUnits+=e},e}(dd);Yr(yd,{addCheckSum:!0});var vd=Object.assign,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.initProperties=function(){t.prototype.initProperties.call(this),vd(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}(dd),md=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),vd(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,o){this.width=e,this.height=o,this.value=t,this.dataLength=t.length,this.pattern=[],this.patternString=""},e.prototype.prepareValues=function(){var t,e=this.minBaseUnitLength,o=this.minRatio,i=Math.ceil(Math.max(.15*this.width,24)),r=this.maxRatio;if(this.height<i)throw new Error("Insufficient height for Code39 encoding: the current height is "+this.height+"px and the minimum height is "+i+"px.");for(t=this.getBaseUnit(r);t<e&&r>o;)r=parseFloat((r-.1).toFixed(1)),t=this.getBaseUnit(r);if(t<e){var n=Math.ceil(this.getBaseWidth(o)*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}(gd);Yr(md,{addCheckSum:!1});var xd={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,o=0;o<this.extendedMappings.length;o++)if(e=this.extendedMappings[o].call(this,t)){for(var i=0;i<e.length;i++){var r=e[i];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,o;if(this.specialAsciiCodes[t]){e=[];for(var i=0;i<this.specialAsciiCodes[t].length;i++)e.push(this.characterMap[this.shiftCharacters[3]]),e.push(this.characterMap[this.specialAsciiCodes[t][i]])}else o=6*Math.floor(t/32)+(t-27)%32+64,e=[this.characterMap[this.shiftCharacters[3]],this.characterMap[String.fromCharCode(o)]];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"]},_d=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),rr(this,xd,{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}(md),bd=Object.assign,wd=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),bd(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,o){this.value=t,this.width=e,this.height=o,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 o=0;o<e.length;o++)t=this.characterMap[this._findCharacterByValue(e[o])],this.addPattern(t.pattern)},e.prototype._getCheckValues=function(){var t,e,o=this.values,i=o.length,r=0;for(e=i-1;e>=0;e--)r+=this.weightedValue(o[e],i-e,this.cCheckSumTotal);for(t=r%this.checkSumMod,r=this.weightedValue(t,1,this.kCheckSumTotal),e=i-1;e>=0;e--)r+=this.weightedValue(o[e],i-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,o){return(e%o||o)*t},e.prototype.addPattern=function(t){for(var e,o=0;o<t.length;o++)e=parseInt(t.charAt(o),10),this.pattern.push(e)},e}(gd),Cd=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),rr(this,xd,{name:"Code 93 extended",pushCheckSum:function(){var t,e=this._getCheckValues();this.checksum=e.join("");for(var o=0;o<e.length;o++)if(t=e[o],this.shiftValuesAsciiCodes[t])this.addExtended(this.shiftValuesAsciiCodes[t]);else{var i=this._findCharacterByValue(t);this.addPattern(this.characterMap[i].pattern)}}})},e}(wd),kd=/^\d+$/,Sd=Object.assign,Ad=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),Sd(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,o){this.height=o,this.width=e,this.baseHeight=o/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(kd.test(t)||this.invalidCharacterError(t.match(/[^0-9]/)[0]),!wr(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,o=0;o<t.length;o++)e=this.height-this.baseHeight*t.charAt(o),this.pattern.push({width:1,y1:e,y2:this.height}),this.pattern.push(1)},e}(dd),Pd=/^\d+$/,Td=/^[a-z0-9]+$/i,Md=Object.assign,Od=function(t){function e(e){t.call(this),this.encoding=e,this.initProperties()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){},e.prototype.addStart=function(){},e.prototype.is=function(){},e.prototype.isCode=function(){return!1},e.prototype.move=function(){},e.prototype.pushState=function(){},e}(O),Bd=function(t){function e(e,o){t.call(this,e),this.states=o,this._initMoves(o)}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),rr(this,{FNC4:"FNC4",SHIFT:98})},e.prototype.addStart=function(){this.encoding.addPattern(this.START)},e.prototype.is=function(t,e){var o=t.charCodeAt(e);return this.isCode(o)},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,o=this.states,i=t.value,r=i.length;if(wr("C",o)){var n=i.substr(t.index).match(/\d{4,}/g);n&&(r=i.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=[],wr(this.FNC4,t)&&this._moves.push(this._moveFNC),wr(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}(Od),Rd={};Rd.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),Md(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}(Bd),Rd.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),Md(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}(Bd),Rd.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),Md(this,{key:"C",MOVE:99,START:105})},e.prototype.addStart=function(){this.encoding.addPattern(this.START)},e.prototype.is=function(t,e){var o=Vd(t,e,4);return(e+4<=t.length||2===t.length)&&Pd.test(o)},e.prototype.move=function(){this.encoding.addPattern(this.MOVE)},e.prototype.pushState=function(t){for(var e;(e=Vd(t.value,t.index,2))&&Pd.test(e)&&2===e.length;)this.encoding.addPattern(parseInt(e,10)),t.index+=2},e.prototype.getValue=function(t){return t},e}(Od),Rd.FNC4=function(t){function e(e,o){t.call(this,e),this._initSubStates(o)}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),Md(this,{key:"FNC4",dependentStates:["A","B"]})},e.prototype.addStart=function(t){var e=t.value.charCodeAt(0)-128,o=this._getSubState(e);this.encoding[o].addStart()},e.prototype.is=function(t,e){var o=t.charCodeAt(e);return this.isCode(o)},e.prototype.isCode=function(t){return 128<=t&&t<256},e.prototype.pushState=function(t){var e,o=this._initSubState(t),i=this.encoding,r=o.value.length;if(t.index+=r,r<3)for(;o.index<r;o.index++)e=o.value.charCodeAt(o.index),o.state=this._getSubState(e),o.previousState!==o.state&&(o.previousState=o.state,i[o.state].move(o)),i.addPattern(i[o.state].MOVE),i.addPattern(i[o.state].getValue(e));else o.state!==o.previousState&&i[o.state].move(o),this._pushStart(o),i.pushData(o,this.subStates),t.index<t.value.length&&this._pushStart(o);t.fnc=!0,t.state=o.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++)wr(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 o,i="",r=e;(o=t.charCodeAt(r++))&&this.isCode(o);)i+=String.fromCharCode(o-128);return i},e}(Od),Rd.FNC1=function(t){function e(e,o){t.call(this,e),this.states=o}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),Md(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 wr(this.key,this.states)},e.prototype.pushState=function(t){var e,o,i,r=this.encoding,n=t.value.replace(/\s/g,""),s=new RegExp("["+this.startAI+this.endAI+"]","g"),a=t.index,p={state:this.startState};r.addPattern(this.START);for(;;){if(p.index=0,(e=(i=n.charAt(a)===this.startAI?2:0)>0?this.getBySeparator(n,a):this.getByLength(n,a)).ai.length)o=a+i+e.id.length+e.ai.length;else if((o=n.indexOf(this.startAI,a+1))<0){if(a+e.ai.max+e.id.length+i<n.length)throw new Error("Separators are required after variable length identifiers");o=n.length}if(p.value=n.substring(a,o).replace(s,""),this.validate(e,p.value),r.pushData(p,this.dependentStates),o>=n.length)break;a=o,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 o=e.substr(t.id.length),i=t.ai;if(!i.type&&!Pd.test(o))throw new Error("Application identifier "+t.id+" is numeric only but contains non numeric character(s).");if("alphanumeric"===i.type&&!Td.test(o))throw new Error("Application identifier "+t.id+" is alphanumeric only but contains non alphanumeric character(s).");if(i.length&&i.length!==o.length)throw new Error("Application identifier "+t.id+" must be "+i.length+" characters long.");if(i.min&&i.min>o.length)throw new Error("Application identifier "+t.id+" must be at least "+i.min+" characters long.");if(i.max&&i.max<o.length)throw new Error("Application identifier "+t.id+" must be at most "+i.max+" characters long.")},e.prototype.getByLength=function(t,e){for(var o,i,r=2;r<=4;r++)if(o=Vd(t,e,r),i=this.getApplicationIdentifier(o)||this.getApplicationIdentifier(o.substring(0,o.length-1)))return{id:o,ai:i};this.unsupportedAIError(o)},e.prototype.unsupportedAIError=function(t){throw new Error("'"+t+"' is not a supported Application Identifier")},e.prototype.getBySeparator=function(t,e){var o=t.indexOf(this.startAI,e),i=t.indexOf(this.endAI,o),r=t.substring(o+1,i),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,o=e.multiKey;if(e[t])return e[t];for(var i=0;i<o.length;i++){if(o[i].ids&&wr(t,o[i].ids))return o[i].type;if(o[i].ranges)for(var r=o[i].ranges,n=0;n<r.length;n++)if(r[n][0]<=t&&t<=r[n][1])return o[i].type}},e}(Od);var Ed=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),Md(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 Rd[this.states[t]](this,this.states)},e.prototype.initValue=function(t,e,o){this.pattern=[],this.value=t,this.width=e,this.height=o,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 o=t.state;t.state=t.previousState,t.previousState=o,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,o=this.characterMap[t].toString(),i=0;i<o.length;i++)e=parseInt(o.charAt(i),10),this.pattern.push(e),this.totalUnits+=e;this.checkSum+=t*this.position++},e.prototype.getNextState=function(t,e){for(var o=0;o<e.length;o++)if(this[e[o]].is(t.value,t.index))return e[o];this.invalidCharacterError(t.value.charAt(t.index))},e}(dd),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.initProperties=function(){t.prototype.initProperties.call(this),Md(this,{name:"Code 128 A",states:["A"]})},e}(Ed),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.initProperties=function(){t.prototype.initProperties.call(this),Md(this,{name:"Code 128 B",states:["B"]})},e}(Ed),Id=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),Md(this,{name:"Code 128 C",states:["C"]})},e}(Ed),jd=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),Md(this,{name:"Code 128",states:["C","B","A","FNC4"]})},e}(Ed),Dd=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),Md(this,{name:"Code GS1-128",states:["FNC1","C","B"]})},e}(Ed);function Vd(t,e,o){return t.substring(e,e+o)}var Hd=Object.assign,Fd=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),Hd(this,{characterMap:["12121212","12121221","12122112","12122121","12211212","12211221","12212112","12212121","21121212","21121221"],START:"21",STOP:"121",checkSumType:"",checkSums:qd})},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}(dd),Nd=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),Hd(this,{name:"MSI Modulo10",checkSumType:"Modulo10"})},e}(Fd),Ud=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),Hd(this,{name:"MSI Modulo11",checkSumType:"Modulo11"})},e}(Fd),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.initProperties=function(){t.prototype.initProperties.call(this),Hd(this,{name:"MSI Modulo10 Modulo10",checkSumType:"Modulo10Modulo10"})},e}(Fd),Wd=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),Hd(this,{name:"MSI Modulo11 Modulo10",checkSumType:"Modulo11Modulo10"})},e}(Fd),qd={Modulo10:function(t){var e,o,i,r=[0,""],n=t.length%2;for(e=0;e<t.length;e++)r[(e+n)%2]+=parseInt(t.charAt(e),10);for(i=r[0],o=(2*r[1]).toString(),e=0;e<o.length;e++)i+=parseInt(o.charAt(e),10);return[(10-i%10)%10]},Modulo11:function(t){for(var e,o=0,i=t.length,r=0;r<i;r++)o+=(((i-r)%6||6)+1)*t.charAt(r);return 10!==(e=(11-o%11)%11)?[e]:[1,0]},Modulo11Modulo10:function(t){var e,o=this.Modulo11(t);return e=t+o[0],o.concat(this.Modulo10(e))},Modulo10Modulo10:function(t){var e,o=this.Modulo10(t);return e=t+o[0],o.concat(this.Modulo10(e))}},Xd=Object.assign,Yd=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),Xd(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,o){var i=String(t);if(12!==i.length||/\D/.test(i))throw new Error('The value of the "EAN13" encoding should be 12 symbols');this.pattern=[],this.options.height=o,this.baseUnit=e/(95+this.quietZoneLength),this.value=i,this.checksum=this.calculateChecksum(),this.leftKey=i[0],this.leftPart=i.substr(1,6),this.rightPart=i.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 o=0;o<t.length;o++)e&&parseInt(this.keyTable[e].charAt(o),10)?this.addPieces(Array.prototype.slice.call(this.characterMap.digits[t.charAt(o)]).reverse(),!0):this.addPieces(this.characterMap.digits[t.charAt(o)],!0)},e.prototype.addPieces=function(t,e){for(var o=0;o<t.length;o++)e?this.pattern.push({y1:0,y2:.95*this.options.height,width:t[o]}):this.pattern.push(t[o])},e.prototype.calculateChecksum=function(){for(var t=0,e=0,o=this.value.split("").reverse().join(""),i=0;i<o.length;i++)i%2?e+=parseInt(o.charAt(i),10):t+=parseInt(o.charAt(i),10);return(10-(3*t+e)%10)%10},e}(dd),Zd=Object.assign,Qd=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),Zd(this,{name:"EAN 8"})},e.prototype.initValue=function(t,e,o){if(7!==t.length||/\D/.test(t))throw new Error("Invalid value provided");this.value=t,this.options.height=o,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}(Yd),Kd={code11:yd,code39:md,code39extended:_d,code93:wd,code93extended:Cd,code128:jd,code128a:zd,code128b:Ld,code128c:Id};function $d(t,e){var o=t.style.display;"canvas"===e&&(t.style.display="block");var i={width:t.clientWidth,height:t.clientHeight};return t.style.display=o,i}Kd["gs1-128"]=Dd,Kd.msimod10=Nd,Kd.msimod11=Ud,Kd.msimod1010=Gd,Kd.msimod1110=Wd,Kd.postnet=Ad,Kd.ean8=Qd,Kd.ean13=Yd;var Jd=function(t){function e(e,o,i){void 0===i&&(i=ln),t.call(this),this.options=rr({},this.options,o),this.element=e,this.onError=i,this._initElement(),this._initSurface(),this._setOptions(o),o&&Rr(o.value)&&this.redraw()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.destroy=function(){this._destroySurface()},e.prototype._initElement=function(){P(this.element,"k-barcode")},e.prototype._initSurface=function(){var t=this.options,e=this.surface;e&&e.options.type===t.renderAs||(this._destroySurface(),this._initSurfaceElement(),this.surface=this._createSurface())},e.prototype._createSurface=function(){return a.Surface.create(this.surfaceElement,{type:this.options.renderAs})},e.prototype._destroySurface=function(){this.surface&&(this.surface.destroy(),this.surface=null,this._destroySurfaceElement())},e.prototype._initSurfaceElement=function(){this.surfaceElement||(this.surfaceElement=document.createElement("div"),this.surfaceElement.style.position="relative",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){this._setOptions(t),this._initSurface(),this.redraw()},e.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)},e.prototype.getSize=function(){return{width:this.element.offsetWidth,height:this.element.offsetHeight}},e.prototype._resize=function(){this.redraw()},e.prototype.createVisual=function(){this.visual=this._render()},e.prototype._render=function(){var t,e,o=this.options,i=o.value,r=o.text,n=cr(r.margin),s=this._getSize(),p=o.border||{},h=this.encoding,c=new vn(0,0,s.width,s.height).unpad(p.width).unpad(o.padding),l=c.height(),u=new a.Group;this.contentBox=c,u.append(this._getBackground(s)),r.visible&&(l-=a.util.measureText(i,{font:r.font}).height+n.top+n.bottom);try{t=h.encode(i,c.width(),l)}catch(t){return this.onError(t),u}return r.visible&&(e=i,o.checksum&&Rr(h.checksum)&&(e+=" "+h.checksum),u.append(this._getText(e))),this.barHeight=l,this._bandsGroup=this._getBands(t.pattern,t.baseUnit),u.append(this._bandsGroup),u},e.prototype.exportVisual=function(){return this._render()},e.prototype._getSize=function(){var t=$d(this.element,this.options.renderAs),e=new p.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},e.prototype.value=function(t){if(!Rr(t))return this.options.value;this.options.value=String(t),this.redraw()},e.prototype._getBands=function(t,e){for(var o,i,r=this.contentBox,n=r.x1,s=new a.Group,h=0;h<t.length;h++){if(o=(i=nr(t[h])?t[h]:{width:t[h],y1:0,y2:this.barHeight}).width*e,h%2){var c=p.Rect.fromPoints(new p.Point(n,i.y1+r.y1),new p.Point(n+o,i.y2+r.y1)),l=a.Path.fromRect(c,{fill:{color:this.options.color},stroke:null});s.append(l)}n+=o}return s},e.prototype._getBackground=function(t){var e=this.options,o=e.border||{},i=new vn(0,0,t.width,t.height).unpad(o.width/2);return a.Path.fromRect(i.toRect(),{fill:{color:e.background},stroke:{color:o.width?o.color:"",width:o.width,dashType:o.dashType}})},e.prototype._getText=function(t){var e=this.options.text,o=this._textbox=new Vn(t,{font:e.font,color:e.color,align:"center",vAlign:"bottom",margin:e.margin});return o.reflow(this.contentBox),o.renderVisual(),o.visual},e.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),!Kd[this.type])throw new Error("Encoding '"+this.type+"' is not supported.");this.encoding=new Kd[this.type],this.options=rr({},this.options,t)},e}(O);Yr(Jd,{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}});var tf=Jd,ef={width:500,height:100};var of=function(t,e){if(void 0===e&&(e=ef),!t)throw new Error("Please specify barcode type to validate.");var o=t.toLowerCase(),i="";if("upca"===o?(o="ean13",i="0"):"upce"===o&&(o="ean8",i="0"),!Kd[o])throw new Error("Encoding '"+t+"' is not supported.");return function(t,e,o){return function(i){try{t.encode(o+i,e.width,e.height)}catch(t){return{valid:!1,error:t}}return{valid:!0}}}(new Kd[o],e,i)},rf=Object.assign;function nf(t,e){for(var o=[],i=0;i<t.length;)o.push(t.substring(i,i+e)),i+=e;return o}function sf(t,e){var o=Number(t).toString(2);return o.length<e&&(o=new Array(e-o.length+1).join(0)+o),o}function af(t){return parseInt(t,2)}var pf=function(t){function e(e){t.call(this),this.matrix=e,this.row=e.length-1,this.column=e.length-1,this.startColumn=this.column,this.dir=-1,this.c=0}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.move=function(){this.row+=this.dir*this.c,this.c^=1,this.column=this.startColumn-this.c},e.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}},e.prototype.getNextRemainderCell=function(){if(this.move(),void 0===this.matrix[this.row][this.column])return{row:this.row,column:this.column}},e}(O),hf=function(t){function e(e,o){t.call(this),this.dataString=e,this.version=o}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(O),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.getEncodingResult=function(t,e){var o=function(t){var e,o=[],i=0,r=t;o.push(jf(r,8,5,8,e)),e=o[0].mode,r=r.substr(o[0].modeString.length);for(;r.length>0;){var n=jf(r,17,9,16,e);n.mode!==e?(e=n.mode,o.push(n),i++):o[i].modeString+=n.modeString,r=r.substr(n.modeString.length)}return o}(t),i=Df(function(t){for(var e,o=0,i=0;i<t.length;i++)e=yf[t[i].mode],o+=e.getStringBitsLength(t[i].modeString.length);return Math.ceil(o/8)}(o),e),r=function(t,e){for(var o,i="",r=0;r<t.length;r++)o=yf[t[r].mode],i+=o.encode(t[r].modeString,e);return i}(o,i);return new hf(r,i)},e}(O),lf=function(t){function e(){t.call(this),this.initProperties()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){rf(this,{modeIndicator:"",bitsInCharacterCount:[]})},e.prototype.getVersionIndex=function(t){return t<10?0:t>26?2:1},e.prototype.getBitsCharacterCount=function(t){return this.bitsInCharacterCount[this.getVersionIndex(t||40)]},e.prototype.getModeCountString=function(t,e){return this.modeIndicator+sf(t,this.getBitsCharacterCount(e))},e.prototype.encode=function(){},e.prototype.getStringBitsLength=function(){},e.prototype.getValue=function(){},e}(O),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),rf(this,{bitsInCharacterCount:[10,12,14],modeIndicator:"0001"})},e.prototype.getValue=function(t){return parseInt(t,10)},e.prototype.encode=function(t,e){var o,i=nf(t,3),r=this.getModeCountString(t.length,e);for(o=0;o<i.length-1;o++)r+=sf(i[o],10);return r+sf(i[o],1+3*i[o].length)},e.prototype.getStringBitsLength=function(t,e){var o=t%3;return 4+this.getBitsCharacterCount(e)+10*Math.floor(t/3)+3*o+(0===o?0:1)},e}(lf),df=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),rf(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 o,i=nf(t,2),r=this.getModeCountString(t.length,e);for(o=0;o<i.length-1;o++)r+=sf(45*this.getValue(i[o].charAt(0))+this.getValue(i[o].charAt(1)),11);return r+sf(2===i[o].length?45*this.getValue(i[o].charAt(0))+this.getValue(i[o].charAt(1)):this.getValue(i[o].charAt(0)),1+5*i[o].length)},e.prototype.getStringBitsLength=function(t,e){return 4+this.getBitsCharacterCount(e)+11*Math.floor(t/2)+t%2*6},e}(lf),ff=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),rf(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 o=this.getModeCountString(t.length,e),i=0;i<t.length;i++)o+=sf(this.getValue(t.charAt(i)),8);return o},e.prototype.getStringBitsLength=function(t,e){return 4+this.getBitsCharacterCount(e)+8*t},e}(lf),yf={};yf.numeric=new uf,yf.alphanumeric=new df,yf.byte=new ff;var vf=function(t){function e(){t.call(this),this.initProperties(),this.mode=yf[this.encodingMode]}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){rf(this,{encodingMode:"byte",utfBOM:"111011111011101110111111",initialModeCountStringLength:20,ranges:[128,2048,65536,2097152,67108864]})},e.prototype.getEncodingResult=function(t,e){var o=this.encode(t),i=Df(this.getDataCodewordsCount(o),e),r=this.mode.getModeCountString(o.length/8,i)+o;return new hf(r,i)},e.prototype.getDataCodewordsCount=function(t){var e=t.length;return Math.ceil((this.initialModeCountStringLength+e)/8)},e.prototype.encode=function(t){for(var e=this.utfBOM,o=0;o<t.length;o++)e+=this.encodeCharacter(t.charCodeAt(o));return e},e.prototype.encodeCharacter=function(t){var e=this.getBytesCount(t),o=e-1,i="";if(1===e)i=sf(t,8);else{for(var r=8-e,n=0;n<o;n++)i=sf(t>>6*n&63|128,8)+i;i=(t>>6*o|255>>r<<r).toString(2)+i}return i},e.prototype.getBytesCount=function(t){for(var e=this.ranges,o=0;o<e.length;o++)if(t<e[o])return o+1},e}(O),gf=[{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}}],mf={1:0},xf={0:1},_f={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},bf=[1,0,1,1,1],wf=[1,0,1],Cf={L:"01",M:"00",Q:"11",H:"10"},kf=["11101100","00010001"],Sf=[function(t,e){return(t+e)%2==0},function(t){return t%2==0},function(t){return t%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}],Af=/^\d+/,Pf=new RegExp("^[A-Z $%*+./:-]+"),Tf=new RegExp("^[A-Z0-9 $%*+./:-]+"),Mf=new RegExp("^[^A-Z0-9 $%*+./:-]+"),Of=[[1,0],[1,25,0]];function Bf(t,e,o,i){for(var r=0;r<t.length;r++)t[r][o][i]=e}function Rf(t,e,o,i){for(var r=0;r<Sf.length;r++)t[r][o][i]=Sf[r](o,i)?1^e:parseInt(e,10)}function Ef(t,e){for(var o=[],i=t.length-2;i>=0;i--)o[i]=t[i]^e[i];return o}function zf(t,e){for(var o=[],i=0;i<t.length;i++)for(var r=0;r<e.length;r++)void 0===o[i+r]?o[i+r]=(t[i]+(e[r]>=0?e[r]:0))%255:o[i+r]=mf[xf[o[i+r]]^xf[(t[i]+e[r])%255]];return o}function Lf(t,e){var o=[],i=t.length-1;do{o[i]=xf[(t[i]+e)%255],i--}while(void 0!==t[i]);return o}function If(t,e){var o,i,r=Of[e-1],n=new Array(e).concat(t),s=new Array(n.length-r.length).concat(r),a=t.length,p=[];for(i=0;i<a;i++)o=Lf(s,mf[n[n.length-1]]),s.splice(0,1),n=Ef(o,n);for(i=n.length-1;i>=0;i--)p[e-1-i]=sf(n[i],8);return p}function jf(t,e,o,i,r){var n,s,a=Af.exec(t),p=a?a[0]:"",h=Pf.exec(t),c=h?h[0]:"",l=Tf.exec(t),u=l?l[0]:"";return p&&(p.length>=e||t.length===p.length||p.length>=o&&!Tf.test(t.charAt(p.length)))?(n="numeric",s=p):u&&(t.length===u.length||u.length>=i||"alphanumeric"===r)?(n="alphanumeric",s=p||c):(n="byte",s=u?u+Mf.exec(t.substring(u.length))[0]:Mf.exec(t)[0]),{mode:n,modeString:s}}function Df(t,e){var o=0,i=gf.length-1,r=Math.floor(gf.length/2);do{t<gf[r][e].totalDataCodewords?i=r:o=r,r=o+Math.floor((i-o)/2)}while(i-o>1);return t<=gf[o][e].totalDataCodewords?r+1:i+1}function Vf(t,e,o){var i=af(e),r=e.length-1,n=t<<r,s=sf(t,o-r),a=function(t,e){var o=e.toString(2).length,i=t.toString(2).length,r=t;do{i=(r^=e<<i-o).toString(2).length}while(i>=o);return r}(n,i);return a=s+sf(a,r)}function Hf(t,e){return parseInt(t.charAt(e),10)}function Ff(t,e){var o,i,r=t[0],n=0,s=e.length;for(o=0,i=8;o<=8;o++)6!==o&&Bf(t,Hf(e,s-1-n++),o,i);for(o=8,i=7;i>=0;i--)6!==i&&Bf(t,Hf(e,s-1-n++),o,i);for(n=0,i=r.length-1,o=8;i>=r.length-8;i--)Bf(t,Hf(e,s-1-n++),o,i);for(Bf(t,1,r.length-8,8),o=r.length-7,i=8;o<r.length;o++)Bf(t,Hf(e,s-1-n++),o,i)}function Nf(t,e){for(var o,i,r,n=t[0].length,s=n-11,a=n-11,p=0;p<e.length;p++)o=Math.floor(p/3),i=p%3,Bf(t,r=Hf(e,e.length-p-1),0+o,s+i),Bf(t,r,a+i,0+o)}function Uf(t,e,o,i){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++)Bf(t,r=e[a],o+p,i+a),Bf(t,r,o+a,i+p),Bf(t,r,o+s-p,i+s-a),Bf(t,r,o+s-a,i+s-p)}function Gf(t,e,o,i){var r=o,n=i,s=t[0];do{Bf(t,0,r,i),Bf(t,0,o,n),r+=e[0],n+=e[1]}while(r>=0&&r<s.length)}function Wf(t,e,o,i,r){e[t][i]=(e[t][i]<<1^r)%128,93===e[t][i]&&(o[t]+=40)}function qf(t,e,o,i,r,n){o[t][n]===i?r[t][n]++:(o[t][n]=i,r[t][n]>=5&&(e[t]+=3+r[t][n]-5),r[t][n]=1)}function Xf(t,e){var o=Math.floor(t/e*100),i=o%5,r=Math.abs(o-i-50),n=Math.abs(o+5-i-50);return 10*Math.min(r/5,n/5)}function Yf(t,e,o){var i=function(t){return t&&t.toLowerCase().indexOf("utf_8")>=0?new vf:new cf}(o).getEncodingResult(t,e),r=i.version,n=gf[r-1][e],s=function(t,e){for(var o,i,r,n,s,a=0,p=[],h=[],c=e.groups,l=0;l<c.length;l++){r=c[l][0];for(var u=0;u<r;u++){i=c[l][1],o=[],n=[];for(var d=1;d<=i;d++)s=t.substring(a,a+8),o.push(s),n[i-d]=af(s),a+=8;p.push(o),h.push(If(n,e.errorCodewordsPerBlock))}}return[p,h]}(function(t,e){for(var o=8*e,i=0,r=0,n=t;n.length<o&&i<"0000".length;)n+="0000".charAt(i++);for(n.length%8!=0&&(n+=new Array(9-n.length%8).join("0"));n.length<o;)n+=kf[r],r^=1;return n}(i.dataString,n.totalDataCodewords),n),a=function(t){for(var e=[],o=17+4*t,i=0;i<Sf.length;i++){e[i]=new Array(o);for(var r=0;r<o;r++)e[i][r]=new Array(o)}return e}(r);!function(t){var e=t[0].length;Uf(t,bf,0,0),Gf(t,[-1,-1],7,7),Uf(t,bf,e-7,0),Gf(t,[1,-1],e-8,7),Uf(t,bf,0,e-7),Gf(t,[-1,1],7,e-8)}(a),function(t,e){if(!(e<2)){var o,i,r=t[0],n=r.length,s=Math.floor(e/7),a=[6],p=0;for((o=_f[e])?i=(n-13-o)/s:o=i=(n-13)/(s+1),a.push(a[p++]+o);a[p]+i<n;)a.push(a[p++]+i);for(var h=0;h<a.length;h++)for(var c=0;c<a.length;c++)void 0===r[a[h]][a[c]]&&Uf(t,wf,a[h]-2,a[c]-2)}}(a,r),function(t){for(var e=1,o=t[0].length,i=8;i<o-8;i++)Bf(t,e,6,i),Bf(t,e,i,6),e^=1}(a),r>=7&&Nf(a,sf(0,18)),Ff(a,sf(0,15)),function(t,e){for(var o,i,r,n=new pf(t[0]),s=0;s<e.length;s++)for(o=e[s],i=0;o.length>0;){for(var a=0;a<o.length;a++)for(var p=0;p<8;p++)r=n.getNextCell(),Rf(t,o[a][i].charAt(p),r.row,r.column);for(i++;o[0]&&i===o[0].length;)o.splice(0,1)}for(;r=n.getNextRemainderCell();)Rf(t,0,r.row,r.column)}(a,s);var p=function(t){var e,o,i=[],r=[],n=[],s=[],a=[],p=t[0].length;for(o=0;o<t.length;o++)i[o]=0,n[o]=0,a[o]=[0,0],s[o]=[0,0],r[o]=[];for(var h=0;h<p;h++)for(var c=0;c<p;c++)for(var l=0;l<t.length;l++)e=t[l],n[l]+=parseInt(e[h][c],10),r[l][0]===e[h][c]&&h+1<p&&c-1>=0&&e[h+1][c]===r[l][0]&&e[h+1][c-1]===r[l][0]&&(i[l]+=3),Wf(l,s,i,0,e[h][c]),Wf(l,s,i,1,e[c][h]),qf(l,i,r,e[h][c],a,0),qf(l,i,r,e[c][h],a,1);var u,d=p*p,f=Number.MAX_VALUE;for(o=0;o<i.length;o++)i[o]+=Xf(n[o],d),i[o]<f&&(f=i[o],u=o);return u}(a),h=a[p];return r>=7&&Nf([h],function(t){return Vf(t,"1111100100101",18)}(r)),Ff([h],function(t){var e,o="";if(0===af(t))return"101010000010010";e=Vf(af(t),"10100110111",15);for(var i=0;i<e.length;i++)o+=e.charAt(i)^"101010000010010".charAt(i);return o}(Cf[e]+sf(p,3))),h}!function(){var t,e;for(e=1;e<255;e++)(t=2*xf[e-1])>255&&(t^=285),xf[e]=t,mf[t]=e;t=2*xf[e-1]^285,xf[e]=t,xf[-1]=0}(),function(){for(var t=2;t<=68;t++){var e=Of[t-1],o=[t,0];Of[t]=zf(e,o)}}();var Zf=Math.round,Qf=[[0,1],[1,1],[1,2],[2,2],[2,1],[3,1],[3,0],[2,0],[2,-1],[1,-1],[1,0]],Kf=[[0,1],[1,1],[1,0]],$f=200,Jf="L",ty="#fff",ey="#000",oy=1,iy=7,ry=function(t){function e(e,o,i){void 0===i&&(i=ln),t.call(this),this.options=rr({},this.options,o),this.element=e,this.wrapper=this.element,this.onError=i,this._initElement(),this._initSurface(),this.setOptions(o)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.destroy=function(){this._destroySurface()},e.prototype._initElement=function(){P(this.element,"k-qrcode")},e.prototype._initSurface=function(){var t=this.options,e=this.surface;e&&e.options.type===t.renderAs||(this._destroySurface(),this._initSurfaceElement(),this.surface=this._createSurface())},e.prototype._createSurface=function(){return a.Surface.create(this.surfaceElement,{type:this.options.renderAs})},e.prototype._destroySurface=function(){this.surface&&(this.surface.destroy(),this.surface=null,this._destroySurfaceElement())},e.prototype._initSurfaceElement=function(){this.surfaceElement||(this.surfaceElement=document.createElement("div"),this.surfaceElement.style.position="relative",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.redraw=function(){var t=this._getSize();this.surface.clear(),this.surface.setSize({width:t,height:t}),this.createVisual(),this.surface.draw(this.visual)},e.prototype.getSize=function(){var t=this.element,e=t.clientWidth,o=t.clientHeight,i={width:0,height:0};return e>0&&(i.width=e),o&&(i.height=o),i},e.prototype._resize=function(){this.redraw()},e.prototype.createVisual=function(){this.visual=this._render()},e.prototype.exportVisual=function(){return this._render()},e.prototype._render=function(){var t,e,o,i,r,n=this._value,s=this.options.border||{},p=this.options.padding||0,h=s.width||0;s.width=h;var c=new a.Group;try{n&&(o=Yf(n,this.options.errorCorrection,this.options.encoding),r=(i=this._getSize())-2*(h+p),t=this._calculateBaseUnit(r,o.length),e=h+p+(r-o.length*t)/2,c.append(this._renderBackground(i,s)),c.append(this._renderMatrix(o,t,e)),this._hasCustomLogo()?c.append(this._renderLogo(i,t)):this._isSwiss()&&c.append(this._renderSwissCode(i,t)))}catch(t){this.onError(t)}return c},e.prototype._renderLogo=function(t,e){var o,i=Zf(t/2),r=this._getLogoSize(e*iy),n=this.options.overlay.imageUrl,s={x:i-r.width/2,y:i-r.height/2};return o=new p.Rect(new p.Point(s.x,s.y),new p.Size(r.width,r.height)),new a.Image(n,o)},e.prototype._renderSwissCode=function(t,e){var o=this._getLogoSize(e*iy),i=(o=Math.max(o.width,o.height))/4,r=i/2,n=t/2,s={},p=new a.Group;return s.x=s.y=Math.ceil(n-e-o/2),p.append(this._renderShape(s,Math.ceil(o+2*e),Kf,"#fff")),s.x=s.y=n-o/2,p.append(this._renderShape(s,o,Kf,this.options.color)),s.x=n+r-o/2,s.y=n+r+i-o/2,p.append(this._renderShape(s,i,Qf,"#fff")),p},e.prototype._renderShape=function(t,e,o,i){var r=new a.MultiPath({fill:{color:i},stroke:null});r.moveTo(t.x,t.y);for(var n=0;n<o.length;n++)r.lineTo(t.x+e*o[n][0],t.y+e*o[n][1]);return r.close(),r},e.prototype._getSize=function(){var t;if(this.options.size)t=parseInt(this.options.size,10);else{var e=$d(this.element,this.options.renderAs),o=Math.min(e.width,e.height);t=o>0?o:$f}return t},e.prototype._calculateBaseUnit=function(t,e){var o=Math.floor(t/e);if(o<oy){var i=Math.ceil(e*oy);this.onError(new Error("Insufficient size for QR Code: the current size is "+t+"px and the minimum size is "+i+"px."))}else o*e>=t&&o-1>=oy&&o--;return o},e.prototype._renderMatrix=function(t,e,o){for(var i=new a.MultiPath({fill:{color:this.options.color},stroke:null}),r=0;r<t.length;r++)for(var n=o+r*e,s=0;s<t.length;){for(;0===t[r][s]&&s<t.length;)s++;if(s<t.length){for(var p=s;1===t[r][s];)s++;var h=Zf(o+p*e),c=Zf(n),l=Zf(o+s*e),u=Zf(n+e);i.moveTo(h,c).lineTo(h,u).lineTo(l,u).lineTo(l,c).close()}}return i},e.prototype._renderBackground=function(t,e){var o=new vn(0,0,t,t).unpad(e.width/2);return a.Path.fromRect(o.toRect(),{fill:{color:this.options.background},stroke:{color:e.color,width:e.width}})},e.prototype.setOptions=function(t){var e=t||{};this.options=rf(this.options,e),void 0!==t.value&&(this._value=String(this.options.value)),this._initSurface(),this.redraw()},e.prototype.value=function(t){if(void 0===t)return this._value;this._value=String(t),this.redraw()},e.prototype._hasCustomLogo=function(){return Boolean(this.options.overlay.imageUrl)},e.prototype._isSwiss=function(){return"swiss"===this.options.overlay.type},e.prototype._getLogoSize=function(t){var e=this.options.overlay.width,o=this.options.overlay.height;return e||o?e&&!o?o=e:!e&&o&&(e=o):e=o=t,{width:e,height:o}},e}(O);Yr(ry,{name:"QRCode",renderAs:"svg",encoding:"ISO_8859_1",value:"",errorCorrection:Jf,background:ty,color:ey,size:"",padding:0,border:{color:"",width:0},overlay:{type:"image",imageUrl:"",width:0,height:0}});var ny=ry;var sy=function(t){return void 0===t&&(t="ISO_8859_1"),function(e){try{Yf(e,"L",t)}catch(t){return{valid:!1,error:t}}return{valid:!0}}},ay={WGS84:{a:6378137,b:6356752.314245179,f:.0033528106647474805,e:.08181919084262149}};function py(t){return t*t}var hy=Math,cy=hy.abs,ly=hy.atan,uy=hy.atan2,dy=hy.cos,fy=hy.sin,yy=hy.tan,vy=function(t){function e(e,o){t.call(this),this.initProperties(),1===arguments.length?(this.lat=e[0],this.lng=e[1]):(this.lat=e,this.lng=o)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){rr(this,{DISTANCE_ITERATIONS:100,DISTANCE_CONVERGENCE:1e-12,DISTANCE_PRECISION:2,FORMAT:"{0:N6}{1:N6}"})},e.prototype.toArray=function(){return[this.lat,this.lng]},e.prototype.equals=function(t){return t&&t.lat===this.lat&&t.lng===this.lng},e.prototype.clone=function(){return new e(this.lat,this.lng)},e.prototype.round=function(t){return this.lng=Ur(this.lng,t),this.lat=Ur(this.lat,t),this},e.prototype.wrap=function(){return this.lng=this.lng%180,this.lat=this.lat%90,this},e.prototype.distanceTo=function(t,e){return this.greatCircleTo(t,e).distance},e.prototype.destination=function(t,o,i){var r=Nr(o),n=i||ay.WGS84,s=Nr(this.lat),a=Nr(this.lng),p=t/n.a,h=hy.asin(fy(s)*dy(p)+dy(s)*fy(p)*dy(r)),c=a+uy(fy(r)*fy(p)*dy(s),dy(p)-fy(s)*fy(h));return new e(Er(h),Er(c))},e.prototype.greatCircleTo=function(t,o){var i=e.create(i),r=o||ay.WGS84;if(!i||this.clone().round(8).equals(i.clone().round(8)))return{distance:0,azimuthFrom:0,azimuthTo:0};for(var n,s,a,p,h,c,l,u,d=r.a,f=r.b,y=r.f,v=Nr(i.lng-this.lng),g=ly((1-y)*yy(Nr(this.lat))),m=fy(g),x=dy(g),_=ly((1-y)*yy(Nr(i.lat))),b=fy(_),w=dy(_),C=v,k=this.DISTANCE_ITERATIONS,S=!1;!S&&k-- >0;){s=fy(C),a=dy(C),p=hy.sqrt(py(w*s)+py(x*b-m*w*a)),u=uy(p,c=m*b+x*w*a);var A=x*w*s/p;l=0,0!==(h=1-py(A))&&(l=c-2*m*b/h),n=C;var P=y/16*h*(4+y*(4-3*h));C=v+(1-P)*y*A*(u+P*p*(l+P*c*(2*py(l)-1))),S=cy(C-n)<=this.DISTANCE_CONVERGENCE}var T=h*(py(d)-py(f))/py(f),M=1+T/16384*(4096+T*(T*(320-175*T)-768)),O=T/1024*(256+T*(T*(74-47*T)-128)),B=O*p*(l+O/4*(c*(2*py(l)-1)-O/6*l*(4*py(p)-3)*(4*py(l)-3))),R=uy(w*s,x*b-m*w*a),E=uy(x*s,-m*w+x*b*a);return{distance:Ur(f*M*(u-B),this.DISTANCE_PRECISION),azimuthFrom:Er(R),azimuthTo:Er(E)}},e.prototype.toString=function(){return String(this.lat)+","+String(this.lng)},e.fromLngLat=function(t){return new e(t[1],t[0])},e.fromLatLng=function(t){return new e(t[0],t[1])},e.create=function(t,o){if(Rr(t))return t instanceof e?t.clone():1===arguments.length&&2===t.length?e.fromLatLng(t):new e(t,o)},e}(O),gy=Math,my=gy.atan,xy=gy.exp,_y=gy.pow,by=gy.sin,wy=gy.log,Cy=gy.tan,ky=p.Point,Sy=gy.PI,Ay=Sy/2,Py=Sy/4,Ty=Sy/180,My=ay.WGS84,Oy=function(t){function e(e){t.call(this),this.initProperties(),this._initOptions(e)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._initOptions=function(t){this.options=rr({},this.options,t)},e.prototype.initProperties=function(){rr(this,{MAX_LNG:180,MAX_LAT:85.0840590501,INVERSE_ITERATIONS:15,INVERSE_CONVERGENCE:1e-12})},e.prototype.forward=function(t,e){var o=this.options,i=o.datum.a,r=o.centralMeridian,n=Hr(t.lat,-this.MAX_LAT,this.MAX_LAT),s=e?Hr(t.lng,-this.MAX_LNG,this.MAX_LNG):t.lng,a=Nr(s-r)*i,p=this._projectLat(n);return new ky(a,p)},e.prototype._projectLat=function(t){var e=this.options.datum,o=e.e,i=e.a,r=Nr(t),n=Cy(Py+r/2),s=o*by(r),a=_y((1-s)/(1+s),o/2);return i*wy(n*a)},e.prototype.inverse=function(t,e){var o=this.options,i=o.datum.a,r=o.centralMeridian,n=t.x/(Ty*i)+r,s=Hr(this._inverseY(t.y),-this.MAX_LAT,this.MAX_LAT);return e&&(n=Hr(n,-this.MAX_LNG,this.MAX_LNG)),new vy(s,n)},e.prototype._inverseY=function(t){var e,o=this.options.datum,i=o.a,r=o.e,n=r/2,s=xy(-t/i),a=Ay-2*my(s);for(e=0;e<=this.INVERSE_ITERATIONS;e++){var p=r*by(a),h=_y((1-p)/(1+p),n),c=Ay-2*my(s*h)-a;if(a+=c,gy.abs(c)<=this.INVERSE_CONVERGENCE)break}return Er(a)},e}(O);Yr(Oy,{centralMeridian:0,datum:My});var By=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),rr(this,{MAX_LAT:85.0511287798})},e.prototype._projectLat=function(t){var e=this.options.datum.a,o=Nr(t),i=Cy(Py+o/2);return e*wy(i)},e.prototype._inverseY=function(t){var e=this.options.datum.a,o=xy(-t/e);return Er(Ay-2*my(o))},e}(Oy),Ry=function(t){function e(){t.call(this);var e=this._proj=new By,o=this.c=2*Sy*e.options.datum.a;this._tm=p.transform().translate(.5,.5).scale(1/o,-1/o),this._itm=p.transform().scale(o,-o).translate(-.5,-.5)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.toPoint=function(t,e,o){return this._proj.forward(t,o).transform(this._tm).scale(e||1)},e.prototype.toLocation=function(t,e,o){var i=t.clone().scale(1/(e||1)).transform(this._itm);return this._proj.inverse(i,o)},e}(O),Ey=Object.defineProperty,zy=(Object.assign,function(t){var e=document.createElement("div");return e.innerHTML=t,e.firstChild}),Ly=function(t){for(;t.firstChild;)t.removeChild(t.firstChild)},Iy=function(t,e){e.insertBefore(t,e.firstChild)},jy=function(t){return t.replace(/([a-z][A-Z])/g,(function(t){return t.charAt(0)+"-"+t.charAt(1).toLowerCase()}))},Dy=function(t){return t&&String(t).endsWith("px")?t:String(t)+"px"},Vy=function(t){var e,o=!1,i=[],r={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_]+)/,meego:/(MeeGo).+NokiaBrowser\/(\d+)\.([\d\._]+)/,webos:/(webOS)\/(\d+)\.(\d+(\.\d+)?)/,blackberry:/(BlackBerry|BB10).*?Version\/(\d+)\.(\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,ffos:/(Mobile).*rv:(\d+)\.(\d+(\.\d+)?).*Firefox/},n={ios:/^i(phone|pad|pod)$/i,android:/^android|fire$/i,blackberry:/^blackberry|playbook/i,windows:/windows/,wp:/wp/,flat:/sailfish|ffos|tizen/i,meego:/meego/},s={tablet:/playbook|ipad|fire/i},a={omini:/Opera\sMini/i,omobile:/Opera\sMobi/i,firefox:/Firefox|Fennec/i,mobilesafari:/version\/.*safari/i,ie:/MSIE|Windows\sPhone/i,chrome:/chrome|crios/i,webkit:/webkit/i};for(var p in r)if(r.hasOwnProperty(p)&&(i=t.match(r[p]))){if("windows"===p&&"plugins"in navigator)return!1;(o={}).device=p,o.tablet=Hy(p,s,!1),o.browser=Hy(t,a,"default"),o.name=Hy(p,n),o[o.name]=!0,o.majorVersion=i[2],o.minorVersion=(i[3]||"0").replace("_","."),e=o.minorVersion.replace(".","").substr(0,2),o.flatVersion=o.majorVersion+e+new Array(3-(e.length<3?e.length:2)).join("0");break}return o};function Hy(t,e,o){for(var i in e)if(e.hasOwnProperty(i)&&e[i].test(t))return i;return void 0!==o?o:t}var Fy=function(){var t={down:"touchstart mousedown",move:"mousemove touchmove",up:"mouseup touchend touchcancel",cancel:"mouseleave touchcancel"},e=Ny();return e.touch&&(e.mobileOS.ios||e.mobileOS.android)?t={down:"touchstart",move:"touchmove",up:"touchend touchcancel",cancel:"touchcancel"}:e.pointers?t={down:"pointerdown",move:"pointermove",up:"pointerup",cancel:"pointercancel pointerleave"}:e.msPointers&&(t={down:"MSPointerDown",move:"MSPointerMove",up:"MSPointerUp",cancel:"MSPointerCancel MSPointerLeave"}),t},Ny=function(){var t=Vy(navigator.userAgent),e=function(t){var e=!1,o=[],i={edge:/(edge)[ \/]([\w.]+)/i,webkit:/(chrome|crios)[ \/]([\w.]+)/i,safari:/(webkit)[ \/]([\w.]+)/i,opera:/(opera)(?:.*version|)[ \/]([\w.]+)/i,msie:/(msie\s|trident.*? rv:)([\w.]+)/i,mozilla:/(mozilla)(?:.*? rv:([\w.]+)|)/i};for(var r in i)if(i.hasOwnProperty(r)&&(o=t.match(i[r]))){(e={})[r]=!0,e[o[1].toLowerCase().split(" ")[0].split("/")[0]]=!0,e.version=parseInt(document.documentMode||o[2],10);break}return e}(navigator.userAgent),o=e.chrome,i=e.crios,r=e.mozilla,n=e.safari,s={};s.mobileOS=t,s.touch="ontouchstart"in window,s.pointers=!o&&!i&&!r&&!n&&window.PointerEvent,s.msPointers=!o&&window.MSPointerEvent,s.mouseAndTouchPresent=s.touch&&!(s.mobileOS.ios||s.mobileOS.android),s.eventCapture=document.documentElement.addEventListener;var a=document.createElement("table"),p=s.transitions=!1,h=s.transforms=!1;return["Moz","webkit","O","ms"].forEach((function(t){var e="string"==typeof a.style[t+"Transition"];if(e||"string"==typeof a.style[t+"Transform"]){var o=t.toLowerCase();return h={css:"ms"!==o?"-"+o+"-":"",prefix:t,event:"o"===o||"webkit"===o?o:""},e&&((p=h).event=p.event?p.event+"TransitionEnd":"transitionend"),!1}})),a=null,s.transforms=h,s.transitions=p,s.delayedClick=function(){if(s.touch){if(s.mobileOS.ios)return!0;if(s.mobileOS.android){if(!s.browser.chrome)return!0;if(s.browser.version<32)return!1;var t=document.querySelector("meta[name=viewport]");return!(t?t.getAttribute("content"):"").match(/user-scalable=no/i)}}return!1},s},Uy=function(t,e){return t.bind(e)};var Gy=function(t,e,o,i,r){Wy(t,e,o,i,r)},Wy=function(t,e,o,i,r){(A(e)?e:(e||"").split(" ")).forEach((function(e){qy(t,e,o,i,r)}))},qy=function(t,e,o,i,r){var n,s=i;o&&or(o)&&!i?s=o:o&&"string"==typeof o&&or(s)&&(n=o),t.addEventListener(e,(function(e){var o=e.target?e.target.closest(n):null;if(!n||n&&e.target&&o){var i=n?o:e.currentTarget;Ey(e,"currentTarget",{value:i}),Ey(e,"delegateTarget",{value:t}),s(e)}}),Boolean(r))},Xy=function(t,e,o,i,r){Yy(t,e,o,i,r)},Yy=function(t,e,o,i){(A(e)?e:(e||"").split(" ")).forEach((function(e){Zy(t,e,o,i)}))},Zy=function(t,e,o,i){t.removeEventListener(e,o,Boolean(i))},Qy=Fy(navigator.userAgent);function Ky(t){return Qy[t]||t}var $y=/([^ ]+)/g,Jy=function(t){return t.replace($y,Ky)},tv=function(t,e){var o=t.prototype;o.events?e.forEach((function(t){o.events.indexOf(t)<0&&o.events.push(t)})):o.events=e},ev=function(){return Number(new Date)},ov=function(){},iv=function(){this._defaultPrevented=!0},rv=function(){return!0===this._defaultPrevented},nv=function(t){function e(){t.call(this),this._events={}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.destroy=function(){this.unbind()},e.prototype.bind=function(t,e,o){var i,r,n,s,a=this,p="string"==typeof t?[t]:t||[],h="function"==typeof e;if(void 0===e){for(i in t)a.bind(i,t[i]);return a}var c=function(){var t=p[i];(s=h?e:e[t])&&(o&&(n=s,(s=function(){a.unbind(t,s),n.apply(a,arguments)}).original=n),(a._events[t]=a._events[t]||[]).push(s))};for(i=0,r=p.length;i<r;i++)c();return a},e.prototype.one=function(t,e){return this.bind(t,e,!0)},e.prototype.first=function(t,e){var o,i,r,n="string"==typeof t?[t]:t,s="function"==typeof e;for(o=0,i=n.length;o<i;o++){var a=n[o];(r=s?e:e[a])&&(this._events[a]=this._events[a]||[]).unshift(r)}return this},e.prototype.trigger=function(t,e){var o,i,r=this._events[t];if(r){var n=e||{};for(n.sender=this,n._defaultPrevented=!1,n.preventDefault=iv,n.isDefaultPrevented=rv,o=0,i=(r=r.slice()).length;o<i;o++)r[o].call(this,n);return!0===n._defaultPrevented}return!1},e.prototype.unbind=function(t,e){var o,i=this._events[t];if(void 0===t)this._events={};else if(i)if(e)for(o=i.length-1;o>=0;o--)i[o]!==e&&i[o].original!==e||i.splice(o,1);else this._events[t]=[];return this},e.prototype._setEvents=function(t){for(var e=(this.events||[]).length,o=0;o<e;o++){var i=this.events[o];this.options[i]&&t[i]&&(this.unbind(i,this.options[i]),this._events&&this._events[i]&&delete this._events[i])}this.bind(this.events,t)},e}(O),sv=dr.compile,av=function(t){function e(e,o){t.call(this),this.element=e,this._initOptions(o),this.items=[],P(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=rr({},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;Rr(t)&&("string"==typeof t&&(e={text:t}),this.items.push(e),this._render())},e.prototype.remove=function(t){for(var e=[],o=0;o<this.items.length;o++){var i=this.items[o];i.text!==t&&e.push(i)}this.items=e,this._render()},e.prototype.clear=function(){this.items=[],Ly(this.element)},e.prototype._render=function(){for(var t=[],e=sv(this.options.itemTemplate),o=0;o<this.items.length;o++){var i=this.items[o],r=this._itemText(i);""!==r&&t.push(e({text:r}))}t.length>0?(Ly(this.element),function(t,e){var o=document.createElement("div");for(o.innerHTML=t;o.childNodes.length>0;)e.appendChild(o.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="",o=this._inZoomLevel(t.minZoom,t.maxZoom),i=this._inArea(t.extent);return o&&i&&(e+=t.text),e},e.prototype._inZoomLevel=function(t,e){var o=Wr(t,-Number.MAX_VALUE),i=Wr(e,Number.MAX_VALUE);return this._zoom>o&&this._zoom<i},e.prototype._inArea=function(t){var e=!0;return t&&(e=t.contains(this._extent)),e},e}(nv);Yr(av,{name:"Attribution",separator:" | ",itemTemplate:"#= text #"});var pv={up:{className:"k-navigator-n",iconClass:"k-i-arrow-n"},down:{className:"k-navigator-s",iconClass:"k-i-arrow-s"},right:{className:"k-navigator-e",iconClass:"k-i-arrow-e"},left:{className:"k-navigator-w",iconClass:"k-i-arrow-w"}};function hv(t){var e='<button class="k-button k-button-square k-rounded-full k-button-flat k-button-flat-base k-icon-button '+pv[t].className+'" aria-label="move '+t+'"><span class="k-icon '+pv[t].iconClass+'" /></button>';return zy(e)}var cv=function(t){function e(e,o){t.call(this),this.element=e,this._initOptions(o);var i=hv("up"),r=hv("right"),n=hv("down"),s=hv("left");this.element.appendChild(i),this.element.appendChild(r),this.element.appendChild(n),this.element.appendChild(s),P(this.element,"k-widget k-navigator"),Gy(this.element,"click",".k-button",Uy(this._click,this));var a=this.element.parentNode.closest("[data-role]");this._keyroot=a||this.element,this._tabindex(this._keyroot),this._keydownHandler=Uy(this._keydown,this),Gy(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(){Xy(this._keyroot,"keydown",this._keydownHandler)},e.prototype._tabindex=function(t){var e=t||this.wrapper||this.element,o=this.element,i=e.getAttribute("tabindex")||o.getAttribute("tabindex");o.removeAttribute("tabindex"),e.setAttribute("tabindex",isNaN(i)?0:i)},e.prototype._initOptions=function(t){this.options=rr({},this.options,t)},e.prototype._pan=function(t,e){var o=this.options.panStep;this.trigger("pan",{x:t*o,y:e*o})},e.prototype._click=function(t){var e=0,o=0,i=t.currentTarget;i.matches(".k-navigator-n")?o=1:i.matches(".k-navigator-s")?o=-1:i.matches(".k-navigator-e")?e=1:i.matches(".k-navigator-w")&&(e=-1),this._pan(e,o),t.preventDefault()},e.prototype._keydown=function(t){switch(t.which){case un.UP:this._pan(0,1),t.preventDefault();break;case un.DOWN:this._pan(0,-1),t.preventDefault();break;case un.RIGHT:this._pan(1,0),t.preventDefault();break;case un.LEFT:this._pan(-1,0),t.preventDefault()}},e}(nv);function lv(t,e){return zy('<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+'"><span class="k-icon '+e+'"></span></button>')}Yr(cv,{name:"Navigator",panStep:1}),tv(cv,["pan"]);var uv=function(t){function e(e,o){t.call(this),this.element=e,this._initOptions(o);var i=lv("in","k-i-plus"),r=lv("out","k-i-minus");this.element.appendChild(i),this.element.appendChild(r),P(this.element,"k-widget k-zoom-control k-button-group k-group-horizontal"),this._clickHandler=this._click.bind(this),Gy(this.element,"click",".k-button",this._clickHandler);var n=this.element.parentNode.closest("[data-role]");this._keyroot=n||this.element,this._tabindex(this._keyroot),this._keydownHandler=this._keydown.bind(this),Gy(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&&Xy(this.element,"click",this._clickHandler),this._keyroot&&Xy(this._keyroot,"keydown",this._keydownHandler)},e.prototype._tabindex=function(t){var e=t||this.wrapper||this.element,o=this.element,i=e.getAttribute("tabindex")||o.getAttribute("tabindex");o.removeAttribute("tabindex"),e.setAttribute("tabindex",isNaN(i)?0:i)},e.prototype._initOptions=function(t){this.options=rr({},this.options,t)},e.prototype._change=function(t){var e=this.options.zoomStep;this.trigger("change",{delta:t*e})},e.prototype._click=function(t){var e=1;xr(t.currentTarget,"k-zoom-out")&&(e=-1),this._change(e),t.preventDefault()},e.prototype._keydown=function(t){switch(t.which){case un.NUMPAD_PLUS:case 187:case 61:this._change(1);break;case un.NUMPAD_MINUS:case 189:case 173:this._change(-1)}},e}(nv);Yr(uv,{name:"ZoomControl",zoomStep:1}),tv(uv,["change"]);var dv=Math,fv=dv.max,yv=dv.min,vv=function(t){function e(e,o){t.call(this);var i=vy.create(e),r=vy.create(o);i.lng+180>r.lng+180&&i.lat+90<r.lat+90?(this.se=i,this.nw=r):(this.se=r,this.nw=i)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var o={World:{configurable:!0}};return e.prototype.contains=function(t){var e=this.nw,o=this.se,i=Wr(t.lng,t[1]),r=Wr(t.lat,t[0]);return t&&i+180>=e.lng+180&&i+180<=o.lng+180&&r+90>=o.lat+90&&r+90<=e.lat+90},e.prototype.center=function(){var t=this.nw,e=this.se,o=t.lng+(e.lng-t.lng)/2,i=t.lat+(e.lat-t.lat)/2;return new vy(i,o)},e.prototype.containsAny=function(t){for(var e=!1,o=0;o<t.length;o++)e=e||this.contains(t[o]);return e},e.prototype.include=function(t){var e=this.nw,o=this.se,i=Wr(t.lng,t[1]),r=Wr(t.lat,t[0]);e.lng=yv(e.lng,i),e.lat=fv(e.lat,r),o.lng=fv(o.lng,i),o.lat=yv(o.lat,r)},e.prototype.includeAll=function(t){for(var e=0;e<t.length;e++)this.include(t[e])},e.prototype.edges=function(){var t=this.nw,e=this.se;return{nw:this.nw,ne:new vy(t.lat,e.lng),se:this.se,sw:new vy(e.lat,t.lng)}},e.prototype.toArray=function(){var t=this.nw,e=this.se;return[t,new vy(t.lat,e.lng),e,new vy(e.lat,t.lng)]},e.prototype.overlaps=function(t){return this.containsAny(t.toArray())||t.containsAny(this.toArray())},e.create=function(t,o){return t instanceof e?t:t&&o?new e(t,o):t&&4===t.length&&!o?new e([t[0],t[1]],[t[2],t[3]]):void 0},o.World.get=function(){return new e([90,-180],[-90,180])},Object.defineProperties(e,o),e}(O),gv=function(t){function e(e,o){t.call(this),this.support=Ny(),this._initOptions(o),this.map=e;var i=document.createElement("div");P(i,"k-layer"),i.style.zIndex=this.options.zIndex,i.style.opacity=this.options.opacity,this.element=i,e.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()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.destroy=function(){this._deactivate()},e.prototype._initOptions=function(t){this.options=rr({},this.options,t)},e.prototype.show=function(){this.reset(),this._activate(),this._applyExtent(!0)},e.prototype.hide=function(){this._deactivate(),this._setVisibility(!1)},e.prototype.reset=function(){this._beforeReset(),this._reset()},e.prototype._reset=function(){this._applyExtent()},e.prototype._beforeReset=function(){},e.prototype._resize=function(){},e.prototype._panEnd=function(){this._applyExtent()},e.prototype._applyExtent=function(){var t=this.options,e=this.map.zoom(),o=!Rr(t.minZoom)||e>=t.minZoom,i=!Rr(t.maxZoom)||e<=t.maxZoom,r=vv.create(t.extent),n=!r||r.overlaps(this.map.extent());this._setVisibility(o&&i&&n)},e.prototype._setVisibility=function(t){this.element.style.display=t?"":"none"},e.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)},e.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)},e.prototype._updateAttribution=function(){var t=this.map.attribution;t&&t.add(this.options.attribution)},e.prototype._readData=function(){return this.options.data||[]},e.prototype._hasData=function(){return this._data&&this._data.length>0},e}(O),mv=Math,xv=dr.compile,_v=p.Point;function bv(t){return new _v(Ur(t.x),Ur(t.y))}function wv(t){var e=t;return"string"!=typeof t&&(e+="px"),e}var Cv=function(t){function e(e,o){t.call(this,e,o),"string"==typeof this.options.subdomains&&(this.options.subdomains=this.options.subdomains.split(""));var i=this._viewType();this._view=new i(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 kv},e.prototype._activate=function(){t.prototype._activate.call(this),this.support.mobileOS||(this._pan||(this._pan=hi(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,o=e.extent(),i={nw:e.locationToLayer(o.nw).round(),se:e.locationToLayer(o.se).round()};t.center(e.locationToLayer(e.center())),t.extent(i),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}(gv);Yr(Cv,{tileSize:256,subdomains:["a","b","c"],urlTemplate:"",zIndex:1});var kv=function(t){function e(e,o){t.call(this),this.element=e,this._initOptions(o),this.pool=new Av}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._initOptions=function(t){this.options=rr({},this.options,t)},e.prototype.center=function(t){this._center=t},e.prototype.extent=function(t){this._extent=t},e.prototype.viewOrigin=function(t){this._viewOrigin=t},e.prototype.zoom=function(t){this._zoom=t},e.prototype.pointToTileIndex=function(t){return new _v(mv.floor(t.x/this.options.tileSize),mv.floor(t.y/this.options.tileSize))},e.prototype.tileCount=function(){var t=this.size(),e=this.pointToTileIndex(this._extent.nw),o=this._extent.nw,i=this.indexToPoint(e).translate(-o.x,-o.y);return{x:mv.ceil((mv.abs(i.x)+t.width)/this.options.tileSize),y:mv.ceil((mv.abs(i.y)+t.height)/this.options.tileSize)}},e.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}},e.prototype.indexToPoint=function(t){var e=t.x,o=t.y;return new _v(e*this.options.tileSize,o*this.options.tileSize)},e.prototype.subdomainText=function(){var t=this.options.subdomains;return t[this.subdomainIndex++%t.length]},e.prototype.destroy=function(){Ly(this.element),this.pool.empty()},e.prototype.reset=function(){this.pool.reset(),this.subdomainIndex=0,this.render()},e.prototype.render=function(){var t,e,o,i=this.tileCount(),r=this.pointToTileIndex(this._extent.nw);for(e=0;e<i.x;e++)for(o=0;o<i.y;o++)(t=this.createTile({x:r.x+e,y:r.y+o})).visible||t.show()},e.prototype.createTile=function(t){var e=this.tileOptions(t),o=this.pool.get(this._center,e);return o.element.parentNode||this.element.append(o.element),o},e.prototype.tileOptions=function(t){var e=this.wrapIndex(t),o=this.indexToPoint(t),i=this._viewOrigin,r=o.clone().translate(-i.x,-i.y);return{index:e,currentIndex:t,point:o,offset:bv(r),zoom:this._zoom,size:this.options.tileSize,subdomain:this.subdomainText(),urlTemplate:this.options.urlTemplate,errorUrlTemplate:this.options.errorUrlTemplate}},e.prototype.wrapIndex=function(t){var e=mv.pow(2,this._zoom);return{x:this.wrapValue(t.x,e),y:Hr(t.y,0,e-1)}},e.prototype.wrapValue=function(t,e){var o=mv.abs(t)%e;return t>=0?o:e-(0===o?e:o)},e}(O),Sv=function(t){function e(e,o){t.call(this),this.id=e,this.visible=!0,this._initOptions(o),this.createElement(),this.show()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.destroy=function(){var t=this.element,e=t?t.parentNode:null;t&&(e&&e.removeChild(t),this.element=null)},e.prototype._initOptions=function(t){this.options=rr({},this.options,t)},e.prototype.createElement=function(){var t=document.createElement("img");P(t,"k-layer"),t.style.position="absolute",t.style.display="block",t.style.width=this.options.size,t.style.height=this.options.size,this.element=t},e.prototype.show=function(){var t=this.element;t.style.top=wv(this.options.offset.y),t.style.left=wv(this.options.offset.x);var e=this.url();e&&t.setAttribute("src",e),t.style.visibility="visible",this.visible=!0},e.prototype.hide=function(){this.element.style.visibility="hidden",this.visible=!1},e.prototype.url=function(){return xv(this.options.urlTemplate)(this.urlOptions())},e.prototype.errorUrl=function(){return xv(this.options.errorUrlTemplate)(this.urlOptions())},e.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}},e}(O);Yr(Sv,{urlTemplate:"",errorUrlTemplate:""});var Av=function(t){function e(){t.call(this),this._items=[]}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.get=function(t,e){return this._items.length>=this.options.maxSize&&this._remove(t),this._create(e)},e.prototype.empty=function(){for(var t=this._items,e=0;e<t.length;e++)t[e].destroy();this._items=[]},e.prototype.reset=function(){for(var t=this._items,e=0;e<t.length;e++)t[e].hide()},e.prototype._create=function(t){for(var e,o=this._items,i=Dr(t.point.toString()+t.offset.toString()+t.zoom+t.urlTemplate),r=0;r<o.length;r++)if(o[r].id===i){e=o[r];break}return e?e.show():(e=new Sv(i,t),this._items.push(e)),e},e.prototype._remove=function(t){for(var e=this._items,o=-1,i=-1,r=0;r<e.length;r++){var n=e[r].options.point.distanceTo(t);n>o&&!e[r].visible&&(i=r,o=n)}-1!==i&&(e[i].destroy(),e.splice(i,1))},e}(O);Yr(Av,{maxSize:100});var Pv=Object.assign,Tv=function(t){function e(e,o){t.call(this);var i=this,r=e[0]||e;i.capture=!1;var n=Fy(navigator.userAgent);r.addEventListener?(n.down.split(" ").forEach((function(t){r.addEventListener(t,Uy(i._press,i),!0)})),n.up.split(" ").forEach((function(t){r.addEventListener(t,Uy(i._release,i),!0)}))):(n.down.split(" ").forEach((function(t){r.attachEvent(t,Uy(i._press,i))})),n.up.split(" ").forEach((function(t){r.attachEvent(t,Uy(i._release,i))}))),i.bind(["press","release"],o||{})}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){this.trigger("release"),this.capture&&(t.preventDefault(),this.cancelCapture())},e}(nv),Mv=function(t){function e(e){t.call(this);this.forcedEnabled=!1,Pv(this,e),this.scale=1,this.horizontal?(this.measure="offsetWidth",this.scrollSize="scrollWidth",this.axis="x"):(this.measure="offsetHeight",this.scrollSize="scrollHeight",this.axis="y")}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.makeVirtual=function(){Pv(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.virtual?this._virtualMax:this.getTotal(),o=e*this.scale,i=this.getSize();(0!==e||this.forcedEnabled)&&(this.max=this.virtual?-this._virtualMin:0,this.size=i,this.total=o,this.min=Math.min(this.max,i-o),this.minScale=i/e,this.centerOffset=(o-i)/2,this.enabled=this.forcedEnabled||o>i,t||this.trigger("change",this))},e}(nv),Ov=function(t){function e(e){t.call(this);this.x=new Mv(Pv({horizontal:!0},e)),this.y=new Mv(Pv({horizontal:!1},e)),this.container=e.container,this.forcedMinScale=e.minScale,this.maxScale=e.maxScale||100,this.bind("change",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(){this.x.update(),this.y.update(),this.enabled=this.x.enabled||this.y.enabled,this.minScale=this.forcedMinScale||Math.min(this.x.minScale,this.y.minScale),this.fitScale=Math.max(this.x.minScale,this.y.minScale),this.trigger("change")},e}(nv),Bv=function(t){function e(e){t.call(this),Pv(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.dimension,o=this.axis,i=this.movable,r=i[o]+t;if(e.enabled){var n=t;(r<e.min&&t<0||r>e.max&&t>0)&&(n*=this.resistance),i.translateAxis(o,n),this.trigger("change",this)}},e}(nv),Rv=function(t){function e(e){t.call(this);var o,i,r,n,s=this;Pv(s,{elastic:!0},e),r=s.elastic?.5:0,n=s.movable,s.x=o=new Bv({axis:"x",dimension:s.dimensions.x,resistance:r,movable:n}),s.y=i=new Bv({axis:"y",dimension:s.dimensions.y,resistance:r,movable:n}),s.userEvents.bind(["press","move","end","gesturestart","gesturechange"],{gesturestart:function(t){s.gesture=t,s.offset=zr(s.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 e,r=s.gesture,a=r.center,p=t.center,h=t.distance/r.distance,c=s.dimensions.minScale,l=s.dimensions.maxScale;n.scale<=c&&h<1&&(h+=.8*(1-h)),n.scale*h>=l&&(h=l/n.scale);var u=n.x+s.offset.left,d=n.y+s.offset.top;e={x:(u-a.x)*h+p.x-u,y:(d-a.y)*h+p.y-d},n.scaleWith(h),o.dragMove(e.x),i.dragMove(e.y),s.dimensions.rescale(n.scale),s.gesture=t,t.preventDefault()},move:function(t){t.event.target.tagName.match(/textarea|input/i)||(o.dimension.enabled||i.dimension.enabled?(o.dragMove(t.x.delta),i.dragMove(t.y.delta),t.preventDefault()):t.touch.skip())},end:function(t){t.preventDefault()}})}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(O),Ev=function(t,e,o){return"translate3d("+t+"px,"+e+"px,0) scale("+o+")"},zv=function(t){function e(e){t.call(this);this.support=Ny(),this.transformStyle=this.support.transitions.prefix+"Transform",this.element=e,this.element.style.webkitTransformOrigin="left top",this.x=0,this.y=0,this.scale=1;var o=Ev(this.x,this.y,this.scale);this.element.style[this.transformStyle]=o,this._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){Pv(this,t),this.refresh()},e.prototype.refresh=function(){var t,e=this.x,o=this.y;this.round&&(e=Math.round(e),o=Math.round(o)),(t=Ev(e,o,this.scale))!==this.coordinates&&(this.element.style[this.transformStyle]=t,this._saveCoordinates(t),this.trigger("change"))},e.prototype._saveCoordinates=function(t){this.coordinates=t},e}(nv),Lv=a.Group,Iv=function(t){function e(e,o){t.call(this,e,o),this._pan=Uy(this._pan,this),this.surface=a.Surface.create(this.element,{width:e.scrollElement.clientWidth,height:e.scrollElement.clientHeight}),this._initRoot(),this.movable=new zv(this.surface.element),this._markers=[],this._click=this._handler("shapeClick"),this.surface.bind("click",this._click),this._mouseenter=this._handler("shapeMouseEnter"),this.surface.bind("mouseenter",this._mouseenter),this._mouseleave=this._handler("shapeMouseLeave"),this.surface.bind("mouseleave",this._mouseleave)}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 Lv,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 jv(this.map,this.options.style,this));for(var e=new Lv,o=0;o<t.length;o++){var i=this._loader.parse(t[o]);i&&e.append(i)}this._root.clear(),this._root.append(e)},e.prototype.shapeCreated=function(t){var e=!1;if(t instanceof a.Circle&&this.map.options.renderPointsAsMarkers&&(e=Rr(this._createMarker(t))),!e){var o={layer:this,shape:t};e=this.map.trigger("shapeCreated",o)}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._handler=function(t){var e=this;return function(o){if(o.element){var i={layer:e,layerIndex:(e.map.layers||[]).indexOf(e),shape:o.element,shapeIndex:(e._data||[]).indexOf(o.element.dataItem),originalEvent:o.originalEvent};e.map.trigger(t,i)}}},e.prototype._activate=function(){t.prototype._activate.call(this),this._panHandler=Uy(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}(gv);Yr(Iv,{autoBind:!0,zIndex:100});var jv=function(t){function e(e,o,i){t.call(this),this.observer=i,this.locator=e,this.style=o}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.parse=function(t){var e=new Lv,o=!0;return"Feature"===t.type?(o=!1,this._loadGeometryTo(e,t.geometry,t),this._featureCreated(e,t)):this._loadGeometryTo(e,t,t),o&&e.children.length<2&&(e=e.children[0]),e},e.prototype._shapeCreated=function(t){var e=!1;return this.observer&&this.observer.shapeCreated&&(e=this.observer.shapeCreated(t)),e},e.prototype._featureCreated=function(t,e){this.observer&&this.observer.featureCreated&&this.observer.featureCreated({group:t,dataItem:e,properties:e.properties})},e.prototype._loadGeometryTo=function(t,e,o){var i,r,n=e.coordinates;switch(e.type){case"LineString":r=this._loadPolygon(t,[n],o),this._setLineFill(r);break;case"MultiLineString":for(i=0;i<n.length;i++)r=this._loadPolygon(t,[n[i]],o),this._setLineFill(r);break;case"Polygon":this._loadPolygon(t,n,o);break;case"MultiPolygon":for(i=0;i<n.length;i++)this._loadPolygon(t,n[i],o);break;case"Point":this._loadPoint(t,n,o);break;case"MultiPoint":for(i=0;i<n.length;i++)this._loadPoint(t,n[i],o)}},e.prototype._setLineFill=function(t){var e=t.segments;(e.length<4||!e[0].anchor().equals(Vr(e).anchor()))&&(t.options.fill=null)},e.prototype._loadShape=function(t,e){return this._shapeCreated(e)||t.append(e),e},e.prototype._loadPolygon=function(t,e,o){var i=this._buildPolygon(e);return i.dataItem=o,this._loadShape(t,i)},e.prototype._buildPolygon=function(t){for(var e=new(t.length>1?a.MultiPath:a.Path)(this.style),o=0;o<t.length;o++)for(var i=0;i<t[o].length;i++){var r=this.locator.locationToView(vy.fromLngLat(t[o][i]));0===i?e.moveTo(r.x,r.y):e.lineTo(r.x,r.y)}return e},e.prototype._loadPoint=function(t,e,o){var i=vy.fromLngLat(e),r=this.locator.locationToView(i),n=new p.Circle(r,10),s=new a.Circle(n,this.style);return s.dataItem=o,s.location=i,this._loadShape(t,s)},e}(O),Dv=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,o=gr(e.valueField),i=t.slice(0);i.sort((function(t,e){return o(e)-o(t)}));for(var r,n=this._scaleType(),s=gr(this.options.locationField),a=0;a<i.length;a++){var p=i[a],h=s(p),c=o(p);if(Rr(h)&&Rr(c)){r||(r=new n([0,c],[e.minSize,e.maxSize])),h=vy.create(h);var l=this.map.locationToView(h),u=r.map(c),d=this._createSymbol({center:l,size:u,style:e.style,dataItem:p,location:h});d.dataItem=p,d.location=h,d.value=c,this._drawSymbol(d)}}}},e.prototype._scaleType=function(){var t=this.options.scale;return or(t)?t:Vv[t]},e.prototype._createSymbol=function(t){var e=this.options.symbol;return or(e)||(e=Hv[e]),e(t)},e.prototype._drawSymbol=function(t){var e={layer:this,shape:t};this.map.trigger("shapeCreated",e)||this.surface.draw(t)},e}(Iv);Yr(Dv,{locationField:"location",valueField:"value",minSize:0,maxSize:100,scale:"sqrt",symbol:"circle",zIndex:200});var Vv={sqrt:function(t){function e(e,o){t.call(this),this._domain=e,this._range=o;var i=Math.sqrt(e[1])-Math.sqrt(e[0]),r=o[1]-o[0];this._ratio=r/i}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.map=function(t){var e=(Math.sqrt(t)-Math.sqrt(this._domain[0]))*this._ratio;return this._range[0]+e},e}(O)},Hv={circle:function(t){var e=new p.Circle(t.center,t.size/2);return new a.Circle(e,t.style)},square:function(t){var e=new a.Path(t.style),o=t.size/2,i=t.center;return e.moveTo(i.x-o,i.y-o).lineTo(i.x+o,i.y-o).lineTo(i.x+o,i.y+o).lineTo(i.x-o,i.y+o).close(),e}},Fv=Object.assign,Nv=document,Uv=Math,Gv=function(t){function e(e,o){t.call(this,e,o),this._markerClickHandler=Uy(this._markerClick,this),Gy(this.element,"click",".k-marker",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),Xy(this.element,"click",this._markerClickHandler),this.clear()},e.prototype.add=function(t){if(!A(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 o={marker:t,layer:this};this.map.trigger("markerActivate",o)}},e.prototype._reset=function(){t.prototype._reset.call(this);for(var e=this.items,o=0;o<e.length;o++)this.update(e[o])},e.prototype.bind=function(t,e){var o=Wv.create(t,this.options);o.dataItem=e;var i={marker:o,layer:this};if(!this.map.trigger("markerCreated",i))return this.add(o),o},e.prototype._addOne=function(t){var e=Wv.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=gr(this.options.locationField),o=gr(this.options.titleField),i=0;i<t.length;i++){var r=t[i];this.bind({location:e(r),title:o(r)},r)}},e.prototype._markerClick=function(t){var e=this.map.layers||[],o=t.target._kendoNode,i={layer:this,layerIndex:e.indexOf(this),marker:o,markerIndex:(this.items||[]).indexOf(o),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 Fv({},{layer:this,layerIndex:this.map.layers.indexOf(this),marker:e,markerIndex:(this.items||[]).indexOf(e)},t)},e}(gv);Yr(Gv,{zIndex:1e3,autoBind:!0,locationField:"location",titleField:"title"});var Wv=function(t){function e(e){t.call(this),this.options=e||{}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.destroy=function(){this.layer=null,this.unbindEvents(),this.hide()},e.prototype.addTo=function(t){this.layer=t.markers||t,this.layer.items.push(this),this.layer.update(this)},e.prototype.location=function(t){return t?(this.options.location=vy.create(t).toArray(),this.layer&&this.layer.update(this),this):vy.create(this.options.location)},e.prototype.showAt=function(t){this.render(),this.element.style.left=Dy(Uv.round(t.x)),this.element.style.top=Dy(Uv.round(t.y)),this.tooltip&&this.tooltip.popup&&this.tooltip.popup._position()},e.prototype.hide=function(){this.element&&(this.element.remove(),this.element=null),this.tooltip&&(this.tooltip.destroy(),this.tooltip=null)},e.prototype.bindEvents=function(){this.element&&(this._mouseEnterHandler=Uy(this._mouseEnter,this),Gy(this.element,"mouseenter",".k-marker",this._mouseEnterHandler),this._mouseLeaveHandler=Uy(this._mouseLeave,this),Gy(this.element,"mouseleave",".k-marker",this._mouseLeaveHandler))},e.prototype.unbindEvents=function(){this.element&&(Xy(this.element,"mouseenter",this._mouseEnterHandler),Xy(this.element,"mouseleave",this._mouseLeaveHandler))},e.prototype.render=function(){if(!this.element){var t=this.options,e=this.layer,o=Nv.createElement("span");P(o,"k-marker k-icon k-i-marker-"+jy(t.shape||"pin")),o.setAttribute("title",t.title);var i=t.attributes||{};Object.keys(i).forEach((function(t){o.setAttributett(t,i[t])})),o._kendoNode=this,o.style.zIndex=t.zIndex,this.element=o,e&&e.element.appendChild(this.element),this.bindEvents(),this.renderTooltip()}},e.prototype._mouseEnter=function(t){var e=this._createEventArgs(t);this.layer._markerMouseEnter(e)},e.prototype._mouseLeave=function(t){var e=this._createEventArgs(t);this.layer._markerMouseLeave(e)},e.prototype._createEventArgs=function(t){return{marker:this,originalEvent:t}},e.prototype.renderTooltip=function(){},e.create=function(t,o){return t instanceof e?t:new e(rr({},o,t))},e}(O),qv=Object.assign;function Xv(t){window.requestAnimationFrame(t)}var Yv=function(t){function e(){t.call(this);this._tickProxy=Uy(this._tick,this),this._started=!1}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.tick=function(){},e.prototype.done=function(){},e.prototype.onEnd=function(){},e.prototype.onCancel=function(){},e.prototype.start=function(){this.enabled()&&(this.done()?this.onEnd():(this._started=!0,Xv(this._tickProxy)))},e.prototype.enabled=function(){return!0},e.prototype.cancel=function(){this._started=!1,this.onCancel()},e.prototype._tick=function(){this._started&&(this.tick(),this.done()?(this._started=!1,this.onEnd()):Xv(this._tickProxy))},e}(O),Zv=function(t){function e(e){t.call(this),qv(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,ev()-this.startDate)},e.prototype.moveTo=function(t){var e=this.movable;this.initial=e[this.axis],this.delta=t.location-this.initial,this.duration="number"==typeof t.duration?t.duration:300,this.tick=this._easeProxy(t.ease),this.startDate=ev(),this.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,o,i){return t===i?e+o:o*(1-Math.pow(2,-10*t/i))+e},e}(Yv),Qv=Object.assign,Kv=function(t){t.preventDefault()},$v=800,Jv=0,tg={api:0,touch:0,mouse:9,pointer:9};function eg(t){var e,o,i,r=Ny(),n=[],s=t.originalEvent||t,a=t.currentTarget,p=0;if(t.api)n.push({id:2,event:t,target:t.target,currentTarget:t.target,location:t,type:"api"});else if(t.type.match(/touch/))for(e=(o=s?s.changedTouches:[]).length;p<e;p++)i=o[p],n.push({location:i,event:t,target:i.target,currentTarget:a,id:i.identifier,type:"touch"});else r.pointers||r.msPointers?n.push({location:s,event:t,target:t.target,currentTarget:a,id:s.pointerId,type:"pointer"}):n.push({id:1,event:t,target:t.target,currentTarget:a,location:t,type:"mouse"});return n}var og=function(t){function e(e,o){t.call(this);this.support=Ny(),this.invalidZeroEvents=this.support.mobileOS&&this.support.mobileOS.android,this.axis=e,this._updateLocationData(o),this.startLocation=this.location,this.velocity=this.delta=0,this.timeStamp=ev()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.move=function(t){var e=t["page"+this.axis],o=ev(),i=o-this.timeStamp||1;!e&&this.invalidZeroEvents||(this.delta=e-this.location,this._updateLocationData(t),this.initialDelta=e-this.startLocation,this.velocity=this.delta/i,this.timeStamp=o)},e.prototype._updateLocationData=function(t){var e=this.axis;this.location=t["page"+e],this.client=t["client"+e],this.screen=t["screen"+e]},e}(O),ig=function(t){function e(e,o,i){t.call(this),Qv(this,{x:new og("X",i.location),y:new og("Y",i.location),type:i.type,useClickAsTap:e.useClickAsTap,threshold:e.threshold||tg[i.type],userEvents:e,target:o,currentTarget:i.currentTarget,initialTouch:i.target,id:i.id,pressEvent:i,_clicks:e._clicks,supportDoubleTap:e.supportDoubleTap,_moved:!1,_finished:!1})}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.press=function(){this._holdTimeout=setTimeout(Uy(this._hold,this),this.userEvents.minHold),this._trigger("press",this.pressEvent)},e.prototype._tap=function(t){var e=this;e.userEvents._clicks++,1===e.userEvents._clicks&&(e._clickTimeout=setTimeout((function(){1===e.userEvents._clicks?e._trigger("tap",t):e._trigger("doubleTap",t),e.userEvents._clicks=0}),300))},e.prototype._hold=function(){this._trigger("hold",this.pressEvent)},e.prototype.move=function(t){var e="api"!==t.type&&this.userEvents._shouldNotMove;if(!this._finished&&!e){if(this.x.move(t.location),this.y.move(t.location),!this._moved){if(this._withinIgnoreThreshold())return;if(ng.current&&ng.current!==this.userEvents)return this.dispose();this._start(t)}this._finished||this._trigger("move",t)}},e.prototype.end=function(t){this.endTime=ev(),this._finished||(this._finished=!0,this._trigger("release",t),this._moved?this._trigger("end",t):this.useClickAsTap||(this.supportDoubleTap?this._tap(t):this._trigger("tap",t)),clearTimeout(this._holdTimeout),this.dispose())},e.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)},e.prototype.skip=function(){this.dispose()},e.prototype.cancel=function(){this.dispose()},e.prototype.isMoved=function(){return this._moved},e.prototype._start=function(t){clearTimeout(this._holdTimeout),this.startTime=ev(),this._moved=!0,this._trigger("start",t)},e.prototype._trigger=function(t,e){var o=e.event,i={touch:this,x:this.x,y:this.y,target:this.target,event:o};this.userEvents.notify(t,i)&&o.preventDefault()},e.prototype._withinIgnoreThreshold=function(){var t=this.x.initialDelta,e=this.y.initialDelta;return Math.sqrt(t*t+e*e)<=this.threshold},e}(O);function rg(t){for(var e=Fy(navigator.userAgent).up.split(" "),o=0,i=e.length;o<i;o++)t(e[o])}var ng=function(t){function e(e,o){t.call(this);var i,r=Ny();this.support=r,o=o||{},this.options=o,i=this.filter=o.filter,this.threshold=o.threshold||Jv,this.minHold=o.minHold||$v,this.touches=[],this._maxTouches=o.multiTouch?2:1,this.allowSelection=o.allowSelection,this.captureUpIfMoved=o.captureUpIfMoved,this.useClickAsTap=!o.fastTap&&!r.delayedClick(),this._clicks=0,this.supportDoubleTap=o.supportDoubleTap;var n=!r.touch||r.mouseAndTouchPresent;if(Qv(this,{element:e,surface:o.global&&n?e.ownerDocument.documentElement:o.surface||e,stopPropagation:o.stopPropagation,pressed:!1}),this._surfaceMoveHandler=Uy(this._move,this),Gy(this.surface,Jy("move"),this._surfaceMoveHandler),this._surfaceEndHandler=Uy(this._end,this),Gy(this.surface,Jy("up cancel"),this._surfaceEndHandler),this._elementStartHandler=Uy(this._start,this),Gy(e,Jy("down"),i,this._elementStartHandler),this.useClickAsTap&&(this._elementClickHandler=Uy(this._click,this),Gy(e,Jy("click"),i,this._elementClickHandler)),r.pointers||r.msPointers)if(r.browser.version<11){e.style["-ms-touch-action"]=o.touchAction&&"none"!==o.touchAction?"pinch-zoom double-tap-zoom "+o.touchAction:"pinch-zoom double-tap-zoom"}else e.style["touch-action"]=o.touchAction||"none";if(o.preventDragEvent&&(this._elementDragStartHandler=Kv,Gy(e,Jy("dragstart"),this._elementDragStartHandler)),this._elementSelectHandler=Uy(this._select,this),Gy(e,Jy("mousedown"),i,this._elementSelectHandler),this.captureUpIfMoved&&r.eventCapture){var s=this.surface,a=Uy(this.preventIfMoving,this);rg((function(t){s.addEventListener(t,a,!0)}))}this.bind(["press","hold","tap","doubleTap","start","move","end","release","cancel","gesturestart","gesturechange","gestureend","gesturetap","select"],o)}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,o=this.element;if(!t._destroyed){if(t._destroyed=!0,t.captureUpIfMoved&&this.support.eventCapture){var i=t.surface;rg((function(e){i.removeEventListener(e,t.preventIfMoving)}))}Xy(t.surface,Jy("move"),this._surfaceMoveHandler),Xy(t.surface,Jy("up cancel"),this._surfaceEndHandler),Xy(o,Jy("down"),this._elementStartHandler),t.useClickAsTap&&Xy(o,Jy("click"),this._elementClickHandler),e.preventDragEvent&&Xy(o,Jy("dragstart"),this._elementDragStartHandler),Xy(o,Jy("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("cancel")},e.prototype.notify=function(t,e){var o,i,r,n,s,a,p,h,c=this.touches,l=t;if(this._isMultiTouch()){switch(l){case"move":l="gesturechange";break;case"end":l="gestureend";break;case"tap":l="gesturetap"}Qv(e,{touches:c},(o=c[0],i=c[1],r=o.x.location,n=o.y.location,s=i.x.location,a=i.y.location,p=r-s,h=n-a,{center:{x:(r+s)/2,y:(n+a)/2},distance:Math.sqrt(p*p+h*h)}))}return this.trigger(l,Qv(e,{type:l}))},e.prototype.press=function(t,e,o){this._apiCall("_start",t,e,o)},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 mr(this.touches,(function(t){return t.isMoved()})).length},e.prototype._select=function(t){this.allowSelection&&!this.trigger("select",{event:t})||t.preventDefault()},e.prototype._start=function(t){var o,i,r=0,n=this.filter,s=eg(t),a=s.length,p=t.which;if(!(p&&p>1||this._maxTouchesReached()))for(e.current=null,this.currentTarget=t.currentTarget,this.stopPropagation&&t.stopPropagation();r<a&&!this._maxTouchesReached();r++)i=s[r],(o=n?i.currentTarget:this.element)&&0===o.length||(i=new ig(this,o,i),this.touches.push(i),i.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._click=function(t){var e={touch:{initialTouch:t.target,target:t.currentTarget,endTime:ev(),x:{location:t.pageX,client:t.clientX},y:{location:t.pageY,client:t.clientY}},x:t.pageX,y:t.pageY,target:t.currentTarget,event:t,type:"tap"};this.trigger("tap",e)&&t.preventDefault()},e.prototype._eachTouch=function(t,e){var o,i,r,n,s={},a=eg(e),p=this.touches;for(o=0;o<p.length;o++)s[(i=p[o]).id]=i;for(o=0;o<a.length;o++)(n=s[(r=a[o]).id])&&n[t](r)},e.prototype._apiCall=function(t,e,o,i){this[t]({api:!0,pageX:e,pageY:o,clientX:e,clientY:o,target:i||this.element,stopPropagation:ov,preventDefault:ov})},e.defaultThreshold=function(t){Jv=t},e.minHold=function(t){$v=t},e}(nv),sg=Object.assign,ag=Math.abs,pg=function(t){function e(e){t.call(this,e);sg(this,e),this.userEvents.bind("gestureend",this.start.bind(this)),this.tapCapture.bind("press",this.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}(Yv),hg=function(t){function e(e){t.call(this);var o=this;sg(o,e,{transition:new Zv({axis:e.axis,movable:e.movable,onEnd:function(){o._end()}})}),o.tapCapture.bind("press",(function(){o.cancel()})),o.userEvents.bind("end",Uy(o.start,o)),o.userEvents.bind("gestureend",Uy(o.start,o)),o.userEvents.bind("tap",Uy(o.onEnd,o))}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(){this.paneAxis.outOfBounds()?this._snapBack():this._end()},e.prototype.done=function(){return ag(this.velocity)<1},e.prototype.start=function(e){var o;this.dimension.enabled&&(this.paneAxis.outOfBounds()?this.transition._started?(this.transition.cancel(),this.velocity=Math.min(e.touch[this.axis].velocity*this.velocityMultiplier,55),t.prototype.start.call(this)):this._snapBack():(o=2===e.touch.id?0:e.touch[this.axis].velocity,this.velocity=Math.max(Math.min(o*this.velocityMultiplier,55),-55),this.tapCapture.captureNext(),t.prototype.start.call(this)))},e.prototype.tick=function(){var t=this.dimension,e=this.paneAxis.outOfBounds()?.5:this.friction,o=this.velocity*=e,i=this.movable[this.axis]+o;!this.elastic&&t.outOfBounds(i)&&(i=Math.max(Math.min(i,t.max),t.min),this.velocity=0),this.movable.moveAxis(this.axis,i)},e.prototype._end=function(){this.tapCapture.cancelCapture(),this.end()},e.prototype._snapBack=function(){var t=this.dimension,e=this.movable[this.axis]>t.max?t.max:t.min;this._moveTo(e)},e.prototype._moveTo=function(t){this.transition.moveTo({location:t,duration:500,ease:Zv.easeOutExpo})},e}(Yv),cg=function(t){function e(e){t.call(this,e);sg(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 ag(this.offset.y)<5&&ag(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&&or(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}(Yv),lg=function(t){function e(e){t.call(this);var o="x"===e.axis,i=zy('<div class="km-touch-scrollbar km-'+(o?"horizontal":"vertical")+'-scrollbar" />');sg(this,e,{element:i,elementSize:0,movable:new zv(i),scrollMovable:e.movable,alwaysVisible:e.alwaysVisible,size:o?"width":"height"}),this.scrollMovable.bind("change",this.refresh.bind(this)),this.container.appendChild(i),e.alwaysVisible&&this.show()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.refresh=function(){var t=this.axis,e=this.dimension,o=e.size,i=this.scrollMovable,r=o/e.total,n=Math.round(-i[t]*r),s=Math.round(o*r);this.element.style.display=r>=1?"none":"",n+s>o?s=o-n:n<0&&(s+=n,n=0),this.elementSize!==s&&(this.element.style[this.size]=s+"px",this.elementSize=s),this.movable.moveAxis(t,n)},e.prototype.show=function(){this.element.style.opacity=.7,this.element.style.visibility="visible"},e.prototype.hide=function(){this.alwaysVisible||(this.element.style.opacity=0)},e}(O),ug=function(t){function e(e,o){t.call(this);var i=this;this.element=e,this._initOptions(o);var r,n,s=(r=navigator.userAgent,(n=Vy(r)).ios||n.android);i._native=i.options.useNative&&s;var a=zy('<div class="km-scroll-header"/>');if(i._native)return P(e,"km-native-scroller"),Iy(a,e),void sg(i,{scrollElement:e,fixedContainer:e.children[0]});e.style.overflow="hidden",P(e,"km-scroll-wrapper"),function(t,e){for(t.appendChild(e);t.firstChild!==e;)e.appendChild(t.firstChild)}(e,zy('<div class="km-scroll-container"/>')),Iy(a,e);var p=e.children[1],h=new Tv(e),c=new zv(p),l=new Ov({element:p,container:e,forcedEnabled:i.options.zoom}),u=this.options.avoidScrolling,d=new ng(e,{touchAction:"pan-y",fastTap:!0,allowSelection:!0,preventDragEvent:!0,captureUpIfMoved:!0,multiTouch:i.options.zoom,supportDoubleTap:i.options.supportDoubleTap,start:function(t){l.refresh();var e=ag(t.x.velocity),o=ag(t.y.velocity),r=2*e>=o,n=2*o>=e;!function(t,e){return t===e||function(t,e){if(!e)return!1;for(var o=e.parentNode;null!==o;){if(o===t)return!0;o=o.parentNode}return!1}(t,e)}(i.fixedContainer,t.event.target)&&!u(t)&&i.enabled&&(l.x.enabled&&r||l.y.enabled&&n)?d.capture():d.cancel()}}),f=new Rv({movable:c,dimensions:l,userEvents:d,elastic:i.options.elastic}),y=new pg({movable:c,dimensions:l,userEvents:d,tapCapture:h}),v=new cg({moveTo:function(t){i.scrollTo(t.x,t.y)}});c.bind("change",(function(){i.scrollTop=-c.y,i.scrollLeft=-c.x,i.trigger("scroll",{scrollTop:i.scrollTop,scrollLeft:i.scrollLeft})})),i.options.mousewheelScrolling&&(this._wheelScrollHandler=this._wheelScroll.bind(this),Gy(e,"DOMMouseScroll mousewheel",this._wheelScrollHandler)),sg(i,{movable:c,dimensions:l,zoomSnapBack:y,animatedScroller:v,userEvents:d,pane:f,tapCapture:h,pulled:!1,enabled:!0,scrollElement:p,scrollTop:0,scrollLeft:0,fixedContainer:e.children[0]}),i._initAxis("x"),i._initAxis("y"),i._wheelEnd=function(){i._wheel=!1,i.userEvents.end(0,i._wheelY)},l.refresh(),i.options.pullToRefresh&&i._initPullToRefresh()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._initOptions=function(t){this.options=rr({},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,o=t.originalEvent||t,i=o.wheelDeltaY;return o.wheelDelta?(void 0===i||i)&&(e=o.wheelDelta):o.detail&&o.axis===o.VERTICAL_AXIS&&(e=10*-o.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(ag(t)),this.scrollElement.scrollTop(ag(e))):(this.dimensions.refresh(),this.movable.moveTo({x:t,y:e}))},e.prototype.animatedScrollTo=function(t,e,o){var i,r;this._native?this.scrollTo(t,e):(i={x:this.movable.x,y:this.movable.y},r={x:t,y:e},this.animatedScroller.setCoordinates(i,r),this.animatedScroller.setCallback(o),this.animatedScroller.start())},e.prototype.pullHandled=function(){},e.prototype.destroy=function(){var t=this.element;Xy(t,"DOMMouseScroll mousewheel",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,o=e.movable,i=e.dimensions[t],r=e.tapCapture,n=e.pane[t],s=new lg({axis:t,movable:o,dimension:i,container:e.element,alwaysVisible:e.options.visibleScrollHints});i.bind("change",(function(){s.refresh()})),n.bind("change",(function(){s.show()})),e[t+"inertia"]=new hg({axis:t,paneAxis:n,movable:o,tapCapture:r,userEvents:e.userEvents,dimension:i,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}(nv);Yr(ug,{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"}}),tv(ug,["pull","scroll","resize"]);var dg=function(t,e){void 0===e&&(e={}),this.sender=e.sender||t,this.widget=t,this.rtl=Boolean(e.rtl)};dg.prototype.notify=function(t,e){this.widget&&this.widget.trigger(t,e)};var fg=dg,yg=Math,vg=yg.min,gg=yg.pow,mg=p.Point,xg={bubble:Dv,shape:Iv,tile:Cv};function _g(t){var e=[];if(t)for(var o=jy(t).split("-"),i=0;i<o.length;i++)e.push("k-pos-"+o[i]);return e.join(" ")}xg.marker=Gv;var bg=function(t){function e(e,o,i,r){void 0===o&&(o={}),void 0===i&&(i={}),void 0===r&&(r={}),t.call(this),this._init(e,o,i,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.navigator&&this.navigator.destroy(),this.attribution&&this.attribution.destroy(),this.zoomControl&&this.zoomControl.destroy(),A(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();Xy(this.element,"DOMMouseScroll mousewheel",this._mousewheelHandler),t.prototype.destroy.call(this)},e.prototype._init=function(t,e,o,i){void 0===e&&(e={}),void 0===o&&(o={}),void 0===i&&(i={}),this.support=Ny(),this.context=i,this.initObserver(i),this.initServices(i),this._initOptions(e),this._setEvents(e),this.crs=new Ry,this._initElement(t),this._viewOrigin=this._getOrigin(),this._initScroller(),this._initMarkers(),this._initControls(),this._initLayers(),this._reset(),this._mousewheelHandler=this._mousewheel.bind(this),Gy(this.element,"DOMMouseScroll mousewheel",this._mousewheelHandler)},e.prototype._initOptions=function(t){this.options=rr({},this.options,t)},e.prototype._initElement=function(t){this.element=t,P(t,"k-map"),t.style.position="relative",t.setAttribute("data-role","map"),Ly(t);var e=zy("<div />");this.element.appendChild(e)},e.prototype.initServices=function(t){void 0===t&&(t={}),this.widgetService=new fg(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,o=0;o<e.length;o++)if(e[o].requiresHandlers(t))return!0},e.prototype.trigger=function(e,o){void 0===o&&(o={}),o.sender=this;for(var i=this.observers,r=!1,n=0;n<i.length;n++)i[n].trigger(e,o)&&(r=!0);return r||t.prototype.trigger.call(this,e,o),r},e.prototype._notifyObserver=function(t,e){void 0===e&&(e={}),e.sender=this;for(var o=this.observers,i=!1,r=0;r<o.length;r++)o[r].trigger(t,e)&&(i=!0);return i},e.prototype.zoom=function(t){var e,o=this.options;if(Rr(t)){var i=yg.round(Hr(t,o.minZoom,o.maxZoom));o.zoom!==i&&(o.zoom=i,this._reset()),e=this}else e=o.zoom;return e},e.prototype.center=function(t){var e;return t?(this.options.center=vy.create(t).toArray(),this._reset(),e=this):e=vy.create(this.options.center),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(),Ly(e),this._init(e,t,{},this.context),this._reset()},e.prototype.locationToLayer=function(t,e){var o=!this.options.wraparound,i=vy.create(t);return this.crs.toPoint(i,this._layerSize(e),o)},e.prototype.layerToLocation=function(t,e){var o=!this.options.wraparound,i=mg.create(t);return this.crs.toLocation(i,this._layerSize(e),o)},e.prototype.locationToView=function(t){var e=vy.create(t),o=this.locationToLayer(this._viewOrigin);return this.locationToLayer(e).translateWith(o.scale(-1))},e.prototype.viewToLocation=function(t,e){var o=this.locationToLayer(this._getOrigin(),e),i=mg.create(t).clone().translateWith(o);return this.layerToLocation(i,e)},e.prototype.eventOffset=function(t){var e,o,i=zr(this.element);if(t.x&&t.x.location||t.y&&t.y.location)e=t.x.location-i.left,o=t.y.location-i.top;else{var r=t.originalEvent||t;e=Wr(r.pageX,r.clientX)-i.left,o=Wr(r.pageY,r.clientY)-i.top}return new p.Point(e,o)},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(),o=t.clientWidth;return this.options.wraparound||(o=vg(e,o)),{width:o,height:vg(e,t.clientHeight)}},e.prototype.exportVisual=function(){return this._reset(),!1},e.prototype._setOrigin=function(t,e){var o,i=this.viewSize(),r=this._origin=vy.create(t);return(o=this.locationToLayer(r,e)).x+=i.width/2,o.y+=i.height/2,this.options.center=this.layerToLocation(o,e).toArray(),this},e.prototype._getOrigin=function(t){var e,o=this.viewSize();return!t&&this._origin||((e=this.locationToLayer(this.center())).x-=o.width/2,e.y-=o.height/2,this._origin=this.layerToLocation(e)),this._origin},e.prototype._setExtent=function(t){var e=vv.create(t),o=e.se.clone();this.options.wraparound&&o.lng<0&&t.nw.lng>0&&(o.lng=180+(180+o.lng));var i=new vv(e.nw,o);this.center(i.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(i.nw,r),p=this.locationToLayer(i.se,r),h=yg.abs(p.x-a.x),c=yg.abs(p.y-a.y);if(h<=n&&c<=s)break}this.zoom(r)},e.prototype._getExtent=function(){var t=this._getOrigin(),e=this.locationToLayer(t),o=this.viewSize();e.x+=o.width,e.y+=o.height;var i=this.layerToLocation(e);return new vv(t,i)},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 o=t.position||e,i="."+_g(o).replace(" ","."),r=this.element.querySelector(".k-map-controls"+i)||[];if(0===r.length){var n=document.createElement("div");P(n,"k-map-controls "+_g(o)),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 av(e,t)},e.prototype._createNavigator=function(t){var e=this._createControlElement(t,"topLeft"),o=this.navigator=new cv(e,t);this._navigatorPan=this._navigatorPan.bind(this),o.bind("pan",this._navigatorPan),this._navigatorCenter=this._navigatorCenter.bind(this),o.bind("center",this._navigatorCenter)},e.prototype._navigatorPan=function(t){var e=this.scroller,o=e.scrollLeft+t.x,i=e.scrollTop-t.y,r=this._virtualSize,n=this.element.clientWidth,s=this.element.clientHeight;o=Hr(o,r.x.min,r.x.max-n),i=Hr(i,r.y.min,r.y.max-s),this.scroller.one("scroll",Uy(this._scrollEnd,this)),this.scroller.scrollTo(-o,-i)},e.prototype._navigatorCenter=function(){this.center(this.options.center)},e.prototype._createZoomControl=function(t){var e=this._createControlElement(t,"topLeft"),o=this.zoomControl=new uv(e,t);this._zoomControlChange=this._zoomControlChange.bind(this),o.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,o=this.scroller=new ug(this.element.children[0],{friction:t,velocityMultiplier:5,zoom:e,mousewheelScrolling:!1,supportDoubleTap:!0});o.bind("scroll",Uy(this._scroll,this)),o.bind("scrollEnd",Uy(this._scrollEnd,this)),o.userEvents.bind("gesturestart",Uy(this._scaleStart,this)),o.userEvents.bind("gestureend",Uy(this._scale,this)),o.userEvents.bind("doubleTap",Uy(this._doubleTap,this)),o.userEvents.bind("tap",Uy(this._tap,this)),this.scrollElement=o.scrollElement},e.prototype._initLayers=function(){for(var t=this.options.layers,e=this.layers=[],o=0;o<t.length;o++){var i=t[o],r=this._createLayer(i);e.push(r)}},e.prototype._createLayer=function(t){var e=t.type||"shape",o=this.options.layerDefaults[e],i=rr({},"marker"===e?this.options.markerDefaults:o,t),r=new(0,xg[e])(this,i);return"marker"===e&&(this.markers=r),r},e.prototype._initMarkers=function(){(this.options.layers||[]).filter((function(t){return t&&"marker"===t.type})).length>0||(this.markers=new Gv(this,this.options.markerDefaults),this.markers.add(this.options.markers))},e.prototype._scroll=function(t){var e=this.locationToLayer(this._viewOrigin).round(),o=t.sender.movable,i=new p.Point(o.x,o.y).scale(-1).scale(1/o.scale);e.x+=i.x,e.y+=i.y,this._scrollOffset=i,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=ev(),this.trigger("panEnd",{originalEvent:t,origin:this._getOrigin(),center:this.center()}))},e.prototype._panComplete=function(){return ev()-(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,o=this._scaleToZoom(e),i=new p.Point(t.center.x,t.center.y),r=this.viewToLocation(i,o),n=this.locationToLayer(r,o).translate(-i.x,-i.y);this._zoomAround(n,o),this.trigger("zoomEnd",{originalEvent:t})},e.prototype._scaleToZoom=function(t){var e=this._layerSize()*t/this.options.minSize,o=yg.log(e)/yg.log(2);return yg.round(o)},e.prototype._reset=function(){this.attribution&&this.attribution.filter(this.center(),this.zoom()),this._viewOrigin=this._getOrigin(!0),this._resetScroller(),this.trigger("beforeReset"),this.trigger("reset")},e.prototype._resetScroller=function(){var t=this.scroller,e=t.dimensions.x,o=t.dimensions.y,i=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=gg(2,this.options.minZoom-s),t.dimensions.maxScale=gg(2,this.options.maxZoom-s);var a={min:-n.x,max:i-n.x},p={min:-n.y,max:i-n.y};if(this.options.wraparound&&(a.max=20*i,a.min=-a.max),!1===this.options.pannable){var h=this.viewSize();a.min=p.min=0,a.max=h.width,p.max=h.height}e.makeVirtual(),o.makeVirtual(),e.virtualSize(a.min,a.max),o.virtualSize(p.min,p.max),this._virtualSize={x:a,y:p}},e.prototype._renderLayers=function(){},e.prototype._layerSize=function(t){var e=Wr(t,this.options.zoom);return this.options.minSize*gg(2,e)},e.prototype._tap=function(t){if(this._panComplete()){var e=this.eventOffset(t);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,o=this.eventOffset(t),i=this.viewToLocation(o),r=this.locationToLayer(i,e).translate(-o.x,-o.y);this._zoomAround(r,e),this.trigger("zoomEnd",{originalEvent:t})}},e.prototype._mousewheel=function(t){t.preventDefault();var e=Tr(t)>0?-1:1,o=this.options,i=this.zoom(),r=Hr(i+e,o.minZoom,o.maxZoom);if(!1!==o.zoomable&&r!==i&&!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}(nv);Yr(bg,{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],zoom:3,minSize:256,minZoom:1,maxZoom:19,markers:[],markerDefaults:{shape:"pinTarget",tooltip:{position:"top"}},wraparound:!0,renderPointsAsMarkers:!1}),tv(bg,["beforeReset","click","markerActivate","markerClick","markerCreated","markerMouseEnter","markerMouseLeave","pan","panEnd","reset","shapeClick","shapeCreated","shapeFeatureCreated","shapeMouseEnter","shapeMouseLeave","zoomEnd","zoomStart"]);var wg=bg,Cg="Arial, Helvetica, sans-serif",kg="12px "+Cg,Sg="16px "+Cg,Ag=function(){return{icon:{border:{width:1}},label:{font:kg,padding:3},line:{length:10,width:2},visible:!0}},Pg=function(t){return{visible:!0,labels:{font:"11px Arial, Helvetica, sans-serif"},overlay:t.gradients?{}:{gradient:"none"},area:{highlight:{markers:{border:{}}},line:{opacity:1,width:0},markers:{size:6,visible:!1},opacity:.4},rangeArea:{highlight:{markers:{border:{}}},line:{opacity:1,width:0},markers:{size:6,visible:!1},opacity:.4},verticalRangeArea:{highlight:{markers:{border:{}}},line:{opacity:1,width:0},markers:{size:6,visible:!1},opacity:.4},bar:{gap:1.5,spacing:.4},boxPlot:{outliersField:"",meanField:"",border:{_brightness:.8,width:1},downColor:"#fff",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}},bubble:{border:{width:0},labels:{background:"transparent"},opacity:.6},bullet:{gap:1.5,spacing:.4,target:{color:"#ff0000"}},candlestick:{border:{_brightness:.8,width:1},downColor:"#fff",gap:1,highlight:{border:{opacity:1,width:2},line:{width:2}},line:{color:"#000",width:1},spacing:.3},column:{gap:1.5,spacing:.4},heatmap:{labels:{color:"",background:"transparent",visible:!0},highlight:{border:{width:0}}},pie:{labels:{background:"",color:"",padding:{top:5,bottom:5,left:7,right:7}}},donut:{margin:1},funnel:{labels:{background:"",color:"",padding:{top:5,bottom:5,left:7,right:7}}},horizontalWaterfall:{gap:.5,line:{color:"#000",width:1},spacing:.4},line:{width:2},notes:Ag(),ohlc:{gap:1,highlight:{line:{opacity:1,width:3}},line:{width:1},spacing:.3},radarArea:{line:{opacity:1,width:0},markers:{size:6,visible:!1},opacity:.5},radarLine:{markers:{visible:!1},width:2},polarArea:{line:{opacity:1,width:0},markers:{size:6,visible:!1},opacity:.5},polarLine:{markers:{visible:!1},width:2},rangeBar:{gap:1.5,spacing:.4},rangeColumn:{gap:1.5,spacing:.4},scatterLine:{width:1},verticalArea:{highlight:{markers:{border:{}}},line:{opacity:1,width:0},markers:{size:6,visible:!1},opacity:.4},verticalBoxPlot:{outliersField:"",meanField:"",border:{_brightness:.8,width:1},downColor:"#fff",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}},verticalBullet:{gap:1.5,spacing:.4,target:{color:"#ff0000"}},verticalLine:{width:2},waterfall:{gap:.5,line:{color:"#000",width:1},spacing:.4}}},Tg=function(t){return void 0===t&&(t={}),{axisDefaults:{labels:{font:kg},notes:Ag(),title:{font:Sg,margin:5}},categoryAxis:{majorGridLines:{visible:!0}},navigator:{pane:{height:90,margin:{top:10}}},seriesDefaults:Pg(t),title:{font:Sg},legend:{labels:{font:kg}}}}}})}));
|