@acedatacloud/nexior 2.0.4 → 2.0.5
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.
- package/dist/assets/{Auth.906c624b.js → Auth.e4903cd8.js} +1 -1
- package/dist/assets/{Buy.f45a76c5.js → Buy.0d0f6438.js} +1 -1
- package/dist/assets/{Callback.6ccd4621.js → Callback.36846e83.js} +1 -1
- package/dist/assets/{Chatdoc.073f1869.js → Chatdoc.8252e87e.js} +1 -1
- package/dist/assets/{Console.dc27f292.js → Console.3a90cb34.js} +1 -1
- package/dist/assets/{Conversation.6e276866.js → Conversation.65710e84.js} +1 -1
- package/dist/assets/{Conversation.cecd218d.js → Conversation.a8cc6420.js} +1 -1
- package/dist/assets/{CopyToClipboard.b839dc37.js → CopyToClipboard.3cfde0c6.js} +1 -1
- package/dist/assets/{DarkSelector.551c7e93.js → DarkSelector.bf241a9d.js} +1 -1
- package/dist/assets/{Detail.abf40872.js → Detail.61e2837f.js} +1 -1
- package/dist/assets/{History.543ff2ec.js → History.5522cfc8.js} +1 -1
- package/dist/assets/Index.496221da.css +1 -0
- package/dist/assets/{Index.73b74d25.js → Index.4b0951fb.js} +1 -1
- package/dist/assets/{Index.7a637dfd.js → Index.550cdcb2.js} +1 -1
- package/dist/assets/Index.750f3b63.js +3 -0
- package/dist/assets/{Index.9a22e9e8.js → Index.a8af8718.js} +1 -1
- package/dist/assets/{Index.38393b05.js → Index.a9794552.js} +1 -1
- package/dist/assets/{Index.bb75a3bc.js → Index.acc3fa00.js} +1 -1
- package/dist/assets/{Index.678bd067.js → Index.b1aab4de.js} +1 -1
- package/dist/assets/{Index.795d1945.js → Index.cc3ddfd4.js} +1 -1
- package/dist/assets/Index.e1f0b3e8.js +1 -0
- package/dist/assets/{InfoIcon.c3ef3ef2.js → InfoIcon.d4740c2d.js} +1 -1
- package/dist/assets/{Invitees.cf964064.js → Invitees.d80043d7.js} +1 -1
- package/dist/assets/{List.40293304.js → List.25f5adaf.js} +1 -1
- package/dist/assets/{List.49d8f880.js → List.45507abc.js} +1 -1
- package/dist/assets/{List.f1ce7b3a.js → List.f08e1bff.js} +1 -1
- package/dist/assets/{Login.7e9924c6.js → Login.a21e9ebd.js} +1 -1
- package/dist/assets/{Main.47eed7a0.js → Main.ffa68464.js} +1 -1
- package/dist/assets/{Manage.8cece8f7.js → Manage.c708886e.js} +1 -1
- package/dist/assets/{Navigator.bc5e899a.js → Navigator.d24b810c.js} +1 -1
- package/dist/assets/{Pagination.7f5197e4.js → Pagination.fcd91cad.js} +1 -1
- package/dist/assets/{Setting.62f705d3.js → Setting.750628da.js} +1 -1
- package/dist/assets/{Status.62050d4b.js → Status.783dce6a.js} +1 -1
- package/dist/assets/{distribution.8e74e282.js → distribution.a80efa67.js} +1 -1
- package/dist/assets/index.b7b7827f.js +3 -0
- package/dist/assets/{order.eeeccf6f.js → order.67692924.js} +1 -1
- package/dist/assets/{price.4d81ae80.js → price.cf991d37.js} +1 -1
- package/dist/assets/qrart.07d6f069.js +1 -0
- package/dist/assets/qrart.1b79c36f.js +1 -0
- package/dist/assets/qrart.33f9dfa4.js +1 -0
- package/dist/assets/qrart.346e3549.js +1 -0
- package/dist/assets/qrart.452c2f6a.js +1 -0
- package/dist/assets/qrart.4735fff5.js +1 -0
- package/dist/assets/qrart.5718647b.js +1 -0
- package/dist/assets/qrart.5daa6289.js +1 -0
- package/dist/assets/qrart.6028e1f8.js +1 -0
- package/dist/assets/qrart.72eade75.js +1 -0
- package/dist/assets/qrart.76d28806.js +1 -0
- package/dist/assets/qrart.882e0e2c.js +1 -0
- package/dist/assets/qrart.ab50f7e2.js +1 -0
- package/dist/assets/qrart.ac287ced.js +1 -0
- package/dist/assets/qrart.ccacfbf3.js +1 -0
- package/dist/assets/qrart.da1eb20b.js +1 -0
- package/dist/assets/qrart.e682c0e5.js +1 -0
- package/dist/assets/qrart.fe13ceab.js +1 -0
- package/dist/assets/suno.0e554525.js +1 -0
- package/dist/assets/suno.1d7029ad.js +1 -0
- package/dist/assets/suno.1f58205c.js +1 -0
- package/dist/assets/suno.299492a8.js +1 -0
- package/dist/assets/suno.3494efb9.js +1 -0
- package/dist/assets/suno.469a83ca.js +1 -0
- package/dist/assets/suno.4ab66bf3.js +1 -0
- package/dist/assets/suno.4b228e65.js +1 -0
- package/dist/assets/suno.7082a148.js +1 -0
- package/dist/assets/suno.7849f895.js +1 -0
- package/dist/assets/suno.9dfef35c.js +1 -0
- package/dist/assets/suno.a1281a4d.js +1 -0
- package/dist/assets/suno.a7ffe6c6.js +1 -0
- package/dist/assets/suno.b51a26ac.js +1 -0
- package/dist/assets/suno.ba3fd890.js +1 -0
- package/dist/assets/suno.c2ca35fa.js +1 -0
- package/dist/assets/suno.c5bf1d94.js +1 -0
- package/dist/assets/suno.ded85550.js +1 -0
- package/dist/assets/{vendor-fortawesome.3ae42787.js → vendor-fortawesome.35fae32b.js} +6 -6
- package/dist/index.html +2 -2
- package/package.json +1 -1
- package/dist/assets/Index.1db95ab4.css +0 -1
- package/dist/assets/Index.2b296b8f.js +0 -3
- package/dist/assets/Index.c558b30c.js +0 -1
- package/dist/assets/index.e9d8864b.js +0 -3
- package/dist/assets/qrart.03b3fc02.js +0 -1
- package/dist/assets/qrart.07b0372d.js +0 -1
- package/dist/assets/qrart.0f002698.js +0 -1
- package/dist/assets/qrart.11fbeafc.js +0 -1
- package/dist/assets/qrart.16abbcfe.js +0 -1
- package/dist/assets/qrart.4708caaf.js +0 -1
- package/dist/assets/qrart.4edd78e3.js +0 -1
- package/dist/assets/qrart.69620501.js +0 -1
- package/dist/assets/qrart.9aae53bb.js +0 -1
- package/dist/assets/qrart.9d6ab133.js +0 -1
- package/dist/assets/qrart.b03115ac.js +0 -1
- package/dist/assets/qrart.b3a24903.js +0 -1
- package/dist/assets/qrart.c3003142.js +0 -1
- package/dist/assets/qrart.cc876456.js +0 -1
- package/dist/assets/qrart.d04849e5.js +0 -1
- package/dist/assets/qrart.d65ebd2a.js +0 -1
- package/dist/assets/qrart.dc6dfb4a.js +0 -1
- package/dist/assets/qrart.fe33a9af.js +0 -1
- package/dist/assets/suno.0badb9f0.js +0 -1
- package/dist/assets/suno.0d9f074e.js +0 -1
- package/dist/assets/suno.21468d40.js +0 -1
- package/dist/assets/suno.2c1fd4ea.js +0 -1
- package/dist/assets/suno.42005a16.js +0 -1
- package/dist/assets/suno.761a7220.js +0 -1
- package/dist/assets/suno.87b64260.js +0 -1
- package/dist/assets/suno.897a0570.js +0 -1
- package/dist/assets/suno.8e546667.js +0 -1
- package/dist/assets/suno.9beeb466.js +0 -1
- package/dist/assets/suno.b1f2746b.js +0 -1
- package/dist/assets/suno.b2be77d7.js +0 -1
- package/dist/assets/suno.ba6049a7.js +0 -1
- package/dist/assets/suno.bddf1098.js +0 -1
- package/dist/assets/suno.c2a9ff15.js +0 -1
- package/dist/assets/suno.c7aa0a5b.js +0 -1
- package/dist/assets/suno.e5b7e3d2.js +0 -1
- package/dist/assets/suno.f2e61ae4.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./vendor-others.decd85ac.js";import{_}from"./index.
|
|
1
|
+
import"./vendor-others.decd85ac.js";import{_}from"./index.b7b7827f.js";import{j as s,k as c}from"./vendor-element-plus.eeef3ee7.js";import{H as i,al as e,L as p,M as o,o as l,V as t}from"./vendor-@vue.31495dbd.js";import"./vendor-axios.168e6950.js";import"./vendor-fortawesome.35fae32b.js";const u=i({name:"LayoutAuth",components:{ElContainer:s,ElMain:c}});function m(d,f,v,h,x,k){const n=e("router-view"),r=e("el-main"),a=e("el-container");return l(),p(a,null,{default:o(()=>[t(r,null,{default:o(()=>[t(n)]),_:1})]),_:1})}var B=_(u,[["render",m],["__scopeId","data-v-8e16c232"],["__file","/home/runner/work/Nexior/Nexior/src/layouts/Auth.vue"]]);export{B as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var U=Object.defineProperty,z=Object.defineProperties;var G=Object.getOwnPropertyDescriptors;var P=Object.getOwnPropertySymbols;var H=Object.prototype.hasOwnProperty,J=Object.prototype.propertyIsEnumerable;var N=(e,a,t)=>a in e?U(e,a,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[a]=t,S=(e,a)=>{for(var t in a||(a={}))H.call(a,t)&&N(e,t,a[t]);if(P)for(var t of P(a))J.call(a,t)&&N(e,t,a[t]);return e},w=(e,a)=>z(e,G(a));import"./vendor-others.decd85ac.js";import{_ as O,w as K,x as Q}from"./index.
|
|
1
|
+
var U=Object.defineProperty,z=Object.defineProperties;var G=Object.getOwnPropertyDescriptors;var P=Object.getOwnPropertySymbols;var H=Object.prototype.hasOwnProperty,J=Object.prototype.propertyIsEnumerable;var N=(e,a,t)=>a in e?U(e,a,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[a]=t,S=(e,a)=>{for(var t in a||(a={}))H.call(a,t)&&N(e,t,a[t]);if(P)for(var t of P(a))J.call(a,t)&&N(e,t,a[t]);return e},w=(e,a)=>z(e,G(a));import"./vendor-others.decd85ac.js";import{_ as O,w as K,x as Q}from"./index.b7b7827f.js";import{g as V}from"./price.cf991d37.js";import{H as A,o as r,e as g,U as p,al as l,L as k,M as i,V as o,f as W,T as E,ai as j,W as X,S as C,Q as F}from"./vendor-@vue.31495dbd.js";import{o as Y}from"./order.67692924.js";import{A as Z,b as x,a as ee,n as ae,G as te,H as ie,i as oe,B as re,I as se,J as ne,K as le}from"./vendor-element-plus.eeef3ee7.js";import"./vendor-axios.168e6950.js";import"./vendor-fortawesome.35fae32b.js";const pe=A({name:"ApiPrice",props:{price:{type:Number,required:!1,default:0},unit:{type:String,required:!1,default:void 0},start:{type:Boolean,required:!1,default:!1}},methods:{getPriceString:V}}),ce={class:"price-text"},de={key:0,class:"unfree"},ue={key:1,class:"free"};function me(e,a,t,c,u,v){return r(),g("div",ce,[e.price>0?(r(),g("span",de,p(e.getPriceString({value:e.price}))+" "+p(e.unit?` / ${e.unit}`:"")+p(e.start?e.$t("common.message.startPrice"):""),1)):(r(),g("span",ue,p(e.$t("common.message.free")),1))])}var fe=O(pe,[["render",me],["__scopeId","data-v-d195ccd6"],["__file","/home/runner/work/Nexior/Nexior/src/components/common/Price.vue"]]);const _e=A({name:"ConsoleApplicationBuy",components:{ElSkeleton:Z,ElRow:x,ElCol:ee,ElCard:ae,ElForm:te,ElFormItem:ie,ElButton:oe,ElDivider:re,ElRadioGroup:se,ElRadioButton:ne,Price:fe},data(){return{application:void 0,loading:!1,form:{packageId:void 0,amount:void 0},creating:!1}},computed:{id(){var e,a;return(a=(e=this.$route.params)==null?void 0:e.id)==null?void 0:a.toString()},price(){var e,a,t;return((a=(e=this.application)==null?void 0:e.service)==null?void 0:a.price)&&this.form.amount?this.form.amount*((t=this.application.service)==null?void 0:t.price):0},package(){var e,a,t;if(((a=(e=this.application)==null?void 0:e.service)==null?void 0:a.packages)&&this.form.packageId){const c=(t=this.application.service)==null?void 0:t.packages.filter(u=>u.id===this.form.packageId);if(c.length>0)return c[0]}}},mounted(){this.onFetchApplication()},methods:{getPriceString:V,onFetchApplication(){this.loading=!0,K.get(this.id).then(({data:e})=>{var a,t,c,u;this.application=e,this.loading=!1,this.form.packageId=(u=(c=(t=(a=this.application)==null?void 0:a.service)==null?void 0:t.packages)==null?void 0:c[0])==null?void 0:u.id}).catch(()=>{this.loading=!1})},onCreateOrder(){var a,t,c,u,v,m,f,$;if(!((a=this.application)!=null&&a.id))return;this.creating=!0;const e=this.$t(`service.unit.${(c=(t=this.application)==null?void 0:t.service)==null?void 0:c.unit}s`);Y.create(w(S({application_id:(u=this.application)==null?void 0:u.id,amount:(v=this.package)==null?void 0:v.amount},this.form.packageId!=="custom"&&this.package?{package_id:this.package.id}:{}),{description:`${(f=(m=this.application)==null?void 0:m.service)==null?void 0:f.title} x ${($=this.package)==null?void 0:$.amount} ${e}`})).then(({data:_})=>{this.creating=!1;const b=_;this.$router.push({name:Q,params:{id:b.id}})}).catch(()=>{le.error(this.$t("order.message.createFailed")),this.creating=!1})}}}),ge={class:"title"},he={key:0,class:"ml-2"},ke={key:1,class:F({price:!0,free:!0})};function ve(e,a,t,c,u,v){const m=l("el-col"),f=l("el-row"),$=l("el-skeleton"),_=l("el-form-item"),b=l("el-radio-button"),R=l("el-radio-group"),D=l("price"),L=l("el-divider"),T=l("el-button"),q=l("el-form"),M=l("el-card");return r(),k(f,{class:"panel"},{default:i(()=>[o(m,{span:24},{default:i(()=>[o(f,null,{default:i(()=>[o(m,{span:24},{default:i(()=>[W("h2",ge,p(e.$t("common.title.buyMore")),1)]),_:1})]),_:1}),o(f,null,{default:i(()=>[o(m,{span:24},{default:i(()=>[o(M,{shadow:"hover"},{default:i(()=>[o(f,null,{default:i(()=>[o(m,{span:16,offset:4},{default:i(()=>[e.loading?(r(),k($,{key:0})):e.application?(r(),k(q,{key:1,"label-width":"100px"},{default:i(()=>[o(_,{label:e.$t("application.field.service")},{default:i(()=>{var s,n;return[E(p((n=(s=e.application)==null?void 0:s.service)==null?void 0:n.title),1)]}),_:1},8,["label"]),o(_,{label:e.$t("application.field.package")},{default:i(()=>{var s,n;return[(n=(s=e.application)==null?void 0:s.service)!=null&&n.packages?(r(),k(R,{key:0,modelValue:e.form.packageId,"onUpdate:modelValue":a[0]||(a[0]=d=>e.form.packageId=d)},{default:i(()=>{var d;return[(r(!0),g(X,null,j((d=e.application)==null?void 0:d.service.packages,(h,y)=>(r(),k(b,{key:y,label:h.id,class:"mb-2"},{default:i(()=>{var B,I;return[E(p(h.amount)+" "+p(e.$t(`service.unit.${(I=(B=e.application)==null?void 0:B.service)==null?void 0:I.unit}s`)),1)]}),_:2},1032,["label"]))),128))]}),_:1},8,["modelValue"])):C("v-if",!0)]}),_:1},8,["label"]),o(_,{label:e.$t("service.field.price")},{default:i(()=>{var s,n,d,h,y;return[o(D,{price:(s=e.package)==null?void 0:s.price},null,8,["price"]),e.package?(r(),g("span",he,"("+p(e.getPriceString({value:((n=e.package)==null?void 0:n.price)/((d=e.package)==null?void 0:d.amount)})+" / "+e.$t(`service.unit.${(y=(h=e.application)==null?void 0:h.service)==null?void 0:y.unit}`))+") ",1)):C("v-if",!0)]}),_:1},8,["label"]),o(L,{"border-style":"dashed"}),o(_,{label:e.$t("application.field.shouldPayPrice")},{default:i(()=>{var s,n,d;return[e.package?(r(),g("span",{key:0,class:F({price:!0,unfree:((s=e.package)==null?void 0:s.price)>0,free:((n=e.package)==null?void 0:n.price)===0})},p(e.getPriceString({value:(d=e.package)==null?void 0:d.price})),3)):(r(),g("span",ke," $ 0 "))]}),_:1},8,["label"]),o(_,null,{default:i(()=>[o(T,{type:"primary",size:"large",class:"btn-create",loading:e.creating,round:"",onClick:e.onCreateOrder},{default:i(()=>[E(p(e.$t("application.button.createOrder")),1)]),_:1},8,["loading","onClick"])]),_:1})]),_:1})):C("v-if",!0)]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})}var Se=O(_e,[["render",ve],["__scopeId","data-v-5881dfca"],["__file","/home/runner/work/Nexior/Nexior/src/pages/console/application/Buy.vue"]]);export{Se as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./vendor-others.decd85ac.js";import{_ as r}from"./index.
|
|
1
|
+
import"./vendor-others.decd85ac.js";import{_ as r}from"./index.b7b7827f.js";import{H as t}from"./vendor-@vue.31495dbd.js";import"./vendor-element-plus.eeef3ee7.js";import"./vendor-axios.168e6950.js";import"./vendor-fortawesome.35fae32b.js";const a=t({name:"AuthCallback",data(){var e;return{redirect:(e=this.$route.query.redirect)==null?void 0:e.toString()}},async mounted(){this.redirect?await this.$router.push(this.redirect):await this.$router.push("/")}});var p=r(a,[["__scopeId","data-v-4aa7f9d0"],["__file","/home/runner/work/Nexior/Nexior/src/pages/auth/Callback.vue"]]);export{p as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var w=Object.defineProperty,g=Object.defineProperties;var k=Object.getOwnPropertyDescriptors;var d=Object.getOwnPropertySymbols;var N=Object.prototype.hasOwnProperty,x=Object.prototype.propertyIsEnumerable;var l=(e,t,o)=>t in e?w(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,p=(e,t)=>{for(var o in t||(t={}))N.call(t,o)&&l(e,o,t[o]);if(d)for(var o of d(t))x.call(t,o)&&l(e,o,t[o]);return e},u=(e,t)=>g(e,k(t));import"./vendor-others.decd85ac.js";import{$ as A,Z as I,_ as M}from"./index.
|
|
1
|
+
var w=Object.defineProperty,g=Object.defineProperties;var k=Object.getOwnPropertyDescriptors;var d=Object.getOwnPropertySymbols;var N=Object.prototype.hasOwnProperty,x=Object.prototype.propertyIsEnumerable;var l=(e,t,o)=>t in e?w(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,p=(e,t)=>{for(var o in t||(t={}))N.call(t,o)&&l(e,o,t[o]);if(d)for(var o of d(t))x.call(t,o)&&l(e,o,t[o]);return e},u=(e,t)=>g(e,k(t));import"./vendor-others.decd85ac.js";import{$ as A,Z as I,_ as M}from"./index.b7b7827f.js";import{ai as E}from"./vendor-fortawesome.35fae32b.js";import{e as S,f as R}from"./vendor-element-plus.eeef3ee7.js";import{H as T,al as n,o as s,e as m,L as h,M as _,f as r,V as O,U as f,W as V,ai as G,T as L,S as B,I as D}from"./vendor-@vue.31495dbd.js";const H=T({name:"LayoutChatdoc",components:{ElMenu:S,ElMenuItem:R,FontAwesomeIcon:E},data(){var e,t;return{repositoryId:(t=(e=this.$route.params)==null?void 0:e.repositoryId)==null?void 0:t.toString(),drawer:!1,menuItems:[{index:"chat",title:this.$t("chatdoc.nav.chat"),route:{name:A}},{index:"manage",title:this.$t("chatdoc.nav.manage"),route:{name:I}}]}},computed:{activeMenu(){var t;const e=this.menuItems.filter(o=>{var a;return((a=o.route)==null?void 0:a.name)===this.$route.name});if(e)return(t=e[0])==null?void 0:t.index},repository(){var e,t,o;return(o=(t=(e=this.$store.state)==null?void 0:e.chatdoc)==null?void 0:t.repositories)==null?void 0:o.find(a=>a.id===this.repositoryId)}},async mounted(){await this.getService(),await this.onGetApplications(),await this.onGetRepositories()},methods:{async getService(){await this.$store.dispatch("chatdoc/getService")},async onGetApplications(){await this.$store.dispatch("chatdoc/getApplication")},async onGetRepositories(){await this.$store.dispatch("chatdoc/getRepositories")},async onClickMenu(e){this.activeMenu=e.index,e.route&&await this.$router.push(u(p({},e.route),{params:{id:this.repositoryId}}))}}}),U={class:"main"},F={class:"repository"},W={class:"chatdoc"};function b(e,t,o,a,z,Z){const v=n("font-awesome-icon"),y=n("el-menu-item"),C=n("el-menu");return s(),m("div",U,[e.repositoryId?(s(),h(C,{key:0,"default-active":e.activeMenu,mode:"horizontal",ellipsis:!1,class:"menu"},{default:_(()=>{var c;return[r("div",F,[O(v,{class:"mr-2",icon:["fas","book"]}),r("span",null,f((c=e.repository)==null?void 0:c.name),1)]),(s(!0),m(V,null,G(e.menuItems,(i,$)=>(s(),h(y,{key:$,index:i.index,onClick:j=>e.onClickMenu(i)},{default:_(()=>[L(f(i.title),1)]),_:2},1032,["index","onClick"]))),128))]}),_:1},8,["default-active"])):B("v-if",!0),r("div",W,[D(e.$slots,"chatdoc",{},void 0,!0)])])}var Y=M(H,[["render",b],["__scopeId","data-v-35d9dd71"],["__file","/home/runner/work/Nexior/Nexior/src/layouts/Chatdoc.vue"]]);export{Y as L};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./vendor-others.decd85ac.js";import{N as h}from"./Navigator.
|
|
1
|
+
import"./vendor-others.decd85ac.js";import{N as h}from"./Navigator.d24b810c.js";import{B as v,d as $,e as w,f as N,R as g,_}from"./index.b7b7827f.js";import{ai as L}from"./vendor-fortawesome.35fae32b.js";import{H as l,al as a,o as t,e as i,f as s,W as S,ai as x,Q as C,V as r,U as E,L as O,S as y,aK as I,aL as k}from"./vendor-@vue.31495dbd.js";import"./vendor-element-plus.eeef3ee7.js";import"./DarkSelector.bf241a9d.js";import"./vendor-vue-dark-switch.81063cc1.js";import"./vendor-axios.168e6950.js";const R=l({name:"Navigator",components:{FontAwesomeIcon:L},computed:{isOfficial(){return window.location.origin===v},active(){return this.$route.matched[0].path},user(){return this.$store.getters.user},links(){return[{key:"application-list",text:this.$t("console.menu.applicationList"),name:$,icon:"fa-solid fa-cube"},{key:"order-list",text:this.$t("console.menu.orderList"),name:w,icon:"fa-solid fa-store"},{key:"usage-list",text:this.$t("console.menu.usageList"),name:N,icon:"fa-solid fa-rotate-left"}]}},mounted(){},methods:{onHome(){this.$router.push({name:g})},onNavigate(e){e.name?this.$router.push({name:e.name}):e.href&&window.open(e.href,"_blank")}}}),T=e=>(I("data-v-3859f1b5"),e=e(),k(),e),U={class:"side-panel"},b={class:"links"},B=["onClick"],A={class:"icon"},P={class:"text"},V={class:"outer"},D=T(()=>s("span",{class:"suffix"},null,-1));function H(e,d,m,p,u,f){const n=a("font-awesome-icon");return t(),i("div",U,[s("div",b,[(t(!0),i(S,null,x(e.links,(o,c)=>(t(),i("a",{key:c,class:C({link:!0,active:e.$route.name===o.name}),onClick:K=>e.onNavigate(o)},[s("span",A,[r(n,{icon:o.icon,class:"text-sm"},null,8,["icon"])]),s("span",P,E(o.text),1),s("span",V,[!o.name&&o.href?(t(),O(n,{key:0,icon:"fa-solid fa-up-right-from-square",class:"text-sm ml-2"})):y("v-if",!0)]),D],10,B))),128))])])}var W=_(R,[["render",H],["__scopeId","data-v-3859f1b5"],["__file","/home/runner/work/Nexior/Nexior/src/components/console/SidePanel.vue"]]);const z=l({name:"LayoutConsole",components:{SidePanel:W,Navigator:h},data(){return{mobile:window.innerWidth<768}},mounted(){window.addEventListener("resize",()=>{this.mobile=window.innerWidth<768})}}),F={class:"wrapper"},q={class:"main"};function G(e,d,m,p,u,f){const n=a("side-panel"),o=a("router-view"),c=a("navigator");return t(),i("div",F,[s("div",q,[r(n,{class:"side"}),r(o,{class:"panel"})]),r(c,{class:"navigator",direction:e.mobile?"row":"column"},null,8,["direction"])])}var se=_(z,[["render",G],["__scopeId","data-v-44569c68"],["__file","/home/runner/work/Nexior/Nexior/src/layouts/Console.vue"]]);export{se as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var se=Object.defineProperty;var B=Object.getOwnPropertySymbols;var oe=Object.prototype.hasOwnProperty,ne=Object.prototype.propertyIsEnumerable;var P=(e,t,a)=>t in e?se(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,A=(e,t)=>{for(var a in t||(t={}))oe.call(t,a)&&P(e,a,t[a]);if(B)for(var a of B(t))ne.call(t,a)&&P(e,a,t[a]);return e};import{a as ae}from"./vendor-axios.168e6950.js";import{I as ie}from"./vendor-others.decd85ac.js";import{_ as E,I as N,y as T,v as re,z as le,A as U,D as H,E as W,F as z,G as F,H as G,i as Q,J as L,j as Y,K as j}from"./index.e9d8864b.js";import{H as S,o as n,e as d,al as i,f as l,L as f,S as v,W as I,ai as D,M as C,T as de,U as b,Q as q,V as g,O as ce,aw as ue,a0 as V,as as X,$ as O,I as K}from"./vendor-@vue.31495dbd.js";import{M as pe,E as Z,a as ee,b as he,c as me,d as _e,e as ge,f as fe,g as x,A as $e,h as ye}from"./Status.62050d4b.js";import{C as we}from"./CopyToClipboard.b839dc37.js";import{C as ke,i as te,o as ve,q as Ce,L as be,K as J,d as Ee,M as Se,h as Ie,b as Ne,a as De,N as Ae,A as Oe,O as Re}from"./vendor-element-plus.eeef3ee7.js";import{ag as R}from"./vendor-fortawesome.3ae42787.js";import{i as Te}from"./is.dd611415.js";import"./application.ea1e2a72.js";import"./vendor-markdown.95c097e3.js";import"./vendor-highlight.js.19da0c9f.js";const qe=S({name:"AnsweringMark",data(){return{}},computed:{conversationId(){var e,t;return(t=(e=this.$route.params)==null?void 0:e.id)==null?void 0:t.toString()}}}),Me={class:"mark"};function Ue(e,t,a,m,k,o){return n(),d("div",Me)}var Ge=E(qe,[["render",Ue],["__file","/home/runner/work/Nexior/Nexior/src/components/chat/AnsweringMark.vue"]]);const Le=S({name:"Message",components:{CopyToClipboard:we,AnsweringMark:Ge,MarkdownRenderer:pe,ElAlert:ke,ElButton:te,ElImage:ve},props:{message:{type:Object,required:!0},application:{type:Object,required:!0}},emits:["stop"],data(){return{copied:!1,messageState:N}},computed:{errorText(){var e,t;if(!(!this.message.error||!((e=this.message.error)!=null&&e.code)))switch((t=this.message.error)==null?void 0:t.code){case x:return this.$t("chat.message.errorUsedUp");case fe:return this.$t("chat.message.errorApiError");case ge:return this.$t("chat.message.errorBadRequest");case _e:return this.$t("chat.message.errorTimeout");case me:return this.$t("chat.message.errorTooManyRequests");case he:return this.$t("chat.message.errorContentTooLarge");case ee:return this.$t("chat.message.errorNotApplied");case Z:default:return this.$t("chat.message.errorUnknown")}},showBuyMore(){var e;return this.message.role===T&&((e=this.message.error)==null?void 0:e.code)===x}},methods:{onCopy(){ie(this.message.content.toString(),{debug:!0}),this.copied=!0,setTimeout(()=>{this.copied=!1},3e3)},onBuyMore(){var e;this.$router.push({name:re,params:{id:(e=this.application)==null?void 0:e.id}})}}}),Ve=["role"],Be={class:"author"},Pe={key:0,class:"main"},He={class:"content"},We={key:1},ze=["src"],Fe={class:"operations"};function je(e,t,a,m,k,o){var w;const c=i("el-image"),u=i("markdown-renderer"),_=i("answering-mark"),r=i("copy-to-clipboard"),h=i("el-alert"),s=i("el-button");return n(),d("div",{class:q({message:!0,[e.message.role]:!0}),role:e.message.role},[l("div",Be,[e.message.role==="assistant"?(n(),f(c,{key:0,src:"https://cdn.acedata.cloud/7dljuv.png",fit:"cover",class:"avatar"})):v("v-if",!0)]),e.errorText?(n(),f(h,{key:1,class:"error",title:e.errorText,type:"error",closable:!1},null,8,["title"])):(n(),d("div",Pe,[l("div",He,[Array.isArray(e.message.content)?(n(),d("div",We,[(n(!0),d(I,null,D(e.message.content,($,p)=>{var y;return n(),d("div",{key:p},[$.type==="image_url"?(n(),d("img",{key:0,src:typeof($==null?void 0:$.image_url)=="string"?$.image_url:(y=$.image_url)==null?void 0:y.url,fit:"cover",class:"image"},null,8,ze)):v("v-if",!0),$.type==="text"?(n(),f(u,{key:p,content:$.text},null,8,["content"])):v("v-if",!0)])}),128))])):(n(),f(u,{key:0,content:(w=e.message)==null?void 0:w.content},null,8,["content"])),e.message.state===e.messageState.PENDING?(n(),f(_,{key:2})):v("v-if",!0)]),l("div",Fe,[Array.isArray(e.message.content)?v("v-if",!0):(n(),f(r,{key:0,content:e.message.content,class:"btn-copy"},null,8,["content"]))])])),e.showBuyMore?(n(),f(s,{key:2,round:"",type:"primary",class:"btn btn-buy",size:"small",onClick:e.onBuyMore},{default:C(()=>[de(b(e.$t("common.button.buyMore")),1)]),_:1},8,["onClick"])):v("v-if",!0)],10,Ve)}var Ke=E(Le,[["render",je],["__scopeId","data-v-f0476f80"],["__file","/home/runner/work/Nexior/Nexior/src/components/chat/Message.vue"]]);const xe=S({name:"InputBox",components:{ElTooltip:Ce,FontAwesomeIcon:R,ElUpload:be},props:{disabled:{type:Boolean,required:!1,default:!1},references:{type:Array,required:!1,default:()=>[]},question:{type:String,required:!0}},emits:["update:question","update:references","submit"],data(){return{inputHeight:"35px",questionValue:this.question,fileList:[],uploadUrl:le()+"/api/v1/files/"}},computed:{headers(){return{Authorization:`Bearer ${this.$store.state.token.access}`}},urls(){return this.fileList.map(e=>{var t;return(t=e==null?void 0:e.response)==null?void 0:t.file_url})},canUpload(){return[U.name].includes(this.model.name)},model(){return this.$store.state.chat.model}},watch:{urls(e){this.$emit("update:references",e)},questionValue(e){this.$emit("update:question",e)},question(e){e!==this.questionValue&&(this.questionValue=e)},references(e){e.length===0&&(this.fileList=[])}},methods:{adjustTextareaHeight(){this.$nextTick(()=>{const e=this.$refs.textarea;e&&(e.style.height="35px",e.style.height=e.scrollHeight+"px")})},onSubmit(){!this.question||this.$emit("submit")},onExceed(){J.warning(this.$t("chat.message.uploadReferencesExceed"))},onError(){J.error(this.$t("chat.message.uploadReferencesError"))}}}),Je={class:"input-box"},Qe={class:"btn btn-upload"},Ye=["disabled","placeholder"],Xe={class:"info"};function Ze(e,t,a,m,k,o){const c=i("font-awesome-icon"),u=i("el-tooltip"),_=i("el-upload");return n(),d(I,null,[l("div",Je,[g(_,{"file-list":e.fileList,"onUpdate:file-list":t[0]||(t[0]=r=>e.fileList=r),class:q({upload:!0,disabled:!e.canUpload}),disabled:!e.canUpload,name:"file","show-file-list":!0,limit:1,multiple:!1,action:e.uploadUrl,"on-exceed":e.onExceed,"on-error":e.onError,headers:e.headers},{default:C(()=>[g(u,{class:"box-item",effect:"dark",content:e.$t("chat.message.uploadFile"),placement:"top"},{default:C(()=>[l("span",Qe,[g(c,{icon:"fa-solid fa-paperclip",class:"icon icon-attachment"})])]),_:1},8,["content"])]),_:1},8,["file-list","class","disabled","action","on-exceed","on-error","headers"]),l("span",{class:q({btn:!0,"btn-send":!0,disabled:!e.questionValue}),onClick:t[1]||(t[1]=(...r)=>e.onSubmit&&e.onSubmit(...r))},[g(c,{icon:"fa-solid fa-location-arrow",class:"icon icon-send"})],2),v(" add this textarea "),ce(l("textarea",{ref:"textarea","onUpdate:modelValue":t[2]||(t[2]=r=>e.questionValue=r),disabled:e.disabled,class:"input",placeholder:e.$t("chat.message.newMessagePlaceholder"),style:V({height:e.inputHeight}),onKeydown:t[3]||(t[3]=X(O((...r)=>e.onSubmit&&e.onSubmit(...r),["exact","prevent"]),["enter"])),onInput:t[4]||(t[4]=(...r)=>e.adjustTextareaHeight&&e.adjustTextareaHeight(...r))},null,44,Ye),[[ue,e.questionValue]])]),l("p",Xe,b(e.$t("chat.message.howToUse")),1)],64)}var et=E(xe,[["render",Ze],["__scopeId","data-v-020f4eb8"],["__file","/home/runner/work/Nexior/Nexior/src/components/chat/InputBox.vue"]]);const tt=S({name:"ModelSelector",components:{ElDropdown:Ee,ElDropdownMenu:Se,ElDropdownItem:Ie,FontAwesomeIcon:R},emits:["update:modelValue","select"],data(){return{options:[{icon:"fa-solid fa-bolt",color:"#ff9900",model:H},{icon:"fa-solid fa-bolt",color:"#ff9900",model:W},{icon:"fa-solid fa-wand-magic-sparkles",color:"#ce65e6",model:z},{icon:"fa-solid fa-wand-magic-sparkles",color:"#ce65e6",model:F},{icon:"fa-solid fa-wand-magic-sparkles",color:"#ce65e6",model:U}]}},computed:{model(){const e=this.$store.state.chat.model.name;return[H,W,z,F,U].find(a=>a.name===e)}},methods:{onCommandChange(e){this.$emit("select",e),this.$store.dispatch("chat/setModel",e)}}}),st={class:"selector"},ot={class:"name"},nt={class:"angle"},at={class:"item"},it={class:"info"},rt={class:"name"},lt={class:"description"};function dt(e,t,a,m,k,o){const c=i("font-awesome-icon"),u=i("el-dropdown-item"),_=i("el-dropdown-menu"),r=i("el-dropdown");return n(),d("div",st,[g(r,{trigger:"click","popper-class":"popper"},{dropdown:C(()=>[g(_,null,{default:C(()=>[(n(!0),d(I,null,D(e.options,(h,s)=>(n(),f(u,{key:s,onClick:w=>e.onCommandChange(h.model)},{default:C(()=>[l("div",at,[l("div",{class:"icon",style:V({color:h.color})},[g(c,{icon:h.icon},null,8,["icon"])],4),l("div",it,[l("p",rt,b(h.model.getDisplayName()),1),l("p",lt,b(h.model.getDescription()),1)])])]),_:2},1032,["onClick"]))),128))]),_:1})]),default:C(()=>{var h;return[l("div",null,[l("span",ot,b((h=e.model)==null?void 0:h.getDisplayName()),1),l("span",nt,[g(c,{icon:"fa-solid fa-angle-down"})])])]}),_:1})])}var ct=E(tt,[["render",dt],["__scopeId","data-v-358d65be"],["__file","/home/runner/work/Nexior/Nexior/src/components/chat/ModelSelector.vue"]]);const ut=S({name:"ConversationIntroductionItem",components:{FontAwesomeIcon:R},props:{content:{type:String,required:!0},icon:{type:String,required:!0},color:{type:String,default:"rgb(0, 0, 0)"}},data(){return{}},computed:{}}),pt={class:"item"},ht={class:"icon"},mt={class:"content"};function _t(e,t,a,m,k,o){const c=i("font-awesome-icon");return n(),d("div",pt,[l("div",ht,[g(c,{icon:e.icon,style:V({color:e.color})},null,8,["icon","style"])]),l("div",mt,b(e.content),1)])}var gt=E(ut,[["render",_t],["__scopeId","data-v-bc919b38"],["__file","/home/runner/work/Nexior/Nexior/src/components/chat/IntroductionItem.vue"]]);const ft=S({name:"ConversationIntroduction",components:{IntroductionItem:gt,ElRow:Ne,ElCol:De},emits:["draft"],data(){return{items:[{icon:"fa-solid fa-pen-nib",content:this.$t("chat.message.question1"),color:"rgb(226, 197, 65)"},{icon:"fa-solid fa-laptop-code",content:this.$t("chat.message.question2"),color:"rgb(203, 139, 208)"},{icon:"fa-solid fa-fan",content:this.$t("chat.message.question3"),color:"rgb(118, 208, 235)"},{icon:"fa-solid fa-plane-departure",content:this.$t("chat.message.question4"),color:"rgb(237, 98, 98)"}].sort(()=>Math.random()-.5)}},computed:{}}),$t={class:"introduction"};function yt(e,t,a,m,k,o){const c=i("introduction-item"),u=i("el-col"),_=i("el-row");return n(),d("div",$t,[g(_,{class:"items",justify:"center",gutter:15},{default:C(()=>[(n(!0),d(I,null,D(e.items,(r,h)=>(n(),f(u,{key:h,md:6,sm:12,xs:12},{default:C(()=>[g(c,{content:r.content,icon:r.icon,color:r.color,class:"cursor-pointer",onClick:s=>e.$emit("draft",r.content)},null,8,["content","icon","color","onClick"])]),_:2},1024))),128))]),_:1})])}var wt=E(ft,[["render",yt],["__scopeId","data-v-52040931"],["__file","/home/runner/work/Nexior/Nexior/src/components/chat/Introduction.vue"]]);const kt=S({name:"SidePanel",components:{ElInput:Ae,FontAwesomeIcon:R,ElSkeleton:Oe},props:{},emits:["click"],computed:{conversationId(){var e,t;return(t=(e=this.$route.params)==null?void 0:e.id)==null?void 0:t.toString()},conversationGroups(){var c,u,_,r,h,s,w,$;const e=this.$store.state.chat.conversations,t=new Date;t.setHours(0,0,0,0);const a=new Date(t);a.setDate(a.getDate()-1);const m=new Date(t);m.setDate(m.getDate()-t.getDay());const k=new Date(m);k.setDate(k.getDate()-7);const o=e==null?void 0:e.reduce((p,y)=>{const M=new Date(y.updated_at*1e3);return M>=t?p.today.push(y):M>=a?p.yesterday.push(y):M>=m?p.thisWeek.push(y):p.earlier.push(y),p},{today:[],yesterday:[],thisWeek:[],earlier:[]});return A(A(A(A({},((c=o==null?void 0:o.today)==null?void 0:c.length)>0?{today:(u=o==null?void 0:o.today)==null?void 0:u.sort((p,y)=>y.updated_at-p.updated_at)}:{}),((_=o==null?void 0:o.yesterday)==null?void 0:_.length)>0?{yesterday:(r=o==null?void 0:o.yesterday)==null?void 0:r.sort((p,y)=>y.updated_at-p.updated_at)}:{}),((h=o==null?void 0:o.thisWeek)==null?void 0:h.length)>0?{thisWeek:(s=o==null?void 0:o.thisWeek)==null?void 0:s.sort((p,y)=>y.updated_at-p.updated_at)}:{}),((w=o==null?void 0:o.earlier)==null?void 0:w.length)>0?{earlier:($=o==null?void 0:o.earlier)==null?void 0:$.sort((p,y)=>y.updated_at-p.updated_at)}:{})},application(){return this.$store.state.chat.application},loading(){return this.$store.state.chat.status.getConversations===G.Request},token(){var e,t;return(t=(e=this.$store.state.chat)==null?void 0:e.credential)==null?void 0:t.token}},methods:{async onNewConversation(){this.$router.push({name:Q})},async onConfirm(e){const t=this.token;if(!t){console.error("Token is not found");return}e!=null&&e.deleting?(await L.deleteConversation(e.id,{token:t}),await this.$store.dispatch("chat/getConversations")):e!=null&&e.editing?(await L.updateConversation(e,{token:t}),await this.$store.dispatch("chat/getConversations")):e.editing=!0},onClick(e){!e||(this.$router.push({name:Y,params:{id:e}}),this.$emit("click",e))}}}),vt={class:"panel"},Ct={key:1,class:"conversations"},bt={class:"icons"},Et={class:"title"},St={class:"key"},It=["onClick"],Nt={class:"title"},Dt={key:0},At={key:1},Ot={key:2},Rt={class:"operations"};function Tt(e,t,a,m,k,o){const c=i("el-skeleton"),u=i("font-awesome-icon"),_=i("el-input");return n(),d("div",vt,[e.loading&&e.conversationGroups===void 0?(n(),f(c,{key:0})):(n(),d("div",Ct,[l("div",{class:"conversation",onClick:t[0]||(t[0]=(...r)=>e.onNewConversation&&e.onNewConversation(...r))},[l("div",bt,[g(u,{icon:"fa-solid fa-plus",class:"icon"})]),l("div",Et,b(e.$t("chat.message.startNewChat")),1)]),(n(!0),d(I,null,D(e.conversationGroups,(r,h)=>(n(),d("div",{key:h,class:"group"},[l("div",St,b(e.$t(`chat.group.${h}`)),1),(n(!0),d(I,null,D(r,(s,w)=>{var $;return n(),d("div",{key:w,class:q({conversation:!0,active:s.id===e.conversationId}),onClick:p=>e.onClick(s.id)},[l("div",Nt,[s!=null&&s.deleting?(n(),d("span",Dt,b(`${e.$t("chat.message.confirmDelete")}?`),1)):s!=null&&s.editing?(n(),d("span",At,[g(_,{modelValue:s.title,"onUpdate:modelValue":p=>s.title=p,onKeydown:X(p=>e.onConfirm(s),["enter"])},null,8,["modelValue","onUpdate:modelValue","onKeydown"])])):(s==null?void 0:s.title)||(s==null?void 0:s.messages)?(n(),d("span",Ot,b((s==null?void 0:s.title)||(($=s==null?void 0:s.messages[(s==null?void 0:s.messages.length)-1])==null?void 0:$.content)),1)):v("v-if",!0)]),l("div",Rt,[!(s!=null&&s.editing)&&!s.deleting?(n(),f(u,{key:0,icon:"fa-solid fa-edit",class:"icon icon-edit",onClick:O(p=>s.editing=!0,["stop"])},null,8,["onClick"])):v("v-if",!0),!(s!=null&&s.editing)&&!s.deleting?(n(),f(u,{key:1,icon:"fa-solid fa-trash",class:"icon icon-delete",onClick:O(p=>s.deleting=!0,["stop"])},null,8,["onClick"])):v("v-if",!0),(s==null?void 0:s.editing)||s.deleting?(n(),f(u,{key:2,icon:"fa-solid fa-check",class:"icon icon-confirm",onClick:O(p=>e.onConfirm(s),["stop"])},null,8,["onClick"])):v("v-if",!0),(s==null?void 0:s.editing)||s.deleting?(n(),f(u,{key:3,icon:"fa-solid fa-xmark",class:"icon icon-cancel",onClick:O(p=>{s.editing=!1,s.deleting=!1},["stop"])},null,8,["onClick"])):v("v-if",!0)])],10,It)}),128))]))),128))]))])}var qt=E(kt,[["render",Tt],["__scopeId","data-v-d866c834"],["__file","/home/runner/work/Nexior/Nexior/src/components/chat/SidePanel.vue"]]);const Mt=S({name:"LayoutChat",components:{SidePanel:qt,ElDrawer:Re,ElButton:te,FontAwesomeIcon:R},data(){return{drawer:!1}}}),Ut={class:"main"},Gt={class:"side"},Lt={class:"chat"};function Vt(e,t,a,m,k,o){const c=i("side-panel"),u=i("font-awesome-icon"),_=i("el-button"),r=i("el-drawer");return n(),d("div",Ut,[l("div",Gt,[K(e.$slots,"side",{},()=>[g(c)],!0)]),l("div",Lt,[K(e.$slots,"chat",{},void 0,!0)]),g(_,{round:"",class:"menu",onClick:t[0]||(t[0]=h=>e.drawer=!0)},{default:C(()=>[g(u,{icon:"fa-solid fa-bars",class:"icon-menu"})]),_:1}),g(r,{modelValue:e.drawer,"onUpdate:modelValue":t[1]||(t[1]=h=>e.drawer=h),"with-header":!1,size:"290px",class:"drawer"},{default:C(()=>[g(c)]),_:1},8,["modelValue"])])}var Bt=E(Mt,[["render",Vt],["__scopeId","data-v-8d7a06d2"],["__file","/home/runner/work/Nexior/Nexior/src/layouts/Chat.vue"]]);const Pt=S({name:"ChatConversation",components:{InputBox:et,Introduction:wt,ModelSelector:ct,Message:Ke,ApplicationStatus:$e,Layout:Bt},data(){var e,t;return{question:"",references:[],answering:!1,messages:((t=(e=this.$store.state.chat.conversations)==null?void 0:e.find(a=>{var m;return a.id===((m=this.$route.params.id)==null?void 0:m.toString())}))==null?void 0:t.messages)||[]}},computed:{model(){return this.$store.state.chat.model},conversationId(){var e;return(e=this.$route.params.id)==null?void 0:e.toString()},conversation(){var e;return(e=this.$store.state.chat.conversations)==null?void 0:e.find(t=>t.id===this.conversationId)},service(){return this.$store.state.chat.service},application(){return this.$store.state.chat.application},credential(){var e;return(e=this.$store.state.chat)==null?void 0:e.credential},needApply(){return this.$store.state.chat.status.getApplication===G.Success&&!this.application},conversations(){return this.$store.state.chat.conversations},initializing(){return this.$store.state.chat.status.getApplication===G.Request}},watch:{model(e){e&&this.onModelChanged()},conversationId(e){var t,a;e?(this.messages=((a=(t=this.conversations)==null?void 0:t.find(m=>m.id===e))==null?void 0:a.messages)||[],this.onScrollDown()):this.messages=[]}},async mounted(){await this.onGetService(),await this.onGetApplication(),await this.onGetConversations(),await this.onScrollDown()},methods:{async onGetService(){console.debug("start onGetService"),await this.$store.dispatch("chat/getService"),console.debug("end onGetService")},async onGetApplication(){console.debug("start onGetApplication"),await this.$store.dispatch("chat/getApplication"),console.debug("end onGetApplication")},async onGetConversations(){console.debug("start onGetConversations"),await this.$store.dispatch("chat/getConversations"),console.debug("end onGetConversations")},async onDraft(e){this.question=e,this.onSubmit()},async onCreateNewConversation(){await this.$router.push({name:Q})},async onModelChanged(){await this.onCreateNewConversation(),await this.$store.dispatch("chat/getApplication")},async onSubmit(){if(this.references.length>0){let e=[];e.push({type:"text",text:this.question});for(let t=0;t<this.references.length;t++)e.push({type:"image_url",image_url:this.references[t]});this.messages.push({content:e,role:j})}else this.messages.push({content:this.question,role:j});console.debug("onSubmit",this.question,this.references),await this.onFetchAnswer()},async onScrollDown(){setTimeout(()=>{const e=document.querySelector(".dialogue");!e||!this.messages||this.messages.length===0||(e.scrollTop=e==null?void 0:e.scrollHeight)},0)},async onFetchAnswer(){var k;const e=(k=this.credential)==null?void 0:k.token,t=this.question,a=this.references;if(console.debug("validated",t,a),this.question="",this.references=[],!e||!t){console.error("no token or endpoint or question"),this.messages.push({error:{code:ee},role:T,state:N.FAILED});return}let m=this.conversationId;this.messages.push({content:"",role:T,state:N.PENDING}),console.debug("start to get answer",this.messages),this.onScrollDown(),this.answering=!0,L.chatConversation({question:t,model:this.model.name,references:a,id:this.conversationId,stateful:!0},{token:e,stream:o=>{console.debug("stream response",o),this.messages[this.messages.length-1]={role:T,content:o.answer,state:N.ANSWERING},m=o==null?void 0:o.id,this.onScrollDown()}}).then(async()=>{console.debug("finished fetch answer",this.messages),this.messages[this.messages.length-1].state=N.FINISHED,await this.$store.dispatch("chat/setConversation",{id:m,messages:this.messages}),this.answering=!1,this.conversationId||await this.$router.push({name:Y,params:{id:m}}),this.onScrollDown(),await this.$store.dispatch("chat/getConversations"),await this.$store.dispatch("chat/getApplication")}).catch(o=>{var c,u;if(this.messages&&this.messages.length>0&&(this.messages[this.messages.length-1].state=N.FAILED),console.error(o),ae.isCancel(o))this.messages[this.messages.length-1].error={code:ye};else if((c=o==null?void 0:o.response)!=null&&c.data){let _=(u=o==null?void 0:o.response)==null?void 0:u.data;Te(_)&&(_=JSON.parse(_)),console.debug("error",_),this.messages&&this.messages.length>0&&(this.messages[this.messages.length-1].error=_.error)}else this.messages&&this.messages.length>0&&(this.messages[this.messages.length-1].error={code:Z});this.answering=!1})}}}),Ht={class:"dialogue"},Wt={key:1,class:"messages"},zt={class:"bottom"};function Ft(e,t,a,m,k,o){const c=i("model-selector"),u=i("application-status"),_=i("introduction"),r=i("message"),h=i("input-box"),s=i("layout");return n(),f(s,null,{chat:C(()=>[g(c,{class:"selector"}),g(u,{initializing:e.initializing,application:e.application,"need-apply":e.needApply,service:e.service,onRefresh:t[0]||(t[0]=w=>e.$store.dispatch("chat/getApplication"))},null,8,["initializing","application","need-apply","service"]),l("div",Ht,[e.messages.length===0?(n(),f(_,{key:0,onDraft:e.onDraft},null,8,["onDraft"])):(n(),d("div",Wt,[(n(!0),d(I,null,D(e.messages,(w,$)=>(n(),f(r,{key:$,message:w,application:e.application,class:"message"},null,8,["message","application"]))),128))]))]),l("div",zt,[g(h,{disabled:e.answering,question:e.question,references:e.references,"onUpdate:question":t[1]||(t[1]=w=>e.question=w),"onUpdate:references":t[2]||(t[2]=w=>e.references=w),onSubmit:e.onSubmit},null,8,["disabled","question","references","onSubmit"])])]),_:1})}var as=E(Pt,[["render",Ft],["__scopeId","data-v-3ab2fb26"],["__file","/home/runner/work/Nexior/Nexior/src/pages/chat/Conversation.vue"]]);export{as as default};
|
|
1
|
+
var se=Object.defineProperty;var B=Object.getOwnPropertySymbols;var oe=Object.prototype.hasOwnProperty,ne=Object.prototype.propertyIsEnumerable;var P=(e,t,a)=>t in e?se(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,A=(e,t)=>{for(var a in t||(t={}))oe.call(t,a)&&P(e,a,t[a]);if(B)for(var a of B(t))ne.call(t,a)&&P(e,a,t[a]);return e};import{a as ae}from"./vendor-axios.168e6950.js";import{I as ie}from"./vendor-others.decd85ac.js";import{_ as E,I as N,y as T,v as re,z as le,A as U,D as H,E as W,F as z,G as F,H as G,i as Q,J as L,j as Y,K as j}from"./index.b7b7827f.js";import{H as S,o as n,e as d,al as i,f as l,L as f,S as v,W as I,ai as D,M as C,T as de,U as b,Q as q,V as g,O as ce,aw as ue,a0 as V,as as X,$ as O,I as K}from"./vendor-@vue.31495dbd.js";import{M as pe,E as Z,a as ee,b as he,c as me,d as _e,e as ge,f as fe,g as x,A as $e,h as ye}from"./Status.783dce6a.js";import{C as we}from"./CopyToClipboard.3cfde0c6.js";import{C as ke,i as te,o as ve,q as Ce,L as be,K as J,d as Ee,M as Se,h as Ie,b as Ne,a as De,N as Ae,A as Oe,O as Re}from"./vendor-element-plus.eeef3ee7.js";import{ai as R}from"./vendor-fortawesome.35fae32b.js";import{i as Te}from"./is.dd611415.js";import"./application.ea1e2a72.js";import"./vendor-markdown.95c097e3.js";import"./vendor-highlight.js.19da0c9f.js";const qe=S({name:"AnsweringMark",data(){return{}},computed:{conversationId(){var e,t;return(t=(e=this.$route.params)==null?void 0:e.id)==null?void 0:t.toString()}}}),Me={class:"mark"};function Ue(e,t,a,m,k,o){return n(),d("div",Me)}var Ge=E(qe,[["render",Ue],["__file","/home/runner/work/Nexior/Nexior/src/components/chat/AnsweringMark.vue"]]);const Le=S({name:"Message",components:{CopyToClipboard:we,AnsweringMark:Ge,MarkdownRenderer:pe,ElAlert:ke,ElButton:te,ElImage:ve},props:{message:{type:Object,required:!0},application:{type:Object,required:!0}},emits:["stop"],data(){return{copied:!1,messageState:N}},computed:{errorText(){var e,t;if(!(!this.message.error||!((e=this.message.error)!=null&&e.code)))switch((t=this.message.error)==null?void 0:t.code){case x:return this.$t("chat.message.errorUsedUp");case fe:return this.$t("chat.message.errorApiError");case ge:return this.$t("chat.message.errorBadRequest");case _e:return this.$t("chat.message.errorTimeout");case me:return this.$t("chat.message.errorTooManyRequests");case he:return this.$t("chat.message.errorContentTooLarge");case ee:return this.$t("chat.message.errorNotApplied");case Z:default:return this.$t("chat.message.errorUnknown")}},showBuyMore(){var e;return this.message.role===T&&((e=this.message.error)==null?void 0:e.code)===x}},methods:{onCopy(){ie(this.message.content.toString(),{debug:!0}),this.copied=!0,setTimeout(()=>{this.copied=!1},3e3)},onBuyMore(){var e;this.$router.push({name:re,params:{id:(e=this.application)==null?void 0:e.id}})}}}),Ve=["role"],Be={class:"author"},Pe={key:0,class:"main"},He={class:"content"},We={key:1},ze=["src"],Fe={class:"operations"};function je(e,t,a,m,k,o){var w;const c=i("el-image"),u=i("markdown-renderer"),_=i("answering-mark"),r=i("copy-to-clipboard"),h=i("el-alert"),s=i("el-button");return n(),d("div",{class:q({message:!0,[e.message.role]:!0}),role:e.message.role},[l("div",Be,[e.message.role==="assistant"?(n(),f(c,{key:0,src:"https://cdn.acedata.cloud/7dljuv.png",fit:"cover",class:"avatar"})):v("v-if",!0)]),e.errorText?(n(),f(h,{key:1,class:"error",title:e.errorText,type:"error",closable:!1},null,8,["title"])):(n(),d("div",Pe,[l("div",He,[Array.isArray(e.message.content)?(n(),d("div",We,[(n(!0),d(I,null,D(e.message.content,($,p)=>{var y;return n(),d("div",{key:p},[$.type==="image_url"?(n(),d("img",{key:0,src:typeof($==null?void 0:$.image_url)=="string"?$.image_url:(y=$.image_url)==null?void 0:y.url,fit:"cover",class:"image"},null,8,ze)):v("v-if",!0),$.type==="text"?(n(),f(u,{key:p,content:$.text},null,8,["content"])):v("v-if",!0)])}),128))])):(n(),f(u,{key:0,content:(w=e.message)==null?void 0:w.content},null,8,["content"])),e.message.state===e.messageState.PENDING?(n(),f(_,{key:2})):v("v-if",!0)]),l("div",Fe,[Array.isArray(e.message.content)?v("v-if",!0):(n(),f(r,{key:0,content:e.message.content,class:"btn-copy"},null,8,["content"]))])])),e.showBuyMore?(n(),f(s,{key:2,round:"",type:"primary",class:"btn btn-buy",size:"small",onClick:e.onBuyMore},{default:C(()=>[de(b(e.$t("common.button.buyMore")),1)]),_:1},8,["onClick"])):v("v-if",!0)],10,Ve)}var Ke=E(Le,[["render",je],["__scopeId","data-v-f0476f80"],["__file","/home/runner/work/Nexior/Nexior/src/components/chat/Message.vue"]]);const xe=S({name:"InputBox",components:{ElTooltip:Ce,FontAwesomeIcon:R,ElUpload:be},props:{disabled:{type:Boolean,required:!1,default:!1},references:{type:Array,required:!1,default:()=>[]},question:{type:String,required:!0}},emits:["update:question","update:references","submit"],data(){return{inputHeight:"35px",questionValue:this.question,fileList:[],uploadUrl:le()+"/api/v1/files/"}},computed:{headers(){return{Authorization:`Bearer ${this.$store.state.token.access}`}},urls(){return this.fileList.map(e=>{var t;return(t=e==null?void 0:e.response)==null?void 0:t.file_url})},canUpload(){return[U.name].includes(this.model.name)},model(){return this.$store.state.chat.model}},watch:{urls(e){this.$emit("update:references",e)},questionValue(e){this.$emit("update:question",e)},question(e){e!==this.questionValue&&(this.questionValue=e)},references(e){e.length===0&&(this.fileList=[])}},methods:{adjustTextareaHeight(){this.$nextTick(()=>{const e=this.$refs.textarea;e&&(e.style.height="35px",e.style.height=e.scrollHeight+"px")})},onSubmit(){!this.question||this.$emit("submit")},onExceed(){J.warning(this.$t("chat.message.uploadReferencesExceed"))},onError(){J.error(this.$t("chat.message.uploadReferencesError"))}}}),Je={class:"input-box"},Qe={class:"btn btn-upload"},Ye=["disabled","placeholder"],Xe={class:"info"};function Ze(e,t,a,m,k,o){const c=i("font-awesome-icon"),u=i("el-tooltip"),_=i("el-upload");return n(),d(I,null,[l("div",Je,[g(_,{"file-list":e.fileList,"onUpdate:file-list":t[0]||(t[0]=r=>e.fileList=r),class:q({upload:!0,disabled:!e.canUpload}),disabled:!e.canUpload,name:"file","show-file-list":!0,limit:1,multiple:!1,action:e.uploadUrl,"on-exceed":e.onExceed,"on-error":e.onError,headers:e.headers},{default:C(()=>[g(u,{class:"box-item",effect:"dark",content:e.$t("chat.message.uploadFile"),placement:"top"},{default:C(()=>[l("span",Qe,[g(c,{icon:"fa-solid fa-paperclip",class:"icon icon-attachment"})])]),_:1},8,["content"])]),_:1},8,["file-list","class","disabled","action","on-exceed","on-error","headers"]),l("span",{class:q({btn:!0,"btn-send":!0,disabled:!e.questionValue}),onClick:t[1]||(t[1]=(...r)=>e.onSubmit&&e.onSubmit(...r))},[g(c,{icon:"fa-solid fa-location-arrow",class:"icon icon-send"})],2),v(" add this textarea "),ce(l("textarea",{ref:"textarea","onUpdate:modelValue":t[2]||(t[2]=r=>e.questionValue=r),disabled:e.disabled,class:"input",placeholder:e.$t("chat.message.newMessagePlaceholder"),style:V({height:e.inputHeight}),onKeydown:t[3]||(t[3]=X(O((...r)=>e.onSubmit&&e.onSubmit(...r),["exact","prevent"]),["enter"])),onInput:t[4]||(t[4]=(...r)=>e.adjustTextareaHeight&&e.adjustTextareaHeight(...r))},null,44,Ye),[[ue,e.questionValue]])]),l("p",Xe,b(e.$t("chat.message.howToUse")),1)],64)}var et=E(xe,[["render",Ze],["__scopeId","data-v-020f4eb8"],["__file","/home/runner/work/Nexior/Nexior/src/components/chat/InputBox.vue"]]);const tt=S({name:"ModelSelector",components:{ElDropdown:Ee,ElDropdownMenu:Se,ElDropdownItem:Ie,FontAwesomeIcon:R},emits:["update:modelValue","select"],data(){return{options:[{icon:"fa-solid fa-bolt",color:"#ff9900",model:H},{icon:"fa-solid fa-bolt",color:"#ff9900",model:W},{icon:"fa-solid fa-wand-magic-sparkles",color:"#ce65e6",model:z},{icon:"fa-solid fa-wand-magic-sparkles",color:"#ce65e6",model:F},{icon:"fa-solid fa-wand-magic-sparkles",color:"#ce65e6",model:U}]}},computed:{model(){const e=this.$store.state.chat.model.name;return[H,W,z,F,U].find(a=>a.name===e)}},methods:{onCommandChange(e){this.$emit("select",e),this.$store.dispatch("chat/setModel",e)}}}),st={class:"selector"},ot={class:"name"},nt={class:"angle"},at={class:"item"},it={class:"info"},rt={class:"name"},lt={class:"description"};function dt(e,t,a,m,k,o){const c=i("font-awesome-icon"),u=i("el-dropdown-item"),_=i("el-dropdown-menu"),r=i("el-dropdown");return n(),d("div",st,[g(r,{trigger:"click","popper-class":"popper"},{dropdown:C(()=>[g(_,null,{default:C(()=>[(n(!0),d(I,null,D(e.options,(h,s)=>(n(),f(u,{key:s,onClick:w=>e.onCommandChange(h.model)},{default:C(()=>[l("div",at,[l("div",{class:"icon",style:V({color:h.color})},[g(c,{icon:h.icon},null,8,["icon"])],4),l("div",it,[l("p",rt,b(h.model.getDisplayName()),1),l("p",lt,b(h.model.getDescription()),1)])])]),_:2},1032,["onClick"]))),128))]),_:1})]),default:C(()=>{var h;return[l("div",null,[l("span",ot,b((h=e.model)==null?void 0:h.getDisplayName()),1),l("span",nt,[g(c,{icon:"fa-solid fa-angle-down"})])])]}),_:1})])}var ct=E(tt,[["render",dt],["__scopeId","data-v-358d65be"],["__file","/home/runner/work/Nexior/Nexior/src/components/chat/ModelSelector.vue"]]);const ut=S({name:"ConversationIntroductionItem",components:{FontAwesomeIcon:R},props:{content:{type:String,required:!0},icon:{type:String,required:!0},color:{type:String,default:"rgb(0, 0, 0)"}},data(){return{}},computed:{}}),pt={class:"item"},ht={class:"icon"},mt={class:"content"};function _t(e,t,a,m,k,o){const c=i("font-awesome-icon");return n(),d("div",pt,[l("div",ht,[g(c,{icon:e.icon,style:V({color:e.color})},null,8,["icon","style"])]),l("div",mt,b(e.content),1)])}var gt=E(ut,[["render",_t],["__scopeId","data-v-bc919b38"],["__file","/home/runner/work/Nexior/Nexior/src/components/chat/IntroductionItem.vue"]]);const ft=S({name:"ConversationIntroduction",components:{IntroductionItem:gt,ElRow:Ne,ElCol:De},emits:["draft"],data(){return{items:[{icon:"fa-solid fa-pen-nib",content:this.$t("chat.message.question1"),color:"rgb(226, 197, 65)"},{icon:"fa-solid fa-laptop-code",content:this.$t("chat.message.question2"),color:"rgb(203, 139, 208)"},{icon:"fa-solid fa-fan",content:this.$t("chat.message.question3"),color:"rgb(118, 208, 235)"},{icon:"fa-solid fa-plane-departure",content:this.$t("chat.message.question4"),color:"rgb(237, 98, 98)"}].sort(()=>Math.random()-.5)}},computed:{}}),$t={class:"introduction"};function yt(e,t,a,m,k,o){const c=i("introduction-item"),u=i("el-col"),_=i("el-row");return n(),d("div",$t,[g(_,{class:"items",justify:"center",gutter:15},{default:C(()=>[(n(!0),d(I,null,D(e.items,(r,h)=>(n(),f(u,{key:h,md:6,sm:12,xs:12},{default:C(()=>[g(c,{content:r.content,icon:r.icon,color:r.color,class:"cursor-pointer",onClick:s=>e.$emit("draft",r.content)},null,8,["content","icon","color","onClick"])]),_:2},1024))),128))]),_:1})])}var wt=E(ft,[["render",yt],["__scopeId","data-v-52040931"],["__file","/home/runner/work/Nexior/Nexior/src/components/chat/Introduction.vue"]]);const kt=S({name:"SidePanel",components:{ElInput:Ae,FontAwesomeIcon:R,ElSkeleton:Oe},props:{},emits:["click"],computed:{conversationId(){var e,t;return(t=(e=this.$route.params)==null?void 0:e.id)==null?void 0:t.toString()},conversationGroups(){var c,u,_,r,h,s,w,$;const e=this.$store.state.chat.conversations,t=new Date;t.setHours(0,0,0,0);const a=new Date(t);a.setDate(a.getDate()-1);const m=new Date(t);m.setDate(m.getDate()-t.getDay());const k=new Date(m);k.setDate(k.getDate()-7);const o=e==null?void 0:e.reduce((p,y)=>{const M=new Date(y.updated_at*1e3);return M>=t?p.today.push(y):M>=a?p.yesterday.push(y):M>=m?p.thisWeek.push(y):p.earlier.push(y),p},{today:[],yesterday:[],thisWeek:[],earlier:[]});return A(A(A(A({},((c=o==null?void 0:o.today)==null?void 0:c.length)>0?{today:(u=o==null?void 0:o.today)==null?void 0:u.sort((p,y)=>y.updated_at-p.updated_at)}:{}),((_=o==null?void 0:o.yesterday)==null?void 0:_.length)>0?{yesterday:(r=o==null?void 0:o.yesterday)==null?void 0:r.sort((p,y)=>y.updated_at-p.updated_at)}:{}),((h=o==null?void 0:o.thisWeek)==null?void 0:h.length)>0?{thisWeek:(s=o==null?void 0:o.thisWeek)==null?void 0:s.sort((p,y)=>y.updated_at-p.updated_at)}:{}),((w=o==null?void 0:o.earlier)==null?void 0:w.length)>0?{earlier:($=o==null?void 0:o.earlier)==null?void 0:$.sort((p,y)=>y.updated_at-p.updated_at)}:{})},application(){return this.$store.state.chat.application},loading(){return this.$store.state.chat.status.getConversations===G.Request},token(){var e,t;return(t=(e=this.$store.state.chat)==null?void 0:e.credential)==null?void 0:t.token}},methods:{async onNewConversation(){this.$router.push({name:Q})},async onConfirm(e){const t=this.token;if(!t){console.error("Token is not found");return}e!=null&&e.deleting?(await L.deleteConversation(e.id,{token:t}),await this.$store.dispatch("chat/getConversations")):e!=null&&e.editing?(await L.updateConversation(e,{token:t}),await this.$store.dispatch("chat/getConversations")):e.editing=!0},onClick(e){!e||(this.$router.push({name:Y,params:{id:e}}),this.$emit("click",e))}}}),vt={class:"panel"},Ct={key:1,class:"conversations"},bt={class:"icons"},Et={class:"title"},St={class:"key"},It=["onClick"],Nt={class:"title"},Dt={key:0},At={key:1},Ot={key:2},Rt={class:"operations"};function Tt(e,t,a,m,k,o){const c=i("el-skeleton"),u=i("font-awesome-icon"),_=i("el-input");return n(),d("div",vt,[e.loading&&e.conversationGroups===void 0?(n(),f(c,{key:0})):(n(),d("div",Ct,[l("div",{class:"conversation",onClick:t[0]||(t[0]=(...r)=>e.onNewConversation&&e.onNewConversation(...r))},[l("div",bt,[g(u,{icon:"fa-solid fa-plus",class:"icon"})]),l("div",Et,b(e.$t("chat.message.startNewChat")),1)]),(n(!0),d(I,null,D(e.conversationGroups,(r,h)=>(n(),d("div",{key:h,class:"group"},[l("div",St,b(e.$t(`chat.group.${h}`)),1),(n(!0),d(I,null,D(r,(s,w)=>{var $;return n(),d("div",{key:w,class:q({conversation:!0,active:s.id===e.conversationId}),onClick:p=>e.onClick(s.id)},[l("div",Nt,[s!=null&&s.deleting?(n(),d("span",Dt,b(`${e.$t("chat.message.confirmDelete")}?`),1)):s!=null&&s.editing?(n(),d("span",At,[g(_,{modelValue:s.title,"onUpdate:modelValue":p=>s.title=p,onKeydown:X(p=>e.onConfirm(s),["enter"])},null,8,["modelValue","onUpdate:modelValue","onKeydown"])])):(s==null?void 0:s.title)||(s==null?void 0:s.messages)?(n(),d("span",Ot,b((s==null?void 0:s.title)||(($=s==null?void 0:s.messages[(s==null?void 0:s.messages.length)-1])==null?void 0:$.content)),1)):v("v-if",!0)]),l("div",Rt,[!(s!=null&&s.editing)&&!s.deleting?(n(),f(u,{key:0,icon:"fa-solid fa-edit",class:"icon icon-edit",onClick:O(p=>s.editing=!0,["stop"])},null,8,["onClick"])):v("v-if",!0),!(s!=null&&s.editing)&&!s.deleting?(n(),f(u,{key:1,icon:"fa-solid fa-trash",class:"icon icon-delete",onClick:O(p=>s.deleting=!0,["stop"])},null,8,["onClick"])):v("v-if",!0),(s==null?void 0:s.editing)||s.deleting?(n(),f(u,{key:2,icon:"fa-solid fa-check",class:"icon icon-confirm",onClick:O(p=>e.onConfirm(s),["stop"])},null,8,["onClick"])):v("v-if",!0),(s==null?void 0:s.editing)||s.deleting?(n(),f(u,{key:3,icon:"fa-solid fa-xmark",class:"icon icon-cancel",onClick:O(p=>{s.editing=!1,s.deleting=!1},["stop"])},null,8,["onClick"])):v("v-if",!0)])],10,It)}),128))]))),128))]))])}var qt=E(kt,[["render",Tt],["__scopeId","data-v-d866c834"],["__file","/home/runner/work/Nexior/Nexior/src/components/chat/SidePanel.vue"]]);const Mt=S({name:"LayoutChat",components:{SidePanel:qt,ElDrawer:Re,ElButton:te,FontAwesomeIcon:R},data(){return{drawer:!1}}}),Ut={class:"main"},Gt={class:"side"},Lt={class:"chat"};function Vt(e,t,a,m,k,o){const c=i("side-panel"),u=i("font-awesome-icon"),_=i("el-button"),r=i("el-drawer");return n(),d("div",Ut,[l("div",Gt,[K(e.$slots,"side",{},()=>[g(c)],!0)]),l("div",Lt,[K(e.$slots,"chat",{},void 0,!0)]),g(_,{round:"",class:"menu",onClick:t[0]||(t[0]=h=>e.drawer=!0)},{default:C(()=>[g(u,{icon:"fa-solid fa-bars",class:"icon-menu"})]),_:1}),g(r,{modelValue:e.drawer,"onUpdate:modelValue":t[1]||(t[1]=h=>e.drawer=h),"with-header":!1,size:"290px",class:"drawer"},{default:C(()=>[g(c)]),_:1},8,["modelValue"])])}var Bt=E(Mt,[["render",Vt],["__scopeId","data-v-8d7a06d2"],["__file","/home/runner/work/Nexior/Nexior/src/layouts/Chat.vue"]]);const Pt=S({name:"ChatConversation",components:{InputBox:et,Introduction:wt,ModelSelector:ct,Message:Ke,ApplicationStatus:$e,Layout:Bt},data(){var e,t;return{question:"",references:[],answering:!1,messages:((t=(e=this.$store.state.chat.conversations)==null?void 0:e.find(a=>{var m;return a.id===((m=this.$route.params.id)==null?void 0:m.toString())}))==null?void 0:t.messages)||[]}},computed:{model(){return this.$store.state.chat.model},conversationId(){var e;return(e=this.$route.params.id)==null?void 0:e.toString()},conversation(){var e;return(e=this.$store.state.chat.conversations)==null?void 0:e.find(t=>t.id===this.conversationId)},service(){return this.$store.state.chat.service},application(){return this.$store.state.chat.application},credential(){var e;return(e=this.$store.state.chat)==null?void 0:e.credential},needApply(){return this.$store.state.chat.status.getApplication===G.Success&&!this.application},conversations(){return this.$store.state.chat.conversations},initializing(){return this.$store.state.chat.status.getApplication===G.Request}},watch:{model(e){e&&this.onModelChanged()},conversationId(e){var t,a;e?(this.messages=((a=(t=this.conversations)==null?void 0:t.find(m=>m.id===e))==null?void 0:a.messages)||[],this.onScrollDown()):this.messages=[]}},async mounted(){await this.onGetService(),await this.onGetApplication(),await this.onGetConversations(),await this.onScrollDown()},methods:{async onGetService(){console.debug("start onGetService"),await this.$store.dispatch("chat/getService"),console.debug("end onGetService")},async onGetApplication(){console.debug("start onGetApplication"),await this.$store.dispatch("chat/getApplication"),console.debug("end onGetApplication")},async onGetConversations(){console.debug("start onGetConversations"),await this.$store.dispatch("chat/getConversations"),console.debug("end onGetConversations")},async onDraft(e){this.question=e,this.onSubmit()},async onCreateNewConversation(){await this.$router.push({name:Q})},async onModelChanged(){await this.onCreateNewConversation(),await this.$store.dispatch("chat/getApplication")},async onSubmit(){if(this.references.length>0){let e=[];e.push({type:"text",text:this.question});for(let t=0;t<this.references.length;t++)e.push({type:"image_url",image_url:this.references[t]});this.messages.push({content:e,role:j})}else this.messages.push({content:this.question,role:j});console.debug("onSubmit",this.question,this.references),await this.onFetchAnswer()},async onScrollDown(){setTimeout(()=>{const e=document.querySelector(".dialogue");!e||!this.messages||this.messages.length===0||(e.scrollTop=e==null?void 0:e.scrollHeight)},0)},async onFetchAnswer(){var k;const e=(k=this.credential)==null?void 0:k.token,t=this.question,a=this.references;if(console.debug("validated",t,a),this.question="",this.references=[],!e||!t){console.error("no token or endpoint or question"),this.messages.push({error:{code:ee},role:T,state:N.FAILED});return}let m=this.conversationId;this.messages.push({content:"",role:T,state:N.PENDING}),console.debug("start to get answer",this.messages),this.onScrollDown(),this.answering=!0,L.chatConversation({question:t,model:this.model.name,references:a,id:this.conversationId,stateful:!0},{token:e,stream:o=>{console.debug("stream response",o),this.messages[this.messages.length-1]={role:T,content:o.answer,state:N.ANSWERING},m=o==null?void 0:o.id,this.onScrollDown()}}).then(async()=>{console.debug("finished fetch answer",this.messages),this.messages[this.messages.length-1].state=N.FINISHED,await this.$store.dispatch("chat/setConversation",{id:m,messages:this.messages}),this.answering=!1,this.conversationId||await this.$router.push({name:Y,params:{id:m}}),this.onScrollDown(),await this.$store.dispatch("chat/getConversations"),await this.$store.dispatch("chat/getApplication")}).catch(o=>{var c,u;if(this.messages&&this.messages.length>0&&(this.messages[this.messages.length-1].state=N.FAILED),console.error(o),ae.isCancel(o))this.messages[this.messages.length-1].error={code:ye};else if((c=o==null?void 0:o.response)!=null&&c.data){let _=(u=o==null?void 0:o.response)==null?void 0:u.data;Te(_)&&(_=JSON.parse(_)),console.debug("error",_),this.messages&&this.messages.length>0&&(this.messages[this.messages.length-1].error=_.error)}else this.messages&&this.messages.length>0&&(this.messages[this.messages.length-1].error={code:Z});this.answering=!1})}}}),Ht={class:"dialogue"},Wt={key:1,class:"messages"},zt={class:"bottom"};function Ft(e,t,a,m,k,o){const c=i("model-selector"),u=i("application-status"),_=i("introduction"),r=i("message"),h=i("input-box"),s=i("layout");return n(),f(s,null,{chat:C(()=>[g(c,{class:"selector"}),g(u,{initializing:e.initializing,application:e.application,"need-apply":e.needApply,service:e.service,onRefresh:t[0]||(t[0]=w=>e.$store.dispatch("chat/getApplication"))},null,8,["initializing","application","need-apply","service"]),l("div",Ht,[e.messages.length===0?(n(),f(_,{key:0,onDraft:e.onDraft},null,8,["onDraft"])):(n(),d("div",Wt,[(n(!0),d(I,null,D(e.messages,(w,$)=>(n(),f(r,{key:$,message:w,application:e.application,class:"message"},null,8,["message","application"]))),128))]))]),l("div",zt,[g(h,{disabled:e.answering,question:e.question,references:e.references,"onUpdate:question":t[1]||(t[1]=w=>e.question=w),"onUpdate:references":t[2]||(t[2]=w=>e.references=w),onSubmit:e.onSubmit},null,8,["disabled","question","references","onSubmit"])])]),_:1})}var as=E(Pt,[["render",Ft],["__scopeId","data-v-3ab2fb26"],["__file","/home/runner/work/Nexior/Nexior/src/pages/chat/Conversation.vue"]]);export{as as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{I as L}from"./vendor-others.decd85ac.js";import{L as F}from"./Chatdoc.073f1869.js";import{$ as P,a0 as b,a1 as A,_ as k,y as N,H as v,K as H}from"./index.e9d8864b.js";import{a as K}from"./vendor-axios.168e6950.js";import{M as z,E as T,a as q,b as G,c as W,d as Q,e as J,f as j,g as O,A as Y,h as X}from"./Status.62050d4b.js";import{i as Z}from"./is.dd611415.js";import{ag as D}from"./vendor-fortawesome.3ae42787.js";import{N as V,A as x,C as ee,i as se}from"./vendor-element-plus.eeef3ee7.js";import{H as E,al as l,o,e as c,L as h,f as i,V as m,U as I,W as R,ai as M,Q as S,as as U,S as f,$ as w,M as B,T as te}from"./vendor-@vue.31495dbd.js";import{C as oe}from"./CopyToClipboard.b839dc37.js";import"./application.ea1e2a72.js";import"./vendor-markdown.95c097e3.js";import"./vendor-highlight.js.19da0c9f.js";var $=(e=>(e.PENDING="pending",e.ANSWERING="answering",e.FINISHED="finished",e.FAILED="failed",e))($||{});const ie=E({name:"SidePanel",components:{ElInput:V,FontAwesomeIcon:D,ElSkeleton:x},props:{},emits:["click"],computed:{repositoryId(){var e,t;return(t=(e=this.$route.params)==null?void 0:e.repositoryId)==null?void 0:t.toString()},conversationId(){var e,t;return(t=(e=this.$route.params)==null?void 0:e.conversationId)==null?void 0:t.toString()},repository(){var e,t,n;return(n=(t=(e=this.$store.state)==null?void 0:e.chatdoc)==null?void 0:t.repositories)==null?void 0:n.find(d=>d.id===this.repositoryId)},conversations(){var e;return(e=this.repository)==null?void 0:e.conversations},application(){return this.$store.state.chatdoc.application}},methods:{async onNewConversation(){this.$router.push({name:P,params:{repositoryId:this.repositoryId}})},async onConfirm(e){e!=null&&e.deleting?(await b.deleteConversation(e.id),await this.$store.dispatch("chat/getConversations")):e!=null&&e.editing?(await b.updateConversation(e),await this.$store.dispatch("chat/getConversations")):e.editing=!0},onClick(e){!e||(this.$router.push({name:A,params:{repositoryId:this.repositoryId,conversationId:e}}),this.$emit("click",e))}}}),ne={class:"panel"},ae={key:1,class:"conversations"},re={class:"icons"},le={class:"title"},de=["onClick"],ce={class:"icons"},ue={class:"title"},pe={key:0},he={key:1},me={key:2},_e={class:"operations"};function ge(e,t,n,d,r,y){const u=l("el-skeleton"),a=l("font-awesome-icon"),_=l("el-input");return o(),c("div",ne,[e.conversations===void 0?(o(),h(u,{key:0})):(o(),c("div",ae,[i("div",{class:"conversation",onClick:t[0]||(t[0]=(...s)=>e.onNewConversation&&e.onNewConversation(...s))},[i("div",re,[m(a,{icon:"fa-solid fa-plus",class:"icon"})]),i("div",le,I(e.$t("chatdoc.message.startNewChat")),1)]),(o(!0),c(R,null,M(e.conversations,(s,C)=>{var p;return o(),c("div",{key:C,class:S({conversation:!0,active:s.id===e.conversationId}),onClick:g=>e.onClick(s.id)},[i("div",ce,[m(a,{icon:"fa-regular fa-comment",class:"icon"})]),i("div",ue,[s!=null&&s.deleting?(o(),c("span",pe,I(`${e.$t("chatdoc.message.confirmDelete")}?`),1)):s!=null&&s.editing?(o(),c("span",he,[m(_,{modelValue:s.title,"onUpdate:modelValue":g=>s.title=g,onKeydown:U(g=>e.onConfirm(s),["enter"])},null,8,["modelValue","onUpdate:modelValue","onKeydown"])])):(s==null?void 0:s.title)||(s==null?void 0:s.messages)?(o(),c("span",me,I((s==null?void 0:s.title)||((p=s==null?void 0:s.messages[(s==null?void 0:s.messages.length)-1])==null?void 0:p.content)),1)):f("v-if",!0)]),i("div",_e,[!(s!=null&&s.editing)&&!s.deleting?(o(),h(a,{key:0,icon:"fa-solid fa-edit",class:"icon icon-edit",onClick:w(g=>s.editing=!0,["stop"])},null,8,["onClick"])):f("v-if",!0),!(s!=null&&s.editing)&&!s.deleting?(o(),h(a,{key:1,icon:"fa-solid fa-trash",class:"icon icon-delete",onClick:w(g=>s.deleting=!0,["stop"])},null,8,["onClick"])):f("v-if",!0),(s==null?void 0:s.editing)||s.deleting?(o(),h(a,{key:2,icon:"fa-solid fa-check",class:"icon icon-confirm",onClick:w(g=>e.onConfirm(s),["stop"])},null,8,["onClick"])):f("v-if",!0),(s==null?void 0:s.editing)||s.deleting?(o(),h(a,{key:3,icon:"fa-solid fa-xmark",class:"icon icon-cancel",onClick:w(g=>{s.editing=!1,s.deleting=!1},["stop"])},null,8,["onClick"])):f("v-if",!0)])],10,de)}),128))]))])}var fe=k(ie,[["render",ge],["__scopeId","data-v-2282a6e1"],["__file","/home/runner/work/Nexior/Nexior/src/components/chatdoc/Conversations.vue"]]);const ye=E({name:"AnsweringMark",data(){return{}},computed:{conversationId(){var e,t;return(t=(e=this.$route.params)==null?void 0:e.conversationId)==null?void 0:t.toString()}}}),$e={class:"mark"};function Ce(e,t,n,d,r,y){return o(),c("div",$e)}var we=k(ye,[["render",Ce],["__file","/home/runner/work/Nexior/Nexior/src/components/chatdoc/AnsweringMark.vue"]]);const Ie=E({name:"Message",components:{CopyToClipboard:oe,AnsweringMark:we,MarkdownRenderer:z,ElAlert:ee,ElButton:se},props:{message:{type:Object,required:!0}},emits:["stop"],data(){return{copied:!1,messageState:$}},computed:{errorText(){var e,t;if(!(!this.message.error||!((e=this.message.error)!=null&&e.code)))switch((t=this.message.error)==null?void 0:t.code){case O:return this.$t("chatdoc.message.errorUsedUp");case j:return this.$t("chatdoc.message.errorApiError");case J:return this.$t("chatdoc.message.errorBadRequest");case Q:return this.$t("chatdoc.message.errorTimeout");case W:return this.$t("chatdoc.message.errorTooManyRequests");case G:return this.$t("chatdoc.message.errorContentTooLarge");case q:return this.$t("chatdoc.message.errorNotApplied");case T:default:return this.$t("chatdoc.message.errorUnknown")}},showBuyMore(){var e;return this.message.role===N&&((e=this.message.error)==null?void 0:e.code)===O}},methods:{onCopy(){L(this.message.content.toString(),{debug:!0}),this.copied=!0,setTimeout(()=>{this.copied=!1},3e3)},onBuyMore(){}}}),ke=["role"],Ee={class:"content"},Ne={class:"operations"};function Re(e,t,n,d,r,y){var p;const u=l("markdown-renderer"),a=l("answering-mark"),_=l("copy-to-clipboard"),s=l("el-alert"),C=l("el-button");return o(),c(R,null,[i("div",{class:S({message:!0,[e.message.role]:!0,hidden:e.errorText&&e.message.role==="assistant"}),role:e.message.role},[i("div",Ee,[m(u,{content:(p=e.message)==null?void 0:p.content},null,8,["content"]),e.message.state===e.messageState.PENDING?(o(),h(a,{key:0})):f("v-if",!0)]),i("div",Ne,[m(_,{content:e.message.content,class:"btn-copy"},null,8,["content"])])],10,ke),e.errorText?(o(),h(s,{key:0,class:"error",title:e.errorText,type:"error",closable:!1},null,8,["title"])):f("v-if",!0),e.showBuyMore?(o(),h(C,{key:1,round:"",type:"primary",class:"btn btn-buy",size:"small",onClick:e.onBuyMore},{default:B(()=>[te(I(e.$t("common.button.buyMore")),1)]),_:1},8,["onClick"])):f("v-if",!0)],64)}var be=k(Ie,[["render",Re],["__scopeId","data-v-95a62450"],["__file","/home/runner/work/Nexior/Nexior/src/components/chatdoc/Message.vue"]]);const Se=E({name:"InputBox",components:{ElInput:V,FontAwesomeIcon:D},props:{disabled:{type:Boolean,required:!1,default:!1},question:{type:String,required:!0}},emits:["update:question","submit"],data(){return{questionValue:this.question,fileList:[]}},computed:{model(){return this.$store.state.chat.model}},watch:{questionValue(e){this.$emit("update:question",e)},question(e){e!==this.questionValue&&(this.questionValue=e)},references(e){e.length===0&&(this.fileList=[])}},methods:{onSubmit(){!this.question||this.$emit("submit")}}}),ve={class:"input-box"},Oe={class:"info"};function Ae(e,t,n,d,r,y){const u=l("font-awesome-icon"),a=l("el-input");return o(),c(R,null,[i("div",ve,[i("span",{class:S({btn:!0,"btn-send":!0,disabled:!e.question}),onClick:t[0]||(t[0]=(..._)=>e.onSubmit&&e.onSubmit(..._))},[m(u,{icon:"fa-solid fa-location-arrow",class:"icon icon-send"})],2),m(a,{modelValue:e.questionValue,"onUpdate:modelValue":t[1]||(t[1]=_=>e.questionValue=_),disabled:e.disabled,class:"input",type:"textarea",placeholder:e.$t("chat.message.newMessagePlaceholder"),onKeydown:U(w(e.onSubmit,["exact","prevent"]),["enter"])},null,8,["modelValue","disabled","placeholder","onKeydown"])]),i("p",Oe,I(e.$t("chat.message.howToUse")),1)],64)}var Te=k(Se,[["render",Ae],["__scopeId","data-v-7ed35c20"],["__file","/home/runner/work/Nexior/Nexior/src/components/chatdoc/InputBox.vue"]]);const qe=E({name:"ChatdocConversation",components:{Layout:F,Conversations:fe,Message:be,InputBox:Te,ApplicationStatus:Y},data(){return{loading:!1,repositoryId:this.$route.params.repositoryId.toString(),answering:!1,question:""}},computed:{messages:{get(){var e,t;return((t=(e=this.conversations)==null?void 0:e.find(n=>{var d;return n.id===((d=this.$route.params.conversationId)==null?void 0:d.toString())}))==null?void 0:t.messages)||[]},set(e){console.debug("set messages",e)}},repository(){var e,t,n;return(n=(t=(e=this.$store.state)==null?void 0:e.chatdoc)==null?void 0:t.repositories)==null?void 0:n.find(d=>d.id===this.repositoryId)},conversations(){var e;return(e=this.repository)==null?void 0:e.conversations},conversationId(){var e;return(e=this.$route.params.conversationId)==null?void 0:e.toString()},application(){return this.$store.state.chatdoc.application},credential(){return this.$store.state.chatdoc.credential},needApply(){return this.$store.state.chatdoc.status.getApplication===v.Success&&!this.application},initializing(){return this.$store.state.chatdoc.status.getApplication===v.Request},service(){return this.$store.state.chatdoc.service}},async mounted(){console.debug("start get conversations"),this.loading=!0,this.$store.dispatch("chatdoc/getConversations",{repositoryId:this.repositoryId}).finally(()=>{this.loading=!1})},methods:{async onSubmit(){this.messages.push({content:this.question,role:H}),await this.onFetchAnswer()},async onScrollDown(){setTimeout(()=>{const e=document.querySelector(".dialogue");!e||!this.messages||this.messages.length===0||(e.scrollTop=e==null?void 0:e.scrollHeight)},0)},async onFetchAnswer(){var d;const e=(d=this.credential)==null?void 0:d.token,t=this.question;if(console.debug(this.onFetchAnswer,"validated",t),this.question="",!e||!t){console.error("no token or endpoint or question"),this.messages.push({error:{code:q},role:N,state:$.FAILED});return}let n=this.conversationId;this.messages.push({content:"",role:N,state:$.PENDING}),console.debug("start to get answer",this.messages),this.onScrollDown(),this.answering=!0,b.chatConversation({repositoryId:this.repositoryId,question:t,id:this.conversationId},{token:e,stream:r=>{this.messages[this.messages.length-1]={role:N,content:r.answer,state:$.ANSWERING},n=r.id,this.onScrollDown()}}).then(async()=>{console.debug("finished fetch answer"),this.messages[this.messages.length-1].state=$.FINISHED,await this.$store.dispatch("chatdoc/setConversation",{id:n,messages:this.messages,repositoryId:this.repositoryId}),this.answering=!1,this.conversationId||(console.debug("push to conversation",n),await this.$router.push({name:A,params:{conversationId:n,repositoryId:this.repositoryId}})),this.onScrollDown(),await this.$store.dispatch("chatdoc/getConversations",{repositoryId:this.repositoryId})}).catch(r=>{var y,u;if(this.messages&&this.messages.length>0&&(this.messages[this.messages.length-1].state=$.FAILED),console.error(r),K.isCancel(r))this.messages[this.messages.length-1].error={code:X};else if((y=r==null?void 0:r.response)!=null&&y.data){let a=(u=r==null?void 0:r.response)==null?void 0:u.data;Z(a)&&(a=JSON.parse(a)),this.messages&&this.messages.length>0&&(this.messages[this.messages.length-1].error=a.error)}else this.messages&&this.messages.length>0&&(this.messages[this.messages.length-1].error={code:T});this.answering=!1})}}}),De={class:"wrapper"},Ve={class:"chat"},Me={class:"status"},Ue={class:"dialogue"},Be={class:"messages"},Le={class:"bottom"};function Fe(e,t,n,d,r,y){const u=l("conversations"),a=l("application-status"),_=l("message"),s=l("input-box"),C=l("layout");return o(),h(C,null,{chatdoc:B(()=>[i("div",De,[m(u,{class:"side"}),i("div",Ve,[i("div",Me,[m(a,{"show-price":!1,initializing:e.initializing,application:e.application,"need-apply":e.needApply,service:e.service,onRefresh:t[0]||(t[0]=p=>e.$store.dispatch("chatdoc/getApplication"))},null,8,["initializing","application","need-apply","service"])]),i("div",Ue,[i("div",Be,[(o(!0),c(R,null,M(e.messages,(p,g)=>(o(),h(_,{key:g,message:p,class:"message"},null,8,["message"]))),128))])]),i("div",Le,[m(s,{disabled:e.answering,question:e.question,"onUpdate:question":t[1]||(t[1]=p=>e.question=p),onSubmit:e.onSubmit},null,8,["disabled","question","onSubmit"])])])])]),_:1})}var es=k(qe,[["render",Fe],["__scopeId","data-v-24089614"],["__file","/home/runner/work/Nexior/Nexior/src/pages/chatdoc/Conversation.vue"]]);export{es as default};
|
|
1
|
+
import{I as L}from"./vendor-others.decd85ac.js";import{L as F}from"./Chatdoc.8252e87e.js";import{$ as P,a0 as b,a1 as A,_ as k,y as N,H as v,K as H}from"./index.b7b7827f.js";import{a as K}from"./vendor-axios.168e6950.js";import{M as z,E as T,a as q,b as G,c as W,d as Q,e as J,f as j,g as O,A as Y,h as X}from"./Status.783dce6a.js";import{i as Z}from"./is.dd611415.js";import{ai as D}from"./vendor-fortawesome.35fae32b.js";import{N as V,A as x,C as ee,i as se}from"./vendor-element-plus.eeef3ee7.js";import{H as E,al as l,o,e as c,L as h,f as i,V as m,U as I,W as R,ai as M,Q as S,as as U,S as f,$ as w,M as B,T as te}from"./vendor-@vue.31495dbd.js";import{C as oe}from"./CopyToClipboard.3cfde0c6.js";import"./application.ea1e2a72.js";import"./vendor-markdown.95c097e3.js";import"./vendor-highlight.js.19da0c9f.js";var $=(e=>(e.PENDING="pending",e.ANSWERING="answering",e.FINISHED="finished",e.FAILED="failed",e))($||{});const ie=E({name:"SidePanel",components:{ElInput:V,FontAwesomeIcon:D,ElSkeleton:x},props:{},emits:["click"],computed:{repositoryId(){var e,t;return(t=(e=this.$route.params)==null?void 0:e.repositoryId)==null?void 0:t.toString()},conversationId(){var e,t;return(t=(e=this.$route.params)==null?void 0:e.conversationId)==null?void 0:t.toString()},repository(){var e,t,n;return(n=(t=(e=this.$store.state)==null?void 0:e.chatdoc)==null?void 0:t.repositories)==null?void 0:n.find(d=>d.id===this.repositoryId)},conversations(){var e;return(e=this.repository)==null?void 0:e.conversations},application(){return this.$store.state.chatdoc.application}},methods:{async onNewConversation(){this.$router.push({name:P,params:{repositoryId:this.repositoryId}})},async onConfirm(e){e!=null&&e.deleting?(await b.deleteConversation(e.id),await this.$store.dispatch("chat/getConversations")):e!=null&&e.editing?(await b.updateConversation(e),await this.$store.dispatch("chat/getConversations")):e.editing=!0},onClick(e){!e||(this.$router.push({name:A,params:{repositoryId:this.repositoryId,conversationId:e}}),this.$emit("click",e))}}}),ne={class:"panel"},ae={key:1,class:"conversations"},re={class:"icons"},le={class:"title"},de=["onClick"],ce={class:"icons"},ue={class:"title"},pe={key:0},he={key:1},me={key:2},_e={class:"operations"};function ge(e,t,n,d,r,y){const u=l("el-skeleton"),a=l("font-awesome-icon"),_=l("el-input");return o(),c("div",ne,[e.conversations===void 0?(o(),h(u,{key:0})):(o(),c("div",ae,[i("div",{class:"conversation",onClick:t[0]||(t[0]=(...s)=>e.onNewConversation&&e.onNewConversation(...s))},[i("div",re,[m(a,{icon:"fa-solid fa-plus",class:"icon"})]),i("div",le,I(e.$t("chatdoc.message.startNewChat")),1)]),(o(!0),c(R,null,M(e.conversations,(s,C)=>{var p;return o(),c("div",{key:C,class:S({conversation:!0,active:s.id===e.conversationId}),onClick:g=>e.onClick(s.id)},[i("div",ce,[m(a,{icon:"fa-regular fa-comment",class:"icon"})]),i("div",ue,[s!=null&&s.deleting?(o(),c("span",pe,I(`${e.$t("chatdoc.message.confirmDelete")}?`),1)):s!=null&&s.editing?(o(),c("span",he,[m(_,{modelValue:s.title,"onUpdate:modelValue":g=>s.title=g,onKeydown:U(g=>e.onConfirm(s),["enter"])},null,8,["modelValue","onUpdate:modelValue","onKeydown"])])):(s==null?void 0:s.title)||(s==null?void 0:s.messages)?(o(),c("span",me,I((s==null?void 0:s.title)||((p=s==null?void 0:s.messages[(s==null?void 0:s.messages.length)-1])==null?void 0:p.content)),1)):f("v-if",!0)]),i("div",_e,[!(s!=null&&s.editing)&&!s.deleting?(o(),h(a,{key:0,icon:"fa-solid fa-edit",class:"icon icon-edit",onClick:w(g=>s.editing=!0,["stop"])},null,8,["onClick"])):f("v-if",!0),!(s!=null&&s.editing)&&!s.deleting?(o(),h(a,{key:1,icon:"fa-solid fa-trash",class:"icon icon-delete",onClick:w(g=>s.deleting=!0,["stop"])},null,8,["onClick"])):f("v-if",!0),(s==null?void 0:s.editing)||s.deleting?(o(),h(a,{key:2,icon:"fa-solid fa-check",class:"icon icon-confirm",onClick:w(g=>e.onConfirm(s),["stop"])},null,8,["onClick"])):f("v-if",!0),(s==null?void 0:s.editing)||s.deleting?(o(),h(a,{key:3,icon:"fa-solid fa-xmark",class:"icon icon-cancel",onClick:w(g=>{s.editing=!1,s.deleting=!1},["stop"])},null,8,["onClick"])):f("v-if",!0)])],10,de)}),128))]))])}var fe=k(ie,[["render",ge],["__scopeId","data-v-2282a6e1"],["__file","/home/runner/work/Nexior/Nexior/src/components/chatdoc/Conversations.vue"]]);const ye=E({name:"AnsweringMark",data(){return{}},computed:{conversationId(){var e,t;return(t=(e=this.$route.params)==null?void 0:e.conversationId)==null?void 0:t.toString()}}}),$e={class:"mark"};function Ce(e,t,n,d,r,y){return o(),c("div",$e)}var we=k(ye,[["render",Ce],["__file","/home/runner/work/Nexior/Nexior/src/components/chatdoc/AnsweringMark.vue"]]);const Ie=E({name:"Message",components:{CopyToClipboard:oe,AnsweringMark:we,MarkdownRenderer:z,ElAlert:ee,ElButton:se},props:{message:{type:Object,required:!0}},emits:["stop"],data(){return{copied:!1,messageState:$}},computed:{errorText(){var e,t;if(!(!this.message.error||!((e=this.message.error)!=null&&e.code)))switch((t=this.message.error)==null?void 0:t.code){case O:return this.$t("chatdoc.message.errorUsedUp");case j:return this.$t("chatdoc.message.errorApiError");case J:return this.$t("chatdoc.message.errorBadRequest");case Q:return this.$t("chatdoc.message.errorTimeout");case W:return this.$t("chatdoc.message.errorTooManyRequests");case G:return this.$t("chatdoc.message.errorContentTooLarge");case q:return this.$t("chatdoc.message.errorNotApplied");case T:default:return this.$t("chatdoc.message.errorUnknown")}},showBuyMore(){var e;return this.message.role===N&&((e=this.message.error)==null?void 0:e.code)===O}},methods:{onCopy(){L(this.message.content.toString(),{debug:!0}),this.copied=!0,setTimeout(()=>{this.copied=!1},3e3)},onBuyMore(){}}}),ke=["role"],Ee={class:"content"},Ne={class:"operations"};function Re(e,t,n,d,r,y){var p;const u=l("markdown-renderer"),a=l("answering-mark"),_=l("copy-to-clipboard"),s=l("el-alert"),C=l("el-button");return o(),c(R,null,[i("div",{class:S({message:!0,[e.message.role]:!0,hidden:e.errorText&&e.message.role==="assistant"}),role:e.message.role},[i("div",Ee,[m(u,{content:(p=e.message)==null?void 0:p.content},null,8,["content"]),e.message.state===e.messageState.PENDING?(o(),h(a,{key:0})):f("v-if",!0)]),i("div",Ne,[m(_,{content:e.message.content,class:"btn-copy"},null,8,["content"])])],10,ke),e.errorText?(o(),h(s,{key:0,class:"error",title:e.errorText,type:"error",closable:!1},null,8,["title"])):f("v-if",!0),e.showBuyMore?(o(),h(C,{key:1,round:"",type:"primary",class:"btn btn-buy",size:"small",onClick:e.onBuyMore},{default:B(()=>[te(I(e.$t("common.button.buyMore")),1)]),_:1},8,["onClick"])):f("v-if",!0)],64)}var be=k(Ie,[["render",Re],["__scopeId","data-v-95a62450"],["__file","/home/runner/work/Nexior/Nexior/src/components/chatdoc/Message.vue"]]);const Se=E({name:"InputBox",components:{ElInput:V,FontAwesomeIcon:D},props:{disabled:{type:Boolean,required:!1,default:!1},question:{type:String,required:!0}},emits:["update:question","submit"],data(){return{questionValue:this.question,fileList:[]}},computed:{model(){return this.$store.state.chat.model}},watch:{questionValue(e){this.$emit("update:question",e)},question(e){e!==this.questionValue&&(this.questionValue=e)},references(e){e.length===0&&(this.fileList=[])}},methods:{onSubmit(){!this.question||this.$emit("submit")}}}),ve={class:"input-box"},Oe={class:"info"};function Ae(e,t,n,d,r,y){const u=l("font-awesome-icon"),a=l("el-input");return o(),c(R,null,[i("div",ve,[i("span",{class:S({btn:!0,"btn-send":!0,disabled:!e.question}),onClick:t[0]||(t[0]=(..._)=>e.onSubmit&&e.onSubmit(..._))},[m(u,{icon:"fa-solid fa-location-arrow",class:"icon icon-send"})],2),m(a,{modelValue:e.questionValue,"onUpdate:modelValue":t[1]||(t[1]=_=>e.questionValue=_),disabled:e.disabled,class:"input",type:"textarea",placeholder:e.$t("chat.message.newMessagePlaceholder"),onKeydown:U(w(e.onSubmit,["exact","prevent"]),["enter"])},null,8,["modelValue","disabled","placeholder","onKeydown"])]),i("p",Oe,I(e.$t("chat.message.howToUse")),1)],64)}var Te=k(Se,[["render",Ae],["__scopeId","data-v-7ed35c20"],["__file","/home/runner/work/Nexior/Nexior/src/components/chatdoc/InputBox.vue"]]);const qe=E({name:"ChatdocConversation",components:{Layout:F,Conversations:fe,Message:be,InputBox:Te,ApplicationStatus:Y},data(){return{loading:!1,repositoryId:this.$route.params.repositoryId.toString(),answering:!1,question:""}},computed:{messages:{get(){var e,t;return((t=(e=this.conversations)==null?void 0:e.find(n=>{var d;return n.id===((d=this.$route.params.conversationId)==null?void 0:d.toString())}))==null?void 0:t.messages)||[]},set(e){console.debug("set messages",e)}},repository(){var e,t,n;return(n=(t=(e=this.$store.state)==null?void 0:e.chatdoc)==null?void 0:t.repositories)==null?void 0:n.find(d=>d.id===this.repositoryId)},conversations(){var e;return(e=this.repository)==null?void 0:e.conversations},conversationId(){var e;return(e=this.$route.params.conversationId)==null?void 0:e.toString()},application(){return this.$store.state.chatdoc.application},credential(){return this.$store.state.chatdoc.credential},needApply(){return this.$store.state.chatdoc.status.getApplication===v.Success&&!this.application},initializing(){return this.$store.state.chatdoc.status.getApplication===v.Request},service(){return this.$store.state.chatdoc.service}},async mounted(){console.debug("start get conversations"),this.loading=!0,this.$store.dispatch("chatdoc/getConversations",{repositoryId:this.repositoryId}).finally(()=>{this.loading=!1})},methods:{async onSubmit(){this.messages.push({content:this.question,role:H}),await this.onFetchAnswer()},async onScrollDown(){setTimeout(()=>{const e=document.querySelector(".dialogue");!e||!this.messages||this.messages.length===0||(e.scrollTop=e==null?void 0:e.scrollHeight)},0)},async onFetchAnswer(){var d;const e=(d=this.credential)==null?void 0:d.token,t=this.question;if(console.debug(this.onFetchAnswer,"validated",t),this.question="",!e||!t){console.error("no token or endpoint or question"),this.messages.push({error:{code:q},role:N,state:$.FAILED});return}let n=this.conversationId;this.messages.push({content:"",role:N,state:$.PENDING}),console.debug("start to get answer",this.messages),this.onScrollDown(),this.answering=!0,b.chatConversation({repositoryId:this.repositoryId,question:t,id:this.conversationId},{token:e,stream:r=>{this.messages[this.messages.length-1]={role:N,content:r.answer,state:$.ANSWERING},n=r.id,this.onScrollDown()}}).then(async()=>{console.debug("finished fetch answer"),this.messages[this.messages.length-1].state=$.FINISHED,await this.$store.dispatch("chatdoc/setConversation",{id:n,messages:this.messages,repositoryId:this.repositoryId}),this.answering=!1,this.conversationId||(console.debug("push to conversation",n),await this.$router.push({name:A,params:{conversationId:n,repositoryId:this.repositoryId}})),this.onScrollDown(),await this.$store.dispatch("chatdoc/getConversations",{repositoryId:this.repositoryId})}).catch(r=>{var y,u;if(this.messages&&this.messages.length>0&&(this.messages[this.messages.length-1].state=$.FAILED),console.error(r),K.isCancel(r))this.messages[this.messages.length-1].error={code:X};else if((y=r==null?void 0:r.response)!=null&&y.data){let a=(u=r==null?void 0:r.response)==null?void 0:u.data;Z(a)&&(a=JSON.parse(a)),this.messages&&this.messages.length>0&&(this.messages[this.messages.length-1].error=a.error)}else this.messages&&this.messages.length>0&&(this.messages[this.messages.length-1].error={code:T});this.answering=!1})}}}),De={class:"wrapper"},Ve={class:"chat"},Me={class:"status"},Ue={class:"dialogue"},Be={class:"messages"},Le={class:"bottom"};function Fe(e,t,n,d,r,y){const u=l("conversations"),a=l("application-status"),_=l("message"),s=l("input-box"),C=l("layout");return o(),h(C,null,{chatdoc:B(()=>[i("div",De,[m(u,{class:"side"}),i("div",Ve,[i("div",Me,[m(a,{"show-price":!1,initializing:e.initializing,application:e.application,"need-apply":e.needApply,service:e.service,onRefresh:t[0]||(t[0]=p=>e.$store.dispatch("chatdoc/getApplication"))},null,8,["initializing","application","need-apply","service"])]),i("div",Ue,[i("div",Be,[(o(!0),c(R,null,M(e.messages,(p,g)=>(o(),h(_,{key:g,message:p,class:"message"},null,8,["message"]))),128))])]),i("div",Le,[m(s,{disabled:e.answering,question:e.question,"onUpdate:question":t[1]||(t[1]=p=>e.question=p),onSubmit:e.onSubmit},null,8,["disabled","question","onSubmit"])])])])]),_:1})}var es=k(qe,[["render",Fe],["__scopeId","data-v-24089614"],["__file","/home/runner/work/Nexior/Nexior/src/pages/chatdoc/Conversation.vue"]]);export{es as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{I as p}from"./vendor-others.decd85ac.js";import{
|
|
1
|
+
import{I as p}from"./vendor-others.decd85ac.js";import{ai as r}from"./vendor-fortawesome.35fae32b.js";import{_ as i}from"./index.b7b7827f.js";import{q as s}from"./vendor-element-plus.eeef3ee7.js";import{H as l,al as t,o as n,L as a,M as m,V as d}from"./vendor-@vue.31495dbd.js";const _=l({name:"CopyToClipboard",components:{FontAwesomeIcon:r,ElTooltip:s},props:{content:{type:String,required:!0}},data(){return{copied:!1}},methods:{onCopy(){p(this.content,{debug:!0}),this.copied=!0,setTimeout(()=>{this.copied=!1},3e3)}}});function f(o,u,C,y,k,b){const e=t("font-awesome-icon"),c=t("el-tooltip");return o.copied?(n(),a(c,{key:1,visible:o.copied,effect:"dark",content:o.$t("common.message.copied"),placement:"top-start"},{default:m(()=>[d(e,{icon:"fa-solid fa-check",class:"icon-check"})]),_:1},8,["visible","content"])):(n(),a(e,{key:0,icon:"fa-regular fa-copy",class:"icon-copy",onClick:o.onCopy},null,8,["onClick"]))}var $=i(_,[["render",f],["__scopeId","data-v-1ba27772"],["__file","/home/runner/work/Nexior/Nexior/src/components/common/CopyToClipboard.vue"]]);export{$ as C};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var b=Object.defineProperty,y=Object.defineProperties;var D=Object.getOwnPropertyDescriptors;var u=Object.getOwnPropertySymbols;var V=Object.prototype.hasOwnProperty,B=Object.prototype.propertyIsEnumerable;var m=(e,o,t)=>o in e?b(e,o,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[o]=t,p=(e,o)=>{for(var t in o||(o={}))V.call(o,t)&&m(e,t,o[t]);if(u)for(var t of u(o))B.call(o,t)&&m(e,t,o[t]);return e},_=(e,o)=>y(e,D(o));import{B as v,z as x}from"./vendor-others.decd85ac.js";import{S as N,s as O,g as h,_ as f}from"./index.
|
|
1
|
+
var b=Object.defineProperty,y=Object.defineProperties;var D=Object.getOwnPropertyDescriptors;var u=Object.getOwnPropertySymbols;var V=Object.prototype.hasOwnProperty,B=Object.prototype.propertyIsEnumerable;var m=(e,o,t)=>o in e?b(e,o,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[o]=t,p=(e,o)=>{for(var t in o||(o={}))V.call(o,t)&&m(e,t,o[t]);if(u)for(var t of u(o))B.call(o,t)&&m(e,t,o[t]);return e},_=(e,o)=>y(e,D(o));import{B as v,z as x}from"./vendor-others.decd85ac.js";import{S as N,s as O,g as h,_ as f}from"./index.b7b7827f.js";import{r as g,s as H,t as M}from"./vendor-element-plus.eeef3ee7.js";import{H as C,al as l,o as s,L as i,M as c,V as L,e as T,ai as q,W as A}from"./vendor-@vue.31495dbd.js";import{h as I,C as P,a as k}from"./vendor-vue-dark-switch.81063cc1.js";const U=C({name:"LocaleSelector",components:{ElDialog:g,ElSelect:H,ElOption:M},props:{visible:{type:Boolean,default:!1}},emits:["close"],data(){return{value:this.$i18n.locale,locales:N}},methods:{async onSelectLocale(e){this.$router.push({query:_(p({},this.$route.query),{locale:void 0})}),await O(e),this.setCookie(e),window.location.reload()},setCookie(e){v("LOCALE",e,{path:"/",domain:h()})}}});function z(e,o,t,$,w,E){const n=l("el-option"),r=l("el-select"),d=l("el-dialog");return s(),i(d,{"model-value":e.visible,width:300,class:"text-center",onClose:o[1]||(o[1]=a=>e.$emit("close"))},{default:c(()=>[L(r,{modelValue:e.value,"onUpdate:modelValue":o[0]||(o[0]=a=>e.value=a),onChange:e.onSelectLocale},{default:c(()=>[(s(!0),T(A,null,q(e.locales,(a,S)=>(s(),i(n,{key:S,label:a.label,value:a.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue","onChange"])]),_:1},8,["model-value"])}var X=f(U,[["render",z],["__scopeId","data-v-32a102bd"],["__file","/home/runner/work/Nexior/Nexior/src/components/common/LocaleSelector.vue"]]);const F=C({components:{DarkSwitch:I,ElDialog:g},props:{visible:{type:Boolean,default:!0}},emits:["update:dark","close"],computed:{dark(){return x("THEME")==="dark"},switchValue(){return P.value}},watch:{switchValue(e){this.setCookie(e)},dark(e){document.documentElement.classList.toggle("dark",e),this.setCookie(this.dark)}},mounted(){this.dark?(k(!0),document.documentElement.classList.add("dark")):(k(!1),document.documentElement.classList.remove("dark"))},methods:{setCookie(e){v("THEME",e?"dark":"light",{path:"/",domain:h()})}}});function R(e,o,t,$,w,E){const n=l("dark-switch"),r=l("el-dialog");return s(),i(r,{"model-value":e.visible,width:200,class:"text-center",onClose:o[0]||(o[0]=d=>e.$emit("close"))},{default:c(()=>[L(n,{class:"switch","dark-background":"#333","light-background":"#fff"})]),_:1},8,["model-value"])}var Y=f(F,[["render",R],["__file","/home/runner/work/Nexior/Nexior/src/components/common/DarkSelector.vue"]]);export{Y as D,X as L};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./vendor-others.decd85ac.js";import{o as w}from"./order.eeeccf6f.js";import{_ as V}from"./index.e9d8864b.js";import{O as P}from"./order.1bf5c3a2.js";import{Q as Y}from"./vendor-qrcode.93be07bd.js";import{r as z,b as H,a as U,i as Z,n as x,A as ee,B as re,C as ae,D as te,F as oe}from"./vendor-element-plus.eeef3ee7.js";import{H as D,al as l,o as t,L as c,M as r,V as a,f as m,S as n,U as i,aK as L,aL as Q,e as p,W as se,T as v,Q as j}from"./vendor-@vue.31495dbd.js";import{I as ie}from"./application.ea1e2a72.js";import{g as le}from"./price.4d81ae80.js";import"./vendor-axios.168e6950.js";import"./vendor-fortawesome.3ae42787.js";const de=D({name:"PayOrderDialog",components:{ElDialog:z,QrCode:Y,ElRow:H,ElCol:U},props:{modelValue:{type:Object,required:!0},visible:{type:Boolean,required:!1,default:!1}},emits:["hide","update:modelValue"],data(){return{refreshTimer:void 0}},mounted(){this.onRefresh()},unmounted(){this.refreshTimer&&clearTimeout(this.refreshTimer)},methods:{onRefresh(){if(!this.modelValue.id){console.error("id does not exist");return}w.refresh(this.modelValue.id).then(({data:e})=>{e.state!==P.PAID?setTimeout(()=>{this.onRefresh()},2e3):this.$emit("hide"),this.$emit("update:modelValue",e)}).catch(()=>{setTimeout(()=>{this.onRefresh()},2e3)})}}}),ne=e=>(L("data-v-875060be"),e=e(),Q(),e),pe={class:"paycode wechat"},ue={class:"help-text"},ye=ne(()=>m("div",{class:"help-img"},[m("img",{src:"https://midas.gtimg.cn/enterprise/images/ep_sys_wx_tip.jpg"})],-1));function ce(e,o,I,E,T,C){const u=l("qr-code"),f=l("el-col"),k=l("el-row"),W=l("el-dialog");return t(),c(W,{"model-value":e.visible,title:e.$t("application.title.buyService"),width:"500px",center:""},{default:r(()=>[a(k,{class:"paycodes"},{default:r(()=>[a(f,{span:12},{default:r(()=>{var h,g;return[m("div",pe,[(h=e.modelValue)!=null&&h.pay_url?(t(),c(u,{key:0,value:(g=e.modelValue)==null?void 0:g.pay_url,size:200,class:"qrcode m-auto"},null,8,["value"])):n("v-if",!0),m("p",ue,i(e.$t("order.message.wechatPayHelp")),1)])]}),_:1}),a(f,{span:12},{default:r(()=>[ye]),_:1})]),_:1})]),_:1},8,["model-value","title"])}var me=V(de,[["render",ce],["__scopeId","data-v-875060be"],["__file","/home/runner/work/Nexior/Nexior/src/components/order/WechatPay.vue"]]);const fe=D({name:"PayOrderDialog",components:{ElDialog:z},props:{modelValue:{type:Object,required:!0},visible:{type:Boolean,required:!1,default:!1}},emits:["hide","update:modelValue"],data(){return{refreshTimer:void 0}},watch:{visible:{handler(e){e&&this.modelValue.pay_url&&window.open(this.modelValue.pay_url,"_blank")}}},mounted(){this.onRefresh()},unmounted(){this.refreshTimer&&clearTimeout(this.refreshTimer)},methods:{onRefresh(){if(!this.modelValue.id){console.error("id does not exist");return}w.refresh(this.modelValue.id).then(({data:e})=>{e.state!==P.PAID?setTimeout(()=>{this.onRefresh()},2e3):this.$emit("hide"),this.$emit("update:modelValue",e)}).catch(()=>{setTimeout(()=>{this.onRefresh()},5e3)})}}}),he={class:"text-center"};function _e(e,o,I,E,T,C){const u=l("el-dialog");return t(),c(u,{"model-value":e.visible,title:e.$t("application.title.buyService"),width:"500px",center:""},{default:r(()=>[m("p",he,i(e.$t("order.message.buyInExternalUrl")),1)]),_:1},8,["model-value","title"])}var ve=V(fe,[["render",_e],["__scopeId","data-v-85959ecc"],["__file","/home/runner/work/Nexior/Nexior/src/components/order/StripePay.vue"]]);var G=(e=>(e.WechatPay="WechatPay",e.Stripe="Stripe",e.AliPay="AliPay",e))(G||{});const $e=D({name:"ConsoleOrderDetail",components:{ElButton:Z,ElRow:H,ElCard:x,ElCol:U,ElSkeleton:ee,ElDivider:re,ElAlert:ae,ElDescriptions:te,ElDescriptionsItem:oe,WechatPayOrder:me,StripePayOrder:ve},data(){return{PayWay:G,payWay:"WechatPay",OrderState:P,order:void 0,showPayWays:!0,loading:!1,paying:!1,prepaying:!1,applicationType:ie}},computed:{id(){var e,o;return(o=(e=this.$route.params)==null?void 0:e.id)==null?void 0:o.toString()},redirect(){var e;return(e=this.$route.query)==null?void 0:e.redirect}},watch:{order:{handler(e){if((e==null?void 0:e.state)===P.PAID){setTimeout(()=>{var o;this.redirect&&window.location.replace((o=this.redirect)==null?void 0:o.toString())},2e3);return}},deep:!0}},mounted(){this.onFetchData()},methods:{getPriceString:le,onFetchData(){this.loading=!0,w.refresh(this.id).then(({data:e})=>{this.order=e,e.pay_way&&(this.payWay=e.pay_way),this.loading=!1}).catch(()=>{this.loading=!1})},onRepay(){this.paying=!0},onPay(){this.prepaying=!0,w.pay(this.id,{pay_way:this.payWay}).then(({data:e})=>{this.prepaying=!1,this.order=e,this.order.price&&this.order.price>0&&(this.paying=!0)}).catch(()=>{this.prepaying=!1})}}}),K=e=>(L("data-v-2d1dc98e"),e=e(),Q(),e),ge={class:"title"},be={key:0,class:"pt-5"},we={key:1,class:"order"},Pe={key:0},ke={key:1},We={key:0,class:"price unfree"},Se={key:1,class:"price free"},Ve={key:0,class:"payways mb-6"},De=K(()=>m("span",{class:"payicon wechatpay"},null,-1)),Ie={class:"payname"},Ee=K(()=>m("span",{class:"payicon stripe"},null,-1)),Te={class:"payname"},Ce={key:1},Oe={key:2};function Ne(e,o,I,E,T,C){const u=l("el-col"),f=l("el-row"),k=l("el-skeleton"),W=l("copy-to-clipboard"),h=l("el-descriptions-item"),g=l("el-descriptions"),S=l("el-divider"),O=l("el-alert"),N=l("el-button"),M=l("el-card"),X=l("wechat-pay-order"),J=l("stripe-pay-order");return t(),p(se,null,[a(f,{class:"panel"},{default:r(()=>[a(u,{span:24},{default:r(()=>[a(f,null,{default:r(()=>[a(u,{span:24},{default:r(()=>[m("h2",ge,i(e.$t("order.title.info")),1)]),_:1})]),_:1}),a(f,null,{default:r(()=>[a(u,{span:24},{default:r(()=>[a(M,{shadow:"hover"},{default:r(()=>{var _,R,A,q;return[a(f,null,{default:r(()=>[a(u,{span:16,offset:4},{default:r(()=>[e.loading?(t(),p("div",be,[a(k,{animated:""})])):(t(),p("div",we,[a(g,{column:1},{default:r(()=>{var $,b,B;return[a(h,{label:e.$t("order.field.id")},{default:r(()=>{var s,d,y;return[m("span",null,i((s=e.order)==null?void 0:s.id),1),(d=e.order)!=null&&d.id?(t(),c(W,{key:0,content:(y=e.order)==null?void 0:y.id,class:"inline-block"},null,8,["content"])):n("v-if",!0)]}),_:1},8,["label"]),a(h,{label:e.$t("order.field.description")},{default:r(()=>{var s;return[v(i((s=e.order)==null?void 0:s.description),1)]}),_:1},8,["label"]),(b=($=e.order)==null?void 0:$.application)!=null&&b.service?(t(),c(h,{key:0,label:e.$t("order.field.api")},{default:r(()=>{var s,d,y;return[v(i((y=(d=(s=e.order)==null?void 0:s.application)==null?void 0:d.service)==null?void 0:y.title),1)]}),_:1},8,["label"])):n("v-if",!0),(B=e.order)!=null&&B.pay_way?(t(),c(h,{key:1,label:e.$t("order.field.payWay")},{default:r(()=>{var s,d;return[((s=e.order)==null?void 0:s.pay_way)===e.PayWay.WechatPay?(t(),p("span",Pe,i(e.$t("order.title.wechatPay")),1)):n("v-if",!0),((d=e.order)==null?void 0:d.pay_way)===e.PayWay.Stripe?(t(),p("span",ke,i(e.$t("order.title.stripe")),1)):n("v-if",!0)]}),_:1},8,["label"])):n("v-if",!0),a(h,{label:e.$t("order.field.amount")},{default:r(()=>{var s,d,y,F;return[v(i((s=e.order)==null?void 0:s.amount)+" "+i(e.$t(`service.unit.${(F=(y=(d=e.order)==null?void 0:d.application)==null?void 0:y.service)==null?void 0:F.unit}`)),1)]}),_:1},8,["label"]),a(h,{label:e.$t("order.field.createdAt")},{default:r(()=>{var s;return[v(i(e.$dayjs.format((s=e.order)==null?void 0:s.created_at)),1)]}),_:1},8,["label"]),a(h,{label:e.$t("order.field.price")},{default:r(()=>{var s,d,y;return[((s=e.order)==null?void 0:s.price)&&((d=e.order)==null?void 0:d.price)>0?(t(),p("span",We,i(e.getPriceString({value:(y=e.order)==null?void 0:y.price})),1)):(t(),p("span",Se,i(e.$t("order.message.free")),1))]}),_:1},8,["label"])]}),_:1})]))]),_:1})]),_:1}),((_=e.order)==null?void 0:_.state)===e.OrderState.PAID?(t(),c(f,{key:0,class:"mb-5"},{default:r(()=>[a(u,{span:16,offset:4},{default:r(()=>[a(S,{"border-style":"dashed"}),a(O,{title:e.$t("order.message.paidSuccessfully"),type:"success","show-icon":"",closable:!1},null,8,["title"])]),_:1})]),_:1})):n("v-if",!0),((R=e.order)==null?void 0:R.state)===e.OrderState.EXPIRED?(t(),c(f,{key:1,class:"mb-5"},{default:r(()=>[a(u,{span:16,offset:4},{default:r(()=>[a(S,{"border-style":"dashed"}),a(O,{title:e.$t("order.message.orderExpired"),type:"error","show-icon":"",closable:!1},null,8,["title"])]),_:1})]),_:1})):n("v-if",!0),((A=e.order)==null?void 0:A.state)===e.OrderState.PENDING||((q=e.order)==null?void 0:q.state)===e.OrderState.FAILED?(t(),c(f,{key:2},{default:r(()=>[a(u,{span:16,offset:4},{default:r(()=>{var $;return[a(S,{"border-style":"dashed"}),e.showPayWays&&e.order.price&&e.order.price>0&&!e.order.pay_way?(t(),p("div",Ve,[(t(),p("div",{key:0,class:j({payway:!0,wechatpay:!0,active:e.payWay===e.PayWay.WechatPay}),onClick:o[0]||(o[0]=b=>e.payWay=e.PayWay.WechatPay)},[De,m("span",Ie,i(e.$t("order.title.wechatPay")),1)],2)),n("v-if",!0),(t(),p("div",{key:2,class:j({payway:!0,stripe:!0,active:e.payWay===e.PayWay.Stripe}),onClick:o[2]||(o[2]=b=>e.payWay=e.PayWay.Stripe)},[Ee,m("span",Te,i(e.$t("order.title.stripe")),1)],2))])):n("v-if",!0),($=e.order)!=null&&$.pay_way?(t(),p("div",Oe,[a(N,{type:"primary",round:"",size:"large",class:"btn-repay",onClick:e.onRepay},{default:r(()=>[v(i(e.$t("common.button.repay")),1)]),_:1},8,["onClick"])])):(t(),p("div",Ce,[a(N,{loading:e.prepaying,round:"",type:"primary",size:"large",class:"btn-pay",onClick:e.onPay},{default:r(()=>[v(i(e.$t("common.button.pay")),1)]),_:1},8,["loading","onClick"])]))]}),_:1})]),_:1})):n("v-if",!0)]}),_:1})]),_:1})]),_:1})]),_:1})]),_:1}),e.order&&e.payWay===e.PayWay.WechatPay?(t(),c(X,{key:0,modelValue:e.order,"onUpdate:modelValue":o[3]||(o[3]=_=>e.order=_),visible:e.paying,onHide:o[4]||(o[4]=_=>e.paying=!1)},null,8,["modelValue","visible"])):n("v-if",!0),e.order&&e.payWay===e.PayWay.Stripe?(t(),c(J,{key:1,modelValue:e.order,"onUpdate:modelValue":o[5]||(o[5]=_=>e.order=_),visible:e.paying,onHide:o[6]||(o[6]=_=>e.paying=!1)},null,8,["modelValue","visible"])):n("v-if",!0)],64)}var Ge=V($e,[["render",Ne],["__scopeId","data-v-2d1dc98e"],["__file","/home/runner/work/Nexior/Nexior/src/pages/console/order/Detail.vue"]]);export{Ge as default};
|
|
1
|
+
import"./vendor-others.decd85ac.js";import{o as w}from"./order.67692924.js";import{_ as V}from"./index.b7b7827f.js";import{O as P}from"./order.1bf5c3a2.js";import{Q as Y}from"./vendor-qrcode.93be07bd.js";import{r as z,b as H,a as U,i as Z,n as x,A as ee,B as re,C as ae,D as te,F as oe}from"./vendor-element-plus.eeef3ee7.js";import{H as D,al as l,o as t,L as c,M as r,V as a,f as m,S as n,U as i,aK as L,aL as Q,e as p,W as se,T as v,Q as j}from"./vendor-@vue.31495dbd.js";import{I as ie}from"./application.ea1e2a72.js";import{g as le}from"./price.cf991d37.js";import"./vendor-axios.168e6950.js";import"./vendor-fortawesome.35fae32b.js";const de=D({name:"PayOrderDialog",components:{ElDialog:z,QrCode:Y,ElRow:H,ElCol:U},props:{modelValue:{type:Object,required:!0},visible:{type:Boolean,required:!1,default:!1}},emits:["hide","update:modelValue"],data(){return{refreshTimer:void 0}},mounted(){this.onRefresh()},unmounted(){this.refreshTimer&&clearTimeout(this.refreshTimer)},methods:{onRefresh(){if(!this.modelValue.id){console.error("id does not exist");return}w.refresh(this.modelValue.id).then(({data:e})=>{e.state!==P.PAID?setTimeout(()=>{this.onRefresh()},2e3):this.$emit("hide"),this.$emit("update:modelValue",e)}).catch(()=>{setTimeout(()=>{this.onRefresh()},2e3)})}}}),ne=e=>(L("data-v-875060be"),e=e(),Q(),e),pe={class:"paycode wechat"},ue={class:"help-text"},ye=ne(()=>m("div",{class:"help-img"},[m("img",{src:"https://midas.gtimg.cn/enterprise/images/ep_sys_wx_tip.jpg"})],-1));function ce(e,o,I,E,T,C){const u=l("qr-code"),f=l("el-col"),k=l("el-row"),W=l("el-dialog");return t(),c(W,{"model-value":e.visible,title:e.$t("application.title.buyService"),width:"500px",center:""},{default:r(()=>[a(k,{class:"paycodes"},{default:r(()=>[a(f,{span:12},{default:r(()=>{var h,g;return[m("div",pe,[(h=e.modelValue)!=null&&h.pay_url?(t(),c(u,{key:0,value:(g=e.modelValue)==null?void 0:g.pay_url,size:200,class:"qrcode m-auto"},null,8,["value"])):n("v-if",!0),m("p",ue,i(e.$t("order.message.wechatPayHelp")),1)])]}),_:1}),a(f,{span:12},{default:r(()=>[ye]),_:1})]),_:1})]),_:1},8,["model-value","title"])}var me=V(de,[["render",ce],["__scopeId","data-v-875060be"],["__file","/home/runner/work/Nexior/Nexior/src/components/order/WechatPay.vue"]]);const fe=D({name:"PayOrderDialog",components:{ElDialog:z},props:{modelValue:{type:Object,required:!0},visible:{type:Boolean,required:!1,default:!1}},emits:["hide","update:modelValue"],data(){return{refreshTimer:void 0}},watch:{visible:{handler(e){e&&this.modelValue.pay_url&&window.open(this.modelValue.pay_url,"_blank")}}},mounted(){this.onRefresh()},unmounted(){this.refreshTimer&&clearTimeout(this.refreshTimer)},methods:{onRefresh(){if(!this.modelValue.id){console.error("id does not exist");return}w.refresh(this.modelValue.id).then(({data:e})=>{e.state!==P.PAID?setTimeout(()=>{this.onRefresh()},2e3):this.$emit("hide"),this.$emit("update:modelValue",e)}).catch(()=>{setTimeout(()=>{this.onRefresh()},5e3)})}}}),he={class:"text-center"};function _e(e,o,I,E,T,C){const u=l("el-dialog");return t(),c(u,{"model-value":e.visible,title:e.$t("application.title.buyService"),width:"500px",center:""},{default:r(()=>[m("p",he,i(e.$t("order.message.buyInExternalUrl")),1)]),_:1},8,["model-value","title"])}var ve=V(fe,[["render",_e],["__scopeId","data-v-85959ecc"],["__file","/home/runner/work/Nexior/Nexior/src/components/order/StripePay.vue"]]);var G=(e=>(e.WechatPay="WechatPay",e.Stripe="Stripe",e.AliPay="AliPay",e))(G||{});const $e=D({name:"ConsoleOrderDetail",components:{ElButton:Z,ElRow:H,ElCard:x,ElCol:U,ElSkeleton:ee,ElDivider:re,ElAlert:ae,ElDescriptions:te,ElDescriptionsItem:oe,WechatPayOrder:me,StripePayOrder:ve},data(){return{PayWay:G,payWay:"WechatPay",OrderState:P,order:void 0,showPayWays:!0,loading:!1,paying:!1,prepaying:!1,applicationType:ie}},computed:{id(){var e,o;return(o=(e=this.$route.params)==null?void 0:e.id)==null?void 0:o.toString()},redirect(){var e;return(e=this.$route.query)==null?void 0:e.redirect}},watch:{order:{handler(e){if((e==null?void 0:e.state)===P.PAID){setTimeout(()=>{var o;this.redirect&&window.location.replace((o=this.redirect)==null?void 0:o.toString())},2e3);return}},deep:!0}},mounted(){this.onFetchData()},methods:{getPriceString:le,onFetchData(){this.loading=!0,w.refresh(this.id).then(({data:e})=>{this.order=e,e.pay_way&&(this.payWay=e.pay_way),this.loading=!1}).catch(()=>{this.loading=!1})},onRepay(){this.paying=!0},onPay(){this.prepaying=!0,w.pay(this.id,{pay_way:this.payWay}).then(({data:e})=>{this.prepaying=!1,this.order=e,this.order.price&&this.order.price>0&&(this.paying=!0)}).catch(()=>{this.prepaying=!1})}}}),K=e=>(L("data-v-2d1dc98e"),e=e(),Q(),e),ge={class:"title"},be={key:0,class:"pt-5"},we={key:1,class:"order"},Pe={key:0},ke={key:1},We={key:0,class:"price unfree"},Se={key:1,class:"price free"},Ve={key:0,class:"payways mb-6"},De=K(()=>m("span",{class:"payicon wechatpay"},null,-1)),Ie={class:"payname"},Ee=K(()=>m("span",{class:"payicon stripe"},null,-1)),Te={class:"payname"},Ce={key:1},Oe={key:2};function Ne(e,o,I,E,T,C){const u=l("el-col"),f=l("el-row"),k=l("el-skeleton"),W=l("copy-to-clipboard"),h=l("el-descriptions-item"),g=l("el-descriptions"),S=l("el-divider"),O=l("el-alert"),N=l("el-button"),M=l("el-card"),X=l("wechat-pay-order"),J=l("stripe-pay-order");return t(),p(se,null,[a(f,{class:"panel"},{default:r(()=>[a(u,{span:24},{default:r(()=>[a(f,null,{default:r(()=>[a(u,{span:24},{default:r(()=>[m("h2",ge,i(e.$t("order.title.info")),1)]),_:1})]),_:1}),a(f,null,{default:r(()=>[a(u,{span:24},{default:r(()=>[a(M,{shadow:"hover"},{default:r(()=>{var _,R,A,q;return[a(f,null,{default:r(()=>[a(u,{span:16,offset:4},{default:r(()=>[e.loading?(t(),p("div",be,[a(k,{animated:""})])):(t(),p("div",we,[a(g,{column:1},{default:r(()=>{var $,b,B;return[a(h,{label:e.$t("order.field.id")},{default:r(()=>{var s,d,y;return[m("span",null,i((s=e.order)==null?void 0:s.id),1),(d=e.order)!=null&&d.id?(t(),c(W,{key:0,content:(y=e.order)==null?void 0:y.id,class:"inline-block"},null,8,["content"])):n("v-if",!0)]}),_:1},8,["label"]),a(h,{label:e.$t("order.field.description")},{default:r(()=>{var s;return[v(i((s=e.order)==null?void 0:s.description),1)]}),_:1},8,["label"]),(b=($=e.order)==null?void 0:$.application)!=null&&b.service?(t(),c(h,{key:0,label:e.$t("order.field.api")},{default:r(()=>{var s,d,y;return[v(i((y=(d=(s=e.order)==null?void 0:s.application)==null?void 0:d.service)==null?void 0:y.title),1)]}),_:1},8,["label"])):n("v-if",!0),(B=e.order)!=null&&B.pay_way?(t(),c(h,{key:1,label:e.$t("order.field.payWay")},{default:r(()=>{var s,d;return[((s=e.order)==null?void 0:s.pay_way)===e.PayWay.WechatPay?(t(),p("span",Pe,i(e.$t("order.title.wechatPay")),1)):n("v-if",!0),((d=e.order)==null?void 0:d.pay_way)===e.PayWay.Stripe?(t(),p("span",ke,i(e.$t("order.title.stripe")),1)):n("v-if",!0)]}),_:1},8,["label"])):n("v-if",!0),a(h,{label:e.$t("order.field.amount")},{default:r(()=>{var s,d,y,F;return[v(i((s=e.order)==null?void 0:s.amount)+" "+i(e.$t(`service.unit.${(F=(y=(d=e.order)==null?void 0:d.application)==null?void 0:y.service)==null?void 0:F.unit}`)),1)]}),_:1},8,["label"]),a(h,{label:e.$t("order.field.createdAt")},{default:r(()=>{var s;return[v(i(e.$dayjs.format((s=e.order)==null?void 0:s.created_at)),1)]}),_:1},8,["label"]),a(h,{label:e.$t("order.field.price")},{default:r(()=>{var s,d,y;return[((s=e.order)==null?void 0:s.price)&&((d=e.order)==null?void 0:d.price)>0?(t(),p("span",We,i(e.getPriceString({value:(y=e.order)==null?void 0:y.price})),1)):(t(),p("span",Se,i(e.$t("order.message.free")),1))]}),_:1},8,["label"])]}),_:1})]))]),_:1})]),_:1}),((_=e.order)==null?void 0:_.state)===e.OrderState.PAID?(t(),c(f,{key:0,class:"mb-5"},{default:r(()=>[a(u,{span:16,offset:4},{default:r(()=>[a(S,{"border-style":"dashed"}),a(O,{title:e.$t("order.message.paidSuccessfully"),type:"success","show-icon":"",closable:!1},null,8,["title"])]),_:1})]),_:1})):n("v-if",!0),((R=e.order)==null?void 0:R.state)===e.OrderState.EXPIRED?(t(),c(f,{key:1,class:"mb-5"},{default:r(()=>[a(u,{span:16,offset:4},{default:r(()=>[a(S,{"border-style":"dashed"}),a(O,{title:e.$t("order.message.orderExpired"),type:"error","show-icon":"",closable:!1},null,8,["title"])]),_:1})]),_:1})):n("v-if",!0),((A=e.order)==null?void 0:A.state)===e.OrderState.PENDING||((q=e.order)==null?void 0:q.state)===e.OrderState.FAILED?(t(),c(f,{key:2},{default:r(()=>[a(u,{span:16,offset:4},{default:r(()=>{var $;return[a(S,{"border-style":"dashed"}),e.showPayWays&&e.order.price&&e.order.price>0&&!e.order.pay_way?(t(),p("div",Ve,[(t(),p("div",{key:0,class:j({payway:!0,wechatpay:!0,active:e.payWay===e.PayWay.WechatPay}),onClick:o[0]||(o[0]=b=>e.payWay=e.PayWay.WechatPay)},[De,m("span",Ie,i(e.$t("order.title.wechatPay")),1)],2)),n("v-if",!0),(t(),p("div",{key:2,class:j({payway:!0,stripe:!0,active:e.payWay===e.PayWay.Stripe}),onClick:o[2]||(o[2]=b=>e.payWay=e.PayWay.Stripe)},[Ee,m("span",Te,i(e.$t("order.title.stripe")),1)],2))])):n("v-if",!0),($=e.order)!=null&&$.pay_way?(t(),p("div",Oe,[a(N,{type:"primary",round:"",size:"large",class:"btn-repay",onClick:e.onRepay},{default:r(()=>[v(i(e.$t("common.button.repay")),1)]),_:1},8,["onClick"])])):(t(),p("div",Ce,[a(N,{loading:e.prepaying,round:"",type:"primary",size:"large",class:"btn-pay",onClick:e.onPay},{default:r(()=>[v(i(e.$t("common.button.pay")),1)]),_:1},8,["loading","onClick"])]))]}),_:1})]),_:1})):n("v-if",!0)]}),_:1})]),_:1})]),_:1})]),_:1})]),_:1}),e.order&&e.payWay===e.PayWay.WechatPay?(t(),c(X,{key:0,modelValue:e.order,"onUpdate:modelValue":o[3]||(o[3]=_=>e.order=_),visible:e.paying,onHide:o[4]||(o[4]=_=>e.paying=!1)},null,8,["modelValue","visible"])):n("v-if",!0),e.order&&e.payWay===e.PayWay.Stripe?(t(),c(J,{key:1,modelValue:e.order,"onUpdate:modelValue":o[5]||(o[5]=_=>e.order=_),visible:e.paying,onHide:o[6]||(o[6]=_=>e.paying=!1)},null,8,["modelValue","visible"])):n("v-if",!0)],64)}var Ge=V($e,[["render",Ne],["__scopeId","data-v-2d1dc98e"],["__file","/home/runner/work/Nexior/Nexior/src/pages/console/order/Detail.vue"]]);export{Ge as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./vendor-others.decd85ac.js";import{P as w}from"./Pagination.
|
|
1
|
+
import"./vendor-others.decd85ac.js";import{P as w}from"./Pagination.fcd91cad.js";import{C as y}from"./CopyToClipboard.3cfde0c6.js";import{b as v}from"./distribution.a80efa67.js";import{_ as $}from"./index.b7b7827f.js";import{g as C}from"./price.cf991d37.js";import{b as H,a as D,u as P,w as S,n as k}from"./vendor-element-plus.eeef3ee7.js";import{H as E,al as s,av as F,L as _,M as o,o as h,V as e,f as a,U as n,O as N}from"./vendor-@vue.31495dbd.js";import"./vendor-fortawesome.35fae32b.js";import"./vendor-axios.168e6950.js";const q=E({name:"ConsoleDistributionList",components:{Pagination:w,CopyToClipboard:y,ElRow:H,ElCol:D,ElTable:P,ElTableColumn:S,ElCard:k},data(){return{distributionHistories:[],distributionStatus:void 0,loading:!1,total:void 0,limit:10}},computed:{redirect(){return this.$route.query.redirect},page(){var t;return parseInt(((t=this.$route.query.page)==null?void 0:t.toString())||"1")}},watch:{page:{handler(){this.onFetchData()}}},mounted(){this.onFetchData()},methods:{getPriceString:C,onPageChange(t){var p;this.$router.push({name:(p=this.$route.name)==null?void 0:p.toString(),query:{page:t}})},onFetchData(){this.loading=!0,Promise.all([this.onFetchDistributionHistory()]).finally(()=>{this.loading=!1})},async onFetchDistributionHistory(){const{data:t}=await v.getAll({user_id:this.$store.getters.user.id,ordering:"-created_at",limit:this.limit,offset:(this.page-1)*this.limit});this.distributionHistories=t.items,this.total=t.count}}}),B={class:"title"},I={class:"key"},T={class:"copy"},V={class:"key"},z={class:"copy"},A={class:"price"},L={class:"description"},O={class:"description"},j={class:"created-at"},M={class:"pagination m-v-lg"};function R(t,p,U,G,J,K){const d=s("el-col"),c=s("el-row"),u=s("copy-to-clipboard"),r=s("el-table-column"),m=s("el-table"),f=s("el-card"),g=s("pagination"),b=F("loading");return h(),_(c,{class:"panel"},{default:o(()=>[e(d,{span:24},{default:o(()=>[e(c,null,{default:o(()=>[e(d,{span:24},{default:o(()=>[a("h2",B,n(t.$t("common.title.distributionHistory")),1)]),_:1})]),_:1}),e(c,null,{default:o(()=>[e(d,{span:24},{default:o(()=>[e(f,{shadow:"hover"},{default:o(()=>[N((h(),_(m,{data:t.distributionHistories,stripe:""},{default:o(()=>[e(r,{prop:"id",label:t.$t("distribution.field.id"),"class-name":"text-center",width:"350px"},{default:o(i=>[a("span",I,n(i.row.id),1),a("span",T,[e(u,{content:i.row.id},null,8,["content"])])]),_:1},8,["label"]),e(r,{prop:"id",label:t.$t("distribution.field.userId"),"class-name":"text-center",width:"350px"},{default:o(i=>[a("span",V,n(i.row.user_id),1),a("span",z,[e(u,{content:i.row.user_id},null,8,["content"])])]),_:1},8,["label"]),e(r,{label:t.$t("distribution.field.price"),width:"100px"},{default:o(i=>{var l;return[a("span",A,n(t.getPriceString({value:(l=i.row)==null?void 0:l.price})),1)]}),_:1},8,["label"]),e(r,{label:t.$t("distribution.field.reward"),width:"100px"},{default:o(i=>{var l;return[a("span",L,n(t.getPriceString({value:(l=i.row)==null?void 0:l.reward})),1)]}),_:1},8,["label"]),e(r,{label:t.$t("distribution.field.percentage"),width:"120px"},{default:o(i=>[a("span",O,n(i.row.percentage)+"%",1)]),_:1},8,["label"]),e(r,{label:t.$t("distribution.field.createdAt"),width:"200px"},{default:o(i=>[a("span",j,n(t.$dayjs.format(i.row.created_at)),1)]),_:1},8,["label"])]),_:1},8,["data"])),[[b,t.loading]])]),_:1})]),_:1})]),_:1}),e(c,null,{default:o(()=>[e(d,{span:10,offset:14},{default:o(()=>[a("div",M,[e(g,{"current-page":t.page,"page-size":t.limit,total:t.total,onChange:t.onPageChange},null,8,["current-page","page-size","total","onChange"])])]),_:1})]),_:1})]),_:1})]),_:1})}var at=$(q,[["render",R],["__scopeId","data-v-63f0e9ed"],["__file","/home/runner/work/Nexior/Nexior/src/pages/distribution/History.vue"]]);export{at as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.main[data-v-0621513c]{flex:1;display:flex;flex-direction:row}.main .config[data-v-0621513c]{width:300px;height:100%;overflow-y:scroll;border-right:1px solid var(--el-border-color)}.main .result[data-v-0621513c]{padding:15px;flex:1;width:calc(100% - 600px);height:100%;display:flex;flex-direction:column;border-right:1px solid var(--el-border-color)}.main .preview[data-v-0621513c]{width:300px;height:100%;display:flex;flex-direction:column}.main .preview_drawer[data-v-0621513c],.menu[data-v-0621513c]{display:none}@media (max-width: 767px){.main .config[data-v-0621513c]{display:none}.main .result[data-v-0621513c]{width:100%}.main .preview[data-v-0621513c]{display:none}.main .menu[data-v-0621513c]{display:block;position:fixed;left:15px;top:15px;z-index:2000}}.field[data-v-6d5f21aa]{display:flex;flex-direction:row;align-items:center}.field .title[data-v-6d5f21aa]{font-size:14px;margin:0;width:30%}.field .value[data-v-6d5f21aa]{flex:1}.field .box[data-v-11b65236]{display:flex;flex-direction:row;align-items:center;position:relative}.field .box .title[data-v-11b65236]{font-size:14px;margin-bottom:10px}.field .box[data-v-b47f1748]{display:flex;flex-direction:row;align-items:center;position:relative}.field .box .title[data-v-b47f1748]{font-size:14px;margin-bottom:10px}.field .title-container[data-v-075e574a]{display:flex;flex-direction:row;align-items:center}.field .title-container .title[data-v-075e574a]{font-size:14px;margin-bottom:10px}.field .title-container .right-aligned-switch[data-v-075e574a]{float:left}.field .title-container[data-v-f9bac2fa]{display:flex;flex-direction:row;align-items:center}.field .title-container .title[data-v-f9bac2fa]{font-size:14px;margin-bottom:10px}.field .title-container .right-aligned-switch[data-v-f9bac2fa]{float:left}.field[data-v-78764cec]{display:flex;flex-direction:row;align-items:center;width:120px}.field .title[data-v-78764cec]{font-size:14px;margin:0;flex:1}.field .value[data-v-78764cec]{width:50px}.panel[data-v-38bb3c66]{height:100%;padding:15px;display:flex;flex-direction:column}.panel .config[data-v-38bb3c66]{width:100%;height:calc(100% - 50px);flex:1;position:relative}.panel .config .instrument[data-v-38bb3c66]{position:absolute;top:50px;right:-10px;z-index:1000}.panel .actions[data-v-38bb3c66]{height:50px;display:flex;justify-content:center;align-items:center}.panel .actions .btn[data-v-38bb3c66]{width:100%}.task{display:flex;flex-direction:column}.task .audio{display:flex;margin-bottom:10px;border-radius:10px}.task .audio:hover{background-color:var(--el-bg-color-page)}.task .audio .left{position:relative;width:60px;height:60px;margin-right:16px;flex-shrink:0}.task .audio .left:hover .overlay{display:block}.task .audio .left .cover{width:100%;height:100%;border-radius:4px}.task .audio .left .duration{position:absolute;right:0px;bottom:0px;background-color:#000000b3;padding:2px 4px;color:#fff;border-radius:2px;font-size:10px}.task .audio .left .overlay{position:absolute;top:0;left:0;width:100%;height:100%;background-color:#00000080;display:flex;justify-content:center;align-items:center;display:none;transition:opacity .3s;border-radius:4px;text-align:center;line-height:70px;cursor:pointer}.task .audio .left .overlay .el-icon{font-size:20px;color:#fff}.task .audio .info{flex:1}.task .audio .info .title{font-size:14px;font-weight:700;margin-top:5px}.task .audio .info .style{font-size:12px;margin-bottom:0;color:var(--el-text-color-secondary)}.task .audio .right{width:60px;display:flex;align-items:center;justify-content:center}.task .audio .right .icon{display:block;z-index:100;cursor:pointer;margin-right:15px}.player-slider .el-slider{height:10px}.player-slider .el-slider .el-slider__runway,.player-slider .el-slider .el-slider__bar{height:2px;border-radius:0}.player-slider .el-slider .el-slider__button-wrapper{opacity:0;transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s;width:10px;height:10px;top:-10.5px}.player-slider .el-slider:hover .el-slider__button-wrapper{opacity:1}.player-slider .el-slider .el-slider__button{width:8px;height:8px;--tw-bg-opacity: 1;background-color:rgb(52 211 153 / var(--tw-bg-opacity))}.el-popover.el-popper{min-width:auto}.control{color:var(--el-color-primary)}.panel[data-v-9a683526]{display:flex;flex-direction:column;align-items:center}.panel.recent[data-v-9a683526]{width:100%;height:100%;display:flex;overflow-y:auto;flex-direction:column}.panel.recent .preview[data-v-9a683526]{margin-right:15px}.panel.recent .description[data-v-9a683526]{text-align:left;font-size:14px;color:var(--el-text-color-secondary)}.panel.recent .tasks[data-v-9a683526]{width:100%}.panel.recent .tasks .task[data-v-9a683526]{width:100%;height:-moz-fit-content;height:fit-content;text-align:left}.panel.recent .tasks .task.placeholder[data-v-9a683526]{display:flex;flex-direction:row}.panel.recent .tasks .task.placeholder .left[data-v-9a683526]{width:70px;padding:10px}.panel.recent .tasks .task.placeholder .left .avatar[data-v-9a683526]{width:50px;height:50px}.panel.recent .tasks .task.placeholder .main[data-v-9a683526]{width:calc(100% - 70px);flex:1;padding:10px;margin-bottom:10px}.panel.recent .tasks .task.placeholder .main .icon[data-v-9a683526]{display:flex;height:200px;width:300px}.panel.recent .tasks .task.placeholder .main .title[data-v-9a683526]{display:block;width:200px;height:20px;margin-bottom:15px}.panel.recent .tasks .task .operations[data-v-9a683526]{height:-moz-fit-content!important;height:fit-content!important}.right-panel[data-v-19e67a48]{padding:2px;background-color:(--el-bg-color)}.cover-image[data-v-19e67a48]{width:100%;height:auto;margin-bottom:10px}.card-scrollbar[data-v-19e67a48]{height:600px;width:300px}.card[data-v-19e67a48]{width:100%;border-radius:8px;overflow:hidden;box-shadow:0 2px 12px #0000001a}.image-container[data-v-19e67a48]{position:relative;height:300px}.image-container .el-image[data-v-19e67a48]{width:100%;height:100%}.close-icon[data-v-19e67a48]{position:absolute;top:10px;right:10px;cursor:pointer;background-color:#00000080;border-radius:50%;padding:5px;color:#fff;z-index:2}.content[data-v-19e67a48]{padding:15px}.title[data-v-19e67a48]{position:absolute;bottom:0;left:0;right:0;margin:0;padding:15px;background:linear-gradient(to top,rgba(0,0,0,.7),rgba(0,0,0,0));color:#fff;z-index:1}.artist[data-v-19e67a48]{display:flex;align-items:center;margin:10px 0;font-weight:700}.artist span[data-v-19e67a48]{margin-right:10px}.actions[data-v-19e67a48]{display:flex;justify-content:space-around;margin:10px 0}.action-icon[data-v-19e67a48]{font-size:24px;cursor:pointer}.time[data-v-19e67a48]{font-size:12px;color:var(--el-text-color-secondary)}.lyrics[data-v-19e67a48]{margin:15px 0;font-size:14px;line-height:25px;white-space:pre-wrap}.status[data-v-11d62c6c]{margin-bottom:10px}.panel.detail[data-v-11d62c6c]{width:100%;flex:1;overflow-y:scroll}.panel.recent[data-v-11d62c6c]{height:100%;width:100%;margin-bottom:10px;position:relative;justify-content:initial}.panel.operation[data-v-11d62c6c]{position:relative}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./vendor-others.decd85ac.js";import{h as O,_ as T,c as A,d as R,e as P,f as B,r as H,z as V,R as M}from"./index.
|
|
1
|
+
import"./vendor-others.decd85ac.js";import{h as O,_ as T,c as A,d as R,e as P,f as B,r as H,z as V,R as M}from"./index.b7b7827f.js";import{ai as L}from"./vendor-fortawesome.35fae32b.js";import{L as q,D as z}from"./DarkSelector.bf241a9d.js";import{o as D,r as X,p as j,e as F,f as J}from"./vendor-element-plus.eeef3ee7.js";import{H as U,al as s,o as g,L as E,M as p,V as a,T as N,U as I,S,f as r,e as C,a0 as W,W as G,ai as Q,Q as K}from"./vendor-@vue.31495dbd.js";import"./vendor-axios.168e6950.js";import"./vendor-vue-dark-switch.81063cc1.js";const Y=U({name:"HelpEntry",components:{ElImage:D,ElDialog:X,ElPopover:j,ElMenu:F,ElMenuItem:J,FontAwesomeIcon:L},props:{visible:{type:Boolean,default:!0}},emits:["close"],computed:{site(){return this.$store.state.site}},methods:{onJoin(){var e,t,n,i;window.open((i=(n=(t=(e=this.$store.state.site)==null?void 0:e.features)==null?void 0:t.support)==null?void 0:n.discord)==null?void 0:i.url,"_blank")},onProfit(){this.$router.push({name:O})}}}),Z={class:"flex"},ee={class:"flex-1 text-center"};function te(e,t,n,i,u,x){const m=s("font-awesome-icon"),l=s("el-menu-item"),f=s("el-image"),_=s("el-popover"),h=s("el-menu"),o=s("el-dialog");return g(),E(o,{"model-value":e.visible,width:200,class:"text-center",onClose:t[0]||(t[0]=c=>e.$emit("close"))},{default:p(()=>[a(h,{collapse:!1,class:"menu"},{default:p(()=>{var c,v,$,k;return[(k=($=(v=(c=e.site)==null?void 0:c.features)==null?void 0:v.support)==null?void 0:$.discord)!=null&&k.enabled?(g(),E(l,{key:0,index:"1",onClick:e.onJoin},{title:p(()=>[N(I(e.$t("common.message.joinDiscord")),1)]),default:p(()=>[a(m,{icon:"fa-brands fa-discord",class:"mr-2"})]),_:1},8,["onClick"])):S("v-if",!0),a(_,{width:350,trigger:"hover"},{reference:p(()=>{var d,b,w,y;return[(y=(w=(b=(d=e.site)==null?void 0:d.features)==null?void 0:b.support)==null?void 0:w.wechat)!=null&&y.enabled?(g(),E(l,{key:0,index:"2"},{title:p(()=>[N(I(e.$t("common.message.addWeChat")),1)]),default:p(()=>[a(m,{icon:"fa-brands fa-weixin",class:"mr-2"})]),_:1})):S("v-if",!0)]}),default:p(()=>{var d,b,w,y;return[r("div",Z,[r("div",ee,[a(f,{src:(y=(w=(b=(d=e.site)==null?void 0:d.features)==null?void 0:b.support)==null?void 0:w.wechat)==null?void 0:y.qr},null,8,["src"])])])]}),_:1})]}),_:1})]),_:1},8,["model-value"])}var oe=T(Y,[["render",te],["__scopeId","data-v-2800d84d"],["__file","/home/runner/work/Nexior/Nexior/src/components/common/HelpDialog.vue"]]);const se=U({name:"ProfileIndex",components:{ElImage:D,HelpDialog:oe,FontAwesomeIcon:L,LocaleSelector:q,DarkSelector:z},data(){return{operating:{locale:!1,dark:!1,help:!1}}},computed:{user(){return this.$store.getters.user},showSupport(){var e,t,n,i,u,x,m,l,f,_,h,o,c,v,$,k,d;return((u=(i=(n=(t=(e=this.$store)==null?void 0:e.state)==null?void 0:t.site)==null?void 0:n.features)==null?void 0:i.support)==null?void 0:u.enabled)&&(((h=(_=(f=(l=(m=(x=this.$store)==null?void 0:x.state)==null?void 0:m.site)==null?void 0:l.features)==null?void 0:f.support)==null?void 0:_.discord)==null?void 0:h.enabled)||((d=(k=($=(v=(c=(o=this.$store)==null?void 0:o.state)==null?void 0:c.site)==null?void 0:v.features)==null?void 0:$.support)==null?void 0:k.wechat)==null?void 0:d.enabled))},showSite(){var e,t,n,i,u;return(u=(n=(t=(e=this.$store)==null?void 0:e.state)==null?void 0:t.site)==null?void 0:n.admins)==null?void 0:u.includes((i=this.$store.getters.user)==null?void 0:i.id)},links(){return[{key:"profile",text:this.$t("console.menu.userProfile"),href:`${A()}/user/profile`,icon:"fa-regular fa-user"},{key:"application-list",text:this.$t("console.menu.applicationList"),name:R,icon:"fa-solid fa-cube"},{key:"order-list",text:this.$t("console.menu.orderList"),name:P,icon:"fa-solid fa-store"},{key:"usage-list",text:this.$t("console.menu.usageList"),name:B,icon:"fa-solid fa-rotate-left"},{key:"distribution-index",text:this.$t("console.menu.distributionIndex"),name:O,icon:"fa-solid fa-coins"},...this.showSite?[{key:"site-index",text:this.$t("common.nav.site"),name:H,icon:"fa-solid fa-gear"}]:[],{key:"dark-setting",text:this.$t("common.nav.darkMode"),icon:"fa-solid fa-moon",callback:()=>{this.operating.dark=!0}},{key:"locale-setting",text:this.$t("common.nav.locale"),icon:"fa-solid fa-language",callback:()=>{this.operating.locale=!0}},{key:"developerPlatform",text:this.$t("console.menu.developerPlatform"),href:V(),icon:"fa-solid fa-laptop-code"},...this.showSupport?[{key:"support",text:this.$t("common.nav.support"),callback:()=>{this.operating.help=!0},icon:"fa-solid fa-question"}]:[],{key:"logout",text:this.$t("common.nav.logOut"),icon:"fa-solid fa-arrow-right-from-bracket",callback:async()=>{await this.$store.dispatch("resetAll"),await this.$store.dispatch("chat/resetAll"),await this.$store.dispatch("midjourney/resetAll"),await this.$store.dispatch("chatdoc/resetAll"),await this.$store.dispatch("qrart/resetAll"),await this.$store.dispatch("login")}}]}},methods:{onHome(){this.$router.push({name:M})},onNavigate(e){e.name?this.$router.push({name:e.name}):e.href?window.open(e.href,"_blank"):e.callback&&e.callback()}}}),ae={class:"profile"},ne={class:"info"},ie={class:"links"},re=["onClick"],le={class:"icon"},ce={class:"text"},de={class:"suffix"};function pe(e,t,n,i,u,x){const m=s("el-image"),l=s("font-awesome-icon"),f=s("locale-selector"),_=s("dark-selector"),h=s("help-dialog");return g(),C("div",ae,[r("div",ne,[a(m,{src:e.user.avatar,fit:"cover",class:"avatar"},null,8,["src"]),r("h2",null,I(e.user.username),1),r("div",{style:W({backgroundImage:"url("+e.user.avatar+")"}),class:"background"},null,4)]),r("div",ie,[(g(!0),C(G,null,Q(e.links,(o,c)=>(g(),C("a",{key:c,class:K({link:!0,active:e.$route.name===o.name}),onClick:v=>e.onNavigate(o)},[r("span",le,[a(l,{icon:o.icon,class:"text-sm"},null,8,["icon"])]),r("span",ce,I(o.text),1),r("span",de,[a(l,{icon:"fa-solid fa-chevron-right",class:"text-sm"})])],10,re))),128))]),a(f,{visible:e.operating.locale==!0,onClose:t[0]||(t[0]=o=>e.operating.locale=!1)},null,8,["visible"]),a(_,{visible:e.operating.dark==!0,onClose:t[1]||(t[1]=o=>e.operating.dark=!1)},null,8,["visible"]),a(h,{visible:e.operating.help==!0,onClose:t[2]||(t[2]=o=>e.operating.help=!1)},null,8,["visible"])])}var ke=T(se,[["render",pe],["__scopeId","data-v-0a2212f8"],["__file","/home/runner/work/Nexior/Nexior/src/pages/profile/Index.vue"]]);export{ke as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./vendor-others.decd85ac.js";import{
|
|
1
|
+
import"./vendor-others.decd85ac.js";import{ai as C}from"./vendor-fortawesome.35fae32b.js";import{_ as I}from"./index.b7b7827f.js";import{i as q,b as E,a as B,n as N,o as F}from"./vendor-element-plus.eeef3ee7.js";import{H as S,al as u,e as y,f as t,V as e,M as o,o as h,U as n,T as p,W as k,ai as w,L as j,aK as V,aL as L}from"./vendor-@vue.31495dbd.js";import"./vendor-axios.168e6950.js";const T=S({name:"Index",components:{ElButton:q,ElRow:E,ElCol:B,ElCard:N,ElImage:F,FontAwesomeIcon:C},data(){return{comments:[{avatar:"https://cdn.acedata.cloud/avatar1.png",name:this.$t("index.customers.name1"),job:this.$t("index.customers.job1"),content:this.$t("index.customers.comment1")},{avatar:"https://cdn.acedata.cloud/avatar2.png",name:this.$t("index.customers.name2"),job:this.$t("index.customers.job2"),content:this.$t("index.customers.comment2")},{avatar:"https://cdn.acedata.cloud/avatar3.png",name:this.$t("index.customers.name3"),job:this.$t("index.customers.job3"),content:this.$t("index.customers.comment3")}]}},computed:{site(){return this.$store.state.site},capabilities(){var s,d,v,$,g,x,c,i,_,l,f,m;return[...(v=(d=(s=this.site)==null?void 0:s.features)==null?void 0:d.chat)!=null&&v.enabled?[{title:this.$t("index.title.chat"),subtitle:this.$t("index.subtitle.chat"),icon:"fa-regular fa-comment"}]:[],...(x=(g=($=this.site)==null?void 0:$.features)==null?void 0:g.midjourney)!=null&&x.enabled?[{title:this.$t("index.title.midjourney"),subtitle:this.$t("index.subtitle.midjourney"),icon:"fa-solid fa-palette"}]:[],...(_=(i=(c=this.site)==null?void 0:c.features)==null?void 0:i.qrart)!=null&&_.enabled?[{title:this.$t("index.title.qrart"),subtitle:this.$t("index.subtitle.qrart"),icon:"fa-solid fa-qrcode"}]:[],...(m=(f=(l=this.site)==null?void 0:l.features)==null?void 0:f.suno)!=null&&m.enabled?[{title:this.$t("index.title.suno"),subtitle:this.$t("index.subtitle.suno"),icon:"fa-solid fa-music"}]:[]]}},mounted(){},methods:{}}),r=s=>(V("data-v-d9c0303e"),s=s(),L(),s),z={class:"wrapper"},A={id:"banner"},D={class:"container"},H={class:"info"},K={class:"title"},M={class:"subtitle"},R={class:"operations"},U={id:"introduction"},W={class:"container"},G={class:"title"},J={class:"subtitle"},O={class:"icon-wrapper"},P={class:"title"},Q={class:"subtitle"},X={id:"chat",class:"block"},Y={class:"container"},Z=r(()=>t("img",{src:"https://cdn.acedata.cloud/axynds.png",class:"image desktop"},null,-1)),tt=r(()=>t("img",{src:"https://cdn.acedata.cloud/vds4i3.png",class:"image mobile"},null,-1)),st={class:"title"},et={class:"subtitle"},ot={id:"midjourney",class:"block"},nt={class:"container"},it={class:"title"},at={class:"subtitle"},dt=r(()=>t("img",{src:"https://cdn.acedata.cloud/uk86mz.png",class:"image desktop"},null,-1)),lt=r(()=>t("img",{src:"https://cdn.acedata.cloud/rvelwm.png",class:"image mobile"},null,-1)),ct={class:"container"},rt=r(()=>t("img",{src:"https://cdn.acedata.cloud/gyogar.png",class:"image desktop"},null,-1)),ut=r(()=>t("img",{src:"https://cdn.acedata.cloud/5kunm0.png",class:"image mobile"},null,-1)),_t={class:"title"},mt={class:"subtitle"},ht={class:"container"},pt={class:"title"},ft={class:"subtitle"},bt=r(()=>t("img",{src:"https://cdn.acedata.cloud/2m8fn.png",class:"image desktop"},null,-1)),vt=r(()=>t("img",{src:"https://cdn.acedata.cloud/23knvs.png",class:"image mobile"},null,-1)),$t={id:"comments"},gt={class:"container"},xt={class:"title"},yt={class:"subtitle"},kt={class:"content"},wt={class:"info"},jt={class:"left"},Ct={class:"right"},It={class:"name"},qt={class:"job"};function Et(s,d,v,$,g,x){const c=u("el-button"),i=u("el-col"),_=u("el-image"),l=u("el-row"),f=u("font-awesome-icon"),m=u("el-card");return h(),y("div",z,[t("div",A,[t("div",D,[e(l,null,{default:o(()=>[e(i,{md:12,xs:24,class:"left"},{default:o(()=>{var a;return[t("div",H,[t("h1",K,n((a=s.site)==null?void 0:a.title),1),t("h3",M,n(s.$t("index.subtitle.banner")),1),t("div",R,[e(c,{type:"primary",round:"",class:"btn-apply",onClick:d[0]||(d[0]=b=>s.$router.push({path:"/chat"}))},{default:o(()=>[p(n(s.$t("common.button.startForFree")),1)]),_:1})])])]}),_:1}),e(i,{md:12,xs:24,class:"right"},{default:o(()=>[e(_,{src:"https://cdn.acedata.cloud/illustration1.png",class:"brand"})]),_:1})]),_:1})])]),t("div",U,[t("div",W,[e(l,{class:"mb-6"},{default:o(()=>[e(i,{span:24},{default:o(()=>[t("h2",G,n(s.$t("index.title.introduction")),1),t("h5",J,n(s.$t("index.subtitle.introduction")),1)]),_:1})]),_:1}),e(l,{gutter:15},{default:o(()=>[(h(!0),y(k,null,w(s.capabilities,(a,b)=>(h(),j(i,{key:b,md:24/s.capabilities.length,xs:24,class:"mb-4"},{default:o(()=>[e(m,{class:"info text-center",shadow:"hover"},{default:o(()=>[t("div",O,[e(f,{icon:a.icon,class:"icon"},null,8,["icon"])]),t("h2",P,n(a.title),1),t("p",Q,n(a.subtitle),1)]),_:2},1024)]),_:2},1032,["md"]))),128))]),_:1})])]),t("div",X,[t("div",Y,[e(l,null,{default:o(()=>[e(i,{md:16,xs:24,class:"preview"},{default:o(()=>[Z,tt]),_:1}),e(i,{md:8,xs:24,class:"info"},{default:o(()=>[t("h2",st,n(s.$t("index.title.chat")),1),t("p",et,n(s.$t("index.subtitle.chat")),1),e(c,{type:"primary",round:"",class:"btn-try",onClick:d[1]||(d[1]=a=>s.$router.push({path:"/chat"}))},{default:o(()=>[p(n(s.$t("index.button.try")),1)]),_:1})]),_:1})]),_:1})])]),t("div",ot,[t("div",nt,[e(l,null,{default:o(()=>[e(i,{md:8,xs:24,class:"info"},{default:o(()=>[t("h2",it,n(s.$t("index.title.midjourney")),1),t("p",at,n(s.$t("index.subtitle.midjourney")),1),e(c,{type:"primary",round:"",class:"btn-try",onClick:d[2]||(d[2]=a=>s.$router.push({path:"/midjourney"}))},{default:o(()=>[p(n(s.$t("index.button.try")),1)]),_:1})]),_:1}),e(i,{md:16,xs:24,class:"preview"},{default:o(()=>[dt,lt]),_:1})]),_:1})])]),t("div",{id:"qrart",class:"block",onClick:d[3]||(d[3]=a=>s.$router.push({path:"/qrart"}))},[t("div",ct,[e(l,null,{default:o(()=>[e(i,{md:16,xs:24,class:"preview"},{default:o(()=>[rt,ut]),_:1}),e(i,{md:8,xs:24,class:"info"},{default:o(()=>[t("h2",_t,n(s.$t("index.title.qrart")),1),t("p",mt,n(s.$t("index.subtitle.qrart")),1),e(c,{type:"primary",round:"",class:"btn-try"},{default:o(()=>[p(n(s.$t("index.button.try")),1)]),_:1})]),_:1})]),_:1})])]),t("div",{id:"suno",class:"block",onClick:d[4]||(d[4]=a=>s.$router.push({path:"/suno"}))},[t("div",ht,[e(l,null,{default:o(()=>[e(i,{md:8,xs:24,class:"info"},{default:o(()=>[t("h2",pt,n(s.$t("index.title.suno")),1),t("p",ft,n(s.$t("index.subtitle.suno")),1),e(c,{type:"primary",round:"",class:"btn-try"},{default:o(()=>[p(n(s.$t("index.button.try")),1)]),_:1})]),_:1}),e(i,{md:16,xs:24,class:"preview"},{default:o(()=>[bt,vt]),_:1})]),_:1})])]),t("div",$t,[t("div",gt,[e(l,{class:"mb-6"},{default:o(()=>[e(i,{span:24},{default:o(()=>[t("h2",xt,n(s.$t("index.title.comments")),1),t("h5",yt,n(s.$t("index.subtitle.comments")),1)]),_:1})]),_:1}),e(l,{gutter:20,class:"main"},{default:o(()=>[(h(!0),y(k,null,w(s.comments,(a,b)=>(h(),j(i,{key:b,md:8,xs:24},{default:o(()=>[e(m,{shadow:"hover",class:"service","body-style":{padding:0}},{default:o(()=>[t("p",kt,n(a.content),1),t("div",wt,[t("div",jt,[e(_,{class:"avatar",src:a.avatar},null,8,["src"])]),t("div",Ct,[t("div",It,n(a.name),1),t("div",qt,n(a.job),1)])])]),_:2},1024)]),_:2},1024))),128))]),_:1})])])])}var Tt=I(T,[["render",Et],["__scopeId","data-v-d9c0303e"],["__file","/home/runner/work/Nexior/Nexior/src/pages/index/Index.vue"]]);export{Tt as default};
|