define(["./modules/serviceworker/sync.js","./modules/serviceworker/notifications.js","./modules/common/globalize.js"],function(_sync,_notifications,_globalize){function createConnectionManager(){return Promise.resolve()}function loadGlobalization(){globalThis.urlCacheParam&&_globalize.default.setCacheParam(globalThis.urlCacheParam);var globalize,translations,stringPromises=[];return stringPromises.push((globalize=_globalize.default,translations=["ar","bg-BG","ca","cs","da","de","el","en-GB","en-US","es","es-AR","es-MX","et-EE","fi","fr","fr-CA","gsw","he","hr","hu","id","it","ja","kk","ko","lt-LT","ms","nb","nl","pl","pt-BR","pt-PT","ro","ru","sk","sl-SI","sv","tr","uk","vi","zh-CN","zh-HK","zh-TW"].map(function(i){return{lang:i,path:"modules/common/strings/"+i+".json"}}),globalize.loadStrings({name:"sharedcomponents",translations:translations}))),Promise.all(stringPromises)}function onAppReady(){return globalThis.ConnectionManager.getApiClients(),Promise.resolve()}function onAppVersionResponse(appVersion){return globalThis.dashboardVersion=appVersion||null,console.log("appVersion: "+globalThis.dashboardVersion),console.log("loadServiceLocator"),Promise.resolve().then(createConnectionManager).then(loadGlobalization).then(onAppReady)}globalThis.appMode="standalone",console.log("serviceworker start"),caches.open("embyappinfo").then(function(cache){return console.log("serviceworker cache opened"),cache.match("appversion").then(function(appVersionResponse){return console.log("serviceworker cache read"),appVersionResponse?appVersionResponse.text().then(onAppVersionResponse,function(err){return console.error("error calling response.text(): ",err),onAppVersionResponse()}):onAppVersionResponse()})})});