function HelloWorker(){function i(t){CommonWorker.call(t,e),t.setServiceListener(t),t.sendToStockholm({messageType:"workerInitialized",content:{source:e}})}function s(){return e}function o(e,t,r,i){if(n[i.user]===undefined){this.handleNavigateOrSearchFailure(this.errorDefines.getErrorCode("UNKNOWN_SOURCE_ACCOUNT_ERROR"),"User account("+i.user+") does not exist.","UNKNOWN_SOURCE_ACCOUNT_ERROR",i);return}switch(e.type["#text"]){case"topMenu":switch(e.name["#text"]){default:this.handleNavigateOrSearchFailure(null,"Unhandled item name: "+e.name["#text"],null,i)}break;case"playlists":v(e,i);break;default:this.handleNavigateOrSearchFailure(null,"Error: Unhandled ITEM TYPE: "+e.type["#text"],null,i)}}function u(r,i){var s={source:e,username:r};if(r!==undefined&&i!==undefined)if(n[r]===undefined){var o=Math.random().toString(36).replace(/[^a-z]+/g,"").substr(0,20);d(r,o),this.createAccountSuccessResponse(e,r,o,t)}else p(this.errorDefines.getErrorCode("SOURCE_ALREADY_EXISTS"),"Account already exists",s);else p(this.errorDefines.getErrorCode("HELLO_INVALID_USERNAME"),"Invalid user name or password",s)}function a(t){var n=t.type!==undefined&&t.type==="message"?t.data:t,r=n.messageType;switch(r){default:typeof this[r]=="function"?this[r](n.content):this.consoleLog("The messageType "+r+" is not being handled by "+e+" worker.")}}function f(t,n,r){var i=r.accountSettings;d(t,n,i),this.recreateAccountSuccessResponse(t,e)}function l(e){e.user!==undefined&&delete n[e.user]}function c(e,t,r){if(!r||r.user==undefined||n[r.user]==undefined){this.handleNavigateOrSearchFailure(this.errorDefines.getErrorCode("UNKNOWN_SOURCE_ACCOUNT_ERROR"),"Invalid source account.","UNKNOWN_SOURCE_ACCOUNT_ERROR",r);return}}function h(e,t,n){}function p(t,n,i){r.createAccountFailureResponse(e,i.username,null,t,n)}function d(e,t,r){n[e]={token:t};if(r!==undefined)for(var i in r)n[e][i]===undefined&&(n[e][i]=r[i])}function v(e,t){var n=t.message.body.navigate.attributess.source,i=t.message.body.navigate.attributess.sourceAccount,s=objFactory.getObj("items");s.addChild(objFactory.getObj("item").setName("My list").setType("playlist").setToken("all").setDuration("200012").setArtistName("Artist").setDescription("Desc").setAlbumName("Album"));var o=objFactory.getObj("sections"),u=objFactory.getObj("section").setItems(s).setTitle("Playlists");o.addChild(u);var a=r.formatResponseToXML(t,objFactory.getObj("navigateresponse").setSource(n).setSourceAccount(i).setSections(o).setTotalItems(1));r.returnResponse(a,t)}this.switchOnMessage=a,this.getSourceName=s,this.navigateOnItem=o,this.createAccount=u,this.handleRecreateAccountRequest=f,this.removeAccount=l,this.fullSearch=c,this.autoSearch=h;var e="hello",t="13",n={},r=this;i(this)};