!function(){function e(e,a){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);a&&(c=c.filter((function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable}))),n.push.apply(n,c)}return n}function a(a){for(var c=1;c0&&r("div",{class:[S.albumSection,S.searchAllTitle]},[r("div",{class:S.albumTitle},[r("span",null,[f("专辑")]),r("span",{class:S.more,onClick:function(){j("".concat(location.origin,"/tenant/#/music-album"),(function(){n.push({path:"/music-album"})}))}},[f("更多 "),r(d,{name:"arrow"},null)])]),r("div",{class:S.musicGrid},[r(O,{showLight:!0,lightText:v.defauleParams.idAndName,list:v.albumList,onGoto:function(e){j("".concat(location.origin,"/tenant/#/music-album-detail/").concat(e.id),(function(){n.push({name:"music-album-detail",params:{id:e.id}})}))}},null),v.albumList.length<=0&&!v.loading&&r(m,{tips:"暂无专辑",btnStatus:!1,classImgSize:"SMALL"},null)])]),r("div",{class:[S.albumSection,S.searchAllTitle,S.musicGroup]},[r("div",{class:S.albumTitle},[f("单曲")]),r(w,{hideSearch:!0,ref:y,onItemClick:function(e){j("".concat(location.origin,"/tenant/#/music-detail?id=").concat(e.id),(function(){n.push({path:"/music-detail",query:{id:e.id}})}))},showLight:!0,lightText:v.defauleParams.idAndName,defauleParams:a(a({},e.defauleParams),{},{idAndName:e.defauleParams.search})},null)])])}}});e("default",n({name:"MusicSearch",emits:["confirm"],setup:function(){localStorage.setItem("behaviorId",p());var e=t(),a=i(),n=l(e.query.search||""),c=l(e.query.tagids||""),u=l(),f=l(!1),d=v("music-search",[]),m=l("all"),g=x(P.SEARCH);u.value=g.id;var j=function(e){if("all"!==m.value){var a,c;n.value=e;var t=d.value.indexOf(e);t>-1&&d.value.splice(t,1),e&&(d.value.unshift(e),d.value.length=Math.min(d.value.length,10)),null===(a=("album"===m.value?I:L).value)||void 0===a||null===(c=a.onSearch)||void 0===c||c.call(a,e)}},S=function(e){var a,n,t=Object.values(e).flat().filter(Boolean).join(",");c.value=t,null===(a=(n=("album"===m.value?I:L).value).onComfirm)||void 0===a||a.call(n,e),f.value=!1},O=function(e){var a,n;u.value=e.id,null===(a=(n=("album"===m.value?I:L).value).onComfirmSubject)||void 0===a||a.call(n,e)},I=l(null),L=l(null),A=function(e,a){n.value=a,m.value=e};return s((function(){h.on("changeTab",A),h.on("search",j),h.on("confirm",S),h.on("confirmSubject",O)})),o((function(){h.off("changeTab",A),h.off("search",j),h.off("confirm",S),h.off("confirmSubject",O)})),function(){return r("div",{class:y.search},["all"===m.value&&r(T,{defauleParams:{idAndName:n.value,albumTagIds:c.value,subjectIds:u.value}},null),"album"===m.value&&r("div",{class:"mt12"},[r(b,{hideSearch:!0,showLight:!0,lightText:n.value,ref:I,defauleParams:{search:n.value,albumTagIds:c.value,subjectIds:u.value}},null)]),"songe"===m.value&&r("div",{class:[y.musicGroup]},[r(w,{hideSearch:!0,showLight:!0,lightText:n.value,defauleParams:{idAndName:n.value,albumTagIds:c.value,subjectIds:u.value},ref:L,onItemClick:function(n){a.push({path:"/music-detail",query:{id:n.id,albumId:e.params.id}})}},null)])])}}}))}}}))}();