(()=>{function t(t,e){e=e.createWidget(t);e.refresh=function(){t.dataPoint=this.getDataPoint(),t.measurement=this.getMeasurement(t.dataPoint),t.time=this.getTime(t.dataPoint)},e.onNotification=function(){t.dataPoint=this.getDataPoint(),t.measurement=this.getMeasurement(t.dataPoint),t.time=this.getTime(t.dataPoint)},e.getDataPoint=function(){return this.mostRecentKpi.dataPoints[0]||{}},e.getMeasurement=function(t){return this.mostRecentKpi.measurements[t.id]||{}},e.getTime=function(t){return this.mostRecentKpi.times[t.id]},e.init()}t.$inject=["$scope","baseWidgetSvc"],angular.module("c8y.parts.kpi").controller("gaugeCtrl",t)})();