@progress/kendo-react-barcodes 5.1.0-dev.202202221154 → 5.1.0-dev.202202240928

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.
@@ -1 +1 @@
1
- !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("@progress/kendo-drawing"),require("react"),require("prop-types"),require("@progress/kendo-licensing")):"function"==typeof define&&define.amd?define(["@progress/kendo-drawing","react","prop-types","@progress/kendo-licensing"],e):"object"==typeof exports?exports.KendoReactBarcodes=e(require("@progress/kendo-drawing"),require("react"),require("prop-types"),require("@progress/kendo-licensing")):t.KendoReactBarcodes=e(t.KendoDrawing,t.React,t.PropTypes,t.KendoLicensing)}(window,(function(t,e,o,r){return function(t){var e={};function o(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,o),i.l=!0,i.exports}return o.m=t,o.c=e,o.d=function(t,e,r){o.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},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 r=Object.create(null);if(o.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)o.d(r,i,function(e){return t[e]}.bind(null,i));return r},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=8)}([function(e,o){e.exports=t},function(t,o){t.exports=e},function(t,e){t.exports=o},function(t,e,o){"use strict";o.r(e),o.d(e,"ZIndexContext",(function(){return i})),o.d(e,"useZIndexContext",(function(){return n})),o.d(e,"BrowserSupportService",(function(){return a})),o.d(e,"canUseDOM",(function(){return p})),o.d(e,"canUseRef",(function(){return l})),o.d(e,"classNames",(function(){return h})),o.d(e,"cloneDate",(function(){return c})),o.d(e,"clone",(function(){return u})),o.d(e,"cloneObject",(function(){return d})),o.d(e,"cloneValue",(function(){return f})),o.d(e,"cloneArray",(function(){return g})),o.d(e,"focusFirstFocusableChild",(function(){return y})),o.d(e,"FormComponent",(function(){return v})),o.d(e,"getTabIndex",(function(){return m})),o.d(e,"getter",(function(){return _})),o.d(e,"guid",(function(){return C})),o.d(e,"Keys",(function(){return k})),o.d(e,"noop",(function(){return S})),o.d(e,"getScrollbarWidth",(function(){return A})),o.d(e,"setScrollbarWidth",(function(){return P})),o.d(e,"setter",(function(){return T})),o.d(e,"mapTree",(function(){return I})),o.d(e,"mapTreeItem",(function(){return L})),o.d(e,"extendDataItem",(function(){return E})),o.d(e,"getItemPath",(function(){return D})),o.d(e,"validatePackage",(function(){return V})),o.d(e,"hasRelativeStackingContext",(function(){return z})),o.d(e,"dispatchEvent",(function(){return U})),o.d(e,"AsyncFocusBlur",(function(){return N})),o.d(e,"createPropsContext",(function(){return X})),o.d(e,"withPropsContext",(function(){return Y})),o.d(e,"useDir",(function(){return q})),o.d(e,"useAsyncFocusBlur",(function(){return H})),o.d(e,"useRtl",(function(){return Q})),o.d(e,"useMouse",(function(){return K})),o.d(e,"useCustomComponent",(function(){return $})),o.d(e,"usePropsContext",(function(){return G})),o.d(e,"COLLECTION_ACTION",(function(){return Z})),o.d(e,"useCollection",(function(){return J})),o.d(e,"Icon",(function(){return it})),o.d(e,"SvgIcon",(function(){return pt})),o.d(e,"Typography",(function(){return wt})),o.d(e,"DragAndDrop",(function(){return Mt})),o.d(e,"Draggable",(function(){return Ht})),o.d(e,"Droppable",(function(){return Nt})),o.d(e,"useDraggable",(function(){return Ut})),o.d(e,"useDroppable",(function(){return Ft})),o.d(e,"kendoThemeMaps",(function(){return Gt}));var r=o(1),i=r.createContext(0),n=function(){return r.useContext(i)};i.displayName="KendoReactZIndexContext";var s=function(){return"undefined"!=typeof document?document:{}},a=function(){function t(){}return Object.defineProperty(t.prototype,"scrollbarWidth",{get:function(){var t=s();if(!this.scrollbar&&t&&t.createElement){var e=t.createElement("div");e.style.cssText="overflow:scroll;overflow-x:hidden;zoom:1;clear:both;display:block",e.innerHTML="&nbsp;",t.body.appendChild(e),this.scrollbar=e.offsetWidth-e.scrollWidth,t.body.removeChild(e)}return this.scrollbar},enumerable:!0,configurable:!0}),t}(),p=Boolean("undefined"!=typeof window&&window.document&&window.document.createElement),l=function(t){return"string"!=typeof Comment&&(function(t){return Boolean("function"==typeof t&&!!t.prototype.isReactComponent)}(t)||function(t){return Boolean(t.$$typeof&&"function"==typeof t.render)}(t))},h=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var o={},r=function(t){return"object"==typeof t?Object.keys(t).forEach((function(e){o[e]=t[e]})):o[t]=!0},i=function(t){return t.filter((function(t){return!0!==t&&!!t})).map((function(t){return Array.isArray(t)?i(t):r(t)}))};return i(t),Object.keys(o).map((function(t){return o[t]&&t||null})).filter((function(t){return null!==t})).join(" ")},c=function(t){return t?new Date(t.getTime()):null};function u(t){var e={};return d(t,e),e}function d(t,e){for(var o in t)if(t.hasOwnProperty(o)){var r=t[o];e[o]=f(r,e[o])}}function f(t,e){if(Array.isArray(t))return g(t);if(t instanceof Date)return c(t);if(r.isValidElement(t))return r.cloneElement(t,t.props);if(t&&"object"==typeof t){var o=e||{};return d(t,o),o}return t}function g(t){return t.map((function(t){return f(t,void 0)}))}var y=function(t){if(t){if((t instanceof HTMLInputElement||-1!==t.tabIndex)&&t.focus)return void t.focus();var e=t.querySelector('input, [tabindex]:not([tabindex="-1"])');e&&e.focus&&e.focus()}},v=function(){},m=function(t,e,o){var r="string"==typeof t?parseInt(t,void 0):t;if(NaN!==r)return void 0!==r?r:e?o?void 0:-1:0},x=/\[(?:(\d+)|['"](.*?)['"])\]|((?:(?!\[.*?\]|\.).)+)/g;function b(t){var e=[];return t.replace(x,(function(t,o,r,i){e.push(void 0!==o?o:r||i)})),e}var w={};function _(t){if(w[t])return w[t];var e=b(t);return w[t]=function(t){for(var o=t,r=0;r<e.length&&o;r++)o=o[e[r]];return o},w[t]}w.undefined=function(){};var C=function(){var t,e,o="";for(t=0;t<32;t++)e=16*Math.random()|0,8!==t&&12!==t&&16!==t&&20!==t||(o+="-"),o+=(12===t?4:16===t?3&e|8:e).toString(16);return o},k={backspace:8,tab:9,enter:13,shift:16,esc:27,space:32,pageUp:33,pageDown:34,end:35,home:36,left:37,up:38,right:39,down:40,delete:46},S=function(){},A=function(){return!(!p||!document.body)&&(new a).scrollbarWidth},P=function(){if(!p||!document.body)return!1;var t=(new a).scrollbarWidth;document.body.style.setProperty("--kendo-scrollbar-width",t+"px")},M={undefined:function(t){return t}},O=function(t,e){return e&&e.arrays&&!isNaN(Number(t))?[]:{}};function T(t){if(M[t])return M[t];var e=b(t);return M[t]=function(t,o,r){for(var i=t,n=e.length-1,s=0;s<n&&i;s++)i=i[e[s]]=i[e[s]]||O(e[s+1],r);i[e[n]]=o},M[t]}var B=function(){return(B=Object.assign||function(t){for(var e,o=1,r=arguments.length;o<r;o++)for(var i in e=arguments[o])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};function R(t,e,o){var r;return o?B({},t,((r={})[e]=o.length?o.slice():void 0,r)):t&&t[e]?t[e].slice():[]}var I=function(t,e,o){return t.map((function(t){return function t(e,o,r){if(e[o]){var i=R(e,o).map((function(e){return t(e,o,r)}));return r(R(e,o,i))}return r(e)}(t,e,o)})).slice()},L=function(t,e,o,r){for(var i=t,n=[],s=0;s<e.length;s++)i=i[e[s]],i=Array.isArray(i)?i:i[o],n.push(i);var a=n.length>1?n[n.length-2]:t,p=e[e.length-1],l=r(a[p]);a.splice(p,1,l)},E=function(t,e,o){var r;return Object.assign({},t,t[e]?((r={})[e]=t[e].slice(),r):{},o||{})},D=function(t,e,o){var r=[],i=e.slice();if(i.length){var n=t[i.shift()||0];for(r.push(n);i.length&&o;)n=n[o][i.shift()||0],r.push(n)}return r},j=o(4);function V(t){if(void 0!==j)j.validatePackage(t);else{var e="License activation failed for "+t.name+"\n";e+="The @progress/kendo-licensing script is not loaded.\n",e+="See "+t.licensingDocsUrl+" for more information.\n",console.warn(e)}}var z=function(t){if(!p)return!1;var e=t?t.ownerDocument:document;if(!e||!e.body)return!1;var o=e.createElement("div");o.style.transform="matrix(10, 0, 0, 10, 0, 0)",o.innerHTML='<div style="position: fixed; top: 10px;">child</div>',e.body.appendChild(o);var r=10!==o.children[0].getBoundingClientRect().top;return e.body.removeChild(o),r};function U(t,e,o,r){if(t){var i={syntheticEvent:e,nativeEvent:e.nativeEvent,target:o};t.call(void 0,Object.assign(i,r))}}function H(t){var e=t.onFocus,o=t.onBlur,i=t.onSyncFocus,n=t.onSyncBlur,s=r.useRef(!1),a=r.useRef(0),p=r.useCallback((function(t){clearTimeout(a.current),a.current=window.setTimeout((function(){return t()}))}),[a]),l=r.useCallback((function(){for(var t=[],o=0;o<arguments.length;o++)t[o]=arguments[o];clearTimeout(a.current),i&&i.call.apply(i,[void 0].concat(t)),s.current||(s.current=!0,e&&e.call.apply(e,[void 0].concat(t)))}),[s,e,i]),h=r.useCallback((function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];n&&n.call.apply(n,[void 0].concat(t)),p((function(){s.current&&o&&(s.current=!1,o.call.apply(o,[void 0].concat(t)))}))}),[s,p,o,n]);return r.useEffect((function(){return function(){clearTimeout(a.current)}}),[]),{onFocus:l,onBlur:h}}var F=function(){return(F=Object.assign||function(t){for(var e,o=1,r=arguments.length;o<r;o++)for(var i in e=arguments[o])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},N=function(t){var e=t.children,o=H({onFocus:t.onFocus,onBlur:t.onBlur,onSyncFocus:t.onSyncFocus,onSyncBlur:t.onSyncBlur});return e.call(void 0,F({},o))},G=function(t,e){return r.useContext(t)(e)},W=function(){return(W=Object.assign||function(t){for(var e,o=1,r=arguments.length;o<r;o++)for(var i in e=arguments[o])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},X=function(){return r.createContext((function(t){return t}))},Y=function(t,e){return r.forwardRef((function(o,i){var n=G(t,o);return r.createElement(e,W({},n,{ref:i}))}))};function q(t,e,o){var i=r.useState(e),n=i[0],s=i[1];return r.useEffect((function(){if(!n&&window&&t.current){var e=window.getComputedStyle(t.current).direction;e&&s(e)}}),o),n}function Q(t,e,o){var i=r.useState(e),n=i[0],s=i[1];return r.useEffect((function(){if(!n&&window&&t.current){var e=window.getComputedStyle(t.current).direction;e&&s(e)}}),o),n}var Z,K=function(t,e,o){void 0===o&&(o={});var i=r.useCallback((function(r){o.onMouseDown&&o.onMouseDown.call(void 0,r),t.onMouseDown&&t.onMouseDown.call(void 0,{target:e.current,syntheticEvent:r})}),[o.onMouseDown,t.onMouseDown,e]),n=r.useCallback((function(r){o.onMouseUp&&o.onMouseUp.call(void 0,r),t.onMouseUp&&t.onMouseUp.call(void 0,{target:e.current,syntheticEvent:r})}),[o.onMouseUp,t.onMouseUp,e]);return{onClick:r.useCallback((function(r){o.onClick&&o.onClick.call(void 0,r),t.onClick&&t.onClick.call(void 0,{target:e.current,syntheticEvent:r})}),[o.onClick,t.onClick,e]),onMouseUp:n,onMouseDown:i,onDoubleClick:r.useCallback((function(r){o.onDoubleClick&&o.onDoubleClick.call(void 0,r),t.onDoubleClick&&t.onDoubleClick.call(void 0,{target:e.current,syntheticEvent:r})}),[o.onDoubleClick,t.onDoubleClick,e]),onMouseEnter:r.useCallback((function(r){o.onMouseEnter&&o.onMouseEnter.call(void 0,r),t.onMouseEnter&&t.onMouseEnter.call(void 0,{target:e.current,syntheticEvent:r})}),[o.onMouseEnter,t.onMouseEnter,e]),onMouseLeave:r.useCallback((function(r){o.onMouseLeave&&o.onMouseLeave.call(void 0,r),t.onMouseLeave&&t.onMouseLeave.call(void 0,{target:e.current,syntheticEvent:r})}),[o.onMouseLeave,t.onMouseLeave,e]),onMouseMove:r.useCallback((function(r){o.onMouseMove&&o.onMouseMove.call(void 0,r),t.onMouseMove&&t.onMouseMove.call(void 0,{target:e.current,syntheticEvent:r})}),[o.onMouseMove,t.onMouseMove,e]),onMouseOut:r.useCallback((function(r){o.onMouseOut&&o.onMouseOut.call(void 0,r),t.onMouseOut&&t.onMouseOut.call(void 0,{target:e.current,syntheticEvent:r})}),[o.onMouseOut,t.onMouseOut,e]),onMouseOver:r.useCallback((function(r){o.onMouseOver&&o.onMouseOver.call(void 0,r),t.onMouseOver&&t.onMouseOver.call(void 0,{target:e.current,syntheticEvent:r})}),[o.onMouseOver,t.onMouseOver,e])}},$=function(t){return r.isValidElement(t)?[t.type,t.props]:[t,{}]};!function(t){t[t.add=0]="add",t[t.remove=1]="remove"}(Z||(Z={}));var J=function(t){void 0===t&&(t=[]);var e=r.useRef(t),o=r.useCallback((function(t){switch(t.type){case Z.add:e.current.push(t.item);break;case Z.remove:var o=e.current.indexOf(t.item);e.current.splice(o,1)}}),[]);return[e.current,o]},tt=o(2),et={default:"",xsmall:"k-icon-xs",small:"k-icon-sm",medium:"k-icon-md",large:"k-icon-lg",xlarge:"k-icon-xl"},ot=function(){return(ot=Object.assign||function(t){for(var e,o=1,r=arguments.length;o<r;o++)for(var i in e=arguments[o])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},rt=function(t,e){var o={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(o[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&(o[r[i]]=t[r[i]])}return o},it=r.forwardRef((function(t,e){var o=t.className,i=t.name,n=t.themeColor,s=t.size,a=t.flip,p=t.style,l=rt(t,["className","name","themeColor","size","flip","style"]),c=r.useRef(null),u=r.useRef(null);r.useImperativeHandle(c,(function(){return{element:u.current}})),r.useImperativeHandle(e,(function(){return c.current}));var d=r.useMemo((function(){return n||nt.themeColor}),[n]),f=r.useMemo((function(){return s||nt.size}),[s]),g=r.useMemo((function(){return a||nt.flip}),[a]),y=r.useMemo((function(){return h("k-icon","k-i-"+i,"k-color-"+d,{"k-flip-h":"horizontal"===g||"both"===g,"k-flip-v":"vertical"===g||"both"===g},et[f],o)}),[i,d,f,g,o]),v=K(t,c);return r.createElement("span",ot({ref:u},l,v,{className:y,style:p,role:"presentation"}))}));it.propTypes={style:tt.object,classNames:tt.string,name:tt.string,themeColor:tt.oneOf(["inherit","primary","secondary","tertiary","info","success","error","warning","dark","light","inverse"]),size:tt.oneOf(["default","xsmall","small","medium","large","xlarge"]),flip:tt.oneOf(["default","horizontal","vertical","both"])};var nt={size:"default",themeColor:"inherit",flip:"default"};it.displayName="KendoIcon";var st=function(){return(st=Object.assign||function(t){for(var e,o=1,r=arguments.length;o<r;o++)for(var i in e=arguments[o])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},at=function(t,e){var o={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(o[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&(o[r[i]]=t[r[i]])}return o},pt=r.forwardRef((function(t,e){var o=t.children,i=t.className,n=t.svgClassName,s=t.icon,a=t.flip,p=t.size,l=t.style,c=t.svgStyle,u=t.themeColor,d=t.viewBox,f=at(t,["children","className","svgClassName","icon","flip","size","style","svgStyle","themeColor","viewBox"]),g=r.useRef(null);r.useImperativeHandle(e,(function(){return{element:g.current}}));var y=r.useMemo((function(){return s?s.name:lt.icon}),[s]),v=r.useMemo((function(){return u||lt.themeColor}),[u]),m=r.useMemo((function(){return p||lt.size}),[p]),x=r.useMemo((function(){return a||lt.flip}),[a]),b=r.useMemo((function(){return d||lt.viewBox}),[d]),w=r.useMemo((function(){return h("k-svg-icon","k-color-"+v,"k-svg-i-"+y,{"k-flip-h":"horizontal"===x||"both"===x,"k-flip-v":"vertical"===x||"both"===x},et[m],i)}),[y,v,m,x,i]),_=r.useMemo((function(){return t.width&&t.height?st({width:t.width,height:t.height},l):t.width?st({width:t.width,height:t.width},l):t.height?st({width:t.height,height:t.height},l):st({},l)}),[t.width,t.height,l]);return r.createElement("span",{className:w,style:_,ref:g},r.createElement("svg",st({className:n,style:c,"aria-hidden":!0,focusable:"false",xmlns:"http://www.w3.org/2000/svg",viewBox:s?s.viewBox:b,dangerouslySetInnerHTML:s?{__html:s.content}:void 0},f),s?void 0:o))}));pt.propTypes={style:tt.object,classNames:tt.string,children:tt.any,icon:tt.object,themeColor:tt.oneOf(["inherit","primary","secondary","tertiary","info","success","error","warning","dark","light","inverse"]),size:tt.oneOf(["default","xsmall","small","medium","large","xlarge"]),flip:tt.oneOf(["default","horizontal","vertical","both"])};var lt={size:"default",themeColor:"inherit",flip:"default",icon:"",viewBox:"0 0 24 24"};pt.displayName="KendoSvgIcon";var ht={xsmall:"k-fs-xs",small:"k-fs-sm",medium:"k-fs-md",large:"k-fs-lg",xlarge:"k-fs-xl"},ct={light:"k-font-weight-light",normal:"k-font-weight-normal",bold:"k-font-weight-bold"},ut={xsmall:"k-m-xs",small:"k-m-sm",medium:"k-m-md",large:"k-m-lg",xlarge:"k-m-xl",thin:"k-m-thin",hair:"k-m-hair"},dt={xsmall:"xs",small:"sm",medium:"md",large:"lg",xlarge:"xl",thin:"thin",hair:"hair"},ft={top:"k-mt-",right:"k-mr-",bottom:"k-mb-",left:"k-ml-"},gt={left:"k-text-left",right:"k-text-right",center:"k-text-center",justify:"k-text-justify"},yt={lowercase:"k-text-lowercase",uppercase:"k-text-uppercase",capitalize:"k-text-capitalize"},vt={inherit:"k-color-inherit",primary:"k-color-primary",secondary:"k-color-secondary",tertiary:"k-color-tertiary",info:"k-color-info",success:"k-color-success",warning:"k-color-warning",error:"k-color-error",dark:"k-color-dark",light:"k-color-light",inverse:"k-color-inverse"},mt=function(){return(mt=Object.assign||function(t){for(var e,o=1,r=arguments.length;o<r;o++)for(var i in e=arguments[o])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},xt=function(t,e){var o={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(o[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&(o[r[i]]=t[r[i]])}return o},bt=function(t){var e=r.forwardRef((function(e,o){var i=e.className,n=e.fontSize,s=e.fontWeight,a=e.textAlign,p=e.textTransform,l=e.themeColor,h=e.margin,c=xt(e,["className","fontSize","fontWeight","textAlign","textTransform","themeColor","margin"]),u=r.useRef(null),d=r.useRef(null);r.useImperativeHandle(u,(function(){return{element:d.current,props:e}})),r.useImperativeHandle(o,(function(){return u.current}));var f=t,g=function(){if(void 0!==h){if("string"==typeof h)return[ut[h]];if("number"==typeof h&&h>=0&&h<=24)return["k-m-"+h];if("object"==typeof h){var t=[];return Object.keys(h).forEach((function(e){var o,r;null!==h[e]&&void 0!==h[e]&&t.push((o=e,r=h[e],""+ft[o]+("string"==typeof r?dt[r]:r)))})),t.join(" ")}}};return r.createElement(f,mt({ref:d,className:["k-"+("p"===t?"paragraph":t),ht[n],ct[s],gt[a],yt[p],vt[l],g(),i].filter((function(t){return void 0!==t})).join(" ")},c),e.children)}));return e.propTypes={style:tt.object,className:tt.string,fontSize:tt.oneOf(["xsmall","small","medium","large","xlarge"]),fontWeight:tt.oneOf(["light","normal","bold"]),margin:tt.oneOfType([tt.number,tt.object,tt.oneOf(["xsmall","small","medium","large","xlarge","thin","hair"])]),textAlign:tt.oneOf(["left","right","center","justify"]),textTransform:tt.oneOf(["lowercase","uppercase","capitalize"]),themeColor:tt.oneOf(["inherit","primary","secondary","tertiary","info","success","error","warning","dark","light","inverse"])},e.displayName="KendoReactTypography"+t.toUpperCase(),e},wt={h1:bt("h1"),h2:bt("h2"),h3:bt("h3"),h4:bt("h4"),h5:bt("h5"),h6:bt("h6"),p:bt("p"),code:bt("code"),pre:bt("pre")},_t=function(){return(_t=Object.assign||function(t){for(var e,o=1,r=arguments.length;o<r;o++)for(var i in e=arguments[o])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},Ct=function(t,e,o){var i=r.useState(e||t),n=i[0],s=i[1];return[void 0!==e?e:n,r.useCallback((function(t,e){s(t),o&&o.call(void 0,_t({},e,{value:t}))}),[o,s])]},kt=r.createContext([void 0,S]),St=r.createContext([void 0,S]),At=r.createContext([[],S,S]),Pt=r.createContext([[],S,S]),Mt=function(t){var e=Ct(null,void 0),o=e[0],i=e[1],n=Ct(null,void 0),s=n[0],a=n[1],p=J([]),l=p[0],h=p[1],c=J([]),u=c[0],d=c[1];return r.createElement(kt.Provider,{value:[o,i]},r.createElement(St.Provider,{value:[s,a]},r.createElement(At.Provider,{value:[l,function(t){h({type:Z.add,item:t})},function(t){h({type:Z.remove,item:t})}]},r.createElement(Pt.Provider,{value:[u,function(t){d({type:Z.add,item:t})},function(t){d({type:Z.remove,item:t})}]},t.children))))};Mt.displayName="KendoReactDragAndDrop";var Ot,Tt=function(t,e){var o=0,r=null;return e.forEach((function(e){if(e&&t){var i=function(t,e){var o=t.getBoundingClientRect(),r=e.getBoundingClientRect(),i=Math.max(r.top,o.top),n=Math.max(r.left,o.left),s=Math.min(r.left+r.width,o.left+o.width),a=Math.min(r.top+r.height,o.top+o.height),p=s-n,l=a-i;if(n<s&&i<a){var h=r.width*r.height,c=o.width*o.height,u=p*l;return Number((u/(h+c-u)).toFixed(4))}return 0}(t,e);i>o&&(o=i,r=e)}})),r},Bt=function(){var t=window&&window.navigator.userAgent;if(!t)return!1;var e=!1,o=[],r={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 i in r)if(r.hasOwnProperty(i)&&(o=t.match(r[i]))){(e={})[i]=!0,e[o[1].toLowerCase().split(" ")[0].split("/")[0]]=!0,e.version=parseInt(document.DOCUMENT_NODE||o[2],10);break}return e},Rt=function(t){return t&&t.ownerDocument||window.document},It=function(t){var e=Bt(),o=Rt(t);return e.edge||e.safari?o.body:o.documentElement},Lt=function(t){if(t&&t.className&&"string"==typeof t.className&&t.className.indexOf("k-auto-scrollable")>-1)return!0;var e=window.getComputedStyle(t,"overflow").overflow;return e.indexOf("auto")>-1||e.indexOf("scroll")>-1},Et=function(t){var e=It(t);if(!t||t===document.body||t===document.documentElement)return e;for(var o=t;o&&!Lt(o)&&o!==document.body;)o=o.parentNode;return o===document.body?e:o};!function(t){t.POINTER_DOWN="pointerdown",t.POINTER_MOVE="pointermove",t.POINTER_UP="pointerup",t.POINTER_CANCEL="pointercancel",t.MOUSE_DOWN="mousedown",t.MOUSE_MOVE="mousemove",t.MOUSE_UP="mouseup",t.CONTEXT_MENU="contextmenu",t.TOUCH_START="touchstart",t.TOUCH_MOVE="touchmove",t.TOUCH_END="touchend",t.TOUCH_CANCEL="touchcancel",t.SCROLL="scroll",t.START="KENDO_DRAG_AND_DROP_START",t.MOVE="KENDO_DRAG_AND_DROP_MOVE",t.END="KENDO_DRAG_AND_DROP_END",t.CANCEL="KENDO_DRAG_AND_DROP_CANCEL"}(Ot||(Ot={}));var Dt=function(){},jt=function(t,e,o){void 0===o&&(o={});var r,i,n,s,a=o.onIsPressedChange,p=void 0===a?Dt:a,l=o.onIsScrollingChange,h=void 0===l?Dt:l,c=o.onVelocityChange,u=void 0===c?Dt:c,d=o.onOffsetChange,f=void 0===d?Dt:d,g=o.onPageOffsetChange,y=void 0===g?Dt:g,v=o.onClientOffsetChange,m=void 0===v?Dt:v,x=o.onScrollOffsetChange,b=void 0===x?Dt:x,w=o.onInitialScrollOffsetChange,_=void 0===w?Dt:w,C=e.payload,k=C.element,S=C.hint,A=t.autoScrollDirection,P=t.scrollableParent,M=function(t,e){return function(t){return/^touch/.test(t.type)}(t)?{pageX:t.changedTouches[0].pageX,pageY:t.changedTouches[0].pageY,clientX:t.changedTouches[0].clientX,clientY:t.changedTouches[0].clientY,scrollX:e.scrollOffset.x,scrollY:e.scrollOffset.y,offsetX:e.offset.x,offsetY:e.offset.y,type:t.type,originalEvent:t,isTouch:!0,altKey:!1,ctrlKey:!1,shiftKey:!1,metaKey:!1}:function(t){return/^(scroll)/.test(t.type)}(t)?{pageX:e.pageOffset.x,pageY:e.pageOffset.y,clientX:e.clientOffset.x,clientY:e.clientOffset.y,scrollX:e.scrollOffset.x,scrollY:e.scrollOffset.y,offsetX:e.offset.x,offsetY:e.offset.y,type:t.type,originalEvent:t,altKey:!1,ctrlKey:!1,shiftKey:!1,metaKey:!1}:{pageX:t.pageX,pageY:t.pageY,clientX:t.clientX,clientY:t.clientY,offsetX:t.offsetX,offsetY:t.offsetY,scrollX:e.scrollOffset.x,scrollY:e.scrollOffset.y,type:t.type,ctrlKey:t.ctrlKey,shiftKey:t.shiftKey,altKey:t.altKey,metaKey:t.metaKey,originalEvent:t}}(e.event,t);switch(M.type){case Ot.POINTER_DOWN:if(M.type===Ot.POINTER_DOWN&&(!M.originalEvent.isPrimary||0!==M.originalEvent.button))break;case Ot.MOUSE_DOWN:if(M.type===Ot.MOUSE_DOWN&&M.originalEvent.which&&M.originalEvent.which>1||t.ignoreMouse)break;case Ot.TOUCH_START:if(M.type===Ot.TOUCH_START&&1!==M.originalEvent.touches.length)break;case Ot.START:var O=P||Et(e.payload.element);_(O instanceof Window?{x:O.scrollX,y:O.scrollY}:{x:O.scrollLeft,y:O.scrollTop}),m({x:M.clientX,y:M.clientY}),y({x:M.pageX,y:M.pageY}),f({x:M.offsetX,y:M.offsetY}),p(!0),C.onPress&&C.onPress(M);break;case Ot.SCROLL:if(M.type===Ot.SCROLL&&!t.pressed)break;var T=P||Et(k),B=T instanceof Window?{x:T.scrollX,y:T.scrollY}:{x:T.scrollLeft,y:T.scrollTop};M.scrollX=B.x-t.initialScrollOffset.x,M.scrollY=B.y-t.initialScrollOffset.y,b({x:M.scrollX,y:M.scrollY});case Ot.POINTER_MOVE:if(M.type===Ot.POINTER_MOVE&&!M.originalEvent.isPrimary)break;case Ot.MOUSE_MOVE:case Ot.TOUCH_MOVE:if(M.type===Ot.TOUCH_MOVE&&1!==M.originalEvent.touches.length)break;case Ot.MOVE:if(t.pressed){if(t.autoScroll&&"scroll"!==M.originalEvent.type&&k){var R=Rt(k),I=P||Et(R.elementFromPoint(M.clientX,M.clientY)),L=function(t,e,o){var r={x:0,y:0};return t-o.left<50?r.x=-(50-(t-o.left)):o.right-t<50&&(r.x=50-(o.right-t)),e-o.top<50?r.y=-(50-(e-o.top)):o.bottom-e<50&&(r.y=50-(o.bottom-e)),r}(M.pageX,M.pageY,function(t,e){var o=It(t);if(t===o)return{top:o.scrollTop,left:o.scrollLeft,bottom:o.scrollTop+e.innerHeight,right:o.scrollLeft+e.innerWidth};var r=t.getBoundingClientRect();return{bottom:r.top+r.height,right:r.left+r.width,left:r.left,top:r.top}}(I,function(t){var e=Rt(t);return e&&e.defaultView||window}(k)));u({x:A&&!1===A.horizontal?0:L.x,y:A&&!1===A.vertical?0:L.y}),h(0!==L.y||0!==L.x)}!t.drag&&C.onDragStart&&C.onDragStart(M),C.onDrag&&C.onDrag(M);var E=Tt(S||k,t.drops.map((function(t){return t&&t.element})).filter((function(t){return t!==(S||k)}))),D=t.drops.find((function(t){return t.element===E}));D&&E&&(r=M.clientX,i=M.clientY,n=P||Et(E),(s=n.getBoundingClientRect()).top<=i&&s.left<=r&&i<=s.bottom&&r<=s.right)&&E!==k?(t.drop&&t.drop.element)!==E?(t.drop&&t.drop.onDragLeave&&t.drop.onDragLeave(M),D.onDragEnter&&D.onDragEnter(M)):D.onDragOver&&D.onDragOver(M):t.drop&&t.drop.onDragLeave&&t.drop.onDragLeave(M)}m({x:M.clientX,y:M.clientY}),y({x:M.pageX,y:M.pageY});break;case Ot.POINTER_UP:if(M.type===Ot.POINTER_UP&&!M.originalEvent.isPrimary)break;case Ot.MOUSE_UP:case Ot.TOUCH_END:if(M.type===Ot.TOUCH_END&&1!==M.originalEvent.touches.length)break;case Ot.END:p(!1),h(!1),C.onRelease&&C.onRelease(M),t.drop&&t.drop.onDrop&&t.drop.onDrop(M),C.onDragEnd&&C.onDragEnd(M);break;case Ot.POINTER_CANCEL:case Ot.CONTEXT_MENU:case Ot.TOUCH_CANCEL:case Ot.CANCEL:p(!1),h(!1),C.onDragEnd&&C.onDragEnd(M),t.drop&&t.drop.onDragLeave&&t.drop.onDragLeave(M)}},Vt=function(t,e){if(t){var o,r;t===It(t)?(o=document.body.scrollHeight>window.innerHeight,r=document.body.scrollWidth>window.innerWidth):(o=t.offsetHeight<=t.scrollHeight,r=t.offsetWidth<=t.scrollWidth);var i=t.scrollTop+e.y,n=o&&i>0&&i<t.scrollHeight,s=t.scrollLeft+e.x,a=r&&s>0&&s<t.scrollWidth;n?t.scrollTop+=e.y:o&&i<0&&(t.scrollTop=0),a?t.scrollLeft+=e.x:r&&s<0&&(t.scrollLeft=0)}},zt=function(t,e){var o=r.useContext(t),i=o[0],n=o[1],s=r.useState(e),a=s[0],p=s[1];return[void 0!==i?i:a,function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];void 0!==i?n.apply(void 0,t):p(t[0])}]};function Ut(t,e,o){void 0===o&&(o={});var i=e.onPress,n=void 0===i?S:i,s=e.onRelease,a=void 0===s?S:s,p=e.onDragStart,l=void 0===p?S:p,h=e.onDrag,c=void 0===h?S:h,u=e.onDragEnd,d=void 0===u?S:u,f=o.hint,g=void 0===f?null:f,y=o.mouseOnly,v=void 0!==y&&y,m=o.autoScroll,x=void 0===m||m,b=o.scrollContainer,w=void 0===b?null:b,_=r.useState(!1),C=_[0],k=_[1],A=r.useState(!1),P=A[0],M=A[1],O=zt(St)[0],T=zt(kt),B=T[0],R=T[1],I=r.useContext(Pt)[0],L=r.useContext(At),E=L[0],D=L[1],j=L[2],V=r.useRef({x:0,y:0}),z=r.useRef(),U=r.useRef(!1),H=r.useRef(),F=r.useRef(null),N=r.useRef(!1),G=r.useRef({x:0,y:0}),W=r.useRef({x:0,y:0}),X=r.useRef({x:0,y:0}),Y=r.useRef({x:0,y:0}),q=r.useRef({x:0,y:0}),Q=r.useRef({x:0,y:0}),Z=Boolean("undefined"!=typeof window&&window.PointerEvent),K=!v&&Z,$=r.useCallback((function(){return t.current&&t.current.element?t.current.element:t.current}),[t]),J=r.useCallback((function(){return g&&g.current&&g.current.element?g.current.element:g?g.current:null}),[g]),tt=r.useCallback((function(){return w&&w.current&&w.current.element?w.current.element:w?w.current:null}),[w]),et=r.useCallback((function(){return"object"==typeof x&&x.boundaryElementRef&&x.boundaryElementRef.current&&x.boundaryElementRef.current.element?x.boundaryElementRef.current.element:"object"==typeof x&&x.boundaryElementRef&&x.boundaryElementRef.current?x.boundaryElementRef.current:null}),[x]),ot=r.useRef(null);r.useImperativeHandle(ot,(function(){return{element:$(),hint:J(),onPress:gt,onDragStart:vt,onDrag:mt,onDragEnd:xt,onRelease:yt,data:t.current}}));var rt=r.useCallback((function(){var t=$();return t&&t.ownerDocument||document}),[$]),it=r.useCallback((function(){var t=rt();return t&&t.defaultView||window}),[rt]),nt=r.useCallback((function(){return{drag:B?B.current:null,drop:O?O.current:null,drags:E.map((function(t){return t.current})),drops:I.map((function(t){return t.current})),pressed:C,ignoreMouse:U.current,scrollOffset:q.current,offset:G.current,pageOffset:W.current,initialScrollOffset:Q.current,clientOffset:X.current,initialClientOffset:Y.current,velocity:V.current,autoScroll:Boolean("object"==typeof x?!1!==x.enabled:x),scrollableParent:et(),autoScrollDirection:"object"==typeof x?x.direction:{horizontal:!0,vertical:!0},isScrolling:P}}),[B,O,E,I,C,x,et,P]),st=r.useCallback((function(t){k(t)}),[]),at=r.useCallback((function(t){M(t)}),[]),pt=r.useCallback((function(t){V.current=t}),[]),lt=r.useCallback((function(t){G.current=t}),[]),ht=r.useCallback((function(t){X.current=t}),[]),ct=r.useCallback((function(t){W.current=t}),[]),ut=r.useCallback((function(t){Y.current=t}),[]),dt=r.useCallback((function(t){q.current=t}),[]),ft=r.useCallback((function(t){Q.current=t}),[]),gt=r.useCallback((function(t){n(t)}),[n]),yt=r.useCallback((function(t){a(t)}),[a]),vt=r.useCallback((function(e){R(ot,{target:t.current,event:e}),l(e)}),[R,t,l]),mt=r.useCallback((function(t){c(t)}),[c]),xt=r.useCallback((function(e){N.current||(R(null,{target:t.current,event:e}),d(e))}),[d,R,t]),bt=r.useCallback((function(t){jt(nt(),{event:t,payload:ot.current},{onVelocityChange:pt,onOffsetChange:lt,onClientOffsetChange:ht,onPageOffsetChange:ct,onInitialClientOffsetChange:ut,onScrollOffsetChange:dt,onInitialScrollOffsetChange:ft,onIsPressedChange:st,onIsScrollingChange:at})}),[nt,pt,lt,ct,ht,ut,ft,st,dt,at]),wt=r.useCallback((function(t){bt(t)}),[bt]),_t=r.useCallback((function(t){bt(t)}),[bt]),Ct=r.useCallback((function(t){bt(t)}),[bt]),Mt=r.useCallback((function(t){bt(t)}),[bt]),Ot=r.useCallback((function(t){bt(t)}),[bt]),Tt=r.useCallback((function(t){bt(t)}),[bt]),Bt=r.useCallback((function(t){bt(t)}),[bt]),Rt=r.useCallback((function(t){t.preventDefault(),bt(t)}),[bt]),It=r.useCallback((function(t){t.preventDefault(),bt(t)}),[bt]),Lt=r.useCallback((function(t){t.preventDefault(),bt(t)}),[bt]),Dt=r.useCallback((function(t){if(0===t.touches.length&&1===t.changedTouches.length){var e=it();U.current=!0,H.current=e.setTimeout((function(){U.current=!1}),2e3)}bt(t)}),[bt,it]),Ut=r.useCallback((function(t){bt(t)}),[bt]),Ht=r.useCallback((function(){var t=$();if(t){var e=t.style.touchAction;return t.style.touchAction="none",function(){t.style.touchAction=e}}}),[$]),Ft=r.useCallback((function(){return D(ot),function(){j(ot)}}),[j,D]);r.useEffect((function(){var t=it();if(P){var e=tt()||Et(document.elementFromPoint(X.current.x,X.current.y));t.clearInterval(z.current),z.current=t.setInterval((function(){Vt(e,{x:V.current.x,y:V.current.y})}),50)}return function(){t.clearInterval(z.current)}}),[$,tt,it,P]),r.useEffect(Ht,[Ht]),r.useEffect((function(){var t=it(),e=$(),o=rt();return K?(e&&(F.current=Et(e),F.current&&F.current.addEventListener("scroll",Ut,{passive:!0}),e.addEventListener("pointerdown",wt,{passive:!0})),C&&(o.addEventListener("pointermove",_t),o.addEventListener("pointerup",Mt,!0),o.addEventListener("contextmenu",Rt),o.addEventListener("pointercancel",Ct,{passive:!0}))):(t.addEventListener("touchmove",S,{capture:!1,passive:!1}),e&&(e.addEventListener("mousedown",Ot,{passive:!0}),v||(e.addEventListener("touchstart",It,{passive:!0}),C&&(e.addEventListener("touchmove",Lt,{passive:!0}),e.addEventListener("touchend",Dt,{passive:!0})))),C&&(o.addEventListener("mousemove",Tt,{passive:!0}),o.addEventListener("mouseup",Bt,{passive:!0}))),function(){F.current&&F.current.removeEventListener("scroll",Ut),e&&(e.removeEventListener("pointerdown",wt),e.removeEventListener("mousedown",Ot),e.removeEventListener("touchstart",It),e.removeEventListener("touchmove",Lt),e.removeEventListener("touchend",Dt)),o.removeEventListener("pointermove",_t),o.removeEventListener("pointerup",Mt,!0),o.removeEventListener("contextmenu",Rt),o.removeEventListener("pointercancel",Ct),o.removeEventListener("mousemove",Tt),o.removeEventListener("mouseup",Bt),t.removeEventListener("touchmove",S),t.clearTimeout(H.current)}}),[C,it,$,rt,v,K,Rt,Ot,Tt,Bt,Ct,wt,_t,Mt,Dt,Lt,It,Ut]),r.useEffect((function(){return function(){N.current=!0}}),[]),r.useLayoutEffect(Ft,[Ft])}var Ht=r.forwardRef((function(t,e){var o=r.useRef(null),i=r.useRef(null),n=r.useCallback((function(){return o.current&&o.current.element?o.current.element:o.current}),[o]);r.useImperativeHandle(i,(function(){return{element:n()||null}})),r.useImperativeHandle(e,(function(){return i.current})),r.useImperativeHandle(t.childRef,(function(){return o.current}));var s=r.useCallback((function(e){t.onPress&&t.onPress({element:n(),target:i.current,event:e})}),[n,t.onPress]),a=r.useCallback((function(e){t.onRelease&&t.onRelease({element:n(),target:i.current,event:e})}),[n,t.onRelease]),p=r.useCallback((function(e){t.onDragStart&&t.onDragStart({element:n(),target:i.current,event:e})}),[t,n]),l=r.useCallback((function(e){t.onDrag&&t.onDrag({element:n(),target:i.current,event:e})}),[n,t.onDrag]),h=r.useCallback((function(e){t.onDragEnd&&t.onDragEnd({element:n(),target:i.current,event:e})}),[n,t.onDragEnd]);return Ut(o,{onPress:s,onRelease:a,onDragStart:p,onDrag:l,onDragEnd:h},{mouseOnly:t.mouseOnly,autoScroll:t.autoScroll,hint:t.hint,scrollContainer:t.scrollContainer}),t.children?r.cloneElement(r.Children.only(t.children),{ref:o}):null}));function Ft(t,e){void 0===e&&(e={onDragEnter:S,onDragOver:S,onDragLeave:S,onDrop:S});var o=e.onDragEnter,i=void 0===o?S:o,n=e.onDragOver,s=void 0===n?S:n,a=e.onDragLeave,p=void 0===a?S:a,l=e.onDrop,h=void 0===l?S:l,c=zt(St)[1],u=r.useContext(Pt),d=u[1],f=u[2],g=r.useCallback((function(){return t.current&&t.current.element?t.current.element:t.current}),[t]),y=r.useRef(null);r.useImperativeHandle(y,(function(){return{element:g(),onDragEnter:v,onDragOver:m,onDragLeave:x,onDrop:b,data:t.current}}));var v=r.useCallback((function(e){c(y,{target:t.current,event:e}),i(e)}),[c,t,i]),m=r.useCallback((function(t){s(t)}),[s]),x=r.useCallback((function(e){c(null,{target:t.current,event:e}),p(e)}),[c,t,p]),b=r.useCallback((function(e){c(null,{target:t.current,event:e}),h(e)}),[c,t,h]),w=r.useCallback((function(){return d(y),function(){f(y)}}),[f,d]);r.useLayoutEffect(w,[w])}Ht.displayName="KendoReactDraggable";var Nt=r.forwardRef((function(t,e){var o=r.useRef(null),i=r.useRef(null),n=r.useCallback((function(){return o.current&&o.current.element?o.current.element:o.current}),[o]);r.useImperativeHandle(i,(function(){return{element:n()||void 0}})),r.useImperativeHandle(e,(function(){return i.current})),r.useImperativeHandle(t.childRef,(function(){return o.current}));var s=r.useCallback((function(e){t.onDragEnter&&t.onDragEnter({element:n(),target:i.current,event:e})}),[t.onDragEnter,n]),a=r.useCallback((function(e){t.onDragOver&&t.onDragOver({element:n(),target:i.current,event:e})}),[n,t.onDragOver]),p=r.useCallback((function(e){t.onDragLeave&&t.onDragLeave({element:n(),target:i.current,event:e})}),[t.onDragLeave,n]),l=r.useCallback((function(e){t.onDrop&&t.onDrop({element:n(),target:i.current,event:e})}),[t.onDrop,n]);return Ft(o,{onDragEnter:s,onDragOver:a,onDragLeave:p,onDrop:l}),t.children?r.cloneElement(r.Children.only(t.children),{ref:o}):null}));Nt.displayName="KendoReactDroppable";var Gt={sizeMap:{small:"sm",medium:"md",large:"lg"},roundedMap:{small:"sm",medium:"md",large:"lg"}}},function(t,e){t.exports=r},,function(t,e,o){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),n=this&&this.__rest||function(t,e){var o={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(o[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&(o[r[i]]=t[r[i]])}return o};Object.defineProperty(e,"__esModule",{value:!0});var s=o(1),a=o(2),p=o(10),l=o(11),h=o(12),c=o(13),u=o(3),d=o(14),f=function(t){function e(e){var o=t.call(this,e)||this;return o.barcodeInstance=null,o._element=null,o.observersStore={},o.onWindowResize=function(){null!==o.barcodeInstance&&(o.barcodeInstance.redraw(),o.trigger("render",{sender:o}))},u.validatePackage(d.packageMetadata),o.observersStore=p.default(l.observersReducer),o.contextValue={observersStore:o.observersStore},o}return i(e,t),Object.defineProperty(e.prototype,"element",{get:function(){return this._element},enumerable:!0,configurable:!0}),e.prototype.componentDidMount=function(){this.instantiateCoreBarcode(),window.addEventListener("resize",this.onWindowResize),this.trigger("render",{sender:this})},e.prototype.componentDidUpdate=function(t){var e=this.props,o=(e.children,e.deriveOptionsFromParent,e.getTarget,e.barcodeConstructor,e.className,e.renderAs),r=n(e,["children","deriveOptionsFromParent","getTarget","barcodeConstructor","className","renderAs"]),i=(t.children,t.deriveOptionsFromParent,t.getTarget,t.barcodeConstructor,t.className,t.renderAs),s=n(t,["children","deriveOptionsFromParent","getTarget","barcodeConstructor","className","renderAs"]);if(null!==this.barcodeInstance){var a=h.isOptionsChanged(s,r);(o||"svg")!==(i||"svg")?(null!==this.barcodeInstance&&(this.barcodeInstance.destroy(),this.barcodeInstance=null),this.instantiateCoreBarcode()):a&&this.refresh(),this.trigger("render",{sender:this})}},e.prototype.componentWillUnmount=function(){null!==this.barcodeInstance&&(this.barcodeInstance.destroy(),this.barcodeInstance=null),window.removeEventListener("resize",this.onWindowResize)},e.prototype.render=function(){var t=this,e=this.props,o=e.style,r=void 0===o?{}:o,i=e.className,n=e.children;return s.createElement(c.BarcodeContext.Provider,{value:this.contextValue},s.createElement("div",{style:r,ref:function(e){return t._element=e},className:i},n))},e.prototype.instantiateCoreBarcode=function(){var t=this.props.barcodeConstructor,e=this.getBarcodeOptions();this.barcodeInstance=new t(this.element,e,(function(t){console.warn(t)}))},e.prototype.refresh=function(){if(null!==this.barcodeInstance){var t=this.getBarcodeOptions();this.barcodeInstance.setOptions(t)}},e.prototype.getBarcodeOptions=function(){var t=this.props,e=t.renderAs,o=t.deriveOptionsFromParent,r={renderAs:e};return o&&(r=o(r)),r},e.prototype.trigger=function(t,e){for(var o=this.observersStore.getState(),r=0;r<o.length;r++)o[r].trigger(t,e)},e.propTypes={dir:a.string,renderAs:a.oneOf(["svg","canvas"])},e.defaultProps={renderAs:"svg"},e}(s.Component);e.BaseBarcode=f},function(t,e,o){"use strict";o.r(e),o.d(e,"autoMajorUnit",(function(){return Dt})),o.d(e,"Point",(function(){return jt})),o.d(e,"Box",(function(){return zt})),o.d(e,"Ring",(function(){return Ht})),o.d(e,"Sector",(function(){return Ft})),o.d(e,"ShapeBuilder",(function(){return Gt})),o.d(e,"ShapeElement",(function(){return Zt})),o.d(e,"ChartElement",(function(){return Xt})),o.d(e,"BoxElement",(function(){return qt})),o.d(e,"RootElement",(function(){return te})),o.d(e,"FloatElement",(function(){return oe})),o.d(e,"Text",(function(){return ne})),o.d(e,"TextBox",(function(){return pe})),o.d(e,"Title",(function(){return he})),o.d(e,"AxisLabel",(function(){return ue})),o.d(e,"Axis",(function(){return Re})),o.d(e,"Note",(function(){return fe})),o.d(e,"CategoryAxis",(function(){return to})),o.d(e,"DateCategoryAxis",(function(){return lo})),o.d(e,"DateValueAxis",(function(){return xo})),o.d(e,"NumericAxis",(function(){return vo})),o.d(e,"LogarithmicAxis",(function(){return Co})),o.d(e,"PolarAxis",(function(){return Mo})),o.d(e,"RadarCategoryAxis",(function(){return Ao})),o.d(e,"RadarNumericAxis",(function(){return Ro})),o.d(e,"RadarLogarithmicAxis",(function(){return Lo})),o.d(e,"CurveProcessor",(function(){return Do})),o.d(e,"Gradients",(function(){return Kt})),o.d(e,"rectToBox",(function(){return se})),o.d(e,"ChartAxis",(function(){return jo})),o.d(e,"ChartPane",(function(){return Uo})),o.d(e,"ChartPlotArea",(function(){return Ho})),o.d(e,"findAxisByName",(function(){return Vo})),o.d(e,"Aggregates",(function(){return Go})),o.d(e,"AreaChart",(function(){return Dr})),o.d(e,"AreaSegment",(function(){return Rr})),o.d(e,"AxisGroupRangeTracker",(function(){return jr})),o.d(e,"Bar",(function(){return Fr})),o.d(e,"BarChart",(function(){return Zr})),o.d(e,"BarLabel",(function(){return zr})),o.d(e,"BoxPlotChart",(function(){return ni})),o.d(e,"BoxPlot",(function(){return ri})),o.d(e,"BubbleChart",(function(){return di})),o.d(e,"Bullet",(function(){return vi})),o.d(e,"BulletChart",(function(){return xi})),o.d(e,"CandlestickChart",(function(){return ei})),o.d(e,"Candlestick",(function(){return $r})),o.d(e,"CategoricalChart",(function(){return dr})),o.d(e,"CategoricalErrorBar",(function(){return lr})),o.d(e,"CategoricalPlotArea",(function(){return kn})),o.d(e,"Chart",(function(){return da})),o.d(e,"ChartContainer",(function(){return Pi})),o.d(e,"ClipAnimation",(function(){return Pr})),o.d(e,"ClusterLayout",(function(){return Xr})),o.d(e,"Crosshair",(function(){return Si})),o.d(e,"CrosshairTooltip",(function(){return Ci})),o.d(e,"DefaultAggregates",(function(){return Ji})),o.d(e,"DonutChart",(function(){return ys})),o.d(e,"DonutPlotArea",(function(){return vs})),o.d(e,"DonutSegment",(function(){return fs})),o.d(e,"ErrorBarBase",(function(){return pr})),o.d(e,"ErrorRangeCalculator",(function(){return Zo})),o.d(e,"Highlight",(function(){return An})),o.d(e,"SharedTooltip",(function(){return Xn})),o.d(e,"Legend",(function(){return jn})),o.d(e,"LegendItem",(function(){return En})),o.d(e,"LegendLayout",(function(){return Ln})),o.d(e,"LineChart",(function(){return Br})),o.d(e,"LinePoint",(function(){return vr})),o.d(e,"LineSegment",(function(){return xr})),o.d(e,"Pane",(function(){return Ti})),o.d(e,"PieAnimation",(function(){return Kn})),o.d(e,"PieChart",(function(){return cs})),o.d(e,"PieChartMixin",(function(){return ps})),o.d(e,"PiePlotArea",(function(){return us})),o.d(e,"PieSegment",(function(){return as})),o.d(e,"PlotAreaBase",(function(){return qi})),o.d(e,"PlotAreaEventsMixin",(function(){return Qi})),o.d(e,"PlotAreaFactory",(function(){return zn})),o.d(e,"PointEventsMixin",(function(){return fr})),o.d(e,"RangeBar",(function(){return en})),o.d(e,"RangeBarChart",(function(){return rn})),o.d(e,"RangeAreaPoint",(function(){return an})),o.d(e,"RangeAreaChart",(function(){return dn})),o.d(e,"ScatterChart",(function(){return li})),o.d(e,"ScatterErrorBar",(function(){return si})),o.d(e,"ScatterLineChart",(function(){return Jn})),o.d(e,"Selection",(function(){return Nn})),o.d(e,"SeriesAggregator",(function(){return Ki})),o.d(e,"SeriesBinder",(function(){return Yo})),o.d(e,"SplineSegment",(function(){return kr})),o.d(e,"SplineAreaSegment",(function(){return Er})),o.d(e,"StackWrap",(function(){return qr})),o.d(e,"Tooltip",(function(){return Gn})),o.d(e,"OHLCChart",(function(){return gn})),o.d(e,"OHLCPoint",(function(){return fn})),o.d(e,"WaterfallChart",(function(){return mn})),o.d(e,"WaterfallSegment",(function(){return vn})),o.d(e,"XYPlotArea",(function(){return os})),o.d(e,"MousewheelZoom",(function(){return In})),o.d(e,"ZoomSelection",(function(){return Rn})),o.d(e,"Pannable",(function(){return Tn})),o.d(e,"anyHasZIndex",(function(){return Mr})),o.d(e,"appendIfNotNull",(function(){return Bi})),o.d(e,"areNumbers",(function(){return Jr})),o.d(e,"bindSegments",(function(){return Ii})),o.d(e,"categoriesCount",(function(){return cr})),o.d(e,"countNumbers",(function(){return Fo})),o.d(e,"equalsIgnoreCase",(function(){return Li})),o.d(e,"evalOptions",(function(){return hr})),o.d(e,"filterSeriesByType",(function(){return Ei})),o.d(e,"getDateField",(function(){return Di})),o.d(e,"getField",(function(){return Wo})),o.d(e,"hasGradientOverlay",(function(){return Ur})),o.d(e,"hasValue",(function(){return ai})),o.d(e,"isDateAxis",(function(){return ji})),o.d(e,"segmentVisible",(function(){return Ri})),o.d(e,"singleItemOrArray",(function(){return Vi})),o.d(e,"createOutOfRangePoints",(function(){return Fi})),o.d(e,"ChartService",(function(){return Ae})),o.d(e,"DomEventsBuilder",(function(){return Me})),o.d(e,"FormatService",(function(){return _e})),o.d(e,"IntlService",(function(){return me})),o.d(e,"TemplateService",(function(){return H})),o.d(e,"Sparkline",(function(){return ba})),o.d(e,"Navigator",(function(){return Ma})),o.d(e,"NavigatorHint",(function(){return ka})),o.d(e,"StockChart",(function(){return Ta})),o.d(e,"constants",(function(){return r})),o.d(e,"Gauge",(function(){return Fa})),o.d(e,"LinearGauge",(function(){return up})),o.d(e,"LinearPointer",(function(){return Ja})),o.d(e,"ArrowLinearPointer",(function(){return ip})),o.d(e,"BarLinearPointer",(function(){return lp})),o.d(e,"LinearScale",(function(){return Qa})),o.d(e,"RadialGauge",(function(){return Op})),o.d(e,"RadialPointer",(function(){return Ap})),o.d(e,"RadialScale",(function(){return xp})),o.d(e,"ArcGauge",(function(){return Dp})),o.d(e,"RangePointer",(function(){return Ep})),o.d(e,"ArcScale",(function(){return Bp})),o.d(e,"CircularGauge",(function(){return jp})),o.d(e,"Barcode",(function(){return kl})),o.d(e,"barcodeValidator",(function(){return Al})),o.d(e,"QRCode",(function(){return Mh})),o.d(e,"qrcodeValidator",(function(){return Oh})),o.d(e,"addClass",(function(){return w})),o.d(e,"removeClass",(function(){return C})),o.d(e,"alignPathToPixel",(function(){return S})),o.d(e,"clockwise",(function(){return A})),o.d(e,"convertableToNumber",(function(){return O})),o.d(e,"deepExtend",(function(){return R})),o.d(e,"elementStyles",(function(){return j})),o.d(e,"getSpacing",(function(){return V})),o.d(e,"getTemplate",(function(){return F})),o.d(e,"getter",(function(){return W})),o.d(e,"grep",(function(){return X})),o.d(e,"hasClasses",(function(){return Y})),o.d(e,"HashMap",(function(){return Q})),o.d(e,"inArray",(function(){return Z})),o.d(e,"interpolateValue",(function(){return K})),o.d(e,"InstanceObserver",(function(){return J})),o.d(e,"isArray",(function(){return b})),o.d(e,"isFunction",(function(){return T})),o.d(e,"isNumber",(function(){return P})),o.d(e,"isObject",(function(){return I})),o.d(e,"isString",(function(){return M})),o.d(e,"map",(function(){return tt})),o.d(e,"mousewheelDelta",(function(){return ot})),o.d(e,"FontLoader",(function(){return bt})),o.d(e,"setDefaultOptions",(function(){return wt})),o.d(e,"sparseArrayLimits",(function(){return _t})),o.d(e,"styleValue",(function(){return L})),o.d(e,"find",(function(){return Ct})),o.d(e,"elementScale",(function(){return Pt})),o.d(e,"autoTextColor",(function(){return Mt})),o.d(e,"createHashSet",(function(){return Lt})),o.d(e,"defaultErrorHandler",(function(){return Et})),o.d(e,"append",(function(){return it})),o.d(e,"bindEvents",(function(){return nt})),o.d(e,"Class",(function(){return k.Class})),o.d(e,"defined",(function(){return st})),o.d(e,"deg",(function(){return at})),o.d(e,"elementOffset",(function(){return pt})),o.d(e,"elementSize",(function(){return lt})),o.d(e,"eventElement",(function(){return ht})),o.d(e,"eventCoordinates",(function(){return ct})),o.d(e,"last",(function(){return ut})),o.d(e,"limitValue",(function(){return dt})),o.d(e,"logToConsole",(function(){return k.logToConsole})),o.d(e,"objectKey",(function(){return ft})),o.d(e,"rad",(function(){return gt})),o.d(e,"round",(function(){return yt})),o.d(e,"unbindEvents",(function(){return vt})),o.d(e,"valueOrDefault",(function(){return mt})),o.d(e,"chartBaseTheme",(function(){return Eh}));var r={};o.r(r),o.d(r,"NAVIGATOR_AXIS",(function(){return Aa})),o.d(r,"NAVIGATOR_PANE",(function(){return Sa}));var i="arc",n="#000",s="bottom",a="center",p="circle",l="date",h=/\{\d+:?/,c="left",u=Number.MAX_VALUE,d=-Number.MAX_VALUE,f="right",g="top",y="value",v="#fff",m="x",x="y";function b(t){return Array.isArray(t)}function w(t,e){for(var o=b(e)?e:[e],r=0;r<o.length;r++){var i=o[r];-1===t.className.indexOf(i)&&(t.className+=" "+i)}}var _=/\s+/g;function C(t,e){t&&t.className&&(t.className=t.className.replace(e,"").replace(_," "))}var k=o(0);function S(t){var e=.5;t.options.stroke&&k.drawing.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 A(t,e){return-t.x*e.y+t.y*e.x<0}function P(t){return"number"==typeof t&&!isNaN(t)}function M(t){return"string"==typeof t}function O(t){return P(t)||M(t)&&isFinite(t)}function T(t){return"function"==typeof t}function B(t,e){for(var o in e){var r=e[o],i=typeof r,n=void 0;if((n="object"===i&&null!==r?r.constructor:null)&&n!==Array)if(r instanceof Date)t[o]=new Date(r.getTime());else if(T(r.clone))t[o]=r.clone();else{var s=t[o];t[o]="object"==typeof s&&s||{},B(t[o],r)}else"undefined"!==i&&(t[o]=r)}return t}function R(t){for(var e=arguments,o=arguments.length,r=1;r<o;r++)B(t,e[r]);return t}function I(t){return"object"==typeof t}function L(t){return P(t)?t+"px":t}var E=/width|height|top|left|bottom|right/i;function D(t){return E.test(t)}function j(t,e){var o=M(e)?[e]:e;if(b(o)){for(var r={},i=window.getComputedStyle(t),n=0;n<o.length;n++){var s=o[n];r[s]=D(s)?parseFloat(i[s]):i[s]}return r}if(I(e))for(var a in e)t.style[a]=L(e[a])}function V(t,e){void 0===e&&(e=0);var o={top:0,right:0,bottom:0,left:0};return"number"==typeof t?o.top=o[f]=o[s]=o[c]=t:(o.top=t.top||e,o[f]=t[f]||e,o[s]=t[s]||e,o[c]=t[c]||e),o}var z={compile:function(t){return t}},U=function(){};U.register=function(t){z=t},U.compile=function(t){return z.compile(t)};var H=U;function F(t){var e;return void 0===t&&(t={}),t.template?t.template=e=H.compile(t.template):T(t.content)&&(e=t.content),e}var N=/\[(?:(\d+)|['"](.*?)['"])\]|((?:(?!\[.*?\]|\.).)+)/g,G={};function W(t){if(G[t])return G[t];var e=[];return t.replace(N,(function(t,o,r,i){e.push(k.drawing.util.defined(o)?o:r||i)})),G[t]=function(t){for(var o=t,r=0;r<e.length&&o;r++)o=o[e[r]];return o},G[t]}function X(t,e){for(var o=t.length,r=[],i=0;i<o;i++)e(t[i])&&r.push(t[i]);return r}function Y(t,e){if(t.className)for(var o=e.split(" "),r=0;r<o.length;r++)if(-1!==t.className.indexOf(o[r]))return!0}G[void 0]=function(t){return t};var q=function(){this._map={}};q.prototype.get=function(t){return this._map[this._key(t)]},q.prototype.set=function(t,e){this._map[this._key(t)]=e},q.prototype._key=function(t){return t instanceof Date?t.getTime():t};var Q=q;function Z(t,e){if(e)return-1!==e.indexOf(t)}function K(t,e,o){return k.drawing.util.round(t+(e-t)*o,3)}var $=function(t,e){this.observer=t,this.handlerMap=R({},this.handlerMap,e)};$.prototype.trigger=function(t,e){var o,r=this.observer,i=this.handlerMap;return i[t]?o=this.callObserver(i[t],e):r.trigger&&(o=this.callObserver("trigger",t,e)),o},$.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)},$.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 J=$;function tt(t,e){for(var o=t.length,r=[],i=0;i<o;i++){var n=e(t[i]);k.drawing.util.defined(n)&&r.push(n)}return r}var et=k.support.browser||{};function ot(t){var e=0;return t.wheelDelta?(e=-t.wheelDelta/120,et.webkit&&(e/=2*Math.max(window.devicePixelRatio,.625))):t.detail&&(e=t.detail/3),e=e>0?Math.ceil(e):Math.floor(e)}var rt=k.drawing.util,it=rt.append,nt=rt.bindEvents,st=rt.defined,at=rt.deg,pt=rt.elementOffset,lt=rt.elementSize,ht=rt.eventElement,ct=rt.eventCoordinates,ut=rt.last,dt=rt.limitValue,ft=rt.objectKey,gt=rt.rad,yt=rt.round,vt=rt.unbindEvents,mt=rt.valueOrDefault,xt=function(){};xt.fetchFonts=function(t,e,o){void 0===o&&(o={depth:0});!t||o.depth>5||!document.fonts||Object.keys(t).forEach((function(r){var i=t[r];"dataSource"!==r&&"$"!==r[0]&&i&&("font"===r?e.push(i):"object"==typeof i&&(o.depth++,xt.fetchFonts(i,e,o),o.depth--))}))},xt.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){Object(k.logToConsole)(t)}Promise.all(o).then(e,e)}else e()},xt.preloadFonts=function(t,e){var o=[];xt.fetchFonts(t,o),xt.loadFonts(o,e)};var bt=xt;function wt(t,e){var o=t.prototype;o.options?o.options=R({},o.options,e):o.options=e}function _t(t){for(var e=u,o=d,r=0,i=t.length;r<i;r++){var n=t[r];null!==n&&isFinite(n)&&(e=Math.min(e,n),o=Math.max(o,n))}return{min:e===u?void 0:e,max:o===d?void 0:o}}function Ct(t,e){for(var o=0;o<t.length;o++){var r=t[o];if(e(r,o,t))return r}}var kt=k.geometry.Matrix,St=/matrix\((.*)\)/;function At(t){var e=getComputedStyle(t).transform;return"none"===e?kt.unit():function(t){var e=t.match(St);if(null===e||2!==e.length)return kt.unit();var o=e[1].split(",").map((function(t){return parseFloat(t)}));return new(Function.prototype.bind.apply(kt,[null].concat(o)))}(e)}function Pt(t){if(!t)return kt.unit();for(var e=At(t),o=t.parentElement;o;){var r=At(o);e=e.multiplyCopy(r),o=o.parentElement}return e.b=e.c=e.e=e.f=0,e}var Mt=function(t){return new k.Color(t).isDark()?v:n},Ot={},Tt=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},Bt={size:{configurable:!0}};Tt.prototype.values=function(){return this._values.filter((function(t){return t!==Ot}))},Tt.prototype.has=function(t){return void 0!==this._index[t]},Tt.prototype.add=function(t){this.has(t)||(this._index[t]=this._values.length,this._values.push(t))},Tt.prototype.delete=function(t){var e=this._index[t];void 0!==e&&(this._values[e]=Ot,delete this._index[t])},Tt.prototype.clear=function(){this._index={},this._values=[]},Bt.size.get=function(){return this._values.length},Object.defineProperties(Tt.prototype,Bt);var Rt=function(t){this._set=new Set(t)},It={size:{configurable:!0}};Rt.prototype.values=function(){return Array.from(this._set)},Rt.prototype.has=function(t){return this._set.has(t)},Rt.prototype.add=function(t){this._set.add(t)},Rt.prototype.delete=function(t){this._set.delete(t)},Rt.prototype.clear=function(){this._set.clear()},It.size.get=function(){return this._set.size},Object.defineProperties(Rt.prototype,It);function Lt(t){return function(){var t=!1;"function"==typeof Set&&(t=new Set([1]).has(1));return t}()?new Rt(t):new Tt(t)}function Et(t){throw t}function Dt(t,e){var o=yt(e-t,9);if(0===o){if(0===e)return.1;o=Math.abs(e)}var r=Math.pow(10,Math.floor(Math.log(o)/Math.log(10))),i=yt(o/r,10);return yt(r*(i<1.904762?.2:i<4.761904?.5:i<9.523809?1:2),10)}var jt=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=gt(e),r=Math.cos(o),i=Math.sin(o),n=t.x,s=t.y,a=this.x,p=this.y;return this.x=yt(n+(a-n)*r+(p-s)*i,3),this.y=yt(s+(p-s)*r-(a-n)*i,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,r){var i=gt(o);return new e(t.x-r*Math.cos(i),t.y-r*Math.sin(i))},e}(k.Class);function Vt(t,e,o,r,i){var n=gt(i);return new jt(o+(t-o)*Math.cos(n)+(e-r)*Math.sin(n),r-(t-o)*Math.sin(n)+(e-r)*Math.cos(n))}var zt=function(t){function e(e,o,r,i){t.call(this),this.x1=e||0,this.y1=o||0,this.x2=r||0,this.y2=i||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(),r=this.width();return st(t)&&(this.x1=t,this.x2=this.x1+r),st(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=b(t),r=o?t[0]:t.x,i=o?t[1]:t.y;return this.wrap(new e(r,i,r,i)),this},e.prototype.snapTo=function(t,e){return e!==m&&e||(this.x1=t.x1,this.x2=t.x2),e!==x&&e||(this.y1=t.y1,this.y2=t.y2),this},e.prototype.alignTo=function(t,e){var o=this.height(),r=this.width(),i=e===g||e===s?x:m,n=i===x?o:r;if(e===a){var p=t.center(),l=this.center();this.x1+=p.x-l.x,this.y1+=p.y-l.y}else this[i+1]=e===g||e===c?t[i+1]-n:t[i+2];return this.x2=this.x1+r,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=V(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=V(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 jt(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 jt(this.x1,this.y1),new jt(this.x2,this.y1),new jt(this.x2,this.y2),new jt(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(),r=this.center(),i=r.x,n=r.y,s=Vt(0,0,i,n,t),a=Vt(e,0,i,n,t),p=Vt(e,o,i,n,t),l=Vt(0,o,i,n,t);return e=Math.max(s.x,a.x,p.x,l.x)-Math.min(s.x,a.x,p.x,l.x),o=Math.max(s.y,a.y,p.y,l.y)-Math.min(s.y,a.y,p.y,l.y),this.x2=this.x1+e,this.y2=this.y1+o,this},e.prototype.toRect=function(){return new k.geometry.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 r=e+1,i=e+2,n=e===m?"width":"height",p=this[n]();Z(o,[c,g])?(this[r]=t[r],this[i]=this[r]+p):Z(o,[f,s])?(this[i]=t[i],this[r]=this[i]-p):o===a&&(this[r]=t[r]+(t[n]()-p)/2,this[i]=this[r]+p)},e}(k.Class);function Ut(t,e){return t-e}var Ht=function(t){function e(e,o,r,i,n){t.call(this),this.center=e,this.innerRadius=o,this.radius=r,this.startAngle=i,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=gt(t),r=Math.cos(o),i=Math.sin(o),n=e?this.innerRadius:this.radius,s=yt(this.center.x-r*n,3),a=yt(this.center.y-i*n,3);return new jt(s,a)},e.prototype.adjacentBox=function(t,e,o){var r=this.clone().expand(t),i=r.middle(),n=r.point(i),s=e/2,a=o/2,p=Math.sin(gt(i)),l=Math.cos(gt(i)),h=n.x-s,c=n.y-a;return Math.abs(p)<.9&&(h+=s*-l/Math.abs(l)),Math.abs(l)<.9&&(c+=a*-p/Math.abs(p)),new zt(h,c,h+e,c+o)},e.prototype.containsPoint=function(t){var e=this.center,o=this.innerRadius,r=this.radius,i=this.startAngle,n=this.startAngle+this.angle,s=t.x-e.x,a=t.y-e.y,p=new jt(s,a),l=this.point(i),h=new jt(l.x-e.x,l.y-e.y),c=this.point(n),u=new jt(c.x-e.x,c.y-e.y),d=yt(s*s+a*a,3);return(h.equals(p)||A(h,p))&&!A(u,p)&&d>=o*o&&d<=r*r},e.prototype.getBBox=function(){var t,e=new zt(u,u,d,d),o=yt(this.startAngle%360),r=yt((o+this.angle)%360),i=this.innerRadius,n=[0,90,180,270,o,r].sort(Ut),s=n.indexOf(o),a=n.indexOf(r);t=o===r?n:s<a?n.slice(s,a+1):[].concat(n.slice(0,a+1),n.slice(s,n.length));for(var p=0;p<t.length;p++){var l=this.point(t[p]);e.wrapPoint(l),e.wrapPoint(l,i)}return i||e.wrapPoint(this.center),e},e.prototype.expand=function(t){return this.radius+=t,this},e}(k.Class),Ft=function(t){function e(e,o,r,i){t.call(this,e,0,o,r,i)}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}(Ht),Nt=function(t){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,r=t.angle+o;t.angle>0&&o===r&&(r+=.001);var i=new k.geometry.Point(t.center.x,t.center.y),n=Math.max(t.radius,0),s=Math.max(t.innerRadius,0),a=new k.geometry.Arc(i,{startAngle:o,endAngle:r,radiusX:n,radiusY:n}),p=k.drawing.Path.fromArc(a,e).close();if(s){a.radiusX=a.radiusY=s;var l=a.pointAt(r);p.lineTo(l.x,l.y),p.arc(r,o,s,s,!0)}else p.lineTo(i.x,i.y);return p},e}(k.Class);Nt.current=new Nt;var Gt=Nt,Wt=function(t){function e(e){t.call(this),this.children=[],this.options=R({},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,r=0;r<o.length;r++){var i=o[r];i.reflow(t),e=e?e.wrap(i.box):i.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,r=o.length,i=0;i<r;i++)o[i].box.translate(t,e)},e.prototype.append=function(){for(var t=arguments,e=this,o=0;o<arguments.length;o++){var r=t[o];e.children.push(r),r.parent=e}},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 k.drawing.Group({zIndex:this.options.zIndex,visible:mt(this.options.visible,!0)})},e.prototype.createAnimation=function(){this.visual&&this.options.animation&&(this.animation=k.drawing.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):st(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,r=this.visual.children,i=r.length;for(e=0;e<i;e++){var n=r[e];if(mt(n.options.zIndex,0)>o)break}this.visual.insert(e,t)},e.prototype.traverse=function(t){for(var e=this.children,o=e.length,r=0;r<o;r++){var i=e[r];t(i),i.traverse&&i.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,r=(this.options||{}).highlight||{},i=r.visual,n=this._highlight;if(!n){var s={fill:{color:v,opacity:e||.2},stroke:{color:v,width:1,opacity:e||.2}};if(i){if(!(n=this._highlight=i(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);st(n.options.zIndex)||(n.options.zIndex=mt(r.zIndex,this.options.zIndex)),this.appendVisual(n)}n.visible(t)},e.prototype.createGradientOverlay=function(t,e,o){var r=new k.drawing.Path(Object.assign({stroke:{color:"none"},fill:this.createGradient(o),closed:t.options.closed},e));return r.segments.elements(t.segments.elements()),r},e.prototype.createGradient=function(t){if(this.parent)return this.parent.createGradient(t)},e.prototype.supportsPointInactiveOpacity=function(){return!0},e}(k.Class);Wt.prototype.options={};var Xt=Wt,Yt=function(t){function e(e){t.call(this,e),this.options.margin=V(this.options.margin),this.options.padding=V(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,r=this,i=this.options,n=i.width,s=i.height,a=i.shrinkToFit,p=n&&s,l=i.margin,h=i.padding,c=i.border.width,u=function(){r.align(e,m,i.align),r.align(e,x,i.vAlign),r.paddingBox=o.clone().unpad(l).unpad(c)},d=e.clone();p&&(d.x2=d.x1+n,d.y2=d.y1+s),a&&d.unpad(l).unpad(c).unpad(h),t.prototype.reflow.call(this,d),o=p?this.box=new zt(0,0,n,s):this.box,a&&p?(u(),d=this.contentBox=this.paddingBox.clone().unpad(h)):(d=this.contentBox=o.clone(),o.pad(h).pad(c).pad(l),u()),this.translateChildren(o.x1-d.x1+l.left+c+h.left,o.y1-d.y1+l.top+c+h.top);for(var f=this.children,g=0;g<f.length;g++){var y=f[g];y.reflow(y.box)}},e.prototype.align=function(t,e,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(k.drawing.Path.fromRect(this.paddingBox.toRect(),this.visualStyle()))},e.prototype.visualStyle=function(){var t=this.options,e=t.border||{};return{stroke:{width:e.width,color:e.color,opacity:mt(e.opacity,t.opacity),dashType:e.dashType},fill:{color:t.background,opacity:t.opacity},cursor:t.cursor}},e}(Xt);wt(Yt,{align:c,vAlign:g,margin:{},padding:{},border:{color:n,width:0},background:"",shrinkToFit:!1,width:0,height:0,visible:!0});var qt=Yt,Qt=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,r=t.rotation,i=e.center(),n=e.width()/2,s=e.height()/2;if(!t.visible||!this.hasBox())return null;var a,l=this.visualStyle();if(o===p)a=new k.drawing.Circle(new k.geometry.Circle([yt(e.x1+n,3),yt(e.y1+s,3)],Math.min(n,s)),l);else if("triangle"===o)a=k.drawing.Path.fromPoints([[e.x1+n,e.y1],[e.x1,e.y2],[e.x2,e.y2]],l).close();else if("cross"===o)(a=new k.drawing.MultiPath(l)).moveTo(e.x1,e.y1).lineTo(e.x2,e.y2),a.moveTo(e.x1,e.y2).lineTo(e.x2,e.y1);else{var h=e.toRect();if("roundedRect"===o){var c=mt(t.borderRadius,h.width()/5);h.setCornerRadius(c)}a=k.drawing.Path.fromRect(h,l)}return r&&a.transform(k.geometry.transform().rotate(-r,[i.x,i.y])),a.options.zIndex=t.zIndex,a},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}(qt);wt(Qt,{type:p,align:a,vAlign:a});var Zt=Qt,Kt={glass:{type:"linear",rotation:0,stops:[{offset:0,color:v,opacity:0},{offset:.25,color:v,opacity:.3},{offset:1,color:v,opacity:0}]},sharpBevel:{type:"radial",stops:[{offset:0,color:v,opacity:.55},{offset:.65,color:v,opacity:0},{offset:.95,color:v,opacity:.25}]},roundedBevel:{type:"radial",stops:[{offset:.33,color:v,opacity:.06},{offset:.83,color:v,opacity:.2},{offset:.95,color:v,opacity:0}]},roundedGlass:{type:"radial",supportVML:!1,stops:[{offset:0,color:v,opacity:0},{offset:.5,color:v,opacity:.3},{offset:.99,color:v,opacity:0}]},sharpGlass:{type:"radial",supportVML:!1,stops:[{offset:0,color:v,opacity:.2},{offset:.15,color:v,opacity:.15},{offset:.17,color:v,opacity:.35},{offset:.85,color:v,opacity:.05},{offset:.87,color:v,opacity:.15},{offset:.99,color:v,opacity:0}]},bubbleShadow:{type:"radial",center:[.5,.5],radius:.5}};function $t(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),r=Math.max(t.x1,e.x1),i=Math.min(t.x2,e.x2),n=Math.max(t.x2,e.x2),s=Math.min(t.y1,e.y1),a=Math.max(t.y1,e.y1),p=Math.min(t.y2,e.y2),l=Math.max(t.y2,e.y2),h=[];return h[0]=new zt(r,s,i,a),h[1]=new zt(o,a,r,p),h[2]=new zt(i,a,n,p),h[3]=new zt(r,p,i,l),t.x1===o&&t.y1===s||e.x1===o&&e.y1===s?(h[4]=new zt(o,s,r,a),h[5]=new zt(i,p,n,l)):(h[4]=new zt(i,s,n,a),h[5]=new zt(o,p,r,l)),X(h,(function(t){return t.height()>0&&t.width()>0}))[0]}var Jt=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 zt(0,0,t.width,t.height);this.box=o.unpad(t.margin);for(var r=0;r<e.length;r++)e[r].reflow(o),o=$t(o,e[r].box)||new zt},e.prototype.createVisual=function(){this.visual=new k.drawing.Group,this.createBackground()},e.prototype.createBackground=function(){var t=this.options,e=t.border||{},o=this.box.clone().pad(t.margin).unpad(e.width),r=k.drawing.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(r)},e.prototype.getRoot=function(){return this},e.prototype.createGradient=function(t){var e,o=this.gradients,r=ft(t),i=Kt[t.gradient];if(o[r])e=o[r];else{var n=Object.assign({},i,t);"linear"===i.type?e=new k.drawing.LinearGradient(n):(t.innerRadius&&(n.stops=function(t){for(var e=t.stops,o=t.innerRadius/t.radius*100,r=e.length,i=[],n=0;n<r;n++){var s=Object.assign({},e[n]);s.offset=(s.offset*(100-o)+o)/100,i.push(s)}return i}(n)),(e=new k.drawing.RadialGradient(n)).supportVML=!1!==i.supportVML),o[r]=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 zt(0,0,t.width,t.height)},e}(Xt);wt(Jt,{width:600,height:400,background:v,border:{color:n,width:0},margin:V(5),zIndex:-2});var te=Jt,ee=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=m,this.elementAxis=x,this.groupSizeField="width",this.elementSizeField="height",this.groupSpacing=t.spacing,this.elementSpacing=t.vSpacing):(this.groupAxis=x,this.elementAxis=m,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,r=this.elementSizeField,i=this.groupSizeField,n=this.groupOptions(),s=n.groups,a=n.groupsSize,p=n.maxGroupElementsSize,l=s.length,h=t[o+1]+this.alignStart(a,t[i]());if(l){for(var c=h,u=0;u<l;u++){for(var d=s[u],f=d.groupElements,g=t[e+1],y=f.length,v=0;v<y;v++){var m=f[v],x=this.elementSize(m),b=c+this.alignStart(x[i],d.groupSize),w=new zt;w[o+1]=b,w[o+2]=b+x[i],w[e+1]=g,w[e+2]=g+x[r],m.reflow(w),g+=x[r]+this.elementSpacing}c+=d.groupSize+this.groupSpacing}t[o+1]=h,t[o+2]=h+a,t[e+2]=t[e+1]+p}},e.prototype.alignStart=function(t,e){var o=0,r=this.options.align;return r===f||r===s?o=e-t:r===a&&(o=(e-t)/2),o},e.prototype.groupOptions=function(){for(var t=this.box,e=this.children,o=this.elementSizeField,r=this.groupSizeField,i=this.elementSpacing,n=this.groupSpacing,s=yt(t[o]()),a=e.length,p=[],l=0,h=0,c=0,u=0,d=[],f=0;f<a;f++){var g=e[f];g.box||g.reflow(t);var y=this.elementSize(g);this.options.wrap&&yt(h+i+y[o])>s&&(p.push({groupElements:d,groupSize:l,groupElementsSize:h}),u=Math.max(u,h),c+=n+l,l=0,h=0,d=[]),l=Math.max(l,y[r]),h>0&&(h+=i),h+=y[o],d.push(g)}return p.push({groupElements:d,groupSize:l,groupElementsSize:h}),{groups:p,groupsSize:c+=l,maxGroupElementsSize:u=Math.max(u,h)}},e.prototype.elementSize=function(t){return{width:t.box.width(),height:t.box.height()}},e.prototype.createVisual=function(){},e}(Xt);wt(ee,{vertical:!0,wrap:!0,vSpacing:0,spacing:0});var oe=ee,re=k.drawing.Text,ie=function(t){function e(e,o){t.call(this,o),this.content=e,this.reflow(new zt)}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=k.drawing.util.measureText(this.content,{font:e.font});this.baseline=o.baseline,this.box=new zt(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,r=t.opacity,i=t.cursor;this.visual=new re(this.content,this.box.toRect().topLeft(),{font:e,fill:{color:o,opacity:r},cursor:i})},e}(Xt);wt(ie,{font:"12px sans-serif",color:n});var ne=ie;function se(t){var e=t.origin,o=t.bottomRight();return new zt(e.x,e.y,o.x,o.y)}var ae=/\n/m,pe=function(t){function e(e,o,r){t.call(this,o),this.content=e,this.data=r,this._initContainer(),!1!==this.options._autoReflow&&this.reflow(new zt)}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(ae),o=new oe({vertical:!0,align:t.align,wrap:!1}),r=R({},t,{opacity:1,animation:null});this.container=o,this.append(o);for(var i=0;i<e.length;i++){var n=new ne(e[i].trim(),r);o.append(n)}},e.prototype.reflow=function(e){var o=this.options,r=o.visual;if(this.container.options.align=o.align,r&&!this._boxReflow){var i=e;i.hasSize()||(this._boxReflow=!0,this.reflow(i),this._boxReflow=!1,i=this.box);var n=this.visual=r(this.visualContext(i));n&&(i=se(n.clippedBBox()||new k.geometry.Rect),n.options.zIndex=o.zIndex),this.box=this.contentBox=this.paddingBox=i}else if(t.prototype.reflow.call(this,e),o.rotation){var s=V(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 k.drawing.Group({transform:this.rotationTransform(),zIndex:t.zIndex,noclip:t.noclip}),this.hasBox()){var e=k.drawing.Path.fromRect(this.paddingBox.toRect(),this.visualStyle());this.visual.append(e)}},e.prototype.renderVisual=function(){if(this.options.visible)if(this.options.visual){var e=this.visual;e&&!st(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,m,t.align),this.align(this.targetBox,x,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,r=e.y,i=this.rotatedBox.center();return k.geometry.transform().translate(i.x-o,i.y-r).rotate(t,[o,r])},e}(qt),le=function(t){function e(e){t.call(this,e),this.append(new pe(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,m)},e.buildTitle=function(t,o,r){var i,n=t;return"string"==typeof t&&(n={text:t}),(n=Object.assign({visible:!0},r,n))&&n.visible&&n.text&&(i=new e(n),o.append(i)),i},e}(Xt);wt(le,{color:n,position:g,align:a,margin:V(5),padding:V(5)});var he=le,ce=function(t){function e(e,o,r,i,n){t.call(this,o,n),this.text=o,this.value=e,this.index=r,this.dataItem=i,this.reflow(new zt)}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:ht(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!==a){var e=this.normalBox.toRect(),o=this.rotationTransform();this.box=se(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===a)return t.prototype.rotationTransform.call(this);var r=k.geometry.transform().rotate(o).matrix(),i=this.normalBox.toRect(),n=this.targetBox.toRect(),p=e.rotationOrigin||g,l=p===g||p===s?m:x,h=p===g||p===s?x:m,u=p===g||p===c?n.origin:n.bottomRight(),d=i.topLeft().transformCopy(r),f=i.topRight().transformCopy(r),y=i.bottomRight().transformCopy(r),v=i.bottomLeft().transformCopy(r),b=k.geometry.Rect.fromPoints(d,f,y,v),w={};w[h]=n.origin[h]-b.origin[h];var _,C,S=Math.abs(d[h]+w[h]-u[h]),A=Math.abs(f[h]+w[h]-u[h]);yt(S,10)===yt(A,10)?(_=d,C=f):A<S?(_=f,C=y):(_=d,C=v);var P=_[l]+(C[l]-_[l])/2;return w[l]=n.center()[l]-P,k.geometry.transform().translate(w.x,w.y).rotate(o)},e}(pe);wt(ce,{_autoReflow:!1});var ue=ce,de=function(t){function e(e,o,r){t.call(this,o),this.fields=e,this.chartService=r,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,r,i=e.label,n=e.icon,s=new zt,a=function(){return t},l=n.size,h=this.fields.text;if(st(i)&&i.visible){var c=F(i);c?h=c(this.fields):i.format&&(h=this.chartService.format.auto(i.format,h)),i.color||(i.color="inside"===i.position?"#fff":n.background),this.label=new pe(h,R({},i)),this.label.aliasFor=a,"inside"!==i.position||st(l)||(n.type===p?l=Math.max(this.label.box.width(),this.label.box.height()):(o=this.label.box.width(),r=this.label.box.height()),s.wrap(this.label.box))}n.width=o||l||7,n.height=r||l||7;var u=new Zt(R({},n));u.aliasFor=a,this.marker=u,this.append(u),this.label&&this.append(this.label),u.reflow(new zt),this.wrapperBox=s.wrap(u.box)}},e.prototype.reflow=function(t){var e,o,r,i=this.options,n=this.label,a=this.marker,p=this.wrapperBox,l=t.center(),h=i.line.length,u=i.position;i.visible&&(Z(u,[c,f])?u===c?(r=p.alignTo(t,u).translate(-h,t.center().y-p.center().y),i.line.visible&&(e=[t.x1,l.y],this.linePoints=[e,[r.x2,l.y]],o=r.clone().wrapPoint(e))):(r=p.alignTo(t,u).translate(h,t.center().y-p.center().y),i.line.visible&&(e=[t.x2,l.y],this.linePoints=[e,[r.x1,l.y]],o=r.clone().wrapPoint(e))):u===s?(r=p.alignTo(t,u).translate(t.center().x-p.center().x,h),i.line.visible&&(e=[l.x,t.y2],this.linePoints=[e,[l.x,r.y1]],o=r.clone().wrapPoint(e))):(r=p.alignTo(t,u).translate(t.center().x-p.center().x,-h),i.line.visible&&(e=[l.x,t.y1],this.linePoints=[e,[l.x,r.y2]],o=r.clone().wrapPoint(e))),a&&a.reflow(r),n&&(n.reflow(r),a&&("outside"===i.label.position&&n.box.alignTo(a.box,u),n.reflow(n.box))),this.contentBox=r,this.targetBox=t,this.box=o||r)},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,r=o.visual;o.visible&&r?(this.visual=r(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=k.drawing.Path.fromPoints(this.linePoints,{stroke:{color:t.color,width:t.width,dashType:t.dashType}});S(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:ht(t),text:st(e.label)?e.label.text:"",visual:this.visual})},e}(qt);wt(de,{icon:{visible:!0,type:p},label:{position:"inside",visible:!0,align:a,vAlign:a},line:{visible:!0},visible:!0,position:g,zIndex:2});var fe=de,ge={format:function(t,e){return e},toString:function(t){return t},parseDate:function(t){return new Date(t)},firstDay:function(){return 0}},ye=function(){},ve={implementation:{configurable:!0}};ye.register=function(t){ge=t},ve.implementation.get=function(){return ge},Object.defineProperties(ye,ve);var me=ye,xe=/\{(\d+)(:[^\}]+)?\}/g,be=function(t){this._intlService=t},we={intl:{configurable:!0}};we.intl.get=function(){return this._intlService||me.implementation},we.intl.set=function(t){this._intlService=t},be.prototype.auto=function(t){for(var e=[],o=arguments.length-1;o-- >0;)e[o]=arguments[o+1];var r=this.intl;return M(t)&&t.match(h)?r.format.apply(r,[t].concat(e)):r.toString(e[0],t)},be.prototype.localeAuto=function(t,e,o){var r=this.intl;return M(t)&&t.match(h)?t.replace(xe,(function(t,i,n){var s=e[parseInt(i,10)];return r.toString(s,n?n.substring(1):"",o)})):r.toString(e[0],t,o)},Object.defineProperties(be.prototype,we);var _e=be,Ce=function(t,e){void 0===e&&(e={}),this._intlService=e.intlService,this.sender=e.sender||t,this.format=new _e(e.intlService),this.chart=t,this.rtl=Boolean(e.rtl)},ke={intl:{configurable:!0}};ke.intl.get=function(){return this._intlService||me.implementation},ke.intl.set=function(t){this._intlService=t,this.format.intl=t},Ce.prototype.notify=function(t,e){this.chart&&this.chart.trigger(t,e)},Ce.prototype.isPannable=function(t){var e=((this.chart||{}).options||{}).pannable;return e&&e.lock!==t},Object.defineProperties(Ce.prototype,ke);var Se,Ae=Ce,Pe=function(){};Pe.register=function(t){Se=t},Pe.create=function(t,e){if(Se)return Se.create(t,e)};var Me=Pe;function Oe(t,e){var o=t.tickX,r=t.tickY,i=t.position,n=new k.drawing.Path({stroke:{width:e.width,color:e.color}});return t.vertical?n.moveTo(o,i).lineTo(o+e.size,i):n.moveTo(i,r).lineTo(i,r+e.size),S(n),n}function Te(t,e){var o=t.lineStart,r=t.lineEnd,i=t.position,n=new k.drawing.Path({stroke:{width:e.width,color:e.color,dashType:e.dashType}});return t.vertical?n.moveTo(o,i).lineTo(r,i):n.moveTo(i,o).lineTo(i,r),S(n),n}var Be=function(t){function e(e,o){void 0===o&&(o=new Ae),t.call(this,e),this.chartService=o,this.options.visible||(this.options=R({},this.options,{labels:{visible:!1},line:{visible:!1},margin:0,majorTickSize:0,minorTickSize:0})),this.options.minorTicks=R({},{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=R({},{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;I(e)&&(t.alignRotation=e.align,t.rotation=e.angle)},e.prototype.createLabels=function(){var t=this.options,e=t.vertical?f:a,o=R({},t.labels,{align:e,zIndex:t.zIndex}),r=Math.max(1,o.step);if(this.clearLabels(),o.visible){this.normalizeLabelRotation(o),"auto"===o.rotation&&(o.rotation=0,t.autoRotateLabels=!0);for(var i=this.labelsRange(),n=i.min;n<i.max;n+=r){var s={index:n,count:i.max},p=this.createAxisLabel(n,o,s);p&&(this.append(p),this.labels.push(p))}}},e.prototype.clearLabels=function(){this.children=X(this.children,(function(t){return!(t instanceof ue)})),this.labels=[]},e.prototype.clearTitle=function(){var t=this;this.title&&(this.children=X(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,r=t.labels.mirror,i=r?e.x1:e.x2,n=r?e.y2:e.y1,s=t.line.width||0;return o?new zt(i,e.y1,i,e.y2-s):new zt(e.x1,n,e.x2-s,n)},e.prototype.createTitle=function(){var t=this.options,e=R({rotation:t.vertical?-90:0,text:"",zIndex:1,visualSize:!0},t.title);if(e.visible&&e.text){var o=new pe(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 r=0;r<o.length;r++){var i=R({},e,o[r]);i.value=this.parseNoteValue(i.value);var n=new fe({value:i.value,text:i.label.text,dataItem:i},i,this.chartService);n.options.visible&&(st(n.options.position)?t.vertical&&!Z(n.options.position,[c,f])?n.options.position=t.reverse?c:f:t.vertical||Z(n.options.position,[g,s])||(n.options.position=t.reverse?s:g):t.vertical?n.options.position=t.reverse?c:f:n.options.position=t.reverse?s:g,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 k.drawing.Group({zIndex:-2}),this.appendVisual(this._gridLines)),t},e.prototype.createTicks=function(t){var e=this.options,o=this.lineBox(),r=e.labels.mirror,i=e.majorTicks.visible?e.majorUnit:0,n={vertical:e.vertical};function s(e,i,s){var a=e.length,p=Math.max(1,i.step);if(i.visible)for(var l=i.skip;l<a;l+=p)st(s)&&l%s==0||(n.tickX=r?o.x2:o.x2-i.size,n.tickY=r?o.y1-i.size:o.y1,n.position=e[l],t.append(Oe(n,i)))}s(this.getMajorTickPositions(),e.majorTicks),s(this.getMinorTickPositions(),e.minorTicks,i/e.minorUnit)},e.prototype.createLine=function(){var t=this.options,e=t.line,o=this.lineBox();if(e.width>0&&e.visible){var r=new k.drawing.Path({stroke:{width:e.width,color:e.color,dashType:e.dashType}});r.moveTo(o.x1,o.y1).lineTo(o.x2,o.y2),t._alignLines&&S(r);var i=this._lineGroup=new k.drawing.Group;i.append(r),this.visual.append(i),this.createTicks(i)}},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=k.drawing.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||[],r=e.vertical,i=this.plotArea;if(0!==o.length){for(var n=this._plotbandGroup=new k.drawing.Group({zIndex:-1}),s=X(this.pane.axes,(function(e){return e.options.vertical!==t.options.vertical}))[0],a=0;a<o.length;a++){var p=o[a],l=void 0,h=void 0,u=p.label,d=void 0;if(r?(l=(s||i.axisX).lineBox(),h=t.getSlot(p.from,p.to,!0)):(l=t.getSlot(p.from,p.to,!0),h=(s||i.axisY).lineBox()),u&&(u.vAlign=u.position||c,d=t.createPlotBandLabel(u,p,new zt(l.x1,h.y1,l.x2,h.y2))),0!==l.width()&&0!==h.height()){var f=new k.geometry.Rect([l.x1,h.y1],[l.width(),h.height()]),g=k.drawing.Path.fromRect(f,{fill:{color:p.color,opacity:p.opacity},stroke:null});n.append(g),d&&n.append(d)}}this.appendVisual(n)}},e.prototype.createPlotBandLabel=function(t,e,o){if(!1===t.visible)return null;var r,i=t.text;if(st(t)&&t.visible){var n=F(t);n?i=n({text:i,item:e}):t.format&&(i=this.chartService.format.auto(t.format,i)),t.color||(t.color=this.options.labels.color)}return(r=new pe(i,t)).reflow(o),r.renderVisual(),r.visual},e.prototype.createGridLines=function(t){var e=this.options,o=e.minorGridLines,r=e.majorGridLines,i=e.minorUnit,n=e.vertical,s=t.options.line.visible,a=r.visible?e.majorUnit:0,p=t.lineBox(),l=p[n?"y1":"x1"],h={lineStart:p[n?"x1":"y1"],lineEnd:p[n?"x2":"y2"],vertical:n},c=[],u=this.gridLinesVisual();function d(t,e,o){var r=t.length,i=Math.max(1,e.step);if(e.visible)for(var n=e.skip;n<r;n+=i){var a=yt(t[n]);Z(a,c)||n%o==0||s&&l===a||(h.position=a,u.append(Te(h,e)),c.push(a))}}return d(this.getMajorTickPositions(),r),d(this.getMinorTickPositions(),o,a/i),u.children},e.prototype.reflow=function(t){for(var e=this.options,o=this.labels,r=this.title,i=e.vertical,n=o.length,s=i?"width":"height",a=r?r.box[s]():0,p=this.getActualTickSize()+e.margin+a,l=((this.getRoot()||{}).box||t)[s](),h=0,c=0;c<n;c++){var u=o[c].box[s]();u+p<=l&&(h=Math.max(h,u))}this.box=i?new zt(t.x1,t.y1,t.x1+h+p,t.y2):new zt(t.x1,t.y1,t.x2,t.y1+h+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(),r=t.vertical,i=t.labels.mirror,n=this.getLabelsTickPositions(),s=0;s<e.length;s++){var a=e[s],p=this.labelTickIndex(a),l=r?a.box.height():a.box.width(),h=n[p],c=n[p+1],u=void 0,d=void 0;if(r){if(o)u=h+(c-h)/2-l/2;else u=h-l/2;d=u}else o?(u=h,d=c):d=(u=h-l/2)+l;this.positionLabel(a,i,u,d)}},e.prototype.positionLabel=function(t,e,o,r){void 0===r&&(r=o);var i,n=this.options,a=n.vertical,p=this.lineBox(),l=this.getActualTickSize()+n.margin;if(a){var h=p.x2;e?(h+=l,t.options.rotationOrigin=c):(h-=l+t.box.width(),t.options.rotationOrigin=f),i=t.box.move(h,o)}else{var u=p.y1;e?(u-=l+t.box.height(),t.options.rotationOrigin=s):(u+=l,t.options.rotationOrigin=g),i=new zt(o,u,r,u+t.box.height())}t.reflow(i)},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),r=0,i=0;i<o;i++){var n=Math.abs(t[i+1]-t[i]),s=e[i].box,a=this.autoRotateLabelAngle(s,n);if(0!==a&&(r=a),-90===r)break}if(0!==r){for(var p=0;p<e.length;p++)e[p].options.rotation=r,e[p].reflow(new zt);return!0}},e.prototype.arrangeTitle=function(){var t=this.options,e=this.title,o=t.labels.mirror,r=t.vertical;e&&(r?(e.options.align=o?f:c,e.options.vAlign=e.options.position):(e.options.align=e.options.position,e.options.vAlign=o?g:s),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,r=void 0;st(o)?(this.shouldRenderNote(o)?e.show():e.hide(),r=this.noteSlot(o)):e.hide(),e.reflow(r||this.lineBox())}},e.prototype.noteSlot=function(t){return this.getSlot(t)},e.prototype.alignTo=function(t){var e=t.lineBox(),o=this.options.vertical,r=o?x:m;this.box.snapTo(e,r),o?this.box.shrink(0,this.lineBox().height()-e.height()):this.box.shrink(this.lineBox().width()-e.width(),0),this.box[r+1]-=this.lineBox()[r+1]-e[r+1],this.box[r+2]-=this.lineBox()[r+2]-e[r+2]},e.prototype.axisLabelText=function(t,e,o){var r,i=this,n=F(e),s=function(){return e.format?i.chartService.format.localeAuto(e.format,[t],e.culture):t};n?r=n(Object.assign({},o,{get text(){return s()},value:t,format:e.format,culture:e.culture})):r=s();return r},e.prototype.slot=function(t,e,o){var r=this.getSlot(t,e,o);if(r)return r.toRect()},e.prototype.contentBox=function(){var t=this.box.clone(),e=this.labels;if(e.length){var o=this.options.vertical?x:m;if(this.chartService.isPannable(o)){var r=this.maxLabelOffset();t[o+1]-=r.start,t[o+2]+=r.end}else{e[0].options.visible&&t.wrap(e[0].box);var i=e[e.length-1];i.options.visible&&t.wrap(i.box)}}return t},e.prototype.maxLabelOffset=function(){for(var t=this.options,e=t.vertical,o=t.reverse,r=this.labelsBetweenTicks(),i=this.getLabelsTickPositions(),n=e?x:m,s=this.labels,a=o?1:0,p=o?0:1,l=0,h=0,c=0;c<s.length;c++){var u=s[c],d=this.labelTickIndex(u),f=void 0,g=void 0;r?(f=i[d+a],g=i[d+p]):f=g=i[d],l=Math.max(l,f-u.box[n+1]),h=Math.max(h,u.box[n+2]-g)}return{start:l,end:h}},e.prototype.limitRange=function(t,e,o,r,i){var n=this.options;if(t<o&&i<0&&(!st(n.min)||n.min<=o)||r<e&&i>0&&(!st(n.max)||r<=n.max))return null;if(e<o&&i>0||r<t&&i<0)return{min:t,max:e};var s=e-t,a=t,p=e;return t<o&&i<0?(a=dt(t,o,r),p=dt(t+s,o+s,r)):e>r&&i>0&&(p=dt(e,o,r),a=dt(e-s,o,r-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(),r=t?x:m,i=this.lineDir(),n=r+(1===i?1:2).toString();return{axis:r,axisOrigin:n,axisDir:i,lineBox:e,lineSize:o,lineStart:e[n]}},e.prototype.pointOffset=function(t){var e=this.lineInfo(),o=e.axis,r=e.axisDir,i=e.axisOrigin,n=e.lineBox,s=e.lineSize;return(r>0?t[o]-n[i]:n[i]-t[o])/s},e.prototype.scaleToDelta=function(t,e){var o=dt(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}(Xt);wt(Be,{labels:{visible:!0,rotation:0,mirror:!1,step:1,skip:0},line:{width:1,color:n,visible:!0},title:{visible:!0,position:a},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:n,skip:0,step:1},margin:5,visible:!0,reverse:!1,justified:!0,notes:{label:{text:""}},_alignLines:!0,_deferLabels:!1});var Re=Be,Ie="days",Le="years",Ee={years:31536e6,months:26784e5,weeks:6048e5,days:864e5,hours:36e5,minutes:6e4,seconds:1e3,milliseconds:1};function De(t,e){return t.getTime()-e-6e4*(t.getTimezoneOffset()-e.getTimezoneOffset())}function je(t,e){return new Date(t.getTime()+e)}function Ve(t){var e;return t instanceof Date?e=t:t&&(e=new Date(t)),e}function ze(t,e){return 0===e&&23===t.getHours()&&(t.setHours(t.getHours()+2),!0)}function Ue(t,e,o,r){var i=t;if(t){var n=Ve(t),s=n.getHours();o===Le?ze(i=new Date(n.getFullYear()+e,0,1),0):"months"===o?ze(i=new Date(n.getFullYear(),n.getMonth()+e,1),s):"weeks"===o?ze(i=Ue(function(t,e){void 0===e&&(e=0);var o=0,r=t.getDay();if(!isNaN(r))for(;r!==e;)0===r?r=6:r--,o++;return je(t,864e5*-o)}(n,r),7*e,Ie),s):o===Ie?ze(i=new Date(n.getFullYear(),n.getMonth(),n.getDate()+e),s):"hours"===o?i=function(t,e){var o=new Date(t);o.setMinutes(0,0,0);var r=6e4*(t.getTimezoneOffset()-o.getTimezoneOffset());return je(o,r+36e5*e)}(n,e):"minutes"===o?(i=je(n,6e4*e)).getSeconds()>0&&i.setSeconds(0):"seconds"===o?i=je(n,1e3*e):"milliseconds"===o&&(i=je(n,e)),"milliseconds"!==o&&i.getMilliseconds()>0&&i.setMilliseconds(0)}return i}function He(t,e,o){return Ue(Ve(t),0,e,o)}function Fe(t,e,o){var r=Ve(t);return r&&He(r,e,o).getTime()===r.getTime()?r:Ue(r,1,e,o)}function Ne(t,e){return t&&e?t.getTime()-e.getTime():-1}function Ge(t,e){return t.getTime()-e}function We(t){if(b(t)){for(var e=[],o=0;o<t.length;o++)e.push(We(t[o]));return e}if(t)return Ve(t).getTime()}function Xe(t,e){return t&&e?We(t)===We(e):t===e}function Ye(t,e,o){return De(t,e)/Ee[o]}function qe(t,e,o,r){var i=Ve(t),n=Ve(e);return("months"===o?i.getMonth()-n.getMonth()+12*(i.getFullYear()-n.getFullYear())+Ye(i,new Date(i.getFullYear(),i.getMonth()),Ie)/new Date(i.getFullYear(),i.getMonth()+1,0).getDate():o===Le?i.getFullYear()-n.getFullYear()+qe(i,new Date(i.getFullYear(),0),"months",1)/12:o===Ie||"weeks"===o?Ye(i,n,o):Ge(i,e)/Ee[o])/r}function Qe(t,e,o){return o===Le?e.getFullYear()-t.getFullYear():"months"===o?12*Qe(t,e,Le)+e.getMonth()-t.getMonth():o===Ie?Math.floor(Ge(e,t)/864e5):Math.floor(Ge(e,t)/Ee[o])}function Ze(t,e){return M(e)&&t.parseDate(e)||Ve(e)}function Ke(t,e){if(b(e)){for(var o=[],r=0;r<e.length;r++)o.push(Ze(t,e[r]));return o}return Ze(t,e)}function $e(t,e){return P(t.weekStartDay)?t.weekStartDay:e&&e.firstDay?e.firstDay():0}var Je=function(t){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=st(t.min),r=st(t.max);if(t.srcCategories=t.categories=e,(o||r)&&e.length){var i,n=o?Math.floor(t.min):0;i=r?t.justified?Math.floor(t.max)+1:Math.ceil(t.max):e.length,t.categories=t.categories.slice(n,i)}return t},e.prototype.rangeIndices=function(){var t=this.options,e=t.categories.length||1;return{min:P(t.min)?t.min%1:0,max:P(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,r=P(o.min)?o.min:0;if(e=P(o.max)?o.max:P(o.min)?r+o.categories.length:this.totalRange().max||1,t){var i=this.totalRange();r=dt(r,0,i.max),e=dt(e,0,i.max)}return{min:r,max:e}},e.prototype.range=function(){var t=this.options;return{min:P(t.min)?t.min:0,max:P(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,r=this.lineBox();return{scale:(this.options.vertical?r.height():r.width())/(o-e||1)*(this.options.reverse?-1:1),box:r,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?x:m,r=t[o+1],i=t[o+2],n=e[0],s=ut(e);(n.box[o+1]>i||n.box[o+2]<r)&&(n.options.visible=!1),(s.box[o+1]>i||s.box[o+2]<r)&&(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,r=e.max,i=Math.ceil(r),n=Math.floor(o),s=[];n<=i;)s.push(n),n+=t;return s},e.prototype.getTickPositions=function(t){for(var e=this.options,o=e.vertical,r=e.reverse,i=this.scaleOptions(),n=i.scale,s=i.box,a=i.min,p=s[(o?x:m)+(r?2:1)],l=this.tickIndices(t),h=[],c=0;c<l.length;c++)h.push(p+yt(n*(l[c]-a),3));return h},e.prototype.getTicks=function(){var t=this.options,e=this._ticks,o=this.rangeIndices(),r=this.lineBox(),i=r.getHash()+o.min+","+o.max+t.reverse+t.justified;if(e._hash!==i){var n=t.minorTicks.visible||t.minorGridLines.visible;e._hash=i,e.labelTicks=this.getTickPositions(1),e.majorTicks=this.filterOutOfRangePositions(e.labelTicks,r),e.minorTicks=n?this.filterOutOfRangePositions(this.getTickPositions(.5),r):[]}return e},e.prototype.filterOutOfRangePositions=function(t,e){if(!t.length)return t;for(var o=this.options.vertical?x:m,r=function(t){return e[o+1]<=t&&t<=e[o+2]},i=t.length-1,n=0;!r(t[n])&&n<=i;)n++;for(var s=i;!r(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,r=this.lineBox(),i=e?r.height():r.width(),n=e?x:m,s=o?-1:1,a=n+(1===s?1:2).toString();return{axis:n,axisOrigin:a,axisDir:s,lineBox:r,lineSize:i,lineStart:r[a]}},e.prototype.lineDir=function(){return this.options.reverse?-1:1},e.prototype.getSlot=function(t,e,o){var r=this.options,i=r.reverse,n=r.justified,s=this.scaleOptions(),a=s.scale,p=s.box,l=s.min,h=this.lineInfo(),c=h.axis,u=h.lineStart,d=p.clone(),f=!st(e),g=mt(t,0),y=mt(e,g);y=Math.max(y-1,g);var v=u+(g-l)*a,m=u+((y=Math.max(g,y))+1-l)*a;return f&&n&&(m=v),o&&(v=dt(v,p[c+1],p[c+2]),m=dt(m,p[c+1],p[c+2])),d[c+1]=i?m:v,d[c+2]=i?v:m,d},e.prototype.limitSlot=function(t){var e=this.options.vertical?x:m,o=this.lineBox(),r=t.clone();return r[e+1]=dt(t[e+1],o[e+1],o[e+2]),r[e+2]=dt(t[e+2],o[e+1],o[e+2]),r},e.prototype.slot=function(e,o,r){var i=Math.floor(this.options.min||0),n=e,s=o;return"string"==typeof n?n=this.categoryIndex(n):P(n)&&(n-=i),"string"==typeof s?s=this.categoryIndex(s):P(s)&&(s-=i),t.prototype.slot.call(this,n,s,r)},e.prototype.pointCategoryIndex=function(t){var e=this.options,o=e.reverse,r=e.justified,i=e.vertical?x:m,n=this.scaleOptions(),s=n.scale,a=n.box,p=n.min,l=n.max,h=o?l:p,c=a[i+1],u=a[i+2],d=t[i];if(d<c||d>u)return null;var f=h+(d-c)/s,g=f%1;return r?f=Math.round(f):0===g&&f>0&&f--,Math.floor(f)},e.prototype.getCategory=function(t){var e=this.pointCategoryIndex(t);return null===e?null:this.options.categories[e]},e.prototype.categoryIndex=function(t){return this.totalIndex(t)-Math.floor(this.options.min||0)},e.prototype.categoryAt=function(t,e){var 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(),r=e.vertical?o.height():o.width(),i=e.categories.length,n=yt(t/(r/i),10);return{min:n,max:i+n}},e.prototype.scaleRange=function(t,e){var o=Math.abs(this.pointOffset(e)),r=this.totalRangeIndices(),i=r.max-r.min,n=this.scaleToDelta(t,i),s=o*n,a=(1-o)*n,p=r.min+s,l=r.max-a;return l-p<.1&&(l=p+.1),{min:p,max:l}},e.prototype.zoomRange=function(t,e){var o=this.totalRange(),r=o.min,i=o.max,n=this.scaleRange(t,e);return{min:dt(n.min,r,i),max:dt(n.max,r,i)}},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,r=this.totalRangeIndices(!0),i=r.min,n=r.max,s=Math.floor(i);return e?(i=Math.ceil(i),n=Math.floor(n)):(i=Math.floor(i),n=Math.ceil(n)),{min:(i>o.skip?o.skip+o.step*Math.ceil((i-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 r=this.options,i=r.dataItems?r.dataItems[t]:null,n=mt(r.categories[t],"");o.dataItem=i;var s=this.axisLabelText(n,e,o);return new ue(n,s,t,i,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?x:m,r=e[o+1],i=e[o+2],n=0;n<t.length;n++){var s=t[n];s.box&&(i<s.box[o+1]||s.box[o+2]<r)&&s.hide()}},e.prototype.pan=function(t){var e=this.totalRangeIndices(!0),o=this.scaleOptions().scale,r=yt(t/o,10),i=this.totalRange(),n=e.min+r,s=e.max+r;return this.limitRange(n,s,0,i.max,r)},e.prototype.pointsRange=function(t,e){var o=this.options,r=o.reverse,i=o.vertical?x:m,n=this.totalRangeIndices(!0),s=this.scaleOptions(),a=s.scale,p=s.box[i+(r?2:1)],l=t[i]-p,h=e[i]-p,c=n.min+l/a,u=n.min+h/a,d=Math.min(c,u),f=Math.max(c,u);if(f-d>=.01)return{min:d,max:f}},e.prototype.valueRange=function(){return this.range()},e.prototype.totalIndex=function(t){var e=this.options;return this._categoriesMap?this._categoriesMap.get(t):function(t,e){if(t instanceof Date){for(var o=e.length,r=0;r<o;r++)if(Xe(e[r],t))return r;return-1}return e.indexOf(t)}(t,e.srcCategories)},e.prototype.currentRangeIndices=function(){var t=this.options,e=0;return P(t.min)&&(e=Math.floor(t.min)),{min:e,max:P(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 Q,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}(Re);wt(Je,{type:"category",vertical:!1,majorGridLines:{visible:!1,width:1,color:n},labels:{zIndex:1},justified:!1,_deferLabels:!0});var to=Je,eo={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"},oo=["milliseconds","seconds","minutes","hours",Ie,"weeks","months",Le];function ro(t){var e=t._range;return e||((e=t._range=_t(t)).min=Ve(e.min),e.max=Ve(e.max)),e}var io=function(t){this.options=t};io.prototype.displayIndices=function(){return{min:0,max:1}},io.prototype.displayRange=function(){return{}},io.prototype.total=function(){return{}},io.prototype.valueRange=function(){return{}},io.prototype.valueIndex=function(){return-1},io.prototype.values=function(){return[]},io.prototype.totalIndex=function(){return-1},io.prototype.valuesCount=function(){return 0},io.prototype.totalCount=function(){return 0},io.prototype.dateAt=function(){return null};var no=function(t,e,o){this.options=o,o.baseUnitStep=o.baseUnitStep||1;var r=o.roundToBaseUnit,i=o.justified;this.start=Ue(t,0,o.baseUnit,o.weekStartDay);var n=this.roundToTotalStep(e),s=!i&&Xe(e,n)&&!o.justifyEnd;this.end=this.roundToTotalStep(e,!i,s?1:0);var a=o.min||t;this.valueStart=this.roundToTotalStep(a),this.displayStart=r?this.valueStart:a;var p=o.max;if(p){var l=!i&&Xe(p,this.roundToTotalStep(p))?-1:0;this.valueEnd=this.roundToTotalStep(p,!1,l),this.displayEnd=r?this.roundToTotalStep(p,!i):o.max}else this.valueEnd=n,this.displayEnd=r||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 so(t,e,o){for(var r,i,n,s=ro(t.categories),a=(t.max||s.max)-(t.min||s.min),p=t.autoBaseUnitSteps,l=t.maxDateGroups,h="fit"===t.baseUnit,c=e?oo.indexOf(e):0,u=h?oo[c++]:t.baseUnit,d=a/Ee[u],f=d;!i||d>=l;){r=r||p[u].slice(0);do{n=r.shift()}while(n&&e===u&&n<o);if(n)d=f/(i=n);else{if(u===ut(oo)){i=Math.ceil(f/l);break}if(!h){d>l&&(i=Math.ceil(f/l));break}u=oo[c++]||ut(oo),f=a/Ee[u],r=null}}t.baseUnitStep=i,t.baseUnit=u}function ao(t){var e=(t.baseUnit||"").toLowerCase();return"fit"!==e&&!Z(e,oo)&&function(t){for(var e,o,r=t.categories,i=st(r)?r.length:0,n=u,s=0;s<i;s++){var a=r[s];if(a&&e){var p=De(a,e);p>0&&(o=(n=Math.min(n,p))>=31536e6?Le:n>=24192e5?"months":n>=6048e5?"weeks":n>=864e5?Ie:n>=36e5?"hours":n>=6e4?"minutes":"seconds")}e=a}t.baseUnit=o||Ie}(t),"fit"!==e&&"auto"!==t.baseUnitStep||so(t),t}no.prototype.displayRange=function(){return{min:this.displayStart,max:this.displayEnd}},no.prototype.displayIndices=function(){if(!this._indices){var t=this.options,e=t.baseUnit,o=t.baseUnitStep,r=qe(this.displayStart,this.valueStart,e,o),i=qe(this.displayEnd,this.valueStart,e,o);this._indices={min:r,max:i}}return this._indices},no.prototype.total=function(){return{min:this.start,max:this.end}},no.prototype.totalCount=function(){return this.totalIndex(this.end)+(this.options.justified?1:0)},no.prototype.valueRange=function(){return{min:this.valueStart,max:this.valueEnd}},no.prototype.valueIndex=function(t){var e=this.options;return Math.floor(qe(t,this.valueStart,e.baseUnit,e.baseUnitStep))},no.prototype.totalIndex=function(t){var e=this.options;return Math.floor(qe(t,this.start,e.baseUnit,e.baseUnitStep))},no.prototype.dateIndex=function(t){var e=this.options;return qe(t,this.valueStart,e.baseUnit,e.baseUnitStep)},no.prototype.valuesCount=function(){return this.valueIndex(this.valueEnd)+1},no.prototype.values=function(){var t=this._values;if(!t){var e=this.options,o=this.valueRange();this._values=t=[];for(var r=o.min;r<=o.max;)t.push(r),r=Ue(r,e.baseUnitStep,e.baseUnit,e.weekStartDay)}return t},no.prototype.dateAt=function(t,e){var o=this.options;return Ue(e?this.start:this.valueStart,o.baseUnitStep*t,o.baseUnit,o.weekStartDay)},no.prototype.roundToTotalStep=function(t,e,o){var r=this.options,i=r.baseUnit,n=r.baseUnitStep,s=r.weekStartDay,a=this.start,p=qe(t,a,i,n),l=e?Math.ceil(p):Math.floor(p);return o&&(l+=o),Ue(a,l*n,i,s)};var po=function(t){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,r=this.options,i=r.categories||[];if(i._parsed||((i=Ke(o,i))._parsed=!0),r=R({roundToBaseUnit:!0},r,{categories:i,min:Ze(o,r.min),max:Ze(o,r.max),weekStartDay:$e(r,o)}),e.panning&&e.isPannable(r.vertical?x:m)&&(r.roundToBaseUnit=!1),r.userSetBaseUnit=r.userSetBaseUnit||r.baseUnit,r.userSetBaseUnitStep=r.userSetBaseUnitStep||r.baseUnitStep,this.options=r,r.srcCategories=i,i.length>0){var n=ro(i),s=r.maxDivisions;if(this.dataRange=new no(n.min,n.max,ao(r)),s){var a=this.dataRange.displayRange(),p=Object.assign({},r,{justified:!0,roundToBaseUnit:!1,baseUnit:"fit",min:a.min,max:a.max,maxDateGroups:s}),l=this.dataRange.options;so(p,l.baseUnit,l.baseUnitStep),this.divisionRange=new no(n.min,n.max,p)}else this.divisionRange=this.dataRange}else r.baseUnit=r.baseUnit||Ie,this.dataRange=this.divisionRange=new io(r);this.rangeLabels=[]},e.prototype.tickIndices=function(e){var o=this.dataRange,r=this.divisionRange,i=r.valuesCount();if(!this.options.maxDivisions||!i)return t.prototype.tickIndices.call(this,e);var n=[],s=r.values(),a=0;this.options.justified||(s=s.concat(r.dateAt(i)),a=.5);for(var p=0;p<s.length;p++)if(n.push(o.dateIndex(s[p])+a),1!==e&&p>=1){var l=n.length-1;n.splice(p,0,n[l-1]+(n[l]-n[l-1])*e)}return n},e.prototype.shouldRenderNote=function(t){var e=this.range(),o=this.options.categories||[];return Ne(t,e.min)>=0&&Ne(t,e.max)<=0&&o.length},e.prototype.parseNoteValue=function(t){return Ze(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,r=e.weekStartDay,i=e.vertical,n=this.lineBox(),s=i?n.height():n.width(),a=this.range(),p=s/(a.max-a.min),l=yt(t/p,10);if(a.min&&a.max){var h=je(e.min||a.min,l),c=je(e.max||a.max,l);a={min:Ue(h,0,o,r),max:Ue(c,0,o,r)}}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(),r=e.vertical?o.height():o.width(),i=this.dataRange.displayRange(),n=i.min,s=i.max,a=this.dataRange.total(),p=yt(t/(r/(s-n)),10)*(e.reverse?-1:1),l=je(n,p),h=je(s,p),c=this.limitRange(We(l),We(h),We(a.min),We(a.max),p);return c?(c.min=Ve(c.min),c.max=Ve(c.max),c.baseUnit=e.baseUnit,c.baseUnitStep=e.baseUnitStep||1,c.userSetBaseUnit=e.userSetBaseUnit,c.userSetBaseUnitStep=e.userSetBaseUnitStep,c):void 0},e.prototype.pointsRange=function(e,o){if(this.isEmpty())return null;var r=t.prototype.pointsRange.call(this,e,o),i=this.dataRange.displayRange(),n=this.dataRange.displayIndices(),s=Ge(i.max,i.min)/(n.max-n.min),a=this.options;return{min:je(i.min,r.min*s),max:je(i.min,r.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,r="fit"===o.userSetBaseUnit,i=this.dataRange.total(),n=this.dataRange.displayRange(),s=n.min,a=n.max,p=Math.abs(this.pointOffset(e)),l=a-s,h=this.scaleToDelta(t,l),c=Math.round(p*h),u=Math.round((1-p)*h),d=this.dataRange.options.baseUnit,f=new Date(s.getTime()+c),g=new Date(a.getTime()-u);if(r){var y,v,m=o.autoBaseUnitSteps,x=o.maxDateGroups,b=ut(m[d])*x*Ee[d],w=Ge(a,s),_=Ge(g,f),C=oo.indexOf(d);if(_<Ee[d]&&"milliseconds"!==d)d=oo[C-1],f=je(s,v=(w-(x-1)*(y=ut(m[d]))*Ee[d])/2),g=je(a,-v);else if(_>b&&d!==Le){var k=0;do{C++,d=oo[C],k=0,v=2*Ee[d];do{y=m[d][k],k++}while(k<m[d].length&&v*y<w)}while(d!==Le&&v*y<w);(v=(v*y-w)/2)>0&&(f=je(s,-v),g=je(a,v),f=je(f,dt(g,i.min,i.max)-g),g=je(g,dt(f,i.min,i.max)-f))}}return f&&g&&Ge(g,f)>0?{min:f,max:g,baseUnit:o.userSetBaseUnit||o.baseUnit,baseUnitStep:o.userSetBaseUnitStep||o.baseUnitStep}:void 0},e.prototype.zoomRange=function(t,e){var o=this.dataRange.total(),r=this.scaleRange(t,e);return r&&(r.min<o.min&&(r.min=o.min),r.max>o.max&&(r.max=o.max)),r},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(),r=t.vertical,i=t.rangeLabels.mirror||t.labels.mirror,n=e[0];if(n){var s=r?o.y1-n.box.height()/2:o.x1;this.positionLabel(n,i,s)}var a=e[1];if(a){var p=r?o.y2-a.box.height()/2:o.x2;this.positionLabel(a,i,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 r=0;r<e.length;r++){if(!s(o,e[r]))break}var i=t[1];if(i&&i.options.visible)for(var n=e.length-1;n>0;--n){if(!s(i,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,r=0;r<o.length;r++){var i=o[r];i.options.visible&&e.wrap(i.box)}return e},e.prototype.createAxisLabel=function(t,e,o){void 0===o&&(o={});var r=this.options,i=r.dataItems&&!r.maxDivisions?r.dataItems[t]:null,n=this.divisionRange.dateAt(t),s=e.dateFormats[this.divisionRange.options.baseUnit];e.format=e.format||s,o.dataItem=i;var a=this.axisLabelText(n,e,o);if(a)return new ue(n,a,t,i,e)},e.prototype.createRangeLabels=function(){var t=this,e=this.divisionRange,o=e.displayStart,r=e.displayEnd,i=this.options,n=Object.assign({},i.labels,i.rangeLabels,{align:a,zIndex:i.zIndex});if(!0===n.visible){this.normalizeLabelRotation(n),n.alignRotation=a,"auto"===n.rotation&&(n.rotation=0,i.autoRotateRangeLabels=!0);var s=n.dateFormats[this.divisionRange.options.baseUnit];n.format=n.format||s;var p=function(e,o,r){if(r){var i=new ue(o,r,e,null,n);t.append(i),t.rangeLabels.push(i)}};p(0,o,this.axisLabelText(o,n,{index:0,count:2})),p(1,r,this.axisLabelText(r,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,r){var i=2*Math.abs(o[r+1]-o[r]),n=t.autoRotateLabelAngle(e.box,i);0!==n&&(e.options.rotation=n,e.reflow(new zt))},r=this.getMajorTickPositions();o(e[0],r,0),o(e[1],r,r.length-2)}},e.prototype.categoryIndex=function(t){return this.dataRange.valueIndex(t)},e.prototype.slot=function(t,e,o){var r=this.dataRange,i=t,n=e;i instanceof Date&&(i=r.dateIndex(i)),n instanceof Date&&(n=r.dateIndex(n));var s=this.getSlot(i,n,o);if(s)return s.toRect()},e.prototype.getSlot=function(e,o,r){var i=e,n=o;return"object"==typeof i&&(i=this.categoryIndex(i)),"object"==typeof n&&(n=this.categoryIndex(n)),t.prototype.getSlot.call(this,i,n,r)},e.prototype.valueRange=function(){var t=ro(this.options.srcCategories);return{min:Ve(t.min),max:Ve(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=ro(t.srcCategories);return new no(e.min,e.max,Object.assign({},t,{justified:!1,roundToBaseUnit:!0,justifyEnd:t.justified})).displayRange()},e}(to);wt(po,{type:l,labels:{dateFormats:eo},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 lo=po;function ho(t,e){return yt(Math.floor(t/e)*e,10)}function co(t,e){return yt(Math.ceil(t/e)*e,10)}function uo(t){return Math.max(Math.min(t,3e5),-3e5)}var fo=Math.pow(10,-9),go=function(t){function e(e,o,r,i){t.call(this,Object.assign({},r,{seriesMin:e,seriesMax:o}),i)}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 r=o.narrowRange,i=function(t,e,o){if(!t&&!e)return 0;var r;if(t>=0&&e>=0){var i=t===e?0:t;if(!1===o||!o&&(e-i)/e>.2)return 0;r=Math.max(0,i-(e-i)/2)}else r=t;return r}(t,e,r),n=function(t,e,o){if(!t&&!e)return 1;var r;if(t<=0&&e<=0){var i=t===e?0:e,n=Math.abs((i-t)/i);if(!1===o||!o&&n>.2)return 0;r=Math.min(0,i-(t-i)/2)}else r=e;return r}(t,e,r),s=Dt(i,n),a={majorUnit:s};!1!==o.roundToMajorUnit&&(i<0&&yo(i,s,1/3)&&(i-=s),n>0&&yo(n,s,1/3)&&(n+=s));return a.min=ho(i,s),a.max=co(n,s),a}(t.seriesMin,t.seriesMax,t);return this.totalOptions=function(t,e){return{min:st(e.min)?Math.min(t.min,e.min):t.min,max:st(e.max)?Math.max(t.max,e.max):t.max,majorUnit:t.majorUnit}}(e,t),function(t,e){var o,r,i=e;if(e){!function(t,e){for(var o=0;o<e.length;o++){var r=e[o];null===t[r]&&(t[r]=void 0)}}(e,["min","max"]),o=st(e.min),r=st(e.max);var n=o||r;n&&e.min===e.max&&(e.min>0?e.min=0:e.max=1),e.majorUnit?(t.min=ho(t.min,e.majorUnit),t.max=co(t.max,e.majorUnit)):n&&(i=R(t,e),t.majorUnit=Dt(i.min,i.max))}t.minorUnit=(i.majorUnit||t.majorUnit)/5;var s=R(t,i);s.min>=s.max&&(o&&!r?s.max=s.min+s.majorUnit:!o&&r&&(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(yt(o/t,3))+1},e.prototype.getTickPositions=function(t,e){var o=this.options,r=this.lineInfo(),i=r.axisDir,n=r.axisOrigin,s=r.lineBox,a=t*(r.lineSize/(o.max-o.min)),p=this.getDivisions(t),l=[],h=s[n],c=0;e&&(c=e/t);for(var u=0;u<p;u++)u%c!=0&&l.push(yt(h,3)),h+=a*i;return l},e.prototype.getMajorTickPositions=function(){return this.getTickPositions(this.options.majorUnit)},e.prototype.getMinorTickPositions=function(){return this.getTickPositions(this.options.minorUnit)},e.prototype.getSlot=function(t,e,o){void 0===o&&(o=!1);var r=this.options,i=this.lineInfo(),n=i.axis,s=i.axisDir,a=i.lineBox,p=i.lineSize,l=i.lineStart,h=s*(p/(r.max-r.min)),c=mt(t,e||0),u=mt(e,t||0);o&&(c=dt(c,r.min,r.max),u=dt(u,r.min,r.max));var d=Math.min(c,u)-r.min,f=Math.max(c,u)-r.min,g=new zt(a.x1,a.y1,a.x1,a.y1);return g[n+1]=uo(l+h*(s>0?d:f)),g[n+2]=uo(l+h*(s>0?f:d)),g},e.prototype.getValue=function(t){var e=this.options,o=Number(e.max),r=Number(e.min),i=this.pointOffset(t);return i<0||i>1?null:yt(r+i*(o-r),10)},e.prototype.translateRange=function(t){var e=this.options,o=e.vertical,r=e.reverse,i=e.max,n=e.min,s=this.lineInfo().lineSize,a=yt(t/(s/(i-n)),10);return!o&&!r||o&&r||(a=-a),{min:n+a,max:i+a,offset:a}},e.prototype.labelsCount=function(){return this.getDivisions(this.options.majorUnit)},e.prototype.createAxisLabel=function(t,e,o){var r=this.options,i=yt(r.min+t*r.majorUnit,10),n=this.axisLabelText(i,e,o);return new ue(i,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),r=this.getValue(e),i=Math.min(o,r),n=Math.max(o,r);if(this.isValidRange(i,n))return{min:i,max:n}},e.prototype.scaleRange=function(t,e){var o=Math.abs(this.pointOffset(e)),r=this.options.max-this.options.min,i=this.scaleToDelta(t,r),n=o*i,s=(1-o)*i,a=yt(this.options.min+n,10),p=yt(this.options.max-s,10);return p-a<fo&&(p=a+fo),{min:a,max:p}},e.prototype.zoomRange=function(t,e){var o=this.totalMin,r=this.totalMax,i=this.scaleRange(t,e);return{min:dt(i.min,o,r),max:dt(i.max,o,r)}},e.prototype.isValidRange=function(t,e){return e-t>fo},e}(Re);function yo(t,e,o){var r=yt(Math.abs(t%e),10);return 0===r||r>e*(1-o)}wt(go,{type:"numeric",min:0,max:1,vertical:!0,majorGridLines:{visible:!0,width:1,color:n},labels:{format:"#.####################"},zIndex:1});var vo=go,mo=function(t){function e(e,o,r,i){var n=Ve(e),s=Ve(o),a=i.intl,p=r||{};p=function(t,e,o){var r=o.min||t,i=o.max||e,n=o.baseUnit||(i&&r?function(t){var e="hours";t>=31536e6?e=Le:t>=26784e5?e="months":t>=6048e5?e="weeks":t>=864e5&&(e=Ie);return e}(De(i,r)):"hours"),s=Ee[n],a=o.weekStartDay||0,p=He(We(r)-1,n,a)||Ve(i),l=Fe(We(i)+1,n,a),h=(o.majorUnit?o.majorUnit:void 0)||co(Dt(p.getTime(),l.getTime()),s)/s,c=Qe(p,l,n),u=co(c,h)-c,d=Math.floor(u/2),f=u-d;o.baseUnit||delete o.baseUnit;return o.baseUnit=o.baseUnit||n,o.min=o.min||Ue(p,-d,n,a),o.max=o.max||Ue(l,f,n,a),o.minorUnit=o.minorUnit||h/5,o.majorUnit=h,o}(n,s,p=R(p||{},{min:Ze(a,p.min),max:Ze(a,p.max),axisCrossingValue:Ke(a,p.axisCrossingValues||p.axisCrossingValue),weekStartDay:$e(p,a)})),t.call(this,p,i),this.intlService=a,this.seriesMin=n,this.seriesMax=s;var l=p.weekStartDay||0;this.totalMin=We(He(We(n)-1,p.baseUnit,l)),this.totalMax=We(Fe(We(s)+1,p.baseUnit,l))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.clone=function(){return new e(this.seriesMin,this.seriesMax,Object.assign({},this.options),this.chartService)},e.prototype.range=function(){var t=this.options;return{min:t.min,max:t.max}},e.prototype.getDivisions=function(t){var e=this.options;return Math.floor(Qe(e.min,e.max,e.baseUnit)/t+1)},e.prototype.getTickPositions=function(t){for(var e=this.options,o=this.lineInfo(),r=o.axisDir,i=o.lineSize,n=o.lineStart,s=this.getDivisions(t),a=i/Ge(e.max,e.min),p=e.weekStartDay||0,l=[n],h=1;h<s;h++){var c=n+Ge(Ue(e.min,h*t,e.baseUnit,p),e.min)*a*r;l.push(yt(c,3))}return l},e.prototype.getMajorTickPositions=function(){return this.getTickPositions(this.options.majorUnit)},e.prototype.getMinorTickPositions=function(){return this.getTickPositions(this.options.minorUnit)},e.prototype.getSlot=function(t,e,o){return vo.prototype.getSlot.call(this,Ze(this.intlService,t),Ze(this.intlService,e),o)},e.prototype.getValue=function(t){var e=vo.prototype.getValue.call(this,t);return null!==e?Ve(e):null},e.prototype.labelsCount=function(){return this.getDivisions(this.options.majorUnit)},e.prototype.createAxisLabel=function(t,e,o){var r=this.options,i=t*r.majorUnit,n=r.weekStartDay||0,s=r.min;i>0&&(s=Ue(s,i,r.baseUnit,n));var a=e.dateFormats[r.baseUnit];e.format=e.format||a;var p=this.axisLabelText(s,e,o);return new ue(s,p,t,null,e)},e.prototype.translateRange=function(t){var e=this.options,o=this.lineBox(),r=e.vertical,i=e.reverse,n=r?o.height():o.width(),s=this.range(),a=n/Ge(s.max,s.min),p=yt(t/a,10);return!r&&!i||r&&i||(p=-p),{min:je(e.min,p),max:je(e.max,p),offset:p}},e.prototype.shouldRenderNote=function(t){var e=this.range();return Ne(t,e.min)>=0&&Ne(t,e.max)<=0},e.prototype.pan=function(t){var e=this.translateRange(t,!0),o=this.limitRange(We(e.min),We(e.max),this.totalMin,this.totalMax,e.offset);if(o)return{min:Ve(o.min),max:Ve(o.max)}},e.prototype.pointsRange=function(t,e){var o=this.getValue(t),r=this.getValue(e),i=Math.min(o,r),n=Math.max(o,r);return{min:Ve(i),max:Ve(n)}},e.prototype.scaleRange=function(t,e){var o=Math.abs(this.pointOffset(e)),r=this.options.max-this.options.min,i=this.scaleToDelta(t,r),n=o*i,s=(1-o)*i,a=Ve(We(this.options.min)+n),p=Ve(We(this.options.max)-s);return p-a<1e3&&(p=Ve(We(a)+1e3)),{min:a,max:p}},e.prototype.zoomRange=function(t,e){var o=this.scaleRange(t,e);return{min:Ve(dt(We(o.min),this.totalMin,this.totalMax)),max:Ve(dt(We(o.max),this.totalMin,this.totalMax))}},e}(Re);wt(mo,{type:l,majorGridLines:{visible:!0,width:1,color:n},labels:{dateFormats:eo}});var xo=mo,bo=function(t){function e(e,o,r,i){var n=R({majorUnit:10,min:e,max:o},r),s=n.majorUnit,a=function(t,e){var o,r=yt(_o(t,e),10)%1;o=t<=0?e:0!==r&&(r<.3||r>.9)?Math.pow(e,_o(t,e)+.2):Math.pow(e,Math.ceil(_o(t,e)));return o}(o,s),p=function(t,e,o){var r=o.majorUnit,i=t;t<=0?i=e<=1?Math.pow(r,-2):1:o.narrowRange||(i=Math.pow(r,Math.floor(_o(t,r))));return i}(e,o,n),l=function(t,e,o,r){var i=o.min,n=o.max;st(o.axisCrossingValue)&&o.axisCrossingValue<=0&&wo();st(r.max)?r.max<=0&&wo():n=e;st(r.min)?r.min<=0&&wo():i=t;return{min:i,max:n}}(p,a,n,r);n.max=l.max,n.min=l.min,n.minorUnit=r.minorUnit||yt(s-1,10),t.call(this,n,i),this.totalMin=st(r.min)?Math.min(p,r.min):p,this.totalMax=st(r.max)?Math.max(a,r.max):a,this.logMin=yt(_o(l.min,s),10),this.logMax=yt(_o(l.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 r=this.options,i=this.logMin,n=this.logMax,s=r.majorUnit,a=r.min,p=r.max,l=this.lineInfo(),h=l.axis,c=l.axisDir,u=l.lineBox,d=l.lineSize,f=l.lineStart,g=c*(d/(n-i)),y=mt(t,e||1),v=mt(e,t||1);if(y<=0||v<=0)return null;o&&(y=dt(y,a,p),v=dt(v,a,p)),y=_o(y,s),v=_o(v,s);var m=Math.min(y,v)-i,x=Math.max(y,v)-i,b=new zt(u.x1,u.y1,u.x1,u.y1);return b[h+1]=uo(f+g*(c>0?m:x)),b[h+2]=uo(f+g*(c>0?x:m)),b},e.prototype.getValue=function(t){var e=this.options,o=this.logMin,r=this.logMax,i=e.majorUnit,n=this.lineInfo(),s=n.axis,a=n.axisDir,p=n.lineStart,l=n.lineSize,h=(r-o)/l,c=a*(t[s]-p);if(c<0||c>l)return null;var u=o+c*h;return yt(Math.pow(i,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,r=this.logMax,i=e.reverse,n=e.vertical,s=e.majorUnit,a=this.lineBox(),p=n?a.height():a.width(),l=yt(t/(p/(r-o)),10);return!n&&!i||n&&i||(l=-l),{min:Math.pow(s,o+l),max:Math.pow(s,r+l),offset:l}},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,r=e.minorTicks,i=e.vertical,n=e.labels.mirror,s=this.lineBox(),a={vertical:i};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(Oe(a,o))}return o.visible&&this.traverseMajorTicksPositions(p,o),r.visible&&this.traverseMinorTicksPositions(p,r),[]},e.prototype.createGridLines=function(t){var e=this.options,o=e.minorGridLines,r=e.majorGridLines,i=e.vertical,n=t.lineBox(),s={lineStart:n[i?"x1":"y1"],lineEnd:n[i?"x2":"y2"],vertical:i},a=[],p=this.gridLinesVisual();function l(t,e){Z(t,a)||(s.position=t,p.append(Te(s,e)),a.push(t))}return r.visible&&this.traverseMajorTicksPositions(l,r),o.visible&&this.traverseMinorTicksPositions(l,o),p.children},e.prototype.traverseMajorTicksPositions=function(t,e){for(var o=this.lineInfo(),r=o.lineStart,i=o.step,n=this.logMin,s=this.logMax,a=Math.ceil(n)+e.skip;a<=s;a+=e.step){t(yt(r+i*(a-n),10),e)}},e.prototype.traverseMinorTicksPositions=function(t,e){for(var o=this.options,r=o.min,i=o.max,n=o.minorUnit,s=o.majorUnit,a=this.lineInfo(),p=a.lineStart,l=a.step,h=this.logMin,c=this.logMax,u=Math.floor(h);u<c;u++)for(var d=this._minorIntervalOptions(u),f=e.skip;f<n;f+=e.step){var g=d.value+f*d.minorStep;if(g>i)break;if(g>=r)t(yt(p+l*(_o(g,s)-h),10),e)}},e.prototype.createAxisLabel=function(t,e,o){var r=Math.ceil(this.logMin+t),i=Math.pow(this.options.majorUnit,r),n=this.axisLabelText(i,e,o);return new ue(i,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),r=this.getValue(e);return{min:Math.min(o,r),max:Math.max(o,r)}},e.prototype.scaleRange=function(t,e){var o=this.options.majorUnit,r=_o(this.options.min,o),i=_o(this.options.max,o),n=Math.abs(this.pointOffset(e)),s=i-r,a=this.scaleToDelta(t,s),p=Math.pow(o,r+n*a),l=Math.pow(o,i-(1-n)*a);return l-p<1e-6&&(l=p+1e-6),{min:p,max:l}},e.prototype.zoomRange=function(t,e){var o=this.scaleRange(t,e),r=this.totalMin,i=this.totalMax;return{min:dt(o.min,r,i),max:dt(o.max,r,i)}},e.prototype._minorIntervalOptions=function(t){var e=this.options,o=e.minorUnit,r=e.majorUnit,i=Math.pow(r,t);return{value:i,minorStep:(Math.pow(r,t+1)-i)/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}(Re);function wo(){throw new Error("Non positive values cannot be used for a logarithmic axis")}function _o(t,e){return Math.log(t)/Math.log(e)}wt(bo,{type:"log",majorUnit:10,minorUnit:1,axisCrossingValue:1,vertical:!0,majorGridLines:{visible:!0,width:1,color:n},zIndex:1,_deferLabels:!0});var Co=bo,ko={createGridLines:function(t){var e,o,r=this.options,i=Math.abs(this.box.center().y-t.lineBox().y1),n=[],s=!1;return r.majorGridLines.visible&&(e=this.majorGridLineAngles(t),s=!0,n=this.renderMajorGridLines(e,i,r.majorGridLines)),r.minorGridLines.visible&&(o=this.minorGridLineAngles(t,s),it(n,this.renderMinorGridLines(o,i,r.minorGridLines,t,s))),n},renderMajorGridLines:function(t,e,o){return this.renderGridLines(t,e,o)},renderMinorGridLines:function(t,e,o,r,i){var n=this.radiusCallback&&this.radiusCallback(e,r,i);return this.renderGridLines(t,e,o,n)},renderGridLines:function(t,e,o,r){for(var i={stroke:{width:o.width,color:o.color,dashType:o.dashType}},n=this.box.center(),s=new k.geometry.Circle([n.x,n.y],e),a=this.gridLinesVisual(),p=0;p<t.length;p++){var l=new k.drawing.Path(i);r&&(s.radius=r(t[p])),l.moveTo(s.center).lineTo(s.pointAt(t[p]+180)),a.append(l)}return a.children},gridLineAngles:function(t,e,o,r,i){var n=this,s=this.intervals(e,o,r,i),a=t.options,p=a.visible&&!1!==(a.line||{}).visible;return tt(s,(function(t){var e=n.intervalAngle(t);if(!p||90!==e)return e}))}},So=function(t){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,r=e.step||1,i=new zt,n=0;n<t.length;n++){t[n].reflow(i);var s=t[n].box;t[n].reflow(this.getSlot(o+n*r).adjacentBox(0,s.width(),s.height()))}},e.prototype.intervals=function(t,e,o,r){void 0===r&&(r=!1);for(var i=this.options,n=i.categories.length/t||1,s=360/n,a=o||1,p=[],l=0,h=e||0;h<n;h+=a)l=i.reverse?360-h*s:h*s,l=yt(l,3)%360,r&&Z(l,r)||p.push(l);return p},e.prototype.majorIntervals=function(){return this.intervals(1)},e.prototype.minorIntervals=function(){return this.intervals(.5)},e.prototype.intervalAngle=function(t){return(360+t+this.options.startAngle)%360},e.prototype.majorAngles=function(){var t=this;return tt(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,r=o.minorGridLines,i=o.majorGridLines,n=e?this.intervals(1,i.skip,i.step):null;return this.gridLineAngles(t,.5,r.skip,r.step,n)},e.prototype.radiusCallback=function(t,e,o){if(e.options.type!==i){var r=gt(360/(2*this.options.categories.length)),n=Math.cos(r)*t,s=this.majorAngles(),a=function(e){return!o&&Z(e,s)?t:n};return a}},e.prototype.createPlotBands=function(){for(var t=this.options.plotBands||[],e=this._plotbandGroup=new k.drawing.Group({zIndex:-1}),o=0;o<t.length;o++){var r=t[o],i=this.plotBandSlot(r),n=this.getSlot(r.from),s=r.from-Math.floor(r.from);i.startAngle+=s*n.angle;var a=Math.ceil(r.to)-r.to;i.angle-=(a+s)*n.angle;var p=Gt.current.createRing(i,{fill:{color:r.color,opacity:r.opacity},stroke:{opacity:r.opacity}});e.append(p)}this.appendVisual(e)},e.prototype.plotBandSlot=function(t){return this.getSlot(t.from,t.to-1)},e.prototype.getSlot=function(t,e){var o=this.options,r=o.justified,i=this.box,n=this.majorAngles(),s=n.length,a=360/s,p=t;o.reverse&&!r&&(p=(p+1)%s);var l=n[p=dt(Math.floor(p),0,s-1)];r&&(l-=a/2)<0&&(l+=360);var h=a*(dt(Math.ceil(e||p),p,s-1)-p+1);return new Ht(i.center(),0,i.height()/2,l,h)},e.prototype.slot=function(t,e){var o=this.getSlot(t,e),r=o.startAngle+180,i=r+o.angle;return new k.geometry.Arc([o.center.x,o.center.y],{startAngle:r,endAngle:i,radiusX:o.radius,radiusY:o.radius})},e.prototype.pointCategoryIndex=function(t){for(var e=this.options.categories.length,o=null,r=0;r<e;r++){if(this.getSlot(r).containsPoint(t)){o=r;break}}return o},e}(to);wt(So,{startAngle:90,labels:{margin:V(10)},majorGridLines:{visible:!0},justified:!0}),R(So.prototype,ko);var Ao=So,Po=function(t){function e(e,o){t.call(this,e,o);var r=this.options;r.minorUnit=r.minorUnit||r.majorUnit/2}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDivisions=function(t){return vo.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,r=o.skip||0,i=o.step||1,n=new zt,s=this.intervals(t.majorUnit,r,i),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,r){void 0===r&&(r=!1);for(var i=this.options.min,n=this.getDivisions(t),s=[],a=o||1,p=e||0;p<n;p+=a){var l=(360+i+p*t)%360;r&&Z(l,r)||s.push(l)}return s},e.prototype.majorIntervals=function(){return this.intervals(this.options.majorUnit)},e.prototype.minorIntervals=function(){return this.intervals(this.options.minorUnit)},e.prototype.intervalAngle=function(t){return(540-t-this.options.startAngle)%360},e.prototype.createLine=function(){return[]},e.prototype.majorGridLineAngles=function(t){var e=this.options.majorGridLines;return this.gridLineAngles(t,this.options.majorUnit,e.skip,e.step)},e.prototype.minorGridLineAngles=function(t,e){var o=this.options,r=o.minorGridLines,i=o.majorGridLines,n=e?this.intervals(o.majorUnit,i.skip,i.step):null;return this.gridLineAngles(t,o.minorUnit,r.skip,r.step,n)},e.prototype.plotBandSlot=function(t){return this.getSlot(t.from,t.to)},e.prototype.getSlot=function(t,e){var o=this.options,r=this.box,i=o.startAngle,n=dt(t,o.min,o.max),s=dt(e||n,n,o.max);if(o.reverse&&(n*=-1,s*=-1),(s=(540-s-i)%360)<(n=(540-n-i)%360)){var a=n;n=s,s=a}return new Ht(r.center(),0,r.height()/2,n,s-n)},e.prototype.slot=function(t,e){void 0===e&&(e=t);var o,r,i=this.options,n=360-i.startAngle,s=this.getSlot(t,e),a=Math.min(t,e),p=Math.max(t,e);return i.reverse?(o=a,r=p):(o=360-p,r=360-a),o=(o+n)%360,r=(r+n)%360,new k.geometry.Arc([s.center.x,s.center.y],{startAngle:o,endAngle:r,radiusX:s.radius,radiusY:s.radius})},e.prototype.getValue=function(t){var e=this.options,o=this.box.center(),r=t.x-o.x,i=t.y-o.y,n=Math.round(at(Math.atan2(i,r))),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}(Re);wt(Po,{type:"polar",startAngle:0,reverse:!1,majorUnit:60,min:0,max:360,labels:{margin:V(10)},majorGridLines:{color:n,visible:!0,width:1},minorGridLines:{color:"#aaa"}}),R(Po.prototype,ko,{createPlotBands:Ao.prototype.createPlotBands,majorAngles:Ao.prototype.majorAngles,range:vo.prototype.range,labelsCount:vo.prototype.labelsCount,createAxisLabel:vo.prototype.createAxisLabel});var Mo=Po;function Oo(t,e){return 180-Math.abs(Math.abs(t-e)-180)}var To={options:{majorGridLines:{visible:!0}},createPlotBands:function(){var t=this.options,e=t.majorGridLines.type,o=t.plotBands;void 0===o&&(o=[]);for(var r=this.plotArea.polarAxis,n=r.majorAngles(),s=r.box.center(),a=this._plotbandGroup=new k.drawing.Group({zIndex:-1}),p=0;p<o.length;p++){var l=o[p],h={fill:{color:l.color,opacity:l.opacity},stroke:{opacity:l.opacity}},c=this.getSlot(l.from,l.to,!0),u=new Ht(s,s.y-c.y2,s.y-c.y1,0,360),d=void 0;d=e===i?Gt.current.createRing(u,h):k.drawing.Path.fromPoints(this.plotBandPoints(u,n),h).close(),a.append(d)}this.appendVisual(a)},plotBandPoints:function(t,e){for(var o=[],r=[],i=[t.center.x,t.center.y],n=new k.geometry.Circle(i,t.innerRadius),s=new k.geometry.Circle(i,t.radius),a=0;a<e.length;a++)o.push(n.pointAt(e[a]+180)),r.push(s.pointAt(e[a]+180));return o.reverse(),o.push(o[0]),r.push(r[0]),r.concat(o)},createGridLines:function(t){var e=this.options,o=this.radarMajorGridLinePositions(),r=t.majorAngles(),i=t.box.center(),n=[];if(e.majorGridLines.visible&&(n=this.renderGridLines(i,o,r,e.majorGridLines)),e.minorGridLines.visible){var s=this.radarMinorGridLinePositions();it(n,this.renderGridLines(i,s,r,e.minorGridLines))}return n},renderGridLines:function(t,e,o,r){var n={stroke:{width:r.width,color:r.color,dashType:r.dashType}},s=r.skip;void 0===s&&(s=0);var a=r.step;void 0===a&&(a=0);for(var p=this.gridLinesVisual(),l=s;l<e.length;l+=a){var h=t.y-e[l];if(h>0){var c=new k.geometry.Circle([t.x,t.y],h);if(r.type===i)p.append(new k.drawing.Circle(c,n));else{for(var u=new k.drawing.Path(n),d=0;d<o.length;d++)u.lineTo(c.pointAt(o[d]+180));u.close(),p.append(u)}}}return p.children},getValue:function(t){var e=this.lineBox(),o=this.plotArea.polarAxis,r=o.majorAngles(),n=o.box.center(),s=t.distanceTo(n),a=s;if(this.options.majorGridLines.type!==i&&r.length>1){var p=t.x-n.x,l=t.y-n.y,h=(at(Math.atan2(l,p))+540)%360;r.sort((function(t,e){return Oo(t,h)-Oo(e,h)}));var c=90-Oo(r[0],r[1])/2,u=180-Oo(h,r[0])-c;a=s*(Math.sin(gt(u))/Math.sin(gt(c)))}return this.axisType().prototype.getValue.call(this,new jt(e.x1,e.y2-a))}},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.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}(vo);R(Bo.prototype,To);var Ro=Bo,Io=function(t){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}(Co);R(Io.prototype,To);var Lo=Io;function Eo(t){return t<=0?-1:1}var Do=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=[],r=this.closed,i=e.length;if(i>2&&(this.removeDuplicates(0,e),i=e.length),i<2||2===i&&e[0].equals(e[1]))return o;var n,s,a=e[0],p=e[1],l=e[2];for(o.push(new k.geometry.Segment(a));a.equals(e[i-1]);)r=!0,e.pop(),i--;if(2===i){var h=this.tangent(a,p,m,x);return ut(o).controlOut(this.firstControlPoint(h,a,p,m,x)),o.push(new k.geometry.Segment(p,this.secondControlPoint(h,a,p,m,x))),o}if(r){a=e[i-1],p=e[0],l=e[1];var c=this.controlPoints(a,p,l);n=c[1],s=c[0]}else{var u=this.tangent(a,p,m,x);n=this.firstControlPoint(u,a,p,m,x)}for(var d=n,f=0;f<=i-3;f++)if(this.removeDuplicates(f,e),f+3<=(i=e.length)){a=e[f],p=e[f+1],l=e[f+2];var g=this.controlPoints(a,p,l);ut(o).controlOut(d),d=g[1];var y=g[0];o.push(new k.geometry.Segment(p,y))}if(r){a=e[i-2],p=e[i-1],l=e[0];var v=this.controlPoints(a,p,l);ut(o).controlOut(d),o.push(new k.geometry.Segment(p,v[0])),ut(o).controlOut(v[1]),o.push(new k.geometry.Segment(l,s))}else{var b=this.tangent(p,l,m,x);ut(o).controlOut(d),o.push(new k.geometry.Segment(l,this.secondControlPoint(b,p,l,m,x)))}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 r=!1;if(t.x===e.x)r=!0;else if(e.x===o.x)(e.y<o.y&&t.y<=e.y||o.y<e.y&&e.y<=t.y)&&(r=!0);else{var i=this.lineFunction(t,e),n=this.calculateFunction(i,o.x);t.y<=e.y&&o.y<=n||e.y<=t.y&&o.y>=n||(r=!0)}return r},e.prototype.isLine=function(t,e,o){var r=this.lineFunction(t,e),i=this.calculateFunction(r,o.x);return t.x===e.x&&e.x===o.x||yt(i,1)===yt(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 r,i=m,n=x,s=!1,a=!1;if(this.isLine(t,e,o))r=this.tangent(t,e,m,x);else{var p={x:this.isMonotonicByField(t,e,o,m),y:this.isMonotonicByField(t,e,o,x)};if(p.x&&p.y)r=this.tangent(t,o,m,x),s=!0;else if(this.invertAxis(t,e,o)&&(i=x,n=m),p[i])r=0;else r=.01*(o[n]<t[n]&&t[n]<=e[n]||t[n]<o[n]&&e[n]<=t[n]?Eo((o[n]-t[n])*(e[i]-t[i])):-Eo((o[i]-t[i])*(e[n]-t[n]))),a=!0}var l=this.secondControlPoint(r,t,e,i,n);if(a){var h=i;i=n,n=h}var c=this.firstControlPoint(r,e,o,i,n);return s&&(this.restrictControlPoint(t,e,l,r),this.restrictControlPoint(e,o,c,r)),[l,c]},e.prototype.restrictControlPoint=function(t,e,o,r){t.y<e.y?e.y<o.y?(o.x=t.x+(e.y-t.y)/r,o.y=e.y):o.y<t.y&&(o.x=e.x-(e.y-t.y)/r,o.y=t.y):o.y<e.y?(o.x=t.x-(t.y-e.y)/r,o.y=e.y):t.y<o.y&&(o.x=e.x+(t.y-e.y)/r,o.y=t.y)},e.prototype.tangent=function(t,e,o,r){var i,n=e[o]-t[o],s=e[r]-t[r];return i=0===n?0:s/n,i},e.prototype.isMonotonicByField=function(t,e,o,r){return o[r]>e[r]&&e[r]>t[r]||o[r]<e[r]&&e[r]<t[r]},e.prototype.firstControlPoint=function(t,e,o,r,i){var n=e[r],s=.333*(o[r]-n);return this.point(n+s,e[i]+s*t,r,i)},e.prototype.secondControlPoint=function(t,e,o,r,i){var n=e[r],s=o[r],a=.333*(s-n);return this.point(s-a,o[i]-a*t,r,i)},e.prototype.point=function(t,e,o,r){var i=new k.geometry.Point;return i[o]=t,i[r]=e,i},e.prototype.calculateFunction=function(t,e){for(var o=t.length,r=0,i=0;i<o;i++)r+=Math.pow(e,i)*t[i];return r},e}(k.Class),jo=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}(k.Class);function Vo(t,e){for(var o=0;o<e.length;o++)if(e[o].options.name===t)return e[o].prepareUserOptions(),new jo(e[o])}var zo=function(t){this.visual=t.visual,this.chartsVisual=t.chartContainer.visual,this._pane=t};zo.prototype.findAxisByName=function(t){return Vo(t,this._pane.axes)};var Uo=zo,Ho=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}(k.Class);function Fo(t){for(var e=t.length,o=0,r=0;r<e;r++){P(t[r])&&o++}return o}var No={min:function(t){for(var e=t.length,o=u,r=0;r<e;r++){var i=t[r];P(i)&&(o=Math.min(o,i))}return o===u?t[0]:o},max:function(t){for(var e=t.length,o=d,r=0;r<e;r++){var i=t[r];P(i)&&(o=Math.max(o,i))}return o===d?t[0]:o},sum:function(t){for(var e=t.length,o=0,r=0;r<e;r++){var i=t[r];P(i)&&(o+=i)}return o},sumOrNull:function(t){var e=null;return Fo(t)&&(e=No.sum(t)),e},count:function(t){for(var e=t.length,o=0,r=0;r<e;r++){var i=t[r];null!==i&&st(i)&&o++}return o},avg:function(t){var e=Fo(t),o=t[0];return e>0&&(o=No.sum(t)/e),o},first:function(t){for(var e=t.length,o=0;o<e;o++){var r=t[o];if(null!==r&&st(r))return r}return t[0]}},Go=No;function Wo(t,e){return null===e?e:W(t)(e)}var Xo=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=[y]),void 0===o&&(o={});for(var r=0;r<t.length;r++){var i=t[r];this._valueFields[i]=e,this._otherFields[i]=o,this._nullValue[i]=this._makeValue(e,null),this._undefinedValue[i]=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]||[y]},e.prototype.otherFields=function(t){return this._otherFields[t.type]||[y]},e.prototype.bindPoint=function(t,e,o){var r,i,n=t.data,s=st(o)?o:n[e],a={valueFields:{value:s}},p=this.valueFields(t),l=this._otherFields[t.type];if(null===s)i=this._nullValue[t.type];else if(st(s)){if(Array.isArray(s)){var h=s.slice(p.length);i=this._bindFromArray(s,p),r=this._bindFromArray(h,l)}else if("object"==typeof s){var c=this.sourceFields(t,p),u=this.sourceFields(t,l);i=this._bindFromObject(s,p,c),r=this._bindFromObject(s,l,u)}}else i=this._undefinedValue[t.type];return st(i)&&(1===p.length?a.valueFields.value=i[p[0]]:a.valueFields=i),a.fields=r||{},a},e.prototype._makeValue=function(t,e){for(var o={},r=t.length,i=0;i<r;i++){o[t[i]]=e}return o},e.prototype._bindFromArray=function(t,e){var o={};if(e)for(var r=Math.min(e.length,t.length),i=0;i<r;i++)o[e[i]]=t[i];return o},e.prototype._bindFromObject=function(t,e,o){void 0===o&&(o=e);var r={};if(e)for(var i=e.length,n=0;n<i;n++){var s=e[n],a=o[n];null!==a&&(r[s]=Wo(a,t))}return r},e.prototype.sourceFields=function(t,e){var o=[];if(e)for(var r=e.length,i=0;i<r;i++){var n=e[i],s=n===y?"field":n+"Field";o.push(null!==t[s]?t[s]||n:null)}return o},e}(k.Class);Xo.current=new Xo;var Yo=Xo,qo=/percent(?:\w*)\((\d+)\)/,Qo=new RegExp("^stddev(?:\\((\\d+(?:\\.\\d+)?)\\))?$"),Zo=function(t){function e(e,o,r){t.call(this),this.initGlobalRanges(e,o,r)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initGlobalRanges=function(t,e,o){var r=e.data,i=Qo.exec(t);if(i){this.valueGetter=this.createValueGetter(e,o);var n=this.getAverage(r),s=this.getStandardDeviation(r,n,!1),a=i[1]?parseFloat(i[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 l=this.getStandardError(r,this.getAverage(r));this.globalRange=function(t){return{low:t-l,high:t+l}}}},e.prototype.createValueGetter=function(t,e){var o,r=t.data,i=Yo.current,n=i.valueFields(t),s=st(r[0])?r[0]:{};if(b(s))o=W("["+(e?n.indexOf(e):0)+"]");else if(P(s))o=W();else if("object"==typeof s){o=W(i.sourceFields(t,n)[n.indexOf(e)])}return o},e.prototype.getErrorRange=function(t,e){var o,r,i;if(!st(e))return null;if(this.globalRange)return this.globalRange(t);if(b(e))o=t-e[0],r=t+e[1];else if(P(i=parseFloat(e)))o=t-i,r=t+i;else{if(!(i=qo.exec(e)))throw new Error("Invalid ErrorBar value: "+e);var n=t*(parseFloat(i[1])/100);o=t-Math.abs(n),r=t+Math.abs(n)}return{low:o,high:r}},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 r=t.length,i=o?e.count-1:e.count,n=0,s=0;s<r;s++){var a=this.valueGetter(t[s]);P(a)&&(n+=Math.pow(a-e.value,2))}return Math.sqrt(n/i)},e.prototype.getAverage=function(t){for(var e=t.length,o=0,r=0,i=0;i<e;i++){var n=this.valueGetter(t[i]);P(n)&&(o+=n,r++)}return{value:o/r,count:r}},e}(k.Class),Ko=k.support.browser||{},$o=Ko.msie?.001:0,Jo="zero",tr="bar",er="column",or="line",rr="pie",ir="verticalLine",nr=[tr,er,"ohlc","candlestick","boxPlot","verticalBoxPlot","bullet","rangeColumn","rangeBar","waterfall","horizontalWaterfall"],sr="DOMMouseScroll mousewheel",ar=function(t){function e(e,o,r,i,n,s){t.call(this,s),this.low=e,this.high=o,this.isVertical=r,this.chart=i,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,r=this.isVertical,i=this.getAxis().getSlot(this.low,this.high),n=t.center(),s=this.getCapsWidth(t,r),a=r?n.x:n.y,p=a-s,l=a+s;r?(e=[new jt(n.x,i.y1),new jt(n.x,i.y2)],o&&e.push(new jt(p,i.y1),new jt(l,i.y1),new jt(p,i.y2),new jt(l,i.y2)),this.box=new zt(p,i.y1,l,i.y2)):(e=[new jt(i.x1,n.y),new jt(i.x2,n.y)],o&&e.push(new jt(i.x1,p),new jt(i.x1,l),new jt(i.x2,p),new jt(i.x2,l)),this.box=new zt(i.x1,p,i.x2,l)),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,r={stroke:{color:e.color,width:e.line.width,dashType:e.line.dashType}};t.prototype.createVisual.call(this);for(var i=0;i<o.length;i+=2){var n=new k.drawing.Path(r).moveTo(o[i].x,o[i].y).lineTo(o[i+1].x,o[i+1].y);S(n),this.visual.append(n)}},e}(Xt);wt(ar,{animation:{type:"fadeIn",delay:600},endCaps:!0,line:{width:2},zIndex:1});var pr=ar,lr=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getAxis=function(){return this.chart.seriesValueAxis(this.series)},e}(pr);function hr(t,e,o,r){void 0===o&&(o={}),void 0===r&&(r=!1);var i=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(!Z(a,o.excluded)&&t.hasOwnProperty(a)){var p=t[a];T(p)?(s=!0,r||(t[a]=mt(p(e),i[a]))):I(p)&&(r||(o.defaults=i[a]),o.depth++,s=hr(p,e,o,r)||s,o.depth--)}return s}function cr(t){for(var e=t.length,o=0,r=0;r<e;r++)o=Math.max(o,t[r].data.length);return o}var ur=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 r=this.pointType().prototype.defaults;this.seriesOptions[e]=o=R({},r,{vertical:!this.options.invertAxes},t)}return o},e.prototype.plotValue=function(t){if(!t)return 0;if(this.options.isStacked100&&P(t.value)){for(var e=t.categoryIx,o=this.categoryPoints[e],r=[],i=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;P(s.value)&&(i+=Math.abs(s.value),r.push(Math.abs(s.value)))}}if(i>0)return t.value/i}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 r=this.plotValue(t),i=r>=0,n=e,s=!1,a=0;a<o.length;a++){var p=o[a];if(t===p)break;var l=t.series.stack,h=p.series.stack;if(l&&h){if("string"==typeof l&&l!==h)continue;if(l.group&&l.group!==h.group)continue}var c=this.plotValue(p);(c>=0&&i||c<0&&!i)&&(n+=c,r+=c,s=!0,this.options.isStacked100&&(r=Math.min(r,1)))}return s&&(n-=e),[n,r]}var u=t.series,d=this.seriesValueAxis(u),f=this.categoryAxisCrossingValue(d);return[f,O(t.value)?t.value:f]},e.prototype.stackLimits=function(t,e){for(var o=u,r=d,i=0;i<this.categoryPoints.length;i++){var n=this.categoryPoints[i];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];st(p)&&isFinite(p)&&(r=Math.max(r,p),o=Math.min(o,p))}}}return{min:o,max:r}},e.prototype.updateStackRange=function(){var t=this.options,e=t.isStacked,o=t.series,r={};if(e)for(var i=0;i<o.length;i++){var n=o[i],s=n.axis,a=s+n.stack,p=r[a];if(!p){p=this.stackLimits(s,n.stack);var l=this.errorTotals;l&&(l.negative.length&&(p.min=Math.min(p.min,_t(l.negative).min)),l.positive.length&&(p.max=Math.max(p.max,_t(l.positive).max))),p.min!==u||p.max!==d?r[a]=p:p=null}p&&(this.valueAxisRanges[s]=p)}},e.prototype.addErrorBar=function(t,e,o){var r,i=t.value,n=t.series,s=t.seriesIx,a=t.options.errorBars,p=e.fields.errorLow,l=e.fields.errorHigh;P(p)&&P(l)?r={low:p,high:l}:a&&st(a.value)&&(this.seriesErrorRanges=this.seriesErrorRanges||[],this.seriesErrorRanges[s]=this.seriesErrorRanges[s]||new Zo(a.value,n,y),r=this.seriesErrorRanges[s].getErrorRange(i,a.value)),r&&(t.low=r.low,t.high=r.high,this.addPointErrorBar(t,o))},e.prototype.addPointErrorBar=function(t,e){var o=!this.options.invertAxes,r=t.options.errorBars,i=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:i};this.updateRange({value:n},p),this.updateRange({value:s},p)}var l=new lr(n,s,o,this,i,r);t.errorBars=[l],t.append(l)},e.prototype.stackedErrorRange=function(t,e){var o=this.plotRange(t,0)[1]-t.value,r=t.low+o,i=t.high+o;return this.errorTotals=this.errorTotals||{positive:[],negative:[]},r<0&&(this.errorTotals.negative[e]=Math.min(this.errorTotals.negative[e]||0,r)),i>0&&(this.errorTotals.positive[e]=Math.max(this.errorTotals.positive[e]||0,i)),{low:r,high:i}},e.prototype.addValue=function(t,e){var o=e.categoryIx,r=e.series,i=e.seriesIx,n=this.categoryPoints[o];n||(this.categoryPoints[o]=n=[]);var s=this.seriesPoints[i];s||(this.seriesPoints[i]=s=[]);var a=this.createPoint(t,e);a&&(Object.assign(a,e),a.owner=this,a.noteText=t.fields.noteText,st(a.dataItem)||(a.dataItem=r.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,r,i,n){var s={defaults:i._defaults,excluded:["data","aggregate","_events","tooltip","content","template","visual","toggle","_outOfRangeMinPoint","_outOfRangeMaxPoint"]},a=this._evalSeries[n];st(a)||(this._evalSeries[n]=a=hr(t,{},s,!0));var p=t;return a&&hr(p=R({},p),{value:e,category:o,index:r,series:i,dataItem:i.data[r]},s),p},e.prototype.updateRange=function(t,e){var o=e.series.axis,r=t.value,i=this.valueAxisRanges[o];isFinite(r)&&null!==r&&((i=this.valueAxisRanges[o]=i||{min:u,max:d}).min=Math.min(i.min,r),i.max=Math.max(i.max,r))},e.prototype.seriesValueAxis=function(t){var e=this.plotArea,o=t.axis,r=o?e.namedValueAxes[o]:e.valueAxis;if(!r)throw new Error("Unable to locate value axis with name "+o);return r},e.prototype.reflow=function(t){var e=this,o=this.categorySlots=[],r=this.points,i=this.categoryAxis,n=0;this.traverseDataPoints((function(t,s){var a=s.categoryIx,p=s.series,l=e.seriesValueAxis(p),h=r[n++],c=o[a];if(c||(o[a]=c=e.categorySlot(i,a,l)),h){var u=e.plotRange(h,l.startValue()),d=e.valueSlot(l,u);if(d){var f=e.pointSlot(c,d);h.aboveAxis=e.aboveAxis(h,l),h.stackValue=u[1],e.options.isStacked100&&(h.percentage=e.plotValue(h)),e.reflowPoint(h,f)}else h.visible=!1}})),this.reflowCategories(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(ut(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),r=t.value;return e.options.reverse?r<o:r>=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,r=o?e:t,i=o?t:e;return new zt(r.x1,i.y1,r.x2,i.y2)},e.prototype.categorySlot=function(t,e){return t.getSlot(e)},e.prototype.traverseDataPoints=function(t){for(var e=this.options.series,o=cr(e),r=e.length,i=0;i<r;i++)this._outOfRangeCallback(e[i],"_outOfRangeMinPoint",i,t);for(var n=0;n<o;n++)for(var s=0;s<r;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 l=0;l<r;l++)this._outOfRangeCallback(e[l],"_outOfRangeMaxPoint",l,t)},e.prototype._outOfRangeCallback=function(t,e,o,r){var i=t[e];if(i){var n=i.categoryIx;r(this._bindPoint(t,o,n,i.item),{category:i.category,categoryIx:n,series:t,seriesIx:o,dataItem:i.item})}},e.prototype._bindPoint=function(t,e,o,r){this._bindCache||(this._bindCache=[]);var i=this._bindCache[e];i||(i=this._bindCache[e]=[]);var n=i[o];return n||(n=i[o]=Yo.current.bindPoint(t,o,r)),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}(Xt);wt(ur,{series:[],invertAxes:!1,isStacked:!1,clip:!0,limitPoints:!0});var dr=ur,fr={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:ht(t),originalEvent:t,point:this}}},gr={createNote:function(){var t=this.options.notes,e=this.noteText||t.label.text;!1!==t.visible&&st(e)&&null!==e&&(this.note=new fe({value:this.value,text:e,dataItem:this.dataItem,category:this.category,series:this.series},this.options.notes,this.owner.chartService),this.append(this.note))}},yr=function(t){function e(e,o){t.call(this),this.value=e,this.options=o,this.aboveAxis=mt(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 r=F(o),i=this.pointData(),n=this.value;r?n=r(i):o.format&&(n=this.formatValue(o.format)),this.label=new pe(n,R({align:a,vAlign:a,margin:{left:5,right:5},zIndex:mt(o.zIndex,this.series.zIndex)},o),i),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=R({color:this.color},t.border);return st(o.color)||(o.color=new k.Color(e).brightness(.8).toHex()),o},e.prototype.createVisual=function(){},e.prototype.createMarker=function(){var t=this.options.markers;return new Zt({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:mt(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,r=e.vertical;this.render(),this.box=t;var i=t.clone();if(r?o?i.y1-=i.height():i.y2+=i.height():o?i.x1+=i.width():i.x2-=i.width(),this._childBox=i,this.marker&&this.marker.reflow(i),this.reflowLabel(i),this.errorBars)for(var n=0;n<this.errorBars.length;n++)this.errorBars[n].reflow(i);if(this.note){var s=this.markerBox();if(!e.markers.visible||!e.markers.size){var a=s.center();s=new zt(a.x,a.y,a.x,a.y)}this.note.reflow(s)}},e.prototype.reflowLabel=function(t){var e=this.options,o=this.label,r=e.labels.position;o&&(r="below"===(r="above"===r?g:r)?s:r,o.reflow(t),o.box.alignTo(this.markerBox(),r),o.reflow(o.box))},e.prototype.createHighlight=function(){var t=this.options.highlight.markers,e=this.markerBorder().color,o=this.options.markers,r=o.size+(o.border.width||0)+(t.border.width||0),i=new Zt({type:o.type,width:r,height:r,rotation:o.rotation,background:t.color||e,border:{color:t.border.color,width:t.border.width,opacity:mt(t.border.opacity,1)},opacity:mt(t.opacity,1)});return i.reflow(this._childBox),i.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 r=this.options.markers.size,i=r/2,n=this.box.center();e=new k.geometry.Rect([n.x-i,n.y-i],[r,r])}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,r,i=t.x2+5;return this.aboveAxis?(o=t.y1,r=s):(o=t.y2,r=g),{point:new jt(i,o),align:{horizontal:"left",vertical:r}}}},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}(Xt);yr.prototype.defaults={vertical:!0,markers:{visible:!0,background:v,size:8,type:p,border:{width:2},opacity:1},labels:{visible:!1,position:"above",margin:V(3),padding:V(4),animation:{type:"fadeIn",delay:600}},notes:{label:{}},highlight:{markers:{border:{color:"#fff",width:2}},zIndex:100},errorBars:{line:{width:1}}},R(yr.prototype,fr),R(yr.prototype,gr);var vr=yr,mr=function(t){function e(e,o,r){t.call(this),this.linePoints=e,this.series=o,this.seriesIx=r}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,r=t.length;o<r;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&&!st(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,r=e._defaults;T(o)&&r&&(o=r.color);var i=k.drawing.Path.fromPoints(this.points(),{stroke:{color:o,width:e.width,opacity:e.opacity,dashType:e.dashType},zIndex:e.zIndex});t.closed&&i.close(),this.visual=i},e.prototype.aliasFor=function(t,e){return this.parent.getNearestPoint(e.x,e.y,this.seriesIx)},e}(Xt);wt(mr,{closed:!1});var xr=mr;function br(t,e,o,r,i){var n=t.box,s=new k.geometry.Point;return s[e]=n[e+o],s[r]=n[r+i],s}var wr={calculateStepPoints:function(t){for(var e=this.parent.plotArea.seriesCategoryAxis(this.series).options,o=e.justified,r=e.vertical,i=e.reverse,n=r?m:x,s=r?x:m,a=i?2:1,p=a,l=br(t[0],n,a,s,p),h=[l],c=1;c<t.length;c++){var u=br(t[c],n,a,s,p);if(l[n]!==u[n]){var d=new k.geometry.Point;d[n]=l[n],d[s]=u[s],h.push(d,u)}l=u}return o?l!==ut(h)&&h.push(l):h.push(br(ut(t),n,a,s,i?1:2)),h}},_r=function(t){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}(xr);R(_r.prototype,wr);var Cr=_r,kr=function(t){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;T(o)&&e&&(o=e.color);var r=new Do(this.options.closed).process(this.points()),i=new k.drawing.Path({stroke:{color:o,width:t.width,opacity:t.opacity,dashType:t.dashType},zIndex:t.zIndex});i.segments.push.apply(i.segments,r),this.visual=i},e}(xr),Sr={renderSegments:function(){var t,e=this.options,o=this.seriesPoints,r=e.series,i=o.length;this._segments=[];for(var n=0;n<i;n++){for(var s=r[n],a=this.sortPoints(o[n]),p=a.length,l=[],h=0;h<p;h++){var c=a[h];c?l.push(c):"interpolate"!==this.seriesMissingValues(s)&&(l.length>1&&(t=this.createSegment(l,s,n,t),this._addSegment(t)),l=[])}l.length>1&&(t=this.createSegment(l,s,n,t),this._addSegment(t))}this.children.unshift.apply(this.children,this._segments)},_addSegment:function(t){this._segments.push(t),t.parent=this},sortPoints:function(t){return t},seriesMissingValues:function(t){var e=t.missingValues;return!e&&this.options.isStacked?Jo:e||"interpolate"},getNearestPoint:function(t,e,o){for(var r,i=new jt(t,e),n=this.seriesPoints[o],s=u,a=0;a<n.length;a++){var p=n[a];if(p&&st(p.value)&&null!==p.value&&!1!==p.visible){var l=p.box.center().distanceTo(i);l<s&&(r=p,s=l)}}return r}},Ar=function(t){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(K(e.x1,e.x2,t))},e.prototype._setEnd=function(t){var e=this.element,o=e.segments,r=o[1].anchor(),i=o[2].anchor();e.suspend(),r.setX(t),e.resume(),i.setX(t)},e}(k.drawing.Animation);wt(Ar,{duration:600}),k.drawing.AnimationFactory.current.register("clip",Ar);var Pr=Ar;function Mr(t){for(var e=0;e<t.length;e++)if(st(t[e].zIndex))return!0}var Or={createAnimation:function(){var t=this.getRoot();if(t&&!1!==(t.options||{}).transitions){var e=t.size(),o=k.drawing.Path.fromRect(e.toRect());this.visual.clip(o),this.animation=new Pr(o,{box:e}),Mr(this.options.series)&&this._setChildrenAnimation(o)}},_setChildrenAnimation:function(t){for(var e=this.animationPoints(),o=0;o<e.length;o++){var r=e[o];r&&r.visual&&st(r.visual.options.zIndex)&&r.visual.clip(t)}}},Tr=function(t){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 vr},e.prototype.createPoint=function(t,e){var o=e.categoryIx,r=e.category,i=e.series,n=e.seriesIx,s=this.seriesMissingValues(i),a=t.valueFields.value;if(!st(a)||null===a){if(s!==Jo)return null;a=0}var p=this.pointOptions(i,n);p=this.evalPointOptions(p,a,r,o,i,n);var l=t.fields.color||i.color;T(i.color)&&(l=p.color);var h=new vr(a,p);return h.color=l,this.append(h),h},e.prototype.plotRange=function(t){var e=this.plotValue(t);if(this.options.isStacked)for(var o=t.categoryIx,r=this.categoryPoints[o],i=0;i<r.length;i++){var n=r[i];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 r=e.style;return new("step"===r?Cr:"smooth"===r?kr:xr)(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}(dr);R(Tr.prototype,Sr,Or);var Br=Tr,Rr=function(t){function e(e,o,r,i,n){t.call(this,e,o,r),this.prevSegment=i,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||{},r=t.color;T(r)&&e&&(r=e.color),this.visual=new k.drawing.Group({zIndex:t.zIndex}),this.createFill({fill:{color:r,opacity:t.opacity},stroke:null}),o.width>0&&!1!==o.visible&&this.createStroke({stroke:R({color:r,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 k.geometry.Segment(t)}))},e.prototype.createStroke=function(t){var e=new k.drawing.Path(t);e.segments.push.apply(e.segments,this.strokeSegments()),this.visual.append(e)},e.prototype.hasStackSegment=function(){return this.prevSegment||this.stackPoints&&this.stackPoints.length},e.prototype.createFill=function(t){var e=this.strokeSegments(),o=e.slice(0),r=this.hasStackSegment();if(r){var i=this.stackSegments();it(o,i)}var n=new k.drawing.Path(t);n.segments.push.apply(n.segments,o),!r&&e.length>1&&this.fillToAxes(n),this.visual.append(n)},e.prototype.fillToAxes=function(t){var e=this.parent,o=e.options.invertAxes,r=e.seriesValueAxis(this.series),i=e.categoryAxisCrossingValue(r),n=r.getSlot(i,i,!0),s=this.strokeSegments(),a=s[0].anchor(),p=ut(s).anchor(),l=o?n.x1:n.y1;o?t.lineTo(l,p.y).lineTo(l,a.y):t.lineTo(p.x,l).lineTo(a.x,l)},e}(xr),Ir=function(t){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}(Rr);R(Ir.prototype,wr);var Lr=Ir,Er=function(t){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 Do(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 r=t[o];e.push(new k.geometry.Segment(r.anchor(),r.controlOut(),r.controlIn()))}return e},e}(Rr),Dr=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createSegment=function(t,e,o,r){var i,n,s=this.options.isStacked,a=(e.line||{}).style;s&&o>0&&r&&("gap"!==this.seriesMissingValues(e)?(n=r.linePoints,i=r):n=this._gapStackPoints(t,o,a));return new("step"===a?Lr:"smooth"===a?Er:Rr)(t,e,o,i,n)},e.prototype.reflow=function(e){t.prototype.reflow.call(this,e);var o=this._stackPoints;if(o)for(var r=0;r<o.length;r++){var i=o[r],n=this.categoryAxis.getSlot(i.categoryIx);i.reflow(n)}},e.prototype._gapStackPoints=function(t,e,o){var r=this.seriesPoints,i=t[0].categoryIx,n=t.length;i<0&&(i=0,n--);var s=i+n,a=this.seriesOptions[0]._outOfRangeMinPoint?1:0,p=[];this._stackPoints=this._stackPoints||[];for(var l=i;l<s;l++){var h=l+a,c=e,u=void 0;do{u=r[--c][h]}while(c>0&&!u);if(u)"step"!==o&&l>i&&!r[c][h-1]&&p.push(this._previousSegmentPoint(l,h,h-1,c)),p.push(u),"step"!==o&&l+1<s&&!r[c][h+1]&&p.push(this._previousSegmentPoint(l,h,h+1,c));else{var d=this._createGapStackPoint(l);this._stackPoints.push(d),p.push(d)}}return p},e.prototype._previousSegmentPoint=function(t,e,o,r){for(var i,n=this.seriesPoints,s=r;s>0&&!i;)i=n[--s][o];return i?i=n[s][e]:(i=this._createGapStackPoint(t),this._stackPoints.push(i)),i},e.prototype._createGapStackPoint=function(t){var e=this.pointOptions({},0),o=new vr(0,e);return o.categoryIx=t,o.series={},o},e.prototype.seriesMissingValues=function(t){return t.missingValues||Jo},e.prototype.supportsPointInactiveOpacity=function(){return!1},e}(Br),jr=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 r=t[o],i=e[o];e[o]=i=i||{min:u,max:d},i.min=Math.min(i.min,r.min),i.max=Math.max(i.max,r.max)}},e.prototype.reset=function(t){this.axisRanges[t]=void 0},e.prototype.query=function(t){return this.axisRanges[t]},e}(k.Class),Vr=function(t){function e(e,o,r){t.call(this,o),this.textBox=new pe(e,this.options,r),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,r=e.aboveAxis,i=this.children[0],n=i.options,p=i.box,l=i.options.padding,h=t;n.align=o?a:c,n.vAlign=o?g:a,"insideEnd"===e.position?o?(n.vAlign=g,!r&&p.height()<t.height()&&(n.vAlign=s)):n.align=r?f:c:e.position===a?(n.vAlign=a,n.align=a):"insideBase"===e.position?o?n.vAlign=r?s:g:n.align=r?c:f:"outsideEnd"===e.position&&(o?h=r?new zt(t.x1,t.y1-p.height(),t.x2,t.y1):new zt(t.x1,t.y2,t.x2,t.y2+p.height()):(n.align=a,h=r?new zt(t.x2,t.y1,t.x2+p.width(),t.y2):new zt(t.x1-p.width(),t.y1,t.x1,t.y2))),e.rotation||(o?l.left=l.right=(h.width()-i.contentBox.width())/2:l.top=l.bottom=(h.height()-i.contentBox.height())/2),i.reflow(h)},e.prototype.alignToClipBox=function(t){var e=this.options.vertical?x:m,o=e+"1",r=e+"2",i=this.children[0],n=this.parent.box;if(n[o]<t[o]||t[r]<n[r]){var s=i.paddingBox.clone();s[o]=Math.max(n[o],t[o]),s[r]=Math.min(n[r],t[r]),this.reflow(s)}},e}(Xt);wt(Vr,{position:"outsideEnd",margin:V(3),padding:V(4),color:n,background:"",border:{width:1,color:""},aboveAxis:!0,vertical:!1,animation:{type:"fadeIn",delay:600},zIndex:2});var zr=Vr;function Ur(t){var e=t.overlay;return e&&e.gradient&&"none"!==e.gradient}var Hr=function(t){function e(e,o){t.call(this),this.options=o,this.color=o.color||v,this.aboveAxis=mt(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,r=this.pointData(),i=F(e);o=i?i(r):this.formatValue(e.format),this.label=new zr(o,R({vertical:t.vertical},e),r),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,r=this.options,i=r.visual;if(!1!==this.visible)if(t.prototype.createVisual.call(this),i){var n=this.rectVisual=i({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 k.drawing.Group;return e.createRect(t),t},options:r});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,r=st(o.opacity)?o.opacity:e.opacity,i=this.box.toRect();i.size.width=Math.round(i.size.width);var n=this.rectVisual=k.drawing.Path.fromRect(i,{fill:{color:this.color,opacity:e.opacity},stroke:{color:this.getBorderColor(),width:o.width,opacity:r,dashType:o.dashType}}),s=this.box.width(),a=this.box.height();if((e.vertical?s:a)>6&&(S(n),(s<1||a<1)&&(n.options.stroke.lineJoin="round")),t.append(n),Ur(e)){var p=this.createGradientOverlay(n,{baseColor:this.color},R({end:e.vertical?void 0:[0,1]},e.overlay));t.append(p)}},e.prototype.createHighlight=function(t){return S(k.drawing.Path.fromRect(this.box.toRect(),t))},e.prototype.highlightVisual=function(){return this.rectVisual},e.prototype.highlightVisualArgs=function(){return{options:this.options,rect:this.box.toRect(),visual:this.rectVisual}},e.prototype.getBorderColor=function(){var t=this.color,e=this.options.border,o=e._brightness||.8,r=e.color;return st(r)||(r=new k.Color(t).brightness(o).toHex()),r},e.prototype.tooltipAnchor=function(){var t,e,o=this.options,r=this.box,i=this.aboveAxis,n=this.owner.pane.clipBox()||r,a=c,p=g;if(o.vertical)t=Math.min(r.x2,n.x2)+5,i?e=Math.max(r.y1,n.y1):(e=Math.min(r.y2,n.y2),p=s);else{var l=Math.max(r.x1,n.x1),h=Math.min(r.x2,n.x2);o.isStacked?(p=s,i?(a=f,t=h):t=l,e=Math.max(r.y1,n.y1)-5):(i?t=h+5:(t=l-5,a=f),e=Math.max(r.y1,n.y1))}return{point:new jt(t,e),align:{horizontal:a,vertical:p}}},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}(Xt);R(Hr.prototype,fr),R(Hr.prototype,gr),Hr.prototype.defaults={border:{width:1},vertical:!0,overlay:{gradient:"glass"},labels:{visible:!1,format:"{0}"},opacity:1,notes:{label:{}}};var Fr=Hr;function Nr(t,e){t.forEach(e)}function Gr(t,e){for(var o=t.length,r=o-1;r>=0;r--)e(t[r],r-o-1)}var Wr=function(t){function e(e){t.call(this,e),this.forEach=e.rtl?Gr:Nr}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,r=e.gap,i=e.spacing,n=this.children,s=n.length,a=o?x:m,p=s+r+i*(s-1),l=(o?t.height():t.width())/p,h=t[a+1]+l*(r/2);this.forEach(n,(function(e,o){var r=(e.box||t).clone();r[a+1]=h,r[a+2]=h+l,e.reflow(r),o<s-1&&(h+=l*i),h+=l}))},e}(Xt);wt(Wr,{vertical:!1,gap:0,spacing:0});var Xr=Wr,Yr=function(t){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?m:x,o=this.children,r=o.length,i=this.box=new zt,n=0;n<r;n++){var s=o[n];if(!1!==s.visible){var a=s.box.clone();a.snapTo(t,e),0===n&&(i=this.box=a.clone()),s.reflow(a),i.wrap(a)}}},e}(Xt);wt(Yr,{vertical:!0});var qr=Yr,Qr=function(t){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 Fr},e.prototype.clusterType=function(){return Xr},e.prototype.stackType=function(){return qr},e.prototype.stackLimits=function(e,o){return t.prototype.stackLimits.call(this,e,o)},e.prototype.createPoint=function(t,e){var o=e.categoryIx,r=e.category,i=e.series,n=e.seriesIx,s=this.options,a=this.children,p=s.isStacked,l=this.pointValue(t),h=this.pointOptions(i,n),c=h.labels;p&&"outsideEnd"===c.position&&(c.position="insideEnd"),h.isStacked=p;var u=t.fields.color||i.color;l<0&&h.negativeColor&&(u=h.negativeColor),h=this.evalPointOptions(h,l,r,o,i,n),T(i.color)&&(u=h.color);var d=new(this.pointType())(l,h);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(i,f).append(d):f.append(d);return d},e.prototype.getStackWrap=function(t,e){var o,r=t.stack,i=r&&r.group||r,n=e.children;if("string"==typeof i){for(var s=0;s<n.length;s++)if(n[s]._stackGroup===i){o=n[s];break}}else o=n[0];o||((o=new(this.stackType())({vertical:!this.options.invertAxes}))._stackGroup=i,e.append(o));return o},e.prototype.categorySlot=function(t,e,o){var r=this.options,i=t.getSlot(e),n=o.startValue();if(r.isStacked){var s=o.getSlot(n,n,!0),a=r.invertAxes?m:x;i[a+1]=i[a+2]=s[a+1]}return i},e.prototype.reflowCategories=function(t){for(var e=this.children,o=e.length,r=0;r<o;r++)e[r].reflow(t[r])},e.prototype.createAnimation=function(){this._setAnimationOptions(),t.prototype.createAnimation.call(this),Mr(this.options.series)&&this._setChildrenAnimation()},e.prototype._setChildrenAnimation=function(){for(var t=this.points,e=0;e<t.length;e++){var o=t[e],r=o.visual;r&&st(r.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 r=this.seriesValueAxis(e.series[0]);t=r.getSlot(r.startValue())}else t=this.categoryAxis.getSlot(0);o.origin=new k.geometry.Point(t.x1,t.y1),o.vertical=!e.invertAxes},e}(dr);wt(Qr,{animation:{type:tr}});var Zr=Qr,Kr=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,r=this.owner.seriesValueAxis(e),i=r.getSlot(o.open,o.close),n=r.getSlot(o.low,o.high);i.x1=n.x1=t.x1,i.x2=n.x2=t.x2,this.realBody=i;var s=n.center().x,a=[];a.push([[s,n.y1],[s,i.y1]]),a.push([[s,i.y2],[s,n.y2]]),this.lines=a,this.box=n.clone().wrap(i),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 k.drawing.Group;return this.createBody(e,t),this.createLines(e,t),e},e.prototype.createBody=function(t,e){var o=k.drawing.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:mt(e.border.opacity,e.opacity)}),S(o),t.append(o),Ur(e)&&t.append(this.createGradientOverlay(o,{baseColor:this.color},R({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,r){if(o)for(var i={stroke:{color:r.color||this.color,opacity:mt(r.opacity,e.opacity),width:r.width,dashType:r.dashType,lineCap:"butt"}},n=0;n<o.length;n++){var s=k.drawing.Path.fromPoints(o[n],i);S(s),t.append(s)}},e.prototype.getBorderColor=function(){var t=this.options.border,e=t.color;return st(e)||(e=new k.Color(this.color).brightness(t._brightness).toHex()),e},e.prototype.createOverlay=function(){var t=k.drawing.Path.fromRect(this.box.toRect(),{fill:{color:v,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(R({},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 jt(t.x2+5,Math.max(t.y1,e.y1)+5),align:{horizontal:c,vertical:g}}},e.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},e.prototype.overlapsBox=function(t){return this.box.overlaps(t)},e}(Xt);wt(Kr,{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:{}}}),R(Kr.prototype,fr),R(Kr.prototype,gr);var $r=Kr;function Jr(t){return Fo(t)===t.length}var ti=function(t){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,r=0;r<o;r++)e[r].reflow(t[r])},e.prototype.addValue=function(t,e){var o,r=e.categoryIx,i=e.category,n=e.series,s=e.seriesIx,a=this.children,p=this.options,l=t.valueFields,h=Jr(this.splitValue(l)),c=n.data[r],u=this.categoryPoints[r];u||(this.categoryPoints[r]=u=[]),h&&(o=this.createPoint(t,e));var d=a[r];d||(d=new Xr({vertical:p.invertAxes,gap:p.gap,spacing:p.spacing,rtl:!p.invertAxes&&(this.chartService||{}).rtl}),this.append(d)),o&&(this.updateRange(l,e),d.append(o),o.categoryIx=r,o.category=i,o.series=n,o.seriesIx=s,o.owner=this,o.dataItem=c,o.noteText=t.fields.noteText),this.points.push(o),u.push(o)},e.prototype.pointType=function(){return $r},e.prototype.createPoint=function(t,e){var o=e.categoryIx,r=e.category,i=e.series,n=e.seriesIx,s=this.pointType(),a=t.valueFields,p=R({},i),l=t.fields.color||i.color;p=this.evalPointOptions(p,a,r,o,i,n),"candlestick"===i.type&&a.open>a.close&&(l=t.fields.downColor||i.downColor||i.color),T(i.color)&&(l=p.color),p.vertical=!this.options.invertAxes;var h=new s(a,p);return h.color=l,h},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,r=this.splitValue(t),i=this.valueAxisRanges[o];i=this.valueAxisRanges[o]=i||{min:u,max:d},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.open,o.high,o.low,o.close,t.category)},e.prototype.animationPoints=function(){return this.points},e}(dr);R(ti.prototype,Or);var ei=ti,oi=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,r=this.options,i=this.value,n=this.owner.seriesValueAxis(r);this.boxSlot=o=n.getSlot(i.q1,i.q3),this.realBody=o,this.reflowBoxSlot(t),this.whiskerSlot=e=n.getSlot(i.lower,i.upper),this.reflowWhiskerSlot(t);var s=n.getSlot(i.median);if(i.mean){var a=n.getSlot(i.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||[],r=3*Math.abs(e.q3-e.q1),i=[],n=t.markers||{},s=0;s<o.length;s++){var a=o[s],p=R({},(n=a<e.q3+r&&a>e.q1-r?t.outliers:t.extremes).border);st(p.color)||(st(this.color)?p.color=this.color:p.color=new k.Color(n.background).brightness(.8).toHex());var l=new Zt({type:n.type,width:n.size,height:n.size,rotation:n.rotation,background:n.background,border:p,opacity:n.opacity});l.value=a,i.push(l)}return this.reflowOutliers(i),i},e.prototype.reflowOutliers=function(t){for(var e=this.owner.seriesValueAxis(this.options),o=this.box.center(),r=0;r<t.length;r++){var i=t[r].value,n=e.getSlot(i);this.options.vertical?n.move(o.x):n.move(void 0,o.y),this.box=this.box.wrap(n),t[r].reflow(n)}},e.prototype.mainVisual=function(e){for(var o=t.prototype.mainVisual.call(this,e),r=this.renderOutliers(e),i=0;i<r.length;i++){var n=r[i].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}($r);wt(oi,{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:v,border:{width:2,opacity:1},opacity:0},extremes:{visible:!0,size:8,type:p,background:v,border:{width:2,opacity:1},opacity:0}}),R(oi.prototype,fr);var ri=oi,ii=function(t){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}(ri),ni=function(t){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,r=e.categoryIx,i=e.category,n=e.series,s=e.seriesIx,a=this.children,p=this.options,l=t.valueFields,h=Jr(this.splitValue(l)),c=n.data[r],u=this.categoryPoints[r];u||(this.categoryPoints[r]=u=[]),h&&(o=this.createPoint(t,e));var d=a[r];d||(d=new Xr({vertical:p.invertAxes,gap:p.gap,spacing:p.spacing,rtl:!p.invertAxes&&(this.chartService||{}).rtl}),this.append(d)),o&&(this.updateRange(l,e),d.append(o),o.categoryIx=r,o.category=i,o.series=n,o.seriesIx=s,o.owner=this,o.dataItem=c),this.points.push(o),u.push(o)},e.prototype.pointType=function(){return this.options.invertAxes?ii:ri},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,r=this.valueAxisRanges[o],i=this.splitValue(t).concat(this.filterOutliers(t.outliers));st(t.mean)&&(i=i.concat(t.mean)),r=this.valueAxisRanges[o]=r||{min:u,max:d},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.lower,o.q1,o.median,o.q3,o.upper,o.mean,t.category)},e.prototype.filterOutliers=function(t){for(var e=(t||[]).length,o=[],r=0;r<e;r++){var i=t[r];st(i)&&null!==i&&o.push(i)}return o},e.prototype.supportsPointInactiveOpacity=function(){return!1},e}(ei),si=function(t){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}(pr);function ai(t){return st(t)&&null!==t}var pi=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 r,i=t.value[e],n=e+"Value",s=e+"ErrorLow",a=e+"ErrorHigh",p=o.seriesIx,l=o.series,h=t.options.errorBars,c=o[s],u=o[a];P(i)&&(P(c)&&P(u)&&(r={low:c,high:u}),h&&st(h[n])&&(this.seriesErrorRanges=this.seriesErrorRanges||{x:[],y:[]},this.seriesErrorRanges[e][p]=this.seriesErrorRanges[e][p]||new Zo(h[n],l,e),r=this.seriesErrorRanges[e][p].getErrorRange(i,h[n])),r&&this.addPointErrorBar(r,t,e))},e.prototype.addPointErrorBar=function(t,e,o){var r=t.low,i=t.high,n=e.series,s=e.options.errorBars,a=o===x,p={};e[o+"Low"]=r,e[o+"High"]=i,e.errorBars=e.errorBars||[];var l=new si(r,i,a,this,n,s);e.errorBars.push(l),e.append(l),p[o]=r,this.updateRange(p,n),p[o]=i,this.updateRange(p,n)},e.prototype.addValue=function(t,e){var o,r=t.x,i=t.y,n=e.seriesIx,s=this.options.series[n],a=this.seriesMissingValues(s),p=this.seriesPoints[n],l=t;ai(r)&&ai(i)||(l=this.createMissingValue(l,a)),l&&((o=this.createPoint(l,e))&&(Object.assign(o,e),this.addErrorBar(o,m,e),this.addErrorBar(o,x,e)),this.updateRange(l,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,r=e.xAxis,i=e.yAxis,n=t.x,s=t.y,a=this.xAxisRanges[r],p=this.yAxisRanges[i];ai(n)&&(a=this.xAxisRanges[r]=a||{min:u,max:d},M(n)&&(n=Ze(o,n)),a.min=Math.min(a.min,n),a.max=Math.max(a.max,n)),ai(s)&&(p=this.yAxisRanges[i]=p||{min:u,max:d},M(s)&&(s=Ze(o,s)),p.min=Math.min(p.min,s),p.max=Math.max(p.max,s))},e.prototype.evalPointOptions=function(t,e,o){var r=o.series,i=o.seriesIx,n={defaults:r._defaults,excluded:["data","tooltip","content","template","visual","toggle","_outOfRangeMinPoint","_outOfRangeMaxPoint"]},s=this._evalSeries[i];st(s)||(this._evalSeries[i]=s=hr(t,{},n,!0));var a=t;return s&&hr(a=R({},t),{value:e,series:r,dataItem:o.dataItem},n),a},e.prototype.pointType=function(){return vr},e.prototype.pointOptions=function(t,e){var o=this.seriesOptions[e];if(!o){var r=this.pointType().prototype.defaults;this.seriesOptions[e]=o=R({},r,{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,r=this.pointOptions(o,e.seriesIx),i=e.color||o.color;r=this.evalPointOptions(r,t,e),T(o.color)&&(i=r.color);var n=new vr(t,r);return n.color=i,this.append(n),n},e.prototype.seriesAxes=function(t){var e=t.xAxis,o=t.yAxis,r=this.plotArea,i=e?r.namedXAxes[e]:r.axisX,n=o?r.namedYAxes[o]:r.axisY;if(!i)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:i,y:n}},e.prototype.reflow=function(t){var e=this,o=this.points,r=!this.options.clip,i=0;this.traverseDataPoints((function(t,n){var s=o[i++],a=e.seriesAxes(n.series),p=a.x.getSlot(t.x,t.x,r),l=a.y.getSlot(t.y,t.y,r);if(s)if(p&&l){var h=e.pointSlot(p,l);s.reflow(h)}else s.visible=!1})),this.box=t},e.prototype.pointSlot=function(t,e){return new zt(t.x1,e.y1,t.x2,e.y2)},e.prototype.traverseDataPoints=function(t){for(var e=this.options.series,o=this.seriesPoints,r=0;r<e.length;r++){var i=e[r];o[r]||(o[r]=[]);for(var n=0;n<i.data.length;n++){var s=this._bindPoint(i,r,n),a=s.valueFields,p=s.fields;t(a,R({pointIx:n,series:i,seriesIx:r,dataItem:i.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}(Xt);wt(pi,{series:[],tooltip:{format:"{0}, {1}"},labels:{format:"{0}, {1}"},clip:!0}),R(pi.prototype,Or,{_bindPoint:dr.prototype._bindPoint});var li=pi,hi=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,r=this.box.center(),i=(o.size+o.border.width+e.width)/2,n=new k.drawing.Group,s=new k.drawing.Circle(new k.geometry.Circle([r.x,r.y+i/5+e.width/2],i+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}]})}),a=new k.drawing.Circle(new k.geometry.Circle([r.x,r.y],i),{stroke:{color:e.color||new k.Color(o.background).brightness(.8).toHex(),width:e.width,opacity:e.opacity},fill:{color:o.background,opacity:t.opacity}});return n.append(s,a),n},e}(vr);hi.prototype.defaults=R({},hi.prototype.defaults,{labels:{position:a},highlight:{opacity:1,border:{color:"#fff",width:2,opacity:1}}}),hi.prototype.defaults.highlight.zIndex=void 0;var ci=hi,ui=function(t){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=d,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 ci},e.prototype.createPoint=function(t,e){var o=e.series,r=o.data.length,i=e.pointIx*(600/r),n={delay:i,duration:600-i,type:"bubble"},s=e.color||o.color;t.size<0&&o.negativeValues.visible&&(s=mt(o.negativeValues.color,s));var a=R({labels:{animation:{delay:i,duration:600-i}}},this.pointOptions(o,e.seriesIx),{markers:{type:p,border:o.border,opacity:o.opacity,animation:n}});a=this.evalPointOptions(a,t,e),T(o.color)&&(s=a.color),a.markers.background=s;var l=new ci(t,a);return l.color=s,this.append(l),l},e.prototype.updateBubblesSize=function(t){for(var e=this.options.series,o=Math.min(t.width(),t.height()),r=0;r<e.length;r++)for(var i=e[r],n=this.seriesPoints[r],s=(i.minSize||Math.max(.02*o,10))/2,a=(i.maxSize||.2*o)/2,p=Math.PI*s*s,l=(Math.PI*a*a-p)/this._maxSize,h=0;h<n.length;h++){var c=n[h];if(c){var u=Math.abs(c.value.size)*l,d=Math.sqrt((p+u)/Math.PI),f=mt(c.options.zIndex,0)+(1-d/a);R(c.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}(li);wt(ui,{tooltip:{format:"{3}"},labels:{format:"{3}"}});var di=ui,fi=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Zt);R(fi.prototype,fr);var gi=fi,yi=function(t){function e(e,o){t.call(this,o),this.aboveAxis=this.options.aboveAxis,this.color=o.color||v,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,st(this.value.target)&&(this.target=new gi({type:t.target.shape,background:t.target.color||this.color,opacity:t.opacity,zIndex:t.zIndex,border:t.target.border,vAlign:g,align:f}),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,r=this.owner,i=e.invertAxes,n=r.seriesValueAxis(this.options),s=r.categorySlot(r.categoryAxis,e.categoryIx,n),a=n.getSlot(this.value.target),p=i?a:s,l=i?s:a;if(o){var h=new zt(p.x1,l.y1,p.x2,l.y2);o.options.height=i?h.height():e.target.line.width,o.options.width=i?e.target.line.width:h.width(),o.reflow(h)}this.note&&this.note.reflow(t),this.box=t},e.prototype.createVisual=function(){t.prototype.createVisual.call(this);var e=this.options,o=k.drawing.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:mt(e.border.opacity,e.opacity)}),this.bodyVisual=o,S(o),this.visual.append(o)},e.prototype.createAnimation=function(){this.bodyVisual&&(this.animation=k.drawing.Animation.create(this.bodyVisual,this.options.animation))},e.prototype.createHighlight=function(t){return k.drawing.Path.fromRect(this.box.toRect(),t)},e.prototype.highlightVisual=function(){return this.bodyVisual},e.prototype.highlightVisualArgs=function(){return{rect:this.box.toRect(),visual:this.bodyVisual,options:this.options}},e.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},e}(Xt);yi.prototype.tooltipAnchor=Fr.prototype.tooltipAnchor,wt(yi,{border:{width:1},vertical:!1,opacity:1,target:{shape:"",border:{width:0,color:"green"},line:{width:2}},tooltip:{format:"Current: {0}<br />Target: {1}"}}),R(yi.prototype,fr),R(yi.prototype,gr);var vi=yi,mi=function(t){function e(e,o){!function(t){for(var e=t.series,o=0;o<e.length;o++){var r=e[o],i=r.data;!i||b(i[0])||I(i[0])||(r.data=[i])}}(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,r=0;r<o;r++)e[r].reflow(t[r])},e.prototype.plotRange=function(t){var e=t.series,o=this.seriesValueAxis(e),r=this.categoryAxisCrossingValue(o);return[r,t.value.current||r]},e.prototype.createPoint=function(t,e){var o=e.categoryIx,r=e.category,i=e.series,n=e.seriesIx,s=this.options,a=this.children,p=t.valueFields,l=R({vertical:!s.invertAxes,overlay:i.overlay,categoryIx:o,invertAxes:s.invertAxes},i),h=t.fields.color||i.color;l=this.evalPointOptions(l,p,r,o,i,n),T(i.color)&&(h=l.color);var c=new vi(p,l);c.color=h;var u=a[o];return u||(u=new Xr({vertical:s.invertAxes,gap:s.gap,spacing:s.spacing,rtl:!s.invertAxes&&(this.chartService||{}).rtl}),this.append(u)),u.append(c),c},e.prototype.updateRange=function(t,e){var o=t.current,r=t.target,i=e.series.axis,n=this.valueAxisRanges[i];st(o)&&!isNaN(o)&&st(r&&!isNaN(r))&&((n=this.valueAxisRanges[i]=n||{min:u,max:d}).min=Math.min(n.min,o,r),n.max=Math.max(n.max,o,r))},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}(dr);mi.prototype._setAnimationOptions=Zr.prototype._setAnimationOptions,wt(mi,{animation:{type:tr}});var xi=mi,bi=function(t){function e(e,o){t.call(this),this.chartService=e,this.options=R({},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,r=t.border.color;if(e){var i=e.color||e.options.color;o=mt(o,i),r=mt(r,i)}var n=V(t.padding||{},"auto");return{backgroundColor:o,borderColor:r,font:t.font,color:t.color,opacity:t.opacity,borderWidth:L(t.border.width),paddingTop:L(n.top),paddingBottom:L(n.bottom),paddingLeft:L(n.left),paddingRight:L(n.right)}},e.prototype.show=function(t,e,o){t.format=e.format;var r=this.getStyle(e,o);t.style=r;var i=new k.Color(r.backgroundColor);st(e.color)||i.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}(k.Class);wt(bi,{border:{width:1},opacity:1});var wi=bi,_i=function(t){function e(e,o,r){t.call(this,e,r),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,r=e[o.stickyMode?"getCategory":"getValue"](t),i=r;o.format?i=this.formatService.auto(o.format,r):e.options.type===l&&(i=this.formatService.auto(e.options.labels.dateFormats[e.options.baseUnit],r)),this.show({point:t,anchor:this.getAnchor(),crosshair:this.crosshair,value:i,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,r=this.crosshair,i=this.options,n=i.position,p=i.padding,l=!r.axis.options.vertical,h=r.line.bbox();return l?(t=a,n===s?(e=g,o=h.bottomLeft().translate(0,p)):(e=s,o=h.topLeft().translate(0,-p))):(e=a,n===c?(t=f,o=h.topLeft().translate(-p,0)):(t=c,o=h.topRight().translate(p,0))),{point:o,align:{horizontal:t,vertical:e}}},e}(wi);wt(_i,{padding:10});var Ci=_i,ki=function(t){function e(e,o,r){t.call(this,r),this.axis=o,this.stickyMode=o instanceof to;var i=this.options.tooltip;i.visible&&(this.tooltip=new Ci(e,this,R({},i,{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,r=e.options.vertical,i=this.getBox(),n=r?x:m,s=new k.geometry.Point(i.x1,i.y1);if(t=r?new k.geometry.Point(i.x2,i.y1):new k.geometry.Point(i.x1,i.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=i,this.line.moveTo(s).lineTo(t)},e.prototype.getBox=function(){for(var t,e=this.axis,o=e.pane.axes,r=o.length,i=e.options.vertical,n=e.lineBox().clone(),s=i?m:x,a=0;a<r;a++){var p=o[a];p.options.vertical!==i&&(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 k.drawing.Path({stroke:{color:e.color,width:e.width,opacity:e.opacity,dashType:e.dashType},visible:!1}),this.moveLine(),this.visual.append(this.line)},e.prototype.destroy=function(){this.tooltip&&this.tooltip.destroy(),t.prototype.destroy.call(this)},e}(Xt);wt(ki,{color:n,width:2,zIndex:-1,tooltip:{visible:!1}});var Si=ki,Ai=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 k.drawing.Group({zIndex:0}),this.shouldClip()){var t=(this.clipBox=this._clipBox()).toRect(),e=k.drawing.Path.fromRect(t);S(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 r=t[o].points||{},i=r.length,n=0;n<i;n++){var s=r[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}(Xt);Ai.prototype.isStackRoot=!0;var Pi=Ai,Mi=function(t){function e(e){t.call(this,e),this.id="pane"+Oi++,this.createTitle(),this.content=new Xt,this.chartContainer=new Pi({},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;I(t)&&(t=R({},t,{align:t.position,position:g})),this.title=he.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;ut(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=[],r=[],i=0;i<t.length;i++)for(var n=t[i],s=n.options.vertical,a=s?o:r,p=0;p<e.length;p++)if(0===a.length){var l=e[p];s!==l.options.vertical&&it(a,n.createGridLines(l))}},e.prototype.refresh=function(){this.visual.clear(),this.content.parent=null,this.content.createGradient=this.createGradient.bind(this),this.content.renderVisual(),this.content.parent=this,this.title&&this.visual.append(this.title.visual),this.visual.append(this.content.visual),this.renderComplete(),this.notifyRender()},e.prototype.chartsBox=function(){for(var t=this.axes,e=t.length,o=new zt,r=0;r<e;r++){var i=t[r],n=i.options.vertical?x:m,s=i.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,l=0;l<p;l++){var h=a[l];if(!h.options.vertical){var c=h.lineBox();o.x1=c.x1,o.x2=c.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 Uo(this),index:this.paneIndex,name:this.options.name})},e}(qt),Oi=1;Mi.prototype.isStackRoot=!0,wt(Mi,{zIndex:-1,shrinkToFit:!0,title:{align:c},visible:!0});var Ti=Mi;function Bi(t,e){null!==e&&t.push(e)}function Ri(t,e,o){var r=e.visible;if(st(r))return r;var i=t.pointVisibility;return i?i[o]:void 0}function Ii(t){for(var e=t.data,o=[],r=0,i=0,n=0;n<e.length;n++){var s=Yo.current.bindPoint(t,n),a=s.valueFields.value;M(a)&&(a=parseFloat(a)),P(a)?(s.visible=!1!==Ri(t,s.fields,n),s.value=Math.abs(a),o.push(s),s.visible&&(r+=s.value),0!==a&&i++):o.push(null)}return{total:r,points:o,count:i}}function Li(t,e){return t&&e?t.toLowerCase()===e.toLowerCase():t===e}function Ei(t,e){for(var o=[],r=[].concat(e),i=0;i<t.length;i++){var n=t[i];Z(n.type,r)&&o.push(n)}return o}function Di(t,e,o){if(null===e)return e;var r="_date_"+t,i=e[r];return i||(i=Ze(o,W(t)(e)),e[r]=i),i}function ji(t,e){var o=t.type,r=e instanceof Date;return!o&&r||Li(o,l)}function Vi(t){return 1===t.length?t[0]:t}var zi=/area/i;function Ui(t,e){var o=Yo.current.bindPoint(t,null,e).valueFields;for(var r in o)if(O(o[r]))return!0}function Hi(t){var e,o,r=t.start,i=t.dir,n=t.min,s=t.max,a=t.getter,p=t.hasItem,l=t.series,h=r;do{p(h+=i)&&(e=Ui(l,(o=a(h)).item))}while(n<=h&&h<=s&&!e);if(e)return o}function Fi(t,e,o,r,i){var n=e.min,s=e.max,a=n>0&&n<o,p=s+1<o;if(a||p){var l,h,c;if("interpolate"!==function(t){return t.missingValues?t.missingValues:zi.test(t.type)||t.stack?Jo:"interpolate"}(t))a&&(l=r(n-1)),p&&(h=r(s+1));else a&&(l=Ui(t,(c=r(n-1)).item)?c:Hi({start:n,dir:-1,min:0,max:o-1,getter:r,hasItem:i,series:t})),p&&(h=Ui(t,(c=r(s+1)).item)?c:Hi({start:s,dir:1,min:0,max:o-1,getter:r,hasItem:i,series:t}));l&&(t._outOfRangeMinPoint=l),h&&(t._outOfRangeMaxPoint=h)}}var Ni=function(t){function e(e,o,r){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=r,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||[],r=Math.max(o.length,1),i=[],n=R({title:{color:t.color}},e),s=0;s<r;s++){var a=R({},n,o[s]);M(a.title)&&(a.title=R({text:a.title},n.title));var p=new Ti(a);p.paneIndex=s,i.push(p),this.append(p)}this.panes=i},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],r=0;r<o.axes.length;r++){var i=o.axes[r],n=this.crosshairOptions(i);if(n&&n.visible){var s=new Si(this.chartService,i,n);this.crosshairs.push(s),o.content.append(s)}}},e.prototype.removeCrosshairs=function(t){for(var e=this.crosshairs,o=t.axes,r=e.length-1;r>=0;r--)for(var i=0;i<o.length;i++)if(e[r].axis===o[i]){e.splice(r,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,r=0;r<o.length;r++)if(o[r].options.name===t){e=o[r];break}return e||o[0]},e.prototype.findPointPane=function(t){for(var e,o=this.panes,r=0;r<o.length;r++)if(o[r].box.containsPoint(t)){e=o[r];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 r=this.axes[o];t!==r?e.push(r):r.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 r=this.charts[o];r!==t?e.push(r):r.destroy()}this.charts=e},e.prototype.addToLegend=function(t){for(var e=t.length,o=this.options.legend,r=o.labels||{},i=o.inactiveItems||{},n=i.labels||{},s=[],a=0;a<e;a++){var p=t[a],l=!1!==p.visible;if(!1!==p.visibleInLegend){var h=p.name,c=l?F(r):F(n)||F(r);c&&(h=c({text:ai(h)?h:"",series:p}));var u=p._defaults,d=p.color;T(d)&&u&&(d=u.color);var f=void 0,g=void 0;l?(f={},g=d):(f={color:n.color,font:n.font},g=i.markers.color),ai(h)&&""!==h&&s.push({text:h,labels:f,markerColor:g,series:p,active:l})}}it(o.items,s)},e.prototype.groupAxes=function(t){for(var e=[],o=[],r=0;r<t.length;r++)for(var i=t[r].axes,n=0;n<i.length;n++){var s=i[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 r=t[o],i=this.seriesPaneName(r);e[i]?e[i].push(r):e[i]=[r]}return e},e.prototype.filterVisibleSeries=function(t){for(var e=[],o=0;o<t.length;o++){var r=t[o];!1!==r.visible&&e.push(r)}return e},e.prototype.reflow=function(t){var e=this.options.plotArea,o=this.panes,r=V(e.margin);this.box=t.clone().unpad(r),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 r=0;r<e.length;r++)this.removeCrosshairs(e[r]),e[r].empty();this.render(e),this.detachLabels(),this.reflowAxes(this.panes),this.reflowCharts(e),this.createCrosshairs(e);for(var i=0;i<e.length;i++)e[i].refresh()},e.prototype.axisCrossingValues=function(t,e){for(var o=t.options,r=[].concat(o.axisCrossingValues||o.axisCrossingValue),i=e.length-r.length,n=r[0]||0,s=0;s<i;s++)r.push(n);return r},e.prototype.alignAxisTo=function(t,e,o,r){var i=t.getSlot(o,o,!0),n=t.options.reverse?2:1,s=e.getSlot(r,r,!0),a=e.options.reverse?2:1,p=t.box.translate(s[m+a]-i[m+n],s[x+a]-i[x+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],r=e[0],i=this.axisCrossingValues(o,e),n=this.axisCrossingValues(r,t),a={},p={},l={},h={},u=0;u<e.length;u++){var d=e[u],y=d.pane,v=y.id,m=!1!==d.options.visible,x=Xi(t,y)||o,b=i;x!==o&&(b=this.axisCrossingValues(x,e)),this.alignAxisTo(d,x,n[u],b[u]),d.options._overlap||(yt(d.lineBox().x1)===yt(x.lineBox().x1)&&(a[v]&&d.reflow(d.box.alignTo(a[v].box,c).translate(-d.options.margin,0)),m&&(a[v]=d)),yt(d.lineBox().x2)===yt(x.lineBox().x2)&&(d._mirrored||(d.options.labels.mirror=!d.options.labels.mirror,d._mirrored=!0),this.alignAxisTo(d,x,n[u],b[u]),p[v]&&d.reflow(d.box.alignTo(p[v].box,f).translate(d.options.margin,0)),m&&(p[v]=d)),0!==u&&r.pane===d.pane&&(d.alignTo(r),d.reflow(d.box)))}for(var w=0;w<t.length;w++){var _=t[w],C=_.pane,k=C.id,S=!1!==_.options.visible,A=Xi(e,C)||r,P=n;A!==r&&(P=this.axisCrossingValues(A,t)),this.alignAxisTo(_,A,i[w],P[w]),_.options._overlap||(yt(_.lineBox().y1)===yt(A.lineBox().y1)&&(_._mirrored||(_.options.labels.mirror=!_.options.labels.mirror,_._mirrored=!0),this.alignAxisTo(_,A,i[w],P[w]),l[k]&&_.reflow(_.box.alignTo(l[k].box,g).translate(0,-_.options.margin)),S&&(l[k]=_)),yt(_.lineBox().y2,3)===yt(A.lineBox().y2,3)&&(h[k]&&_.reflow(_.box.alignTo(h[k].box,s).translate(0,_.options.margin)),S&&(h[k]=_)),0!==w&&(_.alignTo(o),_.reflow(_.box)))}},e.prototype.shrinkAxisWidth=function(t){for(var e=this.groupAxes(t).any,o=Wi(e),r=0,i=0;i<t.length;i++){var n=t[i];n.axes.length>0&&(r=Math.max(r,o.width()-n.contentBox.width()))}if(0!==r)for(var s=0;s<e.length;s++){var a=e[s];a.options.vertical||a.reflow(a.box.shrink(r,0))}},e.prototype.shrinkAxisHeight=function(t){for(var e,o=0;o<t.length;o++){var r=t[o],i=r.axes,n=Math.max(0,Wi(i).height()-r.contentBox.height());if(0!==n){for(var s=0;s<i.length;s++){var a=i[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,r=0;r<t.length;r++){var i=t[r],n=i.axes,s=i.contentBox;if(n.length>0){var a=Wi(n),p=Math.max(s.y1-a.y1,s.y2-a.y2);o=Math.max(o,s.x1-a.x1);for(var l=0;l<n.length;l++){var h=n[l];h.reflow(h.box.translate(0,p))}}}for(var c=0;c<e.length;c++){var u=e[c];u.reflow(u.box.translate(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,r=Yi(o),i=0;i<r.length;i++){r[i].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 r=0;r<o;r++)e[r].reflow(t.contentBox)},e.prototype.reflowCharts=function(t){for(var e=this.charts,o=e.length,r=this.box,i=0;i<o;i++){var n=e[i].pane;n&&!Z(n,t)||e[i].reflow(r)}},e.prototype.reflowPanes=function(){for(var t=this.box,e=this.panes,o=e.length,r=t.height(),i=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 l=parseInt(p,10)/100;a.options.height=l*t.height()}a.reflow(t.clone()),r-=a.options.height}else i++}for(var h=0;h<o;h++){var c=e[h];c.options.height||(c.options.height=r/i)}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,r=0;r<o;r++)for(var i=e[r],n=0;n<o;n++){var s=e[n];if(i.options.vertical!==s.options.vertical){var a=i.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(k.drawing.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,r=o.opacity,i=o.background,n=o.border;void 0===n&&(n={}),""!==(e=i)&&null!==e&&"none"!==e&&"transparent"!==e&&st(e)||(i=v,r=0);var s=this._bgVisual=new k.drawing.MultiPath({fill:{color:i,opacity:r},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 r=0;r<e.length;r++){if("_navigator"!==e[r].pane.options.name){var i=e[r].categoryPoints[t];if(i&&i.length)for(var n=0;n<i.length;n++){var s=i[n];s&&st(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=[],r=0;r<e.length;r++)for(var i=e[r].points,n=0;n<i.length;n++){var s=i[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 r=e[o].points,i=0;i<r.length;i++){var n=r[i];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 r=e[o];if(r.box.containsPoint(t))return r}},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,r=0;r<t.length;r++){var i=t[r],n=i.pane,s=Xi(e,n)||e[0],a=r+o,p=this.createLabelAxis(i,a,s);if(p){o++;var l=n.axes.indexOf(i)+o;n.appendAxisAt(p,l)}}},e.prototype.createLabelAxis=function(t,e,o){var r=t.options.labels,i=r.position,n="end"!==i&&"start"!==i,s=r.visible;if(n||!1===s)return null;var a=this.groupAxes(this.panes),p=o.options.vertical?a.x:a.y,l=this.axisCrossingValues(o,p),h="end"===i,c=o.range(),u=h?c.max:c.min;if(dt(l[e],c.min,c.max)-u==0)return null;l.splice(e+1,0,u),o.options.axisCrossingValues=l;var d=t.clone();return t.clear(),d.options.name=void 0,d.options.line.visible=!1,d.options.crosshair=void 0,d.options.notes=void 0,d.options.plotBands=void 0,d},e}(Xt);function Gi(t){return!t.pane.axes.some((function(e){return e.options.vertical===t.options.vertical&&e!==t&&!1!==e.options.visible}))}function Wi(t){for(var e,o=t.length,r=0;r<o;r++){var i=t[r],n=!1!==i.options.visible;if(n||Gi(i)){var s=n?i.contentBox():i.lineBox();e?e.wrap(s):e=s.clone()}}return e||new zt}function Xi(t,e){for(var o=0;o<t.length;o++){var r=t[o];if(r&&r.pane===e)return r}}var Yi=function(t){return t.reduce((function(t,e){return t.concat(e.axes)}),[])};wt(Ni,{series:[],plotArea:{margin:{}},background:"",border:{color:n,width:0},paneDefaults:{title:{}},legend:{inactiveItems:{labels:{color:"#919191"},markers:{color:"#919191"}}}});var qi=Ni,Qi={hover:function(t,e){this._dispatchEvent(t,e,"plotAreaHover")},click:function(t,e){this._dispatchEvent(t,e,"plotAreaClick")}};function Zi(t,e,o){var r=e,i=t;if(t.indexOf(".")>-1){for(var n=t.split(".");n.length>1;)i=n.shift(),st(r[i])||(r[i]={}),r=r[i];i=n.shift()}r[i]=o}var Ki=function(t){function e(e,o,r){t.call(this);var i=o.canonicalFields(e),n=o.valueFields(e),s=o.sourceFields(e,i),a=this._seriesFields=[],p=r.query(e.type),l=e.aggregate||p;this._series=e,this._binder=o;for(var h=0;h<i.length;h++){var c=i[h],u=void 0;if(I(l))u=l[c];else{if(0!==h&&!Z(c,n))break;u=l}u&&a.push({canonicalName:c,name:s[h],transform:T(u)?u:Go[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,r=this._seriesFields,i=this._bindPoints(t||[]),n=i.dataItems[0],s={};if(n&&!P(n)&&!b(n)){var a=function(){};a.prototype=n,s=new a}for(var p=0;p<r.length;p++){var l=r[p],h=this._bindField(i.values,l.canonicalName),c=l.transform(h,o,i.dataItems,e);if(!(null===c||!I(c)||st(c.length)||c instanceof Date)){s=c;break}st(c)&&Zi(l.name,s,c)}return s},e.prototype._bindPoints=function(t){for(var e=this._binder,o=this._series,r=[],i=[],n=0;n<t.length;n++){var s=t[n];r.push(e.bindPoint(o,s)),i.push(o.data[s])}return{values:r,dataItems:i}},e.prototype._bindField=function(t,e){for(var o=[],r=t.length,i=0;i<r;i++){var n=t[i],s=n.valueFields,a=void 0;a=st(s[e])?s[e]:n.fields[e],o.push(a)}return o},e}(k.Class),$i=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}(k.Class);$i.current=new $i;var Ji=$i,tn=function(t){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=R({},t,t.from),o=R({},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=F(t),r=this.pointData();return e=o?o(r):this.formatValue(t.format),new zr(e,R({vertical:this.options.vertical},t),r)},e.prototype.reflow=function(t){this.render();var e=this.labelFrom,o=this.labelTo,r=this.value;this.box=t,e&&(e.options.aboveAxis=r.from>r.to,e.reflow(t)),o&&(o.options.aboveAxis=r.to>r.from,o.reflow(t)),this.note&&this.note.reflow(t)},e}(Fr);tn.prototype.defaults=R({},tn.prototype.defaults,{labels:{format:"{0} - {1}"},tooltip:{format:"{1}"}});var en=tn,on=function(t){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 en},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,r=t.from,i=t.to,n=this.valueAxisRanges[o];null!==t&&P(r)&&P(i)&&((n=this.valueAxisRanges[o]=n||{min:u,max:d}).min=Math.min(n.min,r),n.max=Math.max(n.max,r),n.min=Math.min(n.min,i),n.max=Math.max(n.max,i))},e.prototype.aboveAxis=function(t){var e=t.value;return e.from<e.to},e}(Zr);on.prototype.plotLimits=dr.prototype.plotLimits;var rn=on,nn=function(t){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}(vr),sn=function(t){function e(e,o){t.call(this),this.value=e,this.options=o,this.aboveAxis=mt(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,r=this.value,i=this.fromPoint=new nn(r,R({},this.options,{labels:o.from,markers:e.from})),n=this.toPoint=new nn(r,R({},this.options,{labels:o.to,markers:e.to}));this.copyFields(i),this.copyFields(n),this.append(i),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 k.drawing.Group;return t.append(this.fromPoint.createHighlight()),t.append(this.toPoint.createHighlight()),t},e.prototype.highlightVisual=function(){return this.visual},e.prototype.highlightVisualArgs=function(){return{options:this.options,from:this.fromPoint.highlightVisualArgs(),to:this.toPoint.highlightVisualArgs()}},e.prototype.tooltipAnchor=function(){var t=this.owner.pane.clipBox();if(!t||t.overlaps(this.box)){var e,o,r,i=this.box,n=i.center();return this.options.vertical?(e=n.x,o=i.y1-5,r=s):(e=i.x2+5,o=n.y,r=a),{point:new jt(e,o),align:{horizontal:"left",vertical:r}}}},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,r,i=this.options,n=i.labels,s=i.vertical;"auto"===n.position&&(s?e.y1<=t.y1?(r="above",o="below"):(r="below",o="above"):e.x1<=t.x1?(r=c,o=f):(r=f,o=c),n.from&&n.from.position||(this.fromPoint.options.labels.position=o),n.to&&n.to.position||(this.toPoint.options.labels.position=r))},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}(Xt);R(sn.prototype,fr),R(sn.prototype,gr),sn.prototype.defaults={markers:{visible:!1,background:v,size:8,type:p,border:{width:2},opacity:1},labels:{visible:!1,margin:V(3),padding:V(4),animation:{type:"fadeIn",delay:600},position:"auto"},notes:{label:{}},highlight:{markers:{border:{color:v,width:2}},zIndex:100},tooltip:{format:"{0} - {1}"}};var an=sn,pn=function(t){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 k.drawing.Path(t),o=new k.drawing.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}(Rr),ln=function(t){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 Do).process(this.toGeometryPoints(t))},e}(pn),hn=function(t){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}(pn);R(hn.prototype,wr);var cn=hn,un=function(t){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 an},e.prototype.createPoint=function(t,e){var o=e.categoryIx,r=e.category,i=e.series,n=e.seriesIx,s=t.valueFields;if(!ai(s.from)&&!ai(s.to)){if(this.seriesMissingValues(i)!==Jo)return null;s={from:0,to:0}}var a=this.pointOptions(i,n);a=this.evalPointOptions(a,s,r,o,i,n);var p=t.fields.color||i.color;T(i.color)&&(p=a.color);var l=new an(s,a);return l.color=p,this.append(l),l},e.prototype.createSegment=function(t,e,o){var r=(e.line||{}).style;return new("smooth"===r?ln:"step"===r?cn:pn)(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),r=t.getSlot(e[1],e[1],!this.options.clip);if(o&&r)return{from:o,to:r}},e.prototype.pointSlot=function(t,e){var o,r,i=e.from,n=e.to;return this.options.invertAxes?(o=new zt(i.x1,t.y1,i.x2,t.y2),r=new zt(n.x1,t.y1,n.x2,t.y2)):(o=new zt(t.x1,i.y1,t.x2,i.y2),r=new zt(t.x1,n.y1,t.x2,n.y2)),{from:o,to:r}},e.prototype.addValue=function(e,o){var r=e.valueFields;P(r.from)||(r.from=r.to),P(r.to)||(r.to=r.from),t.prototype.addValue.call(this,e,o)},e.prototype.updateRange=function(t,e){if(null!==t&&P(t.from)&&P(t.to)){var o=e.series.axis,r=this.valueAxisRanges[o]=this.valueAxisRanges[o]||{min:u,max:d},i=t.from,n=t.to;r.min=Math.min(r.min,i,n),r.max=Math.max(r.max,i,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 r=t[o];r&&(e.push((r.fromPoint||{}).marker),e.push((r.toPoint||{}).marker))}return e.concat(this._segments)},e}(dr);R(un.prototype,Sr,Or);var dn=un,fn=function(t){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,r=this.owner.seriesValueAxis(e),i=[],n=[],s=[],a=r.getSlot(o.low,o.high),p=r.getSlot(o.open,o.open),l=r.getSlot(o.close,o.close);p.x1=l.x1=a.x1=t.x1,p.x2=l.x2=a.x2=t.x2;var h=a.center().x;i.push([p.x1,p.y1]),i.push([h,p.y1]),n.push([h,l.y1]),n.push([l.x2,l.y1]),s.push([h,a.y1]),s.push([h,a.y2]),this.lines=[i,n,s],this.box=a.clone().wrap(p.clone().wrap(l)),this.reflowNote()},e.prototype.createBody=function(){},e}($r),gn=function(t){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 fn},e}(ei),yn=function(t){function e(e,o,r){t.call(this),this.from=e,this.to=o,this.series=r}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,r=[];if(t.isVertical){var i=t.aboveAxis?e.y1:e.y2;r.push([e.x1,i],[o.x2,i])}else{var n=t.aboveAxis?e.x2:e.x1;r.push([n,e.y1],[n,o.y2])}return r},e.prototype.createVisual=function(){t.prototype.createVisual.call(this);var e=this.series.line||{},o=k.drawing.Path.fromPoints(this.linePoints(),{stroke:{color:e.color,width:e.width,opacity:e.opacity,dashType:e.dashType}});S(o),this.visual.append(o)},e}(Xt);wt(yn,{animation:{type:"fadeIn",delay:600}});var vn=yn,mn=function(t){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=cr(e),r=!this.options.invertAxes,i=0;i<e.length;i++)for(var n=e[i],s=0,a=0,p=0;p<o;p++){var l=Yo.current.bindPoint(n,p),h=l.valueFields.value,c=l.fields.summary,u=s,d=void 0;c?"total"===c.toLowerCase()?(l.valueFields.value=s,u=0,d=s):(l.valueFields.value=a,d=u-a,a=0):P(h)&&(a+=h,d=s+=h),t(l,{category:this.categoryAxis.categoryAt(p),categoryIx:p,series:n,seriesIx:i,total:s,runningTotal:a,from:u,to:d,isVertical:r})}},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=[],r=0;r<t.length;r++){var i=t[r],n=e[r];if(n)for(var s=void 0,a=0;a<n.length;a++){var p=n[a];if(p&&s){var l=new vn(s,p,i);o.push(l),this.append(l)}s=p}}},e}(Zr),xn=["area","verticalArea","rangeArea","verticalRangeArea"],bn=[or,ir].concat(xn),wn=function(t){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 jr,t.length>0){this.invertAxes=Z(t[0].type,[tr,"bullet",ir,"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 to?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 r=t[o],i=e[r.options.name||"default"]||[];this.addToLegend(i);var n=this.filterVisibleSeries(i);if(n)for(var s=this.groupSeriesByCategoryAxis(n),a=0;a<s.length;a++)this.createChartGroup(s[a],r)}},e.prototype.createChartGroup=function(t,e){this.createAreaChart(Ei(t,["area","verticalArea"]),e),this.createRangeAreaChart(Ei(t,["rangeArea","verticalRangeArea"]),e),this.createBarChart(Ei(t,[er,tr]),e),this.createRangeBarChart(Ei(t,["rangeColumn","rangeBar"]),e),this.createBulletChart(Ei(t,["bullet","verticalBullet"]),e),this.createCandlestickChart(Ei(t,"candlestick"),e),this.createBoxPlotChart(Ei(t,["boxPlot","verticalBoxPlot"]),e),this.createOHLCChart(Ei(t,"ohlc"),e),this.createWaterfallChart(Ei(t,["waterfall","horizontalWaterfall"]),e),this.createLineChart(Ei(t,[or,ir]),e)},e.prototype.aggregateCategories=function(t){var e=this.srcSeries||this.series,o=[];this._currentPointsCache={},this._seriesPointsCache=this._seriesPointsCache||{};for(var r=0;r<e.length;r++){var i=e[r],n=this.seriesCategoryAxis(i),s=this.findPane(n.options.pane);i=(Li(n.options.type,l)||i.categoryField)&&Z(s,t)?this.aggregateSeries(i,n):this.filterSeries(i,n),o.push(i)}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),!P(e.options.min)&&!P(e.options.max))return t;var r=e.currentRangeIndices(),i=Z(t.type,bn),n=R({},t);return n.data=(n.data||[]).slice(r.min,r.max+1),i&&Fi(n,r,o,(function(o){return{item:t.data[o],category:e.categoryAt(o,!0),categoryIx:o-r.min}}),(function(e){return st(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 r=e.options,i=r.srcCategories,n=Li(r.type,l),s=t.data,a=n?Di:Wo,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):i[h],st(c)&&null!==c){var u=e.totalIndex(c);p[u]=p[u]||{items:[],category:c},p[u].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),r=R({},t),i=new Ki(R({},t),Yo.current,Ji.current),n=r.data=[],s=e.options.dataItems||[],a=e.currentRangeIndices(),p=function(t){var r=t-a.min,n=o[t];if(n||(n=o[t]={}),n.categoryIx=r,!n.item){var s=e.categoryAt(t,!0);n.category=s,n.item=i.aggregatePoints(n.items,s)}return n},l=a.min;l<=a.max;l++){var h=p(l);n[h.categoryIx]=h.item,h.items&&h.items.length&&(s[h.categoryIx]=h.item)}return Z(r.type,bn)&&Fi(r,a,e.totalCount(),p,(function(t){return o[t]})),e.options.dataItems=s,r},e.prototype.appendChart=function(e,o){var r=e.options.series,i=this.seriesCategoryAxis(r[0]),n=i.options.categories,s=Math.max(0,cr(r)-n.length);if(s>0)for(n=i.options.categories=i.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,r=X([].concat(e.valueAxis),(function(t){return t.name===o}))[0],i=((e.panes||[{}])[0]||{}).name||"default";return(r||{}).pane||i},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={},r=0;r<t.length;r++){var i=t[r].categoryAxis||"$$default$$";o.hasOwnProperty(i)||(o[i]=!0,e.push(i))}for(var n=[],s=0;s<e.length;s++){var a=Cn(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],r=new Zr(this,Object.assign({series:t,invertAxes:this.invertAxes,gap:o.gap,spacing:o.spacing},this.stackableChartOptions(o,e)));this.appendChart(r,e)}},e.prototype.createRangeBarChart=function(t,e){if(0!==t.length){var o=t[0],r=new rn(this,{series:t,invertAxes:this.invertAxes,gap:o.gap,spacing:o.spacing});this.appendChart(r,e)}},e.prototype.createBulletChart=function(t,e){if(0!==t.length){var o=t[0],r=new xi(this,{series:t,invertAxes:this.invertAxes,gap:o.gap,spacing:o.spacing,clip:e.options.clip});this.appendChart(r,e)}},e.prototype.createLineChart=function(t,e){if(0!==t.length){var o=t[0],r=new Br(this,Object.assign({invertAxes:this.invertAxes,series:t},this.stackableChartOptions(o,e)));this.appendChart(r,e)}},e.prototype.createAreaChart=function(t,e){if(0!==t.length){var o=t[0],r=new Dr(this,Object.assign({invertAxes:this.invertAxes,series:t},this.stackableChartOptions(o,e)));this.appendChart(r,e)}},e.prototype.createRangeAreaChart=function(t,e){if(0!==t.length){var o=new dn(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],r=new gn(this,{invertAxes:this.invertAxes,gap:o.gap,series:t,spacing:o.spacing,clip:e.options.clip});this.appendChart(r,e)}},e.prototype.createCandlestickChart=function(t,e){if(0!==t.length){var o=t[0],r=new ei(this,{invertAxes:this.invertAxes,gap:o.gap,series:t,spacing:o.spacing,clip:e.options.clip});this.appendChart(r,e)}},e.prototype.createBoxPlotChart=function(t,e){if(0!==t.length){var o=t[0],r=new ni(this,{invertAxes:this.invertAxes,gap:o.gap,series:t,spacing:o.spacing,clip:e.options.clip});this.appendChart(r,e)}},e.prototype.createWaterfallChart=function(t,e){if(0!==t.length){var o=t[0],r=new mn(this,{series:t,invertAxes:this.invertAxes,gap:o.gap,spacing:o.spacing});this.appendChart(r,e)}},e.prototype.axisRequiresRounding=function(t,e){for(var o=Ei(this.series,nr),r=0;r<this.series.length;r++){var i=this.series[r];if(Z(i.type,xn)){var n=i.line;n&&"step"===n.style&&o.push(i)}}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,r=0;r<o.length;r++){var i=o[r].categoryAxis||"";if((i===t||!i&&0===e)&&o[r].categoryField)return!0}},e.prototype.createCategoryAxesLabels=function(){for(var t=this.axes,e=0;e<t.length;e++)t[e]instanceof to&&t[e].createLabels()},e.prototype.createCategoryAxes=function(t){for(var e=this.invertAxes,o=[].concat(this.options.categoryAxis),r=[],i=0;i<o.length;i++){var n=o[i];if(Z(this.findPane(n.pane),t)){var s=n.name,a=n.categories;void 0===a&&(a=[]),n=R({vertical:e,reverse:!e&&this.chartService.rtl,axisCrossingValue:e?u:0},n),st(n.justified)||(n.justified=this.isJustified()),this.axisRequiresRounding(s,i)&&(n.justified=!1);var p=void 0;if(p=ji(n,a[0])?new lo(n,this.chartService):new to(n,this.chartService),o[i].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=i,r.push(p),this.appendAxis(p)}}var l=this.categoryAxis||r[0];this.categoryAxis=l,e?this.axisY=l:this.axisX=l},e.prototype.isJustified=function(){for(var t=this.series,e=0;e<t.length;e++){if(!Z(t[e].type,xn))return!1}return!0},e.prototype.createValueAxes=function(t){var e=this.valueAxisRangeTracker,o=e.query(),r=[].concat(this.options.valueAxis),i=this.invertAxes,n={vertical:!i,reverse:i&&this.chartService.rtl},s=[];this.stack100&&(n.roundToMajorUnit=!1,n.labels={format:"P0"});for(var a=0;a<r.length;a++){var p=r[a];if(Z(this.findPane(p.pane),t)){var l=p.name,h=Li(p.type,"log")?{min:.1,max:1}:{min:0,max:1},c=e.query(l)||o||h;0===a&&c&&o&&(c.min=Math.min(c.min,o.min),c.max=Math.max(c.max,o.max));var u=new(Li(p.type,"log")?Co:vo)(c.min,c.max,R({},n,p),this.chartService);if(l){if(this.namedValueAxes[l])throw new Error("Value axis with name "+l+" is already defined");this.namedValueAxes[l]=u}u.axisIndex=a,s.push(u),this.appendAxis(u)}}var d=this.valueAxis||s[0];this.valueAxis=d,i?this.axisX=d:this.axisY=d},e.prototype._dispatchEvent=function(t,e,o){var r=t._eventCoordinates(e),i=new jt(r.x,r.y),n=this.pointPane(i),s=[],a=[];if(n){for(var p=n.axes,l=0;l<p.length;l++){var h=p[l];h.getValue?Bi(a,h.getValue(i)):Bi(s,h.getCategory(i))}0===s.length&&Bi(s,this.categoryAxis.getCategory(i)),s.length>0&&a.length>0&&t.trigger(o,{element:ht(e),originalEvent:e,category:Vi(s),value:Vi(a)})}},e.prototype.pointPane=function(t){for(var e=this.panes,o=0;o<e.length;o++){var r=e[o];if(r.contentBox.containsPoint(t))return r}},e.prototype.updateAxisOptions=function(t,e){_n(this.options,t,e),_n(this.originalOptions,t,e)},e}(qi);function _n(t,e,o){R([].concat(e instanceof to?t.categoryAxis:t.valueAxis)[e.axisIndex],o)}function Cn(t,e,o){return X(t,(function(t){return 0===o&&!t.categoryAxis||t.categoryAxis===e}))}wt(wn,{categoryAxis:{},valueAxis:{}}),R(wn.prototype,Qi);var kn=wn;function Sn(){this._defaultPrevented=!0}var An=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 r=0;r<o.length;r++){var i=o[r];i&&i.toggleHighlight&&i.hasHighlight()&&(this.togglePointHighlight(i,!0,e),this._points.push(i))}},e.prototype.togglePointHighlight=function(t,e,o){var r=(t.options.highlight||{}).toggle;if(r){var i={category:t.category,series:t.series,dataItem:t.dataItem,value:t.value,stackValue:t.stackValue,preventDefault:Sn,visual:t.highlightVisual(),show:e};r(i),i._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}(k.Class);function Pn(t,e){var o=(e||"").toLowerCase(),r=t.event;return"none"===o&&!(r.ctrlKey||r.shiftKey||r.altKey)||r[o+"Key"]}function Mn(t){for(var e={},o=0;o<t.length;o++){var r=t[o];r.axis.options.name&&(e[r.axis.options.name]={min:r.range.min,max:r.range.max})}return e}var On=function(t){function e(e,o){t.call(this),this.plotArea=e,this.options=R({},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=Pn(t,this.options.key),this._active},e.prototype.move=function(t){if(this._active){var e=this.axisRanges=this._panAxes(t,m).concat(this._panAxes(t,x));if(e.length)return this.axisRanges=e,Mn(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 r=e[o];t.updateAxisOptions(r.axis,r.range)}t.redraw(t.panes)}},e.prototype.destroy=function(){delete this.plotArea},e.prototype._panAxes=function(t,e){var o=this.plotArea,r=-t[e].delta,i=(this.options.lock||"").toLowerCase(),n=[];if(0!==r&&(i||"").toLowerCase()!==e)for(var s=o.axes,a=0;a<s.length;a++){var p=s[a];if(e===m&&!p.options.vertical||e===x&&p.options.vertical){var l=p.pan(r);l&&(l.limitRange=!0,n.push({axis:p,range:l}))}}return n},e}(k.Class);On.prototype.options={key:"none",lock:"none"};var Tn=On,Bn=function(t){function e(e,o){t.call(this),this.chart=e,this.options=R({},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){j(this._marquee,t)},e.prototype.start=function(t){if(Pn(t,this.options.key)){var e=this.chart,o=e._eventCoordinates(t),r=this._zoomPane=e._plotArea.paneByPoint(o),i=r?r.chartsBox().clone():null;if(r&&i){var n=this._elementOffset();return i.translate(n.left,n.top),this._zoomPaneClipBox=i,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=j(t,["paddingLeft","paddingTop"]),o=e.paddingLeft,r=e.paddingTop,i=pt(t);return{left:o+i.left,top:r+i.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 r={x:o.left,y:o.top},i={x:o.left+o.width,y:o.top+o.height};return this._updateAxisRanges(r,i),this.removeElement(),delete this._zoomPane,Mn(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 r=t[o];e.updateAxisOptions(r.axis,r.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(),r=[],i=this._zoomPane.axes,n=0;n<i.length;n++){var s=i[n],a=s.options.vertical;if((o!==m||a)&&(o!==x||!a)&&st(s.axisIndex)){var p=s.pointsRange(t,e);p&&r.push({axis:s,range:p})}}this.axisRanges=r},e.prototype._selectionPosition=function(t){var e=this._zoomPaneClipBox,o={x:t.x.startLocation,y:t.y.startLocation},r=t.x.location,i=t.y.location,n=(this.options.lock||"").toLowerCase(),s=Math.min(o.x,r),a=Math.min(o.y,i),p=Math.abs(o.x-r),l=Math.abs(o.y-i);return n===m&&(s=e.x1,p=e.width()),n===x&&(a=e.y1,l=e.height()),r>e.x2&&(p=e.x2-o.x),r<e.x1&&(p=o.x-e.x1),i>e.y2&&(l=e.y2-o.y),i<e.y1&&(l=o.y-e.y1),{left:Math.max(s,e.x1),top:Math.max(a,e.y1),width:p,height:l}},e}(k.Class);Bn.prototype.options={key:"shift",lock:"none"};var Rn=Bn,In=function(t){function e(e,o){t.call(this),this.chart=e,this.options=R({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(),r=[],i=this.chart._plotArea.axes,n=0;n<i.length;n++){var s=i[n],a=s.options.vertical;if((o!==m||a)&&(o!==x||!a)&&s.zoomRange){var p=dt(this.options.rate,.01,.9),l=s.zoomRange(-t*p,e);l&&r.push({axis:s,range:l})}}return this.axisRanges=r,Mn(r)},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 r=t[o];e.updateAxisOptions(r.axis,r.range)}e.redraw(e.panes)}},e.prototype.destroy=function(){delete this.chart},e}(k.Class),Ln=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 k.drawing.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 r=0;r<t.length;r++){var i=t[r];i.reflow(new zt),i.renderVisual()}},e.prototype.reflow=function(t){this.visual.rect(t.toRect()),this.visual.reflow();var e=this.visual.clippedBBox();this.box=e?se(e):new zt},e.prototype.renderVisual=function(){this.addVisual()},e.prototype.createVisual=function(){},e}(Xt),En=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 oe({vertical:!1,wrap:!1,align:a,spacing:this.options.spacing}),this.append(this.container)},e.prototype.createMarker=function(){this.container.append(new Zt(this.markerOptions()))},e.prototype.markerOptions=function(){var t=this.options,e=t.markerColor;return R({},t.markers,{background:e,border:{color:e}})},e.prototype.createLabel=function(){var t=this.options,e=R({},t.labels);this.container.append(new pe(t.text,e))},e.prototype.renderComplete=function(){t.prototype.renderComplete.call(this);var e=this.options.cursor||{},o=this._itemOverlay=k.drawing.Path.fromRect(this.container.box.toRect(),{fill:{color:v,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:ht(t),text:e.text,series:e.series,seriesIndex:e.series.index,pointIndex:e.pointIndex}},e.prototype.renderVisual=function(){var e=this,o=this.options,r=o.visual;r?(this.visual=r({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}(qt),Dn=function(t){function e(e,o){void 0===o&&(o={}),t.call(this,e),this.chartService=o,Z(this.options.position,[g,f,s,c,"custom"])||(this.options.position=f),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,r=e,i=a;"custom"===e?r=c:Z(e,[g,s])?(r="start"===o?c:"end"===o?f:a,i=e):o&&("start"===o?i=g:"end"===o&&(i=s)),this.container=new qt({margin:t.margin,padding:t.padding,background:t.background,border:t.border,vAlign:i,align:r,zIndex:t.zIndex,shrinkToFit:!0}),this.hasTitle()?this.itemsContainer=new qt({vAlign:i,align:r,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(),r=new Ln({vertical:o,spacing:e.spacing,rtl:t.rtl},t),i=e.items;e.reverse&&(i=i.slice(0).reverse());for(var n=i.length,s=0;s<n;s++){var a=i[s];r.append(new En(R({},{markers:e.markers,labels:e.labels,rtl:t.rtl},e.item,a)))}r.render(),this.itemsContainer.append(r)},e.prototype.isVertical=function(){var t=this.options,e=t.orientation,o=t.position;return"custom"===o&&"horizontal"!==e||(st(e)?"horizontal"!==e:Z(o,[c,f]))},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 zt(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,r=e.position,i=e.width,n=e.height,a=r===g||r===s?m:x,p=this.isVertical(),l=t.clone(),h=t.clone();r!==c&&r!==f||(h.y1=l.y1=0),p&&n?(h.y2=h.y1+n,h.align(l,x,o.options.vAlign)):!p&&i&&(h.x2=h.x1+i,h.align(l,m,o.options.align)),o.reflow(h);var u=(h=o.box).clone();(e.offsetX||e.offsetY)&&(h.translate(e.offsetX,e.offsetY),o.reflow(h)),u[a+1]=t[a+1],u[a+2]=t[a+2],this.box=u},e.prototype.containerCustomReflow=function(t){var e=this.options,o=this.container,r=e.offsetX,i=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 zt(r,i,r+p.width(),i+p.height()))},e.prototype.renderVisual=function(){this.hasItems()&&t.prototype.renderVisual.call(this)},e.prototype.createLegendTitle=function(t){var e=R({},{color:n,position:g,align:a},t),o=e.text;if(t&&!1!==t.visible){if(st(e)&&e.visible){var r=F(e);r?o=r({text:o}):e.format&&(o=this.chartService.format.auto(e.format,o))}this.title=new pe(o,e),this.createTitleLayout(),this.appendTitleLayoutContent()}},e.prototype.createTitleLayout=function(){this.layout=new oe({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===s?(this.layout.append(this.itemsContainer),this.layout.append(this.title)):(this.layout.append(this.title),this.layout.append(this.itemsContainer))},e}(Xt);wt(Dn,{position:f,items:[],offsetX:0,offsetY:0,margin:V(5),padding:V(5),border:{color:n,width:0},item:{cursor:"pointer",spacing:6},spacing:6,background:"",zIndex:1,markers:{border:{width:0},width:15,height:3,type:"rect",align:c,vAlign:a}});var jn=Dn,Vn=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 r,i=this._registry,n=i[0],s=0;s<i.length;s++){var a=i[s];if((r=Ei(t,a.seriesTypes)).length>0){n=a;break}}return new n.type(r,e,o)},e}(k.Class);Vn.current=new Vn;var zn=Vn;function Un(t){var e=document.createElement("div");return t&&(e.className=t),e}function Hn(t){for(var e=t;e&&!Y(e,"k-handle");)e=e.parentNode;return e}var Fn=function(t){function e(e,o,r,i){t.call(this);var n=e.element;this.options=R({},this.options,r),this.chart=e,this.observer=i,this.chartElement=n,this.categoryAxis=o,this._dateAxis=this.categoryAxis instanceof lo,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=Un("k-selector");j(e,{top:t.offset.top,left:t.offset.left,width:t.width,height:t.height,direction:"ltr"});var o=this.selection=Un("k-selection");this.leftMask=Un("k-mask"),this.rightMask=Un("k-mask"),e.appendChild(this.leftMask),e.appendChild(this.rightMask),e.appendChild(o),o.appendChild(Un("k-selection-bg"));var r=this.leftHandle=Un("k-handle k-left-handle"),i=this.rightHandle=Un("k-handle k-right-handle");r.appendChild(Un()),i.appendChild(Un()),o.appendChild(r),o.appendChild(i),this.chartElement.appendChild(e);var n=j(o,["borderLeftWidth","borderRightWidth","height"]),s=j(r,"height").height,a=j(i,"height").height;t.selection={border:{left:n.borderLeftWidth,right:n.borderRightWidth}},j(r,{top:(n.height-s)/2}),j(i,{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),nt(this.wrapper,((t={})[sr]=this._mousewheelHandler,t))),this._domEvents=Me.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&&R(t,{min:Ze(o,t.min),max:Ze(o,t.max),from:Ze(o,t.from),to:Ze(o,t.to)});var r=j(this.chartElement,["paddingLeft","paddingTop"]),i=r.paddingLeft,n=r.paddingTop;this.options=R({},{width:e.width(),height:e.height()+.1,padding:{left:i,top:n},offset:{left:e.x1+i,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&&(vt(this.wrapper,((t={})[sr]=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=ht(t);if(!this._state&&o){this.chart._unsetActivePoint(),this._state={moveTarget:Hn(o)||o,startLocation:t.x?t.x.location:0,range:{from:this._index(e.from),to:this._index(e.to)}};var r=this._rangeEventArgs({from:this._index(e.from),to:this._index(e.to)});this.trigger("selectStart",r)&&(this._state=null)}},e.prototype._press=function(t){var e;(e=this._state?this._state.moveTarget:Hn(ht(t)))&&w(e,"k-handle-active")},e.prototype._move=function(t){if(this._state){var e=this._state,o=this.options,r=this.categoryAxis,i=e.range,n=e.moveTarget,s=r.options.reverse,a=this._index(o.from),p=this._index(o.to),l=this._index(o.min),h=this._index(o.max),c=e.startLocation-t.x.location,u=i.from,d=i.to,f=i.to-i.from,g=j(this.wrapper,"width").width/(r.categoriesCount()-1),y=Math.round(c/g)*(s?-1:1);if(n){var v=Y(n,"k-left-handle"),m=Y(n,"k-right-handle");Y(n,"k-selection k-selection-bg")?(i.from=Math.min(Math.max(l,a-y),h-f),i.to=Math.min(i.from+f,h)):v&&!s||m&&s?(i.from=Math.min(Math.max(l,a-y),h-1),i.to=Math.max(i.from+1,i.to)):(v&&s||m&&!s)&&(i.to=Math.min(Math.max(l+1,p-y),h),i.from=Math.min(i.to-1,i.from)),i.from===u&&i.to===d||(this.move(i.from,i.to),this.trigger("select",this._rangeEventArgs(i)))}}},e.prototype._end=function(){if(this._state){var t=this._state.moveTarget;t&&C(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,r=this.chart._eventCoordinates(t),i=o.pointCategoryIndex(new jt(r.x,o.box.y1)),n=this._index(e.from),s=this._index(e.to),a=this._index(e.min),p=this._index(e.max),l=s-n,h=n+l/2,c={},u=3===t.event.which,d=Math.round(h-i);this._state||u||(this.chart._unsetActivePoint(),o.options.justified||d--,c.from=Math.min(Math.max(a,n-d),p-l),c.to=Math.min(c.from+l,p),this._start(t),this._state&&(this._state.range=c,this.trigger("select",this._rangeEventArgs(c)),this._end()))},e.prototype._mousewheel=function(t){var e=this,o=ot(t);if(this._start({target:this.selection}),this._state){var r=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(r.from),to:this._value(r.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,r=this.options,i=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),l=Math.max(s,a);t.preventDefault(),n.from=i.pointCategoryIndex(new jt(p))||r.min,n.to=i.pointCategoryIndex(new jt(l))||r.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,r=this.categoryAxis.options.reverse,i=o.offset,n=o.padding,s=o.selection.border,a=r?e:t,p=r?t:e,l="x"+(r?2:1),h=this._slot(a),c=yt(h[l]-i.left+n.left);j(this.leftMask,{width:c}),j(this.selection,{left:c}),h=this._slot(p);var u=yt(o.width-(h[l]-i.left+n.left));j(this.rightMask,{width:u});var d=o.width-u;d!==o.width&&(d+=s.right),j(this.rightMask,{left:d}),j(this.selection,{width:Math.max(o.width-(c+u)-s.right,0)})},e.prototype.set=function(t,e){var o=this.options,r=this._index(o.min),i=this._index(o.max),n=dt(this._index(t),r,i),s=dt(this._index(e),n+1,i);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),r=this._index(e.max),i=e.mousewheel.zoom,n=this._index(e.from),s=this._index(e.to),a={from:n,to:s},p=R({},a);if(this._state&&(a=this._state.range),i!==f&&(a.from=dt(dt(n-t,0,s-1),o,r)),i!==c&&(a.to=dt(dt(s+t,a.from+1,r),o,r)),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,r=this._index(o.min),i=this._index(o.max),n=this._index(o.from),s=this._index(o.to),a={from:n,to:s},p=R({},a),l=this.categoryAxis.options.reverse,h=m+(l?"2":"1"),c=this.categoryAxis.lineBox(),u=Math.abs(c[h]-e.x),d=c.width(),f=yt(u/d,2),g=yt(f*t),y=yt((1-f)*t);if(this._state&&(a=this._state.range),a.from=dt(dt(n-g,0,s-1),r,i),a.to=dt(dt(s+y,a.from+1,i),r,i),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}(k.Class);wt(Fn,{visible:!0,mousewheel:{zoom:"both"},min:d,max:u});var Nn=Fn,Gn=function(t){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=R({},this.options,e.options.tooltip),r=e.tooltipAnchor();r?(this._current=e,t.prototype.show.call(this,{point:e,anchor:r},o,e)):this.hide()}},e.prototype.hide=function(){delete this._current,t.prototype.hide.call(this)},e}(wi),Wn=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=X(t,(function(t){var e=t.series.tooltip;return!(e&&!1===e.visible)}));if(o.length>0){var r=o[0],i=this.plotArea.categoryAxis.getSlot(r.categoryIx),n=e?this._slotAnchor(e,i):this._defaultAnchor(r,i);this.show({anchor:n,shared:!0,points:t,category:r.category,categoryText:this.formatService.auto(this.options.categoryFormat,r.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(),r=this.plotArea.categoryAxis.options.vertical,i=o.center(),n=e.center();return{point:r?new jt(i.x,n.y):new jt(n.x,i.y),align:{horizontal:"center",vertical:"center"}}},e}(wi);wt(Wn,{categoryFormat:"{0:d}"});var Xn=Wn,Yn=function(t){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?x:m,r=this.fromScale=new k.geometry.Point(1,1);r[o]=$o,t.transform(k.geometry.transform().scale(r.x,r.y))}else this.abort()},e.prototype.step=function(t){var e=K(this.fromScale.x,1,t),o=K(this.fromScale.y,1,t);this.element.transform(k.geometry.transform().scale(e,o,this.origin))},e.prototype.abort=function(){t.prototype.abort.call(this),this.element.transform(null)},e}(k.drawing.Animation);wt(Yn,{duration:600}),k.drawing.AnimationFactory.current.register(tr,Yn);var qn=function(t){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(k.geometry.transform().scale($o,$o,t))},e.prototype.step=function(t){this.element.transform(k.geometry.transform().scale(t,t,this.center))},e}(k.drawing.Animation);wt(qn,{easing:"easeOutElastic"}),k.drawing.AnimationFactory.current.register("bubble",qn);var Qn=function(t){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}(k.drawing.Animation);wt(Qn,{duration:200,easing:"linear"}),k.drawing.AnimationFactory.current.register("fadeIn",Qn);var Zn=function(t){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(k.geometry.transform().scale($o,$o,this.options.center))},e.prototype.step=function(t){this.element.transform(k.geometry.transform().scale(t,t,this.options.center))},e}(k.drawing.Animation);wt(Zn,{easing:"easeOutElastic",duration:600}),k.drawing.AnimationFactory.current.register(rr,Zn);var Kn=Zn,$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.render=function(){t.prototype.render.call(this),this.renderSegments()},e.prototype.createSegment=function(t,e,o){return new("smooth"===e.style?kr:xr)(t,e,o)},e.prototype.animationPoints=function(){return t.prototype.animationPoints.call(this).concat(this._segments)},e.prototype.createMissingValue=function(t,e){if(e===Jo){var o={x:t.x,y:t.y};return ai(o.x)||(o.x=0),ai(o.y)||(o.y=0),o}},e}(li);R($n.prototype,Sr);var Jn=$n,ts=function(t){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 jr,this.yAxisRangeTracker=new jr},e.prototype.render=function(t){void 0===t&&(t=this.panes);for(var e=this.groupSeriesByPane(),o=0;o<t.length;o++){var r=t[o],i=e[r.options.name||"default"]||[];this.addToLegend(i);var n=this.filterVisibleSeries(i);n&&(this.createScatterChart(Ei(n,"scatter"),r),this.createScatterLineChart(Ei(n,"scatterLine"),r),this.createBubbleChart(Ei(n,"bubble"),r))}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,r=X([].concat(e.xAxis),(function(t){return t.name===o}))[0],i=t.yAxis,n=X([].concat(e.yAxis),(function(t){return t.name===i}))[0],s=(e.panes||[{}])[0].name||"default";return(r||{}).pane||(n||{}).pane||s},e.prototype.createScatterChart=function(t,e){t.length>0&&this.appendChart(new li(this,{series:t,clip:e.options.clip}),e)},e.prototype.createScatterLineChart=function(t,e){t.length>0&&this.appendChart(new Jn(this,{series:t,clip:e.options.clip}),e)},e.prototype.createBubbleChart=function(t,e){t.length>0&&this.appendChart(new di(this,{series:t,clip:e.options.clip}),e)},e.prototype.createXYAxis=function(t,e,o){for(var r,i=t.name,n=e?this.namedYAxes:this.namedXAxes,s=e?this.yAxisRangeTracker:this.xAxisRangeTracker,a=R({reverse:!e&&this.chartService.rtl},t,{vertical:e}),p=Li(a.type,"log"),h=s.query(),c=p?{min:.1,max:1}:{min:0,max:1},u=s.query(i)||h||c,d=[a.min,a.max],f=this.series,g=0;g<f.length;g++){var y=f[g],v=y[e?"yAxis":"xAxis"];if(v===a.name||0===o&&!v){var m=Yo.current.bindPoint(y,0).valueFields;d.push(m[e?"y":"x"]);break}}0===o&&h&&(u.min=Math.min(u.min,h.min),u.max=Math.max(u.max,h.max));for(var x=0;x<d.length;x++)if(d[x]instanceof Date){r=!0;break}var b=new(Li(a.type,l)||!a.type&&r?xo:p?Co:vo)(u.min,u.max,a,this.chartService);if(b.axisIndex=o,i){if(n[i])throw new Error((e?"Y":"X")+" axis with name "+i+" is already defined");n[i]=b}return this.appendAxis(b),b},e.prototype.createAxes=function(t){for(var e=this.options,o=[].concat(e.xAxis),r=[],i=[].concat(e.yAxis),n=[],s=0;s<o.length;s++){Z(this.findPane(o[s].pane),t)&&r.push(this.createXYAxis(o[s],!1,s))}for(var a=0;a<i.length;a++){Z(this.findPane(i[a].pane),t)&&n.push(this.createXYAxis(i[a],!0,a))}this.axisX=this.axisX||r[0],this.axisY=this.axisY||n[0]},e.prototype._dispatchEvent=function(t,e,o){for(var r=t._eventCoordinates(e),i=new jt(r.x,r.y),n=this.axes,s=n.length,a=[],p=[],l=0;l<s;l++){var h=n[l],c=h.options.vertical?p:a,u=h.getValue(i);null!==u&&c.push(u)}a.length>0&&p.length>0&&t.trigger(o,{element:ht(e),originalEvent:e,x:Vi(a),y:Vi(p)})},e.prototype.updateAxisOptions=function(t,e){var o=t.options.vertical,r=this.groupAxes(this.panes),i=(o?r.y:r.x).indexOf(t);es(this.options,i,o,e),es(this.originalOptions,i,o,e)},e}(qi);function es(t,e,o,r){R([].concat(o?t.yAxis:t.xAxis)[e],r)}wt(ts,{xAxis:{},yAxis:{}}),R(ts.prototype,Qi);var os=ts,rs=function(t){function e(e,o,r){t.call(this,r),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 r=F(t),i=this.pointData();if(r?o=r(i):t.format&&(o=e.format.auto(t.format,o)),t.visible&&(o||0===o)){if(t.position===a||"insideEnd"===t.position)t.color||(t.color=Mt(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 pe(o,R({},t,{align:a,vAlign:"",animation:{type:"fadeIn",delay:this.animationDelay}}),i),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(),r=t.distance,i=o.middle();if(e){var n,s=e.box.height(),p=e.box.width();if(t.position===a)o.radius=Math.abs((o.radius-s)/2)+s,n=o.point(i),e.reflow(new zt(n.x,n.y-s/2,n.x,n.y));else if("insideEnd"===t.position)o.radius=o.radius-s/2,n=o.point(i),e.reflow(new zt(n.x,n.y-s/2,n.x,n.y));else{var l;(n=o.clone().expand(r).point(i)).x>=o.center.x?(l=n.x+p,e.orientation=f):(l=n.x-p,e.orientation=c),e.reflow(new zt(l,n.y-s,n.x,n.y))}}},e.prototype.createVisual=function(){var e=this,o=this.sector,r=this.options;if(t.prototype.createVisual.call(this),this.value)if(r.visual){var i=(o.startAngle+180)%360,n=r.visual({category:this.category,dataItem:this.dataItem,value:this.value,series:this.series,percentage:this.percentage,center:new k.geometry.Point(o.center.x,o.center.y),radius:o.radius,innerRadius:o.innerRadius,startAngle:i,endAngle:i+o.angle,options:r,sender:this.getSender(),createVisual:function(){var t=new k.drawing.Group;return e.createSegmentVisual(t),t}});n&&this.visual.append(n)}else this.createSegmentVisual(this.visual)},e.prototype.createSegmentVisual=function(t){var e=this.sector,o=this.options,r=o.border||{},i=r.width>0?{stroke:{color:r.color,width:r.width,opacity:r.opacity,dashType:r.dashType}}:{},n=o.color,s={color:n,opacity:o.opacity},a=this.createSegment(e,R({fill:s,stroke:{opacity:o.opacity},zIndex:o.zIndex},i));t.append(a),Ur(o)&&t.append(this.createGradientOverlay(a,{baseColor:n,fallbackFill:s},R({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 k.drawing.Circle(new k.geometry.Circle(new k.geometry.Point(t.center.x,t.center.y),t.radius),e):Gt.current.createRing(t,e)},e.prototype.createAnimation=function(){var e=this.options,o=this.sector.center;R(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,R({},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 k.geometry.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:ss(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}(Xt),is=yt(gt(30),10),ns=yt(gt(60),10);function ss(t){var e=gt(t),o=yt(Math.sin(e),10),r=yt(Math.cos(e),10);return{horizontal:Math.abs(o)>ns?a:r<0?f:c,vertical:Math.abs(o)<is?a:o<0?s:g}}wt(rs,{color:v,overlay:{gradient:"roundedBevel"},border:{width:.5},labels:{visible:!1,distance:35,font:"12px sans-serif",margin:V(.5),align:p,zIndex:1,position:"outsideEnd"},animation:{type:rr},highlight:{visible:!0,border:{width:1}},visible:!0}),R(rs.prototype,fr);var as=rs,ps={createLegendItem:function(t,e,o){var r=this.options.legend||{},i=r.labels||{},n=r.inactiveItems||{},s=n.labels||{};if(o&&!1!==o.visibleInLegend){var a,p,l=!1!==o.visible,h=l?F(i):F(s)||F(i),c=o.category;h&&(c=h({text:c,series:o.series,dataItem:o.dataItem,percentage:o.percentage,value:t})),l?(a={},p=e.color):(a={color:s.color,font:s.font},p=(n.markers||{}).color),ai(c)&&""!==c&&this.legendItems.push({active:l,pointIndex:o.index,text:c,series:o.series,markerColor:p,labels:a})}}},ls=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 r=o.length,i=e.series,n=i.length,s=0;s<n;s++){var p=i[s],l=p.data,h=Ii(p),c=h.total,u=h.points,d=h.count,f=360/c,g=void 0;isFinite(f)||(g=360/d);var y=void 0;y=st(p.startAngle)?p.startAngle:e.startAngle,s!==n-1&&"outsideEnd"===p.labels.position&&(p.labels.position=a);for(var v=0;v<u.length;v++){var m=u[v];if(m){var x=m.fields,b=m.value,w=m.visible,_=0!==b?g||b*f:0,C=1!==l.length&&Boolean(x.explode);T(p.color)||(p.color=x.color||o[v%r]),t(m.valueFields.value,new Ht(null,0,0,y,_),{owner:this,category:st(x.category)?x.category:"",index:v,series:p,seriesIx:s,dataItem:l[v],percentage:0!==c?b/c:0,explode:C,visibleInLegend:x.visibleInLegend,visible:w,zIndex:n-s,animationDelay:this.animationDelay(v,s,n)}),!1!==w&&(y+=_)}}}},e.prototype.evalSegmentOptions=function(t,e,o){var r=o.series;hr(t,{value:e,series:r,dataItem:o.dataItem,category:o.category,percentage:o.percentage},{defaults:r._defaults,excluded:["data","content","template","visual","toggle"]})},e.prototype.addValue=function(t,e,o){var r=R({},o.series,{index:o.index});if(this.evalSegmentOptions(r,t,o),this.createLegendItem(t,r,o),!1!==o.visible){var i=new as(t,e,r);Object.assign(i,o),this.append(i),this.points.push(i)}},e.prototype.reflow=function(t){var e=this.options,o=this.points,r=this.seriesConfigs;void 0===r&&(r=[]);var i=o.length,n=t.clone(),s=Math.min(n.width(),n.height()),a=s/2,p=s-.85*s,l=new zt(n.x1,n.y1,n.x1+s,n.y1+s),h=l.center(),c=n.center(),u=e.series.length,d=[],g=[],y=mt(e.padding,p);this.targetBox=t,y=y>a-5?a-5:y,l.translate(c.x-h.x,c.y-h.y);for(var v=a-y,m=new jt(v+l.x1+y,v+l.y1+y),x=0;x<i;x++){var b=o[x],w=b.sector,_=b.seriesIx;if(w.radius=v,w.center=m,r.length){var C=r[_];w.innerRadius=C.innerRadius,w.radius=C.radius}_===u-1&&b.explode&&(w.center=w.clone().setRadius(.15*w.radius).point(w.middle())),b.reflow(l);var k=b.label;k&&"outsideEnd"===k.options.position&&_===u-1&&(k.orientation===f?g.push(k):d.push(k))}d.length>0&&(d.sort(this.labelComparator(!0)),this.leftLabelsReflow(d)),g.length>0&&(g.sort(this.labelComparator(!1)),this.rightLabelsReflow(g)),this.box=l},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=ut(this.points),o=e.sector,r=t.length-1,i=o.radius+e.options.labels.distance,n=[],s=t[0].box,a=yt(s.y1-(o.center.y-i-s.height()-s.height()/2));n.push(a);for(var p=0;p<r;p++){var l=t[p+1].box;s=t[p].box,a=yt(l.y1-s.y2),n.push(a)}return a=yt(o.center.y+i-t[r].box.y2-t[r].box.height()/2),n.push(a),n},e.prototype.distributeLabels=function(t,e){for(var o,r,i,n=t.length,s=0;s<n;s++)for(i=-t[s],o=r=s;i>0&&(o>=0||r<n);)i=this._takeDistance(t,s,--o,i),i=this._takeDistance(t,s,++r,i);this.reflowLabels(t,e)},e.prototype._takeDistance=function(t,e,o,r){var i=r;if(t[o]>0){var n=Math.min(t[o],i);i-=n,t[o]-=n,t[e]+=n}return i},e.prototype.reflowLabels=function(t,e){var o,r=ut(this.points),i=r.sector,n=r.options.labels,s=e.length,a=n.distance,l=i.center.y-(i.radius+a)-e[0].box.height();t[0]+=2;for(var h=0;h<s;h++){var c=e[h],u=c.box;l+=t[h],o=this.hAlignLabel(u.x2,i.clone().expand(a),l,l+u.height(),c.orientation===f),c.orientation===f?(n.align!==p&&(o=i.radius+i.center.x+a),c.reflow(new zt(o+u.width(),l,o,l))):(n.align!==p&&(o=i.center.x-i.radius-a),c.reflow(new zt(o-u.width(),l,o,l))),l+=u.height()}},e.prototype.createVisual=function(){var e=this.options.connectors,o=this.points,r=o.length;t.prototype.createVisual.call(this),this._connectorLines=[];for(var i=0;i<r;i++){var n=o[i],s=n.sector,a=n.label,p=s.middle(),l=(n.options.connectors||{}).color||e.color;if(a){var h=new k.drawing.Path({stroke:{color:l,width:e.width},animation:{type:"fadeIn",delay:n.animationDelay}});if("outsideEnd"===a.options.position){var c=a.box,u=s.center,d=s.point(p),g=new jt(c.x1,c.center().y),y=void 0,v=void 0,m=void 0;d=s.clone().expand(e.padding).point(p),h.moveTo(d.x,d.y),a.orientation===f?(m=hs(u,d,g,v=new jt(c.x1-e.padding,c.center().y)),g=new jt(v.x-4,v.y),(m=m||g).x=Math.min(m.x,g.x),this.pointInCircle(m,s.center,s.radius+4)||m.x<s.center.x?(y=s.center.x+s.radius+4,n.options.labels.align!==er?y<g.x?h.lineTo(y,d.y):h.lineTo(d.x+8,d.y):h.lineTo(y,d.y),h.lineTo(g.x,v.y)):(m.y=v.y,h.lineTo(m.x,m.y))):(m=hs(u,d,g,v=new jt(c.x2+e.padding,c.center().y)),g=new jt(v.x+4,v.y),(m=m||g).x=Math.max(m.x,g.x),this.pointInCircle(m,s.center,s.radius+4)||m.x>s.center.x?(y=s.center.x-s.radius-4,n.options.labels.align!==er?y>g.x?h.lineTo(y,d.y):h.lineTo(d.x-8,d.y):h.lineTo(y,d.y),h.lineTo(g.x,v.y)):(m.y=v.y,h.lineTo(m.x,m.y))),h.lineTo(v.x,v.y),this._connectorLines.push(h),this.visual.append(h)}}}},e.prototype.renderVisual=function(){if(t.prototype.renderVisual.call(this),Ct(this.options.series,(function(t){return t.autoFit}))){var e=this.targetBox,o=this.box.center(),r=this.visual.bbox();if(!r)return;var i=r.bottomRight(),n=Math.min((o.y-e.y1)/(o.y-r.origin.y),(e.y2-o.y)/(i.y-o.y),(o.x-e.x1)/(o.x-r.origin.x),(e.x2-o.x)/(i.x-o.x));n<1&&this.visual.transform(k.geometry.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,r,i){var n=e.radius,s=e.center,a=s.x,p=s.y,l=Math.min(Math.abs(p-o),Math.abs(p-r));return l>n?t:a+Math.sqrt(n*n-l*l)*(i?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}(Xt);function hs(t,e,o,r){var i,n=(r.x-o.x)*(t.y-o.y)-(r.y-o.y)*(t.x-o.x),s=(r.y-o.y)*(e.x-t.x)-(r.x-o.x)*(e.y-t.y);if(0!==s){var a=n/s;i=new jt(t.x+a*(e.x-t.x),t.y+a*(e.y-t.y))}return i}wt(ls,{startAngle:90,connectors:{width:2,color:"#939393",padding:8},inactiveItems:{markers:{},labels:{}}}),R(ls.prototype,ps),ls.prototype.isStackRoot=!0;var cs=ls,us=function(t){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 cs(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),it(this.options.legend.items,e.legendItems)},e}(qi),ds=function(t){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,r=this.sector.clone(),i=r.middle();if(o){var n=o.box.height();if(e.position===a){r.radius-=(r.radius-r.innerRadius)/2;var s=r.point(i);o.reflow(new zt(s.x,s.y-n/2,s.x,s.y))}else t.prototype.reflowLabel.call(this)}},e.prototype.createSegment=function(t,e){return Gt.current.createRing(t,e)},e}(as);wt(ds,{overlay:{gradient:"roundedGlass"},labels:{position:a},animation:{type:rr}}),R(ds.prototype,fr);var fs=ds,gs=function(t){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 r=R({},o.series,{index:o.index});if(this.evalSegmentOptions(r,t,o),this.createLegendItem(t,r,o),t&&!1!==o.visible){var i=new fs(t,e,r);Object.assign(i,o),this.append(i),this.points.push(i)}},e.prototype.reflow=function(e){for(var o,r=this.options,i=e.clone(),n=Math.min(i.width(),i.height()),s=n/2,a=n-.85*n,p=r.series,l=p.length,h=mt(r.padding,a),c=s-(h=h>s-5?s-5:h),u=0,d=0;d<l;d++){var f=p[d];0===d&&st(f.holeSize)&&(o=f.holeSize,c-=f.holeSize),st(f.size)?c-=f.size:u++,st(f.margin)&&d!==l-1&&(c-=f.margin)}st(o)||(c-=o=.75*((s-h)/(l+.75)));var g,y=o,v=0;this.seriesConfigs=[];for(var m=0;m<l;m++){var x=p[m];g=(y+=v)+mt(x.size,c/u),this.seriesConfigs.push({innerRadius:y,radius:g}),v=x.margin||0,y=g}t.prototype.reflow.call(this,e)},e.prototype.animationDelay=function(t,e,o){return 50*t+600*(e+1)/(o+1)},e}(cs);wt(gs,{startAngle:90,connectors:{width:2,color:"#939393",padding:8}});var ys=gs,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.render=function(){this.createDonutChart(this.series)},e.prototype.createDonutChart=function(t){var e=t[0],o=new ys(this,{series:t,padding:e.padding,connectors:e.connectors,legend:this.options.legend});this.appendChart(o)},e}(us),ms=function(t){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 jr},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,r=t.getSlot(o),i=this.polarAxis.getSlot(0).center,n=t.box.translate(i.x-r.x1,i.y-r.y1);t.reflow(n)},e.prototype.createValueAxis=function(){var t,e,o=this.valueAxisRangeTracker,r=o.query(),i=this.valueAxisOptions({roundToMajorUnit:!1,zIndex:-1});"log"===i.type?(t=Lo,e={min:.1,max:1}):(t=Ro,e={min:0,max:1});var n=o.query(name)||r||e;n&&r&&(n.min=Math.min(n.min,r.min),n.max=Math.max(n.max,r.max));var s=new t(n.min,n.max,i,this.chartService);this.valueAxis=s,this.appendAxis(s)},e.prototype.reflowAxes=function(){var t=this.options.plotArea,e=this.valueAxis,o=this.polarAxis,r=this.box,i=.15*Math.min(r.width(),r.height()),n=V(t.padding||{},i),s=r.clone().unpad(n),p=s.clone();p.y2=p.y1+Math.min(p.width(),p.height()),p.align(s,x,a);var l=p.clone().shrink(0,p.height()/2);o.reflow(p),e.reflow(l);var h=e.lineBox().height()-e.box.height();e.reflow(e.box.unpad({top:h})),this.axisBox=p,this.alignAxes(p)},e.prototype.backgroundBox=function(){return this.box},e.prototype.detachLabels=function(){},e}(qi),xs=function(t){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,r=jt.onCircle(t.center,t.startAngle,o);return new zt(r.x,r.y,r.x,r.y)},e}(li);wt(xs,{clip:!1});var bs=xs,ws=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Jn);ws.prototype.pointSlot=bs.prototype.pointSlot,wt(ws,{clip:!1});var _s=ws,Cs=function(t){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 Do(!1),r=this.points();r.push(e),(t=this._strokeSegments=o.process(r)).pop()}return t},e}(Er),ks=function(t){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 k.geometry.Segment([e.x,e.y]);t.segments.unshift(o),t.segments.push(o)},e}(Rr);function Ss(t,e){return t.value.x-e.value.x}var As=function(t){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 Cs(t,e,o):new ks(t,e,o)},e.prototype.createMissingValue=function(t,e){var o;return ai(t.x)&&"interpolate"!==e&&(o={x:t.x,y:t.y},e===Jo&&(o.y=0)),o},e.prototype.seriesMissingValues=function(t){return t.missingValues||Jo},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(Ss),this._hasMissingValuesGap())for(var e=0;e<t.length;e++){var o=t[e];if(o)ai(o.value.y)||"gap"!==this.seriesMissingValues(o.series)||delete t[e]}return t},e}(_s),Ps=function(t){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 Mo(this.options.xAxis,this.chartService);this.polarAxis=t,this.axisX=t,this.appendAxis(t)},e.prototype.valueAxisOptions=function(t){return R(t,{majorGridLines:{type:i},minorGridLines:{type:i}},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),qi.prototype.appendChart.call(this,t,e)},e.prototype.createCharts=function(){var t=this.filterVisibleSeries(this.series),e=this.panes[0];this.createLineChart(Ei(t,["polarLine"]),e),this.createScatterChart(Ei(t,["polarScatter"]),e),this.createAreaChart(Ei(t,["polarArea"]),e)},e.prototype.createLineChart=function(t,e){if(0!==t.length){var o=new _s(this,{series:t});this.appendChart(o,e)}},e.prototype.createScatterChart=function(t,e){if(0!==t.length){var o=new bs(this,{series:t});this.appendChart(o,e)}},e.prototype.createAreaChart=function(t,e){if(0!==t.length){var o=new As(this,{series:t});this.appendChart(o,e)}},e.prototype._dispatchEvent=function(t,e,o){var r=t._eventCoordinates(e),i=new jt(r.x,r.y),n=this.axisX.getValue(i),s=this.axisY.getValue(i);null!==n&&null!==s&&t.trigger(o,{element:ht(e),x:n,y:s})},e.prototype.createCrosshairs=function(){},e}(ms);wt(Ps,{xAxis:{},yAxis:{}}),R(Ps.prototype,Qi);var Ms=Ps;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.pointSlot=function(t,e){var o=t.center.y-e.y1,r=jt.onCircle(t.center,t.middle(),o);return new zt(r.x,r.y,r.x,r.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 r=t[o];e[r.seriesIx]=e[r.seriesIx]||[],e[r.seriesIx].push(r)}return e}(this._segments),o=0;o<e.length;o++){var r=e[o];if(r&&r.length>1){var i=r[0].linePoints[0],n=ut(r),s=ut(n.linePoints),a=0===i.categoryIx,p=s.categoryIx===s.categoriesCount-1;a&&p&&ut(r).linePoints.push(i)}}},e.prototype.createSegment=function(t,e,o){var r=new("smooth"===e.style?kr:xr)(t,e,o),i=this.seriesMissingValues(e);return t.length!==e.data.length&&"interpolate"!==i||(r.options.closed=!0),r},e}(Br);wt(Os,{clip:!1,limitPoints:!1});var Ts=Os,Bs=function(t){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}(Er),Rs=function(t){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}(Rr),Is=function(t){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,r){var i,n,s,a=this.options.isStacked,p=(e.line||{}).style;return a&&o>0&&r&&(n=r.linePoints.slice(0),i=r),"smooth"===p?(s=new Bs(t,e,o,i,n)).options.closed=!0:(t.push(t[0]),s=new Rs(t,e,o,i,n)),s},e.prototype.seriesMissingValues=function(t){return t.missingValues||Jo},e}(Ts),Ls=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}(fs);wt(Ls,{overlay:{gradient:"none"},labels:{distance:10}});var Es=Ls,Ds=function(t){function e(e){t.call(this,e),this.forEach=e.rtl?Gr:Nr}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,r=e.gap,i=e.spacing,n=o.length,s=n+r+i*(n-1),a=t.angle/s,p=t.startAngle+a*(r/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*i}))},e}(Xt);wt(Ds,{gap:1,spacing:0});var js=Ds,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.reflow=function(t){var e=this.options.reverse,o=this.children,r=o.length,i=e?r-1:0,n=e?-1:1;this.box=new zt;for(var s=i;s>=0&&s<r;s+=n){var a=o[s].sector;a.startAngle=t.startAngle,a.angle=t.angle}},e}(Xt),zs=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.pointType=function(){return Es},e.prototype.clusterType=function(){return js},e.prototype.stackType=function(){return Vs},e.prototype.categorySlot=function(t,e){return t.getSlot(e)},e.prototype.pointSlot=function(t,e){var o=t.clone(),r=t.center.y;return o.radius=r-e.y1,o.innerRadius=r-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}(Zr);zs.prototype.reflow=dr.prototype.reflow,wt(zs,{clip:!1,limitPoints:!1,animation:{type:"pie"}});var Us=zs,Hs=function(t){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 Ao(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&&R(t,{majorGridLines:{type:i},minorGridLines:{type:i}}),this._isStacked100&&R(t,{roundToMajorUnit:!1,labels:{format:"P0"}}),R(t,this.options.valueAxis)},e.prototype.aggregateCategories=function(){kn.prototype.aggregateCategories.call(this,this.panes)},e.prototype.createCategoryAxesLabels=function(){kn.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(Ei(t,["radarArea"]),e),this.createLineChart(Ei(t,["radarLine"]),e),this.createBarChart(Ei(t,["radarColumn"]),e)},e.prototype.chartOptions=function(t){var e={series:t},o=t[0];if(o){var r=this.filterVisibleSeries(t),i=o.stack;e.isStacked=i&&r.length>1,e.isStacked100=i&&"100%"===i.type&&r.length>1,e.isStacked100&&(this._isStacked100=!0)}return e},e.prototype.createAreaChart=function(t,e){if(0!==t.length){var o=new Is(this,this.chartOptions(t));this.appendChart(o,e)}},e.prototype.createLineChart=function(t,e){if(0!==t.length){var o=new Ts(this,this.chartOptions(t));this.appendChart(o,e)}},e.prototype.createBarChart=function(t,e){if(0!==t.length){var o=t[0],r=this.chartOptions(t);r.gap=o.gap,r.spacing=o.spacing;var i=new Us(this,r);this.appendChart(i,e),this._hasBarCharts=!0}},e.prototype.seriesCategoryAxis=function(){return this.categoryAxis},e.prototype._dispatchEvent=function(t,e,o){var r=t._eventCoordinates(e),i=new jt(r.x,r.y),n=this.categoryAxis.getCategory(i),s=this.valueAxis.getValue(i);null!==n&&null!==s&&t.trigger(o,{element:ht(e),category:n,value:s})},e.prototype.createCrosshairs=function(){},e}(ms);R(Hs.prototype,Qi,{appendChart:kn.prototype.appendChart,aggregateSeries:kn.prototype.aggregateSeries,seriesSourcePoints:kn.prototype.seriesSourcePoints}),wt(Hs,{categoryAxis:{categories:[]},valueAxis:{}});var Fs=Hs,Ns=function(t){function e(e,o,r){t.call(this,o),this.value=e,this.options.index=r.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 zt(e[0].x,e[0].y,e[1].x,e[2].y),o&&o.reflow(new zt(t.x1,e[0].y,t.x2,e[2].y))},e.prototype.createVisual=function(){var e,o=this,r=this.options;t.prototype.createVisual.call(this),(e=r.visual?r.visual({category:this.category,dataItem:this.dataItem,value:this.value,series:this.series,percentage:this.percentage,points:this.points,options:r,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 k.drawing.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 k.drawing.Path.fromPoints(this.points,t)},e.prototype.highlightVisual=function(){return this.visual.children[0]},e.prototype.highlightVisualArgs=function(){var t=k.drawing.Path.fromPoints(this.points).close();return{options:this.options,path:t}},e.prototype.tooltipAnchor=function(){var t=this.box;return{point:new jt(t.center().x,t.y1),align:{horizontal:"center",vertical:"top"}}},e.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},e}(Xt);wt(Ns,{color:v,border:{width:1}}),R(Ns.prototype,fr);var Gs=Ns,Ws=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],r=o.data;if(r)for(var i=Ii(o),n=i.total,s=i.points,a=0;a<s.length;a++){var p=s[a];if(p){var l=p.fields;T(o.color)||(o.color=l.color||e[a%e.length]),l=R({index:a,owner:this,series:o,dataItem:r[a],percentage:p.value/n},l,{visible:p.visible});var h=p.valueFields.value,c=this.createSegment(h,l),u=this.createLabel(h,l);c&&u&&c.append(u)}}},e.prototype.evalSegmentOptions=function(t,e,o){var r=o.series;hr(t,{value:e,series:r,dataItem:o.dataItem,index:o.index},{defaults:r._defaults,excluded:["data","content","template","toggle","visual"]})},e.prototype.createSegment=function(t,e){var o=R({},e.series);if(this.evalSegmentOptions(o,t,e),this.createLegendItem(t,o,e),!1!==e.visible){var r=new Gs(t,o,e);return Object.assign(r,e),this.append(r),this.points.push(r),r}},e.prototype.createLabel=function(t,e){var o=e.series,r=e.dataItem,i=R({},this.options.labels,o.labels),n=t;if(i.visible){var s=F(i),a={dataItem:r,value:t,percentage:e.percentage,category:e.category,series:o};s?n=s(a):i.format&&(n=this.plotArea.chartService.format.auto(i.format,n)),i.color||(i.color=Mt(o.color),i.background||(i.background=o.color)),this.evalSegmentOptions(i,t,e);var p=new pe(n,R({vAlign:i.position},i),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 r=t[o].options.align;if(r!==a){var i=t[o].box.width();r===c?e.left=Math.max(e.left,i):e.right=Math.max(e.right,i)}}return e},e.prototype.dynamicSlopeReflow=function(t,e,o){for(var r=this.options,i=this.points,n=i.length,s=i[0],a=s,p=0;p<i.length;p++)i[p].percentage>a.percentage&&(a=i[p]);for(var l=s.percentage/a.percentage*e,h=(e-l)/2,c=0,u=0;u<n;u++){var d=i[u].percentage,f=i[u+1],g=f?f.percentage:d,y=i[u].points=[],v=r.dynamicHeight?o*d:o/n,m=void 0;m=dt(m=d?(e-l*(g/d))/2:g?0:e/2,0,e),y.push(new k.geometry.Point(t.x1+h,t.y1+c)),y.push(new k.geometry.Point(t.x1+e-h,t.y1+c)),y.push(new k.geometry.Point(t.x1+e-m,t.y1+v+c)),y.push(new k.geometry.Point(t.x1+m,t.y1+v+c)),h=m,c+=v+r.segmentSpacing,l=dt(e-2*m,0,e)}},e.prototype.constantSlopeReflow=function(t,e,o){for(var r=this.options,i=this.points,n=i.length,s=r.neckRatio<=1,a=s?r.neckRatio*e:e,p=s?0:(e-e/r.neckRatio)/2,l=((s?e:e-2*p)-a)/2,h=0,c=0;c<n;c++){var u=i[c].points=[],d=i[c].percentage,f=r.dynamicHeight?l*d:l/n,g=r.dynamicHeight?o*d:o/n;u.push(new k.geometry.Point(t.x1+p,t.y1+h)),u.push(new k.geometry.Point(t.x1+e-p,t.y1+h)),u.push(new k.geometry.Point(t.x1+e-p-f,t.y1+g+h)),u.push(new k.geometry.Point(t.x1+p+f,t.y1+g+h)),p+=f,h+=g+r.segmentSpacing}},e.prototype.reflow=function(t){var e=this.points,o=e.length;if(o){var r=this.options,i=t.clone().unpad(this.labelPadding()),n=i.height()-r.segmentSpacing*(o-1),s=i.width();r.dynamicSlope?this.dynamicSlopeReflow(i,s,n):this.constantSlopeReflow(i,s,n);for(var a=0;a<o;a++)e[a].reflow(t)}},e}(Xt);wt(Ws,{neckRatio:.3,width:300,dynamicSlope:!1,dynamicHeight:!0,segmentSpacing:0,labels:{visible:!1,align:a,position:a,zIndex:1}}),R(Ws.prototype,ps);var Xs=Ws,Ys=function(t){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 Xs(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),it(this.options.legend.items,e.legendItems)},e}(qi),qs=function(t,e){void 0===e&&(e=.05);var o=Object(k.parseColor)(t),r=1-e;return function(t){var e=o.toHSL(),i=100-e.l,n=r-t;return e.l+=Math.min(n*i,i),e.toCss()}},Qs=function(t){function e(e,o){t.call(this),this.options=o,this.color=o.color||v,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(),r=F(t),i=t.color;e=r?r(o):this.formatValue(t.format),i||(i=Mt(this.color)),this.label=new pe(e,R({align:a,vAlign:a,margin:{left:5,right:5},zIndex:mt(t.zIndex,this.series.zIndex)},t,{color:i}),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(),r="roundedRect"===mt(t.type,"rect"),i=mt(e.width,r?1:0),n=Math.round(i/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-=i,o.size.height-=i,o.origin.y+=n+.5,o.origin.x+=n+.5,se(o)},e.prototype.markerBorder=function(){var t=this.options,e=t.markers.border,o=mt(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 Zt({type:mt(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:mt(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,r=new Zt({type:mt(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:mt(e.zIndex,this.series.zIndex)});r.reflow(this.markerBox());var i=r.getElement();return i.options.fill=t.fill,i.options.stroke=t.stroke,i},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 jt(t,e),align:{horizontal:a,vertical:s}}},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}(Xt);R(Qs.prototype,fr),R(Qs.prototype,gr),Qs.prototype.defaults={markers:{type:"rect",borderRadius:4,border:{color:"transparent"}},padding:{top:1},labels:{visible:!1,padding:3},opacity:1,notes:{label:{}}};var Zs=Qs,Ks=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:u,max:d},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],r=0;r<o.data.length;r++){var i=this._bindPoint(o,e,r).valueFields;this.valueRange.min=Math.min(this.valueRange.min,i.value),this.valueRange.max=Math.max(this.valueRange.max,i.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 r=o.series,i=o.seriesIx,n={defaults:r._defaults,excluded:["data","tooltip","content","template","visual","toggle"]},s=this._evalSeries[i];st(s)||(this._evalSeries[i]=s=hr(t,{},n,!0));var a=t;return s&&hr(a=R({},t),{value:e,series:r,dataItem:o.dataItem,min:this.valueRange.min,max:this.valueRange.max},n),a},e.prototype.pointType=function(){return Zs},e.prototype.pointOptions=function(t,e){var o=this.seriesOptions[e];if(!o){var r=this.pointType().prototype.defaults;this.seriesOptions[e]=o=R({},r,{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,r=this.pointOptions(o,e.seriesIx),i=e.color||o.color;(r=this.evalPointOptions(r,t,e),T(o.color))?i=r.color:i=qs(i)(t.value/this.valueRange.max);var n=new Zs(t,r);return n.color=i,this.append(n),n},e.prototype.seriesAxes=function(t){var e=t.xAxis,o=t.yAxis,r=this.plotArea,i=e?r.namedXAxes[e]:r.axisX,n=o?r.namedYAxes[o]:r.axisY;if(!i)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:i,yAxis:n}},e.prototype.reflow=function(t){var e=this,o=this.points,r=!this.options.clip,i=0;this.traverseDataPoints((function(t,n){var s=o[i++],a=e.seriesAxes(n.series),p=a.xAxis,l=a.yAxis,h=p.categoryIndex(t.x),c=l.categoryIndex(t.y),u=p.getSlot(h,h,r),d=l.getSlot(c,c,r);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 zt(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 r=e[o],i=this.seriesAxes(r),n=i.xAxis,s=i.yAxis,a=n.currentRangeIndices(),p=s.currentRangeIndices(),l=0;l<r.data.length;l++){var h=this._bindPoint(r,o,l),c=h.valueFields,u=h.fields,d=n.totalIndex(c.x),f=s.totalIndex(c.y),g=a.min<=d&&d<=a.max,y=p.min<=f&&f<=p.max;g&&y&&t(c,R({pointIx:l,series:r,seriesIx:o,dataItem:r.data[l],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}(Xt);wt(Ks,{series:[],tooltip:{format:"{0}, {1}: {2}"},labels:{format:"{2}"},clip:!0}),R(Ks.prototype,{_bindPoint:dr.prototype._bindPoint});var $s=Ks,Js=function(t){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],r=o.data||[],i=this.seriesAxes(o),n=i.xAxis,s=i.yAxis,a=Lt(n.categories||[]),p=Lt(s.categories||[]),l=0;l<r.length;l++){var h=Yo.current.bindPoint(o,l).valueFields,c=h.x,u=h.y;a.has(c)||a.add(c),p.has(u)||p.add(u)}n.categories=a.values(),s.categories=p.values()}},e.prototype.createCharts=function(t){for(var e=this.groupSeriesByPane(),o=0;o<t.length;o++){var r=t[o],i=e[r.options.name||"default"]||[];this.addToLegend(i);var n=this.filterVisibleSeries(i);n&&this.createHeatmapChart(Ei(n,["heatmap"]),r)}},e.prototype.createHeatmapChart=function(t,e){var o=new $s(this,{series:t});this.appendChart(o,e)},e.prototype.seriesPaneName=function(t){var e=this.options,o=t.xAxis,r=X([].concat(e.xAxis),(function(t){return t.name===o}))[0],i=t.yAxis,n=X([].concat(e.yAxis),(function(t){return t.name===i}))[0],s=(e.panes||[{}])[0].name||"default";return(r||{}).pane||(n||{}).pane||s},e.prototype.seriesAxes=function(t){var e,o,r=this.options,i=[].concat(r.xAxis),n=t.xAxis;e=n?i.find((function(t){return t.name===n})):i[0];var s=[].concat(r.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 r,i=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 u=h[c],d=u[e?"yAxis":"xAxis"];if(d===s.name||0===o&&!d){var f=Yo.current.bindPoint(u,0).valueFields;p.push(f[e?"y":"x"]);break}}for(var g=0;g<p.length;g++)if(p[g]instanceof Date){r=!0;break}var y=new(Li(s.type,l)||!s.type&&r?lo:to)(s,this.chartService);if(y.axisIndex=o,i){if(n[i])throw new Error((e?"Y":"X")+" axis with name "+i+" is already defined");n[i]=y}return this.appendAxis(y),y.mapCategories(),y},e.prototype.createAxes=function(t){for(var e=this.options,o=[].concat(e.xAxis),r=[],i=[].concat(e.yAxis),n=[],s=0;s<o.length;s++){Z(this.findPane(o[s].pane),t)&&r.push(this.createXYAxis(o[s],!1,s))}for(var a=0;a<i.length;a++){Z(this.findPane(i[a].pane),t)&&n.push(this.createXYAxis(i[a],!0,a))}this.axisX=this.axisX||r[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 r=t._eventCoordinates(e),i=new jt(r.x,r.y),n=this.axes,s=n.length,a=[],p=[],l=0;l<s;l++){var h=n[l];Bi(h.options.vertical?p:a,h.getCategory(i))}a.length>0&&p.length>0&&t.trigger(o,{element:ht(e),originalEvent:e,x:Vi(a),y:Vi(p)})},e.prototype.updateAxisOptions=function(t,e){var o=t.options.vertical,r=this.groupAxes(this.panes),i=(o?r.y:r.x).indexOf(t);ta(this.options,i,o,e),ta(this.originalOptions,i,o,e)},e.prototype.crosshairOptions=function(t){return Object.assign({},t.options.crosshair,{zIndex:0})},e}(qi);function ta(t,e,o,r){R([].concat(o?t.yAxis:t.xAxis)[e],r)}wt(Js,{xAxis:{},yAxis:{}}),R(Js.prototype,Qi);var ea=Js,oa="color",ra="first",ia="max";zn.current.register(kn,[tr,er,or,ir,"area","verticalArea","candlestick","ohlc","bullet","verticalBullet","boxPlot","verticalBoxPlot","rangeColumn","rangeBar","waterfall","horizontalWaterfall","rangeArea","verticalRangeArea"]),zn.current.register(os,["scatter","scatterLine","bubble"]),zn.current.register(us,[rr]),zn.current.register(vs,["donut"]),zn.current.register(Ys,["funnel"]),zn.current.register(Ms,["polarArea","polarLine","polarScatter"]),zn.current.register(Fs,["radarArea","radarColumn","radarLine"]),zn.current.register(ea,["heatmap"]),Yo.current.register([tr,er,or,ir,"area","verticalArea"],[y],["category",oa,"noteText","errorLow","errorHigh"]),Yo.current.register(["rangeColumn","rangeBar","rangeArea","verticalRangeArea"],["from","to"],["category",oa,"noteText"]),Yo.current.register(["waterfall","horizontalWaterfall"],[y],["category",oa,"noteText","summary"]),Yo.current.register(["polarArea","polarLine","polarScatter"],[m,x],[oa]),Yo.current.register(["radarArea","radarColumn","radarLine"],[y],[oa]),Yo.current.register(["funnel"],[y],["category",oa,"visibleInLegend","visible"]),Ji.current.register([tr,er,or,ir,"area","verticalArea","waterfall","horizontalWaterfall"],{value:ia,color:ra,noteText:ra,errorLow:"min",errorHigh:ia}),Ji.current.register(["rangeColumn","rangeBar","rangeArea","verticalRangeArea"],{from:"min",to:ia,color:ra,noteText:ra}),Ji.current.register(["radarArea","radarColumn","radarLine"],{value:ia,color:ra}),Yo.current.register(["scatter","scatterLine","bubble"],[m,x],[oa,"noteText","xErrorLow","xErrorHigh","yErrorLow","yErrorHigh"]),Yo.current.register(["bubble"],[m,x,"size"],[oa,"category","noteText"]),Yo.current.register(["heatmap"],[m,x,y],[oa,"noteText"]),Yo.current.register(["candlestick","ohlc"],["open","high","low","close"],["category",oa,"downColor","noteText"]),Ji.current.register(["candlestick","ohlc"],{open:ia,high:ia,low:"min",close:ia,color:ra,downColor:ra,noteText:ra}),Yo.current.register(["boxPlot","verticalBoxPlot"],["lower","q1","median","q3","upper","mean","outliers"],["category",oa,"noteText"]),Ji.current.register(["boxPlot","verticalBoxPlot"],{lower:ia,q1:ia,median:ia,q3:ia,upper:ia,mean:ia,outliers:ra,color:ra,noteText:ra}),Yo.current.register(["bullet","verticalBullet"],["current","target"],["category",oa,"visibleInLegend","noteText"]),Ji.current.register(["bullet","verticalBullet"],{current:ia,target:ia,color:ra,noteText:ra}),Yo.current.register([rr,"donut"],[y],["category",oa,"explode","visibleInLegend","visible"]);var na=["category",y,m,x],sa=function(t){function e(e,o,r,i){var n=this;void 0===i&&(i={}),t.call(this),this.observers=[],this.addObserver(i.observer),this.chartService=new Ae(this,i),this.chartService.theme=r,this._initElement(e);var s=R({},this.options,o);this._originalOptions=R({},s),this._theme=r,this._initTheme(s,r),this._initHandlers(),this._initSurface(),this.bindCategories(),bt.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){w(t,"k-chart")},e.prototype._initTheme=function(t,e){for(var o=[],r=t.series||[],i=0;i<r.length;i++)o.push(Object.assign({},r[i]));t.series=o,function(t){for(var e=na,o=0;o<e.length;o++){var r=e[o]+"Axes";t[r]&&(t[e[o]+"Axis"]=t[r],delete t[r])}}(t),this.applyDefaults(t,e),null===t.seriesColors&&delete t.seriesColors,this.options=R({},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,r=e.width>0||e.height>0;t||r&&(!o||e.width!==o.width||e.height!==o.height)?(this._size=e,this._resize(e,t),this.trigger("resize",e)):r&&this._selections&&Ct(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 Vo(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 Uo(e[o])},e.prototype.findPaneByIndex=function(t){var e=this._plotArea.panes;if(e[t])return new Uo(e[t])},e.prototype.plotArea=function(){return new Ho(this._plotArea)},e.prototype.toggleHighlight=function(t,e){var o,r,i,n=this._plotArea,s=(n.srcSeries||n.series||[])[0];T(e)?o=n.filterPoints(e):(I(e)?(r=e.series,i=e.category):r=i=e,o="donut"===s.type?aa(n.pointsBySeriesName(r),i):s.type===rr||"funnel"===s.type?aa((n.charts[0]||{}).points,i):n.pointsBySeriesName(r));o&&this.togglePointsHighlight(t,o)},e.prototype.togglePointsHighlight=function(t,e){for(var o=this._highlight,r=0;r<e.length;r++)o.togglePointHighlight(e[r],t)},e.prototype.showTooltip=function(t){var e,o,r=this._sharedTooltip(),i=this._tooltip,n=this._plotArea;if(T(t)?(e=n.findPoint(t))&&r&&(o=e.categoryIx):r&&st(t)&&(o=n.categoryAxis.categoryIndex(t)),r){if(o>=0){var s=this._plotArea.pointsByCategoryIndex(o);i.showAt(s)}}else e&&i.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&&lt(e,{width:o.width}),o.height&&lt(e,{height:o.height}),t&&t.options.type===this.options.renderAs?(this.surface.clear(),this.surface.resize()):(this._destroySurface(),this.surface=k.drawing.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 An,this._setupSelection(),this._createPannable(),this._createZoomSelection(),this._createMousewheelZoom(),this.trigger("render"),ua(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,r=R({},t.options,{chartArea:{width:t.width,height:t.height}});ca(this._originalOptions,r),this.options=R({},this._originalOptions,r),this._initTheme(this.options,this._theme),this.bindCategories();var i=this._getModel();i.renderVisual(),ua(i._plotArea.panes),e=i.visual,this.options=o}else e=this.surface.exportVisual();return e},e.prototype._sharedTooltip=function(){return this._plotArea instanceof kn&&this.options.tooltip&&this.options.tooltip.shared},e.prototype._createPannable=function(){var t=this.options;!1!==t.pannable&&(this._pannable=new Tn(this._plotArea,t.pannable))},e.prototype._createZoomSelection=function(){var t=this.options.zoomable,e=(t||{}).selection;!1!==t&&!1!==e&&(this._zoomSelection=new Rn(this,e))},e.prototype._createMousewheelZoom=function(){var t=this.options.zoomable,e=(t||{}).mousewheel;!1!==t&&!1!==e&&(this._mousewheelZoom=new In(this,e))},e.prototype._toggleDragZoomEvents=function(){var t=this.options.pannable,e=this.options.zoomable,o=(e||{}).selection,r=(e||{}).mousewheel,i=!(t||!1!==e&&!1!==o||this.requiresHandlers(["dragStart","drag","dragEnd"])),n=(!1===e||!1===r)&&!this.requiresHandlers(["zoomStart","zoom","zoomEnd"]),s=this.element;this._dragZoomEnabled&&i&&n?(s.style.touchAction=this._touchAction||"",this._dragZoomEnabled=!1):this._dragZoomEnabled||i&&n||(s.style.touchAction="none",this._dragZoomEnabled=!0),this._toggleDomEvents(!i,!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 Gn(this.chartService,t)},e.prototype._createSharedTooltip=function(t){return new Xn(this._plotArea,t)},e.prototype.applyDefaults=function(t,e){!function(t,e){var o,r,i,n=(e||{}).axisDefaults||{};function s(t){var e=(t||{}).color||r.color,i=R({},n,n[o],r,r[o],{line:{color:e},labels:{color:e},title:{color:e}},t);return delete i[o],i}for(var a=0;a<na.length;a++)o=na[a]+"Axis",r=t.axisDefaults||{},i=(i=[].concat(t[o])).map(s),t[o]=i.length>1?i:i[0]}(t,e),function(t,e){var o=t.series,r=o.length,i=t.seriesDefaults,n=R({},t.seriesDefaults),s=e?R({},e.seriesDefaults):{},a=R({},s);pa(n),pa(a);for(var p=0;p<r;p++){var l=o[p].type||t.seriesDefaults.type,h=R({data:[]},a,s[l],{tooltip:t.tooltip},n,i[l]);o[p]._defaults=h,o[p]=R({},h,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||[],r=0;r<e.length;r++){var i=e[r],n=o[r%o.length],s=i._defaults;i.color=i.color||n,s&&(s.color=s.color||n)}},e.prototype._getModel=function(){var t=this.options,e=this._createPlotArea(),o=new te(this._modelOptions());return o.chart=this,o._plotArea=e,he.buildTitle(t.title,o),t.legend&&t.legend.visible&&o.append(new jn(e.options.legend,this.chartService)),o.append(e),o.reflow(),o},e.prototype._modelOptions=function(){var t=this.options,e=this.getSize();return R({transitions:t.transitions,width:e.width||600,height:e.height||400},t.chartArea)},e.prototype._createPlotArea=function(t){var e=this.options;return zn.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 r=t[o],i=r.options;if(r instanceof to&&i.select&&!i.vertical){var n=r.range(),s=new Nn(this,r,R({min:n.min,max:n.max},i.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=Object(k.throttle)(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,r=!1,i=0;i<o.length;i++)o[i].trigger(t,e)&&(r=!0);return r},e.prototype._attachEvents=function(){var t,e,o=this.element;this._touchAction=o.style.touchAction,nt(o,((t={}).contextmenu=this._clickHandler,t[sr]=this._mousewheelHandler,t.mouseleave=this._mouseleaveHandler,t)),this._shouldAttachMouseMove()&&nt(o,((e={}).mousemove=this._mousemove,e)),this.domEvents=Me.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,r=-t.distance/o+1;if(Math.abs(r)>=.1){r=Math.round(10*r),this._gestureDistance=t.distance;var i={delta:r,axisRanges:la(this._plotArea.axes),originalEvent:t};if(this._zooming||!this.trigger("zoomStart",i)){var n=this._eventCoordinates(t);this._zooming||(this._zooming=!0),(i.axisRanges=e.updateRanges(r,n))&&!this.trigger("zoom",i)&&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:la(this._plotArea.axes),originalEvent:t}))},e.prototype._move=function(t){var e=this._navState,o=this._pannable;if(!this._stopChartHandlers(t)){if(o){var r=o.move(t);r&&!this.trigger("drag",{axisRanges:r,originalEvent:t})&&o.pan()}else if(e){for(var i={},n=e.axes,s=0;s<n.length;s++){var a=n[s];if(a.options.name){var p=a.options.vertical?t.y:t.x,l=p.startLocation-p.location;0!==l&&(i[a.options.name]=a.translateRange(l))}}e.axisRanges=i,this.trigger("drag",{axisRanges:i,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:la(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),r=this._plotArea.paneByPoint(o);if(r)for(var i=0;i<e.length;i++)if(e[i].onPane(r))return!0},e.prototype._mousewheelZoomRate=function(){var t=(this.options.zoomable||{}).mousewheel||{};return mt(t.rate,.3)},e.prototype._mousewheel=function(t){var e=this,o=ot(t),r=this._mousewheelZoom,i=this._eventCoordinates(t);if(!this._stopChartHandlers(t)&&this._plotArea.backgroundContainsPoint(i))if(r){var n={delta:o,axisRanges:la(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=r.updateRanges(o,i),n.axisRanges&&!this.trigger("zoom",n)&&r.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,i,"zoomStart")||(s=this._navState);if(s){var a=s.totalDelta||o;s.totalDelta=a+o;for(var p=this._navState.axes,l={},h=0;h<p.length;h++){var c=p[h],u=c.options.name;u&&(l[u]=c.scaleRange(-a*e._mousewheelZoomRate(),i))}this.trigger("zoom",{delta:o,axisRanges:l,originalEvent:t}),this._mwTimeout&&clearTimeout(this._mwTimeout),this._mwTimeout=setTimeout((function(){e._endNavigation(t,"zoomEnd")}),150)}}},e.prototype._startNavigation=function(t,e,o){var r=this._model._plotArea,i=r.findPointPane(e),n=r.axes.slice(0);if(i){var s=la(n);this.trigger(o,{axisRanges:s,originalEvent:t})?this._cancelDomEvents():(this._suppressHover=!0,this._unsetActivePoint(),this._navState={axisRanges:s,pane:i,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 r,i=t;i&&!r;)r=i.chartElement,i=i.parent;if(r)return r.aliasFor&&(r=r.aliasFor(e,this._eventCoordinates(e))),o&&(r=r.closest(o))&&r.aliasFor&&(r=r.aliasFor()),r},e.prototype._eventCoordinates=function(t){var e=ct(t);return this._toModelCoordinates(e.x,e.y)},e.prototype._elementPadding=function(){if(!this._padding){var t=j(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=pt(this.element);return{left:yt(t.x+e.left+o.left),top:yt(t.y+e.top+o.top)}},e.prototype._toModelCoordinates=function(t,e){var o=this.element,r=pt(o),i=this._elementPadding(),n=Pt(o).invert(),s=new k.geometry.Point(t-r.left-i.left,e-r.top-i.top).transform(n);return new jt(s.x,s.y)},e.prototype._tap=function(t){var e=this,o=this.surface.eventTarget(t),r=this._drawingChartElement(o,t),i=this._sharedTooltip();this._startHover(o,t)||i||this._unsetActivePoint(),i&&this._trackSharedTooltip(this._eventCoordinates(t),t,!0),this._propagateClick(r,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 qi)})),r=this._activePoint,i=this._plotArea.series.length>1,n=this._hasInactiveOpacity();return this._updateHoveredPoint(o,e),o&&r!==o&&o.hover?(this._activePoint=o,this._sharedTooltip()||o.hover(this,e)||(this._displayTooltip(o),n?this._displayInactiveOpacity(o,i):this._highlight.show(o))):!o&&n&&(i&&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){R({},this.options.tooltip,t.options.tooltip).visible&&this._tooltip.show(t)},e.prototype._displayInactiveOpacity=function(t,e,o){var r=this._activeChartInstance=this._chartInstanceFromPoint(t);if(r)if(e)this._updateSeriesOpacity(t),this._applySeriesOpacity(r.children,null,!0),this._applySeriesOpacity(r.children,t.series),this._highlight.show(o||t);else{var i;if(!r.supportsPointInactiveOpacity())return void this._highlight.show(t);(i=this._getInactivePoints(t,r))&&i.length&&this._highlight.show(i,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=[],r=0;r<t.children.length;r++){var i=t.children[r];i.constructor===e?o.push(i):i.children&&i.children.length&&(o=o.concat(this._getAllPointsOfType(i,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,r=o.series.length,i=0;i<r;i++){var n=o.series[i],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,r){for(var i=0;i<t.length;i++){var n=t[i],s=n.series||r;if(s&&(s.highlight||{}).visible&&n.visual){var a=r?r.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),nt(document,((e={}).mousemove=this._mouseMoveTrackHandler,e)))},e.prototype._mouseMoveTracking=function(t){var e,o=this.options,r=this._tooltip,i=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))R({},o.tooltip,a.options.tooltip).visible&&r.show(a),i.show(a)}}else vt(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 r=o.backgroundContainsPoint(e);r?(o.hovered=!0,this._plotArea.hover(this,t)):o.hovered&&!r&&(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 r=e[o];r.box.containsPoint(t)?r.showAt(t):r.hide()}},e.prototype._trackSharedTooltip=function(t,e,o){if(!this._suppressHover){var r=this.options.tooltip,i=this._plotArea,n=this._plotArea.categoryAxis,s=this._tooltip,a=this._highlight;if(i.backgroundContainsPoint(t)){var p=n.pointCategoryIndex(t);if(p!==this._tooltipCategoryIx||!this._sharedHighlight&&o){var l=i.pointsByCategoryIndex(p),h=l.map((function(t){return t.eventArgs(e)})),c=h[0]||{};c.categoryPoints=h,l.length>0&&!this.trigger("seriesHover",c)?(r.visible&&s.showAt(l,t),a.show(l),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 r=e[o];!1!==r.autoBind&&this.bindCategoryAxisFromSeries(r,o)}},e.prototype.bindCategoryAxisFromSeries=function(t,e){for(var o,r=this.options.series,i=r.length,n=new Q,s=[],a=!1,p=0;p<i;p++){var l=r[p],h=l.categoryAxis===t.name||!l.categoryAxis&&0===e,c=l.data,u=c.length,d=l.categoryField&&h;if(a=d||a,d&&u>0)for(var f=(o=ji(t,Wo(l.categoryField,c[0])))?Di:Wo,g=0;g<u;g++){var y=c[g],v=f(l.categoryField,y,this.chartService.intl);!o&&n.get(v)||(s.push([v,y]),o||n.set(v,!0))}}if(s.length>0){o&&(s=function(t,e){void 0===e&&(e=Ne);for(var o=function(t,e){void 0===e&&(e=Ne);for(var o=1,r=t.length;o<r;o++)if(e(t[o],t[o-1])<0){t.sort(e);break}return t}(t,e),r=o.length,i=r>0?[o[0]]:[],n=1;n<r;n++)0!==e(o[n],ut(i))&&i.push(o[n]);return i}(s,(function(t,e){return Ne(t[0],e[0])})));var m=function(t){for(var e=t.length,o=[],r=0;r<e;r++)for(var i=t[r],n=i.length,s=0;s<n;s++)o[s]=o[s]||[],o[s].push(i[s]);return o}(s);t.categories=m[0]}else a&&(t.categories=[])},e.prototype._isBindable=function(t){for(var e=Yo.current.valueFields(t),o=!0,r=0;r<e.length;r++){var i=e[r];if(i===y?i="field":i+="Field",!st(t[i])){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,r=this._plotArea,i=this._highlight,n=(r.srcSeries||r.series)[t];if(o=Z(n.type,[rr,"donut","funnel"])?r.findPoint((function(o){return o.series.index===t&&o.index===e})):r.pointsBySeriesIndex(t),this._hasInactiveOpacity()&&n.visible&&o){var s=r.series.length>1,a=o.length?o[0]:o;this._displayInactiveOpacity(a,s,o)}else i.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;vt(this.element,((t={}).mousemove=this._mousemove,t)),this._shouldAttachMouseMove()&&nt(this.element,((e={}).mousemove=this._mousemove,e))},e.prototype.applyOptions=function(t,e){ca(this._originalOptions,t),this._originalOptions=R(this._originalOptions,t),this.options=R({},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,vt(this.element,((t={}).contextmenu=this._clickHandler,t[sr]=this._mousewheelHandler,t.mousemove=this._mousemove,t.mouseleave=this._mouseleaveHandler,t)),this.domEvents&&(this.domEvents.destroy(),delete this.domEvents),this._mouseMoveTrackHandler&&vt(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}(k.Class);function aa(t,e){if(t)for(var o=0;o<t.length;o++)if(t[o].category===e)return[t[o]]}function pa(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 la(t){for(var e={},o=0;o<t.length;o++){var r=t[o],i=r.options.name;i&&(e[i]=r.range())}return e}var ha=["data","categories"];function ca(t,e){for(var o in e)if(!Z(o,ha)&&e.hasOwnProperty(o)){var r=e[o],i=t[o];if(st(i)){var n=null===r;n||!st(r)?(delete t[o],n&&delete e[o]):i&&I(r)&&I(i)&&ca(i,r)}}}function ua(t){for(var e=0;e<t.length;e++)t[e].notifyRender()}wt(sa,{renderAs:"",chartArea:{},legend:{visible:!0,labels:{}},categoryAxis:{},seriesDefaults:{type:er,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 da=sa,fa=function(t){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,r=o?{horizontal:"left",vertical:"center"}:{horizontal:"center",vertical:"bottom"};return{point:o?new jt(this.plotArea.box.x2,e.center().y):new jt(e.center().x,-2),align:r}},e.prototype._defaultAnchor=function(t,e){return this._slotAnchor({},e)},e}(Xn),ga=[tr,"bullet"];function ya(t){for(var e=[],o=0;o<t.length;o++){var r=t[o];e[o]=r.style.display,r.style.display="none"}return e}function va(t,e){for(var o=0;o<t.length;o++)t[o].style.display=e[o]}function ma(t){return P(t)?[t]:t}var xa=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._setElementClass=function(t){w(t,"k-sparkline")},e.prototype._initElement=function(e){t.prototype._initElement.call(this,e),this._initialWidth=Math.floor(lt(e).width)},e.prototype._resize=function(){var e=this.element,o=ya(e.childNodes);this._initialWidth=Math.floor(lt(e).width),va(e.childNodes,o),t.prototype._resize.call(this)},e.prototype._modelOptions=function(){var t=this.options,e=this._surfaceWrap(),o=ya(e.childNodes),r=document.createElement("span");r.innerHTML="&nbsp;",e.appendChild(r);var i=R({width:this._autoWidth,height:lt(e).height,transitions:t.transitions},t.chartArea,{inline:!0,align:!1});return lt(e,{width:i.width,height:i.height}),e.removeChild(r),va(e.childNodes,o),this.surface&&this.surface.resize(),i},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=V(e.chartArea.margin),r=t.charts,i=this._surfaceWrap(),n=0,s=0;s<r.length;s++){var a=r[s],p=(a.options.series||[])[0];if(p){if(p.type===tr)return 150;if("bullet"===p.type)return 150;if(p.type===rr)return lt(i).height;var l=a.categoryAxis;if(l){var h=l.categoriesCount()*(!a.options.isStacked&&Z(p.type,[er,"verticalBullet"])?a.seriesOptions.length:1);n=Math.max(n,h)}}}var c=n*e.pointWidth;return c>0&&(c+=o.left+o.right),c},e.prototype._createSharedTooltip=function(t){return new fa(this._plotArea,t)},e.normalizeOptions=function(t){var e=ma(t);return(e=b(e)?{seriesDefaults:{data:e}}:R({},e)).series||(e.series=[{data:ma(e.data)}]),R(e,{seriesDefaults:{type:e.type}}),(Z(e.series[0].type,ga)||Z(e.seriesDefaults.type,ga))&&(e=R({},{categoryAxis:{crosshair:{visible:!1}}},e)),e},e}(da);wt(xa,{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 ba=xa,wa=function(t){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(j(this.element,"opacity").opacity)},e.prototype.step=function(t){j(this.element,{opacity:String(K(this._initialOpacity,0,t))})},e.prototype.abort=function(){t.prototype.abort.call(this),j(this.element,{display:"none",opacity:String(this._initialOpacity)})},e.prototype.cancel=function(){t.prototype.abort.call(this),j(this.element,{opacity:String(this._initialOpacity)})},e}(k.drawing.Animation);function _a(t,e){var o=document.createElement("div");return o.className=t,e&&(o.style.cssText=e),o}var Ca=function(t){function e(e,o,r){t.call(this),this.options=R({},this.options,r),this.container=e,this.chartService=o;var i=j(e,["paddingLeft","paddingTop"]);this.chartPadding={top:i.paddingTop,left:i.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=_a("k-navigator-hint","display: none; position: absolute; top: 1px; left: 1px;"),e=this.tooltip=_a("k-tooltip k-chart-tooltip"),o=this.scroll=_a("k-scroll");e.innerHTML="&nbsp;",t.appendChild(e),t.appendChild(o)},e.prototype.show=function(t,e,o){var r=this.element,i=this.options,n=this.scroll,s=this.tooltip,a=Ve(We(t)+We(e-t)/2),p=.4*o.width(),l=o.center().x-p,h=(o.center().x-l)/(i.max-i.min),c=a-i.min,u=this.chartService.intl.format(i.format,t,e),d=F(i);this.clearHideTimeout(),this._visible||(j(r,{visibility:"hidden",display:"block"}),this._visible=!0),d&&(u=d({from:t,to:e})),s.innerHTML=u,j(s,{left:o.center().x-s.offsetWidth/2,top:o.y1});var f=j(s,["marginTop","borderTopWidth","height"]);j(n,{width:p,left:l+c*h,top:o.y1+f.marginTop+f.borderTopWidth+f.height/2}),j(r,{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 wa(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}(k.Class);wt(Ca,{format:"{0:d} - {1:d}",hideDelay:500});var ka=Ca,Sa="_navigator",Aa=Sa;function Pa(){}var Ma=function(t){function e(e){var o;t.call(this),this.chart=e;var r=this.options=R({},this.options,e.options.navigator),i=r.select;i&&(i.from=this.parseDate(i.from),i.to=this.parseDate(i.to)),st(r.hint.visible)||(r.hint.visible=r.visible),this.chartObserver=new J(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 Ze(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,r=this.mainAxis(),i=r.roundedRange(),n=i.min,s=i.max,a=o.select,p=a.from,l=a.to,h=a.mousewheel,c=(t=r,Pa.prototype=t,new Pa);0!==r.categoriesCount()&&(this.clean(),c.box=r.box,this.selection=new Nn(e,c,{min:n,max:s,from:p||n,to:l||s,mousewheel:mt(h,{zoom:"left"}),visible:o.visible},new J(this,{selectStart:"_selectStart",select:"_select",selectEnd:"_selectEnd"})),o.hint.visible&&(this.hint=new ka(e.element,e.chartService,{min:n,max:s,template:F(o.hint),format:o.hint.format})))},e.prototype.setRange=function(){var t=this.chart._createPlotArea(!0).namedCategoryAxes[Aa].roundedRange(),e=t.min,o=t.max,r=this.options.select||{},i=r.from||e;i<e&&(i=e);var n=r.to||o;n>o&&(n=o),this.options.select=R({},r,{from:i,to:n}),this.filterAxes()},e.prototype._redrawSelf=function(t){var e=this.chart._plotArea;e&&e.redraw(ut(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,r=this.selection,i=o._eventCoordinates(t.originalEvent),n=this.mainAxis(),s=n.roundedRange(),a=n.pane.box.containsPoint(i),p=o._plotArea.categoryAxis,l=t.axisRanges[p.options.name],h=this.options.select;if(l&&!a&&r){e=h.from&&h.to?We(h.to)-We(h.from):We(r.options.to)-We(r.options.from);var c=Ve(dt(We(l.min),s.min,We(s.max)-e)),u=Ve(dt(We(c)+e,We(s.min)+e,s.max));this.options.select={from:c,to:u},this.options.liveDrag&&(this.filterAxes(),this.redrawSlaves()),r.set(c,u),this.showHint(c,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,r=this.options.select;r.from=e,r.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,r=t.to,i=0;i<e.length;i++){var n=e[i];n.pane!==Sa&&(n.min=o,n.max=r)}},e.prototype.filter=function(){var t=this.chart,e=this.options.select;if(t.requiresHandlers(["navigatorFilter"])){var o=this.mainAxis(),r={from:e.from,to:e.to};if("category"!==o.options.type){var i=new lo(R({baseUnit:"fit"},t.options.categoryAxis[0],{categories:[e.from,e.to]}),t.chartService).options;r.from=Ue(i.min,-i.baseUnitStep,i.baseUnit),r.to=Ue(i.max,i.baseUnitStep,i.baseUnit)}this.chart.trigger("navigatorFilter",r)}},e.prototype._zoom=function(t){var e=this.chart._plotArea.categoryAxis,o=this.selection,r=this.options,i=r.select,n=r.liveDrag,s=this.mainAxis(),a=t.delta;if(o){var p=s.categoryIndex(o.options.from),l=s.categoryIndex(o.options.to),h=this.chart._eventCoordinates(t.originalEvent);t.originalEvent.preventDefault(),Math.abs(a)>1&&(a*=3),l-p>1?(o.zoom(a,h),this.readSelection()):(e.options.min=i.from,i.from=e.scaleRange(-t.delta*this.chart._mousewheelZoomRate(),h).min),n&&(this.filterAxes(),this.redrawSlaves()),o.set(i.from,i.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[Aa]},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 r=R({},o.navigator,t.navigator),i=t.panes=[].concat(t.panes),n=R({},r.pane,{name:Sa});r.visible||(n.visible=!1,n.height=.1),i.push(n),e.attachAxes(t,r),e.attachSeries(t,r,o)}},e.attachAxes=function(t,e){var o=e.series||[],r=t.categoryAxis=[].concat(t.categoryAxis),i=t.valueAxis=[].concat(t.valueAxis),n=0===Ei(o,nr).length,s=R({type:"date",pane:Sa,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;r.push(R({},s,{maxDateGroups:200},a,{name:Aa,title:null,baseUnit:"fit",baseUnitStep:"auto",labels:{visible:!1},majorTicks:{visible:!1}}),R({},s,a,{name:Aa+"_labels",maxDateGroups:20,baseUnitStep:"auto",labels:{position:""},plotBands:[],autoBaseUnitSteps:{minutes:[]},_overlap:!0}),R({},s,a,{name:Aa+"_ticks",maxDateGroups:200,majorTicks:{width:.5},plotBands:[],title:null,labels:{visible:!1,mirror:!0},_overlap:!0})),i.push(R({name:Aa,pane:Sa,majorGridLines:{visible:!1},visible:!1},e.valueAxis))},e.attachSeries=function(t,e,o){for(var r=t.series=t.series||[],i=[].concat(e.series||[]),n=o.seriesColors,s=e.seriesDefaults,a=0;a<i.length;a++)r.push(R({color:n[a%n.length],categoryField:e.dateField,visibleInLegend:!1,tooltip:{visible:!1}},s,i[a],{axis:Aa,categoryAxis:Aa,autoBind:e.autoBindElements}))},e}(k.Class),Oa=function(t){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 r=lt(this.element).width||600,i=o,n={seriesDefaults:{categoryField:e.dateField},axisDefaults:{categoryAxis:{name:"default",majorGridLines:{visible:!1},labels:{step:2},majorTicks:{visible:!1},maxDateGroups:Math.floor(r/28)}}};i&&(i=R({},i,n)),Ma.setup(e,i),t.prototype.applyDefaults.call(this,e,i)},e.prototype._setElementClass=function(t){w(t,"k-chart k-stockchart")},e.prototype.setOptions=function(e){this.destroyNavigator(),t.prototype.setOptions.call(this,e)},e.prototype.noTransitionsRedraw=function(){var t=this.options.transitions;this.options.transitions=!1,this._fullRedraw(),this.options.transitions=t},e.prototype._resize=function(){this.noTransitionsRedraw()},e.prototype._redraw=function(){var t=this.navigator;!this._dirty()&&t&&t.options.partialRedraw?t.redrawSlaves():this._fullRedraw()},e.prototype._dirty=function(){var t=this.options,e=X([].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 Ma(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===Sa?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 r=e[o];r.name===Aa?t=r.categories:t&&r.pane===Sa&&(r.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),r=this._plotArea.paneByPoint(o);return t.prototype._stopChartHandlers.call(this,e)||r&&r.options.name===Sa},e.prototype._toggleDragZoomEvents=function(){this._dragZoomEnabled||(this.element.style.touchAction="none",this._dragZoomEnabled=!0)},e}(da);wt(Oa,{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 Ta=Oa,Ba=Math.PI/180;function Ra(t,e){var o=t.getOrigin(),r=t.getSize(),i=V(e);return t.setOrigin([o.x-i.left,o.y-i.top]),t.setSize([r.width+(i.left+i.right),r.height+(i.top+i.bottom)]),t}var Ia=k.drawing.Group,La=k.drawing.Path,Ea=k.drawing.Text;function Da(t,e){var o=t.box,r=t.children[0].box,i=e.border||{},n=e.background||"",s=La.fromRect(new k.geometry.Rect([o.x1,o.y1],[o.width(),o.height()]),{stroke:{}}),a=new Ea(t.text,new k.geometry.Point(r.x1,r.y1),{font:e.font,fill:{color:e.color}}),p=Ra(a.bbox().clone(),e.padding),l=La.fromRect(p,{stroke:{color:i.width?i.color:"",width:i.width,opacity:i.opacity,dashType:i.dashType,lineJoin:"round",lineCap:"round"},fill:{color:n}}),h=new Ia;return h.append(s),h.append(l),h.append(a),h}function ja(t,e,o){var r=st(t.from)?t.from:d,i=st(t.to)?t.to:u;return t.from=Math.max(Math.min(i,r),e),t.to=Math.min(Math.max(i,r),o),t}function Va(t,e){var o=V(e);return o.left=-o.left,o.top=-o.top,o.right=-o.right,o.bottom=-o.bottom,Ra(t,o)}var za=k.drawing.Path,Ua=k.drawing.Surface,Ha=function(t){function e(e,o,r,i){void 0===i&&(i={}),t.call(this),this.element=e,this.theme=r,this.contextService=new Ae(this,i),this._originalOptions=R({},this.options,o),this.options=R({},this._originalOptions),this._initTheme(r),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 r=0;r<e.length;r++)o.push(e[r].value());return o}if(b(t))for(var i=0;i<t.length;i++)P(t[i])&&e[i].value(t[i]);this._setValueOptions(t)},e.prototype._setValueOptions=function(t){for(var e=[].concat(this.options.pointer),o=[].concat(t),r=0;r<o.length;r++)e[r].value=o[r]},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 k.geometry.Rect([0,0],[t.width,t.height]);this._initSurface(),this.gaugeArea=this._createGaugeArea(),this._createModel();var o=Va(e.bbox(),this._gaugeAreaMargin);this.reflow(o)},e.prototype.setOptions=function(t,e){this._originalOptions=R(this._originalOptions,t),this.options=R({},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=R({},e,this.options);var o=this.options,r=o.pointer;if(b(r)){for(var i=[],n=0;n<r.length;n++)i.push(R({},e.pointer,r[n]));o.pointer=i}},e.prototype._createGaugeArea=function(){var t=this.options.gaugeArea,e=this.surface.size(),o=t.border||{},r=new k.geometry.Rect([0,0],[e.width,e.height]);return this._gaugeAreaMargin=t.margin||5,o.width>0&&(r=Va(r,o.width)),za.fromRect(r,{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(),r=this._surfaceSize();lt(o,r),e&&e.options.type===t.renderAs?(this.surface.clear(),this.surface.resize()):(e&&e.destroy(),this.surface=Ua.create(o,{type:t.renderAs}))},e.prototype._surfaceSize=function(){var t=this.options,e=this._getSize();return t.gaugeArea&&R(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,r=t.offsetHeight;return o||(o=e.width),r||(r=e.height),{width:o,height:r}},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}(k.Class);wt(Ha,{plotArea:{},theme:"default",renderAs:"",pointer:{},scale:{},gaugeArea:{}});var Fa=Ha,Na=k.drawing.Path,Ga=k.drawing.Group,Wa=k.geometry.Point;function Xa(t,e){var o,r,i=t.position,n=t.tickX,s=t.tickY;return t.vertical?(o=new Wa(n,i),r=new Wa(n+e.size,i)):(o=new Wa(i,s),r=new Wa(i,s+e.size)),new Na({stroke:{color:e.color,width:e.width}}).moveTo(o).lineTo(r)}function Ya(t,e,o,r){var i=e.length;if(r.visible)for(var n=o.mirror,s=o.lineBox,a=r.skip;a<i;a+=r.step)a%r.skipUnit!=0&&(o.tickX=n?s.x2:s.x2-r.size,o.tickY=n?s.y1-r.size:s.y1,o.position=e[a],t.append(Xa(o,r)))}var qa=function(t){function e(e,o){var r=e||{};!st(r.reverse)&&!1===r.vertical&&(o||{}).rtl&&(r=Object.assign({},r,{reverse:!0})),t.call(this,0,1,r,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=R({},this.options,t);return(e=R({},e,{labels:{mirror:e.mirror}})).majorUnit=e.majorUnit||Dt(e.min,e.max),e},e.prototype.initFields=function(){},e.prototype.render=function(){var t=this.elements=new Ga,e=this.renderLabels(),o=this.renderLine(),r=this.renderTicks(),i=this.renderRanges();return t.append(o,e,r,i),t},e.prototype.renderRanges=function(){for(var t=this.options,e=t.min,o=t.max,r=t.vertical,i=t.labels.mirror,n=t.ranges||[],s=new Ga,a=n.length,p=t.rangeSize||t.minorTicks.size/2,l=0;l<a;l++){var h=ja(n[l],e,o),c=this.getSlot(h.from,h.to),u=r?this.lineBox():c,d=r?c:this.lineBox();r?u.x1-=p*(i?-1:1):d.y2+=p*(i?-1:1),s.append(Na.fromRect(new k.geometry.Rect([u.x1,d.y1],[u.x2-u.x1,d.y2-d.y1]),{fill:{color:h.color,opacity:h.opacity},stroke:{}}))}return s},e.prototype.renderLabels=function(){for(var t=this.labels,e=this.options,o=new Ga,r=0;r<t.length;r++)o.append(Da(t[r],e.labels));return o},e.prototype.renderLine=function(){var t=this.options.line,e=this.lineBox(),o=new Ga;if(t.width>0&&t.visible){var r=new Na({stroke:{color:t.color,dashType:t.dashType,width:t.width}});r.moveTo(e.x1,e.y1).lineTo(e.x2,e.y2),o.append(r)}return o},e.prototype.renderTicks=function(){var t=new Ga,e=this.options,o=e.majorTicks.visible?e.majorUnit:0,r={vertical:e.vertical,mirror:e.labels.mirror,lineBox:this.lineBox()};return Ya(t,this.getMajorTickPositions(),r,e.majorTicks),Ya(t,this.getMinorTickPositions(),r,R({},{skipUnit:o/e.minorUnit},e.minorTicks)),t},e}(vo);wt(qa,{min:0,max:50,majorTicks:{size:15,align:"inside",color:n,width:.5,visible:!0},minorTicks:{size:10,align:"inside",color:n,width:.5,visible:!0},line:{width:.5},labels:{position:"inside",padding:2},mirror:!1,_alignLines:!1});var Qa=qa,Za=function(t){function e(e,o){t.call(this);var r=e.options,i=r.min,n=r.max,s=this.options=R({},this.options,o);s.fill=s.color,this.scale=e,st(s.value)?s.value=dt(s.value,i,n):s.value=i}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 r=this.scale.options,i=r.min,n=r.max;e._oldValue=st(e._oldValue)?e.value:i,e.value=dt(t,i,n),this.elements&&this.repaint()},e}(k.Class);wt(Za,{color:n});var Ka=Za,$a=function(t){function e(e,o){t.call(this,e,o),this.options=R({track:{visible:st(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,r=this.options,i=this.scale,n=i.options,s=n.mirror,a=n.vertical,p=i.lineBox(),l=r.track.size||r.size,h=r.size/2,c=V(r.margin),u=a?c[s?"left":"right"]:c[s?"bottom":"top"];u=s?-u:u,a?(o=new zt(p.x1+u,p.y1,p.x1+u,p.y2),s?o.x1-=l:o.x2+=l,"barPointer"!==r.shape&&(t=e=new zt(p.x2+u,p.y1-h,p.x2+u,p.y2+h))):(o=new zt(p.x1,p.y1-u,p.x2,p.y1-u),s?o.y2+=l:o.y1-=l,"barPointer"!==r.shape&&(t=e=new zt(p.x1-h,p.y1-u,p.x2+h,p.y1-u))),this.trackBox=o,this.pointerRangeBox=e,this.box=t||o.clone().pad(r.border.width)},e.prototype.getElementOptions=function(){var t=this.options;return{fill:{color:t.color,opacity:t.opacity},stroke:st(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,r=o.mirror,i=o.vertical,n=V(e.margin);return i?n[r?"left":"right"]:n[r?"bottom":"top"]},e}(Ka);wt($a,{shape:"barPointer",track:{border:{width:1}},color:n,border:{width:1},opacity:1,margin:V(3),animation:{type:"barPointer"},visible:!0});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.setup=function(){var t=this.options,e=t.margin,o=t.from,r=t.to,i=t.vertical,n=i?"x1":"y1";t.mirror===i?(o[n]-=e,r[n]-=e):(o[n]+=e,r[n]+=e);var s=this.fromScale=new k.geometry.Point(o.x1,o.y1),a=this.toScale=new k.geometry.Point(r.x1,r.y1);0!==t.duration&&(t.duration=Math.max(s.distanceTo(a)/t.duration*1e3,1))},e.prototype.step=function(t){var e=K(this.fromScale.x,this.toScale.x,t),o=K(this.fromScale.y,this.toScale.y,t);this.element.transform(k.geometry.transform().translate(e,o))},e}(k.drawing.Animation);wt(tp,{easing:"linear",duration:250}),k.drawing.AnimationFactory.current.register("arrowPointer",tp);var ep=tp,op=k.geometry.Point,rp=k.drawing.Path,ip=function(t){function e(e,o){t.call(this,e,o),st(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,r=t.options.mirror?-1:1;return t.options.vertical?[new op(0,0-o),new op(0-r*e,0),new op(0,0+o)]:[new op(0-o,0),new op(0,0+r*e),new op(0+o,0)]},e.prototype.repaint=function(){var t=this.scale,e=this.options,o=new ep(this.elements,R(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(),r=this.pointerShape(e.value);e.animation.type="arrowPointer";var i=new rp({stroke:o.stroke,fill:o.fill}).moveTo(r[0]).lineTo(r[1]).lineTo(r[2]).close(),n=t.getSlot(e.value);return i.transform(k.geometry.transform().translate(n.x1,n.y1)),this.elements=i,i},e}(Ja),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.setup=function(){var t=this.options,e=this.axis=t.vertical?x:m,o=this.to=t.newPoints[0][e],r=this.from=t.oldPoints[0][e];0!==t.duration&&(t.duration=Math.max(Math.abs(o-r)/t.speed*1e3,1)),this._set(r)},e.prototype.step=function(t){var e=K(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}(k.drawing.Animation);wt(np,{easing:"linear",speed:250}),k.drawing.AnimationFactory.current.register("barPointer",np);var sp=np,ap=k.drawing.Group,pp=k.drawing.Path,lp=function(t){function e(e,o){t.call(this,e,o),st(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,r=e.options,i=r.mirror,n=r.vertical,s=i===n?-1:1,a=o.size*s,p=e.getSlot(e.options.min),l=e.getSlot(t),h=n?x:m,c=n?m:x,u=this._margin()*s,d=new k.geometry.Point;d[h]=p[h+"1"],d[c]=p[c+"1"];var f=new k.geometry.Point;f[h]=l[h+"1"],f[c]=l[c+"1"],n?(d.translate(u,0),f.translate(u,0)):(d.translate(0,u),f.translate(0,u));var g=f.clone(),y=d.clone();return n?(g.translate(a,0),y.translate(a,0)):(g.translate(0,a),y.translate(0,a)),[d,f,g,y]},e.prototype.repaint=function(){var t=this.scale,e=this.options,o=this.pointerShape(e.value),r=this.pointerPath,i=this.pointerShape(e._oldValue);r.moveTo(o[0]).lineTo(o[1]).lineTo(o[2]).lineTo(o[3]).close();var n=new sp(r,R(e.animation,{reverse:t.options.reverse,vertical:t.options.vertical,oldPoints:[i[1],i[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 ap,e=this.getElementOptions();this.options.track.visible&&t.append(this.renderTrack());var o=this.pointerPath=new pp({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 pp.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}(Ja),hp=k.drawing.Group,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){var e=this.pointers,o=t.origin.x,r=t.origin.y,i=new zt(o,r,o+t.width(),r+t.height());this.scale.reflow(i),this._shrinkScaleWidth(i);for(var n=0;n<e.length;n++)e[n].reflow();this.bbox=this._getBox(i),this._alignElements(),this._shrinkElements(),this._buildVisual(),this._draw()},e.prototype._buildVisual=function(){var t=new hp,e=this.scale.render(),o=this.pointers;t.append(this.gaugeArea),t.append(e);for(var r=0;r<o.length;r++){var i=o[r];t.append(i.render()),i.value(i.options.value)}this._visuals=t},e.prototype._createModel=function(){var t=this.options,e=this.scale=new Qa(t.scale,this.contextService);this.pointers=[];var o=t.pointer;o=b(o)?o:[o];for(var r=0;r<o.length;r++){var i=R({},o[r],{animation:{transitions:t.transitions}}),n="arrow"===i.shape?ip:lp;this.pointers.push(new n(e,i))}},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,r=this.pointers,i=t.center(),n=r[0].box.clone().wrap(o.box),s=0;s<r.length;s++)n.wrap(r[s].box.clone());return o.options.vertical?(e=n.width()/2,n=new zt(i.x-e,t.y1,i.x+e,t.y2)):(e=n.height()/2,n=new zt(t.x1,i.y-e,t.x2,i.y+e)),n},e.prototype._alignElements=function(){for(var t,e=this.scale,o=this.pointers,r=e.box,i=o[0].box.clone().wrap(e.box),n=this.bbox,s=0;s<o.length;s++)i.wrap(o[s].box.clone());e.options.vertical?(t=n.center().x-i.center().x,e.reflow(new zt(r.x1+t,n.y1,r.x2+t,n.y2))):(t=n.center().y-i.center().y,e.reflow(new zt(r.x1,r.y1+t,r.x2,r.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(),r=t.options.vertical?"y":"x",i=e[0].box,n=0;n<e.length;n++)i.wrap(e[n].box.clone());o[r+1]+=Math.max(o[r+1]-i[r+1],0),o[r+2]-=Math.max(i[r+2]-o[r+2],0),t.reflow(o);for(var s=0;s<e.length;s++)e[s].reflow(this.bbox)},e}(Fa);wt(cp,{transitions:!0,gaugeArea:{background:""},scale:{vertical:!0}});var up=cp,dp=k.drawing.Arc,fp=k.drawing.Path,gp=k.drawing.Group;function yp(t,e,o,r){var i=new gp,n=t.center,s=t.getRadiusX();if(r.visible)for(var a=0;a<e.length;a++){var p=t.pointAt(e[a]),l=new k.geometry.Point(n.x+s-r.size,n.y).rotate(e[a],n);i.append(new fp({stroke:{color:r.color,width:r.width}}).moveTo(p).lineTo(l))}return i}function vp(t,e,o,r){return{from:t,to:e,color:o,opacity:r}}var mp=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=R({},this.options,t);return e.majorUnit=e.majorUnit||Dt(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(!st(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,r=e.max,i=e.reverse,n=e.startAngle,s=e.endAngle,a=s-n;return(i?s-(t-o)/(r-o)*a:(t-o)/(r-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,r=0;return e.visible&&(r=e.size),o.visible&&(r=Math.max(o.size,r)),r},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(),r=this.tickAngles(e,t.majorUnit),i=t.rangeSize=t.rangeSize||.1*o,n=new gp,s=.05*o;st(t.rangeDistance)?s=t.rangeDistance:t.rangeDistance=s;var a=t.labels,p="inside"===a.position,l=st(this.labelElements);p&&(o-=this.ticksSize(),this.hasRanges()&&!l&&(o-=i+s),e.setRadiusX(o).setRadiusY(o));for(var h=this.labels,c=h.length,u=V(a.padding),d=(u.left+u.right)/2,f=(u.top+u.bottom)/2,g=0;g<c;g++){var y=h[g],v=y.box.width()/2,m=y.box.height()/2,x=r[g],b=(x-180)*Ba,w=e.pointAt(x),_=w.x+Math.cos(b)*(v+d)*(p?1:-1),C=w.y+Math.sin(b)*(m+f)*(p?1:-1);y.reflow(new zt(_-v,C-m,_+v,C+m));var S=new k.geometry.Point(y.box.x1,y.box.y1),A=void 0;if(l){var P=(A=this.labelElements.children[g]).bbox().origin,M=A.transform()||k.geometry.transform();M.translate(S.x-P.x,S.y-P.y),A.transform(M)}else A=Da(y,t.labels),n.append(A);this.bbox=k.geometry.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,r=e.rangeSize,i=this.getRangeRadius();"inside"===this.options.labels.position&&(i+=r+o);for(var n=i+r/2,s=0;s<t.length;s++)t[s]._geometry.setRadiusX(n).setRadiusY(n);this.bbox=k.geometry.Rect.union(this.bbox,this.ranges.bbox())}},e.prototype.renderRanges=function(){var t=this.rangeSegments(),e=t.length,o=new gp;if(e){var r=this.options,i=r.rangeSize,n=r.reverse,s=r.rangeDistance,a=this.getRangeRadius();this.radius(this.radius()-i-s);for(var p=0;p<e;p++){var l=t[p],h=this.slotAngle(l[n?"to":"from"]),c=this.slotAngle(l[n?"from":"to"]);c-h!=0&&o.append(this.createRange(h,c,a,l))}}return o},e.prototype.createRange=function(t,e,o,r){var i=this.options.rangeSize,n=new k.geometry.Arc(this.arc.center,{radiusX:o+i/2,radiusY:o+i/2,startAngle:t,endAngle:e});return new dp(n,{stroke:{width:i,color:r.color,opacity:r.opacity,lineCap:r.lineCap}})},e.prototype.rangeSegments=function(){var t=this.options,e=t.ranges||[],o=e.length,r=[];if(o){var i=t.min,n=t.max,s=t.rangePlaceholderColor;r.push(vp(i,n,s));for(var a=0;a<o;a++)for(var p=ja(e[a],i,n),l=r.length,h=0;h<l;h++){var c=r[h];if(c.from<=p.from&&p.from<=c.to){r.push(vp(p.from,p.to,p.color,p.opacity)),c.from<=p.to&&p.to<=c.to&&r.push(vp(p.to,c.to,s,p.opacity)),c.to=p.from;break}}}return r},e.prototype.getRangeRadius=function(){var t=this.arc,e=this.options,o=e.rangeSize,r=e.rangeDistance,i=e.majorTicks.size;return"outside"===e.labels.position?t.getRadiusX()-i-r-o:t.getRadiusX()-o},e.prototype.renderArc=function(t,e){var o=this.options;return this.arc=new k.geometry.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=yp(o,this.majorTickAngles,e.majorUnit,e.majorTicks);var r=new gp;r.append(this.majorTicks);var i=e.majorTicks.size,n=e.minorTicks.size;if(this._tickDifference=i-n,"outside"===e.labels.position){var s=o.getRadiusX();o.setRadiusX(s-i+n).setRadiusY(s-i+n)}return this.minorTickAngles=this.normalizeTickAngles(this.tickAngles(t,e.minorUnit)),this.minorTicks=yp(o,this.minorTickAngles,e.minorUnit,e.minorTicks),r.append(this.minorTicks),r},e.prototype.normalizeTickAngles=function(t){for(var e=this.options,o=e.majorUnit/e.minorUnit,r=t.length-1;r>=0;r--)r%o==0&&t.splice(r,1);return t},e.prototype.tickAngles=function(t,e){var o=this.options,r=o.reverse,i=o.max-o.min,n=t.endAngle-t.startAngle,s=i/e,a=t.startAngle,p=n/s;r&&(a+=n,p=-p),n>=360&&o.max%e==0&&(s-=1);for(var l=[],h=0;h<s;h++)l.push(yt(a,3)),a+=p;return yt(a)<=t.endAngle&&l.push(a),l},e.prototype.radius=function(t){if(!t)return this.arc.getRadiusX();this.arc.setRadiusX(t).setRadiusY(t),this.repositionTicks(this.majorTicks.children,this.majorTickAngles),this.repositionTicks(this.minorTicks.children,this.minorTickAngles,!0)},e.prototype.repositionTicks=function(t,e,o){var r=o&&this._tickDifference||0,i=this.arc,n=i.getRadiusX();o&&"outside"===this.options.labels.position&&0!==r&&(i=this.arc.clone()).setRadiusX(n-r).setRadiusY(n-r);for(var s=0;s<t.length;s++){var a=i.pointAt(e[s]),p=t[s].segments,l=a.x-p[0].anchor().x,h=a.y-p[0].anchor().y;t[s].transform((new k.geometry.transform).translate(l,h))}},e}(vo);wt(mp,{min:0,max:100,majorTicks:{size:15,align:"inside",color:n,width:.5,visible:!0},minorTicks:{size:10,align:"inside",color:n,width:.5,visible:!0},startAngle:-30,endAngle:210,labels:{position:"inside",padding:2}});var xp=mp,bp=function(t){function e(e,o){t.call(this,e,o);var r=this.options;r.duration=Math.max(Math.abs(r.newAngle-r.oldAngle)/r.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=K(e.oldAngle,e.newAngle,t);this.element.transform(k.geometry.transform().rotate(o,e.center))},e}(k.drawing.Animation);wt(bp,{easing:"linear",duration:150}),k.drawing.AnimationFactory.current.register("radialPointer",bp);var wp=bp,_p=k.drawing.Circle,Cp=k.drawing.Group,kp=k.drawing.Path,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.setAngle=function(t){this.elements.transform(k.geometry.transform().rotate(t,this.center))},e.prototype.repaint=function(){var t=this.scale,e=this.options,o=t.slotAngle(e._oldValue),r=t.slotAngle(e.value);!1===e.animation.transitions?this.setAngle(r):new wp(this.elements,R(e.animation,{oldAngle:o,newAngle:r})).play()},e.prototype.render=function(){var t=this.scale,e=this.options,o=new Cp;return!1!==e.animation&&R(e.animation,{startAngle:0,center:t.arc.center,reverse:t.options.reverse}),o.append(this._renderNeedle(),this._renderCap()),this.elements=o,this.setAngle(Ba),o},e.prototype.reflow=function(t){var e=this.center=t.center,o=dt(this.options.length||1,.1,1.5),r=this.radius=t.getRadiusX()*o,i=this.capSize=Math.round(r*this.options.cap.size);this.bbox=k.geometry.Rect.fromPoints(new k.geometry.Point(e.x-i,e.y-i),new k.geometry.Point(e.x+i,e.y+i))},e.prototype._renderNeedle=function(){var t=this.scale.options.minorTicks.size,e=this.center,o=this.options.color,r=new kp({fill:{color:o},stroke:{color:o,width:.5}});return r.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(),r},e.prototype._renderCap=function(){var t=this.options,e=t.cap.color||t.color,o=new k.geometry.Circle(this.center,this.capSize);return new _p(o,{fill:{color:e},stroke:{color:e}})},e}(Ka);wt(Sp,{cap:{size:.05},arrow:{width:16,height:14},animation:{type:"radialPointer",duration:150}});var Ap=Sp,Pp=k.drawing.Group,Mp=function(t){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=k.geometry.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 r=this._visuals=new Pp;r.append(t),r.append(o.ticks),r.append(o.ranges),this._buildPointers(e),r.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,r,i,n,s=this.scale.arc,a=this._initialPlotArea,p=Math.abs(this.getDiff(a,t)),l=yt(p,3),h=yt(-p,3),c=0,u=0;!(!(u++<100)||(c=n===r?c+1:0)>5||l!==i&&0<=(e=this.getPlotBox(l,t,s))&&e<=2||h!==i&&0<=(r=this.getPlotBox(h,t,s))&&r<=2||(i=e>0&&r>0?2*l:e<0&&r<0?2*h:yt((l+h)/2||1,3),0<=(o=this.getPlotBox(i,t,s))&&o<=2));)n=r,o>0?(h=i,r=o):(l=i,e=o)},e.prototype.getPlotBox=function(t,e,o){var r=this.scale,i=this.pointers,n=o.getRadiusX(),s=o.clone();s.setRadiusX(n+t).setRadiusY(n+t),r.arc=s,r.reflow(e),this.plotBbox=r.bbox;for(var a=0;a<i.length;a++)i[a].reflow(s),this.plotBbox=k.geometry.Rect.union(this.plotBbox,i[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(),r=e.x-o.x,i=e.y-o.y,n=this.scale,s=this.pointers;n.arc.center.x-=r,n.arc.center.y-=i,n.reflow(t);for(var a=0;a<s.length;a++)s[a].reflow(n.arc),this.plotBbox=k.geometry.Rect.union(n.bbox,s[a].bbox)},e.prototype._createModel=function(){var t=this.options,e=t.pointer,o=this.scale=new xp(t.scale,this.contextService);this.pointers=[];for(var r=b(e)?e:[e],i=0;i<r.length;i++){var n=new Ap(o,R({},r[i],{animation:{transitions:t.transitions}}));this.pointers.push(n)}},e}(Fa);wt(Mp,{transitions:!0,gaugeArea:{background:""}});var Op=Mp,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.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 r=this.options.reverse,i=this.slotAngle(r?e:t),n=this.slotAngle(r?t:e),s=this.createRange(i,n,this.getRangeRadius(),o);return this.ranges.append(s),s},e}(xp);wt(Tp,{min:0,max:100,majorTicks:{visible:!1},minorTicks:{visible:!1},labels:{visible:!1},startAngle:0,endAngle:180,rangeLineCap:"round"});var Bp=Tp,Rp=function(t){function e(e,o){t.call(this,e,o);var r=this.options,i=Math.abs(r.newAngle-r.oldAngle)/r.duration*1e3;r.duration=dt(i,150,800);var n=e.elements.options.get("stroke.color"),s=e.currentColor();n!==s&&(this.startColor=new k.Color(n),this.color=new k.Color(s))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.step=function(t){var e=this.options,o=this.startColor,r=this.color,i=K(e.oldAngle,e.newAngle,t);if(this.element.angle(i),r){var n=yt(K(o.r,r.r,t)),s=yt(K(o.g,r.g,t)),a=yt(K(o.b,r.b,t));this.element.stroke(new k.Color(n,s,a).toHex())}},e}(k.drawing.Animation);wt(Rp,{easing:"linear",duration:150}),k.drawing.AnimationFactory.current.register("radialRangePointer",Rp);var Ip=Rp,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.repaint=function(){var t=this.scale,e=this.options,o=t.slotAngle(e._oldValue),r=t.slotAngle(e.value);this.animation&&this.animation.abort(),!1===e.animation.transitions?(this.angle(r),this.stroke(this.currentColor())):(this.animation=new Ip(this,R(e.animation,{oldAngle:o,newAngle:r})),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&&R(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,r=this.options,i=r.colors,n=r.color,s=r.value,a=P(s)?s:e;if(i)for(var p=0;p<i.length;p++){var l=i[p],h=l.color,c=l.from;void 0===c&&(c=e);var u=l.to;if(void 0===u&&(u=o),c<=a&&a<=u)return h}return n},e.prototype.reflow=function(){this.render(),this.bbox=this.elements.bbox()},e}(Ka);wt(Lp,{animation:{type:"radialRangePointer",duration:150}});var Ep=Lp,Dp=function(t){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 Bp(t.scale,this.contextService),o=new Ep(e,R({},{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(),r=this.scale.arc.center,i=r.x-t/2,n=r.y-e/2;if(t<o.width){var s=i+t;i=Math.max(i,0),s>o.width&&(i-=s-o.width)}if(e<o.height){var a=this.scale.bbox,p=a.bottomRight().y,l=n+e;n=Math.max(n,a.origin.y),l>p&&(n-=l-p)}return{left:i,top:n}},e}(Op),jp=function(t){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}(Dp),Vp=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 r=st(t)?String(t):t;return this.initValue(r,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}(k.Class);wt(Vp,{quietZoneLength:10,addQuietZone:!0,addCheckSum:!0});var zp=Object.assign,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.initProperties=function(){t.prototype.initProperties.call(this),zp(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 r=(o+this.getWeightedSum(t,e,this.kCheckSumTotal))%this.checkSumMod;this.checksum+=r,this.addPattern(this.characterMap[r])}},e.prototype.getWeightedSum=function(t,e,o){for(var r=0,i=0;i<t.length;i++)r+=this.weightedValue(this.getValue(t.charAt(i)),e,i,o);return r},e.prototype.weightedValue=function(t,e,o,r){return((e-o)%r||r)*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}(Vp);wt(Up,{addCheckSum:!0});var Hp=Object.assign,Fp=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),Hp(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}(Vp),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.initProperties=function(){t.prototype.initProperties.call(this),Hp(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,r=Math.ceil(Math.max(.15*this.width,24)),i=this.maxRatio;if(this.height<r)throw new Error("Insufficient height for Code39 encoding: the current height is "+this.height+"px and the minimum height is "+r+"px.");for(t=this.getBaseUnit(i);t<e&&i>o;)i=parseFloat((i-.1).toFixed(1)),t=this.getBaseUnit(i);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=i,this.baseUnit=t,this.patternString=this.patternString.substring(0,this.patternString.length-1),this.pattern=this.pattern.concat(this.patternString.replace(/ratio/g,i).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}(Fp);wt(Np,{addCheckSum:!1});var Gp={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 r=0;r<e.length;r++){var i=e[r];this.addBase(i)}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 r=0;r<this.specialAsciiCodes[t].length;r++)e.push(this.characterMap[this.shiftCharacters[3]]),e.push(this.characterMap[this.specialAsciiCodes[t][r]])}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"]},Wp=function(t){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),R(this,Gp,{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}(Np),Xp=Object.assign,Yp=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),Xp(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,r=o.length,i=0;for(e=r-1;e>=0;e--)i+=this.weightedValue(o[e],r-e,this.cCheckSumTotal);for(t=i%this.checkSumMod,i=this.weightedValue(t,1,this.kCheckSumTotal),e=r-1;e>=0;e--)i+=this.weightedValue(o[e],r-e+1,this.kCheckSumTotal);return[t,i%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}(Fp),qp=function(t){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),R(this,Gp,{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 r=this._findCharacterByValue(t);this.addPattern(this.characterMap[r].pattern)}}})},e}(Yp),Qp=/^\d+$/,Zp=Object.assign,Kp=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),Zp(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(Qp.test(t)||this.invalidCharacterError(t.match(/[^0-9]/)[0]),!Z(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}(Vp),$p=/^\d+$/,Jp=/^[a-z0-9]+$/i,tl=Object.assign,el=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}(k.Class),ol=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),R(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,r=t.value,i=r.length;if(Z("C",o)){var n=r.substr(t.index).match(/\d{4,}/g);n&&(i=r.indexOf(n[0],t.index))}for(;(e=t.value.charCodeAt(t.index))>=0&&this.isCode(e)&&t.index<i;)this.encoding.addPattern(this.getValue(e)),t.index++},e.prototype._initMoves=function(t){this._moves=[],Z(this.FNC4,t)&&this._moves.push(this._moveFNC),Z(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}(el),rl={};rl.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),tl(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}(ol),rl.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),tl(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}(ol),rl.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),tl(this,{key:"C",MOVE:99,START:105})},e.prototype.addStart=function(){this.encoding.addPattern(this.START)},e.prototype.is=function(t,e){var o=hl(t,e,4);return(e+4<=t.length||2===t.length)&&$p.test(o)},e.prototype.move=function(){this.encoding.addPattern(this.MOVE)},e.prototype.pushState=function(t){for(var e;(e=hl(t.value,t.index,2))&&$p.test(e)&&2===e.length;)this.encoding.addPattern(parseInt(e,10)),t.index+=2},e.prototype.getValue=function(t){return t},e}(el),rl.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),tl(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),r=this.encoding,i=o.value.length;if(t.index+=i,i<3)for(;o.index<i;o.index++)e=o.value.charCodeAt(o.index),o.state=this._getSubState(e),o.previousState!==o.state&&(o.previousState=o.state,r[o.state].move(o)),r.addPattern(r[o.state].MOVE),r.addPattern(r[o.state].getValue(e));else o.state!==o.previousState&&r[o.state].move(o),this._pushStart(o),r.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++)Z(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,r="",i=e;(o=t.charCodeAt(i++))&&this.isCode(o);)r+=String.fromCharCode(o-128);return r},e}(el),rl.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),tl(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 Z(this.key,this.states)},e.prototype.pushState=function(t){var e,o,r,i=this.encoding,n=t.value.replace(/\s/g,""),s=new RegExp("["+this.startAI+this.endAI+"]","g"),a=t.index,p={state:this.startState};i.addPattern(this.START);for(;;){if(p.index=0,(e=(r=n.charAt(a)===this.startAI?2:0)>0?this.getBySeparator(n,a):this.getByLength(n,a)).ai.length)o=a+r+e.id.length+e.ai.length;else if((o=n.indexOf(this.startAI,a+1))<0){if(a+e.ai.max+e.id.length+r<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),i.pushData(p,this.dependentStates),o>=n.length)break;a=o,p.state!==this.startState&&(i[this.startState].move(p),p.state=this.startState),e.ai.length||i.addPattern(this.START)}t.index=t.value.length},e.prototype.validate=function(t,e){var o=e.substr(t.id.length),r=t.ai;if(!r.type&&!$p.test(o))throw new Error("Application identifier "+t.id+" is numeric only but contains non numeric character(s).");if("alphanumeric"===r.type&&!Jp.test(o))throw new Error("Application identifier "+t.id+" is alphanumeric only but contains non alphanumeric character(s).");if(r.length&&r.length!==o.length)throw new Error("Application identifier "+t.id+" must be "+r.length+" characters long.");if(r.min&&r.min>o.length)throw new Error("Application identifier "+t.id+" must be at least "+r.min+" characters long.");if(r.max&&r.max<o.length)throw new Error("Application identifier "+t.id+" must be at most "+r.max+" characters long.")},e.prototype.getByLength=function(t,e){for(var o,r,i=2;i<=4;i++)if(o=hl(t,e,i),r=this.getApplicationIdentifier(o)||this.getApplicationIdentifier(o.substring(0,o.length-1)))return{id:o,ai:r};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),r=t.indexOf(this.endAI,o),i=t.substring(o+1,r),n=this.getApplicationIdentifier(i)||this.getApplicationIdentifier(i.substr(i.length-1));return n||this.unsupportedAIError(i),{ai:n,id:i}},e.prototype.getApplicationIdentifier=function(t){var e=this.applicationIdentifiers,o=e.multiKey;if(e[t])return e[t];for(var r=0;r<o.length;r++){if(o[r].ids&&Z(t,o[r].ids))return o[r].type;if(o[r].ranges)for(var i=o[r].ranges,n=0;n<i.length;n++)if(i[n][0]<=t&&t<=i[n][1])return o[r].type}},e}(el);var il=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),tl(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 rl[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(),r=0;r<o.length;r++)e=parseInt(o.charAt(r),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}(Vp),nl=function(t){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),tl(this,{name:"Code 128 A",states:["A"]})},e}(il),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.initProperties=function(){t.prototype.initProperties.call(this),tl(this,{name:"Code 128 B",states:["B"]})},e}(il),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.initProperties=function(){t.prototype.initProperties.call(this),tl(this,{name:"Code 128 C",states:["C"]})},e}(il),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.initProperties=function(){t.prototype.initProperties.call(this),tl(this,{name:"Code 128",states:["C","B","A","FNC4"]})},e}(il),ll=function(t){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),tl(this,{name:"Code GS1-128",states:["FNC1","C","B"]})},e}(il);function hl(t,e,o){return t.substring(e,e+o)}var cl=Object.assign,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.initProperties=function(){t.prototype.initProperties.call(this),cl(this,{characterMap:["12121212","12121221","12122112","12122121","12211212","12211221","12212112","12212121","21121212","21121221"],START:"21",STOP:"121",checkSumType:"",checkSums:vl})},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}(Vp),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.initProperties=function(){t.prototype.initProperties.call(this),cl(this,{name:"MSI Modulo10",checkSumType:"Modulo10"})},e}(ul),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.initProperties=function(){t.prototype.initProperties.call(this),cl(this,{name:"MSI Modulo11",checkSumType:"Modulo11"})},e}(ul),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.initProperties=function(){t.prototype.initProperties.call(this),cl(this,{name:"MSI Modulo10 Modulo10",checkSumType:"Modulo10Modulo10"})},e}(ul),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.initProperties=function(){t.prototype.initProperties.call(this),cl(this,{name:"MSI Modulo11 Modulo10",checkSumType:"Modulo11Modulo10"})},e}(ul),vl={Modulo10:function(t){var e,o,r,i=[0,""],n=t.length%2;for(e=0;e<t.length;e++)i[(e+n)%2]+=parseInt(t.charAt(e),10);for(r=i[0],o=(2*i[1]).toString(),e=0;e<o.length;e++)r+=parseInt(o.charAt(e),10);return[(10-r%10)%10]},Modulo11:function(t){for(var e,o=0,r=t.length,i=0;i<r;i++)o+=(((r-i)%6||6)+1)*t.charAt(i);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))}},ml=Object.assign,xl=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),ml(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 r=String(t);if(12!==r.length||/\D/.test(r))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=r,this.checksum=this.calculateChecksum(),this.leftKey=r[0],this.leftPart=r.substr(1,6),this.rightPart=r.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(""),r=0;r<o.length;r++)r%2?e+=parseInt(o.charAt(r),10):t+=parseInt(o.charAt(r),10);return(10-(3*t+e)%10)%10},e}(Vp),bl=Object.assign,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.initProperties=function(){t.prototype.initProperties.call(this),bl(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}(xl),_l={code11:Up,code39:Np,code39extended:Wp,code93:Yp,code93extended:qp,code128:pl,code128a:nl,code128b:sl,code128c:al};_l["gs1-128"]=ll,_l.msimod10=dl,_l.msimod11=fl,_l.msimod1010=gl,_l.msimod1110=yl,_l.postnet=Kp,_l.ean8=wl,_l.ean13=xl;var Cl=function(t){function e(e,o,r){void 0===r&&(r=Et),t.call(this),this.options=R({},this.options,o),this.element=e,this.onError=r,this._initElement(),this._initSurface(),this._setOptions(o),o&&st(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(){w(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 k.drawing.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,r=o.value,i=o.text,n=V(i.margin),s=this._getSize(),a=o.border||{},p=this.encoding,l=new zt(0,0,s.width,s.height).unpad(a.width).unpad(o.padding),h=l.height(),c=new k.drawing.Group;this.contentBox=l,c.append(this._getBackground(s)),i.visible&&(h-=k.drawing.util.measureText(r,{font:i.font}).height+n.top+n.bottom);try{t=p.encode(r,l.width(),h)}catch(t){return this.onError(t),c}return i.visible&&(e=r,o.checksum&&st(p.checksum)&&(e+=" "+p.checksum),c.append(this._getText(e))),this.barHeight=h,this._bandsGroup=this._getBands(t.pattern,t.baseUnit),c.append(this._bandsGroup),c},e.prototype.exportVisual=function(){return this._render()},e.prototype._getSize=function(){var t=this.element,e=t.clientWidth,o=t.clientHeight,r=new k.geometry.Size(300,100);return e>0&&(r.width=e),o&&(r.height=o),this.options.width&&(r.width=this.options.width),this.options.height&&(r.height=this.options.height),r},e.prototype.value=function(t){if(!st(t))return this.options.value;this.options.value=String(t),this.redraw()},e.prototype._getBands=function(t,e){for(var o,r,i=this.contentBox,n=i.x1,s=new k.drawing.Group,a=0;a<t.length;a++){if(o=(r=I(t[a])?t[a]:{width:t[a],y1:0,y2:this.barHeight}).width*e,a%2){var p=k.geometry.Rect.fromPoints(new k.geometry.Point(n,r.y1+i.y1),new k.geometry.Point(n+o,r.y2+i.y1)),l=k.drawing.Path.fromRect(p,{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||{},r=new zt(0,0,t.width,t.height).unpad(o.width/2);return k.drawing.Path.fromRect(r.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 pe(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),!_l[this.type])throw new Error("Encoding '"+this.type+"' is not supported.");this.encoding=new _l[this.type],this.options=R({},this.options,t)},e}(k.Class);wt(Cl,{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 kl=Cl,Sl={width:500,height:100};var Al=function(t,e){if(void 0===e&&(e=Sl),!t)throw new Error("Please specify barcode type to validate.");var o=t.toLowerCase(),r="";if("upca"===o?(o="ean13",r="0"):"upce"===o&&(o="ean8",r="0"),!_l[o])throw new Error("Encoding '"+t+"' is not supported.");return function(t,e,o){return function(r){try{t.encode(o+r,e.width,e.height)}catch(t){return{valid:!1,error:t}}return{valid:!0}}}(new _l[o],e,r)},Pl=Object.assign;function Ml(t,e){for(var o=[],r=0;r<t.length;)o.push(t.substring(r,r+e)),r+=e;return o}function Ol(t,e){var o=Number(t).toString(2);return o.length<e&&(o=new Array(e-o.length+1).join(0)+o),o}function Tl(t){return parseInt(t,2)}var Bl=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}(k.Class),Rl=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}(k.Class),Il=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getEncodingResult=function(t,e){var o=function(t){var e,o=[],r=0,i=t;o.push(sh(i,8,5,8,e)),e=o[0].mode,i=i.substr(o[0].modeString.length);for(;i.length>0;){var n=sh(i,17,9,16,e);n.mode!==e?(e=n.mode,o.push(n),r++):o[r].modeString+=n.modeString,i=i.substr(n.modeString.length)}return o}(t),r=ah(function(t){for(var e,o=0,r=0;r<t.length;r++)e=Vl[t[r].mode],o+=e.getStringBitsLength(t[r].modeString.length);return Math.ceil(o/8)}(o),e),i=function(t,e){for(var o,r="",i=0;i<t.length;i++)o=Vl[t[i].mode],r+=o.encode(t[i].modeString,e);return r}(o,r);return new Rl(i,r)},e}(k.Class),Ll=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(){Pl(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+Ol(t,this.getBitsCharacterCount(e))},e.prototype.encode=function(){},e.prototype.getStringBitsLength=function(){},e.prototype.getValue=function(){},e}(k.Class),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.initProperties=function(){t.prototype.initProperties.call(this),Pl(this,{bitsInCharacterCount:[10,12,14],modeIndicator:"0001"})},e.prototype.getValue=function(t){return parseInt(t,10)},e.prototype.encode=function(t,e){var o,r=Ml(t,3),i=this.getModeCountString(t.length,e);for(o=0;o<r.length-1;o++)i+=Ol(r[o],10);return i+Ol(r[o],1+3*r[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}(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.initProperties=function(){t.prototype.initProperties.call(this),Pl(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,r=Ml(t,2),i=this.getModeCountString(t.length,e);for(o=0;o<r.length-1;o++)i+=Ol(45*this.getValue(r[o].charAt(0))+this.getValue(r[o].charAt(1)),11);return i+Ol(2===r[o].length?45*this.getValue(r[o].charAt(0))+this.getValue(r[o].charAt(1)):this.getValue(r[o].charAt(0)),1+5*r[o].length)},e.prototype.getStringBitsLength=function(t,e){return 4+this.getBitsCharacterCount(e)+11*Math.floor(t/2)+t%2*6},e}(Ll),jl=function(t){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),Pl(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),r=0;r<t.length;r++)o+=Ol(this.getValue(t.charAt(r)),8);return o},e.prototype.getStringBitsLength=function(t,e){return 4+this.getBitsCharacterCount(e)+8*t},e}(Ll),Vl={};Vl.numeric=new El,Vl.alphanumeric=new Dl,Vl.byte=new jl;var zl=function(t){function e(){t.call(this),this.initProperties(),this.mode=Vl[this.encodingMode]}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){Pl(this,{encodingMode:"byte",utfBOM:"111011111011101110111111",initialModeCountStringLength:20,ranges:[128,2048,65536,2097152,67108864]})},e.prototype.getEncodingResult=function(t,e){var o=this.encode(t),r=ah(this.getDataCodewordsCount(o),e),i=this.mode.getModeCountString(o.length/8,r)+o;return new Rl(i,r)},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,r="";if(1===e)r=Ol(t,8);else{for(var i=8-e,n=0;n<o;n++)r=Ol(t>>6*n&63|128,8)+r;r=(t>>6*o|255>>i<<i).toString(2)+r}return r},e.prototype.getBytesCount=function(t){for(var e=this.ranges,o=0;o<e.length;o++)if(t<e[o])return o+1},e}(k.Class),Ul=[{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}}],Hl={1:0},Fl={0:1},Nl={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},Gl=[1,0,1,1,1],Wl=[1,0,1],Xl={L:"01",M:"00",Q:"11",H:"10"},Yl=["11101100","00010001"],ql=[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}],Ql=/^\d+/,Zl=new RegExp("^[A-Z $%*+./:-]+"),Kl=new RegExp("^[A-Z0-9 $%*+./:-]+"),$l=new RegExp("^[^A-Z0-9 $%*+./:-]+"),Jl=[[1,0],[1,25,0]];function th(t,e,o,r){for(var i=0;i<t.length;i++)t[i][o][r]=e}function eh(t,e,o,r){for(var i=0;i<ql.length;i++)t[i][o][r]=ql[i](o,r)?1^e:parseInt(e,10)}function oh(t,e){for(var o=[],r=t.length-2;r>=0;r--)o[r]=t[r]^e[r];return o}function rh(t,e){for(var o=[],r=0;r<t.length;r++)for(var i=0;i<e.length;i++)void 0===o[r+i]?o[r+i]=(t[r]+(e[i]>=0?e[i]:0))%255:o[r+i]=Hl[Fl[o[r+i]]^Fl[(t[r]+e[i])%255]];return o}function ih(t,e){var o=[],r=t.length-1;do{o[r]=Fl[(t[r]+e)%255],r--}while(void 0!==t[r]);return o}function nh(t,e){var o,r,i=Jl[e-1],n=new Array(e).concat(t),s=new Array(n.length-i.length).concat(i),a=t.length,p=[];for(r=0;r<a;r++)o=ih(s,Hl[n[n.length-1]]),s.splice(0,1),n=oh(o,n);for(r=n.length-1;r>=0;r--)p[e-1-r]=Ol(n[r],8);return p}function sh(t,e,o,r,i){var n,s,a=Ql.exec(t),p=a?a[0]:"",l=Zl.exec(t),h=l?l[0]:"",c=Kl.exec(t),u=c?c[0]:"";return p&&(p.length>=e||t.length===p.length||p.length>=o&&!Kl.test(t.charAt(p.length)))?(n="numeric",s=p):u&&(t.length===u.length||u.length>=r||"alphanumeric"===i)?(n="alphanumeric",s=p||h):(n="byte",s=u?u+$l.exec(t.substring(u.length))[0]:$l.exec(t)[0]),{mode:n,modeString:s}}function ah(t,e){var o=0,r=Ul.length-1,i=Math.floor(Ul.length/2);do{t<Ul[i][e].totalDataCodewords?r=i:o=i,i=o+Math.floor((r-o)/2)}while(r-o>1);return t<=Ul[o][e].totalDataCodewords?i+1:r+1}function ph(t,e,o){var r=Tl(e),i=e.length-1,n=t<<i,s=Ol(t,o-i),a=function(t,e){var o=e.toString(2).length,r=t.toString(2).length,i=t;do{r=(i^=e<<r-o).toString(2).length}while(r>=o);return i}(n,r);return a=s+Ol(a,i)}function lh(t,e){return parseInt(t.charAt(e),10)}function hh(t,e){var o,r,i=t[0],n=0,s=e.length;for(o=0,r=8;o<=8;o++)6!==o&&th(t,lh(e,s-1-n++),o,r);for(o=8,r=7;r>=0;r--)6!==r&&th(t,lh(e,s-1-n++),o,r);for(n=0,r=i.length-1,o=8;r>=i.length-8;r--)th(t,lh(e,s-1-n++),o,r);for(th(t,1,i.length-8,8),o=i.length-7,r=8;o<i.length;o++)th(t,lh(e,s-1-n++),o,r)}function ch(t,e){for(var o,r,i,n=t[0].length,s=n-11,a=n-11,p=0;p<e.length;p++)o=Math.floor(p/3),r=p%3,th(t,i=lh(e,e.length-p-1),0+o,s+r),th(t,i,a+r,0+o)}function uh(t,e,o,r){for(var i,n=e.length+2,s=e.length+1,a=0;a<e.length;a++)for(var p=a;p<n-a;p++)th(t,i=e[a],o+p,r+a),th(t,i,o+a,r+p),th(t,i,o+s-p,r+s-a),th(t,i,o+s-a,r+s-p)}function dh(t,e,o,r){var i=o,n=r,s=t[0];do{th(t,0,i,r),th(t,0,o,n),i+=e[0],n+=e[1]}while(i>=0&&i<s.length)}function fh(t,e,o,r,i){e[t][r]=(e[t][r]<<1^i)%128,93===e[t][r]&&(o[t]+=40)}function gh(t,e,o,r,i,n){o[t][n]===r?i[t][n]++:(o[t][n]=r,i[t][n]>=5&&(e[t]+=3+i[t][n]-5),i[t][n]=1)}function yh(t,e){var o=Math.floor(t/e*100),r=o%5,i=Math.abs(o-r-50),n=Math.abs(o+5-r-50);return 10*Math.min(i/5,n/5)}function vh(t,e,o){var r=function(t){return t&&t.toLowerCase().indexOf("utf_8")>=0?new zl:new Il}(o).getEncodingResult(t,e),i=r.version,n=Ul[i-1][e],s=function(t,e){for(var o,r,i,n,s,a=0,p=[],l=[],h=e.groups,c=0;c<h.length;c++){i=h[c][0];for(var u=0;u<i;u++){r=h[c][1],o=[],n=[];for(var d=1;d<=r;d++)s=t.substring(a,a+8),o.push(s),n[r-d]=Tl(s),a+=8;p.push(o),l.push(nh(n,e.errorCodewordsPerBlock))}}return[p,l]}(function(t,e){for(var o=8*e,r=0,i=0,n=t;n.length<o&&r<"0000".length;)n+="0000".charAt(r++);for(n.length%8!=0&&(n+=new Array(9-n.length%8).join("0"));n.length<o;)n+=Yl[i],i^=1;return n}(r.dataString,n.totalDataCodewords),n),a=function(t){for(var e=[],o=17+4*t,r=0;r<ql.length;r++){e[r]=new Array(o);for(var i=0;i<o;i++)e[r][i]=new Array(o)}return e}(i);!function(t){var e=t[0].length;uh(t,Gl,0,0),dh(t,[-1,-1],7,7),uh(t,Gl,e-7,0),dh(t,[1,-1],e-8,7),uh(t,Gl,0,e-7),dh(t,[-1,1],7,e-8)}(a),function(t,e){if(!(e<2)){var o,r,i=t[0],n=i.length,s=Math.floor(e/7),a=[6],p=0;for((o=Nl[e])?r=(n-13-o)/s:o=r=(n-13)/(s+1),a.push(a[p++]+o);a[p]+r<n;)a.push(a[p++]+r);for(var l=0;l<a.length;l++)for(var h=0;h<a.length;h++)void 0===i[a[l]][a[h]]&&uh(t,Wl,a[l]-2,a[h]-2)}}(a,i),function(t){for(var e=1,o=t[0].length,r=8;r<o-8;r++)th(t,e,6,r),th(t,e,r,6),e^=1}(a),i>=7&&ch(a,Ol(0,18)),hh(a,Ol(0,15)),function(t,e){for(var o,r,i,n=new Bl(t[0]),s=0;s<e.length;s++)for(o=e[s],r=0;o.length>0;){for(var a=0;a<o.length;a++)for(var p=0;p<8;p++)i=n.getNextCell(),eh(t,o[a][r].charAt(p),i.row,i.column);for(r++;o[0]&&r===o[0].length;)o.splice(0,1)}for(;i=n.getNextRemainderCell();)eh(t,0,i.row,i.column)}(a,s);var p=function(t){var e,o,r=[],i=[],n=[],s=[],a=[],p=t[0].length;for(o=0;o<t.length;o++)r[o]=0,n[o]=0,a[o]=[0,0],s[o]=[0,0],i[o]=[];for(var l=0;l<p;l++)for(var h=0;h<p;h++)for(var c=0;c<t.length;c++)e=t[c],n[c]+=parseInt(e[l][h],10),i[c][0]===e[l][h]&&l+1<p&&h-1>=0&&e[l+1][h]===i[c][0]&&e[l+1][h-1]===i[c][0]&&(r[c]+=3),fh(c,s,r,0,e[l][h]),fh(c,s,r,1,e[h][l]),gh(c,r,i,e[l][h],a,0),gh(c,r,i,e[h][l],a,1);var u,d=p*p,f=Number.MAX_VALUE;for(o=0;o<r.length;o++)r[o]+=yh(n[o],d),r[o]<f&&(f=r[o],u=o);return u}(a),l=a[p];return i>=7&&ch([l],function(t){return ph(t,"1111100100101",18)}(i)),hh([l],function(t){var e,o="";if(0===Tl(t))return"101010000010010";e=ph(Tl(t),"10100110111",15);for(var r=0;r<e.length;r++)o+=e.charAt(r)^"101010000010010".charAt(r);return o}(Xl[e]+Ol(p,3))),l}!function(){var t,e;for(e=1;e<255;e++)(t=2*Fl[e-1])>255&&(t^=285),Fl[e]=t,Hl[t]=e;t=2*Fl[e-1]^285,Fl[e]=t,Fl[-1]=0}(),function(){for(var t=2;t<=68;t++){var e=Jl[t-1],o=[t,0];Jl[t]=rh(e,o)}}();var mh=Math.round,xh=[[0,1],[1,1],[1,2],[2,2],[2,1],[3,1],[3,0],[2,0],[2,-1],[1,-1],[1,0]],bh=[[0,1],[1,1],[1,0]],wh=200,_h="L",Ch="#fff",kh="#000",Sh=1,Ah=7,Ph=function(t){function e(e,o,r){void 0===r&&(r=Et),t.call(this),this.options=R({},this.options,o),this.element=e,this.wrapper=this.element,this.onError=r,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(){w(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 k.drawing.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,r={width:0,height:0};return e>0&&(r.width=e),o&&(r.height=o),r},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,r,i,n=this._value,s=this.options.border||{},a=this.options.padding||0,p=s.width||0;s.width=p;var l=new k.drawing.Group;try{n&&(o=vh(n,this.options.errorCorrection,this.options.encoding),i=(r=this._getSize())-2*(p+a),t=this._calculateBaseUnit(i,o.length),e=p+a+(i-o.length*t)/2,l.append(this._renderBackground(r,s)),l.append(this._renderMatrix(o,t,e)),this._hasCustomLogo()?l.append(this._renderLogo(r,t)):this._isSwiss()&&l.append(this._renderSwissCode(r,t)))}catch(t){this.onError(t)}return l},e.prototype._renderLogo=function(t,e){var o,r=mh(t/2),i=this._getLogoSize(e*Ah),n=this.options.overlay.imageUrl,s={x:r-i.width/2,y:r-i.height/2};return o=new k.geometry.Rect(new k.geometry.Point(s.x,s.y),new k.geometry.Size(i.width,i.height)),new k.drawing.Image(n,o)},e.prototype._renderSwissCode=function(t,e){var o=this._getLogoSize(e*Ah),r=(o=Math.max(o.width,o.height))/4,i=r/2,n=t/2,s={},a=new k.drawing.Group;return s.x=s.y=Math.ceil(n-e-o/2),a.append(this._renderShape(s,Math.ceil(o+2*e),bh,"#fff")),s.x=s.y=n-o/2,a.append(this._renderShape(s,o,bh,this.options.color)),s.x=n+i-o/2,s.y=n+i+r-o/2,a.append(this._renderShape(s,r,xh,"#fff")),a},e.prototype._renderShape=function(t,e,o,r){var i=new k.drawing.MultiPath({fill:{color:r},stroke:null});i.moveTo(t.x,t.y);for(var n=0;n<o.length;n++)i.lineTo(t.x+e*o[n][0],t.y+e*o[n][1]);return i.close(),i},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:wh}return t},e.prototype._calculateBaseUnit=function(t,e){var o=Math.floor(t/e);if(o<Sh){var r=Math.ceil(e*Sh);this.onError(new Error("Insufficient size for QR Code: the current size is "+t+"px and the minimum size is "+r+"px."))}else o*e>=t&&o-1>=Sh&&o--;return o},e.prototype._renderMatrix=function(t,e,o){for(var r=new k.drawing.MultiPath({fill:{color:this.options.color},stroke:null}),i=0;i<t.length;i++)for(var n=o+i*e,s=0;s<t.length;){for(;0===t[i][s]&&s<t.length;)s++;if(s<t.length){for(var a=s;1===t[i][s];)s++;var p=mh(o+a*e),l=mh(n),h=mh(o+s*e),c=mh(n+e);r.moveTo(p,l).lineTo(p,c).lineTo(h,c).lineTo(h,l).close()}}return r},e.prototype._renderBackground=function(t,e){var o=new zt(0,0,t,t).unpad(e.width/2);return k.drawing.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=Pl(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}(k.Class);wt(Ph,{name:"QRCode",renderAs:"svg",encoding:"ISO_8859_1",value:"",errorCorrection:_h,background:Ch,color:kh,size:"",padding:0,border:{color:"",width:0},overlay:{type:"image",imageUrl:"",width:0,height:0}});var Mh=Ph;var Oh=function(t){return void 0===t&&(t="ISO_8859_1"),function(e){try{vh(e,"L",t)}catch(t){return{valid:!1,error:t}}return{valid:!0}}},Th="Arial, Helvetica, sans-serif",Bh="12px "+Th,Rh="16px "+Th,Ih=function(){return{icon:{border:{width:1}},label:{font:Bh,padding:3},line:{length:10,width:2},visible:!0}},Lh=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:Ih(),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}}},Eh=function(t){return void 0===t&&(t={}),{axisDefaults:{labels:{font:Bh},notes:Ih(),title:{font:Rh,margin:5}},categoryAxis:{majorGridLines:{visible:!0}},navigator:{pane:{height:90,margin:{top:10}}},seriesDefaults:Lh(t),title:{font:Rh},legend:{labels:{font:Bh}}}}},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=o(9);e.Barcode=r.Barcode;var i=o(15);e.QRCode=i.QRCode},function(t,e,o){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),n=this&&this.__assign||function(){return(n=Object.assign||function(t){for(var e,o=1,r=arguments.length;o<r;o++)for(var i in e=arguments[o])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},s=this&&this.__rest||function(t,e){var o={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(o[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&(o[r[i]]=t[r[i]])}return o};Object.defineProperty(e,"__esModule",{value:!0});var a=o(1),p=o(6),l=o(7),h=o(0),c=o(3),u=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.getTarget=function(){return e},e.deriveOptionsFromParent=function(t){return Object.assign({},t,{background:e.props.background,border:e.props.border,checksum:e.props.checksum,color:e.props.color,height:e.props.height,padding:e.props.padding,text:e.props.text,type:e.props.type,value:e.props.value,width:e.props.width})},e}return i(e,t),Object.defineProperty(e.prototype,"barcodeInstance",{get:function(){return null!==this._baseBarcode?this._baseBarcode.barcodeInstance:null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"surface",{get:function(){return null!==this._baseBarcode?this._baseBarcode.surface:null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"element",{get:function(){return null!==this._baseBarcode?this._baseBarcode.element:null},enumerable:!0,configurable:!0}),e.prototype.render=function(){var t=this,e=this.props,o=e.children,r=e.className,i=s(e,["children","className"]);return a.createElement(p.BaseBarcode,n({},i,{deriveOptionsFromParent:this.deriveOptionsFromParent,ref:function(e){return t._baseBarcode=e},barcodeConstructor:l.Barcode,getTarget:this.getTarget,className:c.classNames("k-barcode",r)}),o)},e.prototype.exportImage=function(t){return void 0===t&&(t={}),h.exportImage(this.exportVisual(),t)},e.prototype.exportSVG=function(t){return void 0===t&&(t={}),h.exportSVG(this.exportVisual(),t)},e.prototype.exportVisual=function(t){return null!==this.barcodeInstance?this.barcodeInstance.exportVisual(t):new h.Group},e}(a.Component);e.Barcode=u},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=o(3);e.THROTTLE_MS=1e3/60;e.default=function(t){var o,i,n=[],s=function(s){o=t(o,s),r.canUseDOM&&(window.clearTimeout(i),i=window.setTimeout((function(){return n.forEach((function(t){return t()}))}),e.THROTTLE_MS))};return s({}),{getState:function(){return o},dispatch:s,subscribe:function(t){return n.push(t),function(){return n=n.filter((function(e){return e!==t}))}}}}},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.optionsReducer=function(t,e){return e.barcodeKey?r.configurationItem(t,e):{}};e.observersReducer=function(t,e){if(!e.type)return[];switch(e.type){case"add":return t.concat([e.payload]);case"remove":return t.filter((function(t){return t!==e.payload}));default:return t}};var r={configurationItem:function(t,e){var o;return Object.assign(t,((o={})[e.barcodeKey]=e.payload,o))}}},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(t){return"object"==typeof t},i=function(t,e){if(Object.keys(t).length!==Object.keys(e).length)return!0;for(var o in t)if(t.hasOwnProperty(o)){var n=t[o],s=e[o];if(r(n)&&r(s)?i(n,s):n!==s)return!0}return!1};e.isOptionsChanged=function(t,e){if(!t||!e)return!0;if(t=[].concat(t),e=[].concat(e),t.length!==e.length)return!0;for(var o=0;o<t.length;o++)if(i(t[o],e[o]))return!0;return!1}},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=o(1);e.BarcodeContext=r.createContext(null),e.BarcodeContext.displayName="BarcodeContext"},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.packageMetadata={name:"@progress/kendo-react-barcodes",productName:"KendoReact",productCodes:["KENDOUIREACT","KENDOUICOMPLETE"],publishDate:1645530767,version:"",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/my-license/?utm_medium=product&utm_source=kendoreact&utm_campaign=kendo-ui-react-purchase-license-keys-warning"}},function(t,e,o){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),n=this&&this.__assign||function(){return(n=Object.assign||function(t){for(var e,o=1,r=arguments.length;o<r;o++)for(var i in e=arguments[o])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},s=this&&this.__rest||function(t,e){var o={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(o[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&(o[r[i]]=t[r[i]])}return o};Object.defineProperty(e,"__esModule",{value:!0});var a=o(1),p=o(6),l=o(7),h=o(0),c=o(3),u=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.getTarget=function(){return e},e.deriveOptionsFromParent=function(t){return Object.assign({},t,{background:e.props.background||"#fff",border:e.props.border,color:e.props.color||"#000",encoding:e.props.encoding,errorCorrection:e.props.errorCorrection||"L",overlay:e.props.overlay||{},padding:e.props.padding,renderAs:e.props.renderAs,size:e.props.size,value:e.props.value})},e}return i(e,t),Object.defineProperty(e.prototype,"barcodeInstance",{get:function(){return null!==this._baseBarcode?this._baseBarcode.barcodeInstance:null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"surface",{get:function(){return null!==this._baseBarcode?this._baseBarcode.surface:null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"element",{get:function(){return null!==this._baseBarcode?this._baseBarcode.element:null},enumerable:!0,configurable:!0}),e.prototype.render=function(){var t=this,e=this.props,o=e.children,r=e.className,i=s(e,["children","className"]);return a.createElement(p.BaseBarcode,n({},i,{deriveOptionsFromParent:this.deriveOptionsFromParent,ref:function(e){return t._baseBarcode=e},barcodeConstructor:l.QRCode,getTarget:this.getTarget,className:c.classNames("k-qrcode",r)}),o)},e.prototype.exportImage=function(t){return void 0===t&&(t={}),h.exportImage(this.exportVisual(),t)},e.prototype.exportSVG=function(t){return void 0===t&&(t={}),h.exportSVG(this.exportVisual(),t)},e.prototype.exportVisual=function(t){return null!==this.barcodeInstance?this.barcodeInstance.exportVisual(t):new h.Group},e}(a.Component);e.QRCode=u}])}));
1
+ !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("@progress/kendo-drawing"),require("react"),require("prop-types"),require("@progress/kendo-licensing")):"function"==typeof define&&define.amd?define(["@progress/kendo-drawing","react","prop-types","@progress/kendo-licensing"],e):"object"==typeof exports?exports.KendoReactBarcodes=e(require("@progress/kendo-drawing"),require("react"),require("prop-types"),require("@progress/kendo-licensing")):t.KendoReactBarcodes=e(t.KendoDrawing,t.React,t.PropTypes,t.KendoLicensing)}(window,(function(t,e,o,i){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=8)}([function(e,o){e.exports=t},function(t,o){t.exports=e},function(t,e){t.exports=o},function(t,e,o){"use strict";o.r(e),o.d(e,"ZIndexContext",(function(){return r})),o.d(e,"useZIndexContext",(function(){return n})),o.d(e,"BrowserSupportService",(function(){return a})),o.d(e,"canUseDOM",(function(){return p})),o.d(e,"canUseRef",(function(){return l})),o.d(e,"classNames",(function(){return h})),o.d(e,"cloneDate",(function(){return c})),o.d(e,"clone",(function(){return u})),o.d(e,"cloneObject",(function(){return d})),o.d(e,"cloneValue",(function(){return f})),o.d(e,"cloneArray",(function(){return g})),o.d(e,"focusFirstFocusableChild",(function(){return y})),o.d(e,"FormComponent",(function(){return v})),o.d(e,"getTabIndex",(function(){return m})),o.d(e,"getter",(function(){return w})),o.d(e,"guid",(function(){return C})),o.d(e,"Keys",(function(){return k})),o.d(e,"noop",(function(){return S})),o.d(e,"getScrollbarWidth",(function(){return A})),o.d(e,"setScrollbarWidth",(function(){return P})),o.d(e,"setter",(function(){return M})),o.d(e,"mapTree",(function(){return B})),o.d(e,"mapTreeItem",(function(){return L})),o.d(e,"extendDataItem",(function(){return I})),o.d(e,"getItemPath",(function(){return D})),o.d(e,"validatePackage",(function(){return z})),o.d(e,"hasRelativeStackingContext",(function(){return V})),o.d(e,"dispatchEvent",(function(){return H})),o.d(e,"AsyncFocusBlur",(function(){return F})),o.d(e,"createPropsContext",(function(){return X})),o.d(e,"withPropsContext",(function(){return Y})),o.d(e,"useDir",(function(){return q})),o.d(e,"useAsyncFocusBlur",(function(){return N})),o.d(e,"useRtl",(function(){return Z})),o.d(e,"useMouse",(function(){return K})),o.d(e,"useCustomComponent",(function(){return $})),o.d(e,"usePropsContext",(function(){return G})),o.d(e,"COLLECTION_ACTION",(function(){return Q})),o.d(e,"useCollection",(function(){return J})),o.d(e,"Icon",(function(){return rt})),o.d(e,"SvgIcon",(function(){return pt})),o.d(e,"Typography",(function(){return _t})),o.d(e,"DragAndDrop",(function(){return Tt})),o.d(e,"Draggable",(function(){return Nt})),o.d(e,"Droppable",(function(){return Ft})),o.d(e,"useDraggable",(function(){return Ht})),o.d(e,"useDroppable",(function(){return Ut})),o.d(e,"kendoThemeMaps",(function(){return Gt}));var i=o(1),r=i.createContext(0),n=function(){return i.useContext(r)};r.displayName="KendoReactZIndexContext";var s=function(){return"undefined"!=typeof document?document:{}},a=function(){function t(){}return Object.defineProperty(t.prototype,"scrollbarWidth",{get:function(){var t=s();if(!this.scrollbar&&t&&t.createElement){var e=t.createElement("div");e.style.cssText="overflow:scroll;overflow-x:hidden;zoom:1;clear:both;display:block",e.innerHTML="&nbsp;",t.body.appendChild(e),this.scrollbar=e.offsetWidth-e.scrollWidth,t.body.removeChild(e)}return this.scrollbar},enumerable:!0,configurable:!0}),t}(),p=Boolean("undefined"!=typeof window&&window.document&&window.document.createElement),l=function(t){return"string"!=typeof Comment&&(function(t){return Boolean("function"==typeof t&&!!t.prototype.isReactComponent)}(t)||function(t){return Boolean(t.$$typeof&&"function"==typeof t.render)}(t))},h=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var o={},i=function(t){return"object"==typeof t?Object.keys(t).forEach((function(e){o[e]=t[e]})):o[t]=!0},r=function(t){return t.filter((function(t){return!0!==t&&!!t})).map((function(t){return Array.isArray(t)?r(t):i(t)}))};return r(t),Object.keys(o).map((function(t){return o[t]&&t||null})).filter((function(t){return null!==t})).join(" ")},c=function(t){return t?new Date(t.getTime()):null};function u(t){var e={};return d(t,e),e}function d(t,e){for(var o in t)if(t.hasOwnProperty(o)){var i=t[o];e[o]=f(i,e[o])}}function f(t,e){if(Array.isArray(t))return g(t);if(t instanceof Date)return c(t);if(i.isValidElement(t))return i.cloneElement(t,t.props);if(t&&"object"==typeof t){var o=e||{};return d(t,o),o}return t}function g(t){return t.map((function(t){return f(t,void 0)}))}var y=function(t){if(t){if((t instanceof HTMLInputElement||-1!==t.tabIndex)&&t.focus)return void t.focus();var e=t.querySelector('input, [tabindex]:not([tabindex="-1"])');e&&e.focus&&e.focus()}},v=function(){},m=function(t,e,o){var i="string"==typeof t?parseInt(t,void 0):t;if(NaN!==i)return void 0!==i?i:e?o?void 0:-1:0},x=/\[(?:(\d+)|['"](.*?)['"])\]|((?:(?!\[.*?\]|\.).)+)/g;function b(t){var e=[];return t.replace(x,(function(t,o,i,r){e.push(void 0!==o?o:i||r)})),e}var _={};function w(t){if(_[t])return _[t];var e=b(t);return _[t]=function(t){for(var o=t,i=0;i<e.length&&o;i++)o=o[e[i]];return o},_[t]}_.undefined=function(){};var C=function(){var t,e,o="";for(t=0;t<32;t++)e=16*Math.random()|0,8!==t&&12!==t&&16!==t&&20!==t||(o+="-"),o+=(12===t?4:16===t?3&e|8:e).toString(16);return o},k={backspace:8,tab:9,enter:13,shift:16,esc:27,space:32,pageUp:33,pageDown:34,end:35,home:36,left:37,up:38,right:39,down:40,delete:46},S=function(){},A=function(){return!(!p||!document.body)&&(new a).scrollbarWidth},P=function(){if(!p||!document.body)return!1;var t=(new a).scrollbarWidth;document.body.style.setProperty("--kendo-scrollbar-width",t+"px")},T={undefined:function(t){return t}},O=function(t,e){return e&&e.arrays&&!isNaN(Number(t))?[]:{}};function M(t){if(T[t])return T[t];var e=b(t);return T[t]=function(t,o,i){for(var r=t,n=e.length-1,s=0;s<n&&r;s++)r=r[e[s]]=r[e[s]]||O(e[s+1],i);r[e[n]]=o},T[t]}var E=function(){return(E=Object.assign||function(t){for(var e,o=1,i=arguments.length;o<i;o++)for(var r in e=arguments[o])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)};function R(t,e,o){var i;return o?E({},t,((i={})[e]=o.length?o.slice():void 0,i)):t&&t[e]?t[e].slice():[]}var B=function(t,e,o){return t.map((function(t){return function t(e,o,i){if(e[o]){var r=R(e,o).map((function(e){return t(e,o,i)}));return i(R(e,o,r))}return i(e)}(t,e,o)})).slice()},L=function(t,e,o,i){for(var r=t,n=[],s=0;s<e.length;s++)r=r[e[s]],r=Array.isArray(r)?r:r[o],n.push(r);var a=n.length>1?n[n.length-2]:t,p=e[e.length-1],l=i(a[p]);a.splice(p,1,l)},I=function(t,e,o){var i;return Object.assign({},t,t[e]?((i={})[e]=t[e].slice(),i):{},o||{})},D=function(t,e,o){var i=[],r=e.slice();if(r.length){var n=t[r.shift()||0];for(i.push(n);r.length&&o;)n=n[o][r.shift()||0],i.push(n)}return i},j=o(4);function z(t){if(void 0!==j)j.validatePackage(t);else{var e="License activation failed for "+t.name+"\n";e+="The @progress/kendo-licensing script is not loaded.\n",e+="See "+t.licensingDocsUrl+" for more information.\n",console.warn(e)}}var V=function(t){if(!p)return!1;var e=t?t.ownerDocument:document;if(!e||!e.body)return!1;var o=e.createElement("div");o.style.transform="matrix(10, 0, 0, 10, 0, 0)",o.innerHTML='<div style="position: fixed; top: 10px;">child</div>',e.body.appendChild(o);var i=10!==o.children[0].getBoundingClientRect().top;return e.body.removeChild(o),i};function H(t,e,o,i){if(t){var r={syntheticEvent:e,nativeEvent:e.nativeEvent,target:o};t.call(void 0,Object.assign(r,i))}}function N(t){var e=t.onFocus,o=t.onBlur,r=t.onSyncFocus,n=t.onSyncBlur,s=i.useRef(!1),a=i.useRef(0),p=i.useCallback((function(t){clearTimeout(a.current),a.current=window.setTimeout((function(){return t()}))}),[a]),l=i.useCallback((function(){for(var t=[],o=0;o<arguments.length;o++)t[o]=arguments[o];clearTimeout(a.current),r&&r.call.apply(r,[void 0].concat(t)),s.current||(s.current=!0,e&&e.call.apply(e,[void 0].concat(t)))}),[s,e,r]),h=i.useCallback((function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];n&&n.call.apply(n,[void 0].concat(t)),p((function(){s.current&&o&&(s.current=!1,o.call.apply(o,[void 0].concat(t)))}))}),[s,p,o,n]);return i.useEffect((function(){return function(){clearTimeout(a.current)}}),[]),{onFocus:l,onBlur:h}}var U=function(){return(U=Object.assign||function(t){for(var e,o=1,i=arguments.length;o<i;o++)for(var r in e=arguments[o])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},F=function(t){var e=t.children,o=N({onFocus:t.onFocus,onBlur:t.onBlur,onSyncFocus:t.onSyncFocus,onSyncBlur:t.onSyncBlur});return e.call(void 0,U({},o))},G=function(t,e){return i.useContext(t)(e)},W=function(){return(W=Object.assign||function(t){for(var e,o=1,i=arguments.length;o<i;o++)for(var r in e=arguments[o])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},X=function(){return i.createContext((function(t){return t}))},Y=function(t,e){return i.forwardRef((function(o,r){var n=G(t,o);return i.createElement(e,W({},n,{ref:r}))}))};function q(t,e,o){var r=i.useState(e),n=r[0],s=r[1];return i.useEffect((function(){if(!n&&window&&t.current){var e=window.getComputedStyle(t.current).direction;e&&s(e)}}),o),n}function Z(t,e,o){var r=i.useState(e),n=r[0],s=r[1];return i.useEffect((function(){if(!n&&window&&t.current){var e=window.getComputedStyle(t.current).direction;e&&s(e)}}),o),n}var Q,K=function(t,e,o){void 0===o&&(o={});var r=i.useCallback((function(i){o.onMouseDown&&o.onMouseDown.call(void 0,i),t.onMouseDown&&t.onMouseDown.call(void 0,{target:e.current,syntheticEvent:i})}),[o.onMouseDown,t.onMouseDown,e]),n=i.useCallback((function(i){o.onMouseUp&&o.onMouseUp.call(void 0,i),t.onMouseUp&&t.onMouseUp.call(void 0,{target:e.current,syntheticEvent:i})}),[o.onMouseUp,t.onMouseUp,e]);return{onClick:i.useCallback((function(i){o.onClick&&o.onClick.call(void 0,i),t.onClick&&t.onClick.call(void 0,{target:e.current,syntheticEvent:i})}),[o.onClick,t.onClick,e]),onMouseUp:n,onMouseDown:r,onDoubleClick:i.useCallback((function(i){o.onDoubleClick&&o.onDoubleClick.call(void 0,i),t.onDoubleClick&&t.onDoubleClick.call(void 0,{target:e.current,syntheticEvent:i})}),[o.onDoubleClick,t.onDoubleClick,e]),onMouseEnter:i.useCallback((function(i){o.onMouseEnter&&o.onMouseEnter.call(void 0,i),t.onMouseEnter&&t.onMouseEnter.call(void 0,{target:e.current,syntheticEvent:i})}),[o.onMouseEnter,t.onMouseEnter,e]),onMouseLeave:i.useCallback((function(i){o.onMouseLeave&&o.onMouseLeave.call(void 0,i),t.onMouseLeave&&t.onMouseLeave.call(void 0,{target:e.current,syntheticEvent:i})}),[o.onMouseLeave,t.onMouseLeave,e]),onMouseMove:i.useCallback((function(i){o.onMouseMove&&o.onMouseMove.call(void 0,i),t.onMouseMove&&t.onMouseMove.call(void 0,{target:e.current,syntheticEvent:i})}),[o.onMouseMove,t.onMouseMove,e]),onMouseOut:i.useCallback((function(i){o.onMouseOut&&o.onMouseOut.call(void 0,i),t.onMouseOut&&t.onMouseOut.call(void 0,{target:e.current,syntheticEvent:i})}),[o.onMouseOut,t.onMouseOut,e]),onMouseOver:i.useCallback((function(i){o.onMouseOver&&o.onMouseOver.call(void 0,i),t.onMouseOver&&t.onMouseOver.call(void 0,{target:e.current,syntheticEvent:i})}),[o.onMouseOver,t.onMouseOver,e])}},$=function(t){return i.isValidElement(t)?[t.type,t.props]:[t,{}]};!function(t){t[t.add=0]="add",t[t.remove=1]="remove"}(Q||(Q={}));var J=function(t){void 0===t&&(t=[]);var e=i.useRef(t),o=i.useCallback((function(t){switch(t.type){case Q.add:e.current.push(t.item);break;case Q.remove:var o=e.current.indexOf(t.item);e.current.splice(o,1)}}),[]);return[e.current,o]},tt=o(2),et={default:"",xsmall:"k-icon-xs",small:"k-icon-sm",medium:"k-icon-md",large:"k-icon-lg",xlarge:"k-icon-xl"},ot=function(){return(ot=Object.assign||function(t){for(var e,o=1,i=arguments.length;o<i;o++)for(var r in e=arguments[o])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},it=function(t,e){var o={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(o[i]=t[i]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(t);r<i.length;r++)e.indexOf(i[r])<0&&(o[i[r]]=t[i[r]])}return o},rt=i.forwardRef((function(t,e){var o=t.className,r=t.name,n=t.themeColor,s=t.size,a=t.flip,p=t.style,l=it(t,["className","name","themeColor","size","flip","style"]),c=i.useRef(null),u=i.useRef(null);i.useImperativeHandle(c,(function(){return{element:u.current}})),i.useImperativeHandle(e,(function(){return c.current}));var d=i.useMemo((function(){return n||nt.themeColor}),[n]),f=i.useMemo((function(){return s||nt.size}),[s]),g=i.useMemo((function(){return a||nt.flip}),[a]),y=i.useMemo((function(){return h("k-icon","k-i-"+r,"k-color-"+d,{"k-flip-h":"horizontal"===g||"both"===g,"k-flip-v":"vertical"===g||"both"===g},et[f],o)}),[r,d,f,g,o]),v=K(t,c);return i.createElement("span",ot({ref:u},l,v,{className:y,style:p,role:"presentation"}))}));rt.propTypes={style:tt.object,classNames:tt.string,name:tt.string,themeColor:tt.oneOf(["inherit","primary","secondary","tertiary","info","success","error","warning","dark","light","inverse"]),size:tt.oneOf(["default","xsmall","small","medium","large","xlarge"]),flip:tt.oneOf(["default","horizontal","vertical","both"])};var nt={size:"default",themeColor:"inherit",flip:"default"};rt.displayName="KendoIcon";var st=function(){return(st=Object.assign||function(t){for(var e,o=1,i=arguments.length;o<i;o++)for(var r in e=arguments[o])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},at=function(t,e){var o={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(o[i]=t[i]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(t);r<i.length;r++)e.indexOf(i[r])<0&&(o[i[r]]=t[i[r]])}return o},pt=i.forwardRef((function(t,e){var o=t.children,r=t.className,n=t.svgClassName,s=t.icon,a=t.flip,p=t.size,l=t.style,c=t.svgStyle,u=t.themeColor,d=t.viewBox,f=at(t,["children","className","svgClassName","icon","flip","size","style","svgStyle","themeColor","viewBox"]),g=i.useRef(null);i.useImperativeHandle(e,(function(){return{element:g.current}}));var y=i.useMemo((function(){return s?s.name:lt.icon}),[s]),v=i.useMemo((function(){return u||lt.themeColor}),[u]),m=i.useMemo((function(){return p||lt.size}),[p]),x=i.useMemo((function(){return a||lt.flip}),[a]),b=i.useMemo((function(){return d||lt.viewBox}),[d]),_=i.useMemo((function(){return h("k-svg-icon","k-color-"+v,"k-svg-i-"+y,{"k-flip-h":"horizontal"===x||"both"===x,"k-flip-v":"vertical"===x||"both"===x},et[m],r)}),[y,v,m,x,r]),w=i.useMemo((function(){return t.width&&t.height?st({width:t.width,height:t.height},l):t.width?st({width:t.width,height:t.width},l):t.height?st({width:t.height,height:t.height},l):st({},l)}),[t.width,t.height,l]);return i.createElement("span",{className:_,style:w,ref:g},i.createElement("svg",st({className:n,style:c,"aria-hidden":!0,focusable:"false",xmlns:"http://www.w3.org/2000/svg",viewBox:s?s.viewBox:b,dangerouslySetInnerHTML:s?{__html:s.content}:void 0},f),s?void 0:o))}));pt.propTypes={style:tt.object,classNames:tt.string,children:tt.any,icon:tt.object,themeColor:tt.oneOf(["inherit","primary","secondary","tertiary","info","success","error","warning","dark","light","inverse"]),size:tt.oneOf(["default","xsmall","small","medium","large","xlarge"]),flip:tt.oneOf(["default","horizontal","vertical","both"])};var lt={size:"default",themeColor:"inherit",flip:"default",icon:"",viewBox:"0 0 24 24"};pt.displayName="KendoSvgIcon";var ht={xsmall:"k-fs-xs",small:"k-fs-sm",medium:"k-fs-md",large:"k-fs-lg",xlarge:"k-fs-xl"},ct={light:"k-font-weight-light",normal:"k-font-weight-normal",bold:"k-font-weight-bold"},ut={xsmall:"k-m-xs",small:"k-m-sm",medium:"k-m-md",large:"k-m-lg",xlarge:"k-m-xl",thin:"k-m-thin",hair:"k-m-hair"},dt={xsmall:"xs",small:"sm",medium:"md",large:"lg",xlarge:"xl",thin:"thin",hair:"hair"},ft={top:"k-mt-",right:"k-mr-",bottom:"k-mb-",left:"k-ml-"},gt={left:"k-text-left",right:"k-text-right",center:"k-text-center",justify:"k-text-justify"},yt={lowercase:"k-text-lowercase",uppercase:"k-text-uppercase",capitalize:"k-text-capitalize"},vt={inherit:"k-color-inherit",primary:"k-color-primary",secondary:"k-color-secondary",tertiary:"k-color-tertiary",info:"k-color-info",success:"k-color-success",warning:"k-color-warning",error:"k-color-error",dark:"k-color-dark",light:"k-color-light",inverse:"k-color-inverse"},mt=function(){return(mt=Object.assign||function(t){for(var e,o=1,i=arguments.length;o<i;o++)for(var r in e=arguments[o])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},xt=function(t,e){var o={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(o[i]=t[i]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(t);r<i.length;r++)e.indexOf(i[r])<0&&(o[i[r]]=t[i[r]])}return o},bt=function(t){var e=i.forwardRef((function(e,o){var r=e.className,n=e.fontSize,s=e.fontWeight,a=e.textAlign,p=e.textTransform,l=e.themeColor,h=e.margin,c=xt(e,["className","fontSize","fontWeight","textAlign","textTransform","themeColor","margin"]),u=i.useRef(null),d=i.useRef(null);i.useImperativeHandle(u,(function(){return{element:d.current,props:e}})),i.useImperativeHandle(o,(function(){return u.current}));var f=t,g=function(){if(void 0!==h){if("string"==typeof h)return[ut[h]];if("number"==typeof h&&h>=0&&h<=24)return["k-m-"+h];if("object"==typeof h){var t=[];return Object.keys(h).forEach((function(e){var o,i;null!==h[e]&&void 0!==h[e]&&t.push((o=e,i=h[e],""+ft[o]+("string"==typeof i?dt[i]:i)))})),t.join(" ")}}};return i.createElement(f,mt({ref:d,className:["k-"+("p"===t?"paragraph":t),ht[n],ct[s],gt[a],yt[p],vt[l],g(),r].filter((function(t){return void 0!==t})).join(" ")},c),e.children)}));return e.propTypes={style:tt.object,className:tt.string,fontSize:tt.oneOf(["xsmall","small","medium","large","xlarge"]),fontWeight:tt.oneOf(["light","normal","bold"]),margin:tt.oneOfType([tt.number,tt.object,tt.oneOf(["xsmall","small","medium","large","xlarge","thin","hair"])]),textAlign:tt.oneOf(["left","right","center","justify"]),textTransform:tt.oneOf(["lowercase","uppercase","capitalize"]),themeColor:tt.oneOf(["inherit","primary","secondary","tertiary","info","success","error","warning","dark","light","inverse"])},e.displayName="KendoReactTypography"+t.toUpperCase(),e},_t={h1:bt("h1"),h2:bt("h2"),h3:bt("h3"),h4:bt("h4"),h5:bt("h5"),h6:bt("h6"),p:bt("p"),code:bt("code"),pre:bt("pre")},wt=function(){return(wt=Object.assign||function(t){for(var e,o=1,i=arguments.length;o<i;o++)for(var r in e=arguments[o])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},Ct=function(t,e,o){var r=i.useState(e||t),n=r[0],s=r[1];return[void 0!==e?e:n,i.useCallback((function(t,e){s(t),o&&o.call(void 0,wt({},e,{value:t}))}),[o,s])]},kt=i.createContext([void 0,S]),St=i.createContext([void 0,S]),At=i.createContext([[],S,S]),Pt=i.createContext([[],S,S]),Tt=function(t){var e=Ct(null,void 0),o=e[0],r=e[1],n=Ct(null,void 0),s=n[0],a=n[1],p=J([]),l=p[0],h=p[1],c=J([]),u=c[0],d=c[1];return i.createElement(kt.Provider,{value:[o,r]},i.createElement(St.Provider,{value:[s,a]},i.createElement(At.Provider,{value:[l,function(t){h({type:Q.add,item:t})},function(t){h({type:Q.remove,item:t})}]},i.createElement(Pt.Provider,{value:[u,function(t){d({type:Q.add,item:t})},function(t){d({type:Q.remove,item:t})}]},t.children))))};Tt.displayName="KendoReactDragAndDrop";var Ot,Mt=function(t,e){var o=0,i=null;return e.forEach((function(e){if(e&&t){var r=function(t,e){var o=t.getBoundingClientRect(),i=e.getBoundingClientRect(),r=Math.max(i.top,o.top),n=Math.max(i.left,o.left),s=Math.min(i.left+i.width,o.left+o.width),a=Math.min(i.top+i.height,o.top+o.height),p=s-n,l=a-r;if(n<s&&r<a){var h=i.width*i.height,c=o.width*o.height,u=p*l;return Number((u/(h+c-u)).toFixed(4))}return 0}(t,e);r>o&&(o=r,i=e)}})),i},Et=function(){var t=window&&window.navigator.userAgent;if(!t)return!1;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.DOCUMENT_NODE||o[2],10);break}return e},Rt=function(t){return t&&t.ownerDocument||window.document},Bt=function(t){var e=Et(),o=Rt(t);return e.edge||e.safari?o.body:o.documentElement},Lt=function(t){if(t&&t.className&&"string"==typeof t.className&&t.className.indexOf("k-auto-scrollable")>-1)return!0;var e=window.getComputedStyle(t,"overflow").overflow;return e.indexOf("auto")>-1||e.indexOf("scroll")>-1},It=function(t){var e=Bt(t);if(!t||t===document.body||t===document.documentElement)return e;for(var o=t;o&&!Lt(o)&&o!==document.body;)o=o.parentNode;return o===document.body?e:o};!function(t){t.POINTER_DOWN="pointerdown",t.POINTER_MOVE="pointermove",t.POINTER_UP="pointerup",t.POINTER_CANCEL="pointercancel",t.MOUSE_DOWN="mousedown",t.MOUSE_MOVE="mousemove",t.MOUSE_UP="mouseup",t.CONTEXT_MENU="contextmenu",t.TOUCH_START="touchstart",t.TOUCH_MOVE="touchmove",t.TOUCH_END="touchend",t.TOUCH_CANCEL="touchcancel",t.SCROLL="scroll",t.START="KENDO_DRAG_AND_DROP_START",t.MOVE="KENDO_DRAG_AND_DROP_MOVE",t.END="KENDO_DRAG_AND_DROP_END",t.CANCEL="KENDO_DRAG_AND_DROP_CANCEL"}(Ot||(Ot={}));var Dt=function(){},jt=function(t,e,o){void 0===o&&(o={});var i,r,n,s,a=o.onIsPressedChange,p=void 0===a?Dt:a,l=o.onIsScrollingChange,h=void 0===l?Dt:l,c=o.onVelocityChange,u=void 0===c?Dt:c,d=o.onOffsetChange,f=void 0===d?Dt:d,g=o.onPageOffsetChange,y=void 0===g?Dt:g,v=o.onClientOffsetChange,m=void 0===v?Dt:v,x=o.onScrollOffsetChange,b=void 0===x?Dt:x,_=o.onInitialScrollOffsetChange,w=void 0===_?Dt:_,C=e.payload,k=C.element,S=C.hint,A=t.autoScrollDirection,P=t.scrollableParent,T=function(t,e){return function(t){return/^touch/.test(t.type)}(t)?{pageX:t.changedTouches[0].pageX,pageY:t.changedTouches[0].pageY,clientX:t.changedTouches[0].clientX,clientY:t.changedTouches[0].clientY,scrollX:e.scrollOffset.x,scrollY:e.scrollOffset.y,offsetX:e.offset.x,offsetY:e.offset.y,type:t.type,originalEvent:t,isTouch:!0,altKey:!1,ctrlKey:!1,shiftKey:!1,metaKey:!1}:function(t){return/^(scroll)/.test(t.type)}(t)?{pageX:e.pageOffset.x,pageY:e.pageOffset.y,clientX:e.clientOffset.x,clientY:e.clientOffset.y,scrollX:e.scrollOffset.x,scrollY:e.scrollOffset.y,offsetX:e.offset.x,offsetY:e.offset.y,type:t.type,originalEvent:t,altKey:!1,ctrlKey:!1,shiftKey:!1,metaKey:!1}:{pageX:t.pageX,pageY:t.pageY,clientX:t.clientX,clientY:t.clientY,offsetX:t.offsetX,offsetY:t.offsetY,scrollX:e.scrollOffset.x,scrollY:e.scrollOffset.y,type:t.type,ctrlKey:t.ctrlKey,shiftKey:t.shiftKey,altKey:t.altKey,metaKey:t.metaKey,originalEvent:t}}(e.event,t);switch(T.type){case Ot.POINTER_DOWN:if(T.type===Ot.POINTER_DOWN&&(!T.originalEvent.isPrimary||0!==T.originalEvent.button))break;case Ot.MOUSE_DOWN:if(T.type===Ot.MOUSE_DOWN&&T.originalEvent.which&&T.originalEvent.which>1||t.ignoreMouse)break;case Ot.TOUCH_START:if(T.type===Ot.TOUCH_START&&1!==T.originalEvent.touches.length)break;case Ot.START:var O=P||It(e.payload.element);w(O instanceof Window?{x:O.scrollX,y:O.scrollY}:{x:O.scrollLeft,y:O.scrollTop}),m({x:T.clientX,y:T.clientY}),y({x:T.pageX,y:T.pageY}),f({x:T.offsetX,y:T.offsetY}),p(!0),C.onPress&&C.onPress(T);break;case Ot.SCROLL:if(T.type===Ot.SCROLL&&!t.pressed)break;var M=P||It(k),E=M instanceof Window?{x:M.scrollX,y:M.scrollY}:{x:M.scrollLeft,y:M.scrollTop};T.scrollX=E.x-t.initialScrollOffset.x,T.scrollY=E.y-t.initialScrollOffset.y,b({x:T.scrollX,y:T.scrollY});case Ot.POINTER_MOVE:if(T.type===Ot.POINTER_MOVE&&!T.originalEvent.isPrimary)break;case Ot.MOUSE_MOVE:case Ot.TOUCH_MOVE:if(T.type===Ot.TOUCH_MOVE&&1!==T.originalEvent.touches.length)break;case Ot.MOVE:if(t.pressed){if(t.autoScroll&&"scroll"!==T.originalEvent.type&&k){var R=Rt(k),B=P||It(R.elementFromPoint(T.clientX,T.clientY)),L=function(t,e,o){var i={x:0,y:0};return t-o.left<50?i.x=-(50-(t-o.left)):o.right-t<50&&(i.x=50-(o.right-t)),e-o.top<50?i.y=-(50-(e-o.top)):o.bottom-e<50&&(i.y=50-(o.bottom-e)),i}(T.pageX,T.pageY,function(t,e){var o=Bt(t);if(t===o)return{top:o.scrollTop,left:o.scrollLeft,bottom:o.scrollTop+e.innerHeight,right:o.scrollLeft+e.innerWidth};var i=t.getBoundingClientRect();return{bottom:i.top+i.height,right:i.left+i.width,left:i.left,top:i.top}}(B,function(t){var e=Rt(t);return e&&e.defaultView||window}(k)));u({x:A&&!1===A.horizontal?0:L.x,y:A&&!1===A.vertical?0:L.y}),h(0!==L.y||0!==L.x)}!t.drag&&C.onDragStart&&C.onDragStart(T),C.onDrag&&C.onDrag(T);var I=Mt(S||k,t.drops.map((function(t){return t&&t.element})).filter((function(t){return t!==(S||k)}))),D=t.drops.find((function(t){return t.element===I}));D&&I&&(i=T.clientX,r=T.clientY,n=P||It(I),(s=n.getBoundingClientRect()).top<=r&&s.left<=i&&r<=s.bottom&&i<=s.right)&&I!==k?(t.drop&&t.drop.element)!==I?(t.drop&&t.drop.onDragLeave&&t.drop.onDragLeave(T),D.onDragEnter&&D.onDragEnter(T)):D.onDragOver&&D.onDragOver(T):t.drop&&t.drop.onDragLeave&&t.drop.onDragLeave(T)}m({x:T.clientX,y:T.clientY}),y({x:T.pageX,y:T.pageY});break;case Ot.POINTER_UP:if(T.type===Ot.POINTER_UP&&!T.originalEvent.isPrimary)break;case Ot.MOUSE_UP:case Ot.TOUCH_END:if(T.type===Ot.TOUCH_END&&1!==T.originalEvent.touches.length)break;case Ot.END:p(!1),h(!1),C.onRelease&&C.onRelease(T),t.drop&&t.drop.onDrop&&t.drop.onDrop(T),C.onDragEnd&&C.onDragEnd(T);break;case Ot.POINTER_CANCEL:case Ot.CONTEXT_MENU:case Ot.TOUCH_CANCEL:case Ot.CANCEL:p(!1),h(!1),C.onDragEnd&&C.onDragEnd(T),t.drop&&t.drop.onDragLeave&&t.drop.onDragLeave(T)}},zt=function(t,e){if(t){var o,i;t===Bt(t)?(o=document.body.scrollHeight>window.innerHeight,i=document.body.scrollWidth>window.innerWidth):(o=t.offsetHeight<=t.scrollHeight,i=t.offsetWidth<=t.scrollWidth);var r=t.scrollTop+e.y,n=o&&r>0&&r<t.scrollHeight,s=t.scrollLeft+e.x,a=i&&s>0&&s<t.scrollWidth;n?t.scrollTop+=e.y:o&&r<0&&(t.scrollTop=0),a?t.scrollLeft+=e.x:i&&s<0&&(t.scrollLeft=0)}},Vt=function(t,e){var o=i.useContext(t),r=o[0],n=o[1],s=i.useState(e),a=s[0],p=s[1];return[void 0!==r?r:a,function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];void 0!==r?n.apply(void 0,t):p(t[0])}]};function Ht(t,e,o){void 0===o&&(o={});var r=e.onPress,n=void 0===r?S:r,s=e.onRelease,a=void 0===s?S:s,p=e.onDragStart,l=void 0===p?S:p,h=e.onDrag,c=void 0===h?S:h,u=e.onDragEnd,d=void 0===u?S:u,f=o.hint,g=void 0===f?null:f,y=o.mouseOnly,v=void 0!==y&&y,m=o.autoScroll,x=void 0===m||m,b=o.scrollContainer,_=void 0===b?null:b,w=i.useState(!1),C=w[0],k=w[1],A=i.useState(!1),P=A[0],T=A[1],O=Vt(St)[0],M=Vt(kt),E=M[0],R=M[1],B=i.useContext(Pt)[0],L=i.useContext(At),I=L[0],D=L[1],j=L[2],z=i.useRef({x:0,y:0}),V=i.useRef(),H=i.useRef(!1),N=i.useRef(),U=i.useRef(null),F=i.useRef(!1),G=i.useRef({x:0,y:0}),W=i.useRef({x:0,y:0}),X=i.useRef({x:0,y:0}),Y=i.useRef({x:0,y:0}),q=i.useRef({x:0,y:0}),Z=i.useRef({x:0,y:0}),Q=Boolean("undefined"!=typeof window&&window.PointerEvent),K=!v&&Q,$=i.useCallback((function(){return t.current&&t.current.element?t.current.element:t.current}),[t]),J=i.useCallback((function(){return g&&g.current&&g.current.element?g.current.element:g?g.current:null}),[g]),tt=i.useCallback((function(){return _&&_.current&&_.current.element?_.current.element:_?_.current:null}),[_]),et=i.useCallback((function(){return"object"==typeof x&&x.boundaryElementRef&&x.boundaryElementRef.current&&x.boundaryElementRef.current.element?x.boundaryElementRef.current.element:"object"==typeof x&&x.boundaryElementRef&&x.boundaryElementRef.current?x.boundaryElementRef.current:null}),[x]),ot=i.useRef(null);i.useImperativeHandle(ot,(function(){return{element:$(),hint:J(),onPress:gt,onDragStart:vt,onDrag:mt,onDragEnd:xt,onRelease:yt,data:t.current}}));var it=i.useCallback((function(){var t=$();return t&&t.ownerDocument||document}),[$]),rt=i.useCallback((function(){var t=it();return t&&t.defaultView||window}),[it]),nt=i.useCallback((function(){return{drag:E?E.current:null,drop:O?O.current:null,drags:I.map((function(t){return t.current})),drops:B.map((function(t){return t.current})),pressed:C,ignoreMouse:H.current,scrollOffset:q.current,offset:G.current,pageOffset:W.current,initialScrollOffset:Z.current,clientOffset:X.current,initialClientOffset:Y.current,velocity:z.current,autoScroll:Boolean("object"==typeof x?!1!==x.enabled:x),scrollableParent:et(),autoScrollDirection:"object"==typeof x?x.direction:{horizontal:!0,vertical:!0},isScrolling:P}}),[E,O,I,B,C,x,et,P]),st=i.useCallback((function(t){k(t)}),[]),at=i.useCallback((function(t){T(t)}),[]),pt=i.useCallback((function(t){z.current=t}),[]),lt=i.useCallback((function(t){G.current=t}),[]),ht=i.useCallback((function(t){X.current=t}),[]),ct=i.useCallback((function(t){W.current=t}),[]),ut=i.useCallback((function(t){Y.current=t}),[]),dt=i.useCallback((function(t){q.current=t}),[]),ft=i.useCallback((function(t){Z.current=t}),[]),gt=i.useCallback((function(t){n(t)}),[n]),yt=i.useCallback((function(t){a(t)}),[a]),vt=i.useCallback((function(e){R(ot,{target:t.current,event:e}),l(e)}),[R,t,l]),mt=i.useCallback((function(t){c(t)}),[c]),xt=i.useCallback((function(e){F.current||(R(null,{target:t.current,event:e}),d(e))}),[d,R,t]),bt=i.useCallback((function(t){jt(nt(),{event:t,payload:ot.current},{onVelocityChange:pt,onOffsetChange:lt,onClientOffsetChange:ht,onPageOffsetChange:ct,onInitialClientOffsetChange:ut,onScrollOffsetChange:dt,onInitialScrollOffsetChange:ft,onIsPressedChange:st,onIsScrollingChange:at})}),[nt,pt,lt,ct,ht,ut,ft,st,dt,at]),_t=i.useCallback((function(t){bt(t)}),[bt]),wt=i.useCallback((function(t){bt(t)}),[bt]),Ct=i.useCallback((function(t){bt(t)}),[bt]),Tt=i.useCallback((function(t){bt(t)}),[bt]),Ot=i.useCallback((function(t){bt(t)}),[bt]),Mt=i.useCallback((function(t){bt(t)}),[bt]),Et=i.useCallback((function(t){bt(t)}),[bt]),Rt=i.useCallback((function(t){t.preventDefault(),bt(t)}),[bt]),Bt=i.useCallback((function(t){t.preventDefault(),bt(t)}),[bt]),Lt=i.useCallback((function(t){t.preventDefault(),bt(t)}),[bt]),Dt=i.useCallback((function(t){if(0===t.touches.length&&1===t.changedTouches.length){var e=rt();H.current=!0,N.current=e.setTimeout((function(){H.current=!1}),2e3)}bt(t)}),[bt,rt]),Ht=i.useCallback((function(t){bt(t)}),[bt]),Nt=i.useCallback((function(){var t=$();if(t){var e=t.style.touchAction;return t.style.touchAction="none",function(){t.style.touchAction=e}}}),[$]),Ut=i.useCallback((function(){return D(ot),function(){j(ot)}}),[j,D]);i.useEffect((function(){var t=rt();if(P){var e=tt()||It(document.elementFromPoint(X.current.x,X.current.y));t.clearInterval(V.current),V.current=t.setInterval((function(){zt(e,{x:z.current.x,y:z.current.y})}),50)}return function(){t.clearInterval(V.current)}}),[$,tt,rt,P]),i.useEffect(Nt,[Nt]),i.useEffect((function(){var t=rt(),e=$(),o=it();return K?(e&&(U.current=It(e),U.current&&U.current.addEventListener("scroll",Ht,{passive:!0}),e.addEventListener("pointerdown",_t,{passive:!0})),C&&(o.addEventListener("pointermove",wt),o.addEventListener("pointerup",Tt,!0),o.addEventListener("contextmenu",Rt),o.addEventListener("pointercancel",Ct,{passive:!0}))):(t.addEventListener("touchmove",S,{capture:!1,passive:!1}),e&&(e.addEventListener("mousedown",Ot,{passive:!0}),v||(e.addEventListener("touchstart",Bt,{passive:!0}),C&&(e.addEventListener("touchmove",Lt,{passive:!0}),e.addEventListener("touchend",Dt,{passive:!0})))),C&&(o.addEventListener("mousemove",Mt,{passive:!0}),o.addEventListener("mouseup",Et,{passive:!0}))),function(){U.current&&U.current.removeEventListener("scroll",Ht),e&&(e.removeEventListener("pointerdown",_t),e.removeEventListener("mousedown",Ot),e.removeEventListener("touchstart",Bt),e.removeEventListener("touchmove",Lt),e.removeEventListener("touchend",Dt)),o.removeEventListener("pointermove",wt),o.removeEventListener("pointerup",Tt,!0),o.removeEventListener("contextmenu",Rt),o.removeEventListener("pointercancel",Ct),o.removeEventListener("mousemove",Mt),o.removeEventListener("mouseup",Et),t.removeEventListener("touchmove",S),t.clearTimeout(N.current)}}),[C,rt,$,it,v,K,Rt,Ot,Mt,Et,Ct,_t,wt,Tt,Dt,Lt,Bt,Ht]),i.useEffect((function(){return function(){F.current=!0}}),[]),i.useLayoutEffect(Ut,[Ut])}var Nt=i.forwardRef((function(t,e){var o=i.useRef(null),r=i.useRef(null),n=i.useCallback((function(){return o.current&&o.current.element?o.current.element:o.current}),[o]);i.useImperativeHandle(r,(function(){return{element:n()||null}})),i.useImperativeHandle(e,(function(){return r.current})),i.useImperativeHandle(t.childRef,(function(){return o.current}));var s=i.useCallback((function(e){t.onPress&&t.onPress({element:n(),target:r.current,event:e})}),[n,t.onPress]),a=i.useCallback((function(e){t.onRelease&&t.onRelease({element:n(),target:r.current,event:e})}),[n,t.onRelease]),p=i.useCallback((function(e){t.onDragStart&&t.onDragStart({element:n(),target:r.current,event:e})}),[t,n]),l=i.useCallback((function(e){t.onDrag&&t.onDrag({element:n(),target:r.current,event:e})}),[n,t.onDrag]),h=i.useCallback((function(e){t.onDragEnd&&t.onDragEnd({element:n(),target:r.current,event:e})}),[n,t.onDragEnd]);return Ht(o,{onPress:s,onRelease:a,onDragStart:p,onDrag:l,onDragEnd:h},{mouseOnly:t.mouseOnly,autoScroll:t.autoScroll,hint:t.hint,scrollContainer:t.scrollContainer}),t.children?i.cloneElement(i.Children.only(t.children),{ref:o}):null}));function Ut(t,e){void 0===e&&(e={onDragEnter:S,onDragOver:S,onDragLeave:S,onDrop:S});var o=e.onDragEnter,r=void 0===o?S:o,n=e.onDragOver,s=void 0===n?S:n,a=e.onDragLeave,p=void 0===a?S:a,l=e.onDrop,h=void 0===l?S:l,c=Vt(St)[1],u=i.useContext(Pt),d=u[1],f=u[2],g=i.useCallback((function(){return t.current&&t.current.element?t.current.element:t.current}),[t]),y=i.useRef(null);i.useImperativeHandle(y,(function(){return{element:g(),onDragEnter:v,onDragOver:m,onDragLeave:x,onDrop:b,data:t.current}}));var v=i.useCallback((function(e){c(y,{target:t.current,event:e}),r(e)}),[c,t,r]),m=i.useCallback((function(t){s(t)}),[s]),x=i.useCallback((function(e){c(null,{target:t.current,event:e}),p(e)}),[c,t,p]),b=i.useCallback((function(e){c(null,{target:t.current,event:e}),h(e)}),[c,t,h]),_=i.useCallback((function(){return d(y),function(){f(y)}}),[f,d]);i.useLayoutEffect(_,[_])}Nt.displayName="KendoReactDraggable";var Ft=i.forwardRef((function(t,e){var o=i.useRef(null),r=i.useRef(null),n=i.useCallback((function(){return o.current&&o.current.element?o.current.element:o.current}),[o]);i.useImperativeHandle(r,(function(){return{element:n()||void 0}})),i.useImperativeHandle(e,(function(){return r.current})),i.useImperativeHandle(t.childRef,(function(){return o.current}));var s=i.useCallback((function(e){t.onDragEnter&&t.onDragEnter({element:n(),target:r.current,event:e})}),[t.onDragEnter,n]),a=i.useCallback((function(e){t.onDragOver&&t.onDragOver({element:n(),target:r.current,event:e})}),[n,t.onDragOver]),p=i.useCallback((function(e){t.onDragLeave&&t.onDragLeave({element:n(),target:r.current,event:e})}),[t.onDragLeave,n]),l=i.useCallback((function(e){t.onDrop&&t.onDrop({element:n(),target:r.current,event:e})}),[t.onDrop,n]);return Ut(o,{onDragEnter:s,onDragOver:a,onDragLeave:p,onDrop:l}),t.children?i.cloneElement(i.Children.only(t.children),{ref:o}):null}));Ft.displayName="KendoReactDroppable";var Gt={sizeMap:{small:"sm",medium:"md",large:"lg"},roundedMap:{small:"sm",medium:"md",large:"lg"}}},function(t,e){t.exports=i},,function(t,e,o){"use strict";var i,r=this&&this.__extends||(i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),n=this&&this.__rest||function(t,e){var o={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(o[i]=t[i]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(t);r<i.length;r++)e.indexOf(i[r])<0&&(o[i[r]]=t[i[r]])}return o};Object.defineProperty(e,"__esModule",{value:!0});var s=o(1),a=o(2),p=o(10),l=o(11),h=o(12),c=o(13),u=o(3),d=o(14),f=function(t){function e(e){var o=t.call(this,e)||this;return o.barcodeInstance=null,o._element=null,o.observersStore={},o.onWindowResize=function(){null!==o.barcodeInstance&&(o.barcodeInstance.redraw(),o.trigger("render",{sender:o}))},u.validatePackage(d.packageMetadata),o.observersStore=p.default(l.observersReducer),o.contextValue={observersStore:o.observersStore},o}return r(e,t),Object.defineProperty(e.prototype,"element",{get:function(){return this._element},enumerable:!0,configurable:!0}),e.prototype.componentDidMount=function(){this.instantiateCoreBarcode(),window.addEventListener("resize",this.onWindowResize),this.trigger("render",{sender:this})},e.prototype.componentDidUpdate=function(t){var e=this.props,o=(e.children,e.deriveOptionsFromParent,e.getTarget,e.barcodeConstructor,e.className,e.renderAs),i=n(e,["children","deriveOptionsFromParent","getTarget","barcodeConstructor","className","renderAs"]),r=(t.children,t.deriveOptionsFromParent,t.getTarget,t.barcodeConstructor,t.className,t.renderAs),s=n(t,["children","deriveOptionsFromParent","getTarget","barcodeConstructor","className","renderAs"]);if(null!==this.barcodeInstance){var a=h.isOptionsChanged(s,i);(o||"svg")!==(r||"svg")?(null!==this.barcodeInstance&&(this.barcodeInstance.destroy(),this.barcodeInstance=null),this.instantiateCoreBarcode()):a&&this.refresh(),this.trigger("render",{sender:this})}},e.prototype.componentWillUnmount=function(){null!==this.barcodeInstance&&(this.barcodeInstance.destroy(),this.barcodeInstance=null),window.removeEventListener("resize",this.onWindowResize)},e.prototype.render=function(){var t=this,e=this.props,o=e.style,i=void 0===o?{}:o,r=e.className,n=e.children;return s.createElement(c.BarcodeContext.Provider,{value:this.contextValue},s.createElement("div",{style:i,ref:function(e){return t._element=e},className:r},n))},e.prototype.instantiateCoreBarcode=function(){var t=this.props.barcodeConstructor,e=this.getBarcodeOptions();this.barcodeInstance=new t(this.element,e,(function(t){console.warn(t)}))},e.prototype.refresh=function(){if(null!==this.barcodeInstance){var t=this.getBarcodeOptions();this.barcodeInstance.setOptions(t)}},e.prototype.getBarcodeOptions=function(){var t=this.props,e=t.renderAs,o=t.deriveOptionsFromParent,i={renderAs:e};return o&&(i=o(i)),i},e.prototype.trigger=function(t,e){for(var o=this.observersStore.getState(),i=0;i<o.length;i++)o[i].trigger(t,e)},e.propTypes={dir:a.string,renderAs:a.oneOf(["svg","canvas"])},e.defaultProps={renderAs:"svg"},e}(s.Component);e.BaseBarcode=f},function(t,e,o){"use strict";o.r(e),o.d(e,"autoMajorUnit",(function(){return zt})),o.d(e,"Point",(function(){return Vt})),o.d(e,"Box",(function(){return Nt})),o.d(e,"Ring",(function(){return Ft})),o.d(e,"Sector",(function(){return Gt})),o.d(e,"ShapeBuilder",(function(){return Xt})),o.d(e,"ShapeElement",(function(){return $t})),o.d(e,"ChartElement",(function(){return qt})),o.d(e,"BoxElement",(function(){return Qt})),o.d(e,"RootElement",(function(){return oe})),o.d(e,"FloatElement",(function(){return re})),o.d(e,"Text",(function(){return ae})),o.d(e,"TextBox",(function(){return he})),o.d(e,"Title",(function(){return ue})),o.d(e,"AxisLabel",(function(){return fe})),o.d(e,"Axis",(function(){return Le})),o.d(e,"Note",(function(){return ye})),o.d(e,"CategoryAxis",(function(){return oo})),o.d(e,"DateCategoryAxis",(function(){return co})),o.d(e,"DateValueAxis",(function(){return _o})),o.d(e,"NumericAxis",(function(){return xo})),o.d(e,"LogarithmicAxis",(function(){return So})),o.d(e,"PolarAxis",(function(){return Mo})),o.d(e,"RadarCategoryAxis",(function(){return To})),o.d(e,"RadarNumericAxis",(function(){return Lo})),o.d(e,"RadarLogarithmicAxis",(function(){return Do})),o.d(e,"CurveProcessor",(function(){return zo})),o.d(e,"Gradients",(function(){return Jt})),o.d(e,"rectToBox",(function(){return pe})),o.d(e,"ChartAxis",(function(){return Vo})),o.d(e,"ChartPane",(function(){return Uo})),o.d(e,"ChartPlotArea",(function(){return Fo})),o.d(e,"findAxisByName",(function(){return Ho})),o.d(e,"Aggregates",(function(){return Xo})),o.d(e,"AreaChart",(function(){return zi})),o.d(e,"AreaSegment",(function(){return Li})),o.d(e,"AxisGroupRangeTracker",(function(){return Vi})),o.d(e,"Bar",(function(){return Gi})),o.d(e,"BarChart",(function(){return $i})),o.d(e,"BarLabel",(function(){return Ni})),o.d(e,"BoxPlotChart",(function(){return ar})),o.d(e,"BoxPlot",(function(){return nr})),o.d(e,"BubbleChart",(function(){return gr})),o.d(e,"Bullet",(function(){return xr})),o.d(e,"BulletChart",(function(){return _r})),o.d(e,"CandlestickChart",(function(){return ir})),o.d(e,"Candlestick",(function(){return tr})),o.d(e,"CategoricalChart",(function(){return gi})),o.d(e,"CategoricalErrorBar",(function(){return ci})),o.d(e,"CategoricalPlotArea",(function(){return An})),o.d(e,"Chart",(function(){return ga})),o.d(e,"ChartContainer",(function(){return Or})),o.d(e,"ClipAnimation",(function(){return Oi})),o.d(e,"ClusterLayout",(function(){return qi})),o.d(e,"Crosshair",(function(){return Pr})),o.d(e,"CrosshairTooltip",(function(){return Sr})),o.d(e,"DefaultAggregates",(function(){return en})),o.d(e,"DonutChart",(function(){return ms})),o.d(e,"DonutPlotArea",(function(){return xs})),o.d(e,"DonutSegment",(function(){return ys})),o.d(e,"ErrorBarBase",(function(){return hi})),o.d(e,"ErrorRangeCalculator",(function(){return $o})),o.d(e,"Highlight",(function(){return Tn})),o.d(e,"SharedTooltip",(function(){return qn})),o.d(e,"Legend",(function(){return Vn})),o.d(e,"LegendItem",(function(){return jn})),o.d(e,"LegendLayout",(function(){return Dn})),o.d(e,"LineChart",(function(){return Bi})),o.d(e,"LinePoint",(function(){return xi})),o.d(e,"LineSegment",(function(){return _i})),o.d(e,"Pane",(function(){return Rr})),o.d(e,"PieAnimation",(function(){return Jn})),o.d(e,"PieChart",(function(){return ds})),o.d(e,"PieChartMixin",(function(){return hs})),o.d(e,"PiePlotArea",(function(){return fs})),o.d(e,"PieSegment",(function(){return ls})),o.d(e,"PlotAreaBase",(function(){return Qr})),o.d(e,"PlotAreaEventsMixin",(function(){return Kr})),o.d(e,"PlotAreaFactory",(function(){return Nn})),o.d(e,"PointEventsMixin",(function(){return yi})),o.d(e,"RangeBar",(function(){return rn})),o.d(e,"RangeBarChart",(function(){return sn})),o.d(e,"RangeAreaPoint",(function(){return ln})),o.d(e,"RangeAreaChart",(function(){return gn})),o.d(e,"ScatterChart",(function(){return cr})),o.d(e,"ScatterErrorBar",(function(){return pr})),o.d(e,"ScatterLineChart",(function(){return es})),o.d(e,"Selection",(function(){return Wn})),o.d(e,"SeriesAggregator",(function(){return Jr})),o.d(e,"SeriesBinder",(function(){return Zo})),o.d(e,"SplineSegment",(function(){return Ai})),o.d(e,"SplineAreaSegment",(function(){return ji})),o.d(e,"StackWrap",(function(){return Qi})),o.d(e,"Tooltip",(function(){return Xn})),o.d(e,"OHLCChart",(function(){return vn})),o.d(e,"OHLCPoint",(function(){return yn})),o.d(e,"WaterfallChart",(function(){return bn})),o.d(e,"WaterfallSegment",(function(){return xn})),o.d(e,"XYPlotArea",(function(){return rs})),o.d(e,"MousewheelZoom",(function(){return In})),o.d(e,"ZoomSelection",(function(){return Ln})),o.d(e,"Pannable",(function(){return Rn})),o.d(e,"anyHasZIndex",(function(){return Mi})),o.d(e,"appendIfNotNull",(function(){return Br})),o.d(e,"areNumbers",(function(){return er})),o.d(e,"bindSegments",(function(){return Ir})),o.d(e,"categoriesCount",(function(){return di})),o.d(e,"countNumbers",(function(){return Go})),o.d(e,"equalsIgnoreCase",(function(){return Dr})),o.d(e,"evalOptions",(function(){return ui})),o.d(e,"filterSeriesByType",(function(){return jr})),o.d(e,"getDateField",(function(){return zr})),o.d(e,"getField",(function(){return Yo})),o.d(e,"hasGradientOverlay",(function(){return Ui})),o.d(e,"hasValue",(function(){return lr})),o.d(e,"isDateAxis",(function(){return Vr})),o.d(e,"segmentVisible",(function(){return Lr})),o.d(e,"singleItemOrArray",(function(){return Hr})),o.d(e,"createOutOfRangePoints",(function(){return Gr})),o.d(e,"ChartService",(function(){return Te})),o.d(e,"DomEventsBuilder",(function(){return Me})),o.d(e,"FormatService",(function(){return ke})),o.d(e,"IntlService",(function(){return be})),o.d(e,"TemplateService",(function(){return N})),o.d(e,"Sparkline",(function(){return wa})),o.d(e,"Navigator",(function(){return Ma})),o.d(e,"NavigatorHint",(function(){return Aa})),o.d(e,"StockChart",(function(){return Ra})),o.d(e,"constants",(function(){return i})),o.d(e,"Gauge",(function(){return Ga})),o.d(e,"LinearGauge",(function(){return fp})),o.d(e,"LinearPointer",(function(){return ep})),o.d(e,"ArrowLinearPointer",(function(){return sp})),o.d(e,"BarLinearPointer",(function(){return cp})),o.d(e,"LinearScale",(function(){return Ka})),o.d(e,"RadialGauge",(function(){return Ep})),o.d(e,"RadialPointer",(function(){return Tp})),o.d(e,"RadialScale",(function(){return _p})),o.d(e,"ArcGauge",(function(){return zp})),o.d(e,"RangePointer",(function(){return jp})),o.d(e,"ArcScale",(function(){return Bp})),o.d(e,"CircularGauge",(function(){return Vp})),o.d(e,"Barcode",(function(){return Pl})),o.d(e,"barcodeValidator",(function(){return Ol})),o.d(e,"QRCode",(function(){return Eh})),o.d(e,"qrcodeValidator",(function(){return Rh})),o.d(e,"Map",(function(){return Gu})),o.d(e,"addClass",(function(){return _})),o.d(e,"removeClass",(function(){return C})),o.d(e,"alignPathToPixel",(function(){return S})),o.d(e,"clockwise",(function(){return A})),o.d(e,"convertableToNumber",(function(){return O})),o.d(e,"deepExtend",(function(){return R})),o.d(e,"elementStyles",(function(){return j})),o.d(e,"getSpacing",(function(){return z})),o.d(e,"getTemplate",(function(){return U})),o.d(e,"getter",(function(){return W})),o.d(e,"grep",(function(){return X})),o.d(e,"hasClasses",(function(){return Y})),o.d(e,"HashMap",(function(){return Z})),o.d(e,"inArray",(function(){return Q})),o.d(e,"interpolateValue",(function(){return K})),o.d(e,"InstanceObserver",(function(){return J})),o.d(e,"isArray",(function(){return b})),o.d(e,"isFunction",(function(){return M})),o.d(e,"isNumber",(function(){return P})),o.d(e,"isObject",(function(){return B})),o.d(e,"isString",(function(){return T})),o.d(e,"map",(function(){return tt})),o.d(e,"mousewheelDelta",(function(){return ot})),o.d(e,"FontLoader",(function(){return _t})),o.d(e,"setDefaultOptions",(function(){return wt})),o.d(e,"sparseArrayLimits",(function(){return Ct})),o.d(e,"styleValue",(function(){return L})),o.d(e,"find",(function(){return kt})),o.d(e,"elementScale",(function(){return Tt})),o.d(e,"autoTextColor",(function(){return Ot})),o.d(e,"createHashSet",(function(){return It})),o.d(e,"defaultErrorHandler",(function(){return Dt})),o.d(e,"keys",(function(){return jt})),o.d(e,"append",(function(){return rt})),o.d(e,"bindEvents",(function(){return nt})),o.d(e,"Class",(function(){return k.Class})),o.d(e,"defined",(function(){return st})),o.d(e,"deg",(function(){return at})),o.d(e,"elementOffset",(function(){return pt})),o.d(e,"elementSize",(function(){return lt})),o.d(e,"eventCoordinates",(function(){return ht})),o.d(e,"eventElement",(function(){return ct})),o.d(e,"hashKey",(function(){return ut})),o.d(e,"last",(function(){return dt})),o.d(e,"limitValue",(function(){return ft})),o.d(e,"logToConsole",(function(){return k.logToConsole})),o.d(e,"objectKey",(function(){return gt})),o.d(e,"rad",(function(){return yt})),o.d(e,"round",(function(){return vt})),o.d(e,"unbindEvents",(function(){return mt})),o.d(e,"valueOrDefault",(function(){return xt})),o.d(e,"chartBaseTheme",(function(){return Qu}));var i={};o.r(i),o.d(i,"NAVIGATOR_AXIS",(function(){return Ta})),o.d(i,"NAVIGATOR_PANE",(function(){return Pa}));var r="arc",n="#000",s="bottom",a="center",p="circle",l="date",h=/\{\d+:?/,c="left",u=Number.MAX_VALUE,d=-Number.MAX_VALUE,f="right",g="top",y="value",v="#fff",m="x",x="y";function b(t){return Array.isArray(t)}function _(t,e){for(var o=b(e)?e:[e],i=0;i<o.length;i++){var r=o[i];-1===t.className.indexOf(r)&&(t.className+=" "+r)}}var w=/\s+/g;function C(t,e){t&&t.className&&(t.className=t.className.replace(e,"").replace(w," "))}var k=o(0);function S(t){var e=.5;t.options.stroke&&k.drawing.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 A(t,e){return-t.x*e.y+t.y*e.x<0}function P(t){return"number"==typeof t&&!isNaN(t)}function T(t){return"string"==typeof t}function O(t){return P(t)||T(t)&&isFinite(t)}function M(t){return"function"==typeof t}function E(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(M(i.clone))t[o]=i.clone();else{var s=t[o];t[o]="object"==typeof s&&s||{},E(t[o],i)}else"undefined"!==r&&(t[o]=i)}return t}function R(t){for(var e=arguments,o=arguments.length,i=1;i<o;i++)E(t,e[i]);return t}function B(t){return"object"==typeof t}function L(t){return P(t)?t+"px":t}var I=/width|height|top|left|bottom|right/i;function D(t){return I.test(t)}function j(t,e){var o=T(e)?[e]:e;if(b(o)){for(var i={},r=window.getComputedStyle(t),n=0;n<o.length;n++){var s=o[n];i[s]=D(s)?parseFloat(r[s]):r[s]}return i}if(B(e))for(var a in e)t.style[a]=L(e[a])}function z(t,e){void 0===e&&(e=0);var o={top:0,right:0,bottom:0,left:0};return"number"==typeof t?o.top=o[f]=o[s]=o[c]=t:(o.top=t.top||e,o[f]=t[f]||e,o[s]=t[s]||e,o[c]=t[c]||e),o}var V={compile:function(t){return t}},H=function(){};H.register=function(t){V=t},H.compile=function(t){return V.compile(t)};var N=H;function U(t){var e;return void 0===t&&(t={}),t.template?t.template=e=N.compile(t.template):M(t.content)&&(e=t.content),e}var F=/\[(?:(\d+)|['"](.*?)['"])\]|((?:(?!\[.*?\]|\.).)+)/g,G={};function W(t){if(G[t])return G[t];var e=[];return t.replace(F,(function(t,o,i,r){e.push(k.drawing.util.defined(o)?o:i||r)})),G[t]=function(t){for(var o=t,i=0;i<e.length&&o;i++)o=o[e[i]];return o},G[t]}function X(t,e){for(var o=t.length,i=[],r=0;r<o;r++)e(t[r])&&i.push(t[r]);return i}function Y(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}G[void 0]=function(t){return t};var q=function(){this._map={}};q.prototype.get=function(t){return this._map[this._key(t)]},q.prototype.set=function(t,e){this._map[this._key(t)]=e},q.prototype._key=function(t){return t instanceof Date?t.getTime():t};var Z=q;function Q(t,e){if(e)return-1!==e.indexOf(t)}function K(t,e,o){return k.drawing.util.round(t+(e-t)*o,3)}var $=function(t,e){this.observer=t,this.handlerMap=R({},this.handlerMap,e)};$.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},$.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)},$.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 J=$;function tt(t,e){for(var o=t.length,i=[],r=0;r<o;r++){var n=e(t[r]);k.drawing.util.defined(n)&&i.push(n)}return i}var et=k.support.browser||{};function ot(t){var e=0;return t.wheelDelta?(e=-t.wheelDelta/120,et.webkit&&(e/=2*Math.max(window.devicePixelRatio,.625))):t.detail&&(e=t.detail/3),e=e>0?Math.ceil(e):Math.floor(e)}var it=k.drawing.util,rt=it.append,nt=it.bindEvents,st=it.defined,at=it.deg,pt=it.elementOffset,lt=it.elementSize,ht=it.eventCoordinates,ct=it.eventElement,ut=it.hashKey,dt=it.last,ft=it.limitValue,gt=it.objectKey,yt=it.rad,vt=it.round,mt=it.unbindEvents,xt=it.valueOrDefault,bt=function(){};bt.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++,bt.fetchFonts(r,e,o),o.depth--))}))},bt.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){Object(k.logToConsole)(t)}Promise.all(o).then(e,e)}else e()},bt.preloadFonts=function(t,e){var o=[];bt.fetchFonts(t,o),bt.loadFonts(o,e)};var _t=bt;function wt(t,e){var o=t.prototype;o.options?o.options=R({},o.options,e):o.options=e}function Ct(t){for(var e=u,o=d,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===u?void 0:e,max:o===d?void 0:o}}function kt(t,e){for(var o=0;o<t.length;o++){var i=t[o];if(e(i,o,t))return i}}var St=k.geometry.Matrix,At=/matrix\((.*)\)/;function Pt(t){var e=getComputedStyle(t).transform;return"none"===e?St.unit():function(t){var e=t.match(At);if(null===e||2!==e.length)return St.unit();var o=e[1].split(",").map((function(t){return parseFloat(t)}));return new(Function.prototype.bind.apply(St,[null].concat(o)))}(e)}function Tt(t){if(!t)return St.unit();for(var e=Pt(t),o=t.parentElement;o;){var i=Pt(o);e=e.multiplyCopy(i),o=o.parentElement}return e.b=e.c=e.e=e.f=0,e}var Ot=function(t){return new k.Color(t).isDark()?v:n},Mt={},Et=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},Rt={size:{configurable:!0}};Et.prototype.values=function(){return this._values.filter((function(t){return t!==Mt}))},Et.prototype.has=function(t){return void 0!==this._index[t]},Et.prototype.add=function(t){this.has(t)||(this._index[t]=this._values.length,this._values.push(t))},Et.prototype.delete=function(t){var e=this._index[t];void 0!==e&&(this._values[e]=Mt,delete this._index[t])},Et.prototype.clear=function(){this._index={},this._values=[]},Rt.size.get=function(){return this._values.length},Object.defineProperties(Et.prototype,Rt);var Bt=function(t){this._set=new Set(t)},Lt={size:{configurable:!0}};Bt.prototype.values=function(){return Array.from(this._set)},Bt.prototype.has=function(t){return this._set.has(t)},Bt.prototype.add=function(t){this._set.add(t)},Bt.prototype.delete=function(t){this._set.delete(t)},Bt.prototype.clear=function(){this._set.clear()},Lt.size.get=function(){return this._set.size},Object.defineProperties(Bt.prototype,Lt);function It(t){return function(){var t=!1;"function"==typeof Set&&(t=new Set([1]).has(1));return t}()?new Bt(t):new Et(t)}function Dt(t){throw t}var jt={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 zt(t,e){var o=vt(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=vt(o/i,10);return vt(i*(r<1.904762?.2:r<4.761904?.5:r<9.523809?1:2),10)}var Vt=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=yt(e),i=Math.cos(o),r=Math.sin(o),n=t.x,s=t.y,a=this.x,p=this.y;return this.x=vt(n+(a-n)*i+(p-s)*r,3),this.y=vt(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=yt(o);return new e(t.x-i*Math.cos(r),t.y-i*Math.sin(r))},e}(k.Class);function Ht(t,e,o,i,r){var n=yt(r);return new Vt(o+(t-o)*Math.cos(n)+(e-i)*Math.sin(n),i-(t-o)*Math.sin(n)+(e-i)*Math.cos(n))}var Nt=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 st(t)&&(this.x1=t,this.x2=this.x1+i),st(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=b(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!==m&&e||(this.x1=t.x1,this.x2=t.x2),e!==x&&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===g||e===s?x:m,n=r===x?o:i;if(e===a){var p=t.center(),l=this.center();this.x1+=p.x-l.x,this.y1+=p.y-l.y}else this[r+1]=e===g||e===c?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=z(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=z(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 Vt(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 Vt(this.x1,this.y1),new Vt(this.x2,this.y1),new Vt(this.x2,this.y2),new Vt(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=Ht(0,0,r,n,t),a=Ht(e,0,r,n,t),p=Ht(e,o,r,n,t),l=Ht(0,o,r,n,t);return e=Math.max(s.x,a.x,p.x,l.x)-Math.min(s.x,a.x,p.x,l.x),o=Math.max(s.y,a.y,p.y,l.y)-Math.min(s.y,a.y,p.y,l.y),this.x2=this.x1+e,this.y2=this.y1+o,this},e.prototype.toRect=function(){return new k.geometry.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===m?"width":"height",p=this[n]();Q(o,[c,g])?(this[i]=t[i],this[r]=this[i]+p):Q(o,[f,s])?(this[r]=t[r],this[i]=this[r]-p):o===a&&(this[i]=t[i]+(t[n]()-p)/2,this[r]=this[i]+p)},e}(k.Class);function Ut(t,e){return t-e}var Ft=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=yt(t),i=Math.cos(o),r=Math.sin(o),n=e?this.innerRadius:this.radius,s=vt(this.center.x-i*n,3),a=vt(this.center.y-r*n,3);return new Vt(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(yt(r)),l=Math.cos(yt(r)),h=n.x-s,c=n.y-a;return Math.abs(p)<.9&&(h+=s*-l/Math.abs(l)),Math.abs(l)<.9&&(c+=a*-p/Math.abs(p)),new Nt(h,c,h+e,c+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 Vt(s,a),l=this.point(r),h=new Vt(l.x-e.x,l.y-e.y),c=this.point(n),u=new Vt(c.x-e.x,c.y-e.y),d=vt(s*s+a*a,3);return(h.equals(p)||A(h,p))&&!A(u,p)&&d>=o*o&&d<=i*i},e.prototype.getBBox=function(){var t,e=new Nt(u,u,d,d),o=vt(this.startAngle%360),i=vt((o+this.angle)%360),r=this.innerRadius,n=[0,90,180,270,o,i].sort(Ut),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 l=this.point(t[p]);e.wrapPoint(l),e.wrapPoint(l,r)}return r||e.wrapPoint(this.center),e},e.prototype.expand=function(t){return this.radius+=t,this},e}(k.Class),Gt=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}(Ft),Wt=function(t){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 k.geometry.Point(t.center.x,t.center.y),n=Math.max(t.radius,0),s=Math.max(t.innerRadius,0),a=new k.geometry.Arc(r,{startAngle:o,endAngle:i,radiusX:n,radiusY:n}),p=k.drawing.Path.fromArc(a,e).close();if(s){a.radiusX=a.radiusY=s;var l=a.pointAt(i);p.lineTo(l.x,l.y),p.arc(i,o,s,s,!0)}else p.lineTo(r.x,r.y);return p},e}(k.Class);Wt.current=new Wt;var Xt=Wt,Yt=function(t){function e(e){t.call(this),this.children=[],this.options=R({},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=this,o=0;o<arguments.length;o++){var i=t[o];e.children.push(i),i.parent=e}},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 k.drawing.Group({zIndex:this.options.zIndex,visible:xt(this.options.visible,!0)})},e.prototype.createAnimation=function(){this.visual&&this.options.animation&&(this.animation=k.drawing.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):st(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(xt(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:v,opacity:e||.2},stroke:{color:v,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);st(n.options.zIndex)||(n.options.zIndex=xt(i.zIndex,this.options.zIndex)),this.appendVisual(n)}n.visible(t)},e.prototype.createGradientOverlay=function(t,e,o){var i=new k.drawing.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}(k.Class);Yt.prototype.options={};var qt=Yt,Zt=function(t){function e(e){t.call(this,e),this.options.margin=z(this.options.margin),this.options.padding=z(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,l=r.margin,h=r.padding,c=r.border.width,u=function(){i.align(e,m,r.align),i.align(e,x,r.vAlign),i.paddingBox=o.clone().unpad(l).unpad(c)},d=e.clone();p&&(d.x2=d.x1+n,d.y2=d.y1+s),a&&d.unpad(l).unpad(c).unpad(h),t.prototype.reflow.call(this,d),o=p?this.box=new Nt(0,0,n,s):this.box,a&&p?(u(),d=this.contentBox=this.paddingBox.clone().unpad(h)):(d=this.contentBox=o.clone(),o.pad(h).pad(c).pad(l),u()),this.translateChildren(o.x1-d.x1+l.left+c+h.left,o.y1-d.y1+l.top+c+h.top);for(var f=this.children,g=0;g<f.length;g++){var y=f[g];y.reflow(y.box)}},e.prototype.align=function(t,e,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(k.drawing.Path.fromRect(this.paddingBox.toRect(),this.visualStyle()))},e.prototype.visualStyle=function(){var t=this.options,e=t.border||{};return{stroke:{width:e.width,color:e.color,opacity:xt(e.opacity,t.opacity),dashType:e.dashType},fill:{color:t.background,opacity:t.opacity},cursor:t.cursor}},e}(qt);wt(Zt,{align:c,vAlign:g,margin:{},padding:{},border:{color:n,width:0},background:"",shrinkToFit:!1,width:0,height:0,visible:!0});var Qt=Zt,Kt=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 a,l=this.visualStyle();if(o===p)a=new k.drawing.Circle(new k.geometry.Circle([vt(e.x1+n,3),vt(e.y1+s,3)],Math.min(n,s)),l);else if("triangle"===o)a=k.drawing.Path.fromPoints([[e.x1+n,e.y1],[e.x1,e.y2],[e.x2,e.y2]],l).close();else if("cross"===o)(a=new k.drawing.MultiPath(l)).moveTo(e.x1,e.y1).lineTo(e.x2,e.y2),a.moveTo(e.x1,e.y2).lineTo(e.x2,e.y1);else{var h=e.toRect();if("roundedRect"===o){var c=xt(t.borderRadius,h.width()/5);h.setCornerRadius(c)}a=k.drawing.Path.fromRect(h,l)}return i&&a.transform(k.geometry.transform().rotate(-i,[r.x,r.y])),a.options.zIndex=t.zIndex,a},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}(Qt);wt(Kt,{type:p,align:a,vAlign:a});var $t=Kt,Jt={glass:{type:"linear",rotation:0,stops:[{offset:0,color:v,opacity:0},{offset:.25,color:v,opacity:.3},{offset:1,color:v,opacity:0}]},sharpBevel:{type:"radial",stops:[{offset:0,color:v,opacity:.55},{offset:.65,color:v,opacity:0},{offset:.95,color:v,opacity:.25}]},roundedBevel:{type:"radial",stops:[{offset:.33,color:v,opacity:.06},{offset:.83,color:v,opacity:.2},{offset:.95,color:v,opacity:0}]},roundedGlass:{type:"radial",supportVML:!1,stops:[{offset:0,color:v,opacity:0},{offset:.5,color:v,opacity:.3},{offset:.99,color:v,opacity:0}]},sharpGlass:{type:"radial",supportVML:!1,stops:[{offset:0,color:v,opacity:.2},{offset:.15,color:v,opacity:.15},{offset:.17,color:v,opacity:.35},{offset:.85,color:v,opacity:.05},{offset:.87,color:v,opacity:.15},{offset:.99,color:v,opacity:0}]},bubbleShadow:{type:"radial",center:[.5,.5],radius:.5}};function te(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),l=Math.max(t.y2,e.y2),h=[];return h[0]=new Nt(i,s,r,a),h[1]=new Nt(o,a,i,p),h[2]=new Nt(r,a,n,p),h[3]=new Nt(i,p,r,l),t.x1===o&&t.y1===s||e.x1===o&&e.y1===s?(h[4]=new Nt(o,s,i,a),h[5]=new Nt(r,p,n,l)):(h[4]=new Nt(r,s,n,a),h[5]=new Nt(o,p,i,l)),X(h,(function(t){return t.height()>0&&t.width()>0}))[0]}var ee=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 Nt(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=te(o,e[i].box)||new Nt},e.prototype.createVisual=function(){this.visual=new k.drawing.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=k.drawing.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=gt(t),r=Jt[t.gradient];if(o[i])e=o[i];else{var n=Object.assign({},r,t);"linear"===r.type?e=new k.drawing.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 k.drawing.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 Nt(0,0,t.width,t.height)},e}(qt);wt(ee,{width:600,height:400,background:v,border:{color:n,width:0},margin:z(5),zIndex:-2});var oe=ee,ie=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=m,this.elementAxis=x,this.groupSizeField="width",this.elementSizeField="height",this.groupSpacing=t.spacing,this.elementSpacing=t.vSpacing):(this.groupAxis=x,this.elementAxis=m,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,l=s.length,h=t[o+1]+this.alignStart(a,t[r]());if(l){for(var c=h,u=0;u<l;u++){for(var d=s[u],f=d.groupElements,g=t[e+1],y=f.length,v=0;v<y;v++){var m=f[v],x=this.elementSize(m),b=c+this.alignStart(x[r],d.groupSize),_=new Nt;_[o+1]=b,_[o+2]=b+x[r],_[e+1]=g,_[e+2]=g+x[i],m.reflow(_),g+=x[i]+this.elementSpacing}c+=d.groupSize+this.groupSpacing}t[o+1]=h,t[o+2]=h+a,t[e+2]=t[e+1]+p}},e.prototype.alignStart=function(t,e){var o=0,i=this.options.align;return i===f||i===s?o=e-t:i===a&&(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=vt(t[o]()),a=e.length,p=[],l=0,h=0,c=0,u=0,d=[],f=0;f<a;f++){var g=e[f];g.box||g.reflow(t);var y=this.elementSize(g);this.options.wrap&&vt(h+r+y[o])>s&&(p.push({groupElements:d,groupSize:l,groupElementsSize:h}),u=Math.max(u,h),c+=n+l,l=0,h=0,d=[]),l=Math.max(l,y[i]),h>0&&(h+=r),h+=y[o],d.push(g)}return p.push({groupElements:d,groupSize:l,groupElementsSize:h}),{groups:p,groupsSize:c+=l,maxGroupElementsSize:u=Math.max(u,h)}},e.prototype.elementSize=function(t){return{width:t.box.width(),height:t.box.height()}},e.prototype.createVisual=function(){},e}(qt);wt(ie,{vertical:!0,wrap:!0,vSpacing:0,spacing:0});var re=ie,ne=k.drawing.Text,se=function(t){function e(e,o){t.call(this,o),this.content=e,this.reflow(new Nt)}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=k.drawing.util.measureText(this.content,{font:e.font});this.baseline=o.baseline,this.box=new Nt(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 ne(this.content,this.box.toRect().topLeft(),{font:e,fill:{color:o,opacity:i},cursor:r})},e}(qt);wt(se,{font:"12px sans-serif",color:n});var ae=se;function pe(t){var e=t.origin,o=t.bottomRight();return new Nt(e.x,e.y,o.x,o.y)}var le=/\n/m,he=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 Nt)}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(le),o=new re({vertical:!0,align:t.align,wrap:!1}),i=R({},t,{opacity:1,animation:null});this.container=o,this.append(o);for(var r=0;r<e.length;r++){var n=new ae(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=pe(n.clippedBBox()||new k.geometry.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=z(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 k.drawing.Group({transform:this.rotationTransform(),zIndex:t.zIndex,noclip:t.noclip}),this.hasBox()){var e=k.drawing.Path.fromRect(this.paddingBox.toRect(),this.visualStyle());this.visual.append(e)}},e.prototype.renderVisual=function(){if(this.options.visible)if(this.options.visual){var e=this.visual;e&&!st(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,m,t.align),this.align(this.targetBox,x,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 k.geometry.transform().translate(r.x-o,r.y-i).rotate(t,[o,i])},e}(Qt),ce=function(t){function e(e){t.call(this,e),this.append(new he(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,m)},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}(qt);wt(ce,{color:n,position:g,align:a,margin:z(5),padding:z(5)});var ue=ce,de=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 Nt)}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:ct(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!==a){var e=this.normalBox.toRect(),o=this.rotationTransform();this.box=pe(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===a)return t.prototype.rotationTransform.call(this);var i=k.geometry.transform().rotate(o).matrix(),r=this.normalBox.toRect(),n=this.targetBox.toRect(),p=e.rotationOrigin||g,l=p===g||p===s?m:x,h=p===g||p===s?x:m,u=p===g||p===c?n.origin:n.bottomRight(),d=r.topLeft().transformCopy(i),f=r.topRight().transformCopy(i),y=r.bottomRight().transformCopy(i),v=r.bottomLeft().transformCopy(i),b=k.geometry.Rect.fromPoints(d,f,y,v),_={};_[h]=n.origin[h]-b.origin[h];var w,C,S=Math.abs(d[h]+_[h]-u[h]),A=Math.abs(f[h]+_[h]-u[h]);vt(S,10)===vt(A,10)?(w=d,C=f):A<S?(w=f,C=y):(w=d,C=v);var P=w[l]+(C[l]-w[l])/2;return _[l]=n.center()[l]-P,k.geometry.transform().translate(_.x,_.y).rotate(o)},e}(he);wt(de,{_autoReflow:!1});var fe=de,ge=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 Nt,a=function(){return t},l=n.size,h=this.fields.text;if(st(r)&&r.visible){var c=U(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 he(h,R({},r)),this.label.aliasFor=a,"inside"!==r.position||st(l)||(n.type===p?l=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||l||7,n.height=i||l||7;var u=new $t(R({},n));u.aliasFor=a,this.marker=u,this.append(u),this.label&&this.append(this.label),u.reflow(new Nt),this.wrapperBox=s.wrap(u.box)}},e.prototype.reflow=function(t){var e,o,i,r=this.options,n=this.label,a=this.marker,p=this.wrapperBox,l=t.center(),h=r.line.length,u=r.position;r.visible&&(Q(u,[c,f])?u===c?(i=p.alignTo(t,u).translate(-h,t.center().y-p.center().y),r.line.visible&&(e=[t.x1,l.y],this.linePoints=[e,[i.x2,l.y]],o=i.clone().wrapPoint(e))):(i=p.alignTo(t,u).translate(h,t.center().y-p.center().y),r.line.visible&&(e=[t.x2,l.y],this.linePoints=[e,[i.x1,l.y]],o=i.clone().wrapPoint(e))):u===s?(i=p.alignTo(t,u).translate(t.center().x-p.center().x,h),r.line.visible&&(e=[l.x,t.y2],this.linePoints=[e,[l.x,i.y1]],o=i.clone().wrapPoint(e))):(i=p.alignTo(t,u).translate(t.center().x-p.center().x,-h),r.line.visible&&(e=[l.x,t.y1],this.linePoints=[e,[l.x,i.y2]],o=i.clone().wrapPoint(e))),a&&a.reflow(i),n&&(n.reflow(i),a&&("outside"===r.label.position&&n.box.alignTo(a.box,u),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=k.drawing.Path.fromPoints(this.linePoints,{stroke:{color:t.color,width:t.width,dashType:t.dashType}});S(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:ct(t),text:st(e.label)?e.label.text:"",visual:this.visual})},e}(Qt);wt(ge,{icon:{visible:!0,type:p},label:{position:"inside",visible:!0,align:a,vAlign:a},line:{visible:!0},visible:!0,position:g,zIndex:2});var ye=ge,ve={format:function(t,e){return e},toString:function(t){return t},parseDate:function(t){return new Date(t)},firstDay:function(){return 0}},me=function(){},xe={implementation:{configurable:!0}};me.register=function(t){ve=t},xe.implementation.get=function(){return ve},Object.defineProperties(me,xe);var be=me,_e=/\{(\d+)(:[^\}]+)?\}/g,we=function(t){this._intlService=t},Ce={intl:{configurable:!0}};Ce.intl.get=function(){return this._intlService||be.implementation},Ce.intl.set=function(t){this._intlService=t},we.prototype.auto=function(t){for(var e=[],o=arguments.length-1;o-- >0;)e[o]=arguments[o+1];var i=this.intl;return T(t)&&t.match(h)?i.format.apply(i,[t].concat(e)):i.toString(e[0],t)},we.prototype.localeAuto=function(t,e,o){var i=this.intl;return T(t)&&t.match(h)?t.replace(_e,(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(we.prototype,Ce);var ke=we,Se=function(t,e){void 0===e&&(e={}),this._intlService=e.intlService,this.sender=e.sender||t,this.format=new ke(e.intlService),this.chart=t,this.rtl=Boolean(e.rtl)},Ae={intl:{configurable:!0}};Ae.intl.get=function(){return this._intlService||be.implementation},Ae.intl.set=function(t){this._intlService=t,this.format.intl=t},Se.prototype.notify=function(t,e){this.chart&&this.chart.trigger(t,e)},Se.prototype.isPannable=function(t){var e=((this.chart||{}).options||{}).pannable;return e&&e.lock!==t},Object.defineProperties(Se.prototype,Ae);var Pe,Te=Se,Oe=function(){};Oe.register=function(t){Pe=t},Oe.create=function(t,e){if(Pe)return Pe.create(t,e)};var Me=Oe;function Ee(t,e){var o=t.tickX,i=t.tickY,r=t.position,n=new k.drawing.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),S(n),n}function Re(t,e){var o=t.lineStart,i=t.lineEnd,r=t.position,n=new k.drawing.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),S(n),n}var Be=function(t){function e(e,o){void 0===o&&(o=new Te),t.call(this,e),this.chartService=o,this.options.visible||(this.options=R({},this.options,{labels:{visible:!1},line:{visible:!1},margin:0,majorTickSize:0,minorTickSize:0})),this.options.minorTicks=R({},{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=R({},{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;B(e)&&(t.alignRotation=e.align,t.rotation=e.angle)},e.prototype.createLabels=function(){var t=this.options,e=t.vertical?f:a,o=R({},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},p=this.createAxisLabel(n,o,s);p&&(this.append(p),this.labels.push(p))}}},e.prototype.clearLabels=function(){this.children=X(this.children,(function(t){return!(t instanceof fe)})),this.labels=[]},e.prototype.clearTitle=function(){var t=this;this.title&&(this.children=X(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 Nt(r,e.y1,r,e.y2-s):new Nt(e.x1,n,e.x2-s,n)},e.prototype.createTitle=function(){var t=this.options,e=R({rotation:t.vertical?-90:0,text:"",zIndex:1,visualSize:!0},t.title);if(e.visible&&e.text){var o=new he(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=R({},e,o[i]);r.value=this.parseNoteValue(r.value);var n=new ye({value:r.value,text:r.label.text,dataItem:r},r,this.chartService);n.options.visible&&(st(n.options.position)?t.vertical&&!Q(n.options.position,[c,f])?n.options.position=t.reverse?c:f:t.vertical||Q(n.options.position,[g,s])||(n.options.position=t.reverse?s:g):t.vertical?n.options.position=t.reverse?c:f:n.options.position=t.reverse?s:g,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 k.drawing.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 l=r.skip;l<a;l+=p)st(s)&&l%s==0||(n.tickX=i?o.x2:o.x2-r.size,n.tickY=i?o.y1-r.size:o.y1,n.position=e[l],t.append(Ee(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 k.drawing.Path({stroke:{width:e.width,color:e.color,dashType:e.dashType}});i.moveTo(o.x1,o.y1).lineTo(o.x2,o.y2),t._alignLines&&S(i);var r=this._lineGroup=new k.drawing.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=k.drawing.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 k.drawing.Group({zIndex:-1}),s=X(this.pane.axes,(function(e){return e.options.vertical!==t.options.vertical}))[0],a=0;a<o.length;a++){var p=o[a],l=void 0,h=void 0,u=p.label,d=void 0;if(i?(l=(s||r.axisX).lineBox(),h=t.getSlot(p.from,p.to,!0)):(l=t.getSlot(p.from,p.to,!0),h=(s||r.axisY).lineBox()),u&&(u.vAlign=u.position||c,d=t.createPlotBandLabel(u,p,new Nt(l.x1,h.y1,l.x2,h.y2))),0!==l.width()&&0!==h.height()){var f=new k.geometry.Rect([l.x1,h.y1],[l.width(),h.height()]),g=k.drawing.Path.fromRect(f,{fill:{color:p.color,opacity:p.opacity},stroke:null});n.append(g),d&&n.append(d)}}this.appendVisual(n)}},e.prototype.createPlotBandLabel=function(t,e,o){if(!1===t.visible)return null;var i,r=t.text;if(st(t)&&t.visible){var n=U(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 he(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(),l=p[n?"y1":"x1"],h={lineStart:p[n?"x1":"y1"],lineEnd:p[n?"x2":"y2"],vertical:n},c=[],u=this.gridLinesVisual();function d(t,e,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=vt(t[n]);Q(a,c)||n%o==0||s&&l===a||(h.position=a,u.append(Re(h,e)),c.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,l=((this.getRoot()||{}).box||t)[s](),h=0,c=0;c<n;c++){var u=o[c].box[s]();u+p<=l&&(h=Math.max(h,u))}this.box=r?new Nt(t.x1,t.y1,t.x1+h+p,t.y2):new Nt(t.x1,t.y1,t.x2,t.y1+h+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),l=i?a.box.height():a.box.width(),h=n[p],c=n[p+1],u=void 0,d=void 0;if(i){if(o)u=h+(c-h)/2-l/2;else u=h-l/2;d=u}else o?(u=h,d=c):d=(u=h-l/2)+l;this.positionLabel(a,r,u,d)}},e.prototype.positionLabel=function(t,e,o,i){void 0===i&&(i=o);var r,n=this.options,a=n.vertical,p=this.lineBox(),l=this.getActualTickSize()+n.margin;if(a){var h=p.x2;e?(h+=l,t.options.rotationOrigin=c):(h-=l+t.box.width(),t.options.rotationOrigin=f),r=t.box.move(h,o)}else{var u=p.y1;e?(u-=l+t.box.height(),t.options.rotationOrigin=s):(u+=l,t.options.rotationOrigin=g),r=new Nt(o,u,i,u+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 Nt);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?f:c,e.options.vAlign=e.options.position):(e.options.align=e.options.position,e.options.vAlign=o?g:s),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;st(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?x:m;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=U(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?x:m;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?x:m,s=this.labels,a=o?1:0,p=o?0:1,l=0,h=0,c=0;c<s.length;c++){var u=s[c],d=this.labelTickIndex(u),f=void 0,g=void 0;i?(f=r[d+a],g=r[d+p]):f=g=r[d],l=Math.max(l,f-u.box[n+1]),h=Math.max(h,u.box[n+2]-g)}return{start:l,end:h}},e.prototype.limitRange=function(t,e,o,i,r){var n=this.options;if(t<o&&r<0&&(!st(n.min)||n.min<=o)||i<e&&r>0&&(!st(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=ft(t,o,i),p=ft(t+s,o+s,i)):e>i&&r>0&&(p=ft(e,o,i),a=ft(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?x:m,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=ft(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}(qt);wt(Be,{labels:{visible:!0,rotation:0,mirror:!1,step:1,skip:0},line:{width:1,color:n,visible:!0},title:{visible:!0,position:a},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:n,skip:0,step:1},margin:5,visible:!0,reverse:!1,justified:!0,notes:{label:{text:""}},_alignLines:!0,_deferLabels:!1});var Le=Be,Ie="days",De="years",je={years:31536e6,months:26784e5,weeks:6048e5,days:864e5,hours:36e5,minutes:6e4,seconds:1e3,milliseconds:1};function ze(t,e){return t.getTime()-e-6e4*(t.getTimezoneOffset()-e.getTimezoneOffset())}function Ve(t,e){return new Date(t.getTime()+e)}function He(t){var e;return t instanceof Date?e=t:t&&(e=new Date(t)),e}function Ne(t,e){return 0===e&&23===t.getHours()&&(t.setHours(t.getHours()+2),!0)}function Ue(t,e,o,i){var r=t;if(t){var n=He(t),s=n.getHours();o===De?Ne(r=new Date(n.getFullYear()+e,0,1),0):"months"===o?Ne(r=new Date(n.getFullYear(),n.getMonth()+e,1),s):"weeks"===o?Ne(r=Ue(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 Ve(t,864e5*-o)}(n,i),7*e,Ie),s):o===Ie?Ne(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 Ve(o,i+36e5*e)}(n,e):"minutes"===o?(r=Ve(n,6e4*e)).getSeconds()>0&&r.setSeconds(0):"seconds"===o?r=Ve(n,1e3*e):"milliseconds"===o&&(r=Ve(n,e)),"milliseconds"!==o&&r.getMilliseconds()>0&&r.setMilliseconds(0)}return r}function Fe(t,e,o){return Ue(He(t),0,e,o)}function Ge(t,e,o){var i=He(t);return i&&Fe(i,e,o).getTime()===i.getTime()?i:Ue(i,1,e,o)}function We(t,e){return t&&e?t.getTime()-e.getTime():-1}function Xe(t,e){return t.getTime()-e}function Ye(t){if(b(t)){for(var e=[],o=0;o<t.length;o++)e.push(Ye(t[o]));return e}if(t)return He(t).getTime()}function qe(t,e){return t&&e?Ye(t)===Ye(e):t===e}function Ze(t,e,o){return ze(t,e)/je[o]}function Qe(t,e,o,i){var r=He(t),n=He(e);return("months"===o?r.getMonth()-n.getMonth()+12*(r.getFullYear()-n.getFullYear())+Ze(r,new Date(r.getFullYear(),r.getMonth()),Ie)/new Date(r.getFullYear(),r.getMonth()+1,0).getDate():o===De?r.getFullYear()-n.getFullYear()+Qe(r,new Date(r.getFullYear(),0),"months",1)/12:o===Ie||"weeks"===o?Ze(r,n,o):Xe(r,e)/je[o])/i}function Ke(t,e,o){return o===De?e.getFullYear()-t.getFullYear():"months"===o?12*Ke(t,e,De)+e.getMonth()-t.getMonth():o===Ie?Math.floor(Xe(e,t)/864e5):Math.floor(Xe(e,t)/je[o])}function $e(t,e){return T(e)&&t.parseDate(e)||He(e)}function Je(t,e){if(b(e)){for(var o=[],i=0;i<e.length;i++)o.push($e(t,e[i]));return o}return $e(t,e)}function to(t,e){return P(t.weekStartDay)?t.weekStartDay:e&&e.firstDay?e.firstDay():0}var eo=function(t){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=st(t.min),i=st(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:P(t.min)?t.min%1:0,max:P(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=P(o.min)?o.min:0;if(e=P(o.max)?o.max:P(o.min)?i+o.categories.length:this.totalRange().max||1,t){var r=this.totalRange();i=ft(i,0,r.max),e=ft(e,0,r.max)}return{min:i,max:e}},e.prototype.range=function(){var t=this.options;return{min:P(t.min)?t.min:0,max:P(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?x:m,i=t[o+1],r=t[o+2],n=e[0],s=dt(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?x:m)+(i?2:1)],l=this.tickIndices(t),h=[],c=0;c<l.length;c++)h.push(p+vt(n*(l[c]-a),3));return h},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?x:m,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?x:m,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,l=s.min,h=this.lineInfo(),c=h.axis,u=h.lineStart,d=p.clone(),f=!st(e),g=xt(t,0),y=xt(e,g);y=Math.max(y-1,g);var v=u+(g-l)*a,m=u+((y=Math.max(g,y))+1-l)*a;return f&&n&&(m=v),o&&(v=ft(v,p[c+1],p[c+2]),m=ft(m,p[c+1],p[c+2])),d[c+1]=r?m:v,d[c+2]=r?v:m,d},e.prototype.limitSlot=function(t){var e=this.options.vertical?x:m,o=this.lineBox(),i=t.clone();return i[e+1]=ft(t[e+1],o[e+1],o[e+2]),i[e+2]=ft(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):P(n)&&(n-=r),"string"==typeof s?s=this.categoryIndex(s):P(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?x:m,n=this.scaleOptions(),s=n.scale,a=n.box,p=n.min,l=n.max,h=o?l:p,c=a[r+1],u=a[r+2],d=t[r];if(d<c||d>u)return null;var f=h+(d-c)/s,g=f%1;return i?f=Math.round(f):0===g&&f>0&&f--,Math.floor(f)},e.prototype.getCategory=function(t){var e=this.pointCategoryIndex(t);return null===e?null:this.options.categories[e]},e.prototype.categoryIndex=function(t){return this.totalIndex(t)-Math.floor(this.options.min||0)},e.prototype.categoryAt=function(t,e){var 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=vt(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,l=i.max-a;return l-p<.1&&(l=p+.1),{min:p,max:l}},e.prototype.zoomRange=function(t,e){var o=this.totalRange(),i=o.min,r=o.max,n=this.scaleRange(t,e);return{min:ft(n.min,i,r),max:ft(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=xt(i.categories[t],"");o.dataItem=r;var s=this.axisLabelText(n,e,o);return new fe(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?x:m,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=vt(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?x:m,n=this.totalRangeIndices(!0),s=this.scaleOptions(),a=s.scale,p=s.box[r+(i?2:1)],l=t[r]-p,h=e[r]-p,c=n.min+l/a,u=n.min+h/a,d=Math.min(c,u),f=Math.max(c,u);if(f-d>=.01)return{min:d,max:f}},e.prototype.valueRange=function(){return this.range()},e.prototype.totalIndex=function(t){var e=this.options;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(qe(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 P(t.min)&&(e=Math.floor(t.min)),{min:e,max:P(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 Z,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}(Le);wt(eo,{type:"category",vertical:!1,majorGridLines:{visible:!1,width:1,color:n},labels:{zIndex:1},justified:!1,_deferLabels:!0});var oo=eo,io={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"},ro=["milliseconds","seconds","minutes","hours",Ie,"weeks","months",De];function no(t){var e=t._range;return e||((e=t._range=Ct(t)).min=He(e.min),e.max=He(e.max)),e}var so=function(t){this.options=t};so.prototype.displayIndices=function(){return{min:0,max:1}},so.prototype.displayRange=function(){return{}},so.prototype.total=function(){return{}},so.prototype.valueRange=function(){return{}},so.prototype.valueIndex=function(){return-1},so.prototype.values=function(){return[]},so.prototype.totalIndex=function(){return-1},so.prototype.valuesCount=function(){return 0},so.prototype.totalCount=function(){return 0},so.prototype.dateAt=function(){return null};var ao=function(t,e,o){this.options=o,o.baseUnitStep=o.baseUnitStep||1;var i=o.roundToBaseUnit,r=o.justified;this.start=Ue(t,0,o.baseUnit,o.weekStartDay);var n=this.roundToTotalStep(e),s=!r&&qe(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 l=!r&&qe(p,this.roundToTotalStep(p))?-1:0;this.valueEnd=this.roundToTotalStep(p,!1,l),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 po(t,e,o){for(var i,r,n,s=no(t.categories),a=(t.max||s.max)-(t.min||s.min),p=t.autoBaseUnitSteps,l=t.maxDateGroups,h="fit"===t.baseUnit,c=e?ro.indexOf(e):0,u=h?ro[c++]:t.baseUnit,d=a/je[u],f=d;!r||d>=l;){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===dt(ro)){r=Math.ceil(f/l);break}if(!h){d>l&&(r=Math.ceil(f/l));break}u=ro[c++]||dt(ro),f=a/je[u],i=null}}t.baseUnitStep=r,t.baseUnit=u}function lo(t){var e=(t.baseUnit||"").toLowerCase();return"fit"!==e&&!Q(e,ro)&&function(t){for(var e,o,i=t.categories,r=st(i)?i.length:0,n=u,s=0;s<r;s++){var a=i[s];if(a&&e){var p=ze(a,e);p>0&&(o=(n=Math.min(n,p))>=31536e6?De:n>=24192e5?"months":n>=6048e5?"weeks":n>=864e5?Ie:n>=36e5?"hours":n>=6e4?"minutes":"seconds")}e=a}t.baseUnit=o||Ie}(t),"fit"!==e&&"auto"!==t.baseUnitStep||po(t),t}ao.prototype.displayRange=function(){return{min:this.displayStart,max:this.displayEnd}},ao.prototype.displayIndices=function(){if(!this._indices){var t=this.options,e=t.baseUnit,o=t.baseUnitStep,i=Qe(this.displayStart,this.valueStart,e,o),r=Qe(this.displayEnd,this.valueStart,e,o);this._indices={min:i,max:r}}return this._indices},ao.prototype.total=function(){return{min:this.start,max:this.end}},ao.prototype.totalCount=function(){return this.totalIndex(this.end)+(this.options.justified?1:0)},ao.prototype.valueRange=function(){return{min:this.valueStart,max:this.valueEnd}},ao.prototype.valueIndex=function(t){var e=this.options;return Math.floor(Qe(t,this.valueStart,e.baseUnit,e.baseUnitStep))},ao.prototype.totalIndex=function(t){var e=this.options;return Math.floor(Qe(t,this.start,e.baseUnit,e.baseUnitStep))},ao.prototype.dateIndex=function(t){var e=this.options;return Qe(t,this.valueStart,e.baseUnit,e.baseUnitStep)},ao.prototype.valuesCount=function(){return this.valueIndex(this.valueEnd)+1},ao.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=Ue(i,e.baseUnitStep,e.baseUnit,e.weekStartDay)}return t},ao.prototype.dateAt=function(t,e){var o=this.options;return Ue(e?this.start:this.valueStart,o.baseUnitStep*t,o.baseUnit,o.weekStartDay)},ao.prototype.roundToTotalStep=function(t,e,o){var i=this.options,r=i.baseUnit,n=i.baseUnitStep,s=i.weekStartDay,a=this.start,p=Qe(t,a,r,n),l=e?Math.ceil(p):Math.floor(p);return o&&(l+=o),Ue(a,l*n,r,s)};var 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.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=Je(o,r))._parsed=!0),i=R({roundToBaseUnit:!0},i,{categories:r,min:$e(o,i.min),max:$e(o,i.max),weekStartDay:to(i,o)}),e.panning&&e.isPannable(i.vertical?x:m)&&(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=no(r),s=i.maxDivisions;if(this.dataRange=new ao(n.min,n.max,lo(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}),l=this.dataRange.options;po(p,l.baseUnit,l.baseUnitStep),this.divisionRange=new ao(n.min,n.max,p)}else this.divisionRange=this.dataRange}else i.baseUnit=i.baseUnit||Ie,this.dataRange=this.divisionRange=new so(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 l=n.length-1;n.splice(p,0,n[l-1]+(n[l]-n[l-1])*e)}return n},e.prototype.shouldRenderNote=function(t){var e=this.range(),o=this.options.categories||[];return We(t,e.min)>=0&&We(t,e.max)<=0&&o.length},e.prototype.parseNoteValue=function(t){return $e(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),l=vt(t/p,10);if(a.min&&a.max){var h=Ve(e.min||a.min,l),c=Ve(e.max||a.max,l);a={min:Ue(h,0,o,i),max:Ue(c,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=vt(t/(i/(s-n)),10)*(e.reverse?-1:1),l=Ve(n,p),h=Ve(s,p),c=this.limitRange(Ye(l),Ye(h),Ye(a.min),Ye(a.max),p);return c?(c.min=He(c.min),c.max=He(c.max),c.baseUnit=e.baseUnit,c.baseUnitStep=e.baseUnitStep||1,c.userSetBaseUnit=e.userSetBaseUnit,c.userSetBaseUnitStep=e.userSetBaseUnitStep,c):void 0},e.prototype.pointsRange=function(e,o){if(this.isEmpty())return null;var i=t.prototype.pointsRange.call(this,e,o),r=this.dataRange.displayRange(),n=this.dataRange.displayIndices(),s=Xe(r.max,r.min)/(n.max-n.min),a=this.options;return{min:Ve(r.min,i.min*s),max:Ve(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)),l=a-s,h=this.scaleToDelta(t,l),c=Math.round(p*h),u=Math.round((1-p)*h),d=this.dataRange.options.baseUnit,f=new Date(s.getTime()+c),g=new Date(a.getTime()-u);if(i){var y,v,m=o.autoBaseUnitSteps,x=o.maxDateGroups,b=dt(m[d])*x*je[d],_=Xe(a,s),w=Xe(g,f),C=ro.indexOf(d);if(w<je[d]&&"milliseconds"!==d)d=ro[C-1],f=Ve(s,v=(_-(x-1)*(y=dt(m[d]))*je[d])/2),g=Ve(a,-v);else if(w>b&&d!==De){var k=0;do{C++,d=ro[C],k=0,v=2*je[d];do{y=m[d][k],k++}while(k<m[d].length&&v*y<_)}while(d!==De&&v*y<_);(v=(v*y-_)/2)>0&&(f=Ve(s,-v),g=Ve(a,v),f=Ve(f,ft(g,r.min,r.max)-g),g=Ve(g,ft(f,r.min,r.max)-f))}}return f&&g&&Xe(g,f)>0?{min:f,max:g,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 fe(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:a,zIndex:r.zIndex});if(!0===n.visible){this.normalizeLabelRotation(n),n.alignRotation=a,"auto"===n.rotation&&(n.rotation=0,r.autoRotateRangeLabels=!0);var s=n.dateFormats[this.divisionRange.options.baseUnit];n.format=n.format||s;var p=function(e,o,i){if(i){var r=new fe(o,i,e,null,n);t.append(r),t.rangeLabels.push(r)}};p(0,o,this.axisLabelText(o,n,{index:0,count:2})),p(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 Nt))},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=no(this.options.srcCategories);return{min:He(t.min),max:He(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=no(t.srcCategories);return new ao(e.min,e.max,Object.assign({},t,{justified:!1,roundToBaseUnit:!0,justifyEnd:t.justified})).displayRange()},e}(oo);wt(ho,{type:l,labels:{dateFormats:io},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 co=ho;function uo(t,e){return vt(Math.floor(t/e)*e,10)}function fo(t,e){return vt(Math.ceil(t/e)*e,10)}function go(t){return Math.max(Math.min(t,3e5),-3e5)}var yo=Math.pow(10,-9),vo=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=zt(r,n),a={majorUnit:s};!1!==o.roundToMajorUnit&&(r<0&&mo(r,s,1/3)&&(r-=s),n>0&&mo(n,s,1/3)&&(n+=s));return a.min=uo(r,s),a.max=fo(n,s),a}(t.seriesMin,t.seriesMax,t);return this.totalOptions=function(t,e){return{min:st(e.min)?Math.min(t.min,e.min):t.min,max:st(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=st(e.min),i=st(e.max);var n=o||i;n&&e.min===e.max&&(e.min>0?e.min=0:e.max=1),e.majorUnit?(t.min=uo(t.min,e.majorUnit),t.max=fo(t.max,e.majorUnit)):n&&(r=R(t,e),t.majorUnit=zt(r.min,r.max))}t.minorUnit=(r.majorUnit||t.majorUnit)/5;var s=R(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(vt(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),l=[],h=s[n],c=0;e&&(c=e/t);for(var u=0;u<p;u++)u%c!=0&&l.push(vt(h,3)),h+=a*r;return l},e.prototype.getMajorTickPositions=function(){return this.getTickPositions(this.options.majorUnit)},e.prototype.getMinorTickPositions=function(){return this.getTickPositions(this.options.minorUnit)},e.prototype.getSlot=function(t,e,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,l=r.lineStart,h=s*(p/(i.max-i.min)),c=xt(t,e||0),u=xt(e,t||0);o&&(c=ft(c,i.min,i.max),u=ft(u,i.min,i.max));var d=Math.min(c,u)-i.min,f=Math.max(c,u)-i.min,g=new Nt(a.x1,a.y1,a.x1,a.y1);return g[n+1]=go(l+h*(s>0?d:f)),g[n+2]=go(l+h*(s>0?f:d)),g},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:vt(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=vt(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=vt(i.min+t*i.majorUnit,10),n=this.axisLabelText(r,e,o);return new fe(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=vt(this.options.min+n,10),p=vt(this.options.max-s,10);return p-a<yo&&(p=a+yo),{min:a,max:p}},e.prototype.zoomRange=function(t,e){var o=this.totalMin,i=this.totalMax,r=this.scaleRange(t,e);return{min:ft(r.min,o,i),max:ft(r.max,o,i),narrowRange:!1}},e.prototype.isValidRange=function(t,e){return e-t>yo},e}(Le);function mo(t,e,o){var i=vt(Math.abs(t%e),10);return 0===i||i>e*(1-o)}wt(vo,{type:"numeric",min:0,max:1,vertical:!0,majorGridLines:{visible:!0,width:1,color:n},labels:{format:"#.####################"},zIndex:1});var xo=vo,bo=function(t){function e(e,o,i,r){var n=He(e),s=He(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=De:t>=26784e5?e="months":t>=6048e5?e="weeks":t>=864e5&&(e=Ie);return e}(ze(r,i)):"hours"),s=je[n],a=o.weekStartDay||0,p=Fe(Ye(i)-1,n,a)||He(r),l=Ge(Ye(r)+1,n,a),h=(o.majorUnit?o.majorUnit:void 0)||fo(zt(p.getTime(),l.getTime()),s)/s,c=Ke(p,l,n),u=fo(c,h)-c,d=Math.floor(u/2),f=u-d;o.baseUnit||delete o.baseUnit;return o.baseUnit=o.baseUnit||n,o.min=o.min||Ue(p,-d,n,a),o.max=o.max||Ue(l,f,n,a),o.minorUnit=o.minorUnit||h/5,o.majorUnit=h,o}(n,s,p=R(p||{},{min:$e(a,p.min),max:$e(a,p.max),axisCrossingValue:Je(a,p.axisCrossingValues||p.axisCrossingValue),weekStartDay:to(p,a)})),t.call(this,p,r),this.intlService=a,this.seriesMin=n,this.seriesMax=s;var l=p.weekStartDay||0;this.totalMin=Ye(Fe(Ye(n)-1,p.baseUnit,l)),this.totalMax=Ye(Ge(Ye(s)+1,p.baseUnit,l))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.clone=function(){return new e(this.seriesMin,this.seriesMax,Object.assign({},this.options),this.chartService)},e.prototype.range=function(){var t=this.options;return{min:t.min,max:t.max}},e.prototype.getDivisions=function(t){var e=this.options;return Math.floor(Ke(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/Xe(e.max,e.min),p=e.weekStartDay||0,l=[n],h=1;h<s;h++){var c=n+Xe(Ue(e.min,h*t,e.baseUnit,p),e.min)*a*i;l.push(vt(c,3))}return l},e.prototype.getMajorTickPositions=function(){return this.getTickPositions(this.options.majorUnit)},e.prototype.getMinorTickPositions=function(){return this.getTickPositions(this.options.minorUnit)},e.prototype.getSlot=function(t,e,o){return xo.prototype.getSlot.call(this,$e(this.intlService,t),$e(this.intlService,e),o)},e.prototype.getValue=function(t){var e=xo.prototype.getValue.call(this,t);return null!==e?He(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=Ue(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 fe(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/Xe(s.max,s.min),p=vt(t/a,10);return!i&&!r||i&&r||(p=-p),{min:Ve(e.min,p),max:Ve(e.max,p),offset:p}},e.prototype.shouldRenderNote=function(t){var e=this.range();return We(t,e.min)>=0&&We(t,e.max)<=0},e.prototype.pan=function(t){var e=this.translateRange(t,!0),o=this.limitRange(Ye(e.min),Ye(e.max),this.totalMin,this.totalMax,e.offset);if(o)return{min:He(o.min),max:He(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:He(r),max:He(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=He(Ye(this.options.min)+n),p=He(Ye(this.options.max)-s);return p-a<1e3&&(p=He(Ye(a)+1e3)),{min:a,max:p}},e.prototype.zoomRange=function(t,e){var o=this.scaleRange(t,e);return{min:He(ft(Ye(o.min),this.totalMin,this.totalMax)),max:He(ft(Ye(o.max),this.totalMin,this.totalMax))}},e}(Le);wt(bo,{type:l,majorGridLines:{visible:!0,width:1,color:n},labels:{dateFormats:io}});var _o=bo,wo=function(t){function e(e,o,i,r){var n=R({majorUnit:10,min:e,max:o},i),s=n.majorUnit,a=function(t,e){var o,i=vt(ko(t,e),10)%1;o=t<=0?e:0!==i&&(i<.3||i>.9)?Math.pow(e,ko(t,e)+.2):Math.pow(e,Math.ceil(ko(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(ko(t,i))));return r}(e,o,n),l=function(t,e,o,i){var r=o.min,n=o.max;st(o.axisCrossingValue)&&o.axisCrossingValue<=0&&Co();st(i.max)?i.max<=0&&Co():n=e;st(i.min)?i.min<=0&&Co():r=t;return{min:r,max:n}}(p,a,n,i);n.max=l.max,n.min=l.min,n.minorUnit=i.minorUnit||vt(s-1,10),t.call(this,n,r),this.totalMin=st(i.min)?Math.min(p,i.min):p,this.totalMax=st(i.max)?Math.max(a,i.max):a,this.logMin=vt(ko(l.min,s),10),this.logMax=vt(ko(l.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,l=this.lineInfo(),h=l.axis,c=l.axisDir,u=l.lineBox,d=l.lineSize,f=l.lineStart,g=c*(d/(n-r)),y=xt(t,e||1),v=xt(e,t||1);if(y<=0||v<=0)return null;o&&(y=ft(y,a,p),v=ft(v,a,p)),y=ko(y,s),v=ko(v,s);var m=Math.min(y,v)-r,x=Math.max(y,v)-r,b=new Nt(u.x1,u.y1,u.x1,u.y1);return b[h+1]=go(f+g*(c>0?m:x)),b[h+2]=go(f+g*(c>0?x:m)),b},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,l=n.lineSize,h=(i-o)/l,c=a*(t[s]-p);if(c<0||c>l)return null;var u=o+c*h;return vt(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(),l=vt(t/(p/(i-o)),10);return!n&&!r||n&&r||(l=-l),{min:Math.pow(s,o+l),max:Math.pow(s,i+l),offset:l}},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(Ee(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 l(t,e){Q(t,a)||(s.position=t,p.append(Re(s,e)),a.push(t))}return i.visible&&this.traverseMajorTicksPositions(l,i),o.visible&&this.traverseMinorTicksPositions(l,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(vt(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,l=a.step,h=this.logMin,c=this.logMax,u=Math.floor(h);u<c;u++)for(var d=this._minorIntervalOptions(u),f=e.skip;f<n;f+=e.step){var g=d.value+f*d.minorStep;if(g>r)break;if(g>=i)t(vt(p+l*(ko(g,s)-h),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 fe(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=ko(this.options.min,o),r=ko(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),l=Math.pow(o,r-(1-n)*a);return l-p<1e-6&&(l=p+1e-6),{min:p,max:l}},e.prototype.zoomRange=function(t,e){var o=this.scaleRange(t,e),i=this.totalMin,r=this.totalMax;return{min:ft(o.min,i,r),max:ft(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}(Le);function Co(){throw new Error("Non positive values cannot be used for a logarithmic axis")}function ko(t,e){return Math.log(t)/Math.log(e)}wt(wo,{type:"log",majorUnit:10,minorUnit:1,axisCrossingValue:1,vertical:!0,majorGridLines:{visible:!0,width:1,color:n},zIndex:1,_deferLabels:!0});var So=wo,Ao={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),rt(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 k.geometry.Circle([n.x,n.y],e),a=this.gridLinesVisual(),p=0;p<t.length;p++){var l=new k.drawing.Path(r);i&&(s.radius=i(t[p])),l.moveTo(s.center).lineTo(s.pointAt(t[p]+180)),a.append(l)}return a.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 tt(s,(function(t){var e=n.intervalAngle(t);if(!p||90!==e)return e}))}},Po=function(t){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 Nt,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=[],l=0,h=e||0;h<n;h+=a)l=r.reverse?360-h*s:h*s,l=vt(l,3)%360,i&&Q(l,i)||p.push(l);return p},e.prototype.majorIntervals=function(){return this.intervals(1)},e.prototype.minorIntervals=function(){return this.intervals(.5)},e.prototype.intervalAngle=function(t){return(360+t+this.options.startAngle)%360},e.prototype.majorAngles=function(){var t=this;return tt(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!==r){var i=yt(360/(2*this.options.categories.length)),n=Math.cos(i)*t,s=this.majorAngles(),a=function(e){return!o&&Q(e,s)?t:n};return a}},e.prototype.createPlotBands=function(){for(var t=this.options.plotBands||[],e=this._plotbandGroup=new k.drawing.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 a=Math.ceil(i.to)-i.to;r.angle-=(a+s)*n.angle;var p=Xt.current.createRing(r,{fill:{color:i.color,opacity:i.opacity},stroke:{opacity:i.opacity}});e.append(p)}this.appendVisual(e)},e.prototype.plotBandSlot=function(t){return this.getSlot(t.from,t.to-1)},e.prototype.getSlot=function(t,e){var 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 l=n[p=ft(Math.floor(p),0,s-1)];i&&(l-=a/2)<0&&(l+=360);var h=a*(ft(Math.ceil(e||p),p,s-1)-p+1);return new Ft(r.center(),0,r.height()/2,l,h)},e.prototype.slot=function(t,e){var o=this.getSlot(t,e),i=o.startAngle+180,r=i+o.angle;return new k.geometry.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}(oo);wt(Po,{startAngle:90,labels:{margin:z(10)},majorGridLines:{visible:!0},justified:!0}),R(Po.prototype,Ao);var To=Po,Oo=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 xo.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 Nt,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 l=(360+r+p*t)%360;i&&Q(l,i)||s.push(l)}return s},e.prototype.majorIntervals=function(){return this.intervals(this.options.majorUnit)},e.prototype.minorIntervals=function(){return this.intervals(this.options.minorUnit)},e.prototype.intervalAngle=function(t){return(540-t-this.options.startAngle)%360},e.prototype.createLine=function(){return[]},e.prototype.majorGridLineAngles=function(t){var e=this.options.majorGridLines;return this.gridLineAngles(t,this.options.majorUnit,e.skip,e.step)},e.prototype.minorGridLineAngles=function(t,e){var 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=ft(t,o.min,o.max),s=ft(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 Ft(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),p=Math.max(t,e);return r.reverse?(o=a,i=p):(o=360-p,i=360-a),o=(o+n)%360,i=(i+n)%360,new k.geometry.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(at(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}(Le);wt(Oo,{type:"polar",startAngle:0,reverse:!1,majorUnit:60,min:0,max:360,labels:{margin:z(10)},majorGridLines:{color:n,visible:!0,width:1},minorGridLines:{color:"#aaa"}}),R(Oo.prototype,Ao,{createPlotBands:To.prototype.createPlotBands,majorAngles:To.prototype.majorAngles,range:xo.prototype.range,labelsCount:xo.prototype.labelsCount,createAxisLabel:xo.prototype.createAxisLabel});var Mo=Oo;function Eo(t,e){return 180-Math.abs(Math.abs(t-e)-180)}var Ro={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,n=i.majorAngles(),s=i.box.center(),a=this._plotbandGroup=new k.drawing.Group({zIndex:-1}),p=0;p<o.length;p++){var l=o[p],h={fill:{color:l.color,opacity:l.opacity},stroke:{opacity:l.opacity}},c=this.getSlot(l.from,l.to,!0),u=new Ft(s,s.y-c.y2,s.y-c.y1,0,360),d=void 0;d=e===r?Xt.current.createRing(u,h):k.drawing.Path.fromPoints(this.plotBandPoints(u,n),h).close(),a.append(d)}this.appendVisual(a)},plotBandPoints:function(t,e){for(var o=[],i=[],r=[t.center.x,t.center.y],n=new k.geometry.Circle(r,t.innerRadius),s=new k.geometry.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();rt(n,this.renderGridLines(r,s,i,e.minorGridLines))}return n},renderGridLines:function(t,e,o,i){var n={stroke:{width:i.width,color:i.color,dashType:i.dashType}},s=i.skip;void 0===s&&(s=0);var a=i.step;void 0===a&&(a=0);for(var p=this.gridLinesVisual(),l=s;l<e.length;l+=a){var h=t.y-e[l];if(h>0){var c=new k.geometry.Circle([t.x,t.y],h);if(i.type===r)p.append(new k.drawing.Circle(c,n));else{for(var u=new k.drawing.Path(n),d=0;d<o.length;d++)u.lineTo(c.pointAt(o[d]+180));u.close(),p.append(u)}}}return p.children},getValue:function(t){var e=this.lineBox(),o=this.plotArea.polarAxis,i=o.majorAngles(),n=o.box.center(),s=t.distanceTo(n),a=s;if(this.options.majorGridLines.type!==r&&i.length>1){var p=t.x-n.x,l=t.y-n.y,h=(at(Math.atan2(l,p))+540)%360;i.sort((function(t,e){return Eo(t,h)-Eo(e,h)}));var c=90-Eo(i[0],i[1])/2,u=180-Eo(h,i[0])-c;a=s*(Math.sin(yt(u))/Math.sin(yt(c)))}return this.axisType().prototype.getValue.call(this,new Vt(e.x1,e.y2-a))}},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.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}(xo);R(Bo.prototype,Ro);var Lo=Bo,Io=function(t){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}(So);R(Io.prototype,Ro);var Do=Io;function jo(t){return t<=0?-1:1}var zo=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],p=e[1],l=e[2];for(o.push(new k.geometry.Segment(a));a.equals(e[r-1]);)i=!0,e.pop(),r--;if(2===r){var h=this.tangent(a,p,m,x);return dt(o).controlOut(this.firstControlPoint(h,a,p,m,x)),o.push(new k.geometry.Segment(p,this.secondControlPoint(h,a,p,m,x))),o}if(i){a=e[r-1],p=e[0],l=e[1];var c=this.controlPoints(a,p,l);n=c[1],s=c[0]}else{var u=this.tangent(a,p,m,x);n=this.firstControlPoint(u,a,p,m,x)}for(var d=n,f=0;f<=r-3;f++)if(this.removeDuplicates(f,e),f+3<=(r=e.length)){a=e[f],p=e[f+1],l=e[f+2];var g=this.controlPoints(a,p,l);dt(o).controlOut(d),d=g[1];var y=g[0];o.push(new k.geometry.Segment(p,y))}if(i){a=e[r-2],p=e[r-1],l=e[0];var v=this.controlPoints(a,p,l);dt(o).controlOut(d),o.push(new k.geometry.Segment(p,v[0])),dt(o).controlOut(v[1]),o.push(new k.geometry.Segment(l,s))}else{var b=this.tangent(p,l,m,x);dt(o).controlOut(d),o.push(new k.geometry.Segment(l,this.secondControlPoint(b,p,l,m,x)))}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||vt(r,1)===vt(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=m,n=x,s=!1,a=!1;if(this.isLine(t,e,o))i=this.tangent(t,e,m,x);else{var p={x:this.isMonotonicByField(t,e,o,m),y:this.isMonotonicByField(t,e,o,x)};if(p.x&&p.y)i=this.tangent(t,o,m,x),s=!0;else if(this.invertAxis(t,e,o)&&(r=x,n=m),p[r])i=0;else i=.01*(o[n]<t[n]&&t[n]<=e[n]||t[n]<o[n]&&e[n]<=t[n]?jo((o[n]-t[n])*(e[r]-t[r])):-jo((o[r]-t[r])*(e[n]-t[n]))),a=!0}var l=this.secondControlPoint(i,t,e,r,n);if(a){var h=r;r=n,n=h}var c=this.firstControlPoint(i,e,o,r,n);return s&&(this.restrictControlPoint(t,e,l,i),this.restrictControlPoint(e,o,c,i)),[l,c]},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 k.geometry.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}(k.Class),Vo=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}(k.Class);function Ho(t,e){for(var o=0;o<e.length;o++)if(e[o].options.name===t)return e[o].prepareUserOptions(),new Vo(e[o])}var No=function(t){this.visual=t.visual,this.chartsVisual=t.chartContainer.visual,this._pane=t};No.prototype.findAxisByName=function(t){return Ho(t,this._pane.axes)};var Uo=No,Fo=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}(k.Class);function Go(t){for(var e=t.length,o=0,i=0;i<e;i++){P(t[i])&&o++}return o}var Wo={min:function(t){for(var e=t.length,o=u,i=0;i<e;i++){var r=t[i];P(r)&&(o=Math.min(o,r))}return o===u?t[0]:o},max:function(t){for(var e=t.length,o=d,i=0;i<e;i++){var r=t[i];P(r)&&(o=Math.max(o,r))}return o===d?t[0]:o},sum:function(t){for(var e=t.length,o=0,i=0;i<e;i++){var r=t[i];P(r)&&(o+=r)}return o},sumOrNull:function(t){var e=null;return Go(t)&&(e=Wo.sum(t)),e},count:function(t){for(var e=t.length,o=0,i=0;i<e;i++){var r=t[i];null!==r&&st(r)&&o++}return o},avg:function(t){var e=Go(t),o=t[0];return e>0&&(o=Wo.sum(t)/e),o},first:function(t){for(var e=t.length,o=0;o<e;o++){var i=t[o];if(null!==i&&st(i))return i}return t[0]}},Xo=Wo;function Yo(t,e){return null===e?e:W(t)(e)}var qo=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=[y]),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]||[y]},e.prototype.otherFields=function(t){return this._otherFields[t.type]||[y]},e.prototype.bindPoint=function(t,e,o){var i,r,n=t.data,s=st(o)?o:n[e],a={valueFields:{value:s}},p=this.valueFields(t),l=this._otherFields[t.type];if(null===s)r=this._nullValue[t.type];else if(st(s)){if(Array.isArray(s)){var h=s.slice(p.length);r=this._bindFromArray(s,p),i=this._bindFromArray(h,l)}else if("object"==typeof s){var c=this.sourceFields(t,p),u=this.sourceFields(t,l);r=this._bindFromObject(s,p,c),i=this._bindFromObject(s,l,u)}}else r=this._undefinedValue[t.type];return st(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]=Yo(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===y?"field":n+"Field";o.push(null!==t[s]?t[s]||n:null)}return o},e}(k.Class);qo.current=new qo;var Zo=qo,Qo=/percent(?:\w*)\((\d+)\)/,Ko=new RegExp("^stddev(?:\\((\\d+(?:\\.\\d+)?)\\))?$"),$o=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=Ko.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 l=this.getStandardError(i,this.getAverage(i));this.globalRange=function(t){return{low:t-l,high:t+l}}}},e.prototype.createValueGetter=function(t,e){var o,i=t.data,r=Zo.current,n=r.valueFields(t),s=st(i[0])?i[0]:{};if(b(s))o=W("["+(e?n.indexOf(e):0)+"]");else if(P(s))o=W();else if("object"==typeof s){o=W(r.sourceFields(t,n)[n.indexOf(e)])}return o},e.prototype.getErrorRange=function(t,e){var o,i,r;if(!st(e))return null;if(this.globalRange)return this.globalRange(t);if(b(e))o=t-e[0],i=t+e[1];else if(P(r=parseFloat(e)))o=t-r,i=t+r;else{if(!(r=Qo.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]);P(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]);P(n)&&(o+=n,i++)}return{value:o/i,count:i}},e}(k.Class),Jo=k.support.browser||{},ti=Jo.msie?.001:0,ei="zero",oi="bar",ii="column",ri="line",ni="pie",si="verticalLine",ai=[oi,ii,"ohlc","candlestick","boxPlot","verticalBoxPlot","bullet","rangeColumn","rangeBar","waterfall","horizontalWaterfall"],pi="DOMMouseScroll mousewheel",li=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,l=a+s;i?(e=[new Vt(n.x,r.y1),new Vt(n.x,r.y2)],o&&e.push(new Vt(p,r.y1),new Vt(l,r.y1),new Vt(p,r.y2),new Vt(l,r.y2)),this.box=new Nt(p,r.y1,l,r.y2)):(e=[new Vt(r.x1,n.y),new Vt(r.x2,n.y)],o&&e.push(new Vt(r.x1,p),new Vt(r.x1,l),new Vt(r.x2,p),new Vt(r.x2,l)),this.box=new Nt(r.x1,p,r.x2,l)),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 k.drawing.Path(i).moveTo(o[r].x,o[r].y).lineTo(o[r+1].x,o[r+1].y);S(n),this.visual.append(n)}},e}(qt);wt(li,{animation:{type:"fadeIn",delay:600},endCaps:!0,line:{width:2},zIndex:1});var hi=li,ci=function(t){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}(hi);function ui(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(!Q(a,o.excluded)&&t.hasOwnProperty(a)){var p=t[a];M(p)?(s=!0,i||(t[a]=xt(p(e),r[a]))):B(p)&&(i||(o.defaults=r[a]),o.depth++,s=ui(p,e,o,i)||s,o.depth--)}return s}function di(t){for(var e=t.length,o=0,i=0;i<e;i++)o=Math.max(o,t[i].data.length);return o}var fi=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=R({},i,{vertical:!this.options.invertAxes},t)}return o},e.prototype.plotValue=function(t){if(!t)return 0;if(this.options.isStacked100&&P(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;P(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 l=t.series.stack,h=p.series.stack;if(l&&h){if("string"==typeof l&&l!==h)continue;if(l.group&&l.group!==h.group)continue}var c=this.plotValue(p);(c>=0&&r||c<0&&!r)&&(n+=c,i+=c,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,O(t.value)?t.value:f]},e.prototype.stackLimits=function(t,e){for(var o=u,i=d,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];st(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 l=this.errorTotals;l&&(l.negative.length&&(p.min=Math.min(p.min,Ct(l.negative).min)),l.positive.length&&(p.max=Math.max(p.max,Ct(l.positive).max))),p.min!==u||p.max!==d?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,l=e.fields.errorHigh;P(p)&&P(l)?i={low:p,high:l}:a&&st(a.value)&&(this.seriesErrorRanges=this.seriesErrorRanges||[],this.seriesErrorRanges[s]=this.seriesErrorRanges[s]||new $o(a.value,n,y),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 l=new ci(n,s,o,this,r,i);t.errorBars=[l],t.append(l)},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,st(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];st(a)||(this._evalSeries[n]=a=ui(t,{},s,!0));var p=t;return a&&ui(p=R({},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:u,max:d}).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,l=e.seriesValueAxis(p),h=i[n++],c=o[a];if(c||(o[a]=c=e.categorySlot(r,a,l)),h){var u=e.plotRange(h,l.startValue()),d=e.valueSlot(l,u);if(d){var f=e.pointSlot(c,d);h.aboveAxis=e.aboveAxis(h,l),h.stackValue=u[1],e.options.isStacked100&&(h.percentage=e.plotValue(h)),e.reflowPoint(h,f)}else h.visible=!1}})),this.reflowCategories(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(dt(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 Nt(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=di(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 l=0;l<i;l++)this._outOfRangeCallback(e[l],"_outOfRangeMaxPoint",l,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]=Zo.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}(qt);wt(fi,{series:[],invertAxes:!1,isStacked:!1,clip:!0,limitPoints:!0});var gi=fi,yi={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:ct(t),originalEvent:t,point:this}}},vi={createNote:function(){var t=this.options.notes,e=this.noteText||t.label.text;!1!==t.visible&&st(e)&&null!==e&&(this.note=new ye({value:this.value,text:e,dataItem:this.dataItem,category:this.category,series:this.series},this.options.notes,this.owner.chartService),this.append(this.note))}},mi=function(t){function e(e,o){t.call(this),this.value=e,this.options=o,this.aboveAxis=xt(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=U(o),r=this.pointData(),n=this.value;i?n=i(r):o.format&&(n=this.formatValue(o.format)),this.label=new he(n,R({align:a,vAlign:a,margin:{left:5,right:5},zIndex:xt(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=R({color:this.color},t.border);return st(o.color)||(o.color=new k.Color(e).brightness(.8).toHex()),o},e.prototype.createVisual=function(){},e.prototype.createMarker=function(){var t=this.options.markers;return new $t({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:xt(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 Nt(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?g:i)?s: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 $t({type:o.type,width:i,height:i,rotation:o.rotation,background:t.color||e,border:{color:t.border.color,width:t.border.width,opacity:xt(t.border.opacity,1)},opacity:xt(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 k.geometry.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=s):(o=t.y2,i=g),{point:new Vt(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}(qt);mi.prototype.defaults={vertical:!0,markers:{visible:!0,background:v,size:8,type:p,border:{width:2},opacity:1},labels:{visible:!1,position:"above",margin:z(3),padding:z(4),animation:{type:"fadeIn",delay:600}},notes:{label:{}},highlight:{markers:{border:{color:"#fff",width:2}},zIndex:100},errorBars:{line:{width:1}}},R(mi.prototype,yi),R(mi.prototype,vi);var xi=mi,bi=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&&!st(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;M(o)&&i&&(o=i.color);var r=k.drawing.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}(qt);wt(bi,{closed:!1});var _i=bi;function wi(t,e,o,i,r){var n=t.box,s=new k.geometry.Point;return s[e]=n[e+o],s[i]=n[i+r],s}var Ci={calculateStepPoints:function(t){for(var e=this.parent.plotArea.seriesCategoryAxis(this.series).options,o=e.justified,i=e.vertical,r=e.reverse,n=i?m:x,s=i?x:m,a=r?2:1,p=a,l=wi(t[0],n,a,s,p),h=[l],c=1;c<t.length;c++){var u=wi(t[c],n,a,s,p);if(l[n]!==u[n]){var d=new k.geometry.Point;d[n]=l[n],d[s]=u[s],h.push(d,u)}l=u}return o?l!==dt(h)&&h.push(l):h.push(wi(dt(t),n,a,s,r?1:2)),h}},ki=function(t){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}(_i);R(ki.prototype,Ci);var Si=ki,Ai=function(t){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;M(o)&&e&&(o=e.color);var i=new zo(this.options.closed).process(this.points()),r=new k.drawing.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}(_i),Pi={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,l=[],h=0;h<p;h++){var c=a[h];c?l.push(c):"interpolate"!==this.seriesMissingValues(s)&&(l.length>1&&(t=this.createSegment(l,s,n,t),this._addSegment(t)),l=[])}l.length>1&&(t=this.createSegment(l,s,n,t),this._addSegment(t))}this.children.unshift.apply(this.children,this._segments)},_addSegment:function(t){this._segments.push(t),t.parent=this},sortPoints:function(t){return t},seriesMissingValues:function(t){var e=t.missingValues;return!e&&this.options.isStacked?ei:e||"interpolate"},getNearestPoint:function(t,e,o){for(var i,r=new Vt(t,e),n=this.seriesPoints[o],s=u,a=0;a<n.length;a++){var p=n[a];if(p&&st(p.value)&&null!==p.value&&!1!==p.visible){var l=p.box.center().distanceTo(r);l<s&&(i=p,s=l)}}return i}},Ti=function(t){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(K(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}(k.drawing.Animation);wt(Ti,{duration:600}),k.drawing.AnimationFactory.current.register("clip",Ti);var Oi=Ti;function Mi(t){for(var e=0;e<t.length;e++)if(st(t[e].zIndex))return!0}var Ei={createAnimation:function(){var t=this.getRoot();if(t&&!1!==(t.options||{}).transitions){var e=t.size(),o=k.drawing.Path.fromRect(e.toRect());this.visual.clip(o),this.animation=new Oi(o,{box:e}),Mi(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&&st(i.visual.options.zIndex)&&i.visual.clip(t)}}},Ri=function(t){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 xi},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(!st(a)||null===a){if(s!==ei)return null;a=0}var p=this.pointOptions(r,n);p=this.evalPointOptions(p,a,i,o,r,n);var l=t.fields.color||r.color;M(r.color)&&(l=p.color);var h=new xi(a,p);return h.color=l,this.append(h),h},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?Si:"smooth"===i?Ai:_i)(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}(gi);R(Ri.prototype,Pi,Ei);var Bi=Ri,Li=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;M(i)&&e&&(i=e.color),this.visual=new k.drawing.Group({zIndex:t.zIndex}),this.createFill({fill:{color:i,opacity:t.opacity},stroke:null}),o.width>0&&!1!==o.visible&&this.createStroke({stroke:R({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 k.geometry.Segment(t)}))},e.prototype.createStroke=function(t){var e=new k.drawing.Path(t);e.segments.push.apply(e.segments,this.strokeSegments()),this.visual.append(e)},e.prototype.hasStackSegment=function(){return this.prevSegment||this.stackPoints&&this.stackPoints.length},e.prototype.createFill=function(t){var e=this.strokeSegments(),o=e.slice(0),i=this.hasStackSegment();if(i){var r=this.stackSegments();rt(o,r)}var n=new k.drawing.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=dt(s).anchor(),l=o?n.x1:n.y1;o?t.lineTo(l,p.y).lineTo(l,a.y):t.lineTo(p.x,l).lineTo(a.x,l)},e}(_i),Ii=function(t){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}(Li);R(Ii.prototype,Ci);var Di=Ii,ji=function(t){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 zo(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 k.geometry.Segment(i.anchor(),i.controlOut(),i.controlIn()))}return e},e}(Li),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.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?Di:"smooth"===a?ji:Li)(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 l=r;l<s;l++){var h=l+a,c=e,u=void 0;do{u=i[--c][h]}while(c>0&&!u);if(u)"step"!==o&&l>r&&!i[c][h-1]&&p.push(this._previousSegmentPoint(l,h,h-1,c)),p.push(u),"step"!==o&&l+1<s&&!i[c][h+1]&&p.push(this._previousSegmentPoint(l,h,h+1,c));else{var d=this._createGapStackPoint(l);this._stackPoints.push(d),p.push(d)}}return p},e.prototype._previousSegmentPoint=function(t,e,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 xi(0,e);return o.categoryIx=t,o.series={},o},e.prototype.seriesMissingValues=function(t){return t.missingValues||ei},e.prototype.supportsPointInactiveOpacity=function(){return!1},e}(Bi),Vi=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:u,max:d},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}(k.Class),Hi=function(t){function e(e,o,i){t.call(this,o),this.textBox=new he(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,p=r.box,l=r.options.padding,h=t;n.align=o?a:c,n.vAlign=o?g:a,"insideEnd"===e.position?o?(n.vAlign=g,!i&&p.height()<t.height()&&(n.vAlign=s)):n.align=i?f:c:e.position===a?(n.vAlign=a,n.align=a):"insideBase"===e.position?o?n.vAlign=i?s:g:n.align=i?c:f:"outsideEnd"===e.position&&(o?h=i?new Nt(t.x1,t.y1-p.height(),t.x2,t.y1):new Nt(t.x1,t.y2,t.x2,t.y2+p.height()):(n.align=a,h=i?new Nt(t.x2,t.y1,t.x2+p.width(),t.y2):new Nt(t.x1-p.width(),t.y1,t.x1,t.y2))),e.rotation||(o?l.left=l.right=(h.width()-r.contentBox.width())/2:l.top=l.bottom=(h.height()-r.contentBox.height())/2),r.reflow(h)},e.prototype.alignToClipBox=function(t){var e=this.options.vertical?x:m,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}(qt);wt(Hi,{position:"outsideEnd",margin:z(3),padding:z(4),color:n,background:"",border:{width:1,color:""},aboveAxis:!0,vertical:!1,animation:{type:"fadeIn",delay:600},zIndex:2});var Ni=Hi;function Ui(t){var e=t.overlay;return e&&e.gradient&&"none"!==e.gradient}var Fi=function(t){function e(e,o){t.call(this),this.options=o,this.color=o.color||v,this.aboveAxis=xt(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=U(e);o=r?r(i):this.formatValue(e.format),this.label=new Ni(o,R({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 k.drawing.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=st(o.opacity)?o.opacity:e.opacity,r=this.box.toRect();r.size.width=Math.round(r.size.width);var n=this.rectVisual=k.drawing.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(),a=this.box.height();if((e.vertical?s:a)>6&&(S(n),(s<1||a<1)&&(n.options.stroke.lineJoin="round")),t.append(n),Ui(e)){var p=this.createGradientOverlay(n,{baseColor:this.color},R({end:e.vertical?void 0:[0,1]},e.overlay));t.append(p)}},e.prototype.createHighlight=function(t){return S(k.drawing.Path.fromRect(this.box.toRect(),t))},e.prototype.highlightVisual=function(){return this.rectVisual},e.prototype.highlightVisualArgs=function(){return{options:this.options,rect:this.box.toRect(),visual:this.rectVisual}},e.prototype.getBorderColor=function(){var t=this.color,e=this.options.border,o=e._brightness||.8,i=e.color;return st(i)||(i=new k.Color(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,a=c,p=g;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),p=s);else{var l=Math.max(i.x1,n.x1),h=Math.min(i.x2,n.x2);o.isStacked?(p=s,r?(a=f,t=h):t=l,e=Math.max(i.y1,n.y1)-5):(r?t=h+5:(t=l-5,a=f),e=Math.max(i.y1,n.y1))}return{point:new Vt(t,e),align:{horizontal:a,vertical:p}}},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}(qt);R(Fi.prototype,yi),R(Fi.prototype,vi),Fi.prototype.defaults={border:{width:1},vertical:!0,overlay:{gradient:"glass"},labels:{visible:!1,format:"{0}"},opacity:1,notes:{label:{}}};var Gi=Fi;function Wi(t,e){t.forEach(e)}function Xi(t,e){for(var o=t.length,i=o-1;i>=0;i--)e(t[i],i-o-1)}var Yi=function(t){function e(e){t.call(this,e),this.forEach=e.rtl?Xi:Wi}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reflow=function(t){var e=this.options,o=e.vertical,i=e.gap,r=e.spacing,n=this.children,s=n.length,a=o?x:m,p=s+i+r*(s-1),l=(o?t.height():t.width())/p,h=t[a+1]+l*(i/2);this.forEach(n,(function(e,o){var i=(e.box||t).clone();i[a+1]=h,i[a+2]=h+l,e.reflow(i),o<s-1&&(h+=l*r),h+=l}))},e}(qt);wt(Yi,{vertical:!1,gap:0,spacing:0});var qi=Yi,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.reflow=function(t){for(var e=this.options.vertical?m:x,o=this.children,i=o.length,r=this.box=new Nt,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}(qt);wt(Zi,{vertical:!0});var Qi=Zi,Ki=function(t){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 Gi},e.prototype.clusterType=function(){return qi},e.prototype.stackType=function(){return Qi},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,l=this.pointValue(t),h=this.pointOptions(r,n),c=h.labels;p&&"outsideEnd"===c.position&&(c.position="insideEnd"),h.isStacked=p;var u=t.fields.color||r.color;l<0&&h.negativeColor&&(u=h.negativeColor),h=this.evalPointOptions(h,l,i,o,r,n),M(r.color)&&(u=h.color);var d=new(this.pointType())(l,h);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?m:x;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),Mi(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&&st(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 k.geometry.Point(t.x1,t.y1),o.vertical=!e.invertAxes},e}(gi);wt(Ki,{animation:{type:oi}});var $i=Ki,Ji=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 k.drawing.Group;return this.createBody(e,t),this.createLines(e,t),e},e.prototype.createBody=function(t,e){var o=k.drawing.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:xt(e.border.opacity,e.opacity)}),S(o),t.append(o),Ui(e)&&t.append(this.createGradientOverlay(o,{baseColor:this.color},R({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:xt(i.opacity,e.opacity),width:i.width,dashType:i.dashType,lineCap:"butt"}},n=0;n<o.length;n++){var s=k.drawing.Path.fromPoints(o[n],r);S(s),t.append(s)}},e.prototype.getBorderColor=function(){var t=this.options.border,e=t.color;return st(e)||(e=new k.Color(this.color).brightness(t._brightness).toHex()),e},e.prototype.createOverlay=function(){var t=k.drawing.Path.fromRect(this.box.toRect(),{fill:{color:v,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(R({},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 Vt(t.x2+5,Math.max(t.y1,e.y1)+5),align:{horizontal:c,vertical:g}}},e.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},e.prototype.overlapsBox=function(t){return this.box.overlaps(t)},e}(qt);wt(Ji,{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:{}}}),R(Ji.prototype,yi),R(Ji.prototype,vi);var tr=Ji;function er(t){return Go(t)===t.length}var or=function(t){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,l=t.valueFields,h=er(this.splitValue(l)),c=n.data[i],u=this.categoryPoints[i];u||(this.categoryPoints[i]=u=[]),h&&(o=this.createPoint(t,e));var d=a[i];d||(d=new qi({vertical:p.invertAxes,gap:p.gap,spacing:p.spacing,rtl:!p.invertAxes&&(this.chartService||{}).rtl}),this.append(d)),o&&(this.updateRange(l,e),d.append(o),o.categoryIx=i,o.category=r,o.series=n,o.seriesIx=s,o.owner=this,o.dataItem=c,o.noteText=t.fields.noteText),this.points.push(o),u.push(o)},e.prototype.pointType=function(){return tr},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=R({},r),l=t.fields.color||r.color;p=this.evalPointOptions(p,a,i,o,r,n),"candlestick"===r.type&&a.open>a.close&&(l=t.fields.downColor||r.downColor||r.color),M(r.color)&&(l=p.color),p.vertical=!this.options.invertAxes;var h=new s(a,p);return h.color=l,h},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:u,max:d},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}(gi);R(or.prototype,Ei);var ir=or,rr=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=R({},(n=a<e.q3+i&&a>e.q1-i?t.outliers:t.extremes).border);st(p.color)||(st(this.color)?p.color=this.color:p.color=new k.Color(n.background).brightness(.8).toHex());var l=new $t({type:n.type,width:n.size,height:n.size,rotation:n.rotation,background:n.background,border:p,opacity:n.opacity});l.value=a,r.push(l)}return this.reflowOutliers(r),r},e.prototype.reflowOutliers=function(t){for(var e=this.owner.seriesValueAxis(this.options),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}(tr);wt(rr,{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:v,border:{width:2,opacity:1},opacity:0},extremes:{visible:!0,size:8,type:p,background:v,border:{width:2,opacity:1},opacity:0}}),R(rr.prototype,yi);var nr=rr,sr=function(t){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}(nr),ar=function(t){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,l=t.valueFields,h=er(this.splitValue(l)),c=n.data[i],u=this.categoryPoints[i];u||(this.categoryPoints[i]=u=[]),h&&(o=this.createPoint(t,e));var d=a[i];d||(d=new qi({vertical:p.invertAxes,gap:p.gap,spacing:p.spacing,rtl:!p.invertAxes&&(this.chartService||{}).rtl}),this.append(d)),o&&(this.updateRange(l,e),d.append(o),o.categoryIx=i,o.category=r,o.series=n,o.seriesIx=s,o.owner=this,o.dataItem=c),this.points.push(o),u.push(o)},e.prototype.pointType=function(){return this.options.invertAxes?sr:nr},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));st(t.mean)&&(r=r.concat(t.mean)),i=this.valueAxisRanges[o]=i||{min:u,max:d},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];st(r)&&null!==r&&o.push(r)}return o},e.prototype.supportsPointInactiveOpacity=function(){return!1},e}(ir),pr=function(t){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}(hi);function lr(t){return st(t)&&null!==t}var hr=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,l=o.series,h=t.options.errorBars,c=o[s],u=o[a];P(r)&&(P(c)&&P(u)&&(i={low:c,high:u}),h&&st(h[n])&&(this.seriesErrorRanges=this.seriesErrorRanges||{x:[],y:[]},this.seriesErrorRanges[e][p]=this.seriesErrorRanges[e][p]||new $o(h[n],l,e),i=this.seriesErrorRanges[e][p].getErrorRange(r,h[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===x,p={};e[o+"Low"]=i,e[o+"High"]=r,e.errorBars=e.errorBars||[];var l=new pr(i,r,a,this,n,s);e.errorBars.push(l),e.append(l),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],l=t;lr(i)&&lr(r)||(l=this.createMissingValue(l,a)),l&&((o=this.createPoint(l,e))&&(Object.assign(o,e),this.addErrorBar(o,m,e),this.addErrorBar(o,x,e)),this.updateRange(l,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];lr(n)&&(a=this.xAxisRanges[i]=a||{min:u,max:d},T(n)&&(n=$e(o,n)),a.min=Math.min(a.min,n),a.max=Math.max(a.max,n)),lr(s)&&(p=this.yAxisRanges[r]=p||{min:u,max:d},T(s)&&(s=$e(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];st(s)||(this._evalSeries[r]=s=ui(t,{},n,!0));var a=t;return s&&ui(a=R({},t),{value:e,series:i,dataItem:o.dataItem},n),a},e.prototype.pointType=function(){return xi},e.prototype.pointOptions=function(t,e){var o=this.seriesOptions[e];if(!o){var i=this.pointType().prototype.defaults;this.seriesOptions[e]=o=R({},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),M(o.color)&&(r=i.color);var n=new xi(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),l=a.y.getSlot(t.y,t.y,i);if(s)if(p&&l){var h=e.pointSlot(p,l);s.reflow(h)}else s.visible=!1})),this.box=t},e.prototype.pointSlot=function(t,e){return new Nt(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,R({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}(qt);wt(hr,{series:[],tooltip:{format:"{0}, {1}"},labels:{format:"{0}, {1}"},clip:!0}),R(hr.prototype,Ei,{_bindPoint:gi.prototype._bindPoint});var cr=hr,ur=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 k.drawing.Group,s=new k.drawing.Circle(new k.geometry.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}]})}),a=new k.drawing.Circle(new k.geometry.Circle([i.x,i.y],r),{stroke:{color:e.color||new k.Color(o.background).brightness(.8).toHex(),width:e.width,opacity:e.opacity},fill:{color:o.background,opacity:t.opacity}});return n.append(s,a),n},e}(xi);ur.prototype.defaults=R({},ur.prototype.defaults,{labels:{position:a},highlight:{opacity:1,border:{color:"#fff",width:2,opacity:1}}}),ur.prototype.defaults.highlight.zIndex=void 0;var dr=ur,fr=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._initFields=function(){this._maxSize=d,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 dr},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=xt(o.negativeValues.color,s));var a=R({labels:{animation:{delay:r,duration:600-r}}},this.pointOptions(o,e.seriesIx),{markers:{type:p,border:o.border,opacity:o.opacity,animation:n}});a=this.evalPointOptions(a,t,e),M(o.color)&&(s=a.color),a.markers.background=s;var l=new dr(t,a);return l.color=s,this.append(l),l},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,l=(Math.PI*a*a-p)/this._maxSize,h=0;h<n.length;h++){var c=n[h];if(c){var u=Math.abs(c.value.size)*l,d=Math.sqrt((p+u)/Math.PI),f=xt(c.options.zIndex,0)+(1-d/a);R(c.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}(cr);wt(fr,{tooltip:{format:"{3}"},labels:{format:"{3}"}});var gr=fr,yr=function(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);R(yr.prototype,yi);var vr=yr,mr=function(t){function e(e,o){t.call(this,o),this.aboveAxis=this.options.aboveAxis,this.color=o.color||v,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,st(this.value.target)&&(this.target=new vr({type:t.target.shape,background:t.target.color||this.color,opacity:t.opacity,zIndex:t.zIndex,border:t.target.border,vAlign:g,align:f}),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,l=r?s:a;if(o){var h=new Nt(p.x1,l.y1,p.x2,l.y2);o.options.height=r?h.height():e.target.line.width,o.options.width=r?e.target.line.width:h.width(),o.reflow(h)}this.note&&this.note.reflow(t),this.box=t},e.prototype.createVisual=function(){t.prototype.createVisual.call(this);var e=this.options,o=k.drawing.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:xt(e.border.opacity,e.opacity)}),this.bodyVisual=o,S(o),this.visual.append(o)},e.prototype.createAnimation=function(){this.bodyVisual&&(this.animation=k.drawing.Animation.create(this.bodyVisual,this.options.animation))},e.prototype.createHighlight=function(t){return k.drawing.Path.fromRect(this.box.toRect(),t)},e.prototype.highlightVisual=function(){return this.bodyVisual},e.prototype.highlightVisualArgs=function(){return{rect:this.box.toRect(),visual:this.bodyVisual,options:this.options}},e.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},e}(qt);mr.prototype.tooltipAnchor=Gi.prototype.tooltipAnchor,wt(mr,{border:{width:1},vertical:!1,opacity:1,target:{shape:"",border:{width:0,color:"green"},line:{width:2}},tooltip:{format:"Current: {0}<br />Target: {1}"}}),R(mr.prototype,yi),R(mr.prototype,vi);var xr=mr,br=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||b(r[0])||B(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,l=R({vertical:!s.invertAxes,overlay:r.overlay,categoryIx:o,invertAxes:s.invertAxes},r),h=t.fields.color||r.color;l=this.evalPointOptions(l,p,i,o,r,n),M(r.color)&&(h=l.color);var c=new xr(p,l);c.color=h;var u=a[o];return u||(u=new qi({vertical:s.invertAxes,gap:s.gap,spacing:s.spacing,rtl:!s.invertAxes&&(this.chartService||{}).rtl}),this.append(u)),u.append(c),c},e.prototype.updateRange=function(t,e){var o=t.current,i=t.target,r=e.series.axis,n=this.valueAxisRanges[r];st(o)&&!isNaN(o)&&st(i&&!isNaN(i))&&((n=this.valueAxisRanges[r]=n||{min:u,max:d}).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}(gi);br.prototype._setAnimationOptions=$i.prototype._setAnimationOptions,wt(br,{animation:{type:oi}});var _r=br,wr=function(t){function e(e,o){t.call(this),this.chartService=e,this.options=R({},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=xt(o,r),i=xt(i,r)}var n=z(t.padding||{},"auto");return{backgroundColor:o,borderColor:i,font:t.font,color:t.color,opacity:t.opacity,borderWidth:L(t.border.width),paddingTop:L(n.top),paddingBottom:L(n.bottom),paddingLeft:L(n.left),paddingRight:L(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 k.Color(i.backgroundColor);st(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}(k.Class);wt(wr,{border:{width:1},opacity:1});var Cr=wr,kr=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===l&&(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,p=r.padding,l=!i.axis.options.vertical,h=i.line.bbox();return l?(t=a,n===s?(e=g,o=h.bottomLeft().translate(0,p)):(e=s,o=h.topLeft().translate(0,-p))):(e=a,n===c?(t=f,o=h.topLeft().translate(-p,0)):(t=c,o=h.topRight().translate(p,0))),{point:o,align:{horizontal:t,vertical:e}}},e}(Cr);wt(kr,{padding:10});var Sr=kr,Ar=function(t){function e(e,o,i){t.call(this,i),this.axis=o,this.stickyMode=o instanceof oo;var r=this.options.tooltip;r.visible&&(this.tooltip=new Sr(e,this,R({},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?x:m,s=new k.geometry.Point(r.x1,r.y1);if(t=i?new k.geometry.Point(r.x2,r.y1):new k.geometry.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?m:x,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 k.drawing.Path({stroke:{color:e.color,width:e.width,opacity:e.opacity,dashType:e.dashType},visible:!1}),this.moveLine(),this.visual.append(this.line)},e.prototype.destroy=function(){this.tooltip&&this.tooltip.destroy(),t.prototype.destroy.call(this)},e}(qt);wt(Ar,{color:n,width:2,zIndex:-1,tooltip:{visible:!1}});var Pr=Ar,Tr=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 k.drawing.Group({zIndex:0}),this.shouldClip()){var t=(this.clipBox=this._clipBox()).toRect(),e=k.drawing.Path.fromRect(t);S(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}(qt);Tr.prototype.isStackRoot=!0;var Or=Tr,Mr=function(t){function e(e){t.call(this,e),this.id="pane"+Er++,this.createTitle(),this.content=new qt,this.chartContainer=new Or({},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;B(t)&&(t=R({},t,{align:t.position,position:g})),this.title=ue.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;dt(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 l=e[p];s!==l.options.vertical&&rt(a,n.createGridLines(l))}},e.prototype.refresh=function(){this.visual.clear(),this.content.parent=null,this.content.createGradient=this.createGradient.bind(this),this.content.renderVisual(),this.content.parent=this,this.title&&this.visual.append(this.title.visual),this.visual.append(this.content.visual),this.renderComplete(),this.notifyRender()},e.prototype.chartsBox=function(){for(var t=this.axes,e=t.length,o=new Nt,i=0;i<e;i++){var r=t[i],n=r.options.vertical?x:m,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,l=0;l<p;l++){var h=a[l];if(!h.options.vertical){var c=h.lineBox();o.x1=c.x1,o.x2=c.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 Uo(this),index:this.paneIndex,name:this.options.name})},e}(Qt),Er=1;Mr.prototype.isStackRoot=!0,wt(Mr,{zIndex:-1,shrinkToFit:!0,title:{align:c},visible:!0});var Rr=Mr;function Br(t,e){null!==e&&t.push(e)}function Lr(t,e,o){var i=e.visible;if(st(i))return i;var r=t.pointVisibility;return r?r[o]:void 0}function Ir(t){for(var e=t.data,o=[],i=0,r=0,n=0;n<e.length;n++){var s=Zo.current.bindPoint(t,n),a=s.valueFields.value;T(a)&&(a=parseFloat(a)),P(a)?(s.visible=!1!==Lr(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 Dr(t,e){return t&&e?t.toLowerCase()===e.toLowerCase():t===e}function jr(t,e){for(var o=[],i=[].concat(e),r=0;r<t.length;r++){var n=t[r];Q(n.type,i)&&o.push(n)}return o}function zr(t,e,o){if(null===e)return e;var i="_date_"+t,r=e[i];return r||(r=$e(o,W(t)(e)),e[i]=r),r}function Vr(t,e){var o=t.type,i=e instanceof Date;return!o&&i||Dr(o,l)}function Hr(t){return 1===t.length?t[0]:t}var Nr=/area/i;function Ur(t,e){var o=Zo.current.bindPoint(t,null,e).valueFields;for(var i in o)if(O(o[i]))return!0}function Fr(t){var e,o,i=t.start,r=t.dir,n=t.min,s=t.max,a=t.getter,p=t.hasItem,l=t.series,h=i;do{p(h+=r)&&(e=Ur(l,(o=a(h)).item))}while(n<=h&&h<=s&&!e);if(e)return o}function Gr(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 l,h,c;if("interpolate"!==function(t){return t.missingValues?t.missingValues:Nr.test(t.type)||t.stack?ei:"interpolate"}(t))a&&(l=i(n-1)),p&&(h=i(s+1));else a&&(l=Ur(t,(c=i(n-1)).item)?c:Fr({start:n,dir:-1,min:0,max:o-1,getter:i,hasItem:r,series:t})),p&&(h=Ur(t,(c=i(s+1)).item)?c:Fr({start:s,dir:1,min:0,max:o-1,getter:i,hasItem:r,series:t}));l&&(t._outOfRangeMinPoint=l),h&&(t._outOfRangeMaxPoint=h)}}var Wr=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=R({title:{color:t.color}},e),s=0;s<i;s++){var a=R({},n,o[s]);T(a.title)&&(a.title=R({text:a.title},n.title));var p=new Rr(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 Pr(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],l=!1!==p.visible;if(!1!==p.visibleInLegend){var h=p.name,c=l?U(i):U(n)||U(i);c&&(h=c({text:lr(h)?h:"",series:p}));var u=p._defaults,d=p.color;M(d)&&u&&(d=u.color);var f=void 0,g=void 0;l?(f={},g=d):(f={color:n.color,font:n.font},g=r.markers.color),lr(h)&&""!==h&&s.push({text:h,labels:f,markerColor:g,series:p,active:l})}}rt(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=z(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[m+a]-r[m+n],s[x+a]-r[x+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),a={},p={},l={},h={},u=0;u<e.length;u++){var d=e[u],y=d.pane,v=y.id,m=!1!==d.options.visible,x=qr(t,y)||o,b=r;x!==o&&(b=this.axisCrossingValues(x,e)),this.alignAxisTo(d,x,n[u],b[u]),d.options._overlap||(vt(d.lineBox().x1)===vt(x.lineBox().x1)&&(a[v]&&d.reflow(d.box.alignTo(a[v].box,c).translate(-d.options.margin,0)),m&&(a[v]=d)),vt(d.lineBox().x2)===vt(x.lineBox().x2)&&(d._mirrored||(d.options.labels.mirror=!d.options.labels.mirror,d._mirrored=!0),this.alignAxisTo(d,x,n[u],b[u]),p[v]&&d.reflow(d.box.alignTo(p[v].box,f).translate(d.options.margin,0)),m&&(p[v]=d)),0!==u&&i.pane===d.pane&&(d.alignTo(i),d.reflow(d.box)))}for(var _=0;_<t.length;_++){var w=t[_],C=w.pane,k=C.id,S=!1!==w.options.visible,A=qr(e,C)||i,P=n;A!==i&&(P=this.axisCrossingValues(A,t)),this.alignAxisTo(w,A,r[_],P[_]),w.options._overlap||(vt(w.lineBox().y1)===vt(A.lineBox().y1)&&(w._mirrored||(w.options.labels.mirror=!w.options.labels.mirror,w._mirrored=!0),this.alignAxisTo(w,A,r[_],P[_]),l[k]&&w.reflow(w.box.alignTo(l[k].box,g).translate(0,-w.options.margin)),S&&(l[k]=w)),vt(w.lineBox().y2,3)===vt(A.lineBox().y2,3)&&(h[k]&&w.reflow(w.box.alignTo(h[k].box,s).translate(0,w.options.margin)),S&&(h[k]=w)),0!==_&&(w.alignTo(o),w.reflow(w.box)))}},e.prototype.shrinkAxisWidth=function(t){for(var e=this.groupAxes(t).any,o=Yr(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,Yr(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=Yr(n),p=Math.max(s.y1-a.y1,s.y2-a.y2);o=Math.max(o,s.x1-a.x1);for(var l=0;l<n.length;l++){var h=n[l];h.reflow(h.box.translate(0,p))}}}for(var c=0;c<e.length;c++){var u=e[c];u.reflow(u.box.translate(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=Zr(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&&!Q(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 l=parseInt(p,10)/100;a.options.height=l*t.height()}a.reflow(t.clone()),i-=a.options.height}else r++}for(var h=0;h<o;h++){var c=e[h];c.options.height||(c.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(k.drawing.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&&st(e)||(r=v,i=0);var s=this._bgVisual=new k.drawing.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&&st(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=qr(e,n)||e[0],a=i+o,p=this.createLabelAxis(r,a,s);if(p){o++;var l=n.axes.indexOf(r)+o;n.appendAxisAt(p,l)}}},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,l=this.axisCrossingValues(o,p),h="end"===r,c=o.range(),u=h?c.max:c.min;if(ft(l[e],c.min,c.max)-u==0)return null;l.splice(e+1,0,u),o.options.axisCrossingValues=l;var d=t.clone();return t.clear(),d.options.name=void 0,d.options.line.visible=!1,d.options.crosshair=void 0,d.options.notes=void 0,d.options.plotBands=void 0,d},e}(qt);function Xr(t){return!t.pane.axes.some((function(e){return e.options.vertical===t.options.vertical&&e!==t&&!1!==e.options.visible}))}function Yr(t){for(var e,o=t.length,i=0;i<o;i++){var r=t[i],n=!1!==r.options.visible;if(n||Xr(r)){var s=n?r.contentBox():r.lineBox();e?e.wrap(s):e=s.clone()}}return e||new Nt}function qr(t,e){for(var o=0;o<t.length;o++){var i=t[o];if(i&&i.pane===e)return i}}var Zr=function(t){return t.reduce((function(t,e){return t.concat(e.axes)}),[])};wt(Wr,{series:[],plotArea:{margin:{}},background:"",border:{color:n,width:0},paneDefaults:{title:{}},legend:{inactiveItems:{labels:{color:"#919191"},markers:{color:"#919191"}}}});var Qr=Wr,Kr={hover:function(t,e){this._dispatchEvent(t,e,"plotAreaHover")},click:function(t,e){this._dispatchEvent(t,e,"plotAreaClick")}};function $r(t,e,o){var i=e,r=t;if(t.indexOf(".")>-1){for(var n=t.split(".");n.length>1;)r=n.shift(),st(i[r])||(i[r]={}),i=i[r];r=n.shift()}i[r]=o}var Jr=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),l=e.aggregate||p;this._series=e,this._binder=o;for(var h=0;h<r.length;h++){var c=r[h],u=void 0;if(B(l))u=l[c];else{if(0!==h&&!Q(c,n))break;u=l}u&&a.push({canonicalName:c,name:s[h],transform:M(u)?u:Xo[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&&!P(n)&&!b(n)){var a=function(){};a.prototype=n,s=new a}for(var p=0;p<i.length;p++){var l=i[p],h=this._bindField(r.values,l.canonicalName),c=l.transform(h,o,r.dataItems,e);if(!(null===c||!B(c)||st(c.length)||c instanceof Date)){s=c;break}st(c)&&$r(l.name,s,c)}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=st(s[e])?s[e]:n.fields[e],o.push(a)}return o},e}(k.Class),tn=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}(k.Class);tn.current=new tn;var en=tn,on=function(t){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=R({},t,t.from),o=R({},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=U(t),i=this.pointData();return e=o?o(i):this.formatValue(t.format),new Ni(e,R({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}(Gi);on.prototype.defaults=R({},on.prototype.defaults,{labels:{format:"{0} - {1}"},tooltip:{format:"{1}"}});var rn=on,nn=function(t){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 rn},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&&P(i)&&P(r)&&((n=this.valueAxisRanges[o]=n||{min:u,max:d}).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}($i);nn.prototype.plotLimits=gi.prototype.plotLimits;var sn=nn,an=function(t){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}(xi),pn=function(t){function e(e,o){t.call(this),this.value=e,this.options=o,this.aboveAxis=xt(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 an(i,R({},this.options,{labels:o.from,markers:e.from})),n=this.toPoint=new an(i,R({},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 k.drawing.Group;return t.append(this.fromPoint.createHighlight()),t.append(this.toPoint.createHighlight()),t},e.prototype.highlightVisual=function(){return this.visual},e.prototype.highlightVisualArgs=function(){return{options:this.options,from:this.fromPoint.highlightVisualArgs(),to:this.toPoint.highlightVisualArgs()}},e.prototype.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=s):(e=r.x2+5,o=n.y,i=a),{point:new Vt(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=c,o=f):(i=f,o=c),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}(qt);R(pn.prototype,yi),R(pn.prototype,vi),pn.prototype.defaults={markers:{visible:!1,background:v,size:8,type:p,border:{width:2},opacity:1},labels:{visible:!1,margin:z(3),padding:z(4),animation:{type:"fadeIn",delay:600},position:"auto"},notes:{label:{}},highlight:{markers:{border:{color:v,width:2}},zIndex:100},tooltip:{format:"{0} - {1}"}};var ln=pn,hn=function(t){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 k.drawing.Path(t),o=new k.drawing.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}(Li),cn=function(t){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 zo).process(this.toGeometryPoints(t))},e}(hn),un=function(t){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}(hn);R(un.prototype,Ci);var dn=un,fn=function(t){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 ln},e.prototype.createPoint=function(t,e){var o=e.categoryIx,i=e.category,r=e.series,n=e.seriesIx,s=t.valueFields;if(!lr(s.from)&&!lr(s.to)){if(this.seriesMissingValues(r)!==ei)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;M(r.color)&&(p=a.color);var l=new ln(s,a);return l.color=p,this.append(l),l},e.prototype.createSegment=function(t,e,o){var i=(e.line||{}).style;return new("smooth"===i?cn:"step"===i?dn:hn)(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 Nt(r.x1,t.y1,r.x2,t.y2),i=new Nt(n.x1,t.y1,n.x2,t.y2)):(o=new Nt(t.x1,r.y1,t.x2,r.y2),i=new Nt(t.x1,n.y1,t.x2,n.y2)),{from:o,to:i}},e.prototype.addValue=function(e,o){var i=e.valueFields;P(i.from)||(i.from=i.to),P(i.to)||(i.to=i.from),t.prototype.addValue.call(this,e,o)},e.prototype.updateRange=function(t,e){if(null!==t&&P(t.from)&&P(t.to)){var o=e.series.axis,i=this.valueAxisRanges[o]=this.valueAxisRanges[o]||{min:u,max:d},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}(gi);R(fn.prototype,Pi,Ei);var gn=fn,yn=function(t){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),l=i.getSlot(o.close,o.close);p.x1=l.x1=a.x1=t.x1,p.x2=l.x2=a.x2=t.x2;var h=a.center().x;r.push([p.x1,p.y1]),r.push([h,p.y1]),n.push([h,l.y1]),n.push([l.x2,l.y1]),s.push([h,a.y1]),s.push([h,a.y2]),this.lines=[r,n,s],this.box=a.clone().wrap(p.clone().wrap(l)),this.reflowNote()},e.prototype.createBody=function(){},e}(tr),vn=function(t){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 yn},e}(ir),mn=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=k.drawing.Path.fromPoints(this.linePoints(),{stroke:{color:e.color,width:e.width,opacity:e.opacity,dashType:e.dashType}});S(o),this.visual.append(o)},e}(qt);wt(mn,{animation:{type:"fadeIn",delay:600}});var xn=mn,bn=function(t){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=di(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 l=Zo.current.bindPoint(n,p),h=l.valueFields.value,c=l.fields.summary,u=s,d=void 0;c?"total"===c.toLowerCase()?(l.valueFields.value=s,u=0,d=s):(l.valueFields.value=a,d=u-a,a=0):P(h)&&(a+=h,d=s+=h),t(l,{category:this.categoryAxis.categoryAt(p),categoryIx:p,series:n,seriesIx:r,total:s,runningTotal:a,from:u,to:d,isVertical: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 l=new xn(s,p,r);o.push(l),this.append(l)}s=p}}},e}($i),_n=["area","verticalArea","rangeArea","verticalRangeArea"],wn=[ri,si].concat(_n),Cn=function(t){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 Vi,t.length>0){this.invertAxes=Q(t[0].type,[oi,"bullet",si,"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 oo?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(jr(t,["area","verticalArea"]),e),this.createRangeAreaChart(jr(t,["rangeArea","verticalRangeArea"]),e),this.createBarChart(jr(t,[ii,oi]),e),this.createRangeBarChart(jr(t,["rangeColumn","rangeBar"]),e),this.createBulletChart(jr(t,["bullet","verticalBullet"]),e),this.createCandlestickChart(jr(t,"candlestick"),e),this.createBoxPlotChart(jr(t,["boxPlot","verticalBoxPlot"]),e),this.createOHLCChart(jr(t,"ohlc"),e),this.createWaterfallChart(jr(t,["waterfall","horizontalWaterfall"]),e),this.createLineChart(jr(t,[ri,si]),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=(Dr(n.options.type,l)||r.categoryField)&&Q(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),!P(e.options.min)&&!P(e.options.max))return t;var i=e.currentRangeIndices(),r=Q(t.type,wn),n=R({},t);return n.data=(n.data||[]).slice(i.min,i.max+1),r&&Gr(n,i,o,(function(o){return{item:t.data[o],category:e.categoryAt(o,!0),categoryIx:o-i.min}}),(function(e){return st(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=Dr(i.type,l),s=t.data,a=n?zr:Yo,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],st(c)&&null!==c){var u=e.totalIndex(c);p[u]=p[u]||{items:[],category:c},p[u].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=R({},t),r=new Jr(R({},t),Zo.current,en.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},l=a.min;l<=a.max;l++){var h=p(l);n[h.categoryIx]=h.item,h.items&&h.items.length&&(s[h.categoryIx]=h.item)}return Q(i.type,wn)&&Gr(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,di(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=X([].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=Sn(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 $i(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 sn(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 _r(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 Bi(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 zi(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 gn(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 vn(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 ir(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 ar(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 bn(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=jr(this.series,ai),i=0;i<this.series.length;i++){var r=this.series[i];if(Q(r.type,_n)){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 oo&&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(Q(this.findPane(n.pane),t)){var s=n.name,a=n.categories;void 0===a&&(a=[]),n=R({vertical:e,reverse:!e&&this.chartService.rtl,axisCrossingValue:e?u:0},n),st(n.justified)||(n.justified=this.isJustified()),this.axisRequiresRounding(s,r)&&(n.justified=!1);var p=void 0;if(p=Vr(n,a[0])?new co(n,this.chartService):new oo(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 l=this.categoryAxis||i[0];this.categoryAxis=l,e?this.axisY=l:this.axisX=l},e.prototype.isJustified=function(){for(var t=this.series,e=0;e<t.length;e++){if(!Q(t[e].type,_n))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(Q(this.findPane(p.pane),t)){var l=p.name,h=Dr(p.type,"log")?{min:.1,max:1}:{min:0,max:1},c=e.query(l)||o||h;0===a&&c&&o&&(c.min=Math.min(c.min,o.min),c.max=Math.max(c.max,o.max));var u=new(Dr(p.type,"log")?So:xo)(c.min,c.max,R({},n,p),this.chartService);if(l){if(this.namedValueAxes[l])throw new Error("Value axis with name "+l+" is already defined");this.namedValueAxes[l]=u}u.axisIndex=a,s.push(u),this.appendAxis(u)}}var d=this.valueAxis||s[0];this.valueAxis=d,r?this.axisX=d:this.axisY=d},e.prototype._dispatchEvent=function(t,e,o){var i=t._eventCoordinates(e),r=new Vt(i.x,i.y),n=this.pointPane(r),s=[],a=[];if(n){for(var p=n.axes,l=0;l<p.length;l++){var h=p[l];h.getValue?Br(a,h.getValue(r)):Br(s,h.getCategory(r))}0===s.length&&Br(s,this.categoryAxis.getCategory(r)),s.length>0&&a.length>0&&t.trigger(o,{element:ct(e),originalEvent:e,category:Hr(s),value:Hr(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){kn(this.options,t,e),kn(this.originalOptions,t,e)},e}(Qr);function kn(t,e,o){R([].concat(e instanceof oo?t.categoryAxis:t.valueAxis)[e.axisIndex],o)}function Sn(t,e,o){return X(t,(function(t){return 0===o&&!t.categoryAxis||t.categoryAxis===e}))}wt(Cn,{categoryAxis:{},valueAxis:{}}),R(Cn.prototype,Kr);var An=Cn;function Pn(){this._defaultPrevented=!0}var Tn=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:Pn,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}(k.Class);function On(t,e){var o=(e||"").toLowerCase(),i=t.event;return"none"===o&&!(i.ctrlKey||i.shiftKey||i.altKey)||i[o+"Key"]}function Mn(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 En=function(t){function e(e,o){t.call(this),this.plotArea=e,this.options=R({},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=On(t,this.options.key),this._active},e.prototype.move=function(t){if(this._active){var e=this.axisRanges=this._panAxes(t,m).concat(this._panAxes(t,x));if(e.length)return this.axisRanges=e,Mn(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===m&&!p.options.vertical||e===x&&p.options.vertical){var l=p.pan(i);l&&(l.limitRange=!0,n.push({axis:p,range:l}))}}return n},e}(k.Class);En.prototype.options={key:"none",lock:"none"};var Rn=En,Bn=function(t){function e(e,o){t.call(this),this.chart=e,this.options=R({},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){j(this._marquee,t)},e.prototype.start=function(t){if(On(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=j(t,["paddingLeft","paddingTop"]),o=e.paddingLeft,i=e.paddingTop,r=pt(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,Mn(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!==m||a)&&(o!==x||!a)&&st(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),l=Math.abs(o.y-r);return n===m&&(s=e.x1,p=e.width()),n===x&&(a=e.y1,l=e.height()),i>e.x2&&(p=e.x2-o.x),i<e.x1&&(p=o.x-e.x1),r>e.y2&&(l=e.y2-o.y),r<e.y1&&(l=o.y-e.y1),{left:Math.max(s,e.x1),top:Math.max(a,e.y1),width:p,height:l}},e}(k.Class);Bn.prototype.options={key:"shift",lock:"none"};var Ln=Bn,In=function(t){function e(e,o){t.call(this),this.chart=e,this.options=R({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!==m||a)&&(o!==x||!a)&&s.zoomRange){var p=ft(this.options.rate,.01,.9),l=s.zoomRange(-t*p,e);l&&i.push({axis:s,range:l})}}return this.axisRanges=i,Mn(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}(k.Class),Dn=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 k.drawing.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 Nt),r.renderVisual()}},e.prototype.reflow=function(t){this.visual.rect(t.toRect()),this.visual.reflow();var e=this.visual.clippedBBox();this.box=e?pe(e):new Nt},e.prototype.renderVisual=function(){this.addVisual()},e.prototype.createVisual=function(){},e}(qt),jn=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 re({vertical:!1,wrap:!1,align:a,spacing:this.options.spacing}),this.append(this.container)},e.prototype.createMarker=function(){this.container.append(new $t(this.markerOptions()))},e.prototype.markerOptions=function(){var t=this.options,e=t.markerColor;return R({},t.markers,{background:e,border:{color:e}})},e.prototype.createLabel=function(){var t=this.options,e=R({},t.labels);this.container.append(new he(t.text,e))},e.prototype.renderComplete=function(){t.prototype.renderComplete.call(this);var e=this.options.cursor||{},o=this._itemOverlay=k.drawing.Path.fromRect(this.container.box.toRect(),{fill:{color:v,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:ct(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}(Qt),zn=function(t){function e(e,o){void 0===o&&(o={}),t.call(this,e),this.chartService=o,Q(this.options.position,[g,f,s,c,"custom"])||(this.options.position=f),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=a;"custom"===e?i=c:Q(e,[g,s])?(i="start"===o?c:"end"===o?f:a,r=e):o&&("start"===o?r=g:"end"===o&&(r=s)),this.container=new Qt({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 Qt({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 Dn({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 jn(R({},{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||(st(e)?"horizontal"!==e:Q(o,[c,f]))},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 Nt(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,a=i===g||i===s?m:x,p=this.isVertical(),l=t.clone(),h=t.clone();i!==c&&i!==f||(h.y1=l.y1=0),p&&n?(h.y2=h.y1+n,h.align(l,x,o.options.vAlign)):!p&&r&&(h.x2=h.x1+r,h.align(l,m,o.options.align)),o.reflow(h);var u=(h=o.box).clone();(e.offsetX||e.offsetY)&&(h.translate(e.offsetX,e.offsetY),o.reflow(h)),u[a+1]=t[a+1],u[a+2]=t[a+2],this.box=u},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 Nt(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=R({},{color:n,position:g,align:a},t),o=e.text;if(t&&!1!==t.visible){if(st(e)&&e.visible){var i=U(e);i?o=i({text:o}):e.format&&(o=this.chartService.format.auto(e.format,o))}this.title=new he(o,e),this.createTitleLayout(),this.appendTitleLayoutContent()}},e.prototype.createTitleLayout=function(){this.layout=new re({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===s?(this.layout.append(this.itemsContainer),this.layout.append(this.title)):(this.layout.append(this.title),this.layout.append(this.itemsContainer))},e}(qt);wt(zn,{position:f,items:[],offsetX:0,offsetY:0,margin:z(5),padding:z(5),border:{color:n,width:0},item:{cursor:"pointer",spacing:6},spacing:6,background:"",zIndex:1,markers:{border:{width:0},width:15,height:3,type:"rect",align:c,vAlign:a}});var Vn=zn,Hn=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=jr(t,a.seriesTypes)).length>0){n=a;break}}return new n.type(i,e,o)},e}(k.Class);Hn.current=new Hn;var Nn=Hn;function Un(t){var e=document.createElement("div");return t&&(e.className=t),e}function Fn(t){for(var e=t;e&&!Y(e,"k-handle");)e=e.parentNode;return e}var Gn=function(t){function e(e,o,i,r){t.call(this);var n=e.element;this.options=R({},this.options,i),this.chart=e,this.observer=r,this.chartElement=n,this.categoryAxis=o,this._dateAxis=this.categoryAxis instanceof co,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=Un("k-selector");j(e,{top:t.offset.top,left:t.offset.left,width:t.width,height:t.height,direction:"ltr"});var o=this.selection=Un("k-selection");this.leftMask=Un("k-mask"),this.rightMask=Un("k-mask"),e.appendChild(this.leftMask),e.appendChild(this.rightMask),e.appendChild(o),o.appendChild(Un("k-selection-bg"));var i=this.leftHandle=Un("k-handle k-left-handle"),r=this.rightHandle=Un("k-handle k-right-handle");i.appendChild(Un()),r.appendChild(Un()),o.appendChild(i),o.appendChild(r),this.chartElement.appendChild(e);var n=j(o,["borderLeftWidth","borderRightWidth","height"]),s=j(i,"height").height,a=j(r,"height").height;t.selection={border:{left:n.borderLeftWidth,right:n.borderRightWidth}},j(i,{top:(n.height-s)/2}),j(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),nt(this.wrapper,((t={})[pi]=this._mousewheelHandler,t))),this._domEvents=Me.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&&R(t,{min:$e(o,t.min),max:$e(o,t.max),from:$e(o,t.from),to:$e(o,t.to)});var i=j(this.chartElement,["paddingLeft","paddingTop"]),r=i.paddingLeft,n=i.paddingTop;this.options=R({},{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&&(mt(this.wrapper,((t={})[pi]=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=ct(t);if(!this._state&&o){this.chart._unsetActivePoint(),this._state={moveTarget:Fn(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:Fn(ct(t)))&&_(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),l=this._index(o.min),h=this._index(o.max),c=e.startLocation-t.x.location,u=r.from,d=r.to,f=r.to-r.from,g=j(this.wrapper,"width").width/(i.categoriesCount()-1),y=Math.round(c/g)*(s?-1:1);if(n){var v=Y(n,"k-left-handle"),m=Y(n,"k-right-handle");Y(n,"k-selection k-selection-bg")?(r.from=Math.min(Math.max(l,a-y),h-f),r.to=Math.min(r.from+f,h)):v&&!s||m&&s?(r.from=Math.min(Math.max(l,a-y),h-1),r.to=Math.max(r.from+1,r.to)):(v&&s||m&&!s)&&(r.to=Math.min(Math.max(l+1,p-y),h),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&&C(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 Vt(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),l=s-n,h=n+l/2,c={},u=3===t.event.which,d=Math.round(h-r);this._state||u||(this.chart._unsetActivePoint(),o.options.justified||d--,c.from=Math.min(Math.max(a,n-d),p-l),c.to=Math.min(c.from+l,p),this._start(t),this._state&&(this._state.range=c,this.trigger("select",this._rangeEventArgs(c)),this._end()))},e.prototype._mousewheel=function(t){var e=this,o=ot(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),l=Math.max(s,a);t.preventDefault(),n.from=r.pointCategoryIndex(new Vt(p))||i.min,n.to=r.pointCategoryIndex(new Vt(l))||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,l="x"+(i?2:1),h=this._slot(a),c=vt(h[l]-r.left+n.left);j(this.leftMask,{width:c}),j(this.selection,{left:c}),h=this._slot(p);var u=vt(o.width-(h[l]-r.left+n.left));j(this.rightMask,{width:u});var d=o.width-u;d!==o.width&&(d+=s.right),j(this.rightMask,{left:d}),j(this.selection,{width:Math.max(o.width-(c+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=ft(this._index(t),i,r),s=ft(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=R({},a);if(this._state&&(a=this._state.range),r!==f&&(a.from=ft(ft(n-t,0,s-1),o,i)),r!==c&&(a.to=ft(ft(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=R({},a),l=this.categoryAxis.options.reverse,h=m+(l?"2":"1"),c=this.categoryAxis.lineBox(),u=Math.abs(c[h]-e.x),d=c.width(),f=vt(u/d,2),g=vt(f*t),y=vt((1-f)*t);if(this._state&&(a=this._state.range),a.from=ft(ft(n-g,0,s-1),i,r),a.to=ft(ft(s+y,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}(k.Class);wt(Gn,{visible:!0,mousewheel:{zoom:"both"},min:d,max:u});var Wn=Gn,Xn=function(t){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=R({},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}(Cr),Yn=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=X(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 Vt(r.x,n.y):new Vt(n.x,r.y),align:{horizontal:"center",vertical:"center"}}},e}(Cr);wt(Yn,{categoryFormat:"{0:d}"});var qn=Yn,Zn=function(t){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?x:m,i=this.fromScale=new k.geometry.Point(1,1);i[o]=ti,t.transform(k.geometry.transform().scale(i.x,i.y))}else this.abort()},e.prototype.step=function(t){var e=K(this.fromScale.x,1,t),o=K(this.fromScale.y,1,t);this.element.transform(k.geometry.transform().scale(e,o,this.origin))},e.prototype.abort=function(){t.prototype.abort.call(this),this.element.transform(null)},e}(k.drawing.Animation);wt(Zn,{duration:600}),k.drawing.AnimationFactory.current.register(oi,Zn);var Qn=function(t){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(k.geometry.transform().scale(ti,ti,t))},e.prototype.step=function(t){this.element.transform(k.geometry.transform().scale(t,t,this.center))},e}(k.drawing.Animation);wt(Qn,{easing:"easeOutElastic"}),k.drawing.AnimationFactory.current.register("bubble",Qn);var Kn=function(t){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}(k.drawing.Animation);wt(Kn,{duration:200,easing:"linear"}),k.drawing.AnimationFactory.current.register("fadeIn",Kn);var $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.setup=function(){this.element.transform(k.geometry.transform().scale(ti,ti,this.options.center))},e.prototype.step=function(t){this.element.transform(k.geometry.transform().scale(t,t,this.options.center))},e}(k.drawing.Animation);wt($n,{easing:"easeOutElastic",duration:600}),k.drawing.AnimationFactory.current.register(ni,$n);var Jn=$n,ts=function(t){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?Ai:_i)(t,e,o)},e.prototype.animationPoints=function(){return t.prototype.animationPoints.call(this).concat(this._segments)},e.prototype.createMissingValue=function(t,e){if(e===ei){var o={x:t.x,y:t.y};return lr(o.x)||(o.x=0),lr(o.y)||(o.y=0),o}},e}(cr);R(ts.prototype,Pi);var es=ts,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.namedXAxes={},this.namedYAxes={},this.xAxisRangeTracker=new Vi,this.yAxisRangeTracker=new Vi},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(jr(n,"scatter"),i),this.createScatterLineChart(jr(n,"scatterLine"),i),this.createBubbleChart(jr(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=X([].concat(e.xAxis),(function(t){return t.name===o}))[0],r=t.yAxis,n=X([].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 cr(this,{series:t,clip:e.options.clip}),e)},e.prototype.createScatterLineChart=function(t,e){t.length>0&&this.appendChart(new es(this,{series:t,clip:e.options.clip}),e)},e.prototype.createBubbleChart=function(t,e){t.length>0&&this.appendChart(new gr(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=R({reverse:!e&&this.chartService.rtl},t,{vertical:e}),p=Dr(a.type,"log"),h=s.query(),c=p?{min:.1,max:1}:{min:0,max:1},u=s.query(r)||h||c,d=[a.min,a.max],f=this.series,g=0;g<f.length;g++){var y=f[g],v=y[e?"yAxis":"xAxis"];if(v===a.name||0===o&&!v){var m=Zo.current.bindPoint(y,0).valueFields;d.push(m[e?"y":"x"]);break}}0===o&&h&&(u.min=Math.min(u.min,h.min),u.max=Math.max(u.max,h.max));for(var x=0;x<d.length;x++)if(d[x]instanceof Date){i=!0;break}var b=new(Dr(a.type,l)||!a.type&&i?_o:p?So:xo)(u.min,u.max,a,this.chartService);if(b.axisIndex=o,r){if(n[r])throw new Error((e?"Y":"X")+" axis with name "+r+" is already defined");n[r]=b}return this.appendAxis(b),b},e.prototype.createAxes=function(t){for(var e=this.options,o=[].concat(e.xAxis),i=[],r=[].concat(e.yAxis),n=[],s=0;s<o.length;s++){Q(this.findPane(o[s].pane),t)&&i.push(this.createXYAxis(o[s],!1,s))}for(var a=0;a<r.length;a++){Q(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 Vt(i.x,i.y),n=this.axes,s=n.length,a=[],p=[],l=0;l<s;l++){var h=n[l],c=h.options.vertical?p:a,u=h.getValue(r);null!==u&&c.push(u)}a.length>0&&p.length>0&&t.trigger(o,{element:ct(e),originalEvent:e,x:Hr(a),y:Hr(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);is(this.options,r,o,e),is(this.originalOptions,r,o,e)},e}(Qr);function is(t,e,o,i){R([].concat(o?t.yAxis:t.xAxis)[e],i)}wt(os,{xAxis:{},yAxis:{}}),R(os.prototype,Kr);var rs=os,ns=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=U(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===a||"insideEnd"===t.position)t.color||(t.color=Ot(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 he(o,R({},t,{align:a,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(),p=e.box.width();if(t.position===a)o.radius=Math.abs((o.radius-s)/2)+s,n=o.point(r),e.reflow(new Nt(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 Nt(n.x,n.y-s/2,n.x,n.y));else{var l;(n=o.clone().expand(i).point(r)).x>=o.center.x?(l=n.x+p,e.orientation=f):(l=n.x-p,e.orientation=c),e.reflow(new Nt(l,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 k.geometry.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 k.drawing.Group;return e.createSegmentVisual(t),t}});n&&this.visual.append(n)}else this.createSegmentVisual(this.visual)},e.prototype.createSegmentVisual=function(t){var e=this.sector,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,R({fill:s,stroke:{opacity:o.opacity},zIndex:o.zIndex},r));t.append(a),Ui(o)&&t.append(this.createGradientOverlay(a,{baseColor:n,fallbackFill:s},R({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 k.drawing.Circle(new k.geometry.Circle(new k.geometry.Point(t.center.x,t.center.y),t.radius),e):Xt.current.createRing(t,e)},e.prototype.createAnimation=function(){var e=this.options,o=this.sector.center;R(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,R({},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 k.geometry.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:ps(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}(qt),ss=vt(yt(30),10),as=vt(yt(60),10);function ps(t){var e=yt(t),o=vt(Math.sin(e),10),i=vt(Math.cos(e),10);return{horizontal:Math.abs(o)>as?a:i<0?f:c,vertical:Math.abs(o)<ss?a:o<0?s:g}}wt(ns,{color:v,overlay:{gradient:"roundedBevel"},border:{width:.5},labels:{visible:!1,distance:35,font:"12px sans-serif",margin:z(.5),align:p,zIndex:1,position:"outsideEnd"},animation:{type:ni},highlight:{visible:!0,border:{width:1}},visible:!0}),R(ns.prototype,yi);var ls=ns,hs={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,l=!1!==o.visible,h=l?U(r):U(s)||U(r),c=o.category;h&&(c=h({text:c,series:o.series,dataItem:o.dataItem,percentage:o.percentage,value:t})),l?(a={},p=e.color):(a={color:s.color,font:s.font},p=(n.markers||{}).color),lr(c)&&""!==c&&this.legendItems.push({active:l,pointIndex:o.index,text:c,series:o.series,markerColor:p,labels:a})}}},cs=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 p=r[s],l=p.data,h=Ir(p),c=h.total,u=h.points,d=h.count,f=360/c,g=void 0;isFinite(f)||(g=360/d);var y=void 0;y=st(p.startAngle)?p.startAngle:e.startAngle,s!==n-1&&"outsideEnd"===p.labels.position&&(p.labels.position=a);for(var v=0;v<u.length;v++){var m=u[v];if(m){var x=m.fields,b=m.value,_=m.visible,w=0!==b?g||b*f:0,C=1!==l.length&&Boolean(x.explode);M(p.color)||(p.color=x.color||o[v%i]),t(m.valueFields.value,new Ft(null,0,0,y,w),{owner:this,category:st(x.category)?x.category:"",index:v,series:p,seriesIx:s,dataItem:l[v],percentage:0!==c?b/c:0,explode:C,visibleInLegend:x.visibleInLegend,visible:_,zIndex:n-s,animationDelay:this.animationDelay(v,s,n)}),!1!==_&&(y+=w)}}}},e.prototype.evalSegmentOptions=function(t,e,o){var i=o.series;ui(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=R({},o.series,{index:o.index});if(this.evalSegmentOptions(i,t,o),this.createLegendItem(t,i,o),!1!==o.visible){var r=new ls(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,l=new Nt(n.x1,n.y1,n.x1+s,n.y1+s),h=l.center(),c=n.center(),u=e.series.length,d=[],g=[],y=xt(e.padding,p);this.targetBox=t,y=y>a-5?a-5:y,l.translate(c.x-h.x,c.y-h.y);for(var v=a-y,m=new Vt(v+l.x1+y,v+l.y1+y),x=0;x<r;x++){var b=o[x],_=b.sector,w=b.seriesIx;if(_.radius=v,_.center=m,i.length){var C=i[w];_.innerRadius=C.innerRadius,_.radius=C.radius}w===u-1&&b.explode&&(_.center=_.clone().setRadius(.15*_.radius).point(_.middle())),b.reflow(l);var k=b.label;k&&"outsideEnd"===k.options.position&&w===u-1&&(k.orientation===f?g.push(k):d.push(k))}d.length>0&&(d.sort(this.labelComparator(!0)),this.leftLabelsReflow(d)),g.length>0&&(g.sort(this.labelComparator(!1)),this.rightLabelsReflow(g)),this.box=l},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=dt(this.points),o=e.sector,i=t.length-1,r=o.radius+e.options.labels.distance,n=[],s=t[0].box,a=vt(s.y1-(o.center.y-r-s.height()-s.height()/2));n.push(a);for(var p=0;p<i;p++){var l=t[p+1].box;s=t[p].box,a=vt(l.y1-s.y2),n.push(a)}return a=vt(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=dt(this.points),r=i.sector,n=i.options.labels,s=e.length,a=n.distance,l=r.center.y-(r.radius+a)-e[0].box.height();t[0]+=2;for(var h=0;h<s;h++){var c=e[h],u=c.box;l+=t[h],o=this.hAlignLabel(u.x2,r.clone().expand(a),l,l+u.height(),c.orientation===f),c.orientation===f?(n.align!==p&&(o=r.radius+r.center.x+a),c.reflow(new Nt(o+u.width(),l,o,l))):(n.align!==p&&(o=r.center.x-r.radius-a),c.reflow(new Nt(o-u.width(),l,o,l))),l+=u.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,a=n.label,p=s.middle(),l=(n.options.connectors||{}).color||e.color;if(a){var h=new k.drawing.Path({stroke:{color:l,width:e.width},animation:{type:"fadeIn",delay:n.animationDelay}});if("outsideEnd"===a.options.position){var c=a.box,u=s.center,d=s.point(p),g=new Vt(c.x1,c.center().y),y=void 0,v=void 0,m=void 0;d=s.clone().expand(e.padding).point(p),h.moveTo(d.x,d.y),a.orientation===f?(m=us(u,d,g,v=new Vt(c.x1-e.padding,c.center().y)),g=new Vt(v.x-4,v.y),(m=m||g).x=Math.min(m.x,g.x),this.pointInCircle(m,s.center,s.radius+4)||m.x<s.center.x?(y=s.center.x+s.radius+4,n.options.labels.align!==ii?y<g.x?h.lineTo(y,d.y):h.lineTo(d.x+8,d.y):h.lineTo(y,d.y),h.lineTo(g.x,v.y)):(m.y=v.y,h.lineTo(m.x,m.y))):(m=us(u,d,g,v=new Vt(c.x2+e.padding,c.center().y)),g=new Vt(v.x+4,v.y),(m=m||g).x=Math.max(m.x,g.x),this.pointInCircle(m,s.center,s.radius+4)||m.x>s.center.x?(y=s.center.x-s.radius-4,n.options.labels.align!==ii?y>g.x?h.lineTo(y,d.y):h.lineTo(d.x-8,d.y):h.lineTo(y,d.y),h.lineTo(g.x,v.y)):(m.y=v.y,h.lineTo(m.x,m.y))),h.lineTo(v.x,v.y),this._connectorLines.push(h),this.visual.append(h)}}}},e.prototype.renderVisual=function(){if(t.prototype.renderVisual.call(this),kt(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(k.geometry.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,l=Math.min(Math.abs(p-o),Math.abs(p-i));return l>n?t:a+Math.sqrt(n*n-l*l)*(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}(qt);function us(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 Vt(t.x+a*(e.x-t.x),t.y+a*(e.y-t.y))}return r}wt(cs,{startAngle:90,connectors:{width:2,color:"#939393",padding:8},inactiveItems:{markers:{},labels:{}}}),R(cs.prototype,hs),cs.prototype.isStackRoot=!0;var ds=cs,fs=function(t){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 ds(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),rt(this.options.legend.items,e.legendItems)},e}(Qr),gs=function(t){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===a){i.radius-=(i.radius-i.innerRadius)/2;var s=i.point(r);o.reflow(new Nt(s.x,s.y-n/2,s.x,s.y))}else t.prototype.reflowLabel.call(this)}},e.prototype.createSegment=function(t,e){return Xt.current.createRing(t,e)},e}(ls);wt(gs,{overlay:{gradient:"roundedGlass"},labels:{position:a},animation:{type:ni}}),R(gs.prototype,yi);var ys=gs,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.addValue=function(t,e,o){var i=R({},o.series,{index:o.index});if(this.evalSegmentOptions(i,t,o),this.createLegendItem(t,i,o),t&&!1!==o.visible){var r=new ys(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,l=p.length,h=xt(i.padding,a),c=s-(h=h>s-5?s-5:h),u=0,d=0;d<l;d++){var f=p[d];0===d&&st(f.holeSize)&&(o=f.holeSize,c-=f.holeSize),st(f.size)?c-=f.size:u++,st(f.margin)&&d!==l-1&&(c-=f.margin)}st(o)||(c-=o=.75*((s-h)/(l+.75)));var g,y=o,v=0;this.seriesConfigs=[];for(var m=0;m<l;m++){var x=p[m];g=(y+=v)+xt(x.size,c/u),this.seriesConfigs.push({innerRadius:y,radius:g}),v=x.margin||0,y=g}t.prototype.reflow.call(this,e)},e.prototype.animationDelay=function(t,e,o){return 50*t+600*(e+1)/(o+1)},e}(ds);wt(vs,{startAngle:90,connectors:{width:2,color:"#939393",padding:8}});var ms=vs,xs=function(t){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 ms(this,{series:t,padding:e.padding,connectors:e.connectors,legend:this.options.legend});this.appendChart(o)},e}(fs),bs=function(t){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 Vi},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=Do,e={min:.1,max:1}):(t=Lo,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=z(t.padding||{},r),s=i.clone().unpad(n),p=s.clone();p.y2=p.y1+Math.min(p.width(),p.height()),p.align(s,x,a);var l=p.clone().shrink(0,p.height()/2);o.reflow(p),e.reflow(l);var h=e.lineBox().height()-e.box.height();e.reflow(e.box.unpad({top:h})),this.axisBox=p,this.alignAxes(p)},e.prototype.backgroundBox=function(){return this.box},e.prototype.detachLabels=function(){},e}(Qr),_s=function(t){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=Vt.onCircle(t.center,t.startAngle,o);return new Nt(i.x,i.y,i.x,i.y)},e}(cr);wt(_s,{clip:!1});var ws=_s,Cs=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(es);Cs.prototype.pointSlot=ws.prototype.pointSlot,wt(Cs,{clip:!1});var ks=Cs,Ss=function(t){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 zo(!1),i=this.points();i.push(e),(t=this._strokeSegments=o.process(i)).pop()}return t},e}(ji),As=function(t){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 k.geometry.Segment([e.x,e.y]);t.segments.unshift(o),t.segments.push(o)},e}(Li);function Ps(t,e){return t.value.x-e.value.x}var Ts=function(t){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 Ss(t,e,o):new As(t,e,o)},e.prototype.createMissingValue=function(t,e){var o;return lr(t.x)&&"interpolate"!==e&&(o={x:t.x,y:t.y},e===ei&&(o.y=0)),o},e.prototype.seriesMissingValues=function(t){return t.missingValues||ei},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(Ps),this._hasMissingValuesGap())for(var e=0;e<t.length;e++){var o=t[e];if(o)lr(o.value.y)||"gap"!==this.seriesMissingValues(o.series)||delete t[e]}return t},e}(ks),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.createPolarAxis=function(){var t=new Mo(this.options.xAxis,this.chartService);this.polarAxis=t,this.axisX=t,this.appendAxis(t)},e.prototype.valueAxisOptions=function(t){return R(t,{majorGridLines:{type:r},minorGridLines:{type:r}},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),Qr.prototype.appendChart.call(this,t,e)},e.prototype.createCharts=function(){var t=this.filterVisibleSeries(this.series),e=this.panes[0];this.createLineChart(jr(t,["polarLine"]),e),this.createScatterChart(jr(t,["polarScatter"]),e),this.createAreaChart(jr(t,["polarArea"]),e)},e.prototype.createLineChart=function(t,e){if(0!==t.length){var o=new ks(this,{series:t});this.appendChart(o,e)}},e.prototype.createScatterChart=function(t,e){if(0!==t.length){var o=new ws(this,{series:t});this.appendChart(o,e)}},e.prototype.createAreaChart=function(t,e){if(0!==t.length){var o=new Ts(this,{series:t});this.appendChart(o,e)}},e.prototype._dispatchEvent=function(t,e,o){var i=t._eventCoordinates(e),r=new Vt(i.x,i.y),n=this.axisX.getValue(r),s=this.axisY.getValue(r);null!==n&&null!==s&&t.trigger(o,{element:ct(e),x:n,y:s})},e.prototype.createCrosshairs=function(){},e}(bs);wt(Os,{xAxis:{},yAxis:{}}),R(Os.prototype,Kr);var Ms=Os;var Es=function(t){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=Vt.onCircle(t.center,t.middle(),o);return new Nt(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=dt(i),s=dt(n.linePoints),a=0===r.categoryIx,p=s.categoryIx===s.categoriesCount-1;a&&p&&dt(i).linePoints.push(r)}}},e.prototype.createSegment=function(t,e,o){var i=new("smooth"===e.style?Ai:_i)(t,e,o),r=this.seriesMissingValues(e);return t.length!==e.data.length&&"interpolate"!==r||(i.options.closed=!0),i},e}(Bi);wt(Es,{clip:!1,limitPoints:!1});var Rs=Es,Bs=function(t){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}(ji),Ls=function(t){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}(Li),Is=function(t){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 Bs(t,e,o,r,n)).options.closed=!0:(t.push(t[0]),s=new Ls(t,e,o,r,n)),s},e.prototype.seriesMissingValues=function(t){return t.missingValues||ei},e}(Rs),Ds=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}(ys);wt(Ds,{overlay:{gradient:"none"},labels:{distance:10}});var js=Ds,zs=function(t){function e(e){t.call(this,e),this.forEach=e.rtl?Xi:Wi}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reflow=function(t){var e=this.options,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}(qt);wt(zs,{gap:1,spacing:0});var Vs=zs,Hs=function(t){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 Nt;for(var s=r;s>=0&&s<i;s+=n){var a=o[s].sector;a.startAngle=t.startAngle,a.angle=t.angle}},e}(qt),Ns=function(t){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 js},e.prototype.clusterType=function(){return Vs},e.prototype.stackType=function(){return Hs},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}($i);Ns.prototype.reflow=gi.prototype.reflow,wt(Ns,{clip:!1,limitPoints:!1,animation:{type:"pie"}});var Us=Ns,Fs=function(t){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 To(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&&R(t,{majorGridLines:{type:r},minorGridLines:{type:r}}),this._isStacked100&&R(t,{roundToMajorUnit:!1,labels:{format:"P0"}}),R(t,this.options.valueAxis)},e.prototype.aggregateCategories=function(){An.prototype.aggregateCategories.call(this,this.panes)},e.prototype.createCategoryAxesLabels=function(){An.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(jr(t,["radarArea"]),e),this.createLineChart(jr(t,["radarLine"]),e),this.createBarChart(jr(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 Is(this,this.chartOptions(t));this.appendChart(o,e)}},e.prototype.createLineChart=function(t,e){if(0!==t.length){var o=new Rs(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 Us(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 Vt(i.x,i.y),n=this.categoryAxis.getCategory(r),s=this.valueAxis.getValue(r);null!==n&&null!==s&&t.trigger(o,{element:ct(e),category:n,value:s})},e.prototype.createCrosshairs=function(){},e}(bs);R(Fs.prototype,Kr,{appendChart:An.prototype.appendChart,aggregateSeries:An.prototype.aggregateSeries,seriesSourcePoints:An.prototype.seriesSourcePoints}),wt(Fs,{categoryAxis:{categories:[]},valueAxis:{}});var Gs=Fs,Ws=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 Nt(e[0].x,e[0].y,e[1].x,e[2].y),o&&o.reflow(new Nt(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 k.drawing.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 k.drawing.Path.fromPoints(this.points,t)},e.prototype.highlightVisual=function(){return this.visual.children[0]},e.prototype.highlightVisualArgs=function(){var t=k.drawing.Path.fromPoints(this.points).close();return{options:this.options,path:t}},e.prototype.tooltipAnchor=function(){var t=this.box;return{point:new Vt(t.center().x,t.y1),align:{horizontal:"center",vertical:"top"}}},e.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},e}(qt);wt(Ws,{color:v,border:{width:1}}),R(Ws.prototype,yi);var Xs=Ws,Ys=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=Ir(o),n=r.total,s=r.points,a=0;a<s.length;a++){var p=s[a];if(p){var l=p.fields;M(o.color)||(o.color=l.color||e[a%e.length]),l=R({index:a,owner:this,series:o,dataItem:i[a],percentage:p.value/n},l,{visible:p.visible});var h=p.valueFields.value,c=this.createSegment(h,l),u=this.createLabel(h,l);c&&u&&c.append(u)}}},e.prototype.evalSegmentOptions=function(t,e,o){var i=o.series;ui(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=R({},e.series);if(this.evalSegmentOptions(o,t,e),this.createLegendItem(t,o,e),!1!==e.visible){var i=new Xs(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=R({},this.options.labels,o.labels),n=t;if(r.visible){var s=U(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=Ot(o.color),r.background||(r.background=o.color)),this.evalSegmentOptions(r,t,e);var p=new he(n,R({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!==a){var r=t[o].box.width();i===c?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,p=0;p<r.length;p++)r[p].percentage>a.percentage&&(a=r[p]);for(var l=s.percentage/a.percentage*e,h=(e-l)/2,c=0,u=0;u<n;u++){var d=r[u].percentage,f=r[u+1],g=f?f.percentage:d,y=r[u].points=[],v=i.dynamicHeight?o*d:o/n,m=void 0;m=ft(m=d?(e-l*(g/d))/2:g?0:e/2,0,e),y.push(new k.geometry.Point(t.x1+h,t.y1+c)),y.push(new k.geometry.Point(t.x1+e-h,t.y1+c)),y.push(new k.geometry.Point(t.x1+e-m,t.y1+v+c)),y.push(new k.geometry.Point(t.x1+m,t.y1+v+c)),h=m,c+=v+i.segmentSpacing,l=ft(e-2*m,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,p=s?0:(e-e/i.neckRatio)/2,l=((s?e:e-2*p)-a)/2,h=0,c=0;c<n;c++){var u=r[c].points=[],d=r[c].percentage,f=i.dynamicHeight?l*d:l/n,g=i.dynamicHeight?o*d:o/n;u.push(new k.geometry.Point(t.x1+p,t.y1+h)),u.push(new k.geometry.Point(t.x1+e-p,t.y1+h)),u.push(new k.geometry.Point(t.x1+e-p-f,t.y1+g+h)),u.push(new k.geometry.Point(t.x1+p+f,t.y1+g+h)),p+=f,h+=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}(qt);wt(Ys,{neckRatio:.3,width:300,dynamicSlope:!1,dynamicHeight:!0,segmentSpacing:0,labels:{visible:!1,align:a,position:a,zIndex:1}}),R(Ys.prototype,hs);var qs=Ys,Zs=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.render=function(){this.createFunnelChart(this.series)},e.prototype.createFunnelChart=function(t){var e=t[0],o=new qs(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),rt(this.options.legend.items,e.legendItems)},e}(Qr),Qs=function(t,e){void 0===e&&(e=.05);var o=Object(k.parseColor)(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()}},Ks=function(t){function e(e,o){t.call(this),this.options=o,this.color=o.color||v,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=U(t),r=t.color;e=i?i(o):this.formatValue(t.format),r||(r=Ot(this.color)),this.label=new he(e,R({align:a,vAlign:a,margin:{left:5,right:5},zIndex:xt(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"===xt(t.type,"rect"),r=xt(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,pe(o)},e.prototype.markerBorder=function(){var t=this.options,e=t.markers.border,o=xt(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 $t({type:xt(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:xt(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 $t({type:xt(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:xt(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 Vt(t,e),align:{horizontal:a,vertical:s}}},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}(qt);R(Ks.prototype,yi),R(Ks.prototype,vi),Ks.prototype.defaults={markers:{type:"rect",borderRadius:4,border:{color:"transparent"}},padding:{top:1},labels:{visible:!1,padding:3},opacity:1,notes:{label:{}}};var $s=Ks,Js=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:u,max:d},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];st(s)||(this._evalSeries[r]=s=ui(t,{},n,!0));var a=t;return s&&ui(a=R({},t),{value:e,series:i,dataItem:o.dataItem,min:this.valueRange.min,max:this.valueRange.max},n),a},e.prototype.pointType=function(){return $s},e.prototype.pointOptions=function(t,e){var o=this.seriesOptions[e];if(!o){var i=this.pointType().prototype.defaults;this.seriesOptions[e]=o=R({},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),M(o.color))r=i.color;else if(0!==this.valueRange.max){r=Qs(r)(t.value/this.valueRange.max)}var n=new $s(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,l=a.yAxis,h=p.categoryIndex(t.x),c=l.categoryIndex(t.y),u=p.getSlot(h,h,i),d=l.getSlot(c,c,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 Nt(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(),l=0;l<i.data.length;l++){var h=this._bindPoint(i,o,l),c=h.valueFields,u=h.fields,d=n.totalIndex(c.x),f=s.totalIndex(c.y),g=a.min<=d&&d<=a.max,y=p.min<=f&&f<=p.max;g&&y&&t(c,R({pointIx:l,series:i,seriesIx:o,dataItem:i.data[l],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}(qt);wt(Js,{series:[],tooltip:{format:"{0}, {1}: {2}"},labels:{format:"{2}"},clip:!0}),R(Js.prototype,{_bindPoint:gi.prototype._bindPoint});var ta=Js,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.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=It(n.categories||[]),p=It(s.categories||[]),l=0;l<i.length;l++){var h=Zo.current.bindPoint(o,l).valueFields,c=h.x,u=h.y;a.has(c)||a.add(c),p.has(u)||p.add(u)}n.categories=a.values(),s.categories=p.values()}},e.prototype.createCharts=function(t){for(var e=this.groupSeriesByPane(),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(jr(n,["heatmap"]),i)}},e.prototype.createHeatmapChart=function(t,e){var o=new ta(this,{series:t});this.appendChart(o,e)},e.prototype.seriesPaneName=function(t){var e=this.options,o=t.xAxis,i=X([].concat(e.xAxis),(function(t){return t.name===o}))[0],r=t.yAxis,n=X([].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 u=h[c],d=u[e?"yAxis":"xAxis"];if(d===s.name||0===o&&!d){var f=Zo.current.bindPoint(u,0).valueFields;p.push(f[e?"y":"x"]);break}}for(var g=0;g<p.length;g++)if(p[g]instanceof Date){i=!0;break}var y=new(Dr(s.type,l)||!s.type&&i?co:oo)(s,this.chartService);if(y.axisIndex=o,r){if(n[r])throw new Error((e?"Y":"X")+" axis with name "+r+" is already defined");n[r]=y}return this.appendAxis(y),y.mapCategories(),y},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++){Q(this.findPane(o[s].pane),t)&&i.push(this.createXYAxis(o[s],!1,s))}for(var a=0;a<r.length;a++){Q(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 Vt(i.x,i.y),n=this.axes,s=n.length,a=[],p=[],l=0;l<s;l++){var h=n[l];Br(h.options.vertical?p:a,h.getCategory(r))}a.length>0&&p.length>0&&t.trigger(o,{element:ct(e),originalEvent:e,x:Hr(a),y:Hr(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);oa(this.options,r,o,e),oa(this.originalOptions,r,o,e)},e.prototype.crosshairOptions=function(t){return Object.assign({},t.options.crosshair,{zIndex:0})},e}(Qr);function oa(t,e,o,i){R([].concat(o?t.yAxis:t.xAxis)[e],i)}wt(ea,{xAxis:{},yAxis:{}}),R(ea.prototype,Kr);var ia=ea,ra="color",na="first",sa="max";Nn.current.register(An,[oi,ii,ri,si,"area","verticalArea","candlestick","ohlc","bullet","verticalBullet","boxPlot","verticalBoxPlot","rangeColumn","rangeBar","waterfall","horizontalWaterfall","rangeArea","verticalRangeArea"]),Nn.current.register(rs,["scatter","scatterLine","bubble"]),Nn.current.register(fs,[ni]),Nn.current.register(xs,["donut"]),Nn.current.register(Zs,["funnel"]),Nn.current.register(Ms,["polarArea","polarLine","polarScatter"]),Nn.current.register(Gs,["radarArea","radarColumn","radarLine"]),Nn.current.register(ia,["heatmap"]),Zo.current.register([oi,ii,ri,si,"area","verticalArea"],[y],["category",ra,"noteText","errorLow","errorHigh"]),Zo.current.register(["rangeColumn","rangeBar","rangeArea","verticalRangeArea"],["from","to"],["category",ra,"noteText"]),Zo.current.register(["waterfall","horizontalWaterfall"],[y],["category",ra,"noteText","summary"]),Zo.current.register(["polarArea","polarLine","polarScatter"],[m,x],[ra]),Zo.current.register(["radarArea","radarColumn","radarLine"],[y],[ra]),Zo.current.register(["funnel"],[y],["category",ra,"visibleInLegend","visible"]),en.current.register([oi,ii,ri,si,"area","verticalArea","waterfall","horizontalWaterfall"],{value:sa,color:na,noteText:na,errorLow:"min",errorHigh:sa}),en.current.register(["rangeColumn","rangeBar","rangeArea","verticalRangeArea"],{from:"min",to:sa,color:na,noteText:na}),en.current.register(["radarArea","radarColumn","radarLine"],{value:sa,color:na}),Zo.current.register(["scatter","scatterLine","bubble"],[m,x],[ra,"noteText","xErrorLow","xErrorHigh","yErrorLow","yErrorHigh"]),Zo.current.register(["bubble"],[m,x,"size"],[ra,"category","noteText"]),Zo.current.register(["heatmap"],[m,x,y],[ra,"noteText"]),Zo.current.register(["candlestick","ohlc"],["open","high","low","close"],["category",ra,"downColor","noteText"]),en.current.register(["candlestick","ohlc"],{open:sa,high:sa,low:"min",close:sa,color:na,downColor:na,noteText:na}),Zo.current.register(["boxPlot","verticalBoxPlot"],["lower","q1","median","q3","upper","mean","outliers"],["category",ra,"noteText"]),en.current.register(["boxPlot","verticalBoxPlot"],{lower:sa,q1:sa,median:sa,q3:sa,upper:sa,mean:sa,outliers:na,color:na,noteText:na}),Zo.current.register(["bullet","verticalBullet"],["current","target"],["category",ra,"visibleInLegend","noteText"]),en.current.register(["bullet","verticalBullet"],{current:sa,target:sa,color:na,noteText:na}),Zo.current.register([ni,"donut"],[y],["category",ra,"explode","visibleInLegend","visible"]);var aa=["category",y,m,x],pa=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 Te(this,r),this.chartService.theme=i,this._initElement(e);var s=R({},this.options,o);this._originalOptions=R({},s),this._theme=i,this._initTheme(s,i),this._initHandlers(),this._initSurface(),this.bindCategories(),_t.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){_(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=aa,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=R({},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&&kt(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 Ho(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 Uo(e[o])},e.prototype.findPaneByIndex=function(t){var e=this._plotArea.panes;if(e[t])return new Uo(e[t])},e.prototype.plotArea=function(){return new Fo(this._plotArea)},e.prototype.toggleHighlight=function(t,e){var o,i,r,n=this._plotArea,s=(n.srcSeries||n.series||[])[0];M(e)?o=n.filterPoints(e):(B(e)?(i=e.series,r=e.category):i=r=e,o="donut"===s.type?la(n.pointsBySeriesName(i),r):s.type===ni||"funnel"===s.type?la((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(M(t)?(e=n.findPoint(t))&&i&&(o=e.categoryIx):i&&st(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&&lt(e,{width:o.width}),o.height&&lt(e,{height:o.height}),t&&t.options.type===this.options.renderAs?(this.surface.clear(),this.surface.resize()):(this._destroySurface(),this.surface=k.drawing.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 Tn,this._setupSelection(),this._createPannable(),this._createZoomSelection(),this._createMousewheelZoom(),this.trigger("render"),fa(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=R({},t.options,{chartArea:{width:t.width,height:t.height}});da(this._originalOptions,i),this.options=R({},this._originalOptions,i),this._initTheme(this.options,this._theme),this.bindCategories();var r=this._getModel();r.renderVisual(),fa(r._plotArea.panes),e=r.visual,this.options=o}else e=this.surface.exportVisual();return e},e.prototype._sharedTooltip=function(){return this._plotArea instanceof An&&this.options.tooltip&&this.options.tooltip.shared},e.prototype._createPannable=function(){var t=this.options;!1!==t.pannable&&(this._pannable=new Rn(this._plotArea,t.pannable))},e.prototype._createZoomSelection=function(){var t=this.options.zoomable,e=(t||{}).selection;!1!==t&&!1!==e&&(this._zoomSelection=new Ln(this,e))},e.prototype._createMousewheelZoom=function(){var t=this.options.zoomable,e=(t||{}).mousewheel;!1!==t&&!1!==e&&(this._mousewheelZoom=new In(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 Xn(this.chartService,t)},e.prototype._createSharedTooltip=function(t){return new qn(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=R({},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<aa.length;a++)o=aa[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=R({},t.seriesDefaults),s=e?R({},e.seriesDefaults):{},a=R({},s);ha(n),ha(a);for(var p=0;p<i;p++){var l=o[p].type||t.seriesDefaults.type,h=R({data:[]},a,s[l],{tooltip:t.tooltip},n,r[l]);o[p]._defaults=h,o[p]=R({},h,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 oe(this._modelOptions());return o.chart=this,o._plotArea=e,ue.buildTitle(t.title,o),t.legend&&t.legend.visible&&o.append(new Vn(e.options.legend,this.chartService)),o.append(e),o.reflow(),o},e.prototype._modelOptions=function(){var t=this.options,e=this.getSize();return R({transitions:t.transitions,width:e.width||600,height:e.height||400},t.chartArea)},e.prototype._createPlotArea=function(t){var e=this.options;return Nn.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 oo&&r.select&&!r.vertical){var n=i.range(),s=new Wn(this,i,R({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=Object(k.throttle)(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,nt(o,((t={}).contextmenu=this._clickHandler,t[pi]=this._mousewheelHandler,t.mouseleave=this._mouseleaveHandler,t)),this._shouldAttachMouseMove()&&nt(o,((e={}).mousemove=this._mousemove,e)),this.domEvents=Me.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:ca(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:ca(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,l=p.startLocation-p.location;0!==l&&(r[a.options.name]=a.translateRange(l))}}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:ca(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 xt(t.rate,.3)},e.prototype._mousewheel=function(t){var e=this,o=ot(t),i=this._mousewheelZoom,r=this._eventCoordinates(t);if(!this._stopChartHandlers(t)&&this._plotArea.backgroundContainsPoint(r))if(i){var n={delta:o,axisRanges:ca(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,l={},h=0;h<p.length;h++){var c=p[h],u=c.options.name;u&&(l[u]=c.scaleRange(-a*e._mousewheelZoomRate(),r))}this.trigger("zoom",{delta:o,axisRanges:l,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=ca(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=ht(t);return this._toModelCoordinates(e.x,e.y)},e.prototype._elementPadding=function(){if(!this._padding){var t=j(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=pt(this.element);return{left:vt(t.x+e.left+o.left),top:vt(t.y+e.top+o.top)}},e.prototype._toModelCoordinates=function(t,e){var o=this.element,i=pt(o),r=this._elementPadding(),n=Tt(o).invert(),s=new k.geometry.Point(t-i.left-r.left,e-i.top-r.top).transform(n);return new Vt(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 Qr)})),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){R({},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),nt(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))R({},o.tooltip,a.options.tooltip).visible&&i.show(a),r.show(a)}}else mt(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 l=r.pointsByCategoryIndex(p),h=l.map((function(t){return t.eventArgs(e)})),c=h[0]||{};c.categoryPoints=h,l.length>0&&!this.trigger("seriesHover",c)?(i.visible&&s.showAt(l,t),a.show(l),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 Z,s=[],a=!1,p=0;p<r;p++){var l=i[p],h=l.categoryAxis===t.name||!l.categoryAxis&&0===e,c=l.data,u=c.length,d=l.categoryField&&h;if(a=d||a,d&&u>0)for(var f=(o=Vr(t,Yo(l.categoryField,c[0])))?zr:Yo,g=0;g<u;g++){var y=c[g],v=f(l.categoryField,y,this.chartService.intl);!o&&n.get(v)||(s.push([v,y]),o||n.set(v,!0))}}if(s.length>0){o&&(s=function(t,e){void 0===e&&(e=We);for(var o=function(t,e){void 0===e&&(e=We);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],dt(r))&&r.push(o[n]);return r}(s,(function(t,e){return We(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=Zo.current.valueFields(t),o=!0,i=0;i<e.length;i++){var r=e[i];if(r===y?r="field":r+="Field",!st(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=Q(n.type,[ni,"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;mt(this.element,((t={}).mousemove=this._mousemove,t)),this._shouldAttachMouseMove()&&nt(this.element,((e={}).mousemove=this._mousemove,e))},e.prototype.applyOptions=function(t,e){da(this._originalOptions,t),this._originalOptions=R(this._originalOptions,t),this.options=R({},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,mt(this.element,((t={}).contextmenu=this._clickHandler,t[pi]=this._mousewheelHandler,t.mousemove=this._mousemove,t.mouseleave=this._mouseleaveHandler,t)),this.domEvents&&(this.domEvents.destroy(),delete this.domEvents),this._mouseMoveTrackHandler&&mt(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}(k.Class);function la(t,e){if(t)for(var o=0;o<t.length;o++)if(t[o].category===e)return[t[o]]}function ha(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 ca(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 ua=["data","categories"];function da(t,e){for(var o in e)if(!Q(o,ua)&&e.hasOwnProperty(o)){var i=e[o],r=t[o];if(st(r)){var n=null===i;n||!st(i)?(delete t[o],n&&delete e[o]):r&&B(i)&&B(r)&&da(r,i)}}}function fa(t){for(var e=0;e<t.length;e++)t[e].notifyRender()}wt(pa,{renderAs:"",chartArea:{},legend:{visible:!0,labels:{}},categoryAxis:{},seriesDefaults:{type:ii,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 ga=pa,ya=function(t){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 Vt(this.plotArea.box.x2,e.center().y):new Vt(e.center().x,-2),align:i}},e.prototype._defaultAnchor=function(t,e){return this._slotAnchor({},e)},e}(qn),va=[oi,"bullet"];function ma(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 xa(t,e){for(var o=0;o<t.length;o++)t[o].style.display=e[o]}function ba(t){return P(t)?[t]:t}var _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._setElementClass=function(t){_(t,"k-sparkline")},e.prototype._initElement=function(e){t.prototype._initElement.call(this,e),this._initialWidth=Math.floor(lt(e).width)},e.prototype._resize=function(){var e=this.element,o=ma(e.childNodes);this._initialWidth=Math.floor(lt(e).width),xa(e.childNodes,o),t.prototype._resize.call(this)},e.prototype._modelOptions=function(){var t=this.options,e=this._surfaceWrap(),o=ma(e.childNodes),i=document.createElement("span");i.innerHTML="&nbsp;",e.appendChild(i);var r=R({width:this._autoWidth,height:lt(e).height,transitions:t.transitions},t.chartArea,{inline:!0,align:!1});return lt(e,{width:r.width,height:r.height}),e.removeChild(i),xa(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=z(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===oi)return 150;if("bullet"===p.type)return 150;if(p.type===ni)return lt(r).height;var l=a.categoryAxis;if(l){var h=l.categoriesCount()*(!a.options.isStacked&&Q(p.type,[ii,"verticalBullet"])?a.seriesOptions.length:1);n=Math.max(n,h)}}}var c=n*e.pointWidth;return c>0&&(c+=o.left+o.right),c},e.prototype._createSharedTooltip=function(t){return new ya(this._plotArea,t)},e.normalizeOptions=function(t){var e=ba(t);return(e=b(e)?{seriesDefaults:{data:e}}:R({},e)).series||(e.series=[{data:ba(e.data)}]),R(e,{seriesDefaults:{type:e.type}}),(Q(e.series[0].type,va)||Q(e.seriesDefaults.type,va))&&(e=R({},{categoryAxis:{crosshair:{visible:!1}}},e)),e},e}(ga);wt(_a,{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 wa=_a,Ca=function(t){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(j(this.element,"opacity").opacity)},e.prototype.step=function(t){j(this.element,{opacity:String(K(this._initialOpacity,0,t))})},e.prototype.abort=function(){t.prototype.abort.call(this),j(this.element,{display:"none",opacity:String(this._initialOpacity)})},e.prototype.cancel=function(){t.prototype.abort.call(this),j(this.element,{opacity:String(this._initialOpacity)})},e}(k.drawing.Animation);function ka(t,e){var o=document.createElement("div");return o.className=t,e&&(o.style.cssText=e),o}var Sa=function(t){function e(e,o,i){t.call(this),this.options=R({},this.options,i),this.container=e,this.chartService=o;var r=j(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=ka("k-navigator-hint","display: none; position: absolute; top: 1px; left: 1px;"),e=this.tooltip=ka("k-tooltip k-chart-tooltip"),o=this.scroll=ka("k-scroll");e.innerHTML="&nbsp;",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=He(Ye(t)+Ye(e-t)/2),p=.4*o.width(),l=o.center().x-p,h=(o.center().x-l)/(r.max-r.min),c=a-r.min,u=this.chartService.intl.format(r.format,t,e),d=U(r);this.clearHideTimeout(),this._visible||(j(i,{visibility:"hidden",display:"block"}),this._visible=!0),d&&(u=d({from:t,to:e})),s.innerHTML=u,j(s,{left:o.center().x-s.offsetWidth/2,top:o.y1});var f=j(s,["marginTop","borderTopWidth","height"]);j(n,{width:p,left:l+c*h,top:o.y1+f.marginTop+f.borderTopWidth+f.height/2}),j(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 Ca(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}(k.Class);wt(Sa,{format:"{0:d} - {1:d}",hideDelay:500});var Aa=Sa,Pa="_navigator",Ta=Pa;function Oa(){}var Ma=function(t){function e(e){var o;t.call(this),this.chart=e;var i=this.options=R({},this.options,e.options.navigator),r=i.select;r&&(r.from=this.parseDate(r.from),r.to=this.parseDate(r.to)),st(i.hint.visible)||(i.hint.visible=i.visible),this.chartObserver=new J(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 $e(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,l=a.to,h=a.mousewheel,c=(t=i,Oa.prototype=t,new Oa);0!==i.categoriesCount()&&(this.clean(),c.box=i.box,this.selection=new Wn(e,c,{min:n,max:s,from:p||n,to:l||s,mousewheel:xt(h,{zoom:"left"}),visible:o.visible},new J(this,{selectStart:"_selectStart",select:"_select",selectEnd:"_selectEnd"})),o.hint.visible&&(this.hint=new Aa(e.element,e.chartService,{min:n,max:s,template:U(o.hint),format:o.hint.format})))},e.prototype.setRange=function(){var t=this.chart._createPlotArea(!0).namedCategoryAxes[Ta].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=R({},i,{from:r,to:n}),this.filterAxes()},e.prototype._redrawSelf=function(t){var e=this.chart._plotArea;e&&e.redraw(dt(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,l=t.axisRanges[p.options.name],h=this.options.select;if(l&&!a&&i){e=h.from&&h.to?Ye(h.to)-Ye(h.from):Ye(i.options.to)-Ye(i.options.from);var c=He(ft(Ye(l.min),s.min,Ye(s.max)-e)),u=He(ft(Ye(c)+e,Ye(s.min)+e,s.max));this.options.select={from:c,to:u},this.options.liveDrag&&(this.filterAxes(),this.redrawSlaves()),i.set(c,u),this.showHint(c,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!==Pa&&(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 co(R({baseUnit:"fit"},t.options.categoryAxis[0],{categories:[e.from,e.to]}),t.chartService).options;i.from=Ue(r.min,-r.baseUnitStep,r.baseUnit),i.to=Ue(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),l=s.categoryIndex(o.options.to),h=this.chart._eventCoordinates(t.originalEvent);t.originalEvent.preventDefault(),Math.abs(a)>1&&(a*=3),l-p>1?(o.zoom(a,h),this.readSelection()):(e.options.min=r.from,r.from=e.scaleRange(-t.delta*this.chart._mousewheelZoomRate(),h).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[Ta]},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=R({},o.navigator,t.navigator),r=t.panes=[].concat(t.panes),n=R({},i.pane,{name:Pa});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===jr(o,ai).length,s=R({type:"date",pane:Pa,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(R({},s,{maxDateGroups:200},a,{name:Ta,title:null,baseUnit:"fit",baseUnitStep:"auto",labels:{visible:!1},majorTicks:{visible:!1}}),R({},s,a,{name:Ta+"_labels",maxDateGroups:20,baseUnitStep:"auto",labels:{position:""},plotBands:[],autoBaseUnitSteps:{minutes:[]},_overlap:!0}),R({},s,a,{name:Ta+"_ticks",maxDateGroups:200,majorTicks:{width:.5},plotBands:[],title:null,labels:{visible:!1,mirror:!0},_overlap:!0})),r.push(R({name:Ta,pane:Pa,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(R({color:n[a%n.length],categoryField:e.dateField,visibleInLegend:!1,tooltip:{visible:!1}},s,r[a],{axis:Ta,categoryAxis:Ta,autoBind:e.autoBindElements}))},e}(k.Class),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.applyDefaults=function(e,o){var i=lt(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=R({},r,n)),Ma.setup(e,r),t.prototype.applyDefaults.call(this,e,r)},e.prototype._setElementClass=function(t){_(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=X([].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 Ma(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===Pa?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===Ta?t=i.categories:t&&i.pane===Pa&&(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===Pa},e.prototype._toggleDragZoomEvents=function(){this._dragZoomEnabled||(this.element.style.touchAction="none",this._dragZoomEnabled=!0)},e}(ga);wt(Ea,{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 Ra=Ea,Ba=Math.PI/180;function La(t,e){var o=t.getOrigin(),i=t.getSize(),r=z(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 Ia=k.drawing.Group,Da=k.drawing.Path,ja=k.drawing.Text;function za(t,e){var o=t.box,i=t.children[0].box,r=e.border||{},n=e.background||"",s=Da.fromRect(new k.geometry.Rect([o.x1,o.y1],[o.width(),o.height()]),{stroke:{}}),a=new ja(t.text,new k.geometry.Point(i.x1,i.y1),{font:e.font,fill:{color:e.color}}),p=La(a.bbox().clone(),e.padding),l=Da.fromRect(p,{stroke:{color:r.width?r.color:"",width:r.width,opacity:r.opacity,dashType:r.dashType,lineJoin:"round",lineCap:"round"},fill:{color:n}}),h=new Ia;return h.append(s),h.append(l),h.append(a),h}function Va(t,e,o){var i=st(t.from)?t.from:d,r=st(t.to)?t.to:u;return t.from=Math.max(Math.min(r,i),e),t.to=Math.min(Math.max(r,i),o),t}function Ha(t,e){var o=z(e);return o.left=-o.left,o.top=-o.top,o.right=-o.right,o.bottom=-o.bottom,La(t,o)}var Na=k.drawing.Path,Ua=k.drawing.Surface,Fa=function(t){function e(e,o,i,r){void 0===r&&(r={}),t.call(this),this.element=e,this.theme=i,this.contextService=new Te(this,r),this._originalOptions=R({},this.options,o),this.options=R({},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(b(t))for(var r=0;r<t.length;r++)P(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 k.geometry.Rect([0,0],[t.width,t.height]);this._initSurface(),this.gaugeArea=this._createGaugeArea(),this._createModel();var o=Ha(e.bbox(),this._gaugeAreaMargin);this.reflow(o)},e.prototype.setOptions=function(t,e){this._originalOptions=R(this._originalOptions,t),this.options=R({},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=R({},e,this.options);var o=this.options,i=o.pointer;if(b(i)){for(var r=[],n=0;n<i.length;n++)r.push(R({},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 k.geometry.Rect([0,0],[e.width,e.height]);return this._gaugeAreaMargin=t.margin||5,o.width>0&&(i=Ha(i,o.width)),Na.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();lt(o,i),e&&e.options.type===t.renderAs?(this.surface.clear(),this.surface.resize()):(e&&e.destroy(),this.surface=Ua.create(o,{type:t.renderAs}))},e.prototype._surfaceSize=function(){var t=this.options,e=this._getSize();return t.gaugeArea&&R(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}(k.Class);wt(Fa,{plotArea:{},theme:"default",renderAs:"",pointer:{},scale:{},gaugeArea:{}});var Ga=Fa,Wa=k.drawing.Path,Xa=k.drawing.Group,Ya=k.geometry.Point;function qa(t,e){var o,i,r=t.position,n=t.tickX,s=t.tickY;return t.vertical?(o=new Ya(n,r),i=new Ya(n+e.size,r)):(o=new Ya(r,s),i=new Ya(r,s+e.size)),new Wa({stroke:{color:e.color,width:e.width}}).moveTo(o).lineTo(i)}function Za(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(qa(o,i)))}var Qa=function(t){function e(e,o){var i=e||{};!st(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=R({},this.options,t);return(e=R({},e,{labels:{mirror:e.mirror}})).majorUnit=e.majorUnit||zt(e.min,e.max),e},e.prototype.initFields=function(){},e.prototype.render=function(){var t=this.elements=new Xa,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 Xa,a=n.length,p=t.rangeSize||t.minorTicks.size/2,l=0;l<a;l++){var h=Va(n[l],e,o),c=this.getSlot(h.from,h.to),u=i?this.lineBox():c,d=i?c:this.lineBox();i?u.x1-=p*(r?-1:1):d.y2+=p*(r?-1:1),s.append(Wa.fromRect(new k.geometry.Rect([u.x1,d.y1],[u.x2-u.x1,d.y2-d.y1]),{fill:{color:h.color,opacity:h.opacity},stroke:{}}))}return s},e.prototype.renderLabels=function(){for(var t=this.labels,e=this.options,o=new Xa,i=0;i<t.length;i++)o.append(za(t[i],e.labels));return o},e.prototype.renderLine=function(){var t=this.options.line,e=this.lineBox(),o=new Xa;if(t.width>0&&t.visible){var i=new Wa({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 Xa,e=this.options,o=e.majorTicks.visible?e.majorUnit:0,i={vertical:e.vertical,mirror:e.labels.mirror,lineBox:this.lineBox()};return Za(t,this.getMajorTickPositions(),i,e.majorTicks),Za(t,this.getMinorTickPositions(),i,R({},{skipUnit:o/e.minorUnit},e.minorTicks)),t},e}(xo);wt(Qa,{min:0,max:50,majorTicks:{size:15,align:"inside",color:n,width:.5,visible:!0},minorTicks:{size:10,align:"inside",color:n,width:.5,visible:!0},line:{width:.5},labels:{position:"inside",padding:2},mirror:!1,_alignLines:!1});var Ka=Qa,$a=function(t){function e(e,o){t.call(this);var i=e.options,r=i.min,n=i.max,s=this.options=R({},this.options,o);s.fill=s.color,this.scale=e,st(s.value)?s.value=ft(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=st(e._oldValue)?e.value:r,e.value=ft(t,r,n),this.elements&&this.repaint()},e}(k.Class);wt($a,{color:n});var Ja=$a,tp=function(t){function e(e,o){t.call(this,e,o),this.options=R({track:{visible:st(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(),l=i.track.size||i.size,h=i.size/2,c=z(i.margin),u=a?c[s?"left":"right"]:c[s?"bottom":"top"];u=s?-u:u,a?(o=new Nt(p.x1+u,p.y1,p.x1+u,p.y2),s?o.x1-=l:o.x2+=l,"barPointer"!==i.shape&&(t=e=new Nt(p.x2+u,p.y1-h,p.x2+u,p.y2+h))):(o=new Nt(p.x1,p.y1-u,p.x2,p.y1-u),s?o.y2+=l:o.y1-=l,"barPointer"!==i.shape&&(t=e=new Nt(p.x1-h,p.y1-u,p.x2+h,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:st(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=z(e.margin);return r?n[i?"left":"right"]:n[i?"bottom":"top"]},e}(Ja);wt(tp,{shape:"barPointer",track:{border:{width:1}},color:n,border:{width:1},opacity:1,margin:z(3),animation:{type:"barPointer"},visible:!0});var ep=tp,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(){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 k.geometry.Point(o.x1,o.y1),a=this.toScale=new k.geometry.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=K(this.fromScale.x,this.toScale.x,t),o=K(this.fromScale.y,this.toScale.y,t);this.element.transform(k.geometry.transform().translate(e,o))},e}(k.drawing.Animation);wt(op,{easing:"linear",duration:250}),k.drawing.AnimationFactory.current.register("arrowPointer",op);var ip=op,rp=k.geometry.Point,np=k.drawing.Path,sp=function(t){function e(e,o){t.call(this,e,o),st(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 rp(0,0-o),new rp(0-i*e,0),new rp(0,0+o)]:[new rp(0-o,0),new rp(0,0+i*e),new rp(0+o,0)]},e.prototype.repaint=function(){var t=this.scale,e=this.options,o=new ip(this.elements,R(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 np({stroke:o.stroke,fill:o.fill}).moveTo(i[0]).lineTo(i[1]).lineTo(i[2]).close(),n=t.getSlot(e.value);return r.transform(k.geometry.transform().translate(n.x1,n.y1)),this.elements=r,r},e}(ep),ap=function(t){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?x:m,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=K(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}(k.drawing.Animation);wt(ap,{easing:"linear",speed:250}),k.drawing.AnimationFactory.current.register("barPointer",ap);var pp=ap,lp=k.drawing.Group,hp=k.drawing.Path,cp=function(t){function e(e,o){t.call(this,e,o),st(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,p=e.getSlot(e.options.min),l=e.getSlot(t),h=n?x:m,c=n?m:x,u=this._margin()*s,d=new k.geometry.Point;d[h]=p[h+"1"],d[c]=p[c+"1"];var f=new k.geometry.Point;f[h]=l[h+"1"],f[c]=l[c+"1"],n?(d.translate(u,0),f.translate(u,0)):(d.translate(0,u),f.translate(0,u));var g=f.clone(),y=d.clone();return n?(g.translate(a,0),y.translate(a,0)):(g.translate(0,a),y.translate(0,a)),[d,f,g,y]},e.prototype.repaint=function(){var t=this.scale,e=this.options,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 pp(i,R(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 lp,e=this.getElementOptions();this.options.track.visible&&t.append(this.renderTrack());var o=this.pointerPath=new hp({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 hp.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}(ep),up=k.drawing.Group,dp=function(t){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 Nt(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 up,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 Ka(t.scale,this.contextService);this.pointers=[];var o=t.pointer;o=b(o)?o:[o];for(var i=0;i<o.length;i++){var r=R({},o[i],{animation:{transitions:t.transitions}}),n="arrow"===r.shape?sp:cp;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 Nt(r.x-e,t.y1,r.x+e,t.y2)):(e=n.height()/2,n=new Nt(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 Nt(i.x1+t,n.y1,i.x2+t,n.y2))):(t=n.center().y-r.center().y,e.reflow(new Nt(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}(Ga);wt(dp,{transitions:!0,gaugeArea:{background:""},scale:{vertical:!0}});var fp=dp,gp=k.drawing.Arc,yp=k.drawing.Path,vp=k.drawing.Group;function mp(t,e,o,i){var r=new vp,n=t.center,s=t.getRadiusX();if(i.visible)for(var a=0;a<e.length;a++){var p=t.pointAt(e[a]),l=new k.geometry.Point(n.x+s-i.size,n.y).rotate(e[a],n);r.append(new yp({stroke:{color:i.color,width:i.width}}).moveTo(p).lineTo(l))}return r}function xp(t,e,o,i){return{from:t,to:e,color:o,opacity:i}}var bp=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=R({},this.options,t);return e.majorUnit=e.majorUnit||zt(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(!st(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 vp,s=.05*o;st(t.rangeDistance)?s=t.rangeDistance:t.rangeDistance=s;var a=t.labels,p="inside"===a.position,l=st(this.labelElements);p&&(o-=this.ticksSize(),this.hasRanges()&&!l&&(o-=r+s),e.setRadiusX(o).setRadiusY(o));for(var h=this.labels,c=h.length,u=z(a.padding),d=(u.left+u.right)/2,f=(u.top+u.bottom)/2,g=0;g<c;g++){var y=h[g],v=y.box.width()/2,m=y.box.height()/2,x=i[g],b=(x-180)*Ba,_=e.pointAt(x),w=_.x+Math.cos(b)*(v+d)*(p?1:-1),C=_.y+Math.sin(b)*(m+f)*(p?1:-1);y.reflow(new Nt(w-v,C-m,w+v,C+m));var S=new k.geometry.Point(y.box.x1,y.box.y1),A=void 0;if(l){var P=(A=this.labelElements.children[g]).bbox().origin,T=A.transform()||k.geometry.transform();T.translate(S.x-P.x,S.y-P.y),A.transform(T)}else A=za(y,t.labels),n.append(A);this.bbox=k.geometry.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=k.geometry.Rect.union(this.bbox,this.ranges.bbox())}},e.prototype.renderRanges=function(){var t=this.rangeSegments(),e=t.length,o=new vp;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 l=t[p],h=this.slotAngle(l[n?"to":"from"]),c=this.slotAngle(l[n?"from":"to"]);c-h!=0&&o.append(this.createRange(h,c,a,l))}}return o},e.prototype.createRange=function(t,e,o,i){var r=this.options.rangeSize,n=new k.geometry.Arc(this.arc.center,{radiusX:o+r/2,radiusY:o+r/2,startAngle:t,endAngle:e});return new gp(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(xp(r,n,s));for(var a=0;a<o;a++)for(var p=Va(e[a],r,n),l=i.length,h=0;h<l;h++){var c=i[h];if(c.from<=p.from&&p.from<=c.to){i.push(xp(p.from,p.to,p.color,p.opacity)),c.from<=p.to&&p.to<=c.to&&i.push(xp(p.to,c.to,s,p.opacity)),c.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 k.geometry.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=mp(o,this.majorTickAngles,e.majorUnit,e.majorTicks);var i=new vp;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=mp(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 l=[],h=0;h<s;h++)l.push(vt(a,3)),a+=p;return vt(a)<=t.endAngle&&l.push(a),l},e.prototype.radius=function(t){if(!t)return this.arc.getRadiusX();this.arc.setRadiusX(t).setRadiusY(t),this.repositionTicks(this.majorTicks.children,this.majorTickAngles),this.repositionTicks(this.minorTicks.children,this.minorTickAngles,!0)},e.prototype.repositionTicks=function(t,e,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]),p=t[s].segments,l=a.x-p[0].anchor().x,h=a.y-p[0].anchor().y;t[s].transform((new k.geometry.transform).translate(l,h))}},e}(xo);wt(bp,{min:0,max:100,majorTicks:{size:15,align:"inside",color:n,width:.5,visible:!0},minorTicks:{size:10,align:"inside",color:n,width:.5,visible:!0},startAngle:-30,endAngle:210,labels:{position:"inside",padding:2}});var _p=bp,wp=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=K(e.oldAngle,e.newAngle,t);this.element.transform(k.geometry.transform().rotate(o,e.center))},e}(k.drawing.Animation);wt(wp,{easing:"linear",duration:150}),k.drawing.AnimationFactory.current.register("radialPointer",wp);var Cp=wp,kp=k.drawing.Circle,Sp=k.drawing.Group,Ap=k.drawing.Path,Pp=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.setAngle=function(t){this.elements.transform(k.geometry.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 Cp(this.elements,R(e.animation,{oldAngle:o,newAngle:i})).play()},e.prototype.render=function(){var t=this.scale,e=this.options,o=new Sp;return!1!==e.animation&&R(e.animation,{startAngle:0,center:t.arc.center,reverse:t.options.reverse}),o.append(this._renderNeedle(),this._renderCap()),this.elements=o,this.setAngle(Ba),o},e.prototype.reflow=function(t){var e=this.center=t.center,o=ft(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=k.geometry.Rect.fromPoints(new k.geometry.Point(e.x-r,e.y-r),new k.geometry.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 Ap({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 k.geometry.Circle(this.center,this.capSize);return new kp(o,{fill:{color:e},stroke:{color:e}})},e}(Ja);wt(Pp,{cap:{size:.05},arrow:{width:16,height:14},animation:{type:"radialPointer",duration:150}});var Tp=Pp,Op=k.drawing.Group,Mp=function(t){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=k.geometry.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 Op;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)),l=vt(p,3),h=vt(-p,3),c=0,u=0;!(!(u++<100)||(c=n===i?c+1:0)>5||l!==r&&0<=(e=this.getPlotBox(l,t,s))&&e<=2||h!==r&&0<=(i=this.getPlotBox(h,t,s))&&i<=2||(r=e>0&&i>0?2*l:e<0&&i<0?2*h:vt((l+h)/2||1,3),0<=(o=this.getPlotBox(r,t,s))&&o<=2));)n=i,o>0?(h=r,i=o):(l=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=k.geometry.Rect.union(this.plotBbox,r[a].bbox);return this.getDiff(this.plotBbox,e)},e.prototype.getDiff=function(t,e){return Math.min(e.width()-t.width(),e.height()-t.height())},e.prototype.alignScale=function(t){var e=this.plotBbox.center(),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=k.geometry.Rect.union(n.bbox,s[a].bbox)},e.prototype._createModel=function(){var t=this.options,e=t.pointer,o=this.scale=new _p(t.scale,this.contextService);this.pointers=[];for(var i=b(e)?e:[e],r=0;r<i.length;r++){var n=new Tp(o,R({},i[r],{animation:{transitions:t.transitions}}));this.pointers.push(n)}},e}(Ga);wt(Mp,{transitions:!0,gaugeArea:{background:""}});var Ep=Mp,Rp=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.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}(_p);wt(Rp,{min:0,max:100,majorTicks:{visible:!1},minorTicks:{visible:!1},labels:{visible:!1},startAngle:0,endAngle:180,rangeLineCap:"round"});var Bp=Rp,Lp=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=ft(r,150,800);var n=e.elements.options.get("stroke.color"),s=e.currentColor();n!==s&&(this.startColor=new k.Color(n),this.color=new k.Color(s))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.step=function(t){var e=this.options,o=this.startColor,i=this.color,r=K(e.oldAngle,e.newAngle,t);if(this.element.angle(r),i){var n=vt(K(o.r,i.r,t)),s=vt(K(o.g,i.g,t)),a=vt(K(o.b,i.b,t));this.element.stroke(new k.Color(n,s,a).toHex())}},e}(k.drawing.Animation);wt(Lp,{easing:"linear",duration:150}),k.drawing.AnimationFactory.current.register("radialRangePointer",Lp);var Ip=Lp,Dp=function(t){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 Ip(this,R(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&&R(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=P(s)?s:e;if(r)for(var p=0;p<r.length;p++){var l=r[p],h=l.color,c=l.from;void 0===c&&(c=e);var u=l.to;if(void 0===u&&(u=o),c<=a&&a<=u)return h}return n},e.prototype.reflow=function(){this.render(),this.bbox=this.elements.bbox()},e}(Ja);wt(Dp,{animation:{type:"radialRangePointer",duration:150}});var jp=Dp,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._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 Bp(t.scale,this.contextService),o=new jp(e,R({},{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,l=n+e;n=Math.max(n,a.origin.y),l>p&&(n-=l-p)}return{left:r,top:n}},e}(Ep),Vp=function(t){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}(zp),Hp=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=st(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}(k.Class);wt(Hp,{quietZoneLength:10,addQuietZone:!0,addCheckSum:!0});var Np=Object.assign,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.initProperties=function(){t.prototype.initProperties.call(this),Np(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}(Hp);wt(Up,{addCheckSum:!0});var Fp=Object.assign,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.prototype.initProperties=function(){t.prototype.initProperties.call(this),Fp(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}(Hp),Wp=function(t){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),Fp(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}(Gp);wt(Wp,{addCheckSum:!1});var Xp={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"]},Yp=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),R(this,Xp,{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}(Wp),qp=Object.assign,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.initProperties=function(){t.prototype.initProperties.call(this),qp(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}(Gp),Qp=function(t){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),R(this,Xp,{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}(Zp),Kp=/^\d+$/,$p=Object.assign,Jp=function(t){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),$p(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(Kp.test(t)||this.invalidCharacterError(t.match(/[^0-9]/)[0]),!Q(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}(Hp),tl=/^\d+$/,el=/^[a-z0-9]+$/i,ol=Object.assign,il=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}(k.Class),rl=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),R(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(Q("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=[],Q(this.FNC4,t)&&this._moves.push(this._moveFNC),Q(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}(il),nl={};nl.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),ol(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}(rl),nl.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),ol(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}(rl),nl.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),ol(this,{key:"C",MOVE:99,START:105})},e.prototype.addStart=function(){this.encoding.addPattern(this.START)},e.prototype.is=function(t,e){var o=ul(t,e,4);return(e+4<=t.length||2===t.length)&&tl.test(o)},e.prototype.move=function(){this.encoding.addPattern(this.MOVE)},e.prototype.pushState=function(t){for(var e;(e=ul(t.value,t.index,2))&&tl.test(e)&&2===e.length;)this.encoding.addPattern(parseInt(e,10)),t.index+=2},e.prototype.getValue=function(t){return t},e}(il),nl.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),ol(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++)Q(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}(il),nl.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),ol(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 Q(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&&!tl.test(o))throw new Error("Application identifier "+t.id+" is numeric only but contains non numeric character(s).");if("alphanumeric"===i.type&&!el.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=ul(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&&Q(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}(il);var sl=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),ol(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 nl[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}(Hp),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.initProperties=function(){t.prototype.initProperties.call(this),ol(this,{name:"Code 128 A",states:["A"]})},e}(sl),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.initProperties=function(){t.prototype.initProperties.call(this),ol(this,{name:"Code 128 B",states:["B"]})},e}(sl),ll=function(t){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),ol(this,{name:"Code 128 C",states:["C"]})},e}(sl),hl=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),ol(this,{name:"Code 128",states:["C","B","A","FNC4"]})},e}(sl),cl=function(t){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),ol(this,{name:"Code GS1-128",states:["FNC1","C","B"]})},e}(sl);function ul(t,e,o){return t.substring(e,e+o)}var dl=Object.assign,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.initProperties=function(){t.prototype.initProperties.call(this),dl(this,{characterMap:["12121212","12121221","12122112","12122121","12211212","12211221","12212112","12212121","21121212","21121221"],START:"21",STOP:"121",checkSumType:"",checkSums:xl})},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}(Hp),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.initProperties=function(){t.prototype.initProperties.call(this),dl(this,{name:"MSI Modulo10",checkSumType:"Modulo10"})},e}(fl),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.initProperties=function(){t.prototype.initProperties.call(this),dl(this,{name:"MSI Modulo11",checkSumType:"Modulo11"})},e}(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.initProperties=function(){t.prototype.initProperties.call(this),dl(this,{name:"MSI Modulo10 Modulo10",checkSumType:"Modulo10Modulo10"})},e}(fl),ml=function(t){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),dl(this,{name:"MSI Modulo11 Modulo10",checkSumType:"Modulo11Modulo10"})},e}(fl),xl={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))}},bl=Object.assign,_l=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),bl(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}(Hp),wl=Object.assign,Cl=function(t){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),wl(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}(_l),kl={code11:Up,code39:Wp,code39extended:Yp,code93:Zp,code93extended:Qp,code128:hl,code128a:al,code128b:pl,code128c:ll};function Sl(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}kl["gs1-128"]=cl,kl.msimod10=gl,kl.msimod11=yl,kl.msimod1010=vl,kl.msimod1110=ml,kl.postnet=Jp,kl.ean8=Cl,kl.ean13=_l;var Al=function(t){function e(e,o,i){void 0===i&&(i=Dt),t.call(this),this.options=R({},this.options,o),this.element=e,this.onError=i,this._initElement(),this._initSurface(),this._setOptions(o),o&&st(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(){_(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 k.drawing.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=z(r.margin),s=this._getSize(),a=o.border||{},p=this.encoding,l=new Nt(0,0,s.width,s.height).unpad(a.width).unpad(o.padding),h=l.height(),c=new k.drawing.Group;this.contentBox=l,c.append(this._getBackground(s)),r.visible&&(h-=k.drawing.util.measureText(i,{font:r.font}).height+n.top+n.bottom);try{t=p.encode(i,l.width(),h)}catch(t){return this.onError(t),c}return r.visible&&(e=i,o.checksum&&st(p.checksum)&&(e+=" "+p.checksum),c.append(this._getText(e))),this.barHeight=h,this._bandsGroup=this._getBands(t.pattern,t.baseUnit),c.append(this._bandsGroup),c},e.prototype.exportVisual=function(){return this._render()},e.prototype._getSize=function(){var t=Sl(this.element,this.options.renderAs),e=new k.geometry.Size(300,100);return t.width>0&&(e.width=t.width),t.height>0&&(e.height=t.height),this.options.width&&(e.width=this.options.width),this.options.height&&(e.height=this.options.height),e},e.prototype.value=function(t){if(!st(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 k.drawing.Group,a=0;a<t.length;a++){if(o=(i=B(t[a])?t[a]:{width:t[a],y1:0,y2:this.barHeight}).width*e,a%2){var p=k.geometry.Rect.fromPoints(new k.geometry.Point(n,i.y1+r.y1),new k.geometry.Point(n+o,i.y2+r.y1)),l=k.drawing.Path.fromRect(p,{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 Nt(0,0,t.width,t.height).unpad(o.width/2);return k.drawing.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 he(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),!kl[this.type])throw new Error("Encoding '"+this.type+"' is not supported.");this.encoding=new kl[this.type],this.options=R({},this.options,t)},e}(k.Class);wt(Al,{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 Pl=Al,Tl={width:500,height:100};var Ol=function(t,e){if(void 0===e&&(e=Tl),!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"),!kl[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 kl[o],e,i)},Ml=Object.assign;function El(t,e){for(var o=[],i=0;i<t.length;)o.push(t.substring(i,i+e)),i+=e;return o}function Rl(t,e){var o=Number(t).toString(2);return o.length<e&&(o=new Array(e-o.length+1).join(0)+o),o}function Bl(t){return parseInt(t,2)}var Ll=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}(k.Class),Il=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}(k.Class),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.getEncodingResult=function(t,e){var o=function(t){var e,o=[],i=0,r=t;o.push(lh(r,8,5,8,e)),e=o[0].mode,r=r.substr(o[0].modeString.length);for(;r.length>0;){var n=lh(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=hh(function(t){for(var e,o=0,i=0;i<t.length;i++)e=Nl[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=Nl[t[r].mode],i+=o.encode(t[r].modeString,e);return i}(o,i);return new Il(r,i)},e}(k.Class),jl=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(){Ml(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+Rl(t,this.getBitsCharacterCount(e))},e.prototype.encode=function(){},e.prototype.getStringBitsLength=function(){},e.prototype.getValue=function(){},e}(k.Class),zl=function(t){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),Ml(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=El(t,3),r=this.getModeCountString(t.length,e);for(o=0;o<i.length-1;o++)r+=Rl(i[o],10);return r+Rl(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}(jl),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.initProperties=function(){t.prototype.initProperties.call(this),Ml(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=El(t,2),r=this.getModeCountString(t.length,e);for(o=0;o<i.length-1;o++)r+=Rl(45*this.getValue(i[o].charAt(0))+this.getValue(i[o].charAt(1)),11);return r+Rl(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}(jl),Hl=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){t.prototype.initProperties.call(this),Ml(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+=Rl(this.getValue(t.charAt(i)),8);return o},e.prototype.getStringBitsLength=function(t,e){return 4+this.getBitsCharacterCount(e)+8*t},e}(jl),Nl={};Nl.numeric=new zl,Nl.alphanumeric=new Vl,Nl.byte=new Hl;var Ul=function(t){function e(){t.call(this),this.initProperties(),this.mode=Nl[this.encodingMode]}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initProperties=function(){Ml(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=hh(this.getDataCodewordsCount(o),e),r=this.mode.getModeCountString(o.length/8,i)+o;return new Il(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=Rl(t,8);else{for(var r=8-e,n=0;n<o;n++)i=Rl(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}(k.Class),Fl=[{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}}],Gl={1:0},Wl={0:1},Xl={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},Yl=[1,0,1,1,1],ql=[1,0,1],Zl={L:"01",M:"00",Q:"11",H:"10"},Ql=["11101100","00010001"],Kl=[function(t,e){return(t+e)%2==0},function(t,e){return t%2==0},function(t,e){return e%3==0},function(t,e){return(t+e)%3==0},function(t,e){return(Math.floor(t/2)+Math.floor(e/3))%2==0},function(t,e){return t*e%2+t*e%3==0},function(t,e){return(t*e%2+t*e%3)%2==0},function(t,e){return((t+e)%2+t*e%3)%2==0}],$l=/^\d+/,Jl=new RegExp("^[A-Z $%*+./:-]+"),th=new RegExp("^[A-Z0-9 $%*+./:-]+"),eh=new RegExp("^[^A-Z0-9 $%*+./:-]+"),oh=[[1,0],[1,25,0]];function ih(t,e,o,i){for(var r=0;r<t.length;r++)t[r][o][i]=e}function rh(t,e,o,i){for(var r=0;r<Kl.length;r++)t[r][o][i]=Kl[r](o,i)?1^e:parseInt(e,10)}function nh(t,e){for(var o=[],i=t.length-2;i>=0;i--)o[i]=t[i]^e[i];return o}function sh(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]=Gl[Wl[o[i+r]]^Wl[(t[i]+e[r])%255]];return o}function ah(t,e){var o=[],i=t.length-1;do{o[i]=Wl[(t[i]+e)%255],i--}while(void 0!==t[i]);return o}function ph(t,e){var o,i,r=oh[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=ah(s,Gl[n[n.length-1]]),s.splice(0,1),n=nh(o,n);for(i=n.length-1;i>=0;i--)p[e-1-i]=Rl(n[i],8);return p}function lh(t,e,o,i,r){var n,s,a=$l.exec(t),p=a?a[0]:"",l=Jl.exec(t),h=l?l[0]:"",c=th.exec(t),u=c?c[0]:"";return p&&(p.length>=e||t.length===p.length||p.length>=o&&!th.test(t.charAt(p.length)))?(n="numeric",s=p):u&&(t.length===u.length||u.length>=i||"alphanumeric"===r)?(n="alphanumeric",s=p||h):(n="byte",s=u?u+eh.exec(t.substring(u.length))[0]:eh.exec(t)[0]),{mode:n,modeString:s}}function hh(t,e){var o=0,i=Fl.length-1,r=Math.floor(Fl.length/2);do{t<Fl[r][e].totalDataCodewords?i=r:o=r,r=o+Math.floor((i-o)/2)}while(i-o>1);return t<=Fl[o][e].totalDataCodewords?r+1:i+1}function ch(t,e,o){var i=Bl(e),r=e.length-1,n=t<<r,s=Rl(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+Rl(a,r)}function uh(t,e){return parseInt(t.charAt(e),10)}function dh(t,e){var o,i,r=t[0],n=0,s=e.length;for(o=0,i=8;o<=8;o++)6!==o&&ih(t,uh(e,s-1-n++),o,i);for(o=8,i=7;i>=0;i--)6!==i&&ih(t,uh(e,s-1-n++),o,i);for(n=0,i=r.length-1,o=8;i>=r.length-8;i--)ih(t,uh(e,s-1-n++),o,i);for(ih(t,1,r.length-8,8),o=r.length-7,i=8;o<r.length;o++)ih(t,uh(e,s-1-n++),o,i)}function fh(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,ih(t,r=uh(e,e.length-p-1),0+o,s+i),ih(t,r,a+i,0+o)}function gh(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++)ih(t,r=e[a],o+p,i+a),ih(t,r,o+a,i+p),ih(t,r,o+s-p,i+s-a),ih(t,r,o+s-a,i+s-p)}function yh(t,e,o,i){var r=o,n=i,s=t[0];do{ih(t,0,r,i),ih(t,0,o,n),r+=e[0],n+=e[1]}while(r>=0&&r<s.length)}function vh(t,e,o,i,r){e[t][i]=(e[t][i]<<1^r)%128,93===e[t][i]&&(o[t]+=40)}function mh(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 xh(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 bh(t,e,o){var i=function(t){return t&&t.toLowerCase().indexOf("utf_8")>=0?new Ul:new Dl}(o).getEncodingResult(t,e),r=i.version,n=Fl[r-1][e],s=function(t,e){for(var o,i,r,n,s,a=0,p=[],l=[],h=e.groups,c=0;c<h.length;c++){r=h[c][0];for(var u=0;u<r;u++){i=h[c][1],o=[],n=[];for(var d=1;d<=i;d++)s=t.substring(a,a+8),o.push(s),n[i-d]=Bl(s),a+=8;p.push(o),l.push(ph(n,e.errorCodewordsPerBlock))}}return[p,l]}(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+=Ql[r],r^=1;return n}(i.dataString,n.totalDataCodewords),n),a=function(t){for(var e=[],o=17+4*t,i=0;i<Kl.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;gh(t,Yl,0,0),yh(t,[-1,-1],7,7),gh(t,Yl,e-7,0),yh(t,[1,-1],e-8,7),gh(t,Yl,0,e-7),yh(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=Xl[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 l=0;l<a.length;l++)for(var h=0;h<a.length;h++)void 0===r[a[l]][a[h]]&&gh(t,ql,a[l]-2,a[h]-2)}}(a,r),function(t){for(var e=1,o=t[0].length,i=8;i<o-8;i++)ih(t,e,6,i),ih(t,e,i,6),e^=1}(a),r>=7&&fh(a,Rl(0,18)),dh(a,Rl(0,15)),function(t,e){for(var o,i,r,n=new Ll(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(),rh(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();)rh(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 l=0;l<p;l++)for(var h=0;h<p;h++)for(var c=0;c<t.length;c++)e=t[c],n[c]+=parseInt(e[l][h],10),r[c][0]===e[l][h]&&l+1<p&&h-1>=0&&e[l+1][h]===r[c][0]&&e[l+1][h-1]===r[c][0]&&(i[c]+=3),vh(c,s,i,0,e[l][h]),vh(c,s,i,1,e[h][l]),mh(c,i,r,e[l][h],a,0),mh(c,i,r,e[h][l],a,1);var u,d=p*p,f=Number.MAX_VALUE;for(o=0;o<i.length;o++)i[o]+=xh(n[o],d),i[o]<f&&(f=i[o],u=o);return u}(a),l=a[p];return r>=7&&fh([l],function(t){return ch(t,"1111100100101",18)}(r)),dh([l],function(t){var e,o="";if(0===Bl(t))return"101010000010010";e=ch(Bl(t),"10100110111",15);for(var i=0;i<e.length;i++)o+=e.charAt(i)^"101010000010010".charAt(i);return o}(Zl[e]+Rl(p,3))),l}!function(){var t,e;for(e=1;e<255;e++)(t=2*Wl[e-1])>255&&(t^=285),Wl[e]=t,Gl[t]=e;t=2*Wl[e-1]^285,Wl[e]=t,Wl[-1]=0}(),function(){for(var t=2;t<=68;t++){var e=oh[t-1],o=[t,0];oh[t]=sh(e,o)}}();var _h=Math.round,wh=[[0,1],[1,1],[1,2],[2,2],[2,1],[3,1],[3,0],[2,0],[2,-1],[1,-1],[1,0]],Ch=[[0,1],[1,1],[1,0]],kh=200,Sh="L",Ah="#fff",Ph="#000",Th=1,Oh=7,Mh=function(t){function e(e,o,i){void 0===i&&(i=Dt),t.call(this),this.options=R({},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(){_(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 k.drawing.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||{},a=this.options.padding||0,p=s.width||0;s.width=p;var l=new k.drawing.Group;try{n&&(o=bh(n,this.options.errorCorrection,this.options.encoding),r=(i=this._getSize())-2*(p+a),t=this._calculateBaseUnit(r,o.length),e=p+a+(r-o.length*t)/2,l.append(this._renderBackground(i,s)),l.append(this._renderMatrix(o,t,e)),this._hasCustomLogo()?l.append(this._renderLogo(i,t)):this._isSwiss()&&l.append(this._renderSwissCode(i,t)))}catch(t){this.onError(t)}return l},e.prototype._renderLogo=function(t,e){var o,i=_h(t/2),r=this._getLogoSize(e*Oh),n=this.options.overlay.imageUrl,s={x:i-r.width/2,y:i-r.height/2};return o=new k.geometry.Rect(new k.geometry.Point(s.x,s.y),new k.geometry.Size(r.width,r.height)),new k.drawing.Image(n,o)},e.prototype._renderSwissCode=function(t,e){var o=this._getLogoSize(e*Oh),i=(o=Math.max(o.width,o.height))/4,r=i/2,n=t/2,s={},a=new k.drawing.Group;return s.x=s.y=Math.ceil(n-e-o/2),a.append(this._renderShape(s,Math.ceil(o+2*e),Ch,"#fff")),s.x=s.y=n-o/2,a.append(this._renderShape(s,o,Ch,this.options.color)),s.x=n+r-o/2,s.y=n+r+i-o/2,a.append(this._renderShape(s,i,wh,"#fff")),a},e.prototype._renderShape=function(t,e,o,i){var r=new k.drawing.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=Sl(this.element,this.options.renderAs),o=Math.min(e.width,e.height);t=o>0?o:kh}return t},e.prototype._calculateBaseUnit=function(t,e){var o=Math.floor(t/e);if(o<Th){var i=Math.ceil(e*Th);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>=Th&&o--;return o},e.prototype._renderMatrix=function(t,e,o){for(var i=new k.drawing.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 a=s;1===t[r][s];)s++;var p=_h(o+a*e),l=_h(n),h=_h(o+s*e),c=_h(n+e);i.moveTo(p,l).lineTo(p,c).lineTo(h,c).lineTo(h,l).close()}}return i},e.prototype._renderBackground=function(t,e){var o=new Nt(0,0,t,t).unpad(e.width/2);return k.drawing.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=Ml(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}(k.Class);wt(Mh,{name:"QRCode",renderAs:"svg",encoding:"ISO_8859_1",value:"",errorCorrection:Sh,background:Ah,color:Ph,size:"",padding:0,border:{color:"",width:0},overlay:{type:"image",imageUrl:"",width:0,height:0}});var Eh=Mh;var Rh=function(t){return void 0===t&&(t="ISO_8859_1"),function(e){try{bh(e,"L",t)}catch(t){return{valid:!1,error:t}}return{valid:!0}}},Bh={WGS84:{a:6378137,b:6356752.314245179,f:.0033528106647474805,e:.08181919084262149}};function Lh(t){return t*t}var Ih=Math,Dh=Ih.abs,jh=Ih.atan,zh=Ih.atan2,Vh=Ih.cos,Hh=Ih.sin,Nh=Ih.tan,Uh=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(){R(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=vt(this.lng,t),this.lat=vt(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=yt(o),n=i||Bh.WGS84,s=yt(this.lat),a=yt(this.lng),p=t/n.a,l=Ih.asin(Hh(s)*Vh(p)+Vh(s)*Hh(p)*Vh(r)),h=a+zh(Hh(r)*Hh(p)*Vh(s),Vh(p)-Hh(s)*Hh(l));return new e(at(l),at(h))},e.prototype.greatCircleTo=function(t,o){var i=e.create(i),r=o||Bh.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,l,h,c,u,d=r.a,f=r.b,g=r.f,y=yt(i.lng-this.lng),v=jh((1-g)*Nh(yt(this.lat))),m=Hh(v),x=Vh(v),b=jh((1-g)*Nh(yt(i.lat))),_=Hh(b),w=Vh(b),C=y,k=this.DISTANCE_ITERATIONS,S=!1;!S&&k-- >0;){s=Hh(C),a=Vh(C),p=Ih.sqrt(Lh(w*s)+Lh(x*_-m*w*a)),u=zh(p,h=m*_+x*w*a);var A=x*w*s/p;c=0,0!==(l=1-Lh(A))&&(c=h-2*m*_/l),n=C;var P=g/16*l*(4+g*(4-3*l));C=y+(1-P)*g*A*(u+P*p*(c+P*h*(2*Lh(c)-1))),S=Dh(C-n)<=this.DISTANCE_CONVERGENCE}var T=l*(Lh(d)-Lh(f))/Lh(f),O=1+T/16384*(4096+T*(T*(320-175*T)-768)),M=T/1024*(256+T*(T*(74-47*T)-128)),E=M*p*(c+M/4*(h*(2*Lh(c)-1)-M/6*c*(4*Lh(p)-3)*(4*Lh(c)-3))),R=zh(w*s,x*_-m*w*a),B=zh(x*s,-m*w+x*_*a);return{distance:vt(f*O*(u-E),this.DISTANCE_PRECISION),azimuthFrom:at(R),azimuthTo:at(B)}},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(st(t))return t instanceof e?t.clone():1===arguments.length&&2===t.length?e.fromLatLng(t):new e(t,o)},e}(k.Class),Fh=Math,Gh=Fh.atan,Wh=Fh.exp,Xh=Fh.pow,Yh=Fh.sin,qh=Fh.log,Zh=Fh.tan,Qh=k.geometry.Point,Kh=Fh.PI,$h=Kh/2,Jh=Kh/4,tc=Kh/180,ec=Bh.WGS84,oc=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=R({},this.options,t)},e.prototype.initProperties=function(){R(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=ft(t.lat,-this.MAX_LAT,this.MAX_LAT),s=e?ft(t.lng,-this.MAX_LNG,this.MAX_LNG):t.lng,a=yt(s-r)*i,p=this._projectLat(n);return new Qh(a,p)},e.prototype._projectLat=function(t){var e=this.options.datum,o=e.e,i=e.a,r=yt(t),n=Zh(Jh+r/2),s=o*Yh(r),a=Xh((1-s)/(1+s),o/2);return i*qh(n*a)},e.prototype.inverse=function(t,e){var o=this.options,i=o.datum.a,r=o.centralMeridian,n=t.x/(tc*i)+r,s=ft(this._inverseY(t.y),-this.MAX_LAT,this.MAX_LAT);return e&&(n=ft(n,-this.MAX_LNG,this.MAX_LNG)),new Uh(s,n)},e.prototype._inverseY=function(t){var e,o=this.options.datum,i=o.a,r=o.e,n=r/2,s=Wh(-t/i),a=$h-2*Gh(s);for(e=0;e<=this.INVERSE_ITERATIONS;e++){var p=r*Yh(a),l=Xh((1-p)/(1+p),n),h=$h-2*Gh(s*l)-a;if(a+=h,Fh.abs(h)<=this.INVERSE_CONVERGENCE)break}return at(a)},e}(k.Class);wt(oc,{centralMeridian:0,datum:ec});var ic=function(t){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),R(this,{MAX_LAT:85.0511287798})},e.prototype._projectLat=function(t){var e=this.options.datum.a,o=yt(t),i=Zh(Jh+o/2);return e*qh(i)},e.prototype._inverseY=function(t){var e=this.options.datum.a,o=Wh(-t/e);return at($h-2*Gh(o))},e}(oc),rc=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.forward=function(t){return new Qh(t.lng,t.lat)},e.prototype.inverse=function(t){return new Uh(t.y,t.x)},e}(k.Class),nc=function(t){function e(){t.call(this);var e=this._proj=new ic,o=this.c=2*Kh*e.options.datum.a;this._tm=k.geometry.transform().translate(.5,.5).scale(1/o,-1/o),this._itm=k.geometry.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}(k.Class),sc=(function(t){function e(){t.call(this),this._proj=new oc}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.toPoint=function(t){return this._proj.forward(t)},e.prototype.toLocation=function(t){return this._proj.inverse(t)}}(k.Class),function(t){function e(){t.call(this),this._proj=new rc}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.toPoint=function(t){return this._proj.forward(t)},e.prototype.toLocation=function(t){return this._proj.inverse(t)}}(k.Class),Object.defineProperty),ac=(Object.assign,function(t){var e=document.createElement("div");return e.innerHTML=t,e.firstChild}),pc=function(t){for(;t.firstChild;)t.removeChild(t.firstChild)},lc=function(t,e){e.insertBefore(t,e.firstChild)},hc=function(t){return t.replace(/([a-z][A-Z])/g,(function(t){return t.charAt(0)+"-"+t.charAt(1).toLowerCase()}))},cc=function(t){return t&&String(t).endsWith("px")?t:String(t)+"px"},uc=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=dc(p,s,!1),o.browser=dc(t,a,"default"),o.name=dc(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 dc(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 fc=function(){var t={down:"touchstart mousedown",move:"mousemove touchmove",up:"mouseup touchend touchcancel",cancel:"mouseleave touchcancel"},e=gc();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},gc=function(){var t=uc(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,l=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 l={css:"ms"!==o?"-"+o+"-":"",prefix:t,event:"o"===o||"webkit"===o?o:""},e&&((p=l).event=p.event?p.event+"TransitionEnd":"transitionend"),!1}})),a=null,s.transforms=l,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},yc=function(t,e){return t.bind(e)};var vc=function(t,e,o,i,r){mc(t,e,o,i,r)},mc=function(t,e,o,i,r){(b(e)?e:(e||"").split(" ")).forEach((function(e){xc(t,e,o,i,r)}))},xc=function(t,e,o,i,r){var n,s=i;o&&M(o)&&!i?s=o:o&&"string"==typeof o&&M(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;sc(e,"currentTarget",{value:i}),sc(e,"delegateTarget",{value:t}),s(e)}}),Boolean(r))},bc=function(t,e,o,i,r){_c(t,e,o,i,r)},_c=function(t,e,o,i){(b(e)?e:(e||"").split(" ")).forEach((function(e){wc(t,e,o,i)}))},wc=function(t,e,o,i){t.removeEventListener(e,o,Boolean(i))},Cc=function(t){var e=fc(navigator.userAgent);return t.replace(/([^ ]+)/g,(function(t){return e[t]||t}))},kc=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},Sc=function(){return Number(new Date)},Ac=function(){},Pc=function(){this._defaultPrevented=!0},Tc=function(){return!0===this._defaultPrevented},Oc=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||[],l="function"==typeof e;if(void 0===e){for(i in t)a.bind(i,t[i]);return a}var h=function(){var t=p[i];(s=l?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++)h();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=Pc,n.isDefaultPrevented=Tc,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}(k.Class),Mc=N.compile,Ec=function(t){function e(e,o){t.call(this),this.element=e,this._initOptions(o),this.items=[],_(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=R({},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;st(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=[],pc(this.element)},e.prototype._render=function(){for(var t=[],e=Mc(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?(pc(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=xt(t,-Number.MAX_VALUE),i=xt(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}(Oc);wt(Ec,{name:"Attribution",separator:"&nbsp;|&nbsp;",itemTemplate:"#= text #"});var Rc={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 Bc(t){var e='<button class="k-button k-button-square k-rounded-full k-button-flat k-button-flat-base k-icon-button '+Rc[t].className+'" aria-label="move '+t+'"><span class="k-icon '+Rc[t].iconClass+'" /></button>';return ac(e)}var Lc=function(t){function e(e,o){t.call(this),this.element=e,this._initOptions(o);var i=Bc("up"),r=Bc("right"),n=Bc("down"),s=Bc("left");this.element.appendChild(i),this.element.appendChild(r),this.element.appendChild(n),this.element.appendChild(s),_(this.element,"k-widget k-navigator"),vc(this.element,"click",".k-button",yc(this._click,this));var a=this.element.parentNode.closest("[data-role]");this._keyroot=a||this.element,this._tabindex(this._keyroot),this._keydownHandler=yc(this._keydown,this),vc(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(){bc(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=R({},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 jt.UP:this._pan(0,1),t.preventDefault();break;case jt.DOWN:this._pan(0,-1),t.preventDefault();break;case jt.RIGHT:this._pan(1,0),t.preventDefault();break;case jt.LEFT:this._pan(-1,0),t.preventDefault()}},e}(Oc);function Ic(t,e){return ac('<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>')}wt(Lc,{name:"Navigator",panStep:1}),kc(Lc,["pan"]);var Dc=function(t){function e(e,o){t.call(this),this.element=e,this._initOptions(o);var i=Ic("in","k-i-plus"),r=Ic("out","k-i-minus");this.element.appendChild(i),this.element.appendChild(r),_(this.element,"k-widget k-zoom-control k-button-group k-group-horizontal"),this._clickHandler=this._click.bind(this),vc(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),vc(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&&bc(this.element,"click",this._clickHandler),this._keyroot&&bc(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=R({},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;Y(t.currentTarget,"k-zoom-out")&&(e=-1),this._change(e),t.preventDefault()},e.prototype._keydown=function(t){switch(t.which){case jt.NUMPAD_PLUS:case 187:case 61:this._change(1);break;case jt.NUMPAD_MINUS:case 189:case 173:this._change(-1)}},e}(Oc);wt(Dc,{name:"ZoomControl",zoomStep:1}),kc(Dc,["change"]);var jc=Math,zc=jc.max,Vc=jc.min,Hc=function(t){function e(e,o){t.call(this);var i=Uh.create(e),r=Uh.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=xt(t.lng,t[1]),r=xt(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 Uh(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=xt(t.lng,t[1]),r=xt(t.lat,t[0]);e.lng=Vc(e.lng,i),e.lat=zc(e.lat,r),o.lng=zc(o.lng,i),o.lat=Vc(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 Uh(t.lat,e.lng),se:this.se,sw:new Uh(e.lat,t.lng)}},e.prototype.toArray=function(){var t=this.nw,e=this.se;return[t,new Uh(t.lat,e.lng),e,new Uh(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}(k.Class),Nc=function(t){function e(e,o){t.call(this),this.support=gc(),this._initOptions(o),this.map=e;var i=document.createElement("div");_(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=R({},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=!st(t.minZoom)||e>=t.minZoom,i=!st(t.maxZoom)||e<=t.maxZoom,r=Hc.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}(k.Class),Uc=Math,Fc=N.compile,Gc=k.geometry.Point;function Wc(t){return new Gc(vt(t.x),vt(t.y))}function Xc(t){var e=t;return"string"!=typeof t&&(e+="px"),e}var Yc=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 qc},e.prototype._activate=function(){t.prototype._activate.call(this),this.support.mobileOS||(this._pan||(this._pan=Object(k.throttle)(this._render.bind(this),100)),this.map.bind("pan",this._pan))},e.prototype._deactivate=function(){t.prototype._deactivate.call(this),this._pan&&this.map.unbind("pan",this._pan)},e.prototype._updateView=function(){var t=this._view,e=this.map,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}(Nc);wt(Yc,{tileSize:256,subdomains:["a","b","c"],urlTemplate:"",zIndex:1});var qc=function(t){function e(e,o){t.call(this),this.element=e,this._initOptions(o),this.pool=new Qc}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._initOptions=function(t){this.options=R({},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 Gc(Uc.floor(t.x/this.options.tileSize),Uc.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:Uc.ceil((Uc.abs(i.x)+t.width)/this.options.tileSize),y:Uc.ceil((Uc.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 Gc(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(){pc(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:Wc(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=Uc.pow(2,this._zoom);return{x:this.wrapValue(t.x,e),y:ft(t.y,0,e-1)}},e.prototype.wrapValue=function(t,e){var o=Uc.abs(t)%e;return t>=0?o:e-(0===o?e:o)},e}(k.Class),Zc=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=R({},this.options,t)},e.prototype.createElement=function(){var t=document.createElement("img");_(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=Xc(this.options.offset.y),t.style.left=Xc(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 Fc(this.options.urlTemplate)(this.urlOptions())},e.prototype.errorUrl=function(){return Fc(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}(k.Class);wt(Zc,{urlTemplate:"",errorUrlTemplate:""});var Qc=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=ut(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 Zc(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}(k.Class);wt(Qc,{maxSize:100});var Kc=Object.assign,$c=function(t){function e(e,o){t.call(this);var i=this,r=e[0]||e;i.capture=!1;var n=fc(navigator.userAgent);r.addEventListener?(n.down.split(" ").forEach((function(t){r.addEventListener(t,yc(i._press,i),!0)})),n.up.split(" ").forEach((function(t){r.addEventListener(t,yc(i._release,i),!0)}))):(n.down.split(" ").forEach((function(t){r.attachEvent(t,yc(i._press,i))})),n.up.split(" ").forEach((function(t){r.attachEvent(t,yc(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}(Oc),Jc=function(t){function e(e){t.call(this);this.forcedEnabled=!1,Kc(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(){Kc(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}(Oc),tu=function(t){function e(e){t.call(this);this.x=new Jc(Kc({horizontal:!0},e)),this.y=new Jc(Kc({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}(Oc),eu=function(t){function e(e){t.call(this),Kc(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}(Oc),ou=function(t){function e(e){t.call(this);var o,i,r,n,s=this;Kc(s,{elastic:!0},e),r=s.elastic?.5:0,n=s.movable,s.x=o=new eu({axis:"x",dimension:s.dimensions.x,resistance:r,movable:n}),s.y=i=new eu({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=pt(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,l=t.distance/r.distance,h=s.dimensions.minScale,c=s.dimensions.maxScale;n.scale<=h&&l<1&&(l+=.8*(1-l)),n.scale*l>=c&&(l=c/n.scale);var u=n.x+s.offset.left,d=n.y+s.offset.top;e={x:(u-a.x)*l+p.x-u,y:(d-a.y)*l+p.y-d},n.scaleWith(l),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}(k.Class),iu=function(t,e,o){return"translate3d("+t+"px,"+e+"px,0) scale("+o+")"},ru=function(t){function e(e){t.call(this);this.support=gc(),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=iu(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){Kc(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=iu(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}(Oc),nu=k.drawing.Group,su=function(t){function e(e,o){t.call(this,e,o),this._pan=yc(this._pan,this),this.surface=k.drawing.Surface.create(this.element,{width:e.scrollElement.clientWidth,height:e.scrollElement.clientHeight}),this._initRoot(),this.movable=new ru(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 nu,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 au(this.map,this.options.style,this));for(var e=new nu,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 k.drawing.Circle&&this.map.options.renderPointsAsMarkers&&(e=st(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=yc(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}(Nc);wt(su,{autoBind:!0,zIndex:100});var au=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 nu,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(dt(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?k.drawing.MultiPath:k.drawing.Path)(this.style),o=0;o<t.length;o++)for(var i=0;i<t[o].length;i++){var r=this.locator.locationToView(Uh.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=Uh.fromLngLat(e),r=this.locator.locationToView(i),n=new k.geometry.Circle(r,10),s=new k.drawing.Circle(n,this.style);return s.dataItem=o,s.location=i,this._loadShape(t,s)},e}(k.Class),pu=function(t){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=W(e.valueField),i=t.slice(0);i.sort((function(t,e){return o(e)-o(t)}));for(var r,n=this._scaleType(),s=W(this.options.locationField),a=0;a<i.length;a++){var p=i[a],l=s(p),h=o(p);if(st(l)&&st(h)){r||(r=new n([0,h],[e.minSize,e.maxSize])),l=Uh.create(l);var c=this.map.locationToView(l),u=r.map(h),d=this._createSymbol({center:c,size:u,style:e.style,dataItem:p,location:l});d.dataItem=p,d.location=l,d.value=h,this._drawSymbol(d)}}}},e.prototype._scaleType=function(){var t=this.options.scale;return M(t)?t:lu[t]},e.prototype._createSymbol=function(t){var e=this.options.symbol;return M(e)||(e=hu[e]),e(t)},e.prototype._drawSymbol=function(t){var e={layer:this,shape:t};this.map.trigger("shapeCreated",e)||this.surface.draw(t)},e}(su);wt(pu,{locationField:"location",valueField:"value",minSize:0,maxSize:100,scale:"sqrt",symbol:"circle",zIndex:200});var lu={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}(k.Class)},hu={circle:function(t){var e=new k.geometry.Circle(t.center,t.size/2);return new k.drawing.Circle(e,t.style)},square:function(t){var e=new k.drawing.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}},cu=Object.assign,uu=function(t){function e(e,o){t.call(this,e,o),this._markerClickHandler=yc(this._markerClick,this),vc(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),bc(this.element,"click",this._markerClickHandler),this.clear()},e.prototype.add=function(t){if(!b(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=du.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=du.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=W(this.options.locationField),o=W(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 cu({},{layer:this,layerIndex:this.map.layers.indexOf(this),marker:e,markerIndex:(this.items||[]).indexOf(e)},t)},e}(Nc);wt(uu,{zIndex:1e3,autoBind:!0,locationField:"location",titleField:"title"});var du=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=Uh.create(t).toArray(),this.layer&&this.layer.update(this),this):Uh.create(this.options.location)},e.prototype.showAt=function(t){this.render(),this.element.style.left=cc(Math.round(t.x)),this.element.style.top=cc(Math.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=yc(this._mouseEnter,this),vc(this.element,"mouseenter",".k-marker",this._mouseEnterHandler),this._mouseLeaveHandler=yc(this._mouseLeave,this),vc(this.element,"mouseleave",".k-marker",this._mouseLeaveHandler))},e.prototype.unbindEvents=function(){this.element&&(bc(this.element,"mouseenter",this._mouseEnterHandler),bc(this.element,"mouseleave",this._mouseLeaveHandler))},e.prototype.render=function(){if(!this.element){var t=this.options,e=this.layer,o=document.createElement("span");_(o,"k-marker k-icon k-i-marker-"+hc(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(R({},o,t))},e}(k.Class),fu=Object.assign;function gu(t){window.requestAnimationFrame(t)}var yu=function(t){function e(){t.call(this);this._tickProxy=yc(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,gu(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()):gu(this._tickProxy))},e}(k.Class),vu=function(t){function e(e){t.call(this),fu(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,Sc()-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=Sc(),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}(yu),mu=Object.assign,xu=function(t){t.preventDefault()},bu=800,_u=0,wu={api:0,touch:0,mouse:9,pointer:9};function Cu(t){var e,o,i,r=gc(),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 ku=function(t){function e(e,o){t.call(this);this.support=gc(),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=Sc()}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=Sc(),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}(k.Class),Su=function(t){function e(e,o,i){t.call(this),mu(this,{x:new ku("X",i.location),y:new ku("Y",i.location),type:i.type,useClickAsTap:e.useClickAsTap,threshold:e.threshold||wu[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(yc(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(Pu.current&&Pu.current!==this.userEvents)return this.dispose();this._start(t)}this._finished||this._trigger("move",t)}},e.prototype.end=function(t){this.endTime=Sc(),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=Sc(),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}(k.Class);function Au(t){for(var e=fc(navigator.userAgent).up.split(" "),o=0,i=e.length;o<i;o++)t(e[o])}var Pu=function(t){function e(e,o){t.call(this);var i,r=gc();this.support=r,o=o||{},this.options=o,i=this.filter=o.filter,this.threshold=o.threshold||_u,this.minHold=o.minHold||bu,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(mu(this,{element:e,surface:o.global&&n?e.ownerDocument.documentElement:o.surface||e,stopPropagation:o.stopPropagation,pressed:!1}),this._surfaceMoveHandler=yc(this._move,this),vc(this.surface,Cc("move"),this._surfaceMoveHandler),this._surfaceEndHandler=yc(this._end,this),vc(this.surface,Cc("up cancel"),this._surfaceEndHandler),this._elementStartHandler=yc(this._start,this),vc(e,Cc("down"),i,this._elementStartHandler),this.useClickAsTap&&(this._elementClickHandler=yc(this._click,this),vc(e,Cc("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=xu,vc(e,Cc("dragstart"),this._elementDragStartHandler)),this._elementSelectHandler=yc(this._select,this),vc(e,Cc("mousedown"),i,this._elementSelectHandler),this.captureUpIfMoved&&r.eventCapture){var s=this.surface,a=yc(this.preventIfMoving,this);Au((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;Au((function(e){i.removeEventListener(e,t.preventIfMoving)}))}bc(t.surface,Cc("move"),this._surfaceMoveHandler),bc(t.surface,Cc("up cancel"),this._surfaceEndHandler),bc(o,Cc("down"),this._elementStartHandler),t.useClickAsTap&&bc(o,Cc("click"),this._elementClickHandler),e.preventDragEvent&&bc(o,Cc("dragstart"),this._elementDragStartHandler),bc(o,Cc("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,l,h=this.touches,c=t;if(this._isMultiTouch()){switch(c){case"move":c="gesturechange";break;case"end":c="gestureend";break;case"tap":c="gesturetap"}mu(e,{touches:h},(o=h[0],i=h[1],r=o.x.location,n=o.y.location,s=i.x.location,a=i.y.location,p=r-s,l=n-a,{center:{x:(r+s)/2,y:(n+a)/2},distance:Math.sqrt(p*p+l*l)}))}return this.trigger(c,mu(e,{type:c}))},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 X(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=Cu(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 Su(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:Sc(),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=Cu(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:Ac,preventDefault:Ac})},e.defaultThreshold=function(t){_u=t},e.minHold=function(t){bu=t},e}(Oc),Tu=Object.assign,Ou=Math.abs,Mu=function(t){function e(e){t.call(this,e);Tu(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}(yu),Eu=function(t){function e(e){t.call(this);var o=this;Tu(o,e,{transition:new vu({axis:e.axis,movable:e.movable,onEnd:function(){o._end()}})}),o.tapCapture.bind("press",(function(){o.cancel()})),o.userEvents.bind("end",yc(o.start,o)),o.userEvents.bind("gestureend",yc(o.start,o)),o.userEvents.bind("tap",yc(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 Ou(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:vu.easeOutExpo})},e}(yu),Ru=function(t){function e(e){t.call(this,e);Tu(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 Ou(this.offset.y)<5&&Ou(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&&M(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}(yu),Bu=function(t){function e(e){t.call(this);var o="x"===e.axis,i=ac('<div class="km-touch-scrollbar km-'+(o?"horizontal":"vertical")+'-scrollbar" />');Tu(this,e,{element:i,elementSize:0,movable:new ru(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}(k.Class),Lu=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=uc(r)).ios||n.android);i._native=i.options.useNative&&s;var a=ac('<div class="km-scroll-header"/>');if(i._native)return _(e,"km-native-scroller"),lc(a,e),void Tu(i,{scrollElement:e,fixedContainer:e.children[0]});e.style.overflow="hidden",_(e,"km-scroll-wrapper"),function(t,e){for(t.appendChild(e);t.firstChild!==e;)e.appendChild(t.firstChild)}(e,ac('<div class="km-scroll-container"/>')),lc(a,e);var p=e.children[1],l=new $c(e),h=new ru(p),c=new tu({element:p,container:e,forcedEnabled:i.options.zoom}),u=this.options.avoidScrolling,d=new Pu(e,{touchAction:"pan-y",fastTap:!0,allowSelection:!0,preventDragEvent:!0,captureUpIfMoved:!0,multiTouch:i.options.zoom,supportDoubleTap:i.options.supportDoubleTap,start:function(t){c.refresh();var e=Ou(t.x.velocity),o=Ou(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&&(c.x.enabled&&r||c.y.enabled&&n)?d.capture():d.cancel()}}),f=new ou({movable:h,dimensions:c,userEvents:d,elastic:i.options.elastic}),g=new Mu({movable:h,dimensions:c,userEvents:d,tapCapture:l}),y=new Ru({moveTo:function(t){i.scrollTo(t.x,t.y)}});h.bind("change",(function(){i.scrollTop=-h.y,i.scrollLeft=-h.x,i.trigger("scroll",{scrollTop:i.scrollTop,scrollLeft:i.scrollLeft})})),i.options.mousewheelScrolling&&(this._wheelScrollHandler=this._wheelScroll.bind(this),vc(e,"DOMMouseScroll mousewheel",this._wheelScrollHandler)),Tu(i,{movable:h,dimensions:c,zoomSnapBack:g,animatedScroller:y,userEvents:d,pane:f,tapCapture:l,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)},c.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=R({},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(Ou(t)),this.scrollElement.scrollTop(Ou(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;bc(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 Bu({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 Eu({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}(Oc);wt(Lu,{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"}}),kc(Lu,["pull","scroll","resize"]);var Iu=function(t,e){void 0===e&&(e={}),this.sender=e.sender||t,this.widget=t,this.rtl=Boolean(e.rtl)};Iu.prototype.notify=function(t,e){this.widget&&this.widget.trigger(t,e)};var Du=Iu,ju=Math,zu=ju.min,Vu=ju.pow,Hu=k.geometry.Point,Nu={bubble:pu,shape:su,tile:Yc};function Uu(t){var e=[];if(t)for(var o=hc(t).split("-"),i=0;i<o.length;i++)e.push("k-pos-"+o[i]);return e.join(" ")}Nu.marker=uu;var Fu=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(),b(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();bc(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=gc(),this.context=i,this.initObserver(i),this.initServices(i),this._initOptions(e),this._setEvents(e),this.crs=new nc,this._initElement(t),this._viewOrigin=this._getOrigin(),this._initScroller(),this._initMarkers(),this._initControls(),this._initLayers(),this._reset(),this._mousewheelHandler=this._mousewheel.bind(this),vc(this.element,"DOMMouseScroll mousewheel",this._mousewheelHandler)},e.prototype._initOptions=function(t){this.options=R({},this.options,t)},e.prototype._initElement=function(t){this.element=t,_(t,"k-map"),t.style.position="relative",t.setAttribute("data-role","map"),pc(t);var e=ac("<div />");this.element.appendChild(e)},e.prototype.initServices=function(t){void 0===t&&(t={}),this.widgetService=new Du(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(st(t)){var i=ju.round(ft(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=Uh.create(t).toArray(),this._reset(),e=this):e=Uh.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(),pc(e),this._init(e,t,{},this.context),this._reset()},e.prototype.locationToLayer=function(t,e){var o=!this.options.wraparound,i=Uh.create(t);return this.crs.toPoint(i,this._layerSize(e),o)},e.prototype.layerToLocation=function(t,e){var o=!this.options.wraparound,i=Hu.create(t);return this.crs.toLocation(i,this._layerSize(e),o)},e.prototype.locationToView=function(t){var e=Uh.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=Hu.create(t).clone().translateWith(o);return this.layerToLocation(i,e)},e.prototype.eventOffset=function(t){var e,o,i=pt(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=xt(r.pageX,r.clientX)-i.left,o=xt(r.pageY,r.clientY)-i.top}return new k.geometry.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=zu(e,o)),{width:o,height:zu(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=Uh.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=Hc.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 Hc(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),l=ju.abs(p.x-a.x),h=ju.abs(p.y-a.y);if(l<=n&&h<=s)break}this.zoom(r)},e.prototype._getExtent=function(){var t=this._getOrigin(),e=this.locationToLayer(t),o=this.viewSize();e.x+=o.width,e.y+=o.height;var i=this.layerToLocation(e);return new Hc(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="."+Uu(o).replace(" ","."),r=this.element.querySelector(".k-map-controls"+i)||[];if(0===r.length){var n=document.createElement("div");_(n,"k-map-controls "+Uu(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 Ec(e,t)},e.prototype._createNavigator=function(t){var e=this._createControlElement(t,"topLeft"),o=this.navigator=new Lc(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=ft(o,r.x.min,r.x.max-n),i=ft(i,r.y.min,r.y.max-s),this.scroller.one("scroll",yc(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 Dc(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 Lu(this.element.children[0],{friction:t,velocityMultiplier:5,zoom:e,mousewheelScrolling:!1,supportDoubleTap:!0});o.bind("scroll",yc(this._scroll,this)),o.bind("scrollEnd",yc(this._scrollEnd,this)),o.userEvents.bind("gesturestart",yc(this._scaleStart,this)),o.userEvents.bind("gestureend",yc(this._scale,this)),o.userEvents.bind("doubleTap",yc(this._doubleTap,this)),o.userEvents.bind("tap",yc(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=R({},"marker"===e?this.options.markerDefaults:o,t),r=new(0,Nu[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 uu(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 k.geometry.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=Sc(),this.trigger("panEnd",{originalEvent:t,origin:this._getOrigin(),center:this.center()}))},e.prototype._panComplete=function(){return Sc()-(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 k.geometry.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=ju.log(e)/ju.log(2);return ju.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=Vu(2,this.options.minZoom-s),t.dimensions.maxScale=Vu(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 l=this.viewSize();a.min=p.min=0,a.max=l.width,p.max=l.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=xt(t,this.options.zoom);return this.options.minSize*Vu(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=ot(t)>0?-1:1,o=this.options,i=this.zoom(),r=ft(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}(Oc);wt(Fu,{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}),kc(Fu,["beforeReset","click","markerActivate","markerClick","markerCreated","markerMouseEnter","markerMouseLeave","pan","panEnd","reset","shapeClick","shapeCreated","shapeFeatureCreated","shapeMouseEnter","shapeMouseLeave","zoomEnd","zoomStart"]);var Gu=Fu,Wu="Arial, Helvetica, sans-serif",Xu="12px "+Wu,Yu="16px "+Wu,qu=function(){return{icon:{border:{width:1}},label:{font:Xu,padding:3},line:{length:10,width:2},visible:!0}},Zu=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:qu(),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}}},Qu=function(t){return void 0===t&&(t={}),{axisDefaults:{labels:{font:Xu},notes:qu(),title:{font:Yu,margin:5}},categoryAxis:{majorGridLines:{visible:!0}},navigator:{pane:{height:90,margin:{top:10}}},seriesDefaults:Zu(t),title:{font:Yu},legend:{labels:{font:Xu}}}}},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=o(9);e.Barcode=i.Barcode;var r=o(15);e.QRCode=r.QRCode},function(t,e,o){"use strict";var i,r=this&&this.__extends||(i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),n=this&&this.__assign||function(){return(n=Object.assign||function(t){for(var e,o=1,i=arguments.length;o<i;o++)for(var r in e=arguments[o])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},s=this&&this.__rest||function(t,e){var o={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(o[i]=t[i]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(t);r<i.length;r++)e.indexOf(i[r])<0&&(o[i[r]]=t[i[r]])}return o};Object.defineProperty(e,"__esModule",{value:!0});var a=o(1),p=o(6),l=o(7),h=o(0),c=o(3),u=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.getTarget=function(){return e},e.deriveOptionsFromParent=function(t){return Object.assign({},t,{background:e.props.background,border:e.props.border,checksum:e.props.checksum,color:e.props.color,height:e.props.height,padding:e.props.padding,text:e.props.text,type:e.props.type,value:e.props.value,width:e.props.width})},e}return r(e,t),Object.defineProperty(e.prototype,"barcodeInstance",{get:function(){return null!==this._baseBarcode?this._baseBarcode.barcodeInstance:null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"surface",{get:function(){return null!==this._baseBarcode?this._baseBarcode.surface:null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"element",{get:function(){return null!==this._baseBarcode?this._baseBarcode.element:null},enumerable:!0,configurable:!0}),e.prototype.render=function(){var t=this,e=this.props,o=e.children,i=e.className,r=s(e,["children","className"]);return a.createElement(p.BaseBarcode,n({},r,{deriveOptionsFromParent:this.deriveOptionsFromParent,ref:function(e){return t._baseBarcode=e},barcodeConstructor:l.Barcode,getTarget:this.getTarget,className:c.classNames("k-barcode",i)}),o)},e.prototype.exportImage=function(t){return void 0===t&&(t={}),h.exportImage(this.exportVisual(),t)},e.prototype.exportSVG=function(t){return void 0===t&&(t={}),h.exportSVG(this.exportVisual(),t)},e.prototype.exportVisual=function(t){return null!==this.barcodeInstance?this.barcodeInstance.exportVisual(t):new h.Group},e}(a.Component);e.Barcode=u},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=o(3);e.THROTTLE_MS=1e3/60;e.default=function(t){var o,r,n=[],s=function(s){o=t(o,s),i.canUseDOM&&(window.clearTimeout(r),r=window.setTimeout((function(){return n.forEach((function(t){return t()}))}),e.THROTTLE_MS))};return s({}),{getState:function(){return o},dispatch:s,subscribe:function(t){return n.push(t),function(){return n=n.filter((function(e){return e!==t}))}}}}},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.optionsReducer=function(t,e){return e.barcodeKey?i.configurationItem(t,e):{}};e.observersReducer=function(t,e){if(!e.type)return[];switch(e.type){case"add":return t.concat([e.payload]);case"remove":return t.filter((function(t){return t!==e.payload}));default:return t}};var i={configurationItem:function(t,e){var o;return Object.assign(t,((o={})[e.barcodeKey]=e.payload,o))}}},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(t){return"object"==typeof t},r=function(t,e){if(Object.keys(t).length!==Object.keys(e).length)return!0;for(var o in t)if(t.hasOwnProperty(o)){var n=t[o],s=e[o];if(i(n)&&i(s)?r(n,s):n!==s)return!0}return!1};e.isOptionsChanged=function(t,e){if(!t||!e)return!0;if(t=[].concat(t),e=[].concat(e),t.length!==e.length)return!0;for(var o=0;o<t.length;o++)if(r(t[o],e[o]))return!0;return!1}},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=o(1);e.BarcodeContext=i.createContext(null),e.BarcodeContext.displayName="BarcodeContext"},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.packageMetadata={name:"@progress/kendo-react-barcodes",productName:"KendoReact",productCodes:["KENDOUIREACT","KENDOUICOMPLETE"],publishDate:1645694806,version:"",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/my-license/?utm_medium=product&utm_source=kendoreact&utm_campaign=kendo-ui-react-purchase-license-keys-warning"}},function(t,e,o){"use strict";var i,r=this&&this.__extends||(i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),n=this&&this.__assign||function(){return(n=Object.assign||function(t){for(var e,o=1,i=arguments.length;o<i;o++)for(var r in e=arguments[o])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},s=this&&this.__rest||function(t,e){var o={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(o[i]=t[i]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(t);r<i.length;r++)e.indexOf(i[r])<0&&(o[i[r]]=t[i[r]])}return o};Object.defineProperty(e,"__esModule",{value:!0});var a=o(1),p=o(6),l=o(7),h=o(0),c=o(3),u=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.getTarget=function(){return e},e.deriveOptionsFromParent=function(t){return Object.assign({},t,{background:e.props.background||"#fff",border:e.props.border,color:e.props.color||"#000",encoding:e.props.encoding,errorCorrection:e.props.errorCorrection||"L",overlay:e.props.overlay||{},padding:e.props.padding,renderAs:e.props.renderAs,size:e.props.size,value:e.props.value})},e}return r(e,t),Object.defineProperty(e.prototype,"barcodeInstance",{get:function(){return null!==this._baseBarcode?this._baseBarcode.barcodeInstance:null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"surface",{get:function(){return null!==this._baseBarcode?this._baseBarcode.surface:null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"element",{get:function(){return null!==this._baseBarcode?this._baseBarcode.element:null},enumerable:!0,configurable:!0}),e.prototype.render=function(){var t=this,e=this.props,o=e.children,i=e.className,r=s(e,["children","className"]);return a.createElement(p.BaseBarcode,n({},r,{deriveOptionsFromParent:this.deriveOptionsFromParent,ref:function(e){return t._baseBarcode=e},barcodeConstructor:l.QRCode,getTarget:this.getTarget,className:c.classNames("k-qrcode",i)}),o)},e.prototype.exportImage=function(t){return void 0===t&&(t={}),h.exportImage(this.exportVisual(),t)},e.prototype.exportSVG=function(t){return void 0===t&&(t={}),h.exportSVG(this.exportVisual(),t)},e.prototype.exportVisual=function(t){return null!==this.barcodeInstance?this.barcodeInstance.exportVisual(t):new h.Group},e}(a.Component);e.QRCode=u}])}));