export const __webpack_esm_id__=2519;export const __webpack_esm_ids__=[2519];export const __webpack_esm_modules__={2519(t,r,e){function n(t,r,e,n,o){return{addLocationHttp:function(t){let e;return n.addLocation(t).catch(t=>{const e=getError(t.data,t.status);return r.error(e,o.instant("common.error")),!1}).then(t=>!!t&&a()).then(r=>{if(!1!==r)return e=r.find(r=>r.endpoint===t.uri),e})},getLocationsWithRpcAddresses:a,createNewLocation:function(t){return{uri:t,authType:"signature",username:"",password:"",active:!1,clusterMode:!0,isLocal:!1}},isInCluster:function(t,r){return t.some(t=>r.rpcAddress===t.address)}};function a(){return n.getLocations().then(function(t){return t.data.map(t=>({isLocal:t.local,endpoint:t.uri,rpcAddress:t.rpcAddress||"",error:t.errorMsg}))}).catch(function(t){const e=getError(t.data,t.status);r.error(e,o.instant("common.error"))}).then(t=>{if(t)return function(t){const r=t.filter(t=>!t.isLocal&&!t.error).map(t=>function(t){return n.getLocationRpcAddress(t.endpoint)}(t).then(r=>(t.rpcAddress=r.data,t.isAvailable=!0,t)).catch(r=>{t.isAvailable=!1,t.error=getError(r.data,r.status)}));return Promise.allSettled(r).then(()=>t)}(t)})}}e(4764),angular.module("graphdb.framework.clustermanagement.services.remote-locations",[]).factory("RemoteLocationsService",n),n.$inject=["$http","toastr","$uibModal","LocationsRestService","$translate"]}};
//# sourceMappingURL=2519.4cef4fb68b2b3099473b.bundle.js.map