@acedatacloud/nexior 2.0.0 → 2.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/dist/assets/{Auth.6ecb0fb9.js → Auth.fcf6f350.js} +1 -1
  2. package/dist/assets/{Buy.12df7e42.js → Buy.3e53578a.js} +1 -1
  3. package/dist/assets/{Callback.d5e72dce.js → Callback.ce8eda99.js} +1 -1
  4. package/dist/assets/{Chatdoc.ed13cea0.js → Chatdoc.97a06eaf.js} +1 -1
  5. package/dist/assets/{Console.af2be7bd.js → Console.ccfc6a57.js} +1 -1
  6. package/dist/assets/{Conversation.ec73ae30.js → Conversation.89f6049a.js} +1 -1
  7. package/dist/assets/{Conversation.fa8764bc.js → Conversation.a9250468.js} +1 -1
  8. package/dist/assets/{CopyToClipboard.5c736ebc.js → CopyToClipboard.381f0f76.js} +1 -1
  9. package/dist/assets/{DarkSelector.00dd5efa.js → DarkSelector.63581194.js} +1 -1
  10. package/dist/assets/{Detail.a9603a9a.js → Detail.c13ccae7.js} +1 -1
  11. package/dist/assets/{History.d38b437e.js → History.abef6796.js} +1 -1
  12. package/dist/assets/{Index.cef7d83c.js → Index.19c7dcce.js} +1 -1
  13. package/dist/assets/{Index.352d38bc.js → Index.3e2c9cbe.js} +1 -1
  14. package/dist/assets/{Index.49bb83be.js → Index.570f997d.js} +1 -1
  15. package/dist/assets/{Index.5942c0b0.js → Index.8ad4b90f.js} +1 -1
  16. package/dist/assets/Index.9a88c394.js +3 -0
  17. package/dist/assets/{Index.ea4ccde1.js → Index.b91758ed.js} +1 -1
  18. package/dist/assets/{Index.a244b497.js → Index.c2c16554.js} +1 -1
  19. package/dist/assets/{Index.e51f729e.js → Index.c88969ff.js} +1 -1
  20. package/dist/assets/{Index.e69f2a38.js → Index.ecf91c9c.js} +1 -1
  21. package/dist/assets/{InfoIcon.ce429824.js → InfoIcon.0ccf50c0.js} +1 -1
  22. package/dist/assets/{Invitees.d02879ea.js → Invitees.03a7d7d1.js} +1 -1
  23. package/dist/assets/{List.48057cf4.js → List.6277bbcb.js} +1 -1
  24. package/dist/assets/{List.96b9189c.js → List.651e2e41.js} +1 -1
  25. package/dist/assets/{List.15ba769f.js → List.d2052451.js} +1 -1
  26. package/dist/assets/{Login.6c6b5153.js → Login.af479436.js} +1 -1
  27. package/dist/assets/{Main.3073f024.js → Main.51922f1f.js} +1 -1
  28. package/dist/assets/{Manage.6780cd78.js → Manage.e1ad88f9.js} +1 -1
  29. package/dist/assets/{Navigator.b1bd6efb.js → Navigator.754c4cc3.js} +1 -1
  30. package/dist/assets/{Pagination.21a6a893.js → Pagination.dec8e1e6.js} +1 -1
  31. package/dist/assets/{Setting.f748c43e.js → Setting.d55fe098.js} +1 -1
  32. package/dist/assets/{Status.ffdaef85.js → Status.6470f277.js} +1 -1
  33. package/dist/assets/{distribution.07475ebf.js → distribution.33d5a895.js} +1 -1
  34. package/dist/assets/{index.4de3b669.js → index.c0daeb4d.js} +1 -1
  35. package/dist/assets/{order.16d64a78.js → order.71dc86f2.js} +1 -1
  36. package/dist/assets/{price.c2a7945c.js → price.aaf227e5.js} +1 -1
  37. package/dist/index.html +1 -1
  38. package/package.json +1 -1
  39. package/dist/assets/Index.80899733.js +0 -3
