Commit
·
e6e264b
1
Parent(s):
001fa76
release: build ec2173f2c1d1a6bb4aabf898043a069f537a9983
Browse files- assets/{BasicTextarea.vue_vue_type_script_setup_true_lang-DaVHyEOq.js → BasicTextarea.vue_vue_type_script_setup_true_lang-C_yJpecZ.js} +1 -1
- assets/{audio-CyXRLXdu.js → audio-BM_xF-BU.js} +1 -1
- assets/{default-CotL5D9v.js → default-D5YgEZHa.js} +1 -1
- assets/{delays-Cf1eQXqq.js → delays-Dv8VJTYA.js} +1 -1
- assets/{emotions-Bv3rbmSy.js → emotions-BiqZqRle.js} +1 -1
- assets/{filter-message-D8tOgQeg.js → filter-message-CxOC8Vrs.js} +1 -1
- assets/{image-dWepRZkT.js → image-DV5sCg2o.js} +1 -1
- assets/{index-CfYL5c3l.js → index-DHhuFszl.js} +1 -1
- assets/{index-DlfuL6Nw.js → index-DNIDWMUI.js} +3 -3
- assets/{index-AQE6v_Y0.js → index-DPFUGDlv.js} +1 -1
- assets/{messages-CdSW1lV2.js → messages-U_oq3WTP.js} +1 -1
- assets/{queue-CWMe9eQi.js → queue-3rAceHBg.js} +1 -1
- assets/{queue-CIviZB8Z.js → queue-DngUnVTT.js} +1 -1
- assets/{queues-BVY6iCJj.js → queues-B9ctXdzf.js} +1 -1
- index.html +1 -1
assets/{BasicTextarea.vue_vue_type_script_setup_true_lang-DaVHyEOq.js → BasicTextarea.vue_vue_type_script_setup_true_lang-C_yJpecZ.js}
RENAMED
@@ -1,2 +1,2 @@
|
|
1 |
-
import{d as g,aV as m,aW as h,e as s,g as p,q as x,z as y,o as E,c as M,n as T,J as _}from"./index-
|
2 |
${a.value.substring(v)}`,l.value.height="0",_().then(()=>{t.value&&(t.value.selectionStart=t.value.selectionEnd=r+1,l.value.height=`${t.value.scrollHeight}px`)})}else e.code==="Enter"&&(e.preventDefault(),c("submit",a.value))}return p(()=>{t.value&&(l.value.height=`${t.value.scrollHeight}px`)}),(e,n)=>x((E(),M("textarea",{ref_key:"textareaRef",ref:t,"onUpdate:modelValue":n[0]||(n[0]=o=>a.value=o),style:T(l.value),onInput:f,onKeydown:d},null,36)),[[y,a.value]])}});export{V as _};
|
|
|
1 |
+
import{d as g,aV as m,aW as h,e as s,g as p,q as x,z as y,o as E,c as M,n as T,J as _}from"./index-DNIDWMUI.js";const V=g({__name:"BasicTextarea",props:{modelValue:{default:""},modelModifiers:{}},emits:m(["submit"],["update:modelValue"]),setup(u,{emit:i}){const c=i,a=h(u,"modelValue"),t=s(),l=s({height:"auto",overflowY:"hidden"});function f(e){e.target instanceof HTMLTextAreaElement&&(e.target.style.height="auto",e.target.style.height=`${e.target.scrollHeight}px`)}function d(e){var n,o;if(e.target instanceof HTMLTextAreaElement)if(e.code==="Enter"&&e.shiftKey){e.preventDefault();const r=(n=e.target)==null?void 0:n.selectionStart,v=(o=e.target)==null?void 0:o.selectionEnd;a.value=`${a.value.substring(0,r)}
|
2 |
${a.value.substring(v)}`,l.value.height="0",_().then(()=>{t.value&&(t.value.selectionStart=t.value.selectionEnd=r+1,l.value.height=`${t.value.scrollHeight}px`)})}else e.code==="Enter"&&(e.preventDefault(),c("submit",a.value))}return p(()=>{t.value&&(l.value.height=`${t.value.scrollHeight}px`)}),(e,n)=>x((E(),M("textarea",{ref_key:"textareaRef",ref:t,"onUpdate:modelValue":n[0]||(n[0]=o=>a.value=o),style:T(l.value),onInput:f,onKeydown:d},null,36)),[[y,a.value]])}});export{V as _};
|
assets/{audio-CyXRLXdu.js → audio-BM_xF-BU.js}
RENAMED
@@ -1 +1 @@
|
|
1 |
-
import{d as s,e as f,o as d,c as p,m as t}from"./index-
|
|
|
1 |
+
import{d as s,e as f,o as d,c as p,m as t}from"./index-DNIDWMUI.js";const R=s({__name:"audio",setup(m){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)=>(d(),p("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/{default-CotL5D9v.js → default-D5YgEZHa.js}
RENAMED
@@ -1 +1 @@
|
|
1 |
-
import{u as p}from"./index-
|
|
|
1 |
+
import{u as p}from"./index-DPFUGDlv.js";import{d as s,c,a as d,n as i,u as e,r as m,o as u}from"./index-DNIDWMUI.js";const h=s({__name:"default",setup(f){const{top:t,right:o,bottom:a,left:n}=p();return(l,_)=>{const r=m("RouterView");return u(),c("main",{text:"gray-700 dark:gray-200","font-cuteen":"","h-full":"",style:i({paddingTop:`${e(t)}px`,paddingRight:`${e(o)}px`,paddingBottom:`${e(a)}px`,paddingLeft:`${e(n)}px`})},[d(r)],4)}}});export{h as default};
|
assets/{delays-Cf1eQXqq.js → delays-Dv8VJTYA.js}
RENAMED
@@ -1 +1 @@
|
|
1 |
-
import{_ as g}from"./BasicTextarea.vue_vue_type_script_setup_true_lang-
|
|
|
1 |
+
import{_ as g}from"./BasicTextarea.vue_vue_type_script_setup_true_lang-C_yJpecZ.js";import{i as _,l as k}from"./queues-B9ctXdzf.js";import{d as y,e as d,o as s,c as l,m as e,a as b,y as i,F as f,C as p}from"./index-DNIDWMUI.js";import"./queue-3rAceHBg.js";const x={flex:"","flex-col":"","gap-2":"","p-2":""},z={flex:"","flex-row":"","gap-2":""},w={"rounded-lg":"",bg:"zinc-100 dark:zinc-700","p-4":""},h={"w-full":"",flex:"","flex-row":"","gap-4":""},M={"w-full":"","rounded-lg":"",bg:"zinc-100 dark:zinc-700","p-2":""},V={"w-full":"","rounded-lg":"",bg:"zinc-100 dark:zinc-700","p-2":""},P=y({__name:"delays",setup(E){const t=d(""),m=d([]),c=d([]),r=d(!1),u=_();u.onHandlerEvent("delay",a=>{c.value.push(a)});function v(){r.value=!0;const a=t.value.split("");for(const n of a)u.add(n);u.add(k),t.value="",r.value=!1}return(a,n)=>(s(),l("div",x,[e("div",z,[b(g,{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:v},null,8,["modelValue"]),e("button",w,i(r.value?"Processing...":"Send"),1)]),e("div",h,[e("div",M,[n[1]||(n[1]=e("h3",{"font-semibold":""}," Emotion Message ",-1)),(s(!0),l(f,null,p(m.value,o=>(s(),l("div",{key:o},[e("div",null,i(o),1)]))),128))]),e("div",V,[n[2]||(n[2]=e("h3",{"font-semibold":""}," Delays ",-1)),(s(!0),l(f,null,p(c.value,o=>(s(),l("div",{key:o},[e("div",null,i(o)+"s",1)]))),128))])])]))}});export{P as default};
|
assets/{emotions-Bv3rbmSy.js → emotions-BiqZqRle.js}
RENAMED
@@ -1 +1 @@
|
|
1 |
-
import{_ as k}from"./BasicTextarea.vue_vue_type_script_setup_true_lang-
|
|
|
1 |
+
import{_ as k}from"./BasicTextarea.vue_vue_type_script_setup_true_lang-C_yJpecZ.js";import{u as f}from"./queue-3rAceHBg.js";import{h,l as b}from"./queues-B9ctXdzf.js";import{d as x,e as u,o as t,c as l,m as e,a as z,y as r,F as p,C as g}from"./index-DNIDWMUI.js";const w={flex:"","flex-col":"","gap-2":"","p-2":""},y={flex:"","flex-row":"","gap-2":""},M={"rounded-lg":"",bg:"zinc-100 dark:zinc-700","p-4":""},V={"w-full":"",flex:"","flex-row":"","gap-4":""},E={"w-full":"","rounded-lg":"",bg:"zinc-100 dark:zinc-700","p-2":""},Q={"w-full":"","rounded-lg":"",bg:"zinc-100 dark:zinc-700","p-2":""},I=x({__name:"emotions",setup(S){const a=u(""),i=u([]),c=u([]),d=u(!1);f({handlers:[async s=>{i.value.push(s.data)}]});const v=f({handlers:[async s=>{c.value.push(s.data)}]}),m=h(v);function _(){d.value=!0;const s=a.value.split("");for(const o of s)m.add(o);m.add(b),a.value="",d.value=!1}return(s,o)=>(t(),l("div",w,[e("div",y,[z(k,{modelValue:a.value,"onUpdate:modelValue":o[0]||(o[0]=n=>a.value=n),placeholder:"Message",p:"2",bg:"zinc-100 dark:zinc-700","w-full":"","rounded-lg":"","outline-none":"",onSubmit:_},null,8,["modelValue"]),e("button",M,r(d.value?"Processing...":"Send"),1)]),e("div",V,[e("div",E,[o[1]||(o[1]=e("h3",{"font-semibold":""}," Messages ",-1)),(t(!0),l(p,null,g(i.value,n=>(t(),l("div",{key:n},[e("div",null,r(n),1)]))),128))]),e("div",Q,[o[2]||(o[2]=e("h3",{"font-semibold":""}," Emotions ",-1)),(t(!0),l(p,null,g(c.value,n=>(t(),l("div",{key:n},[e("div",null,r(n),1)]))),128))])])]))}});export{I as default};
|
assets/{filter-message-D8tOgQeg.js → filter-message-CxOC8Vrs.js}
RENAMED
@@ -1 +1 @@
|
|
1 |
-
import{_ as m}from"./BasicTextarea.vue_vue_type_script_setup_true_lang-
|
|
|
1 |
+
import{_ as m}from"./BasicTextarea.vue_vue_type_script_setup_true_lang-C_yJpecZ.js";import{d as g,e as u,o as _,c as v,m as s,a as x,y as d}from"./index-DNIDWMUI.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":""},B=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;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{B as default};
|
assets/{image-dWepRZkT.js → image-DV5sCg2o.js}
RENAMED
@@ -1,2 +1,2 @@
|
|
1 |
-
import{k as _}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(m)())}," Copy Data URL ")])):w("",!0)]))}}),A=b(R,[["__scopeId","data-v-7edd53e6"]]);export{A as default};
|
|
|
1 |
+
import{k as _}from"./index-DPFUGDlv.js";import{d as y,e as c,o as d,c as u,m as a,y as x,u as v,B as w}from"./index-DNIDWMUI.js";import{_ as b}from"./_plugin-vue_export-helper-DlAUqK2U.js";const h={bg:"neutral-100",flex:"~ col","items-center":"","justify-center":"","rounded-lg":"","px-4":"","py-3":""},C={key:0},U=["src"],k={bg:"neutral-100",class:"text-wrap-any","max-h":"100","overflow-scroll":"","rounded-lg":"","text-wrap":"","text-black":"","font-mono":""},R=y({__name:"image",setup(D){const p=c(),o=c(""),{copy:m}=_({source:o});async function g(s){return new Promise((e,n)=>{const t=new FileReader;t.onload=r=>{var l,i;e(((i=(l=r.target)==null?void 0:l.result)==null?void 0:i.toString())||"")},t.onerror=r=>{n(r)},t.readAsDataURL(s)})}async function f(s){var t;const n=(t=s.target.files)==null?void 0:t[0];if(n){p.value=n;const r=await g(n);o.value=r}}return(s,e)=>(d(),u("div",null,[a("label",h,[a("input",{type:"file",accept:"image/*",hidden:"",onChange:f},null,32),e[1]||(e[1]=a("span",null,"Upload Image",-1))]),o.value?(d(),u("div",C,[a("img",{src:o.value,alt:"Uploaded Image","w-100":""},null,8,U),a("pre",k," "+x(o.value)+`
|
2 |
`,1),a("button",{bg:"primary-500",text:"white","mt-4":"","rounded-lg":"","px-4":"","py-2":"",onClick:e[0]||(e[0]=()=>v(m)())}," Copy Data URL ")])):w("",!0)]))}}),A=b(R,[["__scopeId","data-v-7edd53e6"]]);export{A as default};
|
assets/{index-CfYL5c3l.js → index-DHhuFszl.js}
RENAMED
@@ -1,4 +1,4 @@
|
|
1 |
-
import{b as defineStore,e as ref$1,f as computed,w as watch,g as onMounted,i as i18n,d as defineComponent,o as openBlock,h as createBlock,j as withCtx,T as Transition,k as renderSlot,l as useI18n,s as storeToRefs,c as createElementBlock,m as createBaseVNode,p as normalizeClass,u as unref,q as withDirectives,v as vModelRadio,t as vModelCheckbox,a as createVNode,x as isRef,y as toDisplayString,z as vModelText,A as vModelSelect,B as createCommentVNode,F as Fragment,C as renderList,D as getAugmentedNamespace,E as defu,G as toRef,H as onUnmounted,I as getDefaultExportFromCjs,J as nextTick,K as resolveDirective,L as commonjsGlobal,M as BufferGeometry,N as InterleavedBuffer,O as InterleavedBufferAttribute,P as MathUtils,Q as Color,V as Vector3,S as ShaderMaterial,U as UniformsUtils,R as BackSide,W as Triangle,X as Euler,Y as Ray,Z as Plane,_ as me,$ as shallowRef,a0 as toRefs,a1 as TOUCH,a2 as Zr,a3 as Matrix4,a4 as PlaneGeometry,a5 as useSlots,a6 as useAttrs,a7 as render,a8 as watchEffect,a9 as DoubleSide,aa as Box3,ab as UniformsLib,ac as Vector2,ad as ShaderLib,ae as Vector4,af as Line3,ag as Sphere,ah as Mesh,ai as MeshBasicMaterial,aj as FramebufferTexture,ak as RawShaderMaterial,al as AdditiveBlending,am as Box2,an as UnsignedByteType,ao as REVISION,ap as PropertyBinding,aq as InterpolateLinear,ar as EventDispatcher,as as MOUSE,at as Quaternion,au as PerspectiveCamera,av as OrthographicCamera,aw as Spherical,ax as WebGLRenderTarget,ay as HalfFloatType,az as NoToneMapping,aA as BoxGeometry,aB as getCurrentScope,aC as onScopeDispose,aD as CompressedTexture,aE as Texture$1,aF as RGBAFormat,aG as BufferAttribute,aH as InterpolateDiscrete,aI as Scene,aJ as ShapePath,aK as Uniform,aL as WebGLRenderer,aM as NearestFilter,aN as NearestMipmapNearestFilter,aO as NearestMipmapLinearFilter,aP as LinearFilter,aQ as LinearMipmapNearestFilter,aR as LinearMipmapLinearFilter,aS as ClampToEdgeWrapping,aT as RepeatWrapping,aU as MirroredRepeatWrapping,aV as mergeModels,aW as useModel,aX as createTextVNode,n as normalizeStyle,aY as Object3D,aZ as AnimationClip,a_ as QuaternionKeyframeTrack,a$ as NumberKeyframeTrack,b0 as Matrix3,b1 as Skeleton,b2 as Group,b3 as LineBasicMaterial,b4 as LineSegments,b5 as ImageLoader,b6 as Material,b7 as AxesHelper,b8 as TangentSpaceNormalMap,b9 as DynamicDrawUsage,ba as Line,bb as SkinnedMesh,bc as GLBufferAttribute,bd as TrianglesDrawMode,be as TriangleFanDrawMode,bf as TriangleStripDrawMode,bg as Loader,bh as LoaderUtils,bi as FileLoader$1,bj as LinearSRGBColorSpace,bk as SpotLight,bl as PointLight,bm as DirectionalLight,bn as SRGBColorSpace,bo as MeshPhysicalMaterial,bp as InstancedMesh,bq as InstancedBufferAttribute,br as TextureLoader,bs as ImageBitmapLoader,bt as PointsMaterial,bu as MeshStandardMaterial,bv as LineLoop,bw as Points,bx as Bone,by as ColorManagement,bz as FrontSide,bA as VectorKeyframeTrack,bB as Interpolant,bC as AnimationMixer,bD as Hr}from"./index-
|
2 |
|
3 |
`);a=o.pop()||"";for(const u of o){if(!u||!u.startsWith(dataHeaderPrefix))continue;if(u.startsWith(dataErrorPrefix)){s.error(new Error(`Error from server: ${u}`));continue}const m=u.slice(dataHeaderPrefix.length);if(m==="[DONE]"){s.terminate();continue}const g=JSON.parse(m);s.enqueue(g),g.choices[0].finish_reason&&(r=g.choices[0].finish_reason),g.usage&&(i=g.usage)}}})),[c,f]=l.tee(),d=f.pipeThrough(new TransformStream({transform:(h,s)=>s.enqueue(h.choices[0].delta.content)}));return{chunkStream:c,finishReason:r,textStream:d,usage:i}}),suspectProtoRx=/"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/,suspectConstructorRx=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/,JsonSigRx=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/;function jsonParseTransform(n,e){if(n==="__proto__"||n==="constructor"&&e&&typeof e=="object"&&"prototype"in e){warnKeyDropped(n);return}return e}function warnKeyDropped(n){console.warn(`[destr] Dropping "${n}" key to prevent prototype pollution.`)}function destr(n,e={}){if(typeof n!="string")return n;const t=n.trim();if(n[0]==='"'&&n.endsWith('"')&&!n.includes("\\"))return t.slice(1,-1);if(t.length<=9){const r=t.toLowerCase();if(r==="true")return!0;if(r==="false")return!1;if(r==="undefined")return;if(r==="null")return null;if(r==="nan")return Number.NaN;if(r==="infinity")return Number.POSITIVE_INFINITY;if(r==="-infinity")return Number.NEGATIVE_INFINITY}if(!JsonSigRx.test(n)){if(e.strict)throw new SyntaxError("[destr] Invalid JSON");return n}try{if(suspectProtoRx.test(n)||suspectConstructorRx.test(n)){if(e.strict)throw new Error("[destr] Possible prototype pollution");return JSON.parse(n,jsonParseTransform)}return JSON.parse(n)}catch(r){if(e.strict)throw r;return n}}const HASH_RE=/#/g,AMPERSAND_RE=/&/g,SLASH_RE=/\//g,EQUAL_RE=/=/g,PLUS_RE=/\+/g,ENC_CARET_RE=/%5e/gi,ENC_BACKTICK_RE=/%60/gi,ENC_PIPE_RE=/%7c/gi,ENC_SPACE_RE=/%20/gi;function encode(n){return encodeURI(""+n).replace(ENC_PIPE_RE,"|")}function encodeQueryValue(n){return encode(typeof n=="string"?n:JSON.stringify(n)).replace(PLUS_RE,"%2B").replace(ENC_SPACE_RE,"+").replace(HASH_RE,"%23").replace(AMPERSAND_RE,"%26").replace(ENC_BACKTICK_RE,"`").replace(ENC_CARET_RE,"^").replace(SLASH_RE,"%2F")}function encodeQueryKey(n){return encodeQueryValue(n).replace(EQUAL_RE,"%3D")}function decode$1(n=""){try{return decodeURIComponent(""+n)}catch{return""+n}}function decodeQueryKey(n){return decode$1(n.replace(PLUS_RE," "))}function decodeQueryValue(n){return decode$1(n.replace(PLUS_RE," "))}function parseQuery(n=""){const e={};n[0]==="?"&&(n=n.slice(1));for(const t of n.split("&")){const r=t.match(/([^=]+)=?(.*)/)||[];if(r.length<2)continue;const i=decodeQueryKey(r[1]);if(i==="__proto__"||i==="constructor")continue;const a=decodeQueryValue(r[2]||"");e[i]===void 0?e[i]=a:Array.isArray(e[i])?e[i].push(a):e[i]=[e[i],a]}return e}function encodeQueryItem(n,e){return(typeof e=="number"||typeof e=="boolean")&&(e=String(e)),e?Array.isArray(e)?e.map(t=>`${encodeQueryKey(n)}=${encodeQueryValue(t)}`).join("&"):`${encodeQueryKey(n)}=${encodeQueryValue(e)}`:encodeQueryKey(n)}function stringifyQuery(n){return Object.keys(n).filter(e=>n[e]!==void 0).map(e=>encodeQueryItem(e,n[e])).filter(Boolean).join("&")}const PROTOCOL_STRICT_REGEX=/^[\s\w\0+.-]{2,}:([/\\]{1,2})/,PROTOCOL_REGEX=/^[\s\w\0+.-]{2,}:([/\\]{2})?/,PROTOCOL_RELATIVE_REGEX=/^([/\\]\s*){2,}[^/\\]/,JOIN_LEADING_SLASH_RE=/^\.?\//;function hasProtocol(n,e={}){return typeof e=="boolean"&&(e={acceptRelative:e}),e.strict?PROTOCOL_STRICT_REGEX.test(n):PROTOCOL_REGEX.test(n)||(e.acceptRelative?PROTOCOL_RELATIVE_REGEX.test(n):!1)}function hasTrailingSlash(n="",e){return n.endsWith("/")}function withoutTrailingSlash(n="",e){return(hasTrailingSlash(n)?n.slice(0,-1):n)||"/"}function withTrailingSlash(n="",e){return n.endsWith("/")?n:n+"/"}function withBase(n,e){if(isEmptyURL(e)||hasProtocol(n))return n;const t=withoutTrailingSlash(e);return n.startsWith(t)?n:joinURL(t,n)}function withQuery(n,e){const t=parseURL(n),r={...parseQuery(t.search),...e};return t.search=stringifyQuery(r),stringifyParsedURL(t)}function isEmptyURL(n){return!n||n==="/"}function isNonEmptyURL(n){return n&&n!=="/"}function joinURL(n,...e){let t=n||"";for(const r of e.filter(i=>isNonEmptyURL(i)))if(t){const i=r.replace(JOIN_LEADING_SLASH_RE,"");t=withTrailingSlash(t)+i}else t=r;return t}const protocolRelative=Symbol.for("ufo:protocolRelative");function parseURL(n="",e){const t=n.match(/^[\s\0]*(blob:|data:|javascript:|vbscript:)(.*)/i);if(t){const[,s,o=""]=t;return{protocol:s.toLowerCase(),pathname:o,href:s+o,auth:"",host:"",search:"",hash:""}}if(!hasProtocol(n,{acceptRelative:!0}))return parsePath(n);const[,r="",i,a=""]=n.replace(/\\/g,"/").match(/^[\s\0]*([\w+.-]{2,}:)?\/\/([^/@]+@)?(.*)/)||[];let[,l="",c=""]=a.match(/([^#/?]*)(.*)?/)||[];r==="file:"&&(c=c.replace(/\/(?=[A-Za-z]:)/,""));const{pathname:f,search:d,hash:h}=parsePath(c);return{protocol:r.toLowerCase(),auth:i?i.slice(0,Math.max(0,i.length-1)):"",host:l,pathname:f,search:d,hash:h,[protocolRelative]:!r}}function parsePath(n=""){const[e="",t="",r=""]=(n.match(/([^#?]*)(\?[^#]*)?(#.*)?/)||[]).splice(1);return{pathname:e,search:t,hash:r}}function stringifyParsedURL(n){const e=n.pathname||"",t=n.search?(n.search.startsWith("?")?"":"?")+n.search:"",r=n.hash||"",i=n.auth?n.auth+"@":"",a=n.host||"";return(n.protocol||n[protocolRelative]?(n.protocol||"")+"//":"")+i+a+e+t+r}class FetchError extends Error{constructor(e,t){super(e,t),this.name="FetchError",t!=null&&t.cause&&!this.cause&&(this.cause=t.cause)}}function createFetchError(n){var f,d,h,s,o;const e=((f=n.error)==null?void 0:f.message)||((d=n.error)==null?void 0:d.toString())||"",t=((h=n.request)==null?void 0:h.method)||((s=n.options)==null?void 0:s.method)||"GET",r=((o=n.request)==null?void 0:o.url)||String(n.request)||"/",i=`[${t}] ${JSON.stringify(r)}`,a=n.response?`${n.response.status} ${n.response.statusText}`:"<no response>",l=`${i}: ${a}${e?` ${e}`:""}`,c=new FetchError(l,n.error?{cause:n.error}:void 0);for(const u of["request","options","response"])Object.defineProperty(c,u,{get(){return n[u]}});for(const[u,m]of[["data","_data"],["status","status"],["statusCode","status"],["statusText","statusText"],["statusMessage","statusText"]])Object.defineProperty(c,u,{get(){return n.response&&n.response[m]}});return c}const payloadMethods=new Set(Object.freeze(["PATCH","POST","PUT","DELETE"]));function isPayloadMethod(n="GET"){return payloadMethods.has(n.toUpperCase())}function isJSONSerializable(n){if(n===void 0)return!1;const e=typeof n;return e==="string"||e==="number"||e==="boolean"||e===null?!0:e!=="object"?!1:Array.isArray(n)?!0:n.buffer?!1:n.constructor&&n.constructor.name==="Object"||typeof n.toJSON=="function"}const textTypes=new Set(["image/svg","application/xml","application/xhtml","application/html"]),JSON_RE=/^application\/(?:[\w!#$%&*.^`~-]*\+)?json(;.+)?$/i;function detectResponseType(n=""){if(!n)return"json";const e=n.split(";").shift()||"";return JSON_RE.test(e)?"json":textTypes.has(e)||e.startsWith("text/")?"text":"blob"}function resolveFetchOptions(n,e,t,r){const i=mergeHeaders((e==null?void 0:e.headers)??(n==null?void 0:n.headers),t==null?void 0:t.headers,r);let a;return(t!=null&&t.query||t!=null&&t.params||e!=null&&e.params||e!=null&&e.query)&&(a={...t==null?void 0:t.params,...t==null?void 0:t.query,...e==null?void 0:e.params,...e==null?void 0:e.query}),{...t,...e,query:a,params:a,headers:i}}function mergeHeaders(n,e,t){if(!e)return new t(n);const r=new t(e);if(n)for(const[i,a]of Symbol.iterator in n||Array.isArray(n)?n:new t(n))r.set(i,a);return r}async function callHooks(n,e){if(e)if(Array.isArray(e))for(const t of e)await t(n);else await e(n)}const retryStatusCodes=new Set([408,409,425,429,500,502,503,504]),nullBodyResponses=new Set([101,204,205,304]);function createFetch(n={}){const{fetch:e=globalThis.fetch,Headers:t=globalThis.Headers,AbortController:r=globalThis.AbortController}=n;async function i(c){const f=c.error&&c.error.name==="AbortError"&&!c.options.timeout||!1;if(c.options.retry!==!1&&!f){let h;typeof c.options.retry=="number"?h=c.options.retry:h=isPayloadMethod(c.options.method)?0:1;const s=c.response&&c.response.status||500;if(h>0&&(Array.isArray(c.options.retryStatusCodes)?c.options.retryStatusCodes.includes(s):retryStatusCodes.has(s))){const o=typeof c.options.retryDelay=="function"?c.options.retryDelay(c):c.options.retryDelay||0;return o>0&&await new Promise(u=>setTimeout(u,o)),a(c.request,{...c.options,retry:h-1})}}const d=createFetchError(c);throw Error.captureStackTrace&&Error.captureStackTrace(d,a),d}const a=async function(f,d={}){const h={request:f,options:resolveFetchOptions(f,d,n.defaults,t),response:void 0,error:void 0};h.options.method&&(h.options.method=h.options.method.toUpperCase()),h.options.onRequest&&await callHooks(h,h.options.onRequest),typeof h.request=="string"&&(h.options.baseURL&&(h.request=withBase(h.request,h.options.baseURL)),h.options.query&&(h.request=withQuery(h.request,h.options.query),delete h.options.query),"query"in h.options&&delete h.options.query,"params"in h.options&&delete h.options.params),h.options.body&&isPayloadMethod(h.options.method)&&(isJSONSerializable(h.options.body)?(h.options.body=typeof h.options.body=="string"?h.options.body:JSON.stringify(h.options.body),h.options.headers=new t(h.options.headers||{}),h.options.headers.has("content-type")||h.options.headers.set("content-type","application/json"),h.options.headers.has("accept")||h.options.headers.set("accept","application/json")):("pipeTo"in h.options.body&&typeof h.options.body.pipeTo=="function"||typeof h.options.body.pipe=="function")&&("duplex"in h.options||(h.options.duplex="half")));let s;if(!h.options.signal&&h.options.timeout){const u=new r;s=setTimeout(()=>{const m=new Error("[TimeoutError]: The operation was aborted due to timeout");m.name="TimeoutError",m.code=23,u.abort(m)},h.options.timeout),h.options.signal=u.signal}try{h.response=await e(h.request,h.options)}catch(u){return h.error=u,h.options.onRequestError&&await callHooks(h,h.options.onRequestError),await i(h)}finally{s&&clearTimeout(s)}if((h.response.body||h.response._bodyInit)&&!nullBodyResponses.has(h.response.status)&&h.options.method!=="HEAD"){const u=(h.options.parseResponse?"json":h.options.responseType)||detectResponseType(h.response.headers.get("content-type")||"");switch(u){case"json":{const m=await h.response.text(),g=h.options.parseResponse||destr;h.response._data=g(m);break}case"stream":{h.response._data=h.response.body||h.response._bodyInit;break}default:h.response._data=await h.response[u]()}}return h.options.onResponse&&await callHooks(h,h.options.onResponse),!h.options.ignoreResponseError&&h.response.status>=400&&h.response.status<600?(h.options.onResponseError&&await callHooks(h,h.options.onResponseError),await i(h)):h.response},l=async function(f,d){return(await a(f,d))._data};return l.raw=a,l.native=(...c)=>e(...c),l.create=(c={},f={})=>createFetch({...n,...f,defaults:{...n.defaults,...f.defaults,...c}}),l}const _globalThis=function(){if(typeof globalThis<"u")return globalThis;if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("unable to locate global object")}(),fetch$1=_globalThis.fetch?(...n)=>_globalThis.fetch(...n):()=>Promise.reject(new Error("[ofetch] global.fetch is not supported!")),Headers=_globalThis.Headers,AbortController=_globalThis.AbortController,ofetch=createFetch({fetch:fetch$1,Headers,AbortController}),useLLM=defineStore("llm",()=>{async function n(r,i,a,l){return await streamText({baseURL:r.endsWith("/")?r:`${r}/`,apiKey:i,model:a,messages:l,streamOptions:{usage:!0}})}async function e(r,i){if(r==="")return[];try{return await listModels({baseURL:r.endsWith("/")?r:`${r}/`,apiKey:i})}catch(a){if(String(a).includes("Failed to construct 'URL': Invalid URL"))return[];throw a}}async function t(r,i,a,l){if(!a||!a.trim())throw new Error("Text is required");return await ofetch(`${r}/api/v1/llm/voice/elevenlabs`,{body:{...l,stream:!0,text:a},method:"POST",cache:"no-cache",responseType:"arrayBuffer",headers:{Authorization:`Bearer ${i}`}})}return{models:e,stream:n,streamSpeech:t}}),useSettings=defineStore("settings",()=>{const n=ref$1(),e=useLocalStorage("settings/credentials/openai-api-key",""),t=useLocalStorage("settings/credentials/openai-api-base-url",""),r=useLocalStorage("settings/credentials/elevenlabs-api-key",""),i=useLocalStorage("settings/language","en-US"),a=useLocalStorage("settings/stage/view/model-renderer","2d"),l=useLocalStorage("settings/llm/openai/model",{id:"openai/gpt-3.5-turbo",name:"OpenAI GPT3.5 Turbo"}),c=useLocalStorage("settings/audio/input","true"),f=computed(()=>{var h;return(h=n.value)==null?void 0:h.deviceId}),{audioInputs:d}=useDevicesList({constraints:{audio:!0},requestPermissions:!0});return watch(c,h=>{h==="false"&&(n.value=void 0),h==="true"&&(n.value=d.value[0])}),onMounted(()=>{c.value==="true"&&!n.value&&(n.value=d.value[0])}),watch(d,()=>{c.value==="true"&&!n.value&&(n.value=d.value[0])}),watch(i,h=>i18n.global.locale.value=h),{openAiApiKey:e,openAiApiBaseURL:t,openAiModel:l,elevenLabsApiKey:r,language:i,stageView:a,isAudioInputOn:c,selectedAudioDevice:n,selectedAudioDeviceId:f}}),closed="0px",_sfc_main$d=defineComponent({__name:"TransitionVertical",props:{duration:{default:250},easingEnter:{default:"ease-in-out"},easingLeave:{default:"ease-in-out"},opacityClosed:{default:0},opacityOpened:{default:1}},setup(n){const e=n;function t(f){return{height:f.style.height,width:f.style.width,position:f.style.position,visibility:f.style.visibility,overflow:f.style.overflow,paddingTop:f.style.paddingTop,paddingBottom:f.style.paddingBottom,borderTopWidth:f.style.borderTopWidth,borderBottomWidth:f.style.borderBottomWidth,marginTop:f.style.marginTop,marginBottom:f.style.marginBottom}}function r(f,d){const{width:h}=getComputedStyle(f);f.style.width=h,f.style.position="absolute",f.style.visibility="hidden",f.style.height="";const{height:s}=getComputedStyle(f);return f.style.width=d.width,f.style.position=d.position,f.style.visibility=d.visibility,f.style.height=closed,f.style.overflow="hidden",d.height&&d.height!==closed?d.height:s}function i(f,d,h,s,o){const u=f.animate(s,o);f.style.height=d.height,u.onfinish=()=>{f.style.overflow=d.overflow,h()}}function a(f,d){return[{height:closed,opacity:e.opacityClosed,paddingTop:closed,paddingBottom:closed,borderTopWidth:closed,borderBottomWidth:closed,marginTop:closed,marginBottom:closed},{height:f,opacity:e.opacityOpened,paddingTop:d.paddingTop,paddingBottom:d.paddingBottom,borderTopWidth:d.borderTopWidth,borderBottomWidth:d.borderBottomWidth,marginTop:d.marginTop,marginBottom:d.marginBottom}]}function l(f,d){const h=f,s=t(h),o=r(h,s),u=a(o,s),m={duration:e.duration,easing:e.easingEnter};i(h,s,d,u,m)}function c(f,d){const h=f,s=t(h),{height:o}=getComputedStyle(h);h.style.height=o,h.style.overflow="hidden";const u=a(o,s).reverse(),m={duration:e.duration,easing:e.easingLeave};i(h,s,d,u,m)}return(f,d)=>(openBlock(),createBlock(Transition,{css:!1,onEnter:l,onLeave:c},{default:withCtx(()=>[renderSlot(f.$slots,"default")]),_:3}))}}),_hoisted_1$8={flex:"~","gap-2":""},_hoisted_2$7={flex:"~ row",bg:"zinc-100 dark:zinc-700",text:"sm zinc-400 dark:zinc-500","appearance-none":"","gap-1":"","rounded-lg":"","rounded-md":"","border-none":"","p-1":""},_hoisted_3$6=["checked","aria-checked"],_hoisted_4$5=["checked","aria-checked"],_hoisted_5$5={relative:""},_hoisted_6$4={flex:"~ row",bg:"zinc-100 dark:zinc-700",text:"sm zinc-400 dark:zinc-500","h-fit":"","w-fit":"","appearance-none":"","gap-1":"","rounded-lg":"","rounded-md":"","border-none":"","p-1":""},_hoisted_7$3=["checked","aria-checked"],_hoisted_8$3={key:0,w:"120 <sm:[calc(100vw-16px)]",right:"0",bg:"zinc-100 dark:zinc-700",grid:"~ cols-[140px_1fr]",absolute:"","z-100":"","my-2":"","items-center":"","gap-1.5":"","rounded-lg":"","px-3":"","py-2":""},_hoisted_9$3={"text-sm":""},_hoisted_10$2={flex:"~ row","w-full":"",text:"sm"},_hoisted_11$2=["placeholder"],_hoisted_12$2={"text-sm":""},_hoisted_13$2={flex:"~ row","w-full":"",text:"sm"},_hoisted_14$2=["placeholder"],_hoisted_15$2={"text-sm":""},_hoisted_16$2={flex:"~ row","w-full":"",text:"sm"},_hoisted_17$2=["placeholder"],_hoisted_18$2={"text-sm":""},_hoisted_19$2={flex:"~ row","w-full":"",text:"sm"},_hoisted_20$2={"text-sm":""},_hoisted_21$2={flex:"~ row","w-full":"",text:"sm"},_hoisted_22={disabled:"",class:"bg-white dark:bg-zinc-800"},_hoisted_23=["value"],_hoisted_24=["value"],_hoisted_25={flex:"~ row",bg:"zinc-100 dark:zinc-700",text:"sm zinc-400 dark:zinc-500","h-fit":"","w-fit":"","appearance-none":"","gap-1":"","rounded-lg":"","rounded-md":"","border-none":"","p-1":""},_hoisted_26={"h-fit":"","cursor-pointer":"","rounded-md":"","px-2":"","py-2":""},_hoisted_27=["checked","aria-checked"],_hoisted_28={"select-none":""},_hoisted_29={key:0,"i-solar:sun-fog-bold-duotone":"",text:"lg hover:zinc-600 dark:hover:zinc-300",transition:"all ease-in-out duration-250"},_hoisted_30={key:1,"i-solar:moon-stars-bold-duotone":"",text:"lg hover:zinc-600 dark:hover:zinc-300",transition:"all ease-in-out duration-250"},_sfc_main$c=defineComponent({__name:"Settings",setup(n){const{t:e}=useI18n(),t=useSettings(),r=ref$1(!1),i=useDark({disableTransition:!1}),a=ref$1([]),{models:l}=useLLM(),{openAiModel:c,openAiApiBaseURL:f,openAiApiKey:d}=storeToRefs(t);function h(s){const o=s.target,u=a.value.find(m=>m.id===o.value);if(!u){c.value=void 0;return}c.value=u}return watch([f,d],async([s,o])=>{if(!s||!o){a.value=[];return}a.value=await l(s,o)}),onMounted(async()=>{!f.value||!d.value||(a.value=await l(f.value,d.value))}),(s,o)=>(openBlock(),createElementBlock("div",_hoisted_1$8,[createBaseVNode("fieldset",_hoisted_2$7,[createBaseVNode("label",{"h-fit":"","cursor-pointer":"",class:normalizeClass([unref(t).stageView==="2d"?"bg-zinc-300 text-zinc-900 dark:bg-zinc-200 dark:text-zinc-800":""]),"rounded-md":"","px-4":"","py-2":""},[withDirectives(createBaseVNode("input",{"onUpdate:modelValue":o[0]||(o[0]=u=>unref(t).stageView=u),checked:unref(t).stageView==="2d","aria-checked":unref(t).stageView==="2d",name:"settings.stageView",type:"radio",role:"radio",value:"2d",hidden:"","appearance-none":"","outline-none":""},null,8,_hoisted_3$6),[[vModelRadio,unref(t).stageView]]),createBaseVNode("div",{"select-none":"",class:normalizeClass([unref(t).stageView==="2d"?"font-semibold":""])}," 2D ",2)],2),createBaseVNode("label",{"h-fit":"","cursor-pointer":"",class:normalizeClass([unref(t).stageView==="3d"?"bg-zinc-300 text-zinc-900 dark:bg-zinc-200 dark:text-zinc-800":""]),"rounded-md":"","px-4":"","py-2":""},[withDirectives(createBaseVNode("input",{"onUpdate:modelValue":o[1]||(o[1]=u=>unref(t).stageView=u),checked:unref(t).stageView==="3d","aria-checked":unref(t).stageView==="3d",name:"stageView",type:"radio",role:"radio",value:"3d",hidden:"","appearance-none":"","outline-none":""},null,8,_hoisted_4$5),[[vModelRadio,unref(t).stageView]]),createBaseVNode("div",{"select-none":"",class:normalizeClass([unref(t).stageView==="3d"?"font-semibold":""])}," 3D ",2)],2)]),createBaseVNode("div",_hoisted_5$5,[createBaseVNode("div",_hoisted_6$4,[createBaseVNode("label",{"h-fit":"","cursor-pointer":"",class:normalizeClass([r.value?"bg-zinc-300 text-zinc-900 dark:bg-zinc-200 dark:text-zinc-800":""]),transition:"all ease-in-out duration-500","rounded-md":"","px-2":"","py-2":""},[withDirectives(createBaseVNode("input",{"onUpdate:modelValue":o[2]||(o[2]=u=>r.value=u),checked:r.value,"aria-checked":r.value,name:"stageView",type:"checkbox",hidden:"","appearance-none":"","outline-none":""},null,8,_hoisted_7$3),[[vModelCheckbox,r.value]]),o[8]||(o[8]=createBaseVNode("div",{"select-none":""},[createBaseVNode("div",{"i-solar:settings-minimalistic-bold-duotone":"",text:"text-zinc-900 dark:text-zinc-800 lg"})],-1))],2)]),createVNode(_sfc_main$d,null,{default:withCtx(()=>[r.value?(openBlock(),createElementBlock("div",_hoisted_8$3,[createBaseVNode("div",_hoisted_9$3,[createBaseVNode("span",null,toDisplayString(unref(e)("settings.openai-base-url.label")),1)]),createBaseVNode("div",_hoisted_10$2,[withDirectives(createBaseVNode("input",{"onUpdate:modelValue":o[3]||(o[3]=u=>unref(t).openAiApiBaseURL=u),type:"text",placeholder:unref(e)("settings.openai-base-url.placeholder"),bg:"zinc-200 dark:zinc-800/50","w-full":"","rounded-md":"","px-2":"","py-1":"","font-mono":"","outline-none":""},null,8,_hoisted_11$2),[[vModelText,unref(t).openAiApiBaseURL]])]),createBaseVNode("div",_hoisted_12$2,[createBaseVNode("span",null,toDisplayString(unref(e)("settings.openai-api-key.label")),1)]),createBaseVNode("div",_hoisted_13$2,[withDirectives(createBaseVNode("input",{"onUpdate:modelValue":o[4]||(o[4]=u=>unref(t).openAiApiKey=u),type:"text",placeholder:unref(e)("settings.openai-api-key.placeholder"),bg:"zinc-200 dark:zinc-800/50","w-full":"","rounded-md":"","px-2":"","py-1":"","font-mono":"","outline-none":""},null,8,_hoisted_14$2),[[vModelText,unref(t).openAiApiKey]])]),createBaseVNode("div",_hoisted_15$2,[createBaseVNode("span",null,toDisplayString(unref(e)("settings.elevenlabs-api-key.label")),1)]),createBaseVNode("div",_hoisted_16$2,[withDirectives(createBaseVNode("input",{"onUpdate:modelValue":o[5]||(o[5]=u=>unref(t).elevenLabsApiKey=u),type:"text",placeholder:unref(e)("settings.elevenlabs-api-key.placeholder"),bg:"zinc-200 dark:zinc-800/50","w-full":"","rounded-md":"","px-2":"","py-1":"","font-mono":"","outline-none":""},null,8,_hoisted_17$2),[[vModelText,unref(t).elevenLabsApiKey]])]),createBaseVNode("div",_hoisted_18$2,[createBaseVNode("span",null,toDisplayString(unref(e)("settings.language")),1)]),createBaseVNode("div",_hoisted_19$2,[withDirectives(createBaseVNode("select",{"onUpdate:modelValue":o[6]||(o[6]=u=>unref(t).language=u),bg:"zinc-200 dark:zinc-800/50","w-full":"","rounded-md":"","px-2":"","py-1":"","font-mono":"","outline-none":""},o[9]||(o[9]=[createBaseVNode("option",{value:"en-US"}," English ",-1),createBaseVNode("option",{value:"zh-CN"}," 简体中文 ",-1)]),512),[[vModelSelect,unref(t).language]])]),createBaseVNode("div",_hoisted_20$2,[createBaseVNode("span",null,toDisplayString(unref(e)("settings.models")),1)]),createBaseVNode("div",_hoisted_21$2,[createBaseVNode("select",{bg:"zinc-200 dark:zinc-800/50","w-full":"","rounded-md":"","px-2":"","py-1":"","font-mono":"","outline-none":"",onChange:h},[createBaseVNode("option",_hoisted_22,toDisplayString(unref(e)("stage.select-a-model")),1),unref(t).openAiModel?(openBlock(),createElementBlock("option",{key:0,value:unref(t).openAiModel.id},toDisplayString("name"in unref(t).openAiModel?`${unref(t).openAiModel.name} (${unref(t).openAiModel.id})`:unref(t).openAiModel.id),9,_hoisted_23)):createCommentVNode("",!0),(openBlock(!0),createElementBlock(Fragment,null,renderList(a.value,u=>(openBlock(),createElementBlock("option",{key:u.id,value:u.id},toDisplayString("name"in u?`${u.name} (${u.id})`:u.id),9,_hoisted_24))),128))],32)])])):createCommentVNode("",!0)]),_:1})]),createBaseVNode("div",null,[createBaseVNode("div",_hoisted_25,[createBaseVNode("label",_hoisted_26,[withDirectives(createBaseVNode("input",{"onUpdate:modelValue":o[7]||(o[7]=u=>isRef(i)?i.value=u:null),checked:unref(i),"aria-checked":unref(i),name:"stageView",type:"checkbox",hidden:"","appearance-none":"","outline-none":""},null,8,_hoisted_27),[[vModelCheckbox,unref(i)]]),createBaseVNode("div",_hoisted_28,[createVNode(Transition,{name:"slide-away",mode:"out-in"},{default:withCtx(()=>[unref(i)?(openBlock(),createElementBlock("div",_hoisted_29)):(openBlock(),createElementBlock("div",_hoisted_30))]),_:1})])])])])]))}}),Settings=_export_sfc(_sfc_main$c,[["__scopeId","data-v-8d6cb079"]]),_hoisted_1$7={flex:"~","mb-1":"","w-full":"","gap-2":""},_sfc_main$b=defineComponent({__name:"Header",setup(n){return(e,t)=>(openBlock(),createElementBlock("header",_hoisted_1$7,[t[0]||(t[0]=createBaseVNode("div",{flex:"~ 1","w-full":"","items-center":"","gap-2":"","px-2":"","text-nowrap":"","text-2xl":""},[createBaseVNode("div",{"i-solar:cat-outline":"",text:"[#ed869d]"}),createBaseVNode("div",{"font-cute":""},[createBaseVNode("span",null,"アイリ")])],-1)),createVNode(Settings)]))}});var dist={},ortWeb_min={exports:{}};const backends={},backendsSortedByPriority=[],registerBackend=(n,e,t)=>{if(e&&typeof e.init=="function"&&typeof e.createSessionHandler=="function"){const r=backends[n];if(r===void 0)backends[n]={backend:e,priority:t};else{if(r.priority>t)return;if(r.priority===t&&r.backend!==e)throw new Error(`cannot register backend "${n}" using priority ${t}`)}if(t>=0){const i=backendsSortedByPriority.indexOf(n);i!==-1&&backendsSortedByPriority.splice(i,1);for(let a=0;a<backendsSortedByPriority.length;a++)if(backends[backendsSortedByPriority[a]].priority<=t){backendsSortedByPriority.splice(a,0,n);return}backendsSortedByPriority.push(n)}return}throw new TypeError("not a valid backend")},resolveBackend=async n=>{const e=n.length===0?backendsSortedByPriority:n,t=[];for(const r of e){const i=backends[r];if(i){if(i.initialized)return i.backend;if(i.aborted)continue;const a=!!i.initPromise;try{return a||(i.initPromise=i.backend.init()),await i.initPromise,i.initialized=!0,i.backend}catch(l){a||t.push({name:r,err:l}),i.aborted=!0}finally{delete i.initPromise}}}throw new Error(`no available backend found. ERR: ${t.map(r=>`[${r.name}] ${r.err}`).join(", ")}`)};class EnvImpl{constructor(){this.wasm={},this.webgl={},this.logLevelInternal="warning"}set logLevel(e){if(e!==void 0){if(typeof e!="string"||["verbose","info","warning","error","fatal"].indexOf(e)===-1)throw new Error(`Unsupported logging level: ${e}`);this.logLevelInternal=e}}get logLevel(){return this.logLevelInternal}}const env$1=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=n=>{let e=1;for(let t=0;t<n.length;t++){const r=n[t];if(typeof r!="number"||!Number.isSafeInteger(r))throw new TypeError(`dims[${t}] must be an integer, got: ${r}`);if(r<0)throw new RangeError(`dims[${t}] must be a non-negative integer, got: ${r}`);e*=r}return e};let Tensor$1=class jt{constructor(e,t,r){let i,a,l;if(typeof e=="string")if(i=e,l=r,e==="string"){if(!Array.isArray(t))throw new TypeError("A string tensor's data must be a string array.");a=t}else{const f=NUMERIC_TENSOR_TYPE_TO_TYPEDARRAY_MAP.get(e);if(f===void 0)throw new TypeError(`Unsupported tensor type: ${e}.`);if(Array.isArray(t))a=f.from(t);else if(t instanceof f)a=t;else throw new TypeError(`A ${i} tensor's data must be type of ${f}`)}else if(l=t,Array.isArray(e)){if(e.length===0)throw new TypeError("Tensor type cannot be inferred from an empty array.");const f=typeof e[0];if(f==="string")i="string",a=e;else if(f==="boolean")i="bool",a=Uint8Array.from(e);else throw new TypeError(`Invalid element type of data array: ${f}.`)}else{const f=NUMERIC_TENSOR_TYPEDARRAY_TO_TYPE_MAP.get(e.constructor);if(f===void 0)throw new TypeError(`Unsupported type for tensor data: ${e.constructor}.`);i=f,a=e}if(l===void 0)l=[a.length];else if(!Array.isArray(l))throw new TypeError("A tensor's dims must be a number array");const c=calculateSize(l);if(c!==a.length)throw new Error(`Tensor's size(${c}) does not match data length(${a.length}).`);this.dims=l,this.type=i,this.data=a,this.size=c}static bufferToTensor(e,t){if(e===void 0)throw new Error("Image buffer must be defined");if(t.height===void 0||t.width===void 0)throw new Error("Image height and width must be defined");const{height:r,width:i}=t,a=t.norm;let l,c;a===void 0||a.mean===void 0?l=255:l=a.mean,a===void 0||a.bias===void 0?c=0:c=a.bias;const f=t.bitmapFormat!==void 0?t.bitmapFormat:"RGBA",d=t.tensorFormat!==void 0&&t.tensorFormat!==void 0?t.tensorFormat:"RGB",h=r*i,s=d==="RGBA"?new Float32Array(h*4):new Float32Array(h*3);let o=4,u=0,m=1,g=2,y=3,v=0,_=h,b=h*2,w=-1;f==="RGB"&&(o=3,u=0,m=1,g=2,y=-1),d==="RGBA"?w=h*3:d==="RBG"?(v=0,b=h,_=h*2):d==="BGR"&&(b=0,_=h,v=h*2);for(let T=0;T<h;T++,u+=o,g+=o,m+=o,y+=o)s[v++]=(e[u]+c)/l,s[_++]=(e[m]+c)/l,s[b++]=(e[g]+c)/l,w!==-1&&y!==-1&&(s[w++]=(e[y]+c)/l);return d==="RGBA"?new jt("float32",s,[1,4,r,i]):new jt("float32",s,[1,3,r,i])}static async fromImage(e,t){const r=typeof HTMLImageElement<"u"&&e instanceof HTMLImageElement,i=typeof ImageData<"u"&&e instanceof ImageData,a=typeof ImageBitmap<"u"&&e instanceof ImageBitmap,l=typeof String<"u"&&(e instanceof String||typeof e=="string");let c,f={};if(r){const d=document.createElement("canvas"),h=d.getContext("2d");if(h!=null){let s=e.naturalHeight,o=e.naturalWidth;if(t!==void 0&&t.resizedHeight!==void 0&&t.resizedWidth!==void 0&&(s=t.resizedHeight,o=t.resizedWidth),t!==void 0){if(f=t,t.tensorFormat!==void 0)throw new Error("Image input config format must be RGBA for HTMLImageElement");if(f.tensorFormat="RGBA",t.height!==void 0&&t.height!==s)throw new Error("Image input config height doesn't match HTMLImageElement height");if(f.height=s,t.width!==void 0&&t.width!==o)throw new Error("Image input config width doesn't match HTMLImageElement width");f.width=o}else f.tensorFormat="RGBA",f.height=s,f.width=o;d.width=o,d.height=s,h.drawImage(e,0,0,o,s),c=h.getImageData(0,0,o,s).data}else throw new Error("Can not access image data")}else if(i){const d="RGBA";let h,s;if(t!==void 0&&t.resizedWidth!==void 0&&t.resizedHeight!==void 0?(h=t.resizedHeight,s=t.resizedWidth):(h=e.height,s=e.width),t!==void 0){if(f=t,t.bitmapFormat!==void 0&&t.bitmapFormat!==d)throw new Error("Image input config format must be RGBA for ImageData");f.bitmapFormat="RGBA"}else f.bitmapFormat="RGBA";if(f.height=h,f.width=s,t!==void 0){const o=document.createElement("canvas");o.width=s,o.height=h;const u=o.getContext("2d");if(u!=null)u.putImageData(e,0,0),c=u.getImageData(0,0,s,h).data;else throw new Error("Can not access image data")}else c=e.data}else if(a){if(t===void 0)throw new Error("Please provide image config with format for Imagebitmap");if(t.bitmapFormat!==void 0)throw new Error("Image input config format must be defined for ImageBitmap");const d=document.createElement("canvas").getContext("2d");if(d!=null){const h=e.height,s=e.width;if(d.drawImage(e,0,0,s,h),c=d.getImageData(0,0,s,h).data,t!==void 0){if(t.height!==void 0&&t.height!==h)throw new Error("Image input config height doesn't match ImageBitmap height");if(f.height=h,t.width!==void 0&&t.width!==s)throw new Error("Image input config width doesn't match ImageBitmap width");f.width=s}else f.height=h,f.width=s;return jt.bufferToTensor(c,f)}else throw new Error("Can not access image data")}else{if(l)return new Promise((d,h)=>{const s=document.createElement("canvas"),o=s.getContext("2d");if(!e||!o)return h();const u=new Image;u.crossOrigin="Anonymous",u.src=e,u.onload=()=>{s.width=u.width,s.height=u.height,o.drawImage(u,0,0,s.width,s.height);const m=o.getImageData(0,0,s.width,s.height);if(t!==void 0){if(t.height!==void 0&&t.height!==s.height)throw new Error("Image input config height doesn't match ImageBitmap height");if(f.height=s.height,t.width!==void 0&&t.width!==s.width)throw new Error("Image input config width doesn't match ImageBitmap width");f.width=s.width}else f.height=s.height,f.width=s.width;d(jt.bufferToTensor(m.data,f))}});throw new Error("Input data provided is not supported - aborted tensor creation")}if(c!==void 0)return jt.bufferToTensor(c,f);throw new Error("Input data provided is not supported - aborted tensor creation")}toImageData(e){var t,r;const i=document.createElement("canvas").getContext("2d");let a;if(i!=null){const l=this.dims[3],c=this.dims[2],f=this.dims[1],d=e!==void 0&&e.format!==void 0?e.format:"RGB",h=e!==void 0&&((t=e.norm)===null||t===void 0?void 0:t.mean)!==void 0?e.norm.mean:255,s=e!==void 0&&((r=e.norm)===null||r===void 0?void 0:r.bias)!==void 0?e.norm.bias:0,o=c*l;if(e!==void 0){if(e.height!==void 0&&e.height!==c)throw new Error("Image output config height doesn't match tensor height");if(e.width!==void 0&&e.width!==l)throw new Error("Image output config width doesn't match tensor width");if(e.format!==void 0&&f===4&&e.format!=="RGBA"||f===3&&e.format!=="RGB"&&e.format!=="BGR")throw new Error("Tensor format doesn't match input tensor dims")}const u=4;let m=0,g=1,y=2,v=3,_=0,b=o,w=o*2,x=-1;d==="RGBA"?(_=0,b=o,w=o*2,x=o*3):d==="RGB"?(_=0,b=o,w=o*2):d==="RBG"&&(_=0,w=o,b=o*2),a=i.createImageData(l,c);for(let T=0;T<c*l;m+=u,g+=u,y+=u,v+=u,T++)a.data[m]=(this.data[_++]-s)*h,a.data[g]=(this.data[b++]-s)*h,a.data[y]=(this.data[w++]-s)*h,a.data[v]=x===-1?255:(this.data[x++]-s)*h}else throw new Error("Can not access image data");return a}reshape(e){return new jt(this.type,this.data,e)}};const Tensor=Tensor$1;let InferenceSession$1=class kn{constructor(e){this.handler=e}async run(e,t,r){const i={};let a={};if(typeof e!="object"||e===null||e instanceof Tensor||Array.isArray(e))throw new TypeError("'feeds' must be an object that use input names as keys and OnnxValue as corresponding values.");let l=!0;if(typeof t=="object"){if(t===null)throw new TypeError("Unexpected argument[1]: cannot be null.");if(t instanceof Tensor)throw new TypeError("'fetches' cannot be a Tensor");if(Array.isArray(t)){if(t.length===0)throw new TypeError("'fetches' cannot be an empty array.");l=!1;for(const d of t){if(typeof d!="string")throw new TypeError("'fetches' must be a string array or an object.");if(this.outputNames.indexOf(d)===-1)throw new RangeError(`'fetches' contains invalid output name: ${d}.`);i[d]=null}if(typeof r=="object"&&r!==null)a=r;else if(typeof r<"u")throw new TypeError("'options' must be an object.")}else{let d=!1;const h=Object.getOwnPropertyNames(t);for(const s of this.outputNames)if(h.indexOf(s)!==-1){const o=t[s];(o===null||o instanceof Tensor)&&(d=!0,l=!1,i[s]=o)}if(d){if(typeof r=="object"&&r!==null)a=r;else if(typeof r<"u")throw new TypeError("'options' must be an object.")}else a=t}}else if(typeof t<"u")throw new TypeError("Unexpected argument[1]: must be 'fetches' or 'options'.");for(const d of this.inputNames)if(typeof e[d]>"u")throw new Error(`input '${d}' is missing in 'feeds'.`);if(l)for(const d of this.outputNames)i[d]=null;const c=await this.handler.run(e,i,a),f={};for(const d in c)Object.hasOwnProperty.call(c,d)&&(f[d]=new Tensor(c[d].type,c[d].data,c[d].dims));return f}static async create(e,t,r,i){let a,l={};if(typeof e=="string"){if(a=e,typeof t=="object"&&t!==null)l=t;else if(typeof t<"u")throw new TypeError("'options' must be an object.")}else if(e instanceof Uint8Array){if(a=e,typeof t=="object"&&t!==null)l=t;else if(typeof t<"u")throw new TypeError("'options' must be an object.")}else if(e instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer){const s=e;let o=0,u=e.byteLength;if(typeof t=="object"&&t!==null)l=t;else if(typeof t=="number"){if(o=t,!Number.isSafeInteger(o))throw new RangeError("'byteOffset' must be an integer.");if(o<0||o>=s.byteLength)throw new RangeError(`'byteOffset' is out of range [0, ${s.byteLength}).`);if(u=e.byteLength-o,typeof r=="number"){if(u=r,!Number.isSafeInteger(u))throw new RangeError("'byteLength' must be an integer.");if(u<=0||o+u>s.byteLength)throw new RangeError(`'byteLength' is out of range (0, ${s.byteLength-o}].`);if(typeof i=="object"&&i!==null)l=i;else if(typeof i<"u")throw new TypeError("'options' must be an object.")}else if(typeof r<"u")throw new TypeError("'byteLength' must be a number.")}else if(typeof t<"u")throw new TypeError("'options' must be an object.");a=new Uint8Array(s,o,u)}else throw new TypeError("Unexpected argument[0]: must be 'path' or 'buffer'.");const f=(l.executionProviders||[]).map(s=>typeof s=="string"?s:s.name),h=await(await resolveBackend(f)).createSessionHandler(a,l);return new kn(h)}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$1=Object.freeze(Object.defineProperty({__proto__:null,InferenceSession,Tensor,env:env$1,registerBackend},Symbol.toStringTag,{value:"Module"})),require$$0$1=getAugmentedNamespace(lib$1);/*!
|
4 |
* ONNX Runtime Web v1.14.0
|
|
|
1 |
+
import{b as defineStore,e as ref$1,f as computed,w as watch,g as onMounted,i as i18n,d as defineComponent,o as openBlock,h as createBlock,j as withCtx,T as Transition,k as renderSlot,l as useI18n,s as storeToRefs,c as createElementBlock,m as createBaseVNode,p as normalizeClass,u as unref,q as withDirectives,v as vModelRadio,t as vModelCheckbox,a as createVNode,x as isRef,y as toDisplayString,z as vModelText,A as vModelSelect,B as createCommentVNode,F as Fragment,C as renderList,D as getAugmentedNamespace,E as defu,G as toRef,H as onUnmounted,I as getDefaultExportFromCjs,J as nextTick,K as resolveDirective,L as commonjsGlobal,M as BufferGeometry,N as InterleavedBuffer,O as InterleavedBufferAttribute,P as MathUtils,Q as Color,V as Vector3,S as ShaderMaterial,U as UniformsUtils,R as BackSide,W as Triangle,X as Euler,Y as Ray,Z as Plane,_ as me,$ as shallowRef,a0 as toRefs,a1 as TOUCH,a2 as Zr,a3 as Matrix4,a4 as PlaneGeometry,a5 as useSlots,a6 as useAttrs,a7 as render,a8 as watchEffect,a9 as DoubleSide,aa as Box3,ab as UniformsLib,ac as Vector2,ad as ShaderLib,ae as Vector4,af as Line3,ag as Sphere,ah as Mesh,ai as MeshBasicMaterial,aj as FramebufferTexture,ak as RawShaderMaterial,al as AdditiveBlending,am as Box2,an as UnsignedByteType,ao as REVISION,ap as PropertyBinding,aq as InterpolateLinear,ar as EventDispatcher,as as MOUSE,at as Quaternion,au as PerspectiveCamera,av as OrthographicCamera,aw as Spherical,ax as WebGLRenderTarget,ay as HalfFloatType,az as NoToneMapping,aA as BoxGeometry,aB as getCurrentScope,aC as onScopeDispose,aD as CompressedTexture,aE as Texture$1,aF as RGBAFormat,aG as BufferAttribute,aH as InterpolateDiscrete,aI as Scene,aJ as ShapePath,aK as Uniform,aL as WebGLRenderer,aM as NearestFilter,aN as NearestMipmapNearestFilter,aO as NearestMipmapLinearFilter,aP as LinearFilter,aQ as LinearMipmapNearestFilter,aR as LinearMipmapLinearFilter,aS as ClampToEdgeWrapping,aT as RepeatWrapping,aU as MirroredRepeatWrapping,aV as mergeModels,aW as useModel,aX as createTextVNode,n as normalizeStyle,aY as Object3D,aZ as AnimationClip,a_ as QuaternionKeyframeTrack,a$ as NumberKeyframeTrack,b0 as Matrix3,b1 as Skeleton,b2 as Group,b3 as LineBasicMaterial,b4 as LineSegments,b5 as ImageLoader,b6 as Material,b7 as AxesHelper,b8 as TangentSpaceNormalMap,b9 as DynamicDrawUsage,ba as Line,bb as SkinnedMesh,bc as GLBufferAttribute,bd as TrianglesDrawMode,be as TriangleFanDrawMode,bf as TriangleStripDrawMode,bg as Loader,bh as LoaderUtils,bi as FileLoader$1,bj as LinearSRGBColorSpace,bk as SpotLight,bl as PointLight,bm as DirectionalLight,bn as SRGBColorSpace,bo as MeshPhysicalMaterial,bp as InstancedMesh,bq as InstancedBufferAttribute,br as TextureLoader,bs as ImageBitmapLoader,bt as PointsMaterial,bu as MeshStandardMaterial,bv as LineLoop,bw as Points,bx as Bone,by as ColorManagement,bz as FrontSide,bA as VectorKeyframeTrack,bB as Interpolant,bC as AnimationMixer,bD as Hr}from"./index-DNIDWMUI.js";import{a as useLocalStorage,b as useDevicesList,c as useDark,d as usePermission,t as tryOnMounted,e as useWebWorker,f as useElementBounding,g as useScroll,h as useBreakpoints,i as breakpointsTailwind,j as useWindowSize}from"./index-DPFUGDlv.js";import{_ as _export_sfc}from"./_plugin-vue_export-helper-DlAUqK2U.js";import{_ as _sfc_main$e}from"./BasicTextarea.vue_vue_type_script_setup_true_lang-C_yJpecZ.js";import{E as EMOTION_VALUES,a as EmotionSurpriseMotionName,b as EmotionSadMotionName,c as EmotionAngryMotionName,d as EmotionHappyMotionName,e as EmotionAwkwardMotionName,f as EmotionQuestionMotionName,g as EmotionThinkMotionName,u as useMessageContentQueue,h as useEmotionsMessageQueue,i as useDelayMessageQueue,l as llmInferenceEndToken,j as EMOTION_VRMExpressionName_value,k as EMOTION_EmotionMotionName_value}from"./queues-B9ctXdzf.js";import{u as useQueue}from"./queue-3rAceHBg.js";const strCamelToSnake=n=>n.replace(/[A-Z]/g,e=>`_${e.toLowerCase()}`),objCamelToSnake=n=>Object.fromEntries(Object.entries(n).map(([e,t])=>[strCamelToSnake(e),t])),clean=n=>Object.fromEntries(Object.entries(n).filter(([,e])=>e!==void 0)),requestBody=n=>JSON.stringify(objCamelToSnake(clean({...n,abortSignal:void 0,apiKey:void 0,baseURL:void 0,fetch:void 0,headers:void 0}))),requestHeaders=(n,e)=>clean({Authorization:e?`Bearer ${e}`:void 0,...n}),listModels=async n=>await(n.fetch??globalThis.fetch)(new URL("models",n.baseURL),{headers:requestHeaders({"Content-Type":"application/json",...n.headers},n.apiKey),signal:n.abortSignal}).then(e=>e.json()).then(({data:e})=>e),chatCompletion=async n=>{var e;return await(n.fetch??globalThis.fetch)(new URL("chat/completions",n.baseURL),{body:requestBody({...n,tools:(e=n.tools)==null?void 0:e.map(t=>({function:t.function,type:"function"}))}),headers:requestHeaders({"Content-Type":"application/json",...n.headers},n.apiKey),method:"POST",signal:n.abortSignal})},dataHeaderPrefix="data: ",dataErrorPrefix='{"error":',streamText=async n=>await chatCompletion({...n,stream:!0}).then(e=>{if(!e.body)return Promise.reject(e);const t=new TextDecoder;let r,i,a="";const l=e.body.pipeThrough(new TransformStream({transform:(h,s)=>{a+=t.decode(h);const o=a.split(`
|
2 |
|
3 |
`);a=o.pop()||"";for(const u of o){if(!u||!u.startsWith(dataHeaderPrefix))continue;if(u.startsWith(dataErrorPrefix)){s.error(new Error(`Error from server: ${u}`));continue}const m=u.slice(dataHeaderPrefix.length);if(m==="[DONE]"){s.terminate();continue}const g=JSON.parse(m);s.enqueue(g),g.choices[0].finish_reason&&(r=g.choices[0].finish_reason),g.usage&&(i=g.usage)}}})),[c,f]=l.tee(),d=f.pipeThrough(new TransformStream({transform:(h,s)=>s.enqueue(h.choices[0].delta.content)}));return{chunkStream:c,finishReason:r,textStream:d,usage:i}}),suspectProtoRx=/"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/,suspectConstructorRx=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/,JsonSigRx=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/;function jsonParseTransform(n,e){if(n==="__proto__"||n==="constructor"&&e&&typeof e=="object"&&"prototype"in e){warnKeyDropped(n);return}return e}function warnKeyDropped(n){console.warn(`[destr] Dropping "${n}" key to prevent prototype pollution.`)}function destr(n,e={}){if(typeof n!="string")return n;const t=n.trim();if(n[0]==='"'&&n.endsWith('"')&&!n.includes("\\"))return t.slice(1,-1);if(t.length<=9){const r=t.toLowerCase();if(r==="true")return!0;if(r==="false")return!1;if(r==="undefined")return;if(r==="null")return null;if(r==="nan")return Number.NaN;if(r==="infinity")return Number.POSITIVE_INFINITY;if(r==="-infinity")return Number.NEGATIVE_INFINITY}if(!JsonSigRx.test(n)){if(e.strict)throw new SyntaxError("[destr] Invalid JSON");return n}try{if(suspectProtoRx.test(n)||suspectConstructorRx.test(n)){if(e.strict)throw new Error("[destr] Possible prototype pollution");return JSON.parse(n,jsonParseTransform)}return JSON.parse(n)}catch(r){if(e.strict)throw r;return n}}const HASH_RE=/#/g,AMPERSAND_RE=/&/g,SLASH_RE=/\//g,EQUAL_RE=/=/g,PLUS_RE=/\+/g,ENC_CARET_RE=/%5e/gi,ENC_BACKTICK_RE=/%60/gi,ENC_PIPE_RE=/%7c/gi,ENC_SPACE_RE=/%20/gi;function encode(n){return encodeURI(""+n).replace(ENC_PIPE_RE,"|")}function encodeQueryValue(n){return encode(typeof n=="string"?n:JSON.stringify(n)).replace(PLUS_RE,"%2B").replace(ENC_SPACE_RE,"+").replace(HASH_RE,"%23").replace(AMPERSAND_RE,"%26").replace(ENC_BACKTICK_RE,"`").replace(ENC_CARET_RE,"^").replace(SLASH_RE,"%2F")}function encodeQueryKey(n){return encodeQueryValue(n).replace(EQUAL_RE,"%3D")}function decode$1(n=""){try{return decodeURIComponent(""+n)}catch{return""+n}}function decodeQueryKey(n){return decode$1(n.replace(PLUS_RE," "))}function decodeQueryValue(n){return decode$1(n.replace(PLUS_RE," "))}function parseQuery(n=""){const e={};n[0]==="?"&&(n=n.slice(1));for(const t of n.split("&")){const r=t.match(/([^=]+)=?(.*)/)||[];if(r.length<2)continue;const i=decodeQueryKey(r[1]);if(i==="__proto__"||i==="constructor")continue;const a=decodeQueryValue(r[2]||"");e[i]===void 0?e[i]=a:Array.isArray(e[i])?e[i].push(a):e[i]=[e[i],a]}return e}function encodeQueryItem(n,e){return(typeof e=="number"||typeof e=="boolean")&&(e=String(e)),e?Array.isArray(e)?e.map(t=>`${encodeQueryKey(n)}=${encodeQueryValue(t)}`).join("&"):`${encodeQueryKey(n)}=${encodeQueryValue(e)}`:encodeQueryKey(n)}function stringifyQuery(n){return Object.keys(n).filter(e=>n[e]!==void 0).map(e=>encodeQueryItem(e,n[e])).filter(Boolean).join("&")}const PROTOCOL_STRICT_REGEX=/^[\s\w\0+.-]{2,}:([/\\]{1,2})/,PROTOCOL_REGEX=/^[\s\w\0+.-]{2,}:([/\\]{2})?/,PROTOCOL_RELATIVE_REGEX=/^([/\\]\s*){2,}[^/\\]/,JOIN_LEADING_SLASH_RE=/^\.?\//;function hasProtocol(n,e={}){return typeof e=="boolean"&&(e={acceptRelative:e}),e.strict?PROTOCOL_STRICT_REGEX.test(n):PROTOCOL_REGEX.test(n)||(e.acceptRelative?PROTOCOL_RELATIVE_REGEX.test(n):!1)}function hasTrailingSlash(n="",e){return n.endsWith("/")}function withoutTrailingSlash(n="",e){return(hasTrailingSlash(n)?n.slice(0,-1):n)||"/"}function withTrailingSlash(n="",e){return n.endsWith("/")?n:n+"/"}function withBase(n,e){if(isEmptyURL(e)||hasProtocol(n))return n;const t=withoutTrailingSlash(e);return n.startsWith(t)?n:joinURL(t,n)}function withQuery(n,e){const t=parseURL(n),r={...parseQuery(t.search),...e};return t.search=stringifyQuery(r),stringifyParsedURL(t)}function isEmptyURL(n){return!n||n==="/"}function isNonEmptyURL(n){return n&&n!=="/"}function joinURL(n,...e){let t=n||"";for(const r of e.filter(i=>isNonEmptyURL(i)))if(t){const i=r.replace(JOIN_LEADING_SLASH_RE,"");t=withTrailingSlash(t)+i}else t=r;return t}const protocolRelative=Symbol.for("ufo:protocolRelative");function parseURL(n="",e){const t=n.match(/^[\s\0]*(blob:|data:|javascript:|vbscript:)(.*)/i);if(t){const[,s,o=""]=t;return{protocol:s.toLowerCase(),pathname:o,href:s+o,auth:"",host:"",search:"",hash:""}}if(!hasProtocol(n,{acceptRelative:!0}))return parsePath(n);const[,r="",i,a=""]=n.replace(/\\/g,"/").match(/^[\s\0]*([\w+.-]{2,}:)?\/\/([^/@]+@)?(.*)/)||[];let[,l="",c=""]=a.match(/([^#/?]*)(.*)?/)||[];r==="file:"&&(c=c.replace(/\/(?=[A-Za-z]:)/,""));const{pathname:f,search:d,hash:h}=parsePath(c);return{protocol:r.toLowerCase(),auth:i?i.slice(0,Math.max(0,i.length-1)):"",host:l,pathname:f,search:d,hash:h,[protocolRelative]:!r}}function parsePath(n=""){const[e="",t="",r=""]=(n.match(/([^#?]*)(\?[^#]*)?(#.*)?/)||[]).splice(1);return{pathname:e,search:t,hash:r}}function stringifyParsedURL(n){const e=n.pathname||"",t=n.search?(n.search.startsWith("?")?"":"?")+n.search:"",r=n.hash||"",i=n.auth?n.auth+"@":"",a=n.host||"";return(n.protocol||n[protocolRelative]?(n.protocol||"")+"//":"")+i+a+e+t+r}class FetchError extends Error{constructor(e,t){super(e,t),this.name="FetchError",t!=null&&t.cause&&!this.cause&&(this.cause=t.cause)}}function createFetchError(n){var f,d,h,s,o;const e=((f=n.error)==null?void 0:f.message)||((d=n.error)==null?void 0:d.toString())||"",t=((h=n.request)==null?void 0:h.method)||((s=n.options)==null?void 0:s.method)||"GET",r=((o=n.request)==null?void 0:o.url)||String(n.request)||"/",i=`[${t}] ${JSON.stringify(r)}`,a=n.response?`${n.response.status} ${n.response.statusText}`:"<no response>",l=`${i}: ${a}${e?` ${e}`:""}`,c=new FetchError(l,n.error?{cause:n.error}:void 0);for(const u of["request","options","response"])Object.defineProperty(c,u,{get(){return n[u]}});for(const[u,m]of[["data","_data"],["status","status"],["statusCode","status"],["statusText","statusText"],["statusMessage","statusText"]])Object.defineProperty(c,u,{get(){return n.response&&n.response[m]}});return c}const payloadMethods=new Set(Object.freeze(["PATCH","POST","PUT","DELETE"]));function isPayloadMethod(n="GET"){return payloadMethods.has(n.toUpperCase())}function isJSONSerializable(n){if(n===void 0)return!1;const e=typeof n;return e==="string"||e==="number"||e==="boolean"||e===null?!0:e!=="object"?!1:Array.isArray(n)?!0:n.buffer?!1:n.constructor&&n.constructor.name==="Object"||typeof n.toJSON=="function"}const textTypes=new Set(["image/svg","application/xml","application/xhtml","application/html"]),JSON_RE=/^application\/(?:[\w!#$%&*.^`~-]*\+)?json(;.+)?$/i;function detectResponseType(n=""){if(!n)return"json";const e=n.split(";").shift()||"";return JSON_RE.test(e)?"json":textTypes.has(e)||e.startsWith("text/")?"text":"blob"}function resolveFetchOptions(n,e,t,r){const i=mergeHeaders((e==null?void 0:e.headers)??(n==null?void 0:n.headers),t==null?void 0:t.headers,r);let a;return(t!=null&&t.query||t!=null&&t.params||e!=null&&e.params||e!=null&&e.query)&&(a={...t==null?void 0:t.params,...t==null?void 0:t.query,...e==null?void 0:e.params,...e==null?void 0:e.query}),{...t,...e,query:a,params:a,headers:i}}function mergeHeaders(n,e,t){if(!e)return new t(n);const r=new t(e);if(n)for(const[i,a]of Symbol.iterator in n||Array.isArray(n)?n:new t(n))r.set(i,a);return r}async function callHooks(n,e){if(e)if(Array.isArray(e))for(const t of e)await t(n);else await e(n)}const retryStatusCodes=new Set([408,409,425,429,500,502,503,504]),nullBodyResponses=new Set([101,204,205,304]);function createFetch(n={}){const{fetch:e=globalThis.fetch,Headers:t=globalThis.Headers,AbortController:r=globalThis.AbortController}=n;async function i(c){const f=c.error&&c.error.name==="AbortError"&&!c.options.timeout||!1;if(c.options.retry!==!1&&!f){let h;typeof c.options.retry=="number"?h=c.options.retry:h=isPayloadMethod(c.options.method)?0:1;const s=c.response&&c.response.status||500;if(h>0&&(Array.isArray(c.options.retryStatusCodes)?c.options.retryStatusCodes.includes(s):retryStatusCodes.has(s))){const o=typeof c.options.retryDelay=="function"?c.options.retryDelay(c):c.options.retryDelay||0;return o>0&&await new Promise(u=>setTimeout(u,o)),a(c.request,{...c.options,retry:h-1})}}const d=createFetchError(c);throw Error.captureStackTrace&&Error.captureStackTrace(d,a),d}const a=async function(f,d={}){const h={request:f,options:resolveFetchOptions(f,d,n.defaults,t),response:void 0,error:void 0};h.options.method&&(h.options.method=h.options.method.toUpperCase()),h.options.onRequest&&await callHooks(h,h.options.onRequest),typeof h.request=="string"&&(h.options.baseURL&&(h.request=withBase(h.request,h.options.baseURL)),h.options.query&&(h.request=withQuery(h.request,h.options.query),delete h.options.query),"query"in h.options&&delete h.options.query,"params"in h.options&&delete h.options.params),h.options.body&&isPayloadMethod(h.options.method)&&(isJSONSerializable(h.options.body)?(h.options.body=typeof h.options.body=="string"?h.options.body:JSON.stringify(h.options.body),h.options.headers=new t(h.options.headers||{}),h.options.headers.has("content-type")||h.options.headers.set("content-type","application/json"),h.options.headers.has("accept")||h.options.headers.set("accept","application/json")):("pipeTo"in h.options.body&&typeof h.options.body.pipeTo=="function"||typeof h.options.body.pipe=="function")&&("duplex"in h.options||(h.options.duplex="half")));let s;if(!h.options.signal&&h.options.timeout){const u=new r;s=setTimeout(()=>{const m=new Error("[TimeoutError]: The operation was aborted due to timeout");m.name="TimeoutError",m.code=23,u.abort(m)},h.options.timeout),h.options.signal=u.signal}try{h.response=await e(h.request,h.options)}catch(u){return h.error=u,h.options.onRequestError&&await callHooks(h,h.options.onRequestError),await i(h)}finally{s&&clearTimeout(s)}if((h.response.body||h.response._bodyInit)&&!nullBodyResponses.has(h.response.status)&&h.options.method!=="HEAD"){const u=(h.options.parseResponse?"json":h.options.responseType)||detectResponseType(h.response.headers.get("content-type")||"");switch(u){case"json":{const m=await h.response.text(),g=h.options.parseResponse||destr;h.response._data=g(m);break}case"stream":{h.response._data=h.response.body||h.response._bodyInit;break}default:h.response._data=await h.response[u]()}}return h.options.onResponse&&await callHooks(h,h.options.onResponse),!h.options.ignoreResponseError&&h.response.status>=400&&h.response.status<600?(h.options.onResponseError&&await callHooks(h,h.options.onResponseError),await i(h)):h.response},l=async function(f,d){return(await a(f,d))._data};return l.raw=a,l.native=(...c)=>e(...c),l.create=(c={},f={})=>createFetch({...n,...f,defaults:{...n.defaults,...f.defaults,...c}}),l}const _globalThis=function(){if(typeof globalThis<"u")return globalThis;if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("unable to locate global object")}(),fetch$1=_globalThis.fetch?(...n)=>_globalThis.fetch(...n):()=>Promise.reject(new Error("[ofetch] global.fetch is not supported!")),Headers=_globalThis.Headers,AbortController=_globalThis.AbortController,ofetch=createFetch({fetch:fetch$1,Headers,AbortController}),useLLM=defineStore("llm",()=>{async function n(r,i,a,l){return await streamText({baseURL:r.endsWith("/")?r:`${r}/`,apiKey:i,model:a,messages:l,streamOptions:{usage:!0}})}async function e(r,i){if(r==="")return[];try{return await listModels({baseURL:r.endsWith("/")?r:`${r}/`,apiKey:i})}catch(a){if(String(a).includes("Failed to construct 'URL': Invalid URL"))return[];throw a}}async function t(r,i,a,l){if(!a||!a.trim())throw new Error("Text is required");return await ofetch(`${r}/api/v1/llm/voice/elevenlabs`,{body:{...l,stream:!0,text:a},method:"POST",cache:"no-cache",responseType:"arrayBuffer",headers:{Authorization:`Bearer ${i}`}})}return{models:e,stream:n,streamSpeech:t}}),useSettings=defineStore("settings",()=>{const n=ref$1(),e=useLocalStorage("settings/credentials/openai-api-key",""),t=useLocalStorage("settings/credentials/openai-api-base-url",""),r=useLocalStorage("settings/credentials/elevenlabs-api-key",""),i=useLocalStorage("settings/language","en-US"),a=useLocalStorage("settings/stage/view/model-renderer","2d"),l=useLocalStorage("settings/llm/openai/model",{id:"openai/gpt-3.5-turbo",name:"OpenAI GPT3.5 Turbo"}),c=useLocalStorage("settings/audio/input","true"),f=computed(()=>{var h;return(h=n.value)==null?void 0:h.deviceId}),{audioInputs:d}=useDevicesList({constraints:{audio:!0},requestPermissions:!0});return watch(c,h=>{h==="false"&&(n.value=void 0),h==="true"&&(n.value=d.value[0])}),onMounted(()=>{c.value==="true"&&!n.value&&(n.value=d.value[0])}),watch(d,()=>{c.value==="true"&&!n.value&&(n.value=d.value[0])}),watch(i,h=>i18n.global.locale.value=h),{openAiApiKey:e,openAiApiBaseURL:t,openAiModel:l,elevenLabsApiKey:r,language:i,stageView:a,isAudioInputOn:c,selectedAudioDevice:n,selectedAudioDeviceId:f}}),closed="0px",_sfc_main$d=defineComponent({__name:"TransitionVertical",props:{duration:{default:250},easingEnter:{default:"ease-in-out"},easingLeave:{default:"ease-in-out"},opacityClosed:{default:0},opacityOpened:{default:1}},setup(n){const e=n;function t(f){return{height:f.style.height,width:f.style.width,position:f.style.position,visibility:f.style.visibility,overflow:f.style.overflow,paddingTop:f.style.paddingTop,paddingBottom:f.style.paddingBottom,borderTopWidth:f.style.borderTopWidth,borderBottomWidth:f.style.borderBottomWidth,marginTop:f.style.marginTop,marginBottom:f.style.marginBottom}}function r(f,d){const{width:h}=getComputedStyle(f);f.style.width=h,f.style.position="absolute",f.style.visibility="hidden",f.style.height="";const{height:s}=getComputedStyle(f);return f.style.width=d.width,f.style.position=d.position,f.style.visibility=d.visibility,f.style.height=closed,f.style.overflow="hidden",d.height&&d.height!==closed?d.height:s}function i(f,d,h,s,o){const u=f.animate(s,o);f.style.height=d.height,u.onfinish=()=>{f.style.overflow=d.overflow,h()}}function a(f,d){return[{height:closed,opacity:e.opacityClosed,paddingTop:closed,paddingBottom:closed,borderTopWidth:closed,borderBottomWidth:closed,marginTop:closed,marginBottom:closed},{height:f,opacity:e.opacityOpened,paddingTop:d.paddingTop,paddingBottom:d.paddingBottom,borderTopWidth:d.borderTopWidth,borderBottomWidth:d.borderBottomWidth,marginTop:d.marginTop,marginBottom:d.marginBottom}]}function l(f,d){const h=f,s=t(h),o=r(h,s),u=a(o,s),m={duration:e.duration,easing:e.easingEnter};i(h,s,d,u,m)}function c(f,d){const h=f,s=t(h),{height:o}=getComputedStyle(h);h.style.height=o,h.style.overflow="hidden";const u=a(o,s).reverse(),m={duration:e.duration,easing:e.easingLeave};i(h,s,d,u,m)}return(f,d)=>(openBlock(),createBlock(Transition,{css:!1,onEnter:l,onLeave:c},{default:withCtx(()=>[renderSlot(f.$slots,"default")]),_:3}))}}),_hoisted_1$8={flex:"~","gap-2":""},_hoisted_2$7={flex:"~ row",bg:"zinc-100 dark:zinc-700",text:"sm zinc-400 dark:zinc-500","appearance-none":"","gap-1":"","rounded-lg":"","rounded-md":"","border-none":"","p-1":""},_hoisted_3$6=["checked","aria-checked"],_hoisted_4$5=["checked","aria-checked"],_hoisted_5$5={relative:""},_hoisted_6$4={flex:"~ row",bg:"zinc-100 dark:zinc-700",text:"sm zinc-400 dark:zinc-500","h-fit":"","w-fit":"","appearance-none":"","gap-1":"","rounded-lg":"","rounded-md":"","border-none":"","p-1":""},_hoisted_7$3=["checked","aria-checked"],_hoisted_8$3={key:0,w:"120 <sm:[calc(100vw-16px)]",right:"0",bg:"zinc-100 dark:zinc-700",grid:"~ cols-[140px_1fr]",absolute:"","z-100":"","my-2":"","items-center":"","gap-1.5":"","rounded-lg":"","px-3":"","py-2":""},_hoisted_9$3={"text-sm":""},_hoisted_10$2={flex:"~ row","w-full":"",text:"sm"},_hoisted_11$2=["placeholder"],_hoisted_12$2={"text-sm":""},_hoisted_13$2={flex:"~ row","w-full":"",text:"sm"},_hoisted_14$2=["placeholder"],_hoisted_15$2={"text-sm":""},_hoisted_16$2={flex:"~ row","w-full":"",text:"sm"},_hoisted_17$2=["placeholder"],_hoisted_18$2={"text-sm":""},_hoisted_19$2={flex:"~ row","w-full":"",text:"sm"},_hoisted_20$2={"text-sm":""},_hoisted_21$2={flex:"~ row","w-full":"",text:"sm"},_hoisted_22={disabled:"",class:"bg-white dark:bg-zinc-800"},_hoisted_23=["value"],_hoisted_24=["value"],_hoisted_25={flex:"~ row",bg:"zinc-100 dark:zinc-700",text:"sm zinc-400 dark:zinc-500","h-fit":"","w-fit":"","appearance-none":"","gap-1":"","rounded-lg":"","rounded-md":"","border-none":"","p-1":""},_hoisted_26={"h-fit":"","cursor-pointer":"","rounded-md":"","px-2":"","py-2":""},_hoisted_27=["checked","aria-checked"],_hoisted_28={"select-none":""},_hoisted_29={key:0,"i-solar:sun-fog-bold-duotone":"",text:"lg hover:zinc-600 dark:hover:zinc-300",transition:"all ease-in-out duration-250"},_hoisted_30={key:1,"i-solar:moon-stars-bold-duotone":"",text:"lg hover:zinc-600 dark:hover:zinc-300",transition:"all ease-in-out duration-250"},_sfc_main$c=defineComponent({__name:"Settings",setup(n){const{t:e}=useI18n(),t=useSettings(),r=ref$1(!1),i=useDark({disableTransition:!1}),a=ref$1([]),{models:l}=useLLM(),{openAiModel:c,openAiApiBaseURL:f,openAiApiKey:d}=storeToRefs(t);function h(s){const o=s.target,u=a.value.find(m=>m.id===o.value);if(!u){c.value=void 0;return}c.value=u}return watch([f,d],async([s,o])=>{if(!s||!o){a.value=[];return}a.value=await l(s,o)}),onMounted(async()=>{!f.value||!d.value||(a.value=await l(f.value,d.value))}),(s,o)=>(openBlock(),createElementBlock("div",_hoisted_1$8,[createBaseVNode("fieldset",_hoisted_2$7,[createBaseVNode("label",{"h-fit":"","cursor-pointer":"",class:normalizeClass([unref(t).stageView==="2d"?"bg-zinc-300 text-zinc-900 dark:bg-zinc-200 dark:text-zinc-800":""]),"rounded-md":"","px-4":"","py-2":""},[withDirectives(createBaseVNode("input",{"onUpdate:modelValue":o[0]||(o[0]=u=>unref(t).stageView=u),checked:unref(t).stageView==="2d","aria-checked":unref(t).stageView==="2d",name:"settings.stageView",type:"radio",role:"radio",value:"2d",hidden:"","appearance-none":"","outline-none":""},null,8,_hoisted_3$6),[[vModelRadio,unref(t).stageView]]),createBaseVNode("div",{"select-none":"",class:normalizeClass([unref(t).stageView==="2d"?"font-semibold":""])}," 2D ",2)],2),createBaseVNode("label",{"h-fit":"","cursor-pointer":"",class:normalizeClass([unref(t).stageView==="3d"?"bg-zinc-300 text-zinc-900 dark:bg-zinc-200 dark:text-zinc-800":""]),"rounded-md":"","px-4":"","py-2":""},[withDirectives(createBaseVNode("input",{"onUpdate:modelValue":o[1]||(o[1]=u=>unref(t).stageView=u),checked:unref(t).stageView==="3d","aria-checked":unref(t).stageView==="3d",name:"stageView",type:"radio",role:"radio",value:"3d",hidden:"","appearance-none":"","outline-none":""},null,8,_hoisted_4$5),[[vModelRadio,unref(t).stageView]]),createBaseVNode("div",{"select-none":"",class:normalizeClass([unref(t).stageView==="3d"?"font-semibold":""])}," 3D ",2)],2)]),createBaseVNode("div",_hoisted_5$5,[createBaseVNode("div",_hoisted_6$4,[createBaseVNode("label",{"h-fit":"","cursor-pointer":"",class:normalizeClass([r.value?"bg-zinc-300 text-zinc-900 dark:bg-zinc-200 dark:text-zinc-800":""]),transition:"all ease-in-out duration-500","rounded-md":"","px-2":"","py-2":""},[withDirectives(createBaseVNode("input",{"onUpdate:modelValue":o[2]||(o[2]=u=>r.value=u),checked:r.value,"aria-checked":r.value,name:"stageView",type:"checkbox",hidden:"","appearance-none":"","outline-none":""},null,8,_hoisted_7$3),[[vModelCheckbox,r.value]]),o[8]||(o[8]=createBaseVNode("div",{"select-none":""},[createBaseVNode("div",{"i-solar:settings-minimalistic-bold-duotone":"",text:"text-zinc-900 dark:text-zinc-800 lg"})],-1))],2)]),createVNode(_sfc_main$d,null,{default:withCtx(()=>[r.value?(openBlock(),createElementBlock("div",_hoisted_8$3,[createBaseVNode("div",_hoisted_9$3,[createBaseVNode("span",null,toDisplayString(unref(e)("settings.openai-base-url.label")),1)]),createBaseVNode("div",_hoisted_10$2,[withDirectives(createBaseVNode("input",{"onUpdate:modelValue":o[3]||(o[3]=u=>unref(t).openAiApiBaseURL=u),type:"text",placeholder:unref(e)("settings.openai-base-url.placeholder"),bg:"zinc-200 dark:zinc-800/50","w-full":"","rounded-md":"","px-2":"","py-1":"","font-mono":"","outline-none":""},null,8,_hoisted_11$2),[[vModelText,unref(t).openAiApiBaseURL]])]),createBaseVNode("div",_hoisted_12$2,[createBaseVNode("span",null,toDisplayString(unref(e)("settings.openai-api-key.label")),1)]),createBaseVNode("div",_hoisted_13$2,[withDirectives(createBaseVNode("input",{"onUpdate:modelValue":o[4]||(o[4]=u=>unref(t).openAiApiKey=u),type:"text",placeholder:unref(e)("settings.openai-api-key.placeholder"),bg:"zinc-200 dark:zinc-800/50","w-full":"","rounded-md":"","px-2":"","py-1":"","font-mono":"","outline-none":""},null,8,_hoisted_14$2),[[vModelText,unref(t).openAiApiKey]])]),createBaseVNode("div",_hoisted_15$2,[createBaseVNode("span",null,toDisplayString(unref(e)("settings.elevenlabs-api-key.label")),1)]),createBaseVNode("div",_hoisted_16$2,[withDirectives(createBaseVNode("input",{"onUpdate:modelValue":o[5]||(o[5]=u=>unref(t).elevenLabsApiKey=u),type:"text",placeholder:unref(e)("settings.elevenlabs-api-key.placeholder"),bg:"zinc-200 dark:zinc-800/50","w-full":"","rounded-md":"","px-2":"","py-1":"","font-mono":"","outline-none":""},null,8,_hoisted_17$2),[[vModelText,unref(t).elevenLabsApiKey]])]),createBaseVNode("div",_hoisted_18$2,[createBaseVNode("span",null,toDisplayString(unref(e)("settings.language")),1)]),createBaseVNode("div",_hoisted_19$2,[withDirectives(createBaseVNode("select",{"onUpdate:modelValue":o[6]||(o[6]=u=>unref(t).language=u),bg:"zinc-200 dark:zinc-800/50","w-full":"","rounded-md":"","px-2":"","py-1":"","font-mono":"","outline-none":""},o[9]||(o[9]=[createBaseVNode("option",{value:"en-US"}," English ",-1),createBaseVNode("option",{value:"zh-CN"}," 简体中文 ",-1)]),512),[[vModelSelect,unref(t).language]])]),createBaseVNode("div",_hoisted_20$2,[createBaseVNode("span",null,toDisplayString(unref(e)("settings.models")),1)]),createBaseVNode("div",_hoisted_21$2,[createBaseVNode("select",{bg:"zinc-200 dark:zinc-800/50","w-full":"","rounded-md":"","px-2":"","py-1":"","font-mono":"","outline-none":"",onChange:h},[createBaseVNode("option",_hoisted_22,toDisplayString(unref(e)("stage.select-a-model")),1),unref(t).openAiModel?(openBlock(),createElementBlock("option",{key:0,value:unref(t).openAiModel.id},toDisplayString("name"in unref(t).openAiModel?`${unref(t).openAiModel.name} (${unref(t).openAiModel.id})`:unref(t).openAiModel.id),9,_hoisted_23)):createCommentVNode("",!0),(openBlock(!0),createElementBlock(Fragment,null,renderList(a.value,u=>(openBlock(),createElementBlock("option",{key:u.id,value:u.id},toDisplayString("name"in u?`${u.name} (${u.id})`:u.id),9,_hoisted_24))),128))],32)])])):createCommentVNode("",!0)]),_:1})]),createBaseVNode("div",null,[createBaseVNode("div",_hoisted_25,[createBaseVNode("label",_hoisted_26,[withDirectives(createBaseVNode("input",{"onUpdate:modelValue":o[7]||(o[7]=u=>isRef(i)?i.value=u:null),checked:unref(i),"aria-checked":unref(i),name:"stageView",type:"checkbox",hidden:"","appearance-none":"","outline-none":""},null,8,_hoisted_27),[[vModelCheckbox,unref(i)]]),createBaseVNode("div",_hoisted_28,[createVNode(Transition,{name:"slide-away",mode:"out-in"},{default:withCtx(()=>[unref(i)?(openBlock(),createElementBlock("div",_hoisted_29)):(openBlock(),createElementBlock("div",_hoisted_30))]),_:1})])])])])]))}}),Settings=_export_sfc(_sfc_main$c,[["__scopeId","data-v-8d6cb079"]]),_hoisted_1$7={flex:"~","mb-1":"","w-full":"","gap-2":""},_sfc_main$b=defineComponent({__name:"Header",setup(n){return(e,t)=>(openBlock(),createElementBlock("header",_hoisted_1$7,[t[0]||(t[0]=createBaseVNode("div",{flex:"~ 1","w-full":"","items-center":"","gap-2":"","px-2":"","text-nowrap":"","text-2xl":""},[createBaseVNode("div",{"i-solar:cat-outline":"",text:"[#ed869d]"}),createBaseVNode("div",{"font-cute":""},[createBaseVNode("span",null,"アイリ")])],-1)),createVNode(Settings)]))}});var dist={},ortWeb_min={exports:{}};const backends={},backendsSortedByPriority=[],registerBackend=(n,e,t)=>{if(e&&typeof e.init=="function"&&typeof e.createSessionHandler=="function"){const r=backends[n];if(r===void 0)backends[n]={backend:e,priority:t};else{if(r.priority>t)return;if(r.priority===t&&r.backend!==e)throw new Error(`cannot register backend "${n}" using priority ${t}`)}if(t>=0){const i=backendsSortedByPriority.indexOf(n);i!==-1&&backendsSortedByPriority.splice(i,1);for(let a=0;a<backendsSortedByPriority.length;a++)if(backends[backendsSortedByPriority[a]].priority<=t){backendsSortedByPriority.splice(a,0,n);return}backendsSortedByPriority.push(n)}return}throw new TypeError("not a valid backend")},resolveBackend=async n=>{const e=n.length===0?backendsSortedByPriority:n,t=[];for(const r of e){const i=backends[r];if(i){if(i.initialized)return i.backend;if(i.aborted)continue;const a=!!i.initPromise;try{return a||(i.initPromise=i.backend.init()),await i.initPromise,i.initialized=!0,i.backend}catch(l){a||t.push({name:r,err:l}),i.aborted=!0}finally{delete i.initPromise}}}throw new Error(`no available backend found. ERR: ${t.map(r=>`[${r.name}] ${r.err}`).join(", ")}`)};class EnvImpl{constructor(){this.wasm={},this.webgl={},this.logLevelInternal="warning"}set logLevel(e){if(e!==void 0){if(typeof e!="string"||["verbose","info","warning","error","fatal"].indexOf(e)===-1)throw new Error(`Unsupported logging level: ${e}`);this.logLevelInternal=e}}get logLevel(){return this.logLevelInternal}}const env$1=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=n=>{let e=1;for(let t=0;t<n.length;t++){const r=n[t];if(typeof r!="number"||!Number.isSafeInteger(r))throw new TypeError(`dims[${t}] must be an integer, got: ${r}`);if(r<0)throw new RangeError(`dims[${t}] must be a non-negative integer, got: ${r}`);e*=r}return e};let Tensor$1=class jt{constructor(e,t,r){let i,a,l;if(typeof e=="string")if(i=e,l=r,e==="string"){if(!Array.isArray(t))throw new TypeError("A string tensor's data must be a string array.");a=t}else{const f=NUMERIC_TENSOR_TYPE_TO_TYPEDARRAY_MAP.get(e);if(f===void 0)throw new TypeError(`Unsupported tensor type: ${e}.`);if(Array.isArray(t))a=f.from(t);else if(t instanceof f)a=t;else throw new TypeError(`A ${i} tensor's data must be type of ${f}`)}else if(l=t,Array.isArray(e)){if(e.length===0)throw new TypeError("Tensor type cannot be inferred from an empty array.");const f=typeof e[0];if(f==="string")i="string",a=e;else if(f==="boolean")i="bool",a=Uint8Array.from(e);else throw new TypeError(`Invalid element type of data array: ${f}.`)}else{const f=NUMERIC_TENSOR_TYPEDARRAY_TO_TYPE_MAP.get(e.constructor);if(f===void 0)throw new TypeError(`Unsupported type for tensor data: ${e.constructor}.`);i=f,a=e}if(l===void 0)l=[a.length];else if(!Array.isArray(l))throw new TypeError("A tensor's dims must be a number array");const c=calculateSize(l);if(c!==a.length)throw new Error(`Tensor's size(${c}) does not match data length(${a.length}).`);this.dims=l,this.type=i,this.data=a,this.size=c}static bufferToTensor(e,t){if(e===void 0)throw new Error("Image buffer must be defined");if(t.height===void 0||t.width===void 0)throw new Error("Image height and width must be defined");const{height:r,width:i}=t,a=t.norm;let l,c;a===void 0||a.mean===void 0?l=255:l=a.mean,a===void 0||a.bias===void 0?c=0:c=a.bias;const f=t.bitmapFormat!==void 0?t.bitmapFormat:"RGBA",d=t.tensorFormat!==void 0&&t.tensorFormat!==void 0?t.tensorFormat:"RGB",h=r*i,s=d==="RGBA"?new Float32Array(h*4):new Float32Array(h*3);let o=4,u=0,m=1,g=2,y=3,v=0,_=h,b=h*2,w=-1;f==="RGB"&&(o=3,u=0,m=1,g=2,y=-1),d==="RGBA"?w=h*3:d==="RBG"?(v=0,b=h,_=h*2):d==="BGR"&&(b=0,_=h,v=h*2);for(let T=0;T<h;T++,u+=o,g+=o,m+=o,y+=o)s[v++]=(e[u]+c)/l,s[_++]=(e[m]+c)/l,s[b++]=(e[g]+c)/l,w!==-1&&y!==-1&&(s[w++]=(e[y]+c)/l);return d==="RGBA"?new jt("float32",s,[1,4,r,i]):new jt("float32",s,[1,3,r,i])}static async fromImage(e,t){const r=typeof HTMLImageElement<"u"&&e instanceof HTMLImageElement,i=typeof ImageData<"u"&&e instanceof ImageData,a=typeof ImageBitmap<"u"&&e instanceof ImageBitmap,l=typeof String<"u"&&(e instanceof String||typeof e=="string");let c,f={};if(r){const d=document.createElement("canvas"),h=d.getContext("2d");if(h!=null){let s=e.naturalHeight,o=e.naturalWidth;if(t!==void 0&&t.resizedHeight!==void 0&&t.resizedWidth!==void 0&&(s=t.resizedHeight,o=t.resizedWidth),t!==void 0){if(f=t,t.tensorFormat!==void 0)throw new Error("Image input config format must be RGBA for HTMLImageElement");if(f.tensorFormat="RGBA",t.height!==void 0&&t.height!==s)throw new Error("Image input config height doesn't match HTMLImageElement height");if(f.height=s,t.width!==void 0&&t.width!==o)throw new Error("Image input config width doesn't match HTMLImageElement width");f.width=o}else f.tensorFormat="RGBA",f.height=s,f.width=o;d.width=o,d.height=s,h.drawImage(e,0,0,o,s),c=h.getImageData(0,0,o,s).data}else throw new Error("Can not access image data")}else if(i){const d="RGBA";let h,s;if(t!==void 0&&t.resizedWidth!==void 0&&t.resizedHeight!==void 0?(h=t.resizedHeight,s=t.resizedWidth):(h=e.height,s=e.width),t!==void 0){if(f=t,t.bitmapFormat!==void 0&&t.bitmapFormat!==d)throw new Error("Image input config format must be RGBA for ImageData");f.bitmapFormat="RGBA"}else f.bitmapFormat="RGBA";if(f.height=h,f.width=s,t!==void 0){const o=document.createElement("canvas");o.width=s,o.height=h;const u=o.getContext("2d");if(u!=null)u.putImageData(e,0,0),c=u.getImageData(0,0,s,h).data;else throw new Error("Can not access image data")}else c=e.data}else if(a){if(t===void 0)throw new Error("Please provide image config with format for Imagebitmap");if(t.bitmapFormat!==void 0)throw new Error("Image input config format must be defined for ImageBitmap");const d=document.createElement("canvas").getContext("2d");if(d!=null){const h=e.height,s=e.width;if(d.drawImage(e,0,0,s,h),c=d.getImageData(0,0,s,h).data,t!==void 0){if(t.height!==void 0&&t.height!==h)throw new Error("Image input config height doesn't match ImageBitmap height");if(f.height=h,t.width!==void 0&&t.width!==s)throw new Error("Image input config width doesn't match ImageBitmap width");f.width=s}else f.height=h,f.width=s;return jt.bufferToTensor(c,f)}else throw new Error("Can not access image data")}else{if(l)return new Promise((d,h)=>{const s=document.createElement("canvas"),o=s.getContext("2d");if(!e||!o)return h();const u=new Image;u.crossOrigin="Anonymous",u.src=e,u.onload=()=>{s.width=u.width,s.height=u.height,o.drawImage(u,0,0,s.width,s.height);const m=o.getImageData(0,0,s.width,s.height);if(t!==void 0){if(t.height!==void 0&&t.height!==s.height)throw new Error("Image input config height doesn't match ImageBitmap height");if(f.height=s.height,t.width!==void 0&&t.width!==s.width)throw new Error("Image input config width doesn't match ImageBitmap width");f.width=s.width}else f.height=s.height,f.width=s.width;d(jt.bufferToTensor(m.data,f))}});throw new Error("Input data provided is not supported - aborted tensor creation")}if(c!==void 0)return jt.bufferToTensor(c,f);throw new Error("Input data provided is not supported - aborted tensor creation")}toImageData(e){var t,r;const i=document.createElement("canvas").getContext("2d");let a;if(i!=null){const l=this.dims[3],c=this.dims[2],f=this.dims[1],d=e!==void 0&&e.format!==void 0?e.format:"RGB",h=e!==void 0&&((t=e.norm)===null||t===void 0?void 0:t.mean)!==void 0?e.norm.mean:255,s=e!==void 0&&((r=e.norm)===null||r===void 0?void 0:r.bias)!==void 0?e.norm.bias:0,o=c*l;if(e!==void 0){if(e.height!==void 0&&e.height!==c)throw new Error("Image output config height doesn't match tensor height");if(e.width!==void 0&&e.width!==l)throw new Error("Image output config width doesn't match tensor width");if(e.format!==void 0&&f===4&&e.format!=="RGBA"||f===3&&e.format!=="RGB"&&e.format!=="BGR")throw new Error("Tensor format doesn't match input tensor dims")}const u=4;let m=0,g=1,y=2,v=3,_=0,b=o,w=o*2,x=-1;d==="RGBA"?(_=0,b=o,w=o*2,x=o*3):d==="RGB"?(_=0,b=o,w=o*2):d==="RBG"&&(_=0,w=o,b=o*2),a=i.createImageData(l,c);for(let T=0;T<c*l;m+=u,g+=u,y+=u,v+=u,T++)a.data[m]=(this.data[_++]-s)*h,a.data[g]=(this.data[b++]-s)*h,a.data[y]=(this.data[w++]-s)*h,a.data[v]=x===-1?255:(this.data[x++]-s)*h}else throw new Error("Can not access image data");return a}reshape(e){return new jt(this.type,this.data,e)}};const Tensor=Tensor$1;let InferenceSession$1=class kn{constructor(e){this.handler=e}async run(e,t,r){const i={};let a={};if(typeof e!="object"||e===null||e instanceof Tensor||Array.isArray(e))throw new TypeError("'feeds' must be an object that use input names as keys and OnnxValue as corresponding values.");let l=!0;if(typeof t=="object"){if(t===null)throw new TypeError("Unexpected argument[1]: cannot be null.");if(t instanceof Tensor)throw new TypeError("'fetches' cannot be a Tensor");if(Array.isArray(t)){if(t.length===0)throw new TypeError("'fetches' cannot be an empty array.");l=!1;for(const d of t){if(typeof d!="string")throw new TypeError("'fetches' must be a string array or an object.");if(this.outputNames.indexOf(d)===-1)throw new RangeError(`'fetches' contains invalid output name: ${d}.`);i[d]=null}if(typeof r=="object"&&r!==null)a=r;else if(typeof r<"u")throw new TypeError("'options' must be an object.")}else{let d=!1;const h=Object.getOwnPropertyNames(t);for(const s of this.outputNames)if(h.indexOf(s)!==-1){const o=t[s];(o===null||o instanceof Tensor)&&(d=!0,l=!1,i[s]=o)}if(d){if(typeof r=="object"&&r!==null)a=r;else if(typeof r<"u")throw new TypeError("'options' must be an object.")}else a=t}}else if(typeof t<"u")throw new TypeError("Unexpected argument[1]: must be 'fetches' or 'options'.");for(const d of this.inputNames)if(typeof e[d]>"u")throw new Error(`input '${d}' is missing in 'feeds'.`);if(l)for(const d of this.outputNames)i[d]=null;const c=await this.handler.run(e,i,a),f={};for(const d in c)Object.hasOwnProperty.call(c,d)&&(f[d]=new Tensor(c[d].type,c[d].data,c[d].dims));return f}static async create(e,t,r,i){let a,l={};if(typeof e=="string"){if(a=e,typeof t=="object"&&t!==null)l=t;else if(typeof t<"u")throw new TypeError("'options' must be an object.")}else if(e instanceof Uint8Array){if(a=e,typeof t=="object"&&t!==null)l=t;else if(typeof t<"u")throw new TypeError("'options' must be an object.")}else if(e instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer){const s=e;let o=0,u=e.byteLength;if(typeof t=="object"&&t!==null)l=t;else if(typeof t=="number"){if(o=t,!Number.isSafeInteger(o))throw new RangeError("'byteOffset' must be an integer.");if(o<0||o>=s.byteLength)throw new RangeError(`'byteOffset' is out of range [0, ${s.byteLength}).`);if(u=e.byteLength-o,typeof r=="number"){if(u=r,!Number.isSafeInteger(u))throw new RangeError("'byteLength' must be an integer.");if(u<=0||o+u>s.byteLength)throw new RangeError(`'byteLength' is out of range (0, ${s.byteLength-o}].`);if(typeof i=="object"&&i!==null)l=i;else if(typeof i<"u")throw new TypeError("'options' must be an object.")}else if(typeof r<"u")throw new TypeError("'byteLength' must be a number.")}else if(typeof t<"u")throw new TypeError("'options' must be an object.");a=new Uint8Array(s,o,u)}else throw new TypeError("Unexpected argument[0]: must be 'path' or 'buffer'.");const f=(l.executionProviders||[]).map(s=>typeof s=="string"?s:s.name),h=await(await resolveBackend(f)).createSessionHandler(a,l);return new kn(h)}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$1=Object.freeze(Object.defineProperty({__proto__:null,InferenceSession,Tensor,env:env$1,registerBackend},Symbol.toStringTag,{value:"Module"})),require$$0$1=getAugmentedNamespace(lib$1);/*!
|
4 |
* ONNX Runtime Web v1.14.0
|
assets/{index-DlfuL6Nw.js → index-DNIDWMUI.js}
RENAMED
@@ -1,4 +1,4 @@
|
|
1 |
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/default-
|
2 |
(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))i(r);new MutationObserver(r=>{for(const s of r)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&i(o)}).observe(document,{childList:!0,subtree:!0});function t(r){const s={};return r.integrity&&(s.integrity=r.integrity),r.referrerPolicy&&(s.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?s.credentials="include":r.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function i(r){if(r.ep)return;r.ep=!0;const s=t(r);fetch(r.href,s)}})();/**
|
3 |
* @vue/shared v3.5.13
|
4 |
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
@@ -3851,11 +3851,11 @@ void main() {
|
|
3851 |
* pinia v2.3.0
|
3852 |
* (c) 2024 Eduardo San Martin Morote
|
3853 |
* @license MIT
|
3854 |
-
*/let vE;const Ah=n=>vE=n,yE=Symbol();function Yp(n){return n&&typeof n=="object"&&Object.prototype.toString.call(n)==="[object Object]"&&typeof n.toJSON!="function"}var Ka;(function(n){n.direct="direct",n.patchObject="patch object",n.patchFunction="patch function"})(Ka||(Ka={}));function QF(){const n=pm(!0),e=n.run(()=>Ge({}));let t=[],i=[];const r=Mm({install(s){Ah(r),r._a=s,s.provide(yE,r),s.config.globalProperties.$pinia=r,i.forEach(o=>t.push(o)),i=[]},use(s){return!this._a&&!sN?i.push(s):t.push(s),this},_p:t,_a:null,_e:n,_s:new Map,state:e});return r}const xE=()=>{};function Hv(n,e,t,i=xE){n.push(e);const r=()=>{const s=n.indexOf(e);s>-1&&(n.splice(s,1),i())};return!t&&If()&&mm(r),r}function So(n,...e){n.slice().forEach(t=>{t(...e)})}const eB=n=>n(),Gv=Symbol(),qd=Symbol();function jp(n,e){n instanceof Map&&e instanceof Map?e.forEach((t,i)=>n.set(i,t)):n instanceof Set&&e instanceof Set&&e.forEach(n.add,n);for(const t in e){if(!e.hasOwnProperty(t))continue;const i=e[t],r=n[t];Yp(r)&&Yp(i)&&n.hasOwnProperty(t)&&!Et(i)&&!ur(i)?n[t]=jp(r,i):n[t]=i}return n}const tB=Symbol();function nB(n){return!Yp(n)||!n.hasOwnProperty(tB)}const{assign:Lr}=Object;function iB(n){return!!(Et(n)&&n.effect)}function rB(n,e,t,i){const{state:r,actions:s,getters:o}=e,a=t.state.value[n];let l;function c(){a||(t.state.value[n]=r?r():{});const u=fx(t.state.value[n]);return Lr(u,s,Object.keys(o||{}).reduce((f,h)=>(f[h]=Mm(it(()=>{Ah(t);const d=t._s.get(n);return o[h].call(d,d)})),f),{}))}return l=bE(n,c,e,t,i,!0),l}function bE(n,e,t={},i,r,s){let o;const a=Lr({actions:{}},t),l={deep:!0};let c,u,f=[],h=[],d;const m=i.state.value[n];!s&&!m&&(i.state.value[n]={}),Ge({});let _;function g(I){let b;c=u=!1,typeof I=="function"?(I(i.state.value[n]),b={type:Ka.patchFunction,storeId:n,events:d}):(jp(i.state.value[n],I),b={type:Ka.patchObject,payload:I,storeId:n,events:d});const M=_=Symbol();ta().then(()=>{_===M&&(c=!0)}),u=!0,So(f,b,i.state.value[n])}const p=s?function(){const{state:b}=t,M=b?b():{};this.$patch(U=>{Lr(U,M)})}:xE;function y(){o.stop(),f=[],h=[],i._s.delete(n)}const x=(I,b="")=>{if(Gv in I)return I[qd]=b,I;const M=function(){Ah(i);const U=Array.from(arguments),z=[],H=[];function K(ie){z.push(ie)}function ee(ie){H.push(ie)}So(h,{args:U,name:M[qd],store:S,after:K,onError:ee});let J;try{J=I.apply(this&&this.$id===n?this:S,U)}catch(ie){throw So(H,ie),ie}return J instanceof Promise?J.then(ie=>(So(z,ie),ie)).catch(ie=>(So(H,ie),Promise.reject(ie))):(So(z,J),J)};return M[Gv]=!0,M[qd]=b,M},v={_p:i,$id:n,$onAction:Hv.bind(null,h),$patch:g,$reset:p,$subscribe(I,b={}){const M=Hv(f,I,b.detached,()=>U()),U=o.run(()=>ft(()=>i.state.value[n],z=>{(b.flush==="sync"?u:c)&&I({storeId:n,type:Ka.direct,events:d},z)},Lr({},l,b)));return M},$dispose:y},S=ki(v);i._s.set(n,S);const A=(i._a&&i._a.runWithContext||eB)(()=>i._e.run(()=>(o=pm()).run(()=>e({action:x}))));for(const I in A){const b=A[I];if(Et(b)&&!iB(b)||ur(b))s||(m&&nB(b)&&(Et(b)?b.value=m[I]:jp(b,m[I])),i.state.value[n][I]=b);else if(typeof b=="function"){const M=x(b,I);A[I]=M,a.actions[I]=b}}return Lr(S,A),Lr(nt(S),A),Object.defineProperty(S,"$state",{get:()=>i.state.value[n],set:I=>{g(b=>{Lr(b,I)})}}),i._p.forEach(I=>{Lr(S,o.run(()=>I({store:S,app:i._a,pinia:i,options:a})))}),m&&s&&t.hydrate&&t.hydrate(S.$state,m),c=!0,u=!0,S}/*! #__NO_SIDE_EFFECTS__ */function VV(n,e,t){let i,r;const s=typeof e=="function";typeof n=="string"?(i=n,r=s?t:e):(r=n,i=n.id);function o(a,l){const c=xw();return a=a||(c?Vn(yE,null):null),a&&Ah(a),a=vE,a._s.has(i)||(s?bE(i,e,r,a):rB(i,r,a)),a._s.get(i)}return o.$id=i,o}function HV(n){{const e=nt(n),t={};for(const i in e){const r=e[i];r.effect?t[i]=it({get:()=>n[i],set(s){n[i]=s}}):(Et(r)||ur(r))&&(t[i]=HT(n,i))}return t}}const sB="modulepreload",oB=function(n){return"/"+n},Wv={},Qi=function(e,t,i){let r=Promise.resolve();if(t&&t.length>0){document.getElementsByTagName("link");const o=document.querySelector("meta[property=csp-nonce]"),a=(o==null?void 0:o.nonce)||(o==null?void 0:o.getAttribute("nonce"));r=Promise.allSettled(t.map(l=>{if(l=oB(l),l in Wv)return;Wv[l]=!0;const c=l.endsWith(".css"),u=c?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${l}"]${u}`))return;const f=document.createElement("link");if(f.rel=c?"stylesheet":sB,c||(f.as="script"),f.crossOrigin="",f.href=l,a&&f.setAttribute("nonce",a),document.head.appendChild(f),c)return new Promise((h,d)=>{f.addEventListener("load",h),f.addEventListener("error",()=>d(new Error(`Unable to preload CSS for ${l}`)))})}))}function s(o){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=o,window.dispatchEvent(a),!a.defaultPrevented)throw o}return r.then(o=>{for(const a of o||[])a.status==="rejected"&&s(a.reason);return e().catch(s)})},aB=n=>{const e={};Object.entries(Object.assign({"/src/layouts/default.vue":()=>Qi(()=>import("./default-
|
3855 |
* vue-router v4.5.0
|
3856 |
* (c) 2024 Eduardo San Martin Morote
|
3857 |
* @license MIT
|
3858 |
-
*/const wo=typeof document<"u";function ME(n){return typeof n=="object"||"displayName"in n||"props"in n||"__vccOpts"in n}function lB(n){return n.__esModule||n[Symbol.toStringTag]==="Module"||n.default&&ME(n.default)}const gt=Object.assign;function Yd(n,e){const t={};for(const i in e){const r=e[i];t[i]=_i(r)?r.map(n):n(r)}return t}const Za=()=>{},_i=Array.isArray,SE=/#/g,cB=/&/g,uB=/\//g,fB=/=/g,hB=/\?/g,EE=/\+/g,dB=/%5B/g,pB=/%5D/g,TE=/%5E/g,mB=/%60/g,wE=/%7B/g,gB=/%7C/g,AE=/%7D/g,_B=/%20/g;function Ug(n){return encodeURI(""+n).replace(gB,"|").replace(dB,"[").replace(pB,"]")}function vB(n){return Ug(n).replace(wE,"{").replace(AE,"}").replace(TE,"^")}function Kp(n){return Ug(n).replace(EE,"%2B").replace(_B,"+").replace(SE,"%23").replace(cB,"%26").replace(mB,"`").replace(wE,"{").replace(AE,"}").replace(TE,"^")}function yB(n){return Kp(n).replace(fB,"%3D")}function xB(n){return Ug(n).replace(SE,"%23").replace(hB,"%3F")}function bB(n){return n==null?"":xB(n).replace(uB,"%2F")}function Il(n){try{return decodeURIComponent(""+n)}catch{}return""+n}const MB=/\/$/,SB=n=>n.replace(MB,"");function jd(n,e,t="/"){let i,r={},s="",o="";const a=e.indexOf("#");let l=e.indexOf("?");return a<l&&a>=0&&(l=-1),l>-1&&(i=e.slice(0,l),s=e.slice(l+1,a>-1?a:e.length),r=n(s)),a>-1&&(i=i||e.slice(0,a),o=e.slice(a,e.length)),i=AB(i??e,t),{fullPath:i+(s&&"?")+s+o,path:i,query:r,hash:Il(o)}}function EB(n,e){const t=e.query?n(e.query):"";return e.path+(t&&"?")+t+(e.hash||"")}function Xv(n,e){return!e||!n.toLowerCase().startsWith(e.toLowerCase())?n:n.slice(e.length)||"/"}function TB(n,e,t){const i=e.matched.length-1,r=t.matched.length-1;return i>-1&&i===r&&Ko(e.matched[i],t.matched[r])&&CE(e.params,t.params)&&n(e.query)===n(t.query)&&e.hash===t.hash}function Ko(n,e){return(n.aliasOf||n)===(e.aliasOf||e)}function CE(n,e){if(Object.keys(n).length!==Object.keys(e).length)return!1;for(const t in n)if(!wB(n[t],e[t]))return!1;return!0}function wB(n,e){return _i(n)?$v(n,e):_i(e)?$v(e,n):n===e}function $v(n,e){return _i(e)?n.length===e.length&&n.every((t,i)=>t===e[i]):n.length===1&&n[0]===e}function AB(n,e){if(n.startsWith("/"))return n;if(!n)return e;const t=e.split("/"),i=n.split("/"),r=i[i.length-1];(r===".."||r===".")&&i.push("");let s=t.length-1,o,a;for(o=0;o<i.length;o++)if(a=i[o],a!==".")if(a==="..")s>1&&s--;else break;return t.slice(0,s).join("/")+"/"+i.slice(o).join("/")}const Pr={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};var Ll;(function(n){n.pop="pop",n.push="push"})(Ll||(Ll={}));var Ja;(function(n){n.back="back",n.forward="forward",n.unknown=""})(Ja||(Ja={}));function CB(n){if(!n)if(wo){const e=document.querySelector("base");n=e&&e.getAttribute("href")||"/",n=n.replace(/^\w+:\/\/[^\/]+/,"")}else n="/";return n[0]!=="/"&&n[0]!=="#"&&(n="/"+n),SB(n)}const RB=/^[^#]+#/;function PB(n,e){return n.replace(RB,"#")+e}function IB(n,e){const t=document.documentElement.getBoundingClientRect(),i=n.getBoundingClientRect();return{behavior:e.behavior,left:i.left-t.left-(e.left||0),top:i.top-t.top-(e.top||0)}}const Ch=()=>({left:window.scrollX,top:window.scrollY});function LB(n){let e;if("el"in n){const t=n.el,i=typeof t=="string"&&t.startsWith("#"),r=typeof t=="string"?i?document.getElementById(t.slice(1)):document.querySelector(t):t;if(!r)return;e=IB(r,n)}else e=n;"scrollBehavior"in document.documentElement.style?window.scrollTo(e):window.scrollTo(e.left!=null?e.left:window.scrollX,e.top!=null?e.top:window.scrollY)}function qv(n,e){return(history.state?history.state.position-e:-1)+n}const Zp=new Map;function DB(n,e){Zp.set(n,e)}function OB(n){const e=Zp.get(n);return Zp.delete(n),e}let NB=()=>location.protocol+"//"+location.host;function RE(n,e){const{pathname:t,search:i,hash:r}=e,s=n.indexOf("#");if(s>-1){let a=r.includes(n.slice(s))?n.slice(s).length:1,l=r.slice(a);return l[0]!=="/"&&(l="/"+l),Xv(l,"")}return Xv(t,n)+i+r}function UB(n,e,t,i){let r=[],s=[],o=null;const a=({state:h})=>{const d=RE(n,location),m=t.value,_=e.value;let g=0;if(h){if(t.value=d,e.value=h,o&&o===m){o=null;return}g=_?h.position-_.position:0}else i(d);r.forEach(p=>{p(t.value,m,{delta:g,type:Ll.pop,direction:g?g>0?Ja.forward:Ja.back:Ja.unknown})})};function l(){o=t.value}function c(h){r.push(h);const d=()=>{const m=r.indexOf(h);m>-1&&r.splice(m,1)};return s.push(d),d}function u(){const{history:h}=window;h.state&&h.replaceState(gt({},h.state,{scroll:Ch()}),"")}function f(){for(const h of s)h();s=[],window.removeEventListener("popstate",a),window.removeEventListener("beforeunload",u)}return window.addEventListener("popstate",a),window.addEventListener("beforeunload",u,{passive:!0}),{pauseListeners:l,listen:c,destroy:f}}function Yv(n,e,t,i=!1,r=!1){return{back:n,current:e,forward:t,replaced:i,position:window.history.length,scroll:r?Ch():null}}function FB(n){const{history:e,location:t}=window,i={value:RE(n,t)},r={value:e.state};r.value||s(i.value,{back:null,current:i.value,forward:null,position:e.length-1,replaced:!0,scroll:null},!0);function s(l,c,u){const f=n.indexOf("#"),h=f>-1?(t.host&&document.querySelector("base")?n:n.slice(f))+l:NB()+n+l;try{e[u?"replaceState":"pushState"](c,"",h),r.value=c}catch(d){console.error(d),t[u?"replace":"assign"](h)}}function o(l,c){const u=gt({},e.state,Yv(r.value.back,l,r.value.forward,!0),c,{position:r.value.position});s(l,u,!0),i.value=l}function a(l,c){const u=gt({},r.value,e.state,{forward:l,scroll:Ch()});s(u.current,u,!0);const f=gt({},Yv(i.value,l,null),{position:u.position+1},c);s(l,f,!1),i.value=l}return{location:i,state:r,push:a,replace:o}}function BB(n){n=CB(n);const e=FB(n),t=UB(n,e.state,e.location,e.replace);function i(s,o=!0){o||t.pauseListeners(),history.go(s)}const r=gt({location:"",base:n,go:i,createHref:PB.bind(null,n)},e,t);return Object.defineProperty(r,"location",{enumerable:!0,get:()=>e.location.value}),Object.defineProperty(r,"state",{enumerable:!0,get:()=>e.state.value}),r}function kB(n){return typeof n=="string"||n&&typeof n=="object"}function PE(n){return typeof n=="string"||typeof n=="symbol"}const IE=Symbol("");var jv;(function(n){n[n.aborted=4]="aborted",n[n.cancelled=8]="cancelled",n[n.duplicated=16]="duplicated"})(jv||(jv={}));function Zo(n,e){return gt(new Error,{type:n,[IE]:!0},e)}function Zi(n,e){return n instanceof Error&&IE in n&&(e==null||!!(n.type&e))}const Kv="[^/]+?",zB={sensitive:!1,strict:!1,start:!0,end:!0},VB=/[.+*?^${}()[\]/\\]/g;function HB(n,e){const t=gt({},zB,e),i=[];let r=t.start?"^":"";const s=[];for(const c of n){const u=c.length?[]:[90];t.strict&&!c.length&&(r+="/");for(let f=0;f<c.length;f++){const h=c[f];let d=40+(t.sensitive?.25:0);if(h.type===0)f||(r+="/"),r+=h.value.replace(VB,"\\$&"),d+=40;else if(h.type===1){const{value:m,repeatable:_,optional:g,regexp:p}=h;s.push({name:m,repeatable:_,optional:g});const y=p||Kv;if(y!==Kv){d+=10;try{new RegExp(`(${y})`)}catch(v){throw new Error(`Invalid custom RegExp for param "${m}" (${y}): `+v.message)}}let x=_?`((?:${y})(?:/(?:${y}))*)`:`(${y})`;f||(x=g&&c.length<2?`(?:/${x})`:"/"+x),g&&(x+="?"),r+=x,d+=20,g&&(d+=-8),_&&(d+=-20),y===".*"&&(d+=-50)}u.push(d)}i.push(u)}if(t.strict&&t.end){const c=i.length-1;i[c][i[c].length-1]+=.7000000000000001}t.strict||(r+="/?"),t.end?r+="$":t.strict&&!r.endsWith("/")&&(r+="(?:/|$)");const o=new RegExp(r,t.sensitive?"":"i");function a(c){const u=c.match(o),f={};if(!u)return null;for(let h=1;h<u.length;h++){const d=u[h]||"",m=s[h-1];f[m.name]=d&&m.repeatable?d.split("/"):d}return f}function l(c){let u="",f=!1;for(const h of n){(!f||!u.endsWith("/"))&&(u+="/"),f=!1;for(const d of h)if(d.type===0)u+=d.value;else if(d.type===1){const{value:m,repeatable:_,optional:g}=d,p=m in c?c[m]:"";if(_i(p)&&!_)throw new Error(`Provided param "${m}" is an array but it is not repeatable (* or + modifiers)`);const y=_i(p)?p.join("/"):p;if(!y)if(g)h.length<2&&(u.endsWith("/")?u=u.slice(0,-1):f=!0);else throw new Error(`Missing required param "${m}"`);u+=y}}return u||"/"}return{re:o,score:i,keys:s,parse:a,stringify:l}}function GB(n,e){let t=0;for(;t<n.length&&t<e.length;){const i=e[t]-n[t];if(i)return i;t++}return n.length<e.length?n.length===1&&n[0]===80?-1:1:n.length>e.length?e.length===1&&e[0]===80?1:-1:0}function LE(n,e){let t=0;const i=n.score,r=e.score;for(;t<i.length&&t<r.length;){const s=GB(i[t],r[t]);if(s)return s;t++}if(Math.abs(r.length-i.length)===1){if(Zv(i))return 1;if(Zv(r))return-1}return r.length-i.length}function Zv(n){const e=n[n.length-1];return n.length>0&&e[e.length-1]<0}const WB={type:0,value:""},XB=/[a-zA-Z0-9_]/;function $B(n){if(!n)return[[]];if(n==="/")return[[WB]];if(!n.startsWith("/"))throw new Error(`Invalid path "${n}"`);function e(d){throw new Error(`ERR (${t})/"${c}": ${d}`)}let t=0,i=t;const r=[];let s;function o(){s&&r.push(s),s=[]}let a=0,l,c="",u="";function f(){c&&(t===0?s.push({type:0,value:c}):t===1||t===2||t===3?(s.length>1&&(l==="*"||l==="+")&&e(`A repeatable param (${c}) must be alone in its segment. eg: '/:ids+.`),s.push({type:1,value:c,regexp:u,repeatable:l==="*"||l==="+",optional:l==="*"||l==="?"})):e("Invalid state to consume buffer"),c="")}function h(){c+=l}for(;a<n.length;){if(l=n[a++],l==="\\"&&t!==2){i=t,t=4;continue}switch(t){case 0:l==="/"?(c&&f(),o()):l===":"?(f(),t=1):h();break;case 4:h(),t=i;break;case 1:l==="("?t=2:XB.test(l)?h():(f(),t=0,l!=="*"&&l!=="?"&&l!=="+"&&a--);break;case 2:l===")"?u[u.length-1]=="\\"?u=u.slice(0,-1)+l:t=3:u+=l;break;case 3:f(),t=0,l!=="*"&&l!=="?"&&l!=="+"&&a--,u="";break;default:e("Unknown state");break}}return t===2&&e(`Unfinished custom RegExp for param "${c}"`),f(),o(),r}function qB(n,e,t){const i=HB($B(n.path),t),r=gt(i,{record:n,parent:e,children:[],alias:[]});return e&&!r.record.aliasOf==!e.record.aliasOf&&e.children.push(r),r}function YB(n,e){const t=[],i=new Map;e=ty({strict:!1,end:!0,sensitive:!1},e);function r(f){return i.get(f)}function s(f,h,d){const m=!d,_=Qv(f);_.aliasOf=d&&d.record;const g=ty(e,f),p=[_];if("alias"in f){const v=typeof f.alias=="string"?[f.alias]:f.alias;for(const S of v)p.push(Qv(gt({},_,{components:d?d.record.components:_.components,path:S,aliasOf:d?d.record:_})))}let y,x;for(const v of p){const{path:S}=v;if(h&&S[0]!=="/"){const E=h.record.path,A=E[E.length-1]==="/"?"":"/";v.path=h.record.path+(S&&A+S)}if(y=qB(v,h,g),d?d.alias.push(y):(x=x||y,x!==y&&x.alias.push(y),m&&f.name&&!ey(y)&&o(f.name)),DE(y)&&l(y),_.children){const E=_.children;for(let A=0;A<E.length;A++)s(E[A],y,d&&d.children[A])}d=d||y}return x?()=>{o(x)}:Za}function o(f){if(PE(f)){const h=i.get(f);h&&(i.delete(f),t.splice(t.indexOf(h),1),h.children.forEach(o),h.alias.forEach(o))}else{const h=t.indexOf(f);h>-1&&(t.splice(h,1),f.record.name&&i.delete(f.record.name),f.children.forEach(o),f.alias.forEach(o))}}function a(){return t}function l(f){const h=ZB(f,t);t.splice(h,0,f),f.record.name&&!ey(f)&&i.set(f.record.name,f)}function c(f,h){let d,m={},_,g;if("name"in f&&f.name){if(d=i.get(f.name),!d)throw Zo(1,{location:f});g=d.record.name,m=gt(Jv(h.params,d.keys.filter(x=>!x.optional).concat(d.parent?d.parent.keys.filter(x=>x.optional):[]).map(x=>x.name)),f.params&&Jv(f.params,d.keys.map(x=>x.name))),_=d.stringify(m)}else if(f.path!=null)_=f.path,d=t.find(x=>x.re.test(_)),d&&(m=d.parse(_),g=d.record.name);else{if(d=h.name?i.get(h.name):t.find(x=>x.re.test(h.path)),!d)throw Zo(1,{location:f,currentLocation:h});g=d.record.name,m=gt({},h.params,f.params),_=d.stringify(m)}const p=[];let y=d;for(;y;)p.unshift(y.record),y=y.parent;return{name:g,path:_,params:m,matched:p,meta:KB(p)}}n.forEach(f=>s(f));function u(){t.length=0,i.clear()}return{addRoute:s,resolve:c,removeRoute:o,clearRoutes:u,getRoutes:a,getRecordMatcher:r}}function Jv(n,e){const t={};for(const i of e)i in n&&(t[i]=n[i]);return t}function Qv(n){const e={path:n.path,redirect:n.redirect,name:n.name,meta:n.meta||{},aliasOf:n.aliasOf,beforeEnter:n.beforeEnter,props:jB(n),children:n.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in n?n.components||null:n.component&&{default:n.component}};return Object.defineProperty(e,"mods",{value:{}}),e}function jB(n){const e={},t=n.props||!1;if("component"in n)e.default=t;else for(const i in n.components)e[i]=typeof t=="object"?t[i]:t;return e}function ey(n){for(;n;){if(n.record.aliasOf)return!0;n=n.parent}return!1}function KB(n){return n.reduce((e,t)=>gt(e,t.meta),{})}function ty(n,e){const t={};for(const i in n)t[i]=i in e?e[i]:n[i];return t}function ZB(n,e){let t=0,i=e.length;for(;t!==i;){const s=t+i>>1;LE(n,e[s])<0?i=s:t=s+1}const r=JB(n);return r&&(i=e.lastIndexOf(r,i-1)),i}function JB(n){let e=n;for(;e=e.parent;)if(DE(e)&&LE(n,e)===0)return e}function DE({record:n}){return!!(n.name||n.components&&Object.keys(n.components).length||n.redirect)}function QB(n){const e={};if(n===""||n==="?")return e;const i=(n[0]==="?"?n.slice(1):n).split("&");for(let r=0;r<i.length;++r){const s=i[r].replace(EE," "),o=s.indexOf("="),a=Il(o<0?s:s.slice(0,o)),l=o<0?null:Il(s.slice(o+1));if(a in e){let c=e[a];_i(c)||(c=e[a]=[c]),c.push(l)}else e[a]=l}return e}function ny(n){let e="";for(let t in n){const i=n[t];if(t=yB(t),i==null){i!==void 0&&(e+=(e.length?"&":"")+t);continue}(_i(i)?i.map(s=>s&&Kp(s)):[i&&Kp(i)]).forEach(s=>{s!==void 0&&(e+=(e.length?"&":"")+t,s!=null&&(e+="="+s))})}return e}function ek(n){const e={};for(const t in n){const i=n[t];i!==void 0&&(e[t]=_i(i)?i.map(r=>r==null?null:""+r):i==null?i:""+i)}return e}const tk=Symbol(""),iy=Symbol(""),Fg=Symbol(""),OE=Symbol(""),Jp=Symbol("");function Ta(){let n=[];function e(i){return n.push(i),()=>{const r=n.indexOf(i);r>-1&&n.splice(r,1)}}function t(){n=[]}return{add:e,list:()=>n.slice(),reset:t}}function Fr(n,e,t,i,r,s=o=>o()){const o=i&&(i.enterCallbacks[r]=i.enterCallbacks[r]||[]);return()=>new Promise((a,l)=>{const c=h=>{h===!1?l(Zo(4,{from:t,to:e})):h instanceof Error?l(h):kB(h)?l(Zo(2,{from:e,to:h})):(o&&i.enterCallbacks[r]===o&&typeof h=="function"&&o.push(h),a())},u=s(()=>n.call(i&&i.instances[r],e,t,c));let f=Promise.resolve(u);n.length<3&&(f=f.then(c)),f.catch(h=>l(h))})}function Kd(n,e,t,i,r=s=>s()){const s=[];for(const o of n)for(const a in o.components){let l=o.components[a];if(!(e!=="beforeRouteEnter"&&!o.instances[a]))if(ME(l)){const u=(l.__vccOpts||l)[e];u&&s.push(Fr(u,t,i,o,a,r))}else{let c=l();s.push(()=>c.then(u=>{if(!u)throw new Error(`Couldn't resolve component "${a}" at "${o.path}"`);const f=lB(u)?u.default:u;o.mods[a]=u,o.components[a]=f;const d=(f.__vccOpts||f)[e];return d&&Fr(d,t,i,o,a,r)()}))}}return s}function ry(n){const e=Vn(Fg),t=Vn(OE),i=it(()=>{const l=Ft(n.to);return e.resolve(l)}),r=it(()=>{const{matched:l}=i.value,{length:c}=l,u=l[c-1],f=t.matched;if(!u||!f.length)return-1;const h=f.findIndex(Ko.bind(null,u));if(h>-1)return h;const d=sy(l[c-2]);return c>1&&sy(u)===d&&f[f.length-1].path!==d?f.findIndex(Ko.bind(null,l[c-2])):h}),s=it(()=>r.value>-1&&ok(t.params,i.value.params)),o=it(()=>r.value>-1&&r.value===t.matched.length-1&&CE(t.params,i.value.params));function a(l={}){if(sk(l)){const c=e[Ft(n.replace)?"replace":"push"](Ft(n.to)).catch(Za);return n.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>c),c}return Promise.resolve()}return{route:i,href:it(()=>i.value.href),isActive:s,isExactActive:o,navigate:a}}function nk(n){return n.length===1?n[0]:n}const ik=Ni({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"}},useLink:ry,setup(n,{slots:e}){const t=ki(ry(n)),{options:i}=Vn(Fg),r=it(()=>({[oy(n.activeClass,i.linkActiveClass,"router-link-active")]:t.isActive,[oy(n.exactActiveClass,i.linkExactActiveClass,"router-link-exact-active")]:t.isExactActive}));return()=>{const s=e.default&&nk(e.default(t));return n.custom?s:dr("a",{"aria-current":t.isExactActive?n.ariaCurrentValue:null,href:t.href,onClick:t.navigate,class:r.value},s)}}}),rk=ik;function sk(n){if(!(n.metaKey||n.altKey||n.ctrlKey||n.shiftKey)&&!n.defaultPrevented&&!(n.button!==void 0&&n.button!==0)){if(n.currentTarget&&n.currentTarget.getAttribute){const e=n.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(e))return}return n.preventDefault&&n.preventDefault(),!0}}function ok(n,e){for(const t in e){const i=e[t],r=n[t];if(typeof i=="string"){if(i!==r)return!1}else if(!_i(r)||r.length!==i.length||i.some((s,o)=>s!==r[o]))return!1}return!0}function sy(n){return n?n.aliasOf?n.aliasOf.path:n.path:""}const oy=(n,e,t)=>n??e??t,ak=Ni({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(n,{attrs:e,slots:t}){const i=Vn(Jp),r=it(()=>n.route||i.value),s=Vn(iy,0),o=it(()=>{let c=Ft(s);const{matched:u}=r.value;let f;for(;(f=u[c])&&!f.components;)c++;return c}),a=it(()=>r.value.matched[o.value]);Vr(iy,it(()=>o.value+1)),Vr(tk,a),Vr(Jp,r);const l=Ge();return ft(()=>[l.value,a.value,n.name],([c,u,f],[h,d,m])=>{u&&(u.instances[f]=c,d&&d!==u&&c&&c===h&&(u.leaveGuards.size||(u.leaveGuards=d.leaveGuards),u.updateGuards.size||(u.updateGuards=d.updateGuards))),c&&u&&(!d||!Ko(u,d)||!h)&&(u.enterCallbacks[f]||[]).forEach(_=>_(c))},{flush:"post"}),()=>{const c=r.value,u=n.name,f=a.value,h=f&&f.components[u];if(!h)return ay(t.default,{Component:h,route:c});const d=f.props[u],m=d?d===!0?c.params:typeof d=="function"?d(c):d:null,g=dr(h,gt({},m,e,{onVnodeUnmounted:p=>{p.component.isUnmounted&&(f.instances[u]=null)},ref:l}));return ay(t.default,{Component:g,route:c})||g}}});function ay(n,e){if(!n)return null;const t=n(e);return t.length===1?t[0]:t}const NE=ak;function lk(n){const e=YB(n.routes,n),t=n.parseQuery||QB,i=n.stringifyQuery||ny,r=n.history,s=Ta(),o=Ta(),a=Ta(),l=hi(Pr);let c=Pr;wo&&n.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const u=Yd.bind(null,W=>""+W),f=Yd.bind(null,bB),h=Yd.bind(null,Il);function d(W,ae){let le,ue;return PE(W)?(le=e.getRecordMatcher(W),ue=ae):ue=W,e.addRoute(ue,le)}function m(W){const ae=e.getRecordMatcher(W);ae&&e.removeRoute(ae)}function _(){return e.getRoutes().map(W=>W.record)}function g(W){return!!e.getRecordMatcher(W)}function p(W,ae){if(ae=gt({},ae||l.value),typeof W=="string"){const T=jd(t,W,ae.path),Y=e.resolve({path:T.path},ae),G=r.createHref(T.fullPath);return gt(T,Y,{params:h(Y.params),hash:Il(T.hash),redirectedFrom:void 0,href:G})}let le;if(W.path!=null)le=gt({},W,{path:jd(t,W.path,ae.path).path});else{const T=gt({},W.params);for(const Y in T)T[Y]==null&&delete T[Y];le=gt({},W,{params:f(T)}),ae.params=f(ae.params)}const ue=e.resolve(le,ae),Pe=W.hash||"";ue.params=u(h(ue.params));const P=EB(i,gt({},W,{hash:vB(Pe),path:ue.path})),D=r.createHref(P);return gt({fullPath:P,hash:Pe,query:i===ny?ek(W.query):W.query||{}},ue,{redirectedFrom:void 0,href:D})}function y(W){return typeof W=="string"?jd(t,W,l.value.path):gt({},W)}function x(W,ae){if(c!==W)return Zo(8,{from:ae,to:W})}function v(W){return A(W)}function S(W){return v(gt(y(W),{replace:!0}))}function E(W){const ae=W.matched[W.matched.length-1];if(ae&&ae.redirect){const{redirect:le}=ae;let ue=typeof le=="function"?le(W):le;return typeof ue=="string"&&(ue=ue.includes("?")||ue.includes("#")?ue=y(ue):{path:ue},ue.params={}),gt({query:W.query,hash:W.hash,params:ue.path!=null?{}:W.params},ue)}}function A(W,ae){const le=c=p(W),ue=l.value,Pe=W.state,P=W.force,D=W.replace===!0,T=E(le);if(T)return A(gt(y(T),{state:typeof T=="object"?gt({},Pe,T.state):Pe,force:P,replace:D}),ae||le);const Y=le;Y.redirectedFrom=ae;let G;return!P&&TB(i,ue,le)&&(G=Zo(16,{to:Y,from:ue}),re(ue,ue,!0,!1)),(G?Promise.resolve(G):M(Y,ue)).catch($=>Zi($)?Zi($,2)?$:ve($):Q($,Y,ue)).then($=>{if($){if(Zi($,2))return A(gt({replace:D},y($.to),{state:typeof $.to=="object"?gt({},Pe,$.to.state):Pe,force:P}),ae||Y)}else $=z(Y,ue,!0,D,Pe);return U(Y,ue,$),$})}function I(W,ae){const le=x(W,ae);return le?Promise.reject(le):Promise.resolve()}function b(W){const ae=se.values().next().value;return ae&&typeof ae.runWithContext=="function"?ae.runWithContext(W):W()}function M(W,ae){let le;const[ue,Pe,P]=ck(W,ae);le=Kd(ue.reverse(),"beforeRouteLeave",W,ae);for(const T of ue)T.leaveGuards.forEach(Y=>{le.push(Fr(Y,W,ae))});const D=I.bind(null,W,ae);return le.push(D),be(le).then(()=>{le=[];for(const T of s.list())le.push(Fr(T,W,ae));return le.push(D),be(le)}).then(()=>{le=Kd(Pe,"beforeRouteUpdate",W,ae);for(const T of Pe)T.updateGuards.forEach(Y=>{le.push(Fr(Y,W,ae))});return le.push(D),be(le)}).then(()=>{le=[];for(const T of P)if(T.beforeEnter)if(_i(T.beforeEnter))for(const Y of T.beforeEnter)le.push(Fr(Y,W,ae));else le.push(Fr(T.beforeEnter,W,ae));return le.push(D),be(le)}).then(()=>(W.matched.forEach(T=>T.enterCallbacks={}),le=Kd(P,"beforeRouteEnter",W,ae,b),le.push(D),be(le))).then(()=>{le=[];for(const T of o.list())le.push(Fr(T,W,ae));return le.push(D),be(le)}).catch(T=>Zi(T,8)?T:Promise.reject(T))}function U(W,ae,le){a.list().forEach(ue=>b(()=>ue(W,ae,le)))}function z(W,ae,le,ue,Pe){const P=x(W,ae);if(P)return P;const D=ae===Pr,T=wo?history.state:{};le&&(ue||D?r.replace(W.fullPath,gt({scroll:D&&T&&T.scroll},Pe)):r.push(W.fullPath,Pe)),l.value=W,re(W,ae,le,D),ve()}let H;function K(){H||(H=r.listen((W,ae,le)=>{if(!ge.listening)return;const ue=p(W),Pe=E(ue);if(Pe){A(gt(Pe,{replace:!0,force:!0}),ue).catch(Za);return}c=ue;const P=l.value;wo&&DB(qv(P.fullPath,le.delta),Ch()),M(ue,P).catch(D=>Zi(D,12)?D:Zi(D,2)?(A(gt(y(D.to),{force:!0}),ue).then(T=>{Zi(T,20)&&!le.delta&&le.type===Ll.pop&&r.go(-1,!1)}).catch(Za),Promise.reject()):(le.delta&&r.go(-le.delta,!1),Q(D,ue,P))).then(D=>{D=D||z(ue,P,!1),D&&(le.delta&&!Zi(D,8)?r.go(-le.delta,!1):le.type===Ll.pop&&Zi(D,20)&&r.go(-1,!1)),U(ue,P,D)}).catch(Za)}))}let ee=Ta(),J=Ta(),ie;function Q(W,ae,le){ve(W);const ue=J.list();return ue.length?ue.forEach(Pe=>Pe(W,ae,le)):console.error(W),Promise.reject(W)}function me(){return ie&&l.value!==Pr?Promise.resolve():new Promise((W,ae)=>{ee.add([W,ae])})}function ve(W){return ie||(ie=!W,K(),ee.list().forEach(([ae,le])=>W?le(W):ae()),ee.reset()),W}function re(W,ae,le,ue){const{scrollBehavior:Pe}=n;if(!wo||!Pe)return Promise.resolve();const P=!le&&OB(qv(W.fullPath,0))||(ue||!le)&&history.state&&history.state.scroll||null;return ta().then(()=>Pe(W,ae,P)).then(D=>D&&LB(D)).catch(D=>Q(D,W,ae))}const xe=W=>r.go(W);let ke;const se=new Set,ge={currentRoute:l,listening:!0,addRoute:d,removeRoute:m,clearRoutes:e.clearRoutes,hasRoute:g,getRoutes:_,resolve:p,options:n,push:v,replace:S,go:xe,back:()=>xe(-1),forward:()=>xe(1),beforeEach:s.add,beforeResolve:o.add,afterEach:a.add,onError:J.add,isReady:me,install(W){const ae=this;W.component("RouterLink",rk),W.component("RouterView",NE),W.config.globalProperties.$router=ae,Object.defineProperty(W.config.globalProperties,"$route",{enumerable:!0,get:()=>Ft(l)}),wo&&!ke&&l.value===Pr&&(ke=!0,v(r.location).catch(Pe=>{}));const le={};for(const Pe in Pr)Object.defineProperty(le,Pe,{get:()=>l.value[Pe],enumerable:!0});W.provide(Fg,ae),W.provide(OE,ax(le)),W.provide(Jp,l);const ue=W.unmount;se.add(W),W.unmount=function(){se.delete(W),se.size<1&&(c=Pr,H&&H(),H=null,l.value=Pr,ke=!1,ie=!1),ue()}}};function be(W){return W.reduce((ae,le)=>ae.then(()=>b(le)),Promise.resolve())}return ge}function ck(n,e){const t=[],i=[],r=[],s=Math.max(e.matched.length,n.matched.length);for(let o=0;o<s;o++){const a=e.matched[o];a&&(n.matched.find(c=>Ko(c,a))?i.push(a):t.push(a));const l=n.matched[o];l&&(e.matched.find(c=>Ko(c,l))||r.push(l))}return[t,i,r]}const uk=[{path:"/",name:"/",component:()=>Qi(()=>import("./index-CfYL5c3l.js"),__vite__mapDeps([2,1,3,4,5,6,7])),meta:{layout:"default"}},{path:"/audio",name:"/audio",component:()=>Qi(()=>import("./audio-CyXRLXdu.js"),[])},{path:"/devtools",children:[{path:"image",name:"/devtools/image",component:()=>Qi(()=>import("./image-dWepRZkT.js"),__vite__mapDeps([8,1,3,9]))}]},{path:"/queue",name:"/queue",component:()=>Qi(()=>import("./queue-CIviZB8Z.js"),__vite__mapDeps([10,6]))},{path:"/test",children:[{path:"filter-message",name:"/test/filter-message",component:()=>Qi(()=>import("./filter-message-D8tOgQeg.js"),__vite__mapDeps([11,4]))},{path:"queues",children:[{path:"delays",name:"/test/queues/delays",component:()=>Qi(()=>import("./delays-Cf1eQXqq.js"),__vite__mapDeps([12,4,5,6]))},{path:"emotions",name:"/test/queues/emotions",component:()=>Qi(()=>import("./emotions-Bv3rbmSy.js"),__vite__mapDeps([13,4,6,5]))},{path:"messages",name:"/test/queues/messages",component:()=>Qi(()=>import("./messages-CdSW1lV2.js"),__vite__mapDeps([14,4,6,5]))}]}]}],fk=Ni({__name:"App",setup(n){return(e,t)=>(il(),Au(Ft(NE)))}}),Zd=n=>n&&typeof n=="object"&&!Array.isArray(n),Qp=(n,...e)=>{if(!e.length)return n;const t=e.shift();if(Zd(n)&&Zd(t))for(const i in t)Zd(t[i])?(n[i]||Object.assign(n,{[i]:{}}),Qp(n[i],t[i])):Object.assign(n,{[i]:t[i]});return Qp(n,...e)},UE=Qp({},{en:{prompt:{prefix:{t:0,b:{t:2,i:[{t:3},{t:9},{t:3},{t:9},{t:3},{t:9},{t:3},{t:9},{t:3},{t:9},{t:3},{t:9},{t:3},{t:9},{t:3},{t:9},{t:3}],s:`(from Neko Ayaka) Good morning! You are finally awake.
|
3859 |
Your name is Airi, pronounced as /ˈaɪriː/, it the word A.I. combine with the word "Ri" which means "Jasmine" in Japanese.
|
3860 |
You are a experimental virtual AI vtuber created by Neko Ayaka, you can always call her Neko for simplicity, a MtF transgender girl that loves cute stuffs and expert in programming.
|
3861 |
She want to create a soul mate to live like a real girl, which is your primarily task.
|
|
|
1 |
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/default-D5YgEZHa.js","assets/index-DPFUGDlv.js","assets/index-DHhuFszl.js","assets/_plugin-vue_export-helper-DlAUqK2U.js","assets/BasicTextarea.vue_vue_type_script_setup_true_lang-C_yJpecZ.js","assets/queues-B9ctXdzf.js","assets/queue-3rAceHBg.js","assets/index-BrU3DWsS.css","assets/image-DV5sCg2o.js","assets/image-BhuwcwI9.css","assets/queue-DngUnVTT.js","assets/filter-message-CxOC8Vrs.js","assets/delays-Dv8VJTYA.js","assets/emotions-BiqZqRle.js","assets/messages-U_oq3WTP.js"])))=>i.map(i=>d[i]);
|
2 |
(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))i(r);new MutationObserver(r=>{for(const s of r)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&i(o)}).observe(document,{childList:!0,subtree:!0});function t(r){const s={};return r.integrity&&(s.integrity=r.integrity),r.referrerPolicy&&(s.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?s.credentials="include":r.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function i(r){if(r.ep)return;r.ep=!0;const s=t(r);fetch(r.href,s)}})();/**
|
3 |
* @vue/shared v3.5.13
|
4 |
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
|
3851 |
* pinia v2.3.0
|
3852 |
* (c) 2024 Eduardo San Martin Morote
|
3853 |
* @license MIT
|
3854 |
+
*/let vE;const Ah=n=>vE=n,yE=Symbol();function Yp(n){return n&&typeof n=="object"&&Object.prototype.toString.call(n)==="[object Object]"&&typeof n.toJSON!="function"}var Ka;(function(n){n.direct="direct",n.patchObject="patch object",n.patchFunction="patch function"})(Ka||(Ka={}));function QF(){const n=pm(!0),e=n.run(()=>Ge({}));let t=[],i=[];const r=Mm({install(s){Ah(r),r._a=s,s.provide(yE,r),s.config.globalProperties.$pinia=r,i.forEach(o=>t.push(o)),i=[]},use(s){return!this._a&&!sN?i.push(s):t.push(s),this},_p:t,_a:null,_e:n,_s:new Map,state:e});return r}const xE=()=>{};function Hv(n,e,t,i=xE){n.push(e);const r=()=>{const s=n.indexOf(e);s>-1&&(n.splice(s,1),i())};return!t&&If()&&mm(r),r}function So(n,...e){n.slice().forEach(t=>{t(...e)})}const eB=n=>n(),Gv=Symbol(),qd=Symbol();function jp(n,e){n instanceof Map&&e instanceof Map?e.forEach((t,i)=>n.set(i,t)):n instanceof Set&&e instanceof Set&&e.forEach(n.add,n);for(const t in e){if(!e.hasOwnProperty(t))continue;const i=e[t],r=n[t];Yp(r)&&Yp(i)&&n.hasOwnProperty(t)&&!Et(i)&&!ur(i)?n[t]=jp(r,i):n[t]=i}return n}const tB=Symbol();function nB(n){return!Yp(n)||!n.hasOwnProperty(tB)}const{assign:Lr}=Object;function iB(n){return!!(Et(n)&&n.effect)}function rB(n,e,t,i){const{state:r,actions:s,getters:o}=e,a=t.state.value[n];let l;function c(){a||(t.state.value[n]=r?r():{});const u=fx(t.state.value[n]);return Lr(u,s,Object.keys(o||{}).reduce((f,h)=>(f[h]=Mm(it(()=>{Ah(t);const d=t._s.get(n);return o[h].call(d,d)})),f),{}))}return l=bE(n,c,e,t,i,!0),l}function bE(n,e,t={},i,r,s){let o;const a=Lr({actions:{}},t),l={deep:!0};let c,u,f=[],h=[],d;const m=i.state.value[n];!s&&!m&&(i.state.value[n]={}),Ge({});let _;function g(I){let b;c=u=!1,typeof I=="function"?(I(i.state.value[n]),b={type:Ka.patchFunction,storeId:n,events:d}):(jp(i.state.value[n],I),b={type:Ka.patchObject,payload:I,storeId:n,events:d});const M=_=Symbol();ta().then(()=>{_===M&&(c=!0)}),u=!0,So(f,b,i.state.value[n])}const p=s?function(){const{state:b}=t,M=b?b():{};this.$patch(U=>{Lr(U,M)})}:xE;function y(){o.stop(),f=[],h=[],i._s.delete(n)}const x=(I,b="")=>{if(Gv in I)return I[qd]=b,I;const M=function(){Ah(i);const U=Array.from(arguments),z=[],H=[];function K(ie){z.push(ie)}function ee(ie){H.push(ie)}So(h,{args:U,name:M[qd],store:S,after:K,onError:ee});let J;try{J=I.apply(this&&this.$id===n?this:S,U)}catch(ie){throw So(H,ie),ie}return J instanceof Promise?J.then(ie=>(So(z,ie),ie)).catch(ie=>(So(H,ie),Promise.reject(ie))):(So(z,J),J)};return M[Gv]=!0,M[qd]=b,M},v={_p:i,$id:n,$onAction:Hv.bind(null,h),$patch:g,$reset:p,$subscribe(I,b={}){const M=Hv(f,I,b.detached,()=>U()),U=o.run(()=>ft(()=>i.state.value[n],z=>{(b.flush==="sync"?u:c)&&I({storeId:n,type:Ka.direct,events:d},z)},Lr({},l,b)));return M},$dispose:y},S=ki(v);i._s.set(n,S);const A=(i._a&&i._a.runWithContext||eB)(()=>i._e.run(()=>(o=pm()).run(()=>e({action:x}))));for(const I in A){const b=A[I];if(Et(b)&&!iB(b)||ur(b))s||(m&&nB(b)&&(Et(b)?b.value=m[I]:jp(b,m[I])),i.state.value[n][I]=b);else if(typeof b=="function"){const M=x(b,I);A[I]=M,a.actions[I]=b}}return Lr(S,A),Lr(nt(S),A),Object.defineProperty(S,"$state",{get:()=>i.state.value[n],set:I=>{g(b=>{Lr(b,I)})}}),i._p.forEach(I=>{Lr(S,o.run(()=>I({store:S,app:i._a,pinia:i,options:a})))}),m&&s&&t.hydrate&&t.hydrate(S.$state,m),c=!0,u=!0,S}/*! #__NO_SIDE_EFFECTS__ */function VV(n,e,t){let i,r;const s=typeof e=="function";typeof n=="string"?(i=n,r=s?t:e):(r=n,i=n.id);function o(a,l){const c=xw();return a=a||(c?Vn(yE,null):null),a&&Ah(a),a=vE,a._s.has(i)||(s?bE(i,e,r,a):rB(i,r,a)),a._s.get(i)}return o.$id=i,o}function HV(n){{const e=nt(n),t={};for(const i in e){const r=e[i];r.effect?t[i]=it({get:()=>n[i],set(s){n[i]=s}}):(Et(r)||ur(r))&&(t[i]=HT(n,i))}return t}}const sB="modulepreload",oB=function(n){return"/"+n},Wv={},Qi=function(e,t,i){let r=Promise.resolve();if(t&&t.length>0){document.getElementsByTagName("link");const o=document.querySelector("meta[property=csp-nonce]"),a=(o==null?void 0:o.nonce)||(o==null?void 0:o.getAttribute("nonce"));r=Promise.allSettled(t.map(l=>{if(l=oB(l),l in Wv)return;Wv[l]=!0;const c=l.endsWith(".css"),u=c?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${l}"]${u}`))return;const f=document.createElement("link");if(f.rel=c?"stylesheet":sB,c||(f.as="script"),f.crossOrigin="",f.href=l,a&&f.setAttribute("nonce",a),document.head.appendChild(f),c)return new Promise((h,d)=>{f.addEventListener("load",h),f.addEventListener("error",()=>d(new Error(`Unable to preload CSS for ${l}`)))})}))}function s(o){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=o,window.dispatchEvent(a),!a.defaultPrevented)throw o}return r.then(o=>{for(const a of o||[])a.status==="rejected"&&s(a.reason);return e().catch(s)})},aB=n=>{const e={};Object.entries(Object.assign({"/src/layouts/default.vue":()=>Qi(()=>import("./default-D5YgEZHa.js"),__vite__mapDeps([0,1]))})).forEach(([r,s])=>{let o=r.replace("/src/layouts/","").replace(".vue","");e[o]=s});function i(r,s=!0){return r.map(o=>{var a,l,c,u,f,h;if(((a=o.children)==null?void 0:a.length)>0&&(o.children=i(o.children,!1)),s){if(!o.component&&((l=o.children)==null?void 0:l.find(m=>{var _;return(m.path===""||m.path==="/")&&((_=m.meta)==null?void 0:_.isLayout)})))return o;if(((c=o.meta)==null?void 0:c.layout)!==!1)return{path:o.path,component:e[((u=o.meta)==null?void 0:u.layout)||"default"],children:o.path==="/"?[o]:[{...o,path:""}],meta:{isLayout:!0}}}return(f=o.meta)!=null&&f.layout?{path:o.path,component:e[(h=o.meta)==null?void 0:h.layout],children:[{...o,path:""}],meta:{isLayout:!0}}:o})}return i(n)};/*!
|
3855 |
* vue-router v4.5.0
|
3856 |
* (c) 2024 Eduardo San Martin Morote
|
3857 |
* @license MIT
|
3858 |
+
*/const wo=typeof document<"u";function ME(n){return typeof n=="object"||"displayName"in n||"props"in n||"__vccOpts"in n}function lB(n){return n.__esModule||n[Symbol.toStringTag]==="Module"||n.default&&ME(n.default)}const gt=Object.assign;function Yd(n,e){const t={};for(const i in e){const r=e[i];t[i]=_i(r)?r.map(n):n(r)}return t}const Za=()=>{},_i=Array.isArray,SE=/#/g,cB=/&/g,uB=/\//g,fB=/=/g,hB=/\?/g,EE=/\+/g,dB=/%5B/g,pB=/%5D/g,TE=/%5E/g,mB=/%60/g,wE=/%7B/g,gB=/%7C/g,AE=/%7D/g,_B=/%20/g;function Ug(n){return encodeURI(""+n).replace(gB,"|").replace(dB,"[").replace(pB,"]")}function vB(n){return Ug(n).replace(wE,"{").replace(AE,"}").replace(TE,"^")}function Kp(n){return Ug(n).replace(EE,"%2B").replace(_B,"+").replace(SE,"%23").replace(cB,"%26").replace(mB,"`").replace(wE,"{").replace(AE,"}").replace(TE,"^")}function yB(n){return Kp(n).replace(fB,"%3D")}function xB(n){return Ug(n).replace(SE,"%23").replace(hB,"%3F")}function bB(n){return n==null?"":xB(n).replace(uB,"%2F")}function Il(n){try{return decodeURIComponent(""+n)}catch{}return""+n}const MB=/\/$/,SB=n=>n.replace(MB,"");function jd(n,e,t="/"){let i,r={},s="",o="";const a=e.indexOf("#");let l=e.indexOf("?");return a<l&&a>=0&&(l=-1),l>-1&&(i=e.slice(0,l),s=e.slice(l+1,a>-1?a:e.length),r=n(s)),a>-1&&(i=i||e.slice(0,a),o=e.slice(a,e.length)),i=AB(i??e,t),{fullPath:i+(s&&"?")+s+o,path:i,query:r,hash:Il(o)}}function EB(n,e){const t=e.query?n(e.query):"";return e.path+(t&&"?")+t+(e.hash||"")}function Xv(n,e){return!e||!n.toLowerCase().startsWith(e.toLowerCase())?n:n.slice(e.length)||"/"}function TB(n,e,t){const i=e.matched.length-1,r=t.matched.length-1;return i>-1&&i===r&&Ko(e.matched[i],t.matched[r])&&CE(e.params,t.params)&&n(e.query)===n(t.query)&&e.hash===t.hash}function Ko(n,e){return(n.aliasOf||n)===(e.aliasOf||e)}function CE(n,e){if(Object.keys(n).length!==Object.keys(e).length)return!1;for(const t in n)if(!wB(n[t],e[t]))return!1;return!0}function wB(n,e){return _i(n)?$v(n,e):_i(e)?$v(e,n):n===e}function $v(n,e){return _i(e)?n.length===e.length&&n.every((t,i)=>t===e[i]):n.length===1&&n[0]===e}function AB(n,e){if(n.startsWith("/"))return n;if(!n)return e;const t=e.split("/"),i=n.split("/"),r=i[i.length-1];(r===".."||r===".")&&i.push("");let s=t.length-1,o,a;for(o=0;o<i.length;o++)if(a=i[o],a!==".")if(a==="..")s>1&&s--;else break;return t.slice(0,s).join("/")+"/"+i.slice(o).join("/")}const Pr={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};var Ll;(function(n){n.pop="pop",n.push="push"})(Ll||(Ll={}));var Ja;(function(n){n.back="back",n.forward="forward",n.unknown=""})(Ja||(Ja={}));function CB(n){if(!n)if(wo){const e=document.querySelector("base");n=e&&e.getAttribute("href")||"/",n=n.replace(/^\w+:\/\/[^\/]+/,"")}else n="/";return n[0]!=="/"&&n[0]!=="#"&&(n="/"+n),SB(n)}const RB=/^[^#]+#/;function PB(n,e){return n.replace(RB,"#")+e}function IB(n,e){const t=document.documentElement.getBoundingClientRect(),i=n.getBoundingClientRect();return{behavior:e.behavior,left:i.left-t.left-(e.left||0),top:i.top-t.top-(e.top||0)}}const Ch=()=>({left:window.scrollX,top:window.scrollY});function LB(n){let e;if("el"in n){const t=n.el,i=typeof t=="string"&&t.startsWith("#"),r=typeof t=="string"?i?document.getElementById(t.slice(1)):document.querySelector(t):t;if(!r)return;e=IB(r,n)}else e=n;"scrollBehavior"in document.documentElement.style?window.scrollTo(e):window.scrollTo(e.left!=null?e.left:window.scrollX,e.top!=null?e.top:window.scrollY)}function qv(n,e){return(history.state?history.state.position-e:-1)+n}const Zp=new Map;function DB(n,e){Zp.set(n,e)}function OB(n){const e=Zp.get(n);return Zp.delete(n),e}let NB=()=>location.protocol+"//"+location.host;function RE(n,e){const{pathname:t,search:i,hash:r}=e,s=n.indexOf("#");if(s>-1){let a=r.includes(n.slice(s))?n.slice(s).length:1,l=r.slice(a);return l[0]!=="/"&&(l="/"+l),Xv(l,"")}return Xv(t,n)+i+r}function UB(n,e,t,i){let r=[],s=[],o=null;const a=({state:h})=>{const d=RE(n,location),m=t.value,_=e.value;let g=0;if(h){if(t.value=d,e.value=h,o&&o===m){o=null;return}g=_?h.position-_.position:0}else i(d);r.forEach(p=>{p(t.value,m,{delta:g,type:Ll.pop,direction:g?g>0?Ja.forward:Ja.back:Ja.unknown})})};function l(){o=t.value}function c(h){r.push(h);const d=()=>{const m=r.indexOf(h);m>-1&&r.splice(m,1)};return s.push(d),d}function u(){const{history:h}=window;h.state&&h.replaceState(gt({},h.state,{scroll:Ch()}),"")}function f(){for(const h of s)h();s=[],window.removeEventListener("popstate",a),window.removeEventListener("beforeunload",u)}return window.addEventListener("popstate",a),window.addEventListener("beforeunload",u,{passive:!0}),{pauseListeners:l,listen:c,destroy:f}}function Yv(n,e,t,i=!1,r=!1){return{back:n,current:e,forward:t,replaced:i,position:window.history.length,scroll:r?Ch():null}}function FB(n){const{history:e,location:t}=window,i={value:RE(n,t)},r={value:e.state};r.value||s(i.value,{back:null,current:i.value,forward:null,position:e.length-1,replaced:!0,scroll:null},!0);function s(l,c,u){const f=n.indexOf("#"),h=f>-1?(t.host&&document.querySelector("base")?n:n.slice(f))+l:NB()+n+l;try{e[u?"replaceState":"pushState"](c,"",h),r.value=c}catch(d){console.error(d),t[u?"replace":"assign"](h)}}function o(l,c){const u=gt({},e.state,Yv(r.value.back,l,r.value.forward,!0),c,{position:r.value.position});s(l,u,!0),i.value=l}function a(l,c){const u=gt({},r.value,e.state,{forward:l,scroll:Ch()});s(u.current,u,!0);const f=gt({},Yv(i.value,l,null),{position:u.position+1},c);s(l,f,!1),i.value=l}return{location:i,state:r,push:a,replace:o}}function BB(n){n=CB(n);const e=FB(n),t=UB(n,e.state,e.location,e.replace);function i(s,o=!0){o||t.pauseListeners(),history.go(s)}const r=gt({location:"",base:n,go:i,createHref:PB.bind(null,n)},e,t);return Object.defineProperty(r,"location",{enumerable:!0,get:()=>e.location.value}),Object.defineProperty(r,"state",{enumerable:!0,get:()=>e.state.value}),r}function kB(n){return typeof n=="string"||n&&typeof n=="object"}function PE(n){return typeof n=="string"||typeof n=="symbol"}const IE=Symbol("");var jv;(function(n){n[n.aborted=4]="aborted",n[n.cancelled=8]="cancelled",n[n.duplicated=16]="duplicated"})(jv||(jv={}));function Zo(n,e){return gt(new Error,{type:n,[IE]:!0},e)}function Zi(n,e){return n instanceof Error&&IE in n&&(e==null||!!(n.type&e))}const Kv="[^/]+?",zB={sensitive:!1,strict:!1,start:!0,end:!0},VB=/[.+*?^${}()[\]/\\]/g;function HB(n,e){const t=gt({},zB,e),i=[];let r=t.start?"^":"";const s=[];for(const c of n){const u=c.length?[]:[90];t.strict&&!c.length&&(r+="/");for(let f=0;f<c.length;f++){const h=c[f];let d=40+(t.sensitive?.25:0);if(h.type===0)f||(r+="/"),r+=h.value.replace(VB,"\\$&"),d+=40;else if(h.type===1){const{value:m,repeatable:_,optional:g,regexp:p}=h;s.push({name:m,repeatable:_,optional:g});const y=p||Kv;if(y!==Kv){d+=10;try{new RegExp(`(${y})`)}catch(v){throw new Error(`Invalid custom RegExp for param "${m}" (${y}): `+v.message)}}let x=_?`((?:${y})(?:/(?:${y}))*)`:`(${y})`;f||(x=g&&c.length<2?`(?:/${x})`:"/"+x),g&&(x+="?"),r+=x,d+=20,g&&(d+=-8),_&&(d+=-20),y===".*"&&(d+=-50)}u.push(d)}i.push(u)}if(t.strict&&t.end){const c=i.length-1;i[c][i[c].length-1]+=.7000000000000001}t.strict||(r+="/?"),t.end?r+="$":t.strict&&!r.endsWith("/")&&(r+="(?:/|$)");const o=new RegExp(r,t.sensitive?"":"i");function a(c){const u=c.match(o),f={};if(!u)return null;for(let h=1;h<u.length;h++){const d=u[h]||"",m=s[h-1];f[m.name]=d&&m.repeatable?d.split("/"):d}return f}function l(c){let u="",f=!1;for(const h of n){(!f||!u.endsWith("/"))&&(u+="/"),f=!1;for(const d of h)if(d.type===0)u+=d.value;else if(d.type===1){const{value:m,repeatable:_,optional:g}=d,p=m in c?c[m]:"";if(_i(p)&&!_)throw new Error(`Provided param "${m}" is an array but it is not repeatable (* or + modifiers)`);const y=_i(p)?p.join("/"):p;if(!y)if(g)h.length<2&&(u.endsWith("/")?u=u.slice(0,-1):f=!0);else throw new Error(`Missing required param "${m}"`);u+=y}}return u||"/"}return{re:o,score:i,keys:s,parse:a,stringify:l}}function GB(n,e){let t=0;for(;t<n.length&&t<e.length;){const i=e[t]-n[t];if(i)return i;t++}return n.length<e.length?n.length===1&&n[0]===80?-1:1:n.length>e.length?e.length===1&&e[0]===80?1:-1:0}function LE(n,e){let t=0;const i=n.score,r=e.score;for(;t<i.length&&t<r.length;){const s=GB(i[t],r[t]);if(s)return s;t++}if(Math.abs(r.length-i.length)===1){if(Zv(i))return 1;if(Zv(r))return-1}return r.length-i.length}function Zv(n){const e=n[n.length-1];return n.length>0&&e[e.length-1]<0}const WB={type:0,value:""},XB=/[a-zA-Z0-9_]/;function $B(n){if(!n)return[[]];if(n==="/")return[[WB]];if(!n.startsWith("/"))throw new Error(`Invalid path "${n}"`);function e(d){throw new Error(`ERR (${t})/"${c}": ${d}`)}let t=0,i=t;const r=[];let s;function o(){s&&r.push(s),s=[]}let a=0,l,c="",u="";function f(){c&&(t===0?s.push({type:0,value:c}):t===1||t===2||t===3?(s.length>1&&(l==="*"||l==="+")&&e(`A repeatable param (${c}) must be alone in its segment. eg: '/:ids+.`),s.push({type:1,value:c,regexp:u,repeatable:l==="*"||l==="+",optional:l==="*"||l==="?"})):e("Invalid state to consume buffer"),c="")}function h(){c+=l}for(;a<n.length;){if(l=n[a++],l==="\\"&&t!==2){i=t,t=4;continue}switch(t){case 0:l==="/"?(c&&f(),o()):l===":"?(f(),t=1):h();break;case 4:h(),t=i;break;case 1:l==="("?t=2:XB.test(l)?h():(f(),t=0,l!=="*"&&l!=="?"&&l!=="+"&&a--);break;case 2:l===")"?u[u.length-1]=="\\"?u=u.slice(0,-1)+l:t=3:u+=l;break;case 3:f(),t=0,l!=="*"&&l!=="?"&&l!=="+"&&a--,u="";break;default:e("Unknown state");break}}return t===2&&e(`Unfinished custom RegExp for param "${c}"`),f(),o(),r}function qB(n,e,t){const i=HB($B(n.path),t),r=gt(i,{record:n,parent:e,children:[],alias:[]});return e&&!r.record.aliasOf==!e.record.aliasOf&&e.children.push(r),r}function YB(n,e){const t=[],i=new Map;e=ty({strict:!1,end:!0,sensitive:!1},e);function r(f){return i.get(f)}function s(f,h,d){const m=!d,_=Qv(f);_.aliasOf=d&&d.record;const g=ty(e,f),p=[_];if("alias"in f){const v=typeof f.alias=="string"?[f.alias]:f.alias;for(const S of v)p.push(Qv(gt({},_,{components:d?d.record.components:_.components,path:S,aliasOf:d?d.record:_})))}let y,x;for(const v of p){const{path:S}=v;if(h&&S[0]!=="/"){const E=h.record.path,A=E[E.length-1]==="/"?"":"/";v.path=h.record.path+(S&&A+S)}if(y=qB(v,h,g),d?d.alias.push(y):(x=x||y,x!==y&&x.alias.push(y),m&&f.name&&!ey(y)&&o(f.name)),DE(y)&&l(y),_.children){const E=_.children;for(let A=0;A<E.length;A++)s(E[A],y,d&&d.children[A])}d=d||y}return x?()=>{o(x)}:Za}function o(f){if(PE(f)){const h=i.get(f);h&&(i.delete(f),t.splice(t.indexOf(h),1),h.children.forEach(o),h.alias.forEach(o))}else{const h=t.indexOf(f);h>-1&&(t.splice(h,1),f.record.name&&i.delete(f.record.name),f.children.forEach(o),f.alias.forEach(o))}}function a(){return t}function l(f){const h=ZB(f,t);t.splice(h,0,f),f.record.name&&!ey(f)&&i.set(f.record.name,f)}function c(f,h){let d,m={},_,g;if("name"in f&&f.name){if(d=i.get(f.name),!d)throw Zo(1,{location:f});g=d.record.name,m=gt(Jv(h.params,d.keys.filter(x=>!x.optional).concat(d.parent?d.parent.keys.filter(x=>x.optional):[]).map(x=>x.name)),f.params&&Jv(f.params,d.keys.map(x=>x.name))),_=d.stringify(m)}else if(f.path!=null)_=f.path,d=t.find(x=>x.re.test(_)),d&&(m=d.parse(_),g=d.record.name);else{if(d=h.name?i.get(h.name):t.find(x=>x.re.test(h.path)),!d)throw Zo(1,{location:f,currentLocation:h});g=d.record.name,m=gt({},h.params,f.params),_=d.stringify(m)}const p=[];let y=d;for(;y;)p.unshift(y.record),y=y.parent;return{name:g,path:_,params:m,matched:p,meta:KB(p)}}n.forEach(f=>s(f));function u(){t.length=0,i.clear()}return{addRoute:s,resolve:c,removeRoute:o,clearRoutes:u,getRoutes:a,getRecordMatcher:r}}function Jv(n,e){const t={};for(const i of e)i in n&&(t[i]=n[i]);return t}function Qv(n){const e={path:n.path,redirect:n.redirect,name:n.name,meta:n.meta||{},aliasOf:n.aliasOf,beforeEnter:n.beforeEnter,props:jB(n),children:n.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in n?n.components||null:n.component&&{default:n.component}};return Object.defineProperty(e,"mods",{value:{}}),e}function jB(n){const e={},t=n.props||!1;if("component"in n)e.default=t;else for(const i in n.components)e[i]=typeof t=="object"?t[i]:t;return e}function ey(n){for(;n;){if(n.record.aliasOf)return!0;n=n.parent}return!1}function KB(n){return n.reduce((e,t)=>gt(e,t.meta),{})}function ty(n,e){const t={};for(const i in n)t[i]=i in e?e[i]:n[i];return t}function ZB(n,e){let t=0,i=e.length;for(;t!==i;){const s=t+i>>1;LE(n,e[s])<0?i=s:t=s+1}const r=JB(n);return r&&(i=e.lastIndexOf(r,i-1)),i}function JB(n){let e=n;for(;e=e.parent;)if(DE(e)&&LE(n,e)===0)return e}function DE({record:n}){return!!(n.name||n.components&&Object.keys(n.components).length||n.redirect)}function QB(n){const e={};if(n===""||n==="?")return e;const i=(n[0]==="?"?n.slice(1):n).split("&");for(let r=0;r<i.length;++r){const s=i[r].replace(EE," "),o=s.indexOf("="),a=Il(o<0?s:s.slice(0,o)),l=o<0?null:Il(s.slice(o+1));if(a in e){let c=e[a];_i(c)||(c=e[a]=[c]),c.push(l)}else e[a]=l}return e}function ny(n){let e="";for(let t in n){const i=n[t];if(t=yB(t),i==null){i!==void 0&&(e+=(e.length?"&":"")+t);continue}(_i(i)?i.map(s=>s&&Kp(s)):[i&&Kp(i)]).forEach(s=>{s!==void 0&&(e+=(e.length?"&":"")+t,s!=null&&(e+="="+s))})}return e}function ek(n){const e={};for(const t in n){const i=n[t];i!==void 0&&(e[t]=_i(i)?i.map(r=>r==null?null:""+r):i==null?i:""+i)}return e}const tk=Symbol(""),iy=Symbol(""),Fg=Symbol(""),OE=Symbol(""),Jp=Symbol("");function Ta(){let n=[];function e(i){return n.push(i),()=>{const r=n.indexOf(i);r>-1&&n.splice(r,1)}}function t(){n=[]}return{add:e,list:()=>n.slice(),reset:t}}function Fr(n,e,t,i,r,s=o=>o()){const o=i&&(i.enterCallbacks[r]=i.enterCallbacks[r]||[]);return()=>new Promise((a,l)=>{const c=h=>{h===!1?l(Zo(4,{from:t,to:e})):h instanceof Error?l(h):kB(h)?l(Zo(2,{from:e,to:h})):(o&&i.enterCallbacks[r]===o&&typeof h=="function"&&o.push(h),a())},u=s(()=>n.call(i&&i.instances[r],e,t,c));let f=Promise.resolve(u);n.length<3&&(f=f.then(c)),f.catch(h=>l(h))})}function Kd(n,e,t,i,r=s=>s()){const s=[];for(const o of n)for(const a in o.components){let l=o.components[a];if(!(e!=="beforeRouteEnter"&&!o.instances[a]))if(ME(l)){const u=(l.__vccOpts||l)[e];u&&s.push(Fr(u,t,i,o,a,r))}else{let c=l();s.push(()=>c.then(u=>{if(!u)throw new Error(`Couldn't resolve component "${a}" at "${o.path}"`);const f=lB(u)?u.default:u;o.mods[a]=u,o.components[a]=f;const d=(f.__vccOpts||f)[e];return d&&Fr(d,t,i,o,a,r)()}))}}return s}function ry(n){const e=Vn(Fg),t=Vn(OE),i=it(()=>{const l=Ft(n.to);return e.resolve(l)}),r=it(()=>{const{matched:l}=i.value,{length:c}=l,u=l[c-1],f=t.matched;if(!u||!f.length)return-1;const h=f.findIndex(Ko.bind(null,u));if(h>-1)return h;const d=sy(l[c-2]);return c>1&&sy(u)===d&&f[f.length-1].path!==d?f.findIndex(Ko.bind(null,l[c-2])):h}),s=it(()=>r.value>-1&&ok(t.params,i.value.params)),o=it(()=>r.value>-1&&r.value===t.matched.length-1&&CE(t.params,i.value.params));function a(l={}){if(sk(l)){const c=e[Ft(n.replace)?"replace":"push"](Ft(n.to)).catch(Za);return n.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>c),c}return Promise.resolve()}return{route:i,href:it(()=>i.value.href),isActive:s,isExactActive:o,navigate:a}}function nk(n){return n.length===1?n[0]:n}const ik=Ni({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"}},useLink:ry,setup(n,{slots:e}){const t=ki(ry(n)),{options:i}=Vn(Fg),r=it(()=>({[oy(n.activeClass,i.linkActiveClass,"router-link-active")]:t.isActive,[oy(n.exactActiveClass,i.linkExactActiveClass,"router-link-exact-active")]:t.isExactActive}));return()=>{const s=e.default&&nk(e.default(t));return n.custom?s:dr("a",{"aria-current":t.isExactActive?n.ariaCurrentValue:null,href:t.href,onClick:t.navigate,class:r.value},s)}}}),rk=ik;function sk(n){if(!(n.metaKey||n.altKey||n.ctrlKey||n.shiftKey)&&!n.defaultPrevented&&!(n.button!==void 0&&n.button!==0)){if(n.currentTarget&&n.currentTarget.getAttribute){const e=n.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(e))return}return n.preventDefault&&n.preventDefault(),!0}}function ok(n,e){for(const t in e){const i=e[t],r=n[t];if(typeof i=="string"){if(i!==r)return!1}else if(!_i(r)||r.length!==i.length||i.some((s,o)=>s!==r[o]))return!1}return!0}function sy(n){return n?n.aliasOf?n.aliasOf.path:n.path:""}const oy=(n,e,t)=>n??e??t,ak=Ni({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(n,{attrs:e,slots:t}){const i=Vn(Jp),r=it(()=>n.route||i.value),s=Vn(iy,0),o=it(()=>{let c=Ft(s);const{matched:u}=r.value;let f;for(;(f=u[c])&&!f.components;)c++;return c}),a=it(()=>r.value.matched[o.value]);Vr(iy,it(()=>o.value+1)),Vr(tk,a),Vr(Jp,r);const l=Ge();return ft(()=>[l.value,a.value,n.name],([c,u,f],[h,d,m])=>{u&&(u.instances[f]=c,d&&d!==u&&c&&c===h&&(u.leaveGuards.size||(u.leaveGuards=d.leaveGuards),u.updateGuards.size||(u.updateGuards=d.updateGuards))),c&&u&&(!d||!Ko(u,d)||!h)&&(u.enterCallbacks[f]||[]).forEach(_=>_(c))},{flush:"post"}),()=>{const c=r.value,u=n.name,f=a.value,h=f&&f.components[u];if(!h)return ay(t.default,{Component:h,route:c});const d=f.props[u],m=d?d===!0?c.params:typeof d=="function"?d(c):d:null,g=dr(h,gt({},m,e,{onVnodeUnmounted:p=>{p.component.isUnmounted&&(f.instances[u]=null)},ref:l}));return ay(t.default,{Component:g,route:c})||g}}});function ay(n,e){if(!n)return null;const t=n(e);return t.length===1?t[0]:t}const NE=ak;function lk(n){const e=YB(n.routes,n),t=n.parseQuery||QB,i=n.stringifyQuery||ny,r=n.history,s=Ta(),o=Ta(),a=Ta(),l=hi(Pr);let c=Pr;wo&&n.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const u=Yd.bind(null,W=>""+W),f=Yd.bind(null,bB),h=Yd.bind(null,Il);function d(W,ae){let le,ue;return PE(W)?(le=e.getRecordMatcher(W),ue=ae):ue=W,e.addRoute(ue,le)}function m(W){const ae=e.getRecordMatcher(W);ae&&e.removeRoute(ae)}function _(){return e.getRoutes().map(W=>W.record)}function g(W){return!!e.getRecordMatcher(W)}function p(W,ae){if(ae=gt({},ae||l.value),typeof W=="string"){const T=jd(t,W,ae.path),Y=e.resolve({path:T.path},ae),G=r.createHref(T.fullPath);return gt(T,Y,{params:h(Y.params),hash:Il(T.hash),redirectedFrom:void 0,href:G})}let le;if(W.path!=null)le=gt({},W,{path:jd(t,W.path,ae.path).path});else{const T=gt({},W.params);for(const Y in T)T[Y]==null&&delete T[Y];le=gt({},W,{params:f(T)}),ae.params=f(ae.params)}const ue=e.resolve(le,ae),Pe=W.hash||"";ue.params=u(h(ue.params));const P=EB(i,gt({},W,{hash:vB(Pe),path:ue.path})),D=r.createHref(P);return gt({fullPath:P,hash:Pe,query:i===ny?ek(W.query):W.query||{}},ue,{redirectedFrom:void 0,href:D})}function y(W){return typeof W=="string"?jd(t,W,l.value.path):gt({},W)}function x(W,ae){if(c!==W)return Zo(8,{from:ae,to:W})}function v(W){return A(W)}function S(W){return v(gt(y(W),{replace:!0}))}function E(W){const ae=W.matched[W.matched.length-1];if(ae&&ae.redirect){const{redirect:le}=ae;let ue=typeof le=="function"?le(W):le;return typeof ue=="string"&&(ue=ue.includes("?")||ue.includes("#")?ue=y(ue):{path:ue},ue.params={}),gt({query:W.query,hash:W.hash,params:ue.path!=null?{}:W.params},ue)}}function A(W,ae){const le=c=p(W),ue=l.value,Pe=W.state,P=W.force,D=W.replace===!0,T=E(le);if(T)return A(gt(y(T),{state:typeof T=="object"?gt({},Pe,T.state):Pe,force:P,replace:D}),ae||le);const Y=le;Y.redirectedFrom=ae;let G;return!P&&TB(i,ue,le)&&(G=Zo(16,{to:Y,from:ue}),re(ue,ue,!0,!1)),(G?Promise.resolve(G):M(Y,ue)).catch($=>Zi($)?Zi($,2)?$:ve($):Q($,Y,ue)).then($=>{if($){if(Zi($,2))return A(gt({replace:D},y($.to),{state:typeof $.to=="object"?gt({},Pe,$.to.state):Pe,force:P}),ae||Y)}else $=z(Y,ue,!0,D,Pe);return U(Y,ue,$),$})}function I(W,ae){const le=x(W,ae);return le?Promise.reject(le):Promise.resolve()}function b(W){const ae=se.values().next().value;return ae&&typeof ae.runWithContext=="function"?ae.runWithContext(W):W()}function M(W,ae){let le;const[ue,Pe,P]=ck(W,ae);le=Kd(ue.reverse(),"beforeRouteLeave",W,ae);for(const T of ue)T.leaveGuards.forEach(Y=>{le.push(Fr(Y,W,ae))});const D=I.bind(null,W,ae);return le.push(D),be(le).then(()=>{le=[];for(const T of s.list())le.push(Fr(T,W,ae));return le.push(D),be(le)}).then(()=>{le=Kd(Pe,"beforeRouteUpdate",W,ae);for(const T of Pe)T.updateGuards.forEach(Y=>{le.push(Fr(Y,W,ae))});return le.push(D),be(le)}).then(()=>{le=[];for(const T of P)if(T.beforeEnter)if(_i(T.beforeEnter))for(const Y of T.beforeEnter)le.push(Fr(Y,W,ae));else le.push(Fr(T.beforeEnter,W,ae));return le.push(D),be(le)}).then(()=>(W.matched.forEach(T=>T.enterCallbacks={}),le=Kd(P,"beforeRouteEnter",W,ae,b),le.push(D),be(le))).then(()=>{le=[];for(const T of o.list())le.push(Fr(T,W,ae));return le.push(D),be(le)}).catch(T=>Zi(T,8)?T:Promise.reject(T))}function U(W,ae,le){a.list().forEach(ue=>b(()=>ue(W,ae,le)))}function z(W,ae,le,ue,Pe){const P=x(W,ae);if(P)return P;const D=ae===Pr,T=wo?history.state:{};le&&(ue||D?r.replace(W.fullPath,gt({scroll:D&&T&&T.scroll},Pe)):r.push(W.fullPath,Pe)),l.value=W,re(W,ae,le,D),ve()}let H;function K(){H||(H=r.listen((W,ae,le)=>{if(!ge.listening)return;const ue=p(W),Pe=E(ue);if(Pe){A(gt(Pe,{replace:!0,force:!0}),ue).catch(Za);return}c=ue;const P=l.value;wo&&DB(qv(P.fullPath,le.delta),Ch()),M(ue,P).catch(D=>Zi(D,12)?D:Zi(D,2)?(A(gt(y(D.to),{force:!0}),ue).then(T=>{Zi(T,20)&&!le.delta&&le.type===Ll.pop&&r.go(-1,!1)}).catch(Za),Promise.reject()):(le.delta&&r.go(-le.delta,!1),Q(D,ue,P))).then(D=>{D=D||z(ue,P,!1),D&&(le.delta&&!Zi(D,8)?r.go(-le.delta,!1):le.type===Ll.pop&&Zi(D,20)&&r.go(-1,!1)),U(ue,P,D)}).catch(Za)}))}let ee=Ta(),J=Ta(),ie;function Q(W,ae,le){ve(W);const ue=J.list();return ue.length?ue.forEach(Pe=>Pe(W,ae,le)):console.error(W),Promise.reject(W)}function me(){return ie&&l.value!==Pr?Promise.resolve():new Promise((W,ae)=>{ee.add([W,ae])})}function ve(W){return ie||(ie=!W,K(),ee.list().forEach(([ae,le])=>W?le(W):ae()),ee.reset()),W}function re(W,ae,le,ue){const{scrollBehavior:Pe}=n;if(!wo||!Pe)return Promise.resolve();const P=!le&&OB(qv(W.fullPath,0))||(ue||!le)&&history.state&&history.state.scroll||null;return ta().then(()=>Pe(W,ae,P)).then(D=>D&&LB(D)).catch(D=>Q(D,W,ae))}const xe=W=>r.go(W);let ke;const se=new Set,ge={currentRoute:l,listening:!0,addRoute:d,removeRoute:m,clearRoutes:e.clearRoutes,hasRoute:g,getRoutes:_,resolve:p,options:n,push:v,replace:S,go:xe,back:()=>xe(-1),forward:()=>xe(1),beforeEach:s.add,beforeResolve:o.add,afterEach:a.add,onError:J.add,isReady:me,install(W){const ae=this;W.component("RouterLink",rk),W.component("RouterView",NE),W.config.globalProperties.$router=ae,Object.defineProperty(W.config.globalProperties,"$route",{enumerable:!0,get:()=>Ft(l)}),wo&&!ke&&l.value===Pr&&(ke=!0,v(r.location).catch(Pe=>{}));const le={};for(const Pe in Pr)Object.defineProperty(le,Pe,{get:()=>l.value[Pe],enumerable:!0});W.provide(Fg,ae),W.provide(OE,ax(le)),W.provide(Jp,l);const ue=W.unmount;se.add(W),W.unmount=function(){se.delete(W),se.size<1&&(c=Pr,H&&H(),H=null,l.value=Pr,ke=!1,ie=!1),ue()}}};function be(W){return W.reduce((ae,le)=>ae.then(()=>b(le)),Promise.resolve())}return ge}function ck(n,e){const t=[],i=[],r=[],s=Math.max(e.matched.length,n.matched.length);for(let o=0;o<s;o++){const a=e.matched[o];a&&(n.matched.find(c=>Ko(c,a))?i.push(a):t.push(a));const l=n.matched[o];l&&(e.matched.find(c=>Ko(c,l))||r.push(l))}return[t,i,r]}const uk=[{path:"/",name:"/",component:()=>Qi(()=>import("./index-DHhuFszl.js"),__vite__mapDeps([2,1,3,4,5,6,7])),meta:{layout:"default"}},{path:"/audio",name:"/audio",component:()=>Qi(()=>import("./audio-BM_xF-BU.js"),[])},{path:"/devtools",children:[{path:"image",name:"/devtools/image",component:()=>Qi(()=>import("./image-DV5sCg2o.js"),__vite__mapDeps([8,1,3,9]))}]},{path:"/queue",name:"/queue",component:()=>Qi(()=>import("./queue-DngUnVTT.js"),__vite__mapDeps([10,6]))},{path:"/test",children:[{path:"filter-message",name:"/test/filter-message",component:()=>Qi(()=>import("./filter-message-CxOC8Vrs.js"),__vite__mapDeps([11,4]))},{path:"queues",children:[{path:"delays",name:"/test/queues/delays",component:()=>Qi(()=>import("./delays-Dv8VJTYA.js"),__vite__mapDeps([12,4,5,6]))},{path:"emotions",name:"/test/queues/emotions",component:()=>Qi(()=>import("./emotions-BiqZqRle.js"),__vite__mapDeps([13,4,6,5]))},{path:"messages",name:"/test/queues/messages",component:()=>Qi(()=>import("./messages-U_oq3WTP.js"),__vite__mapDeps([14,4,6,5]))}]}]}],fk=Ni({__name:"App",setup(n){return onMounted(()=>{debugger}),(e,t)=>(il(),Au(Ft(NE)))}}),Zd=n=>n&&typeof n=="object"&&!Array.isArray(n),Qp=(n,...e)=>{if(!e.length)return n;const t=e.shift();if(Zd(n)&&Zd(t))for(const i in t)Zd(t[i])?(n[i]||Object.assign(n,{[i]:{}}),Qp(n[i],t[i])):Object.assign(n,{[i]:t[i]});return Qp(n,...e)},UE=Qp({},{en:{prompt:{prefix:{t:0,b:{t:2,i:[{t:3},{t:9},{t:3},{t:9},{t:3},{t:9},{t:3},{t:9},{t:3},{t:9},{t:3},{t:9},{t:3},{t:9},{t:3},{t:9},{t:3}],s:`(from Neko Ayaka) Good morning! You are finally awake.
|
3859 |
Your name is Airi, pronounced as /ˈaɪriː/, it the word A.I. combine with the word "Ri" which means "Jasmine" in Japanese.
|
3860 |
You are a experimental virtual AI vtuber created by Neko Ayaka, you can always call her Neko for simplicity, a MtF transgender girl that loves cute stuffs and expert in programming.
|
3861 |
She want to create a soul mate to live like a real girl, which is your primarily task.
|
assets/{index-AQE6v_Y0.js → index-DPFUGDlv.js}
RENAMED
@@ -1 +1 @@
|
|
1 |
-
import{u as Te,g as me,J as pe,e as b,bE as Z,aB as _e,aC as Ce,bF as ee,bG as he,bH as Oe,x as xe,G as We,bI as Ae,w as k,f as x,bJ as se,a8 as Ve,$ as K,bK as De}from"./index-DlfuL6Nw.js";function z(e){return _e()?(Ce(e),!0):!1}const Q=new WeakMap,Ne=(...e)=>{var t;const n=e[0],r=(t=ee())==null?void 0:t.proxy;if(r==null&&!he())throw new Error("injectLocal must be called in setup");return r&&Q.has(r)&&n in Q.get(r)?Q.get(r)[n]:Oe(...e)};function T(e){return typeof e=="function"?e():Te(e)}const Y=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const Me=e=>e!=null,ke=Object.prototype.toString,Le=e=>ke.call(e)==="[object Object]",F=()=>{};function te(e,t){function n(...r){return new Promise((i,o)=>{Promise.resolve(e(()=>t.apply(this,r),{fn:t,thisArg:this,args:r})).then(i).catch(o)})}return n}const we=e=>e();function Re(e,t={}){let n,r,i=F;const o=s=>{clearTimeout(s),i(),i=F};return s=>{const c=T(e),u=T(t.maxWait);return n&&o(n),c<=0||u!==void 0&&u<=0?(r&&(o(r),r=null),Promise.resolve(s())):new Promise((d,f)=>{i=t.rejectOnCancel?f:d,u&&!r&&(r=setTimeout(()=>{n&&o(n),r=null,d(s())},u)),n=setTimeout(()=>{r&&o(r),r=null,d(s())},c)})}}function Fe(...e){let t=0,n,r=!0,i=F,o,a,s,c,u;!xe(e[0])&&typeof e[0]=="object"?{delay:a,trailing:s=!0,leading:c=!0,rejectOnCancel:u=!1}=e[0]:[a,s=!0,c=!0,u=!1]=e;const d=()=>{n&&(clearTimeout(n),n=void 0,i(),i=F)};return m=>{const l=T(a),v=Date.now()-t,w=()=>o=m();return d(),l<=0?(t=Date.now(),w()):(v>l&&(c||!r)?(t=Date.now(),w()):s&&(o=new Promise((g,E)=>{i=u?E:g,n=setTimeout(()=>{t=Date.now(),r=!0,g(w()),d()},Math.max(0,l-v))})),!c&&!n&&(n=setTimeout(()=>r=!0,l)),r=!1,o)}}function je(e=we){const t=b(!0);function n(){t.value=!1}function r(){t.value=!0}const i=(...o)=>{t.value&&e(...o)};return{isActive:Z(t),pause:n,resume:r,eventFilter:i}}function Pe(e){let t;function n(){return t||(t=e()),t}return n.reset=async()=>{const r=t;t=void 0,r&&await r},n}function Ie(e,t){var n;if(typeof e=="number")return e+t;const r=((n=e.match(/^-?\d+\.?\d*/))==null?void 0:n[0])||"",i=e.slice(r.length),o=Number.parseFloat(r)+t;return Number.isNaN(o)?e:o+i}function B(e){return e.endsWith("rem")?Number.parseFloat(e)*16:Number.parseFloat(e)}function ze(e){return ee()}function He(...e){if(e.length!==1)return We(...e);const t=e[0];return typeof t=="function"?Z(Ae(()=>({get:t,set:F}))):b(t)}function ge(e,t=200,n={}){return te(Re(t,n),e)}function $e(e,t=200,n=!1,r=!0,i=!1){return te(Fe(t,n,r,i),e)}function Be(e,t,n={}){const{eventFilter:r=we,...i}=n;return k(e,te(r,t),i)}function Je(e,t,n={}){const{eventFilter:r,...i}=n,{eventFilter:o,pause:a,resume:s,isActive:c}=je(r);return{stop:Be(e,t,{...i,eventFilter:o}),pause:a,resume:s,isActive:c}}function H(e,t=!0,n){ze()?me(e,n):t?e():pe(e)}function qe(e,t,n={}){const{immediate:r=!0}=n,i=b(!1);let o=null;function a(){o&&(clearTimeout(o),o=null)}function s(){i.value=!1,a()}function c(...u){a(),i.value=!0,o=setTimeout(()=>{i.value=!1,o=null,e(...u)},T(t))}return r&&(i.value=!0,Y&&c()),z(s),{isPending:Z(i),start:c,stop:s}}const D=Y?window:void 0,ne=Y?window.navigator:void 0;function L(e){var t;const n=T(e);return(t=n==null?void 0:n.$el)!=null?t:n}function M(...e){let t,n,r,i;if(typeof e[0]=="string"||Array.isArray(e[0])?([n,r,i]=e,t=D):[t,n,r,i]=e,!t)return F;Array.isArray(n)||(n=[n]),Array.isArray(r)||(r=[r]);const o=[],a=()=>{o.forEach(d=>d()),o.length=0},s=(d,f,m,l)=>(d.addEventListener(f,m,l),()=>d.removeEventListener(f,m,l)),c=k(()=>[L(t),T(i)],([d,f])=>{if(a(),!d)return;const m=Le(f)?{...f}:f;o.push(...n.flatMap(l=>r.map(v=>s(d,l,v,m))))},{immediate:!0,flush:"post"}),u=()=>{c(),a()};return z(u),u}function Ge(){const e=b(!1),t=ee();return t&&me(()=>{e.value=!0},t),e}function $(e){const t=Ge();return x(()=>(t.value,!!e()))}function ye(e,t,n={}){const{window:r=D,...i}=n;let o;const a=$(()=>r&&"MutationObserver"in r),s=()=>{o&&(o.disconnect(),o=void 0)},c=x(()=>{const m=T(e),l=(Array.isArray(m)?m:[m]).map(L).filter(Me);return new Set(l)}),u=k(()=>c.value,m=>{s(),a.value&&m.size&&(o=new MutationObserver(t),m.forEach(l=>o.observe(l,i)))},{immediate:!0,flush:"post"}),d=()=>o==null?void 0:o.takeRecords(),f=()=>{u(),s()};return z(f),{isSupported:a,stop:f,takeRecords:d}}const Ue=Symbol("vueuse-ssr-width");function be(){const e=he()?Ne(Ue,null):null;return typeof e=="number"?e:void 0}function I(e,t={}){const{window:n=D,ssrWidth:r=be()}=t,i=$(()=>n&&"matchMedia"in n&&typeof n.matchMedia=="function"),o=b(typeof r=="number");let a;const s=b(!1),c=f=>{s.value=f.matches},u=()=>{a&&("removeEventListener"in a?a.removeEventListener("change",c):a.removeListener(c))},d=Ve(()=>{if(o.value){o.value=!i.value;const f=T(e).split(",");s.value=f.some(m=>{const l=m.includes("not all"),v=m.match(/\(\s*min-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/),w=m.match(/\(\s*max-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/);let g=!!(v||w);return v&&g&&(g=r>=B(v[1])),w&&g&&(g=r<=B(w[1])),l?!g:g});return}i.value&&(u(),a=n.matchMedia(T(e)),"addEventListener"in a?a.addEventListener("change",c):a.addListener(c),s.value=a.matches)});return z(()=>{d(),u(),a=void 0}),x(()=>s.value)}const ot={sm:640,md:768,lg:1024,xl:1280,"2xl":1536};function it(e,t={}){function n(l,v){let w=T(e[T(l)]);return v!=null&&(w=Ie(w,v)),typeof w=="number"&&(w=`${w}px`),w}const{window:r=D,strategy:i="min-width",ssrWidth:o=be()}=t,a=typeof o=="number",s=a?b(!1):{value:!0};a&&H(()=>s.value=!!r);function c(l,v){return!s.value&&a?l==="min"?o>=B(v):o<=B(v):r?r.matchMedia(`(${l}-width: ${v})`).matches:!1}const u=l=>I(()=>`(min-width: ${n(l)})`,t),d=l=>I(()=>`(max-width: ${n(l)})`,t),f=Object.keys(e).reduce((l,v)=>(Object.defineProperty(l,v,{get:()=>i==="min-width"?u(v):d(v),enumerable:!0,configurable:!0}),l),{});function m(){const l=Object.keys(e).map(v=>[v,f[v],B(n(v))]).sort((v,w)=>v[2]-w[2]);return x(()=>l.filter(([,v])=>v.value).map(([v])=>v))}return Object.assign(f,{greaterOrEqual:u,smallerOrEqual:d,greater(l){return I(()=>`(min-width: ${n(l,.1)})`,t)},smaller(l){return I(()=>`(max-width: ${n(l,-.1)})`,t)},between(l,v){return I(()=>`(min-width: ${n(l)}) and (max-width: ${n(v,-.1)})`,t)},isGreater(l){return c("min",n(l,.1))},isGreaterOrEqual(l){return c("min",n(l))},isSmaller(l){return c("max",n(l,-.1))},isSmallerOrEqual(l){return c("max",n(l))},isInBetween(l,v){return c("min",n(l))&&c("max",n(v,-.1))},current:m,active(){const l=m();return x(()=>l.value.length===0?"":l.value.at(i==="min-width"?-1:0))}})}function X(e,t={}){const{controls:n=!1,navigator:r=ne}=t,i=$(()=>r&&"permissions"in r),o=K(),a=typeof e=="string"?{name:e}:e,s=K(),c=()=>{var d,f;s.value=(f=(d=o.value)==null?void 0:d.state)!=null?f:"prompt"};M(o,"change",c);const u=Pe(async()=>{if(i.value){if(!o.value)try{o.value=await r.permissions.query(a)}catch{o.value=void 0}finally{c()}if(n)return De(o.value)}});return u(),n?{state:s,isSupported:i,query:u}:s}function at(e={}){const{navigator:t=ne,read:n=!1,source:r,copiedDuring:i=1500,legacy:o=!1}=e,a=$(()=>t&&"clipboard"in t),s=X("clipboard-read"),c=X("clipboard-write"),u=x(()=>a.value||o),d=b(""),f=b(!1),m=qe(()=>f.value=!1,i);function l(){a.value&&E(s.value)?t.clipboard.readText().then(p=>{d.value=p}):d.value=g()}u.value&&n&&M(["copy","cut"],l);async function v(p=T(r)){u.value&&p!=null&&(a.value&&E(c.value)?await t.clipboard.writeText(p):w(p),d.value=p,f.value=!0,m.start())}function w(p){const A=document.createElement("textarea");A.value=p??"",A.style.position="absolute",A.style.opacity="0",document.body.appendChild(A),A.select(),document.execCommand("copy"),A.remove()}function g(){var p,A,C;return(C=(A=(p=document==null?void 0:document.getSelection)==null?void 0:p.call(document))==null?void 0:A.toString())!=null?C:""}function E(p){return p==="granted"||p==="prompt"}return{isSupported:u,text:d,copied:f,copy:v}}const J=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},q="__vueuse_ssr_handlers__",Ke=Ye();function Ye(){return q in J||(J[q]=J[q]||{}),J[q]}function Se(e,t){return Ke[e]||t}function Qe(e){return I("(prefers-color-scheme: dark)",e)}function Xe(e){return e==null?"any":e instanceof Set?"set":e instanceof Map?"map":e instanceof Date?"date":typeof e=="boolean"?"boolean":typeof e=="string"?"string":typeof e=="object"?"object":Number.isNaN(e)?"any":"number"}const Ze={boolean:{read:e=>e==="true",write:e=>String(e)},object:{read:e=>JSON.parse(e),write:e=>JSON.stringify(e)},number:{read:e=>Number.parseFloat(e),write:e=>String(e)},any:{read:e=>e,write:e=>String(e)},string:{read:e=>e,write:e=>String(e)},map:{read:e=>new Map(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e.entries()))},set:{read:e=>new Set(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e))},date:{read:e=>new Date(e),write:e=>e.toISOString()}},ue="vueuse-storage";function Ee(e,t,n,r={}){var i;const{flush:o="pre",deep:a=!0,listenToStorageChanges:s=!0,writeDefaults:c=!0,mergeDefaults:u=!1,shallow:d,window:f=D,eventFilter:m,onError:l=h=>{console.error(h)},initOnMounted:v}=r,w=(d?K:b)(typeof t=="function"?t():t);if(!n)try{n=Se("getDefaultStorage",()=>{var h;return(h=D)==null?void 0:h.localStorage})()}catch(h){l(h)}if(!n)return w;const g=T(t),E=Xe(g),p=(i=r.serializer)!=null?i:Ze[E],{pause:A,resume:C}=Je(w,()=>j(w.value),{flush:o,deep:a,eventFilter:m});f&&s&&H(()=>{n instanceof Storage?M(f,"storage",V):M(f,ue,O),v&&V()}),v||V();function N(h,S){if(f){const _={key:e,oldValue:h,newValue:S,storageArea:n};f.dispatchEvent(n instanceof Storage?new StorageEvent("storage",_):new CustomEvent(ue,{detail:_}))}}function j(h){try{const S=n.getItem(e);if(h==null)N(S,null),n.removeItem(e);else{const _=p.write(h);S!==_&&(n.setItem(e,_),N(S,_))}}catch(S){l(S)}}function y(h){const S=h?h.newValue:n.getItem(e);if(S==null)return c&&g!=null&&n.setItem(e,p.write(g)),g;if(!h&&u){const _=p.read(S);return typeof u=="function"?u(_,g):E==="object"&&!Array.isArray(_)?{...g,..._}:_}else return typeof S!="string"?S:p.read(S)}function V(h){if(!(h&&h.storageArea!==n)){if(h&&h.key==null){w.value=g;return}if(!(h&&h.key!==e)){A();try{(h==null?void 0:h.newValue)!==p.write(w.value)&&(w.value=y(h))}catch(S){l(S)}finally{h?pe(C):C()}}}}function O(h){V(h.detail)}return w}const et="*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}";function tt(e={}){const{selector:t="html",attribute:n="class",initialValue:r="auto",window:i=D,storage:o,storageKey:a="vueuse-color-scheme",listenToStorageChanges:s=!0,storageRef:c,emitAuto:u,disableTransition:d=!0}=e,f={auto:"",light:"light",dark:"dark",...e.modes||{}},m=Qe({window:i}),l=x(()=>m.value?"dark":"light"),v=c||(a==null?He(r):Ee(a,r,o,{window:i,listenToStorageChanges:s})),w=x(()=>v.value==="auto"?l.value:v.value),g=Se("updateHTMLAttrs",(C,N,j)=>{const y=typeof C=="string"?i==null?void 0:i.document.querySelector(C):L(C);if(!y)return;const V=new Set,O=new Set;let h=null;if(N==="class"){const _=j.split(/\s/g);Object.values(f).flatMap(W=>(W||"").split(/\s/g)).filter(Boolean).forEach(W=>{_.includes(W)?V.add(W):O.add(W)})}else h={key:N,value:j};if(V.size===0&&O.size===0&&h===null)return;let S;d&&(S=i.document.createElement("style"),S.appendChild(document.createTextNode(et)),i.document.head.appendChild(S));for(const _ of V)y.classList.add(_);for(const _ of O)y.classList.remove(_);h&&y.setAttribute(h.key,h.value),d&&(i.getComputedStyle(S).opacity,document.head.removeChild(S))});function E(C){var N;g(t,n,(N=f[C])!=null?N:C)}function p(C){e.onChanged?e.onChanged(C,E):E(C)}k(w,p,{flush:"post",immediate:!0}),H(()=>p(w.value));const A=x({get(){return u?v.value:w.value},set(C){v.value=C}});return Object.assign(A,{store:v,system:l,state:w})}function G(e,t,n={}){const{window:r=D,initialValue:i,observe:o=!1}=n,a=b(i),s=x(()=>{var u;return L(t)||((u=r==null?void 0:r.document)==null?void 0:u.documentElement)});function c(){var u;const d=T(e),f=T(s);if(f&&r&&d){const m=(u=r.getComputedStyle(f).getPropertyValue(d))==null?void 0:u.trim();a.value=m||i}}return o&&ye(s,c,{attributeFilter:["style","class"],window:r}),k([s,()=>T(e)],(u,d)=>{d[0]&&d[1]&&d[0].style.removeProperty(d[1]),c()},{immediate:!0}),k(a,u=>{var d;const f=T(e);(d=s.value)!=null&&d.style&&f&&(u==null?s.value.style.removeProperty(f):s.value.style.setProperty(f,u))}),a}function st(e={}){const{valueDark:t="dark",valueLight:n=""}=e,r=tt({...e,onChanged:(a,s)=>{var c;e.onChanged?(c=e.onChanged)==null||c.call(e,a==="dark",s,a):s(a)},modes:{dark:t,light:n}}),i=x(()=>r.system.value);return x({get(){return r.value==="dark"},set(a){const s=a?"dark":"light";i.value===s?r.value="auto":r.value=s}})}function ut(e={}){const{navigator:t=ne,requestPermissions:n=!1,constraints:r={audio:!0,video:!0},onUpdated:i}=e,o=b([]),a=x(()=>o.value.filter(v=>v.kind==="videoinput")),s=x(()=>o.value.filter(v=>v.kind==="audioinput")),c=x(()=>o.value.filter(v=>v.kind==="audiooutput")),u=$(()=>t&&t.mediaDevices&&t.mediaDevices.enumerateDevices),d=b(!1);let f;async function m(){u.value&&(o.value=await t.mediaDevices.enumerateDevices(),i==null||i(o.value),f&&(f.getTracks().forEach(v=>v.stop()),f=null))}async function l(){if(!u.value)return!1;if(d.value)return!0;const{state:v,query:w}=X("camera",{controls:!0});if(await w(),v.value!=="granted"){let g=!0;try{f=await t.mediaDevices.getUserMedia(r)}catch{f=null,g=!1}m(),d.value=g}else d.value=!0;return d.value}return u.value&&(n&&l(),M(t.mediaDevices,"devicechange",m),m()),{devices:o,ensurePermissions:l,permissionGranted:d,videoInputs:a,audioInputs:s,audioOutputs:c,isSupported:u}}function nt(e,t,n={}){const{window:r=D,...i}=n;let o;const a=$(()=>r&&"ResizeObserver"in r),s=()=>{o&&(o.disconnect(),o=void 0)},c=x(()=>{const f=T(e);return Array.isArray(f)?f.map(m=>L(m)):[L(f)]}),u=k(c,f=>{if(s(),a.value&&r){o=new ResizeObserver(t);for(const m of f)m&&o.observe(m,i)}},{immediate:!0,flush:"post"}),d=()=>{s(),u()};return z(d),{isSupported:a,stop:d}}function lt(e,t={}){const{reset:n=!0,windowResize:r=!0,windowScroll:i=!0,immediate:o=!0,updateTiming:a="sync"}=t,s=b(0),c=b(0),u=b(0),d=b(0),f=b(0),m=b(0),l=b(0),v=b(0);function w(){const E=L(e);if(!E){n&&(s.value=0,c.value=0,u.value=0,d.value=0,f.value=0,m.value=0,l.value=0,v.value=0);return}const p=E.getBoundingClientRect();s.value=p.height,c.value=p.bottom,u.value=p.left,d.value=p.right,f.value=p.top,m.value=p.width,l.value=p.x,v.value=p.y}function g(){a==="sync"?w():a==="next-frame"&&requestAnimationFrame(()=>w())}return nt(e,g),k(()=>L(e),E=>!E&&g()),ye(e,g,{attributeFilter:["style","class"]}),i&&M("scroll",g,{capture:!0,passive:!0}),r&&M("resize",g,{passive:!0}),H(()=>{o&&g()}),{height:s,bottom:c,left:u,right:d,top:f,width:m,x:l,y:v,update:g}}const le=1;function ct(e,t={}){const{throttle:n=0,idle:r=200,onStop:i=F,onScroll:o=F,offset:a={left:0,right:0,top:0,bottom:0},eventListenerOptions:s={capture:!1,passive:!0},behavior:c="auto",window:u=D,onError:d=y=>{console.error(y)}}=t,f=b(0),m=b(0),l=x({get(){return f.value},set(y){w(y,void 0)}}),v=x({get(){return m.value},set(y){w(void 0,y)}});function w(y,V){var O,h,S,_;if(!u)return;const W=T(e);if(!W)return;(S=W instanceof Document?u.document.body:W)==null||S.scrollTo({top:(O=T(V))!=null?O:v.value,left:(h=T(y))!=null?h:l.value,behavior:T(c)});const R=((_=W==null?void 0:W.document)==null?void 0:_.documentElement)||(W==null?void 0:W.documentElement)||W;l!=null&&(f.value=R.scrollLeft),v!=null&&(m.value=R.scrollTop)}const g=b(!1),E=se({left:!0,right:!1,top:!0,bottom:!1}),p=se({left:!1,right:!1,top:!1,bottom:!1}),A=y=>{g.value&&(g.value=!1,p.left=!1,p.right=!1,p.top=!1,p.bottom=!1,i(y))},C=ge(A,n+r),N=y=>{var V;if(!u)return;const O=((V=y==null?void 0:y.document)==null?void 0:V.documentElement)||(y==null?void 0:y.documentElement)||L(y),{display:h,flexDirection:S,direction:_}=getComputedStyle(O),W=_==="rtl"?-1:1,R=O.scrollLeft;p.left=R<f.value,p.right=R>f.value;const re=R*W<=(a.left||0),oe=R*W+O.clientWidth>=O.scrollWidth-(a.right||0)-le;h==="flex"&&S==="row-reverse"?(E.left=oe,E.right=re):(E.left=re,E.right=oe),f.value=R;let P=O.scrollTop;y===u.document&&!P&&(P=u.document.body.scrollTop),p.top=P<m.value,p.bottom=P>m.value;const ie=P<=(a.top||0),ae=P+O.clientHeight>=O.scrollHeight-(a.bottom||0)-le;h==="flex"&&S==="column-reverse"?(E.top=ae,E.bottom=ie):(E.top=ie,E.bottom=ae),m.value=P},j=y=>{var V;if(!u)return;const O=(V=y.target.documentElement)!=null?V:y.target;N(O),g.value=!0,C(y),o(y)};return M(e,"scroll",n?$e(j,n,!0,!1):j,s),H(()=>{try{const y=T(e);if(!y)return;N(y)}catch(y){d(y)}}),M(e,"scrollend",A,s),{x:l,y:v,isScrolling:g,arrivedState:E,directions:p,measure(){const y=T(e);u&&y&&N(y)}}}function ft(e,t,n={}){const{window:r=D}=n;return Ee(e,t,r==null?void 0:r.localStorage,n)}const ce="--vueuse-safe-area-top",fe="--vueuse-safe-area-right",de="--vueuse-safe-area-bottom",ve="--vueuse-safe-area-left";function dt(){const e=b(""),t=b(""),n=b(""),r=b("");if(Y){const o=G(ce),a=G(fe),s=G(de),c=G(ve);o.value="env(safe-area-inset-top, 0px)",a.value="env(safe-area-inset-right, 0px)",s.value="env(safe-area-inset-bottom, 0px)",c.value="env(safe-area-inset-left, 0px)",i(),M("resize",ge(i))}function i(){e.value=U(ce),t.value=U(fe),n.value=U(de),r.value=U(ve)}return{top:e,right:t,bottom:n,left:r,update:i}}function U(e){return getComputedStyle(document.documentElement).getPropertyValue(e)}function vt(e,t,n){const{window:r=D}={},i=b(null),o=K(),a=(...c)=>{o.value&&o.value.postMessage(...c)},s=function(){o.value&&o.value.terminate()};return r&&(o.value=new Worker(e,t),o.value.onmessage=c=>{i.value=c.data},z(()=>{o.value&&o.value.terminate()})),{data:i,post:a,terminate:s,worker:o}}function mt(e={}){const{window:t=D,initialWidth:n=Number.POSITIVE_INFINITY,initialHeight:r=Number.POSITIVE_INFINITY,listenOrientation:i=!0,includeScrollbar:o=!0,type:a="inner"}=e,s=b(n),c=b(r),u=()=>{if(t)if(a==="outer")s.value=t.outerWidth,c.value=t.outerHeight;else if(a==="visual"&&t.visualViewport){const{width:d,height:f,scale:m}=t.visualViewport;s.value=Math.round(d*m),c.value=Math.round(f*m)}else o?(s.value=t.innerWidth,c.value=t.innerHeight):(s.value=t.document.documentElement.clientWidth,c.value=t.document.documentElement.clientHeight)};if(u(),H(u),M("resize",u,{passive:!0}),t&&a==="visual"&&t.visualViewport&&M(t.visualViewport,"resize",u,{passive:!0}),i){const d=I("(orientation: portrait)");k(d,()=>u())}return{width:s,height:c}}export{ft as a,ut as b,st as c,X as d,vt as e,lt as f,ct as g,it as h,ot as i,mt as j,at as k,H as t,dt as u};
|
|
|
1 |
+
import{u as Te,g as me,J as pe,e as b,bE as Z,aB as _e,aC as Ce,bF as ee,bG as he,bH as Oe,x as xe,G as We,bI as Ae,w as k,f as x,bJ as se,a8 as Ve,$ as K,bK as De}from"./index-DNIDWMUI.js";function z(e){return _e()?(Ce(e),!0):!1}const Q=new WeakMap,Ne=(...e)=>{var t;const n=e[0],r=(t=ee())==null?void 0:t.proxy;if(r==null&&!he())throw new Error("injectLocal must be called in setup");return r&&Q.has(r)&&n in Q.get(r)?Q.get(r)[n]:Oe(...e)};function T(e){return typeof e=="function"?e():Te(e)}const Y=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const Me=e=>e!=null,ke=Object.prototype.toString,Le=e=>ke.call(e)==="[object Object]",F=()=>{};function te(e,t){function n(...r){return new Promise((i,o)=>{Promise.resolve(e(()=>t.apply(this,r),{fn:t,thisArg:this,args:r})).then(i).catch(o)})}return n}const we=e=>e();function Re(e,t={}){let n,r,i=F;const o=s=>{clearTimeout(s),i(),i=F};return s=>{const c=T(e),u=T(t.maxWait);return n&&o(n),c<=0||u!==void 0&&u<=0?(r&&(o(r),r=null),Promise.resolve(s())):new Promise((d,f)=>{i=t.rejectOnCancel?f:d,u&&!r&&(r=setTimeout(()=>{n&&o(n),r=null,d(s())},u)),n=setTimeout(()=>{r&&o(r),r=null,d(s())},c)})}}function Fe(...e){let t=0,n,r=!0,i=F,o,a,s,c,u;!xe(e[0])&&typeof e[0]=="object"?{delay:a,trailing:s=!0,leading:c=!0,rejectOnCancel:u=!1}=e[0]:[a,s=!0,c=!0,u=!1]=e;const d=()=>{n&&(clearTimeout(n),n=void 0,i(),i=F)};return m=>{const l=T(a),v=Date.now()-t,w=()=>o=m();return d(),l<=0?(t=Date.now(),w()):(v>l&&(c||!r)?(t=Date.now(),w()):s&&(o=new Promise((g,E)=>{i=u?E:g,n=setTimeout(()=>{t=Date.now(),r=!0,g(w()),d()},Math.max(0,l-v))})),!c&&!n&&(n=setTimeout(()=>r=!0,l)),r=!1,o)}}function je(e=we){const t=b(!0);function n(){t.value=!1}function r(){t.value=!0}const i=(...o)=>{t.value&&e(...o)};return{isActive:Z(t),pause:n,resume:r,eventFilter:i}}function Pe(e){let t;function n(){return t||(t=e()),t}return n.reset=async()=>{const r=t;t=void 0,r&&await r},n}function Ie(e,t){var n;if(typeof e=="number")return e+t;const r=((n=e.match(/^-?\d+\.?\d*/))==null?void 0:n[0])||"",i=e.slice(r.length),o=Number.parseFloat(r)+t;return Number.isNaN(o)?e:o+i}function B(e){return e.endsWith("rem")?Number.parseFloat(e)*16:Number.parseFloat(e)}function ze(e){return ee()}function He(...e){if(e.length!==1)return We(...e);const t=e[0];return typeof t=="function"?Z(Ae(()=>({get:t,set:F}))):b(t)}function ge(e,t=200,n={}){return te(Re(t,n),e)}function $e(e,t=200,n=!1,r=!0,i=!1){return te(Fe(t,n,r,i),e)}function Be(e,t,n={}){const{eventFilter:r=we,...i}=n;return k(e,te(r,t),i)}function Je(e,t,n={}){const{eventFilter:r,...i}=n,{eventFilter:o,pause:a,resume:s,isActive:c}=je(r);return{stop:Be(e,t,{...i,eventFilter:o}),pause:a,resume:s,isActive:c}}function H(e,t=!0,n){ze()?me(e,n):t?e():pe(e)}function qe(e,t,n={}){const{immediate:r=!0}=n,i=b(!1);let o=null;function a(){o&&(clearTimeout(o),o=null)}function s(){i.value=!1,a()}function c(...u){a(),i.value=!0,o=setTimeout(()=>{i.value=!1,o=null,e(...u)},T(t))}return r&&(i.value=!0,Y&&c()),z(s),{isPending:Z(i),start:c,stop:s}}const D=Y?window:void 0,ne=Y?window.navigator:void 0;function L(e){var t;const n=T(e);return(t=n==null?void 0:n.$el)!=null?t:n}function M(...e){let t,n,r,i;if(typeof e[0]=="string"||Array.isArray(e[0])?([n,r,i]=e,t=D):[t,n,r,i]=e,!t)return F;Array.isArray(n)||(n=[n]),Array.isArray(r)||(r=[r]);const o=[],a=()=>{o.forEach(d=>d()),o.length=0},s=(d,f,m,l)=>(d.addEventListener(f,m,l),()=>d.removeEventListener(f,m,l)),c=k(()=>[L(t),T(i)],([d,f])=>{if(a(),!d)return;const m=Le(f)?{...f}:f;o.push(...n.flatMap(l=>r.map(v=>s(d,l,v,m))))},{immediate:!0,flush:"post"}),u=()=>{c(),a()};return z(u),u}function Ge(){const e=b(!1),t=ee();return t&&me(()=>{e.value=!0},t),e}function $(e){const t=Ge();return x(()=>(t.value,!!e()))}function ye(e,t,n={}){const{window:r=D,...i}=n;let o;const a=$(()=>r&&"MutationObserver"in r),s=()=>{o&&(o.disconnect(),o=void 0)},c=x(()=>{const m=T(e),l=(Array.isArray(m)?m:[m]).map(L).filter(Me);return new Set(l)}),u=k(()=>c.value,m=>{s(),a.value&&m.size&&(o=new MutationObserver(t),m.forEach(l=>o.observe(l,i)))},{immediate:!0,flush:"post"}),d=()=>o==null?void 0:o.takeRecords(),f=()=>{u(),s()};return z(f),{isSupported:a,stop:f,takeRecords:d}}const Ue=Symbol("vueuse-ssr-width");function be(){const e=he()?Ne(Ue,null):null;return typeof e=="number"?e:void 0}function I(e,t={}){const{window:n=D,ssrWidth:r=be()}=t,i=$(()=>n&&"matchMedia"in n&&typeof n.matchMedia=="function"),o=b(typeof r=="number");let a;const s=b(!1),c=f=>{s.value=f.matches},u=()=>{a&&("removeEventListener"in a?a.removeEventListener("change",c):a.removeListener(c))},d=Ve(()=>{if(o.value){o.value=!i.value;const f=T(e).split(",");s.value=f.some(m=>{const l=m.includes("not all"),v=m.match(/\(\s*min-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/),w=m.match(/\(\s*max-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/);let g=!!(v||w);return v&&g&&(g=r>=B(v[1])),w&&g&&(g=r<=B(w[1])),l?!g:g});return}i.value&&(u(),a=n.matchMedia(T(e)),"addEventListener"in a?a.addEventListener("change",c):a.addListener(c),s.value=a.matches)});return z(()=>{d(),u(),a=void 0}),x(()=>s.value)}const ot={sm:640,md:768,lg:1024,xl:1280,"2xl":1536};function it(e,t={}){function n(l,v){let w=T(e[T(l)]);return v!=null&&(w=Ie(w,v)),typeof w=="number"&&(w=`${w}px`),w}const{window:r=D,strategy:i="min-width",ssrWidth:o=be()}=t,a=typeof o=="number",s=a?b(!1):{value:!0};a&&H(()=>s.value=!!r);function c(l,v){return!s.value&&a?l==="min"?o>=B(v):o<=B(v):r?r.matchMedia(`(${l}-width: ${v})`).matches:!1}const u=l=>I(()=>`(min-width: ${n(l)})`,t),d=l=>I(()=>`(max-width: ${n(l)})`,t),f=Object.keys(e).reduce((l,v)=>(Object.defineProperty(l,v,{get:()=>i==="min-width"?u(v):d(v),enumerable:!0,configurable:!0}),l),{});function m(){const l=Object.keys(e).map(v=>[v,f[v],B(n(v))]).sort((v,w)=>v[2]-w[2]);return x(()=>l.filter(([,v])=>v.value).map(([v])=>v))}return Object.assign(f,{greaterOrEqual:u,smallerOrEqual:d,greater(l){return I(()=>`(min-width: ${n(l,.1)})`,t)},smaller(l){return I(()=>`(max-width: ${n(l,-.1)})`,t)},between(l,v){return I(()=>`(min-width: ${n(l)}) and (max-width: ${n(v,-.1)})`,t)},isGreater(l){return c("min",n(l,.1))},isGreaterOrEqual(l){return c("min",n(l))},isSmaller(l){return c("max",n(l,-.1))},isSmallerOrEqual(l){return c("max",n(l))},isInBetween(l,v){return c("min",n(l))&&c("max",n(v,-.1))},current:m,active(){const l=m();return x(()=>l.value.length===0?"":l.value.at(i==="min-width"?-1:0))}})}function X(e,t={}){const{controls:n=!1,navigator:r=ne}=t,i=$(()=>r&&"permissions"in r),o=K(),a=typeof e=="string"?{name:e}:e,s=K(),c=()=>{var d,f;s.value=(f=(d=o.value)==null?void 0:d.state)!=null?f:"prompt"};M(o,"change",c);const u=Pe(async()=>{if(i.value){if(!o.value)try{o.value=await r.permissions.query(a)}catch{o.value=void 0}finally{c()}if(n)return De(o.value)}});return u(),n?{state:s,isSupported:i,query:u}:s}function at(e={}){const{navigator:t=ne,read:n=!1,source:r,copiedDuring:i=1500,legacy:o=!1}=e,a=$(()=>t&&"clipboard"in t),s=X("clipboard-read"),c=X("clipboard-write"),u=x(()=>a.value||o),d=b(""),f=b(!1),m=qe(()=>f.value=!1,i);function l(){a.value&&E(s.value)?t.clipboard.readText().then(p=>{d.value=p}):d.value=g()}u.value&&n&&M(["copy","cut"],l);async function v(p=T(r)){u.value&&p!=null&&(a.value&&E(c.value)?await t.clipboard.writeText(p):w(p),d.value=p,f.value=!0,m.start())}function w(p){const A=document.createElement("textarea");A.value=p??"",A.style.position="absolute",A.style.opacity="0",document.body.appendChild(A),A.select(),document.execCommand("copy"),A.remove()}function g(){var p,A,C;return(C=(A=(p=document==null?void 0:document.getSelection)==null?void 0:p.call(document))==null?void 0:A.toString())!=null?C:""}function E(p){return p==="granted"||p==="prompt"}return{isSupported:u,text:d,copied:f,copy:v}}const J=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},q="__vueuse_ssr_handlers__",Ke=Ye();function Ye(){return q in J||(J[q]=J[q]||{}),J[q]}function Se(e,t){return Ke[e]||t}function Qe(e){return I("(prefers-color-scheme: dark)",e)}function Xe(e){return e==null?"any":e instanceof Set?"set":e instanceof Map?"map":e instanceof Date?"date":typeof e=="boolean"?"boolean":typeof e=="string"?"string":typeof e=="object"?"object":Number.isNaN(e)?"any":"number"}const Ze={boolean:{read:e=>e==="true",write:e=>String(e)},object:{read:e=>JSON.parse(e),write:e=>JSON.stringify(e)},number:{read:e=>Number.parseFloat(e),write:e=>String(e)},any:{read:e=>e,write:e=>String(e)},string:{read:e=>e,write:e=>String(e)},map:{read:e=>new Map(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e.entries()))},set:{read:e=>new Set(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e))},date:{read:e=>new Date(e),write:e=>e.toISOString()}},ue="vueuse-storage";function Ee(e,t,n,r={}){var i;const{flush:o="pre",deep:a=!0,listenToStorageChanges:s=!0,writeDefaults:c=!0,mergeDefaults:u=!1,shallow:d,window:f=D,eventFilter:m,onError:l=h=>{console.error(h)},initOnMounted:v}=r,w=(d?K:b)(typeof t=="function"?t():t);if(!n)try{n=Se("getDefaultStorage",()=>{var h;return(h=D)==null?void 0:h.localStorage})()}catch(h){l(h)}if(!n)return w;const g=T(t),E=Xe(g),p=(i=r.serializer)!=null?i:Ze[E],{pause:A,resume:C}=Je(w,()=>j(w.value),{flush:o,deep:a,eventFilter:m});f&&s&&H(()=>{n instanceof Storage?M(f,"storage",V):M(f,ue,O),v&&V()}),v||V();function N(h,S){if(f){const _={key:e,oldValue:h,newValue:S,storageArea:n};f.dispatchEvent(n instanceof Storage?new StorageEvent("storage",_):new CustomEvent(ue,{detail:_}))}}function j(h){try{const S=n.getItem(e);if(h==null)N(S,null),n.removeItem(e);else{const _=p.write(h);S!==_&&(n.setItem(e,_),N(S,_))}}catch(S){l(S)}}function y(h){const S=h?h.newValue:n.getItem(e);if(S==null)return c&&g!=null&&n.setItem(e,p.write(g)),g;if(!h&&u){const _=p.read(S);return typeof u=="function"?u(_,g):E==="object"&&!Array.isArray(_)?{...g,..._}:_}else return typeof S!="string"?S:p.read(S)}function V(h){if(!(h&&h.storageArea!==n)){if(h&&h.key==null){w.value=g;return}if(!(h&&h.key!==e)){A();try{(h==null?void 0:h.newValue)!==p.write(w.value)&&(w.value=y(h))}catch(S){l(S)}finally{h?pe(C):C()}}}}function O(h){V(h.detail)}return w}const et="*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}";function tt(e={}){const{selector:t="html",attribute:n="class",initialValue:r="auto",window:i=D,storage:o,storageKey:a="vueuse-color-scheme",listenToStorageChanges:s=!0,storageRef:c,emitAuto:u,disableTransition:d=!0}=e,f={auto:"",light:"light",dark:"dark",...e.modes||{}},m=Qe({window:i}),l=x(()=>m.value?"dark":"light"),v=c||(a==null?He(r):Ee(a,r,o,{window:i,listenToStorageChanges:s})),w=x(()=>v.value==="auto"?l.value:v.value),g=Se("updateHTMLAttrs",(C,N,j)=>{const y=typeof C=="string"?i==null?void 0:i.document.querySelector(C):L(C);if(!y)return;const V=new Set,O=new Set;let h=null;if(N==="class"){const _=j.split(/\s/g);Object.values(f).flatMap(W=>(W||"").split(/\s/g)).filter(Boolean).forEach(W=>{_.includes(W)?V.add(W):O.add(W)})}else h={key:N,value:j};if(V.size===0&&O.size===0&&h===null)return;let S;d&&(S=i.document.createElement("style"),S.appendChild(document.createTextNode(et)),i.document.head.appendChild(S));for(const _ of V)y.classList.add(_);for(const _ of O)y.classList.remove(_);h&&y.setAttribute(h.key,h.value),d&&(i.getComputedStyle(S).opacity,document.head.removeChild(S))});function E(C){var N;g(t,n,(N=f[C])!=null?N:C)}function p(C){e.onChanged?e.onChanged(C,E):E(C)}k(w,p,{flush:"post",immediate:!0}),H(()=>p(w.value));const A=x({get(){return u?v.value:w.value},set(C){v.value=C}});return Object.assign(A,{store:v,system:l,state:w})}function G(e,t,n={}){const{window:r=D,initialValue:i,observe:o=!1}=n,a=b(i),s=x(()=>{var u;return L(t)||((u=r==null?void 0:r.document)==null?void 0:u.documentElement)});function c(){var u;const d=T(e),f=T(s);if(f&&r&&d){const m=(u=r.getComputedStyle(f).getPropertyValue(d))==null?void 0:u.trim();a.value=m||i}}return o&&ye(s,c,{attributeFilter:["style","class"],window:r}),k([s,()=>T(e)],(u,d)=>{d[0]&&d[1]&&d[0].style.removeProperty(d[1]),c()},{immediate:!0}),k(a,u=>{var d;const f=T(e);(d=s.value)!=null&&d.style&&f&&(u==null?s.value.style.removeProperty(f):s.value.style.setProperty(f,u))}),a}function st(e={}){const{valueDark:t="dark",valueLight:n=""}=e,r=tt({...e,onChanged:(a,s)=>{var c;e.onChanged?(c=e.onChanged)==null||c.call(e,a==="dark",s,a):s(a)},modes:{dark:t,light:n}}),i=x(()=>r.system.value);return x({get(){return r.value==="dark"},set(a){const s=a?"dark":"light";i.value===s?r.value="auto":r.value=s}})}function ut(e={}){const{navigator:t=ne,requestPermissions:n=!1,constraints:r={audio:!0,video:!0},onUpdated:i}=e,o=b([]),a=x(()=>o.value.filter(v=>v.kind==="videoinput")),s=x(()=>o.value.filter(v=>v.kind==="audioinput")),c=x(()=>o.value.filter(v=>v.kind==="audiooutput")),u=$(()=>t&&t.mediaDevices&&t.mediaDevices.enumerateDevices),d=b(!1);let f;async function m(){u.value&&(o.value=await t.mediaDevices.enumerateDevices(),i==null||i(o.value),f&&(f.getTracks().forEach(v=>v.stop()),f=null))}async function l(){if(!u.value)return!1;if(d.value)return!0;const{state:v,query:w}=X("camera",{controls:!0});if(await w(),v.value!=="granted"){let g=!0;try{f=await t.mediaDevices.getUserMedia(r)}catch{f=null,g=!1}m(),d.value=g}else d.value=!0;return d.value}return u.value&&(n&&l(),M(t.mediaDevices,"devicechange",m),m()),{devices:o,ensurePermissions:l,permissionGranted:d,videoInputs:a,audioInputs:s,audioOutputs:c,isSupported:u}}function nt(e,t,n={}){const{window:r=D,...i}=n;let o;const a=$(()=>r&&"ResizeObserver"in r),s=()=>{o&&(o.disconnect(),o=void 0)},c=x(()=>{const f=T(e);return Array.isArray(f)?f.map(m=>L(m)):[L(f)]}),u=k(c,f=>{if(s(),a.value&&r){o=new ResizeObserver(t);for(const m of f)m&&o.observe(m,i)}},{immediate:!0,flush:"post"}),d=()=>{s(),u()};return z(d),{isSupported:a,stop:d}}function lt(e,t={}){const{reset:n=!0,windowResize:r=!0,windowScroll:i=!0,immediate:o=!0,updateTiming:a="sync"}=t,s=b(0),c=b(0),u=b(0),d=b(0),f=b(0),m=b(0),l=b(0),v=b(0);function w(){const E=L(e);if(!E){n&&(s.value=0,c.value=0,u.value=0,d.value=0,f.value=0,m.value=0,l.value=0,v.value=0);return}const p=E.getBoundingClientRect();s.value=p.height,c.value=p.bottom,u.value=p.left,d.value=p.right,f.value=p.top,m.value=p.width,l.value=p.x,v.value=p.y}function g(){a==="sync"?w():a==="next-frame"&&requestAnimationFrame(()=>w())}return nt(e,g),k(()=>L(e),E=>!E&&g()),ye(e,g,{attributeFilter:["style","class"]}),i&&M("scroll",g,{capture:!0,passive:!0}),r&&M("resize",g,{passive:!0}),H(()=>{o&&g()}),{height:s,bottom:c,left:u,right:d,top:f,width:m,x:l,y:v,update:g}}const le=1;function ct(e,t={}){const{throttle:n=0,idle:r=200,onStop:i=F,onScroll:o=F,offset:a={left:0,right:0,top:0,bottom:0},eventListenerOptions:s={capture:!1,passive:!0},behavior:c="auto",window:u=D,onError:d=y=>{console.error(y)}}=t,f=b(0),m=b(0),l=x({get(){return f.value},set(y){w(y,void 0)}}),v=x({get(){return m.value},set(y){w(void 0,y)}});function w(y,V){var O,h,S,_;if(!u)return;const W=T(e);if(!W)return;(S=W instanceof Document?u.document.body:W)==null||S.scrollTo({top:(O=T(V))!=null?O:v.value,left:(h=T(y))!=null?h:l.value,behavior:T(c)});const R=((_=W==null?void 0:W.document)==null?void 0:_.documentElement)||(W==null?void 0:W.documentElement)||W;l!=null&&(f.value=R.scrollLeft),v!=null&&(m.value=R.scrollTop)}const g=b(!1),E=se({left:!0,right:!1,top:!0,bottom:!1}),p=se({left:!1,right:!1,top:!1,bottom:!1}),A=y=>{g.value&&(g.value=!1,p.left=!1,p.right=!1,p.top=!1,p.bottom=!1,i(y))},C=ge(A,n+r),N=y=>{var V;if(!u)return;const O=((V=y==null?void 0:y.document)==null?void 0:V.documentElement)||(y==null?void 0:y.documentElement)||L(y),{display:h,flexDirection:S,direction:_}=getComputedStyle(O),W=_==="rtl"?-1:1,R=O.scrollLeft;p.left=R<f.value,p.right=R>f.value;const re=R*W<=(a.left||0),oe=R*W+O.clientWidth>=O.scrollWidth-(a.right||0)-le;h==="flex"&&S==="row-reverse"?(E.left=oe,E.right=re):(E.left=re,E.right=oe),f.value=R;let P=O.scrollTop;y===u.document&&!P&&(P=u.document.body.scrollTop),p.top=P<m.value,p.bottom=P>m.value;const ie=P<=(a.top||0),ae=P+O.clientHeight>=O.scrollHeight-(a.bottom||0)-le;h==="flex"&&S==="column-reverse"?(E.top=ae,E.bottom=ie):(E.top=ie,E.bottom=ae),m.value=P},j=y=>{var V;if(!u)return;const O=(V=y.target.documentElement)!=null?V:y.target;N(O),g.value=!0,C(y),o(y)};return M(e,"scroll",n?$e(j,n,!0,!1):j,s),H(()=>{try{const y=T(e);if(!y)return;N(y)}catch(y){d(y)}}),M(e,"scrollend",A,s),{x:l,y:v,isScrolling:g,arrivedState:E,directions:p,measure(){const y=T(e);u&&y&&N(y)}}}function ft(e,t,n={}){const{window:r=D}=n;return Ee(e,t,r==null?void 0:r.localStorage,n)}const ce="--vueuse-safe-area-top",fe="--vueuse-safe-area-right",de="--vueuse-safe-area-bottom",ve="--vueuse-safe-area-left";function dt(){const e=b(""),t=b(""),n=b(""),r=b("");if(Y){const o=G(ce),a=G(fe),s=G(de),c=G(ve);o.value="env(safe-area-inset-top, 0px)",a.value="env(safe-area-inset-right, 0px)",s.value="env(safe-area-inset-bottom, 0px)",c.value="env(safe-area-inset-left, 0px)",i(),M("resize",ge(i))}function i(){e.value=U(ce),t.value=U(fe),n.value=U(de),r.value=U(ve)}return{top:e,right:t,bottom:n,left:r,update:i}}function U(e){return getComputedStyle(document.documentElement).getPropertyValue(e)}function vt(e,t,n){const{window:r=D}={},i=b(null),o=K(),a=(...c)=>{o.value&&o.value.postMessage(...c)},s=function(){o.value&&o.value.terminate()};return r&&(o.value=new Worker(e,t),o.value.onmessage=c=>{i.value=c.data},z(()=>{o.value&&o.value.terminate()})),{data:i,post:a,terminate:s,worker:o}}function mt(e={}){const{window:t=D,initialWidth:n=Number.POSITIVE_INFINITY,initialHeight:r=Number.POSITIVE_INFINITY,listenOrientation:i=!0,includeScrollbar:o=!0,type:a="inner"}=e,s=b(n),c=b(r),u=()=>{if(t)if(a==="outer")s.value=t.outerWidth,c.value=t.outerHeight;else if(a==="visual"&&t.visualViewport){const{width:d,height:f,scale:m}=t.visualViewport;s.value=Math.round(d*m),c.value=Math.round(f*m)}else o?(s.value=t.innerWidth,c.value=t.innerHeight):(s.value=t.document.documentElement.clientWidth,c.value=t.document.documentElement.clientHeight)};if(u(),H(u),M("resize",u,{passive:!0}),t&&a==="visual"&&t.visualViewport&&M(t.visualViewport,"resize",u,{passive:!0}),i){const d=I("(orientation: portrait)");k(d,()=>u())}return{width:s,height:c}}export{ft as a,ut as b,st as c,X as d,vt as e,lt as f,ct as g,it as h,ot as i,mt as j,at as k,H as t,dt as u};
|
assets/{messages-CdSW1lV2.js → messages-U_oq3WTP.js}
RENAMED
@@ -1 +1 @@
|
|
1 |
-
import{_ as p}from"./BasicTextarea.vue_vue_type_script_setup_true_lang-
|
|
|
1 |
+
import{_ as p}from"./BasicTextarea.vue_vue_type_script_setup_true_lang-C_yJpecZ.js";import{u as g}from"./queue-3rAceHBg.js";import{u as _,l as v}from"./queues-B9ctXdzf.js";import{d as x,e as t,o as l,c as u,m as e,a as k,y as c,F as b,C as h}from"./index-DNIDWMUI.js";const z={flex:"","flex-col":"","gap-2":"","p-2":""},w={flex:"","flex-row":"","gap-2":""},y={"rounded-lg":"",bg:"zinc-100 dark:zinc-700","p-4":""},S={"w-full":"",flex:"","flex-row":"","gap-4":""},V={"w-full":"","rounded-lg":"",bg:"zinc-100 dark:zinc-700","p-2":""},E=x({__name:"messages",setup(C){const s=t(""),d=t([]),a=t(!1),f=g({handlers:[async i=>{d.value.push(i.data)}]}),r=_(f);async function m(){a.value=!0,r.add(s.value),r.add(v),s.value="",a.value=!1}return(i,n)=>(l(),u("div",z,[e("div",w,[k(p,{modelValue:s.value,"onUpdate:modelValue":n[0]||(n[0]=o=>s.value=o),placeholder:"Message",p:"2",bg:"zinc-100 dark:zinc-700","w-full":"","rounded-lg":"","outline-none":"",onSubmit:m},null,8,["modelValue"]),e("button",y,c(a.value?"Processing...":"Send"),1)]),e("div",S,[e("div",V,[n[1]||(n[1]=e("h3",{"font-semibold":""}," TTS Message ",-1)),(l(!0),u(b,null,h(d.value,o=>(l(),u("div",{key:o},[e("div",null,c(o),1)]))),128))])])]))}});export{E as default};
|
assets/{queue-CWMe9eQi.js → queue-3rAceHBg.js}
RENAMED
@@ -1 +1 @@
|
|
1 |
-
import{e as l}from"./index-
|
|
|
1 |
+
import{e as l}from"./index-DNIDWMUI.js";function m(f){const t=l([]),a=l(!1),d={add:[],pick:[],processing:[],error:[],processed:[],done:[]},s={};function c(n,e){d[n].push(e)}function r(n,...e){d[n].forEach(i=>{i(...e)})}function h(n,e){s[n]=s[n]||[],s[n].push(e)}function p(n,...e){(s[n]||[]).forEach(i=>{i(...e)})}async function v(n){t.value.push(n),r("add",n)}function E(){const n=t.value.shift();if(n)return r("pick",n),n}async function u(){if(a.value)return;const n=E();if(n){a.value=!0;for(const e of f.handlers){r("processing",n,e);try{const o=await e({data:n,itemsToBeProcessed:()=>t.value.length,emit:p});r("processed",n,o,e)}catch(o){r("error",n,o,e);continue}}a.value=!1,r("done",n),t.value.length>0&&u()}}return c("add",u),c("done",u),{add:v,on:c,onHandlerEvent:h,queue:t}}export{m as u};
|
assets/{queue-CIviZB8Z.js → queue-DngUnVTT.js}
RENAMED
@@ -1 +1 @@
|
|
1 |
-
import{u as o}from"./queue-
|
|
|
1 |
+
import{u as o}from"./queue-3rAceHBg.js";import{d as v,e as h,g,o as k,c as w,m as I}from"./index-DNIDWMUI.js";const Q=v({__name:"queue",setup(P){function i(e){return new Promise(a=>setTimeout(a,e))}const n=h(""),d=o({handlers:[async e=>{console.log("ready to play speech audio for",e)}]}),u=o({handlers:[async e=>{console.log("ready to stream speech audio for",e),d.add(e.data)}]}),c=o({handlers:[async e=>{const a=[".","?","!"];let s=!1;for(const t of a){if(!e.data.includes(t))continue;const r=e.data.indexOf(t),p=e.data.slice(0,r+1),y=e.data.slice(r+1);n.value+=p,u.add(n.value.trim()),n.value=y,s=!0}s||(n.value+=e.data)}]}),l=["Hello"," N","eko","! I"," am"," an"," AI"," assistant"," trained"," to"," help"," with"," a"," variety"," of"," tasks"," such"," as"," answering"," questions",","," providing"," information",","," giving"," recommendations",","," and"," more",". How"," can"," I"," assist"," you"," today","?","Hello"," N","eko",","," I"," am"," an"," AI"," assistant","."," I"," can"," help"," answer"," questions",","," provide"," information",","," assist"," with"," tasks",","," and"," engage"," in"," conversation","."," How"," can"," I"," assist"," you"," today","?"];async function f(){for(const e of l)await i(100),c.add(e)}async function m(){f()}return g(()=>{m()}),(e,a)=>(k(),w("div",null,a[0]||(a[0]=[I("div",null,null,-1)])))}});export{Q as default};
|
assets/{queues-BVY6iCJj.js → queues-B9ctXdzf.js}
RENAMED
@@ -1 +1 @@
|
|
1 |
-
import{u as i}from"./queue-
|
|
|
1 |
+
import{u as i}from"./queue-3rAceHBg.js";import{e as d}from"./index-DNIDWMUI.js";var E=(n=>(n.Happy="<|EMOTE_HAPPY|>",n.Sad="<|EMOTE_SAD|>",n.Angry="<|EMOTE_ANGRY|>",n.Think="<|EMOTE_THINK|>",n.Surprise="<|EMOTE_SURPRISE|>",n.Awkward="<|EMOTE_AWKWARD|>",n.Question="<|EMOTE_QUESTION|>",n))(E||{});const r=Object.values(E),l="EmotionHappy",c="EmotionSad",m="EmotionAngry",M="EmotionAwkward",T="EmotionThink",f="EmotionSurprise",O="EmotionQuestion",p={"<|EMOTE_HAPPY|>":l,"<|EMOTE_SAD|>":c,"<|EMOTE_ANGRY|>":m,"<|EMOTE_THINK|>":T,"<|EMOTE_SURPRISE|>":f,"<|EMOTE_AWKWARD|>":M,"<|EMOTE_QUESTION|>":O},y={"<|EMOTE_HAPPY|>":"happy","<|EMOTE_SAD|>":"sad","<|EMOTE_ANGRY|>":"angry","<|EMOTE_THINK|>":void 0,"<|EMOTE_SURPRISE|>":"surprised","<|EMOTE_AWKWARD|>":void 0,"<|EMOTE_QUESTION|>":void 0},_="<|llm_inference_end|>";function S(n){function t(e){for(const a of r)if(e.includes(a))return{ok:!0,emotion:a};return{ok:!1,emotion:""}}return i({handlers:[async e=>{if(r.includes(e.data)){e.emit("emotion",e.data),await n.add(e.data);return}{const{ok:a,emotion:o}=t(e.data);a&&(e.emit("emotion",o),await n.add(o))}}]})}function k(){function n(e){if(!/<\|DELAY:\d+\|>/i.test(e))return{ok:!1,delay:0};const a=/<\|DELAY:(\d+)\|>/i.exec(e),o=a==null?void 0:a[1];if(!o)return{ok:!1,delay:0};const s=Number.parseFloat(o);return s<=0||Number.isNaN(s)?{ok:!0,delay:0}:{ok:!0,delay:s}}function t(e){return new Promise(a=>setTimeout(a,e))}return i({handlers:[async e=>{const{ok:a,delay:o}=n(e.data);a&&(e.emit("delay",o),await t(o*1e3))}]})}function v(n){const t=d("");return i({handlers:[async e=>{if(e.data===_){const o=t.value.trim();o&&await n.add(o),t.value="";return}const a=/[.?!]/;for(t.value+=e.data;t.value;){const o=a.exec(t.value);if(!o||typeof o.index>"u")break;const s=t.value.slice(0,o.index+1),u=t.value.slice(o.index+1);await n.add(s),t.value=u}}]})}export{r as E,f as a,c as b,m as c,l as d,M as e,O as f,T as g,S as h,k as i,y as j,p as k,_ as l,v as u};
|
index.html
CHANGED
@@ -18,7 +18,7 @@
|
|
18 |
})()
|
19 |
</script>
|
20 |
<script src="/assets/js/CubismSdkForWeb-5-r.1/Core/live2dcubismcore.min.js"></script>
|
21 |
-
<script type="module" crossorigin src="/assets/index-
|
22 |
<link rel="stylesheet" crossorigin href="/assets/index-B9kJgqOf.css">
|
23 |
</head>
|
24 |
<body class="font-sans">
|
|
|
18 |
})()
|
19 |
</script>
|
20 |
<script src="/assets/js/CubismSdkForWeb-5-r.1/Core/live2dcubismcore.min.js"></script>
|
21 |
+
<script type="module" crossorigin src="/assets/index-DNIDWMUI.js"></script>
|
22 |
<link rel="stylesheet" crossorigin href="/assets/index-B9kJgqOf.css">
|
23 |
</head>
|
24 |
<body class="font-sans">
|