@deephaven/code-studio 1.15.1 → 1.16.0

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 (45) hide show
  1. package/build/assets/{AppRoot-yoU6xO7o.js → AppRoot-BwEVs27P.js} +6 -6
  2. package/build/assets/{AppRoot-yoU6xO7o.js.map → AppRoot-BwEVs27P.js.map} +1 -1
  3. package/build/assets/{Chart-B-lgYFRk.js → Chart-d1LFGOMH.js} +2 -2
  4. package/build/assets/{Chart-B-lgYFRk.js.map → Chart-d1LFGOMH.js.map} +1 -1
  5. package/build/assets/{ControlType-BXDfYonb.js → ControlType-Etqnd6n0.js} +4 -4
  6. package/build/assets/{ControlType-BXDfYonb.js.map → ControlType-Etqnd6n0.js.map} +1 -1
  7. package/build/assets/{FormatterUtils-VvugcpnR.js → FormatterUtils-DclplMcY.js} +2 -2
  8. package/build/assets/{FormatterUtils-VvugcpnR.js.map → FormatterUtils-DclplMcY.js.map} +1 -1
  9. package/build/assets/{Grid-BhSfx_MV.js → Grid-NUf6WtL2.js} +2 -2
  10. package/build/assets/{Grid-BhSfx_MV.js.map → Grid-NUf6WtL2.js.map} +1 -1
  11. package/build/assets/GridTokenMouseHandler-X4KdhlOq.js +2 -0
  12. package/build/assets/GridTokenMouseHandler-X4KdhlOq.js.map +1 -0
  13. package/build/assets/{IrisGrid-CxxjDqw5.js → IrisGrid-Bh9yAG6T.js} +3 -3
  14. package/build/assets/{IrisGrid-CxxjDqw5.js.map → IrisGrid-Bh9yAG6T.js.map} +1 -1
  15. package/build/assets/{IrisGridModel-DSlx1u3X.js → IrisGridModel-DDGkzyRh.js} +3 -3
  16. package/build/assets/{IrisGridModel-DSlx1u3X.js.map → IrisGridModel-DDGkzyRh.js.map} +1 -1
  17. package/build/assets/{IrisGridShortcuts-RA3wXust.js → IrisGridShortcuts-D2g_Rl9k.js} +2 -2
  18. package/build/assets/{IrisGridShortcuts-RA3wXust.js.map → IrisGridShortcuts-D2g_Rl9k.js.map} +1 -1
  19. package/build/assets/{IrisGridThemeProvider-6it02n4x.js → IrisGridThemeProvider-BTuQfmMf.js} +6 -6
  20. package/build/assets/IrisGridThemeProvider-BTuQfmMf.js.map +1 -0
  21. package/build/assets/{LocalWorkspaceStorage-BZKRnSF8.js → LocalWorkspaceStorage-C3ldThpP.js} +2 -2
  22. package/build/assets/{LocalWorkspaceStorage-BZKRnSF8.js.map → LocalWorkspaceStorage-C3ldThpP.js.map} +1 -1
  23. package/build/assets/{MarkdownEditor-C2AAm9ih.js → MarkdownEditor-Bww40EVD.js} +2 -2
  24. package/build/assets/{MarkdownEditor-C2AAm9ih.js.map → MarkdownEditor-Bww40EVD.js.map} +1 -1
  25. package/build/assets/{MarkdownNotebook-DBOYivNl.js → MarkdownNotebook-CTVzzJtp.js} +2 -2
  26. package/build/assets/{MarkdownNotebook-DBOYivNl.js.map → MarkdownNotebook-CTVzzJtp.js.map} +1 -1
  27. package/build/assets/{MissingPartitionError-uL8lR3Hy.js → MissingPartitionError-jNITaf6f.js} +2 -2
  28. package/build/assets/{MissingPartitionError-uL8lR3Hy.js.map → MissingPartitionError-jNITaf6f.js.map} +1 -1
  29. package/build/assets/{MockChartModel-DTdba9NN.js → MockChartModel-Cc0LZyRl.js} +2 -2
  30. package/build/assets/{MockChartModel-DTdba9NN.js.map → MockChartModel-Cc0LZyRl.js.map} +1 -1
  31. package/build/assets/{StyleGuideRoot-DTTYIKzl.js → StyleGuideRoot-BvO87vbL.js} +2 -2
  32. package/build/assets/{StyleGuideRoot-DTTYIKzl.js.map → StyleGuideRoot-BvO87vbL.js.map} +1 -1
  33. package/build/assets/{index-Pb0fT4BS.js → index-BzMWwrSc.js} +4 -4
  34. package/build/assets/{index-Pb0fT4BS.js.map → index-BzMWwrSc.js.map} +1 -1
  35. package/build/assets/index-D44-83Ub.js +2 -0
  36. package/build/assets/index-D44-83Ub.js.map +1 -0
  37. package/build/assets/{index-SLNddBo_.js → index-D9pGoiog.js} +3 -3
  38. package/build/assets/{index-SLNddBo_.js.map → index-D9pGoiog.js.map} +1 -1
  39. package/build/index.html +2 -2
  40. package/package.json +18 -18
  41. package/build/assets/GridTokenMouseHandler-Dem4pZ7B.js +0 -2
  42. package/build/assets/GridTokenMouseHandler-Dem4pZ7B.js.map +0 -1
  43. package/build/assets/IrisGridThemeProvider-6it02n4x.js.map +0 -1
  44. package/build/assets/index-DZpheLqH.js +0 -2
  45. package/build/assets/index-DZpheLqH.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"mappings":";uTAOG,IAACA,GAA8BC,GAAM,WAAW,CAACC,EAAOC,IAAQ,CACjE,GAAI,CACF,SAAAC,EACA,UAAAC,EACA,SAAAC,EAAW,GACX,GAAAC,EACA,SAAAC,EAAW,GACX,eAAAC,EAAiB,GACjB,UAAAC,EAAY,GACZ,QAAAC,EACA,aAAAC,EACA,aAAAC,EACA,MAAAC,EACA,cAAeC,CACnB,EAAMb,EAOA,CACF,iBAAAc,CACJ,EAAMC,GAAa,GAAI,QAAQ,EAC7B,OAAoBC,OAAM,SAAU,CAClC,IAAKf,EACL,KAAM,SACN,UAAWgB,GAAW,eAAgB,CACpC,sBAAuBX,IAAa,QAAaA,GAAYC,CACnE,EAAO,CACD,6BAA8BA,CACpC,EAAO,CACD,aAAcC,CACpB,EAAOL,EAAWW,CAAgB,EAC9B,GAAIT,EACJ,QAASI,EACT,aAAcC,EACd,aAAcC,EACd,MAAOC,EACP,SAAUR,EACV,cAAeS,EACf,SAAU,CAACX,EAAuBgB,MAAKC,GAAiB,CACtD,KAAMC,GACN,UAAW,2BACX,UAAW,QACjB,CAAK,EAAgBF,MAAKC,GAAiB,CACrC,KAAME,GACN,UAAW,8BACjB,CAAK,CAAC,CACN,CAAG,CACH,CAAC,EACDvB,GAAe,YAAc,iBC1D7B,SAASwB,GAAQC,EAAGC,EAAG,CAAE,IAAI,EAAI,OAAO,KAAKD,CAAC,EAAG,GAAI,OAAO,sBAAuB,CAAE,IAAIE,EAAI,OAA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BAAoB,CACtB,MAAO,EACT,CA2CA,IAAI,mBAAoB,CACtB,MAAO,EACT,CAOA,aAAa9I,EAAa,CACxB,MAAO,EACT,CA8BA,OAAQ,CAER,CAKA,cAAe,CACb,MAAO,EACT,CACA,IAAI,oBAAqB,CACvB,MAAO,EACT,CACA,sBAAsB1O,EAAQE,EAAK2F,EAAO,CACxC,MAAM,IAAI,MAAM,yBAAyB,CAC3C,CACA,eAAe7F,EAAQE,EAAK,CAC1B,OAAO,IACT,CACF,CACA/J,GAAgBihB,GAAe,QAAS,OAAO,OAAO,CACpD,QAAS,UACT,kBAAmB,oBACnB,eAAgB,iBAChB,gBAAiB,kBACjB,cAAe,gBACf,gBAAiB,kBACjB,cAAe,gBACf,WAAY,aACZ,UAAW,YACX,eAAgB,iBAEhB,qBAAsB,uBACtB,iBAAkB,kBACpB,CAAC,CAAC","names":["SocketedButton","React","props","ref","children","className","disabled","id","isLinked","isLinkedSource","isInvalid","onClick","onMouseEnter","onMouseLeave","style","dataTestId","UNSAFE_className","useSlotProps","_jsxs","classNames","_jsx","FontAwesomeIcon","vsLink","dhExclamation","ownKeys","e","r","o","_objectSpread","_defineProperty","_toPropertyKey","t","i","_toPrimitive","Chart","lazy","__vitePreload","LazyChart","Suspense","LoadingOverlay","log","Log","BUSINESS_COLUMN_TYPE","MILLIS_PER_HOUR","NANOS_PER_MILLI","isDateWrapper","value","isLongWrapper","isDateTimeColumnFormatter","isRangedPlotlyAxis","isWebGLSupported","canvas","gl","IS_WEBGL_SUPPORTED","ChartUtils","x","xLow","xHigh","array","arrayminus","prefix","formatter","columnType","formatPattern","subpatterns","matchArray","assertNotNull","placeholderDigits","zeroDigits","decimalDigits","optionalDecimalDigits","numberType","percentSign","suffix","paddingLength","isCommaSeparated","comma","plotlyNumberType","type","decimalLength","trimOption","tickformat","tickprefix","ticksuffix","axisFormat","axis","isDateType","gapBetweenMajorTicks","updatedFormat","tickSpacing","chart","series","j","source","name","settings","mode","showLegend","orientation","deephavenShape","figure","axes","charts","_chart","layout","ranges","keys","key","axisProperty","axisIndex","axisIndexString","period","values","decimal","hours","minutes","property","result","item","_result$get","group","colorway","xAxis","title","calendarTimeZone","formatterTimeZone","holidayPeriods","calendarPeriods","calendarRanges","a","b","holidayRanges","closedRanges","c","calendarRange","lastClose","h","holidayRange","dh","bindAllMethods","axisFormats","nullFormat","allAxes","axisTypeMap","_chart2","sources","axisSources","k","_axis","axisType","typeAxes","axisLayoutProperty","businessCalendar","plotStyle","isBusinessTime","allowWebGL","areLinesVisible","areShapesVisible","modes","sourceType","_sources$","seriesVisibility","isLinesVisible","isShapesVisible","lineColor","shapeColor","shape","shapeSize","_source$axis","seriesData","seriesDataParam","_axis2","dataAttributeName","set","axisPosition","layoutParam","chartAxisRangeParser","plotWidth","plotHeight","figureAxes","_chart3","axisRangeParser","bounds","_axisPositionMap$get","cols","rows","column","colspan","row","rowspan","endColumn","endRow","columnSize","rowSize","xMarginSize","yMarginSize","axisPositionMap","rightAxes","dataFormatter","TableUtils","chartAxes","xAxisSize","yAxisSize","axisTypes","figureAxisTypeMap","figureTypeAxes","isYAxis","plotSize","chartAxisIndex","_axis3","figureAxisIndex","layoutAxis","_range","autorange","rangeParser","rangeStart","rangeEnd","figureAxisTypes","layoutAxisParam","_axis$label","axisSize","label","_this$getAxisProperty","_axisPositionMap$get2","positionAxes","sideIndex","leftAxes","left","right","bottomAxes","topAxes","bottom","top","minRange","maxRange","logAxis","periods","timeZoneDiff","numberPeriods","nextPeriod","bound","businessDays","weekLength","businessDaysInt","day","businessDaysSet","closedDays","boundsArray","closedDay","_i","adjustedDay","rangebreaks","businessPeriods","holidays","typeFormatter","calendar","fullHolidays","partialHolidays","holiday","_calendar$businessPer","dateString","dayOfWeek","isBusinessDay","closedPeriods","rangeBreaks","closeStart","closeEnd","dvalue","table","settingsAxis","yAxis","timeZone","text","format","date","tzFormat","estimatedOffset","estimatedDate","offset","theme","error_band_line_color","ohlc_increasing","ohlc_decreasing","title_color","indicator_increasing","indicator_decreasing","indicator_gauge","paper_bgcolor","plot_bgcolor","coastline_color","land_color","ocean_color","lake_color","river_color","map_style","ChartModel","filter","renderOptions","isDownsamplingDisabled","rect","callback","listener","event","data","detail","IrisGrid","LazyIrisGrid","forwardRef","isExpandableGridModel","model","SELECTION_DIRECTION","GridRange","startColumn","startRow","index1","index2","wasModified","range","other","_startColumn","_endColumn","_startRow","_endRow","start1","end1","start2","end2","ranges1","ranges2","otherRange","subtractRange","subtract","subtractRanges","columnCount","rowCount","_range$startColumn","_range$startRow","_range$endColumn","_range$endRow","columnOffset","rowOffset","direction","rangeIndex","nextCell","nextRangeIndex","nextRange","_nextRangeIndex","_nextRange","cellCount","_range$endRow2","_range$startRow2","_range$endColumn2","_range$startColumn2","_range$endRow3","_range$startRow3","_range$endColumn3","_range$startColumn3","_this$nextCell","isAxisRange","isBoundedAxisRange","isLinkToken","token","GridUtils","y","metrics","columnHeaderDepth","allColumnWidths","allRowHeights","allColumnXs","allRowYs","modelColumns","modelRows","modelRow","modelColumn","columnWidth","rowHeight","columnHeaderHeight","columnHeaderMaxDepth","clamp","start","total","end","visibleStart","visibleEnd","floatingStartCount","floatingEndCount","totalCount","visibleStartIndex","visibleEndIndex","itemIndex","itemCoordinates","itemSizes","coordinate","_itemCoordinates$get","_itemSizes$get","itemX","itemSize","itemCount","floatingStart","floatingEnd","items","ignoreFloating","floatingItem","floatingLeftColumnCount","floatingRightColumnCount","visibleColumns","gridX","floatingTopRowCount","floatingBottomRowCount","visibleRows","gridY","startIndex","modelIndexes","visibleItems","userSizes","visibleItemIndex","modelIndex","userColumnWidths","userRowHeights","depth","columnIndex","nextColumnIndex","rowHeaderWidth","floatingColumns","floatingLeftWidth","allowColumnResize","headerSeparatorHandleSize","halfSeparatorSize","isPreviousColumnHidden","_allColumnXs$get","_allColumnWidths$get","columnX","isColumnHidden","midX","minX","maxX","_allColumnXs$get2","_allColumnWidths$get2","_column","_columnX","_columnWidth","_isColumnHidden","_midX","_minX","_maxX","visibleSizes","hiddenItems","allowRowResize","isPreviousRowHidden","_allRowYs$get","_allRowHeights$get","rowY","isRowHidden","midY","minY","maxY","rowIndex","from","to","oldMovedItems","movedItems","lastMovedItem","toParam","isPreMoveTo","newLastMovedItem","reverse","_loop","fromItemOrRange","toItem","length","fromItem","fromStart","fromEnd","toStart","moveDistance","nextResult","_loop2","_result$j$","_result$j$2","currentStart","currentEnd","movedRange","currentResult","_ref2","s","_ref3","_ref","movedColumns","movedRows","columnRanges","rowRanges","visibleIndex","visibleIndexes","uiRange","EMPTY_ARRAY","uiRanges","modelRanges","modelRange","visibleRanges","platform","modifierKey","columns","width","height","floatingRightWidth","floatingTopHeight","floatingBottomHeight","x1","y1","x2","y2","wheelEvent","pageWidth","pageHeight","lineWidth","lineHeight","deltaX","deltaY","range1","range2","mergedRanges","tokenBox","gridWidth","gridHeight","verticalBarWidth","horizontalBarHeight","newLeft","newRight","newTop","newBottom","state","firstColumn","cellHorizontalPadding","treeDepthIndent","treeHorizontalPadding","getOrThrow","textAlign","isFirstColumn","treeIndent","textWidth","textX","textY","tokens","linkifyFind","memoizeClear","fn","options","isClearingCache","memoizedFn","memoizee","LINK_TRUNCATION_LENGTH","GridModel","EventTarget","visibleLength","indexOfProceedingWhitespace","lengthOfContent","contentToCheckForLinks","EMPTY_SET","IrisGridModel","type0","callback0","options0","index"],"ignoreList":[],"sources":["../../../components/dist/SocketedButton.js","../../../chart/dist/LazyChart.js","../../../chart/dist/ChartUtils.js","../../../chart/dist/ChartModel.js","../../../iris-grid/dist/LazyIrisGrid.js","../../../grid/dist/ExpandableGridModel.js","../../../grid/dist/GridRange.js","../../../grid/dist/GridAxisRange.js","../../../grid/dist/GridUtils.js","../../../grid/dist/memoizeClear.js","../../../grid/dist/GridModel.js","../../../iris-grid/dist/IrisGridModel.js"],"sourcesContent":["import React from 'react';\nimport classNames from 'classnames';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { useSlotProps } from '@react-spectrum/utils';\nimport { dhExclamation, vsLink } from '@deephaven/icons';\nimport \"./SocketedButton.css\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nvar SocketedButton = /*#__PURE__*/React.forwardRef((props, ref) => {\n var {\n children,\n className,\n disabled = false,\n id,\n isLinked = false,\n isLinkedSource = false,\n isInvalid = false,\n onClick,\n onMouseEnter,\n onMouseLeave,\n style,\n 'data-testid': dataTestId\n } = props;\n\n // Spectrum container components such as `ButtonGroup` provide\n // UNSAFE_className prop for the `button` slot via a SlotProvider (\n // https://github.com/adobe/react-spectrum/blob/%40adobe/react-spectrum%403.33.1/packages/%40react-spectrum/buttongroup/src/ButtonGroup.tsx#L104-L107)\n // This can be retrieved via `useSlotProps` to allow our buttons to be styled\n // correctly inside the container.\n var {\n UNSAFE_className\n } = useSlotProps({}, 'button');\n return /*#__PURE__*/_jsxs(\"button\", {\n ref: ref,\n type: \"button\",\n className: classNames('btn-socketed', {\n 'btn-socketed-linked': isLinked !== undefined && isLinked || isLinkedSource\n }, {\n 'btn-socketed-linked-source': isLinkedSource\n }, {\n 'is-invalid': isInvalid\n }, className, UNSAFE_className),\n id: id,\n onClick: onClick,\n onMouseEnter: onMouseEnter,\n onMouseLeave: onMouseLeave,\n style: style,\n disabled: disabled,\n \"data-testid\": dataTestId,\n children: [children, /*#__PURE__*/_jsx(FontAwesomeIcon, {\n icon: vsLink,\n className: \"linked btn-socketed-icon\",\n transform: \"down-1\"\n }), /*#__PURE__*/_jsx(FontAwesomeIcon, {\n icon: dhExclamation,\n className: \"is-invalid btn-socketed-icon\"\n })]\n });\n});\nSocketedButton.displayName = 'SocketedButton';\nexport default SocketedButton;\n//# sourceMappingURL=SocketedButton.js.map","function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }\nfunction _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }\nfunction _toPropertyKey(t) { var i = _toPrimitive(t, \"string\"); return \"symbol\" == typeof i ? i : i + \"\"; }\nfunction _toPrimitive(t, r) { if (\"object\" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || \"default\"); if (\"object\" != typeof i) return i; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (\"string\" === r ? String : Number)(t); }\nimport { LoadingOverlay } from '@deephaven/components';\nimport { lazy, Suspense } from 'react';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nvar Chart = /*#__PURE__*/lazy(() => import('./Chart.js'));\nfunction LazyChart(props) {\n return /*#__PURE__*/_jsx(Suspense, {\n fallback: /*#__PURE__*/_jsx(LoadingOverlay, {\n \"data-testid\": \"lazy-chart-loading\"\n }),\n children: /*#__PURE__*/_jsx(Chart, _objectSpread({}, props))\n });\n}\nexport default LazyChart;\n//# sourceMappingURL=LazyChart.js.map","function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }\nfunction _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }\nfunction _toPropertyKey(t) { var i = _toPrimitive(t, \"string\"); return \"symbol\" == typeof i ? i : i + \"\"; }\nfunction _toPrimitive(t, r) { if (\"object\" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || \"default\"); if (\"object\" != typeof i) return i; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (\"string\" === r ? String : Number)(t); }\nimport Log from '@deephaven/log';\nimport { TableUtils } from '@deephaven/jsapi-utils';\nimport { set } from 'lodash';\nimport { assertNotNull, bindAllMethods } from '@deephaven/utils';\nvar log = Log.module('ChartUtils');\nvar BUSINESS_COLUMN_TYPE = 'io.deephaven.time.DateTime';\nvar MILLIS_PER_HOUR = 3600000;\nvar NANOS_PER_MILLI = 1000000;\nfunction isDateWrapper(value) {\n return value.asDate !== undefined;\n}\nfunction isLongWrapper(value) {\n return value.asNumber !== undefined;\n}\nfunction isDateTimeColumnFormatter(value) {\n return value.dhTimeZone !== undefined;\n}\nfunction isRangedPlotlyAxis(value) {\n return value != null && value.range != null && (value.autorange === false || value.autorange === undefined);\n}\n\n/**\n * Check if WebGL is supported in the current environment.\n * Most modern browsers do support WebGL, but it's possible to disable it and it is also not available\n * in some headless environments, which can affect e2e tests.\n *\n * https://github.com/microsoft/playwright/issues/13146\n * https://bugzilla.mozilla.org/show_bug.cgi?id=1375585\n *\n * @returns True if Web GL is supported, false otherwise\n */\nexport function isWebGLSupported() {\n try {\n // https://developer.mozilla.org/en-US/docs/Web/API/WebGL_API/By_example/Detect_WebGL\n var canvas = document.createElement('canvas');\n var gl = canvas.getContext('webgl') || canvas.getContext('experimental-webgl');\n return gl != null && gl instanceof WebGLRenderingContext;\n } catch (e) {\n return false;\n }\n}\nvar IS_WEBGL_SUPPORTED = isWebGLSupported();\nclass ChartUtils {\n /**\n * Generate the plotly error bar data from the passed in data.\n * Iris passes in the values as absolute, plotly needs them as relative.\n * @param x The main data array\n * @param xLow The absolute low values\n * @param xHigh\n *\n * @returns The error_x object required by plotly, or null if none is required\n */\n static getPlotlyErrorBars(x, xLow, xHigh) {\n var array = xHigh.map((value, i) => value - x[i]);\n var arrayminus = xLow.map((value, i) => x[i] - value);\n return {\n type: 'data',\n symmetric: false,\n array,\n arrayminus\n };\n }\n static convertNumberPrefix(prefix) {\n return prefix.replace(/\\u00A4\\u00A4/g, 'USD').replace(/\\u00A4/g, '$');\n }\n static getPlotlyNumberFormat(formatter, columnType, formatPattern) {\n if (formatPattern == null || formatPattern === '') {\n return null;\n }\n\n // We translate java formatting: https://docs.oracle.com/javase/7/docs/api/java/text/DecimalFormat.html\n // Into d3 number formatting: https://github.com/d3/d3-format\n // We can't translate number formatting exactly, but should be able to translate the most common cases\n // First split it into the subpatterns; currently only handling the positive subpattern, ignoring the rest\n var subpatterns = formatPattern.split(';');\n var matchArray = subpatterns[0].match(/^([^#,0.]*)([#,]*)([0,]*)(\\.?)(0*)(#*)(E?0*)(%?)(.*)/);\n assertNotNull(matchArray);\n var [, prefix, placeholderDigits, zeroDigits,, decimalDigits, optionalDecimalDigits, numberType, percentSign, suffix] = matchArray;\n var paddingLength = zeroDigits.replace(',', '').length;\n var isCommaSeparated = placeholderDigits.indexOf(',') >= 0 || zeroDigits.indexOf(',') >= 0;\n var comma = isCommaSeparated ? ',' : '';\n var plotlyNumberType = numberType != null && numberType !== '' ? 'e' : 'f';\n var type = percentSign !== '' ? percentSign : plotlyNumberType;\n var decimalLength = decimalDigits.length + optionalDecimalDigits.length;\n // IDS-4565 Plotly uses an older version of d3 which doesn't support the trim option or negative brackets\n // If plotly updates it's d3 version, this should be re-enabled\n // const trimOption = optionalDecimalDigits.length > 0 ? '~' : '';\n var trimOption = '';\n var tickformat = \"0\".concat(paddingLength).concat(comma, \".\").concat(decimalLength).concat(trimOption).concat(type);\n var tickprefix = ChartUtils.convertNumberPrefix(prefix);\n // prefix and suffix are processed the same\n var ticksuffix = ChartUtils.convertNumberPrefix(suffix);\n return {\n tickformat,\n tickprefix,\n ticksuffix,\n automargin: true\n };\n }\n\n /**\n * Adds tick spacing for an axis that has gapBetweenMajorTicks defined.\n *\n * @param axisFormat the current axis format, may be null\n * @param axis the current axis\n * @param isDateType indicates if the columns is a date type\n */\n static addTickSpacing(axisFormat, axis, isDateType) {\n var {\n gapBetweenMajorTicks\n } = axis;\n if (gapBetweenMajorTicks != null && gapBetweenMajorTicks > 0) {\n var updatedFormat = axisFormat || {};\n var tickSpacing = gapBetweenMajorTicks;\n if (isDateType) {\n // Need to convert from nanoseconds to milliseconds\n tickSpacing = gapBetweenMajorTicks / NANOS_PER_MILLI;\n }\n if (axis.log) {\n tickSpacing = Math.log(tickSpacing);\n }\n // Note that tickmode defaults to 'auto'\n updatedFormat.tickmode = 'linear';\n updatedFormat.dtick = tickSpacing;\n return updatedFormat;\n }\n return axisFormat;\n }\n\n /**\n * Retrieve the data source for a given axis in a chart\n * @param chart The chart to get the source for\n * @param axis The axis to find the source for\n * @returns The first source matching this axis\n */\n static getSourceForAxis(chart, axis) {\n for (var i = 0; i < chart.series.length; i += 1) {\n var series = chart.series[i];\n for (var j = 0; j < series.sources.length; j += 1) {\n var source = series.sources[j];\n if (source.axis === axis) {\n return source;\n }\n }\n }\n return null;\n }\n\n /**\n * Get visibility setting for the series object\n * @param name The series name to get the visibility for\n * @param settings Chart settings\n * @returns True for visible series and 'legendonly' for hidden\n */\n static getSeriesVisibility(name, settings) {\n if (settings != null && settings.hiddenSeries != null && settings.hiddenSeries.includes(name)) {\n return 'legendonly';\n }\n return true;\n }\n\n /**\n * Get hidden labels array from chart settings\n * @param settings Chart settings\n * @returns Array of hidden series names\n */\n static getHiddenLabels(settings) {\n if (settings !== null && settings !== void 0 && settings.hiddenSeries) {\n return [...settings.hiddenSeries];\n }\n return [];\n }\n\n /**\n * Create a default series data object. Apply styling to the object afterward.\n * @returns A simple series data object with no styling\n */\n static makeSeriesData(type, mode, name, showLegend) {\n var orientation = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : ChartUtils.ORIENTATION.VERTICAL;\n return {\n type,\n mode,\n name,\n orientation,\n showlegend: showLegend !== null && showLegend !== void 0 ? showLegend : undefined\n };\n }\n\n /**\n * Get the Plotly marker symbol for the provided Deephaven shape\n * Deephaven shapes: https://deephaven.io/enterprise/docs/plotting/visual-formatting/#point-formatting\n * Plotly shapes: https://plotly.com/javascript/reference/scattergl/#scattergl-marker-symbol\n * Table of plotly shapes: https://plotly.com/python/marker-style/#custom-marker-symbols\n * @param deephavenShape Deephaven shape to get the marker symbol for\n */\n static getMarkerSymbol(deephavenShape) {\n switch (deephavenShape) {\n case 'SQUARE':\n return 'square';\n case 'CIRCLE':\n return 'circle';\n case 'DIAMOND':\n return 'diamond';\n case 'UP_TRIANGLE':\n return 'triangle-up';\n case 'DOWN_TRIANGLE':\n return 'triangle-down';\n case 'RIGHT_TRIANGLE':\n return 'triangle-right';\n case 'LEFT_TRIANGLE':\n return 'triangle-left';\n // There don't seem to be any plotly equivalents for ellipse or rectangles\n // Rectangles could be `line-ew`, `line-ns`, or `hourglass` and `bowtie` instead?\n // Ellipse could be `asterisk` or `diamond-wide` instead?\n // Just throw an error, we've already got a bunch of types.\n case 'ELLIPSE':\n case 'HORIZONTAL_RECTANGLE':\n case 'VERTICAL_RECTANGLE':\n default:\n throw new Error(\"Unrecognized shape \".concat(deephavenShape));\n }\n }\n\n /**\n * Get all axes for a given `Figure`. Iterates through all charts axes and concatenates them.\n * @param figure Figure to get all axes for\n */\n static getAllAxes(figure) {\n return figure.charts.reduce((axes, chart) => [...axes, ...chart.axes], []);\n }\n\n /**\n * Get the axis type map for the figure provided\n * @param figure Figure to get the type map for\n * @returns Axis type map for the figure provided\n */\n static getAxisTypeMap(figure) {\n var axes = ChartUtils.getAllAxes(figure);\n return ChartUtils.groupArray(axes, 'type');\n }\n\n /**\n * Retrieve the chart that contains the passed in series from the figure\n * @param figure The figure to retrieve the chart from\n * @param series The series to get the chart for\n */\n static getChartForSeries(figure, series) {\n var {\n charts\n } = figure;\n for (var i = 0; i < charts.length; i += 1) {\n var _chart = charts[i];\n for (var j = 0; j < _chart.series.length; j += 1) {\n if (series === _chart.series[j]) {\n return _chart;\n }\n }\n }\n return null;\n }\n\n /**\n * Get an object mapping axis to their ranges\n * @param layout The plotly layout object to get the ranges from\n * @returns An object mapping the axis name to it's range\n */\n static getLayoutRanges(layout) {\n var ranges = {};\n var keys = Object.keys(layout).filter(key => key.indexOf('axis') >= 0);\n for (var i = 0; i < keys.length; i += 1) {\n var key = keys[i];\n var value = layout[key];\n if (isRangedPlotlyAxis(value)) {\n // Only want to add the range if it's not autoranged\n ranges[key] = [...value.range];\n }\n }\n return ranges;\n }\n static getAxisLayoutProperty(axisProperty, axisIndex) {\n var axisIndexString = axisIndex > 0 ? \"\".concat(axisIndex + 1) : '';\n return \"\".concat(axisProperty !== null && axisProperty !== void 0 ? axisProperty : '', \"axis\").concat(axisIndexString);\n }\n\n /**\n * Converts an open or close period to a declimal. e.g '09:30\" to 9.5\n *\n * @param period the open or close value of the period\n */\n static periodToDecimal(period) {\n var values = period.split(':');\n return Number(values[0]) + Number(values[1]) / 60;\n }\n\n /**\n * Converts a decimal to a period. e.g 9.5 to '09:30'\n *\n * @param decimal the decimal value to\n */\n static decimalToPeriod(decimal) {\n var hours = Math.floor(decimal);\n var minutes = Math.round((decimal - hours) * 60);\n return \"\".concat(hours.toString().padStart(2, '0'), \":\").concat(minutes.toString().padStart(2, '0'));\n }\n\n /**\n * Groups an array and returns a map\n * @param array The object to group\n * @param property The property name to group by\n * @returns A map containing the items grouped by their values for the property\n */\n static groupArray(array, property) {\n return array.reduce((result, item) => {\n var _result$get;\n var key = item[property];\n var group = (_result$get = result.get(key)) !== null && _result$get !== void 0 ? _result$get : [];\n group.push(item);\n result.set(key, group);\n return result;\n }, new Map());\n }\n\n /**\n * Parses the colorway value of a theme and returns an array of colors\n * Value could be a single string with space separated colors or already be an\n * array of strings representing the colorway\n * @param colorway The colorway value to normalize\n * @returns Colorway array for the theme or undefined\n */\n static normalizeColorway(colorway) {\n if (colorway == null) {\n return;\n }\n if (Array.isArray(colorway)) {\n return colorway;\n }\n if (typeof colorway === 'string') {\n return colorway.split(' ');\n }\n log.warn(\"Unexpected colorway format: \".concat(colorway));\n }\n static titleFromSettings(settings) {\n var {\n series,\n xAxis,\n title = \"\".concat((series !== null && series !== void 0 ? series : []).join(', '), \" by \").concat(xAxis)\n } = settings;\n return title;\n }\n static getTimeZoneDiff(calendarTimeZone, formatterTimeZone) {\n return formatterTimeZone ? (calendarTimeZone.standardOffset - formatterTimeZone.standardOffset) / 60 : 0;\n }\n\n /**\n * Creates closed periods for a partial holiday.\n *\n * @param holidayPeriods the business periods for the holiday\n * @param calendarPeriods the business periods for the calendar\n * @returns an array of closed ranges for the partial holiday. Should be the ranges during the regular business hours that are _not_ specified by the holiday periods.\n */\n static createClosedRangesForPartialHoliday(holidayPeriods, calendarPeriods) {\n // First restrict the periods to only those that are actual business periods.\n var calendarRanges = calendarPeriods.map(period => [ChartUtils.periodToDecimal(period.open), ChartUtils.periodToDecimal(period.close)]);\n calendarRanges.sort((a, b) => a[0] - b[0]);\n if (calendarRanges.length === 0) {\n calendarRanges.push([0, 24]);\n }\n var holidayRanges = holidayPeriods.map(period => [ChartUtils.periodToDecimal(period.open), ChartUtils.periodToDecimal(period.close)]);\n holidayRanges.sort((a, b) => a[0] - b[0]);\n var closedRanges = [];\n\n // Separate index cursor for the holiday ranges\n for (var c = 0; c < calendarRanges.length; c += 1) {\n var calendarRange = calendarRanges[c];\n var lastClose = calendarRange[0];\n for (var h = 0; h < holidayRanges.length; h += 1) {\n var holidayRange = holidayRanges[h];\n if (holidayRange[1] > lastClose && holidayRange[0] < calendarRange[1]) {\n if (holidayRange[0] > lastClose) {\n closedRanges.push([lastClose, holidayRange[0]]);\n }\n // eslint-disable-next-line prefer-destructuring\n lastClose = holidayRange[1];\n }\n }\n if (lastClose < calendarRange[1]) {\n closedRanges.push([lastClose, calendarRange[1]]);\n }\n }\n return closedRanges;\n }\n constructor(dh) {\n _defineProperty(this, \"dh\", void 0);\n _defineProperty(this, \"daysOfWeek\", void 0);\n this.dh = dh;\n this.daysOfWeek = Object.freeze(dh.calendar.DayOfWeek.values());\n bindAllMethods(this);\n }\n\n /**\n * Retrieve the axis formats from the provided figure.\n * Currently defaults to just the x/y axes.\n * @param figure The figure to get the axis formats for\n * @param formatter The formatter to use when getting the axis format\n * @returns A map of axis layout property names to axis formats\n */\n getAxisFormats(figure, formatter) {\n var axisFormats = new Map();\n var nullFormat = {\n tickformat: null,\n ticksuffix: null\n };\n var allAxes = ChartUtils.getAllAxes(figure);\n var axisTypeMap = ChartUtils.groupArray(allAxes, 'type');\n var {\n charts\n } = figure;\n for (var i = 0; i < charts.length; i += 1) {\n var _chart2 = charts[i];\n for (var j = 0; j < _chart2.series.length; j += 1) {\n var series = _chart2.series[j];\n var {\n sources\n } = series;\n var axisSources = sources.filter(source => source.axis);\n for (var k = 0; k < axisSources.length; k += 1) {\n var source = axisSources[k];\n var {\n axis: _axis\n } = source;\n var {\n type: axisType\n } = _axis;\n var typeAxes = axisTypeMap.get(axisType);\n assertNotNull(typeAxes);\n var axisIndex = typeAxes.indexOf(_axis);\n var axisProperty = this.getAxisPropertyName(axisType);\n if (axisProperty != null) {\n var axisLayoutProperty = ChartUtils.getAxisLayoutProperty(axisProperty, axisIndex);\n if (axisFormats.has(axisLayoutProperty)) {\n log.debug(\"\".concat(axisLayoutProperty, \" already added.\"));\n } else {\n log.debug(\"Adding \".concat(axisLayoutProperty, \" to axisFormats.\"));\n var axisFormat = this.getPlotlyAxisFormat(source, formatter);\n if (axisFormat === null) {\n axisFormats.set(axisLayoutProperty, nullFormat);\n } else {\n axisFormats.set(axisLayoutProperty, axisFormat);\n var {\n businessCalendar\n } = _axis;\n if (businessCalendar != null) {\n axisFormat.rangebreaks = this.createRangeBreaksFromBusinessCalendar(businessCalendar, formatter);\n }\n if (axisFormats.size === _chart2.axes.length) {\n return axisFormats;\n }\n }\n }\n }\n }\n }\n }\n return axisFormats;\n }\n\n /**\n * Converts the Iris plot style into a plotly chart type\n * @param plotStyle The plotStyle to use, see dh.plot.SeriesPlotStyle\n * @param isBusinessTime If the plot is using business time for an axis\n * @param allowWebGL If WebGL is allowedd\n */\n getPlotlyChartType(plotStyle, isBusinessTime) {\n var allowWebGL = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;\n var {\n dh\n } = this;\n switch (plotStyle) {\n case dh.plot.SeriesPlotStyle.SCATTER:\n case dh.plot.SeriesPlotStyle.LINE:\n // scattergl mode is more performant (usually), but doesn't support the rangebreaks we need for businessTime calendars\n // In some cases, WebGL is less performant (like in virtual desktop environments), so we also allow the option of the user explicitly disabling it even if it's supported\n return !isBusinessTime && IS_WEBGL_SUPPORTED && allowWebGL ? 'scattergl' : 'scatter';\n case dh.plot.SeriesPlotStyle.BAR:\n case dh.plot.SeriesPlotStyle.STACKED_BAR:\n return 'bar';\n case dh.plot.SeriesPlotStyle.PIE:\n return 'pie';\n case dh.plot.SeriesPlotStyle.TREEMAP:\n return 'treemap';\n case dh.plot.SeriesPlotStyle.HISTOGRAM:\n return 'histogram';\n case dh.plot.SeriesPlotStyle.OHLC:\n return 'ohlc';\n default:\n return undefined;\n }\n }\n\n /**\n * Converts the Iris plot style into a plotly chart mode\n * @param plotStyle The plotStyle to use, see dh.plot.SeriesPlotStyle.*\n * @param areLinesVisible Whether lines are visible or not\n * @param areShapesVisible Whether shapes are visible or not\n */\n getPlotlyChartMode(plotStyle, areLinesVisible, areShapesVisible) {\n var {\n dh\n } = this;\n var modes = new Set();\n switch (plotStyle) {\n case dh.plot.SeriesPlotStyle.SCATTER:\n // Default to only showing shapes in scatter plots\n if (areLinesVisible !== null && areLinesVisible !== void 0 ? areLinesVisible : false) {\n modes.add(ChartUtils.MODE_LINES);\n }\n if (areShapesVisible !== null && areShapesVisible !== void 0 ? areShapesVisible : true) {\n modes.add(ChartUtils.MODE_MARKERS);\n }\n break;\n case dh.plot.SeriesPlotStyle.LINE:\n // Default to only showing lines in line series\n if (areLinesVisible !== null && areLinesVisible !== void 0 ? areLinesVisible : true) {\n modes.add(ChartUtils.MODE_LINES);\n }\n if (areShapesVisible !== null && areShapesVisible !== void 0 ? areShapesVisible : false) {\n modes.add(ChartUtils.MODE_MARKERS);\n }\n break;\n default:\n break;\n }\n return modes.size > 0 ? [...modes].join('+') : undefined;\n }\n\n /**\n * Get the property to set on the series data for plotly\n * @param plotStyle The plot style of the series\n * @param sourceType The source type for the series\n */\n getPlotlyProperty(plotStyle, sourceType) {\n var {\n dh\n } = this;\n switch (plotStyle) {\n case dh.plot.SeriesPlotStyle.PIE:\n switch (sourceType) {\n case dh.plot.SourceType.X:\n return 'labels';\n case dh.plot.SourceType.Y:\n return 'values';\n default:\n break;\n }\n break;\n case dh.plot.SeriesPlotStyle.OHLC:\n switch (sourceType) {\n case dh.plot.SourceType.TIME:\n return 'x';\n default:\n break;\n }\n break;\n case dh.plot.SeriesPlotStyle.TREEMAP:\n switch (sourceType) {\n case dh.plot.SourceType.X:\n return 'ids';\n case dh.plot.SourceType.Y:\n return 'values';\n case dh.plot.SourceType.LABEL:\n return 'labels';\n case dh.plot.SourceType.PARENT:\n return 'parents';\n case dh.plot.SourceType.COLOR:\n return 'marker.colors';\n default:\n break;\n }\n break;\n default:\n break;\n }\n switch (sourceType) {\n case dh.plot.SourceType.X:\n return 'x';\n case dh.plot.SourceType.Y:\n return 'y';\n case dh.plot.SourceType.Z:\n return 'z';\n case dh.plot.SourceType.X_LOW:\n return 'xLow';\n case dh.plot.SourceType.X_HIGH:\n return 'xHigh';\n case dh.plot.SourceType.Y_LOW:\n return 'yLow';\n case dh.plot.SourceType.Y_HIGH:\n return 'yHigh';\n case dh.plot.SourceType.TIME:\n return 'time';\n case dh.plot.SourceType.OPEN:\n return 'open';\n case dh.plot.SourceType.HIGH:\n return 'high';\n case dh.plot.SourceType.LOW:\n return 'low';\n case dh.plot.SourceType.CLOSE:\n return 'close';\n case dh.plot.SourceType.SHAPE:\n return 'shape';\n case dh.plot.SourceType.SIZE:\n return 'size';\n case dh.plot.SourceType.LABEL:\n return 'label';\n case dh.plot.SourceType.COLOR:\n return 'color';\n case dh.plot.SourceType.PARENT:\n return 'parent';\n case dh.plot.SourceType.HOVER_TEXT:\n return 'hovertext';\n case dh.plot.SourceType.TEXT:\n return 'text';\n default:\n throw new Error(\"Unrecognized source type: \".concat(sourceType));\n }\n }\n getPlotlySeriesOrientation(series) {\n var _sources$;\n var {\n dh\n } = this;\n var {\n sources\n } = series;\n if (sources.length === 2 && ((_sources$ = sources[0]) === null || _sources$ === void 0 || (_sources$ = _sources$.axis) === null || _sources$ === void 0 ? void 0 : _sources$.type) === dh.plot.AxisType.Y) {\n return ChartUtils.ORIENTATION.HORIZONTAL;\n }\n return ChartUtils.ORIENTATION.VERTICAL;\n }\n\n /**\n * Create a data series (trace) for use with plotly\n * @param series The series to create the series data with\n * @param axisTypeMap The map of axes grouped by type\n * @param seriesVisibility Visibility setting for the series\n * @returns The series data (trace) object for use with plotly.\n */\n makeSeriesDataFromSeries(series, axisTypeMap, seriesVisibility) {\n var showLegend = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;\n var allowWebGL = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : true;\n var {\n name,\n isLinesVisible,\n isShapesVisible,\n plotStyle,\n lineColor,\n shapeColor,\n sources,\n shape,\n shapeSize\n } = series;\n var isBusinessTime = sources.some(source => {\n var _source$axis;\n return (_source$axis = source.axis) === null || _source$axis === void 0 ? void 0 : _source$axis.businessCalendar;\n });\n var type = this.getChartType(plotStyle, isBusinessTime, allowWebGL);\n var mode = this.getPlotlyChartMode(plotStyle, isLinesVisible !== null && isLinesVisible !== void 0 ? isLinesVisible : undefined, isShapesVisible !== null && isShapesVisible !== void 0 ? isShapesVisible : undefined);\n var orientation = this.getPlotlySeriesOrientation(series);\n var seriesData = ChartUtils.makeSeriesData(type, mode, name, showLegend, orientation);\n this.addSourcesToSeriesData(seriesData, plotStyle, sources, axisTypeMap);\n this.addStylingToSeriesData(seriesData, plotStyle, lineColor, shapeColor, shape, shapeSize, seriesVisibility);\n return seriesData;\n }\n addSourcesToSeriesData(seriesDataParam, plotStyle, sources, axisTypeMap) {\n var seriesData = seriesDataParam;\n for (var k = 0; k < sources.length; k += 1) {\n var source = sources[k];\n var {\n axis: _axis2,\n type: sourceType\n } = source;\n var dataAttributeName = this.getPlotlyProperty(plotStyle, sourceType);\n set(seriesData, dataAttributeName, []);\n var axisProperty = _axis2 != null ? this.getAxisPropertyName(_axis2.type) : null;\n if (axisProperty != null) {\n var axes = axisTypeMap.get(_axis2.type);\n if (axes) {\n var axisIndex = axes.indexOf(_axis2);\n var axisIndexString = axisIndex > 0 ? \"\".concat(axisIndex + 1) : '';\n seriesData[\"\".concat(axisProperty, \"axis\")] = \"\".concat(axisProperty).concat(axisIndexString);\n }\n }\n }\n }\n addStylingToSeriesData(seriesDataParam, plotStyle) {\n var lineColor = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;\n var shapeColor = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;\n var shape = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : null;\n var shapeSize = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : null;\n var seriesVisibility = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : null;\n var {\n dh\n } = this;\n var seriesData = seriesDataParam;\n // Add some empty objects so we can fill them in later with details without checking for existence\n seriesData.marker = {\n line: {}\n }; // border line width on markers\n seriesData.line = {\n width: 1 // default line width for lines, should eventually be able to override\n };\n if (plotStyle === dh.plot.SeriesPlotStyle.AREA) {\n seriesData.fill = 'tozeroy';\n } else if (plotStyle === dh.plot.SeriesPlotStyle.STACKED_AREA) {\n seriesData.stackgroup = 'stack';\n } else if (plotStyle === dh.plot.SeriesPlotStyle.STEP) {\n seriesData.line.shape = 'hv'; // plot.ly horizontal then vertical step styling\n } else if (plotStyle === dh.plot.SeriesPlotStyle.HISTOGRAM) {\n // The default histfunc in plotly is 'count', but the data passed up from the API provides explicit x/y values and bins\n // Since it's converted to bar, just set the widths of each bar\n seriesData.width = [];\n } else if (plotStyle === dh.plot.SeriesPlotStyle.PIE) {\n seriesData.textinfo = 'label+percent';\n } else if (plotStyle === dh.plot.SeriesPlotStyle.TREEMAP) {\n seriesData.hoverinfo = 'text';\n seriesData.textinfo = 'label+text';\n seriesData.tiling = {\n packing: 'squarify',\n pad: 0\n };\n seriesData.textposition = 'middle center';\n }\n if (lineColor != null) {\n if (plotStyle === dh.plot.SeriesPlotStyle.BAR) {\n seriesData.marker.color = lineColor;\n } else {\n seriesData.line.color = lineColor;\n }\n }\n if (shapeColor != null) {\n seriesData.marker.color = shapeColor;\n }\n if (shape != null && shape.length > 0) {\n try {\n seriesData.marker.symbol = ChartUtils.getMarkerSymbol(shape);\n } catch (e) {\n log.warn('Unable to handle shape', shape, ':', e);\n }\n }\n if (shapeSize != null) {\n seriesData.marker.size = shapeSize * ChartUtils.DEFAULT_MARKER_SIZE;\n }\n\n // Skipping pie charts\n // Pie slice visibility is configured in chart layout instead of series data\n if (seriesVisibility != null && plotStyle !== dh.plot.SeriesPlotStyle.PIE) {\n seriesData.visible = seriesVisibility;\n }\n }\n getChartType(plotStyle, isBusinessTime) {\n var allowWebGL = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;\n var {\n dh\n } = this;\n switch (plotStyle) {\n case dh.plot.SeriesPlotStyle.HISTOGRAM:\n // When reading data from the `Figure`, it already provides bins and values, so rather than using\n // plot.ly to calculate the bins and sum values, just convert it to a bar chart\n return 'bar';\n default:\n return this.getPlotlyChartType(plotStyle, isBusinessTime, allowWebGL);\n }\n }\n\n /**\n * Return the plotly axis property name\n * @param axisType The axis type to get the property name for\n */\n getAxisPropertyName(axisType) {\n var {\n dh\n } = this;\n switch (axisType) {\n case dh.plot.AxisType.X:\n return 'x';\n case dh.plot.AxisType.Y:\n return 'y';\n default:\n return null;\n }\n }\n\n /**\n * Returns the plotly \"side\" value for the provided axis position\n * @param axisPosition The Iris AxisPosition of the axis\n */\n getAxisSide(axisPosition) {\n var {\n dh\n } = this;\n switch (axisPosition) {\n case dh.plot.AxisPosition.BOTTOM:\n return 'bottom';\n case dh.plot.AxisPosition.TOP:\n return 'top';\n case dh.plot.AxisPosition.LEFT:\n return 'left';\n case dh.plot.AxisPosition.RIGHT:\n return 'right';\n default:\n return undefined;\n }\n }\n\n /**\n * Update the layout with all the axes information for the provided figure\n * @param figure Figure to update the axes for\n * @param layoutParam Layout object to update in place\n * @param chartAxisRangeParser Function to retrieve the axis range parser\n * @param plotWidth Width of the plot in pixels\n * @param plotHeight Height of the plot in pixels\n */\n updateFigureAxes(layoutParam, figure, chartAxisRangeParser) {\n var plotWidth = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;\n var plotHeight = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 0;\n var layout = layoutParam;\n var figureAxes = ChartUtils.getAllAxes(figure);\n for (var i = 0; i < figure.charts.length; i += 1) {\n var _chart3 = figure.charts[i];\n var axisRangeParser = chartAxisRangeParser === null || chartAxisRangeParser === void 0 ? void 0 : chartAxisRangeParser(_chart3);\n var bounds = this.getChartBounds(figure, _chart3, plotWidth, plotHeight);\n this.updateLayoutAxes(layout, _chart3.axes, figureAxes, plotWidth, plotHeight, bounds, axisRangeParser);\n }\n this.removeStaleAxes(layout, figureAxes);\n }\n getChartBounds(figure, chart, plotWidth, plotHeight) {\n var _axisPositionMap$get;\n var {\n dh\n } = this;\n var {\n cols,\n rows\n } = figure;\n var {\n column,\n colspan,\n row,\n rowspan\n } = chart;\n var endColumn = column + colspan;\n var endRow = row + rowspan;\n var columnSize = 1 / cols;\n var rowSize = 1 / rows;\n var xMarginSize = ChartUtils.AXIS_SIZE_PX / plotWidth;\n var yMarginSize = ChartUtils.AXIS_SIZE_PX / plotHeight;\n var bounds = {\n // Need to invert the row positioning so the first one defined shows up on top instead of the bottom, since coordinates start in bottom left\n bottom: (rows - endRow) * rowSize + (endRow < rows ? yMarginSize / 2 : 0),\n top: (rows - row) * rowSize - (row > 0 ? yMarginSize / 2 : 0),\n left: column * columnSize + (column > 0 ? xMarginSize / 2 : 0),\n right: endColumn * columnSize - (endColumn < cols ? xMarginSize / 2 : 0)\n };\n\n // Adjust the bounds based on where the legend is\n // For now, always assume the legend is shown on the right\n var axisPositionMap = ChartUtils.groupArray(chart.axes, 'position');\n var rightAxes = (_axisPositionMap$get = axisPositionMap.get(dh.plot.AxisPosition.RIGHT)) !== null && _axisPositionMap$get !== void 0 ? _axisPositionMap$get : [];\n if (rightAxes.length > 0) {\n if (plotWidth > 0) {\n bounds.right -= (bounds.right - bounds.left) * Math.max(0, Math.min(ChartUtils.LEGEND_WIDTH_PX / plotWidth, ChartUtils.MAX_LEGEND_SIZE));\n } else {\n bounds.right -= (bounds.right - bounds.left) * ChartUtils.DEFAULT_AXIS_SIZE;\n }\n }\n return bounds;\n }\n getPlotlyDateFormat(formatter, columnType, formatPattern) {\n var {\n dh\n } = this;\n var tickformat = formatPattern == null ? undefined : formatPattern.replace('%', '%%').replace(/S{9}/g, '%9f').replace(/S{8}/g, '%8f').replace(/S{7}/g, '%7f').replace(/S{6}/g, '%6f').replace(/S{5}/g, '%5f').replace(/S{4}/g, '%4f').replace(/S{3}/g, '%3f').replace(/S{2}/g, '%2f').replace(/S{1}/g, '%1f').replace(/y{4}/g, '%Y').replace(/y{2}/g, '%y').replace(/M{4}/g, '%B').replace(/M{3}/g, '%b').replace(/M{2}/g, '%m').replace(/M{1}/g, '%-m').replace(/E{4,}/g, '%A').replace(/E{1,}/g, '%a').replace(/d{2}/g, '%d').replace(/([^%]|^)d{1}/g, '$1%-d').replace(/H{2}/g, '%H').replace(/h{2}/g, '%I').replace(/h{1}/g, '%-I').replace(/m{2}/g, '%M').replace(/s{2}/g, '%S').replace(\"'T'\", 'T').replace(' z', ''); // timezone added as suffix if necessary\n\n var ticksuffix;\n var dataFormatter = formatter === null || formatter === void 0 ? void 0 : formatter.getColumnTypeFormatter(columnType);\n if (dataFormatter != null && isDateTimeColumnFormatter(dataFormatter) && dataFormatter.dhTimeZone != null && dataFormatter.showTimeZone) {\n ticksuffix = dh.i18n.DateTimeFormat.format(' z', new Date(), dataFormatter.dhTimeZone);\n }\n return {\n tickformat,\n ticksuffix,\n automargin: true\n };\n }\n\n /**\n * Gets the plotly axis formatting information from the source passed in\n * @param source The Source to get the formatter information from\n * @param formatter The current formatter for formatting data\n */\n getPlotlyAxisFormat(source) {\n var formatter = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n var {\n dh\n } = this;\n var {\n axis,\n columnType\n } = source;\n var {\n formatPattern\n } = axis;\n var axisFormat = null;\n if (TableUtils.isDateType(columnType)) {\n axisFormat = this.getPlotlyDateFormat(formatter, columnType, formatPattern);\n axisFormat = ChartUtils.addTickSpacing(axisFormat, axis, true);\n } else if (TableUtils.isNumberType(columnType)) {\n axisFormat = ChartUtils.getPlotlyNumberFormat(formatter, columnType, formatPattern);\n axisFormat = ChartUtils.addTickSpacing(axisFormat, axis, false);\n }\n if (axis.formatType === dh.plot.AxisFormatType.CATEGORY) {\n if (axisFormat) {\n axisFormat.type = 'category';\n } else {\n axisFormat = {\n type: 'category',\n tickformat: undefined,\n ticksuffix: undefined\n };\n }\n }\n return axisFormat;\n }\n\n /**\n * Updates the axes positions and sizes in the layout object provided.\n * If the axis did not exist in the layout previously, it is created and added.\n * Any axis that no longer exists in axes is removed.\n * With Downsampling enabled, will also update the range on the axis itself as appropriate\n * @param layoutParam The layout object to update\n * @param chartAxes The chart axes to update the layout with\n * @param figureAxes All figure axes to update the layout with\n * @param plotWidth The width of the plot to calculate the axis sizes for\n * @param plotHeight The height of the plot to calculate the axis sizes for\n * @param bounds The bounds for this set of axes\n * @param axisRangeParser A function to retrieve the range parser for a given axis\n */\n updateLayoutAxes(layoutParam, chartAxes, figureAxes) {\n var plotWidth = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;\n var plotHeight = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 0;\n var bounds = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : {\n left: 0,\n top: 0,\n right: 1,\n bottom: 1\n };\n var axisRangeParser = arguments.length > 6 ? arguments[6] : undefined;\n var {\n dh\n } = this;\n var xAxisSize = plotWidth > 0 ? Math.max(ChartUtils.MIN_AXIS_SIZE, Math.min(ChartUtils.AXIS_SIZE_PX / plotHeight, ChartUtils.MAX_AXIS_SIZE)) : ChartUtils.DEFAULT_AXIS_SIZE;\n var yAxisSize = plotHeight > 0 ? Math.max(ChartUtils.MIN_AXIS_SIZE, Math.min(ChartUtils.AXIS_SIZE_PX / plotWidth, ChartUtils.MAX_AXIS_SIZE)) : ChartUtils.DEFAULT_AXIS_SIZE;\n var layout = layoutParam;\n var axisPositionMap = ChartUtils.groupArray(chartAxes, 'position');\n var axisTypeMap = ChartUtils.groupArray(chartAxes, 'type');\n var axisTypes = [...axisTypeMap.keys()];\n var figureAxisTypeMap = ChartUtils.groupArray(figureAxes, 'type');\n for (var j = 0; j < axisTypes.length; j += 1) {\n var axisType = axisTypes[j];\n var axisProperty = this.getAxisPropertyName(axisType);\n if (axisProperty != null) {\n var typeAxes = axisTypeMap.get(axisType);\n var figureTypeAxes = figureAxisTypeMap.get(axisType);\n var isYAxis = axisType === dh.plot.AxisType.Y;\n var plotSize = isYAxis ? plotHeight : plotWidth;\n assertNotNull(typeAxes);\n assertNotNull(figureTypeAxes);\n for (var chartAxisIndex = 0; chartAxisIndex < typeAxes.length; chartAxisIndex += 1) {\n var _axis3 = typeAxes[chartAxisIndex];\n var figureAxisIndex = figureTypeAxes.indexOf(_axis3);\n var axisLayoutProperty = ChartUtils.getAxisLayoutProperty(axisProperty, figureAxisIndex);\n if (layout[axisLayoutProperty] == null) {\n layout[axisLayoutProperty] = {};\n }\n var layoutAxis = layout[axisLayoutProperty];\n if (layoutAxis != null) {\n this.updateLayoutAxis(layoutAxis, _axis3, chartAxisIndex, axisPositionMap, xAxisSize, yAxisSize, bounds);\n var {\n range: _range,\n autorange\n } = layoutAxis;\n if (axisRangeParser != null && _range !== undefined && (autorange === undefined || autorange === false)) {\n var rangeParser = axisRangeParser(_axis3);\n var [rangeStart, rangeEnd] = rangeParser(_range);\n log.debug('Setting downsample range', plotSize, rangeStart, rangeEnd);\n _axis3.range(plotSize, rangeStart, rangeEnd);\n } else {\n _axis3.range(plotSize);\n }\n }\n }\n }\n }\n }\n\n /**\n * Remove any axes from the layout param that no longer belong to any series\n * @param layoutParam Layout object to remove stale axes from\n * @param axes All axes in the figure\n */\n removeStaleAxes(layoutParam, axes) {\n var layout = layoutParam;\n var figureAxisTypeMap = ChartUtils.groupArray(axes, 'type');\n var figureAxisTypes = [...figureAxisTypeMap.keys()];\n for (var i = 0; i < figureAxisTypes.length; i += 1) {\n var axisType = figureAxisTypes[i];\n var typeAxes = figureAxisTypeMap.get(axisType);\n assertNotNull(typeAxes);\n var axisIndex = typeAxes.length;\n // Delete any axes that may no longer exist\n var axisProperty = this.getAxisPropertyName(axisType);\n if (axisProperty != null) {\n var axisLayoutProperty = ChartUtils.getAxisLayoutProperty(axisProperty, axisIndex);\n while (layout[axisLayoutProperty] != null) {\n delete layout[axisLayoutProperty];\n axisIndex += 1;\n axisLayoutProperty = ChartUtils.getAxisLayoutProperty(axisProperty, axisIndex);\n }\n }\n }\n }\n\n /**\n * Updates the layout axis object in place\n * @param layoutAxisParam The plotly layout axis param\n * @param axis The Iris Axis to update the plotly layout with\n * @param axisIndex The type index for this axis\n * @param axisPositionMap All the axes mapped by position\n * @param axisSize The size of each axis in percent\n * @param bounds The bounds of the axes domains\n */\n updateLayoutAxis(layoutAxisParam, axis, axisIndex, axisPositionMap, xAxisSize, yAxisSize, bounds) {\n var _axis$label;\n var {\n dh\n } = this;\n var isYAxis = axis.type === dh.plot.AxisType.Y;\n var axisSize = isYAxis ? yAxisSize : xAxisSize;\n var layoutAxis = layoutAxisParam;\n // Enterprise API returns null for empty axis labels\n // Passing null title text to Plotly results in incorrect axis position, DH-9164\n var label = (_axis$label = axis.label) !== null && _axis$label !== void 0 ? _axis$label : '';\n if (layoutAxis.title !== undefined && typeof layoutAxis.title !== 'string') {\n layoutAxis.title.text = label;\n } else {\n layoutAxis.title = {\n text: label\n };\n }\n if (axis.log) {\n layoutAxis.type = 'log';\n }\n layoutAxis.side = this.getAxisSide(axis.position);\n if (axisIndex > 0) {\n var _this$getAxisProperty, _axisPositionMap$get2;\n layoutAxis.overlaying = (_this$getAxisProperty = this.getAxisPropertyName(axis.type)) !== null && _this$getAxisProperty !== void 0 ? _this$getAxisProperty : undefined;\n var positionAxes = (_axisPositionMap$get2 = axisPositionMap.get(axis.position)) !== null && _axisPositionMap$get2 !== void 0 ? _axisPositionMap$get2 : [];\n var sideIndex = positionAxes.indexOf(axis);\n if (sideIndex > 0) {\n layoutAxis.anchor = 'free';\n if (axis.position === dh.plot.AxisPosition.RIGHT) {\n layoutAxis.position = bounds.right + (sideIndex - positionAxes.length + 1) * axisSize;\n } else if (axis.position === dh.plot.AxisPosition.TOP) {\n layoutAxis.position = bounds.top + (sideIndex - positionAxes.length + 1) * axisSize;\n } else if (axis.position === dh.plot.AxisPosition.BOTTOM) {\n layoutAxis.position = bounds.bottom + (positionAxes.length - sideIndex + 1) * axisSize;\n } else if (axis.position === dh.plot.AxisPosition.LEFT) {\n layoutAxis.position = bounds.left + (positionAxes.length - sideIndex + 1) * axisSize;\n }\n }\n } else if (axis.type === dh.plot.AxisType.X) {\n var leftAxes = axisPositionMap.get(dh.plot.AxisPosition.LEFT) || [];\n var rightAxes = axisPositionMap.get(dh.plot.AxisPosition.RIGHT) || [];\n var left = Math.max(bounds.left, bounds.left + (leftAxes.length - 1) * yAxisSize);\n var right = Math.min(bounds.right - (rightAxes.length - 1) * yAxisSize, bounds.right);\n layoutAxis.domain = [left, right];\n } else if (axis.type === dh.plot.AxisType.Y) {\n var bottomAxes = axisPositionMap.get(dh.plot.AxisPosition.BOTTOM) || [];\n var topAxes = axisPositionMap.get(dh.plot.AxisPosition.TOP) || [];\n var bottom = Math.max(bounds.bottom, bounds.bottom + (bottomAxes.length - 1) * xAxisSize);\n var top = Math.min(bounds.top - (topAxes.length - 1) * xAxisSize, bounds.top);\n layoutAxis.domain = [bottom, top];\n }\n\n // autorangeoptions exists in plotly.js but not in the types\n // axis.range only applies to the initial axis range, can't handle specifying min or max independently,\n // and cannot be returned to if the user changes the range via interaction\n // minallowed and maxallowed can be set independently and can be returned to if the user changes\n // the range via interaction\n var {\n minRange,\n maxRange,\n log: logAxis\n } = axis;\n if (!Number.isNaN(minRange) || !Number.isNaN(maxRange)) {\n layoutAxis.autorangeoptions = {};\n if (!Number.isNaN(minRange)) {\n layoutAxis.autorangeoptions.minallowed = logAxis ? Math.log10(minRange) : minRange;\n }\n if (!Number.isNaN(maxRange)) {\n layoutAxis.autorangeoptions.maxallowed = logAxis ? Math.log10(maxRange) : maxRange;\n }\n }\n }\n\n /**\n * Creates the bounds for the periods specified.\n * For example, if you pass in [['09:00', '17:00']], it will return [17, 9] (closing at 5pm, opening at 9am the next day)\n * If you pass [['09:00', '12:00'], ['13:00', '17:00']], it will return [12, 13] (closing at noon, opening at 1pm) and [17, 9] (closing at 5pm, opening at 9am the next day)\n * @param periods Periods to map\n * @param timeZoneDiff Time zone difference in hours\n * @returns Bounds for the periods in plotly format\n */\n // eslint-disable-next-line class-methods-use-this\n createBoundsFromPeriods(periods) {\n var timeZoneDiff = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n if (periods.length === 0) {\n return [];\n }\n var numberPeriods = periods.map(period => [(ChartUtils.periodToDecimal(period.open) + timeZoneDiff) % 24, (ChartUtils.periodToDecimal(period.close) + timeZoneDiff) % 24]).sort((a, b) => a[0] - b[0]);\n var bounds = [];\n for (var i = 0; i < numberPeriods.length; i += 1) {\n var period = numberPeriods[i];\n var nextPeriod = numberPeriods[(i + 1) % numberPeriods.length];\n bounds.push([period[1], nextPeriod[0]]);\n }\n return bounds;\n }\n\n /**\n * Creates range breaks for plotly from business periods.\n * @param periods Business periods to create the breaks for\n * @param timeZoneDiff Time zone difference in hours\n * @returns Plotly range breaks for the business periods\n */\n createBreaksFromPeriods(periods) {\n var timeZoneDiff = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n var bounds = this.createBoundsFromPeriods(periods, timeZoneDiff);\n return bounds.map(bound => ({\n pattern: 'hour',\n bounds: bound\n }));\n }\n\n /**\n * Creates range break bounds for plotly from business days.\n * For example a standard business week of ['MONDAY','TUESDAY','WEDNESDAY','THURSDAY','FRIDAY']\n * will result in [[6,1]] meaning close on Saturday and open on Monday.\n * If you remove Wednesday from the array, then you get two closures [[6, 1], [3, 4]]\n *\n * @param businessDays the days to display on the x-axis\n */\n createBoundsFromDays(businessDays) {\n var weekLength = this.daysOfWeek.length;\n // No breaks if all days are business days\n if (businessDays.length === weekLength) {\n return [];\n }\n var businessDaysInt = businessDays.map(day => this.daysOfWeek.indexOf(day));\n var businessDaysSet = new Set(businessDaysInt);\n\n // These are the days when business is closed (e.g. Saturday to start the weekend)\n var closedDays = new Set();\n for (var i = 0; i < weekLength; i += 1) {\n if (!businessDaysSet.has(i) && businessDaysSet.has((i - 1 + weekLength) % weekLength)) {\n closedDays.add(i);\n }\n }\n var boundsArray = [];\n // For each close day, find the next open day\n closedDays.forEach(closedDay => {\n for (var _i = 0; _i < weekLength; _i += 1) {\n var adjustedDay = (closedDay + _i) % weekLength;\n if (businessDaysSet.has(adjustedDay)) {\n boundsArray.push([closedDay, adjustedDay]);\n return;\n }\n }\n throw new Error(\"Unable to find open day for closed day \".concat(closedDay, \", businessDays: \").concat(businessDays));\n });\n return boundsArray;\n }\n\n /**\n * Breaks in plotly for business days\n * @param businessDays Business days to create the breaks for\n * @returns Plotly range breaks for the business days\n */\n createBreaksFromDays(businessDays) {\n var bounds = this.createBoundsFromDays(businessDays);\n return bounds.map(bound => ({\n pattern: 'day of week',\n bounds: bound\n }));\n }\n\n /**\n * Creates range breaks for plotly from a business calendar.\n * @param businessCalendar Calendar to create the breaks from\n * @param formatter Formatter to use for time zones\n * @returns Plotly Rangebreaks for the business calendar\n */\n createRangeBreaksFromBusinessCalendar(businessCalendar, formatter) {\n var rangebreaks = [];\n var {\n businessPeriods,\n businessDays,\n holidays,\n timeZone: calendarTimeZone\n } = businessCalendar;\n var typeFormatter = formatter === null || formatter === void 0 ? void 0 : formatter.getColumnTypeFormatter(BUSINESS_COLUMN_TYPE);\n var formatterTimeZone;\n if (isDateTimeColumnFormatter(typeFormatter)) {\n formatterTimeZone = typeFormatter.dhTimeZone;\n }\n var timeZoneDiff = ChartUtils.getTimeZoneDiff(calendarTimeZone, formatterTimeZone);\n if (holidays.length > 0) {\n rangebreaks.push(...this.createRangeBreakValuesFromHolidays(holidays, calendarTimeZone, formatterTimeZone, businessCalendar));\n }\n rangebreaks.push(...this.createBreaksFromPeriods(businessPeriods, timeZoneDiff));\n rangebreaks.push(...this.createBreaksFromDays(businessDays));\n return rangebreaks;\n }\n\n /**\n * Creates an array of range breaks for all holidays.\n *\n * @param holidays an array of holidays\n * @param calendarTimeZone the time zone for the business calendar\n * @param formatterTimeZone the time zone for the formatter\n * @param calendar the calendar the holidays are from\n */\n createRangeBreakValuesFromHolidays(holidays, calendarTimeZone, formatterTimeZone, calendar) {\n var fullHolidays = [];\n var partialHolidays = [];\n holidays.forEach(holiday => {\n if (holiday.businessPeriods.length > 0) {\n partialHolidays.push(...this.createPartialHoliday(holiday, calendarTimeZone, formatterTimeZone, calendar));\n } else {\n fullHolidays.push(this.createFullHoliday(holiday, calendarTimeZone, formatterTimeZone));\n }\n });\n return [{\n values: fullHolidays\n }, ...partialHolidays];\n }\n\n /**\n * Creates the range break value for a full holiday. A full holiday is day that has no business periods.\n *\n * @param holiday the full holiday\n * @param calendarTimeZone the time zone for the business calendar\n * @param formatterTimeZone the time zone for the formatter\n */\n createFullHoliday(holiday, calendarTimeZone, formatterTimeZone) {\n return this.adjustDateForTimeZone(\"\".concat(holiday.date.toString(), \" 00:00:00.000000\"), calendarTimeZone, formatterTimeZone);\n }\n\n /**\n * Creates the range break for a partial holiday. A partial holiday is holiday with business periods\n * that are different than the default business periods.\n *\n * @param holiday the partial holiday\n * @param calendarTimeZone the time zone for the business calendar\n * @param formatterTimeZone the time zone for the formatter\n * @param calendar the calendar the holiday is from. Used to check against the default business periods to ensure this holiday needs to be specified\n *\n * @returns an array of range breaks for the partial holiday\n */\n createPartialHoliday(holiday, calendarTimeZone, formatterTimeZone, calendar) {\n var _calendar$businessPer;\n if (holiday.businessPeriods.length === 0) {\n return [];\n }\n var dateString = holiday.date.toString();\n\n // First check that the holiday is on a business day. If it's not, we can ignore it\n if (calendar) {\n var dayOfWeek = new Date(dateString).getDay();\n var isBusinessDay = calendar.businessDays.includes(this.daysOfWeek[dayOfWeek]);\n if (!isBusinessDay) {\n return [];\n }\n }\n var closedPeriods = ChartUtils.createClosedRangesForPartialHoliday(holiday.businessPeriods, (_calendar$businessPer = calendar === null || calendar === void 0 ? void 0 : calendar.businessPeriods) !== null && _calendar$businessPer !== void 0 ? _calendar$businessPer : []);\n var rangeBreaks = [];\n for (var i = 0; i < closedPeriods.length; i += 1) {\n var [closeStart, closeEnd] = closedPeriods[i];\n // Skip over any periods where start and close are the same (zero hours)\n if (closeStart !== closeEnd) {\n var values = [this.adjustDateForTimeZone(\"\".concat(dateString, \" \").concat(ChartUtils.decimalToPeriod(closeStart), \":00.000000\"), calendarTimeZone, formatterTimeZone)];\n var dvalue = MILLIS_PER_HOUR * (closeEnd - closeStart);\n rangeBreaks.push({\n values,\n dvalue\n });\n }\n }\n return rangeBreaks;\n }\n\n /**\n * Adjusts a date string from the calendar time zone to the formatter time zone.\n *\n * @param dateString the date string\n * @param calendarTimeZone the time zone for the business calendar\n * @param formatterTimeZone the time zone for the formatter\n */\n adjustDateForTimeZone(dateString, calendarTimeZone, formatterTimeZone) {\n if (formatterTimeZone && formatterTimeZone.standardOffset !== calendarTimeZone.standardOffset) {\n return this.unwrapValue(this.wrapValue(dateString, BUSINESS_COLUMN_TYPE, calendarTimeZone), formatterTimeZone);\n }\n return dateString;\n }\n\n /**\n * Creates the Figure settings from the Chart Builder settings\n * This should be deprecated at some point, and have Chart Builder create the figure settings directly.\n * This logic will still need to exist to translate existing charts, but could be part of a migration script\n * to translate the data.\n * Change when we decide to add more functionality to the Chart Builder.\n * @param settings The chart builder settings\n * @param settings.title The title for this figure\n * @param settings.xAxis The name of the column to use for the x-axis\n * @param settings.series The name of the columns to use for the series of this figure\n * @param settings.type The plot style for this figure\n */\n makeFigureSettings(settings, table) {\n var {\n dh\n } = this;\n var {\n series,\n xAxis: settingsAxis,\n type\n } = settings;\n var title = ChartUtils.titleFromSettings(settings);\n var xAxis = {\n formatType: \"\".concat(dh.plot.AxisFormatType.NUMBER),\n type: \"\".concat(dh.plot.AxisType.X),\n position: \"\".concat(dh.plot.AxisPosition.BOTTOM)\n };\n var yAxis = {\n formatType: \"\".concat(dh.plot.AxisFormatType.NUMBER),\n type: \"\".concat(dh.plot.AxisType.Y),\n position: \"\".concat(dh.plot.AxisPosition.LEFT)\n };\n return {\n charts: [{\n chartType: \"\".concat(dh.plot.ChartType.XY),\n axes: [xAxis, yAxis],\n series: (series !== null && series !== void 0 ? series : []).map(name => ({\n plotStyle: \"\".concat(type),\n name,\n dataSources: [{\n type: \"\".concat(dh.plot.SourceType.X),\n columnName: settingsAxis !== null && settingsAxis !== void 0 ? settingsAxis : '',\n axis: xAxis,\n table\n }, {\n type: \"\".concat(dh.plot.SourceType.Y),\n columnName: name,\n axis: yAxis,\n table\n }]\n }))\n }],\n title\n };\n }\n\n /**\n * Unwraps a value provided from API to a value plotly can understand\n * Eg. Unwraps DateWrapper, LongWrapper objects.\n */\n unwrapValue(value, timeZone) {\n var {\n dh\n } = this;\n if (value != null) {\n if (isDateWrapper(value)) {\n return dh.i18n.DateTimeFormat.format(ChartUtils.DATE_FORMAT, value, timeZone);\n }\n if (isLongWrapper(value)) {\n return value.asNumber();\n }\n }\n return value;\n }\n\n /**\n *\n * @param value The value to wrap up\n * @param columnType The type of column this value is from\n * @param timeZone The time zone if applicable\n */\n wrapValue(value, columnType) {\n var timeZone = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;\n var {\n dh\n } = this;\n if (TableUtils.isDateType(columnType) && typeof value === 'string') {\n // Need to limit the format to the actual length of the string range set in plotly\n // Otherwise parse will fail\n var text = value;\n var format = ChartUtils.DATE_FORMAT.substr(0, value.length);\n var date = dh.i18n.DateTimeFormat.parse(format, text);\n if (!timeZone) {\n return date;\n }\n\n // IDS-5994 Due to date parsing, time zone, and daylight savings shenanigans, we need\n // to pass the actual offset with the time to have it parse correctly.\n // However, the offset can change based on the date because of Daylight Savings\n // So we end up parsing the date multiple times. And curse daylight savings.\n var tzFormat = \"\".concat(format, \" Z\");\n var estimatedOffset = dh.i18n.DateTimeFormat.format('Z', date, timeZone);\n var estimatedDate = dh.i18n.DateTimeFormat.parse(tzFormat, \"\".concat(text, \" \").concat(estimatedOffset));\n var offset = dh.i18n.DateTimeFormat.format('Z', estimatedDate, timeZone);\n return dh.i18n.DateTimeFormat.parse(tzFormat, \"\".concat(text, \" \").concat(offset));\n }\n return value;\n }\n makeLayoutAxis(type, theme) {\n var {\n dh\n } = this;\n var axis = {\n automargin: true,\n gridcolor: theme.gridcolor,\n linecolor: theme.linecolor,\n rangeslider: {\n visible: false\n },\n showline: true,\n ticks: 'outside',\n ticklen: 5,\n // act as padding, can't find a tick padding\n tickcolor: theme.paper_bgcolor,\n // hide ticks as padding\n tickfont: {\n color: theme.zerolinecolor\n },\n title: {\n font: {\n color: theme.title_color\n }\n },\n legend: {\n font: {\n color: theme.legend_color\n }\n }\n };\n if (type === dh.plot.AxisType.X) {\n Object.assign(axis, {\n showgrid: true\n });\n } else if (type === dh.plot.AxisType.Y) {\n Object.assign(axis, {\n zerolinecolor: theme.zerolinecolor,\n zerolinewidth: 2\n });\n }\n return axis;\n }\n\n /**\n * Creates a plotly layout template object based on a given theme.\n * See https://plotly.com/javascript/reference/layout/#layout-template\n * @param theme The theme to use for the layout template\n * @returns The layout template object\n */\n makeDefaultTemplate(theme) {\n /* eslint-disable camelcase */\n var {\n error_band_line_color,\n ohlc_increasing,\n ohlc_decreasing,\n title_color,\n indicator_increasing,\n indicator_decreasing,\n indicator_gauge\n } = theme;\n return {\n data: {\n bar: [{\n marker: {\n line: {\n color: 'transparent'\n }\n }\n }],\n scatter: [{\n error_x: {\n color: error_band_line_color\n },\n error_y: {\n color: error_band_line_color\n }\n }],\n ohlc: [{\n increasing: {\n line: {\n color: ohlc_increasing\n }\n },\n decreasing: {\n line: {\n color: ohlc_decreasing\n }\n }\n }],\n pie: [{\n outsidetextfont: {\n color: title_color\n }\n }],\n treemap: [{\n outsidetextfont: {\n color: title_color\n }\n }],\n indicator: [{\n title: {\n font: {\n color: title_color\n }\n },\n delta: {\n decreasing: {\n color: indicator_decreasing\n },\n increasing: {\n color: indicator_increasing\n }\n },\n gauge: {\n bar: {\n color: indicator_gauge\n }\n }\n }]\n },\n /* eslint-enable camelcase */\n layout: this.makeDefaultLayout(theme)\n };\n }\n\n /**\n * Creates a plotly layout object based on a given theme.\n * See https://plotly.com/javascript/reference/layout/\n * @param theme The theme to use for the layout\n */\n makeDefaultLayout(theme) {\n var {\n dh\n } = this;\n var {\n /* Used as top level properties of `Layout` */\n /* eslint-disable camelcase */\n paper_bgcolor,\n plot_bgcolor,\n title_color,\n coastline_color,\n land_color,\n ocean_color,\n lake_color,\n river_color,\n map_style\n /* eslint-disable camelcase */\n } = theme;\n var layout = {\n paper_bgcolor,\n plot_bgcolor,\n autosize: true,\n colorway: ChartUtils.normalizeColorway(theme === null || theme === void 0 ? void 0 : theme.colorway),\n font: {\n family: \"'Fira Sans', sans-serif\",\n color: title_color\n },\n title: {\n font: {\n color: title_color\n },\n xanchor: 'center',\n xref: 'paper',\n yanchor: 'top',\n pad: _objectSpread({}, ChartUtils.DEFAULT_TITLE_PADDING),\n y: 1\n },\n legend: {\n font: {\n color: title_color\n }\n },\n margin: _objectSpread({}, ChartUtils.DEFAULT_MARGIN),\n xaxis: this.makeLayoutAxis(dh.plot.AxisType.X, theme),\n yaxis: this.makeLayoutAxis(dh.plot.AxisType.Y, theme),\n polar: {\n angularaxis: this.makeLayoutAxis(dh.plot.AxisType.SHAPE, theme),\n radialaxis: this.makeLayoutAxis(dh.plot.AxisType.SHAPE, theme),\n bgcolor: theme.plot_bgcolor\n },\n scene: {\n xaxis: this.makeLayoutAxis(dh.plot.AxisType.X, theme),\n yaxis: this.makeLayoutAxis(dh.plot.AxisType.Y, theme),\n zaxis: this.makeLayoutAxis(null, theme)\n },\n geo: {\n showcoastlines: true,\n showframe: false,\n showland: true,\n showocean: true,\n showlakes: true,\n showrivers: true,\n bgcolor: paper_bgcolor,\n coastlinecolor: coastline_color,\n landcolor: land_color,\n oceancolor: ocean_color,\n lakecolor: lake_color,\n rivercolor: river_color\n },\n map: {\n style: map_style\n }\n };\n layout.datarevision = 0;\n return layout;\n }\n\n /**\n * Hydrate settings from a JSONable object\n * @param settings Dehydrated settings\n */\n hydrateSettings(settings) {\n var {\n dh\n } = this;\n return _objectSpread(_objectSpread({}, settings), {}, {\n type: settings.type != null ? dh.plot.SeriesPlotStyle[settings.type] : undefined\n });\n }\n}\n_defineProperty(ChartUtils, \"DEFAULT_AXIS_SIZE\", 0.15);\n_defineProperty(ChartUtils, \"MIN_AXIS_SIZE\", 0.025);\n_defineProperty(ChartUtils, \"MAX_AXIS_SIZE\", 0.2);\n_defineProperty(ChartUtils, \"AXIS_SIZE_PX\", 75);\n_defineProperty(ChartUtils, \"LEGEND_WIDTH_PX\", 50);\n_defineProperty(ChartUtils, \"MAX_LEGEND_SIZE\", 0.25);\n_defineProperty(ChartUtils, \"ORIENTATION\", Object.freeze({\n HORIZONTAL: 'h',\n VERTICAL: 'v'\n}));\n_defineProperty(ChartUtils, \"DATE_FORMAT\", 'yyyy-MM-dd HH:mm:ss.SSSSSS');\n_defineProperty(ChartUtils, \"DEFAULT_MARGIN\", Object.freeze({\n l: 60,\n r: 50,\n t: 30,\n b: 60,\n pad: 0\n}));\n_defineProperty(ChartUtils, \"DEFAULT_TITLE_PADDING\", Object.freeze({\n t: 8\n}));\n_defineProperty(ChartUtils, \"SUBTITLE_LINE_HEIGHT\", 25);\n_defineProperty(ChartUtils, \"DEFAULT_MARKER_SIZE\", 6);\n_defineProperty(ChartUtils, \"MODE_MARKERS\", 'markers');\n_defineProperty(ChartUtils, \"MODE_LINES\", 'lines');\nexport default ChartUtils;\n//# sourceMappingURL=ChartUtils.js.map","function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }\nfunction _toPropertyKey(t) { var i = _toPrimitive(t, \"string\"); return \"symbol\" == typeof i ? i : i + \"\"; }\nfunction _toPrimitive(t, r) { if (\"object\" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || \"default\"); if (\"object\" != typeof i) return i; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (\"string\" === r ? String : Number)(t); }\n/* eslint class-methods-use-this: \"off\" */\n/* eslint no-unused-vars: \"off\" */\n\n/**\n * Model for a Chart\n * All of these methods should return very quickly.\n * If data needs to be loaded asynchronously, return something immediately, then trigger an event for the chart to refresh.\n */\nclass ChartModel {\n constructor(dh) {\n _defineProperty(this, \"dh\", void 0);\n _defineProperty(this, \"listeners\", void 0);\n /** Formatter settings for the chart, such as how to format dates and numbers */\n _defineProperty(this, \"formatter\", void 0);\n _defineProperty(this, \"renderOptions\", void 0);\n _defineProperty(this, \"rect\", void 0);\n _defineProperty(this, \"isDownsamplingDisabled\", void 0);\n _defineProperty(this, \"title\", void 0);\n this.dh = dh;\n this.listeners = [];\n this.isDownsamplingDisabled = false;\n }\n getData() {\n return [];\n }\n getDefaultTitle() {\n return '';\n }\n getLayout() {\n return {};\n }\n getFilterColumnMap() {\n return new Map();\n }\n isFilterRequired() {\n return false;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n setFilter(filter) {}\n\n /**\n * Close this model, clean up any underlying subscriptions\n */\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n close() {}\n\n /**\n * Set the formatter to use when charting the data.\n * @param formatter The formatter to use to format the charting data\n */\n setFormatter(formatter) {\n this.formatter = formatter;\n }\n\n /**\n * Set additional options for rendering the chart\n * @param renderOptions Options for rendering the chart\n */\n setRenderOptions(renderOptions) {\n this.renderOptions = renderOptions;\n }\n\n /**\n * Disable downsampling\n * @param isDownsamplingDisabled True if downsampling should be disabled\n */\n setDownsamplingDisabled(isDownsamplingDisabled) {\n this.isDownsamplingDisabled = isDownsamplingDisabled;\n }\n\n /**\n * Set the dimensions of the plot. May be needed to evaluate some of the percents\n * @param rect The bounding rectangle of the plot\n */\n setDimensions(rect) {\n this.rect = rect;\n }\n setTitle(title) {\n this.title = title;\n }\n\n /**\n * Subscribe to this ChartModel and start listening for all events.\n * @param callback Callback when an event occurs\n */\n subscribe(callback) {\n this.listeners.push(callback);\n }\n unsubscribe(callback) {\n this.listeners = this.listeners.filter(listener => listener !== callback);\n }\n fireEvent(event) {\n for (var i = 0; i < this.listeners.length; i += 1) {\n this.listeners[i](event);\n }\n }\n fireUpdate(data) {\n this.fireEvent(new CustomEvent(ChartModel.EVENT_UPDATED, {\n detail: data\n }));\n }\n fireDisconnect() {\n this.fireEvent(new CustomEvent(ChartModel.EVENT_DISCONNECT));\n }\n fireReconnect() {\n this.fireEvent(new CustomEvent(ChartModel.EVENT_RECONNECT));\n }\n fireDownsampleStart(detail) {\n this.fireEvent(new CustomEvent(ChartModel.EVENT_DOWNSAMPLESTARTED, {\n detail\n }));\n }\n fireDownsampleFinish(detail) {\n this.fireEvent(new CustomEvent(ChartModel.EVENT_DOWNSAMPLEFINISHED, {\n detail\n }));\n }\n fireDownsampleFail(detail) {\n this.fireEvent(new CustomEvent(ChartModel.EVENT_DOWNSAMPLEFAILED, {\n detail\n }));\n }\n fireDownsampleNeeded(detail) {\n this.fireEvent(new CustomEvent(ChartModel.EVENT_DOWNSAMPLENEEDED, {\n detail\n }));\n }\n fireLoadFinished() {\n this.fireEvent(new CustomEvent(ChartModel.EVENT_LOADFINISHED));\n }\n fireError(detail) {\n this.fireEvent(new CustomEvent(ChartModel.EVENT_ERROR, {\n detail\n }));\n }\n fireBlocker(detail) {\n this.fireEvent(new CustomEvent(ChartModel.EVENT_BLOCKER, {\n detail\n }));\n }\n fireBlockerClear() {\n this.fireEvent(new CustomEvent(ChartModel.EVENT_BLOCKER_CLEAR));\n }\n fireLayoutUpdated(detail) {\n this.fireEvent(new CustomEvent(ChartModel.EVENT_LAYOUT_UPDATED, {\n detail\n }));\n }\n}\n_defineProperty(ChartModel, \"EVENT_UPDATED\", 'ChartModel.EVENT_UPDATED');\n_defineProperty(ChartModel, \"EVENT_DISCONNECT\", 'ChartModel.EVENT_DISCONNECT');\n_defineProperty(ChartModel, \"EVENT_RECONNECT\", 'ChartModel.EVENT_RECONNECT');\n_defineProperty(ChartModel, \"EVENT_DOWNSAMPLESTARTED\", 'ChartModel.EVENT_DOWNSAMPLESTARTED');\n_defineProperty(ChartModel, \"EVENT_DOWNSAMPLEFINISHED\", 'ChartModel.EVENT_DOWNSAMPLEFINISHED');\n_defineProperty(ChartModel, \"EVENT_DOWNSAMPLEFAILED\", 'ChartModel.EVENT_DOWNSAMPLEFAILED');\n_defineProperty(ChartModel, \"EVENT_DOWNSAMPLENEEDED\", 'ChartModel.EVENT_DOWNSAMPLENEEDED');\n_defineProperty(ChartModel, \"EVENT_LOADFINISHED\", 'ChartModel.EVENT_LOADFINISHED');\n_defineProperty(ChartModel, \"EVENT_ERROR\", 'ChartModel.EVENT_ERROR');\n_defineProperty(ChartModel, \"EVENT_BLOCKER\", 'ChartModel.EVENT_BLOCKER');\n_defineProperty(ChartModel, \"EVENT_BLOCKER_CLEAR\", 'ChartModel.EVENT_BLOCKER_CLEAR');\n_defineProperty(ChartModel, \"EVENT_LAYOUT_UPDATED\", 'ChartModel.EVENT_LAYOUT_UPDATED');\nexport default ChartModel;\n//# sourceMappingURL=ChartModel.js.map","function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }\nfunction _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }\nfunction _toPropertyKey(t) { var i = _toPrimitive(t, \"string\"); return \"symbol\" == typeof i ? i : i + \"\"; }\nfunction _toPrimitive(t, r) { if (\"object\" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || \"default\"); if (\"object\" != typeof i) return i; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (\"string\" === r ? String : Number)(t); }\nimport { forwardRef, lazy, Suspense } from 'react';\nimport { LoadingOverlay } from '@deephaven/components';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nvar IrisGrid = /*#__PURE__*/lazy(() => import('./IrisGrid.js'));\nvar LazyIrisGrid = /*#__PURE__*/forwardRef((\n// This creates the correct type to make defaultProps optional\nprops, ref) => /*#__PURE__*/_jsx(Suspense, {\n fallback: /*#__PURE__*/_jsx(LoadingOverlay, {\n \"data-testid\": \"lazy-iris-grid-loading\"\n }),\n children: /*#__PURE__*/_jsx(IrisGrid, _objectSpread({\n ref: ref\n }, props))\n}));\nLazyIrisGrid.displayName = 'LazyIrisGrid';\nexport default LazyIrisGrid;\n//# sourceMappingURL=LazyIrisGrid.js.map","export function isExpandableGridModel(model) {\n return (model === null || model === void 0 ? void 0 : model.hasExpandableRows) !== undefined;\n}\n\n/**\n * Expandable grid model. Allows for a grid with rows that can expand (e.g. A Tree Table)\n */\n//# sourceMappingURL=ExpandableGridModel.js.map","function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }\nfunction _toPropertyKey(t) { var i = _toPrimitive(t, \"string\"); return \"symbol\" == typeof i ? i : i + \"\"; }\nfunction _toPrimitive(t, r) { if (\"object\" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || \"default\"); if (\"object\" != typeof i) return i; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (\"string\" === r ? String : Number)(t); }\n// Also exported via GridRange.SELECTION_DIRECTION\nexport var SELECTION_DIRECTION = /*#__PURE__*/function (SELECTION_DIRECTION) {\n SELECTION_DIRECTION[\"DOWN\"] = \"DOWN\";\n SELECTION_DIRECTION[\"UP\"] = \"UP\";\n SELECTION_DIRECTION[\"LEFT\"] = \"LEFT\";\n SELECTION_DIRECTION[\"RIGHT\"] = \"RIGHT\";\n return SELECTION_DIRECTION;\n}({});\nexport class GridRange {\n /**\n * Returns a normalized array of indexes ensuring left <= right and top <= bottom\n * @param startColumn Start column index\n * @param startRow Start row index\n * @param endColumn End column index\n * @param endRow End row index\n * @returns Array containing normalized indexes [left, top, right, bottom]\n */\n static normalize(startColumn, startRow, endColumn, endRow) {\n var left = startColumn;\n var top = startRow;\n var right = endColumn;\n var bottom = endRow;\n if (left != null && right != null && right < left) {\n left = right;\n right = startColumn;\n }\n if (top != null && bottom != null && bottom < top) {\n top = bottom;\n bottom = startRow;\n }\n return [left, top, right, bottom];\n }\n\n /**\n * Makes a GridRange ensuring startColumn <= endColumn, startRow <= endRow\n * @param startColumn Start column index\n * @param startRow Start row index\n * @param endColumn End column index\n * @param endRow End row index\n * @returns Normalized GridRange\n */\n static makeNormalized(startColumn, startRow, endColumn, endRow) {\n return new GridRange(...GridRange.normalize(startColumn, startRow, endColumn, endRow));\n }\n\n /**\n * Creates a GridRange representing a single cell\n * @param column Column index\n * @param row Row index\n * @returns GridRange representing the cell\n */\n static makeCell(column, row) {\n return new GridRange(column, row, column, row);\n }\n\n /**\n * Creates a GridRange representing an infinite length column\n * @param column Column index\n * @returns GridRange representing the column\n */\n static makeColumn(column) {\n return new GridRange(column, null, column, null);\n }\n\n /**\n * Creates a GridRange representing an infinite length row\n * @param row Row index\n * @returns GridRange representing the row\n */\n static makeRow(row) {\n return new GridRange(null, row, null, row);\n }\n\n /**\n * Returns the minimum value between 2 range indexes or null if at least 1 is null\n * @param index1 First grid range index\n * @param index2 Second grid range index\n * @returns Minimum index or null if either index is null\n */\n static minOrNull(index1, index2) {\n if (index1 == null || index2 == null) {\n return null;\n }\n return Math.min(index1, index2);\n }\n\n /**\n * Returns the maximum value between 2 range indexes or null if at least 1 is null\n * @param index1 First grid range index\n * @param index2 Second grid range index\n * @returns Maximum index or null if either index is null\n */\n static maxOrNull(index1, index2) {\n if (index1 == null || index2 == null) {\n return null;\n }\n return Math.max(index1, index2);\n }\n\n /**\n * Consolidate the passed in ranges to the minimum set, merging overlapping ranges.\n * @param ranges The ranges to consolidate\n * @returns Consolidated ranges\n */\n static consolidate(ranges) {\n var result = ranges.slice();\n var wasModified = true;\n while (wasModified) {\n wasModified = false;\n for (var i = 0; i < result.length && !wasModified; i += 1) {\n var range = result[i];\n for (var j = result.length - 1; j > i; j -= 1) {\n var other = result[j];\n\n // If one contains the other, we can just keep the bigger one\n if (range.contains(other)) {\n result.splice(j, 1);\n } else if (other.contains(range)) {\n wasModified = true;\n result[i] = other;\n result.splice(j, 1);\n break;\n } else if (range.startRow === other.startRow && range.endRow === other.endRow) {\n if (range.touches(other)) {\n // If the start/end rows match, and columns touch, consolidate\n var {\n startRow,\n endRow\n } = range;\n var startColumn = GridRange.minOrNull(range.startColumn, other.startColumn);\n var endColumn = GridRange.maxOrNull(range.endColumn, other.endColumn);\n wasModified = true;\n result[i] = new GridRange(startColumn, startRow, endColumn, endRow);\n result.splice(j, 1);\n break;\n }\n } else if (range.startColumn === other.startColumn && range.endColumn === other.endColumn) {\n if (range.touches(other)) {\n // If the start/end rows match, and columns touch, consolidate\n var {\n startColumn: _startColumn,\n endColumn: _endColumn\n } = range;\n var _startRow = GridRange.minOrNull(range.startRow, other.startRow);\n var _endRow = GridRange.maxOrNull(range.endRow, other.endRow);\n wasModified = true;\n result[i] = new GridRange(_startColumn, _startRow, _endColumn, _endRow);\n result.splice(j, 1);\n break;\n }\n }\n }\n }\n }\n return result;\n }\n\n /**\n * Checks if the 1-D ranges between 2 index pairs overlap or are continuous.\n * For example ranges [0, 1] and [2, 3] are continuous and will return true.\n * [0, 1] and [1, 3] overlap and return true.\n * [0, 1] and [3, 4] do not overlap and have a gap so this will return false.\n * @param start1 Start of 1st range\n * @param end1 End of 1st range\n * @param start2 Start of 2nd range\n * @param end2 End of 2nd range\n * @returns True if the ranges overlap or touch, else false\n */\n static isAxisRangeTouching(start1, end1, start2, end2) {\n if (start1 == null) {\n if (end1 == null) {\n return true;\n }\n if (start2 == null) {\n return true;\n }\n return start2 <= end1 + 1;\n }\n if (end1 == null) {\n if (end2 == null) {\n return true;\n }\n return end2 >= start1 - 1;\n }\n if (start2 == null) {\n if (end2 == null) {\n return true;\n }\n return start1 <= end2 + 1;\n }\n if (end2 == null) {\n return end1 >= start2 - 1;\n }\n if (start2 >= start1 - 1) {\n return start2 <= end1 + 1;\n }\n return end2 >= start1 - 1;\n }\n\n /**\n * Checks if 2 arrays of ranges are the same ranges\n * @param ranges1 First array of ranges\n * @param ranges2 Second array of ranges\n * @returns True if the arrays contain the same ranges in the same order\n */\n static rangeArraysEqual(ranges1, ranges2) {\n if (ranges1 === ranges2) {\n return true;\n }\n if (ranges1 == null || ranges2 == null || ranges1.length !== ranges2.length) {\n return false;\n }\n for (var i = 0; i < ranges1.length; i += 1) {\n if (!ranges1[i].equals(ranges2[i])) {\n return false;\n }\n }\n return true;\n }\n\n /**\n * Get the intersection (overlapping area) of two ranges\n * @param range One range to check for the intersection\n * @param otherRange The other range to check for the intersection\n * @returns Intersection of the two ranges. If they do not intersect, returns `null`.\n */\n static intersection(range, otherRange) {\n if (range.equals(otherRange)) {\n return range;\n }\n var {\n startColumn,\n startRow,\n endColumn,\n endRow\n } = range;\n startColumn = startColumn != null && otherRange.startColumn != null ? Math.max(startColumn, otherRange.startColumn) : startColumn !== null && startColumn !== void 0 ? startColumn : otherRange.startColumn;\n endColumn = endColumn != null && otherRange.endColumn != null ? Math.min(endColumn, otherRange.endColumn) : endColumn !== null && endColumn !== void 0 ? endColumn : otherRange.endColumn;\n startRow = startRow != null && otherRange.startRow != null ? Math.max(startRow, otherRange.startRow) : startRow !== null && startRow !== void 0 ? startRow : otherRange.startRow;\n endRow = endRow != null && otherRange.endRow != null ? Math.min(endRow, otherRange.endRow) : endRow !== null && endRow !== void 0 ? endRow : otherRange.endRow;\n if (startColumn != null && startColumn > (endColumn !== null && endColumn !== void 0 ? endColumn : -1) || startRow != null && startRow > (endRow !== null && endRow !== void 0 ? endRow : -1)) {\n return null;\n }\n return new GridRange(startColumn, startRow, endColumn, endRow);\n }\n\n /**\n * Subtracts 1 range from another\n * @param range The range to be subtracted from\n * @param subtractRange The range to subtract from within this range\n * @returns The ranges needed to represent the remaining\n */\n static subtractFromRange(range, subtractRange) {\n var result = [];\n\n // Make it a little easier by finding only the part the subtraction range intersects\n var subtract = GridRange.intersection(range, subtractRange);\n if (subtract == null) {\n return [range];\n }\n\n // Go through each of the quadrants for deselection, there can be up to 4\n // Top quadrant (above the subtracted area)\n if (subtract.startRow != null && (range.startRow == null || range.startRow < subtract.startRow)) {\n result.push(new GridRange(range.startColumn, range.startRow, range.endColumn, subtract.startRow - 1));\n }\n\n // middle left\n if (subtract.startColumn != null && (range.startColumn == null || range.startColumn < subtract.startColumn)) {\n result.push(new GridRange(range.startColumn, subtract.startRow, subtract.startColumn - 1, subtract.endRow));\n }\n\n // middle right\n if (subtract.endColumn != null && (range.endColumn == null || range.endColumn > subtract.endColumn)) {\n result.push(new GridRange(subtract.endColumn + 1, subtract.startRow, range.endColumn, subtract.endRow));\n }\n\n // Bottom quadrant\n if (subtract.endRow != null && (range.endRow == null || range.endRow > subtract.endRow)) {\n result.push(new GridRange(range.startColumn, subtract.endRow + 1, range.endColumn, range.endRow));\n }\n return result;\n }\n\n /**\n * Subtract a range from multiple ranges\n * @param ranges The ranges to be subtracted from\n * @param subtractRange The range to subtract from within these ranges\n * @returns The ranges needed to represent the remaining\n */\n static subtractFromRanges(ranges, subtractRange) {\n var result = [];\n for (var i = 0; i < ranges.length; i += 1) {\n result.push(...GridRange.subtractFromRange(ranges[i], subtractRange));\n }\n return result;\n }\n\n /**\n * Subtract multiple ranges from multiple ranges\n * @param ranges The ranges to be subtracted from\n * @param subtractRanges The ranges to subtract from within these ranges\n * @returns The ranges needed to represent the remaining\n */\n static subtractRangesFromRanges(ranges, subtractRanges) {\n var result = [...ranges];\n for (var i = 0; i < subtractRanges.length; i += 1) {\n result = GridRange.subtractFromRanges(result, subtractRanges[i]);\n }\n return result;\n }\n\n /**\n * Test if a given range is bounded (all values are non-null)\n * @param range The range to test\n * @returns True if this range is bounded, false otherwise\n */\n static isBounded(range) {\n return range.startRow != null && range.startColumn != null && range.endRow != null && range.endColumn != null;\n }\n\n /**\n * Converts any GridRange passed in that is a full row or column selection to be bound\n * to the `columnCount` and `rowCount` passed in\n *\n * @param range The range to get the bounded range of\n * @param columnCount The number of columns\n * @param rowCount The number of rows\n * @returns The passed in GridRange with any null values filled in\n */\n static boundedRange(range, columnCount, rowCount) {\n var _range$startColumn, _range$startRow, _range$endColumn, _range$endRow;\n if (GridRange.isBounded(range)) {\n return range;\n }\n return new GridRange((_range$startColumn = range.startColumn) !== null && _range$startColumn !== void 0 ? _range$startColumn : 0, (_range$startRow = range.startRow) !== null && _range$startRow !== void 0 ? _range$startRow : 0, (_range$endColumn = range.endColumn) !== null && _range$endColumn !== void 0 ? _range$endColumn : columnCount - 1, (_range$endRow = range.endRow) !== null && _range$endRow !== void 0 ? _range$endRow : rowCount - 1);\n }\n\n /**\n * Converts the GridRanges passed in to be bound to the `columnCount` and `rowCount` passed in\n *\n * @param ranges The ranges to get the bounded ranges of\n * @param columnCount The number of columns\n * @param rowCount The number of rows\n * @returns The passed in GridRange with any null values filled in\n */\n static boundedRanges(ranges, columnCount, rowCount) {\n return ranges.map(r => GridRange.boundedRange(r, columnCount, rowCount));\n }\n\n /**\n * Offsets a GridRange by the specified amount in the x and y directions\n *\n * @param range The range to offset\n * @param columnOffset The number of columns to offset\n * @param rowOffset The number of rows to offset\n * @returns The new grid range offset from the original\n */\n static offset(range, columnOffset, rowOffset) {\n return new GridRange(range.startColumn != null ? range.startColumn + columnOffset : null, range.startRow != null ? range.startRow + rowOffset : null, range.endColumn != null ? range.endColumn + columnOffset : null, range.endRow != null ? range.endRow + rowOffset : null);\n }\n\n /**\n * Get the next cell given the selected ranges and the current cell\n * @param ranges The selected bounded ranges within the grid\n * @param column The cursor column, or null if none focused\n * @param row The cursor row, or null if none focused\n * @param direction The direction in which to select next\n * @returns The next cell to focus, or null if there should be no more focus\n */\n static nextCell(ranges) {\n var column = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n var row = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;\n var direction = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : GridRange.SELECTION_DIRECTION.DOWN;\n if (ranges.length === 0) {\n return null;\n }\n var rangeIndex = -1;\n if (column != null && row != null) {\n rangeIndex = ranges.findIndex(r => r.containsCell(column, row));\n if (rangeIndex >= 0) {\n var range = ranges[rangeIndex];\n var nextCell = range.nextCell(column, row, direction);\n if (nextCell != null) {\n return nextCell;\n }\n }\n }\n\n // Otherwise go to the start of the next range (could be same range if only one range)\n switch (direction) {\n case GridRange.SELECTION_DIRECTION.DOWN:\n case GridRange.SELECTION_DIRECTION.RIGHT:\n {\n var nextRangeIndex = rangeIndex < ranges.length - 1 ? rangeIndex + 1 : 0;\n var nextRange = ranges[nextRangeIndex];\n return nextRange.startCell(direction);\n }\n case GridRange.SELECTION_DIRECTION.LEFT:\n case GridRange.SELECTION_DIRECTION.UP:\n {\n var _nextRangeIndex = rangeIndex > 0 ? rangeIndex - 1 : ranges.length - 1;\n var _nextRange = ranges[_nextRangeIndex];\n return _nextRange.startCell(direction);\n }\n default:\n throw new Error(\"Invalid direction: \".concat(direction));\n }\n }\n\n /**\n * Count the number of cells in the provided grid ranges\n * @param ranges The ranges to count the rows of\n * @returns The number of cells in the ranges, or `NaN` if any of the ranges were unbounded\n */\n static cellCount(ranges) {\n return ranges.reduce((cellCount, range) => {\n var _range$endRow2, _range$startRow2, _range$endColumn2, _range$startColumn2;\n return cellCount + (((_range$endRow2 = range.endRow) !== null && _range$endRow2 !== void 0 ? _range$endRow2 : NaN) - ((_range$startRow2 = range.startRow) !== null && _range$startRow2 !== void 0 ? _range$startRow2 : NaN) + 1) * (((_range$endColumn2 = range.endColumn) !== null && _range$endColumn2 !== void 0 ? _range$endColumn2 : NaN) - ((_range$startColumn2 = range.startColumn) !== null && _range$startColumn2 !== void 0 ? _range$startColumn2 : NaN) + 1);\n }, 0);\n }\n\n /**\n * Count the number of rows in the provided grid ranges\n * @param ranges The ranges to count the rows of\n * @returns The number of rows in the ranges, or `NaN` if any of the ranges were unbounded\n */\n static rowCount(ranges) {\n return ranges.reduce((rowCount, range) => {\n var _range$endRow3, _range$startRow3;\n return rowCount + ((_range$endRow3 = range.endRow) !== null && _range$endRow3 !== void 0 ? _range$endRow3 : NaN) - ((_range$startRow3 = range.startRow) !== null && _range$startRow3 !== void 0 ? _range$startRow3 : NaN) + 1;\n }, 0);\n }\n\n /**\n * Count the number of columns in the provided grid ranges\n * @param ranges The ranges to count the columns of\n * @returns The number of columns in the ranges, or `NaN` if any of the ranges were unbounded\n */\n static columnCount(ranges) {\n return ranges.reduce((columnCount, range) => {\n var _range$endColumn3, _range$startColumn3;\n return columnCount + ((_range$endColumn3 = range.endColumn) !== null && _range$endColumn3 !== void 0 ? _range$endColumn3 : NaN) - ((_range$startColumn3 = range.startColumn) !== null && _range$startColumn3 !== void 0 ? _range$startColumn3 : NaN) + 1;\n }, 0);\n }\n\n /**\n * Check if the provided ranges contain the provided cell\n * @param ranges The ranges to check\n * @param column The column index\n * @param row The row index\n * @returns True if the cell is within the provided ranges, false otherwise.\n */\n static containsCell(ranges, column, row) {\n for (var i = 0; i < ranges.length; i += 1) {\n var range = ranges[i];\n if (range.containsCell(column, row)) {\n return true;\n }\n }\n return false;\n }\n\n /**\n * Iterate through each cell in the provided ranges\n * @param ranges The ranges to iterate through\n * @param callback The callback to execute. `index` is the index within that range\n * @param direction The direction to iterate in\n */\n static forEachCell(ranges, callback) {\n var direction = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : GridRange.SELECTION_DIRECTION.RIGHT;\n for (var i = 0; i < ranges.length; i += 1) {\n ranges[i].forEach(callback, direction);\n }\n }\n constructor(startColumn, startRow, endColumn, endRow) {\n _defineProperty(this, \"startColumn\", void 0);\n _defineProperty(this, \"startRow\", void 0);\n _defineProperty(this, \"endColumn\", void 0);\n _defineProperty(this, \"endRow\", void 0);\n this.startColumn = startColumn;\n this.startRow = startRow;\n this.endColumn = endColumn;\n this.endRow = endRow;\n }\n\n /**\n * Checks if the provided range is equivalent to this range (same start and end column/row indexes)\n * @param other Grid range to check against\n * @returns True if the ranges cover the same area\n */\n equals(other) {\n return this.startColumn === other.startColumn && this.startRow === other.startRow && this.endColumn === other.endColumn && this.endRow === other.endRow;\n }\n\n /**\n * Checks if this GridRange contains another range\n * @param other The range to check\n * @returns True if this GridRange completely contains `other`\n * */\n contains(other) {\n return (this.startColumn == null || other.startColumn != null && this.startColumn <= other.startColumn) && (this.startRow == null || other.startRow != null && this.startRow <= other.startRow) && (this.endColumn == null || other.endColumn != null && this.endColumn >= other.endColumn) && (this.endRow == null || other.endRow != null && this.endRow >= other.endRow);\n }\n\n /**\n * Check if the provided cell is in this range\n * @param column The column to check\n * @param row The row to check\n * @returns True if this cell is within this range\n */\n containsCell(column, row) {\n if (column == null || row == null) {\n return false;\n }\n return (this.startColumn == null || this.startColumn <= column) && (this.endColumn == null || this.endColumn >= column) && (this.startRow == null || this.startRow <= row) && (this.endRow == null || this.endRow >= row);\n }\n\n /**\n * Check if the provided range touches (or overlaps) this GridRange\n * Effectively checks if the 2 ranges could be represented by 1 continuous range\n * @param other The range to check\n * @returns True if this GridRange touches `other`\n * */\n touches(other) {\n return GridRange.isAxisRangeTouching(this.startRow, this.endRow, other.startRow, other.endRow) && GridRange.isAxisRangeTouching(this.startColumn, this.endColumn, other.startColumn, other.endColumn);\n }\n\n /**\n * Subtracts a range from this range\n * @param other The range to deselect from within this range\n * @returns The ranges needed to represent the remaining\n */\n subtract(other) {\n return GridRange.subtractFromRange(this, other);\n }\n\n /**\n * Get the first cell in this range. Throws if this range is unbounded.\n *\n * @param direction The direction to get the starting cell in. Defaults to DOWN\n * @returns The first cell in this range in the direction specified\n */\n startCell() {\n var direction = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : GridRange.SELECTION_DIRECTION.DOWN;\n if (!GridRange.isBounded(this)) {\n throw new Error('Cannot get the startCell of an unbounded range');\n }\n switch (direction) {\n case GridRange.SELECTION_DIRECTION.DOWN:\n case GridRange.SELECTION_DIRECTION.RIGHT:\n return {\n column: this.startColumn,\n row: this.startRow\n };\n case GridRange.SELECTION_DIRECTION.LEFT:\n case GridRange.SELECTION_DIRECTION.UP:\n {\n return {\n column: this.endColumn,\n row: this.endRow\n };\n }\n default:\n throw new Error(\"Invalid direction: \".concat(direction));\n }\n }\n\n /**\n * Get the next cell in the direction specified. Throws if this range is unbounded.\n * If already at the bounds of the range in that direction, wrap to the next column or row\n * If at the end of the entire range, return null\n * If outside of the range, returns the next cell closest within this range.\n *\n * @param column The cursor column\n * @param row The cursor row\n * @param direction The direction to go in\n * @returns The next cell in the direction specified, or `null` if at the end of the range\n */\n nextCell(column, row, direction) {\n if (!GridRange.isBounded(this)) {\n throw new Error('Bounded range required');\n }\n if (column == null || row == null) {\n throw new Error('Require a non-null cursor');\n }\n var {\n startColumn,\n endColumn,\n startRow,\n endRow\n } = this;\n switch (direction) {\n case GridRange.SELECTION_DIRECTION.DOWN:\n if (row < endRow) {\n return {\n column,\n row: Math.max(row + 1, startRow)\n };\n }\n if (column < endColumn) {\n return {\n column: Math.max(column + 1, startColumn),\n row: startRow\n };\n }\n break;\n case GridRange.SELECTION_DIRECTION.UP:\n if (row > startRow) {\n return {\n column,\n row: Math.min(row - 1, endRow)\n };\n }\n if (column > startColumn) {\n return {\n column: Math.min(column - 1, endColumn),\n row: endRow\n };\n }\n break;\n case GridRange.SELECTION_DIRECTION.RIGHT:\n if (column < endColumn) {\n return {\n column: Math.max(column + 1, startColumn),\n row\n };\n }\n if (row < endRow) {\n return {\n column: startColumn,\n row: Math.max(row + 1, startRow)\n };\n }\n break;\n case GridRange.SELECTION_DIRECTION.LEFT:\n if (column > startColumn) {\n return {\n column: Math.min(column - 1, endColumn),\n row\n };\n }\n if (row > startRow) {\n return {\n column: endColumn,\n row: Math.min(row - 1, endRow)\n };\n }\n break;\n default:\n throw new Error(\"Invalid direction: \".concat(direction));\n }\n return null;\n }\n\n /**\n * Iterate through each cell in the range\n * @param callback Callback to execute. `index` is the index within this range\n * @param direction The direction to iterate in\n */\n forEach(callback) {\n var direction = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : GridRange.SELECTION_DIRECTION.RIGHT;\n var i = 0;\n var {\n column: c,\n row: r\n } = this.startCell(direction);\n while (c != null && r != null) {\n var _this$nextCell;\n callback(c, r, i);\n i += 1;\n ({\n column: c,\n row: r\n } = (_this$nextCell = this.nextCell(c, r, direction)) !== null && _this$nextCell !== void 0 ? _this$nextCell : {});\n }\n }\n}\n_defineProperty(GridRange, \"SELECTION_DIRECTION\", SELECTION_DIRECTION);\nexport default GridRange;\n//# sourceMappingURL=GridRange.js.map","export function isAxisRange(range) {\n return Array.isArray(range) && range.length === 2 && (range[0] === null || typeof range[0] === 'number') && (range[1] === null || typeof range[1] === 'number');\n}\nexport function assertAxisRange(range) {\n if (!isAxisRange(range)) {\n throw new Error(\"Expected axis range. Received: \".concat(range));\n }\n}\nexport function isBoundedAxisRange(range) {\n return isAxisRange(range) && range[0] != null && range[1] != null;\n}\nexport function assertBoundedAxisRange(range) {\n if (!isBoundedAxisRange(range)) {\n throw new Error(\"Expected bounded axis range. Received: \".concat(range));\n }\n}\n//# sourceMappingURL=GridAxisRange.js.map","function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }\nfunction _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }\nfunction _toPropertyKey(t) { var i = _toPrimitive(t, \"string\"); return \"symbol\" == typeof i ? i : i + \"\"; }\nfunction _toPrimitive(t, r) { if (\"object\" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || \"default\"); if (\"object\" != typeof i) return i; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (\"string\" === r ? String : Number)(t); }\nimport clamp from 'lodash.clamp';\nimport { find as linkifyFind } from 'linkifyjs';\nimport { EMPTY_ARRAY, getOrThrow } from '@deephaven/utils';\nimport GridRange from \"./GridRange.js\";\nimport { isBoundedAxisRange } from \"./GridAxisRange.js\";\nimport { isExpandableGridModel } from \"./ExpandableGridModel.js\";\nexport function isLinkToken(token) {\n return (token === null || token === void 0 ? void 0 : token.href) !== undefined;\n}\nexport class GridUtils {\n /**\n * Get the GridPoint for the coordinates provided\n * @param x The grid x coordinate\n * @param y The grid y coordinate\n * @param metrics The grid metrics\n * @returns The GridPoint including the column/row information\n */\n static getGridPointFromXY(x, y, metrics) {\n var column = GridUtils.getColumnAtX(x, metrics);\n var row = GridUtils.getRowAtY(y, metrics);\n var columnHeaderDepth = GridUtils.getColumnHeaderDepthAtY(y, metrics);\n return {\n x,\n y,\n row,\n column,\n columnHeaderDepth\n };\n }\n static getCellInfoFromXY(x, y, metrics) {\n var {\n row,\n column\n } = GridUtils.getGridPointFromXY(x, y, metrics);\n var {\n allColumnWidths,\n allRowHeights,\n allColumnXs,\n allRowYs,\n modelColumns,\n modelRows\n } = metrics;\n var modelRow = row !== null ? modelRows.get(row) : null;\n var modelColumn = column !== null ? modelColumns.get(column) : null;\n var left = column !== null ? allColumnXs.get(column) : null;\n var top = row !== null ? allRowYs.get(row) : null;\n var columnWidth = column !== null ? allColumnWidths.get(column) : null;\n var rowHeight = row !== null ? allRowHeights.get(row) : null;\n return {\n row,\n column,\n modelRow: modelRow !== null && modelRow !== void 0 ? modelRow : null,\n modelColumn: modelColumn !== null && modelColumn !== void 0 ? modelColumn : null,\n left: left !== null && left !== void 0 ? left : null,\n top: top !== null && top !== void 0 ? top : null,\n columnWidth: columnWidth !== null && columnWidth !== void 0 ? columnWidth : null,\n rowHeight: rowHeight !== null && rowHeight !== void 0 ? rowHeight : null\n };\n }\n static getColumnHeaderDepthAtY(y, metrics) {\n var row = GridUtils.getRowAtY(y, metrics);\n var {\n columnHeaderHeight,\n columnHeaderMaxDepth\n } = metrics;\n if (row === null && y <= columnHeaderHeight * columnHeaderMaxDepth) {\n return clamp(columnHeaderMaxDepth - Math.ceil(y / columnHeaderHeight), 0, columnHeaderMaxDepth - 1);\n }\n return undefined;\n }\n\n /**\n * Iterate through each floating item at the start and call a callback, returning the first result\n * @param start The count of floating items at the start\n * @param total The total number of items\n * @param callback Function to call for each item\n * @returns The result from the callback\n */\n static iterateFloatingStart(start, total, callback) {\n for (var i = 0; i < start && i < total; i += 1) {\n var result = callback(i);\n if (result !== undefined) {\n return result;\n }\n }\n return undefined;\n }\n\n /**\n * Iterate through floating items at the end. Iterates in increasing order.\n * @param end The count of floating items at the end\n * @param total The total number of items\n * @param callback Function to call for each item\n * @returns The result from the callback\n */\n static iterateFloatingEnd(end, total, callback) {\n for (var i = 0; i < end && total - (end - i) >= 0; i += 1) {\n var result = callback(total - (end - i));\n if (result !== undefined) {\n return result;\n }\n }\n return undefined;\n }\n\n /**\n * Iterate through all floating items in increasing order, starting with the top items.\n * @param start Count of start floating rows, e.g. floatingTopRowCount\n * @param end Count of end floating rows, e.g. floatingBottomRowCount\n * @param total Total number of items\n * @param callback Callback called for each value, stopping the iterating and returning the value if one is returned\n */\n static iterateFloating(start, end, total, callback) {\n var result = GridUtils.iterateFloatingStart(start, total, callback);\n if (result !== undefined) {\n return result;\n }\n return GridUtils.iterateFloatingEnd(end, total, callback);\n }\n\n /**\n * Iterate through all items in one dimension on the grid - first floating, then visible.\n * Call the callback for each item, break if a result is returned and return that result.\n * @param visibleStart Index of the start of the visible viewport\n * @param visibleEnd Index of the end of the visible viewport\n * @param floatingStartCount Number of items floating at the start\n * @param floatingEndCount Number of items floating at the end\n * @param totalCount Total number of items\n * @param callback Callback to call for each item\n * @returns The first result from the callback called, or undefined\n */\n static iterateAllItems(visibleStart, visibleEnd, floatingStartCount, floatingEndCount, totalCount, callback) {\n var visibleStartIndex = Math.max(visibleStart, floatingStartCount);\n var visibleEndIndex = Math.min(visibleEnd, totalCount - floatingEndCount - 1);\n var result = GridUtils.iterateFloating(floatingStartCount, floatingEndCount, totalCount, callback);\n if (result !== undefined) {\n return result;\n }\n for (var i = visibleStartIndex; i <= visibleEndIndex; i += 1) {\n result = callback(i);\n if (result !== undefined) {\n return result;\n }\n }\n return undefined;\n }\n\n /**\n * Check if the coordinate is within the item specified in this dimension\n * @param itemIndex Index of the item to check\n * @param itemCoordinatess Coordinate of all items in this dimension\n * @param itemSizes Size of all items in this dimension\n * @param coordinate The coordinate to check\n * @returns True if the coordinate is within the item specified, false otherwise\n */\n static isInItem(itemIndex, itemCoordinates, itemSizes, coordinate) {\n var _itemCoordinates$get, _itemSizes$get;\n var itemX = (_itemCoordinates$get = itemCoordinates.get(itemIndex)) !== null && _itemCoordinates$get !== void 0 ? _itemCoordinates$get : 0;\n var itemSize = (_itemSizes$get = itemSizes.get(itemIndex)) !== null && _itemSizes$get !== void 0 ? _itemSizes$get : 0;\n return itemX <= coordinate && coordinate <= itemX + itemSize;\n }\n\n /**\n * Get the Index of the item at the provided offset\n * @param offset Coordinate of the offset to get the item of\n * @param itemCount The total count of items\n * @param floatingStart Count of floating items at the start\n * @param floatingEnd Count of floating items at the end\n * @param items Index of all items\n * @param itemCoordinates The coordinate of each item\n * @param itemSizes The size of each item\n * @returns The item index, or null if no item matches\n */\n static getItemAtOffset(offset, itemCount, floatingStart, floatingEnd, items, itemCoordinates, itemSizes) {\n var ignoreFloating = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : false;\n var floatingItem = ignoreFloating ? undefined : GridUtils.iterateFloating(floatingStart, floatingEnd, itemCount, item => {\n if (GridUtils.isInItem(item, itemCoordinates, itemSizes, offset)) {\n return item;\n }\n return undefined;\n });\n if (!ignoreFloating && floatingItem !== undefined) {\n return floatingItem;\n }\n for (var i = 0; i < items.length; i += 1) {\n var item = items[i];\n if (GridUtils.isInItem(item, itemCoordinates, itemSizes, offset)) {\n return item;\n }\n }\n return null;\n }\n\n /**\n * Get the index of the column at the specified x coordinate\n * @param x Coordinate to get the item of\n * @param metrics Grid metrics\n * @returns Index of the column at that coordinate, or null if no column matches\n */\n static getColumnAtX(x, metrics) {\n var ignoreFloating = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n var {\n columnCount,\n floatingLeftColumnCount,\n floatingRightColumnCount,\n visibleColumns,\n allColumnXs,\n allColumnWidths,\n gridX\n } = metrics;\n if (x < gridX) {\n return null;\n }\n return this.getItemAtOffset(x - gridX, columnCount, floatingLeftColumnCount, floatingRightColumnCount, visibleColumns, allColumnXs, allColumnWidths, ignoreFloating);\n }\n\n /**\n * Get the index of the row at the specified y coordinate\n * @param y Coordinate to get the item of\n * @param metrics Grid metrics\n * @returns Index of the row at that coordinate, or null if no row matches\n */\n static getRowAtY(y, metrics) {\n var {\n floatingTopRowCount,\n floatingBottomRowCount,\n rowCount,\n visibleRows,\n allRowYs,\n allRowHeights,\n gridY\n } = metrics;\n if (y < gridY) {\n return null;\n }\n return this.getItemAtOffset(y - gridY, rowCount, floatingTopRowCount, floatingBottomRowCount, visibleRows, allRowYs, allRowHeights);\n }\n\n /**\n * Iterate backward through the visible items until a shown item is hit\n * @param startIndex The index to start from\n * @param modelIndexes The mapping of model indexes\n * @param visibleItems The visible items\n * @param userSizes The user set sizes\n * @returns Index of the next visible item, or null if no more are visible\n */\n static getNextShownItem(startIndex, modelIndexes, visibleItems, userSizes) {\n var visibleItemIndex = visibleItems.findIndex(value => value === startIndex) || 0;\n visibleItemIndex -= 1;\n while (visibleItemIndex != null && visibleItemIndex >= 0) {\n var item = visibleItems[visibleItemIndex];\n var modelIndex = modelIndexes.get(item);\n if (modelIndex != null && userSizes.get(modelIndex) !== 0) {\n return item;\n }\n visibleItemIndex -= 1;\n }\n return null;\n }\n\n /**\n * Iterate backward through the visible columns until a shown column is hit\n * @param columnIndex The column index to start iterating backward from\n * @param metrics The GridMetricCalculator metrics\n * @returns Index of the next visible item, or null if no more are visible\n */\n static getNextShownColumn(startIndex, metrics) {\n var {\n modelColumns,\n visibleColumns,\n userColumnWidths\n } = metrics;\n return GridUtils.getNextShownItem(startIndex, modelColumns, visibleColumns, userColumnWidths);\n }\n\n /**\n * Iterate backward through the visible rows until a shown row is hit\n * @param rowIndex The row index to start iterating backward from\n * @param metrics The GridMetricCalculator metrics\n * @returns Index of the next visible item, or null if no more are visible\n */\n static getNextShownRow(startIndex, metrics) {\n var {\n modelRows,\n visibleRows,\n userRowHeights\n } = metrics;\n return GridUtils.getNextShownItem(startIndex, modelRows, visibleRows, userRowHeights);\n }\n\n /**\n * Check if a separator exists between a column and the next column at a given depth.\n * A separator exists if adjacent columns have different header text at the specified depth.\n *\n * @param model The grid model\n * @param depth The header depth to check at\n * @param columnIndex The current model column index\n * @param nextColumnIndex The next model column index (undefined for last column)\n * @returns true if a separator should be shown, false otherwise\n */\n static hasColumnSeparatorAtDepth(model, depth, columnIndex, nextColumnIndex) {\n if (depth == null || columnIndex == null) {\n return false;\n }\n\n // Always show separator for the last column\n if (nextColumnIndex == null) {\n return true;\n }\n\n // A separator exists if adjacent columns have different header text at this depth\n return model.textForColumnHeader(columnIndex, depth) !== model.textForColumnHeader(nextColumnIndex, depth);\n }\n\n /**\n * Gets the column index if the x/y coordinates provided are close enough to the separator, otherwise null\n * @param x Mouse x coordinate\n * @param y Mouse y coordinate\n * @param metrics The grid metrics\n * @param theme The grid theme with potential user overrides\n * @param model The grid model\n * @returns Index of the column separator at the coordinates provided, or null if none match\n */\n static getColumnSeparatorIndex(x, y, metrics, theme, model) {\n var {\n rowHeaderWidth,\n columnHeaderHeight,\n floatingColumns,\n floatingLeftWidth,\n visibleColumns,\n allColumnXs,\n allColumnWidths,\n columnHeaderMaxDepth,\n modelColumns\n } = metrics;\n var {\n allowColumnResize,\n headerSeparatorHandleSize\n } = theme;\n if (columnHeaderMaxDepth * columnHeaderHeight < y || !allowColumnResize || headerSeparatorHandleSize <= 0) {\n return null;\n }\n var gridX = x - rowHeaderWidth;\n var halfSeparatorSize = headerSeparatorHandleSize * 0.5;\n var depth = GridUtils.getColumnHeaderDepthAtY(y, metrics);\n\n // Iterate through the floating columns first since they're on top\n var isPreviousColumnHidden = false;\n for (var i = floatingColumns.length - 1; i >= 0; i -= 1) {\n var _allColumnXs$get, _allColumnWidths$get;\n var column = floatingColumns[i];\n var columnX = (_allColumnXs$get = allColumnXs.get(column)) !== null && _allColumnXs$get !== void 0 ? _allColumnXs$get : 0;\n var columnWidth = (_allColumnWidths$get = allColumnWidths.get(column)) !== null && _allColumnWidths$get !== void 0 ? _allColumnWidths$get : 0;\n var isColumnHidden = columnWidth === 0;\n if (!isPreviousColumnHidden || !isColumnHidden) {\n var midX = columnX + columnWidth;\n if (isColumnHidden) {\n midX += halfSeparatorSize;\n } else if (isPreviousColumnHidden) {\n midX -= halfSeparatorSize;\n }\n var minX = midX - halfSeparatorSize;\n var maxX = midX + halfSeparatorSize;\n if (minX <= gridX && gridX <= maxX && GridUtils.hasColumnSeparatorAtDepth(model, depth, modelColumns.get(column), modelColumns.get(column + 1))) {\n return column;\n }\n isPreviousColumnHidden = isColumnHidden;\n }\n }\n\n // Iterate backward so that you can reveal hidden columns properly\n isPreviousColumnHidden = false;\n for (var _i = visibleColumns.length - 1; _i >= 0; _i -= 1) {\n var _allColumnXs$get2, _allColumnWidths$get2;\n var _column = visibleColumns[_i];\n var _columnX = (_allColumnXs$get2 = allColumnXs.get(_column)) !== null && _allColumnXs$get2 !== void 0 ? _allColumnXs$get2 : 0;\n var _columnWidth = (_allColumnWidths$get2 = allColumnWidths.get(_column)) !== null && _allColumnWidths$get2 !== void 0 ? _allColumnWidths$get2 : 0;\n var _isColumnHidden = _columnWidth === 0;\n\n // If this column is under the floating columns \"layer\". Terminate early.\n if (_columnX < floatingLeftWidth - _columnWidth) {\n return null;\n }\n if (!isPreviousColumnHidden || !_isColumnHidden) {\n var _midX = _columnX + _columnWidth;\n if (_isColumnHidden) {\n _midX += halfSeparatorSize;\n } else if (isPreviousColumnHidden) {\n _midX -= halfSeparatorSize;\n }\n var _minX = _midX - halfSeparatorSize;\n var _maxX = _midX + halfSeparatorSize;\n if (_minX <= gridX && gridX <= _maxX && GridUtils.hasColumnSeparatorAtDepth(model, depth, modelColumns.get(_column), modelColumns.get(_column + 1))) {\n return _column;\n }\n isPreviousColumnHidden = _isColumnHidden;\n }\n }\n return null;\n }\n\n /**\n * Check if the item specified is hidden\n * @param itemIndex Index of the item to check\n * @param visibleSizes Sizes of all visible items\n * @returns True if the item is hidden, false otherwise\n */\n static isItemHidden(itemIndex, visibleSizes) {\n return visibleSizes.get(itemIndex) === 0;\n }\n\n /**\n * Check if the column specified is hidden\n * @param columnIndex Index of the column to check\n * @param metrics Grid metrics\n * @returns True if the column is hidden, false otherwise\n */\n static isColumnHidden(columnIndex, metrics) {\n var {\n allColumnWidths\n } = metrics;\n return GridUtils.isItemHidden(columnIndex, allColumnWidths);\n }\n\n /**\n * Check if the provided row is a floating row\n * @param row The row index to check\n * @param metrics The grid metrics to check against\n * @returns True if it's a floating row, false otherwise\n */\n static isFloatingRow(row, metrics) {\n if (row == null) {\n return false;\n }\n var {\n floatingTopRowCount,\n floatingBottomRowCount,\n rowCount\n } = metrics;\n return row < floatingTopRowCount || row >= rowCount - floatingBottomRowCount;\n }\n\n /**\n * Check if the provided column is a floating column\n * @param column The column index to check\n * @param metrics The grid metrics to check against\n * @returns True if it's a floating column, false otherwise\n */\n static isFloatingColumn(column, metrics) {\n if (column == null) {\n return false;\n }\n var {\n floatingLeftColumnCount,\n floatingRightColumnCount,\n columnCount\n } = metrics;\n return column < floatingLeftColumnCount || column >= columnCount - floatingRightColumnCount;\n }\n\n /**\n * Get all the items that are hidden under the same Index\n * E.g. If columns are 1, 2, 3, 4, 5, and column 2, 3, 4 are hidden, and we check for item 4, the return will be [2, 3, 4]\n * @param itemIndex Index of the item to start at\n * @param visibleSizes Visible size map\n * @param visibleItems Visible items\n * @returns Array of items that are hidden\n */\n static getHiddenItems(itemIndex, visibleSizes, visibleItems) {\n if (!GridUtils.isItemHidden(itemIndex, visibleSizes)) {\n return [];\n }\n var hiddenItems = [itemIndex];\n var visibleItemIndex = visibleItems.findIndex(value => value === itemIndex);\n for (var i = visibleItemIndex - 1; i >= 0; i -= 1) {\n var item = visibleItems[i];\n if (!GridUtils.isItemHidden(item, visibleSizes)) {\n break;\n }\n hiddenItems.push(item);\n }\n return hiddenItems;\n }\n\n /**\n * Get all the columns that are hidden under the same Index\n * @param columnIndex Index of the item to start at\n * @param metrics Grid metrics\n * @returns Array of items that are hidden\n */\n static getHiddenColumns(columnIndex, metrics) {\n var {\n visibleColumns,\n allColumnWidths\n } = metrics;\n return GridUtils.getHiddenItems(columnIndex, allColumnWidths, visibleColumns);\n }\n\n /**\n * Returns the row index if the x/y coordinates provided are close enough to the separator, otherwise null\n * @param x X coordinate to check\n * @param y Y coordinate to check\n * @param metrics The grid metrics\n * @param theme The grid theme\n * @returns Index of the row separator at the coordinates provided, or null if none match\n */\n static getRowSeparatorIndex(x, y, metrics, theme) {\n var {\n rowHeaderWidth,\n columnHeaderHeight,\n visibleRows,\n allRowYs,\n allRowHeights\n } = metrics;\n var {\n allowRowResize,\n headerSeparatorHandleSize\n } = theme;\n if (rowHeaderWidth < x || !allowRowResize || headerSeparatorHandleSize <= 0) {\n return null;\n }\n var gridY = y - columnHeaderHeight;\n var halfSeparatorSize = headerSeparatorHandleSize * 0.5;\n\n // Iterate backward so you can reveal hidden rows properly\n var isPreviousRowHidden = false;\n for (var i = visibleRows.length - 1; i >= 0; i -= 1) {\n var _allRowYs$get, _allRowHeights$get;\n var row = visibleRows[i];\n var rowY = (_allRowYs$get = allRowYs.get(row)) !== null && _allRowYs$get !== void 0 ? _allRowYs$get : 0;\n var rowHeight = (_allRowHeights$get = allRowHeights.get(row)) !== null && _allRowHeights$get !== void 0 ? _allRowHeights$get : 0;\n var isRowHidden = rowHeight === 0;\n if (!isPreviousRowHidden || !isRowHidden) {\n var midY = rowY + rowHeight;\n if (isRowHidden) {\n midY += halfSeparatorSize;\n } else if (isPreviousRowHidden) {\n midY -= halfSeparatorSize;\n }\n var minY = midY - halfSeparatorSize;\n var maxY = midY + halfSeparatorSize;\n if (minY <= gridY && gridY <= maxY) {\n return row;\n }\n isPreviousRowHidden = isRowHidden;\n }\n }\n return null;\n }\n\n /**\n * Check if the row specified is hidden\n * @param rowIndex Index of the row to check\n * @param metrics Grid metrics\n * @returns True if the row is hidden, false otherwise\n */\n static isRowHidden(rowIndex, metrics) {\n var {\n allRowHeights\n } = metrics;\n return GridUtils.isItemHidden(rowIndex, allRowHeights);\n }\n\n /**\n * Get all the rows that are hidden under the same Index\n * @param rowIndex Index of the item to start at\n * @param metrics Grid metrics\n * @returns Array of items that are hidden\n */\n static getHiddenRows(rowIndex, metrics) {\n var {\n visibleRows,\n allRowHeights\n } = metrics;\n return GridUtils.getHiddenItems(rowIndex, allRowHeights, visibleRows);\n }\n\n /**\n * Set a new order for items in the grid\n * @param from The visible index to move from\n * @param to The visible index to move the item to\n * @param oldMovedItems The old reordered items\n * @returns The new reordered items. The original array if the operation is a no-op.\n */\n\n // The overloads are so we can return the original array if the operation is a no-op\n static moveItem(from, to, oldMovedItems) {\n if (from === to) {\n return oldMovedItems;\n }\n var movedItems = [...oldMovedItems];\n var lastMovedItem = movedItems[movedItems.length - 1];\n\n // Check if we should combine with the previous move\n // E.g. 1 -> 2, 2 -> 3 can just be 1 -> 3\n if (lastMovedItem != null && !isBoundedAxisRange(lastMovedItem.from) && lastMovedItem.to === from) {\n // Remove the move if it is now a no-op\n if (lastMovedItem.from === to) {\n movedItems.pop();\n } else {\n movedItems[movedItems.length - 1] = _objectSpread(_objectSpread({}, lastMovedItem), {}, {\n to\n });\n }\n } else {\n movedItems.push({\n from,\n to\n });\n }\n return movedItems;\n }\n\n /**\n * Move a visible range in the grid\n *\n * This will effectively slice the range out of the grid,\n * re-index the remaining columns,\n * then insert the range with the first element at the provided index\n *\n * @param from The visible axis range to move\n * @param to The visible index to move the start of the range to\n * @param oldMovedItems The old reordered items\n * @param isPreMoveTo If toParam is the index before the movement\n * If true, this will account for the shift when moving\n * a range before the drop positin\n * E.g. Move range [0, 2] 1 item down (after element 3)\n * The move is [0, 2] -> 1 if this is false. [0, 2] -> 3 if this is true\n * Both will result in [0, 2] -> 1\n * @returns The new reordered items. The original array if the operation is a no-op.\n */\n\n // The overloads are so we can return the original array if the operation is a no-op\n static moveRange(from, toParam, oldMovedItems) {\n var isPreMoveTo = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;\n if (from[0] === from[1]) {\n return GridUtils.moveItem(from[0], toParam, oldMovedItems);\n }\n var to = toParam;\n if (isPreMoveTo && from[0] < toParam) {\n to -= from[1] - from[0];\n }\n if (from[0] === to) {\n return oldMovedItems;\n }\n var movedItems = [...oldMovedItems];\n var lastMovedItem = movedItems[movedItems.length - 1];\n\n // Check if we should combine with the previous move\n // E.g. [1, 2] -> 2, [2, 3] -> 3 can just be [1, 2] -> 3\n if (lastMovedItem != null && isBoundedAxisRange(lastMovedItem.from) && lastMovedItem.from[1] - lastMovedItem.from[0] === from[1] - from[0] && lastMovedItem.to === from[0]) {\n movedItems[movedItems.length - 1] = _objectSpread(_objectSpread({}, lastMovedItem), {}, {\n to\n });\n } else {\n movedItems.push({\n from,\n to\n });\n }\n var newLastMovedItem = movedItems[movedItems.length - 1];\n // Remove the move if it is now a no-op\n if (isBoundedAxisRange(newLastMovedItem.from) && newLastMovedItem.from[0] === newLastMovedItem.to) {\n movedItems.pop();\n }\n return movedItems;\n }\n // The overloads are so we can return the original array if the operation is a no-op\n static moveItemOrRange(from, to, oldMovedItems) {\n var isPreMoveTo = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;\n return Array.isArray(from) ? GridUtils.moveRange(from, to, oldMovedItems, isPreMoveTo) : GridUtils.moveItem(from, to, oldMovedItems);\n }\n\n /**\n * Applies the items moves to the AxisRange\n * @param start The start index of the range\n * @param end The end index of the range\n * @param movedItems The move operations to apply\n * @param reverse If the moved items should be applied in reverse (this reverses the effects of the moves)\n * @returns A list of AxisRanges in the translated space. Possibly multiple non-continuous ranges\n */\n static applyItemMoves(start, end, movedItems) {\n var reverse = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;\n var result = [[start, end]];\n var _loop = function _loop() {\n var {\n from: fromItemOrRange,\n to: toItem\n } = movedItems[i];\n var length = 1;\n var fromItem;\n if (isBoundedAxisRange(fromItemOrRange)) {\n length = fromItemOrRange[1] - fromItemOrRange[0] + 1; // Ranges are inclusive\n [fromItem] = fromItemOrRange;\n } else {\n fromItem = fromItemOrRange;\n }\n var fromStart = reverse ? toItem : fromItem;\n var fromEnd = fromStart + length - 1;\n var toStart = reverse ? fromItem : toItem;\n var moveDistance = toStart - fromStart;\n var nextResult = [];\n var _loop2 = function _loop2() {\n var _result$j$, _result$j$2;\n var currentStart = (_result$j$ = result[j][0]) !== null && _result$j$ !== void 0 ? _result$j$ : Number.NEGATIVE_INFINITY;\n var currentEnd = (_result$j$2 = result[j][1]) !== null && _result$j$2 !== void 0 ? _result$j$2 : Number.POSITIVE_INFINITY;\n var movedRange;\n var currentResult = [[currentStart, fromStart - 1], [fromStart, fromEnd], [fromEnd + 1, currentEnd]].map(_ref2 => {\n var [s, e] = _ref2;\n return [\n // Cap the ranges to within the current range bounds\n Math.max(s, currentStart), Math.min(e, currentEnd)];\n }).filter(_ref3 => {\n var [s, e] = _ref3;\n return s <= e;\n }) // Remove invalid ranges\n .map(range => {\n var [s, e] = range;\n if (fromStart <= s && fromEnd >= e) {\n // Current range in moved range\n movedRange = [s + moveDistance, e + moveDistance];\n return movedRange;\n }\n if (fromEnd < s) {\n // Current range is after moved range\n return [s - length, e - length];\n }\n return range;\n }).map(range => {\n var [s, e] = range;\n if (toStart > s && toStart <= e) {\n // Moved range splits this range\n return [[s, toStart - 1], [toStart + length, e + length]];\n }\n if (range === movedRange) {\n // Moved range has already been shifted\n return [range];\n }\n if (toStart <= s) {\n // Moved range shifts this range right\n return [[s + length, e + length]];\n }\n return [range];\n }).flat();\n nextResult.push(...currentResult);\n };\n for (var j = 0; j < result.length; j += 1) {\n _loop2();\n }\n\n // Return infinity values back to null\n result = nextResult.map(_ref => {\n var [s, e] = _ref;\n return [Number.isFinite(s) ? s : null, Number.isFinite(e) ? e : null];\n });\n };\n for (var i = reverse ? movedItems.length - 1 : 0; reverse ? i >= 0 : i < movedItems.length; reverse ? i -= 1 : i += 1) {\n _loop();\n }\n return result;\n }\n\n /**\n * Applies the items moves to the givengrid range\n * @param range The grid range to translate\n * @param movedColumns The moved columns\n * @param movedRows The moved rows\n * @param reverse If the moved items should be reversed (i.e. visible to model range)\n * @returns A list of grid ranges in the translated space. Possibly multiple non-continuous ranges\n */\n static translateRange(range, movedColumns, movedRows, reverse) {\n var columnRanges = GridUtils.applyItemMoves(range.startColumn, range.endColumn, movedColumns, reverse);\n var rowRanges = GridUtils.applyItemMoves(range.startRow, range.endRow, movedRows, reverse);\n var ranges = [];\n for (var i = 0; i < columnRanges.length; i += 1) {\n var c = columnRanges[i];\n for (var j = 0; j < rowRanges.length; j += 1) {\n var r = rowRanges[j];\n ranges.push(new GridRange(c[0], r[0], c[1], r[1]));\n }\n }\n return ranges;\n }\n\n /**\n * Retrieve the model index given the currently moved items\n * @param visibleIndex The visible index of the item to get the model index for\n * @param movedItems The moved items\n * @returns The model index of the item\n */\n static getModelIndex(visibleIndex, movedItems) {\n var modelIndex = GridUtils.applyItemMoves(visibleIndex, visibleIndex, movedItems, true)[0][0];\n return modelIndex;\n }\n\n /**\n * Retrieve the model indexes given the currently moved items\n * @param visibleIndexes The visible indexes of the item to get the model indexes for\n * @param movedItems The moved items\n * @returns The model indexes of the item\n */\n static getModelIndexes(visibleIndexes, movedItems) {\n return visibleIndexes.map(i => GridUtils.getModelIndex(i, movedItems));\n }\n\n /**\n * Translate the provided UI start/end indexes to the model start/end indexes by applying the `movedItems` transformations.\n * Since moved items can split apart a range, multiple pairs of indexes are returned\n *\n * @param start Start item in one dimension\n * @param end End item in one dimension\n * @param movedItems Moved item pairs in this dimension\n * @returns Array of start/end pairs of the indexes after transformations applied.\n */\n static getModelRangeIndexes(start, end, movedItems) {\n return GridUtils.applyItemMoves(start, end, movedItems, true);\n }\n\n /**\n * Translate the provided UI range into model range, using the `movedColumns` and `movedRows` to apply the necessary transforms.\n * `movedColumns` and `movedRows` are array of operations done to the UI indexes to re-order items\n *\n * @param uiRange The currently selected UI ranges\n * @param movedColumns The moved column pairs\n * @param movedRows The moved row pairs\n * @returns The model ranges after translation.\n */\n static getModelRange(uiRange) {\n var movedColumns = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : EMPTY_ARRAY;\n var movedRows = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : EMPTY_ARRAY;\n return GridUtils.translateRange(uiRange, movedColumns, movedRows, true);\n }\n\n /**\n * Translate the provided UI range into model ranges, using the `movedColumns` and `movedRows` to apply the necessary transforms.\n * `movedColumns` and `movedRows` are array of operations done to the UI indexes to re-order items\n *\n * @param uiRanges The currently selected UI ranges\n * @param movedColumns The moved column pairs\n * @param movedRows The moved row pairs\n * @returns The model ranges after translation.\n */\n static getModelRanges(uiRanges) {\n var movedColumns = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : EMPTY_ARRAY;\n var movedRows = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : EMPTY_ARRAY;\n var modelRanges = [];\n for (var i = 0; i < uiRanges.length; i += 1) {\n modelRanges.push(...GridUtils.getModelRange(uiRanges[i], movedColumns, movedRows));\n }\n return modelRanges;\n }\n\n /**\n * Translate the provided UI start/end indexes to the visible start/end indexes by applying the `movedItems` transformations.\n * Since moved items can split apart a range, multiple pairs of indexes are returned\n *\n * @param start Start item in one dimension\n * @param end End item in one dimension\n * @param movedItems Moved item pairs in this dimension\n * @returns Array of start/end pairs of the indexes after transformations applied.\n */\n static getVisibleRangeIndexes(start, end, movedItems) {\n return GridUtils.applyItemMoves(start, end, movedItems, false);\n }\n\n /**\n * Translate the provided UI range into visible range, using the `movedColumns` and `movedRows` to apply the necessary transforms.\n * `movedColumns` and `movedRows` are array of operations done to the UI indexes to re-order items\n *\n * @param uiRange The currently selected UI ranges\n * @param movedColumns The moved column pairs\n * @param movedRows The moved row pairs\n * @returns The model ranges after translation.\n */\n static getVisibleRange(modelRange) {\n var movedColumns = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : EMPTY_ARRAY;\n var movedRows = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : EMPTY_ARRAY;\n return this.translateRange(modelRange, movedColumns, movedRows, false);\n }\n\n /**\n * Translate the provided model ranges into visible ranges, using the `movedColumns` and `movedRows` to apply the necessary transforms.\n * `movedColumns` and `movedRows` are array of operations done to the UI indexes to re-order items\n *\n * @param modelRanges The model ranges\n * @param movedColumns The moved column pairs\n * @param movedRows The moved row pairs\n * @returns The model ranges after translation.\n */\n static getVisibleRanges(modelRanges) {\n var movedColumns = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : EMPTY_ARRAY;\n var movedRows = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : EMPTY_ARRAY;\n var visibleRanges = [];\n for (var i = 0; i < modelRanges.length; i += 1) {\n visibleRanges.push(...GridUtils.getVisibleRange(modelRanges[i], movedColumns, movedRows));\n }\n return visibleRanges;\n }\n\n /**\n * Retrieve the visible index given the currently moved items\n * @param modelIndex The model index to get the visible index for\n * @param movedItems Moved items\n * @returns The visible index of the item\n */\n static getVisibleIndex(modelIndex, movedItems) {\n var visibleIndex = GridUtils.applyItemMoves(modelIndex, modelIndex, movedItems)[0][0];\n return visibleIndex;\n }\n\n /**\n * Retrieve the visible indexes given the currently moved items\n * @param modelIndexes The model indexes to get the visible indexes for\n * @param movedItems Moved items\n * @returns The visible indexes of the item\n */\n static getVisibleIndexes(modelIndexes, movedItems) {\n return modelIndexes.map(i => GridUtils.getVisibleIndex(i, movedItems));\n }\n\n /**\n * Check if the current platform is Mac\n * @returns True if this platform is a Mac, false otherwise\n */\n static isMacPlatform() {\n var {\n platform\n } = window.navigator;\n return platform.startsWith('Mac');\n }\n\n /**\n * Get the modifier key for the current platform\n * @returns The modifier key for the current platform\n */\n static getModifierKey() {\n if (GridUtils.isMacPlatform()) {\n return 'metaKey';\n }\n return 'ctrlKey';\n }\n\n /**\n * Check if the modifier key is down for the given event\n * @param event The event to check\n * @returns True if the modifier key is down, false otherwise\n */\n static isModifierKeyDown(event) {\n var modifierKey = GridUtils.getModifierKey();\n return event[modifierKey];\n }\n\n /**\n * Check if the user has hidden the specified column\n * @param modelIndex The model index to check\n * @param userColumnWidths The user set column widths\n * @returns True if the user has hidden the column\n */\n static checkColumnHidden(modelIndex, userColumnWidths) {\n return userColumnWidths.get(modelIndex) === 0;\n }\n\n /**\n * Check if all the columns specified are hidden\n * @param columns Columns to check\n * @param userColumnWidths The user set column widths\n * @returns True if the user has hidden all of the columns\n */\n static checkAllColumnsHidden(columns, userColumnWidths) {\n if (userColumnWidths.size === 0) {\n return false;\n }\n return columns.every(column => userColumnWidths.get(column) === 0);\n }\n\n /**\n * Get the bounds the mouse needs to be dragged outside of from an initial selection before scrolling occurs.\n * Taking into account any floating rows that may be covering the viewport.\n * @param metrics Grid metrics\n * @param row The row they started dragging in\n * @param column The column they started the drag from\n * @returns Dimensions of the drag area in relation to the canvas they need to drag outside of to start scrolling\n */\n static getScrollDragBounds(metrics, row, column) {\n var {\n gridX,\n gridY,\n width,\n height,\n floatingTopRowCount,\n floatingBottomRowCount,\n floatingLeftColumnCount,\n floatingRightColumnCount,\n floatingLeftWidth,\n floatingRightWidth,\n floatingTopHeight,\n floatingBottomHeight,\n columnCount,\n rowCount\n } = metrics;\n var x1 = gridX;\n var y1 = gridY;\n var x2 = width;\n var y2 = height;\n if (column != null) {\n if (column > floatingLeftColumnCount) {\n x1 += floatingLeftWidth;\n }\n if (column < columnCount - floatingRightColumnCount) {\n x2 -= floatingRightWidth;\n }\n }\n if (row != null) {\n if (row > floatingTopRowCount) {\n y1 += floatingTopHeight;\n }\n if (row < rowCount - floatingBottomRowCount) {\n y2 -= floatingBottomHeight;\n }\n }\n return {\n x1,\n y1,\n x2,\n y2\n };\n }\n\n /**\n * Converts the delta coordinates from the provided wheel event to pixels\n * Different platforms have different ways of providing the delta so this normalizes it\n * @param wheelEvent The mouse wheel event to get the scrolling delta for\n * @param pageWidth The width of the page that is scrolling\n * @param pageHeight The height of the page that is scrolling\n * @param lineWidth The width of the line scrolling in line mode\n * @param lineHeight The height of the line scrolling in line mode\n * @returns The delta coordinates normalized to pixels\n */\n static getScrollDelta(wheelEvent) {\n var pageWidth = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1024;\n var pageHeight = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 768;\n var lineWidth = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 20;\n var lineHeight = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 20;\n var {\n deltaX,\n deltaY\n } = wheelEvent;\n\n // Flip scroll direction if shiftKey is held on windows/linux.\n // On mac, deltaX/Y values are switched at the event level when shiftKey=true.\n // Guard on strictly Y only changing, to ignore trackpad diagonal motion,\n // through that guard may not be necessary, but it is difficult to determine for\n // all platforms/browser/scroll method combos.\n if (!GridUtils.isMacPlatform() && wheelEvent.shiftKey && wheelEvent.deltaX === 0 && wheelEvent.deltaY !== 0) {\n deltaX = wheelEvent.deltaY;\n deltaY = wheelEvent.deltaX;\n }\n\n // Normalize other deltaMode values to pixel units\n // deltaMode 0, is already in pixel units\n if ((wheelEvent === null || wheelEvent === void 0 ? void 0 : wheelEvent.deltaMode) === WheelEvent.DOM_DELTA_PAGE) {\n // Users can set OS to be in deltaMode page\n // scrolly by page units as pixels\n deltaX *= pageWidth;\n deltaY *= pageHeight;\n } else if ((wheelEvent === null || wheelEvent === void 0 ? void 0 : wheelEvent.deltaMode) === WheelEvent.DOM_DELTA_LINE) {\n // Firefox reports deltaMode line\n // Normalize distance travelled between browsers\n // but remain ~platform/browser combo consistent\n if (GridUtils.isMacPlatform()) {\n // for mac treat lines as a standard row height\n // on mac, firefox travels less distance then chrome per tick\n deltaX = Math.round(deltaX * lineWidth);\n deltaY = Math.round(deltaY * lineHeight);\n } else {\n // for windows convert to pixels using the same method as chrome\n // chrome goes 100 per 3 lines, and firefox would go 102 per 3 (17 lineheight * 3 lines * 2)\n // make the behaviour the same between as it's close enough\n deltaX = Math.round(deltaX * this.PIXELS_PER_LINE);\n deltaY = Math.round(deltaY * this.PIXELS_PER_LINE);\n }\n }\n return {\n deltaX,\n deltaY\n };\n }\n static compareRanges(range1, range2) {\n if (range1[0] == null || range1[1] == null || range2[0] == null || range2[1] == null) {\n return 0;\n }\n return range1[0] !== range2[0] ? range1[0] - range2[0] : range1[1] - range2[1];\n }\n static mergeSortedRanges(ranges) {\n var mergedRanges = [];\n for (var i = 0; i < ranges.length; i += 1) {\n var range = ranges[i];\n var start = range[0];\n var end = range[1];\n if (i === 0) {\n mergedRanges.push([start, end]);\n } else if (start - 1 <= mergedRanges[mergedRanges.length - 1][1]) {\n mergedRanges[mergedRanges.length - 1][1] = Math.max(mergedRanges[mergedRanges.length - 1][1], end);\n } else {\n mergedRanges.push([start, end]);\n }\n }\n return mergedRanges;\n }\n\n /**\n * Translates coordinates that are relative to gridX/gridY to be translated by gridX and gridY\n * @param tokenBox The token box to translate\n * @param metrics The grid metrics\n * @returns The token box with translated coordinates\n */\n static translateTokenBox(tokenBox, metrics) {\n var {\n x1: left,\n y1: top,\n x2: right,\n y2: bottom\n } = tokenBox;\n var {\n gridX,\n gridY,\n width: gridWidth,\n height: gridHeight,\n verticalBarWidth,\n horizontalBarHeight\n } = metrics;\n\n // Clamp the values within the grid\n var newLeft = clamp(gridX + left, gridX, gridWidth - verticalBarWidth);\n var newRight = clamp(gridX + right, gridX, gridWidth - verticalBarWidth);\n var newTop = clamp(gridY + top, gridY, gridHeight - horizontalBarHeight);\n var newBottom = clamp(gridY + bottom, gridY, gridHeight - horizontalBarHeight);\n return {\n x1: newLeft,\n y1: newTop,\n x2: newRight,\n y2: newBottom,\n token: tokenBox.token\n };\n }\n\n /**\n * Gets textWidth and X-Y position for a specific cell\n * The textWidth returned is the width that the text can occupy accounting for any other cell markings\n * The width accounts for tree table indents and cell padding, so it is the width the text may consume\n *\n * @param state GridRenderState to get the text metrics for\n * @param column Column of cell to get text metrics for\n * @param row Row of cell to get text metrics for\n * @returns Object with width, x, and y of the text\n */\n static getTextRenderMetrics(state, column, row) {\n var {\n metrics,\n model,\n theme\n } = state;\n var {\n firstColumn,\n allColumnXs,\n allColumnWidths,\n allRowYs,\n allRowHeights,\n modelRows,\n modelColumns\n } = metrics;\n var {\n cellHorizontalPadding,\n treeDepthIndent,\n treeHorizontalPadding\n } = theme;\n var modelRow = getOrThrow(modelRows, row);\n var modelColumn = getOrThrow(modelColumns, column);\n var textAlign = model.textAlignForCell(modelColumn, modelRow);\n var x = getOrThrow(allColumnXs, column);\n var y = getOrThrow(allRowYs, row);\n var columnWidth = getOrThrow(allColumnWidths, column);\n var rowHeight = getOrThrow(allRowHeights, row);\n var isFirstColumn = column === firstColumn;\n var treeIndent = 0;\n if (isExpandableGridModel(model) && model.hasExpandableRows && isFirstColumn) {\n treeIndent = treeDepthIndent * (model.depthForRow(row) + 1) + treeHorizontalPadding;\n }\n var textWidth = columnWidth - treeIndent;\n var textX = x + cellHorizontalPadding;\n var textY = y + rowHeight * 0.5;\n if (textAlign === 'right') {\n textX = x + textWidth - cellHorizontalPadding;\n } else if (textAlign === 'center') {\n textX = x + textWidth * 0.5;\n }\n textX += treeIndent;\n return {\n width: textWidth - cellHorizontalPadding * 2,\n x: textX,\n y: textY\n };\n }\n\n /**\n * Finds tokens in text (urls, emails) that start with https:// or http://\n * @param text The text to search in\n * @returns An array of tokens\n */\n static findTokensWithProtocolInText(text) {\n var tokens = linkifyFind(text);\n return tokens.filter(token => {\n if (token.type === 'url') {\n return /^https?:\\/\\//.test(token.value);\n }\n return true;\n });\n }\n}\n// use same constant as chrome source for windows\n// https://github.com/chromium/chromium/blob/973af9d461b6b5dc60208c8d3d66adc27e53da78/ui/events/blink/web_input_event_builders_win.cc#L285\n_defineProperty(GridUtils, \"PIXELS_PER_LINE\", 100 / 3);\nexport default GridUtils;\n//# sourceMappingURL=GridUtils.js.map","function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }\nfunction _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }\nfunction _toPropertyKey(t) { var i = _toPrimitive(t, \"string\"); return \"symbol\" == typeof i ? i : i + \"\"; }\nfunction _toPrimitive(t, r) { if (\"object\" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || \"default\"); if (\"object\" != typeof i) return i; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (\"string\" === r ? String : Number)(t); }\n/**\n * Extension of memoizee that clears the entire cache when it's full.\n * This avoids the situation where LRU cache starts thrashing when it fills up.\n * Could look at writing our own memoize with a smarter cache to avoid overhead of\n * LRU queue, but this should be sufficient for now.\n */\nimport memoizee from 'memoizee';\n\n/**\n * @param fn The function to memoize\n * @param options The options to set for memoization\n */\n// eslint-disable-next-line @typescript-eslint/ban-types\nexport function memoizeClear(fn, options) {\n var isClearingCache = false;\n var memoizedFn = memoizee(fn, _objectSpread(_objectSpread({}, options), {}, {\n dispose: () => {\n // Need to track when we're clearing because dispose gets called for all items removed\n if (!isClearingCache) {\n isClearingCache = true;\n memoizedFn.clear();\n isClearingCache = false;\n }\n }\n }));\n return memoizedFn;\n}\nexport default memoizeClear;\n//# sourceMappingURL=memoizeClear.js.map","function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }\nfunction _toPropertyKey(t) { var i = _toPrimitive(t, \"string\"); return \"symbol\" == typeof i ? i : i + \"\"; }\nfunction _toPrimitive(t, r) { if (\"object\" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || \"default\"); if (\"object\" != typeof i) return i; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (\"string\" === r ? String : Number)(t); }\nimport { EventTarget } from 'event-target-shim';\nimport memoizeClear from \"./memoizeClear.js\";\nimport GridUtils from \"./GridUtils.js\";\nvar LINK_TRUNCATION_LENGTH = 5000;\n\n/* eslint class-methods-use-this: \"off\" */\n/* eslint no-unused-vars: \"off\" */\n/**\n * Model for a Grid\n * All of these methods should return very quickly, as they will be called many times in the render cycle.\n * If data needs to be loaded asynchronously, return something immediately, then trigger an event for the table to refresh (Not yet implemented).\n */\nclass GridModel extends EventTarget {\n constructor() {\n super(...arguments);\n _defineProperty(this, \"getCachedTokensInText\", memoizeClear((text, visibleLength) => {\n // If no text is truncated, then directly search in text\n if (visibleLength >= text.length) {\n return GridUtils.findTokensWithProtocolInText(text);\n }\n\n // To check for links, we should check to the first space after the truncatedText length\n var indexOfProceedingWhitespace = text.slice(visibleLength - 1, LINK_TRUNCATION_LENGTH).search(/\\s/); // index or -1 if not found\n\n var lengthOfContent = visibleLength + indexOfProceedingWhitespace;\n // If it doesn't exist, set lengthOfContent to the minimum between length of the original text and 5000\n if (indexOfProceedingWhitespace === -1) {\n lengthOfContent = Math.min(LINK_TRUNCATION_LENGTH, text.length);\n }\n var contentToCheckForLinks = text.substring(0, lengthOfContent);\n return GridUtils.findTokensWithProtocolInText(contentToCheckForLinks);\n }, {\n max: 10000\n }));\n }\n /** Count of rows in the grid */\n /** Count of columns in the grid */\n /** Count of rows that are frozen (or 'floating') at the top */\n get floatingTopRowCount() {\n return 0;\n }\n\n /** Count of rows that are frozen at the bottom */\n get floatingBottomRowCount() {\n return 0;\n }\n\n /** Count of columns that are frozen (or 'floating') at the left */\n get floatingLeftColumnCount() {\n return 0;\n }\n\n /** Count of columns that are frozen (or 'floating') at the right */\n get floatingRightColumnCount() {\n return 0;\n }\n\n /**\n * How many columns header levels are in the grid\n * Used for column grouping where columns at depth 0 are the base columns\n *\n * A grid with 1-level grouping would have a columnHeaderDepth of 2\n * and column headers at depths 0 and 1\n */\n get columnHeaderMaxDepth() {\n return 1;\n }\n\n /**\n * Get the text for the specified cell\n * @param column Column to get the text for\n * @param row Row to get the text for\n * @returns Text for the specified cell\n */\n\n /**\n * Get the character to replace text when truncated for a specific cell.\n * Leave undefined to show text truncated with ellipsis\n * @param column Column to get the truncation character for\n * @param row Row to get the truncation character for\n * @returns Truncation character for the specified cell\n */\n truncationCharForCell(column, row) {\n return undefined;\n }\n\n /**\n * Get the text alignment for the specified cell\n * @param column Column to get the alignment for\n * @param row Row to get the alignment for\n * @returns Text alignment for the specified cell\n */\n textAlignForCell(column, row) {\n return 'left';\n }\n\n /**\n * Get the color for the text in the specified cell\n * @param column Column to get the color for\n * @param row Row to get the color for\n * @param theme Theme applied to the grid\n * @returns Color for the text in the cell\n */\n colorForCell(column, row, theme) {\n return theme.textColor;\n }\n\n /**\n * Get the background color for the cell\n * @param column Column to get the background color for\n * @param row Row to get the background color for\n * @param theme Theme applied to the grid\n * @returns Background color for the cell\n */\n backgroundColorForCell(column, row, theme) {\n return null;\n }\n\n /**\n * Text for the column header\n * @param column Column to get the header for\n * @param depth Depth to get the header text for. 0 is base columns\n * @returns Text to put in the column header\n */\n\n /** Color for column header\n * @param column Column to get the color for\n * @param depth Header depth to get the color for\n * @returns Color for the header at the depth or null\n */\n colorForColumnHeader(column) {\n var depth = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n return null;\n }\n\n /**\n * Text for the row header\n * @param row Row to get the header for\n * @returns Text to put in the row header\n */\n textForRowHeader(row) {\n return '';\n }\n\n /**\n * Text for the row footer\n * @param row Row to get the footer for\n * @returns Text to put in the row footer\n */\n textForRowFooter(row) {\n return '';\n }\n\n /**\n * @param column Column to check\n * @returns True if the column is movable\n */\n isColumnMovable(column) {\n var depth = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n return true;\n }\n\n /**\n * @param row Row to check\n * @returns True if the row is movable\n */\n isRowMovable(row) {\n return true;\n }\n getColumnHeaderGroup(modelIndex, depth) {\n return undefined;\n }\n getColumnHeaderParentGroup(modelIndex, depth) {\n return undefined;\n }\n\n /**\n * Gets the tokens in the cell at column and row, based on the visible text\n * @param column The model column\n * @param row The model row\n * @param visibleLength The length of the visible text\n * @returns An array of Tokens in the cell\n */\n tokensForCell(column, row) {\n var visibleLength = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : LINK_TRUNCATION_LENGTH;\n var text = this.textForCell(column, row);\n return this.getCachedTokensInText(text, visibleLength);\n }\n renderTypeForCell(column, row) {\n return 'text';\n }\n}\nexport default GridModel;\n//# sourceMappingURL=GridModel.js.map","function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }\nfunction _toPropertyKey(t) { var i = _toPrimitive(t, \"string\"); return \"symbol\" == typeof i ? i : i + \"\"; }\nfunction _toPrimitive(t, r) { if (\"object\" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || \"default\"); if (\"object\" != typeof i) return i; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (\"string\" === r ? String : Number)(t); }\n/* eslint-disable class-methods-use-this */\n\nimport { GridModel } from '@deephaven/grid';\nvar EMPTY_ARRAY = [];\nvar EMPTY_SET = new Set();\n\n/**\n * Abstract class that extends the GridModel to have more functionality, like filtering and sorting.\n * For use from IrisGrid.\n * Provides some abstraction from the dh.Table and dh.TreeTable classes, so we can treat them somewhat the same.\n * Note that it still uses dh.Column, dh.FilterCondition, dh.Sort, etc., still. Theoretically should abstract\n * those out as well, so there's no dependency on IrisAPI at all, but it's a lot of work for no real gain at this time.\n */\nclass IrisGridModel extends GridModel {\n constructor(dh) {\n super();\n _defineProperty(this, \"dh\", void 0);\n _defineProperty(this, \"listenerCount\", void 0);\n this.dh = dh;\n this.listenerCount = 0;\n }\n // Pulled directly from event-target-shim implementation signature\n // https://github.com/mysticatea/event-target-shim/blob/master/src/lib/event-target.ts#L99\n // Using Parameters<GridModel['addEventListener']> doesn't work\n addEventListener(type0, callback0, options0) {\n super.addEventListener(type0, callback0, options0);\n this.listenerCount += 1;\n if (this.listenerCount === 1) {\n this.startListening();\n }\n }\n removeEventListener(type0, callback0, options0) {\n super.removeEventListener(type0, callback0, options0);\n this.listenerCount -= 1;\n if (this.listenerCount === 0) {\n this.stopListening();\n }\n }\n\n /**\n * Function called when first listener is added.\n * Override for implementation specific behaviour.\n */\n startListening() {\n // no-op\n }\n\n /**\n * Function called when last listener is removed.\n * Override for implementation specific behaviour.\n */\n stopListening() {\n // no-op\n }\n\n /**\n * Gets the columns for this model\n * @returns All columns in the model\n */\n\n /**\n * Retrieve the aggregated columns for this model\n * @returns The columns that are aggregated\n */\n get aggregatedColumns() {\n return EMPTY_ARRAY;\n }\n\n /**\n * Retrieve the grouped columns for this model\n * @returns The columns that are grouped\n */\n get groupedColumns() {\n return EMPTY_ARRAY;\n }\n\n /**\n * Gets the columns for the model before any transformations (such as rollups) are applied.\n * @returns All original columns in the model.\n */\n get originalColumns() {\n return this.columns;\n }\n\n /**\n * Gets the column index for this model\n * @param name The model column name.\n * @returns The numeric index of the requested column.\n */\n\n /**\n * Retrieve the source cell for a given cell. Returns something different if the cell is a proxied cell\n * that retrieves data from another cell.\n * @param column Column to get the source for\n * @param row Row to get the source for\n * @returns Source cell where the data is coming from\n */\n sourceForCell(column, row) {\n return {\n column,\n row\n };\n }\n\n /**\n * Retrieve the range of columns to clear filters on for a given column.\n * @param column Column to get the range of filters to clear.\n * @returns Axis range of the column filters to clear, or `null` if this should not have a clear filter option.\n */\n getClearFilterRange(column) {\n if (this.isFilterable(column)) {\n return [column, column];\n }\n return null;\n }\n\n /** List of column movements defined by the model. Used as initial movements for IrisGrid */\n get initialMovedColumns() {\n return EMPTY_ARRAY;\n }\n\n /** List of row movements defined by the model. Used as initial movements for IrisGrid */\n get initialMovedRows() {\n return EMPTY_ARRAY;\n }\n\n /** List of column header groups defined by the model */\n get initialColumnHeaderGroups() {\n return EMPTY_ARRAY;\n }\n\n /**\n * @param column The model column index\n * @param row The model row index\n * @returns The format stored for that cell\n */\n\n /**\n * @param column The model column index\n * @param row The model row index\n * @returns The value stored for that cell\n */\n\n /**\n * @returns The filters set on this model\n */\n\n /**\n * @param filter The filters to set\n */\n\n /**\n * @returns The formatter used when formatting data\n */\n\n /**\n * @param formatter The formatter to set\n */\n\n /**\n * @returns The column alignment map\n */\n\n /**\n * @param columnAlignmentMap The column alignment map to set\n */\n\n /**\n * @param value The value to format\n * @param columnType The column type to format\n * @param columnName The column name to format\n */\n\n /**\n * @returns The sorts used on this model\n */\n\n /**\n * @param sort The sorts to use on this model\n */\n\n /**\n /**\n * @returns The custom columns on this model\n */\n\n /**\n * @param customColumns The custom columns to use\n */\n\n /**\n * @returns The format columns on this model\n */\n\n /**\n * @param formatColumns The format columns to use\n */\n\n /**\n * @param columns The columns to treat as frozen\n */\n\n /**\n * @returns The config to use for rolling up this table\n */\n\n /**\n * @returns The config to use for the totals table of this model\n */\n\n /**\n * @returns The LayoutHints to use for the columns of this table model\n */\n get layoutHints() {\n return null;\n }\n\n /**\n * @returns Names of columns which should be locked to the front, but not floating\n */\n get frontColumns() {\n return EMPTY_ARRAY;\n }\n\n /**\n * @returns Names of columns which should be locked to the back, but not floating\n */\n get backColumns() {\n return EMPTY_ARRAY;\n }\n\n /**\n * @returns Names of key columns\n */\n get keyColumnSet() {\n return EMPTY_SET;\n }\n\n /**\n * @returns Names of value columns\n */\n get valueColumnSet() {\n return EMPTY_SET;\n }\n\n /**\n * @returns Names of columns which should be frozen to the front and floating\n */\n get frozenColumns() {\n return EMPTY_ARRAY;\n }\n\n /**\n * @param index The column index to check\n * @returns Whether the column is one of LayoutHints' frozen columns\n */\n isColumnFrozen(index) {\n return false;\n }\n\n /**\n * @param index The column index to check\n * @returns Whether the column is sortable\n */\n isColumnSortable(index) {\n return false;\n }\n\n /**\n * @deprecated Replaced with isPartitionRequired()\n * @returns True if this model requires a filter to be set\n */\n get isFilterRequired() {\n return false;\n }\n get isReversible() {\n return true;\n }\n\n /**\n * @returns Returns a raw table that is frozen and can be used for exporting data\n */\n\n /**\n * @returns True if this model supports the columnStatistics(column) function\n */\n get isColumnStatisticsAvailable() {\n return false;\n }\n\n /**\n * The description for this model.\n * @returns The description of the model\n */\n get description() {\n return '';\n }\n\n /**\n * @param column The column to get statistics for\n * @returns The column statistics\n */\n\n /**\n * @returns True if this model supports aggregatedColumns\n */\n get isAggregatedColumnsAvailable() {\n return false;\n }\n\n /**\n * @returns True if this model supports customColumns\n */\n get isCustomColumnsAvailable() {\n return false;\n }\n\n /**\n * @returns True if this model supports customColumns\n */\n get isFormatColumnsAvailable() {\n return false;\n }\n\n /**\n * @returns True if this model supports the export() function\n */\n get isExportAvailable() {\n return false;\n }\n\n /**\n * @returns True if this model supports the valuesTable(column) function\n */\n get isValuesTableAvailable() {\n return false;\n }\n\n /**\n * @returns True if this model should allow the chart builder\n */\n get isChartBuilderAvailable() {\n return false;\n }\n\n /**\n * @returns True if this model should allow to organize columns\n */\n get isOrganizeColumnsAvailable() {\n return false;\n }\n\n /**\n * @returns True if the rollup rows functionality is available\n */\n get isRollupAvailable() {\n return false;\n }\n\n /**\n * @returns True if select distinct functionality is available\n */\n get isSelectDistinctAvailable() {\n return false;\n }\n\n /**\n * @returns True if the totals functionality is available\n */\n get isTotalsAvailable() {\n return false;\n }\n\n /**\n * The names of columns with select distinct enabled\n * @returns An array of column names\n */\n\n /**\n * Set the columns with select distinct enabled\n * @param names The array of column names to enable select distinct on\n */\n\n /**\n * The pending data for this model\n * @returns A map of row index to a map of column name/value pairs\n */\n\n /**\n * Set the pending data for this model\n * @param A map of row index to a map of column name/value pairs\n */\n\n /**\n * @returns The count of pending rows to show\n */\n\n /**\n * Set the count of pending rows to show\n * @param count The count of pending rows to show\n */\n\n /**\n * Errors for the pending data\n * @returns Map from row number to the error\n */\n\n /**\n * Commit pending data and save all data to the table\n */\n\n /**\n * Check if viewport is still loading data\n */\n get isViewportPending() {\n return false;\n }\n\n /**\n * Check if a column is filterable\n * @param columnIndex The column index to check for filterability\n * @returns True if the current provided column index is filterable, false otherwise\n */\n isFilterable(columnIndex) {\n return false;\n }\n\n /**\n * Set the indices of the viewport\n * @param top Top of viewport\n * @param bottom Bottom of viewport\n * @param columns The columns in the viewport. `undefined` for all columns\n */\n\n /**\n * Takes a snapshot of the provided ranges\n * @param ranges The model ranges to take the snapshot of\n * @returns Returns the data in a row/column matrix\n */\n\n /**\n * @param ranges The ranges to take a snapshot of\n * @param includeHeaders Whether to include the headers in the snapshot or not\n * @param formatValue A function to format a value for a cell. Defaults to model format value.\n * @returns A text formatted snapshot of the data for the specified range set\n */\n\n /**\n * @param column The columns to get the distinct values for\n * @returns A table partitioned on the specified columns in the order given in\n */\n\n /**\n * Close this model. It can no longer be used after being closed\n */\n close() {\n // no-op\n }\n\n /**\n * Don't allow any rows to be movable in any IrisGrids by default. Just columns.\n */\n isRowMovable() {\n return false;\n }\n get isSeekRowAvailable() {\n return false;\n }\n dataBarOptionsForCell(column, row, theme) {\n throw new Error('Method not implemented.');\n }\n tooltipForCell(column, row) {\n return null;\n }\n}\n_defineProperty(IrisGridModel, \"EVENT\", Object.freeze({\n UPDATED: 'UPDATED',\n FORMATTER_UPDATED: 'FORMATTER_UPDATED',\n REQUEST_FAILED: 'REQUEST_FAILED',\n COLUMNS_CHANGED: 'COLUMNS_CHANGED',\n TABLE_CHANGED: 'TABLE_CHANGED',\n FILTERS_CHANGED: 'FILTERS_CHANGED',\n SORTS_CHANGED: 'SORTS_CHANGED',\n DISCONNECT: 'DISCONNECT',\n RECONNECT: 'RECONNECT',\n TOTALS_UPDATED: 'TOTALS_UPDATED',\n /** Fired when the viewport is applied to the table and we're waiting for a response. */\n PENDING_DATA_UPDATED: 'PENDING_DATA_UPDATED',\n VIEWPORT_UPDATED: 'VIEWPORT_UPDATED'\n}));\nexport default IrisGridModel;\n//# sourceMappingURL=IrisGridModel.js.map"],"file":"assets/IrisGridModel-DSlx1u3X.js"}
1
+ {"version":3,"mappings":";uTAOG,IAACA,GAA8BC,GAAM,WAAW,CAACC,EAAOC,IAAQ,CACjE,GAAI,CACF,SAAAC,EACA,UAAAC,EACA,SAAAC,EAAW,GACX,GAAAC,EACA,SAAAC,EAAW,GACX,eAAAC,EAAiB,GACjB,UAAAC,EAAY,GACZ,QAAAC,EACA,aAAAC,EACA,aAAAC,EACA,MAAAC,EACA,cAAeC,CACnB,EAAMb,EAOA,CACF,iBAAAc,CACJ,EAAMC,GAAa,GAAI,QAAQ,EAC7B,OAAoBC,OAAM,SAAU,CAClC,IAAKf,EACL,KAAM,SACN,UAAWgB,GAAW,eAAgB,CACpC,sBAAuBX,IAAa,QAAaA,GAAYC,CACnE,EAAO,CACD,6BAA8BA,CACpC,EAAO,CACD,aAAcC,CACpB,EAAOL,EAAWW,CAAgB,EAC9B,GAAIT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,CAMA,IAAI,aAAc,CAChB,MAAO,EACT,CAUA,IAAI,8BAA+B,CACjC,MAAO,EACT,CAKA,IAAI,0BAA2B,CAC7B,MAAO,EACT,CAKA,IAAI,0BAA2B,CAC7B,MAAO,EACT,CAKA,IAAI,mBAAoB,CACtB,MAAO,EACT,CAKA,IAAI,wBAAyB,CAC3B,MAAO,EACT,CAKA,IAAI,yBAA0B,CAC5B,MAAO,EACT,CAKA,IAAI,4BAA6B,CAC/B,MAAO,EACT,CAKA,IAAI,mBAAoB,CACtB,MAAO,EACT,CAKA,IAAI,2BAA4B,CAC9B,MAAO,EACT,CAKA,IAAI,mBAAoB,CACtB,MAAO,EACT,CA2CA,IAAI,mBAAoB,CACtB,MAAO,EACT,CAOA,aAAa9I,EAAa,CACxB,MAAO,EACT,CA8BA,OAAQ,CAER,CAKA,cAAe,CACb,MAAO,EACT,CACA,IAAI,oBAAqB,CACvB,MAAO,EACT,CACA,sBAAsB1O,EAAQE,EAAK2F,EAAO,CACxC,MAAM,IAAI,MAAM,yBAAyB,CAC3C,CACA,eAAe7F,EAAQE,EAAK,CAC1B,OAAO,IACT,CACF,CACA/J,GAAgBihB,GAAe,QAAS,OAAO,OAAO,CACpD,QAAS,UACT,kBAAmB,oBACnB,eAAgB,iBAChB,gBAAiB,kBACjB,cAAe,gBACf,gBAAiB,kBACjB,cAAe,gBACf,WAAY,aACZ,UAAW,YACX,eAAgB,iBAEhB,qBAAsB,uBACtB,iBAAkB,kBACpB,CAAC,CAAC","names":["SocketedButton","React","props","ref","children","className","disabled","id","isLinked","isLinkedSource","isInvalid","onClick","onMouseEnter","onMouseLeave","style","dataTestId","UNSAFE_className","useSlotProps","_jsxs","classNames","_jsx","FontAwesomeIcon","vsLink","dhExclamation","ownKeys","e","r","o","_objectSpread","_defineProperty","_toPropertyKey","t","i","_toPrimitive","Chart","lazy","__vitePreload","LazyChart","Suspense","LoadingOverlay","log","Log","BUSINESS_COLUMN_TYPE","MILLIS_PER_HOUR","NANOS_PER_MILLI","isDateWrapper","value","isLongWrapper","isDateTimeColumnFormatter","isRangedPlotlyAxis","isWebGLSupported","canvas","gl","IS_WEBGL_SUPPORTED","ChartUtils","x","xLow","xHigh","array","arrayminus","prefix","formatter","columnType","formatPattern","subpatterns","matchArray","assertNotNull","placeholderDigits","zeroDigits","decimalDigits","optionalDecimalDigits","numberType","percentSign","suffix","paddingLength","isCommaSeparated","comma","plotlyNumberType","type","decimalLength","trimOption","tickformat","tickprefix","ticksuffix","axisFormat","axis","isDateType","gapBetweenMajorTicks","updatedFormat","tickSpacing","chart","series","j","source","name","settings","mode","showLegend","orientation","deephavenShape","figure","axes","charts","_chart","layout","ranges","keys","key","axisProperty","axisIndex","axisIndexString","period","values","decimal","hours","minutes","property","result","item","_result$get","group","colorway","xAxis","title","calendarTimeZone","formatterTimeZone","holidayPeriods","calendarPeriods","calendarRanges","a","b","holidayRanges","closedRanges","c","calendarRange","lastClose","h","holidayRange","dh","bindAllMethods","axisFormats","nullFormat","allAxes","axisTypeMap","_chart2","sources","axisSources","k","_axis","axisType","typeAxes","axisLayoutProperty","businessCalendar","plotStyle","isBusinessTime","allowWebGL","areLinesVisible","areShapesVisible","modes","sourceType","_sources$","seriesVisibility","isLinesVisible","isShapesVisible","lineColor","shapeColor","shape","shapeSize","_source$axis","seriesData","seriesDataParam","_axis2","dataAttributeName","set","axisPosition","layoutParam","chartAxisRangeParser","plotWidth","plotHeight","figureAxes","_chart3","axisRangeParser","bounds","_axisPositionMap$get","cols","rows","column","colspan","row","rowspan","endColumn","endRow","columnSize","rowSize","xMarginSize","yMarginSize","axisPositionMap","rightAxes","dataFormatter","TableUtils","chartAxes","xAxisSize","yAxisSize","axisTypes","figureAxisTypeMap","figureTypeAxes","isYAxis","plotSize","chartAxisIndex","_axis3","figureAxisIndex","layoutAxis","_range","autorange","rangeParser","rangeStart","rangeEnd","figureAxisTypes","layoutAxisParam","_axis$label","axisSize","label","_this$getAxisProperty","_axisPositionMap$get2","positionAxes","sideIndex","leftAxes","left","right","bottomAxes","topAxes","bottom","top","minRange","maxRange","logAxis","periods","timeZoneDiff","numberPeriods","nextPeriod","bound","businessDays","weekLength","businessDaysInt","day","businessDaysSet","closedDays","boundsArray","closedDay","_i","adjustedDay","rangebreaks","businessPeriods","holidays","typeFormatter","calendar","fullHolidays","partialHolidays","holiday","_calendar$businessPer","dateString","dayOfWeek","isBusinessDay","closedPeriods","rangeBreaks","closeStart","closeEnd","dvalue","table","settingsAxis","yAxis","timeZone","text","format","date","tzFormat","estimatedOffset","estimatedDate","offset","theme","error_band_line_color","ohlc_increasing","ohlc_decreasing","title_color","indicator_increasing","indicator_decreasing","indicator_gauge","paper_bgcolor","plot_bgcolor","coastline_color","land_color","ocean_color","lake_color","river_color","map_style","ChartModel","filter","renderOptions","isDownsamplingDisabled","rect","callback","listener","event","data","detail","IrisGrid","LazyIrisGrid","forwardRef","isExpandableGridModel","model","SELECTION_DIRECTION","GridRange","startColumn","startRow","index1","index2","wasModified","range","other","_startColumn","_endColumn","_startRow","_endRow","start1","end1","start2","end2","ranges1","ranges2","otherRange","subtractRange","subtract","subtractRanges","columnCount","rowCount","_range$startColumn","_range$startRow","_range$endColumn","_range$endRow","columnOffset","rowOffset","direction","rangeIndex","nextCell","nextRangeIndex","nextRange","_nextRangeIndex","_nextRange","cellCount","_range$endRow2","_range$startRow2","_range$endColumn2","_range$startColumn2","_range$endRow3","_range$startRow3","_range$endColumn3","_range$startColumn3","_this$nextCell","isAxisRange","isBoundedAxisRange","isLinkToken","token","GridUtils","y","metrics","columnHeaderDepth","allColumnWidths","allRowHeights","allColumnXs","allRowYs","modelColumns","modelRows","modelRow","modelColumn","columnWidth","rowHeight","columnHeaderHeight","columnHeaderMaxDepth","clamp","start","total","end","visibleStart","visibleEnd","floatingStartCount","floatingEndCount","totalCount","visibleStartIndex","visibleEndIndex","itemIndex","itemCoordinates","itemSizes","coordinate","_itemCoordinates$get","_itemSizes$get","itemX","itemSize","itemCount","floatingStart","floatingEnd","items","ignoreFloating","floatingItem","floatingLeftColumnCount","floatingRightColumnCount","visibleColumns","gridX","floatingTopRowCount","floatingBottomRowCount","visibleRows","gridY","startIndex","modelIndexes","visibleItems","userSizes","visibleItemIndex","modelIndex","userColumnWidths","userRowHeights","depth","columnIndex","nextColumnIndex","rowHeaderWidth","floatingColumns","floatingLeftWidth","allowColumnResize","headerSeparatorHandleSize","halfSeparatorSize","isPreviousColumnHidden","_allColumnXs$get","_allColumnWidths$get","columnX","isColumnHidden","midX","minX","maxX","_allColumnXs$get2","_allColumnWidths$get2","_column","_columnX","_columnWidth","_isColumnHidden","_midX","_minX","_maxX","visibleSizes","hiddenItems","allowRowResize","isPreviousRowHidden","_allRowYs$get","_allRowHeights$get","rowY","isRowHidden","midY","minY","maxY","rowIndex","from","to","oldMovedItems","movedItems","lastMovedItem","toParam","isPreMoveTo","newLastMovedItem","reverse","_loop","fromItemOrRange","toItem","length","fromItem","fromStart","fromEnd","toStart","moveDistance","nextResult","_loop2","_result$j$","_result$j$2","currentStart","currentEnd","movedRange","currentResult","_ref2","s","_ref3","_ref","movedColumns","movedRows","columnRanges","rowRanges","visibleIndex","visibleIndexes","uiRange","EMPTY_ARRAY","uiRanges","modelRanges","modelRange","visibleRanges","platform","modifierKey","columns","width","height","floatingRightWidth","floatingTopHeight","floatingBottomHeight","x1","y1","x2","y2","wheelEvent","pageWidth","pageHeight","lineWidth","lineHeight","deltaX","deltaY","range1","range2","mergedRanges","tokenBox","gridWidth","gridHeight","verticalBarWidth","horizontalBarHeight","newLeft","newRight","newTop","newBottom","state","firstColumn","cellHorizontalPadding","treeDepthIndent","treeHorizontalPadding","getOrThrow","textAlign","isFirstColumn","treeIndent","textWidth","textX","textY","tokens","linkifyFind","memoizeClear","fn","options","isClearingCache","memoizedFn","memoizee","LINK_TRUNCATION_LENGTH","GridModel","EventTarget","visibleLength","indexOfProceedingWhitespace","lengthOfContent","contentToCheckForLinks","EMPTY_SET","IrisGridModel","type0","callback0","options0","index"],"ignoreList":[],"sources":["../../../components/dist/SocketedButton.js","../../../chart/dist/LazyChart.js","../../../chart/dist/ChartUtils.js","../../../chart/dist/ChartModel.js","../../../iris-grid/dist/LazyIrisGrid.js","../../../grid/dist/ExpandableGridModel.js","../../../grid/dist/GridRange.js","../../../grid/dist/GridAxisRange.js","../../../grid/dist/GridUtils.js","../../../grid/dist/memoizeClear.js","../../../grid/dist/GridModel.js","../../../iris-grid/dist/IrisGridModel.js"],"sourcesContent":["import React from 'react';\nimport classNames from 'classnames';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { useSlotProps } from '@react-spectrum/utils';\nimport { dhExclamation, vsLink } from '@deephaven/icons';\nimport \"./SocketedButton.css\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nvar SocketedButton = /*#__PURE__*/React.forwardRef((props, ref) => {\n var {\n children,\n className,\n disabled = false,\n id,\n isLinked = false,\n isLinkedSource = false,\n isInvalid = false,\n onClick,\n onMouseEnter,\n onMouseLeave,\n style,\n 'data-testid': dataTestId\n } = props;\n\n // Spectrum container components such as `ButtonGroup` provide\n // UNSAFE_className prop for the `button` slot via a SlotProvider (\n // https://github.com/adobe/react-spectrum/blob/%40adobe/react-spectrum%403.33.1/packages/%40react-spectrum/buttongroup/src/ButtonGroup.tsx#L104-L107)\n // This can be retrieved via `useSlotProps` to allow our buttons to be styled\n // correctly inside the container.\n var {\n UNSAFE_className\n } = useSlotProps({}, 'button');\n return /*#__PURE__*/_jsxs(\"button\", {\n ref: ref,\n type: \"button\",\n className: classNames('btn-socketed', {\n 'btn-socketed-linked': isLinked !== undefined && isLinked || isLinkedSource\n }, {\n 'btn-socketed-linked-source': isLinkedSource\n }, {\n 'is-invalid': isInvalid\n }, className, UNSAFE_className),\n id: id,\n onClick: onClick,\n onMouseEnter: onMouseEnter,\n onMouseLeave: onMouseLeave,\n style: style,\n disabled: disabled,\n \"data-testid\": dataTestId,\n children: [children, /*#__PURE__*/_jsx(FontAwesomeIcon, {\n icon: vsLink,\n className: \"linked btn-socketed-icon\",\n transform: \"down-1\"\n }), /*#__PURE__*/_jsx(FontAwesomeIcon, {\n icon: dhExclamation,\n className: \"is-invalid btn-socketed-icon\"\n })]\n });\n});\nSocketedButton.displayName = 'SocketedButton';\nexport default SocketedButton;\n//# sourceMappingURL=SocketedButton.js.map","function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }\nfunction _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }\nfunction _toPropertyKey(t) { var i = _toPrimitive(t, \"string\"); return \"symbol\" == typeof i ? i : i + \"\"; }\nfunction _toPrimitive(t, r) { if (\"object\" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || \"default\"); if (\"object\" != typeof i) return i; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (\"string\" === r ? String : Number)(t); }\nimport { LoadingOverlay } from '@deephaven/components';\nimport { lazy, Suspense } from 'react';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nvar Chart = /*#__PURE__*/lazy(() => import('./Chart.js'));\nfunction LazyChart(props) {\n return /*#__PURE__*/_jsx(Suspense, {\n fallback: /*#__PURE__*/_jsx(LoadingOverlay, {\n \"data-testid\": \"lazy-chart-loading\"\n }),\n children: /*#__PURE__*/_jsx(Chart, _objectSpread({}, props))\n });\n}\nexport default LazyChart;\n//# sourceMappingURL=LazyChart.js.map","function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }\nfunction _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }\nfunction _toPropertyKey(t) { var i = _toPrimitive(t, \"string\"); return \"symbol\" == typeof i ? i : i + \"\"; }\nfunction _toPrimitive(t, r) { if (\"object\" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || \"default\"); if (\"object\" != typeof i) return i; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (\"string\" === r ? String : Number)(t); }\nimport Log from '@deephaven/log';\nimport { TableUtils } from '@deephaven/jsapi-utils';\nimport { set } from 'lodash';\nimport { assertNotNull, bindAllMethods } from '@deephaven/utils';\nvar log = Log.module('ChartUtils');\nvar BUSINESS_COLUMN_TYPE = 'io.deephaven.time.DateTime';\nvar MILLIS_PER_HOUR = 3600000;\nvar NANOS_PER_MILLI = 1000000;\nfunction isDateWrapper(value) {\n return value.asDate !== undefined;\n}\nfunction isLongWrapper(value) {\n return value.asNumber !== undefined;\n}\nfunction isDateTimeColumnFormatter(value) {\n return value.dhTimeZone !== undefined;\n}\nfunction isRangedPlotlyAxis(value) {\n return value != null && value.range != null && (value.autorange === false || value.autorange === undefined);\n}\n\n/**\n * Check if WebGL is supported in the current environment.\n * Most modern browsers do support WebGL, but it's possible to disable it and it is also not available\n * in some headless environments, which can affect e2e tests.\n *\n * https://github.com/microsoft/playwright/issues/13146\n * https://bugzilla.mozilla.org/show_bug.cgi?id=1375585\n *\n * @returns True if Web GL is supported, false otherwise\n */\nexport function isWebGLSupported() {\n try {\n // https://developer.mozilla.org/en-US/docs/Web/API/WebGL_API/By_example/Detect_WebGL\n var canvas = document.createElement('canvas');\n var gl = canvas.getContext('webgl') || canvas.getContext('experimental-webgl');\n return gl != null && gl instanceof WebGLRenderingContext;\n } catch (e) {\n return false;\n }\n}\nvar IS_WEBGL_SUPPORTED = isWebGLSupported();\nclass ChartUtils {\n /**\n * Generate the plotly error bar data from the passed in data.\n * Iris passes in the values as absolute, plotly needs them as relative.\n * @param x The main data array\n * @param xLow The absolute low values\n * @param xHigh\n *\n * @returns The error_x object required by plotly, or null if none is required\n */\n static getPlotlyErrorBars(x, xLow, xHigh) {\n var array = xHigh.map((value, i) => value - x[i]);\n var arrayminus = xLow.map((value, i) => x[i] - value);\n return {\n type: 'data',\n symmetric: false,\n array,\n arrayminus\n };\n }\n static convertNumberPrefix(prefix) {\n return prefix.replace(/\\u00A4\\u00A4/g, 'USD').replace(/\\u00A4/g, '$');\n }\n static getPlotlyNumberFormat(formatter, columnType, formatPattern) {\n if (formatPattern == null || formatPattern === '') {\n return null;\n }\n\n // We translate java formatting: https://docs.oracle.com/javase/7/docs/api/java/text/DecimalFormat.html\n // Into d3 number formatting: https://github.com/d3/d3-format\n // We can't translate number formatting exactly, but should be able to translate the most common cases\n // First split it into the subpatterns; currently only handling the positive subpattern, ignoring the rest\n var subpatterns = formatPattern.split(';');\n var matchArray = subpatterns[0].match(/^([^#,0.]*)([#,]*)([0,]*)(\\.?)(0*)(#*)(E?0*)(%?)(.*)/);\n assertNotNull(matchArray);\n var [, prefix, placeholderDigits, zeroDigits,, decimalDigits, optionalDecimalDigits, numberType, percentSign, suffix] = matchArray;\n var paddingLength = zeroDigits.replace(',', '').length;\n var isCommaSeparated = placeholderDigits.indexOf(',') >= 0 || zeroDigits.indexOf(',') >= 0;\n var comma = isCommaSeparated ? ',' : '';\n var plotlyNumberType = numberType != null && numberType !== '' ? 'e' : 'f';\n var type = percentSign !== '' ? percentSign : plotlyNumberType;\n var decimalLength = decimalDigits.length + optionalDecimalDigits.length;\n // IDS-4565 Plotly uses an older version of d3 which doesn't support the trim option or negative brackets\n // If plotly updates it's d3 version, this should be re-enabled\n // const trimOption = optionalDecimalDigits.length > 0 ? '~' : '';\n var trimOption = '';\n var tickformat = \"0\".concat(paddingLength).concat(comma, \".\").concat(decimalLength).concat(trimOption).concat(type);\n var tickprefix = ChartUtils.convertNumberPrefix(prefix);\n // prefix and suffix are processed the same\n var ticksuffix = ChartUtils.convertNumberPrefix(suffix);\n return {\n tickformat,\n tickprefix,\n ticksuffix,\n automargin: true\n };\n }\n\n /**\n * Adds tick spacing for an axis that has gapBetweenMajorTicks defined.\n *\n * @param axisFormat the current axis format, may be null\n * @param axis the current axis\n * @param isDateType indicates if the columns is a date type\n */\n static addTickSpacing(axisFormat, axis, isDateType) {\n var {\n gapBetweenMajorTicks\n } = axis;\n if (gapBetweenMajorTicks != null && gapBetweenMajorTicks > 0) {\n var updatedFormat = axisFormat || {};\n var tickSpacing = gapBetweenMajorTicks;\n if (isDateType) {\n // Need to convert from nanoseconds to milliseconds\n tickSpacing = gapBetweenMajorTicks / NANOS_PER_MILLI;\n }\n if (axis.log) {\n tickSpacing = Math.log(tickSpacing);\n }\n // Note that tickmode defaults to 'auto'\n updatedFormat.tickmode = 'linear';\n updatedFormat.dtick = tickSpacing;\n return updatedFormat;\n }\n return axisFormat;\n }\n\n /**\n * Retrieve the data source for a given axis in a chart\n * @param chart The chart to get the source for\n * @param axis The axis to find the source for\n * @returns The first source matching this axis\n */\n static getSourceForAxis(chart, axis) {\n for (var i = 0; i < chart.series.length; i += 1) {\n var series = chart.series[i];\n for (var j = 0; j < series.sources.length; j += 1) {\n var source = series.sources[j];\n if (source.axis === axis) {\n return source;\n }\n }\n }\n return null;\n }\n\n /**\n * Get visibility setting for the series object\n * @param name The series name to get the visibility for\n * @param settings Chart settings\n * @returns True for visible series and 'legendonly' for hidden\n */\n static getSeriesVisibility(name, settings) {\n if (settings != null && settings.hiddenSeries != null && settings.hiddenSeries.includes(name)) {\n return 'legendonly';\n }\n return true;\n }\n\n /**\n * Get hidden labels array from chart settings\n * @param settings Chart settings\n * @returns Array of hidden series names\n */\n static getHiddenLabels(settings) {\n if (settings !== null && settings !== void 0 && settings.hiddenSeries) {\n return [...settings.hiddenSeries];\n }\n return [];\n }\n\n /**\n * Create a default series data object. Apply styling to the object afterward.\n * @returns A simple series data object with no styling\n */\n static makeSeriesData(type, mode, name, showLegend) {\n var orientation = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : ChartUtils.ORIENTATION.VERTICAL;\n return {\n type,\n mode,\n name,\n orientation,\n showlegend: showLegend !== null && showLegend !== void 0 ? showLegend : undefined\n };\n }\n\n /**\n * Get the Plotly marker symbol for the provided Deephaven shape\n * Deephaven shapes: https://deephaven.io/enterprise/docs/plotting/visual-formatting/#point-formatting\n * Plotly shapes: https://plotly.com/javascript/reference/scattergl/#scattergl-marker-symbol\n * Table of plotly shapes: https://plotly.com/python/marker-style/#custom-marker-symbols\n * @param deephavenShape Deephaven shape to get the marker symbol for\n */\n static getMarkerSymbol(deephavenShape) {\n switch (deephavenShape) {\n case 'SQUARE':\n return 'square';\n case 'CIRCLE':\n return 'circle';\n case 'DIAMOND':\n return 'diamond';\n case 'UP_TRIANGLE':\n return 'triangle-up';\n case 'DOWN_TRIANGLE':\n return 'triangle-down';\n case 'RIGHT_TRIANGLE':\n return 'triangle-right';\n case 'LEFT_TRIANGLE':\n return 'triangle-left';\n // There don't seem to be any plotly equivalents for ellipse or rectangles\n // Rectangles could be `line-ew`, `line-ns`, or `hourglass` and `bowtie` instead?\n // Ellipse could be `asterisk` or `diamond-wide` instead?\n // Just throw an error, we've already got a bunch of types.\n case 'ELLIPSE':\n case 'HORIZONTAL_RECTANGLE':\n case 'VERTICAL_RECTANGLE':\n default:\n throw new Error(\"Unrecognized shape \".concat(deephavenShape));\n }\n }\n\n /**\n * Get all axes for a given `Figure`. Iterates through all charts axes and concatenates them.\n * @param figure Figure to get all axes for\n */\n static getAllAxes(figure) {\n return figure.charts.reduce((axes, chart) => [...axes, ...chart.axes], []);\n }\n\n /**\n * Get the axis type map for the figure provided\n * @param figure Figure to get the type map for\n * @returns Axis type map for the figure provided\n */\n static getAxisTypeMap(figure) {\n var axes = ChartUtils.getAllAxes(figure);\n return ChartUtils.groupArray(axes, 'type');\n }\n\n /**\n * Retrieve the chart that contains the passed in series from the figure\n * @param figure The figure to retrieve the chart from\n * @param series The series to get the chart for\n */\n static getChartForSeries(figure, series) {\n var {\n charts\n } = figure;\n for (var i = 0; i < charts.length; i += 1) {\n var _chart = charts[i];\n for (var j = 0; j < _chart.series.length; j += 1) {\n if (series === _chart.series[j]) {\n return _chart;\n }\n }\n }\n return null;\n }\n\n /**\n * Get an object mapping axis to their ranges\n * @param layout The plotly layout object to get the ranges from\n * @returns An object mapping the axis name to it's range\n */\n static getLayoutRanges(layout) {\n var ranges = {};\n var keys = Object.keys(layout).filter(key => key.indexOf('axis') >= 0);\n for (var i = 0; i < keys.length; i += 1) {\n var key = keys[i];\n var value = layout[key];\n if (isRangedPlotlyAxis(value)) {\n // Only want to add the range if it's not autoranged\n ranges[key] = [...value.range];\n }\n }\n return ranges;\n }\n static getAxisLayoutProperty(axisProperty, axisIndex) {\n var axisIndexString = axisIndex > 0 ? \"\".concat(axisIndex + 1) : '';\n return \"\".concat(axisProperty !== null && axisProperty !== void 0 ? axisProperty : '', \"axis\").concat(axisIndexString);\n }\n\n /**\n * Converts an open or close period to a declimal. e.g '09:30\" to 9.5\n *\n * @param period the open or close value of the period\n */\n static periodToDecimal(period) {\n var values = period.split(':');\n return Number(values[0]) + Number(values[1]) / 60;\n }\n\n /**\n * Converts a decimal to a period. e.g 9.5 to '09:30'\n *\n * @param decimal the decimal value to\n */\n static decimalToPeriod(decimal) {\n var hours = Math.floor(decimal);\n var minutes = Math.round((decimal - hours) * 60);\n return \"\".concat(hours.toString().padStart(2, '0'), \":\").concat(minutes.toString().padStart(2, '0'));\n }\n\n /**\n * Groups an array and returns a map\n * @param array The object to group\n * @param property The property name to group by\n * @returns A map containing the items grouped by their values for the property\n */\n static groupArray(array, property) {\n return array.reduce((result, item) => {\n var _result$get;\n var key = item[property];\n var group = (_result$get = result.get(key)) !== null && _result$get !== void 0 ? _result$get : [];\n group.push(item);\n result.set(key, group);\n return result;\n }, new Map());\n }\n\n /**\n * Parses the colorway value of a theme and returns an array of colors\n * Value could be a single string with space separated colors or already be an\n * array of strings representing the colorway\n * @param colorway The colorway value to normalize\n * @returns Colorway array for the theme or undefined\n */\n static normalizeColorway(colorway) {\n if (colorway == null) {\n return;\n }\n if (Array.isArray(colorway)) {\n return colorway;\n }\n if (typeof colorway === 'string') {\n return colorway.split(' ');\n }\n log.warn(\"Unexpected colorway format: \".concat(colorway));\n }\n static titleFromSettings(settings) {\n var {\n series,\n xAxis,\n title = \"\".concat((series !== null && series !== void 0 ? series : []).join(', '), \" by \").concat(xAxis)\n } = settings;\n return title;\n }\n static getTimeZoneDiff(calendarTimeZone, formatterTimeZone) {\n return formatterTimeZone ? (calendarTimeZone.standardOffset - formatterTimeZone.standardOffset) / 60 : 0;\n }\n\n /**\n * Creates closed periods for a partial holiday.\n *\n * @param holidayPeriods the business periods for the holiday\n * @param calendarPeriods the business periods for the calendar\n * @returns an array of closed ranges for the partial holiday. Should be the ranges during the regular business hours that are _not_ specified by the holiday periods.\n */\n static createClosedRangesForPartialHoliday(holidayPeriods, calendarPeriods) {\n // First restrict the periods to only those that are actual business periods.\n var calendarRanges = calendarPeriods.map(period => [ChartUtils.periodToDecimal(period.open), ChartUtils.periodToDecimal(period.close)]);\n calendarRanges.sort((a, b) => a[0] - b[0]);\n if (calendarRanges.length === 0) {\n calendarRanges.push([0, 24]);\n }\n var holidayRanges = holidayPeriods.map(period => [ChartUtils.periodToDecimal(period.open), ChartUtils.periodToDecimal(period.close)]);\n holidayRanges.sort((a, b) => a[0] - b[0]);\n var closedRanges = [];\n\n // Separate index cursor for the holiday ranges\n for (var c = 0; c < calendarRanges.length; c += 1) {\n var calendarRange = calendarRanges[c];\n var lastClose = calendarRange[0];\n for (var h = 0; h < holidayRanges.length; h += 1) {\n var holidayRange = holidayRanges[h];\n if (holidayRange[1] > lastClose && holidayRange[0] < calendarRange[1]) {\n if (holidayRange[0] > lastClose) {\n closedRanges.push([lastClose, holidayRange[0]]);\n }\n // eslint-disable-next-line prefer-destructuring\n lastClose = holidayRange[1];\n }\n }\n if (lastClose < calendarRange[1]) {\n closedRanges.push([lastClose, calendarRange[1]]);\n }\n }\n return closedRanges;\n }\n constructor(dh) {\n _defineProperty(this, \"dh\", void 0);\n _defineProperty(this, \"daysOfWeek\", void 0);\n this.dh = dh;\n this.daysOfWeek = Object.freeze(dh.calendar.DayOfWeek.values());\n bindAllMethods(this);\n }\n\n /**\n * Retrieve the axis formats from the provided figure.\n * Currently defaults to just the x/y axes.\n * @param figure The figure to get the axis formats for\n * @param formatter The formatter to use when getting the axis format\n * @returns A map of axis layout property names to axis formats\n */\n getAxisFormats(figure, formatter) {\n var axisFormats = new Map();\n var nullFormat = {\n tickformat: null,\n ticksuffix: null\n };\n var allAxes = ChartUtils.getAllAxes(figure);\n var axisTypeMap = ChartUtils.groupArray(allAxes, 'type');\n var {\n charts\n } = figure;\n for (var i = 0; i < charts.length; i += 1) {\n var _chart2 = charts[i];\n for (var j = 0; j < _chart2.series.length; j += 1) {\n var series = _chart2.series[j];\n var {\n sources\n } = series;\n var axisSources = sources.filter(source => source.axis);\n for (var k = 0; k < axisSources.length; k += 1) {\n var source = axisSources[k];\n var {\n axis: _axis\n } = source;\n var {\n type: axisType\n } = _axis;\n var typeAxes = axisTypeMap.get(axisType);\n assertNotNull(typeAxes);\n var axisIndex = typeAxes.indexOf(_axis);\n var axisProperty = this.getAxisPropertyName(axisType);\n if (axisProperty != null) {\n var axisLayoutProperty = ChartUtils.getAxisLayoutProperty(axisProperty, axisIndex);\n if (axisFormats.has(axisLayoutProperty)) {\n log.debug(\"\".concat(axisLayoutProperty, \" already added.\"));\n } else {\n log.debug(\"Adding \".concat(axisLayoutProperty, \" to axisFormats.\"));\n var axisFormat = this.getPlotlyAxisFormat(source, formatter);\n if (axisFormat === null) {\n axisFormats.set(axisLayoutProperty, nullFormat);\n } else {\n axisFormats.set(axisLayoutProperty, axisFormat);\n var {\n businessCalendar\n } = _axis;\n if (businessCalendar != null) {\n axisFormat.rangebreaks = this.createRangeBreaksFromBusinessCalendar(businessCalendar, formatter);\n }\n if (axisFormats.size === _chart2.axes.length) {\n return axisFormats;\n }\n }\n }\n }\n }\n }\n }\n return axisFormats;\n }\n\n /**\n * Converts the Iris plot style into a plotly chart type\n * @param plotStyle The plotStyle to use, see dh.plot.SeriesPlotStyle\n * @param isBusinessTime If the plot is using business time for an axis\n * @param allowWebGL If WebGL is allowedd\n */\n getPlotlyChartType(plotStyle, isBusinessTime) {\n var allowWebGL = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;\n var {\n dh\n } = this;\n switch (plotStyle) {\n case dh.plot.SeriesPlotStyle.SCATTER:\n case dh.plot.SeriesPlotStyle.LINE:\n // scattergl mode is more performant (usually), but doesn't support the rangebreaks we need for businessTime calendars\n // In some cases, WebGL is less performant (like in virtual desktop environments), so we also allow the option of the user explicitly disabling it even if it's supported\n return !isBusinessTime && IS_WEBGL_SUPPORTED && allowWebGL ? 'scattergl' : 'scatter';\n case dh.plot.SeriesPlotStyle.BAR:\n case dh.plot.SeriesPlotStyle.STACKED_BAR:\n return 'bar';\n case dh.plot.SeriesPlotStyle.PIE:\n return 'pie';\n case dh.plot.SeriesPlotStyle.TREEMAP:\n return 'treemap';\n case dh.plot.SeriesPlotStyle.HISTOGRAM:\n return 'histogram';\n case dh.plot.SeriesPlotStyle.OHLC:\n return 'ohlc';\n default:\n return undefined;\n }\n }\n\n /**\n * Converts the Iris plot style into a plotly chart mode\n * @param plotStyle The plotStyle to use, see dh.plot.SeriesPlotStyle.*\n * @param areLinesVisible Whether lines are visible or not\n * @param areShapesVisible Whether shapes are visible or not\n */\n getPlotlyChartMode(plotStyle, areLinesVisible, areShapesVisible) {\n var {\n dh\n } = this;\n var modes = new Set();\n switch (plotStyle) {\n case dh.plot.SeriesPlotStyle.SCATTER:\n // Default to only showing shapes in scatter plots\n if (areLinesVisible !== null && areLinesVisible !== void 0 ? areLinesVisible : false) {\n modes.add(ChartUtils.MODE_LINES);\n }\n if (areShapesVisible !== null && areShapesVisible !== void 0 ? areShapesVisible : true) {\n modes.add(ChartUtils.MODE_MARKERS);\n }\n break;\n case dh.plot.SeriesPlotStyle.LINE:\n // Default to only showing lines in line series\n if (areLinesVisible !== null && areLinesVisible !== void 0 ? areLinesVisible : true) {\n modes.add(ChartUtils.MODE_LINES);\n }\n if (areShapesVisible !== null && areShapesVisible !== void 0 ? areShapesVisible : false) {\n modes.add(ChartUtils.MODE_MARKERS);\n }\n break;\n default:\n break;\n }\n return modes.size > 0 ? [...modes].join('+') : undefined;\n }\n\n /**\n * Get the property to set on the series data for plotly\n * @param plotStyle The plot style of the series\n * @param sourceType The source type for the series\n */\n getPlotlyProperty(plotStyle, sourceType) {\n var {\n dh\n } = this;\n switch (plotStyle) {\n case dh.plot.SeriesPlotStyle.PIE:\n switch (sourceType) {\n case dh.plot.SourceType.X:\n return 'labels';\n case dh.plot.SourceType.Y:\n return 'values';\n default:\n break;\n }\n break;\n case dh.plot.SeriesPlotStyle.OHLC:\n switch (sourceType) {\n case dh.plot.SourceType.TIME:\n return 'x';\n default:\n break;\n }\n break;\n case dh.plot.SeriesPlotStyle.TREEMAP:\n switch (sourceType) {\n case dh.plot.SourceType.X:\n return 'ids';\n case dh.plot.SourceType.Y:\n return 'values';\n case dh.plot.SourceType.LABEL:\n return 'labels';\n case dh.plot.SourceType.PARENT:\n return 'parents';\n case dh.plot.SourceType.COLOR:\n return 'marker.colors';\n default:\n break;\n }\n break;\n default:\n break;\n }\n switch (sourceType) {\n case dh.plot.SourceType.X:\n return 'x';\n case dh.plot.SourceType.Y:\n return 'y';\n case dh.plot.SourceType.Z:\n return 'z';\n case dh.plot.SourceType.X_LOW:\n return 'xLow';\n case dh.plot.SourceType.X_HIGH:\n return 'xHigh';\n case dh.plot.SourceType.Y_LOW:\n return 'yLow';\n case dh.plot.SourceType.Y_HIGH:\n return 'yHigh';\n case dh.plot.SourceType.TIME:\n return 'time';\n case dh.plot.SourceType.OPEN:\n return 'open';\n case dh.plot.SourceType.HIGH:\n return 'high';\n case dh.plot.SourceType.LOW:\n return 'low';\n case dh.plot.SourceType.CLOSE:\n return 'close';\n case dh.plot.SourceType.SHAPE:\n return 'shape';\n case dh.plot.SourceType.SIZE:\n return 'size';\n case dh.plot.SourceType.LABEL:\n return 'label';\n case dh.plot.SourceType.COLOR:\n return 'color';\n case dh.plot.SourceType.PARENT:\n return 'parent';\n case dh.plot.SourceType.HOVER_TEXT:\n return 'hovertext';\n case dh.plot.SourceType.TEXT:\n return 'text';\n default:\n throw new Error(\"Unrecognized source type: \".concat(sourceType));\n }\n }\n getPlotlySeriesOrientation(series) {\n var _sources$;\n var {\n dh\n } = this;\n var {\n sources\n } = series;\n if (sources.length === 2 && ((_sources$ = sources[0]) === null || _sources$ === void 0 || (_sources$ = _sources$.axis) === null || _sources$ === void 0 ? void 0 : _sources$.type) === dh.plot.AxisType.Y) {\n return ChartUtils.ORIENTATION.HORIZONTAL;\n }\n return ChartUtils.ORIENTATION.VERTICAL;\n }\n\n /**\n * Create a data series (trace) for use with plotly\n * @param series The series to create the series data with\n * @param axisTypeMap The map of axes grouped by type\n * @param seriesVisibility Visibility setting for the series\n * @returns The series data (trace) object for use with plotly.\n */\n makeSeriesDataFromSeries(series, axisTypeMap, seriesVisibility) {\n var showLegend = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;\n var allowWebGL = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : true;\n var {\n name,\n isLinesVisible,\n isShapesVisible,\n plotStyle,\n lineColor,\n shapeColor,\n sources,\n shape,\n shapeSize\n } = series;\n var isBusinessTime = sources.some(source => {\n var _source$axis;\n return (_source$axis = source.axis) === null || _source$axis === void 0 ? void 0 : _source$axis.businessCalendar;\n });\n var type = this.getChartType(plotStyle, isBusinessTime, allowWebGL);\n var mode = this.getPlotlyChartMode(plotStyle, isLinesVisible !== null && isLinesVisible !== void 0 ? isLinesVisible : undefined, isShapesVisible !== null && isShapesVisible !== void 0 ? isShapesVisible : undefined);\n var orientation = this.getPlotlySeriesOrientation(series);\n var seriesData = ChartUtils.makeSeriesData(type, mode, name, showLegend, orientation);\n this.addSourcesToSeriesData(seriesData, plotStyle, sources, axisTypeMap);\n this.addStylingToSeriesData(seriesData, plotStyle, lineColor, shapeColor, shape, shapeSize, seriesVisibility);\n return seriesData;\n }\n addSourcesToSeriesData(seriesDataParam, plotStyle, sources, axisTypeMap) {\n var seriesData = seriesDataParam;\n for (var k = 0; k < sources.length; k += 1) {\n var source = sources[k];\n var {\n axis: _axis2,\n type: sourceType\n } = source;\n var dataAttributeName = this.getPlotlyProperty(plotStyle, sourceType);\n set(seriesData, dataAttributeName, []);\n var axisProperty = _axis2 != null ? this.getAxisPropertyName(_axis2.type) : null;\n if (axisProperty != null) {\n var axes = axisTypeMap.get(_axis2.type);\n if (axes) {\n var axisIndex = axes.indexOf(_axis2);\n var axisIndexString = axisIndex > 0 ? \"\".concat(axisIndex + 1) : '';\n seriesData[\"\".concat(axisProperty, \"axis\")] = \"\".concat(axisProperty).concat(axisIndexString);\n }\n }\n }\n }\n addStylingToSeriesData(seriesDataParam, plotStyle) {\n var lineColor = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;\n var shapeColor = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;\n var shape = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : null;\n var shapeSize = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : null;\n var seriesVisibility = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : null;\n var {\n dh\n } = this;\n var seriesData = seriesDataParam;\n // Add some empty objects so we can fill them in later with details without checking for existence\n seriesData.marker = {\n line: {}\n }; // border line width on markers\n seriesData.line = {\n width: 1 // default line width for lines, should eventually be able to override\n };\n if (plotStyle === dh.plot.SeriesPlotStyle.AREA) {\n seriesData.fill = 'tozeroy';\n } else if (plotStyle === dh.plot.SeriesPlotStyle.STACKED_AREA) {\n seriesData.stackgroup = 'stack';\n } else if (plotStyle === dh.plot.SeriesPlotStyle.STEP) {\n seriesData.line.shape = 'hv'; // plot.ly horizontal then vertical step styling\n } else if (plotStyle === dh.plot.SeriesPlotStyle.HISTOGRAM) {\n // The default histfunc in plotly is 'count', but the data passed up from the API provides explicit x/y values and bins\n // Since it's converted to bar, just set the widths of each bar\n seriesData.width = [];\n } else if (plotStyle === dh.plot.SeriesPlotStyle.PIE) {\n seriesData.textinfo = 'label+percent';\n } else if (plotStyle === dh.plot.SeriesPlotStyle.TREEMAP) {\n seriesData.hoverinfo = 'text';\n seriesData.textinfo = 'label+text';\n seriesData.tiling = {\n packing: 'squarify',\n pad: 0\n };\n seriesData.textposition = 'middle center';\n }\n if (lineColor != null) {\n if (plotStyle === dh.plot.SeriesPlotStyle.BAR) {\n seriesData.marker.color = lineColor;\n } else {\n seriesData.line.color = lineColor;\n }\n }\n if (shapeColor != null) {\n seriesData.marker.color = shapeColor;\n }\n if (shape != null && shape.length > 0) {\n try {\n seriesData.marker.symbol = ChartUtils.getMarkerSymbol(shape);\n } catch (e) {\n log.warn('Unable to handle shape', shape, ':', e);\n }\n }\n if (shapeSize != null) {\n seriesData.marker.size = shapeSize * ChartUtils.DEFAULT_MARKER_SIZE;\n }\n\n // Skipping pie charts\n // Pie slice visibility is configured in chart layout instead of series data\n if (seriesVisibility != null && plotStyle !== dh.plot.SeriesPlotStyle.PIE) {\n seriesData.visible = seriesVisibility;\n }\n }\n getChartType(plotStyle, isBusinessTime) {\n var allowWebGL = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;\n var {\n dh\n } = this;\n switch (plotStyle) {\n case dh.plot.SeriesPlotStyle.HISTOGRAM:\n // When reading data from the `Figure`, it already provides bins and values, so rather than using\n // plot.ly to calculate the bins and sum values, just convert it to a bar chart\n return 'bar';\n default:\n return this.getPlotlyChartType(plotStyle, isBusinessTime, allowWebGL);\n }\n }\n\n /**\n * Return the plotly axis property name\n * @param axisType The axis type to get the property name for\n */\n getAxisPropertyName(axisType) {\n var {\n dh\n } = this;\n switch (axisType) {\n case dh.plot.AxisType.X:\n return 'x';\n case dh.plot.AxisType.Y:\n return 'y';\n default:\n return null;\n }\n }\n\n /**\n * Returns the plotly \"side\" value for the provided axis position\n * @param axisPosition The Iris AxisPosition of the axis\n */\n getAxisSide(axisPosition) {\n var {\n dh\n } = this;\n switch (axisPosition) {\n case dh.plot.AxisPosition.BOTTOM:\n return 'bottom';\n case dh.plot.AxisPosition.TOP:\n return 'top';\n case dh.plot.AxisPosition.LEFT:\n return 'left';\n case dh.plot.AxisPosition.RIGHT:\n return 'right';\n default:\n return undefined;\n }\n }\n\n /**\n * Update the layout with all the axes information for the provided figure\n * @param figure Figure to update the axes for\n * @param layoutParam Layout object to update in place\n * @param chartAxisRangeParser Function to retrieve the axis range parser\n * @param plotWidth Width of the plot in pixels\n * @param plotHeight Height of the plot in pixels\n */\n updateFigureAxes(layoutParam, figure, chartAxisRangeParser) {\n var plotWidth = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;\n var plotHeight = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 0;\n var layout = layoutParam;\n var figureAxes = ChartUtils.getAllAxes(figure);\n for (var i = 0; i < figure.charts.length; i += 1) {\n var _chart3 = figure.charts[i];\n var axisRangeParser = chartAxisRangeParser === null || chartAxisRangeParser === void 0 ? void 0 : chartAxisRangeParser(_chart3);\n var bounds = this.getChartBounds(figure, _chart3, plotWidth, plotHeight);\n this.updateLayoutAxes(layout, _chart3.axes, figureAxes, plotWidth, plotHeight, bounds, axisRangeParser);\n }\n this.removeStaleAxes(layout, figureAxes);\n }\n getChartBounds(figure, chart, plotWidth, plotHeight) {\n var _axisPositionMap$get;\n var {\n dh\n } = this;\n var {\n cols,\n rows\n } = figure;\n var {\n column,\n colspan,\n row,\n rowspan\n } = chart;\n var endColumn = column + colspan;\n var endRow = row + rowspan;\n var columnSize = 1 / cols;\n var rowSize = 1 / rows;\n var xMarginSize = ChartUtils.AXIS_SIZE_PX / plotWidth;\n var yMarginSize = ChartUtils.AXIS_SIZE_PX / plotHeight;\n var bounds = {\n // Need to invert the row positioning so the first one defined shows up on top instead of the bottom, since coordinates start in bottom left\n bottom: (rows - endRow) * rowSize + (endRow < rows ? yMarginSize / 2 : 0),\n top: (rows - row) * rowSize - (row > 0 ? yMarginSize / 2 : 0),\n left: column * columnSize + (column > 0 ? xMarginSize / 2 : 0),\n right: endColumn * columnSize - (endColumn < cols ? xMarginSize / 2 : 0)\n };\n\n // Adjust the bounds based on where the legend is\n // For now, always assume the legend is shown on the right\n var axisPositionMap = ChartUtils.groupArray(chart.axes, 'position');\n var rightAxes = (_axisPositionMap$get = axisPositionMap.get(dh.plot.AxisPosition.RIGHT)) !== null && _axisPositionMap$get !== void 0 ? _axisPositionMap$get : [];\n if (rightAxes.length > 0) {\n if (plotWidth > 0) {\n bounds.right -= (bounds.right - bounds.left) * Math.max(0, Math.min(ChartUtils.LEGEND_WIDTH_PX / plotWidth, ChartUtils.MAX_LEGEND_SIZE));\n } else {\n bounds.right -= (bounds.right - bounds.left) * ChartUtils.DEFAULT_AXIS_SIZE;\n }\n }\n return bounds;\n }\n getPlotlyDateFormat(formatter, columnType, formatPattern) {\n var {\n dh\n } = this;\n var tickformat = formatPattern == null ? undefined : formatPattern.replace('%', '%%').replace(/S{9}/g, '%9f').replace(/S{8}/g, '%8f').replace(/S{7}/g, '%7f').replace(/S{6}/g, '%6f').replace(/S{5}/g, '%5f').replace(/S{4}/g, '%4f').replace(/S{3}/g, '%3f').replace(/S{2}/g, '%2f').replace(/S{1}/g, '%1f').replace(/y{4}/g, '%Y').replace(/y{2}/g, '%y').replace(/M{4}/g, '%B').replace(/M{3}/g, '%b').replace(/M{2}/g, '%m').replace(/M{1}/g, '%-m').replace(/E{4,}/g, '%A').replace(/E{1,}/g, '%a').replace(/d{2}/g, '%d').replace(/([^%]|^)d{1}/g, '$1%-d').replace(/H{2}/g, '%H').replace(/h{2}/g, '%I').replace(/h{1}/g, '%-I').replace(/m{2}/g, '%M').replace(/s{2}/g, '%S').replace(\"'T'\", 'T').replace(' z', ''); // timezone added as suffix if necessary\n\n var ticksuffix;\n var dataFormatter = formatter === null || formatter === void 0 ? void 0 : formatter.getColumnTypeFormatter(columnType);\n if (dataFormatter != null && isDateTimeColumnFormatter(dataFormatter) && dataFormatter.dhTimeZone != null && dataFormatter.showTimeZone) {\n ticksuffix = dh.i18n.DateTimeFormat.format(' z', new Date(), dataFormatter.dhTimeZone);\n }\n return {\n tickformat,\n ticksuffix,\n automargin: true\n };\n }\n\n /**\n * Gets the plotly axis formatting information from the source passed in\n * @param source The Source to get the formatter information from\n * @param formatter The current formatter for formatting data\n */\n getPlotlyAxisFormat(source) {\n var formatter = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n var {\n dh\n } = this;\n var {\n axis,\n columnType\n } = source;\n var {\n formatPattern\n } = axis;\n var axisFormat = null;\n if (TableUtils.isDateType(columnType)) {\n axisFormat = this.getPlotlyDateFormat(formatter, columnType, formatPattern);\n axisFormat = ChartUtils.addTickSpacing(axisFormat, axis, true);\n } else if (TableUtils.isNumberType(columnType)) {\n axisFormat = ChartUtils.getPlotlyNumberFormat(formatter, columnType, formatPattern);\n axisFormat = ChartUtils.addTickSpacing(axisFormat, axis, false);\n }\n if (axis.formatType === dh.plot.AxisFormatType.CATEGORY) {\n if (axisFormat) {\n axisFormat.type = 'category';\n } else {\n axisFormat = {\n type: 'category',\n tickformat: undefined,\n ticksuffix: undefined\n };\n }\n }\n return axisFormat;\n }\n\n /**\n * Updates the axes positions and sizes in the layout object provided.\n * If the axis did not exist in the layout previously, it is created and added.\n * Any axis that no longer exists in axes is removed.\n * With Downsampling enabled, will also update the range on the axis itself as appropriate\n * @param layoutParam The layout object to update\n * @param chartAxes The chart axes to update the layout with\n * @param figureAxes All figure axes to update the layout with\n * @param plotWidth The width of the plot to calculate the axis sizes for\n * @param plotHeight The height of the plot to calculate the axis sizes for\n * @param bounds The bounds for this set of axes\n * @param axisRangeParser A function to retrieve the range parser for a given axis\n */\n updateLayoutAxes(layoutParam, chartAxes, figureAxes) {\n var plotWidth = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;\n var plotHeight = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 0;\n var bounds = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : {\n left: 0,\n top: 0,\n right: 1,\n bottom: 1\n };\n var axisRangeParser = arguments.length > 6 ? arguments[6] : undefined;\n var {\n dh\n } = this;\n var xAxisSize = plotWidth > 0 ? Math.max(ChartUtils.MIN_AXIS_SIZE, Math.min(ChartUtils.AXIS_SIZE_PX / plotHeight, ChartUtils.MAX_AXIS_SIZE)) : ChartUtils.DEFAULT_AXIS_SIZE;\n var yAxisSize = plotHeight > 0 ? Math.max(ChartUtils.MIN_AXIS_SIZE, Math.min(ChartUtils.AXIS_SIZE_PX / plotWidth, ChartUtils.MAX_AXIS_SIZE)) : ChartUtils.DEFAULT_AXIS_SIZE;\n var layout = layoutParam;\n var axisPositionMap = ChartUtils.groupArray(chartAxes, 'position');\n var axisTypeMap = ChartUtils.groupArray(chartAxes, 'type');\n var axisTypes = [...axisTypeMap.keys()];\n var figureAxisTypeMap = ChartUtils.groupArray(figureAxes, 'type');\n for (var j = 0; j < axisTypes.length; j += 1) {\n var axisType = axisTypes[j];\n var axisProperty = this.getAxisPropertyName(axisType);\n if (axisProperty != null) {\n var typeAxes = axisTypeMap.get(axisType);\n var figureTypeAxes = figureAxisTypeMap.get(axisType);\n var isYAxis = axisType === dh.plot.AxisType.Y;\n var plotSize = isYAxis ? plotHeight : plotWidth;\n assertNotNull(typeAxes);\n assertNotNull(figureTypeAxes);\n for (var chartAxisIndex = 0; chartAxisIndex < typeAxes.length; chartAxisIndex += 1) {\n var _axis3 = typeAxes[chartAxisIndex];\n var figureAxisIndex = figureTypeAxes.indexOf(_axis3);\n var axisLayoutProperty = ChartUtils.getAxisLayoutProperty(axisProperty, figureAxisIndex);\n if (layout[axisLayoutProperty] == null) {\n layout[axisLayoutProperty] = {};\n }\n var layoutAxis = layout[axisLayoutProperty];\n if (layoutAxis != null) {\n this.updateLayoutAxis(layoutAxis, _axis3, chartAxisIndex, axisPositionMap, xAxisSize, yAxisSize, bounds);\n var {\n range: _range,\n autorange\n } = layoutAxis;\n if (axisRangeParser != null && _range !== undefined && (autorange === undefined || autorange === false)) {\n var rangeParser = axisRangeParser(_axis3);\n var [rangeStart, rangeEnd] = rangeParser(_range);\n log.debug('Setting downsample range', plotSize, rangeStart, rangeEnd);\n _axis3.range(plotSize, rangeStart, rangeEnd);\n } else {\n _axis3.range(plotSize);\n }\n }\n }\n }\n }\n }\n\n /**\n * Remove any axes from the layout param that no longer belong to any series\n * @param layoutParam Layout object to remove stale axes from\n * @param axes All axes in the figure\n */\n removeStaleAxes(layoutParam, axes) {\n var layout = layoutParam;\n var figureAxisTypeMap = ChartUtils.groupArray(axes, 'type');\n var figureAxisTypes = [...figureAxisTypeMap.keys()];\n for (var i = 0; i < figureAxisTypes.length; i += 1) {\n var axisType = figureAxisTypes[i];\n var typeAxes = figureAxisTypeMap.get(axisType);\n assertNotNull(typeAxes);\n var axisIndex = typeAxes.length;\n // Delete any axes that may no longer exist\n var axisProperty = this.getAxisPropertyName(axisType);\n if (axisProperty != null) {\n var axisLayoutProperty = ChartUtils.getAxisLayoutProperty(axisProperty, axisIndex);\n while (layout[axisLayoutProperty] != null) {\n delete layout[axisLayoutProperty];\n axisIndex += 1;\n axisLayoutProperty = ChartUtils.getAxisLayoutProperty(axisProperty, axisIndex);\n }\n }\n }\n }\n\n /**\n * Updates the layout axis object in place\n * @param layoutAxisParam The plotly layout axis param\n * @param axis The Iris Axis to update the plotly layout with\n * @param axisIndex The type index for this axis\n * @param axisPositionMap All the axes mapped by position\n * @param axisSize The size of each axis in percent\n * @param bounds The bounds of the axes domains\n */\n updateLayoutAxis(layoutAxisParam, axis, axisIndex, axisPositionMap, xAxisSize, yAxisSize, bounds) {\n var _axis$label;\n var {\n dh\n } = this;\n var isYAxis = axis.type === dh.plot.AxisType.Y;\n var axisSize = isYAxis ? yAxisSize : xAxisSize;\n var layoutAxis = layoutAxisParam;\n // Enterprise API returns null for empty axis labels\n // Passing null title text to Plotly results in incorrect axis position, DH-9164\n var label = (_axis$label = axis.label) !== null && _axis$label !== void 0 ? _axis$label : '';\n if (layoutAxis.title !== undefined && typeof layoutAxis.title !== 'string') {\n layoutAxis.title.text = label;\n } else {\n layoutAxis.title = {\n text: label\n };\n }\n if (axis.log) {\n layoutAxis.type = 'log';\n }\n layoutAxis.side = this.getAxisSide(axis.position);\n if (axisIndex > 0) {\n var _this$getAxisProperty, _axisPositionMap$get2;\n layoutAxis.overlaying = (_this$getAxisProperty = this.getAxisPropertyName(axis.type)) !== null && _this$getAxisProperty !== void 0 ? _this$getAxisProperty : undefined;\n var positionAxes = (_axisPositionMap$get2 = axisPositionMap.get(axis.position)) !== null && _axisPositionMap$get2 !== void 0 ? _axisPositionMap$get2 : [];\n var sideIndex = positionAxes.indexOf(axis);\n if (sideIndex > 0) {\n layoutAxis.anchor = 'free';\n if (axis.position === dh.plot.AxisPosition.RIGHT) {\n layoutAxis.position = bounds.right + (sideIndex - positionAxes.length + 1) * axisSize;\n } else if (axis.position === dh.plot.AxisPosition.TOP) {\n layoutAxis.position = bounds.top + (sideIndex - positionAxes.length + 1) * axisSize;\n } else if (axis.position === dh.plot.AxisPosition.BOTTOM) {\n layoutAxis.position = bounds.bottom + (positionAxes.length - sideIndex + 1) * axisSize;\n } else if (axis.position === dh.plot.AxisPosition.LEFT) {\n layoutAxis.position = bounds.left + (positionAxes.length - sideIndex + 1) * axisSize;\n }\n }\n } else if (axis.type === dh.plot.AxisType.X) {\n var leftAxes = axisPositionMap.get(dh.plot.AxisPosition.LEFT) || [];\n var rightAxes = axisPositionMap.get(dh.plot.AxisPosition.RIGHT) || [];\n var left = Math.max(bounds.left, bounds.left + (leftAxes.length - 1) * yAxisSize);\n var right = Math.min(bounds.right - (rightAxes.length - 1) * yAxisSize, bounds.right);\n layoutAxis.domain = [left, right];\n } else if (axis.type === dh.plot.AxisType.Y) {\n var bottomAxes = axisPositionMap.get(dh.plot.AxisPosition.BOTTOM) || [];\n var topAxes = axisPositionMap.get(dh.plot.AxisPosition.TOP) || [];\n var bottom = Math.max(bounds.bottom, bounds.bottom + (bottomAxes.length - 1) * xAxisSize);\n var top = Math.min(bounds.top - (topAxes.length - 1) * xAxisSize, bounds.top);\n layoutAxis.domain = [bottom, top];\n }\n\n // autorangeoptions exists in plotly.js but not in the types\n // axis.range only applies to the initial axis range, can't handle specifying min or max independently,\n // and cannot be returned to if the user changes the range via interaction\n // minallowed and maxallowed can be set independently and can be returned to if the user changes\n // the range via interaction\n var {\n minRange,\n maxRange,\n log: logAxis\n } = axis;\n if (!Number.isNaN(minRange) || !Number.isNaN(maxRange)) {\n layoutAxis.autorangeoptions = {};\n if (!Number.isNaN(minRange)) {\n layoutAxis.autorangeoptions.minallowed = logAxis ? Math.log10(minRange) : minRange;\n }\n if (!Number.isNaN(maxRange)) {\n layoutAxis.autorangeoptions.maxallowed = logAxis ? Math.log10(maxRange) : maxRange;\n }\n }\n }\n\n /**\n * Creates the bounds for the periods specified.\n * For example, if you pass in [['09:00', '17:00']], it will return [17, 9] (closing at 5pm, opening at 9am the next day)\n * If you pass [['09:00', '12:00'], ['13:00', '17:00']], it will return [12, 13] (closing at noon, opening at 1pm) and [17, 9] (closing at 5pm, opening at 9am the next day)\n * @param periods Periods to map\n * @param timeZoneDiff Time zone difference in hours\n * @returns Bounds for the periods in plotly format\n */\n // eslint-disable-next-line class-methods-use-this\n createBoundsFromPeriods(periods) {\n var timeZoneDiff = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n if (periods.length === 0) {\n return [];\n }\n var numberPeriods = periods.map(period => [(ChartUtils.periodToDecimal(period.open) + timeZoneDiff) % 24, (ChartUtils.periodToDecimal(period.close) + timeZoneDiff) % 24]).sort((a, b) => a[0] - b[0]);\n var bounds = [];\n for (var i = 0; i < numberPeriods.length; i += 1) {\n var period = numberPeriods[i];\n var nextPeriod = numberPeriods[(i + 1) % numberPeriods.length];\n bounds.push([period[1], nextPeriod[0]]);\n }\n return bounds;\n }\n\n /**\n * Creates range breaks for plotly from business periods.\n * @param periods Business periods to create the breaks for\n * @param timeZoneDiff Time zone difference in hours\n * @returns Plotly range breaks for the business periods\n */\n createBreaksFromPeriods(periods) {\n var timeZoneDiff = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n var bounds = this.createBoundsFromPeriods(periods, timeZoneDiff);\n return bounds.map(bound => ({\n pattern: 'hour',\n bounds: bound\n }));\n }\n\n /**\n * Creates range break bounds for plotly from business days.\n * For example a standard business week of ['MONDAY','TUESDAY','WEDNESDAY','THURSDAY','FRIDAY']\n * will result in [[6,1]] meaning close on Saturday and open on Monday.\n * If you remove Wednesday from the array, then you get two closures [[6, 1], [3, 4]]\n *\n * @param businessDays the days to display on the x-axis\n */\n createBoundsFromDays(businessDays) {\n var weekLength = this.daysOfWeek.length;\n // No breaks if all days are business days\n if (businessDays.length === weekLength) {\n return [];\n }\n var businessDaysInt = businessDays.map(day => this.daysOfWeek.indexOf(day));\n var businessDaysSet = new Set(businessDaysInt);\n\n // These are the days when business is closed (e.g. Saturday to start the weekend)\n var closedDays = new Set();\n for (var i = 0; i < weekLength; i += 1) {\n if (!businessDaysSet.has(i) && businessDaysSet.has((i - 1 + weekLength) % weekLength)) {\n closedDays.add(i);\n }\n }\n var boundsArray = [];\n // For each close day, find the next open day\n closedDays.forEach(closedDay => {\n for (var _i = 0; _i < weekLength; _i += 1) {\n var adjustedDay = (closedDay + _i) % weekLength;\n if (businessDaysSet.has(adjustedDay)) {\n boundsArray.push([closedDay, adjustedDay]);\n return;\n }\n }\n throw new Error(\"Unable to find open day for closed day \".concat(closedDay, \", businessDays: \").concat(businessDays));\n });\n return boundsArray;\n }\n\n /**\n * Breaks in plotly for business days\n * @param businessDays Business days to create the breaks for\n * @returns Plotly range breaks for the business days\n */\n createBreaksFromDays(businessDays) {\n var bounds = this.createBoundsFromDays(businessDays);\n return bounds.map(bound => ({\n pattern: 'day of week',\n bounds: bound\n }));\n }\n\n /**\n * Creates range breaks for plotly from a business calendar.\n * @param businessCalendar Calendar to create the breaks from\n * @param formatter Formatter to use for time zones\n * @returns Plotly Rangebreaks for the business calendar\n */\n createRangeBreaksFromBusinessCalendar(businessCalendar, formatter) {\n var rangebreaks = [];\n var {\n businessPeriods,\n businessDays,\n holidays,\n timeZone: calendarTimeZone\n } = businessCalendar;\n var typeFormatter = formatter === null || formatter === void 0 ? void 0 : formatter.getColumnTypeFormatter(BUSINESS_COLUMN_TYPE);\n var formatterTimeZone;\n if (isDateTimeColumnFormatter(typeFormatter)) {\n formatterTimeZone = typeFormatter.dhTimeZone;\n }\n var timeZoneDiff = ChartUtils.getTimeZoneDiff(calendarTimeZone, formatterTimeZone);\n if (holidays.length > 0) {\n rangebreaks.push(...this.createRangeBreakValuesFromHolidays(holidays, calendarTimeZone, formatterTimeZone, businessCalendar));\n }\n rangebreaks.push(...this.createBreaksFromPeriods(businessPeriods, timeZoneDiff));\n rangebreaks.push(...this.createBreaksFromDays(businessDays));\n return rangebreaks;\n }\n\n /**\n * Creates an array of range breaks for all holidays.\n *\n * @param holidays an array of holidays\n * @param calendarTimeZone the time zone for the business calendar\n * @param formatterTimeZone the time zone for the formatter\n * @param calendar the calendar the holidays are from\n */\n createRangeBreakValuesFromHolidays(holidays, calendarTimeZone, formatterTimeZone, calendar) {\n var fullHolidays = [];\n var partialHolidays = [];\n holidays.forEach(holiday => {\n if (holiday.businessPeriods.length > 0) {\n partialHolidays.push(...this.createPartialHoliday(holiday, calendarTimeZone, formatterTimeZone, calendar));\n } else {\n fullHolidays.push(this.createFullHoliday(holiday, calendarTimeZone, formatterTimeZone));\n }\n });\n return [{\n values: fullHolidays\n }, ...partialHolidays];\n }\n\n /**\n * Creates the range break value for a full holiday. A full holiday is day that has no business periods.\n *\n * @param holiday the full holiday\n * @param calendarTimeZone the time zone for the business calendar\n * @param formatterTimeZone the time zone for the formatter\n */\n createFullHoliday(holiday, calendarTimeZone, formatterTimeZone) {\n return this.adjustDateForTimeZone(\"\".concat(holiday.date.toString(), \" 00:00:00.000000\"), calendarTimeZone, formatterTimeZone);\n }\n\n /**\n * Creates the range break for a partial holiday. A partial holiday is holiday with business periods\n * that are different than the default business periods.\n *\n * @param holiday the partial holiday\n * @param calendarTimeZone the time zone for the business calendar\n * @param formatterTimeZone the time zone for the formatter\n * @param calendar the calendar the holiday is from. Used to check against the default business periods to ensure this holiday needs to be specified\n *\n * @returns an array of range breaks for the partial holiday\n */\n createPartialHoliday(holiday, calendarTimeZone, formatterTimeZone, calendar) {\n var _calendar$businessPer;\n if (holiday.businessPeriods.length === 0) {\n return [];\n }\n var dateString = holiday.date.toString();\n\n // First check that the holiday is on a business day. If it's not, we can ignore it\n if (calendar) {\n var dayOfWeek = new Date(dateString).getDay();\n var isBusinessDay = calendar.businessDays.includes(this.daysOfWeek[dayOfWeek]);\n if (!isBusinessDay) {\n return [];\n }\n }\n var closedPeriods = ChartUtils.createClosedRangesForPartialHoliday(holiday.businessPeriods, (_calendar$businessPer = calendar === null || calendar === void 0 ? void 0 : calendar.businessPeriods) !== null && _calendar$businessPer !== void 0 ? _calendar$businessPer : []);\n var rangeBreaks = [];\n for (var i = 0; i < closedPeriods.length; i += 1) {\n var [closeStart, closeEnd] = closedPeriods[i];\n // Skip over any periods where start and close are the same (zero hours)\n if (closeStart !== closeEnd) {\n var values = [this.adjustDateForTimeZone(\"\".concat(dateString, \" \").concat(ChartUtils.decimalToPeriod(closeStart), \":00.000000\"), calendarTimeZone, formatterTimeZone)];\n var dvalue = MILLIS_PER_HOUR * (closeEnd - closeStart);\n rangeBreaks.push({\n values,\n dvalue\n });\n }\n }\n return rangeBreaks;\n }\n\n /**\n * Adjusts a date string from the calendar time zone to the formatter time zone.\n *\n * @param dateString the date string\n * @param calendarTimeZone the time zone for the business calendar\n * @param formatterTimeZone the time zone for the formatter\n */\n adjustDateForTimeZone(dateString, calendarTimeZone, formatterTimeZone) {\n if (formatterTimeZone && formatterTimeZone.standardOffset !== calendarTimeZone.standardOffset) {\n return this.unwrapValue(this.wrapValue(dateString, BUSINESS_COLUMN_TYPE, calendarTimeZone), formatterTimeZone);\n }\n return dateString;\n }\n\n /**\n * Creates the Figure settings from the Chart Builder settings\n * This should be deprecated at some point, and have Chart Builder create the figure settings directly.\n * This logic will still need to exist to translate existing charts, but could be part of a migration script\n * to translate the data.\n * Change when we decide to add more functionality to the Chart Builder.\n * @param settings The chart builder settings\n * @param settings.title The title for this figure\n * @param settings.xAxis The name of the column to use for the x-axis\n * @param settings.series The name of the columns to use for the series of this figure\n * @param settings.type The plot style for this figure\n */\n makeFigureSettings(settings, table) {\n var {\n dh\n } = this;\n var {\n series,\n xAxis: settingsAxis,\n type\n } = settings;\n var title = ChartUtils.titleFromSettings(settings);\n var xAxis = {\n formatType: \"\".concat(dh.plot.AxisFormatType.NUMBER),\n type: \"\".concat(dh.plot.AxisType.X),\n position: \"\".concat(dh.plot.AxisPosition.BOTTOM)\n };\n var yAxis = {\n formatType: \"\".concat(dh.plot.AxisFormatType.NUMBER),\n type: \"\".concat(dh.plot.AxisType.Y),\n position: \"\".concat(dh.plot.AxisPosition.LEFT)\n };\n return {\n charts: [{\n chartType: \"\".concat(dh.plot.ChartType.XY),\n axes: [xAxis, yAxis],\n series: (series !== null && series !== void 0 ? series : []).map(name => ({\n plotStyle: \"\".concat(type),\n name,\n dataSources: [{\n type: \"\".concat(dh.plot.SourceType.X),\n columnName: settingsAxis !== null && settingsAxis !== void 0 ? settingsAxis : '',\n axis: xAxis,\n table\n }, {\n type: \"\".concat(dh.plot.SourceType.Y),\n columnName: name,\n axis: yAxis,\n table\n }]\n }))\n }],\n title\n };\n }\n\n /**\n * Unwraps a value provided from API to a value plotly can understand\n * Eg. Unwraps DateWrapper, LongWrapper objects.\n */\n unwrapValue(value, timeZone) {\n var {\n dh\n } = this;\n if (value != null) {\n if (isDateWrapper(value)) {\n return dh.i18n.DateTimeFormat.format(ChartUtils.DATE_FORMAT, value, timeZone);\n }\n if (isLongWrapper(value)) {\n return value.asNumber();\n }\n }\n return value;\n }\n\n /**\n *\n * @param value The value to wrap up\n * @param columnType The type of column this value is from\n * @param timeZone The time zone if applicable\n */\n wrapValue(value, columnType) {\n var timeZone = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;\n var {\n dh\n } = this;\n if (TableUtils.isDateType(columnType) && typeof value === 'string') {\n // Need to limit the format to the actual length of the string range set in plotly\n // Otherwise parse will fail\n var text = value;\n var format = ChartUtils.DATE_FORMAT.substr(0, value.length);\n var date = dh.i18n.DateTimeFormat.parse(format, text);\n if (!timeZone) {\n return date;\n }\n\n // IDS-5994 Due to date parsing, time zone, and daylight savings shenanigans, we need\n // to pass the actual offset with the time to have it parse correctly.\n // However, the offset can change based on the date because of Daylight Savings\n // So we end up parsing the date multiple times. And curse daylight savings.\n var tzFormat = \"\".concat(format, \" Z\");\n var estimatedOffset = dh.i18n.DateTimeFormat.format('Z', date, timeZone);\n var estimatedDate = dh.i18n.DateTimeFormat.parse(tzFormat, \"\".concat(text, \" \").concat(estimatedOffset));\n var offset = dh.i18n.DateTimeFormat.format('Z', estimatedDate, timeZone);\n return dh.i18n.DateTimeFormat.parse(tzFormat, \"\".concat(text, \" \").concat(offset));\n }\n return value;\n }\n makeLayoutAxis(type, theme) {\n var {\n dh\n } = this;\n var axis = {\n automargin: true,\n gridcolor: theme.gridcolor,\n linecolor: theme.linecolor,\n rangeslider: {\n visible: false\n },\n showline: true,\n ticks: 'outside',\n ticklen: 5,\n // act as padding, can't find a tick padding\n tickcolor: theme.paper_bgcolor,\n // hide ticks as padding\n tickfont: {\n color: theme.zerolinecolor\n },\n title: {\n font: {\n color: theme.title_color\n }\n },\n legend: {\n font: {\n color: theme.legend_color\n }\n }\n };\n if (type === dh.plot.AxisType.X) {\n Object.assign(axis, {\n showgrid: true\n });\n } else if (type === dh.plot.AxisType.Y) {\n Object.assign(axis, {\n zerolinecolor: theme.zerolinecolor,\n zerolinewidth: 2\n });\n }\n return axis;\n }\n\n /**\n * Creates a plotly layout template object based on a given theme.\n * See https://plotly.com/javascript/reference/layout/#layout-template\n * @param theme The theme to use for the layout template\n * @returns The layout template object\n */\n makeDefaultTemplate(theme) {\n /* eslint-disable camelcase */\n var {\n error_band_line_color,\n ohlc_increasing,\n ohlc_decreasing,\n title_color,\n indicator_increasing,\n indicator_decreasing,\n indicator_gauge\n } = theme;\n return {\n data: {\n bar: [{\n marker: {\n line: {\n color: 'transparent'\n }\n }\n }],\n scatter: [{\n error_x: {\n color: error_band_line_color\n },\n error_y: {\n color: error_band_line_color\n }\n }],\n ohlc: [{\n increasing: {\n line: {\n color: ohlc_increasing\n }\n },\n decreasing: {\n line: {\n color: ohlc_decreasing\n }\n }\n }],\n pie: [{\n outsidetextfont: {\n color: title_color\n }\n }],\n treemap: [{\n outsidetextfont: {\n color: title_color\n }\n }],\n indicator: [{\n title: {\n font: {\n color: title_color\n }\n },\n delta: {\n decreasing: {\n color: indicator_decreasing\n },\n increasing: {\n color: indicator_increasing\n }\n },\n gauge: {\n bar: {\n color: indicator_gauge\n }\n }\n }]\n },\n /* eslint-enable camelcase */\n layout: this.makeDefaultLayout(theme)\n };\n }\n\n /**\n * Creates a plotly layout object based on a given theme.\n * See https://plotly.com/javascript/reference/layout/\n * @param theme The theme to use for the layout\n */\n makeDefaultLayout(theme) {\n var {\n dh\n } = this;\n var {\n /* Used as top level properties of `Layout` */\n /* eslint-disable camelcase */\n paper_bgcolor,\n plot_bgcolor,\n title_color,\n coastline_color,\n land_color,\n ocean_color,\n lake_color,\n river_color,\n map_style\n /* eslint-disable camelcase */\n } = theme;\n var layout = {\n paper_bgcolor,\n plot_bgcolor,\n autosize: true,\n colorway: ChartUtils.normalizeColorway(theme === null || theme === void 0 ? void 0 : theme.colorway),\n font: {\n family: \"'Fira Sans', sans-serif\",\n color: title_color\n },\n title: {\n font: {\n color: title_color\n },\n xanchor: 'center',\n xref: 'paper',\n yanchor: 'top',\n pad: _objectSpread({}, ChartUtils.DEFAULT_TITLE_PADDING),\n y: 1\n },\n legend: {\n font: {\n color: title_color\n }\n },\n margin: _objectSpread({}, ChartUtils.DEFAULT_MARGIN),\n xaxis: this.makeLayoutAxis(dh.plot.AxisType.X, theme),\n yaxis: this.makeLayoutAxis(dh.plot.AxisType.Y, theme),\n polar: {\n angularaxis: this.makeLayoutAxis(dh.plot.AxisType.SHAPE, theme),\n radialaxis: this.makeLayoutAxis(dh.plot.AxisType.SHAPE, theme),\n bgcolor: theme.plot_bgcolor\n },\n scene: {\n xaxis: this.makeLayoutAxis(dh.plot.AxisType.X, theme),\n yaxis: this.makeLayoutAxis(dh.plot.AxisType.Y, theme),\n zaxis: this.makeLayoutAxis(null, theme)\n },\n geo: {\n showcoastlines: true,\n showframe: false,\n showland: true,\n showocean: true,\n showlakes: true,\n showrivers: true,\n bgcolor: paper_bgcolor,\n coastlinecolor: coastline_color,\n landcolor: land_color,\n oceancolor: ocean_color,\n lakecolor: lake_color,\n rivercolor: river_color\n },\n map: {\n style: map_style\n }\n };\n layout.datarevision = 0;\n return layout;\n }\n\n /**\n * Hydrate settings from a JSONable object\n * @param settings Dehydrated settings\n */\n hydrateSettings(settings) {\n var {\n dh\n } = this;\n return _objectSpread(_objectSpread({}, settings), {}, {\n type: settings.type != null ? dh.plot.SeriesPlotStyle[settings.type] : undefined\n });\n }\n}\n_defineProperty(ChartUtils, \"DEFAULT_AXIS_SIZE\", 0.15);\n_defineProperty(ChartUtils, \"MIN_AXIS_SIZE\", 0.025);\n_defineProperty(ChartUtils, \"MAX_AXIS_SIZE\", 0.2);\n_defineProperty(ChartUtils, \"AXIS_SIZE_PX\", 75);\n_defineProperty(ChartUtils, \"LEGEND_WIDTH_PX\", 50);\n_defineProperty(ChartUtils, \"MAX_LEGEND_SIZE\", 0.25);\n_defineProperty(ChartUtils, \"ORIENTATION\", Object.freeze({\n HORIZONTAL: 'h',\n VERTICAL: 'v'\n}));\n_defineProperty(ChartUtils, \"DATE_FORMAT\", 'yyyy-MM-dd HH:mm:ss.SSSSSS');\n_defineProperty(ChartUtils, \"DEFAULT_MARGIN\", Object.freeze({\n l: 60,\n r: 50,\n t: 30,\n b: 60,\n pad: 0\n}));\n_defineProperty(ChartUtils, \"DEFAULT_TITLE_PADDING\", Object.freeze({\n t: 8\n}));\n_defineProperty(ChartUtils, \"SUBTITLE_LINE_HEIGHT\", 25);\n_defineProperty(ChartUtils, \"DEFAULT_MARKER_SIZE\", 6);\n_defineProperty(ChartUtils, \"MODE_MARKERS\", 'markers');\n_defineProperty(ChartUtils, \"MODE_LINES\", 'lines');\nexport default ChartUtils;\n//# sourceMappingURL=ChartUtils.js.map","function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }\nfunction _toPropertyKey(t) { var i = _toPrimitive(t, \"string\"); return \"symbol\" == typeof i ? i : i + \"\"; }\nfunction _toPrimitive(t, r) { if (\"object\" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || \"default\"); if (\"object\" != typeof i) return i; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (\"string\" === r ? String : Number)(t); }\n/* eslint class-methods-use-this: \"off\" */\n/* eslint no-unused-vars: \"off\" */\n\n/**\n * Model for a Chart\n * All of these methods should return very quickly.\n * If data needs to be loaded asynchronously, return something immediately, then trigger an event for the chart to refresh.\n */\nclass ChartModel {\n constructor(dh) {\n _defineProperty(this, \"dh\", void 0);\n _defineProperty(this, \"listeners\", void 0);\n /** Formatter settings for the chart, such as how to format dates and numbers */\n _defineProperty(this, \"formatter\", void 0);\n _defineProperty(this, \"renderOptions\", void 0);\n _defineProperty(this, \"rect\", void 0);\n _defineProperty(this, \"isDownsamplingDisabled\", void 0);\n _defineProperty(this, \"title\", void 0);\n this.dh = dh;\n this.listeners = [];\n this.isDownsamplingDisabled = false;\n }\n getData() {\n return [];\n }\n getDefaultTitle() {\n return '';\n }\n getLayout() {\n return {};\n }\n getFilterColumnMap() {\n return new Map();\n }\n isFilterRequired() {\n return false;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n setFilter(filter) {}\n\n /**\n * Close this model, clean up any underlying subscriptions\n */\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n close() {}\n\n /**\n * Set the formatter to use when charting the data.\n * @param formatter The formatter to use to format the charting data\n */\n setFormatter(formatter) {\n this.formatter = formatter;\n }\n\n /**\n * Set additional options for rendering the chart\n * @param renderOptions Options for rendering the chart\n */\n setRenderOptions(renderOptions) {\n this.renderOptions = renderOptions;\n }\n\n /**\n * Disable downsampling\n * @param isDownsamplingDisabled True if downsampling should be disabled\n */\n setDownsamplingDisabled(isDownsamplingDisabled) {\n this.isDownsamplingDisabled = isDownsamplingDisabled;\n }\n\n /**\n * Set the dimensions of the plot. May be needed to evaluate some of the percents\n * @param rect The bounding rectangle of the plot\n */\n setDimensions(rect) {\n this.rect = rect;\n }\n setTitle(title) {\n this.title = title;\n }\n\n /**\n * Subscribe to this ChartModel and start listening for all events.\n * @param callback Callback when an event occurs\n */\n subscribe(callback) {\n this.listeners.push(callback);\n }\n unsubscribe(callback) {\n this.listeners = this.listeners.filter(listener => listener !== callback);\n }\n fireEvent(event) {\n for (var i = 0; i < this.listeners.length; i += 1) {\n this.listeners[i](event);\n }\n }\n fireUpdate(data) {\n this.fireEvent(new CustomEvent(ChartModel.EVENT_UPDATED, {\n detail: data\n }));\n }\n fireDisconnect() {\n this.fireEvent(new CustomEvent(ChartModel.EVENT_DISCONNECT));\n }\n fireReconnect() {\n this.fireEvent(new CustomEvent(ChartModel.EVENT_RECONNECT));\n }\n fireDownsampleStart(detail) {\n this.fireEvent(new CustomEvent(ChartModel.EVENT_DOWNSAMPLESTARTED, {\n detail\n }));\n }\n fireDownsampleFinish(detail) {\n this.fireEvent(new CustomEvent(ChartModel.EVENT_DOWNSAMPLEFINISHED, {\n detail\n }));\n }\n fireDownsampleFail(detail) {\n this.fireEvent(new CustomEvent(ChartModel.EVENT_DOWNSAMPLEFAILED, {\n detail\n }));\n }\n fireDownsampleNeeded(detail) {\n this.fireEvent(new CustomEvent(ChartModel.EVENT_DOWNSAMPLENEEDED, {\n detail\n }));\n }\n fireLoadFinished() {\n this.fireEvent(new CustomEvent(ChartModel.EVENT_LOADFINISHED));\n }\n fireError(detail) {\n this.fireEvent(new CustomEvent(ChartModel.EVENT_ERROR, {\n detail\n }));\n }\n fireBlocker(detail) {\n this.fireEvent(new CustomEvent(ChartModel.EVENT_BLOCKER, {\n detail\n }));\n }\n fireBlockerClear() {\n this.fireEvent(new CustomEvent(ChartModel.EVENT_BLOCKER_CLEAR));\n }\n fireLayoutUpdated(detail) {\n this.fireEvent(new CustomEvent(ChartModel.EVENT_LAYOUT_UPDATED, {\n detail\n }));\n }\n}\n_defineProperty(ChartModel, \"EVENT_UPDATED\", 'ChartModel.EVENT_UPDATED');\n_defineProperty(ChartModel, \"EVENT_DISCONNECT\", 'ChartModel.EVENT_DISCONNECT');\n_defineProperty(ChartModel, \"EVENT_RECONNECT\", 'ChartModel.EVENT_RECONNECT');\n_defineProperty(ChartModel, \"EVENT_DOWNSAMPLESTARTED\", 'ChartModel.EVENT_DOWNSAMPLESTARTED');\n_defineProperty(ChartModel, \"EVENT_DOWNSAMPLEFINISHED\", 'ChartModel.EVENT_DOWNSAMPLEFINISHED');\n_defineProperty(ChartModel, \"EVENT_DOWNSAMPLEFAILED\", 'ChartModel.EVENT_DOWNSAMPLEFAILED');\n_defineProperty(ChartModel, \"EVENT_DOWNSAMPLENEEDED\", 'ChartModel.EVENT_DOWNSAMPLENEEDED');\n_defineProperty(ChartModel, \"EVENT_LOADFINISHED\", 'ChartModel.EVENT_LOADFINISHED');\n_defineProperty(ChartModel, \"EVENT_ERROR\", 'ChartModel.EVENT_ERROR');\n_defineProperty(ChartModel, \"EVENT_BLOCKER\", 'ChartModel.EVENT_BLOCKER');\n_defineProperty(ChartModel, \"EVENT_BLOCKER_CLEAR\", 'ChartModel.EVENT_BLOCKER_CLEAR');\n_defineProperty(ChartModel, \"EVENT_LAYOUT_UPDATED\", 'ChartModel.EVENT_LAYOUT_UPDATED');\nexport default ChartModel;\n//# sourceMappingURL=ChartModel.js.map","function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }\nfunction _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }\nfunction _toPropertyKey(t) { var i = _toPrimitive(t, \"string\"); return \"symbol\" == typeof i ? i : i + \"\"; }\nfunction _toPrimitive(t, r) { if (\"object\" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || \"default\"); if (\"object\" != typeof i) return i; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (\"string\" === r ? String : Number)(t); }\nimport { forwardRef, lazy, Suspense } from 'react';\nimport { LoadingOverlay } from '@deephaven/components';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nvar IrisGrid = /*#__PURE__*/lazy(() => import('./IrisGrid.js'));\nvar LazyIrisGrid = /*#__PURE__*/forwardRef((\n// This creates the correct type to make defaultProps optional\nprops, ref) => /*#__PURE__*/_jsx(Suspense, {\n fallback: /*#__PURE__*/_jsx(LoadingOverlay, {\n \"data-testid\": \"lazy-iris-grid-loading\"\n }),\n children: /*#__PURE__*/_jsx(IrisGrid, _objectSpread({\n ref: ref\n }, props))\n}));\nLazyIrisGrid.displayName = 'LazyIrisGrid';\nexport default LazyIrisGrid;\n//# sourceMappingURL=LazyIrisGrid.js.map","export function isExpandableGridModel(model) {\n return (model === null || model === void 0 ? void 0 : model.hasExpandableRows) !== undefined;\n}\n\n/**\n * Expandable grid model. Allows for a grid with rows that can expand (e.g. A Tree Table)\n */\n//# sourceMappingURL=ExpandableGridModel.js.map","function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }\nfunction _toPropertyKey(t) { var i = _toPrimitive(t, \"string\"); return \"symbol\" == typeof i ? i : i + \"\"; }\nfunction _toPrimitive(t, r) { if (\"object\" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || \"default\"); if (\"object\" != typeof i) return i; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (\"string\" === r ? String : Number)(t); }\n// Also exported via GridRange.SELECTION_DIRECTION\nexport var SELECTION_DIRECTION = /*#__PURE__*/function (SELECTION_DIRECTION) {\n SELECTION_DIRECTION[\"DOWN\"] = \"DOWN\";\n SELECTION_DIRECTION[\"UP\"] = \"UP\";\n SELECTION_DIRECTION[\"LEFT\"] = \"LEFT\";\n SELECTION_DIRECTION[\"RIGHT\"] = \"RIGHT\";\n return SELECTION_DIRECTION;\n}({});\nexport class GridRange {\n /**\n * Returns a normalized array of indexes ensuring left <= right and top <= bottom\n * @param startColumn Start column index\n * @param startRow Start row index\n * @param endColumn End column index\n * @param endRow End row index\n * @returns Array containing normalized indexes [left, top, right, bottom]\n */\n static normalize(startColumn, startRow, endColumn, endRow) {\n var left = startColumn;\n var top = startRow;\n var right = endColumn;\n var bottom = endRow;\n if (left != null && right != null && right < left) {\n left = right;\n right = startColumn;\n }\n if (top != null && bottom != null && bottom < top) {\n top = bottom;\n bottom = startRow;\n }\n return [left, top, right, bottom];\n }\n\n /**\n * Makes a GridRange ensuring startColumn <= endColumn, startRow <= endRow\n * @param startColumn Start column index\n * @param startRow Start row index\n * @param endColumn End column index\n * @param endRow End row index\n * @returns Normalized GridRange\n */\n static makeNormalized(startColumn, startRow, endColumn, endRow) {\n return new GridRange(...GridRange.normalize(startColumn, startRow, endColumn, endRow));\n }\n\n /**\n * Creates a GridRange representing a single cell\n * @param column Column index\n * @param row Row index\n * @returns GridRange representing the cell\n */\n static makeCell(column, row) {\n return new GridRange(column, row, column, row);\n }\n\n /**\n * Creates a GridRange representing an infinite length column\n * @param column Column index\n * @returns GridRange representing the column\n */\n static makeColumn(column) {\n return new GridRange(column, null, column, null);\n }\n\n /**\n * Creates a GridRange representing an infinite length row\n * @param row Row index\n * @returns GridRange representing the row\n */\n static makeRow(row) {\n return new GridRange(null, row, null, row);\n }\n\n /**\n * Returns the minimum value between 2 range indexes or null if at least 1 is null\n * @param index1 First grid range index\n * @param index2 Second grid range index\n * @returns Minimum index or null if either index is null\n */\n static minOrNull(index1, index2) {\n if (index1 == null || index2 == null) {\n return null;\n }\n return Math.min(index1, index2);\n }\n\n /**\n * Returns the maximum value between 2 range indexes or null if at least 1 is null\n * @param index1 First grid range index\n * @param index2 Second grid range index\n * @returns Maximum index or null if either index is null\n */\n static maxOrNull(index1, index2) {\n if (index1 == null || index2 == null) {\n return null;\n }\n return Math.max(index1, index2);\n }\n\n /**\n * Consolidate the passed in ranges to the minimum set, merging overlapping ranges.\n * @param ranges The ranges to consolidate\n * @returns Consolidated ranges\n */\n static consolidate(ranges) {\n var result = ranges.slice();\n var wasModified = true;\n while (wasModified) {\n wasModified = false;\n for (var i = 0; i < result.length && !wasModified; i += 1) {\n var range = result[i];\n for (var j = result.length - 1; j > i; j -= 1) {\n var other = result[j];\n\n // If one contains the other, we can just keep the bigger one\n if (range.contains(other)) {\n result.splice(j, 1);\n } else if (other.contains(range)) {\n wasModified = true;\n result[i] = other;\n result.splice(j, 1);\n break;\n } else if (range.startRow === other.startRow && range.endRow === other.endRow) {\n if (range.touches(other)) {\n // If the start/end rows match, and columns touch, consolidate\n var {\n startRow,\n endRow\n } = range;\n var startColumn = GridRange.minOrNull(range.startColumn, other.startColumn);\n var endColumn = GridRange.maxOrNull(range.endColumn, other.endColumn);\n wasModified = true;\n result[i] = new GridRange(startColumn, startRow, endColumn, endRow);\n result.splice(j, 1);\n break;\n }\n } else if (range.startColumn === other.startColumn && range.endColumn === other.endColumn) {\n if (range.touches(other)) {\n // If the start/end rows match, and columns touch, consolidate\n var {\n startColumn: _startColumn,\n endColumn: _endColumn\n } = range;\n var _startRow = GridRange.minOrNull(range.startRow, other.startRow);\n var _endRow = GridRange.maxOrNull(range.endRow, other.endRow);\n wasModified = true;\n result[i] = new GridRange(_startColumn, _startRow, _endColumn, _endRow);\n result.splice(j, 1);\n break;\n }\n }\n }\n }\n }\n return result;\n }\n\n /**\n * Checks if the 1-D ranges between 2 index pairs overlap or are continuous.\n * For example ranges [0, 1] and [2, 3] are continuous and will return true.\n * [0, 1] and [1, 3] overlap and return true.\n * [0, 1] and [3, 4] do not overlap and have a gap so this will return false.\n * @param start1 Start of 1st range\n * @param end1 End of 1st range\n * @param start2 Start of 2nd range\n * @param end2 End of 2nd range\n * @returns True if the ranges overlap or touch, else false\n */\n static isAxisRangeTouching(start1, end1, start2, end2) {\n if (start1 == null) {\n if (end1 == null) {\n return true;\n }\n if (start2 == null) {\n return true;\n }\n return start2 <= end1 + 1;\n }\n if (end1 == null) {\n if (end2 == null) {\n return true;\n }\n return end2 >= start1 - 1;\n }\n if (start2 == null) {\n if (end2 == null) {\n return true;\n }\n return start1 <= end2 + 1;\n }\n if (end2 == null) {\n return end1 >= start2 - 1;\n }\n if (start2 >= start1 - 1) {\n return start2 <= end1 + 1;\n }\n return end2 >= start1 - 1;\n }\n\n /**\n * Checks if 2 arrays of ranges are the same ranges\n * @param ranges1 First array of ranges\n * @param ranges2 Second array of ranges\n * @returns True if the arrays contain the same ranges in the same order\n */\n static rangeArraysEqual(ranges1, ranges2) {\n if (ranges1 === ranges2) {\n return true;\n }\n if (ranges1 == null || ranges2 == null || ranges1.length !== ranges2.length) {\n return false;\n }\n for (var i = 0; i < ranges1.length; i += 1) {\n if (!ranges1[i].equals(ranges2[i])) {\n return false;\n }\n }\n return true;\n }\n\n /**\n * Get the intersection (overlapping area) of two ranges\n * @param range One range to check for the intersection\n * @param otherRange The other range to check for the intersection\n * @returns Intersection of the two ranges. If they do not intersect, returns `null`.\n */\n static intersection(range, otherRange) {\n if (range.equals(otherRange)) {\n return range;\n }\n var {\n startColumn,\n startRow,\n endColumn,\n endRow\n } = range;\n startColumn = startColumn != null && otherRange.startColumn != null ? Math.max(startColumn, otherRange.startColumn) : startColumn !== null && startColumn !== void 0 ? startColumn : otherRange.startColumn;\n endColumn = endColumn != null && otherRange.endColumn != null ? Math.min(endColumn, otherRange.endColumn) : endColumn !== null && endColumn !== void 0 ? endColumn : otherRange.endColumn;\n startRow = startRow != null && otherRange.startRow != null ? Math.max(startRow, otherRange.startRow) : startRow !== null && startRow !== void 0 ? startRow : otherRange.startRow;\n endRow = endRow != null && otherRange.endRow != null ? Math.min(endRow, otherRange.endRow) : endRow !== null && endRow !== void 0 ? endRow : otherRange.endRow;\n if (startColumn != null && startColumn > (endColumn !== null && endColumn !== void 0 ? endColumn : -1) || startRow != null && startRow > (endRow !== null && endRow !== void 0 ? endRow : -1)) {\n return null;\n }\n return new GridRange(startColumn, startRow, endColumn, endRow);\n }\n\n /**\n * Subtracts 1 range from another\n * @param range The range to be subtracted from\n * @param subtractRange The range to subtract from within this range\n * @returns The ranges needed to represent the remaining\n */\n static subtractFromRange(range, subtractRange) {\n var result = [];\n\n // Make it a little easier by finding only the part the subtraction range intersects\n var subtract = GridRange.intersection(range, subtractRange);\n if (subtract == null) {\n return [range];\n }\n\n // Go through each of the quadrants for deselection, there can be up to 4\n // Top quadrant (above the subtracted area)\n if (subtract.startRow != null && (range.startRow == null || range.startRow < subtract.startRow)) {\n result.push(new GridRange(range.startColumn, range.startRow, range.endColumn, subtract.startRow - 1));\n }\n\n // middle left\n if (subtract.startColumn != null && (range.startColumn == null || range.startColumn < subtract.startColumn)) {\n result.push(new GridRange(range.startColumn, subtract.startRow, subtract.startColumn - 1, subtract.endRow));\n }\n\n // middle right\n if (subtract.endColumn != null && (range.endColumn == null || range.endColumn > subtract.endColumn)) {\n result.push(new GridRange(subtract.endColumn + 1, subtract.startRow, range.endColumn, subtract.endRow));\n }\n\n // Bottom quadrant\n if (subtract.endRow != null && (range.endRow == null || range.endRow > subtract.endRow)) {\n result.push(new GridRange(range.startColumn, subtract.endRow + 1, range.endColumn, range.endRow));\n }\n return result;\n }\n\n /**\n * Subtract a range from multiple ranges\n * @param ranges The ranges to be subtracted from\n * @param subtractRange The range to subtract from within these ranges\n * @returns The ranges needed to represent the remaining\n */\n static subtractFromRanges(ranges, subtractRange) {\n var result = [];\n for (var i = 0; i < ranges.length; i += 1) {\n result.push(...GridRange.subtractFromRange(ranges[i], subtractRange));\n }\n return result;\n }\n\n /**\n * Subtract multiple ranges from multiple ranges\n * @param ranges The ranges to be subtracted from\n * @param subtractRanges The ranges to subtract from within these ranges\n * @returns The ranges needed to represent the remaining\n */\n static subtractRangesFromRanges(ranges, subtractRanges) {\n var result = [...ranges];\n for (var i = 0; i < subtractRanges.length; i += 1) {\n result = GridRange.subtractFromRanges(result, subtractRanges[i]);\n }\n return result;\n }\n\n /**\n * Test if a given range is bounded (all values are non-null)\n * @param range The range to test\n * @returns True if this range is bounded, false otherwise\n */\n static isBounded(range) {\n return range.startRow != null && range.startColumn != null && range.endRow != null && range.endColumn != null;\n }\n\n /**\n * Converts any GridRange passed in that is a full row or column selection to be bound\n * to the `columnCount` and `rowCount` passed in\n *\n * @param range The range to get the bounded range of\n * @param columnCount The number of columns\n * @param rowCount The number of rows\n * @returns The passed in GridRange with any null values filled in\n */\n static boundedRange(range, columnCount, rowCount) {\n var _range$startColumn, _range$startRow, _range$endColumn, _range$endRow;\n if (GridRange.isBounded(range)) {\n return range;\n }\n return new GridRange((_range$startColumn = range.startColumn) !== null && _range$startColumn !== void 0 ? _range$startColumn : 0, (_range$startRow = range.startRow) !== null && _range$startRow !== void 0 ? _range$startRow : 0, (_range$endColumn = range.endColumn) !== null && _range$endColumn !== void 0 ? _range$endColumn : columnCount - 1, (_range$endRow = range.endRow) !== null && _range$endRow !== void 0 ? _range$endRow : rowCount - 1);\n }\n\n /**\n * Converts the GridRanges passed in to be bound to the `columnCount` and `rowCount` passed in\n *\n * @param ranges The ranges to get the bounded ranges of\n * @param columnCount The number of columns\n * @param rowCount The number of rows\n * @returns The passed in GridRange with any null values filled in\n */\n static boundedRanges(ranges, columnCount, rowCount) {\n return ranges.map(r => GridRange.boundedRange(r, columnCount, rowCount));\n }\n\n /**\n * Offsets a GridRange by the specified amount in the x and y directions\n *\n * @param range The range to offset\n * @param columnOffset The number of columns to offset\n * @param rowOffset The number of rows to offset\n * @returns The new grid range offset from the original\n */\n static offset(range, columnOffset, rowOffset) {\n return new GridRange(range.startColumn != null ? range.startColumn + columnOffset : null, range.startRow != null ? range.startRow + rowOffset : null, range.endColumn != null ? range.endColumn + columnOffset : null, range.endRow != null ? range.endRow + rowOffset : null);\n }\n\n /**\n * Get the next cell given the selected ranges and the current cell\n * @param ranges The selected bounded ranges within the grid\n * @param column The cursor column, or null if none focused\n * @param row The cursor row, or null if none focused\n * @param direction The direction in which to select next\n * @returns The next cell to focus, or null if there should be no more focus\n */\n static nextCell(ranges) {\n var column = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n var row = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;\n var direction = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : GridRange.SELECTION_DIRECTION.DOWN;\n if (ranges.length === 0) {\n return null;\n }\n var rangeIndex = -1;\n if (column != null && row != null) {\n rangeIndex = ranges.findIndex(r => r.containsCell(column, row));\n if (rangeIndex >= 0) {\n var range = ranges[rangeIndex];\n var nextCell = range.nextCell(column, row, direction);\n if (nextCell != null) {\n return nextCell;\n }\n }\n }\n\n // Otherwise go to the start of the next range (could be same range if only one range)\n switch (direction) {\n case GridRange.SELECTION_DIRECTION.DOWN:\n case GridRange.SELECTION_DIRECTION.RIGHT:\n {\n var nextRangeIndex = rangeIndex < ranges.length - 1 ? rangeIndex + 1 : 0;\n var nextRange = ranges[nextRangeIndex];\n return nextRange.startCell(direction);\n }\n case GridRange.SELECTION_DIRECTION.LEFT:\n case GridRange.SELECTION_DIRECTION.UP:\n {\n var _nextRangeIndex = rangeIndex > 0 ? rangeIndex - 1 : ranges.length - 1;\n var _nextRange = ranges[_nextRangeIndex];\n return _nextRange.startCell(direction);\n }\n default:\n throw new Error(\"Invalid direction: \".concat(direction));\n }\n }\n\n /**\n * Count the number of cells in the provided grid ranges\n * @param ranges The ranges to count the rows of\n * @returns The number of cells in the ranges, or `NaN` if any of the ranges were unbounded\n */\n static cellCount(ranges) {\n return ranges.reduce((cellCount, range) => {\n var _range$endRow2, _range$startRow2, _range$endColumn2, _range$startColumn2;\n return cellCount + (((_range$endRow2 = range.endRow) !== null && _range$endRow2 !== void 0 ? _range$endRow2 : NaN) - ((_range$startRow2 = range.startRow) !== null && _range$startRow2 !== void 0 ? _range$startRow2 : NaN) + 1) * (((_range$endColumn2 = range.endColumn) !== null && _range$endColumn2 !== void 0 ? _range$endColumn2 : NaN) - ((_range$startColumn2 = range.startColumn) !== null && _range$startColumn2 !== void 0 ? _range$startColumn2 : NaN) + 1);\n }, 0);\n }\n\n /**\n * Count the number of rows in the provided grid ranges\n * @param ranges The ranges to count the rows of\n * @returns The number of rows in the ranges, or `NaN` if any of the ranges were unbounded\n */\n static rowCount(ranges) {\n return ranges.reduce((rowCount, range) => {\n var _range$endRow3, _range$startRow3;\n return rowCount + ((_range$endRow3 = range.endRow) !== null && _range$endRow3 !== void 0 ? _range$endRow3 : NaN) - ((_range$startRow3 = range.startRow) !== null && _range$startRow3 !== void 0 ? _range$startRow3 : NaN) + 1;\n }, 0);\n }\n\n /**\n * Count the number of columns in the provided grid ranges\n * @param ranges The ranges to count the columns of\n * @returns The number of columns in the ranges, or `NaN` if any of the ranges were unbounded\n */\n static columnCount(ranges) {\n return ranges.reduce((columnCount, range) => {\n var _range$endColumn3, _range$startColumn3;\n return columnCount + ((_range$endColumn3 = range.endColumn) !== null && _range$endColumn3 !== void 0 ? _range$endColumn3 : NaN) - ((_range$startColumn3 = range.startColumn) !== null && _range$startColumn3 !== void 0 ? _range$startColumn3 : NaN) + 1;\n }, 0);\n }\n\n /**\n * Check if the provided ranges contain the provided cell\n * @param ranges The ranges to check\n * @param column The column index\n * @param row The row index\n * @returns True if the cell is within the provided ranges, false otherwise.\n */\n static containsCell(ranges, column, row) {\n for (var i = 0; i < ranges.length; i += 1) {\n var range = ranges[i];\n if (range.containsCell(column, row)) {\n return true;\n }\n }\n return false;\n }\n\n /**\n * Iterate through each cell in the provided ranges\n * @param ranges The ranges to iterate through\n * @param callback The callback to execute. `index` is the index within that range\n * @param direction The direction to iterate in\n */\n static forEachCell(ranges, callback) {\n var direction = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : GridRange.SELECTION_DIRECTION.RIGHT;\n for (var i = 0; i < ranges.length; i += 1) {\n ranges[i].forEach(callback, direction);\n }\n }\n constructor(startColumn, startRow, endColumn, endRow) {\n _defineProperty(this, \"startColumn\", void 0);\n _defineProperty(this, \"startRow\", void 0);\n _defineProperty(this, \"endColumn\", void 0);\n _defineProperty(this, \"endRow\", void 0);\n this.startColumn = startColumn;\n this.startRow = startRow;\n this.endColumn = endColumn;\n this.endRow = endRow;\n }\n\n /**\n * Checks if the provided range is equivalent to this range (same start and end column/row indexes)\n * @param other Grid range to check against\n * @returns True if the ranges cover the same area\n */\n equals(other) {\n return this.startColumn === other.startColumn && this.startRow === other.startRow && this.endColumn === other.endColumn && this.endRow === other.endRow;\n }\n\n /**\n * Checks if this GridRange contains another range\n * @param other The range to check\n * @returns True if this GridRange completely contains `other`\n * */\n contains(other) {\n return (this.startColumn == null || other.startColumn != null && this.startColumn <= other.startColumn) && (this.startRow == null || other.startRow != null && this.startRow <= other.startRow) && (this.endColumn == null || other.endColumn != null && this.endColumn >= other.endColumn) && (this.endRow == null || other.endRow != null && this.endRow >= other.endRow);\n }\n\n /**\n * Check if the provided cell is in this range\n * @param column The column to check\n * @param row The row to check\n * @returns True if this cell is within this range\n */\n containsCell(column, row) {\n if (column == null || row == null) {\n return false;\n }\n return (this.startColumn == null || this.startColumn <= column) && (this.endColumn == null || this.endColumn >= column) && (this.startRow == null || this.startRow <= row) && (this.endRow == null || this.endRow >= row);\n }\n\n /**\n * Check if the provided range touches (or overlaps) this GridRange\n * Effectively checks if the 2 ranges could be represented by 1 continuous range\n * @param other The range to check\n * @returns True if this GridRange touches `other`\n * */\n touches(other) {\n return GridRange.isAxisRangeTouching(this.startRow, this.endRow, other.startRow, other.endRow) && GridRange.isAxisRangeTouching(this.startColumn, this.endColumn, other.startColumn, other.endColumn);\n }\n\n /**\n * Subtracts a range from this range\n * @param other The range to deselect from within this range\n * @returns The ranges needed to represent the remaining\n */\n subtract(other) {\n return GridRange.subtractFromRange(this, other);\n }\n\n /**\n * Get the first cell in this range. Throws if this range is unbounded.\n *\n * @param direction The direction to get the starting cell in. Defaults to DOWN\n * @returns The first cell in this range in the direction specified\n */\n startCell() {\n var direction = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : GridRange.SELECTION_DIRECTION.DOWN;\n if (!GridRange.isBounded(this)) {\n throw new Error('Cannot get the startCell of an unbounded range');\n }\n switch (direction) {\n case GridRange.SELECTION_DIRECTION.DOWN:\n case GridRange.SELECTION_DIRECTION.RIGHT:\n return {\n column: this.startColumn,\n row: this.startRow\n };\n case GridRange.SELECTION_DIRECTION.LEFT:\n case GridRange.SELECTION_DIRECTION.UP:\n {\n return {\n column: this.endColumn,\n row: this.endRow\n };\n }\n default:\n throw new Error(\"Invalid direction: \".concat(direction));\n }\n }\n\n /**\n * Get the next cell in the direction specified. Throws if this range is unbounded.\n * If already at the bounds of the range in that direction, wrap to the next column or row\n * If at the end of the entire range, return null\n * If outside of the range, returns the next cell closest within this range.\n *\n * @param column The cursor column\n * @param row The cursor row\n * @param direction The direction to go in\n * @returns The next cell in the direction specified, or `null` if at the end of the range\n */\n nextCell(column, row, direction) {\n if (!GridRange.isBounded(this)) {\n throw new Error('Bounded range required');\n }\n if (column == null || row == null) {\n throw new Error('Require a non-null cursor');\n }\n var {\n startColumn,\n endColumn,\n startRow,\n endRow\n } = this;\n switch (direction) {\n case GridRange.SELECTION_DIRECTION.DOWN:\n if (row < endRow) {\n return {\n column,\n row: Math.max(row + 1, startRow)\n };\n }\n if (column < endColumn) {\n return {\n column: Math.max(column + 1, startColumn),\n row: startRow\n };\n }\n break;\n case GridRange.SELECTION_DIRECTION.UP:\n if (row > startRow) {\n return {\n column,\n row: Math.min(row - 1, endRow)\n };\n }\n if (column > startColumn) {\n return {\n column: Math.min(column - 1, endColumn),\n row: endRow\n };\n }\n break;\n case GridRange.SELECTION_DIRECTION.RIGHT:\n if (column < endColumn) {\n return {\n column: Math.max(column + 1, startColumn),\n row\n };\n }\n if (row < endRow) {\n return {\n column: startColumn,\n row: Math.max(row + 1, startRow)\n };\n }\n break;\n case GridRange.SELECTION_DIRECTION.LEFT:\n if (column > startColumn) {\n return {\n column: Math.min(column - 1, endColumn),\n row\n };\n }\n if (row > startRow) {\n return {\n column: endColumn,\n row: Math.min(row - 1, endRow)\n };\n }\n break;\n default:\n throw new Error(\"Invalid direction: \".concat(direction));\n }\n return null;\n }\n\n /**\n * Iterate through each cell in the range\n * @param callback Callback to execute. `index` is the index within this range\n * @param direction The direction to iterate in\n */\n forEach(callback) {\n var direction = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : GridRange.SELECTION_DIRECTION.RIGHT;\n var i = 0;\n var {\n column: c,\n row: r\n } = this.startCell(direction);\n while (c != null && r != null) {\n var _this$nextCell;\n callback(c, r, i);\n i += 1;\n ({\n column: c,\n row: r\n } = (_this$nextCell = this.nextCell(c, r, direction)) !== null && _this$nextCell !== void 0 ? _this$nextCell : {});\n }\n }\n}\n_defineProperty(GridRange, \"SELECTION_DIRECTION\", SELECTION_DIRECTION);\nexport default GridRange;\n//# sourceMappingURL=GridRange.js.map","export function isAxisRange(range) {\n return Array.isArray(range) && range.length === 2 && (range[0] === null || typeof range[0] === 'number') && (range[1] === null || typeof range[1] === 'number');\n}\nexport function assertAxisRange(range) {\n if (!isAxisRange(range)) {\n throw new Error(\"Expected axis range. Received: \".concat(range));\n }\n}\nexport function isBoundedAxisRange(range) {\n return isAxisRange(range) && range[0] != null && range[1] != null;\n}\nexport function assertBoundedAxisRange(range) {\n if (!isBoundedAxisRange(range)) {\n throw new Error(\"Expected bounded axis range. Received: \".concat(range));\n }\n}\n//# sourceMappingURL=GridAxisRange.js.map","function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }\nfunction _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }\nfunction _toPropertyKey(t) { var i = _toPrimitive(t, \"string\"); return \"symbol\" == typeof i ? i : i + \"\"; }\nfunction _toPrimitive(t, r) { if (\"object\" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || \"default\"); if (\"object\" != typeof i) return i; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (\"string\" === r ? String : Number)(t); }\nimport clamp from 'lodash.clamp';\nimport { find as linkifyFind } from 'linkifyjs';\nimport { EMPTY_ARRAY, getOrThrow } from '@deephaven/utils';\nimport GridRange from \"./GridRange.js\";\nimport { isBoundedAxisRange } from \"./GridAxisRange.js\";\nimport { isExpandableGridModel } from \"./ExpandableGridModel.js\";\nexport function isLinkToken(token) {\n return (token === null || token === void 0 ? void 0 : token.href) !== undefined;\n}\nexport class GridUtils {\n /**\n * Get the GridPoint for the coordinates provided\n * @param x The grid x coordinate\n * @param y The grid y coordinate\n * @param metrics The grid metrics\n * @returns The GridPoint including the column/row information\n */\n static getGridPointFromXY(x, y, metrics) {\n var column = GridUtils.getColumnAtX(x, metrics);\n var row = GridUtils.getRowAtY(y, metrics);\n var columnHeaderDepth = GridUtils.getColumnHeaderDepthAtY(y, metrics);\n return {\n x,\n y,\n row,\n column,\n columnHeaderDepth\n };\n }\n static getCellInfoFromXY(x, y, metrics) {\n var {\n row,\n column\n } = GridUtils.getGridPointFromXY(x, y, metrics);\n var {\n allColumnWidths,\n allRowHeights,\n allColumnXs,\n allRowYs,\n modelColumns,\n modelRows\n } = metrics;\n var modelRow = row !== null ? modelRows.get(row) : null;\n var modelColumn = column !== null ? modelColumns.get(column) : null;\n var left = column !== null ? allColumnXs.get(column) : null;\n var top = row !== null ? allRowYs.get(row) : null;\n var columnWidth = column !== null ? allColumnWidths.get(column) : null;\n var rowHeight = row !== null ? allRowHeights.get(row) : null;\n return {\n row,\n column,\n modelRow: modelRow !== null && modelRow !== void 0 ? modelRow : null,\n modelColumn: modelColumn !== null && modelColumn !== void 0 ? modelColumn : null,\n left: left !== null && left !== void 0 ? left : null,\n top: top !== null && top !== void 0 ? top : null,\n columnWidth: columnWidth !== null && columnWidth !== void 0 ? columnWidth : null,\n rowHeight: rowHeight !== null && rowHeight !== void 0 ? rowHeight : null\n };\n }\n static getColumnHeaderDepthAtY(y, metrics) {\n var row = GridUtils.getRowAtY(y, metrics);\n var {\n columnHeaderHeight,\n columnHeaderMaxDepth\n } = metrics;\n if (row === null && y <= columnHeaderHeight * columnHeaderMaxDepth) {\n return clamp(columnHeaderMaxDepth - Math.ceil(y / columnHeaderHeight), 0, columnHeaderMaxDepth - 1);\n }\n return undefined;\n }\n\n /**\n * Iterate through each floating item at the start and call a callback, returning the first result\n * @param start The count of floating items at the start\n * @param total The total number of items\n * @param callback Function to call for each item\n * @returns The result from the callback\n */\n static iterateFloatingStart(start, total, callback) {\n for (var i = 0; i < start && i < total; i += 1) {\n var result = callback(i);\n if (result !== undefined) {\n return result;\n }\n }\n return undefined;\n }\n\n /**\n * Iterate through floating items at the end. Iterates in increasing order.\n * @param end The count of floating items at the end\n * @param total The total number of items\n * @param callback Function to call for each item\n * @returns The result from the callback\n */\n static iterateFloatingEnd(end, total, callback) {\n for (var i = 0; i < end && total - (end - i) >= 0; i += 1) {\n var result = callback(total - (end - i));\n if (result !== undefined) {\n return result;\n }\n }\n return undefined;\n }\n\n /**\n * Iterate through all floating items in increasing order, starting with the top items.\n * @param start Count of start floating rows, e.g. floatingTopRowCount\n * @param end Count of end floating rows, e.g. floatingBottomRowCount\n * @param total Total number of items\n * @param callback Callback called for each value, stopping the iterating and returning the value if one is returned\n */\n static iterateFloating(start, end, total, callback) {\n var result = GridUtils.iterateFloatingStart(start, total, callback);\n if (result !== undefined) {\n return result;\n }\n return GridUtils.iterateFloatingEnd(end, total, callback);\n }\n\n /**\n * Iterate through all items in one dimension on the grid - first floating, then visible.\n * Call the callback for each item, break if a result is returned and return that result.\n * @param visibleStart Index of the start of the visible viewport\n * @param visibleEnd Index of the end of the visible viewport\n * @param floatingStartCount Number of items floating at the start\n * @param floatingEndCount Number of items floating at the end\n * @param totalCount Total number of items\n * @param callback Callback to call for each item\n * @returns The first result from the callback called, or undefined\n */\n static iterateAllItems(visibleStart, visibleEnd, floatingStartCount, floatingEndCount, totalCount, callback) {\n var visibleStartIndex = Math.max(visibleStart, floatingStartCount);\n var visibleEndIndex = Math.min(visibleEnd, totalCount - floatingEndCount - 1);\n var result = GridUtils.iterateFloating(floatingStartCount, floatingEndCount, totalCount, callback);\n if (result !== undefined) {\n return result;\n }\n for (var i = visibleStartIndex; i <= visibleEndIndex; i += 1) {\n result = callback(i);\n if (result !== undefined) {\n return result;\n }\n }\n return undefined;\n }\n\n /**\n * Check if the coordinate is within the item specified in this dimension\n * @param itemIndex Index of the item to check\n * @param itemCoordinatess Coordinate of all items in this dimension\n * @param itemSizes Size of all items in this dimension\n * @param coordinate The coordinate to check\n * @returns True if the coordinate is within the item specified, false otherwise\n */\n static isInItem(itemIndex, itemCoordinates, itemSizes, coordinate) {\n var _itemCoordinates$get, _itemSizes$get;\n var itemX = (_itemCoordinates$get = itemCoordinates.get(itemIndex)) !== null && _itemCoordinates$get !== void 0 ? _itemCoordinates$get : 0;\n var itemSize = (_itemSizes$get = itemSizes.get(itemIndex)) !== null && _itemSizes$get !== void 0 ? _itemSizes$get : 0;\n return itemX <= coordinate && coordinate <= itemX + itemSize;\n }\n\n /**\n * Get the Index of the item at the provided offset\n * @param offset Coordinate of the offset to get the item of\n * @param itemCount The total count of items\n * @param floatingStart Count of floating items at the start\n * @param floatingEnd Count of floating items at the end\n * @param items Index of all items\n * @param itemCoordinates The coordinate of each item\n * @param itemSizes The size of each item\n * @returns The item index, or null if no item matches\n */\n static getItemAtOffset(offset, itemCount, floatingStart, floatingEnd, items, itemCoordinates, itemSizes) {\n var ignoreFloating = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : false;\n var floatingItem = ignoreFloating ? undefined : GridUtils.iterateFloating(floatingStart, floatingEnd, itemCount, item => {\n if (GridUtils.isInItem(item, itemCoordinates, itemSizes, offset)) {\n return item;\n }\n return undefined;\n });\n if (!ignoreFloating && floatingItem !== undefined) {\n return floatingItem;\n }\n for (var i = 0; i < items.length; i += 1) {\n var item = items[i];\n if (GridUtils.isInItem(item, itemCoordinates, itemSizes, offset)) {\n return item;\n }\n }\n return null;\n }\n\n /**\n * Get the index of the column at the specified x coordinate\n * @param x Coordinate to get the item of\n * @param metrics Grid metrics\n * @returns Index of the column at that coordinate, or null if no column matches\n */\n static getColumnAtX(x, metrics) {\n var ignoreFloating = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n var {\n columnCount,\n floatingLeftColumnCount,\n floatingRightColumnCount,\n visibleColumns,\n allColumnXs,\n allColumnWidths,\n gridX\n } = metrics;\n if (x < gridX) {\n return null;\n }\n return this.getItemAtOffset(x - gridX, columnCount, floatingLeftColumnCount, floatingRightColumnCount, visibleColumns, allColumnXs, allColumnWidths, ignoreFloating);\n }\n\n /**\n * Get the index of the row at the specified y coordinate\n * @param y Coordinate to get the item of\n * @param metrics Grid metrics\n * @returns Index of the row at that coordinate, or null if no row matches\n */\n static getRowAtY(y, metrics) {\n var {\n floatingTopRowCount,\n floatingBottomRowCount,\n rowCount,\n visibleRows,\n allRowYs,\n allRowHeights,\n gridY\n } = metrics;\n if (y < gridY) {\n return null;\n }\n return this.getItemAtOffset(y - gridY, rowCount, floatingTopRowCount, floatingBottomRowCount, visibleRows, allRowYs, allRowHeights);\n }\n\n /**\n * Iterate backward through the visible items until a shown item is hit\n * @param startIndex The index to start from\n * @param modelIndexes The mapping of model indexes\n * @param visibleItems The visible items\n * @param userSizes The user set sizes\n * @returns Index of the next visible item, or null if no more are visible\n */\n static getNextShownItem(startIndex, modelIndexes, visibleItems, userSizes) {\n var visibleItemIndex = visibleItems.findIndex(value => value === startIndex) || 0;\n visibleItemIndex -= 1;\n while (visibleItemIndex != null && visibleItemIndex >= 0) {\n var item = visibleItems[visibleItemIndex];\n var modelIndex = modelIndexes.get(item);\n if (modelIndex != null && userSizes.get(modelIndex) !== 0) {\n return item;\n }\n visibleItemIndex -= 1;\n }\n return null;\n }\n\n /**\n * Iterate backward through the visible columns until a shown column is hit\n * @param columnIndex The column index to start iterating backward from\n * @param metrics The GridMetricCalculator metrics\n * @returns Index of the next visible item, or null if no more are visible\n */\n static getNextShownColumn(startIndex, metrics) {\n var {\n modelColumns,\n visibleColumns,\n userColumnWidths\n } = metrics;\n return GridUtils.getNextShownItem(startIndex, modelColumns, visibleColumns, userColumnWidths);\n }\n\n /**\n * Iterate backward through the visible rows until a shown row is hit\n * @param rowIndex The row index to start iterating backward from\n * @param metrics The GridMetricCalculator metrics\n * @returns Index of the next visible item, or null if no more are visible\n */\n static getNextShownRow(startIndex, metrics) {\n var {\n modelRows,\n visibleRows,\n userRowHeights\n } = metrics;\n return GridUtils.getNextShownItem(startIndex, modelRows, visibleRows, userRowHeights);\n }\n\n /**\n * Check if a separator exists between a column and the next column at a given depth.\n * A separator exists if adjacent columns have different header text at the specified depth.\n *\n * @param model The grid model\n * @param depth The header depth to check at\n * @param columnIndex The current model column index\n * @param nextColumnIndex The next model column index (undefined for last column)\n * @returns true if a separator should be shown, false otherwise\n */\n static hasColumnSeparatorAtDepth(model, depth, columnIndex, nextColumnIndex) {\n if (depth == null || columnIndex == null) {\n return false;\n }\n\n // Always show separator for the last column\n if (nextColumnIndex == null) {\n return true;\n }\n\n // A separator exists if adjacent columns have different header text at this depth\n return model.textForColumnHeader(columnIndex, depth) !== model.textForColumnHeader(nextColumnIndex, depth);\n }\n\n /**\n * Gets the column index if the x/y coordinates provided are close enough to the separator, otherwise null\n * @param x Mouse x coordinate\n * @param y Mouse y coordinate\n * @param metrics The grid metrics\n * @param theme The grid theme with potential user overrides\n * @param model The grid model\n * @returns Index of the column separator at the coordinates provided, or null if none match\n */\n static getColumnSeparatorIndex(x, y, metrics, theme, model) {\n var {\n rowHeaderWidth,\n columnHeaderHeight,\n floatingColumns,\n floatingLeftWidth,\n visibleColumns,\n allColumnXs,\n allColumnWidths,\n columnHeaderMaxDepth,\n modelColumns\n } = metrics;\n var {\n allowColumnResize,\n headerSeparatorHandleSize\n } = theme;\n if (columnHeaderMaxDepth * columnHeaderHeight < y || !allowColumnResize || headerSeparatorHandleSize <= 0) {\n return null;\n }\n var gridX = x - rowHeaderWidth;\n var halfSeparatorSize = headerSeparatorHandleSize * 0.5;\n var depth = GridUtils.getColumnHeaderDepthAtY(y, metrics);\n\n // Iterate through the floating columns first since they're on top\n var isPreviousColumnHidden = false;\n for (var i = floatingColumns.length - 1; i >= 0; i -= 1) {\n var _allColumnXs$get, _allColumnWidths$get;\n var column = floatingColumns[i];\n var columnX = (_allColumnXs$get = allColumnXs.get(column)) !== null && _allColumnXs$get !== void 0 ? _allColumnXs$get : 0;\n var columnWidth = (_allColumnWidths$get = allColumnWidths.get(column)) !== null && _allColumnWidths$get !== void 0 ? _allColumnWidths$get : 0;\n var isColumnHidden = columnWidth === 0;\n if (!isPreviousColumnHidden || !isColumnHidden) {\n var midX = columnX + columnWidth;\n if (isColumnHidden) {\n midX += halfSeparatorSize;\n } else if (isPreviousColumnHidden) {\n midX -= halfSeparatorSize;\n }\n var minX = midX - halfSeparatorSize;\n var maxX = midX + halfSeparatorSize;\n if (minX <= gridX && gridX <= maxX && GridUtils.hasColumnSeparatorAtDepth(model, depth, modelColumns.get(column), modelColumns.get(column + 1))) {\n return column;\n }\n isPreviousColumnHidden = isColumnHidden;\n }\n }\n\n // Iterate backward so that you can reveal hidden columns properly\n isPreviousColumnHidden = false;\n for (var _i = visibleColumns.length - 1; _i >= 0; _i -= 1) {\n var _allColumnXs$get2, _allColumnWidths$get2;\n var _column = visibleColumns[_i];\n var _columnX = (_allColumnXs$get2 = allColumnXs.get(_column)) !== null && _allColumnXs$get2 !== void 0 ? _allColumnXs$get2 : 0;\n var _columnWidth = (_allColumnWidths$get2 = allColumnWidths.get(_column)) !== null && _allColumnWidths$get2 !== void 0 ? _allColumnWidths$get2 : 0;\n var _isColumnHidden = _columnWidth === 0;\n\n // If this column is under the floating columns \"layer\". Terminate early.\n if (_columnX < floatingLeftWidth - _columnWidth) {\n return null;\n }\n if (!isPreviousColumnHidden || !_isColumnHidden) {\n var _midX = _columnX + _columnWidth;\n if (_isColumnHidden) {\n _midX += halfSeparatorSize;\n } else if (isPreviousColumnHidden) {\n _midX -= halfSeparatorSize;\n }\n var _minX = _midX - halfSeparatorSize;\n var _maxX = _midX + halfSeparatorSize;\n if (_minX <= gridX && gridX <= _maxX && GridUtils.hasColumnSeparatorAtDepth(model, depth, modelColumns.get(_column), modelColumns.get(_column + 1))) {\n return _column;\n }\n isPreviousColumnHidden = _isColumnHidden;\n }\n }\n return null;\n }\n\n /**\n * Check if the item specified is hidden\n * @param itemIndex Index of the item to check\n * @param visibleSizes Sizes of all visible items\n * @returns True if the item is hidden, false otherwise\n */\n static isItemHidden(itemIndex, visibleSizes) {\n return visibleSizes.get(itemIndex) === 0;\n }\n\n /**\n * Check if the column specified is hidden\n * @param columnIndex Index of the column to check\n * @param metrics Grid metrics\n * @returns True if the column is hidden, false otherwise\n */\n static isColumnHidden(columnIndex, metrics) {\n var {\n allColumnWidths\n } = metrics;\n return GridUtils.isItemHidden(columnIndex, allColumnWidths);\n }\n\n /**\n * Check if the provided row is a floating row\n * @param row The row index to check\n * @param metrics The grid metrics to check against\n * @returns True if it's a floating row, false otherwise\n */\n static isFloatingRow(row, metrics) {\n if (row == null) {\n return false;\n }\n var {\n floatingTopRowCount,\n floatingBottomRowCount,\n rowCount\n } = metrics;\n return row < floatingTopRowCount || row >= rowCount - floatingBottomRowCount;\n }\n\n /**\n * Check if the provided column is a floating column\n * @param column The column index to check\n * @param metrics The grid metrics to check against\n * @returns True if it's a floating column, false otherwise\n */\n static isFloatingColumn(column, metrics) {\n if (column == null) {\n return false;\n }\n var {\n floatingLeftColumnCount,\n floatingRightColumnCount,\n columnCount\n } = metrics;\n return column < floatingLeftColumnCount || column >= columnCount - floatingRightColumnCount;\n }\n\n /**\n * Get all the items that are hidden under the same Index\n * E.g. If columns are 1, 2, 3, 4, 5, and column 2, 3, 4 are hidden, and we check for item 4, the return will be [2, 3, 4]\n * @param itemIndex Index of the item to start at\n * @param visibleSizes Visible size map\n * @param visibleItems Visible items\n * @returns Array of items that are hidden\n */\n static getHiddenItems(itemIndex, visibleSizes, visibleItems) {\n if (!GridUtils.isItemHidden(itemIndex, visibleSizes)) {\n return [];\n }\n var hiddenItems = [itemIndex];\n var visibleItemIndex = visibleItems.findIndex(value => value === itemIndex);\n for (var i = visibleItemIndex - 1; i >= 0; i -= 1) {\n var item = visibleItems[i];\n if (!GridUtils.isItemHidden(item, visibleSizes)) {\n break;\n }\n hiddenItems.push(item);\n }\n return hiddenItems;\n }\n\n /**\n * Get all the columns that are hidden under the same Index\n * @param columnIndex Index of the item to start at\n * @param metrics Grid metrics\n * @returns Array of items that are hidden\n */\n static getHiddenColumns(columnIndex, metrics) {\n var {\n visibleColumns,\n allColumnWidths\n } = metrics;\n return GridUtils.getHiddenItems(columnIndex, allColumnWidths, visibleColumns);\n }\n\n /**\n * Returns the row index if the x/y coordinates provided are close enough to the separator, otherwise null\n * @param x X coordinate to check\n * @param y Y coordinate to check\n * @param metrics The grid metrics\n * @param theme The grid theme\n * @returns Index of the row separator at the coordinates provided, or null if none match\n */\n static getRowSeparatorIndex(x, y, metrics, theme) {\n var {\n rowHeaderWidth,\n columnHeaderHeight,\n visibleRows,\n allRowYs,\n allRowHeights\n } = metrics;\n var {\n allowRowResize,\n headerSeparatorHandleSize\n } = theme;\n if (rowHeaderWidth < x || !allowRowResize || headerSeparatorHandleSize <= 0) {\n return null;\n }\n var gridY = y - columnHeaderHeight;\n var halfSeparatorSize = headerSeparatorHandleSize * 0.5;\n\n // Iterate backward so you can reveal hidden rows properly\n var isPreviousRowHidden = false;\n for (var i = visibleRows.length - 1; i >= 0; i -= 1) {\n var _allRowYs$get, _allRowHeights$get;\n var row = visibleRows[i];\n var rowY = (_allRowYs$get = allRowYs.get(row)) !== null && _allRowYs$get !== void 0 ? _allRowYs$get : 0;\n var rowHeight = (_allRowHeights$get = allRowHeights.get(row)) !== null && _allRowHeights$get !== void 0 ? _allRowHeights$get : 0;\n var isRowHidden = rowHeight === 0;\n if (!isPreviousRowHidden || !isRowHidden) {\n var midY = rowY + rowHeight;\n if (isRowHidden) {\n midY += halfSeparatorSize;\n } else if (isPreviousRowHidden) {\n midY -= halfSeparatorSize;\n }\n var minY = midY - halfSeparatorSize;\n var maxY = midY + halfSeparatorSize;\n if (minY <= gridY && gridY <= maxY) {\n return row;\n }\n isPreviousRowHidden = isRowHidden;\n }\n }\n return null;\n }\n\n /**\n * Check if the row specified is hidden\n * @param rowIndex Index of the row to check\n * @param metrics Grid metrics\n * @returns True if the row is hidden, false otherwise\n */\n static isRowHidden(rowIndex, metrics) {\n var {\n allRowHeights\n } = metrics;\n return GridUtils.isItemHidden(rowIndex, allRowHeights);\n }\n\n /**\n * Get all the rows that are hidden under the same Index\n * @param rowIndex Index of the item to start at\n * @param metrics Grid metrics\n * @returns Array of items that are hidden\n */\n static getHiddenRows(rowIndex, metrics) {\n var {\n visibleRows,\n allRowHeights\n } = metrics;\n return GridUtils.getHiddenItems(rowIndex, allRowHeights, visibleRows);\n }\n\n /**\n * Set a new order for items in the grid\n * @param from The visible index to move from\n * @param to The visible index to move the item to\n * @param oldMovedItems The old reordered items\n * @returns The new reordered items. The original array if the operation is a no-op.\n */\n\n // The overloads are so we can return the original array if the operation is a no-op\n static moveItem(from, to, oldMovedItems) {\n if (from === to) {\n return oldMovedItems;\n }\n var movedItems = [...oldMovedItems];\n var lastMovedItem = movedItems[movedItems.length - 1];\n\n // Check if we should combine with the previous move\n // E.g. 1 -> 2, 2 -> 3 can just be 1 -> 3\n if (lastMovedItem != null && !isBoundedAxisRange(lastMovedItem.from) && lastMovedItem.to === from) {\n // Remove the move if it is now a no-op\n if (lastMovedItem.from === to) {\n movedItems.pop();\n } else {\n movedItems[movedItems.length - 1] = _objectSpread(_objectSpread({}, lastMovedItem), {}, {\n to\n });\n }\n } else {\n movedItems.push({\n from,\n to\n });\n }\n return movedItems;\n }\n\n /**\n * Move a visible range in the grid\n *\n * This will effectively slice the range out of the grid,\n * re-index the remaining columns,\n * then insert the range with the first element at the provided index\n *\n * @param from The visible axis range to move\n * @param to The visible index to move the start of the range to\n * @param oldMovedItems The old reordered items\n * @param isPreMoveTo If toParam is the index before the movement\n * If true, this will account for the shift when moving\n * a range before the drop positin\n * E.g. Move range [0, 2] 1 item down (after element 3)\n * The move is [0, 2] -> 1 if this is false. [0, 2] -> 3 if this is true\n * Both will result in [0, 2] -> 1\n * @returns The new reordered items. The original array if the operation is a no-op.\n */\n\n // The overloads are so we can return the original array if the operation is a no-op\n static moveRange(from, toParam, oldMovedItems) {\n var isPreMoveTo = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;\n if (from[0] === from[1]) {\n return GridUtils.moveItem(from[0], toParam, oldMovedItems);\n }\n var to = toParam;\n if (isPreMoveTo && from[0] < toParam) {\n to -= from[1] - from[0];\n }\n if (from[0] === to) {\n return oldMovedItems;\n }\n var movedItems = [...oldMovedItems];\n var lastMovedItem = movedItems[movedItems.length - 1];\n\n // Check if we should combine with the previous move\n // E.g. [1, 2] -> 2, [2, 3] -> 3 can just be [1, 2] -> 3\n if (lastMovedItem != null && isBoundedAxisRange(lastMovedItem.from) && lastMovedItem.from[1] - lastMovedItem.from[0] === from[1] - from[0] && lastMovedItem.to === from[0]) {\n movedItems[movedItems.length - 1] = _objectSpread(_objectSpread({}, lastMovedItem), {}, {\n to\n });\n } else {\n movedItems.push({\n from,\n to\n });\n }\n var newLastMovedItem = movedItems[movedItems.length - 1];\n // Remove the move if it is now a no-op\n if (isBoundedAxisRange(newLastMovedItem.from) && newLastMovedItem.from[0] === newLastMovedItem.to) {\n movedItems.pop();\n }\n return movedItems;\n }\n // The overloads are so we can return the original array if the operation is a no-op\n static moveItemOrRange(from, to, oldMovedItems) {\n var isPreMoveTo = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;\n return Array.isArray(from) ? GridUtils.moveRange(from, to, oldMovedItems, isPreMoveTo) : GridUtils.moveItem(from, to, oldMovedItems);\n }\n\n /**\n * Applies the items moves to the AxisRange\n * @param start The start index of the range\n * @param end The end index of the range\n * @param movedItems The move operations to apply\n * @param reverse If the moved items should be applied in reverse (this reverses the effects of the moves)\n * @returns A list of AxisRanges in the translated space. Possibly multiple non-continuous ranges\n */\n static applyItemMoves(start, end, movedItems) {\n var reverse = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;\n var result = [[start, end]];\n var _loop = function _loop() {\n var {\n from: fromItemOrRange,\n to: toItem\n } = movedItems[i];\n var length = 1;\n var fromItem;\n if (isBoundedAxisRange(fromItemOrRange)) {\n length = fromItemOrRange[1] - fromItemOrRange[0] + 1; // Ranges are inclusive\n [fromItem] = fromItemOrRange;\n } else {\n fromItem = fromItemOrRange;\n }\n var fromStart = reverse ? toItem : fromItem;\n var fromEnd = fromStart + length - 1;\n var toStart = reverse ? fromItem : toItem;\n var moveDistance = toStart - fromStart;\n var nextResult = [];\n var _loop2 = function _loop2() {\n var _result$j$, _result$j$2;\n var currentStart = (_result$j$ = result[j][0]) !== null && _result$j$ !== void 0 ? _result$j$ : Number.NEGATIVE_INFINITY;\n var currentEnd = (_result$j$2 = result[j][1]) !== null && _result$j$2 !== void 0 ? _result$j$2 : Number.POSITIVE_INFINITY;\n var movedRange;\n var currentResult = [[currentStart, fromStart - 1], [fromStart, fromEnd], [fromEnd + 1, currentEnd]].map(_ref2 => {\n var [s, e] = _ref2;\n return [\n // Cap the ranges to within the current range bounds\n Math.max(s, currentStart), Math.min(e, currentEnd)];\n }).filter(_ref3 => {\n var [s, e] = _ref3;\n return s <= e;\n }) // Remove invalid ranges\n .map(range => {\n var [s, e] = range;\n if (fromStart <= s && fromEnd >= e) {\n // Current range in moved range\n movedRange = [s + moveDistance, e + moveDistance];\n return movedRange;\n }\n if (fromEnd < s) {\n // Current range is after moved range\n return [s - length, e - length];\n }\n return range;\n }).map(range => {\n var [s, e] = range;\n if (toStart > s && toStart <= e) {\n // Moved range splits this range\n return [[s, toStart - 1], [toStart + length, e + length]];\n }\n if (range === movedRange) {\n // Moved range has already been shifted\n return [range];\n }\n if (toStart <= s) {\n // Moved range shifts this range right\n return [[s + length, e + length]];\n }\n return [range];\n }).flat();\n nextResult.push(...currentResult);\n };\n for (var j = 0; j < result.length; j += 1) {\n _loop2();\n }\n\n // Return infinity values back to null\n result = nextResult.map(_ref => {\n var [s, e] = _ref;\n return [Number.isFinite(s) ? s : null, Number.isFinite(e) ? e : null];\n });\n };\n for (var i = reverse ? movedItems.length - 1 : 0; reverse ? i >= 0 : i < movedItems.length; reverse ? i -= 1 : i += 1) {\n _loop();\n }\n return result;\n }\n\n /**\n * Applies the items moves to the givengrid range\n * @param range The grid range to translate\n * @param movedColumns The moved columns\n * @param movedRows The moved rows\n * @param reverse If the moved items should be reversed (i.e. visible to model range)\n * @returns A list of grid ranges in the translated space. Possibly multiple non-continuous ranges\n */\n static translateRange(range, movedColumns, movedRows, reverse) {\n var columnRanges = GridUtils.applyItemMoves(range.startColumn, range.endColumn, movedColumns, reverse);\n var rowRanges = GridUtils.applyItemMoves(range.startRow, range.endRow, movedRows, reverse);\n var ranges = [];\n for (var i = 0; i < columnRanges.length; i += 1) {\n var c = columnRanges[i];\n for (var j = 0; j < rowRanges.length; j += 1) {\n var r = rowRanges[j];\n ranges.push(new GridRange(c[0], r[0], c[1], r[1]));\n }\n }\n return ranges;\n }\n\n /**\n * Retrieve the model index given the currently moved items\n * @param visibleIndex The visible index of the item to get the model index for\n * @param movedItems The moved items\n * @returns The model index of the item\n */\n static getModelIndex(visibleIndex, movedItems) {\n var modelIndex = GridUtils.applyItemMoves(visibleIndex, visibleIndex, movedItems, true)[0][0];\n return modelIndex;\n }\n\n /**\n * Retrieve the model indexes given the currently moved items\n * @param visibleIndexes The visible indexes of the item to get the model indexes for\n * @param movedItems The moved items\n * @returns The model indexes of the item\n */\n static getModelIndexes(visibleIndexes, movedItems) {\n return visibleIndexes.map(i => GridUtils.getModelIndex(i, movedItems));\n }\n\n /**\n * Translate the provided UI start/end indexes to the model start/end indexes by applying the `movedItems` transformations.\n * Since moved items can split apart a range, multiple pairs of indexes are returned\n *\n * @param start Start item in one dimension\n * @param end End item in one dimension\n * @param movedItems Moved item pairs in this dimension\n * @returns Array of start/end pairs of the indexes after transformations applied.\n */\n static getModelRangeIndexes(start, end, movedItems) {\n return GridUtils.applyItemMoves(start, end, movedItems, true);\n }\n\n /**\n * Translate the provided UI range into model range, using the `movedColumns` and `movedRows` to apply the necessary transforms.\n * `movedColumns` and `movedRows` are array of operations done to the UI indexes to re-order items\n *\n * @param uiRange The currently selected UI ranges\n * @param movedColumns The moved column pairs\n * @param movedRows The moved row pairs\n * @returns The model ranges after translation.\n */\n static getModelRange(uiRange) {\n var movedColumns = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : EMPTY_ARRAY;\n var movedRows = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : EMPTY_ARRAY;\n return GridUtils.translateRange(uiRange, movedColumns, movedRows, true);\n }\n\n /**\n * Translate the provided UI range into model ranges, using the `movedColumns` and `movedRows` to apply the necessary transforms.\n * `movedColumns` and `movedRows` are array of operations done to the UI indexes to re-order items\n *\n * @param uiRanges The currently selected UI ranges\n * @param movedColumns The moved column pairs\n * @param movedRows The moved row pairs\n * @returns The model ranges after translation.\n */\n static getModelRanges(uiRanges) {\n var movedColumns = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : EMPTY_ARRAY;\n var movedRows = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : EMPTY_ARRAY;\n var modelRanges = [];\n for (var i = 0; i < uiRanges.length; i += 1) {\n modelRanges.push(...GridUtils.getModelRange(uiRanges[i], movedColumns, movedRows));\n }\n return modelRanges;\n }\n\n /**\n * Translate the provided UI start/end indexes to the visible start/end indexes by applying the `movedItems` transformations.\n * Since moved items can split apart a range, multiple pairs of indexes are returned\n *\n * @param start Start item in one dimension\n * @param end End item in one dimension\n * @param movedItems Moved item pairs in this dimension\n * @returns Array of start/end pairs of the indexes after transformations applied.\n */\n static getVisibleRangeIndexes(start, end, movedItems) {\n return GridUtils.applyItemMoves(start, end, movedItems, false);\n }\n\n /**\n * Translate the provided UI range into visible range, using the `movedColumns` and `movedRows` to apply the necessary transforms.\n * `movedColumns` and `movedRows` are array of operations done to the UI indexes to re-order items\n *\n * @param uiRange The currently selected UI ranges\n * @param movedColumns The moved column pairs\n * @param movedRows The moved row pairs\n * @returns The model ranges after translation.\n */\n static getVisibleRange(modelRange) {\n var movedColumns = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : EMPTY_ARRAY;\n var movedRows = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : EMPTY_ARRAY;\n return this.translateRange(modelRange, movedColumns, movedRows, false);\n }\n\n /**\n * Translate the provided model ranges into visible ranges, using the `movedColumns` and `movedRows` to apply the necessary transforms.\n * `movedColumns` and `movedRows` are array of operations done to the UI indexes to re-order items\n *\n * @param modelRanges The model ranges\n * @param movedColumns The moved column pairs\n * @param movedRows The moved row pairs\n * @returns The model ranges after translation.\n */\n static getVisibleRanges(modelRanges) {\n var movedColumns = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : EMPTY_ARRAY;\n var movedRows = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : EMPTY_ARRAY;\n var visibleRanges = [];\n for (var i = 0; i < modelRanges.length; i += 1) {\n visibleRanges.push(...GridUtils.getVisibleRange(modelRanges[i], movedColumns, movedRows));\n }\n return visibleRanges;\n }\n\n /**\n * Retrieve the visible index given the currently moved items\n * @param modelIndex The model index to get the visible index for\n * @param movedItems Moved items\n * @returns The visible index of the item\n */\n static getVisibleIndex(modelIndex, movedItems) {\n var visibleIndex = GridUtils.applyItemMoves(modelIndex, modelIndex, movedItems)[0][0];\n return visibleIndex;\n }\n\n /**\n * Retrieve the visible indexes given the currently moved items\n * @param modelIndexes The model indexes to get the visible indexes for\n * @param movedItems Moved items\n * @returns The visible indexes of the item\n */\n static getVisibleIndexes(modelIndexes, movedItems) {\n return modelIndexes.map(i => GridUtils.getVisibleIndex(i, movedItems));\n }\n\n /**\n * Check if the current platform is Mac\n * @returns True if this platform is a Mac, false otherwise\n */\n static isMacPlatform() {\n var {\n platform\n } = window.navigator;\n return platform.startsWith('Mac');\n }\n\n /**\n * Get the modifier key for the current platform\n * @returns The modifier key for the current platform\n */\n static getModifierKey() {\n if (GridUtils.isMacPlatform()) {\n return 'metaKey';\n }\n return 'ctrlKey';\n }\n\n /**\n * Check if the modifier key is down for the given event\n * @param event The event to check\n * @returns True if the modifier key is down, false otherwise\n */\n static isModifierKeyDown(event) {\n var modifierKey = GridUtils.getModifierKey();\n return event[modifierKey];\n }\n\n /**\n * Check if the user has hidden the specified column\n * @param modelIndex The model index to check\n * @param userColumnWidths The user set column widths\n * @returns True if the user has hidden the column\n */\n static checkColumnHidden(modelIndex, userColumnWidths) {\n return userColumnWidths.get(modelIndex) === 0;\n }\n\n /**\n * Check if all the columns specified are hidden\n * @param columns Columns to check\n * @param userColumnWidths The user set column widths\n * @returns True if the user has hidden all of the columns\n */\n static checkAllColumnsHidden(columns, userColumnWidths) {\n if (userColumnWidths.size === 0) {\n return false;\n }\n return columns.every(column => userColumnWidths.get(column) === 0);\n }\n\n /**\n * Get the bounds the mouse needs to be dragged outside of from an initial selection before scrolling occurs.\n * Taking into account any floating rows that may be covering the viewport.\n * @param metrics Grid metrics\n * @param row The row they started dragging in\n * @param column The column they started the drag from\n * @returns Dimensions of the drag area in relation to the canvas they need to drag outside of to start scrolling\n */\n static getScrollDragBounds(metrics, row, column) {\n var {\n gridX,\n gridY,\n width,\n height,\n floatingTopRowCount,\n floatingBottomRowCount,\n floatingLeftColumnCount,\n floatingRightColumnCount,\n floatingLeftWidth,\n floatingRightWidth,\n floatingTopHeight,\n floatingBottomHeight,\n columnCount,\n rowCount\n } = metrics;\n var x1 = gridX;\n var y1 = gridY;\n var x2 = width;\n var y2 = height;\n if (column != null) {\n if (column > floatingLeftColumnCount) {\n x1 += floatingLeftWidth;\n }\n if (column < columnCount - floatingRightColumnCount) {\n x2 -= floatingRightWidth;\n }\n }\n if (row != null) {\n if (row > floatingTopRowCount) {\n y1 += floatingTopHeight;\n }\n if (row < rowCount - floatingBottomRowCount) {\n y2 -= floatingBottomHeight;\n }\n }\n return {\n x1,\n y1,\n x2,\n y2\n };\n }\n\n /**\n * Converts the delta coordinates from the provided wheel event to pixels\n * Different platforms have different ways of providing the delta so this normalizes it\n * @param wheelEvent The mouse wheel event to get the scrolling delta for\n * @param pageWidth The width of the page that is scrolling\n * @param pageHeight The height of the page that is scrolling\n * @param lineWidth The width of the line scrolling in line mode\n * @param lineHeight The height of the line scrolling in line mode\n * @returns The delta coordinates normalized to pixels\n */\n static getScrollDelta(wheelEvent) {\n var pageWidth = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1024;\n var pageHeight = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 768;\n var lineWidth = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 20;\n var lineHeight = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 20;\n var {\n deltaX,\n deltaY\n } = wheelEvent;\n\n // Flip scroll direction if shiftKey is held on windows/linux.\n // On mac, deltaX/Y values are switched at the event level when shiftKey=true.\n // Guard on strictly Y only changing, to ignore trackpad diagonal motion,\n // through that guard may not be necessary, but it is difficult to determine for\n // all platforms/browser/scroll method combos.\n if (!GridUtils.isMacPlatform() && wheelEvent.shiftKey && wheelEvent.deltaX === 0 && wheelEvent.deltaY !== 0) {\n deltaX = wheelEvent.deltaY;\n deltaY = wheelEvent.deltaX;\n }\n\n // Normalize other deltaMode values to pixel units\n // deltaMode 0, is already in pixel units\n if ((wheelEvent === null || wheelEvent === void 0 ? void 0 : wheelEvent.deltaMode) === WheelEvent.DOM_DELTA_PAGE) {\n // Users can set OS to be in deltaMode page\n // scrolly by page units as pixels\n deltaX *= pageWidth;\n deltaY *= pageHeight;\n } else if ((wheelEvent === null || wheelEvent === void 0 ? void 0 : wheelEvent.deltaMode) === WheelEvent.DOM_DELTA_LINE) {\n // Firefox reports deltaMode line\n // Normalize distance travelled between browsers\n // but remain ~platform/browser combo consistent\n if (GridUtils.isMacPlatform()) {\n // for mac treat lines as a standard row height\n // on mac, firefox travels less distance then chrome per tick\n deltaX = Math.round(deltaX * lineWidth);\n deltaY = Math.round(deltaY * lineHeight);\n } else {\n // for windows convert to pixels using the same method as chrome\n // chrome goes 100 per 3 lines, and firefox would go 102 per 3 (17 lineheight * 3 lines * 2)\n // make the behaviour the same between as it's close enough\n deltaX = Math.round(deltaX * this.PIXELS_PER_LINE);\n deltaY = Math.round(deltaY * this.PIXELS_PER_LINE);\n }\n }\n return {\n deltaX,\n deltaY\n };\n }\n static compareRanges(range1, range2) {\n if (range1[0] == null || range1[1] == null || range2[0] == null || range2[1] == null) {\n return 0;\n }\n return range1[0] !== range2[0] ? range1[0] - range2[0] : range1[1] - range2[1];\n }\n static mergeSortedRanges(ranges) {\n var mergedRanges = [];\n for (var i = 0; i < ranges.length; i += 1) {\n var range = ranges[i];\n var start = range[0];\n var end = range[1];\n if (i === 0) {\n mergedRanges.push([start, end]);\n } else if (start - 1 <= mergedRanges[mergedRanges.length - 1][1]) {\n mergedRanges[mergedRanges.length - 1][1] = Math.max(mergedRanges[mergedRanges.length - 1][1], end);\n } else {\n mergedRanges.push([start, end]);\n }\n }\n return mergedRanges;\n }\n\n /**\n * Translates coordinates that are relative to gridX/gridY to be translated by gridX and gridY\n * @param tokenBox The token box to translate\n * @param metrics The grid metrics\n * @returns The token box with translated coordinates\n */\n static translateTokenBox(tokenBox, metrics) {\n var {\n x1: left,\n y1: top,\n x2: right,\n y2: bottom\n } = tokenBox;\n var {\n gridX,\n gridY,\n width: gridWidth,\n height: gridHeight,\n verticalBarWidth,\n horizontalBarHeight\n } = metrics;\n\n // Clamp the values within the grid\n var newLeft = clamp(gridX + left, gridX, gridWidth - verticalBarWidth);\n var newRight = clamp(gridX + right, gridX, gridWidth - verticalBarWidth);\n var newTop = clamp(gridY + top, gridY, gridHeight - horizontalBarHeight);\n var newBottom = clamp(gridY + bottom, gridY, gridHeight - horizontalBarHeight);\n return {\n x1: newLeft,\n y1: newTop,\n x2: newRight,\n y2: newBottom,\n token: tokenBox.token\n };\n }\n\n /**\n * Gets textWidth and X-Y position for a specific cell\n * The textWidth returned is the width that the text can occupy accounting for any other cell markings\n * The width accounts for tree table indents and cell padding, so it is the width the text may consume\n *\n * @param state GridRenderState to get the text metrics for\n * @param column Column of cell to get text metrics for\n * @param row Row of cell to get text metrics for\n * @returns Object with width, x, and y of the text\n */\n static getTextRenderMetrics(state, column, row) {\n var {\n metrics,\n model,\n theme\n } = state;\n var {\n firstColumn,\n allColumnXs,\n allColumnWidths,\n allRowYs,\n allRowHeights,\n modelRows,\n modelColumns\n } = metrics;\n var {\n cellHorizontalPadding,\n treeDepthIndent,\n treeHorizontalPadding\n } = theme;\n var modelRow = getOrThrow(modelRows, row);\n var modelColumn = getOrThrow(modelColumns, column);\n var textAlign = model.textAlignForCell(modelColumn, modelRow);\n var x = getOrThrow(allColumnXs, column);\n var y = getOrThrow(allRowYs, row);\n var columnWidth = getOrThrow(allColumnWidths, column);\n var rowHeight = getOrThrow(allRowHeights, row);\n var isFirstColumn = column === firstColumn;\n var treeIndent = 0;\n if (isExpandableGridModel(model) && model.hasExpandableRows && isFirstColumn) {\n treeIndent = treeDepthIndent * (model.depthForRow(row) + 1) + treeHorizontalPadding;\n }\n var textWidth = columnWidth - treeIndent;\n var textX = x + cellHorizontalPadding;\n var textY = y + rowHeight * 0.5;\n if (textAlign === 'right') {\n textX = x + textWidth - cellHorizontalPadding;\n } else if (textAlign === 'center') {\n textX = x + textWidth * 0.5;\n }\n textX += treeIndent;\n return {\n width: textWidth - cellHorizontalPadding * 2,\n x: textX,\n y: textY\n };\n }\n\n /**\n * Finds tokens in text (urls, emails) that start with https:// or http://\n * @param text The text to search in\n * @returns An array of tokens\n */\n static findTokensWithProtocolInText(text) {\n var tokens = linkifyFind(text);\n return tokens.filter(token => {\n if (token.type === 'url') {\n return /^https?:\\/\\//.test(token.value);\n }\n return true;\n });\n }\n}\n// use same constant as chrome source for windows\n// https://github.com/chromium/chromium/blob/973af9d461b6b5dc60208c8d3d66adc27e53da78/ui/events/blink/web_input_event_builders_win.cc#L285\n_defineProperty(GridUtils, \"PIXELS_PER_LINE\", 100 / 3);\nexport default GridUtils;\n//# sourceMappingURL=GridUtils.js.map","function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }\nfunction _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }\nfunction _toPropertyKey(t) { var i = _toPrimitive(t, \"string\"); return \"symbol\" == typeof i ? i : i + \"\"; }\nfunction _toPrimitive(t, r) { if (\"object\" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || \"default\"); if (\"object\" != typeof i) return i; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (\"string\" === r ? String : Number)(t); }\n/**\n * Extension of memoizee that clears the entire cache when it's full.\n * This avoids the situation where LRU cache starts thrashing when it fills up.\n * Could look at writing our own memoize with a smarter cache to avoid overhead of\n * LRU queue, but this should be sufficient for now.\n */\nimport memoizee from 'memoizee';\n\n/**\n * @param fn The function to memoize\n * @param options The options to set for memoization\n */\n// eslint-disable-next-line @typescript-eslint/ban-types\nexport function memoizeClear(fn, options) {\n var isClearingCache = false;\n var memoizedFn = memoizee(fn, _objectSpread(_objectSpread({}, options), {}, {\n dispose: () => {\n // Need to track when we're clearing because dispose gets called for all items removed\n if (!isClearingCache) {\n isClearingCache = true;\n memoizedFn.clear();\n isClearingCache = false;\n }\n }\n }));\n return memoizedFn;\n}\nexport default memoizeClear;\n//# sourceMappingURL=memoizeClear.js.map","function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }\nfunction _toPropertyKey(t) { var i = _toPrimitive(t, \"string\"); return \"symbol\" == typeof i ? i : i + \"\"; }\nfunction _toPrimitive(t, r) { if (\"object\" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || \"default\"); if (\"object\" != typeof i) return i; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (\"string\" === r ? String : Number)(t); }\nimport { EventTarget } from 'event-target-shim';\nimport memoizeClear from \"./memoizeClear.js\";\nimport GridUtils from \"./GridUtils.js\";\nvar LINK_TRUNCATION_LENGTH = 5000;\n\n/* eslint class-methods-use-this: \"off\" */\n/* eslint no-unused-vars: \"off\" */\n/**\n * Model for a Grid\n * All of these methods should return very quickly, as they will be called many times in the render cycle.\n * If data needs to be loaded asynchronously, return something immediately, then trigger an event for the table to refresh (Not yet implemented).\n */\nclass GridModel extends EventTarget {\n constructor() {\n super(...arguments);\n _defineProperty(this, \"getCachedTokensInText\", memoizeClear((text, visibleLength) => {\n // If no text is truncated, then directly search in text\n if (visibleLength >= text.length) {\n return GridUtils.findTokensWithProtocolInText(text);\n }\n\n // To check for links, we should check to the first space after the truncatedText length\n var indexOfProceedingWhitespace = text.slice(visibleLength - 1, LINK_TRUNCATION_LENGTH).search(/\\s/); // index or -1 if not found\n\n var lengthOfContent = visibleLength + indexOfProceedingWhitespace;\n // If it doesn't exist, set lengthOfContent to the minimum between length of the original text and 5000\n if (indexOfProceedingWhitespace === -1) {\n lengthOfContent = Math.min(LINK_TRUNCATION_LENGTH, text.length);\n }\n var contentToCheckForLinks = text.substring(0, lengthOfContent);\n return GridUtils.findTokensWithProtocolInText(contentToCheckForLinks);\n }, {\n max: 10000\n }));\n }\n /** Count of rows in the grid */\n /** Count of columns in the grid */\n /** Count of rows that are frozen (or 'floating') at the top */\n get floatingTopRowCount() {\n return 0;\n }\n\n /** Count of rows that are frozen at the bottom */\n get floatingBottomRowCount() {\n return 0;\n }\n\n /** Count of columns that are frozen (or 'floating') at the left */\n get floatingLeftColumnCount() {\n return 0;\n }\n\n /** Count of columns that are frozen (or 'floating') at the right */\n get floatingRightColumnCount() {\n return 0;\n }\n\n /**\n * How many columns header levels are in the grid\n * Used for column grouping where columns at depth 0 are the base columns\n *\n * A grid with 1-level grouping would have a columnHeaderDepth of 2\n * and column headers at depths 0 and 1\n */\n get columnHeaderMaxDepth() {\n return 1;\n }\n\n /**\n * Get the text for the specified cell\n * @param column Column to get the text for\n * @param row Row to get the text for\n * @returns Text for the specified cell\n */\n\n /**\n * Get the character to replace text when truncated for a specific cell.\n * Leave undefined to show text truncated with ellipsis\n * @param column Column to get the truncation character for\n * @param row Row to get the truncation character for\n * @returns Truncation character for the specified cell\n */\n truncationCharForCell(column, row) {\n return undefined;\n }\n\n /**\n * Get the text alignment for the specified cell\n * @param column Column to get the alignment for\n * @param row Row to get the alignment for\n * @returns Text alignment for the specified cell\n */\n textAlignForCell(column, row) {\n return 'left';\n }\n\n /**\n * Get the color for the text in the specified cell\n * @param column Column to get the color for\n * @param row Row to get the color for\n * @param theme Theme applied to the grid\n * @returns Color for the text in the cell\n */\n colorForCell(column, row, theme) {\n return theme.textColor;\n }\n\n /**\n * Get the background color for the cell\n * @param column Column to get the background color for\n * @param row Row to get the background color for\n * @param theme Theme applied to the grid\n * @returns Background color for the cell\n */\n backgroundColorForCell(column, row, theme) {\n return null;\n }\n\n /**\n * Text for the column header\n * @param column Column to get the header for\n * @param depth Depth to get the header text for. 0 is base columns\n * @returns Text to put in the column header\n */\n\n /** Color for column header\n * @param column Column to get the color for\n * @param depth Header depth to get the color for\n * @returns Color for the header at the depth or null\n */\n colorForColumnHeader(column) {\n var depth = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n return null;\n }\n\n /**\n * Text for the row header\n * @param row Row to get the header for\n * @returns Text to put in the row header\n */\n textForRowHeader(row) {\n return '';\n }\n\n /**\n * Text for the row footer\n * @param row Row to get the footer for\n * @returns Text to put in the row footer\n */\n textForRowFooter(row) {\n return '';\n }\n\n /**\n * @param column Column to check\n * @returns True if the column is movable\n */\n isColumnMovable(column) {\n var depth = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n return true;\n }\n\n /**\n * @param row Row to check\n * @returns True if the row is movable\n */\n isRowMovable(row) {\n return true;\n }\n getColumnHeaderGroup(modelIndex, depth) {\n return undefined;\n }\n getColumnHeaderParentGroup(modelIndex, depth) {\n return undefined;\n }\n\n /**\n * Gets the tokens in the cell at column and row, based on the visible text\n * @param column The model column\n * @param row The model row\n * @param visibleLength The length of the visible text\n * @returns An array of Tokens in the cell\n */\n tokensForCell(column, row) {\n var visibleLength = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : LINK_TRUNCATION_LENGTH;\n var text = this.textForCell(column, row);\n return this.getCachedTokensInText(text, visibleLength);\n }\n renderTypeForCell(column, row) {\n return 'text';\n }\n}\nexport default GridModel;\n//# sourceMappingURL=GridModel.js.map","function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }\nfunction _toPropertyKey(t) { var i = _toPrimitive(t, \"string\"); return \"symbol\" == typeof i ? i : i + \"\"; }\nfunction _toPrimitive(t, r) { if (\"object\" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || \"default\"); if (\"object\" != typeof i) return i; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (\"string\" === r ? String : Number)(t); }\n/* eslint-disable class-methods-use-this */\n\nimport { GridModel } from '@deephaven/grid';\nvar EMPTY_ARRAY = [];\nvar EMPTY_SET = new Set();\n\n/**\n * Abstract class that extends the GridModel to have more functionality, like filtering and sorting.\n * For use from IrisGrid.\n * Provides some abstraction from the dh.Table and dh.TreeTable classes, so we can treat them somewhat the same.\n * Note that it still uses dh.Column, dh.FilterCondition, dh.Sort, etc., still. Theoretically should abstract\n * those out as well, so there's no dependency on IrisAPI at all, but it's a lot of work for no real gain at this time.\n */\nclass IrisGridModel extends GridModel {\n constructor(dh) {\n super();\n _defineProperty(this, \"dh\", void 0);\n _defineProperty(this, \"listenerCount\", void 0);\n this.dh = dh;\n this.listenerCount = 0;\n }\n // Pulled directly from event-target-shim implementation signature\n // https://github.com/mysticatea/event-target-shim/blob/master/src/lib/event-target.ts#L99\n // Using Parameters<GridModel['addEventListener']> doesn't work\n addEventListener(type0, callback0, options0) {\n super.addEventListener(type0, callback0, options0);\n this.listenerCount += 1;\n if (this.listenerCount === 1) {\n this.startListening();\n }\n }\n removeEventListener(type0, callback0, options0) {\n super.removeEventListener(type0, callback0, options0);\n this.listenerCount -= 1;\n if (this.listenerCount === 0) {\n this.stopListening();\n }\n }\n\n /**\n * Function called when first listener is added.\n * Override for implementation specific behaviour.\n */\n startListening() {\n // no-op\n }\n\n /**\n * Function called when last listener is removed.\n * Override for implementation specific behaviour.\n */\n stopListening() {\n // no-op\n }\n\n /**\n * Gets the columns for this model\n * @returns All columns in the model\n */\n\n /**\n * Retrieve the aggregated columns for this model\n * @returns The columns that are aggregated\n */\n get aggregatedColumns() {\n return EMPTY_ARRAY;\n }\n\n /**\n * Retrieve the grouped columns for this model\n * @returns The columns that are grouped\n */\n get groupedColumns() {\n return EMPTY_ARRAY;\n }\n\n /**\n * Gets the columns for the model before any transformations (such as rollups) are applied.\n * @returns All original columns in the model.\n */\n get originalColumns() {\n return this.columns;\n }\n\n /**\n * Gets the column index for this model\n * @param name The model column name.\n * @returns The numeric index of the requested column.\n */\n\n /**\n * Retrieve the source cell for a given cell. Returns something different if the cell is a proxied cell\n * that retrieves data from another cell.\n * @param column Column to get the source for\n * @param row Row to get the source for\n * @returns Source cell where the data is coming from\n */\n sourceForCell(column, row) {\n return {\n column,\n row\n };\n }\n\n /**\n * Retrieve the range of columns to clear filters on for a given column.\n * @param column Column to get the range of filters to clear.\n * @returns Axis range of the column filters to clear, or `null` if this should not have a clear filter option.\n */\n getClearFilterRange(column) {\n if (this.isFilterable(column)) {\n return [column, column];\n }\n return null;\n }\n\n /** List of column movements defined by the model. Used as initial movements for IrisGrid */\n get initialMovedColumns() {\n return EMPTY_ARRAY;\n }\n\n /** List of row movements defined by the model. Used as initial movements for IrisGrid */\n get initialMovedRows() {\n return EMPTY_ARRAY;\n }\n\n /** List of column header groups defined by the model */\n get initialColumnHeaderGroups() {\n return EMPTY_ARRAY;\n }\n\n /**\n * @param column The model column index\n * @param row The model row index\n * @returns The format stored for that cell\n */\n\n /**\n * @param column The model column index\n * @param row The model row index\n * @returns The value stored for that cell\n */\n\n /**\n * @returns The filters set on this model\n */\n\n /**\n * @param filter The filters to set\n */\n\n /**\n * @returns The formatter used when formatting data\n */\n\n /**\n * @param formatter The formatter to set\n */\n\n /**\n * @returns The column alignment map\n */\n\n /**\n * @param columnAlignmentMap The column alignment map to set\n */\n\n /**\n * @param value The value to format\n * @param columnType The column type to format\n * @param columnName The column name to format\n */\n\n /**\n * @returns The sorts used on this model\n */\n\n /**\n * @param sort The sorts to use on this model\n */\n\n /**\n /**\n * @returns The custom columns on this model\n */\n\n /**\n * @param customColumns The custom columns to use\n */\n\n /**\n * @returns The format columns on this model\n */\n\n /**\n * @param formatColumns The format columns to use\n */\n\n /**\n * @param columns The columns to treat as frozen\n */\n\n /**\n * @returns The config to use for rolling up this table\n */\n\n /**\n * @returns The config to use for the totals table of this model\n */\n\n /**\n * @returns The LayoutHints to use for the columns of this table model\n */\n get layoutHints() {\n return null;\n }\n\n /**\n * @returns Names of columns which should be locked to the front, but not floating\n */\n get frontColumns() {\n return EMPTY_ARRAY;\n }\n\n /**\n * @returns Names of columns which should be locked to the back, but not floating\n */\n get backColumns() {\n return EMPTY_ARRAY;\n }\n\n /**\n * @returns Names of key columns\n */\n get keyColumnSet() {\n return EMPTY_SET;\n }\n\n /**\n * @returns Names of value columns\n */\n get valueColumnSet() {\n return EMPTY_SET;\n }\n\n /**\n * @returns Names of columns which should be frozen to the front and floating\n */\n get frozenColumns() {\n return EMPTY_ARRAY;\n }\n\n /**\n * @param index The column index to check\n * @returns Whether the column is one of LayoutHints' frozen columns\n */\n isColumnFrozen(index) {\n return false;\n }\n\n /**\n * @param index The column index to check\n * @returns Whether the column is sortable\n */\n isColumnSortable(index) {\n return false;\n }\n\n /**\n * @deprecated Replaced with isPartitionRequired()\n * @returns True if this model requires a filter to be set\n */\n get isFilterRequired() {\n return false;\n }\n get isReversible() {\n return true;\n }\n\n /**\n * @returns Returns a raw table that is frozen and can be used for exporting data\n */\n\n /**\n * @returns True if this model supports the columnStatistics(column) function\n */\n get isColumnStatisticsAvailable() {\n return false;\n }\n\n /**\n * The description for this model.\n * @returns The description of the model\n */\n get description() {\n return '';\n }\n\n /**\n * @param column The column to get statistics for\n * @returns The column statistics\n */\n\n /**\n * @returns True if this model supports aggregatedColumns\n */\n get isAggregatedColumnsAvailable() {\n return false;\n }\n\n /**\n * @returns True if this model supports customColumns\n */\n get isCustomColumnsAvailable() {\n return false;\n }\n\n /**\n * @returns True if this model supports customColumns\n */\n get isFormatColumnsAvailable() {\n return false;\n }\n\n /**\n * @returns True if this model supports the export() function\n */\n get isExportAvailable() {\n return false;\n }\n\n /**\n * @returns True if this model supports the valuesTable(column) function\n */\n get isValuesTableAvailable() {\n return false;\n }\n\n /**\n * @returns True if this model should allow the chart builder\n */\n get isChartBuilderAvailable() {\n return false;\n }\n\n /**\n * @returns True if this model should allow to organize columns\n */\n get isOrganizeColumnsAvailable() {\n return false;\n }\n\n /**\n * @returns True if the rollup rows functionality is available\n */\n get isRollupAvailable() {\n return false;\n }\n\n /**\n * @returns True if select distinct functionality is available\n */\n get isSelectDistinctAvailable() {\n return false;\n }\n\n /**\n * @returns True if the totals functionality is available\n */\n get isTotalsAvailable() {\n return false;\n }\n\n /**\n * The names of columns with select distinct enabled\n * @returns An array of column names\n */\n\n /**\n * Set the columns with select distinct enabled\n * @param names The array of column names to enable select distinct on\n */\n\n /**\n * The pending data for this model\n * @returns A map of row index to a map of column name/value pairs\n */\n\n /**\n * Set the pending data for this model\n * @param A map of row index to a map of column name/value pairs\n */\n\n /**\n * @returns The count of pending rows to show\n */\n\n /**\n * Set the count of pending rows to show\n * @param count The count of pending rows to show\n */\n\n /**\n * Errors for the pending data\n * @returns Map from row number to the error\n */\n\n /**\n * Commit pending data and save all data to the table\n */\n\n /**\n * Check if viewport is still loading data\n */\n get isViewportPending() {\n return false;\n }\n\n /**\n * Check if a column is filterable\n * @param columnIndex The column index to check for filterability\n * @returns True if the current provided column index is filterable, false otherwise\n */\n isFilterable(columnIndex) {\n return false;\n }\n\n /**\n * Set the indices of the viewport\n * @param top Top of viewport\n * @param bottom Bottom of viewport\n * @param columns The columns in the viewport. `undefined` for all columns\n */\n\n /**\n * Takes a snapshot of the provided ranges\n * @param ranges The model ranges to take the snapshot of\n * @returns Returns the data in a row/column matrix\n */\n\n /**\n * @param ranges The ranges to take a snapshot of\n * @param includeHeaders Whether to include the headers in the snapshot or not\n * @param formatValue A function to format a value for a cell. Defaults to model format value.\n * @returns A text formatted snapshot of the data for the specified range set\n */\n\n /**\n * @param column The columns to get the distinct values for\n * @returns A table partitioned on the specified columns in the order given in\n */\n\n /**\n * Close this model. It can no longer be used after being closed\n */\n close() {\n // no-op\n }\n\n /**\n * Don't allow any rows to be movable in any IrisGrids by default. Just columns.\n */\n isRowMovable() {\n return false;\n }\n get isSeekRowAvailable() {\n return false;\n }\n dataBarOptionsForCell(column, row, theme) {\n throw new Error('Method not implemented.');\n }\n tooltipForCell(column, row) {\n return null;\n }\n}\n_defineProperty(IrisGridModel, \"EVENT\", Object.freeze({\n UPDATED: 'UPDATED',\n FORMATTER_UPDATED: 'FORMATTER_UPDATED',\n REQUEST_FAILED: 'REQUEST_FAILED',\n COLUMNS_CHANGED: 'COLUMNS_CHANGED',\n TABLE_CHANGED: 'TABLE_CHANGED',\n FILTERS_CHANGED: 'FILTERS_CHANGED',\n SORTS_CHANGED: 'SORTS_CHANGED',\n DISCONNECT: 'DISCONNECT',\n RECONNECT: 'RECONNECT',\n TOTALS_UPDATED: 'TOTALS_UPDATED',\n /** Fired when the viewport is applied to the table and we're waiting for a response. */\n PENDING_DATA_UPDATED: 'PENDING_DATA_UPDATED',\n VIEWPORT_UPDATED: 'VIEWPORT_UPDATED'\n}));\nexport default IrisGridModel;\n//# sourceMappingURL=IrisGridModel.js.map"],"file":"assets/IrisGridModel-DDGkzyRh.js"}