'use strict' ; import type { HTMLDOMElement } from '../Renderer/DOMElementType' ; import type MapView from '../../Maps/MapView' ; import type Options from '../Options' ; import type SVGPath from '../Renderer/SVG/SVGPath' ; import Chart from './Chart.js' ; import D from '../DefaultOptions.js' ; const { getOptions } = D ; import SVGRenderer from '../Renderer/SVG/SVGRenderer.js' ; import U from '../Utilities.js' ; const { merge , pick } = U ; import '../../Maps/MapSymbols.js' ; declare module './ChartLike' { interface ChartLike { mapView ? : MapView ; } } /**
 * Map-optimized chart. Use  Highcharts . Chart for common charts.
 *
 *  requires class name extends Highcharts . Chart class MapChart extends Chart { function param { Highcharts . Options } userOptions param { Function } callback emits emits public init ( userOptions , callback ? ) { const defaultCreditsOptions = getOptions ( ) . credits ; const options = merge ( { chart : { panning : { enabled : true , type : 'xy' } , type : 'map' } , credits : { mapText : pick ( ( defaultCreditsOptions as any ) . mapText , ' \u00a9 <a href="{geojson.copyrightUrl}">' + '{geojson.copyrightShort}</a>' ) , mapTextFull : pick ( ( defaultCreditsOptions as any ) . mapTextFull , '{geojson.copyright}' ) } , mapView : { } , tooltip : { followTouchMove : false } } , userOptions ) ; super . init ( options , callback ) ; } } namespace MapChart { requires name type { Record < string , * > } export const maps = { } ; /**
     * The factory function for creating new map charts. Creates a new  {@link
     * Highcharts.MapChart|MapChart} object with different default options than
     * the basic Chart.
     *
     *  requires function param { string | Highcharts . HTMLDOMElement } renderTo param { Highcharts . Options } options param { Highcharts . ChartCallbackFunction } callback return { Highcharts . MapChart } export function mapChart ( a , b ? , c ? ) { return new MapChart ( a as any , b as any , c ) ; } requires function param { string | Array < string | number > } path return { Highcharts . SVGPathArray } export function splitPath ( path ) { let arr ; if ( typeof path === 'string' ) { path = path . replace ( /([A-Za-z])/g , ' $1 ' ) . replace ( /^\s*/ , '' ) . replace ( /\s*$/ , '' ) ; const split = path . split ( /[ ,;]+/ ) ; arr = split . map ( ( item ) : ( number | string ) => { if ( ! /[A-za-z]/ . test ( item ) ) { return parseFloat ( item ) ; } return item ; } ) ; } else { arr = path ; } return SVGRenderer . prototype . pathToSegments ( arr ) ; } } export default MapChart ;