'use strict' ; import type Chart from './Chart/Chart' ; import type CSSObject from './Renderer/CSSObject' ; import type { DOMElementType , HTMLDOMElement } from './Renderer/DOMElementType' ; import type EventCallback from './EventCallback' ; import type HTMLAttributes from './Renderer/HTML/HTMLAttributes' ; import type SVGAttributes from './Renderer/SVG/SVGAttributes' ; import H from './Globals.js' ; const { charts , doc , win } = H ; type NonArray < T > = T extends Array < unknown > ? never : T ; type NonFunction < T > = T extends Function ? never : T ; type NullType = ( null | undefined ) ; sample function param { number | string } code param { boolean } stop param { Highcharts . Chart } chart param { Highcharts . Dictionary < string > } params return { void } function error ( code , stop ? , chart ? , params ? ) { const severity = stop ? 'Highcharts error' : 'Highcharts warning' ; if ( code === 32 ) { code = `${ severity }: Deprecated member` ; } const isCode = isNumber ( code ) ; let message = isCode ? `${ severity } #${ code }: www.highcharts.com/errors/${ code }/` : code . toString ( ) ; const defaultHandler = function ( ) : void { if ( stop ) { throw new Error ( message ) ; } if ( win . console && error . messages . indexOf ( message ) === - 1 ) { console . warn ( message ) ; } } ; if ( typeof params !== 'undefined' ) { let additionalMessages = '' ; if ( isCode ) { message += '?' ; } objectEach ( params , function ( value , key ) : void { additionalMessages += `\n - ${ key }: ${ value }` ; if ( isCode ) { message += encodeURI ( key ) + '=' + encodeURI ( value ) ; } } ) ; message += additionalMessages ; } fireEvent ( H , 'displayError' , { chart , code , message , params } , defaultHandler ) ; error . messages . push ( message ) ; } namespace error { export const messages = [ ] ; } function merge < T = object > ( extend , a ? , ... n ) ; function merge < T1 extends object = object , T2 = unknown , T3 = unknown , T4 = unknown , T5 = unknown , T6 = unknown , T7 = unknown , T8 = unknown , T9 = unknown > ( a ? , b ? , c ? , d ? , e ? , f ? , g ? , h ? , i ? ) ; function param { boolean } extend param { T | undefined } a param { ... Array < object | undefined > } n return { T } function param { T | undefined } a param { ... Array < object | undefined > } n return { T } function merge < T > ( ) { let i , args = arguments , ret = { } as T ; const doCopy = function ( copy , original ) : any { if ( typeof copy !== 'object' ) { copy = { } ; } objectEach ( original , function ( value , key ) : void { if ( key === '__proto__' || key === 'constructor' ) { return ; } if ( isObject ( value , true ) && ! isClass ( value ) && ! isDOMElement ( value ) ) { copy [ key ] = doCopy ( copy [ key ] || { } , value ) ; } else { copy [ key ] = original [ key ] ; } } ) ; return copy ; } ; if ( args [ 0 ] === true ) { ret = args [ 1 ] ; args = Array . prototype . slice . call ( args , 2 ) as any ; } const len = args . length ; for ( i = 0 ; i < len ; i ++ ) { ret = doCopy ( ret , args [ i ] ) ; } return ret ; } private param { number } value param { number } min param { number } max return { number } function clamp ( value , min , max ) { return value > min ? value < max ? value : max : min ; } private function cleanRecursively < TNew extends AnyRecord , TOld extends AnyRecord > ( newer , older ) { const result = { } ; objectEach ( newer , function ( _val , key ) : void { let ob ; if ( isObject ( newer [ key ] , true ) && ! newer . nodeType && older [ key ] ) { ob = cleanRecursively ( newer [ key ] , older [ key ] ) ; if ( Object . keys ( ob ) . length ) { result [ key ] = ob ; } } else if ( isObject ( newer [ key ] ) || newer [ key ] !== older [ key ] || ( key in newer && ! ( key in older ) ) ) { result [ key ] = newer [ key ] ; } } ) ; return result ; } private function param { * } s param { number } mag return { number } function pInt ( s , mag ? ) { return parseInt ( s , mag || 10 ) ; } function param { * } s return { boolean } function isString ( s ) { return typeof s === 'string' ; } function param { * } obj return { boolean } function isArray ( obj ) { const str = Object . prototype . toString . call ( obj ) ; return str === '[object Array]' || str === '[object Array Iterator]' ; } function isObject < T > ( obj , strict ) ; function isObject < T > ( obj , strict ? ) ; function param { * } obj param { boolean } strict return { boolean } function isObject < T > ( obj , strict ? ) { return ( ! ! obj && typeof obj === 'object' && ( ! strict || ! isArray ( obj ) ) ) as any ; } function param { * } obj return { boolean } function isDOMElement ( obj ) { return isObject ( obj ) && typeof ( obj as any ) . nodeType === 'number' ; } function param { object | undefined } obj return { boolean } function isClass ( obj ) { const c = obj && obj . constructor ; return ! ! ( isObject ( obj , true ) && ! isDOMElement ( obj ) && ( c && ( c as any ) . name && ( c as any ) . name !== 'Object' ) ) ; } function param { * } n return { boolean } function isNumber ( n ) { return typeof n === 'number' && ! isNaN ( n ) && n < Infinity && n > - Infinity ; } function param { Array < * > } arr param { * } item return { void } function erase ( arr , item ) { let i = arr . length ; while ( i -- ) { if ( arr [ i ] === item ) { arr . splice ( i , 1 ) ; break ; } } } function param { * } obj return { boolean } function defined < T > ( obj ) { return typeof obj !== 'undefined' && obj !== null ; } function attr ( elem , prop ) ; function attr ( elem , prop , value ? ) ; function attr ( elem , prop , value ) ; function param { Highcharts . HTMLDOMElement | Highcharts . SVGDOMElement } elem param { string | Highcharts . HTMLAttributes | Highcharts . SVGAttributes } keyOrAttribs param { number | string } value return { string | null | undefined } function attr ( elem , keyOrAttribs , value ? ) { const isGetter = isString ( keyOrAttribs ) && ! defined ( value ) ; let ret ; const attrSingle = ( value , key ) : void => { if ( defined ( value ) ) { elem . setAttribute ( key , value ) ; } else if ( isGetter ) { ret = elem . getAttribute ( key ) ; if ( ! ret && key === 'class' ) { ret = elem . getAttribute ( key + 'Name' ) ; } } else { elem . removeAttribute ( key ) ; } } ; if ( isString ( keyOrAttribs ) ) { attrSingle ( value , keyOrAttribs ) ; } else { objectEach ( keyOrAttribs , attrSingle ) ; } return ret ; } function param { * } obj return { Array } function splat ( obj ) { return isArray ( obj ) ? obj : [ obj ] ; } function param { Function } fn param { number } delay param { * } context return { number } function syncTimeout ( fn , delay , context ? ) { if ( delay > 0 ) { return setTimeout ( fn , delay , context ) ; } fn . call ( 0 , context ) ; return - 1 ; } function param { number | undefined } id function internalClearTimeout ( id ) { if ( defined ( id ) ) { clearTimeout ( id ) ; } } function param { T | undefined } a param { Partial < T > } b return { T } function extend < T extends object > ( a , b ) { let n ; if ( ! a ) { a = { } as T ; } for ( n in b ) { ( a as any ) [ n ] = ( b as any ) [ n ] ; } return a ; } function pick < T1 , T2 , T3 , T4 , T5 > ( ... args ) ; function pick < T1 , T2 , T3 , T4 > ( ... args ) ; function pick < T1 , T2 , T3 > ( ... args ) ; function pick < T1 , T2 > ( ... args ) ; function pick < T1 > ( ... args ) ; function pick < T > ( ... args ) ; function param { ... Array < T | null | undefined > } items return { T } function pick < T > ( ) { const args = arguments ; const length = args . length ; for ( let i = 0 ; i < length ; i ++ ) { const arg = args [ i ] ; if ( typeof arg !== 'undefined' && arg !== null ) { return arg ; } } } function param { Highcharts . HTMLDOMElement | Highcharts . SVGDOMElement } el param { Highcharts . CSSObject } styles return { void } function css ( el , styles ) { if ( H . isMS && ! H . svg ) { if ( styles && defined ( styles . opacity ) ) { styles . filter = `alpha(opacity=${ styles . opacity * 100 })` ; } } extend ( el . style , styles as any ) ; } function param { string } tag param { Highcharts . HTMLAttributes } attribs param { Highcharts . CSSObject } styles param { Highcharts . HTMLDOMElement } parent param { boolean } nopad return { Highcharts . HTMLDOMElement } function createElement ( tag , attribs ? , styles ? , parent ? , nopad ? ) { const el = doc . createElement ( tag ) ; if ( attribs ) { extend ( el , attribs ) ; } if ( nopad ) { css ( el , { padding : '0' , border : 'none' , margin : '0' } ) ; } if ( styles ) { css ( el , styles ) ; } if ( parent ) { parent . appendChild ( el ) ; } return el ; } function param { Highcharts . Class < T > } parent param { Highcharts . Dictionary < * > } members return { Highcharts . Class < T > } function extendClass < T , TReturn = T > ( parent , members ) { const obj = ( function ( ) : void { } ) as any ; obj . prototype = new parent ( ) ; extend ( obj . prototype , members ) ; return obj ; } function param { number } number param { number } length param { string } padder return { string } function pad ( number , length ? , padder ? ) { return new Array ( ( length || 2 ) + 1 - String ( number ) . replace ( '-' , '' ) . length ) . join ( padder || '0' ) + number ; } function param { Highcharts . RelativeSize } value param { number } base param { number } offset return { number } function relativeLength ( value , base , offset ? ) { return ( /%$/ ) . test ( value as any ) ? ( base * parseFloat ( value as any ) / 100 ) + ( offset || 0 ) : parseFloat ( value as any ) ; } function param { * } obj param { string } method param { Highcharts . WrapProceedFunction } func function wrap ( obj , method , func ) { const proceed = obj [ method ] ; obj [ method ] = function ( ) : any { const args = Array . prototype . slice . call ( arguments ) , outerArgs = arguments , ctx = this ; ctx . proceed = function ( ) : void { proceed . apply ( ctx , arguments . length ? arguments : outerArgs ) ; } ; args . unshift ( proceed ) ; const ret = func . apply ( this , args ) ; ctx . proceed = null ; return ret ; } ; } function param { number } num return { number } function getMagnitude ( num ) { return Math . pow ( 10 , Math . floor ( Math . log ( num ) / Math . LN10 ) ) ; } deprecated function param { number } interval param { Array < * > } multiples param { number } magnitude param { boolean } allowDecimals param { boolean } hasTickAmount return { number } todo function normalizeTickInterval ( interval , multiples ? , magnitude ? , allowDecimals ? , hasTickAmount ? ) { let i , retInterval = interval ; magnitude = pick ( magnitude , 1 ) ; const normalized = interval / ( magnitude as any ) ; if ( ! multiples ) { multiples = hasTickAmount ? [ 1 , 1.2 , 1.5 , 2 , 2.5 , 3 , 4 , 5 , 6 , 8 , 10 ] : [ 1 , 2 , 2.5 , 5 , 10 ] ; if ( allowDecimals === false ) { if ( magnitude === 1 ) { multiples = multiples . filter ( function ( num ) : boolean { return num % 1 === 0 ; } ) ; } else if ( ( magnitude as any ) <= 0.1 ) { multiples = [ 1 / ( magnitude as any ) ] ; } } } for ( i = 0 ; i < multiples . length ; i ++ ) { retInterval = multiples [ i ] ; if ( ( hasTickAmount && retInterval * ( magnitude as any ) >= interval ) || ( ! hasTickAmount && ( normalized <= ( multiples [ i ] + ( multiples [ i + 1 ] || multiples [ i ] ) ) / 2 ) ) ) { break ; } } retInterval = correctFloat ( retInterval * ( magnitude as any ) , - Math . round ( Math . log ( 0.001 ) / Math . LN10 ) ) ; return retInterval ; } function param { Array < * > } arr param { Function } sortFunction function stableSort < T > ( arr , sortFunction ) { const length = arr . length ; let sortValue , i ; for ( i = 0 ; i < length ; i ++ ) { ( arr [ i ] as any ) . safeI = i ; } arr . sort ( function ( a , b ) : number { sortValue = sortFunction ( a , b ) ; return sortValue === 0 ? a . safeI - b . safeI : sortValue ; } ) ; for ( i = 0 ; i < length ; i ++ ) { delete ( arr [ i ] as any ) . safeI ; } } function param { Array < * > } data return { number } function arrayMin ( data ) { let i = data . length , min = data [ 0 ] ; while ( i -- ) { if ( data [ i ] < min ) { min = data [ i ] ; } } return min ; } function param { Array < * > } data return { number } function arrayMax ( data ) { let i = data . length , max = data [ 0 ] ; while ( i -- ) { if ( data [ i ] > max ) { max = data [ i ] ; } } return max ; } function param { * } obj param { * } except function destroyObjectProperties ( obj , except ? ) { objectEach ( obj , function ( val , n ) : void { if ( val && val !== except && val . destroy ) { val . destroy ( ) ; } delete obj [ n ] ; } ) ; } function param { Highcharts . HTMLDOMElement } element function discardElement ( element ? ) { if ( element && element . parentElement ) { element . parentElement . removeChild ( element ) ; } } function param { number } num param { number } prec return { number } function correctFloat ( num , prec ? ) { return num > 1e14 ? num : parseFloat ( num . toPrecision ( prec || 14 ) ) ; } ignore const timeUnits = { millisecond : 1 , second : 1000 , minute : 60000 , hour : 3600000 , day : 24 * 3600000 , week : 7 * 24 * 3600000 , month : 28 * 24 * 3600000 , year : 364 * 24 * 3600000 } ; private function param { number } pos return { number } Math . easeInOutSine = function ( pos ) : number { return - 0.5 * ( Math . cos ( Math . PI * pos ) - 1 ) ; } ; private function param { string } path param { unknown } obj return { unknown } function getNestedProperty ( path , parent ) { const pathElements = path . split ( '.' ) ; while ( pathElements . length && defined ( parent ) ) { const pathElement = pathElements . shift ( ) ; if ( typeof pathElement === 'undefined' || pathElement === '__proto__' ) { return ; } const child = ( parent as Record < string , unknown > ) [ pathElement ] as Record < string , unknown > ; if ( ! defined ( child ) || typeof child === 'function' || typeof child . nodeType === 'number' || child as unknown === win ) { return ; } parent = child ; } return parent ; } function getStyle ( el , prop , toInt ) ; function getStyle ( el , prop , toInt ? ) ; function param { Highcharts . HTMLDOMElement } el param { string } prop param { boolean } toInt return { number | string | undefined } function getStyle ( el , prop , toInt ? ) { const customGetStyle = ( ( H as any ) . getStyle || getStyle ) ; let style ; if ( prop === 'width' ) { let offsetWidth = Math . min ( el . offsetWidth , el . scrollWidth ) ; const boundingClientRectWidth = el . getBoundingClientRect && el . getBoundingClientRect ( ) . width ; if ( boundingClientRectWidth < offsetWidth && boundingClientRectWidth >= offsetWidth - 1 ) { offsetWidth = Math . floor ( boundingClientRectWidth ) ; } return Math . max ( 0 , ( offsetWidth - ( customGetStyle ( el , 'padding-left' , true ) || 0 ) - ( customGetStyle ( el , 'padding-right' , true ) || 0 ) ) ) ; } if ( prop === 'height' ) { return Math . max ( 0 , ( Math . min ( el . offsetHeight , el . scrollHeight ) - ( customGetStyle ( el , 'padding-top' , true ) || 0 ) - ( customGetStyle ( el , 'padding-bottom' , true ) || 0 ) ) ) ; } if ( ! win . getComputedStyle ) { error ( 27 , true ) ; } const css = win . getComputedStyle ( el , undefined ) ; if ( css ) { style = css . getPropertyValue ( prop ) ; if ( pick ( toInt , prop !== 'opacity' ) ) { style = pInt ( style ) ; } } return style ; } function deprecated param { * } item param { Array < * > } arr param { number } fromIndex return { number } function inArray ( item , arr , fromIndex ? ) { error ( 32 , false , void 0 , { 'Highcharts.inArray' : 'use Array.indexOf' } ) ; return arr . indexOf ( item , fromIndex ) ; } function param { Array < T > } arr param { Function } callback return { T | undefined } const find = ( Array . prototype as any ) . find ? function < T > ( arr , callback ) : ( T | undefined ) { return ( arr as any ) . find ( callback as any ) ; } : function < T > ( arr , callback ) : ( T | undefined ) { let i ; const length = arr . length ; for ( i = 0 ; i < length ; i ++ ) { if ( callback ( arr [ i ] , i ) ) { return arr [ i ] ; } } } ; function deprecated param { * } obj return { Array < string > } function keys ( obj ) { error ( 32 , false , void 0 , { 'Highcharts.keys' : 'use Object.keys' } ) ; return Object . keys ( obj ) ; } function param { global . Element } el return { Highcharts . OffsetObject } function offset ( el ) { const docElem = doc . documentElement , box = ( el . parentElement || el . parentNode ) ? el . getBoundingClientRect ( ) : { top : 0 , left : 0 , width : 0 , height : 0 } ; return { top : box . top + ( win . pageYOffset || docElem . scrollTop ) - ( docElem . clientTop || 0 ) , left : box . left + ( win . pageXOffset || docElem . scrollLeft ) - ( docElem . clientLeft || 0 ) , width : box . width , height : box . height } ; } function param { * } obj param { Highcharts . ObjectEachCallbackFunction < T > } fn param { T } ctx return { void } function objectEach < TObject , TContext > ( obj , fn , ctx ? ) { for ( const key in obj ) { if ( Object . hasOwnProperty . call ( obj , key ) ) { fn . call ( ctx || obj [ key ] as unknown as TContext , obj [ key ] , key , obj ) ; } } } deprecated function param { Array < * > } arr param { Function } fn param { * } ctx return { void } deprecated function param { Array < * > } arr param { Function } callback return { Array < * > } deprecated function param { Array < * > } arr param { Function } fn return { Array < * > } deprecated function param { Array < * > } arr param { Function } fn param { * } initialValue return { * } deprecated function param { Array < * > } arr param { Function } fn param { * } ctx return { boolean } objectEach ( { map : 'map' , each : 'forEach' , grep : 'filter' , reduce : 'reduce' , some : 'some' } as Record < string , ( 'map' | 'forEach' | 'filter' | 'reduce' | 'some' ) > , function ( val , key ) : void { ( H as any ) [ key ] = function ( arr ) : any { error ( 32 , false , void 0 , { [ `Highcharts.${ key }` ] : `use Array.${ val }` } ) ; return ( Array . prototype [ val ] as any ) . apply ( arr , [ ] . slice . call ( arguments , 1 ) ) ; } ; } ) ; function param { Highcharts . Class < T > | T } el The element or object to add a listener to. It can be a
 *         HTMLDOMElement , an  SVGElement or any other object.
 *
 *  param { string } type param { Highcharts . EventCallbackFunction < T > | Function } fn param { Highcharts . EventOptionsObject } options return { Function } function addEvent < T > ( el , type , fn , options = { } ) { const owner = typeof el === 'function' && el . prototype || el ; if ( ! Object . hasOwnProperty . call ( owner , 'hcEvents' ) ) { owner . hcEvents = { } ; } const events = owner . hcEvents ; if ( ( H as any ) . Point && el instanceof ( H as any ) . Point && ( el as any ) . series && ( el as any ) . series . chart ) { ( el as any ) . series . chart . runTrackerClick = true ; } const addEventListener = ( ( el as any ) . addEventListener || H . addEventListenerPolyfill ) ; if ( addEventListener ) { addEventListener . call ( el , type , fn , H . supportsPassiveEvents ? { passive : options . passive === void 0 ? type . indexOf ( 'touch' ) !== - 1 : options . passive , capture : false } : false ) ; } if ( ! events [ type ] ) { events [ type ] = [ ] ; } const eventObject = { fn , order : typeof options . order === 'number' ? options . order : Infinity } ; events [ type ] . push ( eventObject ) ; events [ type ] . sort ( ( a , b ) : number => a . order - b . order ) ; return function ( ) : void { removeEvent ( el , type , fn ) ; } ; } /**
 * Remove an event that was added with  Highcharts .
 *
 *  function param { Highcharts . Class < T > | T } el param { string } type param { Highcharts . EventCallbackFunction < T > } fn return { void } function removeEvent < T > ( el , type ? , fn ? ) { private function removeOneEvent ( type , fn ) { const removeEventListener = ( ( el as any ) . removeEventListener || H . removeEventListenerPolyfill ) ; if ( removeEventListener ) { removeEventListener . call ( el , type , fn , false ) ; } } private function removeAllEvents ( eventCollection ) { let types , len ; if ( ! ( el as any ) . nodeName ) { return ; } if ( type ) { types = { } ; types [ type ] = true ; } else { types = eventCollection ; } objectEach ( types , function ( _val , n ) : void { if ( eventCollection [ n ] ) { len = eventCollection [ n ] . length ; while ( len -- ) { removeOneEvent ( n as any , eventCollection [ n ] [ len ] . fn ) ; } } } ) ; } const owner = typeof el === 'function' && el . prototype || el ; if ( Object . hasOwnProperty . call ( owner , 'hcEvents' ) ) { const events = owner . hcEvents ; if ( type ) { const typeEvents = ( events [ type ] || [ ] ) as Utilities . EventWrapperObject < T > [ ] ; if ( fn ) { events [ type ] = typeEvents . filter ( function ( obj ) : boolean { return fn !== obj . fn ; } ) ; removeOneEvent ( type , fn ) ; } else { removeAllEvents ( events ) ; events [ type ] = [ ] ; } } else { removeAllEvents ( events ) ; delete owner . hcEvents ; } } } /**
 * Fire an event that was registered with  Highcharts .
 *
 *  function param { T } el The object to fire the event on. It can be a  HTMLDOMElement ,
 *        an  SVGElement or any other object.
 *
 *  param { string } type param { Highcharts . Dictionary < * > | Event } eventArguments param { Highcharts . EventCallbackFunction < T > | Function } defaultFunction return { void } function fireEvent < T > ( el , type , eventArguments ? , defaultFunction ? ) { let e , i ; eventArguments = eventArguments || { } ; if ( doc . createEvent && ( ( el as any ) . dispatchEvent || ( ( el as any ) . fireEvent && ( el as any ) !== H ) ) ) { e = doc . createEvent ( 'Events' ) ; e . initEvent ( type , true , true ) ; eventArguments = extend ( e , eventArguments ) ; if ( ( el as any ) . dispatchEvent ) { ( el as any ) . dispatchEvent ( eventArguments ) ; } else { ( el as any ) . fireEvent ( type , eventArguments ) ; } } else if ( ( el as any ) . hcEvents ) { if ( ! ( eventArguments as any ) . target ) { extend ( eventArguments as any , { preventDefault : function ( ) : void { ( eventArguments as any ) . defaultPrevented = true ; } , target : el , type : type } ) ; } const events = [ ] ; let object = el ; let multilevel = false ; while ( object . hcEvents ) { if ( Object . hasOwnProperty . call ( object , 'hcEvents' ) && object . hcEvents [ type ] ) { if ( events . length ) { multilevel = true ; } events . unshift . apply ( events , object . hcEvents [ type ] ) ; } object = Object . getPrototypeOf ( object ) ; } if ( multilevel ) { events . sort ( ( a , b ) : number => a . order - b . order ) ; } events . forEach ( ( obj ) : void => { if ( obj . fn . call ( el , eventArguments as any ) === false ) { ( eventArguments as any ) . preventDefault ( ) ; } } ) ; } if ( defaultFunction && ! eventArguments . defaultPrevented ) { ( defaultFunction as Function ) . call ( el , eventArguments ) ; } } let serialMode ; example function return { string } const uniqueKey = ( function ( ) : ( ) => string { const hash = Math . random ( ) . toString ( 36 ) . substring ( 2 , 9 ) + '-' ; let id = 0 ; return function ( ) : string { return 'highcharts-' + ( serialMode ? '' : hash ) + id ++ ; } ; } ( ) ) ; /**
 * Activates a serial mode for element IDs provided by
 *  Highcharts . uniqueKey . This mode can be used in automated tests, where
 * a simple comparison of two rendered SVG graphics is needed.
 *
 * **Note:** This is only for testing purposes and will break functionality in
 * webpages with multiple charts.
 *
 *  example function param { boolean } mode return { boolean | undefined } function useSerialIds ( mode ? ) { return ( serialMode = pick ( mode , serialMode ) ) ; } function isFunction ( obj ) { return typeof obj === 'function' ; } if ( ( win as any ) . jQuery ) { external function return { Highcharts . Chart } function param { 'Chart' | 'Map' | 'StockChart' | string } className param { Highcharts . Options } options param { Highcharts . ChartCallbackFunction } callback return { JQuery } ( win as any ) . jQuery . fn . highcharts = function ( ) : any { const args = [ ] . slice . call ( arguments ) as any ; if ( this [ 0 ] ) { if ( args [ 0 ] ) { new ( H as any ) [ isString ( args [ 0 ] ) ? args . shift ( ) : 'Chart' ] ( this [ 0 ] , args [ 0 ] , args [ 1 ] ) ; return this ; } return charts [ ( attr ( this [ 0 ] , 'data-highcharts-chart' ) as any ) ] ; } } ; } namespace Utilities { export type RelativeSize = ( number | string ) ; export interface Class < T = any > extends Function { new ( ... args ) : T ; } export interface ErrorMessageEventObject { chart ? : Chart ; code : number ; message ? : string ; params ? : Record < string , string > ; } export interface EventOptions { order ? : number ; passive ? : boolean ; } export interface EventWrapperObject < T > { fn : EventCallback < T > ; order : number ; } export interface FindCallback < T > { ( value , index ) : unknown ; } export interface ObjectEachCallback < TObject , TContext > { ( this , value , key , obj ) : void ; } export interface OffsetObject { height : number ; left : number ; top : number ; width : number ; } export interface WrapProceedFunction { ( ... args ) : any ; } } const Utilities = { addEvent , arrayMax , arrayMin , attr , clamp , cleanRecursively , clearTimeout : internalClearTimeout , correctFloat , createElement , css , defined , destroyObjectProperties , discardElement , erase , error , extend , extendClass , find , fireEvent , getMagnitude , getNestedProperty , getStyle , inArray , isArray , isClass , isDOMElement , isFunction , isNumber , isObject , isString , keys , merge , normalizeTickInterval , objectEach , offset , pad , pick , pInt , relativeLength , removeEvent , splat , stableSort , syncTimeout , timeUnits , uniqueKey , useSerialIds , wrap } ; export default Utilities ; interface name type { Function | undefined } name type { number | undefined } name type { number | undefined } name type { string | Function | undefined } name type { Function | undefined } callback Highcharts . AnimationStepCallbackFunction param { Highcharts . SVGElement } this return { void } interface extends Function function param { ... Array < * > } args return { T } example interface name type { boolean | number | string | undefined } name type { string | undefined } name type { Highcharts . ColorString | undefined } name type { string | undefined } name type { number | undefined } name type { 'contrast' | Highcharts . ColorString | undefined } name type { Highcharts . CursorValue | undefined } name type { string | undefined } name type { string | undefined } name type { string | undefined } name type { number | undefined } name type { number | undefined } name type { number | undefined } name type { string | undefined } name type { string | undefined } name type { string | undefined } name type { string | undefined } name type { string | undefined } name type { string | undefined } name type { string | undefined } name type { string | undefined } name type { string | undefined } name type { string | undefined } name type { number | undefined } typedef { 'alias' | 'all-scroll' | 'auto' | 'cell' | 'col-resize' | 'context-menu' | 'copy' | 'crosshair' | 'default' | 'e-resize' | 'ew-resize' | 'grab' | 'grabbing' | 'help' | 'move' | 'n-resize' | 'ne-resize' | 'nesw-resize' | 'no-drop' | 'none' | 'not-allowed' | 'ns-resize' | 'nw-resize' | 'nwse-resize' | 'pointer' | 'progress' | 'row-resize' | 's-resize' | 'se-resize' | 'sw-resize' | 'text' | 'vertical-text' | 'w-resize' | 'wait' | 'zoom-in' | 'zoom-out' } Highcharts . CursorValue typedef { 'Dash' | 'DashDot' | 'Dot' | 'LongDash' | 'LongDashDot' | 'LongDashDotDot' | 'ShortDash' | 'ShortDashDot' | 'ShortDashDotDot' | 'ShortDot' | 'Solid' } Highcharts . DashStyleValue deprecated interface name type { T } callback Highcharts . EventCallbackFunction param { T } this param { Highcharts . Dictionary < * > | Event } eventArguments return { boolean | void } interface name type { number } name type boolean callback Highcharts . FormatterCallbackFunction param { T } this return { string } typedef { Highcharts . Dictionary < boolean | number | string | Function > } Highcharts . HTMLAttributes typedef { global . HTMLElement } Highcharts . HTMLDOMElement see https callback Highcharts . ObjectEachCallbackFunction param { T } this param { * } value param { string } key param { * } obj interface name type { number } name type { number } interface name type { number } name type { number } typedef { number | string } Highcharts . RelativeSize callback Highcharts . WrapProceedFunction param { * } arg1 param { * } arg2 param { * } arg3 return { * } example namespace '' ;