{"version":3,"file":"index.umd.cjs","names":["Palette","Palette","d3Hsl","Palette","d3Hsl","Widget","Palette","d3Hsl","select","d3Format","Widget","Palette","factory","global","exports","PKG_NAME","PKG_VERSION","BUILD_VERSION","_hpcc_js_common","row","column","value","origRow","more","w","e","disable","direction","offset","html","rootElement","node","svg","point","target","vis","re","event","args","d","content","poffset","nodel","i","directions","coords","root_bbox","placement_success","placement_overflow","least_overflow_direction","top_offset","left_offset","overflow_obj","directionCallbacks","_dir","_top_offset","_left_offset","nodel_bbox","ret","side","sum","n","v","bbox","div","svgNode","element","targetel","targetShape","matrix","tbbox","width","height","x","y","layerEnter","_base","svgElement","layerUpdate","layerExit","enter","update","exit","overlayElement","d3tipElement","classed","_class","_","opts","body","key","obj","titleKey","tooltipLabelFormat","retVal","tooltipValueFormat"],"sources":["../src/__package__.ts","../src/I1DChart.ts","../src/I2DChart.ts","../src/I2DAggrChart.ts","../src/IGraph.ts","../src/IHighlight.ts","../src/IInput.ts","../src/INDChart.ts","../src/Tooltip.ts","../src/ITooltip.ts","../src/ITree.ts"],"sourcesContent":["export const PKG_NAME = \"@hpcc-js/api\";\nexport const PKG_VERSION = \"3.7.5\";\nexport const BUILD_VERSION = \"3.38.1\";\n","import { Palette } from \"@hpcc-js/common\";\n\nexport function I1DChart() {\n}\nI1DChart.prototype._dataFamily = \"1D\";\nI1DChart.prototype._palette = Palette.rainbow(\"default\");\n\n//  Events  ---\nI1DChart.prototype.click = function (row, column, selected) {\n};\n\nI1DChart.prototype.dblclick = function (row, column, selected) {\n};\n","import { Palette } from \"@hpcc-js/common\";\nimport { hsl as d3Hsl } from \"d3-color\";\n\nexport function I2DChart() {\n}\nI2DChart.prototype._dataFamily = \"2D\";\nI2DChart.prototype._palette = Palette.ordinal(\"default\");\n\nI2DChart.prototype.fillColor = function (row: any[], column, value, origRow): string {\n    return this._palette(row[0]);\n};\n\nI2DChart.prototype.strokeColor = function (row: any[], column, value, origRow): string {\n    return d3Hsl(this.fillColor(row, column, value, origRow)).darker().toString();\n};\n\nI2DChart.prototype.textColor = function (row: any[], column, value, origRow): string {\n    return Palette.textColor(this.fillColor(row, column, value, origRow));\n};\n\n//  Events  ---\nI2DChart.prototype.click = function (row: object, column, selected) {\n};\n\nI2DChart.prototype.dblclick = function (row: object, column, selected) {\n};\n","import { Palette } from \"@hpcc-js/common\";\nimport { hsl as d3Hsl } from \"d3-color\";\n\nexport function I2DAggrChart() {\n}\nI2DAggrChart.prototype._palette = Palette.rainbow(\"default\");\n\nI2DAggrChart.prototype.fillColor = function (row: any[][], column, value): string {\n    return this._palette(row.length);\n};\n\nI2DAggrChart.prototype.strokeColor = function (row: any[][], column, value): string {\n    return d3Hsl(this.fillColor(row, column, value)).darker().toString();\n};\n\nI2DAggrChart.prototype.textColor = function (row: any[][], column, value): string {\n    return Palette.textColor(this.fillColor(row, column, value));\n};\n\n//  Events  ---\nI2DAggrChart.prototype.click = function (row: object[], column, selected) {\n};\n\nI2DAggrChart.prototype.dblclick = function (row: object[], column, selected) {\n};\n","export function IGraph() {\n}\nIGraph.prototype._dataFamily = \"graph\";\n\n//  Events  ---\nIGraph.prototype.vertex_click = function (_row, _col, _sel, more) {\n    if (more && more.vertex) {\n    }\n};\n\nIGraph.prototype.vertex_dblclick = function (_row, _col, _sel, more) {\n    if (more && more.vertex) {\n    }\n};\n\nIGraph.prototype.edge_click = function (_row, _col, _sel, more) {\n    if (more && more.edge) {\n    }\n};\n\nIGraph.prototype.edge_dblclick = function (_row, _col, _sel, more) {\n    if (more && more.edge) {\n    }\n};\n","export interface IHighlight {\n    highlightColumn(column: string): this;\n}\n\nexport function instanceOfIHighlight(w: any): w is IHighlight {\n    return typeof (w as any).highlightColumn === \"function\";\n}\n","import { Widget } from \"@hpcc-js/common\";\n\n//  Use old school class declaration as this is a mixin  ---\nexport function IInput() {\n}\nIInput.prototype = Object.create(Widget.prototype);\nIInput.prototype.constructor = IInput;\n\n// abstract target(): any;\n// abstract target(_: any): this;\n\n//  Implementation  ---\nIInput.prototype.isValid = function () {\n    if (this.validate()) {\n        const re = new RegExp(this.validate());\n        if (!re.test(this.value())) {\n            return false;\n        }\n    }\n    return true;\n};\n\nIInput.prototype.hasValue = function () {\n    if (typeof (this as any).type === \"function\") {\n        switch ((this as any).type()) {\n            case \"radio\":\n            /* falls through */\n            case \"checkbox\":\n                if (this.value() && this.value() !== \"false\") {\n                    return true;\n                }\n                break;\n            default:\n                if (this.value()) {\n                    return true;\n                }\n                break;\n        }\n        return false;\n    }\n    return this.value() !== \"\";\n};\n\n//  Events  ---\nIInput.prototype.blur = function (_w) {\n};\nIInput.prototype.keyup = function (_w) {\n};\nIInput.prototype.focus = function (_w) {\n};\nIInput.prototype.click = function (_w) {\n};\nIInput.prototype.dblclick = function (_w) {\n};\nIInput.prototype.change = function (_w, complete: boolean) {\n};\n\nIInput.prototype.resetValue = function (w) {\n    w.value(w._inputElement[0].node().value);\n};\n\nIInput.prototype.disable = function (disable) {\n    this._inputElement.forEach(function (e, idx) {\n        e.attr(\"disabled\", disable ? \"disabled\" : null);\n    });\n};\n\nIInput.prototype.setFocus = function () {\n    if (this._inputElement.length) {\n        this._inputElement[0].node().focus();\n    }\n};\n\nexport interface IInput {\n    name: { (): string; (_: string): IInput };\n    name_exists: () => boolean;\n    label: { (): string; (_: string): IInput };\n    label_exists: () => boolean;\n    value: { (): any; (_: any): IInput };\n    value_exists: () => boolean;\n    validate: { (): string; (_: string): IInput };\n    validate_exists: () => boolean;\n}\nIInput.prototype.publish(\"name\", \"\", \"string\", \"HTML name for the input\");\nIInput.prototype.publish(\"label\", \"\", \"string\", \"Descriptive label\");\nIInput.prototype.publish(\"value\", \"\", \"string\", \"Input Current Value\");\nIInput.prototype.publish(\"validate\", null, \"string\", \"Input Validation\");\n","import { Palette } from \"@hpcc-js/common\";\nimport { hsl as d3Hsl } from \"d3-color\";\n\nexport function INDChart() {\n}\nINDChart.prototype._dataFamily = \"ND\";\nINDChart.prototype._palette = Palette.ordinal(\"default\");\n\nINDChart.prototype.fillColor = function (row: any[], column: string, value: number, origRow: any): string {\n    return this._palette(column);\n};\n\nINDChart.prototype.strokeColor = function (row: any[], column: string, value: number, origRow: any): string {\n    return d3Hsl(this.fillColor(row, column, value, origRow)).darker().toString();\n};\n\nINDChart.prototype.textColor = function (row: any[], column: string, value: number, origRow: any): string {\n    return Palette.textColor(this.fillColor(row, column, value, origRow));\n};\n\n//  Events  ---\nINDChart.prototype.click = function (row, column, selected) {\n};\n\nINDChart.prototype.dblclick = function (row, column, selected) {\n};\n","//  Based on  https://github.com/GordonSmith/d3-tip forked from https://github.com/Caged/d3-tip\n\nimport { select, selection } from \"d3-selection\";\n\nexport function tip() {\n    let direction: (...args: any[]) => string = d3TipDirection;\n    let offset: (...args: any[]) => number[] = d3TipOffset;\n    let html: (...args: any[]) => string = d3TipHTML;\n    let rootElement = functor(document.body);\n    let node = initNode();\n    let svg = null;\n    let point = null;\n    let target = null;\n\n    const tip: any = function (vis) {\n        svg = getSVGNode(vis);\n        if (!svg) return;\n        point = svg.createSVGPoint();\n        const re = rootElement();\n        if (!re) return;\n        if (!node) return;\n        re.appendChild(node);\n    };\n\n    // Public - show the tooltip on the screen\n    //\n    // Returns a tip\n    tip.show = function (event, d) {\n        target = event.currentTarget;\n        const args: any[] = [d, event];\n        const content = html.apply(this, args);\n        if (content === null) {\n            return tip;\n        }\n        const poffset = offset.apply(this, args);\n        const nodel = getNodeEl();\n        let i = directions.length;\n        let coords;\n        const root_bbox = rootElement().getBoundingClientRect();\n        nodel.html(content)\n            .style(\"opacity\", 1).style(\"pointer-events\", \"all\");\n\n        while (i--) nodel.classed(directions[i], false);\n        let placement_success = false;\n        const placement_overflow = {};\n        let least_overflow_direction = directions[0];\n        for (let i = 0; i < directions.length; i++) {\n            placement_success = _placement_attempt(directions[i]);\n            if (placement_success) break;\n        }\n        if (!placement_success) {\n            nodel.classed(\"notick\", true);\n            const top_offset = _vertical_adjustment(placement_overflow[least_overflow_direction]);\n            const left_offset = _horizontal_adjustment(placement_overflow[least_overflow_direction]);\n            _placement_attempt(least_overflow_direction, top_offset, left_offset);\n        } else {\n            nodel.classed(\"notick\", false);\n        }\n        return tip;\n\n        function _horizontal_adjustment(overflow_obj) {\n            if (overflow_obj.left > overflow_obj.right) {\n                return overflow_obj.left > 0 ? -overflow_obj.left : 0;\n            } else {\n                return overflow_obj.right > 0 ? overflow_obj.right : 0;\n            }\n        }\n        function _vertical_adjustment(overflow_obj) {\n            if (overflow_obj.top > overflow_obj.bottom) {\n                return overflow_obj.top > 0 ? -overflow_obj.top : 0;\n            } else {\n                return overflow_obj.bottom;\n            }\n        }\n\n        function _placement_attempt(this: any, _dir, _top_offset?, _left_offset?) {\n            _top_offset = _top_offset ? _top_offset : 0;\n            _left_offset = _left_offset ? _left_offset : 0;\n            nodel.style(\"white-space\", \"nowrap\");\n            coords = directionCallbacks.get(_dir).apply(this);\n            nodel.classed(_dir, true)\n                .style(\"top\", (coords.top + poffset[0] - _top_offset) + \"px\")\n                .style(\"left\", (coords.left + poffset[1] - _left_offset) + \"px\");\n            const nodel_bbox = nodel.node().getBoundingClientRect();\n            const ret = nodel_bbox.top > root_bbox.top\n                && nodel_bbox.left > root_bbox.left\n                && nodel_bbox.bottom < root_bbox.bottom\n                && nodel_bbox.right < root_bbox.right\n                ;\n            placement_overflow[_dir] = {\n                top: root_bbox.top - nodel_bbox.top,\n                right: nodel_bbox.right - root_bbox.right,\n                bottom: nodel_bbox.bottom - root_bbox.bottom,\n                left: root_bbox.left - nodel_bbox.left\n            };\n            nodel.style(\"white-space\", \"normal\");\n            placement_overflow[_dir].total_overflow = Object.keys(placement_overflow[_dir])\n                .filter(side => placement_overflow[_dir][side] > 0)\n                .reduce((sum, side) => {\n                    const side_overflow = placement_overflow[_dir][side];\n                    return sum + side_overflow;\n                }, 0);\n            if (placement_overflow[least_overflow_direction].total_overflow > placement_overflow[_dir].total_overflow) {\n                least_overflow_direction = _dir;\n            }\n            if (!ret) {\n                nodel.classed(_dir, false);\n            }\n            return ret;\n        }\n    };\n\n    // Public - hide the tooltip\n    //\n    // Returns a tip\n    tip.hide = function () {\n        const nodel = getNodeEl();\n        nodel.style(\"opacity\", 0).style(\"pointer-events\", \"none\");\n        return tip;\n    };\n\n    // Public: Proxy attr calls to the d3 tip container.\n    // Sets or gets attribute value.\n    //\n    // n - name of the attribute\n    // v - value of the attribute\n    //\n    // Returns tip or attribute value\n    tip.attr = function (n, v) {\n        if (arguments.length < 2 && typeof n === \"string\") {\n            return getNodeEl().attr(n);\n        }\n\n        const args = Array.prototype.slice.call(arguments);\n        selection.prototype.attr.apply(getNodeEl(), args);\n        return tip;\n    };\n\n    // Public: Proxy style calls to the d3 tip container.\n    // Sets or gets a style value.\n    //\n    // n - name of the property\n    // v - value of the property\n    //\n    // Returns tip or style property value \n    tip.style = function (n, v) {\n        if (arguments.length < 2 && typeof n === \"string\") {\n            return getNodeEl().style(n);\n        }\n\n        const args = Array.prototype.slice.call(arguments);\n        selection.prototype.style.apply(getNodeEl(), args);\n        return tip;\n    };\n\n    // Public: Set or get the direction of the tooltip\n    //\n    // v - One of n(north), s(south), e(east), or w(west), nw(northwest),\n    //     sw(southwest), ne(northeast) or se(southeast)\n    //\n    // Returns tip or direction\n    tip.direction = function (v) {\n        if (!arguments.length) return direction;\n        direction = v == null ? v : functor(v);\n\n        return tip;\n    };\n\n    // Public: Sets or gets the offset of the tip\n    //\n    // v - Array of [x, y] offset\n    //\n    // Returns offset or\n    tip.offset = function (v) {\n        if (!arguments.length) return offset;\n        offset = v == null ? v : functor(v);\n\n        return tip;\n    };\n\n    // Public: sets or gets the html value of the tooltip\n    //\n    // v - String value of the tip\n    //\n    // Returns html value or tip\n    tip.html = function (v) {\n        if (!arguments.length) return html;\n        html = v == null ? v : functor(v);\n\n        return tip;\n    };\n\n    // Public: sets or gets the root element anchor of the tooltip\n    //\n    // v - root element of the tooltip\n    //\n    // Returns root node of tip\n    tip.rootElement = function (v) {\n        if (!arguments.length) return rootElement;\n        rootElement = functor(v);\n\n        return tip;\n    };\n\n    // Public: destroys the tooltip and removes it from the DOM\n    //\n    // Returns a tip\n    tip.destroy = function () {\n        if (node) {\n            getNodeEl().remove();\n            node = null;\n        }\n        return tip;\n    };\n\n    function d3TipDirection() { return \"n\"; }\n    function d3TipOffset() { return [0, 0]; }\n    function d3TipHTML() { return \" \"; }\n\n    type DirectionCallback = () => { top: number, left: number };\n    const directionCallbacks = new Map<string, DirectionCallback>([\n        [\"n\", directionNorth],\n        [\"s\", directionSouth],\n        [\"e\", directionEast],\n        [\"w\", directionWest],\n        [\"nw\", directionNorthWest],\n        [\"ne\", directionNorthEast],\n        [\"sw\", directionSouthWest],\n        [\"se\", directionSouthEast]\n    ]);\n    const directions = Array.from(directionCallbacks.keys());\n\n    function directionNorth() {\n        const bbox = getScreenBBox(window);\n        return {\n            top: bbox.n.y - node.offsetHeight,\n            left: bbox.n.x - node.offsetWidth / 2\n        };\n    }\n\n    function directionSouth() {\n        const bbox = getScreenBBox(window);\n        return {\n            top: bbox.s.y + 8,\n            left: bbox.s.x - node.offsetWidth / 2\n        };\n    }\n\n    function directionEast() {\n        const bbox = getScreenBBox(window);\n        return {\n            top: bbox.e.y - node.offsetHeight / 2,\n            left: bbox.e.x + 8\n        };\n    }\n\n    function directionWest() {\n        const bbox = getScreenBBox(window);\n        return {\n            top: bbox.w.y - node.offsetHeight / 2,\n            left: bbox.w.x - node.offsetWidth - 8\n        };\n    }\n\n    function directionNorthWest() {\n        const bbox = getScreenBBox(window);\n        return {\n            top: bbox.nw.y - node.offsetHeight,\n            left: bbox.nw.x - node.offsetWidth\n        };\n    }\n\n    function directionNorthEast() {\n        const bbox = getScreenBBox(window);\n        return {\n            top: bbox.ne.y - node.offsetHeight,\n            left: bbox.ne.x\n        };\n    }\n\n    function directionSouthWest() {\n        const bbox = getScreenBBox(window);\n        return {\n            top: bbox.sw.y,\n            left: bbox.sw.x - node.offsetWidth\n        };\n    }\n\n    function directionSouthEast() {\n        const bbox = getScreenBBox(window);\n        return {\n            top: bbox.se.y,\n            left: bbox.se.x\n        };\n    }\n\n    function initNode() {\n        const div = select(document.createElement(\"div\"));\n        div\n            .attr(\"class\", \"d3-tip\")\n            .style(\"position\", \"absolute\")\n            .style(\"top\", \"0px\")\n            .style(\"opacity\", 0)\n            .style(\"pointer-events\", \"none\")\n            .style(\"box-sizing\", \"border-box\");\n\n        return div.node();\n    }\n\n    function getSVGNode(element) {\n        const svgNode = element.node();\n        if (!svgNode) return null;\n        if (svgNode.tagName.toLowerCase() === \"svg\") return svgNode;\n        return svgNode.ownerSVGElement;\n    }\n\n    function getNodeEl() {\n        if (node == null) {\n            node = initNode();\n            // re-add node to DOM\n            rootElement().appendChild(node);\n        }\n        return select(node);\n    }\n\n    // Private - gets the screen coordinates of a shape\n    //\n    // Given a shape on the screen, will return an SVGPoint for the directions\n    // n(north), s(south), e(east), w(west), ne(northeast), se(southeast),\n    // nw(northwest), sw(southwest).\n    //\n    //    +-+-+\n    //    |   |\n    //    +   +\n    //    |   |\n    //    +-+-+\n    //\n    // Returns an Object {n, s, e, w, nw, sw, ne, se}\n    function getScreenBBox(targetShape) {\n        let targetel = target || targetShape;\n\n        while (targetel.getCTM == null && targetel.parentNode != null) {\n            targetel = targetel.parentNode;\n        }\n\n        const bbox: any = {};\n        const matrix = targetel.getCTM();\n        const tbbox = targetel.getBBox();\n        const width = tbbox.width;\n        const height = tbbox.height;\n        const x = tbbox.x;\n        const y = tbbox.y;\n\n        point.x = x;\n        point.y = y;\n        bbox.nw = point.matrixTransform(matrix);\n        point.x += width;\n        bbox.ne = point.matrixTransform(matrix);\n        point.y += height;\n        bbox.se = point.matrixTransform(matrix);\n        point.x -= width;\n        bbox.sw = point.matrixTransform(matrix);\n        point.y -= height / 2;\n        bbox.w = point.matrixTransform(matrix);\n        point.x += width;\n        bbox.e = point.matrixTransform(matrix);\n        point.x -= width / 2;\n        point.y -= height / 2;\n        bbox.n = point.matrixTransform(matrix);\n        point.y += height;\n        bbox.s = point.matrixTransform(matrix);\n\n        return bbox;\n    }\n\n    // Private - replace D3JS 3.X d3.functor() function\n    function functor(v) {\n        return typeof v === \"function\" ? v : function () {\n            return v;\n        };\n    }\n\n    return tip;\n}\n","import { Widget } from \"@hpcc-js/common\";\nimport { format as d3Format } from \"d3-format\";\nimport { tip } from \"./Tooltip.ts\";\n\nimport \"../src/ITooltip.css\";\n\n//  Use old school class declaration as this is a mixin  ---\nexport function ITooltip(this: any) {\n    this.tooltip = tip();\n\n    if (this.tooltipLabelFormat_exists()) {\n        this._labelFormatter = d3Format(this.tooltipLabelFormat() as string);\n    }\n\n    if (this.tooltipValueFormat_exists()) {\n        this._valueFormatter = d3Format(this.tooltipValueFormat() as string);\n    }\n\n    if (this.layerEnter) {\n        const layerEnter = this.layerEnter;\n        this.layerEnter = function (_base, svgElement, _domElement) {\n            if (!this._parentOverlay) {\n                this._parentOverlay = _base._parentOverlay;\n            }\n            this.tooltipEnter(svgElement);\n            layerEnter.apply(this, arguments);\n        };\n        const layerUpdate = this.layerUpdate;\n        this.layerUpdate = function (_base) {\n            layerUpdate.apply(this, arguments);\n            this.tooltipUpdate();\n        };\n        const layerExit = this.layerExit;\n        this.layerExit = function (_base) {\n            this.tooltipExit();\n            layerExit.apply(this, arguments);\n        };\n    } else {\n        const enter = this.enter;\n        this.enter = function (_domNode, element) {\n            this.tooltipEnter(element);\n            enter.apply(this, arguments);\n        };\n        const update = this.update;\n        this.update = function (_domNode, _element) {\n            update.apply(this, arguments);\n            this.tooltipUpdate();\n        };\n        const exit = this.exit;\n        this.exit = function (_domNode, _element) {\n            this.tooltipExit();\n            exit.apply(this, arguments);\n        };\n    }\n}\nITooltip.prototype = Object.create(Widget.prototype);\nITooltip.prototype.constructor = ITooltip;\n\n// abstract target(): any;\n// abstract target(_: any): this;\n\nITooltip.prototype.tooltipEnter = function (element) {\n    const overlayElement = this.parentOverlay();\n    if (!overlayElement.empty()) {\n        this.tooltip.rootElement(overlayElement.node().parentNode);\n    }\n    element.call(this.tooltip);\n};\n\nITooltip.prototype.tooltipUpdate = function () {\n    this.tooltip.offset((_data, event) => {\n        if (event && this.tooltipFollowMouse()) {\n            const d3tipElement: HTMLDivElement = document.querySelector(\".d3-tip\"); // d3Tip offers no reference to the '.d3-tip' element...?\n            d3tipElement.style.display = \"block\";\n            d3tipElement.style.left = this.tooltipOffset() + event.clientX + \"px\";\n            d3tipElement.style.top = event.clientY + \"px\";\n            return [];\n        }\n        switch (this.tooltip.direction()()) {\n            case \"e\":\n                return [0, this.tooltipOffset()];\n            default:\n                return [-this.tooltipOffset(), 0];\n        }\n    });\n\n    let classed = this.tooltip.attr(\"class\");\n    if (classed) {\n        classed = classed.split(\" notick\").join(\"\") + (this.tooltipTick() ? \"\" : \" notick\") + (this.tooltipStyle() === \"none\" ? \" hidden\" : \"\");\n        classed = classed.split(\" \")\n            .filter(function (_class) {\n                return _class.indexOf(\"ITooltip-tooltipStyle-\") !== 0;\n            })\n            .join(\" \")\n            ;\n        classed += \" ITooltip-tooltipStyle-\" + this.tooltipStyle();\n        this.tooltip\n            .attr(\"class\", classed)\n            ;\n    }\n};\n\nITooltip.prototype.tooltipExit = function () {\n    if (this.tooltip) {\n        this.tooltip.destroy();\n    }\n};\n\nITooltip.prototype._tooltipHTML = function (d) {\n    return d;\n};\n\nITooltip.prototype.tooltipHTML = function (_) {\n    return this.tooltip.html(_);\n};\n\nITooltip.prototype.tooltipFormat = function (opts: { label?: string | number, series?: string | number, value?: Date | string | number, arr?: Array<{ color: string, label: string, value: string }> } = {}) {\n    opts.label = opts.label === undefined ? \"\" : opts.label;\n    if (this._labelFormatter) {\n        opts.label = this._labelFormatter(opts.label) || \"\";\n    } else if (this.formatData && this.parseData) {\n        opts.label = this.formatData(this.parseData(opts.label));\n    }\n    opts.series = opts.series || \"\";\n    if (opts.value instanceof Date) {\n        opts.value = opts.value || \"\";\n    } else if (this._valueFormatter) {\n        opts.value = this._valueFormatter(opts.value) || \"\";\n    } else if (this.formatValue && this.parseValue) {\n        opts.value = this.formatValue(this.parseValue(opts.value));\n    }\n    switch (this.tooltipStyle()) {\n        case \"none\":\n            break;\n        case \"series-table\":\n            let html = '<table class=\"ITooltip-series-table\">'\n                + \"<thead>\"\n                + '<tr><th colspan=\"2\">' + opts.label + \"</th></tr>\"\n                + \"</thead>\"\n                + \"<tbody>\";\n            opts.arr.forEach(function (row) {\n                html += \"<tr>\";\n                html += \"<td>\";\n                html += '<div class=\"series-table-row-color\" style=\"background-color:' + row.color + '\"></div>';\n                html += '<div class=\"series-table-row-label\">' + row.label + \"</div>\";\n                html += \"</td>\";\n                html += '<td><div class=\"series-table-row-value\">' + row.value + \"</div></td>\";\n                html += \"</tr>\";\n            });\n            html += \"</tbody>\";\n            html += \"</table>\";\n            return html;\n        default:\n            if (opts.series) {\n                return \"<span style='color:\" + this.tooltipSeriesColor() + \"'>\" + opts.series + \"</span> / <span style='color:\" + this.tooltipLabelColor() + \"'>\" + opts.label + \"</span>:  <span style='color:\" + this.tooltipValueColor() + \"'>\" + opts.value + \"</span>\";\n            }\n            if (opts.label !== \"\") {\n                return \"<span style='color:\" + this.tooltipLabelColor() + \"'>\" + opts.label + \"</span>:  <span style='color:\" + this.tooltipValueColor() + \"'>\" + opts.value + \"</span>\";\n            }\n            return \"<span style='color:\" + this.tooltipValueColor() + \"'>\" + opts.value + \"</span>\";\n    }\n};\n\nITooltip.prototype.tooltipKeyValueFormat = function (titleKey: string, obj: object): string {\n    let body = \"\";\n    for (const key in obj) {\n        if (key !== titleKey) {\n            const value = obj && obj[key] ? obj[key] : \"\";\n            body += `<tr><td style=\"${this.tooltipLabelColor_exists() ? \"color:\" + this.tooltipLabelColor() : \"\"}\">${key}</td><td style=\"font-weight:normal\">${value}</td></tr>`;\n        }\n    }\n    return `<table>\n                    <thead>\n                        <tr><th colspan=\"2\" style=\"font-weight:bold;font-size:16px\">${obj[titleKey]}</th></tr>\n                    </thead>\n                    <tbody>\n                        ${body}\n                    </tbody>\n                </table>`;\n};\n\nexport interface ITooltip {\n    tooltipStyle: { (): \"default\" | \"none\" | \"series-table\"; (_: \"default\" | \"none\" | \"series-table\"): ITooltip; };\n    tooltipFollowMouse: { (): boolean; (_: boolean): ITooltip; };\n    tooltipLabelFormat: (_?) => string | ITooltip;\n    tooltipLabelFormat_exists: () => boolean;\n    tooltipValueFormat: (_?) => string | ITooltip;\n    tooltipValueFormat_exists: () => boolean;\n    tooltipSeriesColor: { (): string; (_: string): ITooltip; };\n    tooltipLabelColor: { (): string; (_: string): ITooltip; };\n    tooltipLabelColor_exists: () => boolean;\n    tooltipValueColor: { (): string; (_: string): ITooltip; };\n    tooltipTick: { (): boolean; (_: boolean): ITooltip; };\n    tooltipOffset: { (): number; (_: number): ITooltip; };\n    tooltipOffset_default: { (): number; (_: number): ITooltip; };\n}\nITooltip.prototype.publish(\"tooltipStyle\", \"default\", \"set\", \"Style mode\", [\"default\", \"none\", \"series-table\"], {});\nITooltip.prototype.publish(\"tooltipFollowMouse\", false, \"boolean\", \"If true, the tooltip will follow mouse movement\", null, {});\nITooltip.prototype.publish(\"tooltipLabelFormat\", undefined, \"string\", \"Format of tooltip label(s) (the domain axis)\", null, {});\nITooltip.prototype.publish(\"tooltipValueFormat\", undefined, \"string\", \"Number format of tooltip value(s)\", null, {});\nITooltip.prototype.publish(\"tooltipSeriesColor\", \"#EAFFFF\", \"html-color\", \"Color of tooltip series text\", null, {});\nITooltip.prototype.publish(\"tooltipLabelColor\", \"#CCFFFF\", \"html-color\", \"Color of tooltip label text (the domain axis)\", null, {});\nITooltip.prototype.publish(\"tooltipValueColor\", \"white\", \"html-color\", \"Color of tooltip value(s)\", null, {});\nITooltip.prototype.publish(\"tooltipTick\", true, \"boolean\", \"Show tooltip tick\", null, {});\nITooltip.prototype.publish(\"tooltipOffset\", 8, \"number\", \"Offset from the cursor\", null, {});\n\nconst tooltipLabelFormat = ITooltip.prototype.tooltipLabelFormat;\nITooltip.prototype.tooltipLabelFormat = function (_?): string | ITooltip {\n    const retVal = tooltipLabelFormat.apply(this, arguments);\n    if (arguments.length) {\n        this._labelFormatter = d3Format(_);\n    }\n    return retVal;\n};\n\nconst tooltipValueFormat = ITooltip.prototype.tooltipValueFormat;\nITooltip.prototype.tooltipValueFormat = function (_?): string | ITooltip {\n    const retVal = tooltipValueFormat.apply(this, arguments);\n    if (arguments.length) {\n        this._valueFormatter = d3Format(_);\n    }\n    return retVal;\n};\n","import { Palette } from \"@hpcc-js/common\";\n\n//  Use old school class declaration as this is a mixin  ---\nexport function ITree() {\n}\nITree.prototype.constructor = ITree;\n\n//  Events  ---\nITree.prototype.click = function (row, column, selected) {\n};\n\nITree.prototype.dblclick = function (row, column, selected) {\n};\n\nITree.prototype._palette = Palette.ordinal(\"default\");\n"],"mappings":"C,8VAAae,EAAW,eACXC,EAAc,QACdC,EAAgB,SCA7B,SAAgB,UAAW,CAC3B,CACA,SAAS,UAAU,YAAc,KACjC,SAAS,UAAU,SAAWjB,EAAAA,QAAQ,QAAQ,SAAS,EAGvD,SAAS,UAAU,MAAQ,SAAU,EAAK,EAAQ,EAAU,CAC5D,EAEA,SAAS,UAAU,SAAW,SAAU,EAAK,EAAQ,EAAU,CAC/D,ECTA,SAAgB,UAAW,CAC3B,CACA,SAAS,UAAU,YAAc,KACjC,SAAS,UAAU,SAAWC,EAAAA,QAAQ,QAAQ,SAAS,EAEvD,SAAS,UAAU,UAAY,SAAU,EAAY,EAAQ,EAAO,EAAiB,CACjF,OAAO,KAAK,SAASkB,EAAI,EAAE,CAC/B,EAEA,SAAS,UAAU,YAAc,SAAU,EAAY,EAAQ,EAAO,EAAiB,CACnF,OAAA,EAAOjB,EAAAA,IAAAA,CAAM,KAAK,UAAUiB,EAAKC,EAAQC,EAAOC,CAAO,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,SAAS,CAChF,EAEA,SAAS,UAAU,UAAY,SAAU,EAAY,EAAQ,EAAO,EAAiB,CACjF,OAAOrB,EAAAA,QAAQ,UAAU,KAAK,UAAUkB,EAAKC,EAAQC,EAAOC,CAAO,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