!function(){function e(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function t(t){for(var n=1;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&void 0!==arguments[0]?arguments[0]:!i.showPopup,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e!==i.showPopup&&(i.showPopup=e,i.transition=!t.immediate,e&&(i.showWrapper=!0))},renderTitle:function(){if(r.title)return r.title();if(e.title)return e.title;var t=e.options.find((function(t){return t.value===e.modelValue}));return t?t.text:""}}),function(){return e.teleport?m(S,{to:e.teleport},{default:function(){return[h()]}}):h()}}console.error("[Vant] must be a child component of .")}}),se=D(ce),de=D(oe);e("default",a({name:"accompany-music-list",props:{musicTree:{type:Array,default:function(){return[]}}},setup:function(e,n){var o=E();U();var i=K("icon-music.svg"),a=l({}),u=C({loading:!1,finished:!1,refreshing:!1,musicTree:[],pagenation:{page:1,rows:20},value1:null,value2:null,PopoverOpen:!1,list:[],keyword:""}),c=function(){var e=r(regeneratorRuntime.mark((function e(){var t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,H.get(M.platformApi+"/musicSheetCategories/queryTree?enable=true");case 3:t=e.sent,Array.isArray(null==t?void 0:t.data)&&(u.musicTree=t.data),Q((function(){v()})),e.next=11;break;case 8:e.prev=8,e.t0=e.catch(0),console.log(e.t0);case 11:case"end":return e.stop()}}),e,null,[[0,8]])})));return function(){return e.apply(this,arguments)}}(),s=function(){var e=r(regeneratorRuntime.mark((function e(){var t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,H.get("/api-student/student/member");case 3:t=e.sent,a.value=t.data||{},e.next=9;break;case 7:e.prev=7,e.t0=e.catch(0);case 9:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(){return e.apply(this,arguments)}}(),f=d((function(){var e=u.musicTree.find((function(e){return e.id==o.query.categorieid}));return Array.isArray(null==e?void 0:e.musicSheetCategoriesList)?e.musicSheetCategoriesList.map((function(e){return u.value1||(u.value1=e.id,u.value2=null),{text:e.name,value:e.id}})):[]})),p=d((function(){var e=u.musicTree.find((function(e){return e.id==o.query.categorieid}));if(Array.isArray(null==e?void 0:e.musicSheetCategoriesList)){var t=e.musicSheetCategoriesList.find((function(e){return e.id==u.value1}));if(Array.isArray(null==t?void 0:t.musicSheetCategoriesList))return[{text:"全部",value:null}].concat(t.musicSheetCategoriesList.map((function(e){return{text:e.name,value:e.id}})))}return[{text:"全部",value:null}]})),v=function(){var e=r(regeneratorRuntime.mark((function e(){var n,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!u.loading){e.next=2;break}return e.abrupt("return");case 2:return u.loading=!0,e.prev=3,e.next=6,H.post(M.platformApi+"/musicSheet/page",{data:t(t({},u.pagenation),{},{keyword:u.keyword,musicSheetCategoriesId:u.value2||u.value1}),hideLoading:!0});case 6:r=e.sent,Array.isArray(null==r||null===(n=r.data)||void 0===n?void 0:n.rows)?(u.list=[].concat(u.list,r.data.rows),u.pagenation.page+=1,u.finished=!r.data.rows.length):u.finished=!0,e.next=13;break;case 10:e.prev=10,e.t0=e.catch(3),u.finished=!0;case 13:u.loading=!1,u.refreshing=!1;case 15:case"end":return e.stop()}}),e,null,[[3,10]])})));return function(){return e.apply(this,arguments)}}(),g=function(){u.pagenation.page=1,u.list=[],u.finished=!1,u.list=[],v()};return W((function(){s(),c()})),function(){var e;return m("div",{class:N["accompany-music-list"]},[m(_,{mode:"sticky",class:N.heade,onGetHeight:function(e){document.documentElement.style.setProperty("--header-height",e+"px")}},{default:function(){return[m("div",null,[m(de,{activeColor:"var(--van-primary)"},{default:function(){return[m(se,{modelValue:u.value1,"onUpdate:modelValue":function(e){return u.value1=e},options:f.value,onChange:function(e){u.value2=null,g()}},null),m(se,{modelValue:u.value2,"onUpdate:modelValue":function(e){return u.value2=e},options:p.value,onChange:function(){return g()}},null)]}}),m("div",{class:N.filter},[m(F,{style:{width:"100%"},background:"transparent",onSearch:function(e){u.keyword=e,g()}},null)])])]}}),m(G,{modelValue:u.refreshing,"onUpdate:modelValue":function(e){return u.refreshing=e},onRefresh:g,style:"min-height: calc(100vh - var(--header-height))"},{default:function(){return[m(X,{"loading-text":" ",immediateCheck:!1,loading:u.loading,finished:u.finished,"onUpdate:finished":function(e){return u.finished=e},finishedText:" ",onLoad:function(){v()}},{default:function(){return[m(Y,{inset:!0},(t=e=u.list.map((function(e){return m(J,{size:"large",center:!0,title:e.musicSheetName,isLink:!0,onClick:function(){return function(e){var t="".concat(location.origin,"/orchestra-music-score/?id=").concat(e.id);$({api:"openAccompanyWebView",content:{url:t,orientation:0,isHideTitle:!0,statusBarTextColor:!1,isOpenLight:!0}})}(e)}},{icon:function(){return m(I,{style:{marginRight:"12px"},size:40,name:i},null)}})})),"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!B(t)?e:{default:function(){return[e]}}))];var t}}),!u.loading&&!u.list.length&&m(q,{tips:"暂无曲谱"},null)]}})])}}}))}}}))}();