Commit
·
c948e2e
1
Parent(s):
bec813f
release: build 6acd1315aa9314a006ebe759ef48fa9679e73682
Browse filesThis view is limited to 50 files because it contains too many changes.
See raw diff
- assets/CardDetailDialog-FgNNmEDA.js +0 -1
- assets/CardDetailDialog-iV9p9LC3.js +1 -0
- assets/{CardDetailDialog.vue_vue_type_script_setup_true_lang-DT-C_SEQ.js → CardDetailDialog.vue_vue_type_script_setup_true_lang-XVLQKu9_.js} +1 -1
- assets/{CardListItem-D1SxHi9v.js → CardListItem-D2hO_cEF.js} +1 -1
- assets/{CardListItem.vue_vue_type_script_setup_true_lang-DLIJmqLz.js → CardListItem.vue_vue_type_script_setup_true_lang-B6mmFgyk.js} +1 -1
- assets/{Collapsable.vue_vue_type_script_setup_true_lang-D5rspuJc.js → Collapsable.vue_vue_type_script_setup_true_lang-bS5XNUtd.js} +1 -1
- assets/{ColorPalette.vue_vue_type_script_setup_true_lang-DpflICIJ.js → ColorPalette.vue_vue_type_script_setup_true_lang-XM3XfZvN.js} +1 -1
- assets/{DeleteCardDialog-NTC8VI23.js → DeleteCardDialog-Cm2fzcjo.js} +1 -1
- assets/{DeleteCardDialog.vue_vue_type_script_setup_true_lang-G_NEmoXi.js → DeleteCardDialog.vue_vue_type_script_setup_true_lang-44xxChqC.js} +1 -1
- assets/{FieldInput.vue_vue_type_script_setup_true_lang-BhtqkEkU.js → FieldInput.vue_vue_type_script_setup_true_lang-CG42zMAq.js} +1 -1
- assets/{HeaderLink-C7jWLVVD.js → HeaderLink-DavtcSnn.js} +1 -1
- assets/{IconAnimation.vue_vue_type_script_setup_true_lang-Djn5fd3P.js → IconAnimation.vue_vue_type_script_setup_true_lang-B0Tznm9Y.js} +1 -1
- assets/{IconStatusItem-CtYOABTk.js → IconStatusItem-B-kn6UCa.js} +1 -1
- assets/{Input.vue_vue_type_script_setup_true_lang-58p3G1RX.js → Input.vue_vue_type_script_setup_true_lang-DGnmLgZc.js} +1 -1
- assets/{Model.vue_vue_type_script_setup_true_lang-B7ZOwTMx.js → Model.vue_vue_type_script_setup_true_lang-Wfrg8fps.js} +1 -1
- assets/{ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-C3sxqbyi.js → ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-CHpN3yiY.js} +1 -1
- assets/{ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-CUVIcbSL.js → ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-UCuivhvU.js} +1 -1
- assets/{ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-BCwQg86s.js → ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-CYv3qJbi.js} +1 -1
- assets/{ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-BxRDV7Dm.js → ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-DTOfxlwP.js} +1 -1
- assets/{RadioCardDetailManySelect-Bn9sPp4x.js → RadioCardDetailManySelect-D3zSF9Ox.js} +1 -1
- assets/{SpeechVoiceSettings.vue_vue_type_script_setup_true_lang-DW1qhqmX.js → SpeechVoiceSettings.vue_vue_type_script_setup_true_lang-D0Yiu-Ma.js} +1 -1
- assets/{TestDummyMarker.vue_vue_type_script_setup_true_lang-OSsy22LU.js → TestDummyMarker.vue_vue_type_script_setup_true_lang-DvXVr5Qy.js} +1 -1
- assets/{TransitionVertical.vue_vue_type_script_setup_true_lang-BNzPx9yx.js → TransitionVertical.vue_vue_type_script_setup_true_lang-BTGItw4h.js} +1 -1
- assets/{_...all_-CIkXnkHu.js → _...all_-CxEbMPjh.js} +1 -1
- assets/{airi-card-DAWA4eQ5.js → airi-card-CbqBsbSf.js} +1 -1
- assets/{anthropic-DZM8jqDl.js → anthropic-D4yWnjWW.js} +1 -1
- assets/{audio-Dg7C6ruQ.js → audio-g9DiyU3J.js} +1 -1
- assets/{chat-Dn5NUeJ8.js → chat-BFU2g19v.js} +1 -1
- assets/{cloudflare-workers-ai-BuVW7ZIH.js → cloudflare-workers-ai-C4lOUkFP.js} +1 -1
- assets/{consciousness-C4xyvmr3.js → consciousness-BRdkM-c-.js} +1 -1
- assets/{consciousness-x6W39XLe.js → consciousness-C-h5B1sq.js} +1 -1
- assets/{deepseek-CrysIhkq.js → deepseek-CB4tx-Ko.js} +1 -1
- assets/{default-3kSj1ZoR.js → default-DolhCkLR.js} +1 -1
- assets/{default-node-DzW5muPs.js → default-node-BGL82aP-.js} +1 -1
- assets/{delays-HBOKcZm5.js → delays-F63qeUW3.js} +1 -1
- assets/{elevenlabs-Dh3dKYgb.js → elevenlabs-L17nDlYs.js} +1 -1
- assets/{emotions-C1vttnju.js → emotions-CNzOYGQn.js} +1 -1
- assets/{featherless-ai-DYiNttaX.js → featherless-ai-BkPHXcRw.js} +1 -1
- assets/{filter-message-CRLogJIb.js → filter-message-Cd_Y2XAy.js} +1 -1
- assets/{fireworks-ai-Brzqd047.js → fireworks-ai-DSa13ytv.js} +1 -1
- assets/{google-generative-ai-CG94KMvF.js → google-generative-ai-BrHwbhVt.js} +1 -1
- assets/{image-B_Hg7W96.js → image-jwIZU337.js} +1 -1
- assets/{index-CLIXS4H9.js → index-B1onYnuF.js} +1 -1
- assets/{index-bGU7kv-p.js → index-BKcXwYga.js} +1 -1
- assets/{index-CJycCKU5.js → index-BNcJmkAi.js} +1 -1
- assets/{index-BR3VGYw9.js → index-BOwQ_WhZ.js} +1 -1
- assets/index-BcT0g1Oh.js +1 -0
- assets/{index-BhqVpxhd.js → index-C4ujKJN4.js} +1 -1
- assets/{index-ZfK3fTHt.js → index-CborASRd.js} +0 -0
- assets/index-Cow_Er_T.js +0 -1
assets/CardDetailDialog-FgNNmEDA.js
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
import{_ as o}from"./CardDetailDialog.vue_vue_type_script_setup_true_lang-DT-C_SEQ.js";import"./DeleteCardDialog.vue_vue_type_script_setup_true_lang-G_NEmoXi.js";import"./index-7-fr_lhT.js";import"./index-ZfK3fTHt.js";import"./live2d-zip-loader-dDw0Wbbr.js";import"./airi-card-DAWA4eQ5.js";import"./consciousness-C4xyvmr3.js";import"./providers-B7zWTIWF.js";import"./index-Be1NqeGb.js";import"./speech-DK9my_xu.js";export{o as default};
|
|
|
|
assets/CardDetailDialog-iV9p9LC3.js
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
import{_ as o}from"./CardDetailDialog.vue_vue_type_script_setup_true_lang-XVLQKu9_.js";import"./DeleteCardDialog.vue_vue_type_script_setup_true_lang-44xxChqC.js";import"./index-hDb1Lsb8.js";import"./index-CborASRd.js";import"./live2d-zip-loader--bTGFeQd.js";import"./airi-card-CbqBsbSf.js";import"./consciousness-BRdkM-c-.js";import"./providers-adQ6cb75.js";import"./index-Be1NqeGb.js";import"./speech-D3H5B80W.js";export{o as default};
|
assets/{CardDetailDialog.vue_vue_type_script_setup_true_lang-DT-C_SEQ.js → CardDetailDialog.vue_vue_type_script_setup_true_lang-XVLQKu9_.js}
RENAMED
@@ -1 +1 @@
|
|
1 |
-
import{a as O,_ as q}from"./DeleteCardDialog.vue_vue_type_script_setup_true_lang-
|
|
|
1 |
+
import{a as O,_ as q}from"./DeleteCardDialog.vue_vue_type_script_setup_true_lang-44xxChqC.js";import"./live2d-zip-loader--bTGFeQd.js";import{d as E,q as U,s as F,h as x,g as L,c as n,o,bx as f,b as m,e as l,y as k,a as e,C as v,bI as u,D as i,z as $,by as j}from"./index-hDb1Lsb8.js";import{u as R}from"./airi-card-CbqBsbSf.js";import{n as G,I as J,$ as K,P as Q,B as W}from"./index-CborASRd.js";const X={key:0,class:"w-full flex flex-col gap-5"},Y={flex:"~ col","gap-3":""},Z={flex:"~ row","items-center":"","justify-between":""},ee={flex:"~ row","items-center":"","gap-2":""},te={key:0,class:"bg-primary-100 text-primary-600 dark:bg-primary-900/40 dark:text-primary-400 flex items-center gap-1 rounded-full px-2 py-0.5 text-xs font-medium"},ae={"mt-1":"","text-sm":"","text-neutral-500":"","dark:text-neutral-400":""},re={"font-medium":""},se={flex:"~ row","gap-2":""},le={class:"mt-4"},ne={class:"border-b border-neutral-200 dark:border-neutral-700"},oe={class:"flex justify-center -mb-px sm:justify-start space-x-1"},ie=["onClick"],de={class:"flex items-center gap-1"},ue={key:0},ce=["innerHTML"],me={key:1},ve=["innerHTML"],pe={key:2},ge={flex:"~ col","max-h-60":"","gap-4":"","overflow-auto":"","pr-1":"","sm:max-h-80":""},xe={key:0,flex:"~ col","gap-2":""},be={"text-lg":"","text-neutral-500":"","font-medium":"","dark:text-neutral-400":""},fe=["innerHTML"],he={key:3},_e={grid:"~ cols-1 sm:cols-3","gap-4":""},ke={flex:"~ col",bg:"white/60 dark:black/30","gap-1":"","rounded-lg":"","p-3":"",border:"~ neutral-200/50 dark:neutral-700/30",transition:"all duration-200",hover:"bg-white/80 dark:bg-black/40"},we={flex:"~ row","items-center":"","gap-2":"","text-sm":"","text-neutral-500":"","dark:text-neutral-400":""},ye={truncate:"","font-medium":""},Ce={flex:"~ col",bg:"white/60 dark:black/30","gap-2":"","rounded-lg":"","p-3":"",border:"~ neutral-200/50 dark:neutral-700/30",transition:"all duration-200",hover:"bg-white/80 dark:bg-black/40"},Ie={flex:"~ row","items-center":"","gap-2":"","text-sm":"","text-neutral-500":"","dark:text-neutral-400":""},Te={truncate:"","font-medium":""},Ve={flex:"~ col",bg:"white/60 dark:black/30","gap-2":"","rounded-lg":"","p-3":"",border:"~ neutral-200/50 dark:neutral-700/30",transition:"all duration-200",hover:"bg-white/80 dark:bg-black/40"},He={flex:"~ row","items-center":"","gap-2":"","text-sm":"","text-neutral-500":"","dark:text-neutral-400":""},Le={truncate:"","font-medium":""},$e={key:1,bg:"neutral-50/50 dark:neutral-900/50","rounded-xl":"","p-8":"","text-center":"",border:"~ neutral-200/50 dark:neutral-700/30",shadow:"sm"},ze=E({__name:"CardDetailDialog",props:{modelValue:{type:Boolean},cardId:null},emits:["update:modelValue"],setup(B,{emit:z}){const b=B,D=z,{t:d}=U(),w=R(),{removeCard:A}=w,{activeCardId:M}=F(w),a=x(()=>{if(b.cardId)return w.getCard(b.cardId)}),y=x(()=>{var t,c,r,g,S;if(!a.value||!((c=(t=a.value.extensions)==null?void 0:t.airi)!=null&&c.modules))return{consciousness:"",speech:"",voice:""};const s=a.value.extensions.airi.modules;return{consciousness:((r=s.consciousness)==null?void 0:r.model)||"",speech:((g=s.speech)==null?void 0:g.model)||"",voice:((S=s.speech)==null?void 0:S.voice_id)||""}}),C=x(()=>a.value?{personality:a.value.personality,scenario:a.value.scenario,systemPrompt:a.value.systemPrompt,postHistoryInstructions:a.value.postHistoryInstructions}:{}),h=x(()=>b.cardId===M.value),I=L(!1);function N(){I.value=!0,setTimeout(()=>{M.value=b.cardId,I.value=!1},300)}function T(s){return s==null?void 0:s.replace(/\{\{(.*?)\}\}/g,'<span class="bg-primary-500/20 inline-block">{{ $1 }}</span>').trim()}const _=L(!1);function P(){a.value&&(A(b.cardId),D("update:modelValue",!1)),_.value=!1}const V=L(""),H=x(()=>{var t,c;const s=[];return(t=a.value)!=null&&t.description&&s.push({id:"description",label:d("settings.pages.card.description_label"),icon:"i-solar:document-text-linear"}),(c=a.value)!=null&&c.notes&&s.push({id:"notes",label:d("settings.pages.card.creator_notes"),icon:"i-solar:notes-linear"}),Object.values(C.value).some(r=>!!r)&&s.push({id:"character",label:d("settings.pages.card.character"),icon:"i-solar:user-rounded-linear"}),s.push({id:"modules",label:d("settings.pages.card.modules"),icon:"i-solar:tuning-square-linear"}),s}),p=x({get:()=>{var s;return H.value.find(t=>t.id===V.value)?V.value:((s=H.value[0])==null?void 0:s.id)||""},set:s=>{V.value=s}});return(s,t)=>{var c;return o(),n(f,null,[m(l(G),{open:B.modelValue,"onUpdate:open":t[0]||(t[0]=r=>D("update:modelValue",r))},{default:k(()=>[m(l(J),null,{default:k(()=>[m(l(K),{class:"data-[state=open]:animate-fadeIn data-[state=closed]:animate-fadeOut fixed inset-0 z-50 bg-black/50 backdrop-blur-sm"}),m(l(Q),{class:"data-[state=open]:animate-contentShow data-[state=closed]:animate-contentHide fixed left-1/2 top-1/2 z-50 m-0 max-h-[90vh] max-w-6xl w-[92vw] flex flex-col overflow-auto border border-neutral-200 rounded-xl bg-white p-5 shadow-xl 2xl:w-[60vw] lg:w-[80vw] md:w-[85vw] xl:w-[70vw] -translate-x-1/2 -translate-y-1/2 dark:border-neutral-700 dark:bg-neutral-800 sm:p-6"},{default:k(()=>[a.value?(o(),n("div",X,[e("div",Y,[e("div",Z,[e("div",null,[e("div",ee,[m(l(W),{"text-2xl":"","font-bold":"",class:"from-primary-500 to-primary-400 bg-gradient-to-r bg-clip-text text-transparent"},{default:k(()=>[u(i(a.value.name),1)]),_:1}),h.value?(o(),n("div",te,[t[3]||(t[3]=e("div",{"i-solar:check-circle-bold-duotone":"","text-xs":""},null,-1)),u(" "+i(l(d)("settings.pages.card.active_badge")),1)])):v("",!0)]),e("div",ae,[u(" v"+i(a.value.version)+" ",1),a.value.creator?(o(),n(f,{key:0},[u(" · "+i(l(d)("settings.pages.card.created_by"))+" ",1),e("span",re,i(a.value.creator),1)],64)):v("",!0)])]),e("div",se,[m(l(O),{variant:"primary",icon:h.value?"i-solar:check-circle-bold-duotone":"i-solar:play-circle-broken",label:h.value?l(d)("settings.pages.card.active"):l(d)("settings.pages.card.activate"),disabled:h.value,class:$({"animate-pulse":I.value}),onClick:N},null,8,["icon","label","disabled","class"])])]),e("div",le,[e("div",ne,[e("div",oe,[(o(!0),n(f,null,j(H.value,r=>(o(),n("button",{key:r.id,class:$(["px-4 py-2 text-sm font-medium",[p.value===r.id?"text-primary-600 dark:text-primary-400 border-b-2 border-primary-500 dark:border-primary-400":"text-neutral-500 dark:text-neutral-400 hover:text-neutral-700 dark:hover:text-neutral-300"]]),onClick:g=>p.value=r.id},[e("div",de,[e("div",{class:$(r.icon)},null,2),u(" "+i(r.label),1)])],10,ie))),128))])])]),p.value==="notes"&&a.value.notes?(o(),n("div",ue,[e("div",{bg:"white/60 dark:black/30",border:"~ neutral-200/50 dark:neutral-700/30","max-h-60":"","overflow-auto":"","whitespace-pre-line":"","rounded-lg":"","p-4":"","text-neutral-700":"","sm:max-h-80":"","dark:text-neutral-300":"",transition:"all duration-200",hover:"bg-white/80 dark:bg-black/40",innerHTML:T(a.value.notes)},null,8,ce)])):v("",!0),p.value==="description"&&a.value.description?(o(),n("div",me,[e("div",{bg:"white/60 dark:black/30","max-h-60":"","overflow-auto":"","whitespace-pre-line":"","rounded-lg":"","p-4":"","sm:max-h-80":"",text:"neutral-600 dark:neutral-300",border:"~ neutral-200/50 dark:neutral-700/30",innerHTML:T(a.value.description)},null,8,ve)])):v("",!0),p.value==="character"&&Object.values(C.value).some(r=>!!r)?(o(),n("div",pe,[e("div",ge,[(o(!0),n(f,null,j(C.value,(r,g)=>(o(),n(f,{key:g},[r?(o(),n("div",xe,[e("h2",be,i(l(d)(`settings.pages.card.${g.toLowerCase()}`)),1),e("div",{bg:"white/60 dark:black/30",border:"~ neutral-200/50 dark:neutral-700/30",transition:"all duration-200",hover:"bg-white/80 dark:bg-black/40","max-h-none":"","overflow-auto":"","whitespace-pre-line":"","rounded-lg":"","p-3":"","text-neutral-700":"","dark:text-neutral-300":"",innerHTML:T(r)},null,8,fe)])):v("",!0)],64))),128))])])):v("",!0),p.value==="modules"?(o(),n("div",he,[e("div",_e,[e("div",ke,[e("span",we,[t[4]||(t[4]=e("div",{"i-lucide:ghost":""},null,-1)),u(" "+i(l(d)("settings.pages.card.consciousness.model")),1)]),e("div",ye,i(y.value.consciousness??"default"),1)]),e("div",Ce,[e("span",Ie,[t[5]||(t[5]=e("div",{"i-lucide:mic":""},null,-1)),u(" "+i(l(d)("settings.pages.card.speech.model")),1)]),e("div",Te,i(y.value.speech??"default"),1)]),e("div",Ve,[e("span",He,[t[6]||(t[6]=e("div",{"i-lucide:music":""},null,-1)),u(" "+i(l(d)("settings.pages.card.speech.voice")),1)]),e("div",Le,i(y.value.voice??"default"),1)])])])):v("",!0)])])):(o(),n("div",$e,[t[7]||(t[7]=e("div",{"i-solar:card-search-broken":"","mx-auto":"","mb-3":"","text-6xl":"","text-neutral-400":""},null,-1)),u(" "+i(l(d)("settings.pages.card.card_not_found")),1)]))]),_:1})]),_:1})]),_:1},8,["open"]),m(q,{modelValue:_.value,"onUpdate:modelValue":t[1]||(t[1]=r=>_.value=r),"card-name":(c=a.value)==null?void 0:c.name,onConfirm:P,onCancel:t[2]||(t[2]=r=>_.value=!1)},null,8,["modelValue","card-name"])],64)}}});export{ze as _};
|
assets/{CardListItem-D1SxHi9v.js → CardListItem-D2hO_cEF.js}
RENAMED
@@ -1 +1 @@
|
|
1 |
-
import{_ as m}from"./CardListItem.vue_vue_type_script_setup_true_lang-
|
|
|
1 |
+
import{_ as m}from"./CardListItem.vue_vue_type_script_setup_true_lang-B6mmFgyk.js";import"./index-hDb1Lsb8.js";export{m as default};
|
assets/{CardListItem.vue_vue_type_script_setup_true_lang-DLIJmqLz.js → CardListItem.vue_vue_type_script_setup_true_lang-B6mmFgyk.js}
RENAMED
@@ -1 +1 @@
|
|
1 |
-
import{d as p,c as n,o as a,a as e,C as l,D as i,bJ as s,z as u}from"./index-
|
|
|
1 |
+
import{d as p,c as n,o as a,a as e,C as l,D as i,bJ as s,z as u}from"./index-hDb1Lsb8.js";const c={relative:"",flex:"~ col 1","justify-between":"","gap-3":"","overflow-hidden":"","rounded-lg":"",bg:"white dark:neutral-900","p-5":"",transition:"all ease-in-out duration-400",after:"content-empty absolute inset-0 z--2 w-full h-full bg-dotted-[neutral-200/80] bg-size-10px mask-image-[linear-gradient(165deg,white_30%,transparent_50%)] transition-all duration-400 ease-in-out",hover:"after:bg-dotted-[primary-300/50] dark:after:bg-dotted-[primary-200/20]"},b={"z-1":"",flex:"","items-start":"","justify-between":"","gap-2":""},v={"flex-1":"",truncate:"","text-lg":"","font-bold":"",hover:"text-primary-600 dark:text-primary-300"},x={key:0,"shrink-0":"","rounded-md":"","p-1":"",bg:"primary-100 dark:primary-900/40",text:"primary-600 dark:primary-400"},f={key:0,"line-clamp-3":"","min-h-40px":"","flex-1":"","text-sm":"",text:"neutral-500 dark:neutral-400",hover:"text-primary-600/80 dark:text-primary-300/80"},y={"z-1":"",flex:"","items-center":"","justify-between":"","text-xs":"",text:"neutral-500 dark:neutral-400"},k={flex:"","items-center":"","gap-1.5":""},g={flex:"","items-center":"","gap-0.5":""},h={flex:"","items-center":"","gap-0.5":""},w={flex:"","items-center":"","justify-end":"","px-2":"","py-1.5":""},C=["disabled"],M=p({__name:"CardListItem",props:{id:null,name:null,description:null,isActive:{type:Boolean},isSelected:{type:Boolean},version:null,consciousnessModel:null,voiceModel:null},emits:["select","activate","delete"],setup(r,{emit:m}){const o=m;return(z,t)=>(a(),n("div",{relative:"","min-h-120px":"",flex:"~ col","cursor-pointer":"","overflow-hidden":"","rounded-xl":"",class:u([r.isSelected?"border-2 border-primary-400 dark:border-primary-600":"border-2 border-neutral-100 dark:border-neutral-800/25"]),bg:"neutral-200/50 dark:neutral-800/50","drop-shadow":"none hover:[0px_4px_4px_rgba(220,220,220,0.4)] active:[0px_0px_0px_rgba(220,220,220,0.25)] dark:hover:none",transition:"all ease-in-out duration-400",before:"content-empty absolute inset-0 z-0 w-25% h-full transition-all duration-400 ease-in-out bg-gradient-to-r from-primary-500/0 to-primary-500/0 dark:from-primary-400/0 dark:to-primary-400/0 mask-image-[linear-gradient(120deg,white_100%)] opacity-0",hover:"before:w-50% before:opacity-100 before:bg-gradient-to-r before:from-primary-500/20 before:via-primary-500/10 before:to-transparent before:dark:from-primary-400/20 before:dark:via-primary-400/10 before:dark:to-transparent",onClick:t[2]||(t[2]=d=>o("select"))},[e("div",c,[e("div",b,[e("h3",v,i(r.name),1),r.isActive?(a(),n("div",x,t[3]||(t[3]=[e("div",{"i-solar:check-circle-bold-duotone":"","text-sm":""},null,-1)]))):l("",!0)]),r.description?(a(),n("p",f,i(r.description),1)):l("",!0),e("div",y,[e("div",null,"v"+i(r.version),1),e("div",k,[e("div",g,[t[4]||(t[4]=e("div",{"i-lucide:ghost":"","text-xs":""},null,-1)),e("span",null,i(r.consciousnessModel),1)]),e("div",h,[t[5]||(t[5]=e("div",{"i-lucide:mic":"","text-xs":""},null,-1)),e("span",null,i(r.voiceModel),1)])])])]),e("div",w,[e("button",{"rounded-lg":"","p-1.5":"","transition-colors":"",hover:"bg-neutral-200 dark:bg-neutral-700/50",disabled:r.isActive,onClick:t[0]||(t[0]=s(d=>o("activate"),["stop"]))},[e("div",{class:u([r.isActive?"i-solar:check-circle-bold-duotone text-primary-500 dark:text-primary-400":"i-solar:play-circle-broken text-neutral-500 dark:text-neutral-400"])},null,2)],8,C),r.id!=="default"?(a(),n("button",{key:0,"rounded-lg":"","p-1.5":"","transition-colors":"",hover:"bg-neutral-200 dark:bg-neutral-700/50",onClick:t[1]||(t[1]=s(d=>o("delete"),["stop"]))},t[6]||(t[6]=[e("div",{"i-solar:trash-bin-trash-linear":"",text:"neutral-500 dark:neutral-400"},null,-1)]))):l("",!0)])],2))}});export{M as _};
|
assets/{Collapsable.vue_vue_type_script_setup_true_lang-D5rspuJc.js → Collapsable.vue_vue_type_script_setup_true_lang-bS5XNUtd.js}
RENAMED
@@ -1 +1 @@
|
|
1 |
-
import{_ as d}from"./TransitionVertical.vue_vue_type_script_setup_true_lang-
|
|
|
1 |
+
import{_ as d}from"./TransitionVertical.vue_vue_type_script_setup_true_lang-BTGItw4h.js";import{d as p,bK as m,bL as f,af as b,c,o as v,m as r,b as V,bT as u,bU as y,y as C,C as g,bV as k,a as s,bI as x,D as i}from"./index-hDb1Lsb8.js";const B={op50:""},w=p({__name:"Collapsable",props:m({default:{type:Boolean},label:null},{modelValue:{type:Boolean,default:!1},modelModifiers:{}}),emits:["update:modelValue"],setup(o){const t=o,e=f(o,"modelValue");b(()=>{t.default!=null&&(e.value=!!t.default)});function n(l){return e.value=l,l}return(l,a)=>(v(),c("div",null,[r(l.$slots,"trigger",u(y({visible:e.value,setVisible:n})),()=>[s("button",{sticky:"","top-0":"","z-10":"",flex:"","items-center":"","justify-between":"",px2:"",py1:"","text-sm":"","backdrop-blur-xl":"",onClick:a[0]||(a[0]=_=>e.value=!e.value)},[s("span",null,i(t.label??"Collapsable"),1),a[1]||(a[1]=x()),s("span",B,i(e.value?"▲":"▼"),1)])]),V(d,null,{default:C(()=>[e.value?r(l.$slots,"default",u(k({key:0},{visible:e.value,setVisible:n}))):g("",!0)]),_:3})]))}});export{w as _};
|
assets/{ColorPalette.vue_vue_type_script_setup_true_lang-DpflICIJ.js → ColorPalette.vue_vue_type_script_setup_true_lang-XM3XfZvN.js}
RENAMED
@@ -1 +1 @@
|
|
1 |
-
import{_ as b}from"./Collapsable.vue_vue_type_script_setup_true_lang-
|
|
|
1 |
+
import{_ as b}from"./Collapsable.vue_vue_type_script_setup_true_lang-bS5XNUtd.js";import{d,x as m,o as i,y as l,a as n,z as c,m as y,bI as f,D as g,v as C,c as u,C as k,bx as v,by as x,b as s,e,n as h,bR as z}from"./index-hDb1Lsb8.js";import"./live2d-zip-loader--bTGFeQd.js";import{W as w,j as S,q as $,U as B,G as E,H as V}from"./index-CborASRd.js";const F=["onClick"],H={flex:"","gap-1.5":""},q=d({__name:"Section",props:{title:null,icon:null,innerClass:null,expand:{type:Boolean,default:!0}},setup(t){return(o,_)=>(i(),m(b,{default:t.expand},{trigger:l(r=>[n("button",{class:"w-full flex items-center justify-between rounded-lg px-4 py-3 outline-none transition-all duration-250 ease-in-out",bg:"zinc-100 dark:zinc-800",hover:"bg-zinc-200 dark:bg-zinc-700",onClick:a=>r.setVisible(!r.visible)},[n("div",H,[n("div",{class:c(t.icon),"size-6":""},null,2),f(" "+g(t.title),1)]),n("div",{"i-solar:alt-arrow-down-bold-duotone":"",transition:"transform duration-250",class:c({"rotate-180":r.visible})},null,2)],8,F)]),default:l(()=>[n("div",{grid:"","gap-4":"","p-4":"",class:c(t.innerClass)},[y(o.$slots,"default")],2)]),_:3},8,["default"]))}}),N={key:0,flex:"","gap-2":""},G=d({__name:"ColorPalette",props:{colors:null},setup(t){const o=C();return(_,r)=>t.colors.length?(i(),u("div",N,[(i(!0),u(v,null,x(t.colors,({hex:a,name:p})=>(i(),m(e(V),{key:a||"default"},{default:l(()=>[s(e(w),null,{default:l(()=>[s(e(S),{transition:"all ease-in-out duration-250","bg-primary-500":"","size-6":"","cursor-pointer":"","rounded-full":"",style:h(a?{background:a}:{"--theme-colors-hue":e(z)}),class:c(e(o).isColorSelectedForPrimary(a)?"scale-150 mx-1":"hover:scale-110"),onClick:U=>e(o).applyPrimaryColorFrom(a)},null,8,["style","class","onClick"]),s(e($),null,{default:l(()=>[s(e(B),{bg:"white dark:neutral-800","rounded-lg":"","px-3":"","py-1.5":"","text-sm":"","shadow-md":""},{default:l(()=>[f(g(p)+" ",1),s(e(E),{"fill-white":"","dark:fill-neutral-800":""})]),_:2},1024)]),_:2},1024)]),_:2},1024)]),_:2},1024))),128))])):k("",!0)}});export{q as _,G as a};
|
assets/{DeleteCardDialog-NTC8VI23.js → DeleteCardDialog-Cm2fzcjo.js}
RENAMED
@@ -1 +1 @@
|
|
1 |
-
import{_ as o}from"./DeleteCardDialog.vue_vue_type_script_setup_true_lang-
|
|
|
1 |
+
import{_ as o}from"./DeleteCardDialog.vue_vue_type_script_setup_true_lang-44xxChqC.js";import"./index-hDb1Lsb8.js";import"./index-CborASRd.js";export{o as default};
|
assets/{DeleteCardDialog.vue_vue_type_script_setup_true_lang-G_NEmoXi.js → DeleteCardDialog.vue_vue_type_script_setup_true_lang-44xxChqC.js}
RENAMED
@@ -1 +1 @@
|
|
1 |
-
import{d as v,h as p,c as r,o as d,z as g,a as m,C as h,m as _,D as i,q as w,x as C,y as n,b as t,e,bI as x}from"./index-
|
|
|
1 |
+
import{d as v,h as p,c as r,o as d,z as g,a as m,C as h,m as _,D as i,q as w,x as C,y as n,b as t,e,bI as x}from"./index-hDb1Lsb8.js";import{A as V,k as B,O as N,V as z,F as D,M as I,N as O,T as S}from"./index-CborASRd.js";const T=["disabled"],$={class:"flex flex-row items-center justify-center gap-2"},j={key:0,class:"i-lucide:loader-circle animate-spin"},A={key:2},y=v({__name:"Button",props:{icon:null,label:null,disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},variant:{default:"primary"},size:{default:"md"},block:{type:Boolean,default:!1}},setup(a){const s=a,l=p(()=>s.disabled||s.loading),o={primary:"bg-primary-500 hover:bg-primary-600 dark:bg-primary-400 dark:hover:bg-primary-500 text-white",secondary:"bg-neutral-100 hover:bg-neutral-200 dark:bg-neutral-600 dark:hover:bg-neutral-500 text-neutral-900 dark:text-neutral-100",danger:"bg-red-500 hover:bg-red-600 dark:bg-red-400 dark:hover:bg-red-500 text-white"},c={sm:"px-3 py-1.5 text-xs",md:"px-4 py-2 text-sm",lg:"px-6 py-3 text-base"},u=p(()=>["rounded-lg font-medium outline-none transition-all duration-200 ease-in-out","disabled:cursor-not-allowed disabled:opacity-50",s.block?"w-full":"",c[s.size],o[s.variant],{"opacity-50 cursor-not-allowed":l.value},"focus:ring-2 focus:ring-offset-2 focus:ring-offset-white dark:focus:ring-offset-neutral-900","focus:ring-primary-500/50 dark:focus:ring-primary-400/50"]);return(b,f)=>(d(),r("button",{disabled:l.value,class:g(u.value)},[m("div",$,[a.loading?(d(),r("div",j)):a.icon?(d(),r("div",{key:1,class:g(a.icon)},null,2)):h("",!0),a.label?(d(),r("span",A,i(a.label),1)):_(b.$slots,"default",{key:3})])],10,T))}}),F={class:"flex flex-row justify-end gap-3"},E=v({__name:"DeleteCardDialog",props:{modelValue:{type:Boolean},cardName:null},emits:["update:modelValue","confirm","cancel"],setup(a,{emit:s}){const l=s,{t:o}=w();function c(){l("update:modelValue",!1),l("cancel")}function u(){l("update:modelValue",!1),l("confirm")}return(b,f)=>(d(),C(e(S),{open:a.modelValue,"onUpdate:open":f[0]||(f[0]=k=>l("update:modelValue",k))},{default:n(()=>[t(e(V),null,{default:n(()=>[t(e(B),{class:"data-[state=open]:animate-fadeIn data-[state=closed]:animate-fadeOut fixed inset-0 z-50 bg-black/50"}),t(e(N),{class:"data-[state=open]:animate-contentShow data-[state=closed]:animate-contentHide fixed left-1/2 top-1/2 z-50 max-w-md w-full border border-neutral-200 rounded-xl bg-white p-6 shadow-xl -translate-x-1/2 -translate-y-1/2 dark:border-neutral-700 dark:bg-neutral-800"},{default:n(()=>[t(e(z),{class:"mb-4 text-xl font-bold"},{default:n(()=>[x(i(e(o)("settings.pages.card.delete_card")),1)]),_:1}),t(e(D),{class:"mb-6"},{default:n(()=>[x(i(e(o)("settings.pages.card.delete_confirmation"))+" ",1),m("b",null,'"'+i(a.cardName||"")+'"',1)]),_:1}),m("div",F,[t(e(I),{"as-child":""},{default:n(()=>[t(e(y),{variant:"secondary",label:e(o)("settings.pages.card.cancel"),onClick:c},null,8,["label"])]),_:1}),t(e(O),{"as-child":""},{default:n(()=>[t(e(y),{variant:"danger",label:e(o)("settings.pages.card.delete"),onClick:u},null,8,["label"])]),_:1})])]),_:1})]),_:1})]),_:1},8,["open"]))}});export{E as _,y as a};
|
assets/{FieldInput.vue_vue_type_script_setup_true_lang-BhtqkEkU.js → FieldInput.vue_vue_type_script_setup_true_lang-CG42zMAq.js}
RENAMED
@@ -1 +1 @@
|
|
1 |
-
import{_ as m}from"./Input.vue_vue_type_script_setup_true_lang-
|
|
|
1 |
+
import{_ as m}from"./Input.vue_vue_type_script_setup_true_lang-DGnmLgZc.js";import{d as p,h as x,c as o,o as n,a as l,b as V,bI as f,C as h,D as d,z as v}from"./index-hDb1Lsb8.js";const y={"max-w-full":""},C={flex:"~ col gap-4"},_={class:"flex items-center gap-1 text-sm font-medium"},b={key:0,class:"text-red-500"},g={class:"text-xs text-neutral-500 dark:text-neutral-400","text-nowrap":""},N=p({__name:"FieldInput",props:{modelValue:null,label:null,description:null,placeholder:null,required:{type:Boolean},type:null,inputClass:null},emits:["update:modelValue"],setup(e,{emit:u}){const c=e,i=u,t=x({get:()=>c.modelValue,set:a=>i("update:modelValue",a)});return(a,s)=>(n(),o("div",y,[l("label",C,[l("div",null,[l("div",_,[f(d(e.label)+" ",1),e.required!==!1?(n(),o("span",b,"*")):h("",!0)]),l("div",g,d(e.description),1)]),V(m,{modelValue:t.value,"onUpdate:modelValue":s[0]||(s[0]=r=>t.value=r),type:e.type,placeholder:e.placeholder,class:v(e.inputClass)},null,8,["modelValue","type","placeholder","class"])])]))}});export{N as _};
|
assets/{HeaderLink-C7jWLVVD.js → HeaderLink-DavtcSnn.js}
RENAMED
@@ -1 +1 @@
|
|
1 |
-
import{d as r,bC as c,x as l,e,bo as d,o as s,y as _,c as t,a,bn as i}from"./index-
|
|
|
1 |
+
import{d as r,bC as c,x as l,e,bo as d,o as s,y as _,c as t,a,bn as i}from"./index-hDb1Lsb8.js";const k="/assets/logo-dark-CO0kwKsz.svg",p="/assets/logo-D6zeZTFl.svg",u=["src"],m=["src"],x=r({__name:"HeaderLink",setup(g){const n=c();return(f,o)=>(s(),l(e(d),{to:"/",flex:"~","items-center":"","gap-2":"","px-2":"","text-nowrap":"","text-2xl":"","outline-none":""},{default:_(()=>[e(n)?(s(),t("img",{key:0,src:e(k),"h-8":"","w-8":"",class:"theme-colored"},null,8,u)):(s(),t("img",{key:1,src:e(p),"h-8":"","w-8":"",class:"theme-colored"},null,8,m)),o[0]||(o[0]=a("div",{"font-cute":""},[a("span",null,"アイリ")],-1))]),_:1}))}}),w=i(x,[["__scopeId","data-v-496b6cde"]]);export{w as H};
|
assets/{IconAnimation.vue_vue_type_script_setup_true_lang-Djn5fd3P.js → IconAnimation.vue_vue_type_script_setup_true_lang-B0Tznm9Y.js}
RENAMED
@@ -1 +1 @@
|
|
1 |
-
import{d as m,g as s,w as p,h,c as f,o as x,n as l,a as u,z as y}from"./index-
|
|
|
1 |
+
import{d as m,g as s,w as p,h,c as f,o as x,n as l,a as u,z as y}from"./index-hDb1Lsb8.js";const C=m({__name:"IconAnimation",props:{icon:null,iconSize:null,position:null,duration:null,started:{type:Boolean},textColor:null,isReverse:{type:Boolean},zIndex:null},emits:["animationEnded"],setup(a,{emit:d}){const e=a,c=d,n=s(!1);p(()=>e.started,o=>{o&&requestAnimationFrame(()=>{n.value=!0})});const t=h(()=>({opacity:n.value!==e.isReverse?1:0,size:n.value!==e.isReverse?25:e.iconSize,position:n.value!==e.isReverse?"calc(50dvw - 12.5rem), calc(50dvh - 12.5rem)":e.position,textColor:n.value!==e.isReverse?"text-white":e.textColor})),i=s([]),r=s(!1);function v(o){i.value.push(o.propertyName),i.value.includes("color")&&i.value.includes("width")&&i.value.includes("height")&&i.value.includes("transform")&&(r.value=!0,c("animationEnded"))}return(o,z)=>(x(),f("div",{"pointer-events-none":"",fixed:"",w:"100dvw",h:"100dvh",style:l({zIndex:r.value?a.zIndex:void 0})},[u("div",{"bg-primary-500":"",fixed:"","inset-0":"","transition-opacity":"","ease-linear":"",style:l({opacity:t.value.opacity,transitionDuration:`${a.duration}ms`})},null,4),u("div",{fixed:"","inset-0":"","ease-in-out":"",style:l({width:`${t.value.size}rem`,height:`${t.value.size}rem`,transform:`translate(${t.value.position})`,transitionDuration:`${a.duration}ms`}),class:y([t.value.textColor,e.icon,{"transition-all":n.value}]),onTransitionend:v},null,38)],4))}});export{C as _};
|
assets/{IconStatusItem-CtYOABTk.js → IconStatusItem-B-kn6UCa.js}
RENAMED
@@ -1 +1 @@
|
|
1 |
-
import{d as u,r as c,c as e,o as n,b as d,a as o,y as m,C as a,D as i,z as s,bn as _}from"./index-
|
|
|
1 |
+
import{d as u,r as c,c as e,o as n,b as d,a as o,y as m,C as a,D as i,z as s,bn as _}from"./index-hDb1Lsb8.js";const p={flex:"~ col",bg:"neutral-200/50 dark:neutral-800/50",border:"neutral-100 dark:neutral-800/25 hover:primary-500/30 dark:hover:primary-400/30 solid 2","drop-shadow":"none hover:[0px_4px_4px_rgba(220,220,220,0.4)] active:[0px_0px_0px_rgba(220,220,220,0.25)] dark:hover:none",class:"menu-icon-status-item",transition:"all ease-in-out duration-400","w-full":"","cursor-pointer":"","of-hidden":"","rounded-xl":""},g={"z-1":"","flex-1":""},h={"text-lg":"","font-bold":"",class:"menu-icon-status-item-title",transition:"all ease-in-out duration-400"},k={text:"sm neutral-500 dark:neutral-400",class:"menu-icon-status-item-description",transition:"all ease-in-out duration-400"},f=["src"],x={"p-2":""},v={key:0,"size-3":"",bg:"green-500 dark:green-600","rounded-full":""},y={key:1,"size-3":"",bg:"neutral-400 dark:neutral-500","rounded-full":""},b=u({__name:"IconStatusItem",props:{title:null,description:null,icon:null,iconColor:null,iconImage:null,to:null,configured:{type:Boolean}},setup(r){const t=r;return(C,I)=>{const l=c("RouterLink");return n(),e("div",p,[d(l,{flex:"~ row",class:"menu-icon-status-item-link",bg:"white dark:neutral-900",transition:"all ease-in-out duration-400",relative:"","h-full":"","w-full":"","items-center":"","overflow-hidden":"","rounded-lg":"","p-5":"","text-left":"",to:t.to},{default:m(()=>[o("div",g,[o("div",h,i(t.title),1),o("div",k,[o("span",null,i(t.description),1)])]),t.icon?(n(),e("div",{key:0,class:s(["menu-icon-status-item-icon",[t.icon]]),transition:"all ease-in-out duration-400",absolute:"","right-0":"","size-16":"","translate-y-2":"",text:"neutral-400/50 dark:neutral-600/50","grayscale-100":""},null,2)):a("",!0),t.iconColor?(n(),e("div",{key:1,class:s(["menu-icon-status-item-icon-color",[t.iconColor]]),transition:"all ease-in-out duration-400",absolute:"","right-0":"","size-16":"","translate-y-2":"",text:"neutral-400/50 dark:neutral-600/50","grayscale-100":""},null,2)):a("",!0),t.iconImage?(n(),e("img",{key:2,src:t.iconImage,class:"menu-icon-status-item-icon-image",transition:"all ease-in-out duration-400",absolute:"","right-0":"","size-16":"","translate-y-2":"","grayscale-100":""},null,8,f)):a("",!0)]),_:1},8,["to"]),o("div",x,[t.configured?(n(),e("div",v)):(n(),e("div",y))])])}}}),w=_(b,[["__scopeId","data-v-7ea16194"]]);export{w as I};
|
assets/{Input.vue_vue_type_script_setup_true_lang-58p3G1RX.js → Input.vue_vue_type_script_setup_true_lang-DGnmLgZc.js}
RENAMED
@@ -1 +1 @@
|
|
1 |
-
import{d as r,bK as n,bL as u,A as s,cr as d,o as i,c as p}from"./index-
|
|
|
1 |
+
import{d as r,bK as n,bL as u,A as s,cr as d,o as i,c as p}from"./index-hDb1Lsb8.js";const m=["type"],y=r({__name:"Input",props:n({type:null},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const l=e,t=u(e,"modelValue");return(c,a)=>s((i(),p("input",{"onUpdate:modelValue":a[0]||(a[0]=o=>t.value=o),type:l.type||"text",border:"focus:primary-100 dark:focus:primary-400/50 2 solid neutral-200 dark:neutral-800",transition:"all duration-200 ease-in-out",text:"disabled:neutral-400 dark:disabled:neutral-600",cursor:"disabled:not-allowed","w-full":"","rounded-lg":"","px-2":"","py-1":"","text-nowrap":"","text-sm":"","outline-none":"",shadow:"sm",bg:"neutral-100 dark:neutral-800 focus:neutral-50 dark:focus:neutral-900"},null,8,m)),[[d,t.value]])}});export{y as _};
|
assets/{Model.vue_vue_type_script_setup_true_lang-B7ZOwTMx.js → Model.vue_vue_type_script_setup_true_lang-Wfrg8fps.js}
RENAMED
@@ -1 +1 @@
|
|
1 |
-
import{n as C,T as Y,A as re,L as F,o as $,r as ue,D as se,I as de,m as O,M as ce,p as R}from"./live2d-zip-loader
|
|
|
1 |
+
import{n as C,T as Y,A as re,L as F,o as $,r as ue,D as se,I as de,m as O,M as ce,p as R}from"./live2d-zip-loader--bTGFeQd.js";import{bO as ve,d as G,g as h,w as p,l as N,H as X,c as j,o as q,m as Q,br as T,h as z,bC as pe,i as he,G as fe,s as me,v as ge,bP as Me,bQ as we,bx as ye,a as be,p as Se}from"./index-hDb1Lsb8.js";const xe=o=>Math.max(0,Math.min(1,o||0)),B=o=>Math.round(xe(o)*255),Pe=ve("rgb"),Be=o=>{if(o===void 0)return;let l=B(o.r),t=B(o.g),d=B(o.b);return"#"+(1<<24|l<<16|t<<8|d).toString(16).slice(1)},Ce=o=>Be(Pe(o)),ke=G({__name:"Canvas",props:{width:null,height:null},setup(o,{expose:l}){const t=o,d=h(),e=h(),i=h();async function c(n){F.registerTicker($),C.add(Y),e.value=new re({width:t.width,height:t.height,backgroundAlpha:0,preserveDrawingBuffer:!0}),i.value=e.value.view,i.value.style.objectFit="contain",n.appendChild(e.value.view)}function y(){var n;e.value&&e.value.renderer.resize(t.width,t.height),(n=e.value)!=null&&n.view&&(e.value.view.width=t.width,e.value.view.height=t.height)}p([()=>t.width,()=>t.height],()=>y()),N(async()=>d.value&&await c(d.value)),X(()=>{var n;return(n=e.value)==null?void 0:n.destroy()});async function P(){return new Promise(g=>{if(!i.value||!e.value)return g(null);e.value.render(),i.value.toBlob(g)})}return l({captureFrame:P}),(n,g)=>(q(),j("div",{ref_key:"containerRef",ref:d,"h-full":"","w-full":""},[Q(n.$slots,"default",{app:e.value})],512))}});function V(o,l,t){return(1-t)*o+t*l}function H(o,l){return o+Math.random()*(l-o)}function Fe(){let o=-1,l,t=-1;function d(e,i){(i>=o||i<t)&&(l=[H(-1,1),H(-1,.7)],t=i,o=i+ue()/1e3,e.focusController.focus(l[0]*.5,l[1]*.5,!1)),e.focusController.update(i-t);const c=e.coreModel;c.setParameterValueById("ParamEyeBallX",V(c.getParameterValueById("ParamEyeBallX"),l[0],.3)),c.setParameterValueById("ParamEyeBallY",V(c.getParameterValueById("ParamEyeBallY"),l[1],.3))}return{update:d}}const _e=G({__name:"Model",props:{app:null,mouthOpenSize:{default:0},width:null,height:null,paused:{type:Boolean}},setup(o){const l=o,t=T(()=>l.app),d=T(()=>l.paused),e=h(),i=h(0),c=h(0),y=z(()=>Math.max(0,Math.min(100,l.mouthOpenSize))),P=pe(),n=he(Se),g=z(()=>n.between("sm","md").value||n.smaller("sm").value),U=Fe(),I=fe(new se({alpha:.2,blur:0,distance:20,rotation:45}));function W(){return e.value.internalModel.coreModel}function D(a){if(!a.value)return;let r=2.2;g.value&&(r=2.2);const f=l.height*.95/c.value*r,s=l.width*.95/i.value*r,m=Math.min(f,s);a.value.scale.set(m,m)}const{live2dModelFile:b,loadingLive2dModel:M,live2dCurrentMotion:J,availableLive2dMotions:K,live2dLoadSource:S,live2dModelUrl:k,themeColorsHue:Z,themeColorsHueDynamic:_}=me(ge()),ee=h({group:"Idle",index:0});async function ae(){var L;if(!t.value)return;e.value&&(t.value.stage.removeChild(e.value),e.value.destroy(),e.value=void 0);const a=new F;S.value==="file"?await R.setupLive2DModel(a,[b.value]):S.value==="url"&&await R.setupLive2DModel(a,k.value),e.value=a,t.value.stage.addChild(e.value),i.value=e.value.width,c.value=e.value.height,e.value.x=l.width/2,e.value.y=l.height,e.value.rotation=Math.PI,e.value.skew.x=Math.PI,e.value.anchor.set(.5,.5),D(e),e.value.on("hit",v=>{e.value&&v.includes("body")&&e.value.motion("tap_body")});const r=e.value.internalModel,f=r.coreModel,s=r.motionManager;f.setParameterValueById("ParamMouthOpenY",y.value),K.value=Object.entries(s.definitions).flatMap(([v,u])=>u?u.map((ie,ne)=>({motionName:v,motionIndex:ne,fileName:ie.File})):[]).filter(Boolean),s.groups.idle&&((L=s.motionGroups[s.groups.idle])==null||L.forEach(v=>{v._motionData.curves.forEach(u=>{(u.id==="ParamEyeBallX"||u.id==="ParamEyeBallY")&&(u.id=`_${u.id}`)})}));const m=s.update;s.update=function(v,u){return m==null||m.call(this,v,u),s.state.currentGroup===s.groups.idle&&U.update(r,u),!0},s.on("motionStart",(v,u)=>{ee.value={group:v,index:u}}),b.value&&await O.setItem("live2dModel",b.value),M.value=!1}async function te(){if(!t.value)return;F.registerTicker($),C.add(Y),C.add(de);const a=await O.getItem("live2dModel");if(a){b.value=a,S.value="file",M.value=!0;return}if(k.value){S.value="url",M.value=!0;return}M.value=!1}async function le(a,r){await e.value.motion(a,r,ce.FORCE)}const oe=Me(()=>{e.value&&(e.value.x=l.width/2,e.value.y=l.height,D(e))},100),A=h(),w=h(0);function x(){if(e.value){const a=getComputedStyle(A.value).backgroundColor;I.value.color=Number(Ce(a).replace("#","0x")),e.value.filters=[I.value]}}p([()=>l.width,()=>l.height],()=>oe()),p(P,x,{immediate:!0}),p([e,Z],x);function E(){x(),w.value=requestAnimationFrame(E)}return p(_,()=>{_.value?w.value=requestAnimationFrame(E):(cancelAnimationFrame(w.value),w.value=0)},{immediate:!0}),p(y,a=>W().setParameterValueById("ParamMouthOpenY",a)),p(t,te),p(J,a=>le(a.group,a.index)),p(d,a=>{var r,f;a?(r=t.value)==null||r.stop():(f=t.value)==null||f.start()}),we(M,a=>{a&&ae()},{debounce:1e3}),N(x),X(()=>{var a;cancelAnimationFrame(w.value),e.value&&((a=t.value)==null||a.stage.removeChild(e.value))}),(a,r)=>(q(),j(ye,null,[be("div",{ref_key:"dropShadowColorComputer",ref:A,hidden:"",bg:"primary-400 dark:primary-500"},null,512),Q(a.$slots,"default")],64))}});export{_e as _,ke as a,H as r};
|
assets/{ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-C3sxqbyi.js → ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-CHpN3yiY.js}
RENAMED
@@ -1 +1 @@
|
|
1 |
-
import{_ as i}from"./FieldInput.vue_vue_type_script_setup_true_lang-
|
|
|
1 |
+
import{_ as i}from"./FieldInput.vue_vue_type_script_setup_true_lang-CG42zMAq.js";import{d as n,bK as t,q as u,bL as p,h as m,x as c,o as f,e as b}from"./index-hDb1Lsb8.js";const y=n({__name:"ProviderApiKeyInput",props:t({providerName:null,placeholder:null,required:{type:Boolean},label:null,description:null},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const l=e,{t:a}=u(),o=p(e,"modelValue"),d=m(()=>l.description||`API Key for ${l.providerName}`);return(v,r)=>(f(),c(i,{modelValue:o.value,"onUpdate:modelValue":r[0]||(r[0]=s=>o.value=s),label:e.label||b(a)("settings.pages.providers.common.fields.field.api-key.label"),description:d.value,placeholder:e.placeholder,required:e.required,type:"password"},null,8,["modelValue","label","description","placeholder","required"]))}});export{y as _};
|
assets/{ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-CUVIcbSL.js → ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-UCuivhvU.js}
RENAMED
@@ -1 +1 @@
|
|
1 |
-
import{_ as p}from"./Collapsable.vue_vue_type_script_setup_true_lang-
|
|
|
1 |
+
import{_ as p}from"./Collapsable.vue_vue_type_script_setup_true_lang-bS5XNUtd.js";import{d,g as m,x as u,o as c,y as n,a as e,m as f,D as _,z as v,bK as b,bL as g}from"./index-hDb1Lsb8.js";import{_ as V}from"./FieldInput.vue_vue_type_script_setup_true_lang-CG42zMAq.js";const x=["onClick"],h={class:"text-lg text-neutral-500 md:text-2xl dark:text-neutral-400"},y={"mt-4":""},q=d({__name:"ProviderAdvancedSettings",props:{title:null,initialVisible:{type:Boolean}},setup(l){const a=m(l.initialVisible||!1);function r(){a.value=!a.value}return(o,i)=>(c(),u(p,{"w-full":""},{trigger:n(s=>[e("button",{transition:"all ease-in-out duration-250","w-full":"",flex:"","items-center":"","gap-1.5":"","outline-none":"",class:"[&_.provider-icon]:grayscale-100 [&_.provider-icon]:hover:grayscale-0",onClick:()=>s.setVisible(!s.visible)&&r()},[e("h2",h,[e("span",null,_(l.title||"Advanced"),1)]),e("div",{transform:"",transition:"transform duration-250",class:v({"rotate-180":s.visible})},i[0]||(i[0]=[e("div",{"i-solar:alt-arrow-down-bold-duotone":""},null,-1)]),2)],8,x)]),default:n(()=>[e("div",y,[f(o.$slots,"default")])]),_:3}))}}),w=d({__name:"ProviderBaseUrlInput",props:b({placeholder:null,required:{type:Boolean},label:null,description:null},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(l){const t=l,a=g(l,"modelValue");return(r,o)=>(c(),u(V,{modelValue:a.value,"onUpdate:modelValue":o[0]||(o[0]=i=>a.value=i),label:t.label||"Base URL",description:t.description||"Custom base URL (optional)",placeholder:t.placeholder,required:t.required,type:"text"},null,8,["modelValue","label","description","placeholder","required"]))}});export{q as _,w as a};
|
assets/{ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-BCwQg86s.js → ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-CYv3qJbi.js}
RENAMED
@@ -1 +1 @@
|
|
1 |
-
import{d as o,c as s,o as a,a as e,m as i,C as u,D as l}from"./index-
|
|
|
1 |
+
import{d as o,c as s,o as a,a as e,m as i,C as u,D as l}from"./index-hDb1Lsb8.js";const c={flex:"~ col gap-6"},x={flex:"~ row","items-center":"","justify-between":""},f={class:"text-lg text-neutral-500 md:text-2xl dark:text-neutral-400"},m={text:"neutral-400 dark:neutral-500"},g=o({__name:"ProviderBasicSettings",props:{title:null,description:null,onReset:{type:Function}},setup(t){return(r,n)=>(a(),s("div",c,[e("div",x,[e("div",null,[e("h2",f,l(t.title||"Basic"),1),e("div",m,[e("span",null,l(t.description||"Essential settings"),1)])]),t.onReset?(a(),s("button",{key:0,title:"Reset settings",flex:"","items-center":"","justify-center":"","rounded-full":"","p-2":"",transition:"all duration-250 ease-in-out",text:"neutral-500 dark:neutral-400",bg:"transparent dark:transparent hover:neutral-200 dark:hover:neutral-800 active:neutral-300 dark:active:neutral-700",onClick:n[0]||(n[0]=(...d)=>t.onReset&&t.onReset(...d))},n[1]||(n[1]=[e("div",{"i-solar:refresh-bold-duotone":"","text-xl":""},null,-1)]))):u("",!0)]),i(r.$slots,"default")]))}}),p={bg:"neutral-50 dark:[rgba(0,0,0,0.3)]","rounded-xl":"","p-4":"",flex:"~ col gap-6"},k=o({__name:"ProviderSettingsContainer",setup(t){return(r,n)=>(a(),s("div",p,[i(r.$slots,"default")]))}});export{k as _,g as a};
|
assets/{ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-BxRDV7Dm.js → ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-DTOfxlwP.js}
RENAMED
@@ -1 +1 @@
|
|
1 |
-
import{d as s,bw as d,c as n,o as r,A as v,m as u,a as t,D as c,z as x,bx as m}from"./index-
|
|
|
1 |
+
import{d as s,bw as d,c as n,o as r,A as v,m as u,a as t,D as c,z as x,bx as m}from"./index-hDb1Lsb8.js";const p={flex:"~ row","items-center":"","gap-2":"",initial:{opacity:0,x:10},enter:{opacity:1,x:0},leave:{opacity:0,x:-10},duration:250},f={relative:""},k={"text-nowrap":"","text-3xl":"","font-semibold":""},y={text:"neutral-200/50 dark:neutral-600/20","pointer-events-none":"",fixed:"","bottom-0":"","right-0":"","z--1":"","translate-x-10":"","translate-y-10":""},w=s({__name:"ProviderSettingsLayout",props:{providerName:null,providerIcon:null,providerIconColor:null,onBack:{type:Function}},setup(o){return(a,e)=>{const i=d("motion");return r(),n(m,null,[v((r(),n("div",p,[t("button",{onClick:e[0]||(e[0]=(...l)=>o.onBack&&o.onBack(...l))},e[1]||(e[1]=[t("div",{"i-solar:alt-arrow-left-line-duotone":"","text-2xl":""},null,-1)])),t("h1",f,[e[2]||(e[2]=t("div",{absolute:"","left-0":"","top-0":"","translate-y":"[-80%]"},[t("span",{text:"neutral-300 dark:neutral-500","text-nowrap":""},"Provider")],-1)),t("div",k,c(o.providerName),1)])])),[[i]]),u(a.$slots,"default"),t("div",y,[t("div",{text:"40",class:x(o.providerIcon||o.providerIconColor)},null,2)])],64)}}});export{w as _};
|
assets/{RadioCardDetailManySelect-Bn9sPp4x.js → RadioCardDetailManySelect-D3zSF9Ox.js}
RENAMED
@@ -1 +1 @@
|
|
1 |
-
import{d as g,bK as f,bL as w,g as b,c as n,o as d,z as o,A as V,a as t,bA as B,C as v,D as c,b as $,y as M,bJ as k,bn as C,h as S,bE as T,bx as z,by as D,x as E}from"./index-7-fr_lhT.js";import{_ as N}from"./TransitionVertical.vue_vue_type_script_setup_true_lang-BNzPx9yx.js";import{_ as L}from"./Input.vue_vue_type_script_setup_true_lang-58p3G1RX.js";const P=["checked","name","value"],U={class:"relative mr-3 mt-0.5 flex-shrink-0"},q={class:"w-full flex flex-col gap-2"},j={class:"flex items-center"},A={key:0,class:"relative"},F=["title"],J={key:1,class:"mt-2"},K=g({__name:"RadioCardDetail",props:f({id:null,name:null,value:null,title:null,description:null,deprecated:{type:Boolean,default:!1},showExpandCollapse:{type:Boolean,default:!0},expandCollapseThreshold:{default:100},customInputValue:{default:""},customInputPlaceholder:{default:""},showCustomInput:{type:Boolean,default:!1}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const a=w(e,"modelValue"),m=b(!1);function s(){m.value=!m.value}return(x,r)=>(d(),n("label",{key:e.id,class:o(["form_radio-card-detail relative flex cursor-pointer items-start rounded-xl p-3 pr-[20px]",[a.value===e.value?"bg-primary-50 dark:bg-primary-900/20 border-primary-100 dark:border-primary-900 hover:border-primary-500/30 dark:hover:border-primary-400/30":"bg-white dark:bg-neutral-900/20 border-neutral-100 dark:border-neutral-900 hover:border-primary-500/30 dark:hover:border-primary-400/30",a.value===e.value?"form_radio-card-detail-active":"",e.deprecated?"opacity-60":""]]),transition:"all duration-200 ease-in-out",border:"2 solid"},[V(t("input",{"onUpdate:modelValue":r[0]||(r[0]=i=>a.value=i),checked:a.value===e.value,type:"radio",name:e.name,value:e.value,class:"absolute opacity-0"},null,8,P),[[B,a.value]]),t("div",U,[t("div",{class:o(["size-5 border-2 rounded-full transition-colors duration-200",[a.value===e.value?"border-primary-500 dark:border-primary-400":"border-neutral-300 dark:border-neutral-600"]])},[t("div",{class:o(["absolute left-1/2 top-1/2 size-3 rounded-full transition-opacity duration-200 -translate-x-1/2 -translate-y-1/2",[a.value===e.value?"opacity-100 bg-primary-500 dark:bg-primary-400":"opacity-0"]])},null,2)],2)]),t("div",q,[t("div",j,[t("span",{class:o(["line-clamp-1 font-medium",[a.value===e.value?"text-neutral-700 dark:text-neutral-300":"text-neutral-700 dark:text-neutral-400"]])},c(e.title),3)]),e.description?(d(),n("div",A,[$(N,null,{default:M(()=>[!m.value||!e.showExpandCollapse?(d(),n("div",{key:0,class:o(["line-clamp-2 cursor-pointer text-xs",[a.value===e.value?"text-neutral-600 dark:text-neutral-400":"text-neutral-500 dark:text-neutral-500"]]),title:e.description,onClick:k(s,["prevent"])},c(e.description),11,F)):(d(),n("div",{key:1,class:o(["cursor-pointer text-xs",[a.value===e.value?"text-neutral-600 dark:text-neutral-400":"text-neutral-500 dark:text-neutral-500"]]),onClick:k(s,["prevent"])},c(e.description),3))]),_:1}),e.showExpandCollapse&&e.description.length>e.expandCollapseThreshold?(d(),n("button",{key:0,class:"text-primary-500 dark:text-primary-600 mt-0.5 inline-flex items-center text-xs",onClick:k(s,["prevent"])},[t("span",null,c(m.value?"Show less":"Show more"),1),t("div",{class:o([{"rotate-180":m.value},"transition-transform duration-200"])},r[2]||(r[2]=[t("div",{"i-solar:alt-arrow-down-bold-duotone":"","ml-0.5":"","text-xs":""},null,-1)]),2)])):v("",!0)])):v("",!0),e.showCustomInput&&a.value===e.value?(d(),n("div",J,[$(L,{modelValue:a.value,"onUpdate:modelValue":r[1]||(r[1]=i=>a.value=i),type:"text",class:"w-full border border-neutral-300 rounded bg-white px-2 py-1 text-sm dark:border-neutral-700 dark:bg-neutral-900",placeholder:e.customInputPlaceholder},null,8,["modelValue","placeholder"])])):v("",!0)])],2))}}),Q=C(K,[["__scopeId","data-v-c9195151"]]),G=["checked","name","value"],H={flex:"~ col","min-h-16":"","w-full":"","items-start":"","justify-center":"","pb-2":"","pl-5":"","pr-4":"","pt-2":""},O=g({__name:"RadioCardSimple",props:f({id:null,name:null,value:null,title:null,description:null},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const a=w(e,"modelValue");return(m,s)=>(d(),n("label",{key:e.id,border:"2px solid",class:o(["form_radio-card-simple relative",[a.value===e.value?"bg-primary-50 dark:bg-primary-900/20 border-primary-100 dark:border-primary-900 hover:border-primary-500/30 dark:hover:border-primary-400/30":"bg-white dark:bg-neutral-900/20 border-neutral-100 dark:border-neutral-900 hover:border-primary-500/30 dark:hover:border-primary-400/30",a.value===e.value?"form_radio-card-simple-active":""]]),transition:"all duration-200 ease-in-out",flex:"~ col",block:"","min-w-50":"","w-fit":"","cursor-pointer":"","items-start":"","rounded-xl":"","p-4":"","text-left":""},[V(t("input",{"onUpdate:modelValue":s[0]||(s[0]=x=>a.value=x),checked:a.value===e.value,type:"radio",name:e.name,value:e.value,class:"[&:checked+div]:border-primary-500 dark:[&:checked+div]:border-primary-400 absolute opacity-0 [&:checked+div_.radio-dot]:opacity-100"},null,8,G),[[B,a.value]]),s[1]||(s[1]=t("div",{class:"radio-circle absolute left-2 top-2 size-5 rounded-full",border:"2 solid neutral-300 dark:neutral-600",transition:"all duration-200 ease-in-out"},[t("div",{class:"radio-dot absolute left-1/2 top-1/2 size-3 rounded-full opacity-0 -translate-x-1/2 -translate-y-1/2",transition:"all duration-200 ease-in-out",bg:"primary-500 dark:primary-400"})],-1)),t("div",H,[t("span",{class:o(["radio-item-name font-bold",[a.value===e.value?"text-neutral-700 dark:text-neutral-300":"text-neutral-500 dark:text-neutral-500"]]),text:"md",transition:"all duration-200 ease-in-out"},c(e.title),3),e.description?(d(),n("span",{key:0,class:o(["radio-item-description",[a.value===e.value?"text-neutral-600 dark:text-neutral-400":"text-neutral-400 dark:text-neutral-600"]]),transition:"all duration-200 ease-in-out"},c(e.description),3)):v("",!0)]),s[2]||(s[2]=t("div",{class:"bg-dotted-neutral-200/80 dark:bg-dotted-neutral-700/50 [input:checked~&]:bg-dotted-primary-300/50 dark:[input:checked~&]:bg-dotted-primary-200/20",absolute:"","inset-0":"","z--1":"",style:{"background-size":"10px 10px","mask-image":"linear-gradient(165deg, white 30%, transparent 50%)"}},null,-1))],2))}}),ie=C(O,[["__scopeId","data-v-dd41bc0b"]]),W={class:"radio-card-detail-many-select"},X={key:0,class:"relative","inline-flex":"~","w-full":"","items-center":""},Y=["placeholder"],Z={class:"mt-4 space-y-2"},_={key:0,class:"text-sm text-neutral-500 dark:text-neutral-400"},ee={key:1,class:"flex items-center gap-3 border border-2 border-amber-200 rounded-xl bg-amber-50 p-4 dark:border-amber-800 dark:bg-amber-900/20"},te={class:"flex flex-col"},ae={class:"font-medium"},le={class:"text-sm text-amber-600 dark:text-amber-400"},re={class:"relative"},oe=g({__name:"RadioCardDetailManySelect",props:f({items:null,searchable:{type:Boolean,default:!0},searchPlaceholder:{default:"Search..."},searchNoResultsTitle:{default:"No results found"},searchNoResultsDescription:{default:"Try a different search term"},searchResultsText:{default:"{count} of {total} results"},customInputPlaceholder:{default:"Enter custom value"},expandButtonText:{default:"Show more"},collapseButtonText:{default:"Show less"},showMore:{type:Boolean,default:!0}},{modelValue:{required:!0},modelModifiers:{}}),emits:f(["update:customValue"],["update:modelValue"]),setup(e,{emit:a}){const m=e,s=a,x=w(e,"modelValue"),r=b(""),i=b(!1),R=b(""),h=S(()=>{if(!r.value)return m.items;const p=r.value.toLowerCase();return m.items.filter(l=>l.name.toLowerCase().includes(p)||l.description&&l.description.toLowerCase().includes(p))});function I(p){R.value=p,s("update:customValue",p)}return(p,l)=>(d(),n("div",W,[e.searchable?(d(),n("div",X,[l[4]||(l[4]=t("div",{class:"pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3"},[t("div",{"i-solar:magnifer-line-duotone":"",class:"text-neutral-500 dark:text-neutral-400"})],-1)),V(t("input",{"onUpdate:modelValue":l[0]||(l[0]=u=>r.value=u),type:"search",class:"w-full rounded-xl p-2.5 pl-10 text-sm outline-none",border:"focus:primary-100 dark:focus:primary-400/50 2 solid neutral-200 dark:neutral-800",transition:"all duration-200 ease-in-out",bg:"white dark:neutral-900",placeholder:e.searchPlaceholder},null,8,Y),[[T,r.value]])])):v("",!0),t("div",Z,[r.value?(d(),n("div",_,c(e.searchResultsText.replace("{count}",h.value.length.toString()).replace("{total}",e.items.length.toString())),1)):v("",!0),r.value&&h.value.length===0?(d(),n("div",ee,[l[5]||(l[5]=t("div",{"i-solar:info-circle-line-duotone":"",class:"text-2xl text-amber-500 dark:text-amber-400"},null,-1)),t("div",te,[t("span",ae,c(e.searchNoResultsTitle),1),t("span",le,c(e.searchNoResultsDescription.replace("{query}",r.value)),1)])])):v("",!0),t("div",re,[t("div",{class:o(["scrollbar-hide grid auto-cols-[350px] grid-flow-col max-h-[calc(100dvh-7lh)] gap-4 overflow-x-auto pb-4",[i.value?"grid-cols-1 md:grid-cols-2 grid-flow-row auto-cols-auto":""]]),transition:"all duration-200 ease-in-out",style:{"scroll-snap-type":"x mandatory"}},[(d(!0),n(z,null,D(h.value,u=>(d(),E(Q,{id:u.id,key:u.id,modelValue:x.value,"onUpdate:modelValue":l[1]||(l[1]=y=>x.value=y),value:u.id,title:u.name,description:u.description,deprecated:u.deprecated,"show-expand-collapse":e.showMore,"expand-collapse-threshold":100,"show-custom-input":u.customizable,"custom-input-value":R.value,"custom-input-placeholder":e.customInputPlaceholder,name:"radio-card-detail-many-select",class:"scroll-snap-align-start","onUpdate:customInputValue":l[2]||(l[2]=y=>I(y))},null,8,["id","modelValue","value","title","description","deprecated","show-expand-collapse","show-custom-input","custom-input-value","custom-input-placeholder"]))),128))],2),t("div",{bg:"neutral-100 dark:[rgba(0,0,0,0.3)]","rounded-xl":"",class:o([i.value?"w-full":"mt-4 w-full rounded-lg"])},[t("button",{"w-full":"",flex:"","items-center":"","justify-center":"","gap-2":"","rounded-lg":"","py-2":"",transition:"all duration-200 ease-in-out",class:o([i.value?"bg-primary-500 hover:bg-primary-600 text-white":"bg-white dark:bg-neutral-900 hover:bg-neutral-100 dark:hover:bg-neutral-800"]),onClick:l[3]||(l[3]=u=>i.value=!i.value)},[t("span",null,c(i.value?e.collapseButtonText:e.expandButtonText),1),t("div",{class:o([i.value?"rotate-180":"","text-lg"]),"i-solar:alt-arrow-down-bold-duotone":"",transition:"transform duration-200 ease-in-out"},null,2)],2)],2)])])]))}}),ue=C(oe,[["__scopeId","data-v-0c2329bf"]]);export{ue as R,ie as a};
|
|
|
1 |
+
import{d as g,bK as f,bL as w,g as b,c as n,o as d,z as o,A as V,a as t,bA as B,C as v,D as c,b as $,y as M,bJ as k,bn as C,h as S,bE as T,bx as z,by as D,x as E}from"./index-hDb1Lsb8.js";import{_ as N}from"./TransitionVertical.vue_vue_type_script_setup_true_lang-BTGItw4h.js";import{_ as L}from"./Input.vue_vue_type_script_setup_true_lang-DGnmLgZc.js";const P=["checked","name","value"],U={class:"relative mr-3 mt-0.5 flex-shrink-0"},q={class:"w-full flex flex-col gap-2"},j={class:"flex items-center"},A={key:0,class:"relative"},F=["title"],J={key:1,class:"mt-2"},K=g({__name:"RadioCardDetail",props:f({id:null,name:null,value:null,title:null,description:null,deprecated:{type:Boolean,default:!1},showExpandCollapse:{type:Boolean,default:!0},expandCollapseThreshold:{default:100},customInputValue:{default:""},customInputPlaceholder:{default:""},showCustomInput:{type:Boolean,default:!1}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const a=w(e,"modelValue"),m=b(!1);function s(){m.value=!m.value}return(x,r)=>(d(),n("label",{key:e.id,class:o(["form_radio-card-detail relative flex cursor-pointer items-start rounded-xl p-3 pr-[20px]",[a.value===e.value?"bg-primary-50 dark:bg-primary-900/20 border-primary-100 dark:border-primary-900 hover:border-primary-500/30 dark:hover:border-primary-400/30":"bg-white dark:bg-neutral-900/20 border-neutral-100 dark:border-neutral-900 hover:border-primary-500/30 dark:hover:border-primary-400/30",a.value===e.value?"form_radio-card-detail-active":"",e.deprecated?"opacity-60":""]]),transition:"all duration-200 ease-in-out",border:"2 solid"},[V(t("input",{"onUpdate:modelValue":r[0]||(r[0]=i=>a.value=i),checked:a.value===e.value,type:"radio",name:e.name,value:e.value,class:"absolute opacity-0"},null,8,P),[[B,a.value]]),t("div",U,[t("div",{class:o(["size-5 border-2 rounded-full transition-colors duration-200",[a.value===e.value?"border-primary-500 dark:border-primary-400":"border-neutral-300 dark:border-neutral-600"]])},[t("div",{class:o(["absolute left-1/2 top-1/2 size-3 rounded-full transition-opacity duration-200 -translate-x-1/2 -translate-y-1/2",[a.value===e.value?"opacity-100 bg-primary-500 dark:bg-primary-400":"opacity-0"]])},null,2)],2)]),t("div",q,[t("div",j,[t("span",{class:o(["line-clamp-1 font-medium",[a.value===e.value?"text-neutral-700 dark:text-neutral-300":"text-neutral-700 dark:text-neutral-400"]])},c(e.title),3)]),e.description?(d(),n("div",A,[$(N,null,{default:M(()=>[!m.value||!e.showExpandCollapse?(d(),n("div",{key:0,class:o(["line-clamp-2 cursor-pointer text-xs",[a.value===e.value?"text-neutral-600 dark:text-neutral-400":"text-neutral-500 dark:text-neutral-500"]]),title:e.description,onClick:k(s,["prevent"])},c(e.description),11,F)):(d(),n("div",{key:1,class:o(["cursor-pointer text-xs",[a.value===e.value?"text-neutral-600 dark:text-neutral-400":"text-neutral-500 dark:text-neutral-500"]]),onClick:k(s,["prevent"])},c(e.description),3))]),_:1}),e.showExpandCollapse&&e.description.length>e.expandCollapseThreshold?(d(),n("button",{key:0,class:"text-primary-500 dark:text-primary-600 mt-0.5 inline-flex items-center text-xs",onClick:k(s,["prevent"])},[t("span",null,c(m.value?"Show less":"Show more"),1),t("div",{class:o([{"rotate-180":m.value},"transition-transform duration-200"])},r[2]||(r[2]=[t("div",{"i-solar:alt-arrow-down-bold-duotone":"","ml-0.5":"","text-xs":""},null,-1)]),2)])):v("",!0)])):v("",!0),e.showCustomInput&&a.value===e.value?(d(),n("div",J,[$(L,{modelValue:a.value,"onUpdate:modelValue":r[1]||(r[1]=i=>a.value=i),type:"text",class:"w-full border border-neutral-300 rounded bg-white px-2 py-1 text-sm dark:border-neutral-700 dark:bg-neutral-900",placeholder:e.customInputPlaceholder},null,8,["modelValue","placeholder"])])):v("",!0)])],2))}}),Q=C(K,[["__scopeId","data-v-c9195151"]]),G=["checked","name","value"],H={flex:"~ col","min-h-16":"","w-full":"","items-start":"","justify-center":"","pb-2":"","pl-5":"","pr-4":"","pt-2":""},O=g({__name:"RadioCardSimple",props:f({id:null,name:null,value:null,title:null,description:null},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const a=w(e,"modelValue");return(m,s)=>(d(),n("label",{key:e.id,border:"2px solid",class:o(["form_radio-card-simple relative",[a.value===e.value?"bg-primary-50 dark:bg-primary-900/20 border-primary-100 dark:border-primary-900 hover:border-primary-500/30 dark:hover:border-primary-400/30":"bg-white dark:bg-neutral-900/20 border-neutral-100 dark:border-neutral-900 hover:border-primary-500/30 dark:hover:border-primary-400/30",a.value===e.value?"form_radio-card-simple-active":""]]),transition:"all duration-200 ease-in-out",flex:"~ col",block:"","min-w-50":"","w-fit":"","cursor-pointer":"","items-start":"","rounded-xl":"","p-4":"","text-left":""},[V(t("input",{"onUpdate:modelValue":s[0]||(s[0]=x=>a.value=x),checked:a.value===e.value,type:"radio",name:e.name,value:e.value,class:"[&:checked+div]:border-primary-500 dark:[&:checked+div]:border-primary-400 absolute opacity-0 [&:checked+div_.radio-dot]:opacity-100"},null,8,G),[[B,a.value]]),s[1]||(s[1]=t("div",{class:"radio-circle absolute left-2 top-2 size-5 rounded-full",border:"2 solid neutral-300 dark:neutral-600",transition:"all duration-200 ease-in-out"},[t("div",{class:"radio-dot absolute left-1/2 top-1/2 size-3 rounded-full opacity-0 -translate-x-1/2 -translate-y-1/2",transition:"all duration-200 ease-in-out",bg:"primary-500 dark:primary-400"})],-1)),t("div",H,[t("span",{class:o(["radio-item-name font-bold",[a.value===e.value?"text-neutral-700 dark:text-neutral-300":"text-neutral-500 dark:text-neutral-500"]]),text:"md",transition:"all duration-200 ease-in-out"},c(e.title),3),e.description?(d(),n("span",{key:0,class:o(["radio-item-description",[a.value===e.value?"text-neutral-600 dark:text-neutral-400":"text-neutral-400 dark:text-neutral-600"]]),transition:"all duration-200 ease-in-out"},c(e.description),3)):v("",!0)]),s[2]||(s[2]=t("div",{class:"bg-dotted-neutral-200/80 dark:bg-dotted-neutral-700/50 [input:checked~&]:bg-dotted-primary-300/50 dark:[input:checked~&]:bg-dotted-primary-200/20",absolute:"","inset-0":"","z--1":"",style:{"background-size":"10px 10px","mask-image":"linear-gradient(165deg, white 30%, transparent 50%)"}},null,-1))],2))}}),ie=C(O,[["__scopeId","data-v-dd41bc0b"]]),W={class:"radio-card-detail-many-select"},X={key:0,class:"relative","inline-flex":"~","w-full":"","items-center":""},Y=["placeholder"],Z={class:"mt-4 space-y-2"},_={key:0,class:"text-sm text-neutral-500 dark:text-neutral-400"},ee={key:1,class:"flex items-center gap-3 border border-2 border-amber-200 rounded-xl bg-amber-50 p-4 dark:border-amber-800 dark:bg-amber-900/20"},te={class:"flex flex-col"},ae={class:"font-medium"},le={class:"text-sm text-amber-600 dark:text-amber-400"},re={class:"relative"},oe=g({__name:"RadioCardDetailManySelect",props:f({items:null,searchable:{type:Boolean,default:!0},searchPlaceholder:{default:"Search..."},searchNoResultsTitle:{default:"No results found"},searchNoResultsDescription:{default:"Try a different search term"},searchResultsText:{default:"{count} of {total} results"},customInputPlaceholder:{default:"Enter custom value"},expandButtonText:{default:"Show more"},collapseButtonText:{default:"Show less"},showMore:{type:Boolean,default:!0}},{modelValue:{required:!0},modelModifiers:{}}),emits:f(["update:customValue"],["update:modelValue"]),setup(e,{emit:a}){const m=e,s=a,x=w(e,"modelValue"),r=b(""),i=b(!1),R=b(""),h=S(()=>{if(!r.value)return m.items;const p=r.value.toLowerCase();return m.items.filter(l=>l.name.toLowerCase().includes(p)||l.description&&l.description.toLowerCase().includes(p))});function I(p){R.value=p,s("update:customValue",p)}return(p,l)=>(d(),n("div",W,[e.searchable?(d(),n("div",X,[l[4]||(l[4]=t("div",{class:"pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3"},[t("div",{"i-solar:magnifer-line-duotone":"",class:"text-neutral-500 dark:text-neutral-400"})],-1)),V(t("input",{"onUpdate:modelValue":l[0]||(l[0]=u=>r.value=u),type:"search",class:"w-full rounded-xl p-2.5 pl-10 text-sm outline-none",border:"focus:primary-100 dark:focus:primary-400/50 2 solid neutral-200 dark:neutral-800",transition:"all duration-200 ease-in-out",bg:"white dark:neutral-900",placeholder:e.searchPlaceholder},null,8,Y),[[T,r.value]])])):v("",!0),t("div",Z,[r.value?(d(),n("div",_,c(e.searchResultsText.replace("{count}",h.value.length.toString()).replace("{total}",e.items.length.toString())),1)):v("",!0),r.value&&h.value.length===0?(d(),n("div",ee,[l[5]||(l[5]=t("div",{"i-solar:info-circle-line-duotone":"",class:"text-2xl text-amber-500 dark:text-amber-400"},null,-1)),t("div",te,[t("span",ae,c(e.searchNoResultsTitle),1),t("span",le,c(e.searchNoResultsDescription.replace("{query}",r.value)),1)])])):v("",!0),t("div",re,[t("div",{class:o(["scrollbar-hide grid auto-cols-[350px] grid-flow-col max-h-[calc(100dvh-7lh)] gap-4 overflow-x-auto pb-4",[i.value?"grid-cols-1 md:grid-cols-2 grid-flow-row auto-cols-auto":""]]),transition:"all duration-200 ease-in-out",style:{"scroll-snap-type":"x mandatory"}},[(d(!0),n(z,null,D(h.value,u=>(d(),E(Q,{id:u.id,key:u.id,modelValue:x.value,"onUpdate:modelValue":l[1]||(l[1]=y=>x.value=y),value:u.id,title:u.name,description:u.description,deprecated:u.deprecated,"show-expand-collapse":e.showMore,"expand-collapse-threshold":100,"show-custom-input":u.customizable,"custom-input-value":R.value,"custom-input-placeholder":e.customInputPlaceholder,name:"radio-card-detail-many-select",class:"scroll-snap-align-start","onUpdate:customInputValue":l[2]||(l[2]=y=>I(y))},null,8,["id","modelValue","value","title","description","deprecated","show-expand-collapse","show-custom-input","custom-input-value","custom-input-placeholder"]))),128))],2),t("div",{bg:"neutral-100 dark:[rgba(0,0,0,0.3)]","rounded-xl":"",class:o([i.value?"w-full":"mt-4 w-full rounded-lg"])},[t("button",{"w-full":"",flex:"","items-center":"","justify-center":"","gap-2":"","rounded-lg":"","py-2":"",transition:"all duration-200 ease-in-out",class:o([i.value?"bg-primary-500 hover:bg-primary-600 text-white":"bg-white dark:bg-neutral-900 hover:bg-neutral-100 dark:hover:bg-neutral-800"]),onClick:l[3]||(l[3]=u=>i.value=!i.value)},[t("span",null,c(i.value?e.collapseButtonText:e.expandButtonText),1),t("div",{class:o([i.value?"rotate-180":"","text-lg"]),"i-solar:alt-arrow-down-bold-duotone":"",transition:"transform duration-200 ease-in-out"},null,2)],2)],2)])])]))}}),ue=C(oe,[["__scopeId","data-v-0c2329bf"]]);export{ue as R,ie as a};
|
assets/{SpeechVoiceSettings.vue_vue_type_script_setup_true_lang-DW1qhqmX.js → SpeechVoiceSettings.vue_vue_type_script_setup_true_lang-D0Yiu-Ma.js}
RENAMED
@@ -1 +1 @@
|
|
1 |
-
import{d as N,q as E,h as R,bw as ie,c as h,o as d,m as U,a as t,z as Y,A as q,C as V,D as k,g as x,w as D,H as Z,b as M,e,bE as G,bH as H,bx as J,by as Q,bG as re,s as ne,l as de,x as I,y as z,bT as W,bU as X,bP as ue,bK as ve,bL as T}from"./index-7-fr_lhT.js";import{b as pe,a as ee,_ as C}from"./TestDummyMarker.vue_vue_type_script_setup_true_lang-OSsy22LU.js";import"./live2d-zip-loader-dDw0Wbbr.js";import{u as ce,g as me}from"./speech-DK9my_xu.js";import{u as fe}from"./providers-B7zWTIWF.js";import{_ as ge,a as be}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-CUVIcbSL.js";import{_ as ye}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-C3sxqbyi.js";import{_ as xe,a as he}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-BCwQg86s.js";const ke={flex:"~ row",initial:{opacity:0,x:10},enter:{opacity:1,x:0},leave:{opacity:0,x:-10},duration:250,"mb-6":"","items-center":"","gap-3":""},Se={relative:""},Ve={key:0,absolute:"","left-0":"","top-0":"","translate-y":"[-80%]"},we={text:"neutral-300 dark:neutral-500","text-nowrap":""},Ue={"text-nowrap":"","text-3xl":"","font-semibold":""},$e={key:0,"text-sm":"",text:"neutral-500 dark:neutral-400"},_e={text:"neutral-200/50 dark:neutral-600/20","pointer-events-none":"",fixed:"","bottom-0":"","right-0":"","z--1":"","translate-x-10":"","translate-y-10":""},Be=N({__name:"ProviderSettingsLayout2",props:{providerName:null,providerIcon:null,providerIconColor:null,onBack:{type:Function},title:null,subtitle:null,categoryLabel:null},emits:["back"],setup(a,{emit:i}){const b=a,c=i,{t:y}=E(),w=R(()=>b.title||b.providerName||""),s=R(()=>b.categoryLabel||y("settings.pages.providers.title"));function f(){b.onBack&&b.onBack(),c("back")}return(l,v)=>{const r=ie("motion");return d(),h("div",null,[U(l.$slots,"header",{},()=>[q((d(),h("div",ke,[U(l.$slots,"backButton",{},()=>[t("button",{onClick:f},v[0]||(v[0]=[t("div",{"i-solar:alt-arrow-left-line-duotone":"","text-2xl":""},null,-1)]))]),t("div",null,[U(l.$slots,"title",{},()=>[t("h1",Se,[s.value?(d(),h("div",Ve,[t("span",we,k(s.value),1)])):V("",!0),t("div",Ue,k(w.value),1)])]),U(l.$slots,"subtitle",{},()=>[a.subtitle?(d(),h("div",$e,k(a.subtitle),1)):V("",!0)])]),U(l.$slots,"headerExtra")])),[[r]])]),U(l.$slots,"default"),t("div",_e,[t("div",{text:"40",class:Y(a.providerIcon||a.providerIconColor)},null,2)])])}}}),Ie={"w-full":"","rounded-xl":""},Le={class:"mb-4 text-lg text-neutral-500 md:text-2xl dark:text-neutral-400","w-full":""},Te={class:"inline-flex items-center gap-4"},Me={flex:"~ col gap-4"},Pe=["placeholder"],Ce=["placeholder"],Re={flex:"~ col gap-6"},Oe={grid:"~ cols-2 gap-4"},qe={class:"flex items-center gap-1 text-sm font-medium"},Ke={class:"text-xs text-neutral-500 dark:text-neutral-400"},ze=["value"],Ne={grid:"~ cols-2 gap-4"},Ee={class:"flex items-center gap-1 text-sm font-medium"},je={class:"text-xs text-neutral-500 dark:text-neutral-400"},De=["value"],Fe={flex:"~ row","gap-4":""},Ae=["disabled"],Ge={flex:"~ row","items-center":"","gap-2":""},He={flex:"~ row","items-center":"","gap-2":""},Je={key:2,class:"mt-2 text-sm text-red-500"},Qe={key:3,class:"mt-2 text-sm text-red-500"},We={key:4,class:"mt-2 text-sm text-red-500"},Xe=["src"],ct=N({__name:"SpeechPlayground",props:{defaultText:null,availableVoices:null,availableLanguages:null,generateSpeech:{type:Function},apiKeyConfigured:{type:Boolean}},setup(a,{expose:i}){const b=a,{t:c}=E(),y=x(b.defaultText||"Hello! This is a test of the voice synthesis."),w=x(!1),s=x(""),f=x(""),l=x(null),v=x(!1),r=x(""),n=x(b.availableLanguages[0]||"en-US"),g=x("");D(()=>b.availableVoices,S=>{var p;S.length>0&&!g.value&&(g.value=((p=S[0])==null?void 0:p.id)||"")},{immediate:!0});async function P(){if(!(!y.value.trim()&&!v.value||v.value&&!r.value.trim()||!g.value)){w.value=!0,f.value="";try{s.value&&$();const S=v.value?r.value:y.value,p=await b.generateSpeech(S,g.value,v.value);s.value=URL.createObjectURL(new Blob([p])),setTimeout(()=>{l.value&&l.value.play()},100)}catch(S){console.error("Error generating speech:",S),f.value=S instanceof Error?S.message:"An unknown error occurred"}finally{w.value=!1}}}function $(){l.value&&(l.value.pause(),l.value.currentTime=0),s.value&&(URL.revokeObjectURL(s.value),s.value="")}return Z(()=>{s.value&&URL.revokeObjectURL(s.value)}),i({testText:y,ssmlText:r,useSSML:v,selectedLanguage:n,selectedVoice:g,isGenerating:w,audioUrl:s,errorMessage:f,audioPlayer:l,generateTestSpeech:P,stopTestAudio:$}),(S,p)=>(d(),h("div",Ie,[t("h2",Le,[t("div",Te,[M(e(pe)),t("div",null,k(e(c)("settings.pages.providers.provider.elevenlabs.playground.title")),1)])]),t("div",Me,[M(e(ee),{modelValue:v.value,"onUpdate:modelValue":p[0]||(p[0]=m=>v.value=m),label:e(c)("settings.pages.modules.speech.sections.section.voice-settings.use-ssml.label"),description:e(c)("settings.pages.modules.speech.sections.section.voice-settings.use-ssml.description")},null,8,["modelValue","label","description"]),v.value?q((d(),h("textarea",{key:1,"onUpdate:modelValue":p[2]||(p[2]=m=>r.value=m),placeholder:e(c)("settings.pages.modules.speech.sections.section.voice-settings.input-ssml.placeholder"),border:"neutral-100 dark:neutral-800 solid 2 focus:neutral-200 dark:focus:neutral-700",transition:"all duration-250 ease-in-out",bg:"neutral-100 dark:neutral-800 focus:neutral-50 dark:focus:neutral-900","h-48":"","w-full":"","rounded-lg":"","px-3":"","py-2":"","text-sm":"","font-mono":"","outline-none":""},null,8,Ce)),[[G,r.value]]):q((d(),h("textarea",{key:0,"onUpdate:modelValue":p[1]||(p[1]=m=>y.value=m),placeholder:e(c)("settings.pages.providers.provider.elevenlabs.playground.fields.field.input.placeholder"),border:"neutral-100 dark:neutral-800 solid 2 focus:neutral-200 dark:focus:neutral-700",transition:"all duration-250 ease-in-out",bg:"neutral-100 dark:neutral-800 focus:neutral-50 dark:focus:neutral-900","h-24":"","w-full":"","rounded-lg":"","px-3":"","py-2":"","text-sm":"","outline-none":""},null,8,Pe)),[[G,y.value]]),t("div",Re,[t("label",Oe,[t("div",null,[t("div",qe,k(e(c)("settings.pages.providers.provider.elevenlabs.playground.fields.field.language.label")),1),t("div",Ke,k(e(c)("settings.pages.providers.provider.elevenlabs.playground.fields.field.language.description")),1)]),q(t("select",{"onUpdate:modelValue":p[3]||(p[3]=m=>n.value=m),border:"neutral-300 dark:neutral-800 solid 2 focus:neutral-400 dark:focus:neutral-600",transition:"border duration-250 ease-in-out","w-full":"","rounded-lg":"","px-2":"","py-1":"","text-nowrap":"","text-sm":"","outline-none":""},[(d(!0),h(J,null,Q(a.availableLanguages,m=>(d(),h("option",{key:m,value:m},k(m),9,ze))),128))],512),[[H,n.value]])]),t("label",Ne,[t("div",null,[t("div",Ee,k(e(c)("settings.pages.providers.provider.elevenlabs.playground.fields.field.voice.label")),1),t("div",je,k(e(c)("settings.pages.providers.provider.elevenlabs.playground.fields.field.voice.description")),1)]),q(t("select",{"onUpdate:modelValue":p[4]||(p[4]=m=>g.value=m),border:"neutral-300 dark:neutral-800 solid 2 focus:neutral-400 dark:focus:neutral-600",transition:"border duration-250 ease-in-out","w-full":"","rounded-lg":"","px-2":"","py-1":"","text-nowrap":"","text-sm":"","outline-none":""},[(d(!0),h(J,null,Q(a.availableVoices,m=>(d(),h("option",{key:m.id,value:m.id},k(m.name),9,De))),128))],512),[[H,g.value]])])]),t("div",Fe,[t("button",{border:"neutral-800 dark:neutral-200 solid 2",transition:"border duration-250 ease-in-out","rounded-lg":"","px-4":"",text:"neutral-100 dark:neutral-900","py-2":"","text-sm":"",disabled:w.value||!y.value.trim()&&!v.value||v.value&&!r.value.trim()||!g.value||!a.apiKeyConfigured,class:Y({"opacity-50 cursor-not-allowed":w.value||!y.value.trim()&&!v.value||v.value&&!r.value.trim()||!g.value||!a.apiKeyConfigured}),bg:"neutral-700 dark:neutral-300",onClick:P},[t("div",Ge,[p[5]||(p[5]=t("div",{"i-solar:play-circle-bold-duotone":""},null,-1)),t("span",null,k(w.value?e(c)("settings.pages.providers.provider.elevenlabs.playground.buttons.button.test-voice.generating"):e(c)("settings.pages.providers.provider.elevenlabs.playground.buttons.button.test-voice.label")),1)])],10,Ae),s.value?(d(),h("button",{key:0,border:"primary-300 dark:primary-800 solid 2",transition:"border duration-250 ease-in-out","rounded-lg":"","px-4":"","py-2":"","text-sm":"",onClick:$},[t("div",He,[p[6]||(p[6]=t("div",{"i-solar:stop-circle-bold-duotone":""},null,-1)),t("span",null,k(e(c)("settings.pages.modules.speech.sections.section.playground.buttons.stop.label")),1)])])):V("",!0)]),a.apiKeyConfigured?V("",!0):(d(),h("div",Je,k(e(c)("settings.pages.providers.provider.elevenlabs.playground.validation.error-missing-api-key")),1)),g.value?V("",!0):(d(),h("div",Qe,k(e(c)("settings.pages.modules.speech.sections.section.playground.select-voice.required")),1)),f.value?(d(),h("div",We,k(f.value),1)):V("",!0),s.value?(d(),h("audio",{key:5,ref_key:"audioPlayer",ref:l,src:s.value,controls:"",class:"mt-2 w-full"},null,8,Xe)):V("",!0)]),U(S.$slots,"default")]))}}),Ye={flex:"~ col md:row gap-6"},Ze={flex:"~ col gap-6"},et={class:"text-lg text-neutral-500 md:text-2xl dark:text-neutral-400"},tt={flex:"~ col gap-4"},lt={flex:"~ col gap-6",class:"w-full md:w-[60%]"},st={"w-full":"","rounded-xl":""},mt=N({__name:"SpeechProviderSettings",props:{providerId:null,defaultModel:null,additionalSettings:null},setup(a){const i=a,{t:b}=E(),c=re(),y=fe(),w=ce(),{providers:s}=ne(y),f=R(()=>y.getProviderMetadata(i.providerId)),l=R({get:()=>{var o;return((o=s.value[i.providerId])==null?void 0:o.apiKey)||""},set:o=>{s.value[i.providerId]||(s.value[i.providerId]={}),s.value[i.providerId].apiKey=o}}),v=R({get:()=>{var o,u,_;return((o=s.value[i.providerId])==null?void 0:o.baseUrl)||((_=(u=f.value)==null?void 0:u.defaultOptions)==null?void 0:_.baseUrl)||""},set:o=>{s.value[i.providerId]||(s.value[i.providerId]={}),s.value[i.providerId].baseUrl=o}}),r=x("Hello! This is a test of voice synthesis."),n=x(!1),g=x(""),P=x(""),$=x(null),S=x(!1),p=x(""),m=x(""),B=x({});function te(){var o;(o=s.value[i.providerId])!=null&&o.voiceSettings?B.value={...s.value[i.providerId].voiceSettings}:B.value={pitch:0,speed:1,volume:0,...i.additionalSettings}}de(()=>{var o,u,_,L;y.initializeProvider(i.providerId),l.value=((o=s.value[i.providerId])==null?void 0:o.apiKey)||"",v.value=((u=s.value[i.providerId])==null?void 0:u.baseUrl)||((L=(_=f.value)==null?void 0:_.defaultOptions)==null?void 0:L.baseUrl)||"",te(),y.configuredProviders[i.providerId]&&w.loadVoicesForProvider(i.providerId)});const j=ue(()=>{var o,u;s.value[i.providerId]={...s.value[i.providerId],apiKey:l.value,baseUrl:v.value||((u=(o=f.value)==null?void 0:o.defaultOptions)==null?void 0:u.baseUrl)||"",voiceSettings:{...B.value}}},1e3);D([l,v],j),D(B,j,{deep:!0});async function le(){if(!r.value.trim()&&!S.value||S.value&&!p.value.trim())return;const o=y.getProviderInstance(i.providerId);if(!o){console.error("Failed to initialize speech provider");return}if(!m.value){console.error("No active speech voice selected");return}n.value=!0,P.value="";try{g.value&&F();const u=i.defaultModel||"default",_=S.value?p.value:r.value,L=await me({...o.speech(u,{voiceSettings:B.value}),input:_,voice:m.value});g.value=URL.createObjectURL(new Blob([L])),setTimeout(()=>{$.value&&$.value.play()},100)}catch(u){console.error("Error generating speech:",u),P.value=u instanceof Error?u.message:"An unknown error occurred"}finally{n.value=!1}}function F(){$.value&&($.value.pause(),$.value.currentTime=0),g.value&&(URL.revokeObjectURL(g.value),g.value="")}Z(()=>{g.value&&URL.revokeObjectURL(g.value)});function se(){var o,u;B.value={...((u=(o=f.value)==null?void 0:o.defaultOptions)==null?void 0:u.voiceSettings)||{}},j()}function oe(o,u){B.value[o]=u}const A=R(()=>({voiceSettings:B.value,updateVoiceSettings:oe,isGenerating:n.value,testText:r.value,useSSML:S.value,ssmlText:p.value,generateTestSpeech:le,stopTestAudio:F,audioUrl:g.value,audioPlayer:$.value,errorMessage:P.value}));return(o,u)=>{var _,L;return d(),I(Be,{"provider-name":(_=f.value)==null?void 0:_.localizedName,"provider-icon":(L=f.value)==null?void 0:L.icon,"on-back":()=>e(c).back()},{default:z(()=>[t("div",Ye,[M(e(xe),{class:"w-full md:w-[40%]"},{default:z(()=>[M(e(he),{title:e(b)("settings.pages.providers.common.section.basic.title"),description:e(b)("settings.pages.providers.common.section.basic.description"),"on-reset":se},{default:z(()=>{var O;return[M(e(ye),{modelValue:l.value,"onUpdate:modelValue":u[0]||(u[0]=K=>l.value=K),"provider-name":(O=f.value)==null?void 0:O.localizedName,placeholder:"sk-"},null,8,["modelValue","provider-name"]),U(o.$slots,"basic-settings")]}),_:3},8,["title","description"]),t("div",Ze,[t("h2",et,k(e(b)("settings.pages.providers.common.section.voice.title")),1),t("div",tt,[U(o.$slots,"voice-settings",W(X(A.value)))])]),M(e(ge),{title:e(b)("settings.pages.providers.common.section.advanced.title")},{default:z(()=>{var O,K;return[M(e(be),{modelValue:v.value,"onUpdate:modelValue":u[1]||(u[1]=ae=>v.value=ae),placeholder:((K=(O=f.value)==null?void 0:O.defaultOptions)==null?void 0:K.baseUrl)||"",required:""},null,8,["modelValue","placeholder"]),U(o.$slots,"advanced-settings")]}),_:3},8,["title"])]),_:3}),t("div",lt,[t("div",st,[U(o.$slots,"playground",W(X(A.value)))])])])]),_:3},8,["provider-name","provider-icon","on-back"])}}}),ot={flex:"~ col gap-4"},ft=N({__name:"SpeechVoiceSettings",props:ve({settings:null,showPitch:{type:Boolean},showSpeed:{type:Boolean},showStyle:{type:Boolean},showStability:{type:Boolean},showSimilarityBoost:{type:Boolean},showVolume:{type:Boolean},showSpeakerBoost:{type:Boolean}},{pitch:{required:!1,default:0},pitchModifiers:{},speed:{required:!1,default:1},speedModifiers:{},volume:{required:!1,default:0},volumeModifiers:{},style:{required:!1,default:0},styleModifiers:{},stability:{required:!1,default:.5},stabilityModifiers:{},similarityBoost:{required:!1,default:.75},similarityBoostModifiers:{},useSpeakerBoost:{type:Boolean,required:!1,default:!1},useSpeakerBoostModifiers:{}}),emits:["update:pitch","update:speed","update:volume","update:style","update:stability","update:similarityBoost","update:useSpeakerBoost"],setup(a){const i=T(a,"pitch"),b=T(a,"speed"),c=T(a,"volume"),y=T(a,"style"),w=T(a,"stability"),s=T(a,"similarityBoost"),f=T(a,"useSpeakerBoost"),{t:l}=E();return(v,r)=>(d(),h("div",ot,[a.showPitch?(d(),I(e(C),{key:0,modelValue:i.value,"onUpdate:modelValue":r[0]||(r[0]=n=>i.value=n),label:e(l)("settings.pages.providers.provider.common.fields.field.pitch.label"),description:e(l)("settings.pages.providers.provider.common.fields.field.pitch.description"),min:-100,max:100,step:1,"format-value":n=>`${n}%`},null,8,["modelValue","label","description","format-value"])):V("",!0),a.showSpeed?(d(),I(e(C),{key:1,modelValue:b.value,"onUpdate:modelValue":r[1]||(r[1]=n=>b.value=n),label:e(l)("settings.pages.providers.provider.common.fields.field.speed.label"),description:e(l)("settings.pages.providers.provider.common.fields.field.speed.description"),min:.5,max:2,step:.01},null,8,["modelValue","label","description"])):V("",!0),a.showVolume?(d(),I(e(C),{key:2,modelValue:c.value,"onUpdate:modelValue":r[2]||(r[2]=n=>c.value=n),label:e(l)("settings.pages.providers.provider.common.fields.field.volume.label"),description:e(l)("settings.pages.providers.provider.common.fields.field.volume.description"),min:-100,max:100,step:1,"format-value":n=>`${n}%`},null,8,["modelValue","label","description","format-value"])):V("",!0),a.showStyle?(d(),I(e(C),{key:3,modelValue:y.value,"onUpdate:modelValue":r[3]||(r[3]=n=>y.value=n),label:e(l)("settings.pages.providers.provider.elevenlabs.fields.field.style.label"),description:e(l)("settings.pages.providers.provider.elevenlabs.fields.field.style.description"),min:0,max:1,step:.01},null,8,["modelValue","label","description"])):V("",!0),a.showStability?(d(),I(e(C),{key:4,modelValue:w.value,"onUpdate:modelValue":r[4]||(r[4]=n=>w.value=n),label:e(l)("settings.pages.providers.provider.elevenlabs.fields.field.stability.label"),description:e(l)("settings.pages.providers.provider.elevenlabs.fields.field.stability.description"),min:0,max:1,step:.01},null,8,["modelValue","label","description"])):V("",!0),a.showSimilarityBoost?(d(),I(e(C),{key:5,modelValue:s.value,"onUpdate:modelValue":r[5]||(r[5]=n=>s.value=n),label:e(l)("settings.pages.providers.provider.elevenlabs.fields.field.simularity-boost.label"),description:e(l)("settings.pages.providers.provider.elevenlabs.fields.field.simularity-boost.description"),min:0,max:1,step:.01},null,8,["modelValue","label","description"])):V("",!0),a.showSpeakerBoost?(d(),I(e(ee),{key:6,modelValue:f.value,"onUpdate:modelValue":r[6]||(r[6]=n=>f.value=n),label:e(l)("settings.pages.providers.provider.elevenlabs.fields.field.speaker-boost.label"),description:e(l)("settings.pages.providers.provider.elevenlabs.fields.field.speaker-boost.description")},null,8,["modelValue","label","description"])):V("",!0),U(v.$slots,"default")]))}});export{ct as _,ft as a,mt as b};
|
|
|
1 |
+
import{d as N,q as E,h as R,bw as ie,c as h,o as d,m as U,a as t,z as Y,A as q,C as V,D as k,g as x,w as D,H as Z,b as M,e,bE as G,bH as H,bx as J,by as Q,bG as re,s as ne,l as de,x as I,y as z,bT as W,bU as X,bP as ue,bK as ve,bL as T}from"./index-hDb1Lsb8.js";import{b as pe,a as ee,_ as C}from"./TestDummyMarker.vue_vue_type_script_setup_true_lang-DvXVr5Qy.js";import"./live2d-zip-loader--bTGFeQd.js";import{u as ce,g as me}from"./speech-D3H5B80W.js";import{u as fe}from"./providers-adQ6cb75.js";import{_ as ge,a as be}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-UCuivhvU.js";import{_ as ye}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-CHpN3yiY.js";import{_ as xe,a as he}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-CYv3qJbi.js";const ke={flex:"~ row",initial:{opacity:0,x:10},enter:{opacity:1,x:0},leave:{opacity:0,x:-10},duration:250,"mb-6":"","items-center":"","gap-3":""},Se={relative:""},Ve={key:0,absolute:"","left-0":"","top-0":"","translate-y":"[-80%]"},we={text:"neutral-300 dark:neutral-500","text-nowrap":""},Ue={"text-nowrap":"","text-3xl":"","font-semibold":""},$e={key:0,"text-sm":"",text:"neutral-500 dark:neutral-400"},_e={text:"neutral-200/50 dark:neutral-600/20","pointer-events-none":"",fixed:"","bottom-0":"","right-0":"","z--1":"","translate-x-10":"","translate-y-10":""},Be=N({__name:"ProviderSettingsLayout2",props:{providerName:null,providerIcon:null,providerIconColor:null,onBack:{type:Function},title:null,subtitle:null,categoryLabel:null},emits:["back"],setup(a,{emit:i}){const b=a,c=i,{t:y}=E(),w=R(()=>b.title||b.providerName||""),s=R(()=>b.categoryLabel||y("settings.pages.providers.title"));function f(){b.onBack&&b.onBack(),c("back")}return(l,v)=>{const r=ie("motion");return d(),h("div",null,[U(l.$slots,"header",{},()=>[q((d(),h("div",ke,[U(l.$slots,"backButton",{},()=>[t("button",{onClick:f},v[0]||(v[0]=[t("div",{"i-solar:alt-arrow-left-line-duotone":"","text-2xl":""},null,-1)]))]),t("div",null,[U(l.$slots,"title",{},()=>[t("h1",Se,[s.value?(d(),h("div",Ve,[t("span",we,k(s.value),1)])):V("",!0),t("div",Ue,k(w.value),1)])]),U(l.$slots,"subtitle",{},()=>[a.subtitle?(d(),h("div",$e,k(a.subtitle),1)):V("",!0)])]),U(l.$slots,"headerExtra")])),[[r]])]),U(l.$slots,"default"),t("div",_e,[t("div",{text:"40",class:Y(a.providerIcon||a.providerIconColor)},null,2)])])}}}),Ie={"w-full":"","rounded-xl":""},Le={class:"mb-4 text-lg text-neutral-500 md:text-2xl dark:text-neutral-400","w-full":""},Te={class:"inline-flex items-center gap-4"},Me={flex:"~ col gap-4"},Pe=["placeholder"],Ce=["placeholder"],Re={flex:"~ col gap-6"},Oe={grid:"~ cols-2 gap-4"},qe={class:"flex items-center gap-1 text-sm font-medium"},Ke={class:"text-xs text-neutral-500 dark:text-neutral-400"},ze=["value"],Ne={grid:"~ cols-2 gap-4"},Ee={class:"flex items-center gap-1 text-sm font-medium"},je={class:"text-xs text-neutral-500 dark:text-neutral-400"},De=["value"],Fe={flex:"~ row","gap-4":""},Ae=["disabled"],Ge={flex:"~ row","items-center":"","gap-2":""},He={flex:"~ row","items-center":"","gap-2":""},Je={key:2,class:"mt-2 text-sm text-red-500"},Qe={key:3,class:"mt-2 text-sm text-red-500"},We={key:4,class:"mt-2 text-sm text-red-500"},Xe=["src"],ct=N({__name:"SpeechPlayground",props:{defaultText:null,availableVoices:null,availableLanguages:null,generateSpeech:{type:Function},apiKeyConfigured:{type:Boolean}},setup(a,{expose:i}){const b=a,{t:c}=E(),y=x(b.defaultText||"Hello! This is a test of the voice synthesis."),w=x(!1),s=x(""),f=x(""),l=x(null),v=x(!1),r=x(""),n=x(b.availableLanguages[0]||"en-US"),g=x("");D(()=>b.availableVoices,S=>{var p;S.length>0&&!g.value&&(g.value=((p=S[0])==null?void 0:p.id)||"")},{immediate:!0});async function P(){if(!(!y.value.trim()&&!v.value||v.value&&!r.value.trim()||!g.value)){w.value=!0,f.value="";try{s.value&&$();const S=v.value?r.value:y.value,p=await b.generateSpeech(S,g.value,v.value);s.value=URL.createObjectURL(new Blob([p])),setTimeout(()=>{l.value&&l.value.play()},100)}catch(S){console.error("Error generating speech:",S),f.value=S instanceof Error?S.message:"An unknown error occurred"}finally{w.value=!1}}}function $(){l.value&&(l.value.pause(),l.value.currentTime=0),s.value&&(URL.revokeObjectURL(s.value),s.value="")}return Z(()=>{s.value&&URL.revokeObjectURL(s.value)}),i({testText:y,ssmlText:r,useSSML:v,selectedLanguage:n,selectedVoice:g,isGenerating:w,audioUrl:s,errorMessage:f,audioPlayer:l,generateTestSpeech:P,stopTestAudio:$}),(S,p)=>(d(),h("div",Ie,[t("h2",Le,[t("div",Te,[M(e(pe)),t("div",null,k(e(c)("settings.pages.providers.provider.elevenlabs.playground.title")),1)])]),t("div",Me,[M(e(ee),{modelValue:v.value,"onUpdate:modelValue":p[0]||(p[0]=m=>v.value=m),label:e(c)("settings.pages.modules.speech.sections.section.voice-settings.use-ssml.label"),description:e(c)("settings.pages.modules.speech.sections.section.voice-settings.use-ssml.description")},null,8,["modelValue","label","description"]),v.value?q((d(),h("textarea",{key:1,"onUpdate:modelValue":p[2]||(p[2]=m=>r.value=m),placeholder:e(c)("settings.pages.modules.speech.sections.section.voice-settings.input-ssml.placeholder"),border:"neutral-100 dark:neutral-800 solid 2 focus:neutral-200 dark:focus:neutral-700",transition:"all duration-250 ease-in-out",bg:"neutral-100 dark:neutral-800 focus:neutral-50 dark:focus:neutral-900","h-48":"","w-full":"","rounded-lg":"","px-3":"","py-2":"","text-sm":"","font-mono":"","outline-none":""},null,8,Ce)),[[G,r.value]]):q((d(),h("textarea",{key:0,"onUpdate:modelValue":p[1]||(p[1]=m=>y.value=m),placeholder:e(c)("settings.pages.providers.provider.elevenlabs.playground.fields.field.input.placeholder"),border:"neutral-100 dark:neutral-800 solid 2 focus:neutral-200 dark:focus:neutral-700",transition:"all duration-250 ease-in-out",bg:"neutral-100 dark:neutral-800 focus:neutral-50 dark:focus:neutral-900","h-24":"","w-full":"","rounded-lg":"","px-3":"","py-2":"","text-sm":"","outline-none":""},null,8,Pe)),[[G,y.value]]),t("div",Re,[t("label",Oe,[t("div",null,[t("div",qe,k(e(c)("settings.pages.providers.provider.elevenlabs.playground.fields.field.language.label")),1),t("div",Ke,k(e(c)("settings.pages.providers.provider.elevenlabs.playground.fields.field.language.description")),1)]),q(t("select",{"onUpdate:modelValue":p[3]||(p[3]=m=>n.value=m),border:"neutral-300 dark:neutral-800 solid 2 focus:neutral-400 dark:focus:neutral-600",transition:"border duration-250 ease-in-out","w-full":"","rounded-lg":"","px-2":"","py-1":"","text-nowrap":"","text-sm":"","outline-none":""},[(d(!0),h(J,null,Q(a.availableLanguages,m=>(d(),h("option",{key:m,value:m},k(m),9,ze))),128))],512),[[H,n.value]])]),t("label",Ne,[t("div",null,[t("div",Ee,k(e(c)("settings.pages.providers.provider.elevenlabs.playground.fields.field.voice.label")),1),t("div",je,k(e(c)("settings.pages.providers.provider.elevenlabs.playground.fields.field.voice.description")),1)]),q(t("select",{"onUpdate:modelValue":p[4]||(p[4]=m=>g.value=m),border:"neutral-300 dark:neutral-800 solid 2 focus:neutral-400 dark:focus:neutral-600",transition:"border duration-250 ease-in-out","w-full":"","rounded-lg":"","px-2":"","py-1":"","text-nowrap":"","text-sm":"","outline-none":""},[(d(!0),h(J,null,Q(a.availableVoices,m=>(d(),h("option",{key:m.id,value:m.id},k(m.name),9,De))),128))],512),[[H,g.value]])])]),t("div",Fe,[t("button",{border:"neutral-800 dark:neutral-200 solid 2",transition:"border duration-250 ease-in-out","rounded-lg":"","px-4":"",text:"neutral-100 dark:neutral-900","py-2":"","text-sm":"",disabled:w.value||!y.value.trim()&&!v.value||v.value&&!r.value.trim()||!g.value||!a.apiKeyConfigured,class:Y({"opacity-50 cursor-not-allowed":w.value||!y.value.trim()&&!v.value||v.value&&!r.value.trim()||!g.value||!a.apiKeyConfigured}),bg:"neutral-700 dark:neutral-300",onClick:P},[t("div",Ge,[p[5]||(p[5]=t("div",{"i-solar:play-circle-bold-duotone":""},null,-1)),t("span",null,k(w.value?e(c)("settings.pages.providers.provider.elevenlabs.playground.buttons.button.test-voice.generating"):e(c)("settings.pages.providers.provider.elevenlabs.playground.buttons.button.test-voice.label")),1)])],10,Ae),s.value?(d(),h("button",{key:0,border:"primary-300 dark:primary-800 solid 2",transition:"border duration-250 ease-in-out","rounded-lg":"","px-4":"","py-2":"","text-sm":"",onClick:$},[t("div",He,[p[6]||(p[6]=t("div",{"i-solar:stop-circle-bold-duotone":""},null,-1)),t("span",null,k(e(c)("settings.pages.modules.speech.sections.section.playground.buttons.stop.label")),1)])])):V("",!0)]),a.apiKeyConfigured?V("",!0):(d(),h("div",Je,k(e(c)("settings.pages.providers.provider.elevenlabs.playground.validation.error-missing-api-key")),1)),g.value?V("",!0):(d(),h("div",Qe,k(e(c)("settings.pages.modules.speech.sections.section.playground.select-voice.required")),1)),f.value?(d(),h("div",We,k(f.value),1)):V("",!0),s.value?(d(),h("audio",{key:5,ref_key:"audioPlayer",ref:l,src:s.value,controls:"",class:"mt-2 w-full"},null,8,Xe)):V("",!0)]),U(S.$slots,"default")]))}}),Ye={flex:"~ col md:row gap-6"},Ze={flex:"~ col gap-6"},et={class:"text-lg text-neutral-500 md:text-2xl dark:text-neutral-400"},tt={flex:"~ col gap-4"},lt={flex:"~ col gap-6",class:"w-full md:w-[60%]"},st={"w-full":"","rounded-xl":""},mt=N({__name:"SpeechProviderSettings",props:{providerId:null,defaultModel:null,additionalSettings:null},setup(a){const i=a,{t:b}=E(),c=re(),y=fe(),w=ce(),{providers:s}=ne(y),f=R(()=>y.getProviderMetadata(i.providerId)),l=R({get:()=>{var o;return((o=s.value[i.providerId])==null?void 0:o.apiKey)||""},set:o=>{s.value[i.providerId]||(s.value[i.providerId]={}),s.value[i.providerId].apiKey=o}}),v=R({get:()=>{var o,u,_;return((o=s.value[i.providerId])==null?void 0:o.baseUrl)||((_=(u=f.value)==null?void 0:u.defaultOptions)==null?void 0:_.baseUrl)||""},set:o=>{s.value[i.providerId]||(s.value[i.providerId]={}),s.value[i.providerId].baseUrl=o}}),r=x("Hello! This is a test of voice synthesis."),n=x(!1),g=x(""),P=x(""),$=x(null),S=x(!1),p=x(""),m=x(""),B=x({});function te(){var o;(o=s.value[i.providerId])!=null&&o.voiceSettings?B.value={...s.value[i.providerId].voiceSettings}:B.value={pitch:0,speed:1,volume:0,...i.additionalSettings}}de(()=>{var o,u,_,L;y.initializeProvider(i.providerId),l.value=((o=s.value[i.providerId])==null?void 0:o.apiKey)||"",v.value=((u=s.value[i.providerId])==null?void 0:u.baseUrl)||((L=(_=f.value)==null?void 0:_.defaultOptions)==null?void 0:L.baseUrl)||"",te(),y.configuredProviders[i.providerId]&&w.loadVoicesForProvider(i.providerId)});const j=ue(()=>{var o,u;s.value[i.providerId]={...s.value[i.providerId],apiKey:l.value,baseUrl:v.value||((u=(o=f.value)==null?void 0:o.defaultOptions)==null?void 0:u.baseUrl)||"",voiceSettings:{...B.value}}},1e3);D([l,v],j),D(B,j,{deep:!0});async function le(){if(!r.value.trim()&&!S.value||S.value&&!p.value.trim())return;const o=y.getProviderInstance(i.providerId);if(!o){console.error("Failed to initialize speech provider");return}if(!m.value){console.error("No active speech voice selected");return}n.value=!0,P.value="";try{g.value&&F();const u=i.defaultModel||"default",_=S.value?p.value:r.value,L=await me({...o.speech(u,{voiceSettings:B.value}),input:_,voice:m.value});g.value=URL.createObjectURL(new Blob([L])),setTimeout(()=>{$.value&&$.value.play()},100)}catch(u){console.error("Error generating speech:",u),P.value=u instanceof Error?u.message:"An unknown error occurred"}finally{n.value=!1}}function F(){$.value&&($.value.pause(),$.value.currentTime=0),g.value&&(URL.revokeObjectURL(g.value),g.value="")}Z(()=>{g.value&&URL.revokeObjectURL(g.value)});function se(){var o,u;B.value={...((u=(o=f.value)==null?void 0:o.defaultOptions)==null?void 0:u.voiceSettings)||{}},j()}function oe(o,u){B.value[o]=u}const A=R(()=>({voiceSettings:B.value,updateVoiceSettings:oe,isGenerating:n.value,testText:r.value,useSSML:S.value,ssmlText:p.value,generateTestSpeech:le,stopTestAudio:F,audioUrl:g.value,audioPlayer:$.value,errorMessage:P.value}));return(o,u)=>{var _,L;return d(),I(Be,{"provider-name":(_=f.value)==null?void 0:_.localizedName,"provider-icon":(L=f.value)==null?void 0:L.icon,"on-back":()=>e(c).back()},{default:z(()=>[t("div",Ye,[M(e(xe),{class:"w-full md:w-[40%]"},{default:z(()=>[M(e(he),{title:e(b)("settings.pages.providers.common.section.basic.title"),description:e(b)("settings.pages.providers.common.section.basic.description"),"on-reset":se},{default:z(()=>{var O;return[M(e(ye),{modelValue:l.value,"onUpdate:modelValue":u[0]||(u[0]=K=>l.value=K),"provider-name":(O=f.value)==null?void 0:O.localizedName,placeholder:"sk-"},null,8,["modelValue","provider-name"]),U(o.$slots,"basic-settings")]}),_:3},8,["title","description"]),t("div",Ze,[t("h2",et,k(e(b)("settings.pages.providers.common.section.voice.title")),1),t("div",tt,[U(o.$slots,"voice-settings",W(X(A.value)))])]),M(e(ge),{title:e(b)("settings.pages.providers.common.section.advanced.title")},{default:z(()=>{var O,K;return[M(e(be),{modelValue:v.value,"onUpdate:modelValue":u[1]||(u[1]=ae=>v.value=ae),placeholder:((K=(O=f.value)==null?void 0:O.defaultOptions)==null?void 0:K.baseUrl)||"",required:""},null,8,["modelValue","placeholder"]),U(o.$slots,"advanced-settings")]}),_:3},8,["title"])]),_:3}),t("div",lt,[t("div",st,[U(o.$slots,"playground",W(X(A.value)))])])])]),_:3},8,["provider-name","provider-icon","on-back"])}}}),ot={flex:"~ col gap-4"},ft=N({__name:"SpeechVoiceSettings",props:ve({settings:null,showPitch:{type:Boolean},showSpeed:{type:Boolean},showStyle:{type:Boolean},showStability:{type:Boolean},showSimilarityBoost:{type:Boolean},showVolume:{type:Boolean},showSpeakerBoost:{type:Boolean}},{pitch:{required:!1,default:0},pitchModifiers:{},speed:{required:!1,default:1},speedModifiers:{},volume:{required:!1,default:0},volumeModifiers:{},style:{required:!1,default:0},styleModifiers:{},stability:{required:!1,default:.5},stabilityModifiers:{},similarityBoost:{required:!1,default:.75},similarityBoostModifiers:{},useSpeakerBoost:{type:Boolean,required:!1,default:!1},useSpeakerBoostModifiers:{}}),emits:["update:pitch","update:speed","update:volume","update:style","update:stability","update:similarityBoost","update:useSpeakerBoost"],setup(a){const i=T(a,"pitch"),b=T(a,"speed"),c=T(a,"volume"),y=T(a,"style"),w=T(a,"stability"),s=T(a,"similarityBoost"),f=T(a,"useSpeakerBoost"),{t:l}=E();return(v,r)=>(d(),h("div",ot,[a.showPitch?(d(),I(e(C),{key:0,modelValue:i.value,"onUpdate:modelValue":r[0]||(r[0]=n=>i.value=n),label:e(l)("settings.pages.providers.provider.common.fields.field.pitch.label"),description:e(l)("settings.pages.providers.provider.common.fields.field.pitch.description"),min:-100,max:100,step:1,"format-value":n=>`${n}%`},null,8,["modelValue","label","description","format-value"])):V("",!0),a.showSpeed?(d(),I(e(C),{key:1,modelValue:b.value,"onUpdate:modelValue":r[1]||(r[1]=n=>b.value=n),label:e(l)("settings.pages.providers.provider.common.fields.field.speed.label"),description:e(l)("settings.pages.providers.provider.common.fields.field.speed.description"),min:.5,max:2,step:.01},null,8,["modelValue","label","description"])):V("",!0),a.showVolume?(d(),I(e(C),{key:2,modelValue:c.value,"onUpdate:modelValue":r[2]||(r[2]=n=>c.value=n),label:e(l)("settings.pages.providers.provider.common.fields.field.volume.label"),description:e(l)("settings.pages.providers.provider.common.fields.field.volume.description"),min:-100,max:100,step:1,"format-value":n=>`${n}%`},null,8,["modelValue","label","description","format-value"])):V("",!0),a.showStyle?(d(),I(e(C),{key:3,modelValue:y.value,"onUpdate:modelValue":r[3]||(r[3]=n=>y.value=n),label:e(l)("settings.pages.providers.provider.elevenlabs.fields.field.style.label"),description:e(l)("settings.pages.providers.provider.elevenlabs.fields.field.style.description"),min:0,max:1,step:.01},null,8,["modelValue","label","description"])):V("",!0),a.showStability?(d(),I(e(C),{key:4,modelValue:w.value,"onUpdate:modelValue":r[4]||(r[4]=n=>w.value=n),label:e(l)("settings.pages.providers.provider.elevenlabs.fields.field.stability.label"),description:e(l)("settings.pages.providers.provider.elevenlabs.fields.field.stability.description"),min:0,max:1,step:.01},null,8,["modelValue","label","description"])):V("",!0),a.showSimilarityBoost?(d(),I(e(C),{key:5,modelValue:s.value,"onUpdate:modelValue":r[5]||(r[5]=n=>s.value=n),label:e(l)("settings.pages.providers.provider.elevenlabs.fields.field.simularity-boost.label"),description:e(l)("settings.pages.providers.provider.elevenlabs.fields.field.simularity-boost.description"),min:0,max:1,step:.01},null,8,["modelValue","label","description"])):V("",!0),a.showSpeakerBoost?(d(),I(e(ee),{key:6,modelValue:f.value,"onUpdate:modelValue":r[6]||(r[6]=n=>f.value=n),label:e(l)("settings.pages.providers.provider.elevenlabs.fields.field.speaker-boost.label"),description:e(l)("settings.pages.providers.provider.elevenlabs.fields.field.speaker-boost.description")},null,8,["modelValue","label","description"])):V("",!0),U(v.$slots,"default")]))}});export{ct as _,ft as a,mt as b};
|
assets/{TestDummyMarker.vue_vue_type_script_setup_true_lang-OSsy22LU.js → TestDummyMarker.vue_vue_type_script_setup_true_lang-DvXVr5Qy.js}
RENAMED
@@ -1 +1 @@
|
|
1 |
-
import{bx as P,d as m,c2 as I,bV as V,c3 as D,b$ as E,x as y,o as c,y as _,m as k,e as d,b_ as N,cc as L,g as $,h,cd as M,bX as z,ce as U,w as H,c as g,by as K,E as X,cf as G,C as W,cg as Y,bJ as J,bL as C,b as w,bK as B,a as v,D as x,l as R,A as Q,bE as Z,bn as j,n as A,br as S,H as ee}from"./index-7-fr_lhT.js";function O(t){return t?t.flatMap(e=>e.type===P?O(e.children):[e]):[]}const te=m({name:"PrimitiveSlot",inheritAttrs:!1,setup(t,{attrs:e,slots:n}){return()=>{var p,f;if(!n.default)return null;const o=O(n.default()),l=o.findIndex(i=>i.type!==I);if(l===-1)return o;const r=o[l];(p=r.props)==null||delete p.ref;const a=r.props?V(e,r.props):e;e.class&&((f=r.props)!=null&&f.class)&&delete r.props.class;const u=D(r,a);for(const i in a)i.startsWith("on")&&(u.props||(u.props={}),u.props[i]=a[i]);return o.length===1?u:(o[l]=u,o)}}}),ae=["area","img","input"],q=m({name:"Primitive",inheritAttrs:!1,props:{asChild:{type:Boolean,default:!1},as:{type:[String,Object],default:"div"}},setup(t,{attrs:e,slots:n}){const o=t.asChild?"template":t.as;return typeof o=="string"&&ae.includes(o)?()=>E(o,e):o!=="template"?()=>E(t.as,e,{default:n.default}):()=>E(te,e,{default:n.default})}}),ne=m({__name:"VisuallyHidden",props:{feature:{default:"focusable"},asChild:{type:Boolean},as:{default:"span"}},setup(t){return(e,n)=>(c(),y(d(q),{as:e.as,"as-child":e.asChild,"aria-hidden":e.feature==="focusable"?"true":void 0,"data-hidden":e.feature==="fully-hidden"?"":void 0,tabindex:e.feature==="fully-hidden"?"-1":void 0,style:{position:"absolute",border:0,width:"1px",height:"1px",padding:0,margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",clipPath:"inset(50%)",whiteSpace:"nowrap",wordWrap:"normal"}},{default:_(()=>[k(e.$slots,"default")]),_:3},8,["as","as-child","aria-hidden","data-hidden","tabindex"]))}});function le(t,e){const n=`${t}Context`,o=Symbol(n);return[a=>{const u=N(o,a);if(u||u===null)return u;throw new Error(`Injection \`${o.toString()}\` not found. Component must be used within ${Array.isArray(t)?`one of the following components: ${t.join(", ")}`:`\`${t}\``}`)},a=>(L(o,a),a)]}function T(){const t=z(),e=$(),n=h(()=>{var a,u;return["#text","#comment"].includes((a=e.value)==null?void 0:a.$el.nodeName)?(u=e.value)==null?void 0:u.$el.nextElementSibling:M(e)}),o=Object.assign({},t.exposed),l={};for(const a in t.props)Object.defineProperty(l,a,{enumerable:!0,configurable:!0,get:()=>t.props[a]});if(Object.keys(o).length>0)for(const a in o)Object.defineProperty(l,a,{enumerable:!0,configurable:!0,get:()=>o[a]});Object.defineProperty(l,"$el",{enumerable:!0,configurable:!0,get:()=>t.vnode.el}),t.exposed=l;function r(a){e.value=a,a&&(Object.defineProperty(l,"$el",{enumerable:!0,configurable:!0,get:()=>a instanceof Element?a:a.$el}),t.exposed=l)}return{forwardRef:r,currentRef:e,currentElement:n}}function oe(){const t=$(),e=h(()=>{var n,o;return["#text","#comment"].includes((n=t.value)==null?void 0:n.$el.nodeName)?(o=t.value)==null?void 0:o.$el.nextElementSibling:M(t)});return{primitiveElement:t,currentElement:e}}function re(t){return h(()=>{var e;return U(t)?!!((e=M(t))!=null&&e.closest("form")):!0})}const F=m({inheritAttrs:!1,__name:"VisuallyHiddenInputBubble",props:{name:{},value:{},checked:{type:Boolean,default:void 0},required:{type:Boolean},disabled:{type:Boolean},feature:{default:"fully-hidden"}},setup(t){const e=t,{primitiveElement:n,currentElement:o}=oe(),l=h(()=>e.checked??e.value);return H(l,(r,a)=>{if(!o.value)return;const u=o.value,p=window.HTMLInputElement.prototype,i=Object.getOwnPropertyDescriptor(p,"value").set;if(i&&r!==a){const s=new Event("input",{bubbles:!0}),b=new Event("change",{bubbles:!0});i.call(u,r),u.dispatchEvent(s),u.dispatchEvent(b)}}),(r,a)=>(c(),y(ne,V({ref_key:"primitiveElement",ref:n},{...e,...r.$attrs},{as:"input"}),null,16))}}),se=m({inheritAttrs:!1,__name:"VisuallyHiddenInput",props:{name:{},value:{},checked:{type:Boolean,default:void 0},required:{type:Boolean},disabled:{type:Boolean},feature:{default:"fully-hidden"}},setup(t){const e=t,n=h(()=>typeof e.value=="object"&&Array.isArray(e.value)&&e.value.length===0&&e.required),o=h(()=>typeof e.value=="string"||typeof e.value=="number"||typeof e.value=="boolean"?[{name:e.name,value:e.value}]:typeof e.value=="object"&&Array.isArray(e.value)?e.value.flatMap((l,r)=>typeof l=="object"?Object.entries(l).map(([a,u])=>({name:`[${e.name}][${r}][${a}]`,value:u})):{name:`[${e.name}][${r}]`,value:l}):e.value!==null&&typeof e.value=="object"&&!Array.isArray(e.value)?Object.entries(e.value).map(([l,r])=>({name:`[${e.name}][${l}]`,value:r})):[]);return(l,r)=>n.value?(c(),y(F,V({key:l.name},{...e,...l.$attrs},{name:l.name,value:l.value}),null,16,["name","value"])):(c(!0),g(P,{key:1},K(o.value,a=>(c(),y(F,V({key:a.name,ref_for:!0},{...e,...l.$attrs},{name:a.name,value:a.value}),null,16,["name","value"]))),128))}}),[ue,ie]=le("SwitchRoot"),de=m({__name:"SwitchRoot",props:{defaultValue:{type:Boolean},modelValue:{type:[Boolean,null],default:void 0},disabled:{type:Boolean},id:{},value:{default:"on"},asChild:{type:Boolean},as:{default:"button"},name:{},required:{type:Boolean}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,o=e,{disabled:l}=X(n),r=G(n,"modelValue",o,{defaultValue:n.defaultValue,passive:n.modelValue===void 0});function a(){l.value||(r.value=!r.value)}const{forwardRef:u,currentElement:p}=T(),f=re(p),i=h(()=>{var s;return n.id&&p.value?(s=document.querySelector(`[for="${n.id}"]`))==null?void 0:s.innerText:void 0});return ie({modelValue:r,toggleCheck:a,disabled:l}),(s,b)=>(c(),y(d(q),V(s.$attrs,{id:s.id,ref:d(u),role:"switch",type:s.as==="button"?"button":void 0,value:s.value,"aria-label":s.$attrs["aria-label"]||i.value,"aria-checked":d(r),"aria-required":s.required,"data-state":d(r)?"checked":"unchecked","data-disabled":d(l)?"":void 0,"as-child":s.asChild,as:s.as,disabled:d(l),onClick:a,onKeydown:Y(J(a,["prevent"]),["enter"])}),{default:_(()=>[k(s.$slots,"default",{modelValue:d(r)}),d(f)&&s.name?(c(),y(d(se),{key:0,type:"checkbox",name:s.name,disabled:d(l),required:s.required,value:s.value,checked:!!d(r)},null,8,["name","disabled","required","value","checked"])):W("",!0)]),_:3},16,["id","type","value","aria-label","aria-checked","aria-required","data-state","data-disabled","as-child","as","disabled","onKeydown"]))}}),ce=m({__name:"SwitchThumb",props:{asChild:{type:Boolean},as:{default:"span"}},setup(t){const e=ue();return T(),(n,o)=>{var l;return c(),y(d(q),{"data-state":(l=d(e).modelValue)!=null&&l.value?"checked":"unchecked","data-disabled":d(e).disabled.value?"":void 0,"as-child":n.asChild,as:n.as},{default:_(()=>[k(n.$slots,"default")]),_:3},8,["data-state","data-disabled","as-child","as"])}}}),me=m({__name:"Checkbox",props:{modelValue:{type:Boolean,required:!0},modelModifiers:{}},emits:["update:modelValue"],setup(t){const e=C(t,"modelValue");return(n,o)=>(c(),y(d(de),{modelValue:e.value,"onUpdate:modelValue":o[0]||(o[0]=l=>e.value=l),transition:"background duration-250 ease-in-out",outline:"focus-within:none",flex:"~",border:"neutral-300 dark:neutral-700 data-[state=checked]:primary-200 data-[state=unchecked]:neutral-300 focus-within:neutral-800",bg:"data-[state=checked]:primary-400 data-[state=unchecked]:neutral-300 data-[state=checked]:dark:primary-400/80 dark:data-[state=unchecked]:neutral-800",relative:"","h-7":"",w:"12.5","rounded-full":"",shadow:"sm focus-within:shadow-neutral-800 focus-within:[0_0_0_1px] "},{default:_(()=>[w(d(ce),{"my-auto":"","size-6":"",flex:"","items-center":"","justify-center":"","translate-x":"0.5 data-[state=checked]:full","rounded-full":"","bg-white":"","text-xs":"","shadow-xl":"",transition:"transform duration-250 ease-in-out","will-change-transform":""})]),_:1},8,["modelValue"]))}}),pe={flex:"~ col gap-4"},fe={flex:"~ row","items-center":"","gap-2":""},ve={flex:"1"},he={class:"flex items-center gap-1 text-sm font-medium"},ye={class:"text-xs text-neutral-500 dark:text-neutral-400"},Fe=m({__name:"FieldCheckbox",props:B({label:null,description:null},{modelValue:{type:Boolean,required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const e=t,n=C(t,"modelValue");return(o,l)=>(c(),g("label",pe,[v("div",fe,[v("div",ve,[v("div",he,x(e.label),1),v("div",ye,x(e.description),1)]),w(me,{modelValue:n.value,"onUpdate:modelValue":l[0]||(l[0]=r=>n.value=r)},null,8,["modelValue"])])]))}}),be=["min","max","step"],_e=m({__name:"Range",props:B({min:{default:0},max:{default:100},step:{default:1},disabled:{type:Boolean,default:!1},thumbColor:{default:"#9090906e"},trackColor:{default:"gray"},trackValueColor:{default:"red"}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const e=t,n=C(t,"modelValue"),o=h(()=>e.min*1e4),l=h(()=>e.max*1e4),r=h(()=>e.step*1e4),a=$(),u=h({get:()=>n.value*1e4,set:f=>{n.value=f/1e4,p()}});R(()=>{p()});function p(){a.value&&(a.value.style.setProperty("--value",a.value.value),a.value.style.setProperty("--min",a.value.min?a.value.min:e.min.toString()),a.value.style.setProperty("--max",a.value.max?a.value.max:e.max.toString()))}return(f,i)=>Q((c(),g("input",{ref_key:"sliderRef",ref:a,"onUpdate:modelValue":i[0]||(i[0]=s=>u.value=s),type:"range",min:o.value,max:l.value,step:r.value,class:"slider-progress form_input-range",onInput:i[1]||(i[1]=s=>{s.target.style.setProperty("--value",s.target.value)})},null,40,be)),[[Z,u.value,void 0,{number:!0}]])}}),ge=j(_e,[["__scopeId","data-v-6ca6d31c"]]),xe={flex:"~ col gap-4"},Ve={flex:"~ row","items-center":"","gap-2":""},$e={flex:"1"},we={class:"flex items-center gap-1 text-sm font-medium"},ke={class:"text-xs text-neutral-500 dark:text-neutral-400"},Ce={"font-mono":""},Ee={flex:"~ row","items-center":"","gap-2":""},Pe=m({__name:"FieldRange",props:B({min:null,max:null,step:null,label:null,description:null,formatValue:{type:Function}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const e=t,n=C(t,"modelValue");return(o,l)=>{var r;return c(),g("label",xe,[v("div",Ve,[v("div",$e,[v("div",we,x(t.label),1),v("div",ke,x(t.description),1)]),v("span",Ce,x(((r=e.formatValue)==null?void 0:r.call(e,n.value))||n.value),1)]),v("div",Ee,[w(ge,{modelValue:n.value,"onUpdate:modelValue":l[0]||(l[0]=a=>n.value=a),min:t.min||0,max:t.max||1,step:t.step||.01,"w-full":""},null,8,["modelValue","min","max","step"])])])}}}),Se=m({__name:"Volumed",props:{perspective:null,transform:null},setup(t){return(e,n)=>(c(),g("div",{class:"volumed",style:A({perspective:`${t.perspective}px`,transform:t.transform})},[k(e.$slots,"default",{},void 0,!0)],4))}}),Me=j(Se,[["__scopeId","data-v-568551bc"]]),Be=m({__name:"CursorMomentum",props:{baseSpeed:{default:.1},friction:{default:.95},momentumFactor:{default:.005}},setup(t,{expose:e}){const n=t,o=$(1),l=$(0);let r=0;const a=S(()=>n.friction),u=S(()=>n.baseSpeed),p=S(()=>n.momentumFactor);function f(s){r||(r=s);const b=s-r;r=s,o.value=u.value+(o.value-u.value)*a.value,l.value+=o.value*b,requestAnimationFrame(f)}function i(s){const b=Math.sqrt(s.movementX**2+s.movementY**2);o.value+=b*p.value}return R(()=>{window.addEventListener("mousemove",i),requestAnimationFrame(f)}),ee(()=>{window.removeEventListener("mousemove",i)}),e({momentum:o,currentValue:l}),(s,b)=>k(s.$slots,"default",{momentum:o.value,currentValue:l.value})}}),je=m({__name:"TestDummyMarkerFlat",props:{size:null},setup(t){return(e,n)=>(c(),g("div",{class:"test-dummy-flat",style:A({width:`${t.size}px`,height:`${t.size}px`})},n[0]||(n[0]=[v("div",{class:"marker"},null,-1)]),4))}}),Ae=j(je,[["__scopeId","data-v-b4ef37ac"]]),Re=m({__name:"TestDummyMarker",setup(t){return(e,n)=>(c(),y(Be,{"base-speed":.1,friction:.95,"momentum-factor":5e-4},{default:_(({currentValue:o})=>[w(Me,{perspective:800,transform:"rotateX(45deg) translateY(3px)"},{default:_(()=>[w(Ae,{size:24,style:A({transform:`rotate(${o}deg)`})},null,8,["style"])]),_:2},1024)]),_:1}))}});export{Pe as _,Fe as a,Re as b};
|
|
|
1 |
+
import{bx as P,d as m,c2 as I,bV as V,c3 as D,b$ as E,x as y,o as c,y as _,m as k,e as d,b_ as N,cc as L,g as $,h,cd as M,bX as z,ce as U,w as H,c as g,by as K,E as X,cf as G,C as W,cg as Y,bJ as J,bL as C,b as w,bK as B,a as v,D as x,l as R,A as Q,bE as Z,bn as j,n as A,br as S,H as ee}from"./index-hDb1Lsb8.js";function O(t){return t?t.flatMap(e=>e.type===P?O(e.children):[e]):[]}const te=m({name:"PrimitiveSlot",inheritAttrs:!1,setup(t,{attrs:e,slots:n}){return()=>{var p,f;if(!n.default)return null;const o=O(n.default()),l=o.findIndex(i=>i.type!==I);if(l===-1)return o;const r=o[l];(p=r.props)==null||delete p.ref;const a=r.props?V(e,r.props):e;e.class&&((f=r.props)!=null&&f.class)&&delete r.props.class;const u=D(r,a);for(const i in a)i.startsWith("on")&&(u.props||(u.props={}),u.props[i]=a[i]);return o.length===1?u:(o[l]=u,o)}}}),ae=["area","img","input"],q=m({name:"Primitive",inheritAttrs:!1,props:{asChild:{type:Boolean,default:!1},as:{type:[String,Object],default:"div"}},setup(t,{attrs:e,slots:n}){const o=t.asChild?"template":t.as;return typeof o=="string"&&ae.includes(o)?()=>E(o,e):o!=="template"?()=>E(t.as,e,{default:n.default}):()=>E(te,e,{default:n.default})}}),ne=m({__name:"VisuallyHidden",props:{feature:{default:"focusable"},asChild:{type:Boolean},as:{default:"span"}},setup(t){return(e,n)=>(c(),y(d(q),{as:e.as,"as-child":e.asChild,"aria-hidden":e.feature==="focusable"?"true":void 0,"data-hidden":e.feature==="fully-hidden"?"":void 0,tabindex:e.feature==="fully-hidden"?"-1":void 0,style:{position:"absolute",border:0,width:"1px",height:"1px",padding:0,margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",clipPath:"inset(50%)",whiteSpace:"nowrap",wordWrap:"normal"}},{default:_(()=>[k(e.$slots,"default")]),_:3},8,["as","as-child","aria-hidden","data-hidden","tabindex"]))}});function le(t,e){const n=`${t}Context`,o=Symbol(n);return[a=>{const u=N(o,a);if(u||u===null)return u;throw new Error(`Injection \`${o.toString()}\` not found. Component must be used within ${Array.isArray(t)?`one of the following components: ${t.join(", ")}`:`\`${t}\``}`)},a=>(L(o,a),a)]}function T(){const t=z(),e=$(),n=h(()=>{var a,u;return["#text","#comment"].includes((a=e.value)==null?void 0:a.$el.nodeName)?(u=e.value)==null?void 0:u.$el.nextElementSibling:M(e)}),o=Object.assign({},t.exposed),l={};for(const a in t.props)Object.defineProperty(l,a,{enumerable:!0,configurable:!0,get:()=>t.props[a]});if(Object.keys(o).length>0)for(const a in o)Object.defineProperty(l,a,{enumerable:!0,configurable:!0,get:()=>o[a]});Object.defineProperty(l,"$el",{enumerable:!0,configurable:!0,get:()=>t.vnode.el}),t.exposed=l;function r(a){e.value=a,a&&(Object.defineProperty(l,"$el",{enumerable:!0,configurable:!0,get:()=>a instanceof Element?a:a.$el}),t.exposed=l)}return{forwardRef:r,currentRef:e,currentElement:n}}function oe(){const t=$(),e=h(()=>{var n,o;return["#text","#comment"].includes((n=t.value)==null?void 0:n.$el.nodeName)?(o=t.value)==null?void 0:o.$el.nextElementSibling:M(t)});return{primitiveElement:t,currentElement:e}}function re(t){return h(()=>{var e;return U(t)?!!((e=M(t))!=null&&e.closest("form")):!0})}const F=m({inheritAttrs:!1,__name:"VisuallyHiddenInputBubble",props:{name:{},value:{},checked:{type:Boolean,default:void 0},required:{type:Boolean},disabled:{type:Boolean},feature:{default:"fully-hidden"}},setup(t){const e=t,{primitiveElement:n,currentElement:o}=oe(),l=h(()=>e.checked??e.value);return H(l,(r,a)=>{if(!o.value)return;const u=o.value,p=window.HTMLInputElement.prototype,i=Object.getOwnPropertyDescriptor(p,"value").set;if(i&&r!==a){const s=new Event("input",{bubbles:!0}),b=new Event("change",{bubbles:!0});i.call(u,r),u.dispatchEvent(s),u.dispatchEvent(b)}}),(r,a)=>(c(),y(ne,V({ref_key:"primitiveElement",ref:n},{...e,...r.$attrs},{as:"input"}),null,16))}}),se=m({inheritAttrs:!1,__name:"VisuallyHiddenInput",props:{name:{},value:{},checked:{type:Boolean,default:void 0},required:{type:Boolean},disabled:{type:Boolean},feature:{default:"fully-hidden"}},setup(t){const e=t,n=h(()=>typeof e.value=="object"&&Array.isArray(e.value)&&e.value.length===0&&e.required),o=h(()=>typeof e.value=="string"||typeof e.value=="number"||typeof e.value=="boolean"?[{name:e.name,value:e.value}]:typeof e.value=="object"&&Array.isArray(e.value)?e.value.flatMap((l,r)=>typeof l=="object"?Object.entries(l).map(([a,u])=>({name:`[${e.name}][${r}][${a}]`,value:u})):{name:`[${e.name}][${r}]`,value:l}):e.value!==null&&typeof e.value=="object"&&!Array.isArray(e.value)?Object.entries(e.value).map(([l,r])=>({name:`[${e.name}][${l}]`,value:r})):[]);return(l,r)=>n.value?(c(),y(F,V({key:l.name},{...e,...l.$attrs},{name:l.name,value:l.value}),null,16,["name","value"])):(c(!0),g(P,{key:1},K(o.value,a=>(c(),y(F,V({key:a.name,ref_for:!0},{...e,...l.$attrs},{name:a.name,value:a.value}),null,16,["name","value"]))),128))}}),[ue,ie]=le("SwitchRoot"),de=m({__name:"SwitchRoot",props:{defaultValue:{type:Boolean},modelValue:{type:[Boolean,null],default:void 0},disabled:{type:Boolean},id:{},value:{default:"on"},asChild:{type:Boolean},as:{default:"button"},name:{},required:{type:Boolean}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,o=e,{disabled:l}=X(n),r=G(n,"modelValue",o,{defaultValue:n.defaultValue,passive:n.modelValue===void 0});function a(){l.value||(r.value=!r.value)}const{forwardRef:u,currentElement:p}=T(),f=re(p),i=h(()=>{var s;return n.id&&p.value?(s=document.querySelector(`[for="${n.id}"]`))==null?void 0:s.innerText:void 0});return ie({modelValue:r,toggleCheck:a,disabled:l}),(s,b)=>(c(),y(d(q),V(s.$attrs,{id:s.id,ref:d(u),role:"switch",type:s.as==="button"?"button":void 0,value:s.value,"aria-label":s.$attrs["aria-label"]||i.value,"aria-checked":d(r),"aria-required":s.required,"data-state":d(r)?"checked":"unchecked","data-disabled":d(l)?"":void 0,"as-child":s.asChild,as:s.as,disabled:d(l),onClick:a,onKeydown:Y(J(a,["prevent"]),["enter"])}),{default:_(()=>[k(s.$slots,"default",{modelValue:d(r)}),d(f)&&s.name?(c(),y(d(se),{key:0,type:"checkbox",name:s.name,disabled:d(l),required:s.required,value:s.value,checked:!!d(r)},null,8,["name","disabled","required","value","checked"])):W("",!0)]),_:3},16,["id","type","value","aria-label","aria-checked","aria-required","data-state","data-disabled","as-child","as","disabled","onKeydown"]))}}),ce=m({__name:"SwitchThumb",props:{asChild:{type:Boolean},as:{default:"span"}},setup(t){const e=ue();return T(),(n,o)=>{var l;return c(),y(d(q),{"data-state":(l=d(e).modelValue)!=null&&l.value?"checked":"unchecked","data-disabled":d(e).disabled.value?"":void 0,"as-child":n.asChild,as:n.as},{default:_(()=>[k(n.$slots,"default")]),_:3},8,["data-state","data-disabled","as-child","as"])}}}),me=m({__name:"Checkbox",props:{modelValue:{type:Boolean,required:!0},modelModifiers:{}},emits:["update:modelValue"],setup(t){const e=C(t,"modelValue");return(n,o)=>(c(),y(d(de),{modelValue:e.value,"onUpdate:modelValue":o[0]||(o[0]=l=>e.value=l),transition:"background duration-250 ease-in-out",outline:"focus-within:none",flex:"~",border:"neutral-300 dark:neutral-700 data-[state=checked]:primary-200 data-[state=unchecked]:neutral-300 focus-within:neutral-800",bg:"data-[state=checked]:primary-400 data-[state=unchecked]:neutral-300 data-[state=checked]:dark:primary-400/80 dark:data-[state=unchecked]:neutral-800",relative:"","h-7":"",w:"12.5","rounded-full":"",shadow:"sm focus-within:shadow-neutral-800 focus-within:[0_0_0_1px] "},{default:_(()=>[w(d(ce),{"my-auto":"","size-6":"",flex:"","items-center":"","justify-center":"","translate-x":"0.5 data-[state=checked]:full","rounded-full":"","bg-white":"","text-xs":"","shadow-xl":"",transition:"transform duration-250 ease-in-out","will-change-transform":""})]),_:1},8,["modelValue"]))}}),pe={flex:"~ col gap-4"},fe={flex:"~ row","items-center":"","gap-2":""},ve={flex:"1"},he={class:"flex items-center gap-1 text-sm font-medium"},ye={class:"text-xs text-neutral-500 dark:text-neutral-400"},Fe=m({__name:"FieldCheckbox",props:B({label:null,description:null},{modelValue:{type:Boolean,required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const e=t,n=C(t,"modelValue");return(o,l)=>(c(),g("label",pe,[v("div",fe,[v("div",ve,[v("div",he,x(e.label),1),v("div",ye,x(e.description),1)]),w(me,{modelValue:n.value,"onUpdate:modelValue":l[0]||(l[0]=r=>n.value=r)},null,8,["modelValue"])])]))}}),be=["min","max","step"],_e=m({__name:"Range",props:B({min:{default:0},max:{default:100},step:{default:1},disabled:{type:Boolean,default:!1},thumbColor:{default:"#9090906e"},trackColor:{default:"gray"},trackValueColor:{default:"red"}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const e=t,n=C(t,"modelValue"),o=h(()=>e.min*1e4),l=h(()=>e.max*1e4),r=h(()=>e.step*1e4),a=$(),u=h({get:()=>n.value*1e4,set:f=>{n.value=f/1e4,p()}});R(()=>{p()});function p(){a.value&&(a.value.style.setProperty("--value",a.value.value),a.value.style.setProperty("--min",a.value.min?a.value.min:e.min.toString()),a.value.style.setProperty("--max",a.value.max?a.value.max:e.max.toString()))}return(f,i)=>Q((c(),g("input",{ref_key:"sliderRef",ref:a,"onUpdate:modelValue":i[0]||(i[0]=s=>u.value=s),type:"range",min:o.value,max:l.value,step:r.value,class:"slider-progress form_input-range",onInput:i[1]||(i[1]=s=>{s.target.style.setProperty("--value",s.target.value)})},null,40,be)),[[Z,u.value,void 0,{number:!0}]])}}),ge=j(_e,[["__scopeId","data-v-6ca6d31c"]]),xe={flex:"~ col gap-4"},Ve={flex:"~ row","items-center":"","gap-2":""},$e={flex:"1"},we={class:"flex items-center gap-1 text-sm font-medium"},ke={class:"text-xs text-neutral-500 dark:text-neutral-400"},Ce={"font-mono":""},Ee={flex:"~ row","items-center":"","gap-2":""},Pe=m({__name:"FieldRange",props:B({min:null,max:null,step:null,label:null,description:null,formatValue:{type:Function}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const e=t,n=C(t,"modelValue");return(o,l)=>{var r;return c(),g("label",xe,[v("div",Ve,[v("div",$e,[v("div",we,x(t.label),1),v("div",ke,x(t.description),1)]),v("span",Ce,x(((r=e.formatValue)==null?void 0:r.call(e,n.value))||n.value),1)]),v("div",Ee,[w(ge,{modelValue:n.value,"onUpdate:modelValue":l[0]||(l[0]=a=>n.value=a),min:t.min||0,max:t.max||1,step:t.step||.01,"w-full":""},null,8,["modelValue","min","max","step"])])])}}}),Se=m({__name:"Volumed",props:{perspective:null,transform:null},setup(t){return(e,n)=>(c(),g("div",{class:"volumed",style:A({perspective:`${t.perspective}px`,transform:t.transform})},[k(e.$slots,"default",{},void 0,!0)],4))}}),Me=j(Se,[["__scopeId","data-v-568551bc"]]),Be=m({__name:"CursorMomentum",props:{baseSpeed:{default:.1},friction:{default:.95},momentumFactor:{default:.005}},setup(t,{expose:e}){const n=t,o=$(1),l=$(0);let r=0;const a=S(()=>n.friction),u=S(()=>n.baseSpeed),p=S(()=>n.momentumFactor);function f(s){r||(r=s);const b=s-r;r=s,o.value=u.value+(o.value-u.value)*a.value,l.value+=o.value*b,requestAnimationFrame(f)}function i(s){const b=Math.sqrt(s.movementX**2+s.movementY**2);o.value+=b*p.value}return R(()=>{window.addEventListener("mousemove",i),requestAnimationFrame(f)}),ee(()=>{window.removeEventListener("mousemove",i)}),e({momentum:o,currentValue:l}),(s,b)=>k(s.$slots,"default",{momentum:o.value,currentValue:l.value})}}),je=m({__name:"TestDummyMarkerFlat",props:{size:null},setup(t){return(e,n)=>(c(),g("div",{class:"test-dummy-flat",style:A({width:`${t.size}px`,height:`${t.size}px`})},n[0]||(n[0]=[v("div",{class:"marker"},null,-1)]),4))}}),Ae=j(je,[["__scopeId","data-v-b4ef37ac"]]),Re=m({__name:"TestDummyMarker",setup(t){return(e,n)=>(c(),y(Be,{"base-speed":.1,friction:.95,"momentum-factor":5e-4},{default:_(({currentValue:o})=>[w(Me,{perspective:800,transform:"rotateX(45deg) translateY(3px)"},{default:_(()=>[w(Ae,{size:24,style:A({transform:`rotate(${o}deg)`})},null,8,["style"])]),_:2},1024)]),_:1}))}});export{Pe as _,Fe as a,Re as b};
|
assets/{TransitionVertical.vue_vue_type_script_setup_true_lang-BNzPx9yx.js → TransitionVertical.vue_vue_type_script_setup_true_lang-BTGItw4h.js}
RENAMED
@@ -1 +1 @@
|
|
1 |
-
import{d as m,x as T,o as l,bB as B,y as b,m as v}from"./index-
|
|
|
1 |
+
import{d as m,x as T,o as l,bB as B,y as b,m as v}from"./index-hDb1Lsb8.js";const n="0px",W=m({__name:"TransitionVertical",props:{duration:{default:250},easingEnter:{default:"ease-in-out"},easingLeave:{default:"ease-in-out"},opacityClosed:{default:0},opacityOpened:{default:1}},setup(c){const r=c;function p(o){return{height:o.style.height,width:o.style.width,position:o.style.position,visibility:o.style.visibility,overflow:o.style.overflow,paddingTop:o.style.paddingTop,paddingBottom:o.style.paddingBottom,borderTopWidth:o.style.borderTopWidth,borderBottomWidth:o.style.borderBottomWidth,marginTop:o.style.marginTop,marginBottom:o.style.marginBottom}}function y(o,t){const{width:i}=getComputedStyle(o);o.style.width=i,o.style.position="absolute",o.style.visibility="hidden",o.style.height="";const{height:s}=getComputedStyle(o);return o.style.width=t.width,o.style.position=t.position,o.style.visibility=t.visibility,o.style.height=n,o.style.overflow="hidden",t.height&&t.height!==n?t.height:s}function h(o,t,i,s,d){const e=o.animate(s,d);o.style.height=t.height,e.onfinish=()=>{o.style.overflow=t.overflow,i()}}function g(o,t){return[{height:n,opacity:r.opacityClosed,paddingTop:n,paddingBottom:n,borderTopWidth:n,borderBottomWidth:n,marginTop:n,marginBottom:n},{height:o,opacity:r.opacityOpened,paddingTop:t.paddingTop,paddingBottom:t.paddingBottom,borderTopWidth:t.borderTopWidth,borderBottomWidth:t.borderBottomWidth,marginTop:t.marginTop,marginBottom:t.marginBottom}]}function u(o,t){const i=o,s=p(i),d=y(i,s),e=g(d,s),a={duration:r.duration,easing:r.easingEnter};h(i,s,t,e,a)}function f(o,t){const i=o,s=p(i),{height:d}=getComputedStyle(i);i.style.height=d,i.style.overflow="hidden";const e=g(d,s).reverse(),a={duration:r.duration,easing:r.easingLeave};h(i,s,t,e,a)}return(o,t)=>(l(),T(B,{css:!1,onEnter:u,onLeave:f},{default:b(()=>[v(o.$slots,"default")]),_:3}))}});export{W as _};
|
assets/{_...all_-CIkXnkHu.js → _...all_-CxEbMPjh.js}
RENAMED
@@ -1 +1 @@
|
|
1 |
-
import{bn as e,c as n,o as c}from"./index-
|
|
|
1 |
+
import{bn as e,c as n,o as c}from"./index-hDb1Lsb8.js";const o={};function _(t,r){return c(),n("div",null," 404 - Page not found ")}const s=e(o,[["render",_]]);export{s as default};
|
assets/{airi-card-DAWA4eQ5.js → airi-card-CbqBsbSf.js}
RENAMED
@@ -1,4 +1,4 @@
|
|
1 |
-
import{f as W,bD as L,h as g,s as O,l as $,q as b,w as q}from"./index-
|
2 |
`),u].join(`
|
3 |
|
4 |
`)}}const Q=W("airi-card",()=>{const a=L("airi-cards",new Map),u=L("airi-card-active-id","default"),n=g(()=>a.value.get(u.value)),P=H(),R=N(),{activeModel:l}=O(P),{activeSpeechVoiceId:m,activeSpeechModel:p}=O(R),B=s=>{const e=crypto.randomUUID();return a.value.set(e,h(s)),e},D=s=>{a.value.delete(s)},V=s=>a.value.get(s);function v(s){var t,r,i,c,d,f,_,y,S,x,C,M,I,w,E,A,j,T,U;const e="data"in s?(r=(t=s.data)==null?void 0:t.extensions)==null?void 0:r.airi:(i=s.extensions)==null?void 0:i.airi,o={consciousness:{model:l.value},speech:{model:p.value,voice_id:m.value}};return e?{modules:{consciousness:{model:((d=(c=e.modules)==null?void 0:c.consciousness)==null?void 0:d.model)??o.consciousness.model},speech:{model:((_=(f=e.modules)==null?void 0:f.speech)==null?void 0:_.model)??o.speech.model,voice_id:((S=(y=e.modules)==null?void 0:y.speech)==null?void 0:S.voice_id)??o.speech.voice_id,pitch:(C=(x=e.modules)==null?void 0:x.speech)==null?void 0:C.pitch,rate:(I=(M=e.modules)==null?void 0:M.speech)==null?void 0:I.rate,ssml:(E=(w=e.modules)==null?void 0:w.speech)==null?void 0:E.ssml,language:(j=(A=e.modules)==null?void 0:A.speech)==null?void 0:j.language},vrm:(T=e.modules)==null?void 0:T.vrm,live2d:(U=e.modules)==null?void 0:U.live2d},agents:e.agents??{}}:{modules:o,agents:{}}}function h(s){if("data"in s){const e=s;return{name:e.data.name,version:e.data.character_version??"1.0.0",description:e.data.description??"",creator:e.data.creator??"",notes:e.data.creator_notes??"",notesMultilingual:e.data.creator_notes_multilingual,personality:e.data.personality??"",scenario:e.data.scenario??"",greetings:[e.data.first_mes,...e.data.alternate_greetings??[]],greetingsGroupOnly:e.data.group_only_greetings??[],systemPrompt:e.data.system_prompt??"",postHistoryInstructions:e.data.post_history_instructions??"",messageExample:e.data.mes_example?e.data.mes_example.split(`<START>
|
|
|
1 |
+
import{f as W,bD as L,h as g,s as O,l as $,q as b,w as q}from"./index-hDb1Lsb8.js";import{j as G}from"./live2d-zip-loader--bTGFeQd.js";import{u as H}from"./consciousness-BRdkM-c-.js";import{u as N}from"./speech-D3H5B80W.js";function k(a,u){return{role:"system",content:[a,G.map(n=>`- ${n}`).join(`
|
2 |
`),u].join(`
|
3 |
|
4 |
`)}}const Q=W("airi-card",()=>{const a=L("airi-cards",new Map),u=L("airi-card-active-id","default"),n=g(()=>a.value.get(u.value)),P=H(),R=N(),{activeModel:l}=O(P),{activeSpeechVoiceId:m,activeSpeechModel:p}=O(R),B=s=>{const e=crypto.randomUUID();return a.value.set(e,h(s)),e},D=s=>{a.value.delete(s)},V=s=>a.value.get(s);function v(s){var t,r,i,c,d,f,_,y,S,x,C,M,I,w,E,A,j,T,U;const e="data"in s?(r=(t=s.data)==null?void 0:t.extensions)==null?void 0:r.airi:(i=s.extensions)==null?void 0:i.airi,o={consciousness:{model:l.value},speech:{model:p.value,voice_id:m.value}};return e?{modules:{consciousness:{model:((d=(c=e.modules)==null?void 0:c.consciousness)==null?void 0:d.model)??o.consciousness.model},speech:{model:((_=(f=e.modules)==null?void 0:f.speech)==null?void 0:_.model)??o.speech.model,voice_id:((S=(y=e.modules)==null?void 0:y.speech)==null?void 0:S.voice_id)??o.speech.voice_id,pitch:(C=(x=e.modules)==null?void 0:x.speech)==null?void 0:C.pitch,rate:(I=(M=e.modules)==null?void 0:M.speech)==null?void 0:I.rate,ssml:(E=(w=e.modules)==null?void 0:w.speech)==null?void 0:E.ssml,language:(j=(A=e.modules)==null?void 0:A.speech)==null?void 0:j.language},vrm:(T=e.modules)==null?void 0:T.vrm,live2d:(U=e.modules)==null?void 0:U.live2d},agents:e.agents??{}}:{modules:o,agents:{}}}function h(s){if("data"in s){const e=s;return{name:e.data.name,version:e.data.character_version??"1.0.0",description:e.data.description??"",creator:e.data.creator??"",notes:e.data.creator_notes??"",notesMultilingual:e.data.creator_notes_multilingual,personality:e.data.personality??"",scenario:e.data.scenario??"",greetings:[e.data.first_mes,...e.data.alternate_greetings??[]],greetingsGroupOnly:e.data.group_only_greetings??[],systemPrompt:e.data.system_prompt??"",postHistoryInstructions:e.data.post_history_instructions??"",messageExample:e.data.mes_example?e.data.mes_example.split(`<START>
|
assets/{anthropic-DZM8jqDl.js → anthropic-D4yWnjWW.js}
RENAMED
@@ -1 +1 @@
|
|
1 |
-
import"./live2d-zip-loader
|
|
|
1 |
+
import"./live2d-zip-loader--bTGFeQd.js";import{d as k,q as x,bG as S,s as U,h as v,l as w,w as V,x as C,o as K,y as u,a as i,b as l,bI as p,e as t}from"./index-hDb1Lsb8.js";import{u as R}from"./providers-adQ6cb75.js";import{_ as I,a as O}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-UCuivhvU.js";import{_ as $}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-CHpN3yiY.js";import{_ as A,a as N}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-CYv3qJbi.js";import{_ as B}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-DTOfxlwP.js";import"./index-Be1NqeGb.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-bS5XNUtd.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-BTGItw4h.js";import"./FieldInput.vue_vue_type_script_setup_true_lang-CG42zMAq.js";import"./Input.vue_vue_type_script_setup_true_lang-DGnmLgZc.js";const e="anthropic",L=k({__name:"anthropic",setup(T){const{t:c}=x(),_=S(),h=R(),{providers:a}=U(h),m=v(()=>h.getProviderMetadata(e)),s=v({get:()=>{var o;return((o=a.value[e])==null?void 0:o.apiKey)||""},set:o=>{a.value[e]||(a.value[e]={}),a.value[e].apiKey=o}}),n=v({get:()=>{var o;return((o=a.value[e])==null?void 0:o.baseUrl)||"https://api.anthropic.com/v1/"},set:o=>{a.value[e]||(a.value[e]={}),a.value[e].baseUrl=o}});w(()=>{var o,r;a.value[e]||(a.value[e]={baseUrl:"https://api.anthropic.com/v1/"}),s.value=((o=a.value[e])==null?void 0:o.apiKey)||"",n.value=((r=a.value[e])==null?void 0:r.baseUrl)||"https://api.anthropic.com/v1/"}),V([s,n],()=>{a.value[e]={...a.value[e],apiKey:s.value,baseUrl:n.value||"https://api.anthropic.com/v1/"}});function g(){a.value[e]={baseUrl:"https://api.anthropic.com/v1/"}}return(o,r)=>{var f,b;return K(),C(t(B),{"provider-name":((f=m.value)==null?void 0:f.localizedName)||"Anthropic | Claude","provider-icon":(b=m.value)==null?void 0:b.icon,"on-back":()=>t(_).back()},{default:u(()=>[r[2]||(r[2]=i("div",{bg:"orange-50 dark:orange-900/20","rounded-xl":"","p-4":"",flex:"~ col gap-3"},[i("h2",{"text-xl":"","font-bold":"",text:"orange-700 dark:orange-500"}," Before you start "),i("p",null,[p(" While Anthropic recently did announce that they are having a beta support for OpenAI SDK compatibility "),i("a",{underline:"",href:"https://docs.anthropic.com/en/api/openai-sdk"},"(you can read more here)"),p(", but due to the implementation details comes with "),i("a",{underline:"",href:"https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/CORS"},"CORS"),p(" restrictions which not aligned with the OpenAI SDK, it's currently not possible to use this provider in the browser. ")]),i("p",null,[p(" If you do need to use this provider, you will need a dedicated proxy backend like a Serverless Function running on "),i("a",{underline:"",href:"https://workers.cloudflare.com/"},"Cloudflare Workers"),p(" or some CORS bypassing services to bypass the CORS restrictions. ")])],-1)),l(t(A),null,{default:u(()=>[l(t(N),{title:t(c)("settings.pages.providers.common.section.basic.title"),description:t(c)("settings.pages.providers.common.section.basic.description"),"on-reset":g},{default:u(()=>{var d;return[l(t($),{modelValue:s.value,"onUpdate:modelValue":r[0]||(r[0]=y=>s.value=y),"provider-name":((d=m.value)==null?void 0:d.localizedName)||"Anthropic",placeholder:"sk-..."},null,8,["modelValue","provider-name"])]}),_:1},8,["title","description"]),l(t(I),{title:t(c)("settings.pages.providers.common.section.advanced.title")},{default:u(()=>[l(t(O),{modelValue:n.value,"onUpdate:modelValue":r[1]||(r[1]=d=>n.value=d),placeholder:"https://api.anthropic.com/v1/"},null,8,["modelValue"])]),_:1},8,["title"])]),_:1})]),_:1},8,["provider-name","provider-icon","on-back"])}}});export{L as default};
|
assets/{audio-Dg7C6ruQ.js → audio-g9DiyU3J.js}
RENAMED
@@ -1 +1 @@
|
|
1 |
-
import{d as s,g as f,c as d,o as p,a as t}from"./index-
|
|
|
1 |
+
import{d as s,g as f,c as d,o as p,a as t}from"./index-hDb1Lsb8.js";const R=s({__name:"audio",setup(_){const a=f(),l=f();function u(o){var r,c,i;if(!o)return;const n=(c=(r=l.value)==null?void 0:r.files)==null?void 0:c[0];if(!n)return;const e=document.createElement("audio");(i=a.value)==null||i.appendChild(e),e.src=URL.createObjectURL(n),e.controls=!0,e.load(),e.play()}return(o,n)=>(p(),d("div",null,[t("div",null,[t("div",{ref_key:"containerRef",ref:a},null,512),t("input",{ref_key:"fileInputRef",ref:l,type:"file",onChange:u},null,544)])]))}});export{R as default};
|
assets/{chat-Dn5NUeJ8.js → chat-BFU2g19v.js}
RENAMED
@@ -1 +1 @@
|
|
1 |
-
import{d as N,bD as W,g as S,c as h,o as y,a as i,A as C,bE as E,e as M,ad as A,bx as P,by as q,t as z,C as U,D as $}from"./index-
|
|
|
1 |
+
import{d as N,bD as W,g as S,c as h,o as y,a as i,A as C,bE as E,e as M,ad as A,bx as P,by as q,t as z,C as U,D as $}from"./index-hDb1Lsb8.js";import{s as K}from"./index-D975M2PQ.js";import"./index-Be1NqeGb.js";var O=()=>{let e=null;return{getStore:()=>(e===null&&console.warn("Woops! Looks like you are calling `getContext` after `await fn()`. Please move `getContext` to top level of handler."),e),run(r,o){e=r;try{return o()}finally{e=null}}}},H=new WeakMap,I=new WeakMap,T=0,F=0,_=e=>{const r=`${T++}`,o={include:t=>n.has(t),with:t=>{const d=`${F++}`,l={[Symbol.toStringTag]:`WorkflowEvent(${r}.${d})`,toString:()=>`WorkflowEvent(${r}.${d})`,toJSON:()=>({event:r,data:t}),get data(){return t}};return n.add(l),Object.freeze(l),I.set(l,o),l}},n=new WeakSet;return H.set(o,n),Object.defineProperty(o,Symbol.toStringTag,{get:()=>`WorkflowEvent<${r}>`}),Object.defineProperty(o,"displayName",{value:`WorkflowEvent<${r}>`}),o.toString=()=>`WorkflowEvent<${r}>`,Object.freeze(o),o},j=e=>e!=null&&typeof e=="object"&&"data"in e,J=e=>e!=null&&typeof e.then=="function";function R(e,r){const o=new Array(e.length);for(const n of r)for(let t=0;t<e.length;t++)if(!o[t]&&e[t].include(n)){o[t]=n;break}return o.filter(Boolean)}var B=O();function V(){const e=B.getStore();if(!e)throw new Error("No context found");return e}var G=O(),D=new WeakMap,Q=({listeners:e})=>{const r=[],o=(a,f,p)=>{let c;const g={get abortController(){return c||(c=new AbortController),c},handler:a,inputs:f,outputs:[],prev:p,next:new Set};g.prev.next.add(g);const v=d(g);G.run(g,()=>{const s=[...new Set([...x.__internal__call_context,...v.__internal__call_context])];B.run(v,()=>{let u=0;const b=()=>{if(u===s.length){let k;try{k=a(...f)}catch(m){if(c??l)(c??l).abort(m);else throw console.error("unhandled error in handler",m),m}J(k)?k.then(m=>{j(m)&&v.sendEvent(m)}):j(k)&&v.sendEvent(k)}const L=s[u];L&&(u++,L(v,f,b))};b()})})},n=a=>{const f=[...r];[...e].filter(([p])=>R(p,f).length===p.length).map(([p,c])=>{const g=R(p,f);g.forEach(v=>{r.splice(r.indexOf(v),1)});for(const v of c)o(v.handler,g,a)})},t=[],d=a=>({get stream(){let f;return new ReadableStream({start:async p=>{f=c=>{let g=D.get(c);for(;g;){if(g===a){p.enqueue(c);break}g=g.prev}},t.push(f)}})},get signal(){return a.abortController.signal},sendEvent:(...f)=>{f.forEach(p=>{D.set(p,a),a.outputs.push(p),r.push(p),t.forEach(c=>c(p)),n(a)})},__internal__call_context:new Set});let l=new AbortController;const x=d({get abortController(){return l||(l=new AbortController),l},inputs:[],outputs:[],handler:null,prev:null,next:new Set});return x};function X(){const e={steps:new Map};return{handle:(r,o)=>{if(e.steps.has(r)){const n=e.steps.get(r),t={get handler(){return o},unsubscribe:()=>{n.delete(t),n.size===0&&e.steps.delete(r)}};return n.add(t),t}else{const n=new Set,t={get handler(){return o},unsubscribe:()=>{n.delete(t),n.size===0&&e.steps.delete(r)}};return n.add(t),e.steps.set(r,n),t}},createContext(){return Q({listeners:e.steps})}}}async function Y(e,r,o){const{stream:n,sendEvent:t}=e.createContext();t(r);for await(const d of n)if(o.include(d))return d;throw new Error("Workflow did not return a stop event")}function Z(e,r){const o=(...n)=>{const t=r.filter(([w])=>w.every((x,a)=>x.include(n[a]))).map(([w,x])=>x),l=V().sendEvent;return(...w)=>{let x=!1;for(let a=0;a<t.length;a++){const f=t[a];if(f.length===w.length&&f.every((p,c)=>p.include(w[c]))){x=!0;break}}return x&&console.warn("Invalid input detected [%s]",w.map(a=>a.data).join(", ")),l(...w)}};return{...e,handle:(n,t)=>{const d=(...l)=>{const w=V();return t(w.safeSendEvent,...l)};return e.handle(n,d)},createContext(){const n=e.createContext();return n.__internal__call_context.add((t,d,l)=>{t.safeSendEvent=o(...d),l()}),n}}}const ee={flex:"","flex-col":"","gap-2":""},te={flex:"~ col","gap-2":""},ne={flex:"","flex-col":"","gap-2":""},re={grid:"","grid-cols-2":"","gap-2":""},oe={flex:"","items-center":"","gap-2":""},ae={flex:"","items-center":"","gap-2":""},le={flex:"","items-center":"","gap-2":""},se={key:0},ue={key:1},fe=N({__name:"chat",setup(e){const r=W("settings/llm/baseUrl","https://openrouter.ai/api/v1/"),o=W("settings/llm/apiKey",""),n=W("settings/llm/model","openai/gpt-4o-mini"),t=S(""),d=S([]),l=S({role:"assistant",content:""}),w=S(!1),x=_(),a=_(),f=_(),p=_(),c=_();async function g(){w.value=!0;try{const v=Z(X(),[[[x],[a,c]],[[a],[f]],[[f],[p]]]);v.handle([x],async s=>{l.value={role:"assistant",content:""},d.value.push({role:"user",content:t.value}),d.value.push(l.value);const u=await K({baseURL:r.value,apiKey:o.value,model:n.value,messages:d.value.slice(0,d.value.length-1).map(b=>z(b))});for await(const b of u.chunkStream)s(a.with(b.choices[0].delta.content||""));return c.with()}),v.handle([a],async(s,u)=>{l.value.content?l.value.content+=u.data:l.value.content=u.data}),await Y(v,x.with(),c)}catch(v){console.error(v)}finally{w.value=!1}}return(v,s)=>(y(),h("div",ee,[i("div",te,[i("div",ne,[s[7]||(s[7]=i("div",null,[i("span",{"text-neutral-500":"","dark:text-neutral-400":""},"LLM")],-1)),i("div",re,[i("label",oe,[s[4]||(s[4]=i("span",{"text-nowrap":""}," Base URL ",-1)),C(i("input",{"onUpdate:modelValue":s[0]||(s[0]=u=>A(r)?r.value=u:null),border:"focus:primary-100 dark:focus:primary-400/50 2 solid neutral-200 dark:neutral-800",transition:"all duration-200 ease-in-out",text:"disabled:neutral-400 dark:disabled:neutral-600",cursor:"disabled:not-allowed","w-full":"","rounded-lg":"","px-2":"","py-1":"","text-nowrap":"","text-sm":"","outline-none":"",shadow:"sm",bg:"neutral-100 dark:neutral-800 focus:neutral-50 dark:focus:neutral-900"},null,512),[[E,M(r)]])]),i("label",ae,[s[5]||(s[5]=i("span",{"text-nowrap":""}," API Key ",-1)),C(i("input",{"onUpdate:modelValue":s[1]||(s[1]=u=>A(o)?o.value=u:null),type:"password",border:"focus:primary-100 dark:focus:primary-400/50 2 solid neutral-200 dark:neutral-800",transition:"all duration-200 ease-in-out",text:"disabled:neutral-400 dark:disabled:neutral-600",cursor:"disabled:not-allowed","w-full":"","rounded-lg":"","px-2":"","py-1":"","text-nowrap":"","text-sm":"","outline-none":"",shadow:"sm",bg:"neutral-100 dark:neutral-800 focus:neutral-50 dark:focus:neutral-900"},null,512),[[E,M(o)]])]),i("label",le,[s[6]||(s[6]=i("span",{"text-nowrap":""}," Model ",-1)),C(i("input",{"onUpdate:modelValue":s[2]||(s[2]=u=>A(n)?n.value=u:null),border:"focus:primary-100 dark:focus:primary-400/50 2 solid neutral-200 dark:neutral-800",transition:"all duration-200 ease-in-out",text:"disabled:neutral-400 dark:disabled:neutral-600",cursor:"disabled:not-allowed","w-full":"","rounded-lg":"","px-2":"","py-1":"","text-nowrap":"","text-sm":"","outline-none":"",shadow:"sm",bg:"neutral-100 dark:neutral-800 focus:neutral-50 dark:focus:neutral-900"},null,512),[[E,M(n)]])])])]),i("div",null,[C(i("textarea",{"onUpdate:modelValue":s[3]||(s[3]=u=>t.value=u),border:"focus:primary-100 dark:focus:primary-400/50 2 solid neutral-200 dark:neutral-800",transition:"all duration-200 ease-in-out",text:"disabled:neutral-400 dark:disabled:neutral-600",cursor:"disabled:not-allowed","w-full":"","rounded-lg":"","px-2":"","py-1":"","text-nowrap":"","text-sm":"","outline-none":"",shadow:"sm",bg:"neutral-100 dark:neutral-800 focus:neutral-50 dark:focus:neutral-900"},null,512),[[E,t.value]])]),i("button",{"rounded-lg":"",bg:"blue-100 dark:blue-900","px-4":"","py-2":"",onClick:g}," Send "),i("div",null,[(y(!0),h(P,null,q(d.value,(u,b)=>(y(),h("div",{key:b},[u.role==="user"?(y(),h("div",se,[i("span",null,$(u.content),1)])):U("",!0),u.role==="assistant"?(y(),h("div",ue,[i("span",null,$(u.content),1)])):U("",!0)]))),128))])])]))}});export{fe as default};
|
assets/{cloudflare-workers-ai-BuVW7ZIH.js → cloudflare-workers-ai-C4lOUkFP.js}
RENAMED
@@ -1 +1 @@
|
|
1 |
-
import"./live2d-zip-loader
|
|
|
1 |
+
import"./live2d-zip-loader--bTGFeQd.js";import{d as V,bK as w,bL as y,x as k,o as I,q,bG as x,s as K,h as v,l as M,w as $,y as f,b as c,e as l}from"./index-hDb1Lsb8.js";import{u as P}from"./providers-adQ6cb75.js";import{_ as z}from"./FieldInput.vue_vue_type_script_setup_true_lang-CG42zMAq.js";import{_ as A}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-CHpN3yiY.js";import{_ as B,a as C}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-CYv3qJbi.js";import{_ as N}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-DTOfxlwP.js";import"./index-Be1NqeGb.js";import"./Input.vue_vue_type_script_setup_true_lang-DGnmLgZc.js";const R=V({__name:"ProviderAccountIdInput",props:w({placeholder:null,required:{type:Boolean},label:null,description:null},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(p){const r=p,u=y(p,"modelValue");return(n,e)=>(I(),k(z,{modelValue:u.value,"onUpdate:modelValue":e[0]||(e[0]=t=>u.value=t),label:r.label||"Account ID",description:r.description||"Account ID",placeholder:r.placeholder,required:r.required,type:"text"},null,8,["modelValue","label","description","placeholder","required"]))}}),a="cloudflare-workers-ai",F=V({__name:"cloudflare-workers-ai",setup(p){const{t:r}=q(),u=x(),n=P(),{providers:e}=K(n),t=v(()=>n.getProviderMetadata(a)),s=v({get:()=>{var o;return((o=e.value[a])==null?void 0:o.apiKey)||""},set:o=>{e.value[a]||(e.value[a]={}),e.value[a].apiKey=o}}),d=v({get:()=>{var o;return((o=e.value[a])==null?void 0:o.accountId)||""},set:o=>{e.value[a]||(e.value[a]={}),e.value[a].accountId=o}});M(()=>{var o,i;n.initializeProvider(a),s.value=((o=e.value[a])==null?void 0:o.apiKey)||"",d.value=((i=e.value[a])==null?void 0:i.accountId)||""}),$([s,d],()=>{e.value[a]={...e.value[a],apiKey:s.value,accountId:d.value}});function h(){var o;e.value[a]={...(o=t.value)==null?void 0:o.defaultOptions}}return(o,i)=>{var _,g;return I(),k(l(N),{"provider-name":(_=t.value)==null?void 0:_.localizedName,"provider-icon-color":(g=t.value)==null?void 0:g.iconColor,"on-back":()=>l(u).back()},{default:f(()=>[c(l(B),null,{default:f(()=>[c(l(C),{title:l(r)("settings.pages.providers.common.section.basic.title"),description:l(r)("settings.pages.providers.common.section.basic.description"),"on-reset":h},{default:f(()=>{var b;return[c(l(A),{modelValue:s.value,"onUpdate:modelValue":i[0]||(i[0]=m=>s.value=m),"provider-name":(b=t.value)==null?void 0:b.localizedName,placeholder:l(r)("settings.pages.providers.provider.cloudflare-workers-ai.fields.field.api-key.placeholder")},null,8,["modelValue","provider-name","placeholder"]),c(l(R),{modelValue:d.value,"onUpdate:modelValue":i[1]||(i[1]=m=>d.value=m),label:l(r)("settings.pages.providers.provider.cloudflare-workers-ai.fields.field.account-id.label"),description:l(r)("settings.pages.providers.provider.cloudflare-workers-ai.fields.field.account-id.description"),placeholder:l(r)("settings.pages.providers.provider.cloudflare-workers-ai.fields.field.account-id.placeholder")},null,8,["modelValue","label","description","placeholder"])]}),_:1},8,["title","description"])]),_:1})]),_:1},8,["provider-name","provider-icon-color","on-back"])}}});export{F as default};
|
assets/{consciousness-C4xyvmr3.js → consciousness-BRdkM-c-.js}
RENAMED
@@ -1 +1 @@
|
|
1 |
-
import{f as P,bD as n,g as M,h as r,w as L}from"./index-
|
|
|
1 |
+
import{f as P,bD as n,g as M,h as r,w as L}from"./index-hDb1Lsb8.js";import{u as w}from"./providers-adQ6cb75.js";const h=P("consciousness",()=>{const o=w(),s=n("settings/consciousness/active-provider",""),c=n("settings/consciousness/active-model",""),d=n("settings/consciousness/active-custom-model",""),l=M({}),i=M(""),m=r(()=>{var e;return((e=o.getProviderMetadata(s.value))==null?void 0:e.capabilities.listModels)!==void 0}),a=r(()=>o.getModelsForProvider(s.value)),f=r(()=>o.isLoadingModels[s.value]||!1),g=r(()=>o.modelLoadError[s.value]||null),p=r(()=>{if(!i.value.trim())return a.value;const e=i.value.toLowerCase().trim();return a.value.filter(t=>t.name.toLowerCase().includes(e)||t.id.toLowerCase().includes(e)||t.description&&t.description.toLowerCase().includes(e))});function u(){c.value="",d.value="",l.value={},i.value=""}async function v(e){var t;e&&((t=o.getProviderMetadata(s.value))==null?void 0:t.capabilities.listModels)!==void 0&&o.getModelsForProvider(e).length===0&&await o.fetchModelsForProvider(e)}return L(s,async e=>{await v(e),u()}),{activeProvider:s,activeModel:c,customModelName:d,expandedDescriptions:l,modelSearchQuery:i,supportsModelListing:m,providerModels:a,isLoadingActiveProviderModels:f,activeProviderModelError:g,filteredModels:p,resetModelSelection:u,loadModelsForProvider:v}});export{h as u};
|
assets/{consciousness-x6W39XLe.js → consciousness-C-h5B1sq.js}
RENAMED
@@ -1 +1 @@
|
|
1 |
-
import{d as L,s as b,q as U,bG as q,l as B,bw as z,c as r,o as l,A as h,a as e,e as s,D as n,C as f,bx as k,by as E,b as T,y as A,bo as F,x as y,ad as u,bE as G}from"./index-
|
|
|
1 |
+
import{d as L,s as b,q as U,bG as q,l as B,bw as z,c as r,o as l,A as h,a as e,e as s,D as n,C as f,bx as k,by as E,b as T,y as A,bo as F,x as y,ad as u,bE as G}from"./index-hDb1Lsb8.js";import{R as Q,a as j}from"./RadioCardDetailManySelect-D3zSF9Ox.js";import"./live2d-zip-loader--bTGFeQd.js";import{u as I}from"./consciousness-BRdkM-c-.js";import{u as $}from"./providers-adQ6cb75.js";import{b as w}from"./route-block-B_A1xBdJ.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-BTGItw4h.js";import"./Input.vue_vue_type_script_setup_true_lang-DGnmLgZc.js";import"./index-Be1NqeGb.js";const H={flex:"~ row","items-center":"","gap-2":"",initial:{opacity:0,x:10},enter:{opacity:1,x:0},leave:{opacity:0,x:-10},duration:250},J={relative:""},K={absolute:"","left-0":"","top-0":"","translate-y":"[-80%]"},O={text:"neutral-300 dark:neutral-500","text-nowrap":""},W={"text-nowrap":"","text-3xl":"","font-semibold":""},X={bg:"neutral-50 dark:[rgba(0,0,0,0.3)]","rounded-xl":"","p-4":"",flex:"~ col gap-4"},Y={flex:"~ col gap-4"},Z={class:"text-lg text-neutral-500 md:text-2xl dark:text-neutral-500"},ee={text:"neutral-400 dark:neutral-400"},se={"max-w-full":""},te={key:0,flex:"~ row gap-4",style:{"scrollbar-width":"none"},"min-w-0":"","of-x-scroll":"","scroll-smooth":"",role:"radiogroup"},oe={key:1},ne={key:0},ie={flex:"~ col gap-4"},le={class:"text-lg md:text-2xl"},re={text:"neutral-400 dark:neutral-400"},de={key:0,class:"flex items-center justify-center py-4"},ae={key:1,class:"flex items-center gap-3 border border-red-200 rounded-lg bg-red-50 p-4 dark:border-red-800 dark:bg-red-900/20"},ce={class:"flex flex-col"},ue={class:"font-medium"},pe={class:"text-sm text-red-600 dark:text-red-400"},me={key:2,class:"flex items-center gap-3 border border-amber-200 rounded-lg bg-amber-50 p-4 dark:border-amber-800 dark:bg-amber-900/20"},xe={class:"flex flex-col"},ve={class:"font-medium"},ge={class:"text-sm text-amber-600 dark:text-amber-400"},_e={key:1},be={flex:"~ col gap-4"},he={class:"text-lg text-neutral-500 md:text-2xl dark:text-neutral-400"},fe={text:"neutral-400 dark:neutral-500"},ke={class:"bg-primary-50 border-primary-200 dark:bg-primary-900/20 dark:border-primary-800 flex items-center gap-3 border rounded-lg p-4"},ye={class:"flex flex-col"},we={class:"font-medium"},Me={class:"dark:text-primary-400 text-primary-600 text-sm"},Ce={class:"mt-2"},Ve={class:"mb-1 block text-sm font-medium"},Pe=["placeholder"],Se=L({__name:"consciousness",setup(Ne){const M=$(),m=I(),{availableProviders:C,availableTextGenerationsProvidersMetadata:V}=b(M),{activeProvider:d,activeModel:a,customModelName:P,modelSearchQuery:c,supportsModelListing:x,providerModels:p,isLoadingActiveProviderModels:v,activeProviderModelError:g}=b(m),{t:o}=U(),S=q();B(async()=>{await m.loadModelsForProvider(d.value)});function N(_){P.value=_}return(_,t)=>{const R=z("motion");return l(),r(k,null,[h((l(),r("div",H,[e("button",{onClick:t[0]||(t[0]=i=>s(S).back())},t[5]||(t[5]=[e("div",{"i-solar:alt-arrow-left-line-duotone":"","text-xl":""},null,-1)])),e("h1",J,[e("div",K,[e("span",O,n(s(o)("settings.pages.modules.title")),1)]),e("div",W,n(s(o)("settings.pages.modules.consciousness.title")),1)])])),[[R]]),e("div",X,[e("div",null,[e("div",Y,[e("div",null,[e("h2",Z,n(s(o)("settings.pages.providers.title")),1),e("div",ee,[e("span",null,n(s(o)("settings.pages.modules.consciousness.sections.section.provider-model-selection.description")),1)])]),e("div",se,[s(C).length>0?(l(),r("fieldset",te,[(l(!0),r(k,null,E(s(V),i=>(l(),y(s(j),{id:i.id,key:i.id,modelValue:s(d),"onUpdate:modelValue":t[1]||(t[1]=D=>u(d)?d.value=D:null),name:"provider",value:i.id,title:i.localizedName,description:i.localizedDescription},null,8,["id","modelValue","value","title","description"]))),128))])):(l(),r("div",oe,[T(s(F),{class:"flex items-center gap-3 rounded-lg p-4",border:"2 dashed neutral-200 dark:neutral-800",bg:"neutral-50 dark:neutral-800",transition:"colors duration-200 ease-in-out",to:"/settings/providers"},{default:A(()=>t[6]||(t[6]=[e("div",{"i-solar:warning-circle-line-duotone":"",class:"text-2xl text-amber-500 dark:text-amber-400"},null,-1),e("div",{class:"flex flex-col"},[e("span",{class:"font-medium"},"No Providers Configured"),e("span",{class:"text-sm text-neutral-400 dark:text-neutral-500"},"Click here to set up your LLM providers")],-1),e("div",{"i-solar:arrow-right-line-duotone":"",class:"ml-auto text-xl text-neutral-400 dark:text-neutral-500"},null,-1)])),_:1})]))])])]),s(d)&&s(x)?(l(),r("div",ne,[e("div",ie,[e("div",null,[e("h2",le,n(s(o)("settings.pages.modules.consciousness.sections.section.provider-model-selection.title")),1),e("div",re,[e("span",null,n(s(o)("settings.pages.modules.consciousness.sections.section.provider-model-selection.subtitle")),1)])]),s(v)?(l(),r("div",de,[t[7]||(t[7]=e("div",{class:"mr-2 animate-spin"},[e("div",{"i-solar:spinner-line-duotone":"","text-xl":""})],-1)),e("span",null,n(s(o)("settings.pages.modules.consciousness.sections.section.provider-model-selection.loading")),1)])):s(g)?(l(),r("div",ae,[t[8]||(t[8]=e("div",{"i-solar:close-circle-line-duotone":"",class:"text-2xl text-red-500 dark:text-red-400"},null,-1)),e("div",ce,[e("span",ue,n(s(o)("settings.pages.modules.consciousness.sections.section.provider-model-selection.error")),1),e("span",pe,n(s(g)),1)])])):s(p).length===0&&!s(v)?(l(),r("div",me,[t[9]||(t[9]=e("div",{"i-solar:info-circle-line-duotone":"",class:"text-2xl text-amber-500 dark:text-amber-400"},null,-1)),e("div",xe,[e("span",ve,n(s(o)("settings.pages.modules.consciousness.sections.section.provider-model-selection.no_models")),1),e("span",ge,n(s(o)("settings.pages.modules.consciousness.sections.section.provider-model-selection.no_models_description")),1)])])):s(p).length>0?(l(),y(s(Q),{key:3,modelValue:s(a),"onUpdate:modelValue":t[2]||(t[2]=i=>u(a)?a.value=i:null),"search-query":s(c),"onUpdate:searchQuery":t[3]||(t[3]=i=>u(c)?c.value=i:null),items:s(p),searchable:!0,"search-placeholder":s(o)("settings.pages.modules.consciousness.sections.section.provider-model-selection.search_placeholder"),"search-no-results-title":s(o)("settings.pages.modules.consciousness.sections.section.provider-model-selection.no_search_results"),"search-no-results-description":s(o)("settings.pages.modules.consciousness.sections.section.provider-model-selection.no_search_results_description",{query:s(c)}),"search-results-text":s(o)("settings.pages.modules.consciousness.sections.section.provider-model-selection.search_results",{count:"{count}",total:"{total}"}),"custom-input-placeholder":s(o)("settings.pages.modules.consciousness.sections.section.provider-model-selection.custom_model_placeholder"),"expand-button-text":s(o)("settings.pages.modules.consciousness.sections.section.provider-model-selection.expand"),"collapse-button-text":s(o)("settings.pages.modules.consciousness.sections.section.provider-model-selection.collapse"),"onUpdate:customValue":N},null,8,["modelValue","search-query","items","search-placeholder","search-no-results-title","search-no-results-description","search-results-text","custom-input-placeholder","expand-button-text","collapse-button-text"])):f("",!0)])])):s(d)&&!s(x)?(l(),r("div",_e,[e("div",be,[e("div",null,[e("h2",he,n(s(o)("settings.pages.modules.consciousness.sections.section.provider-model-selection.title")),1),e("div",fe,[e("span",null,n(s(o)("settings.pages.modules.consciousness.sections.section.provider-model-selection.subtitle")),1)])]),e("div",ke,[t[10]||(t[10]=e("div",{"i-solar:info-circle-line-duotone":"",class:"text-primary-500 dark:text-primary-400 text-2xl"},null,-1)),e("div",ye,[e("span",we,n(s(o)("settings.pages.modules.consciousness.sections.section.provider-model-selection.not_supported")),1),e("span",Me,n(s(o)("settings.pages.modules.consciousness.sections.section.provider-model-selection.not_supported_description")),1)])]),e("div",Ce,[e("label",Ve,n(s(o)("settings.pages.modules.consciousness.sections.section.provider-model-selection.manual_model_name")),1),h(e("input",{"onUpdate:modelValue":t[4]||(t[4]=i=>u(a)?a.value=i:null),type:"text",class:"w-full border border-neutral-300 rounded bg-white px-3 py-2 dark:border-neutral-700 dark:bg-neutral-900",placeholder:s(o)("settings.pages.modules.consciousness.sections.section.provider-model-selection.manual_model_placeholder")},null,8,Pe),[[G,s(a)]])])])])):f("",!0)]),t[11]||(t[11]=e("div",{text:"neutral-200/50 dark:neutral-600/20","pointer-events-none":"",fixed:"","bottom-0":"","right-0":"","z--1":"","translate-x-10":"","translate-y-10":""},[e("div",{text:"40","i-lucide:ghost":""})],-1))],64)}}});typeof w=="function"&&w(Se);export{Se as default};
|
assets/{deepseek-CrysIhkq.js → deepseek-CB4tx-Ko.js}
RENAMED
@@ -1 +1 @@
|
|
1 |
-
import"./live2d-zip-loader
|
|
|
1 |
+
import"./live2d-zip-loader--bTGFeQd.js";import{d as k,q as U,bG as V,s as y,h as c,l as $,w as K,x as h,o as x,y as u,b as l,e as t}from"./index-hDb1Lsb8.js";import{u as w}from"./providers-adQ6cb75.js";import{_ as z,a as C}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-UCuivhvU.js";import{_ as M}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-CHpN3yiY.js";import{_ as N,a as P}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-CYv3qJbi.js";import{_ as R}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-DTOfxlwP.js";import"./index-Be1NqeGb.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-bS5XNUtd.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-BTGItw4h.js";import"./FieldInput.vue_vue_type_script_setup_true_lang-CG42zMAq.js";import"./Input.vue_vue_type_script_setup_true_lang-DGnmLgZc.js";const a="deepseek",J=k({__name:"deepseek",setup(S){const{t:d}=U(),_=V(),m=w(),{providers:o}=y(m),n=c(()=>m.getProviderMetadata(a)),r=c({get:()=>{var e;return((e=o.value[a])==null?void 0:e.apiKey)||""},set:e=>{o.value[a]||(o.value[a]={}),o.value[a].apiKey=e}}),i=c({get:()=>{var e;return((e=o.value[a])==null?void 0:e.baseUrl)||""},set:e=>{o.value[a]||(o.value[a]={}),o.value[a].baseUrl=e}});$(()=>{var e,s;m.initializeProvider(a),r.value=((e=o.value[a])==null?void 0:e.apiKey)||"",i.value=((s=o.value[a])==null?void 0:s.baseUrl)||""}),K([r,i],()=>{o.value[a]={...o.value[a],apiKey:r.value,baseUrl:i.value||""}});function b(){var e;o.value[a]={...(e=n.value)==null?void 0:e.defaultOptions}}return(e,s)=>{var v,f;return x(),h(t(R),{"provider-name":(v=n.value)==null?void 0:v.localizedName,"provider-icon-color":(f=n.value)==null?void 0:f.iconColor,"on-back":()=>t(_).back()},{default:u(()=>[l(t(N),null,{default:u(()=>[l(t(P),{title:t(d)("settings.pages.providers.common.section.basic.title"),description:t(d)("settings.pages.providers.common.section.basic.description"),"on-reset":b},{default:u(()=>{var p;return[l(t(M),{modelValue:r.value,"onUpdate:modelValue":s[0]||(s[0]=g=>r.value=g),"provider-name":(p=n.value)==null?void 0:p.localizedName,placeholder:"sk-..."},null,8,["modelValue","provider-name"])]}),_:1},8,["title","description"]),l(t(z),{title:t(d)("settings.pages.providers.common.section.advanced.title")},{default:u(()=>[l(t(C),{modelValue:i.value,"onUpdate:modelValue":s[1]||(s[1]=p=>i.value=p),placeholder:"https://api.deepseek.com/v1/"},null,8,["modelValue"])]),_:1},8,["title"])]),_:1})]),_:1},8,["provider-name","provider-icon-color","on-back"])}}});export{J as default};
|
assets/{default-3kSj1ZoR.js → default-DolhCkLR.js}
RENAMED
@@ -1 +1 @@
|
|
1 |
-
import{d as n,u as r,c,a,b as t,e,n as i,R as m,o as l}from"./index-
|
|
|
1 |
+
import{d as n,u as r,c,a,b as t,e,n as i,R as m,o as l}from"./index-hDb1Lsb8.js";import{H as x}from"./HeaderLink-DavtcSnn.js";const f={"mb-4":"","w-full":"","gap-2":"",class:"px-0 py-1 md:px-3 md:py-3"},_={class:"px-3 py-2 md:px-5 md:py-5",flex:"~ col gap-4","mx-auto":"","max-w-screen-xl":""},$=n({__name:"default",setup(u){const{top:o,right:p,bottom:s,left:d}=r();return(g,y)=>(l(),c("div",{"p-2":"",style:i({paddingTop:`${e(o)}px`,paddingRight:`${e(p)}px`,paddingBottom:`${e(s)}px`,paddingLeft:`${e(d)}px`})},[a("div",f,[t(x)]),a("div",_,[t(e(m))])],4))}});export{$ as default};
|
assets/{default-node-DzW5muPs.js → default-node-BGL82aP-.js}
RENAMED
@@ -1 +1 @@
|
|
1 |
-
import{cp as t}from"./index-
|
|
|
1 |
+
import{cp as t}from"./index-hDb1Lsb8.js";async function s(){const{createRequire:a}=await t(async()=>{const{createRequire:o}=await import("./__vite-browser-external-FmFgRqLi.js");return{createRequire:o}},[]),{dirname:n,resolve:e}=await t(async()=>{const{dirname:o,resolve:c}=await import("./__vite-browser-external-FmFgRqLi.js");return{dirname:o,resolve:c}},[]),d=a(import.meta.url),r=n(d.resolve("@duckdb/duckdb-wasm"));return{mvp:{mainModule:e(r,"./duckdb-mvp.wasm"),mainWorker:e(r,"./duckdb-node-mvp.worker.cjs")},eh:{mainModule:e(r,"./duckdb-eh.wasm"),mainWorker:e(r,"./duckdb-node-eh.worker.cjs")}}}export{s as getBundles};
|
assets/{delays-HBOKcZm5.js → delays-F63qeUW3.js}
RENAMED
@@ -1 +1 @@
|
|
1 |
-
import{b as v,_,l as b}from"./queues-
|
|
|
1 |
+
import{b as v,_,l as b}from"./queues-DEhcWTMJ.js";import"./live2d-zip-loader--bTGFeQd.js";import{d as k,g as d,c as s,o as l,a as e,b as y,e as x,D as i,bx as f,by as p}from"./index-hDb1Lsb8.js";import"./index-BNcJmkAi.js";import"./queue-c563jmhe.js";const z={flex:"","flex-col":"","gap-2":"","p-2":""},w={flex:"","flex-row":"","gap-2":""},h={"rounded-lg":"",bg:"zinc-100 dark:zinc-700","p-4":""},M={"w-full":"",flex:"","flex-row":"","gap-4":""},V={"w-full":"","rounded-lg":"",bg:"zinc-100 dark:zinc-700","p-2":""},D={"w-full":"","rounded-lg":"",bg:"zinc-100 dark:zinc-700","p-2":""},N=k({__name:"delays",setup(E){const t=d(""),m=d([]),c=d([]),r=d(!1),u=v();u.onHandlerEvent("delay",a=>{c.value.push(a)});function g(){r.value=!0;const a=t.value.split("");for(const n of a)u.add(n);u.add(b),t.value="",r.value=!1}return(a,n)=>(l(),s("div",z,[e("div",w,[y(x(_),{modelValue:t.value,"onUpdate:modelValue":n[0]||(n[0]=o=>t.value=o),placeholder:"Message",p:"2",bg:"zinc-100 dark:zinc-700","w-full":"","rounded-lg":"","outline-none":"",onSubmit:g},null,8,["modelValue"]),e("button",h,i(r.value?"Processing...":"Send"),1)]),e("div",M,[e("div",V,[n[1]||(n[1]=e("h3",{"font-semibold":""}," Emotion Message ",-1)),(l(!0),s(f,null,p(m.value,o=>(l(),s("div",{key:o},[e("div",null,i(o),1)]))),128))]),e("div",D,[n[2]||(n[2]=e("h3",{"font-semibold":""}," Delays ",-1)),(l(!0),s(f,null,p(c.value,o=>(l(),s("div",{key:o},[e("div",null,i(o)+"s",1)]))),128))])])]))}});export{N as default};
|
assets/{elevenlabs-Dh3dKYgb.js → elevenlabs-L17nDlYs.js}
RENAMED
@@ -1 +1 @@
|
|
1 |
-
import"./live2d-zip-loader
|
|
|
1 |
+
import"./live2d-zip-loader--bTGFeQd.js";import{d as y,s as S,h as i,x as w,o as k,y as u,b as d,e as r}from"./index-hDb1Lsb8.js";import{u as x}from"./providers-adQ6cb75.js";import{u as C}from"./speech-D3H5B80W.js";import{_ as B,a as L,b as V}from"./SpeechVoiceSettings.vue_vue_type_script_setup_true_lang-D0Yiu-Ma.js";import"./index-Be1NqeGb.js";import"./TestDummyMarker.vue_vue_type_script_setup_true_lang-DvXVr5Qy.js";import"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-UCuivhvU.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-bS5XNUtd.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-BTGItw4h.js";import"./FieldInput.vue_vue_type_script_setup_true_lang-CG42zMAq.js";import"./Input.vue_vue_type_script_setup_true_lang-DGnmLgZc.js";import"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-CHpN3yiY.js";import"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-CYv3qJbi.js";const t="elevenlabs",m="eleven_multilingual_v2",q=y({__name:"elevenlabs",setup(P){const n={similarityBoost:.75,stability:.5,speed:1,style:0,useSpeakerBoost:!0},a=C(),s=x(),{providers:v}=S(s),f=i(()=>{var e;return!!((e=v.value[t])!=null&&e.apiKey)}),g=i(()=>a.availableVoices[t]||[]),h=i(()=>a.availableLanguages);async function _(e,l,p){const o=s.getProviderInstance(t);if(!o)throw new Error("Failed to initialize speech provider");const c=s.getProviderConfig(t),b=c.model||m;return await a.speech(o,b,e,l,{...c,...n})}return(e,l)=>(k(),w(r(V),{"provider-id":t,"default-model":m,"additional-settings":n},{"voice-settings":u(({voiceSettings:p,updateVoiceSettings:o})=>[d(r(L),{settings:p,"show-similarity-boost":!0,"show-stability":!0,"show-speed":!0,"show-style":!0,"show-speaker-boost":!0,onUpdate:o},null,8,["settings","onUpdate"])]),playground:u(()=>[d(r(B),{"available-voices":g.value,"available-languages":h.value,"generate-speech":_,"api-key-configured":f.value,"default-text":"Hello! This is a test of the ElevenLabs voice synthesis."},null,8,["available-voices","available-languages","api-key-configured"])]),_:1}))}});export{q as default};
|
assets/{emotions-C1vttnju.js → emotions-CNzOYGQn.js}
RENAMED
@@ -1 +1 @@
|
|
1 |
-
import{a as _,_ as b,l as k}from"./queues-
|
|
|
1 |
+
import{a as _,_ as b,l as k}from"./queues-DEhcWTMJ.js";import"./live2d-zip-loader--bTGFeQd.js";import{d as x,g as u,c as s,o as t,a as e,b as z,e as h,D as i,bx as f,by as m}from"./index-hDb1Lsb8.js";import{u as w}from"./queue-c563jmhe.js";const y={flex:"","flex-col":"","gap-2":"","p-2":""},M={flex:"","flex-row":"","gap-2":""},V={"rounded-lg":"",bg:"zinc-100 dark:zinc-700","p-4":""},E={"w-full":"",flex:"","flex-row":"","gap-4":""},Q={"w-full":"","rounded-lg":"",bg:"zinc-100 dark:zinc-700","p-2":""},S={"w-full":"","rounded-lg":"",bg:"zinc-100 dark:zinc-700","p-2":""},N=x({__name:"emotions",setup(B){const l=u(""),p=u([]),r=u([]),d=u(!1),g=w({handlers:[async a=>{r.value.push(a.data)}]}),c=_(g);function v(){d.value=!0;const a=l.value.split("");for(const o of a)c.add(o);c.add(k),l.value="",d.value=!1}return(a,o)=>(t(),s("div",y,[e("div",M,[z(h(b),{modelValue:l.value,"onUpdate:modelValue":o[0]||(o[0]=n=>l.value=n),placeholder:"Message",p:"2",bg:"zinc-100 dark:zinc-700","w-full":"","rounded-lg":"","outline-none":"",onSubmit:v},null,8,["modelValue"]),e("button",V,i(d.value?"Processing...":"Send"),1)]),e("div",E,[e("div",Q,[o[1]||(o[1]=e("h3",{"font-semibold":""}," Messages ",-1)),(t(!0),s(f,null,m(p.value,n=>(t(),s("div",{key:n},[e("div",null,i(n),1)]))),128))]),e("div",S,[o[2]||(o[2]=e("h3",{"font-semibold":""}," Emotions ",-1)),(t(!0),s(f,null,m(r.value,n=>(t(),s("div",{key:n},[e("div",null,i(n),1)]))),128))])])]))}});export{N as default};
|
assets/{featherless-ai-DYiNttaX.js → featherless-ai-BkPHXcRw.js}
RENAMED
@@ -1 +1 @@
|
|
1 |
-
import"./live2d-zip-loader
|
|
|
1 |
+
import"./live2d-zip-loader--bTGFeQd.js";import{d as h,q as U,bG as V,s as y,h as v,l as $,w as k,x as K,o as w,y as p,b as l,e as t}from"./index-hDb1Lsb8.js";import{u as x}from"./providers-adQ6cb75.js";import{_ as z,a as M}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-UCuivhvU.js";import{_ as N}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-CHpN3yiY.js";import{_ as P,a as R}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-CYv3qJbi.js";import{_ as S}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-DTOfxlwP.js";import"./index-Be1NqeGb.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-bS5XNUtd.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-BTGItw4h.js";import"./FieldInput.vue_vue_type_script_setup_true_lang-CG42zMAq.js";import"./Input.vue_vue_type_script_setup_true_lang-DGnmLgZc.js";const a="featherless-ai",J=h({__name:"featherless-ai",setup(B){const{t:d}=U(),_=V(),m=x(),{providers:o}=y(m),n=v(()=>m.getProviderMetadata(a)),i=v({get:()=>{var e;return((e=o.value[a])==null?void 0:e.apiKey)||""},set:e=>{o.value[a]||(o.value[a]={}),o.value[a].apiKey=e}}),r=v({get:()=>{var e;return((e=o.value[a])==null?void 0:e.baseUrl)||""},set:e=>{o.value[a]||(o.value[a]={}),o.value[a].baseUrl=e}});$(()=>{var e,s;m.initializeProvider(a),i.value=((e=o.value[a])==null?void 0:e.apiKey)||"",r.value=((s=o.value[a])==null?void 0:s.baseUrl)||""}),k([i,r],()=>{o.value[a]={...o.value[a],apiKey:i.value,baseUrl:r.value||""}});function b(){var e;o.value[a]={...(e=n.value)==null?void 0:e.defaultOptions}}return(e,s)=>{var c,f;return w(),K(t(S),{"provider-name":(c=n.value)==null?void 0:c.localizedName,"provider-icon":(f=n.value)==null?void 0:f.icon,"on-back":()=>t(_).back()},{default:p(()=>[l(t(P),null,{default:p(()=>[l(t(R),{title:t(d)("settings.pages.providers.common.section.basic.title"),description:t(d)("settings.pages.providers.common.section.basic.description"),"on-reset":b},{default:p(()=>{var u;return[l(t(N),{modelValue:i.value,"onUpdate:modelValue":s[0]||(s[0]=g=>i.value=g),"provider-name":(u=n.value)==null?void 0:u.localizedName,placeholder:"fw-..."},null,8,["modelValue","provider-name"])]}),_:1},8,["title","description"]),l(t(z),{title:t(d)("settings.pages.providers.common.section.advanced.title")},{default:p(()=>[l(t(M),{modelValue:r.value,"onUpdate:modelValue":s[1]||(s[1]=u=>r.value=u),placeholder:"https://api.featherless.ai/v1/"},null,8,["modelValue"])]),_:1},8,["title"])]),_:1})]),_:1},8,["provider-name","provider-icon","on-back"])}}});export{J as default};
|
assets/{filter-message-CRLogJIb.js → filter-message-Cd_Y2XAy.js}
RENAMED
@@ -1 +1 @@
|
|
1 |
-
import{d as g,g as u,r as m,c as v,o as _,a as s,b as x,D as d}from"./index-
|
|
|
1 |
+
import{d as g,g as u,r as m,c as v,o as _,a as s,b as x,D as d}from"./index-hDb1Lsb8.js";const b={flex:"","flex-col":"","gap-2":"","p-2":""},S={flex:"","flex-row":"","gap-2":""},k={"rounded-lg":"",bg:"zinc-100 dark:zinc-700","p-4":""},w={"w-full":"","rounded-lg":"",bg:"zinc-100 dark:zinc-700","p-2":""},V=g({__name:"filter-message",setup(z){const o=u(""),c=u(!1),i=u({content:""});async function f(r){return new Promise(e=>setTimeout(e,r))}async function p(){c.value=!0;const r=o.value.split("");let e;(a=>{a.Literal="literal",a.Special="special"})(e||(e={}));let l="literal",t="";for(const a of r){await f(50);let n=l;a==="<"?n="special":a===">"&&(n="literal"),l==="literal"&&n==="special"&&(i.value.content+=t,t=""),l==="special"&&n==="literal"&&(t=""),l==="literal"&&n==="literal"&&(i.value.content+=a,t=""),l=n}t&&(i.value.content+=t),o.value="",c.value=!1}return(r,e)=>{const l=m("BasicTextarea");return _(),v("div",b,[s("div",S,[x(l,{modelValue:o.value,"onUpdate:modelValue":e[0]||(e[0]=t=>o.value=t),placeholder:"Message",p:"2",bg:"zinc-100 dark:zinc-700","w-full":"","rounded-lg":"","outline-none":"",onSubmit:p},null,8,["modelValue"]),s("button",k,d(c.value?"Processing...":"Send"),1)]),s("div",w,[e[1]||(e[1]=s("h3",{"font-semibold":""}," Streaming Message ",-1)),s("div",null,d(i.value.content),1)])])}}});export{V as default};
|
assets/{fireworks-ai-Brzqd047.js → fireworks-ai-DSa13ytv.js}
RENAMED
@@ -1 +1 @@
|
|
1 |
-
import"./live2d-zip-loader
|
|
|
1 |
+
import"./live2d-zip-loader--bTGFeQd.js";import{d as k,q as w,bG as U,s as V,h as v,l as y,w as $,x as K,o as h,y as p,b as l,e as t}from"./index-hDb1Lsb8.js";import{u as x}from"./providers-adQ6cb75.js";import{_ as z,a as M}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-UCuivhvU.js";import{_ as N}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-CHpN3yiY.js";import{_ as P,a as R}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-CYv3qJbi.js";import{_ as S}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-DTOfxlwP.js";import"./index-Be1NqeGb.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-bS5XNUtd.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-BTGItw4h.js";import"./FieldInput.vue_vue_type_script_setup_true_lang-CG42zMAq.js";import"./Input.vue_vue_type_script_setup_true_lang-DGnmLgZc.js";const a="fireworks-ai",J=k({__name:"fireworks-ai",setup(B){const{t:d}=w(),_=U(),m=x(),{providers:o}=V(m),n=v(()=>m.getProviderMetadata(a)),r=v({get:()=>{var e;return((e=o.value[a])==null?void 0:e.apiKey)||""},set:e=>{o.value[a]||(o.value[a]={}),o.value[a].apiKey=e}}),s=v({get:()=>{var e;return((e=o.value[a])==null?void 0:e.baseUrl)||""},set:e=>{o.value[a]||(o.value[a]={}),o.value[a].baseUrl=e}});y(()=>{var e,i;m.initializeProvider(a),r.value=((e=o.value[a])==null?void 0:e.apiKey)||"",s.value=((i=o.value[a])==null?void 0:i.baseUrl)||""}),$([r,s],()=>{o.value[a]={...o.value[a],apiKey:r.value,baseUrl:s.value||""}});function b(){var e;o.value[a]={...(e=n.value)==null?void 0:e.defaultOptions}}return(e,i)=>{var c,f;return h(),K(t(S),{"provider-name":(c=n.value)==null?void 0:c.localizedName,"provider-icon":(f=n.value)==null?void 0:f.icon,"on-back":()=>t(_).back()},{default:p(()=>[l(t(P),null,{default:p(()=>[l(t(R),{title:t(d)("settings.pages.providers.common.section.basic.title"),description:t(d)("settings.pages.providers.common.section.basic.description"),"on-reset":b},{default:p(()=>{var u;return[l(t(N),{modelValue:r.value,"onUpdate:modelValue":i[0]||(i[0]=g=>r.value=g),"provider-name":(u=n.value)==null?void 0:u.localizedName,placeholder:"fw-..."},null,8,["modelValue","provider-name"])]}),_:1},8,["title","description"]),l(t(z),{title:t(d)("settings.pages.providers.common.section.advanced.title")},{default:p(()=>[l(t(M),{modelValue:s.value,"onUpdate:modelValue":i[1]||(i[1]=u=>s.value=u),placeholder:"https://api.fireworks.ai/inference/v1/"},null,8,["modelValue"])]),_:1},8,["title"])]),_:1})]),_:1},8,["provider-name","provider-icon","on-back"])}}});export{J as default};
|
assets/{google-generative-ai-CG94KMvF.js → google-generative-ai-BrHwbhVt.js}
RENAMED
@@ -1 +1 @@
|
|
1 |
-
import"./live2d-zip-loader
|
|
|
1 |
+
import"./live2d-zip-loader--bTGFeQd.js";import{d as h,q as U,bG as V,s as k,h as m,l as y,w as $,x as K,o as x,y as p,b as r,e as t}from"./index-hDb1Lsb8.js";import{u as G}from"./providers-adQ6cb75.js";import{_ as w,a as M}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-UCuivhvU.js";import{_ as N}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-CHpN3yiY.js";import{_ as R,a as S}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-CYv3qJbi.js";import{_ as z}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-DTOfxlwP.js";import"./index-Be1NqeGb.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-bS5XNUtd.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-BTGItw4h.js";import"./FieldInput.vue_vue_type_script_setup_true_lang-CG42zMAq.js";import"./Input.vue_vue_type_script_setup_true_lang-DGnmLgZc.js";const e="google-generative-ai",L=h({__name:"google-generative-ai",setup(B){const{t:u}=U(),f=V(),c=G(),{providers:a}=k(c),v=m(()=>c.getProviderMetadata(e)),s=m({get:()=>{var o;return((o=a.value[e])==null?void 0:o.apiKey)||""},set:o=>{a.value[e]||(a.value[e]={}),a.value[e].apiKey=o}}),l=m({get:()=>{var o;return((o=a.value[e])==null?void 0:o.baseUrl)||"https://generativelanguage.googleapis.com/v1beta/openai/"},set:o=>{a.value[e]||(a.value[e]={}),a.value[e].baseUrl=o}});y(()=>{var o,i;a.value[e]||(a.value[e]={baseUrl:"https://api.anthropic.com/v1/"}),s.value=((o=a.value[e])==null?void 0:o.apiKey)||"",l.value=((i=a.value[e])==null?void 0:i.baseUrl)||"https://generativelanguage.googleapis.com/v1beta/openai/"}),$([s,l],()=>{a.value[e]={...a.value[e],apiKey:s.value,baseUrl:l.value||"https://generativelanguage.googleapis.com/v1beta/openai/"}});function _(){a.value[e]={baseUrl:"https://generativelanguage.googleapis.com/v1beta/openai/"}}return(o,i)=>{var d,g;return x(),K(t(z),{"provider-name":((d=v.value)==null?void 0:d.localizedName)||"Google | Gemini","provider-icon":(g=v.value)==null?void 0:g.icon,"on-back":()=>t(f).back()},{default:p(()=>[r(t(R),null,{default:p(()=>[r(t(S),{title:t(u)("settings.pages.providers.common.section.basic.title"),description:t(u)("settings.pages.providers.common.section.basic.description"),"on-reset":_},{default:p(()=>{var n;return[r(t(N),{modelValue:s.value,"onUpdate:modelValue":i[0]||(i[0]=b=>s.value=b),"provider-name":((n=v.value)==null?void 0:n.localizedName)||"Google",placeholder:"sk-..."},null,8,["modelValue","provider-name"])]}),_:1},8,["title","description"]),r(t(w),{title:t(u)("settings.pages.providers.common.section.advanced.title")},{default:p(()=>[r(t(M),{modelValue:l.value,"onUpdate:modelValue":i[1]||(i[1]=n=>l.value=n),placeholder:"https://generativelanguage.googleapis.com/v1beta/openai/"},null,8,["modelValue"])]),_:1},8,["title"])]),_:1})]),_:1},8,["provider-name","provider-icon","on-back"])}}});export{L as default};
|
assets/{image-B_Hg7W96.js → image-jwIZU337.js}
RENAMED
@@ -1,2 +1,2 @@
|
|
1 |
-
import{d as _,g as c,bF as y,c as d,o as u,a,C as x,D as b,e as v,bn as w}from"./index-
|
2 |
`,1),a("button",{bg:"primary-500",text:"white","mt-4":"","rounded-lg":"","px-4":"","py-2":"",onClick:e[0]||(e[0]=()=>v(g)())}," Copy Data URL ")])):x("",!0)]))}}),B=w(R,[["__scopeId","data-v-7edd53e6"]]);export{B as default};
|
|
|
1 |
+
import{d as _,g as c,bF as y,c as d,o as u,a,C as x,D as b,e as v,bn as w}from"./index-hDb1Lsb8.js";const C={bg:"neutral-100",flex:"~ col","items-center":"","justify-center":"","rounded-lg":"","px-4":"","py-3":""},h={key:0},U=["src"],D={bg:"neutral-100",class:"text-wrap-any","max-h":"100","overflow-scroll":"","rounded-lg":"","text-wrap":"","text-black":"","font-mono":""},R=_({__name:"image",setup(k){const p=c(),n=c(""),{copy:g}=y({source:n});async function m(r){return new Promise((e,o)=>{const t=new FileReader;t.onload=s=>{var l,i;e(((i=(l=s.target)==null?void 0:l.result)==null?void 0:i.toString())||"")},t.onerror=s=>{o(s)},t.readAsDataURL(r)})}async function f(r){var t;const o=(t=r.target.files)==null?void 0:t[0];if(o){p.value=o;const s=await m(o);n.value=s}}return(r,e)=>(u(),d("div",null,[a("label",C,[a("input",{type:"file",accept:"image/*",hidden:"",onChange:f},null,32),e[1]||(e[1]=a("span",null,"Upload Image",-1))]),n.value?(u(),d("div",h,[a("img",{src:n.value,alt:"Uploaded Image","w-100":""},null,8,U),a("pre",D," "+b(n.value)+`
|
2 |
`,1),a("button",{bg:"primary-500",text:"white","mt-4":"","rounded-lg":"","px-4":"","py-2":"",onClick:e[0]||(e[0]=()=>v(g)())}," Copy Data URL ")])):x("",!0)]))}}),B=w(R,[["__scopeId","data-v-7edd53e6"]]);export{B as default};
|
assets/{index-CLIXS4H9.js → index-B1onYnuF.js}
RENAMED
@@ -1 +1 @@
|
|
1 |
-
import{_ as w}from"./IconAnimation.vue_vue_type_script_setup_true_lang-
|
|
|
1 |
+
import{_ as w}from"./IconAnimation.vue_vue_type_script_setup_true_lang-B0Tznm9Y.js";import"./live2d-zip-loader--bTGFeQd.js";import{d as S,q as h,bG as z,s as A,v as C,bw as D,c as s,o as n,A as l,a as o,x as d,C as u,e,D as m,bx as p,by as B}from"./index-hDb1Lsb8.js";import{u as N}from"./providers-adQ6cb75.js";import{I as P}from"./IconStatusItem-B-kn6UCa.js";import{u as $}from"./useIconAnimation-DVKfiTTG.js";import{b as f}from"./route-block-B_A1xBdJ.js";import"./index-Be1NqeGb.js";const R={flex:"~ row","items-center":"","gap-2":"",initial:{opacity:0,x:10},enter:{opacity:1,x:0},leave:{opacity:0,x:-10},duration:250},T={relative:""},V={absolute:"","left-0":"","top-0":"","translate-y":"[-80%]"},q={text:"neutral-300 dark:neutral-500","text-nowrap":""},E={"text-nowrap":"","text-3xl":"","font-semibold":""},F={grid:"~ cols-2 gap-4"},G={key:1,text:"neutral-200/50 dark:neutral-500/20","pointer-events-none":"",fixed:"","bottom-0":"","right-0":"","z--1":"","translate-x-10":"","translate-y-10":""},L=S({__name:"index",setup(M){const{t:a}=h(),x=z(),_=N(),{allProvidersMetadata:g}=A(_),v=C(),{iconAnimationStarted:y,showIconAnimation:b,animationIcon:k}=$("i-lucide:brain");return(j,i)=>{const I=w,r=D("motion");return n(),s(p,null,[l((n(),s("div",R,[o("button",{onClick:i[0]||(i[0]=t=>e(x).back())},i[1]||(i[1]=[o("div",{"i-solar:alt-arrow-left-line-duotone":"","text-2xl":""},null,-1)])),o("h1",T,[o("div",V,[o("span",q,m(e(a)("settings.title")),1)]),o("div",E,m(e(a)("settings.pages.providers.title")),1)])])),[[r]]),o("div",F,[(n(!0),s(p,null,B(e(g),(t,c)=>l((n(),d(e(P),{key:t.id,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+c*10,delay:c*50,title:t.localizedName,description:t.localizedDescription,icon:t.icon,"icon-color":t.iconColor,"icon-image":t.iconImage,to:`/settings/providers/${t.id}`,configured:t.configured},null,8,["duration","delay","title","description","icon","icon-color","icon-image","to","configured"])),[[r]])),128))]),e(b)?(n(),d(I,{key:0,"z-index":-1,icon:e(k),"icon-size":12,duration:1e3,started:e(y),"is-reverse":!0,position:"calc(100dvw - 9.5rem), calc(100dvh - 9.5rem)","text-color":"text-neutral-200/50 dark:text-neutral-600/20"},null,8,["icon","started"])):u("",!0),e(v).usePageSpecificTransitions?u("",!0):(n(),s("div",G,i[2]||(i[2]=[o("div",{text:"40","i-lucide:brain":""},null,-1)])))],64)}}});typeof f=="function"&&f(L);export{L as default};
|
assets/{index-bGU7kv-p.js → index-BKcXwYga.js}
RENAMED
@@ -1 +1 @@
|
|
1 |
-
import{d as R,bG as G,q as H,s as Q,g as c,h,bw as K,c as v,o as m,A as C,a as t,b as N,e as s,D as l,bE as P,bH as W,z as X,C as y,bx as z,by as Y,x as Z}from"./index-
|
|
|
1 |
+
import{d as R,bG as G,q as H,s as Q,g as c,h,bw as K,c as v,o as m,A as C,a as t,b as N,e as s,D as l,bE as P,bH as W,z as X,C as y,bx as z,by as Y,x as Z}from"./index-hDb1Lsb8.js";import{u as ee}from"./airi-card-CbqBsbSf.js";import{_ as te}from"./CardDetailDialog.vue_vue_type_script_setup_true_lang-XVLQKu9_.js";import{_ as re}from"./CardListItem.vue_vue_type_script_setup_true_lang-B6mmFgyk.js";import{_ as ae}from"./DeleteCardDialog.vue_vue_type_script_setup_true_lang-44xxChqC.js";import{b as E}from"./route-block-B_A1xBdJ.js";import"./live2d-zip-loader--bTGFeQd.js";import"./consciousness-BRdkM-c-.js";import"./providers-adQ6cb75.js";import"./index-Be1NqeGb.js";import"./speech-D3H5B80W.js";import"./index-CborASRd.js";const se={flex:"~ row","items-center":"","gap-2":"",initial:{opacity:0,x:10},enter:{opacity:1,x:0},leave:{opacity:0,x:-10},duration:250},oe={relative:""},ne={absolute:"","left-0":"","top-0":"","translate-y":"[-80%]"},le={text:"neutral-300 dark:neutral-500","text-nowrap":""},ie={"text-nowrap":"","text-3xl":"","font-semibold":""},de={"rounded-xl":"","p-4":"",flex:"~ col gap-4"},ue={flex:"~ row","flex-wrap":"","items-center":"","justify-between":"","gap-4":""},ce={class:"relative min-w-[200px] flex-1","inline-flex":"~","w-full":"","items-center":""},me=["placeholder"],pe={class:"flex items-center gap-2"},ve={"text-sm":"","text-neutral-500":"","dark:text-neutral-400":""},fe={value:"nameAsc"},xe={value:"nameDesc"},ge={value:"recent"},be={"font-medium":"",text:"center neutral-600 dark:neutral-300"},_e={text:"center neutral-500 dark:neutral-400","mt-2":"","text-sm":""},ye={key:0,class:"bg-primary-100/80 border-primary-400 dark:bg-primary-900/80 dark:border-primary-600 absolute inset-0 flex items-center justify-center border-2 rounded-xl"},ke={class:"text-center"},he={"font-medium":"",text:"primary-600 dark:primary-300"},Ce={key:1,class:"col-span-full rounded-xl p-8 text-center",border:"~ neutral-200/50 dark:neutral-700/30",bg:"neutral-50/50 dark:neutral-900/50"},we={key:2,class:"col-span-full flex items-center gap-3 border-2 border-amber-200 rounded-xl bg-amber-50/80 p-4 dark:border-amber-800 dark:bg-amber-900/30"},De={class:"flex flex-col"},Ve={class:"font-medium"},Se={class:"text-sm text-amber-600 dark:text-amber-400"},Ae=R({__name:"index",setup($e){const U=G(),{t:n}=H(),k=ee(),{addCard:j,removeCard:B}=k,{cards:p,activeCardId:w}=Q(k),b=c(""),f=c(!1),x=c(""),g=c("nameAsc"),I=c(!1),D=h(()=>Array.from(p.value.entries()).map(([a,e])=>({id:a,name:e.name,description:e.description}))),L=h(()=>{if(!x.value)return D.value;const a=x.value.toLowerCase();return D.value.filter(e=>e.name.toLowerCase().includes(a)||e.description&&e.description.toLowerCase().includes(a))}),V=h(()=>{const a=[...L.value];return g.value==="nameAsc"?a.sort((e,o)=>e.name.localeCompare(o.name)):g.value==="nameDesc"?a.sort((e,o)=>o.name.localeCompare(e.name)):g.value==="recent"?a.sort((e,o)=>o.id.localeCompare(e.id)):a}),_=c(!1),d=c(null);function O(){d.value&&(B(d.value),d.value=null,_.value=!1)}function q(a){d.value=a,_.value=!0}async function M(){const a=document.createElement("input");a.type="file",a.accept=".json",a.onchange=async e=>{var i;const o=(i=e.target.files)==null?void 0:i[0];if(o)try{const r=await o.text(),u=JSON.parse(r);b.value=j(u),f.value=!0}catch(r){console.error("Error processing card file:",r)}},a.click()}function T(a){b.value=a,f.value=!0}function F(a){w.value=a}function J(a){const e=p.value.get(a);return(e==null?void 0:e.version)||"1.0.0"}function S(a,e){var r,u,A,$;const o=p.value.get(a);if(!o||!((u=(r=o.extensions)==null?void 0:r.airi)!=null&&u.modules))return"default";const i=o.extensions.airi.modules;return e==="consciousness"?(A=i.consciousness)!=null&&A.model&&i.consciousness.model.split("-").pop()||"default":e==="voice"&&(($=i.speech)==null?void 0:$.voice_id)||"default"}return(a,e)=>{var i;const o=K("motion");return m(),v(z,null,[C((m(),v("div",se,[t("button",{onClick:e[0]||(e[0]=r=>s(U).back())},e[6]||(e[6]=[t("div",{"i-solar:alt-arrow-left-line-duotone":"","text-2xl":""},null,-1)])),t("h1",oe,[t("div",ne,[t("span",le,l(s(n)("settings.title")),1)]),t("div",ie,l(s(n)("settings.pages.card.title")),1)])])),[[o]]),t("div",de,[t("div",ue,[t("div",ce,[e[7]||(e[7]=t("div",{class:"pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3"},[t("div",{"i-solar:magnifer-line-duotone":"",class:"text-neutral-500 dark:text-neutral-400"})],-1)),C(t("input",{"onUpdate:modelValue":e[1]||(e[1]=r=>x.value=r),type:"search",class:"w-full rounded-xl p-2.5 pl-10 text-sm outline-none",border:"focus:primary-100 dark:focus:primary-400/50 2 solid neutral-200 dark:neutral-800",transition:"all duration-200 ease-in-out",bg:"white dark:neutral-900",placeholder:s(n)("settings.pages.card.search")},null,8,me),[[P,x.value]])]),t("div",pe,[t("div",ve,l(s(n)("settings.pages.card.sort_by"))+": ",1),C(t("select",{"onUpdate:modelValue":e[2]||(e[2]=r=>g.value=r),class:"rounded-lg p-1.5 text-sm outline-none",border:"focus:primary-100 dark:focus:primary-400/50 2 solid neutral-200 dark:neutral-800",bg:"white dark:neutral-900"},[t("option",fe,l(s(n)("settings.pages.card.name_asc")),1),t("option",xe,l(s(n)("settings.pages.card.name_desc")),1),t("option",ge,l(s(n)("settings.pages.card.recent")),1)],512),[[W,g.value]])])]),t("div",{class:X(["mt-4",{"grid grid-cols-[repeat(auto-fill,minmax(280px,1fr))] gap-4 grid-auto-rows-[minmax(min-content,max-content)] grid-auto-flow-dense sm:grid-cols-[repeat(auto-fill,minmax(240px,1fr))] sm:gap-5 md:grid-cols-[repeat(auto-fill,minmax(220px,1fr))] lg:grid-cols-[repeat(auto-fill,minmax(250px,1fr))]":s(p).size>0}])},[t("div",{class:"relative min-h-[120px] flex flex-col cursor-pointer items-center justify-center border-2 rounded-xl border-dashed p-6 transition-all duration-300",border:"neutral-200 dark:neutral-700 hover:primary-300 dark:hover:primary-700",bg:"white/60 dark:black/30 hover:white/80 dark:hover:black/40",style:{transform:"scale(0.98)",opacity:.95},hover:"scale-100 opacity-100 shadow-md dark:shadow-xl",onClick:M},[e[9]||(e[9]=t("div",{"i-solar:upload-square-line-duotone":"","mb-4":"","text-5xl":"",text:"neutral-400 dark:neutral-500"},null,-1)),t("p",be,l(s(n)("settings.pages.card.upload")),1),t("p",_e,l(s(n)("settings.pages.card.upload_desc")),1),I.value?(m(),v("div",ye,[t("div",ke,[e[8]||(e[8]=t("div",{"i-solar:upload-minimalistic-bold":"",class:"dark:text-primary-400 text-primary-500 mb-2 text-5xl"},null,-1)),t("p",he,l(s(n)("settings.pages.card.drop_here")),1)])])):y("",!0)]),s(p).size>0?(m(!0),v(z,{key:0},Y(V.value,r=>(m(),Z(re,{id:r.id,key:r.id,name:r.name,description:r.description,"is-active":r.id===s(w),"is-selected":r.id===b.value&&f.value,version:J(r.id),"consciousness-model":S(r.id,"consciousness"),"voice-model":S(r.id,"voice"),onSelect:u=>T(r.id),onActivate:u=>F(r.id),onDelete:u=>q(r.id)},null,8,["id","name","description","is-active","is-selected","version","consciousness-model","voice-model","onSelect","onActivate","onDelete"]))),128)):y("",!0),s(p).size===0?(m(),v("div",Ce,[e[10]||(e[10]=t("div",{"i-solar:card-search-broken":"","mx-auto":"","mb-3":"","text-6xl":"","text-neutral-400":""},null,-1)),t("p",null,l(s(n)("settings.pages.card.no_cards")),1)])):y("",!0),x.value&&V.value.length===0?(m(),v("div",we,[e[11]||(e[11]=t("div",{"i-solar:info-circle-line-duotone":"",class:"text-2xl text-amber-500 dark:text-amber-400"},null,-1)),t("div",De,[t("span",Ve,l(s(n)("settings.pages.card.no_results")),1),t("span",Se,l(s(n)("settings.pages.card.try_different_search")),1)])])):y("",!0)],2)]),N(ae,{modelValue:_.value,"onUpdate:modelValue":e[3]||(e[3]=r=>_.value=r),"card-name":d.value?(i=s(k).getCard(d.value))==null?void 0:i.name:"",onConfirm:O,onCancel:e[4]||(e[4]=r=>d.value=null)},null,8,["modelValue","card-name"]),N(te,{modelValue:f.value,"onUpdate:modelValue":e[5]||(e[5]=r=>f.value=r),"card-id":b.value},null,8,["modelValue","card-id"]),e[12]||(e[12]=t("div",{text:"neutral-200/50 dark:neutral-600/20","pointer-events-none":"",fixed:"","bottom-0":"","right-0":"","z--1":"","translate-x-10":"","translate-y-10":""},[t("div",{text:"40","i-lucide:id-card":""})],-1))],64)}}});typeof E=="function"&&E(Ae);export{Ae as default};
|
assets/{index-CJycCKU5.js → index-BNcJmkAi.js}
RENAMED
@@ -1,4 +1,4 @@
|
|
1 |
-
import{cq as getAugmentedNamespace}from"./index-7-fr_lhT.js";var dist={},ortWeb_min={exports:{}};const backends={},backendsSortedByPriority=[],registerBackend=(D,u,b)=>{if(u&&typeof u.init=="function"&&typeof u.createSessionHandler=="function"){const g=backends[D];if(g===void 0)backends[D]={backend:u,priority:b};else{if(g.priority>b)return;if(g.priority===b&&g.backend!==u)throw new Error(`cannot register backend "${D}" using priority ${b}`)}if(b>=0){const p=backendsSortedByPriority.indexOf(D);p!==-1&&backendsSortedByPriority.splice(p,1);for(let h=0;h<backendsSortedByPriority.length;h++)if(backends[backendsSortedByPriority[h]].priority<=b){backendsSortedByPriority.splice(h,0,D);return}backendsSortedByPriority.push(D)}return}throw new TypeError("not a valid backend")},resolveBackend=async D=>{const u=D.length===0?backendsSortedByPriority:D,b=[];for(const g of u){const p=backends[g];if(p){if(p.initialized)return p.backend;if(p.aborted)continue;const h=!!p.initPromise;try{return h||(p.initPromise=p.backend.init()),await p.initPromise,p.initialized=!0,p.backend}catch(o){h||b.push({name:g,err:o}),p.aborted=!0}finally{delete p.initPromise}}}throw new Error(`no available backend found. ERR: ${b.map(g=>`[${g.name}] ${g.err}`).join(", ")}`)};class EnvImpl{constructor(){this.wasm={},this.webgl={},this.logLevelInternal="warning"}set logLevel(u){if(u!==void 0){if(typeof u!="string"||["verbose","info","warning","error","fatal"].indexOf(u)===-1)throw new Error(`Unsupported logging level: ${u}`);this.logLevelInternal=u}}get logLevel(){return this.logLevelInternal}}const env=new EnvImpl,isBigInt64ArrayAvailable=typeof BigInt64Array<"u"&&typeof BigInt64Array.from=="function",isBigUint64ArrayAvailable=typeof BigUint64Array<"u"&&typeof BigUint64Array.from=="function",NUMERIC_TENSOR_TYPE_TO_TYPEDARRAY_MAP=new Map([["float32",Float32Array],["uint8",Uint8Array],["int8",Int8Array],["uint16",Uint16Array],["int16",Int16Array],["int32",Int32Array],["bool",Uint8Array],["float64",Float64Array],["uint32",Uint32Array]]),NUMERIC_TENSOR_TYPEDARRAY_TO_TYPE_MAP=new Map([[Float32Array,"float32"],[Uint8Array,"uint8"],[Int8Array,"int8"],[Uint16Array,"uint16"],[Int16Array,"int16"],[Int32Array,"int32"],[Float64Array,"float64"],[Uint32Array,"uint32"]]);isBigInt64ArrayAvailable&&(NUMERIC_TENSOR_TYPE_TO_TYPEDARRAY_MAP.set("int64",BigInt64Array),NUMERIC_TENSOR_TYPEDARRAY_TO_TYPE_MAP.set(BigInt64Array,"int64"));isBigUint64ArrayAvailable&&(NUMERIC_TENSOR_TYPE_TO_TYPEDARRAY_MAP.set("uint64",BigUint64Array),NUMERIC_TENSOR_TYPEDARRAY_TO_TYPE_MAP.set(BigUint64Array,"uint64"));const calculateSize=D=>{let u=1;for(let b=0;b<D.length;b++){const g=D[b];if(typeof g!="number"||!Number.isSafeInteger(g))throw new TypeError(`dims[${b}] must be an integer, got: ${g}`);if(g<0)throw new RangeError(`dims[${b}] must be a non-negative integer, got: ${g}`);u*=g}return u};let Tensor$1=class at{constructor(u,b,g){let p,h,o;if(typeof u=="string")if(p=u,o=g,u==="string"){if(!Array.isArray(b))throw new TypeError("A string tensor's data must be a string array.");h=b}else{const f=NUMERIC_TENSOR_TYPE_TO_TYPEDARRAY_MAP.get(u);if(f===void 0)throw new TypeError(`Unsupported tensor type: ${u}.`);if(Array.isArray(b))h=f.from(b);else if(b instanceof f)h=b;else throw new TypeError(`A ${p} tensor's data must be type of ${f}`)}else if(o=b,Array.isArray(u)){if(u.length===0)throw new TypeError("Tensor type cannot be inferred from an empty array.");const f=typeof u[0];if(f==="string")p="string",h=u;else if(f==="boolean")p="bool",h=Uint8Array.from(u);else throw new TypeError(`Invalid element type of data array: ${f}.`)}else{const f=NUMERIC_TENSOR_TYPEDARRAY_TO_TYPE_MAP.get(u.constructor);if(f===void 0)throw new TypeError(`Unsupported type for tensor data: ${u.constructor}.`);p=f,h=u}if(o===void 0)o=[h.length];else if(!Array.isArray(o))throw new TypeError("A tensor's dims must be a number array");const c=calculateSize(o);if(c!==h.length)throw new Error(`Tensor's size(${c}) does not match data length(${h.length}).`);this.dims=o,this.type=p,this.data=h,this.size=c}static bufferToTensor(u,b){if(u===void 0)throw new Error("Image buffer must be defined");if(b.height===void 0||b.width===void 0)throw new Error("Image height and width must be defined");const{height:g,width:p}=b,h=b.norm;let o,c;h===void 0||h.mean===void 0?o=255:o=h.mean,h===void 0||h.bias===void 0?c=0:c=h.bias;const f=b.bitmapFormat!==void 0?b.bitmapFormat:"RGBA",s=b.tensorFormat!==void 0&&b.tensorFormat!==void 0?b.tensorFormat:"RGB",i=g*p,t=s==="RGBA"?new Float32Array(i*4):new Float32Array(i*3);let e=4,n=0,r=1,a=2,l=3,d=0,m=i,y=i*2,v=-1;f==="RGB"&&(e=3,n=0,r=1,a=2,l=-1),s==="RGBA"?v=i*3:s==="RBG"?(d=0,y=i,m=i*2):s==="BGR"&&(y=0,m=i,d=i*2);for(let T=0;T<i;T++,n+=e,a+=e,r+=e,l+=e)t[d++]=(u[n]+c)/o,t[m++]=(u[r]+c)/o,t[y++]=(u[a]+c)/o,v!==-1&&l!==-1&&(t[v++]=(u[l]+c)/o);return s==="RGBA"?new at("float32",t,[1,4,g,p]):new at("float32",t,[1,3,g,p])}static async fromImage(u,b){const g=typeof HTMLImageElement<"u"&&u instanceof HTMLImageElement,p=typeof ImageData<"u"&&u instanceof ImageData,h=typeof ImageBitmap<"u"&&u instanceof ImageBitmap,o=typeof String<"u"&&(u instanceof String||typeof u=="string");let c,f={};if(g){const s=document.createElement("canvas"),i=s.getContext("2d");if(i!=null){let t=u.naturalHeight,e=u.naturalWidth;if(b!==void 0&&b.resizedHeight!==void 0&&b.resizedWidth!==void 0&&(t=b.resizedHeight,e=b.resizedWidth),b!==void 0){if(f=b,b.tensorFormat!==void 0)throw new Error("Image input config format must be RGBA for HTMLImageElement");if(f.tensorFormat="RGBA",b.height!==void 0&&b.height!==t)throw new Error("Image input config height doesn't match HTMLImageElement height");if(f.height=t,b.width!==void 0&&b.width!==e)throw new Error("Image input config width doesn't match HTMLImageElement width");f.width=e}else f.tensorFormat="RGBA",f.height=t,f.width=e;s.width=e,s.height=t,i.drawImage(u,0,0,e,t),c=i.getImageData(0,0,e,t).data}else throw new Error("Can not access image data")}else if(p){const s="RGBA";let i,t;if(b!==void 0&&b.resizedWidth!==void 0&&b.resizedHeight!==void 0?(i=b.resizedHeight,t=b.resizedWidth):(i=u.height,t=u.width),b!==void 0){if(f=b,b.bitmapFormat!==void 0&&b.bitmapFormat!==s)throw new Error("Image input config format must be RGBA for ImageData");f.bitmapFormat="RGBA"}else f.bitmapFormat="RGBA";if(f.height=i,f.width=t,b!==void 0){const e=document.createElement("canvas");e.width=t,e.height=i;const n=e.getContext("2d");if(n!=null)n.putImageData(u,0,0),c=n.getImageData(0,0,t,i).data;else throw new Error("Can not access image data")}else c=u.data}else if(h){if(b===void 0)throw new Error("Please provide image config with format for Imagebitmap");if(b.bitmapFormat!==void 0)throw new Error("Image input config format must be defined for ImageBitmap");const s=document.createElement("canvas").getContext("2d");if(s!=null){const i=u.height,t=u.width;if(s.drawImage(u,0,0,t,i),c=s.getImageData(0,0,t,i).data,b!==void 0){if(b.height!==void 0&&b.height!==i)throw new Error("Image input config height doesn't match ImageBitmap height");if(f.height=i,b.width!==void 0&&b.width!==t)throw new Error("Image input config width doesn't match ImageBitmap width");f.width=t}else f.height=i,f.width=t;return at.bufferToTensor(c,f)}else throw new Error("Can not access image data")}else{if(o)return new Promise((s,i)=>{const t=document.createElement("canvas"),e=t.getContext("2d");if(!u||!e)return i();const n=new Image;n.crossOrigin="Anonymous",n.src=u,n.onload=()=>{t.width=n.width,t.height=n.height,e.drawImage(n,0,0,t.width,t.height);const r=e.getImageData(0,0,t.width,t.height);if(b!==void 0){if(b.height!==void 0&&b.height!==t.height)throw new Error("Image input config height doesn't match ImageBitmap height");if(f.height=t.height,b.width!==void 0&&b.width!==t.width)throw new Error("Image input config width doesn't match ImageBitmap width");f.width=t.width}else f.height=t.height,f.width=t.width;s(at.bufferToTensor(r.data,f))}});throw new Error("Input data provided is not supported - aborted tensor creation")}if(c!==void 0)return at.bufferToTensor(c,f);throw new Error("Input data provided is not supported - aborted tensor creation")}toImageData(u){var b,g;const p=document.createElement("canvas").getContext("2d");let h;if(p!=null){const o=this.dims[3],c=this.dims[2],f=this.dims[1],s=u!==void 0&&u.format!==void 0?u.format:"RGB",i=u!==void 0&&((b=u.norm)===null||b===void 0?void 0:b.mean)!==void 0?u.norm.mean:255,t=u!==void 0&&((g=u.norm)===null||g===void 0?void 0:g.bias)!==void 0?u.norm.bias:0,e=c*o;if(u!==void 0){if(u.height!==void 0&&u.height!==c)throw new Error("Image output config height doesn't match tensor height");if(u.width!==void 0&&u.width!==o)throw new Error("Image output config width doesn't match tensor width");if(u.format!==void 0&&f===4&&u.format!=="RGBA"||f===3&&u.format!=="RGB"&&u.format!=="BGR")throw new Error("Tensor format doesn't match input tensor dims")}const n=4;let r=0,a=1,l=2,d=3,m=0,y=e,v=e*2,_=-1;s==="RGBA"?(m=0,y=e,v=e*2,_=e*3):s==="RGB"?(m=0,y=e,v=e*2):s==="RBG"&&(m=0,v=e,y=e*2),h=p.createImageData(o,c);for(let T=0;T<c*o;r+=n,a+=n,l+=n,d+=n,T++)h.data[r]=(this.data[m++]-t)*i,h.data[a]=(this.data[y++]-t)*i,h.data[l]=(this.data[v++]-t)*i,h.data[d]=_===-1?255:(this.data[_++]-t)*i}else throw new Error("Can not access image data");return h}reshape(u){return new at(this.type,this.data,u)}};const Tensor=Tensor$1;let InferenceSession$1=class cn{constructor(u){this.handler=u}async run(u,b,g){const p={};let h={};if(typeof u!="object"||u===null||u instanceof Tensor||Array.isArray(u))throw new TypeError("'feeds' must be an object that use input names as keys and OnnxValue as corresponding values.");let o=!0;if(typeof b=="object"){if(b===null)throw new TypeError("Unexpected argument[1]: cannot be null.");if(b instanceof Tensor)throw new TypeError("'fetches' cannot be a Tensor");if(Array.isArray(b)){if(b.length===0)throw new TypeError("'fetches' cannot be an empty array.");o=!1;for(const s of b){if(typeof s!="string")throw new TypeError("'fetches' must be a string array or an object.");if(this.outputNames.indexOf(s)===-1)throw new RangeError(`'fetches' contains invalid output name: ${s}.`);p[s]=null}if(typeof g=="object"&&g!==null)h=g;else if(typeof g<"u")throw new TypeError("'options' must be an object.")}else{let s=!1;const i=Object.getOwnPropertyNames(b);for(const t of this.outputNames)if(i.indexOf(t)!==-1){const e=b[t];(e===null||e instanceof Tensor)&&(s=!0,o=!1,p[t]=e)}if(s){if(typeof g=="object"&&g!==null)h=g;else if(typeof g<"u")throw new TypeError("'options' must be an object.")}else h=b}}else if(typeof b<"u")throw new TypeError("Unexpected argument[1]: must be 'fetches' or 'options'.");for(const s of this.inputNames)if(typeof u[s]>"u")throw new Error(`input '${s}' is missing in 'feeds'.`);if(o)for(const s of this.outputNames)p[s]=null;const c=await this.handler.run(u,p,h),f={};for(const s in c)Object.hasOwnProperty.call(c,s)&&(f[s]=new Tensor(c[s].type,c[s].data,c[s].dims));return f}static async create(u,b,g,p){let h,o={};if(typeof u=="string"){if(h=u,typeof b=="object"&&b!==null)o=b;else if(typeof b<"u")throw new TypeError("'options' must be an object.")}else if(u instanceof Uint8Array){if(h=u,typeof b=="object"&&b!==null)o=b;else if(typeof b<"u")throw new TypeError("'options' must be an object.")}else if(u instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&u instanceof SharedArrayBuffer){const t=u;let e=0,n=u.byteLength;if(typeof b=="object"&&b!==null)o=b;else if(typeof b=="number"){if(e=b,!Number.isSafeInteger(e))throw new RangeError("'byteOffset' must be an integer.");if(e<0||e>=t.byteLength)throw new RangeError(`'byteOffset' is out of range [0, ${t.byteLength}).`);if(n=u.byteLength-e,typeof g=="number"){if(n=g,!Number.isSafeInteger(n))throw new RangeError("'byteLength' must be an integer.");if(n<=0||e+n>t.byteLength)throw new RangeError(`'byteLength' is out of range (0, ${t.byteLength-e}].`);if(typeof p=="object"&&p!==null)o=p;else if(typeof p<"u")throw new TypeError("'options' must be an object.")}else if(typeof g<"u")throw new TypeError("'byteLength' must be a number.")}else if(typeof b<"u")throw new TypeError("'options' must be an object.");h=new Uint8Array(t,e,n)}else throw new TypeError("Unexpected argument[0]: must be 'path' or 'buffer'.");const f=(o.executionProviders||[]).map(t=>typeof t=="string"?t:t.name),i=await(await resolveBackend(f)).createSessionHandler(h,o);return new cn(i)}startProfiling(){this.handler.startProfiling()}endProfiling(){this.handler.endProfiling()}get inputNames(){return this.handler.inputNames}get outputNames(){return this.handler.outputNames}};const InferenceSession=InferenceSession$1,lib=Object.freeze(Object.defineProperty({__proto__:null,InferenceSession,Tensor,env,registerBackend},Symbol.toStringTag,{value:"Module"})),require$$0=getAugmentedNamespace(lib);/*!
|
2 |
* ONNX Runtime Web v1.14.0
|
3 |
* Copyright (c) Microsoft Corporation. All rights reserved.
|
4 |
* Licensed under the MIT License.
|
|
|
1 |
+
import{cq as getAugmentedNamespace}from"./index-hDb1Lsb8.js";var dist={},ortWeb_min={exports:{}};const backends={},backendsSortedByPriority=[],registerBackend=(D,u,b)=>{if(u&&typeof u.init=="function"&&typeof u.createSessionHandler=="function"){const g=backends[D];if(g===void 0)backends[D]={backend:u,priority:b};else{if(g.priority>b)return;if(g.priority===b&&g.backend!==u)throw new Error(`cannot register backend "${D}" using priority ${b}`)}if(b>=0){const p=backendsSortedByPriority.indexOf(D);p!==-1&&backendsSortedByPriority.splice(p,1);for(let h=0;h<backendsSortedByPriority.length;h++)if(backends[backendsSortedByPriority[h]].priority<=b){backendsSortedByPriority.splice(h,0,D);return}backendsSortedByPriority.push(D)}return}throw new TypeError("not a valid backend")},resolveBackend=async D=>{const u=D.length===0?backendsSortedByPriority:D,b=[];for(const g of u){const p=backends[g];if(p){if(p.initialized)return p.backend;if(p.aborted)continue;const h=!!p.initPromise;try{return h||(p.initPromise=p.backend.init()),await p.initPromise,p.initialized=!0,p.backend}catch(o){h||b.push({name:g,err:o}),p.aborted=!0}finally{delete p.initPromise}}}throw new Error(`no available backend found. ERR: ${b.map(g=>`[${g.name}] ${g.err}`).join(", ")}`)};class EnvImpl{constructor(){this.wasm={},this.webgl={},this.logLevelInternal="warning"}set logLevel(u){if(u!==void 0){if(typeof u!="string"||["verbose","info","warning","error","fatal"].indexOf(u)===-1)throw new Error(`Unsupported logging level: ${u}`);this.logLevelInternal=u}}get logLevel(){return this.logLevelInternal}}const env=new EnvImpl,isBigInt64ArrayAvailable=typeof BigInt64Array<"u"&&typeof BigInt64Array.from=="function",isBigUint64ArrayAvailable=typeof BigUint64Array<"u"&&typeof BigUint64Array.from=="function",NUMERIC_TENSOR_TYPE_TO_TYPEDARRAY_MAP=new Map([["float32",Float32Array],["uint8",Uint8Array],["int8",Int8Array],["uint16",Uint16Array],["int16",Int16Array],["int32",Int32Array],["bool",Uint8Array],["float64",Float64Array],["uint32",Uint32Array]]),NUMERIC_TENSOR_TYPEDARRAY_TO_TYPE_MAP=new Map([[Float32Array,"float32"],[Uint8Array,"uint8"],[Int8Array,"int8"],[Uint16Array,"uint16"],[Int16Array,"int16"],[Int32Array,"int32"],[Float64Array,"float64"],[Uint32Array,"uint32"]]);isBigInt64ArrayAvailable&&(NUMERIC_TENSOR_TYPE_TO_TYPEDARRAY_MAP.set("int64",BigInt64Array),NUMERIC_TENSOR_TYPEDARRAY_TO_TYPE_MAP.set(BigInt64Array,"int64"));isBigUint64ArrayAvailable&&(NUMERIC_TENSOR_TYPE_TO_TYPEDARRAY_MAP.set("uint64",BigUint64Array),NUMERIC_TENSOR_TYPEDARRAY_TO_TYPE_MAP.set(BigUint64Array,"uint64"));const calculateSize=D=>{let u=1;for(let b=0;b<D.length;b++){const g=D[b];if(typeof g!="number"||!Number.isSafeInteger(g))throw new TypeError(`dims[${b}] must be an integer, got: ${g}`);if(g<0)throw new RangeError(`dims[${b}] must be a non-negative integer, got: ${g}`);u*=g}return u};let Tensor$1=class at{constructor(u,b,g){let p,h,o;if(typeof u=="string")if(p=u,o=g,u==="string"){if(!Array.isArray(b))throw new TypeError("A string tensor's data must be a string array.");h=b}else{const f=NUMERIC_TENSOR_TYPE_TO_TYPEDARRAY_MAP.get(u);if(f===void 0)throw new TypeError(`Unsupported tensor type: ${u}.`);if(Array.isArray(b))h=f.from(b);else if(b instanceof f)h=b;else throw new TypeError(`A ${p} tensor's data must be type of ${f}`)}else if(o=b,Array.isArray(u)){if(u.length===0)throw new TypeError("Tensor type cannot be inferred from an empty array.");const f=typeof u[0];if(f==="string")p="string",h=u;else if(f==="boolean")p="bool",h=Uint8Array.from(u);else throw new TypeError(`Invalid element type of data array: ${f}.`)}else{const f=NUMERIC_TENSOR_TYPEDARRAY_TO_TYPE_MAP.get(u.constructor);if(f===void 0)throw new TypeError(`Unsupported type for tensor data: ${u.constructor}.`);p=f,h=u}if(o===void 0)o=[h.length];else if(!Array.isArray(o))throw new TypeError("A tensor's dims must be a number array");const c=calculateSize(o);if(c!==h.length)throw new Error(`Tensor's size(${c}) does not match data length(${h.length}).`);this.dims=o,this.type=p,this.data=h,this.size=c}static bufferToTensor(u,b){if(u===void 0)throw new Error("Image buffer must be defined");if(b.height===void 0||b.width===void 0)throw new Error("Image height and width must be defined");const{height:g,width:p}=b,h=b.norm;let o,c;h===void 0||h.mean===void 0?o=255:o=h.mean,h===void 0||h.bias===void 0?c=0:c=h.bias;const f=b.bitmapFormat!==void 0?b.bitmapFormat:"RGBA",s=b.tensorFormat!==void 0&&b.tensorFormat!==void 0?b.tensorFormat:"RGB",i=g*p,t=s==="RGBA"?new Float32Array(i*4):new Float32Array(i*3);let e=4,n=0,r=1,a=2,l=3,d=0,m=i,y=i*2,v=-1;f==="RGB"&&(e=3,n=0,r=1,a=2,l=-1),s==="RGBA"?v=i*3:s==="RBG"?(d=0,y=i,m=i*2):s==="BGR"&&(y=0,m=i,d=i*2);for(let T=0;T<i;T++,n+=e,a+=e,r+=e,l+=e)t[d++]=(u[n]+c)/o,t[m++]=(u[r]+c)/o,t[y++]=(u[a]+c)/o,v!==-1&&l!==-1&&(t[v++]=(u[l]+c)/o);return s==="RGBA"?new at("float32",t,[1,4,g,p]):new at("float32",t,[1,3,g,p])}static async fromImage(u,b){const g=typeof HTMLImageElement<"u"&&u instanceof HTMLImageElement,p=typeof ImageData<"u"&&u instanceof ImageData,h=typeof ImageBitmap<"u"&&u instanceof ImageBitmap,o=typeof String<"u"&&(u instanceof String||typeof u=="string");let c,f={};if(g){const s=document.createElement("canvas"),i=s.getContext("2d");if(i!=null){let t=u.naturalHeight,e=u.naturalWidth;if(b!==void 0&&b.resizedHeight!==void 0&&b.resizedWidth!==void 0&&(t=b.resizedHeight,e=b.resizedWidth),b!==void 0){if(f=b,b.tensorFormat!==void 0)throw new Error("Image input config format must be RGBA for HTMLImageElement");if(f.tensorFormat="RGBA",b.height!==void 0&&b.height!==t)throw new Error("Image input config height doesn't match HTMLImageElement height");if(f.height=t,b.width!==void 0&&b.width!==e)throw new Error("Image input config width doesn't match HTMLImageElement width");f.width=e}else f.tensorFormat="RGBA",f.height=t,f.width=e;s.width=e,s.height=t,i.drawImage(u,0,0,e,t),c=i.getImageData(0,0,e,t).data}else throw new Error("Can not access image data")}else if(p){const s="RGBA";let i,t;if(b!==void 0&&b.resizedWidth!==void 0&&b.resizedHeight!==void 0?(i=b.resizedHeight,t=b.resizedWidth):(i=u.height,t=u.width),b!==void 0){if(f=b,b.bitmapFormat!==void 0&&b.bitmapFormat!==s)throw new Error("Image input config format must be RGBA for ImageData");f.bitmapFormat="RGBA"}else f.bitmapFormat="RGBA";if(f.height=i,f.width=t,b!==void 0){const e=document.createElement("canvas");e.width=t,e.height=i;const n=e.getContext("2d");if(n!=null)n.putImageData(u,0,0),c=n.getImageData(0,0,t,i).data;else throw new Error("Can not access image data")}else c=u.data}else if(h){if(b===void 0)throw new Error("Please provide image config with format for Imagebitmap");if(b.bitmapFormat!==void 0)throw new Error("Image input config format must be defined for ImageBitmap");const s=document.createElement("canvas").getContext("2d");if(s!=null){const i=u.height,t=u.width;if(s.drawImage(u,0,0,t,i),c=s.getImageData(0,0,t,i).data,b!==void 0){if(b.height!==void 0&&b.height!==i)throw new Error("Image input config height doesn't match ImageBitmap height");if(f.height=i,b.width!==void 0&&b.width!==t)throw new Error("Image input config width doesn't match ImageBitmap width");f.width=t}else f.height=i,f.width=t;return at.bufferToTensor(c,f)}else throw new Error("Can not access image data")}else{if(o)return new Promise((s,i)=>{const t=document.createElement("canvas"),e=t.getContext("2d");if(!u||!e)return i();const n=new Image;n.crossOrigin="Anonymous",n.src=u,n.onload=()=>{t.width=n.width,t.height=n.height,e.drawImage(n,0,0,t.width,t.height);const r=e.getImageData(0,0,t.width,t.height);if(b!==void 0){if(b.height!==void 0&&b.height!==t.height)throw new Error("Image input config height doesn't match ImageBitmap height");if(f.height=t.height,b.width!==void 0&&b.width!==t.width)throw new Error("Image input config width doesn't match ImageBitmap width");f.width=t.width}else f.height=t.height,f.width=t.width;s(at.bufferToTensor(r.data,f))}});throw new Error("Input data provided is not supported - aborted tensor creation")}if(c!==void 0)return at.bufferToTensor(c,f);throw new Error("Input data provided is not supported - aborted tensor creation")}toImageData(u){var b,g;const p=document.createElement("canvas").getContext("2d");let h;if(p!=null){const o=this.dims[3],c=this.dims[2],f=this.dims[1],s=u!==void 0&&u.format!==void 0?u.format:"RGB",i=u!==void 0&&((b=u.norm)===null||b===void 0?void 0:b.mean)!==void 0?u.norm.mean:255,t=u!==void 0&&((g=u.norm)===null||g===void 0?void 0:g.bias)!==void 0?u.norm.bias:0,e=c*o;if(u!==void 0){if(u.height!==void 0&&u.height!==c)throw new Error("Image output config height doesn't match tensor height");if(u.width!==void 0&&u.width!==o)throw new Error("Image output config width doesn't match tensor width");if(u.format!==void 0&&f===4&&u.format!=="RGBA"||f===3&&u.format!=="RGB"&&u.format!=="BGR")throw new Error("Tensor format doesn't match input tensor dims")}const n=4;let r=0,a=1,l=2,d=3,m=0,y=e,v=e*2,_=-1;s==="RGBA"?(m=0,y=e,v=e*2,_=e*3):s==="RGB"?(m=0,y=e,v=e*2):s==="RBG"&&(m=0,v=e,y=e*2),h=p.createImageData(o,c);for(let T=0;T<c*o;r+=n,a+=n,l+=n,d+=n,T++)h.data[r]=(this.data[m++]-t)*i,h.data[a]=(this.data[y++]-t)*i,h.data[l]=(this.data[v++]-t)*i,h.data[d]=_===-1?255:(this.data[_++]-t)*i}else throw new Error("Can not access image data");return h}reshape(u){return new at(this.type,this.data,u)}};const Tensor=Tensor$1;let InferenceSession$1=class cn{constructor(u){this.handler=u}async run(u,b,g){const p={};let h={};if(typeof u!="object"||u===null||u instanceof Tensor||Array.isArray(u))throw new TypeError("'feeds' must be an object that use input names as keys and OnnxValue as corresponding values.");let o=!0;if(typeof b=="object"){if(b===null)throw new TypeError("Unexpected argument[1]: cannot be null.");if(b instanceof Tensor)throw new TypeError("'fetches' cannot be a Tensor");if(Array.isArray(b)){if(b.length===0)throw new TypeError("'fetches' cannot be an empty array.");o=!1;for(const s of b){if(typeof s!="string")throw new TypeError("'fetches' must be a string array or an object.");if(this.outputNames.indexOf(s)===-1)throw new RangeError(`'fetches' contains invalid output name: ${s}.`);p[s]=null}if(typeof g=="object"&&g!==null)h=g;else if(typeof g<"u")throw new TypeError("'options' must be an object.")}else{let s=!1;const i=Object.getOwnPropertyNames(b);for(const t of this.outputNames)if(i.indexOf(t)!==-1){const e=b[t];(e===null||e instanceof Tensor)&&(s=!0,o=!1,p[t]=e)}if(s){if(typeof g=="object"&&g!==null)h=g;else if(typeof g<"u")throw new TypeError("'options' must be an object.")}else h=b}}else if(typeof b<"u")throw new TypeError("Unexpected argument[1]: must be 'fetches' or 'options'.");for(const s of this.inputNames)if(typeof u[s]>"u")throw new Error(`input '${s}' is missing in 'feeds'.`);if(o)for(const s of this.outputNames)p[s]=null;const c=await this.handler.run(u,p,h),f={};for(const s in c)Object.hasOwnProperty.call(c,s)&&(f[s]=new Tensor(c[s].type,c[s].data,c[s].dims));return f}static async create(u,b,g,p){let h,o={};if(typeof u=="string"){if(h=u,typeof b=="object"&&b!==null)o=b;else if(typeof b<"u")throw new TypeError("'options' must be an object.")}else if(u instanceof Uint8Array){if(h=u,typeof b=="object"&&b!==null)o=b;else if(typeof b<"u")throw new TypeError("'options' must be an object.")}else if(u instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&u instanceof SharedArrayBuffer){const t=u;let e=0,n=u.byteLength;if(typeof b=="object"&&b!==null)o=b;else if(typeof b=="number"){if(e=b,!Number.isSafeInteger(e))throw new RangeError("'byteOffset' must be an integer.");if(e<0||e>=t.byteLength)throw new RangeError(`'byteOffset' is out of range [0, ${t.byteLength}).`);if(n=u.byteLength-e,typeof g=="number"){if(n=g,!Number.isSafeInteger(n))throw new RangeError("'byteLength' must be an integer.");if(n<=0||e+n>t.byteLength)throw new RangeError(`'byteLength' is out of range (0, ${t.byteLength-e}].`);if(typeof p=="object"&&p!==null)o=p;else if(typeof p<"u")throw new TypeError("'options' must be an object.")}else if(typeof g<"u")throw new TypeError("'byteLength' must be a number.")}else if(typeof b<"u")throw new TypeError("'options' must be an object.");h=new Uint8Array(t,e,n)}else throw new TypeError("Unexpected argument[0]: must be 'path' or 'buffer'.");const f=(o.executionProviders||[]).map(t=>typeof t=="string"?t:t.name),i=await(await resolveBackend(f)).createSessionHandler(h,o);return new cn(i)}startProfiling(){this.handler.startProfiling()}endProfiling(){this.handler.endProfiling()}get inputNames(){return this.handler.inputNames}get outputNames(){return this.handler.outputNames}};const InferenceSession=InferenceSession$1,lib=Object.freeze(Object.defineProperty({__proto__:null,InferenceSession,Tensor,env,registerBackend},Symbol.toStringTag,{value:"Module"})),require$$0=getAugmentedNamespace(lib);/*!
|
2 |
* ONNX Runtime Web v1.14.0
|
3 |
* Copyright (c) Microsoft Corporation. All rights reserved.
|
4 |
* Licensed under the MIT License.
|
assets/{index-BR3VGYw9.js → index-BOwQ_WhZ.js}
RENAMED
@@ -1 +1 @@
|
|
1 |
-
import{_ as mt}from"./IconAnimation.vue_vue_type_script_setup_true_lang-Djn5fd3P.js";import{_ as dt,a as gt}from"./Model.vue_vue_type_script_setup_true_lang-B7ZOwTMx.js";import{d as Y,v as Z,c as O,o as z,e as p,m as ft,q as ut,bM as _t,s as bt,g as R,w as vt,bN as pt,b as S,x as ct,C as H,y as E,a as y,A as W,bE as wt,bI as F,D as U,bx as J,by as nt,bH as xt,bn as Ct,bG as Mt,k as kt,bw as Lt}from"./index-7-fr_lhT.js";import{k as rt,l as yt,m as Vt,J as Dt}from"./live2d-zip-loader-dDw0Wbbr.js";import{_ as ot,a as St}from"./ColorPalette.vue_vue_type_script_setup_true_lang-DpflICIJ.js";import{u as zt}from"./useIconAnimation-BqW7zFiT.js";import{b as st}from"./route-block-B_A1xBdJ.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-D5rspuJc.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-BNzPx9yx.js";import"./index-ZfK3fTHt.js";class Nt{constructor(t,e){this.pixels=t,this.opts=e;const{sigBits:i}=e,r=(M,L,v)=>(M<<2*i)+(L<<i)+v;this.getColorIndex=r;const o=8-i,s=1<<3*i,a=new Uint32Array(s);let c,h,m,f,_,b,l,u,d,g;c=m=_=0,h=f=b=Number.MAX_VALUE;const w=t.length/4;let N=0;for(;N<w;){const M=N*4;if(N++,l=t[M+0],u=t[M+1],d=t[M+2],g=t[M+3],g===0)continue;l=l>>o,u=u>>o,d=d>>o;const L=r(l,u,d);a[L]===void 0&&(a[L]=0),a[L]+=1,l>c&&(c=l),l<h&&(h=l),u>m&&(m=u),u<f&&(f=u),d>_&&(_=d),d<b&&(b=d)}this._colorCount=a.reduce((M,L)=>L>0?M+1:M,0),this.hist=a,this.rmax=c,this.rmin=h,this.gmax=m,this.gmin=f,this.bmax=_,this.bmin=b}get colorCount(){return this._colorCount}}class It{scaleDown(t){const e=this.getWidth(),i=this.getHeight();let r=1;if(t.maxDimension>0){const o=Math.max(e,i);o>t.maxDimension&&(r=t.maxDimension/o)}else r=1/t.quality;r<1&&this.resize(e*r,i*r,r)}}function Et(n,t){var e;if(t.length>0){const i=n.data,r=i.length/4;let o,s,a,c,h;for(let m=0;m<r;m++){o=m*4,s=i[o+0],a=i[o+1],c=i[o+2],h=i[o+3];for(let f=0;f<t.length;f++)if(!((e=t[f])!=null&&e.call(t,s,a,c,h))){i[o+3]=0;break}}}return n}function Ot(n){const t=new URL(n,location.href);return t.protocol===location.protocol&&t.host===location.host&&t.port===location.port}function Pt(n,t){const e=new URL(n),i=new URL(t);return e.protocol===i.protocol&&e.hostname===i.hostname&&e.port===i.port}class Ft extends It{_getCanvas(){if(!this._canvas)throw new Error("Canvas is not initialized");return this._canvas}_getContext(){if(!this._context)throw new Error("Context is not initialized");return this._context}_getWidth(){if(!this._width)throw new Error("Width is not initialized");return this._width}_getHeight(){if(!this._height)throw new Error("Height is not initialized");return this._height}_initCanvas(){const t=this.image;if(!t)throw new Error("Image is not initialized");const e=this._canvas=document.createElement("canvas"),i=e.getContext("2d");if(!i)throw new ReferenceError("Failed to create canvas context");this._context=i,e.className="@vibrant/canvas",e.style.display="none",this._width=e.width=t.width,this._height=e.height=t.height,i.drawImage(t,0,0),document.body.appendChild(e)}load(t){let e,i;if(typeof t=="string")e=document.createElement("img"),i=t,!Ot(i)&&!Pt(window.location.href,i)&&(e.crossOrigin="anonymous"),e.src=i;else if(t instanceof HTMLImageElement)e=t,i=t.src;else return Promise.reject(new Error("Cannot load buffer as an image in browser"));return this.image=e,new Promise((r,o)=>{const s=()=>{this._initCanvas(),r(this)};e.complete?s():(e.onload=s,e.onerror=a=>o(new Error(`Fail to load image: ${i}`)))})}clear(){this._getContext().clearRect(0,0,this._getWidth(),this._getHeight())}update(t){this._getContext().putImageData(t,0,0)}getWidth(){return this._getWidth()}getHeight(){return this._getHeight()}resize(t,e,i){if(!this.image)throw new Error("Image is not initialized");this._width=this._getCanvas().width=t,this._height=this._getCanvas().height=e,this._getContext().scale(i,i),this._getContext().drawImage(this.image,0,0)}getPixelCount(){return this._getWidth()*this._getHeight()}getImageData(){return this._getContext().getImageData(0,0,this._getWidth(),this._getHeight())}remove(){this._canvas&&this._canvas.parentNode&&this._canvas.parentNode.removeChild(this._canvas)}}function T(n,...t){return t.forEach(e=>{if(e){for(const i in e)if(e.hasOwnProperty(i)){const r=e[i];Array.isArray(r)?n[i]=r.slice(0):typeof r=="object"?(n[i]||(n[i]={}),T(n[i],r)):n[i]=r}}}),n}function $t(n,t){const{colorCount:e,quantizer:i,generators:r,filters:o}=n,s={colorCount:e},a=typeof i=="string"?{name:i,options:{}}:i;return a.options=T({},s,a.options),T({},{quantizer:a,generators:r,filters:o},t)}class jt{constructor(t,e={}){this._src=t,this._opts=T({},P.DefaultOpts,e)}maxColorCount(t){return this._opts.colorCount=t,this}maxDimension(t){return this._opts.maxDimension=t,this}addFilter(t){return this._opts.filters?this._opts.filters.push(t):this._opts.filters=[t],this}removeFilter(t){if(this._opts.filters){const e=this._opts.filters.indexOf(t);e>0&&this._opts.filters.splice(e)}return this}clearFilters(){return this._opts.filters=[],this}quality(t){return this._opts.quality=t,this}useImageClass(t){return this._opts.ImageClass=t,this}useGenerator(t,e){return this._opts.generators||(this._opts.generators=[]),this._opts.generators.push(e?{name:t,options:e}:t),this}useQuantizer(t,e){return this._opts.quantizer=e?{name:t,options:e}:t,this}build(){return new P(this._src,this._opts)}getPalette(){return this.build().getPalette()}}class B{constructor(t){this.pipeline=t,this._map={}}names(){return Object.keys(this._map)}has(t){return!!this._map[t]}get(t){return this._map[t]}register(t,e){return this._map[t]=e,this.pipeline}}class Ut{constructor(){this.filter=new B(this),this.quantizer=new B(this),this.generator=new B(this)}_buildProcessTasks({filters:t,quantizer:e,generators:i}){return i.length===1&&i[0]==="*"&&(i=this.generator.names()),{filters:t.map(o=>r(this.filter,o)),quantizer:r(this.quantizer,e),generators:i.map(o=>r(this.generator,o))};function r(o,s){let a,c;return typeof s=="string"?a=s:(a=s.name,c=s.options),{name:a,fn:o.get(a),options:c}}}async process(t,e){const{filters:i,quantizer:r,generators:o}=this._buildProcessTasks(e),s=await this._filterColors(i,t),a=await this._generateColors(r,s),c=await this._generatePalettes(o,a);return{colors:a,palettes:c}}_filterColors(t,e){return Promise.resolve(Et(e,t.map(({fn:i})=>i)))}_generateColors(t,e){return Promise.resolve(t.fn(e.data,t.options))}async _generatePalettes(t,e){const i=await Promise.all(t.map(({fn:r,options:o})=>Promise.resolve(r(e,o))));return Promise.resolve(i.reduce((r,o,s)=>(r[t[s].name]=o,r),{}))}}function Tt(n,t,e){return"#"+((1<<24)+(n<<16)+(t<<8)+e).toString(16).slice(1,7)}function Rt(n,t,e){n/=255,t/=255,e/=255;const i=Math.max(n,t,e),r=Math.min(n,t,e);let o=0,s=0;const a=(i+r)/2;if(i!==r){const c=i-r;switch(s=a>.5?c/(2-i-r):c/(i+r),i){case n:o=(t-e)/c+(t<e?6:0);break;case t:o=(e-n)/c+2;break;case e:o=(n-t)/c+4;break}o/=6}return[o,s,a]}function I(n,t,e){let i,r,o;function s(a,c,h){return h<0&&(h+=1),h>1&&(h-=1),h<1/6?a+(c-a)*6*h:h<1/2?c:h<2/3?a+(c-a)*(2/3-h)*6:a}if(t===0)i=r=o=e;else{const a=e<.5?e*(1+t):e+t-e*t,c=2*e-a;i=s(c,a,n+1/3),r=s(c,a,n),o=s(c,a,n-1/3)}return[i*255,r*255,o*255]}class V{static applyFilters(t,e){return e.length>0?t.filter(({r:i,g:r,b:o})=>{var s;for(let a=0;a<e.length;a++)if(!((s=e[a])!=null&&s.call(e,i,r,o,255)))return!1;return!0}):t}static clone(t){return new V(t._rgb,t._population)}get r(){return this._rgb[0]}get g(){return this._rgb[1]}get b(){return this._rgb[2]}get rgb(){return this._rgb}get hsl(){if(!this._hsl){const[t,e,i]=this._rgb;this._hsl=Rt(t,e,i)}return this._hsl}get hex(){if(!this._hex){const[t,e,i]=this._rgb;this._hex=Tt(t,e,i)}return this._hex}get population(){return this._population}toJSON(){return{rgb:this.rgb,population:this.population}}getYiq(){if(!this._yiq){const t=this._rgb;this._yiq=(t[0]*299+t[1]*587+t[2]*114)/1e3}return this._yiq}get titleTextColor(){return this._titleTextColor||(this._titleTextColor=this.getYiq()<200?"#fff":"#000"),this._titleTextColor}get bodyTextColor(){return this._bodyTextColor||(this._bodyTextColor=this.getYiq()<150?"#fff":"#000"),this._bodyTextColor}constructor(t,e){this._rgb=t,this._population=e}}const ht=class G{constructor(t,e){this._src=t,this.opts=T({},G.DefaultOpts,e)}static use(t){this._pipeline=t}static from(t){return new jt(t)}get result(){return this._result}_process(t,e){t.scaleDown(this.opts);const i=$t(this.opts,e);return G._pipeline.process(t.getImageData(),i)}async getPalette(){const t=new this.opts.ImageClass;try{const e=await t.load(this._src),i=await this._process(e,{generators:["default"]});this._result=i;const r=i.palettes.default;if(!r)throw new Error("Something went wrong and a palette was not found, please file a bug against our GitHub repo: https://github.com/vibrant-Colors/node-vibrant/");return t.remove(),r}catch(e){return t.remove(),Promise.reject(e)}}async getPalettes(){const t=new this.opts.ImageClass;try{const e=await t.load(this._src),i=await this._process(e,{generators:["*"]});this._result=i;const r=i.palettes;return t.remove(),r}catch(e){return t.remove(),Promise.reject(e)}}};ht.DefaultOpts={colorCount:64,quality:5,filters:[]};let P=ht;P.DefaultOpts.quantizer="mmcq";P.DefaultOpts.generators=["default"];P.DefaultOpts.filters=["default"];P.DefaultOpts.ImageClass=Ft;const Q=5,q=8-Q;class A{constructor(t,e,i,r,o,s,a){this.histogram=a,this._volume=-1,this._avg=null,this._count=-1,this.dimension={r1:t,r2:e,g1:i,g2:r,b1:o,b2:s}}static build(t){const e=new Nt(t,{sigBits:Q}),{rmin:i,rmax:r,gmin:o,gmax:s,bmin:a,bmax:c}=e;return new A(i,r,o,s,a,c,e)}invalidate(){this._volume=this._count=-1,this._avg=null}volume(){if(this._volume<0){const{r1:t,r2:e,g1:i,g2:r,b1:o,b2:s}=this.dimension;this._volume=(e-t+1)*(r-i+1)*(s-o+1)}return this._volume}count(){if(this._count<0){const{hist:t,getColorIndex:e}=this.histogram,{r1:i,r2:r,g1:o,g2:s,b1:a,b2:c}=this.dimension;let h=0;for(let m=i;m<=r;m++)for(let f=o;f<=s;f++)for(let _=a;_<=c;_++){const b=e(m,f,_);t[b]&&(h+=t[b])}this._count=h}return this._count}clone(){const{histogram:t}=this,{r1:e,r2:i,g1:r,g2:o,b1:s,b2:a}=this.dimension;return new A(e,i,r,o,s,a,t)}avg(){if(!this._avg){const{hist:t,getColorIndex:e}=this.histogram,{r1:i,r2:r,g1:o,g2:s,b1:a,b2:c}=this.dimension;let h=0;const m=1<<8-Q;let f,_,b;f=_=b=0;for(let l=i;l<=r;l++)for(let u=o;u<=s;u++)for(let d=a;d<=c;d++){const g=e(l,u,d),w=t[g];w&&(h+=w,f+=w*(l+.5)*m,_+=w*(u+.5)*m,b+=w*(d+.5)*m)}h?this._avg=[~~(f/h),~~(_/h),~~(b/h)]:this._avg=[~~(m*(i+r+1)/2),~~(m*(o+s+1)/2),~~(m*(a+c+1)/2)]}return this._avg}contains(t){let[e,i,r]=t;const{r1:o,r2:s,g1:a,g2:c,b1:h,b2:m}=this.dimension;return e>>=q,i>>=q,r>>=q,e>=o&&e<=s&&i>=a&&i<=c&&r>=h&&r<=m}split(){const{hist:t,getColorIndex:e}=this.histogram,{r1:i,r2:r,g1:o,g2:s,b1:a,b2:c}=this.dimension,h=this.count();if(!h)return[];if(h===1)return[this.clone()];const m=r-i+1,f=s-o+1,_=c-a+1,b=Math.max(m,f,_);let l=null,u,d;u=d=0;let g=null;if(b===m){g="r",l=new Uint32Array(r+1);for(let v=i;v<=r;v++){u=0;for(let x=o;x<=s;x++)for(let C=a;C<=c;C++){const D=e(v,x,C);t[D]&&(u+=t[D])}d+=u,l[v]=d}}else if(b===f){g="g",l=new Uint32Array(s+1);for(let v=o;v<=s;v++){u=0;for(let x=i;x<=r;x++)for(let C=a;C<=c;C++){const D=e(x,v,C);t[D]&&(u+=t[D])}d+=u,l[v]=d}}else{g="b",l=new Uint32Array(c+1);for(let v=a;v<=c;v++){u=0;for(let x=i;x<=r;x++)for(let C=o;C<=s;C++){const D=e(x,C,v);t[D]&&(u+=t[D])}d+=u,l[v]=d}}let w=-1;const N=new Uint32Array(l.length);for(let v=0;v<l.length;v++){const x=l[v];x&&(w<0&&x>d/2&&(w=v),N[v]=d-x)}const M=this;function L(v){const x=v+"1",C=v+"2",D=M.dimension[x];let k=M.dimension[C];const X=M.clone(),K=M.clone(),tt=w-D,et=k-w;for(tt<=et?(k=Math.min(k-1,~~(w+et/2)),k=Math.max(0,k)):(k=Math.max(D,~~(w-1-tt/2)),k=Math.min(M.dimension[C],k));!l[k];)k++;let it=N[k];for(;!it&&l[k-1];)it=N[--k];return X.dimension[C]=k,K.dimension[x]=k+1,[X,K]}return L(g)}}class at{_sort(){this._sorted||(this.contents.sort(this._comparator),this._sorted=!0)}constructor(t){this._comparator=t,this.contents=[],this._sorted=!1}push(t){this.contents.push(t),this._sorted=!1}peek(t){return this._sort(),t=typeof t=="number"?t:this.contents.length-1,this.contents[t]}pop(){return this._sort(),this.contents.pop()}size(){return this.contents.length}map(t){return this._sort(),this.contents.map(t)}}const At=.75;function lt(n,t){let e=n.size();for(;n.size()<t;){const i=n.pop();if(i&&i.count()>0){const[r,o]=i.split();if(!r||(n.push(r),o&&o.count()>0&&n.push(o),n.size()===e))break;e=n.size()}else break}}const Bt=(n,t)=>{if(n.length===0||t.colorCount<2||t.colorCount>256)throw new Error("Wrong MMCQ parameters");const e=A.build(n);e.histogram.colorCount;const i=new at((o,s)=>o.count()-s.count());i.push(e),lt(i,At*t.colorCount);const r=new at((o,s)=>o.count()*o.volume()-s.count()*s.volume());return r.contents=i.contents,lt(r,t.colorCount-r.size()),qt(r)};function qt(n){const t=[];for(;n.size();){const e=n.pop(),i=e.avg();t.push(new V(i,e.count()))}return t}const Ht={targetDarkLuma:.26,maxDarkLuma:.45,minLightLuma:.55,targetLightLuma:.74,minNormalLuma:.3,targetNormalLuma:.5,maxNormalLuma:.7,targetMutesSaturation:.3,maxMutesSaturation:.4,targetVibrantSaturation:1,minVibrantSaturation:.35,weightSaturation:3,weightLuma:6.5,weightPopulation:.5};function Wt(n){let t=0;return n.forEach(e=>{t=Math.max(t,e.population)}),t}function Jt(n,t){return n.Vibrant===t||n.DarkVibrant===t||n.LightVibrant===t||n.Muted===t||n.DarkMuted===t||n.LightMuted===t}function Gt(n,t,e,i,r,o,s){function a(...h){let m=0,f=0;for(let _=0;_<h.length;_+=2){const b=h[_],l=h[_+1];!b||!l||(m+=b*l,f+=l)}return m/f}function c(h,m){return 1-Math.abs(h-m)}return a(c(n,t),s.weightSaturation,c(e,i),s.weightLuma,r/o,s.weightPopulation)}function $(n,t,e,i,r,o,s,a,c,h){let m=null,f=0;return t.forEach(_=>{const[,b,l]=_.hsl;if(b>=a&&b<=c&&l>=r&&l<=o&&!Jt(n,_)){const u=Gt(b,s,l,i,_.population,e,h);(m===null||u>f)&&(m=_,f=u)}}),m}function Qt(n,t,e){const i={Vibrant:null,DarkVibrant:null,LightVibrant:null,Muted:null,DarkMuted:null,LightMuted:null};return i.Vibrant=$(i,n,t,e.targetNormalLuma,e.minNormalLuma,e.maxNormalLuma,e.targetVibrantSaturation,e.minVibrantSaturation,1,e),i.LightVibrant=$(i,n,t,e.targetLightLuma,e.minLightLuma,1,e.targetVibrantSaturation,e.minVibrantSaturation,1,e),i.DarkVibrant=$(i,n,t,e.targetDarkLuma,0,e.maxDarkLuma,e.targetVibrantSaturation,e.minVibrantSaturation,1,e),i.Muted=$(i,n,t,e.targetNormalLuma,e.minNormalLuma,e.maxNormalLuma,e.targetMutesSaturation,0,e.maxMutesSaturation,e),i.LightMuted=$(i,n,t,e.targetLightLuma,e.minLightLuma,1,e.targetMutesSaturation,0,e.maxMutesSaturation,e),i.DarkMuted=$(i,n,t,e.targetDarkLuma,0,e.maxDarkLuma,e.targetMutesSaturation,0,e.maxMutesSaturation,e),i}function Yt(n,t,e){if(!n.Vibrant&&!n.DarkVibrant&&!n.LightVibrant){if(!n.DarkVibrant&&n.DarkMuted){let[i,r,o]=n.DarkMuted.hsl;o=e.targetDarkLuma,n.DarkVibrant=new V(I(i,r,o),0)}if(!n.LightVibrant&&n.LightMuted){let[i,r,o]=n.LightMuted.hsl;o=e.targetDarkLuma,n.DarkVibrant=new V(I(i,r,o),0)}}if(!n.Vibrant&&n.DarkVibrant){let[i,r,o]=n.DarkVibrant.hsl;o=e.targetNormalLuma,n.Vibrant=new V(I(i,r,o),0)}else if(!n.Vibrant&&n.LightVibrant){let[i,r,o]=n.LightVibrant.hsl;o=e.targetNormalLuma,n.Vibrant=new V(I(i,r,o),0)}if(!n.DarkVibrant&&n.Vibrant){let[i,r,o]=n.Vibrant.hsl;o=e.targetDarkLuma,n.DarkVibrant=new V(I(i,r,o),0)}if(!n.LightVibrant&&n.Vibrant){let[i,r,o]=n.Vibrant.hsl;o=e.targetLightLuma,n.LightVibrant=new V(I(i,r,o),0)}if(!n.Muted&&n.Vibrant){let[i,r,o]=n.Vibrant.hsl;o=e.targetMutesSaturation,n.Muted=new V(I(i,r,o),0)}if(!n.DarkMuted&&n.DarkVibrant){let[i,r,o]=n.DarkVibrant.hsl;o=e.targetMutesSaturation,n.DarkMuted=new V(I(i,r,o),0)}if(!n.LightMuted&&n.LightVibrant){let[i,r,o]=n.LightVibrant.hsl;o=e.targetMutesSaturation,n.LightMuted=new V(I(i,r,o),0)}}const Zt=(n,t)=>{t=Object.assign({},Ht,t);const e=Wt(n),i=Qt(n,e,t);return Yt(i,e,t),i},Xt=new Ut().filter.register("default",(n,t,e,i)=>i>=125&&!(n>250&&t>250&&e>250)).quantizer.register("mmcq",Bt).generator.register("default",Zt);P.use(Xt);const Kt=["disabled"],j=Y({__name:"Live2DModelControlButton",emits:["click"],setup(n){const t=Z();return(e,i)=>(z(),O("button",{disabled:p(t).loadingLive2dModel,bg:"zinc-100 dark:zinc-800",hover:"bg-zinc-200 dark:bg-zinc-700",transition:"all ease-in-out duration-250",rounded:"",onClick:i[0]||(i[0]=r=>e.$emit("click"))},[ft(e.$slots,"default")],8,Kt))}}),te={flex:"~ col gap-4"},ee={flex:"","items-center":"","gap-2":""},ie=["disabled","placeholder"],ne={"font-medium":""},re={flex:"","gap-2":""},oe=["onUpdate:modelValue"],se=["href","download"],ae=Y({__name:"Live2DSettings",props:{palette:null},emits:["extractColorsFromModel"],setup(n){const{t}=ut(),e=_t({accept:"application/zip"}),i=Z(),{live2dModelFile:r,live2dMotionMap:o,live2dLoadSource:s,loadingLive2dModel:a,availableLive2dMotions:c,live2dModelUrl:h}=bt(i),m=R(h.value);e.onChange(l=>{l&&l.length>0&&(o.value={},r.value=l[0],s.value="file",a.value=!0)}),vt(()=>i.loadingLive2dModel,l=>{l||s.value==="file"&&c.value.forEach(u=>{u.motionName in rt?o.value[u.fileName]=u.motionName:o.value[u.fileName]=yt})});async function f(l,u){if(!Object.keys(u).length)return l;const g=await new Dt().loadAsync(l),w=Object.keys(g.files).find(x=>x.endsWith("model3.json"));if(!w)throw new Error("model3.json not found");const N=await g.file(w).async("string"),M=JSON.parse(N),L={};Object.entries(u).forEach(([x,C])=>{if(L[C]){L[C].push({File:x});return}L[C]=[{File:x}]}),M.FileReferences.Motions=L,g.file(w,JSON.stringify(M,null,2));const v=await g.generateAsync({type:"blob"});return new File([v],l.name,{type:l.type,lastModified:l.lastModified})}async function _(){const l=await Vt.getItem("live2dModel");if(!l)return;const u=await f(l,o.value);r.value=u,s.value="file",a.value=!0}const b=pt(r);return(l,u)=>(z(),O("div",te,[S(p(ot),{title:"settings.live2d.change-model.title",icon:"i-solar:magic-stick-3-bold-duotone","inner-class":"text-sm"},{default:E(()=>[y("div",ee,[W(y("input",{"onUpdate:modelValue":u[0]||(u[0]=d=>m.value=d),disabled:p(i).loadingLive2dModel,class:"form-control flex-1",border:"zinc-300 dark:zinc-800 solid 1 focus:zinc-400 dark:focus:zinc-600",transition:"border duration-250 ease-in-out",placeholder:p(t)("settings.live2d.change-model.from-url-placeholder")},null,8,ie),[[wt,m.value]]),S(j,{class:"form-control",onClick:u[1]||(u[1]=d=>h.value=m.value)},{default:E(()=>[F(U(p(t)("settings.live2d.change-model.from-url")),1)]),_:1})]),S(j,{class:"form-control place-self-end",onClick:u[2]||(u[2]=d=>p(e).open())},{default:E(()=>[F(U(p(t)("settings.live2d.change-model.from-file"))+"... ",1)]),_:1}),S(j,{class:"form-control",onClick:u[3]||(u[3]=d=>l.$emit("extractColorsFromModel"))},{default:E(()=>u[4]||(u[4]=[F(" Extract colors from model ")])),_:1}),S(St,{colors:n.palette.map(d=>({hex:d,name:d}))},null,8,["colors"])]),_:1}),p(i).live2dLoadSource==="file"?(z(),ct(p(ot),{key:0,title:"settings.live2d.edit-motion-map.title",icon:"i-solar:face-scan-circle-bold-duotone"},{default:E(()=>{var d;return[(z(!0),O(J,null,nt(p(i).availableLive2dMotions,g=>(z(),O("div",{key:g.fileName,flex:"","items-center":"","justify-between":"","text-sm":""},[y("span",ne,U(g.fileName),1),y("div",re,[W(y("select",{"onUpdate:modelValue":w=>p(i).live2dMotionMap[g.fileName]=w},[(z(!0),O(J,null,nt(Object.keys(p(rt)),w=>(z(),O("option",{key:w},U(w),1))),128))],8,oe),[[xt,p(i).live2dMotionMap[g.fileName]]]),S(j,{class:"form-control",onClick:w=>p(i).live2dCurrentMotion={group:g.motionName,index:g.motionIndex}},{default:E(()=>u[5]||(u[5]=[F(" Play ")])),_:2},1032,["onClick"])])]))),128)),S(j,{onClick:_},{default:E(()=>u[6]||(u[6]=[F(" Save and patch ")])),_:1}),y("a",{"mt-2":"",block:"",href:p(b),download:`${((d=p(i).live2dModelFile)==null?void 0:d.name)||"live2d"}-motion-edited.zip`},[S(j,{"w-full":""},{default:E(()=>u[7]||(u[7]=[F("Export")])),_:1})],8,se)]}),_:1})):H("",!0)]))}}),le=Ct(ae,[["__scopeId","data-v-de39498b"]]),ue={flex:"~ row","items-center":"","gap-2":"",initial:{opacity:0,x:10},enter:{opacity:1,x:0},leave:{opacity:0,x:-10},duration:250},ce={relative:"","text-nowrap":""},he={absolute:"","left-0":"","top-0":"","translate-y":"[-80%]",text:"neutral-300 dark:neutral-500"},me={"text-3xl":"","font-semibold":""},de={flex:""},ge={key:1,text:"neutral-200/50 dark:neutral-500/20","pointer-events-none":"",fixed:"","bottom-0":"","right-0":"","z--1":"","translate-x-10":"","translate-y-10":""},fe=Y({__name:"index",setup(n){const{t}=ut(),e=Mt(),i=R(),r=R(),{width:o,height:s}=kt(i),a=Z(),c=R([]);async function h(){if(!r.value)return;const b=await r.value.captureFrame();if(!b){console.error("No frame captured");return}const l=URL.createObjectURL(b);try{const d=await new P(l).getPalette();c.value=Object.values(d).map(g=>g==null?void 0:g.hex).filter(g=>typeof g=="string")}finally{URL.revokeObjectURL(l)}}const{iconAnimationStarted:m,showIconAnimation:f,animationIcon:_}=zt("i-lucide:person-standing");return(b,l)=>{const u=mt,d=Lt("motion");return z(),O(J,null,[W((z(),O("div",ue,[y("button",{"i-solar:alt-arrow-left-line-duotone":"","text-2xl":"",onClick:l[0]||(l[0]=g=>p(e).back())}),y("h1",ce,[y("div",he,U(p(t)("settings.title")),1),y("div",me,U(p(t)("settings.pages.models.title")),1)])])),[[d]]),y("div",de,[y("div",{ref_key:"live2dContainerRef",ref:i,w:"50%",h:"80vh"},[S(gt,{ref_key:"live2dCanvasRef",ref:r,width:p(o),height:p(s)},{default:E(({app:g})=>[S(dt,{app:g,"mouth-open-size":0,width:p(o),height:p(s),paused:!1},null,8,["app","width","height"])]),_:1},8,["width","height"])],512),S(le,{w:"50%",h:"80vh",palette:c.value,onExtractColorsFromModel:h},null,8,["palette"])]),p(f)?(z(),ct(u,{key:0,"z-index":-1,icon:p(_),"icon-size":12,duration:1e3,started:p(m),"is-reverse":!0,position:"calc(100dvw - 9.5rem), calc(100dvh - 9.5rem)","text-color":"text-neutral-200/50 dark:text-neutral-600/20"},null,8,["icon","started"])):H("",!0),p(a).usePageSpecificTransitions?H("",!0):(z(),O("div",ge,l[1]||(l[1]=[y("div",{text:"40","i-lucide:person-standing":""},null,-1)])))],64)}}});typeof st=="function"&&st(fe);export{fe as default};
|
|
|
1 |
+
import{_ as mt}from"./IconAnimation.vue_vue_type_script_setup_true_lang-B0Tznm9Y.js";import{_ as dt,a as gt}from"./Model.vue_vue_type_script_setup_true_lang-Wfrg8fps.js";import{d as Y,v as Z,c as O,o as z,e as p,m as ft,q as ut,bM as _t,s as bt,g as R,w as vt,bN as pt,b as S,x as ct,C as H,y as E,a as y,A as W,bE as wt,bI as F,D as U,bx as J,by as nt,bH as xt,bn as Ct,bG as Mt,k as kt,bw as Lt}from"./index-hDb1Lsb8.js";import{k as rt,l as yt,m as Vt,J as Dt}from"./live2d-zip-loader--bTGFeQd.js";import{_ as ot,a as St}from"./ColorPalette.vue_vue_type_script_setup_true_lang-XM3XfZvN.js";import{u as zt}from"./useIconAnimation-DVKfiTTG.js";import{b as st}from"./route-block-B_A1xBdJ.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-bS5XNUtd.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-BTGItw4h.js";import"./index-CborASRd.js";class Nt{constructor(t,e){this.pixels=t,this.opts=e;const{sigBits:i}=e,r=(M,L,v)=>(M<<2*i)+(L<<i)+v;this.getColorIndex=r;const o=8-i,s=1<<3*i,a=new Uint32Array(s);let c,h,m,f,_,b,l,u,d,g;c=m=_=0,h=f=b=Number.MAX_VALUE;const w=t.length/4;let N=0;for(;N<w;){const M=N*4;if(N++,l=t[M+0],u=t[M+1],d=t[M+2],g=t[M+3],g===0)continue;l=l>>o,u=u>>o,d=d>>o;const L=r(l,u,d);a[L]===void 0&&(a[L]=0),a[L]+=1,l>c&&(c=l),l<h&&(h=l),u>m&&(m=u),u<f&&(f=u),d>_&&(_=d),d<b&&(b=d)}this._colorCount=a.reduce((M,L)=>L>0?M+1:M,0),this.hist=a,this.rmax=c,this.rmin=h,this.gmax=m,this.gmin=f,this.bmax=_,this.bmin=b}get colorCount(){return this._colorCount}}class It{scaleDown(t){const e=this.getWidth(),i=this.getHeight();let r=1;if(t.maxDimension>0){const o=Math.max(e,i);o>t.maxDimension&&(r=t.maxDimension/o)}else r=1/t.quality;r<1&&this.resize(e*r,i*r,r)}}function Et(n,t){var e;if(t.length>0){const i=n.data,r=i.length/4;let o,s,a,c,h;for(let m=0;m<r;m++){o=m*4,s=i[o+0],a=i[o+1],c=i[o+2],h=i[o+3];for(let f=0;f<t.length;f++)if(!((e=t[f])!=null&&e.call(t,s,a,c,h))){i[o+3]=0;break}}}return n}function Ot(n){const t=new URL(n,location.href);return t.protocol===location.protocol&&t.host===location.host&&t.port===location.port}function Pt(n,t){const e=new URL(n),i=new URL(t);return e.protocol===i.protocol&&e.hostname===i.hostname&&e.port===i.port}class Ft extends It{_getCanvas(){if(!this._canvas)throw new Error("Canvas is not initialized");return this._canvas}_getContext(){if(!this._context)throw new Error("Context is not initialized");return this._context}_getWidth(){if(!this._width)throw new Error("Width is not initialized");return this._width}_getHeight(){if(!this._height)throw new Error("Height is not initialized");return this._height}_initCanvas(){const t=this.image;if(!t)throw new Error("Image is not initialized");const e=this._canvas=document.createElement("canvas"),i=e.getContext("2d");if(!i)throw new ReferenceError("Failed to create canvas context");this._context=i,e.className="@vibrant/canvas",e.style.display="none",this._width=e.width=t.width,this._height=e.height=t.height,i.drawImage(t,0,0),document.body.appendChild(e)}load(t){let e,i;if(typeof t=="string")e=document.createElement("img"),i=t,!Ot(i)&&!Pt(window.location.href,i)&&(e.crossOrigin="anonymous"),e.src=i;else if(t instanceof HTMLImageElement)e=t,i=t.src;else return Promise.reject(new Error("Cannot load buffer as an image in browser"));return this.image=e,new Promise((r,o)=>{const s=()=>{this._initCanvas(),r(this)};e.complete?s():(e.onload=s,e.onerror=a=>o(new Error(`Fail to load image: ${i}`)))})}clear(){this._getContext().clearRect(0,0,this._getWidth(),this._getHeight())}update(t){this._getContext().putImageData(t,0,0)}getWidth(){return this._getWidth()}getHeight(){return this._getHeight()}resize(t,e,i){if(!this.image)throw new Error("Image is not initialized");this._width=this._getCanvas().width=t,this._height=this._getCanvas().height=e,this._getContext().scale(i,i),this._getContext().drawImage(this.image,0,0)}getPixelCount(){return this._getWidth()*this._getHeight()}getImageData(){return this._getContext().getImageData(0,0,this._getWidth(),this._getHeight())}remove(){this._canvas&&this._canvas.parentNode&&this._canvas.parentNode.removeChild(this._canvas)}}function T(n,...t){return t.forEach(e=>{if(e){for(const i in e)if(e.hasOwnProperty(i)){const r=e[i];Array.isArray(r)?n[i]=r.slice(0):typeof r=="object"?(n[i]||(n[i]={}),T(n[i],r)):n[i]=r}}}),n}function $t(n,t){const{colorCount:e,quantizer:i,generators:r,filters:o}=n,s={colorCount:e},a=typeof i=="string"?{name:i,options:{}}:i;return a.options=T({},s,a.options),T({},{quantizer:a,generators:r,filters:o},t)}class jt{constructor(t,e={}){this._src=t,this._opts=T({},P.DefaultOpts,e)}maxColorCount(t){return this._opts.colorCount=t,this}maxDimension(t){return this._opts.maxDimension=t,this}addFilter(t){return this._opts.filters?this._opts.filters.push(t):this._opts.filters=[t],this}removeFilter(t){if(this._opts.filters){const e=this._opts.filters.indexOf(t);e>0&&this._opts.filters.splice(e)}return this}clearFilters(){return this._opts.filters=[],this}quality(t){return this._opts.quality=t,this}useImageClass(t){return this._opts.ImageClass=t,this}useGenerator(t,e){return this._opts.generators||(this._opts.generators=[]),this._opts.generators.push(e?{name:t,options:e}:t),this}useQuantizer(t,e){return this._opts.quantizer=e?{name:t,options:e}:t,this}build(){return new P(this._src,this._opts)}getPalette(){return this.build().getPalette()}}class B{constructor(t){this.pipeline=t,this._map={}}names(){return Object.keys(this._map)}has(t){return!!this._map[t]}get(t){return this._map[t]}register(t,e){return this._map[t]=e,this.pipeline}}class Ut{constructor(){this.filter=new B(this),this.quantizer=new B(this),this.generator=new B(this)}_buildProcessTasks({filters:t,quantizer:e,generators:i}){return i.length===1&&i[0]==="*"&&(i=this.generator.names()),{filters:t.map(o=>r(this.filter,o)),quantizer:r(this.quantizer,e),generators:i.map(o=>r(this.generator,o))};function r(o,s){let a,c;return typeof s=="string"?a=s:(a=s.name,c=s.options),{name:a,fn:o.get(a),options:c}}}async process(t,e){const{filters:i,quantizer:r,generators:o}=this._buildProcessTasks(e),s=await this._filterColors(i,t),a=await this._generateColors(r,s),c=await this._generatePalettes(o,a);return{colors:a,palettes:c}}_filterColors(t,e){return Promise.resolve(Et(e,t.map(({fn:i})=>i)))}_generateColors(t,e){return Promise.resolve(t.fn(e.data,t.options))}async _generatePalettes(t,e){const i=await Promise.all(t.map(({fn:r,options:o})=>Promise.resolve(r(e,o))));return Promise.resolve(i.reduce((r,o,s)=>(r[t[s].name]=o,r),{}))}}function Tt(n,t,e){return"#"+((1<<24)+(n<<16)+(t<<8)+e).toString(16).slice(1,7)}function Rt(n,t,e){n/=255,t/=255,e/=255;const i=Math.max(n,t,e),r=Math.min(n,t,e);let o=0,s=0;const a=(i+r)/2;if(i!==r){const c=i-r;switch(s=a>.5?c/(2-i-r):c/(i+r),i){case n:o=(t-e)/c+(t<e?6:0);break;case t:o=(e-n)/c+2;break;case e:o=(n-t)/c+4;break}o/=6}return[o,s,a]}function I(n,t,e){let i,r,o;function s(a,c,h){return h<0&&(h+=1),h>1&&(h-=1),h<1/6?a+(c-a)*6*h:h<1/2?c:h<2/3?a+(c-a)*(2/3-h)*6:a}if(t===0)i=r=o=e;else{const a=e<.5?e*(1+t):e+t-e*t,c=2*e-a;i=s(c,a,n+1/3),r=s(c,a,n),o=s(c,a,n-1/3)}return[i*255,r*255,o*255]}class V{static applyFilters(t,e){return e.length>0?t.filter(({r:i,g:r,b:o})=>{var s;for(let a=0;a<e.length;a++)if(!((s=e[a])!=null&&s.call(e,i,r,o,255)))return!1;return!0}):t}static clone(t){return new V(t._rgb,t._population)}get r(){return this._rgb[0]}get g(){return this._rgb[1]}get b(){return this._rgb[2]}get rgb(){return this._rgb}get hsl(){if(!this._hsl){const[t,e,i]=this._rgb;this._hsl=Rt(t,e,i)}return this._hsl}get hex(){if(!this._hex){const[t,e,i]=this._rgb;this._hex=Tt(t,e,i)}return this._hex}get population(){return this._population}toJSON(){return{rgb:this.rgb,population:this.population}}getYiq(){if(!this._yiq){const t=this._rgb;this._yiq=(t[0]*299+t[1]*587+t[2]*114)/1e3}return this._yiq}get titleTextColor(){return this._titleTextColor||(this._titleTextColor=this.getYiq()<200?"#fff":"#000"),this._titleTextColor}get bodyTextColor(){return this._bodyTextColor||(this._bodyTextColor=this.getYiq()<150?"#fff":"#000"),this._bodyTextColor}constructor(t,e){this._rgb=t,this._population=e}}const ht=class G{constructor(t,e){this._src=t,this.opts=T({},G.DefaultOpts,e)}static use(t){this._pipeline=t}static from(t){return new jt(t)}get result(){return this._result}_process(t,e){t.scaleDown(this.opts);const i=$t(this.opts,e);return G._pipeline.process(t.getImageData(),i)}async getPalette(){const t=new this.opts.ImageClass;try{const e=await t.load(this._src),i=await this._process(e,{generators:["default"]});this._result=i;const r=i.palettes.default;if(!r)throw new Error("Something went wrong and a palette was not found, please file a bug against our GitHub repo: https://github.com/vibrant-Colors/node-vibrant/");return t.remove(),r}catch(e){return t.remove(),Promise.reject(e)}}async getPalettes(){const t=new this.opts.ImageClass;try{const e=await t.load(this._src),i=await this._process(e,{generators:["*"]});this._result=i;const r=i.palettes;return t.remove(),r}catch(e){return t.remove(),Promise.reject(e)}}};ht.DefaultOpts={colorCount:64,quality:5,filters:[]};let P=ht;P.DefaultOpts.quantizer="mmcq";P.DefaultOpts.generators=["default"];P.DefaultOpts.filters=["default"];P.DefaultOpts.ImageClass=Ft;const Q=5,q=8-Q;class A{constructor(t,e,i,r,o,s,a){this.histogram=a,this._volume=-1,this._avg=null,this._count=-1,this.dimension={r1:t,r2:e,g1:i,g2:r,b1:o,b2:s}}static build(t){const e=new Nt(t,{sigBits:Q}),{rmin:i,rmax:r,gmin:o,gmax:s,bmin:a,bmax:c}=e;return new A(i,r,o,s,a,c,e)}invalidate(){this._volume=this._count=-1,this._avg=null}volume(){if(this._volume<0){const{r1:t,r2:e,g1:i,g2:r,b1:o,b2:s}=this.dimension;this._volume=(e-t+1)*(r-i+1)*(s-o+1)}return this._volume}count(){if(this._count<0){const{hist:t,getColorIndex:e}=this.histogram,{r1:i,r2:r,g1:o,g2:s,b1:a,b2:c}=this.dimension;let h=0;for(let m=i;m<=r;m++)for(let f=o;f<=s;f++)for(let _=a;_<=c;_++){const b=e(m,f,_);t[b]&&(h+=t[b])}this._count=h}return this._count}clone(){const{histogram:t}=this,{r1:e,r2:i,g1:r,g2:o,b1:s,b2:a}=this.dimension;return new A(e,i,r,o,s,a,t)}avg(){if(!this._avg){const{hist:t,getColorIndex:e}=this.histogram,{r1:i,r2:r,g1:o,g2:s,b1:a,b2:c}=this.dimension;let h=0;const m=1<<8-Q;let f,_,b;f=_=b=0;for(let l=i;l<=r;l++)for(let u=o;u<=s;u++)for(let d=a;d<=c;d++){const g=e(l,u,d),w=t[g];w&&(h+=w,f+=w*(l+.5)*m,_+=w*(u+.5)*m,b+=w*(d+.5)*m)}h?this._avg=[~~(f/h),~~(_/h),~~(b/h)]:this._avg=[~~(m*(i+r+1)/2),~~(m*(o+s+1)/2),~~(m*(a+c+1)/2)]}return this._avg}contains(t){let[e,i,r]=t;const{r1:o,r2:s,g1:a,g2:c,b1:h,b2:m}=this.dimension;return e>>=q,i>>=q,r>>=q,e>=o&&e<=s&&i>=a&&i<=c&&r>=h&&r<=m}split(){const{hist:t,getColorIndex:e}=this.histogram,{r1:i,r2:r,g1:o,g2:s,b1:a,b2:c}=this.dimension,h=this.count();if(!h)return[];if(h===1)return[this.clone()];const m=r-i+1,f=s-o+1,_=c-a+1,b=Math.max(m,f,_);let l=null,u,d;u=d=0;let g=null;if(b===m){g="r",l=new Uint32Array(r+1);for(let v=i;v<=r;v++){u=0;for(let x=o;x<=s;x++)for(let C=a;C<=c;C++){const D=e(v,x,C);t[D]&&(u+=t[D])}d+=u,l[v]=d}}else if(b===f){g="g",l=new Uint32Array(s+1);for(let v=o;v<=s;v++){u=0;for(let x=i;x<=r;x++)for(let C=a;C<=c;C++){const D=e(x,v,C);t[D]&&(u+=t[D])}d+=u,l[v]=d}}else{g="b",l=new Uint32Array(c+1);for(let v=a;v<=c;v++){u=0;for(let x=i;x<=r;x++)for(let C=o;C<=s;C++){const D=e(x,C,v);t[D]&&(u+=t[D])}d+=u,l[v]=d}}let w=-1;const N=new Uint32Array(l.length);for(let v=0;v<l.length;v++){const x=l[v];x&&(w<0&&x>d/2&&(w=v),N[v]=d-x)}const M=this;function L(v){const x=v+"1",C=v+"2",D=M.dimension[x];let k=M.dimension[C];const X=M.clone(),K=M.clone(),tt=w-D,et=k-w;for(tt<=et?(k=Math.min(k-1,~~(w+et/2)),k=Math.max(0,k)):(k=Math.max(D,~~(w-1-tt/2)),k=Math.min(M.dimension[C],k));!l[k];)k++;let it=N[k];for(;!it&&l[k-1];)it=N[--k];return X.dimension[C]=k,K.dimension[x]=k+1,[X,K]}return L(g)}}class at{_sort(){this._sorted||(this.contents.sort(this._comparator),this._sorted=!0)}constructor(t){this._comparator=t,this.contents=[],this._sorted=!1}push(t){this.contents.push(t),this._sorted=!1}peek(t){return this._sort(),t=typeof t=="number"?t:this.contents.length-1,this.contents[t]}pop(){return this._sort(),this.contents.pop()}size(){return this.contents.length}map(t){return this._sort(),this.contents.map(t)}}const At=.75;function lt(n,t){let e=n.size();for(;n.size()<t;){const i=n.pop();if(i&&i.count()>0){const[r,o]=i.split();if(!r||(n.push(r),o&&o.count()>0&&n.push(o),n.size()===e))break;e=n.size()}else break}}const Bt=(n,t)=>{if(n.length===0||t.colorCount<2||t.colorCount>256)throw new Error("Wrong MMCQ parameters");const e=A.build(n);e.histogram.colorCount;const i=new at((o,s)=>o.count()-s.count());i.push(e),lt(i,At*t.colorCount);const r=new at((o,s)=>o.count()*o.volume()-s.count()*s.volume());return r.contents=i.contents,lt(r,t.colorCount-r.size()),qt(r)};function qt(n){const t=[];for(;n.size();){const e=n.pop(),i=e.avg();t.push(new V(i,e.count()))}return t}const Ht={targetDarkLuma:.26,maxDarkLuma:.45,minLightLuma:.55,targetLightLuma:.74,minNormalLuma:.3,targetNormalLuma:.5,maxNormalLuma:.7,targetMutesSaturation:.3,maxMutesSaturation:.4,targetVibrantSaturation:1,minVibrantSaturation:.35,weightSaturation:3,weightLuma:6.5,weightPopulation:.5};function Wt(n){let t=0;return n.forEach(e=>{t=Math.max(t,e.population)}),t}function Jt(n,t){return n.Vibrant===t||n.DarkVibrant===t||n.LightVibrant===t||n.Muted===t||n.DarkMuted===t||n.LightMuted===t}function Gt(n,t,e,i,r,o,s){function a(...h){let m=0,f=0;for(let _=0;_<h.length;_+=2){const b=h[_],l=h[_+1];!b||!l||(m+=b*l,f+=l)}return m/f}function c(h,m){return 1-Math.abs(h-m)}return a(c(n,t),s.weightSaturation,c(e,i),s.weightLuma,r/o,s.weightPopulation)}function $(n,t,e,i,r,o,s,a,c,h){let m=null,f=0;return t.forEach(_=>{const[,b,l]=_.hsl;if(b>=a&&b<=c&&l>=r&&l<=o&&!Jt(n,_)){const u=Gt(b,s,l,i,_.population,e,h);(m===null||u>f)&&(m=_,f=u)}}),m}function Qt(n,t,e){const i={Vibrant:null,DarkVibrant:null,LightVibrant:null,Muted:null,DarkMuted:null,LightMuted:null};return i.Vibrant=$(i,n,t,e.targetNormalLuma,e.minNormalLuma,e.maxNormalLuma,e.targetVibrantSaturation,e.minVibrantSaturation,1,e),i.LightVibrant=$(i,n,t,e.targetLightLuma,e.minLightLuma,1,e.targetVibrantSaturation,e.minVibrantSaturation,1,e),i.DarkVibrant=$(i,n,t,e.targetDarkLuma,0,e.maxDarkLuma,e.targetVibrantSaturation,e.minVibrantSaturation,1,e),i.Muted=$(i,n,t,e.targetNormalLuma,e.minNormalLuma,e.maxNormalLuma,e.targetMutesSaturation,0,e.maxMutesSaturation,e),i.LightMuted=$(i,n,t,e.targetLightLuma,e.minLightLuma,1,e.targetMutesSaturation,0,e.maxMutesSaturation,e),i.DarkMuted=$(i,n,t,e.targetDarkLuma,0,e.maxDarkLuma,e.targetMutesSaturation,0,e.maxMutesSaturation,e),i}function Yt(n,t,e){if(!n.Vibrant&&!n.DarkVibrant&&!n.LightVibrant){if(!n.DarkVibrant&&n.DarkMuted){let[i,r,o]=n.DarkMuted.hsl;o=e.targetDarkLuma,n.DarkVibrant=new V(I(i,r,o),0)}if(!n.LightVibrant&&n.LightMuted){let[i,r,o]=n.LightMuted.hsl;o=e.targetDarkLuma,n.DarkVibrant=new V(I(i,r,o),0)}}if(!n.Vibrant&&n.DarkVibrant){let[i,r,o]=n.DarkVibrant.hsl;o=e.targetNormalLuma,n.Vibrant=new V(I(i,r,o),0)}else if(!n.Vibrant&&n.LightVibrant){let[i,r,o]=n.LightVibrant.hsl;o=e.targetNormalLuma,n.Vibrant=new V(I(i,r,o),0)}if(!n.DarkVibrant&&n.Vibrant){let[i,r,o]=n.Vibrant.hsl;o=e.targetDarkLuma,n.DarkVibrant=new V(I(i,r,o),0)}if(!n.LightVibrant&&n.Vibrant){let[i,r,o]=n.Vibrant.hsl;o=e.targetLightLuma,n.LightVibrant=new V(I(i,r,o),0)}if(!n.Muted&&n.Vibrant){let[i,r,o]=n.Vibrant.hsl;o=e.targetMutesSaturation,n.Muted=new V(I(i,r,o),0)}if(!n.DarkMuted&&n.DarkVibrant){let[i,r,o]=n.DarkVibrant.hsl;o=e.targetMutesSaturation,n.DarkMuted=new V(I(i,r,o),0)}if(!n.LightMuted&&n.LightVibrant){let[i,r,o]=n.LightVibrant.hsl;o=e.targetMutesSaturation,n.LightMuted=new V(I(i,r,o),0)}}const Zt=(n,t)=>{t=Object.assign({},Ht,t);const e=Wt(n),i=Qt(n,e,t);return Yt(i,e,t),i},Xt=new Ut().filter.register("default",(n,t,e,i)=>i>=125&&!(n>250&&t>250&&e>250)).quantizer.register("mmcq",Bt).generator.register("default",Zt);P.use(Xt);const Kt=["disabled"],j=Y({__name:"Live2DModelControlButton",emits:["click"],setup(n){const t=Z();return(e,i)=>(z(),O("button",{disabled:p(t).loadingLive2dModel,bg:"zinc-100 dark:zinc-800",hover:"bg-zinc-200 dark:bg-zinc-700",transition:"all ease-in-out duration-250",rounded:"",onClick:i[0]||(i[0]=r=>e.$emit("click"))},[ft(e.$slots,"default")],8,Kt))}}),te={flex:"~ col gap-4"},ee={flex:"","items-center":"","gap-2":""},ie=["disabled","placeholder"],ne={"font-medium":""},re={flex:"","gap-2":""},oe=["onUpdate:modelValue"],se=["href","download"],ae=Y({__name:"Live2DSettings",props:{palette:null},emits:["extractColorsFromModel"],setup(n){const{t}=ut(),e=_t({accept:"application/zip"}),i=Z(),{live2dModelFile:r,live2dMotionMap:o,live2dLoadSource:s,loadingLive2dModel:a,availableLive2dMotions:c,live2dModelUrl:h}=bt(i),m=R(h.value);e.onChange(l=>{l&&l.length>0&&(o.value={},r.value=l[0],s.value="file",a.value=!0)}),vt(()=>i.loadingLive2dModel,l=>{l||s.value==="file"&&c.value.forEach(u=>{u.motionName in rt?o.value[u.fileName]=u.motionName:o.value[u.fileName]=yt})});async function f(l,u){if(!Object.keys(u).length)return l;const g=await new Dt().loadAsync(l),w=Object.keys(g.files).find(x=>x.endsWith("model3.json"));if(!w)throw new Error("model3.json not found");const N=await g.file(w).async("string"),M=JSON.parse(N),L={};Object.entries(u).forEach(([x,C])=>{if(L[C]){L[C].push({File:x});return}L[C]=[{File:x}]}),M.FileReferences.Motions=L,g.file(w,JSON.stringify(M,null,2));const v=await g.generateAsync({type:"blob"});return new File([v],l.name,{type:l.type,lastModified:l.lastModified})}async function _(){const l=await Vt.getItem("live2dModel");if(!l)return;const u=await f(l,o.value);r.value=u,s.value="file",a.value=!0}const b=pt(r);return(l,u)=>(z(),O("div",te,[S(p(ot),{title:"settings.live2d.change-model.title",icon:"i-solar:magic-stick-3-bold-duotone","inner-class":"text-sm"},{default:E(()=>[y("div",ee,[W(y("input",{"onUpdate:modelValue":u[0]||(u[0]=d=>m.value=d),disabled:p(i).loadingLive2dModel,class:"form-control flex-1",border:"zinc-300 dark:zinc-800 solid 1 focus:zinc-400 dark:focus:zinc-600",transition:"border duration-250 ease-in-out",placeholder:p(t)("settings.live2d.change-model.from-url-placeholder")},null,8,ie),[[wt,m.value]]),S(j,{class:"form-control",onClick:u[1]||(u[1]=d=>h.value=m.value)},{default:E(()=>[F(U(p(t)("settings.live2d.change-model.from-url")),1)]),_:1})]),S(j,{class:"form-control place-self-end",onClick:u[2]||(u[2]=d=>p(e).open())},{default:E(()=>[F(U(p(t)("settings.live2d.change-model.from-file"))+"... ",1)]),_:1}),S(j,{class:"form-control",onClick:u[3]||(u[3]=d=>l.$emit("extractColorsFromModel"))},{default:E(()=>u[4]||(u[4]=[F(" Extract colors from model ")])),_:1}),S(St,{colors:n.palette.map(d=>({hex:d,name:d}))},null,8,["colors"])]),_:1}),p(i).live2dLoadSource==="file"?(z(),ct(p(ot),{key:0,title:"settings.live2d.edit-motion-map.title",icon:"i-solar:face-scan-circle-bold-duotone"},{default:E(()=>{var d;return[(z(!0),O(J,null,nt(p(i).availableLive2dMotions,g=>(z(),O("div",{key:g.fileName,flex:"","items-center":"","justify-between":"","text-sm":""},[y("span",ne,U(g.fileName),1),y("div",re,[W(y("select",{"onUpdate:modelValue":w=>p(i).live2dMotionMap[g.fileName]=w},[(z(!0),O(J,null,nt(Object.keys(p(rt)),w=>(z(),O("option",{key:w},U(w),1))),128))],8,oe),[[xt,p(i).live2dMotionMap[g.fileName]]]),S(j,{class:"form-control",onClick:w=>p(i).live2dCurrentMotion={group:g.motionName,index:g.motionIndex}},{default:E(()=>u[5]||(u[5]=[F(" Play ")])),_:2},1032,["onClick"])])]))),128)),S(j,{onClick:_},{default:E(()=>u[6]||(u[6]=[F(" Save and patch ")])),_:1}),y("a",{"mt-2":"",block:"",href:p(b),download:`${((d=p(i).live2dModelFile)==null?void 0:d.name)||"live2d"}-motion-edited.zip`},[S(j,{"w-full":""},{default:E(()=>u[7]||(u[7]=[F("Export")])),_:1})],8,se)]}),_:1})):H("",!0)]))}}),le=Ct(ae,[["__scopeId","data-v-de39498b"]]),ue={flex:"~ row","items-center":"","gap-2":"",initial:{opacity:0,x:10},enter:{opacity:1,x:0},leave:{opacity:0,x:-10},duration:250},ce={relative:"","text-nowrap":""},he={absolute:"","left-0":"","top-0":"","translate-y":"[-80%]",text:"neutral-300 dark:neutral-500"},me={"text-3xl":"","font-semibold":""},de={flex:""},ge={key:1,text:"neutral-200/50 dark:neutral-500/20","pointer-events-none":"",fixed:"","bottom-0":"","right-0":"","z--1":"","translate-x-10":"","translate-y-10":""},fe=Y({__name:"index",setup(n){const{t}=ut(),e=Mt(),i=R(),r=R(),{width:o,height:s}=kt(i),a=Z(),c=R([]);async function h(){if(!r.value)return;const b=await r.value.captureFrame();if(!b){console.error("No frame captured");return}const l=URL.createObjectURL(b);try{const d=await new P(l).getPalette();c.value=Object.values(d).map(g=>g==null?void 0:g.hex).filter(g=>typeof g=="string")}finally{URL.revokeObjectURL(l)}}const{iconAnimationStarted:m,showIconAnimation:f,animationIcon:_}=zt("i-lucide:person-standing");return(b,l)=>{const u=mt,d=Lt("motion");return z(),O(J,null,[W((z(),O("div",ue,[y("button",{"i-solar:alt-arrow-left-line-duotone":"","text-2xl":"",onClick:l[0]||(l[0]=g=>p(e).back())}),y("h1",ce,[y("div",he,U(p(t)("settings.title")),1),y("div",me,U(p(t)("settings.pages.models.title")),1)])])),[[d]]),y("div",de,[y("div",{ref_key:"live2dContainerRef",ref:i,w:"50%",h:"80vh"},[S(gt,{ref_key:"live2dCanvasRef",ref:r,width:p(o),height:p(s)},{default:E(({app:g})=>[S(dt,{app:g,"mouth-open-size":0,width:p(o),height:p(s),paused:!1},null,8,["app","width","height"])]),_:1},8,["width","height"])],512),S(le,{w:"50%",h:"80vh",palette:c.value,onExtractColorsFromModel:h},null,8,["palette"])]),p(f)?(z(),ct(u,{key:0,"z-index":-1,icon:p(_),"icon-size":12,duration:1e3,started:p(m),"is-reverse":!0,position:"calc(100dvw - 9.5rem), calc(100dvh - 9.5rem)","text-color":"text-neutral-200/50 dark:text-neutral-600/20"},null,8,["icon","started"])):H("",!0),p(a).usePageSpecificTransitions?H("",!0):(z(),O("div",ge,l[1]||(l[1]=[y("div",{text:"40","i-lucide:person-standing":""},null,-1)])))],64)}}});typeof st=="function"&&st(fe);export{fe as default};
|
assets/index-BcT0g1Oh.js
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
import{_ as z}from"./IconAnimation.vue_vue_type_script_setup_true_lang-B0Tznm9Y.js";import{d as A,bK as M,bL as O,c as d,o as l,A as c,a as e,b as r,B as w,bI as v,C as h,D as a,bB as P,y as g,z as x,bG as N,v as j,bC as R,q as L,g as q,w as G,bw as K,x as J,e as t,ad as Q,bH as W,bE as X,bx as k,by as Y,bn as Z}from"./index-hDb1Lsb8.js";import"./live2d-zip-loader--bTGFeQd.js";import{_ as f,a as ee}from"./ColorPalette.vue_vue_type_script_setup_true_lang-XM3XfZvN.js";import{u as te}from"./useIconAnimation-DVKfiTTG.js";import{b as D}from"./route-block-B_A1xBdJ.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-bS5XNUtd.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-BTGItw4h.js";import"./index-CborASRd.js";const ne={class:"w-full flex cursor-pointer items-center justify-between rounded-lg px-4 py-3 text-sm outline-none transition-all duration-250 ease-in-out",bg:"neutral-50 dark:neutral-800",hover:"bg-neutral-200 dark:bg-neutral-700"},se=["aria-checked"],oe={key:0,text:"sm neutral-500"},y=A({__name:"CheckBar",props:M({text:null,iconOn:null,iconOff:null,description:null},{modelValue:{type:Boolean},modelModifiers:{}}),emits:["update:modelValue"],setup(u){const p=O(u,"modelValue");return(s,m)=>(l(),d("label",ne,[c(e("input",{"onUpdate:modelValue":m[0]||(m[0]=b=>p.value=b),"aria-checked":p.value,type:"checkbox",hidden:""},null,8,se),[[w,p.value]]),e("div",null,[v(a(s.$t(u.text))+" ",1),u.description?(l(),d("div",oe,a(s.$t(u.description)),1)):h("",!0)]),r(P,{name:"slide-away",mode:"out-in"},{default:g(()=>[p.value?(l(),d("div",{key:0,class:x(u.iconOn),transition:"all ease-in-out duration-250"},null,2)):(l(),d("div",{key:1,class:x(u.iconOff),transition:"all ease-in-out duration-250"},null,2))]),_:1})]))}}),ie=[[],["#A5978B","#D8CAAF","#B8B4A7","#C4BCB1","#E5DED8","#9A8F7D","#BEB5A7","#C9C0B6"],["#7A9EAF","#B8C7CC","#D4B79C","#8B9D77","#C7D5CB","#E6D0B1","#94A7B1","#B4C8C3"],["#D9B48F","#B5917A","#8C7A6B","#A17F5F","#B98C46","#C7A252","#DAB300","#D19826"],["#9BA7B0","#C1CBD4","#A5ADB6","#8B959E","#D4DCE4","#7F8A94","#B3BCC6","#98A4AE"],["#E4C6D0","#A61B29","#5D513C","#789262","#1C0D1A","#F7C242","#62A9DD","#8C4B3C"]],ae={flex:"~ row","items-center":"","gap-2":"",initial:{opacity:0,x:10},enter:{opacity:1,x:0},leave:{opacity:0,x:-10},duration:250},le={relative:""},re={absolute:"","left-0":"","top-0":"","translate-y":"[-80%]"},de={text:"neutral-300 dark:neutral-500","text-nowrap":""},ue={"text-nowrap":"","text-3xl":"","font-semibold":""},pe={class:"w-full flex items-center justify-between rounded-lg px-4 py-3 text-sm outline-none transition-all duration-250 ease-in-out",bg:"neutral-50 dark:neutral-800",hover:"bg-neutral-200 dark:bg-neutral-700"},me={value:"en-US"},ce={value:"zh-CN"},ge={flex:"","items-center":"","justify-between":""},be={"text-lg":"","font-semibold":""},fe={relative:"",flex:"","cursor-pointer":"","items-center":"","gap-2":""},ye=["disabled"],ve={"font-medium":""},he={text:"sm neutral-500"},xe={key:1,text:"neutral-200/50 dark:neutral-500/20","pointer-events-none":"",fixed:"","bottom-0":"","right-0":"","z--1":"","translate-x-10":"","translate-y-10":""},_=A({__name:"index",setup(u){const p=N(),s=j(),m=R(),{t:b}=L(),C=q(!1),{iconAnimationStarted:$,showIconAnimation:V,animationIcon:E}=te("i-lucide:paintbrush");return G(()=>[s.usePageSpecificTransitions,s.disableTransitions],()=>{C.value=!0}),(i,n)=>{const S=z,T=K("motion");return l(),d(k,null,[c((l(),d("div",ae,[e("button",{onClick:n[0]||(n[0]=o=>t(p).back())},n[7]||(n[7]=[e("div",{"i-solar:alt-arrow-left-line-duotone":"","text-2xl":""},null,-1)])),e("h1",le,[e("div",re,[e("span",de,a(i.$t("settings.title")),1)]),e("div",ue,a(i.$t("settings.pages.themes.title")),1)])])),[[T]]),r(t(f),{title:t(b)("settings.sections.section.general.title"),icon:"i-solar:filters-bold-duotone"},{default:g(()=>[r(y,{modelValue:t(m),"onUpdate:modelValue":n[1]||(n[1]=o=>Q(m)?m.value=o:null),"icon-on":"i-solar:moon-stars-bold-duotone","icon-off":"i-solar:sun-fog-bold-duotone",text:"settings.theme"},null,8,["modelValue"]),e("div",pe,[v(a(i.$t("settings.language.title"))+" ",1),c(e("select",{"onUpdate:modelValue":n[2]||(n[2]=o=>t(s).language=o),transition:"all ease-in-out duration-250","cursor-pointer":"","bg-transparent":"","text-right":"","outline-none":""},[e("option",me,a(i.$t("settings.language.english")),1),e("option",ce,a(i.$t("settings.language.chinese")),1)],512),[[W,t(s).language]])])]),_:1},8,["title"]),r(t(f),{title:t(b)("settings.pages.themes.sections.section.custom-color.title"),icon:"i-solar:pallete-2-bold-duotone"},{default:g(()=>[e("div",ge,[e("span",be,a(i.$t("settings.pages.themes.sections.section.custom-color.fields.field.primary-color.label")),1),e("label",fe,[c(e("input",{"onUpdate:modelValue":n[3]||(n[3]=o=>t(s).themeColorsHueDynamic=o),type:"checkbox",class:"peer sr-only"},null,512),[[w,t(s).themeColorsHueDynamic]]),n[8]||(n[8]=e("div",{class:"peer-checked:bg-primary-500 h-6 w-11 rounded-full bg-neutral-200 after:absolute after:left-[2px] after:top-[2px] after:h-5 after:w-5 after:rounded-full after:bg-white dark:bg-neutral-600 after:transition-all after:content-[''] peer-checked:after:translate-x-full peer-checked:after:border-white"},null,-1)),v(" "+a(i.$t("settings.pages.themes.sections.section.custom-color.fields.field.primary-color.rgb-on.title")),1)])]),c(e("input",{"onUpdate:modelValue":n[4]||(n[4]=o=>t(s).themeColorsHue=o),type:"range",min:"0",max:"360",step:"0.01",class:x(["theme-hue-slider",t(s).themeColorsHueDynamic?"opacity-25 cursor-not-allowed":"cursor-pointer"]),disabled:t(s).themeColorsHueDynamic},null,10,ye),[[X,t(s).themeColorsHue]]),n[9]||(n[9]=e("div",{class:"color-bar"},[e("span",{"bg-primary-50":""},"50"),e("span",{"bg-primary-100":""},"100"),e("span",{"bg-primary-200":""},"200"),e("span",{"bg-primary-300":""},"300"),e("span",{"bg-primary-400":""},"400"),e("span",{"bg-primary-500":""},"500"),e("div",{"text-white":""},[e("span",{"bg-primary-600":""},"600"),e("span",{"bg-primary-700":""},"700"),e("span",{"bg-primary-800":""},"800"),e("span",{"bg-primary-900":""},"900"),e("span",{"bg-primary-950":""},"950")])],-1)),n[10]||(n[10]=e("div",{class:"color-bar transparency-grid"},[e("span",{bg:"primary-500/5"},"500/5"),e("span",{bg:"primary-500/10"},"500/10"),e("span",{bg:"primary-500/20"},"500/20"),e("span",{bg:"primary-500/30"},"500/30"),e("span",{bg:"primary-500/40"},"500/40"),e("span",{bg:"primary-500/50"},"500/50"),e("span",{bg:"primary-500/60"},"500/60"),e("span",{bg:"primary-500/70"},"500/70"),e("span",{bg:"primary-500/80"},"500/80"),e("span",{bg:"primary-500/90"},"500/90"),e("span",{bg:"primary-500"},"500")],-1))]),_:1},8,["title"]),r(t(f),{title:"settings.pages.themes.sections.section.theme-presets.title",icon:"i-solar:magic-stick-2-bold-duotone"},{default:g(()=>[(l(!0),d(k,null,Y(i.$tm("settings.pages.themes.sections.section.theme-presets.presets"),({title:o,description:F,colors:U},B)=>(l(),d("div",{key:B,class:"w-full flex items-center justify-between rounded-lg px-4 py-3 outline-none transition-all duration-250 ease-in-out",bg:"neutral-100 dark:neutral-800",hover:"bg-neutral-200 dark:bg-neutral-700"},[e("div",null,[e("span",ve,a(i.$rt(o)),1),e("div",he,a(i.$rt(F)),1)]),r(ee,{colors:U.map((H,I)=>({hex:t(ie)[B][I],name:i.$rt(H)}))},null,8,["colors"])]))),128))]),_:1}),r(t(f),{title:"settings.pages.themes.sections.section.developer.title",icon:"i-solar:code-bold-duotone"},{default:g(()=>[r(y,{modelValue:t(s).disableTransitions,"onUpdate:modelValue":n[5]||(n[5]=o=>t(s).disableTransitions=o),"icon-on":"i-solar:people-nearby-bold-duotone","icon-off":"i-solar:running-2-line-duotone",text:"settings.animations.stage-transitions.title"},null,8,["modelValue"]),r(y,{modelValue:t(s).usePageSpecificTransitions,"onUpdate:modelValue":n[6]||(n[6]=o=>t(s).usePageSpecificTransitions=o),disabled:t(s).disableTransitions,"icon-on":"i-solar:running-2-line-duotone","icon-off":"i-solar:people-nearby-bold-duotone",text:"settings.animations.use-page-specific-transitions.title",description:"settings.animations.use-page-specific-transitions.description"},null,8,["modelValue","disabled"])]),_:1}),t(V)&&!C.value?(l(),J(S,{key:0,"z-index":-1,duration:1e3,started:t($),"is-reverse":!0,icon:t(E),"icon-size":12,position:"calc(100dvw - 9.5rem), calc(100dvh - 9.5rem)","text-color":"text-neutral-200/50 dark:text-neutral-600/20"},null,8,["started","icon"])):h("",!0),t(s).usePageSpecificTransitions?h("",!0):(l(),d("div",xe,n[11]||(n[11]=[e("div",{text:"40","i-lucide:paintbrush":""},null,-1)])))],64)}}});typeof D=="function"&&D(_);const Ee=Z(_,[["__scopeId","data-v-a043a63d"]]);export{Ee as default};
|
assets/{index-BhqVpxhd.js → index-C4ujKJN4.js}
RENAMED
@@ -1 +1 @@
|
|
1 |
-
import{d as r,bG as l,q as c,bw as d,A as p,o as u,c as _,a as t,e as o,D as n}from"./index-
|
|
|
1 |
+
import{d as r,bG as l,q as c,bw as d,A as p,o as u,c as _,a as t,e as o,D as n}from"./index-hDb1Lsb8.js";const x={flex:"~ row","items-center":"","gap-2":"",initial:{opacity:0,x:10},enter:{opacity:1,x:0},leave:{opacity:0,x:-10},duration:250},m={relative:""},v={absolute:"","left-0":"","top-0":"","translate-y":"[-80%]"},f={text:"neutral-300 dark:neutral-500","text-nowrap":""},b={"text-nowrap":"","text-3xl":"","font-semibold":""},h=r({__name:"index",setup(w){const i=l(),{t:s}=c();return(y,e)=>{const a=d("motion");return p((u(),_("div",x,[t("button",{onClick:e[0]||(e[0]=g=>o(i).back())},e[1]||(e[1]=[t("div",{"i-solar:alt-arrow-left-line-duotone":"","text-2xl":""},null,-1)])),t("h1",m,[t("div",v,[t("span",f,n(o(s)("settings.title")),1)]),t("div",b,n(o(s)("settings.pages.memory.title")),1)])])),[[a]])}}});export{h as default};
|
assets/{index-ZfK3fTHt.js → index-CborASRd.js}
RENAMED
The diff for this file is too large to render.
See raw diff
|
|
assets/index-Cow_Er_T.js
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
import{_ as z}from"./IconAnimation.vue_vue_type_script_setup_true_lang-Djn5fd3P.js";import{d as D,bK as I,bL as M,c as d,o as l,A as c,a as e,b as r,B as A,bI as v,C as h,D as a,bB as O,y as g,z as x,bG as P,v as N,bC as j,g as R,w as L,bw as G,x as K,e as n,ad as q,bH as J,bE as Q,bx as B,by as W,bn as X}from"./index-7-fr_lhT.js";import"./live2d-zip-loader-dDw0Wbbr.js";import{_ as f,a as Y}from"./ColorPalette.vue_vue_type_script_setup_true_lang-DpflICIJ.js";import{u as Z}from"./useIconAnimation-BqW7zFiT.js";import{b as k}from"./route-block-B_A1xBdJ.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-D5rspuJc.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-BNzPx9yx.js";import"./index-ZfK3fTHt.js";const ee={class:"w-full flex cursor-pointer items-center justify-between rounded-lg px-4 py-3 text-sm outline-none transition-all duration-250 ease-in-out",bg:"neutral-50 dark:neutral-800",hover:"bg-neutral-200 dark:bg-neutral-700"},te=["aria-checked"],ne={key:0,text:"sm neutral-500"},y=D({__name:"CheckBar",props:I({text:null,iconOn:null,iconOff:null,description:null},{modelValue:{type:Boolean},modelModifiers:{}}),emits:["update:modelValue"],setup(u){const p=M(u,"modelValue");return(s,m)=>(l(),d("label",ee,[c(e("input",{"onUpdate:modelValue":m[0]||(m[0]=b=>p.value=b),"aria-checked":p.value,type:"checkbox",hidden:""},null,8,te),[[A,p.value]]),e("div",null,[v(a(s.$t(u.text))+" ",1),u.description?(l(),d("div",ne,a(s.$t(u.description)),1)):h("",!0)]),r(O,{name:"slide-away",mode:"out-in"},{default:g(()=>[p.value?(l(),d("div",{key:0,class:x(u.iconOn),transition:"all ease-in-out duration-250"},null,2)):(l(),d("div",{key:1,class:x(u.iconOff),transition:"all ease-in-out duration-250"},null,2))]),_:1})]))}}),se=[[],["#A5978B","#D8CAAF","#B8B4A7","#C4BCB1","#E5DED8","#9A8F7D","#BEB5A7","#C9C0B6"],["#7A9EAF","#B8C7CC","#D4B79C","#8B9D77","#C7D5CB","#E6D0B1","#94A7B1","#B4C8C3"],["#D9B48F","#B5917A","#8C7A6B","#A17F5F","#B98C46","#C7A252","#DAB300","#D19826"],["#9BA7B0","#C1CBD4","#A5ADB6","#8B959E","#D4DCE4","#7F8A94","#B3BCC6","#98A4AE"],["#E4C6D0","#A61B29","#5D513C","#789262","#1C0D1A","#F7C242","#62A9DD","#8C4B3C"]],oe={flex:"~ row","items-center":"","gap-2":"",initial:{opacity:0,x:10},enter:{opacity:1,x:0},leave:{opacity:0,x:-10},duration:250},ie={relative:""},ae={absolute:"","left-0":"","top-0":"","translate-y":"[-80%]"},le={text:"neutral-300 dark:neutral-500","text-nowrap":""},re={"text-nowrap":"","text-3xl":"","font-semibold":""},de={class:"w-full flex items-center justify-between rounded-lg px-4 py-3 text-sm outline-none transition-all duration-250 ease-in-out",bg:"neutral-50 dark:neutral-800",hover:"bg-neutral-200 dark:bg-neutral-700"},ue={value:"en-US"},pe={value:"zh-CN"},me={flex:"","items-center":"","justify-between":""},ce={"text-lg":"","font-semibold":""},ge={relative:"",flex:"","cursor-pointer":"","items-center":"","gap-2":""},be=["disabled"],fe={"font-medium":""},ye={text:"sm neutral-500"},ve={key:1,text:"neutral-200/50 dark:neutral-500/20","pointer-events-none":"",fixed:"","bottom-0":"","right-0":"","z--1":"","translate-x-10":"","translate-y-10":""},w=D({__name:"index",setup(u){const p=P(),s=N(),m=j(),b=R(!1),{iconAnimationStarted:_,showIconAnimation:$,animationIcon:V}=Z("i-lucide:paintbrush");return L(()=>[s.usePageSpecificTransitions,s.disableTransitions],()=>{b.value=!0}),(i,t)=>{const E=z,S=G("motion");return l(),d(B,null,[c((l(),d("div",oe,[e("button",{onClick:t[0]||(t[0]=o=>n(p).back())},t[7]||(t[7]=[e("div",{"i-solar:alt-arrow-left-line-duotone":"","text-2xl":""},null,-1)])),e("h1",ie,[e("div",ae,[e("span",le,a(i.$t("settings.title")),1)]),e("div",re,a(i.$t("settings.pages.themes.title")),1)])])),[[S]]),r(n(f),{title:"settings.sections.section.general.title",icon:"i-solar:filters-bold-duotone"},{default:g(()=>[r(y,{modelValue:n(m),"onUpdate:modelValue":t[1]||(t[1]=o=>q(m)?m.value=o:null),"icon-on":"i-solar:moon-stars-bold-duotone","icon-off":"i-solar:sun-fog-bold-duotone",text:"settings.theme"},null,8,["modelValue"]),e("div",de,[v(a(i.$t("settings.language.title"))+" ",1),c(e("select",{"onUpdate:modelValue":t[2]||(t[2]=o=>n(s).language=o),transition:"all ease-in-out duration-250","cursor-pointer":"","bg-transparent":"","text-right":"","outline-none":""},[e("option",ue,a(i.$t("settings.language.english")),1),e("option",pe,a(i.$t("settings.language.chinese")),1)],512),[[J,n(s).language]])])]),_:1}),r(n(f),{title:"settings.pages.themes.sections.section.custom-color.title",icon:"i-solar:pallete-2-bold-duotone"},{default:g(()=>[e("div",me,[e("span",ce,a(i.$t("settings.pages.themes.sections.section.custom-color.fields.field.primary-color.label")),1),e("label",ge,[c(e("input",{"onUpdate:modelValue":t[3]||(t[3]=o=>n(s).themeColorsHueDynamic=o),type:"checkbox",class:"peer sr-only"},null,512),[[A,n(s).themeColorsHueDynamic]]),t[8]||(t[8]=e("div",{class:"peer-checked:bg-primary-500 h-6 w-11 rounded-full bg-neutral-200 after:absolute after:left-[2px] after:top-[2px] after:h-5 after:w-5 after:rounded-full after:bg-white dark:bg-neutral-600 after:transition-all after:content-[''] peer-checked:after:translate-x-full peer-checked:after:border-white"},null,-1)),v(" "+a(i.$t("settings.pages.themes.sections.section.custom-color.fields.field.primary-color.rgb-on.title")),1)])]),c(e("input",{"onUpdate:modelValue":t[4]||(t[4]=o=>n(s).themeColorsHue=o),type:"range",min:"0",max:"360",step:"0.01",class:x(["theme-hue-slider",n(s).themeColorsHueDynamic?"opacity-25 cursor-not-allowed":"cursor-pointer"]),disabled:n(s).themeColorsHueDynamic},null,10,be),[[Q,n(s).themeColorsHue]]),t[9]||(t[9]=e("div",{class:"color-bar"},[e("span",{"bg-primary-50":""},"50"),e("span",{"bg-primary-100":""},"100"),e("span",{"bg-primary-200":""},"200"),e("span",{"bg-primary-300":""},"300"),e("span",{"bg-primary-400":""},"400"),e("span",{"bg-primary-500":""},"500"),e("div",{"text-white":""},[e("span",{"bg-primary-600":""},"600"),e("span",{"bg-primary-700":""},"700"),e("span",{"bg-primary-800":""},"800"),e("span",{"bg-primary-900":""},"900"),e("span",{"bg-primary-950":""},"950")])],-1)),t[10]||(t[10]=e("div",{class:"color-bar transparency-grid"},[e("span",{bg:"primary-500/5"},"500/5"),e("span",{bg:"primary-500/10"},"500/10"),e("span",{bg:"primary-500/20"},"500/20"),e("span",{bg:"primary-500/30"},"500/30"),e("span",{bg:"primary-500/40"},"500/40"),e("span",{bg:"primary-500/50"},"500/50"),e("span",{bg:"primary-500/60"},"500/60"),e("span",{bg:"primary-500/70"},"500/70"),e("span",{bg:"primary-500/80"},"500/80"),e("span",{bg:"primary-500/90"},"500/90"),e("span",{bg:"primary-500"},"500")],-1))]),_:1}),r(n(f),{title:"settings.pages.themes.sections.section.theme-presets.title",icon:"i-solar:magic-stick-2-bold-duotone"},{default:g(()=>[(l(!0),d(B,null,W(i.$tm("settings.pages.themes.sections.section.theme-presets.presets"),({title:o,description:T,colors:F},C)=>(l(),d("div",{key:C,class:"w-full flex items-center justify-between rounded-lg px-4 py-3 outline-none transition-all duration-250 ease-in-out",bg:"neutral-100 dark:neutral-800",hover:"bg-neutral-200 dark:bg-neutral-700"},[e("div",null,[e("span",fe,a(i.$rt(o)),1),e("div",ye,a(i.$rt(T)),1)]),r(Y,{colors:F.map((U,H)=>({hex:n(se)[C][H],name:i.$rt(U)}))},null,8,["colors"])]))),128))]),_:1}),r(n(f),{title:"settings.pages.themes.sections.section.developer.title",icon:"i-solar:code-bold-duotone"},{default:g(()=>[r(y,{modelValue:n(s).disableTransitions,"onUpdate:modelValue":t[5]||(t[5]=o=>n(s).disableTransitions=o),"icon-on":"i-solar:people-nearby-bold-duotone","icon-off":"i-solar:running-2-line-duotone",text:"settings.animations.stage-transitions.title"},null,8,["modelValue"]),r(y,{modelValue:n(s).usePageSpecificTransitions,"onUpdate:modelValue":t[6]||(t[6]=o=>n(s).usePageSpecificTransitions=o),disabled:n(s).disableTransitions,"icon-on":"i-solar:running-2-line-duotone","icon-off":"i-solar:people-nearby-bold-duotone",text:"settings.animations.use-page-specific-transitions.title",description:"settings.animations.use-page-specific-transitions.description"},null,8,["modelValue","disabled"])]),_:1}),n($)&&!b.value?(l(),K(E,{key:0,"z-index":-1,duration:1e3,started:n(_),"is-reverse":!0,icon:n(V),"icon-size":12,position:"calc(100dvw - 9.5rem), calc(100dvh - 9.5rem)","text-color":"text-neutral-200/50 dark:text-neutral-600/20"},null,8,["started","icon"])):h("",!0),n(s).usePageSpecificTransitions?h("",!0):(l(),d("div",ve,t[11]||(t[11]=[e("div",{text:"40","i-lucide:paintbrush":""},null,-1)])))],64)}}});typeof k=="function"&&k(w);const $e=X(w,[["__scopeId","data-v-de07a969"]]);export{$e as default};
|
|
|
|