@dpuse/dpuse-tool-d3-visualiser 0.0.49 → 0.0.52

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.
Files changed (48) hide show
  1. package/README.md +46 -47
  2. package/dist/{axis-DjmZ9QYe.js → axis-EpX3kBPs.js} +2 -8
  3. package/dist/{axis-DjmZ9QYe.js.map → axis-EpX3kBPs.js.map} +1 -1
  4. package/dist/{band-BFcwtSdG.js → band-p1VbTxZM.js} +2 -2
  5. package/dist/{band-BFcwtSdG.js.map → band-p1VbTxZM.js.map} +1 -1
  6. package/dist/{billboardJs-oaee80Fh.js → billboardJs-PR7IsnhE.js} +1970 -1666
  7. package/dist/billboardJs-PR7IsnhE.js.map +1 -0
  8. package/dist/{chordDiagram-CTDXv74T.js → chordDiagram-B1_nfC1m.js} +1031 -1023
  9. package/dist/chordDiagram-B1_nfC1m.js.map +1 -0
  10. package/dist/{d3BarChart-BQCPo1ub.js → d3BarChart-BC05DvRv.js} +7 -7
  11. package/dist/{d3BarChart-BQCPo1ub.js.map → d3BarChart-BC05DvRv.js.map} +1 -1
  12. package/dist/dpuse-tool-d3-visualiser.css +1 -1
  13. package/dist/dpuse-tool-d3-visualiser.es.js +7 -7
  14. package/dist/{drag-DfL4uwqz.js → drag-Ieen6R0z.js} +4 -8
  15. package/dist/{drag-DfL4uwqz.js.map → drag-Ieen6R0z.js.map} +1 -1
  16. package/dist/{erdDiagram-C_Hobpls.js → erdDiagram-CtPeCq0f.js} +6 -12
  17. package/dist/{erdDiagram-C_Hobpls.js.map → erdDiagram-CtPeCq0f.js.map} +1 -1
  18. package/dist/{linear-C-jur735.js → linear-q6e-7JBm.js} +113 -167
  19. package/dist/linear-q6e-7JBm.js.map +1 -0
  20. package/dist/{networkDiagram-CcQxxJMB.js → networkDiagram-DZwLfY_R.js} +3 -3
  21. package/dist/{networkDiagram-CcQxxJMB.js.map → networkDiagram-DZwLfY_R.js.map} +1 -1
  22. package/dist/{observablePlot-BE2I-5e2.js → observablePlot-CGF3S2mL.js} +1270 -1270
  23. package/dist/{observablePlot-BE2I-5e2.js.map → observablePlot-CGF3S2mL.js.map} +1 -1
  24. package/dist/ordinal-BtWaYSDN.js +81 -0
  25. package/dist/ordinal-BtWaYSDN.js.map +1 -0
  26. package/dist/pow-Bp6eSqVs.js +76 -0
  27. package/dist/{pow-CxQV96gC.js.map → pow-Bp6eSqVs.js.map} +1 -1
  28. package/dist/{src-WDualLFV.js → src-Clugeype.js} +1 -1
  29. package/dist/{src-WDualLFV.js.map → src-Clugeype.js.map} +1 -1
  30. package/dist/{src-yL3ZdoR1.js → src-kLpf-6r0.js} +1 -1
  31. package/dist/{src-yL3ZdoR1.js.map → src-kLpf-6r0.js.map} +1 -1
  32. package/dist/{string-CnCj7THX.js → string-BOhFwaZD.js} +1 -2
  33. package/dist/{string-CnCj7THX.js.map → string-BOhFwaZD.js.map} +1 -1
  34. package/dist/tanStackCharts-D-ip-ZV-.js +4103 -0
  35. package/dist/tanStackCharts-D-ip-ZV-.js.map +1 -0
  36. package/dist/types/eslint.config.d.ts +1 -1
  37. package/dist/{src-Dl4_vNYa.js → utcTime-DLfrQXna.js} +432 -432
  38. package/dist/utcTime-DLfrQXna.js.map +1 -0
  39. package/package.json +32 -22
  40. package/dist/billboardJs-oaee80Fh.js.map +0 -1
  41. package/dist/chordDiagram-CTDXv74T.js.map +0 -1
  42. package/dist/linear-C-jur735.js.map +0 -1
  43. package/dist/ordinal-CDNZetSD.js +0 -28
  44. package/dist/ordinal-CDNZetSD.js.map +0 -1
  45. package/dist/pow-CxQV96gC.js +0 -84
  46. package/dist/src-Dl4_vNYa.js.map +0 -1
  47. package/dist/tanStackCharts-CqP0qIAr.js +0 -3492
  48. package/dist/tanStackCharts-CqP0qIAr.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"billboardJs-PR7IsnhE.js","names":["getMinMax","pointer","color_default","legend_default","title_default","tooltip_default","data_default","interaction_default","data_default","color_default","interaction_default","legend_default","title_default","tooltip_default","setTimeout","clearTimeout","csv","tsv","data_default","select","load_default","select","drag","select","color_default","getMinMax","legend_default","select","namespaces","scaleLinear","scaleSymlog","scaleLog","scaleTime","scaleUtc","select","select","tooltip_default","select","curveBasis","curveBasisClosed","curveBasisOpen","curveBundle","curveCardinal","curveCardinalClosed","curveCardinalOpen","curveCatmullRom","curveCatmullRomClosed","curveCatmullRomOpen","curveMonotoneX","curveMonotoneY","curveNatural","curveLinearClosed","curveLinear","curveStep","curveStepAfter","curveStepBefore","select","select","data_default","load_default","color_default","legend_default","tooltip_default","select","namespaces","select","point_default","axis_default","x_default","getBaseAxisId","select","axis_default","axis_default","x_default","axis_default$2","bar_default","select","bar_default","point_default","bar_default$1","point_default$1","grid","grid_default","select","grid_default","selectAll","grid_default","grid_default$2"],"sources":["../node_modules/billboard.js/dist-esm/module/browser.js","../node_modules/billboard.js/dist-esm/module/util/type-checks.js","../node_modules/billboard.js/dist-esm/module/sanitize.js","../node_modules/billboard.js/dist-esm/module/util/object.js","../node_modules/billboard.js/dist-esm/config/const.js","../node_modules/billboard.js/dist-esm/module/error.js","../node_modules/d3-selection/src/selectAll.js","../node_modules/billboard.js/dist-esm/module/util/dom.js","../node_modules/billboard.js/dist-esm/config/classes.js","../node_modules/billboard.js/dist-esm/config/Options/common/boost.js","../node_modules/billboard.js/dist-esm/config/Options/common/color.js","../node_modules/billboard.js/dist-esm/config/Options/common/legend.js","../node_modules/billboard.js/dist-esm/config/Options/common/main.js","../node_modules/billboard.js/dist-esm/config/Options/common/title.js","../node_modules/billboard.js/dist-esm/config/Options/common/tooltip.js","../node_modules/billboard.js/dist-esm/config/Options/data/data.js","../node_modules/billboard.js/dist-esm/config/Options/interaction/interaction.js","../node_modules/billboard.js/dist-esm/config/Options/Options.js","../node_modules/billboard.js/dist-esm/config/Store/Element.js","../node_modules/billboard.js/dist-esm/config/Store/State.js","../node_modules/billboard.js/dist-esm/config/Store/Store.js","../node_modules/billboard.js/dist-esm/module/Cache.js","../node_modules/billboard.js/dist-esm/module/generator.js","../node_modules/billboard.js/dist-esm/module/worker.js","../node_modules/billboard.js/dist-esm/module/dsv.js","../node_modules/billboard.js/dist-esm/ChartInternal/data/convert.helper.js","../node_modules/billboard.js/dist-esm/ChartInternal/data/convert.js","../node_modules/billboard.js/dist-esm/ChartInternal/data/data.js","../node_modules/billboard.js/dist-esm/ChartInternal/data/load.js","../node_modules/billboard.js/dist-esm/ChartInternal/interactions/interaction.js","../node_modules/billboard.js/dist-esm/ChartInternal/internals/category.js","../node_modules/billboard.js/dist-esm/ChartInternal/internals/class.js","../node_modules/billboard.js/dist-esm/ChartInternal/internals/color.js","../node_modules/billboard.js/dist-esm/module/util/brush.js","../node_modules/billboard.js/dist-esm/ChartInternal/internals/domain.js","../node_modules/billboard.js/dist-esm/ChartInternal/internals/format.js","../node_modules/billboard.js/dist-esm/ChartInternal/internals/legend.js","../node_modules/billboard.js/dist-esm/ChartInternal/internals/redraw.js","../node_modules/billboard.js/dist-esm/ChartInternal/internals/scale.js","../node_modules/billboard.js/dist-esm/ChartInternal/internals/size.js","../node_modules/billboard.js/dist-esm/ChartInternal/internals/style.js","../node_modules/billboard.js/dist-esm/ChartInternal/internals/text.util.js","../node_modules/billboard.js/dist-esm/ChartInternal/internals/text.js","../node_modules/billboard.js/dist-esm/ChartInternal/internals/title.js","../node_modules/billboard.js/dist-esm/ChartInternal/internals/tooltip.js","../node_modules/billboard.js/dist-esm/ChartInternal/internals/transform.js","../node_modules/billboard.js/dist-esm/ChartInternal/internals/type.js","../node_modules/billboard.js/dist-esm/ChartInternal/shape/shape.js","../node_modules/billboard.js/dist-esm/ChartInternal/ChartInternal.js","../node_modules/billboard.js/dist-esm/config/config.js","../node_modules/billboard.js/dist-esm/Chart/api/chart.js","../node_modules/billboard.js/dist-esm/Chart/api/color.js","../node_modules/billboard.js/dist-esm/Chart/api/data.js","../node_modules/billboard.js/dist-esm/Chart/api/focus.js","../node_modules/billboard.js/dist-esm/Chart/api/legend.js","../node_modules/billboard.js/dist-esm/Chart/api/load.js","../node_modules/billboard.js/dist-esm/Chart/api/show.js","../node_modules/billboard.js/dist-esm/Chart/api/tooltip.js","../node_modules/billboard.js/dist-esm/Chart/Chart.js","../node_modules/billboard.js/dist-esm/ChartInternal/shape/core/point.js","../node_modules/billboard.js/dist-esm/config/Options/common/point.js","../node_modules/billboard.js/dist-esm/Chart/api/axis.js","../node_modules/billboard.js/dist-esm/Chart/api/group.js","../node_modules/billboard.js/dist-esm/Chart/api/x.js","../node_modules/billboard.js/dist-esm/ChartInternal/Axis/AxisRendererHelper.js","../node_modules/billboard.js/dist-esm/ChartInternal/Axis/AxisRenderer.js","../node_modules/billboard.js/dist-esm/ChartInternal/Axis/Axis.js","../node_modules/billboard.js/dist-esm/ChartInternal/interactions/eventrect.js","../node_modules/billboard.js/dist-esm/ChartInternal/internals/clip.js","../node_modules/billboard.js/dist-esm/ChartInternal/internals/size.axis.js","../node_modules/billboard.js/dist-esm/config/Options/axis/x.js","../node_modules/billboard.js/dist-esm/config/Options/axis/y.js","../node_modules/billboard.js/dist-esm/config/Options/axis/y2.js","../node_modules/billboard.js/dist-esm/config/Options/axis/axis.js","../node_modules/billboard.js/dist-esm/config/Options/data/axis.js","../node_modules/billboard.js/dist-esm/config/resolver/axis.js","../node_modules/billboard.js/dist-esm/config/resolver/axis.core.js","../node_modules/billboard.js/dist-esm/config/resolver/shape/axis.helpers.js","../node_modules/billboard.js/dist-esm/ChartInternal/shape/core/barRadius.js","../node_modules/billboard.js/dist-esm/ChartInternal/shape/bar.js","../node_modules/billboard.js/dist-esm/config/Options/shape/bar.js","../node_modules/billboard.js/dist-esm/config/resolver/shape/bar.js","../node_modules/billboard.js/dist-esm/Chart/api/grid.js","../node_modules/billboard.js/dist-esm/ChartInternal/internals/grid.js","../node_modules/billboard.js/dist-esm/config/Options/common/grid.js","../node_modules/billboard.js/dist-esm/config/resolver/grid.js","../node_modules/billboard.js/dist-esm/core.js","../src/billboardJs.ts"],"sourcesContent":["/*!\n* Copyright (c) 2017 ~ present NAVER Corp.\r\n * billboard.js project is licensed under the MIT license\r\n * \r\n * billboard.js, JavaScript chart library\r\n * https://naver.github.io/billboard.js/\r\n * \r\n * @version 4.1.0\n*/\n//#region src/module/browser.ts\n/**\n* Copyright (c) 2017 ~ present NAVER Corp.\n* billboard.js project is licensed under the MIT license\n*/\n/**\n* Window object\n* @private\n*/\n/**\n* Get global object\n* @returns {object} window object\n* @private\n*/\nfunction getGlobal() {\n\treturn typeof globalThis === \"object\" && globalThis !== null && globalThis.Object === Object && globalThis || typeof self === \"object\" && self !== null && self.Object === Object && self || Function(\"return this\")();\n}\n/**\n* Get fallback object\n* @param {object} w global object\n* @returns {Array} fallback object array\n* @private\n*/\nfunction getFallback(w) {\n\tconst hasRAF = typeof w?.requestAnimationFrame === \"function\" && typeof w?.cancelAnimationFrame === \"function\";\n\tconst hasRIC = typeof w?.requestIdleCallback === \"function\" && typeof w?.cancelIdleCallback === \"function\";\n\tconst request = (cb) => setTimeout(cb, 1);\n\tconst cancel = (id) => clearTimeout(id);\n\treturn [\n\t\thasRAF ? w.requestAnimationFrame : request,\n\t\thasRAF ? w.cancelAnimationFrame : cancel,\n\t\thasRIC ? w.requestIdleCallback : request,\n\t\thasRIC ? w.cancelIdleCallback : cancel\n\t];\n}\nconst win = getGlobal();\nconst doc = win?.document;\nconst [requestAnimationFrame, cancelAnimationFrame, requestIdleCallback, cancelIdleCallback] = getFallback(win);\n//#endregion\nexport { cancelAnimationFrame, cancelIdleCallback, doc as document, getFallback, requestAnimationFrame, requestIdleCallback, win as window };\n","/*!\n* Copyright (c) 2017 ~ present NAVER Corp.\r\n * billboard.js project is licensed under the MIT license\r\n * \r\n * billboard.js, JavaScript chart library\r\n * https://naver.github.io/billboard.js/\r\n * \r\n * @version 4.1.0\n*/\n//#region src/module/util/type-checks.ts\n/**\n* Copyright (c) 2017 ~ present NAVER Corp.\n* billboard.js project is licensed under the MIT license\n* @ignore\n*/\nconst isValue = (v) => v || v === 0;\nconst isFunction = (v) => typeof v === \"function\";\nconst isString = (v) => typeof v === \"string\";\nconst isNumber = (v) => typeof v === \"number\";\nconst isUndefined = (v) => typeof v === \"undefined\";\nconst isDefined = (v) => typeof v !== \"undefined\";\nconst isBoolean = (v) => typeof v === \"boolean\";\nconst ceil10 = (v) => Math.ceil(v / 10) * 10;\nconst asHalfPixel = (n) => Math.ceil(n) + .5;\nconst diffDomain = (d) => d[1] - d[0];\nconst isObjectType = (v) => typeof v === \"object\";\nconst isEmptyObject = (obj) => {\n\tfor (const x in obj) if (Object.prototype.hasOwnProperty.call(obj, x)) return false;\n\treturn true;\n};\nconst isEmpty = (o) => isUndefined(o) || o === null || isString(o) && o.length === 0 || isObjectType(o) && !(o instanceof Date) && isEmptyObject(o) || isNumber(o) && isNaN(o);\nconst notEmpty = (o) => !isEmpty(o);\n/**\n* Check if is array\n* @param {Array} arr Data to be checked\n* @returns {boolean}\n* @private\n*/\nconst isArray = (arr) => Array.isArray(arr);\n/**\n* Check if is object\n* @param {object} obj Data to be checked\n* @returns {boolean}\n* @private\n*/\nconst isObject = (obj) => obj && !obj?.nodeType && isObjectType(obj) && !isArray(obj);\n//#endregion\nexport { asHalfPixel, ceil10, diffDomain, isArray, isBoolean, isDefined, isEmpty, isEmptyObject, isFunction, isNumber, isObject, isObjectType, isString, isUndefined, isValue, notEmpty };\n","/*!\n* Copyright (c) 2017 ~ present NAVER Corp.\r\n * billboard.js project is licensed under the MIT license\r\n * \r\n * billboard.js, JavaScript chart library\r\n * https://naver.github.io/billboard.js/\r\n * \r\n * @version 4.1.0\n*/\n//#region src/module/sanitize.ts\n/**\n* Copyright (c) 2017 ~ present NAVER Corp.\n* billboard.js project is licensed under the MIT license\n* @ignore\n*/\n/**\n* HTML/SVG Sanitization module\n* Pure whitelist approach - only explicitly allowed tags, attributes, and protocols pass through\n*/\nconst ALLOWED_TAGS = /* @__PURE__ */ new Set([\n\t\"span\",\n\t\"div\",\n\t\"p\",\n\t\"br\",\n\t\"b\",\n\t\"i\",\n\t\"em\",\n\t\"small\",\n\t\"strong\",\n\t\"mark\",\n\t\"u\",\n\t\"s\",\n\t\"sub\",\n\t\"sup\",\n\t\"h1\",\n\t\"h2\",\n\t\"h3\",\n\t\"h4\",\n\t\"h5\",\n\t\"h6\",\n\t\"ul\",\n\t\"ol\",\n\t\"li\",\n\t\"dl\",\n\t\"dt\",\n\t\"dd\",\n\t\"table\",\n\t\"thead\",\n\t\"tbody\",\n\t\"tfoot\",\n\t\"tr\",\n\t\"th\",\n\t\"td\",\n\t\"caption\",\n\t\"colgroup\",\n\t\"col\",\n\t\"hr\",\n\t\"pre\",\n\t\"code\",\n\t\"blockquote\",\n\t\"abbr\",\n\t\"ins\",\n\t\"del\",\n\t\"a\",\n\t\"img\",\n\t\"figure\",\n\t\"figcaption\",\n\t\"svg\",\n\t\"g\",\n\t\"path\",\n\t\"circle\",\n\t\"ellipse\",\n\t\"rect\",\n\t\"line\",\n\t\"polyline\",\n\t\"polygon\",\n\t\"text\",\n\t\"tspan\",\n\t\"textPath\",\n\t\"use\",\n\t\"defs\",\n\t\"symbol\",\n\t\"clipPath\",\n\t\"mask\",\n\t\"linearGradient\",\n\t\"radialGradient\",\n\t\"stop\",\n\t\"pattern\",\n\t\"marker\",\n\t\"title\",\n\t\"desc\"\n]);\nconst ALLOWED_ATTRS = /* @__PURE__ */ new Set([\n\t\"class\",\n\t\"id\",\n\t\"style\",\n\t\"title\",\n\t\"lang\",\n\t\"dir\",\n\t\"href\",\n\t\"src\",\n\t\"alt\",\n\t\"width\",\n\t\"height\",\n\t\"colspan\",\n\t\"rowspan\",\n\t\"scope\",\n\t\"headers\",\n\t\"d\",\n\t\"points\",\n\t\"x\",\n\t\"y\",\n\t\"x1\",\n\t\"x2\",\n\t\"y1\",\n\t\"y2\",\n\t\"cx\",\n\t\"cy\",\n\t\"r\",\n\t\"rx\",\n\t\"ry\",\n\t\"dx\",\n\t\"dy\",\n\t\"viewBox\",\n\t\"preserveAspectRatio\",\n\t\"transform\",\n\t\"fill\",\n\t\"fill-opacity\",\n\t\"fill-rule\",\n\t\"stroke\",\n\t\"stroke-width\",\n\t\"stroke-opacity\",\n\t\"stroke-linecap\",\n\t\"stroke-linejoin\",\n\t\"stroke-dasharray\",\n\t\"stroke-dashoffset\",\n\t\"opacity\",\n\t\"clip-path\",\n\t\"clip-rule\",\n\t\"mask\",\n\t\"font-family\",\n\t\"font-size\",\n\t\"font-weight\",\n\t\"font-style\",\n\t\"text-anchor\",\n\t\"dominant-baseline\",\n\t\"offset\",\n\t\"stop-color\",\n\t\"stop-opacity\",\n\t\"gradientUnits\",\n\t\"gradientTransform\",\n\t\"spreadMethod\",\n\t\"patternUnits\",\n\t\"patternTransform\",\n\t\"marker-start\",\n\t\"marker-mid\",\n\t\"marker-end\",\n\t\"markerWidth\",\n\t\"markerHeight\",\n\t\"refX\",\n\t\"refY\",\n\t\"xlink:href\"\n]);\nconst TAG_CASE_MAP = /* @__PURE__ */ new Map();\nALLOWED_TAGS.forEach((tag) => TAG_CASE_MAP.set(tag.toLowerCase(), tag));\nconst ATTR_CASE_MAP = /* @__PURE__ */ new Map();\nALLOWED_ATTRS.forEach((attr) => ATTR_CASE_MAP.set(attr.toLowerCase(), attr));\nconst ALLOWED_URI_PROTOCOLS = /* @__PURE__ */ new Set([\n\t\"http:\",\n\t\"https:\",\n\t\"mailto:\"\n]);\nconst URI_ATTRS = /* @__PURE__ */ new Set([\n\t\"href\",\n\t\"src\",\n\t\"xlink:href\"\n]);\nconst TAG_NAME_REGEX = /^<\\/?([a-zA-Z][a-zA-Z0-9]*)/;\nconst CLOSING_TAG_REGEX = /^<\\/([a-zA-Z][a-zA-Z0-9]*)\\s*>$/;\nconst OPENING_TAG_REGEX = /^<([a-zA-Z][a-zA-Z0-9]*)([\\s\\S]*?)(\\/?)>$/;\nconst ATTR_REGEX = /([a-zA-Z][\\w:-]*)\\s*(?:=\\s*(?:\"([^\"]*)\"|'([^']*)'|([^\\s>]+)))?/g;\nconst URL_IN_STYLE_REGEX = /url\\s*\\(\\s*[\"']?([^\"')]+)[\"']?\\s*\\)/gi;\nconst DANGEROUS_CSS_PATTERNS = [\n\t\"expression(\",\n\t\"behavior:\",\n\t\"binding:\",\n\t\"@import\",\n\t\"@charset\",\n\t\"-moz-binding:\"\n];\n/**\n* Decode HTML entities in a string\n* @param {string} str String with potential HTML entities\n* @returns {string} Decoded string\n* @private\n*/\nfunction decodeHTMLEntities(str) {\n\treturn str.replace(/&colon;/gi, \":\").replace(/&newline;/gi, \"\\n\").replace(/&tab;/gi, \"\t\").replace(/&nbsp;/gi, \" \").replace(/&lt;/gi, \"<\").replace(/&gt;/gi, \">\").replace(/&amp;/gi, \"&\").replace(/&quot;/gi, \"\\\"\").replace(/&apos;/gi, \"'\").replace(/&#(\\d+);?/gi, (_, code) => String.fromCharCode(parseInt(code, 10))).replace(/&#x([0-9a-f]+);?/gi, (_, code) => String.fromCharCode(parseInt(code, 16)));\n}\n/**\n* Check if a URI is safe (whitelist approach)\n* @param {string} uri URI to check\n* @returns {boolean} Whether the URI is safe\n* @private\n*/\nfunction isSafeURI(uri) {\n\tconst normalized = decodeHTMLEntities(uri).trim().replace(/[\\s\\u0000-\\u001f]/g, \"\").toLowerCase();\n\tif (!normalized || normalized.startsWith(\"#\")) return true;\n\tconst schemeMatch = normalized.match(/^[^/?#]*:/);\n\tif (schemeMatch) return ALLOWED_URI_PROTOCOLS.has(schemeMatch[0]);\n\treturn true;\n}\n/**\n* Check if a style value is safe (whitelist approach)\n* @param {string} style Style attribute value\n* @returns {string|null} Sanitized style or null if unsafe\n* @private\n*/\nfunction sanitizeStyleValue(style) {\n\tconst cleaned = decodeHTMLEntities(style).replace(/[\\u0000-\\u001f]/g, \"\");\n\tURL_IN_STYLE_REGEX.lastIndex = 0;\n\tlet match;\n\twhile ((match = URL_IN_STYLE_REGEX.exec(cleaned)) !== null) if (!isSafeURI(match[1])) return null;\n\tconst normalizedLower = cleaned.toLowerCase().replace(/\\s/g, \"\");\n\tfor (const pattern of DANGEROUS_CSS_PATTERNS) if (normalizedLower.includes(pattern)) return null;\n\treturn style;\n}\nconst ATTR_ENCODE_MAP = {\n\t\"\\\"\": \"&quot;\",\n\t\"'\": \"&#39;\",\n\t\"`\": \"&#96;\"\n};\nconst ATTR_ENCODE_REGEX = /[\"'`]/g;\n/**\n* Encode dangerous characters in attribute values to HTML entities\n* This prevents attribute injection attacks where quotes/backticks break out of the attribute context\n* @param {string} value Attribute value\n* @returns {string} Encoded value\n* @private\n*/\nfunction encodeAttrValue(value) {\n\treturn value.replace(ATTR_ENCODE_REGEX, (char) => ATTR_ENCODE_MAP[char]);\n}\n/**\n* Sanitize attribute value using whitelist approach\n* @param {string} name Attribute name\n* @param {string} value Attribute value\n* @param {boolean} wasUnquoted Whether the value was originally unquoted\n* @returns {string|null} Sanitized value if safe, null if should be removed\n* @private\n*/\nfunction sanitizeAttrValue(name, value, wasUnquoted = false) {\n\tif (URI_ATTRS.has(name)) {\n\t\tif (!isSafeURI(value)) return null;\n\t\treturn wasUnquoted ? encodeAttrValue(value) : value;\n\t}\n\tif (name === \"style\") {\n\t\tconst sanitizedStyle = sanitizeStyleValue(value);\n\t\tif (sanitizedStyle === null) return null;\n\t\treturn wasUnquoted ? encodeAttrValue(sanitizedStyle) : sanitizedStyle;\n\t}\n\tconst decoded = decodeHTMLEntities(value).toLowerCase().replace(/\\s/g, \"\");\n\tif (/\\bon\\w+=/.test(decoded)) return null;\n\treturn wasUnquoted ? encodeAttrValue(value) : value;\n}\n/**\n* Extract tag name from a tag string\n* Returns null if not a valid tag format\n* @param {string} tag Tag string starting with <\n* @returns {string|null} Lowercase tag name or null\n* @private\n*/\nfunction extractTagName(tag) {\n\tconst match = tag.match(TAG_NAME_REGEX);\n\treturn match ? match[1].toLowerCase() : null;\n}\n/**\n* Check if a tag is in the whitelist\n* @param {string} tag Tag string\n* @returns {boolean} Whether tag is allowed\n* @private\n*/\nfunction isAllowedTag(tag) {\n\tconst tagName = extractTagName(tag);\n\treturn tagName !== null && TAG_CASE_MAP.has(tagName);\n}\n/**\n* Sanitize a single HTML/SVG tag (only called for allowed tags)\n* @param {string} fullTag The full tag string including < and >\n* @returns {string} Sanitized tag\n* @private\n*/\nfunction sanitizeTag(fullTag) {\n\tconst closingMatch = fullTag.match(CLOSING_TAG_REGEX);\n\tif (closingMatch) {\n\t\tconst lowerName = closingMatch[1].toLowerCase();\n\t\treturn `</${TAG_CASE_MAP.get(lowerName) ?? lowerName}>`;\n\t}\n\tconst openingMatch = fullTag.match(OPENING_TAG_REGEX);\n\tif (!openingMatch) return \"\";\n\tconst [, tagName, attrString, selfClose] = openingMatch;\n\tconst lowerTagName = tagName.toLowerCase();\n\tconst canonicalTagName = TAG_CASE_MAP.get(lowerTagName) ?? lowerTagName;\n\tconst allowedAttrs = [];\n\tATTR_REGEX.lastIndex = 0;\n\tlet attrMatch;\n\twhile ((attrMatch = ATTR_REGEX.exec(attrString)) !== null) {\n\t\tconst lowerAttrName = attrMatch[1].toLowerCase();\n\t\tconst doubleQuotedValue = attrMatch[2];\n\t\tconst singleQuotedValue = attrMatch[3];\n\t\tconst unquotedValue = attrMatch[4];\n\t\tif (lowerAttrName.startsWith(\"on\")) continue;\n\t\tconst canonicalAttrName = ATTR_CASE_MAP.get(lowerAttrName) ?? lowerAttrName;\n\t\tlet attrValue;\n\t\tlet quoteChar;\n\t\tif (doubleQuotedValue !== void 0) {\n\t\t\tattrValue = doubleQuotedValue;\n\t\t\tquoteChar = \"\\\"\";\n\t\t} else if (singleQuotedValue !== void 0) {\n\t\t\tattrValue = singleQuotedValue;\n\t\t\tquoteChar = \"'\";\n\t\t} else if (unquotedValue !== void 0) {\n\t\t\tattrValue = unquotedValue;\n\t\t\tquoteChar = \"\\\"\";\n\t\t} else {\n\t\t\tif (ATTR_CASE_MAP.has(lowerAttrName)) allowedAttrs.push(canonicalAttrName);\n\t\t\tcontinue;\n\t\t}\n\t\tif (ATTR_CASE_MAP.has(lowerAttrName)) {\n\t\t\tconst sanitizedValue = sanitizeAttrValue(lowerAttrName, attrValue, unquotedValue !== void 0);\n\t\t\tif (sanitizedValue !== null) allowedAttrs.push(`${canonicalAttrName}=${quoteChar}${sanitizedValue}${quoteChar}`);\n\t\t}\n\t}\n\treturn `<${canonicalTagName}${allowedAttrs.length > 0 ? ` ${allowedAttrs.join(\" \")}` : \"\"}${selfClose ? \"/>\" : \">\"}`;\n}\n/**\n* Sanitize HTML string to prevent XSS attacks\n* Pure whitelist approach - allowed tags are sanitized, others are escaped\n* @param {string} str Target string value\n* @returns {string} Sanitized string with only allowed elements\n* @private\n*/\nfunction sanitize(str) {\n\tif (typeof str !== \"string\" || !str || str.indexOf(\"<\") === -1) return str;\n\treturn str.replace(/<\\/?[^>]*>|[^<>\\s]+>/g, (match) => {\n\t\tif (match.startsWith(\"<!--\")) return \"\";\n\t\tif (!match.startsWith(\"<\")) return match.slice(0, -1) + \"&gt;\";\n\t\tif (isAllowedTag(match)) return sanitizeTag(match);\n\t\treturn match.replace(/</g, \"&lt;\");\n\t});\n}\n//#endregion\nexport { sanitize };\n","/*!\n* Copyright (c) 2017 ~ present NAVER Corp.\r\n * billboard.js project is licensed under the MIT license\r\n * \r\n * billboard.js, JavaScript chart library\r\n * https://naver.github.io/billboard.js/\r\n * \r\n * @version 4.1.0\n*/\nimport { requestAnimationFrame } from \"../browser.js\";\nimport { isArray, isDefined, isFunction, isNumber, isObject, isString, notEmpty } from \"./type-checks.js\";\nimport { sanitize } from \"../sanitize.js\";\n//#region src/module/util/object.ts\n/**\n* Copyright (c) 2017 ~ present NAVER Corp.\n* billboard.js project is licensed under the MIT license\n* @ignore\n*/\n/**\n* Internal helper to iterate over array items and invoke a callback for each valid item\n* @param {Array} items Array to iterate\n* @param {function} callback Callback function (item, index) => void\n* @private\n*/\nfunction _forEachValidItem(items, callback) {\n\tfor (let i = 0; i < items.length; i++) {\n\t\tconst item = items[i];\n\t\tif (item !== null && isDefined(item)) callback(item, i);\n\t}\n}\n/**\n* Get specified key value from object\n* If default value is given, will return if given key value not found\n* @param {object} options Source object\n* @param {string} key Key value\n* @param {string|number|boolean|object|Array|function|null|undefined} defaultValue Default value\n* @returns {string|number|boolean|object|Array|function|null|undefined} Option value or default value\n* @private\n*/\nfunction getOption(options, key, defaultValue) {\n\treturn isDefined(options[key]) ? options[key] : defaultValue;\n}\n/**\n* Check if value exist in the given object\n* @param {object} dict Target object to be checked\n* @param {string|number|boolean|object|Array|function|null|undefined} value Value to be checked\n* @returns {boolean}\n* @private\n*/\nfunction hasValue(dict, value) {\n\tfor (const key in dict) if (dict[key] === value) return true;\n\treturn false;\n}\n/**\n* Call function with arguments\n* @param {function} fn Function to be called\n* @param {object|null|undefined} thisArg \"this\" value for fn\n* @param {...(string|number|boolean|object|Array|function|null|undefined)} args Arguments for fn\n* @returns {boolean} true: fn is function, false: fn is not function\n* @private\n*/\nfunction callFn(fn, thisArg, ...args) {\n\tconst isFn = isFunction(fn);\n\tisFn && fn.call(thisArg, ...args);\n\treturn isFn;\n}\n/**\n* Call function after all transitions ends\n* @param {d3.transition} transition Transition\n* @param {Fucntion} cb Callback function\n* @private\n*/\nfunction endall(transition, cb) {\n\tlet n = 0;\n\tconst end = function(...args) {\n\t\t!--n && cb.apply(this, args);\n\t};\n\tif (\"duration\" in transition) transition.each(() => ++n).on(\"end\", end);\n\telse {\n\t\t++n;\n\t\ttransition.call(end);\n\t}\n}\n/**\n* Return first letter capitalized\n* @param {string} str Target string\n* @returns {string} capitalized string\n* @private\n*/\nconst capitalize = (str) => str.charAt(0).toUpperCase() + str.slice(1);\n/**\n* Camelize from kebob style string\n* @param {string} str Target string\n* @param {string} separator Separator string\n* @returns {string} camelized string\n* @private\n*/\nfunction camelize(str, separator = \"-\") {\n\treturn str.split(separator).map((v, i) => i ? v.charAt(0).toUpperCase() + v.slice(1).toLowerCase() : v.toLowerCase()).join(\"\");\n}\n/**\n* Convert to array\n* @param {object} v Target to be converted\n* @returns {Array}\n* @private\n*/\nconst toArray = (v) => [].slice.call(v);\n/**\n* Deep copy object\n* @param {object} objectN Source object\n* @returns {object} Cloned object\n* @private\n*/\nfunction deepClone(...objectN) {\n\tconst clone = (v) => {\n\t\tif (isArray(v)) return v.map(clone);\n\t\telse if (isObject(v) && v.constructor) {\n\t\t\tconst r = new v.constructor();\n\t\t\tfor (const k in v) r[k] = clone(v[k]);\n\t\t\treturn r;\n\t\t}\n\t\treturn v;\n\t};\n\treturn objectN.map((v) => clone(v)).reduce((a, c) => ({\n\t\t...a,\n\t\t...c\n\t}));\n}\n/**\n* Extend target from source object\n* @param {object} target Target object\n* @param {object|Array} source Source object\n* @returns {object}\n* @private\n*/\nfunction extend(target = {}, source) {\n\tif (isArray(source)) source.forEach((v) => extend(target, v));\n\tfor (const p in source) {\n\t\tif (/^\\d+$/.test(p) || p in target) continue;\n\t\ttarget[p] = source[p];\n\t}\n\treturn target;\n}\n/**\n* Get unique value from array\n* @param {Array} data Source data\n* @returns {Array} Unique array value\n* @private\n*/\nfunction getUnique(data) {\n\tconst isDate = data[0] instanceof Date;\n\tconst d = Array.from(new Set(isDate ? data.map(Number) : data));\n\treturn isDate ? d.map((v) => new Date(v)) : d;\n}\n/**\n* Merge array\n* @param {Array} arr Source array\n* @returns {Array}\n* @private\n*/\nfunction mergeArray(arr) {\n\treturn arr && arr.length ? arr.reduce((p, c) => p.concat(c)) : [];\n}\n/**\n* Merge object returning new object\n* @param {object} target Target object\n* @param {object} objectN Source object\n* @returns {object} merged target object\n* @private\n*/\nfunction mergeObj(target, ...objectN) {\n\tif (!objectN.length || objectN.length === 1 && !objectN[0]) return target;\n\tconst source = objectN.shift();\n\tif (isObject(target) && isObject(source)) Object.keys(source).forEach((key) => {\n\t\tif (!/^(__proto__|constructor|prototype)$/i.test(key)) {\n\t\t\tconst value = source[key];\n\t\t\tif (value instanceof Date) target[key] = new Date(value.getTime());\n\t\t\telse if (isObject(value)) {\n\t\t\t\t!target[key] && (target[key] = {});\n\t\t\t\ttarget[key] = mergeObj(target[key], value);\n\t\t\t} else target[key] = isArray(value) ? value.concat() : value;\n\t\t}\n\t});\n\treturn mergeObj(target, ...objectN);\n}\n/**\n* Sort value\n* @param {Array} data value to be sorted\n* @param {boolean} isAsc true: asc, false: desc\n* @returns {number|string|Date} sorted date\n* @private\n*/\nfunction sortValue(data, isAsc = true) {\n\tlet fn;\n\tif (data[0] instanceof Date) fn = isAsc ? (a, b) => a - b : (a, b) => b - a;\n\telse if (isAsc && !data.every(isNaN)) fn = (a, b) => a - b;\n\telse if (!isAsc) fn = (a, b) => a > b && -1 || a < b && 1 || a === b && 0;\n\treturn data.concat().sort(fn);\n}\n/**\n* Get min/max value\n* @param {string} type 'min' or 'max'\n* @param {Array} data Array data value\n* @returns {number|Date|undefined}\n* @private\n*/\nfunction getMinMax(type, data) {\n\tlet res = data.filter((v) => notEmpty(v));\n\tif (res.length) {\n\t\tif (isNumber(res[0])) {\n\t\t\tlet result = type === \"min\" ? Infinity : -Infinity;\n\t\t\tfor (const v of res) if (type === \"min\" ? v < result : v > result) result = v;\n\t\t\tres = result;\n\t\t} else if (res[0] instanceof Date) res = sortValue(res, type === \"min\")[0];\n\t} else res = void 0;\n\treturn res;\n}\n/**\n* Get range\n* @param {number} start Start number\n* @param {number} end End number\n* @param {number} step Step number\n* @returns {Array}\n* @private\n*/\nconst getRange = (start, end, step = 1) => {\n\tconst res = [];\n\tconst n = Math.max(0, Math.ceil((end - start) / step)) | 0;\n\tfor (let i = 0; i < n; i++) res.push(start + i * step);\n\treturn res;\n};\nlet _transitionCounter = 0;\n/**\n* Return auto-incrementing counter value.\n* Transition names only need uniqueness, not cryptographic randomness.\n* @param {boolean} asStr Convert returned value as string\n* @returns {number|string}\n* @private\n*/\nfunction getRandom(asStr = true) {\n\tconst id = ++_transitionCounter;\n\treturn asStr ? String(id) : id;\n}\n/**\n* Find index based on binary search\n* @param {Array} arr Data array\n* @param {number} v Target number to find\n* @param {number} start Start index of data array\n* @param {number} end End index of data arr\n* @param {boolean} isRotated Weather is roted axis\n* @returns {number} Index number\n* @private\n*/\nfunction findIndex(arr, v, start, end, isRotated) {\n\tif (start > end) return -1;\n\tconst mid = Math.floor((start + end) / 2);\n\tlet { x, w = 0 } = arr[mid];\n\tif (isRotated) {\n\t\tx = arr[mid].y;\n\t\tw = arr[mid].h;\n\t}\n\tif (v >= x && v <= x + w) return mid;\n\treturn v < x ? findIndex(arr, v, start, mid - 1, isRotated) : findIndex(arr, v, mid + 1, end, isRotated);\n}\n/**\n* Process the template & return bound string\n* @param {string} tpl Template string\n* @param {object} data Data value to be replaced\n* @returns {string}\n* @private\n*/\nfunction tplProcess(tpl, data) {\n\treturn sanitize(tpl.replace(/\\{=([^}]+)\\}/g, (_, key) => data[key] ?? \"\"));\n}\n/**\n* Get parsed date value\n* (It must be called in 'ChartInternal' context)\n* @param {Date|string|number} date Value of date to be parsed\n* @returns {Date}\n* @private\n*/\nfunction parseDate(date) {\n\tlet parsedDate;\n\tif (date instanceof Date) parsedDate = date;\n\telse if (isString(date)) {\n\t\tconst { config, format } = this;\n\t\tparsedDate = format.dataTime(config.data_xFormat)(date) ?? new Date(date);\n\t} else if (isNumber(date) && !isNaN(date)) parsedDate = /* @__PURE__ */ new Date(+date);\n\tif (!parsedDate || isNaN(+parsedDate)) console && console.error && console.error(`Failed to parse x '${date}' to Date object`);\n\treturn parsedDate;\n}\n/**\n* Parse CSS shorthand values (padding, margin, border-radius, etc.)\n* @param {number|string|object} value Shorthand value(s)\n* @returns {object} Parsed object with top, right, bottom, left properties\n* @private\n*/\nfunction parseShorthand(value) {\n\tif (isObject(value) && !isString(value)) {\n\t\tconst obj = value;\n\t\treturn {\n\t\t\ttop: obj.top || 0,\n\t\t\tright: obj.right || 0,\n\t\t\tbottom: obj.bottom || 0,\n\t\t\tleft: obj.left || 0\n\t\t};\n\t}\n\tconst [a, b = a, c = a, d = b] = (isString(value) ? value.trim().split(/\\s+/) : [value]).map((v) => +v || 0);\n\treturn {\n\t\ttop: a,\n\t\tright: b,\n\t\tbottom: c,\n\t\tleft: d\n\t};\n}\n/**\n* Run function until given condition function return true\n* @param {function} fn Function to be executed when condition is true\n* @param {function(): boolean} conditionFn Condition function to check if condition is true\n* @private\n*/\nfunction runUntil(fn, conditionFn) {\n\tif (conditionFn() === false) requestAnimationFrame(() => runUntil(fn, conditionFn));\n\telse fn();\n}\n/**\n* Convert an array to a Set by applying a key extractor\n* @param {Array} items Array of items to convert to Set\n* @param {function} keyFn Function to extract key from each item (item, index) => key. Defaults to identity function\n* @returns {Set} Set with extracted keys\n* @private\n*/\nfunction toSet(items, keyFn = ((item) => item)) {\n\tconst set = /* @__PURE__ */ new Set();\n\t_forEachValidItem(items, (item, i) => {\n\t\tset.add(keyFn(item, i));\n\t});\n\treturn set;\n}\n/**\n* Convert an array to a Map by applying key and value extractors\n* @param {Array} items Array of items to convert to Map\n* @param {function} keyFn Function to extract key from each item (item, index) => key\n* @param {function} valueFn Function to extract value from each item (item, index) => value. Defaults to identity function\n* @returns {Map} Map with extracted keys and values\n* @private\n*/\nfunction toMap(items, keyFn, valueFn = ((item) => item)) {\n\tconst map = /* @__PURE__ */ new Map();\n\t_forEachValidItem(items, (item, i) => {\n\t\tmap.set(keyFn(item, i), valueFn(item, i));\n\t});\n\treturn map;\n}\n//#endregion\nexport { callFn, camelize, capitalize, deepClone, endall, extend, findIndex, getMinMax, getOption, getRandom, getRange, getUnique, hasValue, mergeArray, mergeObj, parseDate, parseShorthand, runUntil, sortValue, toArray, toMap, toSet, tplProcess };\n","/*!\n* Copyright (c) 2017 ~ present NAVER Corp.\r\n * billboard.js project is licensed under the MIT license\r\n * \r\n * billboard.js, JavaScript chart library\r\n * https://naver.github.io/billboard.js/\r\n * \r\n * @version 4.1.0\n*/\n//#region src/config/const.ts\n/**\n* Copyright (c) 2017 ~ present NAVER Corp.\n* billboard.js project is licensed under the MIT license\n*/\n/**\n* Chart type constant\n* @private\n*/\nconst TYPE = {\n\tAREA: \"area\",\n\tAREA_LINE_RANGE: \"area-line-range\",\n\tAREA_SPLINE: \"area-spline\",\n\tAREA_SPLINE_RANGE: \"area-spline-range\",\n\tAREA_STEP: \"area-step\",\n\tAREA_STEP_RANGE: \"area-step-range\",\n\tBAR: \"bar\",\n\tBUBBLE: \"bubble\",\n\tCANDLESTICK: \"candlestick\",\n\tDONUT: \"donut\",\n\tFUNNEL: \"funnel\",\n\tGAUGE: \"gauge\",\n\tLINE: \"line\",\n\tPIE: \"pie\",\n\tPOLAR: \"polar\",\n\tRADAR: \"radar\",\n\tSCATTER: \"scatter\",\n\tSPLINE: \"spline\",\n\tSTEP: \"step\",\n\tTREEMAP: \"treemap\"\n};\n/**\n* Optional API modules and their resolver module name.\n* Used by checkApiModuleImport() to surface a helpful error when a user calls\n* chart.export() / chart.flow() without importing the matching resolver.\n* @private\n*/\nconst API_MODULE_NEEDED = {\n\texport: \"exportApi\",\n\tflow: \"flow\",\n\txgrids: \"grid\",\n\tygrids: \"grid\",\n\tregions: \"regions\",\n\tcategory: \"category\",\n\tcategories: \"category\"\n};\n/**\n* Subchart brush handle path constants shared by SVG and canvas renderers.\n* @private\n*/\nconst SUBCHART_BRUSH_HANDLE_PATH = {\n\tx: {\n\t\tstart: \"M0 -8.5 A6 6 0 0 0 -6.5 -3.5 V2.5 A6 6 0 0 0 0 8.5 Z M-2 -3.5 V3.5 M-4 -3.5 V3.5z\",\n\t\tend: \"M0 -8.5 A6 6 0 0 1 6.5 -3.5 V2.5 A6 6 0 0 1 0 8.5 Z M2 -3.5 V3.5 M4 -3.5 V3.5z\"\n\t},\n\ty: {\n\t\tstart: \"M8.5 0 a6 6 0 0 0 -6 -6.5 H-2.5 a 6 6 0 0 0 -6 6.5 z m-5 -2 H-3.5 m7 -2 H-3.5z\",\n\t\tend: \"M8.5 0 a6 -6 0 0 1 -6 6.5 H-2.5 a 6 -6 0 0 1 -6 -6.5z m-5 2 H-3.5 m7 2 H-3.5z\"\n\t}\n};\n/**\n* Chart type module and its method from ChartInternal class, needed to be initialized.\n* @private\n*/\nconst TYPE_METHOD_NEEDED = {\n\tAREA: \"initArea\",\n\tAREA_LINE_RANGE: \"initArea\",\n\tAREA_SPLINE: \"initArea\",\n\tAREA_SPLINE_RANGE: \"initArea\",\n\tAREA_STEP: \"initArea\",\n\tAREA_STEP_RANGE: \"initArea\",\n\tBAR: \"initBar\",\n\tBUBBLE: \"initCircle\",\n\tCANDLESTICK: \"initCandlestick\",\n\tDONUT: \"initArc\",\n\tFUNNEL: \"initFunnel\",\n\tGAUGE: \"initArc\",\n\tLINE: \"initLine\",\n\tPIE: \"initArc\",\n\tPOLAR: \"initPolar\",\n\tRADAR: \"initCircle\",\n\tSCATTER: \"initCircle\",\n\tSPLINE: \"initLine\",\n\tSTEP: \"initLine\",\n\tTREEMAP: \"initTreemap\"\n};\n/**\n* chart types by category\n* @private\n*/\nconst TYPE_BY_CATEGORY = {\n\tArea: [\n\t\tTYPE.AREA,\n\t\tTYPE.AREA_SPLINE,\n\t\tTYPE.AREA_SPLINE_RANGE,\n\t\tTYPE.AREA_LINE_RANGE,\n\t\tTYPE.AREA_STEP,\n\t\tTYPE.AREA_STEP_RANGE\n\t],\n\tAreaRange: [\n\t\tTYPE.AREA_SPLINE_RANGE,\n\t\tTYPE.AREA_LINE_RANGE,\n\t\tTYPE.AREA_STEP_RANGE\n\t],\n\tArc: [\n\t\tTYPE.PIE,\n\t\tTYPE.DONUT,\n\t\tTYPE.GAUGE,\n\t\tTYPE.POLAR,\n\t\tTYPE.RADAR\n\t],\n\tLine: [\n\t\tTYPE.LINE,\n\t\tTYPE.SPLINE,\n\t\tTYPE.AREA,\n\t\tTYPE.AREA_SPLINE,\n\t\tTYPE.AREA_SPLINE_RANGE,\n\t\tTYPE.AREA_LINE_RANGE,\n\t\tTYPE.STEP,\n\t\tTYPE.AREA_STEP,\n\t\tTYPE.AREA_STEP_RANGE\n\t],\n\tStep: [\n\t\tTYPE.STEP,\n\t\tTYPE.AREA_STEP,\n\t\tTYPE.AREA_STEP_RANGE\n\t],\n\tSpline: [\n\t\tTYPE.SPLINE,\n\t\tTYPE.AREA_SPLINE,\n\t\tTYPE.AREA_SPLINE_RANGE\n\t]\n};\n//#endregion\nexport { API_MODULE_NEEDED, SUBCHART_BRUSH_HANDLE_PATH, TYPE, TYPE_BY_CATEGORY, TYPE_METHOD_NEEDED };\n","/*!\n* Copyright (c) 2017 ~ present NAVER Corp.\r\n * billboard.js project is licensed under the MIT license\r\n * \r\n * billboard.js, JavaScript chart library\r\n * https://naver.github.io/billboard.js/\r\n * \r\n * @version 4.1.0\n*/\nimport { API_MODULE_NEEDED, TYPE, TYPE_METHOD_NEEDED } from \"../config/const.js\";\nimport { window as win } from \"./browser.js\";\nimport { isEmpty } from \"./util/type-checks.js\";\nimport { camelize } from \"./util/object.js\";\n//#region src/module/error.ts\nconst MODULE_IMPORT_DOC = \"https://github.com/naver/billboard.js/blob/master/MODULE_IMPORTS.md\";\n/**\n* Check chart type module imports.\n* @param {ChartInternal} ctx Context\n* @private\n*/\nfunction checkModuleImport(ctx) {\n\tconst $$ = ctx;\n\tconst { config } = $$;\n\tlet type = \"\";\n\tif (isEmpty(config.data_type || config.data_types) && !$$[TYPE_METHOD_NEEDED.LINE]) type = \"line\";\n\telse for (const x in TYPE_METHOD_NEEDED) {\n\t\tconst t = TYPE[x];\n\t\tif ($$.hasType(t) && !$$[TYPE_METHOD_NEEDED[x]]) {\n\t\t\ttype = t;\n\t\t\tbreak;\n\t\t}\n\t}\n\ttype && logError(`Please, make sure if %c${camelize(type)}`, \"module has been imported and specified correctly.\", MODULE_IMPORT_DOC);\n}\n/**\n* Check optional API module import (e.g. export, flow).\n* Invoked by stubs on Chart.prototype when the corresponding resolver module\n* was not imported. Throws a helpful error pointing to the module the user\n* needs to import.\n* @param {string} apiName API name (key of API_MODULE_NEEDED)\n* @private\n*/\nfunction checkApiModuleImport(apiName) {\n\tconst moduleName = API_MODULE_NEEDED[apiName];\n\tmoduleName && logError(`Please, make sure if %c${moduleName}`, \"module has been imported and specified correctly.\", MODULE_IMPORT_DOC);\n}\n/**\n* Log error and throw error\n* @param {string} head Message header\n* @param {string} tail Message tail\n* @param {string} info Info message\n* @private\n*/\nfunction logError(head, tail, info) {\n\tconst prefix = \"[billboard.js]\";\n\tif (win.console?.error) {\n\t\tconst tailMsg = tail ? [\"background:red;color:white;display:block;font-size:15px\", tail] : [];\n\t\tconsole.error(`❌ ${prefix} ${head}`, \"background:red;color:white;display:block;font-size:15px\", ...tailMsg);\n\t\tinfo && console.info(\"%cℹ️\", \"font-size:15px\", info);\n\t}\n\tthrow Error(`${prefix} ${head.replace(/\\%c([a-z-]+)/i, \"'$1' \")} ${tail ?? \"\"}`);\n}\n//#endregion\nexport { checkApiModuleImport, checkModuleImport, logError };\n","import array from \"./array.js\";\nimport {Selection, root} from \"./selection/index.js\";\n\nexport default function(selector) {\n return typeof selector === \"string\"\n ? new Selection([document.querySelectorAll(selector)], [document.documentElement])\n : new Selection([array(selector)], root);\n}\n","/*!\n* Copyright (c) 2017 ~ present NAVER Corp.\r\n * billboard.js project is licensed under the MIT license\r\n * \r\n * billboard.js, JavaScript chart library\r\n * https://naver.github.io/billboard.js/\r\n * \r\n * @version 4.1.0\n*/\nimport { document as doc, window as win } from \"../browser.js\";\nimport { isString } from \"./type-checks.js\";\nimport { mergeObj, toArray } from \"./object.js\";\nimport { pointer } from \"d3-selection\";\n//#region src/module/util/dom.ts\n/**\n* Copyright (c) 2017 ~ present NAVER Corp.\n* billboard.js project is licensed under the MIT license\n* @ignore\n*/\nconst RE_CSS_BB = /\\s?(bb-)/g;\nconst RE_CSS_DOTS = /\\.+/g;\n/**\n* Convert a CSS selector string to dot-notation class selector\n* @param {string} s Selector string\n* @returns {string}\n* @private\n*/\nfunction getCssSelector(s) {\n\treturn s.replace(RE_CSS_BB, \".$1\").replace(RE_CSS_DOTS, \".\");\n}\n/**\n* Get boundingClientRect or BBox with caching.\n* Internal helper for getBoundingRect() and getBBox()\n* @param {boolean} relativeViewport Relative to viewport - true: will use .getBoundingClientRect(), false: will use .getBBox()\n* @param {SVGElement} node Target element\n* @param {boolean} forceEval Force evaluation\n* @returns {object}\n* @private\n*/\nfunction _getRect(relativeViewport, node, forceEval = false) {\n\tconst _ = (n) => n[relativeViewport ? \"getBoundingClientRect\" : \"getBBox\"]();\n\tconst cacheKey = relativeViewport ? \"rectClient\" : \"rectBBox\";\n\tif (forceEval) return _(node);\n\telse return !(cacheKey in node) || node.hasAttribute(\"width\") && node[cacheKey].width !== +(node.getAttribute(\"width\") || 0) ? node[cacheKey] = _(node) : node[cacheKey];\n}\n/**\n* Set text value. If there're multiline add nodes.\n* @param {d3Selection} node Text node\n* @param {string} text Text value string\n* @param {Array} dy dy value for multilined text\n* @param {boolean} toMiddle To be alingned vertically middle\n* @private\n*/\nfunction setTextValue(node, text, dy = [-1, 1], toMiddle = false) {\n\tif (!node || !isString(text)) return;\n\tif (text.indexOf(\"\\n\") === -1) node.text(text);\n\telse {\n\t\tconst diff = [node.text(), text].map((v) => v.replace(/[\\s\\n]/g, \"\"));\n\t\tif (diff[0] !== diff[1]) {\n\t\t\tconst multiline = text.split(\"\\n\");\n\t\t\tconst len = toMiddle ? multiline.length - 1 : 1;\n\t\t\tnode.html(\"\");\n\t\t\tmultiline.forEach((v, i) => {\n\t\t\t\tnode.append(\"tspan\").attr(\"x\", 0).attr(\"dy\", `${i === 0 ? dy[0] * len : dy[1]}em`).text(v);\n\t\t\t});\n\t\t}\n\t}\n}\n/**\n* Substitution of SVGPathSeg API polyfill\n* @param {SVGGraphicsElement} path Target svg element\n* @returns {Array}\n* @private\n*/\nfunction getRectSegList(path) {\n\tconst { x, y, width, height } = getBBox(path, true);\n\treturn [\n\t\t{\n\t\t\tx,\n\t\t\ty: y + height\n\t\t},\n\t\t{\n\t\t\tx,\n\t\t\ty\n\t\t},\n\t\t{\n\t\t\tx: x + width,\n\t\t\ty\n\t\t},\n\t\t{\n\t\t\tx: x + width,\n\t\t\ty: y + height\n\t\t}\n\t];\n}\n/**\n* Get svg bounding path box dimension\n* @param {SVGGraphicsElement} path Target svg element\n* @returns {object}\n* @private\n*/\nfunction getPathBox(path) {\n\tconst { width, height } = getBoundingRect(path);\n\tconst items = getRectSegList(path);\n\treturn {\n\t\tx: items[0].x,\n\t\ty: Math.min(items[0].y, items[1].y),\n\t\twidth,\n\t\theight\n\t};\n}\n/**\n* Get event's current position coordinates\n* @param {object} event Event object\n* @param {SVGElement|HTMLElement} element Target element\n* @returns {Array} [x, y] Coordinates x, y array\n* @private\n*/\nfunction getPointer(event, element) {\n\tconst touches = event && (event.touches || event.sourceEvent && event.sourceEvent.touches)?.[0];\n\tlet pointer$1 = [0, 0];\n\ttry {\n\t\tpointer$1 = pointer(touches || event, element);\n\t} catch {}\n\treturn pointer$1.map((v) => isNaN(v) ? 0 : v);\n}\n/**\n* Get boundingClientRect.\n* @param {SVGElement} node Target element\n* @param {boolean} forceEval Force evaluation\n* @returns {object}\n* @private\n*/\nfunction getBoundingRect(node, forceEval = false) {\n\treturn _getRect(true, node, forceEval);\n}\n/**\n* Get BBox.\n* @param {SVGElement} node Target element\n* @param {boolean} forceEval Force evaluation\n* @returns {object}\n* @private\n*/\nfunction getBBox(node, forceEval = false) {\n\treturn _getRect(false, node, forceEval);\n}\n/**\n* Add CSS rules\n* @param {object} style Style object\n* @param {string} selector Selector string\n* @param {Array} prop Prps arrary\n* @returns {number} Newely added rule index\n* @private\n*/\nfunction addCssRules(style, selector, prop) {\n\tconst { rootSelector = \"\", sheet } = style;\n\tconst rule = `${rootSelector} ${getCssSelector(selector)} {${prop.join(\";\")}}`;\n\treturn sheet[sheet.insertRule ? \"insertRule\" : \"addRule\"](rule, sheet.cssRules.length);\n}\n/**\n* Get css rules for specified stylesheets\n* @param {Array} styleSheets The stylesheets to get the rules from\n* @returns {Array}\n* @private\n*/\nfunction getCssRules(styleSheets) {\n\tlet rules = [];\n\tstyleSheets.forEach((sheet) => {\n\t\ttry {\n\t\t\tif (sheet.cssRules && sheet.cssRules.length) rules = rules.concat(toArray(sheet.cssRules));\n\t\t} catch (e) {\n\t\t\twin.console?.warn(`Error while reading rules from ${sheet.href}: ${String(e)}`);\n\t\t}\n\t});\n\treturn rules;\n}\n/**\n* Get current window and container scroll position\n* @param {HTMLElement} node Target element\n* @returns {object} window scroll position\n* @private\n*/\nfunction getScrollPosition(node) {\n\treturn {\n\t\tx: (win.pageXOffset ?? win.scrollX ?? 0) + (node.scrollLeft ?? 0),\n\t\ty: (win.pageYOffset ?? win.scrollY ?? 0) + (node.scrollTop ?? 0)\n\t};\n}\n/**\n* Get translation string from screen <--> svg point\n* @param {SVGGraphicsElement} node graphics element\n* @param {number} x target x point\n* @param {number} y target y point\n* @param {boolean} inverse inverse flag\n* @returns {object}\n*/\nfunction getTransformCTM(node, x = 0, y = 0, inverse = true) {\n\tconst point = new DOMPoint(x, y);\n\tconst screen = node.getScreenCTM();\n\tconst res = point.matrixTransform(inverse ? screen?.inverse() : screen);\n\tif (inverse === false) {\n\t\tconst rect = getBoundingRect(node);\n\t\tres.x -= rect.x;\n\t\tres.y -= rect.y;\n\t}\n\treturn res;\n}\n/**\n* Gets the SVGMatrix of an SVGGElement\n* @param {SVGElement} node Node element\n* @returns {SVGMatrix} matrix\n* @private\n*/\nfunction getTranslation(node) {\n\tconst transform = node ? node.transform : null;\n\tconst baseVal = transform && transform.baseVal;\n\treturn baseVal && baseVal.numberOfItems ? baseVal.getItem(0).matrix : {\n\t\ta: 0,\n\t\tb: 0,\n\t\tc: 0,\n\t\td: 0,\n\t\te: 0,\n\t\tf: 0\n\t};\n}\n/**\n* Get position value from element's attribute or transform\n* @param {SVGElement} element SVG element\n* @param {string} type Coordinate type (\"x\" or \"y\")\n* @returns {number} Position value\n* @private\n*/\nfunction getElementPos(element, type) {\n\tconst attr = element?.getAttribute?.(type);\n\tif (attr) return parseFloat(attr);\n\tconst matrix = getTranslation(element);\n\treturn type === \"x\" ? matrix.e : matrix.f;\n}\n/**\n* Check if svg element has viewBox attribute\n* @param {d3Selection} svg Target svg selection\n* @returns {boolean}\n*/\nfunction hasViewBox(svg) {\n\tconst attr = svg.attr(\"viewBox\");\n\treturn attr ? attr.trim().split(/[\\s,]+/).length === 4 : false;\n}\n/**\n* Determine if given node has the specified style\n* @param {d3Selection|SVGElement} node Target node\n* @param {object} condition Conditional style props object\n* @param {boolean} all If true, all condition should be matched\n* @returns {boolean}\n*/\nfunction hasStyle(node, condition, all = false) {\n\tconst isD3Node = !!node.node;\n\tlet has = false;\n\tfor (const [key, value] of Object.entries(condition)) {\n\t\thas = isD3Node ? node.style(key) === value : node.style[key] === value;\n\t\tif (all ? !has : has) break;\n\t}\n\treturn has;\n}\n/**\n* Return if the current doc is visible or not\n* @returns {boolean}\n* @private\n*/\nfunction isTabVisible() {\n\treturn doc?.hidden === false || doc?.visibilityState === \"visible\";\n}\n/**\n* Get the current input type\n* @param {boolean} mouse Config value: interaction.inputType.mouse\n* @param {boolean} touch Config value: interaction.inputType.touch\n* @returns {string} \"mouse\" | \"touch\" | null\n* @private\n*/\nfunction convertInputType(mouse, touch) {\n\tconst { DocumentTouch, matchMedia, navigator } = win;\n\tconst hasPointerCoarse = matchMedia?.(\"(pointer:coarse)\").matches;\n\tlet hasTouch = false;\n\tif (touch) {\n\t\tif (navigator && \"maxTouchPoints\" in navigator) hasTouch = navigator.maxTouchPoints > 0;\n\t\telse if (\"ontouchmove\" in win || DocumentTouch && doc instanceof DocumentTouch) hasTouch = true;\n\t\telse if (hasPointerCoarse) hasTouch = true;\n\t\telse {\n\t\t\tconst UA = navigator.userAgent;\n\t\t\thasTouch = /\\b(BlackBerry|webOS|iPhone|IEMobile)\\b/i.test(UA) || /\\b(Android|Windows Phone|iPad|iPod)\\b/i.test(UA);\n\t\t}\n\t}\n\treturn mouse && !hasPointerCoarse && matchMedia?.(\"(pointer:fine)\").matches && \"mouse\" || hasTouch && \"touch\" || \"mouse\";\n}\n/**\n* Schedule a RAF update to batch multiple redraw requests\n* Manages a RAF state object to intelligently batch rapid updates while ensuring\n* immediate execution for the first call (for test compatibility)\n* @param {object} rafState RAF state object with pendingRaf property\n* @param {number|null} rafState.pendingRaf ID of pending RAF or null\n* @param {function} callback Function to execute in RAF\n* @returns {void}\n* @private\n*/\nfunction scheduleRAFUpdate(rafState, callback) {\n\tif (rafState.pendingRaf !== null) {\n\t\twin.cancelAnimationFrame(rafState.pendingRaf);\n\t\trafState.pendingRaf = win.requestAnimationFrame(() => {\n\t\t\trafState.pendingRaf = null;\n\t\t\tcallback();\n\t\t});\n\t} else {\n\t\trafState.pendingRaf = win.requestAnimationFrame(() => {\n\t\t\trafState.pendingRaf = null;\n\t\t});\n\t\tcallback();\n\t}\n}\nconst emulateEvent = {\n\tmouse: (() => {\n\t\tconst getParams = () => ({\n\t\t\tbubbles: false,\n\t\t\tcancelable: false,\n\t\t\tscreenX: 0,\n\t\t\tscreenY: 0,\n\t\t\tclientX: 0,\n\t\t\tclientY: 0\n\t\t});\n\t\ttry {\n\t\t\tnew MouseEvent(\"t\");\n\t\t\treturn (el, eventType, params = getParams()) => {\n\t\t\t\tel.dispatchEvent(new MouseEvent(eventType, params));\n\t\t\t};\n\t\t} catch {\n\t\t\treturn (el, eventType, params = getParams()) => {\n\t\t\t\tconst mouseEvent = doc.createEvent(\"MouseEvent\");\n\t\t\t\tmouseEvent.initMouseEvent(eventType, params.bubbles, params.cancelable, win, 0, params.screenX, params.screenY, params.clientX, params.clientY, false, false, false, false, 0, null);\n\t\t\t\tel.dispatchEvent(mouseEvent);\n\t\t\t};\n\t\t}\n\t})(),\n\ttouch: (el, eventType, params) => {\n\t\tconst touchObj = new Touch(mergeObj({\n\t\t\tidentifier: Date.now(),\n\t\t\ttarget: el,\n\t\t\tradiusX: 2.5,\n\t\t\tradiusY: 2.5,\n\t\t\trotationAngle: 10,\n\t\t\tforce: .5\n\t\t}, params));\n\t\tel.dispatchEvent(new TouchEvent(eventType, {\n\t\t\tcancelable: true,\n\t\t\tbubbles: true,\n\t\t\tshiftKey: true,\n\t\t\ttouches: [touchObj],\n\t\t\ttargetTouches: [],\n\t\t\tchangedTouches: [touchObj]\n\t\t}));\n\t}\n};\n//#endregion\nexport { addCssRules, convertInputType, emulateEvent, getBBox, getBoundingRect, getCssRules, getElementPos, getPathBox, getPointer, getRectSegList, getScrollPosition, getTransformCTM, getTranslation, hasStyle, hasViewBox, isTabVisible, scheduleRAFUpdate, setTextValue };\n","/*!\n* Copyright (c) 2017 ~ present NAVER Corp.\r\n * billboard.js project is licensed under the MIT license\r\n * \r\n * billboard.js, JavaScript chart library\r\n * https://naver.github.io/billboard.js/\r\n * \r\n * @version 4.1.0\n*/\n//#region src/config/classes.ts\n/**\n* Copyright (c) 2017 ~ present NAVER Corp.\n* billboard.js project is licensed under the MIT license\n*/\n/**\n* CSS class names definition\n* @private\n*/\nconst $COMMON = {\n\tbutton: \"bb-button\",\n\tchart: \"bb-chart\",\n\tempty: \"bb-empty\",\n\tmain: \"bb-main\",\n\ttarget: \"bb-target\",\n\tEXPANDED: \"_expanded_\",\n\tdummy: \"_dummy_\"\n};\nconst $ARC = {\n\tarc: \"bb-arc\",\n\tarcLabelLine: \"bb-arc-label-line\",\n\tarcLabelLineText: \"bb-arc-label-line-text\",\n\tarcRange: \"bb-arc-range\",\n\tarcs: \"bb-arcs\",\n\tchartArc: \"bb-chart-arc\",\n\tchartArcs: \"bb-chart-arcs\",\n\tchartArcsBackground: \"bb-chart-arcs-background\",\n\tchartArcsTitle: \"bb-chart-arcs-title\",\n\tneedle: \"bb-needle\"\n};\nconst $AREA = {\n\tarea: \"bb-area\",\n\tareas: \"bb-areas\"\n};\nconst $AXIS = {\n\taxis: \"bb-axis\",\n\taxisX: \"bb-axis-x\",\n\taxisXLabel: \"bb-axis-x-label\",\n\taxisY: \"bb-axis-y\",\n\taxisY2: \"bb-axis-y2\",\n\taxisY2Label: \"bb-axis-y2-label\",\n\taxisYLabel: \"bb-axis-y-label\",\n\taxisXTooltip: \"bb-axis-x-tooltip\",\n\taxisYTooltip: \"bb-axis-y-tooltip\",\n\taxisY2Tooltip: \"bb-axis-y2-tooltip\",\n\taxisTooltipX: \"bb-axis-tooltip-x\",\n\taxisTooltipY: \"bb-axis-tooltip-y\"\n};\nconst $BAR = {\n\tbar: \"bb-bar\",\n\tbars: \"bb-bars\",\n\tchartBar: \"bb-chart-bar\",\n\tchartBars: \"bb-chart-bars\",\n\tbarConnectLine: \"bb-bar-connectLine\"\n};\nconst $CANDLESTICK = {\n\tcandlestick: \"bb-candlestick\",\n\tcandlesticks: \"bb-candlesticks\",\n\tchartCandlestick: \"bb-chart-candlestick\",\n\tchartCandlesticks: \"bb-chart-candlesticks\",\n\tvalueDown: \"bb-value-down\",\n\tvalueUp: \"bb-value-up\"\n};\nconst $CIRCLE = {\n\tchartCircles: \"bb-chart-circles\",\n\tcircle: \"bb-circle\",\n\tcircles: \"bb-circles\"\n};\nconst $COLOR = {\n\tcolorPattern: \"bb-color-pattern\",\n\tcolorScale: \"bb-colorscale\"\n};\nconst $DRAG = {\n\tdragarea: \"bb-dragarea\",\n\tINCLUDED: \"_included_\"\n};\nconst $FUNNEL = {\n\tfunnel: \"bb-funnel\",\n\tchartFunnel: \"bb-chart-funnel\",\n\tchartFunnels: \"bb-chart-funnels\",\n\tfunnelBackground: \"bb-funnel-background\"\n};\nconst $GAUGE = {\n\tchartArcsGaugeMax: \"bb-chart-arcs-gauge-max\",\n\tchartArcsGaugeMin: \"bb-chart-arcs-gauge-min\",\n\tchartArcsGaugeUnit: \"bb-chart-arcs-gauge-unit\",\n\tchartArcsGaugeTitle: \"bb-chart-arcs-gauge-title\",\n\tgaugeValue: \"bb-gauge-value\"\n};\nconst $LEGEND = {\n\tlegend: \"bb-legend\",\n\tlegendBackground: \"bb-legend-background\",\n\tlegendItem: \"bb-legend-item\",\n\tlegendItemEvent: \"bb-legend-item-event\",\n\tlegendItemHidden: \"bb-legend-item-hidden\",\n\tlegendItemPoint: \"bb-legend-item-point\",\n\tlegendItemTile: \"bb-legend-item-tile\"\n};\nconst $LINE = {\n\tchartLine: \"bb-chart-line\",\n\tchartLines: \"bb-chart-lines\",\n\tline: \"bb-line\",\n\tlines: \"bb-lines\"\n};\nconst $EVENT = {\n\teventRect: \"bb-event-rect\",\n\teventRects: \"bb-event-rects\",\n\teventRectsMultiple: \"bb-event-rects-multiple\",\n\teventRectsSingle: \"bb-event-rects-single\"\n};\nconst $FOCUS = {\n\tfocused: \"bb-focused\",\n\tdefocused: \"bb-defocused\",\n\tlegendItemFocused: \"bb-legend-item-focused\",\n\txgridFocus: \"bb-xgrid-focus\",\n\txgridFocusContinuous: \"bb-xgrid-focus-continuous\",\n\tygridFocus: \"bb-ygrid-focus\"\n};\nconst $GRID = {\n\tgrid: \"bb-grid\",\n\tgridLines: \"bb-grid-lines\",\n\txgrid: \"bb-xgrid\",\n\txgridLine: \"bb-xgrid-line\",\n\txgridLines: \"bb-xgrid-lines\",\n\txgrids: \"bb-xgrids\",\n\tygrid: \"bb-ygrid\",\n\tygridLine: \"bb-ygrid-line\",\n\tygridLines: \"bb-ygrid-lines\",\n\tygrids: \"bb-ygrids\"\n};\nconst $LEVEL = {\n\tlevel: \"bb-level\",\n\tlevels: \"bb-levels\"\n};\nconst $RADAR = {\n\tchartRadar: \"bb-chart-radar\",\n\tchartRadars: \"bb-chart-radars\"\n};\nconst $REGION = {\n\tregion: \"bb-region\",\n\tregions: \"bb-regions\"\n};\nconst $SELECT = {\n\tselectedCircle: \"bb-selected-circle\",\n\tselectedCircles: \"bb-selected-circles\",\n\tSELECTED: \"_selected_\"\n};\nconst $SHAPE = {\n\tshape: \"bb-shape\",\n\tshapes: \"bb-shapes\"\n};\nconst $SUBCHART = {\n\tbrush: \"bb-brush\",\n\tsubchart: \"bb-subchart\"\n};\nconst $TEXT = {\n\tchartText: \"bb-chart-text\",\n\tchartTexts: \"bb-chart-texts\",\n\ttext: \"bb-text\",\n\ttexts: \"bb-texts\",\n\ttitle: \"bb-title\",\n\ttextBorderRect: \"bb-text-border\",\n\ttextLabelImage: \"bb-text-label-image\",\n\tTextOverlapping: \"text-overlapping\"\n};\nconst $TOOLTIP = {\n\ttooltip: \"bb-tooltip\",\n\ttooltipContainer: \"bb-tooltip-container\",\n\ttooltipName: \"bb-tooltip-name\"\n};\nconst $TREEMAP = {\n\ttreemap: \"bb-treemap\",\n\tchartTreemap: \"bb-chart-treemap\",\n\tchartTreemaps: \"bb-chart-treemaps\"\n};\nconst $ZOOM = {\n\tbuttonZoomReset: \"bb-zoom-reset\",\n\tzoomBrush: \"bb-zoom-brush\"\n};\nvar classes_default = {\n\t...$COMMON,\n\t...$ARC,\n\t...$AREA,\n\t...$AXIS,\n\t...$BAR,\n\t...$CANDLESTICK,\n\t...$CIRCLE,\n\t...$COLOR,\n\t...$DRAG,\n\t...$GAUGE,\n\t...$LEGEND,\n\t...$LINE,\n\t...$EVENT,\n\t...$FOCUS,\n\t...$FUNNEL,\n\t...$GRID,\n\t...$LEVEL,\n\t...$RADAR,\n\t...$REGION,\n\t...$SELECT,\n\t...$SHAPE,\n\t...$SUBCHART,\n\t...$TEXT,\n\t...$TOOLTIP,\n\t...$TREEMAP,\n\t...$ZOOM\n};\n//#endregion\nexport { $ARC, $AREA, $AXIS, $BAR, $CANDLESTICK, $CIRCLE, $COLOR, $COMMON, $DRAG, $EVENT, $FOCUS, $FUNNEL, $GAUGE, $GRID, $LEGEND, $LEVEL, $LINE, $RADAR, $REGION, $SELECT, $SHAPE, $SUBCHART, $TEXT, $TOOLTIP, $TREEMAP, $ZOOM, classes_default as default };\n","/*!\n* Copyright (c) 2017 ~ present NAVER Corp.\r\n * billboard.js project is licensed under the MIT license\r\n * \r\n * billboard.js, JavaScript chart library\r\n * https://naver.github.io/billboard.js/\r\n * \r\n * @version 4.1.0\n*/\n//#region src/config/Options/common/boost.ts\n/**\n* Copyright (c) 2017 ~ present NAVER Corp.\n* billboard.js project is licensed under the MIT license\n*/\n/**\n* boost config options\n*/\nvar boost_default = {\n\t/**\n\t* Set boost options\n\t* @name boost\n\t* @memberof Options\n\t* @type {object}\n\t* @property {object} boost boost object\n\t* @property {boolean} [boost.useCssRule=false] Avoid setting inline styles for each shape elements.\n\t* - **NOTE:**\n\t* - Will append &lt;style> to the head tag and will add shpes' CSS rules dynamically.\n\t* - For now, covers colors related properties (fill, stroke, etc.) only.\n\t* @property {boolean|string} [boost.useWorker=false] Use Web Worker as possible for processing.\n\t* - **Available values:**\n\t* - `false`: never offload.\n\t* - `true`: always offload when a Worker can be created.\n\t* - `\"auto\"`: offload only when the given data exceeds ~5,000 cells, since smaller\n\t* payloads lose more to structured cloning than they gain.\n\t* - **NOTE:**\n\t* - For now, only applies for data conversion at the initial time.\n\t* - As of Web Worker's async nature, handling chart instance synchronously is not recommended.\n\t* - When Worker isn't available, fails or times out, data conversion falls back to main thread.\n\t* - When given data is empty, useWorker will be ignored.\n\t* @property {string} [boost.workerUrl=undefined] Use a custom static worker script URL instead of an inline Blob worker.\n\t* - **NOTE:**\n\t* - **Requires `boost.useWorker` to be enabled** — this option only selects where the\n\t* worker source comes from, it does not turn offloading on by itself.\n\t* - Useful for strict CSP environments that disallow `blob:` workers. Without it under\n\t* such a policy, worker creation throws and each conversion waits out the 5s timeout\n\t* before falling back, so the chart still renders but the initial draw is delayed.\n\t* - Point it at `dist/billboard.worker.js`, shipped in the package, or any script\n\t* implementing the same protocol: receive `{id, op, args}` and post back\n\t* `{id, result}` or `{id, error}`. No `eval()` is involved.\n\t* - With a bundler, make sure the file is emitted as a **real asset**, not inlined:\n\t* it is ~1.5KB, and inlining turns it into a `data:` URI, which a strict CSP\n\t* blocks exactly like `blob:`. Copying it into the static/public directory is the\n\t* option that works everywhere.\n\t* - Any failure (load error, unknown op, timeout, result mismatch) falls back to the main thread.\n\t* @example\n\t* // offload data conversion on a Worker, using the inline Blob worker\n\t* boost: {\n\t* useCssRule: true,\n\t* useWorker: true\n\t* }\n\t* @example\n\t* // offload only past ~5,000 cells\n\t* boost: {\n\t* useWorker: \"auto\"\n\t* }\n\t* @example\n\t* // strict CSP: serve the shipped script and point at it.\n\t* // 'useWorker' still has to be on - 'workerUrl' alone offloads nothing.\n\t* boost: {\n\t* useWorker: true,\n\t* workerUrl: \"$YOUR_PATH/dist/billboard.worker.js\"\n\t* }\n\t* @example\n\t* // ESM: the file is reachable as a package subpath.\n\t* // Vite - '?url' resolves it, but assets under 4KB are inlined as a 'data:' URI,\n\t* // which a strict CSP rejects. Opt that one file out of inlining:\n\t* //\n\t* // // vite.config.js\n\t* // export default {\n\t* // build: {\n\t* // assetsInlineLimit: path => /billboard\\.worker\\.js$/.test(path) ? false : undefined\n\t* // }\n\t* // };\n\t* import bb, {bar} from \"billboard.js\";\n\t* import workerUrl from \"billboard.js/dist/billboard.worker.js?url\";\n\t*\n\t* bb.generate({\n\t* boost: {useWorker: true, workerUrl},\n\t* data: {columns: [[\"data1\", 30, 200, 100]], type: bar()}\n\t* });\n\t* @example\n\t* // ESM, bundler-agnostic: copy the file into the served static directory\n\t* // cp node_modules/billboard.js/dist/billboard.worker.js public/\n\t* bb.generate({\n\t* boost: {useWorker: true, workerUrl: \"/billboard.worker.js\"},\n\t* data: {columns: [[\"data1\", 30, 200, 100]]}\n\t* });\n\t*/\n\tboost_useCssRule: false,\n\tboost_useWorker: false,\n\tboost_workerUrl: void 0\n};\n//#endregion\nexport { boost_default as default };\n","/*!\n* Copyright (c) 2017 ~ present NAVER Corp.\r\n * billboard.js project is licensed under the MIT license\r\n * \r\n * billboard.js, JavaScript chart library\r\n * https://naver.github.io/billboard.js/\r\n * \r\n * @version 4.1.0\n*/\n//#region src/config/Options/common/color.ts\n/**\n* Copyright (c) 2017 ~ present NAVER Corp.\n* billboard.js project is licensed under the MIT license\n*/\n/**\n* color config options\n*/\nvar color_default = {\n\t/**\n\t* Set color of the data values\n\t* @name color\n\t* @memberof Options\n\t* @type {object}\n\t* @property {object} color color object\n\t* @property {string|object|function(DataItem): string} [color.onover] Set the color value for each data point when mouse/touch onover event occurs.\n\t* @property {Array|null} [color.pattern=[]] Set custom color pattern. Passing `null` will not set a color for these elements, which requires the usage of custom CSS-based theming to work.\n\t* @property {function(): Array.<SVGPatternElement>} [color.tiles] if defined, allows use svg's patterns to fill data area. It should return an array of [SVGPatternElement](https://developer.mozilla.org/en-US/docs/Web/API/SVGPatternElement).\n\t* - **NOTE:** The pattern element's id will be defined as `bb-colorize-pattern-$COLOR-VALUE`.<br>\n\t* ex. When color pattern value is `['red', '#fff']` and defined 2 patterns,then ids for pattern elements are:<br>\n\t* - `bb-colorize-pattern-red`\n\t* - `bb-colorize-pattern-fff`\n\t* @property {object} [color.threshold] color threshold for gauge and tooltip color\n\t* @property {string} [color.threshold.unit] If set to `value`, the threshold will be based on the data value. Otherwise it'll be based on equation of the `threshold.max` option value.\n\t* @property {Array} [color.threshold.values] Threshold values for each steps\n\t* @property {number} [color.threshold.max=100] The base value to determine threshold step value condition. When the given value is 15 and max 10, then the value for threshold is `15*100/10`.\n\t* @example\n\t* color: {\n\t* pattern: [\"#1f77b4\", \"#aec7e8\", ...],\n\t*\n\t* // Set colors' patterns\n\t* // it should return an array of SVGPatternElement\n\t* tiles: function() {\n\t* var pattern = document.createElementNS(\"http://www.w3.org/2000/svg\", \"pattern\");\n\t* var g = document.createElementNS(\"http://www.w3.org/2000/svg\", \"g\");\n\t* var circle1 = document.createElementNS(\"http://www.w3.org/2000/svg\", \"circle\");\n\t*\n\t* pattern.setAttribute(\"patternUnits\", \"userSpaceOnUse\");\n\t* pattern.setAttribute(\"width\", \"32\");\n\t* pattern.setAttribute(\"height\", \"32\");\n\t*\n\t* g.style.fill = \"#000\";\n\t* g.style.opacity = \"0.2\";\n\t*\n\t* circle1.setAttribute(\"cx\", \"3\");\n\t* circle1.setAttribute(\"cy\", \"3\");\n\t* circle1.setAttribute(\"r\", \"3\");\n\t*\n\t* g.appendChild(circle1);\n\t* pattern.appendChild(g);\n\t*\n\t* return [pattern];\n\t* },\n\t*\n\t* // for threshold usage, pattern values should be set for each steps\n\t* pattern: [\"grey\", \"green\", \"yellow\", \"orange\", \"red\"],\n\t* threshold: {\n\t* unit: \"value\",\n\t*\n\t* // when value is 20 => 'green', value is 40 => 'orange' will be set.\n\t* values: [10, 20, 30, 40, 50],\n\t*\n\t* // the equation for max:\n\t* // - unit == 'value': max => 30\n\t* // - unit != 'value': max => value*100/30\n\t* max: 30\n\t* },\n\t*\n\t* // set all data to 'red'\n\t* onover: \"red\",\n\t*\n\t* // set different color for data\n\t* onover: {\n\t* data1: \"red\",\n\t* data2: \"yellow\"\n\t* },\n\t*\n\t* // will pass data object to the callback\n\t* onover: function(d) {\n\t* return d.id === \"data1\" ? \"red\" : \"green\";\n\t* }\n\t* }\n\t*/\n\tcolor_pattern: [],\n\tcolor_tiles: void 0,\n\tcolor_threshold: {},\n\tcolor_onover: void 0\n};\n//#endregion\nexport { color_default as default };\n","/*!\n* Copyright (c) 2017 ~ present NAVER Corp.\r\n * billboard.js project is licensed under the MIT license\r\n * \r\n * billboard.js, JavaScript chart library\r\n * https://naver.github.io/billboard.js/\r\n * \r\n * @version 4.1.0\n*/\n//#region src/config/Options/common/legend.ts\n/**\n* Copyright (c) 2017 ~ present NAVER Corp.\n* billboard.js project is licensed under the MIT license\n*/\n/**\n* legend config options\n*/\nvar legend_default = {\n\t/**\n\t* Legend options\n\t* @name legend\n\t* @memberof Options\n\t* @type {object}\n\t* @property {object} legend Legend object\n\t* @property {boolean} [legend.show=true] Show or hide legend.\n\t* @property {boolean} [legend.hide=false] Hide legend\n\t* If true given, all legend will be hidden. If string or array given, only the legend that has the id will be hidden.\n\t* @property {string|HTMLElement} [legend.contents.bindto=undefined] Set CSS selector or element reference to bind legend items.\n\t* - **NOTE:** Should be used along with `legend.contents.template`.\n\t* @property {string|function} [legend.contents.template=\"<span style='color:#fff;padding:5px;background-color:{=COLOR}'>{=TITLE}</span>\"] Set item's template.<br>\n\t* - **NOTE:** Only common HTML tags are allowed to prevent XSS attacks. If creating charts from user input, it is recommended to sanitize input values to avoid potential vulnerabilities.\n\t* - If set `string` value, within template the 'color' and 'title' can be replaced using template-like syntax string:\n\t* - {=COLOR}: data color value\n\t* - {=TITLE}: data title value\n\t* - If set `function` value, will pass following arguments to the given function:\n\t* - title {string}: data's id value\n\t* - color {string}: color string\n\t* - data {Array}: data array\n\t* - **NOTE:** While basic XSS sanitization is applied, if you're allowing user-provided chart options in a service exposed to other users, you should implement additional security measures to prevent sophisticated XSS attacks.\n\t* @property {string} [legend.position=bottom] Change the position of legend.<br>\n\t* Available values are: `bottom`, `right` and `inset` are supported.\n\t* @property {object} [legend.inset={anchor: 'top-left',x: 10,y: 0,step: undefined}] Change inset legend attributes.<br>\n\t* This option accepts object that has the keys `anchor`, `x`, `y` and `step`.\n\t* - **anchor** decides the position of the legend:\n\t* - top-left\n\t* - top-right\n\t* - bottom-left\n\t* - bottom-right\n\t* - **x** and **y**:\n\t* - set the position of the legend based on the anchor.\n\t* - **step**:\n\t* - defines the max step the legend has (e.g. If 2 set and legend has 3 legend item, the legend 2 columns).\n\t* @property {boolean} [legend.equally=false] Set to all items have same width size.\n\t* @property {number} [legend.padding=0] Set padding value\n\t* @property {boolean} [legend.item.interaction=true] Set legend item interaction.\n\t* - **NOTE:**\n\t* - This setting will not have effect on `.toggle()` method.\n\t* - `legend.item.onXXX` listener options will work if set, regardless of this option value.\n\t* @property {boolean} [legend.item.interaction.dblclick=false] Set legend item to interact on double click.\n\t* - **NOTE:**\n\t* - Double clicking will make focused clicked dataseries only, hiding all others.\n\t* - for single click case, `click + altKey(Win)/optionKey(Mac OS)` to have same effect.\n\t* - To return initial state(which all dataseries are showing), double click current focused legend item again.\n\t* - for single click case, `click + altKey(Win)/optionKey(Mac OS)` to have same effect.\n\t* - In this case, default `click` interaction will be disabled.\n\t* @property {function} [legend.item.onclick=undefined] Set click event handler to the legend item.\n\t* - **NOTE:**\n\t* - When set, default `click` interaction will be disabled.\n\t* - When `interaction.dblclick=true` is set, will be called on double click.\n\t* @property {function} [legend.item.onover=undefined] Set mouse/touch over event handler to the legend item.\n\t* - **NOTE:** When set, default `mouseover` interaction will be disabled.\n\t* @property {function} [legend.item.onout=undefined] Set mouse/touch out event handler to the legend item.\n\t* - **NOTE:** When set, default `mouseout` interaction will be disabled.\n\t* @property {number} [legend.item.tile.width=10] Set width for 'rectangle' legend item tile element.\n\t* @property {number} [legend.item.tile.height=10] Set height for 'rectangle' legend item tile element.\n\t* @property {number} [legend.item.tile.r=5] Set the radius for 'circle' legend item tile type.\n\t* @property {string} [legend.item.tile.type=\"rectangle\"] Set legend item shape type.<br>\n\t* - **Available Values:**\n\t* - circle\n\t* - rectangle\n\t* @property {boolean} [legend.format] Set formatter function for legend text.\n\t* The argument:<br>\n\t* - `id`: Legend text value. When `data.names` is specified, will pass from it, otherwise will pass data id.\n\t* - `dataId`: When `data.names` specified, will pass the original data id. Otherwise will be undefined.\n\t* @property {boolean} [legend.tooltip=false] Show full legend text value using system tooltip(via `<title>` element).\n\t* @property {boolean} [legend.usePoint=false] Whether to use custom points in legend.\n\t* @see [Demo: format](https://naver.github.io/billboard.js/demo/#Legend.LegendFormat)\n\t* @see [Demo: item.interaction](https://naver.github.io/billboard.js/demo/#Legend.LegendItemInteraction)\n\t* @see [Demo: item.tile.type](https://naver.github.io/billboard.js/demo/#Legend.LegendItemTileType)\n\t* @see [Demo: position](https://naver.github.io/billboard.js/demo/#Legend.LegendPosition)\n\t* @see [Demo: contents.template](https://naver.github.io/billboard.js/demo/#Legend.LegendTemplate1)\n\t* @see [Demo: usePoint](https://naver.github.io/billboard.js/demo/#Legend.usePoint)\n\t* @example\n\t* legend: {\n\t* show: true,\n\t* hide: true,\n\t* //or hide: \"data1\"\n\t* //or hide: [\"data1\", \"data2\"]\n\t* contents: {\n\t* bindto: \"#legend\", // <ul id='legend'></ul>\n\t*\n\t* // will be as: <li style='background-color:#1f77b4'>data1</li>\n\t* template: \"<li style='background-color:{=COLOR}'>{=TITLE}</li>\"\n\t*\n\t* // or using function\n\t* template: function(id, color, data) {\n\t* // if you want omit some legend, return falsy value\n\t* if (id !== \"data1\") {\n\t* return \"<li style='background-color:\"+ color +\">\"+ id +\"</li>\";\n\t* }\n\t* }\n\t* },\n\t* position: \"bottom\", // bottom, right, inset\n\t* inset: {\n\t* anchor: \"top-right\" // top-left, top-right, bottom-left, bottom-right\n\t* x: 20,\n\t* y: 10,\n\t* step: 2\n\t* },\n\t* equally: false,\n\t* padding: 10,\n\t* item: {\n\t* // will disable default interaction\n\t* interaction: false,\n\t*\n\t* // set legend interact on double click\n\t* // by double clicking, will make focused clicked dataseries only, hiding all others.\n\t* interaction: {\n\t* dblclick: true\n\t* }\n\t*\n\t* // when set below callback, will disable corresponding default interactions\n\t* onclick: function(id, visible) {\n\t* \t// toggle based on the data visibility\n\t* \tthis[visible ? \"hide\" : \"show\"](id);\n\t* },\n\t* onover: function(id, visible) { ... },\n\t* onout: function(id, visible) { ... },\n\t*\n\t* // set tile's size\n\t* tile: {\n\t* // set tile type\n\t* type: \"circle\" // or \"rectangle\" (default)\n\t*\n\t* // width & height, are only applicable for 'rectangle' legend type\n\t* width: 15,\n\t* height: 15\n\t*\n\t* // radius is only applicable for 'circle' legend type\n\t* r: 10\n\t* }\n\t* },\n\t* format: function(id, dataId) {\n\t* // set ellipsis string when length is > 5\n\t* // to get full legend value, combine with 'legend.tooltip=true'\n\t* if (id.length > 5) {\n\t* \tid = id.substr(0, 5) + \"...\";\n\t* }\n\t*\n\t* return id;\n\t* },\n\t* tooltip: true,\n\t* usePoint: true\n\t* }\n\t*/\n\tlegend_contents_bindto: void 0,\n\tlegend_contents_template: \"<span style='color:#fff;padding:5px;background-color:{=COLOR}'>{=TITLE}</span>\",\n\tlegend_equally: false,\n\tlegend_hide: false,\n\tlegend_inset_anchor: \"top-left\",\n\tlegend_inset_x: 10,\n\tlegend_inset_y: 0,\n\tlegend_inset_step: void 0,\n\tlegend_item_interaction: true,\n\tlegend_item_dblclick: false,\n\tlegend_item_onclick: void 0,\n\tlegend_item_onover: void 0,\n\tlegend_item_onout: void 0,\n\tlegend_item_tile_width: 10,\n\tlegend_item_tile_height: 10,\n\tlegend_item_tile_r: 5,\n\tlegend_item_tile_type: \"rectangle\",\n\tlegend_format: void 0,\n\tlegend_padding: 0,\n\tlegend_position: \"bottom\",\n\tlegend_show: true,\n\tlegend_tooltip: false,\n\tlegend_usePoint: false\n};\n//#endregion\nexport { legend_default as default };\n","/*!\n* Copyright (c) 2017 ~ present NAVER Corp.\r\n * billboard.js project is licensed under the MIT license\r\n * \r\n * billboard.js, JavaScript chart library\r\n * https://naver.github.io/billboard.js/\r\n * \r\n * @version 4.1.0\n*/\n//#region src/config/Options/common/main.ts\n/**\n* main config options\n*/\nvar main_default = {\n\t/**\n\t* Specify the CSS selector or the element which the chart will be set to. D3 selection object can be specified also.<br>\n\t* If another chart is already set, it will be replaced with the new one (only one chart can be set in one element).\n\t* - **NOTE:** In case the element doesn't exist or not specified, will add a `<div>` element to the body.\n\t* @name bindto\n\t* @memberof Options\n\t* @property {string|HTMLElement|d3.selection|object} [bindto=\"#chart\"] Specify the element where chart will be drawn.\n\t* @property {string|HTMLElement|d3.selection} bindto.element=\"#chart\" Specify the element where chart will be drawn.\n\t* @property {string} [bindto.classname=bb] Specify the class name of bind element.<br>\n\t* **NOTE:** When the class name isn't `bb`, then you also need to update the default CSS to be rendered correctly.\n\t* @default #chart\n\t* @example\n\t* bindto: \"#myContainer\"\n\t*\n\t* // or HTMLElement\n\t* bindto: document.getElementById(\"myContainer\")\n\t*\n\t* // or D3 selection object\n\t* bindto: d3.select(\"#myContainer\")\n\t*\n\t* // or to change default classname\n\t* bindto: {\n\t* element: \"#chart\",\n\t* classname: \"bill-board\" // ex) <div id='chart' class='bill-board'>\n\t* }\n\t*/\n\tbindto: \"#chart\",\n\t/**\n\t* Set chart background.\n\t* @name background\n\t* @memberof Options\n\t* @property {object} background background object\n\t* @property {string} background.class Specify the class name for background element.\n\t* @property {string} background.color Specify the fill color for background element.<br>**NOTE:** Will be ignored if `imgUrl` option is set.\n\t* @property {string} background.imgUrl Specify the image url string for background.\n\t* @see [Demo](https://naver.github.io/billboard.js/demo/#ChartOptions.Background)\n\t* @example\n\t* background: {\n\t* class: \"myClass\",\n\t* color: \"red\",\n\t*\n\t* // Set image url for background.\n\t* // If specified, 'color' option will be ignored.\n\t* imgUrl: \"https://naver.github.io/billboard.js/img/logo/billboard.js.svg\",\n\t* }\n\t*/\n\tbackground: {},\n\t/**\n\t* Set 'clip-path' attribute for chart element\n\t* - **NOTE:**\n\t* > When false, chart node element is positioned after the axis node in DOM tree hierarchy.\n\t* > This is to make the chart element positioned over axis element.\n\t* @name clipPath\n\t* @memberof Options\n\t* @type {boolean}\n\t* @default true\n\t* @see [Demo](https://naver.github.io/billboard.js/demo/#ChartOptions.clipPath)\n\t* @example\n\t* // don't set 'clip-path' attribute\n\t* clipPath: false\n\t*/\n\tclipPath: true,\n\t/**\n\t* Set svg element's class name\n\t* @name svg\n\t* @memberof Options\n\t* @type {object}\n\t* @property {object} [svg] svg object\n\t* @property {string} [svg.classname] class name for svg element\n\t* @example\n\t* svg: {\n\t* classname: \"test_class\"\n\t* }\n\t*/\n\tsvg_classname: void 0,\n\t/**\n\t* The desired size of the chart element.\n\t* If the value is not specified, the width of the chart will be calculated by the size of the parent element it's appended to.\n\t* @name size\n\t* @memberof Options\n\t* @type {object}\n\t* @property {object} [size] size object\n\t* @property {number} [size.width] width of the chart element\n\t* @property {number} [size.height] height of the chart element\n\t* @see [Demo](https://naver.github.io/billboard.js/demo/#ChartOptions.ChartSize)\n\t* @example\n\t* size: {\n\t* width: 640,\n\t* height: 480\n\t* }\n\t*/\n\tsize_width: void 0,\n\tsize_height: void 0,\n\t/**\n\t* The padding of the chart element.\n\t* - **NOTE:** for more information, see the \"[`Understanding padding`](https://github.com/naver/billboard.js/wiki/Understanding-padding)\" wiki documentation.\n\t* @name padding\n\t* @memberof Options\n\t* @type {object}\n\t* @property {object|boolean} [padding=true] Set padding of chart, and accepts object or boolean type.\n\t* - `Object`: Specify each side's padding.\n\t* - `false`: Remove padding completely and make the shape fully occupy the container element.\n\t* - In this case, axes and subchart will be hidden.\n\t* - To adjust some padding from this state, use `axis.[x|y].padding` option.\n\t* @property {string} [padding.mode] padding mode\n\t* - `\"fit\"`: Reduce padding as much as possible to make chart fit to the container element for chart types w/axis.<br>When specified, all padding values will be relative from fitted value.\n\t* @property {number} [padding.top] padding on the top of chart\n\t* @property {number} [padding.right] padding on the right of chart\n\t* @property {number} [padding.bottom] padding on the bottom of chart\n\t* @property {number} [padding.left] padding on the left of chart\n\t* @see [Demo](https://naver.github.io/billboard.js/demo/#ChartOptions.Padding)\n\t* @see [Demo: Fit padding](https://naver.github.io/billboard.js/demo/#ChartOptions.FitPadding)\n\t* @example\n\t* // remove padding completely.\n\t* padding: false,\n\t*\n\t* padding: {\n\t* // specifying mode value, will reduce padding and make fit to the container element.\n\t* mode: \"fit\"\n\t*\n\t* // when mode is \"fit\", all padding values will be relative from fitted value.\n\t* // so, 0 will be initial fitted value.\n\t* top: 20,\n\t* right: 20,\n\t* bottom: 20,\n\t* left: 20\n\t* }\n\t*\n\t* // or specify padding value for each side\n\t* padding: {\n\t* top: 20,\n\t* right: 20,\n\t* bottom: 20,\n\t* left: 20\n\t* }\n\t*/\n\tpadding: true,\n\tpadding_mode: void 0,\n\tpadding_left: void 0,\n\tpadding_right: void 0,\n\tpadding_top: void 0,\n\tpadding_bottom: void 0,\n\t/**\n\t* Set chart resize options\n\t* @name resize\n\t* @memberof Options\n\t* @type {object}\n\t* @property {object} [resize] resize object\n\t* @property {boolean|string} [resize.auto=true] Set chart resize automatically on viewport changes.\n\t* - **NOTE:** Available options\n\t* - true: Enables automatic resize.\n\t* - false: Disables automatic resize.\n\t* - \"parent\": Enables automatic resize when the parent node is resized.\n\t* - \"viewBox\": Enables automatic resize, and size will be fixed based on the viewbox.\n\t* - **NOTE:** `true` listens to the window's resize event, so a container resized by anything\n\t* else(a splitter drag, a sibling element growing, a CSS resize handle) is not detected.\n\t* Use `\"parent\"`, which observes the parent node itself, for those.\n\t* @property {boolean|number} [resize.timer=true] Set resize timer option.\n\t* - **NOTE:** Available options\n\t* - The resize function will be called using:\n\t* - true: `setTimeout()`\n\t* - false: `requestIdleCallback()`\n\t* - Given number(delay in ms) value, resize function will be triggered using `setTimeout()` with given delay.\n\t* - **NOTE:** With `resize.live`, this no longer decides when the size is reflected(every\n\t* animation frame does), but when the resize is treated as finished:\n\t* - `onresize`/`onresized` are called then, as they are without it.\n\t* - When the rendering is being stretched, this is also when it's redrawn to the exact\n\t* size. The stretched rendering stays on screen for this long after the resize stops,\n\t* so keep the delay short for charts large enough to be stretched.\n\t* - When every frame is redrawn, the last frame already drew the final size, so the\n\t* delayed call changes nothing on screen.\n\t* @property {boolean} [resize.live=false] Follow the container size while resizing, instead of\n\t* only when the delayed resize(`resize.timer`) runs.\n\t* - **NOTE:** Applies only when `resize.auto` is `true` or `\"parent\"`.\n\t* - **Strategy:** How the size is followed is measured, not configured. Two of them are used:\n\t* - **Redraw**: while a resize redraw fits in one animation frame(16ms), the chart is\n\t* redrawn on every frame, giving an exact rendering at every size.\n\t* - **Stretch**: once a redraw misses that budget, the rendering is stretched to the new\n\t* size for the rest of the resize, and redrawn when the resize settles. Stretching runs\n\t* no redraw at all: for SVG the `viewBox` is set to the drawn size and the width/height\n\t* attributes to the new one, and for canvas only the element's CSS box is resized, with\n\t* the backing store left as is. The size keeps following the container at any data amount.\n\t* - **Switching:** within a resize the strategy only goes from redraw to stretch, never back,\n\t* so frames can't alternate between an exact and a stretched rendering. The measured time\n\t* outlives the resize, so a chart already known to be expensive stretches from the first\n\t* frame of the next one.\n\t* - **While stretched:** text and stroke width are scaled with the box(SVG) and the drawn\n\t* bitmap is upscaled(canvas). Interaction is unaffected, as pointer coordinates are mapped\n\t* back through the element's transform. The redraw on settle restores the exact rendering.\n\t* - **Cost:** resize redraws skip the shape data join and the axis tick measurement, so they\n\t* are far cheaper than an initial render. A 5x1,000 line chart redraws in about 6ms(SVG)\n\t* and 3ms(canvas), a 10x10,000 one in about 78ms and 53ms. Ordinary charts therefore redraw\n\t* on every frame, and only the large ones fall back to stretching.\n\t* - **Several charts on a page:** the budget is measured per chart, and charts don't know\n\t* about each other. Eight charts of 2,000 points each spend about 75ms per frame together\n\t* while each one measures about 9ms and keeps redrawing. Turn it on for the charts the user\n\t* actually watches while resizing, rather than for every chart on a dense page.\n\t* - `onrendered` is called on every redrawn frame while resizing, not once per resize.\n\t* @see [Demo: resize \"parent\"](https://naver.github.io/billboard.js/demo/#ChartOptions.resizeParent)\n\t* @see [Demo: resize \"viewBox\"](https://naver.github.io/billboard.js/demo/#ChartOptions.resizeViewBox)\n\t* @example\n\t* resize: {\n\t* auto: false,\n\t*\n\t* // set resize based on parent node width value\n\t* auto: \"parent\",\n\t*\n\t* // set resize based on viewBox value\n\t* auto: \"viewBox\",\n\t*\n\t* // set resize function will be triggered using `setTimeout()`\n\t* timer: true,\n\t*\n\t* // set resize function will be triggered using `requestIdleCallback()`\n\t* timer: false,\n\t*\n\t* // set resize function will be triggered using `setTimeout()` with a delay of `100ms`.\n\t* timer: 100,\n\t*\n\t* // follow the container size while resizing\n\t* live: true\n\t* }\n\t*/\n\tresize_auto: true,\n\tresize_timer: true,\n\tresize_live: false,\n\t/**\n\t* Set a callback to execute when the chart is clicked.\n\t* @name onclick\n\t* @memberof Options\n\t* @type {function}\n\t* @default undefined\n\t* @example\n\t* onclick: function(event) {\n\t* this; // chart instance itself\n\t* event; // native event object\n\t* ...\n\t* }\n\t*/\n\tonclick: void 0,\n\t/**\n\t* Set a callback to execute when mouse/touch enters the chart.\n\t* @name onover\n\t* @memberof Options\n\t* @type {function}\n\t* @default undefined\n\t* @example\n\t* onover: function(event) {\n\t* this; // chart instance itself\n\t* event; // native event object\n\t* ...\n\t* }\n\t*/\n\tonover: void 0,\n\t/**\n\t* Set a callback to execute when mouse/touch leaves the chart.\n\t* @name onout\n\t* @memberof Options\n\t* @type {function}\n\t* @default undefined\n\t* @example\n\t* onout: function(event) {\n\t* this; // chart instance itself\n\t* event; // native event object\n\t* ...\n\t* }\n\t*/\n\tonout: void 0,\n\t/**\n\t* Set a callback to execute when user resizes the screen.\n\t* @name onresize\n\t* @memberof Options\n\t* @type {function}\n\t* @default undefined\n\t* @example\n\t* onresize: function() {\n\t* this; // chart instance itself\n\t* ...\n\t* }\n\t*/\n\tonresize: void 0,\n\t/**\n\t* Set a callback to execute when screen resize finished.\n\t* @name onresized\n\t* @memberof Options\n\t* @type {function}\n\t* @default undefined\n\t* @example\n\t* onresized: function() {\n\t* this; // chart instance itself\n\t* ...\n\t* }\n\t*/\n\tonresized: void 0,\n\t/**\n\t* Set a callback to execute before the chart is initialized\n\t* @name onbeforeinit\n\t* @memberof Options\n\t* @type {function}\n\t* @default undefined\n\t* @example\n\t* onbeforeinit: function() {\n\t* this; // chart instance itself\n\t* ...\n\t* }\n\t*/\n\tonbeforeinit: void 0,\n\t/**\n\t* Set a callback to execute when the chart is initialized.\n\t* @name oninit\n\t* @memberof Options\n\t* @type {function}\n\t* @default undefined\n\t* @example\n\t* oninit: function() {\n\t* this; // chart instance itself\n\t* ...\n\t* }\n\t*/\n\toninit: void 0,\n\t/**\n\t* Set a callback to execute after the chart is initialized\n\t* @name onafterinit\n\t* @memberof Options\n\t* @type {function}\n\t* @default undefined\n\t* @example\n\t* onafterinit: function() {\n\t* this; // chart instance itself\n\t* ...\n\t* }\n\t*/\n\tonafterinit: void 0,\n\t/**\n\t* Set a callback which is executed when the chart is rendered. Basically, this callback will be called in each time when the chart is redrawn.\n\t* @name onrendered\n\t* @memberof Options\n\t* @type {function}\n\t* @default undefined\n\t* @example\n\t* onrendered: function() {\n\t* this; // chart instance itself\n\t* ...\n\t* }\n\t*/\n\tonrendered: void 0,\n\t/**\n\t* Set duration of transition (in milliseconds) for chart animation.<br><br>\n\t* - **NOTE:** If `0` or `null` is set, transition will be skipped. So, this makes initial rendering faster especially in case you have a lot of data.\n\t* - **NOTE:** In canvas mode, `transition.duration` is ignored. Canvas frames are redrawn synchronously. For canvas `flow()`, pass `duration` to the `flow()` call when an x-domain interpolation is required.\n\t* @name transition\n\t* @memberof Options\n\t* @type {object}\n\t* @property {object} [transition] transition object\n\t* @property {number} [transition.duration=250] duration in milliseconds\n\t* @example\n\t* transition: {\n\t* duration: 500\n\t* }\n\t*/\n\ttransition_duration: 250,\n\t/**\n\t* Set plugins\n\t* @name plugins\n\t* @memberof Options\n\t* @type {Array}\n\t* @example\n\t* plugins: [\n\t* new bb.plugin.stanford({ ... }),\n\t* new PluginA(),\n\t* ...\n\t* ]\n\t*/\n\tplugins: [],\n\t/**\n\t* Control the render timing\n\t* @name render\n\t* @memberof Options\n\t* @type {object}\n\t* @property {object} [render] render object\n\t* @property {boolean} [render.lazy=true] Make it not render at initialization.\n\t* - **NOTE**:\n\t* - Enabled by default when bind element's visibility is hidden.\n\t* - When set to `false`, will initialize the chart regardless the bind element's visibility state, but in this case chart can't be guaranteed to be rendered properly.\n\t* @property {boolean} [render.observe=true] Observe bind element's visibility(`display` or `visibility` inline css property or class value) & render when it is visible automatically (for IEs, only works IE11+). When set to **false**, call [`.flush()`](./Chart.html#flush) to render.\n\t* @property {\"svg\"|\"canvas\"} [render.mode=\"svg\"] Select rendering backend. Available values are `\"svg\"` and `\"canvas\"`. In canvas mode, chart primitives are rendered to a single `<canvas>` instead of SVG nodes.\n\t* - **NOTE:** Canvas mode doesn't create per-shape, per-tick, grid, region and label SVG DOM nodes/classes. SVG CSS selectors that depend on those nodes, such as `.bb-target-data1 .bb-bar`, `.bb-bar-0` or `.bb-axis .tick text`, won't style canvas-drawn primitives. Use chart options, supported CSS theme probes or `canvas.theme` overrides.\n\t* - **NOTE:** Arc chart types (`pie`, `donut`, `gauge`, `polar` and `radar`) and funnel charts don't get meaningful rendering benefit from canvas mode. They are rendered as SVG only and `render.mode=\"canvas\"` is ignored for those types.\n\t* @see [Demo](https://naver.github.io/billboard.js/demo/#ChartOptions.LazyRender)\n\t* @example\n\t* render: {\n\t* lazy: true,\n\t* observe: true,\n\t* mode: \"svg\"\n\t* }\n\t*\n\t* @example\n\t* render: {\n\t* mode: \"canvas\"\n\t* }\n\t*\n\t* @example\n\t* \t// <!-- render.lazy will detect visibility defined -->\n\t* // (a) <div id='chart' class='hide'></div>\n\t* // (b) <div id='chart' style='display:none'></div>\n\t*\n\t* // render.lazy enabled by default when element is hidden\n\t* var chart = bb.generate({ ... });\n\t*\n\t* // chart will be rendered automatically when element's visibility changes\n\t* // Note: works only for inlined css property or class attribute changes\n\t* document.getElementById('chart').classList.remove('hide') // (a)\n\t* document.getElementById('chart').style.display = 'block'; // (b)\n\t*\n\t* @example\n\t* \t// chart won't be rendered and not observing bind element's visibility changes\n\t* var chart = bb.generate({\n\t* render: {\n\t* lazy: true,\n\t* observe: false\n\t* }\n\t* });\n\t*\n\t* // call at any point when you want to render\n\t* chart.flush();\n\t*/\n\trender: {},\n\trender_mode: \"svg\",\n\t/**\n\t* Override canvas drawing style values read from supported SVG CSS probes.\n\t* Use this for canvas-specific styling that can't be represented by per-node SVG CSS selectors.\n\t* @name canvas\n\t* @memberof Options\n\t* @type {object}\n\t* @property {object} [canvas] Canvas options.\n\t* @property {object} [canvas.theme] Canvas theme override.\n\t* @property {object} [canvas.theme.selectors] Canvas theme overrides keyed by supported billboard.js SVG selectors. Use this to style canvas-rendered primitives with familiar CSS selectors and CSS property names.\n\t* - **NOTE:** `canvas.theme.selectors` keys are compatibility aliases for supported canvas primitives, not a full DOM/CSS selector engine. They don't match live SVG nodes 1:1 in canvas mode, and unsupported or per-data selectors such as `.bb-target-data1 .bb-bar` or `.bb-bar-0` are ignored. Use `canvas.theme` direct overrides or chart options for styles that need exact per-node behavior.\n\t* @see [Canvas theme selector reference](https://github.com/naver/billboard.js/blob/master/CANVAS_THEME_SELECTORS.md)\n\t* @example\n\t* canvas: {\n\t* theme: {\n\t* selectors: {\n\t* \".bb-axis .tick text\": {\n\t* fill: \"#555\",\n\t* font: \"12px sans-serif\"\n\t* },\n\t* \".bb-grid line\": {\n\t* stroke: \"#ddd\",\n\t* \"stroke-width\": 1,\n\t* \"stroke-dasharray\": \"2 2\"\n\t* },\n\t* \".bb-bar\": {\n\t* stroke: \"#fff\",\n\t* \"stroke-width\": 1\n\t* }\n\t* }\n\t* }\n\t* }\n\t*/\n\tcanvas_theme: {},\n\t/**\n\t* Show rectangles inside the chart.<br><br>\n\t* - **NOTE:**<br>\n\t* - axis must be x, y or y2. start and end should be the value where regions start and end.\n\t* - If not specified, the edge values will be used.\n\t* - If timeseries x axis, date string, Date object and unixtime integer can be used.\n\t* - If category x axis, category name can be used for start and end.\n\t* - If class is set, the region element will have it as class.\n\t*\n\t* This option accept array of object with below values:\n\t* - `axis {string}`: 'x', 'y', or 'y2'\n\t* - `[start] {number|Date|string}`: Start position of the region. If not set, the start will be the edge of the chart.\n\t* - `[end] {number|Date|string}`: End position of the region. If not set, the end will be the edge of the chart.\n\t* - `[class] {string}`: Class value to apply to the region.\n\t* - `[label] {object}` Label text option.\n\t* - `text {string}`: Text value.\n\t* - `x {number}`: x Position.\n\t* - `y {number}`: y Position.\n\t* - `center {string}`: Align label at the center. Allowed values are 'x', 'y', 'xy'.\n\t* - `color {string}`: Color string.\n\t* - `rotated (boolean)`: Whether rotate label or not.\n\t* @name regions\n\t* @memberof Options\n\t* @type {Array}\n\t* @default []\n\t* @see [Demo: Regions](https://naver.github.io/billboard.js/demo/#Region.Region)\n\t* @see [Demo: Regions Timeseries](https://naver.github.io/billboard.js/demo/#Region.RegionWithTimeseries)\n\t* @see [Demo: Regions Label](https://naver.github.io/billboard.js/demo/#Region.RegionLabel)\n\t* @example\n\t* regions: [\n\t* {\n\t* axis: \"x\",\n\t* start: 1,\n\t* end: 4,\n\t* class: \"region-1-4\",\n\t* opacity: 0.2,\n\t* label: {\n\t* \ttext: \"Region Text\",\n\t* \tx: 5, // position relative of the initial x coordinate\n\t* \ty: 5, // position relative of the initial y coordinate\n\t* \tcenter: \"xy\", // center text label in both direction.\n\t* \tcolor: \"red\", // color string\n\t* \trotated: true // make text to show in vertical or horizontal\n\t* }\n\t* }\n\t* ]\n\t*/\n\tregions: []\n};\n//#endregion\nexport { main_default as default };\n","/*!\n* Copyright (c) 2017 ~ present NAVER Corp.\r\n * billboard.js project is licensed under the MIT license\r\n * \r\n * billboard.js, JavaScript chart library\r\n * https://naver.github.io/billboard.js/\r\n * \r\n * @version 4.1.0\n*/\n//#region src/config/Options/common/title.ts\n/**\n* Copyright (c) 2017 ~ present NAVER Corp.\n* billboard.js project is licensed under the MIT license\n*/\n/**\n* title config options\n*/\nvar title_default = {\n\t/**\n\t* Set title options\n\t* @name title\n\t* @memberof Options\n\t* @type {object}\n\t* @property {object} title Title object\n\t* @property {string} [title.text] Title text. If contains `\\n`, it's used as line break allowing multiline title.\n\t* @property {number} [title.padding.top=0] Top padding value.\n\t* @property {number} [title.padding.right=0] Right padding value.\n\t* @property {number} [title.padding.bottom=0] Bottom padding value.\n\t* @property {number} [title.padding.left=0] Left padding value.\n\t* @property {string} [title.position=center] Available values are: 'center', 'right' and 'left'.\n\t* @see [Demo](https://naver.github.io/billboard.js/demo/#Title.MultilinedTitle)\n\t* @example\n\t* title: {\n\t* text: \"Title Text\",\n\t*\n\t* // or Multiline title text\n\t* text: \"Main title text\\nSub title text\",\n\t*\n\t* padding: {\n\t* top: 10,\n\t* right: 10,\n\t* bottom: 10,\n\t* left: 10\n\t* },\n\t* position: \"center\"\n\t* }\n\t*/\n\ttitle_text: void 0,\n\ttitle_padding: {\n\t\ttop: 0,\n\t\tright: 0,\n\t\tbottom: 0,\n\t\tleft: 0\n\t},\n\ttitle_position: \"center\"\n};\n//#endregion\nexport { title_default as default };\n","/*!\n* Copyright (c) 2017 ~ present NAVER Corp.\r\n * billboard.js project is licensed under the MIT license\r\n * \r\n * billboard.js, JavaScript chart library\r\n * https://naver.github.io/billboard.js/\r\n * \r\n * @version 4.1.0\n*/\n//#region src/config/Options/common/tooltip.ts\n/**\n* Copyright (c) 2017 ~ present NAVER Corp.\n* billboard.js project is licensed under the MIT license\n*/\n/**\n* tooltip config options\n*/\nvar tooltip_default = {\n\t/**\n\t* Tooltip options\n\t* @name tooltip\n\t* @memberof Options\n\t* @type {object}\n\t* @property {object} tooltip Tooltip object\n\t* @property {boolean} [tooltip.show=true] Show or hide tooltip.\n\t* @property {boolean} [tooltip.doNotHide=false] Make tooltip keep showing not hiding on interaction.\n\t* @property {boolean} [tooltip.grouped=true] Set if tooltip is grouped or not for the data points.\n\t* - **NOTE:** The overlapped data points will be displayed as grouped even if set false.\n\t* @property {boolean} [tooltip.linked=false] Set if tooltips on all visible charts with like x points are shown together when one is shown.\n\t* @property {string} [tooltip.linked.name=\"\"] Groping name for linked tooltip.<br>If specified, linked tooltip will be groped interacting to be worked only with the same name.\n\t* @property {function} [tooltip.format.title] Set format for the title of tooltip.<br>\n\t* Specified function receives x of the data point to show.\n\t* @property {function} [tooltip.format.name] Set format for the name of each data in tooltip.<br>\n\t* Specified function receives name, ratio, id and index of the data point to show. ratio will be undefined if the chart is not donut/pie/gauge.\n\t* @property {function} [tooltip.format.value] Set format for the value of each data value in tooltip. If undefined returned, the row of that value will be skipped to be called.\n\t* - Will pass following arguments to the given function:\n\t* - `value {string}`: Value of the data point. If data row contains multiple or ranged(ex. candlestick, area range, etc.) value, formatter will be called as value length.\n\t* - `ratio {number}`: Ratio of the data point in the `pie/donut/gauge` and `area/bar` when contains grouped data. Otherwise is `undefined`.\n\t* - `id {string}`: id of the data point\n\t* - `index {number}`: Index of the data point\n\t* @property {function} [tooltip.position] Set custom position function for the tooltip.<br>\n\t* This option can be used to modify the tooltip position by returning object that has top and left.\n\t* - Will pass following arguments to the given function:\n\t* - `data {Array}`: Current selected data array object.\n\t* - `width {number}`: Width of tooltip.\n\t* - `height {number}`: Height of tooltip.\n\t* - `element {SVGElement}`: Tooltip event bound element\n\t* - `pos {object}`: Current position of the tooltip.\n\t* @property {function|object} [tooltip.contents] Set custom HTML for the tooltip.<br>\n\t* If tooltip.grouped is true, data includes multiple data points.<br><br>\n\t* Specified function receives `data` array and `defaultTitleFormat`, `defaultValueFormat` and `color` functions of the data point to show.\n\t* - **Note:**\n\t* - Only common HTML tags are allowed to prevent XSS attacks. If creating charts from user input, it is recommended to sanitize input values to avoid potential vulnerabilities.<br><br>\n\t* - defaultTitleFormat:\n\t* - if `axis.x.tick.format` option will be used if set.\n\t* - otherwise, will return function based on tick format type(category, timeseries).\n\t* - defaultValueFormat:\n\t* \t - for Arc type (except gauge, radar), the function will return value from `(ratio * 100).toFixed(1)`.\n\t* \t - for Axis based types, will be used `axis.[y|y2].tick.format` option value if is set.\n\t* \t - otherwise, will parse value and return as number.\n\t* @property {string|HTMLElement} [tooltip.contents.bindto=undefined] Set CSS selector or element reference to bind tooltip.\n\t* - **NOTE:** When is specified, will not be updating tooltip's position.\n\t* @property {string} [tooltip.contents.template=undefined] Set tooltip's template.\n\t* - **NOTE:** Only common HTML tags are allowed to prevent XSS attacks. If creating charts from user input, it is recommended to sanitize input values to avoid potential vulnerabilities.<br><br>\n\t* Within template, below syntax will be replaced using template-like syntax string:\n\t* - **{{ ... }}**: the doubly curly brackets indicate loop block for data rows.\n\t* - **{=CLASS_TOOLTIP}**: default tooltip class name `bb-tooltip`.\n\t* - **{=CLASS_TOOLTIP_NAME}**: default tooltip data class name (ex. `bb-tooltip-name-data1`)\n\t* - **{=TITLE}**: title value.\n\t* - **{=COLOR}**: data color.\n\t* - **{=NAME}**: data id value.\n\t* - **{=VALUE}**: data value.\n\t* - **NOTE:** While basic XSS sanitization is applied, if you're allowing user-provided chart options in a service exposed to other users, you should implement additional security measures to prevent sophisticated XSS attacks.\n\t* @property {object} [tooltip.contents.text=undefined] Set additional text content within data loop, using template syntax.\n\t* - **NOTE:** It should contain `{ key: Array, ... }` value\n\t* - 'key' name is used as substitution within template as '{=KEY}'\n\t* - The value array length should match with the data length\n\t* @property {boolean} [tooltip.init.show=false] Show tooltip at the initialization.\n\t* @property {number} [tooltip.init.x=0] Set x Axis index(or index for Arc(donut, gauge, pie) types) to be shown at the initialization.\n\t* @property {object} [tooltip.init.position] Set the position of tooltip at the initialization.\n\t* @property {function} [tooltip.onshow] Set a callback that will be invoked before the tooltip is shown.\n\t* @property {function} [tooltip.onhide] Set a callback that will be invoked before the tooltip is hidden.\n\t* @property {function} [tooltip.onshown] Set a callback that will be invoked after the tooltip is shown\n\t* @property {function} [tooltip.onhidden] Set a callback that will be invoked after the tooltip is hidden.\n\t* @property {string|function|null} [tooltip.order=null] Set tooltip data display order.<br><br>\n\t* **Available Values:**\n\t* - `desc`: In descending data value order\n\t* - `asc`: In ascending data value order\n\t* - `null`: It keeps the data display order<br>\n\t* **NOTE:** When `data.groups` is set, the order will follow as the stacked graph order.<br>\n\t* If want to order as data bound, set any value rather than asc, desc or null. (ex. empty string \"\")\n\t* - `function(data1, data2) { ... }`: [Array.sort compareFunction](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#Parameters)\n\t* @see [Demo: Hide Tooltip](https://naver.github.io/billboard.js/demo/#Tooltip.HideTooltip)\n\t* @see [Demo: Tooltip Grouping](https://naver.github.io/billboard.js/demo/#Tooltip.TooltipGrouping)\n\t* @see [Demo: Tooltip Format](https://naver.github.io/billboard.js/demo/#Tooltip.TooltipFormat)\n\t* @see [Demo: Linked Tooltip](https://naver.github.io/billboard.js/demo/#Tooltip.LinkedTooltips)\n\t* @see [Demo: Tooltip Position](https://naver.github.io/billboard.js/demo/#Tooltip.TooltipPosition)\n\t* @see [Demo: Tooltip Template](https://naver.github.io/billboard.js/demo/#Tooltip.TooltipTemplate)\n\t* @example\n\t* tooltip: {\n\t* show: true,\n\t* doNotHide: true,\n\t* grouped: false,\n\t* format: {\n\t* title: function(x) { return \"Data \" + x; },\n\t* name: function(name, ratio, id, index) { return name; },\n\t*\n\t* // If data row contains multiple or ranged(ex. candlestick, area range, etc.) value,\n\t* // formatter will be called as value length times.\n\t* value: function(value, ratio, id, index) { return ratio; }\n\t* },\n\t* position: function(data, width, height, element, pos) {\n\t* // data: [{x, index, id, name, value}, ...]\n\t* // width: Tooltip width\n\t* // height: Tooltip height\n\t* // element: Tooltip event bound element\n\t* // pos: {\n\t* // x: Current mouse event x position,\n\t* // y: Current mouse event y position,\n\t* // xAxis: Current x Axis position (the value is given for axis based chart type only)\n\t* // yAxis: Current y Axis position value or function(the value is given for axis based chart type only)\n\t* // }\n\t*\n\t* // yAxis will work differently per data lengths\n\t* // - a) Single data: `yAxis` will return `number` value\n\t* // - b) Multiple data: `yAxis` will return a function with property value\n\t*\n\t* // a) Single data:\n\t* // Get y coordinate\n\t* pos.yAxis; // y axis coordinate value of current data point\n\t*\n\t* // b) Multiple data:\n\t* // Get y coordinate of value 500, where 'data1' scales(y or y2).\n\t* // When 'data.axes' option is used, data can bound to different axes.\n\t* // - when \"data.axes={data1: 'y'}\", will return y value from y axis scale.\n\t* // - when \"data.axes={data1: 'y2'}\", will return y value from y2 axis scale.\n\t* pos.yAxis(500, \"data1\"); // will return y coordinate value of data1\n\t*\n\t* pos.yAxis(500); // get y coordinate with value of 500, using y axis scale\n\t* pos.yAxis(500, null, \"y2\"); // get y coordinate with value of 500, using y2 axis scale\n\t*\n\t* return {\n\t* top: 0,\n\t* left: 0\n\t* }\n\t* },\n\t*\n\t* contents: function(d, defaultTitleFormat, defaultValueFormat, color) {\n\t* return ... // formatted html as you want\n\t* },\n\t*\n\t* // specify tooltip contents using template\n\t* // - example of HTML returned:\n\t* // <ul class=\"bb-tooltip\">\n\t* // <li class=\"bb-tooltip-name-data1\"><span>250</span><br><span style=\"color:#00c73c\">data1</span></li>\n\t* // <li class=\"bb-tooltip-name-data2\"><span>50</span><br><span style=\"color:#fa7171\">data2</span></li>\n\t* // </ul>\n\t* contents: {\n\t* \tbindto: \"#tooltip\",\n\t* \ttemplate: '<ul class={=CLASS_TOOLTIP}>{{' +\n\t* \t\t\t'<li class=\"{=CLASS_TOOLTIP_NAME}\"><span>{=VALUE}</span><br>' +\n\t* \t\t\t'<span style=color:{=COLOR}>{=NAME}</span></li>' +\n\t* \t\t'}}</ul>'\n\t* }\n\t*\n\t* // with additional text value\n\t* // - example of HTML returned:\n\t* // <ul class=\"bb-tooltip\">\n\t* // <li class=\"bb-tooltip-name-data1\"><span>250</span><br>comment1<span style=\"color:#00c73c\">data1</span>text1</li>\n\t* // <li class=\"bb-tooltip-name-data2\"><span>50</span><br>comment2<span style=\"color:#fa7171\">data2</span>text2</li>\n\t* // </ul>\n\t* contents: {\n\t* \tbindto: \"#tooltip\",\n\t* \ttext: {\n\t* \t\t// a) 'key' name is used as substitution within template as '{=KEY}'\n\t* \t\t// b) the length should match with the data length\n\t* \t\tVAR1: [\"text1\", \"text2\"],\n\t* \t\tVAR2: [\"comment1\", \"comment2\"],\n\t* \t},\n\t* \ttemplate: '<ul class={=CLASS_TOOLTIP}>{{' +\n\t* \t\t\t'<li class=\"{=CLASS_TOOLTIP_NAME}\"><span>{=VALUE}</span>{=VAR2}<br>' +\n\t* \t\t\t'<span style=color:{=COLOR}>{=NAME}</span>{=VAR1}</li>' +\n\t* \t\t'}}</ul>'\n\t* }\n\t*\n\t* // sort tooltip data value display in ascending order\n\t* order: \"asc\",\n\t*\n\t* // specifying sort function\n\t* order: function(a, b) {\n\t* // param data passed format\n\t* {x: 5, value: 250, id: \"data1\", index: 5, name: \"data1\"}\n\t* ...\n\t* },\n\t*\n\t* // show at the initialization\n\t* init: {\n\t* show: true,\n\t* x: 2, // x Axis index (or index for Arc(donut, gauge, pie) types)\n\t* position: {\n\t* top: \"150px\", // specify as number or as string with 'px' unit string\n\t* left: 250 // specify as number or as string with 'px' unit string\n\t* }\n\t* },\n\t*\n\t* // fires prior tooltip is shown\n\t* onshow: function(selectedData) {\n\t* \t// current dataset selected\n\t* \t// ==> [{x: 4, value: 150, id: \"data2\", index: 4, name: \"data2\"}, ...]\n\t* \tselectedData;\n\t* },\n\t*\n\t* // fires prior tooltip is hidden\n\t* onhide: function(selectedData) {\n\t* \t// current dataset selected\n\t* \t// ==> [{x: 4, value: 150, id: \"data2\", index: 4, name: \"data2\"}, ...]\n\t* \tselectedData;\n\t* },\n\t*\n\t* // fires after tooltip is shown\n\t* onshown: function(selectedData) {\n\t* \t// current dataset selected\n\t* \t// ==> [{x: 4, value: 150, id: \"data2\", index: 4, name: \"data2\"}, ...]\n\t* \tselectedData;\n\t* },\n\t*\n\t* // fires after tooltip is hidden\n\t* onhidden: function(selectedData) {\n\t* \t// current dataset selected\n\t* \t// ==> [{x: 4, value: 150, id: \"data2\", index: 4, name: \"data2\"}, ...]\n\t* \tselectedData;\n\t* },\n\t*\n\t* // Link any tooltips when multiple charts are on the screen where same x coordinates are available\n\t* // Useful for timeseries correlation\n\t* linked: true,\n\t*\n\t* // Specify name to interact those with the same name only.\n\t* linked: {\n\t* name: \"some-group\"\n\t* }\n\t* }\n\t*/\n\ttooltip_show: true,\n\ttooltip_doNotHide: false,\n\ttooltip_grouped: true,\n\ttooltip_format_title: void 0,\n\ttooltip_format_name: void 0,\n\ttooltip_format_value: void 0,\n\ttooltip_position: void 0,\n\ttooltip_contents: {},\n\ttooltip_init_show: false,\n\ttooltip_init_x: 0,\n\ttooltip_init_position: void 0,\n\ttooltip_linked: false,\n\ttooltip_linked_name: \"\",\n\ttooltip_onshow: () => {},\n\ttooltip_onhide: () => {},\n\ttooltip_onshown: () => {},\n\ttooltip_onhidden: () => {},\n\ttooltip_order: null\n};\n//#endregion\nexport { tooltip_default as default };\n","/*!\n* Copyright (c) 2017 ~ present NAVER Corp.\r\n * billboard.js project is licensed under the MIT license\r\n * \r\n * billboard.js, JavaScript chart library\r\n * https://naver.github.io/billboard.js/\r\n * \r\n * @version 4.1.0\n*/\n//#region src/config/Options/data/data.ts\n/**\n* data config options\n*/\nvar data_default = {\n\t/**\n\t* Specify the key of x values in the data.<br><br>\n\t* We can show the data with non-index x values by this option. This option is required when the type of x axis is timeseries. If this option is set on a category axis, the values of the data on the key will be used for category names.\n\t* @name data․x\n\t* @memberof Options\n\t* @type {string}\n\t* @default undefined\n\t* @example\n\t* data: {\n\t* x: \"date\"\n\t* }\n\t*/\n\tdata_x: void 0,\n\t/**\n\t* Converts data id value\n\t* @name data․idConverter\n\t* @memberof Options\n\t* @type {function}\n\t* @default function(id) { return id; }\n\t* @example\n\t* data: {\n\t* idConverter: function(id) {\n\t* // when id is 'data1', converts to be 'data2'\n\t* // 'data2' should be given as the initial data value\n\t* if (id === \"data1\") {\n\t* return \"data2\";\n\t* } else {\n\t* return id;\n\t* }\n\t* }\n\t* }\n\t*/\n\tdata_idConverter: (id) => id,\n\t/**\n\t* Set custom data name.\n\t* If a name is set to `null`, the series is omitted from the legend.\n\t* @name data․names\n\t* @memberof Options\n\t* @type {object}\n\t* @default {}\n\t* @see [Demo](https://naver.github.io/billboard.js/demo/#Data.DataName)\n\t* @example\n\t* data: {\n\t* names: {\n\t* data1: \"Data Name 1\",\n\t* data2: \"Data Name 2\"\n\t* }\n\t* }\n\t*/\n\tdata_names: {},\n\t/**\n\t* Set custom data class.<br><br>\n\t* If this option is specified, the element g for the data has an additional class that has the prefix 'bb-target-' (eg. bb-target-additional-data1-class).\n\t* @name data․classes\n\t* @memberof Options\n\t* @type {object}\n\t* @default {}\n\t* @example\n\t* data: {\n\t* classes: {\n\t* data1: \"additional-data1-class\",\n\t* data2: \"additional-data2-class\"\n\t* }\n\t* }\n\t*/\n\tdata_classes: {},\n\t/**\n\t* Set chart type at once.<br><br>\n\t* If this option is specified, the type will be applied to every data. This setting can be overwritten by data.types.<br><br>\n\t* **Available Values:**\n\t* - area\n\t* - area-line-range\n\t* - area-spline\n\t* - area-spline-range\n\t* - area-step\n\t* - area-step-range\n\t* - bar\n\t* - bubble\n\t* - candlestick\n\t* - donut\n\t* - funnel\n\t* - gauge\n\t* - line\n\t* - pie\n\t* - polar\n\t* - radar\n\t* - scatter\n\t* - spline\n\t* - step\n\t* - treemap\n\t* @name data․type\n\t* @memberof Options\n\t* @type {string}\n\t* @default \"line\"<br>NOTE: When importing shapes by ESM, `line()` should be specified for type.\n\t* @example\n\t* data: {\n\t* type: \"bar\"\n\t* }\n\t* @example\n\t* // Generate chart by importing ESM\n\t* // Import types to be used only, where this will make smaller bundle size.\n\t* import bb, {\n\t* area,\n\t* areaLineRange,\n\t* areaSpline,\n\t* areaSplineRange,\n\t* areaStep,\n\t* areaStepRange,\n\t* bar,\n\t* bubble,\n\t* candlestick,\n\t* donut,\n\t* funnel,\n\t* gauge,\n\t* line,\n\t* pie,\n\t* polar,\n\t* radar,\n\t* scatter,\n\t* spline,\n\t* step,\n\t* treemap\n\t* }\n\t*\n\t* bb.generate({\n\t* ...,\n\t* data: {\n\t* type: bar()\n\t* }\n\t* });\n\t*/\n\tdata_type: void 0,\n\t/**\n\t* Set chart type for each data.<br>\n\t* This setting overwrites data.type setting.\n\t* - **NOTE:** `radar` and `treemap` type can't be combined with other types.\n\t* @name data․types\n\t* @memberof Options\n\t* @type {object}\n\t* @default {}\n\t* @example\n\t* data: {\n\t* types: {\n\t* data1: \"bar\",\n\t* data2: \"spline\"\n\t* }\n\t* }\n\t* @example\n\t* // Generate chart by importing ESM\n\t* // Import types to be used only, where this will make smaller bundle size.\n\t* import bb, {\n\t* area,\n\t* areaLineRange,\n\t* areaSpline,\n\t* areaSplineRange,\n\t* areaStep,\n\t* areaStepRange,\n\t* bar,\n\t* bubble,\n\t* candlestick,\n\t* donut,\n\t* funnel,\n\t* gauge,\n\t* line,\n\t* pie,\n\t* polar,\n\t* radar,\n\t* scatter,\n\t* spline,\n\t* step,\n\t* treemap\n\t* }\n\t*\n\t* bb.generate({\n\t* ...,\n\t* data: {\n\t* types: {\n\t* data1: bar(),\n\t* data1: spline()\n\t* }\n\t* }\n\t* });\n\t*/\n\tdata_types: {},\n\t/**\n\t* This option changes the order of stacking data and pieces of pie/donut.\n\t* - If `null` specified, it will be the order in which the data is loaded.\n\t* - If a function is specified, it will be used as [Array.sort compareFunction](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#Parameters)<br><br>\n\t*\n\t* **Available Values:**\n\t* - `desc`: In descending order\n\t* - `asc`: In ascending order\n\t* - `null`: It keeps the data load order\n\t* - `function(data1, data2) { ... }`: Array.sort compareFunction\n\t*\n\t* **NOTE**: order function only works for Axis based types & Arc types, except `Radar` type.\n\t* @name data․order\n\t* @memberof Options\n\t* @type {string|function|null}\n\t* @default desc\n\t* @see [Demo](https://naver.github.io/billboard.js/demo/#Data.DataOrder)\n\t* @example\n\t* data: {\n\t* // in descending order (default)\n\t* order: \"desc\"\n\t*\n\t* // in ascending order\n\t* order: \"asc\"\n\t*\n\t* // keeps data input order\n\t* order: null\n\t*\n\t* // specifying sort function\n\t* order: function(a, b) {\n\t* // param data passed format\n\t* // {\n\t* // id: \"data1\", id_org: \"data1\", values: [\n\t* // {x: 5, value: 250, id: \"data1\", index: 5, name: \"data1\"},\n\t* // ...\n\t* // ]\n\t* // }\n\t*\n\t* const reducer = (p, c) => p + Math.abs(c.value);\n\t* const aSum = a.values.reduce(reducer, 0);\n\t* const bSum = b.values.reduce(reducer, 0);\n\t*\n\t* // ascending order\n\t* return aSum - bSum;\n\t*\n\t* // descending order\n\t* // return bSum - aSum;\n\t* }\n\t* }\n\t*/\n\tdata_order: \"desc\",\n\t/**\n\t* Set groups for the data for stacking.\n\t* @name data․groups\n\t* @memberof Options\n\t* @type {Array}\n\t* @default []\n\t* @example\n\t* data: {\n\t* groups: [\n\t* [\"data1\", \"data2\"],\n\t* [\"data3\"]\n\t* ]\n\t* }\n\t*/\n\tdata_groups: [],\n\t/**\n\t* Set how zero value will be treated on groups.<br>\n\t* Possible values:\n\t* - `zero`: 0 will be positioned at the absolute axis zero point.\n\t* - `positive`: 0 will be positioned at the top of a stack.\n\t* - `negative`: 0 will be positioned at the bottom of a stack.\n\t* @name data․groupsZeroAs\n\t* @memberof Options\n\t* @type {string}\n\t* @default \"positive\"\n\t* @see [Demo](https://naver.github.io/billboard.js/demo/#Data.Groups)\n\t* @example\n\t* data: {\n\t* groupsZeroAs: \"zero\" // \"positive\" or \"negative\"\n\t* }\n\t*/\n\tdata_groupsZeroAs: \"positive\",\n\t/**\n\t* Set color converter function.<br><br>\n\t* This option should be a function and the specified function receives color (e.g. '#ff0000') and d that has data parameters like id, value, index, etc. And it must return a string that represents color (e.g. '#00ff00').\n\t* @name data․color\n\t* @memberof Options\n\t* @type {function}\n\t* @default undefined\n\t* @see [Demo](https://naver.github.io/billboard.js/demo/#Data.DataColor)\n\t* @example\n\t* data: {\n\t* color: function(color, d) { ... }\n\t* }\n\t*/\n\tdata_color: void 0,\n\t/**\n\t* Set color for each data.\n\t* @name data․colors\n\t* @memberof Options\n\t* @type {object}\n\t* @default {}\n\t* @example\n\t* data: {\n\t* colors: {\n\t* data1: \"#ff0000\",\n\t* data2: function(d) {\n\t* return \"#000\";\n\t* }\n\t* ...\n\t* }\n\t* }\n\t*/\n\tdata_colors: {},\n\t/**\n\t* Set labels options\n\t* @name data․labels\n\t* @memberof Options\n\t* @type {object}\n\t* @property {object} data Data object\n\t* @property {boolean} [data.labels=false] Show or hide labels on each data point\n\t* @property {boolean} [data.labels.centered=false] Centerize labels on `bar` shape. (**NOTE:** works only for 'bar' type)\n\t* @property {function} [data.labels.format] Set formatter function for data labels.<br>\n\t* The formatter function receives 4 arguments such as `v, id, i, texts` and it **must return a string** (`\\n` character will be used as line break) that will be shown as the label.<br><br>\n\t* The arguments are:<br>\n\t* - `v` is the value of the data point where the label is shown.\n\t* - `id` is the id of the data where the label is shown.\n\t* - `i` is the index of the data series point where the label is shown.\n\t* - `texts` is an array of whole corresponding data series' text labels.<br><br>\n\t* Formatter function can be defined for each data by specifying as an object and D3 formatter function can be set (ex. d3.format('$'))\n\t* @property {string|object|function} [data.labels.backgroundColors] Set label text background colors.<br><br>\n\t* - **NOTE**: When a function is set, background colors can be specified one color per dataset.\n\t* - Within the function, the last returned color for dataset will be used.\n\t* - Only can control set or unset background color for each values.\n\t* @property {string|object|function} [data.labels.colors] Set label text colors.\n\t* @property {object|function} [data.labels.position] Set each dataset position, relative to the original.<br><br>\n\t* When a function is specified, it will receive 5 arguments such as `type, v, id, i, texts` and it must return a position number.<br><br>\n\t* The arguments are:<br>\n\t* - `type` coordinate type string, which will be 'x' or 'y'.\n\t* - `v` is the value of the data point where the label is shown.\n\t* - `id` is the id of the data where the label is shown.\n\t* - `i` is the index of the data series point where the label is shown.\n\t* - `texts` is an array of whole corresponding data series' text labels.<br><br>\n\t* @property {number} [data.labels.position.x=0] x coordinate position, relative to the original.\n\t* @property {number} [data.labels.position.y=0] y coordinate position, relative to the original.\n\t* @property {object} [data.labels.rotate] Rotate label text. Specify degree value in a range of `0 ~ 360`.\n\t* - **NOTE:** Depending on the rotate value, the text position needs to be adjusted manually(using `data.labels.position` option) to be shown nicely.\n\t* @property {boolean|object} [data.labels.border=false] Add border to data label text. NOTE: When set as `true`, styling isn't applied. Hence, you need to set it using `.bb-text-border` class.\n\t* @property {number|string|object} [data.labels.border.padding=\"3 5\"] Border padding. Can be a single number, string or object with top, bottom, left, right properties.\n\t* @property {number} [data.labels.border.radius=10] Border radius value.\n\t* @property {number} [data.labels.border.strokeWidth=1] Border stroke width.\n\t* @property {string} [data.labels.border.stroke=\"#000\"] Border stroke color.\n\t* @property {string} [data.labels.border.fill=\"none\"] Border fill color.\n\t* @property {object|function} [data.labels.image] Set image to be displayed next to the label text.<br><br>\n\t* When a function is specified, it will receive 3 arguments such as `v, id, i` and it must return an image object with `url`, `width`, `height`, and optional `pos` properties.<br><br>\n\t* The arguments are:<br>\n\t* - `v` is the value of the data point where the label is shown.\n\t* - `id` is the id of the data where the label is shown.\n\t* - `i` is the index of the data series point where the label is shown.\n\t* @property {string} data.labels.image.url Image URL path. Can use placeholder `{=ID}` which will be replaced with the data ID.\n\t* @property {number} data.labels.image.width Image width in pixels.\n\t* @property {number} data.labels.image.height Image height in pixels.\n\t* @property {object} [data.labels.image.pos] Image position relative to the label text.\n\t* @property {number} [data.labels.image.pos.x=0] x coordinate position, relative to the original.\n\t* @property {number} [data.labels.image.pos.y=0] y coordinate position, relative to the original.\n\t* @memberof Options\n\t* @type {object}\n\t* @default {}\n\t* @see [Demo](https://naver.github.io/billboard.js/demo/#Data.DataLabel)\n\t* @see [Demo: label border](https://naver.github.io/billboard.js/demo/#Data.DataLabelBorder)\n\t* @see [Demo: label colors](https://naver.github.io/billboard.js/demo/#Data.DataLabelColors)\n\t* @see [Demo: label format](https://naver.github.io/billboard.js/demo/#Data.DataLabelFormat)\n\t* @see [Demo: label image](https://naver.github.io/billboard.js/demo/#Data.DataLabelImage)\n\t* @see [Demo: label multiline](https://naver.github.io/billboard.js/demo/#Data.DataLabelMultiline)\n\t* @see [Demo: label overlap](https://naver.github.io/billboard.js/demo/#Data.DataLabelOverlap)\n\t* @see [Demo: label position](https://naver.github.io/billboard.js/demo/#Data.DataLabelPosition)\n\t* @see [Demo: label rotate](https://naver.github.io/billboard.js/demo/#Data.DataLabelRotate)\n\t* @example\n\t* data: {\n\t* labels: true,\n\t*\n\t* // or set specific options\n\t* labels: {\n\t* format: function(v, id, i, texts) {\n\t* ...\n\t* // to multiline, return with '\\n' character\n\t* return \"Line1\\nLine2\";\n\t* },\n\t*\n\t* // it's possible to set for each data\n\t* format: {\n\t* data1: function(v, id, i, texts) { ... },\n\t* ...\n\t* },\n\t*\n\t* // align text to center of the 'bar' shape (works only for 'bar' type)\n\t* centered: true,\n\t*\n\t* // apply background color for label texts\n\t* backgroundColors: \"red\",\n\t*\n\t* // set different background colors per dataset\n\t* backgroundColors: {\n\t* data1: \"green\",\n\t* data2: \"yellow\"\n\t* },\n\t*\n\t* // call back for label text background color\n\t* backgroundColors: function(color, d) {\n\t* // color: the default data label color string\n\t* // data: ex) {x: 0, value: 200, id: \"data3\", index: 0}\n\t* ....\n\t* return d.value > 200 ? \"cyan\" : \"red\";\n\t* },\n\t*\n\t* // apply for all label texts\n\t* colors: \"red\",\n\t*\n\t* // set different colors per dataset\n\t* // for not specified dataset, will have the default color value\n\t* colors: {\n\t* data1: \"yellow\",\n\t* data3: \"green\"\n\t* },\n\t*\n\t* // call back for label text color\n\t* colors: function(color, d) {\n\t* // color: the default data label color string\n\t* // data: ex) {x: 0, value: 200, id: \"data3\", index: 0}\n\t* ....\n\t* return d.value > 200 ? \"cyan\" : color;\n\t* },\n\t*\n\t* // return x, y coordinate position\n\t* // apt to handle each text position manually\n\t* position: function(type, v, id, i, texts) {\n\t* ...\n\t* return type == \"x\" ? 10 : 20;\n\t* },\n\t*\n\t* // set x, y coordinate position\n\t* position: {\n\t* x: -10,\n\t* y: 10\n\t* },\n\t*\n\t* // or set x, y coordinate position by each dataset\n\t* position: {\n\t* data1: {x: 5, y: 5},\n\t* data2: {x: 10, y: -20}\n\t* },\n\t*\n\t* \t // rotate degree for label text\n\t* rotate: 90,\n\t*\n\t* // add border to data label text\n\t* // NOTE: When set as `true`, styling aren't applied. Hence, need to set using '.bb-text-border' class.\n\t* // ex. \".bb-text-border { fill: red; stroke: #000; stroke-width: 2px; rx: 10px; ry: 10px; }\"\n\t* border: true,\n\t*\n\t* // or set detailed border options\n\t* border: {\n\t* padding: 10, // set all padding to 10\n\t* padding: \"5 10\", // set top and bottom padding to 5, left and right padding to 10\n\t* padding: { // specify each padding\n\t* top: 3,\n\t* bottom: 5,\n\t* left: 10,\n\t* right: 13\n\t* },\n\t* radius: 10,\n\t* strokeWidth: 2,\n\t* stroke: \"#000\",\n\t* fill: \"red\"\n\t* },\n\t*\n\t* // set image to be displayed next to the label text\n\t* image: {\n\t* url: \"./sample.svg\",\n\t*\n\t* // use placeholder to dynamically set image URL based on data ID\n\t* url: \"./images/{=ID}.svg\", // will be replaced to \"./images/data1.svg\", \"./images/data2.svg\", etc.\n\t* width: 35,\n\t* height: 35,\n\t* pos: {\n\t* x: 0,\n\t* y: 0\n\t* }\n\t* },\n\t*\n\t* // or use function to return image configuration dynamically\n\t* image: function(v, id, i) {\n\t* // v is the value of the data point where the label is shown.\n\t* // id is the id of the data where the label is shown.\n\t* // i is the index of the data series point where the label is shown.\n\t*\n\t* // Return different images based on value\n\t* if (v > 500) {\n\t* return {\n\t* url: \"./high-value.svg\",\n\t* width: 40,\n\t* height: 40,\n\t* pos: { x: 0, y: 0 }\n\t* };\n\t* } else if (v > 100) {\n\t* return {\n\t* url: \"./medium-value.svg\",\n\t* width: 30,\n\t* height: 30,\n\t* pos: { x: 0, y: 0 }\n\t* };\n\t* } else if(v < 5) {\n\t* \t// Return falsy value in case you don't want to show image\n\t* return null;\n\t* } else {\n\t* return {\n\t* url: \"./low-value.svg\",\n\t* width: 20,\n\t* height: 20,\n\t* pos: { x: 0, y: 0 }\n\t* };\n\t* }\n\t* }\n\t* }\n\t* }\n\t*/\n\tdata_labels: {},\n\tdata_labels_backgroundColors: void 0,\n\tdata_labels_colors: void 0,\n\tdata_labels_position: {},\n\tdata_labels_imgUrl: void 0,\n\t/**\n\t* Hide each data when the chart appears.<br><br>\n\t* If true is specified, all of data will be hidden. If multiple ids are specified as an array, those will be hidden.\n\t* @name data․hide\n\t* @memberof Options\n\t* @type {boolean|Array}\n\t* @default false\n\t* @example\n\t* data: {\n\t* // all of data will be hidden\n\t* hide: true\n\t*\n\t* // specified data will be hidden\n\t* hide: [\"data1\", ...]\n\t* }\n\t*/\n\tdata_hide: false,\n\t/**\n\t* Filter values to be shown\n\t* The data value is the same as the returned by `.data()`.\n\t* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter\n\t* @name data․filter\n\t* @memberof Options\n\t* @type {function}\n\t* @default undefined\n\t* @example\n\t* data: {\n\t* // filter for id value\n\t* filter: function(v) {\n\t* // v: [{id: \"data1\", id_org: \"data1\", values: [\n\t* // {x: 0, value: 130, id: \"data2\", index: 0}, ...]\n\t* // }, ...]\n\t* return v.id !== \"data1\";\n\t* }\n\t*/\n\tdata_filter: void 0,\n\t/**\n\t* Set a callback for click event on each data point.<br><br>\n\t* This callback will be called when each data point is clicked and will receive `d` and element as the arguments.\n\t* - `d` is the data clicked and element is the element clicked.\n\t* - `element` is the current interacting svg element.\n\t* - In this callback, `this` will be the Chart object.\n\t* @name data․onclick\n\t* @memberof Options\n\t* @type {function}\n\t* @default function() {}\n\t* @example\n\t* data: {\n\t* onclick: function(d, element) {\n\t* // d - ex) {x: 4, value: 150, id: \"data1\", index: 4, name: \"data1\"}\n\t* // element - <circle>\n\t* ...\n\t* }\n\t* }\n\t*/\n\tdata_onclick: () => {},\n\t/**\n\t* Set a callback for mouse/touch over event on each data point.<br><br>\n\t* This callback will be called when the mouse cursor or touch moves onto each data point and will receive `d` and `element` as the argument.\n\t* - `d` is the data where mouse cursor moves onto.\n\t* - `element` is the current interacting svg element.\n\t* - In this callback, `this` will be the Chart object.\n\t* @name data․onover\n\t* @memberof Options\n\t* @type {function}\n\t* @default function() {}\n\t* @example\n\t* data: {\n\t* onover: function(d, element) {\n\t* // d - ex) {x: 4, value: 150, id: \"data1\", index: 4}\n\t* // element - <circle>\n\t* ...\n\t* }\n\t* }\n\t*/\n\tdata_onover: () => {},\n\t/**\n\t* Set a callback for mouse/touch out event on each data point.<br><br>\n\t* This callback will be called when the mouse cursor or touch moves out each data point and will receive `d` as the argument.\n\t* - `d` is the data where mouse cursor moves out.\n\t* - `element` is the current interacting svg element.\n\t* - In this callback, `this` will be the Chart object.\n\t* @name data․onout\n\t* @memberof Options\n\t* @type {function}\n\t* @default function() {}\n\t* @example\n\t* data: {\n\t* onout: function(d, element) {\n\t* // d - ex) {x: 4, value: 150, id: \"data1\", index: 4}\n\t* // element - <circle>\n\t* ...\n\t* }\n\t* }\n\t*/\n\tdata_onout: () => {},\n\t/**\n\t* Set a callback for when data is shown.<br>\n\t* The callback will receive shown data ids in array.\n\t* @name data․onshown\n\t* @memberof Options\n\t* @type {function}\n\t* @default undefined\n\t* @example\n\t* data: {\n\t* onshown: function(ids) {\n\t* // ids - [\"data1\", \"data2\", ...]\n\t* ...\n\t* }\n\t* }\n\t*/\n\tdata_onshown: void 0,\n\t/**\n\t* Set a callback for when data is hidden.<br>\n\t* The callback will receive hidden data ids in array.\n\t* @name data․onhidden\n\t* @memberof Options\n\t* @type {function}\n\t* @default undefined\n\t* @example\n\t* data: {\n\t* onhidden: function(ids) {\n\t* // ids - [\"data1\", \"data2\", ...]\n\t* ...\n\t* }\n\t* }\n\t*/\n\tdata_onhidden: void 0,\n\t/**\n\t* Set a callback for minimum data\n\t* - **NOTE:** For 'area-line-range', 'area-step-range' and 'area-spline-range', `mid` data will be taken for the comparison\n\t* @name data․onmin\n\t* @memberof Options\n\t* @type {function}\n\t* @default undefined\n\t* @see [Demo](https://naver.github.io/billboard.js/demo/#Data.OnMinMaxCallback)\n\t* @example\n\t* onmin: function(data) {\n\t* // data - ex) [{x: 3, value: 400, id: \"data1\", index: 3}, ... ]\n\t* ...\n\t* }\n\t*/\n\tdata_onmin: void 0,\n\t/**\n\t* Set a callback for maximum data\n\t* - **NOTE:** For 'area-line-range', 'area-step-range' and 'area-spline-range', `mid` data will be taken for the comparison\n\t* @name data․onmax\n\t* @memberof Options\n\t* @type {function}\n\t* @default undefined\n\t* @see [Demo](https://naver.github.io/billboard.js/demo/#Data.OnMinMaxCallback)\n\t* @example\n\t* onmax: function(data) {\n\t* // data - ex) [{x: 3, value: 400, id: \"data1\", index: 3}, ... ]\n\t* ...\n\t* }\n\t*/\n\tdata_onmax: void 0,\n\t/**\n\t* Load a CSV or JSON file from a URL. NOTE that this will not work if loading via the \"file://\" protocol as most browsers will block XMLHTTPRequests.\n\t* @name data․url\n\t* @memberof Options\n\t* @type {string}\n\t* @default undefined\n\t* @see [Demo](https://naver.github.io/billboard.js/demo/#Data.LoadData)\n\t* @example\n\t* data: {\n\t* url: \"/data/test.csv\"\n\t* }\n\t*/\n\tdata_url: void 0,\n\t/**\n\t* XHR header value\n\t* - **NOTE:** Should be used with `data.url` option\n\t* @name data․headers\n\t* @memberof Options\n\t* @type {string}\n\t* @default undefined\n\t* @see https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/setRequestHeader\n\t* @example\n\t* data: {\n\t* url: \"/data/test.csv\",\n\t* headers: {\n\t* \"Content-Type\": \"text/xml\",\n\t* ...\n\t* }\n\t* }\n\t*/\n\tdata_headers: void 0,\n\t/**\n\t* Parse a JSON object for data. See also data.keys.\n\t* @name data․json\n\t* @memberof Options\n\t* @type {Array}\n\t* @default undefined\n\t* @see [data․keys](#.data%25E2%2580%25A4keys)\n\t* @see [Demo](https://naver.github.io/billboard.js/demo/#Data.JSONData)\n\t* @example\n\t* data: {\n\t* json: [\n\t* {name: \"www.site1.com\", upload: 200, download: 200, total: 400},\n\t* {name: \"www.site2.com\", upload: 100, download: 300, total: 400},\n\t* {name: \"www.site3.com\", upload: 300, download: 200, total: 500},\n\t* {name: \"www.site4.com\", upload: 400, download: 100, total: 500}\n\t* ],\n\t* keys: {\n\t* // case 1: specify 'x' key for category axis\n\t* x: \"name\", // 'name' key will be used as category x axis values\n\t* value: [\"upload\", \"download\"]\n\t*\n\t* // case 2: without 'x' key for non-category axis\n\t* value: [\"upload\", \"download\"]\n\t* }\n\t* }\n\t*/\n\tdata_json: void 0,\n\t/**\n\t* Load data from a multidimensional array, with the first element containing the data names, the following containing related data in that order.\n\t* @name data․rows\n\t* @memberof Options\n\t* @type {Array}\n\t* @default undefined\n\t* @see [Demo](https://naver.github.io/billboard.js/demo/#Data.RowOrientedData)\n\t* @example\n\t* data: {\n\t* rows: [\n\t* [\"A\", \"B\", \"C\"],\n\t* [90, 120, 300],\n\t* [40, 160, 240],\n\t* [50, 200, 290],\n\t* [120, 160, 230],\n\t* [80, 130, 300],\n\t* [90, 220, 320]\n\t* ]\n\t* }\n\t*\n\t* // for 'bar' type, data can contain:\n\t* // - an array of [start, end] data following the order\n\t* data: {\n\t* rows: [\n\t* [\"data1\", \"data2\"],\n\t* [[100, 150], 120],\n\t* [[200, 300], 55],\n\t* [[-400, 500], 60]\n\t* ],\n\t* type: \"bar\"\n\t* }\n\t*\n\t* // for 'range' types('area-line-range' or 'area-step-range' or 'area-spline-range'), data should contain:\n\t* // - an array of [high, mid, low] data following the order\n\t* // - or an object with 'high', 'mid' and 'low' key value\n\t* data: {\n\t* rows: [\n\t* [\"data1\", \"data2\"],\n\t* [\n\t* // or {high:150, mid: 140, low: 110}, 120\n\t* [150, 140, 110], 120\n\t* ],\n\t* [[155, 130, 115], 55],\n\t* [[160, 135, 120], 60]\n\t* ],\n\t* types: {\n\t* data1: \"area-line-range\",\n\t* data2: \"line\"\n\t* }\n\t* }\n\t*\n\t* // for 'bubble' type, data can contain dimension value:\n\t* // - an array of [y, z] data following the order\n\t* // - or an object with 'y' and 'z' key value\n\t* // 'y' is for y axis coordination and 'z' is the bubble radius value\n\t* data: {\n\t* rows: [\n\t* [\"data1\", \"data2\"],\n\t* [\n\t* // or {y:10, z: 140}, 120\n\t* [10, 140], 120\n\t* ],\n\t* [[100, 30], 55],\n\t* [[50, 100], 60]\n\t* ],\n\t* types: {\n\t* data1: \"bubble\",\n\t* data2: \"line\"\n\t* }\n\t* }\n\t*\n\t* // for 'candlestick' type, data should contain:\n\t* // - an array of [open, high, low, close, volume(optional)] data following the order\n\t* // - or an object with 'open', 'high', 'low', 'close' and 'value'(optional) key value\n\t* data: {\n\t* rows: [\n\t* [\"data1\", \"data2\"],\n\t* \t\t[\n\t* \t\t\t// open, high, low, close, volume (optional)\n\t* \t\t\t{open: 1300, high: 1369, low: 1200, close: 1339, volume: 100},\n\t* \t\t\t[1000, 1100, 850, 870]\n\t* \t\t],\n\t* \t\t[\n\t* \t\t\t{open: 1348, high: 1371, low: 1271, close: 1320},\n\t* \t\t\t[870, 1250, 830, 1200, 50]\n\t* \t\t]\n\t* ],\n\t* type: \"candlestick\"\n\t* }\n\t*/\n\tdata_rows: void 0,\n\t/**\n\t* Load data from a multidimensional array, with each element containing an array consisting of a datum name and associated data values.\n\t* @name data․columns\n\t* @memberof Options\n\t* @type {Array}\n\t* @default undefined\n\t* @see [Demo](https://naver.github.io/billboard.js/demo/#Data.ColumnOrientedData)\n\t* @example\n\t* data: {\n\t* columns: [\n\t* [\"data1\", 30, 20, 50, 40, 60, 50],\n\t* [\"data2\", 200, 130, 90, 240, 130, 220],\n\t* [\"data3\", 300, 200, 160, 400, 250, 250]\n\t* ]\n\t* }\n\t*\n\t* // for 'bar' type, data can contain:\n\t* // - an array of [start, end] data following the order\n\t* data: {\n\t* columns: [\n\t* [\"data1\", -100, 50, [100, 200], [200, 300]],\n\t* [\"data2\", -200, 300, [-100, 100], [-50, -30]],\n\t* ],\n\t* type: \"bar\"\n\t* }\n\t*\n\t* // for 'range' types('area-line-range' or 'area-step-range' or 'area-spline-range'), data should contain:\n\t* // - an array of [high, mid, low] data following the order\n\t* // - or an object with 'high', 'mid' and 'low' key value\n\t* data: {\n\t* columns: [\n\t* [\"data1\",\n\t* [150, 140, 110], // or {high:150, mid: 140, low: 110}\n\t* [150, 140, 110],\n\t* [150, 140, 110]\n\t* ]\n\t* ],\n\t* type: \"area-line-range\"\n\t* }\n\t*\n\t* // for 'bubble' type, data can contain dimension value:\n\t* // - an array of [y, z] data following the order\n\t* // - or an object with 'y' and 'z' key value\n\t* // 'y' is for y axis coordination and 'z' is the bubble radius value\n\t* data: {\n\t* columns: [\n\t* [\"data1\",\n\t* [10, 140], // or {y:10, z: 140}\n\t* [100, 30],\n\t* [50, 100]\n\t* ]\n\t* ],\n\t* type: \"bubble\"\n\t* }\n\t*\n\t* // for 'candlestick' type, data should contain:\n\t* // - an array of [open, high, low, close, volume(optional)] data following the order\n\t* // - or an object with 'open', 'high', 'low', 'close' and 'value'(optional) key value\n\t* data: {\n\t* columns: [\n\t* [\"data1\",\n\t* [1000, 1100, 850, 870, 100], // or {open:1000, high: 1100, low: 870, volume: 100}\n\t* [870, 1250, 830, 1200] // 'volume' can be omitted\n\t* ]\n\t* ],\n\t* type: \"candlestick\"\n\t* }\n\t*/\n\tdata_columns: void 0,\n\t/**\n\t* Used if loading JSON via data.url.\n\t* - **Available Values:**\n\t* - json\n\t* - csv\n\t* - tsv\n\t* @name data․mimeType\n\t* @memberof Options\n\t* @type {string}\n\t* @default csv\n\t* @example\n\t* data: {\n\t* mimeType: \"json\"\n\t* }\n\t*/\n\tdata_mimeType: \"csv\",\n\t/**\n\t* Choose which JSON object keys correspond to desired data.\n\t* - **NOTE:** Only for JSON object given as array.\n\t* @name data․keys\n\t* @memberof Options\n\t* @type {string}\n\t* @default undefined\n\t* @example\n\t* data: {\n\t* json: [\n\t* {name: \"www.site1.com\", upload: 200, download: 200, total: 400},\n\t* {name: \"www.site2.com\", upload: 100, download: 300, total: 400},\n\t* {name: \"www.site3.com\", upload: 300, download: 200, total: 500},\n\t* {name: \"www.site4.com\", upload: 400, download: 100, total: 500}\n\t* ],\n\t* keys: {\n\t* // case 1: specify 'x' key for category axis\n\t* x: \"name\", // 'name' key will be used as category x axis values\n\t* value: [\"upload\", \"download\"]\n\t*\n\t* // case 2: without 'x' key for non-category axis\n\t* value: [\"upload\", \"download\"]\n\t* }\n\t* }\n\t*/\n\tdata_keys: void 0,\n\t/**\n\t* Set text label to be displayed when there's no data to show.\n\t* - ex. Toggling all visible data to not be shown, unloading all current data, etc.\n\t* @name data․empty․label․text\n\t* @memberof Options\n\t* @type {string}\n\t* @default \"\"\n\t* @example\n\t* data: {\n\t* empty: {\n\t* label: {\n\t* text: \"No Data\"\n\t* }\n\t* }\n\t* }\n\t*/\n\tdata_empty_label_text: \"\"\n};\n//#endregion\nexport { data_default as default };\n","/*!\n* Copyright (c) 2017 ~ present NAVER Corp.\r\n * billboard.js project is licensed under the MIT license\r\n * \r\n * billboard.js, JavaScript chart library\r\n * https://naver.github.io/billboard.js/\r\n * \r\n * @version 4.1.0\n*/\n//#region src/config/Options/interaction/interaction.ts\n/**\n* Copyright (c) 2017 ~ present NAVER Corp.\n* billboard.js project is licensed under the MIT license\n*/\n/**\n* interaction config options\n*/\nvar interaction_default = {\n\t/**\n\t* Interaction options\n\t* @name interaction\n\t* @memberof Options\n\t* @type {object}\n\t* @property {object} interaction Intersection object\n\t* @property {boolean} [interaction.enabled=true] Indicate if the chart should have interactions.<br>\n\t* If `false` is set, all of interactions (showing/hiding tooltip, selection, mouse events, etc) will be disabled.\n\t* @property {boolean} [interaction.brighten=true] Make brighter for the selected area (ex. 'pie' type data selected area)\n\t* @property {boolean} [interaction.inputType.mouse=true] enable or disable mouse interaction\n\t* @property {boolean} [interaction.inputType.touch=true] enable or disable touch interaction\n\t* @property {boolean|number} [interaction.inputType.touch.preventDefault=false] enable or disable to call event.preventDefault on touchstart & touchmove event. It's usually used to prevent document scrolling.<br>\n\t* - **NOTE**: When `true` is set, touch events are bound with [`{passive: false}`](https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener#using_passive_listeners) option.\n\t* @property {boolean} [interaction.onout=true] Enable or disable \"onout\" event.<br>\n\t* \t\tWhen is disabled, defocus(hiding tooltip, focused gridline, etc.) event won't work.\n\t* @see [Demo: touch.preventDefault](https://naver.github.io/billboard.js/demo/#Interaction.PreventScrollOnTouch)\n\t* @example\n\t* interaction: {\n\t* enabled: false,\n\t* brighten: false,\n\t* inputType: {\n\t* mouse: true,\n\t* touch: false\n\t*\n\t* // or declare preventDefault explicitly.\n\t* // In this case touch inputType is enabled by default\n\t* touch: {\n\t* preventDefault: true\n\t*\n\t* // or threshold pixel value (pixel moved from touchstart to touchmove)\n\t* preventDefault: 5\n\t* }\n\t* },\n\t*\n\t* // disable \"onout\" event\n\t* onout: false\n\t* }\n\t*/\n\tinteraction_enabled: true,\n\tinteraction_brighten: true,\n\tinteraction_inputType_mouse: true,\n\tinteraction_inputType_touch: {},\n\tinteraction_onout: true\n};\n//#endregion\nexport { interaction_default as default };\n","/*!\n* Copyright (c) 2017 ~ present NAVER Corp.\r\n * billboard.js project is licensed under the MIT license\r\n * \r\n * billboard.js, JavaScript chart library\r\n * https://naver.github.io/billboard.js/\r\n * \r\n * @version 4.1.0\n*/\nimport { deepClone } from \"../../module/util/object.js\";\nimport boost_default from \"./common/boost.js\";\nimport color_default from \"./common/color.js\";\nimport legend_default from \"./common/legend.js\";\nimport main_default from \"./common/main.js\";\nimport title_default from \"./common/title.js\";\nimport tooltip_default from \"./common/tooltip.js\";\nimport data_default from \"./data/data.js\";\nimport interaction_default from \"./interaction/interaction.js\";\n//#region src/config/Options/Options.ts\n/**\n* Copyright (c) 2017 ~ present NAVER Corp.\n* billboard.js project is licensed under the MIT license\n*/\n/**\n* Class to set options on generating chart.\n* - It's instantiated internally, not exposed for public.\n* @class Options\n* @see {@link bb.generate} to use these options on generating the chart\n*/\nvar Options = class Options {\n\tstatic data = {};\n\tstatic setOptions(options) {\n\t\tfor (let i = 0; i < options.length; i++) Object.assign(this.data, options[i]);\n\t}\n\tconstructor() {\n\t\treturn deepClone(main_default, boost_default, data_default, color_default, interaction_default, legend_default, title_default, tooltip_default, Options.data);\n\t}\n};\n//#endregion\nexport { Options as default };\n","/*!\n* Copyright (c) 2017 ~ present NAVER Corp.\r\n * billboard.js project is licensed under the MIT license\r\n * \r\n * billboard.js, JavaScript chart library\r\n * https://naver.github.io/billboard.js/\r\n * \r\n * @version 4.1.0\n*/\n//#region src/config/Store/Element.ts\n/**\n* Elements class.\n* @class Elements\n* @ignore\n* @private\n*/\nvar Element = class {\n\tconstructor() {\n\t\treturn {\n\t\t\tchart: null,\n\t\t\tmain: null,\n\t\t\tsvg: null,\n\t\t\taxis: {\n\t\t\t\tx: null,\n\t\t\t\ty: null,\n\t\t\t\ty2: null,\n\t\t\t\tsubX: null,\n\t\t\t\tsubY: null,\n\t\t\t\tsubY2: null\n\t\t\t},\n\t\t\taxisTooltip: {\n\t\t\t\tx: null,\n\t\t\t\ty: null,\n\t\t\t\ty2: null\n\t\t\t},\n\t\t\tdefs: null,\n\t\t\ttooltip: null,\n\t\t\tlegend: null,\n\t\t\ttitle: null,\n\t\t\tsubchart: {\n\t\t\t\tmain: null,\n\t\t\t\tbar: null,\n\t\t\t\tline: null,\n\t\t\t\tarea: null\n\t\t\t},\n\t\t\tarcs: null,\n\t\t\tbar: null,\n\t\t\tcandlestick: null,\n\t\t\tline: null,\n\t\t\tarea: null,\n\t\t\tcircle: null,\n\t\t\tradar: null,\n\t\t\ttext: null,\n\t\t\tgrid: {\n\t\t\t\tmain: null,\n\t\t\t\tx: null,\n\t\t\t\ty: null\n\t\t\t},\n\t\t\tgridLines: {\n\t\t\t\tmain: null,\n\t\t\t\tx: null,\n\t\t\t\ty: null\n\t\t\t},\n\t\t\tregion: {\n\t\t\t\tmain: null,\n\t\t\t\tlist: null\n\t\t\t},\n\t\t\teventRect: null,\n\t\t\tzoomResetBtn: null\n\t\t};\n\t}\n};\n//#endregion\nexport { Element as default };\n","/*!\n* Copyright (c) 2017 ~ present NAVER Corp.\r\n * billboard.js project is licensed under the MIT license\r\n * \r\n * billboard.js, JavaScript chart library\r\n * https://naver.github.io/billboard.js/\r\n * \r\n * @version 4.1.0\n*/\n//#region src/config/Store/State.ts\n/**\n* Copyright (c) 2017 ~ present NAVER Corp.\n* billboard.js project is licensed under the MIT license\n*/\n/**\n* State class.\n* @class State\n* @ignore\n* @private\n*/\nvar State = class {\n\tconstructor() {\n\t\treturn {\n\t\t\twidth: 0,\n\t\t\twidth2: 0,\n\t\t\theight: 0,\n\t\t\theight2: 0,\n\t\t\tmargin: {\n\t\t\t\ttop: 0,\n\t\t\t\tbottom: 0,\n\t\t\t\tleft: 0,\n\t\t\t\tright: 0\n\t\t\t},\n\t\t\tmargin2: {\n\t\t\t\ttop: 0,\n\t\t\t\tbottom: 0,\n\t\t\t\tleft: 0,\n\t\t\t\tright: 0\n\t\t\t},\n\t\t\tmargin3: {\n\t\t\t\ttop: 0,\n\t\t\t\tbottom: 0,\n\t\t\t\tleft: 0,\n\t\t\t\tright: 0\n\t\t\t},\n\t\t\tarcWidth: 0,\n\t\t\tarcHeight: 0,\n\t\t\txAxisHeight: 0,\n\t\t\thasAxis: false,\n\t\t\thasFunnel: false,\n\t\t\thasRadar: false,\n\t\t\thasTreemap: false,\n\t\t\tisCanvasMode: false,\n\t\t\tcanvasShape: null,\n\t\t\tcanvasFocusKey: null,\n\t\t\tcanvasSubchartBrushDragging: false,\n\t\t\tcanvasSubchartBrushMode: null,\n\t\t\tcanvasSubchartBrushStart: null,\n\t\t\tcanvasSubchartBrushOrigin: null,\n\t\t\tcanvasSubchartBrushMoved: false,\n\t\t\tcanvasFlowFrame: null,\n\t\t\tcanvasFlowFinish: null,\n\t\t\tcanvasFocusMainRedraw: false,\n\t\t\tcssRule: {},\n\t\t\tloading: void 0,\n\t\t\tdomain: void 0,\n\t\t\tsubchartSourceTypes: void 0,\n\t\t\tcurrent: {\n\t\t\t\tdomain: void 0,\n\t\t\t\twidth: 0,\n\t\t\t\theight: 0,\n\t\t\t\tdataMax: 0,\n\t\t\t\tmaxTickSize: {\n\t\t\t\t\tx: {\n\t\t\t\t\t\twidth: 0,\n\t\t\t\t\t\theight: 0,\n\t\t\t\t\t\tticks: [],\n\t\t\t\t\t\tclipPath: 0,\n\t\t\t\t\t\tdomain: \"\"\n\t\t\t\t\t},\n\t\t\t\t\ty: {\n\t\t\t\t\t\twidth: 0,\n\t\t\t\t\t\theight: 0,\n\t\t\t\t\t\tdomain: \"\"\n\t\t\t\t\t},\n\t\t\t\t\ty2: {\n\t\t\t\t\t\twidth: 0,\n\t\t\t\t\t\theight: 0,\n\t\t\t\t\t\tdomain: \"\"\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\ttypes: [],\n\t\t\t\tneedle: void 0,\n\t\t\t\tzoomDomain: null\n\t\t\t},\n\t\t\tisLegendRight: false,\n\t\t\tisLegendInset: false,\n\t\t\tisLegendTop: false,\n\t\t\tisLegendLeft: false,\n\t\t\tlegendStep: 0,\n\t\t\tlegendItemWidth: 0,\n\t\t\tlegendItemHeight: 0,\n\t\t\tlegendHasRendered: false,\n\t\t\tcanvasInlineStyle: { minHeight: \"\" },\n\t\t\tcanvasSelection: /* @__PURE__ */ new Set(),\n\t\t\tcanvasSelectionDragStart: null,\n\t\t\tcanvasSelectionDragIncluded: /* @__PURE__ */ new Set(),\n\t\t\tcanvasSelectionDragging: false,\n\t\t\tcanvasSelectionDragMoved: false,\n\t\t\tcanvasSelectionDragMoveHandler: null,\n\t\t\tcanvasSelectionDragEndHandler: null,\n\t\t\teventReceiver: {\n\t\t\t\tcurrentIdx: -1,\n\t\t\t\trect: {},\n\t\t\t\tdata: [],\n\t\t\t\tcoords: []\n\t\t\t},\n\t\t\taxis: { x: {\n\t\t\t\tpadding: {\n\t\t\t\t\tleft: 0,\n\t\t\t\t\tright: 0\n\t\t\t\t},\n\t\t\t\ttickCount: 0\n\t\t\t} },\n\t\t\trotatedPadding: {\n\t\t\t\tleft: 30,\n\t\t\t\tright: 0,\n\t\t\t\ttop: 5\n\t\t\t},\n\t\t\twithoutFadeIn: {},\n\t\t\tinputType: \"\",\n\t\t\tdatetimeId: \"\",\n\t\t\tclip: {\n\t\t\t\tid: \"\",\n\t\t\t\tidXAxis: \"\",\n\t\t\t\tidYAxis: \"\",\n\t\t\t\tidXAxisTickTexts: \"\",\n\t\t\t\tidGrid: \"\",\n\t\t\t\tidSubchart: \"\",\n\t\t\t\tpath: \"\",\n\t\t\t\tpathXAxis: \"\",\n\t\t\t\tpathYAxis: \"\",\n\t\t\t\tpathXAxisTickTexts: \"\",\n\t\t\t\tpathGrid: \"\"\n\t\t\t},\n\t\t\tevent: null,\n\t\t\tdragStart: null,\n\t\t\tdragging: false,\n\t\t\tflowing: false,\n\t\t\tcancelClick: false,\n\t\t\tmouseover: false,\n\t\t\trendered: false,\n\t\t\ttransiting: false,\n\t\t\tredrawing: false,\n\t\t\tresizing: false,\n\t\t\tresizePreview: false,\n\t\t\tresizeRedrawTime: 0,\n\t\t\tresizeLiveScale: null,\n\t\t\ttoggling: false,\n\t\t\tzooming: false,\n\t\t\thasNegativeValue: false,\n\t\t\thasPositiveValue: true,\n\t\t\torgAreaOpacity: \"0.2\",\n\t\t\torgConfig: {},\n\t\t\thiddenTargetIds: /* @__PURE__ */ new Set(),\n\t\t\thiddenLegendIds: /* @__PURE__ */ new Set(),\n\t\t\tfocusedTargetIds: /* @__PURE__ */ new Set(),\n\t\t\tdefocusedTargetIds: /* @__PURE__ */ new Set(),\n\t\t\tradius: 0,\n\t\t\tinnerRadius: 0,\n\t\t\touterRadius: void 0,\n\t\t\tinnerRadiusRatio: 0,\n\t\t\tgaugeArcWidth: 0,\n\t\t\tradiusExpanded: 0,\n\t\t\txgridAttr: {\n\t\t\t\tx1: null,\n\t\t\t\tx2: null,\n\t\t\t\ty1: null,\n\t\t\t\ty2: null\n\t\t\t},\n\t\t\tpendingRaf: null,\n\t\t\trafBatchQueue: [],\n\t\t\tdirty: {\n\t\t\t\tdata: false,\n\t\t\t\tvisibility: false,\n\t\t\t\tsize: false\n\t\t\t},\n\t\t\tredrawGeneration: 0,\n\t\t\tdataGeneration: 0,\n\t\t\t_targetsToShow: null,\n\t\t\t_cachedDrawShape: null,\n\t\t\t_canvasVisibleRangeCache: null,\n\t\t\t_canvasXDataTickCache: null,\n\t\t\t_canvasXTickValuesCache: null,\n\t\t\t_eventRectFingerprint: null,\n\t\t\t_lastTooltipMouse: null,\n\t\t\t_gridFocusEl: null,\n\t\t\tgenerateClassCache: /* @__PURE__ */ new Map()\n\t\t};\n\t}\n};\n//#endregion\nexport { State as default };\n","/*!\n* Copyright (c) 2017 ~ present NAVER Corp.\r\n * billboard.js project is licensed under the MIT license\r\n * \r\n * billboard.js, JavaScript chart library\r\n * https://naver.github.io/billboard.js/\r\n * \r\n * @version 4.1.0\n*/\nimport Element from \"./Element.js\";\nimport State from \"./State.js\";\n//#region src/config/Store/Store.ts\n/**\n* Copyright (c) 2017 ~ present NAVER Corp.\n* billboard.js project is licensed under the MIT license\n*/\nconst classes = {\n\telement: Element,\n\tstate: State\n};\n/**\n* Internal store class.\n* @class Store\n* @ignore\n* @private\n*/\nvar Store = class {\n\tconstructor() {\n\t\tObject.keys(classes).forEach((v) => {\n\t\t\tthis[v] = new classes[v]();\n\t\t});\n\t}\n\tgetStore(name) {\n\t\treturn this[name];\n\t}\n};\n//#endregion\nexport { Store as default };\n","/*!\n* Copyright (c) 2017 ~ present NAVER Corp.\r\n * billboard.js project is licensed under the MIT license\r\n * \r\n * billboard.js, JavaScript chart library\r\n * https://naver.github.io/billboard.js/\r\n * \r\n * @version 4.1.0\n*/\nimport { isString } from \"./util/type-checks.js\";\n//#region src/module/Cache.ts\n/**\n* Constant for cache key\n* - NOTE: Prefixed with '$', will be resetted when .load() is called\n* @private\n*/\nconst KEY = {\n\tbubbleBaseLength: \"$baseLength\",\n\tbubbleMaxValue: \"$bubbleMaxValue\",\n\tcolorPattern: \"__colorPattern__\",\n\tdataMinMax: \"$dataMinMax\",\n\tdataTotalSum: \"$dataTotalSum\",\n\tdataTotalPerIndex: \"$totalPerIndex\",\n\tvisibleTotalPerIndex: \"$visibleTotalPerIndex\",\n\tdomainMinMax: \"$domainMinMax\",\n\tfilteredTargets: \"$filteredTargets\",\n\tsvgLeft: \"$svgLeft\",\n\tvaluesByX: \"$valuesByX\",\n\tlegendItemTextBox: \"legendItemTextBox\",\n\tlegendItemMap: \"$legendItemMap\",\n\tradarPoints: \"$radarPoints\",\n\tradarTextWidth: \"$radarTextWidth\",\n\tsetOverOut: \"setOverOut\",\n\tcallOverOutForTouch: \"callOverOutForTouch\",\n\ttextRect: \"textRect\",\n\tshapeOffset: \"$shapeOffset\",\n\tmaxTickSize: \"$maxTickSize\",\n\tmaxDataCountTarget: \"$maxDataCountTarget\",\n\tvaluesXIndexMap: \"$valuesXIndexMap\"\n};\nvar Cache = class {\n\tcache = /* @__PURE__ */ new Map();\n\t/**\n\t* Add cache\n\t* @param {string} key Cache key\n\t* @param {string|number|boolean|object|Array|function|null|undefined} value Value to be stored\n\t* @param {boolean} isDataType Weather the cache is data typed '{id:'data', id_org: 'data', values: [{x:0, index:0,...}, ...]}'\n\t* @returns {string|number|boolean|object|Array|function|null|undefined} Added data value\n\t* @private\n\t*/\n\tadd(key, value, isDataType = false) {\n\t\tconst v = isDataType ? this.cloneTarget(value) : value;\n\t\tthis.cache.set(key, v);\n\t\treturn v;\n\t}\n\t/**\n\t* Remove cache\n\t* @param {string|Array} key Cache key\n\t* @private\n\t*/\n\tremove(key) {\n\t\tconst keys = isString(key) ? [key] : key;\n\t\tfor (let i = 0; i < keys.length; i++) this.cache.delete(keys[i]);\n\t}\n\t/**\n\t* Get cahce\n\t* @param {string|Array} key Cache key\n\t* @param {boolean} isDataType Weather the cache is data typed '{id:'data', id_org: 'data', values: [{x:0, index:0,...}, ...]}'\n\t* @returns {string|number|boolean|object|Array|function|null} Cached value\n\t* @private\n\t*/\n\tget(key, isDataType = false) {\n\t\tif (isDataType && Array.isArray(key)) {\n\t\t\tconst targets = [];\n\t\t\tfor (let i = 0, id; id = key[i]; i++) if (this.cache.has(id)) targets.push(this.cache.get(id));\n\t\t\treturn targets;\n\t\t} else return this.cache.has(key) ? this.cache.get(key) : null;\n\t}\n\t/**\n\t* Check if cache key exists\n\t* @param {string} key Cache key\n\t* @returns {boolean} True if key exists in cache\n\t* @private\n\t*/\n\thas(key) {\n\t\treturn this.cache.has(key);\n\t}\n\t/**\n\t* Get all cache keys\n\t* @returns {string[]} Array of cache keys\n\t* @private\n\t*/\n\tgetKeys() {\n\t\treturn Array.from(this.cache.keys());\n\t}\n\t/**\n\t* Reset cached data\n\t* @param {boolean} all true: reset all data, false: reset only '$' prefixed key data\n\t* @param {string[]} excludePrefixes Keys starting with any of these prefixes are preserved\n\t* @private\n\t*/\n\treset(all, excludePrefixes) {\n\t\tif (all) this.cache.clear();\n\t\telse this.cache.forEach((_, x) => {\n\t\t\tif (/^\\$/.test(x)) {\n\t\t\t\tif (!excludePrefixes?.some((prefix) => x.startsWith(prefix))) this.cache.delete(x);\n\t\t\t}\n\t\t});\n\t}\n\t/**\n\t* Clone data target object\n\t* @param {object} target Data object\n\t* @returns {object}\n\t* @private\n\t*/\n\tcloneTarget(target) {\n\t\treturn {\n\t\t\tid: target.id,\n\t\t\tid_org: target.id_org,\n\t\t\tvalues: target.values.map((d) => ({\n\t\t\t\tx: d.x,\n\t\t\t\tvalue: d.value,\n\t\t\t\tid: d.id\n\t\t\t}))\n\t\t};\n\t}\n};\n//#endregion\nexport { KEY, Cache as default };\n","/*!\n* Copyright (c) 2017 ~ present NAVER Corp.\r\n * billboard.js project is licensed under the MIT license\r\n * \r\n * billboard.js, JavaScript chart library\r\n * https://naver.github.io/billboard.js/\r\n * \r\n * @version 4.1.0\n*/\nimport { cancelAnimationFrame, cancelIdleCallback, requestAnimationFrame, requestIdleCallback, window as win } from \"./browser.js\";\nimport { isArray, isNumber } from \"./util/type-checks.js\";\nimport { runUntil } from \"./util/object.js\";\nimport { isTabVisible } from \"./util/dom.js\";\n//#region src/module/generator.ts\nconst { setTimeout, clearTimeout } = win;\n/**\n* Generate resize queue function\n* @param {boolean|number} option Resize option\n* @param {()=>void} live Called on every resize event, throttled by animation frame.\n* Used to reflect the size change before the delayed call takes place.\n* @returns {Fucntion}\n* @private\n*/\nfunction generateResize(option, live) {\n\tconst fn = [];\n\tlet timeout;\n\tlet rafId = null;\n\tconst callResizeFn = function() {\n\t\tcallResizeFn.clear();\n\t\tif (live && rafId === null) rafId = requestAnimationFrame(() => {\n\t\t\trafId = null;\n\t\t\tlive();\n\t\t});\n\t\tif (option === false) timeout = requestIdleCallback(() => {\n\t\t\ttimeout = null;\n\t\t\tfn.forEach((f) => f());\n\t\t}, { timeout: 200 });\n\t\telse timeout = setTimeout(() => {\n\t\t\ttimeout = null;\n\t\t\tfn.forEach((f) => f());\n\t\t}, isNumber(option) ? option : 200);\n\t};\n\tcallResizeFn.clear = () => {\n\t\tif (timeout) {\n\t\t\t(option === false ? cancelIdleCallback : clearTimeout)(timeout);\n\t\t\ttimeout = null;\n\t\t}\n\t};\n\tcallResizeFn.clearLive = () => {\n\t\tif (rafId !== null) {\n\t\t\tcancelAnimationFrame(rafId);\n\t\t\trafId = null;\n\t\t}\n\t};\n\tcallResizeFn.add = (f) => fn.push(f);\n\tcallResizeFn.remove = (f) => {\n\t\tconst index = fn.indexOf(f);\n\t\tindex !== -1 && fn.splice(index, 1);\n\t};\n\treturn callResizeFn;\n}\n/**\n* Generate transition queue function\n* @returns {function}\n* @private\n*/\nfunction generateWait() {\n\tlet transitionsToWait = [];\n\tconst f = function(selection, callback) {\n\t\t/**\n\t\t* Check if transition is complete\n\t\t* @returns {boolean} Whether transition is complete\n\t\t* @private\n\t\t*/\n\t\tfunction loop() {\n\t\t\tlet done = 0;\n\t\t\tfor (let i = 0, t; t = transitionsToWait[i]; i++) {\n\t\t\t\tif (t === true || t.empty?.()) {\n\t\t\t\t\tdone++;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (isTabVisible() === false) {\n\t\t\t\t\tdone = transitionsToWait.length;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\ttry {\n\t\t\t\t\tt.transition();\n\t\t\t\t} catch {\n\t\t\t\t\tdone++;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn done === transitionsToWait.length;\n\t\t}\n\t\trunUntil(() => {\n\t\t\tcallback?.();\n\t\t}, loop);\n\t};\n\tf.add = function(t) {\n\t\tisArray(t) ? transitionsToWait = transitionsToWait.concat(t) : transitionsToWait.push(t);\n\t};\n\treturn f;\n}\n//#endregion\nexport { generateResize, generateWait };\n","/*!\n* Copyright (c) 2017 ~ present NAVER Corp.\r\n * billboard.js project is licensed under the MIT license\r\n * \r\n * billboard.js, JavaScript chart library\r\n * https://naver.github.io/billboard.js/\r\n * \r\n * @version 4.1.0\n*/\nimport { window as win } from \"./browser.js\";\n//#region src/module/worker.ts\n/**\n* Copyright (c) 2017 ~ present NAVER Corp.\n* billboard.js project is licensed under the MIT license\n*/\n/**\n* The worker source constant (declared in config/globals.d.ts) is pre-bundled from\n* `src/module/worker.entry.ts` and injected at build time by config/worker-src.js.\n* Never name that constant outside the single reference in getWorkerSrc(): the\n* rolldown injection is textual, so a mention in a comment would inline the whole\n* source string a second time.\n*\n* Offloaded work is addressed by op name and the worker code is built\n* independently of the application bundle, so no application function is ever\n* stringified. Host toolchains that rewrite function bodies - coverage\n* instrumentation, babel helpers, bundler-hoisted module scope - cannot break\n* the worker anymore.\n*/\nconst cache = {};\nconst disabledKeys = /* @__PURE__ */ new Set();\n/**\n* Parity self-test state, keyed as `${key}:${op}`: the in-flight check while it runs,\n* `true` once the worker agreed with the main thread.\n* @private\n*/\nconst verifiedOps = /* @__PURE__ */ new Map();\nconst DEFAULT_WORKER_TIMEOUT = 5e3;\n/**\n* Number of leading entries kept when sampling arguments for the parity self-test.\n* @private\n*/\nconst VERIFY_SAMPLE_SIZE = 3;\nlet messageId = 0;\n/**\n* Get the build-injected worker source.\n* @returns {string} Worker source, or empty string when it wasn't injected\n* @private\n*/\nfunction getWorkerSrc() {\n\ttry {\n\t\treturn \"var bbWorker=(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});function t(e){let t=[];return e.forEach(function(e,n){let r=e[0];e.forEach(function(e,i){if(i>0){if(t[i-1]===void 0&&(t[i-1]={}),e===void 0)throw Error(`Source data is missing a component at (${n}, ${i})!`);t[i-1][r]=e}})}),t}function n(e){let t=e[0],n=[];return e.forEach(function(e,r){if(r>0){let i={};e.forEach(function(e,n){if(e===void 0)throw Error(`Source data is missing a component at (${r}, ${n})!`);i[t[n]]=e}),n.push(i)}}),n}function r(e,r){let i=[],a,o;if(Array.isArray(e)){let t=function(e,t){if(e[t]!==void 0)return e[t];let n=t.replace(/\\\\[(\\\\w+)\\\\]/g,`.$1`).replace(/^\\\\./,``).split(`.`),r=e;return n.some(function(e){return!(r=r&&typeof r==`object`&&e in r?r[e]:void 0)}),r};a=r.x?r.value.concat(r.x):r.value,i.push(a),e.forEach(function(e){let n=a.map(function(n){let r=t(e,n);return r===void 0&&(r=null),r});i.push(n)}),o=n(i)}else Object.keys(e).forEach(function(t){let n=[].concat(e[t]);n.unshift?.(t),i.push(n)}),o=t(i);return o}let i={columns:t,json:r,rows:n},a=self;function o({data:e}){let{args:t,id:n,op:r}=e;try{let e=i[r];if(!e)throw Error(`Unknown worker op: ${r}`);a.postMessage({id:n,result:e(...t)})}catch(e){a.postMessage({id:n,error:e&&(e.message||e.name)||String(e)})}}return typeof window>`u`&&(a.onmessage=o),e.handleMessage=o,e.ops=i,e})({});\";\n\t} catch {\n\t\treturn \"\";\n\t}\n}\n/**\n* Get Web Worker related browser APIs when all required primitives are available.\n* @returns {object|null} Worker API handles\n* @private\n*/\nfunction getWorkerAPI() {\n\tconst { Blob, Worker, URL } = win;\n\treturn Worker && Blob && URL?.createObjectURL && URL?.revokeObjectURL ? {\n\t\tBlob,\n\t\tWorker,\n\t\tURL\n\t} : null;\n}\n/**\n* Get Worker constructor when available.\n* @returns {function|null} Worker constructor\n* @private\n*/\nfunction getWorkerConstructor() {\n\treturn win.Worker || null;\n}\n/**\n* Normalize worker options while preserving the legacy numeric timeout argument.\n* @param {number|object} options Worker timeout or options\n* @returns {object} Normalized worker options\n* @private\n*/\nfunction normalizeWorkerOptions(options) {\n\treturn typeof options === \"number\" ? {\n\t\ttimeout: options,\n\t\tworkerUrl: \"\"\n\t} : {\n\t\ttimeout: options?.timeout ?? DEFAULT_WORKER_TIMEOUT,\n\t\tworkerUrl: options?.workerUrl ?? \"\"\n\t};\n}\n/**\n* Release cached worker resources and optionally disable this worker for the session.\n* @param {string} key Cache key\n* @param {boolean} disable Whether to disable future worker attempts\n* @private\n*/\nfunction releaseWorker(key, disable = false) {\n\tconst cached = cache[key];\n\tif (disable) disabledKeys.add(key);\n\tif (cached) {\n\t\tcached.worker?.terminate();\n\t\tcached.revoke && getWorkerAPI()?.URL.revokeObjectURL(cached.src);\n\t\tdelete cache[key];\n\t}\n\tfor (const verified of verifiedOps.keys()) if (verified.startsWith(`${key}:`)) verifiedOps.delete(verified);\n}\n/**\n* Compare worker and main-thread results for the parity self-test.\n* @param {unknown} actual Worker result\n* @param {unknown} expected Main-thread result\n* @returns {boolean} Whether results match\n* @private\n*/\nfunction isSameResult(actual, expected) {\n\tif (actual === expected) return true;\n\ttry {\n\t\treturn JSON.stringify(actual) === JSON.stringify(expected);\n\t} catch {\n\t\treturn true;\n\t}\n}\n/**\n* Truncate conversion arguments to a small payload of the same shape.\n*\n* `args[0]` is the data array for every op: an array of series for `columns`, of rows\n* for `rows`, of records for `json`. Keeping a few leading entries - and, where those\n* entries are themselves arrays, a few leading cells of each - stays a valid payload\n* for all three while costing a fixed amount regardless of the real data size.\n* Anything that isn't an array is passed through untouched.\n* @param {Array} args Conversion arguments\n* @returns {Array} Sampled arguments\n* @private\n*/\nfunction getVerifySample(args) {\n\tconst [data, ...rest] = args;\n\tif (!Array.isArray(data)) return args;\n\treturn [data.slice(0, VERIFY_SAMPLE_SIZE).map((entry) => Array.isArray(entry) ? entry.slice(0, 4) : entry), ...rest];\n}\n/**\n* Post a single request to the worker and resolve with its result.\n* @param {Worker} worker Worker instance\n* @param {string} op Worker op name\n* @param {Array} args Arguments to hand over\n* @param {number} timeout Response timeout in milliseconds\n* @returns {Promise} Worker result\n* @private\n*/\nfunction request(worker, op, args, timeout) {\n\tconst id = ++messageId;\n\tlet settled = false;\n\tlet cleanup;\n\tconst promise = new Promise((resolve, reject) => {\n\t\tconst settle = (fn, value) => {\n\t\t\tif (!settled) {\n\t\t\t\tsettled = true;\n\t\t\t\tcleanup();\n\t\t\t\tfn(value);\n\t\t\t}\n\t\t};\n\t\tconst handler = function(e) {\n\t\t\tif (e.data?.id === id) e.data.error ? settle(reject, new Error(e.data.error)) : settle(resolve, e.data.result);\n\t\t};\n\t\tconst errorHandler = function() {\n\t\t\tsettle(reject, /* @__PURE__ */ new Error(\"worker error\"));\n\t\t};\n\t\tconst timer = setTimeout(() => settle(reject, /* @__PURE__ */ new Error(\"worker timeout\")), timeout);\n\t\tcleanup = () => {\n\t\t\tclearTimeout(timer);\n\t\t\tworker.removeEventListener(\"message\", handler);\n\t\t\tworker.removeEventListener(\"error\", errorHandler);\n\t\t};\n\t\tworker.addEventListener(\"message\", handler);\n\t\tworker.addEventListener(\"error\", errorHandler);\n\t});\n\ttry {\n\t\tworker.postMessage({\n\t\t\targs,\n\t\t\tid,\n\t\t\top\n\t\t});\n\t} catch (error) {\n\t\tsettled = true;\n\t\tcleanup();\n\t\tthrow error;\n\t}\n\treturn promise;\n}\n/**\n* Start the parity self-test for an op, on a sampled payload rather than the real one.\n*\n* The check answers \"does this worker implement this op the way the main thread does\",\n* which the sample settles just as well as the full dataset - and at a cost that does\n* not grow with it. Re-parsing the real payload here would hand back the very\n* main-thread work the offload was meant to avoid.\n* @param {Worker} worker Worker instance\n* @param {string} verifyKey Cache key as `${key}:${op}`\n* @param {string} op Worker op name\n* @param {function} fn Equivalent main-thread function\n* @param {Array} args Conversion arguments to sample from\n* @param {number} timeout Response timeout in milliseconds\n* @returns {Promise} Whether the worker matched the main thread\n* @private\n*/\nfunction startVerify(worker, verifyKey, op, fn, args, timeout) {\n\tconst sample = getVerifySample(args);\n\tconst check = request(worker, op, sample, timeout).then((result) => isSameResult(result, fn(...sample)), () => false).then((matched) => {\n\t\tmatched ? verifiedOps.set(verifyKey, true) : verifiedOps.delete(verifyKey);\n\t\treturn matched;\n\t});\n\tverifiedOps.set(verifyKey, check);\n\treturn check;\n}\n/**\n* Get or create cached worker resources (Object URL, Worker)\n* @param {string} op Worker op name\n* @param {string} workerUrl Custom worker script URL.\n* @returns {{key: string, src: string}} Cache key and Object URL\n* @private\n*/\nfunction getOrCreateWorkerResources(op, workerUrl = \"\") {\n\tconst hasWorker = !!getWorkerConstructor();\n\tconst api = workerUrl ? null : getWorkerAPI();\n\tconst src = workerUrl ? \"\" : getWorkerSrc();\n\tconst key = workerUrl || \"blob\";\n\tif (!hasWorker || !workerUrl && (!api || !src) || disabledKeys.has(key)) return null;\n\tif (!(key in cache)) try {\n\t\tif (workerUrl) cache[key] = {\n\t\t\trevoke: false,\n\t\t\tsrc: workerUrl,\n\t\t\tworker: null\n\t\t};\n\t\telse if (api) {\n\t\t\tconst blob = new api.Blob([src], { type: \"text/javascript\" });\n\t\t\tcache[key] = {\n\t\t\t\trevoke: true,\n\t\t\t\tsrc: api.URL.createObjectURL(blob),\n\t\t\t\tworker: null\n\t\t\t};\n\t\t}\n\t} catch {\n\t\treturn null;\n\t}\n\treturn {\n\t\tkey,\n\t\tsrc: cache[key].src\n\t};\n}\n/**\n* Get or create cached WebWorker instance\n* @param {string} key Cache key\n* @param {string} src URL object as string\n* @returns {Worker} WebWorker instance\n* @private\n*/\nfunction getWorker(key, src) {\n\tconst cached = cache[key];\n\tconst Worker = getWorkerConstructor();\n\tif (!cached || !Worker || disabledKeys.has(key)) return null;\n\tif (!cached.worker) try {\n\t\tcached.worker = new Worker(src);\n\t} catch {\n\t\treleaseWorker(key, true);\n\t\treturn null;\n\t}\n\treturn cached.worker;\n}\n/**\n* Create and run on Web Worker\n* @param {boolean} useWorker Use Web Worker\n* @param {string} op Op name registered in src/module/worker.entry.ts\n* @param {function} fn Equivalent main-thread function, used for fallback and for the\n* sampled parity self-test\n* @param {function} callback Callback function to receive result from worker\n* @param {number|object} options Worker response timeout or options.\n* @returns {function}\n* @example\n* \tconst worker = runWorker(true, \"rows\", rows, function(data) {\n* \t\t // callback after worker is done\n* \t \t console.log(\"result:\", data);\n* \t });\n*\n* \tworker(11111);\n* @private\n*/\nfunction runWorker(useWorker = true, op, fn, callback, options) {\n\tconst { timeout, workerUrl } = normalizeWorkerOptions(options);\n\tconst runSync = function(...args) {\n\t\tcallback(fn(...args));\n\t};\n\tlet runFn = runSync;\n\tif (useWorker) {\n\t\tconst workerResources = getOrCreateWorkerResources(op, workerUrl);\n\t\tconst worker = workerResources ? getWorker(workerResources.key, workerResources.src) : null;\n\t\tif (worker && workerResources) {\n\t\t\tconst { key } = workerResources;\n\t\t\trunFn = function(...args) {\n\t\t\t\tconst fallback = () => {\n\t\t\t\t\treleaseWorker(key, true);\n\t\t\t\t\trunFn = runSync;\n\t\t\t\t\trunSync(...args);\n\t\t\t\t};\n\t\t\t\ttry {\n\t\t\t\t\tconst verifyKey = `${key}:${op}`;\n\t\t\t\t\tconst verified = verifiedOps.get(verifyKey) ?? startVerify(worker, verifyKey, op, fn, args, timeout);\n\t\t\t\t\trequest(worker, op, args, timeout).then((result) => {\n\t\t\t\t\t\tif (verified === true) callback(result);\n\t\t\t\t\t\telse verified.then((matched) => matched ? callback(result) : fallback());\n\t\t\t\t\t}, fallback);\n\t\t\t\t} catch {\n\t\t\t\t\tfallback();\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\t}\n\treturn runFn;\n}\n/**\n* Clean-up all cached workers and release resources\n* @private\n*/\nfunction cleanupWorkers() {\n\tconst api = getWorkerAPI();\n\tfor (const key in cache) {\n\t\tconst cached = cache[key];\n\t\tif (cached.worker) cached.worker.terminate();\n\t\tif (cached.src) cached.revoke && api?.URL.revokeObjectURL(cached.src);\n\t\tdelete cache[key];\n\t}\n\tdisabledKeys.clear();\n\tverifiedOps.clear();\n}\n//#endregion\nexport { cleanupWorkers, getWorker, runWorker };\n","/*!\n* Copyright (c) 2017 ~ present NAVER Corp.\r\n * billboard.js project is licensed under the MIT license\r\n * \r\n * billboard.js, JavaScript chart library\r\n * https://naver.github.io/billboard.js/\r\n * \r\n * @version 4.1.0\n*/\n//#region src/module/dsv.ts\n/**\n* Copyright (c) 2017 ~ present NAVER Corp.\n* billboard.js project is licensed under the MIT license\n* @see https://datatracker.ietf.org/doc/html/rfc4180\n*/\nconst QUOTE = 34;\nconst NEWLINE = 10;\nconst RETURN = 13;\n/**\n* Create a DSV parser for the specified delimiter.\n* @param {string} delimiter The delimiter character\n* @returns {object} DSV parser object with parse and parseRows methods\n* @private\n*/\nfunction dsv(delimiter) {\n\tconst delimiterCode = delimiter.charCodeAt(0);\n\t/**\n\t* Parse DSV string into rows of string arrays.\n\t* @param {string} text DSV string to parse\n\t* @param {function} [callback] Optional row callback\n\t* @returns {Array} Parsed rows\n\t* @private\n\t*/\n\tfunction parseRows(text, callback) {\n\t\tconst rows = [];\n\t\tlet len = text.length;\n\t\tlet pos = 0;\n\t\tlet rowNum = 0;\n\t\tlet eof = len <= 0;\n\t\tlet eol = false;\n\t\ttext.charCodeAt(0) === 65279 && pos++;\n\t\ttext.charCodeAt(len - 1) === NEWLINE && --len;\n\t\ttext.charCodeAt(len - 1) === RETURN && --len;\n\t\t/**\n\t\t* Get next token from DSV string.\n\t\t* @returns {string|null} Next field value, or null for EOL/EOF\n\t\t*/\n\t\tfunction token() {\n\t\t\tif (eof) return null;\n\t\t\tif (eol) {\n\t\t\t\teol = false;\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\tconst start = pos;\n\t\t\tlet c, end;\n\t\t\tif (text.charCodeAt(start) === QUOTE) {\n\t\t\t\twhile (++pos < len) if (text.charCodeAt(pos) === QUOTE) {\n\t\t\t\t\tif (text.charCodeAt(pos + 1) !== QUOTE) break;\n\t\t\t\t\tpos++;\n\t\t\t\t}\n\t\t\t\tif ((end = pos++) >= len) eof = true;\n\t\t\t\telse if ((c = text.charCodeAt(pos++)) === NEWLINE) eol = true;\n\t\t\t\telse if (c === RETURN) {\n\t\t\t\t\teol = true;\n\t\t\t\t\ttext.charCodeAt(pos) === NEWLINE && ++pos;\n\t\t\t\t}\n\t\t\t\treturn text.slice(start + 1, end).replace(/\"\"/g, \"\\\"\");\n\t\t\t}\n\t\t\twhile (pos < len) {\n\t\t\t\tif ((c = text.charCodeAt(end = pos++)) === NEWLINE) eol = true;\n\t\t\t\telse if (c === RETURN) {\n\t\t\t\t\teol = true;\n\t\t\t\t\ttext.charCodeAt(pos) === NEWLINE && ++pos;\n\t\t\t\t} else if (c !== delimiterCode) continue;\n\t\t\t\treturn text.slice(start, end);\n\t\t\t}\n\t\t\teof = true;\n\t\t\treturn text.slice(start, len);\n\t\t}\n\t\tlet t;\n\t\twhile ((t = token()) !== null) {\n\t\t\tconst row = [];\n\t\t\twhile (t !== null) {\n\t\t\t\trow.push(t);\n\t\t\t\tt = token();\n\t\t\t}\n\t\t\tif (callback) {\n\t\t\t\tconst result = callback(row, rowNum++);\n\t\t\t\tresult != null && rows.push(result);\n\t\t\t} else rows.push(row);\n\t\t}\n\t\treturn rows;\n\t}\n\t/**\n\t* Parse DSV string into array of objects using first row as headers.\n\t* @param {string} text DSV string to parse\n\t* @param {function} [callback] Optional row callback\n\t* @returns {Array} Array of objects\n\t* @private\n\t*/\n\tfunction parse(text, callback) {\n\t\tlet columns = [];\n\t\treturn parseRows(text, (row, i) => {\n\t\t\tif (i === 0) {\n\t\t\t\tcolumns = row;\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\tconst obj = {};\n\t\t\tfor (let j = 0; j < columns.length; j++) obj[columns[j]] = row[j] ?? \"\";\n\t\t\treturn callback ? callback(obj, i - 1, columns) : obj;\n\t\t});\n\t}\n\treturn {\n\t\tparse,\n\t\tparseRows\n\t};\n}\nconst csv = dsv(\",\");\nconst tsv = dsv(\"\t\");\nconst csvParse = csv.parse;\nconst csvParseRows = csv.parseRows;\nconst tsvParse = tsv.parse;\nconst tsvParseRows = tsv.parseRows;\n//#endregion\nexport { csvParse, csvParseRows, tsvParse, tsvParseRows };\n","/*!\n* Copyright (c) 2017 ~ present NAVER Corp.\r\n * billboard.js project is licensed under the MIT license\r\n * \r\n * billboard.js, JavaScript chart library\r\n * https://naver.github.io/billboard.js/\r\n * \r\n * @version 4.1.0\n*/\nimport { csvParse, csvParseRows, tsvParse, tsvParseRows } from \"../../module/dsv.js\";\n//#region src/ChartInternal/data/convert.helper.ts\n/**\n* Copyright (c) 2017 ~ present NAVER Corp.\n* billboard.js project is licensed under the MIT license\n*/\n/***** Functions to be executed on Web Worker *****\n* NOTE: Don't allowed to use\n* - arrow function syntax\n* - Utils functions\n*/\n/**\n* Convert Columns data\n* @param {object} columns\n* @returns {Array}\n* @private\n*/\nfunction columns(columns) {\n\tconst newRows = [];\n\tcolumns.forEach(function(col, i) {\n\t\tconst key = col[0];\n\t\tcol.forEach(function(v, j) {\n\t\t\tif (j > 0) {\n\t\t\t\tif (typeof newRows[j - 1] === \"undefined\") newRows[j - 1] = {};\n\t\t\t\tif (typeof v === \"undefined\") throw new Error(`Source data is missing a component at (${i}, ${j})!`);\n\t\t\t\tnewRows[j - 1][key] = v;\n\t\t\t}\n\t\t});\n\t});\n\treturn newRows;\n}\n/**\n* Convert Rows data\n* @param {object} columns\n* @returns {Array}\n* @private\n*/\nfunction rows(rows) {\n\tconst keys = rows[0];\n\tconst newRows = [];\n\trows.forEach(function(row, i) {\n\t\tif (i > 0) {\n\t\t\tconst newRow = {};\n\t\t\trow.forEach(function(v, j) {\n\t\t\t\tif (typeof v === \"undefined\") throw new Error(`Source data is missing a component at (${i}, ${j})!`);\n\t\t\t\tnewRow[keys[j]] = v;\n\t\t\t});\n\t\t\tnewRows.push(newRow);\n\t\t}\n\t});\n\treturn newRows;\n}\n/**\n* Convert JSON data\n* @param {object} columns\n* @returns {Array}\n* @private\n*/\nfunction json(json, keysParam) {\n\tconst newRows = [];\n\tlet targetKeys;\n\tlet data;\n\tif (Array.isArray(json)) {\n\t\tconst findValueInJson = function(object, path) {\n\t\t\tif (object[path] !== void 0) return object[path];\n\t\t\tconst pathArray = path.replace(/\\[(\\w+)\\]/g, \".$1\").replace(/^\\./, \"\").split(\".\");\n\t\t\tlet target = object;\n\t\t\tpathArray.some(function(k) {\n\t\t\t\treturn !(target = target && typeof target === \"object\" && k in target ? target[k] : void 0);\n\t\t\t});\n\t\t\treturn target;\n\t\t};\n\t\tif (keysParam.x) targetKeys = keysParam.value.concat(keysParam.x);\n\t\telse targetKeys = keysParam.value;\n\t\tnewRows.push(targetKeys);\n\t\tjson.forEach(function(o) {\n\t\t\tconst newRow = targetKeys.map(function(key) {\n\t\t\t\tlet v = findValueInJson(o, key);\n\t\t\t\tif (typeof v === \"undefined\") v = null;\n\t\t\t\treturn v;\n\t\t\t});\n\t\t\tnewRows.push(newRow);\n\t\t});\n\t\tdata = rows(newRows);\n\t} else {\n\t\tObject.keys(json).forEach(function(key) {\n\t\t\tconst tmp = [].concat(json[key]);\n\t\t\ttmp.unshift?.(key);\n\t\t\tnewRows.push(tmp);\n\t\t});\n\t\tdata = columns(newRows);\n\t}\n\treturn data;\n}\n/***** Functions can't be executed on Web Worker *****/\n/**\n* Convert URL data\n* @param {string} url Remote URL\n* @param {string} mimeType MIME type string: json | csv | tsv\n* @param {object} headers Header object\n* @param {object} keys Key object\n* @param {function} done Callback function\n* @private\n*/\nfunction url(url, mimeType = \"csv\", headers, keys, done) {\n\tconst req = new XMLHttpRequest();\n\tconst converter = {\n\t\tcsv,\n\t\ttsv,\n\t\tjson\n\t};\n\treq.open(\"GET\", url);\n\tif (headers) Object.keys(headers).forEach(function(key) {\n\t\treq.setRequestHeader(key, headers[key]);\n\t});\n\treq.onreadystatechange = function() {\n\t\tif (req.readyState === 4) {\n\t\t\tif (req.status === 200) {\n\t\t\t\tconst response = req.responseText;\n\t\t\t\tresponse && done.call(this, converter[mimeType](mimeType === \"json\" ? JSON.parse(response) : response, keys));\n\t\t\t} else throw new Error(`${url}: Something went wrong loading!`);\n\t\t}\n\t};\n\treq.send();\n}\n/**\n* Convert CSV/TSV data\n* @param {object} parser Parser object\n* @param {object} xsv Data\n* @returns {object}\n* @private\n*/\nfunction convertCsvTsvToData(parser, xsv) {\n\tconst rows = parser.rows(xsv);\n\tlet d;\n\tif (rows.length === 1) {\n\t\td = [{}];\n\t\trows[0].forEach((id) => {\n\t\t\td[0][id] = null;\n\t\t});\n\t} else d = parser.parse(xsv);\n\treturn d;\n}\nfunction csv(xsv) {\n\treturn convertCsvTsvToData({\n\t\trows: csvParseRows,\n\t\tparse: csvParse\n\t}, xsv);\n}\nfunction tsv(tsv) {\n\treturn convertCsvTsvToData({\n\t\trows: tsvParseRows,\n\t\tparse: tsvParse\n\t}, tsv);\n}\n//#endregion\nexport { columns, csv, json, rows, tsv, url };\n","/*!\n* Copyright (c) 2017 ~ present NAVER Corp.\r\n * billboard.js project is licensed under the MIT license\r\n * \r\n * billboard.js, JavaScript chart library\r\n * https://naver.github.io/billboard.js/\r\n * \r\n * @version 4.1.0\n*/\nimport { isArray, isDefined, isEmpty, isObject, isUndefined, isValue, notEmpty } from \"../../module/util/type-checks.js\";\nimport { toSet } from \"../../module/util/object.js\";\nimport { runWorker } from \"../../module/worker.js\";\nimport { columns, json, rows, url } from \"./convert.helper.js\";\n//#region src/ChartInternal/data/convert.ts\n/**\n* Copyright (c) 2017 ~ present NAVER Corp.\n* billboard.js project is licensed under the MIT license\n*/\n/**\n* Cell count from which `boost.useWorker: \"auto\"` offloads conversion.\n*\n* Below this, structured cloning the payload to the worker and back costs more\n* than the parsing it saves.\n* @private\n*/\nconst WORKER_CELL_THRESHOLD = 5e3;\n/**\n* Estimate the number of data cells to be converted.\n* @param {Array} data Raw json(array form)/rows/columns data\n* @returns {number} Approximate cell count\n* @private\n*/\nfunction _getCellCount(data) {\n\tconst first = data[0];\n\tif (isArray(first)) {\n\t\tlet count = 0;\n\t\tfor (let i = 0, len = data.length; i < len; i++) count += data[i]?.length ?? 0;\n\t\treturn count;\n\t}\n\treturn data.length * Object.keys(first ?? {}).length;\n}\n/**\n* Get data key for JSON\n* @param {string|object} keysParam Key params\n* @param {object} config Config object\n* @returns {string} Data key\n* @private\n*/\nfunction _getDataKeyForJson(keysParam, config) {\n\tconst keys = keysParam || config?.data_keys;\n\tif (keys?.x) config.data_x = keys.x;\n\treturn keys;\n}\n/**\n* Set `xs` for each id\n* @param {string[]} ids Ids to set xs\n* @param {object[]} data Data to set xs from\n* @param {object} params Parameters for setting xs\n* @param {boolean} params.appendXs Whether to append xs\n* @param {string[]} params.xs X keys to set xs from\n* @param {boolean} params.categorized Whether the axis is categorized\n* @param {boolean} params.timeSeries Whether the axis is time series\n* @param {boolean} params.customX Whether the x is custom\n* @private\n*/\nfunction _setXS(ids, data, params) {\n\tconst $$ = this;\n\tconst { config } = $$;\n\tlet xsData;\n\tids.forEach((id) => {\n\t\tconst xKey = $$.getXKey(id);\n\t\tif (params.customX || params.timeSeries) {\n\t\t\tif (params.xs.indexOf(xKey) >= 0) xsData = (params.appendXs && $$.data.xs[id] || []).concat(data.map((d, i) => {\n\t\t\t\tconst rawX = d[xKey];\n\t\t\t\treturn isValue(rawX) ? $$.generateTargetX(rawX, id, i) : false;\n\t\t\t}).filter((v) => v !== false));\n\t\t\telse if (config.data_x) xsData = this.getOtherTargetXs();\n\t\t\telse if (notEmpty(config.data_xs)) xsData = $$.getXValuesOfXKey(xKey, $$.data.targets);\n\t\t} else xsData = data.map((d, i) => i);\n\t\tif (xsData) $$.data.xs[id] = xsData;\n\t\telse throw new Error(`x is not defined for id = \"${id}\".`);\n\t});\n}\n/**\n* Data convert\n* @memberof ChartInternal\n* @private\n*/\nvar convert_default = {\n\t/**\n\t* Convert data according its type\n\t* @param {object} args data object\n\t* @param {function} [callback] callback for url(XHR) type loading\n\t* @private\n\t*/\n\tconvertData(args, callback) {\n\t\tconst { config } = this;\n\t\tconst useWorker = (d) => {\n\t\t\tif (!d?.length || isEmpty(d[0])) return false;\n\t\t\treturn config.boost_useWorker === \"auto\" ? _getCellCount(d) >= WORKER_CELL_THRESHOLD : !!config.boost_useWorker;\n\t\t};\n\t\tconst workerOptions = config.boost_workerUrl ? { workerUrl: config.boost_workerUrl } : void 0;\n\t\tlet data = args;\n\t\tif (args.bindto) {\n\t\t\tdata = {};\n\t\t\t[\n\t\t\t\t\"url\",\n\t\t\t\t\"mimeType\",\n\t\t\t\t\"headers\",\n\t\t\t\t\"keys\",\n\t\t\t\t\"json\",\n\t\t\t\t\"rows\",\n\t\t\t\t\"columns\"\n\t\t\t].forEach((v) => {\n\t\t\t\tconst key = `data_${v}`;\n\t\t\t\tif (key in args) data[v] = args[key];\n\t\t\t});\n\t\t}\n\t\tif (data.url && callback) url(data.url, data.mimeType, data.headers, _getDataKeyForJson(data.keys, config), callback);\n\t\telse if (data.json) runWorker(useWorker(data.json), \"json\", json, callback, workerOptions)(data.json, _getDataKeyForJson(data.keys, config));\n\t\telse if (data.rows) runWorker(useWorker(data.rows), \"rows\", rows, callback, workerOptions)(data.rows);\n\t\telse if (data.columns) runWorker(useWorker(data.columns), \"columns\", columns, callback, workerOptions)(data.columns);\n\t\telse if (args.bindto) throw Error(\"url or json or rows or columns is required.\");\n\t},\n\t/**\n\t* Convert data to targets\n\t* @param {object[]} data Data to convert\n\t* @param {boolean} appendXs Whether to append xs\n\t* @returns {IData[]} Converted targets\n\t* @private\n\t*/\n\tconvertDataToTargets(data, appendXs) {\n\t\tconst $$ = this;\n\t\tconst { axis, config, state } = $$;\n\t\tconst chartType = config.data_type;\n\t\tconst dataKeys = Object.keys(data[0] || {});\n\t\tconst { ids, xs } = dataKeys.length ? dataKeys.reduce((acc, key) => {\n\t\t\tif ($$.isX.call($$, key)) acc.xs.push(key);\n\t\t\telse acc.ids.push(key);\n\t\t\treturn acc;\n\t\t}, {\n\t\t\tids: [],\n\t\t\txs: []\n\t\t}) : {\n\t\t\tids: [],\n\t\t\txs: []\n\t\t};\n\t\tconst params = {\n\t\t\tappendXs,\n\t\t\txs,\n\t\t\tcategorized: axis?.isCategorized(),\n\t\t\ttimeSeries: axis?.isTimeSeries(),\n\t\t\tcustomX: axis?.isCustomX()\n\t\t};\n\t\t_setXS.bind($$)(ids, data, params);\n\t\tconst categoryIndexMap = params.customX && params.categorized && config.axis_x_categories.length ? new Map(config.axis_x_categories.map((cat, i) => [cat, i])) : null;\n\t\tconst idConverter = config.data_idConverter.bind($$.api);\n\t\tconst targets = ids.map((id, index) => {\n\t\t\tconst convertedId = idConverter(id);\n\t\t\tconst xKey = $$.getXKey(id);\n\t\t\tconst isCategory = params.customX && params.categorized;\n\t\t\tconst hasCategory = isCategory && index === 0 && (() => {\n\t\t\t\tconst categorySet = toSet(config.axis_x_categories);\n\t\t\t\treturn data.every((v) => categorySet.has(v[xKey]));\n\t\t\t})();\n\t\t\tconst isDataAppend = data.__append__;\n\t\t\tconst xIndex = xKey === null && isDataAppend ? $$.api.data.values(id).length : 0;\n\t\t\treturn {\n\t\t\t\tid: convertedId,\n\t\t\t\tid_org: id,\n\t\t\t\tvalues: data.map((d, i) => {\n\t\t\t\t\tconst rawX = d[xKey];\n\t\t\t\t\tlet value = d[id];\n\t\t\t\t\tlet x;\n\t\t\t\t\tvalue = value !== null && !isNaN(value) && !isObject(value) ? +value : isArray(value) || isObject(value) ? value : null;\n\t\t\t\t\tif ((isCategory || state.hasRadar) && index === 0 && !isUndefined(rawX)) {\n\t\t\t\t\t\tif (!hasCategory && i === 0 && !isDataAppend) {\n\t\t\t\t\t\t\tconfig.axis_x_categories = [];\n\t\t\t\t\t\t\tif (categoryIndexMap) categoryIndexMap.clear();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tconst rawXStr = String(rawX);\n\t\t\t\t\t\tx = categoryIndexMap?.get(rawXStr) ?? -1;\n\t\t\t\t\t\tif (x === -1) {\n\t\t\t\t\t\t\tx = config.axis_x_categories.length;\n\t\t\t\t\t\t\tconfig.axis_x_categories.push(rawX);\n\t\t\t\t\t\t\tcategoryIndexMap?.set(rawXStr, x);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else x = $$.generateTargetX(rawX, id, xIndex + i);\n\t\t\t\t\tif (isUndefined(value) || $$.data.xs[id].length <= i) x = void 0;\n\t\t\t\t\treturn {\n\t\t\t\t\t\tx,\n\t\t\t\t\t\tvalue,\n\t\t\t\t\t\tid: convertedId,\n\t\t\t\t\t\tindex: -1\n\t\t\t\t\t};\n\t\t\t\t}).filter((v) => isDefined(v.x))\n\t\t\t};\n\t\t});\n\t\ttargets.forEach((t) => {\n\t\t\tif (config.data_xSort) t.values = t.values.sort((v1, v2) => {\n\t\t\t\treturn (v1.x || v1.x === 0 ? v1.x : Infinity) - (v2.x || v2.x === 0 ? v2.x : Infinity);\n\t\t\t});\n\t\t\tt.values.forEach((v, i) => v.index = i);\n\t\t\t$$.data.xs[t.id]?.sort((v1, v2) => v1 - v2);\n\t\t});\n\t\tstate.hasNegativeValue = targets.some((t) => t.values.some((v) => v.value !== null && v.value < 0));\n\t\tstate.hasPositiveValue = targets.some((t) => t.values.some((v) => v.value !== null && v.value > 0));\n\t\tif (chartType && $$.isValidChartType(chartType)) {\n\t\t\tconst targetIds = $$.mapToIds(targets).filter((id) => !(id in config.data_types) || !$$.isValidChartType(config.data_types[id]));\n\t\t\t$$.setTargetType(targetIds, chartType);\n\t\t}\n\t\ttargets.forEach((d) => $$.cache.add(d.id_org, d, true));\n\t\treturn targets;\n\t}\n};\n//#endregion\nexport { convert_default as default };\n","/*!\n* Copyright (c) 2017 ~ present NAVER Corp.\r\n * billboard.js project is licensed under the MIT license\r\n * \r\n * billboard.js, JavaScript chart library\r\n * https://naver.github.io/billboard.js/\r\n * \r\n * @version 4.1.0\n*/\nimport { TYPE } from \"../../config/const.js\";\nimport { isArray, isBoolean, isDefined, isFunction, isNumber, isObject, isObjectType, isString, isUndefined, isValue, notEmpty } from \"../../module/util/type-checks.js\";\nimport { findIndex, getUnique, hasValue, mergeArray, parseDate, sortValue } from \"../../module/util/object.js\";\nimport { getScrollPosition, getTransformCTM, hasViewBox } from \"../../module/util/dom.js\";\nimport { $BAR, $CANDLESTICK, $COMMON } from \"../../config/classes.js\";\nimport { KEY } from \"../../module/Cache.js\";\nimport { select } from \"d3-selection\";\n//#region src/ChartInternal/data/data.ts\n/**\n* Copyright (c) 2017 ~ present NAVER Corp.\n* billboard.js project is licensed under the MIT license\n*/\nconst rangedDataKeyIndex = {\n\tareaRange: {\n\t\thigh: 0,\n\t\tmid: 1,\n\t\tlow: 2\n\t},\n\tcandlestick: {\n\t\topen: 0,\n\t\thigh: 1,\n\t\tlow: 2,\n\t\tclose: 3,\n\t\tvolume: 4\n\t}\n};\n/**\n* Normalize target ids to an array\n* @param {Array|string} targetIds Target ids\n* @returns {Array} Target ids array\n* @private\n*/\nfunction normalizeTargetIds(targetIds) {\n\treturn isArray(targetIds) ? targetIds : [targetIds];\n}\nvar data_default = {\n\tisX(key) {\n\t\tconst { config } = this;\n\t\tconst dataKey = config.data_x && key === config.data_x;\n\t\tconst existValue = notEmpty(config.data_xs) && hasValue(config.data_xs, key);\n\t\treturn dataKey || existValue;\n\t},\n\tisStackNormalized() {\n\t\tconst { config } = this;\n\t\treturn !!((config.data_stack_normalize === true || isObjectType(config.data_stack_normalize)) && config.data_groups.length);\n\t},\n\t/**\n\t* Check if stack normalization should be applied per group\n\t* @returns {boolean}\n\t* @private\n\t*/\n\tisStackNormalizedPerGroup() {\n\t\tconst { config } = this;\n\t\treturn !!(isObjectType(config.data_stack_normalize) && config.data_stack_normalize?.perGroup && config.data_groups.length);\n\t},\n\t/**\n\t* Check if given id is grouped data or has grouped data\n\t* @param {string} id Data id value\n\t* @returns {boolean} is grouped data or has grouped data\n\t* @private\n\t*/\n\tisGrouped(id) {\n\t\tconst groups = this.config.data_groups;\n\t\treturn id ? groups.some((v) => v.indexOf(id) >= 0 && v.length > 1) : groups.length > 0;\n\t},\n\t/**\n\t* Check if the given axis has any grouped data\n\t* @param {string} axisId Axis ID (e.g., \"y\", \"y2\")\n\t* @returns {boolean} true if axis has grouped data\n\t* @private\n\t*/\n\thasAxisGroupedData(axisId) {\n\t\tconst $$ = this;\n\t\tconst { axis } = $$;\n\t\treturn $$.data.targets.filter((t) => axis.getId(t.id) === axisId).map((t) => t.id).some((id) => $$.isGrouped(id));\n\t},\n\tgetXKey(id) {\n\t\tconst { config } = this;\n\t\treturn config.data_x ? config.data_x : notEmpty(config.data_xs) ? config.data_xs[id] : null;\n\t},\n\tgetXValuesOfXKey(key, targets) {\n\t\tconst $$ = this;\n\t\tconst ids = targets && notEmpty(targets) ? $$.mapToIds(targets) : [];\n\t\tlet xValues;\n\t\tids.forEach((id) => {\n\t\t\tif ($$.getXKey(id) === key) xValues = $$.data.xs[id];\n\t\t});\n\t\treturn xValues;\n\t},\n\t/**\n\t* Get index number based on given x Axis value\n\t* @param {Date|number|string} x x Axis to be compared\n\t* @param {Array} basedX x Axis list to be based on\n\t* @returns {number} index number\n\t* @private\n\t*/\n\tgetIndexByX(x, basedX) {\n\t\tconst $$ = this;\n\t\treturn basedX ? basedX.indexOf(isString(x) ? x : +x) : ($$.filterByX($$.data.targets, x)[0] || { index: null }).index;\n\t},\n\tgetXValue(id, i) {\n\t\tconst $$ = this;\n\t\treturn id in $$.data.xs && $$.data.xs[id] && isValue($$.data.xs[id][i]) ? $$.data.xs[id][i] : i;\n\t},\n\tgetOtherTargetXs() {\n\t\tconst $$ = this;\n\t\tconst idsForX = Object.keys($$.data.xs);\n\t\treturn idsForX.length ? $$.data.xs[idsForX[0]] : null;\n\t},\n\tgetOtherTargetX(index) {\n\t\tconst xs = this.getOtherTargetXs();\n\t\treturn xs && index < xs.length ? xs[index] : null;\n\t},\n\taddXs(xs) {\n\t\tconst { config } = this;\n\t\tObject.keys(xs).forEach((id) => {\n\t\t\tconfig.data_xs[id] = xs[id];\n\t\t});\n\t},\n\t/**\n\t* Determine if x axis is multiple\n\t* @returns {boolean} true: multiple, false: single\n\t* @private\n\t*/\n\tisMultipleX() {\n\t\treturn !this.config.axis_x_forceAsSingle && (notEmpty(this.config.data_xs) || this.hasType(\"bubble\") || this.hasType(\"scatter\"));\n\t},\n\taddName(data) {\n\t\tconst { config } = this;\n\t\tlet name;\n\t\tif (data) {\n\t\t\tname = config.data_names[data.id];\n\t\t\tdata.name = name !== void 0 ? name : data.id;\n\t\t}\n\t\treturn data;\n\t},\n\t/**\n\t* Get all values on given index\n\t* @param {number} index Index\n\t* @param {boolean} filterNull Filter nullish value\n\t* @returns {Array}\n\t* @private\n\t*/\n\tgetAllValuesOnIndex(index, filterNull = false) {\n\t\tconst $$ = this;\n\t\tlet value = $$.filterTargetsToShow($$.data.targets).map((t) => $$.addName($$.getValueOnIndex(t.values, index)));\n\t\tif (filterNull) value = value.filter((v) => v && \"value\" in v && isValue(v.value));\n\t\treturn value;\n\t},\n\tgetValueOnIndex(values, index) {\n\t\tif (values[index]?.index === index) return values[index];\n\t\tconst valueOnIndex = values.filter((v) => v.index === index);\n\t\treturn valueOnIndex.length ? valueOnIndex[0] : null;\n\t},\n\tupdateTargetX(targets, x) {\n\t\tconst $$ = this;\n\t\ttargets.forEach((t) => {\n\t\t\tt.values.forEach((v, i) => {\n\t\t\t\tv.x = $$.generateTargetX(x[i], t.id, i);\n\t\t\t});\n\t\t\t$$.data.xs[t.id] = x;\n\t\t});\n\t},\n\tupdateTargetXs(targets, xs) {\n\t\tconst $$ = this;\n\t\ttargets.forEach((t) => {\n\t\t\txs[t.id] && $$.updateTargetX([t], xs[t.id]);\n\t\t});\n\t},\n\tgenerateTargetX(rawX, id, index) {\n\t\tconst $$ = this;\n\t\tconst { axis } = $$;\n\t\tlet x = axis?.isCategorized() ? index : rawX || index;\n\t\tif (axis?.isTimeSeries()) {\n\t\t\tconst fn = parseDate.bind($$);\n\t\t\tx = rawX ? fn(rawX) : fn($$.getXValue(id, index));\n\t\t} else if (axis?.isCustomX() && !axis?.isCategorized()) x = isValue(rawX) ? +rawX : $$.getXValue(id, index);\n\t\treturn x;\n\t},\n\tupdateXs(values) {\n\t\tif (values.length) this.axis.xs = values.map((v) => v.x);\n\t},\n\tgetPrevX(i) {\n\t\tconst x = this.axis.xs[i - 1];\n\t\treturn isDefined(x) ? x : null;\n\t},\n\tgetNextX(i) {\n\t\tconst x = this.axis.xs[i + 1];\n\t\treturn isDefined(x) ? x : null;\n\t},\n\t/**\n\t* Get base value isAreaRangeType\n\t* @param {object} data Data object\n\t* @returns {number}\n\t* @private\n\t*/\n\tgetBaseValue(data) {\n\t\tconst $$ = this;\n\t\tconst { hasAxis } = $$.state;\n\t\tlet { value } = data;\n\t\tif (value && hasAxis) {\n\t\t\tif ($$.isAreaRangeType(data)) value = $$.getRangedData(data, \"mid\");\n\t\t\telse if ($$.isBubbleZType(data)) value = $$.getBubbleZData(value, \"y\");\n\t\t}\n\t\treturn value;\n\t},\n\t/**\n\t* Get min/max value from the data\n\t* @private\n\t* @param {Array} data array data to be evaluated\n\t* @returns {{min: {number}, max: {number}}}\n\t*/\n\tgetMinMaxValue(data) {\n\t\tconst getBaseValue = this.getBaseValue.bind(this);\n\t\tlet min = Infinity;\n\t\tlet max = -Infinity;\n\t\tconst targets = data || this.data.targets.map((t) => t.values);\n\t\tfor (let i = 0; i < targets.length; i++) {\n\t\t\tconst v = targets[i];\n\t\t\tfor (let j = 0; j < v.length; j++) {\n\t\t\t\tconst val = getBaseValue(v[j]);\n\t\t\t\tif (isNumber(val)) {\n\t\t\t\t\tif (val < min) min = val;\n\t\t\t\t\tif (val > max) max = val;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn {\n\t\t\tmin,\n\t\t\tmax\n\t\t};\n\t},\n\t/**\n\t* Get the min/max data\n\t* @private\n\t* @returns {{min: Array, max: Array}}\n\t*/\n\tgetMinMaxData() {\n\t\tconst $$ = this;\n\t\tconst cacheKey = KEY.dataMinMax;\n\t\tlet minMaxData = $$.cache.get(cacheKey);\n\t\tif (!minMaxData) {\n\t\t\tconst data = $$.data.targets.map((t) => t.values);\n\t\t\tconst minMax = $$.getMinMaxValue(data);\n\t\t\tconst min = [];\n\t\t\tconst max = [];\n\t\t\tconst { min: minVal, max: maxVal } = minMax;\n\t\t\tdata.forEach((v) => {\n\t\t\t\tconst minData = $$.getFilteredDataByValue(v, minVal);\n\t\t\t\tconst maxData = $$.getFilteredDataByValue(v, maxVal);\n\t\t\t\tif (minData.length) for (let i = 0; i < minData.length; i++) min.push(minData[i]);\n\t\t\t\tif (maxData.length) for (let i = 0; i < maxData.length; i++) max.push(maxData[i]);\n\t\t\t});\n\t\t\t$$.cache.add(cacheKey, minMaxData = {\n\t\t\t\tmin,\n\t\t\t\tmax\n\t\t\t});\n\t\t}\n\t\treturn minMaxData;\n\t},\n\t/**\n\t* Get sum of data per index\n\t* @param {string} targetId Target ID to get total for (only for normalized stack per group)\n\t* @private\n\t* @returns {Array}\n\t*/\n\tgetTotalPerIndex(targetId) {\n\t\tconst $$ = this;\n\t\tconst { config } = $$;\n\t\tconst cacheKey = targetId ? `${KEY.dataTotalPerIndex}-${targetId}` : KEY.dataTotalPerIndex;\n\t\tconst cached = $$.cache.get(cacheKey);\n\t\tlet sum = cached?.generation === $$.state.dataGeneration ? cached.value : null;\n\t\tif (($$.config.data_groups.length || $$.isStackNormalized()) && !sum) {\n\t\t\tsum = [];\n\t\t\tlet { targets } = $$.data;\n\t\t\tif ($$.isStackNormalizedPerGroup() && targetId) {\n\t\t\t\tconst group = config.data_groups.find((g) => g.indexOf(targetId) >= 0);\n\t\t\t\tif (group) targets = targets.filter((t) => group.indexOf(t.id) >= 0);\n\t\t\t\telse return null;\n\t\t\t}\n\t\t\ttargets.forEach((row) => {\n\t\t\t\trow.values.forEach((v, i) => {\n\t\t\t\t\tif (!sum[i]) sum[i] = 0;\n\t\t\t\t\tsum[i] += isNumber(v.value) ? v.value : 0;\n\t\t\t\t});\n\t\t\t});\n\t\t\t$$.cache.add(cacheKey, {\n\t\t\t\tgeneration: $$.state.dataGeneration,\n\t\t\t\tvalue: sum\n\t\t\t});\n\t\t}\n\t\treturn sum;\n\t},\n\t/**\n\t* Get per-index totals excluding hidden series, cached until data or visibility changes.\n\t* @param {string} targetId Target ID for per-group normalization\n\t* @returns {Array|null} Visible totals, or null for an ungrouped target\n\t* @private\n\t*/\n\tgetVisibleTotalPerIndex(targetId) {\n\t\tconst $$ = this;\n\t\tconst { api, config, state, cache } = $$;\n\t\tlet cached = cache.get(KEY.visibleTotalPerIndex);\n\t\tif (!cached || cached.generation !== state.dataGeneration) cached = cache.add(KEY.visibleTotalPerIndex, {\n\t\t\tgeneration: state.dataGeneration,\n\t\t\tvalues: /* @__PURE__ */ new Map()\n\t\t});\n\t\tif (cached.values.has(targetId)) return cached.values.get(targetId);\n\t\tconst dataValues = api.data.values.bind(api);\n\t\tconst { hiddenTargetIds } = state;\n\t\tlet total = $$.getTotalPerIndex(targetId);\n\t\tif (total === null) {\n\t\t\tcached.values.set(targetId, total);\n\t\t\treturn total;\n\t\t}\n\t\tif (hiddenTargetIds.size) {\n\t\t\tlet hiddenIds = [...hiddenTargetIds];\n\t\t\tif (targetId) {\n\t\t\t\tconst group = config.data_groups.find((g) => g.indexOf(targetId) >= 0);\n\t\t\t\tif (group) hiddenIds = hiddenIds.filter((id) => group.indexOf(id) >= 0);\n\t\t\t}\n\t\t\tif (hiddenIds.length) {\n\t\t\t\tlet hiddenSum = dataValues(hiddenIds, false);\n\t\t\t\tif (hiddenSum.length) {\n\t\t\t\t\thiddenSum = hiddenSum.reduce((acc, curr) => acc.map((v, i) => (isNumber(v) ? v : 0) + curr[i]));\n\t\t\t\t\ttotal = total.map((v, i) => v - hiddenSum[i]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcached.values.set(targetId, total);\n\t\treturn total;\n\t},\n\t/**\n\t* Get total data sum\n\t* @param {boolean} subtractHidden Subtract hidden data from total\n\t* @returns {number}\n\t* @private\n\t*/\n\tgetTotalDataSum(subtractHidden) {\n\t\tconst $$ = this;\n\t\tconst cacheKey = KEY.dataTotalSum;\n\t\tlet total = $$.cache.get(cacheKey);\n\t\tif (!isNumber(total)) {\n\t\t\ttotal = $$.data.targets.reduce((acc, t) => {\n\t\t\t\treturn acc + t.values.reduce((sum, v) => sum + (v.value ?? 0), 0);\n\t\t\t}, 0);\n\t\t\t$$.cache.add(cacheKey, total);\n\t\t}\n\t\tif (subtractHidden) total -= $$.getHiddenTotalDataSum();\n\t\treturn total;\n\t},\n\t/**\n\t* Get total hidden data sum\n\t* @returns {number}\n\t* @private\n\t*/\n\tgetHiddenTotalDataSum() {\n\t\tconst { api, state: { hiddenTargetIds } } = this;\n\t\tlet total = 0;\n\t\tif (hiddenTargetIds.size) total = api.data.values.bind(api)([...hiddenTargetIds]).reduce((p, c) => p + c, 0);\n\t\treturn total;\n\t},\n\t/**\n\t* Get filtered data by value\n\t* @param {object} data Data\n\t* @param {number} value Value to be filtered\n\t* @returns {Array} filtered array data\n\t* @private\n\t*/\n\tgetFilteredDataByValue(data, value) {\n\t\treturn data.filter((t) => this.getBaseValue(t) === value);\n\t},\n\t/**\n\t* Return the max length of the data\n\t* @returns {number} max data length\n\t* @private\n\t*/\n\tgetMaxDataCount() {\n\t\tconst { targets } = this.data;\n\t\tlet max = 0;\n\t\tfor (let i = 0; i < targets.length; i++) if (targets[i].values.length > max) max = targets[i].values.length;\n\t\treturn max;\n\t},\n\tgetMaxDataCountTarget() {\n\t\tconst $$ = this;\n\t\tconst { cache, state } = $$;\n\t\tconst cached = cache.get(KEY.maxDataCountTarget);\n\t\tif (cached && cached.generation === state.dataGeneration) return cached.value;\n\t\tlet target = $$.filterTargetsToShow() || [];\n\t\tconst length = target.length;\n\t\tconst isInverted = $$.config.axis_x_inverted;\n\t\tif (length > 1) {\n\t\t\tconst allX = [];\n\t\t\tfor (let i = 0; i < target.length; i++) {\n\t\t\t\tconst values = target[i].values;\n\t\t\t\tfor (let j = 0; j < values.length; j++) allX.push(values[j].x);\n\t\t\t}\n\t\t\ttarget = allX;\n\t\t\ttarget = sortValue(getUnique(target)).map((x, index, array) => ({\n\t\t\t\tx,\n\t\t\t\tindex: isInverted ? array.length - index - 1 : index\n\t\t\t}));\n\t\t} else if (length) target = target[0].values.concat();\n\t\tcache.add(KEY.maxDataCountTarget, {\n\t\t\tvalue: target,\n\t\t\tgeneration: state.dataGeneration\n\t\t});\n\t\treturn target;\n\t},\n\tmapToIds(targets) {\n\t\treturn targets.map((d) => d.id);\n\t},\n\tmapToTargetIds(ids) {\n\t\tconst $$ = this;\n\t\treturn ids ? isArray(ids) ? ids.concat() : [ids] : $$.mapToIds($$.data.targets);\n\t},\n\thasTarget(targets, id) {\n\t\tconst ids = this.mapToIds(targets);\n\t\tfor (let i = 0, val; val = ids[i]; i++) if (val === id) return true;\n\t\treturn false;\n\t},\n\tisTargetToShow(targetId) {\n\t\treturn !this.state.hiddenTargetIds.has(targetId);\n\t},\n\tisLegendToShow(targetId) {\n\t\treturn !this.state.hiddenLegendIds.has(targetId);\n\t},\n\tgetTargetsToShow() {\n\t\tconst { state } = this;\n\t\treturn state._targetsToShow ?? this.filterTargetsToShow();\n\t},\n\tfilterTargetsToShow(targets) {\n\t\tconst $$ = this;\n\t\tif (!targets) {\n\t\t\tconst { cache, data, state } = $$;\n\t\t\tconst cacheKey = KEY.filteredTargets;\n\t\t\tconst cached = cache.get(cacheKey);\n\t\t\tif (cached && cached.generation === state.dataGeneration) return cached.value;\n\t\t\tconst filtered = data.targets.filter((t) => $$.isTargetToShow(t.id));\n\t\t\tcache.add(cacheKey, {\n\t\t\t\tvalue: filtered,\n\t\t\t\tgeneration: state.dataGeneration\n\t\t\t});\n\t\t\treturn filtered;\n\t\t}\n\t\treturn targets.filter((t) => $$.isTargetToShow(t.id));\n\t},\n\tmapTargetsToUniqueXs(targets) {\n\t\tconst { axis } = this;\n\t\tlet xs = [];\n\t\tif (targets?.length) {\n\t\t\txs = getUnique(mergeArray(targets.map((t) => t.values.map((v) => +v.x))));\n\t\t\txs = axis?.isTimeSeries() ? xs.map((x) => /* @__PURE__ */ new Date(+x)) : xs.map(Number);\n\t\t}\n\t\treturn sortValue(xs);\n\t},\n\t/**\n\t* Add to thetarget Ids\n\t* @param {string} type State's prop name\n\t* @param {Array|string} targetIds Target ids array\n\t* @private\n\t*/\n\taddTargetIds(type, targetIds) {\n\t\tconst { state } = this;\n\t\tnormalizeTargetIds(targetIds).forEach((v) => state[type].add(v));\n\t},\n\t/**\n\t* Remove from the state target Ids\n\t* @param {string} type State's prop name\n\t* @param {Array|string} targetIds Target ids array\n\t* @private\n\t*/\n\tremoveTargetIds(type, targetIds) {\n\t\tconst { state } = this;\n\t\tnormalizeTargetIds(targetIds).forEach((v) => state[type].delete(v));\n\t},\n\taddHiddenTargetIds(targetIds) {\n\t\tthis.addTargetIds(\"hiddenTargetIds\", targetIds);\n\t\tthis.cache.remove(KEY.visibleTotalPerIndex);\n\t},\n\tremoveHiddenTargetIds(targetIds) {\n\t\tthis.removeTargetIds(\"hiddenTargetIds\", targetIds);\n\t\tthis.cache.remove(KEY.visibleTotalPerIndex);\n\t},\n\taddHiddenLegendIds(targetIds) {\n\t\tthis.addTargetIds(\"hiddenLegendIds\", targetIds);\n\t},\n\tremoveHiddenLegendIds(targetIds) {\n\t\tthis.removeTargetIds(\"hiddenLegendIds\", targetIds);\n\t},\n\tgetValuesAsIdKeyed(targets) {\n\t\tconst $$ = this;\n\t\tconst { hasAxis } = $$.state;\n\t\tconst ys = {};\n\t\tconst isMultipleX = $$.isMultipleX();\n\t\tlet xIndexMap = null;\n\t\tif (isMultipleX) {\n\t\t\tconst cached = $$.cache.get(KEY.valuesXIndexMap);\n\t\t\tif (cached && cached.generation === $$.state.dataGeneration) xIndexMap = cached.value;\n\t\t\telse {\n\t\t\t\tconst xs = $$.mapTargetsToUniqueXs($$.data.targets).map((v) => isString(v) ? v : +v);\n\t\t\t\txIndexMap = new Map(xs.map((x, i) => [x, i]));\n\t\t\t\t$$.cache.add(KEY.valuesXIndexMap, {\n\t\t\t\t\tvalue: xIndexMap,\n\t\t\t\t\tgeneration: $$.state.dataGeneration\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t\ttargets.forEach((t) => {\n\t\t\tconst data = [];\n\t\t\tt.values.filter(({ value }) => isValue(value) || value === null).forEach((v) => {\n\t\t\t\tlet { value } = v;\n\t\t\t\tif (value !== null && $$.isCandlestickType(v)) value = isArray(value) ? value.slice(0, 4) : [\n\t\t\t\t\tvalue.open,\n\t\t\t\t\tvalue.high,\n\t\t\t\t\tvalue.low,\n\t\t\t\t\tvalue.close\n\t\t\t\t];\n\t\t\t\tif (isArray(value)) data.push(...value);\n\t\t\t\telse if (isObject(value) && \"high\" in value) data.push(...Object.values(value));\n\t\t\t\telse if ($$.isBubbleZType(v)) data.push(hasAxis && $$.getBubbleZData(value, \"y\"));\n\t\t\t\telse if (isMultipleX && xIndexMap) {\n\t\t\t\t\tconst xKey = isString(v.x) ? v.x : +v.x;\n\t\t\t\t\tconst index = xIndexMap.get(xKey);\n\t\t\t\t\tif (index !== void 0) data[index] = value;\n\t\t\t\t} else data.push(value);\n\t\t\t});\n\t\t\tys[t.id] = data;\n\t\t});\n\t\treturn ys;\n\t},\n\thasMultiTargets() {\n\t\treturn this.filterTargetsToShow().length > 1;\n\t},\n\t/**\n\t* Sort targets data\n\t* Note: For stacked bar, will sort from the total sum of data series, not for each stacked bar\n\t* @param {Array} targetsValue Target value\n\t* @returns {Array}\n\t* @private\n\t*/\n\torderTargets(targetsValue) {\n\t\tconst $$ = this;\n\t\tconst targets = targetsValue.slice();\n\t\tconst fn = $$.getSortCompareFn();\n\t\tfn && targets.sort(fn);\n\t\treturn targets;\n\t},\n\t/**\n\t* Get data.order compare function\n\t* @param {boolean} isReversed for Arc & Treemap type sort order needs to be reversed\n\t* @returns {function} compare function\n\t* @private\n\t*/\n\tgetSortCompareFn(isReversed = false) {\n\t\tconst $$ = this;\n\t\tconst { config } = $$;\n\t\tconst order = config.data_order;\n\t\tconst orderAsc = /asc/i.test(order);\n\t\tconst orderDesc = /desc/i.test(order);\n\t\tlet fn;\n\t\tif (orderAsc || orderDesc) {\n\t\t\tconst reducer = (p, c) => p + Math.abs(c.value);\n\t\t\tconst sum = (v) => isNumber(v) ? v : \"values\" in v ? v.values.reduce(reducer, 0) : v.value;\n\t\t\tfn = (t1, t2) => {\n\t\t\t\tconst t1Sum = sum(t1);\n\t\t\t\tconst t2Sum = sum(t2);\n\t\t\t\treturn isReversed ? orderAsc ? t1Sum - t2Sum : t2Sum - t1Sum : orderAsc ? t2Sum - t1Sum : t1Sum - t2Sum;\n\t\t\t};\n\t\t} else if (isFunction(order)) fn = order.bind($$.api);\n\t\treturn fn || null;\n\t},\n\tfilterByX(targets, x) {\n\t\treturn this.getValuesByX(targets).get(this.getXCacheKey(x)) || [];\n\t},\n\tfilterNullish(data) {\n\t\tconst filter = (v) => isValue(v.value);\n\t\treturn data ? data.filter((v) => \"value\" in v ? filter(v) : v.values.some(filter)) : data;\n\t},\n\tfilterRemoveNull(data) {\n\t\treturn data.filter((d) => isValue(this.getBaseValue(d)));\n\t},\n\tfilterByXDomain(targets, xDomain) {\n\t\treturn targets.map((t) => ({\n\t\t\tid: t.id,\n\t\t\tid_org: t.id_org,\n\t\t\tvalues: t.values.filter((v) => xDomain[0] <= v.x && v.x <= xDomain[1])\n\t\t}));\n\t},\n\thasDataLabel() {\n\t\tconst dataLabels = this.config.data_labels;\n\t\treturn isBoolean(dataLabels) && dataLabels || isObjectType(dataLabels) && notEmpty(dataLabels);\n\t},\n\t/**\n\t* Determine if has null value\n\t* @param {Array} targets Data array to be evaluated\n\t* @returns {boolean}\n\t* @private\n\t*/\n\thasNullDataValue(targets) {\n\t\treturn targets.some(({ value }) => value === null);\n\t},\n\t/**\n\t* Get data index from the event coodinates\n\t* @param {Event} event Event object\n\t* @returns {number}\n\t* @private\n\t*/\n\tgetDataIndexFromEvent(event) {\n\t\tconst { $el, config, state: { hasRadar, inputType, eventReceiver: { coords, rect } } } = this;\n\t\tlet index;\n\t\tif (hasRadar) {\n\t\t\tlet target = event.target;\n\t\t\tif (/tspan/i.test(target.tagName)) target = target.parentNode;\n\t\t\tconst d = select(target).datum();\n\t\t\tindex = d && Object.keys(d).length === 1 ? d.index : void 0;\n\t\t} else {\n\t\t\tconst isRotated = config.axis_rotated;\n\t\t\tconst scrollPos = getScrollPosition($el.chart.node());\n\t\t\tconst e = inputType === \"touch\" && event.changedTouches ? event.changedTouches[0] : event;\n\t\t\tlet point = isRotated ? e.clientY + scrollPos.y : e.clientX + scrollPos.x;\n\t\t\tif (hasViewBox($el.svg)) {\n\t\t\t\tconst pos = [point, 0];\n\t\t\t\tisRotated && pos.reverse();\n\t\t\t\tpoint = getTransformCTM($el.eventRect.node(), ...pos)[isRotated ? \"y\" : \"x\"];\n\t\t\t} else point -= isRotated ? rect.top : rect.left;\n\t\t\tindex = findIndex(coords, point, 0, coords.length - 1, isRotated);\n\t\t}\n\t\treturn index;\n\t},\n\tgetDataLabelLength(min, max, key) {\n\t\tconst $$ = this;\n\t\tconst paddingCoef = 1.3;\n\t\tconst values = [min, max].map((v) => $$.dataLabelFormat()(v));\n\t\tif ($$.config.render_mode === \"canvas\" && !$$.$el.svg) {\n\t\t\tconst chart = $$.$el.chart?.node?.();\n\t\t\tconst doc = chart?.ownerDocument;\n\t\t\tconst svg = doc?.createElementNS(\"http://www.w3.org/2000/svg\", \"svg\");\n\t\t\tif (chart && svg) {\n\t\t\t\tconst texts = values.map((value) => {\n\t\t\t\t\tconst text = doc.createElementNS(\"http://www.w3.org/2000/svg\", \"text\");\n\t\t\t\t\ttext.textContent = value;\n\t\t\t\t\tsvg.appendChild(text);\n\t\t\t\t\treturn text;\n\t\t\t\t});\n\t\t\t\tsvg.style.cssText = \"position:absolute;visibility:hidden;left:-10000px;top:-10000px;\";\n\t\t\t\tchart.appendChild(svg);\n\t\t\t\tconst lengths = texts.map((text) => text.getBoundingClientRect()[key] * paddingCoef);\n\t\t\t\tsvg.remove();\n\t\t\t\treturn lengths;\n\t\t\t}\n\t\t}\n\t\treturn $$.getTextRect(values)?.map((rect) => rect[key] * paddingCoef) || [0, 0];\n\t},\n\tisNoneArc(d) {\n\t\treturn this.hasTarget(this.data.targets, d.id);\n\t},\n\tisArc(d) {\n\t\treturn \"data\" in d && this.hasTarget(this.data.targets, d.data.id);\n\t},\n\tfindSameXOfValues(values, index) {\n\t\tconst targetX = values[index].x;\n\t\tconst sames = [];\n\t\tlet i;\n\t\tfor (i = index - 1; i >= 0; i--) {\n\t\t\tif (targetX !== values[i].x) break;\n\t\t\tsames.push(values[i]);\n\t\t}\n\t\tfor (i = index; i < values.length; i++) {\n\t\t\tif (targetX !== values[i].x) break;\n\t\t\tsames.push(values[i]);\n\t\t}\n\t\treturn sames;\n\t},\n\t/**\n\t* Get normalized x value cache key.\n\t* @param {Date|number|string} x X value\n\t* @returns {number|string} Cache key value\n\t* @private\n\t*/\n\tgetXCacheKey(x) {\n\t\treturn isString(x) ? x : +x;\n\t},\n\t/**\n\t* Get data rows grouped by x value.\n\t* @param {Array} targets Data targets\n\t* @returns {Map} X-value keyed data rows\n\t* @private\n\t*/\n\tgetValuesByX(targets) {\n\t\tconst $$ = this;\n\t\tconst { cache, state } = $$;\n\t\tconst targetKey = targets.map((t) => {\n\t\t\tconst { values } = t;\n\t\t\tconst first = values[0];\n\t\t\tconst last = values[values.length - 1];\n\t\t\treturn `${t.id}:${values.length}:${first ? $$.getXCacheKey(first.x) : \"\"}:${last ? $$.getXCacheKey(last.x) : \"\"}`;\n\t\t}).join(\"|\");\n\t\tconst cached = cache.get(KEY.valuesByX);\n\t\tif (cached && cached.generation === state.dataGeneration && cached.targetKey === targetKey) return cached.value;\n\t\tconst valueMap = /* @__PURE__ */ new Map();\n\t\tfor (let i = 0; i < targets.length; i++) {\n\t\t\tconst values = targets[i].values;\n\t\t\tfor (let j = 0; j < values.length; j++) {\n\t\t\t\tconst v = values[j];\n\t\t\t\tconst x = $$.getXCacheKey(v.x);\n\t\t\t\tconst rows = valueMap.get(x);\n\t\t\t\trows ? rows.push(v) : valueMap.set(x, [v]);\n\t\t\t}\n\t\t}\n\t\tcache.add(KEY.valuesByX, {\n\t\t\tgeneration: state.dataGeneration,\n\t\t\ttargetKey,\n\t\t\tvalue: valueMap\n\t\t});\n\t\treturn valueMap;\n\t},\n\t/**\n\t* Get candidate values near the current pointer position.\n\t* @param {Array} values Data values\n\t* @param {Array} pos Pointer position\n\t* @param {boolean} useSortedIndex Whether values are sorted target values\n\t* @returns {Array} Candidate values\n\t* @private\n\t*/\n\tgetClosestCandidates(values, pos, useSortedIndex = true) {\n\t\tconst $$ = this;\n\t\tconst { config, scale } = $$;\n\t\tconst len = values.length;\n\t\tconst first = values[0];\n\t\tif (!useSortedIndex || len < 200 || !first || !config.data_xSort) return values;\n\t\tconst isBar = $$.isBarType(first.id);\n\t\tconst isCandle = $$.isCandlestickType(first.id);\n\t\tconst sensitivity = config.point_sensitivity;\n\t\tif (!(isBar || isCandle) && !isNumber(sensitivity)) return values;\n\t\tconst xScale = scale.zoom || scale.x;\n\t\tconst pointerX = pos[+config.axis_rotated];\n\t\tconst isAscending = xScale(values[0].x) <= xScale(values[len - 1].x);\n\t\tlet start = 0;\n\t\tlet end = len - 1;\n\t\twhile (start < end) {\n\t\t\tconst mid = start + end >> 1;\n\t\t\tconst x = xScale(values[mid].x);\n\t\t\tif (isAscending ? x < pointerX : x > pointerX) start = mid + 1;\n\t\t\telse end = mid;\n\t\t}\n\t\tconst candidates = [];\n\t\tconst visited = /* @__PURE__ */ new Set();\n\t\tconst add = (index) => {\n\t\t\tif (index >= 0 && index < len && !visited.has(index)) {\n\t\t\t\tvisited.add(index);\n\t\t\t\tcandidates.push(values[index]);\n\t\t\t}\n\t\t};\n\t\tconst addSameX = (index) => {\n\t\t\tif (index < 0 || index >= len) return;\n\t\t\tconst x = $$.getXCacheKey(values[index].x);\n\t\t\tlet i = index;\n\t\t\twhile (i >= 0 && $$.getXCacheKey(values[i].x) === x) add(i--);\n\t\t\ti = index + 1;\n\t\t\twhile (i < len && $$.getXCacheKey(values[i].x) === x) add(i++);\n\t\t};\n\t\tif (isBar || isCandle) for (let i = start - 2; i <= start + 2; i++) addSameX(i);\n\t\telse {\n\t\t\tconst maxDx = sensitivity;\n\t\t\tconst scan = (index, direction) => {\n\t\t\t\tfor (let i = index; i >= 0 && i < len; i += direction) {\n\t\t\t\t\tconst v = values[i];\n\t\t\t\t\tif (Math.abs(xScale(v.x) - pointerX) > maxDx) break;\n\t\t\t\t\tadd(i);\n\t\t\t\t}\n\t\t\t};\n\t\t\tscan(start, 1);\n\t\t\tscan(start - 1, -1);\n\t\t}\n\t\treturn candidates;\n\t},\n\tfindClosestFromTargets(targets, pos) {\n\t\tconst $$ = this;\n\t\tconst candidates = [];\n\t\tfor (let i = 0; i < targets.length; i++) {\n\t\t\tconst closest = $$.findClosest(targets[i].values, pos);\n\t\t\tclosest && candidates.push(closest);\n\t\t}\n\t\treturn $$.findClosest(candidates, pos, false);\n\t},\n\tfindClosest(values, pos, useSortedIndex = true) {\n\t\tconst $$ = this;\n\t\tconst { $el: { main } } = $$;\n\t\tconst data = $$.getClosestCandidates(values, pos, useSortedIndex);\n\t\tlet minDist;\n\t\tlet closest;\n\t\tfor (let i = 0; i < data.length; i++) {\n\t\t\tconst v = data[i];\n\t\t\tif (!v || !isValue(v.value)) continue;\n\t\t\tconst isBar = $$.isBarType(v.id);\n\t\t\tconst isCandle = $$.isCandlestickType(v.id);\n\t\t\tif (isBar || isCandle) {\n\t\t\t\tconst selector = isBar ? `.${$BAR.chartBar}.${$COMMON.target}${$$.getTargetSelectorSuffix(v.id)} .${$BAR.bar}-${v.index}` : `.${$CANDLESTICK.chartCandlestick}.${$COMMON.target}${$$.getTargetSelectorSuffix(v.id)} .${$CANDLESTICK.candlestick}-${v.index} path`;\n\t\t\t\tif (!closest && $$.isWithinBar(main.select(selector).node())) closest = v;\n\t\t\t} else {\n\t\t\t\tconst d = $$.dist(v, pos);\n\t\t\t\tif (d < $$.getPointSensitivity(v) && (minDist === void 0 || d < minDist)) {\n\t\t\t\t\tminDist = d;\n\t\t\t\t\tclosest = v;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn closest;\n\t},\n\tdist(data, pos) {\n\t\tconst $$ = this;\n\t\tconst { config: { axis_rotated: isRotated }, scale } = $$;\n\t\tconst xIndex = +isRotated;\n\t\tconst yIndex = +!isRotated;\n\t\tconst y = $$.circleY(data, data.index);\n\t\tconst dx = (scale.zoom || scale.x)(data.x) - pos[xIndex];\n\t\tconst dy = y - pos[yIndex];\n\t\treturn Math.sqrt(dx * dx + dy * dy);\n\t},\n\t/**\n\t* Convert data for step type\n\t* @param {Array} values Object data values\n\t* @returns {Array}\n\t* @private\n\t*/\n\tconvertValuesToStep(values) {\n\t\tconst { axis, config } = this;\n\t\tconst stepType = config.line_step_type;\n\t\tconst isCategorized = axis ? axis.isCategorized() : false;\n\t\tconst converted = isArray(values) ? values.concat() : [values];\n\t\tif (!(isCategorized || /step\\-(after|before)/.test(stepType))) return values;\n\t\tif (converted.length) {\n\t\t\tconst head = converted[0];\n\t\t\tconst tail = converted[converted.length - 1];\n\t\t\tconst { id } = head;\n\t\t\tlet { x } = head;\n\t\t\tconverted.unshift({\n\t\t\t\tx: --x,\n\t\t\t\tvalue: head.value,\n\t\t\t\tid\n\t\t\t});\n\t\t\tisCategorized && stepType === \"step-after\" && converted.unshift({\n\t\t\t\tx: x - 1,\n\t\t\t\tvalue: head.value,\n\t\t\t\tid\n\t\t\t});\n\t\t\tx = tail.x;\n\t\t\tconverted.push({\n\t\t\t\tx: ++x,\n\t\t\t\tvalue: tail.value,\n\t\t\t\tid\n\t\t\t});\n\t\t\tisCategorized && stepType === \"step-before\" && converted.push({\n\t\t\t\tx: x + 1,\n\t\t\t\tvalue: tail.value,\n\t\t\t\tid\n\t\t\t});\n\t\t}\n\t\treturn converted;\n\t},\n\tconvertValuesToRange(values) {\n\t\tconst converted = isArray(values) ? values.concat() : [values];\n\t\tconst ranges = [];\n\t\tconverted.forEach((range) => {\n\t\t\tconst { x, id } = range;\n\t\t\tranges.push({\n\t\t\t\tx,\n\t\t\t\tid,\n\t\t\t\tvalue: range.value[0]\n\t\t\t});\n\t\t\tranges.push({\n\t\t\t\tx,\n\t\t\t\tid,\n\t\t\t\tvalue: range.value[2]\n\t\t\t});\n\t\t});\n\t\treturn ranges;\n\t},\n\tupdateDataAttributes(name, attrs) {\n\t\tconst $$ = this;\n\t\tconst { config } = $$;\n\t\tconst current = config[`data_${name}`];\n\t\tif (isUndefined(attrs)) return current;\n\t\tObject.keys(attrs).forEach((id) => {\n\t\t\tcurrent[id] = attrs[id];\n\t\t});\n\t\t$$.redraw({ withLegend: true });\n\t\treturn current;\n\t},\n\tgetRangedData(d, key = \"\", type = \"areaRange\") {\n\t\tconst value = d?.value;\n\t\tif (isArray(value)) {\n\t\t\tif (type === \"bar\") return value.reduce((a, c) => c - a);\n\t\t\telse {\n\t\t\t\tconst index = rangedDataKeyIndex[type]?.[key] ?? -1;\n\t\t\t\treturn index >= 0 ? value[index] : void 0;\n\t\t\t}\n\t\t} else if (value && key) return value[key];\n\t\treturn value;\n\t},\n\t/**\n\t* Set ratio for grouped data\n\t* @param {Array} data Data array\n\t* @private\n\t*/\n\tsetRatioForGroupedData(data) {\n\t\tconst $$ = this;\n\t\tconst { config } = $$;\n\t\tif (config.data_groups.length && data.some((d) => $$.isGrouped(d.id))) {\n\t\t\tconst setter = (d) => $$.getRatio(\"index\", d, true);\n\t\t\tdata.forEach((v) => {\n\t\t\t\t\"values\" in v ? v.values.forEach(setter) : setter(v);\n\t\t\t});\n\t\t}\n\t},\n\t/**\n\t* Get ratio value\n\t* @param {string} type Ratio for given type\n\t* @param {object} d Data value object\n\t* @param {boolean} asPercent Convert the return as percent or not\n\t* @returns {number} Ratio value\n\t* @private\n\t*/\n\tgetRatio(type, d, asPercent = false) {\n\t\tconst $$ = this;\n\t\tconst { config, state } = $$;\n\t\tconst api = $$.api;\n\t\tlet ratio = 0;\n\t\tif (d && api.data.shown().length) {\n\t\t\tratio = d.ratio || d.value;\n\t\t\tif (type === \"arc\") {\n\t\t\t\tif ($$.pie.padAngle()()) ratio = d.value / $$.getTotalDataSum(true);\n\t\t\t\telse {\n\t\t\t\t\tconst gaugeArcLength = config.gauge_fullCircle ? $$.getArcLength() : $$.getStartingAngle() * -2;\n\t\t\t\t\tconst arcLength = $$.hasType(\"gauge\") ? gaugeArcLength : Math.PI * 2;\n\t\t\t\t\tratio = (d.endAngle - d.startAngle) / arcLength;\n\t\t\t\t}\n\t\t\t} else if (type === \"index\") {\n\t\t\t\tconst total = $$.getVisibleTotalPerIndex($$.isStackNormalizedPerGroup() ? d.id : void 0);\n\t\t\t\tif (total === null) return ratio;\n\t\t\t\tconst divisor = total[d.index];\n\t\t\t\td.ratio = isNumber(d.value) && total && divisor ? d.value / divisor : 0;\n\t\t\t\tratio = d.ratio;\n\t\t\t} else if (type === \"radar\") ratio = parseFloat(String(Math.max(d.value, 0))) / state.current.dataMax * config.radar_size_ratio;\n\t\t\telse if (type === \"bar\") {\n\t\t\t\tconst max = $$.getYScaleById.bind($$)(d.id).domain().reduce((a, c) => c - a);\n\t\t\t\tratio = max === 0 ? 0 : Math.abs($$.getRangedData(d, null, type) / max);\n\t\t\t} else if (type === \"treemap\") ratio /= $$.getTotalDataSum(true);\n\t\t}\n\t\treturn asPercent && ratio ? ratio * 100 : ratio;\n\t},\n\t/**\n\t* Sort data index to be aligned with x axis.\n\t* @param {Array} tickValues Tick array values\n\t* @private\n\t*/\n\tupdateDataIndexByX(tickValues) {\n\t\tconst $$ = this;\n\t\tconst tickValueMap = tickValues.reduce((out, tick, index) => {\n\t\t\tout[Number(tick.x)] = index;\n\t\t\treturn out;\n\t\t}, {});\n\t\t$$.data.targets.forEach((t) => {\n\t\t\tt.values.forEach((value, valueIndex) => {\n\t\t\t\tlet index = tickValueMap[Number(value.x)];\n\t\t\t\tif (index === void 0) index = valueIndex;\n\t\t\t\tvalue.index = index;\n\t\t\t});\n\t\t});\n\t},\n\t/**\n\t* Determine if bubble has dimension data\n\t* @param {object|Array} d data value\n\t* @returns {boolean}\n\t* @private\n\t*/\n\tisBubbleZType(d) {\n\t\treturn this.isBubbleType(d) && (isObject(d.value) && (\"z\" in d.value || \"y\" in d.value) || isArray(d.value) && d.value.length >= 2);\n\t},\n\t/**\n\t* Determine if bar has ranged data\n\t* @param {Array} d data value\n\t* @returns {boolean}\n\t* @private\n\t*/\n\tisBarRangeType(d) {\n\t\tconst $$ = this;\n\t\tconst { value } = d;\n\t\treturn $$.isBarType(d) && !$$.isSubchartSourceTypeOf?.(d, TYPE.CANDLESTICK) && isArray(value) && value.length >= 2 && value.every(isNumber);\n\t},\n\t/**\n\t* Get data object by id\n\t* @param {string} id data id\n\t* @returns {object}\n\t* @private\n\t*/\n\tgetDataById(id) {\n\t\tconst d = this.cache.get(id) || this.api.data(id);\n\t\treturn d?.[0] ?? d;\n\t}\n};\n//#endregion\nexport { data_default as default };\n","/*!\n* Copyright (c) 2017 ~ present NAVER Corp.\r\n * billboard.js project is licensed under the MIT license\r\n * \r\n * billboard.js, JavaScript chart library\r\n * https://naver.github.io/billboard.js/\r\n * \r\n * @version 4.1.0\n*/\nimport { endall } from \"../../module/util/object.js\";\nimport { $LEGEND } from \"../../config/classes.js\";\nimport { KEY } from \"../../module/Cache.js\";\n//#region src/ChartInternal/data/load.ts\n/**\n* Copyright (c) 2017 ~ present NAVER Corp.\n* billboard.js project is licensed under the MIT license\n*/\n/**\n* Call done callback with resize after transition\n* @param {function} fn Callback function\n* @param {boolean} resizeAfter Weather to resize chart after the load\n* @private\n*/\nfunction callDone(fn, resizeAfter = false) {\n\tconst $$ = this;\n\tconst { api } = $$;\n\tresizeAfter && $$.api.flush(true);\n\tfn?.call(api);\n}\nvar load_default = {\n\tload(rawTargets, args) {\n\t\tconst $$ = this;\n\t\tconst { axis, data, org, scale } = $$;\n\t\tconst { append } = args;\n\t\tconst zoomState = {\n\t\t\tdomain: null,\n\t\t\tcurrentDomain: null,\n\t\t\tx: null\n\t\t};\n\t\tlet targets = rawTargets;\n\t\tif (targets) {\n\t\t\tif (args.filter) targets = targets.filter(args.filter);\n\t\t\tif (args.type || args.types) targets.forEach((t) => {\n\t\t\t\t$$.setTargetType(t.id, args.types?.[t.id] || args.type);\n\t\t\t});\n\t\t\tconst incoming = new Map(targets.map((t) => [t.id, t]));\n\t\t\tdata.targets.forEach((d) => {\n\t\t\t\tconst t = incoming.get(d.id);\n\t\t\t\tif (t) {\n\t\t\t\t\tif (append) {\n\t\t\t\t\t\tconst values = t.values;\n\t\t\t\t\t\tfor (let j = 0; j < values.length; j++) d.values.push(values[j]);\n\t\t\t\t\t} else d.values = t.values;\n\t\t\t\t\tincoming.delete(d.id);\n\t\t\t\t}\n\t\t\t});\n\t\t\tincoming.forEach((t) => data.targets.push(t));\n\t\t}\n\t\tif ($$.state.isCanvasMode) {\n\t\t\t$$.redraw({\n\t\t\t\twithUpdateOrgXDomain: true,\n\t\t\t\twithUpdateXDomain: true,\n\t\t\t\twithLegend: true\n\t\t\t});\n\t\t\t$$.updateTypesElements();\n\t\t\tcallDone.call($$, args.done, args.resizeAfter);\n\t\t\treturn;\n\t\t}\n\t\t$$.updateTargets(data.targets);\n\t\tif (scale.zoom) {\n\t\t\tzoomState.x = axis.isCategorized() ? scale.x.orgScale() : (org.xScale || scale.x).copy();\n\t\t\tzoomState.domain = $$.getXDomain(data.targets);\n\t\t\tzoomState.x.domain(zoomState.domain);\n\t\t\tzoomState.currentDomain = $$.zoom.getDomain();\n\t\t\tif (!$$.withinRange(zoomState.currentDomain, void 0, zoomState.domain)) {\n\t\t\t\tscale.x.domain(zoomState.domain);\n\t\t\t\tscale.zoom = null;\n\t\t\t\t$$.$el.eventRect.property(\"__zoom\", null);\n\t\t\t}\n\t\t}\n\t\t$$.redraw({\n\t\t\twithUpdateOrgXDomain: true,\n\t\t\twithUpdateXDomain: true,\n\t\t\twithLegend: true\n\t\t});\n\t\tif (scale.zoom) {\n\t\t\torg.xDomain = zoomState.domain;\n\t\t\torg.xScale = zoomState.x;\n\t\t\tif (axis.isCategorized()) {\n\t\t\t\tzoomState.currentDomain = $$.getZoomDomainValue(zoomState.currentDomain);\n\t\t\t\torg.xDomain = $$.getZoomDomainValue(org.xDomain);\n\t\t\t\torg.xScale = zoomState.x.domain(org.xDomain);\n\t\t\t}\n\t\t\t$$.updateCurrentZoomTransform(zoomState.x, zoomState.currentDomain);\n\t\t} else if (org.xScale) org.xScale.domain(org.xDomain);\n\t\t$$.updateTypesElements();\n\t\tcallDone.call($$, args.done, args.resizeAfter);\n\t},\n\tloadFromArgs(args) {\n\t\tconst $$ = this;\n\t\tif (!$$.config) return;\n\t\t$$.cache.reset(false, [\n\t\t\tKEY.filteredTargets,\n\t\t\tKEY.maxDataCountTarget,\n\t\t\tKEY.valuesXIndexMap,\n\t\t\tKEY.maxTickSize\n\t\t]);\n\t\t$$.convertData(args, (d) => {\n\t\t\tconst data = args.data || d;\n\t\t\targs.append && (data.__append__ = true);\n\t\t\tdata && $$.load($$.convertDataToTargets.call($$, data), args);\n\t\t});\n\t},\n\tunload(rawTargetIds, customDoneCb) {\n\t\tconst $$ = this;\n\t\tconst { state, $el, $T } = $$;\n\t\tconst hasLegendDefsPoint = !!$$.hasLegendDefsPoint?.();\n\t\tlet done = customDoneCb;\n\t\tlet targetIds = rawTargetIds;\n\t\t$$.cache.reset(false, [\n\t\t\tKEY.filteredTargets,\n\t\t\tKEY.maxDataCountTarget,\n\t\t\tKEY.valuesXIndexMap,\n\t\t\tKEY.maxTickSize\n\t\t]);\n\t\tif (!done) done = () => {};\n\t\ttargetIds = targetIds.filter((id) => $$.hasTarget($$.data.targets, id));\n\t\tif (targetIds.length === 0) {\n\t\t\tdone();\n\t\t\treturn;\n\t\t}\n\t\tconst unloadIds = new Set(targetIds);\n\t\tif (state.isCanvasMode) {\n\t\t\ttargetIds.forEach((id) => {\n\t\t\t\tstate.withoutFadeIn[id] = false;\n\t\t\t});\n\t\t\t$$.data.targets = $$.data.targets.filter((t) => !unloadIds.has(t.id));\n\t\t\t$$.removeHiddenTargetIds(targetIds);\n\t\t\t$$.removeHiddenLegendIds(targetIds);\n\t\t\t$$.updateTypesElements();\n\t\t\tdone();\n\t\t\treturn;\n\t\t}\n\t\ttargetIds.forEach((id) => {\n\t\t\tconst suffixId = $$.getTargetSelectorSuffix(id);\n\t\t\tstate.withoutFadeIn[id] = false;\n\t\t\tif ($el.legend) $el.legend.selectAll(`.${$LEGEND.legendItem}${suffixId}`).remove();\n\t\t\thasLegendDefsPoint && $el.defs?.select(`#${$$.getDefsPointId(suffixId)}`).remove();\n\t\t});\n\t\t$$.data.targets = $$.data.targets.filter((t) => !unloadIds.has(t.id));\n\t\tstate.hasFunnel && $$.updateFunnel($$.data.targets);\n\t\tstate.hasTreemap && $$.updateTargetsForTreemap($$.data.targets);\n\t\t$$.updateTypesElements();\n\t\t$T($el.svg.selectAll(targetIds.map((id) => $$.selectorTarget(id)))).style(\"opacity\", \"0\").remove().call(endall, done);\n\t}\n};\n//#endregion\nexport { callDone, load_default as default };\n","/*!\n* Copyright (c) 2017 ~ present NAVER Corp.\r\n * billboard.js project is licensed under the MIT license\r\n * \r\n * billboard.js, JavaScript chart library\r\n * https://naver.github.io/billboard.js/\r\n * \r\n * @version 4.1.0\n*/\nimport { isNumber, isObject } from \"../../module/util/type-checks.js\";\nimport { emulateEvent, getBoundingRect, getPointer, getTransformCTM, hasViewBox } from \"../../module/util/dom.js\";\nimport { $ARC, $AXIS, $COMMON, $SHAPE } from \"../../config/classes.js\";\nimport { KEY } from \"../../module/Cache.js\";\nimport { select } from \"d3-selection\";\nimport { drag } from \"d3-drag\";\n//#region src/ChartInternal/interactions/interaction.ts\n/**\n* Copyright (c) 2017 ~ present NAVER Corp.\n* billboard.js project is licensed under the MIT license\n*/\nvar interaction_default = {\n\t/**\n\t* Expand data shape/point\n\t* @param {number} index Index number\n\t* @param {string} id Data id\n\t* @param {boolean} reset Reset expand state\n\t* @private\n\t*/\n\tsetExpand(index, id, reset) {\n\t\tconst $$ = this;\n\t\tconst { config, $el: { circle } } = $$;\n\t\tcircle && config.point_focus_expand_enabled && $$.expandCircles(index, id, reset);\n\t\t$$.expandBarTypeShapes(true, index, id, reset);\n\t},\n\t/**\n\t* Expand/Unexpand bar type shapes\n\t* @param {boolean} expand Expand or unexpand\n\t* @param {number} i Shape index\n\t* @param {string} id Data id\n\t* @param {boolean} reset Reset expand style\n\t* @private\n\t*/\n\texpandBarTypeShapes(expand = true, i, id, reset) {\n\t\tconst $$ = this;\n\t\t[\"bar\", \"candlestick\"].filter((v) => $$.$el[v]).forEach((v) => {\n\t\t\treset && $$.$el[v].classed($COMMON.EXPANDED, false);\n\t\t\t$$.getShapeByIndex(v, i, id).classed($COMMON.EXPANDED, expand);\n\t\t});\n\t},\n\t/**\n\t* Handle data.onover/out callback options\n\t* @param {boolean} isOver Over or not\n\t* @param {number|object} d data object\n\t* @private\n\t*/\n\tsetOverOut(isOver, d) {\n\t\tconst $$ = this;\n\t\tconst { config, state: { hasFunnel, hasRadar, hasTreemap }, $el: { main } } = $$;\n\t\tconst isArcishData = isObject(d);\n\t\tif (isArcishData || d !== -1) {\n\t\t\tconst callback = config[isOver ? \"data_onover\" : \"data_onout\"].bind($$.api);\n\t\t\tconfig.color_onover && $$.setOverColor(isOver, d, isArcishData);\n\t\t\tif (isArcishData) {\n\t\t\t\tconst suffix = $$.getTargetSelectorSuffix(d.id);\n\t\t\t\tconst selector = hasFunnel || hasTreemap ? `${$COMMON.target + suffix} .${$SHAPE.shape}` : $ARC.arc + suffix;\n\t\t\t\tcallback(d, main.select(`.${selector}`).node());\n\t\t\t} else if (!config.tooltip_grouped) {\n\t\t\t\tconst last = $$.cache.get(KEY.setOverOut) || [];\n\t\t\t\tconst shapesAtIndex = main.selectAll(`.${$SHAPE.shape}-${d}`).filter(function(d) {\n\t\t\t\t\treturn $$.isWithinShape(this, d);\n\t\t\t\t});\n\t\t\t\tconst shape = shapesAtIndex.filter(function() {\n\t\t\t\t\treturn last.every((v) => v !== this);\n\t\t\t\t});\n\t\t\t\tif (!isOver || shapesAtIndex.empty() || last.length === shape.size() && shape.nodes().every((v, i) => v !== last[i])) while (last.length) {\n\t\t\t\t\tconst target = last.pop();\n\t\t\t\t\tconfig.data_onout.bind($$.api)(select(target).datum(), target);\n\t\t\t\t}\n\t\t\t\tshape.each(function() {\n\t\t\t\t\tif (isOver) {\n\t\t\t\t\t\tcallback(select(this).datum(), this);\n\t\t\t\t\t\tlast.push(this);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\t$$.cache.add(KEY.setOverOut, last);\n\t\t\t} else {\n\t\t\t\tif (isOver) hasRadar && $$.isPointFocusOnly() ? $$.showCircleFocus($$.getAllValuesOnIndex(d, true)) : $$.setExpand(d, null, true);\n\t\t\t\t!$$.isMultipleX() && main.selectAll(`.${$SHAPE.shape}-${d}`).each(function(d) {\n\t\t\t\t\tcallback(d, this);\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t},\n\t/**\n\t* Call data.onover/out callback for touch event\n\t* @param {number|object} d target index or data object for Arc type\n\t* @private\n\t*/\n\tcallOverOutForTouch(d) {\n\t\tconst $$ = this;\n\t\tconst last = $$.cache.get(KEY.callOverOutForTouch);\n\t\tif (isObject(d) && last ? d.id !== last.id : d !== last) {\n\t\t\t(last || isNumber(last)) && $$.setOverOut(false, last);\n\t\t\t(d || isNumber(d)) && $$.setOverOut(true, d);\n\t\t\t$$.cache.add(KEY.callOverOutForTouch, d);\n\t\t}\n\t},\n\t/**\n\t* Return draggable selection function\n\t* @returns {function}\n\t* @private\n\t*/\n\tgetDraggableSelection() {\n\t\tconst $$ = this;\n\t\tconst { config, state } = $$;\n\t\treturn config.interaction_enabled && config.data_selection_draggable && $$.drag ? drag().on(\"drag\", function(event) {\n\t\t\tstate.event = event;\n\t\t\t$$.drag(getPointer(event, this));\n\t\t}).on(\"start\", function(event) {\n\t\t\tstate.event = event;\n\t\t\t$$.dragstart(getPointer(event, this));\n\t\t}).on(\"end\", (event) => {\n\t\t\tstate.event = event;\n\t\t\t$$.dragend();\n\t\t}) : () => {};\n\t},\n\t/**\n\t* Dispatch a mouse event.\n\t* @private\n\t* @param {string} type event type\n\t* @param {number} index Index of eventRect\n\t* @param {Array} mouse x and y coordinate value\n\t*/\n\tdispatchEvent(type, index, mouse) {\n\t\tconst $$ = this;\n\t\tconst { config, state: { eventReceiver, hasAxis, hasFunnel, hasRadar, hasTreemap }, $el: { eventRect, funnel, radar, svg, treemap } } = $$;\n\t\tlet element = ((hasFunnel || hasTreemap) && eventReceiver.rect || hasRadar && radar.axes.select(`.${$AXIS.axis}-${index} text`) || eventRect || $$.getArcElementByIdOrIndex?.(index))?.node?.();\n\t\tif (element) {\n\t\t\tconst isMultipleX = $$.isMultipleX();\n\t\t\tconst isRotated = config.axis_rotated;\n\t\t\tlet { width, left, top } = getBoundingRect(element);\n\t\t\tif (hasAxis && !hasRadar && !isMultipleX) {\n\t\t\t\tconst coords = eventReceiver.coords[index];\n\t\t\t\tif (coords) {\n\t\t\t\t\twidth = coords.w;\n\t\t\t\t\tleft += coords.x;\n\t\t\t\t\ttop += coords.y;\n\t\t\t\t} else {\n\t\t\t\t\twidth = 0;\n\t\t\t\t\tleft = 0;\n\t\t\t\t\ttop = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\tlet x = left + (mouse ? mouse[0] : 0) + (isMultipleX || isRotated ? 0 : width / 2);\n\t\t\tlet y = top + (mouse ? mouse[1] : 0) + (isRotated ? 4 : 0);\n\t\t\tif (hasViewBox(svg) && $$.$el.eventRect) {\n\t\t\t\tconst ctm = getTransformCTM($$.$el.eventRect.node(), x, y, false);\n\t\t\t\tx = ctm.x;\n\t\t\t\ty = ctm.y;\n\t\t\t}\n\t\t\tconst params = {\n\t\t\t\tscreenX: x,\n\t\t\t\tscreenY: y,\n\t\t\t\tclientX: x,\n\t\t\t\tclientY: y,\n\t\t\t\tbubbles: hasRadar\n\t\t\t};\n\t\t\tif (hasFunnel || hasTreemap) element = (funnel ?? treemap).node();\n\t\t\temulateEvent[/^(mouse|click)/.test(type) ? \"mouse\" : \"touch\"](element, type, params);\n\t\t}\n\t},\n\tsetDragStatus(isDragging) {\n\t\tthis.state.dragging = isDragging;\n\t},\n\t/**\n\t* Unbind zoom events\n\t* @private\n\t*/\n\tunbindZoomEvent() {\n\t\tconst { $el: { canvas, eventRect, svg, zoomResetBtn } } = this;\n\t\teventRect?.on(\".zoom wheel.zoom .drag\", null);\n\t\tcanvas?.on(\".zoom wheel.zoom .drag\", null);\n\t\tsvg?.on(\"wheel\", null);\n\t\tzoomResetBtn?.on(\"click\", null).style(\"display\", \"none\");\n\t},\n\t/**\n\t* Unbind all attached events\n\t* @private\n\t*/\n\tunbindAllEvents() {\n\t\tconst $$ = this;\n\t\tconst { $el: { arcs, eventRect, legend, region, svg, treemap }, brush } = $$;\n\t\tconst list = [\n\t\t\t\"wheel\",\n\t\t\t\"click\",\n\t\t\t\"mouseover\",\n\t\t\t\"mousemove\",\n\t\t\t\"mouseout\",\n\t\t\t\"touchstart\",\n\t\t\t\"touchmove\",\n\t\t\t\"touchend\",\n\t\t\t\"touchstart.eventRect\",\n\t\t\t\"touchmove.eventRect\",\n\t\t\t\"touchend.eventRect\",\n\t\t\t\".brush\",\n\t\t\t\".drag\",\n\t\t\t\".zoom\",\n\t\t\t\"wheel.zoom\",\n\t\t\t\"dblclick.zoom\"\n\t\t].join(\" \");\n\t\t[\n\t\t\tsvg,\n\t\t\teventRect,\n\t\t\tregion?.list,\n\t\t\tbrush?.getSelection(),\n\t\t\tarcs?.selectAll(\"path\"),\n\t\t\tlegend?.selectAll(\"g\"),\n\t\t\ttreemap\n\t\t].forEach((v) => v?.on(list, null));\n\t\t$$.unbindZoomEvent?.();\n\t}\n};\n//#endregion\nexport { interaction_default as default };\n","/*!\n* Copyright (c) 2017 ~ present NAVER Corp.\r\n * billboard.js project is licensed under the MIT license\r\n * \r\n * billboard.js, JavaScript chart library\r\n * https://naver.github.io/billboard.js/\r\n * \r\n * @version 4.1.0\n*/\n//#region src/ChartInternal/internals/category.ts\n/**\n* Copyright (c) 2017 ~ present NAVER Corp.\n* billboard.js project is licensed under the MIT license\n*/\nvar category_default = { \n/**\n* Category Name\n* @param {number} i Index number\n* @returns {string} category Name\n* @private\n*/\ncategoryName(i) {\n\tconst { axis_x_categories } = this.config;\n\treturn axis_x_categories?.[i] ?? i;\n} };\n//#endregion\nexport { category_default as default };\n","/*!\n* Copyright (c) 2017 ~ present NAVER Corp.\r\n * billboard.js project is licensed under the MIT license\r\n * \r\n * billboard.js, JavaScript chart library\r\n * https://naver.github.io/billboard.js/\r\n * \r\n * @version 4.1.0\n*/\nimport classes_default from \"../../config/classes.js\";\n//#region src/ChartInternal/internals/class.ts\n/**\n* Copyright (c) 2017 ~ present NAVER Corp.\n* billboard.js project is licensed under the MIT license\n*/\nconst RE_SELECTOR_SUFFIX = /[\\x00-\\x20\\x7F-\\xA0\\s?!@#$%^&*()_=+,.<>'\":;\\[\\]\\/|~`{}\\\\]/g;\nvar class_default = {\n\tgenerateClass(prefix, targetId) {\n\t\tconst cache = this.state.generateClassCache;\n\t\tconst key = `${prefix}\\0${targetId}`;\n\t\tlet cls = cache.get(key);\n\t\tif (!cls) {\n\t\t\tcls = ` ${prefix} ${prefix + this.getTargetSelectorSuffix(targetId)}`;\n\t\t\tcache.set(key, cls);\n\t\t}\n\t\treturn cls;\n\t},\n\t/**\n\t* Get class string\n\t* @param {string} type Shape type\n\t* @param {boolean} withShape Get with shape prefix\n\t* @returns {string} Class string\n\t* @private\n\t*/\n\tgetClass(type, withShape) {\n\t\tconst isPlural = /s$/.test(type);\n\t\tconst useIdKey = /^(area|arc|line|funnel|treemap)s?$/.test(type);\n\t\tconst key = isPlural ? \"id\" : \"index\";\n\t\treturn (d) => {\n\t\t\tconst data = d.data || d;\n\t\t\treturn ((withShape ? this.generateClass(classes_default[isPlural ? \"shapes\" : \"shape\"], data[key]) : \"\") + this.generateClass(classes_default[type], data[useIdKey ? \"id\" : key])).trim();\n\t\t};\n\t},\n\t/**\n\t* Get chart class string\n\t* @param {string} type Shape type\n\t* @returns {string} Class string\n\t* @private\n\t*/\n\tgetChartClass(type) {\n\t\treturn (d) => classes_default[`chart${type}`] + this.classTarget((d.data ? d.data : d).id);\n\t},\n\tgenerateExtraLineClass() {\n\t\tconst classes = this.config.line_classes || [];\n\t\tconst ids = [];\n\t\treturn function(d) {\n\t\t\tconst id = d.id || d.data?.id || d;\n\t\t\tif (ids.indexOf(id) < 0) ids.push(id);\n\t\t\treturn classes[ids.indexOf(id) % classes.length];\n\t\t};\n\t},\n\tclassRegion(d, i) {\n\t\treturn `${this.generateClass(classes_default.region, i)} ${\"class\" in d ? d.class : \"\"}`;\n\t},\n\tclassTarget(id) {\n\t\tconst additionalClassSuffix = this.config.data_classes[id];\n\t\tlet additionalClass = \"\";\n\t\tif (additionalClassSuffix) additionalClass = ` ${classes_default.target}-${additionalClassSuffix}`;\n\t\treturn this.generateClass(classes_default.target, id) + additionalClass;\n\t},\n\tclassFocus(d) {\n\t\treturn this.classFocused(d) + this.classDefocused(d);\n\t},\n\tclassFocused(d) {\n\t\treturn ` ${this.state.focusedTargetIds.has(d.id) ? classes_default.focused : \"\"}`;\n\t},\n\tclassDefocused(d) {\n\t\treturn ` ${this.state.defocusedTargetIds.has(d.id) ? classes_default.defocused : \"\"}`;\n\t},\n\tgetTargetSelectorSuffix(targetId) {\n\t\treturn (targetId || targetId === 0 ? `-${targetId}` : \"\").replace(RE_SELECTOR_SUFFIX, \"-\");\n\t},\n\tselectorTarget(id, prefix = \"\", postfix = \"\") {\n\t\tconst target = this.getTargetSelectorSuffix(id);\n\t\treturn `${prefix}.${classes_default.target + target} ${postfix}, ${prefix}.${classes_default.circles + target} ${postfix}`;\n\t},\n\tselectorTargets(idsValue, prefix) {\n\t\tconst ids = idsValue || [];\n\t\treturn ids.length ? ids.map((id) => this.selectorTarget(id, prefix)) : null;\n\t},\n\tselectorLegend(id) {\n\t\treturn `.${classes_default.legendItem + this.getTargetSelectorSuffix(id)}`;\n\t},\n\tselectorLegends(ids) {\n\t\treturn ids?.length ? ids.map((id) => this.selectorLegend(id)) : null;\n\t}\n};\n//#endregion\nexport { class_default as default };\n","/*!\n* Copyright (c) 2017 ~ present NAVER Corp.\r\n * billboard.js project is licensed under the MIT license\r\n * \r\n * billboard.js, JavaScript chart library\r\n * https://naver.github.io/billboard.js/\r\n * \r\n * @version 4.1.0\n*/\nimport { document as doc } from \"../../module/browser.js\";\nimport { isFunction, isObject, isString, notEmpty } from \"../../module/util/type-checks.js\";\nimport { sanitize } from \"../../module/sanitize.js\";\nimport { $ARC, $COLOR, $SHAPE } from \"../../config/classes.js\";\nimport { KEY } from \"../../module/Cache.js\";\nimport { select } from \"d3-selection\";\n//#region src/ChartInternal/internals/color.ts\n/**\n* Copyright (c) 2017 ~ present NAVER Corp.\n* billboard.js project is licensed under the MIT license\n*/\n/**\n* Set pattern's background color\n* (it adds a <rect> element to simulate bg-color)\n* @param {SVGPatternElement} pattern SVG pattern element\n* @param {string} color Color string\n* @param {string} id ID to be set\n* @returns {{id: string, node: SVGPatternElement}}\n* @private\n*/\nconst _colorizePattern = (pattern, color, id) => {\n\tconst node = select(pattern.cloneNode(true));\n\tnode.attr(\"id\", id).insert(\"rect\", \":first-child\").attr(\"width\", node.attr(\"width\")).attr(\"height\", node.attr(\"height\")).style(\"fill\", color);\n\treturn {\n\t\tid,\n\t\tnode: node.node()\n\t};\n};\n/**\n* Get color pattern from CSS file\n* CSS should be defined as: background-image: url(\"#00c73c;#fa7171; ...\");\n* @param {d3Selection} element Chart element\n* @returns {Array}\n* @private\n*/\nfunction _getColorFromCss(element) {\n\tconst cacheKey = KEY.colorPattern;\n\tconst { body } = doc;\n\tlet pattern = body[cacheKey];\n\tif (!pattern) {\n\t\tconst delimiter = \";\";\n\t\tconst content = element.classed($COLOR.colorPattern, true).style(\"background-image\");\n\t\telement.classed($COLOR.colorPattern, false);\n\t\tif (content.indexOf(delimiter) > -1) {\n\t\t\tpattern = content.replace(/url[^#]*|[\"'()]|(\\s|%20)/g, \"\").split(delimiter).map((v) => v.trim().replace(/[\\\"'\\s]/g, \"\")).filter(Boolean);\n\t\t\tbody[cacheKey] = pattern;\n\t\t}\n\t}\n\treturn pattern;\n}\nconst schemeCategory10 = [\n\t\"#1f77b4\",\n\t\"#ff7f0e\",\n\t\"#2ca02c\",\n\t\"#d62728\",\n\t\"#9467bd\",\n\t\"#8c564b\",\n\t\"#e377c2\",\n\t\"#7f7f7f\",\n\t\"#bcbd22\",\n\t\"#17becf\"\n];\nvar color_default = {\n\tgenerateColor() {\n\t\tconst $$ = this;\n\t\tconst { $el, config } = $$;\n\t\tconst ids = [];\n\t\tconst hasGradient = config.area_linearGradient || config.bar_linearGradient || config.point_radialGradient;\n\t\tlet pattern = notEmpty(config.color_pattern) ? config.color_pattern : [..._getColorFromCss($el.chart) || schemeCategory10];\n\t\tconst originalColorPattern = pattern;\n\t\tif (isFunction(config.color_tiles)) {\n\t\t\tconst tiles = config.color_tiles.bind($$.api)();\n\t\t\tconst colorizedPatterns = pattern.map((p, index) => {\n\t\t\t\tconst color = p.replace(/[#\\(\\)\\s,]/g, \"\");\n\t\t\t\tconst id = `${$$.state.datetimeId}-pattern-${color}-${index}`;\n\t\t\t\treturn _colorizePattern(tiles[index % tiles.length], p, id);\n\t\t\t});\n\t\t\tpattern = colorizedPatterns.map((p) => `url(#${p.id})`);\n\t\t\t$$.patterns = colorizedPatterns;\n\t\t}\n\t\treturn function(d) {\n\t\t\tconst colors = config.data_colors;\n\t\t\tconst callback = config.data_color;\n\t\t\tconst id = d.id || d.data?.id || d;\n\t\t\tconst isLine = $$.isTypeOf(id, [\n\t\t\t\t\"line\",\n\t\t\t\t\"spline\",\n\t\t\t\t\"step\"\n\t\t\t]) || !config.data_types[id];\n\t\t\tlet color;\n\t\t\tif (isFunction(colors[id])) color = colors[id].bind($$.api)(d);\n\t\t\telse if (colors[id]) color = colors[id];\n\t\t\telse {\n\t\t\t\tlet idx = ids.indexOf(id);\n\t\t\t\tif (idx < 0) {\n\t\t\t\t\tids.push(id);\n\t\t\t\t\tidx = ids.length - 1;\n\t\t\t\t}\n\t\t\t\tcolor = isLine ? originalColorPattern[idx % originalColorPattern.length] : pattern[idx % pattern.length];\n\t\t\t\tcolors[id] = color;\n\t\t\t}\n\t\t\tcolor = isFunction(callback) ? callback.call($$.api, color, d) : color;\n\t\t\tif (hasGradient && $el.defs) {\n\t\t\t\tconst stop = $$.$el.defs.selectAll(`[id$='-gradient${$$.getTargetSelectorSuffix(id)}'] stop`);\n\t\t\t\tlet hasSameColor;\n\t\t\t\tstop.each(function(d, i) {\n\t\t\t\t\thasSameColor = i === 0 ? this.style.stopColor : this.style.stopColor === hasSameColor;\n\t\t\t\t});\n\t\t\t\thasSameColor === true && stop.attr(\"stop-color\", color);\n\t\t\t}\n\t\t\treturn color;\n\t\t};\n\t},\n\tgenerateLevelColor() {\n\t\tconst { config } = this;\n\t\tconst colors = config.color_pattern;\n\t\tconst threshold = config.color_threshold;\n\t\tconst asValue = threshold.unit === \"value\";\n\t\tconst max = threshold.max || 100;\n\t\tconst values = threshold.values && threshold.values.length ? threshold.values : [];\n\t\treturn notEmpty(threshold) ? function(value) {\n\t\t\tconst v = asValue ? value : value * 100 / max;\n\t\t\tlet color = colors[colors.length - 1];\n\t\t\tfor (let i = 0, l = values.length; i < l; i++) if (v <= values[i]) {\n\t\t\t\tcolor = colors[i];\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\treturn color;\n\t\t} : null;\n\t},\n\t/**\n\t* Append data backgound color filter definition\n\t* @param {string|object|function} color Color string, object, or function\n\t* @param {object} attr filter attribute\n\t* @private\n\t*/\n\tgenerateTextBGColorFilter(color, attr = {\n\t\tx: 0,\n\t\ty: 0,\n\t\twidth: 1,\n\t\theight: 1\n\t}) {\n\t\tconst $$ = this;\n\t\tconst { $el: { defs }, state } = $$;\n\t\tif (color) {\n\t\t\tlet ids = [];\n\t\t\tif (isString(color)) ids.push(\"\");\n\t\t\telse if (isObject(color)) ids = Object.keys(color);\n\t\t\telse if (isFunction(color)) ids = $$.mapToTargetIds();\n\t\t\tids.forEach((v) => {\n\t\t\t\tconst id = `${state.datetimeId}-labels-bg${$$.getTargetSelectorSuffix(v)}${isString(color) ? $$.getTargetSelectorSuffix(color) : \"\"}`;\n\t\t\t\tconst colorValue = sanitize(v === \"\" ? color : color?.[v] || \"\");\n\t\t\t\tif (defs.select(`#${id}`).empty()) {\n\t\t\t\t\tconst filter = defs.append(\"filter\").attr(\"x\", attr.x).attr(\"y\", attr.y).attr(\"width\", attr.width).attr(\"height\", attr.height).attr(\"id\", id);\n\t\t\t\t\tfilter.append(\"feFlood\").attr(\"flood-color\", colorValue);\n\t\t\t\t\tfilter.append(\"feComposite\").attr(\"in\", \"SourceGraphic\");\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t},\n\t/**\n\t* Get data gradient color url\n\t* @param {string} id Data id\n\t* @returns {string}\n\t* @private\n\t*/\n\tgetGradienColortUrl(id) {\n\t\treturn `url(#${this.state.datetimeId}-gradient${this.getTargetSelectorSuffix(id)})`;\n\t},\n\t/**\n\t* Update linear/radial gradient definition\n\t* - linear: area & bar only\n\t* - radial: type which has data points only\n\t* @private\n\t*/\n\tupdateLinearGradient() {\n\t\tconst $$ = this;\n\t\tconst { config, data: { targets }, state: { datetimeId }, $el: { defs } } = $$;\n\t\ttargets.forEach((d) => {\n\t\t\tconst id = `${datetimeId}-gradient${$$.getTargetSelectorSuffix(d.id)}`;\n\t\t\tconst radialGradient = $$.hasPointType() && config.point_radialGradient;\n\t\t\tconst supportedType = $$.isAreaType(d) && \"area\" || $$.isBarType(d) && \"bar\";\n\t\t\tif ((radialGradient || supportedType) && defs.select(`#${id}`).empty()) {\n\t\t\t\tconst color = $$.color(d);\n\t\t\t\tconst gradient = {\n\t\t\t\t\tdefs: null,\n\t\t\t\t\tstops: []\n\t\t\t\t};\n\t\t\t\tif (radialGradient) {\n\t\t\t\t\tconst { cx = .3, cy = .3, r = .7, stops = [[\n\t\t\t\t\t\t.1,\n\t\t\t\t\t\tcolor,\n\t\t\t\t\t\t0\n\t\t\t\t\t], [\n\t\t\t\t\t\t.9,\n\t\t\t\t\t\tcolor,\n\t\t\t\t\t\t1\n\t\t\t\t\t]] } = radialGradient;\n\t\t\t\t\tgradient.stops = stops;\n\t\t\t\t\tgradient.defs = defs.append(\"radialGradient\").attr(\"id\", `${id}`).attr(\"cx\", cx).attr(\"cy\", cy).attr(\"r\", r);\n\t\t\t\t} else {\n\t\t\t\t\tconst isRotated = config.axis_rotated;\n\t\t\t\t\tconst { x = isRotated ? [1, 0] : [0, 0], y = isRotated ? [0, 0] : [0, 1], stops = [[\n\t\t\t\t\t\t0,\n\t\t\t\t\t\tcolor,\n\t\t\t\t\t\t1\n\t\t\t\t\t], [\n\t\t\t\t\t\t1,\n\t\t\t\t\t\tcolor,\n\t\t\t\t\t\t0\n\t\t\t\t\t]] } = config[`${supportedType}_linearGradient`];\n\t\t\t\t\tgradient.stops = stops;\n\t\t\t\t\tgradient.defs = defs.append(\"linearGradient\").attr(\"id\", `${id}`).attr(\"x1\", x[0]).attr(\"x2\", x[1]).attr(\"y1\", y[0]).attr(\"y2\", y[1]);\n\t\t\t\t}\n\t\t\t\tgradient.stops.forEach((v) => {\n\t\t\t\t\tconst [offset, stopColor, stopOpacity] = v;\n\t\t\t\t\tconst colorValue = isFunction(stopColor) ? stopColor.bind($$.api)(d.id) : stopColor;\n\t\t\t\t\tgradient.defs && gradient.defs.append(\"stop\").attr(\"offset\", offset).attr(\"stop-color\", colorValue || color).attr(\"stop-opacity\", stopOpacity);\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t},\n\t/**\n\t* Set the data over color.\n\t* When is out, will restate in its previous color value\n\t* @param {boolean} isOver true: set overed color, false: restore\n\t* @param {number|object} d target index or data object for Arc type\n\t* @private\n\t*/\n\tsetOverColor(isOver, d) {\n\t\tconst $$ = this;\n\t\tconst { config, $el: { main } } = $$;\n\t\tconst onover = config.color_onover;\n\t\tlet color = isOver ? onover : $$.color;\n\t\tif (isObject(color)) color = ({ id }) => id in onover ? onover[id] : $$.color(id);\n\t\telse if (isString(color)) color = () => onover;\n\t\telse if (isFunction(onover)) color = color.bind($$.api);\n\t\tmain.selectAll(isObject(d) ? `.${$ARC.arc}${$$.getTargetSelectorSuffix(d.id)}` : `.${$SHAPE.shape}-${d}`).style(\"fill\", color);\n\t}\n};\n//#endregion\nexport { color_default as default };\n","/*!\n* Copyright (c) 2017 ~ present NAVER Corp.\r\n * billboard.js project is licensed under the MIT license\r\n * \r\n * billboard.js, JavaScript chart library\r\n * https://naver.github.io/billboard.js/\r\n * \r\n * @version 4.1.0\n*/\nimport { brushSelection } from \"d3-brush\";\n//#region src/module/util/brush.ts\n/**\n* Copyright (c) 2017 ~ present NAVER Corp.\n* billboard.js project is licensed under the MIT license\n* @ignore\n*/\n/**\n* Return brush selection array\n* @param {object} ctx Current instance\n* @returns {d3.brushSelection}\n* @private\n*/\nfunction getBrushSelection(ctx) {\n\tconst { event, $el } = ctx;\n\tconst main = $el.subchart.main || $el.main;\n\tlet selection;\n\tif (event && event.type === \"brush\") selection = event.selection;\n\telse if (main && (selection = main.select(\".bb-brush\").node())) selection = brushSelection(selection);\n\treturn selection;\n}\n/**\n* Check if brush is empty\n* @param {object} ctx Bursh context\n* @returns {boolean}\n* @private\n*/\nfunction brushEmpty(ctx) {\n\tconst selection = getBrushSelection(ctx);\n\tif (selection) return selection[0] === selection[1];\n\treturn true;\n}\n//#endregion\nexport { brushEmpty, getBrushSelection };\n","/*!\n* Copyright (c) 2017 ~ present NAVER Corp.\r\n * billboard.js project is licensed under the MIT license\r\n * \r\n * billboard.js, JavaScript chart library\r\n * https://naver.github.io/billboard.js/\r\n * \r\n * @version 4.1.0\n*/\nimport { TYPE, TYPE_BY_CATEGORY } from \"../../config/const.js\";\nimport { diffDomain, isDefined, isNumber, isObject, isValue, notEmpty } from \"../../module/util/type-checks.js\";\nimport { getMinMax, parseDate, sortValue, toSet } from \"../../module/util/object.js\";\nimport { brushEmpty, getBrushSelection } from \"../../module/util/brush.js\";\nimport { KEY } from \"../../module/Cache.js\";\n//#region src/ChartInternal/internals/domain.ts\n/**\n* Copyright (c) 2017 ~ present NAVER Corp.\n* billboard.js project is licensed under the MIT license\n*/\n/**\n* Build a compact cache key for target-domain scans.\n* @param {object} $$ ChartInternal instance\n* @param {Array} targets Data targets\n* @returns {string} Cache key\n* @private\n*/\nfunction getTargetDomainCacheKey($$, targets) {\n\treturn targets.map((target) => {\n\t\tconst { values } = target;\n\t\tconst first = values[0];\n\t\tconst last = values[values.length - 1];\n\t\tconst firstX = first ? $$.getXCacheKey?.(first.x) ?? first.x : \"\";\n\t\tconst lastX = last ? $$.getXCacheKey?.(last.x) ?? last.x : \"\";\n\t\tconst targetType = $$.getTargetType?.(target) ?? \"\";\n\t\treturn `${target.id}:${targetType}:${$$.state?.subchartSourceTypes?.[target.id] ?? \"\"}:${values.length}:${firstX}:${lastX}`;\n\t}).join(\"|\");\n}\n/**\n* Check whether domain result can be cached without accumulating zoom-window entries.\n* @param {object} $$ ChartInternal instance\n* @param {Array} targets Data targets\n* @returns {boolean} Whether the targets use original value arrays\n* @private\n*/\nfunction canCacheTargetDomain($$, targets) {\n\tconst sourceTargets = $$.data?.targets;\n\tif (!sourceTargets) return false;\n\tfor (let i = 0; i < targets.length; i++) {\n\t\tconst target = targets[i];\n\t\tconst source = sourceTargets.find((v) => v.id === target.id);\n\t\tif (!source || source.values !== target.values) return false;\n\t}\n\treturn true;\n}\n/**\n* Update a min/max accumulator with a scalar domain value.\n* @param {object} minMax Min/max accumulator\n* @param {number|Date|null|undefined} value Domain value\n* @private\n*/\nfunction updateMinMax(minMax, value) {\n\tif (!notEmpty(value)) return;\n\tif (minMax.min === void 0 || value < minMax.min) minMax.min = value;\n\tif (minMax.max === void 0 || value > minMax.max) minMax.max = value;\n}\n/**\n* Update a min/max accumulator from an array-like value.\n* @param {object} minMax Min/max accumulator\n* @param {Array} values Domain values\n* @private\n*/\nfunction updateMinMaxFromValues(minMax, values) {\n\tfor (let i = 0; i < values.length; i++) updateMinMax(minMax, values[i]);\n}\n/**\n* Compute target value min/max without allocating intermediate value arrays.\n* @param {object} $$ ChartInternal instance\n* @param {Array} targets Data targets\n* @returns {Array} Min/max tuple\n* @private\n*/\nfunction getTargetValueMinMax($$, targets) {\n\tconst minMax = {\n\t\tmin: void 0,\n\t\tmax: void 0\n\t};\n\tconst hasAxis = $$.state.hasAxis;\n\tfor (let i = 0; i < targets.length; i++) {\n\t\tconst target = targets[i];\n\t\tconst isCandlestick = $$.isCandlestickType?.(target);\n\t\tconst isSubchartCandlestick = !isCandlestick && !!$$.isSubchartSourceTypeOf?.(target, TYPE.CANDLESTICK);\n\t\tconst { values } = target;\n\t\tfor (let j = 0; j < values.length; j++) {\n\t\t\tconst row = values[j];\n\t\t\tlet value = row.value;\n\t\t\tif (!(isValue(value) || value === null)) continue;\n\t\t\tconst subchartCandlestickValue = isSubchartCandlestick ? $$.getSubchartCandlestickShapeValue?.(row, true) : void 0;\n\t\t\tif (isNumber(subchartCandlestickValue)) value = subchartCandlestickValue;\n\t\t\telse if (value !== null && (isCandlestick || isSubchartCandlestick)) value = Array.isArray(value) ? value.slice(0, 4) : [\n\t\t\t\tvalue.open,\n\t\t\t\tvalue.high,\n\t\t\t\tvalue.low,\n\t\t\t\tvalue.close\n\t\t\t];\n\t\t\tif (Array.isArray(value)) updateMinMaxFromValues(minMax, value);\n\t\t\telse if (isObject(value) && \"high\" in value) updateMinMaxFromValues(minMax, Object.values(value));\n\t\t\telse if ($$.isBubbleZType?.(row)) updateMinMax(minMax, hasAxis && $$.getBubbleZData(value, \"y\"));\n\t\t\telse updateMinMax(minMax, value);\n\t\t}\n\t}\n\treturn [minMax.min, minMax.max];\n}\n/**\n* Compute x-domain min or max without allocating intermediate x arrays.\n* @param {Array} targets Data targets\n* @param {string} type Min/max type\n* @returns {number|Date|undefined} Domain value\n* @private\n*/\nfunction getTargetXMinMax(targets, type) {\n\tlet result;\n\tfor (let i = 0; i < targets.length; i++) {\n\t\tconst { values } = targets[i];\n\t\tfor (let j = 0; j < values.length; j++) {\n\t\t\tconst { x } = values[j];\n\t\t\tif (notEmpty(x) && (result === void 0 || (type === \"min\" ? x < result : x > result))) result = x;\n\t\t}\n\t}\n\treturn result;\n}\nvar domain_default = {\n\t/**\n\t* Get both min and max Y domain values in a single pass.\n\t* Avoids calling getValuesAsIdKeyed twice.\n\t* @param {Array} targets Target data\n\t* @returns {Array.<number|Date|undefined>} [min, max]\n\t* @private\n\t*/\n\tgetYDomainMinMaxBoth(targets) {\n\t\tconst $$ = this;\n\t\tconst { axis, cache, config, state } = $$;\n\t\tconst cacheKey = canCacheTargetDomain($$, targets) ? `${KEY.domainMinMax}_y_${getTargetDomainCacheKey($$, targets)}` : null;\n\t\tconst cached = cacheKey && cache.get(cacheKey);\n\t\tif (cached && cached.generation === state.dataGeneration) return cached.value;\n\t\tconst dataGroups = config.data_groups;\n\t\tconst ids = $$.mapToIds(targets);\n\t\tconst idsSet = toSet(ids);\n\t\tlet result;\n\t\tif (dataGroups.length > 0) {\n\t\t\tconst rawYs = $$.getValuesAsIdKeyed(targets);\n\t\t\tconst hasNegative = targets.some((t) => t.values.some((v) => v.value < 0));\n\t\t\tconst hasPositive = targets.some((t) => t.values.some((v) => v.value > 0));\n\t\t\tconst axisIdMap = new Map(ids.map((id) => [id, axis.getId(id)]));\n\t\t\tconst ysMin = {};\n\t\t\tconst ysMax = {};\n\t\t\tfor (const key in rawYs) {\n\t\t\t\tysMin[key] = rawYs[key].slice();\n\t\t\t\tysMax[key] = rawYs[key].slice();\n\t\t\t}\n\t\t\tdataGroups.forEach((groupIds) => {\n\t\t\t\tconst idsInGroup = groupIds.filter((v) => idsSet.has(v));\n\t\t\t\tif (idsInGroup.length) {\n\t\t\t\t\tconst baseId = idsInGroup[0];\n\t\t\t\t\tconst baseAxisId = axisIdMap.get(baseId);\n\t\t\t\t\tif (ysMin[baseId] && hasNegative) ysMin[baseId] = ysMin[baseId].map((v) => v < 0 ? v : 0);\n\t\t\t\t\tif (ysMax[baseId] && hasPositive) ysMax[baseId] = ysMax[baseId].map((v) => v > 0 ? v : 0);\n\t\t\t\t\tidsInGroup.filter((v, i) => i > 0).forEach((id) => {\n\t\t\t\t\t\tif (ysMin[id]) {\n\t\t\t\t\t\t\tconst axisId = axisIdMap.get(id);\n\t\t\t\t\t\t\tysMin[id].forEach((v, i) => {\n\t\t\t\t\t\t\t\tconst val = +v;\n\t\t\t\t\t\t\t\tif (axisId === baseAxisId && !(hasNegative && val > 0)) ysMin[baseId][i] += val;\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (ysMax[id]) {\n\t\t\t\t\t\t\tconst axisId = axisIdMap.get(id);\n\t\t\t\t\t\t\tysMax[id].forEach((v, i) => {\n\t\t\t\t\t\t\t\tconst val = +v;\n\t\t\t\t\t\t\t\tif (axisId === baseAxisId && !(hasPositive && val < 0)) ysMax[baseId][i] += val;\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t});\n\t\t\tconst minVals = [];\n\t\t\tconst maxVals = [];\n\t\t\tfor (const key in ysMin) {\n\t\t\t\tminVals.push(getMinMax(\"min\", ysMin[key]));\n\t\t\t\tmaxVals.push(getMinMax(\"max\", ysMax[key]));\n\t\t\t}\n\t\t\tresult = [getMinMax(\"min\", minVals), getMinMax(\"max\", maxVals)];\n\t\t} else result = getTargetValueMinMax($$, targets);\n\t\tif (cacheKey) cache.add(cacheKey, {\n\t\t\tgeneration: state.dataGeneration,\n\t\t\tvalue: result\n\t\t});\n\t\treturn result;\n\t},\n\t/**\n\t* Check if hidden targets bound to the given axis id\n\t* @param {string} id ID to be checked\n\t* @returns {boolean}\n\t* @private\n\t*/\n\tisHiddenTargetWithYDomain(id) {\n\t\tconst $$ = this;\n\t\tfor (const v of $$.state.hiddenTargetIds) if ($$.axis.getId(v) === id) return true;\n\t\treturn false;\n\t},\n\tgetYDomain(targets, axisId, xDomain) {\n\t\tconst $$ = this;\n\t\tconst { axis, config, scale } = $$;\n\t\tconst pfx = `axis_${axisId}`;\n\t\tif ($$.isStackNormalized()) {\n\t\t\tif (targets.filter((t) => axis.getId(t.id) === axisId).map((t) => t.id).some((id) => $$.isGrouped(id))) return [0, 100];\n\t\t}\n\t\tconst isLog = scale?.[axisId] && scale[axisId].type === \"log\";\n\t\tconst targetsByAxisId = targets.filter((t) => axis.getId(t.id) === axisId);\n\t\tconst yTargets = xDomain ? $$.filterByXDomain(targetsByAxisId, xDomain) : targetsByAxisId;\n\t\tif (yTargets.length === 0) {\n\t\t\tif ($$.isHiddenTargetWithYDomain(axisId)) return scale[axisId].domain();\n\t\t\telse return axisId === \"y2\" ? scale.y.domain() : $$.getYDomain(targets, \"y2\", xDomain);\n\t\t}\n\t\tconst yMin = config[`${pfx}_min`];\n\t\tconst yMax = config[`${pfx}_max`];\n\t\tconst center = config[`${pfx}_center`];\n\t\tconst isInverted = config[`${pfx}_inverted`];\n\t\tconst showHorizontalDataLabel = $$.hasDataLabel() && config.axis_rotated;\n\t\tconst showVerticalDataLabel = $$.hasDataLabel() && !config.axis_rotated;\n\t\tconst [yDomainMinVal, yDomainMaxVal] = $$.getYDomainMinMaxBoth(yTargets);\n\t\tlet yDomainMin = yDomainMinVal;\n\t\tlet yDomainMax = yDomainMaxVal;\n\t\tlet isZeroBased = [\n\t\t\tTYPE.BAR,\n\t\t\tTYPE.BUBBLE,\n\t\t\tTYPE.SCATTER,\n\t\t\t...TYPE_BY_CATEGORY.Line\n\t\t].some((v) => {\n\t\t\tconst type = v.indexOf(\"area\") > -1 ? \"area\" : v;\n\t\t\treturn $$.hasType(v, yTargets, true) && config[`${type}_zerobased`];\n\t\t});\n\t\tyDomainMin = isValue(yMin) ? yMin : isValue(yMax) ? yDomainMin <= yMax ? yDomainMin : yMax - 10 : yDomainMin;\n\t\tyDomainMax = isValue(yMax) ? yMax : isValue(yMin) ? yMin <= yDomainMax ? yDomainMax : yMin + 10 : yDomainMax;\n\t\tif (isNaN(yDomainMin)) yDomainMin = 0;\n\t\tif (isNaN(yDomainMax)) yDomainMax = yDomainMin;\n\t\tif (yDomainMin === yDomainMax) yDomainMin < 0 ? yDomainMax = 0 : yDomainMin = 0;\n\t\tconst isAllPositive = yDomainMin >= 0 && yDomainMax >= 0;\n\t\tconst isAllNegative = yDomainMin <= 0 && yDomainMax <= 0;\n\t\tif (isValue(yMin) && isAllPositive || isValue(yMax) && isAllNegative) isZeroBased = false;\n\t\tif (isZeroBased) {\n\t\t\tisAllPositive && (yDomainMin = 0);\n\t\t\tisAllNegative && (yDomainMax = 0);\n\t\t}\n\t\tconst domainLength = Math.abs(yDomainMax - yDomainMin);\n\t\tlet padding = {\n\t\t\ttop: domainLength * .1,\n\t\t\tbottom: domainLength * .1\n\t\t};\n\t\tif (isDefined(center)) {\n\t\t\tconst yDomainAbs = Math.max(Math.abs(yDomainMin), Math.abs(yDomainMax));\n\t\t\tyDomainMax = center + yDomainAbs;\n\t\t\tyDomainMin = center - yDomainAbs;\n\t\t}\n\t\tif (showHorizontalDataLabel) {\n\t\t\tconst diff = diffDomain(scale.y.range());\n\t\t\tconst ratio = $$.getDataLabelLength(yDomainMin, yDomainMax, \"width\").map((v) => {\n\t\t\t\tconst result = v / diff;\n\t\t\t\treturn isFinite(result) ? result : 0;\n\t\t\t});\n\t\t\t[\"bottom\", \"top\"].forEach((v, i) => {\n\t\t\t\tpadding[v] += domainLength * (ratio[i] / (1 - ratio[0] - ratio[1]));\n\t\t\t});\n\t\t} else if (showVerticalDataLabel) {\n\t\t\tconst lengths = $$.getDataLabelLength(yDomainMin, yDomainMax, \"height\");\n\t\t\t[\"bottom\", \"top\"].forEach((v, i) => {\n\t\t\t\tpadding[v] += $$.convertPixelToScale(\"y\", lengths[i], domainLength);\n\t\t\t});\n\t\t}\n\t\tpadding = $$.getResettedPadding(padding);\n\t\tconst p = config[`${pfx}_padding`];\n\t\tif (notEmpty(p)) [\"bottom\", \"top\"].forEach((v) => {\n\t\t\tpadding[v] = axis.getPadding(p, v, padding[v], domainLength);\n\t\t});\n\t\tif (isZeroBased) {\n\t\t\tisAllPositive && (padding.bottom = yDomainMin);\n\t\t\tisAllNegative && (padding.top = -yDomainMax);\n\t\t}\n\t\tconst domain = isLog ? [yDomainMin, yDomainMax].map((v) => v < 0 ? 0 : v) : [yDomainMin - padding.bottom, yDomainMax + padding.top];\n\t\treturn isInverted ? domain.reverse() : domain;\n\t},\n\tgetXDomainMinMax(targets, type) {\n\t\tconst $$ = this;\n\t\tconst { cache, state } = $$;\n\t\tconst configValue = $$.config[`axis_x_${type}`];\n\t\tconst cacheKey = canCacheTargetDomain($$, targets) ? `${KEY.domainMinMax}_x_${type}_${getTargetDomainCacheKey($$, targets)}` : null;\n\t\tconst cached = cacheKey && cache.get(cacheKey);\n\t\tlet dataValue = cached?.generation === state.dataGeneration ? cached.value : void 0;\n\t\tif (dataValue === void 0) {\n\t\t\tdataValue = getTargetXMinMax(targets, type);\n\t\t\tcacheKey && cache.add(cacheKey, {\n\t\t\t\tgeneration: state.dataGeneration,\n\t\t\t\tvalue: dataValue\n\t\t\t});\n\t\t}\n\t\tlet value = isObject(configValue) ? configValue.value : configValue;\n\t\tvalue = isDefined(value) && $$.axis?.isTimeSeries() ? parseDate.bind(this)(value) : value;\n\t\tif (isObject(configValue) && configValue.fit && (type === \"min\" && value < dataValue || type === \"max\" && value > dataValue)) value = void 0;\n\t\treturn isDefined(value) ? value : dataValue;\n\t},\n\t/**\n\t* Get x Axis padding\n\t* @param {Array} domain x Axis domain\n\t* @param {number} tickCount Tick count\n\t* @returns {object} Padding object values with 'left' & 'right' key\n\t* @private\n\t*/\n\tgetXDomainPadding(domain, tickCount) {\n\t\tconst $$ = this;\n\t\tconst { axis, config } = $$;\n\t\tconst padding = config.axis_x_padding;\n\t\tconst isTimeSeriesTickCount = axis.isTimeSeries() && tickCount;\n\t\tconst diff = diffDomain(domain);\n\t\tlet defaultValue;\n\t\tif (axis.isCategorized() || isTimeSeriesTickCount) defaultValue = 0;\n\t\telse if ($$.hasType(\"bar\")) {\n\t\t\tconst maxDataCount = $$.getMaxDataCount();\n\t\t\tdefaultValue = maxDataCount > 1 ? diff / (maxDataCount - 1) / 2 : .5;\n\t\t} else defaultValue = $$.getResettedPadding(diff * .01);\n\t\tlet { left = defaultValue, right = defaultValue } = isNumber(padding) ? {\n\t\t\tleft: padding,\n\t\t\tright: padding\n\t\t} : padding;\n\t\tif (padding.unit === \"px\") {\n\t\t\tconst domainLength = Math.abs(diff + diff * .2);\n\t\t\tleft = axis.getPadding(padding, \"left\", defaultValue, domainLength);\n\t\t\tright = axis.getPadding(padding, \"right\", defaultValue, domainLength);\n\t\t} else {\n\t\t\tconst range = diff + left + right;\n\t\t\tif (isTimeSeriesTickCount && range) {\n\t\t\t\tconst relativeTickWidth = diff / tickCount / range;\n\t\t\t\tleft = left / range / relativeTickWidth;\n\t\t\t\tright = right / range / relativeTickWidth;\n\t\t\t}\n\t\t}\n\t\treturn {\n\t\t\tleft,\n\t\t\tright\n\t\t};\n\t},\n\t/**\n\t* Get x Axis domain\n\t* @param {Array} targets targets\n\t* @returns {Array} x Axis domain\n\t* @private\n\t*/\n\tgetXDomain(targets) {\n\t\tconst $$ = this;\n\t\tconst { axis, config, scale: { x } } = $$;\n\t\tconst isInverted = config.axis_x_inverted;\n\t\tconst domain = [$$.getXDomainMinMax(targets, \"min\"), $$.getXDomainMinMax(targets, \"max\")];\n\t\tlet [min = 0, max = 0] = domain;\n\t\tif (x.type !== \"log\") {\n\t\t\tconst isCategorized = axis.isCategorized();\n\t\t\tconst isTimeSeries = axis.isTimeSeries();\n\t\t\tconst padding = $$.getXDomainPadding(domain);\n\t\t\tlet [firstX, lastX] = domain;\n\t\t\tif (firstX - lastX === 0 && !isCategorized) {\n\t\t\t\tif (isTimeSeries) {\n\t\t\t\t\tfirstX = /* @__PURE__ */ new Date(firstX.getTime() * .5);\n\t\t\t\t\tlastX = /* @__PURE__ */ new Date(lastX.getTime() * 1.5);\n\t\t\t\t} else {\n\t\t\t\t\tfirstX = firstX === 0 ? 1 : firstX * .5;\n\t\t\t\t\tlastX = lastX === 0 ? -1 : lastX * 1.5;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (firstX || firstX === 0) min = isTimeSeries ? new Date(firstX.getTime() - padding.left) : firstX - padding.left;\n\t\t\tif (lastX || lastX === 0) max = isTimeSeries ? new Date(lastX.getTime() + padding.right) : lastX + padding.right;\n\t\t}\n\t\treturn isInverted ? [max, min] : [min, max];\n\t},\n\tupdateXDomain(targets, withUpdateXDomain, withUpdateOrgXDomain, withTrim, domain) {\n\t\tconst $$ = this;\n\t\tconst { config, org, scale: { x, subX } } = $$;\n\t\tconst zoomEnabled = config.zoom_enabled;\n\t\tif (withUpdateOrgXDomain) {\n\t\t\tx.domain(domain || sortValue($$.getXDomain(targets), !config.axis_x_inverted));\n\t\t\torg.xDomain = x.domain();\n\t\t\tsubX.domain(x.domain());\n\t\t\t$$.brush?.scale(subX);\n\t\t}\n\t\tif (withUpdateXDomain) {\n\t\t\tconst domainValue = domain || !$$.brush || brushEmpty($$) ? org.xDomain : getBrushSelection($$).map(subX.invert);\n\t\t\tx.domain(domainValue);\n\t\t}\n\t\tif (withUpdateOrgXDomain || withUpdateXDomain) zoomEnabled && $$.zoom.updateScaleExtent();\n\t\twithTrim && x.domain($$.trimXDomain(x.orgDomain()));\n\t\treturn x.domain();\n\t},\n\t/**\n\t* Trim x domain when given domain surpasses the range\n\t* @param {Array} domain Domain value\n\t* @returns {Array} Trimed domain if given domain is out of range\n\t* @private\n\t*/\n\ttrimXDomain(domain) {\n\t\tconst $$ = this;\n\t\tconst isInverted = $$.config.axis_x_inverted;\n\t\tconst [min, max] = $$.getZoomDomain();\n\t\tif (isInverted ? domain[0] >= min : domain[0] <= min) {\n\t\t\tdomain[1] = +domain[1] + (min - domain[0]);\n\t\t\tdomain[0] = min;\n\t\t}\n\t\tif (isInverted ? domain[1] <= max : domain[1] >= max) {\n\t\t\tdomain[0] = +domain[0] - (domain[1] - max);\n\t\t\tdomain[1] = max;\n\t\t}\n\t\treturn domain;\n\t},\n\t/**\n\t* Get subchart/zoom domain\n\t* @param {string} type \"subX\" or \"zoom\"\n\t* @param {boolean} getCurrent Get current domain if true\n\t* @returns {Array} zoom domain\n\t* @private\n\t*/\n\tgetZoomDomain(type = \"zoom\", getCurrent = false) {\n\t\tconst { config, scale, org } = this;\n\t\tlet [min, max] = getCurrent && scale[type] ? scale[type].domain() : org.xDomain;\n\t\tif (type === \"zoom\") {\n\t\t\tif (isDefined(config.zoom_x_min)) min = getMinMax(\"min\", [min, config.zoom_x_min]);\n\t\t\tif (isDefined(config.zoom_x_max)) max = getMinMax(\"max\", [max, config.zoom_x_max]);\n\t\t}\n\t\treturn [min, max];\n\t},\n\t/**\n\t* Return zoom domain from given domain\n\t* - 'category' type need to add offset to original value\n\t* @param {Array} domainValue domain value\n\t* @returns {Array} Zoom domain\n\t* @private\n\t*/\n\tgetZoomDomainValue(domainValue) {\n\t\tconst { config, axis } = this;\n\t\tif (axis.isCategorized() && Array.isArray(domainValue)) {\n\t\t\tconst isInverted = config.axis_x_inverted;\n\t\t\treturn domainValue.map((v, i) => Number(v) + (i === 0 ? +isInverted : +!isInverted));\n\t\t}\n\t\treturn domainValue;\n\t},\n\t/**\n\t* Converts pixels to axis' scale values\n\t* @param {string} type Axis type\n\t* @param {number} pixels Pixels\n\t* @param {number} domainLength Domain length\n\t* @returns {number}\n\t* @private\n\t*/\n\tconvertPixelToScale(type, pixels, domainLength) {\n\t\tconst { config, state } = this;\n\t\tconst isRotated = config.axis_rotated;\n\t\tlet length;\n\t\tif (type === \"x\") length = isRotated ? \"height\" : \"width\";\n\t\telse length = isRotated ? \"width\" : \"height\";\n\t\treturn domainLength * (pixels / state[length]);\n\t},\n\t/**\n\t* Check if the given domain is within subchart/zoom range\n\t* @param {Array} domain Target domain value\n\t* @param {Array} current Current subchart/zoom domain value\n\t* @param {Array} range subchart/zoom range value\n\t* @returns {boolean}\n\t* @private\n\t*/\n\twithinRange(domain, current = [0, 0], range) {\n\t\tconst isInverted = this.config.axis_x_inverted;\n\t\tconst [min, max] = range;\n\t\tif (Array.isArray(domain)) {\n\t\t\tif ((isInverted ? domain[1] : domain[0]) < (isInverted ? domain[0] : domain[1])) return domain.every((v, i) => (i === 0 ? isInverted ? +v <= min : +v >= min : isInverted ? +v >= max : +v <= max) && !domain.every((v, i) => v === current[i]));\n\t\t}\n\t\treturn false;\n\t}\n};\n//#endregion\nexport { domain_default as default };\n","/*!\n* Copyright (c) 2017 ~ present NAVER Corp.\r\n * billboard.js project is licensed under the MIT license\r\n * \r\n * billboard.js, JavaScript chart library\r\n * https://naver.github.io/billboard.js/\r\n * \r\n * @version 4.1.0\n*/\nimport { isArray, isFunction, isObject, isObjectType, isValue } from \"../../module/util/type-checks.js\";\n//#region src/ChartInternal/internals/format.ts\n/**\n* Get formatted\n* @param {object} $$ Context\n* @param {string} typeValue Axis type\n* @param {number} v Value to be formatted\n* @returns {number | string}\n* @private\n*/\nfunction _getFormat($$, typeValue, v) {\n\tconst { config } = $$;\n\tconst type = `axis_${typeValue}_tick_format`;\n\treturn (config[type] ? config[type] : $$.defaultValueFormat).call($$.api, v);\n}\nvar format_default = {\n\tyFormat(v) {\n\t\treturn _getFormat(this, \"y\", v);\n\t},\n\ty2Format(v) {\n\t\treturn _getFormat(this, \"y2\", v);\n\t},\n\t/**\n\t* Get default value format function\n\t* @returns {function} formatter function\n\t* @private\n\t*/\n\tgetDefaultValueFormat() {\n\t\tconst $$ = this;\n\t\tconst { defaultArcValueFormat, yFormat, y2Format } = $$;\n\t\tconst hasArc = $$.hasArcType(null, [\n\t\t\t\"gauge\",\n\t\t\t\"polar\",\n\t\t\t\"radar\"\n\t\t]);\n\t\treturn function(v, ratio, id) {\n\t\t\treturn (hasArc ? defaultArcValueFormat : $$.axis && $$.axis.getId(id) === \"y2\" ? y2Format : yFormat).call($$, v, ratio);\n\t\t};\n\t},\n\tdefaultValueFormat(v) {\n\t\treturn isArray(v) ? v.join(\"~\") : isValue(v) ? +v : \"\";\n\t},\n\tdefaultArcValueFormat(v, ratio) {\n\t\treturn `${(ratio * 100).toFixed(1)}%`;\n\t},\n\tdefaultPolarValueFormat(v) {\n\t\treturn `${v}`;\n\t},\n\tdataLabelFormat(targetId) {\n\t\tconst $$ = this;\n\t\tconst dataLabels = $$.config.data_labels;\n\t\tconst defaultFormat = (v) => {\n\t\t\tconst delimiter = \"~\";\n\t\t\tlet res = v;\n\t\t\tif (isArray(v)) res = v.join(delimiter);\n\t\t\telse if (isObject(v)) res = Object.values(v).join(delimiter);\n\t\t\treturn res;\n\t\t};\n\t\tlet format = defaultFormat;\n\t\tif (isFunction(dataLabels.format)) format = dataLabels.format;\n\t\telse if (isObjectType(dataLabels.format)) {\n\t\t\tif (dataLabels.format[targetId]) format = dataLabels.format[targetId] === true ? defaultFormat : dataLabels.format[targetId];\n\t\t\telse format = () => \"\";\n\t\t}\n\t\treturn format.bind($$.api);\n\t}\n};\n//#endregion\nexport { format_default as default };\n","/*!\n* Copyright (c) 2017 ~ present NAVER Corp.\r\n * billboard.js project is licensed under the MIT license\r\n * \r\n * billboard.js, JavaScript chart library\r\n * https://naver.github.io/billboard.js/\r\n * \r\n * @version 4.1.0\n*/\nimport { document as doc } from \"../../module/browser.js\";\nimport { isBoolean, isDefined, isEmpty, isFunction } from \"../../module/util/type-checks.js\";\nimport { sanitize } from \"../../module/sanitize.js\";\nimport { callFn, getOption, toMap, tplProcess } from \"../../module/util/object.js\";\nimport { $FOCUS, $GAUGE, $LEGEND } from \"../../config/classes.js\";\nimport { KEY } from \"../../module/Cache.js\";\nimport { namespaces, select } from \"d3-selection\";\n//#region src/ChartInternal/internals/legend.ts\n/**\n* Copyright (c) 2017 ~ present NAVER Corp.\n* billboard.js project is licensed under the MIT license\n*/\nconst LEGEND_TOUCH_TAP_THRESHOLD = 10;\nconst LEGEND_TOUCH_CLICK_TIMEOUT = 750;\n/**\n* Get color string for given data id\n* Internal helper used only within this file\n* @param {string} id Data id\n* @returns {string} Color string\n* @private\n*/\nfunction _getLegendColor(id) {\n\tconst $$ = this;\n\tconst data = $$.getDataById(id);\n\treturn $$.levelColor ? $$.levelColor(data.values[0].value) : $$.color(data);\n}\n/**\n* Get formatted text value\n* Internal helper used only within this file\n* @param {string} id Legend text id\n* @param {boolean} formatted Whether or not to format the text\n* @returns {string} Formatted legend text\n* @private\n*/\nfunction _getFormattedText(id, formatted = true) {\n\tconst { config } = this;\n\tlet text = config.data_names[id] ?? id;\n\tif (formatted && isFunction(config.legend_format)) text = config.legend_format(text, id !== text ? id : void 0);\n\treturn text;\n}\n/**\n* Build a Map of legend items for fast O(1) lookup by ID\n* Internal helper used only within this file\n* @param {object} $$ ChartInternal context\n* @param {d3.selection} legendItems D3 selection of legend items\n* @private\n*/\nfunction _buildLegendItemMap($$, legendItems) {\n\tif (!legendItems || legendItems.empty()) return;\n\tconst allItems = $$.$el.legend?.selectAll(`.${$LEGEND.legendItem}`);\n\tif (allItems && !allItems.empty()) legendItems = allItems;\n\tconst items = [];\n\tlegendItems.each(function(id) {\n\t\titems.push({\n\t\t\tid,\n\t\t\tnode: this\n\t\t});\n\t});\n\tconst itemMap = toMap(items, (item) => item.id, (item) => item.node);\n\t$$.cache.add(KEY.legendItemMap, itemMap);\n}\n/**\n* Get touch point from a touch event.\n* @param {TouchEvent} event Touch event\n* @returns {Touch | undefined} Touch point\n* @private\n*/\nfunction _getLegendTouchPoint(event) {\n\treturn event.changedTouches?.[0] || event.touches?.[0];\n}\n/**\n* Store the touch start position for legend tap detection.\n* @param {object} $$ ChartInternal context\n* @param {string} id Legend data id\n* @param {TouchEvent} event Touch event\n* @private\n*/\nfunction _setLegendTouchStart($$, id, event) {\n\tconst touch = _getLegendTouchPoint(event);\n\t$$.state.legendTouch = touch ? {\n\t\tid,\n\t\tx: touch.clientX,\n\t\ty: touch.clientY,\n\t\tmoved: false\n\t} : null;\n}\n/**\n* Update whether the current legend touch moved beyond tap tolerance.\n* @param {object} $$ ChartInternal context\n* @param {TouchEvent} event Touch event\n* @private\n*/\nfunction _updateLegendTouchMove($$, event) {\n\tconst start = $$.state.legendTouch;\n\tconst touch = start && _getLegendTouchPoint(event);\n\tif (touch) start.moved = start.moved || Math.abs(touch.clientX - start.x) > LEGEND_TOUCH_TAP_THRESHOLD || Math.abs(touch.clientY - start.y) > LEGEND_TOUCH_TAP_THRESHOLD;\n}\n/**\n* Determine whether a touch sequence is a legend tap.\n* @param {object} $$ ChartInternal context\n* @param {string} id Legend data id\n* @param {TouchEvent} event Touch event\n* @returns {boolean} Whether the touch sequence is a tap\n* @private\n*/\nfunction _isLegendTouchTap($$, id, event) {\n\t_updateLegendTouchMove($$, event);\n\tconst start = $$.state.legendTouch;\n\t$$.state.legendTouch = null;\n\treturn !!start && start.id === id && !start.moved;\n}\n/**\n* Mark a touch legend tap so the following compatibility click can be skipped.\n* @param {object} $$ ChartInternal context\n* @param {string} id Legend data id\n* @private\n*/\nfunction _markLegendTouchClick($$, id) {\n\t$$.state.legendLastTouchClickId = id;\n\t$$.state.legendLastTouchClickTime = Date.now();\n}\n/**\n* Check if a click duplicates a recent touch legend tap.\n* @param {object} $$ ChartInternal context\n* @param {string} id Legend data id\n* @returns {boolean} Whether the click is duplicate\n* @private\n*/\nfunction _isDuplicateLegendTouchClick($$, id) {\n\tconst { state } = $$;\n\tconst duplicate = state.legendLastTouchClickId === id && Date.now() - (state.legendLastTouchClickTime || 0) < LEGEND_TOUCH_CLICK_TIMEOUT;\n\tif (duplicate) {\n\t\tstate.legendLastTouchClickId = null;\n\t\tstate.legendLastTouchClickTime = 0;\n\t}\n\treturn duplicate;\n}\n/**\n* Get touch listener passive option following interaction.inputType.touch.preventDefault.\n* @param {object} $$ ChartInternal context\n* @returns {object} Touch listener option\n* @private\n*/\nfunction _getLegendTouchOption($$) {\n\tconst preventDefault = $$.config.interaction_inputType_touch?.preventDefault;\n\treturn { passive: !(isBoolean(preventDefault) && preventDefault || false) && (!isNaN(preventDefault) && preventDefault || null) === null };\n}\nvar legend_default = {\n\t/**\n\t* Initialize the legend.\n\t* @private\n\t*/\n\tinitLegend() {\n\t\tconst $$ = this;\n\t\tconst { config, $el } = $$;\n\t\t$$.legendItemTextBox = {};\n\t\t$$.state.legendHasRendered = false;\n\t\tif ($$.state.isCanvasMode) {\n\t\t\tif (config.legend_show) $$.updateHtmlLegend?.();\n\t\t\telse $$.state.hiddenLegendIds = new Set($$.mapToIds($$.data.targets));\n\t\t\treturn;\n\t\t}\n\t\tif (config.legend_show) {\n\t\t\tif (!config.legend_contents_bindto) $el.legend = $$.$el.svg.append(\"g\").classed($LEGEND.legend, true).attr(\"transform\", $$.getTranslate(\"legend\"));\n\t\t\t$$.updateLegend();\n\t\t} else $$.state.hiddenLegendIds = new Set($$.mapToIds($$.data.targets));\n\t},\n\t/**\n\t* Update legend element\n\t* @param {Array} targetIds ID's of target\n\t* @param {object} options withTransform : Whether to use the transform property / withTransitionForTransform: Whether transition is used when using the transform property / withTransition : whether or not to transition.\n\t* @param {object} transitions Return value of the generateTransitions\n\t* @private\n\t*/\n\tupdateLegend(targetIds, options, transitions) {\n\t\tconst $$ = this;\n\t\tconst { config, state, scale, $el } = $$;\n\t\tconst optionz = options || {\n\t\t\twithTransform: false,\n\t\t\twithTransitionForTransform: false,\n\t\t\twithTransition: false\n\t\t};\n\t\toptionz.withTransition = getOption(optionz, \"withTransition\", true);\n\t\toptionz.withTransitionForTransform = getOption(optionz, \"withTransitionForTransform\", true);\n\t\tif (config.legend_contents_bindto && config.legend_contents_template) $$.updateLegendTemplate();\n\t\telse if (!state.hasTreemap) $$.updateLegendElement(targetIds || $$.mapToIds($$.data.targets), optionz);\n\t\t$el.legend?.selectAll(`.${$LEGEND.legendItem}`).classed($LEGEND.legendItemHidden, function(id) {\n\t\t\tconst hide = !$$.isTargetToShow(id);\n\t\t\tif (hide) this.style.opacity = null;\n\t\t\treturn hide;\n\t\t});\n\t\t$$.updateScales(false, !scale.zoom);\n\t\t$$.updateSvgSize();\n\t\t$$.transformAll(optionz.withTransitionForTransform, transitions);\n\t\tstate.legendHasRendered = true;\n\t},\n\t/**\n\t* Update legend using template option\n\t* @private\n\t*/\n\tupdateLegendTemplate() {\n\t\tconst $$ = this;\n\t\tconst { config, $el } = $$;\n\t\tconst wrapper = select(config.legend_contents_bindto);\n\t\tconst template = config.legend_contents_template;\n\t\tif (!wrapper.empty()) {\n\t\t\tconst targets = $$.mapToIds($$.data.targets);\n\t\t\tconst ids = [];\n\t\t\tlet html = \"\";\n\t\t\ttargets.forEach((v) => {\n\t\t\t\tconst content = isFunction(template) ? sanitize(template.call($$.api, v, $$.color(v), $$.api.data(v)[0].values)) : tplProcess(template, {\n\t\t\t\t\tCOLOR: $$.color(v),\n\t\t\t\t\tTITLE: v\n\t\t\t\t});\n\t\t\t\tif (content) {\n\t\t\t\t\tids.push(v);\n\t\t\t\t\thtml += content;\n\t\t\t\t}\n\t\t\t});\n\t\t\tconst legendItem = wrapper.html(html).selectAll(function() {\n\t\t\t\treturn this.childNodes;\n\t\t\t}).data(ids);\n\t\t\t$$.setLegendItem(legendItem);\n\t\t\t$el.legend = wrapper;\n\t\t}\n\t},\n\t/**\n\t* Update the size of the legend.\n\t* @param {Obejct} size Size object\n\t* @private\n\t*/\n\tupdateSizeForLegend(size) {\n\t\tconst $$ = this;\n\t\tconst { config, state: { isLegendTop, isLegendLeft, isLegendRight, isLegendInset, current } } = $$;\n\t\tconst { width, height } = size;\n\t\tconst insetLegendPosition = {\n\t\t\ttop: isLegendTop ? $$.getCurrentPaddingByDirection(\"top\") + config.legend_inset_y + 5.5 : current.height - height - $$.getCurrentPaddingByDirection(\"bottom\") - config.legend_inset_y,\n\t\t\tleft: isLegendLeft ? $$.getCurrentPaddingByDirection(\"left\") + config.legend_inset_x + .5 : current.width - width - $$.getCurrentPaddingByDirection(\"right\") - config.legend_inset_x + .5\n\t\t};\n\t\t$$.state.margin3 = {\n\t\t\ttop: isLegendRight ? 0 : isLegendInset ? insetLegendPosition.top : current.height - height,\n\t\t\tright: NaN,\n\t\t\tbottom: 0,\n\t\t\tleft: isLegendRight ? current.width - width : isLegendInset ? insetLegendPosition.left : 0\n\t\t};\n\t},\n\t/**\n\t* Transform Legend\n\t* @param {boolean} withTransition whether or not to transition.\n\t* @private\n\t*/\n\ttransformLegend(withTransition) {\n\t\tconst $$ = this;\n\t\tconst { $el: { legend }, $T } = $$;\n\t\t$T(legend, withTransition).attr(\"transform\", $$.getTranslate(\"legend\"));\n\t},\n\t/**\n\t* Update legend item color\n\t* @param {string} id Corresponding data ID value\n\t* @param {string} color Color value\n\t* @private\n\t*/\n\tupdateLegendItemColor(id, color) {\n\t\tconst $$ = this;\n\t\tconst { legend } = $$.$el;\n\t\tif (legend) {\n\t\t\tconst legendItem = $$.getLegendItemById(id);\n\t\t\tif (legendItem) select(legendItem).select(\"line\").style(\"stroke\", color);\n\t\t}\n\t},\n\t/**\n\t* Get the width of the legend\n\t* @returns {number} width\n\t* @private\n\t*/\n\tgetLegendWidth() {\n\t\tconst $$ = this;\n\t\tconst { current: { width }, isLegendRight, isLegendInset, legendItemWidth, legendStep } = $$.state;\n\t\treturn $$.config.legend_show ? isLegendRight || isLegendInset ? legendItemWidth * (legendStep + 1) : width : 0;\n\t},\n\t/**\n\t* Get the height of the legend\n\t* @returns {number} height\n\t* @private\n\t*/\n\tgetLegendHeight() {\n\t\tconst $$ = this;\n\t\tconst { current, isLegendRight, legendItemHeight, legendStep } = $$.state;\n\t\treturn $$.config.legend_show ? isLegendRight ? current.height : Math.max($$.config.padding?.mode === \"fit\" ? 10 : 20, legendItemHeight) * (legendStep + 1) : 0;\n\t},\n\t/**\n\t* Get the opacity of the legend that is unfocused\n\t* @param {d3.selection} legendItem Legend item node\n\t* @returns {string|null} opacity\n\t* @private\n\t*/\n\topacityForUnfocusedLegend(legendItem) {\n\t\treturn legendItem.classed($LEGEND.legendItemHidden) ? null : \"0.3\";\n\t},\n\t/**\n\t* Toggles the focus of the legend\n\t* @param {Array} targetIds ID's of target\n\t* @param {boolean} focus whether or not to focus.\n\t* @private\n\t*/\n\ttoggleFocusLegend(targetIds, focus) {\n\t\tconst $$ = this;\n\t\tconst { $el: { legend }, $T } = $$;\n\t\tconst targetIdz = $$.mapToTargetIds(targetIds);\n\t\tlegend && $T(legend.selectAll(`.${$LEGEND.legendItem}`).filter((id) => targetIdz.indexOf(id) >= 0).classed($FOCUS.legendItemFocused, focus)).style(\"opacity\", function() {\n\t\t\treturn focus ? null : $$.opacityForUnfocusedLegend.call($$, select(this));\n\t\t});\n\t},\n\t/**\n\t* Revert the legend to its default state\n\t* @private\n\t*/\n\trevertLegend() {\n\t\tconst { $el: { legend }, $T } = this;\n\t\tlegend && $T(legend.selectAll(`.${$LEGEND.legendItem}`).classed($FOCUS.legendItemFocused, false)).style(\"opacity\", null);\n\t},\n\t/**\n\t* Shows the legend\n\t* @param {Array} targetIds ID's of target\n\t* @private\n\t*/\n\tshowLegend(targetIds) {\n\t\tconst $$ = this;\n\t\tconst { config, $el, $T } = $$;\n\t\tif (!config.legend_show) {\n\t\t\tconfig.legend_show = true;\n\t\t\t$el.legend ? $el.legend.style(\"visibility\", null) : $$.initLegend();\n\t\t\t!$$.state.legendHasRendered && $$.updateLegend();\n\t\t}\n\t\t$$.removeHiddenLegendIds(targetIds);\n\t\t$T($el.legend.selectAll($$.selectorLegends(targetIds)).style(\"visibility\", null)).style(\"opacity\", null);\n\t},\n\t/**\n\t* Hide the legend\n\t* @param {Array} targetIds ID's of target\n\t* @private\n\t*/\n\thideLegend(targetIds) {\n\t\tconst $$ = this;\n\t\tconst { config, $el: { legend } } = $$;\n\t\tif (config.legend_show && isEmpty(targetIds)) {\n\t\t\tconfig.legend_show = false;\n\t\t\tlegend?.style(\"visibility\", \"hidden\");\n\t\t}\n\t\t$$.addHiddenLegendIds(targetIds);\n\t\tlegend?.selectAll($$.selectorLegends(targetIds)).style(\"opacity\", \"0\").style(\"visibility\", \"hidden\");\n\t},\n\t/**\n\t* Get legend item textbox dimension\n\t* @param {string} id Data ID\n\t* @param {HTMLElement|d3.selection} textElement Text node element\n\t* @returns {object} Bounding rect\n\t* @private\n\t*/\n\tgetLegendItemTextBox(id, textElement) {\n\t\tconst $$ = this;\n\t\tconst { cache, state } = $$;\n\t\tlet data;\n\t\tconst cacheKey = KEY.legendItemTextBox;\n\t\tif (id) {\n\t\t\tdata = !state.redrawing && cache.get(cacheKey) || {};\n\t\t\tif (!data[id]) {\n\t\t\t\tdata[id] = $$.getTextRect(textElement, $LEGEND.legendItem);\n\t\t\t\tcache.add(cacheKey, data);\n\t\t\t}\n\t\t\tdata = data[id];\n\t\t}\n\t\treturn data;\n\t},\n\t/**\n\t* Set legend item style & bind events\n\t* @param {d3.selection} item Item node\n\t* @private\n\t*/\n\tsetLegendItem(item) {\n\t\tconst $$ = this;\n\t\tconst { $el, api, config, state } = $$;\n\t\tconst isTouch = state.inputType === \"touch\";\n\t\tconst hasGauge = $$.hasType(\"gauge\");\n\t\tconst useCssRule = config.boost_useCssRule;\n\t\tconst interaction = config.legend_item_interaction;\n\t\tconst eventType = interaction.dblclick ? \"dblclick\" : \"click\";\n\t\tconst hasClickInteraction = interaction || isFunction(config.legend_item_onclick);\n\t\tconst touchOption = isTouch ? _getLegendTouchOption($$) : void 0;\n\t\tconst handleLegendToggle = function(event, id) {\n\t\t\tif (!callFn(config.legend_item_onclick, api, id, !state.hiddenTargetIds.has(id))) {\n\t\t\t\tconst { altKey, type } = event;\n\t\t\t\tconst selected = select(this);\n\t\t\t\tif (type === \"dblclick\" || altKey) {\n\t\t\t\t\tif (state.hiddenTargetIds.size && !selected.classed($LEGEND.legendItemHidden)) api.show();\n\t\t\t\t\telse {\n\t\t\t\t\t\tapi.hide();\n\t\t\t\t\t\tapi.show(id);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tapi.toggle(id);\n\t\t\t\t\tselected.classed($FOCUS.legendItemFocused, false);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (isTouch) {\n\t\t\t\t$$.hideTooltip();\n\t\t\t\t$$.hideGridFocus?.(true);\n\t\t\t}\n\t\t};\n\t\titem.attr(\"class\", function(id) {\n\t\t\tconst node = select(this);\n\t\t\treturn (!node.empty() && node.attr(\"class\") || \"\") + $$.generateClass($LEGEND.legendItem, id);\n\t\t}).style(\"visibility\", (id) => $$.isLegendToShow(id) ? null : \"hidden\");\n\t\tif (config.interaction_enabled) {\n\t\t\tif (useCssRule) [\n\t\t\t\t[`.${$LEGEND.legendItem}`, \"cursor:pointer\"],\n\t\t\t\t[`.${$LEGEND.legendItem} text`, \"pointer-events:none\"],\n\t\t\t\t[`.${$LEGEND.legendItemPoint} text`, \"pointer-events:none\"],\n\t\t\t\t[`.${$LEGEND.legendItemTile}`, \"pointer-events:none\"],\n\t\t\t\t[`.${$LEGEND.legendItemEvent}`, \"fill-opacity:0\"]\n\t\t\t].forEach((v) => {\n\t\t\t\tconst [selector, props] = v;\n\t\t\t\t$$.setCssRule(false, selector, [props])($el.legend);\n\t\t\t});\n\t\t\titem.on(eventType, hasClickInteraction ? function(event, id) {\n\t\t\t\tif (isTouch && event.type === \"click\" && _isDuplicateLegendTouchClick($$, id)) return;\n\t\t\t\thandleLegendToggle.call(this, event, id);\n\t\t\t} : null);\n\t\t\tisTouch && eventType === \"click\" && hasClickInteraction && item.on(\"touchstart\", function(event, id) {\n\t\t\t\t_setLegendTouchStart($$, id, event);\n\t\t\t}, touchOption).on(\"touchmove\", (event) => {\n\t\t\t\t_updateLegendTouchMove($$, event);\n\t\t\t}, touchOption).on(\"touchend\", function(event, id) {\n\t\t\t\tif (_isLegendTouchTap($$, id, event)) {\n\t\t\t\t\t_markLegendTouchClick($$, id);\n\t\t\t\t\thandleLegendToggle.call(this, event, id);\n\t\t\t\t}\n\t\t\t}, touchOption);\n\t\t\t!isTouch && item.on(\"mouseout\", interaction || isFunction(config.legend_item_onout) ? function(event, id) {\n\t\t\t\tif (!callFn(config.legend_item_onout, api, id, !state.hiddenTargetIds.has(id))) {\n\t\t\t\t\tselect(this).classed($FOCUS.legendItemFocused, false);\n\t\t\t\t\tif (hasGauge) $$.undoMarkOverlapped($$, `.${$GAUGE.gaugeValue}`);\n\t\t\t\t\t$$.api.revert();\n\t\t\t\t}\n\t\t\t} : null).on(\"mouseover\", interaction || isFunction(config.legend_item_onover) ? function(event, id) {\n\t\t\t\tif (!callFn(config.legend_item_onover, api, id, !state.hiddenTargetIds.has(id))) {\n\t\t\t\t\tselect(this).classed($FOCUS.legendItemFocused, true);\n\t\t\t\t\tif (hasGauge) $$.markOverlapped(id, $$, `.${$GAUGE.gaugeValue}`);\n\t\t\t\t\tif (!state.transiting && $$.isTargetToShow(id)) api.focus(id);\n\t\t\t\t}\n\t\t\t} : null);\n\t\t\t!item.empty() && item.on(\"click mouseout mouseover\") && item.style(\"cursor\", $$.getStylePropValue(\"pointer\"));\n\t\t}\n\t\t_buildLegendItemMap($$, item);\n\t},\n\t/**\n\t* Get legend item node by ID using cached Map for O(1) lookup\n\t* Falls back to D3 selection if map is not available\n\t* @param {string} id Data ID\n\t* @returns {HTMLElement | null} Legend item node\n\t* @private\n\t*/\n\tgetLegendItemById(id) {\n\t\tconst $$ = this;\n\t\tconst itemMap = $$.cache.get(KEY.legendItemMap);\n\t\tif (itemMap && itemMap instanceof Map) return itemMap.get(id) || null;\n\t\treturn ($$.$el.legend?.selectAll(`.${$LEGEND.legendItem}`).filter((d) => d === id))?.node() || null;\n\t},\n\t/**\n\t* Update the legend\n\t* @param {Array} targetIds ID's of target\n\t* @param {object} options withTransform : Whether to use the transform property / withTransitionForTransform: Whether transition is used when using the transform property / withTransition : whether or not to transition.\n\t* @private\n\t*/\n\tupdateLegendElement(targetIds, options) {\n\t\tconst $$ = this;\n\t\tconst { config, state, $el: { legend }, $T } = $$;\n\t\tconst isRectangle = config.legend_item_tile_type !== \"circle\";\n\t\tconst legendItemR = config.legend_item_tile_r;\n\t\tconst itemTileSize = {\n\t\t\twidth: isRectangle ? config.legend_item_tile_width : legendItemR * 2,\n\t\t\theight: isRectangle ? config.legend_item_tile_height : legendItemR * 2\n\t\t};\n\t\tconst dimension = {\n\t\t\tpadding: {\n\t\t\t\ttop: 4,\n\t\t\t\tright: 10\n\t\t\t},\n\t\t\tmax: {\n\t\t\t\twidth: 0,\n\t\t\t\theight: 0\n\t\t\t},\n\t\t\tposMin: 10,\n\t\t\tstep: 0,\n\t\t\ttileWidth: itemTileSize.width + 5,\n\t\t\ttotalLength: 0\n\t\t};\n\t\tconst sizes = {\n\t\t\toffsets: {},\n\t\t\twidths: {},\n\t\t\theights: {},\n\t\t\tmargins: [0],\n\t\t\tsteps: {}\n\t\t};\n\t\tlet xForLegend;\n\t\tlet yForLegend;\n\t\tlet background;\n\t\tconst targetIdz = targetIds.filter((id) => !isDefined(config.data_names[id]) || config.data_names[id] !== null);\n\t\tconst withTransition = options.withTransition;\n\t\tconst isLegendRightOrInset = state.isLegendRight || state.isLegendInset;\n\t\tconst getFormattedText = _getFormattedText.bind($$);\n\t\tconst updatePositions = $$.getUpdateLegendPositions(targetIdz, dimension, sizes, isLegendRightOrInset);\n\t\tif (state.isLegendInset) {\n\t\t\tdimension.step = config.legend_inset_step ? config.legend_inset_step : targetIdz.length;\n\t\t\tstate.legendStep = dimension.step;\n\t\t}\n\t\tif (state.isLegendRight) {\n\t\t\txForLegend = (id) => dimension.max.width * sizes.steps[id];\n\t\t\tyForLegend = (id) => sizes.margins[sizes.steps[id]] + sizes.offsets[id];\n\t\t} else if (state.isLegendInset) {\n\t\t\txForLegend = (id) => dimension.max.width * sizes.steps[id] + 10;\n\t\t\tyForLegend = (id) => sizes.margins[sizes.steps[id]] + sizes.offsets[id];\n\t\t} else {\n\t\t\txForLegend = (id) => sizes.margins[sizes.steps[id]] + sizes.offsets[id];\n\t\t\tyForLegend = (id) => dimension.max.height * sizes.steps[id];\n\t\t}\n\t\tconst posFn = {\n\t\t\txText: (id, i) => xForLegend(id, i) + 4 + itemTileSize.width,\n\t\t\txRect: (id, i) => xForLegend(id, i),\n\t\t\tx1Tile: (id, i) => xForLegend(id, i) - 2,\n\t\t\tx2Tile: (id, i) => xForLegend(id, i) - 2 + itemTileSize.width,\n\t\t\tyText: (id, i) => yForLegend(id, i) + 9,\n\t\t\tyRect: (id, i) => yForLegend(id, i) - 5,\n\t\t\tyTile: (id, i) => yForLegend(id, i) + 4\n\t\t};\n\t\t$$.generateLegendItem(targetIdz, itemTileSize, updatePositions, posFn, isLegendRightOrInset, getFormattedText);\n\t\tbackground = legend.select(`.${$LEGEND.legendBackground} rect`);\n\t\tif (state.isLegendInset && dimension.max.width > 0 && background.size() === 0) background = legend.insert(\"g\", `.${$LEGEND.legendItem}`).attr(\"class\", $LEGEND.legendBackground).append(\"rect\");\n\t\tif (config.legend_tooltip) legend.selectAll(\"title\").data(targetIdz).text((id) => getFormattedText(id, false));\n\t\t$T(legend.selectAll(\"text\").data(targetIdz).text((id) => getFormattedText(id)).each(function(id, i) {\n\t\t\tupdatePositions(this, id, i);\n\t\t}), withTransition).attr(\"x\", posFn.xText).attr(\"y\", posFn.yText);\n\t\t$T(legend.selectAll(`rect.${$LEGEND.legendItemEvent}`).data(targetIdz), withTransition).attr(\"width\", (id) => sizes.widths[id]).attr(\"height\", (id) => sizes.heights[id]).attr(\"x\", posFn.xRect).attr(\"y\", posFn.yRect);\n\t\t$$.updateLegendItemPos(targetIdz, withTransition, posFn);\n\t\tif (background) $T(background, withTransition).attr(\"height\", $$.getLegendHeight() - 12).attr(\"width\", dimension.max.width * (dimension.step + 1) + 10);\n\t\tstate.legendItemWidth = dimension.max.width;\n\t\tstate.legendItemHeight = dimension.max.height;\n\t\tstate.legendStep = dimension.step;\n\t},\n\t/**\n\t* Get position update function\n\t* @param {Array} targetIdz Data ids\n\t* @param {object} dimension Dimension object\n\t* @param {object} sizes Size object\n\t* @param {boolean} isLegendRightOrInset Whether legend is right or inset\n\t* @returns {function} Update position function\n\t* @private\n\t*/\n\tgetUpdateLegendPositions(targetIdz, dimension, sizes, isLegendRightOrInset) {\n\t\tconst $$ = this;\n\t\tconst { config, state } = $$;\n\t\treturn function(textElement, id, index) {\n\t\t\tconst reset = index === 0;\n\t\t\tconst isLast = index === targetIdz.length - 1;\n\t\t\tconst box = $$.getLegendItemTextBox(id, textElement);\n\t\t\tconst itemWidth = box.width + dimension.tileWidth + (isLast && !isLegendRightOrInset ? 0 : dimension.padding.right) + config.legend_padding;\n\t\t\tconst itemHeight = box.height + dimension.padding.top;\n\t\t\tconst itemLength = isLegendRightOrInset ? itemHeight : itemWidth;\n\t\t\tconst areaLength = isLegendRightOrInset ? $$.getLegendHeight() : $$.getLegendWidth();\n\t\t\tlet margin;\n\t\t\tconst updateValues = function(id2, withoutStep) {\n\t\t\t\tif (!withoutStep) {\n\t\t\t\t\tmargin = (areaLength - dimension.totalLength - itemLength) / 2;\n\t\t\t\t\tif (margin < dimension.posMin) {\n\t\t\t\t\t\tmargin = (areaLength - itemLength) / 2;\n\t\t\t\t\t\tdimension.totalLength = 0;\n\t\t\t\t\t\tdimension.step++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tsizes.steps[id2] = dimension.step;\n\t\t\t\tsizes.margins[dimension.step] = state.isLegendInset ? 10 : margin;\n\t\t\t\tsizes.offsets[id2] = dimension.totalLength;\n\t\t\t\tdimension.totalLength += itemLength;\n\t\t\t};\n\t\t\tif (reset) {\n\t\t\t\tdimension.totalLength = 0;\n\t\t\t\tdimension.step = 0;\n\t\t\t\tdimension.max.width = 0;\n\t\t\t\tdimension.max.height = 0;\n\t\t\t}\n\t\t\tif (config.legend_show && !$$.isLegendToShow(id)) {\n\t\t\t\tsizes.widths[id] = 0;\n\t\t\t\tsizes.heights[id] = 0;\n\t\t\t\tsizes.steps[id] = 0;\n\t\t\t\tsizes.offsets[id] = 0;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tsizes.widths[id] = itemWidth;\n\t\t\tsizes.heights[id] = itemHeight;\n\t\t\tif (!dimension.max.width || itemWidth >= dimension.max.width) dimension.max.width = itemWidth;\n\t\t\tif (!dimension.max.height || itemHeight >= dimension.max.height) dimension.max.height = itemHeight;\n\t\t\tconst maxLength = isLegendRightOrInset ? dimension.max.height : dimension.max.width;\n\t\t\tif (config.legend_equally) {\n\t\t\t\tfor (const id2 in sizes.widths) sizes.widths[id2] = dimension.max.width;\n\t\t\t\tfor (const id2 in sizes.heights) sizes.heights[id2] = dimension.max.height;\n\t\t\t\tmargin = (areaLength - maxLength * targetIdz.length) / 2;\n\t\t\t\tif (margin < dimension.posMin) {\n\t\t\t\t\tdimension.totalLength = 0;\n\t\t\t\t\tdimension.step = 0;\n\t\t\t\t\ttargetIdz.forEach((id2) => updateValues(id2));\n\t\t\t\t} else updateValues(id, true);\n\t\t\t} else updateValues(id);\n\t\t};\n\t},\n\t/**\n\t* Generate legend item elements\n\t* @param {Array} targetIdz Data ids\n\t* @param {object} itemTileSize Item tile size {width, height}\n\t* @param {function} updatePositions Update position function\n\t* @param {object} posFn Position functions\n\t* @param {boolean} isLegendRightOrInset Whether legend is right or inset\n\t* @param {function} getFormattedText Bound text formatter function\n\t* @private\n\t*/\n\tgenerateLegendItem(targetIdz, itemTileSize, updatePositions, posFn, isLegendRightOrInset, getFormattedText) {\n\t\tconst $$ = this;\n\t\tconst { config, state, $el: { legend } } = $$;\n\t\tconst usePoint = config.legend_usePoint;\n\t\tconst legendItemR = config.legend_item_tile_r;\n\t\tconst legendType = config.legend_item_tile_type;\n\t\tconst isRectangle = legendType !== \"circle\";\n\t\tconst pos = -200;\n\t\tconst l = legend.selectAll(`.${$LEGEND.legendItem}`).data(targetIdz).enter().append(\"g\");\n\t\t$$.setLegendItem(l);\n\t\tif (config.legend_tooltip) l.append(\"title\").text((id) => id);\n\t\tl.append(\"text\").text((id) => getFormattedText(id)).each(function(id, i) {\n\t\t\tupdatePositions(this, id, i);\n\t\t}).style(\"pointer-events\", $$.getStylePropValue(\"none\")).attr(\"x\", isLegendRightOrInset ? posFn.xText : pos).attr(\"y\", isLegendRightOrInset ? pos : posFn.yText);\n\t\tl.append(\"rect\").attr(\"class\", $LEGEND.legendItemEvent).style(\"fill-opacity\", $$.getStylePropValue(\"0\")).attr(\"x\", isLegendRightOrInset ? posFn.xRect : pos).attr(\"y\", isLegendRightOrInset ? pos : posFn.yRect);\n\t\tif (usePoint) {\n\t\t\tconst ids = [];\n\t\t\tconst pattern = $$.getValidPointPattern();\n\t\t\tl.append((d) => {\n\t\t\t\tids.indexOf(d) === -1 && ids.push(d);\n\t\t\t\tlet point = pattern[ids.indexOf(d) % pattern.length];\n\t\t\t\tif (point === \"rectangle\") point = \"rect\";\n\t\t\t\treturn doc.createElementNS(namespaces.svg, \"hasValidPointType\" in $$ && $$.hasValidPointType(point) ? point : \"use\");\n\t\t\t}).attr(\"class\", $LEGEND.legendItemPoint).style(\"fill\", _getLegendColor.bind($$)).style(\"pointer-events\", $$.getStylePropValue(\"none\")).attr(\"href\", (data, idx, selection) => {\n\t\t\t\tconst nodeName = selection[idx].nodeName.toLowerCase();\n\t\t\t\tconst id = $$.getTargetSelectorSuffix(data);\n\t\t\t\treturn nodeName === \"use\" ? `#${state.datetimeId}-point${id}` : void 0;\n\t\t\t});\n\t\t} else l.append(isRectangle ? \"line\" : legendType).attr(\"class\", $LEGEND.legendItemTile).style(\"stroke\", _getLegendColor.bind($$)).style(\"pointer-events\", $$.getStylePropValue(\"none\")).call((selection) => {\n\t\t\tif (legendType === \"circle\") selection.attr(\"r\", legendItemR).style(\"fill\", _getLegendColor.bind($$)).attr(\"cx\", isLegendRightOrInset ? posFn.x2Tile : pos).attr(\"cy\", isLegendRightOrInset ? pos : posFn.yTile);\n\t\t\telse if (isRectangle) selection.attr(\"stroke-width\", itemTileSize.height).attr(\"x1\", isLegendRightOrInset ? posFn.x1Tile : pos).attr(\"y1\", isLegendRightOrInset ? pos : posFn.yTile).attr(\"x2\", isLegendRightOrInset ? posFn.x2Tile : pos).attr(\"y2\", isLegendRightOrInset ? pos : posFn.yTile);\n\t\t});\n\t},\n\t/**\n\t* Update legend item position\n\t* @param {Array} targetIdz Data ids\n\t* @param {boolean} withTransition Whether or not to apply transition\n\t* @param {object} posFn Position functions\n\t* @private\n\t*/\n\tupdateLegendItemPos(targetIdz, withTransition, posFn) {\n\t\tconst $$ = this;\n\t\tconst { config, $el: { legend }, $T } = $$;\n\t\tconst usePoint = config.legend_usePoint;\n\t\tconst legendType = config.legend_item_tile_type;\n\t\tconst isRectangle = legendType !== \"circle\";\n\t\tif (usePoint) {\n\t\t\tconst tiles = legend.selectAll(`.${$LEGEND.legendItemPoint}`).data(targetIdz);\n\t\t\tconst isRectangleTile = config.legend_item_tile_type !== \"circle\";\n\t\t\tconst tileWidth = isRectangleTile ? config.legend_item_tile_width : config.legend_item_tile_r * 2;\n\t\t\tconst tileHeight = isRectangleTile ? config.legend_item_tile_height : config.legend_item_tile_r * 2;\n\t\t\tconst iconWidth = tileWidth * .75;\n\t\t\tconst iconHeight = tileHeight * .75;\n\t\t\tconst customScaleX = tileWidth / 8;\n\t\t\tconst customScaleY = tileHeight / 8;\n\t\t\t$T(tiles, withTransition).each(function() {\n\t\t\t\tconst nodeName = this.nodeName.toLowerCase();\n\t\t\t\tlet x = \"x\";\n\t\t\t\tlet y = \"y\";\n\t\t\t\tlet radius = null;\n\t\t\t\tlet width = null;\n\t\t\t\tlet height = null;\n\t\t\t\tif (nodeName === \"circle\") {\n\t\t\t\t\tx = \"cx\";\n\t\t\t\t\ty = \"cy\";\n\t\t\t\t\tradius = Math.min(iconWidth, iconHeight) / 2;\n\t\t\t\t} else if (nodeName === \"rect\") {\n\t\t\t\t\twidth = iconWidth;\n\t\t\t\t\theight = iconHeight;\n\t\t\t\t}\n\t\t\t\tconst tile = select(this).attr(\"transform\", null).attr(\"x\", null).attr(\"y\", null).attr(\"cx\", null).attr(\"cy\", null).attr(\"r\", radius).attr(\"width\", width).attr(\"height\", height);\n\t\t\t\tif (nodeName === \"use\") tile.attr(\"transform\", (d) => `translate(${posFn.x1Tile(d)} ${posFn.yTile(d) - tileHeight / 2}) scale(${customScaleX} ${customScaleY})`);\n\t\t\t\telse tile.attr(x, (d) => posFn.x1Tile(d) + (tileWidth - (width || 0)) / 2).attr(y, (d) => posFn.yTile(d) - (height || 0) / 2);\n\t\t\t});\n\t\t} else $T(legend.selectAll(`.${$LEGEND.legendItemTile}`).data(targetIdz), withTransition).style(\"stroke\", _getLegendColor.bind($$)).call((selection) => {\n\t\t\tif (legendType === \"circle\") selection.attr(\"cx\", (d) => {\n\t\t\t\tconst x2 = posFn.x2Tile(d);\n\t\t\t\treturn x2 - (x2 - posFn.x1Tile(d)) / 2;\n\t\t\t}).attr(\"cy\", posFn.yTile);\n\t\t\telse if (isRectangle) selection.attr(\"x1\", posFn.x1Tile).attr(\"y1\", posFn.yTile).attr(\"x2\", posFn.x2Tile).attr(\"y2\", posFn.yTile);\n\t\t});\n\t}\n};\n//#endregion\nexport { legend_default as default };\n","/*!\n* Copyright (c) 2017 ~ present NAVER Corp.\r\n * billboard.js project is licensed under the MIT license\r\n * \r\n * billboard.js, JavaScript chart library\r\n * https://naver.github.io/billboard.js/\r\n * \r\n * @version 4.1.0\n*/\nimport { notEmpty } from \"../../module/util/type-checks.js\";\nimport { callFn, capitalize, getOption } from \"../../module/util/object.js\";\nimport { isTabVisible } from \"../../module/util/dom.js\";\nimport { $COMMON, $SELECT, $TEXT } from \"../../config/classes.js\";\nimport { KEY } from \"../../module/Cache.js\";\nimport { generateWait } from \"../../module/generator.js\";\nimport { transition } from \"d3-transition\";\n//#region src/ChartInternal/internals/redraw.ts\n/**\n* Copyright (c) 2017 ~ present NAVER Corp.\n* billboard.js project is licensed under the MIT license\n*/\nvar redraw_default = {\n\tredraw(options = {}) {\n\t\tconst $$ = this;\n\t\tconst { config, state, $el } = $$;\n\t\tconst { main, treemap } = $el;\n\t\tstate.redrawing = true;\n\t\tstate.redrawGeneration++;\n\t\tif (state.dirty.data || state.dirty.visibility || options.initializing) state.dataGeneration++;\n\t\tif (options.initializing || state.dirty.size || state.dirty.data || !state.rendered) $$.cache.remove([KEY.svgLeft]);\n\t\tconst targetsToShow = $$.filterTargetsToShow($$.data.targets);\n\t\tstate._targetsToShow = targetsToShow;\n\t\tconst dirtySnapshot = {\n\t\t\tdata: state.dirty.data,\n\t\t\tvisibility: state.dirty.visibility,\n\t\t\tsize: state.dirty.size\n\t\t};\n\t\tstate.dirty.data = false;\n\t\tstate.dirty.visibility = false;\n\t\tstate.dirty.size = false;\n\t\tconst { flow, initializing } = options;\n\t\tconst wth = $$.getWithOption(options);\n\t\tconst duration = wth.Transition ? config.transition_duration : 0;\n\t\tconst durationForExit = wth.TransitionForExit ? duration : 0;\n\t\tconst transitions = $$.axis?.generateTransitions(wth.TransitionForAxis ? duration : 0);\n\t\tconst needShapeUpdate = dirtySnapshot.data || dirtySnapshot.visibility || initializing;\n\t\tif (state.isCanvasMode) {\n\t\t\t$$.setContainerSize();\n\t\t\t$$.updateHtmlLegend?.();\n\t\t}\n\t\t$$.updateSizes(initializing);\n\t\tif (state.isCanvasMode) {\n\t\t\tconst zoomScale = $$.scale.zoom;\n\t\t\tconst zoomDomain = zoomScale?.domain();\n\t\t\tzoomScale && ($$.scale.zoom = null);\n\t\t\t$$.updateScales(initializing, wth.UpdateXDomain);\n\t\t\tif (zoomScale) {\n\t\t\t\tzoomScale.range($$.scale.x.range());\n\t\t\t\tzoomDomain && zoomScale.domain(zoomDomain);\n\t\t\t\t$$.scale.zoom = $$.getCustomizedXScale(zoomScale);\n\t\t\t\t$$.axis.x.scale($$.scale.zoom);\n\t\t\t\t$$.scale.x.domain(config.zoom_rescale ? zoomDomain : $$.org.xDomain);\n\t\t\t\t$$.scale.subX.domain($$.org.xDomain);\n\t\t\t}\n\t\t\tstate.hasAxis && $$.axis.syncAxisDomains(targetsToShow, wth, flow);\n\t\t\tstate.hasAxis && $$.applyCanvasSubchartDomain?.();\n\t\t\tconst shape = needShapeUpdate ? $$.getDrawShape() : state._cachedDrawShape || $$.getDrawShape();\n\t\t\tif (needShapeUpdate) state._cachedDrawShape = shape;\n\t\t\tif (config.legend_show && $el.legend && !(config.legend_contents_bindto && config.legend_contents_template)) $$.positionHtmlLegend?.();\n\t\t\t$$.resizeCanvas?.();\n\t\t\tstate.canvasFocusKey = null;\n\t\t\t$$.renderCanvasFrame(shape, null, true);\n\t\t\tinitializing && $$.updateTypesElements();\n\t\t\t$$.callPluginHook(\"$redraw\", options, 0);\n\t\t\tstate.redrawing = false;\n\t\t\tstate._targetsToShow = null;\n\t\t\tstate._cachedDrawShape = null;\n\t\t\t$$.mapToIds($$.data.targets).forEach((id) => {\n\t\t\t\tstate.withoutFadeIn[id] = true;\n\t\t\t});\n\t\t\tcallFn(config.onrendered, $$.api);\n\t\t\treturn;\n\t\t}\n\t\tif (wth.Legend && config.legend_show) {\n\t\t\toptions.withTransition = !!duration;\n\t\t\t!treemap && $$.updateLegend($$.mapToIds($$.data.targets), options, transitions);\n\t\t} else if (wth.Dimension) $$.updateDimension(true);\n\t\tconfig.data_empty_label_text && main.select(`text.${$TEXT.text}.${$COMMON.empty}`).attr(\"x\", state.width / 2).attr(\"y\", state.height / 2).text(config.data_empty_label_text).style(\"display\", targetsToShow.length ? \"none\" : null);\n\t\t$$.redrawTitle?.();\n\t\tif (state.hasAxis) {\n\t\t\t$$.axis.redrawAxis(targetsToShow, wth, transitions, flow, initializing);\n\t\t\t$$.hasGrid?.() && $$.updateGrid();\n\t\t\tconfig.regions.length && $$.updateRegion?.();\n\t\t\t[\n\t\t\t\t\"bar\",\n\t\t\t\t\"candlestick\",\n\t\t\t\t\"line\",\n\t\t\t\t\"area\"\n\t\t\t].forEach((v) => {\n\t\t\t\tconst name = capitalize(v);\n\t\t\t\tif (/^(line|area)$/.test(v) && $$.hasTypeOf(name) || $$.hasType(v)) {\n\t\t\t\t\tif (needShapeUpdate) $$[`update${name}`](wth.TransitionForExit);\n\t\t\t\t}\n\t\t\t});\n\t\t\t$el.text && main.selectAll(`.${$SELECT.selectedCircles}`).filter($$.isBarType.bind($$)).selectAll(\"circle\").remove();\n\t\t\tif (config.interaction_enabled && !flow && wth.EventRect) {\n\t\t\t\t$$.redrawEventRect();\n\t\t\t\t$$.bindZoomEvent?.();\n\t\t\t}\n\t\t} else {\n\t\t\t$el.arcs && $$.redrawArc(duration, durationForExit, wth.Transform);\n\t\t\t$el.radar && $$.redrawRadar();\n\t\t\t$el.polar && $$.redrawPolar();\n\t\t\t$el.funnel && $$.redrawFunnel();\n\t\t\ttreemap && $$.updateTreemap(durationForExit);\n\t\t}\n\t\tif (!state.resizing && !treemap && ($$.hasPointType() || state.hasRadar)) {\n\t\t\tif (needShapeUpdate) $$.updateCircle();\n\t\t} else if ($$.hasLegendDefsPoint?.()) $$.data.targets.forEach($$.point(\"create\", this));\n\t\tif ($$.hasDataLabel() && !$$.hasArcType(null, [\"radar\"])) {\n\t\t\tif (needShapeUpdate) $$.updateText();\n\t\t}\n\t\tinitializing && $$.updateTypesElements();\n\t\t$$.generateRedrawList(targetsToShow, flow, duration, wth.Subchart, needShapeUpdate);\n\t\t$$.updateTooltipOnRedraw();\n\t\t$$.callPluginHook(\"$redraw\", options, duration);\n\t},\n\t/**\n\t* Generate redraw list\n\t* @param {object} targets targets data to be shown\n\t* @param {object} flow flow object\n\t* @param {number} duration duration value\n\t* @param {boolean} withSubchart whether or not to show subchart\n\t* @param {boolean} needShapeRegen whether to regenerate draw shape\n\t* @private\n\t*/\n\tgenerateRedrawList(targets, flow, duration, withSubchart, needShapeRegen = true) {\n\t\tconst $$ = this;\n\t\tconst { config, state } = $$;\n\t\tconst shape = needShapeRegen ? $$.getDrawShape() : state._cachedDrawShape || $$.getDrawShape();\n\t\tif (needShapeRegen) state._cachedDrawShape = shape;\n\t\tif (state.hasAxis) config.subchart_show && $$.redrawSubchart(withSubchart, duration, shape);\n\t\tconst flowFn = flow && $$.generateFlow({\n\t\t\ttargets,\n\t\t\tflow,\n\t\t\tduration: flow.duration,\n\t\t\tshape,\n\t\t\txv: $$.xv.bind($$)\n\t\t});\n\t\tconst withTransition = (duration || flowFn) && isTabVisible();\n\t\tconst redrawList = $$.getRedrawList(shape, flow, flowFn, withTransition);\n\t\tconst afterRedraw = () => {\n\t\t\tflowFn && flowFn();\n\t\t\tstate.redrawing = false;\n\t\t\tstate._targetsToShow = null;\n\t\t\tstate._cachedDrawShape = null;\n\t\t\tcallFn(config.onrendered, $$.api);\n\t\t};\n\t\tif (withTransition && redrawList.length) {\n\t\t\tconst waitForDraw = generateWait();\n\t\t\ttransition().duration(duration).each(() => {\n\t\t\t\tredrawList.flatMap((t1) => t1).forEach((t) => waitForDraw.add(t));\n\t\t\t}).call(waitForDraw, afterRedraw);\n\t\t} else if (!state.transiting) afterRedraw();\n\t\t$$.mapToIds($$.data.targets).forEach((id) => {\n\t\t\tstate.withoutFadeIn[id] = true;\n\t\t});\n\t},\n\tgetRedrawList(shape, flow, flowFn, withTransition) {\n\t\tconst $$ = this;\n\t\tconst { config, state: { hasAxis, hasRadar, hasTreemap }, $el: { grid } } = $$;\n\t\tconst { cx, cy, xForText, yForText } = shape.pos;\n\t\tconst list = [];\n\t\tif (hasAxis) {\n\t\t\tif ($$.redrawGrid && (config.grid_x_lines.length || config.grid_y_lines.length)) list.push($$.redrawGrid(withTransition));\n\t\t\tif ($$.redrawRegion && config.regions.length) list.push($$.redrawRegion(withTransition));\n\t\t\tfor (const v in shape.type) {\n\t\t\t\tconst name = capitalize(v);\n\t\t\t\tconst drawFn = shape.type[v];\n\t\t\t\tif (/^(area|line)$/.test(v) && $$.hasTypeOf(name) || $$.hasType(v)) list.push($$[`redraw${name}`](drawFn, withTransition));\n\t\t\t}\n\t\t\t!flow && grid.main && $$.updateGridFocus && list.push($$.updateGridFocus());\n\t\t}\n\t\tif (!$$.hasArcType() || hasRadar) notEmpty(config.data_labels) && config.data_labels !== false && list.push($$.redrawText(xForText, yForText, flow, withTransition));\n\t\tif (($$.hasPointType() || hasRadar) && !$$.isPointFocusOnly()) $$.redrawCircle && list.push($$.redrawCircle(cx, cy, withTransition, flowFn));\n\t\tif (hasTreemap) list.push($$.redrawTreemap(withTransition));\n\t\treturn list;\n\t},\n\tupdateAndRedraw(options = {}) {\n\t\tconst $$ = this;\n\t\tconst { config, state } = $$;\n\t\tlet transitions;\n\t\toptions.withTransition = getOption(options, \"withTransition\", true);\n\t\toptions.withTransform = getOption(options, \"withTransform\", false);\n\t\toptions.withLegend = getOption(options, \"withLegend\", false);\n\t\toptions.withUpdateXDomain = true;\n\t\toptions.withUpdateOrgXDomain = true;\n\t\toptions.withTransitionForExit = false;\n\t\toptions.withTransitionForTransform = getOption(options, \"withTransitionForTransform\", options.withTransition);\n\t\tif (!(options.withLegend && config.legend_show)) {\n\t\t\tif (state.hasAxis) transitions = $$.axis.generateTransitions(options.withTransitionForAxis ? config.transition_duration : 0);\n\t\t\t$$.updateScales();\n\t\t\t$$.updateSvgSize();\n\t\t\t$$.transformAll(options.withTransitionForTransform, transitions);\n\t\t}\n\t\t$$.redraw(options);\n\t}\n};\n//#endregion\nexport { redraw_default as default };\n","/*!\n* Copyright (c) 2017 ~ present NAVER Corp.\r\n * billboard.js project is licensed under the MIT license\r\n * \r\n * billboard.js, JavaScript chart library\r\n * https://naver.github.io/billboard.js/\r\n * \r\n * @version 4.1.0\n*/\nimport { isString, isValue } from \"../../module/util/type-checks.js\";\nimport { parseDate } from \"../../module/util/object.js\";\nimport { scaleLinear, scaleLog, scaleSymlog, scaleTime, scaleUtc } from \"d3-scale\";\n//#region src/ChartInternal/internals/scale.ts\n/**\n* Copyright (c) 2017 ~ present NAVER Corp.\n* billboard.js project is licensed under the MIT license\n*/\n/**\n* Get scale\n* @param {string} [type='linear'] Scale type\n* @param {number|Date} [min] Min range\n* @param {number|Date} [max] Max range\n* @returns {d3.scaleLinear|d3.scaleTime} scale\n* @private\n*/\nfunction getScale(type = \"linear\", min, max) {\n\tconst scale = {\n\t\tlinear: scaleLinear,\n\t\tlog: scaleSymlog,\n\t\t_log: scaleLog,\n\t\ttime: scaleTime,\n\t\tutc: scaleUtc\n\t}[type]();\n\tscale.type = type;\n\t/_?log/.test(type) && scale.clamp(true);\n\treturn scale.range([min ?? 0, max ?? 1]);\n}\nvar scale_default = {\n\t/**\n\t* Get x Axis scale function\n\t* @param {number} min Min range value\n\t* @param {number} max Max range value\n\t* @param {Array} domain Domain value\n\t* @param {function} offset The offset getter to be sum\n\t* @returns {function} scale\n\t* @private\n\t*/\n\tgetXScale(min, max, domain, offset) {\n\t\tconst $$ = this;\n\t\tconst scale = $$.state.loading !== \"append\" && $$.scale.zoom || getScale($$.axis.getAxisType(\"x\"), min, max);\n\t\treturn $$.getCustomizedXScale(domain ? scale.domain(domain) : scale, offset);\n\t},\n\t/**\n\t* Get y Axis scale function\n\t* @param {string} id Axis id: 'y' or 'y2'\n\t* @param {number} min Min value\n\t* @param {number} max Max value\n\t* @param {Array} domain Domain value\n\t* @param {object} [existing] Existing scale function to be updated\n\t* @returns {function} Scale function\n\t* @private\n\t*/\n\tgetYScale(id, min, max, domain, existing) {\n\t\tconst type = this.axis.getAxisType(id);\n\t\tif (existing && existing.type === type) {\n\t\t\texisting.range([min, max]);\n\t\t\tdomain && existing.domain(domain);\n\t\t\treturn existing;\n\t\t}\n\t\tconst scale = getScale(type, min, max);\n\t\tdomain && scale.domain(domain);\n\t\treturn scale;\n\t},\n\t/**\n\t* Get y Axis scale\n\t* @param {string} id Axis id\n\t* @param {boolean} isSub Weather is sub Axis\n\t* @returns {function} Scale function\n\t* @private\n\t*/\n\tgetYScaleById(id, isSub = false) {\n\t\tconst isY2 = this.axis?.getId(id) === \"y2\";\n\t\tconst key = isSub ? isY2 ? \"subY2\" : \"subY\" : isY2 ? \"y2\" : \"y\";\n\t\treturn this.scale[key];\n\t},\n\t/**\n\t* Get customized x axis scale\n\t* @param {d3.scaleLinear|d3.scaleTime} scaleValue Scale function\n\t* @param {function} offsetValue Offset getter to be sum\n\t* @returns {function} Scale function\n\t* @private\n\t*/\n\tgetCustomizedXScale(scaleValue, offsetValue) {\n\t\tconst $$ = this;\n\t\tconst offset = () => {\n\t\t\treturn (offsetValue ? offsetValue() : $$.axis.x.tickOffset()) || ($$.axis.isCategorized() ? (scaleValue(1) - scaleValue(0)) / 2 : 0);\n\t\t};\n\t\tconst isInverted = $$.config.axis_x_inverted;\n\t\t/**\n\t\t* Get scaled value\n\t\t* @param {object} d Data object\n\t\t* @returns {number}\n\t\t* @private\n\t\t*/\n\t\tconst scale = function(d) {\n\t\t\treturn scaleValue(d) + offset();\n\t\t};\n\t\tfor (const key in scaleValue) scale[key] = scaleValue[key];\n\t\tscale.orgDomain = () => scaleValue.domain();\n\t\tscale.orgScale = () => scaleValue;\n\t\tif ($$.axis.isCategorized()) scale.domain = function(domainValue) {\n\t\t\tlet domain = domainValue;\n\t\t\tif (!arguments.length) {\n\t\t\t\tdomain = this.orgDomain();\n\t\t\t\treturn isInverted ? [domain[0] + 1, domain[1]] : [domain[0], domain[1] + 1];\n\t\t\t}\n\t\t\tscaleValue.domain(domain);\n\t\t\treturn scale;\n\t\t};\n\t\treturn scale;\n\t},\n\t/**\n\t* Update scale\n\t* @param {boolean} isInit Param is given at the init rendering\n\t* @param {boolean} updateXDomain If update x domain\n\t* @private\n\t*/\n\tupdateScales(isInit, updateXDomain = true) {\n\t\tconst $$ = this;\n\t\tconst { axis, config, format, org, scale, state: { current, width, height, width2, height2, hasAxis, hasTreemap } } = $$;\n\t\tif (hasAxis) {\n\t\t\tconst isRotated = config.axis_rotated;\n\t\t\tconst resettedPadding = $$.getResettedPadding(1);\n\t\t\tconst min = {\n\t\t\t\tx: isRotated ? resettedPadding : 0,\n\t\t\t\ty: isRotated ? 0 : height,\n\t\t\t\tsubX: isRotated ? 1 : 0,\n\t\t\t\tsubY: isRotated ? 0 : height2\n\t\t\t};\n\t\t\tconst max = {\n\t\t\t\tx: isRotated ? height : width,\n\t\t\t\ty: isRotated ? width : resettedPadding,\n\t\t\t\tsubX: isRotated ? height : width,\n\t\t\t\tsubY: isRotated ? width2 : 1\n\t\t\t};\n\t\t\tconst xDomain = updateXDomain ? scale.x?.orgDomain() : scale.zoom ? void 0 : scale.x?.domain?.();\n\t\t\tconst xSubDomain = updateXDomain ? org.xDomain : scale.zoom ? void 0 : scale.subX?.domain?.();\n\t\t\tscale.x = $$.getXScale(min.x, max.x, xDomain, () => axis.x.tickOffset());\n\t\t\tscale.subX = $$.getXScale(min.x, max.x, xSubDomain, (d) => d % 1 ? 0 : (axis.subX ?? axis.x).tickOffset());\n\t\t\tformat.xAxisTick = axis.getXAxisTickFormat();\n\t\t\tformat.subXAxisTick = axis.getXAxisTickFormat(true);\n\t\t\taxis.setAxis(\"x\", scale.x, config.axis_x_tick_outer, isInit);\n\t\t\tif (config.subchart_show) axis.setAxis(\"subX\", scale.subX, config.subchart_axis_x_tick_outer ?? config.axis_x_tick_outer, isInit);\n\t\t\tscale.y = $$.getYScale(\"y\", min.y, max.y, scale.y ? scale.y.domain() : config.axis_y_default, scale.y);\n\t\t\tscale.subY = $$.getYScale(\"y\", min.subY, max.subY, scale.subY ? scale.subY.domain() : config.axis_y_default, scale.subY);\n\t\t\taxis.setAxis(\"y\", scale.y, config.axis_y_tick_outer, isInit);\n\t\t\tconfig.subchart_show && config.subchart_axis_y_show && axis.setAxis(\"subY\", scale.subY, config.subchart_axis_y_tick_outer ?? config.axis_y_tick_outer, isInit);\n\t\t\tif (config.axis_y2_show || config.subchart_axis_y2_show) {\n\t\t\t\tscale.y2 = $$.getYScale(\"y2\", min.y, max.y, scale.y2 ? scale.y2.domain() : config.axis_y2_default, scale.y2);\n\t\t\t\tscale.subY2 = $$.getYScale(\"y2\", min.subY, max.subY, scale.subY2 ? scale.subY2.domain() : config.axis_y2_default, scale.subY2);\n\t\t\t\taxis.setAxis(\"y2\", scale.y2, config.axis_y2_tick_outer, isInit);\n\t\t\t\tconfig.subchart_show && config.subchart_axis_y2_show && axis.setAxis(\"subY2\", scale.subY2, config.subchart_axis_y2_tick_outer ?? config.axis_y2_tick_outer, isInit);\n\t\t\t}\n\t\t} else if (hasTreemap) {\n\t\t\tconst padding = $$.getCurrentPadding();\n\t\t\tscale.x = scaleLinear().rangeRound([padding.left, current.width - padding.right]);\n\t\t\tscale.y = scaleLinear().rangeRound([padding.top, current.height - padding.bottom]);\n\t\t} else $$.updateArc?.();\n\t},\n\t/**\n\t* Get the zoom or unzoomed scaled value\n\t* @param {Date|number|object} d Data value\n\t* @returns {number|null}\n\t* @private\n\t*/\n\txx(d) {\n\t\tconst { config, scale: { x, zoom } } = this;\n\t\treturn d ? (config.zoom_enabled && zoom ? zoom : x)(isValue(d.x) ? d.x : d) : null;\n\t},\n\txv(d) {\n\t\tconst $$ = this;\n\t\tconst { axis, config, scale: { x, zoom } } = $$;\n\t\tconst fn = config.zoom_enabled && zoom ? zoom : x;\n\t\tlet value = $$.getBaseValue(d);\n\t\tif (axis.isTimeSeries()) value = parseDate.call($$, value);\n\t\telse if (axis.isCategorized() && isString(value)) value = config.axis_x_categories.indexOf(value);\n\t\treturn fn(value);\n\t},\n\tyv(d) {\n\t\tconst $$ = this;\n\t\tconst { scale: { y, y2 } } = $$;\n\t\treturn (d.axis && d.axis === \"y2\" ? y2 : y)($$.getBaseValue(d));\n\t},\n\tsubxx(d) {\n\t\treturn d ? this.scale.subX(d.x) : null;\n\t}\n};\n//#endregion\nexport { scale_default as default, getScale };\n","/*!\n* Copyright (c) 2017 ~ present NAVER Corp.\r\n * billboard.js project is licensed under the MIT license\r\n * \r\n * billboard.js, JavaScript chart library\r\n * https://naver.github.io/billboard.js/\r\n * \r\n * @version 4.1.0\n*/\nimport { document as doc } from \"../../module/browser.js\";\nimport { ceil10, isEmpty, isNumber, isString, isUndefined } from \"../../module/util/type-checks.js\";\nimport { capitalize } from \"../../module/util/object.js\";\nimport { getBoundingRect } from \"../../module/util/dom.js\";\nimport { $AXIS, $SUBCHART } from \"../../config/classes.js\";\nimport { KEY } from \"../../module/Cache.js\";\n//#region src/ChartInternal/internals/size.ts\n/**\n* Copyright (c) 2017 ~ present NAVER Corp.\n* billboard.js project is licensed under the MIT license\n*/\nvar size_default = {\n\t/**\n\t* Update container size\n\t* @private\n\t*/\n\tsetContainerSize() {\n\t\tconst $$ = this;\n\t\tconst { state } = $$;\n\t\tstate.current.width = $$.getCurrentWidth();\n\t\tstate.current.height = $$.getCurrentHeight();\n\t},\n\tgetCurrentWidth() {\n\t\tconst $$ = this;\n\t\treturn $$.config.size_width || $$.getParentRectValue(\"width\");\n\t},\n\tgetCurrentHeight() {\n\t\tconst $$ = this;\n\t\tconst { config, state, $el } = $$;\n\t\tlet h = config.size_height;\n\t\tif (!h) {\n\t\t\tconst chartNode = state.isCanvasMode ? $el.chart?.node() : null;\n\t\t\tconst minHeight = chartNode?.style.minHeight;\n\t\t\tminHeight && (chartNode.style.minHeight = \"\");\n\t\t\th = $$.getParentHeight();\n\t\t\tminHeight && (chartNode.style.minHeight = minHeight);\n\t\t\tconst surface = chartNode ? parseFloat($$.canvasEngine?.canvas.style.height) || 0 : 0;\n\t\t\tconst reserve = state.current.height - surface;\n\t\t\tif (reserve > 0 && Math.round(h) === Math.round(surface)) h += reserve;\n\t\t}\n\t\treturn h > 0 ? h : 320 / ($$.hasType(\"gauge\") && !config.gauge_fullCircle ? 2 : 1);\n\t},\n\t/**\n\t* Get the parent rect element's size\n\t* @param {string} key property/attribute name\n\t* @returns {number}\n\t* @private\n\t*/\n\tgetParentRectValue(key) {\n\t\tconst offsetName = `offset${capitalize(key)}`;\n\t\tlet parent = this.$el.chart.node();\n\t\tlet v = 0;\n\t\twhile (v < 30 && parent && parent.tagName !== \"BODY\") {\n\t\t\ttry {\n\t\t\t\tv = getBoundingRect(parent, true)[key];\n\t\t\t} catch {\n\t\t\t\tif (offsetName in parent) v = parent[offsetName];\n\t\t\t}\n\t\t\tparent = parent.parentNode;\n\t\t}\n\t\tconst bodySize = doc.body[offsetName];\n\t\tv > bodySize && (v = bodySize);\n\t\treturn v;\n\t},\n\tgetParentHeight() {\n\t\tconst h = this.$el.chart.style(\"height\");\n\t\tlet height = 0;\n\t\tif (h) height = /px$/.test(h) ? parseInt(h, 10) : this.getParentRectValue(\"height\");\n\t\treturn height;\n\t},\n\tgetSvgLeft(withoutRecompute) {\n\t\tconst $$ = this;\n\t\tconst { cache, config, state: { hasAxis }, $el } = $$;\n\t\tif (withoutRecompute) {\n\t\t\tconst cached = cache.get(KEY.svgLeft);\n\t\t\tif (cached !== null) return cached;\n\t\t}\n\t\tconst isRotated = config.axis_rotated;\n\t\tconst hasLeftAxisRect = isRotated || !isRotated && !config.axis_y_inner;\n\t\tconst leftAxisClass = isRotated ? $AXIS.axisX : $AXIS.axisY;\n\t\tconst leftAxis = $el.main.select(`.${leftAxisClass}`).node();\n\t\tconst leftLabel = hasAxis && config[`axis_${isRotated ? \"x\" : \"y\"}_label`];\n\t\tconst label = hasAxis && (isString(leftLabel) || isString(leftLabel.text) || /^inner-/.test(leftLabel?.position)) ? $el.main.select(`.${leftAxisClass}-label`) : null;\n\t\tconst labelNode = label && !label.empty() ? label.node() : null;\n\t\tconst forceEval = !withoutRecompute;\n\t\tconst rects = {\n\t\t\tlabel: labelNode ? getBoundingRect(labelNode, forceEval) : null,\n\t\t\tleftAxis: leftAxis && hasLeftAxisRect ? getBoundingRect(leftAxis, forceEval) : null,\n\t\t\tchart: getBoundingRect($el.chart.node(), forceEval)\n\t\t};\n\t\tconst labelWidth = rects.label?.left ?? 0;\n\t\tconst svgRect = rects.leftAxis ?? { right: 0 };\n\t\tconst chartRectLeft = rects.chart.left + labelWidth;\n\t\tconst hasArc = $$.hasArcType();\n\t\tconst svgLeft = svgRect.right - chartRectLeft - (hasArc ? 0 : $$.getCurrentPaddingByDirection(\"left\", withoutRecompute));\n\t\tconst result = svgLeft > 0 ? svgLeft : 0;\n\t\tcache.add(KEY.svgLeft, result);\n\t\treturn result;\n\t},\n\t/**\n\t* Stretch the rendered surface to the container's current size, without redrawing.\n\t* Gives an immediate size feedback while the delayed resize is pending.\n\t* The drawn content keeps its previous geometry until the redraw takes place.\n\t* @private\n\t*/\n\tpreviewResize() {\n\t\tconst $$ = this;\n\t\tconst { state, $el } = $$;\n\t\tconst { current } = state;\n\t\tconst width = $$.getCurrentWidth();\n\t\tconst height = $$.getCurrentHeight();\n\t\tif (!width || !height || !current.width || !current.height || width === current.width && height === current.height) return;\n\t\tif (state.isCanvasMode) {\n\t\t\tconst canvas = $$.canvasEngine?.canvas;\n\t\t\tif (!canvas) return;\n\t\t\t$el.chart.style(\"min-height\", `${height}px`);\n\t\t\tcanvas.style.width = `${width}px`;\n\t\t\tcanvas.style.height = `${Math.max(0, height - ($$.getCanvasBottomLegendHeight?.() ?? 0))}px`;\n\t\t} else if ($el.svg) $el.svg.attr(\"viewBox\", `0 0 ${current.width} ${current.height}`).attr(\"preserveAspectRatio\", \"none\").attr(\"width\", width).attr(\"height\", height);\n\t\telse return;\n\t\tstate.resizePreview = true;\n\t},\n\t/**\n\t* Drop the stretched state set by previewResize(), to render on exact pixels again.\n\t* @private\n\t*/\n\tclearResizePreview() {\n\t\tconst { config, state, $el } = this;\n\t\tif (!state.resizePreview) return;\n\t\tstate.resizePreview = false;\n\t\tif (!state.isCanvasMode && $el.svg && config.resize_auto !== \"viewBox\") $el.svg.attr(\"viewBox\", null).attr(\"preserveAspectRatio\", null);\n\t},\n\tupdateDimension(withoutAxis) {\n\t\tconst $$ = this;\n\t\tconst { config, state: { hasAxis, isCanvasMode }, $el } = $$;\n\t\tif (hasAxis && !withoutAxis && $$.axis.x && config.axis_rotated) $$.axis.subX?.create($el.axis.subX);\n\t\t$$.updateScales(withoutAxis);\n\t\tif (isCanvasMode) {\n\t\t\t$$.resizeCanvas?.();\n\t\t\treturn;\n\t\t}\n\t\t$$.updateSvgSize();\n\t\t$$.transformAll(false);\n\t},\n\tupdateSvgSize() {\n\t\tconst $$ = this;\n\t\tconst { config, state: { clip, current, hasAxis, width, height }, $el: { svg } } = $$;\n\t\tif (!svg) {\n\t\t\t$$.resizeCanvas?.();\n\t\t\treturn;\n\t\t}\n\t\t$$.clearResizePreview();\n\t\tif (config.resize_auto === \"viewBox\") svg.attr(\"viewBox\", `0 0 ${current.width} ${current.height}`);\n\t\telse svg.attr(\"width\", current.width).attr(\"height\", current.height);\n\t\tif (hasAxis) {\n\t\t\tconst brush = svg.select(`.${$SUBCHART.brush} .overlay`);\n\t\t\tconst brushSize = {\n\t\t\t\twidth: 0,\n\t\t\t\theight: 0\n\t\t\t};\n\t\t\tif (brush.size()) {\n\t\t\t\tbrushSize.width = +brush.attr(\"width\");\n\t\t\t\tbrushSize.height = +brush.attr(\"height\");\n\t\t\t}\n\t\t\tsvg.selectAll([`#${clip.id}`, `#${clip.idGrid}`]).select(\"rect\").attr(\"width\", width).attr(\"height\", height);\n\t\t\tsvg.select(`#${clip.idXAxis}`).select(\"rect\").call($$.setXAxisClipPath.bind($$));\n\t\t\tsvg.select(`#${clip.idYAxis}`).select(\"rect\").call($$.setYAxisClipPath.bind($$));\n\t\t\tclip.idSubchart && svg.select(`#${clip.idSubchart}`).select(\"rect\").attr(\"width\", width).attr(\"height\", brushSize.height);\n\t\t}\n\t},\n\t/**\n\t* Get padding by the direction.\n\t* @param {string} type \"top\" | \"bottom\" | \"left\" | \"right\"\n\t* @param {boolean} [withoutRecompute=false] If set true, do not recompute the padding value.\n\t* @param {boolean} [withXAxisTickTextOverflow=false] If set true, calculate x axis tick text overflow.\n\t* @returns {number} padding value\n\t* @private\n\t*/\n\tgetCurrentPaddingByDirection(type, withoutRecompute = false, withXAxisTickTextOverflow = false) {\n\t\tconst $$ = this;\n\t\tconst { config, $el, state: { hasAxis, isCanvasMode } } = $$;\n\t\tconst isRotated = config.axis_rotated;\n\t\tconst isFitPadding = config.padding?.mode === \"fit\";\n\t\tconst paddingOption = isNumber(config[`padding_${type}`]) ? config[`padding_${type}`] : void 0;\n\t\tconst axisId = hasAxis ? {\n\t\t\ttop: isRotated ? \"y2\" : null,\n\t\t\tbottom: isRotated ? \"y\" : \"x\",\n\t\t\tleft: isRotated ? \"x\" : \"y\",\n\t\t\tright: isRotated ? null : \"y2\"\n\t\t}[type] : null;\n\t\tconst isLeftRight = /^(left|right)$/.test(type);\n\t\tconst isAxisInner = axisId && config[`axis_${axisId}_inner`];\n\t\tconst isAxisShow = axisId && config[`axis_${axisId}_show`];\n\t\tconst axesLen = axisId ? config[`axis_${axisId}_axes`].length : 0;\n\t\tlet axisSize = axisId ? isLeftRight ? $$.getAxisWidthByAxisId(axisId, withoutRecompute) : $$.getHorizontalAxisHeight(axisId) : 0;\n\t\tconst defaultPadding = 20;\n\t\tlet gap = 0;\n\t\tif (!isFitPadding && isLeftRight) axisSize = ceil10(axisSize);\n\t\tlet padding = hasAxis && isLeftRight && (isAxisInner || isUndefined(paddingOption) && !isAxisShow) ? 0 : isFitPadding ? (isAxisShow ? axisSize : 0) + (paddingOption ?? 0) : isUndefined(paddingOption) ? axisSize : paddingOption;\n\t\tif (isLeftRight && hasAxis) {\n\t\t\tif (axisId && (isFitPadding || isAxisInner) && config[`axis_${axisId}_label`].text) padding += $$.axis.getAxisLabelPosition(axisId).isOuter ? defaultPadding : 0;\n\t\t\tif (type === \"right\") {\n\t\t\t\tpadding += isRotated ? !isFitPadding && isUndefined(paddingOption) ? 10 : 2 : !isAxisShow || isAxisInner ? isFitPadding ? 2 : 1 : 0;\n\t\t\t\tpadding += withXAxisTickTextOverflow ? $$.axis.getXAxisTickTextY2Overflow(defaultPadding) : 0;\n\t\t\t} else if (type === \"left\" && isRotated && isUndefined(paddingOption)) padding = !config.axis_x_show ? 1 : isFitPadding ? axisSize : Math.max(axisSize, 40);\n\t\t} else if (type === \"top\") {\n\t\t\tif ($el.title && $el.title.node() || isCanvasMode && config.title_text) padding += $$.getTitlePadding();\n\t\t\tgap = isRotated && !isAxisInner ? axesLen : 0;\n\t\t} else if (type === \"bottom\" && hasAxis && isRotated && !isAxisShow) padding += 1;\n\t\treturn padding + axisSize * axesLen - gap;\n\t},\n\tgetCurrentPadding(withXAxisTickTextOverflow = false) {\n\t\tconst $$ = this;\n\t\tconst [top, bottom, left, right] = [\n\t\t\t\"top\",\n\t\t\t\"bottom\",\n\t\t\t\"left\",\n\t\t\t\"right\"\n\t\t].map((v) => $$.getCurrentPaddingByDirection(v, null, withXAxisTickTextOverflow));\n\t\treturn {\n\t\t\ttop,\n\t\t\tbottom,\n\t\t\tleft,\n\t\t\tright\n\t\t};\n\t},\n\t/**\n\t* Get resetted padding values when 'padding=false' option is set\n\t* https://github.com/naver/billboard.js/issues/2367\n\t* @param {number|object} v Padding values to be resetted\n\t* @returns {number|object} Padding value\n\t* @private\n\t*/\n\tgetResettedPadding(v) {\n\t\tconst { config } = this;\n\t\tconst isNum = isNumber(v);\n\t\tlet p = isNum ? 0 : {};\n\t\tif (config.padding === false) !isNum && Object.keys(v).forEach((key) => {\n\t\t\tp[key] = !isEmpty(config.data_labels) && config.data_labels !== false && key === \"top\" ? v[key] : 0;\n\t\t});\n\t\telse p = v;\n\t\treturn p;\n\t},\n\t/**\n\t* Update size values\n\t* @param {boolean} isInit If is called at initialization\n\t* @private\n\t*/\n\tupdateSizes(isInit) {\n\t\tconst $$ = this;\n\t\tconst { config, state, $el: { legend } } = $$;\n\t\tconst isRotated = config.axis_rotated;\n\t\tconst isNonAxis = $$.hasArcType() || state.hasFunnel || state.hasTreemap;\n\t\tconst isFitPadding = config.padding?.mode === \"fit\";\n\t\t!isInit && $$.setContainerSize();\n\t\tconst legendWidth = legend ? $$.getLegendWidth() : 0;\n\t\tconst legendHeight = legend ? $$.getLegendHeight() : 0;\n\t\tconst currLegend = {\n\t\t\twidth: legendWidth,\n\t\t\theight: legendHeight\n\t\t};\n\t\tif (!isNonAxis && config.axis_x_show && config.axis_x_tick_autorotate) $$.updateXAxisTickClip();\n\t\tconst legendSize = {\n\t\t\tright: config.legend_show && state.isLegendRight ? legendWidth + (isFitPadding ? 0 : 20) : 0,\n\t\t\tbottom: !config.legend_show || state.isLegendRight || state.isLegendInset ? 0 : legendHeight\n\t\t};\n\t\tconst xAxisHeight = isRotated || isNonAxis ? 0 : $$.getHorizontalAxisHeight(\"x\");\n\t\tconst subchartXAxisHeight = config.subchart_axis_x_show && config.subchart_axis_x_tick_text_show ? xAxisHeight : 30;\n\t\tconst subchartHeight = config.subchart_show && !isNonAxis ? config.subchart_size_height + subchartXAxisHeight : 0;\n\t\tconst gaugeHeight = $$.hasType(\"gauge\") && config.arc_needle_show && !config.gauge_fullCircle && !config.gauge_label_show ? 10 : 0;\n\t\tconst padding = $$.getCurrentPadding(true);\n\t\tstate.margin = !isNonAxis && isRotated ? {\n\t\t\ttop: padding.top,\n\t\t\tright: isNonAxis ? 0 : padding.right + legendSize.right,\n\t\t\tbottom: legendSize.bottom + padding.bottom,\n\t\t\tleft: subchartHeight + (isNonAxis ? 0 : padding.left)\n\t\t} : {\n\t\t\ttop: (isFitPadding ? 0 : 4) + padding.top,\n\t\t\tright: isNonAxis ? 0 : padding.right + legendSize.right,\n\t\t\tbottom: gaugeHeight + subchartHeight + legendSize.bottom + padding.bottom,\n\t\t\tleft: isNonAxis ? 0 : padding.left\n\t\t};\n\t\tstate.margin = $$.getResettedPadding(state.margin);\n\t\tstate.margin2 = isRotated ? {\n\t\t\ttop: state.margin.top,\n\t\t\tright: NaN,\n\t\t\tbottom: 20 + legendSize.bottom,\n\t\t\tleft: $$.state.rotatedPadding.left\n\t\t} : {\n\t\t\ttop: state.current.height - subchartHeight - legendSize.bottom,\n\t\t\tright: NaN,\n\t\t\tbottom: subchartXAxisHeight + legendSize.bottom,\n\t\t\tleft: state.margin.left\n\t\t};\n\t\tstate.margin3 = {\n\t\t\ttop: 0,\n\t\t\tright: NaN,\n\t\t\tbottom: 0,\n\t\t\tleft: 0\n\t\t};\n\t\t$$.updateSizeForLegend?.(currLegend);\n\t\tstate.width = state.current.width - state.margin.left - state.margin.right;\n\t\tstate.height = state.current.height - state.margin.top - state.margin.bottom;\n\t\tif (state.width < 0) state.width = 0;\n\t\tif (state.height < 0) state.height = 0;\n\t\tstate.width2 = isRotated ? state.margin.left - state.rotatedPadding.left - state.rotatedPadding.right : state.width;\n\t\tstate.height2 = isRotated ? state.height : state.current.height - state.margin2.top - state.margin2.bottom;\n\t\tif (state.width2 < 0) state.width2 = 0;\n\t\tif (state.height2 < 0) state.height2 = 0;\n\t\tif ($$.hasArcType()) {\n\t\t\tconst hasGauge = $$.hasType(\"gauge\");\n\t\t\tconst isLegendRight = config.legend_show && state.isLegendRight;\n\t\t\tconst textWidth = (state.hasRadar && $$.cache.get(KEY.radarTextWidth)) ?? 0;\n\t\t\tstate.arcWidth = state.width - (isLegendRight ? currLegend.width + 10 : 0) - textWidth;\n\t\t\tstate.arcHeight = state.height - (isLegendRight && !hasGauge ? 0 : 10);\n\t\t\tif (config.arc_rangeText_values?.length) {\n\t\t\t\tif (hasGauge) {\n\t\t\t\t\tstate.arcWidth -= 25;\n\t\t\t\t\tstate.arcHeight -= 10;\n\t\t\t\t\tstate.margin.left += 10;\n\t\t\t\t} else {\n\t\t\t\t\tstate.arcHeight -= 20;\n\t\t\t\t\tstate.margin.top += 10;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (hasGauge && !config.gauge_fullCircle) state.arcHeight += state.height - $$.getPaddingBottomForGauge();\n\t\t\t$$.updateRadius?.();\n\t\t}\n\t\tif (state.isLegendRight && isNonAxis) state.margin3.left = state.arcWidth / 2 + state.radiusExpanded * 1.1;\n\t}\n};\n//#endregion\nexport { size_default as default };\n","/*!\n* Copyright (c) 2017 ~ present NAVER Corp.\r\n * billboard.js project is licensed under the MIT license\r\n * \r\n * billboard.js, JavaScript chart library\r\n * https://naver.github.io/billboard.js/\r\n * \r\n * @version 4.1.0\n*/\nimport { isFunction, isString } from \"../../module/util/type-checks.js\";\nimport { addCssRules } from \"../../module/util/dom.js\";\nimport { $SHAPE } from \"../../config/classes.js\";\n//#region src/ChartInternal/internals/style.ts\nvar style_default = {\n\t/**\n\t* Add props color css rule to given selector\n\t* @param {boolean} withShape Set shpes' prefix class\n\t* @param {string} selector CSS selector\n\t* @param {Array} props CSS props list\n\t* @param {function} propsFn Function to retrieve value or determine for props\n\t* @returns {function}\n\t* @private\n\t*/\n\tsetCssRule(withShape, selector, props, propsFn) {\n\t\tconst $$ = this;\n\t\tconst { config, state: { cssRule, style } } = $$;\n\t\treturn config.boost_useCssRule ? (selection) => {\n\t\t\tselection.each((d) => {\n\t\t\t\tconst res = propsFn && propsFn?.call($$, d);\n\t\t\t\tconst shapeSelector = `${withShape ? `.${$SHAPE.shapes + $$.getTargetSelectorSuffix(d.id)}` : \"\"}${selector}`;\n\t\t\t\tselector in cssRule && style.sheet.deleteRule(cssRule[shapeSelector]);\n\t\t\t\t$$.state.cssRule[shapeSelector] = addCssRules(style, shapeSelector, props.filter(Boolean).map((v) => isString(res) && v.indexOf(\":\") === -1 ? `${v}: ${res}` : v || \"\"));\n\t\t\t});\n\t\t} : () => {};\n\t},\n\t/**\n\t* Get style prop value\n\t* @param {function|string} v Value\n\t* @returns {string|null}\n\t* @private\n\t*/\n\tgetStylePropValue(v) {\n\t\tconst { config: { boost_useCssRule: useCssRule } } = this;\n\t\treturn useCssRule ? null : isFunction(v) ? v.bind(this) : v;\n\t}\n};\n//#endregion\nexport { style_default as default };\n","/*!\n* Copyright (c) 2017 ~ present NAVER Corp.\r\n * billboard.js project is licensed under the MIT license\r\n * \r\n * billboard.js, JavaScript chart library\r\n * https://naver.github.io/billboard.js/\r\n * \r\n * @version 4.1.0\n*/\nimport { isFunction, isNumber } from \"../../module/util/type-checks.js\";\nimport { parseShorthand, toMap, tplProcess } from \"../../module/util/object.js\";\nimport { getBBox, getBoundingRect } from \"../../module/util/dom.js\";\nimport { $TEXT } from \"../../config/classes.js\";\nimport { select } from \"d3-selection\";\n//#region src/ChartInternal/internals/text.util.ts\n/**\n* Copyright (c) 2017 ~ present NAVER Corp.\n* billboard.js project is licensed under the MIT license\n*/\n/**\n* Get text-anchor according text.labels.rotate angle\n* @param {number} angle Angle value\n* @returns {string} Anchor string value\n* @private\n*/\nfunction getRotateAnchor(angle) {\n\tlet anchor = \"middle\";\n\tif (angle > 0 && angle <= 170) anchor = \"end\";\n\telse if (angle > 190 && angle <= 360) anchor = \"start\";\n\treturn anchor;\n}\n/**\n* Set rotated position coordinate according text.labels.rotate angle\n* @param {object} d Data object\n* @param {object} pos Position object\n* @param {object} pos.x x coordinate\n* @param {object} pos.y y coordinate\n* @param {string} anchor string value\n* @param {boolean} isRotated If axis is rotated\n* @param {boolean} isInverted If axis is inverted\n* @returns {object} x, y coordinate\n* @private\n*/\nfunction setRotatePos(d, pos, anchor, isRotated, isInverted) {\n\tconst $$ = this;\n\tconst { value } = d;\n\tconst isCandlestickType = $$.isCandlestickType(d);\n\tconst isNegative = isNumber(value) && value < 0 || isCandlestickType && !$$.getCandlestickData(d)?._isUp;\n\tlet { x, y } = pos;\n\tconst gap = 4;\n\tconst doubleGap = 8;\n\tif (isRotated) {\n\t\tif (anchor === \"start\") {\n\t\t\tx += isNegative ? 0 : doubleGap;\n\t\t\ty += gap;\n\t\t} else if (anchor === \"middle\") {\n\t\t\tx += doubleGap;\n\t\t\ty -= doubleGap;\n\t\t} else if (anchor === \"end\") {\n\t\t\tisNegative && (x -= doubleGap);\n\t\t\ty += gap;\n\t\t}\n\t} else {\n\t\tif (anchor === \"start\") {\n\t\t\tx += gap;\n\t\t\tisNegative && (y += 16);\n\t\t} else if (anchor === \"middle\") y -= doubleGap;\n\t\telse if (anchor === \"end\") {\n\t\t\tx -= gap;\n\t\t\tisNegative && (y += 16);\n\t\t}\n\t\tif (isInverted) y += isNegative ? -17 : isCandlestickType ? 13 : 7;\n\t}\n\treturn {\n\t\tx,\n\t\ty\n\t};\n}\n/**\n* Get data.labels.position value\n* @param {object} d Data object\n* @param {string} type x | y\n* @returns {number} Position value\n* @private\n*/\nfunction getTextPos(d, type) {\n\tconst position = this.config.data_labels_position;\n\tconst { id, index, value } = d;\n\treturn (isFunction(position) ? position.bind(this.api)(type, value, id, index, this.$el.text) : (id in position ? position[id] : position)[type]) ?? 0;\n}\n/**\n* Update text border\n* @param {SVGTextElement} text Text element\n* @param {Coord} pos Position object\n* @param {string} rectClass Class name\n* @private\n*/\nfunction updateTextBorder(text, pos, rectClass) {\n\tconst { config, $T } = this;\n\tconst isRotated = config.axis_rotated;\n\tconst { border: { padding = \"3 5\", radius = 10, stroke = \"#000\", strokeWidth = 1, fill = \"none\" } } = config.data_labels;\n\tconst borderPadding = parseShorthand(padding);\n\tconst applyStyle = config.data_labels.border !== true;\n\tconst textRect = getBBox(text);\n\tlet borderRect = select(text.previousElementSibling);\n\tif (borderRect.empty() || borderRect.node()?.tagName !== \"rect\" || !borderRect.attr(\"class\")?.includes(rectClass)) {\n\t\tborderRect = select(text.parentNode).insert(\"rect\", () => text).attr(\"class\", `${$TEXT.textBorderRect} ${rectClass}`).attr(\"width\", textRect.width + (applyStyle ? borderPadding.left + borderPadding.right : 0)).attr(\"height\", textRect.height + (applyStyle ? borderPadding.top + borderPadding.bottom : 0));\n\t\tif (applyStyle) borderRect.style(\"fill\", fill).style(\"stroke\", stroke).style(\"stroke-width\", `${strokeWidth}px`).attr(\"rx\", radius).attr(\"ry\", radius);\n\t}\n\t$T(borderRect).attr(\"x\", pos.x - (applyStyle ? borderPadding.left : 0) - (isRotated ? 0 : textRect.width / 2)).attr(\"y\", pos.y - (applyStyle ? borderPadding.top : 0) - textRect.height / 4 * 3.2);\n}\n/**\n* Check if meets the ratio to show data label text\n* @param {number} ratio ratio to meet\n* @param {string} type chart type\n* @returns {boolean}\n* @private\n*/\nfunction meetsLabelThreshold(ratio = 0, type) {\n\tconst { config } = this;\n\treturn ratio >= (config[`${type}_label_threshold`] || 0);\n}\n/**\n* Update text image\n* @private\n*/\nfunction updateTextImage() {\n\tconst $$ = this;\n\tconst { $el: { text }, config } = $$;\n\tif ($$.state.arcWidth ? $$.getArcLabelConfig(\"image\") : config.data_labels.image) text.filter(function() {\n\t\tconst prev = this.previousElementSibling;\n\t\tif (prev) return prev.tagName !== \"image\" || !prev.classList.contains($TEXT.textLabelImage);\n\t\treturn true;\n\t}).each(function(d) {\n\t\tconst image = getDataLabelImgUrl.call($$, d);\n\t\tif (!image) return;\n\t\tconst { url, width, height, pos } = image;\n\t\tif (url) select(this.parentNode)?.insert(\"image\", `${this.getAttribute(\"class\")?.replace(/(?:^(.)|\\s)/g, \".$1\") ?? \"text\"}`).style(\"opacity\", \"0\").attr(\"href\", (d) => tplProcess(url, { ID: \"id\" in d ? d.id : d.data.id })).attr(\"class\", $TEXT.textLabelImage).style(\"pointer-events\", \"none\").attr(\"width\", width).attr(\"height\", height).attr(\"transform\", pos ? `translate(${pos.x ?? 0} ${pos.y ?? 0})` : null);\n\t});\n}\n/**\n* Get image URL for data label\n* @param {object} d Data object\n* @returns {string|null} Image URL\n* @private\n*/\nfunction getDataLabelImgUrl(d) {\n\tconst $$ = this;\n\tconst { config, state } = $$;\n\tconst image = state.arcWidth ? $$.getArcLabelConfig(\"image\") : config.data_labels.image;\n\tif (isFunction(image)) return image.call($$.api, d.value, d.id, d.index) ?? {\n\t\turl: \"\",\n\t\twidth: 0,\n\t\theight: 0,\n\t\tpos: {\n\t\t\tx: 0,\n\t\t\ty: 0\n\t\t}\n\t};\n\telse if (image) {\n\t\tconst { url = \"\", width = 0, height = 0, pos } = image;\n\t\treturn {\n\t\t\turl,\n\t\t\twidth,\n\t\t\theight,\n\t\t\tpos\n\t\t};\n\t}\n\treturn null;\n}\n/**\n* Update text image position\n* @param {SVGTextElement} textNode Text element\n* @param {object} pos Position object\n* @param {number} pos.x X coordinate\n* @param {number} pos.y Y coordinate\n* @param {DOMRect|SVGRect} textRect Optional cached text dimensions\n* @private\n*/\nfunction updateTextImagePos(textNode, pos, textRect) {\n\tconst $$ = this;\n\tconst { config, state: { arcWidth, hasTreemap } } = $$;\n\tconst isRotated = config.axis_rotated;\n\tconst image = select(textNode.previousElementSibling);\n\tconst isShown = (textNode) => {\n\t\treturn (arcWidth ? textNode.textContent : textNode.style.opacity !== \"0\" && textNode.style.fillOpacity !== \"0\") && this.previousElementSibling?.tagName !== \"image\";\n\t};\n\tif (!image.empty() && image.node()?.tagName === \"image\") {\n\t\tconst textDimension = textRect || getBoundingRect(textNode);\n\t\tconst w = +image.attr(\"width\") / 2;\n\t\tconst h = +image.attr(\"height\") / 2;\n\t\tlet x = pos.x - w;\n\t\tlet y = pos.y - h - textDimension.height / 2;\n\t\tif (isRotated) pos.x += w;\n\t\telse {\n\t\t\tif (hasTreemap) {\n\t\t\t\tx = -w;\n\t\t\t\ty = -(h * 2 + textDimension.height);\n\t\t\t}\n\t\t\tif (!($$.hasType(\"pie\") || $$.hasType(\"polar\"))) pos.y += h;\n\t\t}\n\t\t$$.$T(image).style(\"opacity\", isShown(textNode) ? null : \"0\").attr(\"x\", x).attr(\"y\", y);\n\t}\n}\n/**\n* Batch getBBox() calls to avoid layout thrashing\n* Collects all bbox calculations in a single read phase\n* @param {SVGTextElement[]} elements Array of text elements\n* @returns {Map<SVGTextElement, DOMRect>} Map of element to bbox\n* @private\n*/\nfunction batchGetBBox(elements) {\n\treturn toMap(elements, (element) => element, (element) => getBBox(element, true));\n}\n//#endregion\nexport { batchGetBBox, getRotateAnchor, getTextPos, meetsLabelThreshold, setRotatePos, updateTextBorder, updateTextImage, updateTextImagePos };\n","/*!\n* Copyright (c) 2017 ~ present NAVER Corp.\r\n * billboard.js project is licensed under the MIT license\r\n * \r\n * billboard.js, JavaScript chart library\r\n * https://naver.github.io/billboard.js/\r\n * \r\n * @version 4.1.0\n*/\nimport { isFunction, isNumber, isObject, isString } from \"../../module/util/type-checks.js\";\nimport { capitalize, getRandom } from \"../../module/util/object.js\";\nimport { getBBox, getBoundingRect, getElementPos, getTranslation, setTextValue } from \"../../module/util/dom.js\";\nimport { $COMMON, $TEXT } from \"../../config/classes.js\";\nimport { KEY } from \"../../module/Cache.js\";\nimport { batchGetBBox, getRotateAnchor, getTextPos, meetsLabelThreshold, setRotatePos, updateTextBorder, updateTextImage, updateTextImagePos } from \"./text.util.js\";\nimport { select, selectAll } from \"d3-selection\";\n//#region src/ChartInternal/internals/text.ts\n/**\n* Copyright (c) 2017 ~ present NAVER Corp.\n* billboard.js project is licensed under the MIT license\n*/\nvar text_default = {\n\topacityForText(d) {\n\t\tconst $$ = this;\n\t\treturn $$.isBarType(d) && !meetsLabelThreshold.call($$, Math.abs($$.getRatio(\"bar\", d)), \"bar\") ? \"0\" : $$.hasDataLabel() ? null : \"0\";\n\t},\n\t/**\n\t* Initializes the text\n\t* @private\n\t*/\n\tinitText() {\n\t\tconst { $el } = this;\n\t\t$el.main.select(`.${$COMMON.chart}`).append(\"g\").attr(\"class\", $TEXT.chartTexts).style(\"pointer-events\", $el.funnel || $el.treemap ? \"none\" : null);\n\t},\n\t/**\n\t* Update chartText\n\t* @param {object} targets $$.data.targets\n\t* @private\n\t*/\n\tupdateTargetsForText(targets) {\n\t\tconst $$ = this;\n\t\tconst classChartText = $$.getChartClass(\"Text\");\n\t\tconst classTexts = $$.getClass(\"texts\", \"id\");\n\t\tconst classFocus = $$.classFocus.bind($$);\n\t\t$$.$el.main.select(`.${$TEXT.chartTexts}`).selectAll(`.${$TEXT.chartText}`).data($$.filterNullish(targets)).attr(\"class\", (d) => `${classChartText(d)}${classFocus(d)}`.trim()).enter().append(\"g\").style(\"opacity\", \"0\").attr(\"class\", classChartText).call($$.setCssRule(true, ` .${$TEXT.text}`, [\"fill\", \"pointer-events:none\"], $$.updateTextColor)).append(\"g\").attr(\"class\", classTexts);\n\t},\n\t/**\n\t* Update text\n\t* @private\n\t*/\n\tupdateText() {\n\t\tconst $$ = this;\n\t\tconst { $el, $T, config, axis } = $$;\n\t\tconst classText = $$.getClass(\"text\", \"index\");\n\t\tconst labelsCentered = config.data_labels.centered;\n\t\tconst text = $el.main.selectAll(`.${$TEXT.texts}`).selectAll(`.${$TEXT.text}`).data($$.labelishData.bind($$));\n\t\t$T(text.exit()).style(\"fill-opacity\", \"0\").remove();\n\t\t$el.text = text.enter().append(\"text\").merge(text).attr(\"class\", classText).attr(\"text-anchor\", (d) => {\n\t\t\tlet isEndAnchor = config[`axis_${axis?.getId(d.id)}_inverted`] ? d.value > 0 : d.value < 0;\n\t\t\tif ($$.isCandlestickType(d)) isEndAnchor = !$$.getCandlestickData(d)?._isUp;\n\t\t\telse if ($$.isTreemapType(d)) return labelsCentered ? \"middle\" : \"start\";\n\t\t\treturn config.axis_rotated ? isEndAnchor ? \"end\" : \"start\" : \"middle\";\n\t\t}).style(\"fill\", $$.getStylePropValue($$.updateTextColor)).style(\"fill-opacity\", \"0\").each(function(d, i, texts) {\n\t\t\tconst node = select(this);\n\t\t\tlet { value } = d;\n\t\t\tif ($$.isBubbleZType(d)) value = $$.getBubbleZData(value, \"z\");\n\t\t\telse if ($$.isCandlestickType(d)) {\n\t\t\t\tconst data = $$.getCandlestickData(d);\n\t\t\t\tif (data) value = data.close;\n\t\t\t}\n\t\t\tvalue = $$.isTreemapType(d) ? $$.treemapDataLabelFormat(d)(node) : $$.dataLabelFormat(d.id)(value, d.id, d.index, texts);\n\t\t\tif (isNumber(value)) this.textContent = value;\n\t\t\telse setTextValue(node, value, void 0, true);\n\t\t});\n\t\tupdateTextImage.call($$);\n\t},\n\tupdateTextColor(d) {\n\t\tconst $$ = this;\n\t\tconst { config } = $$;\n\t\tconst labelColors = config.data_labels_colors;\n\t\tconst defaultColor = $$.isArcType(d) && !$$.isRadarType(d) || $$.isFunnelType(d) || $$.isTreemapType(d) ? null : $$.color(d);\n\t\tlet color;\n\t\tif (isString(labelColors)) color = labelColors;\n\t\telse if (isObject(labelColors)) {\n\t\t\tconst { id } = d.data || d;\n\t\t\tcolor = labelColors[id];\n\t\t} else if (isFunction(labelColors)) color = labelColors.bind($$.api)(defaultColor, d);\n\t\tif ($$.isCandlestickType(d) && !isFunction(labelColors)) {\n\t\t\tif (!$$.getCandlestickData(d)?._isUp) {\n\t\t\t\tconst downColor = config.candlestick_color_down;\n\t\t\t\tcolor = isObject(downColor) ? downColor[d.id] : downColor;\n\t\t\t}\n\t\t}\n\t\treturn color || defaultColor;\n\t},\n\t/**\n\t* Update data label text background color\n\t* @param {object} d Data object\n\t* @param {object|string|function} option option object\n\t* @returns {string|null}\n\t* @private\n\t*/\n\tupdateTextBGColor(d, option) {\n\t\tconst $$ = this;\n\t\tconst { $el: { defs } } = $$;\n\t\tlet color = \"\";\n\t\tif (option) {\n\t\t\tconst id = isString(option) ? \"\" : $$.getTargetSelectorSuffix(\"id\" in d ? d.id : d.data.id);\n\t\t\tconst filter = defs.select([\"filter[id*='labels-bg\", \"']\"].join(id));\n\t\t\tif (filter.size()) color = `url(#${filter.attr(\"id\")})`;\n\t\t\tif (isFunction(option)) {\n\t\t\t\t$$.generateTextBGColorFilter(option);\n\t\t\t\tconst defaultColor = $$.color(d);\n\t\t\t\tconst bgColor = option.bind($$.api)(defaultColor, d);\n\t\t\t\tif (bgColor) filter.select(\"feFlood\").attr(\"flood-color\", bgColor);\n\t\t\t\telse color = \"\";\n\t\t\t}\n\t\t}\n\t\treturn color || null;\n\t},\n\t/**\n\t* Redraw chartText\n\t* @param {function} getX Positioning function for x\n\t* @param {function} getY Positioning function for y\n\t* @param {boolean} forFlow Weather is flow\n\t* @param {boolean} withTransition transition is enabled\n\t* @returns {Array}\n\t* @private\n\t*/\n\tredrawText(getX, getY, forFlow, withTransition) {\n\t\tconst $$ = this;\n\t\tconst { $T, axis, config, state: { hasTreemap } } = $$;\n\t\tconst t = getRandom(true);\n\t\tconst isRotated = config.axis_rotated;\n\t\tconst angle = config.data_labels.rotate;\n\t\tconst anchorString = getRotateAnchor(angle);\n\t\tconst rotateString = angle ? `rotate(${angle})` : \"\";\n\t\tconst text = $$.$el.text.style(\"fill\", $$.getStylePropValue($$.updateTextColor)).attr(\"filter\", (d) => $$.updateTextBGColor.bind($$)(d, config.data_labels_backgroundColors)).style(\"fill-opacity\", forFlow ? 0 : $$.opacityForText.bind($$));\n\t\tconst dimensions = /* @__PURE__ */ new Map();\n\t\tconst elementsToMeasure = [];\n\t\ttext.each(function(d) {\n\t\t\tconst element = this;\n\t\t\tdimensions.set(element, { rect: getBoundingRect(element) });\n\t\t\tif (config.data_labels.centered && ($$.isBarType(d) || $$.isTreemapType(d))) elementsToMeasure.push(element);\n\t\t});\n\t\tif (elementsToMeasure.length > 0) batchGetBBox(elementsToMeasure).forEach((bbox, element) => {\n\t\t\tconst dimension = dimensions.get(element);\n\t\t\tdimension && (dimension.bbox = bbox);\n\t\t});\n\t\ttext.each(function(d, i) {\n\t\t\tconst labelDimension = dimensions.get(this);\n\t\t\tconst node = $T(hasTreemap && this.childElementCount ? this.parentNode : this, !!(withTransition && (this.getAttribute(\"x\") || this.getAttribute(\"transform\"))), t);\n\t\t\tconst isInverted = config[`axis_${axis?.getId(d.id)}_inverted`];\n\t\t\tlet pos = {\n\t\t\t\tx: getX.call(this, d, i, labelDimension),\n\t\t\t\ty: getY.call(this, d, i, labelDimension)\n\t\t\t};\n\t\t\tif (angle) {\n\t\t\t\tpos = setRotatePos.bind($$)(d, pos, anchorString, isRotated, isInverted);\n\t\t\t\tnode.attr(\"text-anchor\", anchorString);\n\t\t\t}\n\t\t\tupdateTextImagePos.call($$, this, pos, labelDimension?.rect);\n\t\t\tif (this.childElementCount || angle) node.attr(\"transform\", `translate(${pos.x} ${pos.y}) ${rotateString}`);\n\t\t\telse node.attr(\"x\", pos.x).attr(\"y\", pos.y);\n\t\t\tconfig.data_labels.border && updateTextBorder.call($$, node.node(), pos, `${$TEXT.textBorderRect}-${i}`);\n\t\t});\n\t\treturn true;\n\t},\n\t/**\n\t* Gets the getBoundingClientRect value of the element\n\t* @param {HTMLElement|d3.selection|Array} source Target element\n\t* @param {string} className Class name\n\t* @returns {object} value of element.getBoundingClientRect()\n\t* @private\n\t*/\n\tgetTextRect(source, className) {\n\t\tconst $$ = this;\n\t\tlet cacheKey;\n\t\tlet base;\n\t\tlet text;\n\t\tif (Array.isArray(source)) cacheKey = `${KEY.textRect}-${source.join(\"_\")}`;\n\t\telse {\n\t\t\tbase = source.node?.() ?? source;\n\t\t\tif (!/text/i.test(base.tagName)) base = base.querySelector(\"text\");\n\t\t\ttext = base.textContent;\n\t\t\tcacheKey = `${KEY.textRect}-${text.replace(/\\W/g, \"_\")}`;\n\t\t}\n\t\tconst rect = $$.cache.get(cacheKey) || [];\n\t\tif (rect.length === 0) {\n\t\t\t($$.$el.svg || $$.$el.chart.select(\"svg\")).selectAll(`.${$COMMON.dummy}`).data(text ? [text] : source).enter().append(\"text\").style(\"visibility\", \"hidden\").style(\"font\", base ? select(base).style(\"font\") : null).classed(className || $COMMON.dummy, true).text((d) => d).each(function(v, i) {\n\t\t\t\trect[i] = getBoundingRect(this);\n\t\t\t}).remove();\n\t\t\t$$.cache.add(cacheKey, rect);\n\t\t}\n\t\treturn rect.length > 1 ? rect : rect[0];\n\t},\n\t/**\n\t* Gets the x or y coordinate of the text\n\t* @param {object} indices Indices values\n\t* @param {boolean} forX whether or not to x\n\t* @returns {function} coordinates\n\t* @private\n\t*/\n\tgenerateXYForText(indices, forX) {\n\t\tconst $$ = this;\n\t\tconst { state: { hasRadar, hasFunnel, hasTreemap } } = $$;\n\t\tconst types = Object.keys(indices);\n\t\tconst points = {};\n\t\tconst getter = forX ? $$.getXForText : $$.getYForText;\n\t\thasFunnel && types.push(\"funnel\");\n\t\thasRadar && types.push(\"radar\");\n\t\thasTreemap && types.push(\"treemap\");\n\t\ttypes.forEach((v) => {\n\t\t\tpoints[v] = $$[`generateGet${capitalize(v)}Points`](indices[v], false);\n\t\t});\n\t\treturn function(d, i, labelDimension) {\n\t\t\tconst type = $$.isAreaType(d) && \"area\" || $$.isBarType(d) && \"bar\" || $$.isCandlestickType(d) && \"candlestick\" || $$.isFunnelType(d) && \"funnel\" || $$.isRadarType(d) && \"radar\" || $$.isTreemapType(d) && \"treemap\" || \"line\";\n\t\t\treturn getter.call($$, points[type](d, i), d, this, labelDimension);\n\t\t};\n\t},\n\t/**\n\t* Get centerized text position for bar type data.label.text\n\t* @param {object} d Data object\n\t* @param {Array} points Data points position\n\t* @param {HTMLElement} textElement Data label text element\n\t* @param {string} type 'x' or 'y'\n\t* @param {object} labelDimension Optional cached label dimensions\n\t* @returns {number} Position value\n\t* @private\n\t*/\n\tgetCenteredTextPos(d, points, textElement, type, labelDimension) {\n\t\tconst $$ = this;\n\t\tconst { config } = $$;\n\t\tconst isRotated = config.axis_rotated;\n\t\tconst isBarType = $$.isBarType(d);\n\t\tconst isTreemapType = $$.isTreemapType(d);\n\t\tif (config.data_labels.centered && (isBarType || isTreemapType)) {\n\t\t\tconst rect = labelDimension?.bbox || getBBox(textElement);\n\t\t\tif (isBarType) {\n\t\t\t\tconst isPositive = $$.getRangedData(d, null, \"bar\") >= 0;\n\t\t\t\tif (isRotated) {\n\t\t\t\t\tconst w = (isPositive ? points[1][1] - points[0][1] : points[0][1] - points[1][1]) / 2 + rect.width / 2;\n\t\t\t\t\treturn isPositive ? -w - 3 : w + 2;\n\t\t\t\t} else {\n\t\t\t\t\tconst h = (isPositive ? points[0][1] - points[1][1] : points[1][1] - points[0][1]) / 2 + rect.height / 2;\n\t\t\t\t\treturn isPositive ? h : -h - 2;\n\t\t\t\t}\n\t\t\t} else if (isTreemapType) return type === \"x\" ? (points[1][0] - points[0][0]) / 2 : (points[1][1] - points[0][1]) / 2 - rect.y - rect.height / 2;\n\t\t}\n\t\treturn 0;\n\t},\n\t/**\n\t* Gets the x coordinate of the text\n\t* @param {object} points Data points position\n\t* @param {object} d Data object\n\t* @param {HTMLElement} textElement Data label text element\n\t* @param {object} labelDimension Optional cached label dimensions\n\t* @returns {number} x coordinate\n\t* @private\n\t*/\n\tgetXForText(points, d, textElement, labelDimension) {\n\t\tconst $$ = this;\n\t\tconst { config } = $$;\n\t\tconst isRotated = config.axis_rotated;\n\t\tconst isFunnelType = $$.isFunnelType(d);\n\t\tconst isTreemapType = $$.isTreemapType(d);\n\t\tlet xPos = points ? points[0][0] : 0;\n\t\tif ($$.isCandlestickType(d)) {\n\t\t\tif (isRotated) xPos = $$.getCandlestickData(d)?._isUp ? points[2][2] + 4 : points[2][1] - 4;\n\t\t\telse xPos += (points[1][0] - xPos) / 2;\n\t\t} else if (isFunnelType) {\n\t\t\tif (points) xPos = points[2]?.[0] ?? xPos;\n\t\t\telse return getElementPos(textElement, \"x\");\n\t\t} else if (isTreemapType) xPos += config.data_labels.centered ? 0 : 5;\n\t\telse if (isRotated) {\n\t\t\tconst isInverted = config[`axis_${$$.axis.getId(d.id)}_inverted`];\n\t\t\tconst padding = $$.isBarType(d) ? 4 : 6;\n\t\t\tconst value = d.value;\n\t\t\txPos = points[2][1];\n\t\t\txPos += padding * ((isInverted ? value > 0 : value < 0) ? -1 : 1);\n\t\t} else xPos = $$.hasType(\"bar\") ? (points[2][0] + points[0][0]) / 2 : xPos;\n\t\tif (isRotated || isTreemapType || isFunnelType) xPos += $$.getCenteredTextPos(d, points, textElement, \"x\", labelDimension);\n\t\treturn xPos + getTextPos.call(this, d, \"x\");\n\t},\n\t/**\n\t* Gets the y coordinate of the text\n\t* @param {object} points Data points position\n\t* @param {object} d Data object\n\t* @param {HTMLElement} textElement Data label text element\n\t* @param {object} labelDimension Optional cached label dimensions\n\t* @returns {number} y coordinate\n\t* @private\n\t*/\n\tgetYForText(points, d, textElement, labelDimension) {\n\t\tconst $$ = this;\n\t\tconst { axis, config, state } = $$;\n\t\tconst isRotated = config.axis_rotated;\n\t\tconst isInverted = config[`axis_${axis?.getId(d.id)}_inverted`];\n\t\tconst isBarType = $$.isBarType(d);\n\t\tconst isFunnelType = $$.isFunnelType(d);\n\t\tconst isTreemapType = $$.isTreemapType(d);\n\t\tconst r = config.point_r;\n\t\tconst rect = labelDimension?.rect || getBoundingRect(textElement);\n\t\tlet { value } = d;\n\t\tlet baseY = 3;\n\t\tlet yPos;\n\t\tif ($$.isCandlestickType(d)) {\n\t\t\tvalue = $$.getCandlestickData(d);\n\t\t\tif (isRotated) {\n\t\t\t\tyPos = points[0][0];\n\t\t\t\tyPos += (points[1][0] - yPos) / 2 + baseY;\n\t\t\t} else {\n\t\t\t\tyPos = value && value._isUp ? points[2][2] - baseY : points[2][1] + baseY * 4;\n\t\t\t\tif (isInverted) yPos += 15 * (value._isUp ? 1 : -1);\n\t\t\t}\n\t\t} else if (isFunnelType) {\n\t\t\tif (points) yPos = (points[2]?.[1] ?? points[0][1]) + rect.height / 2 - 3;\n\t\t\telse return getElementPos(textElement, \"y\");\n\t\t} else if (isTreemapType) yPos = points[0][1] + (config.data_labels.centered ? 0 : rect.height + 5);\n\t\telse if (isRotated) yPos = (points[0][0] + points[2][0] + rect.height * .6) / 2;\n\t\telse {\n\t\t\tyPos = points[2][1];\n\t\t\tif (isNumber(r) && r > 5 && ($$.isLineType(d) || $$.isScatterType(d))) baseY += config.point_r / 2.3;\n\t\t\tif (value < 0 || value === 0 && !state.hasPositiveValue && state.hasNegativeValue) yPos += isInverted ? isBarType ? -3 : -5 : rect.height + (isBarType ? -baseY : baseY);\n\t\t\telse {\n\t\t\t\tlet diff = -baseY * 2;\n\t\t\t\tif (isBarType) diff = -baseY;\n\t\t\t\telse if ($$.isBubbleType(d)) diff = baseY;\n\t\t\t\tif (isInverted) diff = isBarType ? 10 : 15;\n\t\t\t\tyPos += diff;\n\t\t\t}\n\t\t}\n\t\tif (!isRotated || isTreemapType) yPos += $$.getCenteredTextPos(d, points, textElement, \"y\", labelDimension);\n\t\treturn yPos + getTextPos.call(this, d, \"y\");\n\t},\n\t/**\n\t* Calculate if two or more text nodes are overlapping\n\t* Mark overlapping text nodes with \"text-overlapping\" class\n\t* @param {string} id Axis id\n\t* @param {ChartInternal} $$ ChartInternal context\n\t* @param {string} selector Selector string\n\t* @private\n\t*/\n\tmarkOverlapped(id, $$, selector) {\n\t\tconst textNodes = $$.$el.arcs.selectAll(selector);\n\t\tconst filteredTextNodes = textNodes.filter((node) => node.data.id !== id);\n\t\tconst textNode = textNodes.filter((node) => node.data.id === id);\n\t\tconst translate = getTranslation(textNode.node());\n\t\tconst calcHypo = (x, y) => Math.sqrt(x * x + y * y);\n\t\tif (!textNode.node()) return;\n\t\tconst fontSize = parseInt(textNode.style(\"font-size\"), 10);\n\t\tconst overlapStates = [];\n\t\tfilteredTextNodes.each(function() {\n\t\t\tconst coordinate = getTranslation(this);\n\t\t\tconst nodeForWidth = calcHypo(translate.e, translate.f) > calcHypo(coordinate.e, coordinate.f) ? textNode : select(this);\n\t\t\tconst overlapsX = Math.ceil(Math.abs(translate.e - coordinate.e)) < Math.ceil(nodeForWidth.node().getComputedTextLength());\n\t\t\tconst overlapsY = Math.ceil(Math.abs(translate.f - coordinate.f)) < fontSize;\n\t\t\toverlapStates.push({\n\t\t\t\tnode: this,\n\t\t\t\toverlaps: overlapsX && overlapsY\n\t\t\t});\n\t\t});\n\t\toverlapStates.forEach(({ node, overlaps }) => {\n\t\t\tselect(node).classed($TEXT.TextOverlapping, overlaps);\n\t\t});\n\t},\n\t/**\n\t* Calculate if two or more text nodes are overlapping\n\t* Remove \"text-overlapping\" class on selected text nodes\n\t* @param {ChartInternal} $$ ChartInternal context\n\t* @param {string} selector Selector string\n\t* @private\n\t*/\n\tundoMarkOverlapped($$, selector) {\n\t\t$$.$el.arcs.selectAll(selector).each(function() {\n\t\t\tselectAll([this, this.previousSibling]).classed($TEXT.TextOverlapping, false);\n\t\t});\n\t}\n};\n//#endregion\nexport { text_default as default };\n","/*!\n* Copyright (c) 2017 ~ present NAVER Corp.\r\n * billboard.js project is licensed under the MIT license\r\n * \r\n * billboard.js, JavaScript chart library\r\n * https://naver.github.io/billboard.js/\r\n * \r\n * @version 4.1.0\n*/\nimport { isNumber } from \"../../module/util/type-checks.js\";\nimport { getBBox, getBoundingRect, getElementPos, setTextValue } from \"../../module/util/dom.js\";\nimport { $TEXT } from \"../../config/classes.js\";\n//#region src/ChartInternal/internals/title.ts\n/**\n* Copyright (c) 2017 ~ present NAVER Corp.\n* billboard.js project is licensed under the MIT license\n*/\n/**\n* Get the text position\n* @param {string} pos right, left or center\n* @param {number} width chart width\n* @returns {string|number} text-anchor value or position in pixel\n* @private\n*/\nfunction _getTextXPos(pos = \"left\", width) {\n\tconst isNum = isNumber(width);\n\tif (pos.includes(\"center\")) return isNum ? width / 2 : \"middle\";\n\tif (pos.includes(\"right\")) return isNum ? width : \"end\";\n\treturn isNum ? 0 : \"start\";\n}\n/**\n* Get estimated canvas title height.\n* @param {object} $$ ChartInternal instance\n* @returns {number} Title height\n* @private\n*/\nfunction _getCanvasTitleHeight($$) {\n\tconst { config, $el } = $$;\n\tconst font = $$.canvasTheme?.style?.title?.font || $$.canvasTheme?.style?.label?.font || \"14px sans-serif\";\n\tconst chart = $el.chart?.node?.();\n\tconst doc = chart?.ownerDocument;\n\tif (chart && doc && config.title_text) {\n\t\tconst svg = doc.createElementNS(\"http://www.w3.org/2000/svg\", \"svg\");\n\t\tconst text = doc.createElementNS(\"http://www.w3.org/2000/svg\", \"text\");\n\t\tsvg.style.cssText = \"position:absolute;visibility:hidden;left:-10000px;top:-10000px;\";\n\t\ttext.setAttribute(\"class\", $TEXT.title);\n\t\ttext.style.font = font;\n\t\ttext.textContent = String(config.title_text);\n\t\tsvg.appendChild(text);\n\t\tchart.appendChild(svg);\n\t\tconst height = getBoundingRect(text).height;\n\t\tsvg.remove();\n\t\tif (height) return height;\n\t}\n\treturn config.title_text ? parseFloat(font) || 14 : 0;\n}\nvar title_default = {\n\t/**\n\t* Initializes the title\n\t* @private\n\t*/\n\tinitTitle() {\n\t\tconst { config, $el } = this;\n\t\tif (config.title_text) {\n\t\t\t$el.title = $el.svg.append(\"g\");\n\t\t\tconst text = $el.title.append(\"text\").style(\"text-anchor\", _getTextXPos(config.title_position)).attr(\"class\", $TEXT.title);\n\t\t\tsetTextValue(text, config.title_text, [.3, 1.5]);\n\t\t}\n\t},\n\t/**\n\t* Redraw title\n\t* @private\n\t*/\n\tredrawTitle() {\n\t\tconst $$ = this;\n\t\tconst { config, state: { current }, $el: { title } } = $$;\n\t\tif (title) {\n\t\t\tconst x = _getTextXPos(config.title_position, current.width);\n\t\t\tconst y = (config.title_padding.top || 0) + $$.getTextRect($$.$el.title, $TEXT.title).height;\n\t\t\ttitle.attr(\"transform\", `translate(${x}, ${y})`);\n\t\t}\n\t},\n\t/**\n\t* Get canvas title height using the same SVG text measurement as title padding.\n\t* @returns {number} Title height\n\t* @private\n\t*/\n\tgetCanvasTitleHeight() {\n\t\treturn _getCanvasTitleHeight(this);\n\t},\n\t/**\n\t* Get title padding\n\t* @returns {number} padding value\n\t* @private\n\t*/\n\tgetTitlePadding() {\n\t\tconst $$ = this;\n\t\tconst { $el: { title }, config, state } = $$;\n\t\tconst paddingTop = config.title_padding.top || 0;\n\t\tconst paddingBottom = config.title_padding.bottom || 0;\n\t\tif (state.isCanvasMode && config.title_text) return paddingTop + $$.getCanvasTitleHeight() + paddingBottom;\n\t\tif (!title?.node()) return paddingTop + paddingBottom;\n\t\tconst titleNode = title.node();\n\t\tconst translateY = getElementPos(titleNode, \"y\");\n\t\tif (translateY) {\n\t\t\tconst bbox = getBBox(titleNode);\n\t\t\treturn translateY + bbox.y + bbox.height + paddingBottom;\n\t\t}\n\t\treturn paddingTop + $$.getTextRect(title, $TEXT.title).height + paddingBottom;\n\t}\n};\n//#endregion\nexport { title_default as default };\n","/*!\n* Copyright (c) 2017 ~ present NAVER Corp.\r\n * billboard.js project is licensed under the MIT license\r\n * \r\n * billboard.js, JavaScript chart library\r\n * https://naver.github.io/billboard.js/\r\n * \r\n * @version 4.1.0\n*/\nimport { document as doc } from \"../../module/browser.js\";\nimport { isEmpty, isFunction, isObject, isString, isUndefined, isValue } from \"../../module/util/type-checks.js\";\nimport { sanitize } from \"../../module/sanitize.js\";\nimport { callFn, parseDate, tplProcess } from \"../../module/util/object.js\";\nimport { getBoundingRect, getPointer, getTransformCTM, hasViewBox } from \"../../module/util/dom.js\";\nimport { $ARC, $TOOLTIP } from \"../../config/classes.js\";\nimport { select } from \"d3-selection\";\n//#region src/ChartInternal/internals/tooltip.ts\n/**\n* Copyright (c) 2017 ~ present NAVER Corp.\n* billboard.js project is licensed under the MIT license\n*/\nconst RE_WHITESPACE = /(\\r?\\n|\\t)/g;\nconst RE_TOOLTIP_TPL = /{{(.*)}}/;\nvar tooltip_default = {\n\t/**\n\t* Initializes the tooltip\n\t* @private\n\t*/\n\tinitTooltip() {\n\t\tconst $$ = this;\n\t\tconst { config, $el } = $$;\n\t\t$el.tooltip = select(config.tooltip_contents.bindto);\n\t\tif ($el.tooltip.empty()) $el.tooltip = $el.chart.append(\"div\").attr(\"class\", $TOOLTIP.tooltipContainer).style(\"position\", \"absolute\").style(\"pointer-events\", \"none\").style(\"display\", \"none\");\n\t\t$$.bindTooltipResizePos();\n\t},\n\t/**\n\t* Show tooltip at initialization.\n\t* Is called only when tooltip.init.show=true option is set\n\t* @private\n\t*/\n\tinitShowTooltip() {\n\t\tconst $$ = this;\n\t\tconst { config, $el, state: { hasAxis, hasRadar } } = $$;\n\t\tif (config.tooltip_init_show) {\n\t\t\tconst isArc = !(hasAxis || hasRadar);\n\t\t\tif ($$.axis?.isTimeSeries() && isString(config.tooltip_init_x)) config.tooltip_init_x = parseDate.call($$, config.tooltip_init_x);\n\t\t\t$$.api.tooltip.show({ data: { [isArc ? \"index\" : \"x\"]: config.tooltip_init_x } });\n\t\t\tconst position = config.tooltip_init_position;\n\t\t\tif (!config.tooltip_contents.bindto && !isEmpty(position)) {\n\t\t\t\tconst { top = 0, left = 50 } = position;\n\t\t\t\t$el.tooltip.style(\"top\", isString(top) ? top : `${top}px`).style(\"left\", isString(left) ? left : `${left}px`).style(\"display\", null);\n\t\t\t}\n\t\t}\n\t},\n\t/**\n\t* Get the tooltip HTML string\n\t* @param {Array} args Arguments\n\t* @returns {string} Formatted HTML string\n\t* @private\n\t*/\n\tgetTooltipHTML(...args) {\n\t\tconst $$ = this;\n\t\tconst { api, config } = $$;\n\t\treturn sanitize(isFunction(config.tooltip_contents) ? config.tooltip_contents.bind(api)(...args) : $$.getTooltipContent(...args));\n\t},\n\t/**\n\t* Returns the tooltip content(HTML string)\n\t* @param {object} d data\n\t* @param {function} defaultTitleFormat Default title format\n\t* @param {function} defaultValueFormat Default format for each data value in the tooltip.\n\t* @param {function} color Color function\n\t* @returns {string} html\n\t* @private\n\t*/\n\tgetTooltipContent(d, defaultTitleFormat, defaultValueFormat, color) {\n\t\tconst $$ = this;\n\t\tconst { api, config, state, $el } = $$;\n\t\tconst titleFn = config.tooltip_format_title;\n\t\tconst nameFn = config.tooltip_format_name;\n\t\tconst valueFn = config.tooltip_format_value;\n\t\tconst titleFormat = isFunction(titleFn) ? titleFn.bind(api) : defaultTitleFormat;\n\t\tconst nameFormat = isFunction(nameFn) ? nameFn.bind(api) : ((name) => name);\n\t\tconst boundValueFn = isFunction(valueFn) ? valueFn.bind(api) : null;\n\t\tconst valueFormat = (v, ratio, id, index) => {\n\t\t\tlet fn = boundValueFn;\n\t\t\tif (!fn) {\n\t\t\t\tif (state.hasTreemap || $$.isStackNormalized() && (!$$.isStackNormalizedPerGroup() || $$.isGrouped(id))) fn = (v, ratio) => `${(ratio * 100).toFixed(2)}%`;\n\t\t\t\telse fn = defaultValueFormat;\n\t\t\t}\n\t\t\treturn fn(v, ratio, id, index);\n\t\t};\n\t\tconst order = config.tooltip_order;\n\t\tconst getRowValue = (row) => $$.axis && $$.isBubbleZType(row) ? $$.getBubbleZData(row.value, \"z\") : $$.getBaseValue(row);\n\t\tconst getBgColor = $$.levelColor ? (row) => $$.levelColor(row.value) : (row) => color(row);\n\t\tconst contents = config.tooltip_contents;\n\t\tconst tplStr = contents.template;\n\t\tconst targetIds = $$.mapToTargetIds();\n\t\tif (order === null && config.data_groups.length) {\n\t\t\tconst ids = $$.orderTargets($$.data.targets).map((i2) => i2.id).reverse();\n\t\t\td.sort((a, b) => {\n\t\t\t\tlet v1 = a ? a.value : null;\n\t\t\t\tlet v2 = b ? b.value : null;\n\t\t\t\tif (v1 > 0 && v2 > 0) {\n\t\t\t\t\tv1 = a.id ? ids.indexOf(a.id) : null;\n\t\t\t\t\tv2 = b.id ? ids.indexOf(b.id) : null;\n\t\t\t\t}\n\t\t\t\treturn v1 - v2;\n\t\t\t});\n\t\t} else if (/^(asc|desc)$/.test(order)) {\n\t\t\tconst isAscending = order === \"asc\";\n\t\t\td.sort((a, b) => {\n\t\t\t\tconst v1 = a ? getRowValue(a) : null;\n\t\t\t\tconst v2 = b ? getRowValue(b) : null;\n\t\t\t\treturn isAscending ? v1 - v2 : v2 - v1;\n\t\t\t});\n\t\t} else if (isFunction(order)) d.sort(order.bind(api));\n\t\tconst tpl = $$.getTooltipContentTemplate(tplStr);\n\t\tconst len = d.length;\n\t\tlet text;\n\t\tlet row;\n\t\tlet param;\n\t\tlet value;\n\t\tlet i = 0;\n\t\tfor (; i < len; i++) {\n\t\t\trow = d[i];\n\t\t\tconst rowValue = row && getRowValue(row);\n\t\t\tif (!row || !(rowValue || rowValue === 0)) continue;\n\t\t\tif (isUndefined(text)) {\n\t\t\t\tconst title = (state.hasAxis || state.hasRadar) && titleFormat(row.x);\n\t\t\t\ttext = tplProcess(tpl[0], {\n\t\t\t\t\tCLASS_TOOLTIP: $TOOLTIP.tooltip,\n\t\t\t\t\tTITLE: isValue(title) ? tplStr ? title : `<tr><th colspan=\"2\">${title}</th></tr>` : \"\"\n\t\t\t\t});\n\t\t\t}\n\t\t\tif (!row.ratio && $el.arcs) {\n\t\t\t\tparam = [\"arc\", $$.$el.arcs.select(`path.${$ARC.arc}-${row.id}`).data()[0]];\n\t\t\t\trow.ratio = $$.getRatio(...param);\n\t\t\t}\n\t\t\tparam = [\n\t\t\t\trow.ratio,\n\t\t\t\trow.id,\n\t\t\t\trow.index\n\t\t\t];\n\t\t\tif ($$.isAreaRangeType(row)) {\n\t\t\t\tconst [high, low] = [\"high\", \"low\"].map((v) => valueFormat($$.getRangedData(row, v), ...param));\n\t\t\t\tvalue = `<b>Mid:</b> ${valueFormat(getRowValue(row), ...param)} <b>High:</b> ${high} <b>Low:</b> ${low}`;\n\t\t\t} else if ($$.isCandlestickType(row)) {\n\t\t\t\tconst [open, high, low, close, volume] = [\n\t\t\t\t\t\"open\",\n\t\t\t\t\t\"high\",\n\t\t\t\t\t\"low\",\n\t\t\t\t\t\"close\",\n\t\t\t\t\t\"volume\"\n\t\t\t\t].map((v) => {\n\t\t\t\t\treturn $$.getRangedData(row, v, \"candlestick\") ? valueFormat($$.getRangedData(row, v, \"candlestick\"), ...param) : void 0;\n\t\t\t\t});\n\t\t\t\tvalue = `<b>Open:</b> ${open} <b>High:</b> ${high} <b>Low:</b> ${low} <b>Close:</b> ${close}${volume ? ` <b>Volume:</b> ${volume}` : \"\"}`;\n\t\t\t} else if ($$.isBarRangeType(row)) {\n\t\t\t\tconst { value: rangeValue, id, index } = row;\n\t\t\t\tvalue = `${valueFormat(rangeValue, void 0, id, index)}`;\n\t\t\t} else value = valueFormat(getRowValue(row), ...param);\n\t\t\tif (value !== void 0) {\n\t\t\t\tif (row.name === null) continue;\n\t\t\t\tconst name = nameFormat(row.name ?? row.id, ...param);\n\t\t\t\tconst color = getBgColor(row);\n\t\t\t\tconst contentValue = {\n\t\t\t\t\tCLASS_TOOLTIP_NAME: $TOOLTIP.tooltipName + $$.getTargetSelectorSuffix(row.id),\n\t\t\t\t\tCOLOR: tplStr || !$$.patterns ? color : `<svg><rect style=\"fill:${color}\" width=\"10\" height=\"10\"></rect></svg>`,\n\t\t\t\t\tNAME: name,\n\t\t\t\t\tVALUE: value\n\t\t\t\t};\n\t\t\t\tif (tplStr && isObject(contents.text)) {\n\t\t\t\t\tconst index = targetIds.indexOf(row.id);\n\t\t\t\t\tObject.keys(contents.text).forEach((key) => {\n\t\t\t\t\t\tcontentValue[key] = contents.text[key][index];\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\ttext += tplProcess(tpl[1], contentValue);\n\t\t\t}\n\t\t}\n\t\treturn `${text}</table>`;\n\t},\n\t/**\n\t* Get the content template string\n\t* @param {string} tplStr Tempalte string\n\t* @returns {Array} Template string\n\t* @private\n\t*/\n\tgetTooltipContentTemplate(tplStr) {\n\t\treturn (tplStr || `<table class=\"{=CLASS_TOOLTIP}\"><tbody>\n\t\t\t\t{=TITLE}\n\t\t\t\t{{<tr class=\"{=CLASS_TOOLTIP_NAME}\">\n\t\t\t\t\t<td class=\"name\">${this.patterns ? `{=COLOR}` : `<span style=\"background-color:{=COLOR}\"></span>`}{=NAME}</td>\n\t\t\t\t\t<td class=\"value\">{=VALUE}</td>\n\t\t\t\t</tr>}}\n\t\t\t</tbody></table>`).replace(RE_WHITESPACE, \"\").split(RE_TOOLTIP_TPL);\n\t},\n\t/**\n\t* Update tooltip position coordinate\n\t* @param {object} dataToShow Data object\n\t* @param {SVGElement} eventTarget Event element\n\t* @private\n\t*/\n\tsetTooltipPosition(dataToShow, eventTarget) {\n\t\tconst $$ = this;\n\t\tconst { config, scale, state, $el: { eventRect, tooltip, svg } } = $$;\n\t\tconst { bindto } = config.tooltip_contents;\n\t\tconst isRotated = config.axis_rotated;\n\t\tconst datum = tooltip?.datum();\n\t\tif (!bindto && datum) {\n\t\t\tconst data = dataToShow ?? datum.data;\n\t\t\tconst [x, y] = getPointer(state.event, eventTarget ?? eventRect?.node());\n\t\t\tconst currPos = {\n\t\t\t\tx,\n\t\t\t\ty\n\t\t\t};\n\t\t\tif (state.hasAxis && scale.x && datum && \"x\" in datum) {\n\t\t\t\tconst getYPos = (value = 0, id, axisId = \"y\") => {\n\t\t\t\t\tconst scaleFn = scale[id ? $$.axis?.getId(id) : axisId];\n\t\t\t\t\treturn scaleFn ? scaleFn(value) + (isRotated ? state.margin.left : state.margin.top) : 0;\n\t\t\t\t};\n\t\t\t\tcurrPos.xAxis = scale.x(datum.x) + (config.tooltip_position ? isRotated ? state.margin.top : state.margin.left : 0);\n\t\t\t\tif (data.length === 1) currPos.yAxis = getYPos(data[0].value, data[0].id);\n\t\t\t\telse currPos.yAxis = getYPos;\n\t\t\t}\n\t\t\tconst { width = 0, height = 0 } = datum;\n\t\t\tconst pos = config.tooltip_position?.bind($$.api)(data, width, height, eventRect?.node(), currPos) ?? (svg && hasViewBox(svg) ? $$.getTooltipPositionViewBox.bind($$)(width, height, currPos) : $$.getTooltipPosition.bind($$)(width, height, currPos));\n\t\t\t[\"top\", \"left\"].forEach((v) => {\n\t\t\t\tconst value = pos[v];\n\t\t\t\ttooltip.style(v, `${value}px`);\n\t\t\t\tif (v === \"left\" && !datum.xPosInPercent) datum.xPosInPercent = value / state.current.width * 100;\n\t\t\t});\n\t\t}\n\t},\n\t/**\n\t* Get tooltip position when svg has vieBox attribute\n\t* @param {number} tWidth Tooltip width value\n\t* @param {number} tHeight Tooltip height value\n\t* @param {object} currPos Current event position value from SVG coordinate\n\t* @returns {object} top, left value\n\t*/\n\tgetTooltipPositionViewBox(tWidth, tHeight, currPos) {\n\t\tconst $$ = this;\n\t\tconst { $el: { eventRect, svg }, config, state } = $$;\n\t\tconst isRotated = config.axis_rotated;\n\t\tconst hasArcType = $$.hasArcType() || state.hasFunnel || state.hasTreemap;\n\t\tconst target = (hasArcType ? svg : eventRect)?.node() ?? state.event.target;\n\t\tlet { x, y } = currPos;\n\t\tif (state.hasAxis) {\n\t\t\tx = isRotated ? x : currPos.xAxis;\n\t\t\ty = isRotated ? currPos.xAxis : y;\n\t\t}\n\t\tconst ctm = getTransformCTM(target, x, y, false);\n\t\tconst rect = getBoundingRect(target);\n\t\tconst size = getTransformCTM(target, 20, 0, false).x;\n\t\tlet top = ctm.y;\n\t\tlet left = ctm.x + tWidth / 2 + size;\n\t\tif (hasArcType) {\n\t\t\tif (state.hasFunnel || state.hasTreemap || state.hasRadar) {\n\t\t\t\tleft -= tWidth / 2 + size;\n\t\t\t\ttop += tHeight;\n\t\t\t} else {\n\t\t\t\ttop += rect.height / 2;\n\t\t\t\tleft += rect.width / 2 - (tWidth - size);\n\t\t\t}\n\t\t}\n\t\tif (left + tWidth > rect.width) left = rect.width - tWidth - size;\n\t\tif (top + tHeight > rect.height) top -= tHeight * 2;\n\t\treturn {\n\t\t\ttop,\n\t\t\tleft\n\t\t};\n\t},\n\t/**\n\t* Returns the position of the tooltip\n\t* @param {string} tWidth Width value of tooltip element\n\t* @param {string} tHeight Height value of tooltip element\n\t* @param {object} currPos Current mouse position\n\t* @returns {object} top, left value\n\t* @private\n\t*/\n\tgetTooltipPosition(tWidth, tHeight, currPos) {\n\t\tconst $$ = this;\n\t\tconst { config, scale, state } = $$;\n\t\tconst { width, height, current, hasFunnel, hasRadar, hasTreemap, isLegendRight, inputType } = state;\n\t\tconst hasGauge = $$.hasType(\"gauge\") && !config.gauge_fullCircle;\n\t\tconst isRotated = config.axis_rotated;\n\t\tconst hasArcType = $$.hasArcType();\n\t\tconst svgLeft = state.isCanvasMode ? 0 : $$.getSvgLeft(true);\n\t\tlet chartRight = svgLeft + current.width - $$.getCurrentPaddingByDirection(\"right\");\n\t\tconst size = 20;\n\t\tlet { x, y } = currPos;\n\t\tif (hasRadar) {\n\t\t\tx += x >= width / 2 ? 15 : -(tWidth + 15);\n\t\t\ty += 15;\n\t\t} else if (hasArcType) {\n\t\t\tif (inputType !== \"touch\") {\n\t\t\t\tlet titlePadding = $$.getTitlePadding?.() ?? 0;\n\t\t\t\tif (titlePadding && hasGauge && config.arc_rangeText_values?.length) titlePadding += 10;\n\t\t\t\tx += (width - (isLegendRight ? $$.getLegendWidth() : 0)) / 2;\n\t\t\t\ty += (hasGauge ? height : height / 2 + tHeight) + titlePadding;\n\t\t\t}\n\t\t} else if (hasFunnel || hasTreemap) y += tHeight;\n\t\telse {\n\t\t\tconst padding = {\n\t\t\t\ttop: $$.getCurrentPaddingByDirection(\"top\", true),\n\t\t\t\tleft: $$.getCurrentPaddingByDirection(\"left\", true)\n\t\t\t};\n\t\t\tif (isRotated) {\n\t\t\t\tx += svgLeft + padding.left + size;\n\t\t\t\ty = padding.top + currPos.xAxis + size;\n\t\t\t\tchartRight -= svgLeft;\n\t\t\t} else {\n\t\t\t\tx = svgLeft + padding.left + size + (scale.zoom ? x : currPos.xAxis);\n\t\t\t\ty += padding.top - 5;\n\t\t\t}\n\t\t}\n\t\tif (x + tWidth + 15 > chartRight) x -= tWidth + (hasFunnel || hasTreemap || hasArcType ? 0 : isRotated ? 40 : 38);\n\t\tif (y + tHeight > current.height) {\n\t\t\tconst gap = hasTreemap ? tHeight + 10 : 30;\n\t\t\ty -= hasGauge ? tHeight * 1.5 : tHeight + gap;\n\t\t}\n\t\tconst pos = {\n\t\t\ttop: y,\n\t\t\tleft: x\n\t\t};\n\t\tif (pos.top < 0) pos.top = 0;\n\t\tif (pos.left < 0) pos.left = 0;\n\t\treturn pos;\n\t},\n\t/**\n\t* Show the tooltip\n\t* @param {object} selectedData Data object\n\t* @param {SVGElement} eventTarget Event element\n\t* @private\n\t*/\n\tshowTooltip(selectedData, eventTarget) {\n\t\tconst $$ = this;\n\t\tconst { config, $el: { tooltip } } = $$;\n\t\tif (!tooltip || !config.tooltip_show) return;\n\t\tlet dataToShow = null;\n\t\tlet dataToShowCount = 0;\n\t\tlet dataStr = `${$$.data.targets.length}:`;\n\t\tlet firstData;\n\t\tfor (let i = 0; i < selectedData.length; i++) {\n\t\t\tconst d = selectedData[i];\n\t\t\ti > 0 && (dataStr += \",\");\n\t\t\tdataStr += `${d?.index}|${d?.id}|${d?.value}`;\n\t\t\t!firstData && d && (firstData = d);\n\t\t\tif (d && isValue($$.getBaseValue(d))) {\n\t\t\t\tdataToShowCount++;\n\t\t\t\tdataToShow?.push(d);\n\t\t\t} else if (!dataToShow) dataToShow = selectedData.slice(0, i);\n\t\t}\n\t\tif (dataToShowCount === 0 || !firstData) return;\n\t\tconst datum = tooltip.datum();\n\t\tlet positionData = dataToShow;\n\t\tif (!datum || datum.current !== dataStr) {\n\t\t\tconst { index, x } = firstData;\n\t\t\tif (!positionData) positionData = selectedData.slice();\n\t\t\tcallFn(config.tooltip_onshow, $$.api, selectedData);\n\t\t\ttooltip.html($$.getTooltipHTML(selectedData, $$.axis ? $$.axis.getXAxisTickFormat() : $$.categoryName.bind($$), $$.getDefaultValueFormat(), $$.color)).style(\"display\", null).style(\"visibility\", null);\n\t\t\ttooltip.datum({\n\t\t\t\tindex,\n\t\t\t\tx,\n\t\t\t\tcurrent: dataStr,\n\t\t\t\tdata: selectedData,\n\t\t\t\twidth: tooltip.property(\"offsetWidth\"),\n\t\t\t\theight: tooltip.property(\"offsetHeight\")\n\t\t\t});\n\t\t\tcallFn(config.tooltip_onshown, $$.api, selectedData);\n\t\t\t$$._handleLinkedCharts(true, index);\n\t\t}\n\t\t$$.setTooltipPosition(positionData || selectedData, eventTarget);\n\t},\n\t/**\n\t* Adjust tooltip position on resize event\n\t* @private\n\t*/\n\tbindTooltipResizePos() {\n\t\tconst { resizeFunction, state, $el: { tooltip } } = this;\n\t\tresizeFunction.add(() => {\n\t\t\tif (tooltip.style(\"display\") === \"block\") {\n\t\t\t\tconst { current } = state;\n\t\t\t\tconst { width, xPosInPercent } = tooltip.datum();\n\t\t\t\tlet value = current.width / 100 * xPosInPercent;\n\t\t\t\tconst diff = current.width - (value + width);\n\t\t\t\tif (diff < 0) value += diff;\n\t\t\t\ttooltip.style(\"left\", `${value}px`);\n\t\t\t}\n\t\t});\n\t},\n\t/**\n\t* Hide the tooltip\n\t* @param {boolean} force Force to hide\n\t* @private\n\t*/\n\thideTooltip(force) {\n\t\tconst { api, config, $el: { tooltip } } = this;\n\t\tif (tooltip && tooltip.style(\"display\") !== \"none\" && (!config.tooltip_doNotHide || force)) {\n\t\t\tconst selectedData = tooltip.datum().data ?? [];\n\t\t\tcallFn(config.tooltip_onhide, api, selectedData);\n\t\t\ttooltip.style(\"display\", \"none\").datum(null);\n\t\t\tcallFn(config.tooltip_onhidden, api, selectedData);\n\t\t}\n\t},\n\t/**\n\t* Toggle display for linked chart instances\n\t* @param {boolean} show true: show, false: hide\n\t* @param {number} index x Axis index\n\t* @private\n\t*/\n\t_handleLinkedCharts(show, index) {\n\t\tconst $$ = this;\n\t\tconst { charts, config, state: { event } } = $$;\n\t\tif (event?.isTrusted && config.tooltip_linked && charts.length > 1) {\n\t\t\tconst linkedName = config.tooltip_linked_name;\n\t\t\tcharts.filter((c) => c !== $$.api).forEach((c) => {\n\t\t\t\tconst { config, $el, state } = c.internal;\n\t\t\t\tconst isLinked = config.tooltip_linked;\n\t\t\t\tconst name = config.tooltip_linked_name;\n\t\t\t\tconst isInDom = doc.body.contains($el.chart.node());\n\t\t\t\tif (isLinked && linkedName === name && isInDom) {\n\t\t\t\t\tconst isNotSameIndex = index !== $el.tooltip.data()[0]?.index;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tif (show && isNotSameIndex && state.isCanvasMode) c.internal.showCanvasLinkedTooltip?.(index);\n\t\t\t\t\t\telse c.tooltip[show && isNotSameIndex ? \"show\" : \"hide\"]({ index });\n\t\t\t\t\t} catch {}\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t},\n\t/**\n\t* Update tooltip content on redraw\n\t* - In a situation where tooltip is displayed and data load happens, it should reflect loaded data to tooltip\n\t* @param {d3Selection} context Event rect element\n\t* @param {number} index Data index\n\t* @private\n\t*/\n\tupdateTooltipOnRedraw(context, index) {\n\t\tconst $$ = this;\n\t\tconst { config, $el: { eventRect, svg, tooltip }, state: { event, hasAxis, hasRadar, hasTreemap } } = $$;\n\t\tif ($$.state.isCanvasMode) return;\n\t\tif (tooltip?.style(\"display\") === \"block\" && event) {\n\t\t\tconst rect = context ?? (hasRadar ? svg : eventRect)?.node();\n\t\t\tif (hasAxis || hasRadar) {\n\t\t\t\tif ($$.isMultipleX()) $$.selectRectForMultipleXs(rect, false);\n\t\t\t\telse {\n\t\t\t\t\tconst idx = index ?? $$.getDataIndexFromEvent(event);\n\t\t\t\t\tif (index === -1) $$.api.tooltip.hide();\n\t\t\t\t\telse {\n\t\t\t\t\t\t$$.selectRectForSingle(rect, idx);\n\t\t\t\t\t\t$$.setExpand(idx, null, true);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tconst { clientX, clientY } = event;\n\t\t\t\tsetTimeout(() => {\n\t\t\t\t\tlet target = [clientX, clientY].every(Number.isFinite) && doc.elementFromPoint(clientX, clientY);\n\t\t\t\t\tconst data = target && select(target).datum();\n\t\t\t\t\tif (data) {\n\t\t\t\t\t\tconst d = $$.hasArcType() ? $$.convertToArcData($$.updateAngle(data)) : data?.data;\n\t\t\t\t\t\thasTreemap && (target = svg.node());\n\t\t\t\t\t\td && $$.showTooltip([d], target);\n\t\t\t\t\t} else $$.api.tooltip.hide();\n\t\t\t\t}, config.transition_duration);\n\t\t\t}\n\t\t}\n\t}\n};\n//#endregion\nexport { tooltip_default as default };\n","/*!\n* Copyright (c) 2017 ~ present NAVER Corp.\r\n * billboard.js project is licensed under the MIT license\r\n * \r\n * billboard.js, JavaScript chart library\r\n * https://naver.github.io/billboard.js/\r\n * \r\n * @version 4.1.0\n*/\nimport { asHalfPixel } from \"../../module/util/type-checks.js\";\nimport { $ARC, $AXIS } from \"../../config/classes.js\";\n//#region src/ChartInternal/internals/transform.ts\n/**\n* Copyright (c) 2017 ~ present NAVER Corp.\n* billboard.js project is licensed under the MIT license\n*/\nvar transform_default = {\n\tgetTranslate(target, index = 0) {\n\t\tconst $$ = this;\n\t\tconst { config, state } = $$;\n\t\tconst isRotated = config.axis_rotated;\n\t\tlet padding = 0;\n\t\tlet x;\n\t\tlet y;\n\t\tif (index && /^(x|y2?)$/.test(target)) padding = $$.getAxisSize(target) * index;\n\t\tif (target === \"main\") {\n\t\t\tx = asHalfPixel(state.margin.left);\n\t\t\ty = asHalfPixel(state.margin.top);\n\t\t} else if (target === \"context\") {\n\t\t\tx = asHalfPixel(state.margin2.left);\n\t\t\ty = asHalfPixel(state.margin2.top);\n\t\t} else if (target === \"legend\") {\n\t\t\tx = state.margin3.left;\n\t\t\ty = state.margin3.top;\n\t\t} else if (target === \"x\") {\n\t\t\tx = isRotated ? -padding : 0;\n\t\t\ty = isRotated ? 0 : state.height + padding;\n\t\t} else if (target === \"y\") {\n\t\t\tx = isRotated ? 0 : -padding;\n\t\t\ty = isRotated ? state.height + padding : 0;\n\t\t} else if (target === \"y2\") {\n\t\t\tx = isRotated ? 0 : state.width + padding;\n\t\t\ty = isRotated ? -padding - 1 : 0;\n\t\t} else if (target === \"subX\") {\n\t\t\tx = 0;\n\t\t\ty = isRotated ? 0 : state.height2;\n\t\t} else if (target === \"subY\") {\n\t\t\tx = 0;\n\t\t\ty = isRotated ? state.height2 : 0;\n\t\t} else if (target === \"subY2\") {\n\t\t\tx = isRotated ? 0 : state.width2;\n\t\t\ty = isRotated ? -1 : 0;\n\t\t} else if (target === \"arc\") {\n\t\t\tx = state.arcWidth / 2;\n\t\t\ty = state.arcHeight / 2;\n\t\t\tif (config.arc_rangeText_values?.length) y += 5 + ($$.hasType(\"gauge\") && config.title_text ? 10 : 0);\n\t\t} else if (target === \"polar\") {\n\t\t\tx = state.arcWidth / 2;\n\t\t\ty = state.arcHeight / 2;\n\t\t} else if (target === \"radar\") {\n\t\t\tconst [width, height] = $$.getRadarSize();\n\t\t\tx = state.width / 2 - width;\n\t\t\ty = state.height / 2 - height;\n\t\t}\n\t\treturn `translate(${x}, ${y})`;\n\t},\n\ttransformMain(withTransition, transitions) {\n\t\tconst $$ = this;\n\t\tconst { $el: { main }, $T } = $$;\n\t\tconst xAxis = transitions?.axisX ? transitions.axisX : $T(main.select(`.${$AXIS.axisX}`), withTransition);\n\t\tconst yAxis = transitions?.axisY ? transitions.axisY : $T(main.select(`.${$AXIS.axisY}`), withTransition);\n\t\tconst y2Axis = transitions?.axisY2 ? transitions.axisY2 : $T(main.select(`.${$AXIS.axisY2}`), withTransition);\n\t\t$T(main, withTransition).attr(\"transform\", $$.getTranslate(\"main\"));\n\t\txAxis.attr(\"transform\", $$.getTranslate(\"x\"));\n\t\tyAxis.attr(\"transform\", $$.getTranslate(\"y\"));\n\t\ty2Axis.attr(\"transform\", $$.getTranslate(\"y2\"));\n\t\tmain.select(`.${$ARC.chartArcs}`).attr(\"transform\", $$.getTranslate(\"arc\"));\n\t},\n\ttransformAll(withTransition, transitions) {\n\t\tconst $$ = this;\n\t\tconst { config, state: { hasAxis, hasFunnel, hasTreemap, isCanvasMode }, $el } = $$;\n\t\tif (isCanvasMode) return;\n\t\t!hasFunnel && !hasTreemap && $$.transformMain(withTransition, transitions);\n\t\thasAxis && config.subchart_show && $$.transformContext(withTransition, transitions);\n\t\t$el.legend && $$.transformLegend(withTransition);\n\t}\n};\n//#endregion\nexport { transform_default as default };\n","/*!\n* Copyright (c) 2017 ~ present NAVER Corp.\r\n * billboard.js project is licensed under the MIT license\r\n * \r\n * billboard.js, JavaScript chart library\r\n * https://naver.github.io/billboard.js/\r\n * \r\n * @version 4.1.0\n*/\nimport { TYPE, TYPE_BY_CATEGORY } from \"../../config/const.js\";\nimport { isArray, isNumber, isString } from \"../../module/util/type-checks.js\";\n//#region src/ChartInternal/internals/type.ts\n/**\n* Copyright (c) 2017 ~ present NAVER Corp.\n* billboard.js project is licensed under the MIT license\n*/\nconst INTERPOLATION_TYPES = /* @__PURE__ */ new Set([\n\t\"basis\",\n\t\"basis-closed\",\n\t\"basis-open\",\n\t\"bundle\",\n\t\"cardinal\",\n\t\"cardinal-closed\",\n\t\"cardinal-open\",\n\t\"catmull-rom\",\n\t\"catmull-rom-closed\",\n\t\"catmull-rom-open\",\n\t\"linear\",\n\t\"linear-closed\",\n\t\"monotone-x\",\n\t\"monotone-y\",\n\t\"natural\"\n]);\nvar type_default = {\n\t/**\n\t* Check if the given chart type is valid\n\t* @param {string} type Chart type string\n\t* @returns {boolean}\n\t* @private\n\t*/\n\tisValidChartType(type) {\n\t\treturn !!(type && Object.values(TYPE).indexOf(type) > -1);\n\t},\n\t/**\n\t* Get the chart type to use for the subchart target.\n\t* subchart.types > subchart.type > data.types > data.type > line\n\t* @param {object|string} d Target data or id\n\t* @returns {string}\n\t* @private\n\t*/\n\tgetSubchartTargetType(d) {\n\t\tconst $$ = this;\n\t\tconst { config } = $$;\n\t\tconst id = isString(d) ? d : d?.id;\n\t\tconst subchartTypes = config.subchart_types || {};\n\t\tconst subchartType = config.subchart_type;\n\t\tconst dataTypes = config.data_types || {};\n\t\tconst targetSubchartType = id && subchartTypes[id];\n\t\tif (targetSubchartType && $$.isValidChartType(targetSubchartType)) return targetSubchartType;\n\t\telse if (subchartType && $$.isValidChartType(subchartType)) return subchartType;\n\t\treturn id && dataTypes[id] || config.data_type || TYPE.LINE;\n\t},\n\t/**\n\t* Get the regular chart type configured for the target.\n\t* @param {object|string} d Target data or id\n\t* @returns {string}\n\t* @private\n\t*/\n\tgetTargetType(d) {\n\t\tconst { config } = this;\n\t\tconst id = isString(d) ? d : d?.id;\n\t\treturn id && config.data_types?.[id] || config.data_type || TYPE.LINE;\n\t},\n\t/**\n\t* Get the target's original chart type while subchart.type context is active.\n\t* @param {object|string} d Target data or id\n\t* @returns {string}\n\t* @private\n\t*/\n\tgetSubchartSourceTargetType(d) {\n\t\tconst { state } = this;\n\t\tconst id = isString(d) ? d : d?.id;\n\t\treturn id && state.subchartSourceTypes?.[id] || this.getTargetType(d);\n\t},\n\t/**\n\t* Check whether a target had the given source type before subchart.type remapping.\n\t* @param {object|string} d Target data or id\n\t* @param {string|Array} type chart type\n\t* @returns {boolean}\n\t* @private\n\t*/\n\tisSubchartSourceTypeOf(d, type) {\n\t\tconst sourceType = this.getSubchartSourceTargetType(d);\n\t\treturn isArray(type) ? type.indexOf(sourceType) >= 0 : sourceType === type;\n\t},\n\t/**\n\t* Run a callback while regular type helpers resolve using subchart.type/types.\n\t* @param {function(): unknown} callback Callback to run\n\t* @returns {unknown} Callback return value\n\t* @private\n\t*/\n\twithSubchartTypeContext(callback) {\n\t\tconst $$ = this;\n\t\tconst { config, data, state } = $$;\n\t\tconst dataType = config.data_type;\n\t\tconst dataTypes = config.data_types;\n\t\tconst currentTypes = state.current.types;\n\t\tconst sourceTypes = state.subchartSourceTypes;\n\t\tconst subchartTypes = {};\n\t\tconst subchartSourceTypes = {};\n\t\tconst subchartType = config.subchart_type;\n\t\t$$.mapToIds(data.targets).forEach((id) => {\n\t\t\tsubchartSourceTypes[id] = $$.getTargetType(id);\n\t\t\tsubchartTypes[id] = $$.getSubchartTargetType(id);\n\t\t});\n\t\tconfig.data_type = subchartType && $$.isValidChartType(subchartType) ? subchartType : dataType;\n\t\tconfig.data_types = subchartTypes;\n\t\tstate.current.types = [];\n\t\tstate.subchartSourceTypes = subchartSourceTypes;\n\t\ttry {\n\t\t\treturn callback();\n\t\t} finally {\n\t\t\tconfig.data_type = dataType;\n\t\t\tconfig.data_types = dataTypes;\n\t\t\tstate.current.types = currentTypes;\n\t\t\tstate.subchartSourceTypes = sourceTypes;\n\t\t}\n\t},\n\tsetTargetType(targetIds, type) {\n\t\tconst $$ = this;\n\t\tconst { config, state: { withoutFadeIn } } = $$;\n\t\t$$.mapToTargetIds(targetIds).forEach((id) => {\n\t\t\twithoutFadeIn[id] = type === config.data_types[id];\n\t\t\tconfig.data_types[id] = type;\n\t\t});\n\t\tif (!targetIds) config.data_type = type;\n\t},\n\t/**\n\t* Updte current used chart types\n\t* @private\n\t*/\n\tupdateTypesElements() {\n\t\tconst $$ = this;\n\t\tconst { state: { current } } = $$;\n\t\tObject.keys(TYPE).forEach((v) => {\n\t\t\tconst t = TYPE[v];\n\t\t\tconst has = $$.hasType(t, null, true);\n\t\t\tconst idx = current.types.indexOf(t);\n\t\t\tif (idx === -1 && has) current.types.push(t);\n\t\t\telse if (idx > -1 && !has) current.types.splice(idx, 1);\n\t\t});\n\t\t$$.setChartElements();\n\t},\n\t/**\n\t* Check if given chart types exists\n\t* @param {string} type Chart type\n\t* @param {Array} targetsValue Data array\n\t* @param {boolean} checkFromData Force to check type cotains from data targets\n\t* @returns {boolean}\n\t* @private\n\t*/\n\thasType(type, targetsValue, checkFromData = false) {\n\t\tconst $$ = this;\n\t\tconst { config, state: { current } } = $$;\n\t\tconst types = config.data_types;\n\t\tconst targets = targetsValue || $$.data.targets;\n\t\tif (!checkFromData && current.types?.indexOf(type) > -1) return true;\n\t\telse if (targets?.length) return targets.some((target) => {\n\t\t\tconst t = types[target.id];\n\t\t\treturn t === type || !t && type === \"line\";\n\t\t});\n\t\telse if (Object.keys(types).length) return Object.values(types).some((t) => t === type);\n\t\treturn config.data_type === type;\n\t},\n\t/**\n\t* Check if contains given chart types\n\t* @param {string} type Type key\n\t* @param {object} targets Target data\n\t* @param {Array} exclude Excluded types\n\t* @returns {boolean}\n\t* @private\n\t*/\n\thasTypeOf(type, targets, exclude = []) {\n\t\tif (type in TYPE_BY_CATEGORY) return !TYPE_BY_CATEGORY[type].filter((v) => exclude.indexOf(v) === -1).every((v) => !this.hasType(v, targets));\n\t\treturn false;\n\t},\n\t/**\n\t* Check if given data is certain chart type\n\t* @param {object} d Data object\n\t* @param {string|Array} type chart type\n\t* @returns {boolean}\n\t* @private\n\t*/\n\tisTypeOf(d, type) {\n\t\tconst id = isString(d) ? d : d.id;\n\t\tconst dataType = this.config && this.getTargetType(id);\n\t\treturn isArray(type) ? type.indexOf(dataType) >= 0 : dataType === type;\n\t},\n\thasPointType() {\n\t\tconst $$ = this;\n\t\treturn $$.hasTypeOf(\"Line\") || $$.hasType(\"bubble\") || $$.hasType(\"scatter\");\n\t},\n\t/**\n\t* Check if contains arc types chart\n\t* @param {object} targets Target data\n\t* @param {Array} exclude Excluded types\n\t* @returns {boolean}\n\t* @private\n\t*/\n\thasArcType(targets, exclude) {\n\t\treturn this.hasTypeOf(\"Arc\", targets, exclude);\n\t},\n\thasMultiArcGauge() {\n\t\treturn this.hasType(\"gauge\") && this.config.gauge_type === \"multi\";\n\t},\n\tisLineType(d) {\n\t\tconst id = isString(d) ? d : d.id;\n\t\treturn !this.config.data_types[id] || this.isTypeOf(id, TYPE_BY_CATEGORY.Line);\n\t},\n\tisStepType(d) {\n\t\treturn this.isTypeOf(d, TYPE_BY_CATEGORY.Step);\n\t},\n\tisSplineType(d) {\n\t\treturn this.isTypeOf(d, TYPE_BY_CATEGORY.Spline);\n\t},\n\tisAreaType(d) {\n\t\treturn this.isTypeOf(d, TYPE_BY_CATEGORY.Area);\n\t},\n\tisAreaRangeType(d) {\n\t\treturn this.isTypeOf(d, TYPE_BY_CATEGORY.AreaRange);\n\t},\n\tisBarType(d) {\n\t\treturn this.isTypeOf(d, \"bar\");\n\t},\n\tisBubbleType(d) {\n\t\treturn this.isTypeOf(d, \"bubble\");\n\t},\n\tisCandlestickType(d) {\n\t\treturn this.isTypeOf(d, \"candlestick\");\n\t},\n\tisScatterType(d) {\n\t\treturn this.isTypeOf(d, \"scatter\");\n\t},\n\tisTreemapType(d) {\n\t\treturn this.isTypeOf(d, \"treemap\");\n\t},\n\tisPieType(d) {\n\t\treturn this.isTypeOf(d, \"pie\");\n\t},\n\tisFunnelType(d) {\n\t\treturn this.isTypeOf(d, \"funnel\");\n\t},\n\tisGaugeType(d) {\n\t\treturn this.isTypeOf(d, \"gauge\");\n\t},\n\tisDonutType(d) {\n\t\treturn this.isTypeOf(d, \"donut\");\n\t},\n\tisPolarType(d) {\n\t\treturn this.isTypeOf(d, \"polar\");\n\t},\n\tisRadarType(d) {\n\t\treturn this.isTypeOf(d, \"radar\");\n\t},\n\tisArcType(d) {\n\t\treturn this.isPieType(d) || this.isDonutType(d) || this.isGaugeType(d) || this.isPolarType(d) || this.isRadarType(d);\n\t},\n\tisCirclePoint(node) {\n\t\tconst { config } = this;\n\t\tconst pattern = config.point_pattern;\n\t\treturn node?.tagName === \"circle\" || config.point_type === \"circle\" && (!pattern || isArray(pattern) && pattern.length === 0);\n\t},\n\tlineData(d) {\n\t\treturn this.isLineType(d) ? [d] : [];\n\t},\n\tarcData(d) {\n\t\treturn this.isArcType(d.data) ? [d] : [];\n\t},\n\t/**\n\t* Get data adapt for data label showing\n\t* @param {object} d Data object\n\t* @returns {Array}\n\t* @private\n\t*/\n\tlabelishData(d) {\n\t\treturn this.isBarType(d) || this.isLineType(d) || this.isScatterType(d) || this.isBubbleType(d) || this.isCandlestickType(d) || this.isFunnelType(d) || this.isRadarType(d) || this.isTreemapType(d) ? d.values.filter((v) => isNumber(v.value) || Boolean(v.value)) : [];\n\t},\n\tbarLineBubbleData(d) {\n\t\treturn this.isBarType(d) || this.isLineType(d) || this.isBubbleType(d) ? d.values : [];\n\t},\n\tisInterpolationType(type) {\n\t\treturn INTERPOLATION_TYPES.has(type);\n\t}\n};\n//#endregion\nexport { type_default as default };\n","/*!\n* Copyright (c) 2017 ~ present NAVER Corp.\r\n * billboard.js project is licensed under the MIT license\r\n * \r\n * billboard.js, JavaScript chart library\r\n * https://naver.github.io/billboard.js/\r\n * \r\n * @version 4.1.0\n*/\nimport { TYPE } from \"../../config/const.js\";\nimport { isFunction, isNumber, isObjectType, isUndefined, isValue, notEmpty } from \"../../module/util/type-checks.js\";\nimport { capitalize, getUnique, parseDate } from \"../../module/util/object.js\";\nimport { getPointer, getRectSegList } from \"../../module/util/dom.js\";\nimport classes_default from \"../../config/classes.js\";\nimport { KEY } from \"../../module/Cache.js\";\nimport { select } from \"d3-selection\";\nimport { curveBasis, curveBasisClosed, curveBasisOpen, curveBundle, curveCardinal, curveCardinalClosed, curveCardinalOpen, curveCatmullRom, curveCatmullRomClosed, curveCatmullRomOpen, curveLinear, curveLinearClosed, curveMonotoneX, curveMonotoneY, curveNatural, curveStep, curveStepAfter, curveStepBefore } from \"d3-shape\";\n//#region src/ChartInternal/shape/shape.ts\n/**\n* Copyright (c) 2017 ~ present NAVER Corp.\n* billboard.js project is licensed under the MIT license\n*/\nconst CURVE_MAP = {\n\tbasis: curveBasis,\n\t\"basis-closed\": curveBasisClosed,\n\t\"basis-open\": curveBasisOpen,\n\tbundle: curveBundle,\n\tcardinal: curveCardinal,\n\t\"cardinal-closed\": curveCardinalClosed,\n\t\"cardinal-open\": curveCardinalOpen,\n\t\"catmull-rom\": curveCatmullRom,\n\t\"catmull-rom-closed\": curveCatmullRomClosed,\n\t\"catmull-rom-open\": curveCatmullRomOpen,\n\t\"monotone-x\": curveMonotoneX,\n\t\"monotone-y\": curveMonotoneY,\n\tnatural: curveNatural,\n\t\"linear-closed\": curveLinearClosed,\n\tlinear: curveLinear,\n\tstep: curveStep,\n\t\"step-after\": curveStepAfter,\n\t\"step-before\": curveStepBefore\n};\n/**\n* Check if a target can use line-like grouped point offsets.\n* @param {object} $$ ChartInternal instance\n* @param {object|string} d Data value, target or id\n* @returns {boolean} Whether target uses point-like y coordinates\n* @private\n*/\nfunction isLinePointGroupType($$, d) {\n\treturn $$.isLineType(d) || $$.isScatterType?.(d) || $$.isBubbleType?.(d);\n}\n/**\n* Get type filter for grouped line-like point offsets.\n* @param {object} $$ ChartInternal instance\n* @returns {function} Type filter\n* @private\n*/\nfunction getLinePointGroupTypeFilter($$) {\n\treturn (d) => isLinePointGroupType($$, d);\n}\n/**\n* Get numeric value used for stacked offset calculation.\n* @param {object} $$ ChartInternal instance\n* @param {object} d Data row\n* @param {boolean} isSub Whether coordinates are for the subchart\n* @returns {number|Array|object|null} Offset value\n* @private\n*/\nfunction getShapeOffsetValue($$, d, isSub) {\n\tconst subchartCandlestickValue = isSub ? getSubchartCandlestickShapeValue($$, d, isSub) : void 0;\n\tif (isNumber(subchartCandlestickValue)) return subchartCandlestickValue;\n\tif ($$.isCandlestickType?.(d)) return $$.getCandlestickData?.(d)?.close;\n\treturn $$.getBaseValue(d);\n}\n/**\n* Get candlestick data projected for alternate subchart shapes.\n* @param {object} $$ ChartInternal instance\n* @param {object} d Data row\n* @param {boolean} isSub Whether coordinates are for the subchart\n* @returns {number|undefined} Projected value\n* @private\n*/\nfunction getSubchartCandlestickShapeValue($$, d, isSub) {\n\tif (!isSub || $$.isCandlestickType?.(d) || !$$.isSubchartSourceTypeOf?.(d, TYPE.CANDLESTICK)) return;\n\tconst value = $$.getCandlestickData?.(d);\n\tif (!value) return;\n\tif ($$.isBarType(d)) return isNumber(value.open) && isNumber(value.close) ? value._isUp ? value.close : value.open : void 0;\n\treturn isNumber(value.close) ? value.close : void 0;\n}\n/**\n* Check whether candlestick data can be projected as a subchart bar value.\n* @param {object} $$ ChartInternal instance\n* @param {object} d Data row\n* @param {boolean} isSub Whether coordinates are for the subchart\n* @returns {boolean}\n* @private\n*/\nfunction isSubchartCandlestickBarValue($$, d, isSub) {\n\tconst value = getSubchartCandlestickShapeValue($$, d, isSub);\n\treturn isNumber(value) && $$.isBarType(d);\n}\n/**\n* Get subchart bar color projected from candlestick up/down state.\n* @param {object} $$ ChartInternal instance\n* @param {object} d Data row\n* @param {boolean} isSub Whether coordinates are for the subchart\n* @returns {string|null} Bar color\n* @private\n*/\nfunction getSubchartCandlestickBarColor($$, d, isSub) {\n\tif (!isSubchartCandlestickBarValue($$, d, isSub)) return null;\n\tif (($$.getCandlestickData?.(d))?._isUp) return $$.color(d);\n\tconst downColor = $$.config.candlestick_color_down;\n\treturn (downColor && typeof downColor === \"object\" ? downColor[d.id] : downColor) || $$.color(d);\n}\n/**\n* Get grouped data point function for y coordinate\n* @param {object} d data vlaue\n* @returns {function|undefined}\n* @private\n*/\nfunction _getGroupedDataPointsFn(d) {\n\tconst $$ = this;\n\tlet fn;\n\tif (isLinePointGroupType($$, d)) {\n\t\tconst typeFilter = getLinePointGroupTypeFilter($$);\n\t\tfn = $$.generateGetLinePoints($$.getShapeIndices(typeFilter), false, typeFilter);\n\t} else if ($$.isBarType(d)) fn = $$.generateGetBarPoints($$.getShapeIndices($$.isBarType));\n\telse if ($$.isCandlestickType?.(d)) fn = $$.generateGetCandlestickPoints?.($$.getShapeIndices($$.isCandlestickType));\n\treturn fn;\n}\n/**\n* Get shape color with gradient support\n* @param {object} d Data object\n* @param {string} configKey Configuration key for linearGradient (e.g., 'bar_linearGradient', 'area_linearGradient')\n* @param {function(IDataRow): string|null} colorFn Fallback color function when gradient is not enabled\n* @returns {string | null} Color string or gradient URL\n* @private\n*/\nfunction getShapeColorWithGradient(d, configKey, colorFn) {\n\treturn this.config[configKey] ? this.getGradienColortUrl(d.id) : colorFn(d);\n}\n/**\n* Initialize a shape element container\n* @param {ShapeElementConfig} config Configuration object\n* @private\n*/\nfunction initShapeElement(config) {\n\tconst { $el } = this;\n\tconst { elKey, className, cssRules, position } = config;\n\tconst container = $el.main.select(`.${classes_default.chart}`);\n\t$el[elKey] = position === \"first\" ? container.insert(\"g\", \":first-child\") : container.append(\"g\");\n\t$el[elKey].attr(\"class\", className);\n\tif (cssRules?.length) $el[elKey].call(this.setCssRule(false, `.${className}`, cssRules));\n}\n/**\n* Common update targets pattern for shapes\n* @param {Array} targets Target data\n* @param {UpdateTargetsConfig} config Configuration object\n* @returns {d3Selection} Enter selection for additional setup\n* @private\n*/\nfunction updateTargetsForShape(targets, config) {\n\tconst $$ = this;\n\tconst { $el } = $$;\n\tconst { type, elKey, containerClass, itemClass, initFn, withFocus = true, withStyles = true } = config;\n\tif (!$el[elKey]) initFn.call($$);\n\tconst classChart = $$.getChartClass(type);\n\tconst classFocus = withFocus ? $$.classFocus.bind($$) : () => \"\";\n\tconst mainEnter = $el.main.select(`.${containerClass}`).selectAll(`.${itemClass}`).data($$.filterNullish(targets)).attr(\"class\", (d) => classChart(d) + classFocus(d)).enter().append(\"g\").attr(\"class\", classChart);\n\tif (withStyles) mainEnter.style(\"opacity\", \"0\").style(\"pointer-events\", $$.getStylePropValue(\"none\"));\n\treturn mainEnter;\n}\nvar shape_default = {\n\t/**\n\t* Get the shape draw function\n\t* @returns {object}\n\t* @private\n\t*/\n\tgetDrawShape() {\n\t\tconst $$ = this;\n\t\tconst isRotated = $$.config.axis_rotated;\n\t\tconst { hasRadar, hasTreemap } = $$.state;\n\t\tconst shape = {\n\t\t\ttype: {},\n\t\t\tindices: {},\n\t\t\tpos: {}\n\t\t};\n\t\t!hasTreemap && [\n\t\t\t\"bar\",\n\t\t\t\"candlestick\",\n\t\t\t\"line\",\n\t\t\t\"area\"\n\t\t].forEach((v) => {\n\t\t\tconst name = capitalize(v);\n\t\t\tif ($$.hasType(v) || $$.hasTypeOf(name) || v === \"line\" && ($$.hasType(\"bubble\") || $$.hasType(\"scatter\"))) {\n\t\t\t\tconst indices = $$.getShapeIndices($$[`is${name}Type`]);\n\t\t\t\tconst drawFn = $$[`generateDraw${name}`];\n\t\t\t\tshape.indices[v] = indices;\n\t\t\t\tshape.type[v] = drawFn ? drawFn.bind($$)(indices, false) : void 0;\n\t\t\t}\n\t\t});\n\t\tif (!$$.hasArcType() || hasRadar || hasTreemap) {\n\t\t\tlet cx;\n\t\t\tlet cy;\n\t\t\tlet xForText;\n\t\t\tlet yForText;\n\t\t\tif (!hasTreemap) {\n\t\t\t\tcx = hasRadar ? $$.radarCircleX : isRotated ? $$.circleY : $$.circleX;\n\t\t\t\tcy = hasRadar ? $$.radarCircleY : isRotated ? $$.circleX : $$.circleY;\n\t\t\t}\n\t\t\tif (hasTreemap && $$.state.isCanvasMode) xForText = yForText = function() {};\n\t\t\telse {\n\t\t\t\txForText = $$.generateXYForText(shape.indices, true);\n\t\t\t\tyForText = $$.generateXYForText(shape.indices, false);\n\t\t\t}\n\t\t\tshape.pos = {\n\t\t\t\txForText,\n\t\t\t\tyForText,\n\t\t\t\tcx: (cx || function() {}).bind($$),\n\t\t\t\tcy: (cy || function() {}).bind($$)\n\t\t\t};\n\t\t}\n\t\treturn shape;\n\t},\n\t/**\n\t* Get shape's indices according it's position within each axis tick.\n\t*\n\t* From the below example, indices will be:\n\t* ==> {data1: 0, data2: 0, data3: 1, data4: 1, __max__: 1}\n\t*\n\t* \tdata1 data3 data1 data3\n\t* \tdata2 data4 data2 data4\n\t* \t-------------------------\n\t* \t\t 0 1\n\t* @param {function} typeFilter Chart type filter function\n\t* @returns {object} Indices object with its position\n\t*/\n\tgetShapeIndices(typeFilter) {\n\t\tconst $$ = this;\n\t\tconst { config } = $$;\n\t\tconst xs = config.data_xs;\n\t\tconst hasXs = notEmpty(xs);\n\t\tconst indices = {};\n\t\tlet i = hasXs ? {} : 0;\n\t\tif (hasXs) getUnique(Object.keys(xs).map((v) => xs[v])).forEach((v) => {\n\t\t\ti[v] = 0;\n\t\t\tindices[v] = {};\n\t\t});\n\t\t$$.filterTargetsToShow($$.data.targets.filter(typeFilter, $$)).forEach((d) => {\n\t\t\tconst xKey = d.id in xs ? xs[d.id] : \"\";\n\t\t\tconst ind = xKey ? indices[xKey] : indices;\n\t\t\tfor (let j = 0, groups; groups = config.data_groups[j]; j++) {\n\t\t\t\tif (groups.indexOf(d.id) < 0) continue;\n\t\t\t\tfor (let k = 0, key; key = groups[k]; k++) {\n\t\t\t\t\tif (key in ind) {\n\t\t\t\t\t\tind[d.id] = ind[key];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif (d.id !== key && xKey) ind[key] = ind[d.id] ?? i[xKey];\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (isUndefined(ind[d.id])) {\n\t\t\t\tind[d.id] = xKey ? i[xKey]++ : i++;\n\t\t\t\tind.__max__ = (xKey ? i[xKey] : i) - 1;\n\t\t\t}\n\t\t});\n\t\treturn indices;\n\t},\n\t/**\n\t* Get indices value based on data ID value\n\t* @param {object} indices Indices object\n\t* @param {object} d Data row\n\t* @param {string} caller Caller function name (Used only for 'sparkline' plugin)\n\t* @returns {object} Indices object\n\t* @private\n\t*/\n\tgetIndices(indices, d, caller) {\n\t\tconst $$ = this;\n\t\tconst { data_xs: xs, bar_indices_removeNull: removeNull } = $$.config;\n\t\tconst { id, index } = d;\n\t\tif ($$.isBarType(id) && removeNull) {\n\t\t\tconst ind = {};\n\t\t\t$$.getAllValuesOnIndex(index, true).forEach((v, i) => {\n\t\t\t\tind[v.id] = i;\n\t\t\t\tind.__max__ = i;\n\t\t\t});\n\t\t\treturn ind;\n\t\t}\n\t\treturn notEmpty(xs) ? indices[xs[id]] : indices;\n\t},\n\t/**\n\t* Get indices max number\n\t* @param {object} indices Indices object\n\t* @returns {number} Max number\n\t* @private\n\t*/\n\tgetIndicesMax(indices) {\n\t\tif (!notEmpty(this.config.data_xs)) return indices.__max__;\n\t\tlet total = 0;\n\t\tfor (const key in indices) total += indices[key].__max__ || 0;\n\t\treturn total;\n\t},\n\tgetShapeX(offset, indices, isSub) {\n\t\tconst $$ = this;\n\t\tconst { config, scale } = $$;\n\t\tconst currScale = isSub ? scale.subX : scale.zoom || scale.x;\n\t\tconst barOverlap = config.bar_overlap;\n\t\tconst barPadding = config.bar_padding;\n\t\tconst sum = (p, c) => p + c;\n\t\tconst halfWidth = isObjectType(offset) && (offset._$total.length ? offset._$total.reduce(sum) / 2 : 0);\n\t\tconst prefixSums = [];\n\t\tif (halfWidth && isObjectType(offset) && offset._$total.length) {\n\t\t\tlet acc = 0;\n\t\t\tfor (const v of offset._$total) {\n\t\t\t\tacc += v;\n\t\t\t\tprefixSums.push(acc);\n\t\t\t}\n\t\t}\n\t\treturn (d) => {\n\t\t\tconst ind = $$.getIndices(indices, d, \"getShapeX\");\n\t\t\tconst index = d.id in ind ? ind[d.id] : 0;\n\t\t\tconst targetsNum = (ind.__max__ || 0) + 1;\n\t\t\tlet x = 0;\n\t\t\tif (notEmpty(d.x)) {\n\t\t\t\tconst xPos = currScale(d.x, true);\n\t\t\t\tif (halfWidth) {\n\t\t\t\t\tconst offsetWidth = offset[d.id] || offset._$width;\n\t\t\t\t\tx = barOverlap ? xPos - offsetWidth / 2 : xPos - offsetWidth + (prefixSums[index] ?? offset._$total.slice(0, index + 1).reduce(sum)) - halfWidth;\n\t\t\t\t} else x = xPos - (isNumber(offset) ? offset : offset._$width) * (targetsNum / 2 - (barOverlap ? 1 : index));\n\t\t\t}\n\t\t\tif (offset && x && targetsNum > 1 && barPadding) {\n\t\t\t\tif (index) x += barPadding * index;\n\t\t\t\tif (targetsNum > 2) x -= (targetsNum - 1) * barPadding / 2;\n\t\t\t\telse if (targetsNum === 2) x -= barPadding / 2;\n\t\t\t}\n\t\t\treturn x;\n\t\t};\n\t},\n\tgetShapeY(isSub) {\n\t\tconst $$ = this;\n\t\tconst isStackNormalized = $$.isStackNormalized();\n\t\treturn (d) => {\n\t\t\tlet { value } = d;\n\t\t\tconst subchartCandlestickValue = isSub ? getSubchartCandlestickShapeValue($$, d, isSub) : void 0;\n\t\t\tif (isNumber(d)) value = d;\n\t\t\telse if (isNumber(subchartCandlestickValue)) value = subchartCandlestickValue;\n\t\t\telse if ($$.isAreaRangeType(d)) value = $$.getBaseValue(d, \"mid\");\n\t\t\telse if (isStackNormalized) value = $$.getRatio(\"index\", d, true);\n\t\t\telse if ($$.isBubbleZType(d)) value = $$.getBubbleZData(d.value, \"y\");\n\t\t\telse if ($$.isBarRangeType(d)) value = value[1];\n\t\t\treturn $$.getYScaleById(d.id, isSub)(value);\n\t\t};\n\t},\n\t/**\n\t* Get shape based y Axis min value\n\t* @param {string} id Data id\n\t* @param {boolean} isSub Whether to use subchart scale\n\t* @returns {number}\n\t* @private\n\t*/\n\tgetShapeYMin(id, isSub = false) {\n\t\tconst $$ = this;\n\t\tconst axisId = $$.axis.getId(id);\n\t\tconst [yMin] = $$.getYScaleById(id, isSub).domain();\n\t\tconst inverted = $$.config[`axis_${axisId}_inverted`];\n\t\treturn !$$.isGrouped(id) && !inverted && yMin > 0 ? yMin : 0;\n\t},\n\t/**\n\t* Get Shape's offset data\n\t* @param {function} typeFilter Type filter function\n\t* @param {boolean} isSub Whether coordinates are for the subchart\n\t* @returns {object}\n\t* @private\n\t*/\n\tgetShapeOffsetData(typeFilter, isSub) {\n\t\tconst $$ = this;\n\t\tconst targets = $$.orderTargets($$.filterTargetsToShow($$.data.targets.filter(typeFilter, $$)));\n\t\tconst dataGeneration = $$.state.dataGeneration;\n\t\tconst targetIds = targets.map((t) => t.id).join(\"_\");\n\t\tconst cacheKey = `${KEY.shapeOffset}_${isSub ? \"sub\" : \"main\"}_${targetIds}`;\n\t\tconst cachedData = $$.cache.get(cacheKey);\n\t\tif (cachedData?.generation === dataGeneration) return cachedData;\n\t\tconst isStackNormalized = $$.isStackNormalized();\n\t\tconst shapeOffsetTargets = targets.map((target) => {\n\t\t\tlet rowValues = target.values;\n\t\t\tconst values = {};\n\t\t\tif ($$.isStepType(target)) rowValues = $$.convertValuesToStep(rowValues);\n\t\t\tconst rowValueMapByXValue = rowValues.reduce((out, d) => {\n\t\t\t\tconst key = Number(d.x);\n\t\t\t\tconst value = getShapeOffsetValue($$, d, isSub);\n\t\t\t\tout[key] = d;\n\t\t\t\tvalues[key] = isStackNormalized ? $$.getRatio(\"index\", d, true) : value;\n\t\t\t\treturn out;\n\t\t\t}, {});\n\t\t\treturn {\n\t\t\t\tid: target.id,\n\t\t\t\trowValues,\n\t\t\t\trowValueMapByXValue,\n\t\t\t\tvalues\n\t\t\t};\n\t\t});\n\t\tconst result = {\n\t\t\tgeneration: dataGeneration,\n\t\t\tindexMapByTargetId: targets.reduce((out, { id }, index) => {\n\t\t\t\tout[id] = index;\n\t\t\t\treturn out;\n\t\t\t}, {}),\n\t\t\tshapeOffsetTargets\n\t\t};\n\t\t$$.cache.add(cacheKey, result);\n\t\treturn result;\n\t},\n\tgetShapeOffset(typeFilter, indices, isSub) {\n\t\tconst $$ = this;\n\t\tconst { shapeOffsetTargets, indexMapByTargetId } = $$.getShapeOffsetData(typeFilter, isSub);\n\t\tconst groupsZeroAs = $$.config.data_groupsZeroAs;\n\t\tlet sameGroupByTargetId = null;\n\t\tif (!$$.config.bar_indices_removeNull) {\n\t\t\tsameGroupByTargetId = /* @__PURE__ */ new Map();\n\t\t\tfor (const target of shapeOffsetTargets) {\n\t\t\t\tconst ind = $$.getIndices(indices, {\n\t\t\t\t\tid: target.id,\n\t\t\t\t\tindex: 0\n\t\t\t\t});\n\t\t\t\tsameGroupByTargetId.set(target.id, shapeOffsetTargets.filter((t) => t.id !== target.id && ind[t.id] === ind[target.id]));\n\t\t\t}\n\t\t}\n\t\treturn (d, idx) => {\n\t\t\tconst { id, value, x } = d;\n\t\t\tconst baseValue = getShapeOffsetValue($$, d, isSub);\n\t\t\tconst ind = $$.getIndices(indices, d);\n\t\t\tconst scale = $$.getYScaleById(id, isSub);\n\t\t\tif ($$.isBarRangeType(d)) return scale(value[0]);\n\t\t\tconst dataXAsNumber = Number(x);\n\t\t\tconst y0 = scale(groupsZeroAs === \"zero\" ? 0 : $$.getShapeYMin(id, isSub));\n\t\t\tlet offset = y0;\n\t\t\tconst sameGroupTargets = sameGroupByTargetId?.get(id) ?? shapeOffsetTargets.filter((t) => t.id !== id && ind[t.id] === ind[id]);\n\t\t\tfor (const t of sameGroupTargets) {\n\t\t\t\tconst { id: tid, rowValueMapByXValue, rowValues, values: tvalues } = t;\n\t\t\t\tif (indexMapByTargetId[tid] < indexMapByTargetId[id]) {\n\t\t\t\t\tconst rValue = tvalues[dataXAsNumber];\n\t\t\t\t\tlet row = rowValues[idx];\n\t\t\t\t\tif (!row || Number(row.x) !== dataXAsNumber) row = rowValueMapByXValue[dataXAsNumber];\n\t\t\t\t\tconst rowValue = row && getShapeOffsetValue($$, row, isSub);\n\t\t\t\t\tif (isNumber(rowValue) && isNumber(baseValue) && rowValue * baseValue >= 0 && isNumber(rValue)) {\n\t\t\t\t\t\tif (baseValue === 0 ? groupsZeroAs === \"positive\" && rValue > 0 || groupsZeroAs === \"negative\" && rValue < 0 : true) offset += scale(rValue) - y0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn offset;\n\t\t};\n\t},\n\t/**\n\t* Generate line coordinate points from shared geometry.\n\t* @param {object} lineIndices Data order within x axis\n\t* @param {boolean} isSub Whether the coordinates are for subchart\n\t* @param {function} typeFilter Type filter for offset targets\n\t* @returns {function} Line point generator\n\t* @private\n\t*/\n\tgenerateGetLinePoints(lineIndices, isSub, typeFilter) {\n\t\tconst $$ = this;\n\t\tconst { config } = $$;\n\t\tconst x = $$.getShapeX(0, lineIndices, isSub);\n\t\tconst y = $$.getShapeY(isSub);\n\t\tconst lineOffset = $$.getShapeOffset(typeFilter || $$.isLineType, lineIndices, isSub);\n\t\tconst yScale = $$.getYScaleById.bind($$);\n\t\tconst y0Cache = /* @__PURE__ */ new Map();\n\t\treturn (d, i) => {\n\t\t\tlet y0 = y0Cache.get(d.id);\n\t\t\tif (y0 === void 0) {\n\t\t\t\ty0 = yScale.call($$, d.id, isSub)($$.getShapeYMin(d.id, isSub));\n\t\t\t\ty0Cache.set(d.id, y0);\n\t\t\t}\n\t\t\tconst offset = lineOffset(d, i) || y0;\n\t\t\tconst posX = x(d);\n\t\t\tlet posY = y(d);\n\t\t\tif (config.axis_rotated && (d.value > 0 && posY < y0 || d.value < 0 && y0 < posY)) posY = y0;\n\t\t\tconst point = [posX, posY - (y0 - offset)];\n\t\t\treturn [\n\t\t\t\tpoint,\n\t\t\t\tpoint,\n\t\t\t\tpoint,\n\t\t\t\tpoint\n\t\t\t];\n\t\t};\n\t},\n\t/**\n\t* Generate area coordinate points from shared geometry.\n\t* @param {object} areaIndices Data order within x axis\n\t* @param {boolean} isSub Whether the coordinates are for subchart\n\t* @returns {function} Area point generator\n\t* @private\n\t*/\n\tgenerateGetAreaPoints(areaIndices, isSub) {\n\t\tconst $$ = this;\n\t\tconst { config } = $$;\n\t\tconst x = $$.getShapeX(0, areaIndices, isSub);\n\t\tconst y = $$.getShapeY(!!isSub);\n\t\tconst areaOffset = $$.getShapeOffset($$.isAreaType, areaIndices, isSub);\n\t\tconst yScale = $$.getYScaleById.bind($$);\n\t\tconst y0Cache = /* @__PURE__ */ new Map();\n\t\treturn function(d, i) {\n\t\t\tlet y0 = y0Cache.get(d.id);\n\t\t\tif (y0 === void 0) {\n\t\t\t\ty0 = yScale.call($$, d.id, isSub)($$.getShapeYMin(d.id, isSub));\n\t\t\t\ty0Cache.set(d.id, y0);\n\t\t\t}\n\t\t\tconst offset = areaOffset(d, i) || y0;\n\t\t\tconst posX = x(d);\n\t\t\tconst value = d.value;\n\t\t\tlet posY = y(d);\n\t\t\tif (config.axis_rotated && (value > 0 && posY < y0 || value < 0 && y0 < posY)) posY = y0;\n\t\t\treturn [\n\t\t\t\t[posX, offset],\n\t\t\t\t[posX, posY - (y0 - offset)],\n\t\t\t\t[posX, posY - (y0 - offset)],\n\t\t\t\t[posX, offset]\n\t\t\t];\n\t\t};\n\t},\n\t/**\n\t* Generate bar coordinate points from shared geometry.\n\t* @param {object} barIndices Data order within x axis\n\t* @param {boolean} isSub Whether the coordinates are for subchart\n\t* @returns {function} Bar point generator\n\t* @private\n\t*/\n\tgenerateGetBarPoints(barIndices, isSub) {\n\t\tconst $$ = this;\n\t\tconst { config } = $$;\n\t\tconst axis = isSub ? $$.axis.subX : $$.axis.x;\n\t\tconst barTargetsNum = $$.getIndicesMax(barIndices) + 1;\n\t\tconst barW = $$.getBarW(\"bar\", axis, barTargetsNum);\n\t\tconst barX = $$.getShapeX(barW, barIndices, !!isSub);\n\t\tconst barY = $$.getShapeY(!!isSub);\n\t\tconst barOffset = $$.getShapeOffset($$.isBarType, barIndices, !!isSub);\n\t\tconst yScale = $$.getYScaleById.bind($$);\n\t\tconst idCache = /* @__PURE__ */ new Map();\n\t\treturn (d, i) => {\n\t\t\tconst { id } = d;\n\t\t\tlet idInfo = idCache.get(id);\n\t\t\tif (!idInfo) {\n\t\t\t\tidInfo = {\n\t\t\t\t\ty0: yScale.call($$, id, isSub)($$.getShapeYMin(id, isSub)),\n\t\t\t\t\tisInverted: config[`axis_${$$.axis.getId(id)}_inverted`]\n\t\t\t\t};\n\t\t\t\tidCache.set(id, idInfo);\n\t\t\t}\n\t\t\tconst { y0, isInverted } = idInfo;\n\t\t\tconst offset = barOffset(d, i) || y0;\n\t\t\tconst width = isNumber(barW) ? barW : barW[d.id] || barW._$width;\n\t\t\tconst value = d.value;\n\t\t\tconst posX = barX(d);\n\t\t\tlet posY = barY(d);\n\t\t\tif (config.axis_rotated && !isInverted && (value > 0 && posY < y0 || value < 0 && y0 < posY)) posY = y0;\n\t\t\tif (!$$.isBarRangeType(d)) posY -= y0 - offset;\n\t\t\tconst startPosX = posX + width;\n\t\t\treturn [\n\t\t\t\t[posX, offset],\n\t\t\t\t[posX, posY],\n\t\t\t\t[startPosX, posY],\n\t\t\t\t[startPosX, offset]\n\t\t\t];\n\t\t};\n\t},\n\t/**\n\t* Get data's y coordinate\n\t* @param {object} d Target data\n\t* @param {number} i Index number\n\t* @returns {number} y coordinate\n\t* @private\n\t*/\n\tcircleY(d, i) {\n\t\tconst $$ = this;\n\t\tconst id = d.id;\n\t\tlet points;\n\t\tif ($$.isGrouped(id)) points = _getGroupedDataPointsFn.bind($$)(d);\n\t\treturn points ? points(d, i)[0][1] : $$.getYScaleById(id)($$.getBaseValue(d));\n\t},\n\t/**\n\t* Get data point x coordinate.\n\t* @param {object} d Data row\n\t* @returns {number|null} X coordinate\n\t* @private\n\t*/\n\tcircleX(d) {\n\t\treturn this.xx(d);\n\t},\n\t/**\n\t* Generate data point y coordinate accessor.\n\t* @param {boolean} isSub Whether the coordinates are for subchart\n\t* @returns {function} Y coordinate accessor\n\t* @private\n\t*/\n\tupdateCircleY(isSub = false) {\n\t\tconst $$ = this;\n\t\tconst typeFilter = getLinePointGroupTypeFilter($$);\n\t\tconst getPoints = $$.generateGetLinePoints($$.getShapeIndices(typeFilter), isSub, typeFilter);\n\t\tconst y = $$.getShapeY(isSub);\n\t\treturn (d, i) => {\n\t\t\treturn $$.isGrouped(d.id) && isLinePointGroupType($$, d) ? getPoints(d, i)[0][1] : y(d);\n\t\t};\n\t},\n\t/**\n\t* Get candlestick data projected for alternate subchart shapes.\n\t* @param {object} d Data row\n\t* @param {boolean} isSub Whether coordinates are for the subchart\n\t* @returns {number|undefined} Projected value\n\t* @private\n\t*/\n\tgetSubchartCandlestickShapeValue(d, isSub) {\n\t\treturn getSubchartCandlestickShapeValue(this, d, isSub);\n\t},\n\t/**\n\t* Check whether the row should be drawn as a candlestick-derived subchart bar.\n\t* @param {object} d Data row\n\t* @param {boolean} isSub Whether coordinates are for the subchart\n\t* @returns {boolean}\n\t* @private\n\t*/\n\tisSubchartCandlestickBarValue(d, isSub) {\n\t\treturn isSubchartCandlestickBarValue(this, d, isSub);\n\t},\n\t/**\n\t* Get subchart bar color projected from candlestick up/down state.\n\t* @param {object} d Data row\n\t* @param {boolean} isSub Whether coordinates are for the subchart\n\t* @returns {string|null} Bar color\n\t* @private\n\t*/\n\tgetSubchartCandlestickBarColor(d, isSub) {\n\t\treturn getSubchartCandlestickBarColor(this, d, isSub);\n\t},\n\t/**\n\t* Get point radius.\n\t* @param {object} d Data row\n\t* @returns {number} Point radius\n\t* @private\n\t*/\n\tpointR(d) {\n\t\tconst $$ = this;\n\t\tconst { config } = $$;\n\t\tconst pointR = config.point_r;\n\t\tlet r = pointR;\n\t\tif ($$.isBubbleType(d)) r = $$.getBubbleR(d);\n\t\telse if (isFunction(pointR)) r = pointR.bind($$.api)(d);\n\t\td.r = r;\n\t\treturn r;\n\t},\n\t/**\n\t* Get focused point radius.\n\t* @param {object} d Data row\n\t* @returns {number} Focused point radius\n\t* @private\n\t*/\n\tpointExpandedR(d) {\n\t\tconst $$ = this;\n\t\tconst { config } = $$;\n\t\tconst scale = $$.isBubbleType(d) ? 1.15 : 1.75;\n\t\treturn config.point_focus_expand_enabled ? config.point_focus_expand_r || $$.pointR(d) * scale : $$.pointR(d);\n\t},\n\t/**\n\t* Get selected point radius.\n\t* @param {object} d Data row\n\t* @returns {number} Selected point radius\n\t* @private\n\t*/\n\tpointSelectR(d) {\n\t\tconst $$ = this;\n\t\tconst selectR = $$.config.point_select_r;\n\t\treturn isFunction(selectR) ? selectR(d) : selectR || $$.pointR(d) * 4;\n\t},\n\t/**\n\t* Check if point.focus.only option can be applied.\n\t* @returns {boolean} Whether focus-only point rendering is active\n\t* @private\n\t*/\n\tisPointFocusOnly() {\n\t\tconst $$ = this;\n\t\treturn $$.config.point_focus_only && !$$.hasType(\"bubble\") && !$$.hasType(\"scatter\") && !$$.hasArcType(null, [\"radar\"]);\n\t},\n\t/**\n\t* Get data point sensitivity radius.\n\t* @param {object} d Data point\n\t* @returns {number} Sensitivity radius\n\t* @private\n\t*/\n\tgetPointSensitivity(d) {\n\t\tconst $$ = this;\n\t\tlet sensitivity = $$.config.point_sensitivity;\n\t\tif (!d) return sensitivity;\n\t\telse if (isFunction(sensitivity)) sensitivity = sensitivity.call($$.api, d);\n\t\telse if (sensitivity === \"radius\") sensitivity = d.r;\n\t\treturn sensitivity;\n\t},\n\tgetBarW(type, axis, targetsNum) {\n\t\tconst $$ = this;\n\t\tconst { config, org, scale, state } = $$;\n\t\tconst maxDataCount = $$.getMaxDataCount();\n\t\tconst isGrouped = type === \"bar\" && config.data_groups?.length;\n\t\tconst configName = `${type}_width`;\n\t\tconst { k } = $$.getZoomTransform?.() ?? { k: 1 };\n\t\tconst xMinMax = [config.axis_x_min ?? org.xDomain[0], config.axis_x_max ?? org.xDomain[1]].map((v) => $$.axis.isTimeSeries() ? parseDate.call($$, v) : Number(v));\n\t\tlet tickInterval = axis.tickInterval(maxDataCount);\n\t\tif (scale.zoom && !$$.axis.isCategorized() && k > 1) {\n\t\t\tconst isSameMinMax = xMinMax.every((v, i) => v === org.xDomain[i]);\n\t\t\ttickInterval = org.xDomain.map((v, i) => {\n\t\t\t\tconst value = isSameMinMax ? v : v - Math.abs(xMinMax[i]);\n\t\t\t\treturn scale.zoom(value);\n\t\t\t}).reduce((a, c) => Math.abs(a) + c) / maxDataCount;\n\t\t}\n\t\tconst getWidth = (id) => {\n\t\t\tconst width = id ? config[configName][id] : config[configName];\n\t\t\tconst ratio = id ? width.ratio : config[`${configName}_ratio`];\n\t\t\tconst max = id ? width.max : config[`${configName}_max`];\n\t\t\tconst w = isNumber(width) ? width : isFunction(width) ? width.call($$, state.width, targetsNum, maxDataCount) : targetsNum ? tickInterval * ratio / targetsNum : 0;\n\t\t\treturn max && w > max ? max : w;\n\t\t};\n\t\tlet result = getWidth();\n\t\tif (!isGrouped && isObjectType(config[configName])) {\n\t\t\tresult = {\n\t\t\t\t_$width: result,\n\t\t\t\t_$total: []\n\t\t\t};\n\t\t\t$$.getTargetsToShow().forEach((v) => {\n\t\t\t\tif (config[configName][v.id]) {\n\t\t\t\t\tresult[v.id] = getWidth(v.id);\n\t\t\t\t\tresult._$total.push(result[v.id] || result._$width);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\treturn result;\n\t},\n\t/**\n\t* Get shape element\n\t* @param {string} shapeName Shape string\n\t* @param {number} i Index number\n\t* @param {string} id Data series id\n\t* @returns {d3Selection}\n\t* @private\n\t*/\n\tgetShapeByIndex(shapeName, i, id) {\n\t\tconst $$ = this;\n\t\tconst { $el } = $$;\n\t\tconst suffix = isValue(i) ? `-${i}` : ``;\n\t\tlet shape = $el[shapeName];\n\t\tif (shape && !shape.empty()) shape = shape.filter((d) => id ? d.id === id : true).filter((d) => isValue(i) ? d.index === i : true);\n\t\telse shape = (id ? $el.main.selectAll(`.${classes_default[`${shapeName}s`]}${$$.getTargetSelectorSuffix(id)}`) : $el.main).selectAll(`.${classes_default[shapeName]}${suffix}`);\n\t\treturn shape;\n\t},\n\tisWithinShape(that, d) {\n\t\tconst $$ = this;\n\t\tconst shape = select(that);\n\t\tlet isWithin;\n\t\tif (!$$.isTargetToShow(d.id)) isWithin = false;\n\t\telse if ($$.hasValidPointType?.(that.nodeName)) isWithin = $$.isStepType(d) ? $$.isWithinStep(that, $$.getYScaleById(d.id)($$.getBaseValue(d))) : $$.isWithinCircle(that, $$.isBubbleType(d) ? $$.pointSelectR(d) * 1.5 : 0);\n\t\telse if (that.nodeName === \"path\") isWithin = shape.classed(classes_default.bar) ? $$.isWithinBar(that) : true;\n\t\treturn isWithin;\n\t},\n\tgetInterpolate(d) {\n\t\tconst interpolation = this.getInterpolateType(d);\n\t\treturn CURVE_MAP[interpolation];\n\t},\n\t/**\n\t* Get curve generator for line-like shapes.\n\t* @param {object} d Data target\n\t* @returns {function} Curve generator\n\t* @private\n\t*/\n\tgetCurve(d) {\n\t\tconst $$ = this;\n\t\treturn $$.config.axis_rotated && $$.isStepType(d) ? (context) => {\n\t\t\tconst step = $$.getInterpolate(d)(context);\n\t\t\tstep.orgPoint = step.point;\n\t\t\tstep.pointRotated = function(x, y) {\n\t\t\t\tthis._point === 1 && (this._point = 2);\n\t\t\t\tconst y1 = this._y * (1 - this._t) + y * this._t;\n\t\t\t\tthis._context.lineTo(this._x, y1);\n\t\t\t\tthis._context.lineTo(x, y1);\n\t\t\t\tthis._x = x;\n\t\t\t\tthis._y = y;\n\t\t\t};\n\t\t\tstep.point = function(x, y) {\n\t\t\t\tthis._point === 0 ? this.orgPoint(x, y) : this.pointRotated(x, y);\n\t\t\t};\n\t\t\treturn step;\n\t\t} : $$.getInterpolate(d);\n\t},\n\tgetInterpolateType(d) {\n\t\tconst $$ = this;\n\t\tconst { config } = $$;\n\t\tconst type = config.spline_interpolation_type;\n\t\tconst interpolation = $$.isInterpolationType(type) ? type : \"cardinal\";\n\t\treturn $$.isSplineType(d) ? interpolation : $$.isStepType(d) ? config.line_step_type : \"linear\";\n\t},\n\tisWithinBar(that) {\n\t\tconst mouse = getPointer(this.state.event, that);\n\t\tconst [seg0, seg1, seg2] = getRectSegList(that);\n\t\tconst x = Math.min(seg0.x, seg1.x);\n\t\tconst y = Math.min(seg0.y, seg1.y);\n\t\tconst offset = this.config.bar_sensitivity;\n\t\tconst width = Math.abs(seg2.x - seg1.x);\n\t\tconst height = Math.abs(seg0.y - seg1.y);\n\t\tconst sx = x - offset;\n\t\tconst ex = x + width + offset;\n\t\tconst sy = y + height + offset;\n\t\tconst ey = y - offset;\n\t\treturn sx < mouse[0] && mouse[0] < ex && ey < mouse[1] && mouse[1] < sy;\n\t}\n};\n//#endregion\nexport { shape_default as default, getShapeColorWithGradient, initShapeElement, updateTargetsForShape };\n","/*!\n* Copyright (c) 2017 ~ present NAVER Corp.\r\n * billboard.js project is licensed under the MIT license\r\n * \r\n * billboard.js, JavaScript chart library\r\n * https://naver.github.io/billboard.js/\r\n * \r\n * @version 4.1.0\n*/\nimport { document as doc, window as win } from \"../module/browser.js\";\nimport { isBoolean, isFunction, isObject, isString, notEmpty } from \"../module/util/type-checks.js\";\nimport { callFn, capitalize, extend, getOption, getRandom, sortValue } from \"../module/util/object.js\";\nimport { convertInputType, hasStyle } from \"../module/util/dom.js\";\nimport { checkModuleImport } from \"../module/error.js\";\nimport { $CIRCLE, $COMMON, $TEXT } from \"../config/classes.js\";\nimport Options from \"../config/Options/Options.js\";\nimport Store from \"../config/Store/Store.js\";\nimport Cache from \"../module/Cache.js\";\nimport { generateResize } from \"../module/generator.js\";\nimport convert_default from \"./data/convert.js\";\nimport data_default from \"./data/data.js\";\nimport load_default from \"./data/load.js\";\nimport interaction_default from \"./interactions/interaction.js\";\nimport category_default from \"./internals/category.js\";\nimport class_default from \"./internals/class.js\";\nimport color_default from \"./internals/color.js\";\nimport domain_default from \"./internals/domain.js\";\nimport format_default from \"./internals/format.js\";\nimport legend_default from \"./internals/legend.js\";\nimport redraw_default from \"./internals/redraw.js\";\nimport scale_default from \"./internals/scale.js\";\nimport size_default from \"./internals/size.js\";\nimport style_default from \"./internals/style.js\";\nimport text_default from \"./internals/text.js\";\nimport title_default from \"./internals/title.js\";\nimport tooltip_default from \"./internals/tooltip.js\";\nimport transform_default from \"./internals/transform.js\";\nimport type_default from \"./internals/type.js\";\nimport shape_default from \"./shape/shape.js\";\nimport { select } from \"d3-selection\";\nimport { timeFormat, timeParse, utcFormat, utcParse } from \"d3-time-format\";\n//#region src/ChartInternal/ChartInternal.ts\n/**\n* Copyright (c) 2017 ~ present NAVER Corp.\n* billboard.js project is licensed under the MIT license\n* @ignore\n*/\n/**\n* Get the current time in ms.\n* @returns {number} Timestamp\n* @private\n*/\nfunction getTime() {\n\treturn win.performance?.now?.() ?? Date.now();\n}\n/**\n* Get SVG-only chart type reason for canvas render fallback.\n* @param {object} $$ ChartInternal instance\n* @returns {string|null} Unsupported chart type reason\n* @private\n*/\nfunction getUnsupportedCanvasRenderType($$) {\n\tif ($$.hasArcType()) return \"arc charts\";\n\tif ($$.hasType(\"funnel\")) return \"funnel chart\";\n\treturn null;\n}\n/**\n* Fall back to SVG when canvas mode is requested for unsupported chart types.\n* @param {object} $$ ChartInternal instance\n* @private\n*/\nfunction fallbackUnsupportedCanvasRenderMode($$) {\n\tconst { config } = $$;\n\tconst unsupportedType = config.render_mode === \"canvas\" ? getUnsupportedCanvasRenderType($$) : null;\n\tif (!unsupportedType) return;\n\twin.console?.warn?.(`[billboard.js] render.mode='canvas' is ignored for ${unsupportedType}; falling back to SVG.`);\n\tconfig.render_mode = \"svg\";\n}\n/**\n* Internal chart class.\n* - Note: Instantiated internally, not exposed for public.\n* @class ChartInternal\n* @ignore\n* @private\n*/\nvar ChartInternal = class {\n\tapi;\n\tconfig;\n\tcache;\n\t$el;\n\tstate;\n\tcharts;\n\tdata = {\n\t\txs: {},\n\t\ttargets: []\n\t};\n\taxis;\n\tscale = {\n\t\tx: null,\n\t\ty: null,\n\t\ty2: null,\n\t\tsubX: null,\n\t\tsubY: null,\n\t\tsubY2: null,\n\t\tzoom: null\n\t};\n\torg = {\n\t\txScale: null,\n\t\txDomain: null\n\t};\n\tcolor;\n\tpatterns;\n\tlevelColor;\n\tpoint;\n\tbrush;\n\tformat = {\n\t\textraLineClasses: null,\n\t\txAxisTick: null,\n\t\tdataTime: null,\n\t\tdefaultAxisTime: null,\n\t\taxisTime: null\n\t};\n\tconstructor(api) {\n\t\tconst $$ = this;\n\t\t$$.api = api;\n\t\t$$.config = new Options();\n\t\t$$.cache = new Cache();\n\t\tconst store = new Store();\n\t\t$$.$el = store.getStore(\"element\");\n\t\t$$.state = store.getStore(\"state\");\n\t\t$$.$T = $$.$T.bind($$);\n\t}\n\t/**\n\t* Get the selection based on transition config\n\t* @param {SVGElement|d3Selection} selection Target selection\n\t* @param {boolean} force Force transition\n\t* @param {string} name Transition name\n\t* @returns {d3Selection}\n\t* @private\n\t*/\n\t$T(selection, force, name) {\n\t\tconst { config, state } = this;\n\t\tconst duration = config.transition_duration;\n\t\tconst subchart = config.subchart_show;\n\t\tlet t = selection;\n\t\tif (t) {\n\t\t\tif (\"tagName\" in t) t = select(t);\n\t\t\tt = (force !== false && duration || force) && (!state.zooming || state.dragging) && !state.resizing && state.rendered && !subchart ? t.transition(name).duration(duration) : t;\n\t\t}\n\t\treturn t;\n\t}\n\tbeforeInit() {\n\t\tconst $$ = this;\n\t\t$$.callPluginHook(\"$beforeInit\");\n\t\tcallFn($$.config.onbeforeinit, $$.api);\n\t}\n\tafterInit() {\n\t\tconst $$ = this;\n\t\t$$.callPluginHook(\"$afterInit\");\n\t\tcallFn($$.config.onafterinit, $$.api);\n\t}\n\tinit() {\n\t\tconst $$ = this;\n\t\tconst { config, state, $el } = $$;\n\t\tconst { boost_useCssRule, bindto } = config;\n\t\tcheckModuleImport($$);\n\t\tfallbackUnsupportedCanvasRenderMode($$);\n\t\tconst hasArcType = $$.hasArcType();\n\t\tstate.hasRadar = !state.hasAxis && $$.hasType(\"radar\");\n\t\tstate.hasFunnel = !state.hasAxis && $$.hasType(\"funnel\");\n\t\tstate.hasTreemap = !state.hasAxis && $$.hasType(\"treemap\");\n\t\tstate.hasAxis = !hasArcType && !state.hasFunnel && !state.hasTreemap;\n\t\tstate.datetimeId = `bb-${+/* @__PURE__ */ new Date() * getRandom()}`;\n\t\tif (boost_useCssRule) {\n\t\t\tconst styleEl = doc.createElement(\"style\");\n\t\t\tstyleEl.type = \"text/css\";\n\t\t\tdoc.head.appendChild(styleEl);\n\t\t\tstate.style = {\n\t\t\t\trootSelector: `.${state.datetimeId}`,\n\t\t\t\tsheet: styleEl.sheet\n\t\t\t};\n\t\t\t$el.style = styleEl;\n\t\t}\n\t\tconst bindConfig = {\n\t\t\telement: bindto,\n\t\t\tclassname: \"bb\"\n\t\t};\n\t\tif (isObject(bindto)) {\n\t\t\tbindConfig.element = bindto.element || \"#chart\";\n\t\t\tbindConfig.classname = bindto.classname || bindConfig.classname;\n\t\t}\n\t\t$el.chart = isFunction(bindConfig.element.node) ? bindto.element : select(bindConfig.element || []);\n\t\tif ($el.chart.empty()) $el.chart = select(doc.body.appendChild(doc.createElement(\"div\")));\n\t\t$el.chart.html(\"\").classed(bindConfig.classname, true).classed(state.datetimeId, boost_useCssRule).style(\"position\", \"relative\");\n\t\t$$.initParams();\n\t\t$$.initToRender();\n\t}\n\t/**\n\t* Initialize the rendering process\n\t* @param {boolean} forced Force to render process\n\t* @private\n\t*/\n\tinitToRender(forced) {\n\t\tconst $$ = this;\n\t\tconst { config, state, $el: { chart } } = $$;\n\t\tconst isHidden = () => hasStyle(chart, {\n\t\t\tdisplay: \"none\",\n\t\t\tvisibility: \"hidden\"\n\t\t});\n\t\tconst isLazy = config.render.lazy === false ? false : config.render.lazy || isHidden();\n\t\tconst MutationObserver = win.MutationObserver;\n\t\tif (isLazy && MutationObserver && config.render.observe !== false && !forced) new MutationObserver((mutation, observer) => {\n\t\t\tif (!isHidden()) {\n\t\t\t\tobserver.disconnect();\n\t\t\t\t!state.rendered && $$.initToRender(true);\n\t\t\t}\n\t\t}).observe(chart.node(), {\n\t\t\tattributes: true,\n\t\t\tattributeFilter: [\"class\", \"style\"]\n\t\t});\n\t\tif (!isLazy || forced) $$.convertData(config, (res) => {\n\t\t\t$$.initWithData(res);\n\t\t\t$$.afterInit();\n\t\t});\n\t}\n\tinitParams() {\n\t\tconst $$ = this;\n\t\tconst { config, format, state } = $$;\n\t\tif (config.render_mode === \"canvas\") $$.prepareCanvasConfig?.();\n\t\t$$.color = $$.generateColor();\n\t\t$$.levelColor = $$.generateLevelColor();\n\t\tif (config.padding === false) {\n\t\t\tconfig.axis_x_show = false;\n\t\t\tconfig.axis_y_show = false;\n\t\t\tconfig.axis_y2_show = false;\n\t\t\tconfig.subchart_show = false;\n\t\t}\n\t\tif (config.render_mode !== \"canvas\" && ($$.hasPointType() || $$.hasLegendDefsPoint?.())) $$.point = $$.generatePoint();\n\t\tif (state.hasAxis) {\n\t\t\t$$.initClip();\n\t\t\tformat.extraLineClasses = $$.generateExtraLineClass();\n\t\t\tformat.dataTime = config.data_xLocaltime ? timeParse : utcParse;\n\t\t\tformat.axisTime = config.axis_x_localtime ? timeFormat : utcFormat;\n\t\t\tconst isDragZoom = config.zoom_enabled && config.zoom_type === \"drag\";\n\t\t\tformat.defaultAxisTime = (d) => {\n\t\t\t\tconst { x, zoom } = $$.scale;\n\t\t\t\tconst isZoomed = isDragZoom ? zoom : zoom && x.orgDomain().toString() !== zoom.domain().toString();\n\t\t\t\tconst specifier = d.getMilliseconds() && \".%L\" || d.getSeconds() && \".:%S\" || d.getMinutes() && \"%I:%M\" || d.getHours() && \"%I %p\" || d.getDate() !== 1 && \"%b %d\" || isZoomed && d.getDate() === 1 && \"%b'%y\" || d.getMonth() && \"%-m/%-d\" || \"%Y\";\n\t\t\t\treturn format.axisTime(specifier)(d);\n\t\t\t};\n\t\t}\n\t\tconst { legend_position, legend_inset_anchor, axis_rotated } = config;\n\t\tstate.isLegendRight = legend_position === \"right\";\n\t\tstate.isLegendInset = legend_position === \"inset\";\n\t\tstate.isLegendTop = legend_inset_anchor === \"top-left\" || legend_inset_anchor === \"top-right\";\n\t\tstate.isLegendLeft = legend_inset_anchor === \"top-left\" || legend_inset_anchor === \"bottom-left\";\n\t\tstate.rotatedPadding.top = $$.getResettedPadding(state.rotatedPadding.top);\n\t\tstate.rotatedPadding.right = axis_rotated && !config.axis_x_show ? 0 : 30;\n\t\tstate.inputType = convertInputType(config.interaction_inputType_mouse, config.interaction_inputType_touch);\n\t}\n\tinitWithData(data) {\n\t\tconst $$ = this;\n\t\tconst { config, scale, state, $el, org } = $$;\n\t\tconst { hasAxis, hasFunnel, hasTreemap } = state;\n\t\tconst hasInteraction = config.interaction_enabled;\n\t\tconst hasPolar = $$.hasType(\"polar\");\n\t\tconst labelsBGColor = config.data_labels_backgroundColors;\n\t\tif (hasAxis) {\n\t\t\t$$.axis = $$.getAxisInstance();\n\t\t\tconfig.zoom_enabled && $$.initZoom();\n\t\t}\n\t\t$$.data.xs = {};\n\t\t$$.data.targets = $$.convertDataToTargets(data);\n\t\tif (config.data_filter) $$.data.targets = $$.data.targets.filter(config.data_filter.bind($$.api));\n\t\tif (config.data_hide) $$.addHiddenTargetIds(config.data_hide === true ? $$.mapToIds($$.data.targets) : config.data_hide);\n\t\tif (config.legend_hide) $$.addHiddenLegendIds(config.legend_hide === true ? $$.mapToIds($$.data.targets) : config.legend_hide);\n\t\t$$.updateSizes();\n\t\t$$.updateScales(true);\n\t\tif (hasAxis) {\n\t\t\tconst { x, y, y2, subX, subY, subY2 } = scale;\n\t\t\tif (x) {\n\t\t\t\tx.domain(sortValue($$.getXDomain($$.data.targets), !config.axis_x_inverted));\n\t\t\t\tsubX.domain(x.domain());\n\t\t\t\torg.xDomain = x.domain();\n\t\t\t}\n\t\t\tif (y) {\n\t\t\t\ty.domain($$.getYDomain($$.data.targets, \"y\"));\n\t\t\t\tsubY.domain(y.domain());\n\t\t\t}\n\t\t\tif (y2) {\n\t\t\t\ty2.domain($$.getYDomain($$.data.targets, \"y2\"));\n\t\t\t\tsubY2 && subY2.domain(y2.domain());\n\t\t\t}\n\t\t}\n\t\tif (config.render_mode === \"canvas\") {\n\t\t\tif (!$$.initCanvas) throw Error(\"[billboard.js] Please import and call canvas() to use render.mode='canvas'.\");\n\t\t\t$$.bindResize();\n\t\t\t$$.initCanvas();\n\t\t\tconfig.tooltip_show && $$.initTooltip();\n\t\t\t$$.callPluginHook(\"$init\");\n\t\t\tcallFn(config.oninit, $$.api);\n\t\t\t$$.redraw({\n\t\t\t\twithTransition: false,\n\t\t\t\twithTransform: true,\n\t\t\t\twithUpdateXDomain: true,\n\t\t\t\twithUpdateOrgXDomain: true,\n\t\t\t\twithTransitionForAxis: false,\n\t\t\t\tinitializing: true\n\t\t\t});\n\t\t\tif (config.data_onmin || config.data_onmax) {\n\t\t\t\tconst minMax = $$.getMinMaxData();\n\t\t\t\tcallFn(config.data_onmin, $$.api, minMax.min);\n\t\t\t\tcallFn(config.data_onmax, $$.api, minMax.max);\n\t\t\t}\n\t\t\tstate.rendered = true;\n\t\t\treturn;\n\t\t}\n\t\t$el.svg = $el.chart.append(\"svg\").style(\"overflow\", \"hidden\").style(\"display\", \"block\");\n\t\tif (hasInteraction && state.inputType) {\n\t\t\tconst isTouch = state.inputType === \"touch\";\n\t\t\tconst { onclick, onover, onout } = config;\n\t\t\tconst preventDefault = config.interaction_inputType_touch?.preventDefault;\n\t\t\tconst isPrevented = isBoolean(preventDefault) && preventDefault || false;\n\t\t\tconst touchOption = isTouch ? { passive: !isPrevented && (!isNaN(preventDefault) && preventDefault || null) === null } : void 0;\n\t\t\t$el.svg.on(\"click\", onclick?.bind($$.api) || null).on(isTouch ? \"touchstart\" : \"mouseenter\", onover?.bind($$.api) || null, touchOption).on(isTouch ? \"touchend\" : \"mouseleave\", onout?.bind($$.api) || null);\n\t\t}\n\t\tconfig.svg_classname && $el.svg.attr(\"class\", config.svg_classname);\n\t\tconst hasColorPatterns = isFunction(config.color_tiles) && $$.patterns;\n\t\tif (hasAxis || hasColorPatterns || hasPolar || hasTreemap || labelsBGColor || $$.hasLegendDefsPoint?.()) {\n\t\t\t$el.defs = $el.svg.append(\"defs\");\n\t\t\tif (hasAxis) [\n\t\t\t\t\"id\",\n\t\t\t\t\"idXAxis\",\n\t\t\t\t\"idYAxis\",\n\t\t\t\t\"idGrid\"\n\t\t\t].forEach((v) => {\n\t\t\t\t$$.appendClip($el.defs, state.clip[v]);\n\t\t\t});\n\t\t\t$$.generateTextBGColorFilter(labelsBGColor);\n\t\t\tif (hasColorPatterns) $$.patterns.forEach((p) => $el.defs.append(() => p.node));\n\t\t}\n\t\t$$.updateSvgSize();\n\t\t$$.bindResize();\n\t\tconst main = $el.svg.append(\"g\").classed($COMMON.main, true).attr(\"transform\", hasFunnel || hasTreemap ? null : $$.getTranslate(\"main\"));\n\t\t$el.main = main;\n\t\tconfig.subchart_show && $$.initSubchart();\n\t\tconfig.tooltip_show && $$.initTooltip();\n\t\tconfig.title_text && $$.initTitle();\n\t\t!hasTreemap && config.legend_show && $$.initLegend();\n\t\tif (config.data_empty_label_text) main.append(\"text\").attr(\"class\", `${$TEXT.text} ${$COMMON.empty}`).attr(\"text-anchor\", \"middle\").attr(\"dominant-baseline\", \"middle\");\n\t\tif (hasAxis) {\n\t\t\tconfig.regions.length && $$.initRegion?.();\n\t\t\t!config.clipPath && $$.axis.init();\n\t\t}\n\t\tmain.append(\"g\").classed($COMMON.chart, true).attr(\"clip-path\", hasAxis ? state.clip.path : null);\n\t\t$$.callPluginHook(\"$init\");\n\t\t$$.initChartElements();\n\t\tif (hasAxis) {\n\t\t\thasInteraction && $$.initEventRect?.();\n\t\t\t$$.initGrid?.();\n\t\t\tconfig.clipPath && $$.axis?.init();\n\t\t}\n\t\t$$.updateTargets($$.data.targets);\n\t\t$$.updateDimension();\n\t\tcallFn(config.oninit, $$.api);\n\t\t$$.setBackground();\n\t\t$$.redraw({\n\t\t\twithTransition: false,\n\t\t\twithTransform: true,\n\t\t\twithUpdateXDomain: true,\n\t\t\twithUpdateOrgXDomain: true,\n\t\t\twithTransitionForAxis: false,\n\t\t\tinitializing: true\n\t\t});\n\t\tif (config.data_onmin || config.data_onmax) {\n\t\t\tconst minMax = $$.getMinMaxData();\n\t\t\tcallFn(config.data_onmin, $$.api, minMax.min);\n\t\t\tcallFn(config.data_onmax, $$.api, minMax.max);\n\t\t}\n\t\tconfig.tooltip_show && $$.initShowTooltip();\n\t\tstate.rendered = true;\n\t}\n\t/**\n\t* Initialize chart elements\n\t* @private\n\t*/\n\tinitChartElements() {\n\t\tconst $$ = this;\n\t\tconst { hasAxis, hasRadar, hasTreemap } = $$.state;\n\t\tconst types = [];\n\t\tif (hasAxis) {\n\t\t\tconst shapes = [\n\t\t\t\t\"bar\",\n\t\t\t\t\"bubble\",\n\t\t\t\t\"candlestick\",\n\t\t\t\t\"line\"\n\t\t\t];\n\t\t\tif ($$.config.bar_front) shapes.push(shapes.shift());\n\t\t\tfor (const shape of shapes) {\n\t\t\t\tconst name = capitalize(shape);\n\t\t\t\tif (shape === \"line\" && $$.hasTypeOf(name) || $$.hasType(shape)) types.push(name);\n\t\t\t}\n\t\t} else if (hasTreemap) types.push(\"Treemap\");\n\t\telse if ($$.hasType(\"funnel\")) types.push(\"Funnel\");\n\t\telse {\n\t\t\tconst hasPolar = $$.hasType(\"polar\");\n\t\t\tconst hasGauge = $$.hasType(\"gauge\");\n\t\t\tif (!hasRadar) types.push(\"Arc\", \"Pie\");\n\t\t\tif (hasGauge) types.push(\"Gauge\");\n\t\t\telse if (hasRadar) types.push(\"Radar\");\n\t\t\telse if (hasPolar) types.push(\"Polar\");\n\t\t}\n\t\tfor (const type of types) $$[`init${type}`]();\n\t\tif (notEmpty($$.config.data_labels) && !$$.hasArcType(null, [\"radar\"])) $$.initText();\n\t}\n\t/**\n\t* Set chart elements\n\t* @private\n\t*/\n\tsetChartElements() {\n\t\tconst $$ = this;\n\t\tconst { $el: { chart, svg, defs, main, tooltip, legend, title, canvas, eventOverlay, grid, needle, arcs: arc, circle: circles, bar: bars, candlestick, line: lines, area: areas, text: texts } } = $$;\n\t\t$$.api.$ = {\n\t\t\tchart,\n\t\t\tsvg,\n\t\t\tcanvas,\n\t\t\teventOverlay,\n\t\t\tdefs,\n\t\t\tmain,\n\t\t\ttooltip,\n\t\t\tlegend,\n\t\t\ttitle,\n\t\t\tgrid,\n\t\t\tarc,\n\t\t\tcircles,\n\t\t\tbar: { bars },\n\t\t\tcandlestick,\n\t\t\tline: {\n\t\t\t\tlines,\n\t\t\t\tareas\n\t\t\t},\n\t\t\tneedle,\n\t\t\ttext: { texts }\n\t\t};\n\t}\n\t/**\n\t* Set background element/image\n\t* @private\n\t*/\n\tsetBackground() {\n\t\tconst { config: { background: bg }, state, $el: { svg } } = this;\n\t\tif (notEmpty(bg)) {\n\t\t\tconst element = svg.select(\"g\").insert(bg.imgUrl ? \"image\" : \"rect\", \":first-child\");\n\t\t\tif (bg.imgUrl) element.attr(\"href\", bg.imgUrl);\n\t\t\telse if (bg.color) element.style(\"fill\", bg.color).attr(\"clip-path\", state.clip.path);\n\t\t\telement.attr(\"class\", bg.class || null).attr(\"width\", \"100%\").attr(\"height\", \"100%\");\n\t\t}\n\t}\n\t/**\n\t* Update targeted element with given data\n\t* @param {object} targets Data object formatted as 'target'\n\t* @private\n\t*/\n\tupdateTargets(targets) {\n\t\tconst $$ = this;\n\t\tconst { hasAxis, hasFunnel, hasRadar, hasTreemap } = $$.state;\n\t\tconst helper = (type) => $$[`updateTargetsFor${type}`](targets.filter($$[`is${type}Type`].bind($$)));\n\t\t$$.updateTargetsForText(targets);\n\t\tif (hasAxis) {\n\t\t\tfor (const shape of [\n\t\t\t\t\"bar\",\n\t\t\t\t\"candlestick\",\n\t\t\t\t\"line\"\n\t\t\t]) {\n\t\t\t\tconst name = capitalize(shape);\n\t\t\t\tif (shape === \"line\" && $$.hasTypeOf(name) || $$.hasType(shape)) helper(name);\n\t\t\t}\n\t\t\t$$.updateTargetsForSubchart?.(targets);\n\t\t} else if ($$.hasArcType(targets)) {\n\t\t\tlet type = \"Arc\";\n\t\t\tif (hasRadar) type = \"Radar\";\n\t\t\telse if ($$.hasType(\"polar\")) type = \"Polar\";\n\t\t\thelper(type);\n\t\t} else if (hasFunnel) helper(\"Funnel\");\n\t\telse if (hasTreemap) helper(\"Treemap\");\n\t\tconst hasPointType = $$.hasType(\"bubble\") || $$.hasType(\"scatter\");\n\t\tif (hasPointType) $$.updateTargetForCircle?.();\n\t\t$$.filterTargetsToShowAtInit(hasPointType);\n\t}\n\t/**\n\t* Display targeted elements at initialization\n\t* @param {boolean} hasPointType whether has point type(bubble, scatter) or not\n\t* @private\n\t*/\n\tfilterTargetsToShowAtInit(hasPointType = false) {\n\t\tconst $$ = this;\n\t\tconst { $el: { svg }, $T } = $$;\n\t\tlet selector = `.${$COMMON.target}`;\n\t\tif (hasPointType) selector += `, .${$CIRCLE.chartCircles} > .${$CIRCLE.circles}`;\n\t\t$T(svg.selectAll(selector).filter((d) => $$.isTargetToShow(d.id))).style(\"opacity\", null);\n\t}\n\tgetWithOption(options) {\n\t\tconst withOptions = {\n\t\t\tDimension: true,\n\t\t\tEventRect: true,\n\t\t\tLegend: false,\n\t\t\tSubchart: true,\n\t\t\tTransform: false,\n\t\t\tTransition: true,\n\t\t\tTrimXDomain: true,\n\t\t\tUpdateXAxis: \"UpdateXDomain\",\n\t\t\tUpdateXDomain: false,\n\t\t\tUpdateOrgXDomain: false,\n\t\t\tTransitionForExit: \"Transition\",\n\t\t\tTransitionForAxis: \"Transition\",\n\t\t\tY: true\n\t\t};\n\t\tfor (const [key, defVal] of Object.entries(withOptions)) {\n\t\t\tconst value = isString(defVal) ? withOptions[defVal] : defVal;\n\t\t\twithOptions[key] = getOption(options, `with${key}`, value);\n\t\t}\n\t\treturn withOptions;\n\t}\n\tinitialOpacity(d) {\n\t\tconst $$ = this;\n\t\tconst { withoutFadeIn } = $$.state;\n\t\treturn $$.getBaseValue(d) !== null && withoutFadeIn[d.id] ? null : \"0\";\n\t}\n\tbindResize() {\n\t\tconst $$ = this;\n\t\tconst { $el, config, state } = $$;\n\t\tconst { resize_auto, resize_live } = config;\n\t\tconst isAutoResize = /^(true|parent)$/.test(resize_auto);\n\t\tconst list = [];\n\t\tconst redrawOnResize = () => {\n\t\t\tconst prevWidth = state.current.width;\n\t\t\tconst prevHeight = state.current.height;\n\t\t\t$$.setContainerSize();\n\t\t\tif (!state.resizePreview && prevWidth === state.current.width && prevHeight === state.current.height) return false;\n\t\t\tstate.resizing = true;\n\t\t\tstate.dirty.size = true;\n\t\t\tif (config.legend_show) {\n\t\t\t\t$$.updateSizes();\n\t\t\t\tstate.isCanvasMode ? $$.updateHtmlLegend?.() : $$.updateLegend();\n\t\t\t}\n\t\t\t$$.api.flush(false);\n\t\t\treturn true;\n\t\t};\n\t\tconst liveResize = () => {\n\t\t\tif (state.resizeLiveScale === null) state.resizeLiveScale = state.resizeRedrawTime > 16;\n\t\t\tif (state.resizeLiveScale) {\n\t\t\t\t$$.previewResize();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst start = getTime();\n\t\t\tif (redrawOnResize()) {\n\t\t\t\tstate.resizeRedrawTime = getTime() - start;\n\t\t\t\tstate.resizeLiveScale = state.resizeRedrawTime > 16;\n\t\t\t}\n\t\t};\n\t\tconst resizeFunction = generateResize(config.resize_timer, isAutoResize && resize_live ? liveResize : void 0);\n\t\tlist.push(() => callFn(config.onresize, $$.api));\n\t\tisAutoResize && list.push(redrawOnResize);\n\t\tlist.push(() => {\n\t\t\tcallFn(config.onresized, $$.api);\n\t\t\tstate.resizing = false;\n\t\t\tstate.resizeLiveScale = null;\n\t\t});\n\t\tlist.forEach((v) => resizeFunction.add(v));\n\t\t$$.resizeFunction = resizeFunction;\n\t\tif (resize_auto === \"parent\" && win.ResizeObserver) ($$.resizeFunction.resizeObserver = new win.ResizeObserver($$.resizeFunction.bind($$))).observe($el.chart.node().parentNode);\n\t\telse {\n\t\t\tif (resize_auto === \"parent\") win.console?.warn?.(\"[billboard.js] resize.auto='parent' requires ResizeObserver; falling back to window resize.\");\n\t\t\twin.addEventListener(\"resize\", $$.resizeFunction);\n\t\t}\n\t}\n\t/**\n\t* Call plugin hook\n\t* @param {string} phase The lifecycle phase\n\t* @param {Array} args Arguments\n\t* @private\n\t*/\n\tcallPluginHook(phase, ...args) {\n\t\tthis.config.plugins.forEach((v) => {\n\t\t\tif (phase === \"$beforeInit\") {\n\t\t\t\tv.$$ = this;\n\t\t\t\tthis.api.plugins.push(v);\n\t\t\t}\n\t\t\tv[phase](...args);\n\t\t});\n\t}\n};\nextend(ChartInternal.prototype, [\n\tconvert_default,\n\tdata_default,\n\tload_default,\n\tcategory_default,\n\tclass_default,\n\tcolor_default,\n\tdomain_default,\n\tinteraction_default,\n\tformat_default,\n\tlegend_default,\n\tredraw_default,\n\tscale_default,\n\tshape_default,\n\tsize_default,\n\tstyle_default,\n\ttext_default,\n\ttitle_default,\n\ttooltip_default,\n\ttransform_default,\n\ttype_default\n]);\n//#endregion\nexport { ChartInternal as default };\n","/*!\n* Copyright (c) 2017 ~ present NAVER Corp.\r\n * billboard.js project is licensed under the MIT license\r\n * \r\n * billboard.js, JavaScript chart library\r\n * https://naver.github.io/billboard.js/\r\n * \r\n * @version 4.1.0\n*/\nimport { isDefined, isObjectType } from \"../module/util/type-checks.js\";\n//#region src/config/config.ts\n/**\n* Load configuration option\n* @param {object} config User's generation config value\n* @private\n*/\nfunction loadConfig(config) {\n\tconst thisConfig = this.config;\n\tlet target;\n\tlet keys;\n\tlet read;\n\tconst find = () => {\n\t\tconst key = keys.shift();\n\t\tif (key && target && isObjectType(target) && key in target) {\n\t\t\ttarget = target[key];\n\t\t\treturn find();\n\t\t} else if (!key) return target;\n\t};\n\tObject.keys(thisConfig).forEach((key) => {\n\t\ttarget = config;\n\t\tkeys = key.split(\"_\");\n\t\tread = find();\n\t\tif (isDefined(read)) thisConfig[key] = read;\n\t});\n\tif (this.api) this.state.orgConfig = config;\n}\n//#endregion\nexport { loadConfig };\n","/*!\n* Copyright (c) 2017 ~ present NAVER Corp.\r\n * billboard.js project is licensed under the MIT license\r\n * \r\n * billboard.js, JavaScript chart library\r\n * https://naver.github.io/billboard.js/\r\n * \r\n * @version 4.1.0\n*/\nimport { window as win } from \"../../module/browser.js\";\nimport { isDefined, isEmpty, notEmpty } from \"../../module/util/type-checks.js\";\nimport { cleanupWorkers } from \"../../module/worker.js\";\n//#region src/Chart/api/chart.ts\n/**\n* Copyright (c) 2017 ~ present NAVER Corp.\n* billboard.js project is licensed under the MIT license\n*/\nvar chart_default = {\n\t/**\n\t* Resize the chart.\n\t* @function resize\n\t* @instance\n\t* @memberof Chart\n\t* @param {object} size This argument should include width and height in pixels.\n\t* @param {number} [size.width] width value\n\t* @param {number} [size.height] height value\n\t* @example\n\t* // Resize to 640x480\n\t* chart.resize({\n\t* width: 640,\n\t* height: 480\n\t* });\n\t*/\n\tresize(size) {\n\t\tconst $$ = this.internal;\n\t\tconst { config, state } = $$;\n\t\tif (state.rendered) {\n\t\t\tconfig.size_width = size ? size.width : null;\n\t\t\tconfig.size_height = size ? size.height : null;\n\t\t\tstate.resizing = true;\n\t\t\tstate.dirty.size = true;\n\t\t\tthis.flush(false);\n\t\t\t$$.resizeFunction();\n\t\t}\n\t},\n\t/**\n\t* Force to redraw.\n\t* - **NOTE:** When zoom/subchart is used, the zoomed state will be reset.\n\t* @function flush\n\t* @instance\n\t* @memberof Chart\n\t* @param {boolean} [soft] For soft redraw.\n\t* @example\n\t* chart.flush();\n\t*\n\t* // for soft redraw\n\t* chart.flush(true);\n\t*/\n\tflush(soft) {\n\t\tconst $$ = this.internal;\n\t\tconst { state, $el: { zoomResetBtn } } = $$;\n\t\tif (state.rendered) {\n\t\t\tif (state.resizing) $$.brush?.updateResize();\n\t\t\telse $$.axis?.setOrient();\n\t\t\tzoomResetBtn?.style(\"display\", \"none\");\n\t\t\tif ($$.scale.zoom) state.current.zoomDomain = $$.scale.zoom.domain();\n\t\t\t$$.scale.zoom = null;\n\t\t\tif (!state.resizing) state.dirty.data = true;\n\t\t\tsoft ? $$.redraw({\n\t\t\t\twithTransform: true,\n\t\t\t\twithUpdateXDomain: true,\n\t\t\t\twithUpdateOrgXDomain: true,\n\t\t\t\twithLegend: true\n\t\t\t}) : $$.updateAndRedraw({\n\t\t\t\twithLegend: true,\n\t\t\t\twithTransition: false,\n\t\t\t\twithTransitionForTransform: false\n\t\t\t});\n\t\t\tif (!state.resizing && $$.brush) {\n\t\t\t\t$$.brush.getSelection().call($$.brush.move);\n\t\t\t\t$$.unselectRect();\n\t\t\t}\n\t\t\tif (state.current.zoomDomain) {\n\t\t\t\t$$.api.zoom(state.current.zoomDomain);\n\t\t\t\tstate.current.zoomDomain = null;\n\t\t\t}\n\t\t} else $$.initToRender(true);\n\t},\n\t/**\n\t* Reset the chart object and remove element and events completely.\n\t* @function destroy\n\t* @instance\n\t* @memberof Chart\n\t* @returns {null}\n\t* @example\n\t* chart.destroy();\n\t*/\n\tdestroy() {\n\t\tconst $$ = this.internal;\n\t\tconst { state, $el: { chart, style, svg } } = $$;\n\t\tif (notEmpty($$)) {\n\t\t\t$$.callPluginHook(\"$willDestroy\");\n\t\t\t$$.cache?.remove([\"setOverOut\", \"callOverOutForTouch\"]);\n\t\t\t$$.charts.splice($$.charts.indexOf(this), 1);\n\t\t\t$$.charts.length === 0 && cleanupWorkers();\n\t\t\t$$.unbindAllEvents();\n\t\t\tsvg?.select(\"*\").interrupt();\n\t\t\tstate.canvasFlowFrame !== null && win.cancelAnimationFrame?.(state.canvasFlowFrame);\n\t\t\tstate.canvasFlowFrame = null;\n\t\t\tstate.canvasFlowFinish = null;\n\t\t\tstate.pendingRaf !== null && win.cancelAnimationFrame?.(state.pendingRaf);\n\t\t\tstate.pendingRaf = null;\n\t\t\t$$.canvasRenderer?.destroy();\n\t\t\t$$.canvasEngine?.destroy();\n\t\t\t$$.resizeFunction?.clear();\n\t\t\t$$.resizeFunction?.clearLive?.();\n\t\t\t$$.resizeFunction?.resizeObserver?.disconnect();\n\t\t\t$$.resizeFunction && win.removeEventListener(\"resize\", $$.resizeFunction);\n\t\t\tchart.classed(\"bb\", false).style(\"position\", null);\n\t\t\tif (state.isCanvasMode) chart.style(\"min-height\", state.canvasInlineStyle.minHeight || null);\n\t\t\tchart.selectChildren().remove();\n\t\t\tstyle && style.parentNode.removeChild(style);\n\t\t\tObject.keys(this).forEach((key) => {\n\t\t\t\tkey === \"internal\" && Object.keys($$).forEach((k) => {\n\t\t\t\t\t$$[k] = null;\n\t\t\t\t});\n\t\t\t\tthis[key] = null;\n\t\t\t\tdelete this[key];\n\t\t\t});\n\t\t\tfor (const key in this) this[key] = () => {};\n\t\t}\n\t\treturn null;\n\t},\n\t/**\n\t* Get or set config option value.\n\t* - **NOTE**\n\t* - The option key name must be specified as the last level.\n\t* - When no argument is given, it will return all specified generation options object only. (will exclude any other options not specified at the initialization)\n\t* @function config\n\t* @instance\n\t* @memberof Chart\n\t* @param {string} name The option key name.\n\t* @param {string|number|boolean|object|Array} [value] The value accepted for indicated option.\n\t* @param {boolean} [redraw] Set to redraw with the new option changes.\n\t* - **NOTE:** Doesn't guarantee to work in all circumstances. It can be applied for limited options only.\n\t* @returns {string|number|boolean|object|Array} The option value or all options object\n\t* @example\n\t*\n\t* // Getter\n\t* chart.config(\"gauge.max\");\n\t*\n\t* // Getter specified with top level key name will not work.\n\t* // The option key name must be specified as the last level.\n\t* // chart.config(\"gauge\"); // will not work\n\t*\n\t* // without any arguments, it returns generation config object\n\t* chart.config(); // {data: { ... }, axis: { ... }, ...}\n\t*\n\t* // Setter\n\t* chart.config(\"gauge.max\", 100);\n\t*\n\t* // Setter specified with top level key name will not work.\n\t* // The option key name must be specified as the last level.\n\t* // chart.config(\"gauge\", {min: 10, max: 20}); // will not work\n\t*\n\t* // Setter & redraw with the new option\n\t* chart.config(\"gauge.max\", 100, true);\n\t*/\n\tconfig(name, value, redraw) {\n\t\tconst { config, state } = this.internal;\n\t\tconst key = name?.replace(/\\./g, \"_\");\n\t\tlet res;\n\t\tif (name && key in config) {\n\t\t\tif (isDefined(value)) {\n\t\t\t\tconfig[key] = value;\n\t\t\t\tres = value;\n\t\t\t\tredraw && this.flush();\n\t\t\t} else res = config[key];\n\t\t} else if (arguments.length === 0 || isEmpty(name)) res = state.orgConfig;\n\t\treturn res;\n\t}\n};\n//#endregion\nexport { chart_default as default };\n","/*!\n* Copyright (c) 2017 ~ present NAVER Corp.\r\n * billboard.js project is licensed under the MIT license\r\n * \r\n * billboard.js, JavaScript chart library\r\n * https://naver.github.io/billboard.js/\r\n * \r\n * @version 4.1.0\n*/\n//#region src/Chart/api/color.ts\n/**\n* Copyright (c) 2017 ~ present NAVER Corp.\n* billboard.js project is licensed under the MIT license\n*/\nvar color_default = { \n/**\n* Get the color\n* @function color\n* @instance\n* @memberof Chart\n* @param {string} id id to get the color\n* @returns {string}\n* @example\n* chart.color(\"data1\");\n*/\ncolor(id) {\n\treturn this.internal.color(id);\n} };\n//#endregion\nexport { color_default as default };\n","/*!\n* Copyright (c) 2017 ~ present NAVER Corp.\r\n * billboard.js project is licensed under the MIT license\r\n * \r\n * billboard.js, JavaScript chart library\r\n * https://naver.github.io/billboard.js/\r\n * \r\n * @version 4.1.0\n*/\nimport { isArray, isUndefined } from \"../../module/util/type-checks.js\";\nimport { extend } from \"../../module/util/object.js\";\n//#region src/Chart/api/data.ts\n/**\n* Get data loaded in the chart.\n* @function data\n* @instance\n* @memberof Chart\n* @param {string|Array} targetIds If this argument is given, this API returns the specified target data. If this argument is not given, all of data will be returned.\n* @returns {Array} Data objects\n* @example\n* // Get only data1 data\n* chart.data(\"data1\");\n* // --> [{id: \"data1\", id_org: \"data1\", values: Array(6)}, ...]\n*\n* // Get data1 and data2 data\n* chart.data([\"data1\", \"data2\"]);\n*\n* // Get all data\n* chart.data();\n*/\nconst data = function(targetIds) {\n\tconst { targets } = this.internal.data;\n\tif (!isUndefined(targetIds)) {\n\t\tconst ids = isArray(targetIds) ? targetIds : [targetIds];\n\t\treturn targets.filter((t) => ids.some((v) => v === t.id));\n\t}\n\treturn targets;\n};\nextend(data, {\n\t/**\n\t* Get data shown in the chart.\n\t* @function data․shown\n\t* @instance\n\t* @memberof Chart\n\t* @param {string|Array} targetIds If this argument is given, this API filters the data with specified target ids. If this argument is not given, all shown data will be returned.\n\t* @returns {Array} Data objects\n\t* @example\n\t* // Get shown data by filtering to include only data1 data\n\t* chart.data.shown(\"data1\");\n\t* // --> [{id: \"data1\", id_org: \"data1\", values: Array(6)}, ...]\n\t*\n\t* // Get shown data by filtering to include data1 and data2 data\n\t* chart.data.shown([\"data1\", \"data2\"]);\n\t*\n\t* // Get all shown data\n\t* chart.data.shown();\n\t*/\n\tshown: function(targetIds) {\n\t\treturn this.internal.filterTargetsToShow(this.data(targetIds));\n\t},\n\t/**\n\t* Get values of the data loaded in the chart.\n\t* @function data․values\n\t* @instance\n\t* @memberof Chart\n\t* @param {string|Array|null} targetIds This API returns the values of specified target. If this argument is not given, null will be returned\n\t* @param {boolean} [flat=true] Get flatten values\n\t* @returns {Array} Data values\n\t* @example\n\t* // Get data1 values\n\t* chart.data.values(\"data1\");\n\t* // --> [10, 20, 30, 40]\n\t*/\n\tvalues: function(targetIds, flat = true) {\n\t\tlet values = null;\n\t\tif (targetIds) {\n\t\t\tconst targets = this.data(targetIds);\n\t\t\tif (isArray(targets)) {\n\t\t\t\tvalues = [];\n\t\t\t\ttargets.forEach((v) => {\n\t\t\t\t\tif (flat) v.values.forEach((d) => values.push(d.value));\n\t\t\t\t\telse values.push(v.values.map((d) => d.value));\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t\treturn values;\n\t},\n\t/**\n\t* Get and set names of the data loaded in the chart.\n\t* @function data․names\n\t* @instance\n\t* @memberof Chart\n\t* @param {object} names If this argument is given, the names of data will be updated. If not given, the current names will be returned. The format of this argument is the same as [data.names](./Options.html#.data%25E2%2580%25A4names).\n\t* @returns {object} Corresponding names according its key value, if specified names values.\n\t* @example\n\t* // Get current names\n\t* chart.data.names();\n\t* // --> {data1: \"test1\", data2: \"test2\"}\n\t*\n\t* // Update names\n\t* chart.data.names({\n\t* data1: \"New Name 1\",\n\t* data2: \"New Name 2\"\n\t* });\n\t*/\n\tnames: function(names) {\n\t\treturn this.internal.updateDataAttributes(\"names\", names);\n\t},\n\t/**\n\t* Get and set colors of the data loaded in the chart.\n\t* - **NOTE:** If gradient option is set, the color update will affect only gradient stops have the same color.\n\t* @function data․colors\n\t* @instance\n\t* @memberof Chart\n\t* @param {object} colors If this argument is given, the colors of data will be updated. If not given, the current colors will be returned. The format of this argument is the same as [data.colors](./Options.html#.data%25E2%2580%25A4colors).\n\t* @returns {object} Corresponding data color value according its key value.\n\t* @example\n\t* // Get current colors\n\t* chart.data.colors();\n\t* // --> {data1: \"#00c73c\", data2: \"#fa7171\"}\n\t*\n\t* // Update colors\n\t* chart.data.colors({\n\t* data1: \"#FFFFFF\",\n\t* data2: \"#000000\"\n\t* });\n\t*/\n\tcolors: function(colors) {\n\t\treturn this.internal.updateDataAttributes(\"colors\", colors);\n\t},\n\t/**\n\t* Get and set axes of the data loaded in the chart.\n\t* - **NOTE:** If all data is related to one of the axes, the domain of axis without related data will be replaced by the domain from the axis with related data\n\t* @function data․axes\n\t* @instance\n\t* @memberof Chart\n\t* @param {object} axes If this argument is given, the axes of data will be updated. If not given, the current axes will be returned. The format of this argument is the same as\n\t* @returns {object} Corresponding axes value for data, if specified axes value.\n\t* @example\n\t* // Get current axes\n\t* chart.data.axes();\n\t* // --> {data1: \"y\"}\n\t*\n\t* // Update axes\n\t* chart.data.axes({\n\t* data1: \"y\",\n\t* data2: \"y2\"\n\t* });\n\t*/\n\taxes: function(axes) {\n\t\treturn this.internal.updateDataAttributes(\"axes\", axes);\n\t},\n\t/**\n\t* Get the minimum data value bound to the chart\n\t* @function data․min\n\t* @instance\n\t* @memberof Chart\n\t* @returns {Array} Data objects\n\t* @example\n\t* // Get current axes\n\t* chart.data.min();\n\t* // --> [{x: 0, value: 30, id: \"data1\", index: 0}, ...]\n\t*/\n\tmin: function() {\n\t\treturn this.internal.getMinMaxData().min;\n\t},\n\t/**\n\t* Get the maximum data value bound to the chart\n\t* @function data․max\n\t* @instance\n\t* @memberof Chart\n\t* @returns {Array} Data objects\n\t* @example\n\t* // Get current axes\n\t* chart.data.max();\n\t* // --> [{x: 3, value: 400, id: \"data1\", index: 3}, ...]\n\t*/\n\tmax: function() {\n\t\treturn this.internal.getMinMaxData().max;\n\t}\n});\nvar data_default = { data };\n//#endregion\nexport { data_default as default };\n","/*!\n* Copyright (c) 2017 ~ present NAVER Corp.\r\n * billboard.js project is licensed under the MIT license\r\n * \r\n * billboard.js, JavaScript chart library\r\n * https://naver.github.io/billboard.js/\r\n * \r\n * @version 4.1.0\n*/\nimport { $FOCUS, $GAUGE } from \"../../config/classes.js\";\nimport { select } from \"d3-selection\";\n//#region src/Chart/api/focus.ts\n/**\n* Copyright (c) 2017 ~ present NAVER Corp.\n* billboard.js project is licensed under the MIT license\n*/\nvar focus_default = {\n\t/**\n\t* This API highlights specified targets and fade out the others.<br><br>\n\t* You can specify multiple targets by giving an array that includes id as String. If no argument is given, all of targets will be highlighted.\n\t* @function focus\n\t* @instance\n\t* @memberof Chart\n\t* @param {string|Array} targetIdsValue Target ids to be highlighted.\n\t* @example\n\t* // data1 will be highlighted and the others will be faded out\n\t* chart.focus(\"data1\");\n\t*\n\t* // data1 and data2 will be highlighted and the others will be faded out\n\t* chart.focus([\"data1\", \"data2\"]);\n\t*\n\t* // all targets will be highlighted\n\t* chart.focus();\n\t*/\n\tfocus(targetIdsValue) {\n\t\tconst $$ = this.internal;\n\t\tconst { state } = $$;\n\t\tconst targetIds = $$.mapToTargetIds(targetIdsValue);\n\t\tif (state.isCanvasMode) {\n\t\t\tconst focusedIds = targetIds.filter($$.isTargetToShow, $$);\n\t\t\tconst focusedSet = new Set(focusedIds);\n\t\t\tconst defocusedIds = $$.mapToTargetIds().filter((id) => !focusedSet.has(id) && $$.isTargetToShow(id));\n\t\t\t$$.revertLegend();\n\t\t\t$$.toggleFocusLegend(defocusedIds, false);\n\t\t\t$$.toggleFocusLegend(focusedIds, true);\n\t\t\tstate.focusedTargetIds = focusedSet;\n\t\t\tstate.defocusedTargetIds = new Set(defocusedIds);\n\t\t\t$$.renderCanvasFrame?.(void 0, null, false);\n\t\t\treturn;\n\t\t}\n\t\tconst candidates = $$.$el.svg.selectAll($$.selectorTargets(targetIds.filter($$.isTargetToShow, $$)));\n\t\tthis.revert();\n\t\tthis.defocus();\n\t\tcandidates.classed($FOCUS.focused, true).classed($FOCUS.defocused, false);\n\t\tif ($$.hasArcType() && !state.hasRadar) {\n\t\t\t$$.expandArc(targetIds);\n\t\t\t$$.hasType(\"gauge\") && $$.markOverlapped(targetIdsValue, $$, `.${$GAUGE.gaugeValue}`);\n\t\t}\n\t\t$$.toggleFocusLegend(targetIds, true);\n\t\tstate.focusedTargetIds = new Set(targetIds);\n\t\ttargetIds.forEach((id) => state.defocusedTargetIds.delete(id));\n\t},\n\t/**\n\t* This API fades out specified targets and reverts the others.<br><br>\n\t* You can specify multiple targets by giving an array that includes id as String. If no argument is given, all of targets will be faded out.\n\t* @function defocus\n\t* @instance\n\t* @memberof Chart\n\t* @param {string|Array} targetIdsValue Target ids to be faded out.\n\t* @example\n\t* // data1 will be faded out and the others will be reverted.\n\t* chart.defocus(\"data1\");\n\t*\n\t* // data1 and data2 will be faded out and the others will be reverted.\n\t* chart.defocus([\"data1\", \"data2\"]);\n\t*\n\t* // all targets will be faded out.\n\t* chart.defocus();\n\t*/\n\tdefocus(targetIdsValue) {\n\t\tconst $$ = this.internal;\n\t\tconst { state } = $$;\n\t\tconst targetIds = $$.mapToTargetIds(targetIdsValue);\n\t\tif (state.isCanvasMode) {\n\t\t\tconst defocusedIds = targetIds.filter($$.isTargetToShow, $$);\n\t\t\t$$.toggleFocusLegend(defocusedIds, false);\n\t\t\tdefocusedIds.forEach((id) => state.focusedTargetIds.delete(id));\n\t\t\tstate.defocusedTargetIds = new Set(defocusedIds);\n\t\t\t$$.renderCanvasFrame?.(void 0, null, false);\n\t\t\treturn;\n\t\t}\n\t\t$$.$el.svg.selectAll($$.selectorTargets(targetIds.filter($$.isTargetToShow, $$))).classed($FOCUS.focused, false).classed($FOCUS.defocused, true);\n\t\tif ($$.hasArcType(null, [\"polar\"])) {\n\t\t\t$$.unexpandArc(targetIds);\n\t\t\t$$.hasType(\"gauge\") && $$.undoMarkOverlapped($$, `.${$GAUGE.gaugeValue}`);\n\t\t}\n\t\t$$.toggleFocusLegend(targetIds, false);\n\t\ttargetIds.forEach((id) => state.focusedTargetIds.delete(id));\n\t\tstate.defocusedTargetIds = new Set(targetIds);\n\t},\n\t/**\n\t* Revert focused or defocused state to initial state.<br><br>\n\t* You can specify multiple targets by giving an array that includes id as string. If no argument is given, all of targets will be reverted.\n\t* @function revert\n\t* @instance\n\t* @memberof Chart\n\t* @param {string|Array} targetIdsValue Target ids to be reverted\n\t* @example\n\t* // 'data1' will be reverted.\n\t* chart.revert(\"data1\");\n\t*\n\t* // 'data1' and 'data2' will be reverted.\n\t* chart.revert([\"data1\", \"data2\"]);\n\t*\n\t* // all targets will be reverted.\n\t* chart.revert();\n\t*/\n\trevert(targetIdsValue) {\n\t\tconst $$ = this.internal;\n\t\tconst { config, state, $el } = $$;\n\t\tconst targetIds = $$.mapToTargetIds(targetIdsValue);\n\t\tconst resetLegend = () => {\n\t\t\tif (config.legend_show) {\n\t\t\t\t$$.showLegend(targetIds.filter($$.isLegendToShow.bind($$)));\n\t\t\t\t$el.legend.selectAll($$.selectorLegends(targetIds)).filter(function() {\n\t\t\t\t\treturn select(this).classed($FOCUS.legendItemFocused);\n\t\t\t\t}).classed($FOCUS.legendItemFocused, false);\n\t\t\t}\n\t\t};\n\t\tif (state.isCanvasMode) {\n\t\t\tconst changed = !!state.focusedTargetIds?.size || !!state.defocusedTargetIds?.size;\n\t\t\tresetLegend();\n\t\t\tstate.focusedTargetIds = /* @__PURE__ */ new Set();\n\t\t\tstate.defocusedTargetIds = /* @__PURE__ */ new Set();\n\t\t\tchanged && $$.renderCanvasFrame?.(void 0, null, false);\n\t\t\treturn;\n\t\t}\n\t\t$el.svg.selectAll($$.selectorTargets(targetIds)).classed($FOCUS.focused, false).classed($FOCUS.defocused, false);\n\t\t$$.hasArcType(null, [\"polar\"]) && $$.unexpandArc(targetIds);\n\t\tresetLegend();\n\t\tstate.focusedTargetIds = /* @__PURE__ */ new Set();\n\t\tstate.defocusedTargetIds = /* @__PURE__ */ new Set();\n\t}\n};\n//#endregion\nexport { focus_default as default };\n","/*!\n* Copyright (c) 2017 ~ present NAVER Corp.\r\n * billboard.js project is licensed under the MIT license\r\n * \r\n * billboard.js, JavaScript chart library\r\n * https://naver.github.io/billboard.js/\r\n * \r\n * @version 4.1.0\n*/\nvar legend_default = { legend: {\n\t/**\n\t* Show legend for each target.\n\t* - **NOTE:** Legend APIs aren't supported for `treemap` type.\n\t* @function legend․show\n\t* @instance\n\t* @memberof Chart\n\t* @param {string|Array} targetIds\n\t* - If targetIds is given, specified target's legend will be shown.\n\t* - If only one target is the candidate, String can be passed.\n\t* - If no argument is given, all of target's legend will be shown.\n\t* @example\n\t* // Show legend for data1.\n\t* chart.legend.show(\"data1\");\n\t*\n\t* // Show legend for data1 and data2.\n\t* chart.legend.show([\"data1\", \"data2\"]);\n\t*\n\t* // Show all legend.\n\t* chart.legend.show();\n\t*/\n\tshow: function(targetIds) {\n\t\tconst $$ = this.internal;\n\t\t$$.showLegend($$.mapToTargetIds(targetIds));\n\t\t$$.updateAndRedraw({ withLegend: true });\n\t},\n\t/**\n\t* Hide legend for each target.\n\t* @function legend․hide\n\t* @instance\n\t* @memberof Chart\n\t* @param {string|Array} targetIds\n\t* - If targetIds is given, specified target's legend will be hidden.\n\t* - If only one target is the candidate, String can be passed.\n\t* - If no argument is given, all of target's legend will be hidden.\n\t* @example\n\t* // Hide legend for data1.\n\t* chart.legend.hide(\"data1\");\n\t*\n\t* // Hide legend for data1 and data2.\n\t* chart.legend.hide([\"data1\", \"data2\"]);\n\t*\n\t* // Hide all legend.\n\t* chart.legend.hide();\n\t*/\n\thide: function(targetIds) {\n\t\tconst $$ = this.internal;\n\t\t$$.hideLegend($$.mapToTargetIds(targetIds));\n\t\t$$.updateAndRedraw({ withLegend: true });\n\t}\n} };\n//#endregion\nexport { legend_default as default };\n","/*!\n* Copyright (c) 2017 ~ present NAVER Corp.\r\n * billboard.js project is licensed under the MIT license\r\n * \r\n * billboard.js, JavaScript chart library\r\n * https://naver.github.io/billboard.js/\r\n * \r\n * @version 4.1.0\n*/\nimport { requestIdleCallback } from \"../../module/browser.js\";\nimport { isArray, isEmpty, isString } from \"../../module/util/type-checks.js\";\nimport { callDone } from \"../../ChartInternal/data/load.js\";\n//#region src/Chart/api/load.ts\n/**\n* Copyright (c) 2017 ~ present NAVER Corp.\n* billboard.js project is licensed under the MIT license\n*/\nvar load_default = {\n\t/**\n\t* Load data to the chart.<br><br>\n\t* You can specify multiple targets by giving an array that includes id as String. If no argument is given, all of targets will be toggles.\n\t* - <b>Note:</b>\n\t* - unload should be used if some data needs to be unloaded simultaneously.\n\t* If you call unload API soon after/before load instead of unload param, chart will not be rendered properly because of cancel of animation.<br>\n\t* - done will be called after data loaded, but it's not after rendering.\n\t* It's because rendering will finish after some transition and there is some time lag between loading and rendering\n\t* @function load\n\t* @instance\n\t* @memberof Chart\n\t* @param {object} args The object can consist with following members:<br>\n\t*\n\t* | Key | Type | Description |\n\t* | --- | --- | --- |\n\t* | columns | Array | The `columns` data will be loaded. If data that has the same target id is given, the chart will be updated. Otherwise, new target will be added |\n\t* | json | Array | The `json` data will be loaded. If data that has the same target id is given, the chart will be updated. Otherwise, new target will be added |\n\t* | rows | Array | The `rows` data will be loaded. If data that has the same target id is given, the chart will be updated. Otherwise, new target will be added |\n\t* | url | string | The data from `url` will be loaded. If data that has the same target id is given, the chart will be updated. Otherwise, new target will be added |\n\t* | &nbsp; | | |\n\t* | append | boolean | Load data appending it to the current dataseries.<br>If the existing chart has`x` value, should provide with corresponding `x` value for newly loaded data. |\n\t* | axes | Object | The axes specified by data.axes will be updated. axes must be Object that has target id as keys. |\n\t* | categories | Array | The categories specified by axis.x.categories or data.x will be updated. categories must be Array. |\n\t* | classes | Object | The classes specified by data.classes will be updated. classes must be Object that has target id as keys. |\n\t* | colors | Object | The colors specified by data.colors will be updated. colors must be Object that has target id as keys. |\n\t* | data | Object | Data objects to be loaded. Checkout the example. |\n\t* | done | Function | The specified function will be called after data loaded.|\n\t* | headers | string | Set request header if loading via `data.url`.<br>@see [data․headers](Options.html#.data%25E2%2580%25A4headers) |\n\t* | keys | Object | Choose which JSON objects keys correspond to desired data.<br>**NOTE:** Only for JSON object given as array.<br>@see [data․keys](Options.html#.data%25E2%2580%25A4keys) |\n\t* | mimeType | string | Set 'json' if loading JSON via url.<br>@see [data․mimeType](Options.html#.data%25E2%2580%25A4mimeType) |\n\t* | names | Object | Same as data.names() |\n\t* | regions | Object | The regions specified by data.regions will be updated. regions must be Object that has target id as keys. |\n\t* | resizeAfter | boolean | Resize after the load. Default value is `false`.<br>- This option won't call `onresize` neither `onresized`.<br>- When set to 'true', will call `.flush(true)` at the end of load. |\n\t* | type | string | The type of targets will be updated. |\n\t* | types | Object | The types of targets will be updated. |\n\t* | unload | Array | Specify the data will be unloaded before loading new data. If true given, all of data will be unloaded. If target ids given as String or Array, specified targets will be unloaded. If absent or false given, unload will not occur. |\n\t* | xs | string | Same as data.xs option |\n\t* @see [Demo](https://naver.github.io/billboard.js/demo/#Data.DataFromURL)\n\t* @example\n\t* // Load data1 and unload data2 and data3\n\t* chart.load({\n\t* columns: [\n\t* [\"data1\", 100, 200, 150, ...],\n\t* ...\n\t* ],\n\t* unload: [\"data2\", \"data3\"],\n\t* url: \"...\",\n\t* done: function() { ... }\n\t* resizeAfter: true // will resize after load\n\t* });\n\t* @example\n\t* const chart = bb.generate({\n\t* data: {\n\t* columns: [\n\t* [\"data1\", 20, 30, 40]\n\t* ]\n\t* }\n\t* });\n\t*\n\t* chart.load({\n\t* columns: [\n\t* // with 'append' option, the 'data1' will have `[20,30,40,50,60]`.\n\t* [\"data1\", 50, 60]\n\t* ],\n\t* append: true\n\t* });\n\t* @example\n\t* const chart = bb.generate({\n\t* data: {\n\t* x: \"x\",\n\t* xFormat: \"%Y-%m-%dT%H:%M:%S\",\n\t* columns: [\n\t* [\"x\", \"2021-01-03T03:00:00\", \"2021-01-04T12:00:00\", \"2021-01-05T21:00:00\"],\n\t* [\"data1\", 36, 30, 24]\n\t* ]\n\t* },\n\t* axis: {\n\t* x: {\n\t* type: \"timeseries\"\n\t* }\n\t* }\n\t* };\n\t*\n\t* chart.load({\n\t* columns: [\n\t* // when existing chart has `x` value, should provide corresponding 'x' value.\n\t* // with 'append' option, the 'data1' will have `[36,30,24,37]`.\n\t* [\"x\", \"2021-02-01T08:00:00\"],\n\t* [\"data1\", 37]\n\t* ],\n\t* append: true\n\t* });\n\t* @example\n\t* // myAPI.json\n\t* // {\n\t* // \"data1\": [220, 240, 270, 250, 280],\n\t* // \"data2\": [180, 150, 300, 70, 120]\n\t* // }\n\t*\n\t* chart.load({\n\t* url: './data/myAPI.json',\n\t* mimeType: \"json\",\n\t*\n\t* // set request header if is needed\n\t* headers: {\n\t* \"Content-Type\": \"text/json\"\n\t* }\n\t* });\n\t* @example\n\t* chart.load({\n\t* data: [\n\t* // equivalent as: columns: [[\"data1\", 30, 200, 100]]\n\t* {\"data1\": 30}, {\"data1\": 200}, {\"data1\": 100}\n\t*\n\t* // or\n\t* // equivalent as: columns: [[\"data1\", 10, 20], [\"data2\", 13, 30]]\n\t* // {\"data1\": 10, \"data2\": 13}, {\"data1\": 20, \"data2\": 30}}\n\t* ]\n\t* });\n\t* @example\n\t* chart.load({\n\t* json: [\n\t* {name: \"www.site1.com\", upload: 800, download: 500, total: 400},\n\t* ],\n\t* keys: {\n\t* x: \"name\",\n\t* value: [\"upload\", \"download\"]\n\t* }\n\t* });\n\t* @example\n\t* chart.load({\n\t* json: {\n\t* data1:[30, 20, 50, 40, 60, 50],\n\t* data2:[200, 130, 90, 240, 130, 220],\n\t* }\n\t* });\n\t*/\n\tload(args) {\n\t\tconst $$ = this.internal;\n\t\tconst { config } = $$;\n\t\t$$.state.dirty.data = true;\n\t\t$$.state._eventRectFingerprint = null;\n\t\targs.xs && $$.addXs(args.xs);\n\t\t\"names\" in args && this.data.names(args.names);\n\t\t\"classes\" in args && Object.keys(args.classes).forEach((id) => {\n\t\t\tconfig.data_classes[id] = args.classes[id];\n\t\t});\n\t\tif (\"categories\" in args && $$.axis.isCategorized()) config.axis_x_categories = args.categories;\n\t\t\"axes\" in args && Object.keys(args.axes).forEach((id) => {\n\t\t\tconfig.data_axes[id] = args.axes[id];\n\t\t});\n\t\t\"colors\" in args && Object.keys(args.colors).forEach((id) => {\n\t\t\tconfig.data_colors[id] = args.colors[id];\n\t\t});\n\t\t\"regions\" in args && (config.data_regions = args.regions || {});\n\t\tconst hasDataToLoad = [\n\t\t\t\"data\",\n\t\t\t\"columns\",\n\t\t\t\"rows\",\n\t\t\t\"json\",\n\t\t\t\"url\"\n\t\t].some((key) => key in args);\n\t\tconst hasUnload = \"unload\" in args && args.unload !== false;\n\t\tif (\"regions\" in args && !hasDataToLoad && !hasUnload) {\n\t\t\t$$.redraw({\n\t\t\t\twithUpdateOrgXDomain: true,\n\t\t\t\twithUpdateXDomain: true,\n\t\t\t\twithLegend: true\n\t\t\t});\n\t\t\tcallDone.call($$, args.done, args.resizeAfter);\n\t\t\treturn;\n\t\t}\n\t\tif (hasUnload) {\n\t\t\tconst unloadIds = $$.mapToTargetIds(args.unload === true ? null : args.unload);\n\t\t\t$$.unload(unloadIds, () => {\n\t\t\t\tif (!$$.config || !$$.cache) return;\n\t\t\t\t$$.cache.remove(unloadIds);\n\t\t\t\trequestIdleCallback(() => $$.loadFromArgs(args));\n\t\t\t});\n\t\t} else $$.loadFromArgs(args);\n\t},\n\t/**\n\t* Unload data to the chart.<br><br>\n\t* You can specify multiple targets by giving an array that includes id as String. If no argument is given, all of targets will be toggles.\n\t* - <b>Note:</b>\n\t* If you call load API soon after/before unload, unload param of load should be used. Otherwise chart will not be rendered properly because of cancel of animation.<br>\n\t* `done` will be called after data loaded, but it's not after rendering. It's because rendering will finish after some transition and there is some time lag between loading and rendering.\n\t* @function unload\n\t* @instance\n\t* @memberof Chart\n\t* @param {object} argsValue\n\t* | key | Type | Description |\n\t* | --- | --- | --- |\n\t* | ids | String &vert; Array | Target id data to be unloaded. If not given, all data will be unloaded. |\n\t* | done | Function | Callback after data is unloaded. |\n\t* | resizeAfter | boolean | Resize after the unload. Default value is `false`.<br>- This option won't call `onresize` neither `onresized`.<br>- When set to 'true', will call `.flush(true)` at the end of unload. |\n\t* @example\n\t* // Unload data2 and data3\n\t* chart.unload({\n\t* ids: [\"data2\", \"data3\"],\n\t* done: function() {\n\t* // called after the unloaded\n\t* },\n\t* resizeAfter: true // will resize after unload\n\t* });\n\t*/\n\tunload(argsValue) {\n\t\tconst $$ = this.internal;\n\t\tlet args = argsValue || {};\n\t\tisEmpty(args) && this.tooltip.hide();\n\t\tif (isArray(args)) args = { ids: args };\n\t\telse if (isString(args)) args = { ids: [args] };\n\t\tconst ids = $$.mapToTargetIds(args.ids);\n\t\t$$.state.dirty.data = true;\n\t\t$$.state._eventRectFingerprint = null;\n\t\t$$.unload(ids, () => {\n\t\t\tif (!$$.config || !$$.cache) return;\n\t\t\t$$.redraw({\n\t\t\t\twithUpdateOrgXDomain: true,\n\t\t\t\twithUpdateXDomain: true,\n\t\t\t\twithLegend: true\n\t\t\t});\n\t\t\t$$.cache.remove(ids);\n\t\t\tcallDone.call($$, args.done, args.resizeAfter);\n\t\t});\n\t}\n};\n//#endregion\nexport { load_default as default };\n","/*!\n* Copyright (c) 2017 ~ present NAVER Corp.\r\n * billboard.js project is licensed under the MIT license\r\n * \r\n * billboard.js, JavaScript chart library\r\n * https://naver.github.io/billboard.js/\r\n * \r\n * @version 4.1.0\n*/\nimport { callFn, endall } from \"../../module/util/object.js\";\n//#region src/Chart/api/show.ts\n/**\n* Copyright (c) 2017 ~ present NAVER Corp.\n* billboard.js project is licensed under the MIT license\n*/\n/**\n* Show/Hide data series\n* @param {boolean} show Show or hide\n* @param {Array} targetIdsValue Target id values\n* @param {object} options Options\n* @param {boolean} [options.withLegend=false] whether or not display legend\n* @param {boolean} [skipRedraw=false] whether or not skip redraw after show/hide\n* @private\n*/\nfunction showHide(show, targetIdsValue, options, skipRedraw = false) {\n\tconst $$ = this.internal;\n\tconst targetIds = $$.mapToTargetIds(targetIdsValue);\n\tconst targetIdSet = new Set(targetIds);\n\tconst hiddenIds = [...$$.state.hiddenTargetIds].filter((v) => targetIdSet.has(v));\n\t$$.state.toggling = true;\n\t$$.state.dirty.visibility = true;\n\t$$[`${show ? \"remove\" : \"add\"}HiddenTargetIds`](targetIds);\n\tif ($$.state.isCanvasMode) {\n\t\tif (show && hiddenIds.length) callFn($$.config.data_onshown, this, hiddenIds);\n\t\telse if (!show && hiddenIds.length === 0) callFn($$.config?.data_onhidden, this, targetIds);\n\t\tif (!skipRedraw) $$.redraw({\n\t\t\twithUpdateOrgXDomain: true,\n\t\t\twithUpdateXDomain: true,\n\t\t\twithLegend: true\n\t\t});\n\t\t$$.state.toggling = false;\n\t\treturn;\n\t}\n\tconst targets = $$.$el.svg.selectAll($$.selectorTargets(targetIds));\n\tconst opacity = show ? null : \"0\";\n\tif (show && hiddenIds.length) {\n\t\ttargets.style(\"display\", null);\n\t\tcallFn($$.config.data_onshown, this, hiddenIds);\n\t}\n\t$$.$T(targets).style(\"opacity\", opacity, \"important\").call(endall, () => {\n\t\tif (!show && hiddenIds.length === 0) {\n\t\t\ttargets.style(\"display\", \"none\");\n\t\t\tcallFn($$.config?.data_onhidden, this, targetIds);\n\t\t}\n\t\ttargets.style(\"opacity\", opacity);\n\t});\n\toptions.withLegend && $$[`${show ? \"show\" : \"hide\"}Legend`](targetIds);\n\tif (!skipRedraw) $$.redraw({\n\t\twithUpdateOrgXDomain: true,\n\t\twithUpdateXDomain: true,\n\t\twithLegend: true\n\t});\n\t$$.state.toggling = false;\n}\nvar show_default = {\n\t/**\n\t* Show data series on chart\n\t* @function show\n\t* @instance\n\t* @memberof Chart\n\t* @param {string|Array} [targetIdsValue] The target id value.\n\t* @param {object} [options] The object can consist with following members:<br>\n\t*\n\t* | Key | Type | default | Description |\n\t* | --- | --- | --- | --- |\n\t* | withLegend | boolean | false | whether or not display legend |\n\t*\n\t* @example\n\t* // show 'data1'\n\t* chart.show(\"data1\");\n\t*\n\t* // show 'data1' and 'data3'\n\t* chart.show([\"data1\", \"data3\"]);\n\t*/\n\tshow(targetIdsValue, options = {}) {\n\t\tshowHide.call(this, true, targetIdsValue, options);\n\t},\n\t/**\n\t* Hide data series from chart\n\t* @function hide\n\t* @instance\n\t* @memberof Chart\n\t* @param {string|Array} [targetIdsValue] The target id value.\n\t* @param {object} [options] The object can consist with following members:<br>\n\t*\n\t* | Key | Type | default | Description |\n\t* | --- | --- | --- | --- |\n\t* | withLegend | boolean | false | whether or not display legend |\n\t*\n\t* @example\n\t* // hide 'data1'\n\t* chart.hide(\"data1\");\n\t*\n\t* // hide 'data1' and 'data3'\n\t* chart.hide([\"data1\", \"data3\"]);\n\t*/\n\thide(targetIdsValue, options = {}) {\n\t\tshowHide.call(this, false, targetIdsValue, options);\n\t},\n\t/**\n\t* Toggle data series on chart. When target data is hidden, it will show. If is shown, it will hide in vice versa.\n\t* @function toggle\n\t* @instance\n\t* @memberof Chart\n\t* @param {string|Array} [targetIds] The target id value.\n\t* @param {object} [options] The object can consist with following members:<br>\n\t*\n\t* | Key | Type | default | Description |\n\t* | --- | --- | --- | --- |\n\t* | withLegend | boolean | false | whether or not display legend |\n\t*\n\t* @example\n\t* // toggle 'data1'\n\t* chart.toggle(\"data1\");\n\t*\n\t* // toggle 'data1' and 'data3'\n\t* chart.toggle([\"data1\", \"data3\"]);\n\t*/\n\ttoggle(targetIds, options = {}) {\n\t\tconst $$ = this.internal;\n\t\tconst targets = {\n\t\t\tshow: [],\n\t\t\thide: []\n\t\t};\n\t\t$$.mapToTargetIds(targetIds).forEach((id) => targets[$$.isTargetToShow(id) ? \"hide\" : \"show\"].push(id));\n\t\tif (targets.show.length && targets.hide.length) {\n\t\t\tshowHide.call(this, true, targets.show, options, true);\n\t\t\tshowHide.call(this, false, targets.hide, options);\n\t\t} else {\n\t\t\ttargets.show.length && this.show(targets.show, options);\n\t\t\ttargets.hide.length && this.hide(targets.hide, options);\n\t\t}\n\t}\n};\n//#endregion\nexport { show_default as default };\n","/*!\n* Copyright (c) 2017 ~ present NAVER Corp.\r\n * billboard.js project is licensed under the MIT license\r\n * \r\n * billboard.js, JavaScript chart library\r\n * https://naver.github.io/billboard.js/\r\n * \r\n * @version 4.1.0\n*/\nimport { isDefined } from \"../../module/util/type-checks.js\";\nimport { $SHAPE } from \"../../config/classes.js\";\nvar tooltip_default = { tooltip: {\n\t/**\n\t* Show tooltip\n\t* @function tooltip․show\n\t* @instance\n\t* @memberof Chart\n\t* @param {object} args The object can consist with following members:<br>\n\t*\n\t* | Key | Type | Description |\n\t* | --- | --- | --- |\n\t* | index | Number | Determine focus by index |\n\t* | x | Number &vert; Date | Determine focus by x Axis index |\n\t* | mouse | Array | Determine x and y coordinate value relative the targeted '.bb-event-rect' x Axis.<br>It should be used along with `data`, `index` or `x` value. The default value is set as `[0,0]` |\n\t* | data | Object | When [data.xs](Options.html#.data%25E2%2580%25A4xs) option is used or [tooltip.grouped](Options.html#.tooltip) set to 'false', `should be used giving this param`.<br><br>**Key:**<br>- x {number &verbar; Date}: x Axis value<br>- index {number}: x Axis index (useless for data.xs)<br>- id {string}: data id<br>- value {number}: The corresponding value for tooltip. |\n\t*\n\t* @example\n\t* // show the 2nd x Axis coordinate tooltip\n\t* // for Arc(gauge, donut & pie) and radar type, approach showing tooltip by using \"index\" number.\n\t* chart.tooltip.show({\n\t* index: 1\n\t* });\n\t*\n\t* // show tooltip for the 3rd x Axis in x:50 and y:100 coordinate of '.bb-event-rect' of the x Axis.\n\t* chart.tooltip.show({\n\t* x: 2,\n\t* mouse: [50, 100]\n\t* });\n\t*\n\t* // show tooltip for timeseries x axis\n\t* chart.tooltip.show({\n\t* x: new Date(\"2018-01-02 00:00\")\n\t* });\n\t*\n\t* // treemap type can be shown by using \"id\" only.\n\t* chart.tooltip.show({\n\t* data: {\n\t* id: \"data1\" // data id\n\t* }\n\t* });\n\t*\n\t* // for Arc types, specify 'id' or 'index'\n\t* chart.tooltip.show({ data: { id: \"data2\" }});\n\t* chart.tooltip.show({ data: { index: 2 }});\n\t*\n\t* // when data.xs is used\n\t* chart.tooltip.show({\n\t* data: {\n\t* x: 3, // x Axis value\n\t* id: \"data1\", // data id\n\t* value: 500 // data value\n\t* }\n\t* });\n\t*\n\t* // when data.xs isn't used, but tooltip.grouped=false is set\n\t* chart.tooltip.show({\n\t* data: {\n\t* index: 3, // or 'x' key value\n\t* id: \"data1\", // data id\n\t* value: 500 // data value\n\t* }\n\t* });\n\t*/\n\tshow: function(args) {\n\t\tconst $$ = this.internal;\n\t\tconst { $el, config, state: { eventReceiver, hasFunnel, hasTreemap, inputType } } = $$;\n\t\tlet index;\n\t\tlet mouse;\n\t\tif (args.mouse) mouse = args.mouse;\n\t\tif (args.data) {\n\t\t\tconst { data } = args;\n\t\t\tconst y = $$.getYScaleById(data.id)?.(data.value);\n\t\t\tif ((hasFunnel || hasTreemap) && data.id) {\n\t\t\t\tconst selector = $$.selectorTarget(data.id, void 0, `.${$SHAPE.shape}`);\n\t\t\t\teventReceiver.rect = $el.main.select(selector);\n\t\t\t} else if ($$.isMultipleX()) mouse = [$$.xx(data), y];\n\t\t\telse {\n\t\t\t\tif (!config.tooltip_grouped) mouse = [0, y];\n\t\t\t\tindex = data.index ?? ($$.hasArcType() && data.id ? $$.getArcElementByIdOrIndex(data.id)?.datum().index : $$.getIndexByX(data.x));\n\t\t\t}\n\t\t} else if (isDefined(args.x)) index = $$.getIndexByX(args.x);\n\t\telse if (isDefined(args.index)) index = args.index;\n\t\tif ($$.state.isCanvasMode) {\n\t\t\tconst targets = $$.filterTargetsToShow?.() || $$.data.targets;\n\t\t\tconst selectedData = args.data?.id && !config.tooltip_grouped ? targets.filter((target) => target.id === args.data.id).map((target) => target.values[index ?? args.data.index]).filter(Boolean) : targets.map((target) => target.values[index]).filter(Boolean);\n\t\t\tconst canvas = $el.canvas?.node?.();\n\t\t\tconst shape = $$.state.canvasShape || $$.getDrawShape?.();\n\t\t\tconst first = selectedData[0];\n\t\t\tconst point = mouse || (first && shape?.pos?.cx && shape?.pos?.cy ? [$$.state.margin.left + shape.pos.cx(first), $$.state.margin.top + shape.pos.cy(first)] : void 0);\n\t\t\tif (!selectedData.length || !canvas) return;\n\t\t\t$$.state.canvasFocusKey = selectedData.map((v) => `${v.id}:${v.index}`).join(\"|\");\n\t\t\t$$.renderCanvasFocus?.(selectedData, point);\n\t\t\t$$.showTooltip?.(selectedData, canvas);\n\t\t\treturn;\n\t\t}\n\t\t(inputType === \"mouse\" ? [\"mouseover\", \"mousemove\"] : [\"touchstart\"]).forEach((eventName) => {\n\t\t\t$$.dispatchEvent(eventName, index, mouse);\n\t\t});\n\t},\n\t/**\n\t* Hide tooltip\n\t* @function tooltip․hide\n\t* @instance\n\t* @memberof Chart\n\t*/\n\thide: function() {\n\t\tconst $$ = this.internal;\n\t\tconst { state: { inputType, isCanvasMode }, $el: { tooltip } } = $$;\n\t\tconst data = tooltip?.datum();\n\t\tif (isCanvasMode) {\n\t\t\t$$.state.canvasFocusKey = null;\n\t\t\t$$.hideTooltip(true);\n\t\t\t$$.clearCanvasFocus?.();\n\t\t\treturn;\n\t\t}\n\t\tif (data?.data?.[0]) {\n\t\t\tconst { index } = data.data[0];\n\t\t\t(inputType === \"mouse\" ? [\"mouseout\"] : [\"touchend\"]).forEach((eventName) => {\n\t\t\t\t$$.dispatchEvent(eventName, index);\n\t\t\t});\n\t\t}\n\t\tinputType === \"touch\" && $$.callOverOutForTouch();\n\t\t$$.hideTooltip(true);\n\t\t$$.hideGridFocus?.();\n\t\t$$.unexpandCircles?.();\n\t\t$$.expandBarTypeShapes?.(false);\n\t}\n} };\n//#endregion\nexport { tooltip_default as default };\n","/*!\n* Copyright (c) 2017 ~ present NAVER Corp.\r\n * billboard.js project is licensed under the MIT license\r\n * \r\n * billboard.js, JavaScript chart library\r\n * https://naver.github.io/billboard.js/\r\n * \r\n * @version 4.1.0\n*/\nimport { isFunction, notEmpty } from \"../module/util/type-checks.js\";\nimport { extend } from \"../module/util/object.js\";\nimport ChartInternal from \"../ChartInternal/ChartInternal.js\";\nimport { loadConfig } from \"../config/config.js\";\nimport chart_default from \"./api/chart.js\";\nimport color_default from \"./api/color.js\";\nimport data_default from \"./api/data.js\";\nimport focus_default from \"./api/focus.js\";\nimport legend_default from \"./api/legend.js\";\nimport load_default from \"./api/load.js\";\nimport show_default from \"./api/show.js\";\nimport tooltip_default from \"./api/tooltip.js\";\n//#region src/Chart/Chart.ts\n/**\n* Copyright (c) 2017 ~ present NAVER Corp.\n* billboard.js project is licensed under the MIT license\n*/\n/**\n* Main chart class.\n* - Note: Instantiated via `bb.generate()`.\n* @class Chart\n* @example\n* var chart = bb.generate({\n* data: {\n* columns: [\n* [\"x\", \"2015-11-02\", \"2015-12-01\", \"2016-01-01\", \"2016-02-01\", \"2016-03-01\"],\n* [\"count1\", 11, 8, 7, 6, 5 ],\n* [\"count2\", 9, 3, 6, 2, 8 ]\n* ]}\n* }\n* @see {@link bb.generate} for the initialization.\n*/\n/**\n* Access instance's primary node elements\n* @member {object} $\n* @property {object} $ Access instance's primary node elements\n* @property {d3.selection} $.chart Wrapper element\n* @property {d3.selection} $.svg Main svg element\n* @property {d3.selection} $.defs Definition element\n* @property {d3.selection} $.main Main grouping element\n* @property {d3.selection} $.needle Needle element\n* - **NOTE:**\n* - The element will have `bb-needle` as class name.\n* - Will provide special helper `.updateHelper(value: number, updateConfig: boolean)` method to facilitate needle position update.\n* @property {d3.selection} $.tooltip Tooltip element\n* @property {d3.selection} $.legend Legend element\n* @property {d3.selection} $.title Title element\n* @property {d3.selection} $.grid Grid element\n* @property {d3.selection} $.arc Arc element\n* @property {d3.selection} $.circles Data point circle elements\n* @property {object} $.bar Bar element object\n* @property {d3.selection} $.bar.bars Bar elements\n* @property {d3.selection} $.candlestick Candlestick elements\n* @property {object} $.line Line element object\n* @property {d3.selection} $.line.lines Line elements\n* @property {d3.selection} $.line.areas Areas elements\n* @property {object} $.text Text element object\n* @property {d3.selection} $.text.texts Data label text elements\n* @memberof Chart\n* @example\n* const chart = bb.generate({ ... });\n*\n* chart.$.chart; // wrapper element\n* chart.$.line.circles; // all data point circle elements\n* @example\n* // Update arc needle position\n* const chart = bb.generate({\n* data: {\n* type: \"donut\"\n* },\n* arc: {\n* needle: {\n* show: true,\n* ...\n* }\n* }\n* });\n*\n* chart.$.needle.updateHelper(70); // update needle position to point value 70.\n*\n* // update needle position to point value 70 and the config value.\n* // NOTE: updating config value, will update needle pointer initial value too.\n* chart.$.needle.updateHelper(70, true);\n*\n* // update needle point position every 1 second\n* let i = 0;\n* setInterval(() => {\n* chart.$.needle.updateHelper(i += 10);\n* }, 1000)\n*/\n/**\n* Plugin instance array\n* @member {Array} plugins\n* @memberof Chart\n* @example\n* var chart = bb.generate({\n* ...\n* plugins: [\n* new bb.plugin.stanford({ ... }),\n* new PluginA()\n* ]\n* });\n*\n* chart.plugins; // [Stanford, PluginA] - instance array\n*/\nvar Chart = class Chart {\n\tplugins = [];\n\tinternal;\n\tconstructor(options) {\n\t\tconst $$ = new ChartInternal(this);\n\t\tthis.internal = $$;\n\t\t(function bindThis(fn, target, argThis) {\n\t\t\tObject.keys(fn).forEach((key) => {\n\t\t\t\tconst isFunc = isFunction(fn[key]);\n\t\t\t\tconst isChild = target !== argThis;\n\t\t\t\tconst isNotNil = notEmpty(fn[key]);\n\t\t\t\tconst hasChild = isNotNil && Object.keys(fn[key]).length > 0;\n\t\t\t\tif (isFunc && (!isChild && hasChild || isChild)) target[key] = fn[key].bind(argThis);\n\t\t\t\telse if (isNotNil && !isFunc) target[key] = {};\n\t\t\t\telse target[key] = fn[key];\n\t\t\t\thasChild && bindThis(fn[key], target[key], argThis);\n\t\t\t});\n\t\t})(Chart.prototype, this, this);\n\t\tloadConfig.call($$, options);\n\t\t$$.beforeInit();\n\t\t$$.init();\n\t}\n};\nextend(Chart.prototype, [\n\tchart_default,\n\tcolor_default,\n\tdata_default,\n\tfocus_default,\n\tlegend_default,\n\tload_default,\n\tshow_default,\n\ttooltip_default\n]);\n//#endregion\nexport { Chart as default };\n","/*!\n* Copyright (c) 2017 ~ present NAVER Corp.\r\n * billboard.js project is licensed under the MIT license\r\n * \r\n * billboard.js, JavaScript chart library\r\n * https://naver.github.io/billboard.js/\r\n * \r\n * @version 4.1.0\n*/\nimport { document as doc } from \"../../../module/browser.js\";\nimport { isFunction, isObjectType, notEmpty } from \"../../../module/util/type-checks.js\";\nimport { sanitize } from \"../../../module/sanitize.js\";\nimport { toArray } from \"../../../module/util/object.js\";\nimport { namespaces, select } from \"d3-selection\";\n//#region src/ChartInternal/shape/core/point.ts\n/**\n* Copyright (c) 2017 ~ present NAVER Corp.\n* billboard.js project is licensed under the MIT license\n*/\n/**\n* Check if point draw methods are valid\n* @param {string} point point type\n* @returns {boolean}\n* @private\n*/\nfunction _hasValidPointDrawMethods(point) {\n\treturn isObjectType(point) && isFunction(point.create) && isFunction(point.update);\n}\n/**\n* Insert point info defs element\n* @param {string} point Point element\n* @param {string} id Point id\n* @private\n*/\nfunction _insertPointInfoDefs(point, id) {\n\tconst $$ = this;\n\tconst copyAttr = (from, target) => {\n\t\tconst attribs = from.attributes;\n\t\tfor (let i = 0, name; name = attribs[i]; i++) {\n\t\t\tname = name.name;\n\t\t\ttarget.setAttribute(name, from.getAttribute(name));\n\t\t}\n\t};\n\tconst node = new DOMParser().parseFromString(sanitize(point), \"image/svg+xml\").documentElement;\n\tconst clone = doc.createElementNS(namespaces.svg, node.nodeName.toLowerCase());\n\tclone.id = id;\n\tclone.style.fill = \"inherit\";\n\tclone.style.stroke = \"inherit\";\n\tcopyAttr(node, clone);\n\tif (node.childNodes?.length) {\n\t\tconst parent = select(clone);\n\t\tif (\"innerHTML\" in clone) parent.html(sanitize(node.innerHTML));\n\t\telse toArray(node.childNodes).forEach((v) => {\n\t\t\tcopyAttr(v, parent.append(v.tagName).node());\n\t\t});\n\t}\n\t$$.$el.defs.node().appendChild(clone);\n}\nvar point_default = {\n\t/**\n\t* Check if point type option is valid\n\t* @param {string} type point type\n\t* @returns {boolean}\n\t* @private\n\t*/\n\thasValidPointType(type) {\n\t\treturn /^(circle|rect(angle)?|polygon|ellipse|use)$/i.test(type || this.config.point_type);\n\t},\n\t/**\n\t* Check if pattern point is set to be used on legend\n\t* @returns {boolean}\n\t* @private\n\t*/\n\thasLegendDefsPoint() {\n\t\tconst { config } = this;\n\t\treturn config.legend_show && config.point_pattern?.length && config.legend_usePoint;\n\t},\n\tgetDefsPointId(id) {\n\t\tconst { state: { datetimeId } } = this;\n\t\treturn `${datetimeId}-point${id}`;\n\t},\n\t/**\n\t* Get validated point pattern array\n\t* @returns {Array} Array of point types\n\t* @private\n\t*/\n\tgetValidPointPattern() {\n\t\tconst { config } = this;\n\t\tconst validPointType = /^(circle|rect(angle)?)$/i.test(config.point_type) ? config.point_type : \"circle\";\n\t\treturn notEmpty(config.point_pattern) ? config.point_pattern : [validPointType];\n\t},\n\t/**\n\t* Get generate point function\n\t* @returns {function}\n\t* @private\n\t*/\n\tgeneratePoint() {\n\t\tconst $$ = this;\n\t\tconst { $el, config } = $$;\n\t\tconst ids = [];\n\t\tconst pattern = $$.getValidPointPattern();\n\t\treturn function(method, context, ...args) {\n\t\t\treturn function(d) {\n\t\t\t\tconst id = $$.getTargetSelectorSuffix(d.id || d.data?.id || d);\n\t\t\t\tconst element = select(this);\n\t\t\t\tids.indexOf(id) < 0 && ids.push(id);\n\t\t\t\tlet point = pattern[ids.indexOf(id) % pattern.length];\n\t\t\t\tif ($$.hasValidPointType(point)) point = $$[point];\n\t\t\t\telse if (!_hasValidPointDrawMethods(point || config.point_type)) {\n\t\t\t\t\tconst pointId = $$.getDefsPointId(id);\n\t\t\t\t\tif ($el.defs.select(`#${pointId}`).size() < 1) _insertPointInfoDefs.call($$, point, pointId);\n\t\t\t\t\tif (method === \"create\") return $$.custom?.create.bind(context)(element, pointId, ...args);\n\t\t\t\t\telse if (method === \"update\") return $$.custom?.update.bind(context)(element, ...args);\n\t\t\t\t}\n\t\t\t\treturn point[method]?.bind(context)(element, ...args);\n\t\t\t};\n\t\t};\n\t}\n};\n//#endregion\nexport { point_default as default };\n","/*!\n* Copyright (c) 2017 ~ present NAVER Corp.\r\n * billboard.js project is licensed under the MIT license\r\n * \r\n * billboard.js, JavaScript chart library\r\n * https://naver.github.io/billboard.js/\r\n * \r\n * @version 4.1.0\n*/\n//#region src/config/Options/common/point.ts\n/**\n* point config options\n*/\nvar point_default = {\n\t/**\n\t* Set point options\n\t* @name point\n\t* @memberof Options\n\t* @type {object}\n\t* @property {object} point Point object\n\t* @property {boolean} [point.show=true] Whether to show each point in line.\n\t* @property {number|function} [point.r=2.5] The radius size of each point.\n\t* - **NOTE:** Disabled for 'bubble' type\n\t* @property {boolean|object} [point.radialGradient=false] Set the radial gradient on point.<br><br>\n\t* Or customize by giving below object value:\n\t* - cx {number}: `cx` value (default: `0.3`)\n\t* - cy {number}: `cy` value (default: `0.3`)\n\t* - r {number}: `r` value (default: `0.7`)\n\t* - stops {Array}: Each item should be having `[offset, stop-color, stop-opacity]` values.\n\t* - (default: `[[0.1, $DATA_COLOR, 1], [0.9, $DATA_COLOR, 0]]`)\n\t* @property {boolean} [point.focus.expand.enabled=true] Whether to expand each point on focus.\n\t* @property {number} [point.focus.expand.r=point.r*1.75] The radius size of each point on focus.\n\t* - **NOTE:** For 'bubble' type, the default is `bubbleSize*1.15`\n\t* @property {boolean} [point.focus.only=false] Show point only when is focused.\n\t* @property {number|null} [point.opacity=undefined] Set point opacity value.\n\t* - **NOTE:**\n\t* \t- `null` will make to not set inline 'opacity' css prop.\n\t* \t- when no value(or undefined) is set, it defaults to set opacity value according its chart types.\n\t* @property {number|string|function} [point.sensitivity=10] The sensitivity value for interaction boundary.\n\t* - **Available Values:**\n\t* - {number}: Absolute sensitivity value which is the distance from the data point in pixel.\n\t* - \"radius\": sensitivity based on point's radius\n\t* - Function: callback for each point to determine the sensitivity<br>\n\t* \t```js\n\t* \tsensitivity: function(d) {\n\t* \t // ex. of argument d:\n\t* \t // ==> {x: 2, value: 55, id: 'data3', index: 2, r: 19.820624179302296}\n\t*\n\t* \t // returning d.r, will make sensitivity same as point's radius value.\n\t* \t return d.r;\n\t* \t}\n\t* \t```\n\t* @property {number} [point.select.r=point.r*4] The radius size of each point on selected.\n\t* @property {string} [point.type=\"circle\"] The type of point to be drawn\n\t* - **NOTE:**\n\t* - If chart has 'bubble' type, only circle can be used.\n\t* - For IE, non circle point expansions are not supported due to lack of transform support.\n\t* - **Available Values:**\n\t* - circle\n\t* - rectangle\n\t* @property {Array} [point.pattern=[]] The type of point or svg shape as string, to be drawn for each line\n\t* - **NOTE:**\n\t* - This is an `experimental` feature and can have some unexpected behaviors.\n\t* - If chart has 'bubble' type, only circle can be used.\n\t* - For IE, non circle point expansions are not supported due to lack of transform support.\n\t* - Only common SVG tags are allowed to prevent XSS attacks. If creating charts from user input, it is recommended to sanitize input values to avoid potential vulnerabilities.\n\t* - **Available Values:**\n\t* - circle\n\t* - rectangle\n\t* - svg shape tag interpreted as string<br>\n\t* (ex. `<polygon points='2.5 0 0 5 5 5'></polygon>`)\n\t* @see [Demo: point type](https://naver.github.io/billboard.js/demo/#Point.RectanglePoints)\n\t* @see [Demo: point focus only](https://naver.github.io/billboard.js/demo/#Point.FocusOnly)\n\t* @see [Demo: point radialGradient](https://naver.github.io/billboard.js/demo/#Point.RadialGradientPoint)\n\t* @see [Demo: point sensitivity](https://naver.github.io/billboard.js/demo/#Point.PointSensitivity)\n\t* @example\n\t* point: {\n\t* show: false,\n\t* r: 5,\n\t*\n\t* // or customize the radius\n\t* r: function(d) {\n\t* ...\n\t* return r;\n\t* },\n\t*\n\t* // will generate following radialGradient:\n\t* // for more info: https://developer.mozilla.org/en-US/docs/Web/SVG/Element/radialGradient\n\t* // <radualGradient cx=\"0.3\" cy=\"0.3\" r=\"0.7\">\n\t* // <stop offset=\"0.1\" stop-color=\"$DATA_COLOR\" stop-opacity=\"1\"></stop>\n\t* // <stop offset=\"0.9\" stop-color=\"$DATA_COLOR\" stop-opacity=\"0\"></stop>\n\t* // </radialrGradient>\n\t* radialGradient: true,\n\t*\n\t* // Or customized gradient\n\t* radialGradient: {\n\t* \tcx: 0.3, // cx attributes\n\t* \tcy: 0.5, // cy attributes\n\t* \tr: 0.7, // r attributes\n\t* \tstops: [\n\t* \t // offset, stop-color, stop-opacity\n\t* \t [0, \"#7cb5ec\", 1],\n\t*\n\t* \t // setting 'null' for stop-color, will set its original data color\n\t* \t [0.5, null, 0],\n\t*\n\t* \t // setting 'function' for stop-color, will pass data id as argument.\n\t* \t // It should return color string or null value\n\t* \t [1, function(id) { return id === \"data1\" ? \"red\" : \"blue\"; }, 0],\n\t* \t]\n\t* },\n\t*\n\t* focus: {\n\t* expand: {\n\t* enabled: true,\n\t* r: 1\n\t* },\n\t* only: true\n\t* },\n\t*\n\t* // do not set inline 'opacity' css prop setting\n\t* opacity: null,\n\t*\n\t* // set every data point's opacity value\n\t* opacity: 0.7,\n\t*\n\t* select: {\n\t* r: 3\n\t* },\n\t*\n\t* // having lower value, means how closer to be for interaction\n\t* sensitivity: 3,\n\t*\n\t* // sensitivity based on point's radius\n\t* sensitivity: \"radius\",\n\t*\n\t* // callback for each point to determine the sensitivity\n\t* sensitivity: function(d) {\n\t* \t// ex. of argument d:\n\t* \t// ==> {x: 2, value: 55, id: 'data3', index: 2, r: 19.820624179302296}\n\t*\n\t* \t// returning d.r, will make sensitivity same as point's radius value.\n\t* \treturn d.r;\n\t* }\n\t*\n\t* // valid values are \"circle\" or \"rectangle\"\n\t* type: \"rectangle\",\n\t*\n\t* // or indicate as pattern\n\t* pattern: [\n\t* \"circle\",\n\t* \"rectangle\",\n\t* \"<polygon points='0 6 4 0 -4 0'></polygon>\"\n\t* ],\n\t* }\n\t*/\n\tpoint_show: true,\n\tpoint_r: 2.5,\n\tpoint_radialGradient: false,\n\tpoint_sensitivity: 10,\n\tpoint_focus_expand_enabled: true,\n\tpoint_focus_expand_r: void 0,\n\tpoint_focus_only: false,\n\tpoint_opacity: void 0,\n\tpoint_pattern: [],\n\tpoint_select_r: void 0,\n\tpoint_type: \"circle\"\n};\n//#endregion\nexport { point_default as default };\n","/*!\n* Copyright (c) 2017 ~ present NAVER Corp.\r\n * billboard.js project is licensed under the MIT license\r\n * \r\n * billboard.js, JavaScript chart library\r\n * https://naver.github.io/billboard.js/\r\n * \r\n * @version 4.1.0\n*/\nimport { isDefined, isNumber, isObjectType, isValue } from \"../../module/util/type-checks.js\";\n//#region src/Chart/api/axis.ts\n/**\n* Copyright (c) 2017 ~ present NAVER Corp.\n* billboard.js project is licensed under the MIT license\n*/\n/**\n* Set the min/max value\n* @param {Chart} $$ Chart instance\n* @param {string} type Set type 'min' or 'max'\n* @param {object} value Value to be set\n* @private\n*/\nfunction setMinMax($$, type, value) {\n\tconst { config } = $$;\n\tconst helper = (key, value) => {\n\t\tconst v = isNumber(value) ? value : value === false ? void 0 : null;\n\t\tif (v !== null) config[`axis_${key}_${type}`] = v;\n\t};\n\tif (isDefined(value)) {\n\t\tif (isObjectType(value)) Object.keys(value).forEach((key) => {\n\t\t\thelper(key, value[key]);\n\t\t});\n\t\telse if (isNumber(value) || value === false) [\"y\", \"y2\"].forEach((key) => {\n\t\t\thelper(key, value);\n\t\t});\n\t\t$$.state.dirty.data = true;\n\t\t$$.redraw({\n\t\t\twithUpdateOrgXDomain: true,\n\t\t\twithUpdateXDomain: true\n\t\t});\n\t}\n}\n/**\n* Get the min/max value\n* @param {Chart} $$ Chart instance\n* @param {string} type Set type 'min' or 'max'\n* @returns {{x, y, y2}}\n* @private\n*/\nfunction getMinMax($$, type) {\n\tconst { config } = $$;\n\treturn {\n\t\tx: config[`axis_x_${type}`],\n\t\ty: config[`axis_y_${type}`],\n\t\ty2: config[`axis_y2_${type}`]\n\t};\n}\nvar axis_default = { axis: {\n\t/**\n\t* Get and set axis labels.\n\t* - **NOTE:** Only applicable for chart types which has x and y axes.\n\t* @function axis․labels\n\t* @instance\n\t* @memberof Chart\n\t* @param {object} labels specified axis' label to be updated.\n\t* @param {string} [labels.x] x Axis string\n\t* @param {string} [labels.y] y Axis string\n\t* @param {string} [labels.y2] y2 Axis string\n\t* @returns {object|undefined} axis labels text object\n\t* @example\n\t* // Update axis' label\n\t* chart.axis.labels({\n\t* x: \"New X Axis Label\",\n\t* y: \"New Y Axis Label\",\n\t* y2: \"New Y2 Axis Label\"\n\t* });\n\t*\n\t* chart.axis.labels();\n\t* // --> {\n\t* // x: \"New X Axis Label\",\n\t* // y: \"New Y Axis Label\",\n\t* // y2: \"New Y2 Axis Label\"\n\t* // }\n\t*/\n\tlabels: function(labels) {\n\t\tconst $$ = this.internal;\n\t\tlet labelText;\n\t\tif (labels) {\n\t\t\tObject.keys(labels).forEach((axisId) => {\n\t\t\t\t$$.axis.setLabelText(axisId, labels[axisId]);\n\t\t\t});\n\t\t\tif ($$.state.isCanvasMode) $$.renderCanvasFrame?.(void 0, null, false);\n\t\t\telse $$.axis.updateLabels();\n\t\t}\n\t\t[\n\t\t\t\"x\",\n\t\t\t\"y\",\n\t\t\t\"y2\"\n\t\t].forEach((v) => {\n\t\t\tconst text = $$.axis.getLabelText(v);\n\t\t\tif (text) {\n\t\t\t\t!labelText && (labelText = {});\n\t\t\t\tlabelText[v] = text;\n\t\t\t}\n\t\t});\n\t\treturn labelText;\n\t},\n\t/**\n\t* Get and set axis min value.\n\t* - **NOTE:** Only applicable for chart types which has x and y axes.\n\t* @function axis․min\n\t* @instance\n\t* @memberof Chart\n\t* @param {object} min If min is given, specified axis' min value will be updated.<br>\n\t* If no argument is given, the min values set on generating option for each axis will be returned.\n\t* If not set any min values on generation, it will return `undefined`.<br>\n\t* To unset specific axis max, set `false` to each of them.\n\t* @returns {object|undefined}\n\t* @example\n\t* // Update axis' min\n\t* chart.axis.min({\n\t* x: -10,\n\t* y: 1000,\n\t* y2: 100\n\t* });\n\t*\n\t* // To unset specific axis min, set false to each of them.\n\t* chart.axis.min({\n\t* x: false,\n\t* y: false,\n\t* y2: false\n\t* });\n\t*\n\t* // shorthand (only affects y and y2 axis)\n\t* chart.axis.min(-50);\n\t* chart.axis.min(false);\n\t*/\n\tmin: function(min) {\n\t\tconst $$ = this.internal;\n\t\treturn isValue(min) || min === false ? setMinMax($$, \"min\", min) : getMinMax($$, \"min\");\n\t},\n\t/**\n\t* Get and set axis max value.\n\t* - **NOTE:** Only applicable for chart types which has x and y axes.\n\t* @function axis․max\n\t* @instance\n\t* @memberof Chart\n\t* @param {object} max If max is given, specified axis' max value will be updated.<br>\n\t* If no argument is given, the max values set on generating option for each axis will be returned.\n\t* If not set any max values on generation, it will return `undefined`.<br>\n\t* To unset specific axis max, set `false` to each of them.\n\t* @returns {object|undefined}\n\t* @example\n\t* // Update axis' label\n\t* chart.axis.max({\n\t* x: 100,\n\t* y: 1000,\n\t* y2: 10000\n\t* });\n\t*\n\t* // To unset specific axis max, set false to each of them.\n\t* chart.axis.max({\n\t* x: false,\n\t* y: false,\n\t* y2: false\n\t* });\n\t*\n\t* // shorthand (only affects y and y2 axis)\n\t* chart.axis.max(10);\n\t* chart.axis.max(false);\n\t*/\n\tmax: function(max) {\n\t\tconst $$ = this.internal;\n\t\treturn isValue(max) || max === false ? setMinMax($$, \"max\", max) : getMinMax($$, \"max\");\n\t},\n\t/**\n\t* Get and set axis min and max value.\n\t* - **NOTE:** Only applicable for chart types which has x and y axes.\n\t* @function axis․range\n\t* @instance\n\t* @memberof Chart\n\t* @param {object} range If range is given, specified axis' min and max value will be updated.\n\t* If no argument is given, the current min and max values for each axis will be returned.<br>\n\t* To unset specific axis max, set `false` to each of them.\n\t* @returns {object|undefined}\n\t* @example\n\t* // Update axis' label\n\t* chart.axis.range({\n\t* min: {\n\t* x: -10,\n\t* y: -1000,\n\t* y2: -10000\n\t* },\n\t* max: {\n\t* x: 100,\n\t* y: 1000,\n\t* y2: 10000\n\t* },\n\t* });\n\t*\n\t* // To unset specific axis max, set false to each of them.\n\t* chart.axis.range({\n\t* min: {\n\t* x: false,\n\t* y: false,\n\t* y2: false\n\t* },\n\t* max: {\n\t* x: false,\n\t* y: false,\n\t* y2: false\n\t* },\n\t* });\n\t*\n\t* // shorthand (only affects y and y2 axis)\n\t* chart.axis.range({ min: -50, max: 1000 });\n\t* chart.axis.range({ min: false, max: false });\n\t*/\n\trange: function(range) {\n\t\tconst { axis } = this;\n\t\tif (arguments.length) {\n\t\t\tconst { min, max } = range;\n\t\t\tisDefined(max) && axis.max(max);\n\t\t\tisDefined(min) && axis.min(min);\n\t\t} else return {\n\t\t\tmax: axis.max(),\n\t\t\tmin: axis.min()\n\t\t};\n\t}\n} };\n//#endregion\nexport { axis_default as default };\n","/*!\n* Copyright (c) 2017 ~ present NAVER Corp.\r\n * billboard.js project is licensed under the MIT license\r\n * \r\n * billboard.js, JavaScript chart library\r\n * https://naver.github.io/billboard.js/\r\n * \r\n * @version 4.1.0\n*/\nimport { isUndefined } from \"../../module/util/type-checks.js\";\n//#region src/Chart/api/group.ts\n/**\n* Copyright (c) 2017 ~ present NAVER Corp.\n* billboard.js project is licensed under the MIT license\n*/\nvar group_default = { \n/**\n* Update groups for the targets.\n* @function groups\n* @instance\n* @memberof Chart\n* @param {Array} groups This argument needs to be an Array that includes one or more Array that includes target ids to be grouped.\n* @returns {Array} Grouped data names array\n* @example\n* // data1 and data2 will be a new group.\n* chart.groups([\n* [\"data1\", \"data2\"]\n* ]);\n*/\ngroups(groups) {\n\tconst $$ = this.internal;\n\tconst { config } = $$;\n\tif (isUndefined(groups)) return config.data_groups;\n\tconfig.data_groups = groups;\n\t$$.state.dirty.data = true;\n\t$$.redraw();\n\treturn config.data_groups;\n} };\n//#endregion\nexport { group_default as default };\n","/*!\n* Copyright (c) 2017 ~ present NAVER Corp.\r\n * billboard.js project is licensed under the MIT license\r\n * \r\n * billboard.js, JavaScript chart library\r\n * https://naver.github.io/billboard.js/\r\n * \r\n * @version 4.1.0\n*/\nimport { isArray, isObject } from \"../../module/util/type-checks.js\";\n//#region src/Chart/api/x.ts\n/**\n* Copyright (c) 2017 ~ present NAVER Corp.\n* billboard.js project is licensed under the MIT license\n*/\nvar x_default = {\n\t/**\n\t* Get and set x values for the chart.\n\t* @function x\n\t* @instance\n\t* @memberof Chart\n\t* @param {Array} x If x is given, x values of every target will be updated. If no argument is given, current x values will be returned as an Object whose keys are the target ids.\n\t* @returns {object} xs\n\t* @example\n\t* // Get current x values\n\t* chart.x();\n\t*\n\t* // Update x values for all targets\n\t* chart.x([100, 200, 300, 400, ...]);\n\t*/\n\tx(x) {\n\t\tconst $$ = this.internal;\n\t\tconst { axis, data } = $$;\n\t\tconst isCategorized = axis.isCustomX() && axis.isCategorized();\n\t\tif (isArray(x)) {\n\t\t\tif (isCategorized) this.categories(x);\n\t\t\telse {\n\t\t\t\t$$.updateTargetX(data.targets, x);\n\t\t\t\t$$.state.dirty.data = true;\n\t\t\t\t$$.redraw({\n\t\t\t\t\twithUpdateOrgXDomain: true,\n\t\t\t\t\twithUpdateXDomain: true\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t\treturn isCategorized ? this.categories() : data.xs;\n\t},\n\t/**\n\t* Get and set x values for the chart.\n\t* @function xs\n\t* @instance\n\t* @memberof Chart\n\t* @param {Array} xs If xs is given, specified target's x values will be updated. If no argument is given, current x values will be returned as an Object whose keys are the target ids.\n\t* @returns {object} xs\n\t* @example\n\t* // Get current x values\n\t* chart.xs();\n\t*\n\t* // Update x values for all targets\n\t* chart.xs({\n\t* data1: [10, 20, 30, 40, ...],\n\t* data2: [100, 200, 300, 400, ...]\n\t* });\n\t*/\n\txs(xs) {\n\t\tconst $$ = this.internal;\n\t\tif (isObject(xs)) {\n\t\t\t$$.updateTargetXs($$.data.targets, xs);\n\t\t\t$$.state.dirty.data = true;\n\t\t\t$$.redraw({\n\t\t\t\twithUpdateOrgXDomain: true,\n\t\t\t\twithUpdateXDomain: true\n\t\t\t});\n\t\t}\n\t\treturn $$.data.xs;\n\t}\n};\n//#endregion\nexport { x_default as default };\n","/*!\n* Copyright (c) 2017 ~ present NAVER Corp.\r\n * billboard.js project is licensed under the MIT license\r\n * \r\n * billboard.js, JavaScript chart library\r\n * https://naver.github.io/billboard.js/\r\n * \r\n * @version 4.1.0\n*/\nimport { isDefined, isValue } from \"../../module/util/type-checks.js\";\nimport { getBBox } from \"../../module/util/dom.js\";\nimport { getScale } from \"../internals/scale.js\";\n//#region src/ChartInternal/Axis/AxisRendererHelper.ts\nvar AxisRendererHelper = class {\n\towner;\n\tconfig;\n\tscale;\n\tcharSize = {};\n\tconstructor(owner) {\n\t\tconst scale = getScale();\n\t\tconst { config, params } = owner;\n\t\tthis.owner = owner;\n\t\tthis.config = config;\n\t\tthis.scale = scale;\n\t\tif (config.noTransition || !params.config.transition_duration) config.withoutTransition = true;\n\t\tconfig.range = this.scaleExtent((params.orgXScale || scale).range());\n\t}\n\t/**\n\t* Compute a character dimension\n\t* @param {string} orient Axis orientation\n\t* @param {d3.selection} text SVG text selection\n\t* @param {boolean} memoize memoize the calculated size\n\t* @returns {{w: number, h: number}}\n\t* @private\n\t*/\n\tgetSizeFor1Char(orient, text, memoize = true) {\n\t\tconst size = {\n\t\t\tw: 5.5,\n\t\t\th: 11.5\n\t\t};\n\t\tif (this.charSize[orient] && memoize) return this.charSize[orient];\n\t\t!text.empty() && text.text(\"0\").call((el) => {\n\t\t\ttry {\n\t\t\t\tconst { width, height } = getBBox(el.node(), true);\n\t\t\t\tif (width && height) {\n\t\t\t\t\tsize.w = width;\n\t\t\t\t\tsize.h = height;\n\t\t\t\t}\n\t\t\t} finally {\n\t\t\t\tel.text(\"\");\n\t\t\t}\n\t\t});\n\t\tthis.charSize[orient] = size;\n\t\treturn size;\n\t}\n\t/**\n\t* Get tick transform setter function\n\t* @param {string} id Axis id\n\t* @returns {function(d3Selection, d3Scale): void} transform setter function\n\t* @private\n\t*/\n\tgetTickTransformSetter(id) {\n\t\tconst { config } = this;\n\t\tconst fn = id === \"x\" ? (value) => `translate(${value + config.tickOffset},0)` : (value) => `translate(0,${value})`;\n\t\treturn (selection, scale) => {\n\t\t\tselection.attr(\"transform\", (d) => {\n\t\t\t\tconst x = scale(d);\n\t\t\t\treturn isValue(d) ? fn(x) : null;\n\t\t\t});\n\t\t};\n\t}\n\tscaleExtent(domain) {\n\t\tconst start = domain[0];\n\t\tconst stop = domain[domain.length - 1];\n\t\treturn start < stop ? [start, stop] : [stop, start];\n\t}\n\tgenerateTicks(scale, isYAxes) {\n\t\tconst { tickStepSize } = this.owner.params;\n\t\tconst [start, end] = scale.domain();\n\t\tlet ticks = [];\n\t\tif (isYAxes && tickStepSize) {\n\t\t\tlet interval = Math.round(start);\n\t\t\twhile (interval <= end) {\n\t\t\t\tticks.push(interval);\n\t\t\t\tinterval += tickStepSize;\n\t\t\t}\n\t\t} else if (scale.ticks) {\n\t\t\tconst { tickArguments } = this.config;\n\t\t\tif (scale.type === \"log\" && !tickArguments) {\n\t\t\t\tconst s = getScale(\"_log\").domain([start > 0 ? start : 1, end]).range(scale.range());\n\t\t\t\tticks = s.ticks();\n\t\t\t\tfor (let cnt = end.toFixed().length; ticks.length > 15; cnt--) ticks = s.ticks(cnt);\n\t\t\t\tticks.splice(0, 1, start);\n\t\t\t\tticks.splice(ticks.length - 1, 1, end);\n\t\t\t} else ticks = scale.ticks(...this.config.tickArguments || []);\n\t\t}\n\t\treturn ticks;\n\t}\n\tcopyScale() {\n\t\tconst newScale = this.scale.copy();\n\t\tif (!newScale.domain().length) newScale.domain(this.scale.domain());\n\t\tnewScale.type = this.scale.type;\n\t\treturn newScale;\n\t}\n\ttextFormatted(v) {\n\t\tconst tickFormat = this.config.tickFormat;\n\t\tconst value = /\\d+\\.\\d+0{5,}\\d$/.test(v) ? +String(v).replace(/0+\\d$/, \"\") : v;\n\t\tconst formatted = tickFormat ? tickFormat(value) : value;\n\t\treturn isDefined(formatted) ? formatted : \"\";\n\t}\n\ttransitionise(selection) {\n\t\tconst { config } = this;\n\t\tlet transitionSelection = selection;\n\t\tif (config.withoutTransition) transitionSelection = selection.interrupt();\n\t\telse if (config.transition || !this.owner.params.noTransition) try {\n\t\t\ttransitionSelection = selection.transition(config.transition);\n\t\t} catch {}\n\t\treturn transitionSelection;\n\t}\n};\n//#endregion\nexport { AxisRendererHelper as default };\n","/*!\n* Copyright (c) 2017 ~ present NAVER Corp.\r\n * billboard.js project is licensed under the MIT license\r\n * \r\n * billboard.js, JavaScript chart library\r\n * https://naver.github.io/billboard.js/\r\n * \r\n * @version 4.1.0\n*/\nimport { isArray, isFunction, isNumber, isString } from \"../../module/util/type-checks.js\";\nimport { toArray } from \"../../module/util/object.js\";\nimport { $COMMON } from \"../../config/classes.js\";\nimport AxisRendererHelper from \"./AxisRendererHelper.js\";\nimport { select } from \"d3-selection\";\n//#region src/ChartInternal/Axis/AxisRenderer.ts\n/**\n* Copyright (c) 2017 ~ present NAVER Corp.\n* billboard.js project is licensed under the MIT license\n* @ignore\n*/\n/**\n* Get the corresponding main axis id for subchart axis ids.\n* @param {string} id Axis id\n* @returns {string} Base axis id\n* @private\n*/\nfunction getBaseAxisId(id) {\n\treturn id === \"subX\" ? \"x\" : id === \"subY\" ? \"y\" : id === \"subY2\" ? \"y2\" : id;\n}\n/**\n* Get config option prefix for an axis id.\n* @param {string} id Axis id\n* @returns {string} Option prefix\n* @private\n*/\nfunction getAxisOptionPrefix(id) {\n\tconst type = getBaseAxisId(id);\n\treturn /^sub/.test(id) ? `subchart_axis_${type}` : `axis_${type}`;\n}\nvar AxisRenderer = class {\n\thelper;\n\tconfig;\n\tparams;\n\tg;\n\tgeneratedTicks = [];\n\tcanReuseTickTextOnResize(isLeftRight) {\n\t\tconst { config, params } = this;\n\t\tconst { config: chartConfig, id, owner } = params;\n\t\tconst isX = /^(x|subX)$/.test(id);\n\t\tconst type = getBaseAxisId(id);\n\t\tconst customTickFormat = /^sub/.test(id) ? chartConfig[`subchart_axis_${type}_tick_format`] || chartConfig[`axis_${type}_tick_format`] : chartConfig[`axis_${type}_tick_format`];\n\t\tconst categoryAutoWrap = params.tickMultiline && params.isCategory && !isLeftRight && !(params.tickWidth > 0);\n\t\treturn !!(owner.state.resizing && !owner.state.flowing && !isFunction(chartConfig.axis_evalTextSize) && !customTickFormat && !params.tickTitle && !(isX && chartConfig.axis_x_tick_autorotate) && !categoryAutoWrap && config.withoutTransition);\n\t}\n\tcanReuseTickNodesOnResize(tickNodes, ticks, isLeftRight, tickShow) {\n\t\tif (tickShow.tick || !tickShow.text || !this.canReuseTickTextOnResize(isLeftRight) || tickNodes.size() !== ticks.length) return false;\n\t\tconst nodes = tickNodes.nodes();\n\t\tfor (let i = 0; i < ticks.length; i++) {\n\t\t\tconst current = nodes[i].__data__;\n\t\t\tconst next = ticks[i];\n\t\t\tif (current instanceof Date || next instanceof Date) {\n\t\t\t\tif (+current !== +next) return false;\n\t\t\t} else if (current !== next) return false;\n\t\t}\n\t\treturn true;\n\t}\n\tconstructor(params = {}) {\n\t\tconst config = {\n\t\t\tinnerTickSize: 6,\n\t\t\touterTickSize: params.outerTick ? 6 : 0,\n\t\t\torient: \"bottom\",\n\t\t\trange: [],\n\t\t\ttickArguments: null,\n\t\t\ttickCentered: null,\n\t\t\ttickCulling: true,\n\t\t\ttickFormat: null,\n\t\t\ttickLength: 9,\n\t\t\ttickOffset: 0,\n\t\t\ttickPadding: 3,\n\t\t\ttickValues: null,\n\t\t\ttransition: null,\n\t\t\tnoTransition: params.noTransition\n\t\t};\n\t\tconfig.tickLength = Math.max(config.innerTickSize, 0) + config.tickPadding;\n\t\tthis.config = config;\n\t\tthis.params = params;\n\t\tthis.helper = new AxisRendererHelper(this);\n\t}\n\t/**\n\t* Create axis element\n\t* @param {d3.selection} g Axis selection\n\t* @private\n\t*/\n\tcreate(g) {\n\t\tconst ctx = this;\n\t\tconst { config, helper, params } = ctx;\n\t\tconst { scale } = helper;\n\t\tconst { orient } = config;\n\t\tconst splitTickText = this.splitTickText.bind(ctx);\n\t\tconst isLeftRight = /^(left|right)$/.test(orient);\n\t\tconst isTopBottom = /^(top|bottom)$/.test(orient);\n\t\tconst tickTransform = helper.getTickTransformSetter(isTopBottom ? \"x\" : \"y\");\n\t\tconst axisPx = tickTransform === helper.axisX ? \"y\" : \"x\";\n\t\tconst sign = /^(top|left)$/.test(orient) ? -1 : 1;\n\t\tconst rotate = params.tickTextRotate;\n\t\tthis.config.range = scale.rangeExtent ? scale.rangeExtent() : helper.scaleExtent((params.orgXScale || scale).range());\n\t\tconst { innerTickSize, tickLength, range } = config;\n\t\tconst id = params.id;\n\t\tconst type = getBaseAxisId(id);\n\t\tconst { isSubAxes } = params;\n\t\tconst tickTextPos = !isSubAxes && type && /^(x|y|y2)$/.test(type) ? params.config[`axis_${type}_tick_text_position`] : {\n\t\t\tx: 0,\n\t\t\ty: 0\n\t\t};\n\t\tconst prefix = getAxisOptionPrefix(id);\n\t\tconst axisShow = params.config[`${prefix}_show`];\n\t\tconst tickShow = isSubAxes ? {\n\t\t\ttick: true,\n\t\t\ttext: true\n\t\t} : {\n\t\t\ttick: axisShow ? params.config[`${prefix}_tick_show`] : false,\n\t\t\ttext: axisShow ? params.config[`${prefix}_tick_text_show`] : false\n\t\t};\n\t\tconst evalTextSize = params.config.axis_evalTextSize;\n\t\tlet $g;\n\t\tg.each(function() {\n\t\t\tconst g = select(this);\n\t\t\tlet scale0 = this.__chart__ || scale;\n\t\t\tlet scale1 = helper.copyScale();\n\t\t\t$g = g;\n\t\t\tthis.__chart__ = scale1;\n\t\t\tconfig.tickOffset = params.isCategory ? (scale1(1) - scale1(0)) / 2 : 0;\n\t\t\tconst path = g.selectAll(\".domain\").data([0]);\n\t\t\tpath.enter().append(\"path\").attr(\"class\", \"domain\").merge(path).attr(\"d\", () => {\n\t\t\t\tconst outerTickSized = config.outerTickSize * sign;\n\t\t\t\treturn isTopBottom ? `M${range[0]},${outerTickSized}V0H${range[1]}V${outerTickSized}` : `M${outerTickSized},${range[0]}H0V${range[1]}H${outerTickSized}`;\n\t\t\t});\n\t\t\tif (tickShow.tick || tickShow.text) {\n\t\t\t\tconst ticks = config.tickValues || helper.generateTicks(scale1, isLeftRight || params.config.axis_rotated);\n\t\t\t\tctx.generatedTicks = ticks;\n\t\t\t\tlet tick = g.selectAll(\".tick\");\n\t\t\t\tif (ctx.canReuseTickNodesOnResize(tick, ticks, isLeftRight || params.config.axis_rotated, tickShow)) tickTransform(tick, scale1);\n\t\t\t\telse {\n\t\t\t\t\ttick = tick.data(ticks, scale1);\n\t\t\t\t\tconst tickEnter = tick.enter().insert(\"g\", \".domain\").attr(\"class\", \"tick\");\n\t\t\t\t\tconst tickExit = tick.exit().remove();\n\t\t\t\t\ttick = tickEnter.merge(tick);\n\t\t\t\t\ttickShow.tick && tickEnter.append(\"line\");\n\t\t\t\t\ttickShow.text && tickEnter.append(\"text\");\n\t\t\t\t\tconst hasTickChange = !tickEnter.empty() || !tickExit.empty();\n\t\t\t\t\tconst reuseTickText = tickShow.text && !hasTickChange && ctx.canReuseTickTextOnResize(isLeftRight || params.config.axis_rotated);\n\t\t\t\t\tlet sizeFor1Char = {\n\t\t\t\t\t\tw: 0,\n\t\t\t\t\t\th: 0\n\t\t\t\t\t};\n\t\t\t\t\tlet textUpdate = tick.selectAll(\"text.__bb-empty\");\n\t\t\t\t\tif (tickShow.text && !reuseTickText) {\n\t\t\t\t\t\tconst tickText = tick.select(\"text\");\n\t\t\t\t\t\tconst counts = [];\n\t\t\t\t\t\ttextUpdate = tickText;\n\t\t\t\t\t\tif (isFunction(evalTextSize)) {\n\t\t\t\t\t\t\tsizeFor1Char = evalTextSize.bind(ctx.params.owner.api)(tickText.node(), id);\n\t\t\t\t\t\t\tif (this.classList.contains($COMMON.dummy)) this.sizeFor1Char = sizeFor1Char;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (!sizeFor1Char || sizeFor1Char.w === 0 || sizeFor1Char.h === 0) sizeFor1Char = ctx.helper.getSizeFor1Char(orient, tickText, !!evalTextSize);\n\t\t\t\t\t\tlet tspan = tickText.selectAll(\"tspan\").data((d, index) => {\n\t\t\t\t\t\t\tlet split;\n\t\t\t\t\t\t\tif (params.tickMultiline) split = splitTickText(d, scale1, ticks, isLeftRight, sizeFor1Char.w);\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\tconst formatted = helper.textFormatted(d);\n\t\t\t\t\t\t\t\tsplit = isArray(formatted) ? formatted.concat() : [formatted];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tcounts[index] = split.length;\n\t\t\t\t\t\t\treturn split.map((splitted) => ({\n\t\t\t\t\t\t\t\tindex,\n\t\t\t\t\t\t\t\tsplitted\n\t\t\t\t\t\t\t}));\n\t\t\t\t\t\t});\n\t\t\t\t\t\ttspan.exit().remove();\n\t\t\t\t\t\ttspan = tspan.enter().append(\"tspan\").merge(tspan).text((d) => d.splitted);\n\t\t\t\t\t\ttspan.attr(\"x\", isTopBottom ? 0 : tickLength * sign).attr(\"dx\", (() => {\n\t\t\t\t\t\t\tlet dx = 0;\n\t\t\t\t\t\t\tif (/(top|bottom)/.test(orient) && rotate) dx = 8 * Math.sin(Math.PI * (rotate / 180)) * (orient === \"top\" ? -1 : 1);\n\t\t\t\t\t\t\treturn dx + (tickTextPos.x || 0);\n\t\t\t\t\t\t})()).attr(\"dy\", (d, i) => {\n\t\t\t\t\t\t\tconst defValue = \".71em\";\n\t\t\t\t\t\t\tlet dy = 0;\n\t\t\t\t\t\t\tif (orient !== \"top\") {\n\t\t\t\t\t\t\t\tdy = sizeFor1Char.h;\n\t\t\t\t\t\t\t\tif (i === 0) dy = isLeftRight ? -((counts[d.index] - 1) * (sizeFor1Char.h / 2) - 3) : tickTextPos.y === 0 ? defValue : 0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn isNumber(dy) && tickTextPos.y ? dy + tickTextPos.y : dy || defValue;\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t\tconst lineUpdate = tick.select(\"line\");\n\t\t\t\t\ttickEnter.select(\"line\").attr(`${axisPx}2`, innerTickSize * sign);\n\t\t\t\t\ttickEnter.select(\"text\").attr(axisPx, tickLength * sign);\n\t\t\t\t\tctx.setTickLineTextPosition(lineUpdate, textUpdate, sizeFor1Char);\n\t\t\t\t\tif (params.tickTitle) {\n\t\t\t\t\t\tconst title = textUpdate.select(\"title\");\n\t\t\t\t\t\tconst tickTitle = params.tickTitle;\n\t\t\t\t\t\t(title.empty() ? textUpdate.append(\"title\") : title).text((index) => tickTitle[Number(index)]);\n\t\t\t\t\t}\n\t\t\t\t\tif (scale1.bandwidth) {\n\t\t\t\t\t\tconst x = scale1;\n\t\t\t\t\t\tconst dx = x.bandwidth() / 2;\n\t\t\t\t\t\tscale0 = (d) => x(d) + dx;\n\t\t\t\t\t\tscale1 = scale0;\n\t\t\t\t\t} else if (scale0.bandwidth) scale0 = scale1;\n\t\t\t\t\telse tickTransform(tickExit, scale1);\n\t\t\t\t\ttick = params.owner.state.flowing ? helper.transitionise(tick) : params.owner.$T(tick);\n\t\t\t\t\ttickTransform(tickEnter, scale0);\n\t\t\t\t\ttickTransform(tick.style(\"opacity\", null), scale1);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tthis.g = $g;\n\t}\n\t/**\n\t* Get generated ticks\n\t* @param {number} count Count of ticks\n\t* @returns {Array} Generated ticks\n\t* @private\n\t*/\n\tgetGeneratedTicks(count) {\n\t\tconst len = this.generatedTicks?.length - 1;\n\t\tlet res = this.generatedTicks;\n\t\tif (len > count) {\n\t\t\tconst interval = Math.round(len / count + .1);\n\t\t\tres = this.generatedTicks.map((v, i) => i % interval === 0 ? v : null).filter((v) => v !== null).splice(0, count);\n\t\t}\n\t\treturn res;\n\t}\n\t/**\n\t* Get tick x/y coordinate\n\t* @returns {{x: number, y: number}}\n\t* @private\n\t*/\n\tgetTickXY() {\n\t\tconst { config } = this;\n\t\tconst pos = {\n\t\t\tx: 0,\n\t\t\ty: 0\n\t\t};\n\t\tif (this.params.isCategory) {\n\t\t\tpos.x = config.tickCentered ? 0 : config.tickOffset;\n\t\t\tpos.y = config.tickCentered ? config.tickOffset : 0;\n\t\t}\n\t\treturn pos;\n\t}\n\t/**\n\t* Get tick size\n\t* @param {object} d data object\n\t* @returns {number}\n\t* @private\n\t*/\n\tgetTickSize(d) {\n\t\tconst { scale } = this.helper;\n\t\tconst { config } = this;\n\t\tconst { innerTickSize, range } = config;\n\t\tconst tickPosition = scale(d) + (config.tickCentered ? 0 : config.tickOffset);\n\t\treturn range[0] < tickPosition && tickPosition < range[1] ? innerTickSize : 0;\n\t}\n\t/**\n\t* Set tick's line & text position\n\t* @param {d3.selection} lineUpdate Line selection\n\t* @param {d3.selection} textUpdate Text selection\n\t* @param {object} sizeFor1Char Size for 1 char\n\t* @private\n\t*/\n\tsetTickLineTextPosition(lineUpdate, textUpdate, sizeFor1Char) {\n\t\tconst tickPos = this.getTickXY();\n\t\tconst { innerTickSize, orient, tickLength, tickOffset } = this.config;\n\t\tconst axisId = this.params.id;\n\t\tconst rotate = this.params.tickTextRotate;\n\t\tconst baseHeight = 6;\n\t\tconst charHeight = sizeFor1Char.h / 2 - baseHeight;\n\t\tconst textAnchorForText = (r) => {\n\t\t\tconst value = [\"start\", \"end\"];\n\t\t\torient === \"top\" && value.reverse();\n\t\t\treturn !r ? \"middle\" : value[r > 0 ? 0 : 1];\n\t\t};\n\t\tconst textTransform = (r) => r ? `rotate(${r})` : null;\n\t\tconst yForText = (r) => {\n\t\t\tconst r2 = r / (orient === \"bottom\" ? 15 : 23);\n\t\t\treturn r ? 11.5 - 2.5 * r2 * (r > 0 ? 1 : -1) : tickLength;\n\t\t};\n\t\tconst { config: { axis_rotated: isRotated, axis_x_tick_text_inner: inner } } = this.params.owner;\n\t\tconst tickLineInner = this.params.config[`axis_${getBaseAxisId(axisId)}_tick_inner`];\n\t\tswitch (orient) {\n\t\t\tcase \"bottom\":\n\t\t\t\tlineUpdate.attr(\"x1\", tickPos.x).attr(\"x2\", tickPos.x).attr(\"y2\", (d) => this.getTickSize.bind(this)(d) * (tickLineInner ? -1 : 1));\n\t\t\t\ttextUpdate.attr(\"x\", 0).attr(\"y\", yForText(rotate)).style(\"text-anchor\", (d, i, { length }) => {\n\t\t\t\t\tif (!isRotated && i === 0 && (inner === true || inner.first)) return \"start\";\n\t\t\t\t\telse if (!isRotated && i === length - 1 && (inner === true || inner.last)) return \"end\";\n\t\t\t\t\treturn textAnchorForText(rotate);\n\t\t\t\t}).attr(\"transform\", textTransform(rotate));\n\t\t\t\tbreak;\n\t\t\tcase \"top\":\n\t\t\t\tlineUpdate.attr(\"x2\", 0).attr(\"y2\", tickLineInner ? innerTickSize : -innerTickSize);\n\t\t\t\ttextUpdate.attr(\"x\", 0).attr(\"y\", -(yForText(rotate) + charHeight + baseHeight)).style(\"text-anchor\", textAnchorForText(rotate)).attr(\"transform\", textTransform(rotate));\n\t\t\t\tbreak;\n\t\t\tcase \"left\":\n\t\t\t\tlineUpdate.attr(\"x2\", tickLineInner ? innerTickSize : -innerTickSize).attr(\"y1\", tickPos.y).attr(\"y2\", tickPos.y);\n\t\t\t\ttextUpdate.attr(\"x\", -tickLength).attr(\"y\", tickOffset + (isRotated ? charHeight / 4 : charHeight)).style(\"text-anchor\", \"end\");\n\t\t\t\tbreak;\n\t\t\tcase \"right\":\n\t\t\t\tlineUpdate.attr(\"x2\", tickLineInner ? -innerTickSize : innerTickSize).attr(\"y2\", 0);\n\t\t\t\ttextUpdate.attr(\"x\", tickLength).attr(\"y\", charHeight).style(\"text-anchor\", \"start\");\n\t\t}\n\t}\n\tsplitTickText(d, scale, ticks, isLeftRight, charWidth) {\n\t\tconst { params } = this;\n\t\tconst tickText = this.helper.textFormatted(d);\n\t\tconst splitted = isString(tickText) && tickText.indexOf(\"\\n\") > -1 ? tickText.split(\"\\n\") : [];\n\t\tif (splitted.length) return splitted;\n\t\tif (isArray(tickText)) return tickText;\n\t\tlet tickWidth = params.tickWidth;\n\t\tif (!tickWidth || tickWidth <= 0) tickWidth = isLeftRight ? 95 : params.isCategory ? (params.isInverted ? scale(ticks[0]) - scale(ticks[1]) : scale(ticks[1]) - scale(ticks[0])) - 12 : 110;\n\t\tfunction split(splitted, text) {\n\t\t\tlet subtext;\n\t\t\tlet spaceIndex;\n\t\t\tlet textWidth;\n\t\t\tfor (let i = 1; i < text.length; i++) {\n\t\t\t\tif (text.charAt(i) === \" \") spaceIndex = i;\n\t\t\t\tsubtext = text.substr(0, i + 1);\n\t\t\t\ttextWidth = charWidth * subtext.length;\n\t\t\t\tif (tickWidth < textWidth) return split(splitted.concat(text.substr(0, spaceIndex || i)), text.slice(spaceIndex ? spaceIndex + 1 : i));\n\t\t\t}\n\t\t\treturn splitted.concat(text);\n\t\t}\n\t\treturn split(splitted, String(tickText));\n\t}\n\tscale(x) {\n\t\tif (!arguments.length) return this.helper.scale;\n\t\tthis.helper.scale = x;\n\t\treturn this;\n\t}\n\torient(x) {\n\t\tif (!arguments.length) return this.config.orient;\n\t\tthis.config.orient = x in {\n\t\t\ttop: 1,\n\t\t\tright: 1,\n\t\t\tbottom: 1,\n\t\t\tleft: 1\n\t\t} ? String(x) : \"bottom\";\n\t\treturn this;\n\t}\n\ttickFormat(format) {\n\t\tconst { config } = this;\n\t\tif (!arguments.length) return config.tickFormat;\n\t\tconfig.tickFormat = format;\n\t\treturn this;\n\t}\n\ttickCentered(isCentered) {\n\t\tconst { config } = this;\n\t\tif (!arguments.length) return config.tickCentered;\n\t\tconfig.tickCentered = isCentered;\n\t\treturn this;\n\t}\n\t/**\n\t* Return tick's offset value.\n\t* The value will be set for 'category' axis type.\n\t* @returns {number}\n\t* @private\n\t*/\n\ttickOffset() {\n\t\treturn this.config.tickOffset;\n\t}\n\t/**\n\t* Get tick interval count\n\t* @private\n\t* @param {number} size Total data size\n\t* @returns {number}\n\t*/\n\ttickInterval(size) {\n\t\tconst { outerTickSize, tickOffset, tickValues } = this.config;\n\t\tlet interval;\n\t\tif (this.params.isCategory) {\n\t\t\tconst scale = this.params.owner.scale.zoom ?? this.helper.scale;\n\t\t\tinterval = tickOffset * 2 || Math.abs(scale(1) - scale(0));\n\t\t} else {\n\t\t\tconst scale = this.params.owner.scale.zoom ?? this.helper.scale;\n\t\t\tinterval = (this.g ? this.g.select(\"path.domain\").node().getTotalLength() - outerTickSize * 2 : Math.abs(scale.range()[1] - scale.range()[0])) / (size || this.g?.selectAll(\"line\").size() || 1);\n\t\t\tif (tickValues) for (let i = 0; i < tickValues.length - 1; i++) {\n\t\t\t\tconst intervalByValue = scale(tickValues[i + 1]) - scale(tickValues[i]);\n\t\t\t\tif (intervalByValue && intervalByValue < interval) interval = intervalByValue;\n\t\t\t}\n\t\t}\n\t\treturn interval === Infinity ? 0 : interval;\n\t}\n\tticks(...args) {\n\t\tconst { config } = this;\n\t\tif (!args.length) return config.tickArguments;\n\t\tconfig.tickArguments = toArray(args);\n\t\treturn this;\n\t}\n\ttickCulling(culling) {\n\t\tconst { config } = this;\n\t\tif (!arguments.length) return config.tickCulling;\n\t\tconfig.tickCulling = culling;\n\t\treturn this;\n\t}\n\ttickValues(x) {\n\t\tconst { config } = this;\n\t\tif (isFunction(x)) config.tickValues = () => x(this.helper.scale.domain());\n\t\telse {\n\t\t\tif (!arguments.length) return config.tickValues;\n\t\t\tconfig.tickValues = x;\n\t\t}\n\t\treturn this;\n\t}\n\tsetTransition(t) {\n\t\tthis.config.transition = t;\n\t\treturn this;\n\t}\n};\n//#endregion\nexport { AxisRenderer as default };\n","/*!\n* Copyright (c) 2017 ~ present NAVER Corp.\r\n * billboard.js project is licensed under the MIT license\r\n * \r\n * billboard.js, JavaScript chart library\r\n * https://naver.github.io/billboard.js/\r\n * \r\n * @version 4.1.0\n*/\nimport { isArray, isEmpty, isFunction, isNumber, isObjectType, isString, isValue, notEmpty } from \"../../module/util/type-checks.js\";\nimport { capitalize, mergeObj, parseDate, sortValue } from \"../../module/util/object.js\";\nimport { getBoundingRect } from \"../../module/util/dom.js\";\nimport { $AXIS, $COMMON } from \"../../config/classes.js\";\nimport { KEY } from \"../../module/Cache.js\";\nimport { getScale } from \"../internals/scale.js\";\nimport AxisRenderer from \"./AxisRenderer.js\";\n//#region src/ChartInternal/Axis/Axis.ts\n/**\n* Get the corresponding main axis id for subchart axis ids.\n* @param {string} id Axis id\n* @returns {string} Base axis id\n* @private\n*/\nfunction getBaseAxisId(id) {\n\treturn id === \"subX\" ? \"x\" : id === \"subY\" ? \"y\" : id === \"subY2\" ? \"y2\" : id;\n}\n/**\n* Check whether the axis id belongs to subchart.\n* @param {string} id Axis id\n* @returns {boolean} Whether id is a subchart axis\n* @private\n*/\nfunction isSubAxis(id) {\n\treturn /^sub/.test(id);\n}\n/**\n* Get tick option value for main/subchart axis.\n* @param {object} config Chart config\n* @param {string} id Axis id\n* @param {string} key Tick option key\n* @returns {boolean|number|string|Array|object|function|null|undefined} Tick option value\n* @private\n*/\nfunction getAxisTickOption(config, id, key) {\n\tconst type = getBaseAxisId(id);\n\tconst subValue = config[`subchart_axis_${type}_tick_${key}`];\n\treturn isSubAxis(id) && subValue !== void 0 ? subValue : config[`axis_${type}_tick_${key}`];\n}\n/**\n* Sample representative tick nodes to avoid N forced reflows in getMaxTickSize\n* @param {SVGTextElement[]} nodes All tick text nodes\n* @returns {SVGTextElement[]} Sampled subset: first, last, longest, and middle nodes\n* @private\n*/\nfunction _sampleTickNodes(nodes) {\n\tconst sampled = [nodes[0], nodes[nodes.length - 1]];\n\tlet maxLen = 0;\n\tlet longestNode = null;\n\tfor (const node of nodes) {\n\t\tconst len = node.textContent?.length ?? 0;\n\t\tif (len > maxLen) {\n\t\t\tmaxLen = len;\n\t\t\tlongestNode = node;\n\t\t}\n\t}\n\tif (longestNode && !sampled.includes(longestNode)) sampled.push(longestNode);\n\tconst mid = nodes[Math.floor(nodes.length / 2)];\n\tif (!sampled.includes(mid)) sampled.push(mid);\n\treturn sampled;\n}\nconst MAX_TICK_MEASURE_VALUES = 50;\nconst TICK_WIDTH_FALLBACK = Symbol(\"tickWidthFallback\");\n/**\n* Get SVG tick line stroke width.\n* @param {object} tickNodes Tick node selection\n* @returns {number} Tick line stroke width\n* @private\n*/\nfunction _getTickLineWidth(tickNodes) {\n\tconst line = tickNodes.select(\"line\").node();\n\tconst strokeWidth = line?.ownerDocument?.defaultView?.getComputedStyle ? parseFloat(line.ownerDocument.defaultView.getComputedStyle(line).strokeWidth) : parseFloat(line?.getAttribute?.(\"stroke-width\"));\n\treturn Number.isFinite(strokeWidth) && strokeWidth > 0 ? strokeWidth : 1;\n}\n/**\n* Check whether adjacent tick line intervals overlap on the rendered axis.\n* @param {object} axis Axis renderer\n* @param {Array} tickValues Sorted tick values\n* @param {number} tickLineWidth Tick line stroke width\n* @returns {boolean} Whether tick lines should be culled with tick text\n* @private\n*/\nfunction _hasOverlappedTickLineIntervals(axis, tickValues, tickLineWidth) {\n\tconst scale = axis?.scale?.();\n\tif (!scale || tickValues.length < 2) return false;\n\tconst halfWidth = Math.max(1, tickLineWidth) / 2;\n\tconst positions = tickValues.map((value) => +scale(value)).filter(Number.isFinite).sort((a, b) => a - b);\n\tif (positions.length < 2) return false;\n\tlet previousEnd = positions[0] + halfWidth;\n\tfor (let i = 1; i < positions.length; i++) {\n\t\tconst start = positions[i] - halfWidth;\n\t\tconst end = positions[i] + halfWidth;\n\t\tif (start <= previousEnd + 1) return true;\n\t\tpreviousEnd = Math.max(previousEnd, end);\n\t}\n\treturn false;\n}\n/**\n* Sample representative tick values before creating dummy tick DOM nodes.\n* @param {Array} values All tick values\n* @param {function} format Tick format function\n* @returns {Array} Sampled tick values\n* @private\n*/\nfunction _sampleTickValues(values, format) {\n\tif (values.length <= MAX_TICK_MEASURE_VALUES) return values;\n\tconst sampled = /* @__PURE__ */ new Map();\n\tconst add = (index) => {\n\t\tif (index >= 0 && index < values.length) sampled.set(index, values[index]);\n\t};\n\tadd(0);\n\tadd(values.length - 1);\n\tadd(Math.floor(values.length / 2));\n\tconst step = Math.max(1, Math.floor(values.length / 47));\n\tlet maxLength = -1;\n\tlet maxIndex = 0;\n\tfor (let i = 0; i < values.length; i += step) {\n\t\tadd(i);\n\t\tconst value = values[i];\n\t\tconst text = format ? format(value) : value;\n\t\tconst length = Array.isArray(text) ? text.join(\"\").length : String(text ?? \"\").length;\n\t\tif (length > maxLength) {\n\t\t\tmaxLength = length;\n\t\t\tmaxIndex = i;\n\t\t}\n\t}\n\tadd(maxIndex);\n\treturn Array.from(sampled.keys()).sort((a, b) => a - b).map((index) => sampled.get(index));\n}\n/**\n* Get compact tick values for cache fingerprinting.\n* @param {Array|function} values Tick values\n* @returns {Array|object|string} Cache fingerprint value\n* @private\n*/\nfunction _getTickValuesCacheValue(values) {\n\tif (isFunction(values)) return _getCacheReferenceId(values);\n\tif (!Array.isArray(values) || values.length <= MAX_TICK_MEASURE_VALUES) return values;\n\treturn {\n\t\tlength: values.length,\n\t\tfirst: values[0],\n\t\tmiddle: values[Math.floor(values.length / 2)],\n\t\tlast: values[values.length - 1]\n\t};\n}\n/**\n* Get compact tick width fallback.\n* @param {Array} ticks Tick width array\n* @returns {number|undefined} Fallback width\n* @private\n*/\nfunction _getTickWidthFallback(ticks) {\n\treturn ticks[TICK_WIDTH_FALLBACK];\n}\n/**\n* Set compact tick width fallback.\n* @param {Array} ticks Tick width array\n* @param {number} width Fallback width\n* @private\n*/\nfunction _setTickWidthFallback(ticks, width) {\n\tif (isNumber(width)) Object.defineProperty(ticks, TICK_WIDTH_FALLBACK, {\n\t\tconfigurable: true,\n\t\tvalue: width,\n\t\twritable: true\n\t});\n\telse delete ticks[TICK_WIDTH_FALLBACK];\n}\n/**\n* Reset tick widths and compact metadata.\n* @param {Array} ticks Tick width array\n* @private\n*/\nfunction _clearTickWidths(ticks) {\n\tticks.length = 0;\n\t_setTickWidthFallback(ticks);\n}\n/**\n* Store large uniform tick widths without filling the array.\n* @param {Array} ticks Tick width array\n* @param {number} length Tick count\n* @param {number} width Uniform fallback width\n* @private\n*/\nfunction _compactTickWidths(ticks, length, width) {\n\t_clearTickWidths(ticks);\n\tticks.length = length;\n\t_setTickWidthFallback(ticks, width);\n}\n/**\n* Clone tick widths while preserving sparse compact storage.\n* @param {Array} ticks Tick width array\n* @returns {Array} Cloned tick width array\n* @private\n*/\nfunction _cloneTickWidths(ticks) {\n\tconst clone = [];\n\tclone.length = ticks.length;\n\tObject.keys(ticks).forEach((key) => {\n\t\tconst index = +key;\n\t\tclone[index] = ticks[index];\n\t});\n\t_setTickWidthFallback(clone, _getTickWidthFallback(ticks));\n\treturn clone;\n}\n/**\n* Restore cached tick widths into current mutable state.\n* @param {Array} target Current tick width array\n* @param {Array} source Cached tick width array\n* @private\n*/\nfunction _restoreTickWidths(target, source) {\n\t_clearTickWidths(target);\n\ttarget.length = source.length;\n\tObject.keys(source).forEach((key) => {\n\t\tconst index = +key;\n\t\ttarget[index] = source[index];\n\t});\n\t_setTickWidthFallback(target, _getTickWidthFallback(source));\n}\n/**\n* Get a tick width from dense or compact storage.\n* @param {Array} ticks Tick width array\n* @param {number} index Tick index\n* @param {number} fallback Fallback width\n* @returns {number} Tick width\n* @private\n*/\nfunction _getTickWidth(ticks, index, fallback) {\n\tconst value = ticks[index];\n\tif (isNumber(value)) return value;\n\tconst numericValue = Number(value);\n\treturn Number.isFinite(numericValue) ? numericValue : fallback;\n}\nconst cacheReferenceIds = /* @__PURE__ */ new WeakMap();\nlet cacheReferenceUid = 0;\n/**\n* Get stable identity for non-serializable cache inputs.\n* @param {function|object|string|number|boolean|null|undefined} value Value to identify\n* @returns {string} Stable reference id\n* @private\n*/\nfunction _getCacheReferenceId(value) {\n\tif (!value || !/^(function|object)$/.test(typeof value)) return `${typeof value}:${String(value)}`;\n\tlet id = cacheReferenceIds.get(value);\n\tif (!id) {\n\t\tid = ++cacheReferenceUid;\n\t\tcacheReferenceIds.set(value, id);\n\t}\n\treturn `${typeof value}:${id}`;\n}\n/**\n* Stringify axis measurement inputs for cache matching.\n* @param {Date|Array|function|object|string|number|boolean|null|undefined} value Value to stringify\n* @returns {string} Stringified value\n* @private\n*/\nfunction _stringifyCacheValue(value) {\n\tif (value instanceof Date) return `date:${+value}`;\n\telse if (Array.isArray(value)) return `[${value.map((v) => _stringifyCacheValue(v)).join(\",\")}]`;\n\telse if (value && typeof value === \"object\") return `{${Object.keys(value).sort().map((key) => `${key}:${_stringifyCacheValue(value[key])}`).join(\",\")}}`;\n\telse if (typeof value === \"function\") return _getCacheReferenceId(value);\n\treturn `${typeof value}:${String(value)}`;\n}\n/**\n* Clone array/date cache values before storing state snapshots.\n* @param {Date|Array|object|string|number|boolean|null|undefined} value Value to clone\n* @returns {Date|Array|object|string|number|boolean|null|undefined} Cloned value\n* @private\n*/\nfunction _cloneCacheValue(value) {\n\treturn value instanceof Date ? /* @__PURE__ */ new Date(+value) : Array.isArray(value) ? value.map((v) => _cloneCacheValue(v)) : value;\n}\n/**\n* Clone tick measurement state without mutable array side effects.\n* @param {object} tickSize Tick measurement state\n* @returns {object} Cloned measurement state\n* @private\n*/\nfunction _cloneMaxTickSize(tickSize) {\n\treturn {\n\t\twidth: tickSize.width,\n\t\theight: tickSize.height,\n\t\tticks: tickSize.ticks && _cloneTickWidths(tickSize.ticks),\n\t\tclipPath: tickSize.clipPath,\n\t\tdomain: _cloneCacheValue(tickSize.domain)\n\t};\n}\n/**\n* Restore cached tick measurement into current mutable state.\n* @param {object} target Current tick measurement state\n* @param {object} source Cached tick measurement state\n* @returns {object} Current tick measurement state\n* @private\n*/\nfunction _restoreMaxTickSize(target, source) {\n\ttarget.width = source.width;\n\ttarget.height = source.height;\n\ttarget.clipPath = source.clipPath;\n\ttarget.domain = _cloneCacheValue(source.domain);\n\tif (target.ticks && source.ticks) _restoreTickWidths(target.ticks, source.ticks);\n\treturn target;\n}\nvar Axis_default = { getAxisInstance: function() {\n\treturn this.axis || new Axis(this);\n} };\nvar Axis = class {\n\towner;\n\tx;\n\tsubX;\n\tsubY;\n\tsubY2;\n\ty;\n\ty2;\n\taxesList = {};\n\ttick = {\n\t\tx: null,\n\t\ty: null,\n\t\ty2: null\n\t};\n\txs = [];\n\torient = {\n\t\tx: \"bottom\",\n\t\ty: \"left\",\n\t\ty2: \"right\",\n\t\tsubX: \"bottom\",\n\t\tsubY: \"left\",\n\t\tsubY2: \"right\"\n\t};\n\tconstructor(owner) {\n\t\tthis.owner = owner;\n\t\tthis.setOrient();\n\t}\n\tgetAxisClassName(id) {\n\t\treturn `${$AXIS.axis} ${$AXIS[`axis${capitalize(id)}`]}`;\n\t}\n\tisHorizontal($$, forHorizontal) {\n\t\tconst isRotated = $$.config.axis_rotated;\n\t\treturn forHorizontal ? isRotated : !isRotated;\n\t}\n\tisCategorized() {\n\t\tconst { config, state } = this.owner;\n\t\treturn config.axis_x_type.indexOf(\"category\") >= 0 || state.hasRadar;\n\t}\n\tisCustomX() {\n\t\tconst { config } = this.owner;\n\t\treturn !this.isTimeSeries() && (config.data_x || notEmpty(config.data_xs));\n\t}\n\tisTimeSeries(id = \"x\") {\n\t\treturn this.owner.config[`axis_${id}_type`] === \"timeseries\";\n\t}\n\tisLog(id = \"x\") {\n\t\treturn this.owner.config[`axis_${id}_type`] === \"log\";\n\t}\n\tisTimeSeriesY() {\n\t\treturn this.isTimeSeries(\"y\");\n\t}\n\tgetAxisType(id = \"x\") {\n\t\tlet type = \"linear\";\n\t\tif (this.isTimeSeries(id)) type = this.owner.config.axis_x_localtime ? \"time\" : \"utc\";\n\t\telse if (this.isLog(id)) type = \"log\";\n\t\treturn type;\n\t}\n\t/**\n\t* Get extent value\n\t* @returns {Array} default extent\n\t* @private\n\t*/\n\tgetExtent() {\n\t\tconst $$ = this.owner;\n\t\tconst { config, scale } = $$;\n\t\tlet extent = config.axis_x_extent;\n\t\tif (extent) {\n\t\t\tif (isFunction(extent)) extent = extent.bind($$.api)($$.getXDomain($$.data.targets), scale.subX);\n\t\t\telse if (this.isTimeSeries() && extent.every(isNaN)) {\n\t\t\t\tconst fn = parseDate.bind($$);\n\t\t\t\textent = extent.map((v) => scale.subX(fn(v)));\n\t\t\t}\n\t\t}\n\t\treturn extent;\n\t}\n\tinit() {\n\t\tconst $$ = this.owner;\n\t\tconst { config, $el: { main, axis }, state: { clip } } = $$;\n\t\tconst target = [\"x\", \"y\"];\n\t\tconfig.axis_y2_show && target.push(\"y2\");\n\t\ttarget.forEach((v) => {\n\t\t\tconst classAxis = this.getAxisClassName(v);\n\t\t\taxis[v] = main.append(\"g\").attr(\"class\", classAxis).attr(\"clip-path\", () => {\n\t\t\t\tlet res = null;\n\t\t\t\tif (v === \"x\") res = clip.pathXAxis;\n\t\t\t\telse if (v === \"y\") res = clip.pathYAxis;\n\t\t\t\treturn res;\n\t\t\t}).attr(\"transform\", $$.getTranslate(v)).style(\"visibility\", config[`axis_${v}_show`] ? null : \"hidden\");\n\t\t\tthis.generateAxes(v);\n\t\t});\n\t}\n\t/**\n\t* Set axis orient according option value\n\t* @private\n\t*/\n\tsetOrient() {\n\t\tconst { axis_rotated: isRotated, axis_y_inner: yInner, axis_y2_inner: y2Inner } = this.owner.config;\n\t\tthis.orient = {\n\t\t\tx: isRotated ? \"left\" : \"bottom\",\n\t\t\ty: isRotated ? yInner ? \"top\" : \"bottom\" : yInner ? \"right\" : \"left\",\n\t\t\ty2: isRotated ? y2Inner ? \"bottom\" : \"top\" : y2Inner ? \"left\" : \"right\",\n\t\t\tsubX: isRotated ? \"left\" : \"bottom\",\n\t\t\tsubY: isRotated ? yInner ? \"top\" : \"bottom\" : yInner ? \"right\" : \"left\",\n\t\t\tsubY2: isRotated ? y2Inner ? \"bottom\" : \"top\" : y2Inner ? \"left\" : \"right\"\n\t\t};\n\t}\n\t/**\n\t* Generate axes\n\t* It's used when axis' axes option is set\n\t* @param {string} id Axis id\n\t* @private\n\t*/\n\tgenerateAxes(id) {\n\t\tconst $$ = this.owner;\n\t\tconst { config } = $$;\n\t\tconst axes = [];\n\t\tconst axesConfig = config[`axis_${id}_axes`];\n\t\tconst isRotated = config.axis_rotated;\n\t\tlet orient;\n\t\tif (id === \"x\") orient = isRotated ? \"left\" : \"bottom\";\n\t\telse if (id === \"y\") orient = isRotated ? \"bottom\" : \"left\";\n\t\telse if (id === \"y2\") orient = isRotated ? \"top\" : \"right\";\n\t\tif (axesConfig.length) axesConfig.forEach((v) => {\n\t\t\tconst tick = v.tick || {};\n\t\t\tconst scale = $$.scale[id].copy();\n\t\t\tv.domain && scale.domain(v.domain);\n\t\t\tconst axis = new AxisRenderer({\n\t\t\t\touterTick: tick.outer !== false,\n\t\t\t\tnoTransition: false,\n\t\t\t\tconfig,\n\t\t\t\tid,\n\t\t\t\tisSubAxes: true,\n\t\t\t\towner: $$\n\t\t\t}).scale(scale).orient(orient).tickFormat(isFunction(tick.format) ? tick.format.bind($$.api) : ((x) => x));\n\t\t\tisValue(tick.count) && axis.ticks(tick.count);\n\t\t\ttick.values && axis.tickValues(tick.values);\n\t\t\taxes.push(axis);\n\t\t});\n\t\tthis.axesList[id] = axes;\n\t}\n\t/**\n\t* Update axes nodes\n\t* @private\n\t*/\n\tupdateAxes() {\n\t\tconst $$ = this.owner;\n\t\tconst { config, $el: { main }, $T } = $$;\n\t\tObject.keys(this.axesList).forEach((id) => {\n\t\t\tconst axesConfig = config[`axis_${id}_axes`];\n\t\t\tconst scale = $$.scale[id].copy();\n\t\t\tconst range = scale.range();\n\t\t\tthis.axesList[id].forEach((v, i) => {\n\t\t\t\tconst axisRange = v.scale().range();\n\t\t\t\tif (!range.every((v, i) => v === axisRange[i])) v.scale().range(range);\n\t\t\t\tconst className = `${this.getAxisClassName(id)}-${i + 1}`;\n\t\t\t\tlet g = main.select(`.${className.replace(/\\s/, \".\")}`);\n\t\t\t\tif (g.empty()) {\n\t\t\t\t\tg = main.append(\"g\").attr(\"class\", className).style(\"visibility\", config[`axis_${id}_show`] ? null : \"hidden\");\n\t\t\t\t\tv.create(g);\n\t\t\t\t} else {\n\t\t\t\t\taxesConfig[i].domain && scale.domain(axesConfig[i].domain);\n\t\t\t\t\tv.scale(scale).create($T(g));\n\t\t\t\t}\n\t\t\t\tg.attr(\"transform\", $$.getTranslate(id, i + 1));\n\t\t\t});\n\t\t});\n\t}\n\t/**\n\t* Set Axis & tick values\n\t* called from: updateScales()\n\t* @param {string} id Axis id string\n\t* @param {d3Scale} scale Scale\n\t* @param {boolean} outerTick If show outer tick\n\t* @param {boolean} noTransition If with no transition\n\t* @private\n\t*/\n\tsetAxis(id, scale, outerTick, noTransition) {\n\t\tconst $$ = this.owner;\n\t\tconst type = getBaseAxisId(id);\n\t\tif (!isSubAxis(id)) this.tick[type] = this.getTickValues(type);\n\t\tthis[id] = this.getAxis(id, scale, outerTick, id === \"x\" && ($$.scale.zoom || $$.config.subchart_show || $$.state.resizing) ? true : noTransition);\n\t}\n\tgetAxis(id, scale, outerTick, noTransition, noTickTextRotate) {\n\t\tconst $$ = this.owner;\n\t\tconst { config } = $$;\n\t\tconst isX = /^(x|subX)$/.test(id);\n\t\tconst type = getBaseAxisId(id);\n\t\tconst isCategory = isX && this.isCategorized();\n\t\tconst orient = this.orient[id];\n\t\tconst tickTextRotate = noTickTextRotate ? 0 : $$.getAxisTickRotate(type);\n\t\tlet tickFormat;\n\t\tif (isX) tickFormat = id === \"subX\" ? $$.format.subXAxisTick : $$.format.xAxisTick;\n\t\telse {\n\t\t\tconst fn = isSubAxis(id) ? config[`subchart_axis_${type}_tick_format`] || config[`axis_${type}_tick_format`] : config[`axis_${type}_tick_format`];\n\t\t\tif (isFunction(fn)) tickFormat = fn.bind($$.api);\n\t\t}\n\t\tlet tickValues = isSubAxis(id) ? this.getTickValues(type, true) : this.tick[type];\n\t\tconst axisParams = mergeObj({\n\t\t\touterTick,\n\t\t\tnoTransition,\n\t\t\tconfig,\n\t\t\tid,\n\t\t\ttickTextRotate,\n\t\t\towner: $$\n\t\t}, isX && {\n\t\t\tisCategory,\n\t\t\tisInverted: config.axis_x_inverted,\n\t\t\ttickMultiline: config.axis_x_tick_multiline,\n\t\t\ttickWidth: config.axis_x_tick_width,\n\t\t\ttickTitle: isCategory && config.axis_x_tick_tooltip && $$.api.categories(),\n\t\t\torgXScale: $$.scale.x\n\t\t});\n\t\tif (!isX) axisParams.tickStepSize = config[`axis_${type}_tick_stepSize`];\n\t\tconst axis = new AxisRenderer(axisParams).scale(isX && $$.scale.zoom || scale).orient(orient);\n\t\tif (isX && this.isTimeSeries() && tickValues && !isFunction(tickValues)) {\n\t\t\tconst fn = parseDate.bind($$);\n\t\t\ttickValues = tickValues.map((v) => fn(v));\n\t\t} else if (!isX && this.isTimeSeriesY()) {\n\t\t\taxis.ticks(config.axis_y_tick_time_value);\n\t\t\ttickValues = null;\n\t\t}\n\t\ttickValues && axis.tickValues(tickValues);\n\t\taxis.tickFormat(tickFormat || !isX && $$.isStackNormalized() && $$.hasAxisGroupedData(type) && ((x) => `${x}%`));\n\t\tif (isCategory) {\n\t\t\taxis.tickCentered(config.axis_x_tick_centered);\n\t\t\tif (isEmpty(config.axis_x_tick_culling)) config.axis_x_tick_culling = false;\n\t\t}\n\t\tconst tickCount = getAxisTickOption(config, id, \"count\");\n\t\ttickCount && axis.ticks(tickCount);\n\t\treturn axis;\n\t}\n\tupdateXAxisTickValues(targets, axis) {\n\t\tconst $$ = this.owner;\n\t\tconst { config } = $$;\n\t\tconst fit = config.axis_x_tick_fit;\n\t\tconst generateValues = (countOption = config.axis_x_tick_count) => {\n\t\t\tlet count = countOption;\n\t\t\tlet values;\n\t\t\tif (fit) {\n\t\t\t\tvalues = $$.mapTargetsToUniqueXs(targets);\n\t\t\t\tif (this.isCategorized() && count > values.length) count = values.length;\n\t\t\t\tvalues = this.generateTickValues(values, count, this.isTimeSeries());\n\t\t\t}\n\t\t\treturn values;\n\t\t};\n\t\tconst values = generateValues();\n\t\tif (axis) axis.tickValues(values);\n\t\telse if (this.x) {\n\t\t\tconst subTickValues = this.getTickValues(\"x\", true);\n\t\t\tconst subTickCount = getAxisTickOption(config, \"subX\", \"count\");\n\t\t\tconst subValues = subTickValues ?? (subTickCount !== config.axis_x_tick_count ? generateValues(subTickCount) : values);\n\t\t\tthis.x.tickValues(values);\n\t\t\tthis.subX?.tickValues(subValues);\n\t\t}\n\t\treturn values;\n\t}\n\tgetId(id) {\n\t\tconst { config, scale } = this.owner;\n\t\tlet axis = config.data_axes[id];\n\t\tif (!axis || !scale[axis]) axis = \"y\";\n\t\treturn axis;\n\t}\n\tgetXAxisTickFormat(forSubchart) {\n\t\tconst $$ = this.owner;\n\t\tconst { config, format } = $$;\n\t\tconst tickFormat = forSubchart ? config.subchart_axis_x_tick_format || config.axis_x_tick_format : config.axis_x_tick_format;\n\t\tconst isTimeSeries = this.isTimeSeries();\n\t\tconst isCategorized = this.isCategorized();\n\t\tlet currFormat;\n\t\tif (tickFormat) {\n\t\t\tif (isFunction(tickFormat)) currFormat = tickFormat.bind($$.api);\n\t\t\telse if (isTimeSeries) currFormat = (date) => date ? format.axisTime(tickFormat)(date) : \"\";\n\t\t} else currFormat = isTimeSeries ? format.defaultAxisTime : isCategorized ? $$.categoryName : (v) => v < 0 ? v.toFixed(0) : v;\n\t\treturn isFunction(currFormat) ? (v) => currFormat.apply($$, isCategorized ? [v, $$.categoryName(v)] : [v]) : currFormat;\n\t}\n\tgetTickValues(id, isSub = false) {\n\t\tconst $$ = this.owner;\n\t\tconst tickValues = isSub ? getAxisTickOption($$.config, `sub${capitalize(id)}`, \"values\") : $$.config[`axis_${id}_tick_values`];\n\t\tconst values = isFunction(tickValues) ? tickValues.call($$.api) : tickValues;\n\t\tconst axis = $$[`${id}Axis`];\n\t\treturn isSub ? values ?? void 0 : values || (axis ? axis.tickValues() : void 0);\n\t}\n\tgetLabelOptionByAxisId(id) {\n\t\treturn this.owner.config[`axis_${id}_label`];\n\t}\n\tgetLabelText(id) {\n\t\tconst option = this.getLabelOptionByAxisId(id);\n\t\treturn isString(option) ? option : option ? option.text : null;\n\t}\n\tsetLabelText(id, text) {\n\t\tconst { config } = this.owner;\n\t\tconst option = this.getLabelOptionByAxisId(id);\n\t\tif (isString(option)) config[`axis_${id}_label`] = text;\n\t\telse if (option) option.text = text;\n\t}\n\tgetLabelPosition(id, defaultPosition) {\n\t\tconst isRotated = this.owner.config.axis_rotated;\n\t\tconst option = this.getLabelOptionByAxisId(id);\n\t\tconst position = isObjectType(option) && option.position ? option.position : defaultPosition[+!isRotated];\n\t\tconst has = (v) => !!~position.indexOf(v);\n\t\treturn {\n\t\t\tisInner: has(\"inner\"),\n\t\t\tisOuter: has(\"outer\"),\n\t\t\tisLeft: has(\"left\"),\n\t\t\tisCenter: has(\"center\"),\n\t\t\tisRight: has(\"right\"),\n\t\t\tisTop: has(\"top\"),\n\t\t\tisMiddle: has(\"middle\"),\n\t\t\tisBottom: has(\"bottom\")\n\t\t};\n\t}\n\tgetAxisLabelPosition(id) {\n\t\treturn this.getLabelPosition(id, id === \"x\" ? [\"inner-top\", \"inner-right\"] : [\"inner-right\", \"inner-top\"]);\n\t}\n\txForAxisLabel(id) {\n\t\tconst $$ = this.owner;\n\t\tconst { state: { width, height } } = $$;\n\t\tconst position = this.getAxisLabelPosition(id);\n\t\tlet x = position.isMiddle ? -height / 2 : 0;\n\t\tif (this.isHorizontal($$, id !== \"x\")) x = position.isLeft ? 0 : position.isCenter ? width / 2 : width;\n\t\telse if (position.isBottom) x = -height;\n\t\treturn x;\n\t}\n\ttextAnchorForAxisLabel(id) {\n\t\tconst $$ = this.owner;\n\t\tconst position = this.getAxisLabelPosition(id);\n\t\tlet anchor = position.isMiddle ? \"middle\" : \"end\";\n\t\tif (this.isHorizontal($$, id !== \"x\")) anchor = position.isLeft ? \"start\" : position.isCenter ? \"middle\" : \"end\";\n\t\telse if (position.isBottom) anchor = \"start\";\n\t\treturn anchor;\n\t}\n\tdxForAxisLabel(id) {\n\t\tconst $$ = this.owner;\n\t\tconst position = this.getAxisLabelPosition(id);\n\t\tlet dx = position.isBottom ? \"0.5em\" : \"0\";\n\t\tif (this.isHorizontal($$, id !== \"x\")) dx = position.isLeft ? \"0.5em\" : position.isRight ? \"-0.5em\" : \"0\";\n\t\telse if (position.isTop) dx = \"-0.5em\";\n\t\treturn dx;\n\t}\n\tdyForAxisLabel(id) {\n\t\tconst $$ = this.owner;\n\t\tconst { config } = $$;\n\t\tconst isRotated = config.axis_rotated;\n\t\tconst isInner = this.getAxisLabelPosition(id).isInner;\n\t\tconst tickRotate = config[`axis_${id}_tick_rotate`] ? $$.getHorizontalAxisHeight(id) : 0;\n\t\tconst { width: maxTickWidth } = this.getMaxTickSize(id);\n\t\tlet dy;\n\t\tif (id === \"x\") {\n\t\t\tconst xHeight = config.axis_x_height;\n\t\t\tif (isRotated) dy = isInner ? \"1.2em\" : -25 - maxTickWidth;\n\t\t\telse if (isInner) dy = \"-0.5em\";\n\t\t\telse if (xHeight) dy = xHeight - 10;\n\t\t\telse if (tickRotate) dy = tickRotate - 10;\n\t\t\telse dy = \"3em\";\n\t\t} else {\n\t\t\tdy = {\n\t\t\t\ty: [\n\t\t\t\t\t\"-0.5em\",\n\t\t\t\t\t10,\n\t\t\t\t\t\"3em\",\n\t\t\t\t\t\"1.2em\",\n\t\t\t\t\t10\n\t\t\t\t],\n\t\t\t\ty2: [\n\t\t\t\t\t\"1.2em\",\n\t\t\t\t\t-20,\n\t\t\t\t\t\"-2.2em\",\n\t\t\t\t\t\"-0.5em\",\n\t\t\t\t\t15\n\t\t\t\t]\n\t\t\t}[id];\n\t\t\tif (isRotated) {\n\t\t\t\tif (isInner) dy = dy[0];\n\t\t\t\telse if (tickRotate) dy = tickRotate * (id === \"y2\" ? -1 : 1) - dy[1];\n\t\t\t\telse dy = dy[2];\n\t\t\t} else dy = isInner ? dy[3] : (dy[4] + (config[`axis_${id}_inner`] ? 0 : maxTickWidth + dy[4])) * (id === \"y\" ? -1 : 1);\n\t\t}\n\t\treturn dy;\n\t}\n\tgetTickFormatCacheValue(id) {\n\t\tconst $$ = this.owner;\n\t\tconst { config } = $$;\n\t\treturn id === \"x\" ? {\n\t\t\tformat: config.axis_x_tick_format,\n\t\t\ttype: config.axis_x_type,\n\t\t\tlocaltime: config.axis_x_localtime,\n\t\t\tcategories: config.axis_x_categories\n\t\t} : {\n\t\t\tformat: config[`axis_${id}_tick_format`],\n\t\t\tnormalized: $$.isStackNormalized(),\n\t\t\tgrouped: $$.hasAxisGroupedData(id),\n\t\t\ttype: config[`axis_${id}_type`]\n\t\t};\n\t}\n\tgetMaxTickSizeFingerprint(id, scale, domain, axis, tickRotate, withoutRecompute) {\n\t\tconst { config, state } = this.owner;\n\t\tconst isX = id === \"x\";\n\t\tconst configPrefix = isX ? \"axis_x\" : `axis_${id}`;\n\t\tconst tickValues = axis.tickValues();\n\t\treturn _stringifyCacheValue({\n\t\t\tid,\n\t\t\twithoutRecompute: !!withoutRecompute,\n\t\t\tdataGeneration: state.dataGeneration,\n\t\t\tsize: [state.current.width, state.current.height],\n\t\t\trange: scale.range?.(),\n\t\t\tdomain,\n\t\t\ttype: scale.type,\n\t\t\torient: this.orient[id],\n\t\t\taxisRotated: config.axis_rotated,\n\t\t\tevalTextSize: config.axis_evalTextSize,\n\t\t\tformat: this.getTickFormatCacheValue(id),\n\t\t\tticks: {\n\t\t\t\tvalues: _getTickValuesCacheValue(tickValues),\n\t\t\t\trawValues: config[`${configPrefix}_tick_values`],\n\t\t\t\targuments: axis.ticks(),\n\t\t\t\tcount: config[`${configPrefix}_tick_count`],\n\t\t\t\trotate: tickRotate,\n\t\t\t\tshow: config[`${configPrefix}_tick_show`],\n\t\t\t\ttextShow: config[`${configPrefix}_tick_text_show`],\n\t\t\t\ttextPosition: config[`${configPrefix}_tick_text_position`],\n\t\t\t\tinner: config[`${configPrefix}_tick_inner`],\n\t\t\t\tculling: config[`${configPrefix}_tick_culling`],\n\t\t\t\tcullingMax: config[`${configPrefix}_tick_culling_max`],\n\t\t\t\tcullingLines: config[`${configPrefix}_tick_culling_lines`],\n\t\t\t\tcullingReverse: config[`${configPrefix}_tick_culling_reverse`],\n\t\t\t\tstepSize: !isX && config[`${configPrefix}_tick_stepSize`],\n\t\t\t\ttimeValue: !isX && config[`${configPrefix}_tick_time_value`],\n\t\t\t\tfit: isX && config.axis_x_tick_fit,\n\t\t\t\tautorotate: isX && config.axis_x_tick_autorotate,\n\t\t\t\tcentered: isX && config.axis_x_tick_centered,\n\t\t\t\tinverted: isX && config.axis_x_inverted,\n\t\t\t\tmultiline: isX && config.axis_x_tick_multiline,\n\t\t\t\twidth: isX && config.axis_x_tick_width\n\t\t\t}\n\t\t});\n\t}\n\t/**\n\t* Get max tick size\n\t* @param {string} id axis id string\n\t* @param {boolean} withoutRecompute wheather or not to recompute\n\t* @returns {object} {width, height}\n\t* @private\n\t*/\n\tgetMaxTickSize(id, withoutRecompute) {\n\t\tconst $$ = this.owner;\n\t\tconst { config, state, $el: { svg, chart } } = $$;\n\t\tconst { current, resizing } = state;\n\t\tconst currentTickMax = current.maxTickSize[id];\n\t\tconst cacheKey = `${KEY.maxTickSize}_${id}_${!!withoutRecompute}`;\n\t\tconst cached = $$.cache.get(cacheKey);\n\t\tif (cached && cached.generation === state.redrawGeneration) return currentTickMax;\n\t\tconst configPrefix = `axis_${id}`;\n\t\tconst max = {\n\t\t\twidth: 0,\n\t\t\theight: 0\n\t\t};\n\t\tlet fingerprint;\n\t\tif (resizing || withoutRecompute || !config[`${configPrefix}_show`] || currentTickMax.width > 0 && $$.filterTargetsToShow().length === 0) return currentTickMax;\n\t\tif ((svg || config.render_mode === \"canvas\") && $$.scale[id]?.copy) {\n\t\t\tconst isYAxis = /^y2?$/.test(id);\n\t\t\tconst targetsToShow = $$.getTargetsToShow();\n\t\t\tconst scale = $$.scale[id].copy().domain($$[`get${isYAxis ? \"Y\" : \"X\"}Domain`](targetsToShow, id));\n\t\t\tconst domain = scale.domain();\n\t\t\tconst isDomainSame = domain[0] === domain[1] && domain.every((v) => v > 0);\n\t\t\tconst isCurrentMaxTickDomainSame = isArray(currentTickMax.domain) && currentTickMax.domain[0] === currentTickMax.domain[1] && currentTickMax.domain.every((v) => v > 0);\n\t\t\tif (isDomainSame || isCurrentMaxTickDomainSame) return currentTickMax;\n\t\t\telse currentTickMax.domain = domain;\n\t\t\tif (!isYAxis) _clearTickWidths(currentTickMax.ticks);\n\t\t\tconst axis = this.getAxis(id, scale, false, false, true);\n\t\t\tconst tickRotate = config[`${configPrefix}_tick_rotate`];\n\t\t\tconst tickCount = config[`${configPrefix}_tick_count`];\n\t\t\tif (!config[`${configPrefix}_tick_values`] && tickCount) axis.tickValues(this.generateTickValues(domain, tickCount, isYAxis ? this.isTimeSeriesY() : this.isTimeSeries()));\n\t\t\t!isYAxis && this.updateXAxisTickValues(targetsToShow, axis);\n\t\t\tfingerprint = this.getMaxTickSizeFingerprint(id, scale, domain, axis, tickRotate, withoutRecompute);\n\t\t\tif (cached?.fingerprint === fingerprint) {\n\t\t\t\t$$.cache.add(cacheKey, {\n\t\t\t\t\t...cached,\n\t\t\t\t\tgeneration: state.redrawGeneration\n\t\t\t\t});\n\t\t\t\treturn _restoreMaxTickSize(currentTickMax, cached.value);\n\t\t\t}\n\t\t\tconst originalTickValues = axis.tickValues();\n\t\t\tconst hasLargeTickValues = !isYAxis && Array.isArray(originalTickValues) && originalTickValues.length > MAX_TICK_MEASURE_VALUES;\n\t\t\thasLargeTickValues && axis.tickValues(_sampleTickValues(originalTickValues, axis.tickFormat()));\n\t\t\tconst dummy = chart.append(\"svg\").style(\"visibility\", \"hidden\").style(\"position\", \"fixed\").style(\"top\", \"0\").style(\"left\", \"0\");\n\t\t\tconst g = dummy.append(\"g\").attr(\"class\", `${$AXIS[`axis${capitalize(id)}`]} ${$COMMON.dummy}`);\n\t\t\taxis.create(g);\n\t\t\tconst { sizeFor1Char } = g.node();\n\t\t\tconst textSelection = dummy.selectAll(\"text\").attr(\"transform\", isNumber(tickRotate) ? `rotate(${tickRotate})` : null);\n\t\t\tconst measuredTickCount = hasLargeTickValues ? originalTickValues.length : textSelection.size();\n\t\t\tif (sizeFor1Char) textSelection.each(function(d, i) {\n\t\t\t\tconst width = this.textContent.length * sizeFor1Char.w;\n\t\t\t\tconst height = sizeFor1Char.h;\n\t\t\t\tmax.width = Math.max(max.width, width);\n\t\t\t\tmax.height = Math.max(max.height, height);\n\t\t\t\tif (!isYAxis) currentTickMax.ticks[i] = width;\n\t\t\t});\n\t\t\telse {\n\t\t\t\tconst textNodes = [];\n\t\t\t\ttextSelection.each(function() {\n\t\t\t\t\ttextNodes.push(this);\n\t\t\t\t});\n\t\t\t\t(textNodes.length <= 5 ? textNodes : _sampleTickNodes(textNodes)).map((node) => getBoundingRect(node, true)).forEach((dim) => {\n\t\t\t\t\tmax.width = Math.max(max.width, dim.width);\n\t\t\t\t\tmax.height = Math.max(max.height, dim.height);\n\t\t\t\t});\n\t\t\t\tif (!isYAxis) for (let i = 0; i < textNodes.length; i++) currentTickMax.ticks[i] = max.width;\n\t\t\t}\n\t\t\tif (!isYAxis && hasLargeTickValues) _compactTickWidths(currentTickMax.ticks, measuredTickCount, max.width);\n\t\t\tdummy.remove();\n\t\t}\n\t\tObject.keys(max).forEach((key) => {\n\t\t\tif (max[key] > 0) currentTickMax[key] = max[key];\n\t\t});\n\t\t$$.cache.add(cacheKey, {\n\t\t\tfingerprint,\n\t\t\tgeneration: state.redrawGeneration,\n\t\t\tvalue: _cloneMaxTickSize(currentTickMax)\n\t\t});\n\t\treturn currentTickMax;\n\t}\n\tgetXAxisTickTextY2Overflow(defaultPadding) {\n\t\tconst $$ = this.owner;\n\t\tconst { axis, config, state: { current, isLegendRight, legendItemWidth } } = $$;\n\t\tconst xAxisTickRotate = $$.getAxisTickRotate(\"x\");\n\t\tconst positiveRotation = xAxisTickRotate > 0 && xAxisTickRotate < 90;\n\t\tif ((axis.isCategorized() || axis.isTimeSeries()) && config.axis_x_tick_fit && (!config.axis_x_tick_culling || isEmpty(config.axis_x_tick_culling)) && !config.axis_x_tick_multiline && positiveRotation) {\n\t\t\tconst y2AxisWidth = config.axis_y2_show && current.maxTickSize.y2.width || 0;\n\t\t\tconst legendWidth = isLegendRight && legendItemWidth || 0;\n\t\t\tconst widthWithoutCurrentPaddingLeft = current.width - $$.getCurrentPaddingByDirection(\"left\");\n\t\t\tconst maxOverflow = this.getXAxisTickMaxOverflow(xAxisTickRotate, widthWithoutCurrentPaddingLeft - defaultPadding) - y2AxisWidth - legendWidth;\n\t\t\tconst xAxisTickTextY2Overflow = Math.max(0, maxOverflow) + defaultPadding;\n\t\t\treturn Math.min(xAxisTickTextY2Overflow, widthWithoutCurrentPaddingLeft / 2);\n\t\t}\n\t\treturn 0;\n\t}\n\tgetXAxisTickMaxOverflow(xAxisTickRotate, widthWithoutCurrentPaddingLeft) {\n\t\tconst $$ = this.owner;\n\t\tconst { axis, config, state } = $$;\n\t\tconst isTimeSeries = axis.isTimeSeries();\n\t\tconst tickTextWidths = state.current.maxTickSize.x.ticks;\n\t\tconst tickCount = tickTextWidths.length;\n\t\tconst fallbackTickTextWidth = _getTickWidthFallback(tickTextWidths) ?? state.current.maxTickSize.x.width;\n\t\tconst { left, right } = state.axis.x.padding;\n\t\tlet maxOverflow = 0;\n\t\tconst remaining = tickCount - (isTimeSeries && config.axis_x_tick_fit ? .5 : 0);\n\t\tfor (let i = 0; i < tickCount; i++) {\n\t\t\tconst tickIndex = i + 1;\n\t\t\tconst rotatedTickTextWidth = Math.cos(Math.PI * xAxisTickRotate / 180) * _getTickWidth(tickTextWidths, i, fallbackTickTextWidth);\n\t\t\tconst ticksBeforeTickText = tickIndex - (isTimeSeries ? 1 : .5) + left;\n\t\t\tif (ticksBeforeTickText <= 0) continue;\n\t\t\tconst tickLength = (widthWithoutCurrentPaddingLeft - rotatedTickTextWidth) / ticksBeforeTickText;\n\t\t\tconst remainingTicks = remaining - tickIndex;\n\t\t\tconst paddingRightLength = right * tickLength;\n\t\t\tconst remainingTickWidth = remainingTicks * tickLength + paddingRightLength;\n\t\t\tconst overflow = rotatedTickTextWidth - tickLength / 2 - remainingTickWidth;\n\t\t\tmaxOverflow = Math.max(maxOverflow, overflow);\n\t\t}\n\t\tconst filteredTargets = $$.getTargetsToShow();\n\t\tlet tickOffset = 0;\n\t\tif (!isTimeSeries && config.axis_x_tick_count <= filteredTargets.length && filteredTargets[0].values.length) {\n\t\t\tconst scale = getScale($$.axis.getAxisType(\"x\"), 0, widthWithoutCurrentPaddingLeft - maxOverflow).domain([left * -1, $$.getXDomainMax($$.data.targets) + 1 + right]);\n\t\t\ttickOffset = (scale(1) - scale(0)) / 2;\n\t\t}\n\t\treturn maxOverflow + tickOffset;\n\t}\n\t/**\n\t* Update axis label text\n\t* @param {boolean} withTransition Weather update with transition\n\t* @private\n\t*/\n\tupdateLabels(withTransition) {\n\t\tconst { config, $el: { main }, $T } = this.owner;\n\t\tconst isRotated = config.axis_rotated;\n\t\t[\n\t\t\t\"x\",\n\t\t\t\"y\",\n\t\t\t\"y2\"\n\t\t].forEach((id) => {\n\t\t\tconst text = this.getLabelText(id);\n\t\t\tconst selector = `axis${capitalize(id)}`;\n\t\t\tconst classLabel = $AXIS[`${selector}Label`];\n\t\t\tif (text) {\n\t\t\t\tlet axisLabel = main.select(`text.${classLabel}`);\n\t\t\t\tif (axisLabel.empty()) axisLabel = main.select(`g.${$AXIS[selector]}`).insert(\"text\", \":first-child\").attr(\"class\", classLabel).attr(\"transform\", [\"rotate(-90)\", null][id === \"x\" ? +!isRotated : +isRotated]).style(\"text-anchor\", () => this.textAnchorForAxisLabel(id));\n\t\t\t\t$T(axisLabel, withTransition).attr(\"x\", () => this.xForAxisLabel(id)).attr(\"dx\", () => this.dxForAxisLabel(id)).attr(\"dy\", () => this.dyForAxisLabel(id)).text(text);\n\t\t\t}\n\t\t});\n\t}\n\t/**\n\t* Get axis padding value\n\t* @param {number|object} padding Padding object\n\t* @param {string} key Key string of padding\n\t* @param {Date|number} defaultValue Default value\n\t* @param {number} domainLength Domain length\n\t* @returns {number} Padding value in scale\n\t* @private\n\t*/\n\tgetPadding(padding, key, defaultValue, domainLength) {\n\t\tconst p = isNumber(padding) ? padding : padding[key];\n\t\tif (!isValue(p)) return defaultValue;\n\t\treturn this.owner.convertPixelToScale(/(bottom|top)/.test(key) ? \"y\" : \"x\", p, domainLength);\n\t}\n\tgenerateTickValues(values, tickCount, forTimeSeries) {\n\t\tlet tickValues = values;\n\t\tif (tickCount) {\n\t\t\tconst targetCount = isFunction(tickCount) ? tickCount() : tickCount;\n\t\t\tif (targetCount === 1) tickValues = [values[0]];\n\t\t\telse if (targetCount === 2) tickValues = [values[0], values[values.length - 1]];\n\t\t\telse if (targetCount > 2) {\n\t\t\t\tconst isCategorized = this.isCategorized();\n\t\t\t\tconst count = targetCount - 2;\n\t\t\t\tconst start = values[0];\n\t\t\t\tconst end = values[values.length - 1];\n\t\t\t\tconst interval = (end - start) / (count + 1);\n\t\t\t\tlet tickValue;\n\t\t\t\ttickValues = [start];\n\t\t\t\tfor (let i = 0; i < count; i++) {\n\t\t\t\t\ttickValue = +start + interval * (i + 1);\n\t\t\t\t\ttickValues.push(forTimeSeries ? new Date(tickValue) : isCategorized ? Math.round(tickValue) : tickValue);\n\t\t\t\t}\n\t\t\t\ttickValues.push(end);\n\t\t\t}\n\t\t}\n\t\tif (!forTimeSeries) tickValues = tickValues.sort((a, b) => a - b);\n\t\treturn tickValues;\n\t}\n\tgenerateTransitions(withTransition) {\n\t\tconst { $el: { axis }, $T } = this.owner;\n\t\tconst [axisX, axisY, axisY2, axisSubX, axisSubY, axisSubY2] = [\n\t\t\t\"x\",\n\t\t\t\"y\",\n\t\t\t\"y2\",\n\t\t\t\"subX\",\n\t\t\t\"subY\",\n\t\t\t\"subY2\"\n\t\t].map((v) => $T(axis[v], withTransition));\n\t\treturn {\n\t\t\taxisX,\n\t\t\taxisY,\n\t\t\taxisY2,\n\t\t\taxisSubX,\n\t\t\taxisSubY,\n\t\t\taxisSubY2\n\t\t};\n\t}\n\tredraw(transitions, isHidden, isInit) {\n\t\tconst { config, state, $el } = this.owner;\n\t\tconst opacity = isHidden ? \"0\" : null;\n\t\t[\n\t\t\t\"x\",\n\t\t\t\"y\",\n\t\t\t\"y2\",\n\t\t\t\"subX\",\n\t\t\t\"subY\",\n\t\t\t\"subY2\"\n\t\t].forEach((id) => {\n\t\t\tconst axis = this[id];\n\t\t\tconst $axis = $el.axis[id];\n\t\t\tif (axis && $axis) {\n\t\t\t\tif (!isInit && !config.transition_duration) axis.config.withoutTransition = true;\n\t\t\t\t$axis.style(\"opacity\", opacity);\n\t\t\t\taxis.create(transitions[`axis${capitalize(id)}`]);\n\t\t\t}\n\t\t});\n\t\tthis.updateAxes();\n\t\t!state.rendered && config.axis_tooltip && this.setAxisTooltip();\n\t}\n\t/**\n\t* Synchronize axis domains and tick values.\n\t* @param {Array} targetsToShow targets data to be shown\n\t* @param {object} wth option object\n\t* @param {object} flow flow object\n\t* @private\n\t*/\n\tsyncAxisDomains(targetsToShow, wth, flow) {\n\t\tconst $$ = this.owner;\n\t\tconst { config, scale, $el } = $$;\n\t\tconst hasZoom = !!scale.zoom;\n\t\tlet xDomainForZoom;\n\t\tif (!hasZoom && this.isCategorized() && targetsToShow.length === 0 && $el.axis.x) scale.x.domain([0, $el.axis.x.selectAll(\".tick\").size()]);\n\t\tif (scale.x && targetsToShow.length) {\n\t\t\t!hasZoom && $$.updateXDomain(targetsToShow, wth.UpdateXDomain, wth.UpdateOrgXDomain, wth.TrimXDomain);\n\t\t\tif (!config.axis_x_tick_values) this.updateXAxisTickValues(targetsToShow);\n\t\t} else if (this.x) {\n\t\t\tthis.x.tickValues([]);\n\t\t\tthis.subX?.tickValues([]);\n\t\t}\n\t\tif (config.zoom_rescale && !flow) xDomainForZoom = scale.x.orgDomain();\n\t\t[\"y\", \"y2\"].forEach((key) => {\n\t\t\tconst prefix = `axis_${key}_`;\n\t\t\tconst axisScale = scale[key];\n\t\t\tif (axisScale) {\n\t\t\t\tconst tickValues = config[`${prefix}tick_values`];\n\t\t\t\tconst tickCount = config[`${prefix}tick_count`];\n\t\t\t\taxisScale.domain($$.getYDomain(targetsToShow, key, xDomainForZoom));\n\t\t\t\tif (!tickValues && tickCount) {\n\t\t\t\t\tconst axis = $$.axis[key];\n\t\t\t\t\tconst domain = axisScale.domain();\n\t\t\t\t\taxis.tickValues(this.generateTickValues(domain, domain.every((v) => v === 0) ? 1 : tickCount, this.isTimeSeriesY()));\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tif (wth.Y) {\n\t\t\tconst updateSubDomain = () => {\n\t\t\t\tscale.subY?.domain($$.getYDomain(targetsToShow, \"y\"));\n\t\t\t\tscale.subY2?.domain($$.getYDomain(targetsToShow, \"y2\"));\n\t\t\t\t[\"y\", \"y2\"].forEach((key) => {\n\t\t\t\t\tconst subAxisId = key === \"y2\" ? \"subY2\" : \"subY\";\n\t\t\t\t\tconst axisScale = scale[subAxisId];\n\t\t\t\t\tconst axis = $$.axis[subAxisId];\n\t\t\t\t\tconst tickValues = this.getTickValues(key, true);\n\t\t\t\t\tconst tickCount = getAxisTickOption(config, subAxisId, \"count\");\n\t\t\t\t\tif (!axisScale || !axis || tickValues || !tickCount) return;\n\t\t\t\t\tconst domain = axisScale.domain();\n\t\t\t\t\taxis.tickValues(this.generateTickValues(domain, domain.every((v) => v === 0) ? 1 : tickCount, this.isTimeSeriesY()));\n\t\t\t\t});\n\t\t\t};\n\t\t\tconfig.subchart_show ? $$.withSubchartTypeContext(updateSubDomain) : updateSubDomain();\n\t\t}\n\t}\n\t/**\n\t* Redraw axis\n\t* @param {Array} targetsToShow targets data to be shown\n\t* @param {object} wth option object\n\t* @param {d3.Transition} transitions Transition object\n\t* @param {object} flow flow object\n\t* @param {boolean} isInit called from initialization\n\t* @private\n\t*/\n\tredrawAxis(targetsToShow, wth, transitions, flow, isInit) {\n\t\tconst $$ = this.owner;\n\t\tthis.syncAxisDomains(targetsToShow, wth, flow);\n\t\tthis.redraw(transitions, $$.hasArcType(), isInit);\n\t\tthis.updateLabels(wth.Transition);\n\t\tif ((wth.UpdateXDomain || wth.UpdateXAxis || wth.Y) && targetsToShow.length) this.setCulling();\n\t}\n\t/**\n\t* Set manual culling\n\t* @private\n\t*/\n\tsetCulling() {\n\t\tconst { config, state: { clip, current }, $el } = this.owner;\n\t\t[\n\t\t\t\"subX\",\n\t\t\t\"x\",\n\t\t\t\"y\",\n\t\t\t\"y2\",\n\t\t\t\"subY\",\n\t\t\t\"subY2\"\n\t\t].forEach((type) => {\n\t\t\tconst axis = $el.axis[type];\n\t\t\tconst toCull = getAxisTickOption(config, type, \"culling\");\n\t\t\tif (axis && toCull) {\n\t\t\t\tconst tickNodes = axis.selectAll(\".tick\");\n\t\t\t\tconst tickValues = sortValue(tickNodes.data(), !getAxisTickOption(config, type, \"culling_reverse\"));\n\t\t\t\tconst tickSize = tickValues.length;\n\t\t\t\tconst cullingMax = getAxisTickOption(config, type, \"culling_max\");\n\t\t\t\tconst cullTickLine = !getAxisTickOption(config, type, \"culling_lines\") || _hasOverlappedTickLineIntervals(this[type], tickValues, _getTickLineWidth(tickNodes));\n\t\t\t\tlet intervalForCulling;\n\t\t\t\tif (tickSize) {\n\t\t\t\t\tfor (let i = 1; i < tickSize; i++) if (tickSize / i < cullingMax) {\n\t\t\t\t\t\tintervalForCulling = i;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tintervalForCulling = intervalForCulling ?? tickSize;\n\t\t\t\t\tconst tickIndexMap = /* @__PURE__ */ new Map();\n\t\t\t\t\tfor (let i = 0; i < tickValues.length; i++) tickIndexMap.set(tickValues[i], i);\n\t\t\t\t\ttickNodes.each(function(d) {\n\t\t\t\t\t\tconst node = cullTickLine ? this : this.querySelector(\"text\");\n\t\t\t\t\t\tif (node) node.style.display = (tickIndexMap.get(d) ?? 0) % intervalForCulling ? \"none\" : null;\n\t\t\t\t\t});\n\t\t\t\t} else tickNodes.style(\"display\", null);\n\t\t\t\tif (type === \"x\") {\n\t\t\t\t\tconst clipPath = current.maxTickSize.x.clipPath ? clip.pathXAxisTickTexts : null;\n\t\t\t\t\t$el.svg.selectAll(`.${$AXIS.axisX} .tick text`).attr(\"clip-path\", clipPath);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n\t/**\n\t* Set axis tooltip\n\t* @private\n\t*/\n\tsetAxisTooltip() {\n\t\tconst $$ = this.owner;\n\t\tconst { config: { axis_rotated: isRotated, axis_tooltip }, $el: { axis, axisTooltip } } = $$;\n\t\tconst bgColor = axis_tooltip.backgroundColor ?? \"black\";\n\t\t$$.generateTextBGColorFilter(bgColor, {\n\t\t\tx: -.15,\n\t\t\ty: -.2,\n\t\t\twidth: 1.3,\n\t\t\theight: 1.3\n\t\t});\n\t\t[\n\t\t\t\"x\",\n\t\t\t\"y\",\n\t\t\t\"y2\"\n\t\t].forEach((v) => {\n\t\t\tif (isString(bgColor) || bgColor[v]) {\n\t\t\t\taxisTooltip[v] = axis[v]?.append(\"text\").classed($AXIS[`axis${v.toUpperCase()}Tooltip`], true).attr(\"filter\", $$.updateTextBGColor({ id: v }, bgColor));\n\t\t\t\tif (isRotated) axisTooltip[v]?.attr(v === \"x\" ? \"x\" : \"y\", v === \"y\" ? \"1.15em\" : v === \"x\" ? \"-0.3em\" : \"-0.4em\").attr(`d${v === \"x\" ? \"y\" : \"x\"}`, v === \"x\" ? \"0.4em\" : \"-1.3em\").style(\"text-anchor\", v === \"x\" ? \"end\" : null);\n\t\t\t\telse axisTooltip[v]?.attr(v === \"x\" ? \"y\" : \"x\", v === \"x\" ? \"1.15em\" : `${v === \"y\" ? \"-\" : \"\"}0.4em`).attr(`d${v === \"x\" ? \"x\" : \"y\"}`, v === \"x\" ? \"-1em\" : \"0.3em\").style(\"text-anchor\", v === \"y\" ? \"end\" : null);\n\t\t\t}\n\t\t});\n\t}\n};\n//#endregion\nexport { Axis_default as default };\n","/*!\n* Copyright (c) 2017 ~ present NAVER Corp.\r\n * billboard.js project is licensed under the MIT license\r\n * \r\n * billboard.js, JavaScript chart library\r\n * https://naver.github.io/billboard.js/\r\n * \r\n * @version 4.1.0\n*/\nimport { isBoolean, isFunction } from \"../../module/util/type-checks.js\";\nimport { getBoundingRect, getPointer, getScrollPosition } from \"../../module/util/dom.js\";\nimport { $COMMON, $EVENT, $SHAPE } from \"../../config/classes.js\";\n//#region src/ChartInternal/interactions/eventrect.ts\nvar eventrect_default = {\n\t/**\n\t* Initialize the area that detects the event.\n\t* Add a container for the zone that detects the event.\n\t* @private\n\t*/\n\tinitEventRect() {\n\t\tthis.$el.main.select(`.${$COMMON.chart}`).append(\"g\").attr(\"class\", $EVENT.eventRects).style(\"fill-opacity\", \"0\");\n\t},\n\t/**\n\t* Redraws the area that detects the event.\n\t* @private\n\t*/\n\tredrawEventRect() {\n\t\tconst $$ = this;\n\t\tconst { config, state, $el } = $$;\n\t\tconst isMultipleX = $$.isMultipleX();\n\t\tconst isInverted = config.axis_x_inverted;\n\t\tif ($el.eventRect) $$.updateEventRect($el.eventRect, true);\n\t\telse if ($$.data.targets.length) {\n\t\t\tconst eventRectUpdate = $$.$el.main.select(`.${$EVENT.eventRects}`).style(\"cursor\", config.zoom_enabled && config.zoom_type !== \"drag\" ? config.axis_rotated ? \"ns-resize\" : \"ew-resize\" : null).classed($EVENT.eventRectsMultiple, isMultipleX).classed($EVENT.eventRectsSingle, !isMultipleX).selectAll(`.${$EVENT.eventRect}`).data([0]).enter().append(\"rect\");\n\t\t\t$$.updateEventRect(eventRectUpdate);\n\t\t\t$$.updateEventType(eventRectUpdate);\n\t\t\teventRectUpdate.call($$.getDraggableSelection());\n\t\t\t$el.eventRect = eventRectUpdate;\n\t\t\tif ($$.state.inputType === \"touch\" && !$el.svg.on(\"touchstart.eventRect\") && !$$.hasArcType()) $$.bindTouchOnEventRect();\n\t\t\tstate.rendered && $$.updateEventRect($el.eventRect, true);\n\t\t}\n\t\tif (!isMultipleX) {\n\t\t\tconst xAxisTickValues = $$.getMaxDataCountTarget();\n\t\t\tif (!config.data_xSort || isInverted) xAxisTickValues.sort((a, b) => isInverted ? b.x - a.x : a.x - b.x);\n\t\t\t$$.updateDataIndexByX(xAxisTickValues);\n\t\t\t$$.updateXs(xAxisTickValues);\n\t\t\t$$.updatePointClass?.(true);\n\t\t\tstate.eventReceiver.data = xAxisTickValues;\n\t\t}\n\t\t$$.updateEventRectData();\n\t},\n\tbindTouchOnEventRect() {\n\t\tconst $$ = this;\n\t\tconst { config, state, $el: { eventRect, svg } } = $$;\n\t\tconst selectRect = (context) => {\n\t\t\tif ($$.isMultipleX()) $$.selectRectForMultipleXs(context);\n\t\t\telse {\n\t\t\t\tconst index = $$.getDataIndexFromEvent(state.event);\n\t\t\t\t$$.callOverOutForTouch(index);\n\t\t\t\tindex === -1 ? $$.unselectRect() : $$.selectRectForSingle(context, index);\n\t\t\t}\n\t\t};\n\t\tconst unselectRect = () => {\n\t\t\t$$.unselectRect();\n\t\t\t$$.callOverOutForTouch();\n\t\t};\n\t\tconst preventDefault = config.interaction_inputType_touch.preventDefault;\n\t\tconst isPrevented = isBoolean(preventDefault) && preventDefault || false;\n\t\tconst preventThreshold = !isNaN(preventDefault) && preventDefault || null;\n\t\tlet startPx;\n\t\tconst passiveOption = !isPrevented && preventThreshold === null;\n\t\tconst preventEvent = (event) => {\n\t\t\tconst eventType = event.type;\n\t\t\tconst currentXY = event.changedTouches[0][`client${config.axis_rotated ? \"Y\" : \"X\"}`];\n\t\t\tif (eventType === \"touchstart\") {\n\t\t\t\tif (isPrevented) event.preventDefault();\n\t\t\t\telse if (preventThreshold !== null) startPx = currentXY;\n\t\t\t} else if (eventType === \"touchmove\") {\n\t\t\t\tif (isPrevented || startPx === true || preventThreshold !== null && Math.abs(startPx - currentXY) >= preventThreshold) {\n\t\t\t\t\tstartPx = true;\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\teventRect.on(\"touchstart\", (event) => {\n\t\t\tstate.event = event;\n\t\t\t$$.updateEventRect();\n\t\t}, { passive: passiveOption }).on(\"touchstart.eventRect touchmove.eventRect\", (event) => {\n\t\t\tstate.event = event;\n\t\t\tif (!eventRect.empty() && eventRect.classed($EVENT.eventRect)) {\n\t\t\t\tif (state.dragging || state.flowing || $$.hasArcType() || event.touches.length > 1) return;\n\t\t\t\tpreventEvent(event);\n\t\t\t\tselectRect(eventRect.node());\n\t\t\t} else unselectRect();\n\t\t}, { passive: passiveOption }).on(\"touchend.eventRect\", (event) => {\n\t\t\tstate.event = event;\n\t\t\tif (!eventRect.empty() && eventRect.classed($EVENT.eventRect)) {\n\t\t\t\tif ($$.hasArcType() || !$$.toggleShape || state.cancelClick) state.cancelClick && (state.cancelClick = false);\n\t\t\t}\n\t\t}, { passive: passiveOption });\n\t\tsvg.on(\"touchstart\", (event) => {\n\t\t\tstate.event = event;\n\t\t\tconst { target } = event;\n\t\t\tif (target && target !== eventRect.node()) unselectRect();\n\t\t}, { passive: passiveOption });\n\t},\n\t/**\n\t* Update event rect size\n\t* @param {d3Selection} eventRect Event <rect> element\n\t* @param {boolean} force Force to update\n\t* @private\n\t*/\n\tupdateEventRect(eventRect, force = false) {\n\t\tconst { state, $el } = this;\n\t\tconst { eventReceiver, width, height, rendered, resizing } = state;\n\t\tconst rectElement = eventRect || $el.eventRect;\n\t\tconst updateClientRect = () => {\n\t\t\tif (eventReceiver) {\n\t\t\t\tconst scrollPos = getScrollPosition($el.chart.node());\n\t\t\t\teventReceiver.rect = getBoundingRect(rectElement.node(), true).toJSON();\n\t\t\t\teventReceiver.rect.top += scrollPos.y;\n\t\t\t\teventReceiver.rect.left += scrollPos.x;\n\t\t\t}\n\t\t};\n\t\tif (!rendered || resizing || force) {\n\t\t\trectElement.attr(\"x\", 0).attr(\"y\", 0).attr(\"width\", width).attr(\"height\", height);\n\t\t\tif (!rendered || force) rectElement.classed($EVENT.eventRect, true);\n\t\t}\n\t\tupdateClientRect();\n\t},\n\t/**\n\t* Update event type (single or multiple x)\n\t* @param {d3Selection | boolean} target Target element or boolean to rebind event\n\t*/\n\tupdateEventType(target) {\n\t\tconst $$ = this;\n\t\tconst isRebindCall = isBoolean(target);\n\t\tconst eventRect = isRebindCall ? $$.$el.eventRect : target;\n\t\tconst unbindEvent = isRebindCall ? target !== eventRect?.datum().multipleX : false;\n\t\tif (eventRect) {\n\t\t\tunbindEvent && eventRect?.on(\"mouseover mousemove mouseout click\", null);\n\t\t\t$$.isMultipleX() ? $$.generateEventRectsForMultipleXs(eventRect) : $$.generateEventRectsForSingleX(eventRect);\n\t\t}\n\t},\n\t/**\n\t* Updates the location and size of the eventRect.\n\t* @private\n\t*/\n\tupdateEventRectData() {\n\t\tconst $$ = this;\n\t\tconst { config, scale, state } = $$;\n\t\tconst xScale = scale.zoom || scale.x;\n\t\tconst isRotated = config.axis_rotated;\n\t\tconst isMultipleX = $$.isMultipleX();\n\t\tconst xDomain = xScale?.domain();\n\t\tconst fingerprint = xDomain ? `${xDomain[0]}_${xDomain[1]}_${state.width}_${state.height}_${$$.data.targets.length}_${state.dataGeneration}_${[...state.hiddenTargetIds].join(\",\")}` : null;\n\t\tif (fingerprint && fingerprint === state._eventRectFingerprint) return;\n\t\tstate._eventRectFingerprint = fingerprint;\n\t\tlet x;\n\t\tlet y;\n\t\tlet w;\n\t\tlet h;\n\t\t$$.updateEventType(isMultipleX);\n\t\tif (isMultipleX) {\n\t\t\tx = 0;\n\t\t\ty = 0;\n\t\t\tw = state.width;\n\t\t\th = state.height;\n\t\t} else {\n\t\t\tlet rectW;\n\t\t\tlet rectX;\n\t\t\tif ($$.axis.isCategorized()) {\n\t\t\t\trectW = $$.getEventRectWidth();\n\t\t\t\trectX = (d) => xScale(d.x) - rectW / 2;\n\t\t\t} else {\n\t\t\t\tconst getPrevNextX = ({ index }) => ({\n\t\t\t\t\tprev: $$.getPrevX(index),\n\t\t\t\t\tnext: $$.getNextX(index)\n\t\t\t\t});\n\t\t\t\trectW = (d) => {\n\t\t\t\t\tconst x = getPrevNextX(d);\n\t\t\t\t\tconst xDomain = xScale.domain();\n\t\t\t\t\tlet val;\n\t\t\t\t\tif (x.prev === null && x.next === null) val = isRotated ? state.height : state.width;\n\t\t\t\t\telse if (x.prev === null) val = (xScale(x.next) + xScale(d.x)) / 2;\n\t\t\t\t\telse if (x.next === null) val = xScale(xDomain[1]) - (xScale(x.prev) + xScale(d.x)) / 2;\n\t\t\t\t\telse val = Math.max(0, (xScale(x.next) - xScale(x.prev)) / 2);\n\t\t\t\t\treturn val;\n\t\t\t\t};\n\t\t\t\trectX = (d) => {\n\t\t\t\t\tconst x = getPrevNextX(d);\n\t\t\t\t\tlet val;\n\t\t\t\t\tif (x.prev === null && x.next === null) val = 0;\n\t\t\t\t\telse if (x.prev === null) val = xScale(xScale.domain()[0]);\n\t\t\t\t\telse val = (xScale(d.x) + xScale(x.prev)) / 2;\n\t\t\t\t\treturn val;\n\t\t\t\t};\n\t\t\t}\n\t\t\tx = isRotated ? 0 : rectX;\n\t\t\ty = isRotated ? rectX : 0;\n\t\t\tw = isRotated ? state.width : rectW;\n\t\t\th = isRotated ? rectW : state.height;\n\t\t}\n\t\tconst { eventReceiver } = state;\n\t\tconst call = (fn, v) => isFunction(fn) ? fn(v) : fn;\n\t\teventReceiver.coords.splice(eventReceiver.data.length);\n\t\teventReceiver.data.forEach((d, i) => {\n\t\t\teventReceiver.coords[i] = {\n\t\t\t\tx: call(x, d),\n\t\t\t\ty: call(y, d),\n\t\t\t\tw: call(w, d),\n\t\t\t\th: call(h, d)\n\t\t\t};\n\t\t});\n\t},\n\t/**\n\t* Seletct rect for single x value\n\t* @param {d3Selection} context Event rect element\n\t* @param {number} index x Axis index\n\t* @private\n\t*/\n\tselectRectForSingle(context, index) {\n\t\tconst $$ = this;\n\t\tconst { config, state, $el: { main, circle } } = $$;\n\t\tconst isSelectionEnabled = config.data_selection_enabled;\n\t\tconst isSelectionGrouped = config.data_selection_grouped;\n\t\tconst isSelectable = config.data_selection_isselectable;\n\t\tconst isTooltipGrouped = config.tooltip_grouped;\n\t\tconst selectedData = $$.getAllValuesOnIndex(index);\n\t\tif (isTooltipGrouped) {\n\t\t\t$$.showTooltip(selectedData, context);\n\t\t\t$$.showGridFocus?.(selectedData);\n\t\t\t$$.showSubchartGridFocus?.(selectedData);\n\t\t\tif (!isSelectionEnabled || isSelectionGrouped) return;\n\t\t}\n\t\t!circle && main.selectAll(`.${$COMMON.EXPANDED}:not(.${$SHAPE.shape}-${index})`).classed($COMMON.EXPANDED, false);\n\t\tconst shapeAtIndex = main.selectAll(`.${$SHAPE.shape}-${index}`).classed($COMMON.EXPANDED, true).style(\"cursor\", isSelectable ? \"pointer\" : null).filter(function(d) {\n\t\t\treturn $$.isWithinShape(this, d);\n\t\t});\n\t\tshapeAtIndex.call((selected) => {\n\t\t\tconst d = selected.data();\n\t\t\tif (isSelectionEnabled && (isSelectionGrouped || isSelectable?.bind($$.api)(d))) context.style.cursor = \"pointer\";\n\t\t\tif (!isTooltipGrouped) {\n\t\t\t\t$$.showTooltip(d, context);\n\t\t\t\t$$.showGridFocus?.(d);\n\t\t\t\t$$.showSubchartGridFocus?.(d);\n\t\t\t\t$$.unexpandCircles?.();\n\t\t\t\tselected.each((d) => $$.setExpand(index, d.id));\n\t\t\t}\n\t\t});\n\t\tif (!isTooltipGrouped && shapeAtIndex.empty()) {\n\t\t\tconst mouse = getPointer(state.event, context);\n\t\t\tconst closestData = selectedData.filter((d) => {\n\t\t\t\tif ($$.isTargetToShow(d.id)) return $$.dist(d, mouse) < $$.getPointSensitivity(d);\n\t\t\t\treturn false;\n\t\t\t});\n\t\t\tif (closestData.length > 0) {\n\t\t\t\tlet closest = closestData[0];\n\t\t\t\tlet minDist = $$.dist(closest, mouse);\n\t\t\t\tfor (let i = 1; i < closestData.length; i++) {\n\t\t\t\t\tconst d = closestData[i];\n\t\t\t\t\tconst dist = $$.dist(d, mouse);\n\t\t\t\t\tif (dist < minDist) {\n\t\t\t\t\t\tminDist = dist;\n\t\t\t\t\t\tclosest = d;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$$.showTooltip([closest], context);\n\t\t\t\t$$.showGridFocus?.([closest]);\n\t\t\t\t$$.showSubchartGridFocus?.([closest]);\n\t\t\t\t$$.unexpandCircles?.();\n\t\t\t\t$$.setExpand(index, closest.id, true);\n\t\t\t\tif (isSelectionEnabled && (isSelectionGrouped || isSelectable?.bind($$.api)(closest))) context.style.cursor = \"pointer\";\n\t\t\t} else if (config.interaction_onout) {\n\t\t\t\t$$.hideGridFocus?.();\n\t\t\t\t$$.hideSubchartGridFocus?.();\n\t\t\t\t$$.hideTooltip();\n\t\t\t\t!isSelectionGrouped && $$.setExpand(index);\n\t\t\t}\n\t\t}\n\t},\n\t/**\n\t* Select rect for multiple x values\n\t* @param {d3Selection} context Event rect element\n\t* @param {boolean} [triggerEvent=true] Whether trigger event or not\n\t* @private\n\t*/\n\tselectRectForMultipleXs(context, triggerEvent = true) {\n\t\tconst $$ = this;\n\t\tconst { config, state } = $$;\n\t\tconst targetsToShow = $$.getTargetsToShow();\n\t\tif (state.dragging || $$.hasArcType(targetsToShow)) return;\n\t\tconst mouse = getPointer(state.event, context);\n\t\tconst closest = $$.findClosestFromTargets(targetsToShow, mouse);\n\t\tif (triggerEvent && state.mouseover && (!closest || closest.id !== state.mouseover.id)) {\n\t\t\tconfig.data_onout.call($$.api, state.mouseover);\n\t\t\tstate.mouseover = void 0;\n\t\t}\n\t\tif (!closest) {\n\t\t\t$$.unselectRect();\n\t\t\treturn;\n\t\t}\n\t\tconst selectedData = ($$.isBubbleType(closest) || $$.isScatterType(closest) || !config.tooltip_grouped ? [closest] : $$.filterByX(targetsToShow, closest.x)).map((d) => $$.addName(d));\n\t\t$$.showTooltip(selectedData, context);\n\t\t$$.setExpand(closest.index, closest.id, true);\n\t\t$$.showGridFocus?.(selectedData);\n\t\t$$.showSubchartGridFocus?.(selectedData);\n\t\tconst dist = $$.dist(closest, mouse);\n\t\tif ($$.isBarType(closest.id) || dist < $$.getPointSensitivity(closest)) {\n\t\t\t$$.$el.eventRect.style(\"cursor\", \"pointer\");\n\t\t\tif (triggerEvent && (!state.mouseover || state.mouseover.x !== closest.x || state.mouseover.id !== closest.id)) {\n\t\t\t\tconfig.data_onover.call($$.api, closest);\n\t\t\t\tstate.mouseover = closest;\n\t\t\t}\n\t\t}\n\t},\n\t/**\n\t* Unselect EventRect.\n\t* @private\n\t*/\n\tunselectRect() {\n\t\tconst $$ = this;\n\t\tconst { state, $el: { circle, tooltip } } = $$;\n\t\tstate._lastTooltipMouse = null;\n\t\tif (state.isCanvasMode) {\n\t\t\t$$.clearCanvasFocus?.();\n\t\t\ttooltip && $$.hideTooltip();\n\t\t\treturn;\n\t\t}\n\t\t$$.$el.eventRect?.style(\"cursor\", null);\n\t\t$$.hideGridFocus?.();\n\t\t$$.hideSubchartGridFocus?.();\n\t\tif (tooltip) {\n\t\t\t$$.hideTooltip();\n\t\t\t$$._handleLinkedCharts(false);\n\t\t}\n\t\tcircle && !$$.isPointFocusOnly() && $$.unexpandCircles();\n\t\t$$.expandBarTypeShapes(false);\n\t},\n\t/**\n\t* Create eventRect for each data on the x-axis.\n\t* Register touch and drag events.\n\t* @param {object} eventRectEnter d3.select($EVENT.eventRects) object.\n\t* @returns {object} d3.select($EVENT.eventRects) object.\n\t* @private\n\t*/\n\tgenerateEventRectsForSingleX(eventRectEnter) {\n\t\tconst $$ = this;\n\t\tconst { config, state } = $$;\n\t\tconst { eventReceiver } = state;\n\t\tconst rect = eventRectEnter.style(\"cursor\", config.data_selection_enabled && config.data_selection_grouped ? \"pointer\" : null).on(\"click\", function(event) {\n\t\t\tstate.event = event;\n\t\t\tconst { currentIdx, data } = eventReceiver;\n\t\t\tconst d = data[currentIdx === -1 ? $$.getDataIndexFromEvent(event) : currentIdx];\n\t\t\t$$.clickHandlerForSingleX.bind(this)(d, $$);\n\t\t}).datum({ multipleX: false });\n\t\tif (state.inputType === \"mouse\") {\n\t\t\tconst getData = (event) => {\n\t\t\t\tconst index = event ? $$.getDataIndexFromEvent(event) : eventReceiver.currentIdx;\n\t\t\t\treturn index > -1 ? eventReceiver.data[index] : null;\n\t\t\t};\n\t\t\trect.on(\"mouseover\", (event) => {\n\t\t\t\tstate.event = event;\n\t\t\t\t$$.updateEventRect();\n\t\t\t\tObject.values($$.$el.axisTooltip).forEach((v) => v?.style(\"display\", null));\n\t\t\t}).on(\"mousemove\", function(event) {\n\t\t\t\tconst d = getData(event);\n\t\t\t\tstate.event = event;\n\t\t\t\tif (!d) return;\n\t\t\t\tlet { index } = d;\n\t\t\t\tconst stepType = config.line_step_type;\n\t\t\t\tif (config.line_step_tooltipMatch && $$.hasType(\"step\") && /^step\\-(before|after)$/.test(stepType)) {\n\t\t\t\t\tconst scale = $$.scale.zoom || $$.scale.x;\n\t\t\t\t\tconst xs = $$.axis.xs[index];\n\t\t\t\t\tconst inverted = scale.invert(getPointer(event, this)[0]);\n\t\t\t\t\tif (stepType === \"step-after\" && inverted < xs) index -= 1;\n\t\t\t\t\telse if (stepType === \"step-before\" && inverted > xs) index += 1;\n\t\t\t\t}\n\t\t\t\t$$.showAxisGridFocus?.();\n\t\t\t\tconst eventOnSameIdx = config.tooltip_grouped && index === eventReceiver.currentIdx;\n\t\t\t\tif (state.dragging || state.flowing || $$.hasArcType() || eventOnSameIdx) {\n\t\t\t\t\tif (config.tooltip_show && eventOnSameIdx) {\n\t\t\t\t\t\tconst [mx, my] = getPointer(event, this);\n\t\t\t\t\t\tconst last = state._lastTooltipMouse;\n\t\t\t\t\t\tif (!last || (mx - last[0]) ** 2 + (my - last[1]) ** 2 >= 9) {\n\t\t\t\t\t\t\tstate._lastTooltipMouse = [mx, my];\n\t\t\t\t\t\t\t$$.setTooltipPosition();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif (index !== eventReceiver.currentIdx) {\n\t\t\t\t\t$$.setOverOut(false, eventReceiver.currentIdx);\n\t\t\t\t\teventReceiver.currentIdx = index;\n\t\t\t\t}\n\t\t\t\tindex === -1 ? $$.unselectRect() : $$.selectRectForSingle(this, index);\n\t\t\t\t$$.setOverOut(index !== -1, index);\n\t\t\t}).on(\"mouseout\", (event) => {\n\t\t\t\tstate.event = event;\n\t\t\t\tif (!$$.config || $$.hasArcType() || eventReceiver.currentIdx === -1 || !config.interaction_onout) return;\n\t\t\t\t$$.hideAxisGridFocus?.();\n\t\t\t\t$$.unselectRect();\n\t\t\t\t$$.setOverOut(false, eventReceiver.currentIdx);\n\t\t\t\teventReceiver.currentIdx = -1;\n\t\t\t});\n\t\t}\n\t\treturn rect;\n\t},\n\tclickHandlerForSingleX(d, ctx) {\n\t\tconst $$ = ctx;\n\t\tconst { config, state, $el: { main } } = $$;\n\t\tif (!d || $$.hasArcType() || state.cancelClick) {\n\t\t\tstate.cancelClick && (state.cancelClick = false);\n\t\t\treturn;\n\t\t}\n\t\tconst { index } = d;\n\t\tmain.selectAll(`.${$SHAPE.shape}-${index}`).each(function(d2) {\n\t\t\tif (config.data_selection_grouped || $$.isWithinShape(this, d2)) {\n\t\t\t\t$$.toggleShape?.(this, d2, index);\n\t\t\t\tconfig.data_onclick.bind($$.api)(d2, this);\n\t\t\t}\n\t\t});\n\t},\n\t/**\n\t* Create an eventRect,\n\t* Register touch and drag events.\n\t* @param {object} eventRectEnter d3.select($EVENT.eventRects) object.\n\t* @private\n\t*/\n\tgenerateEventRectsForMultipleXs(eventRectEnter) {\n\t\tconst $$ = this;\n\t\tconst { config, state } = $$;\n\t\teventRectEnter.on(\"click\", function(event) {\n\t\t\tstate.event = event;\n\t\t\t$$.clickHandlerForMultipleXS.bind(this)($$);\n\t\t}).datum({ multipleX: true });\n\t\tif (state.inputType === \"mouse\") eventRectEnter.on(\"mouseover mousemove\", function(event) {\n\t\t\tstate.event = event;\n\t\t\t$$.selectRectForMultipleXs(this);\n\t\t}).on(\"mouseout\", (event) => {\n\t\t\tstate.event = event;\n\t\t\tif (!$$.config || $$.hasArcType() || !config.interaction_onout) return;\n\t\t\t$$.unselectRect();\n\t\t});\n\t},\n\tclickHandlerForMultipleXS(ctx) {\n\t\tconst $$ = ctx;\n\t\tconst { config, state } = $$;\n\t\tconst targetsToShow = $$.getTargetsToShow();\n\t\tif ($$.hasArcType(targetsToShow)) return;\n\t\tconst mouse = getPointer(state.event, this);\n\t\tconst closest = $$.findClosestFromTargets(targetsToShow, mouse);\n\t\tif (!closest) return;\n\t\tconst sensitivity = $$.getPointSensitivity(closest);\n\t\tif ($$.isBarType(closest.id) || $$.dist(closest, mouse) < sensitivity) $$.$el.main.selectAll(`.${$SHAPE.shapes}${$$.getTargetSelectorSuffix(closest.id)}`).selectAll(`.${$SHAPE.shape}-${closest.index}`).each(function() {\n\t\t\tif (config.data_selection_grouped || $$.isWithinShape(this, closest)) {\n\t\t\t\t$$.toggleShape?.(this, closest, closest.index);\n\t\t\t\tconfig.data_onclick.bind($$.api)(closest, this);\n\t\t\t}\n\t\t});\n\t}\n};\n//#endregion\nexport { eventrect_default as default };\n","/*!\n* Copyright (c) 2017 ~ present NAVER Corp.\r\n * billboard.js project is licensed under the MIT license\r\n * \r\n * billboard.js, JavaScript chart library\r\n * https://naver.github.io/billboard.js/\r\n * \r\n * @version 4.1.0\n*/\n//#region src/ChartInternal/internals/clip.ts\n/**\n* Copyright (c) 2017 ~ present NAVER Corp.\n* billboard.js project is licensed under the MIT license\n*/\nvar clip_default = {\n\tinitClip() {\n\t\tconst $$ = this;\n\t\tconst { clip, datetimeId } = $$.state;\n\t\tclip.id = `${datetimeId}-clip`;\n\t\tclip.idXAxis = `${clip.id}-xaxis`;\n\t\tclip.idYAxis = `${clip.id}-yaxis`;\n\t\tclip.idGrid = `${clip.id}-grid`;\n\t\tclip.path = $$.getClipPath(clip.id);\n\t\tclip.pathXAxis = $$.getClipPath(clip.idXAxis);\n\t\tclip.pathYAxis = $$.getClipPath(clip.idYAxis);\n\t\tclip.pathGrid = $$.getClipPath(clip.idGrid);\n\t},\n\tgetClipPath(id) {\n\t\tconst { config } = this;\n\t\tif (!config.clipPath && /-clip$/.test(id) || !config.axis_x_clipPath && /-clip-xaxis$/.test(id) || !config.axis_y_clipPath && /-clip-yaxis$/.test(id)) return null;\n\t\treturn `url(#${id})`;\n\t},\n\tappendClip(parent, id) {\n\t\tid && parent.append(\"clipPath\").attr(\"id\", id).append(\"rect\");\n\t},\n\t/**\n\t* Set x Axis clipPath dimension\n\t* @param {d3Selecton} node clipPath <rect> selection\n\t* @private\n\t*/\n\tsetXAxisClipPath(node) {\n\t\tconst { config, state: { margin, width, height } } = this;\n\t\tconst isRotated = config.axis_rotated;\n\t\tconst left = Math.max(30, margin.left) - (isRotated ? 0 : 20);\n\t\tconst h = (isRotated ? margin.top + height + 10 : margin.bottom) + 20;\n\t\tconst x = isRotated ? -(1 + left) : -(left - 1);\n\t\tconst y = -15;\n\t\tconst w = isRotated ? margin.left + 20 : width + 10 + left;\n\t\tnode.attr(\"x\", x).attr(\"y\", y).attr(\"width\", w).attr(\"height\", h);\n\t},\n\t/**\n\t* Set y Axis clipPath dimension\n\t* @param {d3Selection} node clipPath <rect> selection\n\t* @private\n\t*/\n\tsetYAxisClipPath(node) {\n\t\tconst { config, state: { margin, width, height } } = this;\n\t\tconst isRotated = config.axis_rotated;\n\t\tconst left = Math.max(30, margin.left) - (isRotated ? 20 : 0);\n\t\tconst isInner = config.axis_y_inner;\n\t\tconst x = isInner && !isRotated ? config.axis_y_label.text ? -20 : -1 : isRotated ? -(1 + left) : -(left - 1);\n\t\tconst y = -(isRotated ? 20 : margin.top);\n\t\tconst w = (isRotated ? width + 15 + left : margin.left + 20) + (isInner ? 20 : 0);\n\t\tconst h = (isRotated ? margin.bottom + 10 : margin.top + height) + 10;\n\t\tnode.attr(\"x\", x).attr(\"y\", y).attr(\"width\", w).attr(\"height\", h);\n\t},\n\tupdateXAxisTickClip() {\n\t\tconst $$ = this;\n\t\tconst { config, state: { clip, xAxisHeight }, $el: { defs } } = $$;\n\t\tconst newXAxisHeight = $$.getHorizontalAxisHeight(\"x\");\n\t\tif (defs && !clip.idXAxisTickTexts) {\n\t\t\tconst clipId = `${clip.id}-xaxisticktexts`;\n\t\t\t$$.appendClip(defs, clipId);\n\t\t\tclip.idXAxisTickTexts = clipId;\n\t\t\tclip.pathXAxisTickTexts = $$.getClipPath(clip.idXAxisTickTexts);\n\t\t}\n\t\tif (!config.axis_x_tick_multiline && $$.getAxisTickRotate(\"x\") && newXAxisHeight !== xAxisHeight) {\n\t\t\t$$.setXAxisTickClipWidth();\n\t\t\t$$.setXAxisTickTextClipPathWidth();\n\t\t}\n\t\t$$.state.xAxisHeight = newXAxisHeight;\n\t},\n\tsetXAxisTickClipWidth() {\n\t\tconst $$ = this;\n\t\tconst { config, state: { current: { maxTickSize } } } = $$;\n\t\tconst xAxisTickRotate = $$.getAxisTickRotate(\"x\");\n\t\tif (!config.axis_x_tick_multiline && xAxisTickRotate) {\n\t\t\tconst sinRotation = Math.sin(Math.PI / 180 * Math.abs(xAxisTickRotate));\n\t\t\tmaxTickSize.x.clipPath = ($$.getHorizontalAxisHeight(\"x\") - 20) / sinRotation;\n\t\t} else maxTickSize.x.clipPath = null;\n\t},\n\tsetXAxisTickTextClipPathWidth() {\n\t\tconst { state: { clip, current }, $el: { svg } } = this;\n\t\tif (svg) svg.select(`#${clip.idXAxisTickTexts} rect`).attr(\"width\", current.maxTickSize.x.clipPath).attr(\"height\", 30);\n\t}\n};\n//#endregion\nexport { clip_default as default };\n","/*!\n* Copyright (c) 2017 ~ present NAVER Corp.\r\n * billboard.js project is licensed under the MIT license\r\n * \r\n * billboard.js, JavaScript chart library\r\n * https://naver.github.io/billboard.js/\r\n * \r\n * @version 4.1.0\n*/\nimport { isNumber } from \"../../module/util/type-checks.js\";\n//#region src/ChartInternal/internals/size.axis.ts\nvar size_axis_default = {\n\t/**\n\t* Get Axis size according its position\n\t* @param {string} id Axis id value - x, y or y2\n\t* @returns {number} size Axis size value\n\t* @private\n\t*/\n\tgetAxisSize(id) {\n\t\tconst $$ = this;\n\t\tconst isRotated = $$.config.axis_rotated;\n\t\treturn isRotated && id === \"x\" || !isRotated && /y2?/.test(id) ? $$.getAxisWidthByAxisId(id, true) : $$.getHorizontalAxisHeight(id);\n\t},\n\tgetAxisWidthByAxisId(id, withoutRecompute) {\n\t\tconst $$ = this;\n\t\tif ($$.axis) {\n\t\t\tconst position = $$.axis?.getAxisLabelPosition(id);\n\t\t\tconst { width } = $$.axis.getMaxTickSize(id, withoutRecompute);\n\t\t\tconst gap = width === 0 ? .5 : 0;\n\t\t\treturn width + ($$.config.padding?.mode === \"fit\" ? position.isInner ? 10 + gap : 10 : position.isInner ? 20 + gap : 40);\n\t\t} else return 40;\n\t},\n\tgetHorizontalAxisHeight(id) {\n\t\tconst $$ = this;\n\t\tconst { config, state } = $$;\n\t\tconst { rotatedPadding, isLegendRight, isLegendInset } = state;\n\t\tconst isRotated = config.axis_rotated;\n\t\tconst isFitPadding = config.padding?.mode === \"fit\";\n\t\tconst isInner = config[`axis_${id}_inner`];\n\t\tconst hasLabelText = config[`axis_${id}_label`].text;\n\t\tconst defaultHeight = 13;\n\t\tlet h = config.padding?.mode === \"fit\" ? isInner && !hasLabelText ? id === \"y\" ? 1 : 0 : 20 : 30;\n\t\tif (id === \"x\" && !config.axis_x_show) return 8;\n\t\tif (id === \"x\" && isNumber(config.axis_x_height)) return config.axis_x_height;\n\t\tif (id === \"y\" && !config.axis_y_show) return config.legend_show && !isLegendRight && !isLegendInset ? 10 : 1;\n\t\tif (id === \"y2\" && !config.axis_y2_show) return isFitPadding ? 0 : rotatedPadding.top;\n\t\tconst maxtickSize = $$.axis.getMaxTickSize(id);\n\t\tconst isXAxisTickRotated = Math.abs(config.axis_x_tick_rotate) > 0 && (!config.axis_x_tick_autorotate || $$.needToRotateXAxisTickTexts());\n\t\tif ((config.axis_x_tick_multiline || isXAxisTickRotated) && maxtickSize.height > defaultHeight) h += maxtickSize.height - defaultHeight;\n\t\treturn h + ($$.axis.getAxisLabelPosition(id).isInner ? 0 : 10) + (id === \"y2\" && !isRotated ? -10 : 0);\n\t},\n\tgetEventRectWidth() {\n\t\tconst { config, axis } = this;\n\t\tconst isInverted = config.axis_x_inverted;\n\t\tconst tickInterval = axis.x.tickInterval();\n\t\treturn Math.max(0, isInverted ? Math.abs(tickInterval) : tickInterval);\n\t},\n\t/**\n\t* Get axis tick test rotate value\n\t* @param {string} id Axis id\n\t* @returns {number} rotate value\n\t* @private\n\t*/\n\tgetAxisTickRotate(id) {\n\t\tconst $$ = this;\n\t\tconst { axis, config, state, $el } = $$;\n\t\tlet rotate = config[`axis_${id}_tick_rotate`];\n\t\tif (id === \"x\") {\n\t\t\tconst allowedXAxisTypes = axis.isCategorized() || axis.isTimeSeries();\n\t\t\tif (config.axis_x_tick_fit && allowedXAxisTypes) {\n\t\t\t\tconst xTickCount = config.axis_x_tick_count;\n\t\t\t\tconst currentXTicksLength = state.current.maxTickSize.x.ticks.length;\n\t\t\t\tlet tickCount = 0;\n\t\t\t\tif (xTickCount) tickCount = xTickCount > currentXTicksLength ? currentXTicksLength : xTickCount;\n\t\t\t\telse if (currentXTicksLength) tickCount = currentXTicksLength;\n\t\t\t\tif (tickCount !== state.axis.x.tickCount) {\n\t\t\t\t\tconst { targets } = $$.data;\n\t\t\t\t\tstate.axis.x.padding = $$.getXDomainPadding([$$.getXDomainMinMax(targets, \"min\"), $$.getXDomainMinMax(targets, \"max\")], tickCount);\n\t\t\t\t}\n\t\t\t\tstate.axis.x.tickCount = tickCount;\n\t\t\t}\n\t\t\tif (($el.svg || state.isCanvasMode) && config.axis_x_tick_autorotate && config.axis_x_tick_fit && !config.axis_x_tick_multiline && !config.axis_x_tick_culling && allowedXAxisTypes) rotate = $$.needToRotateXAxisTickTexts() ? config.axis_x_tick_rotate : 0;\n\t\t}\n\t\treturn rotate;\n\t},\n\t/**\n\t* Check weather axis tick text needs to be rotated\n\t* @returns {boolean}\n\t* @private\n\t*/\n\tneedToRotateXAxisTickTexts() {\n\t\tconst $$ = this;\n\t\tconst { state: { axis, current, isLegendRight, legendItemWidth } } = $$;\n\t\tconst xAxisLength = current.width - (isLegendRight && legendItemWidth) - $$.getCurrentPaddingByDirection(\"left\") - $$.getCurrentPaddingByDirection(\"right\");\n\t\tconst tickCountWithPadding = axis.x.tickCount + axis.x.padding.left + axis.x.padding.right;\n\t\tconst { width } = $$.axis.getMaxTickSize(\"x\");\n\t\treturn width > (tickCountWithPadding ? xAxisLength / tickCountWithPadding : 0);\n\t}\n};\n//#endregion\nexport { size_axis_default as default };\n","/*!\n* Copyright (c) 2017 ~ present NAVER Corp.\r\n * billboard.js project is licensed under the MIT license\r\n * \r\n * billboard.js, JavaScript chart library\r\n * https://naver.github.io/billboard.js/\r\n * \r\n * @version 4.1.0\n*/\n//#region src/config/Options/axis/x.ts\n/**\n* Copyright (c) 2017 ~ present NAVER Corp.\n* billboard.js project is licensed under the MIT license\n*/\n/**\n* x Axis config options\n*/\nvar x_default = {\n\t/**\n\t* Set clip-path attribute for x axis element\n\t* @name axis․x․clipPath\n\t* @memberof Options\n\t* @type {boolean}\n\t* @default true\n\t* @see [Demo]()\n\t* @example\n\t* // don't set 'clip-path' attribute\n\t* clipPath: false\n\t*/\n\taxis_x_clipPath: true,\n\t/**\n\t* Show or hide x axis.\n\t* @name axis․x․show\n\t* @memberof Options\n\t* @type {boolean}\n\t* @default true\n\t* @example\n\t* axis: {\n\t* x: {\n\t* show: false\n\t* }\n\t* }\n\t*/\n\taxis_x_show: true,\n\t/**\n\t* Force the x axis to interact as single rather than multiple x axes.\n\t* - **NOTE:** The tooltip event will be triggered nearing each data points(for multiple xs) rather than x axis based(as single x does) in below condition:\n\t* - for `bubble` & `scatter` type\n\t* - when `data.xs` is set\n\t* - when `tooltip.grouped=false` is set\n\t* - `tooltip.grouped` options will take precedence over `axis.forceSingleX` option.\n\t* @name axis․x․forceAsSingle\n\t* @memberof Options\n\t* @type {boolean}\n\t* @default false\n\t* @see [Demo](https://naver.github.io/billboard.js/demo/#Axis.ForceAsSingle)\n\t* @example\n\t* axis: {\n\t* x: {\n\t* // will work as single x axis\n\t* forceAsSingle: true\n\t* }\n\t* }\n\t*/\n\taxis_x_forceAsSingle: false,\n\t/**\n\t* Set type of x axis.<br><br>\n\t* **Available Values:**\n\t* - category\n\t* - indexed\n\t* - log\n\t* - timeseries\n\t*\n\t* **NOTE:**<br>\n\t* - **log** type:\n\t* - the x values specified by [`data.x`](#.data%25E2%2580%25A4x)(or by any equivalent option), must be exclusively-positive.\n\t* - x axis min value should be >= 0.\n\t* - for 'category' type, `data.xs` option isn't supported.\n\t* @name axis․x․type\n\t* @memberof Options\n\t* @type {string}\n\t* @default indexed\n\t* @see [Demo: indexed](https://naver.github.io/billboard.js/demo/#Chart.AreaChart)\n\t* @see [Demo: timeseries](https://naver.github.io/billboard.js/demo/#Chart.TimeseriesChart)\n\t* @see [Demo: category](https://naver.github.io/billboard.js/demo/#Data.CategoryData)\n\t* @see [Demo: log](https://naver.github.io/billboard.js/demo/#Axis.LogScales)\n\t* @example\n\t* axis: {\n\t* x: {\n\t* type: \"timeseries\"\n\t* }\n\t* }\n\t*/\n\taxis_x_type: \"indexed\",\n\t/**\n\t* Set how to treat the timezone of x values.<br>\n\t* If true, treat x value as localtime. If false, convert to UTC internally.\n\t* @name axis․x․localtime\n\t* @memberof Options\n\t* @type {boolean}\n\t* @default true\n\t* @example\n\t* axis: {\n\t* x: {\n\t* localtime: false\n\t* }\n\t* }\n\t*/\n\taxis_x_localtime: true,\n\t/**\n\t* Set category names on category axis.\n\t* This must be an array that includes category names in string. If category names are included in the date by data.x option, this is not required.\n\t* @name axis․x․categories\n\t* @memberof Options\n\t* @type {Array}\n\t* @default []\n\t* @example\n\t* axis: {\n\t* x: {\n\t* categories: [\"Category 1\", \"Category 2\", ...]\n\t* }\n\t* }\n\t*/\n\taxis_x_categories: [],\n\t/**\n\t* centerize ticks on category axis.\n\t* @name axis․x․tick․centered\n\t* @memberof Options\n\t* @type {boolean}\n\t* @default false\n\t* @example\n\t* axis: {\n\t* x: {\n\t* tick: {\n\t* centered: true\n\t* }\n\t* }\n\t* }\n\t*/\n\taxis_x_tick_centered: false,\n\t/**\n\t* A function to format tick value. Format string is also available for timeseries data.\n\t* @name axis․x․tick․format\n\t* @memberof Options\n\t* @type {function|string}\n\t* @default undefined\n\t* @see [D3's time specifier](https://d3js.org/d3-time-format#locale_format)\n\t* @example\n\t* axis: {\n\t* x: {\n\t* tick: {\n\t* // for timeseries, a 'datetime' object is given as parameter\n\t* format: function(x) {\n\t* return x.getFullYear();\n\t* }\n\t*\n\t* // for category, index(Number) and categoryName(String) are given as parameter\n\t* format: function(index, categoryName) {\n\t* return categoryName.substr(0, 10);\n\t* },\n\t*\n\t* // for timeseries format specifier\n\t* format: \"%Y-%m-%d %H:%M:%S\"\n\t* }\n\t* }\n\t* }\n\t*/\n\taxis_x_tick_format: void 0,\n\t/**\n\t* Setting for culling ticks.\n\t* - `true`: the ticks will be culled, then only limited tick text will be shown.<br>\n\t* This option does not hide the tick lines by default, if want to hide tick lines, set `axis.x.tick.culling.lines=false`.\n\t* - `false`: all of ticks will be shown.<br><br>\n\t* The number of ticks to be shown can be changed by `axis.x.tick.culling.max`.\n\t* @name axis․x․tick․culling\n\t* @memberof Options\n\t* @type {boolean}\n\t* @default\n\t* `true` for indexed axis and timeseries axis, `false` for category axis\n\t* @example\n\t* axis: {\n\t* x: {\n\t* tick: {\n\t* culling: false,\n\t* }\n\t* }\n\t* }\n\t*/\n\taxis_x_tick_culling: {},\n\t/**\n\t* The number of tick texts will be adjusted to less than this value.\n\t* @name axis․x․tick․culling․max\n\t* @memberof Options\n\t* @type {number}\n\t* @default 10\n\t* @example\n\t* axis: {\n\t* x: {\n\t* tick: {\n\t* culling: {\n\t* max: 5\n\t* }\n\t* }\n\t* }\n\t* }\n\t*/\n\taxis_x_tick_culling_max: 10,\n\t/**\n\t* Control visibility of tick lines within culling option, along with tick text.\n\t* @name axis․x․tick․culling․lines\n\t* @memberof Options\n\t* @type {boolean}\n\t* @default true\n\t* @example\n\t* axis: {\n\t* x: {\n\t* tick: {\n\t* culling: {\n\t* lines: false,\n\t* }\n\t* }\n\t* }\n\t* }\n\t*/\n\taxis_x_tick_culling_lines: true,\n\t/**\n\t* Control culling start point to be reversed. If set to true, the culling will be started from the end to start.\n\t* - **NOTE:** This option is only available when `axis.x.tick.culling` is set to truthy value.\n\t* @name axis․x․tick․culling․reverse\n\t* @memberof Options\n\t* @type {boolean}\n\t* @default false\n\t* @see [Demo](https://naver.github.io/billboard.js/demo/#Axis.XAxisTickCulling)\n\t* @example\n\t* axis: {\n\t* x: {\n\t* tick: {\n\t* culling: {\n\t* reverse: true,\n\t* }\n\t* }\n\t* }\n\t* }\n\t*/\n\taxis_x_tick_culling_reverse: false,\n\t/**\n\t* The number of x axis ticks to show.<br><br>\n\t* This option hides tick lines together with tick text. If this option is used on timeseries axis, the ticks position will be determined precisely and not nicely positioned (e.g. it will have rough second value).\n\t* @name axis․x․tick․count\n\t* @memberof Options\n\t* @type {number}\n\t* @default undefined\n\t* @example\n\t* axis: {\n\t* x: {\n\t* tick: {\n\t* count: 5\n\t* }\n\t* }\n\t* }\n\t*/\n\taxis_x_tick_count: void 0,\n\t/**\n\t* Set the axis tick line to be positioned inside of the chart.\n\t* @name axis․x․tick․inner\n\t* @memberof Options\n\t* @type {boolean}\n\t* @default false\n\t* @see [Demo](https://naver.github.io/billboard.js/demo/#Axis.TickInner)\n\t* @example\n\t* axis: {\n\t* x: {\n\t* tick: {\n\t* inner: true\n\t* }\n\t* }\n\t* }\n\t*/\n\taxis_x_tick_inner: false,\n\t/**\n\t* Show or hide x axis tick line.\n\t* @name axis․x․tick․show\n\t* @memberof Options\n\t* @type {boolean}\n\t* @default true\n\t* @see [Demo](https://naver.github.io/billboard.js/demo/#Axis.HideTickLineText)\n\t* @example\n\t* axis: {\n\t* x: {\n\t* tick: {\n\t* show: false\n\t* }\n\t* }\n\t* }\n\t*/\n\taxis_x_tick_show: true,\n\t/**\n\t* Show or hide x axis tick text.\n\t* @name axis․x․tick․text․show\n\t* @memberof Options\n\t* @type {boolean}\n\t* @default true\n\t* @see [Demo](https://naver.github.io/billboard.js/demo/#Axis.HideTickLineText)\n\t* @example\n\t* axis: {\n\t* x: {\n\t* tick: {\n\t* text: {\n\t* show: false\n\t* }\n\t* }\n\t* }\n\t* }\n\t*/\n\taxis_x_tick_text_show: true,\n\t/**\n\t* Set the first/last axis tick text to be positioned inside of the chart on non-rotated axis.\n\t* @name axis․x․tick․text․inner\n\t* @memberof Options\n\t* @type {boolean|object}\n\t* @default false\n\t* @see [Demo](https://naver.github.io/billboard.js/demo/#Axis.XAxisTickInner)\n\t* @example\n\t* axis: {\n\t* x: {\n\t* tick: {\n\t* text: {\n\t* inner: true,\n\t*\n\t* // or specify each position of the first and last tick text\n\t* inner: {\n\t* \t first: true,\n\t* \t last: true\n\t* \t}\n\t* }\n\t* }\n\t* }\n\t* }\n\t*/\n\taxis_x_tick_text_inner: false,\n\t/**\n\t* Set the x Axis tick text's position relatively its original position\n\t* @name axis․x․tick․text․position\n\t* @memberof Options\n\t* @type {object}\n\t* @default {x: 0, y:0}\n\t* @example\n\t* axis: {\n\t* x: {\n\t* tick: {\n\t* text: {\n\t* position: {\n\t* x: 10,\n\t* y: 10\n\t* }\n\t* }\n\t* }\n\t* }\n\t* }\n\t*/\n\taxis_x_tick_text_position: {\n\t\tx: 0,\n\t\ty: 0\n\t},\n\t/**\n\t* Fit x axis ticks.\n\t* - **true**: ticks will be shown according to x value of the data points.\n\t* - **false**: ticks will be shown as to have same intervals.\n\t* @name axis․x․tick․fit\n\t* @memberof Options\n\t* @type {boolean}\n\t* @default true\n\t* @see [Demo](https://naver.github.io/billboard.js/demo/#Axis.XAxisTickFitting)\n\t* @see [Demo: for timeseries zoom](https://naver.github.io/billboard.js/demo/#Axis.XAxisTickTimeseries)\n\t* @example\n\t* axis: {\n\t* x: {\n\t* tick: {\n\t* fit: false\n\t* }\n\t* }\n\t* }\n\t*/\n\taxis_x_tick_fit: true,\n\t/**\n\t* Set the x values of ticks manually.<br><br>\n\t* If this option is provided, the position of the ticks will be determined based on those values.<br>\n\t* This option works with `timeseries` data and the x values will be parsed according to the type of the value and data.xFormat option.\n\t* @name axis․x․tick․values\n\t* @memberof Options\n\t* @type {Array|function}\n\t* @default null\n\t* @example\n\t* axis: {\n\t* x: {\n\t* tick: {\n\t* values: [1, 2, 4, 8, 16, 32, ...],\n\t*\n\t* // an Array value should be returned\n\t* values: function() {\n\t* \treturn [ ... ];\n\t* }\n\t* }\n\t* }\n\t* }\n\t*/\n\taxis_x_tick_values: null,\n\t/**\n\t* Rotate x axis tick text if there is not enough space for 'category' and 'timeseries' type axis.\n\t* - **NOTE:** The conditions where `autorotate` is enabled are:\n\t* - axis.x.type='category' or 'timeseries\n\t* - axis.x.tick.multiline=false\n\t* - axis.x.tick.culling=false\n\t* - axis.x.tick.fit=true\n\t* - **NOTE:** axis.x.tick.clippath=false is necessary for calculating the overflow padding between the end of x axis and the width of the SVG\n\t* @name axis․x․tick․autorotate\n\t* @memberof Options\n\t* @type {boolean}\n\t* @default false\n\t* @see [Demo](https://naver.github.io/billboard.js/demo/#Axis.XAxisTickAutorotate)\n\t* @example\n\t* axis: {\n\t* x: {\n\t* tick: {\n\t* rotate: 15,\n\t* autorotate: true,\n\t* multiline: false,\n\t* culling: false,\n\t* fit: true\n\t* },\n\t* clipPath: false\n\t* }\n\t* }\n\t*/\n\taxis_x_tick_autorotate: false,\n\t/**\n\t* Rotate x axis tick text.\n\t* - If you set negative value, it will rotate to opposite direction.\n\t* - Applied when [`axis.rotated`](#.axis%25E2%2580%25A4rotated) option is `false`.\n\t* - As long as `axis_x_tick_fit` is set to `true` it will calculate an overflow for the y2 axis and add this value to the right padding.\n\t* @name axis․x․tick․rotate\n\t* @memberof Options\n\t* @type {number}\n\t* @default 0\n\t* @see [Demo](https://naver.github.io/billboard.js/demo/#Axis.RotateXAxisTickText)\n\t* @example\n\t* axis: {\n\t* x: {\n\t* tick: {\n\t* rotate: 60\n\t* }\n\t* }\n\t* }\n\t*/\n\taxis_x_tick_rotate: 0,\n\t/**\n\t* Show x axis outer tick.\n\t* @name axis․x․tick․outer\n\t* @memberof Options\n\t* @type {boolean}\n\t* @default true\n\t* @example\n\t* axis: {\n\t* x: {\n\t* tick: {\n\t* outer: false\n\t* }\n\t* }\n\t* }\n\t*/\n\taxis_x_tick_outer: true,\n\t/**\n\t* Set tick text to be multiline\n\t* - **NOTE:**\n\t* > When x tick text contains `\\n`, it's used as line break and 'axis.x.tick.width' option is ignored.\n\t* @name axis․x․tick․multiline\n\t* @memberof Options\n\t* @type {boolean}\n\t* @default true\n\t* @see [Demo](https://naver.github.io/billboard.js/demo/#Axis.XAxisTickMultiline)\n\t* @example\n\t* axis: {\n\t* x: {\n\t* tick: {\n\t* multiline: false\n\t* }\n\t* }\n\t* }\n\t* @example\n\t* // example of line break with '\\n'\n\t* // In this case, 'axis.x.tick.width' is ignored\n\t* data: {\n\t* x: \"x\",\n\t* columns: [\n\t* [\"x\", \"long\\ntext\", \"Another\\nLong\\nText\"],\n\t* ...\n\t* ],\n\t* }\n\t*/\n\taxis_x_tick_multiline: true,\n\t/**\n\t* Set tick width\n\t* - **NOTE:**\n\t* > When x tick text contains `\\n`, this option is ignored.\n\t* @name axis․x․tick․width\n\t* @memberof Options\n\t* @type {number}\n\t* @default null\n\t* @example\n\t* axis: {\n\t* x: {\n\t* tick: {\n\t* width: 50\n\t* }\n\t* }\n\t* }\n\t*/\n\taxis_x_tick_width: null,\n\t/**\n\t* Set to display system tooltip(via `<title>` element) for tick text\n\t* - **NOTE:** Only available for category axis type (`axis.x.type='category'`)\n\t* @name axis․x․tick․tooltip\n\t* @memberof Options\n\t* @type {boolean}\n\t* @default false\n\t* @example\n\t* axis: {\n\t* x: {\n\t* tick: {\n\t* tooltip: true\n\t* }\n\t* }\n\t* }\n\t*/\n\taxis_x_tick_tooltip: false,\n\t/**\n\t* Set max value of x axis range.\n\t* @name axis․x․max\n\t* @memberof Options\n\t* @property {number} max Set the max value\n\t* @property {boolean} [max.fit=false] When specified `max.value` is greater than the bound data value, setting `true` will make x axis max to be fitted to the bound data max value.\n\t* - **NOTE:** If the bound data max value is greater than the `max.value`, the x axis max will be limited as the given `max.value`.\n\t* @property {number} [max.value] Set the max value\n\t* @example\n\t* axis: {\n\t* x: {\n\t* max: 100,\n\t*\n\t* max: {\n\t* // 'fit=true' will make x axis max to be limited as the bound data value max when 'max.value' is greater.\n\t* // - when bound data max is '10' and max.value: '100' ==> x axis max will be '10'\n\t* // - when bound data max is '1000' and max.value: '100' ==> x axis max will be '100'\n\t* fit: true,\n\t* value: 100\n\t* }\n\t* }\n\t* }\n\t*/\n\taxis_x_max: void 0,\n\t/**\n\t* Set min value of x axis range.\n\t* @name axis․x․min\n\t* @memberof Options\n\t* @property {number} min Set the min value\n\t* @property {boolean} [min.fit=false] When specified `min.value` is lower than the bound data value, setting `true` will make x axis min to be fitted to the bound data min value.\n\t* - **NOTE:** If the bound data min value is lower than the `min.value`, the x axis min will be limited as the given `min.value`.\n\t* @property {number} [min.value] Set the min value\n\t* @example\n\t* axis: {\n\t* x: {\n\t* min: -100,\n\t*\n\t* min: {\n\t* // 'fit=true' will make x axis min to be limited as the bound data value min when 'min.value' is lower.\n\t* // - when bound data min is '-10' and min.value: '-100' ==> x axis min will be '-10'\n\t* // - when bound data min is '-1000' and min.value: '-100' ==> x axis min will be '-100'\n\t* fit: true,\n\t* value: -100\n\t* }\n\t* }\n\t* }\n\t*/\n\taxis_x_min: void 0,\n\t/**\n\t* Change the direction of x axis.<br><br>\n\t* If true set, the direction will be `right -> left`.\n\t* @name axis․x․inverted\n\t* @memberof Options\n\t* @type {boolean}\n\t* @default false\n\t* @see [Demo](https://naver.github.io/billboard.js/demo/#Axis.InvertedAxis)\n\t* @example\n\t* axis: {\n\t* x: {\n\t* inverted: true\n\t* }\n\t* }\n\t*/\n\taxis_x_inverted: false,\n\t/**\n\t* Set padding for x axis.<br><br>\n\t* If this option is set, the range of x axis will increase/decrease according to the values.\n\t* If no padding is needed in the rage of x axis, 0 should be set.\n\t* By default, left/right padding are set depending on x axis type or chart types.\n\t* - **NOTE:**\n\t* - The meaning of padding values, differs according axis types:<br>\n\t* - **category/indexed:** The unit of tick value\n\t* ex. the given value `1`, is same as the width of 1 tick width\n\t* - **timeseries:** Numeric time value\n\t* ex. the given value `1000*60*60*24`, which is numeric time equivalent of a day, is same as the width of 1 tick width\n\t* - If want values to be treated as pixels, specify `unit:\"px\"`.\n\t* - The pixel value will be converted based on the scale values. Hence can not reflect accurate padding result.\n\t* @name axis․x․padding\n\t* @memberof Options\n\t* @type {object|number}\n\t* @default {}\n\t* @example\n\t* axis: {\n\t* x: {\n\t* padding: {\n\t* // when axis type is 'category'\n\t* left: 1, // set left padding width of equivalent value of a tick's width\n\t* right: 0.5 // set right padding width as half of equivalent value of tick's width\n\t*\n\t* // when axis type is 'timeseries'\n\t* left: 1000*60*60*24, // set left padding width of equivalent value of a day tick's width\n\t* right: 1000*60*60*12 // set right padding width as half of equivalent value of a day tick's width\n\t* },\n\t*\n\t* // or set both values at once.\n\t* padding: 10,\n\t*\n\t* // or set padding values as pixel unit.\n\t* padding: {\n\t* left: 100,\n\t* right: 50,\n\t* unit: \"px\"\n\t* },\n\t* }\n\t* }\n\t*/\n\taxis_x_padding: {},\n\t/**\n\t* Set height of x axis.<br><br>\n\t* The height of x axis can be set manually by this option. If you need more space for x axis, please use this option for that. The unit is pixel.\n\t* @name axis․x․height\n\t* @memberof Options\n\t* @type {number}\n\t* @default undefined\n\t* @example\n\t* axis: {\n\t* x: {\n\t* height: 20\n\t* }\n\t* }\n\t*/\n\taxis_x_height: void 0,\n\t/**\n\t* Set extent for subchart and zoom(drag only). This can be an array or function that returns an array.\n\t* - **NOTE:** Specifying value, will limit the zoom scope selection within.\n\t* @name axis․x․extent\n\t* @memberof Options\n\t* @type {Array|function}\n\t* @default undefined\n\t* @example\n\t* axis: {\n\t* x: {\n\t* // extent range as a pixel value\n\t* extent: [0, 200],\n\t*\n\t* // when axis is 'timeseries', parsable datetime string\n\t* extent: [\"2019-03-01\", \"2019-03-05\"],\n\t*\n\t* // return extent value\n\t* extent: function(domain, scale) {\n\t* \t var extent = domain.map(function(v) {\n\t* \t return scale(v);\n\t* \t });\n\t*\n\t* \t // it should return a format of array\n\t* \t // ex) [0, 584]\n\t* \t return extent;\n\t* }\n\t* }\n\t* }\n\t*/\n\taxis_x_extent: void 0,\n\t/**\n\t* Set label on x axis.<br><br>\n\t* You can set x axis label and change its position by this option.\n\t* `string` and `object` can be passed and we can change the poisiton by passing object that has position key.<br>\n\t* Available position differs according to the axis direction (vertical or horizontal).\n\t* If string set, the position will be the default.\n\t*\n\t* - **If it's horizontal axis:**\n\t* - inner-right [default]\n\t* - inner-center\n\t* - inner-left\n\t* - outer-right\n\t* - outer-center\n\t* - outer-left\n\t* - **If it's vertical axis:**\n\t* - inner-top [default]\n\t* - inner-middle\n\t* - inner-bottom\n\t* - outer-top\n\t* - outer-middle\n\t* - outer-bottom\n\t* @name axis․x․label\n\t* @memberof Options\n\t* @type {string|object}\n\t* @default undefined\n\t* @example\n\t* axis: {\n\t* x: {\n\t* label: \"Your X Axis\"\n\t* }\n\t* }\n\t*\n\t* axis: {\n\t* x: {\n\t* label: {\n\t* text: \"Your X Axis\",\n\t* position: \"outer-center\"\n\t* }\n\t* }\n\t* }\n\t*/\n\taxis_x_label: {},\n\t/**\n\t* Set additional axes for x Axis.\n\t* - **NOTE:** Axis' scale is based on x Axis value if domain option isn't set.\n\t*\n\t* Each axis object should consist with following options:\n\t*\n\t* | Name | Type | Default | Description |\n\t* | --- | --- | --- | --- |\n\t* | domain | Array | - | Set the domain value |\n\t* | tick.outer | boolean | true | Show outer tick |\n\t* | tick.format | Function | - | Set formatter for tick text |\n\t* | tick.count | Number | - | Set the number of y axis ticks |\n\t* | tick.values | Array | - | Set tick values manually |\n\t* @name axis․x․axes\n\t* @memberof Options\n\t* @type {Array}\n\t* @see [Demo](https://naver.github.io/billboard.js/demo/#Axis.MultiAxes)\n\t* @see [Demo: Domain](https://naver.github.io/billboard.js/demo/#Axis.MultiAxesDomain)\n\t* @example\n\t* x: {\n\t* axes: [\n\t* {\n\t* // if set, will not be correlated with the main x Axis domain value\n\t* domain: [0, 1000],\n\t* tick: {\n\t* outer: false,\n\t* format: function(x) {\n\t* return x + \"%\";\n\t* },\n\t* count: 2,\n\t* values: [10, 20, 30]\n\t* }\n\t* },\n\t* ...\n\t* ]\n\t* }\n\t*/\n\taxis_x_axes: []\n};\n//#endregion\nexport { x_default as default };\n","/*!\n* Copyright (c) 2017 ~ present NAVER Corp.\r\n * billboard.js project is licensed under the MIT license\r\n * \r\n * billboard.js, JavaScript chart library\r\n * https://naver.github.io/billboard.js/\r\n * \r\n * @version 4.1.0\n*/\n//#region src/config/Options/axis/y.ts\n/**\n* Copyright (c) 2017 ~ present NAVER Corp.\n* billboard.js project is licensed under the MIT license\n*/\n/**\n* y Axis config options\n*/\nvar y_default = {\n\t/**\n\t* Set clip-path attribute for y axis element\n\t* - **NOTE**: `clip-path` attribute for y Axis is set only when `axis.y.inner` option is true.\n\t* @name axis․y․clipPath\n\t* @memberof Options\n\t* @type {boolean}\n\t* @default true\n\t* @example\n\t* // don't set 'clip-path' attribute\n\t* clipPath: false\n\t*/\n\taxis_y_clipPath: true,\n\t/**\n\t* Show or hide y axis.\n\t* @name axis․y․show\n\t* @memberof Options\n\t* @type {boolean}\n\t* @default true\n\t* @example\n\t* axis: {\n\t* y: {\n\t* show: false\n\t* }\n\t* }\n\t*/\n\taxis_y_show: true,\n\t/**\n\t* Set type of y axis.<br><br>\n\t* **Available Values:**\n\t* - indexed\n\t* - log\n\t* - timeseries\n\t*\n\t* **NOTE:**<br>\n\t* - **log** type:\n\t* - the bound data values must be exclusively-positive.\n\t* - y axis min value should be >= 0.\n\t* - [`data.groups`](#.data%25E2%2580%25A4groups)(stacked data) option aren't supported.\n\t*\n\t* @name axis․y․type\n\t* @memberof Options\n\t* @type {string}\n\t* @default \"indexed\"\n\t* @see [Demo: log](https://naver.github.io/billboard.js/demo/#Axis.LogScales)\n\t* @example\n\t* axis: {\n\t* y: {\n\t* type: \"log\"\n\t* }\n\t* }\n\t*/\n\taxis_y_type: \"indexed\",\n\t/**\n\t* Set max value of y axis.\n\t* - **NOTE:** Padding will be added based on this value, so if you don't need the padding, please set axis.y.padding to disable it (e.g. axis.y.padding = 0).\n\t* @name axis․y․max\n\t* @memberof Options\n\t* @type {number}\n\t* @default undefined\n\t* @example\n\t* axis: {\n\t* y: {\n\t* max: 1000\n\t* }\n\t* }\n\t*/\n\taxis_y_max: void 0,\n\t/**\n\t* Set min value of y axis.\n\t* - **NOTE:**\n\t* Padding will be added based on this value, so if you don't need the padding, please set axis.y.padding to disable it (e.g. axis.y.padding = 0).\n\t* @name axis․y․min\n\t* @memberof Options\n\t* @type {number}\n\t* @default undefined\n\t* @example\n\t* axis: {\n\t* y: {\n\t* min: 1000\n\t* }\n\t* }\n\t*/\n\taxis_y_min: void 0,\n\t/**\n\t* Change the direction of y axis.<br><br>\n\t* If true set, the direction will be `top -> bottom`.\n\t* @name axis․y․inverted\n\t* @memberof Options\n\t* @type {boolean}\n\t* @default false\n\t* @see [Demo](https://naver.github.io/billboard.js/demo/#Axis.InvertedAxis)\n\t* @example\n\t* axis: {\n\t* y: {\n\t* inverted: true\n\t* }\n\t* }\n\t*/\n\taxis_y_inverted: false,\n\t/**\n\t* Set center value of y axis.\n\t* @name axis․y․center\n\t* @memberof Options\n\t* @type {number}\n\t* @default undefined\n\t* @example\n\t* axis: {\n\t* y: {\n\t* center: 0\n\t* }\n\t* }\n\t*/\n\taxis_y_center: void 0,\n\t/**\n\t* Show y axis inside of the chart.\n\t* @name axis․y․inner\n\t* @memberof Options\n\t* @type {boolean}\n\t* @default false\n\t* @example\n\t* axis: {\n\t* y: {\n\t* inner: true\n\t* }\n\t* }\n\t*/\n\taxis_y_inner: false,\n\t/**\n\t* Set label on y axis.<br><br>\n\t* You can set y axis label and change its position by this option. This option works in the same way as [axis.x.label](#.axis%25E2%2580%25A4x%25E2%2580%25A4label).\n\t* @name axis․y․label\n\t* @memberof Options\n\t* @type {string|object}\n\t* @default {}\n\t* @see [axis.x.label](#.axis%25E2%2580%25A4x%25E2%2580%25A4label) for position string value.\n\t* @example\n\t* axis: {\n\t* y: {\n\t* label: \"Your Y Axis\"\n\t* }\n\t* }\n\t*\n\t* axis: {\n\t* y: {\n\t* label: {\n\t* text: \"Your Y Axis\",\n\t* position: \"outer-middle\"\n\t* }\n\t* }\n\t* }\n\t*/\n\taxis_y_label: {},\n\t/**\n\t* Set formatter for y axis tick text.<br><br>\n\t* This option accepts d3.format object as well as a function you define.\n\t* @name axis․y․tick․format\n\t* @memberof Options\n\t* @type {function}\n\t* @default undefined\n\t* @example\n\t* axis: {\n\t* y: {\n\t* tick: {\n\t* format: function(x) {\n\t* return x.getFullYear();\n\t* }\n\t* }\n\t* }\n\t* }\n\t*/\n\taxis_y_tick_format: void 0,\n\t/**\n\t* Setting for culling ticks.\n\t* - `true`: the ticks will be culled, then only limited tick text will be shown.<br>\n\t* This option does not hide the tick lines by default, if want to hide tick lines, set `axis.y.tick.culling.lines=false`.\n\t* - `false`: all of ticks will be shown.<br><br>\n\t* The number of ticks to be shown can be changed by `axis.y.tick.culling.max`.\n\t* @name axis․y․tick․culling\n\t* @memberof Options\n\t* @type {boolean}\n\t* @default false\n\t* @example\n\t* axis: {\n\t* y: {\n\t* tick: {\n\t* culling: false\n\t* }\n\t* }\n\t* }\n\t*/\n\taxis_y_tick_culling: false,\n\t/**\n\t* The number of tick texts will be adjusted to less than this value.\n\t* @name axis․y․tick․culling․max\n\t* @memberof Options\n\t* @type {number}\n\t* @default 5\n\t* @example\n\t* axis: {\n\t* y: {\n\t* tick: {\n\t* culling: {\n\t* max: 5\n\t* }\n\t* }\n\t* }\n\t* }\n\t*/\n\taxis_y_tick_culling_max: 5,\n\t/**\n\t* Control visibility of tick lines within culling option, along with tick text.\n\t* @name axis․y․tick․culling․lines\n\t* @memberof Options\n\t* @type {boolean}\n\t* @default true\n\t* @example\n\t* axis: {\n\t* y: {\n\t* tick: {\n\t* culling: {\n\t* lines: false,\n\t* }\n\t* }\n\t* }\n\t* }\n\t*/\n\taxis_y_tick_culling_lines: true,\n\t/**\n\t* Control culling start point to be reversed. If set to true, the culling will be started from the end to start.\n\t* - **NOTE:** This option is only available when `axis.y.tick.culling` is set to truthy value.\n\t* @name axis․y․tick․culling․reverse\n\t* @memberof Options\n\t* @type {boolean}\n\t* @default false\n\t* @example\n\t* axis: {\n\t* y: {\n\t* tick: {\n\t* culling: {\n\t* reverse: true,\n\t* }\n\t* }\n\t* }\n\t* }\n\t*/\n\taxis_y_tick_culling_reverse: false,\n\t/**\n\t* Set the axis tick line to be positioned inside of the chart.\n\t* @name axis․y․tick․inner\n\t* @memberof Options\n\t* @type {boolean}\n\t* @default false\n\t* @see [Demo](https://naver.github.io/billboard.js/demo/#Axis.TickInner)\n\t* axis: {\n\t* y: {\n\t* tick: {\n\t* inner: true\n\t* }\n\t* }\n\t* }\n\t*/\n\taxis_y_tick_inner: false,\n\t/**\n\t* Show y axis outer tick.\n\t* @name axis․y․tick․outer\n\t* @memberof Options\n\t* @type {boolean}\n\t* @default true\n\t* @example\n\t* axis: {\n\t* y: {\n\t* tick: {\n\t* outer: false\n\t* }\n\t* }\n\t* }\n\t*/\n\taxis_y_tick_outer: true,\n\t/**\n\t* Set y axis tick values manually.\n\t* @name axis․y․tick․values\n\t* @memberof Options\n\t* @type {Array|function}\n\t* @default null\n\t* @example\n\t* axis: {\n\t* y: {\n\t* tick: {\n\t* values: [100, 1000, 10000],\n\t*\n\t* // an Array value should be returned\n\t* values: function() {\n\t* \treturn [ ... ];\n\t* }\n\t* }\n\t* }\n\t* }\n\t*/\n\taxis_y_tick_values: null,\n\t/**\n\t* Rotate y axis tick text.\n\t* - If you set negative value, it will rotate to opposite direction.\n\t* - Applied when [`axis.rotated`](#.axis%25E2%2580%25A4rotated) option is `true`.\n\t* @name axis․y․tick․rotate\n\t* @memberof Options\n\t* @type {number}\n\t* @default 0\n\t* @example\n\t* axis: {\n\t* y: {\n\t* tick: {\n\t* rotate: 60\n\t* }\n\t* }\n\t* }\n\t*/\n\taxis_y_tick_rotate: 0,\n\t/**\n\t* Set the number of y axis ticks.<br><br>\n\t* - **NOTE:** The position of the ticks will be calculated precisely, so the values on the ticks will not be rounded nicely. In the case, axis.y.tick.format or axis.y.tick.values will be helpful.\n\t* @name axis․y․tick․count\n\t* @memberof Options\n\t* @type {number}\n\t* @default undefined\n\t* @example\n\t* axis: {\n\t* y: {\n\t* tick: {\n\t* count: 5\n\t* }\n\t* }\n\t* }\n\t*/\n\taxis_y_tick_count: void 0,\n\t/**\n\t* Show or hide y axis tick line.\n\t* @name axis․y․tick․show\n\t* @memberof Options\n\t* @type {boolean}\n\t* @default true\n\t* @see [Demo](https://naver.github.io/billboard.js/demo/#Axis.HideTickLineText)\n\t* @example\n\t* axis: {\n\t* y: {\n\t* tick: {\n\t* show: false\n\t* }\n\t* }\n\t* }\n\t*/\n\taxis_y_tick_show: true,\n\t/**\n\t* Set axis tick step(interval) size.\n\t* - **NOTE:** Will be ignored if `axis.y.tick.count` or `axis.y.tick.values` options are set.\n\t* @name axis․y․tick․stepSize\n\t* @memberof Options\n\t* @type {number}\n\t* @see [Demo](https://naver.github.io/billboard.js/demo/#Axis.StepSizeForYAxis)\n\t* @example\n\t* axis: {\n\t* y: {\n\t* tick: {\n\t* // tick value will step as indicated interval value.\n\t* // ex) 'stepSize=15' ==> [0, 15, 30, 45, 60]\n\t* stepSize: 15\n\t* }\n\t* }\n\t* }\n\t*/\n\taxis_y_tick_stepSize: null,\n\t/**\n\t* Show or hide y axis tick text.\n\t* @name axis․y․tick․text․show\n\t* @memberof Options\n\t* @type {boolean}\n\t* @default true\n\t* @see [Demo](https://naver.github.io/billboard.js/demo/#Axis.HideTickLineText)\n\t* @example\n\t* axis: {\n\t* y: {\n\t* tick: {\n\t* text: {\n\t* show: false\n\t* }\n\t* }\n\t* }\n\t* }\n\t*/\n\taxis_y_tick_text_show: true,\n\t/**\n\t* Set the y Axis tick text's position relatively its original position\n\t* @name axis․y․tick․text․position\n\t* @memberof Options\n\t* @type {object}\n\t* @default {x: 0, y:0}\n\t* @example\n\t* axis: {\n\t* y: {\n\t* tick: {\n\t* text: {\n\t* position: {\n\t* x: 10,\n\t* y: 10\n\t* }\n\t* }\n\t* }\n\t* }\n\t* }\n\t*/\n\taxis_y_tick_text_position: {\n\t\tx: 0,\n\t\ty: 0\n\t},\n\t/**\n\t* Set the number of y axis ticks.<br><br>\n\t* - **NOTE:** The position of the ticks will be calculated precisely, so the values on the ticks will not be rounded nicely. In the case, axis.y.tick.format or axis.y.tick.values will be helpful.\n\t* @name axis․y․tick․time\n\t* @memberof Options\n\t* @private\n\t* @type {object}\n\t* @property {object} time time object\n\t* @property {function} [time.value] D3's time interval function (https://github.com/d3/d3-time#intervals)\n\t* @example\n\t* axis: {\n\t* y: {\n\t* tick: {\n\t* time: {\n\t* // ticks at 15-minute intervals\n\t* // https://github.com/d3/d3-scale/blob/master/README.md#time_ticks\n\t* value: d3.timeMinute.every(15)\n\t* }\n\t* }\n\t* }\n\t* }\n\t*/\n\taxis_y_tick_time_value: void 0,\n\t/**\n\t* Set padding for y axis.<br><br>\n\t* You can set padding for y axis to create more space on the edge of the axis.\n\t* This option accepts object and it can include top and bottom. top, bottom will be treated as pixels.\n\t*\n\t* - **NOTE:**\n\t* - Given values are translated relative to the y Axis domain value for padding\n\t* - For area and bar type charts, [area.zerobased](#.area) or [bar.zerobased](#.bar) options should be set to 'false` to get padded bottom.\n\t* @name axis․y․padding\n\t* @memberof Options\n\t* @type {object|number}\n\t* @default {}\n\t* @example\n\t* axis: {\n\t* y: {\n\t* padding: {\n\t* top: 0,\n\t* bottom: 0\n\t* },\n\t*\n\t* // or set both values at once.\n\t* padding: 10\n\t* }\n\t* }\n\t*/\n\taxis_y_padding: {},\n\t/**\n\t* Set default range of y axis.<br><br>\n\t* This option set the default value for y axis when there is no data on init.\n\t* @name axis․y․default\n\t* @memberof Options\n\t* @type {Array}\n\t* @default undefined\n\t* @example\n\t* axis: {\n\t* y: {\n\t* default: [0, 1000]\n\t* }\n\t* }\n\t*/\n\taxis_y_default: void 0,\n\t/**\n\t* Set additional axes for y Axis.\n\t* - **NOTE:** Axis' scale is based on y Axis value if domain option isn't set.\n\t*\n\t* Each axis object should consist with following options:\n\t*\n\t* | Name | Type | Default | Description |\n\t* | --- | --- | --- | --- |\n\t* | domain | Array | - | Set the domain value |\n\t* | tick.outer | boolean | true | Show outer tick |\n\t* | tick.format | Function | - | Set formatter for tick text |\n\t* | tick.count | Number | - | Set the number of y axis ticks |\n\t* | tick.values | Array | - | Set tick values manually |\n\t* @name axis․y․axes\n\t* @memberof Options\n\t* @type {Array}\n\t* @see [Demo](https://naver.github.io/billboard.js/demo/#Axis.MultiAxes)\n\t* @see [Demo: Domain](https://naver.github.io/billboard.js/demo/#Axis.MultiAxesDomain)\n\t* @example\n\t* y: {\n\t* axes: [\n\t* {\n\t* // if set, will not be correlated with the main y Axis domain value\n\t* domain: [0, 1000],\n\t* tick: {\n\t* outer: false,\n\t* format: function(x) {\n\t* return x + \"%\";\n\t* },\n\t* count: 2,\n\t* values: [10, 20, 30]\n\t* }\n\t* },\n\t* ...\n\t* ]\n\t* }\n\t*/\n\taxis_y_axes: []\n};\n//#endregion\nexport { y_default as default };\n","/*!\n* Copyright (c) 2017 ~ present NAVER Corp.\r\n * billboard.js project is licensed under the MIT license\r\n * \r\n * billboard.js, JavaScript chart library\r\n * https://naver.github.io/billboard.js/\r\n * \r\n * @version 4.1.0\n*/\n//#region src/config/Options/axis/y2.ts\n/**\n* Copyright (c) 2017 ~ present NAVER Corp.\n* billboard.js project is licensed under the MIT license\n*/\n/**\n* y2 Axis config options\n*/\nvar y2_default = {\n\t/**\n\t* Show or hide y2 axis.\n\t* - **NOTE**:\n\t* - When set to `false` will not generate y2 axis node. In this case, all 'y2' axis related functionality won't work properly.\n\t* - If need to use 'y2' related options while y2 isn't visible, set the value `true` and control visibility by css display property.\n\t* @name axis․y2․show\n\t* @memberof Options\n\t* @type {boolean}\n\t* @default false\n\t* @example\n\t* axis: {\n\t* y2: {\n\t* show: true\n\t* }\n\t* }\n\t*/\n\taxis_y2_show: false,\n\t/**\n\t* Set type of y2 axis.<br><br>\n\t* **Available Values:**\n\t* - indexed\n\t* - log\n\t* - timeseries\n\t*\n\t* **NOTE:**<br>\n\t* - **log** type:\n\t* - the bound data values must be exclusively-positive.\n\t* - y2 axis min value should be >= 0.\n\t* - [`data.groups`](#.data%25E2%2580%25A4groups)(stacked data) option aren't supported.\n\t*\n\t* @name axis․y2․type\n\t* @memberof Options\n\t* @type {string}\n\t* @default \"indexed\"\n\t* @see [Demo: log](https://naver.github.io/billboard.js/demo/#Axis.LogScales)\n\t* @example\n\t* axis: {\n\t* y2: {\n\t* type: \"indexed\"\n\t* }\n\t* }\n\t*/\n\taxis_y2_type: \"indexed\",\n\t/**\n\t* Set max value of y2 axis.\n\t* @name axis․y2․max\n\t* @memberof Options\n\t* @type {number}\n\t* @default undefined\n\t* @example\n\t* axis: {\n\t* y2: {\n\t* max: 1000\n\t* }\n\t* }\n\t*/\n\taxis_y2_max: void 0,\n\t/**\n\t* Set min value of y2 axis.\n\t* @name axis․y2․min\n\t* @memberof Options\n\t* @type {number}\n\t* @default undefined\n\t* @example\n\t* axis: {\n\t* y2: {\n\t* min: -1000\n\t* }\n\t* }\n\t*/\n\taxis_y2_min: void 0,\n\t/**\n\t* Change the direction of y2 axis.<br><br>\n\t* If true set, the direction will be `top -> bottom`.\n\t* @name axis․y2․inverted\n\t* @memberof Options\n\t* @type {boolean}\n\t* @default false\n\t* @see [Demo](https://naver.github.io/billboard.js/demo/#Axis.InvertedAxis)\n\t* @example\n\t* axis: {\n\t* y2: {\n\t* inverted: true\n\t* }\n\t* }\n\t*/\n\taxis_y2_inverted: false,\n\t/**\n\t* Set center value of y2 axis.\n\t* @name axis․y2․center\n\t* @memberof Options\n\t* @type {number}\n\t* @default undefined\n\t* @example\n\t* axis: {\n\t* y2: {\n\t* center: 0\n\t* }\n\t* }\n\t*/\n\taxis_y2_center: void 0,\n\t/**\n\t* Show y2 axis inside of the chart.\n\t* @name axis․y2․inner\n\t* @memberof Options\n\t* @type {boolean}\n\t* @default false\n\t* @example\n\t* axis: {\n\t* y2: {\n\t* inner: true\n\t* }\n\t* }\n\t*/\n\taxis_y2_inner: false,\n\t/**\n\t* Set label on y2 axis.<br><br>\n\t* You can set y2 axis label and change its position by this option. This option works in the same way as [axis.x.label](#.axis%25E2%2580%25A4x%25E2%2580%25A4label).\n\t* @name axis․y2․label\n\t* @memberof Options\n\t* @type {string|object}\n\t* @default {}\n\t* @see [axis.x.label](#.axis%25E2%2580%25A4x%25E2%2580%25A4label) for position string value.\n\t* @example\n\t* axis: {\n\t* y2: {\n\t* label: \"Your Y2 Axis\"\n\t* }\n\t* }\n\t*\n\t* axis: {\n\t* y2: {\n\t* label: {\n\t* text: \"Your Y2 Axis\",\n\t* position: \"outer-middle\"\n\t* }\n\t* }\n\t* }\n\t*/\n\taxis_y2_label: {},\n\t/**\n\t* Set formatter for y2 axis tick text.<br><br>\n\t* This option works in the same way as axis.y.format.\n\t* @name axis․y2․tick․format\n\t* @memberof Options\n\t* @type {function}\n\t* @default undefined\n\t* @example\n\t* axis: {\n\t* y2: {\n\t* tick: {\n\t* format: d3.format(\"$,\")\n\t* //or format: function(d) { return \"$\" + d; }\n\t* }\n\t* }\n\t* }\n\t*/\n\taxis_y2_tick_format: void 0,\n\t/**\n\t* Setting for culling ticks.\n\t* - `true`: the ticks will be culled, then only limited tick text will be shown.<br>\n\t* This option does not hide the tick lines by default, if want to hide tick lines, set `axis.y2.tick.culling.lines=false`.\n\t* - `false`: all of ticks will be shown.<br><br>\n\t* The number of ticks to be shown can be changed by `axis.y2.tick.culling.max`.\n\t* @name axis․y2․tick․culling\n\t* @memberof Options\n\t* @type {boolean}\n\t* @default false\n\t* @example\n\t* axis: {\n\t* y2: {\n\t* tick: {\n\t* culling: false\n\t* }\n\t* }\n\t* }\n\t*/\n\taxis_y2_tick_culling: false,\n\t/**\n\t* The number of tick texts will be adjusted to less than this value.\n\t* @name axis․y2․tick․culling․max\n\t* @memberof Options\n\t* @type {number}\n\t* @default 5\n\t* @example\n\t* axis: {\n\t* y2: {\n\t* tick: {\n\t* culling: {\n\t* max: 5\n\t* }\n\t* }\n\t* }\n\t* }\n\t*/\n\taxis_y2_tick_culling_max: 5,\n\t/**\n\t* Control visibility of tick lines within culling option, along with tick text.\n\t* @name axis․y2․tick․culling․lines\n\t* @memberof Options\n\t* @type {boolean}\n\t* @default true\n\t* @example\n\t* axis: {\n\t* y2: {\n\t* tick: {\n\t* culling: {\n\t* lines: false,\n\t* }\n\t* }\n\t* }\n\t* }\n\t*/\n\taxis_y2_tick_culling_lines: true,\n\t/**\n\t* Control culling start point to be reversed. If set to true, the culling will be started from the end to start.\n\t* - **NOTE:** This option is only available when `axis.y2.tick.culling` is set to truthy value.\n\t* @name axis․y2․tick․culling․reverse\n\t* @memberof Options\n\t* @type {boolean}\n\t* @default false\n\t* @example\n\t* axis: {\n\t* y2: {\n\t* tick: {\n\t* culling: {\n\t* reverse: true,\n\t* }\n\t* }\n\t* }\n\t* }\n\t*/\n\taxis_y2_tick_culling_reverse: false,\n\t/**\n\t* Set the axis tick line to be positioned inside of the chart.\n\t* @name axis․y2․tick․inner\n\t* @memberof Options\n\t* @type {boolean}\n\t* @default false\n\t* @see [Demo](https://naver.github.io/billboard.js/demo/#Axis.TickInner)\n\t* @example\n\t* axis: {\n\t* y2: {\n\t* tick: {\n\t* inner: true\n\t* }\n\t* }\n\t* }\n\t*/\n\taxis_y2_tick_inner: false,\n\t/**\n\t* Show or hide y2 axis outer tick.\n\t* @name axis․y2․tick․outer\n\t* @memberof Options\n\t* @type {boolean}\n\t* @default true\n\t* @example\n\t* axis: {\n\t* y2: {\n\t* tick: {\n\t* outer: false\n\t* }\n\t* }\n\t* }\n\t*/\n\taxis_y2_tick_outer: true,\n\t/**\n\t* Set y2 axis tick values manually.\n\t* @name axis․y2․tick․values\n\t* @memberof Options\n\t* @type {Array|function}\n\t* @default null\n\t* @example\n\t* axis: {\n\t* y2: {\n\t* tick: {\n\t* values: [100, 1000, 10000],\n\t*\n\t* // an Array value should be returned\n\t* values: function() {\n\t* \treturn [ ... ];\n\t* }\n\t* }\n\t* }\n\t* }\n\t*/\n\taxis_y2_tick_values: null,\n\t/**\n\t* Rotate y2 axis tick text.\n\t* - If you set negative value, it will rotate to opposite direction.\n\t* - Applied when [`axis.rotated`](#.axis%25E2%2580%25A4rotated) option is `true`.\n\t* @name axis․y2․tick․rotate\n\t* @memberof Options\n\t* @type {number}\n\t* @default 0\n\t* @example\n\t* axis: {\n\t* y2: {\n\t* tick: {\n\t* rotate: 60\n\t* }\n\t* }\n\t* }\n\t*/\n\taxis_y2_tick_rotate: 0,\n\t/**\n\t* Set the number of y2 axis ticks.\n\t* - **NOTE:** This works in the same way as axis.y.tick.count.\n\t* @name axis․y2․tick․count\n\t* @memberof Options\n\t* @type {number}\n\t* @default undefined\n\t* @example\n\t* axis: {\n\t* y2: {\n\t* tick: {\n\t* count: 5\n\t* }\n\t* }\n\t* }\n\t*/\n\taxis_y2_tick_count: void 0,\n\t/**\n\t* Show or hide y2 axis tick line.\n\t* @name axis․y2․tick․show\n\t* @memberof Options\n\t* @type {boolean}\n\t* @default true\n\t* @see [Demo](https://naver.github.io/billboard.js/demo/#Axis.HideTickLineText)\n\t* @example\n\t* axis: {\n\t* y2: {\n\t* tick: {\n\t* show: false\n\t* }\n\t* }\n\t* }\n\t*/\n\taxis_y2_tick_show: true,\n\t/**\n\t* Set axis tick step(interval) size.\n\t* - **NOTE:** Will be ignored if `axis.y2.tick.count` or `axis.y2.tick.values` options are set.\n\t* @name axis․y2․tick․stepSize\n\t* @memberof Options\n\t* @type {number}\n\t* @see [Demo](https://naver.github.io/billboard.js/demo/#Axis.StepSizeForYAxis)\n\t* @example\n\t* axis: {\n\t* y2: {\n\t* tick: {\n\t* // tick value will step as indicated interval value.\n\t* // ex) 'stepSize=15' ==> [0, 15, 30, 45, 60]\n\t* stepSize: 15\n\t* }\n\t* }\n\t* }\n\t*/\n\taxis_y2_tick_stepSize: null,\n\t/**\n\t* Show or hide y2 axis tick text.\n\t* @name axis․y2․tick․text․show\n\t* @memberof Options\n\t* @type {boolean}\n\t* @default true\n\t* @see [Demo](https://naver.github.io/billboard.js/demo/#Axis.HideTickLineText)\n\t* @example\n\t* axis: {\n\t* y2: {\n\t* tick: {\n\t* text: {\n\t* show: false\n\t* }\n\t* }\n\t* }\n\t* }\n\t*/\n\taxis_y2_tick_text_show: true,\n\t/**\n\t* Set the y2 Axis tick text's position relatively its original position\n\t* @name axis․y2․tick․text․position\n\t* @memberof Options\n\t* @type {object}\n\t* @default {x: 0, y:0}\n\t* @example\n\t* axis: {\n\t* y2: {\n\t* tick: {\n\t* text: {\n\t* position: {\n\t* x: 10,\n\t* y: 10\n\t* }\n\t* }\n\t* }\n\t* }\n\t* }\n\t*/\n\taxis_y2_tick_text_position: {\n\t\tx: 0,\n\t\ty: 0\n\t},\n\t/**\n\t* Set padding for y2 axis.<br><br>\n\t* You can set padding for y2 axis to create more space on the edge of the axis.\n\t* This option accepts object and it can include top and bottom. top, bottom will be treated as pixels.\n\t*\n\t* - **NOTE:**\n\t* - Given values are translated relative to the y2 Axis domain value for padding\n\t* - For area and bar type charts, [area.zerobased](#.area) or [bar.zerobased](#.bar) options should be set to 'false` to get padded bottom.\n\t* @name axis․y2․padding\n\t* @memberof Options\n\t* @type {object|number}\n\t* @default {}\n\t* @example\n\t* axis: {\n\t* y2: {\n\t* padding: {\n\t* top: 100,\n\t* bottom: 100\n\t* }\n\t*\n\t* // or set both values at once.\n\t* padding: 10\n\t* }\n\t*/\n\taxis_y2_padding: {},\n\t/**\n\t* Set default range of y2 axis.<br><br>\n\t* This option set the default value for y2 axis when there is no data on init.\n\t* @name axis․y2․default\n\t* @memberof Options\n\t* @type {Array}\n\t* @default undefined\n\t* @example\n\t* axis: {\n\t* y2: {\n\t* default: [0, 1000]\n\t* }\n\t* }\n\t*/\n\taxis_y2_default: void 0,\n\t/**\n\t* Set additional axes for y2 Axis.\n\t* - **NOTE:** Axis' scale is based on y2 Axis value if domain option isn't set.\n\t*\n\t* Each axis object should consist with following options:\n\t*\n\t* | Name | Type | Default | Description |\n\t* | --- | --- | --- | --- |\n\t* | domain | Array | - | Set the domain value |\n\t* | tick.outer | boolean | true | Show outer tick |\n\t* | tick.format | Function | - | Set formatter for tick text |\n\t* | tick.count | Number | - | Set the number of y axis ticks |\n\t* | tick.values | Array | - | Set tick values manually |\n\t* @name axis․y2․axes\n\t* @memberof Options\n\t* @type {Array}\n\t* @see [Demo](https://naver.github.io/billboard.js/demo/#Axis.MultiAxes)\n\t* @see [Demo: Domain](https://naver.github.io/billboard.js/demo/#Axis.MultiAxesDomain)\n\t* @example\n\t* y2: {\n\t* axes: [\n\t* {\n\t* // if set, will not be correlated with the main y2 Axis domain value\n\t* domain: [0, 1000],\n\t* tick: {\n\t* outer: false,\n\t* format: function(x) {\n\t* return x + \"%\";\n\t* },\n\t* count: 2,\n\t* values: [10, 20, 30]\n\t* }\n\t* },\n\t* ...\n\t* ]\n\t* }\n\t*/\n\taxis_y2_axes: []\n};\n//#endregion\nexport { y2_default as default };\n","/*!\n* Copyright (c) 2017 ~ present NAVER Corp.\r\n * billboard.js project is licensed under the MIT license\r\n * \r\n * billboard.js, JavaScript chart library\r\n * https://naver.github.io/billboard.js/\r\n * \r\n * @version 4.1.0\n*/\nimport x_default from \"./x.js\";\nimport y_default from \"./y.js\";\nimport y2_default from \"./y2.js\";\n//#region src/config/Options/axis/axis.ts\n/**\n* Copyright (c) 2017 ~ present NAVER Corp.\n* billboard.js project is licensed under the MIT license\n*/\n/**\n* y Axis config options\n*/\nvar axis_default = {\n\t/**\n\t* Setup the way to evaluate tick text size.\n\t* - **NOTE:**\n\t* - When setting `false` or a custom evaluator, it is highly recommended to memoize evaluated text dimension value to not degrade performance.\n\t* @name axis․evalTextSize\n\t* @memberof Options\n\t* @type {boolean|function}\n\t* @default true\n\t* @see [Demo](https://naver.github.io/billboard.js/demo/#Axis.AxisEvalTextSize)\n\t* @example\n\t* axis: {\n\t* // will evaluate getting text size every time.\n\t* evalTextSize: false,\n\t*\n\t* // set a custom evaluator\n\t* evalTextSize: function(textElement, axisId) {\n\t* // set some character to be evaluated\n\t* // NOTE: The dummy textElement is a descendant of given axisId('x', 'y' or 'y2').\n\t* textElement.textContent = \"0\";\n\t*\n\t* // get the size\n\t* const box = textElement.getBBox();\n\t*\n\t* // clear text\n\t* textElement.textContent = \"\";\n\t*\n\t* return { w: 7, h: 12};\n\t* },\n\t*\n\t* // set a custom evaluator by returning fixed value\n\t* evalTextSize: function(textElement, axisId) {\n\t* return {\n\t* x: {w: 7, h: 12},\n\t* y: {w: 15.75, h: 30},\n\t* y2: {w: 9.5, h: 18}\n\t* }[axisId];\n\t* }\n\t* }\n\t*/\n\taxis_evalTextSize: true,\n\t/**\n\t* Switch x and y axis position.\n\t* @name axis․rotated\n\t* @memberof Options\n\t* @type {boolean}\n\t* @default false\n\t* @example\n\t* axis: {\n\t* rotated: true\n\t* }\n\t*/\n\taxis_rotated: false,\n\t/**\n\t* Set axis tooltip.\n\t* - **NOTE:**\n\t* - When enabled, will disable default focus grid line.\n\t* - For `timeseries` x Axis, tooltip will be formatted using x Axis' tick format.\n\t* - For `category` x Axis, tooltip will be displaying scales' value text.\n\t* @name axis․tooltip\n\t* @memberof Options\n\t* @type {boolean}\n\t* @default false\n\t* @property {object} axis Axis object\n\t* @property {boolean} [axis.tooltip=false] Show tooltip or not.\n\t* @property {string|object} [axis.tooltip.backgroundColor] Set axis tooltip text background colors.\n\t* @see [Demo](https://naver.github.io/billboard.js/demo/#Axis.AxisTooltip)\n\t* @example\n\t* axis: {\n\t* tooltip: true, // default background color is\n\t*\n\t* // set background color for axis tooltip texts\n\t* tooltip: {\n\t* backgroundColor: \"red\",\n\t*\n\t* // set different background colors per axes\n\t* // NOTE: In this case, only specified axes tooltip will appear.\n\t* backgroundColor: {\n\t* x: \"green\",\n\t* y: \"yellow\",\n\t* y2: \"red\"\n\t* }\n\t* }\n\t* }\n\t*/\n\taxis_tooltip: false,\n\t...x_default,\n\t...y_default,\n\t...y2_default\n};\n//#endregion\nexport { axis_default as default };\n","/*!\n* Copyright (c) 2017 ~ present NAVER Corp.\r\n * billboard.js project is licensed under the MIT license\r\n * \r\n * billboard.js, JavaScript chart library\r\n * https://naver.github.io/billboard.js/\r\n * \r\n * @version 4.1.0\n*/\n//#region src/config/Options/data/axis.ts\n/**\n* Axis based chart data config options\n*/\nvar axis_default = {\n\t/**\n\t* Specify the keys of the x values for each data.<br><br>\n\t* This option can be used if we want to show the data that has different x values.\n\t* @name data․xs\n\t* @memberof Options\n\t* @type {object}\n\t* @default {}\n\t* @example\n\t* data: {\n\t* xs: {\n\t* data1: \"x1\",\n\t* data2: \"x2\"\n\t* }\n\t* }\n\t*/\n\tdata_xs: {},\n\t/**\n\t* Set a format specifier to parse string specified as x.\n\t* @name data․xFormat\n\t* @memberof Options\n\t* @type {string}\n\t* @default %Y-%m-%d\n\t* @example\n\t* data: {\n\t* x: \"x\",\n\t* columns: [\n\t* [\"x\", \"01012019\", \"02012019\", \"03012019\"],\n\t* [\"data1\", 30, 200, 100]\n\t* ],\n\t* // Format specifier to parse as datetime for given 'x' string value\n\t* xFormat: \"%m%d%Y\"\n\t* },\n\t* axis: {\n\t* x: {\n\t* type: \"timeseries\"\n\t* }\n\t* }\n\t* @see [D3's time specifier](https://d3js.org/d3-time-format#locale_format)\n\t*/\n\tdata_xFormat: \"%Y-%m-%d\",\n\t/**\n\t* Set localtime format to parse x axis.\n\t* @name data․xLocaltime\n\t* @memberof Options\n\t* @type {boolean}\n\t* @default true\n\t* @example\n\t* data: {\n\t* xLocaltime: false\n\t* }\n\t*/\n\tdata_xLocaltime: true,\n\t/**\n\t* Sort on x axis.\n\t* - **NOTE:** This option works for lineish(area/line/spline/step) types only.\n\t* @name data․xSort\n\t* @memberof Options\n\t* @type {boolean}\n\t* @default true\n\t* @see [Demo](https://naver.github.io/billboard.js/demo/#Data.DataXSort)\n\t* @example\n\t* data: {\n\t* xSort: false,\n\t* x: \"x\",\n\t* columns: [\n\t* // The line graph will start to be drawn following the x axis sequence\n\t* // Below data, will start drawing x=1: 200, x=2: 300, x=3: 100\n\t* [\"x\", 3, 1, 2],\n\t* [\"data1\", 100, 200, 300]\n\t* ]\n\t* }\n\t*/\n\tdata_xSort: true,\n\t/**\n\t* Set y axis the data related to. y and y2 can be used.\n\t* - **NOTE:** If all data is related to one of the axes, the domain of axis without related data will be replaced by the domain from the axis with related data\n\t* @name data․axes\n\t* @memberof Options\n\t* @type {object}\n\t* @default {}\n\t* @example\n\t* data: {\n\t* axes: {\n\t* data1: \"y\",\n\t* data2: \"y2\"\n\t* }\n\t* }\n\t*/\n\tdata_axes: {},\n\t/**\n\t* Define regions for each data.<br>\n\t* The values must be an array for each data and it should include an object that has `start`, `end` and `style`.\n\t* - The object type should be as:\n\t* - start {number}: Start data point number. If not set, the start will be the first data point.\n\t* - [end] {number}: End data point number. If not set, the end will be the last data point.\n\t* - [style.dasharray=\"2 2\"] {string}: The first number specifies a distance for the filled area, and the second a distance for the unfilled area.\n\t* - **NOTE:**\n\t* - Supports only line type.\n\t* - `start` and `end` values should be in the exact x value range.\n\t* - Dashes will be applied using `stroke-dasharray` css property when data doesn't contain nullish value(or nullish value with `line.connectNull=true` set).\n\t* - Dashes will be applied via path command when data contains nullish value.\n\t* @name data․regions\n\t* @memberof Options\n\t* @type {object}\n\t* @default {}\n\t* @example\n\t* data: {\n\t* regions: {\n\t* data1: [{\n\t* start: 1,\n\t* end: 2,\n\t* style: {\n\t* dasharray: \"5 2\"\n\t* }\n\t* }, {\n\t* start: 3\n\t* }],\n\t* ...\n\t* }\n\t* }\n\t*/\n\tdata_regions: {},\n\t/**\n\t* Set the stacking to be normalized\n\t* - **NOTE:**\n\t* - For stacking, '[data.groups](#.data%25E2%2580%25A4groups)' option should be set\n\t* - y Axis will be set in percentage value (0 ~ 100%)\n\t* - Must have positive values\n\t* - Data not in any group will not be normalized when using perGroup option\n\t* @name data․stack․normalize\n\t* @memberof Options\n\t* @type {boolean|object}\n\t* @default false\n\t* @see [Demo: Data Stack Normalized](https://naver.github.io/billboard.js/demo/#Data.DataStackNormalized)\n\t* @see [Demo: Data Stack Normalized per Group](https://naver.github.io/billboard.js/demo/#Data.DataStackNormalizedGroup)\n\t* @example\n\t* data: {\n\t* stack: {\n\t* // Normalize all grouped data together (all groups combined to 0-100%)\n\t* normalize: true\n\t*\n\t* // Normalize per group (each group independently becomes 0-100%)\n\t* // Data not in any group will display with their original values.\n\t* // If non-grouped data shares the same axis (e.g., y), it will be\n\t* // displayed on the 0-100 absolute scale. To display original values,\n\t* // assign them to a separate axis (e.g., y2).\n\t* normalize: {\n\t* perGroup: true\n\t* }\n\t* },\n\t* groups: [\n\t* [\"data1\", \"data2\"] // This group will be normalized to 0-100%\n\t* ],\n\t* // data3 is not in any group, so it displays original values\n\t* // Assign it to y2 axis to use a separate scale\n\t* axes: {\n\t* data3: \"y2\"\n\t* }\n\t* },\n\t* axis: {\n\t* y2: {\n\t* show: true\n\t* }\n\t* }\n\t*/\n\tdata_stack_normalize: false\n};\n//#endregion\nexport { axis_default as default };\n","/*!\n* Copyright (c) 2017 ~ present NAVER Corp.\r\n * billboard.js project is licensed under the MIT license\r\n * \r\n * billboard.js, JavaScript chart library\r\n * https://naver.github.io/billboard.js/\r\n * \r\n * @version 4.1.0\n*/\nimport axis_default from \"../../Chart/api/axis.js\";\nimport group_default from \"../../Chart/api/group.js\";\nimport x_default from \"../../Chart/api/x.js\";\nimport Axis_default from \"../../ChartInternal/Axis/Axis.js\";\nimport eventrect_default from \"../../ChartInternal/interactions/eventrect.js\";\nimport clip_default from \"../../ChartInternal/internals/clip.js\";\nimport size_axis_default from \"../../ChartInternal/internals/size.axis.js\";\nimport axis_default$1 from \"../Options/axis/axis.js\";\nimport axis_default$2 from \"../Options/data/axis.js\";\n//#region src/config/resolver/axis.ts\n/**\n* Copyright (c) 2017 ~ present NAVER Corp.\n* billboard.js project is licensed under the MIT license\n*/\n/**\n* Modules exports for Axis based chart\n*/\nconst api = [\n\taxis_default,\n\tgroup_default,\n\tx_default\n];\nconst internal = {\n\taxis: Axis_default,\n\tclip: clip_default,\n\teventrect: eventrect_default,\n\tsizeAxis: size_axis_default\n};\nconst options = {\n\toptDataAxis: axis_default$2,\n\toptAxis: axis_default$1\n};\n//#endregion\nexport { api, internal, options };\n","/*!\n* Copyright (c) 2017 ~ present NAVER Corp.\r\n * billboard.js project is licensed under the MIT license\r\n * \r\n * billboard.js, JavaScript chart library\r\n * https://naver.github.io/billboard.js/\r\n * \r\n * @version 4.1.0\n*/\nimport { extend } from \"../../module/util/object.js\";\nimport Options from \"../Options/Options.js\";\nimport ChartInternal from \"../../ChartInternal/ChartInternal.js\";\nimport Chart from \"../../Chart/Chart.js\";\nimport { api, internal, options } from \"./axis.js\";\n//#region src/config/resolver/axis.core.ts\n/**\n* Copyright (c) 2017 ~ present NAVER Corp.\n* billboard.js project is licensed under the MIT license\n*/\n/**\n* Get object values without requiring Object.values().\n* @param {object} obj Source object\n* @returns {Array} Object values\n* @private\n*/\nfunction getValues(obj) {\n\treturn Object.keys(obj).map((key) => obj[key]);\n}\n/**\n* Extend shared axis modules without importing renderer-specific shape modules.\n* @param {Array} module Internal modules\n* @param {Array} option Option modules\n* @private\n*/\nfunction extendAxisModules(module = [], option = []) {\n\textend(ChartInternal.prototype, getValues(internal).concat(module));\n\textend(Chart.prototype, api);\n\tOptions.setOptions(getValues(options).concat(option));\n}\n//#endregion\nexport { extendAxisModules };\n","/*!\n* Copyright (c) 2017 ~ present NAVER Corp.\r\n * billboard.js project is licensed under the MIT license\r\n * \r\n * billboard.js, JavaScript chart library\r\n * https://naver.github.io/billboard.js/\r\n * \r\n * @version 4.1.0\n*/\nimport point_default from \"../../../ChartInternal/shape/core/point.js\";\nimport line_default from \"../../../ChartInternal/shape/line.js\";\nimport point_default$1 from \"../../../ChartInternal/shape/point.js\";\nimport point_default$2 from \"../../Options/common/point.js\";\nimport line_default$1 from \"../../Options/shape/line.js\";\nimport { extendAxisModules } from \"../axis.core.js\";\n//#region src/config/resolver/shape/axis.helpers.ts\n/**\n* Copyright (c) 2017 ~ present NAVER Corp.\n* billboard.js project is licensed under the MIT license\n*/\n/**\n* Extend Axis\n* @param {Array<object>} module Module to be extended\n* @param {Array<object>} option Option object to be extended\n* @private\n*/\nfunction extendAxis(module = [], option = []) {\n\textendAxisModules(module, option);\n}\n/**\n* Extend Line type modules\n* @param {object|Array<object>} module Module to be extended\n* @param {Array<object>} option Option object to be extended\n* @private\n*/\nfunction extendLine(module, option = []) {\n\textendAxisModules([\n\t\tpoint_default,\n\t\tpoint_default$1,\n\t\tline_default\n\t].concat(Array.isArray(module) ? module : module ? [module] : []), [point_default$2, line_default$1].concat(option));\n}\n//#endregion\nexport { extendAxis, extendLine };\n","/*!\n* Copyright (c) 2017 ~ present NAVER Corp.\r\n * billboard.js project is licensed under the MIT license\r\n * \r\n * billboard.js, JavaScript chart library\r\n * https://naver.github.io/billboard.js/\r\n * \r\n * @version 4.1.0\n*/\nimport { isNumber } from \"../../../module/util/type-checks.js\";\n//#region src/ChartInternal/shape/core/barRadius.ts\n/**\n* Copyright (c) 2017 ~ present NAVER Corp.\n* billboard.js project is licensed under the MIT license\n*/\nconst RE_PATH_NUMBER = /[-+]?(?:\\d+\\.?\\d*|\\.?\\d+)(?:[eE][-+]?\\d+)?/g;\nconst RE_PATH_TOKEN = /([aAcChHlLmMqQsStTvVzZ])|([-+]?(?:\\d+\\.?\\d*|\\.?\\d+)(?:[eE][-+]?\\d+)?)/g;\n/**\n* Collect the ordinal indexes of numeric tokens that are SVG arc-command flags.\n* Arc parameters repeat in groups of 7: rx ry x-rotation large-arc sweep x y.\n* Positions 2(x-rotation), 3(large-arc) and 4(sweep) must stay integers.\n* @param {string} path Path string to scan\n* @returns {Set} Ordinal indexes (in number order) of arc flag tokens\n* @private\n*/\nfunction getArcFlagTokenIndexes(path) {\n\tconst flags = /* @__PURE__ */ new Set();\n\tlet numIndex = -1;\n\tlet argIndex = 0;\n\tlet inArc = false;\n\tlet token;\n\tRE_PATH_TOKEN.lastIndex = 0;\n\twhile (token = RE_PATH_TOKEN.exec(path)) if (token[1]) {\n\t\tinArc = token[1] === \"a\" || token[1] === \"A\";\n\t\targIndex = 0;\n\t} else {\n\t\tnumIndex++;\n\t\tif (inArc) {\n\t\t\tconst pos = argIndex % 7;\n\t\t\tif (pos === 2 || pos === 3 || pos === 4) flags.add(numIndex);\n\t\t\targIndex++;\n\t\t}\n\t}\n\treturn flags;\n}\n/**\n* Build a path interpolator that behaves like d3's string interpolator but\n* snaps SVG arc flags to valid integers, preventing malformed paths during\n* bar transitions (ex. chart.load() with bar.radius). See #4166.\n* @param {string} a Start path\n* @param {string} b Target path\n* @returns {function} Interpolator returning a valid path for progress t\n* @private\n*/\nfunction getBarPathInterpolator(a, b) {\n\tconst flagSet = getArcFlagTokenIndexes(b);\n\tconst segments = [];\n\tconst interpolators = [];\n\tlet bIndex = 0;\n\tlet segIndex = -1;\n\tlet numIndex = -1;\n\tlet am;\n\tlet bm;\n\tconst append = (text) => {\n\t\tif (segments[segIndex]) segments[segIndex] += text;\n\t\telse segments[++segIndex] = text;\n\t};\n\tRE_PATH_NUMBER.lastIndex = 0;\n\tconst reA = RE_PATH_NUMBER;\n\tconst reB = new RegExp(RE_PATH_NUMBER.source, \"g\");\n\ta += \"\";\n\tb += \"\";\n\twhile ((am = reA.exec(a)) && (bm = reB.exec(b))) {\n\t\tnumIndex++;\n\t\tif (bm.index > bIndex) append(b.slice(bIndex, bm.index));\n\t\tif (am[0] === bm[0]) append(bm[0]);\n\t\telse {\n\t\t\tconst from = +am[0];\n\t\t\tconst to = +bm[0];\n\t\t\tconst isFlag = flagSet.has(numIndex);\n\t\t\tsegments[++segIndex] = null;\n\t\t\tinterpolators.push({\n\t\t\t\tindex: segIndex,\n\t\t\t\tfn: isFlag ? (t) => Math.round(from + (to - from) * t) : (t) => from + (to - from) * t\n\t\t\t});\n\t\t}\n\t\tbIndex = reB.lastIndex;\n\t}\n\tif (bIndex < b.length) append(b.slice(bIndex));\n\tif (!interpolators.length) {\n\t\tconst result = segments.join(\"\");\n\t\treturn () => result;\n\t}\n\treturn (t) => {\n\t\tfor (let i = 0, len = interpolators.length; i < len; i++) {\n\t\t\tconst { index, fn } = interpolators[i];\n\t\t\tsegments[index] = String(fn(t));\n\t\t}\n\t\treturn segments.join(\"\");\n\t};\n}\n/**\n* Get the configured bar corner radius resolver.\n* @param {object} $$ ChartInternal instance\n* @returns {function|null} Radius resolver\n* @private\n*/\nfunction getBarRadiusResolver($$) {\n\tconst { bar_radius: radius, bar_radius_ratio: ratio } = $$.config;\n\treturn isNumber(radius) && radius > 0 ? () => radius : isNumber(ratio) ? (width) => width * ratio : null;\n}\n/**\n* Get stacked bar rows that should receive rounded bar-end corners.\n* @param {object} $$ ChartInternal instance\n* @returns {Set} Radius row keys\n* @private\n*/\nfunction getStackingBarRadiusSet($$) {\n\tconst { config, data } = $$;\n\tconst set = /* @__PURE__ */ new Set();\n\tif (!config.data_groups.length) return set;\n\tconst orderedTargets = $$.orderTargets($$.filterTargetsToShow(data.targets.filter($$.isBarType, $$)));\n\tfor (const group of config.data_groups) {\n\t\tconst ids = new Set(group);\n\t\tconst lastPosByIndex = /* @__PURE__ */ new Map();\n\t\tconst lastNegByIndex = /* @__PURE__ */ new Map();\n\t\tfor (const target of orderedTargets) {\n\t\t\tif (!ids.has(target.id)) continue;\n\t\t\tfor (const d of target.values) {\n\t\t\t\tif (d.value === null || d.value === 0) continue;\n\t\t\t\t(d.value > 0 ? lastPosByIndex : lastNegByIndex).set(d.index, target.id);\n\t\t\t}\n\t\t}\n\t\tfor (const [index, id] of lastPosByIndex) set.add(`${id}:${index}`);\n\t\tfor (const [index, id] of lastNegByIndex) set.add(`${id}:${index}`);\n\t}\n\treturn set;\n}\n/**\n* Get canvas/SVG corner flags for the rounded bar edge.\n* @param {boolean} isRotated Whether axis is rotated\n* @param {boolean} isNegative Whether the bar direction is negative\n* @param {number} radius Radius value\n* @returns {number|object} Corner radius map\n* @private\n*/\nfunction getBarRadiusCorners(isRotated, isNegative, radius) {\n\tif (!radius) return 0;\n\treturn isRotated ? isNegative ? {\n\t\ttl: radius,\n\t\tbl: radius\n\t} : {\n\t\ttr: radius,\n\t\tbr: radius\n\t} : isNegative ? {\n\t\tbr: radius,\n\t\tbl: radius\n\t} : {\n\t\ttl: radius,\n\t\ttr: radius\n\t};\n}\n/**\n* Get SVG clip-path inset for radius arcs that exceed the bar shape.\n* @param {Array} init Initial render coordinate\n* @param {number} pos Rounded edge position\n* @param {boolean} isRotated Whether axis is rotated\n* @param {boolean} isNegative Whether the bar direction is negative\n* @returns {string|null} Clip-path value\n* @private\n*/\nfunction getBarRadiusClipPath(init, pos, isRotated, isNegative) {\n\tlet clipPath = \"\";\n\tif (isRotated) {\n\t\tif (isNegative && init[0] < pos) clipPath = `0 ${pos - init[0]}px 0 0`;\n\t\telse if (!isNegative && init[0] > pos) clipPath = `0 0 0 ${init[0] - pos}px`;\n\t} else if (isNegative && init[1] > pos) clipPath = `${init[1] - pos}px 0 0 0`;\n\telse if (!isNegative && init[1] < pos) clipPath = `0 0 ${pos - init[1]}px 0`;\n\treturn clipPath ? `inset(${clipPath})` : null;\n}\n/**\n* Get shared rounded bar geometry that renderers can translate to their own primitives.\n* @param {object} $$ ChartInternal instance\n* @param {object} d Data row\n* @param {Array} points Shared bar points\n* @param {function|null} getRadius Radius resolver\n* @param {Set} stackingRadiusSet Stacked radius row keys\n* @param {function} isStackingRadiusData Optional fallback for hidden SVG bars\n* @returns {object} Rounded bar geometry\n* @private\n*/\nfunction getBarRadiusInfo($$, d, points, getRadius, stackingRadiusSet, isStackingRadiusData) {\n\tconst { config, state } = $$;\n\tconst isRotated = config.axis_rotated;\n\tconst indexX = +isRotated;\n\tconst indexY = +!indexX;\n\tconst isUnderZero = d.value < 0;\n\tconst isInverted = config[`axis_${$$.axis.getId(d.id)}_inverted`];\n\tconst isNegative = !isInverted && isUnderZero || isInverted && !isUnderZero;\n\tconst isGrouped = $$.isGrouped(d.id);\n\tconst isRadiusData = getRadius && isGrouped && d.value !== 0 ? state.hiddenTargetIds.has(d.id) && isStackingRadiusData ? isStackingRadiusData(d) : stackingRadiusSet.has(`${d.id}:${d.index}`) : false;\n\tconst init = [points[0][indexX], points[0][indexY]];\n\tlet radius = 0;\n\tif (getRadius) {\n\t\tconst index = isRotated ? indexY : indexX;\n\t\tconst barW = Math.abs(points[2][index] - points[0][index]);\n\t\tradius = Math.max(0, !isGrouped || isRadiusData ? getRadius(barW) : 0);\n\t}\n\tconst pos = isRotated ? points[1][indexX] + (isNegative ? radius : -radius) : points[1][indexY] + (isNegative ? -radius : radius);\n\treturn {\n\t\tradius,\n\t\tcorners: getBarRadiusCorners(isRotated, isNegative, radius),\n\t\tclipPath: radius ? getBarRadiusClipPath(init, pos, isRotated, isNegative) : null,\n\t\tindexX,\n\t\tindexY,\n\t\tisNegative,\n\t\tpos\n\t};\n}\n//#endregion\nexport { getBarPathInterpolator, getBarRadiusInfo, getBarRadiusResolver, getStackingBarRadiusSet };\n","/*!\n* Copyright (c) 2017 ~ present NAVER Corp.\r\n * billboard.js project is licensed under the MIT license\r\n * \r\n * billboard.js, JavaScript chart library\r\n * https://naver.github.io/billboard.js/\r\n * \r\n * @version 4.1.0\n*/\nimport { isNumber } from \"../../module/util/type-checks.js\";\nimport { getRandom } from \"../../module/util/object.js\";\nimport { $BAR, $COMMON } from \"../../config/classes.js\";\nimport { getShapeColorWithGradient, updateTargetsForShape } from \"./shape.js\";\nimport { getBarPathInterpolator, getBarRadiusInfo, getBarRadiusResolver, getStackingBarRadiusSet } from \"./core/barRadius.js\";\nimport { select } from \"d3-selection\";\n//#region src/ChartInternal/shape/bar.ts\n/**\n* Copyright (c) 2017 ~ present NAVER Corp.\n* billboard.js project is licensed under the MIT license\n*/\n/**\n* Get the type of connect line for bar chart\n* @param {string} id Data id\n* @returns {string|null} Connect line type or null if not applicable\n* @private\n*/\nfunction _getConnectLineType(id) {\n\tconst connectLine = this.config.bar_connectLine;\n\tconst type = connectLine?.[id] || connectLine;\n\treturn /^(start|end)\\-(start|end)$/.test(type) ? type : null;\n}\nvar bar_default = {\n\tinitBar() {\n\t\tconst { $el, config, state: { clip } } = this;\n\t\t$el.bar = $el.main.select(`.${$COMMON.chart}`);\n\t\t$el.bar = config.bar_front ? $el.bar.append(\"g\") : $el.bar.insert(\"g\", \":first-child\");\n\t\t$el.bar.attr(\"class\", $BAR.chartBars).call(this.setCssRule(false, `.${$BAR.chartBars}`, [\"pointer-events:none\"]));\n\t\tif (config.clipPath === false && (config.bar_radius || config.bar_radius_ratio)) $el.bar.attr(\"clip-path\", clip.pathXAxis.replace(/#[^)]*/, `#${clip.id}`));\n\t},\n\tupdateTargetsForBar(targets) {\n\t\tconst $$ = this;\n\t\tconst { config } = $$;\n\t\tconst classBars = $$.getClass(\"bars\", true);\n\t\tconst isSelectable = config.interaction_enabled && config.data_selection_isselectable;\n\t\tupdateTargetsForShape.call($$, targets, {\n\t\t\ttype: \"Bar\",\n\t\t\telKey: \"bar\",\n\t\t\tcontainerClass: $BAR.chartBars,\n\t\t\titemClass: $BAR.chartBar,\n\t\t\tinitFn: $$.initBar\n\t\t}).append(\"g\").attr(\"class\", classBars).style(\"cursor\", (d) => isSelectable?.bind?.($$.api)(d) ? \"pointer\" : null).call((selection) => {\n\t\t\t$$.setCssRule(true, ` .${$BAR.bar}`, [\"fill\"], $$.color)(selection);\n\t\t\tselection.each(function(d) {\n\t\t\t\tif (_getConnectLineType.call($$, d.id)) select(this).append(\"path\").attr(\"class\", $BAR.barConnectLine);\n\t\t\t});\n\t\t});\n\t},\n\t/**\n\t* Generate/Update elements\n\t* @param {boolean} withTransition Transition for exit elements\n\t* @param {boolean} isSub Subchart draw\n\t* @private\n\t*/\n\tupdateBar(withTransition, isSub = false) {\n\t\tconst $$ = this;\n\t\tif ($$.state.isCanvasMode) return;\n\t\tconst { config, $el, $T } = $$;\n\t\tconst $root = isSub ? $el.subchart : $el;\n\t\tconst classBar = $$.getClass(\"bar\", true);\n\t\tconst initialOpacity = $$.initialOpacity.bind($$);\n\t\tconfig.bar_linearGradient && $$.updateLinearGradient();\n\t\tconst bar = $root.main.selectAll(`.${$BAR.bars}`).selectAll(`.${$BAR.bar}`).data($$.labelishData.bind($$));\n\t\t$T(bar.exit(), withTransition).style(\"opacity\", \"0\").remove();\n\t\t$root.bar = bar.enter().append(\"path\").attr(\"class\", classBar).style(\"fill\", $$.generateUpdateBarColor()).merge(bar).style(\"opacity\", initialOpacity);\n\t\t$$.setRatioForGroupedData($root.bar.data());\n\t},\n\t/**\n\t* Generate bar color accessor, hoisting the bound color function\n\t* to be created once per call (not per datum)\n\t* @returns {function} Color accessor\n\t* @private\n\t*/\n\tgenerateUpdateBarColor() {\n\t\tconst $$ = this;\n\t\tconst fn = $$.getStylePropValue($$.color) || (() => null);\n\t\treturn (d) => getShapeColorWithGradient.call($$, d, \"bar_linearGradient\", fn);\n\t},\n\t/**\n\t* Update bar color\n\t* @param {object} d Data object\n\t* @returns {string} Color string\n\t* @private\n\t*/\n\tupdateBarColor(d) {\n\t\treturn this.generateUpdateBarColor()(d);\n\t},\n\t/**\n\t* Redraw function\n\t* @param {function} drawFn Retuned function from .getDrawShape() => .generateDrawBar()\n\t* @param {boolean} withTransition With or without transition\n\t* @param {boolean} isSub Subchart draw\n\t* @returns {Array}\n\t* @private\n\t*/\n\tredrawBar(drawFn, withTransition, isSub = false) {\n\t\tconst $$ = this;\n\t\tif ($$.state.isCanvasMode) return [];\n\t\tconst { bar } = isSub ? $$.$el.subchart : $$.$el;\n\t\tconst barPath = [];\n\t\tconst connectLineCache = /* @__PURE__ */ new Map();\n\t\tconst getRadius = getBarRadiusResolver($$);\n\t\tconst barColor = $$.generateUpdateBarColor();\n\t\tconst getBarPath = function(d, i, arr) {\n\t\t\tconst path = isNumber(d.value) || $$.isBarRangeType(d) || $$.isSubchartCandlestickBarValue?.(d, isSub) ? drawFn(d, i) : [\"\"];\n\t\t\tlet connectLineType = connectLineCache.get(d.id);\n\t\t\tif (connectLineType === void 0) {\n\t\t\t\tconnectLineType = _getConnectLineType.call($$, d.id);\n\t\t\t\tconnectLineCache.set(d.id, connectLineType);\n\t\t\t}\n\t\t\tif (path.length > 1) barPath.push(path[1]);\n\t\t\tif (i === arr.length - 1 && barPath.length) {\n\t\t\t\tconst barConnectLineNode = $$.$T(select(this.parentNode.querySelector(`.${$BAR.barConnectLine}`)), withTransition, getRandom());\n\t\t\t\t$$.updateConnectLine(barConnectLineNode, connectLineType, barPath);\n\t\t\t\tbarPath.splice(0);\n\t\t\t}\n\t\t\treturn path[0];\n\t\t};\n\t\tconst barTransition = $$.$T(bar, withTransition, getRandom());\n\t\tif (getRadius && typeof barTransition.attrTween === \"function\") barTransition.attrTween(\"d\", function(d, i, arr) {\n\t\t\tconst target = getBarPath.call(this, d, i, arr);\n\t\t\treturn getBarPathInterpolator(this.getAttribute(\"d\") ?? \"\", target);\n\t\t});\n\t\telse barTransition.attr(\"d\", getBarPath);\n\t\treturn [barTransition.style(\"fill\", (d) => $$.getSubchartCandlestickBarColor?.(d, isSub) || barColor(d)).style(\"clip-path\", (d) => d.clipPath).style(\"opacity\", null)];\n\t},\n\t/**\n\t* Generate draw function\n\t* @param {object} barIndices data order within x axis.\n\t* barIndices ==> {data1: 0, data2: 0, data3: 1, data4: 1, __max__: 1}\n\t*\n\t* When gropus given as:\n\t* groups: [\n\t* \t\t[\"data1\", \"data2\"],\n\t* \t\t[\"data3\", \"data4\"]\n\t* \t],\n\t*\n\t* Will be rendered as:\n\t* \t\tdata1 data3 data1 data3\n\t* \t\tdata2 data4 data2 data4\n\t* \t\t-------------------------\n\t* \t\t\t 0 1\n\t* @param {boolean} isSub If is for subchart\n\t* @returns {function}\n\t* @private\n\t*/\n\tgenerateDrawBar(barIndices, isSub) {\n\t\tconst $$ = this;\n\t\tconst { config } = $$;\n\t\tconst getPoints = $$.generateGetBarPoints(barIndices, isSub);\n\t\tconst getRadius = getBarRadiusResolver($$);\n\t\tconst stackingRadiusSet = getRadius ? getStackingBarRadiusSet($$) : /* @__PURE__ */ new Set();\n\t\tconst connectLineCache = /* @__PURE__ */ new Map();\n\t\treturn (d, i) => {\n\t\t\tconst points = getPoints(d, i);\n\t\t\tconst { indexX, indexY, isNegative, pos, radius, clipPath } = getBarRadiusInfo($$, d, points, getRadius, stackingRadiusSet, $$.isStackingRadiusData.bind($$));\n\t\t\tconst pathRadius = [\"\", \"\"];\n\t\t\td.clipPath = clipPath;\n\t\t\tif (getRadius) {\n\t\t\t\tconst arc = `a${radius} ${radius} ${isNegative ? \"1 0 0\" : \"0 0 1\"} `;\n\t\t\t\tpathRadius[indexY] = `${arc}${radius},${radius}`;\n\t\t\t\tpathRadius[indexX] = `${arc}${[-radius, radius][config.axis_rotated ? \"sort\" : \"reverse\"]()}`;\n\t\t\t\tisNegative && pathRadius.reverse();\n\t\t\t}\n\t\t\tconst path = config.axis_rotated ? `H${pos} ${pathRadius[0]}V${points[2][indexY] - radius} ${pathRadius[1]}H${points[3][indexX]}` : `V${pos} ${pathRadius[0]}H${points[2][indexX] - radius} ${pathRadius[1]}V${points[3][indexY]}`;\n\t\t\tconst coords = [`M${points[0][indexX]},${points[0][indexY]}${path}z`];\n\t\t\tlet connectLineType = connectLineCache.get(d.id);\n\t\t\tif (connectLineType === void 0) {\n\t\t\t\tconnectLineType = _getConnectLineType.call($$, d.id);\n\t\t\t\tconnectLineCache.set(d.id, connectLineType);\n\t\t\t}\n\t\t\tif (connectLineType) coords.push(config.axis_rotated ? {\n\t\t\t\tx: points[0][indexX],\n\t\t\t\ty: points[0][indexY],\n\t\t\t\twidth: points[0][indexX] - pos,\n\t\t\t\theight: points[2][indexY] - points[0][indexY]\n\t\t\t} : {\n\t\t\t\tx: points[0][indexX],\n\t\t\t\ty: pos,\n\t\t\t\twidth: points[2][indexX] - points[0][indexX],\n\t\t\t\theight: points[3][indexY] - pos\n\t\t\t});\n\t\t\treturn coords;\n\t\t};\n\t},\n\t/**\n\t* Determine if given stacking bar data is radius type\n\t* @param {object} d Data row\n\t* @returns {boolean}\n\t*/\n\tisStackingRadiusData(d) {\n\t\tconst $$ = this;\n\t\tconst { $el, config, data, state } = $$;\n\t\tconst { id, index, value } = d;\n\t\tif (state.hiddenTargetIds.has(id)) {\n\t\t\tconst target = $el.bar.filter((d) => d.id === id && d.value === value);\n\t\t\treturn !target.empty() && /a\\d+/i.test(target.attr(\"d\"));\n\t\t}\n\t\tconst keys = config.data_groups.find((v) => v.indexOf(id) > -1);\n\t\tconst sortedIds = $$.orderTargets($$.filterTargetsToShow(data.targets.filter($$.isBarType, $$))).filter((v) => keys.indexOf(v.id) > -1).map((v) => {\n\t\t\tconst v2 = v.values[index];\n\t\t\tif (v2 && (isNumber(value) && value > 0 ? v2.value > 0 : v2.value < 0)) return v2;\n\t\t}).filter(Boolean).map((v) => v.id);\n\t\treturn value !== 0 && sortedIds.indexOf(id) === sortedIds.length - 1;\n\t},\n\t/**\n\t* Update the bar connect line path\n\t* @param {d3Selection} node d3 selection of bar connect line\n\t* @param {string} type Type of connect line, one of \"start-start\", \"start-end\", \"end-start\", \"end-end\"\n\t* @param {Array} barPath d3 path data for the bar\n\t*/\n\tupdateConnectLine(node, type, barPath) {\n\t\tconst path = barPath.map((v, i, arr) => {\n\t\t\tconst isRotated = this.config.axis_rotated;\n\t\t\tconst isStart = /^start-(start|end)$/.test(type);\n\t\t\tconst isEnd = /^end-(start|end)$/.test(type);\n\t\t\tconst path = [];\n\t\t\tconst x = isRotated ? isEnd ? v.x - v.width : v.x : v.x + v.width;\n\t\t\tconst y = isRotated ? v.y + v.height : isStart ? v.y + v.height : v.y;\n\t\t\tif (i === 0) path.push(`${x},${y}`);\n\t\t\telse {\n\t\t\t\tpath.push(isRotated ? `L${v.x - (/\\w+-end$/.test(type) ? v.width : 0)},${v.y}` : `L${v.x},${v.y + (/\\w+-start$/.test(type) ? v.height : 0)}`);\n\t\t\t\tif (i < arr.length - 1) path.push(`M${x},${y}`);\n\t\t\t}\n\t\t\treturn path.join(\" \");\n\t\t});\n\t\tnode.attr(\"d\", `M${path.join(\"\")}z`);\n\t}\n};\n//#endregion\nexport { bar_default as default };\n","/*!\n* Copyright (c) 2017 ~ present NAVER Corp.\r\n * billboard.js project is licensed under the MIT license\r\n * \r\n * billboard.js, JavaScript chart library\r\n * https://naver.github.io/billboard.js/\r\n * \r\n * @version 4.1.0\n*/\n//#region src/config/Options/shape/bar.ts\n/**\n* bar config options\n*/\nvar bar_default = {\n\t/**\n\t* Set bar options\n\t* @name bar\n\t* @memberof Options\n\t* @type {object}\n\t* @property {object} bar Bar object\n\t* @property {boolean} [bar.front=false] Set 'bar' to be positioned over(on the top) other shapes elements.\n\t* @property {number} [bar.indices.removeNull=false] Remove nullish data on bar indices positions.\n\t* @property {number} [bar.label.threshold=0] Set threshold ratio to show/hide labels.\n\t* @property {boolean|object} [bar.linearGradient=false] Set the linear gradient on bar.<br><br>\n\t* Or customize by giving below object value:\n\t* - x {Array}: `x1`, `x2` value (default: `[0, 0]`)\n\t* - y {Array}: `y1`, `y2` value (default: `[0, 1]`)\n\t* - stops {Array}: Each item should be having `[offset, stop-color, stop-opacity]` values.\n\t* - (default: `[[0, $DATA_COLOR, 1], [1, $DATA_COLOR, 0]]`)\n\t* @property {boolean} [bar.overlap=false] Bars will be rendered at same position, which will be overlapped each other. (for non-grouped bars only)\n\t* @property {number} [bar.padding=0] The padding pixel value between each bar.\n\t* @property {number} [bar.radius] Set the radius of bar edge in pixel.\n\t* @property {number} [bar.radius.ratio] Set the radius ratio of bar edge in relative the bar's width.\n\t* @property {number} [bar.sensitivity=2] The sensitivity offset value for interaction boundary.\n\t* @property {number|function|object} [bar.width] Change the width of bar chart.\n\t* @property {number} [bar.width.ratio=0.6] Change the width of bar chart by ratio.\n\t* - **NOTE:** Criteria for ratio.\n\t* - When x ticks count is same with the data count, the baseline for ratio is the minimum interval value of x ticks.\n\t* \t - ex. when timeseries x values are: [2024-01-01, 2024-02-01, 2024-03-01], the minimum interval will be `2024-02-01 ~ 2024-03-01`\n\t* - if the minimum interval is 30px, then ratio=1 means 30px.\n\t* - When x ticks count is lower than the data count, the baseline will be calculated as `chart width / data count`.\n\t* \t - ex. when chart width is 500, data count is 5, then ratio=1 means 100px.\n\t* @property {number} [bar.width.max] The maximum width value for ratio.\n\t* @property {number} [bar.width.dataname] Change the width of bar for indicated dataset only.\n\t* @property {number} [bar.width.dataname.ratio=0.6] Change the width of bar chart by ratio.\n\t* - **NOTE:**\n\t* - Works only for non-stacked bar\n\t* @property {number} [bar.width.dataname.max] The maximum width value for ratio.\n\t* @property {boolean} [bar.zerobased=true] Set if min or max value will be 0 on bar chart.\n\t* @see [Demo: bar front](https://naver.github.io/billboard.js/demo/#BarChartOptions.BarFront)\n\t* @see [Demo: bar indices](https://naver.github.io/billboard.js/demo/#BarChartOptions.BarIndices)\n\t* @see [Demo: bar overlap](https://naver.github.io/billboard.js/demo/#BarChartOptions.BarOverlap)\n\t* @see [Demo: bar padding](https://naver.github.io/billboard.js/demo/#BarChartOptions.BarPadding)\n\t* @see [Demo: bar radius](https://naver.github.io/billboard.js/demo/#BarChartOptions.BarRadius)\n\t* @see [Demo: bar width](https://naver.github.io/billboard.js/demo/#BarChartOptions.BarWidth)\n\t* @see [Demo: bar width variant](https://naver.github.io/billboard.js/demo/#BarChartOptions.BarWidthVariant)\n\t* @example\n\t* bar: {\n\t* // make bar shape to be positioned over the other shape elements\n\t* front: true,\n\t*\n\t* // remove nullish data on bar indices positions\n\t* indices: {\n\t* removeNull: true\n\t* },\n\t*\n\t* // will generate following linearGradient:\n\t* // for more info: https://developer.mozilla.org/en-US/docs/Web/SVG/Element/linearGradient\n\t* // <linearGradient x1=\"0\" x2=\"0\" y1=\"0\" y2=\"1\">\n\t* // <stop offset=\"0\" stop-color=\"$DATA_COLOR\" stop-opacity=\"1\"></stop>\n\t* // <stop offset=\"1\" stop-color=\"$DATA_COLOR\" stop-opacity=\"0\"></stop>\n\t* // </linearGradient>\n\t* linearGradient: true,\n\t*\n\t* // Or customized gradient\n\t* linearGradient: {\n\t* \tx: [0, 0], // x1, x2 attributes\n\t* \ty: [0, 0], // y1, y2 attributes\n\t* \tstops: [\n\t* \t // offset, stop-color, stop-opacity\n\t* \t [0, \"#7cb5ec\", 1],\n\t*\n\t* \t // setting 'null' for stop-color, will set its original data color\n\t* \t [0.5, null, 0],\n\t*\n\t* \t // setting 'function' for stop-color, will pass data id as argument.\n\t* \t // It should return color string or null value\n\t* \t [1, function(id) { return id === \"data1\" ? \"red\" : \"blue\"; }, 0],\n\t* \t]\n\t* },\n\t*\n\t* // remove nullish da\n\t* overlap: true,\n\t*\n\t* padding: 1,\n\t*\n\t* // bar radius\n\t* radius: 10,\n\t* // or\n\t* radius: {\n\t* ratio: 0.5\n\t* }\n\t*\n\t* label: {\n\t* // 0.1(10%) ratio value means, the minimum ratio to show text label relative to the y Axis domain range value.\n\t* // if data value is below than 0.1, text label will be hidden.\n\t* threshold: 0.1,\n\t* },\n\t*\n\t* // will not have offset between each bar elements for interaction\n\t* sensitivity: 0,\n\t*\n\t* width: 10,\n\t*\n\t* // or specify width callback. The callback will receive width, targetsNum, maxDataCount as arguments.\n\t* // - width: chart area width\n\t* // - targetsNum: number of targets\n\t* // - maxDataCount: maximum data count among targets\n\t* width: function(width, targetsNum, maxDataCount) {\n\t* return width / (targetsNum * maxDataCount);\n\t* }\n\t*\n\t* // or specify ratio & max\n\t* width: {\n\t* ratio: 0.2,\n\t* max: 20\n\t* },\n\t*\n\t* // or specify width per dataset\n\t* width: {\n\t* data1: 20,\n\t* data2: {\n\t* ratio: 0.2,\n\t* max: 20\n\t* }\n\t* },\n\t*\n\t* zerobased: false\n\t* }\n\t*/\n\tbar_connectLine: false,\n\tbar_front: false,\n\tbar_indices_removeNull: false,\n\tbar_label_threshold: 0,\n\tbar_linearGradient: false,\n\tbar_overlap: false,\n\tbar_padding: 0,\n\tbar_radius: void 0,\n\tbar_radius_ratio: void 0,\n\tbar_sensitivity: 2,\n\tbar_width: void 0,\n\tbar_width_ratio: .6,\n\tbar_width_max: void 0,\n\tbar_zerobased: true\n};\n//#endregion\nexport { bar_default as default };\n","/*!\n* Copyright (c) 2017 ~ present NAVER Corp.\r\n * billboard.js project is licensed under the MIT license\r\n * \r\n * billboard.js, JavaScript chart library\r\n * https://naver.github.io/billboard.js/\r\n * \r\n * @version 4.1.0\n*/\nimport { TYPE } from \"../../const.js\";\nimport point_default from \"../../../ChartInternal/shape/core/point.js\";\nimport point_default$1 from \"../../Options/common/point.js\";\nimport { extendAxis } from \"./axis.helpers.js\";\nimport bar_default from \"../../../ChartInternal/shape/bar.js\";\nimport bar_default$1 from \"../../Options/shape/bar.js\";\n//#region src/config/resolver/shape/bar.ts\n/**\n* Copyright (c) 2017 ~ present NAVER Corp.\n* billboard.js project is licensed under the MIT license\n*/\nlet bar = () => (extendAxis([bar_default, point_default], [bar_default$1, point_default$1]), (bar = () => TYPE.BAR)());\n//#endregion\nexport { bar };\n","/*!\n* Copyright (c) 2017 ~ present NAVER Corp.\r\n * billboard.js project is licensed under the MIT license\r\n * \r\n * billboard.js, JavaScript chart library\r\n * https://naver.github.io/billboard.js/\r\n * \r\n * @version 4.1.0\n*/\nimport { extend } from \"../../module/util/object.js\";\nimport { isTabVisible } from \"../../module/util/dom.js\";\n//#region src/Chart/api/grid.ts\n/**\n* Normalize grid argument to array.\n* @param {Array|object} grids Grid lines\n* @returns {Array} Grid lines\n* @private\n*/\nfunction toGrids(grids) {\n\treturn Array.isArray(grids) ? grids : [grids];\n}\n/**\n* Redraw canvas after grid API mutation.\n* @param {object} $$ ChartInternal instance\n* @private\n*/\nfunction redrawCanvasGrid($$) {\n\t$$.state.canvasShape = null;\n\t$$.renderCanvasFrame?.(void 0, null, false);\n}\n/**\n* Update grid lines.\n* @param {Array} grids grid lines to update\n* @param {string} axisId axis' id: \"x\" or \"y\"\n* @returns {Array}\n* @private\n*/\nfunction grid(grids, axisId) {\n\tconst $$ = this.internal;\n\tconst { config } = $$;\n\tconst withTransition = config.transition_duration && isTabVisible();\n\tconst gridPropLines = `grid_${axisId}_lines`;\n\tif (!grids) return config[gridPropLines];\n\tconfig[gridPropLines] = toGrids(grids);\n\tif ($$.state.isCanvasMode) {\n\t\tredrawCanvasGrid($$);\n\t\treturn config[gridPropLines];\n\t}\n\t$$.updateGrid();\n\t$$.redrawGrid(withTransition);\n\treturn config[gridPropLines];\n}\n/**\n* Add grid lines.\n* @param {Array|object} grids grid lines to add\n* @param {string} axisId axis' id: \"x\" or \"y\"\n* @returns {Array}\n* @private\n*/\nfunction add(grids, axisId) {\n\tconst gridPropLines = `grid_${axisId}_lines`;\n\treturn grid.bind(this)(this.internal.config[gridPropLines].concat(grids ? toGrids(grids) : []), axisId);\n}\n/**\n* Remove grid lines.\n* @param {object} grids grid lines to remove\n* @param {boolean} isXAxis weather is x axis or not\n* @private\n*/\nfunction remove(grids, isXAxis) {\n\tconst $$ = this.internal;\n\tif ($$.state.isCanvasMode) {\n\t\tconst toRemove = $$.getGridFilterToRemove?.(grids) || (() => true);\n\t\tconst gridLines = `grid_${isXAxis ? \"x\" : \"y\"}_lines`;\n\t\t$$.config[gridLines] = $$.config[gridLines].filter((line) => !toRemove(line));\n\t\tredrawCanvasGrid($$);\n\t\treturn;\n\t}\n\t$$.removeGridLines(grids, isXAxis);\n}\n/**\n* Update x grid lines.\n* @function xgrids\n* @instance\n* @memberof Chart\n* @param {Array} grids X grid lines will be replaced with this argument. The format of this argument is the same as grid.x.lines.\n* @returns {Array}\n* @example\n* // Show 2 x grid lines\n* chart.xgrids([\n* {value: 1, text: \"Label 1\"},\n* {value: 4, text: \"Label 4\"}\n* ]);\n* // --> Returns: [{value: 1, text: \"Label 1\"}, {value: 4, text: \"Label 4\"}]\n*/\nconst xgrids = function(grids) {\n\treturn grid.bind(this)(grids, \"x\");\n};\nextend(xgrids, {\n\t/**\n\t* Add x grid lines.<br>\n\t* This API adds new x grid lines instead of replacing like xgrids.\n\t* @function xgrids․add\n\t* @instance\n\t* @memberof Chart\n\t* @param {Array|object} grids New x grid lines will be added. The format of this argument is the same as grid.x.lines and it's possible to give an Object if only one line will be added.\n\t* @returns {Array}\n\t* @example\n\t* // Add a new x grid line\n\t* chart.xgrids.add(\n\t* {value: 4, text: \"Label 4\"}\n\t* );\n\t*\n\t* // Add new x grid lines\n\t* chart.xgrids.add([\n\t* {value: 2, text: \"Label 2\"},\n\t* {value: 4, text: \"Label 4\"}\n\t* ]);\n\t*/\n\tadd(grids) {\n\t\treturn add.bind(this)(grids, \"x\");\n\t},\n\t/**\n\t* Remove x grid lines.<br>\n\t* This API removes x grid lines.\n\t* @function xgrids․remove\n\t* @instance\n\t* @memberof Chart\n\t* @param {object} grids This argument should include value or class. If value is given, the x grid lines that have specified x value will be removed. If class is given, the x grid lines that have specified class will be removed. If args is not given, all of x grid lines will be removed.\n\t* @param {number} [grids.value] target value\n\t* @param {string} [grids.class] target class\n\t* @returns {void}\n\t* @example\n\t* // x grid line on x = 2 will be removed\n\t* chart.xgrids.remove({value: 2});\n\t*\n\t* // x grid lines that have 'grid-A' will be removed\n\t* chart.xgrids.remove({\n\t* class: \"grid-A\"\n\t* });\n\t*\n\t* // all of x grid lines will be removed\n\t* chart.xgrids.remove();\n\t*/\n\tremove(grids) {\n\t\treturn remove.bind(this)(grids, true);\n\t}\n});\n/**\n* Update y grid lines.\n* @function ygrids\n* @instance\n* @memberof Chart\n* @param {Array} grids Y grid lines will be replaced with this argument. The format of this argument is the same as grid.y.lines.\n* @returns {object}\n* @example\n* // Show 2 y grid lines\n* chart.ygrids([\n* {value: 100, text: \"Label 1\"},\n* {value: 400, text: \"Label 4\"}\n* ]);\n* // --> Returns: [{value: 100, text: \"Label 1\"}, {value: 400, text: \"Label 4\"}]\n*/\nconst ygrids = function(grids) {\n\treturn grid.bind(this)(grids, \"y\");\n};\nextend(ygrids, {\n\t/**\n\t* Add y grid lines.<br>\n\t* This API adds new y grid lines instead of replacing like ygrids.\n\t* @function ygrids․add\n\t* @instance\n\t* @memberof Chart\n\t* @param {Array|object} grids New y grid lines will be added. The format of this argument is the same as grid.y.lines and it's possible to give an Object if only one line will be added.\n\t* @returns {object}\n\t* @example\n\t* // Add a new x grid line\n\t* chart.ygrids.add(\n\t* {value: 400, text: \"Label 4\"}\n\t* );\n\t*\n\t* // Add new x grid lines\n\t* chart.ygrids.add([\n\t* {value: 200, text: \"Label 2\"},\n\t* {value: 400, text: \"Label 4\"}\n\t* ]);\n\t*/\n\tadd(grids) {\n\t\treturn add.bind(this)(grids, \"y\");\n\t},\n\t/**\n\t* Remove y grid lines.<br>\n\t* This API removes x grid lines.\n\t* @function ygrids․remove\n\t* @instance\n\t* @memberof Chart\n\t* @param {object} grids This argument should include value or class. If value is given, the y grid lines that have specified y value will be removed. If class is given, the y grid lines that have specified class will be removed. If args is not given, all of y grid lines will be removed.\n\t* @param {number} [grids.value] target value\n\t* @param {string} [grids.class] target class\n\t* @returns {void}\n\t* @example\n\t* // y grid line on y = 200 will be removed\n\t* chart.ygrids.remove({value: 200});\n\t*\n\t* // y grid lines that have 'grid-A' will be removed\n\t* chart.ygrids.remove({\n\t* class: \"grid-A\"\n\t* });\n\t*\n\t* // all of y grid lines will be removed\n\t* chart.ygrids.remove();\n\t*/\n\tremove(grids) {\n\t\treturn remove.bind(this)(grids, false);\n\t}\n});\nvar grid_default = {\n\txgrids,\n\tygrids\n};\n//#endregion\nexport { grid_default as default };\n","/*!\n* Copyright (c) 2017 ~ present NAVER Corp.\r\n * billboard.js project is licensed under the MIT license\r\n * \r\n * billboard.js, JavaScript chart library\r\n * https://naver.github.io/billboard.js/\r\n * \r\n * @version 4.1.0\n*/\nimport { isArray, isValue } from \"../../module/util/type-checks.js\";\nimport { getPointer } from \"../../module/util/dom.js\";\nimport { $AXIS, $COMMON, $FOCUS, $GRID } from \"../../config/classes.js\";\nimport { select, selectAll } from \"d3-selection\";\n//#region src/ChartInternal/internals/grid.ts\n/**\n* Copyright (c) 2017 ~ present NAVER Corp.\n* billboard.js project is licensed under the MIT license\n*/\nconst GRID_FOCUS_SELECTOR = `line.${$FOCUS.xgridFocus}:not(.${$FOCUS.xgridFocusContinuous}), line.${$FOCUS.ygridFocus}`;\nconst _getGridTextAnchor = (d) => isValue(d.position) || \"end\";\nconst _getGridTextDx = (d) => d.position === \"start\" ? 4 : d.position === \"middle\" ? 0 : -4;\n/**\n* Get current grid focus line selection.\n* @param {object} $$ ChartInternal context\n* @returns {d3.selection} Grid focus line selection\n* @private\n*/\nfunction _getGridFocusEl($$) {\n\tconst { state, $el: { main } } = $$;\n\tconst cached = state._gridFocusEl;\n\tconst mainNode = main.node();\n\tconst cachedNodes = cached?.nodes?.() || [];\n\treturn cachedNodes.length && cachedNodes.every((node) => mainNode?.contains(node)) ? cached : state._gridFocusEl = main.selectAll(GRID_FOCUS_SELECTOR);\n}\n/**\n* Hide continuous subchart focus grid line.\n* @param {object} $$ ChartInternal context\n* @private\n*/\nfunction _hideContinuousGridFocus($$) {\n\t$$.$el.main.select(`line.${$FOCUS.xgridFocusContinuous}`).style(\"visibility\", \"hidden\");\n}\n/**\n* Get grid text x value getter function\n* @param {boolean} isX Is x Axis\n* @param {number} width Width value\n* @param {number} height Height value\n* @returns {function}\n* @private\n*/\nfunction _getGridTextX(isX, width, height) {\n\treturn (d) => {\n\t\tlet x = isX ? 0 : width;\n\t\tif (d.position === \"start\") x = isX ? -height : 0;\n\t\telse if (d.position === \"middle\") x = (isX ? -height : width) / 2;\n\t\treturn x;\n\t};\n}\n/**\n* Update coordinate attributes value\n* @param {d3.selection} el Target node\n* @param {string} type Type\n* @private\n*/\nfunction _smoothLines(el, type) {\n\tif (type === \"grid\") el.each(function() {\n\t\tconst g = select(this);\n\t\t[\n\t\t\t\"x1\",\n\t\t\t\"x2\",\n\t\t\t\"y1\",\n\t\t\t\"y2\"\n\t\t].forEach((v) => g.attr(v, +g.attr(v)));\n\t});\n}\nvar grid_default = {\n\thasGrid() {\n\t\tconst { config } = this;\n\t\treturn [\"x\", \"y\"].some((v) => config[`grid_${v}_show`] || config[`grid_${v}_lines`].length);\n\t},\n\tinitGrid() {\n\t\tconst $$ = this;\n\t\t$$.hasGrid() && $$.initGridLines();\n\t\t$$.initFocusGrid();\n\t},\n\tinitGridLines() {\n\t\tconst { config, state: { clip }, $el } = this;\n\t\tif (config.grid_x_lines.length || config.grid_y_lines.length) {\n\t\t\t$el.gridLines.main = $el.main.insert(\"g\", `.${$COMMON.chart}${config.grid_lines_front ? \" + *\" : \"\"}`).attr(\"clip-path\", clip.pathGrid).attr(\"class\", `${$GRID.grid} ${$GRID.gridLines}`);\n\t\t\t$el.gridLines.main.append(\"g\").attr(\"class\", $GRID.xgridLines);\n\t\t\t$el.gridLines.main.append(\"g\").attr(\"class\", $GRID.ygridLines);\n\t\t\t$el.gridLines.x = selectAll([]);\n\t\t}\n\t},\n\tupdateXGrid(withoutUpdate) {\n\t\tconst $$ = this;\n\t\tconst { config, scale, state, $el: { main, grid } } = $$;\n\t\tconst isRotated = config.axis_rotated;\n\t\tconst xgridData = $$.generateGridData(config.grid_x_type, scale.x);\n\t\tconst tickOffset = $$.axis.isCategorized() ? $$.axis.x.tickOffset() : 0;\n\t\tconst pos = (d) => (scale.zoom || scale.x)(d) + tickOffset * (isRotated ? -1 : 1);\n\t\tstate.xgridAttr = isRotated ? {\n\t\t\tx1: 0,\n\t\t\tx2: state.width,\n\t\t\ty1: pos,\n\t\t\ty2: pos\n\t\t} : {\n\t\t\tx1: pos,\n\t\t\tx2: pos,\n\t\t\ty1: 0,\n\t\t\ty2: state.height\n\t\t};\n\t\tgrid.x = main.select(`.${$GRID.xgrids}`).selectAll(`.${$GRID.xgrid}`).data(xgridData);\n\t\tgrid.x.exit().remove();\n\t\tgrid.x = grid.x.enter().append(\"line\").attr(\"class\", $GRID.xgrid).merge(grid.x);\n\t\tif (!withoutUpdate) grid.x.each(function() {\n\t\t\tconst grid = select(this);\n\t\t\tObject.keys(state.xgridAttr).forEach((id) => {\n\t\t\t\tgrid.attr(id, state.xgridAttr[id]);\n\t\t\t});\n\t\t\tgrid.style(\"opacity\", () => +grid.attr(isRotated ? \"y1\" : \"x1\") === (isRotated ? state.height : 0) ? \"0\" : null);\n\t\t});\n\t},\n\tupdateYGrid() {\n\t\tconst $$ = this;\n\t\tconst { axis, config, scale, state, $el: { grid, main } } = $$;\n\t\tconst isRotated = config.axis_rotated;\n\t\tconst pos = (d) => scale.y(d);\n\t\tconst gridValues = axis.y.getGeneratedTicks(config.grid_y_ticks) || $$.scale.y.ticks(config.grid_y_ticks);\n\t\tgrid.y = main.select(`.${$GRID.ygrids}`).selectAll(`.${$GRID.ygrid}`).data(gridValues);\n\t\tgrid.y.exit().remove();\n\t\tgrid.y = grid.y.enter().append(\"line\").attr(\"class\", $GRID.ygrid).merge(grid.y);\n\t\tgrid.y.attr(\"x1\", isRotated ? pos : 0).attr(\"x2\", isRotated ? pos : state.width).attr(\"y1\", isRotated ? 0 : pos).attr(\"y2\", isRotated ? state.height : pos);\n\t\t_smoothLines(grid.y, \"grid\");\n\t},\n\tupdateGrid() {\n\t\tconst $$ = this;\n\t\tconst { $el: { grid, gridLines } } = $$;\n\t\t!gridLines.main && $$.initGridLines();\n\t\tgrid.main.style(\"visibility\", $$.hasArcType() ? \"hidden\" : null);\n\t\t$$.hideGridFocus();\n\t\t$$.updateGridLines(\"x\");\n\t\t$$.updateGridLines(\"y\");\n\t},\n\t/**\n\t* Update Grid lines\n\t* @param {string} type x | y\n\t* @private\n\t*/\n\tupdateGridLines(type) {\n\t\tconst $$ = this;\n\t\tconst { config, $el: { gridLines, main }, $T } = $$;\n\t\tconst isRotated = config.axis_rotated;\n\t\tconst isX = type === \"x\";\n\t\tconfig[`grid_${type}_show`] && $$[`update${type.toUpperCase()}Grid`]();\n\t\tlet lines = main.select(`.${$GRID[`${type}gridLines`]}`).selectAll(`.${$GRID[`${type}gridLine`]}`).data(config[`grid_${type}_lines`]);\n\t\t$T(lines.exit()).style(\"opacity\", \"0\").remove();\n\t\tconst gridLine = lines.enter().append(\"g\");\n\t\tgridLine.append(\"line\").style(\"opacity\", \"0\");\n\t\tlines = gridLine.merge(lines);\n\t\tlines.each(function(d) {\n\t\t\tconst g = select(this);\n\t\t\tif (g.select(\"text\").empty() && d.text) g.append(\"text\").style(\"opacity\", \"0\");\n\t\t});\n\t\t$T(lines.attr(\"class\", (d) => `${$GRID[`${type}gridLine`]} ${d.class || \"\"}`.trim()).select(\"text\").attr(\"text-anchor\", _getGridTextAnchor).attr(\"transform\", () => isX ? isRotated ? null : \"rotate(-90)\" : isRotated ? \"rotate(-90)\" : null).attr(\"dx\", _getGridTextDx).attr(\"dy\", -5)).text(function(d) {\n\t\t\treturn d.text ?? this.remove();\n\t\t});\n\t\tgridLines[type] = lines;\n\t},\n\tredrawGrid(withTransition) {\n\t\tconst $$ = this;\n\t\tconst { config: { axis_rotated: isRotated }, state: { width, height }, $el: { gridLines }, $T } = $$;\n\t\tconst xv = $$.xv.bind($$);\n\t\tconst yv = $$.yv.bind($$);\n\t\tlet xLines = gridLines.x.select(\"line\");\n\t\tlet xTexts = gridLines.x.select(\"text\");\n\t\tlet yLines = gridLines.y.select(\"line\");\n\t\tlet yTexts = gridLines.y.select(\"text\");\n\t\txLines = $T(xLines, withTransition).attr(\"x1\", isRotated ? 0 : xv).attr(\"x2\", isRotated ? width : xv).attr(\"y1\", isRotated ? xv : 0).attr(\"y2\", isRotated ? xv : height);\n\t\txTexts = $T(xTexts, withTransition).attr(\"x\", _getGridTextX(!isRotated, width, height)).attr(\"y\", xv);\n\t\tyLines = $T(yLines, withTransition).attr(\"x1\", isRotated ? yv : 0).attr(\"x2\", isRotated ? yv : width).attr(\"y1\", isRotated ? 0 : yv).attr(\"y2\", isRotated ? height : yv);\n\t\tyTexts = $T(yTexts, withTransition).attr(\"x\", _getGridTextX(isRotated, width, height)).attr(\"y\", yv);\n\t\treturn [\n\t\t\txLines.style(\"opacity\", null),\n\t\t\txTexts.style(\"opacity\", null),\n\t\t\tyLines.style(\"opacity\", null),\n\t\t\tyTexts.style(\"opacity\", null)\n\t\t];\n\t},\n\tinitFocusGrid() {\n\t\tconst { config, state, state: { clip }, $el } = this;\n\t\tstate._gridFocusEl = null;\n\t\tconst isFront = config.grid_front;\n\t\tconst className = `.${isFront && $el.gridLines.main ? $GRID.gridLines : $COMMON.chart}${isFront ? \" + *\" : \"\"}`;\n\t\tconst grid = $el.main.insert(\"g\", className).attr(\"clip-path\", clip.pathGrid).attr(\"class\", $GRID.grid);\n\t\t$el.grid.main = grid;\n\t\tconfig.grid_x_show && grid.append(\"g\").attr(\"class\", $GRID.xgrids);\n\t\tconfig.grid_y_show && grid.append(\"g\").attr(\"class\", $GRID.ygrids);\n\t\tif (config.axis_tooltip) {\n\t\t\tconst axis = grid.append(\"g\").attr(\"class\", \"bb-axis-tooltip\");\n\t\t\taxis.append(\"line\").attr(\"class\", \"bb-axis-tooltip-x\");\n\t\t\taxis.append(\"line\").attr(\"class\", \"bb-axis-tooltip-y\");\n\t\t}\n\t\tif (config.interaction_enabled && config.grid_focus_show && !config.axis_tooltip) {\n\t\t\tgrid.append(\"g\").attr(\"class\", $FOCUS.xgridFocus).append(\"line\").attr(\"class\", $FOCUS.xgridFocus);\n\t\t\tif (config.grid_focus_y && !config.tooltip_grouped) grid.append(\"g\").attr(\"class\", $FOCUS.ygridFocus).append(\"line\").attr(\"class\", $FOCUS.ygridFocus);\n\t\t\tconfig.subchart_grid_focus_continuous && config.subchart_grid_focus !== false && $el.main.insert(\"g\", className).attr(\"class\", $FOCUS.xgridFocusContinuous).append(\"line\").attr(\"class\", `${$FOCUS.xgridFocus} ${$FOCUS.xgridFocusContinuous}`).style(\"visibility\", \"hidden\");\n\t\t}\n\t},\n\tshowAxisGridFocus() {\n\t\tconst $$ = this;\n\t\tconst { config, format, state: { event, width, height } } = $$;\n\t\tconst isRotated = config.axis_rotated;\n\t\tconst [x, y] = getPointer(event, $$.$el.eventRect?.node());\n\t\tconst pos = {\n\t\t\tx,\n\t\t\ty\n\t\t};\n\t\tfor (const [axis, node] of Object.entries($$.$el.axisTooltip)) {\n\t\t\tconst attr = axis === \"x\" && !isRotated || axis !== \"x\" && isRotated ? \"x\" : \"y\";\n\t\t\tconst value = pos[attr];\n\t\t\tlet scaleText = $$.scale[axis]?.invert(value);\n\t\t\tif (scaleText) {\n\t\t\t\tscaleText = axis === \"x\" && $$.axis.isTimeSeries() ? format.xAxisTick(scaleText) : scaleText?.toFixed(2);\n\t\t\t\tnode?.attr(attr, value).text(scaleText);\n\t\t\t}\n\t\t}\n\t\t$$.$el.main.selectAll(`line.bb-axis-tooltip-x, line.bb-axis-tooltip-y`).style(\"visibility\", null).each(function(d, i) {\n\t\t\tconst line = select(this);\n\t\t\tif (i === 0) line.attr(\"x1\", x).attr(\"x2\", x).attr(\"y1\", i ? 0 : height).attr(\"y2\", i ? height : 0);\n\t\t\telse line.attr(\"x1\", i ? 0 : width).attr(\"x2\", i ? width : 0).attr(\"y1\", y).attr(\"y2\", y);\n\t\t});\n\t},\n\thideAxisGridFocus() {\n\t\tconst $$ = this;\n\t\t$$.$el.main.selectAll(`line.${$AXIS.axisTooltipX}, line.${$AXIS.axisTooltipY}`).style(\"visibility\", \"hidden\");\n\t\tObject.values($$.$el.axisTooltip).forEach((v) => v?.style(\"display\", \"none\"));\n\t},\n\t/**\n\t* Show grid focus line\n\t* @param {Array} data Selected data\n\t* @private\n\t*/\n\tshowGridFocus(data) {\n\t\tconst $$ = this;\n\t\tconst { config, state: { width, height } } = $$;\n\t\tconst isRotated = config.axis_rotated;\n\t\tconst focusEl = _getGridFocusEl($$);\n\t\tconst dataToShow = (data || [focusEl.datum()]).filter((d) => d && isValue($$.getBaseValue(d)));\n\t\tif (!config.tooltip_show || dataToShow.length === 0 || !config.axis_x_forceAsSingle && $$.hasType(\"bubble\") || $$.hasArcType()) return;\n\t\tconst isEdge = config.grid_focus_edge && !config.tooltip_grouped;\n\t\tconst xx = $$.xx.bind($$);\n\t\tfocusEl.style(\"visibility\", null).data(dataToShow.concat(dataToShow)).each(function(d) {\n\t\t\tconst el = select(this);\n\t\t\tconst pos = {\n\t\t\t\tx: xx(d),\n\t\t\t\ty: $$.getYScaleById(d.id)(d.value)\n\t\t\t};\n\t\t\tlet xy;\n\t\t\tif (el.classed($FOCUS.xgridFocus)) xy = isRotated ? [\n\t\t\t\tnull,\n\t\t\t\tpos.x,\n\t\t\t\tisEdge ? pos.y : width,\n\t\t\t\tpos.x\n\t\t\t] : [\n\t\t\t\tpos.x,\n\t\t\t\tisEdge ? pos.y : null,\n\t\t\t\tpos.x,\n\t\t\t\theight\n\t\t\t];\n\t\t\telse {\n\t\t\t\tconst isY2 = $$.axis.getId(d.id) === \"y2\";\n\t\t\t\txy = isRotated ? [\n\t\t\t\t\tpos.y,\n\t\t\t\t\tisEdge && !isY2 ? pos.x : null,\n\t\t\t\t\tpos.y,\n\t\t\t\t\tisEdge && isY2 ? pos.x : height\n\t\t\t\t] : [\n\t\t\t\t\tisEdge && isY2 ? pos.x : null,\n\t\t\t\t\tpos.y,\n\t\t\t\t\tisEdge && !isY2 ? pos.x : width,\n\t\t\t\t\tpos.y\n\t\t\t\t];\n\t\t\t}\n\t\t\t[\n\t\t\t\t\"x1\",\n\t\t\t\t\"y1\",\n\t\t\t\t\"x2\",\n\t\t\t\t\"y2\"\n\t\t\t].forEach((v, i) => el.attr(v, xy[i]));\n\t\t});\n\t\t_smoothLines(focusEl, \"grid\");\n\t\t$$.showCircleFocus?.(data);\n\t},\n\thideGridFocus(force = false) {\n\t\tconst $$ = this;\n\t\tconst { state: { inputType, resizing } } = $$;\n\t\tif (force || inputType === \"mouse\" || !resizing) {\n\t\t\t_getGridFocusEl($$).style(\"visibility\", \"hidden\");\n\t\t\t_hideContinuousGridFocus($$);\n\t\t\t$$.hideCircleFocus?.();\n\t\t}\n\t},\n\tupdateGridFocus() {\n\t\tconst $$ = this;\n\t\tconst { state: { inputType, width, height, resizing }, $el: { grid } } = $$;\n\t\tconst xgridFocus = grid.main.select(`line.${$FOCUS.xgridFocus}`);\n\t\tif (inputType === \"touch\") {\n\t\t\tif (xgridFocus.empty()) resizing && $$.showCircleFocus?.();\n\t\t\telse $$.showGridFocus();\n\t\t} else {\n\t\t\tconst isRotated = $$.config.axis_rotated;\n\t\t\txgridFocus.attr(\"x1\", isRotated ? 0 : -10).attr(\"x2\", isRotated ? width : -10).attr(\"y1\", isRotated ? -10 : 0).attr(\"y2\", isRotated ? -10 : height);\n\t\t\t_hideContinuousGridFocus($$);\n\t\t}\n\t\treturn true;\n\t},\n\tgenerateGridData(type, scale) {\n\t\tconst $$ = this;\n\t\tconst tickNum = $$.$el.main.select(`.${$AXIS.axisX}`).selectAll(\".tick\").size();\n\t\tlet gridData = [];\n\t\tif (type === \"year\") {\n\t\t\tconst [firstYear, lastYear] = $$.getXDomain($$.data.targets).map((v) => v.getFullYear());\n\t\t\tfor (let i = firstYear; i <= lastYear; i++) gridData.push(/* @__PURE__ */ new Date(`${i}-01-01 00:00:00`));\n\t\t} else {\n\t\t\tgridData = scale.ticks(10);\n\t\t\tif (gridData.length > tickNum) gridData = gridData.filter((d) => String(d).indexOf(\".\") < 0);\n\t\t}\n\t\treturn gridData;\n\t},\n\tgetGridFilterToRemove(params) {\n\t\treturn params ? (line) => {\n\t\t\tlet found = false;\n\t\t\t(isArray(params) ? params.concat() : [params]).forEach((param) => {\n\t\t\t\tif (\"value\" in param && line.value === param.value || \"class\" in param && line.class === param.class) found = true;\n\t\t\t});\n\t\t\treturn found;\n\t\t} : () => true;\n\t},\n\tremoveGridLines(params, forX) {\n\t\tconst $$ = this;\n\t\tconst { config, $T } = $$;\n\t\tconst toRemove = $$.getGridFilterToRemove(params);\n\t\tconst toShow = (line) => !toRemove(line);\n\t\tconst classLines = forX ? $GRID.xgridLines : $GRID.ygridLines;\n\t\tconst classLine = forX ? $GRID.xgridLine : $GRID.ygridLine;\n\t\t$T($$.$el.main.select(`.${classLines}`).selectAll(`.${classLine}`).filter(toRemove)).style(\"opacity\", \"0\").remove();\n\t\tconst gridLines = `grid_${forX ? \"x\" : \"y\"}_lines`;\n\t\tconfig[gridLines] = config[gridLines].filter(toShow);\n\t}\n};\n//#endregion\nexport { grid_default as default };\n","/*!\n* Copyright (c) 2017 ~ present NAVER Corp.\r\n * billboard.js project is licensed under the MIT license\r\n * \r\n * billboard.js, JavaScript chart library\r\n * https://naver.github.io/billboard.js/\r\n * \r\n * @version 4.1.0\n*/\n//#region src/config/Options/common/grid.ts\nvar grid_default = {\n\t/**\n\t* Set related options\n\t* @name grid\n\t* @memberof Options\n\t* @type {object}\n\t* @property {boolean} [front=false] Set 'grid & focus lines' to be positioned over grid lines and chart elements.\n\t* @property {object} x Grid x object\n\t* @property {boolean} [x.show=false] Show grids along x axis.\n\t* @property {Array} [x.lines=[]] Show additional grid lines along x axis.<br>\n\t* This option accepts array including object that has value, text, position and class. text, position and class are optional. For position, start, middle and end (default) are available.\n\t* If x axis is category axis, value can be category name. If x axis is timeseries axis, value can be date string, Date object and unixtime integer.\n\t* @property {object} y Grid y object\n\t* @property {boolean} [y.show=false] Show grids along x axis.\n\t* @property {Array} [y.lines=[]] Show additional grid lines along y axis.<br>\n\t* This option accepts array including object that has value, text, position and class.\n\t* @property {number} [y.ticks=undefined] Number of y grids to be shown.\n\t* @property {object} focus Grid focus object\n\t* @property {boolean} [focus.edge=false] Show edged focus grid line.<br>**NOTE:** Available when [`tooltip.grouped=false`](#.tooltip) option is set.\n\t* @property {boolean} [focus.show=true] Show grid line when focus.\n\t* @property {boolean} [focus.y=false] Show y coordinate focus grid line.<br>**NOTE:** Available when [`tooltip.grouped=false`](#.tooltip) option is set.\n\t* @property {object} lines Grid lines object\n\t* @property {boolean} [lines.front=true] Set grid lines to be positioned over chart elements.\n\t* @default undefined\n\t* @see [Demo](https://naver.github.io/billboard.js/demo/#Grid.GridLines)\n\t* @see [Demo: X Grid Lines](https://naver.github.io/billboard.js/demo/#Grid.OptionalXGridLines)\n\t* @see [Demo: Y Grid Lines](https://naver.github.io/billboard.js/demo/#Grid.OptionalYGridLines)\n\t* @example\n\t* grid: {\n\t* x: {\n\t* show: true,\n\t* lines: [\n\t* {value: 2, text: \"Label on 2\"},\n\t* {value: 5, text: \"Label on 5\", class: \"label-5\"},\n\t* {value: 6, text: \"Label on 6\", position: \"start\"}\n\t* ]\n\t* },\n\t* y: {\n\t* show: true,\n\t* lines: [\n\t* {value: 100, text: \"Label on 100\"},\n\t* {value: 200, text: \"Label on 200\", class: \"label-200\"},\n\t* {value: 300, text: \"Label on 300\", position: 'middle'}\n\t* ],\n\t* ticks: 5\n\t* },\n\t* front: true,\n\t* focus: {\n\t* show: false,\n\t*\n\t* // Below options are available when 'tooltip.grouped=false' option is set\n\t* edge: true,\n\t* y: true\n\t* },\n\t* lines: {\n\t* front: false\n\t* }\n\t* }\n\t*/\n\tgrid_x_show: false,\n\tgrid_x_type: \"tick\",\n\tgrid_x_lines: [],\n\tgrid_y_show: false,\n\tgrid_y_lines: [],\n\tgrid_y_ticks: void 0,\n\tgrid_focus_edge: false,\n\tgrid_focus_show: true,\n\tgrid_focus_y: false,\n\tgrid_front: false,\n\tgrid_lines_front: true\n};\n//#endregion\nexport { grid_default as default };\n","/*!\n* Copyright (c) 2017 ~ present NAVER Corp.\r\n * billboard.js project is licensed under the MIT license\r\n * \r\n * billboard.js, JavaScript chart library\r\n * https://naver.github.io/billboard.js/\r\n * \r\n * @version 4.1.0\n*/\nimport { extend } from \"../../module/util/object.js\";\nimport Options from \"../Options/Options.js\";\nimport ChartInternal from \"../../ChartInternal/ChartInternal.js\";\nimport Chart from \"../../Chart/Chart.js\";\nimport grid_default from \"../../Chart/api/grid.js\";\nimport grid_default$1 from \"../../ChartInternal/internals/grid.js\";\nimport grid_default$2 from \"../Options/common/grid.js\";\n//#region src/config/resolver/grid.ts\n/**\n* Copyright (c) 2017 ~ present NAVER Corp.\n* billboard.js project is licensed under the MIT license\n*/\n/**\n* Enable chart grid API (chart.xgrids() / chart.ygrids()).\n* Tree-shakable: only bundled when imported.\n* @returns {object} Empty options object (safe to spread into bb.generate())\n* @example\n* // ESM — import to enable grid APIs and grid rendering\n* import bb, {bar, grid} from \"billboard.js\";\n*\n* const chart = bb.generate({\n* ...bar(),\n* ...grid(),\n* data: { columns: [...] },\n* grid: { x: { lines: [...] } }\n* });\n*\n* chart.xgrids([{value: 1, text: \"Label\"}]);\n*/\nlet grid = () => {\n\textend(ChartInternal.prototype, grid_default$1);\n\tChart.prototype.xgrids = grid_default.xgrids;\n\tChart.prototype.ygrids = grid_default.ygrids;\n\tOptions.setOptions([grid_default$2]);\n\treturn (grid = () => ({}))();\n};\n//#endregion\nexport { grid };\n","/*!\n* Copyright (c) 2017 ~ present NAVER Corp.\r\n * billboard.js project is licensed under the MIT license\r\n * \r\n * billboard.js, JavaScript chart library\r\n * https://naver.github.io/billboard.js/\r\n * \r\n * @version 4.1.0\n*/\nimport { isObject } from \"./module/util/type-checks.js\";\nimport { mergeObj } from \"./module/util/object.js\";\nimport Chart from \"./Chart/Chart.js\";\n//#region src/core.ts\n/**\n* Copyright (c) 2017 ~ present NAVER Corp.\n* billboard project is licensed under the MIT license\n*/\nlet defaults = Object.create(null);\n/**\n* @namespace bb\n* @version 4.1.0\n*/\nconst bb = {\n\t/**\n\t* Version information\n\t* @property {string} version version\n\t* @example\n\t* bb.version; // \"1.0.0\"\n\t* @memberof bb\n\t*/\n\tversion: \"4.1.0\",\n\t/**\n\t* Generate chart\n\t* - **NOTE:** Bear in mind for the possibility of ***throwing an error***, during the generation when:\n\t* - Unused option value is given.\n\t* - ex) For `data.type=\"pie\"` option, setting 'axis' option can cause unexpected generation error.\n\t* - Insufficient value is given for certain option used.\n\t* - ex) `data: { x: \"x\", columns: [[\"x\"], [\"data1\", 30, 200, 100]] }`\n\t* @param {Options} config chart options\n\t* @memberof bb\n\t* @returns {Chart}\n\t* @see {@link Options} for different generation options\n\t* @see {@link Chart} for different methods API\n\t* @example\n\t* <!-- chart holder -->\n\t* <div id=\"LineChart\"></div>\n\t* @example\n\t* // Generate chart with options\n\t* var chart = bb.generate({\n\t* \"bindto\": \"#LineChart\"\n\t* \"data\": {\n\t* \"columns\": [\n\t* [\"data1\", 30, 200, 100, 400, 150, 250],\n\t* [\"data2\", 50, 20, 10, 40, 15, 25]\n\t* ],\n\t* \"type\": \"line\"\n\t* }\n\t* });\n\t*\n\t* // call some API\n\t* // ex) get the data of 'data1'\n\t* chart.data(\"data1\");\n\t* @example\n\t* // Generate chart by importing ESM.\n\t* // Import only the shape and API resolvers you use for a smaller bundle.\n\t* import bb, {\n\t* bar,\n\t* category,\n\t* exportApi,\n\t* flow,\n\t* grid,\n\t* line,\n\t* regions,\n\t* step\n\t* } from \"billboard.js\";\n\t*\n\t* const chart = bb.generate({\n\t* ...category(),\n\t* ...exportApi(),\n\t* ...flow(),\n\t* ...grid(),\n\t* ...regions(),\n\t* bindto: \"#LineChart\",\n\t* data: {\n\t* columns: [\n\t* [\"data1\", 30, 200, 100, 400, 150, 250],\n\t* [\"data2\", 50, 20, 10, 40, 15, 25]\n\t* ],\n\t* type: line(),\n\t*\n\t* // or specify per-series types\n\t* types: {\n\t* data1: bar(),\n\t* data2: step()\n\t* }\n\t* },\n\t* axis: {\n\t* x: {\n\t* type: \"category\",\n\t* categories: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\"]\n\t* }\n\t* },\n\t* grid: {\n\t* x: {show: true}\n\t* },\n\t* regions: [\n\t* {axis: \"x\", start: \"Feb\", end: \"Apr\"}\n\t* ]\n\t* });\n\t*\n\t* chart.export();\n\t* @example\n\t* // Generate a canvas-rendered chart by importing the canvas ESM entry.\n\t* import bb, {\n\t* bar,\n\t* canvas,\n\t* category,\n\t* exportApi,\n\t* flow,\n\t* grid,\n\t* regions,\n\t* subchart\n\t* } from \"billboard.js/canvas\";\n\t*\n\t* const chart = bb.generate({\n\t* render: {\n\t* mode: canvas()\n\t* },\n\t* ...category(),\n\t* ...exportApi(),\n\t* ...flow(),\n\t* ...grid(),\n\t* ...regions(),\n\t* bindto: \"#LineChart\",\n\t* data: {\n\t* columns: [\n\t* [\"data1\", 30, 200, 100, 400]\n\t* ],\n\t* type: bar()\n\t* },\n\t* axis: {\n\t* x: {\n\t* type: \"category\",\n\t* categories: [\"Jan\", \"Feb\", \"Mar\", \"Apr\"]\n\t* }\n\t* },\n\t* grid: {\n\t* x: {show: true, lines: [{value: \"Feb\", text: \"Milestone\"}]},\n\t* y: {show: true}\n\t* },\n\t* regions: [\n\t* {axis: \"x\", start: \"Feb\", end: \"Mar\", label: {text: \"Campaign\"}}\n\t* ],\n\t* subchart: {\n\t* show: subchart()\n\t* }\n\t* });\n\t*\n\t* chart.xgrids([{value: \"Mar\", text: \"API grid\"}]);\n\t* chart.regions([{axis: \"x\", start: \"Jan\", end: \"Feb\"}]);\n\t* chart.flow({columns: [[\"data1\", 120]]});\n\t* chart.export();\n\t*\n\t* // Arc-family chart types (`pie`, `donut`, `gauge`, `polar`, `radar`)\n\t* // stay SVG-only because canvas mode doesn't provide meaningful benefit.\n\t*/\n\tgenerate(config) {\n\t\tconst options = mergeObj(Object.create(null), defaults, config);\n\t\tconst inst = new Chart(options);\n\t\tinst.internal.charts = this.instance;\n\t\tthis.instance.push(inst);\n\t\treturn inst;\n\t},\n\t/**\n\t* Set or get global default options.\n\t* - **NOTE:**\n\t* - The options values settings are valid within page context only.\n\t* - If is called multiple times, will override the last value.\n\t* @param {Options} options chart options\n\t* @memberof bb\n\t* @returns {Options}\n\t* @see {@link Options}\n\t* @example\n\t* // Set same option value as for `.generate()`\n\t* bb.defaults({\n\t* data: {\n\t* type: \"bar\"\n\t* }\n\t* });\n\t*\n\t* bb.defaults(); // {data:{type: \"bar\"}}\n\t*\n\t* // data.type defaults to 'bar'\n\t* var chart = bb.generate({ ... });\n\t*/\n\tdefaults(options) {\n\t\tif (isObject(options)) defaults = options;\n\t\treturn defaults;\n\t},\n\t/**\n\t* An array containing instance created\n\t* @property {Array} instance instance array\n\t* @example\n\t* // generate charts\n\t* var chart1 = bb.generate(...);\n\t* var chart2 = bb.generate(...);\n\t*\n\t* bb.instance; // [ chart1, chart2, ... ]\n\t* @memberof bb\n\t*/\n\tinstance: [],\n\t/**\n\t* Namespace for plugins\n\t* @property {object} plugin plugin namespace\n\t* @example\n\t* // Stanford diagram plugin\n\t* bb.plugin.stanford;\n\t* @memberof bb\n\t*/\n\tplugin: {}\n};\n//#endregion\nexport { bb, bb as default };\n","// ── External Dependencies & Registrations\nimport 'billboard.js/dist/billboard.css';\nimport type { Chart } from 'billboard.js';\nimport { bar, bb, grid } from 'billboard.js';\n\n// ── Types ────────────────────────────────────────────────────────────────────────────────────────────────────────────\n\nexport interface BarChartSeries {\n name: string;\n values: number[];\n}\n\nexport interface BarChartData {\n categories: string[];\n series: BarChartSeries[];\n}\n\nexport interface BillboardJSHandle {\n chart: Chart;\n destroy: () => void;\n resize: () => void;\n}\n\n// ── Actions ──────────────────────────────────────────────────────────────────────────────────────────────────────────\n\n// Billboard.js's SVG entry point (there's also a heavier `billboard.js/canvas` entry, unused here - see the D3Tool.renderBillboardJS comment).\nexport function renderBillboardJS(data: BarChartData, renderTo: HTMLElement): BillboardJSHandle {\n const columns = data.series.map((series): [string, ...number[]] => [series.name, ...series.values]);\n\n const chart = bb.generate({\n ...grid(),\n axis: { x: { categories: data.categories, type: 'category' } },\n bindto: renderTo,\n data: { columns, type: bar() }\n });\n\n return {\n chart,\n destroy: () => {\n chart.destroy();\n },\n resize: () => {\n chart.resize();\n }\n };\n}\n"],"x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70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