{"version":3,"sources":[""],"sourcesContent":["/**\n * @license Highcharts JS v11.2.0 (2023-10-30)\n *\n * Exporting module\n *\n * (c) 2010-2021 Torstein Honsi\n *\n * License: www.highcharts.com/license\n */\n(function (factory) {\n if (typeof module === 'object' && module.exports) {\n factory['default'] = factory;\n module.exports = factory;\n } else if (typeof define === 'function' && define.amd) {\n define('highcharts/modules/export-data', ['highcharts', 'highcharts/modules/exporting'], function (Highcharts) {\n factory(Highcharts);\n factory.Highcharts = Highcharts;\n return factory;\n });\n } else {\n factory(typeof Highcharts !== 'undefined' ? Highcharts : undefined);\n }\n}(function (Highcharts) {\n 'use strict';\n var _modules = Highcharts ? Highcharts._modules : {};\n function _registerModule(obj, path, args, fn) {\n if (!obj.hasOwnProperty(path)) {\n obj[path] = fn.apply(null, args);\n\n if (typeof CustomEvent === 'function') {\n window.dispatchEvent(new CustomEvent(\n 'HighchartsModuleLoaded',\n { detail: { path: path, module: obj[path] } }\n ));\n }\n }\n }\n _registerModule(_modules, 'Extensions/DownloadURL.js', [_modules['Core/Globals.js']], function (H) {\n /* *\n *\n * (c) 2015-2023 Oystein Moseng\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Mixin for downloading content in the browser\n *\n * */\n /* *\n *\n * Imports\n *\n * */\n const { isSafari, win, win: { document: doc } } = H;\n /* *\n *\n * Constants\n *\n * */\n const domurl = win.URL || win.webkitURL || win;\n /* *\n *\n * Functions\n *\n * */\n /**\n * Convert base64 dataURL to Blob if supported, otherwise returns undefined.\n * @private\n * @function Highcharts.dataURLtoBlob\n * @param {string} dataURL\n * URL to convert\n * @return {string|undefined}\n * Blob\n */\n function dataURLtoBlob(dataURL) {\n const parts = dataURL\n .replace(/filename=.*;/, '')\n .match(/data:([^;]*)(;base64)?,([0-9A-Za-z+/]+)/);\n if (parts &&\n parts.length > 3 &&\n (win.atob) &&\n win.ArrayBuffer &&\n win.Uint8Array &&\n win.Blob &&\n (domurl.createObjectURL)) {\n // Try to convert data URL to Blob\n const binStr = win.atob(parts[3]), buf = new win.ArrayBuffer(binStr.length), binary = new win.Uint8Array(buf);\n for (let i = 0; i < binary.length; ++i) {\n binary[i] = binStr.charCodeAt(i);\n }\n return domurl\n .createObjectURL(new win.Blob([binary], { 'type': parts[1] }));\n }\n }\n /**\n * Download a data URL in the browser. Can also take a blob as first param.\n *\n * @private\n * @function Highcharts.downloadURL\n * @param {string|global.URL} dataURL\n * The dataURL/Blob to download\n * @param {string} filename\n * The name of the resulting file (w/extension)\n * @return {void}\n */\n function downloadURL(dataURL, filename) {\n const nav = win.navigator, a = doc.createElement('a');\n // IE specific blob implementation\n // Don't use for normal dataURLs\n if (typeof dataURL !== 'string' &&\n !(dataURL instanceof String) &&\n nav.msSaveOrOpenBlob) {\n nav.msSaveOrOpenBlob(dataURL, filename);\n return;\n }\n dataURL = '' + dataURL;\n const // Some browsers have limitations for data URL lengths. Try to convert\n // to Blob or fall back. Edge always needs that blob.\n isOldEdgeBrowser = /Edge\\/\\d+/.test(nav.userAgent), \n // Safari on iOS needs Blob in order to download PDF\n safariBlob = (isSafari &&\n typeof dataURL === 'string' &&\n dataURL.indexOf('data:application/pdf') === 0);\n if (safariBlob || isOldEdgeBrowser || dataURL.length > 2000000) {\n dataURL = dataURLtoBlob(dataURL) || '';\n if (!dataURL) {\n throw new Error('Failed to convert to blob');\n }\n }\n // Try HTML5 download attr if supported\n if (typeof a.download !== 'undefined') {\n a.href = dataURL;\n a.download = filename; // HTML5 download attribute\n doc.body.appendChild(a);\n a.click();\n doc.body.removeChild(a);\n }\n else {\n // No download attr, just opening data URI\n try {\n if (!win.open(dataURL, 'chart')) {\n throw new Error('Failed to open window');\n }\n }\n catch {\n // If window.open failed, try location.href\n win.location.href = dataURL;\n }\n }\n }\n /* *\n *\n * Default Export\n *\n * */\n const DownloadURL = {\n dataURLtoBlob,\n downloadURL\n };\n\n return DownloadURL;\n });\n _registerModule(_modules, 'Extensions/ExportData/ExportDataDefaults.js', [], function () {\n /* *\n *\n * Experimental data export module for Highcharts\n *\n * (c) 2010-2021 Torstein Honsi\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * */\n /* *\n *\n * Constants\n *\n * */\n /**\n * @optionparent exporting\n * @private\n */\n const exporting = {\n /**\n * Caption for the data table. Same as chart title by default. Set to\n * `false` to disable.\n *\n * @sample highcharts/export-data/multilevel-table\n * Multiple table headers\n *\n * @type {boolean|string}\n * @since 6.0.4\n * @requires modules/export-data\n * @apioption exporting.tableCaption\n */\n /**\n * Options for exporting data to CSV or ExCel, or displaying the data\n * in a HTML table or a JavaScript structure.\n *\n * This module adds data export options to the export menu and provides\n * functions like `Chart.getCSV`, `Chart.getTable`, `Chart.getDataRows`\n * and `Chart.viewData`.\n *\n * The XLS converter is limited and only creates a HTML string that is\n * passed for download, which works but creates a warning before\n * opening. The workaround for this is to use a third party XLSX\n * converter, as demonstrated in the sample below.\n *\n * @sample highcharts/export-data/categorized/ Categorized data\n * @sample highcharts/export-data/stock-timeaxis/ Highcharts Stock time axis\n * @sample highcharts/export-data/xlsx/\n * Using a third party XLSX converter\n *\n * @since 6.0.0\n * @requires modules/export-data\n */\n csv: {\n /**\n *\n * Options for annotations in the export-data table.\n *\n * @since 8.2.0\n * @requires modules/export-data\n * @requires modules/annotations\n *\n *\n */\n annotations: {\n /**\n * The way to mark the separator for annotations\n * combined in one export-data table cell.\n *\n * @since 8.2.0\n * @requires modules/annotations\n */\n itemDelimiter: '; ',\n /**\n * When several labels are assigned to a specific point,\n * they will be displayed in one field in the table.\n *\n * @sample highcharts/export-data/join-annotations/\n * Concatenate point annotations with itemDelimiter set.\n *\n * @since 8.2.0\n * @requires modules/annotations\n */\n join: false\n },\n /**\n * Formatter callback for the column headers. Parameters are:\n * - `item` - The series or axis object)\n * - `key` - The point key, for example y or z\n * - `keyLength` - The amount of value keys for this item, for\n * example a range series has the keys `low` and `high` so the\n * key length is 2.\n *\n * If [useMultiLevelHeaders](#exporting.useMultiLevelHeaders) is\n * true, columnHeaderFormatter by default returns an object with\n * columnTitle and topLevelColumnTitle for each key. Columns with\n * the same topLevelColumnTitle have their titles merged into a\n * single cell with colspan for table/Excel export.\n *\n * If `useMultiLevelHeaders` is false, or for CSV export, it returns\n * the series name, followed by the key if there is more than one\n * key.\n *\n * For the axis it returns the axis title or \"Category\" or\n * \"DateTime\" by default.\n *\n * Return `false` to use Highcharts' proposed header.\n *\n * @sample highcharts/export-data/multilevel-table\n * Multiple table headers\n *\n * @type {Function|null}\n */\n columnHeaderFormatter: null,\n /**\n * Which date format to use for exported dates on a datetime X axis.\n * See `Highcharts.dateFormat`.\n */\n dateFormat: '%Y-%m-%d %H:%M:%S',\n /**\n * Which decimal point to use for exported CSV. Defaults to the same\n * as the browser locale, typically `.` (English) or `,` (German,\n * French etc).\n *\n * @type {string|null}\n * @since 6.0.4\n */\n decimalPoint: null,\n /**\n * The item delimiter in the exported data. Use `;` for direct\n * exporting to Excel. Defaults to a best guess based on the browser\n * locale. If the locale _decimal point_ is `,`, the `itemDelimiter`\n * defaults to `;`, otherwise the `itemDelimiter` defaults to `,`.\n *\n * @type {string|null}\n */\n itemDelimiter: null,\n /**\n * The line delimiter in the exported data, defaults to a newline.\n */\n lineDelimiter: '\\n'\n },\n /**\n * Show a HTML table below the chart with the chart's current data.\n *\n * @sample highcharts/export-data/showtable/\n * Show the table\n * @sample highcharts/studies/exporting-table-html\n * Experiment with putting the table inside the subtitle to\n * allow exporting it.\n *\n * @since 6.0.0\n * @requires modules/export-data\n */\n showTable: false,\n /**\n * Use multi level headers in data table. If [csv.columnHeaderFormatter\n * ](#exporting.csv.columnHeaderFormatter) is defined, it has to return\n * objects in order for multi level headers to work.\n *\n * @sample highcharts/export-data/multilevel-table\n * Multiple table headers\n *\n * @since 6.0.4\n * @requires modules/export-data\n */\n useMultiLevelHeaders: true,\n /**\n * If using multi level table headers, use rowspans for headers that\n * have only one level.\n *\n * @sample highcharts/export-data/multilevel-table\n * Multiple table headers\n *\n * @since 6.0.4\n * @requires modules/export-data\n */\n useRowspanHeaders: true\n };\n /**\n * @optionparent lang\n * @private\n */\n const lang = {\n /**\n * The text for the menu item.\n *\n * @since 6.0.0\n * @requires modules/export-data\n */\n downloadCSV: 'Download CSV',\n /**\n * The text for the menu item.\n *\n * @since 6.0.0\n * @requires modules/export-data\n */\n downloadXLS: 'Download XLS',\n /**\n * The text for exported table.\n *\n * @since 8.1.0\n * @requires modules/export-data\n */\n exportData: {\n /**\n * The annotation column title.\n */\n annotationHeader: 'Annotations',\n /**\n * The category column title.\n */\n categoryHeader: 'Category',\n /**\n * The category column title when axis type set to \"datetime\".\n */\n categoryDatetimeHeader: 'DateTime'\n },\n /**\n * The text for the menu item.\n *\n * @since 6.0.0\n * @requires modules/export-data\n */\n viewData: 'View data table',\n /**\n * The text for the menu item.\n *\n * @since 8.2.0\n * @requires modules/export-data\n */\n hideData: 'Hide data table'\n };\n /* *\n *\n * Default Export\n *\n * */\n const ExportDataDefaults = {\n exporting,\n lang\n };\n /* *\n *\n * API Options\n *\n * */\n /**\n * Callback that fires while exporting data. This allows the modification of\n * data rows before processed into the final format.\n *\n * @type {Highcharts.ExportDataCallbackFunction}\n * @context Highcharts.Chart\n * @requires modules/export-data\n * @apioption chart.events.exportData\n */\n /**\n * When set to `false` will prevent the series data from being included in\n * any form of data export.\n *\n * Since version 6.0.0 until 7.1.0 the option was existing undocumented\n * as `includeInCSVExport`.\n *\n * @type {boolean}\n * @since 7.1.0\n * @requires modules/export-data\n * @apioption plotOptions.series.includeInDataExport\n */\n (''); // keep doclets above in JS file\n\n return ExportDataDefaults;\n });\n _registerModule(_modules, 'Extensions/ExportData/ExportData.js', [_modules['Core/Renderer/HTML/AST.js'], _modules['Extensions/ExportData/ExportDataDefaults.js'], _modules['Core/Globals.js'], _modules['Core/Defaults.js'], _modules['Extensions/DownloadURL.js'], _modules['Core/Series/SeriesRegistry.js'], _modules['Core/Utilities.js']], function (AST, ExportDataDefaults, H, D, DownloadURL, SeriesRegistry, U) {\n /* *\n *\n * Experimental data export module for Highcharts\n *\n * (c) 2010-2021 Torstein Honsi\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * */\n // @todo\n // - Set up systematic tests for all series types, paired with tests of the data\n // module importing the same data.\n const { doc, win } = H;\n const { getOptions, setOptions } = D;\n const { downloadURL } = DownloadURL;\n const { series: SeriesClass, seriesTypes: { arearange: AreaRangeSeries, gantt: GanttSeries, map: MapSeries, mapbubble: MapBubbleSeries, treemap: TreemapSeries, xrange: XRangeSeries } } = SeriesRegistry;\n const { addEvent, defined, extend, find, fireEvent, isNumber, pick } = U;\n /* *\n *\n * Constants\n *\n * */\n const composedMembers = [];\n /* *\n *\n * Functions\n *\n * */\n /**\n * Generates a data URL of CSV for local download in the browser. This is the\n * default action for a click on the 'Download CSV' button.\n *\n * See {@link Highcharts.Chart#getCSV} to get the CSV data itself.\n *\n * @function Highcharts.Chart#downloadCSV\n *\n * @requires modules/exporting\n */\n function chartDownloadCSV() {\n const csv = this.getCSV(true);\n downloadURL(getBlobFromContent(csv, 'text/csv') ||\n 'data:text/csv,\\uFEFF' + encodeURIComponent(csv), this.getFilename() + '.csv');\n }\n /**\n * Generates a data URL of an XLS document for local download in the browser.\n * This is the default action for a click on the 'Download XLS' button.\n *\n * See {@link Highcharts.Chart#getTable} to get the table data itself.\n *\n * @function Highcharts.Chart#downloadXLS\n *\n * @requires modules/exporting\n */\n function chartDownloadXLS() {\n const uri = 'data:application/vnd.ms-excel;base64,', template = '' +\n '' +\n '' +\n '' +\n '' +\n '' +\n this.getTable(true) +\n '', base64 = function (s) {\n return win.btoa(unescape(encodeURIComponent(s))); // #50\n };\n downloadURL(getBlobFromContent(template, 'application/vnd.ms-excel') ||\n uri + base64(template), this.getFilename() + '.xls');\n }\n /**\n * Export-data module required. Returns the current chart data as a CSV string.\n *\n * @function Highcharts.Chart#getCSV\n *\n * @param {boolean} [useLocalDecimalPoint]\n * Whether to use the local decimal point as detected from the browser.\n * This makes it easier to export data to Excel in the same locale as the\n * user is.\n *\n * @return {string}\n * CSV representation of the data\n */\n function chartGetCSV(useLocalDecimalPoint) {\n let csv = '';\n const rows = this.getDataRows(), csvOptions = this.options.exporting.csv, decimalPoint = pick(csvOptions.decimalPoint, csvOptions.itemDelimiter !== ',' && useLocalDecimalPoint ?\n (1.1).toLocaleString()[1] :\n '.'), \n // use ';' for direct to Excel\n itemDelimiter = pick(csvOptions.itemDelimiter, decimalPoint === ',' ? ';' : ','), \n // '\\n' isn't working with the js csv data extraction\n lineDelimiter = csvOptions.lineDelimiter;\n // Transform the rows to CSV\n rows.forEach((row, i) => {\n let val = '', j = row.length;\n while (j--) {\n val = row[j];\n if (typeof val === 'string') {\n val = `\"${val}\"`;\n }\n if (typeof val === 'number') {\n if (decimalPoint !== '.') {\n val = val.toString().replace('.', decimalPoint);\n }\n }\n row[j] = val;\n }\n // The first row is the header - it defines the number of columns.\n // Empty columns between not-empty cells are covered in the getDataRows\n // method.\n // Now add empty values only to the end of the row so all rows have\n // the same number of columns, #17186\n row.length = rows.length ? rows[0].length : 0;\n // Add the values\n csv += row.join(itemDelimiter);\n // Add the line delimiter\n if (i < rows.length - 1) {\n csv += lineDelimiter;\n }\n });\n return csv;\n }\n /**\n * Export-data module required. Returns a two-dimensional array containing the\n * current chart data.\n *\n * @function Highcharts.Chart#getDataRows\n *\n * @param {boolean} [multiLevelHeaders]\n * Use multilevel headers for the rows by default. Adds an extra row with\n * top level headers. If a custom columnHeaderFormatter is defined, this\n * can override the behavior.\n *\n * @return {Array>}\n * The current chart data\n *\n * @emits Highcharts.Chart#event:exportData\n */\n function chartGetDataRows(multiLevelHeaders) {\n const hasParallelCoords = this.hasParallelCoordinates, time = this.time, csvOptions = ((this.options.exporting && this.options.exporting.csv) || {}), xAxes = this.xAxis, rows = {}, rowArr = [], topLevelColumnTitles = [], columnTitles = [], langOptions = this.options.lang, exportDataOptions = langOptions.exportData, categoryHeader = exportDataOptions.categoryHeader, categoryDatetimeHeader = exportDataOptions.categoryDatetimeHeader, \n // Options\n columnHeaderFormatter = function (item, key, keyLength) {\n if (csvOptions.columnHeaderFormatter) {\n const s = csvOptions.columnHeaderFormatter(item, key, keyLength);\n if (s !== false) {\n return s;\n }\n }\n if (!item) {\n return categoryHeader;\n }\n if (!(item instanceof SeriesClass)) {\n return (item.options.title && item.options.title.text) ||\n (item.dateTime ? categoryDatetimeHeader : categoryHeader);\n }\n if (multiLevelHeaders) {\n return {\n columnTitle: keyLength > 1 ?\n key :\n item.name,\n topLevelColumnTitle: item.name\n };\n }\n return item.name + (keyLength > 1 ? ' (' + key + ')' : '');\n }, \n // Map the categories for value axes\n getCategoryAndDateTimeMap = function (series, pointArrayMap, pIdx) {\n const categoryMap = {}, dateTimeValueAxisMap = {};\n pointArrayMap.forEach(function (prop) {\n const axisName = ((series.keyToAxis && series.keyToAxis[prop]) ||\n prop) + 'Axis', \n // Points in parallel coordinates refers to all yAxis\n // not only `series.yAxis`\n axis = isNumber(pIdx) ?\n series.chart[axisName][pIdx] :\n series[axisName];\n categoryMap[prop] = (axis && axis.categories) || [];\n dateTimeValueAxisMap[prop] = (axis && axis.dateTime);\n });\n return {\n categoryMap: categoryMap,\n dateTimeValueAxisMap: dateTimeValueAxisMap\n };\n }, \n // Create point array depends if xAxis is category\n // or point.name is defined #13293\n getPointArray = function (series, xAxis) {\n const pointArrayMap = series.pointArrayMap || ['y'], namedPoints = series.data.some((d) => (typeof d.y !== 'undefined') && d.name);\n // If there are points with a name, we also want the x value in the\n // table\n if (namedPoints &&\n xAxis &&\n !xAxis.categories &&\n series.exportKey !== 'name') {\n return ['x', ...pointArrayMap];\n }\n return pointArrayMap;\n }, xAxisIndices = [];\n let xAxis, dataRows, columnTitleObj, i = 0, // Loop the series and index values\n x, xTitle;\n this.series.forEach(function (series) {\n const keys = series.options.keys, xAxis = series.xAxis, pointArrayMap = keys || getPointArray(series, xAxis), valueCount = pointArrayMap.length, xTaken = !series.requireSorting && {}, xAxisIndex = xAxes.indexOf(xAxis);\n let categoryAndDatetimeMap = getCategoryAndDateTimeMap(series, pointArrayMap), mockSeries, j;\n if (series.options.includeInDataExport !== false &&\n !series.options.isInternal &&\n series.visible !== false // #55\n ) {\n // Build a lookup for X axis index and the position of the first\n // series that belongs to that X axis. Includes -1 for non-axis\n // series types like pies.\n if (!find(xAxisIndices, function (index) {\n return index[0] === xAxisIndex;\n })) {\n xAxisIndices.push([xAxisIndex, i]);\n }\n // Compute the column headers and top level headers, usually the\n // same as series names\n j = 0;\n while (j < valueCount) {\n columnTitleObj = columnHeaderFormatter(series, pointArrayMap[j], pointArrayMap.length);\n columnTitles.push(columnTitleObj.columnTitle || columnTitleObj);\n if (multiLevelHeaders) {\n topLevelColumnTitles.push(columnTitleObj.topLevelColumnTitle ||\n columnTitleObj);\n }\n j++;\n }\n mockSeries = {\n chart: series.chart,\n autoIncrement: series.autoIncrement,\n options: series.options,\n pointArrayMap: series.pointArrayMap,\n index: series.index\n };\n const seriesIndex = mockSeries.index;\n // Export directly from options.data because we need the uncropped\n // data (#7913), and we need to support Boost (#7026).\n series.options.data.forEach(function eachData(options, pIdx) {\n const mockPoint = { series: mockSeries };\n let key, prop, val;\n // In parallel coordinates chart, each data point is connected\n // to a separate yAxis, conform this\n if (hasParallelCoords) {\n categoryAndDatetimeMap = getCategoryAndDateTimeMap(series, pointArrayMap, pIdx);\n }\n series.pointClass.prototype.applyOptions.apply(mockPoint, [options]);\n const name = series.data[pIdx] && series.data[pIdx].name;\n key = (mockPoint.x ?? '') + ',' + name;\n j = 0;\n // Pies, funnels, geo maps etc. use point name in X row\n if (!xAxis ||\n series.exportKey === 'name' ||\n (!hasParallelCoords && xAxis && xAxis.hasNames) && name) {\n key = name;\n }\n if (xTaken) {\n if (xTaken[key]) {\n key += '|' + pIdx;\n }\n xTaken[key] = true;\n }\n if (!rows[key]) {\n rows[key] = [];\n rows[key].xValues = [];\n // ES5 replacement for Array.from / fill.\n const arr = [];\n for (let i = 0; i < series.chart.series.length; i++) {\n arr[i] = 0;\n }\n // Create poiners array, holding information how many\n // duplicates of specific x occurs in each series.\n // Used for creating rows with duplicates.\n rows[key].pointers = arr;\n rows[key].pointers[series.index] = 1;\n }\n else {\n // Handle duplicates (points with the same x), by creating\n // extra rows based on pointers for better performance.\n const modifiedKey = `${key},${rows[key].pointers[series.index]}`, originalKey = key;\n if (rows[key].pointers[series.index]) {\n if (!rows[modifiedKey]) {\n rows[modifiedKey] = [];\n rows[modifiedKey].xValues = [];\n rows[modifiedKey].pointers = [];\n }\n key = modifiedKey;\n }\n rows[originalKey].pointers[series.index] += 1;\n }\n rows[key].x = mockPoint.x;\n rows[key].name = name;\n rows[key].xValues[xAxisIndex] = mockPoint.x;\n while (j < valueCount) {\n prop = pointArrayMap[j]; // y, z etc\n val = mockPoint[prop];\n rows[key][i + j] = pick(\n // Y axis category if present\n categoryAndDatetimeMap.categoryMap[prop][val], \n // datetime yAxis\n categoryAndDatetimeMap.dateTimeValueAxisMap[prop] ?\n time.dateFormat(csvOptions.dateFormat, val) :\n null, \n // linear/log yAxis\n val);\n j++;\n }\n });\n i = i + j;\n }\n });\n // Make a sortable array\n for (x in rows) {\n if (Object.hasOwnProperty.call(rows, x)) {\n rowArr.push(rows[x]);\n }\n }\n let xAxisIndex, column;\n // Add computed column headers and top level headers to final row set\n dataRows = multiLevelHeaders ? [topLevelColumnTitles, columnTitles] :\n [columnTitles];\n i = xAxisIndices.length;\n while (i--) { // Start from end to splice in\n xAxisIndex = xAxisIndices[i][0];\n column = xAxisIndices[i][1];\n xAxis = xAxes[xAxisIndex];\n // Sort it by X values\n rowArr.sort(function (// eslint-disable-line no-loop-func\n a, b) {\n return a.xValues[xAxisIndex] - b.xValues[xAxisIndex];\n });\n // Add header row\n xTitle = columnHeaderFormatter(xAxis);\n dataRows[0].splice(column, 0, xTitle);\n if (multiLevelHeaders && dataRows[1]) {\n // If using multi level headers, we just added top level header.\n // Also add for sub level\n dataRows[1].splice(column, 0, xTitle);\n }\n // Add the category column\n rowArr.forEach(function (// eslint-disable-line no-loop-func\n row) {\n let category = row.name;\n if (xAxis && !defined(category)) {\n if (xAxis.dateTime) {\n if (row.x instanceof Date) {\n row.x = row.x.getTime();\n }\n category = time.dateFormat(csvOptions.dateFormat, row.x);\n }\n else if (xAxis.categories) {\n category = pick(xAxis.names[row.x], xAxis.categories[row.x], row.x);\n }\n else {\n category = row.x;\n }\n }\n // Add the X/date/category\n row.splice(column, 0, category);\n });\n }\n dataRows = dataRows.concat(rowArr);\n fireEvent(this, 'exportData', { dataRows: dataRows });\n return dataRows;\n }\n /**\n * Export-data module required. Build a HTML table with the chart's current\n * data.\n *\n * @sample highcharts/export-data/viewdata/\n * View the data from the export menu\n *\n * @function Highcharts.Chart#getTable\n *\n * @param {boolean} [useLocalDecimalPoint]\n * Whether to use the local decimal point as detected from the browser.\n * This makes it easier to export data to Excel in the same locale as the\n * user is.\n *\n * @return {string}\n * HTML representation of the data.\n *\n * @emits Highcharts.Chart#event:afterGetTable\n */\n function chartGetTable(useLocalDecimalPoint) {\n const serialize = (node) => {\n if (!node.tagName || node.tagName === '#text') {\n // Text node\n return node.textContent || '';\n }\n const attributes = node.attributes;\n let html = `<${node.tagName}`;\n if (attributes) {\n Object.keys(attributes)\n .forEach((key) => {\n const value = attributes[key];\n html += ` ${key}=\"${value}\"`;\n });\n }\n html += '>';\n html += node.textContent || '';\n (node.children || []).forEach((child) => {\n html += serialize(child);\n });\n html += ``;\n return html;\n };\n const tree = this.getTableAST(useLocalDecimalPoint);\n return serialize(tree);\n }\n /**\n * Get the AST of a HTML table representing the chart data.\n *\n * @private\n *\n * @function Highcharts.Chart#getTableAST\n *\n * @param {boolean} [useLocalDecimalPoint]\n * Whether to use the local decimal point as detected from the browser.\n * This makes it easier to export data to Excel in the same locale as the\n * user is.\n *\n * @return {Highcharts.ASTNode}\n * The abstract syntax tree\n */\n function chartGetTableAST(useLocalDecimalPoint) {\n let rowLength = 0;\n const treeChildren = [];\n const options = this.options, decimalPoint = useLocalDecimalPoint ? (1.1).toLocaleString()[1] : '.', useMultiLevelHeaders = pick(options.exporting.useMultiLevelHeaders, true), rows = this.getDataRows(useMultiLevelHeaders), topHeaders = useMultiLevelHeaders ? rows.shift() : null, subHeaders = rows.shift(), \n // Compare two rows for equality\n isRowEqual = function (row1, row2) {\n let i = row1.length;\n if (row2.length === i) {\n while (i--) {\n if (row1[i] !== row2[i]) {\n return false;\n }\n }\n }\n else {\n return false;\n }\n return true;\n }, \n // Get table cell HTML from value\n getCellHTMLFromValue = function (tagName, classes, attributes, value) {\n let textContent = pick(value, ''), className = 'highcharts-text' + (classes ? ' ' + classes : '');\n // Convert to string if number\n if (typeof textContent === 'number') {\n textContent = textContent.toString();\n if (decimalPoint === ',') {\n textContent = textContent.replace('.', decimalPoint);\n }\n className = 'highcharts-number';\n }\n else if (!value) {\n className = 'highcharts-empty';\n }\n attributes = extend({ 'class': className }, attributes);\n return {\n tagName,\n attributes,\n textContent\n };\n }, \n // Get table header markup from row data\n getTableHeaderHTML = function (topheaders, subheaders, rowLength) {\n const theadChildren = [];\n let i = 0, len = rowLength || subheaders && subheaders.length, next, cur, curColspan = 0, rowspan;\n // Clean up multiple table headers. Chart.getDataRows() returns two\n // levels of headers when using multilevel, not merged. We need to\n // merge identical headers, remove redundant headers, and keep it\n // all marked up nicely.\n if (useMultiLevelHeaders &&\n topheaders &&\n subheaders &&\n !isRowEqual(topheaders, subheaders)) {\n const trChildren = [];\n for (; i < len; ++i) {\n cur = topheaders[i];\n next = topheaders[i + 1];\n if (cur === next) {\n ++curColspan;\n }\n else if (curColspan) {\n // Ended colspan\n // Add cur to HTML with colspan.\n trChildren.push(getCellHTMLFromValue('th', 'highcharts-table-topheading', {\n scope: 'col',\n colspan: curColspan + 1\n }, cur));\n curColspan = 0;\n }\n else {\n // Cur is standalone. If it is same as sublevel,\n // remove sublevel and add just toplevel.\n if (cur === subheaders[i]) {\n if (options.exporting.useRowspanHeaders) {\n rowspan = 2;\n delete subheaders[i];\n }\n else {\n rowspan = 1;\n subheaders[i] = '';\n }\n }\n else {\n rowspan = 1;\n }\n const cell = getCellHTMLFromValue('th', 'highcharts-table-topheading', { scope: 'col' }, cur);\n if (rowspan > 1 && cell.attributes) {\n cell.attributes.valign = 'top';\n cell.attributes.rowspan = rowspan;\n }\n trChildren.push(cell);\n }\n }\n theadChildren.push({\n tagName: 'tr',\n children: trChildren\n });\n }\n // Add the subheaders (the only headers if not using multilevels)\n if (subheaders) {\n const trChildren = [];\n for (i = 0, len = subheaders.length; i < len; ++i) {\n if (typeof subheaders[i] !== 'undefined') {\n trChildren.push(getCellHTMLFromValue('th', null, { scope: 'col' }, subheaders[i]));\n }\n }\n theadChildren.push({\n tagName: 'tr',\n children: trChildren\n });\n }\n return {\n tagName: 'thead',\n children: theadChildren\n };\n };\n // Add table caption\n if (options.exporting.tableCaption !== false) {\n treeChildren.push({\n tagName: 'caption',\n attributes: {\n 'class': 'highcharts-table-caption'\n },\n textContent: pick(options.exporting.tableCaption, (options.title.text ?\n options.title.text :\n 'Chart'))\n });\n }\n // Find longest row\n for (let i = 0, len = rows.length; i < len; ++i) {\n if (rows[i].length > rowLength) {\n rowLength = rows[i].length;\n }\n }\n // Add header\n treeChildren.push(getTableHeaderHTML(topHeaders, subHeaders, Math.max(rowLength, subHeaders.length)));\n // Transform the rows to HTML\n const trs = [];\n rows.forEach(function (row) {\n const trChildren = [];\n for (let j = 0; j < rowLength; j++) {\n // Make first column a header too. Especially important for\n // category axes, but also might make sense for datetime? Should\n // await user feedback on this.\n trChildren.push(getCellHTMLFromValue(j ? 'td' : 'th', null, j ? {} : { scope: 'row' }, row[j]));\n }\n trs.push({\n tagName: 'tr',\n children: trChildren\n });\n });\n treeChildren.push({\n tagName: 'tbody',\n children: trs\n });\n const e = {\n tree: {\n tagName: 'table',\n id: `highcharts-data-table-${this.index}`,\n children: treeChildren\n }\n };\n fireEvent(this, 'aftergetTableAST', e);\n return e.tree;\n }\n /**\n * Export-data module required. Hide the data table when visible.\n *\n * @function Highcharts.Chart#hideData\n */\n function chartHideData() {\n this.toggleDataTable(false);\n }\n /**\n * @private\n */\n function chartToggleDataTable(show) {\n show = pick(show, !this.isDataTableVisible);\n // Create the div\n const createContainer = show && !this.dataTableDiv;\n if (createContainer) {\n this.dataTableDiv = doc.createElement('div');\n this.dataTableDiv.className = 'highcharts-data-table';\n // Insert after the chart container\n this.renderTo.parentNode.insertBefore(this.dataTableDiv, this.renderTo.nextSibling);\n }\n // Toggle the visibility\n if (this.dataTableDiv) {\n const style = this.dataTableDiv.style, oldDisplay = style.display;\n style.display = show ? 'block' : 'none';\n // Generate the data table\n if (show) {\n this.dataTableDiv.innerHTML = AST.emptyHTML;\n const ast = new AST([this.getTableAST()]);\n ast.addToDOM(this.dataTableDiv);\n fireEvent(this, 'afterViewData', {\n element: this.dataTableDiv,\n wasHidden: createContainer || oldDisplay !== style.display\n });\n }\n else {\n fireEvent(this, 'afterHideData');\n }\n }\n // Set the flag\n this.isDataTableVisible = show;\n // Change the menu item text\n const exportDivElements = this.exportDivElements, options = this.options.exporting, menuItems = options &&\n options.buttons &&\n options.buttons.contextButton.menuItems, lang = this.options.lang;\n if (options &&\n options.menuItemDefinitions &&\n lang &&\n lang.viewData &&\n lang.hideData &&\n menuItems &&\n exportDivElements) {\n const exportDivElement = exportDivElements[menuItems.indexOf('viewData')];\n if (exportDivElement) {\n AST.setElementHTML(exportDivElement, this.isDataTableVisible ? lang.hideData : lang.viewData);\n }\n }\n }\n /**\n * Export-data module required. View the data in a table below the chart.\n *\n * @function Highcharts.Chart#viewData\n *\n * @emits Highcharts.Chart#event:afterViewData\n */\n function chartViewData() {\n this.toggleDataTable(true);\n }\n /**\n * @private\n */\n function compose(ChartClass) {\n if (U.pushUnique(composedMembers, ChartClass)) {\n // Add an event listener to handle the showTable option\n addEvent(ChartClass, 'afterViewData', onChartAfterViewData);\n addEvent(ChartClass, 'render', onChartRenderer);\n const chartProto = ChartClass.prototype;\n chartProto.downloadCSV = chartDownloadCSV;\n chartProto.downloadXLS = chartDownloadXLS;\n chartProto.getCSV = chartGetCSV;\n chartProto.getDataRows = chartGetDataRows;\n chartProto.getTable = chartGetTable;\n chartProto.getTableAST = chartGetTableAST;\n chartProto.hideData = chartHideData;\n chartProto.toggleDataTable = chartToggleDataTable;\n chartProto.viewData = chartViewData;\n }\n if (U.pushUnique(composedMembers, setOptions)) {\n const exportingOptions = getOptions().exporting;\n // Add \"Download CSV\" to the exporting menu.\n // @todo consider move to defaults\n if (exportingOptions) {\n extend(exportingOptions.menuItemDefinitions, {\n downloadCSV: {\n textKey: 'downloadCSV',\n onclick: function () {\n this.downloadCSV();\n }\n },\n downloadXLS: {\n textKey: 'downloadXLS',\n onclick: function () {\n this.downloadXLS();\n }\n },\n viewData: {\n textKey: 'viewData',\n onclick: function () {\n this.toggleDataTable();\n }\n }\n });\n if (exportingOptions.buttons &&\n exportingOptions.buttons.contextButton.menuItems) {\n exportingOptions.buttons.contextButton.menuItems.push('separator', 'downloadCSV', 'downloadXLS', 'viewData');\n }\n }\n setOptions(ExportDataDefaults);\n }\n if (AreaRangeSeries && U.pushUnique(composedMembers, AreaRangeSeries)) {\n AreaRangeSeries.prototype.keyToAxis = {\n low: 'y',\n high: 'y'\n };\n }\n if (GanttSeries && U.pushUnique(composedMembers, GanttSeries)) {\n GanttSeries.prototype.exportKey = 'name';\n GanttSeries.prototype.keyToAxis = {\n start: 'x',\n end: 'x'\n };\n }\n if (XRangeSeries && U.pushUnique(composedMembers, XRangeSeries)) {\n XRangeSeries.prototype.keyToAxis = {\n x2: 'x'\n };\n }\n if (MapSeries && U.pushUnique(composedMembers, MapSeries)) {\n MapSeries.prototype.exportKey = 'name';\n }\n if (MapBubbleSeries && U.pushUnique(composedMembers, MapBubbleSeries)) {\n MapBubbleSeries.prototype.exportKey = 'name';\n }\n if (TreemapSeries && U.pushUnique(composedMembers, TreemapSeries)) {\n TreemapSeries.prototype.exportKey = 'name';\n }\n }\n /**\n * Get a blob object from content, if blob is supported\n *\n * @private\n * @param {string} content\n * The content to create the blob from.\n * @param {string} type\n * The type of the content.\n * @return {string|undefined}\n * The blob object, or undefined if not supported.\n */\n function getBlobFromContent(content, type) {\n const nav = win.navigator, domurl = win.URL || win.webkitURL || win;\n try {\n // MS specific\n if ((nav.msSaveOrOpenBlob) && win.MSBlobBuilder) {\n const blob = new win.MSBlobBuilder();\n blob.append(content);\n return blob.getBlob('image/svg+xml');\n }\n return domurl.createObjectURL(new win.Blob(['\\uFEFF' + content], // #7084\n { type: type }));\n }\n catch (e) {\n // Ignore\n }\n }\n /**\n * @private\n */\n function onChartAfterViewData() {\n const chart = this, dataTableDiv = chart.dataTableDiv, getCellValue = (tr, index) => tr.children[index].textContent, comparer = (index, ascending) => (a, b) => {\n const sort = (v1, v2) => (v1 !== '' && v2 !== '' && !isNaN(v1) && !isNaN(v2) ?\n v1 - v2 :\n v1.toString().localeCompare(v2));\n return sort(getCellValue(ascending ? a : b, index), getCellValue(ascending ? b : a, index));\n };\n if (dataTableDiv &&\n chart.options.exporting &&\n chart.options.exporting.allowTableSorting) {\n const row = dataTableDiv.querySelector('thead tr');\n if (row) {\n row.childNodes.forEach((th) => {\n const table = th.closest('table');\n th.addEventListener('click', function () {\n const rows = [...dataTableDiv.querySelectorAll('tr:not(thead tr)')], headers = [...th.parentNode.children];\n rows.sort(comparer(headers.indexOf(th), chart.ascendingOrderInTable =\n !chart.ascendingOrderInTable)).forEach((tr) => {\n table.appendChild(tr);\n });\n headers.forEach((th) => {\n [\n 'highcharts-sort-ascending',\n 'highcharts-sort-descending'\n ].forEach((className) => {\n if (th.classList.contains(className)) {\n th.classList.remove(className);\n }\n });\n });\n th.classList.add(chart.ascendingOrderInTable ?\n 'highcharts-sort-ascending' :\n 'highcharts-sort-descending');\n });\n });\n }\n }\n }\n /**\n * Handle the showTable option\n * @private\n */\n function onChartRenderer() {\n if (this.options &&\n this.options.exporting &&\n this.options.exporting.showTable &&\n !this.options.chart.forExport) {\n this.viewData();\n }\n }\n /* *\n *\n * Default Export\n *\n * */\n const ExportData = {\n compose\n };\n /* *\n *\n * API Declarations\n *\n * */\n /**\n * Function callback to execute while data rows are processed for exporting.\n * This allows the modification of data rows before processed into the final\n * format.\n *\n * @callback Highcharts.ExportDataCallbackFunction\n * @extends Highcharts.EventCallbackFunction\n *\n * @param {Highcharts.Chart} this\n * Chart context where the event occured.\n *\n * @param {Highcharts.ExportDataEventObject} event\n * Event object with data rows that can be modified.\n */\n /**\n * Contains information about the export data event.\n *\n * @interface Highcharts.ExportDataEventObject\n */ /**\n * Contains the data rows for the current export task and can be modified.\n * @name Highcharts.ExportDataEventObject#dataRows\n * @type {Array>}\n */\n (''); // keeps doclets above in JS file\n\n return ExportData;\n });\n _registerModule(_modules, 'masters/modules/export-data.src.js', [_modules['Core/Globals.js'], _modules['Extensions/DownloadURL.js'], _modules['Extensions/ExportData/ExportData.js']], function (Highcharts, DownloadURL, ExportData) {\n\n const G = Highcharts;\n // Compatibility\n G.dataURLtoBlob = DownloadURL.dataURLtoBlob;\n G.downloadURL = DownloadURL.downloadURL;\n // Compose\n ExportData.compose(G.Chart);\n\n });\n}));"],"names":["factory","module","exports","define","amd","Highcharts","undefined","_modules","_registerModule","obj","path","args","fn","hasOwnProperty","apply","CustomEvent","window","dispatchEvent","detail","H","isSafari","win","document","doc","domurl","URL","webkitURL","dataURLtoBlob","dataURL","parts","replace","match","length","atob","ArrayBuffer","Uint8Array","Blob","createObjectURL","binStr","buf","binary","i","charCodeAt","downloadURL","filename","nav","navigator","a","createElement","String","msSaveOrOpenBlob","isOldEdgeBrowser","test","userAgent","safariBlob","indexOf","Error","download","href","body","appendChild","click","removeChild","open","location","exporting","csv","annotations","itemDelimiter","join","columnHeaderFormatter","dateFormat","decimalPoint","lineDelimiter","showTable","useMultiLevelHeaders","useRowspanHeaders","lang","downloadCSV","downloadXLS","exportData","annotationHeader","categoryHeader","categoryDatetimeHeader","viewData","hideData","AST","ExportDataDefaults","D","DownloadURL","SeriesRegistry","U","getOptions","setOptions","series","SeriesClass","seriesTypes","arearange","AreaRangeSeries","gantt","GanttSeries","map","MapSeries","mapbubble","MapBubbleSeries","treemap","TreemapSeries","xrange","XRangeSeries","addEvent","defined","extend","find","fireEvent","isNumber","pick","composedMembers","chartDownloadCSV","getCSV","getBlobFromContent","encodeURIComponent","getFilename","chartDownloadXLS","template","getTable","uri","btoa","unescape","chartGetCSV","useLocalDecimalPoint","rows","getDataRows","csvOptions","options","toLocaleString","forEach","row","val","j","toString","chartGetDataRows","multiLevelHeaders","xAxisIndex","column","hasParallelCoords","hasParallelCoordinates","time","xAxes","xAxis","rowArr","topLevelColumnTitles","columnTitles","langOptions","exportDataOptions","item","key","keyLength","s","columnTitle","name","topLevelColumnTitle","title","text","dateTime","getCategoryAndDateTimeMap","pointArrayMap","pIdx","categoryMap","dateTimeValueAxisMap","prop","axisName","keyToAxis","axis","chart","categories","getPointArray","namedPoints","data","some","d","y","exportKey","xAxisIndices","dataRows","columnTitleObj","x","xTitle","keys","valueCount","xTaken","requireSorting","categoryAndDatetimeMap","mockSeries","includeInDataExport","isInternal","visible","index","push","autoIncrement","mockPoint","pointClass","prototype","applyOptions","hasNames","modifiedKey","pointers","originalKey","xValues","arr","Object","call","sort","b","splice","category","Date","getTime","names","concat","chartGetTable","serialize","node","tagName","textContent","attributes","html","value","children","child","tree","getTableAST","chartGetTableAST","rowLength","treeChildren","topHeaders","shift","subHeaders","isRowEqual","row1","row2","getCellHTMLFromValue","classes","className","tableCaption","len","getTableHeaderHTML","topheaders","subheaders","theadChildren","cur","curColspan","rowspan","trChildren","scope","colspan","cell","valign","Math","max","trs","e","id","chartHideData","toggleDataTable","chartToggleDataTable","show","isDataTableVisible","createContainer","dataTableDiv","renderTo","parentNode","insertBefore","nextSibling","style","oldDisplay","display","innerHTML","emptyHTML","ast","addToDOM","element","wasHidden","exportDivElements","menuItems","buttons","contextButton","menuItemDefinitions","exportDivElement","setElementHTML","chartViewData","content","type","MSBlobBuilder","blob","append","getBlob","onChartAfterViewData","getCellValue","tr","comparer","ascending","v1","v2","isNaN","localeCompare","allowTableSorting","querySelector","childNodes","th","table","closest","addEventListener","querySelectorAll","headers","ascendingOrderInTable","classList","contains","remove","add","onChartRenderer","forExport","compose","ChartClass","pushUnique","chartProto","exportingOptions","textKey","onclick","low","high","start","end","x2","ExportData","G","Chart"],"mappings":"AAAA;;;;;;;;CAQC,GACA,SAAUA,CAAO,EACV,AAAkB,UAAlB,OAAOC,QAAuBA,OAAOC,OAAO,EAC5CF,EAAQ,OAAU,CAAGA,EACrBC,OAAOC,OAAO,CAAGF,GACV,AAAkB,YAAlB,OAAOG,QAAyBA,OAAOC,GAAG,CACjDD,OAAO,iCAAkC,CAAC,aAAc,+BAA+B,CAAE,SAAUE,CAAU,EAGzG,OAFAL,EAAQK,GACRL,EAAQK,UAAU,CAAGA,EACdL,CACX,GAEAA,EAAQ,AAAsB,aAAtB,OAAOK,WAA6BA,WAAaC,KAAAA,EAEjE,EAAE,SAAUD,CAAU,EAClB,aACA,IAAIE,EAAWF,EAAaA,EAAWE,QAAQ,CAAG,CAAC,EACnD,SAASC,EAAgBC,CAAG,CAAEC,CAAI,CAAEC,CAAI,CAAEC,CAAE,EACnCH,EAAII,cAAc,CAACH,KACpBD,CAAG,CAACC,EAAK,CAAGE,EAAGE,KAAK,CAAC,KAAMH,GAEA,YAAvB,OAAOI,aACPC,OAAOC,aAAa,CAAC,IAAIF,YACrB,yBACA,CAAEG,OAAQ,CAAER,KAAMA,EAAMT,OAAQQ,CAAG,CAACC,EAAK,AAAC,CAAE,IAI5D,CACAF,EAAgBD,EAAU,4BAA6B,CAACA,CAAQ,CAAC,kBAAkB,CAAC,CAAE,SAAUY,CAAC,EAiB7F,GAAM,CAAEC,SAAAA,CAA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