/**
 * Minified by jsDelivr using Terser v5.39.0.
 * Original file: /npm/@domoinc/ca-trend-number@2.0.6/dist/bundle.js
 *
 * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
 */
/*! Copyright 2016 Domo Inc. */
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("d3"),require("d3.chart"),require("moment"),require("@domoinc/base-widget"),require("@domoinc/ca-icon-trends-with-text"),require("@domoinc/arrow-single-value-indicator")):"function"==typeof define&&define.amd?define(["d3","d3.chart","moment","base-widget","ca-icon-trends-with-text","arrow-single-value-indicator"],t):"object"==typeof exports?exports.CATrendNumber=t(require("d3"),require("d3.chart"),require("moment"),require("@domoinc/base-widget"),require("@domoinc/ca-icon-trends-with-text"),require("@domoinc/arrow-single-value-indicator")):e.CATrendNumber=t(e.d3,e["d3.chart"],e.moment,e.BaseWidget,e.CAIconTrendsWithText,e.ArrowSingleValueIndicator)}(this,(function(e,t,o,i,n,r){return function(e){var t={};function o(i){if(t[i])return t[i].exports;var n=t[i]={exports:{},id:i,loaded:!1};return e[i].call(n.exports,n,n.exports,o),n.loaded=!0,n.exports}return o.m=e,o.c=t,o.p="/dist/",o(0)}([function(e,t,o){"use strict";var i=o(1),n=(o(2),o(3)),r=o(4),a=o(5),c=o(6);e.exports=r.extend("CATrendNumber",{initialize:function(){var e=this;e._layerGroup.classed("layerGroup",!0),e.indicatorChart=e._layerGroup.append("g").attr("class","indicatorWidget"),e.sparklineChart=e._layerGroup.append("g").attr("class","sparklineWidget");var t=new c(e.indicatorChart),o=new a(e.sparklineChart);this._newConfig={chartName:{description:"Name of chart for Reporting",type:"string",value:"CATrendNumber"},width:{description:"Width of chart",type:"number",value:"250"},height:{description:"Height of chart",type:"number",value:"250"}},this.mergeConfig(t._newConfig),this.mergeConfig(o._newConfig),this.mergeConfig(e._newConfig),this._config.generalStrokeGoodColor.name="Line Good Color",this._config.generalStrokeGoodColor.description="Line color meant to indicate something good, like positive sales",this._config.generalStrokeNeutralColor.name="Line Neutral Color",this._config.generalStrokeNeutralColor.description="Line color meant to indicate something neutral",this._config.generalStrokeBadColor.name="Line Bad Color",this._config.generalStrokeBadColor.description="Line color meant to indicate something bad, like negative sales",this._config.incTrendColor.name="Indicator Good Color",this._config.incTrendColor.description="Indicator color meant to indicate something good, like positive sales",this._config.noTrendColor.name="Indicator Neutral Color",this._config.noTrendColor.description="Indicator color meant to indicate something neutral",this._config.decTrendColor.name="Indicator Bad Color",this._config.decTrendColor.description="Indicator color meant to indicate something bad, like negative sales",this._config.fontSize.description="Font size for the indicator",this._config.fontSize.value=32,this._config.fontWeight.description="Font boldness for the indicator",this._config.textFontFamily.description="Font type for the indicator",this._config.animationDuration.value=1500,this._config.drawCircle.value=!1,this._config.alignment.value={name:"Center",value:"center"},function(){for(var t=["alignment","indicatorColor","hoverEvent","fillOpacity","generalFillGoodColor","generalFillNeutralColor","generalFillBadColor"],o=0;o<t.length;o++)e._config[t[o]].name=void 0}(),e._newDataDefinition={Label:{type:"string",validate:function(e){return void 0!==this.accessor(e)},accessor:function(e){return String(e[0])}},Value:{type:"number",validate:function(e){return!isNaN(this.accessor(e))},accessor:function(e){return parseFloat(e[1])}}},this.mergeDataDefinition(e._newDataDefinition),e.demux=function(e,t){return t},e.transform=function(r){var a=[];!function(e,t){for(var o=0;o<e.length;o++)t.push([n(e[o][0],"YYYY-MM-DD").toDate(),e[o][1]]);t.sort((function(e,t){return e[0]<t[0]?-1:e[0]>t[0]?1:void 0}))}(e.validateData(r),a),function(n){var r=e._layerGroup.node().parentNode.parentNode,a=i.select(r).select("[id^=chartBounds]").node().getBBox(),c=n.slice(-1).concat(n.slice(0,1));e.indicatorChart.attr("transform","translate("+a.width/2+","+.35*a.height+")"),t.c({animationDuration:e.c("animationDuration")}).draw(c),e.sparklineChart.attr("transform","translate(0,"+.6*a.height+")"),o.c({height:a.height/4,width:.85*a.width,animationDuration:e.c("animationDuration")}).draw(n)}(a)}}})},function(t,o){t.exports=e},function(e,o){e.exports=t},function(e,t){e.exports=o},function(e,t){e.exports=i},function(e,t){e.exports=n},function(e,t){e.exports=r}])}));
//# sourceMappingURL=/sm/48e70c54e9cfc4672d8ebb115dd7c4ee5a67156c63c7537a85d3e684bdd5fd60.map