define(["exports"],function(_exports){Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.default=void 0;var ServerSync=function(){function ServerSync(){babelHelpers.classCallCheck(this,ServerSync)}return babelHelpers.createClass(ServerSync,[{key:"sync",value:function(connectionManager,server,options){if(!server.AccessToken&&!server.ExchangeToken)return console.log("Skipping sync to server "+server.Id+" because there is no saved authentication information."),Promise.resolve();return connectionManager.connectToServer(server,{updateDateLastAccessed:!1,enableWebSocket:!1,reportCapabilities:!1,enableAutomaticBitrateDetection:!1}).then(function(result){return"SignedIn"!==result.State?(console.log("Unable to connect to server id: "+server.Id),Promise.reject()):function(apiClient,options){return console.log("ServerSync.performSync to server: "+apiClient.serverId()),options=options||{},require(["mediasync"]).then(function(responses){return(new responses[0]).sync(apiClient,options)})}(connectionManager.getApiClient(server.Id),options)})}}]),ServerSync}();_exports.default=ServerSync});