@@ -1 +1 @@
1
- var i=Object.defineProperty;var n=(r,t,e)=>t in r?i(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e;var s=(r,t,e)=>(n(r,typeof t!="symbol"?t+"":t,e),e);import{t as a}from"./index.4de3b669.js";class y{constructor(){s(this,"key","orders")}async getAll(t){return await a.get(`/${this.key}/`,{params:t})}async get(t){return await a.get(`/${this.key}/${t}`)}async create(t){return await a.post(`/${this.key}/`,t)}async update(t,e){return await a.put(`/${this.key}/${t}`,e)}async refresh(t){return await a.post(`/${this.key}/${t}/refresh/`)}async pay(t,e){return await a.post(`/${this.key}/${t}/pay/`,e)}async updatePrice(t,e){return await a.post(`/${this.key}/${t}/update-price/`,e)}async finish(t){return await a.post(`/${this.key}/${t}/finish/`)}async delete(t){return await a.delete(`/${this.key}/${t}`)}}const c=new y;export{c as o};
1
+ var i=Object.defineProperty;var n=(r,t,e)=>t in r?i(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e;var s=(r,t,e)=>(n(r,typeof t!="symbol"?t+"":t,e),e);import{t as a}from"./index.c0daeb4d.js";class y{constructor(){s(this,"key","orders")}async getAll(t){return await a.get(`/${this.key}/`,{params:t})}async get(t){return await a.get(`/${this.key}/${t}`)}async create(t){return await a.post(`/${this.key}/`,t)}async update(t,e){return await a.put(`/${this.key}/${t}`,e)}async refresh(t){return await a.post(`/${this.key}/${t}/refresh/`)}async pay(t,e){return await a.post(`/${this.key}/${t}/pay/`,e)}async updatePrice(t,e){return await a.post(`/${this.key}/${t}/update-price/`,e)}async finish(t){return await a.post(`/${this.key}/${t}/finish/`)}async delete(t){return await a.delete(`/${this.key}/${t}`)}}const c=new y;export{c as o};
@@ -1 +1 @@
1
- import{u as s,C as u}from"./index.4de3b669.js";const i=n=>{const t=s.state.exchange;let{value:r,currency:e=s.state.currency||"usd"}=n;const c=u[e];if(!t)return{value:r,currency:e,label:c};const a=`usd-${e}`,o=t[a];return o&&(r=r*o),console.log("new price",{value:r,currency:e}),{value:r,currency:e,label:c}},g=n=>{var c;let{value:t,defaultValue:r}=n;if(t===void 0&&(t=r),t===void 0)return"";const e=i({value:t});return`${e.label}${(c=e.value)==null?void 0:c.toFixed(2)}`};export{g};
1
+ import{u as s,C as u}from"./index.c0daeb4d.js";const i=n=>{const t=s.state.exchange;let{value:r,currency:e=s.state.currency||"usd"}=n;const c=u[e];if(!t)return{value:r,currency:e,label:c};const a=`usd-${e}`,o=t[a];return o&&(r=r*o),console.log("new price",{value:r,currency:e}),{value:r,currency:e,label:c}},g=n=>{var c;let{value:t,defaultValue:r}=n;if(t===void 0&&(t=r),t===void 0)return"";const e=i({value:t});return`${e.label}${(c=e.value)==null?void 0:c.toFixed(2)}`};export{g};
package/dist/index.html CHANGED
@@ -4,7 +4,7 @@
4
4
  <meta charset="UTF-8" />
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />
6
6
  <title>Nexior</title>
7
- <script type="module" crossorigin src="/assets/index.4de3b669.js"></script>
7
+ <script type="module" crossorigin src="/assets/index.c0daeb4d.js"></script>
8
8
  <link rel="modulepreload" href="/assets/vendor-@vue.31495dbd.js">
9
9
  <link rel="modulepreload" href="/assets/vendor-element-plus.eeef3ee7.js">
10
10
  <link rel="modulepreload" href="/assets/vendor-others.decd85ac.js">
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@acedatacloud/nexior",
3
- "version": "2.0.0",
3
+ "version": "2.0.1",
4
4
  "author": "Germey Technology <dev@germey.tech>",
5
5
  "repository": {
6
6
  "type": "git",
@@ -1,3 +0,0 @@
1
- var pe=Object.defineProperty,_e=Object.defineProperties;var me=Object.getOwnPropertyDescriptors;var ee=Object.getOwnPropertySymbols;var he=Object.prototype.hasOwnProperty,fe=Object.prototype.propertyIsEnumerable;var te=(e,t,o)=>t in e?pe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,h=(e,t)=>{for(var o in t||(t={}))he.call(t,o)&&te(e,o,t[o]);if(ee)for(var o of ee(t))fe.call(t,o)&&te(e,o,t[o]);return e},f=(e,t)=>_e(e,me(t));import{J as G,V as $e,K as oe,P as ve,L as ge}from"./vendor-others.decd85ac.js";import{ag as ne}from"./vendor-fortawesome.3ae42787.js";import{_ as y,ai as se,H as W,w as ye,aj as we}from"./index.4de3b669.js";import{O as ke,i as ie,s as be,t as Pe,S as ae,N as M,o as re,W as le,Y as Se,Z as Ie,R as ce,p as xe,A as Ae,Q as Ne,_ as Ce,$ as Te,a0 as Ve,K as R}from"./vendor-element-plus.eeef3ee7.js";import{H as w,al as c,o as d,e as _,S as b,f as a,I as O,V as i,M as k,U as v,W as U,ai as q,L as T,T as Ee,av as je,O as ue,m as V,u as $,A as de,s as Le,R as De,P as Fe}from"./vendor-@vue.31495dbd.js";import{A as Re,i as Ue}from"./Status.ffdaef85.js";import{I as B}from"./InfoIcon.ce429824.js";import"./vendor-axios.168e6950.js";import"./application.ea1e2a72.js";import"./vendor-markdown.95c097e3.js";import"./vendor-highlight.js.19da0c9f.js";const Ge=w({name:"LayoutSuno",components:{ElDrawer:ke,ElButton:ie,FontAwesomeIcon:ne},data(){return{drawer:!1,preview:!1}},computed:{isPlaying(){var e,t;return(t=(e=this.$store.state.suno)==null?void 0:e.player)==null?void 0:t.isPlaying}}}),ze={class:"main"},Oe={class:"config"},qe={class:"result"},Me={class:"preview"};function Be(e,t,o,s,r,u){const n=c("font-awesome-icon"),l=c("el-button"),m=c("el-drawer");return d(),_("div",ze,[b(" \u6700\u5DE6\u4FA7\u914D\u7F6E\u680F "),a("div",Oe,[O(e.$slots,"config",{},void 0,!0)]),b(" \u4E2D\u95F4\u6B4C\u66F2\u5217\u8868\u680F "),a("div",qe,[O(e.$slots,"result",{},void 0,!0)]),b(" \u6700\u53F3\u8FB9\u6B4C\u66F2\u9884\u89C8\u680F "),a("div",Me,[O(e.$slots,"preview",{},void 0,!0)]),i(l,{round:"",class:"menu",onClick:t[0]||(t[0]=g=>e.drawer=!0)},{default:k(()=>[i(n,{icon:"fa-solid fa-gear",class:"icon-menu"})]),_:1}),i(m,{modelValue:e.drawer,"onUpdate:modelValue":t[1]||(t[1]=g=>e.drawer=g),"with-header":!1,size:"340px",class:"drawer"},{default:k(()=>[O(e.$slots,"config",{},void 0,!0)]),_:3},8,["modelValue"]),b(` <el-drawer v-model="isPlaying" :with-header="false" size="340px" class="preview_drawer">
2
- <slot name="preview" />
3
- </el-drawer> `)])}var We=y(Ge,[["render",Be],["__scopeId","data-v-0621513c"],["__file","/home/runner/work/Nexior/Nexior/src/layouts/Suno.vue"]]);const He=w({name:"VersionSelector",components:{ElSelect:be,ElOption:Pe,ElSwitch:ae},props:{modelValue:{type:String,default:void 0}},emits:["update:modelValue"],data(){return{options:[{label:this.$t("suno.model.model1"),value:"chirp-v2-xxl-alpha"},{label:this.$t("suno.model.model2"),value:"chirp-v3-0"},{label:this.$t("suno.model.model3"),value:"chirp-v3-5"}]}},computed:{custom:{get(){var e,t;return(t=(e=this.$store.state.suno)==null?void 0:e.config)==null?void 0:t.custom},set(e){var t;console.debug("set custom",e),this.$store.commit("suno/setConfig",f(h({},(t=this.$store.state.suno)==null?void 0:t.config),{custom:e}))}},model:{get(){var e,t;return(t=(e=this.$store.state.suno)==null?void 0:e.config)==null?void 0:t.model},set(e){var t;console.debug("set model",e),this.$store.commit("suno/setConfig",f(h({},(t=this.$store.state.suno)==null?void 0:t.config),{model:e}))}}},mounted(){this.model||(console.debug("set default type",se),this.model=se)}}),Ke={class:"field"},Ye={class:"title"};function Je(e,t,o,s,r,u){const n=c("el-switch"),l=c("el-option"),m=c("el-select");return d(),_("div",Ke,[a("h2",Ye,v(e.$t("suno.name.type")),1),i(n,{modelValue:e.custom,"onUpdate:modelValue":t[0]||(t[0]=g=>e.custom=g),class:"value"},null,8,["modelValue"]),i(m,{modelValue:e.model,"onUpdate:modelValue":t[1]||(t[1]=g=>e.model=g),class:"value",placeholder:e.$t("suno.placeholder.select")},{default:k(()=>[(d(!0),_(U,null,q(e.options,g=>(d(),T(l,{key:g.value,label:g.label,value:g.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue","placeholder"])])}var Qe=y(He,[["render",Je],["__scopeId","data-v-6d5f21aa"],["__file","/home/runner/work/Nexior/Nexior/src/components/suno/config/TypeSelector.vue"]]);const Ze="",Xe=w({name:"PromptInput",components:{ElInput:M,InfoIcon:B},data(){return{}},computed:{prompt:{get(){var e,t;return(t=(e=this.$store.state.suno)==null?void 0:e.config)==null?void 0:t.prompt},set(e){var t;console.debug("set prompt",e),this.$store.commit("suno/setConfig",f(h({},(t=this.$store.state.suno)==null?void 0:t.config),{prompt:e}))}}},mounted(){this.value||(this.value=Ze)}}),et={class:"field"},tt={class:"box"},st={class:"title"};function ot(e,t,o,s,r,u){const n=c("info-icon"),l=c("el-input");return d(),_("div",et,[a("div",tt,[a("h2",st,v(e.$t("suno.name.prompt")),1),i(n,{content:e.$t("suno.description.prompt"),class:"info"},null,8,["content"])]),i(l,{modelValue:e.prompt,"onUpdate:modelValue":t[0]||(t[0]=m=>e.prompt=m),rows:3,type:"textarea",class:"prompt",placeholder:e.$t("suno.placeholder.prompt"),maxlength:300,"show-word-limit":""},null,8,["modelValue","placeholder"])])}var nt=y(Xe,[["render",ot],["__scopeId","data-v-11b65236"],["__file","/home/runner/work/Nexior/Nexior/src/components/suno/config/PromptInput.vue"]]);const it="",at=w({name:"LyricInput",components:{ElInput:M,InfoIcon:B},data(){return{}},computed:{lyric:{get(){var e,t;return(t=(e=this.$store.state.suno)==null?void 0:e.config)==null?void 0:t.lyric},set(e){var t;console.debug("set lyric",e),this.$store.commit("suno/setConfig",f(h({},(t=this.$store.state.suno)==null?void 0:t.config),{lyric:e}))}},config(){var e;return(e=this.$store.state.suno)==null?void 0:e.config}},mounted(){this.value||(this.value=it)}}),rt={class:"field"},lt={class:"box"},ct={class:"title"};function ut(e,t,o,s,r,u){const n=c("info-icon"),l=c("el-input");return d(),_("div",rt,[a("div",lt,[a("h2",ct,v(e.$t("suno.name.lyrics")),1),i(n,{content:e.$t("suno.description.lyrics"),class:"info"},null,8,["content"])]),i(l,{modelValue:e.lyric,"onUpdate:modelValue":t[0]||(t[0]=m=>e.lyric=m),rows:3,type:"textarea",class:"lyrics",placeholder:e.$t("suno.placeholder.lyrics"),maxlength:3e3,"show-word-limit":""},null,8,["modelValue","placeholder"])])}var dt=y(at,[["render",ut],["__scopeId","data-v-b47f1748"],["__file","/home/runner/work/Nexior/Nexior/src/components/suno/config/LyricInput.vue"]]);const pt=w({name:"StyleInput",components:{ElInput:M,InfoIcon:B},data(){return{}},computed:{style:{get(){var e,t;return(t=(e=this.$store.state.suno)==null?void 0:e.config)==null?void 0:t.style},set(e){var t;console.debug("set style",e),this.$store.commit("suno/setConfig",f(h({},(t=this.$store.state.suno)==null?void 0:t.config),{style:e}))}},config(){var e;return(e=this.$store.state.suno)==null?void 0:e.config}}}),_t={class:"field"},mt={class:"title-container"},ht={class:"title"};function ft(e,t,o,s,r,u){const n=c("info-icon"),l=c("el-input");return d(),_("div",_t,[a("div",mt,[a("h2",ht,v(e.$t("suno.name.style")),1),i(n,{content:e.$t("suno.description.style"),class:"info"},null,8,["content"])]),i(l,{modelValue:e.style,"onUpdate:modelValue":t[0]||(t[0]=m=>e.style=m),rows:3,type:"textarea",class:"style",placeholder:e.$t("suno.placeholder.style"),maxlength:300,"show-word-limit":""},null,8,["modelValue","placeholder"])])}var $t=y(pt,[["render",ft],["__scopeId","data-v-075e574a"],["__file","/home/runner/work/Nexior/Nexior/src/components/suno/config/StyleInput.vue"]]);const vt="",gt=w({name:"TitleInput",components:{ElInput:M,InfoIcon:B},data(){return{}},computed:{title:{get(){var e,t;return(t=(e=this.$store.state.suno)==null?void 0:e.config)==null?void 0:t.title},set(e){var t;console.debug("set title",e),this.$store.commit("suno/setConfig",f(h({},(t=this.$store.state.suno)==null?void 0:t.config),{title:e}))}},instrumental:{get(){var e,t;return(t=(e=this.$store.state.suno)==null?void 0:e.config)==null?void 0:t.instrumental},set(e){var t;console.debug("set instrumental",e),this.$store.commit("suno/setConfig",f(h({},(t=this.$store.state.suno)==null?void 0:t.config),{instrumental:e}))}}},mounted(){this.value||(this.value=vt)}}),yt={class:"field"},wt={class:"title-container"},kt={class:"title"};function bt(e,t,o,s,r,u){const n=c("info-icon"),l=c("el-input");return d(),_("div",yt,[a("div",wt,[a("h2",kt,v(e.$t("suno.name.title")),1),i(n,{content:e.$t("suno.description.title"),class:"info"},null,8,["content"])]),i(l,{modelValue:e.title,"onUpdate:modelValue":t[0]||(t[0]=m=>e.title=m),rows:3,type:"textarea",class:"title",placeholder:e.$t("suno.placeholder.title"),maxlength:300,"show-word-limit":""},null,8,["modelValue","placeholder"])])}var Pt=y(gt,[["render",bt],["__scopeId","data-v-f9bac2fa"],["__file","/home/runner/work/Nexior/Nexior/src/components/suno/config/TitleInput.vue"]]);const St=!1,It=w({name:"InstrumentSwitch",components:{ElSwitch:ae},data(){return{}},computed:{instrumental:{get(){var e,t;return(t=(e=this.$store.state.suno)==null?void 0:e.config)==null?void 0:t.instrumental},set(e){var t;console.debug("set instrumental",e),this.$store.commit("suno/setConfig",f(h({},(t=this.$store.state.suno)==null?void 0:t.config),{instrumental:e}))}}},mounted(){this.instrumental===void 0&&(this.instrumental=St)}}),xt={class:"field"},At={class:"title inline-block"};function Nt(e,t,o,s,r,u){const n=c("el-switch");return d(),_("div",xt,[i(n,{modelValue:e.instrumental,"onUpdate:modelValue":t[0]||(t[0]=l=>e.instrumental=l),class:"value mr-2"},null,8,["modelValue"]),a("h2",At,v(e.$t("suno.name.instrumental")),1)])}var Ct=y(It,[["render",Nt],["__scopeId","data-v-78764cec"],["__file","/home/runner/work/Nexior/Nexior/src/components/suno/config/InstrumentSwitch.vue"]]);const Tt=w({name:"PresetPanel",components:{TypeSelector:Qe,PromptInput:nt,LyricInput:dt,InstrumentSwitch:Ct,StyleInput:$t,TitleInput:Pt,FontAwesomeIcon:ne,ElButton:ie},emits:["generate"],computed:{config(){var e;return(e=this.$store.state.suno)==null?void 0:e.config}},methods:{onGenerate(){this.$emit("generate")}}}),Vt={class:"panel"},Et={class:"config"},jt={class:"actions"};function Lt(e,t,o,s,r,u){var P,S,I,x;const n=c("type-selector"),l=c("instrument-switch"),m=c("prompt-input"),g=c("lyric-input"),A=c("style-input"),p=c("title-input"),C=c("font-awesome-icon"),N=c("el-button");return d(),_("div",Vt,[a("div",Et,[i(n,{class:"mb-4"}),i(l,{class:"mb-4 instrument"}),(P=e.config)!=null&&P.custom?b("v-if",!0):(d(),T(m,{key:0,class:"mb-4"})),((S=e.config)==null?void 0:S.custom)&&!e.config.instrumental?(d(),T(g,{key:1,class:"mb-4"})):b("v-if",!0),(I=e.config)!=null&&I.custom?(d(),T(A,{key:2,class:"mb-4"})):b("v-if",!0),(x=e.config)!=null&&x.custom?(d(),T(p,{key:3,class:"mb-4"})):b("v-if",!0),a("div",jt,[i(N,{type:"primary",class:"btn w-full",round:"",onClick:e.onGenerate},{default:k(()=>[i(C,{icon:"fa-solid fa-magic",class:"mr-2"}),Ee(" "+v(e.$t("suno.button.generate")),1)]),_:1},8,["onClick"])])])])}var Dt=y(Tt,[["render",Lt],["__scopeId","data-v-38bb3c66"],["__file","/home/runner/work/Nexior/Nexior/src/components/suno/ConfigPanel.vue"]]);function H(e){const t=Math.floor(e)%60;e=Math.floor(e/60);const o=e%60,s=o<10?`0${o}`:o,r=t<10?`0${t}`:t;return s+":"+r}const Ft=w({name:"TaskPreview",components:{ElImage:re,ElIcon:le,VideoPlay:Se,VideoPause:Ie},props:{modelValue:{type:Object,required:!0}},data(){return{}},computed:{task(){var e;return(e=this.$store.state.suno)==null?void 0:e.tasks},audios(){var t,o,s,r,u;let e=[];return Array.isArray((o=(t=this.modelValue)==null?void 0:t.response)==null?void 0:o.data)&&((u=(r=(s=this.modelValue)==null?void 0:s.response)==null?void 0:r.data)==null||u.forEach(n=>{let l=n;e.push(l)})),console.log("audios",e),e},application(){var e;return(e=this.$store.state.suno)==null?void 0:e.application},active(){var e,t;return(t=(e=this.$store.state.suno)==null?void 0:e.tasks)==null?void 0:t.active}},methods:{useFormatDuring:H,onPlay(e){this.$store.dispatch("suno/setAudio",f(h(h({},this.$store.state.suno.audio),e),{state:"playing"})),console.log("on play")},onPause(e){this.$store.dispatch("suno/setAudio",f(h(h({},this.$store.state.suno.audio),e),{state:"paused"})),console.log("on pause")},onClick(e){var t,o,s;((s=(o=(t=this.$store.state)==null?void 0:t.suno)==null?void 0:o.audio)==null?void 0:s.id)!==e.id&&this.onPlay(f(h({},e),{progress:0}))}}}),Rt={class:"task"},Ut=["onClick"],Gt={class:"left"},zt=["onClick"],Ot=["onClick"],qt={key:2,class:"duration"},Mt={class:"info"},Bt={class:"title"},Wt={class:"style"};function Ht(e,t,o,s,r,u){const n=c("el-image"),l=c("video-pause"),m=c("el-icon"),g=c("video-play"),A=je("loading");return d(),_("div",Rt,[(d(!0),_(U,null,q(e.audios,(p,C)=>{var N,P,S,I,x,j,L,D,F,E,z,Y,J,Q,Z;return d(),_("div",{key:C,class:"audio",onClick:X=>e.onClick(p)},[ue((d(),_("div",Gt,[i(n,{src:p==null?void 0:p.image_url,class:"cover",fit:"cover"},null,8,["src"]),(p==null?void 0:p.audio_url)&&((S=(P=(N=e.$store.state)==null?void 0:N.suno)==null?void 0:P.audio)==null?void 0:S.id)===p.id&&((j=(x=(I=e.$store.state)==null?void 0:I.suno)==null?void 0:x.audio)==null?void 0:j.state)==="playing"?(d(),_("div",{key:0,class:"overlay",onClick:X=>e.onPause(p)},[i(m,null,{default:k(()=>[i(l)]),_:1})],8,zt)):b("v-if",!0),(p==null?void 0:p.audio_url)&&(((F=(D=(L=e.$store.state)==null?void 0:L.suno)==null?void 0:D.audio)==null?void 0:F.id)!==p.id||((Y=(z=(E=e.$store.state)==null?void 0:E.suno)==null?void 0:z.audio)==null?void 0:Y.id)===p.id&&((Z=(Q=(J=e.$store.state)==null?void 0:J.suno)==null?void 0:Q.audio)==null?void 0:Z.state)==="paused")?(d(),_("div",{key:1,class:"overlay",onClick:X=>e.onPlay(p)},[i(m,null,{default:k(()=>[i(g)]),_:1})],8,Ot)):b("v-if",!0),p!=null&&p.duration?(d(),_("div",qt,v(e.useFormatDuring(p==null?void 0:p.duration)),1)):b("v-if",!0)])),[[A,!(p!=null&&p.audio_url)]]),a("div",Mt,[a("h2",Bt,v(p==null?void 0:p.title),1),a("p",Wt,v(p==null?void 0:p.style),1)])],8,Ut)}),128))])}var Kt=y(Ft,[["render",Ht],["__file","/home/runner/work/Nexior/Nexior/src/components/suno/task/Preview.vue"]]);const Yt={class:"player-slider"},Jt=w({setup(e){const t=G(),o=V({get:()=>{var n,l;return(l=(n=t.state.suno)==null?void 0:n.audio)==null?void 0:l.progress},set:n=>t.commit("suno/setAudio",f(h({},t.state.suno.audio),{progress:n}))}),s=V({get:()=>{var n,l;return(l=(n=t.state.suno)==null?void 0:n.audio)==null?void 0:l.duration},set:n=>t.commit("suno/setAudio",f(h({},t.state.suno.audio),{duration:n}))}),r=()=>{},u=n=>t.dispatch("suno/setAudio",f(h({},t.state.suno.audio),{progress:n}));return(n,l)=>(d(),_("div",Yt,[i($(ce),{modelValue:$(o),"onUpdate:modelValue":l[0]||(l[0]=m=>de(o)?o.value=m:null),"show-tooltip":!1,min:0,max:$(s),onChange:u,onInput:r},null,8,["modelValue","max"])]))}});var Qt=y(Jt,[["__file","/home/runner/work/Nexior/Nexior/src/components/suno/player/PlayerSlider.vue"]]),Zt="/assets/disk.4907c891.png";const Xt={class:"flex player-song"},es=["src"],ts={class:"ml-2 text-xs flex flex-col justify-between"},ss={class:"w-52 2xl:w-96 cursor-pointer truncate"},os={class:"flex"},ns={class:"ml-2 text-dc"},is=w({setup(e){const t=G(),o=V({get:()=>t.state.suno.audio,set:s=>t.commit("suno/setAudio",s)});return Le(o,(s,r)=>{if((s==null?void 0:s.audio_url)!==(r==null?void 0:r.audio_url)){console.log("audio changed",s),s.object&&(console.log("111",s.object),s.object.pause(),delete s.object);const u=new Audio(s.audio_url);u.currentTime=0,s.state==="playing"?u.play():u.pause(),u.addEventListener("timeupdate",()=>{t.commit("suno/setAudio",f(h({},t.state.suno.audio),{progress:u.currentTime}))}),t.commit("suno/setAudio",f(h({},t.state.suno.audio),{object:u}))}else if((s==null?void 0:s.progress)!==(r==null?void 0:r.progress)&&Math.abs(s.progress-s.object.currentTime)>2){console.log("progress changed",s.progress);const u=t.state.suno.audio;u.object&&(u.object.currentTime=u.progress)}else(s==null?void 0:s.state)!==(r==null?void 0:r.state)&&(console.log("state changed",s.state),s.object&&(s.state==="playing"?s.object.play():s.object.pause()));(s==null?void 0:s.volume)!==(r==null?void 0:r.volume)&&(console.log("volume changed",s.volume),s.object&&(s.object.volume=s.volume/100))}),(s,r)=>{var u,n,l;return d(),_("div",Xt,[a("img",{alt:"",class:"w-11 h-11 rounded",src:((u=$(o))==null?void 0:u.image_url)||$(Zt)},null,8,es),a("div",ts,[a("div",ss,[a("div",os,[a("span",null,v(((n=$(o))==null?void 0:n.title)||"Music"),1),a("span",ns,"- "+v(((l=$(o))==null?void 0:l.style)||"SmallRuralDog"),1)])])])])}}});var as=y(is,[["__file","/home/runner/work/Nexior/Nexior/src/components/suno/player/PlayerSong.vue"]]);const rs={class:"flex justify-end items-center gap-x-2.5"},ls={class:"text-xs"},cs=w({setup(e){const t=G(),o=V({get:()=>{var r,u;return(u=(r=t.state.suno)==null?void 0:r.audio)==null?void 0:u.progress},set:r=>t.commit("suno/setAudio",f(h({},t.state.suno.audio),{progress:r}))}),s=V({get:()=>{var r,u;return(u=(r=t.state.suno)==null?void 0:r.audio)==null?void 0:u.duration},set:r=>t.commit("suno/setAudio",f(h({},t.state.suno.audio),{duration:r}))});return(r,u)=>(d(),_("div",rs,[a("span",ls,v($(H)($(o)))+" / "+v($(H)($(s))),1)]))}});var us=y(cs,[["__file","/home/runner/work/Nexior/Nexior/src/components/suno/player/PlayerAction.vue"]]);const ds=w({props:{icon:{type:null,required:!0},theme:{type:String,required:!1},size:{type:[Number,String],required:!1},spin:{type:Boolean,required:!1},fill:{type:[String,Array],required:!1},strokeLinecap:{type:String,required:!1},strokeLinejoin:{type:String,required:!1},strokeWidth:{type:Number,required:!1}},setup(e){return(t,o)=>(d(),T(De(e.icon),{theme:e.theme,size:e.size,spin:e.spin,fill:e.fill,"stroke-linecap":e.strokeLinecap,"stroke-linejoin":e.strokeLinejoin,"stroke-width":e.strokeWidth},null,8,["theme","size","spin","fill","stroke-linecap","stroke-linejoin","stroke-width"]))}});var K=y(ds,[["__file","/home/runner/work/Nexior/Nexior/src/components/common/IconPark.vue"]]);const ps={class:"player-volume flex flex-col items-center pt-2"},_s={class:"text-sm mt-3"},ms={class:"mt-2"},hs=w({setup(e){const t=G(),o=V({get:()=>{var n;return(n=t.state.suno.audio)==null?void 0:n.volume},set:n=>t.commit("suno/setAudio",f(h({},t.state.suno.audio),{volume:n}))}),s=V({get:()=>{var n;return(n=t.state.suno.audio)==null?void 0:n.muted},set:n=>t.commit("suno/setAudio",f(h({},t.state.suno.audio),{muted:n}))}),r=()=>t.dispatch("suno/toggleMuted"),u=n=>t.dispatch("suno/setVolume",n);return(n,l)=>(d(),_("div",ps,[a("div",null,[i($(ce),{modelValue:$(o),"onUpdate:modelValue":l[0]||(l[0]=m=>de(o)?o.value=m:null),vertical:"",height:"100px","show-tooltip":!1,max:100,min:0,size:"small",disabled:$(s),onInput:u},null,8,["modelValue","disabled"])]),a("div",_s,v($(o)),1),a("div",ms,[i(K,{icon:$(s)?$($e):$(oe),size:"16",theme:"filled",class:"hover-text",onClick:r},null,8,["icon"])])]))}});var fs=y(hs,[["__file","/home/runner/work/Nexior/Nexior/src/components/suno/player/PlayerVolumeSlider.vue"]]);const $s={class:"flex items-center justify-center gap-x-3"},vs=w({setup(e){const t=G(),o=()=>t.dispatch("suno/setAudio",f(h({},t.state.suno.audio),{state:t.state.suno.audio.state==="playing"?"paused":"playing"})),s=V(()=>t.state.suno.audio);return(r,u)=>{var n;return d(),_("div",$s,[i(K,{icon:((n=$(s))==null?void 0:n.state)==="playing"?$(ve):$(ge),size:"45",theme:"filled",class:"control",onClick:o},null,8,["icon"]),i($(xe),{placement:"top",width:"50px"},{reference:k(()=>[i(K,{icon:$(oe),size:"20","stroke-width":3,class:"hover-text"},null,8,["icon"])]),default:k(()=>[i(fs)]),_:1})])}}});var gs=y(vs,[["__file","/home/runner/work/Nexior/Nexior/src/components/suno/player/PlayerController.vue"]]);const ys={class:"flex flex-col items-stretch h-20"},ws={class:"flex grow px-5 items-center"},ks={class:"flex-1"},bs={class:"flex-1"},Ps={class:"flex-1"},Ss=w({setup(e){return(t,o)=>(d(),_("div",ys,[i(Qt),a("div",ws,[a("div",ks,[i(as)]),a("div",bs,[i(gs)]),a("div",Ps,[i(us)])])]))}});var Is=y(Ss,[["__file","/home/runner/work/Nexior/Nexior/src/components/suno/player/Player.vue"]]);const xs=w({name:"RecentPanel",components:{TaskPreview:Kt,ElSkeleton:Ae,ElSkeletonItem:Ne,Player:Is},data(){return{job:0}},computed:{tasks(){var e,t,o,s;return f(h({},(e=this.$store.state.suno)==null?void 0:e.tasks),{items:(s=(o=(t=this.$store.state.suno)==null?void 0:t.tasks)==null?void 0:o.items)==null?void 0:s.slice().reverse()})}}}),As={class:"panel recent"},Ns={key:0,class:"tasks"},Cs={class:"left"},Ts={class:"main"},Vs={key:1,class:"tasks"},Es={key:2,class:"description"},js={class:"flex-1 flex flex-col"},Ls={class:"h-20"};function Ds(e,t,o,s,r,u){var A,p,C,N,P,S,I,x,j,L,D,F;const n=c("el-skeleton-item"),l=c("el-skeleton"),m=c("task-preview"),g=c("player");return d(),_(U,null,[a("div",As,[((A=e.tasks)==null?void 0:A.items)===void 0?(d(),_("div",Ns,[(d(),_(U,null,q(3,E=>a("div",{key:E,class:"task placeholder"},[a("div",Cs,[i(l,{animated:""},{template:k(()=>[i(n,{variant:"image",class:"avatar"})]),_:1})]),a("div",Ts,[i(l,{animated:""},{template:k(()=>[i(n,{variant:"p",class:"title"}),i(n,{variant:"text",style:{"margin-right":"16px"}}),i(n,{variant:"text",style:{width:"80%"}})]),_:1})])])),64))])):((C=(p=e.tasks)==null?void 0:p.items)==null?void 0:C.length)&&((P=(N=e.tasks)==null?void 0:N.items)==null?void 0:P.length)>0?(d(),_("div",Vs,[(d(!0),_(U,null,q((S=e.tasks)==null?void 0:S.items,(E,z)=>(d(),T(m,{key:z,"model-value":E,class:"preview"},null,8,["model-value"]))),128))])):b("v-if",!0),((x=(I=e.tasks)==null?void 0:I.items)==null?void 0:x.length)===0?(d(),_("p",Es,v(e.$t("suno.message.noTasks")),1)):b("v-if",!0)]),ue(a("div",js,[a("div",Ls,[i(g)])],512),[[Fe,!!((F=(D=(L=(j=e.$store)==null?void 0:j.state)==null?void 0:L.suno)==null?void 0:D.audio)!=null&&F.object)]])],64)}var Fs=y(xs,[["render",Ds],["__scopeId","data-v-9a683526"],["__file","/home/runner/work/Nexior/Nexior/src/components/suno/RecentPanel.vue"]]);const Rs=w({name:"TaskPreview",components:{ElScrollbar:Ce,IconPicture:Te,ElImage:re,ElAvatar:Ve,ElIcon:le},data(){return{showCloseIcon:!0}},computed:{audio(){var e;return(e=this.$store.state.suno)==null?void 0:e.audio}},methods:{closeCard(){this.showCloseIcon=!this.showCloseIcon}}}),Us={key:0,class:"card"},Gs={class:"image-container"},zs={class:"image-slot"},Os={class:"title"},qs={class:"content"},Ms={class:"artist"},Bs={class:"style"},Ws={class:"time"},Hs={class:"lyrics"},Ks={key:1,class:"gradient-background"};function Ys(e,t,o,s,r,u){const n=c("icon-picture"),l=c("el-icon"),m=c("el-image"),g=c("el-avatar"),A=c("el-scrollbar");return d(),T(A,{class:"right-panel"},{default:k(()=>{var p,C,N,P,S,I,x;return[(p=e.audio)!=null&&p.object?(d(),_("div",Us,[a("div",Gs,[i(m,{src:e.audio.image_url,fit:"cover"},{error:k(()=>[a("div",zs,[i(l,null,{default:k(()=>[i(n)]),_:1})])]),_:1},8,["src"]),a("h2",Os,v((C=e.audio)==null?void 0:C.title),1)]),a("div",qs,[a("div",Ms,[i(g,{size:30,src:(N=e.audio)==null?void 0:N.image_url},null,8,["src"]),a("span",null,v((P=e.audio)==null?void 0:P.prompt),1)]),a("p",Bs,v((S=e.audio)==null?void 0:S.style),1),a("p",Ws,v(e.$dayjs.format((I=e.audio)==null?void 0:I.created_at)),1),a("div",Hs,[a("p",null,v((x=e.audio)==null?void 0:x.lyric),1)])])])):(d(),_("div",Ks))]}),_:1})}var Js=y(Rs,[["render",Ys],["__scopeId","data-v-19e67a48"],["__file","/home/runner/work/Nexior/Nexior/src/components/suno/PreviewPanel.vue"]]);const Qs="https://webhook.acedata.cloud/suno",Zs=w({name:"SunoIndex",components:{Layout:We,ApplicationStatus:Re,ConfigPanel:Dt,RecentPanel:Fs,PreviewPanel:Js},data(){return{task:void 0,job:0,timer:void 0}},computed:{loading(){var e,t;return((t=(e=this.$store.state.suno)==null?void 0:e.status)==null?void 0:t.getApplication)===W.Request},service(){return this.$store.state.suno.service},credential(){return this.$store.state.suno.credential},config(){return this.$store.state.suno.config},initializing(){return this.$store.state.suno.status.getApplication===W.Request},needApply(){return this.$store.state.suno.status.getApplication===W.Success&&!this.application},application(){return this.$store.state.suno.application}},async mounted(){await this.onGetService(),await this.onGetApplication(),await this.onScrollDown(),await this.onGetTasks(),await this.onScrollDown(),this.job=setInterval(()=>{this.onGetTasks()},5e3)},async unmounted(){clearInterval(this.job),clearInterval(this.timer)},methods:{async onGetService(){console.debug("start onGetService"),await this.$store.dispatch("suno/getService"),console.debug("end onGetService")},async onGetApplication(){console.debug("start onGetApplication"),await this.$store.dispatch("suno/getApplication"),console.debug("end onGetApplication")},onApply(){ye.create({application:this.application}).then(({data:e})=>{this.application=e,R.success(this.$t("application.message.applySuccessfully"))}).catch(e=>{var t,o;((o=(t=e==null?void 0:e.response)==null?void 0:t.data)==null?void 0:o.code)===Ue&&R.error(this.$t("application.message.alreadyApplied"))})},async onScrollDown(){setTimeout(()=>{const e=document.querySelector(".tasks");e&&(e.scrollTop=e.scrollHeight)},500)},async onGetTasks(){if(this.loading){console.debug("loading");return}await this.$store.dispatch("suno/getTasks",{limit:30,offset:0})},async onGenerateAudio(){var o;const e=f(h({},this.config),{callback_url:Qs}),t=(o=this.credential)==null?void 0:o.token;if(!t){console.error("no token specified");return}R.success(this.$t("suno.message.startingTask")),we.audio(e,{token:t}).then(()=>{R.success(this.$t("suno.message.startTaskSuccess"))}).catch(()=>{R.error(this.$t("suno.message.startTaskFailed"))}).finally(async()=>{await this.onGetTasks(),await this.onScrollDown()})}}});function Xs(e,t,o,s,r,u){const n=c("config-panel"),l=c("application-status"),m=c("recent-panel"),g=c("preview-panel"),A=c("layout");return d(),T(A,null,{config:k(()=>[i(n,{onGenerate:e.onGenerateAudio},null,8,["onGenerate"])]),result:k(()=>[i(l,{initializing:e.initializing,application:e.application,service:e.service,"need-apply":e.needApply,class:"mb-4",onRefresh:e.onGetApplication},null,8,["initializing","application","service","need-apply","onRefresh"]),i(m,{class:"panel recent"})]),preview:k(()=>[i(g)]),_:1})}var _o=y(Zs,[["render",Xs],["__scopeId","data-v-11d62c6c"],["__file","/home/runner/work/Nexior/Nexior/src/pages/suno/Index.vue"]]);export{_o as default};