(()=>{function t(n,t,e,r,i){var o=this,a=i.getThisMonth(),c=i.getThisDay();function u(t){o.supportedFunctionalities=t}function s(t){o.currentProvider=t.providerName}function v(t){var e;return"ericsson"===o.currentProvider&&(_.set(o,"commonData.currentDayDataUsage",i.getThisDayDataUsage(n.deviceId,c,0<arguments.length&&void 0!==t&&t)),e=_.get(o,"commonData.currentDayDataUsage")),"ericsson"!==o.currentProvider&&"comarch"!==o.currentProvider&&(_.set(o,"commonData.currentMonthDataUsage",r.getTerminalDataUsage(n.deviceId,{},a)),e=_.get(o,"commonData.currentMonthDataUsage")),e}_.assign(o,{$onInit:function(){r.ping().then(function(){return i.isDeviceSupportedByCurrentProvider(n.deviceId)}).then(function(){return i.checkConnectivityCache(n.deviceId)}).then(i.getCurrentProviderDetails).then(s).then(function(){return v()}).then(_.constant(!0)).catch(_.constant(!1)).then(function(t){o.available=t}),i.getProviderSupportedFunctionalities().then(u)},available:!1,reload:function(){o.available=!1,(v(!0)||e.resolve()).then(function(){t(function(){o.available=!0},100)})},supportedFunctionalities:{},currentProvider:{}})}t.$inject=["$routeParams","$timeout","$q","c8yConnectivity","connectivityService"],angular.module("c8y.connectivityV2").component("c8yConnectivityV2",{controller:t,controllerAs:"vm",templateUrl:":::PLUGIN_PATH:::/connectivityV2.html"})})();