System.register(["./index-legacy-69441be7-1694078809672.js","./index-legacy-da1c415f-1694078809672.js","./api-legacy-bdf6c288-1694078809672.js","./index-legacy-29bcc766-1694078809672.js","./catchData-legacy-1c3de09a-1694078809672.js"],(function(t,e){"use strict";var i,a,n,s,d,o,c,l,r,_,g,u,m,f,h,v,j=document.createElement("style");return j.textContent='._container_17qfj_1{display:flex;flex-direction:column;background:#FFFFFF;border-radius:1.04166667vw;min-height:100%}._tools_17qfj_8{padding:1.66666667vw 1.66666667vw 1.04166667vw;display:flex;align-items:flex-start;flex-shrink:0}._tools_17qfj_8 .n-input{margin-left:auto;width:18.75vw}._tools_17qfj_8 .n-input__input-el{height:100%;line-height:100%}._tools_17qfj_8 .n-button.n-button--disabled{cursor:initial;padding:0}._tools_17qfj_8 ._tagWrap_17qfj_26{flex:1;margin-right:1.04166667vw}._tools_17qfj_8 ._tags_17qfj_30{padding:.625vw 0}._tools_17qfj_8 ._tags_17qfj_30 ._firstButton_17qfj_33{display:flex;align-items:center;justify-content:center;height:100%;font-size:.9375rem;color:#999;line-height:1.30208333vw}._tools_17qfj_8 ._tags_17qfj_30 .n-button{min-width:5.3125vw;height:1.92708333vw;padding:0 1.25vw;font-size:.9375rem}._content_17qfj_48{flex:1;padding:0 .3125vw 1.875vw;gap:2.60416667vw 0;display:flex;flex-flow:row wrap;justify-content:flex-start;margin-left:-.625vw;margin-right:-.625vw}._content_17qfj_48._loadingContent_17qfj_58{min-height:50vh}._content_17qfj_48 ._itemWrap_17qfj_61{width:calc(100% / 6);padding-bottom:calc(100% / 6 * .909923);position:relative}._content_17qfj_48 ._itemWrap_17qfj_61 ._itemWrapBox_17qfj_66{position:absolute;left:0;top:0;width:100%;height:100%;padding:0 .625vw}._item_17qfj_61{margin:0 auto;position:relative;width:11.14583333vw;cursor:pointer;transition:all .3s}._item_17qfj_61 ._cover_17qfj_81{position:relative;overflow:hidden}._item_17qfj_61 ._cover_17qfj_81:before{content:"";position:absolute;top:5.57291667vw;left:0;width:11.14583333vw;height:11.14583333vw;background:#DDF2FF;border-radius:50%}._item_17qfj_61:hover{transform:scale(1.1)}._item_17qfj_61 ._itemImg_17qfj_98{position:relative;width:8.22916667vw;height:11.61458333vw;margin:auto;background-color:#edeff2;background-image:url('+new URL("icon_default-18367801.svg",e.meta.url).href+');background-repeat:no-repeat;background-position:center center}._item_17qfj_61 ._itemImg_17qfj_98:before{content:"";position:absolute;top:.20833333vw;right:-.20833333vw;width:.20833333vw;height:calc(100% - .41666667vw);background-color:#c5c5c5;z-index:1}._item_17qfj_61 ._itemImg_17qfj_98:after{content:"";position:absolute;top:.10416667vw;right:-.10416667vw;width:.20833333vw;height:calc(100% - .20833333vw);background-color:#e7e7e7;z-index:2}._item_17qfj_61 ._itemImg_17qfj_98 ._itemBg_17qfj_128{position:absolute;top:0;left:0;width:100%;height:100%;z-index:4;background-repeat:no-repeat;background-image:linear-gradient(to right,rgba(0,0,0,.2) 0,rgba(255,255,255,.08) 0%,transparent .5%),linear-gradient(to right,rgba(0,0,0,.1) .3%,rgba(255,255,255,.09) 1.1%,transparent 1.3%);background-size:50% 100%,50% 100%;background-position:0% top,9% top}._item_17qfj_61 ._itemImg_17qfj_98 .n-image{position:relative;width:100%;height:100%;z-index:3}._item_17qfj_61 ._itemImg_17qfj_98 img{transition:opacity .3s;opacity:0}._item_17qfj_61 ._itemImg_17qfj_98 img[data-loaded=true]{opacity:1}._item_17qfj_61 ._itemName_17qfj_153{margin-top:.83333333vw;font-size:.83333333rem;line-height:1.14583333vw;font-weight:500;color:#333;text-align:center}\n',document.head.appendChild(j),{setters:[t=>{i=t.T},t=>{a=t.d,n=t.u,s=t.e,d=t.n,o=t.f,c=t.w,l=t.F,r=t.j,_=t.k,g=t.A,u=t.t},t=>{m=t.a,f=t.b},t=>{h=t.T},t=>{v=t.u}],execute:function(){const e="_container_17qfj_1",j="_tools_17qfj_8",p="_tagWrap_17qfj_26",I="_tags_17qfj_30",w="_firstButton_17qfj_33",q="_content_17qfj_48",b="_loadingContent_17qfj_58",y="_itemWrap_17qfj_61",x="_itemWrapBox_17qfj_66",k="_item_17qfj_61",A="_cover_17qfj_81",T="_itemImg_17qfj_98",C="_itemBg_17qfj_128",S="_itemName_17qfj_153";t("default",a({name:"XiaokuAi",setup(){const t=v(),a=n(),z=localStorage.getItem("xiaoku-ai-search"),N=z?JSON.parse(z):{},F=s({musicTagIds:N.musicTagIds?N.musicTagIds:[],enable:!0,subjectId:N.subjectId||null,keyword:"",page:1,rows:9999}),B=s({tags:[],tagChildren:[],tagActiveId:N.tagActiveId||"",tagActive:{},list:[],loading:!1}),W=async()=>{B.loading=!0;try{const t=await f({...F,musicTagIds:[B.tagActiveId,...F.musicTagIds].filter(Boolean)});Array.isArray(t?.data?.rows)&&(B.list=t.data.rows)}catch{}B.loading=!1},J=(t,e)=>{if(!t?.length)return;const i={columnName:t[0].columnName,list:[]},a=[];for(let n=0;n{B.loading=!0;try{await(async()=>{const t=await m();if(Array.isArray(t?.data)&&t.data.length){B.tags=t.data||[];const e=B.tags.findIndex((t=>t.id==B.tagActiveId));if(e>-1){B.tagActiveId=t.data[e].id;const i=[];J(t.data[e].children,i),B.tagChildren=i}else{B.tagActiveId=t.data[0].id;const e=[];J(t.data[0].children,e),B.tagChildren=e}}})(),await W(),await t.getSubjects(),localStorage.setItem("xiaoku-ai-search",JSON.stringify({tagActiveId:B.tagActiveId,subjectId:F.subjectId,musicTagIds:F.musicTagIds}))}catch{}B.loading=!1})),()=>o("div",{class:e},[o("div",{class:j},[o("div",{class:p},[o("div",{class:I},[o(c,{size:[20,12]},{default:()=>[o("span",{class:w},[B.tags?.[0]?.columnName]),B.tags.map(((t,e)=>o(l,null,[o(r,{round:!0,secondary:B.tagActiveId!==t.id,type:B.tagActiveId===t.id?"primary":"default",onClick:()=>((t,e)=>{B.tagActiveId=t.id,F.musicTagIds=[],localStorage.setItem("xiaoku-ai-search",JSON.stringify({tagActiveId:t.id,subjectId:F.subjectId,musicTagIds:F.musicTagIds}));const i=[];J(B.tags[e].children,i),B.tagChildren=i,W()})(t,e)},{default:()=>[t.name]})])))]})]),B.tagChildren.map(((t,e)=>o("div",{class:I},[o(c,{size:[20,12]},{default:()=>[o("span",{class:w},[t.columnName]),t.list.map(((i,a)=>o(l,null,[o(r,{round:!0,secondary:t.activeIndex!==a,type:t.activeIndex===a?"primary":"default",onClick:()=>((t,e)=>{const i=B.tagChildren[t].list[B.tagChildren[t].activeIndex],a=B.tagChildren[t].list[e];i&&i.id!==a.id&&(F.musicTagIds=F.musicTagIds.filter((t=>t!==i.id))),F.musicTagIds.includes(a.id)?(F.musicTagIds=F.musicTagIds.filter((t=>t!==a.id)),B.tagChildren[t].activeIndex=-1):(F.musicTagIds.push(a.id),B.tagChildren[t].activeIndex=e),localStorage.setItem("xiaoku-ai-search",JSON.stringify({tagActiveId:B.tagActiveId,subjectId:F.subjectId,musicTagIds:F.musicTagIds})),W()})(e,a)},{default:()=>[i.name]})])))]})]))),o("div",{class:I},[o(c,{size:[20,12]},{default:()=>[o("span",{class:w},[_("声部")]),t.getSubjectAllList.map((t=>o(l,null,[o(r,{round:!0,secondary:t.id!==F.subjectId,type:t.id===F.subjectId?"primary":"default",onClick:()=>{F.subjectId=t.id,localStorage.setItem("xiaoku-ai-search",JSON.stringify({tagActiveId:B.tagActiveId,subjectId:t.id,musicTagIds:F.musicTagIds})),W()}},{default:()=>[t.name]})])))]})])]),o(i,{round:!0,onSearch:t=>{F.keyword=t,W()}},null)]),o(g,{show:B.loading},{default:()=>[o("div",{class:[q,B.loading?b:""]},[B.list.length>0?B.list.map(((t,e)=>o("div",{class:y},[o("div",{class:x},[o("div",{class:k,key:`item-${e}`,onClick:()=>{sessionStorage.setItem("musicSubjectList",JSON.stringify(t.subjects)),a.push({path:"/xiaoku-music",query:{id:t.id,name:t.name}})}},[o("div",{class:A},[o("div",{class:T},[o("div",{class:C},null),o(u,{objectFit:"cover",src:t.coverImg,lazy:!0,previewDisabled:!0,onLoad:t=>{t.target.dataset.loaded="true"}},null)])]),o("div",{class:S},[t.name])])])]))):"",!B.loading&&B.list.length<=0&&o(h,null,null)])]})])}}))}}}));