diff --git a/assets/AnimatedWave-CWn5JVD4.js b/assets/AnimatedWave-CWn5JVD4.js new file mode 100644 index 0000000000000000000000000000000000000000..b365aef767bca6820e12184581fd6e7f9b990616 --- /dev/null +++ b/assets/AnimatedWave-CWn5JVD4.js @@ -0,0 +1,3 @@ +import{Fragment as e,RouterLink as t,__plugin_vue_export_helper_default as n,computed as r,createBaseVNode as i,createCommentVNode as a,createElementBlock as o,createVNode as s,defineComponent as c,nextTick as l,normalizeClass as u,normalizeStyle as d,onMounted as f,openBlock as p,ref as m,renderList as h,renderSlot as g,resolveDirective as _,storeToRefs as v,toDisplayString as y,unref as b,useDevicesList as x,useElementBounding as S,useI18n as C,useScroll as w,useSettings as T,vModelCheckbox as E,vModelRadio as D,watch as O,withCtx as k,withDirectives as A}from"./index-CsmT0L1K.js";import{useAudioContext as ee,useChatStore as j,useConsciousnessStore as M,useProvidersStore as N}from"./stores-2H61GqXP.js";import{HeaderLink_default as P}from"./HeaderLink-Dws9YKmo.js";import{TransitionVertical_default as te}from"./Button-D3cjyOEe.js";import{Basic_default as F}from"./Basic-MLnzojs5.js";import{useMarkdown as I,useMicVAD as L,useWhisper as ne}from"./composables-CgcEyUWo.js";const R={},z={class:`cross-background-container`};function B(e,t){return p(),o(`div`,z,[g(e.$slots,`default`,{},void 0,!0)])}var V=n(R,[[`render`,B],[`__scopeId`,`data-v-455eb62c`]]);const H={"mb-1":``,"w-full":``,"gap-2":``},U={"w-full":``};var W=c({__name:`Header`,setup(e){return(e,n)=>(p(),o(`header`,H,[i(`div`,U,[s(P)]),s(b(t),{class:`m-1 block max-h-[10lh] min-h-[1lh] rounded-lg bg-neutral-100 p-2 text-lg text-neutral-500 outline-none dark:bg-neutral-800 dark:text-neutral-400`,to:`/settings`},{default:k(()=>n[0]||=[i(`div`,{"i-solar:settings-minimalistic-bold-duotone":``},null,-1)]),_:1,__:[0]})]))}}),G=W,re=`/assets/worker-Bq31kV70.js`;const K={relative:``,px:`{l().then(()=>{c.update(),u.value=c.height.value})}),x(async()=>{l().then(()=>{c.update(),u.value=c.height.value})}),(t,c)=>{let l=_(`auto-animate`);return p(),o(`div`,K,[c[2]||=i(`div`,{"flex-1":``},null,-1),A((p(),o(`div`,{ref_key:`chatHistoryRef`,ref:n,"h-full":``,"w-full":``,flex:`~ col`,"overflow-scroll":``},[c[1]||=i(`div`,{"flex-1":``},null,-1),(p(!0),o(e,null,h(b(r),(e,t)=>(p(),o(`div`,{key:t,"mb-2":``},[e.role===`error`?(p(),o(`div`,q,[i(`div`,J,[i(`div`,Y,[i(`div`,X,[i(`span`,Z,y(b(d)(`stage.chat.message.character-name.core-system`)),1)]),c[0]||=i(`div`,{"i-solar:danger-triangle-bold-duotone":``,"text-violet-500":``},null,-1)]),b(s)&&t===b(r).length-1?(p(),o(`div`,Q)):(p(),o(`div`,{key:1,class:`markdown-content break-words text-violet-500`,text:`base {let n=new FileReader;n.onload=()=>{let t=n.result.split(`,`)[1];e(t)},n.onerror=t,n.readAsDataURL(i)})}function $(e,t,n){for(let r=0;r{if(!e||!e.trim())return;let t=g.getProviderConfig(_.value);await V(e,{chatProvider:g.getProviderInstance(_.value),model:S.value,providerConfig:t})}});async function J(){if(!(!n.value.trim()||d.value))try{let e=g.getProviderConfig(_.value);await V(n.value,{chatProvider:g.getProviderInstance(_.value),model:S.value,providerConfig:e})}catch(e){U.value.pop(),U.value.push({role:`error`,content:e.message})}}let{destroy:Y,start:X}=L(B,{onSpeechStart:()=>{r.value=!0},onVADMisfire:()=>{r.value=!1},onSpeechEnd:e=>{r.value=!1,Z(e)},auto:!1});async function Z(e){await W.resume();let t=await _e(e,W.sampleRate);K({type:`generate`,data:{audio:t,language:`en`}})}async function Q(e){let t=e.target,n=P.value.find(e=>e.deviceId===t.value);if(!n){R.value=void 0;return}R.value=n}return O(z,async e=>{e===`false`&&(Y(),q())}),O(l,async e=>{e&&await I()}),f(()=>{X()}),H(async()=>{n.value=``}),(t,f)=>(p(),o(`div`,ye,[i(`fieldset`,be,[i(`label`,{class:u([c.value===`chat`?`bg-primary-100 dark:bg-primary-900`:`bg-white dark:bg-primary-950`,c.value===`chat`?`text-primary-500 dark:text-primary-500`:``,{"transition-colors-none ":b(w)}]),flex:`~ row`,checked:c.value===`chat`,"aria-checked":c.value===`chat`,border:`solid l-2 t-2 b-2 primary-100 dark:primary-900`,bg:`hover:primary-100 dark:hover:primary-900`,text:`primary-300 hover:primary-500 dark:primary-300/50 dark:hover:primary-500`,transition:`all duration-250 ease-in-out`,"cursor-pointer":``,"items-center":``,"gap-1":``,"rounded-l-lg":``,"px-2":``},[A(i(`input`,{"onUpdate:modelValue":f[0]||=e=>c.value=e,type:`radio`,name:`tab`,value:`chat`,hidden:``},null,512),[[D,c.value]]),f[7]||=i(`div`,{"i-solar:dialog-2-bold-duotone":``,text:`2xl`,transform:`translate-y--2`},null,-1),i(`div`,Se,[i(`span`,Ce,y(b(G)(`stage.chat.tabs.chat`)),1)])],10,xe),i(`label`,{class:u([c.value===`custom`?`bg-primary-100 dark:bg-primary-900`:`bg-white dark:bg-primary-950`,c.value===`custom`?`text-primary-500 dark:text-primary-500`:``,{"transition-colors-none ":b(w)}]),flex:`~ row`,checked:c.value===`custom`,"aria-checked":c.value===`custom`,border:`solid t-2 b-2 primary-100 dark:primary-900`,bg:`hover:primary-100 dark:hover:primary-900`,text:`primary-300 hover:primary-500 dark:primary-300/50 dark:hover:primary-500`,transition:`all duration-250 ease-in-out`,"cursor-pointer":``,"items-center":``,"gap-1":``,"px-2":``},[A(i(`input`,{"onUpdate:modelValue":f[1]||=e=>c.value=e,type:`radio`,name:`tab`,value:`custom`,hidden:``},null,512),[[D,c.value]]),f[8]||=i(`div`,{"i-solar:star-fall-2-bold-duotone":``,text:`2xl`,transform:`translate-y--2`},null,-1),i(`div`,Te,[i(`span`,null,y(b(G)(`stage.chat.tabs.custom`)),1)])],10,we),i(`label`,{class:u([c.value===`clothes`?`bg-primary-100 dark:bg-primary-900`:`bg-white dark:bg-primary-950`,c.value===`clothes`?`text-primary-500 dark:text-primary-500`:``,{"transition-colors-none ":b(w)}]),flex:`~ row`,checked:c.value===`clothes`,"aria-checked":c.value===`clothes`,border:`solid r-2 t-2 b-2 primary-100 dark:primary-900`,bg:`hover:primary-100 dark:hover:primary-900`,text:`primary-300 hover:primary-500 dark:primary-300/50 dark:hover:primary-500`,transition:`all duration-250 ease-in-out`,"cursor-pointer":``,"items-center":``,"gap-1":``,"rounded-r-lg":``,"px-2":``},[A(i(`input`,{"onUpdate:modelValue":f[2]||=e=>c.value=e,type:`radio`,name:`tab`,value:`clothes`,hidden:``},null,512),[[D,c.value]]),f[9]||=i(`div`,{"i-solar:magic-stick-3-bold-duotone":``,text:`2xl`,transform:`translate-y--2`},null,-1),i(`div`,De,[i(`span`,null,y(b(G)(`stage.chat.tabs.clothes`)),1)])],10,Ee)]),i(`div`,Oe,[i(`div`,ke,[s(ge,{"h-full":``,"flex-1":``,"p-4":``,w:`full`,"max-h":`n.value=e,placeholder:b(G)(`stage.message`),text:`primary-300 hover:primary-500 dark:primary-300/50 dark:hover:primary-500 placeholder:primary-300 placeholder:hover:primary-500 placeholder:dark:primary-300/50 placeholder:dark:hover:primary-500`,bg:`primary-100 dark:primary-400/20`,"min-h":`[100px]`,"max-h":`[300px]`,"w-full":``,"rounded-t-xl":``,"p-4":``,"font-medium":``,"outline-none":``,transition:`all duration-250 ease-in-out placeholder:all placeholder:duration-250 placeholder:ease-in-out`,class:u({"transition-colors-none placeholder:transition-colors-none":b(w)}),onSubmit:J,onCompositionstart:f[4]||=e=>d.value=!0,onCompositionend:f[5]||=e=>d.value=!1},null,8,[`modelValue`,`placeholder`,`class`])])])]),i(`div`,je,[i(`div`,Me,[s(b(te),null,{default:k(()=>[l.value?(p(),o(`fieldset`,Ne,[(p(!0),o(e,null,h(b(P),(e,t)=>(p(),o(`label`,{key:t,class:`[&_div_span]:dark:hover:bg-cyan-300 [&_div_span]:dark:hover:bg-cyan-900`},[i(`input`,{type:`radio`,name:`audioInput`,value:e.deviceId,hidden:``,onChange:Q},null,40,Pe),i(`div`,Fe,[i(`div`,Ie,[e.deviceId===b(B)?(p(),o(`div`,Le)):a(``,!0)]),i(`span`,{"inline-block":``,class:u([e.deviceId===b(B)?`cyan-400 dark:text-white`:`cyan-400/50 dark:text-white/50`]),transition:`all duration-250 ease-in-out`},y(e.label),3)])]))),128))])):a(``,!0)]),_:1}),i(`label`,{bg:`complementary-100 hover:complementary-200 dark:complementary-800 dark:hover:complementary-700`,transition:`all duration-250 ease-in-out`,class:u({"transition-colors-none":b(w)}),text:`complementary-400`,"h-fit":``,flex:``,"cursor-pointer":``,"items-center":``,"justify-center":``,"gap-2":``,"rounded-full":``,"px-4":``,"py-2":``},[A(i(`input`,{"onUpdate:modelValue":f[6]||=e=>l.value=e,type:`checkbox`,hidden:``},null,512),[[E,l.value]]),f[10]||=i(`div`,{"i-solar:microphone-2-bold-duotone":``},null,-1),i(`div`,null,[r.value?(p(),o(`span`,ze,`Listening...`)):(p(),o(`span`,Re,y(b(G)(`settings.microphone`)),1))])],2)])])]))}}),Ve=n(Be,[[`__scopeId`,`data-v-ac81fc73`]]);const He={py:`1`,flex:`~ col`,rounded:`lg`,"overflow-hidden":``},Ue={key:0,flex:``,mr:`12`},We={flex:`~ col`,border:`4 solid primary-200/50 dark:primary-500/50`,shadow:`md primary-200/50 dark:none`,"min-w-20":``,"rounded-lg":``,"px-2":``,"py-1":``,"backdrop-blur-sm":``,h:`unset {l().then(()=>{c.update(),u.value=c.height.value})}),g(async()=>{l().then(()=>{c.update(),u.value=c.height.value})}),(t,c)=>{let l=_(`auto-animate`);return p(),o(`div`,He,[c[1]||=i(`div`,{"flex-1":``},null,-1),A((p(),o(`div`,{ref_key:`chatHistoryRef`,ref:n,"h-full":``,"w-full":``,"max-h":`30vh`,flex:`~ col`,"overflow-scroll":``,class:`chat-history`},[c[0]||=i(`div`,{"flex-1":``},null,-1),(p(!0),o(e,null,h(b(s),(e,t)=>(p(),o(`div`,{key:t,"mb-2":``},[e.role===`assistant`?(p(),o(`div`,Ue,[i(`div`,We,[i(`div`,null,[i(`span`,Ge,y(b(r)(`stage.chat.message.character-name.airi`)),1)]),e.content?(p(),o(`div`,{key:0,class:`markdown-content`,text:`base {n.value=!0},onVADMisfire:()=>{n.value=!1},onSpeechEnd:e=>{n.value=!1,D(e)},auto:!1});function D(e){alert(`Transcription is not implemented yet`)}return O(d,async e=>{e===`false`&&w()}),y(async()=>{t.value=``}),f(()=>{E()}),(e,n)=>(p(),o(`div`,null,[i(`div`,tt,[s(et,{absolute:``,"left-0":``,"top-0":``,transform:`translate-y-[-100%]`,"w-full":``}),i(`div`,nt,[s(b(F),{modelValue:t.value,"onUpdate:modelValue":n[0]||=e=>t.value=e,placeholder:b(x)(`stage.message`),border:`solid 2 primary-100 dark:primary-400/20`,text:`primary-300 hover:primary-500 dark:primary-300/50 dark:hover:primary-500 placeholder:primary-300 placeholder:hover:primary-500 placeholder:dark:primary-300/50 placeholder:dark:hover:primary-500`,bg:`primary-100 dark:primary-400/20`,"max-h":`[10lh]`,"min-h":`[1lh]`,"w-full":``,"resize-none":``,"overflow-y-scroll":``,"rounded-xl":``,"p-2":``,"font-medium":``,"outline-none":``,transition:`all duration-250 ease-in-out placeholder:all placeholder:duration-250 placeholder:ease-in-out`,class:u({"transition-colors-none placeholder:transition-colors-none":b(g)}),onSubmit:S,onCompositionstart:n[1]||=e=>r.value=!0,onCompositionend:n[2]||=e=>r.value=!1},null,8,[`modelValue`,`placeholder`,`class`])])])]))}}),it=rt;const at={class:`relative`},ot={absolute:``,"left-0":``,"right-0":``,"top-0":``,"w-full":``,"overflow-hidden":``};var st=c({__name:`AnimatedWave`,props:{height:{default:40},amplitude:{default:14},waveLength:{default:250},fillColor:{default:`oklch(95% 0.10 var(--chromatic-hue))`},direction:{default:`down`},movementDirection:{default:`left`},animationSpeed:{default:50}},setup(e){let t=e,n=m(t.height),a=m(t.amplitude),s=m(t.waveLength),c=m(t.fillColor),l=m(t.direction),u=m(t.movementDirection);function f(e,t,n,r,i){let a=[],o=Math.ceil(e/r),s=o*r,c=1,l=i===`up`?n:t-n;a.push(`M 0 ${l}`);let u=Math.PI*2/r;for(let e=0;e<=s;e+=c){let t=n*Math.sin(u*e),r=i===`up`?l-t:l+t;a.push(`L ${e} ${r}`)}let d=i===`up`?t:0;return a.push(`L ${s} ${d}`),a.push(`L 0 ${d} Z`),a.join(` `)}let h=r(()=>n.value+a.value*2),_=r(()=>{let e=` + + `;return`url(data:image/svg+xml;base64,${btoa(e)})`});return O(()=>[t.height,t.amplitude,t.waveLength,t.fillColor,t.direction,t.movementDirection],()=>{n.value=t.height,a.value=t.amplitude,s.value=t.waveLength,c.value=t.fillColor,l.value=t.direction,u.value=t.movementDirection},{immediate:!0}),(t,n)=>(p(),o(`div`,at,[g(t.$slots,`default`,{},void 0,!0),i(`div`,ot,[i(`div`,{class:`wave`,style:d({background:c.value,height:`${h.value}px`,maskImage:_.value,WebkitMaskImage:_.value,"--wave-translate":`${-s.value}px`,"--animation-duration":`${s.value/e.animationSpeed}s`,"animation-direction":u.value===`left`?`normal`:`reverse`})},null,4)])]))}}),ct=n(st,[[`__scopeId`,`data-v-f58b462e`]]);export{ct as AnimatedWave_default,V as Cross_default,G as Header_default,Ve as InteractiveArea_default,it as MobileInteractiveArea_default}; \ No newline at end of file diff --git a/assets/AnimatedWave-Cq8X0oi8.js b/assets/AnimatedWave-Cq8X0oi8.js deleted file mode 100644 index 310a5177c03d501c9d8f40f46b511d15a000c20d..0000000000000000000000000000000000000000 --- a/assets/AnimatedWave-Cq8X0oi8.js +++ /dev/null @@ -1,3 +0,0 @@ -import{Fragment as e,RouterLink as t,__plugin_vue_export_helper_default as n,computed as r,createBaseVNode as i,createCommentVNode as a,createElementBlock as o,createVNode as s,defineComponent as c,nextTick as l,normalizeClass as u,normalizeStyle as d,onMounted as f,openBlock as p,ref as m,renderList as h,renderSlot as g,resolveDirective as _,storeToRefs as v,toDisplayString as y,unref as b,useDevicesList as x,useElementBounding as S,useI18n as C,useScroll as w,useSettings as T,vModelCheckbox as E,vModelRadio as D,watch as O,withCtx as k,withDirectives as A}from"./index-CuCRViVh.js";import{useAudioContext as ee,useChatStore as j,useConsciousnessStore as M,useProvidersStore as N}from"./stores-m0eA85gd.js";import{HeaderLink_default as P}from"./HeaderLink-BuxOmtb4.js";import{TransitionVertical_default as te}from"./Button-DFhzbYVt.js";import{Basic_default as F}from"./Basic-SuYkQxAJ.js";import{useMarkdown as I,useMicVAD as L,useWhisper as ne}from"./composables-Cgvkd8lL.js";const R={},z={class:`cross-background-container`};function B(e,t){return p(),o(`div`,z,[g(e.$slots,`default`,{},void 0,!0)])}var V=n(R,[[`render`,B],[`__scopeId`,`data-v-455eb62c`]]);const H={"mb-1":``,"w-full":``,"gap-2":``},U={"w-full":``};var W=c({__name:`Header`,setup(e){return(e,n)=>(p(),o(`header`,H,[i(`div`,U,[s(P)]),s(b(t),{class:`m-1 block max-h-[10lh] min-h-[1lh] rounded-lg bg-neutral-100 p-2 text-lg text-neutral-500 outline-none dark:bg-neutral-800 dark:text-neutral-400`,to:`/settings`},{default:k(()=>n[0]||=[i(`div`,{"i-solar:settings-minimalistic-bold-duotone":``},null,-1)]),_:1,__:[0]})]))}}),G=W,re=`/assets/worker-Bq31kV70.js`;async function ie(e,t){let n=new ArrayBuffer(44+e.length*2),r=new DataView(n);K(r,0,`RIFF`),r.setUint32(4,36+e.length*2,!0),K(r,8,`WAVE`),K(r,12,`fmt `),r.setUint32(16,16,!0),r.setUint16(20,1,!0),r.setUint16(22,1,!0),r.setUint32(24,t,!0),r.setUint32(28,t*2,!0),r.setUint16(32,2,!0),r.setUint16(34,16,!0),K(r,36,`data`),r.setUint32(40,e.length*2,!0),q(r,44,e);let i=new Blob([r],{type:`audio/wav`});return new Promise((e,t)=>{let n=new FileReader;n.onload=()=>{let t=n.result.split(`,`)[1];e(t)},n.onerror=t,n.readAsDataURL(i)})}function K(e,t,n){for(let r=0;r{l().then(()=>{c.update(),u.value=c.height.value})}),x(async()=>{l().then(()=>{c.update(),u.value=c.height.value})}),(t,c)=>{let l=_(`auto-animate`);return p(),o(`div`,J,[c[2]||=i(`div`,{"flex-1":``},null,-1),A((p(),o(`div`,{ref_key:`chatHistoryRef`,ref:n,"h-full":``,"w-full":``,flex:`~ col`,"overflow-scroll":``},[c[1]||=i(`div`,{"flex-1":``},null,-1),(p(!0),o(e,null,h(b(r),(e,t)=>(p(),o(`div`,{key:t,"mb-2":``},[e.role===`error`?(p(),o(`div`,Y,[i(`div`,X,[i(`div`,Z,[i(`div`,Q,[i(`span`,ae,y(b(d)(`stage.chat.message.character-name.core-system`)),1)]),c[0]||=i(`div`,{"i-solar:danger-triangle-bold-duotone":``,"text-violet-500":``},null,-1)]),b(s)&&t===b(r).length-1?(p(),o(`div`,oe)):(p(),o(`div`,{key:1,class:`markdown-content break-words text-violet-500`,text:`base {if(!e||!e.trim())return;let t=g.getProviderConfig(_.value);await V(e,{chatProvider:g.getProviderInstance(_.value),model:S.value,providerConfig:t})}});async function J(){if(!(!n.value.trim()||d.value))try{let e=g.getProviderConfig(_.value);await V(n.value,{chatProvider:g.getProviderInstance(_.value),model:S.value,providerConfig:e})}catch(e){U.value.pop(),U.value.push({role:`error`,content:e.message})}}let{destroy:Y,start:X}=L(B,{onSpeechStart:()=>{r.value=!0},onVADMisfire:()=>{r.value=!1},onSpeechEnd:e=>{r.value=!1,Z(e)},auto:!1});async function Z(e){await W.resume();let t=await ie(e,W.sampleRate);K({type:`generate`,data:{audio:t,language:`en`}})}async function Q(e){let t=e.target,n=P.value.find(e=>e.deviceId===t.value);if(!n){R.value=void 0;return}R.value=n}return O(z,async e=>{e===`false`&&(Y(),q())}),O(l,async e=>{e&&await I()}),f(()=>{X()}),H(async()=>{n.value=``}),(t,f)=>(p(),o(`div`,be,[i(`fieldset`,xe,[i(`label`,{class:u([c.value===`chat`?`bg-primary-100 dark:bg-primary-900`:`bg-white dark:bg-primary-950`,c.value===`chat`?`text-primary-500 dark:text-primary-500`:``,{"transition-colors-none ":b(w)}]),flex:`~ row`,checked:c.value===`chat`,"aria-checked":c.value===`chat`,border:`solid l-2 t-2 b-2 primary-100 dark:primary-900`,bg:`hover:primary-100 dark:hover:primary-900`,text:`primary-300 hover:primary-500 dark:primary-300/50 dark:hover:primary-500`,transition:`all duration-250 ease-in-out`,"cursor-pointer":``,"items-center":``,"gap-1":``,"rounded-l-lg":``,"px-2":``},[A(i(`input`,{"onUpdate:modelValue":f[0]||=e=>c.value=e,type:`radio`,name:`tab`,value:`chat`,hidden:``},null,512),[[D,c.value]]),f[7]||=i(`div`,{"i-solar:dialog-2-bold-duotone":``,text:`2xl`,transform:`translate-y--2`},null,-1),i(`div`,Ce,[i(`span`,we,y(b(G)(`stage.chat.tabs.chat`)),1)])],10,Se),i(`label`,{class:u([c.value===`custom`?`bg-primary-100 dark:bg-primary-900`:`bg-white dark:bg-primary-950`,c.value===`custom`?`text-primary-500 dark:text-primary-500`:``,{"transition-colors-none ":b(w)}]),flex:`~ row`,checked:c.value===`custom`,"aria-checked":c.value===`custom`,border:`solid t-2 b-2 primary-100 dark:primary-900`,bg:`hover:primary-100 dark:hover:primary-900`,text:`primary-300 hover:primary-500 dark:primary-300/50 dark:hover:primary-500`,transition:`all duration-250 ease-in-out`,"cursor-pointer":``,"items-center":``,"gap-1":``,"px-2":``},[A(i(`input`,{"onUpdate:modelValue":f[1]||=e=>c.value=e,type:`radio`,name:`tab`,value:`custom`,hidden:``},null,512),[[D,c.value]]),f[8]||=i(`div`,{"i-solar:star-fall-2-bold-duotone":``,text:`2xl`,transform:`translate-y--2`},null,-1),i(`div`,Ee,[i(`span`,null,y(b(G)(`stage.chat.tabs.custom`)),1)])],10,Te),i(`label`,{class:u([c.value===`clothes`?`bg-primary-100 dark:bg-primary-900`:`bg-white dark:bg-primary-950`,c.value===`clothes`?`text-primary-500 dark:text-primary-500`:``,{"transition-colors-none ":b(w)}]),flex:`~ row`,checked:c.value===`clothes`,"aria-checked":c.value===`clothes`,border:`solid r-2 t-2 b-2 primary-100 dark:primary-900`,bg:`hover:primary-100 dark:hover:primary-900`,text:`primary-300 hover:primary-500 dark:primary-300/50 dark:hover:primary-500`,transition:`all duration-250 ease-in-out`,"cursor-pointer":``,"items-center":``,"gap-1":``,"rounded-r-lg":``,"px-2":``},[A(i(`input`,{"onUpdate:modelValue":f[2]||=e=>c.value=e,type:`radio`,name:`tab`,value:`clothes`,hidden:``},null,512),[[D,c.value]]),f[9]||=i(`div`,{"i-solar:magic-stick-3-bold-duotone":``,text:`2xl`,transform:`translate-y--2`},null,-1),i(`div`,Oe,[i(`span`,null,y(b(G)(`stage.chat.tabs.clothes`)),1)])],10,De)]),i(`div`,ke,[i(`div`,Ae,[s(ye,{"h-full":``,"flex-1":``,"p-4":``,w:`full`,"max-h":`n.value=e,placeholder:b(G)(`stage.message`),text:`primary-300 hover:primary-500 dark:primary-300/50 dark:hover:primary-500 placeholder:primary-300 placeholder:hover:primary-500 placeholder:dark:primary-300/50 placeholder:dark:hover:primary-500`,bg:`primary-100 dark:primary-400/20`,"min-h":`[100px]`,"max-h":`[300px]`,"w-full":``,"rounded-t-xl":``,"p-4":``,"font-medium":``,"outline-none":``,transition:`all duration-250 ease-in-out placeholder:all placeholder:duration-250 placeholder:ease-in-out`,class:u({"transition-colors-none placeholder:transition-colors-none":b(w)}),onSubmit:J,onCompositionstart:f[4]||=e=>d.value=!0,onCompositionend:f[5]||=e=>d.value=!1},null,8,[`modelValue`,`placeholder`,`class`])])])]),i(`div`,Me,[i(`div`,Ne,[s(b(te),null,{default:k(()=>[l.value?(p(),o(`fieldset`,Pe,[(p(!0),o(e,null,h(b(P),(e,t)=>(p(),o(`label`,{key:t,class:`[&_div_span]:dark:hover:bg-cyan-300 [&_div_span]:dark:hover:bg-cyan-900`},[i(`input`,{type:`radio`,name:`audioInput`,value:e.deviceId,hidden:``,onChange:Q},null,40,Fe),i(`div`,Ie,[i(`div`,Le,[e.deviceId===b(B)?(p(),o(`div`,Re)):a(``,!0)]),i(`span`,{"inline-block":``,class:u([e.deviceId===b(B)?`cyan-400 dark:text-white`:`cyan-400/50 dark:text-white/50`]),transition:`all duration-250 ease-in-out`},y(e.label),3)])]))),128))])):a(``,!0)]),_:1}),i(`label`,{bg:`complementary-100 hover:complementary-200 dark:complementary-800 dark:hover:complementary-700`,transition:`all duration-250 ease-in-out`,class:u({"transition-colors-none":b(w)}),text:`complementary-400`,"h-fit":``,flex:``,"cursor-pointer":``,"items-center":``,"justify-center":``,"gap-2":``,"rounded-full":``,"px-4":``,"py-2":``},[A(i(`input`,{"onUpdate:modelValue":f[6]||=e=>l.value=e,type:`checkbox`,hidden:``},null,512),[[E,l.value]]),f[10]||=i(`div`,{"i-solar:microphone-2-bold-duotone":``},null,-1),i(`div`,null,[r.value?(p(),o(`span`,Be,`Listening...`)):(p(),o(`span`,ze,y(b(G)(`settings.microphone`)),1))])],2)])])]))}}),He=n(Ve,[[`__scopeId`,`data-v-49fa3fb9`]]);const Ue={py:`1`,flex:`~ col`,rounded:`lg`,"overflow-hidden":``},We={key:0,flex:``,mr:`12`},Ge={flex:`~ col`,border:`4 solid primary-200/50 dark:primary-500/50`,shadow:`md primary-200/50 dark:none`,"min-w-20":``,"rounded-lg":``,"px-2":``,"py-1":``,"backdrop-blur-sm":``,h:`unset {l().then(()=>{c.update(),u.value=c.height.value})}),g(async()=>{l().then(()=>{c.update(),u.value=c.height.value})}),(t,c)=>{let l=_(`auto-animate`);return p(),o(`div`,Ue,[c[1]||=i(`div`,{"flex-1":``},null,-1),A((p(),o(`div`,{ref_key:`chatHistoryRef`,ref:n,"h-full":``,"w-full":``,"max-h":`30vh`,flex:`~ col`,"overflow-scroll":``,class:`chat-history`},[c[0]||=i(`div`,{"flex-1":``},null,-1),(p(!0),o(e,null,h(b(s),(e,t)=>(p(),o(`div`,{key:t,"mb-2":``},[e.role===`assistant`?(p(),o(`div`,We,[i(`div`,Ge,[i(`div`,null,[i(`span`,Ke,y(b(r)(`stage.chat.message.character-name.airi`)),1)]),e.content?(p(),o(`div`,{key:0,class:`markdown-content`,text:`base {n.value=!0},onVADMisfire:()=>{n.value=!1},onSpeechEnd:e=>{n.value=!1,D(e)},auto:!1});function D(e){alert(`Transcription is not implemented yet`)}return O(d,async e=>{e===`false`&&w()}),y(async()=>{t.value=``}),f(()=>{E()}),(e,n)=>(p(),o(`div`,null,[i(`div`,tt,[s(et,{absolute:``,"left-0":``,"top-0":``,transform:`translate-y-[-100%]`,"w-full":``}),i(`div`,nt,[s(b(F),{modelValue:t.value,"onUpdate:modelValue":n[0]||=e=>t.value=e,placeholder:b(x)(`stage.message`),border:`solid 2 primary-100 dark:primary-400/20`,text:`primary-300 hover:primary-500 dark:primary-300/50 dark:hover:primary-500 placeholder:primary-300 placeholder:hover:primary-500 placeholder:dark:primary-300/50 placeholder:dark:hover:primary-500`,bg:`primary-100 dark:primary-400/20`,"max-h":`[10lh]`,"min-h":`[1lh]`,"w-full":``,"resize-none":``,"overflow-y-scroll":``,"rounded-xl":``,"p-2":``,"font-medium":``,"outline-none":``,transition:`all duration-250 ease-in-out placeholder:all placeholder:duration-250 placeholder:ease-in-out`,class:u({"transition-colors-none placeholder:transition-colors-none":b(g)}),onSubmit:S,onCompositionstart:n[1]||=e=>r.value=!0,onCompositionend:n[2]||=e=>r.value=!1},null,8,[`modelValue`,`placeholder`,`class`])])])]))}}),it=rt;const at={class:`relative`},ot={absolute:``,"left-0":``,"right-0":``,"top-0":``,"w-full":``,"overflow-hidden":``};var st=c({__name:`AnimatedWave`,props:{height:{default:40},amplitude:{default:14},waveLength:{default:250},fillColor:{default:`oklch(95% 0.10 var(--chromatic-hue))`},direction:{default:`down`},movementDirection:{default:`left`},animationSpeed:{default:50}},setup(e){let t=e,n=m(t.height),a=m(t.amplitude),s=m(t.waveLength),c=m(t.fillColor),l=m(t.direction),u=m(t.movementDirection);function f(e,t,n,r,i){let a=[],o=Math.ceil(e/r),s=o*r,c=1,l=i===`up`?n:t-n;a.push(`M 0 ${l}`);let u=Math.PI*2/r;for(let e=0;e<=s;e+=c){let t=n*Math.sin(u*e),r=i===`up`?l-t:l+t;a.push(`L ${e} ${r}`)}let d=i===`up`?t:0;return a.push(`L ${s} ${d}`),a.push(`L 0 ${d} Z`),a.join(` `)}let h=r(()=>n.value+a.value*2),_=r(()=>{let e=` - - `;return`url(data:image/svg+xml;base64,${btoa(e)})`});return O(()=>[t.height,t.amplitude,t.waveLength,t.fillColor,t.direction,t.movementDirection],()=>{n.value=t.height,a.value=t.amplitude,s.value=t.waveLength,c.value=t.fillColor,l.value=t.direction,u.value=t.movementDirection},{immediate:!0}),(t,n)=>(p(),o(`div`,at,[g(t.$slots,`default`,{},void 0,!0),i(`div`,ot,[i(`div`,{class:`wave`,style:d({background:c.value,height:`${h.value}px`,maskImage:_.value,WebkitMaskImage:_.value,"--wave-translate":`${-s.value}px`,"--animation-duration":`${s.value/e.animationSpeed}s`,"animation-direction":u.value===`left`?`normal`:`reverse`})},null,4)])]))}}),ct=n(st,[[`__scopeId`,`data-v-f58b462e`]]);export{ct as AnimatedWave_default,V as Cross_default,G as Header_default,He as InteractiveArea_default,it as MobileInteractiveArea_default}; \ No newline at end of file diff --git a/assets/AnimatedWave-t4o-3aNd.css b/assets/AnimatedWave-DbSuFsq0.css similarity index 85% rename from assets/AnimatedWave-t4o-3aNd.css rename to assets/AnimatedWave-DbSuFsq0.css index 2af94e4c82867a88f53dc67ed1cfaa2e730cb591..49eddafc3d8006d30fc5cb037455e0ee16a31c8d 100644 --- a/assets/AnimatedWave-t4o-3aNd.css +++ b/assets/AnimatedWave-DbSuFsq0.css @@ -1 +1 @@ -.cross-background-container[data-v-455eb62c]{--cross-color:oklch(.85 calc(var(--chromatic-chroma)*.3)var(--chromatic-hue)/.2);background-color:#fff;background:radial-gradient(circle,transparent 20%,#fff 20%,#fff 80%,transparent 80%,transparent),radial-gradient(circle,transparent 20%,#fff 20%,#fff 80%,transparent 80%,transparent)25px 25px,linear-gradient(var(--cross-color)2px,transparent 2px)0 -1px,linear-gradient(90deg,var(--cross-color)2px,#fff 2px)-1px 0;background-size:50px 50px,50px 50px,25px 25px,25px 25px}.dark .cross-background-container[data-v-455eb62c]{--cross-color:oklch(.2 calc(var(--chromatic-chroma)*.3)var(--chromatic-hue));background-color:#121212;background:radial-gradient(circle,transparent 20%,#121212 20%,#121212 80%,transparent 80%,transparent),radial-gradient(circle,transparent 20%,#121212 20%,#121212 80%,transparent 80%,transparent)25px 25px,linear-gradient(var(--cross-color)2px,transparent 2px)0 -1px,linear-gradient(90deg,var(--cross-color)2px,#121212 2px)-1px 0;background-size:50px 50px,50px 50px,25px 25px,25px 25px}.animate-stripe[data-v-49fa3fb9]{background-image:repeating-linear-gradient(-45deg,#a16207,#a16207 25px,#eab308 25px 50px);background-size:175% 100%}.animate-stripe[data-v-49fa3fb9]:hover{animation:2s linear infinite progress-49fa3fb9}@-webkit-keyframes progress-49fa3fb9{0%{background-position:0 0}to{background-position:-75px 0}}@-moz-keyframes progress-49fa3fb9{0%{background-position:0 0}to{background-position:-75px 0}}@keyframes progress-49fa3fb9{0%{background-position:0 0}to{background-position:-70px 0}}.chat-history[data-v-a571b65b]{--gradient:linear-gradient(to bottom,#0000,#000);-webkit-mask-image:var(--gradient);-webkit-mask-image:var(--gradient);mask-image:var(--gradient);-webkit-mask-position:bottom;mask-position:bottom;-webkit-mask-size:100% 100%;mask-size:100% 100%;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}@keyframes wave-animation-f58b462e{0%{transform:translate(0)}to{transform:translate(var(--wave-translate,-250px))}}.wave[data-v-f58b462e]{will-change:transform;width:200vw;animation:wave-animation-f58b462e var(--animation-duration,5s)linear infinite;-webkit-mask-repeat:repeat-x;mask-repeat:repeat-x} +.cross-background-container[data-v-455eb62c]{--cross-color:oklch(.85 calc(var(--chromatic-chroma)*.3)var(--chromatic-hue)/.2);background-color:#fff;background:radial-gradient(circle,transparent 20%,#fff 20%,#fff 80%,transparent 80%,transparent),radial-gradient(circle,transparent 20%,#fff 20%,#fff 80%,transparent 80%,transparent)25px 25px,linear-gradient(var(--cross-color)2px,transparent 2px)0 -1px,linear-gradient(90deg,var(--cross-color)2px,#fff 2px)-1px 0;background-size:50px 50px,50px 50px,25px 25px,25px 25px}.dark .cross-background-container[data-v-455eb62c]{--cross-color:oklch(.2 calc(var(--chromatic-chroma)*.3)var(--chromatic-hue));background-color:#121212;background:radial-gradient(circle,transparent 20%,#121212 20%,#121212 80%,transparent 80%,transparent),radial-gradient(circle,transparent 20%,#121212 20%,#121212 80%,transparent 80%,transparent)25px 25px,linear-gradient(var(--cross-color)2px,transparent 2px)0 -1px,linear-gradient(90deg,var(--cross-color)2px,#121212 2px)-1px 0;background-size:50px 50px,50px 50px,25px 25px,25px 25px}.animate-stripe[data-v-ac81fc73]{background-image:repeating-linear-gradient(-45deg,#a16207,#a16207 25px,#eab308 25px 50px);background-size:175% 100%}.animate-stripe[data-v-ac81fc73]:hover{animation:2s linear infinite progress-ac81fc73}@-webkit-keyframes progress-ac81fc73{0%{background-position:0 0}to{background-position:-75px 0}}@-moz-keyframes progress-ac81fc73{0%{background-position:0 0}to{background-position:-75px 0}}@keyframes progress-ac81fc73{0%{background-position:0 0}to{background-position:-70px 0}}.chat-history[data-v-a571b65b]{--gradient:linear-gradient(to bottom,#0000,#000);-webkit-mask-image:var(--gradient);-webkit-mask-image:var(--gradient);mask-image:var(--gradient);-webkit-mask-position:bottom;mask-position:bottom;-webkit-mask-size:100% 100%;mask-size:100% 100%;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}@keyframes wave-animation-f58b462e{0%{transform:translate(0)}to{transform:translate(var(--wave-translate,-250px))}}.wave[data-v-f58b462e]{will-change:transform;width:200vw;animation:wave-animation-f58b462e var(--animation-duration,5s)linear infinite;-webkit-mask-repeat:repeat-x;mask-repeat:repeat-x} diff --git a/assets/Basic-SuYkQxAJ.js b/assets/Basic-MLnzojs5.js similarity index 83% rename from assets/Basic-SuYkQxAJ.js rename to assets/Basic-MLnzojs5.js index 14d52dcbe117b5bbe8d2bf2d7f8316b1c801b505..ec850940281ebffdafece90e87e599fa6a85d97c 100644 --- a/assets/Basic-SuYkQxAJ.js +++ b/assets/Basic-MLnzojs5.js @@ -1 +1 @@ -import{createElementBlock as e,defineComponent as t,mergeModels as n,normalizeStyle as r,openBlock as i,ref as a,useModel as o,vModelText as s,watch as c,withDirectives as l}from"./index-CuCRViVh.js";var u=t({__name:`Basic`,props:{modelValue:{default:``},modelModifiers:{}},emits:n([`submit`],[`update:modelValue`]),setup(t,{emit:n}){let u=n,d=o(t,`modelValue`),f=a(),p=a(`auto`);function m(e){e.code===`Enter`&&!e.shiftKey&&(e.preventDefault(),u(`submit`,d.value))}return c(d,()=>{p.value=`auto`,requestAnimationFrame(()=>{f.value&&(p.value=`${f.value.scrollHeight}px`)})},{immediate:!0}),(t,n)=>l((i(),e(`textarea`,{ref_key:`textareaRef`,ref:f,"onUpdate:modelValue":n[0]||=e=>d.value=e,style:r({height:p.value}),onKeydown:m},null,36)),[[s,d.value]])}}),d=u;export{d as Basic_default}; \ No newline at end of file +import{createElementBlock as e,defineComponent as t,mergeModels as n,normalizeStyle as r,openBlock as i,ref as a,useModel as o,vModelText as s,watch as c,withDirectives as l}from"./index-CsmT0L1K.js";var u=t({__name:`Basic`,props:{modelValue:{default:``},modelModifiers:{}},emits:n([`submit`],[`update:modelValue`]),setup(t,{emit:n}){let u=n,d=o(t,`modelValue`),f=a(),p=a(`auto`);function m(e){e.code===`Enter`&&!e.shiftKey&&(e.preventDefault(),u(`submit`,d.value))}return c(d,()=>{p.value=`auto`,requestAnimationFrame(()=>{f.value&&(p.value=`${f.value.scrollHeight}px`)})},{immediate:!0}),(t,n)=>l((i(),e(`textarea`,{ref_key:`textareaRef`,ref:f,"onUpdate:modelValue":n[0]||=e=>d.value=e,style:r({height:p.value}),onKeydown:m},null,36)),[[s,d.value]])}}),d=u;export{d as Basic_default}; \ No newline at end of file diff --git a/assets/Button-DFhzbYVt.js b/assets/Button-D3cjyOEe.js similarity index 98% rename from assets/Button-DFhzbYVt.js rename to assets/Button-D3cjyOEe.js index 2e3d424516b32712bb31e8aedd3c7c9d38bf7120..da841f4dfb57a8f5813b0edc518778188dff94f8 100644 --- a/assets/Button-DFhzbYVt.js +++ b/assets/Button-D3cjyOEe.js @@ -1 +1 @@ -import{Transition as e,__plugin_vue_export_helper_default as t,computed as n,createBaseVNode as r,createBlock as i,createCommentVNode as a,createElementBlock as o,createTextVNode as s,createVNode as c,defineComponent as l,guardReactiveProps as u,mergeModels as d,mergeProps as f,normalizeClass as p,normalizeProps as m,openBlock as h,renderSlot as g,toDisplayString as _,unref as v,useModel as y,watchEffect as b,withCtx as x}from"./index-CuCRViVh.js";var S=l({__name:`BidirectionalTransition`,props:{fromClass:null,activeClass:null,toClass:null},setup(t){return(n,r)=>(h(),i(e,{"enter-from-class":t.fromClass,"enter-active-class":t.activeClass,"enter-to-class":t.toClass,"leave-from-class":t.toClass,"leave-active-class":t.activeClass,"leave-to-class":t.fromClass},{default:x(()=>[g(n.$slots,`default`)]),_:3},8,[`enter-from-class`,`enter-active-class`,`enter-to-class`,`leave-from-class`,`leave-active-class`,`leave-to-class`]))}}),C=S;const w=`0px`;var T=l({__name:`TransitionVertical`,props:{duration:{default:250},easingEnter:{default:`ease-in-out`},easingLeave:{default:`ease-in-out`},opacityClosed:{default:0},opacityOpened:{default:1}},setup(t){let n=t;function r(e){return{height:e.style.height,width:e.style.width,position:e.style.position,visibility:e.style.visibility,overflow:e.style.overflow,paddingTop:e.style.paddingTop,paddingBottom:e.style.paddingBottom,borderTopWidth:e.style.borderTopWidth,borderBottomWidth:e.style.borderBottomWidth,marginTop:e.style.marginTop,marginBottom:e.style.marginBottom}}function a(e,t){let{width:n}=getComputedStyle(e);e.style.width=n,e.style.position=`absolute`,e.style.visibility=`hidden`,e.style.height=``;let{height:r}=getComputedStyle(e);return e.style.width=t.width,e.style.position=t.position,e.style.visibility=t.visibility,e.style.height=w,e.style.overflow=`hidden`,t.height&&t.height!==w?t.height:r}function o(e,t,n,r,i){let a=e.animate(r,i);e.style.height=t.height,a.onfinish=()=>{e.style.overflow=t.overflow,n()}}function s(e,t){return[{height:w,opacity:n.opacityClosed,paddingTop:w,paddingBottom:w,borderTopWidth:w,borderBottomWidth:w,marginTop:w,marginBottom:w},{height:e,opacity:n.opacityOpened,paddingTop:t.paddingTop,paddingBottom:t.paddingBottom,borderTopWidth:t.borderTopWidth,borderBottomWidth:t.borderBottomWidth,marginTop:t.marginTop,marginBottom:t.marginBottom}]}function c(e,t){let i=e,c=r(i),l=a(i,c),u=s(l,c),d={duration:n.duration,easing:n.easingEnter};o(i,c,t,u,d)}function l(e,t){let i=e,a=r(i),{height:c}=getComputedStyle(i);i.style.height=c,i.style.overflow=`hidden`;let l=s(c,a).reverse(),u={duration:n.duration,easing:n.easingLeave};o(i,a,t,l,u)}return(t,n)=>(h(),i(e,{css:!1,onEnter:c,onLeave:l},{default:x(()=>[g(t.$slots,`default`)]),_:3}))}}),E=T;const D={op50:``};var O=l({__name:`Collapsable`,props:d({default:{type:Boolean},label:null},{modelValue:{type:Boolean,default:!1},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let t=e,n=y(e,`modelValue`);b(()=>{t.default!=null&&(n.value=!!t.default)});function i(e){return n.value=e,e}return(e,l)=>(h(),o(`div`,null,[g(e.$slots,`trigger`,m(u({visible:n.value,setVisible:i})),()=>[r(`button`,{sticky:``,"top-0":``,"z-10":``,flex:``,"items-center":``,"justify-between":``,px2:``,py1:``,"text-sm":``,"backdrop-blur-xl":``,onClick:l[0]||=e=>n.value=!n.value},[r(`span`,null,_(t.label??`Collapsable`),1),l[1]||=s(),r(`span`,D,_(n.value?`▲`:`▼`),1)])]),c(v(E),null,{default:x(()=>[n.value?g(e.$slots,`default`,m(f({key:0},{visible:n.value,setVisible:i}))):a(``,!0)]),_:3})]))}}),k=O,A=l({__name:`Skeleton`,props:{animation:{default:`pulse`}},setup(e){let t=e;return(e,n)=>(h(),o(`div`,{class:p([`skeleton`,t.animation===`none`?``:`skeleton-${t.animation}`]),bg:`neutral-200 dark:neutral-800`,overflow:`hidden`},[g(e.$slots,`default`,{},void 0,!0)],2))}}),j=t(A,[[`__scopeId`,`data-v-f404da2a`]]);const M=[`disabled`],N={class:`flex flex-row items-center justify-center`},P={key:0,class:`mr-2 w-4`},F={key:0,class:`i-svg-spinners:ring-resize h-4 w-4`},I={key:0};var L=l({__name:`Button`,props:{icon:null,label:null,disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},variant:{default:`primary`},size:{default:`md`},block:{type:Boolean,default:!1}},setup(e){let t=e,i=n(()=>t.disabled||t.loading),s={primary:`bg-primary-500 hover:bg-primary-600 dark:bg-primary-400 dark:hover:bg-primary-500 focus:ring-primary-500/50 dark:focus:ring-primary-400/50 text-white`,secondary:`bg-neutral-100 hover:bg-neutral-200 dark:bg-neutral-600 dark:hover:bg-neutral-500 focus:ring-neutral-300/50 dark:focus:ring-neutral-600/50 text-neutral-900 dark:text-neutral-100`,danger:`bg-red-500 hover:bg-red-600 dark:bg-red-400 dark:hover:bg-red-500 focus:ring-red-600/50 dark:focus:ring-red-500/50 text-white`},l={sm:`px-3 py-1.5 text-xs`,md:`px-4 py-2 text-sm`,lg:`px-6 py-3 text-base`},u=n(()=>[`rounded-lg font-medium outline-none transition-all duration-200 ease-in-out`,`disabled:cursor-not-allowed disabled:opacity-50`,t.block?`w-full`:``,l[t.size],s[t.variant],{"opacity-50 cursor-not-allowed":i.value},`focus:ring-2 focus:ring-offset-2 focus:ring-offset-white dark:focus:ring-offset-neutral-900`]);return(t,n)=>(h(),o(`button`,{disabled:i.value,class:p(u.value)},[r(`div`,N,[c(v(C),{"from-class":`opacity-0 mr-0! w-0!`,"active-class":`transition-[width,margin] ease-in-out overflow-hidden`},{default:x(()=>[e.loading||e.icon?(h(),o(`div`,P,[e.loading?(h(),o(`div`,F)):e.icon?(h(),o(`div`,{key:1,class:p([`h-4 w-4`,e.icon])},null,2)):a(``,!0)])):a(``,!0)]),_:1}),e.label?(h(),o(`span`,I,_(e.label),1)):g(t.$slots,`default`,{key:1})])],10,M))}}),R=L;export{R as Button_default,k as Collapsable_default,j as Skeleton_default,E as TransitionVertical_default}; \ No newline at end of file +import{Transition as e,__plugin_vue_export_helper_default as t,computed as n,createBaseVNode as r,createBlock as i,createCommentVNode as a,createElementBlock as o,createTextVNode as s,createVNode as c,defineComponent as l,guardReactiveProps as u,mergeModels as d,mergeProps as f,normalizeClass as p,normalizeProps as m,openBlock as h,renderSlot as g,toDisplayString as _,unref as v,useModel as y,watchEffect as b,withCtx as x}from"./index-CsmT0L1K.js";var S=l({__name:`BidirectionalTransition`,props:{fromClass:null,activeClass:null,toClass:null},setup(t){return(n,r)=>(h(),i(e,{"enter-from-class":t.fromClass,"enter-active-class":t.activeClass,"enter-to-class":t.toClass,"leave-from-class":t.toClass,"leave-active-class":t.activeClass,"leave-to-class":t.fromClass},{default:x(()=>[g(n.$slots,`default`)]),_:3},8,[`enter-from-class`,`enter-active-class`,`enter-to-class`,`leave-from-class`,`leave-active-class`,`leave-to-class`]))}}),C=S;const w=`0px`;var T=l({__name:`TransitionVertical`,props:{duration:{default:250},easingEnter:{default:`ease-in-out`},easingLeave:{default:`ease-in-out`},opacityClosed:{default:0},opacityOpened:{default:1}},setup(t){let n=t;function r(e){return{height:e.style.height,width:e.style.width,position:e.style.position,visibility:e.style.visibility,overflow:e.style.overflow,paddingTop:e.style.paddingTop,paddingBottom:e.style.paddingBottom,borderTopWidth:e.style.borderTopWidth,borderBottomWidth:e.style.borderBottomWidth,marginTop:e.style.marginTop,marginBottom:e.style.marginBottom}}function a(e,t){let{width:n}=getComputedStyle(e);e.style.width=n,e.style.position=`absolute`,e.style.visibility=`hidden`,e.style.height=``;let{height:r}=getComputedStyle(e);return e.style.width=t.width,e.style.position=t.position,e.style.visibility=t.visibility,e.style.height=w,e.style.overflow=`hidden`,t.height&&t.height!==w?t.height:r}function o(e,t,n,r,i){let a=e.animate(r,i);e.style.height=t.height,a.onfinish=()=>{e.style.overflow=t.overflow,n()}}function s(e,t){return[{height:w,opacity:n.opacityClosed,paddingTop:w,paddingBottom:w,borderTopWidth:w,borderBottomWidth:w,marginTop:w,marginBottom:w},{height:e,opacity:n.opacityOpened,paddingTop:t.paddingTop,paddingBottom:t.paddingBottom,borderTopWidth:t.borderTopWidth,borderBottomWidth:t.borderBottomWidth,marginTop:t.marginTop,marginBottom:t.marginBottom}]}function c(e,t){let i=e,c=r(i),l=a(i,c),u=s(l,c),d={duration:n.duration,easing:n.easingEnter};o(i,c,t,u,d)}function l(e,t){let i=e,a=r(i),{height:c}=getComputedStyle(i);i.style.height=c,i.style.overflow=`hidden`;let l=s(c,a).reverse(),u={duration:n.duration,easing:n.easingLeave};o(i,a,t,l,u)}return(t,n)=>(h(),i(e,{css:!1,onEnter:c,onLeave:l},{default:x(()=>[g(t.$slots,`default`)]),_:3}))}}),E=T;const D={op50:``};var O=l({__name:`Collapsable`,props:d({default:{type:Boolean},label:null},{modelValue:{type:Boolean,default:!1},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let t=e,n=y(e,`modelValue`);b(()=>{t.default!=null&&(n.value=!!t.default)});function i(e){return n.value=e,e}return(e,l)=>(h(),o(`div`,null,[g(e.$slots,`trigger`,m(u({visible:n.value,setVisible:i})),()=>[r(`button`,{sticky:``,"top-0":``,"z-10":``,flex:``,"items-center":``,"justify-between":``,px2:``,py1:``,"text-sm":``,"backdrop-blur-xl":``,onClick:l[0]||=e=>n.value=!n.value},[r(`span`,null,_(t.label??`Collapsable`),1),l[1]||=s(),r(`span`,D,_(n.value?`▲`:`▼`),1)])]),c(v(E),null,{default:x(()=>[n.value?g(e.$slots,`default`,m(f({key:0},{visible:n.value,setVisible:i}))):a(``,!0)]),_:3})]))}}),k=O,A=l({__name:`Skeleton`,props:{animation:{default:`pulse`}},setup(e){let t=e;return(e,n)=>(h(),o(`div`,{class:p([`skeleton`,t.animation===`none`?``:`skeleton-${t.animation}`]),bg:`neutral-200 dark:neutral-800`,overflow:`hidden`},[g(e.$slots,`default`,{},void 0,!0)],2))}}),j=t(A,[[`__scopeId`,`data-v-f404da2a`]]);const M=[`disabled`],N={class:`flex flex-row items-center justify-center`},P={key:0,class:`mr-2 w-4`},F={key:0,class:`i-svg-spinners:ring-resize h-4 w-4`},I={key:0};var L=l({__name:`Button`,props:{icon:null,label:null,disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},variant:{default:`primary`},size:{default:`md`},block:{type:Boolean,default:!1}},setup(e){let t=e,i=n(()=>t.disabled||t.loading),s={primary:`bg-primary-500 hover:bg-primary-600 dark:bg-primary-400 dark:hover:bg-primary-500 focus:ring-primary-500/50 dark:focus:ring-primary-400/50 text-white`,secondary:`bg-neutral-100 hover:bg-neutral-200 dark:bg-neutral-600 dark:hover:bg-neutral-500 focus:ring-neutral-300/50 dark:focus:ring-neutral-600/50 text-neutral-900 dark:text-neutral-100`,danger:`bg-red-500 hover:bg-red-600 dark:bg-red-400 dark:hover:bg-red-500 focus:ring-red-600/50 dark:focus:ring-red-500/50 text-white`},l={sm:`px-3 py-1.5 text-xs`,md:`px-4 py-2 text-sm`,lg:`px-6 py-3 text-base`},u=n(()=>[`rounded-lg font-medium outline-none transition-all duration-200 ease-in-out`,`disabled:cursor-not-allowed disabled:opacity-50`,t.block?`w-full`:``,l[t.size],s[t.variant],{"opacity-50 cursor-not-allowed":i.value},`focus:ring-2 focus:ring-offset-2 focus:ring-offset-white dark:focus:ring-offset-neutral-900`]);return(t,n)=>(h(),o(`button`,{disabled:i.value,class:p(u.value)},[r(`div`,N,[c(v(C),{"from-class":`opacity-0 mr-0! w-0!`,"active-class":`transition-[width,margin] ease-in-out overflow-hidden`},{default:x(()=>[e.loading||e.icon?(h(),o(`div`,P,[e.loading?(h(),o(`div`,F)):e.icon?(h(),o(`div`,{key:1,class:p([`h-4 w-4`,e.icon])},null,2)):a(``,!0)])):a(``,!0)]),_:1}),e.label?(h(),o(`span`,I,_(e.label),1)):g(t.$slots,`default`,{key:1})])],10,M))}}),R=L;export{R as Button_default,k as Collapsable_default,j as Skeleton_default,E as TransitionVertical_default}; \ No newline at end of file diff --git a/assets/CardCreate-CuBkVnEJ.js b/assets/CardCreate-CN9MHSBD.js similarity index 93% rename from assets/CardCreate-CuBkVnEJ.js rename to assets/CardCreate-CN9MHSBD.js index ff8b05a1e0099f9175cd3ae5a927a37b2937c5fa..921e781f3d8570fe0632a1a4a606a05d4c4421ba 100644 --- a/assets/CardCreate-CuBkVnEJ.js +++ b/assets/CardCreate-CN9MHSBD.js @@ -1 +1 @@ -import{createBaseVNode as e,createElementBlock as t,defineComponent as n,openBlock as r,toDisplayString as i,unref as a,useI18n as o}from"./index-CuCRViVh.js";const s={relative:``,class:`min-h-[120px] flex flex-col cursor-pointer items-center justify-center border-neutral-200 rounded-xl bg-white/60 p-6 dark:border-neutral-700 hover:border-primary-300 dark:bg-black/30 hover:bg-white/80 dark:hover:border-primary-700 dark:hover:bg-black/40`,border:`solid 2`,transition:`all duration-300`,"cursor-pointer":``,"opacity-95":``,hover:`scale-100 opacity-100 shadow-md dark:shadow-lg`},c={"font-medium":``,text:`neutral-600 dark:neutral-300`};var l=n({__name:`CardCreate`,setup(n){let{t:l}=o();return(n,o)=>(r(),t(`div`,s,[o[0]||=e(`div`,{"i-solar:add-square-line-duotone":``,"mb-4":``,"text-5xl":``,text:`neutral-400 dark:neutral-500`},null,-1),e(`p`,c,i(a(l)(`settings.pages.card.create_card`)),1)]))}}),u=l;export{u as CardCreate_default}; \ No newline at end of file +import{createBaseVNode as e,createElementBlock as t,defineComponent as n,openBlock as r,toDisplayString as i,unref as a,useI18n as o}from"./index-CsmT0L1K.js";const s={relative:``,class:`min-h-[120px] flex flex-col cursor-pointer items-center justify-center border-neutral-200 rounded-xl bg-white/60 p-6 dark:border-neutral-700 hover:border-primary-300 dark:bg-black/30 hover:bg-white/80 dark:hover:border-primary-700 dark:hover:bg-black/40`,border:`solid 2`,transition:`all duration-300`,"cursor-pointer":``,"opacity-95":``,hover:`scale-100 opacity-100 shadow-md dark:shadow-lg`},c={"font-medium":``,text:`neutral-600 dark:neutral-300`};var l=n({__name:`CardCreate`,setup(n){let{t:l}=o();return(n,o)=>(r(),t(`div`,s,[o[0]||=e(`div`,{"i-solar:add-square-line-duotone":``,"mb-4":``,"text-5xl":``,text:`neutral-400 dark:neutral-500`},null,-1),e(`p`,c,i(a(l)(`settings.pages.card.create_card`)),1)]))}}),u=l;export{u as CardCreate_default}; \ No newline at end of file diff --git a/assets/CardCreate-DPyf_Zae.js b/assets/CardCreate-DPyf_Zae.js deleted file mode 100644 index 41411c098fb366e750a6f94ff80486c19b8365b7..0000000000000000000000000000000000000000 --- a/assets/CardCreate-DPyf_Zae.js +++ /dev/null @@ -1 +0,0 @@ -import{CardCreate_default as e}from"./CardCreate-CuBkVnEJ.js";export{e as default}; \ No newline at end of file diff --git a/assets/CardCreate-uNXU9uRC.js b/assets/CardCreate-uNXU9uRC.js new file mode 100644 index 0000000000000000000000000000000000000000..a179e17318b3f8e360cd5ab8e6ea899bc820f67f --- /dev/null +++ b/assets/CardCreate-uNXU9uRC.js @@ -0,0 +1 @@ +import{CardCreate_default as e}from"./CardCreate-CN9MHSBD.js";export{e as default}; \ No newline at end of file diff --git a/assets/CardCreationDialog-Blfzqkvs.js b/assets/CardCreationDialog-Blfzqkvs.js new file mode 100644 index 0000000000000000000000000000000000000000..6cc1883272161a4f09b51f477a957c4e5fa5d466 --- /dev/null +++ b/assets/CardCreationDialog-Blfzqkvs.js @@ -0,0 +1 @@ +import"./import-url-browser-DNuYZxPr.js";import"./duckdb-mvp-C3i5IjU8.js";import"./index-CISmcbXk-C9oju49Y.js";import"./types-AwjH7X1C.js";import"./stores-2H61GqXP.js";import"./__vite-browser-external-DPh5tFvT.js";import"./Button-D3cjyOEe.js";import"./src-C1Sr0aqN.js";import"./dist-B9GpkGif.js";import"./components-DHUA669a.js";import"./composables-CgcEyUWo.js";import"./sleep-CvjNLutj.js";import"./queue-B0kER5Ap.js";import"./queues-hSEKEE3F.js";import"./dist-Cr2QBfS4.js";import"./webgpu-Nt9hTBpW.js";import{CardCreationDialog_default as e}from"./CardCreationDialog-FrhTB6Za.js";export{e as default}; \ No newline at end of file diff --git a/assets/CardCreationDialog-Bsxy1Noo.js b/assets/CardCreationDialog-Bsxy1Noo.js deleted file mode 100644 index 05090a3bb8f4f7472b3cb9d9628e35fa7a09dd81..0000000000000000000000000000000000000000 --- a/assets/CardCreationDialog-Bsxy1Noo.js +++ /dev/null @@ -1 +0,0 @@ -import"./import-url-browser-DNuYZxPr.js";import"./duckdb-mvp-C3i5IjU8.js";import"./index-CISmcbXk-BkTeNOgG.js";import"./types-AwjH7X1C.js";import"./stores-m0eA85gd.js";import"./__vite-browser-external-CCfYMxZl.js";import"./Button-DFhzbYVt.js";import"./src-C2QbIOor.js";import"./dist-B4cQ-m7C.js";import"./components-BFLl4u81.js";import"./composables-Cgvkd8lL.js";import"./sleep-CvjNLutj.js";import"./queue-DAKPJQl1.js";import"./queues-Dstwm1VQ.js";import"./dist-Cr2QBfS4.js";import"./webgpu-Nt9hTBpW.js";import{CardCreationDialog_default as e}from"./CardCreationDialog-DbM2XlD1.js";export{e as default}; \ No newline at end of file diff --git a/assets/CardCreationDialog-CNtImmVB.css b/assets/CardCreationDialog-CNtImmVB.css new file mode 100644 index 0000000000000000000000000000000000000000..10f1abeb28a9365afbb024c444027b2595146f39 --- /dev/null +++ b/assets/CardCreationDialog-CNtImmVB.css @@ -0,0 +1 @@ +.input-list[data-v-ba1c2b81]>*{min-width:45%}@media (max-width:641px){.input-list[data-v-ba1c2b81] *{min-width:unset;width:100%}} diff --git a/assets/CardCreationDialog-DbM2XlD1.js b/assets/CardCreationDialog-FrhTB6Za.js similarity index 96% rename from assets/CardCreationDialog-DbM2XlD1.js rename to assets/CardCreationDialog-FrhTB6Za.js index 18fee7ac1342be938eec1aa29fc07da2685967b5..ea0ac0cf5e840665ce098f208411a9543d53efc1 100644 --- a/assets/CardCreationDialog-DbM2XlD1.js +++ b/assets/CardCreationDialog-FrhTB6Za.js @@ -1,3 +1,3 @@ -import{Fragment as e,__commonJSMin as t,__plugin_vue_export_helper_default as n,__toESM as r,computed as i,createBaseVNode as a,createBlock as o,createCommentVNode as s,createElementBlock as c,createTextVNode as l,createVNode as u,defineComponent as d,isRef as f,mergeModels as p,normalizeClass as m,openBlock as h,ref as g,renderList as ee,toDisplayString as _,toRaw as te,unref as v,useI18n as y,useModel as b,withCtx as x}from"./index-CuCRViVh.js";import{useAiriCardStore as ne}from"./stores-m0eA85gd.js";import{Button_default as S}from"./Button-DFhzbYVt.js";import{FieldInput_default as C,FieldValues_default as re}from"./src-C2QbIOor.js";import{$u as w,Bu as T,Iv as ie,Pu as ae,nu as oe}from"./dist-B4cQ-m7C.js";var E=t((exports,t)=>{function n(e){return e.toLowerCase()}t.exports=n}),D=t((exports,t)=>{var n=E();t.exports=n}),O=t((exports,t)=>{function n(e,t,n){return e.replace(t,n)}t.exports=n}),k=t((exports,t)=>{var n=O();t.exports=n}),A=t((exports,t)=>{var n=String.prototype.trim!==void 0;t.exports=n}),j=t((exports,t)=>{var n=String.prototype.trim;t.exports=n}),M=t((exports,t)=>{var n=j(),r=` +import{Fragment as e,__commonJSMin as t,__plugin_vue_export_helper_default as n,__toESM as r,computed as i,createBaseVNode as a,createBlock as o,createCommentVNode as s,createElementBlock as c,createTextVNode as l,createVNode as u,defineComponent as d,isRef as f,mergeModels as p,normalizeClass as m,openBlock as h,ref as g,renderList as ee,toDisplayString as _,toRaw as te,unref as v,useI18n as y,useModel as b,withCtx as x}from"./index-CsmT0L1K.js";import{useAiriCardStore as ne}from"./stores-2H61GqXP.js";import{Button_default as S}from"./Button-D3cjyOEe.js";import{FieldInput_default as C,FieldValues_default as re}from"./src-C1Sr0aqN.js";import{$u as w,Bu as T,Iv as ie,Pu as ae,nu as oe}from"./dist-B9GpkGif.js";var E=t((exports,t)=>{function n(e){return e.toLowerCase()}t.exports=n}),D=t((exports,t)=>{var n=E();t.exports=n}),O=t((exports,t)=>{function n(e,t,n){return e.replace(t,n)}t.exports=n}),k=t((exports,t)=>{var n=O();t.exports=n}),A=t((exports,t)=>{var n=String.prototype.trim!==void 0;t.exports=n}),j=t((exports,t)=>{var n=String.prototype.trim;t.exports=n}),M=t((exports,t)=>{var n=j(),r=` \r -\f\v            \u2028\u2029   `,i=`᠎`;function a(){return n.call(r)===``&&n.call(i)===i}t.exports=a}),N=t((exports,t)=>{var n=k(),r=/^[\u0020\f\n\r\t\v\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]*([\S\s]*?)[\u0020\f\n\r\t\v\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]*$/;function i(e){return n(e,r,`$1`)}t.exports=i}),P=t((exports,t)=>{var n=j();function r(e){return n.call(e)}t.exports=r}),F=t((exports,t)=>{var n=A(),r=M(),i=N(),a=P(),o;o=n&&r()?a:i,t.exports=o}),I=t((exports,t)=>{var n=D(),r=k(),i=F(),a=/\s+/g,o=/[!"'(),–.:;<>?`{}|~\/\\\[\]_#$*&^@%]+/g,s=/([a-z0-9])([A-Z])/g;function c(e){return e=r(e,o,` `),e=r(e,s,`$1 $2`),e=i(e),e=r(e,a,`-`),n(e)}t.exports=c}),L=t((exports,t)=>{var n=I();t.exports=n}),R=r(L());const z={class:`w-full flex flex-col gap-5`},B={class:`mt-4`},V={class:`border-b border-neutral-200 dark:border-neutral-700`},H={class:`flex justify-center -mb-px sm:justify-start space-x-1`},U=[`onClick`],W={class:`flex items-center gap-1`},G={key:0,class:`w-full rounded-xl bg-red900`},K={class:`w-full p-4`},se={key:1,class:`tab-content ml-auto mr-auto w-95%`},ce={class:`mb-3`},le={class:`input-list ml-auto mr-auto w-90% flex flex-row flex-wrap justify-center gap-8`},ue={key:2,class:`tab-content ml-auto mr-auto w-95%`},de={class:`input-list ml-auto mr-auto w-90% flex flex-row flex-wrap justify-center gap-8`},fe={key:3,class:`tab-content ml-auto mr-auto w-95%`},pe={class:`input-list ml-auto mr-auto w-90% flex flex-row flex-wrap justify-center gap-8`},me={class:`ml-auto mr-1 flex flex-row gap-2`};var q=d({__name:`CardCreationDialog`,props:p({modelValue:{type:Boolean}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:p([`update:modelValue`],[`update:modelValue`]),setup(t,{emit:n}){let r=n,d=b(t,`modelValue`),{t:p}=y(),E=ne(),D=g(``),O=[{id:`identity`,label:p(`settings.pages.card.creation.identity`),icon:`i-solar:emoji-funny-square-bold-duotone`},{id:`behavior`,label:p(`settings.pages.card.creation.behavior`),icon:`i-solar:chat-round-line-bold-duotone`},{id:`settings`,label:p(`settings.pages.card.creation.settings`),icon:`i-solar:settings-bold-duotone`}],k=i({get:()=>{var e;return O.find(e=>e.id===D.value)?D.value:(e=O[0])?.id||``},set:e=>{D.value=e}}),A=g(!1),j=g(``);function M(e){let t=te(e);if(t.name.length>0)if(/^(?:\d+\.)+\d+$/.test(t.version))if(t.description.length>0)if(t.personality.length>0)if(t.scenario.length>0)if(t.systemPrompt.length>0){if(!(t.postHistoryInstructions.length>0))return A.value=!0,j.value=p(`settings.pages.card.creation.errors.posthistoryinstructions`),!1}else return A.value=!0,j.value=p(`settings.pages.card.creation.errors.systemprompt`),!1;else return A.value=!0,j.value=p(`settings.pages.card.creation.errors.scenario`),!1;else return A.value=!0,j.value=p(`settings.pages.card.creation.errors.personality`),!1;else return A.value=!0,j.value=p(`settings.pages.card.creation.errors.description`),!1;else return A.value=!0,j.value=p(`settings.pages.card.creation.errors.version`),!1;else return A.value=!0,j.value=p(`settings.pages.card.creation.errors.name`),!1;return A.value=!1,E.addCard(t),d.value=!1,!0}let N=g({name:p(`settings.pages.card.creation.defaults.name`),nickname:void 0,version:`1.0`,description:``,notes:void 0,personality:p(`settings.pages.card.creation.defaults.personality`),scenario:p(`settings.pages.card.creation.defaults.scenario`),systemPrompt:p(`settings.pages.card.creation.defaults.systemprompt`),postHistoryInstructions:p(`settings.pages.card.creation.defaults.posthistoryinstructions`),greetings:[],messageExample:[]});function P(e,t){return i({get:()=>N.value[e]??``,set:n=>{let r=n.trim();N.value[e]=r.length>0?t?t(r):r:``}})}let F=P(`name`,e=>(0,R.default)(e)),I=P(`nickname`),L=P(`description`),q=P(`notes`),J=P(`personality`),Y=P(`scenario`),X=i({get:()=>N.value.greetings??[],set:e=>{N.value.greetings=e||[]}}),Z=P(`version`),Q=P(`systemPrompt`),$=P(`postHistoryInstructions`);return(t,n)=>(h(),o(v(oe),{open:d.value,"onUpdate:open":n[12]||=e=>r(`update:modelValue`,e)},{default:x(()=>[u(v(ie),null,{default:x(()=>[u(v(w),{class:`data-[state=open]:animate-fadeIn data-[state=closed]:animate-fadeOut fixed inset-0 z-100 bg-black/50 backdrop-blur-sm`}),u(v(ae),{class:`data-[state=open]:animate-contentShow data-[state=closed]:animate-contentHide fixed left-1/2 top-1/2 z-100 m-0 max-h-[90vh] max-w-6xl w-[92vw] flex flex-col overflow-auto border border-neutral-200 rounded-xl bg-white p-5 shadow-xl 2xl:w-[60vw] lg:w-[80vw] md:w-[85vw] xl:w-[70vw] -translate-x-1/2 -translate-y-1/2 dark:border-neutral-700 dark:bg-neutral-800 sm:p-6`},{default:x(()=>[a(`div`,z,[u(v(T),{"text-2xl":``,"font-normal":``,class:`from-primary-500 to-primary-400 bg-gradient-to-r bg-clip-text text-transparent`},{default:x(()=>[l(_(v(p)(`settings.pages.card.create_card`)),1)]),_:1}),a(`div`,B,[a(`div`,V,[a(`div`,H,[(h(),c(e,null,ee(O,e=>a(`button`,{key:e.id,class:m([`px-4 py-2 text-sm font-medium`,[k.value===e.id?`text-primary-600 dark:text-primary-400 border-b-2 border-primary-500 dark:border-primary-400`:`text-neutral-500 dark:text-neutral-400 hover:text-neutral-700 dark:hover:text-neutral-300`]]),onClick:t=>k.value=e.id},[a(`div`,W,[a(`div`,{class:m(e.icon)},null,2),l(` `+_(e.label),1)])],10,U)),64))])])]),A.value?(h(),c(`div`,G,[a(`p`,K,_(j.value),1)])):s(``,!0),k.value===`identity`?(h(),c(`div`,se,[a(`p`,ce,_(v(p)(`settings.pages.card.creation.fields_info.subtitle`)),1),a(`div`,le,[u(v(C),{modelValue:v(F),"onUpdate:modelValue":n[0]||=e=>f(F)?F.value=e:null,label:v(p)(`settings.pages.card.creation.name`),description:v(p)(`settings.pages.card.creation.fields_info.name`),required:!0},null,8,[`modelValue`,`label`,`description`]),u(v(C),{modelValue:v(I),"onUpdate:modelValue":n[1]||=e=>f(I)?I.value=e:null,label:v(p)(`settings.pages.card.creation.nickname`),description:v(p)(`settings.pages.card.creation.fields_info.nickname`)},null,8,[`modelValue`,`label`,`description`]),u(v(C),{modelValue:v(L),"onUpdate:modelValue":n[2]||=e=>f(L)?L.value=e:null,label:v(p)(`settings.pages.card.creation.description`),"single-line":!1,required:!0,description:v(p)(`settings.pages.card.creation.fields_info.description`)},null,8,[`modelValue`,`label`,`description`]),u(v(C),{modelValue:v(q),"onUpdate:modelValue":n[3]||=e=>f(q)?q.value=e:null,label:v(p)(`settings.pages.card.creator_notes`),"single-line":!1,description:v(p)(`settings.pages.card.creation.fields_info.notes`)},null,8,[`modelValue`,`label`,`description`])])])):k.value===`behavior`?(h(),c(`div`,ue,[a(`div`,de,[u(v(C),{modelValue:v(J),"onUpdate:modelValue":n[4]||=e=>f(J)?J.value=e:null,label:v(p)(`settings.pages.card.personality`),"single-line":!1,required:!0,description:v(p)(`settings.pages.card.creation.fields_info.personality`)},null,8,[`modelValue`,`label`,`description`]),u(v(C),{modelValue:v(Y),"onUpdate:modelValue":n[5]||=e=>f(Y)?Y.value=e:null,label:v(p)(`settings.pages.card.scenario`),"single-line":!1,required:!0,description:v(p)(`settings.pages.card.creation.fields_info.scenario`)},null,8,[`modelValue`,`label`,`description`]),u(v(re),{modelValue:X.value,"onUpdate:modelValue":n[6]||=e=>X.value=e,label:v(p)(`settings.pages.card.creation.greetings`),description:v(p)(`settings.pages.card.creation.fields_info.greetings`)},null,8,[`modelValue`,`label`,`description`])])])):k.value===`settings`?(h(),c(`div`,fe,[a(`div`,pe,[u(v(C),{modelValue:v(Q),"onUpdate:modelValue":n[7]||=e=>f(Q)?Q.value=e:null,label:v(p)(`settings.pages.card.systemprompt`),"single-line":!1,required:!0,description:v(p)(`settings.pages.card.creation.fields_info.systemprompt`)},null,8,[`modelValue`,`label`,`description`]),u(v(C),{modelValue:v($),"onUpdate:modelValue":n[8]||=e=>f($)?$.value=e:null,label:v(p)(`settings.pages.card.posthistoryinstructions`),"single-line":!1,required:!0,description:v(p)(`settings.pages.card.creation.fields_info.posthistoryinstructions`)},null,8,[`modelValue`,`label`,`description`]),u(v(C),{modelValue:v(Z),"onUpdate:modelValue":n[9]||=e=>f(Z)?Z.value=e:null,label:v(p)(`settings.pages.card.creation.version`),required:!0,description:v(p)(`settings.pages.card.creation.fields_info.version`)},null,8,[`modelValue`,`label`,`description`])])])):s(``,!0),a(`div`,me,[u(v(S),{variant:`secondary`,icon:`i-solar:undo-left-bold-duotone`,label:v(p)(`settings.pages.card.cancel`),disabled:!1,onClick:n[10]||=e=>d.value=!1},null,8,[`label`]),u(v(S),{variant:`primary`,icon:`i-solar:check-circle-bold-duotone`,label:v(p)(`settings.pages.card.creation.create`),disabled:!1,onClick:n[11]||=e=>M(N.value)},null,8,[`label`])])])]),_:1})]),_:1})]),_:1},8,[`open`]))}}),J=n(q,[[`__scopeId`,`data-v-deceb1c9`]]);export{J as CardCreationDialog_default}; \ No newline at end of file +\f\v            \u2028\u2029   `,i=`᠎`;function a(){return n.call(r)===``&&n.call(i)===i}t.exports=a}),N=t((exports,t)=>{var n=k(),r=/^[\u0020\f\n\r\t\v\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]*([\S\s]*?)[\u0020\f\n\r\t\v\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]*$/;function i(e){return n(e,r,`$1`)}t.exports=i}),P=t((exports,t)=>{var n=j();function r(e){return n.call(e)}t.exports=r}),F=t((exports,t)=>{var n=A(),r=M(),i=N(),a=P(),o;o=n&&r()?a:i,t.exports=o}),I=t((exports,t)=>{var n=D(),r=k(),i=F(),a=/\s+/g,o=/[!"'(),–.:;<>?`{}|~\/\\\[\]_#$*&^@%]+/g,s=/([a-z0-9])([A-Z])/g;function c(e){return e=r(e,o,` `),e=r(e,s,`$1 $2`),e=i(e),e=r(e,a,`-`),n(e)}t.exports=c}),L=t((exports,t)=>{var n=I();t.exports=n}),R=r(L());const z={class:`w-full flex flex-col gap-5`},B={class:`mt-4`},V={class:`border-b border-neutral-200 dark:border-neutral-700`},H={class:`flex justify-center -mb-px sm:justify-start space-x-1`},U=[`onClick`],W={class:`flex items-center gap-1`},G={key:0,class:`w-full rounded-xl bg-red900`},K={class:`w-full p-4`},se={key:1,class:`tab-content ml-auto mr-auto w-95%`},ce={class:`mb-3`},le={class:`input-list ml-auto mr-auto w-90% flex flex-row flex-wrap justify-center gap-8`},ue={key:2,class:`tab-content ml-auto mr-auto w-95%`},de={class:`input-list ml-auto mr-auto w-90% flex flex-row flex-wrap justify-center gap-8`},fe={key:3,class:`tab-content ml-auto mr-auto w-95%`},pe={class:`input-list ml-auto mr-auto w-90% flex flex-row flex-wrap justify-center gap-8`},me={class:`ml-auto mr-1 flex flex-row gap-2`};var q=d({__name:`CardCreationDialog`,props:p({modelValue:{type:Boolean}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:p([`update:modelValue`],[`update:modelValue`]),setup(t,{emit:n}){let r=n,d=b(t,`modelValue`),{t:p}=y(),E=ne(),D=g(``),O=[{id:`identity`,label:p(`settings.pages.card.creation.identity`),icon:`i-solar:emoji-funny-square-bold-duotone`},{id:`behavior`,label:p(`settings.pages.card.creation.behavior`),icon:`i-solar:chat-round-line-bold-duotone`},{id:`settings`,label:p(`settings.pages.card.creation.settings`),icon:`i-solar:settings-bold-duotone`}],k=i({get:()=>{var e;return O.find(e=>e.id===D.value)?D.value:(e=O[0])?.id||``},set:e=>{D.value=e}}),A=g(!1),j=g(``);function M(e){let t=te(e);if(t.name.length>0)if(/^(?:\d+\.)+\d+$/.test(t.version))if(t.description.length>0)if(t.personality.length>0)if(t.scenario.length>0)if(t.systemPrompt.length>0){if(!(t.postHistoryInstructions.length>0))return A.value=!0,j.value=p(`settings.pages.card.creation.errors.posthistoryinstructions`),!1}else return A.value=!0,j.value=p(`settings.pages.card.creation.errors.systemprompt`),!1;else return A.value=!0,j.value=p(`settings.pages.card.creation.errors.scenario`),!1;else return A.value=!0,j.value=p(`settings.pages.card.creation.errors.personality`),!1;else return A.value=!0,j.value=p(`settings.pages.card.creation.errors.description`),!1;else return A.value=!0,j.value=p(`settings.pages.card.creation.errors.version`),!1;else return A.value=!0,j.value=p(`settings.pages.card.creation.errors.name`),!1;return A.value=!1,E.addCard(t),d.value=!1,!0}let N=g({name:p(`settings.pages.card.creation.defaults.name`),nickname:void 0,version:`1.0`,description:``,notes:void 0,personality:p(`settings.pages.card.creation.defaults.personality`),scenario:p(`settings.pages.card.creation.defaults.scenario`),systemPrompt:p(`settings.pages.card.creation.defaults.systemprompt`),postHistoryInstructions:p(`settings.pages.card.creation.defaults.posthistoryinstructions`),greetings:[],messageExample:[]});function P(e,t){return i({get:()=>N.value[e]??``,set:n=>{let r=n.trim();N.value[e]=r.length>0?t?t(r):r:``}})}let F=P(`name`,e=>(0,R.default)(e)),I=P(`nickname`),L=P(`description`),q=P(`notes`),J=P(`personality`),Y=P(`scenario`),X=i({get:()=>N.value.greetings??[],set:e=>{N.value.greetings=e||[]}}),Z=P(`version`),Q=P(`systemPrompt`),$=P(`postHistoryInstructions`);return(t,n)=>(h(),o(v(oe),{open:d.value,"onUpdate:open":n[12]||=e=>r(`update:modelValue`,e)},{default:x(()=>[u(v(ie),null,{default:x(()=>[u(v(w),{class:`data-[state=open]:animate-fadeIn data-[state=closed]:animate-fadeOut fixed inset-0 z-100 bg-black/50 backdrop-blur-sm`}),u(v(ae),{class:`data-[state=open]:animate-contentShow data-[state=closed]:animate-contentHide fixed left-1/2 top-1/2 z-100 m-0 max-h-[90vh] max-w-6xl w-[92vw] flex flex-col overflow-auto border border-neutral-200 rounded-xl bg-white p-5 shadow-xl 2xl:w-[60vw] lg:w-[80vw] md:w-[85vw] xl:w-[70vw] -translate-x-1/2 -translate-y-1/2 dark:border-neutral-700 dark:bg-neutral-800 sm:p-6`},{default:x(()=>[a(`div`,z,[u(v(T),{"text-2xl":``,"font-normal":``,class:`from-primary-500 to-primary-400 bg-gradient-to-r bg-clip-text text-transparent`},{default:x(()=>[l(_(v(p)(`settings.pages.card.create_card`)),1)]),_:1}),a(`div`,B,[a(`div`,V,[a(`div`,H,[(h(),c(e,null,ee(O,e=>a(`button`,{key:e.id,class:m([`px-4 py-2 text-sm font-medium`,[k.value===e.id?`text-primary-600 dark:text-primary-400 border-b-2 border-primary-500 dark:border-primary-400`:`text-neutral-500 dark:text-neutral-400 hover:text-neutral-700 dark:hover:text-neutral-300`]]),onClick:t=>k.value=e.id},[a(`div`,W,[a(`div`,{class:m(e.icon)},null,2),l(` `+_(e.label),1)])],10,U)),64))])])]),A.value?(h(),c(`div`,G,[a(`p`,K,_(j.value),1)])):s(``,!0),k.value===`identity`?(h(),c(`div`,se,[a(`p`,ce,_(v(p)(`settings.pages.card.creation.fields_info.subtitle`)),1),a(`div`,le,[u(v(C),{modelValue:v(F),"onUpdate:modelValue":n[0]||=e=>f(F)?F.value=e:null,label:v(p)(`settings.pages.card.creation.name`),description:v(p)(`settings.pages.card.creation.fields_info.name`),required:!0},null,8,[`modelValue`,`label`,`description`]),u(v(C),{modelValue:v(I),"onUpdate:modelValue":n[1]||=e=>f(I)?I.value=e:null,label:v(p)(`settings.pages.card.creation.nickname`),description:v(p)(`settings.pages.card.creation.fields_info.nickname`)},null,8,[`modelValue`,`label`,`description`]),u(v(C),{modelValue:v(L),"onUpdate:modelValue":n[2]||=e=>f(L)?L.value=e:null,label:v(p)(`settings.pages.card.creation.description`),"single-line":!1,required:!0,description:v(p)(`settings.pages.card.creation.fields_info.description`)},null,8,[`modelValue`,`label`,`description`]),u(v(C),{modelValue:v(q),"onUpdate:modelValue":n[3]||=e=>f(q)?q.value=e:null,label:v(p)(`settings.pages.card.creator_notes`),"single-line":!1,description:v(p)(`settings.pages.card.creation.fields_info.notes`)},null,8,[`modelValue`,`label`,`description`])])])):k.value===`behavior`?(h(),c(`div`,ue,[a(`div`,de,[u(v(C),{modelValue:v(J),"onUpdate:modelValue":n[4]||=e=>f(J)?J.value=e:null,label:v(p)(`settings.pages.card.personality`),"single-line":!1,required:!0,description:v(p)(`settings.pages.card.creation.fields_info.personality`)},null,8,[`modelValue`,`label`,`description`]),u(v(C),{modelValue:v(Y),"onUpdate:modelValue":n[5]||=e=>f(Y)?Y.value=e:null,label:v(p)(`settings.pages.card.scenario`),"single-line":!1,required:!0,description:v(p)(`settings.pages.card.creation.fields_info.scenario`)},null,8,[`modelValue`,`label`,`description`]),u(v(re),{modelValue:X.value,"onUpdate:modelValue":n[6]||=e=>X.value=e,label:v(p)(`settings.pages.card.creation.greetings`),description:v(p)(`settings.pages.card.creation.fields_info.greetings`)},null,8,[`modelValue`,`label`,`description`])])])):k.value===`settings`?(h(),c(`div`,fe,[a(`div`,pe,[u(v(C),{modelValue:v(Q),"onUpdate:modelValue":n[7]||=e=>f(Q)?Q.value=e:null,label:v(p)(`settings.pages.card.systemprompt`),"single-line":!1,required:!0,description:v(p)(`settings.pages.card.creation.fields_info.systemprompt`)},null,8,[`modelValue`,`label`,`description`]),u(v(C),{modelValue:v($),"onUpdate:modelValue":n[8]||=e=>f($)?$.value=e:null,label:v(p)(`settings.pages.card.posthistoryinstructions`),"single-line":!1,required:!0,description:v(p)(`settings.pages.card.creation.fields_info.posthistoryinstructions`)},null,8,[`modelValue`,`label`,`description`]),u(v(C),{modelValue:v(Z),"onUpdate:modelValue":n[9]||=e=>f(Z)?Z.value=e:null,label:v(p)(`settings.pages.card.creation.version`),required:!0,description:v(p)(`settings.pages.card.creation.fields_info.version`)},null,8,[`modelValue`,`label`,`description`])])])):s(``,!0),a(`div`,me,[u(v(S),{variant:`secondary`,icon:`i-solar:undo-left-bold-duotone`,label:v(p)(`settings.pages.card.cancel`),disabled:!1,onClick:n[10]||=e=>d.value=!1},null,8,[`label`]),u(v(S),{variant:`primary`,icon:`i-solar:check-circle-bold-duotone`,label:v(p)(`settings.pages.card.creation.create`),disabled:!1,onClick:n[11]||=e=>M(N.value)},null,8,[`label`])])])]),_:1})]),_:1})]),_:1},8,[`open`]))}}),J=n(q,[[`__scopeId`,`data-v-ba1c2b81`]]);export{J as CardCreationDialog_default}; \ No newline at end of file diff --git a/assets/CardCreationDialog-KJgHxakH.css b/assets/CardCreationDialog-KJgHxakH.css deleted file mode 100644 index a371a21216429ea03350ec0f975c0282c3465d40..0000000000000000000000000000000000000000 --- a/assets/CardCreationDialog-KJgHxakH.css +++ /dev/null @@ -1 +0,0 @@ -.input-list[data-v-deceb1c9]>*{min-width:45%}@media (max-width:641px){.input-list[data-v-deceb1c9] *{min-width:unset;width:100%}} diff --git a/assets/CardDetailDialog-BqQSzFGz.js b/assets/CardDetailDialog-BqQSzFGz.js deleted file mode 100644 index b4112bd2cf8c8959ab1e0774919cae774c3097ce..0000000000000000000000000000000000000000 --- a/assets/CardDetailDialog-BqQSzFGz.js +++ /dev/null @@ -1 +0,0 @@ -import"./import-url-browser-DNuYZxPr.js";import"./duckdb-mvp-C3i5IjU8.js";import"./index-CISmcbXk-BkTeNOgG.js";import"./types-AwjH7X1C.js";import"./stores-m0eA85gd.js";import"./__vite-browser-external-CCfYMxZl.js";import"./Button-DFhzbYVt.js";import"./src-C2QbIOor.js";import"./dist-B4cQ-m7C.js";import"./components-BFLl4u81.js";import"./composables-Cgvkd8lL.js";import"./sleep-CvjNLutj.js";import"./queue-DAKPJQl1.js";import"./queues-Dstwm1VQ.js";import"./dist-Cr2QBfS4.js";import"./webgpu-Nt9hTBpW.js";import"./DeleteCardDialog-D4-CgGb9.js";import{CardDetailDialog_default as e}from"./CardDetailDialog-BzvnHVI0.js";export{e as default}; \ No newline at end of file diff --git a/assets/CardDetailDialog-DKkDgBi1.js b/assets/CardDetailDialog-DKkDgBi1.js new file mode 100644 index 0000000000000000000000000000000000000000..a77540d18377d4082b8ef3b2805792689d360f41 --- /dev/null +++ b/assets/CardDetailDialog-DKkDgBi1.js @@ -0,0 +1 @@ +import"./import-url-browser-DNuYZxPr.js";import"./duckdb-mvp-C3i5IjU8.js";import"./index-CISmcbXk-C9oju49Y.js";import"./types-AwjH7X1C.js";import"./stores-2H61GqXP.js";import"./__vite-browser-external-DPh5tFvT.js";import"./Button-D3cjyOEe.js";import"./src-C1Sr0aqN.js";import"./dist-B9GpkGif.js";import"./components-DHUA669a.js";import"./composables-CgcEyUWo.js";import"./sleep-CvjNLutj.js";import"./queue-B0kER5Ap.js";import"./queues-hSEKEE3F.js";import"./dist-Cr2QBfS4.js";import"./webgpu-Nt9hTBpW.js";import"./DeleteCardDialog-C6SDUYNC.js";import{CardDetailDialog_default as e}from"./CardDetailDialog-a4ktjZPI.js";export{e as default}; \ No newline at end of file diff --git a/assets/CardDetailDialog-BzvnHVI0.js b/assets/CardDetailDialog-a4ktjZPI.js similarity index 95% rename from assets/CardDetailDialog-BzvnHVI0.js rename to assets/CardDetailDialog-a4ktjZPI.js index 4defee051d357e12aa399bbb694cf9315b21484f..2d7e5217b75f54af53bc4f6e2e5ef4e53e2126b6 100644 --- a/assets/CardDetailDialog-BzvnHVI0.js +++ b/assets/CardDetailDialog-a4ktjZPI.js @@ -1 +1 @@ -import{Fragment as e,computed as t,createBaseVNode as n,createCommentVNode as r,createElementBlock as i,createTextVNode as a,createVNode as o,defineComponent as s,normalizeClass as c,openBlock as l,ref as u,renderList as d,storeToRefs as f,toDisplayString as p,unref as m,useI18n as ee,withCtx as h}from"./index-CuCRViVh.js";import{useAiriCardStore as te}from"./stores-m0eA85gd.js";import{Button_default as ne}from"./Button-DFhzbYVt.js";import{$u as g,Bu as _,Iv as re,Pu as ie,nu as ae}from"./dist-B4cQ-m7C.js";import{DeleteCardDialog_default as oe}from"./DeleteCardDialog-D4-CgGb9.js";const se={key:0,class:`w-full flex flex-col gap-5`},ce={flex:`~ col`,"gap-3":``},le={flex:`~ row`,"items-center":``,"justify-between":``},ue={flex:`~ row`,"items-center":``,"gap-2":``},de={key:0,class:`flex items-center gap-1 rounded-full bg-primary-100 px-2 py-0.5 text-xs text-primary-600 font-medium dark:bg-primary-900/40 dark:text-primary-400`},fe={"mt-1":``,"text-sm":``,"text-neutral-500":``,"dark:text-neutral-400":``},pe={"font-medium":``},me={flex:`~ row`,"gap-2":``},he={class:`mt-4`},v={class:`border-b border-neutral-200 dark:border-neutral-700`},y={class:`flex justify-center -mb-px sm:justify-start space-x-1`},b=[`onClick`],x={class:`flex items-center gap-1`},S={key:0},C=[`innerHTML`],w={key:1},T=[`innerHTML`],E={key:2},D={flex:`~ col`,"max-h-60":``,"gap-4":``,"overflow-auto":``,"pr-1":``,"sm:max-h-80":``},O={key:0,flex:`~ col`,"gap-2":``},k={"text-lg":``,"text-neutral-500":``,"font-medium":``,"dark:text-neutral-400":``},A=[`innerHTML`],j={key:3},M={grid:`~ cols-1 sm:cols-3`,"gap-4":``},N={flex:`~ col`,bg:`white/60 dark:black/30`,"gap-1":``,"rounded-lg":``,"p-3":``,border:`~ neutral-200/50 dark:neutral-700/30`,transition:`all duration-200`,hover:`bg-white/80 dark:bg-black/40`},P={flex:`~ row`,"items-center":``,"gap-2":``,"text-sm":``,"text-neutral-500":``,"dark:text-neutral-400":``},F={truncate:``,"font-medium":``},I={flex:`~ col`,bg:`white/60 dark:black/30`,"gap-2":``,"rounded-lg":``,"p-3":``,border:`~ neutral-200/50 dark:neutral-700/30`,transition:`all duration-200`,hover:`bg-white/80 dark:bg-black/40`},ge={flex:`~ row`,"items-center":``,"gap-2":``,"text-sm":``,"text-neutral-500":``,"dark:text-neutral-400":``},L={truncate:``,"font-medium":``},_e={flex:`~ col`,bg:`white/60 dark:black/30`,"gap-2":``,"rounded-lg":``,"p-3":``,border:`~ neutral-200/50 dark:neutral-700/30`,transition:`all duration-200`,hover:`bg-white/80 dark:bg-black/40`},ve={flex:`~ row`,"items-center":``,"gap-2":``,"text-sm":``,"text-neutral-500":``,"dark:text-neutral-400":``},ye={truncate:``,"font-medium":``},be={key:1,bg:`neutral-50/50 dark:neutral-900/50`,"rounded-xl":``,"p-8":``,"text-center":``,border:`~ neutral-200/50 dark:neutral-700/30`,shadow:`sm`};var R=s({__name:`CardDetailDialog`,props:{modelValue:{type:Boolean},cardId:null},emits:[`update:modelValue`],setup(s,{emit:R}){let z=s,B=R,{t:V}=ee(),H=te(),{removeCard:xe}=H,{activeCardId:U}=f(H),W=t(()=>{if(z.cardId)return H.getCard(z.cardId)}),G=t(()=>{var e,t,n,r;if(!W.value||!(!((e=W.value.extensions)==null||(e=e.airi)==null)&&e.modules))return{consciousness:``,speech:``,voice:``};let i=W.value.extensions.airi.modules;return{consciousness:(t=i.consciousness)?.model||``,speech:(n=i.speech)?.model||``,voice:(r=i.speech)?.voice_id||``}}),K=t(()=>W.value?{personality:W.value.personality,scenario:W.value.scenario,systemPrompt:W.value.systemPrompt,postHistoryInstructions:W.value.postHistoryInstructions}:{}),q=t(()=>z.cardId===U.value),J=u(!1);function Se(){J.value=!0,setTimeout(()=>{U.value=z.cardId,J.value=!1},300)}function Y(e){return e?.replace(/\{\{(.*?)\}\}/g,`{{ $1 }}`).trim()}let X=u(!1);function Ce(){W.value&&(xe(z.cardId),B(`update:modelValue`,!1)),X.value=!1}let Z=u(``),Q=t(()=>{var e,t;let n=[];return(e=W.value)?.description&&n.push({id:`description`,label:V(`settings.pages.card.description_label`),icon:`i-solar:document-text-linear`}),(t=W.value)?.notes&&n.push({id:`notes`,label:V(`settings.pages.card.creator_notes`),icon:`i-solar:notes-linear`}),Object.values(K.value).some(e=>!!e)&&n.push({id:`character`,label:V(`settings.pages.card.character`),icon:`i-solar:user-rounded-linear`}),n.push({id:`modules`,label:V(`settings.pages.card.modules`),icon:`i-solar:tuning-square-linear`}),n}),$=t({get:()=>{var e;return Q.value.find(e=>e.id===Z.value)?Z.value:(e=Q.value[0])?.id||``},set:e=>{Z.value=e}});return(t,u)=>{var f;return l(),i(e,null,[o(m(ae),{open:s.modelValue,"onUpdate:open":u[0]||=e=>B(`update:modelValue`,e)},{default:h(()=>[o(m(re),null,{default:h(()=>[o(m(g),{class:`data-[state=open]:animate-fadeIn data-[state=closed]:animate-fadeOut fixed inset-0 z-100 bg-black/50 backdrop-blur-sm`}),o(m(ie),{class:`data-[state=open]:animate-contentShow data-[state=closed]:animate-contentHide fixed left-1/2 top-1/2 z-100 m-0 max-h-[90vh] max-w-6xl w-[92vw] flex flex-col overflow-auto border border-neutral-200 rounded-xl bg-white p-5 shadow-xl 2xl:w-[60vw] lg:w-[80vw] md:w-[85vw] xl:w-[70vw] -translate-x-1/2 -translate-y-1/2 dark:border-neutral-700 dark:bg-neutral-800 sm:p-6`},{default:h(()=>[W.value?(l(),i(`div`,se,[n(`div`,ce,[n(`div`,le,[n(`div`,null,[n(`div`,ue,[o(m(_),{"text-2xl":``,"font-normal":``,class:`from-primary-500 to-primary-400 bg-gradient-to-r bg-clip-text text-transparent`},{default:h(()=>[a(p(W.value.name),1)]),_:1}),q.value?(l(),i(`div`,de,[u[3]||=n(`div`,{"i-solar:check-circle-bold-duotone":``,"text-xs":``},null,-1),a(` `+p(m(V)(`settings.pages.card.active_badge`)),1)])):r(``,!0)]),n(`div`,fe,[a(` v`+p(W.value.version)+` `,1),W.value.creator?(l(),i(e,{key:0},[a(` · `+p(m(V)(`settings.pages.card.created_by`))+` `,1),n(`span`,pe,p(W.value.creator),1)],64)):r(``,!0)])]),n(`div`,me,[o(m(ne),{variant:`primary`,icon:q.value?`i-solar:check-circle-bold-duotone`:`i-solar:play-circle-broken`,label:q.value?m(V)(`settings.pages.card.active`):m(V)(`settings.pages.card.activate`),disabled:q.value,class:c({"animate-pulse":J.value}),onClick:Se},null,8,[`icon`,`label`,`disabled`,`class`])])]),n(`div`,he,[n(`div`,v,[n(`div`,y,[(l(!0),i(e,null,d(Q.value,e=>(l(),i(`button`,{key:e.id,class:c([`px-4 py-2 text-sm font-medium`,[$.value===e.id?`text-primary-600 dark:text-primary-400 border-b-2 border-primary-500 dark:border-primary-400`:`text-neutral-500 dark:text-neutral-400 hover:text-neutral-700 dark:hover:text-neutral-300`]]),onClick:t=>$.value=e.id},[n(`div`,x,[n(`div`,{class:c(e.icon)},null,2),a(` `+p(e.label),1)])],10,b))),128))])])]),$.value===`notes`&&W.value.notes?(l(),i(`div`,S,[n(`div`,{bg:`white/60 dark:black/30`,border:`~ neutral-200/50 dark:neutral-700/30`,"max-h-60":``,"overflow-auto":``,"whitespace-pre-line":``,"rounded-lg":``,"p-4":``,"text-neutral-700":``,"sm:max-h-80":``,"dark:text-neutral-300":``,transition:`all duration-200`,hover:`bg-white/80 dark:bg-black/40`,innerHTML:Y(W.value.notes)},null,8,C)])):r(``,!0),$.value===`description`&&W.value.description?(l(),i(`div`,w,[n(`div`,{bg:`white/60 dark:black/30`,"max-h-60":``,"overflow-auto":``,"whitespace-pre-line":``,"rounded-lg":``,"p-4":``,"sm:max-h-80":``,text:`neutral-600 dark:neutral-300`,border:`~ neutral-200/50 dark:neutral-700/30`,innerHTML:Y(W.value.description)},null,8,T)])):r(``,!0),$.value===`character`&&Object.values(K.value).some(e=>!!e)?(l(),i(`div`,E,[n(`div`,D,[(l(!0),i(e,null,d(K.value,(t,a)=>(l(),i(e,{key:a},[t?(l(),i(`div`,O,[n(`h2`,k,p(m(V)(`settings.pages.card.${a.toLowerCase()}`)),1),n(`div`,{bg:`white/60 dark:black/30`,border:`~ neutral-200/50 dark:neutral-700/30`,transition:`all duration-200`,hover:`bg-white/80 dark:bg-black/40`,"max-h-none":``,"overflow-auto":``,"whitespace-pre-line":``,"rounded-lg":``,"p-3":``,"text-neutral-700":``,"dark:text-neutral-300":``,innerHTML:Y(t)},null,8,A)])):r(``,!0)],64))),128))])])):r(``,!0),$.value===`modules`?(l(),i(`div`,j,[n(`div`,M,[n(`div`,N,[n(`span`,P,[u[4]||=n(`div`,{"i-lucide:ghost":``},null,-1),a(` `+p(m(V)(`settings.pages.card.consciousness.model`)),1)]),n(`div`,F,p(G.value.consciousness??`default`),1)]),n(`div`,I,[n(`span`,ge,[u[5]||=n(`div`,{"i-lucide:mic":``},null,-1),a(` `+p(m(V)(`settings.pages.card.speech.model`)),1)]),n(`div`,L,p(G.value.speech??`default`),1)]),n(`div`,_e,[n(`span`,ve,[u[6]||=n(`div`,{"i-lucide:music":``},null,-1),a(` `+p(m(V)(`settings.pages.card.speech.voice`)),1)]),n(`div`,ye,p(G.value.voice??`default`),1)])])])):r(``,!0)])])):(l(),i(`div`,be,[u[7]||=n(`div`,{"i-solar:card-search-broken":``,"mx-auto":``,"mb-3":``,"text-6xl":``,"text-neutral-400":``},null,-1),a(` `+p(m(V)(`settings.pages.card.card_not_found`)),1)]))]),_:1})]),_:1})]),_:1},8,[`open`]),o(oe,{modelValue:X.value,"onUpdate:modelValue":u[1]||=e=>X.value=e,"card-name":(f=W.value)?.name,onConfirm:Ce,onCancel:u[2]||=e=>X.value=!1},null,8,[`modelValue`,`card-name`])],64)}}}),z=R;export{z as CardDetailDialog_default}; \ No newline at end of file +import{Fragment as e,computed as t,createBaseVNode as n,createCommentVNode as r,createElementBlock as i,createTextVNode as a,createVNode as o,defineComponent as s,normalizeClass as c,openBlock as l,ref as u,renderList as d,storeToRefs as f,toDisplayString as p,unref as m,useI18n as ee,withCtx as h}from"./index-CsmT0L1K.js";import{useAiriCardStore as te}from"./stores-2H61GqXP.js";import{Button_default as ne}from"./Button-D3cjyOEe.js";import{$u as g,Bu as _,Iv as re,Pu as ie,nu as ae}from"./dist-B9GpkGif.js";import{DeleteCardDialog_default as oe}from"./DeleteCardDialog-C6SDUYNC.js";const se={key:0,class:`w-full flex flex-col gap-5`},ce={flex:`~ col`,"gap-3":``},le={flex:`~ row`,"items-center":``,"justify-between":``},ue={flex:`~ row`,"items-center":``,"gap-2":``},de={key:0,class:`flex items-center gap-1 rounded-full bg-primary-100 px-2 py-0.5 text-xs text-primary-600 font-medium dark:bg-primary-900/40 dark:text-primary-400`},fe={"mt-1":``,"text-sm":``,"text-neutral-500":``,"dark:text-neutral-400":``},pe={"font-medium":``},me={flex:`~ row`,"gap-2":``},he={class:`mt-4`},v={class:`border-b border-neutral-200 dark:border-neutral-700`},y={class:`flex justify-center -mb-px sm:justify-start space-x-1`},b=[`onClick`],x={class:`flex items-center gap-1`},S={key:0},C=[`innerHTML`],w={key:1},T=[`innerHTML`],E={key:2},D={flex:`~ col`,"max-h-60":``,"gap-4":``,"overflow-auto":``,"pr-1":``,"sm:max-h-80":``},O={key:0,flex:`~ col`,"gap-2":``},k={"text-lg":``,"text-neutral-500":``,"font-medium":``,"dark:text-neutral-400":``},A=[`innerHTML`],j={key:3},M={grid:`~ cols-1 sm:cols-3`,"gap-4":``},N={flex:`~ col`,bg:`white/60 dark:black/30`,"gap-1":``,"rounded-lg":``,"p-3":``,border:`~ neutral-200/50 dark:neutral-700/30`,transition:`all duration-200`,hover:`bg-white/80 dark:bg-black/40`},P={flex:`~ row`,"items-center":``,"gap-2":``,"text-sm":``,"text-neutral-500":``,"dark:text-neutral-400":``},F={truncate:``,"font-medium":``},I={flex:`~ col`,bg:`white/60 dark:black/30`,"gap-2":``,"rounded-lg":``,"p-3":``,border:`~ neutral-200/50 dark:neutral-700/30`,transition:`all duration-200`,hover:`bg-white/80 dark:bg-black/40`},ge={flex:`~ row`,"items-center":``,"gap-2":``,"text-sm":``,"text-neutral-500":``,"dark:text-neutral-400":``},L={truncate:``,"font-medium":``},_e={flex:`~ col`,bg:`white/60 dark:black/30`,"gap-2":``,"rounded-lg":``,"p-3":``,border:`~ neutral-200/50 dark:neutral-700/30`,transition:`all duration-200`,hover:`bg-white/80 dark:bg-black/40`},ve={flex:`~ row`,"items-center":``,"gap-2":``,"text-sm":``,"text-neutral-500":``,"dark:text-neutral-400":``},ye={truncate:``,"font-medium":``},be={key:1,bg:`neutral-50/50 dark:neutral-900/50`,"rounded-xl":``,"p-8":``,"text-center":``,border:`~ neutral-200/50 dark:neutral-700/30`,shadow:`sm`};var R=s({__name:`CardDetailDialog`,props:{modelValue:{type:Boolean},cardId:null},emits:[`update:modelValue`],setup(s,{emit:R}){let z=s,B=R,{t:V}=ee(),H=te(),{removeCard:xe}=H,{activeCardId:U}=f(H),W=t(()=>{if(z.cardId)return H.getCard(z.cardId)}),G=t(()=>{var e,t,n,r;if(!W.value||!(!((e=W.value.extensions)==null||(e=e.airi)==null)&&e.modules))return{consciousness:``,speech:``,voice:``};let i=W.value.extensions.airi.modules;return{consciousness:(t=i.consciousness)?.model||``,speech:(n=i.speech)?.model||``,voice:(r=i.speech)?.voice_id||``}}),K=t(()=>W.value?{personality:W.value.personality,scenario:W.value.scenario,systemPrompt:W.value.systemPrompt,postHistoryInstructions:W.value.postHistoryInstructions}:{}),q=t(()=>z.cardId===U.value),J=u(!1);function Se(){J.value=!0,setTimeout(()=>{U.value=z.cardId,J.value=!1},300)}function Y(e){return e?.replace(/\{\{(.*?)\}\}/g,`{{ $1 }}`).trim()}let X=u(!1);function Ce(){W.value&&(xe(z.cardId),B(`update:modelValue`,!1)),X.value=!1}let Z=u(``),Q=t(()=>{var e,t;let n=[];return(e=W.value)?.description&&n.push({id:`description`,label:V(`settings.pages.card.description_label`),icon:`i-solar:document-text-linear`}),(t=W.value)?.notes&&n.push({id:`notes`,label:V(`settings.pages.card.creator_notes`),icon:`i-solar:notes-linear`}),Object.values(K.value).some(e=>!!e)&&n.push({id:`character`,label:V(`settings.pages.card.character`),icon:`i-solar:user-rounded-linear`}),n.push({id:`modules`,label:V(`settings.pages.card.modules`),icon:`i-solar:tuning-square-linear`}),n}),$=t({get:()=>{var e;return Q.value.find(e=>e.id===Z.value)?Z.value:(e=Q.value[0])?.id||``},set:e=>{Z.value=e}});return(t,u)=>{var f;return l(),i(e,null,[o(m(ae),{open:s.modelValue,"onUpdate:open":u[0]||=e=>B(`update:modelValue`,e)},{default:h(()=>[o(m(re),null,{default:h(()=>[o(m(g),{class:`data-[state=open]:animate-fadeIn data-[state=closed]:animate-fadeOut fixed inset-0 z-100 bg-black/50 backdrop-blur-sm`}),o(m(ie),{class:`data-[state=open]:animate-contentShow data-[state=closed]:animate-contentHide fixed left-1/2 top-1/2 z-100 m-0 max-h-[90vh] max-w-6xl w-[92vw] flex flex-col overflow-auto border border-neutral-200 rounded-xl bg-white p-5 shadow-xl 2xl:w-[60vw] lg:w-[80vw] md:w-[85vw] xl:w-[70vw] -translate-x-1/2 -translate-y-1/2 dark:border-neutral-700 dark:bg-neutral-800 sm:p-6`},{default:h(()=>[W.value?(l(),i(`div`,se,[n(`div`,ce,[n(`div`,le,[n(`div`,null,[n(`div`,ue,[o(m(_),{"text-2xl":``,"font-normal":``,class:`from-primary-500 to-primary-400 bg-gradient-to-r bg-clip-text text-transparent`},{default:h(()=>[a(p(W.value.name),1)]),_:1}),q.value?(l(),i(`div`,de,[u[3]||=n(`div`,{"i-solar:check-circle-bold-duotone":``,"text-xs":``},null,-1),a(` `+p(m(V)(`settings.pages.card.active_badge`)),1)])):r(``,!0)]),n(`div`,fe,[a(` v`+p(W.value.version)+` `,1),W.value.creator?(l(),i(e,{key:0},[a(` · `+p(m(V)(`settings.pages.card.created_by`))+` `,1),n(`span`,pe,p(W.value.creator),1)],64)):r(``,!0)])]),n(`div`,me,[o(m(ne),{variant:`primary`,icon:q.value?`i-solar:check-circle-bold-duotone`:`i-solar:play-circle-broken`,label:q.value?m(V)(`settings.pages.card.active`):m(V)(`settings.pages.card.activate`),disabled:q.value,class:c({"animate-pulse":J.value}),onClick:Se},null,8,[`icon`,`label`,`disabled`,`class`])])]),n(`div`,he,[n(`div`,v,[n(`div`,y,[(l(!0),i(e,null,d(Q.value,e=>(l(),i(`button`,{key:e.id,class:c([`px-4 py-2 text-sm font-medium`,[$.value===e.id?`text-primary-600 dark:text-primary-400 border-b-2 border-primary-500 dark:border-primary-400`:`text-neutral-500 dark:text-neutral-400 hover:text-neutral-700 dark:hover:text-neutral-300`]]),onClick:t=>$.value=e.id},[n(`div`,x,[n(`div`,{class:c(e.icon)},null,2),a(` `+p(e.label),1)])],10,b))),128))])])]),$.value===`notes`&&W.value.notes?(l(),i(`div`,S,[n(`div`,{bg:`white/60 dark:black/30`,border:`~ neutral-200/50 dark:neutral-700/30`,"max-h-60":``,"overflow-auto":``,"whitespace-pre-line":``,"rounded-lg":``,"p-4":``,"text-neutral-700":``,"sm:max-h-80":``,"dark:text-neutral-300":``,transition:`all duration-200`,hover:`bg-white/80 dark:bg-black/40`,innerHTML:Y(W.value.notes)},null,8,C)])):r(``,!0),$.value===`description`&&W.value.description?(l(),i(`div`,w,[n(`div`,{bg:`white/60 dark:black/30`,"max-h-60":``,"overflow-auto":``,"whitespace-pre-line":``,"rounded-lg":``,"p-4":``,"sm:max-h-80":``,text:`neutral-600 dark:neutral-300`,border:`~ neutral-200/50 dark:neutral-700/30`,innerHTML:Y(W.value.description)},null,8,T)])):r(``,!0),$.value===`character`&&Object.values(K.value).some(e=>!!e)?(l(),i(`div`,E,[n(`div`,D,[(l(!0),i(e,null,d(K.value,(t,a)=>(l(),i(e,{key:a},[t?(l(),i(`div`,O,[n(`h2`,k,p(m(V)(`settings.pages.card.${a.toLowerCase()}`)),1),n(`div`,{bg:`white/60 dark:black/30`,border:`~ neutral-200/50 dark:neutral-700/30`,transition:`all duration-200`,hover:`bg-white/80 dark:bg-black/40`,"max-h-none":``,"overflow-auto":``,"whitespace-pre-line":``,"rounded-lg":``,"p-3":``,"text-neutral-700":``,"dark:text-neutral-300":``,innerHTML:Y(t)},null,8,A)])):r(``,!0)],64))),128))])])):r(``,!0),$.value===`modules`?(l(),i(`div`,j,[n(`div`,M,[n(`div`,N,[n(`span`,P,[u[4]||=n(`div`,{"i-lucide:ghost":``},null,-1),a(` `+p(m(V)(`settings.pages.card.consciousness.model`)),1)]),n(`div`,F,p(G.value.consciousness??`default`),1)]),n(`div`,I,[n(`span`,ge,[u[5]||=n(`div`,{"i-lucide:mic":``},null,-1),a(` `+p(m(V)(`settings.pages.card.speech.model`)),1)]),n(`div`,L,p(G.value.speech??`default`),1)]),n(`div`,_e,[n(`span`,ve,[u[6]||=n(`div`,{"i-lucide:music":``},null,-1),a(` `+p(m(V)(`settings.pages.card.speech.voice`)),1)]),n(`div`,ye,p(G.value.voice??`default`),1)])])])):r(``,!0)])])):(l(),i(`div`,be,[u[7]||=n(`div`,{"i-solar:card-search-broken":``,"mx-auto":``,"mb-3":``,"text-6xl":``,"text-neutral-400":``},null,-1),a(` `+p(m(V)(`settings.pages.card.card_not_found`)),1)]))]),_:1})]),_:1})]),_:1},8,[`open`]),o(oe,{modelValue:X.value,"onUpdate:modelValue":u[1]||=e=>X.value=e,"card-name":(f=W.value)?.name,onConfirm:Ce,onCancel:u[2]||=e=>X.value=!1},null,8,[`modelValue`,`card-name`])],64)}}}),z=R;export{z as CardDetailDialog_default}; \ No newline at end of file diff --git a/assets/CardListItem-BrwrvTw2.js b/assets/CardListItem-BrwrvTw2.js deleted file mode 100644 index 2d1ba0e24729191fbb60f2b288d5d97fb815c1e1..0000000000000000000000000000000000000000 --- a/assets/CardListItem-BrwrvTw2.js +++ /dev/null @@ -1 +0,0 @@ -import"./import-url-browser-DNuYZxPr.js";import"./duckdb-mvp-C3i5IjU8.js";import"./index-CISmcbXk-BkTeNOgG.js";import"./types-AwjH7X1C.js";import"./stores-m0eA85gd.js";import"./__vite-browser-external-CCfYMxZl.js";import"./Button-DFhzbYVt.js";import"./src-C2QbIOor.js";import"./components-BFLl4u81.js";import"./composables-Cgvkd8lL.js";import"./sleep-CvjNLutj.js";import"./queue-DAKPJQl1.js";import"./queues-Dstwm1VQ.js";import"./dist-Cr2QBfS4.js";import"./webgpu-Nt9hTBpW.js";import{CardListItem_default as e}from"./CardListItem-DsIvl-nB.js";export{e as default}; \ No newline at end of file diff --git a/assets/CardListItem-DsIvl-nB.js b/assets/CardListItem-Bx65D5jB.js similarity index 96% rename from assets/CardListItem-DsIvl-nB.js rename to assets/CardListItem-Bx65D5jB.js index 491349552e16b4c839baada93a6df63fe937ea50..9fdcc94f0543ad92b5a218c3401846f2ab1585b6 100644 --- a/assets/CardListItem-DsIvl-nB.js +++ b/assets/CardListItem-Bx65D5jB.js @@ -1 +1 @@ -import{createBaseVNode as e,createBlock as t,createCommentVNode as n,createElementBlock as r,defineComponent as i,normalizeClass as a,openBlock as o,toDisplayString as s,unref as c,withCtx as l,withModifiers as u}from"./index-CuCRViVh.js";import{CursorFloating_default as d}from"./components-BFLl4u81.js";const f={relative:``,flex:`~ col 1`,"justify-between":``,"gap-3":``,"overflow-hidden":``,"rounded-lg":``,bg:`white dark:neutral-900`,"p-5":``,transition:`all ease-in-out duration-400`,after:`content-empty absolute inset-0 z--2 w-full h-full bg-dotted-[neutral-200/80] bg-size-10px mask-image-[linear-gradient(165deg,white_30%,transparent_50%)] transition-all duration-400 ease-in-out`,hover:`after:bg-dotted-[primary-300/50] dark:after:bg-dotted-[primary-200/20] text-primary-600/80 dark:text-primary-300/80`},p={"z-1":``,flex:``,"items-start":``,"justify-between":``,"gap-2":``},m={"flex-1":``,truncate:``,"text-lg":``,"font-normal":``},h={key:0,"shrink-0":``,"rounded-md":``,"p-1":``,bg:`primary-100 dark:primary-900/40`,text:`primary-600 dark:primary-400`},g={key:0,"line-clamp-3":``,"min-h-40px":``,"flex-1":``,"text-sm":``,text:`neutral-500 dark:neutral-400`},_={"z-1":``,flex:``,"items-center":``,"justify-between":``,"text-xs":``,text:`neutral-500 dark:neutral-400`},v={flex:``,"items-center":``,"gap-1.5":``},y={flex:``,"items-center":``,"gap-0.5":``},b={flex:``,"items-center":``,"gap-0.5":``},x={flex:``,"items-center":``,"justify-end":``,"px-2":``,"py-1.5":``},S=[`disabled`];var C=i({__name:`CardListItem`,props:{id:null,name:null,description:null,isActive:{type:Boolean},isSelected:{type:Boolean},version:null,consciousnessModel:null,voiceModel:null},emits:[`select`,`activate`,`delete`],setup(i,{emit:C}){let w=C;return(C,T)=>(o(),t(c(d),{relative:``,"min-h-120px":``,flex:`~ col`,"cursor-pointer":``,"overflow-hidden":``,"rounded-xl":``,class:a([i.isSelected?`border-2 border-primary-400 dark:border-primary-600`:`border-2 border-neutral-100 dark:border-neutral-800/25`]),bg:`neutral-200/50 dark:neutral-800/50`,"drop-shadow":`none hover:[0px_4px_4px_rgba(220,220,220,0.4)] active:[0px_0px_0px_rgba(220,220,220,0.25)] dark:hover:none`,transition:`all ease-in-out duration-400`,before:`content-empty absolute inset-0 z-0 w-25% h-full transition-all duration-400 ease-in-out bg-gradient-to-r from-primary-500/0 to-primary-500/0 dark:from-primary-400/0 dark:to-primary-400/0 mask-image-[linear-gradient(120deg,white_100%)] opacity-0`,hover:`before:opacity-100 before:bg-gradient-to-r before:from-primary-500/20 before:via-primary-500/10 before:to-transparent before:dark:from-primary-400/20 before:dark:via-primary-400/10 before:dark:to-transparent`,onClick:T[2]||=e=>w(`select`)},{default:l(()=>[e(`div`,f,[e(`div`,p,[e(`h3`,m,s(i.name),1),i.isActive?(o(),r(`div`,h,T[3]||=[e(`div`,{"i-solar:check-circle-bold-duotone":``,"text-sm":``},null,-1)])):n(``,!0)]),i.description?(o(),r(`p`,g,s(i.description),1)):n(``,!0),e(`div`,_,[e(`div`,null,`v`+s(i.version),1),e(`div`,v,[e(`div`,y,[T[4]||=e(`div`,{"i-lucide:ghost":``,"text-xs":``},null,-1),e(`span`,null,s(i.consciousnessModel),1)]),e(`div`,b,[T[5]||=e(`div`,{"i-lucide:mic":``,"text-xs":``},null,-1),e(`span`,null,s(i.voiceModel),1)])])])]),e(`div`,x,[e(`button`,{"rounded-lg":``,"p-1.5":``,"transition-colors":``,hover:`bg-neutral-200 dark:bg-neutral-700/50`,disabled:i.isActive,onClick:T[0]||=u(e=>w(`activate`),[`stop`])},[e(`div`,{class:a([i.isActive?`i-solar:check-circle-bold-duotone text-primary-500 dark:text-primary-400`:`i-solar:play-circle-broken text-neutral-500 dark:text-neutral-400`])},null,2)],8,S),i.id===`default`?n(``,!0):(o(),r(`button`,{key:0,"rounded-lg":``,"p-1.5":``,"transition-colors":``,hover:`bg-neutral-200 dark:bg-neutral-700/50`,onClick:T[1]||=u(e=>w(`delete`),[`stop`])},T[6]||=[e(`div`,{"i-solar:trash-bin-trash-linear":``,text:`neutral-500 dark:neutral-400`},null,-1)]))])]),_:1},8,[`class`]))}}),w=C;export{w as CardListItem_default}; \ No newline at end of file +import{createBaseVNode as e,createBlock as t,createCommentVNode as n,createElementBlock as r,defineComponent as i,normalizeClass as a,openBlock as o,toDisplayString as s,unref as c,withCtx as l,withModifiers as u}from"./index-CsmT0L1K.js";import{CursorFloating_default as d}from"./components-DHUA669a.js";const f={relative:``,flex:`~ col 1`,"justify-between":``,"gap-3":``,"overflow-hidden":``,"rounded-lg":``,bg:`white dark:neutral-900`,"p-5":``,transition:`all ease-in-out duration-400`,after:`content-empty absolute inset-0 z--2 w-full h-full bg-dotted-[neutral-200/80] bg-size-10px mask-image-[linear-gradient(165deg,white_30%,transparent_50%)] transition-all duration-400 ease-in-out`,hover:`after:bg-dotted-[primary-300/50] dark:after:bg-dotted-[primary-200/20] text-primary-600/80 dark:text-primary-300/80`},p={"z-1":``,flex:``,"items-start":``,"justify-between":``,"gap-2":``},m={"flex-1":``,truncate:``,"text-lg":``,"font-normal":``},h={key:0,"shrink-0":``,"rounded-md":``,"p-1":``,bg:`primary-100 dark:primary-900/40`,text:`primary-600 dark:primary-400`},g={key:0,"line-clamp-3":``,"min-h-40px":``,"flex-1":``,"text-sm":``,text:`neutral-500 dark:neutral-400`},_={"z-1":``,flex:``,"items-center":``,"justify-between":``,"text-xs":``,text:`neutral-500 dark:neutral-400`},v={flex:``,"items-center":``,"gap-1.5":``},y={flex:``,"items-center":``,"gap-0.5":``},b={flex:``,"items-center":``,"gap-0.5":``},x={flex:``,"items-center":``,"justify-end":``,"px-2":``,"py-1.5":``},S=[`disabled`];var C=i({__name:`CardListItem`,props:{id:null,name:null,description:null,isActive:{type:Boolean},isSelected:{type:Boolean},version:null,consciousnessModel:null,voiceModel:null},emits:[`select`,`activate`,`delete`],setup(i,{emit:C}){let w=C;return(C,T)=>(o(),t(c(d),{relative:``,"min-h-120px":``,flex:`~ col`,"cursor-pointer":``,"overflow-hidden":``,"rounded-xl":``,class:a([i.isSelected?`border-2 border-primary-400 dark:border-primary-600`:`border-2 border-neutral-100 dark:border-neutral-800/25`]),bg:`neutral-200/50 dark:neutral-800/50`,"drop-shadow":`none hover:[0px_4px_4px_rgba(220,220,220,0.4)] active:[0px_0px_0px_rgba(220,220,220,0.25)] dark:hover:none`,transition:`all ease-in-out duration-400`,before:`content-empty absolute inset-0 z-0 w-25% h-full transition-all duration-400 ease-in-out bg-gradient-to-r from-primary-500/0 to-primary-500/0 dark:from-primary-400/0 dark:to-primary-400/0 mask-image-[linear-gradient(120deg,white_100%)] opacity-0`,hover:`before:opacity-100 before:bg-gradient-to-r before:from-primary-500/20 before:via-primary-500/10 before:to-transparent before:dark:from-primary-400/20 before:dark:via-primary-400/10 before:dark:to-transparent`,onClick:T[2]||=e=>w(`select`)},{default:l(()=>[e(`div`,f,[e(`div`,p,[e(`h3`,m,s(i.name),1),i.isActive?(o(),r(`div`,h,T[3]||=[e(`div`,{"i-solar:check-circle-bold-duotone":``,"text-sm":``},null,-1)])):n(``,!0)]),i.description?(o(),r(`p`,g,s(i.description),1)):n(``,!0),e(`div`,_,[e(`div`,null,`v`+s(i.version),1),e(`div`,v,[e(`div`,y,[T[4]||=e(`div`,{"i-lucide:ghost":``,"text-xs":``},null,-1),e(`span`,null,s(i.consciousnessModel),1)]),e(`div`,b,[T[5]||=e(`div`,{"i-lucide:mic":``,"text-xs":``},null,-1),e(`span`,null,s(i.voiceModel),1)])])])]),e(`div`,x,[e(`button`,{"rounded-lg":``,"p-1.5":``,"transition-colors":``,hover:`bg-neutral-200 dark:bg-neutral-700/50`,disabled:i.isActive,onClick:T[0]||=u(e=>w(`activate`),[`stop`])},[e(`div`,{class:a([i.isActive?`i-solar:check-circle-bold-duotone text-primary-500 dark:text-primary-400`:`i-solar:play-circle-broken text-neutral-500 dark:text-neutral-400`])},null,2)],8,S),i.id===`default`?n(``,!0):(o(),r(`button`,{key:0,"rounded-lg":``,"p-1.5":``,"transition-colors":``,hover:`bg-neutral-200 dark:bg-neutral-700/50`,onClick:T[1]||=u(e=>w(`delete`),[`stop`])},T[6]||=[e(`div`,{"i-solar:trash-bin-trash-linear":``,text:`neutral-500 dark:neutral-400`},null,-1)]))])]),_:1},8,[`class`]))}}),w=C;export{w as CardListItem_default}; \ No newline at end of file diff --git a/assets/CardListItem-wx0Xf629.js b/assets/CardListItem-wx0Xf629.js new file mode 100644 index 0000000000000000000000000000000000000000..e26df5bba756b3616f82de06675713609dc4fa73 --- /dev/null +++ b/assets/CardListItem-wx0Xf629.js @@ -0,0 +1 @@ +import"./import-url-browser-DNuYZxPr.js";import"./duckdb-mvp-C3i5IjU8.js";import"./index-CISmcbXk-C9oju49Y.js";import"./types-AwjH7X1C.js";import"./stores-2H61GqXP.js";import"./__vite-browser-external-DPh5tFvT.js";import"./Button-D3cjyOEe.js";import"./src-C1Sr0aqN.js";import"./components-DHUA669a.js";import"./composables-CgcEyUWo.js";import"./sleep-CvjNLutj.js";import"./queue-B0kER5Ap.js";import"./queues-hSEKEE3F.js";import"./dist-Cr2QBfS4.js";import"./webgpu-Nt9hTBpW.js";import{CardListItem_default as e}from"./CardListItem-Bx65D5jB.js";export{e as default}; \ No newline at end of file diff --git a/assets/CheckBar-BxEtoWm5.js b/assets/CheckBar-Bo3RcSNe.js similarity index 95% rename from assets/CheckBar-BxEtoWm5.js rename to assets/CheckBar-Bo3RcSNe.js index f480603c79d65d151962f7f44c3e3ac4cdbce369..1bad8bef1a9c6fdc2b0c8d1533bd9926f7ebed21 100644 --- a/assets/CheckBar-BxEtoWm5.js +++ b/assets/CheckBar-Bo3RcSNe.js @@ -1 +1 @@ -import{Transition as e,createBaseVNode as t,createCommentVNode as n,createElementBlock as r,createTextVNode as i,createVNode as a,defineComponent as o,mergeModels as s,normalizeClass as c,openBlock as l,toDisplayString as u,useModel as d,vModelCheckbox as f,withCtx as p,withDirectives as m}from"./index-CuCRViVh.js";const h={class:`w-full flex cursor-pointer items-center justify-between rounded-lg px-4 py-3 text-sm outline-none transition-all duration-250 ease-in-out`,bg:`neutral-50 dark:neutral-800`,hover:`bg-neutral-200 dark:bg-neutral-700`},g=[`aria-checked`],_={key:0,text:`sm neutral-500`};var v=o({__name:`CheckBar`,props:s({text:null,iconOn:null,iconOff:null,description:null},{modelValue:{type:Boolean},modelModifiers:{}}),emits:[`update:modelValue`],setup(o){let s=d(o,`modelValue`);return(d,v)=>(l(),r(`label`,h,[m(t(`input`,{"onUpdate:modelValue":v[0]||=e=>s.value=e,"aria-checked":s.value,type:`checkbox`,hidden:``},null,8,g),[[f,s.value]]),t(`div`,null,[i(u(d.$t(o.text))+` `,1),o.description?(l(),r(`div`,_,u(d.$t(o.description)),1)):n(``,!0)]),a(e,{name:`slide-away`,mode:`out-in`},{default:p(()=>[s.value?(l(),r(`div`,{key:0,class:c(o.iconOn),transition:`all ease-in-out duration-250`},null,2)):(l(),r(`div`,{key:1,class:c(o.iconOff),transition:`all ease-in-out duration-250`},null,2))]),_:1})]))}}),y=v;export{y as CheckBar_default}; \ No newline at end of file +import{Transition as e,createBaseVNode as t,createCommentVNode as n,createElementBlock as r,createTextVNode as i,createVNode as a,defineComponent as o,mergeModels as s,normalizeClass as c,openBlock as l,toDisplayString as u,useModel as d,vModelCheckbox as f,withCtx as p,withDirectives as m}from"./index-CsmT0L1K.js";const h={class:`w-full flex cursor-pointer items-center justify-between rounded-lg px-4 py-3 text-sm outline-none transition-all duration-250 ease-in-out`,bg:`neutral-50 dark:neutral-800`,hover:`bg-neutral-200 dark:bg-neutral-700`},g=[`aria-checked`],_={key:0,text:`sm neutral-500`};var v=o({__name:`CheckBar`,props:s({text:null,iconOn:null,iconOff:null,description:null},{modelValue:{type:Boolean},modelModifiers:{}}),emits:[`update:modelValue`],setup(o){let s=d(o,`modelValue`);return(d,v)=>(l(),r(`label`,h,[m(t(`input`,{"onUpdate:modelValue":v[0]||=e=>s.value=e,"aria-checked":s.value,type:`checkbox`,hidden:``},null,8,g),[[f,s.value]]),t(`div`,null,[i(u(d.$t(o.text))+` `,1),o.description?(l(),r(`div`,_,u(d.$t(o.description)),1)):n(``,!0)]),a(e,{name:`slide-away`,mode:`out-in`},{default:p(()=>[s.value?(l(),r(`div`,{key:0,class:c(o.iconOn),transition:`all ease-in-out duration-250`},null,2)):(l(),r(`div`,{key:1,class:c(o.iconOff),transition:`all ease-in-out duration-250`},null,2))]),_:1})]))}}),y=v;export{y as CheckBar_default}; \ No newline at end of file diff --git a/assets/ColorPalette-ZPdCD-E3.js b/assets/ColorPalette-BQYkam8G.js similarity index 90% rename from assets/ColorPalette-ZPdCD-E3.js rename to assets/ColorPalette-BQYkam8G.js index 044a9bc1506fb0108e35fef6c7d0b74164876506..ce05eaf25ae7857d731f2ba32b208ccc8ff11b7a 100644 --- a/assets/ColorPalette-ZPdCD-E3.js +++ b/assets/ColorPalette-BQYkam8G.js @@ -1 +1 @@ -import{DEFAULT_THEME_COLORS_HUE as e,Fragment as t,createBlock as n,createCommentVNode as r,createElementBlock as i,createTextVNode as a,createVNode as o,defineComponent as s,normalizeClass as c,normalizeStyle as l,openBlock as u,renderList as d,toDisplayString as f,unref as p,useSettings as m,withCtx as h}from"./index-CuCRViVh.js";import{Gg as g,Hg as _,Ug as v,Wg as y,jg as b,qg as x}from"./dist-B4cQ-m7C.js";const S={key:0,flex:``,"gap-2":``};var C=s({__name:`ColorPalette`,props:{colors:null},setup(s){let C=m();return(m,w)=>s.colors.length?(u(),i(`div`,S,[(u(!0),i(t,null,d(s.colors,({hex:t,name:r})=>(u(),n(p(_),{key:t||`default`},{default:h(()=>[o(p(y),null,{default:h(()=>[o(p(b),{transition:`all ease-in-out duration-250`,"size-6":``,"cursor-pointer":``,"rounded-full":``,"bg-primary-500":``,style:l(t?{background:t}:{"--chromatic-hue":p(e)}),class:c(p(C).isColorSelectedForPrimary(t)?`scale-150 mx-1`:`hover:scale-110`),onClick:e=>p(C).applyPrimaryColorFrom(t)},null,8,[`style`,`class`,`onClick`]),o(p(x),null,{default:h(()=>[o(p(v),{bg:`white dark:neutral-800`,"rounded-lg":``,"px-3":``,"py-1.5":``,"text-sm":``,"shadow-md":``},{default:h(()=>[a(f(r)+` `,1),o(p(g),{"fill-white":``,"dark:fill-neutral-800":``})]),_:2},1024)]),_:2},1024)]),_:2},1024)]),_:2},1024))),128))])):r(``,!0)}}),w=C;export{w as ColorPalette_default}; \ No newline at end of file +import{DEFAULT_THEME_COLORS_HUE as e,Fragment as t,createBlock as n,createCommentVNode as r,createElementBlock as i,createTextVNode as a,createVNode as o,defineComponent as s,normalizeClass as c,normalizeStyle as l,openBlock as u,renderList as d,toDisplayString as f,unref as p,useSettings as m,withCtx as h}from"./index-CsmT0L1K.js";import{Gg as g,Hg as _,Ug as v,Wg as y,jg as b,qg as x}from"./dist-B9GpkGif.js";const S={key:0,flex:``,"gap-2":``};var C=s({__name:`ColorPalette`,props:{colors:null},setup(s){let C=m();return(m,w)=>s.colors.length?(u(),i(`div`,S,[(u(!0),i(t,null,d(s.colors,({hex:t,name:r})=>(u(),n(p(_),{key:t||`default`},{default:h(()=>[o(p(y),null,{default:h(()=>[o(p(b),{transition:`all ease-in-out duration-250`,"size-6":``,"cursor-pointer":``,"rounded-full":``,"bg-primary-500":``,style:l(t?{background:t}:{"--chromatic-hue":p(e)}),class:c(p(C).isColorSelectedForPrimary(t)?`scale-150 mx-1`:`hover:scale-110`),onClick:e=>p(C).applyPrimaryColorFrom(t)},null,8,[`style`,`class`,`onClick`]),o(p(x),null,{default:h(()=>[o(p(v),{bg:`white dark:neutral-800`,"rounded-lg":``,"px-3":``,"py-1.5":``,"text-sm":``,"shadow-md":``},{default:h(()=>[a(f(r)+` `,1),o(p(g),{"fill-white":``,"dark:fill-neutral-800":``})]),_:2},1024)]),_:2},1024)]),_:2},1024)]),_:2},1024))),128))])):r(``,!0)}}),w=C;export{w as ColorPalette_default}; \ No newline at end of file diff --git a/assets/DeleteCardDialog-BdWfuAqZ.js b/assets/DeleteCardDialog-BdWfuAqZ.js new file mode 100644 index 0000000000000000000000000000000000000000..314b6c2aa833c66501582970d86a676e43c58019 --- /dev/null +++ b/assets/DeleteCardDialog-BdWfuAqZ.js @@ -0,0 +1 @@ +import"./Button-D3cjyOEe.js";import"./src-C1Sr0aqN.js";import"./dist-B9GpkGif.js";import{DeleteCardDialog_default as e}from"./DeleteCardDialog-C6SDUYNC.js";export{e as default}; \ No newline at end of file diff --git a/assets/DeleteCardDialog-D4-CgGb9.js b/assets/DeleteCardDialog-C6SDUYNC.js similarity index 89% rename from assets/DeleteCardDialog-D4-CgGb9.js rename to assets/DeleteCardDialog-C6SDUYNC.js index 14156fe43a39069ebc0c0dbe588806dd71fbf2f3..3c84a67192178480bd73fa00d27d61a045d7de3e 100644 --- a/assets/DeleteCardDialog-D4-CgGb9.js +++ b/assets/DeleteCardDialog-C6SDUYNC.js @@ -1 +1 @@ -import{createBaseVNode as e,createBlock as t,createTextVNode as n,createVNode as r,defineComponent as i,openBlock as a,toDisplayString as o,unref as s,useI18n as c,withCtx as l}from"./index-CuCRViVh.js";import{Button_default as u}from"./Button-DFhzbYVt.js";import{Av as d,Fv as f,Mv as p,Nv as m,Ov as h,Tv as g,Vv as _,kv as v}from"./dist-B4cQ-m7C.js";const y={class:`flex flex-row justify-end gap-3`};var b=i({__name:`DeleteCardDialog`,props:{modelValue:{type:Boolean},cardName:null},emits:[`update:modelValue`,`confirm`,`cancel`],setup(i,{emit:b}){let x=b,{t:S}=c();function C(){x(`update:modelValue`,!1),x(`cancel`)}function w(){x(`update:modelValue`,!1),x(`confirm`)}return(c,b)=>(a(),t(s(g),{open:i.modelValue,"onUpdate:open":b[0]||=e=>x(`update:modelValue`,e)},{default:l(()=>[r(s(d),null,{default:l(()=>[r(s(v),{class:`data-[state=open]:animate-fadeIn data-[state=closed]:animate-fadeOut fixed inset-0 z-100 bg-black/50`}),r(s(h),{class:`data-[state=open]:animate-contentShow data-[state=closed]:animate-contentHide fixed left-1/2 top-1/2 z-100 max-w-md w-full border border-neutral-200 rounded-xl bg-white p-6 shadow-xl -translate-x-1/2 -translate-y-1/2 dark:border-neutral-700 dark:bg-neutral-800`},{default:l(()=>[r(s(_),{class:`mb-4 text-xl font-normal`},{default:l(()=>[n(o(s(S)(`settings.pages.card.delete_card`)),1)]),_:1}),r(s(f),{class:`mb-6`},{default:l(()=>[n(o(s(S)(`settings.pages.card.delete_confirmation`))+` `,1),e(`b`,null,`"`+o(i.cardName||``)+`"`,1)]),_:1}),e(`div`,y,[r(s(p),{"as-child":``},{default:l(()=>[r(s(u),{variant:`secondary`,label:s(S)(`settings.pages.card.cancel`),onClick:C},null,8,[`label`])]),_:1}),r(s(m),{"as-child":``},{default:l(()=>[r(s(u),{variant:`danger`,label:s(S)(`settings.pages.card.delete`),onClick:w},null,8,[`label`])]),_:1})])]),_:1})]),_:1})]),_:1},8,[`open`]))}}),x=b;export{x as DeleteCardDialog_default}; \ No newline at end of file +import{createBaseVNode as e,createBlock as t,createTextVNode as n,createVNode as r,defineComponent as i,openBlock as a,toDisplayString as o,unref as s,useI18n as c,withCtx as l}from"./index-CsmT0L1K.js";import{Button_default as u}from"./Button-D3cjyOEe.js";import{Av as d,Fv as f,Mv as p,Nv as m,Ov as h,Tv as g,Vv as _,kv as v}from"./dist-B9GpkGif.js";const y={class:`flex flex-row justify-end gap-3`};var b=i({__name:`DeleteCardDialog`,props:{modelValue:{type:Boolean},cardName:null},emits:[`update:modelValue`,`confirm`,`cancel`],setup(i,{emit:b}){let x=b,{t:S}=c();function C(){x(`update:modelValue`,!1),x(`cancel`)}function w(){x(`update:modelValue`,!1),x(`confirm`)}return(c,b)=>(a(),t(s(g),{open:i.modelValue,"onUpdate:open":b[0]||=e=>x(`update:modelValue`,e)},{default:l(()=>[r(s(d),null,{default:l(()=>[r(s(v),{class:`data-[state=open]:animate-fadeIn data-[state=closed]:animate-fadeOut fixed inset-0 z-100 bg-black/50`}),r(s(h),{class:`data-[state=open]:animate-contentShow data-[state=closed]:animate-contentHide fixed left-1/2 top-1/2 z-100 max-w-md w-full border border-neutral-200 rounded-xl bg-white p-6 shadow-xl -translate-x-1/2 -translate-y-1/2 dark:border-neutral-700 dark:bg-neutral-800`},{default:l(()=>[r(s(_),{class:`mb-4 text-xl font-normal`},{default:l(()=>[n(o(s(S)(`settings.pages.card.delete_card`)),1)]),_:1}),r(s(f),{class:`mb-6`},{default:l(()=>[n(o(s(S)(`settings.pages.card.delete_confirmation`))+` `,1),e(`b`,null,`"`+o(i.cardName||``)+`"`,1)]),_:1}),e(`div`,y,[r(s(p),{"as-child":``},{default:l(()=>[r(s(u),{variant:`secondary`,label:s(S)(`settings.pages.card.cancel`),onClick:C},null,8,[`label`])]),_:1}),r(s(m),{"as-child":``},{default:l(()=>[r(s(u),{variant:`danger`,label:s(S)(`settings.pages.card.delete`),onClick:w},null,8,[`label`])]),_:1})])]),_:1})]),_:1})]),_:1},8,[`open`]))}}),x=b;export{x as DeleteCardDialog_default}; \ No newline at end of file diff --git a/assets/DeleteCardDialog-xlTiv14_.js b/assets/DeleteCardDialog-xlTiv14_.js deleted file mode 100644 index 9a47df5efc44aec551f59f3c63e256ac37824909..0000000000000000000000000000000000000000 --- a/assets/DeleteCardDialog-xlTiv14_.js +++ /dev/null @@ -1 +0,0 @@ -import"./Button-DFhzbYVt.js";import"./src-C2QbIOor.js";import"./dist-B4cQ-m7C.js";import{DeleteCardDialog_default as e}from"./DeleteCardDialog-D4-CgGb9.js";export{e as default}; \ No newline at end of file diff --git a/assets/HeaderLink-BuxOmtb4.js b/assets/HeaderLink-Dws9YKmo.js similarity index 92% rename from assets/HeaderLink-BuxOmtb4.js rename to assets/HeaderLink-Dws9YKmo.js index 0a7ffe1a333df1d7ae43249045888b5512b2e4f1..b2075659ea0d2254b79fb1c3be2aa9245901295c 100644 --- a/assets/HeaderLink-BuxOmtb4.js +++ b/assets/HeaderLink-Dws9YKmo.js @@ -1 +1 @@ -import{RouterLink as e,__plugin_vue_export_helper_default as t,createBaseVNode as n,createBlock as r,createElementBlock as i,defineComponent as a,openBlock as o,unref as s,useDark as c,withCtx as l}from"./index-CuCRViVh.js";var u=`/assets/logo-dark-B0bvNYTh.svg`,d=`/assets/logo-B2aCU-bH.svg`;const f=[`src`],p=[`src`];var m=a({__name:`HeaderLink`,setup(t){let a=c();return(t,c)=>(o(),r(s(e),{to:`/`,flex:`~`,"items-center":``,"gap-2":``,"px-2":``,"text-nowrap":``,"text-2xl":``,"outline-none":``},{default:l(()=>[s(a)?(o(),i(`img`,{key:0,src:s(u),"h-8":``,"w-8":``,class:`theme-colored`},null,8,f)):(o(),i(`img`,{key:1,src:s(d),"h-8":``,"w-8":``,class:`theme-colored`},null,8,p)),c[0]||=n(`div`,{"translate-y":`[2px]`,"font-normal":``,"font-quicksand":``},[n(`span`,null,`AIRI`)],-1)]),_:1,__:[0]}))}}),h=t(m,[[`__scopeId`,`data-v-3488d4a0`]]);export{h as HeaderLink_default}; \ No newline at end of file +import{RouterLink as e,__plugin_vue_export_helper_default as t,createBaseVNode as n,createBlock as r,createElementBlock as i,defineComponent as a,openBlock as o,unref as s,useDark as c,withCtx as l}from"./index-CsmT0L1K.js";var u=`/assets/logo-dark-B0bvNYTh.svg`,d=`/assets/logo-B2aCU-bH.svg`;const f=[`src`],p=[`src`];var m=a({__name:`HeaderLink`,setup(t){let a=c();return(t,c)=>(o(),r(s(e),{to:`/`,flex:`~`,"items-center":``,"gap-2":``,"px-2":``,"text-nowrap":``,"text-2xl":``,"outline-none":``},{default:l(()=>[s(a)?(o(),i(`img`,{key:0,src:s(u),"h-8":``,"w-8":``,class:`theme-colored`},null,8,f)):(o(),i(`img`,{key:1,src:s(d),"h-8":``,"w-8":``,class:`theme-colored`},null,8,p)),c[0]||=n(`div`,{"translate-y":`[2px]`,"font-normal":``,"font-quicksand":``},[n(`span`,null,`AIRI`)],-1)]),_:1,__:[0]}))}}),h=t(m,[[`__scopeId`,`data-v-3488d4a0`]]);export{h as HeaderLink_default}; \ No newline at end of file diff --git a/assets/IconAnimation-DqqXWuqN.js b/assets/IconAnimation-BDKVR9Dg.js similarity index 95% rename from assets/IconAnimation-DqqXWuqN.js rename to assets/IconAnimation-BDKVR9Dg.js index 185ba0f37edfc05b3865b0a54c149bac22252b62..659ddbd1da55b6702e9990e1f1053dcf60887d84 100644 --- a/assets/IconAnimation-DqqXWuqN.js +++ b/assets/IconAnimation-BDKVR9Dg.js @@ -1 +1 @@ -import{computed as e,createBaseVNode as t,createElementBlock as n,defineComponent as r,normalizeClass as i,normalizeStyle as a,openBlock as o,ref as s,watch as c}from"./index-CuCRViVh.js";var l=r({__name:`IconAnimation`,props:{icon:null,iconSize:null,position:null,duration:null,started:{type:Boolean},textColor:null,isReverse:{type:Boolean},zIndex:null},emits:[`animationEnded`],setup(r,{emit:l}){let u=r,d=l,f=s(!1);c(()=>u.started,e=>{e&&requestAnimationFrame(()=>{f.value=!0})});let p=e(()=>({opacity:f.value===u.isReverse?0:1,size:f.value===u.isReverse?u.iconSize:25,position:f.value===u.isReverse?u.position:`calc(50dvw - 12.5rem), calc(50dvh - 12.5rem)`,textColor:f.value===u.isReverse?u.textColor:`text-white`})),m=s([]),h=s(!1);function g(e){m.value.push(e.propertyName),m.value.includes(`color`)&&m.value.includes(`width`)&&m.value.includes(`height`)&&m.value.includes(`transform`)&&(h.value=!0,d(`animationEnded`))}return(e,s)=>(o(),n(`div`,{"pointer-events-none":``,fixed:``,w:`100dvw`,h:`100dvh`,style:a({zIndex:h.value?r.zIndex:void 0})},[t(`div`,{fixed:``,"inset-0":``,"bg-primary-500":``,"transition-opacity":``,"ease-linear":``,style:a({opacity:p.value.opacity,transitionDuration:`${r.duration}ms`})},null,4),t(`div`,{fixed:``,"inset-0":``,"ease-in-out":``,style:a({width:`${p.value.size}rem`,height:`${p.value.size}rem`,transform:`translate(${p.value.position})`,transitionDuration:`${r.duration}ms`}),class:i([p.value.textColor,u.icon,{"transition-all":f.value}]),onTransitionend:g},null,38)],4))}}),u=l;export{u as IconAnimation_default}; \ No newline at end of file +import{computed as e,createBaseVNode as t,createElementBlock as n,defineComponent as r,normalizeClass as i,normalizeStyle as a,openBlock as o,ref as s,watch as c}from"./index-CsmT0L1K.js";var l=r({__name:`IconAnimation`,props:{icon:null,iconSize:null,position:null,duration:null,started:{type:Boolean},textColor:null,isReverse:{type:Boolean},zIndex:null},emits:[`animationEnded`],setup(r,{emit:l}){let u=r,d=l,f=s(!1);c(()=>u.started,e=>{e&&requestAnimationFrame(()=>{f.value=!0})});let p=e(()=>({opacity:f.value===u.isReverse?0:1,size:f.value===u.isReverse?u.iconSize:25,position:f.value===u.isReverse?u.position:`calc(50dvw - 12.5rem), calc(50dvh - 12.5rem)`,textColor:f.value===u.isReverse?u.textColor:`text-white`})),m=s([]),h=s(!1);function g(e){m.value.push(e.propertyName),m.value.includes(`color`)&&m.value.includes(`width`)&&m.value.includes(`height`)&&m.value.includes(`transform`)&&(h.value=!0,d(`animationEnded`))}return(e,s)=>(o(),n(`div`,{"pointer-events-none":``,fixed:``,w:`100dvw`,h:`100dvh`,style:a({zIndex:h.value?r.zIndex:void 0})},[t(`div`,{fixed:``,"inset-0":``,"bg-primary-500":``,"transition-opacity":``,"ease-linear":``,style:a({opacity:p.value.opacity,transitionDuration:`${r.duration}ms`})},null,4),t(`div`,{fixed:``,"inset-0":``,"ease-in-out":``,style:a({width:`${p.value.size}rem`,height:`${p.value.size}rem`,transform:`translate(${p.value.position})`,transitionDuration:`${r.duration}ms`}),class:i([p.value.textColor,u.icon,{"transition-all":f.value}]),onTransitionend:g},null,38)],4))}}),u=l;export{u as IconAnimation_default}; \ No newline at end of file diff --git a/assets/InputFile-CffDHtEw.js b/assets/InputFile-BW-qIUxk.js similarity index 96% rename from assets/InputFile-CffDHtEw.js rename to assets/InputFile-BW-qIUxk.js index 73560dbad5345dcf0bc1fb0e531358058a906e62..c9d0fb541c2299af1c3e64a739b15d7d28f4ebaf 100644 --- a/assets/InputFile-CffDHtEw.js +++ b/assets/InputFile-BW-qIUxk.js @@ -1 +1 @@ -import{createBaseVNode as e,createElementBlock as t,defineComponent as n,mergeModels as r,normalizeClass as i,openBlock as a,ref as o,refDebounced as s,renderSlot as c,unref as l,useModel as u}from"./index-CuCRViVh.js";const d=[`accept`,`multiple`],f={key:0,text:`center`,"text-sm":``},p={key:1,text:`center`,"text-sm":``};var m=n({__name:`InputFile`,props:r({accept:null,multiple:{type:Boolean}},{modelValue:{required:!1,default:()=>[]},modelModifiers:{}}),emits:[`update:modelValue`],setup(n){let r=u(n,`modelValue`),m=o(),h=o(!1),g=s(h,150);function _(e){let t=e.target;t.files&&t.files.length>0&&(m.value=t.files[0]),r.value=Array.from(t.files||[]),h.value=!1}return(o,s)=>(a(),t(`label`,{relative:``,class:i([`min-h-[120px] flex flex-col cursor-pointer items-center justify-center rounded-xl p-6`,[l(g)?`border-primary-400 dark:border-primary-600 hover:border-primary-300 dark:hover:border-primary-700`:`border-neutral-200 dark:border-neutral-700 hover:border-primary-300 dark:hover:border-primary-700`,l(g)?`bg-primary-50/5 dark:bg-primary-900/5`:`bg-white/60 dark:bg-black/30 hover:bg-white/80 dark:hover:bg-black/40`]]),border:`dashed 2`,transition:`all duration-300`,"cursor-pointer":``,"opacity-95":``,hover:`scale-100 opacity-100 shadow-md dark:shadow-lg`,onDragover:s[0]||=e=>h.value=!0,onDragleave:s[1]||=e=>h.value=!1},[e(`input`,{type:`file`,accept:n.accept,multiple:n.multiple,"cursor-pointer":``,class:`absolute inset-0 h-full w-full opacity-0`,onChange:_},null,40,d),c(o.$slots,`default`,{isDragging:l(g),firstFile:m.value,files:r.value},()=>[e(`div`,{class:i([`flex flex-col items-center`,[l(g)?`text-primary-500 dark:text-primary-400`:`text-neutral-400 dark:text-neutral-500`]])},[s[2]||=e(`div`,{"i-solar:upload-square-line-duotone":``,"mb-2":``,"text-5xl":``},null,-1),s[3]||=e(`p`,{"font-medium":``,text:`center lg`},` Upload `,-1),l(g)?(a(),t(`p`,f,` Release to upload `)):(a(),t(`p`,p,` Click or drag and drop a file here `))],2)])],34))}}),h=m;export{h as InputFile_default}; \ No newline at end of file +import{createBaseVNode as e,createElementBlock as t,defineComponent as n,mergeModels as r,normalizeClass as i,openBlock as a,ref as o,refDebounced as s,renderSlot as c,unref as l,useModel as u}from"./index-CsmT0L1K.js";const d=[`accept`,`multiple`],f={key:0,text:`center`,"text-sm":``},p={key:1,text:`center`,"text-sm":``};var m=n({__name:`InputFile`,props:r({accept:null,multiple:{type:Boolean}},{modelValue:{required:!1,default:()=>[]},modelModifiers:{}}),emits:[`update:modelValue`],setup(n){let r=u(n,`modelValue`),m=o(),h=o(!1),g=s(h,150);function _(e){let t=e.target;t.files&&t.files.length>0&&(m.value=t.files[0]),r.value=Array.from(t.files||[]),h.value=!1}return(o,s)=>(a(),t(`label`,{relative:``,class:i([`min-h-[120px] flex flex-col cursor-pointer items-center justify-center rounded-xl p-6`,[l(g)?`border-primary-400 dark:border-primary-600 hover:border-primary-300 dark:hover:border-primary-700`:`border-neutral-200 dark:border-neutral-700 hover:border-primary-300 dark:hover:border-primary-700`,l(g)?`bg-primary-50/5 dark:bg-primary-900/5`:`bg-white/60 dark:bg-black/30 hover:bg-white/80 dark:hover:bg-black/40`]]),border:`dashed 2`,transition:`all duration-300`,"cursor-pointer":``,"opacity-95":``,hover:`scale-100 opacity-100 shadow-md dark:shadow-lg`,onDragover:s[0]||=e=>h.value=!0,onDragleave:s[1]||=e=>h.value=!1},[e(`input`,{type:`file`,accept:n.accept,multiple:n.multiple,"cursor-pointer":``,class:`absolute inset-0 h-full w-full opacity-0`,onChange:_},null,40,d),c(o.$slots,`default`,{isDragging:l(g),firstFile:m.value,files:r.value},()=>[e(`div`,{class:i([`flex flex-col items-center`,[l(g)?`text-primary-500 dark:text-primary-400`:`text-neutral-400 dark:text-neutral-500`]])},[s[2]||=e(`div`,{"i-solar:upload-square-line-duotone":``,"mb-2":``,"text-5xl":``},null,-1),s[3]||=e(`p`,{"font-medium":``,text:`center lg`},` Upload `,-1),l(g)?(a(),t(`p`,f,` Release to upload `)):(a(),t(`p`,p,` Click or drag and drop a file here `))],2)])],34))}}),h=m;export{h as InputFile_default}; \ No newline at end of file diff --git a/assets/Textarea-D04Ettdn.js b/assets/Textarea-CK41gHte.js similarity index 84% rename from assets/Textarea-D04Ettdn.js rename to assets/Textarea-CK41gHte.js index 958a62e6c57b174dff2505fc9350b88fdf16df86..e2d80b67703978fff32f84733af43210f8254274 100644 --- a/assets/Textarea-D04Ettdn.js +++ b/assets/Textarea-CK41gHte.js @@ -1 +1 @@ -import{createBlock as e,defineComponent as t,openBlock as n,useModel as r}from"./index-CuCRViVh.js";import{Basic_default as i}from"./Basic-SuYkQxAJ.js";var a=t({__name:`Textarea`,props:{modelValue:{default:``},modelModifiers:{}},emits:[`update:modelValue`],setup(t){let a=r(t,`modelValue`);return(t,r)=>(n(),e(i,{modelValue:a.value,"onUpdate:modelValue":r[0]||=e=>a.value=e,border:`focus:primary-300 dark:focus:primary-400/50 2 solid neutral-100 dark:neutral-900`,transition:`all duration-200 ease-in-out`,text:`disabled:neutral-400 dark:disabled:neutral-600`,cursor:`disabled:not-allowed`,"w-full":``,"rounded-lg":``,"px-2":``,"py-1":``,"text-sm":``,"outline-none":``,shadow:`sm`,bg:`neutral-50 dark:neutral-950 focus:neutral-50 dark:focus:neutral-900`},null,8,[`modelValue`]))}}),o=a;export{o as Textarea_default}; \ No newline at end of file +import{createBlock as e,defineComponent as t,openBlock as n,useModel as r}from"./index-CsmT0L1K.js";import{Basic_default as i}from"./Basic-MLnzojs5.js";var a=t({__name:`Textarea`,props:{modelValue:{default:``},modelModifiers:{}},emits:[`update:modelValue`],setup(t){let a=r(t,`modelValue`);return(t,r)=>(n(),e(i,{modelValue:a.value,"onUpdate:modelValue":r[0]||=e=>a.value=e,border:`focus:primary-300 dark:focus:primary-400/50 2 solid neutral-100 dark:neutral-900`,transition:`all duration-200 ease-in-out`,text:`disabled:neutral-400 dark:disabled:neutral-600`,cursor:`disabled:not-allowed`,"w-full":``,"rounded-lg":``,"px-2":``,"py-1":``,"text-sm":``,"outline-none":``,shadow:`sm`,bg:`neutral-50 dark:neutral-950 focus:neutral-50 dark:focus:neutral-900`},null,8,[`modelValue`]))}}),o=a;export{o as Textarea_default}; \ No newline at end of file diff --git a/assets/_...all_-BcmmG1Rc.js b/assets/_...all_-JSqUxRGo.js similarity index 72% rename from assets/_...all_-BcmmG1Rc.js rename to assets/_...all_-JSqUxRGo.js index 8c1488104bb49765de5759d0fde31c292174efb6..87d77e8c9c0cefce59ff108982614c7a1ad73bbd 100644 --- a/assets/_...all_-BcmmG1Rc.js +++ b/assets/_...all_-JSqUxRGo.js @@ -1 +1 @@ -import{__plugin_vue_export_helper_default as e,createElementBlock as t,openBlock as n}from"./index-CuCRViVh.js";const r={};function i(e,r){return n(),t(`div`,null,` 404 - Page not found `)}var a=e(r,[[`render`,i]]);export{a as default}; \ No newline at end of file +import{__plugin_vue_export_helper_default as e,createElementBlock as t,openBlock as n}from"./index-CsmT0L1K.js";const r={};function i(e,r){return n(),t(`div`,null,` 404 - Page not found `)}var a=e(r,[[`render`,i]]);export{a as default}; \ No newline at end of file diff --git a/assets/__vite-browser-external-Ct7_N7cf.js b/assets/__vite-browser-external-BQ5eJQsZ.js similarity index 59% rename from assets/__vite-browser-external-Ct7_N7cf.js rename to assets/__vite-browser-external-BQ5eJQsZ.js index 380334f51386a87bcd6cac197c231c441d660264..07a681564b1e957b1e2f60796f73b8aa7e41a923 100644 --- a/assets/__vite-browser-external-Ct7_N7cf.js +++ b/assets/__vite-browser-external-BQ5eJQsZ.js @@ -1 +1 @@ -import{require___vite_browser_external as e}from"./__vite-browser-external-CCfYMxZl.js";export default e(); \ No newline at end of file +import{require___vite_browser_external as e}from"./__vite-browser-external-DPh5tFvT.js";export default e(); \ No newline at end of file diff --git a/assets/__vite-browser-external-CCfYMxZl.js b/assets/__vite-browser-external-DPh5tFvT.js similarity index 52% rename from assets/__vite-browser-external-CCfYMxZl.js rename to assets/__vite-browser-external-DPh5tFvT.js index ce72e548987f79185629d1e8673583e7ce7d533d..4e712f4507b0dc6ca310b1a54a8c2a1db65f2030 100644 --- a/assets/__vite-browser-external-CCfYMxZl.js +++ b/assets/__vite-browser-external-DPh5tFvT.js @@ -1 +1 @@ -import{__commonJSMin as e}from"./index-CuCRViVh.js";var t=e((exports,t)=>{t.exports={}});export{t as require___vite_browser_external}; \ No newline at end of file +import{__commonJSMin as e}from"./index-CsmT0L1K.js";var t=e((exports,t)=>{t.exports={}});export{t as require___vite_browser_external}; \ No newline at end of file diff --git a/assets/airi-card-NRKIx9cL.js b/assets/airi-card-DJpm8cix.js similarity index 87% rename from assets/airi-card-NRKIx9cL.js rename to assets/airi-card-DJpm8cix.js index f67e22b1f80a51a0a5841f85a08be34514a6f39c..705dae22b530382baac32259a486d485c837853e 100644 --- a/assets/airi-card-NRKIx9cL.js +++ b/assets/airi-card-DJpm8cix.js @@ -1 +1 @@ -import{Fragment as e,computed as t,createBaseVNode as n,createBlock as r,createCommentVNode as i,createElementBlock as a,createVNode as o,defineComponent as s,normalizeClass as c,openBlock as l,ref as u,renderList as d,resolveDirective as ee,storeToRefs as f,toDisplayString as p,unref as m,useI18n as h,vModelText as te,watch as ne,withCtx as re,withDirectives as g}from"./index-CuCRViVh.js";import"./import-url-browser-DNuYZxPr.js";import"./duckdb-mvp-C3i5IjU8.js";import"./index-CISmcbXk-BkTeNOgG.js";import"./types-AwjH7X1C.js";import{useAiriCardStore as ie}from"./stores-m0eA85gd.js";import"./__vite-browser-external-CCfYMxZl.js";import"./Button-DFhzbYVt.js";import{Select_default as ae}from"./src-C2QbIOor.js";import"./dist-B4cQ-m7C.js";import{InputFile_default as _}from"./InputFile-CffDHtEw.js";import"./components-BFLl4u81.js";import"./composables-Cgvkd8lL.js";import"./sleep-CvjNLutj.js";import"./queue-DAKPJQl1.js";import"./queues-Dstwm1VQ.js";import"./dist-Cr2QBfS4.js";import"./webgpu-Nt9hTBpW.js";import{route_block_default as v}from"./route-block-DNPbw0zT.js";import{CardCreate_default as y}from"./CardCreate-CuBkVnEJ.js";import{CardCreationDialog_default as b}from"./CardCreationDialog-DbM2XlD1.js";import{DeleteCardDialog_default as x}from"./DeleteCardDialog-D4-CgGb9.js";import{CardDetailDialog_default as S}from"./CardDetailDialog-BzvnHVI0.js";import{CardListItem_default as oe}from"./CardListItem-DsIvl-nB.js";const se={"rounded-xl":``,"p-4":``,flex:`~ col gap-4`},ce={flex:`~ row`,"flex-wrap":``,"items-center":``,"justify-between":``,"gap-4":``},C={class:`relative min-w-[200px] flex-1`,"inline-flex":`~`,"w-full":``,"items-center":``},w=[`placeholder`],T={class:`relative flex flex-row justify-start gap-2 lg:flex-col`},E={class:`top-[-32px] whitespace-nowrap text-sm text-neutral-500 leading-10 lg:absolute dark:text-neutral-400`},D={key:0,flex:``,"flex-col":``,"items-center":``},O={"font-medium":``,text:`neutral-600 dark:neutral-300`},k={text:`neutral-500 dark:neutral-400`,"mt-2":``,"text-sm":``},A={key:1,flex:``,"flex-col":``,"items-center":``},j={"font-medium":``,text:`primary-600 dark:primary-300`},M={key:1,class:`col-span-full rounded-xl p-8 text-center`,border:`~ neutral-200/50 dark:neutral-700/30`,bg:`neutral-50/50 dark:neutral-900/50`},N={key:2,class:`col-span-full flex items-center gap-3 border-2 border-amber-200 rounded-xl bg-amber-50/80 p-4 dark:border-amber-800 dark:bg-amber-900/30`},P={class:`flex flex-col`},F={class:`font-medium`},I={class:`text-sm text-amber-600 dark:text-amber-400`},L={text:`neutral-200/50 dark:neutral-600/20`,"pointer-events-none":``,fixed:``,top:`[calc(100dvh-15rem)]`,"bottom-0":``,"right--5":``,"z--1":``,initial:{scale:.9,opacity:0,x:20},enter:{scale:1,opacity:1,x:0},duration:500,"size-60":``,flex:``,"items-center":``,"justify-center":``};var R=s({__name:`index`,setup(s){let{t:v}=h(),R=ie(),{addCard:z,removeCard:B}=R,{cards:V,activeCardId:H}=f(R),U=u(``),W=u(!1),G=u(!1),K=u(``),q=u(`nameAsc`),J=u([]);ne(J,async e=>{let t=e[0];if(t)try{let e=await t.text(),n=JSON.parse(e);U.value=z(n),W.value=!0}catch(e){console.error(`Error processing card file:`,e)}});let Y=t(()=>Array.from(V.value.entries()).map(([e,t])=>({id:e,name:t.name,description:t.description}))),le=t(()=>{if(!K.value)return Y.value;let e=K.value.toLowerCase();return Y.value.filter(t=>t.name.toLowerCase().includes(e)||t.description&&t.description.toLowerCase().includes(e))}),X=t(()=>{let e=[...le.value];return q.value===`nameAsc`?e.sort((e,t)=>e.name.localeCompare(t.name)):q.value===`nameDesc`?e.sort((e,t)=>t.name.localeCompare(e.name)):q.value===`recent`?e.sort((e,t)=>t.id.localeCompare(e.id)):e}),Z=u(!1),Q=u(null);function ue(){Q.value&&(B(Q.value),Q.value=null,Z.value=!1)}function de(e){Q.value=e,Z.value=!0}function fe(e){U.value=e,W.value=!0}function pe(){G.value=!0}function me(e){H.value=e}function he(e){let t=V.value.get(e);return t?.version||`1.0.0`}function $(e,t){var n,r,i;let a=V.value.get(e);if(!a||!(!((n=a.extensions)==null||(n=n.airi)==null)&&n.modules))return`default`;let o=a.extensions.airi.modules;return t===`consciousness`?(r=o.consciousness)?.model&&o.consciousness.model.split(`-`).pop()||`default`:t===`voice`&&(i=o.speech)?.voice_id||`default`}return(t,s)=>{var u;let f=ee(`motion`);return l(),a(e,null,[n(`div`,se,[n(`div`,ce,[n(`div`,C,[s[7]||=n(`div`,{class:`pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3`},[n(`div`,{"i-solar:magnifer-line-duotone":``,class:`text-neutral-500 dark:text-neutral-400`})],-1),g(n(`input`,{"onUpdate:modelValue":s[0]||=e=>K.value=e,type:`search`,class:`w-full rounded-xl p-2.5 pl-10 text-sm outline-none`,border:`focus:primary-100 dark:focus:primary-400/50 2 solid neutral-200 dark:neutral-800`,transition:`all duration-200 ease-in-out`,bg:`white dark:neutral-900`,placeholder:m(v)(`settings.pages.card.search`)},null,8,w),[[te,K.value]])]),n(`div`,T,[n(`div`,E,p(m(v)(`settings.pages.card.sort_by`))+`: `,1),o(m(ae),{modelValue:q.value,"onUpdate:modelValue":s[1]||=e=>q.value=e,options:[{value:`nameAsc`,label:m(v)(`settings.pages.card.name_asc`)},{value:`nameDesc`,label:m(v)(`settings.pages.card.name_desc`)},{value:`recent`,label:m(v)(`settings.pages.card.recent`)}],placeholder:`Select sort option`,class:`min-w-[150px]`},null,8,[`modelValue`,`options`])])]),n(`div`,{class:c([`mt-4`,{"grid grid-cols-[repeat(auto-fill,minmax(280px,1fr))] gap-4 grid-auto-rows-[minmax(min-content,max-content)] grid-auto-flow-dense sm:grid-cols-[repeat(auto-fill,minmax(240px,1fr))] sm:gap-5 md:grid-cols-[repeat(auto-fill,minmax(220px,1fr))] lg:grid-cols-[repeat(auto-fill,minmax(250px,1fr))]":m(V).size>0}])},[o(m(_),{modelValue:J.value,"onUpdate:modelValue":s[2]||=e=>J.value=e,accept:`*.json`},{default:re(({isDragging:e})=>[e?(l(),a(`div`,A,[s[9]||=n(`div`,{"i-solar:upload-minimalistic-bold":``,class:`mb-2 text-5xl text-primary-500 dark:text-primary-400`},null,-1),n(`p`,j,p(m(v)(`settings.pages.card.drop_here`)),1)])):(l(),a(`div`,D,[s[8]||=n(`div`,{"i-solar:upload-square-line-duotone":``,"mb-4":``,"text-5xl":``,text:`neutral-400 dark:neutral-500`},null,-1),n(`p`,O,p(m(v)(`settings.pages.card.upload`)),1),n(`p`,k,p(m(v)(`settings.pages.card.upload_desc`)),1)]))]),_:1},8,[`modelValue`]),o(y,{onClick:pe}),m(V).size>0?(l(!0),a(e,{key:0},d(X.value,e=>(l(),r(oe,{id:e.id,key:e.id,name:e.name,description:e.description,"is-active":e.id===m(H),"is-selected":e.id===U.value&&W.value,version:he(e.id),"consciousness-model":$(e.id,`consciousness`),"voice-model":$(e.id,`voice`),onSelect:t=>fe(e.id),onActivate:t=>me(e.id),onDelete:t=>de(e.id)},null,8,[`id`,`name`,`description`,`is-active`,`is-selected`,`version`,`consciousness-model`,`voice-model`,`onSelect`,`onActivate`,`onDelete`]))),128)):i(``,!0),m(V).size===0?(l(),a(`div`,M,[s[10]||=n(`div`,{"i-solar:card-search-broken":``,"mx-auto":``,"mb-3":``,"text-6xl":``,"text-neutral-400":``},null,-1),n(`p`,null,p(m(v)(`settings.pages.card.no_cards`)),1)])):i(``,!0),K.value&&X.value.length===0?(l(),a(`div`,N,[s[11]||=n(`div`,{"i-solar:info-circle-line-duotone":``,class:`text-2xl text-amber-500 dark:text-amber-400`},null,-1),n(`div`,P,[n(`span`,F,p(m(v)(`settings.pages.card.no_results`)),1),n(`span`,I,p(m(v)(`settings.pages.card.try_different_search`)),1)])])):i(``,!0)],2)]),o(x,{modelValue:Z.value,"onUpdate:modelValue":s[3]||=e=>Z.value=e,"card-name":Q.value?(u=m(R).getCard(Q.value))?.name:``,onConfirm:ue,onCancel:s[4]||=e=>Q.value=null},null,8,[`modelValue`,`card-name`]),o(S,{modelValue:W.value,"onUpdate:modelValue":s[5]||=e=>W.value=e,"card-id":U.value},null,8,[`modelValue`,`card-id`]),o(b,{modelValue:G.value,"onUpdate:modelValue":s[6]||=e=>G.value=e},null,8,[`modelValue`]),g((l(),a(`div`,L,s[12]||=[n(`div`,{text:`60`,"i-solar:emoji-funny-square-bold-duotone":``},null,-1)])),[[f]])],64)}}});typeof v==`function`&&v(R);var z=R;export{z as default}; \ No newline at end of file +import{Fragment as e,computed as t,createBaseVNode as n,createBlock as r,createCommentVNode as i,createElementBlock as a,createVNode as o,defineComponent as s,normalizeClass as c,openBlock as l,ref as u,renderList as d,resolveDirective as ee,storeToRefs as f,toDisplayString as p,unref as m,useI18n as h,vModelText as te,watch as ne,withCtx as re,withDirectives as g}from"./index-CsmT0L1K.js";import"./import-url-browser-DNuYZxPr.js";import"./duckdb-mvp-C3i5IjU8.js";import"./index-CISmcbXk-C9oju49Y.js";import"./types-AwjH7X1C.js";import{useAiriCardStore as ie}from"./stores-2H61GqXP.js";import"./__vite-browser-external-DPh5tFvT.js";import"./Button-D3cjyOEe.js";import{Select_default as ae}from"./src-C1Sr0aqN.js";import"./dist-B9GpkGif.js";import{InputFile_default as _}from"./InputFile-BW-qIUxk.js";import"./components-DHUA669a.js";import"./composables-CgcEyUWo.js";import"./sleep-CvjNLutj.js";import"./queue-B0kER5Ap.js";import"./queues-hSEKEE3F.js";import"./dist-Cr2QBfS4.js";import"./webgpu-Nt9hTBpW.js";import{route_block_default as v}from"./route-block-DNPbw0zT.js";import{CardCreate_default as y}from"./CardCreate-CN9MHSBD.js";import{CardCreationDialog_default as b}from"./CardCreationDialog-FrhTB6Za.js";import{DeleteCardDialog_default as x}from"./DeleteCardDialog-C6SDUYNC.js";import{CardDetailDialog_default as S}from"./CardDetailDialog-a4ktjZPI.js";import{CardListItem_default as oe}from"./CardListItem-Bx65D5jB.js";const se={"rounded-xl":``,"p-4":``,flex:`~ col gap-4`},ce={flex:`~ row`,"flex-wrap":``,"items-center":``,"justify-between":``,"gap-4":``},C={class:`relative min-w-[200px] flex-1`,"inline-flex":`~`,"w-full":``,"items-center":``},w=[`placeholder`],T={class:`relative flex flex-row justify-start gap-2 lg:flex-col`},E={class:`top-[-32px] whitespace-nowrap text-sm text-neutral-500 leading-10 lg:absolute dark:text-neutral-400`},D={key:0,flex:``,"flex-col":``,"items-center":``},O={"font-medium":``,text:`neutral-600 dark:neutral-300`},k={text:`neutral-500 dark:neutral-400`,"mt-2":``,"text-sm":``},A={key:1,flex:``,"flex-col":``,"items-center":``},j={"font-medium":``,text:`primary-600 dark:primary-300`},M={key:1,class:`col-span-full rounded-xl p-8 text-center`,border:`~ neutral-200/50 dark:neutral-700/30`,bg:`neutral-50/50 dark:neutral-900/50`},N={key:2,class:`col-span-full flex items-center gap-3 border-2 border-amber-200 rounded-xl bg-amber-50/80 p-4 dark:border-amber-800 dark:bg-amber-900/30`},P={class:`flex flex-col`},F={class:`font-medium`},I={class:`text-sm text-amber-600 dark:text-amber-400`},L={text:`neutral-200/50 dark:neutral-600/20`,"pointer-events-none":``,fixed:``,top:`[calc(100dvh-15rem)]`,"bottom-0":``,"right--5":``,"z--1":``,initial:{scale:.9,opacity:0,x:20},enter:{scale:1,opacity:1,x:0},duration:500,"size-60":``,flex:``,"items-center":``,"justify-center":``};var R=s({__name:`index`,setup(s){let{t:v}=h(),R=ie(),{addCard:z,removeCard:B}=R,{cards:V,activeCardId:H}=f(R),U=u(``),W=u(!1),G=u(!1),K=u(``),q=u(`nameAsc`),J=u([]);ne(J,async e=>{let t=e[0];if(t)try{let e=await t.text(),n=JSON.parse(e);U.value=z(n),W.value=!0}catch(e){console.error(`Error processing card file:`,e)}});let Y=t(()=>Array.from(V.value.entries()).map(([e,t])=>({id:e,name:t.name,description:t.description}))),le=t(()=>{if(!K.value)return Y.value;let e=K.value.toLowerCase();return Y.value.filter(t=>t.name.toLowerCase().includes(e)||t.description&&t.description.toLowerCase().includes(e))}),X=t(()=>{let e=[...le.value];return q.value===`nameAsc`?e.sort((e,t)=>e.name.localeCompare(t.name)):q.value===`nameDesc`?e.sort((e,t)=>t.name.localeCompare(e.name)):q.value===`recent`?e.sort((e,t)=>t.id.localeCompare(e.id)):e}),Z=u(!1),Q=u(null);function ue(){Q.value&&(B(Q.value),Q.value=null,Z.value=!1)}function de(e){Q.value=e,Z.value=!0}function fe(e){U.value=e,W.value=!0}function pe(){G.value=!0}function me(e){H.value=e}function he(e){let t=V.value.get(e);return t?.version||`1.0.0`}function $(e,t){var n,r,i;let a=V.value.get(e);if(!a||!(!((n=a.extensions)==null||(n=n.airi)==null)&&n.modules))return`default`;let o=a.extensions.airi.modules;return t===`consciousness`?(r=o.consciousness)?.model&&o.consciousness.model.split(`-`).pop()||`default`:t===`voice`&&(i=o.speech)?.voice_id||`default`}return(t,s)=>{var u;let f=ee(`motion`);return l(),a(e,null,[n(`div`,se,[n(`div`,ce,[n(`div`,C,[s[7]||=n(`div`,{class:`pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3`},[n(`div`,{"i-solar:magnifer-line-duotone":``,class:`text-neutral-500 dark:text-neutral-400`})],-1),g(n(`input`,{"onUpdate:modelValue":s[0]||=e=>K.value=e,type:`search`,class:`w-full rounded-xl p-2.5 pl-10 text-sm outline-none`,border:`focus:primary-100 dark:focus:primary-400/50 2 solid neutral-200 dark:neutral-800`,transition:`all duration-200 ease-in-out`,bg:`white dark:neutral-900`,placeholder:m(v)(`settings.pages.card.search`)},null,8,w),[[te,K.value]])]),n(`div`,T,[n(`div`,E,p(m(v)(`settings.pages.card.sort_by`))+`: `,1),o(m(ae),{modelValue:q.value,"onUpdate:modelValue":s[1]||=e=>q.value=e,options:[{value:`nameAsc`,label:m(v)(`settings.pages.card.name_asc`)},{value:`nameDesc`,label:m(v)(`settings.pages.card.name_desc`)},{value:`recent`,label:m(v)(`settings.pages.card.recent`)}],placeholder:`Select sort option`,class:`min-w-[150px]`},null,8,[`modelValue`,`options`])])]),n(`div`,{class:c([`mt-4`,{"grid grid-cols-[repeat(auto-fill,minmax(280px,1fr))] gap-4 grid-auto-rows-[minmax(min-content,max-content)] grid-auto-flow-dense sm:grid-cols-[repeat(auto-fill,minmax(240px,1fr))] sm:gap-5 md:grid-cols-[repeat(auto-fill,minmax(220px,1fr))] lg:grid-cols-[repeat(auto-fill,minmax(250px,1fr))]":m(V).size>0}])},[o(m(_),{modelValue:J.value,"onUpdate:modelValue":s[2]||=e=>J.value=e,accept:`*.json`},{default:re(({isDragging:e})=>[e?(l(),a(`div`,A,[s[9]||=n(`div`,{"i-solar:upload-minimalistic-bold":``,class:`mb-2 text-5xl text-primary-500 dark:text-primary-400`},null,-1),n(`p`,j,p(m(v)(`settings.pages.card.drop_here`)),1)])):(l(),a(`div`,D,[s[8]||=n(`div`,{"i-solar:upload-square-line-duotone":``,"mb-4":``,"text-5xl":``,text:`neutral-400 dark:neutral-500`},null,-1),n(`p`,O,p(m(v)(`settings.pages.card.upload`)),1),n(`p`,k,p(m(v)(`settings.pages.card.upload_desc`)),1)]))]),_:1},8,[`modelValue`]),o(y,{onClick:pe}),m(V).size>0?(l(!0),a(e,{key:0},d(X.value,e=>(l(),r(oe,{id:e.id,key:e.id,name:e.name,description:e.description,"is-active":e.id===m(H),"is-selected":e.id===U.value&&W.value,version:he(e.id),"consciousness-model":$(e.id,`consciousness`),"voice-model":$(e.id,`voice`),onSelect:t=>fe(e.id),onActivate:t=>me(e.id),onDelete:t=>de(e.id)},null,8,[`id`,`name`,`description`,`is-active`,`is-selected`,`version`,`consciousness-model`,`voice-model`,`onSelect`,`onActivate`,`onDelete`]))),128)):i(``,!0),m(V).size===0?(l(),a(`div`,M,[s[10]||=n(`div`,{"i-solar:card-search-broken":``,"mx-auto":``,"mb-3":``,"text-6xl":``,"text-neutral-400":``},null,-1),n(`p`,null,p(m(v)(`settings.pages.card.no_cards`)),1)])):i(``,!0),K.value&&X.value.length===0?(l(),a(`div`,N,[s[11]||=n(`div`,{"i-solar:info-circle-line-duotone":``,class:`text-2xl text-amber-500 dark:text-amber-400`},null,-1),n(`div`,P,[n(`span`,F,p(m(v)(`settings.pages.card.no_results`)),1),n(`span`,I,p(m(v)(`settings.pages.card.try_different_search`)),1)])])):i(``,!0)],2)]),o(x,{modelValue:Z.value,"onUpdate:modelValue":s[3]||=e=>Z.value=e,"card-name":Q.value?(u=m(R).getCard(Q.value))?.name:``,onConfirm:ue,onCancel:s[4]||=e=>Q.value=null},null,8,[`modelValue`,`card-name`]),o(S,{modelValue:W.value,"onUpdate:modelValue":s[5]||=e=>W.value=e,"card-id":U.value},null,8,[`modelValue`,`card-id`]),o(b,{modelValue:G.value,"onUpdate:modelValue":s[6]||=e=>G.value=e},null,8,[`modelValue`]),g((l(),a(`div`,L,s[12]||=[n(`div`,{text:`60`,"i-solar:emoji-funny-square-bold-duotone":``},null,-1)])),[[f]])],64)}}});typeof v==`function`&&v(R);var z=R;export{z as default}; \ No newline at end of file diff --git a/assets/alibaba-cloud-model-studio-CU-ra2RE.js b/assets/alibaba-cloud-model-studio-BlYgYX-0.js similarity index 85% rename from assets/alibaba-cloud-model-studio-CU-ra2RE.js rename to assets/alibaba-cloud-model-studio-BlYgYX-0.js index 63d8e1658cdf9ed4e9128be335e71a9ecdf4e70f..d01e6a03258432973d913f611bc53872aa3a13f9 100644 --- a/assets/alibaba-cloud-model-studio-CU-ra2RE.js +++ b/assets/alibaba-cloud-model-studio-BlYgYX-0.js @@ -1 +1 @@ -import{computed as e,createBaseVNode as t,createBlock as n,createVNode as r,defineComponent as i,onMounted as a,openBlock as o,ref as s,storeToRefs as c,unref as l,useI18n as u,watch as d,withCtx as f}from"./index-CuCRViVh.js";import"./import-url-browser-DNuYZxPr.js";import"./duckdb-mvp-C3i5IjU8.js";import"./index-CISmcbXk-BkTeNOgG.js";import"./types-AwjH7X1C.js";import{useProvidersStore as p,useSpeechStore as m}from"./stores-m0eA85gd.js";import"./__vite-browser-external-CCfYMxZl.js";import"./Button-DFhzbYVt.js";import{FieldRange_default as h}from"./src-C2QbIOor.js";import{SpeechPlayground_default as g,SpeechProviderSettings_default as _}from"./components-BFLl4u81.js";import"./composables-Cgvkd8lL.js";import"./sleep-CvjNLutj.js";import"./queue-DAKPJQl1.js";import"./queues-Dstwm1VQ.js";import"./dist-Cr2QBfS4.js";import"./webgpu-Nt9hTBpW.js";import{route_block_default as v}from"./route-block-DNPbw0zT.js";const y={flex:`~ col gap-4`},b=`alibaba-cloud-model-studio`,x=`cosyvoice-v1`;var S=i({__name:`alibaba-cloud-model-studio`,setup(i){let v={speed:1},S=s(0),C=s(1),w=s(0),T=m(),E=p(),{providers:D}=c(E),{t:O}=u(),k=e(()=>{var e;return!!(e=D.value[b])?.apiKey}),A=e(()=>T.availableVoices[b]||[]);async function j(e,t,n){let r=E.getProviderInstance(b);if(!r)throw Error(`Failed to initialize speech provider`);let i=E.getProviderConfig(b),a=i.model||x;return await T.speech(r,a,e,t,{...i,...v})}return a(async()=>{let e=E.getProviderConfig(b),t=E.getProviderMetadata(b);await t.validators.validateProviderConfig(e)?await T.loadVoicesForProvider(b):console.error(`Failed to validate provider config`,e)}),d(S,async()=>{let e=E.getProviderConfig(b);e.pitch=S.value}),d(C,async()=>{let e=E.getProviderConfig(b);e.speed=C.value}),d(w,async()=>{let e=E.getProviderConfig(b);e.volume=w.value}),d(D,async()=>{let e=E.getProviderConfig(b),t=E.getProviderMetadata(b);await t.validators.validateProviderConfig(e)?await T.loadVoicesForProvider(b):console.error(`Failed to validate provider config`,e)},{immediate:!0}),(e,i)=>(o(),n(l(_),{"provider-id":b,"default-model":x,"additional-settings":v},{"voice-settings":f(()=>[t(`div`,y,[r(l(h),{modelValue:S.value,"onUpdate:modelValue":i[0]||=e=>S.value=e,label:l(O)(`settings.pages.providers.provider.common.fields.field.pitch.label`),description:l(O)(`settings.pages.providers.provider.common.fields.field.pitch.description`),min:-100,max:100,step:1,"format-value":e=>`${e}%`},null,8,[`modelValue`,`label`,`description`,`format-value`]),r(l(h),{modelValue:C.value,"onUpdate:modelValue":i[1]||=e=>C.value=e,label:l(O)(`settings.pages.providers.provider.common.fields.field.speed.label`),description:l(O)(`settings.pages.providers.provider.common.fields.field.speed.description`),min:.5,max:2,step:.01},null,8,[`modelValue`,`label`,`description`]),r(l(h),{modelValue:w.value,"onUpdate:modelValue":i[2]||=e=>w.value=e,label:l(O)(`settings.pages.providers.provider.common.fields.field.volume.label`),description:l(O)(`settings.pages.providers.provider.common.fields.field.volume.description`),min:-100,max:100,step:1,"format-value":e=>`${e}%`},null,8,[`modelValue`,`label`,`description`,`format-value`])])]),playground:f(()=>[r(l(g),{"available-voices":A.value,"generate-speech":j,"api-key-configured":k.value,"default-text":`Hello! This is a test of the ElevenLabs voice synthesis.`},null,8,[`available-voices`,`api-key-configured`])]),_:1}))}});typeof v==`function`&&v(S);var C=S;export{C as default}; \ No newline at end of file +import{computed as e,createBaseVNode as t,createBlock as n,createVNode as r,defineComponent as i,onMounted as a,openBlock as o,ref as s,storeToRefs as c,unref as l,useI18n as u,watch as d,withCtx as f}from"./index-CsmT0L1K.js";import"./import-url-browser-DNuYZxPr.js";import"./duckdb-mvp-C3i5IjU8.js";import"./index-CISmcbXk-C9oju49Y.js";import"./types-AwjH7X1C.js";import{useProvidersStore as p,useSpeechStore as m}from"./stores-2H61GqXP.js";import"./__vite-browser-external-DPh5tFvT.js";import"./Button-D3cjyOEe.js";import{FieldRange_default as h}from"./src-C1Sr0aqN.js";import{SpeechPlayground_default as g,SpeechProviderSettings_default as _}from"./components-DHUA669a.js";import"./composables-CgcEyUWo.js";import"./sleep-CvjNLutj.js";import"./queue-B0kER5Ap.js";import"./queues-hSEKEE3F.js";import"./dist-Cr2QBfS4.js";import"./webgpu-Nt9hTBpW.js";import{route_block_default as v}from"./route-block-DNPbw0zT.js";const y={flex:`~ col gap-4`},b=`alibaba-cloud-model-studio`,x=`cosyvoice-v1`;var S=i({__name:`alibaba-cloud-model-studio`,setup(i){let v={speed:1},S=s(0),C=s(1),w=s(0),T=m(),E=p(),{providers:D}=c(E),{t:O}=u(),k=e(()=>{var e;return!!(e=D.value[b])?.apiKey}),A=e(()=>T.availableVoices[b]||[]);async function j(e,t,n){let r=E.getProviderInstance(b);if(!r)throw Error(`Failed to initialize speech provider`);let i=E.getProviderConfig(b),a=i.model||x;return await T.speech(r,a,e,t,{...i,...v})}return a(async()=>{let e=E.getProviderConfig(b),t=E.getProviderMetadata(b);await t.validators.validateProviderConfig(e)?await T.loadVoicesForProvider(b):console.error(`Failed to validate provider config`,e)}),d(S,async()=>{let e=E.getProviderConfig(b);e.pitch=S.value}),d(C,async()=>{let e=E.getProviderConfig(b);e.speed=C.value}),d(w,async()=>{let e=E.getProviderConfig(b);e.volume=w.value}),d(D,async()=>{let e=E.getProviderConfig(b),t=E.getProviderMetadata(b);await t.validators.validateProviderConfig(e)?await T.loadVoicesForProvider(b):console.error(`Failed to validate provider config`,e)},{immediate:!0}),(e,i)=>(o(),n(l(_),{"provider-id":b,"default-model":x,"additional-settings":v},{"voice-settings":f(()=>[t(`div`,y,[r(l(h),{modelValue:S.value,"onUpdate:modelValue":i[0]||=e=>S.value=e,label:l(O)(`settings.pages.providers.provider.common.fields.field.pitch.label`),description:l(O)(`settings.pages.providers.provider.common.fields.field.pitch.description`),min:-100,max:100,step:1,"format-value":e=>`${e}%`},null,8,[`modelValue`,`label`,`description`,`format-value`]),r(l(h),{modelValue:C.value,"onUpdate:modelValue":i[1]||=e=>C.value=e,label:l(O)(`settings.pages.providers.provider.common.fields.field.speed.label`),description:l(O)(`settings.pages.providers.provider.common.fields.field.speed.description`),min:.5,max:2,step:.01},null,8,[`modelValue`,`label`,`description`]),r(l(h),{modelValue:w.value,"onUpdate:modelValue":i[2]||=e=>w.value=e,label:l(O)(`settings.pages.providers.provider.common.fields.field.volume.label`),description:l(O)(`settings.pages.providers.provider.common.fields.field.volume.description`),min:-100,max:100,step:1,"format-value":e=>`${e}%`},null,8,[`modelValue`,`label`,`description`,`format-value`])])]),playground:f(()=>[r(l(g),{"available-voices":A.value,"generate-speech":j,"api-key-configured":k.value,"default-text":`Hello! This is a test of the ElevenLabs voice synthesis.`},null,8,[`available-voices`,`api-key-configured`])]),_:1}))}});typeof v==`function`&&v(S);var C=S;export{C as default}; \ No newline at end of file diff --git a/assets/anthropic-DO-lpzYI.js b/assets/anthropic-D6RUbbgy.js similarity index 88% rename from assets/anthropic-DO-lpzYI.js rename to assets/anthropic-D6RUbbgy.js index d600ada04542b6bb55138e677ed0499f2ca7cc84..e4f6195dd6998a3a72bd8e3d6cf9cb3928402af7 100644 --- a/assets/anthropic-DO-lpzYI.js +++ b/assets/anthropic-D6RUbbgy.js @@ -1 +1 @@ -import{computed as e,createBaseVNode as t,createBlock as n,createTextVNode as r,createVNode as i,defineComponent as a,onMounted as o,openBlock as s,storeToRefs as c,toDisplayString as l,unref as u,useI18n as d,useRouter as f,watch as p,withCtx as m}from"./index-CuCRViVh.js";import"./import-url-browser-DNuYZxPr.js";import"./duckdb-mvp-C3i5IjU8.js";import"./index-CISmcbXk-BkTeNOgG.js";import"./types-AwjH7X1C.js";import{useProvidersStore as h}from"./stores-m0eA85gd.js";import"./__vite-browser-external-CCfYMxZl.js";import"./Button-DFhzbYVt.js";import"./src-C2QbIOor.js";import{ProviderAdvancedSettings_default as g,ProviderApiKeyInput_default as _,ProviderBaseUrlInput_default as v,ProviderBasicSettings_default as y,ProviderSettingsContainer_default as b,ProviderSettingsLayout_default as x}from"./components-BFLl4u81.js";import"./composables-Cgvkd8lL.js";import"./sleep-CvjNLutj.js";import"./queue-DAKPJQl1.js";import"./queues-Dstwm1VQ.js";import"./dist-Cr2QBfS4.js";import"./webgpu-Nt9hTBpW.js";import{route_block_default as S}from"./route-block-DNPbw0zT.js";const C={bg:`orange-50 dark:orange-900/20`,"rounded-xl":``,"p-4":``,flex:`~ col gap-3`},w={"text-xl":``,"font-semibold":``,text:`orange-700 dark:orange-500`},T={underline:``,href:`https://docs.anthropic.com/en/api/openai-sdk`},E=`anthropic`;var D=a({__name:`anthropic`,setup(a){let{t:S}=d(),D=f(),O=h(),{providers:k}=c(O),A=e(()=>O.getProviderMetadata(E)),j=e({get:()=>{var e;return(e=k.value[E])?.apiKey||``},set:e=>{k.value[E]||(k.value[E]={}),k.value[E].apiKey=e}}),M=e({get:()=>{var e;return(e=k.value[E])?.baseUrl||`https://api.anthropic.com/v1/`},set:e=>{k.value[E]||(k.value[E]={}),k.value[E].baseUrl=e}});o(()=>{var e,t;k.value[E]||(k.value[E]={baseUrl:`https://api.anthropic.com/v1/`}),j.value=(e=k.value[E])?.apiKey||``,M.value=(t=k.value[E])?.baseUrl||`https://api.anthropic.com/v1/`}),p([j,M],()=>{k.value[E]={...k.value[E],apiKey:j.value,baseUrl:M.value||`https://api.anthropic.com/v1/`}});function N(){k.value[E]={baseUrl:`https://api.anthropic.com/v1/`}}return(e,a)=>{var o,c;return s(),n(u(x),{"provider-name":(o=A.value)?.localizedName||`Anthropic | Claude`,"provider-icon":(c=A.value)?.icon,"on-back":()=>u(D).back()},{default:m(()=>[t(`div`,C,[t(`h2`,w,l(u(S)(`settings.pages.providers.provider.anthropic.helpinfo.title`)),1),t(`p`,null,[r(l(u(S)(`settings.pages.providers.provider.anthropic.helpinfo.description.part1`))+` `,1),t(`a`,T,l(u(S)(`settings.pages.providers.provider.anthropic.helpinfo.description.part2`)),1),r(`, `+l(u(S)(`settings.pages.providers.provider.anthropic.helpinfo.description.part3`))+` `,1),a[2]||=t(`a`,{underline:``,href:`https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/CORS`},`CORS`,-1),r(` `+l(u(S)(`settings.pages.providers.provider.anthropic.helpinfo.description.part4`)),1)]),t(`p`,null,[r(l(u(S)(`settings.pages.providers.provider.anthropic.helpinfo.description.part5`))+` `,1),a[3]||=t(`a`,{underline:``,href:`https://workers.cloudflare.com/`},`Cloudflare Workers`,-1),r(` `+l(u(S)(`settings.pages.providers.provider.anthropic.helpinfo.description.part6`)),1)])]),i(u(b),null,{default:m(()=>[i(u(y),{title:u(S)(`settings.pages.providers.common.section.basic.title`),description:u(S)(`settings.pages.providers.common.section.basic.description`),"on-reset":N},{default:m(()=>{var e;return[i(u(_),{modelValue:j.value,"onUpdate:modelValue":a[0]||=e=>j.value=e,"provider-name":(e=A.value)?.localizedName||`Anthropic`,placeholder:`sk-...`},null,8,[`modelValue`,`provider-name`])]}),_:1},8,[`title`,`description`]),i(u(g),{title:u(S)(`settings.pages.providers.common.section.advanced.title`)},{default:m(()=>[i(u(v),{modelValue:M.value,"onUpdate:modelValue":a[1]||=e=>M.value=e,placeholder:`https://api.anthropic.com/v1/`},null,8,[`modelValue`])]),_:1},8,[`title`])]),_:1})]),_:1},8,[`provider-name`,`provider-icon`,`on-back`])}}});typeof S==`function`&&S(D);var O=D;export{O as default}; \ No newline at end of file +import{computed as e,createBaseVNode as t,createBlock as n,createTextVNode as r,createVNode as i,defineComponent as a,onMounted as o,openBlock as s,storeToRefs as c,toDisplayString as l,unref as u,useI18n as d,useRouter as f,watch as p,withCtx as m}from"./index-CsmT0L1K.js";import"./import-url-browser-DNuYZxPr.js";import"./duckdb-mvp-C3i5IjU8.js";import"./index-CISmcbXk-C9oju49Y.js";import"./types-AwjH7X1C.js";import{useProvidersStore as h}from"./stores-2H61GqXP.js";import"./__vite-browser-external-DPh5tFvT.js";import"./Button-D3cjyOEe.js";import"./src-C1Sr0aqN.js";import{ProviderAdvancedSettings_default as g,ProviderApiKeyInput_default as _,ProviderBaseUrlInput_default as v,ProviderBasicSettings_default as y,ProviderSettingsContainer_default as b,ProviderSettingsLayout_default as x}from"./components-DHUA669a.js";import"./composables-CgcEyUWo.js";import"./sleep-CvjNLutj.js";import"./queue-B0kER5Ap.js";import"./queues-hSEKEE3F.js";import"./dist-Cr2QBfS4.js";import"./webgpu-Nt9hTBpW.js";import{route_block_default as S}from"./route-block-DNPbw0zT.js";const C={bg:`orange-50 dark:orange-900/20`,"rounded-xl":``,"p-4":``,flex:`~ col gap-3`},w={"text-xl":``,"font-semibold":``,text:`orange-700 dark:orange-500`},T={underline:``,href:`https://docs.anthropic.com/en/api/openai-sdk`},E=`anthropic`;var D=a({__name:`anthropic`,setup(a){let{t:S}=d(),D=f(),O=h(),{providers:k}=c(O),A=e(()=>O.getProviderMetadata(E)),j=e({get:()=>{var e;return(e=k.value[E])?.apiKey||``},set:e=>{k.value[E]||(k.value[E]={}),k.value[E].apiKey=e}}),M=e({get:()=>{var e;return(e=k.value[E])?.baseUrl||`https://api.anthropic.com/v1/`},set:e=>{k.value[E]||(k.value[E]={}),k.value[E].baseUrl=e}});o(()=>{var e,t;k.value[E]||(k.value[E]={baseUrl:`https://api.anthropic.com/v1/`}),j.value=(e=k.value[E])?.apiKey||``,M.value=(t=k.value[E])?.baseUrl||`https://api.anthropic.com/v1/`}),p([j,M],()=>{k.value[E]={...k.value[E],apiKey:j.value,baseUrl:M.value||`https://api.anthropic.com/v1/`}});function N(){k.value[E]={baseUrl:`https://api.anthropic.com/v1/`}}return(e,a)=>{var o,c;return s(),n(u(x),{"provider-name":(o=A.value)?.localizedName||`Anthropic | Claude`,"provider-icon":(c=A.value)?.icon,"on-back":()=>u(D).back()},{default:m(()=>[t(`div`,C,[t(`h2`,w,l(u(S)(`settings.pages.providers.provider.anthropic.helpinfo.title`)),1),t(`p`,null,[r(l(u(S)(`settings.pages.providers.provider.anthropic.helpinfo.description.part1`))+` `,1),t(`a`,T,l(u(S)(`settings.pages.providers.provider.anthropic.helpinfo.description.part2`)),1),r(`, `+l(u(S)(`settings.pages.providers.provider.anthropic.helpinfo.description.part3`))+` `,1),a[2]||=t(`a`,{underline:``,href:`https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/CORS`},`CORS`,-1),r(` `+l(u(S)(`settings.pages.providers.provider.anthropic.helpinfo.description.part4`)),1)]),t(`p`,null,[r(l(u(S)(`settings.pages.providers.provider.anthropic.helpinfo.description.part5`))+` `,1),a[3]||=t(`a`,{underline:``,href:`https://workers.cloudflare.com/`},`Cloudflare Workers`,-1),r(` `+l(u(S)(`settings.pages.providers.provider.anthropic.helpinfo.description.part6`)),1)])]),i(u(b),null,{default:m(()=>[i(u(y),{title:u(S)(`settings.pages.providers.common.section.basic.title`),description:u(S)(`settings.pages.providers.common.section.basic.description`),"on-reset":N},{default:m(()=>{var e;return[i(u(_),{modelValue:j.value,"onUpdate:modelValue":a[0]||=e=>j.value=e,"provider-name":(e=A.value)?.localizedName||`Anthropic`,placeholder:`sk-...`},null,8,[`modelValue`,`provider-name`])]}),_:1},8,[`title`,`description`]),i(u(g),{title:u(S)(`settings.pages.providers.common.section.advanced.title`)},{default:m(()=>[i(u(v),{modelValue:M.value,"onUpdate:modelValue":a[1]||=e=>M.value=e,placeholder:`https://api.anthropic.com/v1/`},null,8,[`modelValue`])]),_:1},8,[`title`])]),_:1})]),_:1},8,[`provider-name`,`provider-icon`,`on-back`])}}});typeof S==`function`&&S(D);var O=D;export{O as default}; \ No newline at end of file diff --git a/assets/appearance-DYP1DXMi.js b/assets/appearance-BjgY4Gtj.js similarity index 81% rename from assets/appearance-DYP1DXMi.js rename to assets/appearance-BjgY4Gtj.js index f0c2545b0f54ae00015a72363867f3e3c6c613c7..6f286e15d7e78c66224228739ac77edcd2a2f376 100644 --- a/assets/appearance-DYP1DXMi.js +++ b/assets/appearance-BjgY4Gtj.js @@ -1 +1 @@ -import{Fragment as e,computed as t,createBaseVNode as n,createBlock as r,createElementBlock as i,defineComponent as a,normalizeStyle as o,openBlock as s,renderList as c,resolveDirective as l,unref as u,useI18n as d,withDirectives as f}from"./index-CuCRViVh.js";import"./import-url-browser-DNuYZxPr.js";import"./duckdb-mvp-C3i5IjU8.js";import"./index-CISmcbXk-BkTeNOgG.js";import"./types-AwjH7X1C.js";import"./stores-m0eA85gd.js";import"./__vite-browser-external-CCfYMxZl.js";import"./Button-DFhzbYVt.js";import"./src-C2QbIOor.js";import{IconItem_default as p}from"./components-BFLl4u81.js";import"./composables-Cgvkd8lL.js";import"./sleep-CvjNLutj.js";import"./queue-DAKPJQl1.js";import"./queues-Dstwm1VQ.js";import"./dist-Cr2QBfS4.js";import"./webgpu-Nt9hTBpW.js";import{route_block_default as m}from"./route-block-DNPbw0zT.js";const h={flex:`~ col gap-4`,"font-normal":``},g={flex:`~ col gap-4`},_={text:`neutral-200/50 dark:neutral-600/20`,"pointer-events-none":``,fixed:``,top:`[calc(100dvh-12rem)]`,"bottom-0":``,"right--10":``,"z--1":``,initial:{scale:.9,opacity:0,rotate:180},enter:{scale:1,opacity:1,rotate:0},duration:500,"size-60":``,flex:``,"items-center":``,"justify-center":``},v={text:`60`,"i-solar:settings-bold-duotone":``};var y=a({__name:`index`,setup(a){let{t:m}=d(),y=t(()=>[{title:m(`settings.pages.themes.general.title`),description:m(`settings.pages.themes.general.description`),icon:`i-solar:emoji-funny-square-bold-duotone`,to:`/settings/appearance/general`},{title:m(`settings.pages.themes.color-scheme.title`),description:m(`settings.pages.themes.color-scheme.description`),icon:`i-solar:pallete-2-bold-duotone`,to:`/settings/appearance/color-scheme`},{title:m(`settings.pages.themes.developer.title`),description:m(`settings.pages.themes.developer.description`),icon:`i-solar:code-bold-duotone`,to:`/settings/appearance/developer`}]);return(t,a)=>{let d=l(`motion`);return s(),i(`div`,h,[a[0]||=n(`div`,null,null,-1),n(`div`,g,[(s(!0),i(e,null,c(y.value,(e,t)=>f((s(),r(u(p),{key:e.to,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250,style:o({transitionDelay:`${t*50}ms`}),title:e.title,description:e.description,icon:e.icon,to:e.to},null,8,[`style`,`title`,`description`,`icon`,`to`])),[[d]])),128))]),f((s(),i(`div`,_,[f(n(`div`,v,null,512),[[d]])])),[[d]])])}}});typeof m==`function`&&m(y);var b=y;export{b as default}; \ No newline at end of file +import{Fragment as e,computed as t,createBaseVNode as n,createBlock as r,createElementBlock as i,defineComponent as a,normalizeStyle as o,openBlock as s,renderList as c,resolveDirective as l,unref as u,useI18n as d,withDirectives as f}from"./index-CsmT0L1K.js";import"./import-url-browser-DNuYZxPr.js";import"./duckdb-mvp-C3i5IjU8.js";import"./index-CISmcbXk-C9oju49Y.js";import"./types-AwjH7X1C.js";import"./stores-2H61GqXP.js";import"./__vite-browser-external-DPh5tFvT.js";import"./Button-D3cjyOEe.js";import"./src-C1Sr0aqN.js";import{IconItem_default as p}from"./components-DHUA669a.js";import"./composables-CgcEyUWo.js";import"./sleep-CvjNLutj.js";import"./queue-B0kER5Ap.js";import"./queues-hSEKEE3F.js";import"./dist-Cr2QBfS4.js";import"./webgpu-Nt9hTBpW.js";import{route_block_default as m}from"./route-block-DNPbw0zT.js";const h={flex:`~ col gap-4`,"font-normal":``},g={flex:`~ col gap-4`},_={text:`neutral-200/50 dark:neutral-600/20`,"pointer-events-none":``,fixed:``,top:`[calc(100dvh-12rem)]`,"bottom-0":``,"right--10":``,"z--1":``,initial:{scale:.9,opacity:0,rotate:180},enter:{scale:1,opacity:1,rotate:0},duration:500,"size-60":``,flex:``,"items-center":``,"justify-center":``},v={text:`60`,"i-solar:settings-bold-duotone":``};var y=a({__name:`index`,setup(a){let{t:m}=d(),y=t(()=>[{title:m(`settings.pages.themes.general.title`),description:m(`settings.pages.themes.general.description`),icon:`i-solar:emoji-funny-square-bold-duotone`,to:`/settings/appearance/general`},{title:m(`settings.pages.themes.color-scheme.title`),description:m(`settings.pages.themes.color-scheme.description`),icon:`i-solar:pallete-2-bold-duotone`,to:`/settings/appearance/color-scheme`},{title:m(`settings.pages.themes.developer.title`),description:m(`settings.pages.themes.developer.description`),icon:`i-solar:code-bold-duotone`,to:`/settings/appearance/developer`}]);return(t,a)=>{let d=l(`motion`);return s(),i(`div`,h,[a[0]||=n(`div`,null,null,-1),n(`div`,g,[(s(!0),i(e,null,c(y.value,(e,t)=>f((s(),r(u(p),{key:e.to,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250,style:o({transitionDelay:`${t*50}ms`}),title:e.title,description:e.description,icon:e.icon,to:e.to},null,8,[`style`,`title`,`description`,`icon`,`to`])),[[d]])),128))]),f((s(),i(`div`,_,[f(n(`div`,v,null,512),[[d]])])),[[d]])])}}});typeof m==`function`&&m(y);var b=y;export{b as default}; \ No newline at end of file diff --git a/assets/audio-uKPykWrz.js b/assets/audio-Bi5nCGKr.js similarity index 89% rename from assets/audio-uKPykWrz.js rename to assets/audio-Bi5nCGKr.js index 4dbc11e546ae0edb6128e089c1581a2766a981e6..42ddec71e54b9fd58b065b3946a9b00bd93d81fd 100644 --- a/assets/audio-uKPykWrz.js +++ b/assets/audio-Bi5nCGKr.js @@ -1 +1 @@ -import{createBaseVNode as e,createElementBlock as t,defineComponent as n,openBlock as r,ref as i}from"./index-CuCRViVh.js";var a=n({__name:`audio`,setup(n){let a=i(),o=i();function s(e){var t,n;if(!e)return;let r=(t=o.value)==null||(t=t.files)==null?void 0:t[0];if(!r)return;let i=document.createElement(`audio`);(n=a.value)?.appendChild(i),i.src=URL.createObjectURL(r),i.controls=!0,i.load(),i.play()}return(n,i)=>(r(),t(`div`,null,[e(`div`,null,[e(`div`,{ref_key:`containerRef`,ref:a},null,512),e(`input`,{ref_key:`fileInputRef`,ref:o,type:`file`,onChange:s},null,544)])]))}}),o=a;export{o as default}; \ No newline at end of file +import{createBaseVNode as e,createElementBlock as t,defineComponent as n,openBlock as r,ref as i}from"./index-CsmT0L1K.js";var a=n({__name:`audio`,setup(n){let a=i(),o=i();function s(e){var t,n;if(!e)return;let r=(t=o.value)==null||(t=t.files)==null?void 0:t[0];if(!r)return;let i=document.createElement(`audio`);(n=a.value)?.appendChild(i),i.src=URL.createObjectURL(r),i.controls=!0,i.load(),i.play()}return(n,i)=>(r(),t(`div`,null,[e(`div`,null,[e(`div`,{ref_key:`containerRef`,ref:a},null,512),e(`input`,{ref_key:`fileInputRef`,ref:o,type:`file`,onChange:s},null,544)])]))}}),o=a;export{o as default}; \ No newline at end of file diff --git a/assets/background-remove-B1E0Ol5y.js b/assets/background-remove-B5YHaKAF.js similarity index 99% rename from assets/background-remove-B1E0Ol5y.js rename to assets/background-remove-B5YHaKAF.js index c1a63e6ced6438e6316a598e21a2ffa6e446d0ec..cf36dfaf31b224ca5ab8f698c991aa08efc5684a 100644 --- a/assets/background-remove-B1E0Ol5y.js +++ b/assets/background-remove-B5YHaKAF.js @@ -1,4 +1,4 @@ -var e=function(exports){function t(e){"@babel/helpers - typeof";return t=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},t(e)}function n(e,n){if(t(e)!=`object`||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,n||`default`);if(t(i)!=`object`)return i;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(n===`string`?String:Number)(e)}function r(e){var r=n(e,`string`);return t(r)==`symbol`?r:r+``}function i(e,t,n){return(t=r(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}return exports.defineProperty=i,exports}({});import{Fragment as t,__export as n,__require as r,computed as i,createBaseVNode as a,createCommentVNode as o,createElementBlock as s,createVNode as c,defineComponent as l,normalizeStyle as u,onMounted as d,openBlock as f,ref as p,renderList as m,toDisplayString as h,unref as g}from"./index-CuCRViVh.js";import"./src-C2QbIOor.js";import{InputFile_default as _}from"./InputFile-CffDHtEw.js";import{check as v}from"./webgpu-Nt9hTBpW.js";const y=new Map,b=[],x=(e,t,n)=>{if(t&&typeof t.init==`function`&&typeof t.createInferenceSessionHandler==`function`){let r=y.get(e);if(r===void 0)y.set(e,{backend:t,priority:n});else if(r.priority>n)return;else if(r.priority===n&&r.backend!==t)throw Error(`cannot register backend "${e}" using priority ${n}`);if(n>=0){let t=b.indexOf(e);t!==-1&&b.splice(t,1);for(let t=0;t{let t=y.get(e);if(!t)return`backend not found.`;if(t.initialized)return t.backend;if(t.aborted)return t.error;{let n=!!t.initPromise;try{return n||(t.initPromise=t.backend.init(e)),await t.initPromise,t.initialized=!0,t.backend}catch(e){return n||(t.error=`${e}`,t.aborted=!0),t.error}finally{delete t.initPromise}}},C=async e=>{let t=e.executionProviders||[],n=t.map(e=>typeof e==`string`?e:e.name),r=n.length===0?b:n,i,a=[],o=new Set;for(let e of r){let t=await S(e);typeof t==`string`?a.push({name:e,err:t}):(i||=t,i===t&&o.add(e))}if(!i)throw Error(`no available backend found. ERR: ${a.map(e=>`[${e.name}] ${e.err}`).join(`, `)}`);for(let{name:e,err:t}of a)n.includes(e)&&console.warn(`removing requested execution provider "${e}" from session options because it is not available: ${t}`);let s=t.filter(e=>o.has(typeof e==`string`?e:e.name));return[i,new Proxy(e,{get:(e,t)=>t===`executionProviders`?s:Reflect.get(e,t)})]},w=`1.22.0`;let T=`warning`;const E={wasm:{},webgl:{},webgpu:{},versions:{common:w},set logLevel(e){if(e!==void 0){if(typeof e!=`string`||[`verbose`,`info`,`warning`,`error`,`fatal`].indexOf(e)===-1)throw Error(`Unsupported logging level: ${e}`);T=e}},get logLevel(){return T}};Object.defineProperty(E,`logLevel`,{enumerable:!0});const D=E,O=(e,t)=>{let n=typeof document<`u`?document.createElement(`canvas`):new OffscreenCanvas(1,1);n.width=e.dims[3],n.height=e.dims[2];let r=n.getContext(`2d`);if(r!=null){let i,a;t?.tensorLayout!==void 0&&t.tensorLayout===`NHWC`?(i=e.dims[2],a=e.dims[3]):(i=e.dims[3],a=e.dims[2]);let o=t?.format===void 0?`RGB`:t.format,s=t?.norm,c,l;s===void 0||s.mean===void 0?c=[255,255,255,255]:typeof s.mean==`number`?c=[s.mean,s.mean,s.mean,s.mean]:(c=[s.mean[0],s.mean[1],s.mean[2],0],s.mean[3]!==void 0&&(c[3]=s.mean[3])),s===void 0||s.bias===void 0?l=[0,0,0,0]:typeof s.bias==`number`?l=[s.bias,s.bias,s.bias,s.bias]:(l=[s.bias[0],s.bias[1],s.bias[2],0],s.bias[3]!==void 0&&(l[3]=s.bias[3]));let u=a*i,d=0,f=u,p=u*2,m=-1;o===`RGBA`?(d=0,f=u,p=u*2,m=u*3):o===`RGB`?(d=0,f=u,p=u*2):o===`RBG`&&(d=0,p=u,f=u*2);for(let t=0;t{let n=typeof document<`u`?document.createElement(`canvas`).getContext(`2d`):new OffscreenCanvas(1,1).getContext(`2d`),r;if(n!=null){let i,a,o;t?.tensorLayout!==void 0&&t.tensorLayout===`NHWC`?(i=e.dims[2],a=e.dims[1],o=e.dims[3]):(i=e.dims[3],a=e.dims[2],o=e.dims[1]);let s=t===void 0||t.format===void 0?`RGB`:t.format,c=t?.norm,l,u;c===void 0||c.mean===void 0?l=[255,255,255,255]:typeof c.mean==`number`?l=[c.mean,c.mean,c.mean,c.mean]:(l=[c.mean[0],c.mean[1],c.mean[2],255],c.mean[3]!==void 0&&(l[3]=c.mean[3])),c===void 0||c.bias===void 0?u=[0,0,0,0]:typeof c.bias==`number`?u=[c.bias,c.bias,c.bias,c.bias]:(u=[c.bias[0],c.bias[1],c.bias[2],0],c.bias[3]!==void 0&&(u[3]=c.bias[3]));let d=a*i;if(t!==void 0&&(t.format!==void 0&&o===4&&t.format!==`RGBA`||o===3&&t.format!==`RGB`&&t.format!==`BGR`))throw Error(`Tensor format doesn't match input tensor dims`);let f=4,p=0,m=1,h=2,g=3,_=0,v=d,y=d*2,b=-1;s===`RGBA`?(_=0,v=d,y=d*2,b=d*3):s===`RGB`?(_=0,v=d,y=d*2):s===`RBG`&&(_=0,y=d,v=d*2),r=n.createImageData(i,a);for(let t=0;t{if(e===void 0)throw Error(`Image buffer must be defined`);if(t.height===void 0||t.width===void 0)throw Error(`Image height and width must be defined`);if(t.tensorLayout===`NHWC`)throw Error(`NHWC Tensor layout is not supported yet`);let{height:n,width:r}=t,i=t.norm??{mean:255,bias:0},a,o;a=typeof i.mean==`number`?[i.mean,i.mean,i.mean,i.mean]:[i.mean[0],i.mean[1],i.mean[2],i.mean[3]??255],o=typeof i.bias==`number`?[i.bias,i.bias,i.bias,i.bias]:[i.bias[0],i.bias[1],i.bias[2],i.bias[3]??0];let s=t.format===void 0?`RGBA`:t.format,c=t.tensorFormat===void 0||t.tensorFormat===void 0?`RGB`:t.tensorFormat,l=n*r,u=c===`RGBA`?new Float32Array(l*4):new Float32Array(l*3),d=4,f=0,p=1,m=2,h=3,g=0,_=l,v=l*2,y=-1;s===`RGB`&&(d=3,f=0,p=1,m=2,h=-1),c===`RGBA`?y=l*3:c===`RBG`?(g=0,v=l,_=l*2):c===`BGR`&&(v=0,_=l,g=l*2);for(let t=0;t{let n=typeof HTMLImageElement<`u`&&e instanceof HTMLImageElement,r=typeof ImageData<`u`&&e instanceof ImageData,i=typeof ImageBitmap<`u`&&e instanceof ImageBitmap,a=typeof e==`string`,o,s=t??{},c=()=>{if(typeof document<`u`)return document.createElement(`canvas`);if(typeof OffscreenCanvas<`u`)return new OffscreenCanvas(1,1);throw Error(`Canvas is not supported`)},l=e=>typeof HTMLCanvasElement<`u`&&e instanceof HTMLCanvasElement||e instanceof OffscreenCanvas?e.getContext(`2d`):null;if(n){let n=c();n.width=e.width,n.height=e.height;let r=l(n);if(r!=null){let n=e.height,i=e.width;if(t!==void 0&&t.resizedHeight!==void 0&&t.resizedWidth!==void 0&&(n=t.resizedHeight,i=t.resizedWidth),t!==void 0){if(s=t,t.tensorFormat!==void 0)throw Error(`Image input config format must be RGBA for HTMLImageElement`);s.tensorFormat=`RGBA`,s.height=n,s.width=i}else s.tensorFormat=`RGBA`,s.height=n,s.width=i;r.drawImage(e,0,0),o=r.getImageData(0,0,i,n).data}else throw Error(`Can not access image data`)}else if(r){let n,r;if(t!==void 0&&t.resizedWidth!==void 0&&t.resizedHeight!==void 0?(n=t.resizedHeight,r=t.resizedWidth):(n=e.height,r=e.width),t!==void 0&&(s=t),s.format=`RGBA`,s.height=n,s.width=r,t!==void 0){let t=c();t.width=r,t.height=n;let i=l(t);if(i!=null)i.putImageData(e,0,0),o=i.getImageData(0,0,r,n).data;else throw Error(`Can not access image data`)}else o=e.data}else if(i){if(t===void 0)throw Error(`Please provide image config with format for Imagebitmap`);let n=c();n.width=e.width,n.height=e.height;let r=l(n);if(r!=null){let t=e.height,n=e.width;return r.drawImage(e,0,0,n,t),o=r.getImageData(0,0,n,t).data,s.height=t,s.width=n,k(o,s)}else throw Error(`Can not access image data`)}else if(a)return new Promise((t,n)=>{let r=c(),i=l(r);if(!e||!i)return n();let a=new Image;a.crossOrigin=`Anonymous`,a.src=e,a.onload=()=>{r.width=a.width,r.height=a.height,i.drawImage(a,0,0,r.width,r.height);let e=i.getImageData(0,0,r.width,r.height);s.height=r.height,s.width=r.width,t(k(e.data,s))}});else throw Error(`Input data provided is not supported - aborted tensor creation`);if(o!==void 0)return k(o,s);throw Error(`Input data provided is not supported - aborted tensor creation`)},ne=(e,t)=>{let{width:n,height:r,download:i,dispose:a}=t,o=[1,r,n,4];return new j({location:`texture`,type:`float32`,texture:e,dims:o,download:i,dispose:a})},re=(e,t)=>{let{dataType:n,dims:r,download:i,dispose:a}=t;return new j({location:`gpu-buffer`,type:n??`float32`,gpuBuffer:e,dims:r,download:i,dispose:a})},ie=(e,t)=>{let{dataType:n,dims:r,download:i,dispose:a}=t;return new j({location:`ml-tensor`,type:n??`float32`,mlTensor:e,dims:r,download:i,dispose:a})},A=(e,t,n)=>new j({location:`cpu-pinned`,type:e,data:t,dims:n??[t.length]}),ae=new Map([[`float32`,Float32Array],[`uint8`,Uint8Array],[`int8`,Int8Array],[`uint16`,Uint16Array],[`int16`,Int16Array],[`int32`,Int32Array],[`bool`,Uint8Array],[`float64`,Float64Array],[`uint32`,Uint32Array],[`int4`,Uint8Array],[`uint4`,Uint8Array]]),oe=new Map([[Float32Array,`float32`],[Uint8Array,`uint8`],[Int8Array,`int8`],[Uint16Array,`uint16`],[Int16Array,`int16`],[Int32Array,`int32`],[Float64Array,`float64`],[Uint32Array,`uint32`]]);let se=!1;const ce=()=>{if(!se){se=!0;let e=typeof BigInt64Array<`u`&&BigInt64Array.from,t=typeof BigUint64Array<`u`&&BigUint64Array.from,n=globalThis.Float16Array,r=n!==void 0&&n.from;e&&(ae.set(`int64`,BigInt64Array),oe.set(BigInt64Array,`int64`)),t&&(ae.set(`uint64`,BigUint64Array),oe.set(BigUint64Array,`uint64`)),r?(ae.set(`float16`,n),oe.set(n,`float16`)):ae.set(`float16`,Uint16Array)}},le=e=>{let t=1;for(let n=0;n{switch(e.location){case`cpu`:return new j(e.type,e.data,t);case`cpu-pinned`:return new j({location:`cpu-pinned`,data:e.data,type:e.type,dims:t});case`texture`:return new j({location:`texture`,texture:e.texture,type:e.type,dims:t});case`gpu-buffer`:return new j({location:`gpu-buffer`,gpuBuffer:e.gpuBuffer,type:e.type,dims:t});case`ml-tensor`:return new j({location:`ml-tensor`,mlTensor:e.mlTensor,type:e.type,dims:t});default:throw Error(`tensorReshape: tensor location ${e.location} is not supported`)}};var j=class{constructor(e,t,n){ce();let r,i;if(typeof e==`object`&&`location`in e)switch(this.dataLocation=e.location,r=e.type,i=e.dims,e.location){case`cpu-pinned`:{let t=ae.get(r);if(!t)throw TypeError(`unsupported type "${r}" to create tensor from pinned buffer`);if(!(e.data instanceof t))throw TypeError(`buffer should be of type ${t.name}`);this.cpuData=e.data;break}case`texture`:if(r!==`float32`)throw TypeError(`unsupported type "${r}" to create tensor from texture`);this.gpuTextureData=e.texture,this.downloader=e.download,this.disposer=e.dispose;break;case`gpu-buffer`:if(r!==`float32`&&r!==`float16`&&r!==`int32`&&r!==`int64`&&r!==`uint32`&&r!==`uint8`&&r!==`bool`&&r!==`uint4`&&r!==`int4`)throw TypeError(`unsupported type "${r}" to create tensor from gpu buffer`);this.gpuBufferData=e.gpuBuffer,this.downloader=e.download,this.disposer=e.dispose;break;case`ml-tensor`:if(r!==`float32`&&r!==`float16`&&r!==`int32`&&r!==`int64`&&r!==`uint32`&&r!==`uint64`&&r!==`int8`&&r!==`uint8`&&r!==`bool`&&r!==`uint4`&&r!==`int4`)throw TypeError(`unsupported type "${r}" to create tensor from MLTensor`);this.mlTensorData=e.mlTensor,this.downloader=e.download,this.disposer=e.dispose;break;default:throw Error(`Tensor constructor: unsupported location '${this.dataLocation}'`)}else{let a,o;if(typeof e==`string`)if(r=e,o=n,e===`string`){if(!Array.isArray(t))throw TypeError(`A string tensor's data must be a string array.`);a=t}else{let n=ae.get(e);if(n===void 0)throw TypeError(`Unsupported tensor type: ${e}.`);if(Array.isArray(t)){if(e===`float16`&&n===Uint16Array||e===`uint4`||e===`int4`)throw TypeError(`Creating a ${e} tensor from number array is not supported. Please use ${n.name} as data.`);a=e===`uint64`||e===`int64`?n.from(t,BigInt):n.from(t)}else if(t instanceof n)a=t;else if(t instanceof Uint8ClampedArray)if(e===`uint8`)a=Uint8Array.from(t);else throw TypeError(`A Uint8ClampedArray tensor's data must be type of uint8`);else if(e===`float16`&&t instanceof Uint16Array&&n!==Uint16Array)a=new globalThis.Float16Array(t.buffer,t.byteOffset,t.length);else throw TypeError(`A ${r} tensor's data must be type of ${n}`)}else if(o=t,Array.isArray(e)){if(e.length===0)throw TypeError(`Tensor type cannot be inferred from an empty array.`);let t=typeof e[0];if(t===`string`)r=`string`,a=e;else if(t===`boolean`)r=`bool`,a=Uint8Array.from(e);else throw TypeError(`Invalid element type of data array: ${t}.`)}else if(e instanceof Uint8ClampedArray)r=`uint8`,a=Uint8Array.from(e);else{let t=oe.get(e.constructor);if(t===void 0)throw TypeError(`Unsupported type for tensor data: ${e.constructor}.`);r=t,a=e}if(o===void 0)o=[a.length];else if(!Array.isArray(o))throw TypeError(`A tensor's dims must be a number array`);i=o,this.cpuData=a,this.dataLocation=`cpu`}let a=le(i);if(this.cpuData&&a!==this.cpuData.length&&!((r===`uint4`||r===`int4`)&&Math.ceil(a/2)===this.cpuData.length))throw Error(`Tensor's size(${a}) does not match data length(${this.cpuData.length}).`);this.type=r,this.dims=i,this.size=a}static async fromImage(e,t){return te(e,t)}static fromTexture(e,t){return ne(e,t)}static fromGpuBuffer(e,t){return re(e,t)}static fromMLTensor(e,t){return ie(e,t)}static fromPinnedBuffer(e,t,n){return A(e,t,n)}toDataURL(e){return O(this,e)}toImageData(e){return ee(this,e)}get data(){if(this.ensureValid(),!this.cpuData)throw Error("The data is not on CPU. Use `getData()` to download GPU data to CPU, or use `texture` or `gpuBuffer` property to access the GPU data directly.");return this.cpuData}get location(){return this.dataLocation}get texture(){if(this.ensureValid(),!this.gpuTextureData)throw Error(`The data is not stored as a WebGL texture.`);return this.gpuTextureData}get gpuBuffer(){if(this.ensureValid(),!this.gpuBufferData)throw Error(`The data is not stored as a WebGPU buffer.`);return this.gpuBufferData}get mlTensor(){if(this.ensureValid(),!this.mlTensorData)throw Error(`The data is not stored as a WebNN MLTensor.`);return this.mlTensorData}async getData(e){switch(this.ensureValid(),this.dataLocation){case`cpu`:case`cpu-pinned`:return this.data;case`texture`:case`gpu-buffer`:case`ml-tensor`:if(!this.downloader)throw Error(`The current tensor is not created with a specified data downloader.`);if(this.isDownloading)throw Error(`The current tensor is being downloaded.`);try{this.isDownloading=!0;let t=await this.downloader();return this.downloader=void 0,this.dataLocation=`cpu`,this.cpuData=t,e&&this.disposer&&(this.disposer(),this.disposer=void 0),t}finally{this.isDownloading=!1}default:throw Error(`cannot get data from location: ${this.dataLocation}`)}}dispose(){if(this.isDownloading)throw Error(`The current tensor is being downloaded.`);this.disposer&&(this.disposer(),this.disposer=void 0),this.cpuData=void 0,this.gpuTextureData=void 0,this.gpuBufferData=void 0,this.mlTensorData=void 0,this.downloader=void 0,this.isDownloading=void 0,this.dataLocation=`none`}ensureValid(){if(this.dataLocation===`none`)throw Error(`The tensor is disposed.`)}reshape(e){if(this.ensureValid(),this.downloader||this.disposer)throw Error(`Cannot reshape a tensor that owns GPU resource.`);return ue(this,e)}};const M=j,de=(e,t)=>{(E.trace===void 0?!E.wasm.trace:!E.trace)||console.timeStamp(`${e}::ORT::${t}`)},fe=(e,t)=>{var n;let r=(n=Error().stack)?.split(/\r\n|\r|\n/g)||[],i=!1;for(let n=0;n{(E.trace===void 0?!E.wasm.trace:!E.trace)||fe(`BEGIN`,e)},N=e=>{(E.trace===void 0?!E.wasm.trace:!E.trace)||fe(`END`,e)};var P=class e{constructor(e){this.handler=e}async run(e,t,n){pe();let r={},i={};if(typeof e!=`object`||!e||e instanceof M||Array.isArray(e))throw TypeError(`'feeds' must be an object that use input names as keys and OnnxValue as corresponding values.`);let a=!0;if(typeof t==`object`){if(t===null)throw TypeError(`Unexpected argument[1]: cannot be null.`);if(t instanceof M)throw TypeError(`'fetches' cannot be a Tensor`);if(Array.isArray(t)){if(t.length===0)throw TypeError(`'fetches' cannot be an empty array.`);a=!1;for(let e of t){if(typeof e!=`string`)throw TypeError(`'fetches' must be a string array or an object.`);if(this.outputNames.indexOf(e)===-1)throw RangeError(`'fetches' contains invalid output name: ${e}.`);r[e]=null}if(typeof n==`object`&&n)i=n;else if(n!==void 0)throw TypeError(`'options' must be an object.`)}else{let e=!1,o=Object.getOwnPropertyNames(t);for(let n of this.outputNames)if(o.indexOf(n)!==-1){let i=t[n];(i===null||i instanceof M)&&(e=!0,a=!1,r[n]=i)}if(e){if(typeof n==`object`&&n)i=n;else if(n!==void 0)throw TypeError(`'options' must be an object.`)}else i=t}}else if(t!==void 0)throw TypeError(`Unexpected argument[1]: must be 'fetches' or 'options'.`);for(let t of this.inputNames)if(e[t]===void 0)throw Error(`input '${t}' is missing in 'feeds'.`);if(a)for(let e of this.outputNames)r[e]=null;let o=await this.handler.run(e,r,i),s={};for(let e in o)if(Object.hasOwnProperty.call(o,e)){let t=o[e];t instanceof M?s[e]=t:s[e]=new M(t.type,t.data,t.dims)}return N(),s}async release(){return this.handler.dispose()}static async create(t,n,r,i){pe();let a,o={};if(typeof t==`string`){if(a=t,typeof n==`object`&&n)o=n;else if(n!==void 0)throw TypeError(`'options' must be an object.`)}else if(t instanceof Uint8Array){if(a=t,typeof n==`object`&&n)o=n;else if(n!==void 0)throw TypeError(`'options' must be an object.`)}else if(t instanceof ArrayBuffer||typeof SharedArrayBuffer<`u`&&t instanceof SharedArrayBuffer){let e=t,s=0,c=t.byteLength;if(typeof n==`object`&&n)o=n;else if(typeof n==`number`){if(s=n,!Number.isSafeInteger(s))throw RangeError(`'byteOffset' must be an integer.`);if(s<0||s>=e.byteLength)throw RangeError(`'byteOffset' is out of range [0, ${e.byteLength}).`);if(c=t.byteLength-s,typeof r==`number`){if(c=r,!Number.isSafeInteger(c))throw RangeError(`'byteLength' must be an integer.`);if(c<=0||s+c>e.byteLength)throw RangeError(`'byteLength' is out of range (0, ${e.byteLength-s}].`);if(typeof i==`object`&&i)o=i;else if(i!==void 0)throw TypeError(`'options' must be an object.`)}else if(r!==void 0)throw TypeError(`'byteLength' must be a number.`)}else if(n!==void 0)throw TypeError(`'options' must be an object.`);a=new Uint8Array(e,s,c)}else throw TypeError(`Unexpected argument[0]: must be 'path' or 'buffer'.`);let[s,c]=await C(o),l=await s.createInferenceSessionHandler(a,c);return N(),new e(l)}startProfiling(){this.handler.startProfiling()}endProfiling(){this.handler.endProfiling()}get inputNames(){return this.handler.inputNames}get outputNames(){return this.handler.outputNames}get inputMetadata(){return this.handler.inputMetadata}get outputMetadata(){return this.handler.outputMetadata}};const F=P;var I={};n(I,{InferenceSession:()=>F,TRACE:()=>de,TRACE_FUNC_BEGIN:()=>pe,TRACE_FUNC_END:()=>N,Tensor:()=>M,env:()=>D,registerBackend:()=>x});var me={};n(me,{InferenceSession:()=>ut,TRACE:()=>rt,TRACE_FUNC_BEGIN:()=>at,TRACE_FUNC_END:()=>ot,Tensor:()=>tt,default:()=>Sf,env:()=>R,registerBackend:()=>Te}); +var e=function(exports){function t(e){"@babel/helpers - typeof";return t=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},t(e)}function n(e,n){if(t(e)!=`object`||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,n||`default`);if(t(i)!=`object`)return i;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(n===`string`?String:Number)(e)}function r(e){var r=n(e,`string`);return t(r)==`symbol`?r:r+``}function i(e,t,n){return(t=r(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}return exports.defineProperty=i,exports}({});import{Fragment as t,__export as n,__require as r,computed as i,createBaseVNode as a,createCommentVNode as o,createElementBlock as s,createVNode as c,defineComponent as l,normalizeStyle as u,onMounted as d,openBlock as f,ref as p,renderList as m,toDisplayString as h,unref as g}from"./index-CsmT0L1K.js";import"./src-C1Sr0aqN.js";import{InputFile_default as _}from"./InputFile-BW-qIUxk.js";import{check as v}from"./webgpu-Nt9hTBpW.js";const y=new Map,b=[],x=(e,t,n)=>{if(t&&typeof t.init==`function`&&typeof t.createInferenceSessionHandler==`function`){let r=y.get(e);if(r===void 0)y.set(e,{backend:t,priority:n});else if(r.priority>n)return;else if(r.priority===n&&r.backend!==t)throw Error(`cannot register backend "${e}" using priority ${n}`);if(n>=0){let t=b.indexOf(e);t!==-1&&b.splice(t,1);for(let t=0;t{let t=y.get(e);if(!t)return`backend not found.`;if(t.initialized)return t.backend;if(t.aborted)return t.error;{let n=!!t.initPromise;try{return n||(t.initPromise=t.backend.init(e)),await t.initPromise,t.initialized=!0,t.backend}catch(e){return n||(t.error=`${e}`,t.aborted=!0),t.error}finally{delete t.initPromise}}},C=async e=>{let t=e.executionProviders||[],n=t.map(e=>typeof e==`string`?e:e.name),r=n.length===0?b:n,i,a=[],o=new Set;for(let e of r){let t=await S(e);typeof t==`string`?a.push({name:e,err:t}):(i||=t,i===t&&o.add(e))}if(!i)throw Error(`no available backend found. ERR: ${a.map(e=>`[${e.name}] ${e.err}`).join(`, `)}`);for(let{name:e,err:t}of a)n.includes(e)&&console.warn(`removing requested execution provider "${e}" from session options because it is not available: ${t}`);let s=t.filter(e=>o.has(typeof e==`string`?e:e.name));return[i,new Proxy(e,{get:(e,t)=>t===`executionProviders`?s:Reflect.get(e,t)})]},w=`1.22.0`;let T=`warning`;const E={wasm:{},webgl:{},webgpu:{},versions:{common:w},set logLevel(e){if(e!==void 0){if(typeof e!=`string`||[`verbose`,`info`,`warning`,`error`,`fatal`].indexOf(e)===-1)throw Error(`Unsupported logging level: ${e}`);T=e}},get logLevel(){return T}};Object.defineProperty(E,`logLevel`,{enumerable:!0});const D=E,O=(e,t)=>{let n=typeof document<`u`?document.createElement(`canvas`):new OffscreenCanvas(1,1);n.width=e.dims[3],n.height=e.dims[2];let r=n.getContext(`2d`);if(r!=null){let i,a;t?.tensorLayout!==void 0&&t.tensorLayout===`NHWC`?(i=e.dims[2],a=e.dims[3]):(i=e.dims[3],a=e.dims[2]);let o=t?.format===void 0?`RGB`:t.format,s=t?.norm,c,l;s===void 0||s.mean===void 0?c=[255,255,255,255]:typeof s.mean==`number`?c=[s.mean,s.mean,s.mean,s.mean]:(c=[s.mean[0],s.mean[1],s.mean[2],0],s.mean[3]!==void 0&&(c[3]=s.mean[3])),s===void 0||s.bias===void 0?l=[0,0,0,0]:typeof s.bias==`number`?l=[s.bias,s.bias,s.bias,s.bias]:(l=[s.bias[0],s.bias[1],s.bias[2],0],s.bias[3]!==void 0&&(l[3]=s.bias[3]));let u=a*i,d=0,f=u,p=u*2,m=-1;o===`RGBA`?(d=0,f=u,p=u*2,m=u*3):o===`RGB`?(d=0,f=u,p=u*2):o===`RBG`&&(d=0,p=u,f=u*2);for(let t=0;t{let n=typeof document<`u`?document.createElement(`canvas`).getContext(`2d`):new OffscreenCanvas(1,1).getContext(`2d`),r;if(n!=null){let i,a,o;t?.tensorLayout!==void 0&&t.tensorLayout===`NHWC`?(i=e.dims[2],a=e.dims[1],o=e.dims[3]):(i=e.dims[3],a=e.dims[2],o=e.dims[1]);let s=t===void 0||t.format===void 0?`RGB`:t.format,c=t?.norm,l,u;c===void 0||c.mean===void 0?l=[255,255,255,255]:typeof c.mean==`number`?l=[c.mean,c.mean,c.mean,c.mean]:(l=[c.mean[0],c.mean[1],c.mean[2],255],c.mean[3]!==void 0&&(l[3]=c.mean[3])),c===void 0||c.bias===void 0?u=[0,0,0,0]:typeof c.bias==`number`?u=[c.bias,c.bias,c.bias,c.bias]:(u=[c.bias[0],c.bias[1],c.bias[2],0],c.bias[3]!==void 0&&(u[3]=c.bias[3]));let d=a*i;if(t!==void 0&&(t.format!==void 0&&o===4&&t.format!==`RGBA`||o===3&&t.format!==`RGB`&&t.format!==`BGR`))throw Error(`Tensor format doesn't match input tensor dims`);let f=4,p=0,m=1,h=2,g=3,_=0,v=d,y=d*2,b=-1;s===`RGBA`?(_=0,v=d,y=d*2,b=d*3):s===`RGB`?(_=0,v=d,y=d*2):s===`RBG`&&(_=0,y=d,v=d*2),r=n.createImageData(i,a);for(let t=0;t{if(e===void 0)throw Error(`Image buffer must be defined`);if(t.height===void 0||t.width===void 0)throw Error(`Image height and width must be defined`);if(t.tensorLayout===`NHWC`)throw Error(`NHWC Tensor layout is not supported yet`);let{height:n,width:r}=t,i=t.norm??{mean:255,bias:0},a,o;a=typeof i.mean==`number`?[i.mean,i.mean,i.mean,i.mean]:[i.mean[0],i.mean[1],i.mean[2],i.mean[3]??255],o=typeof i.bias==`number`?[i.bias,i.bias,i.bias,i.bias]:[i.bias[0],i.bias[1],i.bias[2],i.bias[3]??0];let s=t.format===void 0?`RGBA`:t.format,c=t.tensorFormat===void 0||t.tensorFormat===void 0?`RGB`:t.tensorFormat,l=n*r,u=c===`RGBA`?new Float32Array(l*4):new Float32Array(l*3),d=4,f=0,p=1,m=2,h=3,g=0,_=l,v=l*2,y=-1;s===`RGB`&&(d=3,f=0,p=1,m=2,h=-1),c===`RGBA`?y=l*3:c===`RBG`?(g=0,v=l,_=l*2):c===`BGR`&&(v=0,_=l,g=l*2);for(let t=0;t{let n=typeof HTMLImageElement<`u`&&e instanceof HTMLImageElement,r=typeof ImageData<`u`&&e instanceof ImageData,i=typeof ImageBitmap<`u`&&e instanceof ImageBitmap,a=typeof e==`string`,o,s=t??{},c=()=>{if(typeof document<`u`)return document.createElement(`canvas`);if(typeof OffscreenCanvas<`u`)return new OffscreenCanvas(1,1);throw Error(`Canvas is not supported`)},l=e=>typeof HTMLCanvasElement<`u`&&e instanceof HTMLCanvasElement||e instanceof OffscreenCanvas?e.getContext(`2d`):null;if(n){let n=c();n.width=e.width,n.height=e.height;let r=l(n);if(r!=null){let n=e.height,i=e.width;if(t!==void 0&&t.resizedHeight!==void 0&&t.resizedWidth!==void 0&&(n=t.resizedHeight,i=t.resizedWidth),t!==void 0){if(s=t,t.tensorFormat!==void 0)throw Error(`Image input config format must be RGBA for HTMLImageElement`);s.tensorFormat=`RGBA`,s.height=n,s.width=i}else s.tensorFormat=`RGBA`,s.height=n,s.width=i;r.drawImage(e,0,0),o=r.getImageData(0,0,i,n).data}else throw Error(`Can not access image data`)}else if(r){let n,r;if(t!==void 0&&t.resizedWidth!==void 0&&t.resizedHeight!==void 0?(n=t.resizedHeight,r=t.resizedWidth):(n=e.height,r=e.width),t!==void 0&&(s=t),s.format=`RGBA`,s.height=n,s.width=r,t!==void 0){let t=c();t.width=r,t.height=n;let i=l(t);if(i!=null)i.putImageData(e,0,0),o=i.getImageData(0,0,r,n).data;else throw Error(`Can not access image data`)}else o=e.data}else if(i){if(t===void 0)throw Error(`Please provide image config with format for Imagebitmap`);let n=c();n.width=e.width,n.height=e.height;let r=l(n);if(r!=null){let t=e.height,n=e.width;return r.drawImage(e,0,0,n,t),o=r.getImageData(0,0,n,t).data,s.height=t,s.width=n,k(o,s)}else throw Error(`Can not access image data`)}else if(a)return new Promise((t,n)=>{let r=c(),i=l(r);if(!e||!i)return n();let a=new Image;a.crossOrigin=`Anonymous`,a.src=e,a.onload=()=>{r.width=a.width,r.height=a.height,i.drawImage(a,0,0,r.width,r.height);let e=i.getImageData(0,0,r.width,r.height);s.height=r.height,s.width=r.width,t(k(e.data,s))}});else throw Error(`Input data provided is not supported - aborted tensor creation`);if(o!==void 0)return k(o,s);throw Error(`Input data provided is not supported - aborted tensor creation`)},ne=(e,t)=>{let{width:n,height:r,download:i,dispose:a}=t,o=[1,r,n,4];return new j({location:`texture`,type:`float32`,texture:e,dims:o,download:i,dispose:a})},re=(e,t)=>{let{dataType:n,dims:r,download:i,dispose:a}=t;return new j({location:`gpu-buffer`,type:n??`float32`,gpuBuffer:e,dims:r,download:i,dispose:a})},ie=(e,t)=>{let{dataType:n,dims:r,download:i,dispose:a}=t;return new j({location:`ml-tensor`,type:n??`float32`,mlTensor:e,dims:r,download:i,dispose:a})},A=(e,t,n)=>new j({location:`cpu-pinned`,type:e,data:t,dims:n??[t.length]}),ae=new Map([[`float32`,Float32Array],[`uint8`,Uint8Array],[`int8`,Int8Array],[`uint16`,Uint16Array],[`int16`,Int16Array],[`int32`,Int32Array],[`bool`,Uint8Array],[`float64`,Float64Array],[`uint32`,Uint32Array],[`int4`,Uint8Array],[`uint4`,Uint8Array]]),oe=new Map([[Float32Array,`float32`],[Uint8Array,`uint8`],[Int8Array,`int8`],[Uint16Array,`uint16`],[Int16Array,`int16`],[Int32Array,`int32`],[Float64Array,`float64`],[Uint32Array,`uint32`]]);let se=!1;const ce=()=>{if(!se){se=!0;let e=typeof BigInt64Array<`u`&&BigInt64Array.from,t=typeof BigUint64Array<`u`&&BigUint64Array.from,n=globalThis.Float16Array,r=n!==void 0&&n.from;e&&(ae.set(`int64`,BigInt64Array),oe.set(BigInt64Array,`int64`)),t&&(ae.set(`uint64`,BigUint64Array),oe.set(BigUint64Array,`uint64`)),r?(ae.set(`float16`,n),oe.set(n,`float16`)):ae.set(`float16`,Uint16Array)}},le=e=>{let t=1;for(let n=0;n{switch(e.location){case`cpu`:return new j(e.type,e.data,t);case`cpu-pinned`:return new j({location:`cpu-pinned`,data:e.data,type:e.type,dims:t});case`texture`:return new j({location:`texture`,texture:e.texture,type:e.type,dims:t});case`gpu-buffer`:return new j({location:`gpu-buffer`,gpuBuffer:e.gpuBuffer,type:e.type,dims:t});case`ml-tensor`:return new j({location:`ml-tensor`,mlTensor:e.mlTensor,type:e.type,dims:t});default:throw Error(`tensorReshape: tensor location ${e.location} is not supported`)}};var j=class{constructor(e,t,n){ce();let r,i;if(typeof e==`object`&&`location`in e)switch(this.dataLocation=e.location,r=e.type,i=e.dims,e.location){case`cpu-pinned`:{let t=ae.get(r);if(!t)throw TypeError(`unsupported type "${r}" to create tensor from pinned buffer`);if(!(e.data instanceof t))throw TypeError(`buffer should be of type ${t.name}`);this.cpuData=e.data;break}case`texture`:if(r!==`float32`)throw TypeError(`unsupported type "${r}" to create tensor from texture`);this.gpuTextureData=e.texture,this.downloader=e.download,this.disposer=e.dispose;break;case`gpu-buffer`:if(r!==`float32`&&r!==`float16`&&r!==`int32`&&r!==`int64`&&r!==`uint32`&&r!==`uint8`&&r!==`bool`&&r!==`uint4`&&r!==`int4`)throw TypeError(`unsupported type "${r}" to create tensor from gpu buffer`);this.gpuBufferData=e.gpuBuffer,this.downloader=e.download,this.disposer=e.dispose;break;case`ml-tensor`:if(r!==`float32`&&r!==`float16`&&r!==`int32`&&r!==`int64`&&r!==`uint32`&&r!==`uint64`&&r!==`int8`&&r!==`uint8`&&r!==`bool`&&r!==`uint4`&&r!==`int4`)throw TypeError(`unsupported type "${r}" to create tensor from MLTensor`);this.mlTensorData=e.mlTensor,this.downloader=e.download,this.disposer=e.dispose;break;default:throw Error(`Tensor constructor: unsupported location '${this.dataLocation}'`)}else{let a,o;if(typeof e==`string`)if(r=e,o=n,e===`string`){if(!Array.isArray(t))throw TypeError(`A string tensor's data must be a string array.`);a=t}else{let n=ae.get(e);if(n===void 0)throw TypeError(`Unsupported tensor type: ${e}.`);if(Array.isArray(t)){if(e===`float16`&&n===Uint16Array||e===`uint4`||e===`int4`)throw TypeError(`Creating a ${e} tensor from number array is not supported. Please use ${n.name} as data.`);a=e===`uint64`||e===`int64`?n.from(t,BigInt):n.from(t)}else if(t instanceof n)a=t;else if(t instanceof Uint8ClampedArray)if(e===`uint8`)a=Uint8Array.from(t);else throw TypeError(`A Uint8ClampedArray tensor's data must be type of uint8`);else if(e===`float16`&&t instanceof Uint16Array&&n!==Uint16Array)a=new globalThis.Float16Array(t.buffer,t.byteOffset,t.length);else throw TypeError(`A ${r} tensor's data must be type of ${n}`)}else if(o=t,Array.isArray(e)){if(e.length===0)throw TypeError(`Tensor type cannot be inferred from an empty array.`);let t=typeof e[0];if(t===`string`)r=`string`,a=e;else if(t===`boolean`)r=`bool`,a=Uint8Array.from(e);else throw TypeError(`Invalid element type of data array: ${t}.`)}else if(e instanceof Uint8ClampedArray)r=`uint8`,a=Uint8Array.from(e);else{let t=oe.get(e.constructor);if(t===void 0)throw TypeError(`Unsupported type for tensor data: ${e.constructor}.`);r=t,a=e}if(o===void 0)o=[a.length];else if(!Array.isArray(o))throw TypeError(`A tensor's dims must be a number array`);i=o,this.cpuData=a,this.dataLocation=`cpu`}let a=le(i);if(this.cpuData&&a!==this.cpuData.length&&!((r===`uint4`||r===`int4`)&&Math.ceil(a/2)===this.cpuData.length))throw Error(`Tensor's size(${a}) does not match data length(${this.cpuData.length}).`);this.type=r,this.dims=i,this.size=a}static async fromImage(e,t){return te(e,t)}static fromTexture(e,t){return ne(e,t)}static fromGpuBuffer(e,t){return re(e,t)}static fromMLTensor(e,t){return ie(e,t)}static fromPinnedBuffer(e,t,n){return A(e,t,n)}toDataURL(e){return O(this,e)}toImageData(e){return ee(this,e)}get data(){if(this.ensureValid(),!this.cpuData)throw Error("The data is not on CPU. Use `getData()` to download GPU data to CPU, or use `texture` or `gpuBuffer` property to access the GPU data directly.");return this.cpuData}get location(){return this.dataLocation}get texture(){if(this.ensureValid(),!this.gpuTextureData)throw Error(`The data is not stored as a WebGL texture.`);return this.gpuTextureData}get gpuBuffer(){if(this.ensureValid(),!this.gpuBufferData)throw Error(`The data is not stored as a WebGPU buffer.`);return this.gpuBufferData}get mlTensor(){if(this.ensureValid(),!this.mlTensorData)throw Error(`The data is not stored as a WebNN MLTensor.`);return this.mlTensorData}async getData(e){switch(this.ensureValid(),this.dataLocation){case`cpu`:case`cpu-pinned`:return this.data;case`texture`:case`gpu-buffer`:case`ml-tensor`:if(!this.downloader)throw Error(`The current tensor is not created with a specified data downloader.`);if(this.isDownloading)throw Error(`The current tensor is being downloaded.`);try{this.isDownloading=!0;let t=await this.downloader();return this.downloader=void 0,this.dataLocation=`cpu`,this.cpuData=t,e&&this.disposer&&(this.disposer(),this.disposer=void 0),t}finally{this.isDownloading=!1}default:throw Error(`cannot get data from location: ${this.dataLocation}`)}}dispose(){if(this.isDownloading)throw Error(`The current tensor is being downloaded.`);this.disposer&&(this.disposer(),this.disposer=void 0),this.cpuData=void 0,this.gpuTextureData=void 0,this.gpuBufferData=void 0,this.mlTensorData=void 0,this.downloader=void 0,this.isDownloading=void 0,this.dataLocation=`none`}ensureValid(){if(this.dataLocation===`none`)throw Error(`The tensor is disposed.`)}reshape(e){if(this.ensureValid(),this.downloader||this.disposer)throw Error(`Cannot reshape a tensor that owns GPU resource.`);return ue(this,e)}};const M=j,de=(e,t)=>{(E.trace===void 0?!E.wasm.trace:!E.trace)||console.timeStamp(`${e}::ORT::${t}`)},fe=(e,t)=>{var n;let r=(n=Error().stack)?.split(/\r\n|\r|\n/g)||[],i=!1;for(let n=0;n{(E.trace===void 0?!E.wasm.trace:!E.trace)||fe(`BEGIN`,e)},N=e=>{(E.trace===void 0?!E.wasm.trace:!E.trace)||fe(`END`,e)};var P=class e{constructor(e){this.handler=e}async run(e,t,n){pe();let r={},i={};if(typeof e!=`object`||!e||e instanceof M||Array.isArray(e))throw TypeError(`'feeds' must be an object that use input names as keys and OnnxValue as corresponding values.`);let a=!0;if(typeof t==`object`){if(t===null)throw TypeError(`Unexpected argument[1]: cannot be null.`);if(t instanceof M)throw TypeError(`'fetches' cannot be a Tensor`);if(Array.isArray(t)){if(t.length===0)throw TypeError(`'fetches' cannot be an empty array.`);a=!1;for(let e of t){if(typeof e!=`string`)throw TypeError(`'fetches' must be a string array or an object.`);if(this.outputNames.indexOf(e)===-1)throw RangeError(`'fetches' contains invalid output name: ${e}.`);r[e]=null}if(typeof n==`object`&&n)i=n;else if(n!==void 0)throw TypeError(`'options' must be an object.`)}else{let e=!1,o=Object.getOwnPropertyNames(t);for(let n of this.outputNames)if(o.indexOf(n)!==-1){let i=t[n];(i===null||i instanceof M)&&(e=!0,a=!1,r[n]=i)}if(e){if(typeof n==`object`&&n)i=n;else if(n!==void 0)throw TypeError(`'options' must be an object.`)}else i=t}}else if(t!==void 0)throw TypeError(`Unexpected argument[1]: must be 'fetches' or 'options'.`);for(let t of this.inputNames)if(e[t]===void 0)throw Error(`input '${t}' is missing in 'feeds'.`);if(a)for(let e of this.outputNames)r[e]=null;let o=await this.handler.run(e,r,i),s={};for(let e in o)if(Object.hasOwnProperty.call(o,e)){let t=o[e];t instanceof M?s[e]=t:s[e]=new M(t.type,t.data,t.dims)}return N(),s}async release(){return this.handler.dispose()}static async create(t,n,r,i){pe();let a,o={};if(typeof t==`string`){if(a=t,typeof n==`object`&&n)o=n;else if(n!==void 0)throw TypeError(`'options' must be an object.`)}else if(t instanceof Uint8Array){if(a=t,typeof n==`object`&&n)o=n;else if(n!==void 0)throw TypeError(`'options' must be an object.`)}else if(t instanceof ArrayBuffer||typeof SharedArrayBuffer<`u`&&t instanceof SharedArrayBuffer){let e=t,s=0,c=t.byteLength;if(typeof n==`object`&&n)o=n;else if(typeof n==`number`){if(s=n,!Number.isSafeInteger(s))throw RangeError(`'byteOffset' must be an integer.`);if(s<0||s>=e.byteLength)throw RangeError(`'byteOffset' is out of range [0, ${e.byteLength}).`);if(c=t.byteLength-s,typeof r==`number`){if(c=r,!Number.isSafeInteger(c))throw RangeError(`'byteLength' must be an integer.`);if(c<=0||s+c>e.byteLength)throw RangeError(`'byteLength' is out of range (0, ${e.byteLength-s}].`);if(typeof i==`object`&&i)o=i;else if(i!==void 0)throw TypeError(`'options' must be an object.`)}else if(r!==void 0)throw TypeError(`'byteLength' must be a number.`)}else if(n!==void 0)throw TypeError(`'options' must be an object.`);a=new Uint8Array(e,s,c)}else throw TypeError(`Unexpected argument[0]: must be 'path' or 'buffer'.`);let[s,c]=await C(o),l=await s.createInferenceSessionHandler(a,c);return N(),new e(l)}startProfiling(){this.handler.startProfiling()}endProfiling(){this.handler.endProfiling()}get inputNames(){return this.handler.inputNames}get outputNames(){return this.handler.outputNames}get inputMetadata(){return this.handler.inputMetadata}get outputMetadata(){return this.handler.outputMetadata}};const F=P;var I={};n(I,{InferenceSession:()=>F,TRACE:()=>de,TRACE_FUNC_BEGIN:()=>pe,TRACE_FUNC_END:()=>N,Tensor:()=>M,env:()=>D,registerBackend:()=>x});var me={};n(me,{InferenceSession:()=>ut,TRACE:()=>rt,TRACE_FUNC_BEGIN:()=>at,TRACE_FUNC_END:()=>ot,Tensor:()=>tt,default:()=>Sf,env:()=>R,registerBackend:()=>Te}); /*! * ONNX Runtime Web v1.22.0-dev.20250409-89f8206ba4 * Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/assets/chat-BCi2y2TP.js b/assets/chat-D2Dw5H7W.js similarity index 99% rename from assets/chat-BCi2y2TP.js rename to assets/chat-D2Dw5H7W.js index b9de94e836c68ce0ed325846dbd36c993d131aea..a0de3ca0f2aff633647ea697ac14af3d131ebf2b 100644 --- a/assets/chat-BCi2y2TP.js +++ b/assets/chat-D2Dw5H7W.js @@ -1,3 +1,3 @@ -var e=function(exports){function t(e,t,n){if(typeof e==`function`?e===t:e.has(t))return arguments.length<3?t:n;throw TypeError(`Private element is not present on this object`)}function n(e,n,r){return e.set(t(e,n),r),r}function r(e,t){if(t.has(e))throw TypeError(`Cannot initialize the same private elements twice on an object`)}function i(e,t,n){r(e,t),t.set(e,n)}function a(e,n){return e.get(t(e,n))}return exports.classPrivateFieldGet2=a,exports.classPrivateFieldInitSpec=i,exports.classPrivateFieldSet2=n,exports}({});import{Fragment as t,createBaseVNode as n,createCommentVNode as r,createElementBlock as i,defineComponent as a,isRef as o,openBlock as s,ref as c,renderList as l,toDisplayString as u,toRaw as d,unref as f,useLocalStorage as p,vModelText as m,withDirectives as h}from"./index-CuCRViVh.js";import{streamText as g}from"./dist-Cr2QBfS4.js";var _,v,y;let b;const x=()=>{let e=null;return{getStore:()=>(e===null&&console.warn("Woops! Looks like you are calling `getContext` after `await fn()`. Please move `getContext` to top level of handler."),e),run(t,n){e=t;try{return n()}finally{e=null}}}},S=new WeakMap,C=new WeakMap;let w=0,T=0;const E=e=>{let t=`${w++}`,n={debugLabel:e?.debugLabel??t,include:e=>r.has(e),with:i=>{let a=`${T++}`,o={[Symbol.toStringTag]:e?.debugLabel??`WorkflowEvent(${t}.${a})`,toString:()=>e?.debugLabel?e.debugLabel:`WorkflowEvent(${t}.${a})`,toJSON:()=>({type:e?.debugLabel?e.debugLabel:t,data:i}),get data(){return i}};return r.add(o),C.set(o,n),o}},r=new WeakSet;S.set(n,r),Object.defineProperty(n,Symbol.toStringTag,{get:()=>n?.debugLabel??`WorkflowEvent<${t}>`}),Object.defineProperty(n,`displayName`,{value:n?.debugLabel??`WorkflowEvent<${t}>`});let i=e?.uniqueId;return Object.defineProperty(n,`uniqueId`,{get:()=>(i||=t,i),set:()=>{throw Error(`uniqueId is readonly`)}}),n.toString=()=>e?.debugLabel??`WorkflowEvent<${t}>`,n},D=e=>typeof e==`object`&&e?S.has(e):!1,O=e=>typeof e==`object`&&e?C.get(e):void 0,k=e=>typeof e==`object`&&!!e&&`data`in e,A=e=>e!=null&&typeof e.then==`function`;function j(e,t){let n=Array(e.length);for(let r of t)for(let t=0;t(e.add(t),()=>{e.delete(t)}),publish:(...t)=>{let n=[];for(let r of e)n.push(r(...t));return n}};return M.set(t,e),t}var F=class extends TransformStream{constructor(){super({transform:(e,t)=>{O(e)&&t.enqueue(JSON.stringify({data:e.data,uniqueId:O(e).uniqueId})+` +var e=function(exports){function t(e,t,n){if(typeof e==`function`?e===t:e.has(t))return arguments.length<3?t:n;throw TypeError(`Private element is not present on this object`)}function n(e,n,r){return e.set(t(e,n),r),r}function r(e,t){if(t.has(e))throw TypeError(`Cannot initialize the same private elements twice on an object`)}function i(e,t,n){r(e,t),t.set(e,n)}function a(e,n){return e.get(t(e,n))}return exports.classPrivateFieldGet2=a,exports.classPrivateFieldInitSpec=i,exports.classPrivateFieldSet2=n,exports}({});import{Fragment as t,createBaseVNode as n,createCommentVNode as r,createElementBlock as i,defineComponent as a,isRef as o,openBlock as s,ref as c,renderList as l,toDisplayString as u,toRaw as d,unref as f,useLocalStorage as p,vModelText as m,withDirectives as h}from"./index-CsmT0L1K.js";import{streamText as g}from"./dist-Cr2QBfS4.js";var _,v,y;let b;const x=()=>{let e=null;return{getStore:()=>(e===null&&console.warn("Woops! Looks like you are calling `getContext` after `await fn()`. Please move `getContext` to top level of handler."),e),run(t,n){e=t;try{return n()}finally{e=null}}}},S=new WeakMap,C=new WeakMap;let w=0,T=0;const E=e=>{let t=`${w++}`,n={debugLabel:e?.debugLabel??t,include:e=>r.has(e),with:i=>{let a=`${T++}`,o={[Symbol.toStringTag]:e?.debugLabel??`WorkflowEvent(${t}.${a})`,toString:()=>e?.debugLabel?e.debugLabel:`WorkflowEvent(${t}.${a})`,toJSON:()=>({type:e?.debugLabel?e.debugLabel:t,data:i}),get data(){return i}};return r.add(o),C.set(o,n),o}},r=new WeakSet;S.set(n,r),Object.defineProperty(n,Symbol.toStringTag,{get:()=>n?.debugLabel??`WorkflowEvent<${t}>`}),Object.defineProperty(n,`displayName`,{value:n?.debugLabel??`WorkflowEvent<${t}>`});let i=e?.uniqueId;return Object.defineProperty(n,`uniqueId`,{get:()=>(i||=t,i),set:()=>{throw Error(`uniqueId is readonly`)}}),n.toString=()=>e?.debugLabel??`WorkflowEvent<${t}>`,n},D=e=>typeof e==`object`&&e?S.has(e):!1,O=e=>typeof e==`object`&&e?C.get(e):void 0,k=e=>typeof e==`object`&&!!e&&`data`in e,A=e=>e!=null&&typeof e.then==`function`;function j(e,t){let n=Array(e.length);for(let r of t)for(let t=0;t(e.add(t),()=>{e.delete(t)}),publish:(...t)=>{let n=[];for(let r of e)n.push(r(...t));return n}};return M.set(t,e),t}var F=class extends TransformStream{constructor(){super({transform:(e,t)=>{O(e)&&t.enqueue(JSON.stringify({data:e.data,uniqueId:O(e).uniqueId})+` `)}})}},I=(_=new WeakMap,class extends TransformStream{constructor(t){super({transform:(t,n)=>{let r=t.split(` `).map(e=>e.trim()).filter(e=>e.length>0);r.forEach(t=>{let r=JSON.parse(t),i=Object.values(e.classPrivateFieldGet2(_,this)).find(e=>e.uniqueId===r.uniqueId);if(i){let e=i.with(r.data);n.enqueue(e)}else console.warn(`Unknown event: ${r.uniqueId}`)})}}),e.classPrivateFieldInitSpec(this,_,void 0),e.classPrivateFieldSet2(_,this,t)}}),L=(v=new WeakMap,y=new WeakMap,b=Symbol.asyncIterator,class t extends ReadableStream{on(t,n){return e.classPrivateFieldGet2(y,this).subscribe(e=>{t.include(e)&&n(e)})}constructor(t,n){if(!t&&!n)throw TypeError(`Either subscribable or root stream must be provided`);if(super(),e.classPrivateFieldInitSpec(this,v,void 0),e.classPrivateFieldInitSpec(this,y,void 0),t){e.classPrivateFieldSet2(y,this,t);let r;e.classPrivateFieldSet2(v,this,n??new ReadableStream({start:e=>{r=t.subscribe(t=>{e.enqueue(t)})},cancel:()=>{r()}}))}else{e.classPrivateFieldSet2(y,this,P()),e.classPrivateFieldSet2(v,this,n.pipeThrough(new TransformStream({transform:(t,n)=>{e.classPrivateFieldGet2(y,this).publish(t),n.enqueue(t)}})));return}}static fromReadableStream(e){return new t(null,e.pipeThrough(new TransformStream({transform:(e,t)=>{t.enqueue(e)}})))}static fromResponse(e,n){let r=e.body;if(!r)throw Error(`Response body is not readable`);return new t(null,r.pipeThrough(new TextDecoderStream).pipeThrough(new I(n)))}toResponse(t,n=new F){return new Response(e.classPrivateFieldGet2(v,this).pipeThrough(n).pipeThrough(new TextEncoderStream),t)}get locked(){return e.classPrivateFieldGet2(v,this).locked}[b](){return e.classPrivateFieldGet2(v,this)[Symbol.asyncIterator]()}cancel(t){return e.classPrivateFieldGet2(v,this).cancel(t)}getReader(){return e.classPrivateFieldGet2(v,this).getReader()}pipeThrough(n,r){let i=e.classPrivateFieldGet2(v,this).pipeThrough(n,r);return new t(null,i)}pipeTo(t,n){return e.classPrivateFieldGet2(v,this).pipeTo(t,n)}tee(){let[n,r]=e.classPrivateFieldGet2(v,this).tee();return[new t(e.classPrivateFieldGet2(y,this),n),new t(e.classPrivateFieldGet2(y,this),r)]}forEach(t){return e.classPrivateFieldGet2(v,this).pipeTo(new WritableStream({write:e=>{t(e)}}))}map(e){return this.pipeThrough(new TransformStream({transform:(t,n)=>{n.enqueue(e(t))}}))}values(t){return e.classPrivateFieldGet2(v,this).values(t)}take(e){let t=0;return this.pipeThrough(new TransformStream({transform:(n,r)=>{t=e&&r.terminate()}}))}filter(e){return this.pipeThrough(new TransformStream({transform:(t,n)=>{(typeof e==`function`?e(t):D(e)?e.include(t):e===t)&&n.enqueue(t)}}))}until(e){return this.pipeThrough(new TransformStream({transform:(t,n)=>{n.enqueue(t),(typeof e==`function`?e(t):D(e)?e.include(t):e===t)&&n.terminate()}}))}async toArray(){let e=[];return await this.pipeTo(new WritableStream({write:t=>{e.push(t)}})),e}});const R=x();function z(){let e=R.getStore();if(!e)throw Error(`No current context found`);return e}const B=x(),V=new WeakMap,H=({listeners:e})=>{let t=[],n=(e,t,n,r)=>{let c,l={get abortController(){return c||=new AbortController,c},async:`constructor`in e?e.constructor.name===`AsyncFunction`:!1,pending:null,handler:e,inputEvents:t,inputs:n,outputs:[],prev:r,next:new Set,get root(){return o}};l.prev.next.add(l);let u=i(l);B.run(l,()=>{let e=[...new Set([...N(s.__internal__call_context),...N(u.__internal__call_context)])];R.run(u,()=>{let t=0,n=r=>{if(t===e.length){let e;try{e=r.handler(...r.inputs)}catch(e){if(c??a)(c??a).abort(e);else throw console.error(`unhandled error in handler`,e),e}A(e)?(l.async=!0,l.pending=e.then(e=>(k(e)&&u.sendEvent(e),e))):k(e)&&u.sendEvent(e)}let i=e[t];i&&(t++,i(r,n))};n(l)})})},r=r=>{let i=[...t];[...e].filter(([e])=>{let t=j(e,i);return t.length===e.length}).map(([e,a])=>{let o=j(e,i);o.forEach(e=>{t.splice(t.indexOf(e),1)});for(let t of a)n(t,e,o,r)})},i=e=>{let n=null;return{get stream(){if(!n){let t=P();s.__internal__call_send_event.subscribe(n=>{let r=V.get(n);for(;r;){if(r===e){t.publish(n);break}r=r.prev}}),n=new L(t,null)}return n},get signal(){return e.abortController.signal},sendEvent:(...n)=>{n.forEach(n=>{V.set(n,e),e.outputs.push(n),t.push(n),s.__internal__call_send_event.publish(n,e),r(e)})},__internal__call_context:P(),__internal__call_send_event:P()}},a=new AbortController,o={get abortController(){return a||=new AbortController,a},async:!1,pending:null,inputEvents:[],inputs:[],outputs:[],handler:null,prev:null,next:new Set,get root(){return o}},s=i(o);return s},U=()=>{let e={steps:new Map};return{handle:(t,n)=>{if(e.steps.has(t)){let r=e.steps.get(t);r.add(n)}else{let r=new Set;r.add(n),e.steps.set(t,r)}},createContext(){return H({listeners:e.steps})}}};function W(e,t){let n=(...e)=>{let n=t.filter(([t])=>t.every((t,n)=>t.include(e[n]))).map(([e,t])=>t),r=z(),i=r.sendEvent;return(...e)=>{for(let t=0;tt.include(e[n])))return i(...e)}return console.warn(`Invalid input detected [%s]`,e.map(e=>e.data).join(`, `)),i(...e)}};return{...e,strictHandle:(t,n)=>{let r=(...e)=>{let t=z();return n(t.safeSendEvent,...e)};return e.handle(t,r)},createContext(){let t=e.createContext();return t.__internal__call_context.subscribe((e,t)=>{z().safeSendEvent=n(...e.inputs),t(e)}),t}}}async function G(e,t,n){let{stream:r,sendEvent:i}=e.createContext();i(t);let a=(await r.until(n).toArray()).at(-1);if(!a)throw Error(`No output event received`);return a}const K={flex:``,"flex-col":``,"gap-2":``},q={flex:`~ col`,"gap-2":``},J={flex:``,"flex-col":``,"gap-2":``},Y={grid:``,"grid-cols-2":``,"gap-2":``},X={flex:``,"items-center":``,"gap-2":``},Z={flex:``,"items-center":``,"gap-2":``},Q={flex:``,"items-center":``,"gap-2":``},$={key:0},ee={key:1};var te=a({__name:`chat`,setup(e){let a=p(`settings/llm/baseUrl`,`https://openrouter.ai/api/v1/`),_=p(`settings/llm/apiKey`,``),v=p(`settings/llm/model`,`openai/gpt-4o-mini`),y=c(``),b=c([]),x=c({role:`assistant`,content:``}),S=c(!1),C=E(),w=E(),T=E(),D=E(),O=E();async function k(){S.value=!0;try{let e=W(U(),[[[C],[w,O]],[[w],[T]],[[T],[D]]]);e.handle([C],async()=>{let{sendEvent:t}=e.createContext();x.value={role:`assistant`,content:``},b.value.push({role:`user`,content:y.value}),b.value.push(x.value);let n=await g({baseURL:a.value,apiKey:_.value,model:v.value,messages:b.value.slice(0,b.value.length-1).map(e=>d(e))});for await(let e of n.chunkStream)t(w.with(e.choices[0].delta.content||``));return O.with()}),e.handle([w],async e=>{x.value.content?x.value.content+=e.data:x.value.content=e.data}),await G(e,C.with(),O)}catch(e){console.error(e)}finally{S.value=!1}}return(e,c)=>(s(),i(`div`,K,[n(`div`,q,[n(`div`,J,[c[7]||=n(`div`,null,[n(`span`,{"text-neutral-500":``,"dark:text-neutral-400":``},`LLM`)],-1),n(`div`,Y,[n(`label`,X,[c[4]||=n(`span`,{"text-nowrap":``},` Base URL `,-1),h(n(`input`,{"onUpdate:modelValue":c[0]||=e=>o(a)?a.value=e:null,border:`focus:primary-100 dark:focus:primary-400/50 2 solid neutral-200 dark:neutral-800`,transition:`all duration-200 ease-in-out`,text:`disabled:neutral-400 dark:disabled:neutral-600`,cursor:`disabled:not-allowed`,"w-full":``,"rounded-lg":``,"px-2":``,"py-1":``,"text-nowrap":``,"text-sm":``,"outline-none":``,shadow:`sm`,bg:`neutral-100 dark:neutral-800 focus:neutral-50 dark:focus:neutral-900`},null,512),[[m,f(a)]])]),n(`label`,Z,[c[5]||=n(`span`,{"text-nowrap":``},` API Key `,-1),h(n(`input`,{"onUpdate:modelValue":c[1]||=e=>o(_)?_.value=e:null,type:`password`,border:`focus:primary-100 dark:focus:primary-400/50 2 solid neutral-200 dark:neutral-800`,transition:`all duration-200 ease-in-out`,text:`disabled:neutral-400 dark:disabled:neutral-600`,cursor:`disabled:not-allowed`,"w-full":``,"rounded-lg":``,"px-2":``,"py-1":``,"text-nowrap":``,"text-sm":``,"outline-none":``,shadow:`sm`,bg:`neutral-100 dark:neutral-800 focus:neutral-50 dark:focus:neutral-900`},null,512),[[m,f(_)]])]),n(`label`,Q,[c[6]||=n(`span`,{"text-nowrap":``},` Model `,-1),h(n(`input`,{"onUpdate:modelValue":c[2]||=e=>o(v)?v.value=e:null,border:`focus:primary-100 dark:focus:primary-400/50 2 solid neutral-200 dark:neutral-800`,transition:`all duration-200 ease-in-out`,text:`disabled:neutral-400 dark:disabled:neutral-600`,cursor:`disabled:not-allowed`,"w-full":``,"rounded-lg":``,"px-2":``,"py-1":``,"text-nowrap":``,"text-sm":``,"outline-none":``,shadow:`sm`,bg:`neutral-100 dark:neutral-800 focus:neutral-50 dark:focus:neutral-900`},null,512),[[m,f(v)]])])])]),n(`div`,null,[h(n(`textarea`,{"onUpdate:modelValue":c[3]||=e=>y.value=e,border:`focus:primary-100 dark:focus:primary-400/50 2 solid neutral-200 dark:neutral-800`,transition:`all duration-200 ease-in-out`,text:`disabled:neutral-400 dark:disabled:neutral-600`,cursor:`disabled:not-allowed`,"w-full":``,"rounded-lg":``,"px-2":``,"py-1":``,"text-nowrap":``,"text-sm":``,"outline-none":``,shadow:`sm`,bg:`neutral-100 dark:neutral-800 focus:neutral-50 dark:focus:neutral-900`},null,512),[[m,y.value]])]),n(`button`,{"rounded-lg":``,bg:`blue-100 dark:blue-900`,"px-4":``,"py-2":``,onClick:k},` Send `),n(`div`,null,[(s(!0),i(t,null,l(b.value,(e,t)=>(s(),i(`div`,{key:t},[e.role===`user`?(s(),i(`div`,$,[n(`span`,null,u(e.content),1)])):r(``,!0),e.role===`assistant`?(s(),i(`div`,ee,[n(`span`,null,u(e.content),1)])):r(``,!0)]))),128))])])]))}}),ne=te;export{ne as default}; \ No newline at end of file diff --git a/assets/cloudflare-workers-ai-Boy6ApbV.js b/assets/cloudflare-workers-ai-CRLVRFV3.js similarity index 84% rename from assets/cloudflare-workers-ai-Boy6ApbV.js rename to assets/cloudflare-workers-ai-CRLVRFV3.js index 5041d9d49d64c86852bb1bba37ffce96fee3097c..03cb7a3e1bd082e72afc1c394055af781de33f0d 100644 --- a/assets/cloudflare-workers-ai-Boy6ApbV.js +++ b/assets/cloudflare-workers-ai-CRLVRFV3.js @@ -1 +1 @@ -import{computed as e,createBlock as t,createVNode as n,defineComponent as r,onMounted as i,openBlock as a,storeToRefs as o,unref as s,useI18n as c,useRouter as l,watch as u,withCtx as d}from"./index-CuCRViVh.js";import"./import-url-browser-DNuYZxPr.js";import"./duckdb-mvp-C3i5IjU8.js";import"./index-CISmcbXk-BkTeNOgG.js";import"./types-AwjH7X1C.js";import{useProvidersStore as f}from"./stores-m0eA85gd.js";import"./__vite-browser-external-CCfYMxZl.js";import"./Button-DFhzbYVt.js";import"./src-C2QbIOor.js";import{ProviderAccountIdInput_default as p,ProviderApiKeyInput_default as m,ProviderBasicSettings_default as h,ProviderSettingsContainer_default as g,ProviderSettingsLayout_default as _}from"./components-BFLl4u81.js";import"./composables-Cgvkd8lL.js";import"./sleep-CvjNLutj.js";import"./queue-DAKPJQl1.js";import"./queues-Dstwm1VQ.js";import"./dist-Cr2QBfS4.js";import"./webgpu-Nt9hTBpW.js";import{route_block_default as v}from"./route-block-DNPbw0zT.js";const y=`cloudflare-workers-ai`;var b=r({__name:`cloudflare-workers-ai`,setup(r){let{t:v}=c(),b=l(),x=f(),{providers:S}=o(x),C=e(()=>x.getProviderMetadata(y)),w=e({get:()=>{var e;return(e=S.value[y])?.apiKey||``},set:e=>{S.value[y]||(S.value[y]={}),S.value[y].apiKey=e}}),T=e({get:()=>{var e;return(e=S.value[y])?.accountId||``},set:e=>{S.value[y]||(S.value[y]={}),S.value[y].accountId=e}});i(()=>{var e,t;x.initializeProvider(y),w.value=(e=S.value[y])?.apiKey||``,T.value=(t=S.value[y])?.accountId||``}),u([w,T],()=>{S.value[y]={...S.value[y],apiKey:w.value,accountId:T.value}});function E(){var e;S.value[y]={...(e=C.value)?.defaultOptions}}return(e,r)=>{var i,o;return a(),t(s(_),{"provider-name":(i=C.value)?.localizedName,"provider-icon-color":(o=C.value)?.iconColor,"on-back":()=>s(b).back()},{default:d(()=>[n(s(g),null,{default:d(()=>[n(s(h),{title:s(v)(`settings.pages.providers.common.section.basic.title`),description:s(v)(`settings.pages.providers.common.section.basic.description`),"on-reset":E},{default:d(()=>{var e;return[n(s(m),{modelValue:w.value,"onUpdate:modelValue":r[0]||=e=>w.value=e,"provider-name":(e=C.value)?.localizedName,placeholder:s(v)(`settings.pages.providers.provider.cloudflare-workers-ai.fields.field.api-key.placeholder`)},null,8,[`modelValue`,`provider-name`,`placeholder`]),n(s(p),{modelValue:T.value,"onUpdate:modelValue":r[1]||=e=>T.value=e,label:s(v)(`settings.pages.providers.provider.cloudflare-workers-ai.fields.field.account-id.label`),description:s(v)(`settings.pages.providers.provider.cloudflare-workers-ai.fields.field.account-id.description`),placeholder:s(v)(`settings.pages.providers.provider.cloudflare-workers-ai.fields.field.account-id.placeholder`)},null,8,[`modelValue`,`label`,`description`,`placeholder`])]}),_:1},8,[`title`,`description`])]),_:1})]),_:1},8,[`provider-name`,`provider-icon-color`,`on-back`])}}});typeof v==`function`&&v(b);var x=b;export{x as default}; \ No newline at end of file +import{computed as e,createBlock as t,createVNode as n,defineComponent as r,onMounted as i,openBlock as a,storeToRefs as o,unref as s,useI18n as c,useRouter as l,watch as u,withCtx as d}from"./index-CsmT0L1K.js";import"./import-url-browser-DNuYZxPr.js";import"./duckdb-mvp-C3i5IjU8.js";import"./index-CISmcbXk-C9oju49Y.js";import"./types-AwjH7X1C.js";import{useProvidersStore as f}from"./stores-2H61GqXP.js";import"./__vite-browser-external-DPh5tFvT.js";import"./Button-D3cjyOEe.js";import"./src-C1Sr0aqN.js";import{ProviderAccountIdInput_default as p,ProviderApiKeyInput_default as m,ProviderBasicSettings_default as h,ProviderSettingsContainer_default as g,ProviderSettingsLayout_default as _}from"./components-DHUA669a.js";import"./composables-CgcEyUWo.js";import"./sleep-CvjNLutj.js";import"./queue-B0kER5Ap.js";import"./queues-hSEKEE3F.js";import"./dist-Cr2QBfS4.js";import"./webgpu-Nt9hTBpW.js";import{route_block_default as v}from"./route-block-DNPbw0zT.js";const y=`cloudflare-workers-ai`;var b=r({__name:`cloudflare-workers-ai`,setup(r){let{t:v}=c(),b=l(),x=f(),{providers:S}=o(x),C=e(()=>x.getProviderMetadata(y)),w=e({get:()=>{var e;return(e=S.value[y])?.apiKey||``},set:e=>{S.value[y]||(S.value[y]={}),S.value[y].apiKey=e}}),T=e({get:()=>{var e;return(e=S.value[y])?.accountId||``},set:e=>{S.value[y]||(S.value[y]={}),S.value[y].accountId=e}});i(()=>{var e,t;x.initializeProvider(y),w.value=(e=S.value[y])?.apiKey||``,T.value=(t=S.value[y])?.accountId||``}),u([w,T],()=>{S.value[y]={...S.value[y],apiKey:w.value,accountId:T.value}});function E(){var e;S.value[y]={...(e=C.value)?.defaultOptions}}return(e,r)=>{var i,o;return a(),t(s(_),{"provider-name":(i=C.value)?.localizedName,"provider-icon-color":(o=C.value)?.iconColor,"on-back":()=>s(b).back()},{default:d(()=>[n(s(g),null,{default:d(()=>[n(s(h),{title:s(v)(`settings.pages.providers.common.section.basic.title`),description:s(v)(`settings.pages.providers.common.section.basic.description`),"on-reset":E},{default:d(()=>{var e;return[n(s(m),{modelValue:w.value,"onUpdate:modelValue":r[0]||=e=>w.value=e,"provider-name":(e=C.value)?.localizedName,placeholder:s(v)(`settings.pages.providers.provider.cloudflare-workers-ai.fields.field.api-key.placeholder`)},null,8,[`modelValue`,`provider-name`,`placeholder`]),n(s(p),{modelValue:T.value,"onUpdate:modelValue":r[1]||=e=>T.value=e,label:s(v)(`settings.pages.providers.provider.cloudflare-workers-ai.fields.field.account-id.label`),description:s(v)(`settings.pages.providers.provider.cloudflare-workers-ai.fields.field.account-id.description`),placeholder:s(v)(`settings.pages.providers.provider.cloudflare-workers-ai.fields.field.account-id.placeholder`)},null,8,[`modelValue`,`label`,`description`,`placeholder`])]}),_:1},8,[`title`,`description`])]),_:1})]),_:1},8,[`provider-name`,`provider-icon-color`,`on-back`])}}});typeof v==`function`&&v(b);var x=b;export{x as default}; \ No newline at end of file diff --git a/assets/color-scheme-CIOGKOoo.js b/assets/color-scheme-Bys-iM2D.js similarity index 90% rename from assets/color-scheme-CIOGKOoo.js rename to assets/color-scheme-Bys-iM2D.js index 25347d0360b0a710163ad6440280504aae71377a..6480d15497d23846046e9653c3419e94c5487cb8 100644 --- a/assets/color-scheme-CIOGKOoo.js +++ b/assets/color-scheme-Bys-iM2D.js @@ -1 +1 @@ -import{Fragment as e,__plugin_vue_export_helper_default as t,createBaseVNode as n,createBlock as r,createElementBlock as i,createTextVNode as a,createVNode as o,defineComponent as s,openBlock as c,renderList as l,resolveDirective as u,toDisplayString as d,unref as f,useI18n as p,useSettings as m,vModelCheckbox as h,withCtx as g,withDirectives as _}from"./index-CuCRViVh.js";import"./import-url-browser-DNuYZxPr.js";import"./duckdb-mvp-C3i5IjU8.js";import"./index-CISmcbXk-BkTeNOgG.js";import"./types-AwjH7X1C.js";import"./stores-m0eA85gd.js";import"./__vite-browser-external-CCfYMxZl.js";import"./Button-DFhzbYVt.js";import{ColorHueRange_default as v}from"./src-C2QbIOor.js";import"./dist-B4cQ-m7C.js";import{Section_default as y}from"./components-BFLl4u81.js";import"./composables-Cgvkd8lL.js";import"./sleep-CvjNLutj.js";import"./queue-DAKPJQl1.js";import"./queues-Dstwm1VQ.js";import"./dist-Cr2QBfS4.js";import"./webgpu-Nt9hTBpW.js";import{route_block_default as b}from"./route-block-DNPbw0zT.js";import{ColorPalette_default as x}from"./ColorPalette-ZPdCD-E3.js";var S=[[],[`#A5978B`,`#D8CAAF`,`#B8B4A7`,`#C4BCB1`,`#E5DED8`,`#9A8F7D`,`#BEB5A7`,`#C9C0B6`],[`#7A9EAF`,`#B8C7CC`,`#D4B79C`,`#8B9D77`,`#C7D5CB`,`#E6D0B1`,`#94A7B1`,`#B4C8C3`],[`#D9B48F`,`#B5917A`,`#8C7A6B`,`#A17F5F`,`#B98C46`,`#C7A252`,`#DAB300`,`#D19826`],[`#9BA7B0`,`#C1CBD4`,`#A5ADB6`,`#8B959E`,`#D4DCE4`,`#7F8A94`,`#B3BCC6`,`#98A4AE`],[`#E4C6D0`,`#A61B29`,`#5D513C`,`#789262`,`#1C0D1A`,`#F7C242`,`#62A9DD`,`#8C4B3C`]];const C={flex:``,"items-center":``,"justify-between":``,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:300,delay:5*50,transition:`all ease-in-out duration-250`},w={"text-lg":``,"font-normal":``},T={relative:``,flex:``,"cursor-pointer":``,"items-center":``,"gap-2":``},E={class:`color-bar`,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:320,delay:7*50,transition:`all ease-in-out duration-250`},D={"text-white":``,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:330,delay:8*50,transition:`all ease-in-out duration-250`},O={class:`color-bar transparency-grid`,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:340,delay:9*50,transition:`all ease-in-out duration-250`},k=[`duration`,`delay`],A={"font-medium":``},j={text:`sm neutral-500`},M={text:`neutral-200/50 dark:neutral-600/20`,"pointer-events-none":``,fixed:``,top:`[65dvh]`,"right--15":``,"z--1":``,initial:{scale:.9,opacity:0,rotate:30},enter:{scale:1,opacity:1,rotate:0},duration:250,flex:``,"items-center":``,"justify-center":``};var N=s({__name:`color-scheme`,setup(t){let s=m(),{t:b}=p();return(t,p)=>{let m=u(`motion`);return c(),i(e,null,[_((c(),r(f(y),{"mb-2":``,title:f(b)(`settings.pages.themes.sections.section.custom-color.title`),icon:`i-solar:pallete-2-bold-duotone`,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:290,delay:4*50,transition:`all ease-in-out duration-250`},{default:g(()=>[_((c(),i(`div`,C,[n(`span`,w,d(t.$t(`settings.pages.themes.sections.section.custom-color.fields.field.primary-color.label`)),1),n(`label`,T,[_(n(`input`,{"onUpdate:modelValue":p[0]||=e=>f(s).themeColorsHueDynamic=e,type:`checkbox`,class:`peer sr-only`},null,512),[[h,f(s).themeColorsHueDynamic]]),p[2]||=n(`div`,{class:`h-6 w-11 rounded-full bg-neutral-200 after:absolute after:left-[2px] after:top-[2px] after:h-5 after:w-5 after:rounded-full after:bg-white dark:bg-neutral-600 peer-checked:bg-primary-500 after:transition-all after:content-[''] peer-checked:after:translate-x-full peer-checked:after:border-white`},null,-1),a(` `+d(t.$t(`settings.pages.themes.sections.section.custom-color.fields.field.primary-color.rgb-on.title`)),1)])])),[[m]]),_(o(f(v),{modelValue:f(s).themeColorsHue,"onUpdate:modelValue":p[1]||=e=>f(s).themeColorsHue=e,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:310,delay:6*50,disabled:f(s).themeColorsHueDynamic},null,8,[`modelValue`,`disabled`]),[[m]]),_((c(),i(`div`,E,[p[4]||=n(`span`,{"bg-primary-50":``},`50`,-1),p[5]||=n(`span`,{"bg-primary-100":``},`100`,-1),p[6]||=n(`span`,{"bg-primary-200":``},`200`,-1),p[7]||=n(`span`,{"bg-primary-300":``},`300`,-1),p[8]||=n(`span`,{"bg-primary-400":``},`400`,-1),p[9]||=n(`span`,{"bg-primary-500":``},`500`,-1),_((c(),i(`div`,D,p[3]||=[n(`span`,{"bg-primary-600":``},`600`,-1),n(`span`,{"bg-primary-700":``},`700`,-1),n(`span`,{"bg-primary-800":``},`800`,-1),n(`span`,{"bg-primary-900":``},`900`,-1),n(`span`,{"bg-primary-950":``},`950`,-1)])),[[m]])])),[[m]]),_((c(),i(`div`,O,p[10]||=[n(`span`,{bg:`primary-500/5`},`500/5`,-1),n(`span`,{bg:`primary-500/10`},`500/10`,-1),n(`span`,{bg:`primary-500/20`},`500/20`,-1),n(`span`,{bg:`primary-500/30`},`500/30`,-1),n(`span`,{bg:`primary-500/40`},`500/40`,-1),n(`span`,{bg:`primary-500/50`},`500/50`,-1),n(`span`,{bg:`primary-500/60`},`500/60`,-1),n(`span`,{bg:`primary-500/70`},`500/70`,-1),n(`span`,{bg:`primary-500/80`},`500/80`,-1),n(`span`,{bg:`primary-500/90`},`500/90`,-1),n(`span`,{bg:`primary-500`},`500`,-1)])),[[m]])]),_:1},8,[`title`])),[[m]]),_((c(),r(f(y),{"mb-2":``,title:f(b)(`settings.pages.themes.sections.section.theme-presets.title`),icon:`i-solar:magic-stick-2-bold-duotone`,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:350,delay:10*50,transition:`all ease-in-out duration-250`},{default:g(()=>[(c(!0),i(e,null,l(t.$tm(`settings.pages.themes.sections.section.theme-presets.presets`),({title:e,description:r,colors:a},s)=>_((c(),i(`div`,{key:s,class:`w-full flex items-center justify-between rounded-lg px-4 py-3 outline-none transition-all duration-250 ease-in-out`,bg:`neutral-100 dark:neutral-800`,hover:`bg-neutral-200 dark:bg-neutral-700`,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:360+s*10,delay:11*50+s*50,transition:`all ease-in-out duration-250`},[n(`div`,null,[n(`span`,A,d(t.$rt(e)),1),n(`div`,j,d(t.$rt(r)),1)]),o(x,{colors:a.map((e,n)=>({hex:f(S)[s][n],name:t.$rt(e)}))},null,8,[`colors`])],8,k)),[[m]])),128))]),_:1},8,[`title`])),[[m]]),_((c(),i(`div`,M,p[11]||=[n(`div`,{text:`60`,"i-solar:pallete-2-bold-duotone":``},null,-1)])),[[m]])],64)}}});typeof b==`function`&&b(N);var P=t(N,[[`__scopeId`,`data-v-8d079c31`]]);export{P as default}; \ No newline at end of file +import{Fragment as e,__plugin_vue_export_helper_default as t,createBaseVNode as n,createBlock as r,createElementBlock as i,createTextVNode as a,createVNode as o,defineComponent as s,openBlock as c,renderList as l,resolveDirective as u,toDisplayString as d,unref as f,useI18n as p,useSettings as m,vModelCheckbox as h,withCtx as g,withDirectives as _}from"./index-CsmT0L1K.js";import"./import-url-browser-DNuYZxPr.js";import"./duckdb-mvp-C3i5IjU8.js";import"./index-CISmcbXk-C9oju49Y.js";import"./types-AwjH7X1C.js";import"./stores-2H61GqXP.js";import"./__vite-browser-external-DPh5tFvT.js";import"./Button-D3cjyOEe.js";import{ColorHueRange_default as v}from"./src-C1Sr0aqN.js";import"./dist-B9GpkGif.js";import{Section_default as y}from"./components-DHUA669a.js";import"./composables-CgcEyUWo.js";import"./sleep-CvjNLutj.js";import"./queue-B0kER5Ap.js";import"./queues-hSEKEE3F.js";import"./dist-Cr2QBfS4.js";import"./webgpu-Nt9hTBpW.js";import{route_block_default as b}from"./route-block-DNPbw0zT.js";import{ColorPalette_default as x}from"./ColorPalette-BQYkam8G.js";var S=[[],[`#A5978B`,`#D8CAAF`,`#B8B4A7`,`#C4BCB1`,`#E5DED8`,`#9A8F7D`,`#BEB5A7`,`#C9C0B6`],[`#7A9EAF`,`#B8C7CC`,`#D4B79C`,`#8B9D77`,`#C7D5CB`,`#E6D0B1`,`#94A7B1`,`#B4C8C3`],[`#D9B48F`,`#B5917A`,`#8C7A6B`,`#A17F5F`,`#B98C46`,`#C7A252`,`#DAB300`,`#D19826`],[`#9BA7B0`,`#C1CBD4`,`#A5ADB6`,`#8B959E`,`#D4DCE4`,`#7F8A94`,`#B3BCC6`,`#98A4AE`],[`#E4C6D0`,`#A61B29`,`#5D513C`,`#789262`,`#1C0D1A`,`#F7C242`,`#62A9DD`,`#8C4B3C`]];const C={flex:``,"items-center":``,"justify-between":``,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:300,delay:5*50,transition:`all ease-in-out duration-250`},w={"text-lg":``,"font-normal":``},T={relative:``,flex:``,"cursor-pointer":``,"items-center":``,"gap-2":``},E={class:`color-bar`,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:320,delay:7*50,transition:`all ease-in-out duration-250`},D={"text-white":``,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:330,delay:8*50,transition:`all ease-in-out duration-250`},O={class:`color-bar transparency-grid`,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:340,delay:9*50,transition:`all ease-in-out duration-250`},k=[`duration`,`delay`],A={"font-medium":``},j={text:`sm neutral-500`},M={text:`neutral-200/50 dark:neutral-600/20`,"pointer-events-none":``,fixed:``,top:`[65dvh]`,"right--15":``,"z--1":``,initial:{scale:.9,opacity:0,rotate:30},enter:{scale:1,opacity:1,rotate:0},duration:250,flex:``,"items-center":``,"justify-center":``};var N=s({__name:`color-scheme`,setup(t){let s=m(),{t:b}=p();return(t,p)=>{let m=u(`motion`);return c(),i(e,null,[_((c(),r(f(y),{"mb-2":``,title:f(b)(`settings.pages.themes.sections.section.custom-color.title`),icon:`i-solar:pallete-2-bold-duotone`,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:290,delay:4*50,transition:`all ease-in-out duration-250`},{default:g(()=>[_((c(),i(`div`,C,[n(`span`,w,d(t.$t(`settings.pages.themes.sections.section.custom-color.fields.field.primary-color.label`)),1),n(`label`,T,[_(n(`input`,{"onUpdate:modelValue":p[0]||=e=>f(s).themeColorsHueDynamic=e,type:`checkbox`,class:`peer sr-only`},null,512),[[h,f(s).themeColorsHueDynamic]]),p[2]||=n(`div`,{class:`h-6 w-11 rounded-full bg-neutral-200 after:absolute after:left-[2px] after:top-[2px] after:h-5 after:w-5 after:rounded-full after:bg-white dark:bg-neutral-600 peer-checked:bg-primary-500 after:transition-all after:content-[''] peer-checked:after:translate-x-full peer-checked:after:border-white`},null,-1),a(` `+d(t.$t(`settings.pages.themes.sections.section.custom-color.fields.field.primary-color.rgb-on.title`)),1)])])),[[m]]),_(o(f(v),{modelValue:f(s).themeColorsHue,"onUpdate:modelValue":p[1]||=e=>f(s).themeColorsHue=e,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:310,delay:6*50,disabled:f(s).themeColorsHueDynamic},null,8,[`modelValue`,`disabled`]),[[m]]),_((c(),i(`div`,E,[p[4]||=n(`span`,{"bg-primary-50":``},`50`,-1),p[5]||=n(`span`,{"bg-primary-100":``},`100`,-1),p[6]||=n(`span`,{"bg-primary-200":``},`200`,-1),p[7]||=n(`span`,{"bg-primary-300":``},`300`,-1),p[8]||=n(`span`,{"bg-primary-400":``},`400`,-1),p[9]||=n(`span`,{"bg-primary-500":``},`500`,-1),_((c(),i(`div`,D,p[3]||=[n(`span`,{"bg-primary-600":``},`600`,-1),n(`span`,{"bg-primary-700":``},`700`,-1),n(`span`,{"bg-primary-800":``},`800`,-1),n(`span`,{"bg-primary-900":``},`900`,-1),n(`span`,{"bg-primary-950":``},`950`,-1)])),[[m]])])),[[m]]),_((c(),i(`div`,O,p[10]||=[n(`span`,{bg:`primary-500/5`},`500/5`,-1),n(`span`,{bg:`primary-500/10`},`500/10`,-1),n(`span`,{bg:`primary-500/20`},`500/20`,-1),n(`span`,{bg:`primary-500/30`},`500/30`,-1),n(`span`,{bg:`primary-500/40`},`500/40`,-1),n(`span`,{bg:`primary-500/50`},`500/50`,-1),n(`span`,{bg:`primary-500/60`},`500/60`,-1),n(`span`,{bg:`primary-500/70`},`500/70`,-1),n(`span`,{bg:`primary-500/80`},`500/80`,-1),n(`span`,{bg:`primary-500/90`},`500/90`,-1),n(`span`,{bg:`primary-500`},`500`,-1)])),[[m]])]),_:1},8,[`title`])),[[m]]),_((c(),r(f(y),{"mb-2":``,title:f(b)(`settings.pages.themes.sections.section.theme-presets.title`),icon:`i-solar:magic-stick-2-bold-duotone`,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:350,delay:10*50,transition:`all ease-in-out duration-250`},{default:g(()=>[(c(!0),i(e,null,l(t.$tm(`settings.pages.themes.sections.section.theme-presets.presets`),({title:e,description:r,colors:a},s)=>_((c(),i(`div`,{key:s,class:`w-full flex items-center justify-between rounded-lg px-4 py-3 outline-none transition-all duration-250 ease-in-out`,bg:`neutral-100 dark:neutral-800`,hover:`bg-neutral-200 dark:bg-neutral-700`,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:360+s*10,delay:11*50+s*50,transition:`all ease-in-out duration-250`},[n(`div`,null,[n(`span`,A,d(t.$rt(e)),1),n(`div`,j,d(t.$rt(r)),1)]),o(x,{colors:a.map((e,n)=>({hex:f(S)[s][n],name:t.$rt(e)}))},null,8,[`colors`])],8,k)),[[m]])),128))]),_:1},8,[`title`])),[[m]]),_((c(),i(`div`,M,p[11]||=[n(`div`,{text:`60`,"i-solar:pallete-2-bold-duotone":``},null,-1)])),[[m]])],64)}}});typeof b==`function`&&b(N);var P=t(N,[[`__scopeId`,`data-v-8d079c31`]]);export{P as default}; \ No newline at end of file diff --git a/assets/components-rFKvUtFk.css b/assets/components-1D2TUSey.css similarity index 99% rename from assets/components-rFKvUtFk.css rename to assets/components-1D2TUSey.css index 12681feebb6a2590e8c9ec015eabe810c83a216e..f08c1fea018ff46bdb148fd1a38c4ed3b8ad0774 100644 --- a/assets/components-rFKvUtFk.css +++ b/assets/components-1D2TUSey.css @@ -1 +1 @@ -.volumed[data-v-568551bc]{transform-style:preserve-3d;width:-moz-fit-content;width:fit-content;height:-moz-fit-content;height:fit-content}.test-dummy-flat[data-v-b4ef37ac]{display:inline-block;position:relative}.test-dummy-flat .marker[data-v-b4ef37ac]{background:conic-gradient(#ffeb3b 0deg 90deg,#000 90deg 180deg,#ffeb3b 180deg 270deg,#000 270deg 360deg);border-radius:50%;position:absolute;top:0;bottom:0;left:0;right:0;box-shadow:0 4px 12px #b9b9b933}.dark .test-dummy-flat .marker[data-v-b4ef37ac]{box-shadow:0 4px 12px #0003}.menu-icon-item[data-v-c0e4998c]{position:relative;overflow:hidden}.menu-icon-item[data-v-c0e4998c]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),var(--un-gradient-to);--un-gradient-shape:to right in oklch;--un-gradient:var(--un-gradient-shape),var(--un-gradient-stops);background-image:linear-gradient(var(--un-gradient));content:"";z-index:-1;opacity:0;width:25%;height:100%;transition:all .4s ease-in-out;position:absolute;top:0;bottom:0;left:0;right:0;-webkit-mask-image:linear-gradient(120deg,#fff 30%,#0000 50%);mask-image:linear-gradient(120deg,#fff 30%,#0000 50%)}.dark .menu-icon-item[data-v-c0e4998c]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),var(--un-gradient-to)}.menu-icon-item[data-v-c0e4998c]:hover:before,.menu-icon-item._hover[data-v-c0e4998c]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/.2)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:transparent var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/.1)var(--un-gradient-via-position),var(--un-gradient-to);--un-gradient-via-position:50%;--un-gradient-shape:to right in oklch;--un-gradient:var(--un-gradient-shape),var(--un-gradient-stops);background-image:linear-gradient(var(--un-gradient));opacity:1;width:85%}.dark .menu-icon-item[data-v-c0e4998c]:hover:before,.dark .menu-icon-item._hover[data-v-c0e4998c]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/.2)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:transparent var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/.1)var(--un-gradient-via-position),var(--un-gradient-to);--un-gradient-via-position:50%}.menu-icon-item[data-v-c0e4998c]:after{background-image:radial-gradient(circle at 1px 1px,rgb(229 229 229/var(--un-background-opacity))1px,transparent 0);--un-background-opacity:.6;z-index:-2;content:"";background-size:10px 10px;width:100%;height:100%;transition:all .4s ease-in-out;position:absolute;top:0;bottom:0;left:0;right:0;-webkit-mask-image:linear-gradient(165deg,#fff 30%,#0000 50%);mask-image:linear-gradient(165deg,#fff 30%,#0000 50%)}.menu-icon-item[data-v-c0e4998c]:after:hover{background-image:radial-gradient(circle at 1px 1px,oklch(85% var(--chromatic-chroma-300)calc(var(--chromatic-hue) + 0)/var(--un-background-opacity))1px,transparent 0);--un-background-opacity:%alpha}.dark .menu-icon-item[data-v-c0e4998c]:after{background-image:radial-gradient(circle at 1px 1px,rgb(64 64 64/var(--un-background-opacity))1px,transparent 0);--un-background-opacity:.25}.dark .menu-icon-item[data-v-c0e4998c]:after:hover{background-image:radial-gradient(circle at 1px 1px,oklch(90% var(--chromatic-chroma-200)calc(var(--chromatic-hue) + 0)/var(--un-background-opacity))1px,transparent 0);--un-background-opacity:%alpha}.menu-icon-item-icon[data-v-c0e4998c]{opacity:.5}.menu-icon-item:hover .menu-icon-item-title[data-v-c0e4998c],.menu-icon-item._hover .menu-icon-item-title[data-v-c0e4998c]{--un-text-opacity:1;color:oklch(54% var(--chromatic-chroma-600)calc(var(--chromatic-hue) + 0)/var(--un-text-opacity))}.menu-icon-item:hover .menu-icon-item-description[data-v-c0e4998c],.menu-icon-item._hover .menu-icon-item-description[data-v-c0e4998c]{--un-text-opacity:1;color:oklch(54% var(--chromatic-chroma-600)calc(var(--chromatic-hue) + 0)/var(--un-text-opacity));opacity:.8}.menu-icon-item:hover .menu-icon-item-icon[data-v-c0e4998c],.menu-icon-item._hover .menu-icon-item-icon[data-v-c0e4998c]{--un-text-opacity:1;color:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/var(--un-text-opacity));scale:1.2}.dark .menu-icon-item:hover .menu-icon-item-title[data-v-c0e4998c],.dark .menu-icon-item._hover .menu-icon-item-title[data-v-c0e4998c]{--un-text-opacity:1;color:oklch(85% var(--chromatic-chroma-300)calc(var(--chromatic-hue) + 0)/var(--un-text-opacity))}.dark .menu-icon-item:hover .menu-icon-item-description[data-v-c0e4998c],.dark .menu-icon-item._hover .menu-icon-item-description[data-v-c0e4998c]{--un-text-opacity:1;color:oklch(85% var(--chromatic-chroma-300)calc(var(--chromatic-hue) + 0)/var(--un-text-opacity));opacity:.8}.dark .menu-icon-item:hover .menu-icon-item-icon[data-v-c0e4998c],.dark .menu-icon-item._hover .menu-icon-item-icon[data-v-c0e4998c]{--un-text-opacity:1;color:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/var(--un-text-opacity))}.menu-icon-status-item[data-v-03028e15]{position:relative;overflow:hidden}.menu-icon-status-item[data-v-03028e15]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),var(--un-gradient-to);--un-gradient-shape:to right in oklch;--un-gradient:var(--un-gradient-shape),var(--un-gradient-stops);background-image:linear-gradient(var(--un-gradient));content:"";z-index:0;opacity:0;width:25%;height:100%;transition:all .4s ease-in-out;position:absolute;top:0;bottom:0;left:0;right:0;-webkit-mask-image:linear-gradient(120deg,#fff 100%);mask-image:linear-gradient(120deg,#fff 100%)}.dark .menu-icon-status-item[data-v-03028e15]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),var(--un-gradient-to)}.menu-icon-status-item[data-v-03028e15]:hover:before,.menu-icon-status-item._hover[data-v-03028e15]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/.2)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:transparent var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/.1)var(--un-gradient-via-position),var(--un-gradient-to);--un-gradient-via-position:50%;--un-gradient-shape:to right in oklch;--un-gradient:var(--un-gradient-shape),var(--un-gradient-stops);background-image:linear-gradient(var(--un-gradient));opacity:1;width:50%}.dark .menu-icon-status-item[data-v-03028e15]:hover:before,.dark .menu-icon-status-item._hover[data-v-03028e15]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/.2)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:transparent var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/.1)var(--un-gradient-via-position),var(--un-gradient-to);--un-gradient-via-position:50%}.menu-icon-status-item-link[data-v-03028e15]:after{background-image:radial-gradient(circle at 1px 1px,rgb(229 229 229/var(--un-background-opacity))1px,transparent 0);--un-background-opacity:.8;z-index:-2;content:"";background-size:10px 10px;width:100%;height:100%;transition:all .4s ease-in-out;position:absolute;top:0;bottom:0;left:0;right:0;-webkit-mask-image:linear-gradient(165deg,#fff 30%,#0000 50%);mask-image:linear-gradient(165deg,#fff 30%,#0000 50%)}.menu-icon-status-item-link[data-v-03028e15]:after:hover{background-image:radial-gradient(circle at 1px 1px,oklch(85% var(--chromatic-chroma-300)calc(var(--chromatic-hue) + 0)/var(--un-background-opacity))1px,transparent 0);--un-background-opacity:%alpha}.dark .menu-icon-status-item-link[data-v-03028e15]:after{background-image:radial-gradient(circle at 1px 1px,rgb(64 64 64/var(--un-background-opacity))1px,transparent 0);--un-background-opacity:.4}.dark .menu-icon-status-item-link[data-v-03028e15]:after:hover{background-image:radial-gradient(circle at 1px 1px,oklch(90% var(--chromatic-chroma-200)calc(var(--chromatic-hue) + 0)/var(--un-background-opacity))1px,transparent 0);--un-background-opacity:%alpha}.menu-icon-status-item-icon-color[data-v-03028e15]{opacity:.5}.menu-icon-status-item:hover .menu-icon-status-item-title[data-v-03028e15],.menu-icon-status-item._hover .menu-icon-status-item-title[data-v-03028e15]{--un-text-opacity:1;color:oklch(54% var(--chromatic-chroma-600)calc(var(--chromatic-hue) + 0)/var(--un-text-opacity))}.menu-icon-status-item:hover .menu-icon-status-item-description[data-v-03028e15],.menu-icon-status-item._hover .menu-icon-status-item-description[data-v-03028e15]{--un-text-opacity:1;color:oklch(54% var(--chromatic-chroma-600)calc(var(--chromatic-hue) + 0)/var(--un-text-opacity));opacity:.8}.menu-icon-status-item:hover .menu-icon-status-item-icon[data-v-03028e15],.menu-icon-status-item._hover .menu-icon-status-item-icon[data-v-03028e15],.menu-icon-status-item:hover .menu-icon-status-item-icon-color[data-v-03028e15],.menu-icon-status-item._hover .menu-icon-status-item-icon-color[data-v-03028e15]{--un-text-opacity:1;color:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/var(--un-text-opacity));scale:1.2}.dark .menu-icon-status-item:hover .menu-icon-status-item-title[data-v-03028e15],.dark .menu-icon-status-item._hover .menu-icon-status-item-title[data-v-03028e15]{--un-text-opacity:1;color:oklch(85% var(--chromatic-chroma-300)calc(var(--chromatic-hue) + 0)/var(--un-text-opacity))}.dark .menu-icon-status-item:hover .menu-icon-status-item-description[data-v-03028e15],.dark .menu-icon-status-item._hover .menu-icon-status-item-description[data-v-03028e15]{--un-text-opacity:1;color:oklch(85% var(--chromatic-chroma-300)calc(var(--chromatic-hue) + 0)/var(--un-text-opacity));opacity:.8}.dark .menu-icon-status-item:hover .menu-icon-status-item-icon[data-v-03028e15],.dark .menu-icon-status-item._hover .menu-icon-status-item-icon[data-v-03028e15],.dark .menu-icon-status-item:hover .menu-icon-status-item-icon-color[data-v-03028e15],.dark .menu-icon-status-item._hover .menu-icon-status-item-icon-color[data-v-03028e15]{--un-text-opacity:1;color:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/var(--un-text-opacity))}.form_radio-card-detail[data-v-603e520f]{position:relative;overflow:hidden}.form_radio-card-detail[data-v-603e520f]:before{pointer-events:none;--un-gradient-from-position:0%;--un-gradient-from:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),var(--un-gradient-to);--un-gradient-shape:to right in oklch;--un-gradient:var(--un-gradient-shape),var(--un-gradient-stops);background-image:linear-gradient(var(--un-gradient));content:"";z-index:0;opacity:0;width:25%;height:100%;transition:all .35s ease-in-out;position:absolute;top:0;bottom:0;left:0;right:0;-webkit-mask-image:linear-gradient(120deg,#fff 100%);mask-image:linear-gradient(120deg,#fff 100%)}.dark .form_radio-card-detail[data-v-603e520f]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),var(--un-gradient-to)}.form_radio-card-detail[data-v-603e520f]:hover:before,.form_radio-card-detail._hover[data-v-603e520f]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/.2)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:transparent var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/.1)var(--un-gradient-via-position),var(--un-gradient-to);--un-gradient-via-position:50%;--un-gradient-shape:to right in oklch;--un-gradient:var(--un-gradient-shape),var(--un-gradient-stops);background-image:linear-gradient(var(--un-gradient));opacity:1;width:85%}.dark .form_radio-card-detail[data-v-603e520f]:hover:before,.dark .form_radio-card-detail._hover[data-v-603e520f]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/.2)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:transparent var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/.1)var(--un-gradient-via-position),var(--un-gradient-to);--un-gradient-via-position:50%}.form_radio-card-detail-active[data-v-603e520f]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/.2)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:transparent var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/.1)var(--un-gradient-via-position),var(--un-gradient-to);--un-gradient-via-position:50%;--un-gradient-shape:to right in oklch;--un-gradient:var(--un-gradient-shape),var(--un-gradient-stops);background-image:linear-gradient(var(--un-gradient));opacity:.5;width:85%}.dark .form_radio-card-detail-active[data-v-603e520f]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/.2)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:transparent var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/.1)var(--un-gradient-via-position),var(--un-gradient-to);--un-gradient-via-position:50%}input[type=search][data-v-7ad6d626]::-webkit-search-cancel-button{display:none}.form_radio-card-simple[data-v-0df44f43]{position:relative;overflow:hidden}.form_radio-card-simple[data-v-0df44f43]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),var(--un-gradient-to);--un-gradient-shape:to right in oklch;--un-gradient:var(--un-gradient-shape),var(--un-gradient-stops);background-image:linear-gradient(var(--un-gradient));content:"";z-index:0;opacity:0;width:25%;height:100%;transition:all .35s ease-in-out;position:absolute;top:0;bottom:0;left:0;right:0;-webkit-mask-image:linear-gradient(120deg,#fff 100%);mask-image:linear-gradient(120deg,#fff 100%)}.dark .form_radio-card-simple[data-v-0df44f43]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),var(--un-gradient-to)}.form_radio-card-simple[data-v-0df44f43]:hover:before,.form_radio-card-simple._hover[data-v-0df44f43]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/.2)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:transparent var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/.1)var(--un-gradient-via-position),var(--un-gradient-to);--un-gradient-via-position:50%;--un-gradient-shape:to right in oklch;--un-gradient:var(--un-gradient-shape),var(--un-gradient-stops);background-image:linear-gradient(var(--un-gradient));opacity:1;width:85%}.dark .form_radio-card-simple[data-v-0df44f43]:hover:before,.dark .form_radio-card-simple._hover[data-v-0df44f43]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/.2)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:transparent var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/.1)var(--un-gradient-via-position),var(--un-gradient-to);--un-gradient-via-position:50%}.form_radio-card-simple-active[data-v-0df44f43]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/.2)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:transparent var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/.1)var(--un-gradient-via-position),var(--un-gradient-to);--un-gradient-via-position:50%;--un-gradient-shape:to right in oklch;--un-gradient:var(--un-gradient-shape),var(--un-gradient-stops);background-image:linear-gradient(var(--un-gradient));opacity:.5;width:85%}.dark .form_radio-card-simple-active[data-v-0df44f43]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/.2)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:transparent var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/.1)var(--un-gradient-via-position),var(--un-gradient-to);--un-gradient-via-position:50%}.form_voice-card[data-v-a5ae8da9]{flex-direction:column;display:flex;position:relative;overflow:hidden}.form_voice-card[data-v-a5ae8da9]:before{pointer-events:none;--un-gradient-from-position:0%;--un-gradient-from:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),var(--un-gradient-to);--un-gradient-shape:to right in oklch;--un-gradient:var(--un-gradient-shape),var(--un-gradient-stops);background-image:linear-gradient(var(--un-gradient));content:"";z-index:0;opacity:0;width:25%;height:100%;transition:all .35s ease-in-out;position:absolute;top:0;bottom:0;left:0;right:0;-webkit-mask-image:linear-gradient(120deg,#fff 100%);mask-image:linear-gradient(120deg,#fff 100%)}.dark .form_voice-card[data-v-a5ae8da9]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),var(--un-gradient-to)}.form_voice-card[data-v-a5ae8da9]:hover:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/.2)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:transparent var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/.1)var(--un-gradient-via-position),var(--un-gradient-to);--un-gradient-via-position:50%;--un-gradient-shape:to right in oklch;--un-gradient:var(--un-gradient-shape),var(--un-gradient-stops);background-image:linear-gradient(var(--un-gradient));opacity:1;width:85%}.dark .form_voice-card[data-v-a5ae8da9]:hover:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/.2)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:transparent var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/.1)var(--un-gradient-via-position),var(--un-gradient-to);--un-gradient-via-position:50%}input[type=search][data-v-4dd3b9e2]::-webkit-search-cancel-button{display:none}.voice-card[data-v-4dd3b9e2]{flex-direction:column;display:flex;position:relative;overflow:hidden}.voice-card[data-v-4dd3b9e2]:before{pointer-events:none;--un-gradient-from-position:0%;--un-gradient-from:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),var(--un-gradient-to);--un-gradient-shape:to right in oklch;--un-gradient:var(--un-gradient-shape),var(--un-gradient-stops);background-image:linear-gradient(var(--un-gradient));content:"";z-index:0;opacity:0;width:25%;height:100%;transition:all .35s ease-in-out;position:absolute;top:0;bottom:0;left:0;right:0;-webkit-mask-image:linear-gradient(120deg,#fff 100%);mask-image:linear-gradient(120deg,#fff 100%)}.dark .voice-card[data-v-4dd3b9e2]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),var(--un-gradient-to)}.voice-card[data-v-4dd3b9e2]:hover:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/.2)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:transparent var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/.1)var(--un-gradient-via-position),var(--un-gradient-to);--un-gradient-via-position:50%;--un-gradient-shape:to right in oklch;--un-gradient:var(--un-gradient-shape),var(--un-gradient-stops);background-image:linear-gradient(var(--un-gradient));opacity:1;width:85%}.dark .voice-card[data-v-4dd3b9e2]:hover:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/.2)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:transparent var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/.1)var(--un-gradient-via-position),var(--un-gradient-to);--un-gradient-via-position:50%}.card-hover-effect[data-v-895421da]{transform-style:preserve-3d;transform-origin:50%;will-change:transform;transition:transform .3s cubic-bezier(.23,1,.32,1)}.card-hover-effect[data-v-895421da]:before,.card-hover-effect[data-v-895421da]:after{content:"";pointer-events:none;background-repeat:no-repeat;transition:all .33s;position:absolute;top:0;bottom:0;left:0;right:0}.card-hover-effect[data-v-895421da]:before{background-position:var(--card-position-x)var(--card-position-y);background-size:300% 300%;background-image:linear-gradient(115deg,transparent 0%,rgba(var(--color-primary-500),calc(.3*var(--effect-intensity)))25%,transparent 47%,transparent 53%,rgba(var(--color-primary-600),calc(.3*var(--effect-intensity)))75%,transparent 100%);opacity:calc(.5*var(--effect-intensity));filter:brightness(.5)contrast();z-index:1;mix-blend-mode:color-dodge}.card-hover-effect[data-v-895421da]:after{background-position:var(--sparkle-position-x)var(--sparkle-position-y);background-size:160%;background-image:linear-gradient(125deg,rgba(var(--color-primary-500),calc(.3*var(--effect-intensity)))15%,rgba(var(--color-primary-400),calc(.25*var(--effect-intensity)))30%,rgba(var(--color-primary-300),calc(.2*var(--effect-intensity)))40%,rgba(var(--color-primary-200),calc(.1*var(--effect-intensity)))60%,rgba(var(--color-primary-400),calc(.25*var(--effect-intensity)))70%,rgba(var(--color-primary-500),calc(.3*var(--effect-intensity)))85%);background-blend-mode:overlay;opacity:calc(var(--sparkle-opacity)*var(--effect-intensity));filter:brightness()contrast();z-index:2;mix-blend-mode:color-dodge}.card-hover-effect[data-v-895421da]:hover:before{opacity:calc(.88*var(--effect-intensity));filter:brightness(.66)contrast(1.33)}.card-hover-effect[data-v-895421da]:hover:after{opacity:var(--effect-intensity);filter:brightness(1.1)contrast(1.2)}.animate-stripe[data-v-af8294f5]{background-image:repeating-linear-gradient(-45deg,#f472b6,#f472b6 25px,#f9a8d4 25px 50px);background-size:150% 100%;animation:2s linear infinite progress-af8294f5}@-webkit-keyframes progress-af8294f5{0%{background-position:0 0}to{background-position:-75px 0}}@-moz-keyframes progress-af8294f5{0%{background-position:0 0}to{background-position:-75px 0}}@keyframes progress-af8294f5{0%{background-position:0 0}to{background-position:-70px 0}} +.volumed[data-v-568551bc]{transform-style:preserve-3d;width:-moz-fit-content;width:fit-content;height:-moz-fit-content;height:fit-content}.test-dummy-flat[data-v-b4ef37ac]{display:inline-block;position:relative}.test-dummy-flat .marker[data-v-b4ef37ac]{background:conic-gradient(#ffeb3b 0deg 90deg,#000 90deg 180deg,#ffeb3b 180deg 270deg,#000 270deg 360deg);border-radius:50%;position:absolute;top:0;bottom:0;left:0;right:0;box-shadow:0 4px 12px #b9b9b933}.dark .test-dummy-flat .marker[data-v-b4ef37ac]{box-shadow:0 4px 12px #0003}.menu-icon-item[data-v-c0e4998c]{position:relative;overflow:hidden}.menu-icon-item[data-v-c0e4998c]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),var(--un-gradient-to);--un-gradient-shape:to right in oklch;--un-gradient:var(--un-gradient-shape),var(--un-gradient-stops);background-image:linear-gradient(var(--un-gradient));content:"";z-index:-1;opacity:0;width:25%;height:100%;transition:all .4s ease-in-out;position:absolute;top:0;bottom:0;left:0;right:0;-webkit-mask-image:linear-gradient(120deg,#fff 30%,#0000 50%);mask-image:linear-gradient(120deg,#fff 30%,#0000 50%)}.dark .menu-icon-item[data-v-c0e4998c]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),var(--un-gradient-to)}.menu-icon-item[data-v-c0e4998c]:hover:before,.menu-icon-item._hover[data-v-c0e4998c]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/.2)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:transparent var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/.1)var(--un-gradient-via-position),var(--un-gradient-to);--un-gradient-via-position:50%;--un-gradient-shape:to right in oklch;--un-gradient:var(--un-gradient-shape),var(--un-gradient-stops);background-image:linear-gradient(var(--un-gradient));opacity:1;width:85%}.dark .menu-icon-item[data-v-c0e4998c]:hover:before,.dark .menu-icon-item._hover[data-v-c0e4998c]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/.2)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:transparent var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/.1)var(--un-gradient-via-position),var(--un-gradient-to);--un-gradient-via-position:50%}.menu-icon-item[data-v-c0e4998c]:after{background-image:radial-gradient(circle at 1px 1px,rgb(229 229 229/var(--un-background-opacity))1px,transparent 0);--un-background-opacity:.6;z-index:-2;content:"";background-size:10px 10px;width:100%;height:100%;transition:all .4s ease-in-out;position:absolute;top:0;bottom:0;left:0;right:0;-webkit-mask-image:linear-gradient(165deg,#fff 30%,#0000 50%);mask-image:linear-gradient(165deg,#fff 30%,#0000 50%)}.menu-icon-item[data-v-c0e4998c]:after:hover{background-image:radial-gradient(circle at 1px 1px,oklch(85% var(--chromatic-chroma-300)calc(var(--chromatic-hue) + 0)/var(--un-background-opacity))1px,transparent 0);--un-background-opacity:%alpha}.dark .menu-icon-item[data-v-c0e4998c]:after{background-image:radial-gradient(circle at 1px 1px,rgb(64 64 64/var(--un-background-opacity))1px,transparent 0);--un-background-opacity:.25}.dark .menu-icon-item[data-v-c0e4998c]:after:hover{background-image:radial-gradient(circle at 1px 1px,oklch(90% var(--chromatic-chroma-200)calc(var(--chromatic-hue) + 0)/var(--un-background-opacity))1px,transparent 0);--un-background-opacity:%alpha}.menu-icon-item-icon[data-v-c0e4998c]{opacity:.5}.menu-icon-item:hover .menu-icon-item-title[data-v-c0e4998c],.menu-icon-item._hover .menu-icon-item-title[data-v-c0e4998c]{--un-text-opacity:1;color:oklch(54% var(--chromatic-chroma-600)calc(var(--chromatic-hue) + 0)/var(--un-text-opacity))}.menu-icon-item:hover .menu-icon-item-description[data-v-c0e4998c],.menu-icon-item._hover .menu-icon-item-description[data-v-c0e4998c]{--un-text-opacity:1;color:oklch(54% var(--chromatic-chroma-600)calc(var(--chromatic-hue) + 0)/var(--un-text-opacity));opacity:.8}.menu-icon-item:hover .menu-icon-item-icon[data-v-c0e4998c],.menu-icon-item._hover .menu-icon-item-icon[data-v-c0e4998c]{--un-text-opacity:1;color:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/var(--un-text-opacity));scale:1.2}.dark .menu-icon-item:hover .menu-icon-item-title[data-v-c0e4998c],.dark .menu-icon-item._hover .menu-icon-item-title[data-v-c0e4998c]{--un-text-opacity:1;color:oklch(85% var(--chromatic-chroma-300)calc(var(--chromatic-hue) + 0)/var(--un-text-opacity))}.dark .menu-icon-item:hover .menu-icon-item-description[data-v-c0e4998c],.dark .menu-icon-item._hover .menu-icon-item-description[data-v-c0e4998c]{--un-text-opacity:1;color:oklch(85% var(--chromatic-chroma-300)calc(var(--chromatic-hue) + 0)/var(--un-text-opacity));opacity:.8}.dark .menu-icon-item:hover .menu-icon-item-icon[data-v-c0e4998c],.dark .menu-icon-item._hover .menu-icon-item-icon[data-v-c0e4998c]{--un-text-opacity:1;color:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/var(--un-text-opacity))}.menu-icon-status-item[data-v-03028e15]{position:relative;overflow:hidden}.menu-icon-status-item[data-v-03028e15]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),var(--un-gradient-to);--un-gradient-shape:to right in oklch;--un-gradient:var(--un-gradient-shape),var(--un-gradient-stops);background-image:linear-gradient(var(--un-gradient));content:"";z-index:0;opacity:0;width:25%;height:100%;transition:all .4s ease-in-out;position:absolute;top:0;bottom:0;left:0;right:0;-webkit-mask-image:linear-gradient(120deg,#fff 100%);mask-image:linear-gradient(120deg,#fff 100%)}.dark .menu-icon-status-item[data-v-03028e15]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),var(--un-gradient-to)}.menu-icon-status-item[data-v-03028e15]:hover:before,.menu-icon-status-item._hover[data-v-03028e15]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/.2)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:transparent var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/.1)var(--un-gradient-via-position),var(--un-gradient-to);--un-gradient-via-position:50%;--un-gradient-shape:to right in oklch;--un-gradient:var(--un-gradient-shape),var(--un-gradient-stops);background-image:linear-gradient(var(--un-gradient));opacity:1;width:50%}.dark .menu-icon-status-item[data-v-03028e15]:hover:before,.dark .menu-icon-status-item._hover[data-v-03028e15]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/.2)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:transparent var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/.1)var(--un-gradient-via-position),var(--un-gradient-to);--un-gradient-via-position:50%}.menu-icon-status-item-link[data-v-03028e15]:after{background-image:radial-gradient(circle at 1px 1px,rgb(229 229 229/var(--un-background-opacity))1px,transparent 0);--un-background-opacity:.8;z-index:-2;content:"";background-size:10px 10px;width:100%;height:100%;transition:all .4s ease-in-out;position:absolute;top:0;bottom:0;left:0;right:0;-webkit-mask-image:linear-gradient(165deg,#fff 30%,#0000 50%);mask-image:linear-gradient(165deg,#fff 30%,#0000 50%)}.menu-icon-status-item-link[data-v-03028e15]:after:hover{background-image:radial-gradient(circle at 1px 1px,oklch(85% var(--chromatic-chroma-300)calc(var(--chromatic-hue) + 0)/var(--un-background-opacity))1px,transparent 0);--un-background-opacity:%alpha}.dark .menu-icon-status-item-link[data-v-03028e15]:after{background-image:radial-gradient(circle at 1px 1px,rgb(64 64 64/var(--un-background-opacity))1px,transparent 0);--un-background-opacity:.4}.dark .menu-icon-status-item-link[data-v-03028e15]:after:hover{background-image:radial-gradient(circle at 1px 1px,oklch(90% var(--chromatic-chroma-200)calc(var(--chromatic-hue) + 0)/var(--un-background-opacity))1px,transparent 0);--un-background-opacity:%alpha}.menu-icon-status-item-icon-color[data-v-03028e15]{opacity:.5}.menu-icon-status-item:hover .menu-icon-status-item-title[data-v-03028e15],.menu-icon-status-item._hover .menu-icon-status-item-title[data-v-03028e15]{--un-text-opacity:1;color:oklch(54% var(--chromatic-chroma-600)calc(var(--chromatic-hue) + 0)/var(--un-text-opacity))}.menu-icon-status-item:hover .menu-icon-status-item-description[data-v-03028e15],.menu-icon-status-item._hover .menu-icon-status-item-description[data-v-03028e15]{--un-text-opacity:1;color:oklch(54% var(--chromatic-chroma-600)calc(var(--chromatic-hue) + 0)/var(--un-text-opacity));opacity:.8}.menu-icon-status-item:hover .menu-icon-status-item-icon[data-v-03028e15],.menu-icon-status-item._hover .menu-icon-status-item-icon[data-v-03028e15],.menu-icon-status-item:hover .menu-icon-status-item-icon-color[data-v-03028e15],.menu-icon-status-item._hover .menu-icon-status-item-icon-color[data-v-03028e15]{--un-text-opacity:1;color:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/var(--un-text-opacity));scale:1.2}.dark .menu-icon-status-item:hover .menu-icon-status-item-title[data-v-03028e15],.dark .menu-icon-status-item._hover .menu-icon-status-item-title[data-v-03028e15]{--un-text-opacity:1;color:oklch(85% var(--chromatic-chroma-300)calc(var(--chromatic-hue) + 0)/var(--un-text-opacity))}.dark .menu-icon-status-item:hover .menu-icon-status-item-description[data-v-03028e15],.dark .menu-icon-status-item._hover .menu-icon-status-item-description[data-v-03028e15]{--un-text-opacity:1;color:oklch(85% var(--chromatic-chroma-300)calc(var(--chromatic-hue) + 0)/var(--un-text-opacity));opacity:.8}.dark .menu-icon-status-item:hover .menu-icon-status-item-icon[data-v-03028e15],.dark .menu-icon-status-item._hover .menu-icon-status-item-icon[data-v-03028e15],.dark .menu-icon-status-item:hover .menu-icon-status-item-icon-color[data-v-03028e15],.dark .menu-icon-status-item._hover .menu-icon-status-item-icon-color[data-v-03028e15]{--un-text-opacity:1;color:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/var(--un-text-opacity))}.form_radio-card-detail[data-v-603e520f]{position:relative;overflow:hidden}.form_radio-card-detail[data-v-603e520f]:before{pointer-events:none;--un-gradient-from-position:0%;--un-gradient-from:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),var(--un-gradient-to);--un-gradient-shape:to right in oklch;--un-gradient:var(--un-gradient-shape),var(--un-gradient-stops);background-image:linear-gradient(var(--un-gradient));content:"";z-index:0;opacity:0;width:25%;height:100%;transition:all .35s ease-in-out;position:absolute;top:0;bottom:0;left:0;right:0;-webkit-mask-image:linear-gradient(120deg,#fff 100%);mask-image:linear-gradient(120deg,#fff 100%)}.dark .form_radio-card-detail[data-v-603e520f]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),var(--un-gradient-to)}.form_radio-card-detail[data-v-603e520f]:hover:before,.form_radio-card-detail._hover[data-v-603e520f]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/.2)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:transparent var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/.1)var(--un-gradient-via-position),var(--un-gradient-to);--un-gradient-via-position:50%;--un-gradient-shape:to right in oklch;--un-gradient:var(--un-gradient-shape),var(--un-gradient-stops);background-image:linear-gradient(var(--un-gradient));opacity:1;width:85%}.dark .form_radio-card-detail[data-v-603e520f]:hover:before,.dark .form_radio-card-detail._hover[data-v-603e520f]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/.2)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:transparent var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/.1)var(--un-gradient-via-position),var(--un-gradient-to);--un-gradient-via-position:50%}.form_radio-card-detail-active[data-v-603e520f]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/.2)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:transparent var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/.1)var(--un-gradient-via-position),var(--un-gradient-to);--un-gradient-via-position:50%;--un-gradient-shape:to right in oklch;--un-gradient:var(--un-gradient-shape),var(--un-gradient-stops);background-image:linear-gradient(var(--un-gradient));opacity:.5;width:85%}.dark .form_radio-card-detail-active[data-v-603e520f]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/.2)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:transparent var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/.1)var(--un-gradient-via-position),var(--un-gradient-to);--un-gradient-via-position:50%}input[type=search][data-v-7ad6d626]::-webkit-search-cancel-button{display:none}.form_radio-card-simple[data-v-0df44f43]{position:relative;overflow:hidden}.form_radio-card-simple[data-v-0df44f43]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),var(--un-gradient-to);--un-gradient-shape:to right in oklch;--un-gradient:var(--un-gradient-shape),var(--un-gradient-stops);background-image:linear-gradient(var(--un-gradient));content:"";z-index:0;opacity:0;width:25%;height:100%;transition:all .35s ease-in-out;position:absolute;top:0;bottom:0;left:0;right:0;-webkit-mask-image:linear-gradient(120deg,#fff 100%);mask-image:linear-gradient(120deg,#fff 100%)}.dark .form_radio-card-simple[data-v-0df44f43]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),var(--un-gradient-to)}.form_radio-card-simple[data-v-0df44f43]:hover:before,.form_radio-card-simple._hover[data-v-0df44f43]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/.2)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:transparent var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/.1)var(--un-gradient-via-position),var(--un-gradient-to);--un-gradient-via-position:50%;--un-gradient-shape:to right in oklch;--un-gradient:var(--un-gradient-shape),var(--un-gradient-stops);background-image:linear-gradient(var(--un-gradient));opacity:1;width:85%}.dark .form_radio-card-simple[data-v-0df44f43]:hover:before,.dark .form_radio-card-simple._hover[data-v-0df44f43]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/.2)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:transparent var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/.1)var(--un-gradient-via-position),var(--un-gradient-to);--un-gradient-via-position:50%}.form_radio-card-simple-active[data-v-0df44f43]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/.2)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:transparent var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/.1)var(--un-gradient-via-position),var(--un-gradient-to);--un-gradient-via-position:50%;--un-gradient-shape:to right in oklch;--un-gradient:var(--un-gradient-shape),var(--un-gradient-stops);background-image:linear-gradient(var(--un-gradient));opacity:.5;width:85%}.dark .form_radio-card-simple-active[data-v-0df44f43]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/.2)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:transparent var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/.1)var(--un-gradient-via-position),var(--un-gradient-to);--un-gradient-via-position:50%}.form_voice-card[data-v-a5ae8da9]{flex-direction:column;display:flex;position:relative;overflow:hidden}.form_voice-card[data-v-a5ae8da9]:before{pointer-events:none;--un-gradient-from-position:0%;--un-gradient-from:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),var(--un-gradient-to);--un-gradient-shape:to right in oklch;--un-gradient:var(--un-gradient-shape),var(--un-gradient-stops);background-image:linear-gradient(var(--un-gradient));content:"";z-index:0;opacity:0;width:25%;height:100%;transition:all .35s ease-in-out;position:absolute;top:0;bottom:0;left:0;right:0;-webkit-mask-image:linear-gradient(120deg,#fff 100%);mask-image:linear-gradient(120deg,#fff 100%)}.dark .form_voice-card[data-v-a5ae8da9]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),var(--un-gradient-to)}.form_voice-card[data-v-a5ae8da9]:hover:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/.2)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:transparent var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/.1)var(--un-gradient-via-position),var(--un-gradient-to);--un-gradient-via-position:50%;--un-gradient-shape:to right in oklch;--un-gradient:var(--un-gradient-shape),var(--un-gradient-stops);background-image:linear-gradient(var(--un-gradient));opacity:1;width:85%}.dark .form_voice-card[data-v-a5ae8da9]:hover:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/.2)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:transparent var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/.1)var(--un-gradient-via-position),var(--un-gradient-to);--un-gradient-via-position:50%}input[type=search][data-v-4dd3b9e2]::-webkit-search-cancel-button{display:none}.voice-card[data-v-4dd3b9e2]{flex-direction:column;display:flex;position:relative;overflow:hidden}.voice-card[data-v-4dd3b9e2]:before{pointer-events:none;--un-gradient-from-position:0%;--un-gradient-from:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),var(--un-gradient-to);--un-gradient-shape:to right in oklch;--un-gradient:var(--un-gradient-shape),var(--un-gradient-stops);background-image:linear-gradient(var(--un-gradient));content:"";z-index:0;opacity:0;width:25%;height:100%;transition:all .35s ease-in-out;position:absolute;top:0;bottom:0;left:0;right:0;-webkit-mask-image:linear-gradient(120deg,#fff 100%);mask-image:linear-gradient(120deg,#fff 100%)}.dark .voice-card[data-v-4dd3b9e2]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/0)var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),var(--un-gradient-to)}.voice-card[data-v-4dd3b9e2]:hover:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/.2)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:transparent var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),oklch(62% var(--chromatic-chroma-500)calc(var(--chromatic-hue) + 0)/.1)var(--un-gradient-via-position),var(--un-gradient-to);--un-gradient-via-position:50%;--un-gradient-shape:to right in oklch;--un-gradient:var(--un-gradient-shape),var(--un-gradient-stops);background-image:linear-gradient(var(--un-gradient));opacity:1;width:85%}.dark .voice-card[data-v-4dd3b9e2]:hover:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/.2)var(--un-gradient-from-position);--un-gradient-to-position:100%;--un-gradient-to:transparent var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from),oklch(74% var(--chromatic-chroma-400)calc(var(--chromatic-hue) + 0)/.1)var(--un-gradient-via-position),var(--un-gradient-to);--un-gradient-via-position:50%}.card-hover-effect[data-v-895421da]{transform-style:preserve-3d;transform-origin:50%;will-change:transform;transition:transform .3s cubic-bezier(.23,1,.32,1)}.card-hover-effect[data-v-895421da]:before,.card-hover-effect[data-v-895421da]:after{content:"";pointer-events:none;background-repeat:no-repeat;transition:all .33s;position:absolute;top:0;bottom:0;left:0;right:0}.card-hover-effect[data-v-895421da]:before{background-position:var(--card-position-x)var(--card-position-y);background-size:300% 300%;background-image:linear-gradient(115deg,transparent 0%,rgba(var(--color-primary-500),calc(.3*var(--effect-intensity)))25%,transparent 47%,transparent 53%,rgba(var(--color-primary-600),calc(.3*var(--effect-intensity)))75%,transparent 100%);opacity:calc(.5*var(--effect-intensity));filter:brightness(.5)contrast();z-index:1;mix-blend-mode:color-dodge}.card-hover-effect[data-v-895421da]:after{background-position:var(--sparkle-position-x)var(--sparkle-position-y);background-size:160%;background-image:linear-gradient(125deg,rgba(var(--color-primary-500),calc(.3*var(--effect-intensity)))15%,rgba(var(--color-primary-400),calc(.25*var(--effect-intensity)))30%,rgba(var(--color-primary-300),calc(.2*var(--effect-intensity)))40%,rgba(var(--color-primary-200),calc(.1*var(--effect-intensity)))60%,rgba(var(--color-primary-400),calc(.25*var(--effect-intensity)))70%,rgba(var(--color-primary-500),calc(.3*var(--effect-intensity)))85%);background-blend-mode:overlay;opacity:calc(var(--sparkle-opacity)*var(--effect-intensity));filter:brightness()contrast();z-index:2;mix-blend-mode:color-dodge}.card-hover-effect[data-v-895421da]:hover:before{opacity:calc(.88*var(--effect-intensity));filter:brightness(.66)contrast(1.33)}.card-hover-effect[data-v-895421da]:hover:after{opacity:var(--effect-intensity);filter:brightness(1.1)contrast(1.2)}.animate-stripe[data-v-995d62cc]{background-image:repeating-linear-gradient(-45deg,#f472b6,#f472b6 25px,#f9a8d4 25px 50px);background-size:150% 100%;animation:2s linear infinite progress-995d62cc}@-webkit-keyframes progress-995d62cc{0%{background-position:0 0}to{background-position:-75px 0}}@-moz-keyframes progress-995d62cc{0%{background-position:0 0}to{background-position:-75px 0}}@keyframes progress-995d62cc{0%{background-position:0 0}to{background-position:-70px 0}} diff --git a/assets/components-BFLl4u81.js b/assets/components-DHUA669a.js similarity index 98% rename from assets/components-BFLl4u81.js rename to assets/components-DHUA669a.js index a2bec3c9e043e54e4ebad766bf4df8cd567a9492..155b2e1b22ad0193d7807de960d645a7815c7fac 100644 --- a/assets/components-BFLl4u81.js +++ b/assets/components-DHUA669a.js @@ -1,5 +1,5 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/__vite-browser-external-Ct7_N7cf.js","assets/__vite-browser-external-CCfYMxZl.js","assets/index-CuCRViVh.js","assets/index-10xSVpcK.css","assets/default-node-C5y-aJTF.js","assets/import-url-browser-CajlDqRn.js","assets/import-url-browser-DNuYZxPr.js","assets/duckdb-mvp-C3i5IjU8.js","assets/import-url-node-BGiLk3V8.js"])))=>i.map(i=>d[i]); -var e=function(exports){function t(e){"@babel/helpers - typeof";return t=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},t(e)}function n(e,n){if(t(e)!=`object`||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,n||`default`);if(t(i)!=`object`)return i;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(n===`string`?String:Number)(e)}function r(e){var r=n(e,`string`);return t(r)==`symbol`?r:r+``}function i(e,t,n){return(t=r(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}return exports.defineProperty=i,exports}({});import{AdditiveBlending as t,AlwaysStencilFunc as n,AnimationMixer as r,Audio as i,AudioListener as a,AudioLoader as o,BackSide as s,Box2 as c,Box3 as l,BoxGeometry as u,BufferAttribute as d,BufferGeometry as f,CatmullRomCurve3 as p,ClampToEdgeWrapping as m,Color as h,CompressedTexture as g,CubeCamera as _,CubeReflectionMapping as v,CubeTextureLoader as y,CylinderGeometry as b,DataTexture as x,DataTextureLoader as S,DataUtils as C,DepthTexture as w,DoubleSide as T,EdgesGeometry as E,Ee as D,EquirectangularReflectionMapping as O,Euler as k,EventDispatcher as A,ExtrudeGeometry as j,FileLoader as M,Float32BufferAttribute as N,FloatType as ee,Fragment as P,FrontSide as F,Group as I,HalfFloatType as te,InstancedBufferGeometry as ne,InstancedInterleavedBuffer as L,InstancedMesh as re,InterleavedBuffer as R,InterleavedBufferAttribute as ie,InterpolateDiscrete as ae,InterpolateLinear as oe,Ir as se,Line as ce,Line3 as le,LineBasicMaterial as ue,LinearFilter as de,LinearMipmapLinearFilter as fe,LinearMipmapNearestFilter as pe,Loader as me,MOUSE as he,Material as ge,MathUtils as _e,Matrix3 as ve,Matrix4 as ye,Mesh as be,MeshBasicMaterial as xe,MeshDepthMaterial as Se,MeshStandardMaterial as Ce,MirroredRepeatWrapping as we,Mn as Te,NearestFilter as Ee,NearestMipmapLinearFilter as De,NearestMipmapNearestFilter as Oe,NoToneMapping as ke,Object3D as Ae,OctahedronGeometry as je,OrthographicCamera as Me,Path as Ne,PerspectiveCamera as Pe,Plane as Fe,PlaneGeometry as Ie,PropertyBinding as Le,Q as Re,QuadraticBezierCurve3 as ze,Quaternion as Be,REVISION as Ve,RGBAFormat as He,RawShaderMaterial as Ue,Ray as We,Raycaster as Ge,RepeatWrapping as Ke,ReplaceStencilOp as qe,Scene as Je,ShaderChunk as Ye,ShaderMaterial as Xe,Shape as Ze,ShapeGeometry as Qe,ShapePath as $e,ShapeUtils as et,SkinnedMesh as tt,Sphere as nt,SphereGeometry as rt,Spherical as it,TOUCH as at,Texture as ot,TextureLoader as st,TorusGeometry as ct,Triangle as lt,Uniform as ut,UniformsLib as dt,UniformsUtils as ft,Vector2 as pt,Vector3 as z,Vector4 as mt,Vn as ht,WebGLCubeRenderTarget as gt,WebGLRenderTarget as _t,WebGLRenderer as vt,WireframeGeometry as yt,__commonJSMin as bt,__export as xt,__plugin_vue_export_helper_default as St,__require as Ct,__toDynamicImportESM as wt,__toESM as Tt,__vitePreload as Et,breakpointsTailwind as Dt,computed as Ot,createBaseVNode as B,createBlock as kt,createCommentVNode as At,createElementBlock as V,createTextVNode as jt,createVNode as Mt,defineComponent as H,defu as Nt,dn as Pt,formatHex as Ft,getCurrentInstance as It,getCurrentScope as Lt,guardReactiveProps as Rt,io as zt,isReactive as Bt,isRef as Vt,mergeModels as Ht,mergeProps as Ut,nextTick as Wt,normalizeClass as Gt,normalizeProps as Kt,normalizeStyle as qt,onBeforeUnmount as Jt,onMounted as Yt,onScopeDispose as Xt,onUnmounted as Zt,openBlock as U,pe as Qt,reactive as $t,ref as W,render as en,renderList as tn,renderSlot as nn,resolveComponent as rn,resolveDirective as an,shallowReactive as on,shallowRef as sn,so as cn,storeToRefs as ln,toDisplayString as un,toRaw as dn,toRef as fn,toRefs as pn,toValue$1 as mn,unref as G,useAttrs as hn,useBreakpoints as gn,useDark as _n,useDebounceFn as vn,useElementBounding as yn,useI18n as bn,useModel as xn,useRouter as Sn,useSettings as Cn,useSlots as wn,useWindowSize as Tn,vModelCheckbox as En,vModelRadio as Dn,vModelSelect as On,vModelText as kn,watch as K,watchDebounced as An,watchEffect as jn,withAsyncContext as Mn,withCtx as Nn,withDirectives as Pn,withModifiers as Fn}from"./index-CuCRViVh.js";import{getImportUrlBundles as In}from"./import-url-browser-DNuYZxPr.js";import{generateSpeech as Ln,useAudioContext as Rn,useChatStore as zn,useProvidersStore as Bn,useSpeakingStore as Vn,useSpeechStore as Hn}from"./stores-m0eA85gd.js";import{Collapsable_default as Un,TransitionVertical_default as Wn}from"./Button-DFhzbYVt.js";import{FieldCheckbox_default as Gn,FieldInput_default as Kn,Input_default as qn}from"./src-C2QbIOor.js";import{VRMUtils as Jn,clipFromVRMAnimation as Yn,lerp as Xn,loadVRMAnimation as Zn,loadVrm as Qn,randFloat as $n,randomSaccadeInterval as er,useBlink as tr,useIdleEyeSaccades as nr,useMarkdown as rr,useVRMEmote as ir}from"./composables-Cgvkd8lL.js";import{useQueue as ar}from"./queue-DAKPJQl1.js";import{EMOTION_EmotionMotionName_value as or,EMOTION_VRMExpressionName_value as sr,EmotionThinkMotionName as cr,llmInferenceEndToken as lr,useDelayMessageQueue as ur,useEmotionsMessageQueue as dr,useMessageContentQueue as fr}from"./queues-Dstwm1VQ.js";var pr,mr,hr,gr,_r,vr,yr,br,xr,Sr,Cr,wr,Tr,Er,Dr,Or,kr,Ar,jr,Mr,Nr,Pr,Fr,Ir,Lr,Rr,zr,Br,Vr,Hr,Ur,Wr,Gr,Kr,qr,Jr,Yr,Xr,Zr,Qr,$r,ei,ti,ni,ri,ii,ai,oi,si,ci,li,ui,di,fi,pi,mi,hi,gi,_i,vi,yi,bi,xi,Si,Ci,wi,Ti,Ei,Di,Oi,ki,Ai,ji,Mi,Ni,Pi,Fi,Ii,Li,Ri,zi,Bi,Vi,Hi,Ui,Wi,Gi,Ki,qi,Ji,Yi,Xi,Zi,Qi,$i;let ea,ta,na,ra;var ia=H({__name:`AudioSpectrum`,props:{stream:null,bars:{default:32},minFreq:{default:60},maxFreq:{default:4e3}},setup(e){let t=e,n=W(Array.from({length:t.bars}).fill(0));Yt(()=>{r()}),K(()=>t.stream,()=>{r()});function r(){if(!t.stream)return;let e=new(window.AudioContext||window.webkitAudioContext),r=e.createMediaStreamSource(t.stream),i=e.createAnalyser();i.fftSize=2048,r.connect(i);let a=i.frequencyBinCount,o=new Uint8Array(a),s=e.sampleRate,c=s/i.fftSize,l=Math.floor(t.minFreq/c),u=Math.floor(t.maxFreq/c),d=u-l,f=Math.floor(d/t.bars),p=()=>{try{requestAnimationFrame(p),i.getByteFrequencyData(o);let e=Array.from({length:t.bars}).fill(0);for(let n=0;nnn(e.$slots,`default`,{frequencies:n.value})}}),aa=ia;const oa={"h-full":``,flex:``,"items-center":``,"gap-1":``},sa=5;var ca=H({__name:`AudioSpectrumVisualizer`,props:{frequencies:null,barsClass:null},setup(e){let t=e;function n(e,t){let n=.1,r=1;return n+(r-n)*(e/t)}function r(e,r){let i=n(r,t.frequencies.length);return Math.min(100,Math.max(10,e*100*sa*i))}return(t,n)=>(U(),V(`div`,oa,[(U(!0),V(P,null,tn(e.frequencies,(t,n)=>(U(),V(`div`,{key:n,"h-full":``,flex:``,"flex-1":``,"items-end":``},[B(`div`,{transition:`all 100 ease-in-out`,"mx-auto":``,"my-0":``,"w-full":``,"rounded-full":``,class:Gt(e.barsClass),style:qt({height:`${r(t,n)}%`})},null,6)]))),128))]))}}),la=ca,ua=H({__name:`Volumed`,props:{perspective:null,transform:null},setup(e){return(t,n)=>(U(),V(`div`,{class:`volumed`,style:qt({perspective:`${e.perspective}px`,transform:e.transform})},[nn(t.$slots,`default`,{},void 0,!0)],4))}}),da=St(ua,[[`__scopeId`,`data-v-568551bc`]]),fa=H({__name:`CursorMomentum`,props:{baseSpeed:{default:.1},friction:{default:.95},momentumFactor:{default:.005}},setup(e,{expose:t}){let n=e,r=W(1),i=W(0),a=0,o=fn(()=>n.friction),s=fn(()=>n.baseSpeed),c=fn(()=>n.momentumFactor);function l(e){a||=e;let t=e-a;a=e,r.value=s.value+(r.value-s.value)*o.value,i.value+=r.value*t,requestAnimationFrame(l)}function u(e){let t=Math.sqrt(e.movementX**2+e.movementY**2);r.value+=t*c.value}return Yt(()=>{window.addEventListener(`mousemove`,u),requestAnimationFrame(l)}),Zt(()=>{window.removeEventListener(`mousemove`,u)}),t({momentum:r,currentValue:i}),(e,t)=>nn(e.$slots,`default`,{momentum:r.value,currentValue:i.value})}}),pa=fa,ma=H({__name:`TestDummyMarkerFlat`,props:{size:null},setup(e){return(t,n)=>(U(),V(`div`,{class:`test-dummy-flat`,style:qt({width:`${e.size}px`,height:`${e.size}px`})},n[0]||=[B(`div`,{class:`marker`},null,-1)],4))}}),ha=St(ma,[[`__scopeId`,`data-v-b4ef37ac`]]),ga=H({__name:`TestDummyMarker`,setup(e){return(e,t)=>(U(),kt(pa,{"base-speed":.1,friction:.95,"momentum-factor":5e-4},{default:Nn(({currentValue:e})=>[Mt(da,{perspective:800,transform:`rotateX(45deg) translateY(3px)`},{default:Nn(()=>[Mt(ha,{size:24,style:qt({transform:`rotate(${e}deg)`})},null,8,[`style`])]),_:2},1024)]),_:1}))}}),_a=ga,va;(function(e){e[e.WEBGL_LEGACY=0]=`WEBGL_LEGACY`,e[e.WEBGL=1]=`WEBGL`,e[e.WEBGL2=2]=`WEBGL2`})(va||={});var ya;(function(e){e[e.UNKNOWN=0]=`UNKNOWN`,e[e.WEBGL=1]=`WEBGL`,e[e.CANVAS=2]=`CANVAS`})(ya||={});var ba;(function(e){e[e.COLOR=16384]=`COLOR`,e[e.DEPTH=256]=`DEPTH`,e[e.STENCIL=1024]=`STENCIL`})(ba||={});var xa;(function(e){e[e.NORMAL=0]=`NORMAL`,e[e.ADD=1]=`ADD`,e[e.MULTIPLY=2]=`MULTIPLY`,e[e.SCREEN=3]=`SCREEN`,e[e.OVERLAY=4]=`OVERLAY`,e[e.DARKEN=5]=`DARKEN`,e[e.LIGHTEN=6]=`LIGHTEN`,e[e.COLOR_DODGE=7]=`COLOR_DODGE`,e[e.COLOR_BURN=8]=`COLOR_BURN`,e[e.HARD_LIGHT=9]=`HARD_LIGHT`,e[e.SOFT_LIGHT=10]=`SOFT_LIGHT`,e[e.DIFFERENCE=11]=`DIFFERENCE`,e[e.EXCLUSION=12]=`EXCLUSION`,e[e.HUE=13]=`HUE`,e[e.SATURATION=14]=`SATURATION`,e[e.COLOR=15]=`COLOR`,e[e.LUMINOSITY=16]=`LUMINOSITY`,e[e.NORMAL_NPM=17]=`NORMAL_NPM`,e[e.ADD_NPM=18]=`ADD_NPM`,e[e.SCREEN_NPM=19]=`SCREEN_NPM`,e[e.NONE=20]=`NONE`,e[e.SRC_OVER=0]=`SRC_OVER`,e[e.SRC_IN=21]=`SRC_IN`,e[e.SRC_OUT=22]=`SRC_OUT`,e[e.SRC_ATOP=23]=`SRC_ATOP`,e[e.DST_OVER=24]=`DST_OVER`,e[e.DST_IN=25]=`DST_IN`,e[e.DST_OUT=26]=`DST_OUT`,e[e.DST_ATOP=27]=`DST_ATOP`,e[e.ERASE=26]=`ERASE`,e[e.SUBTRACT=28]=`SUBTRACT`,e[e.XOR=29]=`XOR`})(xa||={});var Sa;(function(e){e[e.POINTS=0]=`POINTS`,e[e.LINES=1]=`LINES`,e[e.LINE_LOOP=2]=`LINE_LOOP`,e[e.LINE_STRIP=3]=`LINE_STRIP`,e[e.TRIANGLES=4]=`TRIANGLES`,e[e.TRIANGLE_STRIP=5]=`TRIANGLE_STRIP`,e[e.TRIANGLE_FAN=6]=`TRIANGLE_FAN`})(Sa||={});var Ca;(function(e){e[e.RGBA=6408]=`RGBA`,e[e.RGB=6407]=`RGB`,e[e.RG=33319]=`RG`,e[e.RED=6403]=`RED`,e[e.RGBA_INTEGER=36249]=`RGBA_INTEGER`,e[e.RGB_INTEGER=36248]=`RGB_INTEGER`,e[e.RG_INTEGER=33320]=`RG_INTEGER`,e[e.RED_INTEGER=36244]=`RED_INTEGER`,e[e.ALPHA=6406]=`ALPHA`,e[e.LUMINANCE=6409]=`LUMINANCE`,e[e.LUMINANCE_ALPHA=6410]=`LUMINANCE_ALPHA`,e[e.DEPTH_COMPONENT=6402]=`DEPTH_COMPONENT`,e[e.DEPTH_STENCIL=34041]=`DEPTH_STENCIL`})(Ca||={});var wa;(function(e){e[e.TEXTURE_2D=3553]=`TEXTURE_2D`,e[e.TEXTURE_CUBE_MAP=34067]=`TEXTURE_CUBE_MAP`,e[e.TEXTURE_2D_ARRAY=35866]=`TEXTURE_2D_ARRAY`,e[e.TEXTURE_CUBE_MAP_POSITIVE_X=34069]=`TEXTURE_CUBE_MAP_POSITIVE_X`,e[e.TEXTURE_CUBE_MAP_NEGATIVE_X=34070]=`TEXTURE_CUBE_MAP_NEGATIVE_X`,e[e.TEXTURE_CUBE_MAP_POSITIVE_Y=34071]=`TEXTURE_CUBE_MAP_POSITIVE_Y`,e[e.TEXTURE_CUBE_MAP_NEGATIVE_Y=34072]=`TEXTURE_CUBE_MAP_NEGATIVE_Y`,e[e.TEXTURE_CUBE_MAP_POSITIVE_Z=34073]=`TEXTURE_CUBE_MAP_POSITIVE_Z`,e[e.TEXTURE_CUBE_MAP_NEGATIVE_Z=34074]=`TEXTURE_CUBE_MAP_NEGATIVE_Z`})(wa||={});var Ta;(function(e){e[e.UNSIGNED_BYTE=5121]=`UNSIGNED_BYTE`,e[e.UNSIGNED_SHORT=5123]=`UNSIGNED_SHORT`,e[e.UNSIGNED_SHORT_5_6_5=33635]=`UNSIGNED_SHORT_5_6_5`,e[e.UNSIGNED_SHORT_4_4_4_4=32819]=`UNSIGNED_SHORT_4_4_4_4`,e[e.UNSIGNED_SHORT_5_5_5_1=32820]=`UNSIGNED_SHORT_5_5_5_1`,e[e.UNSIGNED_INT=5125]=`UNSIGNED_INT`,e[e.UNSIGNED_INT_10F_11F_11F_REV=35899]=`UNSIGNED_INT_10F_11F_11F_REV`,e[e.UNSIGNED_INT_2_10_10_10_REV=33640]=`UNSIGNED_INT_2_10_10_10_REV`,e[e.UNSIGNED_INT_24_8=34042]=`UNSIGNED_INT_24_8`,e[e.UNSIGNED_INT_5_9_9_9_REV=35902]=`UNSIGNED_INT_5_9_9_9_REV`,e[e.BYTE=5120]=`BYTE`,e[e.SHORT=5122]=`SHORT`,e[e.INT=5124]=`INT`,e[e.FLOAT=5126]=`FLOAT`,e[e.FLOAT_32_UNSIGNED_INT_24_8_REV=36269]=`FLOAT_32_UNSIGNED_INT_24_8_REV`,e[e.HALF_FLOAT=36193]=`HALF_FLOAT`})(Ta||={});var Ea;(function(e){e[e.FLOAT=0]=`FLOAT`,e[e.INT=1]=`INT`,e[e.UINT=2]=`UINT`})(Ea||={});var Da;(function(e){e[e.NEAREST=0]=`NEAREST`,e[e.LINEAR=1]=`LINEAR`})(Da||={});var Oa;(function(e){e[e.CLAMP=33071]=`CLAMP`,e[e.REPEAT=10497]=`REPEAT`,e[e.MIRRORED_REPEAT=33648]=`MIRRORED_REPEAT`})(Oa||={});var ka;(function(e){e[e.OFF=0]=`OFF`,e[e.POW2=1]=`POW2`,e[e.ON=2]=`ON`,e[e.ON_MANUAL=3]=`ON_MANUAL`})(ka||={});var Aa;(function(e){e[e.NPM=0]=`NPM`,e[e.UNPACK=1]=`UNPACK`,e[e.PMA=2]=`PMA`,e[e.NO_PREMULTIPLIED_ALPHA=0]=`NO_PREMULTIPLIED_ALPHA`,e[e.PREMULTIPLY_ON_UPLOAD=1]=`PREMULTIPLY_ON_UPLOAD`,e[e.PREMULTIPLY_ALPHA=2]=`PREMULTIPLY_ALPHA`,e[e.PREMULTIPLIED_ALPHA=2]=`PREMULTIPLIED_ALPHA`})(Aa||={});var ja;(function(e){e[e.NO=0]=`NO`,e[e.YES=1]=`YES`,e[e.AUTO=2]=`AUTO`,e[e.BLEND=0]=`BLEND`,e[e.CLEAR=1]=`CLEAR`,e[e.BLIT=2]=`BLIT`})(ja||={});var Ma;(function(e){e[e.AUTO=0]=`AUTO`,e[e.MANUAL=1]=`MANUAL`})(Ma||={});var Na;(function(e){e.LOW=`lowp`,e.MEDIUM=`mediump`,e.HIGH=`highp`})(Na||={});var Pa;(function(e){e[e.NONE=0]=`NONE`,e[e.SCISSOR=1]=`SCISSOR`,e[e.STENCIL=2]=`STENCIL`,e[e.SPRITE=3]=`SPRITE`,e[e.COLOR=4]=`COLOR`})(Pa||={});var Fa;(function(e){e[e.RED=1]=`RED`,e[e.GREEN=2]=`GREEN`,e[e.BLUE=4]=`BLUE`,e[e.ALPHA=8]=`ALPHA`})(Fa||={});var Ia;(function(e){e[e.NONE=0]=`NONE`,e[e.LOW=2]=`LOW`,e[e.MEDIUM=4]=`MEDIUM`,e[e.HIGH=8]=`HIGH`})(Ia||={});var La;(function(e){e[e.ELEMENT_ARRAY_BUFFER=34963]=`ELEMENT_ARRAY_BUFFER`,e[e.ARRAY_BUFFER=34962]=`ARRAY_BUFFER`,e[e.UNIFORM_BUFFER=35345]=`UNIFORM_BUFFER`})(La||={});var Ra={createCanvas:function(e,t){var n=document.createElement(`canvas`);return n.width=e,n.height=t,n},getWebGLRenderingContext:function(){return WebGLRenderingContext},getNavigator:function(){return navigator},getBaseUrl:function(){var e;return(e=document.baseURI)??window.location.href},fetch:function(e,t){return fetch(e,t)}},za=/iPhone/i,Ba=/iPod/i,Va=/iPad/i,Ha=/\biOS-universal(?:.+)Mac\b/i,Ua=/\bAndroid(?:.+)Mobile\b/i,Wa=/Android/i,Ga=/(?:SD4930UR|\bSilk(?:.+)Mobile\b)/i,Ka=/Silk/i,qa=/Windows Phone/i,Ja=/\bWindows(?:.+)ARM\b/i,Ya=/BlackBerry/i,Xa=/BB10/i,Za=/Opera Mini/i,Qa=/\b(CriOS|Chrome)(?:.+)Mobile/i,$a=/Mobile(?:.+)Firefox\b/i,eo=function(e){return e!==void 0&&e.platform===`MacIntel`&&typeof e.maxTouchPoints==`number`&&e.maxTouchPoints>1&&typeof MSStream>`u`};function to(e){return function(t){return t.test(e)}}function no(e){var t={userAgent:``,platform:``,maxTouchPoints:0};!e&&typeof navigator<`u`?t={userAgent:navigator.userAgent,platform:navigator.platform,maxTouchPoints:navigator.maxTouchPoints||0}:typeof e==`string`?t.userAgent=e:e&&e.userAgent&&(t={userAgent:e.userAgent,platform:e.platform,maxTouchPoints:e.maxTouchPoints||0});var n=t.userAgent,r=n.split(`[FBAN`);r[1]!==void 0&&(n=r[0]),r=n.split(`Twitter`),r[1]!==void 0&&(n=r[0]);var i=to(n),a={apple:{phone:i(za)&&!i(qa),ipod:i(Ba),tablet:!i(za)&&(i(Va)||eo(t))&&!i(qa),universal:i(Ha),device:(i(za)||i(Ba)||i(Va)||i(Ha)||eo(t))&&!i(qa)},amazon:{phone:i(Ga),tablet:!i(Ga)&&i(Ka),device:i(Ga)||i(Ka)},android:{phone:!i(qa)&&i(Ga)||!i(qa)&&i(Ua),tablet:!i(qa)&&!i(Ga)&&!i(Ua)&&(i(Ka)||i(Wa)),device:!i(qa)&&(i(Ga)||i(Ka)||i(Ua)||i(Wa))||i(/\bokhttp\b/i)},windows:{phone:i(qa),tablet:i(Ja),device:i(qa)||i(Ja)},other:{blackberry:i(Ya),blackberry10:i(Xa),opera:i(Za),firefox:i($a),chrome:i(Qa),device:i(Ya)||i(Xa)||i(Za)||i($a)||i(Qa)},any:!1,phone:!1,tablet:!1};return a.any=a.apple.device||a.android.device||a.windows.device||a.other.device,a.phone=a.apple.phone||a.android.phone||a.windows.phone,a.tablet=a.apple.tablet||a.android.tablet||a.windows.tablet,a}var ro=no(globalThis.navigator);function io(){return!ro.apple.device}function ao(e){var t=!0;if(ro.tablet||ro.phone){if(ro.apple.device){var n=navigator.userAgent.match(/OS (\d+)_(\d+)?/);if(n){var r=parseInt(n[1],10);r<11&&(t=!1)}}if(ro.android.device){var n=navigator.userAgent.match(/Android\s([0-9.]*)/);if(n){var r=parseInt(n[1],10);r<7&&(t=!1)}}}return t?e:4}var oo={ADAPTER:Ra,MIPMAP_TEXTURES:ka.POW2,ANISOTROPIC_LEVEL:0,RESOLUTION:1,FILTER_RESOLUTION:1,FILTER_MULTISAMPLE:Ia.NONE,SPRITE_MAX_TEXTURES:ao(32),SPRITE_BATCH_SIZE:4096,RENDER_OPTIONS:{view:null,width:800,height:600,autoDensity:!1,backgroundColor:0,backgroundAlpha:1,useContextAlpha:!0,clearBeforeRender:!0,antialias:!1,preserveDrawingBuffer:!1},GC_MODE:Ma.AUTO,GC_MAX_IDLE:60*60,GC_MAX_CHECK_COUNT:60*10,WRAP_MODE:Oa.CLAMP,SCALE_MODE:Da.LINEAR,PRECISION_VERTEX:Na.HIGH,PRECISION_FRAGMENT:ro.apple.device?Na.HIGH:Na.MEDIUM,CAN_UPLOAD_SAME_BUFFER:io(),CREATE_IMAGE_BITMAP:!1,ROUND_PIXELS:!1},so=bt((exports,t)=>{var n=Object.prototype.hasOwnProperty,r=`~`;function i(){}Object.create&&(i.prototype=Object.create(null),new i().__proto__||(r=!1));function a(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function o(e,t,n,i,o){if(typeof n!=`function`)throw TypeError(`The listener must be a function`);var s=new a(n,i||e,o),c=r?r+t:t;return e._events[c]?e._events[c].fn?e._events[c]=[e._events[c],s]:e._events[c].push(s):(e._events[c]=s,e._eventsCount++),e}function s(e,t){--e._eventsCount===0?e._events=new i:delete e._events[t]}function c(){this._events=new i,this._eventsCount=0}c.prototype.eventNames=function(){var e=[],t,i;if(this._eventsCount===0)return e;for(i in t=this._events)n.call(t,i)&&e.push(r?i.slice(1):i);return Object.getOwnPropertySymbols?e.concat(Object.getOwnPropertySymbols(t)):e},c.prototype.listeners=function(e){var t=r?r+e:e,n=this._events[t];if(!n)return[];if(n.fn)return[n.fn];for(var i=0,a=n.length,o=Array(a);i{t.exports=n,t.exports.default=n;function n(e,t,n){n||=2;var i=t&&t.length,o=i?t[0]*n:e.length,s=r(e,0,o,n,!0),c=[];if(!s||s.next===s.prev)return c;var l,d,f,p,m,h,g;if(i&&(s=u(e,t,s,n)),e.length>80*n){l=f=e[0],d=p=e[1];for(var _=n;_f&&(f=m),h>p&&(p=h);g=Math.max(f-l,p-d),g=g===0?0:32767/g}return a(s,c,n,l,d,g,0),c}function r(e,t,n,r,i){var a,o;if(i===N(e,t,n,r)>0)for(a=t;a=t;a-=r)o=A(a,e[a],e[a+1],o);return o&&S(o,o.next)&&(j(o),o=o.next),o}function i(e,t){if(!e)return e;t||=e;var n=e,r;do if(r=!1,!n.steiner&&(S(n,n.next)||x(n.prev,n,n.next)===0)){if(j(n),n=t=n.prev,n===n.next)break;r=!0}else n=n.next;while(r||n!==t);return t}function a(e,t,n,r,u,d,f){if(e){!f&&d&&h(e,r,u,d);for(var p=e,m,g;e.prev!==e.next;){if(m=e.prev,g=e.next,d?s(e,r,u,d):o(e)){t.push(m.i/n|0),t.push(e.i/n|0),t.push(g.i/n|0),j(e),e=g.next,p=g.next;continue}if(e=g,e===p){f?f===1?(e=c(i(e),t,n),a(e,t,n,r,u,d,2)):f===2&&l(e,t,n,r,u,d):a(i(e),t,n,r,u,d,1);break}}}}function o(e){var t=e.prev,n=e,r=e.next;if(x(t,n,r)>=0)return!1;for(var i=t.x,a=n.x,o=r.x,s=t.y,c=n.y,l=r.y,u=ia?i>o?i:o:a>o?a:o,p=s>c?s>l?s:l:c>l?c:l,m=r.next;m!==t;){if(m.x>=u&&m.x<=f&&m.y>=d&&m.y<=p&&y(i,s,a,c,o,l,m.x,m.y)&&x(m.prev,m,m.next)>=0)return!1;m=m.next}return!0}function s(e,t,n,r){var i=e.prev,a=e,o=e.next;if(x(i,a,o)>=0)return!1;for(var s=i.x,c=a.x,l=o.x,u=i.y,d=a.y,f=o.y,p=sc?s>l?s:l:c>l?c:l,g=u>d?u>f?u:f:d>f?d:f,v=_(p,m,t,n,r),b=_(h,g,t,n,r),S=e.prevZ,C=e.nextZ;S&&S.z>=v&&C&&C.z<=b;){if(S.x>=p&&S.x<=h&&S.y>=m&&S.y<=g&&S!==i&&S!==o&&y(s,u,c,d,l,f,S.x,S.y)&&x(S.prev,S,S.next)>=0||(S=S.prevZ,C.x>=p&&C.x<=h&&C.y>=m&&C.y<=g&&C!==i&&C!==o&&y(s,u,c,d,l,f,C.x,C.y)&&x(C.prev,C,C.next)>=0))return!1;C=C.nextZ}for(;S&&S.z>=v;){if(S.x>=p&&S.x<=h&&S.y>=m&&S.y<=g&&S!==i&&S!==o&&y(s,u,c,d,l,f,S.x,S.y)&&x(S.prev,S,S.next)>=0)return!1;S=S.prevZ}for(;C&&C.z<=b;){if(C.x>=p&&C.x<=h&&C.y>=m&&C.y<=g&&C!==i&&C!==o&&y(s,u,c,d,l,f,C.x,C.y)&&x(C.prev,C,C.next)>=0)return!1;C=C.nextZ}return!0}function c(e,t,n){var r=e;do{var a=r.prev,o=r.next.next;!S(a,o)&&C(a,r,r.next,o)&&D(a,o)&&D(o,a)&&(t.push(a.i/n|0),t.push(r.i/n|0),t.push(o.i/n|0),j(r),j(r.next),r=e=o),r=r.next}while(r!==e);return i(r)}function l(e,t,n,r,o,s){var c=e;do{for(var l=c.next.next;l!==c.prev;){if(c.i!==l.i&&b(c,l)){var u=k(c,l);c=i(c,c.next),u=i(u,u.next),a(c,t,n,r,o,s,0),a(u,t,n,r,o,s,0);return}l=l.next}c=c.next}while(c!==e)}function u(e,t,n,i){var a=[],o,s,c,l,u;for(o=0,s=t.length;o=n.next.y&&n.next.y!==n.y){var s=n.x+(i-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(s<=r&&s>a&&(a=s,o=n.x=n.x&&n.x>=l&&r!==n.x&&y(io.x||n.x===o.x&&m(o,n)))&&(o=n,d=f)),n=n.next;while(n!==c);return o}function m(e,t){return x(e.prev,e,t.prev)<0&&x(t.next,e,e.next)<0}function h(e,t,n,r){var i=e;do i.z===0&&(i.z=_(i.x,i.y,t,n,r)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next;while(i!==e);i.prevZ.nextZ=null,i.prevZ=null,g(i)}function g(e){var t,n,r,i,a,o,s,c,l=1;do{for(n=e,e=null,a=null,o=0;n;){for(o++,r=n,s=0,t=0;t0||c>0&&r;)s!==0&&(c===0||!r||n.z<=r.z)?(i=n,n=n.nextZ,s--):(i=r,r=r.nextZ,c--),a?a.nextZ=i:e=i,i.prevZ=a,a=i;n=r}a.nextZ=null,l*=2}while(o>1);return e}function _(e,t,n,r,i){return e=(e-n)*i|0,t=(t-r)*i|0,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,t=(t|t<<8)&16711935,t=(t|t<<4)&252645135,t=(t|t<<2)&858993459,t=(t|t<<1)&1431655765,e|t<<1}function v(e){var t=e,n=e;do(t.x=(e-o)*(a-s)&&(e-o)*(r-s)>=(n-o)*(t-s)&&(n-o)*(a-s)>=(i-o)*(r-s)}function b(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!E(e,t)&&(D(e,t)&&D(t,e)&&O(e,t)&&(x(e.prev,e,t.prev)||x(e,t.prev,t))||S(e,t)&&x(e.prev,e,e.next)>0&&x(t.prev,t,t.next)>0)}function x(e,t,n){return(t.y-e.y)*(n.x-t.x)-(t.x-e.x)*(n.y-t.y)}function S(e,t){return e.x===t.x&&e.y===t.y}function C(e,t,n,r){var i=T(x(e,t,n)),a=T(x(e,t,r)),o=T(x(n,r,e)),s=T(x(n,r,t));return!!(i!==a&&o!==s||i===0&&w(e,n,t)||a===0&&w(e,r,t)||o===0&&w(n,e,r)||s===0&&w(n,t,r))}function w(e,t,n){return t.x<=Math.max(e.x,n.x)&&t.x>=Math.min(e.x,n.x)&&t.y<=Math.max(e.y,n.y)&&t.y>=Math.min(e.y,n.y)}function T(e){return e>0?1:e<0?-1:0}function E(e,t){var n=e;do{if(n.i!==e.i&&n.next.i!==e.i&&n.i!==t.i&&n.next.i!==t.i&&C(n,n.next,e,t))return!0;n=n.next}while(n!==e);return!1}function D(e,t){return x(e.prev,e,e.next)<0?x(e,t,e.next)>=0&&x(e,e.prev,t)>=0:x(e,t,e.prev)<0||x(e,e.next,t)<0}function O(e,t){var n=e,r=!1,i=(e.x+t.x)/2,a=(e.y+t.y)/2;do n.y>a!=n.next.y>a&&n.next.y!==n.y&&i<(n.next.x-n.x)*(a-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next;while(n!==e);return r}function k(e,t){var n=new M(e.i,e.x,e.y),r=new M(t.i,t.x,t.y),i=e.next,a=t.prev;return e.next=t,t.prev=e,n.next=i,i.prev=n,r.next=n,n.prev=r,a.next=r,r.prev=a,r}function A(e,t,n,r){var i=new M(e,t,n);return r?(i.next=r.next,i.prev=r,r.next.prev=i,r.next=i):(i.prev=i,i.next=i),i}function j(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function M(e,t,n){this.i=e,this.x=t,this.y=n,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}n.deviation=function(e,t,n,r){var i=t&&t.length,a=i?t[0]*n:e.length,o=Math.abs(N(e,0,a,n));if(i)for(var s=0,c=t.length;s0&&(r+=e[i-1].length,n.holes.push(r))}return n}}),lo=bt((exports,t)=>{(function(n){var r=typeof exports==`object`&&exports&&!exports.nodeType&&exports,i=typeof t==`object`&&t&&!t.nodeType&&t,a=typeof global==`object`&&global;(a.global===a||a.window===a||a.self===a)&&(n=a);var o,s=2147483647,c=36,l=1,u=26,d=38,f=700,p=72,m=128,h=`-`,g=/^xn--/,_=/[^\x20-\x7E]/,v=/[\x2E\u3002\uFF0E\uFF61]/g,y={overflow:`Overflow: input needs wider integers to process`,"not-basic":`Illegal input >= 0x80 (not a basic code point)`,"invalid-input":`Invalid input`},b=c-l,x=Math.floor,S=String.fromCharCode,C;function w(e){throw RangeError(y[e])}function T(e,t){for(var n=e.length,r=[];n--;)r[n]=t(e[n]);return r}function E(e,t){var n=e.split(`@`),r=``;n.length>1&&(r=n[0]+`@`,e=n[1]),e=e.replace(v,`.`);var i=e.split(`.`),a=T(i,t).join(`.`);return r+a}function D(e){for(var t=[],n=0,r=e.length,i,a;n=55296&&i<=56319&&n65535&&(e-=65536,t+=S(e>>>10&1023|55296),e=56320|e&1023),t+=S(e),t}).join(``)}function k(e){return e-48<10?e-22:e-65<26?e-65:e-97<26?e-97:c}function A(e,t){return e+22+75*(e<26)-((t!=0)<<5)}function j(e,t,n){var r=0;for(e=n?x(e/f):e>>1,e+=x(e/t);e>b*u>>1;r+=c)e=x(e/b);return x(r+(b+1)*e/(e+d))}function M(e){var t=[],n=e.length,r,i=0,a=m,o=p,d,f,g,_,v,y,b,S,C;for(d=e.lastIndexOf(h),d<0&&(d=0),f=0;f=128&&w(`not-basic`),t.push(e.charCodeAt(f));for(g=d>0?d+1:0;g=n&&w(`invalid-input`),b=k(e.charCodeAt(g++)),(b>=c||b>x((s-i)/v))&&w(`overflow`),i+=b*v,S=y<=o?l:y>=o+u?u:y-o,!(bx(s/C)&&w(`overflow`),v*=C;r=t.length+1,o=j(i-_,r,_==0),x(i/r)>s-a&&w(`overflow`),a+=x(i/r),i%=r,t.splice(i++,0,a)}return O(t)}function N(e){var t,n,r,i,a,o,d,f,g,_,v,y=[],b,C,T,E;for(e=D(e),b=e.length,t=m,n=0,a=p,o=0;o=t&&vx((s-n)/C)&&w(`overflow`),n+=(d-t)*C,t=d,o=0;os&&w(`overflow`),v==t){for(f=n,g=c;_=g<=a?l:g>=a+u?u:g-a,!(f<_);g+=c)E=f-_,T=c-_,y.push(S(A(_+E%T,0))),f=x(E/T);y.push(S(A(f,0))),a=j(n,C,r==i),n=0,++r}++n,++t}return y.join(``)}function ee(e){return E(e,function(e){return g.test(e)?M(e.slice(4).toLowerCase()):e})}function P(e){return E(e,function(e){return _.test(e)?`xn--`+N(e):e})}if(o={version:`1.4.1`,ucs2:{decode:D,encode:O},decode:M,encode:N,toASCII:P,toUnicode:ee},typeof define==`function`&&typeof define.amd==`object`&&define.amd)define(`punycode`,function(){return o});else if(r&&i)if(t.exports==r)i.exports=o;else for(C in o)o.hasOwnProperty(C)&&(r[C]=o[C]);else n.punycode=o})(void 0)}),uo=bt((exports,t)=>{Object.defineProperty(exports,`__esModule`,{value:!0});function n(){let e,t,n=n=>{if(n&&(typeof n==`object`||typeof n==`function`)){if(e)return e.get(n)}else if(t)return t.get(n)},r=(n,r)=>{n&&(typeof n==`object`||typeof n==`function`)?(e||=new WeakMap,e.set(n,r)):(t||=new Map,t.set(n,r))},i=n=>{if(n&&(typeof n==`object`||typeof n==`function`)){if(e)return e.has(n)}else if(t)return t.has(n);return!1},a=e=>{if(!i(e))throw TypeError(`Side channel does not contain the given key`)};return{get:n,set:r,has:i,assert:a}}exports.default=n,(typeof exports.default==`object`&&exports.default!==null||typeof exports.default==`function`)&&(Object.assign(exports.default,exports),t.exports=exports.default)}),fo=bt((exports,t)=>{var n=String.prototype.replace,r=/%20/g,i={RFC1738:`RFC1738`,RFC3986:`RFC3986`};t.exports={default:i.RFC3986,formatters:{RFC1738:function(e){return n.call(e,r,`+`)},RFC3986:function(e){return String(e)}},RFC1738:i.RFC1738,RFC3986:i.RFC3986}}),po=bt((exports,t)=>{var n=fo(),r=Object.prototype.hasOwnProperty,i=Array.isArray,a=function(){for(var e=[],t=0;t<256;++t)e.push(`%`+((t<16?`0`:``)+t.toString(16)).toUpperCase());return e}(),o=function(e){for(;e.length>1;){var t=e.pop(),n=t.obj[t.prop];if(i(n)){for(var r=[],a=0;a=d?s.slice(l,l+d):s,f=[],p=0;p=48&&m<=57||m>=65&&m<=90||m>=97&&m<=122||o===n.RFC1738&&(m===40||m===41)){f[f.length]=u.charAt(p);continue}if(m<128){f[f.length]=a[m];continue}if(m<2048){f[f.length]=a[192|m>>6]+a[128|m&63];continue}if(m<55296||m>=57344){f[f.length]=a[224|m>>12]+a[128|m>>6&63]+a[128|m&63];continue}p+=1,m=65536+((m&1023)<<10|u.charCodeAt(p)&1023),f[f.length]=a[240|m>>18]+a[128|m>>12&63]+a[128|m>>6&63]+a[128|m&63]}c+=f.join(``)}return c},p=function(e){for(var t=[{obj:{o:e},prop:`o`}],n=[],r=0;r{var n=uo(),r=po(),i=fo(),a=Object.prototype.hasOwnProperty,o={brackets:function(e){return e+`[]`},comma:`comma`,indices:function(e,t){return e+`[`+t+`]`},repeat:function(e){return e}},s=Array.isArray,c=Array.prototype.push,l=function(e,t){c.apply(e,s(t)?t:[t])},u=Date.prototype.toISOString,d=i.default,f={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:`indices`,charset:`utf-8`,charsetSentinel:!1,commaRoundTrip:!1,delimiter:`&`,encode:!0,encodeDotInKeys:!1,encoder:r.encode,encodeValuesOnly:!1,filter:void 0,format:d,formatter:i.formatters[d],indices:!1,serializeDate:function(e){return u.call(e)},skipNulls:!1,strictNullHandling:!1},p=function(e){return typeof e==`string`||typeof e==`number`||typeof e==`boolean`||typeof e==`symbol`||typeof e==`bigint`},m={},h=function e(t,i,a,o,c,u,d,h,g,_,v,y,b,x,S,C,w,T){for(var E=t,D=T,O=0,k=!1;(D=D.get(m))!==void 0&&!k;){var A=D.get(t);if(O+=1,A!==void 0){if(A===O)throw RangeError(`Cyclic object value`);k=!0}D.get(m)===void 0&&(O=0)}if(typeof _==`function`?E=_(i,E):E instanceof Date?E=b(E):a===`comma`&&s(E)&&(E=r.maybeMap(E,function(e){return e instanceof Date?b(e):e})),E===null){if(u)return g&&!C?g(i,f.encoder,w,`key`,x):i;E=``}if(p(E)||r.isBuffer(E)){if(g){var j=C?i:g(i,f.encoder,w,`key`,x);return[S(j)+`=`+S(g(E,f.encoder,w,`value`,x))]}return[S(i)+`=`+S(String(E))]}var M=[];if(E===void 0)return M;var N;if(a===`comma`&&s(E))C&&g&&(E=r.maybeMap(E,g)),N=[{value:E.length>0?E.join(`,`)||null:void 0}];else if(s(_))N=_;else{var ee=Object.keys(E);N=v?ee.sort(v):ee}var P=h?String(i).replace(/\./g,`%2E`):String(i),F=o&&s(E)&&E.length===1?P+`[]`:P;if(c&&s(E)&&E.length===0)return F+`[]`;for(var I=0;I0?b+y:``}}),ho=bt((exports,t)=>{var n=po(),r=Object.prototype.hasOwnProperty,i=Array.isArray,a={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:`utf-8`,charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:n.decode,delimiter:`&`,depth:5,duplicates:`combine`,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1,throwOnLimitExceeded:!1},o=function(e){return e.replace(/&#(\d+);/g,function(e,t){return String.fromCharCode(parseInt(t,10))})},s=function(e,t,n){if(e&&typeof e==`string`&&t.comma&&e.indexOf(`,`)>-1)return e.split(`,`);if(t.throwOnLimitExceeded&&n>=t.arrayLimit)throw RangeError(`Array limit exceeded. Only `+t.arrayLimit+` element`+(t.arrayLimit===1?``:`s`)+` allowed in an array.`);return e},c=`utf8=%26%2310003%3B`,l=`utf8=%E2%9C%93`,u=function(e,t){var u={__proto__:null},d=t.ignoreQueryPrefix?e.replace(/^\?/,``):e;d=d.replace(/%5B/gi,`[`).replace(/%5D/gi,`]`);var f=t.parameterLimit===1/0?void 0:t.parameterLimit,p=d.split(t.delimiter,t.throwOnLimitExceeded?f+1:f);if(t.throwOnLimitExceeded&&p.length>f)throw RangeError(`Parameter limit exceeded. Only `+f+` parameter`+(f===1?``:`s`)+` allowed.`);var m=-1,h,g=t.charset;if(t.charsetSentinel)for(h=0;h-1&&(x=i(x)?[x]:x);var S=r.call(u,b);S&&t.duplicates===`combine`?u[b]=n.combine(u[b],x):(!S||t.duplicates===`last`)&&(u[b]=x)}return u},d=function(e,t,r,i){var a=0;if(e.length>0&&e[e.length-1]===`[]`){var o=e.slice(0,-1).join(``);a=Array.isArray(t)&&t[o]?t[o].length:0}for(var c=i?t:s(t,r,a),l=e.length-1;l>=0;--l){var u,d=e[l];if(d===`[]`&&r.parseArrays)u=r.allowEmptyArrays&&(c===``||r.strictNullHandling&&c===null)?[]:n.combine([],c);else{u=r.plainObjects?{__proto__:null}:{};var f=d.charAt(0)===`[`&&d.charAt(d.length-1)===`]`?d.slice(1,-1):d,p=r.decodeDotInKeys?f.replace(/%2E/g,`.`):f,m=parseInt(p,10);!r.parseArrays&&p===``?u={0:c}:!isNaN(m)&&d!==p&&String(m)===p&&m>=0&&r.parseArrays&&m<=r.arrayLimit?(u=[],u[m]=c):p!==`__proto__`&&(u[p]=c)}c=u}return c},f=function(e,t,n,i){if(e){var a=n.allowDots?e.replace(/\.([^.[]+)/g,`[$1]`):e,o=/(\[[^[\]]*])/,s=/(\[[^[\]]*])/g,c=n.depth>0&&o.exec(a),l=c?a.slice(0,c.index):a,u=[];if(l){if(!n.plainObjects&&r.call(Object.prototype,l)&&!n.allowPrototypes)return;u.push(l)}for(var f=0;n.depth>0&&(c=s.exec(a))!==null&&f{var n=mo(),r=ho(),i=fo();t.exports={formats:i,parse:r,stringify:n}}),_o=bt(exports=>{var t=lo();function n(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var r=/^([a-z0-9.+-]+:)/i,i=/:[0-9]*$/,a=/^(\/\/?(?!\/)[^?\s]*)(\?[^\s]*)?$/,o=[`<`,`>`,`"`,"`",` `,`\r`,` +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/__vite-browser-external-BQ5eJQsZ.js","assets/__vite-browser-external-DPh5tFvT.js","assets/index-CsmT0L1K.js","assets/index-10xSVpcK.css","assets/default-node-CQhep7iX.js","assets/import-url-browser-CajlDqRn.js","assets/import-url-browser-DNuYZxPr.js","assets/duckdb-mvp-C3i5IjU8.js","assets/import-url-node-BGiLk3V8.js"])))=>i.map(i=>d[i]); +var e=function(exports){function t(e){"@babel/helpers - typeof";return t=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},t(e)}function n(e,n){if(t(e)!=`object`||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,n||`default`);if(t(i)!=`object`)return i;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(n===`string`?String:Number)(e)}function r(e){var r=n(e,`string`);return t(r)==`symbol`?r:r+``}function i(e,t,n){return(t=r(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}return exports.defineProperty=i,exports}({});import{AdditiveBlending as t,AlwaysStencilFunc as n,AnimationMixer as r,Audio as i,AudioListener as a,AudioLoader as o,BackSide as s,Box2 as c,Box3 as l,BoxGeometry as u,BufferAttribute as d,BufferGeometry as f,CatmullRomCurve3 as p,ClampToEdgeWrapping as m,Color as h,CompressedTexture as g,CubeCamera as _,CubeReflectionMapping as v,CubeTextureLoader as y,CylinderGeometry as b,DataTexture as x,DataTextureLoader as S,DataUtils as C,DepthTexture as w,DoubleSide as T,EdgesGeometry as E,Ee as D,EquirectangularReflectionMapping as O,Euler as k,EventDispatcher as A,ExtrudeGeometry as j,FileLoader as M,Float32BufferAttribute as N,FloatType as ee,Fragment as P,FrontSide as F,Group as I,HalfFloatType as te,InstancedBufferGeometry as ne,InstancedInterleavedBuffer as L,InstancedMesh as re,InterleavedBuffer as R,InterleavedBufferAttribute as ie,InterpolateDiscrete as ae,InterpolateLinear as oe,Ir as se,Line as ce,Line3 as le,LineBasicMaterial as ue,LinearFilter as de,LinearMipmapLinearFilter as fe,LinearMipmapNearestFilter as pe,Loader as me,MOUSE as he,Material as ge,MathUtils as _e,Matrix3 as ve,Matrix4 as ye,Mesh as be,MeshBasicMaterial as xe,MeshDepthMaterial as Se,MeshStandardMaterial as Ce,MirroredRepeatWrapping as we,Mn as Te,NearestFilter as Ee,NearestMipmapLinearFilter as De,NearestMipmapNearestFilter as Oe,NoToneMapping as ke,Object3D as Ae,OctahedronGeometry as je,OrthographicCamera as Me,Path as Ne,PerspectiveCamera as Pe,Plane as Fe,PlaneGeometry as Ie,PropertyBinding as Le,Q as Re,QuadraticBezierCurve3 as ze,Quaternion as Be,REVISION as Ve,RGBAFormat as He,RawShaderMaterial as Ue,Ray as We,Raycaster as Ge,RepeatWrapping as Ke,ReplaceStencilOp as qe,Scene as Je,ShaderChunk as Ye,ShaderMaterial as Xe,Shape as Ze,ShapeGeometry as Qe,ShapePath as $e,ShapeUtils as et,SkinnedMesh as tt,Sphere as nt,SphereGeometry as rt,Spherical as it,TOUCH as at,Texture as ot,TextureLoader as st,TorusGeometry as ct,Triangle as lt,Uniform as ut,UniformsLib as dt,UniformsUtils as ft,Vector2 as pt,Vector3 as z,Vector4 as mt,Vn as ht,WebGLCubeRenderTarget as gt,WebGLRenderTarget as _t,WebGLRenderer as vt,WireframeGeometry as yt,__commonJSMin as bt,__export as xt,__plugin_vue_export_helper_default as St,__require as Ct,__toDynamicImportESM as wt,__toESM as Tt,__vitePreload as Et,breakpointsTailwind as Dt,computed as Ot,createBaseVNode as B,createBlock as kt,createCommentVNode as At,createElementBlock as V,createTextVNode as jt,createVNode as Mt,defineComponent as H,defu as Nt,dn as Pt,formatHex as Ft,getCurrentInstance as It,getCurrentScope as Lt,guardReactiveProps as Rt,io as zt,isReactive as Bt,isRef as Vt,mergeModels as Ht,mergeProps as Ut,nextTick as Wt,normalizeClass as Gt,normalizeProps as Kt,normalizeStyle as qt,onBeforeUnmount as Jt,onMounted as Yt,onScopeDispose as Xt,onUnmounted as Zt,openBlock as U,pe as Qt,reactive as $t,ref as W,render as en,renderList as tn,renderSlot as nn,resolveComponent as rn,resolveDirective as an,shallowReactive as on,shallowRef as sn,so as cn,storeToRefs as ln,toDisplayString as un,toRaw as dn,toRef as fn,toRefs as pn,toValue$1 as mn,unref as G,useAttrs as hn,useBreakpoints as gn,useDark as _n,useDebounceFn as vn,useElementBounding as yn,useI18n as bn,useModel as xn,useRouter as Sn,useSettings as Cn,useSlots as wn,useWindowSize as Tn,vModelCheckbox as En,vModelRadio as Dn,vModelSelect as On,vModelText as kn,watch as K,watchDebounced as An,watchEffect as jn,withAsyncContext as Mn,withCtx as Nn,withDirectives as Pn,withModifiers as Fn}from"./index-CsmT0L1K.js";import{getImportUrlBundles as In}from"./import-url-browser-DNuYZxPr.js";import{generateSpeech as Ln,useAudioContext as Rn,useChatStore as zn,useProvidersStore as Bn,useSpeakingStore as Vn,useSpeechStore as Hn}from"./stores-2H61GqXP.js";import{Collapsable_default as Un,TransitionVertical_default as Wn}from"./Button-D3cjyOEe.js";import{FieldCheckbox_default as Gn,FieldInput_default as Kn,Input_default as qn}from"./src-C1Sr0aqN.js";import{VRMUtils as Jn,clipFromVRMAnimation as Yn,lerp as Xn,loadVRMAnimation as Zn,loadVrm as Qn,randFloat as $n,randomSaccadeInterval as er,useBlink as tr,useIdleEyeSaccades as nr,useMarkdown as rr,useVRMEmote as ir}from"./composables-CgcEyUWo.js";import{useQueue as ar}from"./queue-B0kER5Ap.js";import{EMOTION_EmotionMotionName_value as or,EMOTION_VRMExpressionName_value as sr,EmotionThinkMotionName as cr,llmInferenceEndToken as lr,useDelayMessageQueue as ur,useEmotionsMessageQueue as dr,useMessageContentQueue as fr}from"./queues-hSEKEE3F.js";var pr,mr,hr,gr,_r,vr,yr,br,xr,Sr,Cr,wr,Tr,Er,Dr,Or,kr,Ar,jr,Mr,Nr,Pr,Fr,Ir,Lr,Rr,zr,Br,Vr,Hr,Ur,Wr,Gr,Kr,qr,Jr,Yr,Xr,Zr,Qr,$r,ei,ti,ni,ri,ii,ai,oi,si,ci,li,ui,di,fi,pi,mi,hi,gi,_i,vi,yi,bi,xi,Si,Ci,wi,Ti,Ei,Di,Oi,ki,Ai,ji,Mi,Ni,Pi,Fi,Ii,Li,Ri,zi,Bi,Vi,Hi,Ui,Wi,Gi,Ki,qi,Ji,Yi,Xi,Zi,Qi,$i;let ea,ta,na,ra;var ia=H({__name:`AudioSpectrum`,props:{stream:null,bars:{default:32},minFreq:{default:60},maxFreq:{default:4e3}},setup(e){let t=e,n=W(Array.from({length:t.bars}).fill(0));Yt(()=>{r()}),K(()=>t.stream,()=>{r()});function r(){if(!t.stream)return;let e=new(window.AudioContext||window.webkitAudioContext),r=e.createMediaStreamSource(t.stream),i=e.createAnalyser();i.fftSize=2048,r.connect(i);let a=i.frequencyBinCount,o=new Uint8Array(a),s=e.sampleRate,c=s/i.fftSize,l=Math.floor(t.minFreq/c),u=Math.floor(t.maxFreq/c),d=u-l,f=Math.floor(d/t.bars),p=()=>{try{requestAnimationFrame(p),i.getByteFrequencyData(o);let e=Array.from({length:t.bars}).fill(0);for(let n=0;nnn(e.$slots,`default`,{frequencies:n.value})}}),aa=ia;const oa={"h-full":``,flex:``,"items-center":``,"gap-1":``},sa=5;var ca=H({__name:`AudioSpectrumVisualizer`,props:{frequencies:null,barsClass:null},setup(e){let t=e;function n(e,t){let n=.1,r=1;return n+(r-n)*(e/t)}function r(e,r){let i=n(r,t.frequencies.length);return Math.min(100,Math.max(10,e*100*sa*i))}return(t,n)=>(U(),V(`div`,oa,[(U(!0),V(P,null,tn(e.frequencies,(t,n)=>(U(),V(`div`,{key:n,"h-full":``,flex:``,"flex-1":``,"items-end":``},[B(`div`,{transition:`all 100 ease-in-out`,"mx-auto":``,"my-0":``,"w-full":``,"rounded-full":``,class:Gt(e.barsClass),style:qt({height:`${r(t,n)}%`})},null,6)]))),128))]))}}),la=ca,ua=H({__name:`Volumed`,props:{perspective:null,transform:null},setup(e){return(t,n)=>(U(),V(`div`,{class:`volumed`,style:qt({perspective:`${e.perspective}px`,transform:e.transform})},[nn(t.$slots,`default`,{},void 0,!0)],4))}}),da=St(ua,[[`__scopeId`,`data-v-568551bc`]]),fa=H({__name:`CursorMomentum`,props:{baseSpeed:{default:.1},friction:{default:.95},momentumFactor:{default:.005}},setup(e,{expose:t}){let n=e,r=W(1),i=W(0),a=0,o=fn(()=>n.friction),s=fn(()=>n.baseSpeed),c=fn(()=>n.momentumFactor);function l(e){a||=e;let t=e-a;a=e,r.value=s.value+(r.value-s.value)*o.value,i.value+=r.value*t,requestAnimationFrame(l)}function u(e){let t=Math.sqrt(e.movementX**2+e.movementY**2);r.value+=t*c.value}return Yt(()=>{window.addEventListener(`mousemove`,u),requestAnimationFrame(l)}),Zt(()=>{window.removeEventListener(`mousemove`,u)}),t({momentum:r,currentValue:i}),(e,t)=>nn(e.$slots,`default`,{momentum:r.value,currentValue:i.value})}}),pa=fa,ma=H({__name:`TestDummyMarkerFlat`,props:{size:null},setup(e){return(t,n)=>(U(),V(`div`,{class:`test-dummy-flat`,style:qt({width:`${e.size}px`,height:`${e.size}px`})},n[0]||=[B(`div`,{class:`marker`},null,-1)],4))}}),ha=St(ma,[[`__scopeId`,`data-v-b4ef37ac`]]),ga=H({__name:`TestDummyMarker`,setup(e){return(e,t)=>(U(),kt(pa,{"base-speed":.1,friction:.95,"momentum-factor":5e-4},{default:Nn(({currentValue:e})=>[Mt(da,{perspective:800,transform:`rotateX(45deg) translateY(3px)`},{default:Nn(()=>[Mt(ha,{size:24,style:qt({transform:`rotate(${e}deg)`})},null,8,[`style`])]),_:2},1024)]),_:1}))}}),_a=ga,va;(function(e){e[e.WEBGL_LEGACY=0]=`WEBGL_LEGACY`,e[e.WEBGL=1]=`WEBGL`,e[e.WEBGL2=2]=`WEBGL2`})(va||={});var ya;(function(e){e[e.UNKNOWN=0]=`UNKNOWN`,e[e.WEBGL=1]=`WEBGL`,e[e.CANVAS=2]=`CANVAS`})(ya||={});var ba;(function(e){e[e.COLOR=16384]=`COLOR`,e[e.DEPTH=256]=`DEPTH`,e[e.STENCIL=1024]=`STENCIL`})(ba||={});var xa;(function(e){e[e.NORMAL=0]=`NORMAL`,e[e.ADD=1]=`ADD`,e[e.MULTIPLY=2]=`MULTIPLY`,e[e.SCREEN=3]=`SCREEN`,e[e.OVERLAY=4]=`OVERLAY`,e[e.DARKEN=5]=`DARKEN`,e[e.LIGHTEN=6]=`LIGHTEN`,e[e.COLOR_DODGE=7]=`COLOR_DODGE`,e[e.COLOR_BURN=8]=`COLOR_BURN`,e[e.HARD_LIGHT=9]=`HARD_LIGHT`,e[e.SOFT_LIGHT=10]=`SOFT_LIGHT`,e[e.DIFFERENCE=11]=`DIFFERENCE`,e[e.EXCLUSION=12]=`EXCLUSION`,e[e.HUE=13]=`HUE`,e[e.SATURATION=14]=`SATURATION`,e[e.COLOR=15]=`COLOR`,e[e.LUMINOSITY=16]=`LUMINOSITY`,e[e.NORMAL_NPM=17]=`NORMAL_NPM`,e[e.ADD_NPM=18]=`ADD_NPM`,e[e.SCREEN_NPM=19]=`SCREEN_NPM`,e[e.NONE=20]=`NONE`,e[e.SRC_OVER=0]=`SRC_OVER`,e[e.SRC_IN=21]=`SRC_IN`,e[e.SRC_OUT=22]=`SRC_OUT`,e[e.SRC_ATOP=23]=`SRC_ATOP`,e[e.DST_OVER=24]=`DST_OVER`,e[e.DST_IN=25]=`DST_IN`,e[e.DST_OUT=26]=`DST_OUT`,e[e.DST_ATOP=27]=`DST_ATOP`,e[e.ERASE=26]=`ERASE`,e[e.SUBTRACT=28]=`SUBTRACT`,e[e.XOR=29]=`XOR`})(xa||={});var Sa;(function(e){e[e.POINTS=0]=`POINTS`,e[e.LINES=1]=`LINES`,e[e.LINE_LOOP=2]=`LINE_LOOP`,e[e.LINE_STRIP=3]=`LINE_STRIP`,e[e.TRIANGLES=4]=`TRIANGLES`,e[e.TRIANGLE_STRIP=5]=`TRIANGLE_STRIP`,e[e.TRIANGLE_FAN=6]=`TRIANGLE_FAN`})(Sa||={});var Ca;(function(e){e[e.RGBA=6408]=`RGBA`,e[e.RGB=6407]=`RGB`,e[e.RG=33319]=`RG`,e[e.RED=6403]=`RED`,e[e.RGBA_INTEGER=36249]=`RGBA_INTEGER`,e[e.RGB_INTEGER=36248]=`RGB_INTEGER`,e[e.RG_INTEGER=33320]=`RG_INTEGER`,e[e.RED_INTEGER=36244]=`RED_INTEGER`,e[e.ALPHA=6406]=`ALPHA`,e[e.LUMINANCE=6409]=`LUMINANCE`,e[e.LUMINANCE_ALPHA=6410]=`LUMINANCE_ALPHA`,e[e.DEPTH_COMPONENT=6402]=`DEPTH_COMPONENT`,e[e.DEPTH_STENCIL=34041]=`DEPTH_STENCIL`})(Ca||={});var wa;(function(e){e[e.TEXTURE_2D=3553]=`TEXTURE_2D`,e[e.TEXTURE_CUBE_MAP=34067]=`TEXTURE_CUBE_MAP`,e[e.TEXTURE_2D_ARRAY=35866]=`TEXTURE_2D_ARRAY`,e[e.TEXTURE_CUBE_MAP_POSITIVE_X=34069]=`TEXTURE_CUBE_MAP_POSITIVE_X`,e[e.TEXTURE_CUBE_MAP_NEGATIVE_X=34070]=`TEXTURE_CUBE_MAP_NEGATIVE_X`,e[e.TEXTURE_CUBE_MAP_POSITIVE_Y=34071]=`TEXTURE_CUBE_MAP_POSITIVE_Y`,e[e.TEXTURE_CUBE_MAP_NEGATIVE_Y=34072]=`TEXTURE_CUBE_MAP_NEGATIVE_Y`,e[e.TEXTURE_CUBE_MAP_POSITIVE_Z=34073]=`TEXTURE_CUBE_MAP_POSITIVE_Z`,e[e.TEXTURE_CUBE_MAP_NEGATIVE_Z=34074]=`TEXTURE_CUBE_MAP_NEGATIVE_Z`})(wa||={});var Ta;(function(e){e[e.UNSIGNED_BYTE=5121]=`UNSIGNED_BYTE`,e[e.UNSIGNED_SHORT=5123]=`UNSIGNED_SHORT`,e[e.UNSIGNED_SHORT_5_6_5=33635]=`UNSIGNED_SHORT_5_6_5`,e[e.UNSIGNED_SHORT_4_4_4_4=32819]=`UNSIGNED_SHORT_4_4_4_4`,e[e.UNSIGNED_SHORT_5_5_5_1=32820]=`UNSIGNED_SHORT_5_5_5_1`,e[e.UNSIGNED_INT=5125]=`UNSIGNED_INT`,e[e.UNSIGNED_INT_10F_11F_11F_REV=35899]=`UNSIGNED_INT_10F_11F_11F_REV`,e[e.UNSIGNED_INT_2_10_10_10_REV=33640]=`UNSIGNED_INT_2_10_10_10_REV`,e[e.UNSIGNED_INT_24_8=34042]=`UNSIGNED_INT_24_8`,e[e.UNSIGNED_INT_5_9_9_9_REV=35902]=`UNSIGNED_INT_5_9_9_9_REV`,e[e.BYTE=5120]=`BYTE`,e[e.SHORT=5122]=`SHORT`,e[e.INT=5124]=`INT`,e[e.FLOAT=5126]=`FLOAT`,e[e.FLOAT_32_UNSIGNED_INT_24_8_REV=36269]=`FLOAT_32_UNSIGNED_INT_24_8_REV`,e[e.HALF_FLOAT=36193]=`HALF_FLOAT`})(Ta||={});var Ea;(function(e){e[e.FLOAT=0]=`FLOAT`,e[e.INT=1]=`INT`,e[e.UINT=2]=`UINT`})(Ea||={});var Da;(function(e){e[e.NEAREST=0]=`NEAREST`,e[e.LINEAR=1]=`LINEAR`})(Da||={});var Oa;(function(e){e[e.CLAMP=33071]=`CLAMP`,e[e.REPEAT=10497]=`REPEAT`,e[e.MIRRORED_REPEAT=33648]=`MIRRORED_REPEAT`})(Oa||={});var ka;(function(e){e[e.OFF=0]=`OFF`,e[e.POW2=1]=`POW2`,e[e.ON=2]=`ON`,e[e.ON_MANUAL=3]=`ON_MANUAL`})(ka||={});var Aa;(function(e){e[e.NPM=0]=`NPM`,e[e.UNPACK=1]=`UNPACK`,e[e.PMA=2]=`PMA`,e[e.NO_PREMULTIPLIED_ALPHA=0]=`NO_PREMULTIPLIED_ALPHA`,e[e.PREMULTIPLY_ON_UPLOAD=1]=`PREMULTIPLY_ON_UPLOAD`,e[e.PREMULTIPLY_ALPHA=2]=`PREMULTIPLY_ALPHA`,e[e.PREMULTIPLIED_ALPHA=2]=`PREMULTIPLIED_ALPHA`})(Aa||={});var ja;(function(e){e[e.NO=0]=`NO`,e[e.YES=1]=`YES`,e[e.AUTO=2]=`AUTO`,e[e.BLEND=0]=`BLEND`,e[e.CLEAR=1]=`CLEAR`,e[e.BLIT=2]=`BLIT`})(ja||={});var Ma;(function(e){e[e.AUTO=0]=`AUTO`,e[e.MANUAL=1]=`MANUAL`})(Ma||={});var Na;(function(e){e.LOW=`lowp`,e.MEDIUM=`mediump`,e.HIGH=`highp`})(Na||={});var Pa;(function(e){e[e.NONE=0]=`NONE`,e[e.SCISSOR=1]=`SCISSOR`,e[e.STENCIL=2]=`STENCIL`,e[e.SPRITE=3]=`SPRITE`,e[e.COLOR=4]=`COLOR`})(Pa||={});var Fa;(function(e){e[e.RED=1]=`RED`,e[e.GREEN=2]=`GREEN`,e[e.BLUE=4]=`BLUE`,e[e.ALPHA=8]=`ALPHA`})(Fa||={});var Ia;(function(e){e[e.NONE=0]=`NONE`,e[e.LOW=2]=`LOW`,e[e.MEDIUM=4]=`MEDIUM`,e[e.HIGH=8]=`HIGH`})(Ia||={});var La;(function(e){e[e.ELEMENT_ARRAY_BUFFER=34963]=`ELEMENT_ARRAY_BUFFER`,e[e.ARRAY_BUFFER=34962]=`ARRAY_BUFFER`,e[e.UNIFORM_BUFFER=35345]=`UNIFORM_BUFFER`})(La||={});var Ra={createCanvas:function(e,t){var n=document.createElement(`canvas`);return n.width=e,n.height=t,n},getWebGLRenderingContext:function(){return WebGLRenderingContext},getNavigator:function(){return navigator},getBaseUrl:function(){var e;return(e=document.baseURI)??window.location.href},fetch:function(e,t){return fetch(e,t)}},za=/iPhone/i,Ba=/iPod/i,Va=/iPad/i,Ha=/\biOS-universal(?:.+)Mac\b/i,Ua=/\bAndroid(?:.+)Mobile\b/i,Wa=/Android/i,Ga=/(?:SD4930UR|\bSilk(?:.+)Mobile\b)/i,Ka=/Silk/i,qa=/Windows Phone/i,Ja=/\bWindows(?:.+)ARM\b/i,Ya=/BlackBerry/i,Xa=/BB10/i,Za=/Opera Mini/i,Qa=/\b(CriOS|Chrome)(?:.+)Mobile/i,$a=/Mobile(?:.+)Firefox\b/i,eo=function(e){return e!==void 0&&e.platform===`MacIntel`&&typeof e.maxTouchPoints==`number`&&e.maxTouchPoints>1&&typeof MSStream>`u`};function to(e){return function(t){return t.test(e)}}function no(e){var t={userAgent:``,platform:``,maxTouchPoints:0};!e&&typeof navigator<`u`?t={userAgent:navigator.userAgent,platform:navigator.platform,maxTouchPoints:navigator.maxTouchPoints||0}:typeof e==`string`?t.userAgent=e:e&&e.userAgent&&(t={userAgent:e.userAgent,platform:e.platform,maxTouchPoints:e.maxTouchPoints||0});var n=t.userAgent,r=n.split(`[FBAN`);r[1]!==void 0&&(n=r[0]),r=n.split(`Twitter`),r[1]!==void 0&&(n=r[0]);var i=to(n),a={apple:{phone:i(za)&&!i(qa),ipod:i(Ba),tablet:!i(za)&&(i(Va)||eo(t))&&!i(qa),universal:i(Ha),device:(i(za)||i(Ba)||i(Va)||i(Ha)||eo(t))&&!i(qa)},amazon:{phone:i(Ga),tablet:!i(Ga)&&i(Ka),device:i(Ga)||i(Ka)},android:{phone:!i(qa)&&i(Ga)||!i(qa)&&i(Ua),tablet:!i(qa)&&!i(Ga)&&!i(Ua)&&(i(Ka)||i(Wa)),device:!i(qa)&&(i(Ga)||i(Ka)||i(Ua)||i(Wa))||i(/\bokhttp\b/i)},windows:{phone:i(qa),tablet:i(Ja),device:i(qa)||i(Ja)},other:{blackberry:i(Ya),blackberry10:i(Xa),opera:i(Za),firefox:i($a),chrome:i(Qa),device:i(Ya)||i(Xa)||i(Za)||i($a)||i(Qa)},any:!1,phone:!1,tablet:!1};return a.any=a.apple.device||a.android.device||a.windows.device||a.other.device,a.phone=a.apple.phone||a.android.phone||a.windows.phone,a.tablet=a.apple.tablet||a.android.tablet||a.windows.tablet,a}var ro=no(globalThis.navigator);function io(){return!ro.apple.device}function ao(e){var t=!0;if(ro.tablet||ro.phone){if(ro.apple.device){var n=navigator.userAgent.match(/OS (\d+)_(\d+)?/);if(n){var r=parseInt(n[1],10);r<11&&(t=!1)}}if(ro.android.device){var n=navigator.userAgent.match(/Android\s([0-9.]*)/);if(n){var r=parseInt(n[1],10);r<7&&(t=!1)}}}return t?e:4}var oo={ADAPTER:Ra,MIPMAP_TEXTURES:ka.POW2,ANISOTROPIC_LEVEL:0,RESOLUTION:1,FILTER_RESOLUTION:1,FILTER_MULTISAMPLE:Ia.NONE,SPRITE_MAX_TEXTURES:ao(32),SPRITE_BATCH_SIZE:4096,RENDER_OPTIONS:{view:null,width:800,height:600,autoDensity:!1,backgroundColor:0,backgroundAlpha:1,useContextAlpha:!0,clearBeforeRender:!0,antialias:!1,preserveDrawingBuffer:!1},GC_MODE:Ma.AUTO,GC_MAX_IDLE:60*60,GC_MAX_CHECK_COUNT:60*10,WRAP_MODE:Oa.CLAMP,SCALE_MODE:Da.LINEAR,PRECISION_VERTEX:Na.HIGH,PRECISION_FRAGMENT:ro.apple.device?Na.HIGH:Na.MEDIUM,CAN_UPLOAD_SAME_BUFFER:io(),CREATE_IMAGE_BITMAP:!1,ROUND_PIXELS:!1},so=bt((exports,t)=>{var n=Object.prototype.hasOwnProperty,r=`~`;function i(){}Object.create&&(i.prototype=Object.create(null),new i().__proto__||(r=!1));function a(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function o(e,t,n,i,o){if(typeof n!=`function`)throw TypeError(`The listener must be a function`);var s=new a(n,i||e,o),c=r?r+t:t;return e._events[c]?e._events[c].fn?e._events[c]=[e._events[c],s]:e._events[c].push(s):(e._events[c]=s,e._eventsCount++),e}function s(e,t){--e._eventsCount===0?e._events=new i:delete e._events[t]}function c(){this._events=new i,this._eventsCount=0}c.prototype.eventNames=function(){var e=[],t,i;if(this._eventsCount===0)return e;for(i in t=this._events)n.call(t,i)&&e.push(r?i.slice(1):i);return Object.getOwnPropertySymbols?e.concat(Object.getOwnPropertySymbols(t)):e},c.prototype.listeners=function(e){var t=r?r+e:e,n=this._events[t];if(!n)return[];if(n.fn)return[n.fn];for(var i=0,a=n.length,o=Array(a);i{t.exports=n,t.exports.default=n;function n(e,t,n){n||=2;var i=t&&t.length,o=i?t[0]*n:e.length,s=r(e,0,o,n,!0),c=[];if(!s||s.next===s.prev)return c;var l,d,f,p,m,h,g;if(i&&(s=u(e,t,s,n)),e.length>80*n){l=f=e[0],d=p=e[1];for(var _=n;_f&&(f=m),h>p&&(p=h);g=Math.max(f-l,p-d),g=g===0?0:32767/g}return a(s,c,n,l,d,g,0),c}function r(e,t,n,r,i){var a,o;if(i===N(e,t,n,r)>0)for(a=t;a=t;a-=r)o=A(a,e[a],e[a+1],o);return o&&S(o,o.next)&&(j(o),o=o.next),o}function i(e,t){if(!e)return e;t||=e;var n=e,r;do if(r=!1,!n.steiner&&(S(n,n.next)||x(n.prev,n,n.next)===0)){if(j(n),n=t=n.prev,n===n.next)break;r=!0}else n=n.next;while(r||n!==t);return t}function a(e,t,n,r,u,d,f){if(e){!f&&d&&h(e,r,u,d);for(var p=e,m,g;e.prev!==e.next;){if(m=e.prev,g=e.next,d?s(e,r,u,d):o(e)){t.push(m.i/n|0),t.push(e.i/n|0),t.push(g.i/n|0),j(e),e=g.next,p=g.next;continue}if(e=g,e===p){f?f===1?(e=c(i(e),t,n),a(e,t,n,r,u,d,2)):f===2&&l(e,t,n,r,u,d):a(i(e),t,n,r,u,d,1);break}}}}function o(e){var t=e.prev,n=e,r=e.next;if(x(t,n,r)>=0)return!1;for(var i=t.x,a=n.x,o=r.x,s=t.y,c=n.y,l=r.y,u=ia?i>o?i:o:a>o?a:o,p=s>c?s>l?s:l:c>l?c:l,m=r.next;m!==t;){if(m.x>=u&&m.x<=f&&m.y>=d&&m.y<=p&&y(i,s,a,c,o,l,m.x,m.y)&&x(m.prev,m,m.next)>=0)return!1;m=m.next}return!0}function s(e,t,n,r){var i=e.prev,a=e,o=e.next;if(x(i,a,o)>=0)return!1;for(var s=i.x,c=a.x,l=o.x,u=i.y,d=a.y,f=o.y,p=sc?s>l?s:l:c>l?c:l,g=u>d?u>f?u:f:d>f?d:f,v=_(p,m,t,n,r),b=_(h,g,t,n,r),S=e.prevZ,C=e.nextZ;S&&S.z>=v&&C&&C.z<=b;){if(S.x>=p&&S.x<=h&&S.y>=m&&S.y<=g&&S!==i&&S!==o&&y(s,u,c,d,l,f,S.x,S.y)&&x(S.prev,S,S.next)>=0||(S=S.prevZ,C.x>=p&&C.x<=h&&C.y>=m&&C.y<=g&&C!==i&&C!==o&&y(s,u,c,d,l,f,C.x,C.y)&&x(C.prev,C,C.next)>=0))return!1;C=C.nextZ}for(;S&&S.z>=v;){if(S.x>=p&&S.x<=h&&S.y>=m&&S.y<=g&&S!==i&&S!==o&&y(s,u,c,d,l,f,S.x,S.y)&&x(S.prev,S,S.next)>=0)return!1;S=S.prevZ}for(;C&&C.z<=b;){if(C.x>=p&&C.x<=h&&C.y>=m&&C.y<=g&&C!==i&&C!==o&&y(s,u,c,d,l,f,C.x,C.y)&&x(C.prev,C,C.next)>=0)return!1;C=C.nextZ}return!0}function c(e,t,n){var r=e;do{var a=r.prev,o=r.next.next;!S(a,o)&&C(a,r,r.next,o)&&D(a,o)&&D(o,a)&&(t.push(a.i/n|0),t.push(r.i/n|0),t.push(o.i/n|0),j(r),j(r.next),r=e=o),r=r.next}while(r!==e);return i(r)}function l(e,t,n,r,o,s){var c=e;do{for(var l=c.next.next;l!==c.prev;){if(c.i!==l.i&&b(c,l)){var u=k(c,l);c=i(c,c.next),u=i(u,u.next),a(c,t,n,r,o,s,0),a(u,t,n,r,o,s,0);return}l=l.next}c=c.next}while(c!==e)}function u(e,t,n,i){var a=[],o,s,c,l,u;for(o=0,s=t.length;o=n.next.y&&n.next.y!==n.y){var s=n.x+(i-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(s<=r&&s>a&&(a=s,o=n.x=n.x&&n.x>=l&&r!==n.x&&y(io.x||n.x===o.x&&m(o,n)))&&(o=n,d=f)),n=n.next;while(n!==c);return o}function m(e,t){return x(e.prev,e,t.prev)<0&&x(t.next,e,e.next)<0}function h(e,t,n,r){var i=e;do i.z===0&&(i.z=_(i.x,i.y,t,n,r)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next;while(i!==e);i.prevZ.nextZ=null,i.prevZ=null,g(i)}function g(e){var t,n,r,i,a,o,s,c,l=1;do{for(n=e,e=null,a=null,o=0;n;){for(o++,r=n,s=0,t=0;t0||c>0&&r;)s!==0&&(c===0||!r||n.z<=r.z)?(i=n,n=n.nextZ,s--):(i=r,r=r.nextZ,c--),a?a.nextZ=i:e=i,i.prevZ=a,a=i;n=r}a.nextZ=null,l*=2}while(o>1);return e}function _(e,t,n,r,i){return e=(e-n)*i|0,t=(t-r)*i|0,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,t=(t|t<<8)&16711935,t=(t|t<<4)&252645135,t=(t|t<<2)&858993459,t=(t|t<<1)&1431655765,e|t<<1}function v(e){var t=e,n=e;do(t.x=(e-o)*(a-s)&&(e-o)*(r-s)>=(n-o)*(t-s)&&(n-o)*(a-s)>=(i-o)*(r-s)}function b(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!E(e,t)&&(D(e,t)&&D(t,e)&&O(e,t)&&(x(e.prev,e,t.prev)||x(e,t.prev,t))||S(e,t)&&x(e.prev,e,e.next)>0&&x(t.prev,t,t.next)>0)}function x(e,t,n){return(t.y-e.y)*(n.x-t.x)-(t.x-e.x)*(n.y-t.y)}function S(e,t){return e.x===t.x&&e.y===t.y}function C(e,t,n,r){var i=T(x(e,t,n)),a=T(x(e,t,r)),o=T(x(n,r,e)),s=T(x(n,r,t));return!!(i!==a&&o!==s||i===0&&w(e,n,t)||a===0&&w(e,r,t)||o===0&&w(n,e,r)||s===0&&w(n,t,r))}function w(e,t,n){return t.x<=Math.max(e.x,n.x)&&t.x>=Math.min(e.x,n.x)&&t.y<=Math.max(e.y,n.y)&&t.y>=Math.min(e.y,n.y)}function T(e){return e>0?1:e<0?-1:0}function E(e,t){var n=e;do{if(n.i!==e.i&&n.next.i!==e.i&&n.i!==t.i&&n.next.i!==t.i&&C(n,n.next,e,t))return!0;n=n.next}while(n!==e);return!1}function D(e,t){return x(e.prev,e,e.next)<0?x(e,t,e.next)>=0&&x(e,e.prev,t)>=0:x(e,t,e.prev)<0||x(e,e.next,t)<0}function O(e,t){var n=e,r=!1,i=(e.x+t.x)/2,a=(e.y+t.y)/2;do n.y>a!=n.next.y>a&&n.next.y!==n.y&&i<(n.next.x-n.x)*(a-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next;while(n!==e);return r}function k(e,t){var n=new M(e.i,e.x,e.y),r=new M(t.i,t.x,t.y),i=e.next,a=t.prev;return e.next=t,t.prev=e,n.next=i,i.prev=n,r.next=n,n.prev=r,a.next=r,r.prev=a,r}function A(e,t,n,r){var i=new M(e,t,n);return r?(i.next=r.next,i.prev=r,r.next.prev=i,r.next=i):(i.prev=i,i.next=i),i}function j(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function M(e,t,n){this.i=e,this.x=t,this.y=n,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}n.deviation=function(e,t,n,r){var i=t&&t.length,a=i?t[0]*n:e.length,o=Math.abs(N(e,0,a,n));if(i)for(var s=0,c=t.length;s0&&(r+=e[i-1].length,n.holes.push(r))}return n}}),lo=bt((exports,t)=>{(function(n){var r=typeof exports==`object`&&exports&&!exports.nodeType&&exports,i=typeof t==`object`&&t&&!t.nodeType&&t,a=typeof global==`object`&&global;(a.global===a||a.window===a||a.self===a)&&(n=a);var o,s=2147483647,c=36,l=1,u=26,d=38,f=700,p=72,m=128,h=`-`,g=/^xn--/,_=/[^\x20-\x7E]/,v=/[\x2E\u3002\uFF0E\uFF61]/g,y={overflow:`Overflow: input needs wider integers to process`,"not-basic":`Illegal input >= 0x80 (not a basic code point)`,"invalid-input":`Invalid input`},b=c-l,x=Math.floor,S=String.fromCharCode,C;function w(e){throw RangeError(y[e])}function T(e,t){for(var n=e.length,r=[];n--;)r[n]=t(e[n]);return r}function E(e,t){var n=e.split(`@`),r=``;n.length>1&&(r=n[0]+`@`,e=n[1]),e=e.replace(v,`.`);var i=e.split(`.`),a=T(i,t).join(`.`);return r+a}function D(e){for(var t=[],n=0,r=e.length,i,a;n=55296&&i<=56319&&n65535&&(e-=65536,t+=S(e>>>10&1023|55296),e=56320|e&1023),t+=S(e),t}).join(``)}function k(e){return e-48<10?e-22:e-65<26?e-65:e-97<26?e-97:c}function A(e,t){return e+22+75*(e<26)-((t!=0)<<5)}function j(e,t,n){var r=0;for(e=n?x(e/f):e>>1,e+=x(e/t);e>b*u>>1;r+=c)e=x(e/b);return x(r+(b+1)*e/(e+d))}function M(e){var t=[],n=e.length,r,i=0,a=m,o=p,d,f,g,_,v,y,b,S,C;for(d=e.lastIndexOf(h),d<0&&(d=0),f=0;f=128&&w(`not-basic`),t.push(e.charCodeAt(f));for(g=d>0?d+1:0;g=n&&w(`invalid-input`),b=k(e.charCodeAt(g++)),(b>=c||b>x((s-i)/v))&&w(`overflow`),i+=b*v,S=y<=o?l:y>=o+u?u:y-o,!(bx(s/C)&&w(`overflow`),v*=C;r=t.length+1,o=j(i-_,r,_==0),x(i/r)>s-a&&w(`overflow`),a+=x(i/r),i%=r,t.splice(i++,0,a)}return O(t)}function N(e){var t,n,r,i,a,o,d,f,g,_,v,y=[],b,C,T,E;for(e=D(e),b=e.length,t=m,n=0,a=p,o=0;o=t&&vx((s-n)/C)&&w(`overflow`),n+=(d-t)*C,t=d,o=0;os&&w(`overflow`),v==t){for(f=n,g=c;_=g<=a?l:g>=a+u?u:g-a,!(f<_);g+=c)E=f-_,T=c-_,y.push(S(A(_+E%T,0))),f=x(E/T);y.push(S(A(f,0))),a=j(n,C,r==i),n=0,++r}++n,++t}return y.join(``)}function ee(e){return E(e,function(e){return g.test(e)?M(e.slice(4).toLowerCase()):e})}function P(e){return E(e,function(e){return _.test(e)?`xn--`+N(e):e})}if(o={version:`1.4.1`,ucs2:{decode:D,encode:O},decode:M,encode:N,toASCII:P,toUnicode:ee},typeof define==`function`&&typeof define.amd==`object`&&define.amd)define(`punycode`,function(){return o});else if(r&&i)if(t.exports==r)i.exports=o;else for(C in o)o.hasOwnProperty(C)&&(r[C]=o[C]);else n.punycode=o})(void 0)}),uo=bt((exports,t)=>{Object.defineProperty(exports,`__esModule`,{value:!0});function n(){let e,t,n=n=>{if(n&&(typeof n==`object`||typeof n==`function`)){if(e)return e.get(n)}else if(t)return t.get(n)},r=(n,r)=>{n&&(typeof n==`object`||typeof n==`function`)?(e||=new WeakMap,e.set(n,r)):(t||=new Map,t.set(n,r))},i=n=>{if(n&&(typeof n==`object`||typeof n==`function`)){if(e)return e.has(n)}else if(t)return t.has(n);return!1},a=e=>{if(!i(e))throw TypeError(`Side channel does not contain the given key`)};return{get:n,set:r,has:i,assert:a}}exports.default=n,(typeof exports.default==`object`&&exports.default!==null||typeof exports.default==`function`)&&(Object.assign(exports.default,exports),t.exports=exports.default)}),fo=bt((exports,t)=>{var n=String.prototype.replace,r=/%20/g,i={RFC1738:`RFC1738`,RFC3986:`RFC3986`};t.exports={default:i.RFC3986,formatters:{RFC1738:function(e){return n.call(e,r,`+`)},RFC3986:function(e){return String(e)}},RFC1738:i.RFC1738,RFC3986:i.RFC3986}}),po=bt((exports,t)=>{var n=fo(),r=Object.prototype.hasOwnProperty,i=Array.isArray,a=function(){for(var e=[],t=0;t<256;++t)e.push(`%`+((t<16?`0`:``)+t.toString(16)).toUpperCase());return e}(),o=function(e){for(;e.length>1;){var t=e.pop(),n=t.obj[t.prop];if(i(n)){for(var r=[],a=0;a=d?s.slice(l,l+d):s,f=[],p=0;p=48&&m<=57||m>=65&&m<=90||m>=97&&m<=122||o===n.RFC1738&&(m===40||m===41)){f[f.length]=u.charAt(p);continue}if(m<128){f[f.length]=a[m];continue}if(m<2048){f[f.length]=a[192|m>>6]+a[128|m&63];continue}if(m<55296||m>=57344){f[f.length]=a[224|m>>12]+a[128|m>>6&63]+a[128|m&63];continue}p+=1,m=65536+((m&1023)<<10|u.charCodeAt(p)&1023),f[f.length]=a[240|m>>18]+a[128|m>>12&63]+a[128|m>>6&63]+a[128|m&63]}c+=f.join(``)}return c},p=function(e){for(var t=[{obj:{o:e},prop:`o`}],n=[],r=0;r{var n=uo(),r=po(),i=fo(),a=Object.prototype.hasOwnProperty,o={brackets:function(e){return e+`[]`},comma:`comma`,indices:function(e,t){return e+`[`+t+`]`},repeat:function(e){return e}},s=Array.isArray,c=Array.prototype.push,l=function(e,t){c.apply(e,s(t)?t:[t])},u=Date.prototype.toISOString,d=i.default,f={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:`indices`,charset:`utf-8`,charsetSentinel:!1,commaRoundTrip:!1,delimiter:`&`,encode:!0,encodeDotInKeys:!1,encoder:r.encode,encodeValuesOnly:!1,filter:void 0,format:d,formatter:i.formatters[d],indices:!1,serializeDate:function(e){return u.call(e)},skipNulls:!1,strictNullHandling:!1},p=function(e){return typeof e==`string`||typeof e==`number`||typeof e==`boolean`||typeof e==`symbol`||typeof e==`bigint`},m={},h=function e(t,i,a,o,c,u,d,h,g,_,v,y,b,x,S,C,w,T){for(var E=t,D=T,O=0,k=!1;(D=D.get(m))!==void 0&&!k;){var A=D.get(t);if(O+=1,A!==void 0){if(A===O)throw RangeError(`Cyclic object value`);k=!0}D.get(m)===void 0&&(O=0)}if(typeof _==`function`?E=_(i,E):E instanceof Date?E=b(E):a===`comma`&&s(E)&&(E=r.maybeMap(E,function(e){return e instanceof Date?b(e):e})),E===null){if(u)return g&&!C?g(i,f.encoder,w,`key`,x):i;E=``}if(p(E)||r.isBuffer(E)){if(g){var j=C?i:g(i,f.encoder,w,`key`,x);return[S(j)+`=`+S(g(E,f.encoder,w,`value`,x))]}return[S(i)+`=`+S(String(E))]}var M=[];if(E===void 0)return M;var N;if(a===`comma`&&s(E))C&&g&&(E=r.maybeMap(E,g)),N=[{value:E.length>0?E.join(`,`)||null:void 0}];else if(s(_))N=_;else{var ee=Object.keys(E);N=v?ee.sort(v):ee}var P=h?String(i).replace(/\./g,`%2E`):String(i),F=o&&s(E)&&E.length===1?P+`[]`:P;if(c&&s(E)&&E.length===0)return F+`[]`;for(var I=0;I0?b+y:``}}),ho=bt((exports,t)=>{var n=po(),r=Object.prototype.hasOwnProperty,i=Array.isArray,a={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:`utf-8`,charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:n.decode,delimiter:`&`,depth:5,duplicates:`combine`,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1,throwOnLimitExceeded:!1},o=function(e){return e.replace(/&#(\d+);/g,function(e,t){return String.fromCharCode(parseInt(t,10))})},s=function(e,t,n){if(e&&typeof e==`string`&&t.comma&&e.indexOf(`,`)>-1)return e.split(`,`);if(t.throwOnLimitExceeded&&n>=t.arrayLimit)throw RangeError(`Array limit exceeded. Only `+t.arrayLimit+` element`+(t.arrayLimit===1?``:`s`)+` allowed in an array.`);return e},c=`utf8=%26%2310003%3B`,l=`utf8=%E2%9C%93`,u=function(e,t){var u={__proto__:null},d=t.ignoreQueryPrefix?e.replace(/^\?/,``):e;d=d.replace(/%5B/gi,`[`).replace(/%5D/gi,`]`);var f=t.parameterLimit===1/0?void 0:t.parameterLimit,p=d.split(t.delimiter,t.throwOnLimitExceeded?f+1:f);if(t.throwOnLimitExceeded&&p.length>f)throw RangeError(`Parameter limit exceeded. Only `+f+` parameter`+(f===1?``:`s`)+` allowed.`);var m=-1,h,g=t.charset;if(t.charsetSentinel)for(h=0;h-1&&(x=i(x)?[x]:x);var S=r.call(u,b);S&&t.duplicates===`combine`?u[b]=n.combine(u[b],x):(!S||t.duplicates===`last`)&&(u[b]=x)}return u},d=function(e,t,r,i){var a=0;if(e.length>0&&e[e.length-1]===`[]`){var o=e.slice(0,-1).join(``);a=Array.isArray(t)&&t[o]?t[o].length:0}for(var c=i?t:s(t,r,a),l=e.length-1;l>=0;--l){var u,d=e[l];if(d===`[]`&&r.parseArrays)u=r.allowEmptyArrays&&(c===``||r.strictNullHandling&&c===null)?[]:n.combine([],c);else{u=r.plainObjects?{__proto__:null}:{};var f=d.charAt(0)===`[`&&d.charAt(d.length-1)===`]`?d.slice(1,-1):d,p=r.decodeDotInKeys?f.replace(/%2E/g,`.`):f,m=parseInt(p,10);!r.parseArrays&&p===``?u={0:c}:!isNaN(m)&&d!==p&&String(m)===p&&m>=0&&r.parseArrays&&m<=r.arrayLimit?(u=[],u[m]=c):p!==`__proto__`&&(u[p]=c)}c=u}return c},f=function(e,t,n,i){if(e){var a=n.allowDots?e.replace(/\.([^.[]+)/g,`[$1]`):e,o=/(\[[^[\]]*])/,s=/(\[[^[\]]*])/g,c=n.depth>0&&o.exec(a),l=c?a.slice(0,c.index):a,u=[];if(l){if(!n.plainObjects&&r.call(Object.prototype,l)&&!n.allowPrototypes)return;u.push(l)}for(var f=0;n.depth>0&&(c=s.exec(a))!==null&&f{var n=mo(),r=ho(),i=fo();t.exports={formats:i,parse:r,stringify:n}}),_o=bt(exports=>{var t=lo();function n(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var r=/^([a-z0-9.+-]+:)/i,i=/:[0-9]*$/,a=/^(\/\/?(?!\/)[^?\s]*)(\?[^\s]*)?$/,o=[`<`,`>`,`"`,"`",` `,`\r`,` `,` `],s=[`{`,`}`,`|`,`\\`,`^`,"`"].concat(o),c=[`'`].concat(s),l=[`%`,`/`,`?`,`;`,`#`].concat(c),u=[`/`,`?`,`#`],d=255,f=/^[+a-z0-9A-Z_-]{0,63}$/,p=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,m={javascript:!0,"javascript:":!0},h={javascript:!0,"javascript:":!0},g={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},_=go();function v(e,t,r){if(e&&typeof e==`object`&&e instanceof n)return e;var i=new n;return i.parse(e,t,r),i}n.prototype.parse=function(e,n,i){if(typeof e!=`string`)throw TypeError(`Parameter 'url' must be a string, not `+typeof e);var o=e.indexOf(`?`),s=o!==-1&&o127?ee+=`x`:ee+=N[P];if(!ee.match(f)){var I=j.slice(0,E),te=j.slice(E+1),ne=N.match(p);ne&&(I.push(ne[1]),te.unshift(ne[2])),te.length&&(b=`/`+te.join(`.`)+b),this.hostname=I.join(`.`);break}}}this.hostname.length>d?this.hostname=``:this.hostname=this.hostname.toLowerCase(),A||(this.hostname=t.toASCII(this.hostname));var L=this.port?`:`+this.port:``,re=this.hostname||``;this.host=re+L,this.href+=this.host,A&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),b[0]!==`/`&&(b=`/`+b))}if(!m[C])for(var E=0,M=c.length;E0?r.host.split(`@`):!1;w&&(r.auth=w.shift(),r.hostname=w.shift(),r.host=r.hostname)}return r.search=e.search,r.query=e.query,(r.pathname!==null||r.search!==null)&&(r.path=(r.pathname?r.pathname:``)+(r.search?r.search:``)),r.href=r.format(),r}if(!S.length)return r.pathname=null,r.search?r.path=`/`+r.search:r.path=null,r.href=r.format(),r;for(var T=S.slice(-1)[0],E=(r.host||e.host||S.length>1)&&(T===`.`||T===`..`)||T===``,D=0,O=S.length;O>=0;O--)T=S[O],T===`.`?S.splice(O,1):T===`..`?(S.splice(O,1),D++):D&&(S.splice(O,1),D--);if(!b&&!x)for(;D--;)S.unshift(`..`);b&&S[0]!==``&&(!S[0]||S[0].charAt(0)!==`/`)&&S.unshift(``),E&&S.join(`/`).substr(-1)!==`/`&&S.push(``);var k=S[0]===``||S[0]&&S[0].charAt(0)===`/`;if(C){r.hostname=k?``:S.length?S.shift():``,r.host=r.hostname;var w=r.host&&r.host.indexOf(`@`)>0?r.host.split(`@`):!1;w&&(r.auth=w.shift(),r.hostname=w.shift(),r.host=r.hostname)}return b||=r.host&&S.length,b&&!k&&S.unshift(``),S.length>0?r.pathname=S.join(`/`):(r.pathname=null,r.path=null),(r.pathname!==null||r.search!==null)&&(r.path=(r.pathname?r.pathname:``)+(r.search?r.search:``)),r.auth=e.auth||r.auth,r.slashes=r.slashes||e.slashes,r.href=r.format(),r},n.prototype.parseHost=function(){var e=this.host,t=i.exec(e);t&&(t=t[0],t!==`:`&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)},exports.parse=v,exports.resolve=b,exports.resolveObject=x,exports.format=y,exports.Url=n}),vo=Tt(so(),1),yo=Tt(co(),1),bo=Tt(_o(),1),xo={parse:bo.parse,format:bo.format,resolve:bo.resolve};oo.RETINA_PREFIX=/@([0-9\.]+)x/,oo.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT=!1;var So=!1,Co=`6.5.10`;function wo(e){var t;if(!So){if(oo.ADAPTER.getNavigator().userAgent.toLowerCase().indexOf(`chrome`)>-1){var n=[` %c %c %c PixiJS `+Co+` - ✰ `+e+` ✰ %c %c http://www.pixijs.com/ %c %c ♥%c♥%c♥ @@ -539,14 +539,14 @@ void main(void){ `,t),a(t)})),c[n]}catch(r){np.warn(e.tag,`Failed to load motion at "${t}"[${n}] `,r),a(r)}return Promise.resolve(void 0)}static loadExpression(e,t){var n;let r=n=>e.emit(`expressionLoadError`,t,n);try{let i=e.definitions[t];if(!i)return Promise.resolve(void 0);e.listeners(`destroy`).includes(Fp.releaseTasks)||e.once(`destroy`,Fp.releaseTasks);let a=Fp.expressionTasksMap.get(e);a||(a=[],Fp.expressionTasksMap.set(e,a));let o=e.getExpressionFile(i);return(n=a[t])??(a[t]=Ep.load({url:o,settings:e.settings,type:`json`,target:e}).then(n=>{let r=Fp.expressionTasksMap.get(e);r&&delete r[t];let a=e.createExpression(n,i);return e.emit(`expressionLoaded`,t,a),a}).catch(t=>{np.warn(e.tag,`Failed to load expression: ${o} `,t),r(t)})),a[t]}catch(n){np.warn(e.tag,`Failed to load expression at [${t}] -`,n),r(n)}return Promise.resolve(void 0)}static releaseTasks(){this instanceof vp?Fp.motionTasksMap.delete(this):Fp.expressionTasksMap.delete(this)}};let Ip=Fp;Ip.runtimes=[],Ip.urlToJSON=kp,Ip.jsonToSettings=Ap,Ip.waitUntilReady=jp,Ip.setupOptionals=Mp,Ip.setupEssentials=Np,Ip.createInternalModel=Pp,Ip.live2DModelMiddlewares=[kp,Ap,jp,Mp,Np,Pp],Ip.motionTasksMap=new WeakMap,Ip.expressionTasksMap=new WeakMap,vp.prototype._loadMotion=function(e,t){return Ip.loadMotion(this,e,t)},sp.prototype._loadExpression=function(e){return Ip.loadExpression(this,e)};var Lp=class{constructor(){this._autoInteract=!1}get autoInteract(){return this._autoInteract}set autoInteract(e){e!==this._autoInteract&&(e?this.on(`pointertap`,Rp,this):this.off(`pointertap`,Rp,this),this._autoInteract=e)}registerInteraction(e){e!==this.interactionManager&&(this.unregisterInteraction(),this._autoInteract&&e&&(this.interactionManager=e,e.on(`pointermove`,zp,this)))}unregisterInteraction(){var e;this.interactionManager&&((e=this.interactionManager)==null||e.off(`pointermove`,zp,this),this.interactionManager=void 0)}};function Rp(e){this.tap(e.data.global.x,e.data.global.y)}function zp(e){this.focus(e.data.global.x,e.data.global.y)}var Bp=class extends Os{};const Vp=new us,Hp=new vs;let Up;var Wp=class extends Iu{constructor(e){super(),this.tag=`Live2DModel(uninitialized)`,this.textures=[],this.transform=new Bp,this.anchor=new _s(this.onAnchorChange,this,0,0),this.glContextID=-1,this.elapsedTime=performance.now(),this.deltaTime=0,this._autoUpdate=!1,this.once(`modelLoaded`,()=>this.init(e))}static from(e,t){let n=new this(t);return Ip.setupLive2DModel(n,e,t).then(()=>n)}static fromSync(e,t){let n=new this(t);return Ip.setupLive2DModel(n,e,t).then(t?.onLoad).catch(t?.onError),n}static registerTicker(e){Up=e}get autoUpdate(){return this._autoUpdate}set autoUpdate(e){var t;Up||=(t=window.PIXI)?.Ticker,e?this._destroyed||(Up?(Up.shared.add(this.onTickerUpdate,this),this._autoUpdate=!0):np.warn(this.tag,`No Ticker registered, please call Live2DModel.registerTicker(Ticker).`)):(Up?.shared.remove(this.onTickerUpdate,this),this._autoUpdate=!1)}init(e){this.tag=`Live2DModel(${this.internalModel.settings.name})`;let t=Object.assign({autoUpdate:!0,autoInteract:!0},e);t.autoInteract&&(this.interactive=!0),this.autoInteract=t.autoInteract,this.autoUpdate=t.autoUpdate}onAnchorChange(){this.pivot.set(this.anchor.x*this.internalModel.width,this.anchor.y*this.internalModel.height)}motion(e,t,n){return t===void 0?this.internalModel.motionManager.startRandomMotion(e,n):this.internalModel.motionManager.startMotion(e,t,n)}expression(e){return this.internalModel.motionManager.expressionManager?e===void 0?this.internalModel.motionManager.expressionManager.setRandomExpression():this.internalModel.motionManager.expressionManager.setExpression(e):Promise.resolve(!1)}focus(e,t,n=!1){Vp.x=e,Vp.y=t,this.toModelPosition(Vp,Vp,!0);let r=Vp.x/this.internalModel.originalWidth*2-1,i=Vp.y/this.internalModel.originalHeight*2-1,a=Math.atan2(i,r);this.internalModel.focusController.focus(Math.cos(a),-Math.sin(a),n)}tap(e,t){let n=this.hitTest(e,t);n.length&&(np.log(this.tag,`Hit`,n),this.emit(`hit`,n))}hitTest(e,t){return Vp.x=e,Vp.y=t,this.toModelPosition(Vp,Vp),this.internalModel.hitTest(Vp.x,Vp.y)}toModelPosition(e,t=e.clone(),n){return n||(this._recursivePostUpdateTransform(),this.parent?this.displayObjectUpdateTransform():(this.parent=this._tempDisplayObjectParent,this.displayObjectUpdateTransform(),this.parent=null)),this.transform.worldTransform.applyInverse(e,t),this.internalModel.localTransform.applyInverse(t,t),t}containsPoint(e){return this.getBounds(!0).contains(e.x,e.y)}_calculateBounds(){this._bounds.addFrame(this.transform,0,0,this.internalModel.width,this.internalModel.height)}onTickerUpdate(){this.update(Up.shared.deltaMS)}update(e){this.deltaTime+=e,this.elapsedTime+=e}_render(e){this.registerInteraction(e.plugins.interaction),e.batch.reset(),e.geometry.reset(),e.shader.reset(),e.state.reset();let t=!1;this.glContextID!==e.CONTEXT_UID&&(this.glContextID=e.CONTEXT_UID,this.internalModel.updateWebGLContext(e.gl,this.glContextID),t=!0);for(let n=0;nt.destroy(e.baseTexture)),this.internalModel.destroy(),super.destroy(e)}};ip(Wp,[Lp]);const Gp=class{static resolveURL(e,t){var n;let r=(n=Gp.filesMap[e])?.[t];if(r===void 0)throw Error(`Cannot find this file from uploaded files: `+t);return r}static upload(e,t){return Bu(this,null,function*(){let n={};for(let r of t.getDefinedFiles()){let i=decodeURI(xo.resolve(t.url,r)),a=e.find(e=>e.webkitRelativePath===i);a&&(n[r]=URL.createObjectURL(a))}Gp.filesMap[t._objectURL]=n})}static createSettings(e){return Bu(this,null,function*(){let t=e.find(e=>e.name.endsWith(`model.json`)||e.name.endsWith(`model3.json`));if(!t)throw TypeError(`Settings file not found`);let n=yield Gp.readText(t),r=JSON.parse(n);r.url=t.webkitRelativePath;let i=Ip.findRuntime(r);if(!i)throw Error(`Unknown settings JSON`);let a=i.createModelSettings(r);return a._objectURL=URL.createObjectURL(t),a})}static readText(e){return Bu(this,null,function*(){return new Promise((t,n)=>{let r=new FileReader;r.onload=()=>t(r.result),r.onerror=n,r.readAsText(e,`utf8`)})})}};let Kp=Gp;Kp.filesMap={},Kp.factory=(e,t)=>Bu(void 0,null,function*(){if(Array.isArray(e.source)&&e.source[0]instanceof File){let t=e.source,n=t.settings;if(!n)n=yield Gp.createSettings(t);else if(!n._objectURL)throw Error(`"_objectURL" must be specified in ModelSettings`);n.validateFiles(t.map(e=>encodeURI(e.webkitRelativePath))),yield Gp.upload(t,n),n.resolveURL=function(e){return Gp.resolveURL(this._objectURL,e)},e.source=n,e.live2dModel.once(`modelLoaded`,e=>{e.once(`destroy`,function(){let e=this.settings._objectURL;if(URL.revokeObjectURL(e),Gp.filesMap[e])for(let t of Object.values(Gp.filesMap[e]))URL.revokeObjectURL(t);delete Gp.filesMap[e]})})}return t()}),Ip.live2DModelMiddlewares.unshift(Kp.factory);const qp=class{static unzip(e,t){return Bu(this,null,function*(){let n=yield qp.getFilePaths(e),r=[];for(let e of t.getDefinedFiles()){let i=decodeURI(xo.resolve(t.url,e));n.includes(i)&&r.push(i)}let i=yield qp.getFiles(e,r);for(let e=0;ee.endsWith(`model.json`)||e.endsWith(`model3.json`));if(!n)throw Error(`Settings file not found`);let r=yield qp.readText(e,n);if(!r)throw Error(`Empty settings file: `+n);let i=JSON.parse(r);i.url=n;let a=Ip.findRuntime(i);if(!a)throw Error(`Unknown settings JSON`);return a.createModelSettings(i)})}static zipReader(e,t){return Bu(this,null,function*(){throw Error(`Not implemented`)})}static getFilePaths(e){return Bu(this,null,function*(){throw Error(`Not implemented`)})}static getFiles(e,t){return Bu(this,null,function*(){throw Error(`Not implemented`)})}static readText(e,t){return Bu(this,null,function*(){throw Error(`Not implemented`)})}static releaseReader(e){}};let Jp=qp;if(Jp.ZIP_PROTOCOL=`zip://`,Jp.uid=0,Jp.factory=(e,t)=>Bu(void 0,null,function*(){let n=e.source,r,i,a;if(typeof n==`string`&&(n.endsWith(`.zip`)||n.startsWith(qp.ZIP_PROTOCOL))?(r=n.startsWith(qp.ZIP_PROTOCOL)?n.slice(qp.ZIP_PROTOCOL.length):n,i=yield Ep.load({url:r,type:`blob`,target:e.live2dModel})):Array.isArray(n)&&n.length===1&&n[0]instanceof File&&n[0].name.endsWith(`.zip`)&&(i=n[0],r=URL.createObjectURL(i),a=n.settings),i){if(!i.size)throw Error(`Empty zip file`);let t=yield qp.zipReader(i,r);a||=yield qp.createSettings(t),a._objectURL=qp.ZIP_PROTOCOL+qp.uid+`/`+a.url;let n=yield qp.unzip(t,a);n.settings=a,e.source=n,r.startsWith(`blob:`)&&e.live2dModel.once(`modelLoaded`,e=>{e.once(`destroy`,function(){URL.revokeObjectURL(r)})}),qp.releaseReader(t)}return t()}),Ip.live2DModelMiddlewares.unshift(Jp.factory),!window.Live2DCubismCore)throw Error(`Could not find Cubism 4 runtime. This plugin requires live2dcubismcore.js to be loaded.`);var Yp=class extends sp{constructor(e,t){var n;super(e,t),this.queueManager=new Kd,this.definitions=(n=e.expressions)??[],this.init()}isFinished(){return this.queueManager.isFinished()}getExpressionIndex(e){return this.definitions.findIndex(t=>t.Name===e)}getExpressionFile(e){return e.File}createExpression(e,t){return yd.create(e)}_setExpression(e){return this.queueManager.startMotion(e,!1,performance.now())}stopAllExpressions(){this.queueManager.stopAllMotions()}updateParameters(e,t){return this.queueManager.doUpdateMotion(e,t)}},Xp=class e extends fp{constructor(t){if(super(t),!e.isValidJSON(t))throw TypeError(`Invalid JSON.`);Object.assign(this,new Gf(t))}static isValidJSON(e){var t;return!!e?.FileReferences&&typeof e.FileReferences.Moc==`string`&&(t=e.FileReferences.Textures)?.length>0&&e.FileReferences.Textures.every(e=>typeof e==`string`)}replaceFiles(e){if(super.replaceFiles(e),this.motions)for(let[t,n]of Object.entries(this.motions))for(let r=0;r{this.emit(`motion:`+t)})}isFinished(){return this.queueManager.isFinished()}_startMotion(e,t){return e.setFinishedMotionHandler(t),this.queueManager.stopAllMotions(),this.queueManager.startMotion(e,!1,performance.now())}_stopAllMotions(){this.queueManager.stopAllMotions()}createMotion(e,t,n){let r=Wd.create(e),i=new kd(e),a=(t===this.groups.idle?tp.idleMotionFadingDuration:tp.motionFadingDuration)/1e3;return i.getMotionFadeInTime()===void 0&&r.setFadeInTime(n.FadeInTime>0?n.FadeInTime:a),i.getMotionFadeOutTime()===void 0&&r.setFadeOutTime(n.FadeOutTime>0?n.FadeOutTime:a),r.setEffectIds(this.eyeBlinkIds,this.lipSyncIds),r}getMotionFile(e){return e.File}getMotionName(e){return e.File}getSoundFile(e){return e.Sound}updateParameters(e,t){return this.queueManager.doUpdateMotion(e,t)}destroy(){super.destroy(),this.queueManager.release(),this.queueManager=void 0}};const Qp=new $u;var $p=class extends bp{constructor(e,t,n){super(),this.lipSync=!0,this.breath=Vu.create(),this.renderer=new Wf,this.idParamAngleX=Kf,this.idParamAngleY=qf,this.idParamAngleZ=Jf,this.idParamEyeBallX=Yf,this.idParamEyeBallY=Xf,this.idParamBodyAngleX=Zf,this.idParamBreath=Qf,this.pixelsPerUnit=1,this.centeringTransform=new vs,this.coreModel=e,this.settings=t,this.motionManager=new Zp(t,n),this.init()}init(){var e;super.init(),(e=this.settings.getEyeBlinkParameters())?.length>0&&(this.eyeBlink=Wu.create(this.settings)),this.breath.setParameters([new Hu(this.idParamAngleX,0,15,6.5345,.5),new Hu(this.idParamAngleY,0,8,3.5345,.5),new Hu(this.idParamAngleZ,0,10,5.5345,.5),new Hu(this.idParamBodyAngleX,0,4,15.5345,.5),new Hu(this.idParamBreath,0,.5,3.2345,.5)]),this.renderer.initialize(this.coreModel),this.renderer.setIsPremultipliedAlpha(!0)}getSize(){return[this.coreModel.getModel().canvasinfo.CanvasWidth,this.coreModel.getModel().canvasinfo.CanvasHeight]}getLayout(){let e={};if(this.settings.layout)for(let t of Object.keys(this.settings.layout)){let n=t.charAt(0).toLowerCase()+t.slice(1);e[n]=this.settings.layout[t]}return e}setupLayout(){super.setupLayout(),this.pixelsPerUnit=this.coreModel.getModel().canvasinfo.PixelsPerUnit,this.centeringTransform.scale(this.pixelsPerUnit,this.pixelsPerUnit).translate(this.originalWidth/2,this.originalHeight/2)}updateWebGLContext(e,t){this.renderer.firstDraw=!0,this.renderer._bufferData={vertex:null,uv:null,index:null},this.renderer.startUp(e),this.renderer._clippingManager._currentFrameNo=t,this.renderer._clippingManager._maskTexture=void 0,Ff.getInstance()._shaderSets=[]}bindTexture(e,t){this.renderer.bindTexture(e,t)}getHitAreaDefs(){var e,t;return(t=(e=this.settings.hitAreas)?.map(e=>({id:e.Id,name:e.Name,index:this.coreModel.getDrawableIndex(e.Id)})))??[]}getDrawableIDs(){return this.coreModel.getDrawableIds()}getDrawableIndex(e){return this.coreModel.getDrawableIndex(e)}getDrawableVertices(e){if(typeof e==`string`&&(e=this.coreModel.getDrawableIndex(e),e===-1))throw TypeError(`Unable to find drawable ID: `+e);let t=this.coreModel.getDrawableVertices(e).slice();for(let e=0;e{function n(){try{rm(),e()}catch(e){if(tm--,tm<0){let n=Error(`Failed to start up Cubism 4 framework.`);n.cause=e,t(n);return}np.log(`Cubism4`,`Startup failed, retrying 10ms later...`),setTimeout(n,10)}}n()}),em)}function rm(e){e=Object.assign({logFunction:console.log,loggingLevel:cd.LogLevel_Verbose},e),sd.startUp(e),sd.initialize()}Ip.registerRuntime({version:4,ready:nm,test(e){return e instanceof Xp||Xp.isValidJSON(e)},isValidMoc(e){if(e.byteLength<4)return!1;let t=new Int8Array(e,0,4);return String.fromCharCode(...t)===`MOC3`},createModelSettings(e){return new Xp(e)},createCoreModel(e){let t=gd.create(e);try{let e=t.createModel();return e.__moc=t,e}catch(e){try{t.release()}catch{}throw e}},createInternalModel(e,t,n){let r=new $p(e,t,n),i=e;return i.__moc&&(r.__moc=i.__moc,delete i.__moc,r.once(`destroy`,im)),r},createPhysics(e,t){return uf.create(t)},createPose(e,t){return Ju.create(t)}});function im(){var e;(e=this.__moc)==null||e.release()}var am=H({__name:`Canvas`,props:{width:null,height:null,resolution:{default:2}},setup(e,{expose:t}){let n=e,r=W(),i=W(),a=W();async function o(e){Wp.registerTicker(ns),Qo.add(rs),i.value=new Ru({width:n.width*n.resolution,height:n.height*n.resolution,backgroundAlpha:0,preserveDrawingBuffer:!0}),a.value=i.value.view,a.value.style.width=`100%`,a.value.style.height=`100%`,a.value.style.objectFit=`cover`,a.value.style.display=`block`,e.appendChild(i.value.view)}function s(){i.value&&i.value.renderer.resize(n.width,n.height)}K([()=>n.width,()=>n.height],()=>s()),K(()=>n.resolution,e=>{i.value&&e&&(i.value.renderer.resolution=e,s())}),Yt(async()=>r.value&&await o(r.value)),Zt(()=>{var e;return(e=i.value)?.destroy()});async function c(){let e=new Promise(e=>{if(!a.value||!i.value)return e(null);i.value.render(),a.value.toBlob(e)});return e}function l(){return a.value}return t({captureFrame:c,canvasElement:l}),(e,t)=>(U(),V(`div`,{ref_key:`containerRef`,ref:r,"h-full":``,"w-full":``},[nn(e.$slots,`default`,{app:i.value})],512))}}),om=am,sm=function(){function e(){this.pressure=0,this.rotationAngle=0,this.twist=0,this.tangentialPressure=0,this.global=new us,this.target=null,this.originalEvent=null,this.identifier=null,this.isPrimary=!1,this.button=0,this.buttons=0,this.width=0,this.height=0,this.tiltX=0,this.tiltY=0,this.pointerType=null,this.pressure=0,this.rotationAngle=0,this.twist=0,this.tangentialPressure=0}return Object.defineProperty(e.prototype,`pointerId`,{get:function(){return this.identifier},enumerable:!1,configurable:!0}),e.prototype.getLocalPosition=function(e,t,n){return e.worldTransform.applyInverse(n||this.global,t)},e.prototype.copyEvent=function(e){`isPrimary`in e&&e.isPrimary&&(this.isPrimary=!0),this.button=`button`in e&&e.button;var t=`buttons`in e&&e.buttons;this.buttons=Number.isInteger(t)?t:`which`in e&&e.which,this.width=`width`in e&&e.width,this.height=`height`in e&&e.height,this.tiltX=`tiltX`in e&&e.tiltX,this.tiltY=`tiltY`in e&&e.tiltY,this.pointerType=`pointerType`in e&&e.pointerType,this.pressure=`pressure`in e&&e.pressure,this.rotationAngle=`rotationAngle`in e&&e.rotationAngle,this.twist=`twist`in e&&e.twist||0,this.tangentialPressure=`tangentialPressure`in e&&e.tangentialPressure||0},e.prototype.reset=function(){this.isPrimary=!1},e}(),cm=function(e,t){return cm=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},cm(e,t)};function lm(e,t){cm(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var um=function(){function e(){this.stopped=!1,this.stopsPropagatingAt=null,this.stopPropagationHint=!1,this.target=null,this.currentTarget=null,this.type=null,this.data=null}return e.prototype.stopPropagation=function(){this.stopped=!0,this.stopPropagationHint=!0,this.stopsPropagatingAt=this.currentTarget},e.prototype.reset=function(){this.stopped=!1,this.stopsPropagatingAt=null,this.stopPropagationHint=!1,this.currentTarget=null,this.target=null},e}(),dm=function(){function e(t){this._pointerId=t,this._flags=e.FLAGS.NONE}return e.prototype._doSet=function(e,t){t?this._flags|=e:this._flags&=~e},Object.defineProperty(e.prototype,`pointerId`,{get:function(){return this._pointerId},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,`flags`,{get:function(){return this._flags},set:function(e){this._flags=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,`none`,{get:function(){return this._flags===e.FLAGS.NONE},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,`over`,{get:function(){return(this._flags&e.FLAGS.OVER)!==0},set:function(t){this._doSet(e.FLAGS.OVER,t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,`rightDown`,{get:function(){return(this._flags&e.FLAGS.RIGHT_DOWN)!==0},set:function(t){this._doSet(e.FLAGS.RIGHT_DOWN,t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,`leftDown`,{get:function(){return(this._flags&e.FLAGS.LEFT_DOWN)!==0},set:function(t){this._doSet(e.FLAGS.LEFT_DOWN,t)},enumerable:!1,configurable:!0}),e.FLAGS=Object.freeze({NONE:0,OVER:1,LEFT_DOWN:2,RIGHT_DOWN:4}),e}(),fm=function(){function e(){this._tempPoint=new us}return e.prototype.recursiveFindHit=function(e,t,n,r,i){var a;if(!t||!t.visible)return!1;var o=e.data.global;i=t.interactive||i;var s=!1,c=i,l=!0;if(t.hitArea)r&&(t.worldTransform.applyInverse(o,this._tempPoint),t.hitArea.contains(this._tempPoint.x,this._tempPoint.y)?s=!0:(r=!1,l=!1)),c=!1;else if(t._mask&&r){var u=t._mask.isMaskData?t._mask.maskObject:t._mask;u&&!(a=u.containsPoint)?.call(u,o)&&(r=!1)}if(l&&t.interactiveChildren&&t.children)for(var d=t.children,f=d.length-1;f>=0;f--){var p=d[f],m=this.recursiveFindHit(e,p,n,r,c);if(m){if(!p.parent)continue;c=!1,m&&(e.target&&(r=!1),s=!0)}}return i&&(r&&!e.target&&!t.hitArea&&t.containsPoint&&t.containsPoint(o)&&(s=!0),t.interactive&&(s&&!e.target&&(e.target=t),n&&n(e,t,!!s))),s},e.prototype.findHit=function(e,t,n,r){this.recursiveFindHit(e,t,n,r,!1)},e}(),pm={interactive:!1,interactiveChildren:!0,hitArea:null,get buttonMode(){return this.cursor===`pointer`},set buttonMode(e){e?this.cursor=`pointer`:this.cursor===`pointer`&&(this.cursor=null)},cursor:null,get trackedPointers(){return this._trackedPointers===void 0&&(this._trackedPointers={}),this._trackedPointers},_trackedPointers:void 0};Nu.mixin(pm);var mm=1,hm={target:null,data:{global:null}},gm=function(e){lm(t,e);function t(t,n){var r=e.call(this)||this;return n||={},r.renderer=t,r.autoPreventDefault=n.autoPreventDefault===void 0?!0:n.autoPreventDefault,r.interactionFrequency=n.interactionFrequency||10,r.mouse=new sm,r.mouse.identifier=mm,r.mouse.global.set(-999999),r.activeInteractionData={},r.activeInteractionData[mm]=r.mouse,r.interactionDataPool=[],r.eventData=new um,r.interactionDOMElement=null,r.moveWhenInside=!1,r.eventsAdded=!1,r.tickerAdded=!1,r.mouseOverRenderer=!(`PointerEvent`in globalThis),r.supportsTouchEvents=`ontouchstart`in globalThis,r.supportsPointerEvents=!!globalThis.PointerEvent,r.onPointerUp=r.onPointerUp.bind(r),r.processPointerUp=r.processPointerUp.bind(r),r.onPointerCancel=r.onPointerCancel.bind(r),r.processPointerCancel=r.processPointerCancel.bind(r),r.onPointerDown=r.onPointerDown.bind(r),r.processPointerDown=r.processPointerDown.bind(r),r.onPointerMove=r.onPointerMove.bind(r),r.processPointerMove=r.processPointerMove.bind(r),r.onPointerOut=r.onPointerOut.bind(r),r.processPointerOverOut=r.processPointerOverOut.bind(r),r.onPointerOver=r.onPointerOver.bind(r),r.cursorStyles={default:`inherit`,pointer:`pointer`},r.currentCursorMode=null,r.cursor=null,r.resolution=1,r.delayedEvents=[],r.search=new fm,r._tempDisplayObject=new Pu,r._eventListenerOptions={capture:!0,passive:!1},r._useSystemTicker=n.useSystemTicker===void 0?!0:n.useSystemTicker,r.setTargetElement(r.renderer.view,r.renderer.resolution),r}return Object.defineProperty(t.prototype,`useSystemTicker`,{get:function(){return this._useSystemTicker},set:function(e){this._useSystemTicker=e,e?this.addTickerListener():this.removeTickerListener()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`lastObjectRendered`,{get:function(){return this.renderer._lastObjectRendered||this._tempDisplayObject},enumerable:!1,configurable:!0}),t.prototype.hitTest=function(e,t){return hm.target=null,hm.data.global=e,t||=this.lastObjectRendered,this.processInteractive(hm,t,null,!0),hm.target},t.prototype.setTargetElement=function(e,t){t===void 0&&(t=1),this.removeTickerListener(),this.removeEvents(),this.interactionDOMElement=e,this.resolution=t,this.addEvents(),this.addTickerListener()},t.prototype.addTickerListener=function(){this.tickerAdded||!this.interactionDOMElement||!this._useSystemTicker||(ns.system.add(this.tickerUpdate,this,es.INTERACTION),this.tickerAdded=!0)},t.prototype.removeTickerListener=function(){this.tickerAdded&&(ns.system.remove(this.tickerUpdate,this),this.tickerAdded=!1)},t.prototype.addEvents=function(){if(!(this.eventsAdded||!this.interactionDOMElement)){var e=this.interactionDOMElement.style;globalThis.navigator.msPointerEnabled?(e.msContentZooming=`none`,e.msTouchAction=`none`):this.supportsPointerEvents&&(e.touchAction=`none`),this.supportsPointerEvents?(globalThis.document.addEventListener(`pointermove`,this.onPointerMove,this._eventListenerOptions),this.interactionDOMElement.addEventListener(`pointerdown`,this.onPointerDown,this._eventListenerOptions),this.interactionDOMElement.addEventListener(`pointerleave`,this.onPointerOut,this._eventListenerOptions),this.interactionDOMElement.addEventListener(`pointerover`,this.onPointerOver,this._eventListenerOptions),globalThis.addEventListener(`pointercancel`,this.onPointerCancel,this._eventListenerOptions),globalThis.addEventListener(`pointerup`,this.onPointerUp,this._eventListenerOptions)):(globalThis.document.addEventListener(`mousemove`,this.onPointerMove,this._eventListenerOptions),this.interactionDOMElement.addEventListener(`mousedown`,this.onPointerDown,this._eventListenerOptions),this.interactionDOMElement.addEventListener(`mouseout`,this.onPointerOut,this._eventListenerOptions),this.interactionDOMElement.addEventListener(`mouseover`,this.onPointerOver,this._eventListenerOptions),globalThis.addEventListener(`mouseup`,this.onPointerUp,this._eventListenerOptions)),this.supportsTouchEvents&&(this.interactionDOMElement.addEventListener(`touchstart`,this.onPointerDown,this._eventListenerOptions),this.interactionDOMElement.addEventListener(`touchcancel`,this.onPointerCancel,this._eventListenerOptions),this.interactionDOMElement.addEventListener(`touchend`,this.onPointerUp,this._eventListenerOptions),this.interactionDOMElement.addEventListener(`touchmove`,this.onPointerMove,this._eventListenerOptions)),this.eventsAdded=!0}},t.prototype.removeEvents=function(){if(!(!this.eventsAdded||!this.interactionDOMElement)){var e=this.interactionDOMElement.style;globalThis.navigator.msPointerEnabled?(e.msContentZooming=``,e.msTouchAction=``):this.supportsPointerEvents&&(e.touchAction=``),this.supportsPointerEvents?(globalThis.document.removeEventListener(`pointermove`,this.onPointerMove,this._eventListenerOptions),this.interactionDOMElement.removeEventListener(`pointerdown`,this.onPointerDown,this._eventListenerOptions),this.interactionDOMElement.removeEventListener(`pointerleave`,this.onPointerOut,this._eventListenerOptions),this.interactionDOMElement.removeEventListener(`pointerover`,this.onPointerOver,this._eventListenerOptions),globalThis.removeEventListener(`pointercancel`,this.onPointerCancel,this._eventListenerOptions),globalThis.removeEventListener(`pointerup`,this.onPointerUp,this._eventListenerOptions)):(globalThis.document.removeEventListener(`mousemove`,this.onPointerMove,this._eventListenerOptions),this.interactionDOMElement.removeEventListener(`mousedown`,this.onPointerDown,this._eventListenerOptions),this.interactionDOMElement.removeEventListener(`mouseout`,this.onPointerOut,this._eventListenerOptions),this.interactionDOMElement.removeEventListener(`mouseover`,this.onPointerOver,this._eventListenerOptions),globalThis.removeEventListener(`mouseup`,this.onPointerUp,this._eventListenerOptions)),this.supportsTouchEvents&&(this.interactionDOMElement.removeEventListener(`touchstart`,this.onPointerDown,this._eventListenerOptions),this.interactionDOMElement.removeEventListener(`touchcancel`,this.onPointerCancel,this._eventListenerOptions),this.interactionDOMElement.removeEventListener(`touchend`,this.onPointerUp,this._eventListenerOptions),this.interactionDOMElement.removeEventListener(`touchmove`,this.onPointerMove,this._eventListenerOptions)),this.interactionDOMElement=null,this.eventsAdded=!1}},t.prototype.tickerUpdate=function(e){this._deltaTime+=e,!(this._deltaTime0&&(a=e.composedPath()[0]);for(var o=a===this.interactionDOMElement?``:`outside`,s=0;s{ +`,n),r(n)}return Promise.resolve(void 0)}static releaseTasks(){this instanceof vp?Fp.motionTasksMap.delete(this):Fp.expressionTasksMap.delete(this)}};let Ip=Fp;Ip.runtimes=[],Ip.urlToJSON=kp,Ip.jsonToSettings=Ap,Ip.waitUntilReady=jp,Ip.setupOptionals=Mp,Ip.setupEssentials=Np,Ip.createInternalModel=Pp,Ip.live2DModelMiddlewares=[kp,Ap,jp,Mp,Np,Pp],Ip.motionTasksMap=new WeakMap,Ip.expressionTasksMap=new WeakMap,vp.prototype._loadMotion=function(e,t){return Ip.loadMotion(this,e,t)},sp.prototype._loadExpression=function(e){return Ip.loadExpression(this,e)};var Lp=class{constructor(){this._autoInteract=!1}get autoInteract(){return this._autoInteract}set autoInteract(e){e!==this._autoInteract&&(e?this.on(`pointertap`,Rp,this):this.off(`pointertap`,Rp,this),this._autoInteract=e)}registerInteraction(e){e!==this.interactionManager&&(this.unregisterInteraction(),this._autoInteract&&e&&(this.interactionManager=e,e.on(`pointermove`,zp,this)))}unregisterInteraction(){var e;this.interactionManager&&((e=this.interactionManager)==null||e.off(`pointermove`,zp,this),this.interactionManager=void 0)}};function Rp(e){this.tap(e.data.global.x,e.data.global.y)}function zp(e){this.focus(e.data.global.x,e.data.global.y)}var Bp=class extends Os{};const Vp=new us,Hp=new vs;let Up;var Wp=class extends Iu{constructor(e){super(),this.tag=`Live2DModel(uninitialized)`,this.textures=[],this.transform=new Bp,this.anchor=new _s(this.onAnchorChange,this,0,0),this.glContextID=-1,this.elapsedTime=performance.now(),this.deltaTime=0,this._autoUpdate=!1,this.once(`modelLoaded`,()=>this.init(e))}static from(e,t){let n=new this(t);return Ip.setupLive2DModel(n,e,t).then(()=>n)}static fromSync(e,t){let n=new this(t);return Ip.setupLive2DModel(n,e,t).then(t?.onLoad).catch(t?.onError),n}static registerTicker(e){Up=e}get autoUpdate(){return this._autoUpdate}set autoUpdate(e){var t;Up||=(t=window.PIXI)?.Ticker,e?this._destroyed||(Up?(Up.shared.add(this.onTickerUpdate,this),this._autoUpdate=!0):np.warn(this.tag,`No Ticker registered, please call Live2DModel.registerTicker(Ticker).`)):(Up?.shared.remove(this.onTickerUpdate,this),this._autoUpdate=!1)}init(e){this.tag=`Live2DModel(${this.internalModel.settings.name})`;let t=Object.assign({autoUpdate:!0,autoInteract:!0},e);t.autoInteract&&(this.interactive=!0),this.autoInteract=t.autoInteract,this.autoUpdate=t.autoUpdate}onAnchorChange(){this.pivot.set(this.anchor.x*this.internalModel.width,this.anchor.y*this.internalModel.height)}motion(e,t,n){return t===void 0?this.internalModel.motionManager.startRandomMotion(e,n):this.internalModel.motionManager.startMotion(e,t,n)}expression(e){return this.internalModel.motionManager.expressionManager?e===void 0?this.internalModel.motionManager.expressionManager.setRandomExpression():this.internalModel.motionManager.expressionManager.setExpression(e):Promise.resolve(!1)}focus(e,t,n=!1){Vp.x=e,Vp.y=t,this.toModelPosition(Vp,Vp,!0);let r=Vp.x/this.internalModel.originalWidth*2-1,i=Vp.y/this.internalModel.originalHeight*2-1,a=Math.atan2(i,r);this.internalModel.focusController.focus(Math.cos(a),-Math.sin(a),n)}tap(e,t){let n=this.hitTest(e,t);n.length&&(np.log(this.tag,`Hit`,n),this.emit(`hit`,n))}hitTest(e,t){return Vp.x=e,Vp.y=t,this.toModelPosition(Vp,Vp),this.internalModel.hitTest(Vp.x,Vp.y)}toModelPosition(e,t=e.clone(),n){return n||(this._recursivePostUpdateTransform(),this.parent?this.displayObjectUpdateTransform():(this.parent=this._tempDisplayObjectParent,this.displayObjectUpdateTransform(),this.parent=null)),this.transform.worldTransform.applyInverse(e,t),this.internalModel.localTransform.applyInverse(t,t),t}containsPoint(e){return this.getBounds(!0).contains(e.x,e.y)}_calculateBounds(){this._bounds.addFrame(this.transform,0,0,this.internalModel.width,this.internalModel.height)}onTickerUpdate(){this.update(Up.shared.deltaMS)}update(e){this.deltaTime+=e,this.elapsedTime+=e}_render(e){this.registerInteraction(e.plugins.interaction),e.batch.reset(),e.geometry.reset(),e.shader.reset(),e.state.reset();let t=!1;this.glContextID!==e.CONTEXT_UID&&(this.glContextID=e.CONTEXT_UID,this.internalModel.updateWebGLContext(e.gl,this.glContextID),t=!0);for(let n=0;nt.destroy(e.baseTexture)),this.internalModel.destroy(),super.destroy(e)}};ip(Wp,[Lp]);const Gp=class{static resolveURL(e,t){var n;let r=(n=Gp.filesMap[e])?.[t];if(r===void 0)throw Error(`Cannot find this file from uploaded files: `+t);return r}static upload(e,t){return Bu(this,null,function*(){let n={};for(let r of t.getDefinedFiles()){let i=decodeURI(xo.resolve(t.url,r)),a=e.find(e=>e.webkitRelativePath===i);a&&(n[r]=URL.createObjectURL(a))}Gp.filesMap[t._objectURL]=n})}static createSettings(e){return Bu(this,null,function*(){let t=e.find(e=>e.name.endsWith(`model.json`)||e.name.endsWith(`model3.json`));if(!t)throw TypeError(`Settings file not found`);let n=yield Gp.readText(t),r=JSON.parse(n);r.url=t.webkitRelativePath;let i=Ip.findRuntime(r);if(!i)throw Error(`Unknown settings JSON`);let a=i.createModelSettings(r);return a._objectURL=URL.createObjectURL(t),a})}static readText(e){return Bu(this,null,function*(){return new Promise((t,n)=>{let r=new FileReader;r.onload=()=>t(r.result),r.onerror=n,r.readAsText(e,`utf8`)})})}};let Kp=Gp;Kp.filesMap={},Kp.factory=(e,t)=>Bu(void 0,null,function*(){if(Array.isArray(e.source)&&e.source[0]instanceof File){let t=e.source,n=t.settings;if(!n)n=yield Gp.createSettings(t);else if(!n._objectURL)throw Error(`"_objectURL" must be specified in ModelSettings`);n.validateFiles(t.map(e=>encodeURI(e.webkitRelativePath))),yield Gp.upload(t,n),n.resolveURL=function(e){return Gp.resolveURL(this._objectURL,e)},e.source=n,e.live2dModel.once(`modelLoaded`,e=>{e.once(`destroy`,function(){let e=this.settings._objectURL;if(URL.revokeObjectURL(e),Gp.filesMap[e])for(let t of Object.values(Gp.filesMap[e]))URL.revokeObjectURL(t);delete Gp.filesMap[e]})})}return t()}),Ip.live2DModelMiddlewares.unshift(Kp.factory);const qp=class{static unzip(e,t){return Bu(this,null,function*(){let n=yield qp.getFilePaths(e),r=[];for(let e of t.getDefinedFiles()){let i=decodeURI(xo.resolve(t.url,e));n.includes(i)&&r.push(i)}let i=yield qp.getFiles(e,r);for(let e=0;ee.endsWith(`model.json`)||e.endsWith(`model3.json`));if(!n)throw Error(`Settings file not found`);let r=yield qp.readText(e,n);if(!r)throw Error(`Empty settings file: `+n);let i=JSON.parse(r);i.url=n;let a=Ip.findRuntime(i);if(!a)throw Error(`Unknown settings JSON`);return a.createModelSettings(i)})}static zipReader(e,t){return Bu(this,null,function*(){throw Error(`Not implemented`)})}static getFilePaths(e){return Bu(this,null,function*(){throw Error(`Not implemented`)})}static getFiles(e,t){return Bu(this,null,function*(){throw Error(`Not implemented`)})}static readText(e,t){return Bu(this,null,function*(){throw Error(`Not implemented`)})}static releaseReader(e){}};let Jp=qp;if(Jp.ZIP_PROTOCOL=`zip://`,Jp.uid=0,Jp.factory=(e,t)=>Bu(void 0,null,function*(){let n=e.source,r,i,a;if(typeof n==`string`&&(n.endsWith(`.zip`)||n.startsWith(qp.ZIP_PROTOCOL))?(r=n.startsWith(qp.ZIP_PROTOCOL)?n.slice(qp.ZIP_PROTOCOL.length):n,i=yield Ep.load({url:r,type:`blob`,target:e.live2dModel})):Array.isArray(n)&&n.length===1&&n[0]instanceof File&&n[0].name.endsWith(`.zip`)&&(i=n[0],r=URL.createObjectURL(i),a=n.settings),i){if(!i.size)throw Error(`Empty zip file`);let t=yield qp.zipReader(i,r);a||=yield qp.createSettings(t),a._objectURL=qp.ZIP_PROTOCOL+qp.uid+`/`+a.url;let n=yield qp.unzip(t,a);n.settings=a,e.source=n,r.startsWith(`blob:`)&&e.live2dModel.once(`modelLoaded`,e=>{e.once(`destroy`,function(){URL.revokeObjectURL(r)})}),qp.releaseReader(t)}return t()}),Ip.live2DModelMiddlewares.unshift(Jp.factory),!window.Live2DCubismCore)throw Error(`Could not find Cubism 4 runtime. This plugin requires live2dcubismcore.js to be loaded.`);var Yp=class extends sp{constructor(e,t){var n;super(e,t),this.queueManager=new Kd,this.definitions=(n=e.expressions)??[],this.init()}isFinished(){return this.queueManager.isFinished()}getExpressionIndex(e){return this.definitions.findIndex(t=>t.Name===e)}getExpressionFile(e){return e.File}createExpression(e,t){return yd.create(e)}_setExpression(e){return this.queueManager.startMotion(e,!1,performance.now())}stopAllExpressions(){this.queueManager.stopAllMotions()}updateParameters(e,t){return this.queueManager.doUpdateMotion(e,t)}},Xp=class e extends fp{constructor(t){if(super(t),!e.isValidJSON(t))throw TypeError(`Invalid JSON.`);Object.assign(this,new Gf(t))}static isValidJSON(e){var t;return!!e?.FileReferences&&typeof e.FileReferences.Moc==`string`&&(t=e.FileReferences.Textures)?.length>0&&e.FileReferences.Textures.every(e=>typeof e==`string`)}replaceFiles(e){if(super.replaceFiles(e),this.motions)for(let[t,n]of Object.entries(this.motions))for(let r=0;r{this.emit(`motion:`+t)})}isFinished(){return this.queueManager.isFinished()}_startMotion(e,t){return e.setFinishedMotionHandler(t),this.queueManager.stopAllMotions(),this.queueManager.startMotion(e,!1,performance.now())}_stopAllMotions(){this.queueManager.stopAllMotions()}createMotion(e,t,n){let r=Wd.create(e),i=new kd(e),a=(t===this.groups.idle?tp.idleMotionFadingDuration:tp.motionFadingDuration)/1e3;return i.getMotionFadeInTime()===void 0&&r.setFadeInTime(n.FadeInTime>0?n.FadeInTime:a),i.getMotionFadeOutTime()===void 0&&r.setFadeOutTime(n.FadeOutTime>0?n.FadeOutTime:a),r.setEffectIds(this.eyeBlinkIds,this.lipSyncIds),r}getMotionFile(e){return e.File}getMotionName(e){return e.File}getSoundFile(e){return e.Sound}updateParameters(e,t){return this.queueManager.doUpdateMotion(e,t)}destroy(){super.destroy(),this.queueManager.release(),this.queueManager=void 0}};const Qp=new $u;var $p=class extends bp{constructor(e,t,n){super(),this.lipSync=!0,this.breath=Vu.create(),this.renderer=new Wf,this.idParamAngleX=Kf,this.idParamAngleY=qf,this.idParamAngleZ=Jf,this.idParamEyeBallX=Yf,this.idParamEyeBallY=Xf,this.idParamBodyAngleX=Zf,this.idParamBreath=Qf,this.pixelsPerUnit=1,this.centeringTransform=new vs,this.coreModel=e,this.settings=t,this.motionManager=new Zp(t,n),this.init()}init(){var e;super.init(),(e=this.settings.getEyeBlinkParameters())?.length>0&&(this.eyeBlink=Wu.create(this.settings)),this.breath.setParameters([new Hu(this.idParamAngleX,0,15,6.5345,.5),new Hu(this.idParamAngleY,0,8,3.5345,.5),new Hu(this.idParamAngleZ,0,10,5.5345,.5),new Hu(this.idParamBodyAngleX,0,4,15.5345,.5),new Hu(this.idParamBreath,0,.5,3.2345,.5)]),this.renderer.initialize(this.coreModel),this.renderer.setIsPremultipliedAlpha(!0)}getSize(){return[this.coreModel.getModel().canvasinfo.CanvasWidth,this.coreModel.getModel().canvasinfo.CanvasHeight]}getLayout(){let e={};if(this.settings.layout)for(let t of Object.keys(this.settings.layout)){let n=t.charAt(0).toLowerCase()+t.slice(1);e[n]=this.settings.layout[t]}return e}setupLayout(){super.setupLayout(),this.pixelsPerUnit=this.coreModel.getModel().canvasinfo.PixelsPerUnit,this.centeringTransform.scale(this.pixelsPerUnit,this.pixelsPerUnit).translate(this.originalWidth/2,this.originalHeight/2)}updateWebGLContext(e,t){this.renderer.firstDraw=!0,this.renderer._bufferData={vertex:null,uv:null,index:null},this.renderer.startUp(e),this.renderer._clippingManager._currentFrameNo=t,this.renderer._clippingManager._maskTexture=void 0,Ff.getInstance()._shaderSets=[]}bindTexture(e,t){this.renderer.bindTexture(e,t)}getHitAreaDefs(){var e,t;return(t=(e=this.settings.hitAreas)?.map(e=>({id:e.Id,name:e.Name,index:this.coreModel.getDrawableIndex(e.Id)})))??[]}getDrawableIDs(){return this.coreModel.getDrawableIds()}getDrawableIndex(e){return this.coreModel.getDrawableIndex(e)}getDrawableVertices(e){if(typeof e==`string`&&(e=this.coreModel.getDrawableIndex(e),e===-1))throw TypeError(`Unable to find drawable ID: `+e);let t=this.coreModel.getDrawableVertices(e).slice();for(let e=0;e{function n(){try{rm(),e()}catch(e){if(tm--,tm<0){let n=Error(`Failed to start up Cubism 4 framework.`);n.cause=e,t(n);return}np.log(`Cubism4`,`Startup failed, retrying 10ms later...`),setTimeout(n,10)}}n()}),em)}function rm(e){e=Object.assign({logFunction:console.log,loggingLevel:cd.LogLevel_Verbose},e),sd.startUp(e),sd.initialize()}Ip.registerRuntime({version:4,ready:nm,test(e){return e instanceof Xp||Xp.isValidJSON(e)},isValidMoc(e){if(e.byteLength<4)return!1;let t=new Int8Array(e,0,4);return String.fromCharCode(...t)===`MOC3`},createModelSettings(e){return new Xp(e)},createCoreModel(e){let t=gd.create(e);try{let e=t.createModel();return e.__moc=t,e}catch(e){try{t.release()}catch{}throw e}},createInternalModel(e,t,n){let r=new $p(e,t,n),i=e;return i.__moc&&(r.__moc=i.__moc,delete i.__moc,r.once(`destroy`,im)),r},createPhysics(e,t){return uf.create(t)},createPose(e,t){return Ju.create(t)}});function im(){var e;(e=this.__moc)==null||e.release()}var am=H({__name:`Canvas`,props:{width:null,height:null,resolution:{default:2}},setup(e,{expose:t}){let n=e,r=W(),i=W(),a=W();async function o(e){Wp.registerTicker(ns),Qo.add(rs),i.value=new Ru({width:n.width*n.resolution,height:n.height*n.resolution,backgroundAlpha:0,preserveDrawingBuffer:!0}),a.value=i.value.view,a.value.style.width=`100%`,a.value.style.height=`100%`,a.value.style.objectFit=`cover`,a.value.style.display=`block`,e.appendChild(i.value.view)}function s(){i.value&&i.value.renderer.resize(n.width,n.height)}K([()=>n.width,()=>n.height],()=>s()),K(()=>n.resolution,e=>{i.value&&e&&(i.value.renderer.resolution=e,s())}),Yt(async()=>r.value&&await o(r.value)),Zt(()=>{var e;return(e=i.value)?.destroy()});async function c(){let e=new Promise(e=>{if(!a.value||!i.value)return e(null);i.value.render(),a.value.toBlob(e)});return e}function l(){return a.value}return t({captureFrame:c,canvasElement:l}),(e,t)=>(U(),V(`div`,{ref_key:`containerRef`,ref:r,"h-full":``,"w-full":``},[nn(e.$slots,`default`,{app:i.value})],512))}}),om=am,sm=bt((exports,t)=>{ /*! localForage -- Offline Storage, Improved Version 1.10.0 https://localforage.github.io/localForage (c) 2013-2017 Mozilla, Apache License 2.0 */ -(function(n){if(typeof exports==`object`&&t!==void 0)t.exports=n();else if(typeof define==`function`&&define.amd)define([],n);else{var r;r=typeof window<`u`?window:typeof global<`u`?global:typeof self<`u`?self:this,r.localforage=n()}})(function(){var e,t,n;return function e(t,n,r){function i(o,s){if(!n[o]){if(!t[o]){var c=typeof Ct==`function`&&Ct;if(!s&&c)return c(o,!0);if(a)return a(o,!0);var l=Error(`Cannot find module '`+o+`'`);throw l.code=`MODULE_NOT_FOUND`,l}var u=n[o]={exports:{}};t[o][0].call(u.exports,function(e){var n=t[o][1][e];return i(n||e)},u,u.exports,e,t,n,r)}return n[o].exports}for(var a=typeof Ct==`function`&&Ct,o=0;o`u`&&e(3);var l=Promise;function u(e,t){t&&e.then(function(e){t(null,e)},function(e){t(e)})}function d(e,t,n){typeof t==`function`&&e.then(t),typeof n==`function`&&e.catch(n)}function f(e){return typeof e!=`string`&&(console.warn(e+` used as a key, but it is not a string.`),e=String(e)),e}function p(){if(arguments.length&&typeof arguments[arguments.length-1]==`function`)return arguments[arguments.length-1]}var m=`local-forage-detect-blob-support`,h=void 0,g={},_=Object.prototype.toString,v=`readonly`,y=`readwrite`;function b(e){for(var t=e.length,n=new ArrayBuffer(t),r=new Uint8Array(n),i=0;i=43)}}).catch(function(){return!1})}function S(e){return typeof h==`boolean`?l.resolve(h):x(e).then(function(e){return h=e,h})}function C(e){var t=g[e.name],n={};n.promise=new l(function(e,t){n.resolve=e,n.reject=t}),t.deferredOperations.push(n),t.dbReady?t.dbReady=t.dbReady.then(function(){return n.promise}):t.dbReady=n.promise}function w(e){var t=g[e.name],n=t.deferredOperations.pop();if(n)return n.resolve(),n.promise}function T(e,t){var n=g[e.name],r=n.deferredOperations.pop();if(r)return r.reject(t),r.promise}function E(e,t){return new l(function(n,r){if(g[e.name]=g[e.name]||F(),e.db)if(t)C(e),e.db.close();else return n(e.db);var i=[e.name];t&&i.push(e.version);var a=o.open.apply(o,i);t&&(a.onupgradeneeded=function(t){var n=a.result;try{n.createObjectStore(e.storeName),t.oldVersion<=1&&n.createObjectStore(m)}catch(n){if(n.name===`ConstraintError`)console.warn(`The database "`+e.name+`" has been upgraded from version `+t.oldVersion+` to version `+t.newVersion+`, but the storage "`+e.storeName+`" already exists.`);else throw n}}),a.onerror=function(e){e.preventDefault(),r(a.error)},a.onsuccess=function(){var t=a.result;t.onversionchange=function(e){e.target.close()},n(t),w(e)}})}function D(e){return E(e,!1)}function O(e){return E(e,!0)}function k(e,t){if(!e.db)return!0;var n=!e.db.objectStoreNames.contains(e.storeName),r=e.versione.db.version;if(r&&(e.version!==t&&console.warn(`The database "`+e.name+`" can't be downgraded from version `+e.db.version+` to version `+e.version+`.`),e.version=e.db.version),i||n){if(n){var a=e.db.version+1;a>e.version&&(e.version=a)}return!0}return!1}function A(e){return new l(function(t,n){var r=new FileReader;r.onerror=n,r.onloadend=function(n){var r=btoa(n.target.result||``);t({__local_forage_encoded_blob:!0,data:r,type:e.type})},r.readAsBinaryString(e)})}function j(e){var t=b(atob(e.data));return c([t],{type:e.type})}function M(e){return e&&e.__local_forage_encoded_blob}function N(e){var t=this,n=t._initReady().then(function(){var e=g[t._dbInfo.name];if(e&&e.dbReady)return e.dbReady});return d(n,e,e),n}function ee(e){C(e);for(var t=g[e.name],n=t.forages,r=0;r0&&(!e.db||i.name===`InvalidStateError`||i.name===`NotFoundError`))return l.resolve().then(function(){if(!e.db||i.name===`NotFoundError`&&!e.db.objectStoreNames.contains(e.storeName)&&e.version<=e.db.version)return e.db&&(e.version=e.db.version+1),O(e)}).then(function(){return ee(e).then(function(){P(e,t,n,r-1)})}).catch(n);n(i)}}function F(){return{forages:[],db:null,dbReady:null,deferredOperations:[]}}function I(e){var t=this,n={db:null};if(e)for(var r in e)n[r]=e[r];var i=g[n.name];i||(i=F(),g[n.name]=i),i.forages.push(t),t._initReady||(t._initReady=t.ready,t.ready=N);var a=[];function o(){return l.resolve()}for(var s=0;s>4,u[i++]=(o&15)<<4|s>>2,u[i++]=(s&3)<<6|c&63;return l}function ke(e){var t=new Uint8Array(e),n=``,r;for(r=0;r>2],n+=ue[(t[r]&3)<<4|t[r+1]>>4],n+=ue[(t[r+1]&15)<<2|t[r+2]>>6],n+=ue[t[r+2]&63];return t.length%3==2?n=n.substring(0,n.length-1)+`=`:t.length%3==1&&(n=n.substring(0,n.length-2)+`==`),n}function Ae(e,t){var n=``;if(e&&(n=De.call(e)),e&&(n===`[object ArrayBuffer]`||e.buffer&&De.call(e.buffer)===`[object ArrayBuffer]`)){var r,i=pe;e instanceof ArrayBuffer?(r=e,i+=he):(r=e.buffer,n===`[object Int8Array]`?i+=_e:n===`[object Uint8Array]`?i+=ve:n===`[object Uint8ClampedArray]`?i+=ye:n===`[object Int16Array]`?i+=be:n===`[object Uint16Array]`?i+=Se:n===`[object Int32Array]`?i+=xe:n===`[object Uint32Array]`?i+=Ce:n===`[object Float32Array]`?i+=we:n===`[object Float64Array]`?i+=Te:t(Error(`Failed to get type for BinaryArray`))),t(i+ke(r))}else if(n===`[object Blob]`){var a=new FileReader;a.onload=function(){var n=de+e.type+`~`+ke(this.result);t(pe+ge+n)},a.readAsArrayBuffer(e)}else try{t(JSON.stringify(e))}catch(n){console.error(`Couldn't convert value into a JSON string: `,e),t(null,n)}}function je(e){if(e.substring(0,me)!==pe)return JSON.parse(e);var t=e.substring(Ee),n=e.substring(me,Ee),r;if(n===ge&&fe.test(t)){var i=t.match(fe);r=i[1],t=t.substring(i[0].length)}var a=Oe(t);switch(n){case he:return a;case ge:return c([a],{type:r});case _e:return new Int8Array(a);case ve:return new Uint8Array(a);case ye:return new Uint8ClampedArray(a);case be:return new Int16Array(a);case Se:return new Uint16Array(a);case xe:return new Int32Array(a);case Ce:return new Uint32Array(a);case we:return new Float32Array(a);case Te:return new Float64Array(a);default:throw Error(`Unkown type: `+n)}}var Me={serialize:Ae,deserialize:je,stringToBuffer:Oe,bufferToString:ke};function Ne(e,t,n,r){e.executeSql(`CREATE TABLE IF NOT EXISTS `+t.storeName+` (id INTEGER PRIMARY KEY, key unique, value)`,[],n,r)}function Pe(e){var t=this,n={db:null};if(e)for(var r in e)n[r]=typeof e[r]==`string`?e[r]:e[r].toString();var i=new l(function(e,r){try{n.db=openDatabase(n.name,String(n.version),n.description,n.size)}catch(e){return r(e)}n.db.transaction(function(i){Ne(i,n,function(){t._dbInfo=n,e()},function(e,t){r(t)})},r)});return n.serializer=Me,i}function Fe(e,t,n,r,i,a){e.executeSql(n,r,i,function(e,o){o.code===o.SYNTAX_ERR?e.executeSql(`SELECT name FROM sqlite_master WHERE type='table' AND name = ?`,[t.storeName],function(e,s){s.rows.length?a(e,o):Ne(e,t,function(){e.executeSql(n,r,i,a)},a)},a):a(e,o)},a)}function Ie(e,t){var n=this;e=f(e);var r=new l(function(t,r){n.ready().then(function(){var i=n._dbInfo;i.db.transaction(function(n){Fe(n,i,`SELECT * FROM `+i.storeName+` WHERE key = ? LIMIT 1`,[e],function(e,n){var r=n.rows.length?n.rows.item(0).value:null;r&&=i.serializer.deserialize(r),t(r)},function(e,t){r(t)})})}).catch(r)});return u(r,t),r}function Le(e,t){var n=this,r=new l(function(t,r){n.ready().then(function(){var i=n._dbInfo;i.db.transaction(function(n){Fe(n,i,`SELECT * FROM `+i.storeName,[],function(n,r){for(var a=r.rows,o=a.length,s=0;s0){a(Re.apply(i,[e,s,n,r-1]));return}o(t)}})})}).catch(o)});return u(a,n),a}function ze(e,t,n){return Re.apply(this,[e,t,n,1])}function Be(e,t){var n=this;e=f(e);var r=new l(function(t,r){n.ready().then(function(){var i=n._dbInfo;i.db.transaction(function(n){Fe(n,i,`DELETE FROM `+i.storeName+` WHERE key = ?`,[e],function(){t()},function(e,t){r(t)})})}).catch(r)});return u(r,t),r}function Ve(e){var t=this,n=new l(function(e,n){t.ready().then(function(){var r=t._dbInfo;r.db.transaction(function(t){Fe(t,r,`DELETE FROM `+r.storeName,[],function(){e()},function(e,t){n(t)})})}).catch(n)});return u(n,e),n}function He(e){var t=this,n=new l(function(e,n){t.ready().then(function(){var r=t._dbInfo;r.db.transaction(function(t){Fe(t,r,`SELECT COUNT(key) as c FROM `+r.storeName,[],function(t,n){var r=n.rows.item(0).c;e(r)},function(e,t){n(t)})})}).catch(n)});return u(n,e),n}function Ue(e,t){var n=this,r=new l(function(t,r){n.ready().then(function(){var i=n._dbInfo;i.db.transaction(function(n){Fe(n,i,`SELECT key FROM `+i.storeName+` WHERE id = ? LIMIT 1`,[e+1],function(e,n){var r=n.rows.length?n.rows.item(0).key:null;t(r)},function(e,t){r(t)})})}).catch(r)});return u(r,t),r}function We(e){var t=this,n=new l(function(e,n){t.ready().then(function(){var r=t._dbInfo;r.db.transaction(function(t){Fe(t,r,`SELECT key FROM `+r.storeName,[],function(t,n){for(var r=[],i=0;i '__WebKitDatabaseInfoTable__'`,[],function(n,r){for(var i=[],a=0;a0}function Qe(e){var t=this,n={};if(e)for(var r in e)n[r]=e[r];return n.keyPrefix=Ye(e,t._defaultConfig),Ze()?(t._dbInfo=n,n.serializer=Me,l.resolve()):l.reject()}function $e(e){var t=this,n=t.ready().then(function(){for(var e=t._dbInfo.keyPrefix,n=localStorage.length-1;n>=0;n--){var r=localStorage.key(n);r.indexOf(e)===0&&localStorage.removeItem(r)}});return u(n,e),n}function et(e,t){var n=this;e=f(e);var r=n.ready().then(function(){var t=n._dbInfo,r=localStorage.getItem(t.keyPrefix+e);return r&&=t.serializer.deserialize(r),r});return u(r,t),r}function tt(e,t){var n=this,r=n.ready().then(function(){for(var t=n._dbInfo,r=t.keyPrefix,i=r.length,a=localStorage.length,o=1,s=0;s=0;t--){var n=localStorage.key(t);n.indexOf(e)===0&&localStorage.removeItem(n)}}):l.reject(`Invalid arguments`),u(i,t),i}var ct={_driver:`localStorageWrapper`,_initStorage:Qe,_support:Je(),iterate:tt,getItem:et,setItem:ot,removeItem:at,clear:$e,length:it,key:nt,keys:rt,dropInstance:st},lt=function(e,t){return e===t||typeof e==`number`&&typeof t==`number`&&isNaN(e)&&isNaN(t)},ut=function(e,t){for(var n=e.length,r=0;r`u`&&e(3);var l=Promise;function u(e,t){t&&e.then(function(e){t(null,e)},function(e){t(e)})}function d(e,t,n){typeof t==`function`&&e.then(t),typeof n==`function`&&e.catch(n)}function f(e){return typeof e!=`string`&&(console.warn(e+` used as a key, but it is not a string.`),e=String(e)),e}function p(){if(arguments.length&&typeof arguments[arguments.length-1]==`function`)return arguments[arguments.length-1]}var m=`local-forage-detect-blob-support`,h=void 0,g={},_=Object.prototype.toString,v=`readonly`,y=`readwrite`;function b(e){for(var t=e.length,n=new ArrayBuffer(t),r=new Uint8Array(n),i=0;i=43)}}).catch(function(){return!1})}function S(e){return typeof h==`boolean`?l.resolve(h):x(e).then(function(e){return h=e,h})}function C(e){var t=g[e.name],n={};n.promise=new l(function(e,t){n.resolve=e,n.reject=t}),t.deferredOperations.push(n),t.dbReady?t.dbReady=t.dbReady.then(function(){return n.promise}):t.dbReady=n.promise}function w(e){var t=g[e.name],n=t.deferredOperations.pop();if(n)return n.resolve(),n.promise}function T(e,t){var n=g[e.name],r=n.deferredOperations.pop();if(r)return r.reject(t),r.promise}function E(e,t){return new l(function(n,r){if(g[e.name]=g[e.name]||F(),e.db)if(t)C(e),e.db.close();else return n(e.db);var i=[e.name];t&&i.push(e.version);var a=o.open.apply(o,i);t&&(a.onupgradeneeded=function(t){var n=a.result;try{n.createObjectStore(e.storeName),t.oldVersion<=1&&n.createObjectStore(m)}catch(n){if(n.name===`ConstraintError`)console.warn(`The database "`+e.name+`" has been upgraded from version `+t.oldVersion+` to version `+t.newVersion+`, but the storage "`+e.storeName+`" already exists.`);else throw n}}),a.onerror=function(e){e.preventDefault(),r(a.error)},a.onsuccess=function(){var t=a.result;t.onversionchange=function(e){e.target.close()},n(t),w(e)}})}function D(e){return E(e,!1)}function O(e){return E(e,!0)}function k(e,t){if(!e.db)return!0;var n=!e.db.objectStoreNames.contains(e.storeName),r=e.versione.db.version;if(r&&(e.version!==t&&console.warn(`The database "`+e.name+`" can't be downgraded from version `+e.db.version+` to version `+e.version+`.`),e.version=e.db.version),i||n){if(n){var a=e.db.version+1;a>e.version&&(e.version=a)}return!0}return!1}function A(e){return new l(function(t,n){var r=new FileReader;r.onerror=n,r.onloadend=function(n){var r=btoa(n.target.result||``);t({__local_forage_encoded_blob:!0,data:r,type:e.type})},r.readAsBinaryString(e)})}function j(e){var t=b(atob(e.data));return c([t],{type:e.type})}function M(e){return e&&e.__local_forage_encoded_blob}function N(e){var t=this,n=t._initReady().then(function(){var e=g[t._dbInfo.name];if(e&&e.dbReady)return e.dbReady});return d(n,e,e),n}function ee(e){C(e);for(var t=g[e.name],n=t.forages,r=0;r0&&(!e.db||i.name===`InvalidStateError`||i.name===`NotFoundError`))return l.resolve().then(function(){if(!e.db||i.name===`NotFoundError`&&!e.db.objectStoreNames.contains(e.storeName)&&e.version<=e.db.version)return e.db&&(e.version=e.db.version+1),O(e)}).then(function(){return ee(e).then(function(){P(e,t,n,r-1)})}).catch(n);n(i)}}function F(){return{forages:[],db:null,dbReady:null,deferredOperations:[]}}function I(e){var t=this,n={db:null};if(e)for(var r in e)n[r]=e[r];var i=g[n.name];i||(i=F(),g[n.name]=i),i.forages.push(t),t._initReady||(t._initReady=t.ready,t.ready=N);var a=[];function o(){return l.resolve()}for(var s=0;s>4,u[i++]=(o&15)<<4|s>>2,u[i++]=(s&3)<<6|c&63;return l}function ke(e){var t=new Uint8Array(e),n=``,r;for(r=0;r>2],n+=ue[(t[r]&3)<<4|t[r+1]>>4],n+=ue[(t[r+1]&15)<<2|t[r+2]>>6],n+=ue[t[r+2]&63];return t.length%3==2?n=n.substring(0,n.length-1)+`=`:t.length%3==1&&(n=n.substring(0,n.length-2)+`==`),n}function Ae(e,t){var n=``;if(e&&(n=De.call(e)),e&&(n===`[object ArrayBuffer]`||e.buffer&&De.call(e.buffer)===`[object ArrayBuffer]`)){var r,i=pe;e instanceof ArrayBuffer?(r=e,i+=he):(r=e.buffer,n===`[object Int8Array]`?i+=_e:n===`[object Uint8Array]`?i+=ve:n===`[object Uint8ClampedArray]`?i+=ye:n===`[object Int16Array]`?i+=be:n===`[object Uint16Array]`?i+=Se:n===`[object Int32Array]`?i+=xe:n===`[object Uint32Array]`?i+=Ce:n===`[object Float32Array]`?i+=we:n===`[object Float64Array]`?i+=Te:t(Error(`Failed to get type for BinaryArray`))),t(i+ke(r))}else if(n===`[object Blob]`){var a=new FileReader;a.onload=function(){var n=de+e.type+`~`+ke(this.result);t(pe+ge+n)},a.readAsArrayBuffer(e)}else try{t(JSON.stringify(e))}catch(n){console.error(`Couldn't convert value into a JSON string: `,e),t(null,n)}}function je(e){if(e.substring(0,me)!==pe)return JSON.parse(e);var t=e.substring(Ee),n=e.substring(me,Ee),r;if(n===ge&&fe.test(t)){var i=t.match(fe);r=i[1],t=t.substring(i[0].length)}var a=Oe(t);switch(n){case he:return a;case ge:return c([a],{type:r});case _e:return new Int8Array(a);case ve:return new Uint8Array(a);case ye:return new Uint8ClampedArray(a);case be:return new Int16Array(a);case Se:return new Uint16Array(a);case xe:return new Int32Array(a);case Ce:return new Uint32Array(a);case we:return new Float32Array(a);case Te:return new Float64Array(a);default:throw Error(`Unkown type: `+n)}}var Me={serialize:Ae,deserialize:je,stringToBuffer:Oe,bufferToString:ke};function Ne(e,t,n,r){e.executeSql(`CREATE TABLE IF NOT EXISTS `+t.storeName+` (id INTEGER PRIMARY KEY, key unique, value)`,[],n,r)}function Pe(e){var t=this,n={db:null};if(e)for(var r in e)n[r]=typeof e[r]==`string`?e[r]:e[r].toString();var i=new l(function(e,r){try{n.db=openDatabase(n.name,String(n.version),n.description,n.size)}catch(e){return r(e)}n.db.transaction(function(i){Ne(i,n,function(){t._dbInfo=n,e()},function(e,t){r(t)})},r)});return n.serializer=Me,i}function Fe(e,t,n,r,i,a){e.executeSql(n,r,i,function(e,o){o.code===o.SYNTAX_ERR?e.executeSql(`SELECT name FROM sqlite_master WHERE type='table' AND name = ?`,[t.storeName],function(e,s){s.rows.length?a(e,o):Ne(e,t,function(){e.executeSql(n,r,i,a)},a)},a):a(e,o)},a)}function Ie(e,t){var n=this;e=f(e);var r=new l(function(t,r){n.ready().then(function(){var i=n._dbInfo;i.db.transaction(function(n){Fe(n,i,`SELECT * FROM `+i.storeName+` WHERE key = ? LIMIT 1`,[e],function(e,n){var r=n.rows.length?n.rows.item(0).value:null;r&&=i.serializer.deserialize(r),t(r)},function(e,t){r(t)})})}).catch(r)});return u(r,t),r}function Le(e,t){var n=this,r=new l(function(t,r){n.ready().then(function(){var i=n._dbInfo;i.db.transaction(function(n){Fe(n,i,`SELECT * FROM `+i.storeName,[],function(n,r){for(var a=r.rows,o=a.length,s=0;s0){a(Re.apply(i,[e,s,n,r-1]));return}o(t)}})})}).catch(o)});return u(a,n),a}function ze(e,t,n){return Re.apply(this,[e,t,n,1])}function Be(e,t){var n=this;e=f(e);var r=new l(function(t,r){n.ready().then(function(){var i=n._dbInfo;i.db.transaction(function(n){Fe(n,i,`DELETE FROM `+i.storeName+` WHERE key = ?`,[e],function(){t()},function(e,t){r(t)})})}).catch(r)});return u(r,t),r}function Ve(e){var t=this,n=new l(function(e,n){t.ready().then(function(){var r=t._dbInfo;r.db.transaction(function(t){Fe(t,r,`DELETE FROM `+r.storeName,[],function(){e()},function(e,t){n(t)})})}).catch(n)});return u(n,e),n}function He(e){var t=this,n=new l(function(e,n){t.ready().then(function(){var r=t._dbInfo;r.db.transaction(function(t){Fe(t,r,`SELECT COUNT(key) as c FROM `+r.storeName,[],function(t,n){var r=n.rows.item(0).c;e(r)},function(e,t){n(t)})})}).catch(n)});return u(n,e),n}function Ue(e,t){var n=this,r=new l(function(t,r){n.ready().then(function(){var i=n._dbInfo;i.db.transaction(function(n){Fe(n,i,`SELECT key FROM `+i.storeName+` WHERE id = ? LIMIT 1`,[e+1],function(e,n){var r=n.rows.length?n.rows.item(0).key:null;t(r)},function(e,t){r(t)})})}).catch(r)});return u(r,t),r}function We(e){var t=this,n=new l(function(e,n){t.ready().then(function(){var r=t._dbInfo;r.db.transaction(function(t){Fe(t,r,`SELECT key FROM `+r.storeName,[],function(t,n){for(var r=[],i=0;i '__WebKitDatabaseInfoTable__'`,[],function(n,r){for(var i=[],a=0;a0}function Qe(e){var t=this,n={};if(e)for(var r in e)n[r]=e[r];return n.keyPrefix=Ye(e,t._defaultConfig),Ze()?(t._dbInfo=n,n.serializer=Me,l.resolve()):l.reject()}function $e(e){var t=this,n=t.ready().then(function(){for(var e=t._dbInfo.keyPrefix,n=localStorage.length-1;n>=0;n--){var r=localStorage.key(n);r.indexOf(e)===0&&localStorage.removeItem(r)}});return u(n,e),n}function et(e,t){var n=this;e=f(e);var r=n.ready().then(function(){var t=n._dbInfo,r=localStorage.getItem(t.keyPrefix+e);return r&&=t.serializer.deserialize(r),r});return u(r,t),r}function tt(e,t){var n=this,r=n.ready().then(function(){for(var t=n._dbInfo,r=t.keyPrefix,i=r.length,a=localStorage.length,o=1,s=0;s=0;t--){var n=localStorage.key(t);n.indexOf(e)===0&&localStorage.removeItem(n)}}):l.reject(`Invalid arguments`),u(i,t),i}var ct={_driver:`localStorageWrapper`,_initStorage:Qe,_support:Je(),iterate:tt,getItem:et,setItem:ot,removeItem:at,clear:$e,length:it,key:nt,keys:rt,dropInstance:st},lt=function(e,t){return e===t||typeof e==`number`&&typeof t==`number`&&isNaN(e)&&isNaN(t)},ut=function(e,t){for(var n=e.length,r=0;r=0;f--){var p=d[f],m=this.recursiveFindHit(e,p,n,r,c);if(m){if(!p.parent)continue;c=!1,m&&(e.target&&(r=!1),s=!0)}}return i&&(r&&!e.target&&!t.hitArea&&t.containsPoint&&t.containsPoint(o)&&(s=!0),t.interactive&&(s&&!e.target&&(e.target=t),n&&n(e,t,!!s))),s},e.prototype.findHit=function(e,t,n,r){this.recursiveFindHit(e,t,n,r,!1)},e}(),mm={interactive:!1,interactiveChildren:!0,hitArea:null,get buttonMode(){return this.cursor===`pointer`},set buttonMode(e){e?this.cursor=`pointer`:this.cursor===`pointer`&&(this.cursor=null)},cursor:null,get trackedPointers(){return this._trackedPointers===void 0&&(this._trackedPointers={}),this._trackedPointers},_trackedPointers:void 0};Nu.mixin(mm);var hm=1,gm={target:null,data:{global:null}},_m=function(e){um(t,e);function t(t,n){var r=e.call(this)||this;return n||={},r.renderer=t,r.autoPreventDefault=n.autoPreventDefault===void 0?!0:n.autoPreventDefault,r.interactionFrequency=n.interactionFrequency||10,r.mouse=new cm,r.mouse.identifier=hm,r.mouse.global.set(-999999),r.activeInteractionData={},r.activeInteractionData[hm]=r.mouse,r.interactionDataPool=[],r.eventData=new dm,r.interactionDOMElement=null,r.moveWhenInside=!1,r.eventsAdded=!1,r.tickerAdded=!1,r.mouseOverRenderer=!(`PointerEvent`in globalThis),r.supportsTouchEvents=`ontouchstart`in globalThis,r.supportsPointerEvents=!!globalThis.PointerEvent,r.onPointerUp=r.onPointerUp.bind(r),r.processPointerUp=r.processPointerUp.bind(r),r.onPointerCancel=r.onPointerCancel.bind(r),r.processPointerCancel=r.processPointerCancel.bind(r),r.onPointerDown=r.onPointerDown.bind(r),r.processPointerDown=r.processPointerDown.bind(r),r.onPointerMove=r.onPointerMove.bind(r),r.processPointerMove=r.processPointerMove.bind(r),r.onPointerOut=r.onPointerOut.bind(r),r.processPointerOverOut=r.processPointerOverOut.bind(r),r.onPointerOver=r.onPointerOver.bind(r),r.cursorStyles={default:`inherit`,pointer:`pointer`},r.currentCursorMode=null,r.cursor=null,r.resolution=1,r.delayedEvents=[],r.search=new pm,r._tempDisplayObject=new Pu,r._eventListenerOptions={capture:!0,passive:!1},r._useSystemTicker=n.useSystemTicker===void 0?!0:n.useSystemTicker,r.setTargetElement(r.renderer.view,r.renderer.resolution),r}return Object.defineProperty(t.prototype,`useSystemTicker`,{get:function(){return this._useSystemTicker},set:function(e){this._useSystemTicker=e,e?this.addTickerListener():this.removeTickerListener()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`lastObjectRendered`,{get:function(){return this.renderer._lastObjectRendered||this._tempDisplayObject},enumerable:!1,configurable:!0}),t.prototype.hitTest=function(e,t){return gm.target=null,gm.data.global=e,t||=this.lastObjectRendered,this.processInteractive(gm,t,null,!0),gm.target},t.prototype.setTargetElement=function(e,t){t===void 0&&(t=1),this.removeTickerListener(),this.removeEvents(),this.interactionDOMElement=e,this.resolution=t,this.addEvents(),this.addTickerListener()},t.prototype.addTickerListener=function(){this.tickerAdded||!this.interactionDOMElement||!this._useSystemTicker||(ns.system.add(this.tickerUpdate,this,es.INTERACTION),this.tickerAdded=!0)},t.prototype.removeTickerListener=function(){this.tickerAdded&&(ns.system.remove(this.tickerUpdate,this),this.tickerAdded=!1)},t.prototype.addEvents=function(){if(!(this.eventsAdded||!this.interactionDOMElement)){var e=this.interactionDOMElement.style;globalThis.navigator.msPointerEnabled?(e.msContentZooming=`none`,e.msTouchAction=`none`):this.supportsPointerEvents&&(e.touchAction=`none`),this.supportsPointerEvents?(globalThis.document.addEventListener(`pointermove`,this.onPointerMove,this._eventListenerOptions),this.interactionDOMElement.addEventListener(`pointerdown`,this.onPointerDown,this._eventListenerOptions),this.interactionDOMElement.addEventListener(`pointerleave`,this.onPointerOut,this._eventListenerOptions),this.interactionDOMElement.addEventListener(`pointerover`,this.onPointerOver,this._eventListenerOptions),globalThis.addEventListener(`pointercancel`,this.onPointerCancel,this._eventListenerOptions),globalThis.addEventListener(`pointerup`,this.onPointerUp,this._eventListenerOptions)):(globalThis.document.addEventListener(`mousemove`,this.onPointerMove,this._eventListenerOptions),this.interactionDOMElement.addEventListener(`mousedown`,this.onPointerDown,this._eventListenerOptions),this.interactionDOMElement.addEventListener(`mouseout`,this.onPointerOut,this._eventListenerOptions),this.interactionDOMElement.addEventListener(`mouseover`,this.onPointerOver,this._eventListenerOptions),globalThis.addEventListener(`mouseup`,this.onPointerUp,this._eventListenerOptions)),this.supportsTouchEvents&&(this.interactionDOMElement.addEventListener(`touchstart`,this.onPointerDown,this._eventListenerOptions),this.interactionDOMElement.addEventListener(`touchcancel`,this.onPointerCancel,this._eventListenerOptions),this.interactionDOMElement.addEventListener(`touchend`,this.onPointerUp,this._eventListenerOptions),this.interactionDOMElement.addEventListener(`touchmove`,this.onPointerMove,this._eventListenerOptions)),this.eventsAdded=!0}},t.prototype.removeEvents=function(){if(!(!this.eventsAdded||!this.interactionDOMElement)){var e=this.interactionDOMElement.style;globalThis.navigator.msPointerEnabled?(e.msContentZooming=``,e.msTouchAction=``):this.supportsPointerEvents&&(e.touchAction=``),this.supportsPointerEvents?(globalThis.document.removeEventListener(`pointermove`,this.onPointerMove,this._eventListenerOptions),this.interactionDOMElement.removeEventListener(`pointerdown`,this.onPointerDown,this._eventListenerOptions),this.interactionDOMElement.removeEventListener(`pointerleave`,this.onPointerOut,this._eventListenerOptions),this.interactionDOMElement.removeEventListener(`pointerover`,this.onPointerOver,this._eventListenerOptions),globalThis.removeEventListener(`pointercancel`,this.onPointerCancel,this._eventListenerOptions),globalThis.removeEventListener(`pointerup`,this.onPointerUp,this._eventListenerOptions)):(globalThis.document.removeEventListener(`mousemove`,this.onPointerMove,this._eventListenerOptions),this.interactionDOMElement.removeEventListener(`mousedown`,this.onPointerDown,this._eventListenerOptions),this.interactionDOMElement.removeEventListener(`mouseout`,this.onPointerOut,this._eventListenerOptions),this.interactionDOMElement.removeEventListener(`mouseover`,this.onPointerOver,this._eventListenerOptions),globalThis.removeEventListener(`mouseup`,this.onPointerUp,this._eventListenerOptions)),this.supportsTouchEvents&&(this.interactionDOMElement.removeEventListener(`touchstart`,this.onPointerDown,this._eventListenerOptions),this.interactionDOMElement.removeEventListener(`touchcancel`,this.onPointerCancel,this._eventListenerOptions),this.interactionDOMElement.removeEventListener(`touchend`,this.onPointerUp,this._eventListenerOptions),this.interactionDOMElement.removeEventListener(`touchmove`,this.onPointerMove,this._eventListenerOptions)),this.interactionDOMElement=null,this.eventsAdded=!1}},t.prototype.tickerUpdate=function(e){this._deltaTime+=e,!(this._deltaTime0&&(a=e.composedPath()[0]);for(var o=a===this.interactionDOMElement?``:`outside`,s=0;s=e||i({x:0,y:0})},disableFocusAt:{type:Boolean,default:!1}},emits:[`modelLoaded`],setup(e,{expose:t,emit:n}){let r=e,i=n,a=fn(()=>r.app),o=fn(()=>r.paused),s=fn(()=>r.focusAt),c=W(),l=W(0),u=W(0),d=Ot(()=>Math.max(0,Math.min(100,r.mouthOpenSize))),f=_n(),p=gn(Dt),m=Ot(()=>p.between(`sm`,`md`).value||p.smaller(`sm`).value),h=I_(),g=sn(new $h({alpha:.2,blur:0,distance:20,rotation:45}));function _(){return c.value.internalModel.coreModel}function v(e){if(!e.value)return;let t=2.2;m.value&&(t=2.2);let n=r.height*.95/u.value*t,i=r.width*.95/l.value*t,a=Math.min(n,i);e.value.scale.set(a,a)}let{live2dModelFile:y,loadingLive2dModel:b,live2dCurrentMotion:x,availableLive2dMotions:S,live2dLoadSource:C,live2dModelUrl:w,themeColorsHue:T,themeColorsHueDynamic:E}=ln(Cn()),D=W({group:`Idle`,index:0});async function O(){var e;if(!a.value)return;c.value&&(a.value.stage.removeChild(c.value),c.value.destroy(),c.value=void 0);let t=new Wp;C.value===`file`?await Ip.setupLive2DModel(t,[y.value],{autoInteract:!1}):C.value===`url`&&await Ip.setupLive2DModel(t,w.value,{autoInteract:!1}),c.value=t,a.value.stage.addChild(c.value),l.value=c.value.width,u.value=c.value.height,c.value.x=r.width/2,c.value.y=r.height,c.value.anchor.set(.5,.5),v(c),c.value.on(`hit`,e=>{c.value&&e.includes(`body`)&&c.value.motion(`tap_body`)});let n=c.value.internalModel,o=n.coreModel,s=n.motionManager;o.setParameterValueById(`ParamMouthOpenY`,d.value),S.value=Object.entries(s.definitions).flatMap(([e,t])=>t?t.map((t,n)=>({motionName:e,motionIndex:n,fileName:t.File})):[]).filter(Boolean),s.groups.idle&&(e=s.motionGroups[s.groups.idle])?.forEach(e=>{e._motionData.curves.forEach(e=>{(e.id===`ParamEyeBallX`||e.id===`ParamEyeBallY`)&&(e.id=`_${e.id}`)})});let f=s.update;s.update=function(e,t){return f?.call(this,e,t),s.state.currentGroup===s.groups.idle&&h.update(n,t),!0},s.on(`motionStart`,(e,t)=>{D.value={group:e,index:t}}),y.value&&await L_.default.setItem(`live2dModel`,y.value),i(`modelLoaded`),b.value=!1}async function k(){if(!a.value)return;Wp.registerTicker(ns),Qo.add(rs),Qo.add(gm);let e=await L_.default.getItem(`live2dModel`);if(e){y.value=e,C.value=`file`,b.value=!0;return}if(w.value){C.value=`url`,b.value=!0;return}b.value=!1}async function A(e,t){await c.value.motion(e,t,pp.FORCE)}let j=vn(()=>{c.value&&(c.value.x=r.width/2,c.value.y=r.height,v(c))},100),M=W(),N=W(0);function ee(){if(c.value){let e=getComputedStyle(M.value).backgroundColor;g.value.color=Number(Ft(e).replace(`#`,`0x`)),c.value.filters=[g.value]}}K([()=>r.width,()=>r.height],()=>j()),K(f,ee,{immediate:!0}),K([c,T],ee);function F(){ee(),N.value=requestAnimationFrame(F)}K(E,()=>{E.value?N.value=requestAnimationFrame(F):(cancelAnimationFrame(N.value),N.value=0)},{immediate:!0}),K(d,e=>_().setParameterValueById(`ParamMouthOpenY`,e)),K(a,k),K(x,e=>A(e.group,e.index)),K(o,e=>{var t,n;return e?(t=a.value)?.stop():(n=a.value)?.start()}),K(s,e=>{c.value&&(r.disableFocusAt||c.value.focus(e.x,e.y))}),An(b,e=>{e&&O()},{debounce:1e3}),Yt(ee),Zt(()=>{var e;cancelAnimationFrame(N.value),c.value&&(e=a.value)?.stage.removeChild(c.value)});function I(){return S.value}return t({setMotion:A,listMotionGroups:I}),(e,t)=>(U(),V(P,null,[B(`div`,{ref_key:`dropShadowColorComputer`,ref:M,hidden:``,bg:`primary-400 dark:primary-500`},null,512),nn(e.$slots,`default`)],64))}}),z_=R_;const B_={"z-1":``,"flex-1":``},V_={"text-lg":``,"font-normal":``,class:`menu-icon-item-title`,transition:`all ease-in-out duration-400`},H_={text:`sm neutral-500 dark:neutral-400`,class:`menu-icon-item-description`,transition:`all ease-in-out duration-400`};var U_=H({__name:`IconItem`,props:{title:null,description:null,icon:null,iconTemplate:{type:Boolean},to:null},setup(e){return(t,n)=>{let r=rn(`RouterLink`);return U(),kt(r,{box:`border`,flex:`~ row`,bg:`neutral-50 dark:neutral-900`,border:`neutral-100 dark:neutral-800/25 hover:primary-500/30 dark:hover:primary-400/30 solid 2`,"drop-shadow":`none hover:[0px_4px_4px_rgba(220,220,220,0.4)] active:[0px_0px_0px_rgba(220,220,220,0.25)] dark:hover:none`,class:`menu-icon-item`,transition:`all ease-in-out duration-400`,relative:``,"w-full":``,"items-center":``,"overflow-hidden":``,"rounded-lg":``,"p-5":``,"text-left":``,cursor:`pointer`,to:e.to},{default:Nn(()=>[B(`div`,B_,[B(`div`,V_,un(e.title),1),B(`div`,H_,[B(`span`,null,un(e.description),1)])]),typeof e.icon==`string`?(U(),V(`div`,{key:0,class:Gt([`menu-icon-item-icon`,[e.icon]]),transition:`all ease-in-out duration-400`,absolute:``,"right-0":``,"size-24":``,"translate-y-4":``,text:`neutral-400/50 dark:neutral-600/50`},null,2)):At(``,!0),e.iconTemplate?nn(t.$slots,`icon`,{key:1},void 0,!0):At(``,!0)]),_:3},8,[`to`])}}}),W_=St(U_,[[`__scopeId`,`data-v-c0e4998c`]]);const G_={flex:`~ col`,bg:`neutral-50 dark:neutral-800`,border:`neutral-100 dark:neutral-800/25 hover:primary-500/30 dark:hover:primary-400/30 solid 2`,"drop-shadow":`none hover:[0px_4px_4px_rgba(220,220,220,0.4)] active:[0px_0px_0px_rgba(220,220,220,0.25)] dark:hover:none`,class:`menu-icon-status-item`,transition:`all ease-in-out duration-400`,"w-full":``,"cursor-pointer":``,"of-hidden":``,"rounded-xl":``},K_={"z-1":``,"flex-1":``},q_={"text-lg":``,"font-normal":``,class:`menu-icon-status-item-title`,transition:`all ease-in-out duration-400`},J_={text:`sm neutral-500 dark:neutral-400`,class:`menu-icon-status-item-description`,transition:`all ease-in-out duration-400`},Y_=[`src`],X_={"p-2":``},Z_={key:0,"size-3":``,bg:`green-500 dark:green-600`,"rounded-full":``},Q_={key:1,"size-3":``,bg:`neutral-400 dark:neutral-500`,"rounded-full":``};var $_=H({__name:`IconStatusItem`,props:{title:null,description:null,icon:null,iconColor:null,iconImage:null,to:null,configured:{type:Boolean}},setup(e){let t=e;return(e,n)=>{let r=rn(`RouterLink`);return U(),V(`div`,G_,[Mt(r,{flex:`~ row`,class:`menu-icon-status-item-link`,bg:`white dark:neutral-900`,transition:`all ease-in-out duration-400`,relative:``,"h-full":``,"w-full":``,"items-center":``,"overflow-hidden":``,"rounded-lg":``,"p-5":``,"text-left":``,to:t.to},{default:Nn(()=>[B(`div`,K_,[B(`div`,q_,un(t.title),1),B(`div`,J_,[B(`span`,null,un(t.description||``),1)])]),t.icon?(U(),V(`div`,{key:0,class:Gt([`menu-icon-status-item-icon`,[t.icon]]),transition:`all ease-in-out duration-400`,absolute:``,"right-0":``,"size-16":``,"translate-y-2":``,text:`neutral-400/50 dark:neutral-600/50`,"grayscale-100":``},null,2)):At(``,!0),t.iconColor?(U(),V(`div`,{key:1,class:Gt([`menu-icon-status-item-icon-color`,[t.iconColor]]),transition:`all ease-in-out duration-400`,absolute:``,"right-0":``,"size-16":``,"translate-y-2":``,text:`neutral-400/50 dark:neutral-600/50`,"grayscale-100":``},null,2)):At(``,!0),t.iconImage?(U(),V(`img`,{key:2,src:t.iconImage,class:`menu-icon-status-item-icon-image`,transition:`all ease-in-out duration-400`,absolute:``,"right-0":``,"size-16":``,"translate-y-2":``,"grayscale-100":``},null,8,Y_)):At(``,!0)]),_:1},8,[`to`]),B(`div`,X_,[t.configured?(U(),V(`div`,Z_)):(U(),V(`div`,Q_))])])}}}),ev=St($_,[[`__scopeId`,`data-v-03028e15`]]);const tv=[`checked`,`name`,`value`],nv={class:`relative mr-3 mt-0.5 flex-shrink-0`},rv={class:`w-full flex flex-col gap-2`},iv={class:`flex items-center`},av={key:0,class:`relative`},ov=[`title`],sv={key:1,class:`mt-2`};var cv=H({__name:`RadioCardDetail`,props:Ht({id:null,name:null,value:null,title:null,description:null,deprecated:{type:Boolean,default:!1},showExpandCollapse:{type:Boolean,default:!0},expandCollapseThreshold:{default:100},customInputValue:{default:``},customInputPlaceholder:{default:``},showCustomInput:{type:Boolean,default:!1}},{modelValue:{required:!0},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let t=xn(e,`modelValue`),n=W(!1);function r(){n.value=!n.value}return(i,a)=>(U(),V(`label`,{key:e.id,class:Gt([`form_radio-card-detail relative flex cursor-pointer items-start rounded-xl p-3 pr-[20px]`,[t.value===e.value?`bg-primary-50 dark:bg-primary-900/20 border-primary-100 dark:border-primary-900 hover:border-primary-500/30 dark:hover:border-primary-400/30`:`bg-white dark:bg-neutral-900/20 border-neutral-100 dark:border-neutral-900 hover:border-primary-500/30 dark:hover:border-primary-400/30`,t.value===e.value?`form_radio-card-detail-active`:``,e.deprecated?`opacity-60`:``]]),transition:`all duration-200 ease-in-out`,border:`2 solid`},[Pn(B(`input`,{"onUpdate:modelValue":a[0]||=e=>t.value=e,checked:t.value===e.value,type:`radio`,name:e.name,value:e.value,class:`absolute opacity-0`},null,8,tv),[[Dn,t.value]]),B(`div`,nv,[B(`div`,{class:Gt([`size-5 border-2 rounded-full transition-colors duration-200`,[t.value===e.value?`border-primary-500 dark:border-primary-400`:`border-neutral-300 dark:border-neutral-600`]])},[B(`div`,{class:Gt([`absolute left-1/2 top-1/2 size-3 rounded-full transition-opacity duration-200 -translate-x-1/2 -translate-y-1/2`,[t.value===e.value?`opacity-100 bg-primary-500 dark:bg-primary-400`:`opacity-0`]])},null,2)],2)]),B(`div`,rv,[B(`div`,iv,[B(`span`,{class:Gt([`line-clamp-1 font-normal`,[t.value===e.value?`text-neutral-700 dark:text-neutral-300`:`text-neutral-700 dark:text-neutral-400`]])},un(e.title),3)]),e.description?(U(),V(`div`,av,[Mt(G(Wn),null,{default:Nn(()=>[!n.value||!e.showExpandCollapse?(U(),V(`div`,{key:0,class:Gt([`line-clamp-2 cursor-pointer text-xs`,[t.value===e.value?`text-neutral-600 dark:text-neutral-400`:`text-neutral-500 dark:text-neutral-500`]]),title:e.description,onClick:Fn(r,[`prevent`])},un(e.description),11,ov)):(U(),V(`div`,{key:1,class:Gt([`cursor-pointer text-xs`,[t.value===e.value?`text-neutral-600 dark:text-neutral-400`:`text-neutral-500 dark:text-neutral-500`]]),onClick:Fn(r,[`prevent`])},un(e.description),3))]),_:1}),e.showExpandCollapse&&e.description.length>e.expandCollapseThreshold?(U(),V(`button`,{key:0,class:`mt-0.5 inline-flex items-center text-xs text-primary-500 dark:text-primary-600`,onClick:Fn(r,[`prevent`])},[B(`span`,null,un(n.value?`Show less`:`Show more`),1),B(`div`,{class:Gt([{"rotate-180":n.value},`transition-transform duration-200`])},a[2]||=[B(`div`,{"i-solar:alt-arrow-down-bold-duotone":``,"ml-0.5":``,"text-xs":``},null,-1)],2)])):At(``,!0)])):At(``,!0),e.showCustomInput&&t.value===e.value?(U(),V(`div`,sv,[Mt(G(qn),{modelValue:t.value,"onUpdate:modelValue":a[1]||=e=>t.value=e,type:`text`,class:`w-full border border-neutral-300 rounded bg-white px-2 py-1 text-sm dark:border-neutral-700 dark:bg-neutral-900`,placeholder:e.customInputPlaceholder},null,8,[`modelValue`,`placeholder`])])):At(``,!0)])],2))}}),lv=St(cv,[[`__scopeId`,`data-v-603e520f`]]);const uv={class:`radio-card-detail-many-select`},dv={key:0,class:`relative`,"inline-flex":`~`,"w-full":``,"items-center":``},fv=[`placeholder`],pv={class:`mt-4 space-y-2`},mv={key:0,class:`text-sm text-neutral-500 dark:text-neutral-400`},hv={key:1,class:`flex items-center gap-3 border border-2 border-amber-200 rounded-xl bg-amber-50 p-4 dark:border-amber-800 dark:bg-amber-900/20`},gv={class:`flex flex-col`},_v={class:`font-medium`},vv={class:`text-sm text-amber-600 dark:text-amber-400`},yv={class:`relative`};var bv=H({__name:`RadioCardManySelect`,props:Ht({items:null,searchable:{type:Boolean,default:!0},searchPlaceholder:{default:`Search...`},searchNoResultsTitle:{default:`No results found`},searchNoResultsDescription:{default:`Try a different search term`},searchResultsText:{default:`{count} of {total} results`},customInputPlaceholder:{default:`Enter custom value`},expandButtonText:{default:`Show more`},collapseButtonText:{default:`Show less`},showMore:{type:Boolean,default:!0}},{modelValue:{required:!0},modelModifiers:{}}),emits:Ht([`update:customValue`],[`update:modelValue`]),setup(e,{emit:t}){let n=e,r=t,i=xn(e,`modelValue`),a=W(``),o=W(!1),s=W(``),c=Ot(()=>{if(!a.value)return n.items;let e=a.value.toLowerCase();return n.items.filter(t=>t.name.toLowerCase().includes(e)||t.description&&t.description.toLowerCase().includes(e))});function l(e){s.value=e,r(`update:customValue`,e)}return(t,n)=>(U(),V(`div`,uv,[e.searchable?(U(),V(`div`,dv,[n[4]||=B(`div`,{class:`pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3`},[B(`div`,{"i-solar:magnifer-line-duotone":``,class:`text-neutral-500 dark:text-neutral-400`})],-1),Pn(B(`input`,{"onUpdate:modelValue":n[0]||=e=>a.value=e,type:`search`,class:`w-full rounded-xl p-2.5 pl-10 text-sm outline-none`,border:`focus:primary-100 dark:focus:primary-400/50 2 solid neutral-200 dark:neutral-800`,transition:`all duration-200 ease-in-out`,bg:`white dark:neutral-900`,placeholder:e.searchPlaceholder},null,8,fv),[[kn,a.value]])])):At(``,!0),B(`div`,pv,[a.value?(U(),V(`div`,mv,un(e.searchResultsText.replace(`{count}`,c.value.length.toString()).replace(`{total}`,e.items.length.toString())),1)):At(``,!0),a.value&&c.value.length===0?(U(),V(`div`,hv,[n[5]||=B(`div`,{"i-solar:info-circle-line-duotone":``,class:`text-2xl text-amber-500 dark:text-amber-400`},null,-1),B(`div`,gv,[B(`span`,_v,un(e.searchNoResultsTitle),1),B(`span`,vv,un(e.searchNoResultsDescription.replace(`{query}`,a.value)),1)])])):At(``,!0),B(`div`,yv,[B(`div`,{class:Gt([`grid auto-cols-[350px] grid-flow-col max-h-[calc(100dvh-7lh)] gap-4 overflow-x-auto pb-4 scrollbar-none`,[o.value?`grid-cols-1 md:grid-cols-2 grid-flow-row auto-cols-auto`:``]]),transition:`all duration-200 ease-in-out`,style:{"scroll-snap-type":`x mandatory`}},[(U(!0),V(P,null,tn(c.value,t=>(U(),kt(lv,{id:t.id,key:t.id,modelValue:i.value,"onUpdate:modelValue":n[1]||=e=>i.value=e,value:t.id,title:t.name,description:t.description,deprecated:t.deprecated,"show-expand-collapse":e.showMore,"expand-collapse-threshold":100,"show-custom-input":t.customizable,"custom-input-value":s.value,"custom-input-placeholder":e.customInputPlaceholder,name:`radio-card-detail-many-select`,class:`scroll-snap-align-start`,"onUpdate:customInputValue":n[2]||=e=>l(e)},null,8,[`id`,`modelValue`,`value`,`title`,`description`,`deprecated`,`show-expand-collapse`,`show-custom-input`,`custom-input-value`,`custom-input-placeholder`]))),128))],2),B(`div`,{bg:`neutral-100 dark:[rgba(0,0,0,0.3)]`,"rounded-xl":``,class:Gt([o.value?`w-full`:`mt-4 w-full rounded-lg`])},[B(`button`,{"w-full":``,flex:``,"items-center":``,"justify-center":``,"gap-2":``,"rounded-lg":``,"py-2":``,transition:`all duration-200 ease-in-out`,class:Gt([o.value?`bg-primary-500 hover:bg-primary-600 text-white`:`bg-white dark:bg-neutral-900 hover:bg-neutral-100 dark:hover:bg-neutral-800`]),onClick:n[3]||=e=>o.value=!o.value},[B(`span`,null,un(o.value?e.collapseButtonText:e.expandButtonText),1),B(`div`,{class:Gt([o.value?`rotate-180`:``,`text-lg`]),"i-solar:alt-arrow-down-bold-duotone":``,transition:`transform duration-200 ease-in-out`},null,2)],2)],2)])])]))}}),xv=St(bv,[[`__scopeId`,`data-v-7ad6d626`]]);const Sv=[`checked`,`name`,`value`],Cv={flex:`~ col`,"min-h-16":``,"w-full":``,"items-start":``,"justify-center":``,"pb-2":``,"pl-5":``,"pr-4":``,"pt-2":``};var wv=H({__name:`RadioCardSimple`,props:Ht({id:null,name:null,value:null,title:null,description:null},{modelValue:{required:!0},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let t=xn(e,`modelValue`);return(n,r)=>(U(),V(`label`,{key:e.id,border:`2px solid`,class:Gt([`form_radio-card-simple relative`,[t.value===e.value?`bg-primary-50 dark:bg-primary-900/20 border-primary-100 dark:border-primary-900 hover:border-primary-500/30 dark:hover:border-primary-400/30`:`bg-white dark:bg-neutral-900/20 border-neutral-100 dark:border-neutral-900 hover:border-primary-500/30 dark:hover:border-primary-400/30`,t.value===e.value?`form_radio-card-simple-active`:``]]),transition:`all duration-200 ease-in-out`,flex:`~ col`,block:``,"min-w-50":``,"w-fit":``,"cursor-pointer":``,"items-start":``,"rounded-xl":``,"p-4":``,"text-left":``},[Pn(B(`input`,{"onUpdate:modelValue":r[0]||=e=>t.value=e,checked:t.value===e.value,type:`radio`,name:e.name,value:e.value,class:`absolute opacity-0 [&:checked+div]:border-primary-500 [&:checked+div_.radio-dot]:opacity-100 dark:[&:checked+div]:border-primary-400`},null,8,Sv),[[Dn,t.value]]),r[1]||=B(`div`,{class:`radio-circle absolute left-2 top-2 size-5 rounded-full`,border:`2 solid neutral-300 dark:neutral-600`,transition:`all duration-200 ease-in-out`},[B(`div`,{class:`radio-dot absolute left-1/2 top-1/2 size-3 rounded-full opacity-0 -translate-x-1/2 -translate-y-1/2`,transition:`all duration-200 ease-in-out`,bg:`primary-500 dark:primary-400`})],-1),B(`div`,Cv,[B(`span`,{class:Gt([`radio-item-name font-normal`,[t.value===e.value?`text-neutral-700 dark:text-neutral-300`:`text-neutral-500 dark:text-neutral-500`]]),text:`md`,transition:`all duration-200 ease-in-out`},un(e.title),3),e.description?(U(),V(`span`,{key:0,class:Gt([`radio-item-description`,[t.value===e.value?`text-neutral-600 dark:text-neutral-400`:`text-neutral-400 dark:text-neutral-600`]]),transition:`all duration-200 ease-in-out`},un(e.description),3)):At(``,!0)]),r[2]||=B(`div`,{class:`bg-dotted-neutral-200/80 dark:bg-dotted-neutral-700/50 [input:checked~&]:bg-dotted-primary-300/50 dark:[input:checked~&]:bg-dotted-primary-200/20`,absolute:``,"inset-0":``,"z--1":``,style:{"background-size":`10px 10px`,"mask-image":`linear-gradient(165deg, white 30%, transparent 50%)`}},null,-1)],2))}}),Tv=St(wv,[[`__scopeId`,`data-v-0df44f43`]]);const Ev={class:`p-3`},Dv={class:`flex items-start`},Ov=[`checked`,`name`,`value`],kv={class:`relative mr-3 mt-0.5 flex-shrink-0`},Av={key:0,class:`i-solar:pause-circle-bold-duotone text-xl text-neutral-400 dark:text-neutral-500`},jv={key:1,class:`i-solar:play-circle-bold-duotone text-xl text-neutral-400 dark:text-neutral-500`},Mv={key:1,class:`mt-auto w-full flex items-center justify-center bg-neutral-50 py-3 text-xs text-neutral-400 italic dark:bg-neutral-800/50 dark:text-neutral-600`},Nv={class:`flex-1 cursor-pointer`},Pv={class:`flex items-center`},Fv={key:0,class:`mt-1 flex flex-wrap gap-1`},Iv={key:1,class:`mt-3`},Lv={relative:``},Rv={key:0,class:`h-16 px-3 pb-2`};var zv=H({__name:`VoiceCard`,props:Ht({name:null,voice:null,currentlyPlayingId:null,customInputPlaceholder:{default:`Enter custom voice name`},showVisualizer:{type:Boolean,default:!0},audioStream:{default:null}},{"voice-id":{required:!1,default:``},"voice-idModifiers":{},"custom-voice-name":{required:!1,default:``},"custom-voice-nameModifiers":{}}),emits:Ht([`togglePlayback`],[`update:voice-id`,`update:custom-voice-name`]),setup(e,{emit:t}){let n=e,r=t,i=xn(e,`voice-id`),a=xn(e,`custom-voice-name`);function o(e){return e.previewURL||e.preview_audio_url}function s(e){var t,n,r;let i=[];if((t=e.labels)?.gender&&i.push(e.labels.gender),(n=e.labels)?.age&&i.push(e.labels.age),(r=e.labels)?.accent&&i.push(e.labels.accent),e.languages&&e.languages.length>0){let t=e.languages.map(e=>e.name).join(`, `);i.push(t)}return i}function c(){r(`togglePlayback`,n.voice)}return(t,r)=>(U(),V(`label`,{border:`2px solid`,class:Gt([`scroll-snap-align-start form_voice-card relative flex flex-col overflow-hidden rounded-xl`,[i.value===n.voice.id?`bg-primary-50 dark:bg-primary-900/20 border-primary-100 dark:border-primary-900 hover:border-primary-500/30 dark:hover:border-primary-400/30`:`bg-white dark:bg-neutral-900/20 border-neutral-100 dark:border-neutral-900 hover:border-primary-500/30 dark:hover:border-primary-400/30`,i.value===n.voice.id?`form_voice-card-active`:``]]),transition:`all duration-200 ease-in-out`},[B(`div`,Ev,[B(`div`,Dv,[Pn(B(`input`,{"onUpdate:modelValue":r[0]||=e=>i.value=e,checked:i.value===n.voice.id,type:`radio`,name:e.name,value:n.voice.id,class:`absolute cursor-pointer opacity-0`},null,8,Ov),[[Dn,i.value]]),B(`div`,kv,[B(`div`,{class:Gt([`size-5 border-2 rounded-full transition-colors duration-200`,[i.value===n.voice.id?`border-primary-500 dark:border-primary-400`:`border-neutral-300 dark:border-neutral-600`]])},[B(`div`,{class:Gt([`absolute left-1/2 top-1/2 size-3 rounded-full transition-opacity duration-200 -translate-x-1/2 -translate-y-1/2`,[i.value===n.voice.id?`opacity-100 bg-primary-500 dark:bg-primary-400`:`opacity-0`]])},null,2)],2)]),o(e.voice)?(U(),V(`button`,{key:0,absolute:``,"right-0":``,top:`0`,"z-3":``,class:Gt([`translate-x-[-50%] translate-y-[50%]`,[e.currentlyPlayingId===e.voice.id?`text-white dark:text-white`:``]]),onClick:c},[e.currentlyPlayingId===e.voice.id?(U(),V(`div`,Av)):(U(),V(`div`,jv))],2)):(U(),V(`div`,Mv,` No preview available `)),B(`div`,Nv,[B(`div`,Pv,[B(`span`,{class:Gt([`line-clamp-1 font-medium`,[i.value===e.voice.id?`text-neutral-700 dark:text-neutral-300`:`text-neutral-700 dark:text-neutral-400`]])},un(e.voice.name),3)]),s(e.voice).length>0?(U(),V(`div`,Fv,[(U(!0),V(P,null,tn(s(e.voice),(t,n)=>(U(),V(`span`,{key:n,class:Gt([`inline-flex items-center rounded-md px-1.5 py-0.5 text-xs`,[i.value===e.voice.id?`bg-primary-100 text-primary-700 dark:bg-primary-900/30 dark:text-primary-400`:`bg-neutral-100 text-neutral-700 dark:bg-neutral-800 dark:text-neutral-300`]])},un(t),3))),128))])):At(``,!0),e.voice.customizable&&i.value===e.voice.id?(U(),V(`div`,Iv,[Mt(G(qn),{modelValue:a.value,"onUpdate:modelValue":r[1]||=e=>a.value=e,type:`text`,class:`w-full border border-neutral-300 rounded bg-white px-2 py-1 text-sm dark:border-neutral-700 dark:bg-neutral-900`,placeholder:e.customInputPlaceholder},null,8,[`modelValue`,`placeholder`])])):At(``,!0),e.voice.description?(U(),V(`div`,{key:2,class:Gt([`line-clamp-2 mt-1 text-xs`,[i.value===e.voice.id?`text-neutral-600 dark:text-neutral-400`:`text-neutral-500 dark:text-neutral-500`]])},un(e.voice.description),3)):At(``,!0)])])]),B(`div`,Lv,[Mt(G(Wn),null,{default:Nn(()=>[e.showVisualizer&&e.currentlyPlayingId===e.voice.id&&e.audioStream?(U(),V(`div`,Rv,[Mt(G(aa),{stream:e.audioStream,bars:24,"min-freq":60,"max-freq":4e3},{default:Nn(({frequencies:t})=>[Mt(G(la),{frequencies:t,"bars-class":i.value===e.voice.id?`bg-primary-500 dark:bg-primary-400`:`bg-neutral-400 dark:bg-neutral-600`},null,8,[`frequencies`,`bars-class`])]),_:1},8,[`stream`])])):At(``,!0)]),_:1})])],2))}}),Bv=St(zv,[[`__scopeId`,`data-v-a5ae8da9`]]);const Vv={class:`voice-preview-player`},Hv={key:0,class:`relative`,"inline-flex":`~`,"w-full":``,"items-center":``},Uv=[`placeholder`],Wv={class:`mt-4 space-y-2`},Gv={key:0,class:`text-sm text-neutral-500 dark:text-neutral-400`},Kv={key:1,class:`flex items-center gap-3 border border-2 border-amber-200 rounded-xl bg-amber-50 p-4 dark:border-amber-800 dark:bg-amber-900/20`},qv={class:`flex flex-col`},Jv={class:`font-medium`},Yv={class:`text-sm text-amber-600 dark:text-amber-400`},Xv={class:`relative`};var Zv=H({__name:`VoiceCardManySelect`,props:Ht({voices:null,searchable:{type:Boolean,default:!0},searchPlaceholder:{default:`Search voices...`},searchNoResultsTitle:{default:`No voices found`},searchNoResultsDescription:{default:`Try a different search term`},searchResultsText:{default:`{count} of {total} voices`},customInputPlaceholder:{default:`Enter custom voice name`},expandButtonText:{default:`Show more`},collapseButtonText:{default:`Show less`},playButtonText:{default:`Play sample`},pauseButtonText:{default:`Pause`},showVisualizer:{type:Boolean,default:!0}},{"search-query":{required:!1,default:``},"search-queryModifiers":{},"voice-id":{required:!1,default:``},"voice-idModifiers":{}}),emits:[`update:search-query`,`update:voice-id`],setup(e){let t=e,n=W(!1),r=W(),i=W(new Map),a=W(new Map),o=W(new Map),s=W(new Map),c=W(null);function l(){return c.value||=new(window.AudioContext||window.webkitAudioContext),c.value}let u=xn(e,`search-query`),d=xn(e,`voice-id`),f=Ot(()=>{if(!u.value)return t.voices;let e=u.value.toLowerCase();return t.voices.filter(t=>{let n=t.name.toLowerCase().includes(e),r=t.description&&t.description.toLowerCase().includes(e),i=t.tags&&t.tags.some(t=>t.toLowerCase().includes(e)),a=t.labels&&Object.values(t.labels).some(t=>typeof t==`string`&&t.toLowerCase().includes(e)),o=t.languages&&t.languages.some(t=>t.name.toLowerCase().includes(e)||t.code.toLowerCase().includes(e));return n||r||i||a||o})});function p(e){return e.previewURL||e.preview_audio_url}function m(e){let t=p(e);if(!t)return null;if(i.value.has(e.id))return i.value.get(e.id)||null;let n=new Audio(t);return n.crossOrigin=`anonymous`,n.preload=`auto`,n.addEventListener(`ended`,()=>{if(r.value===e.id){r.value=void 0;let t=a.value.get(e.id);t&&(t.getTracks().forEach(e=>e.stop()),a.value.delete(e.id))}}),i.value.set(e.id,n),n}function h(e,t){try{if(a.value.has(t))return a.value.get(t)||null;let n=l();if(s.value.has(t)){let e=s.value.get(t),r=n.createMediaStreamDestination();e.connect(r);let i=r.stream;return a.value.set(t,i),i}let r=n.createMediaElementSource(e);s.value.set(t,r),r.connect(n.destination);let i=n.createMediaStreamDestination();r.connect(i);let o=i.stream;return a.value.set(t,o),o}catch(e){return console.error(`Failed to create audio stream for visualizer:`,e),null}}function g(e){try{let n=p(e);if(!n)return;let o=m(e);if(!o)return;if(r.value===e.id){o.pause(),r.value=void 0;let t=a.value.get(e.id);t&&(t.getTracks().forEach(e=>e.stop()),a.value.delete(e.id));return}if(r.value){let e=i.value.get(r.value);e&&e.pause();let t=a.value.get(r.value);t&&(t.getTracks().forEach(e=>e.stop()),a.value.delete(r.value))}t.showVisualizer&&!a.value.has(e.id)&&h(o,e.id),o.currentTime=0,o.play().catch(e=>{console.error(`Failed to play audio:`,e)}),r.value=e.id}catch(e){console.error(e),r.value=void 0}}function _(){i.value.forEach(e=>{e.pause(),e.src=``}),i.value.clear(),a.value.forEach(e=>{e.getTracks().forEach(e=>e.stop())}),a.value.clear(),o.value.forEach(e=>{e.state!==`closed`&&e.close()}),o.value.clear(),s.value.clear(),r.value=void 0}K(u,()=>{if(r.value){let e=i.value.get(r.value);e&&e.pause();let t=a.value.get(r.value);t&&(t.getTracks().forEach(e=>e.stop()),a.value.delete(r.value)),r.value=void 0}}),Jt(_);let v=W(``);return(t,i)=>(U(),V(`div`,Vv,[e.searchable?(U(),V(`div`,Hv,[i[4]||=B(`div`,{class:`pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3`},[B(`div`,{"i-solar:magnifer-line-duotone":``,class:`text-neutral-500 dark:text-neutral-400`})],-1),Pn(B(`input`,{"onUpdate:modelValue":i[0]||=e=>u.value=e,type:`search`,class:`w-full rounded-xl p-2.5 pl-10 text-sm outline-none`,border:`focus:primary-100 dark:focus:primary-400/50 2 solid neutral-200 dark:neutral-800`,transition:`all duration-200 ease-in-out`,bg:`white dark:neutral-900`,placeholder:e.searchPlaceholder},null,8,Uv),[[kn,u.value]])])):At(``,!0),B(`div`,Wv,[u.value?(U(),V(`div`,Gv,un(e.searchResultsText.replace(`{count}`,f.value.length.toString()).replace(`{total}`,e.voices.length.toString())),1)):At(``,!0),u.value&&f.value.length===0?(U(),V(`div`,Kv,[i[5]||=B(`div`,{"i-solar:info-circle-line-duotone":``,class:`text-2xl text-amber-500 dark:text-amber-400`},null,-1),B(`div`,qv,[B(`span`,Jv,un(e.searchNoResultsTitle),1),B(`span`,Yv,un(e.searchNoResultsDescription.replace(`{query}`,u.value)),1)])])):At(``,!0),B(`div`,Xv,[B(`div`,{class:Gt([`grid auto-cols-[350px] grid-flow-col max-h-[calc(100dvh-7lh)] gap-4 overflow-x-auto scrollbar-none`,[n.value?`grid-cols-1 md:grid-cols-2 grid-flow-row auto-cols-auto`:``]]),transition:`all duration-200 ease-in-out`,style:{"scroll-snap-type":`x mandatory`}},[(U(!0),V(P,null,tn(f.value,t=>(U(),kt(Bv,{key:t.id,"voice-id":d.value,"onUpdate:voiceId":i[1]||=e=>d.value=e,"custom-voice-name":v.value,"onUpdate:customVoiceName":i[2]||=e=>v.value=e,name:`voice`,voice:t,"currently-playing-id":r.value,"custom-input-placeholder":e.customInputPlaceholder,"show-visualizer":e.showVisualizer,"audio-stream":a.value.get(t.id),onTogglePlayback:g},null,8,[`voice-id`,`custom-voice-name`,`voice`,`currently-playing-id`,`custom-input-placeholder`,`show-visualizer`,`audio-stream`]))),128))],2),B(`div`,{bg:`neutral-100 dark:[rgba(0,0,0,0.3)]`,"rounded-xl":``,class:Gt([n.value?`w-full`:`mt-4 w-full rounded-lg`])},[B(`button`,{"w-full":``,flex:``,"items-center":``,"justify-center":``,"gap-2":``,"rounded-lg":``,"py-2":``,transition:`all duration-200 ease-in-out`,class:Gt([n.value?`bg-primary-500 hover:bg-primary-600 text-white`:`bg-white dark:bg-neutral-900 hover:bg-neutral-100 dark:hover:bg-neutral-800`]),onClick:i[3]||=e=>n.value=!n.value},[B(`span`,null,un(n.value?e.collapseButtonText:e.expandButtonText),1),B(`div`,{class:Gt([n.value?`rotate-180`:``,`text-lg`]),"i-solar:alt-arrow-down-bold-duotone":``,transition:`transform duration-200 ease-in-out`},null,2)],2)],2)])])]))}}),Qv=St(Zv,[[`__scopeId`,`data-v-4dd3b9e2`]]),$v=H({__name:`CursorFloating`,props:{intensity:{default:1.5}},setup(e){let t=e,n=W(null),r=W(``),i=W(`50% 50%`),a=W(`50% 50%`),o=W(.5);function s(e){if(!n.value)return;let s=n.value,c=s.getBoundingClientRect(),l=e.clientX-c.left,u=e.clientY-c.top,d=s.offsetWidth,f=s.offsetHeight,p=Math.abs(Math.floor(100/d*l)-100),m=Math.abs(Math.floor(100/f*u)-100),h=50+(p-50)/1.5,g=50+(m-50)/1.5,_=50+(p-50)/7,v=50+(m-50)/7,y=(h-50)/1.5*.2*t.intensity,b=(g-50)/2*-1*.2*t.intensity,x=50-p+(50-m),S=.5+Math.abs(x)*.008*t.intensity;r.value=`perspective(1200px) rotateX(${b}deg) rotateY(${y}deg) scale3d(${1+.015*t.intensity}, ${1+.015*t.intensity}, ${1+.015*t.intensity})`,i.value=`${h}% ${g}%`,a.value=`${_}% ${v}%`,o.value=S}function c(){r.value=`perspective(1200px) rotateX(0deg) rotateY(0deg) scale3d(1, 1, 1)`,i.value=`50% 50%`,a.value=`50% 50%`,o.value=.5}return Yt(()=>{r.value=`perspective(1200px) rotateX(0deg) rotateY(0deg) scale3d(1, 1, 1)`}),(t,i)=>(U(),V(`div`,{ref_key:`cardRef`,ref:n,class:`card-hover-effect`,style:qt({transform:r.value,"--effect-intensity":e.intensity}),onMousemove:s,onMouseleave:c},[nn(t.$slots,`default`,{},void 0,!0)],36))}}),ey=St($v,[[`__scopeId`,`data-v-895421da`]]),ty=H({__name:`ProviderAccountIdInput`,props:Ht({placeholder:null,required:{type:Boolean},label:null,description:null},{modelValue:{required:!0},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let t=e,n=xn(e,`modelValue`);return(e,r)=>(U(),kt(G(Kn),{modelValue:n.value,"onUpdate:modelValue":r[0]||=e=>n.value=e,label:t.label||`Account ID`,description:t.description||`Account ID`,placeholder:t.placeholder,required:t.required,type:`text`},null,8,[`modelValue`,`label`,`description`,`placeholder`,`required`]))}}),ny=ty;const ry=[`onClick`],iy={class:`text-lg text-neutral-500 md:text-2xl dark:text-neutral-400`},ay={"mt-4":``};var oy=H({__name:`ProviderAdvancedSettings`,props:{title:null,initialVisible:{type:Boolean}},setup(e){let t=e,n=W(t.initialVisible||!1);function r(){n.value=!n.value}return(t,n)=>(U(),kt(Un,{"w-full":``},{trigger:Nn(t=>[B(`button`,{transition:`all ease-in-out duration-250`,"w-full":``,flex:``,"items-center":``,"gap-1.5":``,"outline-none":``,class:`[&_.provider-icon]:grayscale-100 [&_.provider-icon]:hover:grayscale-0`,onClick:()=>t.setVisible(!t.visible)&&r()},[B(`h2`,iy,[B(`span`,null,un(e.title||`Advanced`),1)]),B(`div`,{transform:``,transition:`transform duration-250`,class:Gt({"rotate-180":t.visible})},n[0]||=[B(`div`,{"i-solar:alt-arrow-down-bold-duotone":``},null,-1)],2)],8,ry)]),default:Nn(()=>[B(`div`,ay,[nn(t.$slots,`default`)])]),_:3}))}}),sy=oy,cy=H({__name:`ProviderApiKeyInput`,props:Ht({providerName:null,placeholder:null,required:{type:Boolean},label:null,description:null},{modelValue:{required:!0},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let t=e,{t:n}=bn(),r=xn(e,`modelValue`),i=Ot(()=>t.description||`API Key for ${t.providerName}`);return(t,a)=>(U(),kt(G(Kn),{modelValue:r.value,"onUpdate:modelValue":a[0]||=e=>r.value=e,label:e.label||G(n)(`settings.pages.providers.common.fields.field.api-key.label`),description:i.value,placeholder:e.placeholder,required:e.required,type:`password`},null,8,[`modelValue`,`label`,`description`,`placeholder`,`required`]))}}),ly=cy,uy=H({__name:`ProviderBaseUrlInput`,props:Ht({placeholder:null,required:{type:Boolean},label:null,description:null},{modelValue:{required:!0},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let t=e,n=xn(e,`modelValue`);return(e,r)=>(U(),kt(G(Kn),{modelValue:n.value,"onUpdate:modelValue":r[0]||=e=>n.value=e,label:t.label||`Base URL`,description:t.description||`Custom base URL (optional)`,placeholder:t.placeholder,required:t.required,type:`text`},null,8,[`modelValue`,`label`,`description`,`placeholder`,`required`]))}}),dy=uy;const fy={flex:`~ col gap-6`},py={flex:`~ row`,"items-center":``,"justify-between":``},my={class:`text-lg text-neutral-500 md:text-2xl dark:text-neutral-400`},hy={text:`neutral-400 dark:neutral-500`};var gy=H({__name:`ProviderBasicSettings`,props:{title:null,description:null,onReset:{type:Function}},setup(e){return(t,n)=>(U(),V(`div`,fy,[B(`div`,py,[B(`div`,null,[B(`h2`,my,un(e.title||`Basic`),1),B(`div`,hy,[B(`span`,null,un(e.description||`Essential settings`),1)])]),e.onReset?(U(),V(`button`,{key:0,title:`Reset settings`,flex:``,"items-center":``,"justify-center":``,"rounded-full":``,"p-2":``,transition:`all duration-250 ease-in-out`,text:`neutral-500 dark:neutral-400`,bg:`transparent dark:transparent hover:neutral-200 dark:hover:neutral-800 active:neutral-300 dark:active:neutral-700`,onClick:n[0]||=(...t)=>e.onReset&&e.onReset(...t)},n[1]||=[B(`div`,{"i-solar:refresh-bold-duotone":``,"text-xl":``},null,-1)])):At(``,!0)]),nn(t.$slots,`default`)]))}}),_y=gy;const vy={bg:`neutral-50 dark:[rgba(0,0,0,0.3)]`,"rounded-xl":``,"p-4":``,flex:`~ col gap-6`};var yy=H({__name:`ProviderSettingsContainer`,setup(e){return(e,t)=>(U(),V(`div`,vy,[nn(e.$slots,`default`)]))}}),by=yy;const xy={text:`neutral-200/50 dark:neutral-600/20`,"pointer-events-none":``,fixed:``,top:`[calc(100dvh-15rem)]`,"bottom-0":``,"right--5":``,"z--1":``,initial:{scale:.9,opacity:0,x:20},enter:{scale:1,opacity:1,x:0},duration:500,"size-60":``};var Sy=H({__name:`ProviderSettingsLayout2`,props:{providerName:null,providerIcon:null,providerIconColor:null,onBack:{type:Function}},setup(e){return(t,n)=>{let r=an(`motion`);return U(),V(P,null,[nn(t.$slots,`default`),Pn((U(),V(`div`,xy,[B(`div`,{text:`60`,class:Gt(e.providerIcon||e.providerIconColor)},null,2)])),[[r]])],64)}}}),Cy=Sy;const wy={text:`neutral-200/50 dark:neutral-600/20`,"pointer-events-none":``,fixed:``,top:`[calc(100dvh-15rem)]`,"bottom-0":``,"right--5":``,"z--1":``,initial:{scale:.9,opacity:0,x:20},enter:{scale:1,opacity:1,x:0},duration:500,"size-60":``};var Ty=H({__name:`ProviderSettingsLayout`,props:{providerName:null,providerIcon:null,providerIconColor:null,onBack:{type:Function}},setup(e){return(t,n)=>{let r=an(`motion`);return U(),V(P,null,[nn(t.$slots,`default`),Pn((U(),V(`div`,wy,[B(`div`,{text:`60`,class:Gt(e.providerIcon||e.providerIconColor)},null,2)])),[[r]])],64)}}}),Ey=Ty;const Dy={"w-full":``,"rounded-xl":``},Oy={class:`mb-4 text-lg text-neutral-500 md:text-2xl dark:text-neutral-400`,"w-full":``},ky={class:`inline-flex items-center gap-4`},Ay={flex:`~ col gap-4`},jy=[`placeholder`],My=[`placeholder`],Ny={flex:`~ col gap-6`},Py={grid:`~ cols-2 gap-4`},Fy={class:`flex items-center gap-1 text-sm font-medium`},Iy={class:`text-xs text-neutral-500 dark:text-neutral-400`},Ly=[`value`],Ry={flex:`~ row`,"gap-4":``},zy=[`disabled`],By={flex:`~ row`,"items-center":``,"gap-2":``},Vy={flex:`~ row`,"items-center":``,"gap-2":``},Hy={key:2,class:`mt-2 text-sm text-red-500`},Uy={key:3,class:`mt-2 text-sm text-red-500`},Wy={key:4,class:`mt-2 text-sm text-red-500`},Gy=[`src`];var Ky=H({__name:`SpeechPlayground`,props:{defaultText:null,availableVoices:null,generateSpeech:{type:Function},apiKeyConfigured:{type:Boolean}},setup(e,{expose:t}){let n=e,{t:r}=bn(),i=W(n.defaultText||`Hello! This is a test of the voice synthesis.`),a=W(!1),o=W(``),s=W(``),c=W(null),l=W(!1),u=W(``),d=W(``);K(()=>n.availableVoices,e=>{var t;e.length>0&&!d.value&&(d.value=(t=e[0])?.id||``)},{immediate:!0});async function f(){if(!(!i.value.trim()&&!l.value||l.value&&!u.value.trim()||!d.value)){a.value=!0,s.value=``;try{o.value&&p();let e=l.value?u.value:i.value,t=await n.generateSpeech(e,d.value,l.value);o.value=URL.createObjectURL(new Blob([t])),setTimeout(()=>{c.value&&c.value.play()},100)}catch(e){console.error(`Error generating speech:`,e),s.value=e instanceof Error?e.message:`An unknown error occurred`}finally{a.value=!1}}}function p(){c.value&&(c.value.pause(),c.value.currentTime=0),o.value&&(URL.revokeObjectURL(o.value),o.value=``)}return Zt(()=>{o.value&&URL.revokeObjectURL(o.value)}),t({testText:i,ssmlText:u,useSSML:l,selectedVoice:d,isGenerating:a,audioUrl:o,errorMessage:s,audioPlayer:c,generateTestSpeech:f,stopTestAudio:p}),(t,n)=>(U(),V(`div`,Dy,[B(`h2`,Oy,[B(`div`,ky,[Mt(G(_a)),B(`div`,null,un(G(r)(`settings.pages.providers.provider.elevenlabs.playground.title`)),1)])]),B(`div`,Ay,[Mt(G(Gn),{modelValue:l.value,"onUpdate:modelValue":n[0]||=e=>l.value=e,label:G(r)(`settings.pages.modules.speech.sections.section.voice-settings.use-ssml.label`),description:G(r)(`settings.pages.modules.speech.sections.section.voice-settings.use-ssml.description`)},null,8,[`modelValue`,`label`,`description`]),l.value?Pn((U(),V(`textarea`,{key:1,"onUpdate:modelValue":n[2]||=e=>u.value=e,placeholder:G(r)(`settings.pages.modules.speech.sections.section.voice-settings.input-ssml.placeholder`),border:`neutral-100 dark:neutral-800 solid 2 focus:neutral-200 dark:focus:neutral-700`,transition:`all duration-250 ease-in-out`,bg:`neutral-100 dark:neutral-800 focus:neutral-50 dark:focus:neutral-900`,"h-48":``,"w-full":``,"rounded-lg":``,"px-3":``,"py-2":``,"text-sm":``,"font-mono":``,"outline-none":``},null,8,My)),[[kn,u.value]]):Pn((U(),V(`textarea`,{key:0,"onUpdate:modelValue":n[1]||=e=>i.value=e,placeholder:G(r)(`settings.pages.providers.provider.elevenlabs.playground.fields.field.input.placeholder`),border:`neutral-100 dark:neutral-800 solid 2 focus:neutral-200 dark:focus:neutral-700`,transition:`all duration-250 ease-in-out`,bg:`neutral-100 dark:neutral-800 focus:neutral-50 dark:focus:neutral-900`,"h-24":``,"w-full":``,"rounded-lg":``,"px-3":``,"py-2":``,"text-sm":``,"outline-none":``},null,8,jy)),[[kn,i.value]]),B(`div`,Ny,[B(`label`,Py,[B(`div`,null,[B(`div`,Fy,un(G(r)(`settings.pages.providers.provider.elevenlabs.playground.fields.field.voice.label`)),1),B(`div`,Iy,un(G(r)(`settings.pages.providers.provider.elevenlabs.playground.fields.field.voice.description`)),1)]),Pn(B(`select`,{"onUpdate:modelValue":n[3]||=e=>d.value=e,border:`neutral-300 dark:neutral-800 solid 2 focus:neutral-400 dark:focus:neutral-600`,transition:`border duration-250 ease-in-out`,"w-full":``,"rounded-lg":``,"px-2":``,"py-1":``,"text-nowrap":``,"text-sm":``,"outline-none":``},[(U(!0),V(P,null,tn(e.availableVoices,e=>(U(),V(`option`,{key:e.id,value:e.id},un(e.name),9,Ly))),128))],512),[[On,d.value]])])]),B(`div`,Ry,[B(`button`,{border:`neutral-800 dark:neutral-200 solid 2`,transition:`border duration-250 ease-in-out`,"rounded-lg":``,"px-4":``,text:`neutral-100 dark:neutral-900`,"py-2":``,"text-sm":``,disabled:a.value||!i.value.trim()&&!l.value||l.value&&!u.value.trim()||!d.value||!e.apiKeyConfigured,class:Gt({"opacity-50 cursor-not-allowed":a.value||!i.value.trim()&&!l.value||l.value&&!u.value.trim()||!d.value||!e.apiKeyConfigured}),bg:`neutral-700 dark:neutral-300`,onClick:f},[B(`div`,By,[n[4]||=B(`div`,{"i-solar:play-circle-bold-duotone":``},null,-1),B(`span`,null,un(a.value?G(r)(`settings.pages.providers.provider.elevenlabs.playground.buttons.button.test-voice.generating`):G(r)(`settings.pages.providers.provider.elevenlabs.playground.buttons.button.test-voice.label`)),1)])],10,zy),o.value?(U(),V(`button`,{key:0,border:`primary-300 dark:primary-800 solid 2`,transition:`border duration-250 ease-in-out`,"rounded-lg":``,"px-4":``,"py-2":``,"text-sm":``,onClick:p},[B(`div`,Vy,[n[5]||=B(`div`,{"i-solar:stop-circle-bold-duotone":``},null,-1),B(`span`,null,un(G(r)(`settings.pages.modules.speech.sections.section.playground.buttons.stop.label`)),1)])])):At(``,!0)]),e.apiKeyConfigured?At(``,!0):(U(),V(`div`,Hy,un(G(r)(`settings.pages.providers.provider.elevenlabs.playground.validation.error-missing-api-key`)),1)),d.value?At(``,!0):(U(),V(`div`,Uy,un(G(r)(`settings.pages.modules.speech.sections.section.playground.select-voice.required`)),1)),s.value?(U(),V(`div`,Wy,un(s.value),1)):At(``,!0),o.value?(U(),V(`audio`,{key:5,ref_key:`audioPlayer`,ref:c,src:o.value,controls:``,class:`mt-2 w-full`},null,8,Gy)):At(``,!0)]),nn(t.$slots,`default`)]))}}),qy=Ky;const Jy={flex:`~ col md:row gap-6`},Yy={flex:`~ col gap-6`},Xy={class:`text-lg text-neutral-500 md:text-2xl dark:text-neutral-400`},Zy={flex:`~ col gap-4`},Qy={flex:`~ col gap-6`,class:`w-full md:w-[60%]`},$y={"w-full":``,"rounded-xl":``};var eb=H({__name:`SpeechProviderSettings`,props:{providerId:null,defaultModel:null,additionalSettings:null},setup(e){let t=e,{t:n}=bn(),r=Sn(),i=Bn(),a=Hn(),{providers:o}=ln(i),s=Ot(()=>i.getProviderMetadata(t.providerId)),c=Ot({get:()=>{var e;return(e=o.value[t.providerId])?.apiKey||``},set:e=>{o.value[t.providerId]||(o.value[t.providerId]={}),o.value[t.providerId].apiKey=e}}),l=Ot({get:()=>{var e,n,r;return(e=o.value[t.providerId])?.baseUrl||((n=s.value)==null||(r=n.defaultOptions)==null?void 0:r.call(n).baseUrl)||``},set:e=>{o.value[t.providerId]||(o.value[t.providerId]={}),o.value[t.providerId].baseUrl=e}}),u=W(`Hello! This is a test of voice synthesis.`),d=W(!1),f=W(``),p=W(``),m=W(null),h=W(!1),g=W(``),_=W(``),v=W({});function y(){var e;(e=o.value[t.providerId])?.voiceSettings?v.value={...o.value[t.providerId].voiceSettings}:v.value={pitch:0,speed:1,volume:0,...t.additionalSettings}}Yt(()=>{var e,n,r,u;i.initializeProvider(t.providerId),c.value=(e=o.value[t.providerId])?.apiKey||``,l.value=(n=o.value[t.providerId])?.baseUrl||((r=s.value)==null||(u=r.defaultOptions)==null?void 0:u.call(r).baseUrl)||``,y(),i.configuredProviders[t.providerId]&&a.loadVoicesForProvider(t.providerId)});let b=vn(()=>{var e,n;o.value[t.providerId]={...o.value[t.providerId],apiKey:c.value,baseUrl:l.value||((e=s.value)==null||(n=e.defaultOptions)==null?void 0:n.call(e).baseUrl)||``,voiceSettings:{...v.value}}},1e3);K([c,l],b),K(v,b,{deep:!0});async function x(){if(!u.value.trim()&&!h.value||h.value&&!g.value.trim())return;let e=i.getProviderInstance(t.providerId);if(!e){console.error(`Failed to initialize speech provider`);return}if(!_.value){console.error(`No active speech voice selected`);return}d.value=!0,p.value=``;try{f.value&&S();let n=t.defaultModel||`default`,r=h.value?g.value:u.value,i=await Ln({...e.speech(n,{voiceSettings:v.value}),input:r,voice:_.value});f.value=URL.createObjectURL(new Blob([i])),setTimeout(()=>{m.value&&m.value.play()},100)}catch(e){console.error(`Error generating speech:`,e),p.value=e instanceof Error?e.message:`An unknown error occurred`}finally{d.value=!1}}function S(){m.value&&(m.value.pause(),m.value.currentTime=0),f.value&&(URL.revokeObjectURL(f.value),f.value=``)}Zt(()=>{f.value&&URL.revokeObjectURL(f.value)});function C(){var e,t;v.value={...((e=s.value)==null||(t=e.defaultOptions)==null?void 0:t.call(e).voiceSettings)||{}},b()}function w(e,t){v.value[e]=t}let T=Ot(()=>({voiceSettings:v.value,updateVoiceSettings:w,isGenerating:d.value,testText:u.value,useSSML:h.value,ssmlText:g.value,generateTestSpeech:x,stopTestAudio:S,audioUrl:f.value,audioPlayer:m.value,errorMessage:p.value}));return(e,t)=>{var i,a;return U(),kt(Cy,{"provider-name":(i=s.value)?.localizedName,"provider-icon":(a=s.value)?.icon,"on-back":()=>G(r).back()},{default:Nn(()=>[B(`div`,Jy,[Mt(G(by),{class:`w-full md:w-[40%]`},{default:Nn(()=>[Mt(G(_y),{title:G(n)(`settings.pages.providers.common.section.basic.title`),description:G(n)(`settings.pages.providers.common.section.basic.description`),"on-reset":C},{default:Nn(()=>{var n;return[Mt(G(ly),{modelValue:c.value,"onUpdate:modelValue":t[0]||=e=>c.value=e,"provider-name":(n=s.value)?.localizedName,placeholder:`sk-`},null,8,[`modelValue`,`provider-name`]),nn(e.$slots,`basic-settings`)]}),_:3},8,[`title`,`description`]),B(`div`,Yy,[B(`h2`,Xy,un(G(n)(`settings.pages.providers.common.section.voice.title`)),1),B(`div`,Zy,[nn(e.$slots,`voice-settings`,Kt(Rt(T.value)))])]),Mt(G(sy),{title:G(n)(`settings.pages.providers.common.section.advanced.title`)},{default:Nn(()=>{var n,r;return[Mt(G(dy),{modelValue:l.value,"onUpdate:modelValue":t[1]||=e=>l.value=e,placeholder:((n=s.value)==null||(r=n.defaultOptions)==null?void 0:r.call(n).baseUrl)||``,required:``},null,8,[`modelValue`,`placeholder`]),nn(e.$slots,`advanced-settings`)]}),_:3},8,[`title`])]),_:3}),B(`div`,Qy,[B(`div`,$y,[nn(e.$slots,`playground`,Kt(Rt(T.value)))])])])]),_:3},8,[`provider-name`,`provider-icon`,`on-back`])}}}),tb=eb,nb=H({__name:`Screen`,setup(e){let t=W(),n=gn(Dt),{width:r,height:i}=Tn(),a=yn(t,{immediate:!0,windowResize:!0,reset:!0}),o=Ot(()=>n.between(`sm`,`md`).value||n.smaller(`sm`).value),s=Ot(()=>n.between(`md`,`lg`).value),c=Ot(()=>n.greaterOrEqual(`lg`).value),l=Ot(()=>c.value?a.width.value:o.value||s.value?r.value-16:a.width.value),u=W(0);return K([r,i,t],()=>{var e;let n=(e=t.value)==null||(e=e.parentElement)==null?void 0:e.getBoundingClientRect();c.value||o.value||s.value?u.value=n?.height||0:u.value=600}),K([a.width,a.height],()=>{c.value||o.value||s.value?u.value=a.height.value:u.value=600}),Yt(async()=>{t.value&&a.update()}),(e,n)=>(U(),V(`div`,{ref_key:`containerRef`,ref:t,"h-full":``,"w-full":``},[nn(e.$slots,`default`,{width:l.value,height:u.value})],512))}}),rb=nb,ib=bt((exports,t)=>{ +`,F_=function(e){j_(t,e);function t(n){var r=this,i=Object.assign(t.defaults,n),a=i.maxKernelSize,o=M_(i,[`maxKernelSize`]);return r=e.call(this,N_,P_.replace("${maxKernelSize}",a.toFixed(1)))||this,Object.assign(r,o),r}return Object.defineProperty(t.prototype,`center`,{get:function(){return this.uniforms.uCenter},set:function(e){this.uniforms.uCenter=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`strength`,{get:function(){return this.uniforms.uStrength},set:function(e){this.uniforms.uStrength=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`innerRadius`,{get:function(){return this.uniforms.uInnerRadius},set:function(e){this.uniforms.uInnerRadius=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`radius`,{get:function(){return this.uniforms.uRadius},set:function(e){(e<0||e===1/0)&&(e=-1),this.uniforms.uRadius=e},enumerable:!1,configurable:!0}),t.defaults={strength:.1,center:[0,0],innerRadius:0,radius:-1,maxKernelSize:32},t}(_l);function I_(){let e=-1,t,n=-1;function r(r,i){(i>=e||i({x:0,y:0})},disableFocusAt:{type:Boolean,default:!1}},emits:[`modelLoaded`],setup(e,{expose:t,emit:n}){let r=e,i=n,a=fn(()=>r.app),o=fn(()=>r.paused),s=fn(()=>r.focusAt),c=W(),l=W(0),u=W(0),d=Ot(()=>Math.max(0,Math.min(100,r.mouthOpenSize))),f=_n(),p=gn(Dt),m=Ot(()=>p.between(`sm`,`md`).value||p.smaller(`sm`).value),h=I_(),g=sn(new $h({alpha:.2,blur:0,distance:20,rotation:45}));function _(){return c.value.internalModel.coreModel}function v(e){if(!e.value)return;let t=2.2;m.value&&(t=2.2);let n=r.height*.95/u.value*t,i=r.width*.95/l.value*t,a=Math.min(n,i);e.value.scale.set(a,a)}let{live2dModelFile:y,loadingLive2dModel:b,live2dCurrentMotion:x,availableLive2dMotions:S,live2dLoadSource:C,live2dModelUrl:w,themeColorsHue:T,themeColorsHueDynamic:E}=ln(Cn()),D=W({group:`Idle`,index:0});async function O(){var e;if(!a.value)return;c.value&&(a.value.stage.removeChild(c.value),c.value.destroy(),c.value=void 0);let t=new Wp;C.value===`file`?await Ip.setupLive2DModel(t,[y.value],{autoInteract:!1}):C.value===`url`&&await Ip.setupLive2DModel(t,w.value,{autoInteract:!1}),c.value=t,a.value.stage.addChild(c.value),l.value=c.value.width,u.value=c.value.height,c.value.x=r.width/2,c.value.y=r.height,c.value.anchor.set(.5,.5),v(c),c.value.on(`hit`,e=>{c.value&&e.includes(`body`)&&c.value.motion(`tap_body`)});let n=c.value.internalModel,o=n.coreModel,s=n.motionManager;o.setParameterValueById(`ParamMouthOpenY`,d.value),S.value=Object.entries(s.definitions).flatMap(([e,t])=>t?t.map((t,n)=>({motionName:e,motionIndex:n,fileName:t.File})):[]).filter(Boolean),s.groups.idle&&(e=s.motionGroups[s.groups.idle])?.forEach(e=>{e._motionData.curves.forEach(e=>{(e.id===`ParamEyeBallX`||e.id===`ParamEyeBallY`)&&(e.id=`_${e.id}`)})});let f=s.update;s.update=function(e,t){return f?.call(this,e,t),s.state.currentGroup===s.groups.idle&&h.update(n,t),!0},s.on(`motionStart`,(e,t)=>{D.value={group:e,index:t}}),y.value&&await L_.default.setItem(`live2dModel`,y.value),i(`modelLoaded`),b.value=!1}async function k(){if(!a.value)return;Wp.registerTicker(ns),Qo.add(rs),Qo.add(_m);let e=await L_.default.getItem(`live2dModel`);if(e){y.value=e,C.value=`file`,b.value=!0;return}if(w.value){C.value=`url`,b.value=!0;return}b.value=!1}async function A(e,t){await c.value.motion(e,t,pp.FORCE)}let j=vn(()=>{c.value&&(c.value.x=r.width/2,c.value.y=r.height,v(c))},100),M=W(),N=W(0);function ee(){if(c.value){let e=getComputedStyle(M.value).backgroundColor;g.value.color=Number(Ft(e).replace(`#`,`0x`)),c.value.filters=[g.value]}}K([()=>r.width,()=>r.height],()=>j()),K(f,ee,{immediate:!0}),K([c,T],ee);function F(){ee(),N.value=requestAnimationFrame(F)}K(E,()=>{E.value?N.value=requestAnimationFrame(F):(cancelAnimationFrame(N.value),N.value=0)},{immediate:!0}),K(d,e=>_().setParameterValueById(`ParamMouthOpenY`,e)),K(a,k),K(x,e=>A(e.group,e.index)),K(o,e=>{var t,n;return e?(t=a.value)?.stop():(n=a.value)?.start()}),K(s,e=>{c.value&&(r.disableFocusAt||c.value.focus(e.x,e.y))}),An(b,e=>{e&&O()},{debounce:1e3}),Yt(ee),Zt(()=>{var e;cancelAnimationFrame(N.value),c.value&&(e=a.value)?.stage.removeChild(c.value)});function I(){return S.value}return t({setMotion:A,listMotionGroups:I}),(e,t)=>(U(),V(P,null,[B(`div`,{ref_key:`dropShadowColorComputer`,ref:M,hidden:``,bg:`primary-400 dark:primary-500`},null,512),nn(e.$slots,`default`)],64))}}),z_=R_;const B_={"z-1":``,"flex-1":``},V_={"text-lg":``,"font-normal":``,class:`menu-icon-item-title`,transition:`all ease-in-out duration-400`},H_={text:`sm neutral-500 dark:neutral-400`,class:`menu-icon-item-description`,transition:`all ease-in-out duration-400`};var U_=H({__name:`IconItem`,props:{title:null,description:null,icon:null,iconTemplate:{type:Boolean},to:null},setup(e){return(t,n)=>{let r=rn(`RouterLink`);return U(),kt(r,{box:`border`,flex:`~ row`,bg:`neutral-50 dark:neutral-900`,border:`neutral-100 dark:neutral-800/25 hover:primary-500/30 dark:hover:primary-400/30 solid 2`,"drop-shadow":`none hover:[0px_4px_4px_rgba(220,220,220,0.4)] active:[0px_0px_0px_rgba(220,220,220,0.25)] dark:hover:none`,class:`menu-icon-item`,transition:`all ease-in-out duration-400`,relative:``,"w-full":``,"items-center":``,"overflow-hidden":``,"rounded-lg":``,"p-5":``,"text-left":``,cursor:`pointer`,to:e.to},{default:Nn(()=>[B(`div`,B_,[B(`div`,V_,un(e.title),1),B(`div`,H_,[B(`span`,null,un(e.description),1)])]),typeof e.icon==`string`?(U(),V(`div`,{key:0,class:Gt([`menu-icon-item-icon`,[e.icon]]),transition:`all ease-in-out duration-400`,absolute:``,"right-0":``,"size-24":``,"translate-y-4":``,text:`neutral-400/50 dark:neutral-600/50`},null,2)):At(``,!0),e.iconTemplate?nn(t.$slots,`icon`,{key:1},void 0,!0):At(``,!0)]),_:3},8,[`to`])}}}),W_=St(U_,[[`__scopeId`,`data-v-c0e4998c`]]);const G_={flex:`~ col`,bg:`neutral-50 dark:neutral-800`,border:`neutral-100 dark:neutral-800/25 hover:primary-500/30 dark:hover:primary-400/30 solid 2`,"drop-shadow":`none hover:[0px_4px_4px_rgba(220,220,220,0.4)] active:[0px_0px_0px_rgba(220,220,220,0.25)] dark:hover:none`,class:`menu-icon-status-item`,transition:`all ease-in-out duration-400`,"w-full":``,"cursor-pointer":``,"of-hidden":``,"rounded-xl":``},K_={"z-1":``,"flex-1":``},q_={"text-lg":``,"font-normal":``,class:`menu-icon-status-item-title`,transition:`all ease-in-out duration-400`},J_={text:`sm neutral-500 dark:neutral-400`,class:`menu-icon-status-item-description`,transition:`all ease-in-out duration-400`},Y_=[`src`],X_={"p-2":``},Z_={key:0,"size-3":``,bg:`green-500 dark:green-600`,"rounded-full":``},Q_={key:1,"size-3":``,bg:`neutral-400 dark:neutral-500`,"rounded-full":``};var $_=H({__name:`IconStatusItem`,props:{title:null,description:null,icon:null,iconColor:null,iconImage:null,to:null,configured:{type:Boolean}},setup(e){let t=e;return(e,n)=>{let r=rn(`RouterLink`);return U(),V(`div`,G_,[Mt(r,{flex:`~ row`,class:`menu-icon-status-item-link`,bg:`white dark:neutral-900`,transition:`all ease-in-out duration-400`,relative:``,"h-full":``,"w-full":``,"items-center":``,"overflow-hidden":``,"rounded-lg":``,"p-5":``,"text-left":``,to:t.to},{default:Nn(()=>[B(`div`,K_,[B(`div`,q_,un(t.title),1),B(`div`,J_,[B(`span`,null,un(t.description||``),1)])]),t.icon?(U(),V(`div`,{key:0,class:Gt([`menu-icon-status-item-icon`,[t.icon]]),transition:`all ease-in-out duration-400`,absolute:``,"right-0":``,"size-16":``,"translate-y-2":``,text:`neutral-400/50 dark:neutral-600/50`,"grayscale-100":``},null,2)):At(``,!0),t.iconColor?(U(),V(`div`,{key:1,class:Gt([`menu-icon-status-item-icon-color`,[t.iconColor]]),transition:`all ease-in-out duration-400`,absolute:``,"right-0":``,"size-16":``,"translate-y-2":``,text:`neutral-400/50 dark:neutral-600/50`,"grayscale-100":``},null,2)):At(``,!0),t.iconImage?(U(),V(`img`,{key:2,src:t.iconImage,class:`menu-icon-status-item-icon-image`,transition:`all ease-in-out duration-400`,absolute:``,"right-0":``,"size-16":``,"translate-y-2":``,"grayscale-100":``},null,8,Y_)):At(``,!0)]),_:1},8,[`to`]),B(`div`,X_,[t.configured?(U(),V(`div`,Z_)):(U(),V(`div`,Q_))])])}}}),ev=St($_,[[`__scopeId`,`data-v-03028e15`]]);const tv=[`checked`,`name`,`value`],nv={class:`relative mr-3 mt-0.5 flex-shrink-0`},rv={class:`w-full flex flex-col gap-2`},iv={class:`flex items-center`},av={key:0,class:`relative`},ov=[`title`],sv={key:1,class:`mt-2`};var cv=H({__name:`RadioCardDetail`,props:Ht({id:null,name:null,value:null,title:null,description:null,deprecated:{type:Boolean,default:!1},showExpandCollapse:{type:Boolean,default:!0},expandCollapseThreshold:{default:100},customInputValue:{default:``},customInputPlaceholder:{default:``},showCustomInput:{type:Boolean,default:!1}},{modelValue:{required:!0},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let t=xn(e,`modelValue`),n=W(!1);function r(){n.value=!n.value}return(i,a)=>(U(),V(`label`,{key:e.id,class:Gt([`form_radio-card-detail relative flex cursor-pointer items-start rounded-xl p-3 pr-[20px]`,[t.value===e.value?`bg-primary-50 dark:bg-primary-900/20 border-primary-100 dark:border-primary-900 hover:border-primary-500/30 dark:hover:border-primary-400/30`:`bg-white dark:bg-neutral-900/20 border-neutral-100 dark:border-neutral-900 hover:border-primary-500/30 dark:hover:border-primary-400/30`,t.value===e.value?`form_radio-card-detail-active`:``,e.deprecated?`opacity-60`:``]]),transition:`all duration-200 ease-in-out`,border:`2 solid`},[Pn(B(`input`,{"onUpdate:modelValue":a[0]||=e=>t.value=e,checked:t.value===e.value,type:`radio`,name:e.name,value:e.value,class:`absolute opacity-0`},null,8,tv),[[Dn,t.value]]),B(`div`,nv,[B(`div`,{class:Gt([`size-5 border-2 rounded-full transition-colors duration-200`,[t.value===e.value?`border-primary-500 dark:border-primary-400`:`border-neutral-300 dark:border-neutral-600`]])},[B(`div`,{class:Gt([`absolute left-1/2 top-1/2 size-3 rounded-full transition-opacity duration-200 -translate-x-1/2 -translate-y-1/2`,[t.value===e.value?`opacity-100 bg-primary-500 dark:bg-primary-400`:`opacity-0`]])},null,2)],2)]),B(`div`,rv,[B(`div`,iv,[B(`span`,{class:Gt([`line-clamp-1 font-normal`,[t.value===e.value?`text-neutral-700 dark:text-neutral-300`:`text-neutral-700 dark:text-neutral-400`]])},un(e.title),3)]),e.description?(U(),V(`div`,av,[Mt(G(Wn),null,{default:Nn(()=>[!n.value||!e.showExpandCollapse?(U(),V(`div`,{key:0,class:Gt([`line-clamp-2 cursor-pointer text-xs`,[t.value===e.value?`text-neutral-600 dark:text-neutral-400`:`text-neutral-500 dark:text-neutral-500`]]),title:e.description,onClick:Fn(r,[`prevent`])},un(e.description),11,ov)):(U(),V(`div`,{key:1,class:Gt([`cursor-pointer text-xs`,[t.value===e.value?`text-neutral-600 dark:text-neutral-400`:`text-neutral-500 dark:text-neutral-500`]]),onClick:Fn(r,[`prevent`])},un(e.description),3))]),_:1}),e.showExpandCollapse&&e.description.length>e.expandCollapseThreshold?(U(),V(`button`,{key:0,class:`mt-0.5 inline-flex items-center text-xs text-primary-500 dark:text-primary-600`,onClick:Fn(r,[`prevent`])},[B(`span`,null,un(n.value?`Show less`:`Show more`),1),B(`div`,{class:Gt([{"rotate-180":n.value},`transition-transform duration-200`])},a[2]||=[B(`div`,{"i-solar:alt-arrow-down-bold-duotone":``,"ml-0.5":``,"text-xs":``},null,-1)],2)])):At(``,!0)])):At(``,!0),e.showCustomInput&&t.value===e.value?(U(),V(`div`,sv,[Mt(G(qn),{modelValue:t.value,"onUpdate:modelValue":a[1]||=e=>t.value=e,type:`text`,class:`w-full border border-neutral-300 rounded bg-white px-2 py-1 text-sm dark:border-neutral-700 dark:bg-neutral-900`,placeholder:e.customInputPlaceholder},null,8,[`modelValue`,`placeholder`])])):At(``,!0)])],2))}}),lv=St(cv,[[`__scopeId`,`data-v-603e520f`]]);const uv={class:`radio-card-detail-many-select`},dv={key:0,class:`relative`,"inline-flex":`~`,"w-full":``,"items-center":``},fv=[`placeholder`],pv={class:`mt-4 space-y-2`},mv={key:0,class:`text-sm text-neutral-500 dark:text-neutral-400`},hv={key:1,class:`flex items-center gap-3 border border-2 border-amber-200 rounded-xl bg-amber-50 p-4 dark:border-amber-800 dark:bg-amber-900/20`},gv={class:`flex flex-col`},_v={class:`font-medium`},vv={class:`text-sm text-amber-600 dark:text-amber-400`},yv={class:`relative`};var bv=H({__name:`RadioCardManySelect`,props:Ht({items:null,searchable:{type:Boolean,default:!0},searchPlaceholder:{default:`Search...`},searchNoResultsTitle:{default:`No results found`},searchNoResultsDescription:{default:`Try a different search term`},searchResultsText:{default:`{count} of {total} results`},customInputPlaceholder:{default:`Enter custom value`},expandButtonText:{default:`Show more`},collapseButtonText:{default:`Show less`},showMore:{type:Boolean,default:!0}},{modelValue:{required:!0},modelModifiers:{}}),emits:Ht([`update:customValue`],[`update:modelValue`]),setup(e,{emit:t}){let n=e,r=t,i=xn(e,`modelValue`),a=W(``),o=W(!1),s=W(``),c=Ot(()=>{if(!a.value)return n.items;let e=a.value.toLowerCase();return n.items.filter(t=>t.name.toLowerCase().includes(e)||t.description&&t.description.toLowerCase().includes(e))});function l(e){s.value=e,r(`update:customValue`,e)}return(t,n)=>(U(),V(`div`,uv,[e.searchable?(U(),V(`div`,dv,[n[4]||=B(`div`,{class:`pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3`},[B(`div`,{"i-solar:magnifer-line-duotone":``,class:`text-neutral-500 dark:text-neutral-400`})],-1),Pn(B(`input`,{"onUpdate:modelValue":n[0]||=e=>a.value=e,type:`search`,class:`w-full rounded-xl p-2.5 pl-10 text-sm outline-none`,border:`focus:primary-100 dark:focus:primary-400/50 2 solid neutral-200 dark:neutral-800`,transition:`all duration-200 ease-in-out`,bg:`white dark:neutral-900`,placeholder:e.searchPlaceholder},null,8,fv),[[kn,a.value]])])):At(``,!0),B(`div`,pv,[a.value?(U(),V(`div`,mv,un(e.searchResultsText.replace(`{count}`,c.value.length.toString()).replace(`{total}`,e.items.length.toString())),1)):At(``,!0),a.value&&c.value.length===0?(U(),V(`div`,hv,[n[5]||=B(`div`,{"i-solar:info-circle-line-duotone":``,class:`text-2xl text-amber-500 dark:text-amber-400`},null,-1),B(`div`,gv,[B(`span`,_v,un(e.searchNoResultsTitle),1),B(`span`,vv,un(e.searchNoResultsDescription.replace(`{query}`,a.value)),1)])])):At(``,!0),B(`div`,yv,[B(`div`,{class:Gt([`grid auto-cols-[350px] grid-flow-col max-h-[calc(100dvh-7lh)] gap-4 overflow-x-auto pb-4 scrollbar-none`,[o.value?`grid-cols-1 md:grid-cols-2 grid-flow-row auto-cols-auto`:``]]),transition:`all duration-200 ease-in-out`,style:{"scroll-snap-type":`x mandatory`}},[(U(!0),V(P,null,tn(c.value,t=>(U(),kt(lv,{id:t.id,key:t.id,modelValue:i.value,"onUpdate:modelValue":n[1]||=e=>i.value=e,value:t.id,title:t.name,description:t.description,deprecated:t.deprecated,"show-expand-collapse":e.showMore,"expand-collapse-threshold":100,"show-custom-input":t.customizable,"custom-input-value":s.value,"custom-input-placeholder":e.customInputPlaceholder,name:`radio-card-detail-many-select`,class:`scroll-snap-align-start`,"onUpdate:customInputValue":n[2]||=e=>l(e)},null,8,[`id`,`modelValue`,`value`,`title`,`description`,`deprecated`,`show-expand-collapse`,`show-custom-input`,`custom-input-value`,`custom-input-placeholder`]))),128))],2),B(`div`,{bg:`neutral-100 dark:[rgba(0,0,0,0.3)]`,"rounded-xl":``,class:Gt([o.value?`w-full`:`mt-4 w-full rounded-lg`])},[B(`button`,{"w-full":``,flex:``,"items-center":``,"justify-center":``,"gap-2":``,"rounded-lg":``,"py-2":``,transition:`all duration-200 ease-in-out`,class:Gt([o.value?`bg-primary-500 hover:bg-primary-600 text-white`:`bg-white dark:bg-neutral-900 hover:bg-neutral-100 dark:hover:bg-neutral-800`]),onClick:n[3]||=e=>o.value=!o.value},[B(`span`,null,un(o.value?e.collapseButtonText:e.expandButtonText),1),B(`div`,{class:Gt([o.value?`rotate-180`:``,`text-lg`]),"i-solar:alt-arrow-down-bold-duotone":``,transition:`transform duration-200 ease-in-out`},null,2)],2)],2)])])]))}}),xv=St(bv,[[`__scopeId`,`data-v-7ad6d626`]]);const Sv=[`checked`,`name`,`value`],Cv={flex:`~ col`,"min-h-16":``,"w-full":``,"items-start":``,"justify-center":``,"pb-2":``,"pl-5":``,"pr-4":``,"pt-2":``};var wv=H({__name:`RadioCardSimple`,props:Ht({id:null,name:null,value:null,title:null,description:null},{modelValue:{required:!0},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let t=xn(e,`modelValue`);return(n,r)=>(U(),V(`label`,{key:e.id,border:`2px solid`,class:Gt([`form_radio-card-simple relative`,[t.value===e.value?`bg-primary-50 dark:bg-primary-900/20 border-primary-100 dark:border-primary-900 hover:border-primary-500/30 dark:hover:border-primary-400/30`:`bg-white dark:bg-neutral-900/20 border-neutral-100 dark:border-neutral-900 hover:border-primary-500/30 dark:hover:border-primary-400/30`,t.value===e.value?`form_radio-card-simple-active`:``]]),transition:`all duration-200 ease-in-out`,flex:`~ col`,block:``,"min-w-50":``,"w-fit":``,"cursor-pointer":``,"items-start":``,"rounded-xl":``,"p-4":``,"text-left":``},[Pn(B(`input`,{"onUpdate:modelValue":r[0]||=e=>t.value=e,checked:t.value===e.value,type:`radio`,name:e.name,value:e.value,class:`absolute opacity-0 [&:checked+div]:border-primary-500 [&:checked+div_.radio-dot]:opacity-100 dark:[&:checked+div]:border-primary-400`},null,8,Sv),[[Dn,t.value]]),r[1]||=B(`div`,{class:`radio-circle absolute left-2 top-2 size-5 rounded-full`,border:`2 solid neutral-300 dark:neutral-600`,transition:`all duration-200 ease-in-out`},[B(`div`,{class:`radio-dot absolute left-1/2 top-1/2 size-3 rounded-full opacity-0 -translate-x-1/2 -translate-y-1/2`,transition:`all duration-200 ease-in-out`,bg:`primary-500 dark:primary-400`})],-1),B(`div`,Cv,[B(`span`,{class:Gt([`radio-item-name font-normal`,[t.value===e.value?`text-neutral-700 dark:text-neutral-300`:`text-neutral-500 dark:text-neutral-500`]]),text:`md`,transition:`all duration-200 ease-in-out`},un(e.title),3),e.description?(U(),V(`span`,{key:0,class:Gt([`radio-item-description`,[t.value===e.value?`text-neutral-600 dark:text-neutral-400`:`text-neutral-400 dark:text-neutral-600`]]),transition:`all duration-200 ease-in-out`},un(e.description),3)):At(``,!0)]),r[2]||=B(`div`,{class:`bg-dotted-neutral-200/80 dark:bg-dotted-neutral-700/50 [input:checked~&]:bg-dotted-primary-300/50 dark:[input:checked~&]:bg-dotted-primary-200/20`,absolute:``,"inset-0":``,"z--1":``,style:{"background-size":`10px 10px`,"mask-image":`linear-gradient(165deg, white 30%, transparent 50%)`}},null,-1)],2))}}),Tv=St(wv,[[`__scopeId`,`data-v-0df44f43`]]);const Ev={class:`p-3`},Dv={class:`flex items-start`},Ov=[`checked`,`name`,`value`],kv={class:`relative mr-3 mt-0.5 flex-shrink-0`},Av={key:0,class:`i-solar:pause-circle-bold-duotone text-xl text-neutral-400 dark:text-neutral-500`},jv={key:1,class:`i-solar:play-circle-bold-duotone text-xl text-neutral-400 dark:text-neutral-500`},Mv={key:1,class:`mt-auto w-full flex items-center justify-center bg-neutral-50 py-3 text-xs text-neutral-400 italic dark:bg-neutral-800/50 dark:text-neutral-600`},Nv={class:`flex-1 cursor-pointer`},Pv={class:`flex items-center`},Fv={key:0,class:`mt-1 flex flex-wrap gap-1`},Iv={key:1,class:`mt-3`},Lv={relative:``},Rv={key:0,class:`h-16 px-3 pb-2`};var zv=H({__name:`VoiceCard`,props:Ht({name:null,voice:null,currentlyPlayingId:null,customInputPlaceholder:{default:`Enter custom voice name`},showVisualizer:{type:Boolean,default:!0},audioStream:{default:null}},{"voice-id":{required:!1,default:``},"voice-idModifiers":{},"custom-voice-name":{required:!1,default:``},"custom-voice-nameModifiers":{}}),emits:Ht([`togglePlayback`],[`update:voice-id`,`update:custom-voice-name`]),setup(e,{emit:t}){let n=e,r=t,i=xn(e,`voice-id`),a=xn(e,`custom-voice-name`);function o(e){return e.previewURL||e.preview_audio_url}function s(e){var t,n,r;let i=[];if((t=e.labels)?.gender&&i.push(e.labels.gender),(n=e.labels)?.age&&i.push(e.labels.age),(r=e.labels)?.accent&&i.push(e.labels.accent),e.languages&&e.languages.length>0){let t=e.languages.map(e=>e.name).join(`, `);i.push(t)}return i}function c(){r(`togglePlayback`,n.voice)}return(t,r)=>(U(),V(`label`,{border:`2px solid`,class:Gt([`scroll-snap-align-start form_voice-card relative flex flex-col overflow-hidden rounded-xl`,[i.value===n.voice.id?`bg-primary-50 dark:bg-primary-900/20 border-primary-100 dark:border-primary-900 hover:border-primary-500/30 dark:hover:border-primary-400/30`:`bg-white dark:bg-neutral-900/20 border-neutral-100 dark:border-neutral-900 hover:border-primary-500/30 dark:hover:border-primary-400/30`,i.value===n.voice.id?`form_voice-card-active`:``]]),transition:`all duration-200 ease-in-out`},[B(`div`,Ev,[B(`div`,Dv,[Pn(B(`input`,{"onUpdate:modelValue":r[0]||=e=>i.value=e,checked:i.value===n.voice.id,type:`radio`,name:e.name,value:n.voice.id,class:`absolute cursor-pointer opacity-0`},null,8,Ov),[[Dn,i.value]]),B(`div`,kv,[B(`div`,{class:Gt([`size-5 border-2 rounded-full transition-colors duration-200`,[i.value===n.voice.id?`border-primary-500 dark:border-primary-400`:`border-neutral-300 dark:border-neutral-600`]])},[B(`div`,{class:Gt([`absolute left-1/2 top-1/2 size-3 rounded-full transition-opacity duration-200 -translate-x-1/2 -translate-y-1/2`,[i.value===n.voice.id?`opacity-100 bg-primary-500 dark:bg-primary-400`:`opacity-0`]])},null,2)],2)]),o(e.voice)?(U(),V(`button`,{key:0,absolute:``,"right-0":``,top:`0`,"z-3":``,class:Gt([`translate-x-[-50%] translate-y-[50%]`,[e.currentlyPlayingId===e.voice.id?`text-white dark:text-white`:``]]),onClick:c},[e.currentlyPlayingId===e.voice.id?(U(),V(`div`,Av)):(U(),V(`div`,jv))],2)):(U(),V(`div`,Mv,` No preview available `)),B(`div`,Nv,[B(`div`,Pv,[B(`span`,{class:Gt([`line-clamp-1 font-medium`,[i.value===e.voice.id?`text-neutral-700 dark:text-neutral-300`:`text-neutral-700 dark:text-neutral-400`]])},un(e.voice.name),3)]),s(e.voice).length>0?(U(),V(`div`,Fv,[(U(!0),V(P,null,tn(s(e.voice),(t,n)=>(U(),V(`span`,{key:n,class:Gt([`inline-flex items-center rounded-md px-1.5 py-0.5 text-xs`,[i.value===e.voice.id?`bg-primary-100 text-primary-700 dark:bg-primary-900/30 dark:text-primary-400`:`bg-neutral-100 text-neutral-700 dark:bg-neutral-800 dark:text-neutral-300`]])},un(t),3))),128))])):At(``,!0),e.voice.customizable&&i.value===e.voice.id?(U(),V(`div`,Iv,[Mt(G(qn),{modelValue:a.value,"onUpdate:modelValue":r[1]||=e=>a.value=e,type:`text`,class:`w-full border border-neutral-300 rounded bg-white px-2 py-1 text-sm dark:border-neutral-700 dark:bg-neutral-900`,placeholder:e.customInputPlaceholder},null,8,[`modelValue`,`placeholder`])])):At(``,!0),e.voice.description?(U(),V(`div`,{key:2,class:Gt([`line-clamp-2 mt-1 text-xs`,[i.value===e.voice.id?`text-neutral-600 dark:text-neutral-400`:`text-neutral-500 dark:text-neutral-500`]])},un(e.voice.description),3)):At(``,!0)])])]),B(`div`,Lv,[Mt(G(Wn),null,{default:Nn(()=>[e.showVisualizer&&e.currentlyPlayingId===e.voice.id&&e.audioStream?(U(),V(`div`,Rv,[Mt(G(aa),{stream:e.audioStream,bars:24,"min-freq":60,"max-freq":4e3},{default:Nn(({frequencies:t})=>[Mt(G(la),{frequencies:t,"bars-class":i.value===e.voice.id?`bg-primary-500 dark:bg-primary-400`:`bg-neutral-400 dark:bg-neutral-600`},null,8,[`frequencies`,`bars-class`])]),_:1},8,[`stream`])])):At(``,!0)]),_:1})])],2))}}),Bv=St(zv,[[`__scopeId`,`data-v-a5ae8da9`]]);const Vv={class:`voice-preview-player`},Hv={key:0,class:`relative`,"inline-flex":`~`,"w-full":``,"items-center":``},Uv=[`placeholder`],Wv={class:`mt-4 space-y-2`},Gv={key:0,class:`text-sm text-neutral-500 dark:text-neutral-400`},Kv={key:1,class:`flex items-center gap-3 border border-2 border-amber-200 rounded-xl bg-amber-50 p-4 dark:border-amber-800 dark:bg-amber-900/20`},qv={class:`flex flex-col`},Jv={class:`font-medium`},Yv={class:`text-sm text-amber-600 dark:text-amber-400`},Xv={class:`relative`};var Zv=H({__name:`VoiceCardManySelect`,props:Ht({voices:null,searchable:{type:Boolean,default:!0},searchPlaceholder:{default:`Search voices...`},searchNoResultsTitle:{default:`No voices found`},searchNoResultsDescription:{default:`Try a different search term`},searchResultsText:{default:`{count} of {total} voices`},customInputPlaceholder:{default:`Enter custom voice name`},expandButtonText:{default:`Show more`},collapseButtonText:{default:`Show less`},playButtonText:{default:`Play sample`},pauseButtonText:{default:`Pause`},showVisualizer:{type:Boolean,default:!0}},{"search-query":{required:!1,default:``},"search-queryModifiers":{},"voice-id":{required:!1,default:``},"voice-idModifiers":{}}),emits:[`update:search-query`,`update:voice-id`],setup(e){let t=e,n=W(!1),r=W(),i=W(new Map),a=W(new Map),o=W(new Map),s=W(new Map),c=W(null);function l(){return c.value||=new(window.AudioContext||window.webkitAudioContext),c.value}let u=xn(e,`search-query`),d=xn(e,`voice-id`),f=Ot(()=>{if(!u.value)return t.voices;let e=u.value.toLowerCase();return t.voices.filter(t=>{let n=t.name.toLowerCase().includes(e),r=t.description&&t.description.toLowerCase().includes(e),i=t.tags&&t.tags.some(t=>t.toLowerCase().includes(e)),a=t.labels&&Object.values(t.labels).some(t=>typeof t==`string`&&t.toLowerCase().includes(e)),o=t.languages&&t.languages.some(t=>t.name.toLowerCase().includes(e)||t.code.toLowerCase().includes(e));return n||r||i||a||o})});function p(e){return e.previewURL||e.preview_audio_url}function m(e){let t=p(e);if(!t)return null;if(i.value.has(e.id))return i.value.get(e.id)||null;let n=new Audio(t);return n.crossOrigin=`anonymous`,n.preload=`auto`,n.addEventListener(`ended`,()=>{if(r.value===e.id){r.value=void 0;let t=a.value.get(e.id);t&&(t.getTracks().forEach(e=>e.stop()),a.value.delete(e.id))}}),i.value.set(e.id,n),n}function h(e,t){try{if(a.value.has(t))return a.value.get(t)||null;let n=l();if(s.value.has(t)){let e=s.value.get(t),r=n.createMediaStreamDestination();e.connect(r);let i=r.stream;return a.value.set(t,i),i}let r=n.createMediaElementSource(e);s.value.set(t,r),r.connect(n.destination);let i=n.createMediaStreamDestination();r.connect(i);let o=i.stream;return a.value.set(t,o),o}catch(e){return console.error(`Failed to create audio stream for visualizer:`,e),null}}function g(e){try{let n=p(e);if(!n)return;let o=m(e);if(!o)return;if(r.value===e.id){o.pause(),r.value=void 0;let t=a.value.get(e.id);t&&(t.getTracks().forEach(e=>e.stop()),a.value.delete(e.id));return}if(r.value){let e=i.value.get(r.value);e&&e.pause();let t=a.value.get(r.value);t&&(t.getTracks().forEach(e=>e.stop()),a.value.delete(r.value))}t.showVisualizer&&!a.value.has(e.id)&&h(o,e.id),o.currentTime=0,o.play().catch(e=>{console.error(`Failed to play audio:`,e)}),r.value=e.id}catch(e){console.error(e),r.value=void 0}}function _(){i.value.forEach(e=>{e.pause(),e.src=``}),i.value.clear(),a.value.forEach(e=>{e.getTracks().forEach(e=>e.stop())}),a.value.clear(),o.value.forEach(e=>{e.state!==`closed`&&e.close()}),o.value.clear(),s.value.clear(),r.value=void 0}K(u,()=>{if(r.value){let e=i.value.get(r.value);e&&e.pause();let t=a.value.get(r.value);t&&(t.getTracks().forEach(e=>e.stop()),a.value.delete(r.value)),r.value=void 0}}),Jt(_);let v=W(``);return(t,i)=>(U(),V(`div`,Vv,[e.searchable?(U(),V(`div`,Hv,[i[4]||=B(`div`,{class:`pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3`},[B(`div`,{"i-solar:magnifer-line-duotone":``,class:`text-neutral-500 dark:text-neutral-400`})],-1),Pn(B(`input`,{"onUpdate:modelValue":i[0]||=e=>u.value=e,type:`search`,class:`w-full rounded-xl p-2.5 pl-10 text-sm outline-none`,border:`focus:primary-100 dark:focus:primary-400/50 2 solid neutral-200 dark:neutral-800`,transition:`all duration-200 ease-in-out`,bg:`white dark:neutral-900`,placeholder:e.searchPlaceholder},null,8,Uv),[[kn,u.value]])])):At(``,!0),B(`div`,Wv,[u.value?(U(),V(`div`,Gv,un(e.searchResultsText.replace(`{count}`,f.value.length.toString()).replace(`{total}`,e.voices.length.toString())),1)):At(``,!0),u.value&&f.value.length===0?(U(),V(`div`,Kv,[i[5]||=B(`div`,{"i-solar:info-circle-line-duotone":``,class:`text-2xl text-amber-500 dark:text-amber-400`},null,-1),B(`div`,qv,[B(`span`,Jv,un(e.searchNoResultsTitle),1),B(`span`,Yv,un(e.searchNoResultsDescription.replace(`{query}`,u.value)),1)])])):At(``,!0),B(`div`,Xv,[B(`div`,{class:Gt([`grid auto-cols-[350px] grid-flow-col max-h-[calc(100dvh-7lh)] gap-4 overflow-x-auto scrollbar-none`,[n.value?`grid-cols-1 md:grid-cols-2 grid-flow-row auto-cols-auto`:``]]),transition:`all duration-200 ease-in-out`,style:{"scroll-snap-type":`x mandatory`}},[(U(!0),V(P,null,tn(f.value,t=>(U(),kt(Bv,{key:t.id,"voice-id":d.value,"onUpdate:voiceId":i[1]||=e=>d.value=e,"custom-voice-name":v.value,"onUpdate:customVoiceName":i[2]||=e=>v.value=e,name:`voice`,voice:t,"currently-playing-id":r.value,"custom-input-placeholder":e.customInputPlaceholder,"show-visualizer":e.showVisualizer,"audio-stream":a.value.get(t.id),onTogglePlayback:g},null,8,[`voice-id`,`custom-voice-name`,`voice`,`currently-playing-id`,`custom-input-placeholder`,`show-visualizer`,`audio-stream`]))),128))],2),B(`div`,{bg:`neutral-100 dark:[rgba(0,0,0,0.3)]`,"rounded-xl":``,class:Gt([n.value?`w-full`:`mt-4 w-full rounded-lg`])},[B(`button`,{"w-full":``,flex:``,"items-center":``,"justify-center":``,"gap-2":``,"rounded-lg":``,"py-2":``,transition:`all duration-200 ease-in-out`,class:Gt([n.value?`bg-primary-500 hover:bg-primary-600 text-white`:`bg-white dark:bg-neutral-900 hover:bg-neutral-100 dark:hover:bg-neutral-800`]),onClick:i[3]||=e=>n.value=!n.value},[B(`span`,null,un(n.value?e.collapseButtonText:e.expandButtonText),1),B(`div`,{class:Gt([n.value?`rotate-180`:``,`text-lg`]),"i-solar:alt-arrow-down-bold-duotone":``,transition:`transform duration-200 ease-in-out`},null,2)],2)],2)])])]))}}),Qv=St(Zv,[[`__scopeId`,`data-v-4dd3b9e2`]]),$v=H({__name:`CursorFloating`,props:{intensity:{default:1.5}},setup(e){let t=e,n=W(null),r=W(``),i=W(`50% 50%`),a=W(`50% 50%`),o=W(.5);function s(e){if(!n.value)return;let s=n.value,c=s.getBoundingClientRect(),l=e.clientX-c.left,u=e.clientY-c.top,d=s.offsetWidth,f=s.offsetHeight,p=Math.abs(Math.floor(100/d*l)-100),m=Math.abs(Math.floor(100/f*u)-100),h=50+(p-50)/1.5,g=50+(m-50)/1.5,_=50+(p-50)/7,v=50+(m-50)/7,y=(h-50)/1.5*.2*t.intensity,b=(g-50)/2*-1*.2*t.intensity,x=50-p+(50-m),S=.5+Math.abs(x)*.008*t.intensity;r.value=`perspective(1200px) rotateX(${b}deg) rotateY(${y}deg) scale3d(${1+.015*t.intensity}, ${1+.015*t.intensity}, ${1+.015*t.intensity})`,i.value=`${h}% ${g}%`,a.value=`${_}% ${v}%`,o.value=S}function c(){r.value=`perspective(1200px) rotateX(0deg) rotateY(0deg) scale3d(1, 1, 1)`,i.value=`50% 50%`,a.value=`50% 50%`,o.value=.5}return Yt(()=>{r.value=`perspective(1200px) rotateX(0deg) rotateY(0deg) scale3d(1, 1, 1)`}),(t,i)=>(U(),V(`div`,{ref_key:`cardRef`,ref:n,class:`card-hover-effect`,style:qt({transform:r.value,"--effect-intensity":e.intensity}),onMousemove:s,onMouseleave:c},[nn(t.$slots,`default`,{},void 0,!0)],36))}}),ey=St($v,[[`__scopeId`,`data-v-895421da`]]),ty=H({__name:`ProviderAccountIdInput`,props:Ht({placeholder:null,required:{type:Boolean},label:null,description:null},{modelValue:{required:!0},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let t=e,n=xn(e,`modelValue`);return(e,r)=>(U(),kt(G(Kn),{modelValue:n.value,"onUpdate:modelValue":r[0]||=e=>n.value=e,label:t.label||`Account ID`,description:t.description||`Account ID`,placeholder:t.placeholder,required:t.required,type:`text`},null,8,[`modelValue`,`label`,`description`,`placeholder`,`required`]))}}),ny=ty;const ry=[`onClick`],iy={class:`text-lg text-neutral-500 md:text-2xl dark:text-neutral-400`},ay={"mt-4":``};var oy=H({__name:`ProviderAdvancedSettings`,props:{title:null,initialVisible:{type:Boolean}},setup(e){let t=e,n=W(t.initialVisible||!1);function r(){n.value=!n.value}return(t,n)=>(U(),kt(Un,{"w-full":``},{trigger:Nn(t=>[B(`button`,{transition:`all ease-in-out duration-250`,"w-full":``,flex:``,"items-center":``,"gap-1.5":``,"outline-none":``,class:`[&_.provider-icon]:grayscale-100 [&_.provider-icon]:hover:grayscale-0`,onClick:()=>t.setVisible(!t.visible)&&r()},[B(`h2`,iy,[B(`span`,null,un(e.title||`Advanced`),1)]),B(`div`,{transform:``,transition:`transform duration-250`,class:Gt({"rotate-180":t.visible})},n[0]||=[B(`div`,{"i-solar:alt-arrow-down-bold-duotone":``},null,-1)],2)],8,ry)]),default:Nn(()=>[B(`div`,ay,[nn(t.$slots,`default`)])]),_:3}))}}),sy=oy,cy=H({__name:`ProviderApiKeyInput`,props:Ht({providerName:null,placeholder:null,required:{type:Boolean},label:null,description:null},{modelValue:{required:!0},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let t=e,{t:n}=bn(),r=xn(e,`modelValue`),i=Ot(()=>t.description||`API Key for ${t.providerName}`);return(t,a)=>(U(),kt(G(Kn),{modelValue:r.value,"onUpdate:modelValue":a[0]||=e=>r.value=e,label:e.label||G(n)(`settings.pages.providers.common.fields.field.api-key.label`),description:i.value,placeholder:e.placeholder,required:e.required,type:`password`},null,8,[`modelValue`,`label`,`description`,`placeholder`,`required`]))}}),ly=cy,uy=H({__name:`ProviderBaseUrlInput`,props:Ht({placeholder:null,required:{type:Boolean},label:null,description:null},{modelValue:{required:!0},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let t=e,n=xn(e,`modelValue`);return(e,r)=>(U(),kt(G(Kn),{modelValue:n.value,"onUpdate:modelValue":r[0]||=e=>n.value=e,label:t.label||`Base URL`,description:t.description||`Custom base URL (optional)`,placeholder:t.placeholder,required:t.required,type:`text`},null,8,[`modelValue`,`label`,`description`,`placeholder`,`required`]))}}),dy=uy;const fy={flex:`~ col gap-6`},py={flex:`~ row`,"items-center":``,"justify-between":``},my={class:`text-lg text-neutral-500 md:text-2xl dark:text-neutral-400`},hy={text:`neutral-400 dark:neutral-500`};var gy=H({__name:`ProviderBasicSettings`,props:{title:null,description:null,onReset:{type:Function}},setup(e){return(t,n)=>(U(),V(`div`,fy,[B(`div`,py,[B(`div`,null,[B(`h2`,my,un(e.title||`Basic`),1),B(`div`,hy,[B(`span`,null,un(e.description||`Essential settings`),1)])]),e.onReset?(U(),V(`button`,{key:0,title:`Reset settings`,flex:``,"items-center":``,"justify-center":``,"rounded-full":``,"p-2":``,transition:`all duration-250 ease-in-out`,text:`neutral-500 dark:neutral-400`,bg:`transparent dark:transparent hover:neutral-200 dark:hover:neutral-800 active:neutral-300 dark:active:neutral-700`,onClick:n[0]||=(...t)=>e.onReset&&e.onReset(...t)},n[1]||=[B(`div`,{"i-solar:refresh-bold-duotone":``,"text-xl":``},null,-1)])):At(``,!0)]),nn(t.$slots,`default`)]))}}),_y=gy;const vy={bg:`neutral-50 dark:[rgba(0,0,0,0.3)]`,"rounded-xl":``,"p-4":``,flex:`~ col gap-6`};var yy=H({__name:`ProviderSettingsContainer`,setup(e){return(e,t)=>(U(),V(`div`,vy,[nn(e.$slots,`default`)]))}}),by=yy;const xy={text:`neutral-200/50 dark:neutral-600/20`,"pointer-events-none":``,fixed:``,top:`[calc(100dvh-15rem)]`,"bottom-0":``,"right--5":``,"z--1":``,initial:{scale:.9,opacity:0,x:20},enter:{scale:1,opacity:1,x:0},duration:500,"size-60":``};var Sy=H({__name:`ProviderSettingsLayout2`,props:{providerName:null,providerIcon:null,providerIconColor:null,onBack:{type:Function}},setup(e){return(t,n)=>{let r=an(`motion`);return U(),V(P,null,[nn(t.$slots,`default`),Pn((U(),V(`div`,xy,[B(`div`,{text:`60`,class:Gt(e.providerIcon||e.providerIconColor)},null,2)])),[[r]])],64)}}}),Cy=Sy;const wy={text:`neutral-200/50 dark:neutral-600/20`,"pointer-events-none":``,fixed:``,top:`[calc(100dvh-15rem)]`,"bottom-0":``,"right--5":``,"z--1":``,initial:{scale:.9,opacity:0,x:20},enter:{scale:1,opacity:1,x:0},duration:500,"size-60":``};var Ty=H({__name:`ProviderSettingsLayout`,props:{providerName:null,providerIcon:null,providerIconColor:null,onBack:{type:Function}},setup(e){return(t,n)=>{let r=an(`motion`);return U(),V(P,null,[nn(t.$slots,`default`),Pn((U(),V(`div`,wy,[B(`div`,{text:`60`,class:Gt(e.providerIcon||e.providerIconColor)},null,2)])),[[r]])],64)}}}),Ey=Ty;const Dy={"w-full":``,"rounded-xl":``},Oy={class:`mb-4 text-lg text-neutral-500 md:text-2xl dark:text-neutral-400`,"w-full":``},ky={class:`inline-flex items-center gap-4`},Ay={flex:`~ col gap-4`},jy=[`placeholder`],My=[`placeholder`],Ny={flex:`~ col gap-6`},Py={grid:`~ cols-2 gap-4`},Fy={class:`flex items-center gap-1 text-sm font-medium`},Iy={class:`text-xs text-neutral-500 dark:text-neutral-400`},Ly=[`value`],Ry={flex:`~ row`,"gap-4":``},zy=[`disabled`],By={flex:`~ row`,"items-center":``,"gap-2":``},Vy={flex:`~ row`,"items-center":``,"gap-2":``},Hy={key:2,class:`mt-2 text-sm text-red-500`},Uy={key:3,class:`mt-2 text-sm text-red-500`},Wy={key:4,class:`mt-2 text-sm text-red-500`},Gy=[`src`];var Ky=H({__name:`SpeechPlayground`,props:{defaultText:null,availableVoices:null,generateSpeech:{type:Function},apiKeyConfigured:{type:Boolean}},setup(e,{expose:t}){let n=e,{t:r}=bn(),i=W(n.defaultText||`Hello! This is a test of the voice synthesis.`),a=W(!1),o=W(``),s=W(``),c=W(null),l=W(!1),u=W(``),d=W(``);K(()=>n.availableVoices,e=>{var t;e.length>0&&!d.value&&(d.value=(t=e[0])?.id||``)},{immediate:!0});async function f(){if(!(!i.value.trim()&&!l.value||l.value&&!u.value.trim()||!d.value)){a.value=!0,s.value=``;try{o.value&&p();let e=l.value?u.value:i.value,t=await n.generateSpeech(e,d.value,l.value);o.value=URL.createObjectURL(new Blob([t])),setTimeout(()=>{c.value&&c.value.play()},100)}catch(e){console.error(`Error generating speech:`,e),s.value=e instanceof Error?e.message:`An unknown error occurred`}finally{a.value=!1}}}function p(){c.value&&(c.value.pause(),c.value.currentTime=0),o.value&&(URL.revokeObjectURL(o.value),o.value=``)}return Zt(()=>{o.value&&URL.revokeObjectURL(o.value)}),t({testText:i,ssmlText:u,useSSML:l,selectedVoice:d,isGenerating:a,audioUrl:o,errorMessage:s,audioPlayer:c,generateTestSpeech:f,stopTestAudio:p}),(t,n)=>(U(),V(`div`,Dy,[B(`h2`,Oy,[B(`div`,ky,[Mt(G(_a)),B(`div`,null,un(G(r)(`settings.pages.providers.provider.elevenlabs.playground.title`)),1)])]),B(`div`,Ay,[Mt(G(Gn),{modelValue:l.value,"onUpdate:modelValue":n[0]||=e=>l.value=e,label:G(r)(`settings.pages.modules.speech.sections.section.voice-settings.use-ssml.label`),description:G(r)(`settings.pages.modules.speech.sections.section.voice-settings.use-ssml.description`)},null,8,[`modelValue`,`label`,`description`]),l.value?Pn((U(),V(`textarea`,{key:1,"onUpdate:modelValue":n[2]||=e=>u.value=e,placeholder:G(r)(`settings.pages.modules.speech.sections.section.voice-settings.input-ssml.placeholder`),border:`neutral-100 dark:neutral-800 solid 2 focus:neutral-200 dark:focus:neutral-700`,transition:`all duration-250 ease-in-out`,bg:`neutral-100 dark:neutral-800 focus:neutral-50 dark:focus:neutral-900`,"h-48":``,"w-full":``,"rounded-lg":``,"px-3":``,"py-2":``,"text-sm":``,"font-mono":``,"outline-none":``},null,8,My)),[[kn,u.value]]):Pn((U(),V(`textarea`,{key:0,"onUpdate:modelValue":n[1]||=e=>i.value=e,placeholder:G(r)(`settings.pages.providers.provider.elevenlabs.playground.fields.field.input.placeholder`),border:`neutral-100 dark:neutral-800 solid 2 focus:neutral-200 dark:focus:neutral-700`,transition:`all duration-250 ease-in-out`,bg:`neutral-100 dark:neutral-800 focus:neutral-50 dark:focus:neutral-900`,"h-24":``,"w-full":``,"rounded-lg":``,"px-3":``,"py-2":``,"text-sm":``,"outline-none":``},null,8,jy)),[[kn,i.value]]),B(`div`,Ny,[B(`label`,Py,[B(`div`,null,[B(`div`,Fy,un(G(r)(`settings.pages.providers.provider.elevenlabs.playground.fields.field.voice.label`)),1),B(`div`,Iy,un(G(r)(`settings.pages.providers.provider.elevenlabs.playground.fields.field.voice.description`)),1)]),Pn(B(`select`,{"onUpdate:modelValue":n[3]||=e=>d.value=e,border:`neutral-300 dark:neutral-800 solid 2 focus:neutral-400 dark:focus:neutral-600`,transition:`border duration-250 ease-in-out`,"w-full":``,"rounded-lg":``,"px-2":``,"py-1":``,"text-nowrap":``,"text-sm":``,"outline-none":``},[(U(!0),V(P,null,tn(e.availableVoices,e=>(U(),V(`option`,{key:e.id,value:e.id},un(e.name),9,Ly))),128))],512),[[On,d.value]])])]),B(`div`,Ry,[B(`button`,{border:`neutral-800 dark:neutral-200 solid 2`,transition:`border duration-250 ease-in-out`,"rounded-lg":``,"px-4":``,text:`neutral-100 dark:neutral-900`,"py-2":``,"text-sm":``,disabled:a.value||!i.value.trim()&&!l.value||l.value&&!u.value.trim()||!d.value||!e.apiKeyConfigured,class:Gt({"opacity-50 cursor-not-allowed":a.value||!i.value.trim()&&!l.value||l.value&&!u.value.trim()||!d.value||!e.apiKeyConfigured}),bg:`neutral-700 dark:neutral-300`,onClick:f},[B(`div`,By,[n[4]||=B(`div`,{"i-solar:play-circle-bold-duotone":``},null,-1),B(`span`,null,un(a.value?G(r)(`settings.pages.providers.provider.elevenlabs.playground.buttons.button.test-voice.generating`):G(r)(`settings.pages.providers.provider.elevenlabs.playground.buttons.button.test-voice.label`)),1)])],10,zy),o.value?(U(),V(`button`,{key:0,border:`primary-300 dark:primary-800 solid 2`,transition:`border duration-250 ease-in-out`,"rounded-lg":``,"px-4":``,"py-2":``,"text-sm":``,onClick:p},[B(`div`,Vy,[n[5]||=B(`div`,{"i-solar:stop-circle-bold-duotone":``},null,-1),B(`span`,null,un(G(r)(`settings.pages.modules.speech.sections.section.playground.buttons.stop.label`)),1)])])):At(``,!0)]),e.apiKeyConfigured?At(``,!0):(U(),V(`div`,Hy,un(G(r)(`settings.pages.providers.provider.elevenlabs.playground.validation.error-missing-api-key`)),1)),d.value?At(``,!0):(U(),V(`div`,Uy,un(G(r)(`settings.pages.modules.speech.sections.section.playground.select-voice.required`)),1)),s.value?(U(),V(`div`,Wy,un(s.value),1)):At(``,!0),o.value?(U(),V(`audio`,{key:5,ref_key:`audioPlayer`,ref:c,src:o.value,controls:``,class:`mt-2 w-full`},null,8,Gy)):At(``,!0)]),nn(t.$slots,`default`)]))}}),qy=Ky;const Jy={flex:`~ col md:row gap-6`},Yy={flex:`~ col gap-6`},Xy={class:`text-lg text-neutral-500 md:text-2xl dark:text-neutral-400`},Zy={flex:`~ col gap-4`},Qy={flex:`~ col gap-6`,class:`w-full md:w-[60%]`},$y={"w-full":``,"rounded-xl":``};var eb=H({__name:`SpeechProviderSettings`,props:{providerId:null,defaultModel:null,additionalSettings:null},setup(e){let t=e,{t:n}=bn(),r=Sn(),i=Bn(),a=Hn(),{providers:o}=ln(i),s=Ot(()=>i.getProviderMetadata(t.providerId)),c=Ot({get:()=>{var e;return(e=o.value[t.providerId])?.apiKey||``},set:e=>{o.value[t.providerId]||(o.value[t.providerId]={}),o.value[t.providerId].apiKey=e}}),l=Ot({get:()=>{var e,n,r;return(e=o.value[t.providerId])?.baseUrl||((n=s.value)==null||(r=n.defaultOptions)==null?void 0:r.call(n).baseUrl)||``},set:e=>{o.value[t.providerId]||(o.value[t.providerId]={}),o.value[t.providerId].baseUrl=e}}),u=W(`Hello! This is a test of voice synthesis.`),d=W(!1),f=W(``),p=W(``),m=W(null),h=W(!1),g=W(``),_=W(``),v=W({});function y(){var e;(e=o.value[t.providerId])?.voiceSettings?v.value={...o.value[t.providerId].voiceSettings}:v.value={pitch:0,speed:1,volume:0,...t.additionalSettings}}Yt(()=>{var e,n,r,u;i.initializeProvider(t.providerId),c.value=(e=o.value[t.providerId])?.apiKey||``,l.value=(n=o.value[t.providerId])?.baseUrl||((r=s.value)==null||(u=r.defaultOptions)==null?void 0:u.call(r).baseUrl)||``,y(),i.configuredProviders[t.providerId]&&a.loadVoicesForProvider(t.providerId)});let b=vn(()=>{var e,n;o.value[t.providerId]={...o.value[t.providerId],apiKey:c.value,baseUrl:l.value||((e=s.value)==null||(n=e.defaultOptions)==null?void 0:n.call(e).baseUrl)||``,voiceSettings:{...v.value}}},1e3);K([c,l],b),K(v,b,{deep:!0});async function x(){if(!u.value.trim()&&!h.value||h.value&&!g.value.trim())return;let e=i.getProviderInstance(t.providerId);if(!e){console.error(`Failed to initialize speech provider`);return}if(!_.value){console.error(`No active speech voice selected`);return}d.value=!0,p.value=``;try{f.value&&S();let n=t.defaultModel||`default`,r=h.value?g.value:u.value,i=await Ln({...e.speech(n,{voiceSettings:v.value}),input:r,voice:_.value});f.value=URL.createObjectURL(new Blob([i])),setTimeout(()=>{m.value&&m.value.play()},100)}catch(e){console.error(`Error generating speech:`,e),p.value=e instanceof Error?e.message:`An unknown error occurred`}finally{d.value=!1}}function S(){m.value&&(m.value.pause(),m.value.currentTime=0),f.value&&(URL.revokeObjectURL(f.value),f.value=``)}Zt(()=>{f.value&&URL.revokeObjectURL(f.value)});function C(){var e,t;v.value={...((e=s.value)==null||(t=e.defaultOptions)==null?void 0:t.call(e).voiceSettings)||{}},b()}function w(e,t){v.value[e]=t}let T=Ot(()=>({voiceSettings:v.value,updateVoiceSettings:w,isGenerating:d.value,testText:u.value,useSSML:h.value,ssmlText:g.value,generateTestSpeech:x,stopTestAudio:S,audioUrl:f.value,audioPlayer:m.value,errorMessage:p.value}));return(e,t)=>{var i,a;return U(),kt(Cy,{"provider-name":(i=s.value)?.localizedName,"provider-icon":(a=s.value)?.icon,"on-back":()=>G(r).back()},{default:Nn(()=>[B(`div`,Jy,[Mt(G(by),{class:`w-full md:w-[40%]`},{default:Nn(()=>[Mt(G(_y),{title:G(n)(`settings.pages.providers.common.section.basic.title`),description:G(n)(`settings.pages.providers.common.section.basic.description`),"on-reset":C},{default:Nn(()=>{var n;return[Mt(G(ly),{modelValue:c.value,"onUpdate:modelValue":t[0]||=e=>c.value=e,"provider-name":(n=s.value)?.localizedName,placeholder:`sk-`},null,8,[`modelValue`,`provider-name`]),nn(e.$slots,`basic-settings`)]}),_:3},8,[`title`,`description`]),B(`div`,Yy,[B(`h2`,Xy,un(G(n)(`settings.pages.providers.common.section.voice.title`)),1),B(`div`,Zy,[nn(e.$slots,`voice-settings`,Kt(Rt(T.value)))])]),Mt(G(sy),{title:G(n)(`settings.pages.providers.common.section.advanced.title`)},{default:Nn(()=>{var n,r;return[Mt(G(dy),{modelValue:l.value,"onUpdate:modelValue":t[1]||=e=>l.value=e,placeholder:((n=s.value)==null||(r=n.defaultOptions)==null?void 0:r.call(n).baseUrl)||``,required:``},null,8,[`modelValue`,`placeholder`]),nn(e.$slots,`advanced-settings`)]}),_:3},8,[`title`])]),_:3}),B(`div`,Qy,[B(`div`,$y,[nn(e.$slots,`playground`,Kt(Rt(T.value)))])])])]),_:3},8,[`provider-name`,`provider-icon`,`on-back`])}}}),tb=eb,nb=H({__name:`Screen`,setup(e){let t=W(),n=gn(Dt),{width:r,height:i}=Tn(),a=yn(t,{immediate:!0,windowResize:!0,reset:!0}),o=Ot(()=>n.between(`sm`,`md`).value||n.smaller(`sm`).value),s=Ot(()=>n.between(`md`,`lg`).value),c=Ot(()=>n.greaterOrEqual(`lg`).value),l=Ot(()=>c.value?a.width.value:o.value||s.value?r.value-16:a.width.value),u=W(0);return K([r,i,t],()=>{var e;let n=(e=t.value)==null||(e=e.parentElement)==null?void 0:e.getBoundingClientRect();c.value||o.value||s.value?u.value=n?.height||0:u.value=600}),K([a.width,a.height],()=>{c.value||o.value||s.value?u.value=a.height.value:u.value=600}),Yt(async()=>{t.value&&a.update()}),(e,n)=>(U(),V(`div`,{ref_key:`containerRef`,ref:t,"h-full":``,"w-full":``},[nn(e.$slots,`default`,{width:l.value,height:u.value})],512))}}),rb=nb,ib=bt((exports,t)=>{ /*! JSZip v3.10.1 - A JavaScript class for generating and reading zip files @@ -3763,11 +3763,11 @@ float PCSS (sampler2D shadowMap, vec4 coords) { }`,r=Ye.shadowmap_pars_fragment,{renderer:i,scene:a,camera:o}=cn();function s(e,t){let i=r;i=i.replace(`#ifdef USE_SHADOWMAP`,`#ifdef USE_SHADOWMAP ${n(t)}`),i=i.replace(`#if defined( SHADOWMAP_TYPE_PCF )`,`${bA} #if defined( SHADOWMAP_TYPE_PCF )`),Ye.shadowmap_pars_fragment=i,e.shadowMap.enabled=!0}function c(e,t,n){t.traverse(t=>{var n,r;`material`in t&&t.material&&(e.properties.remove(t.material),typeof t.material==`object`&&`dispose`in t.material&&typeof t.material.dispose==`function`&&((r=(n=t.material).dispose)==null||r.call(n)))}),e.info.programs&&(e.info.programs.length=0),e.compile(t,n)}return Zt(()=>{o.value&&(Ye.shadowmap_pars_fragment=r,c(i.value,a.value,o.value))}),K(t,()=>{o.value&&(s(i.value,t),c(i.value,a.value,o.value))},{immediate:!0}),(e,t)=>(U(),V(`TresGroup`))}});var SA=class extends Ae{constructor(){super(),Sb(this,`virtualScene`,null),this.virtualScene=new Je}add(...e){return this.virtualScene.add(...e),this}dispose(){this.virtualScene.traverse(e=>{e instanceof be&&(e.geometry.dispose(),e.material.dispose(),e.material.map&&e.material.map.dispose(),this.virtualScene.remove(e))}),this.virtualScene=null}};const CA=H({__name:`component`,props:{background:{type:[Boolean,String],default:!1},blur:{default:0},files:{default:()=>[]},path:{default:``},preset:{default:void 0},resolution:{default:256},near:{default:1},far:{default:1e3},frames:{default:1/0},backgroundIntensity:{default:1},backgroundRotation:{},environmentIntensity:{default:1},environmentRotation:{},syncMaterials:{type:Boolean}},async setup(e,{expose:t}){let n,r,i=e,a=W(null);t({texture:a});let{extend:o,renderer:c,scene:l}=Qt();o({EnvironmentScene:SA});let d=null,f=W(null),p=null,m=W(null),h=([n,r]=Mn(()=>RT(i,f)),n=await n,r(),n),{onBeforeRender:g}=zt(),v=1;g(()=>{if(p&&m.value&&f.value&&(i.frames===1/0||v{if(e&&t!=null&&t.virtualScene){let n=dn(t).virtualScene,r=n.children.find(e=>e instanceof be&&e.userData.isEnvironment);r||(r=new be(new u(1,1,1),new xe({side:s})),r.userData.isEnvironment=!0,n.add(r)),n.background=e,n.backgroundBlurriness=i.blur}},{immediate:!0});let y=e=>{e&&d!=null&&d.length?(l.value.environment=e.texture,i.background&&(l.value.background=e.texture)):h.value&&(l.value.environment=h.value,i.background&&(l.value.background=h.value))};return K(h,()=>{f.value&&y(f.value)},{immediate:!0,deep:!0}),K(()=>wn().default,e=>{var t;if(e&&(d=e(),Array.isArray(d)&&d.length>0)){o({EnvironmentScene:SA}),f.value=new gt(i.resolution),f.value.texture.type=te,p=new _(i.near,i.far,f.value),y(f.value);return}(t=f.value)==null||t.dispose(),f.value=null,y()},{immediate:!0,deep:!0}),a.value=h.value,Zt(()=>{var e,t;(e=m.value)==null||e.dispose(),(t=f.value)==null||t.dispose()}),(e,t)=>f.value?(U(),V(`TresEnvironmentScene`,{key:0,ref_key:`environmentScene`,ref:m},[nn(e.$slots,`default`)],512)):At(``,!0)}}),wA={key:0,args:[0,1,64]},TA={key:1,args:[.5,1,64]},EA={key:2},DA=[`tone-mapped`,`map`,`side`,`color`],OA=H({__name:`index`,props:{args:{default:null},form:{default:`rect`},toneMapped:{type:Boolean,default:!1},map:{default:null},intensity:{default:1},color:{default:new h(16777215)}},setup(e,{expose:t}){let n=e,r=W(),i=W();return jn(()=>{r.value&&(r.value.color.copy(new h(n.color)),r.value.color.multiplyScalar(n.intensity),r.value.needsUpdate=!0)}),t({mesh:i}),(e,t)=>(U(),V(`TresMesh`,{ref_key:`mesh`,ref:i},[e.form===`circle`?(U(),V(`TresRingGeometry`,wA)):e.form===`ring`?(U(),V(`TresRingGeometry`,TA)):e.form===`rect`?(U(),V(`TresPlaneGeometry`,EA)):(U(),kt(n.form,{key:3,args:e.args},null,8,[`args`])),B(`TresMeshBasicMaterial`,{ref_key:`material`,ref:r,"tone-mapped":e.toneMapped,map:e.map,side:G(T),color:e.color},null,8,DA)],512))}});var kA=H({__name:`Range`,props:{modelValue:null,min:{default:0},max:{default:100},step:{default:1},disabled:{type:Boolean,default:!1}},emits:[`update:modelValue`,`mousedown`],setup(e,{emit:t}){let n=e,r=t,i=W(null);function a(e,t,n){return Math.min(Math.max(e,t),n)}function o(e){let t=e.toString();if(t.includes(`e-`))return Number.parseInt(t.split(`e-`)[1],10);let n=t.includes(`.`)?t.split(`.`)[1].length:0;return n}function s(e,t){let n=o(t),r=10**(n+3);return Number.parseFloat((e*r/r).toFixed(n))}let c=Ot(()=>s(a(n.modelValue,n.min,n.max),n.step)),l=Ot(()=>{let e=(c.value-n.min)/(n.max-n.min)*100;return{width:`${e}%`,backgroundSize:`${e}% 100%`}});function u(e){if(!i.value)return c.value;let t=i.value.getBoundingClientRect(),r=e.clientX-t.left,a=r/t.width,o=n.max-n.min,s=n.min+o*a,l=Math.round(s/n.step)*n.step;return Math.min(Math.max(l,n.min),n.max)}function d(e){if(n.disabled)return;let t=u(e);r(`update:modelValue`,t)}function f(e){if(n.disabled)return;e.preventDefault();let t=u(e);r(`update:modelValue`,t),window.addEventListener(`mousemove`,d),window.addEventListener(`mouseup`,p)}function p(e){window.removeEventListener(`mousemove`,d),window.removeEventListener(`mouseup`,p)}return Zt(()=>{window.removeEventListener(`mousemove`,d),window.removeEventListener(`mouseup`,p)}),(t,n)=>(U(),V(`span`,{ref_key:`sliderRef`,ref:i,class:Gt([`range-slider disabled:pointer-events-none disabled:cursor-default disabled:opacity-50`,{disabled:e.disabled}]),bg:`[#e6e1fc] dark:[#676085]`,"touch-action-none":``,relative:``,"inline-block":``,"w-full":``,"cursor-ew-resize":``,"rounded-sm":``,onMousedown:f},[B(`span`,{style:qt(l.value),bg:`[#cabeff] dark:[#4e34b9]`,relative:``,block:``,"rounded-sm":``,h:`[14px]`},null,4),B(`span`,{role:`slider`,class:`slider-thumb`,style:qt({left:`${(c.value-e.min)/(e.max-e.min)*100}%`}),absolute:``,"rounded-sm":``,w:`[1px]`,h:`[14px]`,bg:`neutral-100 dark:neutral-400`,top:`50%`,transform:`translate-x-[50%] translate-y-[-50%]`},null,4)],34))}}),AA=kA,jA=H({__name:`Model`,props:{model:null,idleAnimation:null,loadAnimations:null,position:null,paused:{type:Boolean}},emits:[`loadModelProgress`,`error`],setup(e,{expose:t,emit:n}){let i=e,a=n,o,s=W(),c=W(),{scene:l}=Qt(),{onBeforeRender:u}=zt(),d=tr(),f=nr(),p=W();K(()=>i.position,([e,t,n])=>{s.value&&s.value.scene.position.set(e,t,n)}),Yt(async()=>{if(l.value)try{let e=await Qn(i.model,{scene:l.value,lookAt:!0,position:i.position,onProgress:e=>a(`loadModelProgress`,Number.parseFloat((100*(e.loaded/e.total)).toFixed(2)))});if(!e){console.warn(`No VRM model loaded`);return}let t=await Zn(i.idleAnimation),n=await Yn(e,t);if(!n){console.warn(`No VRM animation loaded`);return}c.value=new r(e.scene),c.value.clipAction(n).play(),p.value=ir(e),s.value=e,o=u(({delta:e})=>{var t,n,r;(t=c.value)?.update(e),(n=s.value)?.update(e),d.update(s.value,e),f.update(s.value,e),(r=p.value)?.update(e)}).off}catch(e){a(`error`,e)}}),Zt(()=>{o?.(),s.value&&(s.value.scene.removeFromParent(),Jn.deepDispose(s.value.scene))}),t({setExpression(e){var t;(t=p.value)?.setEmotionWithResetAfter(e,1e3)}});let{pause:m,resume:h}=zt();return K(()=>i.paused,e=>{e?m():h()}),(e,t)=>nn(e.$slots,`default`)}}),MA=jA;const NA=[`position`],PA={absolute:``,bottom:`3`,right:`3`},FA={flex:`~ row`,"cursor-pointer":``},IA=[`checked`,`aria-checked`],LA={key:0,"min-w":`50vw`,z:`{var t;(t=f.value)?.setExpression(e)}}),(e,t)=>(U(),kt(rb,{relative:``},{default:Nn(({height:e,width:n})=>[Mt(G(ht),{alpha:!0,antialias:!0,width:n,height:e},{default:Nn(()=>[Mt(G(HE)),B(`TresPerspectiveCamera`,{position:[o.value,s.value,c.value]},null,8,NA),t[14]||=B(`TresDirectionalLight`,{color:16777215,intensity:1.2,position:[1,1,1]},null,-1),t[15]||=B(`TresAmbientLight`,{color:16777215,intensity:1.5},null,-1),Mt(MA,{ref_key:`modelRef`,ref:f,model:r.model,"idle-animation":r.idleAnimation,position:[l.value,u.value,d.value],paused:r.paused,onLoadModelProgress:t[0]||=e=>i(`loadModelProgress`,e),onError:t[1]||=e=>i(`error`,e)},null,8,[`model`,`idle-animation`,`position`,`paused`])]),_:2,__:[14,15]},1032,[`width`,`height`]),B(`div`,PA,[B(`div`,FA,[B(`label`,{class:Gt([a.value?`bg-neutral-300 dark:bg-neutral-200`:`bg-neutral-100 dark:bg-neutral-700`]),transition:`all ease-in-out duration-500`,text:`lg neutral-500 dark:neutral-400`,"m-1":``,"h-fit":``,"w-fit":``,"cursor-pointer":``,"appearance-none":``,"gap-1":``,"rounded-lg":``,"rounded-md":``,"border-none":``,"p-2":``,"outline-none":``},[Pn(B(`input`,{"onUpdate:modelValue":t[2]||=e=>a.value=e,checked:a.value,"aria-checked":a.value,name:`showLive2DViewerInspector`,type:`checkbox`,"appearance-none":``,"outline-none":``,hidden:``},null,8,IA),[[En,a.value]]),t[16]||=B(`div`,{"select-none":``},[B(`div`,{"i-solar:bug-bold-duotone":``})],-1)],2)]),Mt(G(Wn),null,{default:Nn(()=>[a.value?(U(),V(`div`,LA,[B(`div`,RA,[B(`div`,zA,[B(`span`,null,un(G(p)(`stage.viewers.debug-menu.vrm.model.title`)),1)]),Mt(Un,{"h-fit":``,"w-full":``,flex:`~ col`,border:`~ gray/25 rounded-lg`,divide:`y dashed gray/25`,"of-clip":``,"shadow-sm":``},{label:Nn(()=>[B(`span`,BA,un(G(p)(`stage.viewers.debug-menu.vrm.camera`)),1)]),default:Nn(()=>[B(`div`,VA,[t[17]||=B(`div`,{text:`neutral-400 dark:neutral-500`},[B(`span`,null,`X`)],-1),B(`label`,HA,[Mt(AA,{modelValue:o.value,"onUpdate:modelValue":t[3]||=e=>o.value=e,min:-10,max:10,step:.01},null,8,[`modelValue`])]),B(`div`,UA,[B(`span`,null,un(o.value),1)]),t[18]||=B(`div`,{text:`neutral-400 dark:neutral-500`},[B(`span`,null,`Y`)],-1),B(`label`,WA,[Mt(AA,{modelValue:s.value,"onUpdate:modelValue":t[4]||=e=>s.value=e,min:-10,max:10,step:.01},null,8,[`modelValue`])]),B(`div`,GA,[B(`span`,null,un(s.value),1)]),t[19]||=B(`div`,{text:`neutral-400 dark:neutral-500`},[B(`span`,null,`Z`)],-1),B(`label`,KA,[Mt(AA,{modelValue:c.value,"onUpdate:modelValue":t[5]||=e=>c.value=e,min:-10,max:10,step:.01},null,8,[`modelValue`])]),B(`div`,qA,[B(`span`,null,un(c.value),1)])])]),_:1}),Mt(Un,{"h-fit":``,"w-full":``,flex:`~ col`,border:`~ gray/25 rounded-lg`,divide:`y dashed gray/25`,"of-clip":``,"shadow-sm":``},{label:Nn(()=>[B(`span`,JA,un(G(p)(`stage.viewers.debug-menu.vrm.model.title`)),1)]),default:Nn(()=>[B(`div`,YA,[t[20]||=B(`div`,{text:`neutral-400 dark:neutral-500`},[B(`span`,null,`X`)],-1),B(`label`,XA,[Mt(AA,{modelValue:l.value,"onUpdate:modelValue":t[6]||=e=>l.value=e,min:-10,max:10,step:.01},null,8,[`modelValue`])]),B(`div`,ZA,[B(`span`,null,un(l.value),1)]),t[21]||=B(`div`,{text:`neutral-400 dark:neutral-500`},[B(`span`,null,`Y`)],-1),B(`label`,QA,[Mt(AA,{modelValue:u.value,"onUpdate:modelValue":t[7]||=e=>u.value=e,min:-10,max:10,step:.01},null,8,[`modelValue`])]),B(`div`,$A,[B(`span`,null,un(u.value),1)]),t[22]||=B(`div`,{text:`neutral-400 dark:neutral-500`},[B(`span`,null,`Z`)],-1),B(`label`,ej,[Mt(AA,{modelValue:d.value,"onUpdate:modelValue":t[8]||=e=>d.value=e,min:-10,max:10,step:.01},null,8,[`modelValue`])]),B(`div`,tj,[B(`span`,null,un(d.value),1)])])]),_:1}),B(`div`,nj,[B(`span`,null,un(G(p)(`stage.viewers.debug-menu.emotions`)),1)]),B(`div`,rj,[B(`button`,{"rounded-lg":``,bg:`neutral-100/70 dark:neutral-800/50`,"px-2":``,"py-1":``,"backdrop-blur-sm":``,onClick:t[9]||=e=>{var t;return(t=f.value)?.setExpression(`neutral`)}},un(G(p)(`stage.viewers.debug-menu.emotions-btn.neutral`)),1),B(`button`,{"rounded-lg":``,bg:`neutral-100/70 dark:neutral-800/50`,"px-2":``,"py-1":``,"backdrop-blur-sm":``,onClick:t[10]||=e=>{var t;return(t=f.value)?.setExpression(`surprised`)}},un(G(p)(`stage.viewers.debug-menu.emotions-btn.surprised`)),1),B(`button`,{"rounded-lg":``,bg:`neutral-100/70 dark:neutral-800/50`,"px-2":``,"py-1":``,"backdrop-blur-sm":``,onClick:t[11]||=e=>{var t;return(t=f.value)?.setExpression(`sad`)}},un(G(p)(`stage.viewers.debug-menu.emotions-btn.sad`)),1),B(`button`,{"rounded-lg":``,bg:`neutral-100/70 dark:neutral-800/50`,"px-2":``,"py-1":``,"backdrop-blur-sm":``,onClick:t[12]||=e=>{var t;return(t=f.value)?.setExpression(`angry`)}},un(G(p)(`stage.viewers.debug-menu.emotions-btn.angry`)),1),B(`button`,{"rounded-lg":``,bg:`neutral-100/70 dark:neutral-800/50`,"px-2":``,"py-1":``,"backdrop-blur-sm":``,onClick:t[13]||=e=>{var t;return(t=f.value)?.setExpression(`happy`)}},un(G(p)(`stage.viewers.debug-menu.emotions-btn.happy`)),1)])])])):At(``,!0)]),_:1})])]),_:1}))}}),aj=ij;const oj=[`onClick`],sj={flex:``,"gap-1.5":``};var cj=H({__name:`Section`,props:{title:null,icon:null,innerClass:null,expand:{type:Boolean,default:!0}},setup(e){return(t,n)=>(U(),kt(Un,{default:e.expand},{trigger:Nn(t=>[B(`button`,{class:`w-full flex items-center justify-between rounded-lg px-4 py-3 outline-none transition-all duration-250 ease-in-out`,bg:`neutral-100 dark:neutral-800`,hover:`bg-neutral-200 dark:bg-neutral-700`,onClick:e=>t.setVisible(!t.visible)},[B(`div`,sj,[B(`div`,{class:Gt(e.icon),"size-6":``},null,2),jt(` `+un(e.title),1)]),B(`div`,{"i-solar:alt-arrow-down-bold-duotone":``,transition:`transform duration-250`,class:Gt({"rotate-180":t.visible})},null,2)],8,oj)]),default:Nn(()=>[B(`div`,{grid:``,"gap-2":``,"p-4":``,class:Gt(e.innerClass)},[nn(t.$slots,`default`)],2)]),_:3},8,[`default`]))}}),lj=cj;function uj(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})}function dj(e){var t=typeof Symbol==`function`&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length==`number`)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw TypeError(t?`Object is not iterable.`:`Symbol.iterator is not defined.`)}function fj(e){return this instanceof fj?(this.v=e,this):new fj(e)}function pj(e,t,n){if(!Symbol.asyncIterator)throw TypeError(`Symbol.asyncIterator is not defined.`);var r=n.apply(e,t||[]),i,a=[];return i=Object.create((typeof AsyncIterator==`function`?AsyncIterator:Object).prototype),s(`next`),s(`throw`),s(`return`,o),i[Symbol.asyncIterator]=function(){return this},i;function o(e){return function(t){return Promise.resolve(t).then(e,d)}}function s(e,t){r[e]&&(i[e]=function(t){return new Promise(function(n,r){a.push([e,t,n,r])>1||c(e,t)})},t&&(i[e]=t(i[e])))}function c(e,t){try{l(r[e](t))}catch(e){f(a[0][3],e)}}function l(e){e.value instanceof fj?Promise.resolve(e.value.v).then(u,d):f(a[0][2],e)}function u(e){c(`next`,e)}function d(e){c(`throw`,e)}function f(e,t){e(t),a.shift(),a.length&&c(a[0][0],a[0][1])}}function mj(e){var t,n;return t={},r(`next`),r(`throw`,function(e){throw e}),r(`return`),t[Symbol.iterator]=function(){return this},t;function r(r,i){t[r]=e[r]?function(t){return(n=!n)?{value:fj(e[r](t)),done:!1}:i?i(t):t}:i}}function hj(e){if(!Symbol.asyncIterator)throw TypeError(`Symbol.asyncIterator is not defined.`);var t=e[Symbol.asyncIterator],n;return t?t.call(e):(e=typeof dj==`function`?dj(e):e[Symbol.iterator](),n={},r(`next`),r(`throw`),r(`return`),n[Symbol.asyncIterator]=function(){return this},n);function r(t){n[t]=e[t]&&function(n){return new Promise(function(r,a){n=e[t](n),i(r,a,n.done,n.value)})}}function i(e,t,n,r){Promise.resolve(r).then(function(t){e({value:t,done:n})},t)}}const gj=new TextDecoder(`utf-8`),_j=e=>gj.decode(e),vj=new TextEncoder,yj=e=>vj.encode(e),bj=e=>typeof e==`number`,xj=e=>typeof e==`boolean`,Sj=e=>typeof e==`function`,Cj=e=>e!=null&&Object(e)===e,wj=e=>Cj(e)&&Sj(e.then),Tj=e=>Cj(e)&&Sj(e[Symbol.iterator]),Ej=e=>Cj(e)&&Sj(e[Symbol.asyncIterator]),Dj=e=>Cj(e)&&Cj(e.schema),Oj=e=>Cj(e)&&`done`in e&&`value`in e,kj=e=>Cj(e)&&Sj(e.stat)&&bj(e.fd),Aj=e=>Cj(e)&&Nj(e.body),jj=e=>`_getDOMStream`in e&&`_getNodeStream`in e,Mj=e=>Cj(e)&&Sj(e.abort)&&Sj(e.getWriter)&&!jj(e),Nj=e=>Cj(e)&&Sj(e.cancel)&&Sj(e.getReader)&&!jj(e),Pj=e=>Cj(e)&&Sj(e.end)&&Sj(e.write)&&xj(e.writable)&&!jj(e),Fj=e=>Cj(e)&&Sj(e.read)&&Sj(e.pipe)&&xj(e.readable)&&!jj(e),Ij=e=>Cj(e)&&Sj(e.clear)&&Sj(e.bytes)&&Sj(e.position)&&Sj(e.setPosition)&&Sj(e.capacity)&&Sj(e.getBufferIdentifier)&&Sj(e.createLong),Lj=typeof SharedArrayBuffer<`u`?SharedArrayBuffer:ArrayBuffer;function Rj(e){let t=e[0]?[e[0]]:[],n,r,i,a;for(let o,s,c=0,l=0,u=e.length;++ce+t.byteLength,0),i,a,o,s=0,c=-1,l=Math.min(t||1/0,r);for(let e=n.length;++cVj(Int32Array,e),Uj=e=>Vj(BigInt64Array,e),Wj=e=>Vj(Uint8Array,e),Gj=e=>(e.next(),e);function*Kj(e,t){let n=function*(e){yield e},r=typeof t==`string`||ArrayBuffer.isView(t)||t instanceof ArrayBuffer||t instanceof Lj?n(t):Tj(t)?t:n(t);return yield*Gj(function*(t){let n=null;do n=t.next(yield Vj(e,n));while(!n.done)}(r[Symbol.iterator]())),new e}const qj=e=>Kj(Uint8Array,e);function Jj(e,t){return pj(this,arguments,function*(){if(wj(t))return yield fj(yield fj(yield*mj(hj(Jj(e,yield fj(t))))));let n=function(e){return pj(this,arguments,function*(){yield yield fj(yield fj(e))})},r=function(e){return pj(this,arguments,function*(){yield fj(yield*mj(hj(Gj(function*(e){let t=null;do t=e.next(yield t?.value);while(!t.done)}(e[Symbol.iterator]())))))})},i=typeof t==`string`||ArrayBuffer.isView(t)||t instanceof ArrayBuffer||t instanceof Lj?n(t):Tj(t)?r(t):Ej(t)?t:n(t);return yield fj(yield*mj(hj(Gj(function(t){return pj(this,arguments,function*(){let n=null;do n=yield fj(t.next(yield yield fj(Vj(e,n))));while(!n.done)})}(i[Symbol.asyncIterator]()))))),yield fj(new e)})}const Yj=e=>Jj(Uint8Array,e);function Xj(e,t,n){if(e!==0){n=n.slice(0,t);for(let t=-1,r=n.length;++t0)do if(e[n]!==t[n])return!1;while(++n(e.next(),e);function*eM(e){let t,n=!1,r=[],i,a,o,s=0;function c(){return a===`peek`?Bj(r,o)[0]:([i,r,s]=Bj(r,o),i)}({cmd:a,size:o}=(yield(()=>null)())||{cmd:`read`,size:0});let l=qj(e)[Symbol.iterator]();try{do if({done:t,value:i}=Number.isNaN(o-s)?l.next():l.next(o-s),!t&&i.byteLength>0&&(r.push(i),s+=i.byteLength),t||o<=s)do({cmd:a,size:o}=yield c());while(onull)()))||{cmd:`read`,size:0});let l=Yj(e)[Symbol.asyncIterator]();try{do if({done:t,value:i}=Number.isNaN(o-s)?yield fj(l.next()):yield fj(l.next(o-s)),!t&&i.byteLength>0&&(r.push(i),s+=i.byteLength),t||o<=s)do({cmd:a,size:o}=yield yield fj(c()));while(onull)()))||{cmd:`read`,size:0});let l=new rM(e);try{do if({done:t,value:i}=Number.isNaN(o-s)?yield fj(l.read()):yield fj(l.read(o-s)),!t&&i.byteLength>0&&(r.push(Wj(i)),s+=i.byteLength),t||o<=s)do({cmd:a,size:o}=yield yield fj(c()));while(o{})}get closed(){return this.reader?this.reader.closed.catch(()=>{}):Promise.resolve()}releaseLock(){this.reader&&this.reader.releaseLock(),this.reader=null}cancel(e){return uj(this,void 0,void 0,function*(){let{reader:t,source:n}=this;t&&(yield t.cancel(e).catch(()=>{})),n&&n.locked&&this.releaseLock()})}read(e){return uj(this,void 0,void 0,function*(){if(e===0)return{done:this.reader==null,value:new Uint8Array};let t=yield this.reader.read();return!t.done&&(t.value=Wj(t)),t})}};const iM=(e,t)=>{let n=e=>r([t,e]),r;return[t,n,new Promise(i=>(r=i)&&e.once(t,n))]};function aM(e){return pj(this,arguments,function*(){let t=[],n=`error`,r=!1,i=null,a,o,s=0,c=[],l;function u(){return a===`peek`?Bj(c,o)[0]:([l,c,s]=Bj(c,o),l)}if({cmd:a,size:o}=(yield yield fj((()=>null)()))||{cmd:`read`,size:0},e.isTTY)return yield yield fj(new Uint8Array),yield fj(null);try{t[0]=iM(e,`end`),t[1]=iM(e,`error`);do{if(t[2]=iM(e,`readable`),[n,i]=yield fj(Promise.race(t.map(e=>e[2]))),n===`error`)break;if((r=n===`end`)||(Number.isFinite(o-s)?(l=Wj(e.read(o-s)),l.byteLength0&&(c.push(l),s+=l.byteLength)),r||o<=s)do({cmd:a,size:o}=yield yield fj(u()));while(o{for(let[n,r]of t)e.off(n,r);try{let t=e.destroy;t&&t.call(e,n),n=void 0}catch(e){n=e||n}finally{n==null?r():i(n)}})}})}var oM;(function(e){e[e.V1=0]=`V1`,e[e.V2=1]=`V2`,e[e.V3=2]=`V3`,e[e.V4=3]=`V4`,e[e.V5=4]=`V5`})(oM||={});var sM;(function(e){e[e.Sparse=0]=`Sparse`,e[e.Dense=1]=`Dense`})(sM||={});var cM;(function(e){e[e.HALF=0]=`HALF`,e[e.SINGLE=1]=`SINGLE`,e[e.DOUBLE=2]=`DOUBLE`})(cM||={});var lM;(function(e){e[e.DAY=0]=`DAY`,e[e.MILLISECOND=1]=`MILLISECOND`})(lM||={});var uM;(function(e){e[e.SECOND=0]=`SECOND`,e[e.MILLISECOND=1]=`MILLISECOND`,e[e.MICROSECOND=2]=`MICROSECOND`,e[e.NANOSECOND=3]=`NANOSECOND`})(uM||={});var dM;(function(e){e[e.YEAR_MONTH=0]=`YEAR_MONTH`,e[e.DAY_TIME=1]=`DAY_TIME`,e[e.MONTH_DAY_NANO=2]=`MONTH_DAY_NANO`})(dM||={});const fM=2,pM=4,mM=4,hM=4,gM=new Int32Array(2),_M=new Float32Array(gM.buffer),vM=new Float64Array(gM.buffer),yM=new Uint16Array(new Uint8Array([1,0]).buffer)[0]===1;var bM;(function(e){e[e.UTF8_BYTES=1]=`UTF8_BYTES`,e[e.UTF16_STRING=2]=`UTF16_STRING`})(bM||={});var xM=class e{constructor(e){this.bytes_=e,this.position_=0,this.text_decoder_=new TextDecoder}static allocate(t){return new e(new Uint8Array(t))}clear(){this.position_=0}bytes(){return this.bytes_}position(){return this.position_}setPosition(e){this.position_=e}capacity(){return this.bytes_.length}readInt8(e){return this.readUint8(e)<<24>>24}readUint8(e){return this.bytes_[e]}readInt16(e){return this.readUint16(e)<<16>>16}readUint16(e){return this.bytes_[e]|this.bytes_[e+1]<<8}readInt32(e){return this.bytes_[e]|this.bytes_[e+1]<<8|this.bytes_[e+2]<<16|this.bytes_[e+3]<<24}readUint32(e){return this.readInt32(e)>>>0}readInt64(e){return BigInt.asIntN(64,BigInt(this.readUint32(e))+(BigInt(this.readUint32(e+4))<>8}writeUint16(e,t){this.bytes_[e]=t,this.bytes_[e+1]=t>>8}writeInt32(e,t){this.bytes_[e]=t,this.bytes_[e+1]=t>>8,this.bytes_[e+2]=t>>16,this.bytes_[e+3]=t>>24}writeUint32(e,t){this.bytes_[e]=t,this.bytes_[e+1]=t>>8,this.bytes_[e+2]=t>>16,this.bytes_[e+3]=t>>24}writeInt64(e,t){this.writeInt32(e,Number(BigInt.asIntN(32,t))),this.writeInt32(e+4,Number(BigInt.asIntN(32,t>>BigInt(32))))}writeUint64(e,t){this.writeUint32(e,Number(BigInt.asUintN(32,t))),this.writeUint32(e+4,Number(BigInt.asUintN(32,t>>BigInt(32))))}writeFloat32(e,t){_M[0]=t,this.writeInt32(e,gM[0])}writeFloat64(e,t){vM[0]=t,this.writeInt32(e,gM[yM?0:1]),this.writeInt32(e+4,gM[yM?1:0])}getBufferIdentifier(){if(this.bytes_.lengththis.minalign&&(this.minalign=t);let r=~(this.bb.capacity()-this.space+n)+1&t-1;for(;this.space=0&&this.vtable[t]==0;t--);let n=t+1;for(;t>=0;t--)this.addInt16(this.vtable[t]==0?0:e-this.vtable[t]);let r=2;this.addInt16(e-this.object_start);let i=(n+r)*fM;this.addInt16(i);let a=0,o=this.space;outer_loop:for(t=0;t=0;t--)this.writeInt8(e.charCodeAt(t))}this.prep(this.minalign,pM+r),this.addOffset(e),r&&this.addInt32(this.bb.capacity()-this.space),this.bb.setPosition(this.space)}finishSizePrefixed(e,t){this.finish(e,t,!0)}requiredField(e,t){let n=this.bb.capacity()-e,r=n-this.bb.readInt32(n),i=t=0;n--)e.addInt32(t[n]);return e.endVector()}static startTypeIdsVector(e,t){e.startVector(4,t,4)}static endUnion(e){let t=e.endObject();return t}static createUnion(t,n,r){return e.startUnion(t),e.addMode(t,n),e.addTypeIds(t,r),e.endUnion(t)}},$M=class e{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsUtf8(t,n){return(n||new e).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsUtf8(t,n){return t.setPosition(t.position()+hM),(n||new e).__init(t.readInt32(t.position())+t.position(),t)}static startUtf8(e){e.startObject(0)}static endUtf8(e){let t=e.endObject();return t}static createUtf8(t){return e.startUtf8(t),e.endUtf8(t)}},eN;(function(e){e[e.NONE=0]=`NONE`,e[e.Null=1]=`Null`,e[e.Int=2]=`Int`,e[e.FloatingPoint=3]=`FloatingPoint`,e[e.Binary=4]=`Binary`,e[e.Utf8=5]=`Utf8`,e[e.Bool=6]=`Bool`,e[e.Decimal=7]=`Decimal`,e[e.Date=8]=`Date`,e[e.Time=9]=`Time`,e[e.Timestamp=10]=`Timestamp`,e[e.Interval=11]=`Interval`,e[e.List=12]=`List`,e[e.Struct_=13]=`Struct_`,e[e.Union=14]=`Union`,e[e.FixedSizeBinary=15]=`FixedSizeBinary`,e[e.FixedSizeList=16]=`FixedSizeList`,e[e.Map=17]=`Map`,e[e.Duration=18]=`Duration`,e[e.LargeBinary=19]=`LargeBinary`,e[e.LargeUtf8=20]=`LargeUtf8`,e[e.LargeList=21]=`LargeList`,e[e.RunEndEncoded=22]=`RunEndEncoded`})(eN||={});var tN=class e{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsField(t,n){return(n||new e).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsField(t,n){return t.setPosition(t.position()+hM),(n||new e).__init(t.readInt32(t.position())+t.position(),t)}name(e){let t=this.bb.__offset(this.bb_pos,4);return t?this.bb.__string(this.bb_pos+t,e):null}nullable(){let e=this.bb.__offset(this.bb_pos,6);return e?!!this.bb.readInt8(this.bb_pos+e):!1}typeType(){let e=this.bb.__offset(this.bb_pos,8);return e?this.bb.readUint8(this.bb_pos+e):eN.NONE}type(e){let t=this.bb.__offset(this.bb_pos,10);return t?this.bb.__union(e,this.bb_pos+t):null}dictionary(e){let t=this.bb.__offset(this.bb_pos,12);return t?(e||new NM).__init(this.bb.__indirect(this.bb_pos+t),this.bb):null}children(t,n){let r=this.bb.__offset(this.bb_pos,14);return r?(n||new e).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+r)+t*4),this.bb):null}childrenLength(){let e=this.bb.__offset(this.bb_pos,14);return e?this.bb.__vector_len(this.bb_pos+e):0}customMetadata(e,t){let n=this.bb.__offset(this.bb_pos,16);return n?(t||new PM).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+n)+e*4),this.bb):null}customMetadataLength(){let e=this.bb.__offset(this.bb_pos,16);return e?this.bb.__vector_len(this.bb_pos+e):0}static startField(e){e.startObject(7)}static addName(e,t){e.addFieldOffset(0,t,0)}static addNullable(e,t){e.addFieldInt8(1,+t,0)}static addTypeType(e,t){e.addFieldInt8(2,t,eN.NONE)}static addType(e,t){e.addFieldOffset(3,t,0)}static addDictionary(e,t){e.addFieldOffset(4,t,0)}static addChildren(e,t){e.addFieldOffset(5,t,0)}static createChildrenVector(e,t){e.startVector(4,t.length,4);for(let n=t.length-1;n>=0;n--)e.addOffset(t[n]);return e.endVector()}static startChildrenVector(e,t){e.startVector(4,t,4)}static addCustomMetadata(e,t){e.addFieldOffset(6,t,0)}static createCustomMetadataVector(e,t){e.startVector(4,t.length,4);for(let n=t.length-1;n>=0;n--)e.addOffset(t[n]);return e.endVector()}static startCustomMetadataVector(e,t){e.startVector(4,t,4)}static endField(e){let t=e.endObject();return t}},nN=class e{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsSchema(t,n){return(n||new e).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsSchema(t,n){return t.setPosition(t.position()+hM),(n||new e).__init(t.readInt32(t.position())+t.position(),t)}endianness(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):AM.Little}fields(e,t){let n=this.bb.__offset(this.bb_pos,6);return n?(t||new tN).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+n)+e*4),this.bb):null}fieldsLength(){let e=this.bb.__offset(this.bb_pos,6);return e?this.bb.__vector_len(this.bb_pos+e):0}customMetadata(e,t){let n=this.bb.__offset(this.bb_pos,8);return n?(t||new PM).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+n)+e*4),this.bb):null}customMetadataLength(){let e=this.bb.__offset(this.bb_pos,8);return e?this.bb.__vector_len(this.bb_pos+e):0}features(e){let t=this.bb.__offset(this.bb_pos,10);return t?this.bb.readInt64(this.bb.__vector(this.bb_pos+t)+e*8):BigInt(0)}featuresLength(){let e=this.bb.__offset(this.bb_pos,10);return e?this.bb.__vector_len(this.bb_pos+e):0}static startSchema(e){e.startObject(4)}static addEndianness(e,t){e.addFieldInt16(0,t,AM.Little)}static addFields(e,t){e.addFieldOffset(1,t,0)}static createFieldsVector(e,t){e.startVector(4,t.length,4);for(let n=t.length-1;n>=0;n--)e.addOffset(t[n]);return e.endVector()}static startFieldsVector(e,t){e.startVector(4,t,4)}static addCustomMetadata(e,t){e.addFieldOffset(2,t,0)}static createCustomMetadataVector(e,t){e.startVector(4,t.length,4);for(let n=t.length-1;n>=0;n--)e.addOffset(t[n]);return e.endVector()}static startCustomMetadataVector(e,t){e.startVector(4,t,4)}static addFeatures(e,t){e.addFieldOffset(3,t,0)}static createFeaturesVector(e,t){e.startVector(8,t.length,8);for(let n=t.length-1;n>=0;n--)e.addInt64(t[n]);return e.endVector()}static startFeaturesVector(e,t){e.startVector(8,t,8)}static endSchema(e){let t=e.endObject();return t}static finishSchemaBuffer(e,t){e.finish(t)}static finishSizePrefixedSchemaBuffer(e,t){e.finish(t,void 0,!0)}static createSchema(t,n,r,i,a){return e.startSchema(t),e.addEndianness(t,n),e.addFields(t,r),e.addCustomMetadata(t,i),e.addFeatures(t,a),e.endSchema(t)}},rN;(function(e){e[e.NONE=0]=`NONE`,e[e.Schema=1]=`Schema`,e[e.DictionaryBatch=2]=`DictionaryBatch`,e[e.RecordBatch=3]=`RecordBatch`,e[e.Tensor=4]=`Tensor`,e[e.SparseTensor=5]=`SparseTensor`})(rN||={});var Y;(function(e){e[e.NONE=0]=`NONE`,e[e.Null=1]=`Null`,e[e.Int=2]=`Int`,e[e.Float=3]=`Float`,e[e.Binary=4]=`Binary`,e[e.Utf8=5]=`Utf8`,e[e.Bool=6]=`Bool`,e[e.Decimal=7]=`Decimal`,e[e.Date=8]=`Date`,e[e.Time=9]=`Time`,e[e.Timestamp=10]=`Timestamp`,e[e.Interval=11]=`Interval`,e[e.List=12]=`List`,e[e.Struct=13]=`Struct`,e[e.Union=14]=`Union`,e[e.FixedSizeBinary=15]=`FixedSizeBinary`,e[e.FixedSizeList=16]=`FixedSizeList`,e[e.Map=17]=`Map`,e[e.Duration=18]=`Duration`,e[e.LargeBinary=19]=`LargeBinary`,e[e.LargeUtf8=20]=`LargeUtf8`,e[e.Dictionary=-1]=`Dictionary`,e[e.Int8=-2]=`Int8`,e[e.Int16=-3]=`Int16`,e[e.Int32=-4]=`Int32`,e[e.Int64=-5]=`Int64`,e[e.Uint8=-6]=`Uint8`,e[e.Uint16=-7]=`Uint16`,e[e.Uint32=-8]=`Uint32`,e[e.Uint64=-9]=`Uint64`,e[e.Float16=-10]=`Float16`,e[e.Float32=-11]=`Float32`,e[e.Float64=-12]=`Float64`,e[e.DateDay=-13]=`DateDay`,e[e.DateMillisecond=-14]=`DateMillisecond`,e[e.TimestampSecond=-15]=`TimestampSecond`,e[e.TimestampMillisecond=-16]=`TimestampMillisecond`,e[e.TimestampMicrosecond=-17]=`TimestampMicrosecond`,e[e.TimestampNanosecond=-18]=`TimestampNanosecond`,e[e.TimeSecond=-19]=`TimeSecond`,e[e.TimeMillisecond=-20]=`TimeMillisecond`,e[e.TimeMicrosecond=-21]=`TimeMicrosecond`,e[e.TimeNanosecond=-22]=`TimeNanosecond`,e[e.DenseUnion=-23]=`DenseUnion`,e[e.SparseUnion=-24]=`SparseUnion`,e[e.IntervalDayTime=-25]=`IntervalDayTime`,e[e.IntervalYearMonth=-26]=`IntervalYearMonth`,e[e.DurationSecond=-27]=`DurationSecond`,e[e.DurationMillisecond=-28]=`DurationMillisecond`,e[e.DurationMicrosecond=-29]=`DurationMicrosecond`,e[e.DurationNanosecond=-30]=`DurationNanosecond`})(Y||={});var iN;(function(e){e[e.OFFSET=0]=`OFFSET`,e[e.DATA=1]=`DATA`,e[e.VALIDITY=2]=`VALIDITY`,e[e.TYPE=3]=`TYPE`})(iN||={});const aN=void 0;function oN(e){if(e===null)return`null`;if(e===aN)return`undefined`;switch(typeof e){case`number`:return`${e}`;case`bigint`:return`${e}`;case`string`:return`"${e}"`}return typeof e[Symbol.toPrimitive]==`function`?e[Symbol.toPrimitive](`string`):ArrayBuffer.isView(e)?e instanceof BigInt64Array||e instanceof BigUint64Array?`[${[...e].map(e=>oN(e))}]`:`[${e}]`:ArrayBuffer.isView(e)?`[${e}]`:JSON.stringify(e,(e,t)=>typeof t==`bigint`?`${t}`:t)}function sN(e){if(typeof e==`bigint`&&(e<-(2**53-1)||e>2**53-1))throw TypeError(`${e} is not safe to convert to a number.`);return Number(e)}function cN(e,t){return sN(e/t)+sN(e%t)/sN(t)}const lN=Symbol.for(`isArrowBigNum`);function uN(e,...t){return t.length===0?Object.setPrototypeOf(Vj(this.TypedArray,e),this.constructor.prototype):Object.setPrototypeOf(new this.TypedArray(e,...t),this.constructor.prototype)}uN.prototype[lN]=!0,uN.prototype.toJSON=function(){return`"${_N(this)}"`},uN.prototype.valueOf=function(e){return gN(this,e)},uN.prototype.toString=function(){return _N(this)},uN.prototype[Symbol.toPrimitive]=function(e=`default`){switch(e){case`number`:return gN(this);case`string`:return _N(this);case`default`:return vN(this)}return _N(this)};function dN(...e){return uN.apply(this,e)}function fN(...e){return uN.apply(this,e)}function pN(...e){return uN.apply(this,e)}Object.setPrototypeOf(dN.prototype,Object.create(Int32Array.prototype)),Object.setPrototypeOf(fN.prototype,Object.create(Uint32Array.prototype)),Object.setPrototypeOf(pN.prototype,Object.create(Uint32Array.prototype)),Object.assign(dN.prototype,uN.prototype,{constructor:dN,signed:!0,TypedArray:Int32Array,BigIntArray:BigInt64Array}),Object.assign(fN.prototype,uN.prototype,{constructor:fN,signed:!1,TypedArray:Uint32Array,BigIntArray:BigUint64Array}),Object.assign(pN.prototype,uN.prototype,{constructor:pN,signed:!0,TypedArray:Uint32Array,BigIntArray:BigUint64Array});const mN=BigInt(4294967296)*BigInt(4294967296),hN=mN-BigInt(1);function gN(e,t){let{buffer:n,byteOffset:r,byteLength:i,signed:a}=e,o=new BigUint64Array(n,r,i/8),s=a&&o.at(-1)&BigInt(1)<=0)return yN(e);t=t.slice();let r=1;for(let e=0;e(e.children=null,e.ArrayType=Array,e.OffsetArrayType=Int32Array,e[Symbol.toStringTag]=`DataType`))(UN.prototype);var WN=class extends UN{constructor(){super(Y.Null)}toString(){return`Null`}};SN=Symbol.toStringTag,WN[SN]=(e=>e[Symbol.toStringTag]=`Null`)(WN.prototype);var GN=class extends UN{constructor(e,t){super(Y.Int),this.isSigned=e,this.bitWidth=t}get ArrayType(){switch(this.bitWidth){case 8:return this.isSigned?Int8Array:Uint8Array;case 16:return this.isSigned?Int16Array:Uint16Array;case 32:return this.isSigned?Int32Array:Uint32Array;case 64:return this.isSigned?BigInt64Array:BigUint64Array}throw Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}toString(){return`${this.isSigned?`I`:`Ui`}nt${this.bitWidth}`}};CN=Symbol.toStringTag,GN[CN]=(e=>(e.isSigned=null,e.bitWidth=null,e[Symbol.toStringTag]=`Int`))(GN.prototype);var KN=class extends GN{constructor(){super(!0,8)}get ArrayType(){return Int8Array}},qN=class extends GN{constructor(){super(!0,16)}get ArrayType(){return Int16Array}},JN=class extends GN{constructor(){super(!0,32)}get ArrayType(){return Int32Array}},YN=class extends GN{constructor(){super(!0,64)}get ArrayType(){return BigInt64Array}},XN=class extends GN{constructor(){super(!1,8)}get ArrayType(){return Uint8Array}},ZN=class extends GN{constructor(){super(!1,16)}get ArrayType(){return Uint16Array}},QN=class extends GN{constructor(){super(!1,32)}get ArrayType(){return Uint32Array}},$N=class extends GN{constructor(){super(!1,64)}get ArrayType(){return BigUint64Array}};Object.defineProperty(KN.prototype,`ArrayType`,{value:Int8Array}),Object.defineProperty(qN.prototype,`ArrayType`,{value:Int16Array}),Object.defineProperty(JN.prototype,`ArrayType`,{value:Int32Array}),Object.defineProperty(YN.prototype,`ArrayType`,{value:BigInt64Array}),Object.defineProperty(XN.prototype,`ArrayType`,{value:Uint8Array}),Object.defineProperty(ZN.prototype,`ArrayType`,{value:Uint16Array}),Object.defineProperty(QN.prototype,`ArrayType`,{value:Uint32Array}),Object.defineProperty($N.prototype,`ArrayType`,{value:BigUint64Array});var eP=class extends UN{constructor(e){super(Y.Float),this.precision=e}get ArrayType(){switch(this.precision){case cM.HALF:return Uint16Array;case cM.SINGLE:return Float32Array;case cM.DOUBLE:return Float64Array}throw Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}toString(){return`Float${this.precision<<5||16}`}};wN=Symbol.toStringTag,eP[wN]=(e=>(e.precision=null,e[Symbol.toStringTag]=`Float`))(eP.prototype);var tP=class extends eP{constructor(){super(cM.HALF)}},nP=class extends eP{constructor(){super(cM.SINGLE)}},rP=class extends eP{constructor(){super(cM.DOUBLE)}};Object.defineProperty(tP.prototype,`ArrayType`,{value:Uint16Array}),Object.defineProperty(nP.prototype,`ArrayType`,{value:Float32Array}),Object.defineProperty(rP.prototype,`ArrayType`,{value:Float64Array});var iP=class extends UN{constructor(){super(Y.Binary)}toString(){return`Binary`}};TN=Symbol.toStringTag,iP[TN]=(e=>(e.ArrayType=Uint8Array,e[Symbol.toStringTag]=`Binary`))(iP.prototype);var aP=class extends UN{constructor(){super(Y.LargeBinary)}toString(){return`LargeBinary`}};EN=Symbol.toStringTag,aP[EN]=(e=>(e.ArrayType=Uint8Array,e.OffsetArrayType=BigInt64Array,e[Symbol.toStringTag]=`LargeBinary`))(aP.prototype);var oP=class extends UN{constructor(){super(Y.Utf8)}toString(){return`Utf8`}};DN=Symbol.toStringTag,oP[DN]=(e=>(e.ArrayType=Uint8Array,e[Symbol.toStringTag]=`Utf8`))(oP.prototype);var sP=class extends UN{constructor(){super(Y.LargeUtf8)}toString(){return`LargeUtf8`}};ON=Symbol.toStringTag,sP[ON]=(e=>(e.ArrayType=Uint8Array,e.OffsetArrayType=BigInt64Array,e[Symbol.toStringTag]=`LargeUtf8`))(sP.prototype);var cP=class extends UN{constructor(){super(Y.Bool)}toString(){return`Bool`}};kN=Symbol.toStringTag,cP[kN]=(e=>(e.ArrayType=Uint8Array,e[Symbol.toStringTag]=`Bool`))(cP.prototype);var lP=class extends UN{constructor(e,t,n=128){super(Y.Decimal),this.scale=e,this.precision=t,this.bitWidth=n}toString(){return`Decimal[${this.precision}e${this.scale>0?`+`:``}${this.scale}]`}};AN=Symbol.toStringTag,lP[AN]=(e=>(e.scale=null,e.precision=null,e.ArrayType=Uint32Array,e[Symbol.toStringTag]=`Decimal`))(lP.prototype);var uP=class extends UN{constructor(e){super(Y.Date),this.unit=e}toString(){return`Date${(this.unit+1)*32}<${lM[this.unit]}>`}get ArrayType(){return this.unit===lM.DAY?Int32Array:BigInt64Array}};jN=Symbol.toStringTag,uP[jN]=(e=>(e.unit=null,e[Symbol.toStringTag]=`Date`))(uP.prototype);var dP=class extends UN{constructor(e,t){super(Y.Time),this.unit=e,this.bitWidth=t}toString(){return`Time${this.bitWidth}<${uM[this.unit]}>`}get ArrayType(){switch(this.bitWidth){case 32:return Int32Array;case 64:return BigInt64Array}throw Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}};MN=Symbol.toStringTag,dP[MN]=(e=>(e.unit=null,e.bitWidth=null,e[Symbol.toStringTag]=`Time`))(dP.prototype);var fP=class extends UN{constructor(e,t){super(Y.Timestamp),this.unit=e,this.timezone=t}toString(){return`Timestamp<${uM[this.unit]}${this.timezone?`, ${this.timezone}`:``}>`}};NN=Symbol.toStringTag,fP[NN]=(e=>(e.unit=null,e.timezone=null,e.ArrayType=BigInt64Array,e[Symbol.toStringTag]=`Timestamp`))(fP.prototype);var pP=class extends UN{constructor(e){super(Y.Interval),this.unit=e}toString(){return`Interval<${dM[this.unit]}>`}};PN=Symbol.toStringTag,pP[PN]=(e=>(e.unit=null,e.ArrayType=Int32Array,e[Symbol.toStringTag]=`Interval`))(pP.prototype);var mP=class extends UN{constructor(e){super(Y.Duration),this.unit=e}toString(){return`Duration<${uM[this.unit]}>`}};FN=Symbol.toStringTag,mP[FN]=(e=>(e.unit=null,e.ArrayType=BigInt64Array,e[Symbol.toStringTag]=`Duration`))(mP.prototype);var hP=class extends UN{constructor(e){super(Y.List),this.children=[e]}toString(){return`List<${this.valueType}>`}get valueType(){return this.children[0].type}get valueField(){return this.children[0]}get ArrayType(){return this.valueType.ArrayType}};IN=Symbol.toStringTag,hP[IN]=(e=>(e.children=null,e[Symbol.toStringTag]=`List`))(hP.prototype);var gP=class extends UN{constructor(e){super(Y.Struct),this.children=e}toString(){return`Struct<{${this.children.map(e=>`${e.name}:${e.type}`).join(`, `)}}>`}};LN=Symbol.toStringTag,gP[LN]=(e=>(e.children=null,e[Symbol.toStringTag]=`Struct`))(gP.prototype);var _P=class extends UN{constructor(e,t,n){super(Y.Union),this.mode=e,this.children=n,this.typeIds=t=Int32Array.from(t),this.typeIdToChildIndex=t.reduce((e,t,n)=>(e[t]=n)&&e||e,Object.create(null))}toString(){return`${this[Symbol.toStringTag]}<${this.children.map(e=>`${e.type}`).join(` | `)}>`}};RN=Symbol.toStringTag,_P[RN]=(e=>(e.mode=null,e.typeIds=null,e.children=null,e.typeIdToChildIndex=null,e.ArrayType=Int8Array,e[Symbol.toStringTag]=`Union`))(_P.prototype);var vP=class extends UN{constructor(e){super(Y.FixedSizeBinary),this.byteWidth=e}toString(){return`FixedSizeBinary[${this.byteWidth}]`}};zN=Symbol.toStringTag,vP[zN]=(e=>(e.byteWidth=null,e.ArrayType=Uint8Array,e[Symbol.toStringTag]=`FixedSizeBinary`))(vP.prototype);var yP=class extends UN{constructor(e,t){super(Y.FixedSizeList),this.listSize=e,this.children=[t]}get valueType(){return this.children[0].type}get valueField(){return this.children[0]}get ArrayType(){return this.valueType.ArrayType}toString(){return`FixedSizeList[${this.listSize}]<${this.valueType}>`}};BN=Symbol.toStringTag,yP[BN]=(e=>(e.children=null,e.listSize=null,e[Symbol.toStringTag]=`FixedSizeList`))(yP.prototype);var bP=class extends UN{constructor(e,t=!1){var n,r,i;if(super(Y.Map),this.children=[e],this.keysSorted=t,e&&(e.name=`entries`,(n=e?.type)?.children)){let t=(r=e?.type)?.children[0];t&&(t.name=`key`);let n=(i=e?.type)?.children[1];n&&(n.name=`value`)}}get keyType(){return this.children[0].type.children[0].type}get valueType(){return this.children[0].type.children[1].type}get childType(){return this.children[0].type}toString(){return`Map<{${this.children[0].type.children.map(e=>`${e.name}:${e.type}`).join(`, `)}}>`}};VN=Symbol.toStringTag,bP[VN]=(e=>(e.children=null,e.keysSorted=null,e[Symbol.toStringTag]=`Map_`))(bP.prototype);const xP=(e=>()=>++e)(-1);var SP=class extends UN{constructor(e,t,n,r){super(Y.Dictionary),this.indices=t,this.dictionary=e,this.isOrdered=r||!1,this.id=n==null?xP():sN(n)}get children(){return this.dictionary.children}get valueType(){return this.dictionary}get ArrayType(){return this.dictionary.ArrayType}toString(){return`Dictionary<${this.indices}, ${this.dictionary}>`}};HN=Symbol.toStringTag,SP[HN]=(e=>(e.id=null,e.indices=null,e.isOrdered=null,e.dictionary=null,e[Symbol.toStringTag]=`Dictionary`))(SP.prototype);function CP(e){let t=e;switch(e.typeId){case Y.Decimal:return e.bitWidth/32;case Y.Interval:return 1+t.unit;case Y.FixedSizeList:return t.listSize;case Y.FixedSizeBinary:return t.byteWidth;default:return 1}}var wP=class{visitMany(e,...t){return e.map((e,n)=>this.visit(e,...t.map(e=>e[n])))}visit(...e){return this.getVisitFn(e[0],!1).apply(this,e)}getVisitFn(e,t=!0){return TP(this,e,t)}getVisitFnByTypeId(e,t=!0){return EP(this,e,t)}visitNull(e,...t){return null}visitBool(e,...t){return null}visitInt(e,...t){return null}visitFloat(e,...t){return null}visitUtf8(e,...t){return null}visitLargeUtf8(e,...t){return null}visitBinary(e,...t){return null}visitLargeBinary(e,...t){return null}visitFixedSizeBinary(e,...t){return null}visitDate(e,...t){return null}visitTimestamp(e,...t){return null}visitTime(e,...t){return null}visitDecimal(e,...t){return null}visitList(e,...t){return null}visitStruct(e,...t){return null}visitUnion(e,...t){return null}visitDictionary(e,...t){return null}visitInterval(e,...t){return null}visitDuration(e,...t){return null}visitFixedSizeList(e,...t){return null}visitMap(e,...t){return null}};function TP(e,t,n=!0){return typeof t==`number`?EP(e,t,n):typeof t==`string`&&t in Y?EP(e,Y[t],n):t&&t instanceof UN?EP(e,DP(t),n):t?.type&&t.type instanceof UN?EP(e,DP(t.type),n):EP(e,Y.NONE,n)}function EP(e,t,n=!0){let r=null;switch(t){case Y.Null:r=e.visitNull;break;case Y.Bool:r=e.visitBool;break;case Y.Int:r=e.visitInt;break;case Y.Int8:r=e.visitInt8||e.visitInt;break;case Y.Int16:r=e.visitInt16||e.visitInt;break;case Y.Int32:r=e.visitInt32||e.visitInt;break;case Y.Int64:r=e.visitInt64||e.visitInt;break;case Y.Uint8:r=e.visitUint8||e.visitInt;break;case Y.Uint16:r=e.visitUint16||e.visitInt;break;case Y.Uint32:r=e.visitUint32||e.visitInt;break;case Y.Uint64:r=e.visitUint64||e.visitInt;break;case Y.Float:r=e.visitFloat;break;case Y.Float16:r=e.visitFloat16||e.visitFloat;break;case Y.Float32:r=e.visitFloat32||e.visitFloat;break;case Y.Float64:r=e.visitFloat64||e.visitFloat;break;case Y.Utf8:r=e.visitUtf8;break;case Y.LargeUtf8:r=e.visitLargeUtf8;break;case Y.Binary:r=e.visitBinary;break;case Y.LargeBinary:r=e.visitLargeBinary;break;case Y.FixedSizeBinary:r=e.visitFixedSizeBinary;break;case Y.Date:r=e.visitDate;break;case Y.DateDay:r=e.visitDateDay||e.visitDate;break;case Y.DateMillisecond:r=e.visitDateMillisecond||e.visitDate;break;case Y.Timestamp:r=e.visitTimestamp;break;case Y.TimestampSecond:r=e.visitTimestampSecond||e.visitTimestamp;break;case Y.TimestampMillisecond:r=e.visitTimestampMillisecond||e.visitTimestamp;break;case Y.TimestampMicrosecond:r=e.visitTimestampMicrosecond||e.visitTimestamp;break;case Y.TimestampNanosecond:r=e.visitTimestampNanosecond||e.visitTimestamp;break;case Y.Time:r=e.visitTime;break;case Y.TimeSecond:r=e.visitTimeSecond||e.visitTime;break;case Y.TimeMillisecond:r=e.visitTimeMillisecond||e.visitTime;break;case Y.TimeMicrosecond:r=e.visitTimeMicrosecond||e.visitTime;break;case Y.TimeNanosecond:r=e.visitTimeNanosecond||e.visitTime;break;case Y.Decimal:r=e.visitDecimal;break;case Y.List:r=e.visitList;break;case Y.Struct:r=e.visitStruct;break;case Y.Union:r=e.visitUnion;break;case Y.DenseUnion:r=e.visitDenseUnion||e.visitUnion;break;case Y.SparseUnion:r=e.visitSparseUnion||e.visitUnion;break;case Y.Dictionary:r=e.visitDictionary;break;case Y.Interval:r=e.visitInterval;break;case Y.IntervalDayTime:r=e.visitIntervalDayTime||e.visitInterval;break;case Y.IntervalYearMonth:r=e.visitIntervalYearMonth||e.visitInterval;break;case Y.Duration:r=e.visitDuration;break;case Y.DurationSecond:r=e.visitDurationSecond||e.visitDuration;break;case Y.DurationMillisecond:r=e.visitDurationMillisecond||e.visitDuration;break;case Y.DurationMicrosecond:r=e.visitDurationMicrosecond||e.visitDuration;break;case Y.DurationNanosecond:r=e.visitDurationNanosecond||e.visitDuration;break;case Y.FixedSizeList:r=e.visitFixedSizeList;break;case Y.Map:r=e.visitMap;break}if(typeof r==`function`)return r;if(!n)return()=>null;throw Error(`Unrecognized type '${Y[t]}'`)}function DP(e){switch(e.typeId){case Y.Null:return Y.Null;case Y.Int:{let{bitWidth:t,isSigned:n}=e;switch(t){case 8:return n?Y.Int8:Y.Uint8;case 16:return n?Y.Int16:Y.Uint16;case 32:return n?Y.Int32:Y.Uint32;case 64:return n?Y.Int64:Y.Uint64}return Y.Int}case Y.Float:switch(e.precision){case cM.HALF:return Y.Float16;case cM.SINGLE:return Y.Float32;case cM.DOUBLE:return Y.Float64}return Y.Float;case Y.Binary:return Y.Binary;case Y.LargeBinary:return Y.LargeBinary;case Y.Utf8:return Y.Utf8;case Y.LargeUtf8:return Y.LargeUtf8;case Y.Bool:return Y.Bool;case Y.Decimal:return Y.Decimal;case Y.Time:switch(e.unit){case uM.SECOND:return Y.TimeSecond;case uM.MILLISECOND:return Y.TimeMillisecond;case uM.MICROSECOND:return Y.TimeMicrosecond;case uM.NANOSECOND:return Y.TimeNanosecond}return Y.Time;case Y.Timestamp:switch(e.unit){case uM.SECOND:return Y.TimestampSecond;case uM.MILLISECOND:return Y.TimestampMillisecond;case uM.MICROSECOND:return Y.TimestampMicrosecond;case uM.NANOSECOND:return Y.TimestampNanosecond}return Y.Timestamp;case Y.Date:switch(e.unit){case lM.DAY:return Y.DateDay;case lM.MILLISECOND:return Y.DateMillisecond}return Y.Date;case Y.Interval:switch(e.unit){case dM.DAY_TIME:return Y.IntervalDayTime;case dM.YEAR_MONTH:return Y.IntervalYearMonth}return Y.Interval;case Y.Duration:switch(e.unit){case uM.SECOND:return Y.DurationSecond;case uM.MILLISECOND:return Y.DurationMillisecond;case uM.MICROSECOND:return Y.DurationMicrosecond;case uM.NANOSECOND:return Y.DurationNanosecond}return Y.Duration;case Y.Map:return Y.Map;case Y.List:return Y.List;case Y.Struct:return Y.Struct;case Y.Union:switch(e.mode){case sM.Dense:return Y.DenseUnion;case sM.Sparse:return Y.SparseUnion}return Y.Union;case Y.FixedSizeBinary:return Y.FixedSizeBinary;case Y.FixedSizeList:return Y.FixedSizeList;case Y.Dictionary:return Y.Dictionary}throw Error(`Unrecognized type '${Y[e.typeId]}'`)}wP.prototype.visitInt8=null,wP.prototype.visitInt16=null,wP.prototype.visitInt32=null,wP.prototype.visitInt64=null,wP.prototype.visitUint8=null,wP.prototype.visitUint16=null,wP.prototype.visitUint32=null,wP.prototype.visitUint64=null,wP.prototype.visitFloat16=null,wP.prototype.visitFloat32=null,wP.prototype.visitFloat64=null,wP.prototype.visitDateDay=null,wP.prototype.visitDateMillisecond=null,wP.prototype.visitTimestampSecond=null,wP.prototype.visitTimestampMillisecond=null,wP.prototype.visitTimestampMicrosecond=null,wP.prototype.visitTimestampNanosecond=null,wP.prototype.visitTimeSecond=null,wP.prototype.visitTimeMillisecond=null,wP.prototype.visitTimeMicrosecond=null,wP.prototype.visitTimeNanosecond=null,wP.prototype.visitDenseUnion=null,wP.prototype.visitSparseUnion=null,wP.prototype.visitIntervalDayTime=null,wP.prototype.visitIntervalYearMonth=null,wP.prototype.visitDuration=null,wP.prototype.visitDurationSecond=null,wP.prototype.visitDurationMillisecond=null,wP.prototype.visitDurationMicrosecond=null,wP.prototype.visitDurationNanosecond=null;const OP=new Float64Array(1),kP=new Uint32Array(OP.buffer);function AP(e){let t=(e&31744)>>10,n=(e&1023)/1024,r=(-1)**((e&32768)>>15);switch(t){case 31:return r*(n?NaN:1/0);case 0:return r*(n?6103515625e-14*n:0)}return r*2**(t-15)*(1+n)}function jP(e){if(e!==e)return 32256;OP[0]=e;let t=(kP[1]&2147483648)>>16&65535,n=kP[1]&2146435072,r=0;return n>=1089470464?kP[0]>0?n=31744:(n=(n&2080374784)>>16,r=(kP[1]&1048575)>>10):n<=1056964608?(r=1048576+(kP[1]&1048575),r=1048576+(r<<(n>>20)-998)>>21,n=0):(n=n-1056964608>>10,r=(kP[1]&1048575)+512>>10),t|n|r&65535}var MP=class extends wP{};function NP(e){return(t,n,r)=>{if(t.setValid(n,r!=null))return e(t,n,r)}}const PP=(e,t,n)=>{e[t]=Math.floor(n/864e5)},FP=(e,t,n,r)=>{if(n+1{let i=e+n;r?t[i>>3]|=1<>3]&=~(1<{e[t]=n},RP=({values:e},t,n)=>{e[t]=n},zP=({values:e},t,n)=>{e[t]=jP(n)},BP=(e,t,n)=>{switch(e.type.precision){case cM.HALF:return zP(e,t,n);case cM.SINGLE:case cM.DOUBLE:return RP(e,t,n)}},VP=({values:e},t,n)=>{PP(e,t,n.valueOf())},HP=({values:e},t,n)=>{e[t]=BigInt(n)},UP=({stride:e,values:t},n,r)=>{t.set(r.subarray(0,e),e*n)},WP=({values:e,valueOffsets:t},n,r)=>FP(e,t,n,r),GP=({values:e,valueOffsets:t},n,r)=>FP(e,t,n,yj(r)),KP=(e,t,n)=>{e.type.unit===lM.DAY?VP(e,t,n):HP(e,t,n)},qP=({values:e},t,n)=>{e[t]=BigInt(n/1e3)},JP=({values:e},t,n)=>{e[t]=BigInt(n)},YP=({values:e},t,n)=>{e[t]=BigInt(n*1e3)},XP=({values:e},t,n)=>{e[t]=BigInt(n*1e6)},ZP=(e,t,n)=>{switch(e.type.unit){case uM.SECOND:return qP(e,t,n);case uM.MILLISECOND:return JP(e,t,n);case uM.MICROSECOND:return YP(e,t,n);case uM.NANOSECOND:return XP(e,t,n)}},QP=({values:e},t,n)=>{e[t]=n},$P=({values:e},t,n)=>{e[t]=n},eF=({values:e},t,n)=>{e[t]=n},tF=({values:e},t,n)=>{e[t]=n},nF=(e,t,n)=>{switch(e.type.unit){case uM.SECOND:return QP(e,t,n);case uM.MILLISECOND:return $P(e,t,n);case uM.MICROSECOND:return eF(e,t,n);case uM.NANOSECOND:return tF(e,t,n)}},rF=({values:e,stride:t},n,r)=>{e.set(r.subarray(0,t),t*n)},iF=(e,t,n)=>{let r=e.children[0],i=e.valueOffsets,a=wF.getVisitFn(r);if(Array.isArray(n))for(let e=-1,o=i[t],s=i[t+1];o{let r=e.children[0],{valueOffsets:i}=e,a=wF.getVisitFn(r),{[t]:o,[t+1]:s}=i,c=n instanceof Map?n.entries():Object.entries(n);for(let e of c)if(a(r,o,e),++o>=s)break},oF=(e,t)=>(n,r,i,a)=>r&&n(r,e,t[a]),sF=(e,t)=>(n,r,i,a)=>r&&n(r,e,t.get(a)),cF=(e,t)=>(n,r,i,a)=>r&&n(r,e,t.get(i.name)),lF=(e,t)=>(n,r,i,a)=>r&&n(r,e,t[i.name]),uF=(e,t,n)=>{let r=e.type.children.map(e=>wF.getVisitFn(e.type)),i=n instanceof Map?cF(t,n):n instanceof CL?sF(t,n):Array.isArray(n)?oF(t,n):lF(t,n);e.type.children.forEach((t,n)=>i(r[n],e.children[n],t,n))},dF=(e,t,n)=>{e.type.mode===sM.Dense?fF(e,t,n):pF(e,t,n)},fF=(e,t,n)=>{let r=e.type.typeIdToChildIndex[e.typeIds[t]],i=e.children[r];wF.visit(i,e.valueOffsets[t],n)},pF=(e,t,n)=>{let r=e.type.typeIdToChildIndex[e.typeIds[t]],i=e.children[r];wF.visit(i,t,n)},mF=(e,t,n)=>{var r;(r=e.dictionary)==null||r.set(e.values[t],n)},hF=(e,t,n)=>{e.type.unit===dM.DAY_TIME?gF(e,t,n):_F(e,t,n)},gF=({values:e},t,n)=>{e.set(n.subarray(0,2),2*t)},_F=({values:e},t,n)=>{e[t]=n[0]*12+n[1]%12},vF=({values:e},t,n)=>{e[t]=n},yF=({values:e},t,n)=>{e[t]=n},bF=({values:e},t,n)=>{e[t]=n},xF=({values:e},t,n)=>{e[t]=n},SF=(e,t,n)=>{switch(e.type.unit){case uM.SECOND:return vF(e,t,n);case uM.MILLISECOND:return yF(e,t,n);case uM.MICROSECOND:return bF(e,t,n);case uM.NANOSECOND:return xF(e,t,n)}},CF=(e,t,n)=>{let{stride:r}=e,i=e.children[0],a=wF.getVisitFn(i);if(Array.isArray(n))for(let e=-1,o=t*r;++e`${oN(e)}: ${oN(t)}`).join(`, `)}}`}[Symbol.for(`nodejs.util.inspect.custom`)](){return this.toString()}[Symbol.iterator](){return new OF(this[TF],this[EF])}},OF=class{constructor(e,t){this.childIndex=0,this.children=e.children,this.rowIndex=t,this.childFields=e.type.children,this.numChildren=this.childFields.length}[Symbol.iterator](){return this}next(){let e=this.childIndex;return ee.name)}has(e,t){return e[TF].type.children.findIndex(e=>e.name===t)!==-1}getOwnPropertyDescriptor(e,t){if(e[TF].type.children.findIndex(e=>e.name===t)!==-1)return{writable:!0,enumerable:!0,configurable:!0}}get(e,t){if(Reflect.has(e,t))return e[t];let n=e[TF].type.children.findIndex(e=>e.name===t);if(n!==-1){let r=bI.visit(e[TF].children[n],e[EF]);return Reflect.set(e,t,r),r}}set(e,t,n){let r=e[TF].type.children.findIndex(e=>e.name===t);return r===-1?Reflect.has(e,t)||typeof t==`symbol`?Reflect.set(e,t,n):!1:(wF.visit(e[TF].children[r],e[EF],n),Reflect.set(e,t,n))}},AF=class extends wP{};function jF(e){return(t,n)=>t.getValid(n)?e(t,n):null}const MF=(e,t)=>864e5*e[t],NF=(e,t)=>null,PF=(e,t,n)=>{if(n+1>=t.length)return null;let r=sN(t[n]),i=sN(t[n+1]);return e.subarray(r,i)},FF=({offset:e,values:t},n)=>{let r=e+n,i=t[r>>3];return(i&1<MF(e,t),LF=({values:e},t)=>sN(e[t]),RF=({stride:e,values:t},n)=>t[e*n],zF=({stride:e,values:t},n)=>AP(t[e*n]),BF=({values:e},t)=>e[t],VF=({stride:e,values:t},n)=>t.subarray(e*n,e*(n+1)),HF=({values:e,valueOffsets:t},n)=>PF(e,t,n),UF=({values:e,valueOffsets:t},n)=>{let r=PF(e,t,n);return r===null?null:_j(r)},WF=({values:e},t)=>e[t],GF=({type:e,values:t},n)=>e.precision===cM.HALF?AP(t[n]):t[n],KF=(e,t)=>e.type.unit===lM.DAY?IF(e,t):LF(e,t),qF=({values:e},t)=>1e3*sN(e[t]),JF=({values:e},t)=>sN(e[t]),YF=({values:e},t)=>cN(e[t],BigInt(1e3)),XF=({values:e},t)=>cN(e[t],BigInt(1e6)),ZF=(e,t)=>{switch(e.type.unit){case uM.SECOND:return qF(e,t);case uM.MILLISECOND:return JF(e,t);case uM.MICROSECOND:return YF(e,t);case uM.NANOSECOND:return XF(e,t)}},QF=({values:e},t)=>e[t],$F=({values:e},t)=>e[t],eI=({values:e},t)=>e[t],tI=({values:e},t)=>e[t],nI=(e,t)=>{switch(e.type.unit){case uM.SECOND:return QF(e,t);case uM.MILLISECOND:return $F(e,t);case uM.MICROSECOND:return eI(e,t);case uM.NANOSECOND:return tI(e,t)}},rI=({values:e,stride:t},n)=>bN.decimal(e.subarray(t*n,t*(n+1))),iI=(e,t)=>{let{valueOffsets:n,stride:r,children:i}=e,{[t*r]:a,[t*r+1]:o}=n,s=i[0],c=s.slice(a,o-a);return new CL([c])},aI=(e,t)=>{let{valueOffsets:n,children:r}=e,{[t]:i,[t+1]:a}=n,o=r[0];return new TI(o.slice(i,a-i))},oI=(e,t)=>new DF(e,t),sI=(e,t)=>e.type.mode===sM.Dense?cI(e,t):lI(e,t),cI=(e,t)=>{let n=e.type.typeIdToChildIndex[e.typeIds[t]],r=e.children[n];return bI.visit(r,e.valueOffsets[t])},lI=(e,t)=>{let n=e.type.typeIdToChildIndex[e.typeIds[t]],r=e.children[n];return bI.visit(r,t)},uI=(e,t)=>{var n;return(n=e.dictionary)?.get(e.values[t])},dI=(e,t)=>e.type.unit===dM.DAY_TIME?fI(e,t):pI(e,t),fI=({values:e},t)=>e.subarray(2*t,2*(t+1)),pI=({values:e},t)=>{let n=e[t],r=new Int32Array(2);return r[0]=Math.trunc(n/12),r[1]=Math.trunc(n%12),r},mI=({values:e},t)=>e[t],hI=({values:e},t)=>e[t],gI=({values:e},t)=>e[t],_I=({values:e},t)=>e[t],vI=(e,t)=>{switch(e.type.unit){case uM.SECOND:return mI(e,t);case uM.MILLISECOND:return hI(e,t);case uM.MICROSECOND:return gI(e,t);case uM.NANOSECOND:return _I(e,t)}},yI=(e,t)=>{let{stride:n,children:r}=e,i=r[0],a=i.slice(t*n,n);return new CL([a])};AF.prototype.visitNull=jF(NF),AF.prototype.visitBool=jF(FF),AF.prototype.visitInt=jF(WF),AF.prototype.visitInt8=jF(RF),AF.prototype.visitInt16=jF(RF),AF.prototype.visitInt32=jF(RF),AF.prototype.visitInt64=jF(BF),AF.prototype.visitUint8=jF(RF),AF.prototype.visitUint16=jF(RF),AF.prototype.visitUint32=jF(RF),AF.prototype.visitUint64=jF(BF),AF.prototype.visitFloat=jF(GF),AF.prototype.visitFloat16=jF(zF),AF.prototype.visitFloat32=jF(RF),AF.prototype.visitFloat64=jF(RF),AF.prototype.visitUtf8=jF(UF),AF.prototype.visitLargeUtf8=jF(UF),AF.prototype.visitBinary=jF(HF),AF.prototype.visitLargeBinary=jF(HF),AF.prototype.visitFixedSizeBinary=jF(VF),AF.prototype.visitDate=jF(KF),AF.prototype.visitDateDay=jF(IF),AF.prototype.visitDateMillisecond=jF(LF),AF.prototype.visitTimestamp=jF(ZF),AF.prototype.visitTimestampSecond=jF(qF),AF.prototype.visitTimestampMillisecond=jF(JF),AF.prototype.visitTimestampMicrosecond=jF(YF),AF.prototype.visitTimestampNanosecond=jF(XF),AF.prototype.visitTime=jF(nI),AF.prototype.visitTimeSecond=jF(QF),AF.prototype.visitTimeMillisecond=jF($F),AF.prototype.visitTimeMicrosecond=jF(eI),AF.prototype.visitTimeNanosecond=jF(tI),AF.prototype.visitDecimal=jF(rI),AF.prototype.visitList=jF(iI),AF.prototype.visitStruct=jF(oI),AF.prototype.visitUnion=jF(sI),AF.prototype.visitDenseUnion=jF(cI),AF.prototype.visitSparseUnion=jF(lI),AF.prototype.visitDictionary=jF(uI),AF.prototype.visitInterval=jF(dI),AF.prototype.visitIntervalDayTime=jF(fI),AF.prototype.visitIntervalYearMonth=jF(pI),AF.prototype.visitDuration=jF(vI),AF.prototype.visitDurationSecond=jF(mI),AF.prototype.visitDurationMillisecond=jF(hI),AF.prototype.visitDurationMicrosecond=jF(gI),AF.prototype.visitDurationNanosecond=jF(_I),AF.prototype.visitFixedSizeList=jF(yI),AF.prototype.visitMap=jF(aI);const bI=new AF,xI=Symbol.for(`keys`),SI=Symbol.for(`vals`),CI=Symbol.for(`kKeysAsStrings`),wI=Symbol.for(`_kKeysAsStrings`);var TI=class{constructor(e){return this[xI]=new CL([e.children[0]]).memoize(),this[SI]=e.children[1],new Proxy(this,new DI)}get[CI](){return this[wI]||(this[wI]=Array.from(this[xI].toArray(),String))}[Symbol.iterator](){return new EI(this[xI],this[SI])}get size(){return this[xI].length}toArray(){return Object.values(this.toJSON())}toJSON(){let e=this[xI],t=this[SI],n={};for(let r=-1,i=e.length;++r`${oN(e)}: ${oN(t)}`).join(`, `)}}`}[Symbol.for(`nodejs.util.inspect.custom`)](){return this.toString()}},EI=class{constructor(e,t){this.keys=e,this.vals=t,this.keyIndex=0,this.numKeys=e.length}[Symbol.iterator](){return this}next(){let e=this.keyIndex;return e===this.numKeys?{done:!0,value:null}:(this.keyIndex++,{done:!1,value:[this.keys.get(e),bI.visit(this.vals,e)]})}},DI=class{isExtensible(){return!1}deleteProperty(){return!1}preventExtensions(){return!0}ownKeys(e){return e[CI]}has(e,t){return e[CI].includes(t)}getOwnPropertyDescriptor(e,t){let n=e[CI].indexOf(t);if(n!==-1)return{writable:!0,enumerable:!0,configurable:!0}}get(e,t){if(Reflect.has(e,t))return e[t];let n=e[CI].indexOf(t);if(n!==-1){let r=bI.visit(Reflect.get(e,SI),n);return Reflect.set(e,t,r),r}}set(e,t,n){let r=e[CI].indexOf(t);return r===-1?Reflect.has(e,t)?Reflect.set(e,t,n):!1:(wF.visit(Reflect.get(e,SI),r,n),Reflect.set(e,t,n))}};Object.defineProperties(TI.prototype,{[Symbol.toStringTag]:{enumerable:!1,configurable:!1,value:`Row`},[xI]:{writable:!0,enumerable:!1,configurable:!1,value:null},[SI]:{writable:!0,enumerable:!1,configurable:!1,value:null},[wI]:{writable:!0,enumerable:!1,configurable:!1,value:null}});let OI;function kI(e,t,n,r){let{length:i=0}=e,a=typeof t==`number`?t:0,o=typeof n==`number`?n:i;return a<0&&(a=(a%i+i)%i),o<0&&(o=(o%i+i)%i),oi&&(o=i),r?r(e,a,o):[a,o]}const AI=(e,t)=>e<0?t+e:e,jI=e=>e!==e;function MI(e){let t=typeof e;if(t!==`object`||e===null)return jI(e)?jI:t=>t===e;if(e instanceof Date){let t=e.valueOf();return e=>e instanceof Date?e.valueOf()===t:!1}return ArrayBuffer.isView(e)?t=>t?Zj(e,t):!1:e instanceof Map?PI(e):Array.isArray(e)?NI(e):e instanceof CL?FI(e):II(e,!0)}function NI(e){let t=[];for(let n=-1,r=e.length;++n!1;let r=[];for(let t=-1,i=n.length;++t{if(!n||typeof n!=`object`)return!1;switch(n.constructor){case Array:return RI(e,n);case Map:return BI(e,n,n.keys());case TI:case DF:case Object:case void 0:return BI(e,n,t||Object.keys(n))}return n instanceof CL?zI(e,n):!1}}function RI(e,t){let n=e.length;if(t.length!==n)return!1;for(let r=-1;++r>r}function UI(e,t,n){let r=n.byteLength+7&-8;if(e>0||n.byteLength>3):WI(new GI(n,e,t,null,VI)).subarray(0,r)),i}return n}function WI(e){let t=[],n=0,r=0,i=0;for(let a of e)a&&(i|=1<0)&&(t[n++]=i);let a=new Uint8Array(t.length+7&-8);return a.set(t),a}var GI=class{constructor(e,t,n,r,i){this.bytes=e,this.length=n,this.context=r,this.get=i,this.bit=t%8,this.byteIndex=t>>3,this.byte=e[this.byteIndex++],this.index=0}next(){return this.index>3<<3,i=t+(t%8==0?0:8-t%8);return KI(e,t,i)+KI(e,r,n)+qI(e,i>>3,r-i>>3)}function qI(e,t,n){let r=0,i=Math.trunc(t),a=new DataView(e.buffer,e.byteOffset,e.byteLength),o=n===void 0?e.byteLength:i+n;for(;o-i>=4;)r+=JI(a.getUint32(i)),i+=4;for(;o-i>=2;)r+=JI(a.getUint16(i)),i+=2;for(;o-i>=1;)r+=JI(a.getUint8(i)),i+=1;return r}function JI(e){let t=Math.trunc(e);return t-=t>>>1&1431655765,t=(t&858993459)+(t>>>2&858993459),(t+(t>>>4)&252645135)*16843009>>>24}const YI=-1;var XI=class e{get typeId(){return this.type.typeId}get ArrayType(){return this.type.ArrayType}get buffers(){return[this.valueOffsets,this.values,this.nullBitmap,this.typeIds]}get nullable(){if(this._nullCount!==0){let{type:e}=this;return UN.isSparseUnion(e)||UN.isDenseUnion(e)?this.children.some(e=>e.nullable):this.nullBitmap&&this.nullBitmap.byteLength>0}return!0}get byteLength(){let e=0,{valueOffsets:t,values:n,nullBitmap:r,typeIds:i}=this;return t&&(e+=t.byteLength),n&&(e+=n.byteLength),r&&(e+=r.byteLength),i&&(e+=i.byteLength),this.children.reduce((e,t)=>e+t.byteLength,e)}get nullCount(){if(UN.isUnion(this.type))return this.children.reduce((e,t)=>e+t.nullCount,0);let e=this._nullCount,t;return e<=YI&&(t=this.nullBitmap)&&(this._nullCount=e=t.length===0?0:this.length-KI(t,this.offset,this.offset+this.length)),e}constructor(t,n,r,i,a,o=[],s){this.type=t,this.children=o,this.dictionary=s,this.offset=Math.floor(Math.max(n||0,0)),this.length=Math.floor(Math.max(r||0,0)),this._nullCount=Math.floor(Math.max(i||0,-1));let c;a instanceof e?(this.stride=a.stride,this.values=a.values,this.typeIds=a.typeIds,this.nullBitmap=a.nullBitmap,this.valueOffsets=a.valueOffsets):(this.stride=CP(t),a&&((c=a[0])&&(this.valueOffsets=c),(c=a[1])&&(this.values=c),(c=a[2])&&(this.nullBitmap=c),(c=a[3])&&(this.typeIds=c)))}getValid(e){let{type:t}=this;if(UN.isUnion(t)){let n=t,r=this.children[n.typeIdToChildIndex[this.typeIds[e]]],i=n.mode===sM.Dense?this.valueOffsets[e]:e;return r.getValid(i)}if(this.nullable&&this.nullCount>0){let t=this.offset+e,n=this.nullBitmap[t>>3];return(n&1<>3;(!r||r.byteLength<=c)&&(r=new Uint8Array((i+a+63&-64)>>3).fill(255),this.nullCount>0?(r.set(UI(i,a,this.nullBitmap),0),Object.assign(this,{nullBitmap:r})):Object.assign(this,{nullBitmap:r,_nullCount:0}));let l=r[c];n=(l&s)!==0,r[c]=t?l|s:l&~s}return n!==!!t&&(this._nullCount=this.nullCount+(t?-1:1)),t}clone(t=this.type,n=this.offset,r=this.length,i=this._nullCount,a=this,o=this.children){return new e(t,n,r,i,a,o,this.dictionary)}slice(e,t){let{stride:n,typeId:r,children:i}=this,a=(this._nullCount===0)-1,o=r===16?n:1,s=this._sliceBuffers(e,t,n,r);return this.clone(this.type,this.offset+e,t,a,s,i.length===0||this.valueOffsets?i:this._sliceChildren(i,o*e,o*t))}_changeLengthAndBackfillNullBitmap(e){if(this.typeId===Y.Null)return this.clone(this.type,0,e,0);let{length:t,nullCount:n}=this,r=new Uint8Array((e+63&-64)>>3).fill(255,0,t>>3);r[t>>3]=(1<0&&r.set(UI(this.offset,t,this.nullBitmap),0);let i=this.buffers;return i[iN.VALIDITY]=r,this.clone(this.type,0,e,n+(e-t),i)}_sliceBuffers(e,t,n,r){let i,{buffers:a}=this;return(i=a[iN.TYPE])&&(a[iN.TYPE]=i.subarray(e,e+t)),(i=a[iN.OFFSET])&&(a[iN.OFFSET]=i.subarray(e,e+t+1))||(i=a[iN.DATA])&&(a[iN.DATA]=r===6?i:i.subarray(n*e,n*(e+t))),a}_sliceChildren(e,t,n){return e.map(e=>e.slice(t,n))}};XI.prototype.children=Object.freeze([]);var ZI=class e extends wP{visit(e){return this.getVisitFn(e.type).call(this,e)}visitNull(e){let{type:t,offset:n=0,length:r=0}=e;return new XI(t,n,r,r)}visitBool(e){let{type:t,offset:n=0}=e,r=Wj(e.nullBitmap),i=Vj(t.ArrayType,e.data),{length:a=i.length>>3,nullCount:o=e.nullBitmap?-1:0}=e;return new XI(t,n,a,o,[void 0,i,r])}visitInt(e){let{type:t,offset:n=0}=e,r=Wj(e.nullBitmap),i=Vj(t.ArrayType,e.data),{length:a=i.length,nullCount:o=e.nullBitmap?-1:0}=e;return new XI(t,n,a,o,[void 0,i,r])}visitFloat(e){let{type:t,offset:n=0}=e,r=Wj(e.nullBitmap),i=Vj(t.ArrayType,e.data),{length:a=i.length,nullCount:o=e.nullBitmap?-1:0}=e;return new XI(t,n,a,o,[void 0,i,r])}visitUtf8(e){let{type:t,offset:n=0}=e,r=Wj(e.data),i=Wj(e.nullBitmap),a=Hj(e.valueOffsets),{length:o=a.length-1,nullCount:s=e.nullBitmap?-1:0}=e;return new XI(t,n,o,s,[a,r,i])}visitLargeUtf8(e){let{type:t,offset:n=0}=e,r=Wj(e.data),i=Wj(e.nullBitmap),a=Uj(e.valueOffsets),{length:o=a.length-1,nullCount:s=e.nullBitmap?-1:0}=e;return new XI(t,n,o,s,[a,r,i])}visitBinary(e){let{type:t,offset:n=0}=e,r=Wj(e.data),i=Wj(e.nullBitmap),a=Hj(e.valueOffsets),{length:o=a.length-1,nullCount:s=e.nullBitmap?-1:0}=e;return new XI(t,n,o,s,[a,r,i])}visitLargeBinary(e){let{type:t,offset:n=0}=e,r=Wj(e.data),i=Wj(e.nullBitmap),a=Uj(e.valueOffsets),{length:o=a.length-1,nullCount:s=e.nullBitmap?-1:0}=e;return new XI(t,n,o,s,[a,r,i])}visitFixedSizeBinary(e){let{type:t,offset:n=0}=e,r=Wj(e.nullBitmap),i=Vj(t.ArrayType,e.data),{length:a=i.length/CP(t),nullCount:o=e.nullBitmap?-1:0}=e;return new XI(t,n,a,o,[void 0,i,r])}visitDate(e){let{type:t,offset:n=0}=e,r=Wj(e.nullBitmap),i=Vj(t.ArrayType,e.data),{length:a=i.length/CP(t),nullCount:o=e.nullBitmap?-1:0}=e;return new XI(t,n,a,o,[void 0,i,r])}visitTimestamp(e){let{type:t,offset:n=0}=e,r=Wj(e.nullBitmap),i=Vj(t.ArrayType,e.data),{length:a=i.length/CP(t),nullCount:o=e.nullBitmap?-1:0}=e;return new XI(t,n,a,o,[void 0,i,r])}visitTime(e){let{type:t,offset:n=0}=e,r=Wj(e.nullBitmap),i=Vj(t.ArrayType,e.data),{length:a=i.length/CP(t),nullCount:o=e.nullBitmap?-1:0}=e;return new XI(t,n,a,o,[void 0,i,r])}visitDecimal(e){let{type:t,offset:n=0}=e,r=Wj(e.nullBitmap),i=Vj(t.ArrayType,e.data),{length:a=i.length/CP(t),nullCount:o=e.nullBitmap?-1:0}=e;return new XI(t,n,a,o,[void 0,i,r])}visitList(e){let{type:t,offset:n=0,child:r}=e,i=Wj(e.nullBitmap),a=Hj(e.valueOffsets),{length:o=a.length-1,nullCount:s=e.nullBitmap?-1:0}=e;return new XI(t,n,o,s,[a,void 0,i],[r])}visitStruct(e){let{type:t,offset:n=0,children:r=[]}=e,i=Wj(e.nullBitmap),{length:a=r.reduce((e,{length:t})=>Math.max(e,t),0),nullCount:o=e.nullBitmap?-1:0}=e;return new XI(t,n,a,o,[void 0,void 0,i],r)}visitUnion(e){let{type:t,offset:n=0,children:r=[]}=e,i=Vj(t.ArrayType,e.typeIds),{length:a=i.length,nullCount:o=-1}=e;if(UN.isSparseUnion(t))return new XI(t,n,a,o,[void 0,void 0,void 0,i],r);let s=Hj(e.valueOffsets);return new XI(t,n,a,o,[s,void 0,void 0,i],r)}visitDictionary(t){let{type:n,offset:r=0}=t,i=Wj(t.nullBitmap),a=Vj(n.indices.ArrayType,t.data),{dictionary:o=new CL([new e().visit({type:n.dictionary})])}=t,{length:s=a.length,nullCount:c=t.nullBitmap?-1:0}=t;return new XI(n,r,s,c,[void 0,a,i],[],o)}visitInterval(e){let{type:t,offset:n=0}=e,r=Wj(e.nullBitmap),i=Vj(t.ArrayType,e.data),{length:a=i.length/CP(t),nullCount:o=e.nullBitmap?-1:0}=e;return new XI(t,n,a,o,[void 0,i,r])}visitDuration(e){let{type:t,offset:n=0}=e,r=Wj(e.nullBitmap),i=Vj(t.ArrayType,e.data),{length:a=i.length,nullCount:o=e.nullBitmap?-1:0}=e;return new XI(t,n,a,o,[void 0,i,r])}visitFixedSizeList(t){let{type:n,offset:r=0,child:i=new e().visit({type:n.valueType})}=t,a=Wj(t.nullBitmap),{length:o=i.length/CP(n),nullCount:s=t.nullBitmap?-1:0}=t;return new XI(n,r,o,s,[void 0,void 0,a],[i])}visitMap(t){let{type:n,offset:r=0,child:i=new e().visit({type:n.childType})}=t,a=Wj(t.nullBitmap),o=Hj(t.valueOffsets),{length:s=o.length-1,nullCount:c=t.nullBitmap?-1:0}=t;return new XI(n,r,s,c,[o,void 0,a],[i])}};const QI=new ZI;function $I(e){return QI.visit(e)}var eL=class{constructor(e=0,t){this.numChunks=e,this.getChunkIterator=t,this.chunkIndex=0,this.chunkIterator=this.getChunkIterator(0)}next(){for(;this.chunkIndexe.nullable)}function nL(e){return e.reduce((e,t)=>e+t.nullCount,0)}function rL(e){return e.reduce((e,t,n)=>(e[n+1]=e[n]+t.length,e),new Uint32Array(e.length+1))}function iL(e,t,n,r){let i=[];for(let a=-1,o=e.length;++a=r)break;if(n>=s+c)continue;if(s>=n&&s+c<=r){i.push(o);continue}let l=Math.max(0,n-s),u=Math.min(r-s,c);i.push(o.slice(l,u-l))}return i.length===0&&i.push(e[0].slice(0,0)),i}function aL(e,t,n,r){let i=0,a=0,o=t.length-1;do{if(i>=o-1)return n0?0:-1}function fL(e,t){let{nullBitmap:n}=e;if(!n||e.nullCount<=0)return-1;let r=0;for(let i of new GI(n,e.offset+(t||0),e.length,n,VI)){if(!i)return r;++r}return-1}function pL(e,t,n){if(t===void 0)return-1;if(t===null)switch(e.typeId){case Y.Union:break;case Y.Dictionary:break;default:return fL(e,n)}let r=bI.getVisitFn(e),i=MI(t);for(let t=(n||0)-1,a=e.length;++t{let n=e.data[t];return n.values.subarray(0,n.length)[Symbol.iterator]()});let n=0;return new eL(e.data.length,t=>{let r=e.data[t],i=r.length,a=e.slice(n,n+i);return n+=i,new vL(a)})}var vL=class{constructor(e){this.vector=e,this.index=0}next(){return this.indexe.data):t;if(a.length===0||a.some(e=>!(e instanceof XI)))throw TypeError(`Vector constructor expects an Array of Data instances.`);let o=(n=a[0])?.type;switch(a.length){case 0:this._offsets=[0];break;case 1:{let{get:e,set:t,indexOf:n}=xL[o.typeId],r=a[0];this.isValid=e=>oL(r,e),this.get=t=>e(r,t),this.set=(e,n)=>t(r,e,n),this.indexOf=e=>n(r,e),this._offsets=[0,r.length];break}default:Object.setPrototypeOf(this,SL[o.typeId]),this._offsets=rL(a);break}this.data=a,this.type=o,this.stride=CP(o),this.numChildren=(i=(r=o.children)?.length)??0,this.length=this._offsets.at(-1)}get byteLength(){return this.data.reduce((e,t)=>e+t.byteLength,0)}get nullable(){return tL(this.data)}get nullCount(){return nL(this.data)}get ArrayType(){return this.type.ArrayType}get[Symbol.toStringTag](){return`${this.VectorName}<${this.type[Symbol.toStringTag]}>`}get VectorName(){return`${Y[this.type.typeId]}Vector`}isValid(e){return!1}get(e){return null}at(e){return this.get(AI(e,this.length))}set(e,t){}indexOf(e,t){return-1}includes(e,t){return this.indexOf(e,t)>-1}[Symbol.iterator](){return yL.visit(this)}concat(...t){return new e(this.data.concat(t.flatMap(e=>e.data).flat(1/0)))}slice(t,n){return new e(kI(this,t,n,({data:e,_offsets:t},n,r)=>iL(e,t,n,r)))}toJSON(){return[...this]}toArray(){let{type:e,data:t,length:n,stride:r,ArrayType:i}=this;switch(e.typeId){case Y.Int:case Y.Float:case Y.Decimal:case Y.Time:case Y.Timestamp:switch(t.length){case 0:return new i;case 1:return t[0].values.subarray(0,n*r);default:return t.reduce((e,{values:t,length:n})=>(e.array.set(t.subarray(0,n*r),e.offset),e.offset+=n*r,e),{array:new i(n*r),offset:0}).array}}return[...this]}toString(){return`[${[...this].join(`,`)}]`}getChild(e){var t;return this.getChildAt((t=this.type.children)?.findIndex(t=>t.name===e))}getChildAt(t){return t>-1&&te[t])):null}get isMemoized(){return UN.isDictionary(this.type)?this.data[0].dictionary.isMemoized:!1}memoize(){if(UN.isDictionary(this.type)){let t=new wL(this.data[0].dictionary),n=this.data.map(e=>{let n=e.clone();return n.dictionary=t,n});return new e(n)}return new wL(this)}unmemoize(){if(UN.isDictionary(this.type)&&this.isMemoized){let t=this.data[0].dictionary.unmemoize(),n=this.data.map(e=>{let n=e.clone();return n.dictionary=t,n});return new e(n)}return this}};bL=Symbol.toStringTag,CL[bL]=(e=>{e.type=UN.prototype,e.data=[],e.length=0,e.stride=1,e.numChildren=0,e._offsets=new Uint32Array([0]),e[Symbol.isConcatSpreadable]=!0;let t=Object.keys(Y).map(e=>Y[e]).filter(e=>typeof e==`number`&&e!==Y.NONE);for(let n of t){let t=bI.getVisitFnByTypeId(n),r=wF.getVisitFnByTypeId(n),i=hL.getVisitFnByTypeId(n);xL[n]={get:t,set:r,indexOf:i},SL[n]=Object.create(e,{isValid:{value:sL(oL)},get:{value:sL(bI.getVisitFnByTypeId(n))},set:{value:cL(wF.getVisitFnByTypeId(n))},indexOf:{value:lL(hL.getVisitFnByTypeId(n))}})}return`Vector`})(CL.prototype);var wL=class e extends CL{constructor(t){super(t.data);let n=this.get,r=this.set,i=this.slice,a=Array(this.length);Object.defineProperty(this,`get`,{value(e){let t=a[e];if(t!==void 0)return t;let r=n.call(this,e);return a[e]=r,r}}),Object.defineProperty(this,`set`,{value(e,t){r.call(this,e,t),a[e]=t}}),Object.defineProperty(this,`slice`,{value:(t,n)=>new e(i.call(this,t,n))}),Object.defineProperty(this,`isMemoized`,{value:!0}),Object.defineProperty(this,`unmemoize`,{value:()=>new CL(this.data)}),Object.defineProperty(this,`memoize`,{value:()=>this})}},TL=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}offset(){return this.bb.readInt64(this.bb_pos)}metaDataLength(){return this.bb.readInt32(this.bb_pos+8)}bodyLength(){return this.bb.readInt64(this.bb_pos+16)}static sizeOf(){return 24}static createBlock(e,t,n,r){return e.prep(8,24),e.writeInt64(BigInt(r??0)),e.pad(4),e.writeInt32(n),e.writeInt64(BigInt(t??0)),e.offset()}},EL=class e{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsFooter(t,n){return(n||new e).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsFooter(t,n){return t.setPosition(t.position()+hM),(n||new e).__init(t.readInt32(t.position())+t.position(),t)}version(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):oM.V1}schema(e){let t=this.bb.__offset(this.bb_pos,6);return t?(e||new nN).__init(this.bb.__indirect(this.bb_pos+t),this.bb):null}dictionaries(e,t){let n=this.bb.__offset(this.bb_pos,8);return n?(t||new TL).__init(this.bb.__vector(this.bb_pos+n)+e*24,this.bb):null}dictionariesLength(){let e=this.bb.__offset(this.bb_pos,8);return e?this.bb.__vector_len(this.bb_pos+e):0}recordBatches(e,t){let n=this.bb.__offset(this.bb_pos,10);return n?(t||new TL).__init(this.bb.__vector(this.bb_pos+n)+e*24,this.bb):null}recordBatchesLength(){let e=this.bb.__offset(this.bb_pos,10);return e?this.bb.__vector_len(this.bb_pos+e):0}customMetadata(e,t){let n=this.bb.__offset(this.bb_pos,12);return n?(t||new PM).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+n)+e*4),this.bb):null}customMetadataLength(){let e=this.bb.__offset(this.bb_pos,12);return e?this.bb.__vector_len(this.bb_pos+e):0}static startFooter(e){e.startObject(5)}static addVersion(e,t){e.addFieldInt16(0,t,oM.V1)}static addSchema(e,t){e.addFieldOffset(1,t,0)}static addDictionaries(e,t){e.addFieldOffset(2,t,0)}static startDictionariesVector(e,t){e.startVector(24,t,8)}static addRecordBatches(e,t){e.addFieldOffset(3,t,0)}static startRecordBatchesVector(e,t){e.startVector(24,t,8)}static addCustomMetadata(e,t){e.addFieldOffset(4,t,0)}static createCustomMetadataVector(e,t){e.startVector(4,t.length,4);for(let n=t.length-1;n>=0;n--)e.addOffset(t[n]);return e.endVector()}static startCustomMetadataVector(e,t){e.startVector(4,t,4)}static endFooter(e){let t=e.endObject();return t}static finishFooterBuffer(e,t){e.finish(t)}static finishSizePrefixedFooterBuffer(e,t){e.finish(t,void 0,!0)}},DL=class e{constructor(e=[],t,n,r=oM.V5){this.fields=e||[],this.metadata=t||new Map,n||=AL(this.fields),this.dictionaries=n,this.metadataVersion=r}get[Symbol.toStringTag](){return`Schema`}get names(){return this.fields.map(e=>e.name)}toString(){return`Schema<{ ${this.fields.map((e,t)=>`${t}: ${e}`).join(`, `)} }>`}select(t){let n=new Set(t),r=this.fields.filter(e=>n.has(e.name));return new e(r,this.metadata)}selectAt(t){let n=t.map(e=>this.fields[e]).filter(Boolean);return new e(n,this.metadata)}assign(...t){let n=t[0]instanceof e?t[0]:Array.isArray(t[0])?new e(t[0]):new e(t),r=[...this.fields],i=kL(kL(new Map,this.metadata),n.metadata),a=n.fields.filter(e=>{let t=r.findIndex(t=>t.name===e.name);return~t?(r[t]=e.clone({metadata:kL(kL(new Map,r[t].metadata),e.metadata)}))&&!1:!0}),o=AL(a,new Map);return new e([...r,...a],i,new Map([...this.dictionaries,...o]))}};DL.prototype.fields=null,DL.prototype.metadata=null,DL.prototype.dictionaries=null;var OL=class e{static new(...t){let[n,r,i,a]=t;return t[0]&&typeof t[0]==`object`&&({name:n}=t[0],r===void 0&&(r=t[0].type),i===void 0&&(i=t[0].nullable),a===void 0&&(a=t[0].metadata)),new e(`${n}`,r,i,a)}constructor(e,t,n=!1,r){this.name=e,this.type=t,this.nullable=n,this.metadata=r||new Map}get typeId(){return this.type.typeId}get[Symbol.toStringTag](){return`Field`}toString(){return`${this.name}: ${this.type}`}clone(...t){let[n,r,i,a]=t;return!t[0]||typeof t[0]!=`object`?[n=this.name,r=this.type,i=this.nullable,a=this.metadata]=t:{name:n=this.name,type:r=this.type,nullable:i=this.nullable,metadata:a=this.metadata}=t[0],e.new(n,r,i,a)}};OL.prototype.type=null,OL.prototype.name=null,OL.prototype.nullable=null,OL.prototype.metadata=null;function kL(e,t){return new Map([...e||new Map,...t||new Map])}function AL(e,t=new Map){for(let n=-1,r=e.length;++n0&&AL(i.children,t)}return t}var jL=SM,ML=xM,NL=class{static decode(e){e=new ML(Wj(e));let t=EL.getRootAsFooter(e),n=DL.decode(t.schema(),new Map,t.version());return new PL(n,t)}static encode(e){let t=new jL,n=DL.encode(t,e.schema);EL.startRecordBatchesVector(t,e.numRecordBatches);for(let n of[...e.recordBatches()].slice().reverse())FL.encode(t,n);let r=t.endVector();EL.startDictionariesVector(t,e.numDictionaries);for(let n of[...e.dictionaryBatches()].slice().reverse())FL.encode(t,n);let i=t.endVector();return EL.startFooter(t),EL.addSchema(t,n),EL.addVersion(t,oM.V5),EL.addRecordBatches(t,r),EL.addDictionaries(t,i),EL.finishFooterBuffer(t,EL.endFooter(t)),t.asUint8Array()}get numRecordBatches(){return this._recordBatches.length}get numDictionaries(){return this._dictionaryBatches.length}constructor(e,t=oM.V5,n,r){this.schema=e,this.version=t,n&&(this._recordBatches=n),r&&(this._dictionaryBatches=r)}*recordBatches(){for(let e,t=-1,n=this.numRecordBatches;++t=0&&e=0&&e=0&&e=0&&ethis._closedPromiseResolve=e)}get closed(){return this._closedPromise}cancel(e){return uj(this,void 0,void 0,function*(){yield this.return(e)})}write(e){this._ensureOpen()&&(this.resolvers.length<=0?this._values.push(e):this.resolvers.shift().resolve({done:!1,value:e}))}abort(e){this._closedPromiseResolve&&(this.resolvers.length<=0?this._error={error:e}:this.resolvers.shift().reject({done:!0,value:e}))}close(){if(this._closedPromiseResolve){let{resolvers:e}=this;for(;e.length>0;)e.shift().resolve(IL);this._closedPromiseResolve(),this._closedPromiseResolve=void 0}}[Symbol.asyncIterator](){return this}toDOMStream(e){return Qj.toDOMStream(this._closedPromiseResolve||this._error?this:this._values,e)}toNodeStream(e){return Qj.toNodeStream(this._closedPromiseResolve||this._error?this:this._values,e)}throw(e){return uj(this,void 0,void 0,function*(){return yield this.abort(e),IL})}return(e){return uj(this,void 0,void 0,function*(){return yield this.close(),IL})}read(e){return uj(this,void 0,void 0,function*(){return(yield this.next(e,`read`)).value})}peek(e){return uj(this,void 0,void 0,function*(){return(yield this.next(e,`peek`)).value})}next(...e){return this._values.length>0?Promise.resolve({done:!1,value:this._values.shift()}):this._error?Promise.reject({done:!0,value:this._error.error}):this._closedPromiseResolve?new Promise((e,t)=>{this.resolvers.push({resolve:e,reject:t})}):Promise.resolve(IL)}_ensureOpen(){if(this._closedPromiseResolve)return!0;throw Error(`AsyncQueue is closed`)}},BL=class extends zL{write(e){if((e=Wj(e)).byteLength>0)return super.write(e)}toString(e=!1){return e?_j(this.toUint8Array(!0)):this.toUint8Array(!1).then(_j)}toUint8Array(e=!1){return e?Bj(this._values)[0]:(()=>uj(this,void 0,void 0,function*(){var e,t,n,r;let i=[],a=0;try{for(var o=!0,s=hj(this),c;c=yield s.next(),e=c.done,!e;o=!0){r=c.value,o=!1;let e=r;i.push(e),a+=e.byteLength}}catch(e){t={error:e}}finally{try{!o&&!e&&(n=s.return)&&(yield n.call(s))}finally{if(t)throw t.error}}return Bj(i,a)[0]}))()}},VL=class{constructor(e){e&&(this.source=new UL(Qj.fromIterable(e)))}[Symbol.iterator](){return this}next(e){return this.source.next(e)}throw(e){return this.source.throw(e)}return(e){return this.source.return(e)}peek(e){return this.source.peek(e)}read(e){return this.source.read(e)}},HL=class e{constructor(t){t instanceof e?this.source=t.source:t instanceof BL?this.source=new WL(Qj.fromAsyncIterable(t)):Fj(t)?this.source=new WL(Qj.fromNodeStream(t)):Nj(t)?this.source=new WL(Qj.fromDOMStream(t)):Aj(t)?this.source=new WL(Qj.fromDOMStream(t.body)):Tj(t)?this.source=new WL(Qj.fromIterable(t)):(wj(t)||Ej(t))&&(this.source=new WL(Qj.fromAsyncIterable(t)))}[Symbol.asyncIterator](){return this}next(e){return this.source.next(e)}throw(e){return this.source.throw(e)}return(e){return this.source.return(e)}get closed(){return this.source.closed}cancel(e){return this.source.cancel(e)}peek(e){return this.source.peek(e)}read(e){return this.source.read(e)}},UL=class{constructor(e){this.source=e}cancel(e){this.return(e)}peek(e){return this.next(e,`peek`).value}read(e){return this.next(e,`read`).value}next(e,t=`read`){return this.source.next({cmd:t,size:e})}throw(e){return Object.create(this.source.throw&&this.source.throw(e)||IL)}return(e){return Object.create(this.source.return&&this.source.return(e)||IL)}},WL=class{constructor(e){this.source=e,this._closedPromise=new Promise(e=>this._closedPromiseResolve=e)}cancel(e){return uj(this,void 0,void 0,function*(){yield this.return(e)})}get closed(){return this._closedPromise}read(e){return uj(this,void 0,void 0,function*(){return(yield this.next(e,`read`)).value})}peek(e){return uj(this,void 0,void 0,function*(){return(yield this.next(e,`peek`)).value})}next(e){return uj(this,arguments,void 0,function*(e,t=`read`){return yield this.source.next({cmd:t,size:e})})}throw(e){return uj(this,void 0,void 0,function*(){let t=this.source.throw&&(yield this.source.throw(e))||IL;return this._closedPromiseResolve&&this._closedPromiseResolve(),this._closedPromiseResolve=void 0,Object.create(t)})}return(e){return uj(this,void 0,void 0,function*(){let t=this.source.return&&(yield this.source.return(e))||IL;return this._closedPromiseResolve&&this._closedPromiseResolve(),this._closedPromiseResolve=void 0,Object.create(t)})}},GL=class extends VL{constructor(e,t){super(),this.position=0,this.buffer=Wj(e),this.size=t===void 0?this.buffer.byteLength:t}readInt32(e){let{buffer:t,byteOffset:n}=this.readAt(e,4);return new DataView(t,n).getInt32(0,!0)}seek(e){return this.position=Math.min(e,this.size),euj(this,void 0,void 0,function*(){this.size=(yield e.stat()).size,delete this._pending}))()}readInt32(e){return uj(this,void 0,void 0,function*(){let{buffer:t,byteOffset:n}=yield this.readAt(e,4);return new DataView(t,n).getInt32(0,!0)})}seek(e){return uj(this,void 0,void 0,function*(){return this._pending&&(yield this._pending),this.position=Math.min(e,this.size),e>>16,this.buffer[1]&65535,this.buffer[0]>>>16,this.buffer[0]&65535]),n=new Uint32Array([e.buffer[1]>>>16,e.buffer[1]&65535,e.buffer[0]>>>16,e.buffer[0]&65535]),r=t[3]*n[3];this.buffer[0]=r&65535;let i=r>>>16;return r=t[2]*n[3],i+=r,r=t[3]*n[2]>>>0,i+=r,this.buffer[0]+=i<<16,this.buffer[1]=i>>>0>>16,this.buffer[1]+=t[1]*n[3]+t[2]*n[2]+t[3]*n[1],this.buffer[1]+=t[0]*n[3]+t[1]*n[2]+t[2]*n[1]+t[3]*n[0]<<16,this}_plus(e){let t=this.buffer[0]+e.buffer[0]>>>0;this.buffer[1]+=e.buffer[1],t>>0&&++this.buffer[1],this.buffer[0]=t}lessThan(e){return this.buffer[1]>>0,t[2]=this.buffer[2]+e.buffer[2]>>>0,t[1]=this.buffer[1]+e.buffer[1]>>>0,t[0]=this.buffer[0]+e.buffer[0]>>>0,t[0]>>0&&++t[1],t[1]>>0&&++t[2],t[2]>>0&&++t[3],this.buffer[3]=t[3],this.buffer[2]=t[2],this.buffer[1]=t[1],this.buffer[0]=t[0],this}hex(){return`${JL(this.buffer[3])} ${JL(this.buffer[2])} ${JL(this.buffer[1])} ${JL(this.buffer[0])}`}static multiply(t,n){let r=new e(new Uint32Array(t.buffer));return r.times(n)}static add(t,n){let r=new e(new Uint32Array(t.buffer));return r.plus(n)}static from(t,n=new Uint32Array(4)){return e.fromString(typeof t==`string`?t:t.toString(),n)}static fromNumber(t,n=new Uint32Array(4)){return e.fromString(t.toString(),n)}static fromString(t,n=new Uint32Array(4)){let r=t.startsWith(`-`),i=t.length,a=new e(n);for(let n=r?1:0;n0&&this.readData(e,n)||new Uint8Array}readOffsets(e,t){return this.readData(e,t)}readTypeIds(e,t){return this.readData(e,t)}readData(e,{length:t,offset:n}=this.nextBufferRange()){return this.bytes.subarray(n,n+t)}readDictionary(e){return this.dictionaries.get(e.id)}},nR=class extends tR{constructor(e,t,n,r,i){super(new Uint8Array,t,n,r,i),this.sources=e}readNullBitmap(e,t,{offset:n}=this.nextBufferRange()){return t<=0?new Uint8Array:WI(this.sources[n])}readOffsets(e,{offset:t}=this.nextBufferRange()){return Vj(Uint8Array,Vj(e.OffsetArrayType,this.sources[t]))}readTypeIds(e,{offset:t}=this.nextBufferRange()){return Vj(Uint8Array,Vj(e.ArrayType,this.sources[t]))}readData(e,{offset:t}=this.nextBufferRange()){let{sources:n}=this;return UN.isTimestamp(e)||(UN.isInt(e)||UN.isTime(e))&&e.bitWidth===64||UN.isDuration(e)||UN.isDate(e)&&e.unit===lM.MILLISECOND?Vj(Uint8Array,$L.convertArray(n[t])):UN.isDecimal(e)?Vj(Uint8Array,eR.convertArray(n[t])):UN.isBinary(e)||UN.isLargeBinary(e)||UN.isFixedSizeBinary(e)?rR(n[t]):UN.isBool(e)?WI(n[t]):UN.isUtf8(e)||UN.isLargeUtf8(e)?yj(n[t].join(``)):Vj(Uint8Array,Vj(e.ArrayType,n[t].map(e=>+e)))}};function rR(e){let t=e.join(``),n=new Uint8Array(t.length/2);for(let e=0;e>1]=Number.parseInt(t.slice(e,e+2),16);return n}var iR=class extends wP{compareSchemas(e,t){return e===t||t instanceof e.constructor&&this.compareManyFields(e.fields,t.fields)}compareManyFields(e,t){return e===t||Array.isArray(e)&&Array.isArray(t)&&e.length===t.length&&e.every((e,n)=>this.compareFields(e,t[n]))}compareFields(e,t){return e===t||t instanceof e.constructor&&e.name===t.name&&e.nullable===t.nullable&&this.visit(e.type,t.type)}};function aR(e,t){return t instanceof e.constructor}function oR(e,t){return e===t||aR(e,t)}function sR(e,t){return e===t||aR(e,t)&&e.bitWidth===t.bitWidth&&e.isSigned===t.isSigned}function cR(e,t){return e===t||aR(e,t)&&e.precision===t.precision}function lR(e,t){return e===t||aR(e,t)&&e.byteWidth===t.byteWidth}function uR(e,t){return e===t||aR(e,t)&&e.unit===t.unit}function dR(e,t){return e===t||aR(e,t)&&e.unit===t.unit&&e.timezone===t.timezone}function fR(e,t){return e===t||aR(e,t)&&e.unit===t.unit&&e.bitWidth===t.bitWidth}function pR(e,t){return e===t||aR(e,t)&&e.children.length===t.children.length&&xR.compareManyFields(e.children,t.children)}function mR(e,t){return e===t||aR(e,t)&&e.children.length===t.children.length&&xR.compareManyFields(e.children,t.children)}function hR(e,t){return e===t||aR(e,t)&&e.mode===t.mode&&e.typeIds.every((e,n)=>e===t.typeIds[n])&&xR.compareManyFields(e.children,t.children)}function gR(e,t){return e===t||aR(e,t)&&e.id===t.id&&e.isOrdered===t.isOrdered&&xR.visit(e.indices,t.indices)&&xR.visit(e.dictionary,t.dictionary)}function _R(e,t){return e===t||aR(e,t)&&e.unit===t.unit}function vR(e,t){return e===t||aR(e,t)&&e.unit===t.unit}function yR(e,t){return e===t||aR(e,t)&&e.listSize===t.listSize&&e.children.length===t.children.length&&xR.compareManyFields(e.children,t.children)}function bR(e,t){return e===t||aR(e,t)&&e.keysSorted===t.keysSorted&&e.children.length===t.children.length&&xR.compareManyFields(e.children,t.children)}iR.prototype.visitNull=oR,iR.prototype.visitBool=oR,iR.prototype.visitInt=sR,iR.prototype.visitInt8=sR,iR.prototype.visitInt16=sR,iR.prototype.visitInt32=sR,iR.prototype.visitInt64=sR,iR.prototype.visitUint8=sR,iR.prototype.visitUint16=sR,iR.prototype.visitUint32=sR,iR.prototype.visitUint64=sR,iR.prototype.visitFloat=cR,iR.prototype.visitFloat16=cR,iR.prototype.visitFloat32=cR,iR.prototype.visitFloat64=cR,iR.prototype.visitUtf8=oR,iR.prototype.visitLargeUtf8=oR,iR.prototype.visitBinary=oR,iR.prototype.visitLargeBinary=oR,iR.prototype.visitFixedSizeBinary=lR,iR.prototype.visitDate=uR,iR.prototype.visitDateDay=uR,iR.prototype.visitDateMillisecond=uR,iR.prototype.visitTimestamp=dR,iR.prototype.visitTimestampSecond=dR,iR.prototype.visitTimestampMillisecond=dR,iR.prototype.visitTimestampMicrosecond=dR,iR.prototype.visitTimestampNanosecond=dR,iR.prototype.visitTime=fR,iR.prototype.visitTimeSecond=fR,iR.prototype.visitTimeMillisecond=fR,iR.prototype.visitTimeMicrosecond=fR,iR.prototype.visitTimeNanosecond=fR,iR.prototype.visitDecimal=oR,iR.prototype.visitList=pR,iR.prototype.visitStruct=mR,iR.prototype.visitUnion=hR,iR.prototype.visitDenseUnion=hR,iR.prototype.visitSparseUnion=hR,iR.prototype.visitDictionary=gR,iR.prototype.visitInterval=_R,iR.prototype.visitIntervalDayTime=_R,iR.prototype.visitIntervalYearMonth=_R,iR.prototype.visitDuration=vR,iR.prototype.visitDurationSecond=vR,iR.prototype.visitDurationMillisecond=vR,iR.prototype.visitDurationMicrosecond=vR,iR.prototype.visitDurationNanosecond=vR,iR.prototype.visitFixedSizeList=yR,iR.prototype.visitMap=bR;const xR=new iR;function SR(e,t){return xR.compareSchemas(e,t)}function CR(e,t){return wR(e,t.map(e=>e.data.concat()))}function wR(e,t){let n=[...e.fields],r=[],i={numBatches:t.reduce((e,t)=>Math.max(e,t.length),0)},a=0,o=0,s=-1,c=t.length,l,u=[];for(;i.numBatches-- >0;){for(o=1/0,s=-1;++s0&&(r[a++]=$I({type:new gP(n),length:o,nullCount:0,children:u.slice()})))}return[e=e.assign(n),r.map(t=>new kR(e,t))]}function TR(e,t,n,r,i){var a;let o=(t+63&-64)>>3;for(let s=-1,c=r.length;++s=t)l===t?n[s]=c:(n[s]=c.slice(0,t),i.numBatches=Math.max(i.numBatches,r[s].unshift(c.slice(t,l-t))));else{let r=e[s];e[s]=r.clone({nullable:!0}),n[s]=(a=c?._changeLengthAndBackfillNullBitmap(t))??$I({type:r.type,length:t,nullCount:t,nullBitmap:new Uint8Array(o)})}}return n}var ER,DR=class e{constructor(...t){var n,r;if(t.length===0)return this.batches=[],this.schema=new DL([]),this._offsets=[0],this;let i,a;t[0]instanceof DL&&(i=t.shift()),t.at(-1)instanceof Uint32Array&&(a=t.pop());let o=t=>{if(t){if(t instanceof kR)return[t];if(t instanceof e)return t.batches;if(t instanceof XI){if(t.type instanceof gP)return[new kR(new DL(t.type.children),t)]}else if(Array.isArray(t))return t.flatMap(e=>o(e));else if(typeof t[Symbol.iterator]==`function`)return[...t].flatMap(e=>o(e));else if(typeof t==`object`){let e=Object.keys(t),n=e.map(e=>new CL([t[e]])),r=i??new DL(e.map((e,t)=>new OL(String(e),n[t].type,n[t].nullable))),[,a]=CR(r,n);return a.length===0?[new kR(t)]:a}}return[]},s=t.flatMap(e=>o(e));if(i=(r=i??(n=s[0])?.schema)??new DL([]),!(i instanceof DL))throw TypeError(`Table constructor expects a [Schema, RecordBatch[]] pair.`);for(let e of s){if(!(e instanceof kR))throw TypeError(`Table constructor expects a [Schema, RecordBatch[]] pair.`);if(!SR(i,e.schema))throw TypeError(`Table and inner RecordBatch schemas must be equivalent.`)}this.schema=i,this.batches=s,this._offsets=a??rL(this.data)}get data(){return this.batches.map(({data:e})=>e)}get numCols(){return this.schema.fields.length}get numRows(){return this.data.reduce((e,t)=>e+t.length,0)}get nullCount(){return this._nullCount===-1&&(this._nullCount=nL(this.data)),this._nullCount}isValid(e){return!1}get(e){return null}at(e){return this.get(AI(e,this.numRows))}set(e,t){}indexOf(e,t){return-1}[Symbol.iterator](){return this.batches.length>0?yL.visit(new CL(this.data)):[][Symbol.iterator]()}toArray(){return[...this]}toString(){return`[\n ${this.toArray().join(`, - `)}\n]`}concat(...t){let n=this.schema,r=this.data.concat(t.flatMap(({data:e})=>e));return new e(n,r.map(e=>new kR(n,e)))}slice(t,n){let r=this.schema;[t,n]=kI({length:this.numRows},t,n);let i=iL(this.data,this._offsets,t,n);return new e(r,i.map(e=>new kR(r,e)))}getChild(e){return this.getChildAt(this.schema.fields.findIndex(t=>t.name===e))}getChildAt(e){if(e>-1&&et.children[e]);if(t.length===0){let{type:n}=this.schema.fields[e],r=$I({type:n,length:0,nullCount:0});t.push(r._changeLengthAndBackfillNullBitmap(this.numRows))}return new CL(t)}return null}setChild(e,t){var n;return this.setChildAt((n=this.schema.fields)?.findIndex(t=>t.name===e),t)}setChildAt(t,n){let r=this.schema,i=[...this.batches];if(t>-1&&tthis.getChildAt(t));[e[t],o[t]]=[a,n],[r,i]=CR(r,o)}return new e(r,i)}select(e){let t=this.schema.fields.reduce((e,t,n)=>e.set(t.name,n),new Map);return this.selectAt(e.map(e=>t.get(e)).filter(e=>e>-1))}selectAt(t){let n=this.schema.selectAt(t),r=this.batches.map(e=>e.selectAt(t));return new e(n,r)}assign(t){let n=this.schema.fields,[r,i]=t.schema.fields.reduce((e,t,r)=>{let[i,a]=e,o=n.findIndex(e=>e.name===t.name);return~o?a[o]=r:i.push(r),e},[[],[]]),a=this.schema.assign(t.schema),o=[...n.map((e,t)=>[t,i[t]]).map(([e,n])=>n===void 0?this.getChildAt(e):t.getChildAt(n)),...r.map(e=>t.getChildAt(e))].filter(Boolean);return new e(...CR(a,o))}};ER=Symbol.toStringTag,DR[ER]=(e=>(e.schema=null,e.batches=[],e._offsets=new Uint32Array([0]),e._nullCount=-1,e[Symbol.isConcatSpreadable]=!0,e.isValid=sL(oL),e.get=sL(bI.getVisitFn(Y.Struct)),e.set=cL(wF.getVisitFn(Y.Struct)),e.indexOf=lL(hL.getVisitFn(Y.Struct)),`Table`))(DR.prototype);var OR,kR=class e{constructor(...e){switch(e.length){case 2:if([this.schema]=e,!(this.schema instanceof DL)||([,this.data=$I({nullCount:0,type:new gP(this.schema.fields),children:this.schema.fields.map(e=>$I({type:e.type,nullCount:0}))})]=e,!(this.data instanceof XI)))throw TypeError(`RecordBatch constructor expects a [Schema, Data] pair.`);[this.schema,this.data]=AR(this.schema,this.data.children);break;case 1:{let[t]=e,{fields:n,children:r,length:i}=Object.keys(t).reduce((e,n,r)=>(e.children[r]=t[n],e.length=Math.max(e.length,t[n].length),e.fields[r]=OL.new({name:n,type:t[n].type,nullable:!0}),e),{length:0,fields:[],children:[]}),a=new DL(n),o=$I({type:new gP(n),length:i,children:r,nullCount:0});[this.schema,this.data]=AR(a,o.children,i);break}default:throw TypeError(`RecordBatch constructor expects an Object mapping names to child Data, or a [Schema, Data] pair.`)}}get dictionaries(){return this._dictionaries||=jR(this.schema.fields,this.data.children)}get numCols(){return this.schema.fields.length}get numRows(){return this.data.length}get nullCount(){return this.data.nullCount}isValid(e){return this.data.getValid(e)}get(e){return bI.visit(this.data,e)}at(e){return this.get(AI(e,this.numRows))}set(e,t){return wF.visit(this.data,e,t)}indexOf(e,t){return hL.visit(this.data,e,t)}[Symbol.iterator](){return yL.visit(new CL([this.data]))}toArray(){return[...this]}concat(...e){return new DR(this.schema,[this,...e])}slice(t,n){let[r]=new CL([this.data]).slice(t,n).data;return new e(this.schema,r)}getChild(e){var t;return this.getChildAt((t=this.schema.fields)?.findIndex(t=>t.name===e))}getChildAt(e){return e>-1&&et.name===e),t)}setChildAt(t,n){let r=this.schema,i=this.data;if(t>-1&&tt.name===e);~t&&(i[t]=this.data.children[t])}return new e(n,$I({type:r,length:this.numRows,children:i}))}selectAt(t){let n=this.schema.selectAt(t),r=t.map(e=>this.data.children[e]).filter(Boolean),i=$I({type:new gP(n.fields),length:this.numRows,children:r});return new e(n,i)}};OR=Symbol.toStringTag,kR[OR]=(e=>(e._nullCount=-1,e[Symbol.isConcatSpreadable]=!0,`RecordBatch`))(kR.prototype);function AR(e,t,n=t.reduce((e,t)=>Math.max(e,t.length),0)){var r;let i=[...e.fields],a=[...t],o=(n+63&-64)>>3;for(let[s,c]of e.fields.entries()){let e=t[s];(!e||e.length!==n)&&(i[s]=c.clone({nullable:!0}),a[s]=(r=e?._changeLengthAndBackfillNullBitmap(n))??$I({type:c.type,length:n,nullCount:n,nullBitmap:new Uint8Array(o)}))}return[e.assign(i),$I({type:new gP(i),length:n,children:a})]}function jR(e,t,n=new Map){var r,i;if(((r=e?.length)??0)>0&&e?.length===t?.length)for(let r=-1,a=e.length;++r$I({type:e.type})),n=$I({type:new gP(e.fields),nullCount:0,children:t});super(e,n)}},NR=class e{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsMessage(t,n){return(n||new e).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsMessage(t,n){return t.setPosition(t.position()+hM),(n||new e).__init(t.readInt32(t.position())+t.position(),t)}version(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):oM.V1}headerType(){let e=this.bb.__offset(this.bb_pos,6);return e?this.bb.readUint8(this.bb_pos+e):rN.NONE}header(e){let t=this.bb.__offset(this.bb_pos,8);return t?this.bb.__union(e,this.bb_pos+t):null}bodyLength(){let e=this.bb.__offset(this.bb_pos,10);return e?this.bb.readInt64(this.bb_pos+e):BigInt(`0`)}customMetadata(e,t){let n=this.bb.__offset(this.bb_pos,12);return n?(t||new PM).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+n)+e*4),this.bb):null}customMetadataLength(){let e=this.bb.__offset(this.bb_pos,12);return e?this.bb.__vector_len(this.bb_pos+e):0}static startMessage(e){e.startObject(5)}static addVersion(e,t){e.addFieldInt16(0,t,oM.V1)}static addHeaderType(e,t){e.addFieldInt8(1,t,rN.NONE)}static addHeader(e,t){e.addFieldOffset(2,t,0)}static addBodyLength(e,t){e.addFieldInt64(3,t,BigInt(`0`))}static addCustomMetadata(e,t){e.addFieldOffset(4,t,0)}static createCustomMetadataVector(e,t){e.startVector(4,t.length,4);for(let n=t.length-1;n>=0;n--)e.addOffset(t[n]);return e.endVector()}static startCustomMetadataVector(e,t){e.startVector(4,t,4)}static endMessage(e){let t=e.endObject();return t}static finishMessageBuffer(e,t){e.finish(t)}static finishSizePrefixedMessageBuffer(e,t){e.finish(t,void 0,!0)}static createMessage(t,n,r,i,a,o){return e.startMessage(t),e.addVersion(t,n),e.addHeaderType(t,r),e.addHeader(t,i),e.addBodyLength(t,a),e.addCustomMetadata(t,o),e.endMessage(t)}},PR=class extends wP{visit(e,t){return e==null||t==null?void 0:super.visit(e,t)}visitNull(e,t){return JM.startNull(t),JM.endNull(t)}visitInt(e,t){return MM.startInt(t),MM.addBitWidth(t,e.bitWidth),MM.addIsSigned(t,e.isSigned),MM.endInt(t)}visitFloat(e,t){return HM.startFloatingPoint(t),HM.addPrecision(t,e.precision),HM.endFloatingPoint(t)}visitBinary(e,t){return FM.startBinary(t),FM.endBinary(t)}visitLargeBinary(e,t){return WM.startLargeBinary(t),WM.endLargeBinary(t)}visitBool(e,t){return IM.startBool(t),IM.endBool(t)}visitUtf8(e,t){return $M.startUtf8(t),$M.endUtf8(t)}visitLargeUtf8(e,t){return GM.startLargeUtf8(t),GM.endLargeUtf8(t)}visitDecimal(e,t){return RM.startDecimal(t),RM.addScale(t,e.scale),RM.addPrecision(t,e.precision),RM.addBitWidth(t,e.bitWidth),RM.endDecimal(t)}visitDate(e,t){return LM.startDate(t),LM.addUnit(t,e.unit),LM.endDate(t)}visitTime(e,t){return XM.startTime(t),XM.addUnit(t,e.unit),XM.addBitWidth(t,e.bitWidth),XM.endTime(t)}visitTimestamp(e,t){let n=e.timezone&&t.createString(e.timezone)||void 0;return ZM.startTimestamp(t),ZM.addUnit(t,e.unit),n!==void 0&&ZM.addTimezone(t,n),ZM.endTimestamp(t)}visitInterval(e,t){return UM.startInterval(t),UM.addUnit(t,e.unit),UM.endInterval(t)}visitDuration(e,t){return zM.startDuration(t),zM.addUnit(t,e.unit),zM.endDuration(t)}visitList(e,t){return KM.startList(t),KM.endList(t)}visitStruct(e,t){return YM.startStruct_(t),YM.endStruct_(t)}visitUnion(e,t){QM.startTypeIdsVector(t,e.typeIds.length);let n=QM.createTypeIdsVector(t,e.typeIds);return QM.startUnion(t),QM.addMode(t,e.mode),QM.addTypeIds(t,n),QM.endUnion(t)}visitDictionary(e,t){let n=this.visit(e.indices,t);return NM.startDictionaryEncoding(t),NM.addId(t,BigInt(e.id)),NM.addIsOrdered(t,e.isOrdered),n!==void 0&&NM.addIndexType(t,n),NM.endDictionaryEncoding(t)}visitFixedSizeBinary(e,t){return BM.startFixedSizeBinary(t),BM.addByteWidth(t,e.byteWidth),BM.endFixedSizeBinary(t)}visitFixedSizeList(e,t){return VM.startFixedSizeList(t),VM.addListSize(t,e.listSize),VM.endFixedSizeList(t)}visitMap(e,t){return qM.startMap(t),qM.addKeysSorted(t,e.keysSorted),qM.endMap(t)}};const FR=new PR;function IR(e,t=new Map){return new DL(zR(e,t),GR(e.metadata),t)}function LR(e){return new ZR(e.count,VR(e.columns),HR(e.columns))}function RR(e){return new QR(LR(e.data),e.id,e.isDelta)}function zR(e,t){return(e.fields||[]).filter(Boolean).map(e=>OL.fromJSON(e,t))}function BR(e,t){return(e.children||[]).filter(Boolean).map(e=>OL.fromJSON(e,t))}function VR(e){return(e||[]).reduce((e,t)=>[...e,new ez(t.count,UR(t.VALIDITY)),...VR(t.children)],[])}function HR(e,t=[]){for(let n=-1,r=(e||[]).length;++ne+ +(t===0),0)}function WR(e,t){let n,r,i,a,o,s;return!t||!(a=e.dictionary)?(o=qR(e,BR(e,t)),i=new OL(e.name,o,e.nullable,GR(e.metadata))):t.has(n=a.id)?(r=(r=a.indexType)?KR(r):new JN,s=new SP(t.get(n),r,n,a.isOrdered),i=new OL(e.name,s,e.nullable,GR(e.metadata))):(r=(r=a.indexType)?KR(r):new JN,t.set(n,o=qR(e,BR(e,t))),s=new SP(o,r,n,a.isOrdered),i=new OL(e.name,s,e.nullable,GR(e.metadata))),i||null}function GR(e=[]){return new Map(e.map(({key:e,value:t})=>[e,t]))}function KR(e){return new GN(e.isSigned,e.bitWidth)}function qR(e,t){let n=e.type.name;switch(n){case`NONE`:return new WN;case`null`:return new WN;case`binary`:return new iP;case`largebinary`:return new aP;case`utf8`:return new oP;case`largeutf8`:return new sP;case`bool`:return new cP;case`list`:return new hP((t||[])[0]);case`struct`:return new gP(t||[]);case`struct_`:return new gP(t||[])}switch(n){case`int`:{let t=e.type;return new GN(t.isSigned,t.bitWidth)}case`floatingpoint`:{let t=e.type;return new eP(cM[t.precision])}case`decimal`:{let t=e.type;return new lP(t.scale,t.precision,t.bitWidth)}case`date`:{let t=e.type;return new uP(lM[t.unit])}case`time`:{let t=e.type;return new dP(uM[t.unit],t.bitWidth)}case`timestamp`:{let t=e.type;return new fP(uM[t.unit],t.timezone)}case`interval`:{let t=e.type;return new pP(dM[t.unit])}case`duration`:{let t=e.type;return new mP(uM[t.unit])}case`union`:{let n=e.type,[r,...i]=(n.mode+``).toLowerCase(),a=r.toUpperCase()+i.join(``);return new _P(sM[a],n.typeIds||[],t||[])}case`fixedsizebinary`:{let t=e.type;return new vP(t.byteWidth)}case`fixedsizelist`:{let n=e.type;return new yP(n.listSize,(t||[])[0])}case`map`:{let n=e.type;return new bP((t||[])[0],n.keysSorted)}}throw Error(`Unrecognized type: "${n}"`)}var JR=SM,YR=xM,XR=class e{static fromJSON(t,n){let r=new e(0,oM.V5,n);return r._createHeader=tz(t,n),r}static decode(t){t=new YR(Wj(t));let n=NR.getRootAsMessage(t),r=n.bodyLength(),i=n.version(),a=n.headerType(),o=new e(r,i,a);return o._createHeader=nz(n,a),o}static encode(e){let t=new JR,n=-1;return e.isSchema()?n=DL.encode(t,e.header()):e.isRecordBatch()?n=ZR.encode(t,e.header()):e.isDictionaryBatch()&&(n=QR.encode(t,e.header())),NR.startMessage(t),NR.addVersion(t,oM.V5),NR.addHeader(t,n),NR.addHeaderType(t,e.headerType),NR.addBodyLength(t,BigInt(e.bodyLength)),NR.finishMessageBuffer(t,NR.endMessage(t)),t.asUint8Array()}static from(t,n=0){if(t instanceof DL)return new e(0,oM.V5,rN.Schema,t);if(t instanceof ZR)return new e(n,oM.V5,rN.RecordBatch,t);if(t instanceof QR)return new e(n,oM.V5,rN.DictionaryBatch,t);throw Error(`Unrecognized Message header: ${t}`)}get type(){return this.headerType}get version(){return this._version}get headerType(){return this._headerType}get bodyLength(){return this._bodyLength}header(){return this._createHeader()}isSchema(){return this.headerType===rN.Schema}isRecordBatch(){return this.headerType===rN.RecordBatch}isDictionaryBatch(){return this.headerType===rN.DictionaryBatch}constructor(e,t,n,r){this._version=t,this._headerType=n,this.body=new Uint8Array,r&&(this._createHeader=()=>r),this._bodyLength=sN(e)}},ZR=class{get nodes(){return this._nodes}get length(){return this._length}get buffers(){return this._buffers}constructor(e,t,n){this._nodes=t,this._buffers=n,this._length=sN(e)}},QR=class{get id(){return this._id}get data(){return this._data}get isDelta(){return this._isDelta}get length(){return this.data.length}get nodes(){return this.data.nodes}get buffers(){return this.data.buffers}constructor(e,t,n=!1){this._data=e,this._isDelta=n,this._id=sN(t)}},$R=class{constructor(e,t){this.offset=sN(e),this.length=sN(t)}},ez=class{constructor(e,t){this.length=sN(e),this.nullCount=sN(t)}};function tz(e,t){return()=>{switch(t){case rN.Schema:return DL.fromJSON(e);case rN.RecordBatch:return ZR.fromJSON(e);case rN.DictionaryBatch:return QR.fromJSON(e)}throw Error(`Unrecognized Message type: { name: ${rN[t]}, type: ${t} }`)}}function nz(e,t){return()=>{switch(t){case rN.Schema:return DL.decode(e.header(new nN),new Map,e.version());case rN.RecordBatch:return ZR.decode(e.header(new OM),e.version());case rN.DictionaryBatch:return QR.decode(e.header(new kM),e.version())}throw Error(`Unrecognized Message type: { name: ${rN[t]}, type: ${t} }`)}}OL.encode=_z,OL.decode=fz,OL.fromJSON=WR,DL.encode=gz,DL.decode=rz,DL.fromJSON=IR,ZR.encode=vz,ZR.decode=iz,ZR.fromJSON=LR,QR.encode=yz,QR.decode=az,QR.fromJSON=RR,ez.encode=bz,ez.decode=sz,$R.encode=xz,$R.decode=oz;function rz(e,t=new Map,n=oM.V5){let r=uz(e,t);return new DL(r,pz(e),t,n)}function iz(e,t=oM.V5){if(e.compression()!==null)throw Error(`Record batch compression not implemented`);return new ZR(e.length(),cz(e),lz(e,t))}function az(e,t=oM.V5){return new QR(ZR.decode(e.data(),t),e.id(),e.isDelta())}function oz(e){return new $R(e.offset(),e.length())}function sz(e){return new ez(e.length(),e.nullCount())}function cz(e){let t=[];for(let n,r=-1,i=-1,a=e.nodesLength();++rOL.encode(e,t));nN.startFieldsVector(e,n.length);let r=nN.createFieldsVector(e,n),i=t.metadata&&t.metadata.size>0?nN.createCustomMetadataVector(e,[...t.metadata].map(([t,n])=>{let r=e.createString(`${t}`),i=e.createString(`${n}`);return PM.startKeyValue(e),PM.addKey(e,r),PM.addValue(e,i),PM.endKeyValue(e)})):-1;return nN.startSchema(e),nN.addFields(e,r),nN.addEndianness(e,Sz?AM.Little:AM.Big),i!==-1&&nN.addCustomMetadata(e,i),nN.endSchema(e)}function _z(e,t){let n=-1,r=-1,i=-1,a=t.type,o=t.typeId;UN.isDictionary(a)?(o=a.dictionary.typeId,i=FR.visit(a,e),r=FR.visit(a.dictionary,e)):r=FR.visit(a,e);let s=(a.children||[]).map(t=>OL.encode(e,t)),c=tN.createChildrenVector(e,s),l=t.metadata&&t.metadata.size>0?tN.createCustomMetadataVector(e,[...t.metadata].map(([t,n])=>{let r=e.createString(`${t}`),i=e.createString(`${n}`);return PM.startKeyValue(e),PM.addKey(e,r),PM.addValue(e,i),PM.endKeyValue(e)})):-1;return t.name&&(n=e.createString(t.name)),tN.startField(e),tN.addType(e,r),tN.addTypeType(e,o),tN.addChildren(e,c),tN.addNullable(e,!!t.nullable),n!==-1&&tN.addName(e,n),i!==-1&&tN.addDictionary(e,i),l!==-1&&tN.addCustomMetadata(e,l),tN.endField(e)}function vz(e,t){let n=t.nodes||[],r=t.buffers||[];OM.startNodesVector(e,n.length);for(let t of n.slice().reverse())ez.encode(e,t);let i=e.endVector();OM.startBuffersVector(e,r.length);for(let t of r.slice().reverse())$R.encode(e,t);let a=e.endVector();return OM.startRecordBatch(e),OM.addLength(e,BigInt(t.length)),OM.addNodes(e,i),OM.addBuffers(e,a),OM.endRecordBatch(e)}function yz(e,t){let n=ZR.encode(e,t.data);return kM.startDictionaryBatch(e),kM.addId(e,BigInt(t.id)),kM.addIsDelta(e,t.isDelta),kM.addData(e,n),kM.endDictionaryBatch(e)}function bz(e,t){return DM.createFieldNode(e,BigInt(t.length),BigInt(t.nullCount))}function xz(e,t){return EM.createBuffer(e,BigInt(t.offset),BigInt(t.length))}const Sz=(()=>{let e=new ArrayBuffer(2);return new DataView(e).setInt16(0,256,!0),new Int16Array(e)[0]===256})(),Cz=e=>`Expected ${rN[e]} Message in stream, but was null or length 0.`,wz=e=>`Header pointer of flatbuffer-encoded ${rN[e]} Message is null or length 0.`,Tz=(e,t)=>`Expected to read ${e} metadata bytes, but only read ${t}.`,Ez=(e,t)=>`Expected to read ${e} bytes for message body, but only read ${t}.`;var Dz=class{constructor(e){this.source=e instanceof VL?e:new VL(e)}[Symbol.iterator](){return this}next(){let e;return(e=this.readMetadataLength()).done||e.value===-1&&(e=this.readMetadataLength()).done||(e=this.readMetadata(e.value)).done?IL:e}throw(e){return this.source.throw(e)}return(e){return this.source.return(e)}readMessage(e){let t;if((t=this.next()).done)return null;if(e!=null&&t.value.headerType!==e)throw Error(Cz(e));return t.value}readMessageBody(e){if(e<=0)return new Uint8Array;let t=Wj(this.source.read(e));if(t.byteLength[...e,...n.VALIDITY&&[n.VALIDITY]||[],...n.TYPE_ID&&[n.TYPE_ID]||[],...n.OFFSET&&[n.OFFSET]||[],...n.DATA&&[n.DATA]||[],...t(n.children)],[])}}readMessage(e){let t;if((t=this.next()).done)return null;if(e!=null&&t.value.headerType!==e)throw Error(Cz(e));return t.value}readSchema(){let e=rN.Schema,t=this.readMessage(e),n=t?.header();if(!t||!n)throw Error(wz(e));return n}};const Az=4,jz=`ARROW1`,Mz=new Uint8Array(jz.length);for(let e=0;ethis):this}readRecordBatch(e){return this._impl.isFile()?this._impl.readRecordBatch(e):null}[Symbol.iterator](){return this._impl[Symbol.iterator]()}[Symbol.asyncIterator](){return this._impl[Symbol.asyncIterator]()}toDOMStream(){return Qj.toDOMStream(this.isSync()?{[Symbol.iterator]:()=>this}:{[Symbol.asyncIterator]:()=>this})}toNodeStream(){return Qj.toNodeStream(this.isSync()?{[Symbol.iterator]:()=>this}:{[Symbol.asyncIterator]:()=>this},{objectMode:!0})}static throughNode(e){throw Error(`"throughNode" not available in this environment`)}static throughDOM(e,t){throw Error(`"throughDOM" not available in this environment`)}static from(t){return t instanceof e?t:Dj(t)?Zz(t):kj(t)?eB(t):wj(t)?(()=>uj(this,void 0,void 0,function*(){return yield e.from(yield t)}))():Aj(t)||Nj(t)||Fj(t)||Ej(t)?$z(new HL(t)):Qz(new VL(t))}static readAll(t){return t instanceof e?t.isSync()?Yz(t):Xz(t):Dj(t)||ArrayBuffer.isView(t)||Tj(t)||Oj(t)?Yz(t):Xz(t)}},Rz=class extends Lz{constructor(e){super(e),this._impl=e}readAll(){return[...this]}[Symbol.iterator](){return this._impl[Symbol.iterator]()}[Symbol.asyncIterator](){return pj(this,arguments,function*(){yield fj(yield*mj(hj(this[Symbol.iterator]())))})}},zz=class extends Lz{constructor(e){super(e),this._impl=e}readAll(){return uj(this,void 0,void 0,function*(){var e,t,n,r;let i=[];try{for(var a=!0,o=hj(this),s;s=yield o.next(),e=s.done,!e;a=!0){r=s.value,a=!1;let e=r;i.push(e)}}catch(e){t={error:e}}finally{try{!a&&!e&&(n=o.return)&&(yield n.call(o))}finally{if(t)throw t.error}}return i})}[Symbol.iterator](){throw Error(`AsyncRecordBatchStreamReader is not Iterable`)}[Symbol.asyncIterator](){return this._impl[Symbol.asyncIterator]()}},Bz=class extends Rz{constructor(e){super(e),this._impl=e}},Vz=class extends zz{constructor(e){super(e),this._impl=e}},Hz=class{get numDictionaries(){return this._dictionaryIndex}get numRecordBatches(){return this._recordBatchIndex}constructor(e=new Map){this.closed=!1,this.autoDestroy=!0,this._dictionaryIndex=0,this._recordBatchIndex=0,this.dictionaries=e}isSync(){return!1}isAsync(){return!1}isFile(){return!1}isStream(){return!1}reset(e){return this._dictionaryIndex=0,this._recordBatchIndex=0,this.schema=e,this.dictionaries=new Map,this}_loadRecordBatch(e,t){let n=this._loadVectors(e,t,this.schema.fields),r=$I({type:new gP(this.schema.fields),length:e.length,children:n});return new kR(this.schema,r)}_loadDictionaryBatch(e,t){let{id:n,isDelta:r}=e,{dictionaries:i,schema:a}=this,o=i.get(n),s=a.dictionaries.get(n),c=this._loadVectors(e.data,t,[s]);return(o&&r?o.concat(new CL(c)):new CL(c)).memoize()}_loadVectors(e,t,n){return new tR(t,e.nodes,e.buffers,this.dictionaries,this.schema.metadataVersion).visitMany(n)}},Uz=class extends Hz{constructor(e,t){super(t),this._reader=Dj(e)?new kz(this._handle=e):new Dz(this._handle=e)}isSync(){return!0}isStream(){return!0}[Symbol.iterator](){return this}cancel(){!this.closed&&(this.closed=!0)&&(this.reset()._reader.return(),this._reader=null,this.dictionaries=null)}open(e){return this.closed||(this.autoDestroy=Jz(this,e),(this.schema||=this._reader.readSchema())||this.cancel()),this}throw(e){return!this.closed&&this.autoDestroy&&(this.closed=!0)?this.reset()._reader.throw(e):IL}return(e){return!this.closed&&this.autoDestroy&&(this.closed=!0)?this.reset()._reader.return(e):IL}next(){if(this.closed)return IL;let e,{_reader:t}=this;for(;e=this._readNextMessageAndValidate();)if(e.isSchema())this.reset(e.header());else if(e.isRecordBatch()){this._recordBatchIndex++;let n=e.header(),r=t.readMessageBody(e.bodyLength),i=this._loadRecordBatch(n,r);return{done:!1,value:i}}else if(e.isDictionaryBatch()){this._dictionaryIndex++;let n=e.header(),r=t.readMessageBody(e.bodyLength),i=this._loadDictionaryBatch(n,r);this.dictionaries.set(n.id,i)}return this.schema&&this._recordBatchIndex===0?(this._recordBatchIndex++,{done:!1,value:new MR(this.schema)}):this.return()}_readNextMessageAndValidate(e){return this._reader.readMessage(e)}},Wz=class extends Hz{constructor(e,t){super(t),this._reader=new Oz(this._handle=e)}isAsync(){return!0}isStream(){return!0}[Symbol.asyncIterator](){return this}cancel(){return uj(this,void 0,void 0,function*(){!this.closed&&(this.closed=!0)&&(yield this.reset()._reader.return(),this._reader=null,this.dictionaries=null)})}open(e){return uj(this,void 0,void 0,function*(){return this.closed||(this.autoDestroy=Jz(this,e),(this.schema||=yield this._reader.readSchema())||(yield this.cancel())),this})}throw(e){return uj(this,void 0,void 0,function*(){return!this.closed&&this.autoDestroy&&(this.closed=!0)?yield this.reset()._reader.throw(e):IL})}return(e){return uj(this,void 0,void 0,function*(){return!this.closed&&this.autoDestroy&&(this.closed=!0)?yield this.reset()._reader.return(e):IL})}next(){return uj(this,void 0,void 0,function*(){if(this.closed)return IL;let e,{_reader:t}=this;for(;e=yield this._readNextMessageAndValidate();)if(e.isSchema())yield this.reset(e.header());else if(e.isRecordBatch()){this._recordBatchIndex++;let n=e.header(),r=yield t.readMessageBody(e.bodyLength),i=this._loadRecordBatch(n,r);return{done:!1,value:i}}else if(e.isDictionaryBatch()){this._dictionaryIndex++;let n=e.header(),r=yield t.readMessageBody(e.bodyLength),i=this._loadDictionaryBatch(n,r);this.dictionaries.set(n.id,i)}return this.schema&&this._recordBatchIndex===0?(this._recordBatchIndex++,{done:!1,value:new MR(this.schema)}):yield this.return()})}_readNextMessageAndValidate(e){return uj(this,void 0,void 0,function*(){return yield this._reader.readMessage(e)})}},Gz=class extends Uz{get footer(){return this._footer}get numDictionaries(){return this._footer?this._footer.numDictionaries:0}get numRecordBatches(){return this._footer?this._footer.numRecordBatches:0}constructor(e,t){super(e instanceof GL?e:new GL(e),t)}isSync(){return!0}isFile(){return!0}open(e){if(!this.closed&&!this._footer){this.schema=(this._footer=this._readFooter()).schema;for(let e of this._footer.dictionaryBatches())e&&this._readDictionaryBatch(this._dictionaryIndex++)}return super.open(e)}readRecordBatch(e){var t;if(this.closed)return null;this._footer||this.open();let n=(t=this._footer)?.getRecordBatch(e);if(n&&this._handle.seek(n.offset)){let e=this._reader.readMessage(rN.RecordBatch);if(e?.isRecordBatch()){let t=e.header(),n=this._reader.readMessageBody(e.bodyLength),r=this._loadRecordBatch(t,n);return r}}return null}_readDictionaryBatch(e){var t;let n=(t=this._footer)?.getDictionaryBatch(e);if(n&&this._handle.seek(n.offset)){let e=this._reader.readMessage(rN.DictionaryBatch);if(e?.isDictionaryBatch()){let t=e.header(),n=this._reader.readMessageBody(e.bodyLength),r=this._loadDictionaryBatch(t,n);this.dictionaries.set(t.id,r)}}}_readFooter(){let{_handle:e}=this,t=e.size-Fz,n=e.readInt32(t),r=e.readAt(t-n,n);return NL.decode(r)}_readNextMessageAndValidate(e){var t;if(this._footer||this.open(),this._footer&&this._recordBatchIndexsuper.open}});return uj(this,void 0,void 0,function*(){if(!this.closed&&!this._footer){this.schema=(this._footer=yield this._readFooter()).schema;for(let e of this._footer.dictionaryBatches())e&&(yield this._readDictionaryBatch(this._dictionaryIndex++))}return yield t.open.call(this,e)})}readRecordBatch(e){return uj(this,void 0,void 0,function*(){var t;if(this.closed)return null;this._footer||(yield this.open());let n=(t=this._footer)?.getRecordBatch(e);if(n&&(yield this._handle.seek(n.offset))){let e=yield this._reader.readMessage(rN.RecordBatch);if(e?.isRecordBatch()){let t=e.header(),n=yield this._reader.readMessageBody(e.bodyLength),r=this._loadRecordBatch(t,n);return r}}return null})}_readDictionaryBatch(e){return uj(this,void 0,void 0,function*(){var t;let n=(t=this._footer)?.getDictionaryBatch(e);if(n&&(yield this._handle.seek(n.offset))){let e=yield this._reader.readMessage(rN.DictionaryBatch);if(e?.isDictionaryBatch()){let t=e.header(),n=yield this._reader.readMessageBody(e.bodyLength),r=this._loadDictionaryBatch(t,n);this.dictionaries.set(t.id,r)}}})}_readFooter(){return uj(this,void 0,void 0,function*(){let{_handle:e}=this;e._pending&&(yield e._pending);let t=e.size-Fz,n=yield e.readInt32(t),r=yield e.readAt(t-n,n);return NL.decode(r)})}_readNextMessageAndValidate(e){return uj(this,void 0,void 0,function*(){if(this._footer||(yield this.open()),this._footer&&this._recordBatchIndex=4?Nz(t)?new Bz(new Gz(e.read())):new Rz(new Uz(e)):new Rz(new Uz(function*(){}()))}function $z(e){return uj(this,void 0,void 0,function*(){let t=yield e.peek(Pz+7&-8);return t&&t.byteLength>=4?Nz(t)?new Bz(new Gz(yield e.read())):new zz(new Wz(e)):new zz(new Wz(function(){return pj(this,arguments,function*(){})}()))})}function eB(e){return uj(this,void 0,void 0,function*(){let{size:t}=yield e.stat(),n=new KL(e,t);return t>=Iz&&Nz(yield n.readAt(0,Pz+7&-8))?new Vz(new Kz(n)):new zz(new Wz(n))})}var tB=class e extends wP{static assemble(...t){let n=e=>e.flatMap(e=>Array.isArray(e)?n(e):e instanceof kR?e.data.children:e.data),r=new e;return r.visitMany(n(t)),r}constructor(){super(),this._byteLength=0,this._nodes=[],this._buffers=[],this._bufferRegions=[]}visit(e){if(e instanceof CL)return this.visitMany(e.data),this;let{type:t}=e;if(!UN.isDictionary(t)){let{length:n}=e;if(n>2147483647)throw RangeError(`Cannot write arrays larger than 2^31 - 1 in length`);if(UN.isUnion(t))this.nodes.push(new ez(n,0));else{let{nullCount:r}=e;UN.isNull(t)||nB.call(this,r<=0?new Uint8Array:UI(e.offset,n,e.nullBitmap)),this.nodes.push(new ez(n,r))}}return super.visit(e)}visitNull(e){return this}visitDictionary(e){return this.visit(e.clone(e.type.indices))}get nodes(){return this._nodes}get buffers(){return this._buffers}get byteLength(){return this._byteLength}get bufferRegions(){return this._bufferRegions}};function nB(e){let t=e.byteLength+7&-8;return this.buffers.push(e),this.bufferRegions.push(new $R(this._byteLength,t)),this._byteLength+=t,this}function rB(e){var t;let{type:n,length:r,typeIds:i,valueOffsets:a}=e;if(nB.call(this,i),n.mode===sM.Sparse)return cB.call(this,e);if(n.mode===sM.Dense){if(e.offset<=0)return nB.call(this,a),cB.call(this,e);{let o=new Int32Array(r),s=Object.create(null),c=Object.create(null);for(let e,n,l=-1;++l{let i=n.typeIds[t],a=s[i],o=c[i];return e.slice(a,Math.min(r,o))}))}}return this}function iB(e){let t;return e.nullCount>=e.length?nB.call(this,new Uint8Array):(t=e.values)instanceof Uint8Array?nB.call(this,UI(e.offset,e.length,t)):nB.call(this,WI(e.values))}function aB(e){return nB.call(this,e.values.subarray(0,e.length*e.stride))}function oB(e){let{length:t,values:n,valueOffsets:r}=e,i=sN(r[0]),a=sN(r[t]),o=Math.min(a-i,n.byteLength-i);return nB.call(this,Xj(-i,t+1,r)),nB.call(this,n.subarray(i,i+o)),this}function sB(e){let{length:t,valueOffsets:n}=e;if(n){let{0:r,[t]:i}=n;return nB.call(this,Xj(-r,t+1,n)),this.visit(e.children[0].slice(r,i-r))}return this.visit(e.children[0])}function cB(e){return this.visitMany(e.type.children.map((t,n)=>e.children[n]).filter(Boolean))[0]}tB.prototype.visitBool=iB,tB.prototype.visitInt=aB,tB.prototype.visitFloat=aB,tB.prototype.visitUtf8=oB,tB.prototype.visitLargeUtf8=oB,tB.prototype.visitBinary=oB,tB.prototype.visitLargeBinary=oB,tB.prototype.visitFixedSizeBinary=aB,tB.prototype.visitDate=aB,tB.prototype.visitTimestamp=aB,tB.prototype.visitTime=aB,tB.prototype.visitDecimal=aB,tB.prototype.visitList=sB,tB.prototype.visitStruct=cB,tB.prototype.visitUnion=rB,tB.prototype.visitInterval=aB,tB.prototype.visitDuration=aB,tB.prototype.visitFixedSizeList=sB,tB.prototype.visitMap=sB;var lB=class extends RL{static throughNode(e){throw Error(`"throughNode" not available in this environment`)}static throughDOM(e,t){throw Error(`"throughDOM" not available in this environment`)}constructor(e){super(),this._position=0,this._started=!1,this._sink=new BL,this._schema=null,this._dictionaryBlocks=[],this._recordBatchBlocks=[],this._seenDictionaries=new Map,this._dictionaryDeltaOffsets=new Map,Cj(e)||(e={autoDestroy:!0,writeLegacyIpcFormat:!1}),this._autoDestroy=typeof e.autoDestroy==`boolean`?e.autoDestroy:!0,this._writeLegacyIpcFormat=typeof e.writeLegacyIpcFormat==`boolean`?e.writeLegacyIpcFormat:!1}toString(e=!1){return this._sink.toString(e)}toUint8Array(e=!1){return this._sink.toUint8Array(e)}writeAll(e){return wj(e)?e.then(e=>this.writeAll(e)):Ej(e)?pB(this,e):fB(this,e)}get closed(){return this._sink.closed}[Symbol.asyncIterator](){return this._sink[Symbol.asyncIterator]()}toDOMStream(e){return this._sink.toDOMStream(e)}toNodeStream(e){return this._sink.toNodeStream(e)}close(){return this.reset()._sink.close()}abort(e){return this.reset()._sink.abort(e)}finish(){return this._autoDestroy?this.close():this.reset(this._sink,this._schema),this}reset(e=this._sink,t=null){return e===this._sink||e instanceof BL?this._sink=e:(this._sink=new BL,e&&Mj(e)?this.toDOMStream({type:`bytes`}).pipeTo(e):e&&Pj(e)&&this.toNodeStream({objectMode:!1}).pipe(e)),this._started&&this._schema&&this._writeFooter(this._schema),this._started=!1,this._dictionaryBlocks=[],this._recordBatchBlocks=[],this._seenDictionaries=new Map,this._dictionaryDeltaOffsets=new Map,(!t||!SR(t,this._schema))&&(t==null?(this._position=0,this._schema=null):(this._started=!0,this._schema=t,this._writeSchema(t))),this}write(e){let t=null;if(this._sink){if(e==null||e instanceof DR&&!(t=e.schema)||e instanceof kR&&!(t=e.schema))return this.finish()&&void 0}else throw Error(`RecordBatchWriter is closed`);if(t&&!SR(t,this._schema)){if(this._started&&this._autoDestroy)return this.close();this.reset(this._sink,t)}e instanceof kR?e instanceof MR||this._writeRecordBatch(e):e instanceof DR?this.writeAll(e.batches):Tj(e)&&this.writeAll(e)}_writeMessage(e,t=8){let n=t-1,r=XR.encode(e),i=r.byteLength,a=this._writeLegacyIpcFormat?4:8,o=i+a+n&~n,s=o-i-a;return e.headerType===rN.RecordBatch?this._recordBatchBlocks.push(new FL(o,e.bodyLength,this._position)):e.headerType===rN.DictionaryBatch&&this._dictionaryBlocks.push(new FL(o,e.bodyLength,this._position)),this._writeLegacyIpcFormat||this._write(Int32Array.of(-1)),this._write(Int32Array.of(o-a)),i>0&&this._write(r),this._writePadding(s)}_write(e){if(this._started){let t=Wj(e);t&&t.byteLength>0&&(this._sink.write(t),this._position+=t.byteLength)}return this}_writeSchema(e){return this._writeMessage(XR.from(e))}_writeFooter(e){return this._writeLegacyIpcFormat?this._write(Int32Array.of(0)):this._write(Int32Array.of(-1,0))}_writeMagic(){return this._write(Mz)}_writePadding(e){return e>0?this._write(new Uint8Array(e)):this}_writeRecordBatch(e){let{byteLength:t,nodes:n,bufferRegions:r,buffers:i}=tB.assemble(e),a=new ZR(e.numRows,n,r),o=XR.from(a,t);return this._writeDictionaries(e)._writeMessage(o)._writeBodyBuffers(i)}_writeDictionaryBatch(e,t,n=!1){let{byteLength:r,nodes:i,bufferRegions:a,buffers:o}=tB.assemble(new CL([e])),s=new ZR(e.length,i,a),c=new QR(s,t,n),l=XR.from(c,r);return this._writeMessage(l)._writeBodyBuffers(o)}_writeBodyBuffers(e){let t,n,r;for(let i=-1,a=e.length;++i0&&(this._write(t),(r=(n+7&-8)-n)>0&&this._writePadding(r));return this}_writeDictionaries(e){var t,n;for(let[r,i]of e.dictionaries){let e=(t=i?.data)??[],a=this._seenDictionaries.get(r),o=(n=this._dictionaryDeltaOffsets.get(r))??0;if(!a||a.data[0]!==e[0])for(let[t,n]of e.entries())this._writeDictionaryBatch(n,r,t>0);else if(or.writeAll(e)):Ej(t)?pB(r,t):fB(r,t)}},dB=class e extends lB{static writeAll(t){let n=new e;return wj(t)?t.then(e=>n.writeAll(e)):Ej(t)?pB(n,t):fB(n,t)}constructor(){super(),this._autoDestroy=!0}_writeSchema(e){return this._writeMagic()._writePadding(2)}_writeDictionaryBatch(e,t,n=!1){if(!n&&this._seenDictionaries.has(t))throw Error(`The Arrow File format does not support replacement dictionaries. `);return super._writeDictionaryBatch(e,t,n)}_writeFooter(e){let t=NL.encode(new NL(e,oM.V5,this._recordBatchBlocks,this._dictionaryBlocks));return super._writeFooter(e)._write(t)._write(Int32Array.of(t.byteLength))._writeMagic()}};function fB(e,t){let n=t;t instanceof DR&&(n=t.batches,e.reset(void 0,t.schema));for(let t of n)e.write(t);return e.finish()}function pB(e,t){return uj(this,void 0,void 0,function*(){var n,r,i,a,o,s,c;try{for(n=!0,r=hj(t);i=yield r.next(),a=i.done,!a;n=!0){c=i.value,n=!1;let t=c;e.write(t)}}catch(e){o={error:e}}finally{try{!n&&!a&&(s=r.return)&&(yield s.call(r))}finally{if(o)throw o.error}}return e.finish()})}function mB(e,t=`stream`){return(t===`stream`?uB:dB).writeAll(e).toUint8Array(!0)}var hB=Object.create,gB=Object.defineProperty,_B=Object.getOwnPropertyDescriptor,vB=Object.getOwnPropertyNames,yB=Object.getPrototypeOf,bB=Object.prototype.hasOwnProperty,xB=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),SB=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let i of vB(t))!bB.call(e,i)&&i!==n&&gB(e,i,{get:()=>t[i],enumerable:!(r=_B(t,i))||r.enumerable});return e},CB=(e,t,n)=>(n=e==null?{}:hB(yB(e)),SB(t||!e||!e.__esModule?gB(n,`default`,{value:e,enumerable:!0}):n,e)),wB=xB((e,t)=>{t.exports=Worker}),TB=(e=>(e[e.UNDEFINED=0]=`UNDEFINED`,e[e.AUTOMATIC=1]=`AUTOMATIC`,e[e.READ_ONLY=2]=`READ_ONLY`,e[e.READ_WRITE=3]=`READ_WRITE`,e))(TB||{}),EB=(e=>(e[e.IDENTIFIER=0]=`IDENTIFIER`,e[e.NUMERIC_CONSTANT=1]=`NUMERIC_CONSTANT`,e[e.STRING_CONSTANT=2]=`STRING_CONSTANT`,e[e.OPERATOR=3]=`OPERATOR`,e[e.KEYWORD=4]=`KEYWORD`,e[e.COMMENT=5]=`COMMENT`,e))(EB||{}),DB=(e=>(e[e.NONE=0]=`NONE`,e[e.DEBUG=1]=`DEBUG`,e[e.INFO=2]=`INFO`,e[e.WARNING=3]=`WARNING`,e[e.ERROR=4]=`ERROR`,e))(DB||{}),OB=(e=>(e[e.NONE=0]=`NONE`,e[e.CONNECT=1]=`CONNECT`,e[e.DISCONNECT=2]=`DISCONNECT`,e[e.OPEN=3]=`OPEN`,e[e.QUERY=4]=`QUERY`,e[e.INSTANTIATE=5]=`INSTANTIATE`,e))(OB||{}),kB=(e=>(e[e.NONE=0]=`NONE`,e[e.OK=1]=`OK`,e[e.ERROR=2]=`ERROR`,e[e.START=3]=`START`,e[e.RUN=4]=`RUN`,e[e.CAPTURE=5]=`CAPTURE`,e))(kB||{}),AB=(e=>(e[e.NONE=0]=`NONE`,e[e.WEB_WORKER=1]=`WEB_WORKER`,e[e.NODE_WORKER=2]=`NODE_WORKER`,e[e.BINDINGS=3]=`BINDINGS`,e[e.ASYNC_DUCKDB=4]=`ASYNC_DUCKDB`,e))(AB||{}),jB=class{log(e){}},MB=class{constructor(e=2){this.level=e}log(e){e.level>=this.level&&console.log(e)}},NB=(e=>(e[e.SUCCESS=0]=`SUCCESS`,e))(NB||{}),PB=class{constructor(e,t){this._bindings=e,this._conn=t}get bindings(){return this._bindings}async close(){return this._bindings.disconnect(this._conn)}useUnsafe(e){return e(this._bindings,this._conn)}async query(e){this._bindings.logger.log({timestamp:new Date,level:2,origin:4,topic:4,event:4,value:e});let t=await this._bindings.runQuery(this._conn,e),n=Lz.from(t);return console.assert(n.isSync(),`Reader is not sync`),console.assert(n.isFile(),`Reader is not file`),new DR(n)}async send(e,t=!1){this._bindings.logger.log({timestamp:new Date,level:2,origin:4,topic:4,event:4,value:e});let n=await this._bindings.startPendingQuery(this._conn,e,t);for(;n==null;)n=await this._bindings.pollPendingQuery(this._conn);let r=new FB(this._bindings,this._conn,n),i=await Lz.from(r);return console.assert(i.isAsync()),console.assert(i.isStream()),i}async cancelSent(){return await this._bindings.cancelPendingQuery(this._conn)}async getTableNames(e){return await this._bindings.getTableNames(this._conn,e)}async prepare(e){let t=await this._bindings.createPrepared(this._conn,e);return new IB(this._bindings,this._conn,t)}async insertArrowTable(e,t){let n=mB(e,`stream`);await this.insertArrowFromIPCStream(n,t)}async insertArrowFromIPCStream(e,t){await this._bindings.insertArrowFromIPCStream(this._conn,e,t)}async insertCSVFromPath(e,t){await this._bindings.insertCSVFromPath(this._conn,e,t)}async insertJSONFromPath(e,t){await this._bindings.insertJSONFromPath(this._conn,e,t)}},FB=class{constructor(e,t,n){this.db=e,this.conn=t,this.header=n,this._first=!0,this._depleted=!1,this._inFlight=null}async next(){if(this._first)return this._first=!1,{done:!1,value:this.header};if(this._depleted)return{done:!0,value:null};let e;return this._inFlight==null?e=await this.db.fetchQueryResults(this.conn):(e=await this._inFlight,this._inFlight=null),this._depleted=e.length==0,this._depleted||(this._inFlight=this.db.fetchQueryResults(this.conn)),{done:this._depleted,value:e}}[Symbol.asyncIterator](){return this}},IB=class{constructor(e,t,n){this.bindings=e,this.connectionId=t,this.statementId=n}async close(){await this.bindings.closePrepared(this.connectionId,this.statementId)}async query(...e){let t=await this.bindings.runPrepared(this.connectionId,this.statementId,e),n=Lz.from(t);return console.assert(n.isSync()),console.assert(n.isFile()),new DR(n)}async send(...e){let t=await this.bindings.sendPrepared(this.connectionId,this.statementId,e),n=new FB(this.bindings,this.connectionId,t),r=await Lz.from(n);return console.assert(r.isAsync()),console.assert(r.isStream()),r}},LB=(e=>(e.CANCEL_PENDING_QUERY=`CANCEL_PENDING_QUERY`,e.CLOSE_PREPARED=`CLOSE_PREPARED`,e.COLLECT_FILE_STATISTICS=`COLLECT_FILE_STATISTICS`,e.REGISTER_OPFS_FILE_NAME=`REGISTER_OPFS_FILE_NAME`,e.CONNECT=`CONNECT`,e.COPY_FILE_TO_BUFFER=`COPY_FILE_TO_BUFFER`,e.COPY_FILE_TO_PATH=`COPY_FILE_TO_PATH`,e.CREATE_PREPARED=`CREATE_PREPARED`,e.DISCONNECT=`DISCONNECT`,e.DROP_FILE=`DROP_FILE`,e.DROP_FILES=`DROP_FILES`,e.EXPORT_FILE_STATISTICS=`EXPORT_FILE_STATISTICS`,e.FETCH_QUERY_RESULTS=`FETCH_QUERY_RESULTS`,e.FLUSH_FILES=`FLUSH_FILES`,e.GET_FEATURE_FLAGS=`GET_FEATURE_FLAGS`,e.GET_TABLE_NAMES=`GET_TABLE_NAMES`,e.GET_VERSION=`GET_VERSION`,e.GLOB_FILE_INFOS=`GLOB_FILE_INFOS`,e.INSERT_ARROW_FROM_IPC_STREAM=`INSERT_ARROW_FROM_IPC_STREAM`,e.INSERT_CSV_FROM_PATH=`IMPORT_CSV_FROM_PATH`,e.INSERT_JSON_FROM_PATH=`IMPORT_JSON_FROM_PATH`,e.INSTANTIATE=`INSTANTIATE`,e.OPEN=`OPEN`,e.PING=`PING`,e.POLL_PENDING_QUERY=`POLL_PENDING_QUERY`,e.REGISTER_FILE_BUFFER=`REGISTER_FILE_BUFFER`,e.REGISTER_FILE_HANDLE=`REGISTER_FILE_HANDLE`,e.REGISTER_FILE_URL=`REGISTER_FILE_URL`,e.RESET=`RESET`,e.RUN_PREPARED=`RUN_PREPARED`,e.RUN_QUERY=`RUN_QUERY`,e.SEND_PREPARED=`SEND_PREPARED`,e.START_PENDING_QUERY=`START_PENDING_QUERY`,e.TOKENIZE=`TOKENIZE`,e))(LB||{}),RB=(e=>(e.CONNECTION_INFO=`CONNECTION_INFO`,e.ERROR=`ERROR`,e.FEATURE_FLAGS=`FEATURE_FLAGS`,e.FILE_BUFFER=`FILE_BUFFER`,e.FILE_INFOS=`FILE_INFOS`,e.FILE_SIZE=`FILE_SIZE`,e.FILE_STATISTICS=`FILE_STATISTICS`,e.INSTANTIATE_PROGRESS=`INSTANTIATE_PROGRESS`,e.LOG=`LOG`,e.OK=`OK`,e.PREPARED_STATEMENT_ID=`PREPARED_STATEMENT_ID`,e.QUERY_PLAN=`QUERY_PLAN`,e.QUERY_RESULT=`QUERY_RESULT`,e.QUERY_RESULT_CHUNK=`QUERY_RESULT_CHUNK`,e.QUERY_RESULT_HEADER=`QUERY_RESULT_HEADER`,e.QUERY_RESULT_HEADER_OR_NULL=`QUERY_RESULT_HEADER_OR_NULL`,e.REGISTERED_FILE=`REGISTERED_FILE`,e.SCRIPT_TOKENS=`SCRIPT_TOKENS`,e.SUCCESS=`SUCCESS`,e.TABLE_NAMES=`TABLE_NAMES`,e.VERSION_STRING=`VERSION_STRING`,e))(RB||{}),zB=class{constructor(e,t){this.promiseResolver=()=>{},this.promiseRejecter=()=>{},this.type=e,this.data=t,this.promise=new Promise((e,t)=>{this.promiseResolver=e,this.promiseRejecter=t})}};function BB(e){switch(e.typeId){case Y.Binary:return{sqlType:`binary`};case Y.Bool:return{sqlType:`bool`};case Y.Date:return{sqlType:`date`};case Y.DateDay:return{sqlType:`date32[d]`};case Y.DateMillisecond:return{sqlType:`date64[ms]`};case Y.Decimal:{let t=e;return{sqlType:`decimal`,precision:t.precision,scale:t.scale}}case Y.Float:return{sqlType:`float`};case Y.Float16:return{sqlType:`float16`};case Y.Float32:return{sqlType:`float32`};case Y.Float64:return{sqlType:`float64`};case Y.Int:return{sqlType:`int32`};case Y.Int16:return{sqlType:`int16`};case Y.Int32:return{sqlType:`int32`};case Y.Int64:return{sqlType:`int64`};case Y.Uint16:return{sqlType:`uint16`};case Y.Uint32:return{sqlType:`uint32`};case Y.Uint64:return{sqlType:`uint64`};case Y.Uint8:return{sqlType:`uint8`};case Y.IntervalDayTime:return{sqlType:`interval[dt]`};case Y.IntervalYearMonth:return{sqlType:`interval[m]`};case Y.List:return{sqlType:`list`,valueType:BB(e.valueType)};case Y.FixedSizeBinary:return{sqlType:`fixedsizebinary`,byteWidth:e.byteWidth};case Y.Null:return{sqlType:`null`};case Y.Utf8:return{sqlType:`utf8`};case Y.Struct:return{sqlType:`struct`,fields:e.children.map(e=>VB(e.name,e.type))};case Y.Map:{let t=e;return{sqlType:`map`,keyType:BB(t.keyType),valueType:BB(t.valueType)}}case Y.Time:return{sqlType:`time[s]`};case Y.TimeMicrosecond:return{sqlType:`time[us]`};case Y.TimeMillisecond:return{sqlType:`time[ms]`};case Y.TimeNanosecond:return{sqlType:`time[ns]`};case Y.TimeSecond:return{sqlType:`time[s]`};case Y.Timestamp:return{sqlType:`timestamp`,timezone:e.timezone||void 0};case Y.TimestampSecond:return{sqlType:`timestamp[s]`,timezone:e.timezone||void 0};case Y.TimestampMicrosecond:return{sqlType:`timestamp[us]`,timezone:e.timezone||void 0};case Y.TimestampNanosecond:return{sqlType:`timestamp[ns]`,timezone:e.timezone||void 0};case Y.TimestampMillisecond:return{sqlType:`timestamp[ms]`,timezone:e.timezone||void 0}}throw Error(`unsupported arrow type: ${e.toString()}`)}function VB(e,t){let n=BB(t);return n.name=e,n}var HB=new TextEncoder,UB=class{constructor(e,t=null){this._onInstantiationProgress=[],this._worker=null,this._workerShutdownPromise=null,this._workerShutdownResolver=()=>{},this._nextMessageId=0,this._pendingRequests=new Map,this._logger=e,this._onMessageHandler=this.onMessage.bind(this),this._onErrorHandler=this.onError.bind(this),this._onCloseHandler=this.onClose.bind(this),t!=null&&this.attach(t)}get logger(){return this._logger}attach(e){this._worker=e,this._worker.addEventListener(`message`,this._onMessageHandler),this._worker.addEventListener(`error`,this._onErrorHandler),this._worker.addEventListener(`close`,this._onCloseHandler),this._workerShutdownPromise=new Promise((e,t)=>{this._workerShutdownResolver=e})}detach(){this._worker&&(this._worker.removeEventListener(`message`,this._onMessageHandler),this._worker.removeEventListener(`error`,this._onErrorHandler),this._worker.removeEventListener(`close`,this._onCloseHandler),this._worker=null,this._workerShutdownResolver(null),this._workerShutdownPromise=null,this._workerShutdownResolver=()=>{})}async terminate(){this._worker&&(this._worker.terminate(),this._worker=null,this._workerShutdownPromise=null,this._workerShutdownResolver=()=>{})}async postTask(e,t=[]){if(!this._worker){console.error(`cannot send a message since the worker is not set!`);return}let n=this._nextMessageId++;return this._pendingRequests.set(n,e),this._worker.postMessage({messageId:n,type:e.type,data:e.data},t),await e.promise}onMessage(e){var t;let n=e.data;switch(n.type){case`LOG`:this._logger.log(n.data);return;case`INSTANTIATE_PROGRESS`:for(let e of this._onInstantiationProgress)e(n.data);return}let r=this._pendingRequests.get(n.requestId);if(!r){console.warn(`unassociated response: [${n.requestId}, ${n.type.toString()}]`);return}if(this._pendingRequests.delete(n.requestId),n.type==`ERROR`){let e=Error(n.data.message);e.name=n.data.name,(t=Object.getOwnPropertyDescriptor(e,`stack`))!=null&&t.writable&&(e.stack=n.data.stack),r.promiseRejecter(e);return}switch(r.type){case`CLOSE_PREPARED`:case`COLLECT_FILE_STATISTICS`:case`REGISTER_OPFS_FILE_NAME`:case`COPY_FILE_TO_PATH`:case`DISCONNECT`:case`DROP_FILE`:case`DROP_FILES`:case`FLUSH_FILES`:case`INSERT_ARROW_FROM_IPC_STREAM`:case`IMPORT_CSV_FROM_PATH`:case`IMPORT_JSON_FROM_PATH`:case`OPEN`:case`PING`:case`REGISTER_FILE_BUFFER`:case`REGISTER_FILE_HANDLE`:case`REGISTER_FILE_URL`:case`RESET`:if(n.type==`OK`){r.promiseResolver(n.data);return}break;case`INSTANTIATE`:if(this._onInstantiationProgress=[],n.type==`OK`){r.promiseResolver(n.data);return}break;case`GLOB_FILE_INFOS`:if(n.type==`FILE_INFOS`){r.promiseResolver(n.data);return}break;case`GET_VERSION`:if(n.type==`VERSION_STRING`){r.promiseResolver(n.data);return}break;case`GET_FEATURE_FLAGS`:if(n.type==`FEATURE_FLAGS`){r.promiseResolver(n.data);return}break;case`GET_TABLE_NAMES`:if(n.type==`TABLE_NAMES`){r.promiseResolver(n.data);return}break;case`TOKENIZE`:if(n.type==`SCRIPT_TOKENS`){r.promiseResolver(n.data);return}break;case`COPY_FILE_TO_BUFFER`:if(n.type==`FILE_BUFFER`){r.promiseResolver(n.data);return}break;case`EXPORT_FILE_STATISTICS`:if(n.type==`FILE_STATISTICS`){r.promiseResolver(n.data);return}break;case`CONNECT`:if(n.type==`CONNECTION_INFO`){r.promiseResolver(n.data);return}break;case`RUN_PREPARED`:case`RUN_QUERY`:if(n.type==`QUERY_RESULT`){r.promiseResolver(n.data);return}break;case`SEND_PREPARED`:if(n.type==`QUERY_RESULT_HEADER`){r.promiseResolver(n.data);return}break;case`START_PENDING_QUERY`:if(n.type==`QUERY_RESULT_HEADER_OR_NULL`){r.promiseResolver(n.data);return}break;case`POLL_PENDING_QUERY`:if(n.type==`QUERY_RESULT_HEADER_OR_NULL`){r.promiseResolver(n.data);return}break;case`CANCEL_PENDING_QUERY`:if(this._onInstantiationProgress=[],n.type==`SUCCESS`){r.promiseResolver(n.data);return}break;case`FETCH_QUERY_RESULTS`:if(n.type==`QUERY_RESULT_CHUNK`){r.promiseResolver(n.data);return}break;case`CREATE_PREPARED`:if(n.type==`PREPARED_STATEMENT_ID`){r.promiseResolver(n.data);return}break}r.promiseRejecter(Error(`unexpected response type: ${n.type.toString()}`))}onError(e){console.error(e),console.error(`error in duckdb worker: ${e.message}`),this._pendingRequests.clear()}onClose(){if(this._workerShutdownResolver(null),this._pendingRequests.size!=0){console.warn(`worker terminated with ${this._pendingRequests.size} pending requests`);return}this._pendingRequests.clear()}async reset(){let e=new zB(`RESET`,null);return await this.postTask(e)}async ping(){let e=new zB(`PING`,null);await this.postTask(e)}async dropFile(e){let t=new zB(`DROP_FILE`,e);return await this.postTask(t)}async dropFiles(){let e=new zB(`DROP_FILES`,null);return await this.postTask(e)}async flushFiles(){let e=new zB(`FLUSH_FILES`,null);return await this.postTask(e)}async instantiate(e,t=null,n=e=>{}){this._onInstantiationProgress.push(n);let r=new zB(`INSTANTIATE`,[e,t]);return await this.postTask(r)}async getVersion(){let e=new zB(`GET_VERSION`,null);return await this.postTask(e)}async getFeatureFlags(){let e=new zB(`GET_FEATURE_FLAGS`,null);return await this.postTask(e)}async open(e){let t=new zB(`OPEN`,e);await this.postTask(t)}async tokenize(e){let t=new zB(`TOKENIZE`,e);return await this.postTask(t)}async connectInternal(){let e=new zB(`CONNECT`,null);return await this.postTask(e)}async connect(){let e=await this.connectInternal();return new PB(this,e)}async disconnect(e){let t=new zB(`DISCONNECT`,e);await this.postTask(t)}async runQuery(e,t){let n=new zB(`RUN_QUERY`,[e,t]);return await this.postTask(n)}async startPendingQuery(e,t,n=!1){let r=new zB(`START_PENDING_QUERY`,[e,t,n]);return await this.postTask(r)}async pollPendingQuery(e){let t=new zB(`POLL_PENDING_QUERY`,e);return await this.postTask(t)}async cancelPendingQuery(e){let t=new zB(`CANCEL_PENDING_QUERY`,e);return await this.postTask(t)}async fetchQueryResults(e){let t=new zB(`FETCH_QUERY_RESULTS`,e);return await this.postTask(t)}async getTableNames(e,t){let n=new zB(`GET_TABLE_NAMES`,[e,t]);return await this.postTask(n)}async createPrepared(e,t){let n=new zB(`CREATE_PREPARED`,[e,t]);return await this.postTask(n)}async closePrepared(e,t){let n=new zB(`CLOSE_PREPARED`,[e,t]);await this.postTask(n)}async runPrepared(e,t,n){let r=new zB(`RUN_PREPARED`,[e,t,n]);return await this.postTask(r)}async sendPrepared(e,t,n){let r=new zB(`SEND_PREPARED`,[e,t,n]);return await this.postTask(r)}async globFiles(e){let t=new zB(`GLOB_FILE_INFOS`,e);return await this.postTask(t)}async registerFileText(e,t){let n=HB.encode(t);await this.registerFileBuffer(e,n)}async registerFileURL(e,t,n,r){t===void 0&&(t=e);let i=new zB(`REGISTER_FILE_URL`,[e,t,n,r]);await this.postTask(i)}async registerEmptyFileBuffer(e){}async registerFileBuffer(e,t){let n=new zB(`REGISTER_FILE_BUFFER`,[e,t]);await this.postTask(n,[t.buffer])}async registerFileHandle(e,t,n,r){let i=new zB(`REGISTER_FILE_HANDLE`,[e,t,n,r]);await this.postTask(i,[])}async registerOPFSFileName(e){let t=new zB(`REGISTER_OPFS_FILE_NAME`,[e]);await this.postTask(t,[])}async collectFileStatistics(e,t){let n=new zB(`COLLECT_FILE_STATISTICS`,[e,t]);await this.postTask(n,[])}async exportFileStatistics(e){let t=new zB(`EXPORT_FILE_STATISTICS`,e);return await this.postTask(t,[])}async copyFileToBuffer(e){let t=new zB(`COPY_FILE_TO_BUFFER`,e);return await this.postTask(t)}async copyFileToPath(e,t){let n=new zB(`COPY_FILE_TO_PATH`,[e,t]);await this.postTask(n)}async insertArrowFromIPCStream(e,t,n){if(t.length==0)return;let r=new zB(`INSERT_ARROW_FROM_IPC_STREAM`,[e,t,n]);await this.postTask(r,[t.buffer])}async insertCSVFromPath(e,t,n){if(n.columns!==void 0){let e=[];for(let t in n.columns){let r=n.columns[t];e.push(VB(t,r))}n.columnsFlat=e,delete n.columns}let r=new zB(`IMPORT_CSV_FROM_PATH`,[e,t,n]);await this.postTask(r)}async insertJSONFromPath(e,t,n){if(n.columns!==void 0){let e=[];for(let t in n.columns){let r=n.columns[t];e.push(VB(t,r))}n.columnsFlat=e,delete n.columns}let r=new zB(`IMPORT_JSON_FROM_PATH`,[e,t,n]);await this.postTask(r)}};function WB(){let e=new TextDecoder;return t=>(typeof SharedArrayBuffer<`u`&&t.buffer instanceof SharedArrayBuffer&&(t=new Uint8Array(t)),e.decode(t))}var GB=WB(),KB=(e=>(e[e.BUFFER=0]=`BUFFER`,e[e.NODE_FS=1]=`NODE_FS`,e[e.BROWSER_FILEREADER=2]=`BROWSER_FILEREADER`,e[e.BROWSER_FSACCESS=3]=`BROWSER_FSACCESS`,e[e.HTTP=4]=`HTTP`,e[e.S3=5]=`S3`,e))(KB||{}),qB=async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,5,3,1,0,1,10,14,1,12,0,65,0,65,0,65,0,252,10,0,0,11])),JB=async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,10,8,1,6,0,6,64,25,11,11])),YB=async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,5,1,96,0,1,123,3,2,1,0,10,10,1,8,0,65,0,253,15,253,98,11])),XB=()=>(async e=>{try{return typeof MessageChannel<`u`&&new MessageChannel().port1.postMessage(new SharedArrayBuffer(1)),WebAssembly.validate(e)}catch{return!1}})(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,5,4,1,3,1,1,10,11,1,9,0,65,0,254,16,2,0,26,11])),ZB={name:`@duckdb/duckdb-wasm`,version:`1.29.1-dev68.0`,description:`DuckDB powered by WebAssembly`,license:`MIT`,repository:{type:`git`,url:`https://github.com/duckdb/duckdb-wasm.git`},keywords:[`sql`,`duckdb`,`relational`,`database`,`data`,`query`,`wasm`,`analytics`,`olap`,`arrow`,`parquet`,`json`,`csv`],dependencies:{"apache-arrow":`^17.0.0`},devDependencies:{"@types/emscripten":`^1.39.10`,"@types/jasmine":`^5.1.4`,"@typescript-eslint/eslint-plugin":`^6.21.0`,"@typescript-eslint/parser":`^6.21.0`,esbuild:`^0.20.2`,eslint:`^8.57.0`,"eslint-plugin-jasmine":`^4.1.3`,"eslint-plugin-react":`^7.34.0`,"fast-glob":`^3.3.2`,jasmine:`^5.1.0`,"jasmine-core":`^5.1.2`,"jasmine-spec-reporter":`^7.0.0`,"js-sha256":`^0.11.0`,karma:`^6.4.2`,"karma-chrome-launcher":`^3.2.0`,"karma-coverage":`^2.2.1`,"karma-firefox-launcher":`^2.1.3`,"karma-jasmine":`^5.1.0`,"karma-jasmine-html-reporter":`^2.1.0`,"karma-sourcemap-loader":`^0.4.0`,"karma-spec-reporter":`^0.0.36`,"make-dir":`^4.0.0`,nyc:`^15.1.0`,prettier:`^3.2.5`,puppeteer:`^22.8.0`,rimraf:`^5.0.5`,s3rver:`^3.7.1`,typedoc:`^0.25.13`,typescript:`^5.3.3`,"wasm-feature-detect":`^1.6.1`,"web-worker":`^1.2.0`},scripts:{"build:debug":`node bundle.mjs debug && tsc --emitDeclarationOnly`,"build:release":`node bundle.mjs release && tsc --emitDeclarationOnly`,docs:`typedoc`,report:`node ./coverage.mjs`,"test:node":`node --enable-source-maps ../../node_modules/jasmine/bin/jasmine ./dist/tests-node.cjs`,"test:node:debug":`node --inspect-brk --enable-source-maps ../../node_modules/jasmine/bin/jasmine ./dist/tests-node.cjs`,"test:node:coverage":`nyc -r json --report-dir ./coverage/node node ../../node_modules/jasmine/bin/jasmine ./dist/tests-node.cjs`,"test:firefox":`karma start ./karma/tests-firefox.cjs`,"test:chrome":`karma start ./karma/tests-chrome.cjs`,"test:chrome:eh":`karma start ./karma/tests-chrome-eh.cjs`,"test:chrome:coverage":`karma start ./karma/tests-chrome-coverage.cjs`,"test:browser":`karma start ./karma/tests-all.cjs`,"test:browser:debug":`karma start ./karma/tests-debug.cjs`,test:`npm run test:chrome && npm run test:node`,"test:coverage":`npm run test:chrome:coverage && npm run test:node:coverage && npm run report`,lint:`eslint src test`},files:[`dist`,`!dist/tests-*`,`!dist/duckdb-browser-mvp.worker.js.map`,`!dist/types/test`],main:`dist/duckdb-browser.cjs`,module:`dist/duckdb-browser.mjs`,types:`dist/duckdb-browser.d.ts`,jsdelivr:`dist/duckdb-browser.cjs`,unpkg:`dist/duckdb-browser.mjs`,sideEffects:!1,browser:{fs:!1,path:!1,perf_hooks:!1,os:!1,worker_threads:!1},exports:{"./dist/duckdb-mvp.wasm":`./dist/duckdb-mvp.wasm`,"./dist/duckdb-eh.wasm":`./dist/duckdb-eh.wasm`,"./dist/duckdb-coi.wasm":`./dist/duckdb-coi.wasm`,"./dist/duckdb-browser":`./dist/duckdb-browser.mjs`,"./dist/duckdb-browser.cjs":`./dist/duckdb-browser.cjs`,"./dist/duckdb-browser.mjs":`./dist/duckdb-browser.mjs`,"./dist/duckdb-browser-coi.pthread.worker.js":`./dist/duckdb-browser-coi.pthread.worker.js`,"./dist/duckdb-browser-coi.worker.js":`./dist/duckdb-browser-coi.worker.js`,"./dist/duckdb-browser-eh.worker.js":`./dist/duckdb-browser-eh.worker.js`,"./dist/duckdb-browser-mvp.worker.js":`./dist/duckdb-browser-mvp.worker.js`,"./dist/duckdb-node":`./dist/duckdb-node.cjs`,"./dist/duckdb-node.cjs":`./dist/duckdb-node.cjs`,"./dist/duckdb-node-blocking":`./dist/duckdb-node-blocking.cjs`,"./dist/duckdb-node-blocking.cjs":`./dist/duckdb-node-blocking.cjs`,"./dist/duckdb-node-eh.worker.cjs":`./dist/duckdb-node-eh.worker.cjs`,"./dist/duckdb-node-mvp.worker.cjs":`./dist/duckdb-node-mvp.worker.cjs`,"./blocking":{node:{types:`./dist/duckdb-node-blocking.d.ts`,require:`./dist/duckdb-node-blocking.cjs`,import:`./dist/duckdb-node-blocking.cjs`},types:`./dist/duckdb-node-blocking.d.ts`,import:`./dist/duckdb-node-blocking.mjs`,require:`./dist/duckdb-node-blocking.cjs`},".":{browser:{types:`./dist/duckdb-browser.d.ts`,import:`./dist/duckdb-browser.mjs`,require:`./dist/duckdb-browser.cjs`},node:{types:`./dist/duckdb-node.d.ts`,import:`./dist/duckdb-node.cjs`,require:`./dist/duckdb-node.cjs`},types:`./dist/duckdb-browser.d.ts`,import:`./dist/duckdb-browser.mjs`,require:`./dist/duckdb-browser.cjs`}}},QB=ZB.name,$B=ZB.version,eV=ZB.version.split(`.`),tV=eV[0],nV=eV[1],rV=eV[2],iV=()=>typeof navigator>`u`,aV=()=>iV()?`node`:navigator.userAgent,oV=()=>aV().includes(`Firefox`),sV=()=>/^((?!chrome|android).)*safari/i.test(aV()),cV=null,lV=null,uV=null,dV=null,fV=null;async function pV(){return cV??=typeof BigInt64Array<`u`,lV??=await JB(),uV??=await XB(),dV??=await YB(),fV??=await qB(),{bigInt64Array:cV,crossOriginIsolated:iV()||globalThis.crossOriginIsolated||!1,wasmExceptions:lV,wasmSIMD:dV,wasmThreads:uV,wasmBulkMemory:fV}}async function mV(e){let t=await pV();if(t.wasmExceptions){if(t.wasmSIMD&&t.wasmThreads&&t.crossOriginIsolated&&e.coi)return{mainModule:e.coi.mainModule,mainWorker:e.coi.mainWorker,pthreadWorker:e.coi.pthreadWorker};if(e.eh)return{mainModule:e.eh.mainModule,mainWorker:e.eh.mainWorker,pthreadWorker:null}}return{mainModule:e.mvp.mainModule,mainWorker:e.mvp.mainWorker,pthreadWorker:null}}var hV=CB(wB());const gV=Symbol.for(`constructDateFrom`),_V={},vV={};function yV(e,t){try{let n=_V[e]||(_V[e]=new Intl.DateTimeFormat(`en-GB`,{timeZone:e,hour:`numeric`,timeZoneName:`longOffset`}).format),r=n(t).split(`GMT`)[1]||``;return r in vV?vV[r]:xV(r,r.split(`:`))}catch{if(e in vV)return vV[e];let t=e?.match(bV);return t?xV(e,t.slice(1)):NaN}}const bV=/([+-]\d\d):?(\d\d)?/;function xV(e,t){let n=+t[0],r=+(t[1]||0);return vV[e]=n>0?n*60+r:n*60-r}var SV=class e extends Date{constructor(...e){super(),e.length>1&&typeof e[e.length-1]==`string`&&(this.timeZone=e.pop()),this.internal=new Date,isNaN(yV(this.timeZone,this))?this.setTime(NaN):e.length?typeof e[0]==`number`&&(e.length===1||e.length===2&&typeof e[1]!=`number`)?this.setTime(e[0]):typeof e[0]==`string`?this.setTime(+new Date(e[0])):e[0]instanceof Date?this.setTime(+e[0]):(this.setTime(+new Date(...e)),EV(this,NaN),wV(this)):this.setTime(Date.now())}static tz(t,...n){return n.length?new e(...n,t):new e(Date.now(),t)}withTimeZone(t){return new e(+this,t)}getTimezoneOffset(){return-yV(this.timeZone,this)}setTime(e){return Date.prototype.setTime.apply(this,arguments),wV(this),+this}[Symbol.for(`constructDateFrom`)](t){return new e(+new Date(t),this.timeZone)}};const CV=/^(get|set)(?!UTC)/;Object.getOwnPropertyNames(Date.prototype).forEach(e=>{if(!CV.test(e))return;let t=e.replace(CV,`$1UTC`);SV.prototype[t]&&(e.startsWith(`get`)?SV.prototype[e]=function(){return this.internal[t]()}:(SV.prototype[e]=function(){return Date.prototype[t].apply(this.internal,arguments),TV(this),+this},SV.prototype[t]=function(){return Date.prototype[t].apply(this,arguments),wV(this),+this}))});function wV(e){e.internal.setTime(+e),e.internal.setUTCMinutes(e.internal.getUTCMinutes()-e.getTimezoneOffset())}function TV(e){Date.prototype.setFullYear.call(e,e.internal.getUTCFullYear(),e.internal.getUTCMonth(),e.internal.getUTCDate()),Date.prototype.setHours.call(e,e.internal.getUTCHours(),e.internal.getUTCMinutes(),e.internal.getUTCSeconds(),e.internal.getUTCMilliseconds()),EV(e)}function EV(e){let t=yV(e.timeZone,e),n=new Date(+e);n.setUTCHours(n.getUTCHours()-1);let r=-new Date(+e).getTimezoneOffset(),i=-new Date(+n).getTimezoneOffset(),a=r-i,o=Date.prototype.getHours.apply(e)!==e.internal.getUTCHours();a&&o&&e.internal.setUTCMinutes(e.internal.getUTCMinutes()+a);let s=r-t;s&&Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+s);let c=yV(e.timeZone,e),l=-new Date(+e).getTimezoneOffset(),u=l-c,d=c!==t,f=u-s;if(d&&f){Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+f);let t=yV(e.timeZone,e),n=c-t;n&&(e.internal.setUTCMinutes(e.internal.getUTCMinutes()+n),Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+n))}}var DV=class e extends SV{static tz(t,...n){return n.length?new e(...n,t):new e(Date.now(),t)}toISOString(){let[e,t,n]=this.tzComponents(),r=`${e}${t}:${n}`;return this.internal.toISOString().slice(0,-1)+r}toString(){return`${this.toDateString()} ${this.toTimeString()}`}toDateString(){let[e,t,n,r]=this.internal.toUTCString().split(` `);return`${e?.slice(0,-1)} ${n} ${t} ${r}`}toTimeString(){let e=this.internal.toUTCString().split(` `)[4],[t,n,r]=this.tzComponents();return`${e} GMT${t}${n}${r} (${OV(this.timeZone,this)})`}toLocaleString(e,t){return Date.prototype.toLocaleString.call(this,e,{...t,timeZone:t?.timeZone||this.timeZone})}toLocaleDateString(e,t){return Date.prototype.toLocaleDateString.call(this,e,{...t,timeZone:t?.timeZone||this.timeZone})}toLocaleTimeString(e,t){return Date.prototype.toLocaleTimeString.call(this,e,{...t,timeZone:t?.timeZone||this.timeZone})}tzComponents(){let e=this.getTimezoneOffset(),t=e>0?`-`:`+`,n=String(Math.floor(Math.abs(e)/60)).padStart(2,`0`),r=String(Math.abs(e)%60).padStart(2,`0`);return[t,n,r]}withTimeZone(t){return new e(+this,t)}[Symbol.for(`constructDateFrom`)](t){return new e(+new Date(t),this.timeZone)}};function OV(e,t){return new Intl.DateTimeFormat(`en-GB`,{timeZone:e,timeZoneName:`long`}).format(t).slice(12)}const kV=new TextDecoder(`utf-8`),AV=e=>kV.decode(e),jV=new TextEncoder,MV=e=>jV.encode(e),NV=e=>typeof e==`function`,PV=e=>e!=null&&Object(e)===e,FV=e=>PV(e)&&NV(e.then),IV=e=>PV(e)&&NV(e[Symbol.iterator]),LV=e=>PV(e)&&NV(e[Symbol.asyncIterator]),RV=e=>PV(e)&&`done`in e&&`value`in e,zV=e=>PV(e)&&NV(e.clear)&&NV(e.bytes)&&NV(e.position)&&NV(e.setPosition)&&NV(e.capacity)&&NV(e.getBufferIdentifier)&&NV(e.createLong);var BV={};xt(BV,{compareArrayLike:()=>TH,joinUint8Arrays:()=>WV,memcpy:()=>UV,rebaseValueOffsets:()=>wH,toArrayBufferView:()=>GV,toArrayBufferViewAsyncIterator:()=>mH,toArrayBufferViewIterator:()=>iH,toBigInt64Array:()=>YV,toBigUint64Array:()=>$V,toFloat32Array:()=>eH,toFloat32ArrayAsyncIterator:()=>xH,toFloat32ArrayIterator:()=>dH,toFloat64Array:()=>tH,toFloat64ArrayAsyncIterator:()=>SH,toFloat64ArrayIterator:()=>fH,toInt16Array:()=>qV,toInt16ArrayAsyncIterator:()=>gH,toInt16ArrayIterator:()=>oH,toInt32Array:()=>JV,toInt32ArrayAsyncIterator:()=>_H,toInt32ArrayIterator:()=>sH,toInt8Array:()=>KV,toInt8ArrayAsyncIterator:()=>hH,toInt8ArrayIterator:()=>aH,toUint16Array:()=>ZV,toUint16ArrayAsyncIterator:()=>yH,toUint16ArrayIterator:()=>lH,toUint32Array:()=>QV,toUint32ArrayAsyncIterator:()=>bH,toUint32ArrayIterator:()=>uH,toUint8Array:()=>XV,toUint8ArrayAsyncIterator:()=>vH,toUint8ArrayIterator:()=>cH,toUint8ClampedArray:()=>nH,toUint8ClampedArrayAsyncIterator:()=>CH,toUint8ClampedArrayIterator:()=>pH});const VV=typeof SharedArrayBuffer<`u`?SharedArrayBuffer:ArrayBuffer;function HV(e){let t=e[0]?[e[0]]:[],n,r,i,a;for(let o,s,c=0,l=0,u=e.length;++ce+t.byteLength,0),i,a,o,s=0,c=-1,l=Math.min(t||1/0,r);for(let e=n.length;++cGV(Int8Array,e),qV=e=>GV(Int16Array,e),JV=e=>GV(Int32Array,e),YV=e=>GV(BigInt64Array,e),XV=e=>GV(Uint8Array,e),ZV=e=>GV(Uint16Array,e),QV=e=>GV(Uint32Array,e),$V=e=>GV(BigUint64Array,e),eH=e=>GV(Float32Array,e),tH=e=>GV(Float64Array,e),nH=e=>GV(Uint8ClampedArray,e),rH=e=>(e.next(),e);function*iH(e,t){let n=function*(e){yield e},r=typeof t==`string`||ArrayBuffer.isView(t)||t instanceof ArrayBuffer||t instanceof VV?n(t):IV(t)?t:n(t);return yield*rH(function*(t){let n=null;do n=t.next(yield GV(e,n));while(!n.done)}(r[Symbol.iterator]())),new e}const aH=e=>iH(Int8Array,e),oH=e=>iH(Int16Array,e),sH=e=>iH(Int32Array,e),cH=e=>iH(Uint8Array,e),lH=e=>iH(Uint16Array,e),uH=e=>iH(Uint32Array,e),dH=e=>iH(Float32Array,e),fH=e=>iH(Float64Array,e),pH=e=>iH(Uint8ClampedArray,e);function mH(e,t){return pj(this,arguments,function*(){if(FV(t))return yield fj(yield fj(yield*mj(hj(mH(e,yield fj(t))))));let n=function(e){return pj(this,arguments,function*(){yield yield fj(yield fj(e))})},r=function(e){return pj(this,arguments,function*(){yield fj(yield*mj(hj(rH(function*(e){let t=null;do t=e.next(yield t?.value);while(!t.done)}(e[Symbol.iterator]())))))})},i=typeof t==`string`||ArrayBuffer.isView(t)||t instanceof ArrayBuffer||t instanceof VV?n(t):IV(t)?r(t):LV(t)?t:n(t);return yield fj(yield*mj(hj(rH(function(t){return pj(this,arguments,function*(){let n=null;do n=yield fj(t.next(yield yield fj(GV(e,n))));while(!n.done)})}(i[Symbol.asyncIterator]()))))),yield fj(new e)})}const hH=e=>mH(Int8Array,e),gH=e=>mH(Int16Array,e),_H=e=>mH(Int32Array,e),vH=e=>mH(Uint8Array,e),yH=e=>mH(Uint16Array,e),bH=e=>mH(Uint32Array,e),xH=e=>mH(Float32Array,e),SH=e=>mH(Float64Array,e),CH=e=>mH(Uint8ClampedArray,e);function wH(e,t,n){if(e!==0){n=n.slice(0,t);for(let t=-1,r=n.length;++t0)do if(e[n]!==t[n])return!1;while(++nPH});const NH=void 0;function PH(e){if(e===null)return`null`;if(e===NH)return`undefined`;switch(typeof e){case`number`:return`${e}`;case`bigint`:return`${e}`;case`string`:return`"${e}"`}return typeof e[Symbol.toPrimitive]==`function`?e[Symbol.toPrimitive](`string`):ArrayBuffer.isView(e)?e instanceof BigInt64Array||e instanceof BigUint64Array?`[${[...e].map(e=>PH(e))}]`:`[${e}]`:ArrayBuffer.isView(e)?`[${e}]`:JSON.stringify(e,(e,t)=>typeof t==`bigint`?`${t}`:t)}function FH(e){if(typeof e==`bigint`&&(e<-(2**53-1)||e>2**53-1))throw TypeError(`${e} is not safe to convert to a number.`);return Number(e)}function IH(e,t){return FH(e/t)+FH(e%t)/FH(t)}var LH={};xt(LH,{BN:()=>YH,bigNumToBigInt:()=>qH,bigNumToNumber:()=>GH,bigNumToString:()=>KH,isArrowBigNumSymbol:()=>RH});const RH=Symbol.for(`isArrowBigNum`);function zH(e,...t){return t.length===0?Object.setPrototypeOf(GV(this.TypedArray,e),this.constructor.prototype):Object.setPrototypeOf(new this.TypedArray(e,...t),this.constructor.prototype)}zH.prototype[RH]=!0,zH.prototype.toJSON=function(){return`"${KH(this)}"`},zH.prototype.valueOf=function(e){return GH(this,e)},zH.prototype.toString=function(){return KH(this)},zH.prototype[Symbol.toPrimitive]=function(e=`default`){switch(e){case`number`:return GH(this);case`string`:return KH(this);case`default`:return qH(this)}return KH(this)};function BH(...e){return zH.apply(this,e)}function VH(...e){return zH.apply(this,e)}function HH(...e){return zH.apply(this,e)}Object.setPrototypeOf(BH.prototype,Object.create(Int32Array.prototype)),Object.setPrototypeOf(VH.prototype,Object.create(Uint32Array.prototype)),Object.setPrototypeOf(HH.prototype,Object.create(Uint32Array.prototype)),Object.assign(BH.prototype,zH.prototype,{constructor:BH,signed:!0,TypedArray:Int32Array,BigIntArray:BigInt64Array}),Object.assign(VH.prototype,zH.prototype,{constructor:VH,signed:!1,TypedArray:Uint32Array,BigIntArray:BigUint64Array}),Object.assign(HH.prototype,zH.prototype,{constructor:HH,signed:!0,TypedArray:Uint32Array,BigIntArray:BigUint64Array});const UH=BigInt(4294967296)*BigInt(4294967296),WH=UH-BigInt(1);function GH(e,t){let{buffer:n,byteOffset:r,byteLength:i,signed:a}=e,o=new BigUint64Array(n,r,i/8),s=a&&o.at(-1)&BigInt(1)<0){let e=BigInt(`1`.padEnd(t+1,`0`)),n=c/e,r=s?-(c%e):c%e,i=FH(n),a=`${r}`.padStart(t,`0`),o=s&&i===0?`-`:``;return+`${o}${i}.${a}`}return FH(c)}function KH(e){if(e.byteLength===8){let t=new e.BigIntArray(e.buffer,e.byteOffset,1);return`${t[0]}`}if(!e.signed)return JH(e);let t=new Uint16Array(e.buffer,e.byteOffset,e.byteLength/2),n=new Int16Array([t.at(-1)])[0];if(n>=0)return JH(e);t=t.slice();let r=1;for(let e=0;e(e.children=null,e.ArrayType=Array,e.OffsetArrayType=Int32Array,e[Symbol.toStringTag]=`DataType`))(vU.prototype);var yU=class extends vU{constructor(){super(X.Null)}toString(){return`Null`}};ZH=Symbol.toStringTag,yU[ZH]=(e=>e[Symbol.toStringTag]=`Null`)(yU.prototype);var bU=class extends vU{constructor(e,t){super(X.Int),this.isSigned=e,this.bitWidth=t}get ArrayType(){switch(this.bitWidth){case 8:return this.isSigned?Int8Array:Uint8Array;case 16:return this.isSigned?Int16Array:Uint16Array;case 32:return this.isSigned?Int32Array:Uint32Array;case 64:return this.isSigned?BigInt64Array:BigUint64Array}throw Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}toString(){return`${this.isSigned?`I`:`Ui`}nt${this.bitWidth}`}};QH=Symbol.toStringTag,bU[QH]=(e=>(e.isSigned=null,e.bitWidth=null,e[Symbol.toStringTag]=`Int`))(bU.prototype);var xU=class extends bU{constructor(){super(!0,8)}get ArrayType(){return Int8Array}},SU=class extends bU{constructor(){super(!0,16)}get ArrayType(){return Int16Array}},CU=class extends bU{constructor(){super(!0,32)}get ArrayType(){return Int32Array}},wU=class extends bU{constructor(){super(!0,64)}get ArrayType(){return BigInt64Array}},TU=class extends bU{constructor(){super(!1,8)}get ArrayType(){return Uint8Array}},EU=class extends bU{constructor(){super(!1,16)}get ArrayType(){return Uint16Array}},DU=class extends bU{constructor(){super(!1,32)}get ArrayType(){return Uint32Array}},OU=class extends bU{constructor(){super(!1,64)}get ArrayType(){return BigUint64Array}};Object.defineProperty(xU.prototype,`ArrayType`,{value:Int8Array}),Object.defineProperty(SU.prototype,`ArrayType`,{value:Int16Array}),Object.defineProperty(CU.prototype,`ArrayType`,{value:Int32Array}),Object.defineProperty(wU.prototype,`ArrayType`,{value:BigInt64Array}),Object.defineProperty(TU.prototype,`ArrayType`,{value:Uint8Array}),Object.defineProperty(EU.prototype,`ArrayType`,{value:Uint16Array}),Object.defineProperty(DU.prototype,`ArrayType`,{value:Uint32Array}),Object.defineProperty(OU.prototype,`ArrayType`,{value:BigUint64Array});var kU=class extends vU{constructor(e){super(X.Float),this.precision=e}get ArrayType(){switch(this.precision){case DH.HALF:return Uint16Array;case DH.SINGLE:return Float32Array;case DH.DOUBLE:return Float64Array}throw Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}toString(){return`Float${this.precision<<5||16}`}};$H=Symbol.toStringTag,kU[$H]=(e=>(e.precision=null,e[Symbol.toStringTag]=`Float`))(kU.prototype);var AU=class extends kU{constructor(){super(DH.HALF)}},jU=class extends kU{constructor(){super(DH.SINGLE)}},MU=class extends kU{constructor(){super(DH.DOUBLE)}};Object.defineProperty(AU.prototype,`ArrayType`,{value:Uint16Array}),Object.defineProperty(jU.prototype,`ArrayType`,{value:Float32Array}),Object.defineProperty(MU.prototype,`ArrayType`,{value:Float64Array});var NU=class extends vU{constructor(){super(X.Binary)}toString(){return`Binary`}};eU=Symbol.toStringTag,NU[eU]=(e=>(e.ArrayType=Uint8Array,e[Symbol.toStringTag]=`Binary`))(NU.prototype);var PU=class extends vU{constructor(){super(X.LargeBinary)}toString(){return`LargeBinary`}};tU=Symbol.toStringTag,PU[tU]=(e=>(e.ArrayType=Uint8Array,e.OffsetArrayType=BigInt64Array,e[Symbol.toStringTag]=`LargeBinary`))(PU.prototype);var FU=class extends vU{constructor(){super(X.Utf8)}toString(){return`Utf8`}};nU=Symbol.toStringTag,FU[nU]=(e=>(e.ArrayType=Uint8Array,e[Symbol.toStringTag]=`Utf8`))(FU.prototype);var IU=class extends vU{constructor(){super(X.LargeUtf8)}toString(){return`LargeUtf8`}};rU=Symbol.toStringTag,IU[rU]=(e=>(e.ArrayType=Uint8Array,e.OffsetArrayType=BigInt64Array,e[Symbol.toStringTag]=`LargeUtf8`))(IU.prototype);var LU=class extends vU{constructor(){super(X.Bool)}toString(){return`Bool`}};iU=Symbol.toStringTag,LU[iU]=(e=>(e.ArrayType=Uint8Array,e[Symbol.toStringTag]=`Bool`))(LU.prototype);var RU=class extends vU{constructor(e,t,n=128){super(X.Decimal),this.scale=e,this.precision=t,this.bitWidth=n}toString(){return`Decimal[${this.precision}e${this.scale>0?`+`:``}${this.scale}]`}};aU=Symbol.toStringTag,RU[aU]=(e=>(e.scale=null,e.precision=null,e.ArrayType=Uint32Array,e[Symbol.toStringTag]=`Decimal`))(RU.prototype);var zU=class extends vU{constructor(e){super(X.Date),this.unit=e}toString(){return`Date${(this.unit+1)*32}<${OH[this.unit]}>`}get ArrayType(){return this.unit===OH.DAY?Int32Array:BigInt64Array}};oU=Symbol.toStringTag,zU[oU]=(e=>(e.unit=null,e[Symbol.toStringTag]=`Date`))(zU.prototype);var BU=class extends vU{constructor(e,t){super(X.Time),this.unit=e,this.bitWidth=t}toString(){return`Time${this.bitWidth}<${kH[this.unit]}>`}get ArrayType(){switch(this.bitWidth){case 32:return Int32Array;case 64:return BigInt64Array}throw Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}};sU=Symbol.toStringTag,BU[sU]=(e=>(e.unit=null,e.bitWidth=null,e[Symbol.toStringTag]=`Time`))(BU.prototype);var VU=class extends vU{constructor(e,t){super(X.Timestamp),this.unit=e,this.timezone=t}toString(){return`Timestamp<${kH[this.unit]}${this.timezone?`, ${this.timezone}`:``}>`}};cU=Symbol.toStringTag,VU[cU]=(e=>(e.unit=null,e.timezone=null,e.ArrayType=BigInt64Array,e[Symbol.toStringTag]=`Timestamp`))(VU.prototype);var HU=class extends vU{constructor(e){super(X.Interval),this.unit=e}toString(){return`Interval<${AH[this.unit]}>`}};lU=Symbol.toStringTag,HU[lU]=(e=>(e.unit=null,e.ArrayType=Int32Array,e[Symbol.toStringTag]=`Interval`))(HU.prototype);var UU=class extends vU{constructor(e){super(X.Duration),this.unit=e}toString(){return`Duration<${kH[this.unit]}>`}};uU=Symbol.toStringTag,UU[uU]=(e=>(e.unit=null,e.ArrayType=BigInt64Array,e[Symbol.toStringTag]=`Duration`))(UU.prototype);var WU=class extends vU{constructor(e){super(X.List),this.children=[e]}toString(){return`List<${this.valueType}>`}get valueType(){return this.children[0].type}get valueField(){return this.children[0]}get ArrayType(){return this.valueType.ArrayType}};dU=Symbol.toStringTag,WU[dU]=(e=>(e.children=null,e[Symbol.toStringTag]=`List`))(WU.prototype);var GU=class extends vU{constructor(e){super(X.Struct),this.children=e}toString(){return`Struct<{${this.children.map(e=>`${e.name}:${e.type}`).join(`, `)}}>`}};fU=Symbol.toStringTag,GU[fU]=(e=>(e.children=null,e[Symbol.toStringTag]=`Struct`))(GU.prototype);var KU=class extends vU{constructor(e,t,n){super(X.Union),this.mode=e,this.children=n,this.typeIds=t=Int32Array.from(t),this.typeIdToChildIndex=t.reduce((e,t,n)=>(e[t]=n)&&e||e,Object.create(null))}toString(){return`${this[Symbol.toStringTag]}<${this.children.map(e=>`${e.type}`).join(` | `)}>`}};pU=Symbol.toStringTag,KU[pU]=(e=>(e.mode=null,e.typeIds=null,e.children=null,e.typeIdToChildIndex=null,e.ArrayType=Int8Array,e[Symbol.toStringTag]=`Union`))(KU.prototype);var qU=class extends vU{constructor(e){super(X.FixedSizeBinary),this.byteWidth=e}toString(){return`FixedSizeBinary[${this.byteWidth}]`}};mU=Symbol.toStringTag,qU[mU]=(e=>(e.byteWidth=null,e.ArrayType=Uint8Array,e[Symbol.toStringTag]=`FixedSizeBinary`))(qU.prototype);var JU=class extends vU{constructor(e,t){super(X.FixedSizeList),this.listSize=e,this.children=[t]}get valueType(){return this.children[0].type}get valueField(){return this.children[0]}get ArrayType(){return this.valueType.ArrayType}toString(){return`FixedSizeList[${this.listSize}]<${this.valueType}>`}};hU=Symbol.toStringTag,JU[hU]=(e=>(e.children=null,e.listSize=null,e[Symbol.toStringTag]=`FixedSizeList`))(JU.prototype);var YU=class extends vU{constructor(e,t=!1){var n,r,i;if(super(X.Map),this.children=[e],this.keysSorted=t,e&&(e.name=`entries`,(n=e?.type)?.children)){let t=(r=e?.type)?.children[0];t&&(t.name=`key`);let n=(i=e?.type)?.children[1];n&&(n.name=`value`)}}get keyType(){return this.children[0].type.children[0].type}get valueType(){return this.children[0].type.children[1].type}get childType(){return this.children[0].type}toString(){return`Map<{${this.children[0].type.children.map(e=>`${e.name}:${e.type}`).join(`, `)}}>`}};gU=Symbol.toStringTag,YU[gU]=(e=>(e.children=null,e.keysSorted=null,e[Symbol.toStringTag]=`Map_`))(YU.prototype);const XU=(e=>()=>++e)(-1);var ZU=class extends vU{constructor(e,t,n,r){super(X.Dictionary),this.indices=t,this.dictionary=e,this.isOrdered=r||!1,this.id=n==null?XU():FH(n)}get children(){return this.dictionary.children}get valueType(){return this.dictionary}get ArrayType(){return this.dictionary.ArrayType}toString(){return`Dictionary<${this.indices}, ${this.dictionary}>`}};_U=Symbol.toStringTag,ZU[_U]=(e=>(e.id=null,e.indices=null,e.isOrdered=null,e.dictionary=null,e[Symbol.toStringTag]=`Dictionary`))(ZU.prototype);function QU(e){let t=e;switch(e.typeId){case X.Decimal:return e.bitWidth/32;case X.Interval:return t.unit===AH.MONTH_DAY_NANO?4:1+t.unit;case X.FixedSizeList:return t.listSize;case X.FixedSizeBinary:return t.byteWidth;default:return 1}}var $U=class{visitMany(e,...t){return e.map((e,n)=>this.visit(e,...t.map(e=>e[n])))}visit(...e){return this.getVisitFn(e[0],!1).apply(this,e)}getVisitFn(e,t=!0){return eW(this,e,t)}getVisitFnByTypeId(e,t=!0){return tW(this,e,t)}visitNull(e,...t){return null}visitBool(e,...t){return null}visitInt(e,...t){return null}visitFloat(e,...t){return null}visitUtf8(e,...t){return null}visitLargeUtf8(e,...t){return null}visitBinary(e,...t){return null}visitLargeBinary(e,...t){return null}visitFixedSizeBinary(e,...t){return null}visitDate(e,...t){return null}visitTimestamp(e,...t){return null}visitTime(e,...t){return null}visitDecimal(e,...t){return null}visitList(e,...t){return null}visitStruct(e,...t){return null}visitUnion(e,...t){return null}visitDictionary(e,...t){return null}visitInterval(e,...t){return null}visitDuration(e,...t){return null}visitFixedSizeList(e,...t){return null}visitMap(e,...t){return null}};function eW(e,t,n=!0){return typeof t==`number`?tW(e,t,n):typeof t==`string`&&t in X?tW(e,X[t],n):t&&t instanceof vU?tW(e,nW(t),n):t?.type&&t.type instanceof vU?tW(e,nW(t.type),n):tW(e,X.NONE,n)}function tW(e,t,n=!0){let r=null;switch(t){case X.Null:r=e.visitNull;break;case X.Bool:r=e.visitBool;break;case X.Int:r=e.visitInt;break;case X.Int8:r=e.visitInt8||e.visitInt;break;case X.Int16:r=e.visitInt16||e.visitInt;break;case X.Int32:r=e.visitInt32||e.visitInt;break;case X.Int64:r=e.visitInt64||e.visitInt;break;case X.Uint8:r=e.visitUint8||e.visitInt;break;case X.Uint16:r=e.visitUint16||e.visitInt;break;case X.Uint32:r=e.visitUint32||e.visitInt;break;case X.Uint64:r=e.visitUint64||e.visitInt;break;case X.Float:r=e.visitFloat;break;case X.Float16:r=e.visitFloat16||e.visitFloat;break;case X.Float32:r=e.visitFloat32||e.visitFloat;break;case X.Float64:r=e.visitFloat64||e.visitFloat;break;case X.Utf8:r=e.visitUtf8;break;case X.LargeUtf8:r=e.visitLargeUtf8;break;case X.Binary:r=e.visitBinary;break;case X.LargeBinary:r=e.visitLargeBinary;break;case X.FixedSizeBinary:r=e.visitFixedSizeBinary;break;case X.Date:r=e.visitDate;break;case X.DateDay:r=e.visitDateDay||e.visitDate;break;case X.DateMillisecond:r=e.visitDateMillisecond||e.visitDate;break;case X.Timestamp:r=e.visitTimestamp;break;case X.TimestampSecond:r=e.visitTimestampSecond||e.visitTimestamp;break;case X.TimestampMillisecond:r=e.visitTimestampMillisecond||e.visitTimestamp;break;case X.TimestampMicrosecond:r=e.visitTimestampMicrosecond||e.visitTimestamp;break;case X.TimestampNanosecond:r=e.visitTimestampNanosecond||e.visitTimestamp;break;case X.Time:r=e.visitTime;break;case X.TimeSecond:r=e.visitTimeSecond||e.visitTime;break;case X.TimeMillisecond:r=e.visitTimeMillisecond||e.visitTime;break;case X.TimeMicrosecond:r=e.visitTimeMicrosecond||e.visitTime;break;case X.TimeNanosecond:r=e.visitTimeNanosecond||e.visitTime;break;case X.Decimal:r=e.visitDecimal;break;case X.List:r=e.visitList;break;case X.Struct:r=e.visitStruct;break;case X.Union:r=e.visitUnion;break;case X.DenseUnion:r=e.visitDenseUnion||e.visitUnion;break;case X.SparseUnion:r=e.visitSparseUnion||e.visitUnion;break;case X.Dictionary:r=e.visitDictionary;break;case X.Interval:r=e.visitInterval;break;case X.IntervalDayTime:r=e.visitIntervalDayTime||e.visitInterval;break;case X.IntervalYearMonth:r=e.visitIntervalYearMonth||e.visitInterval;break;case X.IntervalMonthDayNano:r=e.visitIntervalMonthDayNano||e.visitInterval;break;case X.Duration:r=e.visitDuration;break;case X.DurationSecond:r=e.visitDurationSecond||e.visitDuration;break;case X.DurationMillisecond:r=e.visitDurationMillisecond||e.visitDuration;break;case X.DurationMicrosecond:r=e.visitDurationMicrosecond||e.visitDuration;break;case X.DurationNanosecond:r=e.visitDurationNanosecond||e.visitDuration;break;case X.FixedSizeList:r=e.visitFixedSizeList;break;case X.Map:r=e.visitMap;break}if(typeof r==`function`)return r;if(!n)return()=>null;throw Error(`Unrecognized type '${X[t]}'`)}function nW(e){switch(e.typeId){case X.Null:return X.Null;case X.Int:{let{bitWidth:t,isSigned:n}=e;switch(t){case 8:return n?X.Int8:X.Uint8;case 16:return n?X.Int16:X.Uint16;case 32:return n?X.Int32:X.Uint32;case 64:return n?X.Int64:X.Uint64}return X.Int}case X.Float:switch(e.precision){case DH.HALF:return X.Float16;case DH.SINGLE:return X.Float32;case DH.DOUBLE:return X.Float64}return X.Float;case X.Binary:return X.Binary;case X.LargeBinary:return X.LargeBinary;case X.Utf8:return X.Utf8;case X.LargeUtf8:return X.LargeUtf8;case X.Bool:return X.Bool;case X.Decimal:return X.Decimal;case X.Time:switch(e.unit){case kH.SECOND:return X.TimeSecond;case kH.MILLISECOND:return X.TimeMillisecond;case kH.MICROSECOND:return X.TimeMicrosecond;case kH.NANOSECOND:return X.TimeNanosecond}return X.Time;case X.Timestamp:switch(e.unit){case kH.SECOND:return X.TimestampSecond;case kH.MILLISECOND:return X.TimestampMillisecond;case kH.MICROSECOND:return X.TimestampMicrosecond;case kH.NANOSECOND:return X.TimestampNanosecond}return X.Timestamp;case X.Date:switch(e.unit){case OH.DAY:return X.DateDay;case OH.MILLISECOND:return X.DateMillisecond}return X.Date;case X.Interval:switch(e.unit){case AH.DAY_TIME:return X.IntervalDayTime;case AH.YEAR_MONTH:return X.IntervalYearMonth;case AH.MONTH_DAY_NANO:return X.IntervalMonthDayNano}return X.Interval;case X.Duration:switch(e.unit){case kH.SECOND:return X.DurationSecond;case kH.MILLISECOND:return X.DurationMillisecond;case kH.MICROSECOND:return X.DurationMicrosecond;case kH.NANOSECOND:return X.DurationNanosecond}return X.Duration;case X.Map:return X.Map;case X.List:return X.List;case X.Struct:return X.Struct;case X.Union:switch(e.mode){case EH.Dense:return X.DenseUnion;case EH.Sparse:return X.SparseUnion}return X.Union;case X.FixedSizeBinary:return X.FixedSizeBinary;case X.FixedSizeList:return X.FixedSizeList;case X.Dictionary:return X.Dictionary}throw Error(`Unrecognized type '${X[e.typeId]}'`)}$U.prototype.visitInt8=null,$U.prototype.visitInt16=null,$U.prototype.visitInt32=null,$U.prototype.visitInt64=null,$U.prototype.visitUint8=null,$U.prototype.visitUint16=null,$U.prototype.visitUint32=null,$U.prototype.visitUint64=null,$U.prototype.visitFloat16=null,$U.prototype.visitFloat32=null,$U.prototype.visitFloat64=null,$U.prototype.visitDateDay=null,$U.prototype.visitDateMillisecond=null,$U.prototype.visitTimestampSecond=null,$U.prototype.visitTimestampMillisecond=null,$U.prototype.visitTimestampMicrosecond=null,$U.prototype.visitTimestampNanosecond=null,$U.prototype.visitTimeSecond=null,$U.prototype.visitTimeMillisecond=null,$U.prototype.visitTimeMicrosecond=null,$U.prototype.visitTimeNanosecond=null,$U.prototype.visitDenseUnion=null,$U.prototype.visitSparseUnion=null,$U.prototype.visitIntervalDayTime=null,$U.prototype.visitIntervalYearMonth=null,$U.prototype.visitIntervalMonthDayNano=null,$U.prototype.visitDuration=null,$U.prototype.visitDurationSecond=null,$U.prototype.visitDurationMillisecond=null,$U.prototype.visitDurationMicrosecond=null,$U.prototype.visitDurationNanosecond=null;var rW={};xt(rW,{float64ToUint16:()=>sW,uint16ToFloat64:()=>oW});const iW=new Float64Array(1),aW=new Uint32Array(iW.buffer);function oW(e){let t=(e&31744)>>10,n=(e&1023)/1024,r=(-1)**((e&32768)>>15);switch(t){case 31:return r*(n?NaN:1/0);case 0:return r*(n?6103515625e-14*n:0)}return r*2**(t-15)*(1+n)}function sW(e){if(e!==e)return 32256;iW[0]=e;let t=(aW[1]&2147483648)>>16&65535,n=aW[1]&2146435072,r=0;return n>=1089470464?aW[0]>0?n=31744:(n=(n&2080374784)>>16,r=(aW[1]&1048575)>>10):n<=1056964608?(r=1048576+(aW[1]&1048575),r=1048576+(r<<(n>>20)-998)>>21,n=0):(n=n-1056964608>>10,r=(aW[1]&1048575)+512>>10),t|n|r&65535}var cW=class extends $U{};function lW(e){return(t,n,r)=>{if(t.setValid(n,r!=null))return e(t,n,r)}}const uW=(e,t,n)=>{e[t]=Math.floor(n/864e5)},dW=(e,t,n,r)=>{if(n+1{let i=e+n;r?t[i>>3]|=1<>3]&=~(1<{e[t]=n},mW=({values:e},t,n)=>{e[t]=n},hW=({values:e},t,n)=>{e[t]=sW(n)},gW=(e,t,n)=>{switch(e.type.precision){case DH.HALF:return hW(e,t,n);case DH.SINGLE:case DH.DOUBLE:return mW(e,t,n)}},_W=({values:e},t,n)=>{uW(e,t,n.valueOf())},vW=({values:e},t,n)=>{e[t]=BigInt(n)},yW=({stride:e,values:t},n,r)=>{t.set(r.subarray(0,e),e*n)},bW=({values:e,valueOffsets:t},n,r)=>dW(e,t,n,r),xW=({values:e,valueOffsets:t},n,r)=>dW(e,t,n,MV(r)),SW=(e,t,n)=>{e.type.unit===OH.DAY?_W(e,t,n):vW(e,t,n)},CW=({values:e},t,n)=>{e[t]=BigInt(n/1e3)},wW=({values:e},t,n)=>{e[t]=BigInt(n)},TW=({values:e},t,n)=>{e[t]=BigInt(n*1e3)},EW=({values:e},t,n)=>{e[t]=BigInt(n*1e6)},DW=(e,t,n)=>{switch(e.type.unit){case kH.SECOND:return CW(e,t,n);case kH.MILLISECOND:return wW(e,t,n);case kH.MICROSECOND:return TW(e,t,n);case kH.NANOSECOND:return EW(e,t,n)}},OW=({values:e},t,n)=>{e[t]=n},kW=({values:e},t,n)=>{e[t]=n},AW=({values:e},t,n)=>{e[t]=n},jW=({values:e},t,n)=>{e[t]=n},MW=(e,t,n)=>{switch(e.type.unit){case kH.SECOND:return OW(e,t,n);case kH.MILLISECOND:return kW(e,t,n);case kH.MICROSECOND:return AW(e,t,n);case kH.NANOSECOND:return jW(e,t,n)}},NW=({values:e,stride:t},n,r)=>{e.set(r.subarray(0,t),t*n)},PW=(e,t,n)=>{let r=e.children[0],i=e.valueOffsets,a=tG.getVisitFn(r);if(Array.isArray(n))for(let e=-1,o=i[t],s=i[t+1];o{let r=e.children[0],{valueOffsets:i}=e,a=tG.getVisitFn(r),{[t]:o,[t+1]:s}=i,c=n instanceof Map?n.entries():Object.entries(n);for(let e of c)if(a(r,o,e),++o>=s)break},IW=(e,t)=>(n,r,i,a)=>r&&n(r,e,t[a]),LW=(e,t)=>(n,r,i,a)=>r&&n(r,e,t.get(a)),RW=(e,t)=>(n,r,i,a)=>r&&n(r,e,t.get(i.name)),zW=(e,t)=>(n,r,i,a)=>r&&n(r,e,t[i.name]),BW=(e,t,n)=>{let r=e.type.children.map(e=>tG.getVisitFn(e.type)),i=n instanceof Map?RW(t,n):n instanceof iq?LW(t,n):Array.isArray(n)?IW(t,n):zW(t,n);e.type.children.forEach((t,n)=>i(r[n],e.children[n],t,n))},VW=(e,t,n)=>{e.type.mode===EH.Dense?HW(e,t,n):UW(e,t,n)},HW=(e,t,n)=>{let r=e.type.typeIdToChildIndex[e.typeIds[t]],i=e.children[r];tG.visit(i,e.valueOffsets[t],n)},UW=(e,t,n)=>{let r=e.type.typeIdToChildIndex[e.typeIds[t]],i=e.children[r];tG.visit(i,t,n)},WW=(e,t,n)=>{var r;(r=e.dictionary)==null||r.set(e.values[t],n)},GW=(e,t,n)=>{switch(e.type.unit){case AH.YEAR_MONTH:return qW(e,t,n);case AH.DAY_TIME:return KW(e,t,n);case AH.MONTH_DAY_NANO:return JW(e,t,n)}},KW=({values:e},t,n)=>{e.set(n.subarray(0,2),2*t)},qW=({values:e},t,n)=>{e[t]=n[0]*12+n[1]%12},JW=({values:e,stride:t},n,r)=>{e.set(r.subarray(0,t),t*n)},YW=({values:e},t,n)=>{e[t]=n},XW=({values:e},t,n)=>{e[t]=n},ZW=({values:e},t,n)=>{e[t]=n},QW=({values:e},t,n)=>{e[t]=n},$W=(e,t,n)=>{switch(e.type.unit){case kH.SECOND:return YW(e,t,n);case kH.MILLISECOND:return XW(e,t,n);case kH.MICROSECOND:return ZW(e,t,n);case kH.NANOSECOND:return QW(e,t,n)}},eG=(e,t,n)=>{let{stride:r}=e,i=e.children[0],a=tG.getVisitFn(i);if(Array.isArray(n))for(let e=-1,o=t*r;++e`${PH(e)}: ${PH(t)}`).join(`, `)}}`}[Symbol.for(`nodejs.util.inspect.custom`)](){return this.toString()}[Symbol.iterator](){return new aG(this[nG],this[rG])}},aG=class{constructor(e,t){this.childIndex=0,this.children=e.children,this.rowIndex=t,this.childFields=e.type.children,this.numChildren=this.childFields.length}[Symbol.iterator](){return this}next(){let e=this.childIndex;return ee.name)}has(e,t){return e[nG].type.children.some(e=>e.name===t)}getOwnPropertyDescriptor(e,t){if(e[nG].type.children.some(e=>e.name===t))return{writable:!0,enumerable:!0,configurable:!0}}get(e,t){if(Reflect.has(e,t))return e[t];let n=e[nG].type.children.findIndex(e=>e.name===t);if(n!==-1){let r=$G.visit(e[nG].children[n],e[rG]);return Reflect.set(e,t,r),r}}set(e,t,n){let r=e[nG].type.children.findIndex(e=>e.name===t);return r===-1?Reflect.has(e,t)||typeof t==`symbol`?Reflect.set(e,t,n):!1:(tG.visit(e[nG].children[r],e[rG],n),Reflect.set(e,t,n))}};const sG=new oG;var cG=class extends $U{};function lG(e){return(t,n)=>t.getValid(n)?e(t,n):null}const uG=(e,t)=>864e5*e[t],dG=(e,t)=>null,fG=(e,t,n)=>{if(n+1>=t.length)return null;let r=FH(t[n]),i=FH(t[n+1]);return e.subarray(r,i)},pG=({offset:e,values:t},n)=>{let r=e+n,i=t[r>>3];return(i&1<uG(e,t),hG=({values:e},t)=>FH(e[t]),gG=({stride:e,values:t},n)=>t[e*n],_G=({stride:e,values:t},n)=>oW(t[e*n]),vG=({values:e},t)=>e[t],yG=({stride:e,values:t},n)=>t.subarray(e*n,e*(n+1)),bG=({values:e,valueOffsets:t},n)=>fG(e,t,n),xG=({values:e,valueOffsets:t},n)=>{let r=fG(e,t,n);return r===null?null:AV(r)},SG=({values:e},t)=>e[t],CG=({type:e,values:t},n)=>e.precision===DH.HALF?oW(t[n]):t[n],wG=(e,t)=>e.type.unit===OH.DAY?mG(e,t):hG(e,t),TG=({values:e},t)=>1e3*FH(e[t]),EG=({values:e},t)=>FH(e[t]),DG=({values:e},t)=>IH(e[t],BigInt(1e3)),OG=({values:e},t)=>IH(e[t],BigInt(1e6)),kG=(e,t)=>{switch(e.type.unit){case kH.SECOND:return TG(e,t);case kH.MILLISECOND:return EG(e,t);case kH.MICROSECOND:return DG(e,t);case kH.NANOSECOND:return OG(e,t)}},AG=({values:e},t)=>e[t],jG=({values:e},t)=>e[t],MG=({values:e},t)=>e[t],NG=({values:e},t)=>e[t],PG=(e,t)=>{switch(e.type.unit){case kH.SECOND:return AG(e,t);case kH.MILLISECOND:return jG(e,t);case kH.MICROSECOND:return MG(e,t);case kH.NANOSECOND:return NG(e,t)}},FG=({values:e,stride:t},n)=>YH.decimal(e.subarray(t*n,t*(n+1))),IG=(e,t)=>{let{valueOffsets:n,stride:r,children:i}=e,{[t*r]:a,[t*r+1]:o}=n,s=i[0],c=s.slice(a,o-a);return new iq([c])},LG=(e,t)=>{let{valueOffsets:n,children:r}=e,{[t]:i,[t+1]:a}=n,o=r[0];return new iK(o.slice(i,a-i))},RG=(e,t)=>new iG(e,t),zG=(e,t)=>e.type.mode===EH.Dense?BG(e,t):VG(e,t),BG=(e,t)=>{let n=e.type.typeIdToChildIndex[e.typeIds[t]],r=e.children[n];return $G.visit(r,e.valueOffsets[t])},VG=(e,t)=>{let n=e.type.typeIdToChildIndex[e.typeIds[t]],r=e.children[n];return $G.visit(r,t)},HG=(e,t)=>{var n;return(n=e.dictionary)?.get(e.values[t])},UG=(e,t)=>e.type.unit===AH.MONTH_DAY_NANO?KG(e,t):e.type.unit===AH.DAY_TIME?WG(e,t):GG(e,t),WG=({values:e},t)=>e.subarray(2*t,2*(t+1)),GG=({values:e},t)=>{let n=e[t],r=new Int32Array(2);return r[0]=Math.trunc(n/12),r[1]=Math.trunc(n%12),r},KG=({values:e},t)=>e.subarray(4*t,4*(t+1)),qG=({values:e},t)=>e[t],JG=({values:e},t)=>e[t],YG=({values:e},t)=>e[t],XG=({values:e},t)=>e[t],ZG=(e,t)=>{switch(e.type.unit){case kH.SECOND:return qG(e,t);case kH.MILLISECOND:return JG(e,t);case kH.MICROSECOND:return YG(e,t);case kH.NANOSECOND:return XG(e,t)}},QG=(e,t)=>{let{stride:n,children:r}=e,i=r[0],a=i.slice(t*n,n);return new iq([a])};cG.prototype.visitNull=lG(dG),cG.prototype.visitBool=lG(pG),cG.prototype.visitInt=lG(SG),cG.prototype.visitInt8=lG(gG),cG.prototype.visitInt16=lG(gG),cG.prototype.visitInt32=lG(gG),cG.prototype.visitInt64=lG(vG),cG.prototype.visitUint8=lG(gG),cG.prototype.visitUint16=lG(gG),cG.prototype.visitUint32=lG(gG),cG.prototype.visitUint64=lG(vG),cG.prototype.visitFloat=lG(CG),cG.prototype.visitFloat16=lG(_G),cG.prototype.visitFloat32=lG(gG),cG.prototype.visitFloat64=lG(gG),cG.prototype.visitUtf8=lG(xG),cG.prototype.visitLargeUtf8=lG(xG),cG.prototype.visitBinary=lG(bG),cG.prototype.visitLargeBinary=lG(bG),cG.prototype.visitFixedSizeBinary=lG(yG),cG.prototype.visitDate=lG(wG),cG.prototype.visitDateDay=lG(mG),cG.prototype.visitDateMillisecond=lG(hG),cG.prototype.visitTimestamp=lG(kG),cG.prototype.visitTimestampSecond=lG(TG),cG.prototype.visitTimestampMillisecond=lG(EG),cG.prototype.visitTimestampMicrosecond=lG(DG),cG.prototype.visitTimestampNanosecond=lG(OG),cG.prototype.visitTime=lG(PG),cG.prototype.visitTimeSecond=lG(AG),cG.prototype.visitTimeMillisecond=lG(jG),cG.prototype.visitTimeMicrosecond=lG(MG),cG.prototype.visitTimeNanosecond=lG(NG),cG.prototype.visitDecimal=lG(FG),cG.prototype.visitList=lG(IG),cG.prototype.visitStruct=lG(RG),cG.prototype.visitUnion=lG(zG),cG.prototype.visitDenseUnion=lG(BG),cG.prototype.visitSparseUnion=lG(VG),cG.prototype.visitDictionary=lG(HG),cG.prototype.visitInterval=lG(UG),cG.prototype.visitIntervalDayTime=lG(WG),cG.prototype.visitIntervalYearMonth=lG(GG),cG.prototype.visitIntervalMonthDayNano=lG(KG),cG.prototype.visitDuration=lG(ZG),cG.prototype.visitDurationSecond=lG(qG),cG.prototype.visitDurationMillisecond=lG(JG),cG.prototype.visitDurationMicrosecond=lG(YG),cG.prototype.visitDurationNanosecond=lG(XG),cG.prototype.visitFixedSizeList=lG(QG),cG.prototype.visitMap=lG(LG);const $G=new cG,eK=Symbol.for(`keys`),tK=Symbol.for(`vals`),nK=Symbol.for(`kKeysAsStrings`),rK=Symbol.for(`_kKeysAsStrings`);var iK=class{constructor(e){return this[eK]=new iq([e.children[0]]).memoize(),this[tK]=e.children[1],new Proxy(this,new oK)}get[nK](){return this[rK]||(this[rK]=Array.from(this[eK].toArray(),String))}[Symbol.iterator](){return new aK(this[eK],this[tK])}get size(){return this[eK].length}toArray(){return Object.values(this.toJSON())}toJSON(){let e=this[eK],t=this[tK],n={};for(let r=-1,i=e.length;++r`${PH(e)}: ${PH(t)}`).join(`, `)}}`}[Symbol.for(`nodejs.util.inspect.custom`)](){return this.toString()}},aK=class{constructor(e,t){this.keys=e,this.vals=t,this.keyIndex=0,this.numKeys=e.length}[Symbol.iterator](){return this}next(){let e=this.keyIndex;return e===this.numKeys?{done:!0,value:null}:(this.keyIndex++,{done:!1,value:[this.keys.get(e),$G.visit(this.vals,e)]})}},oK=class{isExtensible(){return!1}deleteProperty(){return!1}preventExtensions(){return!0}ownKeys(e){return e[nK]}has(e,t){return e[nK].includes(t)}getOwnPropertyDescriptor(e,t){let n=e[nK].indexOf(t);if(n!==-1)return{writable:!0,enumerable:!0,configurable:!0}}get(e,t){if(Reflect.has(e,t))return e[t];let n=e[nK].indexOf(t);if(n!==-1){let r=$G.visit(Reflect.get(e,tK),n);return Reflect.set(e,t,r),r}}set(e,t,n){let r=e[nK].indexOf(t);return r===-1?Reflect.has(e,t)?Reflect.set(e,t,n):!1:(tG.visit(Reflect.get(e,tK),r,n),Reflect.set(e,t,n))}};Object.defineProperties(iK.prototype,{[Symbol.toStringTag]:{enumerable:!1,configurable:!1,value:`Row`},[eK]:{writable:!0,enumerable:!1,configurable:!1,value:null},[tK]:{writable:!0,enumerable:!1,configurable:!1,value:null},[rK]:{writable:!0,enumerable:!1,configurable:!1,value:null}});var sK={};xt(sK,{clampRange:()=>lK,createElementComparator:()=>fK,wrapIndex:()=>uK});let cK;function lK(e,t,n,r){let{length:i=0}=e,a=typeof t==`number`?t:0,o=typeof n==`number`?n:i;return a<0&&(a=(a%i+i)%i),o<0&&(o=(o%i+i)%i),oi&&(o=i),r?r(e,a,o):[a,o]}const uK=(e,t)=>e<0?t+e:e,dK=e=>e!==e;function fK(e){let t=typeof e;if(t!==`object`||e===null)return dK(e)?dK:t=>t===e;if(e instanceof Date){let t=e.valueOf();return e=>e instanceof Date?e.valueOf()===t:!1}return ArrayBuffer.isView(e)?t=>t?TH(e,t):!1:e instanceof Map?mK(e):Array.isArray(e)?pK(e):e instanceof iq?hK(e):gK(e,!0)}function pK(e){let t=[];for(let n=-1,r=e.length;++n!1;let r=[];for(let t=-1,i=n.length;++t{if(!n||typeof n!=`object`)return!1;switch(n.constructor){case Array:return vK(e,n);case Map:return bK(e,n,n.keys());case iK:case iG:case Object:case void 0:return bK(e,n,t||Object.keys(n))}return n instanceof iq?yK(e,n):!1}}function vK(e,t){let n=e.length;if(t.length!==n)return!1;for(let r=-1;++rDK,getBit:()=>CK,getBool:()=>SK,packBools:()=>EK,popcnt_array:()=>kK,popcnt_bit_range:()=>OK,popcnt_uint32:()=>AK,setBool:()=>wK,truncateBitmap:()=>TK});function SK(e,t,n,r){return(n&1<>r}function wK(e,t,n){return n?!!(e[t>>3]|=1<>3]&=~(1<0||n.byteLength>3):EK(new DK(n,e,t,null,SK)).subarray(0,r)),i}return n}function EK(e){let t=[],n=0,r=0,i=0;for(let a of e)a&&(i|=1<0)&&(t[n++]=i);let a=new Uint8Array(t.length+7&-8);return a.set(t),a}var DK=class{constructor(e,t,n,r,i){this.bytes=e,this.length=n,this.context=r,this.get=i,this.bit=t%8,this.byteIndex=t>>3,this.byte=e[this.byteIndex++],this.index=0}next(){return this.index>3<<3,i=t+(t%8==0?0:8-t%8);return OK(e,t,i)+OK(e,r,n)+kK(e,i>>3,r-i>>3)}function kK(e,t,n){let r=0,i=Math.trunc(t),a=new DataView(e.buffer,e.byteOffset,e.byteLength),o=n===void 0?e.byteLength:i+n;for(;o-i>=4;)r+=AK(a.getUint32(i)),i+=4;for(;o-i>=2;)r+=AK(a.getUint16(i)),i+=2;for(;o-i>=1;)r+=AK(a.getUint8(i)),i+=1;return r}function AK(e){let t=Math.trunc(e);return t-=t>>>1&1431655765,t=(t&858993459)+(t>>>2&858993459),(t+(t>>>4)&252645135)*16843009>>>24}const jK=-1;var MK=class e{get typeId(){return this.type.typeId}get ArrayType(){return this.type.ArrayType}get buffers(){return[this.valueOffsets,this.values,this.nullBitmap,this.typeIds]}get nullable(){if(this._nullCount!==0){let{type:e}=this;return vU.isSparseUnion(e)||vU.isDenseUnion(e)?this.children.some(e=>e.nullable):this.nullBitmap&&this.nullBitmap.byteLength>0}return!0}get byteLength(){let e=0,{valueOffsets:t,values:n,nullBitmap:r,typeIds:i}=this;return t&&(e+=t.byteLength),n&&(e+=n.byteLength),r&&(e+=r.byteLength),i&&(e+=i.byteLength),this.children.reduce((e,t)=>e+t.byteLength,e)}get nullCount(){if(vU.isUnion(this.type))return this.children.reduce((e,t)=>e+t.nullCount,0);let e=this._nullCount,t;return e<=jK&&(t=this.nullBitmap)&&(this._nullCount=e=t.length===0?0:this.length-OK(t,this.offset,this.offset+this.length)),e}constructor(t,n,r,i,a,o=[],s){this.type=t,this.children=o,this.dictionary=s,this.offset=Math.floor(Math.max(n||0,0)),this.length=Math.floor(Math.max(r||0,0)),this._nullCount=Math.floor(Math.max(i||0,-1));let c;a instanceof e?(this.stride=a.stride,this.values=a.values,this.typeIds=a.typeIds,this.nullBitmap=a.nullBitmap,this.valueOffsets=a.valueOffsets):(this.stride=QU(t),a&&((c=a[0])&&(this.valueOffsets=c),(c=a[1])&&(this.values=c),(c=a[2])&&(this.nullBitmap=c),(c=a[3])&&(this.typeIds=c)))}getValid(e){let{type:t}=this;if(vU.isUnion(t)){let n=t,r=this.children[n.typeIdToChildIndex[this.typeIds[e]]],i=n.mode===EH.Dense?this.valueOffsets[e]:e;return r.getValid(i)}if(this.nullable&&this.nullCount>0){let t=this.offset+e,n=this.nullBitmap[t>>3];return(n&1<>3;(!r||r.byteLength<=c)&&(r=new Uint8Array((i+a+63&-64)>>3).fill(255),this.nullCount>0?(r.set(TK(i,a,this.nullBitmap),0),Object.assign(this,{nullBitmap:r})):Object.assign(this,{nullBitmap:r,_nullCount:0}));let l=r[c];n=(l&s)!==0,r[c]=t?l|s:l&~s}return n!==!!t&&(this._nullCount=this.nullCount+(t?-1:1)),t}clone(t=this.type,n=this.offset,r=this.length,i=this._nullCount,a=this,o=this.children){return new e(t,n,r,i,a,o,this.dictionary)}slice(e,t){let{stride:n,typeId:r,children:i}=this,a=(this._nullCount===0)-1,o=r===16?n:1,s=this._sliceBuffers(e,t,n,r);return this.clone(this.type,this.offset+e,t,a,s,i.length===0||this.valueOffsets?i:this._sliceChildren(i,o*e,o*t))}_changeLengthAndBackfillNullBitmap(e){if(this.typeId===X.Null)return this.clone(this.type,0,e,0);let{length:t,nullCount:n}=this,r=new Uint8Array((e+63&-64)>>3).fill(255,0,t>>3);r[t>>3]=(1<0&&r.set(TK(this.offset,t,this.nullBitmap),0);let i=this.buffers;return i[jH.VALIDITY]=r,this.clone(this.type,0,e,n+(e-t),i)}_sliceBuffers(e,t,n,r){let i,{buffers:a}=this;return(i=a[jH.TYPE])&&(a[jH.TYPE]=i.subarray(e,e+t)),(i=a[jH.OFFSET])&&(a[jH.OFFSET]=i.subarray(e,e+t+1))||(i=a[jH.DATA])&&(a[jH.DATA]=r===6?i:i.subarray(n*e,n*(e+t))),a}_sliceChildren(e,t,n){return e.map(e=>e.slice(t,n))}};MK.prototype.children=Object.freeze([]);var NK=class e extends $U{visit(e){return this.getVisitFn(e.type).call(this,e)}visitNull(e){let{type:t,offset:n=0,length:r=0}=e;return new MK(t,n,r,r)}visitBool(e){let{type:t,offset:n=0}=e,r=XV(e.nullBitmap),i=GV(t.ArrayType,e.data),{length:a=i.length>>3,nullCount:o=e.nullBitmap?-1:0}=e;return new MK(t,n,a,o,[void 0,i,r])}visitInt(e){let{type:t,offset:n=0}=e,r=XV(e.nullBitmap),i=GV(t.ArrayType,e.data),{length:a=i.length,nullCount:o=e.nullBitmap?-1:0}=e;return new MK(t,n,a,o,[void 0,i,r])}visitFloat(e){let{type:t,offset:n=0}=e,r=XV(e.nullBitmap),i=GV(t.ArrayType,e.data),{length:a=i.length,nullCount:o=e.nullBitmap?-1:0}=e;return new MK(t,n,a,o,[void 0,i,r])}visitUtf8(e){let{type:t,offset:n=0}=e,r=XV(e.data),i=XV(e.nullBitmap),a=JV(e.valueOffsets),{length:o=a.length-1,nullCount:s=e.nullBitmap?-1:0}=e;return new MK(t,n,o,s,[a,r,i])}visitLargeUtf8(e){let{type:t,offset:n=0}=e,r=XV(e.data),i=XV(e.nullBitmap),a=YV(e.valueOffsets),{length:o=a.length-1,nullCount:s=e.nullBitmap?-1:0}=e;return new MK(t,n,o,s,[a,r,i])}visitBinary(e){let{type:t,offset:n=0}=e,r=XV(e.data),i=XV(e.nullBitmap),a=JV(e.valueOffsets),{length:o=a.length-1,nullCount:s=e.nullBitmap?-1:0}=e;return new MK(t,n,o,s,[a,r,i])}visitLargeBinary(e){let{type:t,offset:n=0}=e,r=XV(e.data),i=XV(e.nullBitmap),a=YV(e.valueOffsets),{length:o=a.length-1,nullCount:s=e.nullBitmap?-1:0}=e;return new MK(t,n,o,s,[a,r,i])}visitFixedSizeBinary(e){let{type:t,offset:n=0}=e,r=XV(e.nullBitmap),i=GV(t.ArrayType,e.data),{length:a=i.length/QU(t),nullCount:o=e.nullBitmap?-1:0}=e;return new MK(t,n,a,o,[void 0,i,r])}visitDate(e){let{type:t,offset:n=0}=e,r=XV(e.nullBitmap),i=GV(t.ArrayType,e.data),{length:a=i.length/QU(t),nullCount:o=e.nullBitmap?-1:0}=e;return new MK(t,n,a,o,[void 0,i,r])}visitTimestamp(e){let{type:t,offset:n=0}=e,r=XV(e.nullBitmap),i=GV(t.ArrayType,e.data),{length:a=i.length/QU(t),nullCount:o=e.nullBitmap?-1:0}=e;return new MK(t,n,a,o,[void 0,i,r])}visitTime(e){let{type:t,offset:n=0}=e,r=XV(e.nullBitmap),i=GV(t.ArrayType,e.data),{length:a=i.length/QU(t),nullCount:o=e.nullBitmap?-1:0}=e;return new MK(t,n,a,o,[void 0,i,r])}visitDecimal(e){let{type:t,offset:n=0}=e,r=XV(e.nullBitmap),i=GV(t.ArrayType,e.data),{length:a=i.length/QU(t),nullCount:o=e.nullBitmap?-1:0}=e;return new MK(t,n,a,o,[void 0,i,r])}visitList(e){let{type:t,offset:n=0,child:r}=e,i=XV(e.nullBitmap),a=JV(e.valueOffsets),{length:o=a.length-1,nullCount:s=e.nullBitmap?-1:0}=e;return new MK(t,n,o,s,[a,void 0,i],[r])}visitStruct(e){let{type:t,offset:n=0,children:r=[]}=e,i=XV(e.nullBitmap),{length:a=r.reduce((e,{length:t})=>Math.max(e,t),0),nullCount:o=e.nullBitmap?-1:0}=e;return new MK(t,n,a,o,[void 0,void 0,i],r)}visitUnion(e){let{type:t,offset:n=0,children:r=[]}=e,i=GV(t.ArrayType,e.typeIds),{length:a=i.length,nullCount:o=-1}=e;if(vU.isSparseUnion(t))return new MK(t,n,a,o,[void 0,void 0,void 0,i],r);let s=JV(e.valueOffsets);return new MK(t,n,a,o,[s,void 0,void 0,i],r)}visitDictionary(t){let{type:n,offset:r=0}=t,i=XV(t.nullBitmap),a=GV(n.indices.ArrayType,t.data),{dictionary:o=new iq([new e().visit({type:n.dictionary})])}=t,{length:s=a.length,nullCount:c=t.nullBitmap?-1:0}=t;return new MK(n,r,s,c,[void 0,a,i],[],o)}visitInterval(e){let{type:t,offset:n=0}=e,r=XV(e.nullBitmap),i=GV(t.ArrayType,e.data),{length:a=i.length/QU(t),nullCount:o=e.nullBitmap?-1:0}=e;return new MK(t,n,a,o,[void 0,i,r])}visitDuration(e){let{type:t,offset:n=0}=e,r=XV(e.nullBitmap),i=GV(t.ArrayType,e.data),{length:a=i.length,nullCount:o=e.nullBitmap?-1:0}=e;return new MK(t,n,a,o,[void 0,i,r])}visitFixedSizeList(t){let{type:n,offset:r=0,child:i=new e().visit({type:n.valueType})}=t,a=XV(t.nullBitmap),{length:o=i.length/QU(n),nullCount:s=t.nullBitmap?-1:0}=t;return new MK(n,r,o,s,[void 0,void 0,a],[i])}visitMap(t){let{type:n,offset:r=0,child:i=new e().visit({type:n.childType})}=t,a=XV(t.nullBitmap),o=JV(t.valueOffsets),{length:s=o.length-1,nullCount:c=t.nullBitmap?-1:0}=t;return new MK(n,r,s,c,[o,void 0,a],[i])}};const PK=new NK;var FK=class{constructor(e=0,t){this.numChunks=e,this.getChunkIterator=t,this.chunkIndex=0,this.chunkIterator=this.getChunkIterator(0)}next(){for(;this.chunkIndexe.nullable)}function LK(e){return e.reduce((e,t)=>e+t.nullCount,0)}function RK(e){return e.reduce((e,t,n)=>(e[n+1]=e[n]+t.length,e),new Uint32Array(e.length+1))}function zK(e,t,n,r){let i=[];for(let a=-1,o=e.length;++a=r)break;if(n>=s+c)continue;if(s>=n&&s+c<=r){i.push(o);continue}let l=Math.max(0,n-s),u=Math.min(r-s,c);i.push(o.slice(l,u-l))}return i.length===0&&i.push(e[0].slice(0,0)),i}function BK(e,t,n,r){let i=0,a=0,o=t.length-1;do{if(i>=o-1)return n0?0:-1}function qK(e,t){let{nullBitmap:n}=e;if(!n||e.nullCount<=0)return-1;let r=0;for(let i of new DK(n,e.offset+(t||0),e.length,n,SK)){if(!i)return r;++r}return-1}function JK(e,t,n){if(t===void 0)return-1;if(t===null)switch(e.typeId){case X.Union:break;case X.Dictionary:break;default:return qK(e,n)}let r=$G.getVisitFn(e),i=fK(t);for(let t=(n||0)-1,a=e.length;++t{let n=e.data[t];return n.values.subarray(0,n.length)[Symbol.iterator]()});let n=0;return new FK(e.data.length,t=>{let r=e.data[t],i=r.length,a=e.slice(n,n+i);return n+=i,new $K(a)})}var $K=class{constructor(e){this.vector=e,this.index=0}next(){return this.indexe.data):t;if(a.length===0||a.some(e=>!(e instanceof MK)))throw TypeError(`Vector constructor expects an Array of Data instances.`);let o=(n=a[0])?.type;switch(a.length){case 0:this._offsets=[0];break;case 1:{let{get:e,set:t,indexOf:n}=nq[o.typeId],r=a[0];this.isValid=e=>VK(r,e),this.get=t=>e(r,t),this.set=(e,n)=>t(r,e,n),this.indexOf=e=>n(r,e),this._offsets=[0,r.length];break}default:Object.setPrototypeOf(this,rq[o.typeId]),this._offsets=RK(a);break}this.data=a,this.type=o,this.stride=QU(o),this.numChildren=(i=(r=o.children)?.length)??0,this.length=this._offsets.at(-1)}get byteLength(){return this.data.reduce((e,t)=>e+t.byteLength,0)}get nullable(){return IK(this.data)}get nullCount(){return LK(this.data)}get ArrayType(){return this.type.ArrayType}get[Symbol.toStringTag](){return`${this.VectorName}<${this.type[Symbol.toStringTag]}>`}get VectorName(){return`${X[this.type.typeId]}Vector`}isValid(e){return!1}get(e){return null}at(e){return this.get(uK(e,this.length))}set(e,t){}indexOf(e,t){return-1}includes(e,t){return this.indexOf(e,t)>-1}[Symbol.iterator](){return eq.visit(this)}concat(...t){return new e(this.data.concat(t.flatMap(e=>e.data).flat(1/0)))}slice(t,n){return new e(lK(this,t,n,({data:e,_offsets:t},n,r)=>zK(e,t,n,r)))}toJSON(){return[...this]}toArray(){let{type:e,data:t,length:n,stride:r,ArrayType:i}=this;switch(e.typeId){case X.Int:case X.Float:case X.Decimal:case X.Time:case X.Timestamp:switch(t.length){case 0:return new i;case 1:return t[0].values.subarray(0,n*r);default:return t.reduce((e,{values:t,length:n})=>(e.array.set(t.subarray(0,n*r),e.offset),e.offset+=n*r,e),{array:new i(n*r),offset:0}).array}}return[...this]}toString(){return`[${[...this].join(`,`)}]`}getChild(e){var t;return this.getChildAt((t=this.type.children)?.findIndex(t=>t.name===e))}getChildAt(t){return t>-1&&te[t])):null}get isMemoized(){return vU.isDictionary(this.type)?this.data[0].dictionary.isMemoized:!1}memoize(){if(vU.isDictionary(this.type)){let t=new aq(this.data[0].dictionary),n=this.data.map(e=>{let n=e.clone();return n.dictionary=t,n});return new e(n)}return new aq(this)}unmemoize(){if(vU.isDictionary(this.type)&&this.isMemoized){let t=this.data[0].dictionary.unmemoize(),n=this.data.map(e=>{let n=e.clone();return n.dictionary=t,n});return new e(n)}return this}};tq=Symbol.toStringTag,iq[tq]=(e=>{e.type=vU.prototype,e.data=[],e.length=0,e.stride=1,e.numChildren=0,e._offsets=new Uint32Array([0]),e[Symbol.isConcatSpreadable]=!0;let t=Object.keys(X).map(e=>X[e]).filter(e=>typeof e==`number`&&e!==X.NONE);for(let n of t){let t=$G.getVisitFnByTypeId(n),r=tG.getVisitFnByTypeId(n),i=XK.getVisitFnByTypeId(n);nq[n]={get:t,set:r,indexOf:i},rq[n]=Object.create(e,{isValid:{value:HK(VK)},get:{value:HK($G.getVisitFnByTypeId(n))},set:{value:UK(tG.getVisitFnByTypeId(n))},indexOf:{value:WK(XK.getVisitFnByTypeId(n))}})}return`Vector`})(iq.prototype);var aq=class e extends iq{constructor(t){super(t.data);let n=this.get,r=this.set,i=this.slice,a=Array(this.length);Object.defineProperty(this,`get`,{value(e){let t=a[e];if(t!==void 0)return t;let r=n.call(this,e);return a[e]=r,r}}),Object.defineProperty(this,`set`,{value(e,t){r.call(this,e,t),a[e]=t}}),Object.defineProperty(this,`slice`,{value:(t,n)=>new e(i.call(this,t,n))}),Object.defineProperty(this,`isMemoized`,{value:!0}),Object.defineProperty(this,`unmemoize`,{value:()=>new iq(this.data)}),Object.defineProperty(this,`memoize`,{value:()=>this})}},oq={};xt(oq,{BaseInt64:()=>dq,Int128:()=>mq,Int64:()=>pq,Uint64:()=>fq});const sq=65536;function cq(e){return e<0&&(e=4294967295+e+1),`0x${e.toString(16)}`}const lq=8,uq=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8];var dq=class{constructor(e){this.buffer=e}high(){return this.buffer[1]}low(){return this.buffer[0]}_times(e){let t=new Uint32Array([this.buffer[1]>>>16,this.buffer[1]&65535,this.buffer[0]>>>16,this.buffer[0]&65535]),n=new Uint32Array([e.buffer[1]>>>16,e.buffer[1]&65535,e.buffer[0]>>>16,e.buffer[0]&65535]),r=t[3]*n[3];this.buffer[0]=r&65535;let i=r>>>16;return r=t[2]*n[3],i+=r,r=t[3]*n[2]>>>0,i+=r,this.buffer[0]+=i<<16,this.buffer[1]=i>>>0>>16,this.buffer[1]+=t[1]*n[3]+t[2]*n[2]+t[3]*n[1],this.buffer[1]+=t[0]*n[3]+t[1]*n[2]+t[2]*n[1]+t[3]*n[0]<<16,this}_plus(e){let t=this.buffer[0]+e.buffer[0]>>>0;this.buffer[1]+=e.buffer[1],t>>0&&++this.buffer[1],this.buffer[0]=t}lessThan(e){return this.buffer[1]>>0,t[2]=this.buffer[2]+e.buffer[2]>>>0,t[1]=this.buffer[1]+e.buffer[1]>>>0,t[0]=this.buffer[0]+e.buffer[0]>>>0,t[0]>>0&&++t[1],t[1]>>0&&++t[2],t[2]>>0&&++t[3],this.buffer[3]=t[3],this.buffer[2]=t[2],this.buffer[1]=t[1],this.buffer[0]=t[0],this}hex(){return`${cq(this.buffer[3])} ${cq(this.buffer[2])} ${cq(this.buffer[1])} ${cq(this.buffer[0])}`}static multiply(t,n){let r=new e(new Uint32Array(t.buffer));return r.times(n)}static add(t,n){let r=new e(new Uint32Array(t.buffer));return r.plus(n)}static from(t,n=new Uint32Array(4)){return e.fromString(typeof t==`string`?t:t.toString(),n)}static fromNumber(t,n=new Uint32Array(4)){return e.fromString(t.toString(),n)}static fromString(t,n=new Uint32Array(4)){let r=t.startsWith(`-`),i=t.length,a=new e(n);for(let n=r?1:0;ngq,toIntervalDayTimeObjects:()=>vq,toIntervalMonthDayNanoInt32Array:()=>_q,toIntervalMonthDayNanoObjects:()=>yq});function gq(e){var t,n;let r=e.length,i=new Int32Array(r*2);for(let a=0,o=0;a>BigInt(32))):o+=2}return i}function vq(e){let t=e.length,n=Array(t/2);for(let r=0,i=0;r>>0);r[a++]={months:e[i],days:e[i+1],nanoseconds:t?`${n}`:n}}return r}var bq=class extends $U{compareSchemas(e,t){return e===t||t instanceof e.constructor&&this.compareManyFields(e.fields,t.fields)}compareManyFields(e,t){return e===t||Array.isArray(e)&&Array.isArray(t)&&e.length===t.length&&e.every((e,n)=>this.compareFields(e,t[n]))}compareFields(e,t){return e===t||t instanceof e.constructor&&e.name===t.name&&e.nullable===t.nullable&&this.visit(e.type,t.type)}};function xq(e,t){return t instanceof e.constructor}function Sq(e,t){return e===t||xq(e,t)}function Cq(e,t){return e===t||xq(e,t)&&e.bitWidth===t.bitWidth&&e.isSigned===t.isSigned}function wq(e,t){return e===t||xq(e,t)&&e.precision===t.precision}function Tq(e,t){return e===t||xq(e,t)&&e.byteWidth===t.byteWidth}function Eq(e,t){return e===t||xq(e,t)&&e.unit===t.unit}function Dq(e,t){return e===t||xq(e,t)&&e.unit===t.unit&&e.timezone===t.timezone}function Oq(e,t){return e===t||xq(e,t)&&e.unit===t.unit&&e.bitWidth===t.bitWidth}function kq(e,t){return e===t||xq(e,t)&&e.children.length===t.children.length&&Lq.compareManyFields(e.children,t.children)}function Aq(e,t){return e===t||xq(e,t)&&e.children.length===t.children.length&&Lq.compareManyFields(e.children,t.children)}function jq(e,t){return e===t||xq(e,t)&&e.mode===t.mode&&e.typeIds.every((e,n)=>e===t.typeIds[n])&&Lq.compareManyFields(e.children,t.children)}function Mq(e,t){return e===t||xq(e,t)&&e.id===t.id&&e.isOrdered===t.isOrdered&&Lq.visit(e.indices,t.indices)&&Lq.visit(e.dictionary,t.dictionary)}function Nq(e,t){return e===t||xq(e,t)&&e.unit===t.unit}function Pq(e,t){return e===t||xq(e,t)&&e.unit===t.unit}function Fq(e,t){return e===t||xq(e,t)&&e.listSize===t.listSize&&e.children.length===t.children.length&&Lq.compareManyFields(e.children,t.children)}function Iq(e,t){return e===t||xq(e,t)&&e.keysSorted===t.keysSorted&&e.children.length===t.children.length&&Lq.compareManyFields(e.children,t.children)}bq.prototype.visitNull=Sq,bq.prototype.visitBool=Sq,bq.prototype.visitInt=Cq,bq.prototype.visitInt8=Cq,bq.prototype.visitInt16=Cq,bq.prototype.visitInt32=Cq,bq.prototype.visitInt64=Cq,bq.prototype.visitUint8=Cq,bq.prototype.visitUint16=Cq,bq.prototype.visitUint32=Cq,bq.prototype.visitUint64=Cq,bq.prototype.visitFloat=wq,bq.prototype.visitFloat16=wq,bq.prototype.visitFloat32=wq,bq.prototype.visitFloat64=wq,bq.prototype.visitUtf8=Sq,bq.prototype.visitLargeUtf8=Sq,bq.prototype.visitBinary=Sq,bq.prototype.visitLargeBinary=Sq,bq.prototype.visitFixedSizeBinary=Tq,bq.prototype.visitDate=Eq,bq.prototype.visitDateDay=Eq,bq.prototype.visitDateMillisecond=Eq,bq.prototype.visitTimestamp=Dq,bq.prototype.visitTimestampSecond=Dq,bq.prototype.visitTimestampMillisecond=Dq,bq.prototype.visitTimestampMicrosecond=Dq,bq.prototype.visitTimestampNanosecond=Dq,bq.prototype.visitTime=Oq,bq.prototype.visitTimeSecond=Oq,bq.prototype.visitTimeMillisecond=Oq,bq.prototype.visitTimeMicrosecond=Oq,bq.prototype.visitTimeNanosecond=Oq,bq.prototype.visitDecimal=Sq,bq.prototype.visitList=kq,bq.prototype.visitStruct=Aq,bq.prototype.visitUnion=jq,bq.prototype.visitDenseUnion=jq,bq.prototype.visitSparseUnion=jq,bq.prototype.visitDictionary=Mq,bq.prototype.visitInterval=Nq,bq.prototype.visitIntervalDayTime=Nq,bq.prototype.visitIntervalYearMonth=Nq,bq.prototype.visitIntervalMonthDayNano=Nq,bq.prototype.visitDuration=Pq,bq.prototype.visitDurationSecond=Pq,bq.prototype.visitDurationMillisecond=Pq,bq.prototype.visitDurationMicrosecond=Pq,bq.prototype.visitDurationNanosecond=Pq,bq.prototype.visitFixedSizeList=Fq,bq.prototype.visitMap=Iq;const Lq=new bq;function Rq(e,t){return Lq.compareSchemas(e,t)}function zq(e,t){return Lq.compareFields(e,t)}function Bq(e,t){return Lq.visit(e,t)}const Vq=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},LH),oq),xK),rW),BV),sK),MH),hq),{compareSchemas:Rq,compareFields:zq,compareTypes:Bq}),Hq=365.2425,Uq=10**8*24*60*60*1e3,Wq=6048e5,Gq=864e5,Kq=3600,qq=Kq*24,Jq=qq*7,Yq=qq*Hq,Xq=Yq/12,Zq=Xq*3,Qq=Symbol.for(`constructDateFrom`);function $q(e,t){return typeof e==`function`?e(t):e&&typeof e==`object`&&Qq in e?e[Qq](t):e instanceof Date?new e.constructor(t):new Date(t)}function eJ(e,t){return $q(t||e,e)}let tJ={};function nJ(){return tJ}function rJ(e,t){var n,r;let i=nJ(),a=t?.weekStartsOn??(t==null||(n=t.locale)==null||(n=n.options)==null?void 0:n.weekStartsOn)??i.weekStartsOn??((r=i.locale)==null||(r=r.options)==null?void 0:r.weekStartsOn)??0,o=eJ(e,t?.in),s=o.getDay(),c=(s=a.getTime()?r+1:n.getTime()>=s.getTime()?r:r-1}function oJ(e){let t=eJ(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),e-+n}function sJ(e,...t){let n=$q.bind(null,e||t.find(e=>typeof e==`object`));return t.map(n)}function cJ(e,t){let n=eJ(e,t?.in);return n.setHours(0,0,0,0),n}function lJ(e,t,n){let[r,i]=sJ(n?.in,e,t),a=cJ(r),o=cJ(i),s=+a-oJ(a),c=+o-oJ(o);return Math.round((s-c)/Gq)}function uJ(e,t){let n=aJ(e,t),r=$q(t?.in||e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),iJ(r)}function dJ(e){return e instanceof Date||typeof e==`object`&&Object.prototype.toString.call(e)===`[object Date]`}function fJ(e){return!(!dJ(e)&&typeof e!=`number`||isNaN(+eJ(e)))}function pJ(e,t){let n=eJ(e,t?.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}const mJ={lessThanXSeconds:{one:`less than a second`,other:`less than {{count}} seconds`},xSeconds:{one:`1 second`,other:`{{count}} seconds`},halfAMinute:`half a minute`,lessThanXMinutes:{one:`less than a minute`,other:`less than {{count}} minutes`},xMinutes:{one:`1 minute`,other:`{{count}} minutes`},aboutXHours:{one:`about 1 hour`,other:`about {{count}} hours`},xHours:{one:`1 hour`,other:`{{count}} hours`},xDays:{one:`1 day`,other:`{{count}} days`},aboutXWeeks:{one:`about 1 week`,other:`about {{count}} weeks`},xWeeks:{one:`1 week`,other:`{{count}} weeks`},aboutXMonths:{one:`about 1 month`,other:`about {{count}} months`},xMonths:{one:`1 month`,other:`{{count}} months`},aboutXYears:{one:`about 1 year`,other:`about {{count}} years`},xYears:{one:`1 year`,other:`{{count}} years`},overXYears:{one:`over 1 year`,other:`over {{count}} years`},almostXYears:{one:`almost 1 year`,other:`almost {{count}} years`}},hJ=(e,t,n)=>{let r,i=mJ[e];return r=typeof i==`string`?i:t===1?i.one:i.other.replace(`{{count}}`,t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?`in `+r:r+` ago`:r};function gJ(e){return(t={})=>{let n=t.width?String(t.width):e.defaultWidth,r=e.formats[n]||e.formats[e.defaultWidth];return r}}const _J={full:`EEEE, MMMM do, y`,long:`MMMM do, y`,medium:`MMM d, y`,short:`MM/dd/yyyy`},vJ={full:`h:mm:ss a zzzz`,long:`h:mm:ss a z`,medium:`h:mm:ss a`,short:`h:mm a`},yJ={full:`{{date}} 'at' {{time}}`,long:`{{date}} 'at' {{time}}`,medium:`{{date}}, {{time}}`,short:`{{date}}, {{time}}`},bJ={date:gJ({formats:_J,defaultWidth:`full`}),time:gJ({formats:vJ,defaultWidth:`full`}),dateTime:gJ({formats:yJ,defaultWidth:`full`})},xJ={lastWeek:`'last' eeee 'at' p`,yesterday:`'yesterday at' p`,today:`'today at' p`,tomorrow:`'tomorrow at' p`,nextWeek:`eeee 'at' p`,other:`P`},SJ=(e,t,n,r)=>xJ[e];function CJ(e){return(t,n)=>{let r=n?.context?String(n.context):`standalone`,i;if(r===`formatting`&&e.formattingValues){let t=e.defaultFormattingWidth||e.defaultWidth,r=n?.width?String(n.width):t;i=e.formattingValues[r]||e.formattingValues[t]}else{let t=e.defaultWidth,r=n?.width?String(n.width):e.defaultWidth;i=e.values[r]||e.values[t]}let a=e.argumentCallback?e.argumentCallback(t):t;return i[a]}}const wJ={narrow:[`B`,`A`],abbreviated:[`BC`,`AD`],wide:[`Before Christ`,`Anno Domini`]},TJ={narrow:[`1`,`2`,`3`,`4`],abbreviated:[`Q1`,`Q2`,`Q3`,`Q4`],wide:[`1st quarter`,`2nd quarter`,`3rd quarter`,`4th quarter`]},EJ={narrow:[`J`,`F`,`M`,`A`,`M`,`J`,`J`,`A`,`S`,`O`,`N`,`D`],abbreviated:[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`],wide:[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`]},DJ={narrow:[`S`,`M`,`T`,`W`,`T`,`F`,`S`],short:[`Su`,`Mo`,`Tu`,`We`,`Th`,`Fr`,`Sa`],abbreviated:[`Sun`,`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`],wide:[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`]},OJ={narrow:{am:`a`,pm:`p`,midnight:`mi`,noon:`n`,morning:`morning`,afternoon:`afternoon`,evening:`evening`,night:`night`},abbreviated:{am:`AM`,pm:`PM`,midnight:`midnight`,noon:`noon`,morning:`morning`,afternoon:`afternoon`,evening:`evening`,night:`night`},wide:{am:`a.m.`,pm:`p.m.`,midnight:`midnight`,noon:`noon`,morning:`morning`,afternoon:`afternoon`,evening:`evening`,night:`night`}},kJ={narrow:{am:`a`,pm:`p`,midnight:`mi`,noon:`n`,morning:`in the morning`,afternoon:`in the afternoon`,evening:`in the evening`,night:`at night`},abbreviated:{am:`AM`,pm:`PM`,midnight:`midnight`,noon:`noon`,morning:`in the morning`,afternoon:`in the afternoon`,evening:`in the evening`,night:`at night`},wide:{am:`a.m.`,pm:`p.m.`,midnight:`midnight`,noon:`noon`,morning:`in the morning`,afternoon:`in the afternoon`,evening:`in the evening`,night:`at night`}},AJ=(e,t)=>{let n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+`st`;case 2:return n+`nd`;case 3:return n+`rd`}return n+`th`},jJ={ordinalNumber:AJ,era:CJ({values:wJ,defaultWidth:`wide`}),quarter:CJ({values:TJ,defaultWidth:`wide`,argumentCallback:e=>e-1}),month:CJ({values:EJ,defaultWidth:`wide`}),day:CJ({values:DJ,defaultWidth:`wide`}),dayPeriod:CJ({values:OJ,defaultWidth:`wide`,formattingValues:kJ,defaultFormattingWidth:`wide`})};function MJ(e){return(t,n={})=>{let r=n.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],a=t.match(i);if(!a)return null;let o=a[0],s=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(s)?PJ(s,e=>e.test(o)):NJ(s,e=>e.test(o)),l;l=e.valueCallback?e.valueCallback(c):c,l=n.valueCallback?n.valueCallback(l):l;let u=t.slice(o.length);return{value:l,rest:u}}}function NJ(e,t){for(let n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function PJ(e,t){for(let n=0;n{let r=t.match(e.matchPattern);if(!r)return null;let i=r[0],a=t.match(e.parsePattern);if(!a)return null;let o=e.valueCallback?e.valueCallback(a[0]):a[0];o=n.valueCallback?n.valueCallback(o):o;let s=t.slice(i.length);return{value:o,rest:s}}}const IJ=/^(\d+)(th|st|nd|rd)?/i,LJ=/\d+/i,RJ={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},zJ={any:[/^b/i,/^(a|c)/i]},BJ={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},VJ={any:[/1/i,/2/i,/3/i,/4/i]},HJ={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},UJ={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},WJ={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},GJ={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},KJ={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},qJ={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},JJ={ordinalNumber:FJ({matchPattern:IJ,parsePattern:LJ,valueCallback:e=>parseInt(e,10)}),era:MJ({matchPatterns:RJ,defaultMatchWidth:`wide`,parsePatterns:zJ,defaultParseWidth:`any`}),quarter:MJ({matchPatterns:BJ,defaultMatchWidth:`wide`,parsePatterns:VJ,defaultParseWidth:`any`,valueCallback:e=>e+1}),month:MJ({matchPatterns:HJ,defaultMatchWidth:`wide`,parsePatterns:UJ,defaultParseWidth:`any`}),day:MJ({matchPatterns:WJ,defaultMatchWidth:`wide`,parsePatterns:GJ,defaultParseWidth:`any`}),dayPeriod:MJ({matchPatterns:KJ,defaultMatchWidth:`any`,parsePatterns:qJ,defaultParseWidth:`any`})},YJ={code:`en-US`,formatDistance:hJ,formatLong:bJ,formatRelative:SJ,localize:jJ,match:JJ,options:{weekStartsOn:0,firstWeekContainsDate:1}};function XJ(e,t){let n=eJ(e,t?.in),r=lJ(n,pJ(n)),i=r+1;return i}function ZJ(e,t){let n=eJ(e,t?.in),r=iJ(n)-+uJ(n);return Math.round(r/Wq)+1}function QJ(e,t){var n,r;let i=eJ(e,t?.in),a=i.getFullYear(),o=nJ(),s=t?.firstWeekContainsDate??(t==null||(n=t.locale)==null||(n=n.options)==null?void 0:n.firstWeekContainsDate)??o.firstWeekContainsDate??((r=o.locale)==null||(r=r.options)==null?void 0:r.firstWeekContainsDate)??1,c=$q(t?.in||e,0);c.setFullYear(a+1,0,s),c.setHours(0,0,0,0);let l=rJ(c,t),u=$q(t?.in||e,0);u.setFullYear(a,0,s),u.setHours(0,0,0,0);let d=rJ(u,t);return+i>=+l?a+1:+i>=+d?a:a-1}function $J(e,t){var n,r;let i=nJ(),a=t?.firstWeekContainsDate??(t==null||(n=t.locale)==null||(n=n.options)==null?void 0:n.firstWeekContainsDate)??i.firstWeekContainsDate??((r=i.locale)==null||(r=r.options)==null?void 0:r.firstWeekContainsDate)??1,o=QJ(e,t),s=$q(t?.in||e,0);s.setFullYear(o,0,a),s.setHours(0,0,0,0);let c=rJ(s,t);return c}function eY(e,t){let n=eJ(e,t?.in),r=rJ(n,t)-+$J(n,t);return Math.round(r/Wq)+1}function tY(e,t){let n=e<0?`-`:``,r=Math.abs(e).toString().padStart(t,`0`);return n+r}const nY={y(e,t){let n=e.getFullYear(),r=n>0?n:1-n;return tY(t===`yy`?r%100:r,t.length)},M(e,t){let n=e.getMonth();return t===`M`?String(n+1):tY(n+1,2)},d(e,t){return tY(e.getDate(),t.length)},a(e,t){let n=e.getHours()/12>=1?`pm`:`am`;switch(t){case`a`:case`aa`:return n.toUpperCase();case`aaa`:return n;case`aaaaa`:return n[0];case`aaaa`:default:return n===`am`?`a.m.`:`p.m.`}},h(e,t){return tY(e.getHours()%12||12,t.length)},H(e,t){return tY(e.getHours(),t.length)},m(e,t){return tY(e.getMinutes(),t.length)},s(e,t){return tY(e.getSeconds(),t.length)},S(e,t){let n=t.length,r=e.getMilliseconds(),i=Math.trunc(r*10**(n-3));return tY(i,t.length)}},rY={am:`am`,pm:`pm`,midnight:`midnight`,noon:`noon`,morning:`morning`,afternoon:`afternoon`,evening:`evening`,night:`night`},iY={G:function(e,t,n){let r=e.getFullYear()>0?1:0;switch(t){case`G`:case`GG`:case`GGG`:return n.era(r,{width:`abbreviated`});case`GGGGG`:return n.era(r,{width:`narrow`});case`GGGG`:default:return n.era(r,{width:`wide`})}},y:function(e,t,n){if(t===`yo`){let t=e.getFullYear(),r=t>0?t:1-t;return n.ordinalNumber(r,{unit:`year`})}return nY.y(e,t)},Y:function(e,t,n,r){let i=QJ(e,r),a=i>0?i:1-i;if(t===`YY`){let e=a%100;return tY(e,2)}return t===`Yo`?n.ordinalNumber(a,{unit:`year`}):tY(a,t.length)},R:function(e,t){let n=aJ(e);return tY(n,t.length)},u:function(e,t){let n=e.getFullYear();return tY(n,t.length)},Q:function(e,t,n){let r=Math.ceil((e.getMonth()+1)/3);switch(t){case`Q`:return String(r);case`QQ`:return tY(r,2);case`Qo`:return n.ordinalNumber(r,{unit:`quarter`});case`QQQ`:return n.quarter(r,{width:`abbreviated`,context:`formatting`});case`QQQQQ`:return n.quarter(r,{width:`narrow`,context:`formatting`});case`QQQQ`:default:return n.quarter(r,{width:`wide`,context:`formatting`})}},q:function(e,t,n){let r=Math.ceil((e.getMonth()+1)/3);switch(t){case`q`:return String(r);case`qq`:return tY(r,2);case`qo`:return n.ordinalNumber(r,{unit:`quarter`});case`qqq`:return n.quarter(r,{width:`abbreviated`,context:`standalone`});case`qqqqq`:return n.quarter(r,{width:`narrow`,context:`standalone`});case`qqqq`:default:return n.quarter(r,{width:`wide`,context:`standalone`})}},M:function(e,t,n){let r=e.getMonth();switch(t){case`M`:case`MM`:return nY.M(e,t);case`Mo`:return n.ordinalNumber(r+1,{unit:`month`});case`MMM`:return n.month(r,{width:`abbreviated`,context:`formatting`});case`MMMMM`:return n.month(r,{width:`narrow`,context:`formatting`});case`MMMM`:default:return n.month(r,{width:`wide`,context:`formatting`})}},L:function(e,t,n){let r=e.getMonth();switch(t){case`L`:return String(r+1);case`LL`:return tY(r+1,2);case`Lo`:return n.ordinalNumber(r+1,{unit:`month`});case`LLL`:return n.month(r,{width:`abbreviated`,context:`standalone`});case`LLLLL`:return n.month(r,{width:`narrow`,context:`standalone`});case`LLLL`:default:return n.month(r,{width:`wide`,context:`standalone`})}},w:function(e,t,n,r){let i=eY(e,r);return t===`wo`?n.ordinalNumber(i,{unit:`week`}):tY(i,t.length)},I:function(e,t,n){let r=ZJ(e);return t===`Io`?n.ordinalNumber(r,{unit:`week`}):tY(r,t.length)},d:function(e,t,n){return t===`do`?n.ordinalNumber(e.getDate(),{unit:`date`}):nY.d(e,t)},D:function(e,t,n){let r=XJ(e);return t===`Do`?n.ordinalNumber(r,{unit:`dayOfYear`}):tY(r,t.length)},E:function(e,t,n){let r=e.getDay();switch(t){case`E`:case`EE`:case`EEE`:return n.day(r,{width:`abbreviated`,context:`formatting`});case`EEEEE`:return n.day(r,{width:`narrow`,context:`formatting`});case`EEEEEE`:return n.day(r,{width:`short`,context:`formatting`});case`EEEE`:default:return n.day(r,{width:`wide`,context:`formatting`})}},e:function(e,t,n,r){let i=e.getDay(),a=(i-r.weekStartsOn+8)%7||7;switch(t){case`e`:return String(a);case`ee`:return tY(a,2);case`eo`:return n.ordinalNumber(a,{unit:`day`});case`eee`:return n.day(i,{width:`abbreviated`,context:`formatting`});case`eeeee`:return n.day(i,{width:`narrow`,context:`formatting`});case`eeeeee`:return n.day(i,{width:`short`,context:`formatting`});case`eeee`:default:return n.day(i,{width:`wide`,context:`formatting`})}},c:function(e,t,n,r){let i=e.getDay(),a=(i-r.weekStartsOn+8)%7||7;switch(t){case`c`:return String(a);case`cc`:return tY(a,t.length);case`co`:return n.ordinalNumber(a,{unit:`day`});case`ccc`:return n.day(i,{width:`abbreviated`,context:`standalone`});case`ccccc`:return n.day(i,{width:`narrow`,context:`standalone`});case`cccccc`:return n.day(i,{width:`short`,context:`standalone`});case`cccc`:default:return n.day(i,{width:`wide`,context:`standalone`})}},i:function(e,t,n){let r=e.getDay(),i=r===0?7:r;switch(t){case`i`:return String(i);case`ii`:return tY(i,t.length);case`io`:return n.ordinalNumber(i,{unit:`day`});case`iii`:return n.day(r,{width:`abbreviated`,context:`formatting`});case`iiiii`:return n.day(r,{width:`narrow`,context:`formatting`});case`iiiiii`:return n.day(r,{width:`short`,context:`formatting`});case`iiii`:default:return n.day(r,{width:`wide`,context:`formatting`})}},a:function(e,t,n){let r=e.getHours(),i=r/12>=1?`pm`:`am`;switch(t){case`a`:case`aa`:return n.dayPeriod(i,{width:`abbreviated`,context:`formatting`});case`aaa`:return n.dayPeriod(i,{width:`abbreviated`,context:`formatting`}).toLowerCase();case`aaaaa`:return n.dayPeriod(i,{width:`narrow`,context:`formatting`});case`aaaa`:default:return n.dayPeriod(i,{width:`wide`,context:`formatting`})}},b:function(e,t,n){let r=e.getHours(),i;switch(i=r===12?rY.noon:r===0?rY.midnight:r/12>=1?`pm`:`am`,t){case`b`:case`bb`:return n.dayPeriod(i,{width:`abbreviated`,context:`formatting`});case`bbb`:return n.dayPeriod(i,{width:`abbreviated`,context:`formatting`}).toLowerCase();case`bbbbb`:return n.dayPeriod(i,{width:`narrow`,context:`formatting`});case`bbbb`:default:return n.dayPeriod(i,{width:`wide`,context:`formatting`})}},B:function(e,t,n){let r=e.getHours(),i;switch(i=r>=17?rY.evening:r>=12?rY.afternoon:r>=4?rY.morning:rY.night,t){case`B`:case`BB`:case`BBB`:return n.dayPeriod(i,{width:`abbreviated`,context:`formatting`});case`BBBBB`:return n.dayPeriod(i,{width:`narrow`,context:`formatting`});case`BBBB`:default:return n.dayPeriod(i,{width:`wide`,context:`formatting`})}},h:function(e,t,n){if(t===`ho`){let t=e.getHours()%12;return t===0&&(t=12),n.ordinalNumber(t,{unit:`hour`})}return nY.h(e,t)},H:function(e,t,n){return t===`Ho`?n.ordinalNumber(e.getHours(),{unit:`hour`}):nY.H(e,t)},K:function(e,t,n){let r=e.getHours()%12;return t===`Ko`?n.ordinalNumber(r,{unit:`hour`}):tY(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t===`ko`?n.ordinalNumber(r,{unit:`hour`}):tY(r,t.length)},m:function(e,t,n){return t===`mo`?n.ordinalNumber(e.getMinutes(),{unit:`minute`}):nY.m(e,t)},s:function(e,t,n){return t===`so`?n.ordinalNumber(e.getSeconds(),{unit:`second`}):nY.s(e,t)},S:function(e,t){return nY.S(e,t)},X:function(e,t,n){let r=e.getTimezoneOffset();if(r===0)return`Z`;switch(t){case`X`:return oY(r);case`XXXX`:case`XX`:return sY(r);case`XXXXX`:case`XXX`:default:return sY(r,`:`)}},x:function(e,t,n){let r=e.getTimezoneOffset();switch(t){case`x`:return oY(r);case`xxxx`:case`xx`:return sY(r);case`xxxxx`:case`xxx`:default:return sY(r,`:`)}},O:function(e,t,n){let r=e.getTimezoneOffset();switch(t){case`O`:case`OO`:case`OOO`:return`GMT`+aY(r,`:`);case`OOOO`:default:return`GMT`+sY(r,`:`)}},z:function(e,t,n){let r=e.getTimezoneOffset();switch(t){case`z`:case`zz`:case`zzz`:return`GMT`+aY(r,`:`);case`zzzz`:default:return`GMT`+sY(r,`:`)}},t:function(e,t,n){let r=Math.trunc(e/1e3);return tY(r,t.length)},T:function(e,t,n){return tY(+e,t.length)}};function aY(e,t=``){let n=e>0?`-`:`+`,r=Math.abs(e),i=Math.trunc(r/60),a=r%60;return a===0?n+String(i):n+String(i)+t+tY(a,2)}function oY(e,t){if(e%60==0){let t=e>0?`-`:`+`;return t+tY(Math.abs(e)/60,2)}return sY(e,t)}function sY(e,t=``){let n=e>0?`-`:`+`,r=Math.abs(e),i=tY(Math.trunc(r/60),2),a=tY(r%60,2);return n+i+t+a}const cY=(e,t)=>{switch(e){case`P`:return t.date({width:`short`});case`PP`:return t.date({width:`medium`});case`PPP`:return t.date({width:`long`});case`PPPP`:default:return t.date({width:`full`})}},lY=(e,t)=>{switch(e){case`p`:return t.time({width:`short`});case`pp`:return t.time({width:`medium`});case`ppp`:return t.time({width:`long`});case`pppp`:default:return t.time({width:`full`})}},uY=(e,t)=>{let n=e.match(/(P+)(p+)?/)||[],r=n[1],i=n[2];if(!i)return cY(e,t);let a;switch(r){case`P`:a=t.dateTime({width:`short`});break;case`PP`:a=t.dateTime({width:`medium`});break;case`PPP`:a=t.dateTime({width:`long`});break;case`PPPP`:default:a=t.dateTime({width:`full`});break}return a.replace(`{{date}}`,cY(r,t)).replace(`{{time}}`,lY(i,t))},dY={p:lY,P:uY},fY=/^D+$/,pY=/^Y+$/,mY=[`D`,`DD`,`YY`,`YYYY`];function hY(e){return fY.test(e)}function gY(e){return pY.test(e)}function _Y(e,t,n){let r=vY(e,t,n);if(console.warn(r),mY.includes(e))throw RangeError(r)}function vY(e,t,n){let r=e[0]===`Y`?`years`:`days of the month`;return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const yY=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,bY=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,xY=/^'([^]*?)'?$/,SY=/''/g,CY=/[a-zA-Z]/;function wY(e,t,n){var r,i,a,o;let s=nJ(),c=n?.locale??s.locale??YJ,l=n?.firstWeekContainsDate??(n==null||(r=n.locale)==null||(r=r.options)==null?void 0:r.firstWeekContainsDate)??s.firstWeekContainsDate??((i=s.locale)==null||(i=i.options)==null?void 0:i.firstWeekContainsDate)??1,u=n?.weekStartsOn??(n==null||(a=n.locale)==null||(a=a.options)==null?void 0:a.weekStartsOn)??s.weekStartsOn??((o=s.locale)==null||(o=o.options)==null?void 0:o.weekStartsOn)??0,d=eJ(e,n?.in);if(!fJ(d))throw RangeError(`Invalid time value`);let f=t.match(bY).map(e=>{let t=e[0];if(t===`p`||t===`P`){let n=dY[t];return n(e,c.formatLong)}return e}).join(``).match(yY).map(e=>{if(e===`''`)return{isToken:!1,value:`'`};let t=e[0];if(t===`'`)return{isToken:!1,value:TY(e)};if(iY[t])return{isToken:!0,value:e};if(t.match(CY))throw RangeError("Format string contains an unescaped latin alphabet character `"+t+"`");return{isToken:!1,value:e}});c.localize.preprocessor&&(f=c.localize.preprocessor(d,f));let p={firstWeekContainsDate:l,weekStartsOn:u,locale:c};return f.map(r=>{if(!r.isToken)return r.value;let i=r.value;(!n?.useAdditionalWeekYearTokens&&gY(i)||!n?.useAdditionalDayOfYearTokens&&hY(i))&&_Y(i,t,String(e));let a=iY[i[0]];return a(d,i,c.localize,p)}).join(``)}function TY(e){let t=e.match(xY);return t?t[1].replace(SY,`'`):e}function EY(e,t){return eJ(e*1e3,t?.in)}function DY(e,t){let n=OY(t)?new t(0):$q(t,0);return n.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),n.setHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),n}function OY(e){var t;return typeof e==`function`&&(t=e.prototype)?.constructor===e}function kY(e,t){if(t===void 0)return e.trimEnd();let n=e.length;switch(typeof t){case`string`:if(t.length!==1)throw Error(`The 'chars' parameter should be a single character string.`);for(;n>0&&e[n-1]===t;)n--;break;case`object`:for(;n>0&&t.includes(e[n-1]);)n--}return e.substring(0,n)}function AY(e){return e==null}function jY(e){return e!=null}async function MY(){if(typeof window<`u`&&window!==null)return`browser`;try{let e=await Et(()=>import(`./__vite-browser-external-Ct7_N7cf.js`).then(wt(1)),__vite__mapDeps([0,1,2,3]));return e!==void 0&&e.versions!=null&&e.versions.node!=null?`node`:`unknown`}catch{return`unknown`}}function NY(e){return AY(e)?!1:vU.isInt(e.type)&&!zY(e)||PY(e)}function PY(e){return AY(e)?!1:vU.isInt(e.type)&&e.type.isSigned===!1}function FY(e){return AY(e)?!1:vU.isFloat(e.type)??!1}function IY(e){return AY(e)?!1:vU.isDecimal(e.type)}function LY(e){return AY(e)?!1:vU.isBool(e.type)}function RY(e){return AY(e)?!1:vU.isDuration(e.type)}function zY(e){return AY(e)?!1:vU.isInt(e.type)&&e.metadata.get(`ARROW:extension:name`)===`period`}function BY(e){return AY(e)?!1:vU.isTimestamp(e.type)}function VY(e){return AY(e)?!1:vU.isDate(e.type)}function HY(e){return AY(e)?!1:vU.isTime(e.type)}function UY(e){return AY(e)?!1:vU.isList(e.type)||vU.isFixedSizeList(e.type)}function WY(e){return AY(e)?!1:vU.isStruct(e.type)||vU.isMap(e.type)}function GY(e){return AY(e)?!1:vU.isStruct(e.type)&&e.metadata.get(`ARROW:extension:name`)===`interval`||vU.isInterval(e.type)}const KY=new Date(1970,0,1);function qY(e,t){let n;if(t===kH.MILLISECOND)n=1e3;else if(t===kH.MICROSECOND)n=1e3*1e3;else if(t===kH.NANOSECOND)n=1e3*1e3*1e3;else return Number(e);return typeof e==`bigint`&&!Number.isSafeInteger(Number(e))?Number(e/BigInt(n)):Number(e)/n}function JY(e,t){var n;let r=qY(e,(t==null||(n=t.type)==null?void 0:n.unit)??kH.SECOND);return EY(r)}function YY(e,t){let n=JY(e,t);return wY(n,n.getMilliseconds()===0?`HH:mm:ss`:`HH:mm:ss.SSS`)}function XY(e){let t=`yyyy-MM-dd`;return e instanceof Date||typeof e==`number`&&Number.isFinite(e)?wY(e,t):(console.warn(`Unsupported date value: ${e}`),String(e))}function ZY(e,t){var n;if(!(e instanceof Date||typeof e==`number`&&Number.isFinite(e)))return console.warn(`Unsupported datetime value: ${e}`),null;let r,i=t==null||(n=t.type)==null?void 0:n.timezone;return r=i?new SV(e,i):new SV(e),DY(r,Date)}function QY(e,t){var n;let r=(t==null||(n=t.type)==null?void 0:n.scale)||0,i=Vq.bigNumToString(new Vq.BN(e)).padStart(r,`0`);if(r===0)return i;let a=``;i.startsWith(`-`)&&(a=`-`,i=i.slice(1));let o=i.slice(0,-r)||`0`,s=kY(i.slice(-r),`0`)||``;return`${a}${o}${s?`.${s}`:``}`}const $Y=new Intl.NumberFormat(`en-US`,{style:`decimal`,maximumFractionDigits:4,minimumFractionDigits:4,useGrouping:!0});function eX(e){let t=e[0],n=e[1],r=[];return t!==0&&r.push(`${t} year${t>1?`s`:``}`),n!==0&&r.push(`${n} month${n>1?`s`:``}`),r.length?r.join(` `):`0 months`}function tX(e,t){if(vU.isInterval(t?.type))return eX(e);let n=t&&t.metadata.get(`ARROW:extension:name`);if(n&&n===`pandas.interval`){var r,i;let n=JSON.parse(t.metadata.get(`ARROW:extension:metadata`)),{closed:a}=n,o=e.toJSON(),s=a===`both`||a===`left`?`[`:`(`,c=a===`both`||a===`right`?`]`:`)`,l=rX(o.left,(r=t.type)==null||(r=r.children)==null?void 0:r[0]),u=rX(o.right,(i=t.type)==null||(i=i.children)==null?void 0:i[1]);return`${s+l}, ${u+c}`}return String(e)}function nX(e,t){return t?.type instanceof GU?JSON.parse(JSON.stringify(e,(e,t)=>{if(jY(t))return typeof t==`bigint`?Number(t):t})):JSON.parse(JSON.stringify(e,(e,t)=>typeof t==`bigint`?Number(t):t))}function rX(e,t){if(AY(e))return null;let n=e instanceof Date||Number.isFinite(e);if(n&&VY(t))return XY(e);if(typeof e==`bigint`&&HY(t))return YY(Number(e),t);if(n&&BY(t))return ZY(e,t);if(zY(t))throw Error(`Period type is not supported yet`);if(GY(t))return tX(e,t);if(RY(t))throw Error(`Duration type is not supported yet`);return IY(t)?QY(e,t):FY(t)&&Number.isFinite(e)||NY(t)?e:WY(t)||UY(t)?nX(e,t):LY(t)?!!e:String(e)}function iX(e){let t=(e.toArray()||[]).map(e=>e.toJSON())||[],n=t.map(t=>(e.schema.fields.forEach(e=>t[e.name]=rX(t[e.name],e)),t));return n}let aX=function(e){return e.ORIGIN_PRIVATE_FS=`origin-private-fs`,e.NODE_FS=`node-fs`,e}({});async function oX(e){let t=Nt(e,{logger:!1}),n,r,i=await MY();if(i===`browser`){if(t.bundles===void 0){let{getBundles:e}=await Et(async()=>{let{getBundles:e}=await import(`./default-browser-DTRWbcB3.js`);return{getBundles:e}},[]);t.bundles=await e()}r=await mV(await t.bundles),n=new Worker(r.mainWorker)}else if(i===`node`){if(t.bundles===void 0){let{getBundles:e}=await Et(async()=>{let{getBundles:e}=await import(`./default-node-C5y-aJTF.js`);return{getBundles:e}},__vite__mapDeps([4,2,3]));t.bundles=await e()}r=await mV(await t.bundles);let e=r.mainWorker;e.startsWith(`/@fs/`)&&(e=e.replace(`/@fs/`,`file://`));let i=await Et(()=>import(`./browser-CMSJHaBF.js`),[]);n=new i.default(e,{type:`module`})}else throw Error(`Unsupported environment: ${i}`);let a;a=t.logger===!0?new MB:t.logger===!1?new jB:t.logger;let o=new UB(a,n);if(await o.instantiate(r.mainModule,r.pthreadWorker),t.storage)switch(t.storage.type){case aX.ORIGIN_PRIVATE_FS:try{let e=t.storage.path;e.startsWith(`/`)&&(e=e.slice(1)),await o.open({path:`opfs://${e}`,accessMode:t.storage.accessMode})}catch(e){throw await o.terminate(),await n.terminate(),e}break;case aX.NODE_FS:try{await o.open({path:t.storage.path,accessMode:t.storage.accessMode,useDirectIO:!0})}catch(e){throw await o.terminate(),await n.terminate(),e}break}let s=await o.connect();async function c(e,t=[]){if(!t||t.length===0){let t=await s.query(e);return{_results:t,_schema:t.schema,columns:t.schema.fields,rows:iX(t)}}let n=await s.prepare(e),r=await n.query(...t);return n.close(),{_results:r,_schema:r.schema,columns:r.schema.fields,rows:iX(r)}}return{worker:n,db:o,conn:s,query:async(e,t=[])=>c(e,t).then(e=>e.rows),queryWithColumns:async(e,t=[])=>c(e,t),close:async()=>{await s.close(),await o.terminate(),await n.terminate()}}}async function sX(e,t){await(await e).conn.send(`BEGIN TRANSACTION`);try{let n=await t(e);return await(await e).conn.send(`COMMIT`),n}catch(t){throw await(await e).conn.send(`ROLLBACK`),t}}async function cX(e,t,n){await(await e).conn.send(`SAVEPOINT ${t}`);try{let r=await n(e);return await(await e).conn.send(`RELEASE SAVEPOINT ${t}`),r}catch(n){throw await(await e).conn.send(`ROLLBACK TO SAVEPOINT ${t}`),n}}const Z=Symbol.for(`drizzle:entityKind`),lX=Symbol.for(`drizzle:hasOwnEntityKind`);function Q(e,t){if(!e||typeof e!=`object`)return!1;if(e instanceof t)return!0;if(!Object.prototype.hasOwnProperty.call(t,Z))throw Error(`Class "${t.name??``}" doesn't look like a Drizzle entity. If this is incorrect and the class is provided by Drizzle, please report this as a bug.`);let n=Object.getPrototypeOf(e).constructor;if(n)for(;n;){if(Z in n&&n[Z]===t[Z])return!0;n=Object.getPrototypeOf(n)}return!1}var uX=(pr=class{constructor(t,n){e.defineProperty(this,`name`,void 0),e.defineProperty(this,`keyAsName`,void 0),e.defineProperty(this,`primary`,void 0),e.defineProperty(this,`notNull`,void 0),e.defineProperty(this,`default`,void 0),e.defineProperty(this,`defaultFn`,void 0),e.defineProperty(this,`onUpdateFn`,void 0),e.defineProperty(this,`hasDefault`,void 0),e.defineProperty(this,`isUnique`,void 0),e.defineProperty(this,`uniqueName`,void 0),e.defineProperty(this,`uniqueType`,void 0),e.defineProperty(this,`dataType`,void 0),e.defineProperty(this,`columnType`,void 0),e.defineProperty(this,`enumValues`,void 0),e.defineProperty(this,`generated`,void 0),e.defineProperty(this,`generatedIdentity`,void 0),e.defineProperty(this,`config`,void 0),this.table=t,this.config=n,this.name=n.name,this.keyAsName=n.keyAsName,this.notNull=n.notNull,this.default=n.default,this.defaultFn=n.defaultFn,this.onUpdateFn=n.onUpdateFn,this.hasDefault=n.hasDefault,this.primary=n.primaryKey,this.isUnique=n.isUnique,this.uniqueName=n.uniqueName,this.uniqueType=n.uniqueType,this.dataType=n.dataType,this.columnType=n.columnType,this.generated=n.generated,this.generatedIdentity=n.generatedIdentity}mapFromDriverValue(e){return e}mapToDriverValue(e){return e}shouldDisableInsert(){return this.config.generated!==void 0&&this.config.generated.type!==`byDefault`}},e.defineProperty(pr,Z,`Column`),pr),dX=(mr=class{constructor(t,n,r){e.defineProperty(this,`config`,void 0),e.defineProperty(this,`$default`,this.$defaultFn),e.defineProperty(this,`$onUpdate`,this.$onUpdateFn),this.config={name:t,keyAsName:t===``,notNull:!1,default:void 0,hasDefault:!1,primaryKey:!1,isUnique:!1,uniqueName:void 0,uniqueType:void 0,dataType:n,columnType:r,generated:void 0}}$type(){return this}notNull(){return this.config.notNull=!0,this}default(e){return this.config.default=e,this.config.hasDefault=!0,this}$defaultFn(e){return this.config.defaultFn=e,this.config.hasDefault=!0,this}$onUpdateFn(e){return this.config.onUpdateFn=e,this.config.hasDefault=!0,this}primaryKey(){return this.config.primaryKey=!0,this.config.notNull=!0,this}setName(e){this.config.name===``&&(this.config.name=e)}},e.defineProperty(mr,Z,`ColumnBuilder`),mr);const fX=Symbol.for(`drizzle:Name`);var pX=(hr=class{constructor(t,n){e.defineProperty(this,`reference`,void 0),e.defineProperty(this,`_onUpdate`,`no action`),e.defineProperty(this,`_onDelete`,`no action`),this.reference=()=>{let{name:e,columns:n,foreignColumns:r}=t();return{name:e,columns:n,foreignTable:r[0].table,foreignColumns:r}},n&&(this._onUpdate=n.onUpdate,this._onDelete=n.onDelete)}onUpdate(e){return this._onUpdate=e===void 0?`no action`:e,this}onDelete(e){return this._onDelete=e===void 0?`no action`:e,this}build(e){return new mX(e,this)}},e.defineProperty(hr,Z,`PgForeignKeyBuilder`),hr),mX=(gr=class{constructor(t,n){e.defineProperty(this,`reference`,void 0),e.defineProperty(this,`onUpdate`,void 0),e.defineProperty(this,`onDelete`,void 0),this.table=t,this.reference=n.reference,this.onUpdate=n._onUpdate,this.onDelete=n._onDelete}getName(){let{name:e,columns:t,foreignColumns:n}=this.reference(),r=t.map(e=>e.name),i=n.map(e=>e.name),a=[this.table[fX],...r,n[0].table[fX],...i];return e??`${a.join(`_`)}_fk`}},e.defineProperty(gr,Z,`PgForeignKey`),gr);function hX(e,...t){return e(...t)}function gX(e,t){return`${e[fX]}_${t.join(`_`)}_unique`}var _X=(_r=class{constructor(t,n){e.defineProperty(this,`columns`,void 0),e.defineProperty(this,`nullsNotDistinctConfig`,!1),this.name=n,this.columns=t}nullsNotDistinct(){return this.nullsNotDistinctConfig=!0,this}build(e){return new yX(e,this.columns,this.nullsNotDistinctConfig,this.name)}},e.defineProperty(_r,Z,`PgUniqueConstraintBuilder`),_r),vX=(vr=class{constructor(t){e.defineProperty(this,`name`,void 0),this.name=t}on(...e){return new _X(e,this.name)}},e.defineProperty(vr,Z,`PgUniqueOnConstraintBuilder`),vr),yX=(yr=class{constructor(t,n,r,i){e.defineProperty(this,`columns`,void 0),e.defineProperty(this,`name`,void 0),e.defineProperty(this,`nullsNotDistinct`,!1),this.table=t,this.columns=n,this.name=i??gX(this.table,this.columns.map(e=>e.name)),this.nullsNotDistinct=r}getName(){return this.name}},e.defineProperty(yr,Z,`PgUniqueConstraint`),yr);function bX(e,t,n){for(let r=t;rArray.isArray(e)?CX(e):typeof e==`string`?`"${e.replace(/\\/g,`\\\\`).replace(/"/g,`\\"`)}"`:`${e}`).join(`,`)}}`}var wX=(br=class extends dX{constructor(...t){super(...t),e.defineProperty(this,`foreignKeyConfigs`,[])}array(e){return new OX(this.config.name,this,e)}references(e,t={}){return this.foreignKeyConfigs.push({ref:e,actions:t}),this}unique(e,t){return this.config.isUnique=!0,this.config.uniqueName=e,this.config.uniqueType=t?.nulls,this}generatedAlwaysAs(e){return this.config.generated={as:e,type:`always`,mode:`stored`},this}buildForeignKeys(e,t){return this.foreignKeyConfigs.map(({ref:n,actions:r})=>hX((n,r)=>{let i=new pX(()=>{let t=n();return{columns:[e],foreignColumns:[t]}});return r.onUpdate&&i.onUpdate(r.onUpdate),r.onDelete&&i.onDelete(r.onDelete),i.build(t)},n,r))}buildExtraConfigColumn(e){return new EX(e,this.config)}},e.defineProperty(br,Z,`PgColumnBuilder`),br),TX=(xr=class extends uX{constructor(e,t){t.uniqueName||=gX(e,[t.name]),super(e,t),this.table=e}},e.defineProperty(xr,Z,`PgColumn`),xr),EX=(Sr=class extends TX{constructor(...t){super(...t),e.defineProperty(this,`indexConfig`,{order:this.config.order??`asc`,nulls:this.config.nulls??`last`,opClass:this.config.opClass}),e.defineProperty(this,`defaultConfig`,{order:`asc`,nulls:`last`,opClass:void 0})}getSQLType(){return this.getSQLType()}asc(){return this.indexConfig.order=`asc`,this}desc(){return this.indexConfig.order=`desc`,this}nullsFirst(){return this.indexConfig.nulls=`first`,this}nullsLast(){return this.indexConfig.nulls=`last`,this}op(e){return this.indexConfig.opClass=e,this}},e.defineProperty(Sr,Z,`ExtraConfigColumn`),Sr),DX=(Cr=class{constructor(t,n,r,i){e.defineProperty(this,`name`,void 0),e.defineProperty(this,`keyAsName`,void 0),e.defineProperty(this,`type`,void 0),e.defineProperty(this,`indexConfig`,void 0),this.name=t,this.keyAsName=n,this.type=r,this.indexConfig=i}},e.defineProperty(Cr,Z,`IndexedColumn`),Cr),OX=(wr=class extends wX{constructor(e,t,n){super(e,`array`,`PgArray`),this.config.baseBuilder=t,this.config.size=n}build(e){let t=this.config.baseBuilder.build(e);return new kX(e,this.config,t)}},e.defineProperty(wr,Z,`PgArrayBuilder`),wr),kX=(Tr=class t extends TX{constructor(t,n,r,i){super(t,n),e.defineProperty(this,`size`,void 0),this.baseColumn=r,this.range=i,this.size=n.size}getSQLType(){return`${this.baseColumn.getSQLType()}[${typeof this.size==`number`?this.size:``}]`}mapFromDriverValue(e){return typeof e==`string`&&(e=SX(e)),e.map(e=>this.baseColumn.mapFromDriverValue(e))}mapToDriverValue(e,n=!1){let r=e.map(e=>e===null?null:Q(this.baseColumn,t)?this.baseColumn.mapToDriverValue(e,!0):this.baseColumn.mapToDriverValue(e));return n?r:CX(r)}},e.defineProperty(Tr,Z,`PgArray`),Tr),AX=(Er=class extends wX{constructor(e,t){super(e,`string`,`PgEnumObjectColumn`),this.config.enum=t}build(e){return new jX(e,this.config)}},e.defineProperty(Er,Z,`PgEnumObjectColumnBuilder`),Er),jX=(Dr=class extends TX{constructor(t,n){super(t,n),e.defineProperty(this,`enum`,void 0),e.defineProperty(this,`enumValues`,this.config.enum.enumValues),this.enum=n.enum}getSQLType(){return this.enum.enumName}},e.defineProperty(Dr,Z,`PgEnumObjectColumn`),Dr);const MX=Symbol.for(`drizzle:isPgEnum`);function NX(e){return!!e&&typeof e==`function`&&MX in e&&e[MX]===!0}var PX=(Or=class extends wX{constructor(e,t){super(e,`string`,`PgEnumColumn`),this.config.enum=t}build(e){return new FX(e,this.config)}},e.defineProperty(Or,Z,`PgEnumColumnBuilder`),Or),FX=(kr=class extends TX{constructor(t,n){super(t,n),e.defineProperty(this,`enum`,this.config.enum),e.defineProperty(this,`enumValues`,this.config.enum.enumValues),this.enum=n.enum}getSQLType(){return this.enum.enumName}},e.defineProperty(kr,Z,`PgEnumColumn`),kr),IX=(Ar=class{constructor(e,t,n,r=!1,i=[]){this._={brand:`Subquery`,sql:e,selectedFields:t,alias:n,isWith:r,usedTables:i}}},e.defineProperty(Ar,Z,`Subquery`),Ar),LX=(jr=class extends IX{},e.defineProperty(jr,Z,`WithSubquery`),jr),RX=`0.44.2`;let zX,BX;const VX={startActiveSpan(e,t){return zX?(BX||=zX.trace.getTracer(`drizzle-orm`,RX),hX((n,r)=>r.startActiveSpan(e,e=>{try{return t(e)}catch(t){throw e.setStatus({code:n.SpanStatusCode.ERROR,message:t instanceof Error?t.message:`Unknown error`}),t}finally{e.end()}}),zX,BX)):t()}},HX=Symbol.for(`drizzle:ViewBaseConfig`),UX=Symbol.for(`drizzle:Schema`),WX=Symbol.for(`drizzle:Columns`),GX=Symbol.for(`drizzle:ExtraConfigColumns`),KX=Symbol.for(`drizzle:OriginalName`),qX=Symbol.for(`drizzle:BaseName`),JX=Symbol.for(`drizzle:IsAlias`),YX=Symbol.for(`drizzle:ExtraConfigBuilder`),XX=Symbol.for(`drizzle:IsDrizzleTable`);var ZX=(Mr=class{constructor(t,n,r){e.defineProperty(this,fX,void 0),e.defineProperty(this,KX,void 0),e.defineProperty(this,UX,void 0),e.defineProperty(this,WX,void 0),e.defineProperty(this,GX,void 0),e.defineProperty(this,qX,void 0),e.defineProperty(this,JX,!1),e.defineProperty(this,XX,!0),e.defineProperty(this,YX,void 0),this[fX]=this[KX]=t,this[UX]=n,this[qX]=r}},e.defineProperty(Mr,Z,`Table`),e.defineProperty(Mr,`Symbol`,{Name:fX,Schema:UX,OriginalName:KX,Columns:WX,ExtraConfigColumns:GX,BaseName:qX,IsAlias:JX,ExtraConfigBuilder:YX}),Mr);function QX(e){return e[fX]}function $X(e){return`${e[UX]??`public`}.${e[fX]}`}var eZ=(Nr=class{},e.defineProperty(Nr,Z,`FakePrimitiveParam`),Nr);function tZ(e){return e!=null&&typeof e.getSQL==`function`}function nZ(e){let t={sql:``,params:[]};for(let r of e){var n;t.sql+=r.sql,t.params.push(...r.params),(n=r.typings)?.length&&(t.typings||=[],t.typings.push(...r.typings))}return t}var rZ=(Pr=class{constructor(t){e.defineProperty(this,`value`,void 0),this.value=Array.isArray(t)?t:[t]}getSQL(){return new iZ([this])}},e.defineProperty(Pr,Z,`StringChunk`),Pr),iZ=(Fr=class t{constructor(t){e.defineProperty(this,`decoder`,sZ),e.defineProperty(this,`shouldInlineParams`,!1),e.defineProperty(this,`usedTables`,[]),this.queryChunks=t;for(let e of t)if(Q(e,ZX)){let t=e[ZX.Symbol.Schema];this.usedTables.push(t===void 0?e[ZX.Symbol.Name]:t+`.`+e[ZX.Symbol.Name])}}append(e){return this.queryChunks.push(...e.queryChunks),this}toQuery(e){return VX.startActiveSpan(`drizzle.buildSQL`,t=>{let n=this.buildQueryFromSourceParams(this.queryChunks,e);return t?.setAttributes({"drizzle.query.text":n.sql,"drizzle.query.params":JSON.stringify(n.params)}),n})}buildQueryFromSourceParams(e,n){let r=Object.assign({},n,{inlineParams:n.inlineParams||this.shouldInlineParams,paramStartIndex:n.paramStartIndex||{value:0}}),{casing:i,escapeName:a,escapeParam:o,prepareTyping:s,inlineParams:c,paramStartIndex:l}=r;return nZ(e.map(e=>{if(Q(e,rZ))return{sql:e.value.join(``),params:[]};if(Q(e,aZ))return{sql:a(e.value),params:[]};if(e===void 0)return{sql:``,params:[]};if(Array.isArray(e)){let t=[new rZ(`(`)];for(let[n,r]of e.entries())t.push(r),ne},cZ={mapToDriverValue:e=>e},lZ={...sZ,...cZ};var uZ=(Lr=class{constructor(t,n=cZ){e.defineProperty(this,`brand`,void 0),this.value=t,this.encoder=n}getSQL(){return new iZ([this])}},e.defineProperty(Lr,Z,`Param`),Lr);function $(e,...t){let n=[];(t.length>0||e.length>0&&e[0]!==``)&&n.push(new rZ(e[0]));for(let[r,i]of t.entries())n.push(i,new rZ(e[r+1]));return new iZ(n)}(e=>{function t(){return new iZ([])}e.empty=t;function n(e){return new iZ(e)}e.fromList=n;function r(e){return new iZ([new rZ(e)])}e.raw=r;function i(e,t){let n=[];for(let[r,i]of e.entries())r>0&&t!==void 0&&n.push(t),n.push(i);return new iZ(n)}e.join=i;function a(e){return new aZ(e)}e.identifier=a;function o(e){return new dZ(e)}e.placeholder=o;function s(e,t){return new uZ(e,t)}e.param=s})($||={}),(t=>{class n{constructor(t,n){e.defineProperty(this,`isSelectionField`,!1),this.sql=t,this.fieldAlias=n}getSQL(){return this.sql}clone(){return new n(this.sql,this.fieldAlias)}}e.defineProperty(n,Z,`SQL.Aliased`),t.Aliased=n})(iZ||={});var dZ=(Rr=class{constructor(e){this.name=e}getSQL(){return new iZ([this])}},e.defineProperty(Rr,Z,`Placeholder`),Rr);function fZ(e,t){return e.map(e=>{if(Q(e,dZ)){if(!(e.name in t))throw Error(`No value for placeholder "${e.name}" was provided`);return t[e.name]}if(Q(e,uZ)&&Q(e.value,dZ)){if(!(e.value.name in t))throw Error(`No value for placeholder "${e.value.name}" was provided`);return e.encoder.mapToDriverValue(t[e.value.name])}return e})}const pZ=Symbol.for(`drizzle:IsDrizzleView`);var mZ=(zr=class{constructor({name:t,schema:n,selectedFields:r,query:i}){e.defineProperty(this,HX,void 0),e.defineProperty(this,pZ,!0),this[HX]={name:t,originalName:t,schema:n,selectedFields:r,query:i,isExisting:!i,isAlias:!1}}getSQL(){return new iZ([this])}},e.defineProperty(zr,Z,`View`),zr);uX.prototype.getSQL=function(){return new iZ([this])},ZX.prototype.getSQL=function(){return new iZ([this])},IX.prototype.getSQL=function(){return new iZ([this])};var hZ=(Br=class{constructor(e){this.table=e}get(e,t){return t===`table`?this.table:e[t]}},e.defineProperty(Br,Z,`ColumnAliasProxyHandler`),Br),gZ=(Vr=class{constructor(e,t){this.alias=e,this.replaceOriginalName=t}get(e,t){if(t===ZX.Symbol.IsAlias)return!0;if(t===ZX.Symbol.Name||this.replaceOriginalName&&t===ZX.Symbol.OriginalName)return this.alias;if(t===HX)return{...e[HX],name:this.alias,isAlias:!0};if(t===ZX.Symbol.Columns){let t=e[ZX.Symbol.Columns];if(!t)return t;let n={};return Object.keys(t).map(r=>{n[r]=new Proxy(t[r],new hZ(new Proxy(e,this)))}),n}let n=e[t];return Q(n,uX)?new Proxy(n,new hZ(new Proxy(e,this))):n}},e.defineProperty(Vr,Z,`TableAliasProxyHandler`),Vr),_Z=(Hr=class{constructor(e){this.alias=e}get(e,t){return t===`sourceTable`?vZ(e.sourceTable,this.alias):e[t]}},e.defineProperty(Hr,Z,`RelationTableAliasProxyHandler`),Hr);function vZ(e,t){return new Proxy(e,new gZ(t,!1))}function yZ(e,t){return new Proxy(e,new hZ(new Proxy(e.table,new gZ(t,!1))))}function bZ(e,t){return new iZ.Aliased(xZ(e.sql,t),e.fieldAlias)}function xZ(e,t){return $.join(e.queryChunks.map(e=>Q(e,uX)?yZ(e,t):Q(e,iZ)?xZ(e,t):Q(e,iZ.Aliased)?bZ(e,t):e))}var SZ=(Ur=class extends Error{constructor({message:e,cause:t}){super(e),this.name=`DrizzleError`,this.cause=t}},e.defineProperty(Ur,Z,`DrizzleError`),Ur),CZ=(Wr=class extends SZ{constructor(){super({message:`Rollback`})}},e.defineProperty(Wr,Z,`TransactionRollbackError`),Wr),wZ=(Gr=class{write(e){console.log(e)}},e.defineProperty(Gr,Z,`ConsoleLogWriter`),Gr),TZ=(Kr=class{constructor(t){e.defineProperty(this,`writer`,void 0),this.writer=t?.writer??new wZ}logQuery(e,t){let n=t.map(e=>{try{return JSON.stringify(e)}catch{return String(e)}}),r=n.length?` -- params: [${n.join(`, `)}]`:``;this.writer.write(`Query: ${e}${r}`)}},e.defineProperty(Kr,Z,`DefaultLogger`),Kr),EZ=(qr=class{logQuery(){}},e.defineProperty(qr,Z,`NoopLogger`),qr),DZ=(ea=Symbol.toStringTag,Jr=class{constructor(){e.defineProperty(this,ea,`QueryPromise`)}catch(e){return this.then(void 0,e)}finally(e){return this.then(t=>(e?.(),t),t=>{throw e?.(),t})}then(e,t){return this.execute().then(e,t)}},e.defineProperty(Jr,Z,`QueryPromise`),Jr);function OZ(e,t){return Object.entries(e).reduce((e,[n,r])=>{if(typeof n!=`string`)return e;let i=t?[...t,n]:[n];return Q(r,uX)||Q(r,iZ)||Q(r,iZ.Aliased)?e.push({path:i,field:r}):Q(r,ZX)?e.push(...OZ(r[ZX.Symbol.Columns],i)):e.push(...OZ(r,i)),e},[])}function kZ(e,t){let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let[e,t]of n.entries())if(t!==r[e])return!1;return!0}function AZ(e,t){let n=Object.entries(t).filter(([,e])=>e!==void 0).map(([t,n])=>Q(n,iZ)||Q(n,uX)?[t,n]:[t,new uZ(n,e[ZX.Symbol.Columns][t])]);if(n.length===0)throw Error(`No values to set`);return Object.fromEntries(n)}function jZ(e,t){for(let n of t)for(let t of Object.getOwnPropertyNames(n.prototype)){if(t===`constructor`)continue;Object.defineProperty(e.prototype,t,Object.getOwnPropertyDescriptor(n.prototype,t)||Object.create(null))}}function MZ(e){return e[ZX.Symbol.Columns]}function NZ(e){return Q(e,IX)?e._.alias:Q(e,mZ)?e[HX].name:Q(e,iZ)?void 0:e[ZX.Symbol.IsAlias]?e[ZX.Symbol.Name]:e[ZX.Symbol.BaseName]}function PZ(e){if(typeof e!=`object`||!e||e.constructor.name!==`Object`)return!1;if(`logger`in e){let t=typeof e.logger;return!(t!==`boolean`&&(t!==`object`||typeof e.logger.logQuery!=`function`)&&t!==`undefined`)}if(`schema`in e){let t=typeof e.schema;return!(t!==`object`&&t!==`undefined`)}if(`casing`in e){let t=typeof e.casing;return!(t!==`string`&&t!==`undefined`)}if(`mode`in e)return!(e.mode!==`default`||e.mode!==`planetscale`||e.mode!==void 0);if(`connection`in e){let t=typeof e.connection;return!(t!==`string`&&t!==`object`&&t!==`undefined`)}if(`client`in e){let t=typeof e.client;return!(t!==`object`&&t!==`function`&&t!==`undefined`)}return Object.keys(e).length===0}var FZ=(Yr=class extends wX{defaultNow(){return this.default($`now()`)}},e.defineProperty(Yr,Z,`PgDateColumnBaseBuilder`),Yr),IZ=(Xr=class extends FZ{constructor(e){super(e,`date`,`PgDate`)}build(e){return new LZ(e,this.config)}},e.defineProperty(Xr,Z,`PgDateBuilder`),Xr),LZ=(Zr=class extends TX{getSQLType(){return`date`}mapFromDriverValue(e){return new Date(e)}mapToDriverValue(e){return e.toISOString()}},e.defineProperty(Zr,Z,`PgDate`),Zr),RZ=(Qr=class extends FZ{constructor(e){super(e,`string`,`PgDateString`)}build(e){return new zZ(e,this.config)}},e.defineProperty(Qr,Z,`PgDateStringBuilder`),Qr),zZ=($r=class extends TX{getSQLType(){return`date`}},e.defineProperty($r,Z,`PgDateString`),$r),BZ=(ei=class extends wX{constructor(e){super(e,`json`,`PgJson`)}build(e){return new VZ(e,this.config)}},e.defineProperty(ei,Z,`PgJsonBuilder`),ei),VZ=(ti=class extends TX{constructor(e,t){super(e,t)}getSQLType(){return`json`}mapToDriverValue(e){return JSON.stringify(e)}mapFromDriverValue(e){if(typeof e==`string`)try{return JSON.parse(e)}catch{return e}return e}},e.defineProperty(ti,Z,`PgJson`),ti),HZ=(ni=class extends wX{constructor(e){super(e,`json`,`PgJsonb`)}build(e){return new UZ(e,this.config)}},e.defineProperty(ni,Z,`PgJsonbBuilder`),ni),UZ=(ri=class extends TX{constructor(e,t){super(e,t)}getSQLType(){return`jsonb`}mapToDriverValue(e){return JSON.stringify(e)}mapFromDriverValue(e){if(typeof e==`string`)try{return JSON.parse(e)}catch{return e}return e}},e.defineProperty(ri,Z,`PgJsonb`),ri),WZ=(ii=class extends wX{constructor(e,t,n){super(e,`string`,`PgNumeric`),this.config.precision=t,this.config.scale=n}build(e){return new GZ(e,this.config)}},e.defineProperty(ii,Z,`PgNumericBuilder`),ii),GZ=(ai=class extends TX{constructor(t,n){super(t,n),e.defineProperty(this,`precision`,void 0),e.defineProperty(this,`scale`,void 0),this.precision=n.precision,this.scale=n.scale}mapFromDriverValue(e){return typeof e==`string`?e:String(e)}getSQLType(){return this.precision!==void 0&&this.scale!==void 0?`numeric(${this.precision}, ${this.scale})`:this.precision===void 0?`numeric`:`numeric(${this.precision})`}},e.defineProperty(ai,Z,`PgNumeric`),ai),KZ=(oi=class extends wX{constructor(e,t,n){super(e,`number`,`PgNumericNumber`),this.config.precision=t,this.config.scale=n}build(e){return new qZ(e,this.config)}},e.defineProperty(oi,Z,`PgNumericNumberBuilder`),oi),qZ=(si=class extends TX{constructor(t,n){super(t,n),e.defineProperty(this,`precision`,void 0),e.defineProperty(this,`scale`,void 0),e.defineProperty(this,`mapToDriverValue`,String),this.precision=n.precision,this.scale=n.scale}mapFromDriverValue(e){return typeof e==`number`?e:Number(e)}getSQLType(){return this.precision!==void 0&&this.scale!==void 0?`numeric(${this.precision}, ${this.scale})`:this.precision===void 0?`numeric`:`numeric(${this.precision})`}},e.defineProperty(si,Z,`PgNumericNumber`),si),JZ=(ci=class extends wX{constructor(e,t,n){super(e,`bigint`,`PgNumericBigInt`),this.config.precision=t,this.config.scale=n}build(e){return new YZ(e,this.config)}},e.defineProperty(ci,Z,`PgNumericBigIntBuilder`),ci),YZ=(li=class extends TX{constructor(t,n){super(t,n),e.defineProperty(this,`precision`,void 0),e.defineProperty(this,`scale`,void 0),e.defineProperty(this,`mapFromDriverValue`,BigInt),e.defineProperty(this,`mapToDriverValue`,String),this.precision=n.precision,this.scale=n.scale}getSQLType(){return this.precision!==void 0&&this.scale!==void 0?`numeric(${this.precision}, ${this.scale})`:this.precision===void 0?`numeric`:`numeric(${this.precision})`}},e.defineProperty(li,Z,`PgNumericBigInt`),li),XZ=(ui=class extends FZ{constructor(e,t,n){super(e,`string`,`PgTime`),this.withTimezone=t,this.precision=n,this.config.withTimezone=t,this.config.precision=n}build(e){return new ZZ(e,this.config)}},e.defineProperty(ui,Z,`PgTimeBuilder`),ui),ZZ=(di=class extends TX{constructor(t,n){super(t,n),e.defineProperty(this,`withTimezone`,void 0),e.defineProperty(this,`precision`,void 0),this.withTimezone=n.withTimezone,this.precision=n.precision}getSQLType(){let e=this.precision===void 0?``:`(${this.precision})`;return`time${e}${this.withTimezone?` with time zone`:``}`}},e.defineProperty(di,Z,`PgTime`),di),QZ=(fi=class extends FZ{constructor(e,t,n){super(e,`date`,`PgTimestamp`),this.config.withTimezone=t,this.config.precision=n}build(e){return new $Z(e,this.config)}},e.defineProperty(fi,Z,`PgTimestampBuilder`),fi),$Z=(pi=class extends TX{constructor(t,n){super(t,n),e.defineProperty(this,`withTimezone`,void 0),e.defineProperty(this,`precision`,void 0),e.defineProperty(this,`mapFromDriverValue`,e=>new Date(this.withTimezone?e:e+`+0000`)),e.defineProperty(this,`mapToDriverValue`,e=>e.toISOString()),this.withTimezone=n.withTimezone,this.precision=n.precision}getSQLType(){let e=this.precision===void 0?``:` (${this.precision})`;return`timestamp${e}${this.withTimezone?` with time zone`:``}`}},e.defineProperty(pi,Z,`PgTimestamp`),pi),eQ=(mi=class extends FZ{constructor(e,t,n){super(e,`string`,`PgTimestampString`),this.config.withTimezone=t,this.config.precision=n}build(e){return new tQ(e,this.config)}},e.defineProperty(mi,Z,`PgTimestampStringBuilder`),mi),tQ=(hi=class extends TX{constructor(t,n){super(t,n),e.defineProperty(this,`withTimezone`,void 0),e.defineProperty(this,`precision`,void 0),this.withTimezone=n.withTimezone,this.precision=n.precision}getSQLType(){let e=this.precision===void 0?``:`(${this.precision})`;return`timestamp${e}${this.withTimezone?` with time zone`:``}`}},e.defineProperty(hi,Z,`PgTimestampString`),hi),nQ=(gi=class extends wX{constructor(e){super(e,`string`,`PgUUID`)}defaultRandom(){return this.default($`gen_random_uuid()`)}build(e){return new rQ(e,this.config)}},e.defineProperty(gi,Z,`PgUUIDBuilder`),gi),rQ=(_i=class extends TX{getSQLType(){return`uuid`}},e.defineProperty(_i,Z,`PgUUID`),_i);const iQ=Symbol.for(`drizzle:PgInlineForeignKeys`),aQ=Symbol.for(`drizzle:EnableRLS`);var oQ=(ta=ZX.Symbol.ExtraConfigBuilder,na=ZX.Symbol.ExtraConfigColumns,vi=class extends ZX{constructor(...t){super(...t),e.defineProperty(this,iQ,[]),e.defineProperty(this,aQ,!1),e.defineProperty(this,ta,void 0),e.defineProperty(this,na,{})}},e.defineProperty(vi,Z,`PgTable`),e.defineProperty(vi,`Symbol`,Object.assign({},ZX.Symbol,{InlineForeignKeys:iQ,EnableRLS:aQ})),vi),sQ=(yi=class{constructor(t,n){e.defineProperty(this,`columns`,void 0),e.defineProperty(this,`name`,void 0),this.columns=t,this.name=n}build(e){return new cQ(e,this.columns,this.name)}},e.defineProperty(yi,Z,`PgPrimaryKeyBuilder`),yi),cQ=(bi=class{constructor(t,n,r){e.defineProperty(this,`columns`,void 0),e.defineProperty(this,`name`,void 0),this.table=t,this.columns=n,this.name=r}getName(){return this.name??`${this.table[oQ.Symbol.Name]}_${this.columns.map(e=>e.name).join(`_`)}_pk`}},e.defineProperty(bi,Z,`PgPrimaryKey`),bi);function lQ(e,t){return oZ(t)&&!tZ(e)&&!Q(e,uZ)&&!Q(e,dZ)&&!Q(e,uX)&&!Q(e,ZX)&&!Q(e,mZ)?new uZ(e,t):e}const uQ=(e,t)=>$`${e} = ${lQ(t,e)}`,dQ=(e,t)=>$`${e} <> ${lQ(t,e)}`;function fQ(...e){let t=e.filter(e=>e!==void 0);if(t.length!==0)return t.length===1?new iZ(t):new iZ([new rZ(`(`),$.join(t,new rZ(` and `)),new rZ(`)`)])}function pQ(...e){let t=e.filter(e=>e!==void 0);if(t.length!==0)return t.length===1?new iZ(t):new iZ([new rZ(`(`),$.join(t,new rZ(` or `)),new rZ(`)`)])}function mQ(e){return $`not ${e}`}const hQ=(e,t)=>$`${e} > ${lQ(t,e)}`,gQ=(e,t)=>$`${e} >= ${lQ(t,e)}`,_Q=(e,t)=>$`${e} < ${lQ(t,e)}`,vQ=(e,t)=>$`${e} <= ${lQ(t,e)}`;function yQ(e,t){return Array.isArray(t)?t.length===0?$`false`:$`${e} in ${t.map(t=>lQ(t,e))}`:$`${e} in ${lQ(t,e)}`}function bQ(e,t){return Array.isArray(t)?t.length===0?$`true`:$`${e} not in ${t.map(t=>lQ(t,e))}`:$`${e} not in ${lQ(t,e)}`}function xQ(e){return $`${e} is null`}function SQ(e){return $`${e} is not null`}function CQ(e){return $`exists ${e}`}function wQ(e){return $`not exists ${e}`}function TQ(e,t,n){return $`${e} between ${lQ(t,e)} and ${lQ(n,e)}`}function EQ(e,t,n){return $`${e} not between ${lQ(t,e)} and ${lQ(n,e)}`}function DQ(e,t){return $`${e} like ${t}`}function OQ(e,t){return $`${e} not like ${t}`}function kQ(e,t){return $`${e} ilike ${t}`}function AQ(e,t){return $`${e} not ilike ${t}`}function jQ(e){return $`${e} asc`}function MQ(e){return $`${e} desc`}var NQ=(xi=class{constructor(t,n,r){e.defineProperty(this,`referencedTableName`,void 0),e.defineProperty(this,`fieldName`,void 0),this.sourceTable=t,this.referencedTable=n,this.relationName=r,this.referencedTableName=n[ZX.Symbol.Name]}},e.defineProperty(xi,Z,`Relation`),xi),PQ=(Si=class{constructor(e,t){this.table=e,this.config=t}},e.defineProperty(Si,Z,`Relations`),Si),FQ=(Ci=class e extends NQ{constructor(e,t,n,r){super(e,t,n?.relationName),this.config=n,this.isNullable=r}withFieldName(t){let n=new e(this.sourceTable,this.referencedTable,this.config,this.isNullable);return n.fieldName=t,n}},e.defineProperty(Ci,Z,`One`),Ci),IQ=(wi=class e extends NQ{constructor(e,t,n){super(e,t,n?.relationName),this.config=n}withFieldName(t){let n=new e(this.sourceTable,this.referencedTable,this.config);return n.fieldName=t,n}},e.defineProperty(wi,Z,`Many`),wi);function LQ(){return{and:fQ,between:TQ,eq:uQ,exists:CQ,gt:hQ,gte:gQ,ilike:kQ,inArray:yQ,isNull:xQ,isNotNull:SQ,like:DQ,lt:_Q,lte:vQ,ne:dQ,not:mQ,notBetween:EQ,notExists:wQ,notLike:OQ,notIlike:AQ,notInArray:bQ,or:pQ,sql:$}}function RQ(){return{sql:$,asc:jQ,desc:MQ}}function zQ(e,t){Object.keys(e).length===1&&`default`in e&&!Q(e.default,ZX)&&(e=e.default);let n={},r={},i={};for(let[o,s]of Object.entries(e))if(Q(s,ZX)){var a;let e=$X(s),t=r[e];n[e]=o,i[o]={tsName:o,dbName:s[ZX.Symbol.Name],schema:s[ZX.Symbol.Schema],columns:s[ZX.Symbol.Columns],relations:t?.relations??{},primaryKey:t?.primaryKey??[]};for(let e of Object.values(s[ZX.Symbol.Columns]))e.primary&&i[o].primaryKey.push(e);let c=(a=s[ZX.Symbol.ExtraConfigBuilder])?.call(s,s[ZX.Symbol.ExtraConfigColumns]);if(c)for(let e of Object.values(c))Q(e,sQ)&&i[o].primaryKey.push(...e.columns)}else if(Q(s,PQ)){let e=$X(s.table),a=n[e],o=s.config(t(s.table)),c;for(let[t,n]of Object.entries(o))if(a){let e=i[a];e.relations[t]=n,c&&e.primaryKey.push(...c)}else e in r||(r[e]={relations:{},primaryKey:c}),r[e].relations[t]=n}return{tables:i,tableNamesMap:n}}function BQ(e){return function(t,n){return new FQ(e,t,n,n?.fields.reduce((e,t)=>e&&t.notNull,!0)??!1)}}function VQ(e){return function(t,n){return new IQ(e,t,n)}}function HQ(e,t,n){if(Q(n,FQ)&&n.config)return{fields:n.config.fields,references:n.config.references};let r=t[$X(n.referencedTable)];if(!r)throw Error(`Table "${n.referencedTable[ZX.Symbol.Name]}" not found in schema`);let i=e[r];if(!i)throw Error(`Table "${r}" not found in schema`);let a=n.sourceTable,o=t[$X(a)];if(!o)throw Error(`Table "${a[ZX.Symbol.Name]}" not found in schema`);let s=[];for(let e of Object.values(i.relations))(n.relationName&&n!==e&&e.relationName===n.relationName||!n.relationName&&e.referencedTable===n.sourceTable)&&s.push(e);if(s.length>1)throw n.relationName?Error(`There are multiple relations with name "${n.relationName}" in table "${r}"`):Error(`There are multiple relations between "${r}" and "${n.sourceTable[ZX.Symbol.Name]}". Please specify relation name`);if(s[0]&&Q(s[0],FQ)&&s[0].config)return{fields:s[0].config.references,references:s[0].config.fields};throw Error(`There is not enough information to infer relation "${o}.${n.fieldName}"`)}function UQ(e){return{one:BQ(e),many:VQ(e)}}function WQ(e,t,n,r,i=e=>e){let a={};for(let[o,s]of r.entries())if(s.isJson){let r=t.relations[s.tsKey],c=n[o],l=typeof c==`string`?JSON.parse(c):c;a[s.tsKey]=Q(r,FQ)?l&&WQ(e,e[s.relationTableTsKey],l,s.selection,i):l.map(t=>WQ(e,e[s.relationTableTsKey],t,s.selection,i))}else{let e=i(n[o]),t=s.field,r;r=Q(t,uX)?t:Q(t,iZ)?t.decoder:t.sql.decoder,a[s.tsKey]=e===null?null:r.mapFromDriverValue(e)}return a}var GQ=(Ti=class t{constructor(t){e.defineProperty(this,`config`,void 0),this.config={...t}}get(e,n){if(n===`_`)return{...e._,selectedFields:new Proxy(e._.selectedFields,this)};if(n===HX)return{...e[HX],selectedFields:new Proxy(e[HX].selectedFields,this)};if(typeof n==`symbol`)return e[n];let r=Q(e,IX)?e._.selectedFields:Q(e,mZ)?e[HX].selectedFields:e,i=r[n];if(Q(i,iZ.Aliased)){if(this.config.sqlAliasedBehavior===`sql`&&!i.isSelectionField)return i.sql;let e=i.clone();return e.isSelectionField=!0,e}if(Q(i,iZ)){if(this.config.sqlBehavior===`sql`)return i;throw Error(`You tried to reference "${n}" field from a subquery, which is a raw SQL field, but it doesn't have an alias declared. Please add an alias to the field using ".as('alias')" method.`)}return Q(i,uX)?this.config.alias?new Proxy(i,new hZ(new Proxy(i.table,new gZ(this.config.alias,this.config.replaceOriginalName??!1)))):i:typeof i!=`object`||!i?i:new Proxy(i,new t(this.config))}},e.defineProperty(Ti,Z,`SelectionProxyHandler`),Ti);function KQ(e){let t=e.replace(/['\u2019]/g,``).match(/[\da-z]+|[A-Z]+(?![a-z])|[A-Z][\da-z]+/g)??[];return t.map(e=>e.toLowerCase()).join(`_`)}function qQ(e){let t=e.replace(/['\u2019]/g,``).match(/[\da-z]+|[A-Z]+(?![a-z])|[A-Z][\da-z]+/g)??[];return t.reduce((e,t,n)=>{let r=n===0?t.toLowerCase():`${t[0].toUpperCase()}${t.slice(1)}`;return e+r},``)}function JQ(e){return e}var YQ=(Ei=class{constructor(t){e.defineProperty(this,`cache`,{}),e.defineProperty(this,`cachedTables`,{}),e.defineProperty(this,`convert`,void 0),this.convert=t===`snake_case`?KQ:t===`camelCase`?qQ:JQ}getColumnCasing(e){if(!e.keyAsName)return e.name;let t=e.table[ZX.Symbol.Schema]??`public`,n=e.table[ZX.Symbol.OriginalName],r=`${t}.${n}.${e.name}`;return this.cache[r]||this.cacheTable(e.table),this.cache[r]}cacheTable(e){let t=e[ZX.Symbol.Schema]??`public`,n=e[ZX.Symbol.OriginalName],r=`${t}.${n}`;if(!this.cachedTables[r]){for(let t of Object.values(e[ZX.Symbol.Columns])){let e=`${r}.${t.name}`;this.cache[e]=this.convert(t.name)}this.cachedTables[r]=!0}}clearCache(){this.cache={},this.cachedTables={}}},e.defineProperty(Ei,Z,`CasingCache`),Ei),XQ=(Di=class extends mZ{},e.defineProperty(Di,Z,`PgViewBase`),Di),ZQ=(Oi=class{constructor(t){e.defineProperty(this,`casing`,void 0),this.casing=new YQ(t?.casing)}async migrate(e,t,n){let r=typeof n==`string`?`__drizzle_migrations`:n.migrationsTable??`__drizzle_migrations`,i=typeof n==`string`?`drizzle`:n.migrationsSchema??`drizzle`,a=$` + `)}\n]`}concat(...t){let n=this.schema,r=this.data.concat(t.flatMap(({data:e})=>e));return new e(n,r.map(e=>new kR(n,e)))}slice(t,n){let r=this.schema;[t,n]=kI({length:this.numRows},t,n);let i=iL(this.data,this._offsets,t,n);return new e(r,i.map(e=>new kR(r,e)))}getChild(e){return this.getChildAt(this.schema.fields.findIndex(t=>t.name===e))}getChildAt(e){if(e>-1&&et.children[e]);if(t.length===0){let{type:n}=this.schema.fields[e],r=$I({type:n,length:0,nullCount:0});t.push(r._changeLengthAndBackfillNullBitmap(this.numRows))}return new CL(t)}return null}setChild(e,t){var n;return this.setChildAt((n=this.schema.fields)?.findIndex(t=>t.name===e),t)}setChildAt(t,n){let r=this.schema,i=[...this.batches];if(t>-1&&tthis.getChildAt(t));[e[t],o[t]]=[a,n],[r,i]=CR(r,o)}return new e(r,i)}select(e){let t=this.schema.fields.reduce((e,t,n)=>e.set(t.name,n),new Map);return this.selectAt(e.map(e=>t.get(e)).filter(e=>e>-1))}selectAt(t){let n=this.schema.selectAt(t),r=this.batches.map(e=>e.selectAt(t));return new e(n,r)}assign(t){let n=this.schema.fields,[r,i]=t.schema.fields.reduce((e,t,r)=>{let[i,a]=e,o=n.findIndex(e=>e.name===t.name);return~o?a[o]=r:i.push(r),e},[[],[]]),a=this.schema.assign(t.schema),o=[...n.map((e,t)=>[t,i[t]]).map(([e,n])=>n===void 0?this.getChildAt(e):t.getChildAt(n)),...r.map(e=>t.getChildAt(e))].filter(Boolean);return new e(...CR(a,o))}};ER=Symbol.toStringTag,DR[ER]=(e=>(e.schema=null,e.batches=[],e._offsets=new Uint32Array([0]),e._nullCount=-1,e[Symbol.isConcatSpreadable]=!0,e.isValid=sL(oL),e.get=sL(bI.getVisitFn(Y.Struct)),e.set=cL(wF.getVisitFn(Y.Struct)),e.indexOf=lL(hL.getVisitFn(Y.Struct)),`Table`))(DR.prototype);var OR,kR=class e{constructor(...e){switch(e.length){case 2:if([this.schema]=e,!(this.schema instanceof DL)||([,this.data=$I({nullCount:0,type:new gP(this.schema.fields),children:this.schema.fields.map(e=>$I({type:e.type,nullCount:0}))})]=e,!(this.data instanceof XI)))throw TypeError(`RecordBatch constructor expects a [Schema, Data] pair.`);[this.schema,this.data]=AR(this.schema,this.data.children);break;case 1:{let[t]=e,{fields:n,children:r,length:i}=Object.keys(t).reduce((e,n,r)=>(e.children[r]=t[n],e.length=Math.max(e.length,t[n].length),e.fields[r]=OL.new({name:n,type:t[n].type,nullable:!0}),e),{length:0,fields:[],children:[]}),a=new DL(n),o=$I({type:new gP(n),length:i,children:r,nullCount:0});[this.schema,this.data]=AR(a,o.children,i);break}default:throw TypeError(`RecordBatch constructor expects an Object mapping names to child Data, or a [Schema, Data] pair.`)}}get dictionaries(){return this._dictionaries||=jR(this.schema.fields,this.data.children)}get numCols(){return this.schema.fields.length}get numRows(){return this.data.length}get nullCount(){return this.data.nullCount}isValid(e){return this.data.getValid(e)}get(e){return bI.visit(this.data,e)}at(e){return this.get(AI(e,this.numRows))}set(e,t){return wF.visit(this.data,e,t)}indexOf(e,t){return hL.visit(this.data,e,t)}[Symbol.iterator](){return yL.visit(new CL([this.data]))}toArray(){return[...this]}concat(...e){return new DR(this.schema,[this,...e])}slice(t,n){let[r]=new CL([this.data]).slice(t,n).data;return new e(this.schema,r)}getChild(e){var t;return this.getChildAt((t=this.schema.fields)?.findIndex(t=>t.name===e))}getChildAt(e){return e>-1&&et.name===e),t)}setChildAt(t,n){let r=this.schema,i=this.data;if(t>-1&&tt.name===e);~t&&(i[t]=this.data.children[t])}return new e(n,$I({type:r,length:this.numRows,children:i}))}selectAt(t){let n=this.schema.selectAt(t),r=t.map(e=>this.data.children[e]).filter(Boolean),i=$I({type:new gP(n.fields),length:this.numRows,children:r});return new e(n,i)}};OR=Symbol.toStringTag,kR[OR]=(e=>(e._nullCount=-1,e[Symbol.isConcatSpreadable]=!0,`RecordBatch`))(kR.prototype);function AR(e,t,n=t.reduce((e,t)=>Math.max(e,t.length),0)){var r;let i=[...e.fields],a=[...t],o=(n+63&-64)>>3;for(let[s,c]of e.fields.entries()){let e=t[s];(!e||e.length!==n)&&(i[s]=c.clone({nullable:!0}),a[s]=(r=e?._changeLengthAndBackfillNullBitmap(n))??$I({type:c.type,length:n,nullCount:n,nullBitmap:new Uint8Array(o)}))}return[e.assign(i),$I({type:new gP(i),length:n,children:a})]}function jR(e,t,n=new Map){var r,i;if(((r=e?.length)??0)>0&&e?.length===t?.length)for(let r=-1,a=e.length;++r$I({type:e.type})),n=$I({type:new gP(e.fields),nullCount:0,children:t});super(e,n)}},NR=class e{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsMessage(t,n){return(n||new e).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsMessage(t,n){return t.setPosition(t.position()+hM),(n||new e).__init(t.readInt32(t.position())+t.position(),t)}version(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):oM.V1}headerType(){let e=this.bb.__offset(this.bb_pos,6);return e?this.bb.readUint8(this.bb_pos+e):rN.NONE}header(e){let t=this.bb.__offset(this.bb_pos,8);return t?this.bb.__union(e,this.bb_pos+t):null}bodyLength(){let e=this.bb.__offset(this.bb_pos,10);return e?this.bb.readInt64(this.bb_pos+e):BigInt(`0`)}customMetadata(e,t){let n=this.bb.__offset(this.bb_pos,12);return n?(t||new PM).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+n)+e*4),this.bb):null}customMetadataLength(){let e=this.bb.__offset(this.bb_pos,12);return e?this.bb.__vector_len(this.bb_pos+e):0}static startMessage(e){e.startObject(5)}static addVersion(e,t){e.addFieldInt16(0,t,oM.V1)}static addHeaderType(e,t){e.addFieldInt8(1,t,rN.NONE)}static addHeader(e,t){e.addFieldOffset(2,t,0)}static addBodyLength(e,t){e.addFieldInt64(3,t,BigInt(`0`))}static addCustomMetadata(e,t){e.addFieldOffset(4,t,0)}static createCustomMetadataVector(e,t){e.startVector(4,t.length,4);for(let n=t.length-1;n>=0;n--)e.addOffset(t[n]);return e.endVector()}static startCustomMetadataVector(e,t){e.startVector(4,t,4)}static endMessage(e){let t=e.endObject();return t}static finishMessageBuffer(e,t){e.finish(t)}static finishSizePrefixedMessageBuffer(e,t){e.finish(t,void 0,!0)}static createMessage(t,n,r,i,a,o){return e.startMessage(t),e.addVersion(t,n),e.addHeaderType(t,r),e.addHeader(t,i),e.addBodyLength(t,a),e.addCustomMetadata(t,o),e.endMessage(t)}},PR=class extends wP{visit(e,t){return e==null||t==null?void 0:super.visit(e,t)}visitNull(e,t){return JM.startNull(t),JM.endNull(t)}visitInt(e,t){return MM.startInt(t),MM.addBitWidth(t,e.bitWidth),MM.addIsSigned(t,e.isSigned),MM.endInt(t)}visitFloat(e,t){return HM.startFloatingPoint(t),HM.addPrecision(t,e.precision),HM.endFloatingPoint(t)}visitBinary(e,t){return FM.startBinary(t),FM.endBinary(t)}visitLargeBinary(e,t){return WM.startLargeBinary(t),WM.endLargeBinary(t)}visitBool(e,t){return IM.startBool(t),IM.endBool(t)}visitUtf8(e,t){return $M.startUtf8(t),$M.endUtf8(t)}visitLargeUtf8(e,t){return GM.startLargeUtf8(t),GM.endLargeUtf8(t)}visitDecimal(e,t){return RM.startDecimal(t),RM.addScale(t,e.scale),RM.addPrecision(t,e.precision),RM.addBitWidth(t,e.bitWidth),RM.endDecimal(t)}visitDate(e,t){return LM.startDate(t),LM.addUnit(t,e.unit),LM.endDate(t)}visitTime(e,t){return XM.startTime(t),XM.addUnit(t,e.unit),XM.addBitWidth(t,e.bitWidth),XM.endTime(t)}visitTimestamp(e,t){let n=e.timezone&&t.createString(e.timezone)||void 0;return ZM.startTimestamp(t),ZM.addUnit(t,e.unit),n!==void 0&&ZM.addTimezone(t,n),ZM.endTimestamp(t)}visitInterval(e,t){return UM.startInterval(t),UM.addUnit(t,e.unit),UM.endInterval(t)}visitDuration(e,t){return zM.startDuration(t),zM.addUnit(t,e.unit),zM.endDuration(t)}visitList(e,t){return KM.startList(t),KM.endList(t)}visitStruct(e,t){return YM.startStruct_(t),YM.endStruct_(t)}visitUnion(e,t){QM.startTypeIdsVector(t,e.typeIds.length);let n=QM.createTypeIdsVector(t,e.typeIds);return QM.startUnion(t),QM.addMode(t,e.mode),QM.addTypeIds(t,n),QM.endUnion(t)}visitDictionary(e,t){let n=this.visit(e.indices,t);return NM.startDictionaryEncoding(t),NM.addId(t,BigInt(e.id)),NM.addIsOrdered(t,e.isOrdered),n!==void 0&&NM.addIndexType(t,n),NM.endDictionaryEncoding(t)}visitFixedSizeBinary(e,t){return BM.startFixedSizeBinary(t),BM.addByteWidth(t,e.byteWidth),BM.endFixedSizeBinary(t)}visitFixedSizeList(e,t){return VM.startFixedSizeList(t),VM.addListSize(t,e.listSize),VM.endFixedSizeList(t)}visitMap(e,t){return qM.startMap(t),qM.addKeysSorted(t,e.keysSorted),qM.endMap(t)}};const FR=new PR;function IR(e,t=new Map){return new DL(zR(e,t),GR(e.metadata),t)}function LR(e){return new ZR(e.count,VR(e.columns),HR(e.columns))}function RR(e){return new QR(LR(e.data),e.id,e.isDelta)}function zR(e,t){return(e.fields||[]).filter(Boolean).map(e=>OL.fromJSON(e,t))}function BR(e,t){return(e.children||[]).filter(Boolean).map(e=>OL.fromJSON(e,t))}function VR(e){return(e||[]).reduce((e,t)=>[...e,new ez(t.count,UR(t.VALIDITY)),...VR(t.children)],[])}function HR(e,t=[]){for(let n=-1,r=(e||[]).length;++ne+ +(t===0),0)}function WR(e,t){let n,r,i,a,o,s;return!t||!(a=e.dictionary)?(o=qR(e,BR(e,t)),i=new OL(e.name,o,e.nullable,GR(e.metadata))):t.has(n=a.id)?(r=(r=a.indexType)?KR(r):new JN,s=new SP(t.get(n),r,n,a.isOrdered),i=new OL(e.name,s,e.nullable,GR(e.metadata))):(r=(r=a.indexType)?KR(r):new JN,t.set(n,o=qR(e,BR(e,t))),s=new SP(o,r,n,a.isOrdered),i=new OL(e.name,s,e.nullable,GR(e.metadata))),i||null}function GR(e=[]){return new Map(e.map(({key:e,value:t})=>[e,t]))}function KR(e){return new GN(e.isSigned,e.bitWidth)}function qR(e,t){let n=e.type.name;switch(n){case`NONE`:return new WN;case`null`:return new WN;case`binary`:return new iP;case`largebinary`:return new aP;case`utf8`:return new oP;case`largeutf8`:return new sP;case`bool`:return new cP;case`list`:return new hP((t||[])[0]);case`struct`:return new gP(t||[]);case`struct_`:return new gP(t||[])}switch(n){case`int`:{let t=e.type;return new GN(t.isSigned,t.bitWidth)}case`floatingpoint`:{let t=e.type;return new eP(cM[t.precision])}case`decimal`:{let t=e.type;return new lP(t.scale,t.precision,t.bitWidth)}case`date`:{let t=e.type;return new uP(lM[t.unit])}case`time`:{let t=e.type;return new dP(uM[t.unit],t.bitWidth)}case`timestamp`:{let t=e.type;return new fP(uM[t.unit],t.timezone)}case`interval`:{let t=e.type;return new pP(dM[t.unit])}case`duration`:{let t=e.type;return new mP(uM[t.unit])}case`union`:{let n=e.type,[r,...i]=(n.mode+``).toLowerCase(),a=r.toUpperCase()+i.join(``);return new _P(sM[a],n.typeIds||[],t||[])}case`fixedsizebinary`:{let t=e.type;return new vP(t.byteWidth)}case`fixedsizelist`:{let n=e.type;return new yP(n.listSize,(t||[])[0])}case`map`:{let n=e.type;return new bP((t||[])[0],n.keysSorted)}}throw Error(`Unrecognized type: "${n}"`)}var JR=SM,YR=xM,XR=class e{static fromJSON(t,n){let r=new e(0,oM.V5,n);return r._createHeader=tz(t,n),r}static decode(t){t=new YR(Wj(t));let n=NR.getRootAsMessage(t),r=n.bodyLength(),i=n.version(),a=n.headerType(),o=new e(r,i,a);return o._createHeader=nz(n,a),o}static encode(e){let t=new JR,n=-1;return e.isSchema()?n=DL.encode(t,e.header()):e.isRecordBatch()?n=ZR.encode(t,e.header()):e.isDictionaryBatch()&&(n=QR.encode(t,e.header())),NR.startMessage(t),NR.addVersion(t,oM.V5),NR.addHeader(t,n),NR.addHeaderType(t,e.headerType),NR.addBodyLength(t,BigInt(e.bodyLength)),NR.finishMessageBuffer(t,NR.endMessage(t)),t.asUint8Array()}static from(t,n=0){if(t instanceof DL)return new e(0,oM.V5,rN.Schema,t);if(t instanceof ZR)return new e(n,oM.V5,rN.RecordBatch,t);if(t instanceof QR)return new e(n,oM.V5,rN.DictionaryBatch,t);throw Error(`Unrecognized Message header: ${t}`)}get type(){return this.headerType}get version(){return this._version}get headerType(){return this._headerType}get bodyLength(){return this._bodyLength}header(){return this._createHeader()}isSchema(){return this.headerType===rN.Schema}isRecordBatch(){return this.headerType===rN.RecordBatch}isDictionaryBatch(){return this.headerType===rN.DictionaryBatch}constructor(e,t,n,r){this._version=t,this._headerType=n,this.body=new Uint8Array,r&&(this._createHeader=()=>r),this._bodyLength=sN(e)}},ZR=class{get nodes(){return this._nodes}get length(){return this._length}get buffers(){return this._buffers}constructor(e,t,n){this._nodes=t,this._buffers=n,this._length=sN(e)}},QR=class{get id(){return this._id}get data(){return this._data}get isDelta(){return this._isDelta}get length(){return this.data.length}get nodes(){return this.data.nodes}get buffers(){return this.data.buffers}constructor(e,t,n=!1){this._data=e,this._isDelta=n,this._id=sN(t)}},$R=class{constructor(e,t){this.offset=sN(e),this.length=sN(t)}},ez=class{constructor(e,t){this.length=sN(e),this.nullCount=sN(t)}};function tz(e,t){return()=>{switch(t){case rN.Schema:return DL.fromJSON(e);case rN.RecordBatch:return ZR.fromJSON(e);case rN.DictionaryBatch:return QR.fromJSON(e)}throw Error(`Unrecognized Message type: { name: ${rN[t]}, type: ${t} }`)}}function nz(e,t){return()=>{switch(t){case rN.Schema:return DL.decode(e.header(new nN),new Map,e.version());case rN.RecordBatch:return ZR.decode(e.header(new OM),e.version());case rN.DictionaryBatch:return QR.decode(e.header(new kM),e.version())}throw Error(`Unrecognized Message type: { name: ${rN[t]}, type: ${t} }`)}}OL.encode=_z,OL.decode=fz,OL.fromJSON=WR,DL.encode=gz,DL.decode=rz,DL.fromJSON=IR,ZR.encode=vz,ZR.decode=iz,ZR.fromJSON=LR,QR.encode=yz,QR.decode=az,QR.fromJSON=RR,ez.encode=bz,ez.decode=sz,$R.encode=xz,$R.decode=oz;function rz(e,t=new Map,n=oM.V5){let r=uz(e,t);return new DL(r,pz(e),t,n)}function iz(e,t=oM.V5){if(e.compression()!==null)throw Error(`Record batch compression not implemented`);return new ZR(e.length(),cz(e),lz(e,t))}function az(e,t=oM.V5){return new QR(ZR.decode(e.data(),t),e.id(),e.isDelta())}function oz(e){return new $R(e.offset(),e.length())}function sz(e){return new ez(e.length(),e.nullCount())}function cz(e){let t=[];for(let n,r=-1,i=-1,a=e.nodesLength();++rOL.encode(e,t));nN.startFieldsVector(e,n.length);let r=nN.createFieldsVector(e,n),i=t.metadata&&t.metadata.size>0?nN.createCustomMetadataVector(e,[...t.metadata].map(([t,n])=>{let r=e.createString(`${t}`),i=e.createString(`${n}`);return PM.startKeyValue(e),PM.addKey(e,r),PM.addValue(e,i),PM.endKeyValue(e)})):-1;return nN.startSchema(e),nN.addFields(e,r),nN.addEndianness(e,Sz?AM.Little:AM.Big),i!==-1&&nN.addCustomMetadata(e,i),nN.endSchema(e)}function _z(e,t){let n=-1,r=-1,i=-1,a=t.type,o=t.typeId;UN.isDictionary(a)?(o=a.dictionary.typeId,i=FR.visit(a,e),r=FR.visit(a.dictionary,e)):r=FR.visit(a,e);let s=(a.children||[]).map(t=>OL.encode(e,t)),c=tN.createChildrenVector(e,s),l=t.metadata&&t.metadata.size>0?tN.createCustomMetadataVector(e,[...t.metadata].map(([t,n])=>{let r=e.createString(`${t}`),i=e.createString(`${n}`);return PM.startKeyValue(e),PM.addKey(e,r),PM.addValue(e,i),PM.endKeyValue(e)})):-1;return t.name&&(n=e.createString(t.name)),tN.startField(e),tN.addType(e,r),tN.addTypeType(e,o),tN.addChildren(e,c),tN.addNullable(e,!!t.nullable),n!==-1&&tN.addName(e,n),i!==-1&&tN.addDictionary(e,i),l!==-1&&tN.addCustomMetadata(e,l),tN.endField(e)}function vz(e,t){let n=t.nodes||[],r=t.buffers||[];OM.startNodesVector(e,n.length);for(let t of n.slice().reverse())ez.encode(e,t);let i=e.endVector();OM.startBuffersVector(e,r.length);for(let t of r.slice().reverse())$R.encode(e,t);let a=e.endVector();return OM.startRecordBatch(e),OM.addLength(e,BigInt(t.length)),OM.addNodes(e,i),OM.addBuffers(e,a),OM.endRecordBatch(e)}function yz(e,t){let n=ZR.encode(e,t.data);return kM.startDictionaryBatch(e),kM.addId(e,BigInt(t.id)),kM.addIsDelta(e,t.isDelta),kM.addData(e,n),kM.endDictionaryBatch(e)}function bz(e,t){return DM.createFieldNode(e,BigInt(t.length),BigInt(t.nullCount))}function xz(e,t){return EM.createBuffer(e,BigInt(t.offset),BigInt(t.length))}const Sz=(()=>{let e=new ArrayBuffer(2);return new DataView(e).setInt16(0,256,!0),new Int16Array(e)[0]===256})(),Cz=e=>`Expected ${rN[e]} Message in stream, but was null or length 0.`,wz=e=>`Header pointer of flatbuffer-encoded ${rN[e]} Message is null or length 0.`,Tz=(e,t)=>`Expected to read ${e} metadata bytes, but only read ${t}.`,Ez=(e,t)=>`Expected to read ${e} bytes for message body, but only read ${t}.`;var Dz=class{constructor(e){this.source=e instanceof VL?e:new VL(e)}[Symbol.iterator](){return this}next(){let e;return(e=this.readMetadataLength()).done||e.value===-1&&(e=this.readMetadataLength()).done||(e=this.readMetadata(e.value)).done?IL:e}throw(e){return this.source.throw(e)}return(e){return this.source.return(e)}readMessage(e){let t;if((t=this.next()).done)return null;if(e!=null&&t.value.headerType!==e)throw Error(Cz(e));return t.value}readMessageBody(e){if(e<=0)return new Uint8Array;let t=Wj(this.source.read(e));if(t.byteLength[...e,...n.VALIDITY&&[n.VALIDITY]||[],...n.TYPE_ID&&[n.TYPE_ID]||[],...n.OFFSET&&[n.OFFSET]||[],...n.DATA&&[n.DATA]||[],...t(n.children)],[])}}readMessage(e){let t;if((t=this.next()).done)return null;if(e!=null&&t.value.headerType!==e)throw Error(Cz(e));return t.value}readSchema(){let e=rN.Schema,t=this.readMessage(e),n=t?.header();if(!t||!n)throw Error(wz(e));return n}};const Az=4,jz=`ARROW1`,Mz=new Uint8Array(jz.length);for(let e=0;ethis):this}readRecordBatch(e){return this._impl.isFile()?this._impl.readRecordBatch(e):null}[Symbol.iterator](){return this._impl[Symbol.iterator]()}[Symbol.asyncIterator](){return this._impl[Symbol.asyncIterator]()}toDOMStream(){return Qj.toDOMStream(this.isSync()?{[Symbol.iterator]:()=>this}:{[Symbol.asyncIterator]:()=>this})}toNodeStream(){return Qj.toNodeStream(this.isSync()?{[Symbol.iterator]:()=>this}:{[Symbol.asyncIterator]:()=>this},{objectMode:!0})}static throughNode(e){throw Error(`"throughNode" not available in this environment`)}static throughDOM(e,t){throw Error(`"throughDOM" not available in this environment`)}static from(t){return t instanceof e?t:Dj(t)?Zz(t):kj(t)?eB(t):wj(t)?(()=>uj(this,void 0,void 0,function*(){return yield e.from(yield t)}))():Aj(t)||Nj(t)||Fj(t)||Ej(t)?$z(new HL(t)):Qz(new VL(t))}static readAll(t){return t instanceof e?t.isSync()?Yz(t):Xz(t):Dj(t)||ArrayBuffer.isView(t)||Tj(t)||Oj(t)?Yz(t):Xz(t)}},Rz=class extends Lz{constructor(e){super(e),this._impl=e}readAll(){return[...this]}[Symbol.iterator](){return this._impl[Symbol.iterator]()}[Symbol.asyncIterator](){return pj(this,arguments,function*(){yield fj(yield*mj(hj(this[Symbol.iterator]())))})}},zz=class extends Lz{constructor(e){super(e),this._impl=e}readAll(){return uj(this,void 0,void 0,function*(){var e,t,n,r;let i=[];try{for(var a=!0,o=hj(this),s;s=yield o.next(),e=s.done,!e;a=!0){r=s.value,a=!1;let e=r;i.push(e)}}catch(e){t={error:e}}finally{try{!a&&!e&&(n=o.return)&&(yield n.call(o))}finally{if(t)throw t.error}}return i})}[Symbol.iterator](){throw Error(`AsyncRecordBatchStreamReader is not Iterable`)}[Symbol.asyncIterator](){return this._impl[Symbol.asyncIterator]()}},Bz=class extends Rz{constructor(e){super(e),this._impl=e}},Vz=class extends zz{constructor(e){super(e),this._impl=e}},Hz=class{get numDictionaries(){return this._dictionaryIndex}get numRecordBatches(){return this._recordBatchIndex}constructor(e=new Map){this.closed=!1,this.autoDestroy=!0,this._dictionaryIndex=0,this._recordBatchIndex=0,this.dictionaries=e}isSync(){return!1}isAsync(){return!1}isFile(){return!1}isStream(){return!1}reset(e){return this._dictionaryIndex=0,this._recordBatchIndex=0,this.schema=e,this.dictionaries=new Map,this}_loadRecordBatch(e,t){let n=this._loadVectors(e,t,this.schema.fields),r=$I({type:new gP(this.schema.fields),length:e.length,children:n});return new kR(this.schema,r)}_loadDictionaryBatch(e,t){let{id:n,isDelta:r}=e,{dictionaries:i,schema:a}=this,o=i.get(n),s=a.dictionaries.get(n),c=this._loadVectors(e.data,t,[s]);return(o&&r?o.concat(new CL(c)):new CL(c)).memoize()}_loadVectors(e,t,n){return new tR(t,e.nodes,e.buffers,this.dictionaries,this.schema.metadataVersion).visitMany(n)}},Uz=class extends Hz{constructor(e,t){super(t),this._reader=Dj(e)?new kz(this._handle=e):new Dz(this._handle=e)}isSync(){return!0}isStream(){return!0}[Symbol.iterator](){return this}cancel(){!this.closed&&(this.closed=!0)&&(this.reset()._reader.return(),this._reader=null,this.dictionaries=null)}open(e){return this.closed||(this.autoDestroy=Jz(this,e),(this.schema||=this._reader.readSchema())||this.cancel()),this}throw(e){return!this.closed&&this.autoDestroy&&(this.closed=!0)?this.reset()._reader.throw(e):IL}return(e){return!this.closed&&this.autoDestroy&&(this.closed=!0)?this.reset()._reader.return(e):IL}next(){if(this.closed)return IL;let e,{_reader:t}=this;for(;e=this._readNextMessageAndValidate();)if(e.isSchema())this.reset(e.header());else if(e.isRecordBatch()){this._recordBatchIndex++;let n=e.header(),r=t.readMessageBody(e.bodyLength),i=this._loadRecordBatch(n,r);return{done:!1,value:i}}else if(e.isDictionaryBatch()){this._dictionaryIndex++;let n=e.header(),r=t.readMessageBody(e.bodyLength),i=this._loadDictionaryBatch(n,r);this.dictionaries.set(n.id,i)}return this.schema&&this._recordBatchIndex===0?(this._recordBatchIndex++,{done:!1,value:new MR(this.schema)}):this.return()}_readNextMessageAndValidate(e){return this._reader.readMessage(e)}},Wz=class extends Hz{constructor(e,t){super(t),this._reader=new Oz(this._handle=e)}isAsync(){return!0}isStream(){return!0}[Symbol.asyncIterator](){return this}cancel(){return uj(this,void 0,void 0,function*(){!this.closed&&(this.closed=!0)&&(yield this.reset()._reader.return(),this._reader=null,this.dictionaries=null)})}open(e){return uj(this,void 0,void 0,function*(){return this.closed||(this.autoDestroy=Jz(this,e),(this.schema||=yield this._reader.readSchema())||(yield this.cancel())),this})}throw(e){return uj(this,void 0,void 0,function*(){return!this.closed&&this.autoDestroy&&(this.closed=!0)?yield this.reset()._reader.throw(e):IL})}return(e){return uj(this,void 0,void 0,function*(){return!this.closed&&this.autoDestroy&&(this.closed=!0)?yield this.reset()._reader.return(e):IL})}next(){return uj(this,void 0,void 0,function*(){if(this.closed)return IL;let e,{_reader:t}=this;for(;e=yield this._readNextMessageAndValidate();)if(e.isSchema())yield this.reset(e.header());else if(e.isRecordBatch()){this._recordBatchIndex++;let n=e.header(),r=yield t.readMessageBody(e.bodyLength),i=this._loadRecordBatch(n,r);return{done:!1,value:i}}else if(e.isDictionaryBatch()){this._dictionaryIndex++;let n=e.header(),r=yield t.readMessageBody(e.bodyLength),i=this._loadDictionaryBatch(n,r);this.dictionaries.set(n.id,i)}return this.schema&&this._recordBatchIndex===0?(this._recordBatchIndex++,{done:!1,value:new MR(this.schema)}):yield this.return()})}_readNextMessageAndValidate(e){return uj(this,void 0,void 0,function*(){return yield this._reader.readMessage(e)})}},Gz=class extends Uz{get footer(){return this._footer}get numDictionaries(){return this._footer?this._footer.numDictionaries:0}get numRecordBatches(){return this._footer?this._footer.numRecordBatches:0}constructor(e,t){super(e instanceof GL?e:new GL(e),t)}isSync(){return!0}isFile(){return!0}open(e){if(!this.closed&&!this._footer){this.schema=(this._footer=this._readFooter()).schema;for(let e of this._footer.dictionaryBatches())e&&this._readDictionaryBatch(this._dictionaryIndex++)}return super.open(e)}readRecordBatch(e){var t;if(this.closed)return null;this._footer||this.open();let n=(t=this._footer)?.getRecordBatch(e);if(n&&this._handle.seek(n.offset)){let e=this._reader.readMessage(rN.RecordBatch);if(e?.isRecordBatch()){let t=e.header(),n=this._reader.readMessageBody(e.bodyLength),r=this._loadRecordBatch(t,n);return r}}return null}_readDictionaryBatch(e){var t;let n=(t=this._footer)?.getDictionaryBatch(e);if(n&&this._handle.seek(n.offset)){let e=this._reader.readMessage(rN.DictionaryBatch);if(e?.isDictionaryBatch()){let t=e.header(),n=this._reader.readMessageBody(e.bodyLength),r=this._loadDictionaryBatch(t,n);this.dictionaries.set(t.id,r)}}}_readFooter(){let{_handle:e}=this,t=e.size-Fz,n=e.readInt32(t),r=e.readAt(t-n,n);return NL.decode(r)}_readNextMessageAndValidate(e){var t;if(this._footer||this.open(),this._footer&&this._recordBatchIndexsuper.open}});return uj(this,void 0,void 0,function*(){if(!this.closed&&!this._footer){this.schema=(this._footer=yield this._readFooter()).schema;for(let e of this._footer.dictionaryBatches())e&&(yield this._readDictionaryBatch(this._dictionaryIndex++))}return yield t.open.call(this,e)})}readRecordBatch(e){return uj(this,void 0,void 0,function*(){var t;if(this.closed)return null;this._footer||(yield this.open());let n=(t=this._footer)?.getRecordBatch(e);if(n&&(yield this._handle.seek(n.offset))){let e=yield this._reader.readMessage(rN.RecordBatch);if(e?.isRecordBatch()){let t=e.header(),n=yield this._reader.readMessageBody(e.bodyLength),r=this._loadRecordBatch(t,n);return r}}return null})}_readDictionaryBatch(e){return uj(this,void 0,void 0,function*(){var t;let n=(t=this._footer)?.getDictionaryBatch(e);if(n&&(yield this._handle.seek(n.offset))){let e=yield this._reader.readMessage(rN.DictionaryBatch);if(e?.isDictionaryBatch()){let t=e.header(),n=yield this._reader.readMessageBody(e.bodyLength),r=this._loadDictionaryBatch(t,n);this.dictionaries.set(t.id,r)}}})}_readFooter(){return uj(this,void 0,void 0,function*(){let{_handle:e}=this;e._pending&&(yield e._pending);let t=e.size-Fz,n=yield e.readInt32(t),r=yield e.readAt(t-n,n);return NL.decode(r)})}_readNextMessageAndValidate(e){return uj(this,void 0,void 0,function*(){if(this._footer||(yield this.open()),this._footer&&this._recordBatchIndex=4?Nz(t)?new Bz(new Gz(e.read())):new Rz(new Uz(e)):new Rz(new Uz(function*(){}()))}function $z(e){return uj(this,void 0,void 0,function*(){let t=yield e.peek(Pz+7&-8);return t&&t.byteLength>=4?Nz(t)?new Bz(new Gz(yield e.read())):new zz(new Wz(e)):new zz(new Wz(function(){return pj(this,arguments,function*(){})}()))})}function eB(e){return uj(this,void 0,void 0,function*(){let{size:t}=yield e.stat(),n=new KL(e,t);return t>=Iz&&Nz(yield n.readAt(0,Pz+7&-8))?new Vz(new Kz(n)):new zz(new Wz(n))})}var tB=class e extends wP{static assemble(...t){let n=e=>e.flatMap(e=>Array.isArray(e)?n(e):e instanceof kR?e.data.children:e.data),r=new e;return r.visitMany(n(t)),r}constructor(){super(),this._byteLength=0,this._nodes=[],this._buffers=[],this._bufferRegions=[]}visit(e){if(e instanceof CL)return this.visitMany(e.data),this;let{type:t}=e;if(!UN.isDictionary(t)){let{length:n}=e;if(n>2147483647)throw RangeError(`Cannot write arrays larger than 2^31 - 1 in length`);if(UN.isUnion(t))this.nodes.push(new ez(n,0));else{let{nullCount:r}=e;UN.isNull(t)||nB.call(this,r<=0?new Uint8Array:UI(e.offset,n,e.nullBitmap)),this.nodes.push(new ez(n,r))}}return super.visit(e)}visitNull(e){return this}visitDictionary(e){return this.visit(e.clone(e.type.indices))}get nodes(){return this._nodes}get buffers(){return this._buffers}get byteLength(){return this._byteLength}get bufferRegions(){return this._bufferRegions}};function nB(e){let t=e.byteLength+7&-8;return this.buffers.push(e),this.bufferRegions.push(new $R(this._byteLength,t)),this._byteLength+=t,this}function rB(e){var t;let{type:n,length:r,typeIds:i,valueOffsets:a}=e;if(nB.call(this,i),n.mode===sM.Sparse)return cB.call(this,e);if(n.mode===sM.Dense){if(e.offset<=0)return nB.call(this,a),cB.call(this,e);{let o=new Int32Array(r),s=Object.create(null),c=Object.create(null);for(let e,n,l=-1;++l{let i=n.typeIds[t],a=s[i],o=c[i];return e.slice(a,Math.min(r,o))}))}}return this}function iB(e){let t;return e.nullCount>=e.length?nB.call(this,new Uint8Array):(t=e.values)instanceof Uint8Array?nB.call(this,UI(e.offset,e.length,t)):nB.call(this,WI(e.values))}function aB(e){return nB.call(this,e.values.subarray(0,e.length*e.stride))}function oB(e){let{length:t,values:n,valueOffsets:r}=e,i=sN(r[0]),a=sN(r[t]),o=Math.min(a-i,n.byteLength-i);return nB.call(this,Xj(-i,t+1,r)),nB.call(this,n.subarray(i,i+o)),this}function sB(e){let{length:t,valueOffsets:n}=e;if(n){let{0:r,[t]:i}=n;return nB.call(this,Xj(-r,t+1,n)),this.visit(e.children[0].slice(r,i-r))}return this.visit(e.children[0])}function cB(e){return this.visitMany(e.type.children.map((t,n)=>e.children[n]).filter(Boolean))[0]}tB.prototype.visitBool=iB,tB.prototype.visitInt=aB,tB.prototype.visitFloat=aB,tB.prototype.visitUtf8=oB,tB.prototype.visitLargeUtf8=oB,tB.prototype.visitBinary=oB,tB.prototype.visitLargeBinary=oB,tB.prototype.visitFixedSizeBinary=aB,tB.prototype.visitDate=aB,tB.prototype.visitTimestamp=aB,tB.prototype.visitTime=aB,tB.prototype.visitDecimal=aB,tB.prototype.visitList=sB,tB.prototype.visitStruct=cB,tB.prototype.visitUnion=rB,tB.prototype.visitInterval=aB,tB.prototype.visitDuration=aB,tB.prototype.visitFixedSizeList=sB,tB.prototype.visitMap=sB;var lB=class extends RL{static throughNode(e){throw Error(`"throughNode" not available in this environment`)}static throughDOM(e,t){throw Error(`"throughDOM" not available in this environment`)}constructor(e){super(),this._position=0,this._started=!1,this._sink=new BL,this._schema=null,this._dictionaryBlocks=[],this._recordBatchBlocks=[],this._seenDictionaries=new Map,this._dictionaryDeltaOffsets=new Map,Cj(e)||(e={autoDestroy:!0,writeLegacyIpcFormat:!1}),this._autoDestroy=typeof e.autoDestroy==`boolean`?e.autoDestroy:!0,this._writeLegacyIpcFormat=typeof e.writeLegacyIpcFormat==`boolean`?e.writeLegacyIpcFormat:!1}toString(e=!1){return this._sink.toString(e)}toUint8Array(e=!1){return this._sink.toUint8Array(e)}writeAll(e){return wj(e)?e.then(e=>this.writeAll(e)):Ej(e)?pB(this,e):fB(this,e)}get closed(){return this._sink.closed}[Symbol.asyncIterator](){return this._sink[Symbol.asyncIterator]()}toDOMStream(e){return this._sink.toDOMStream(e)}toNodeStream(e){return this._sink.toNodeStream(e)}close(){return this.reset()._sink.close()}abort(e){return this.reset()._sink.abort(e)}finish(){return this._autoDestroy?this.close():this.reset(this._sink,this._schema),this}reset(e=this._sink,t=null){return e===this._sink||e instanceof BL?this._sink=e:(this._sink=new BL,e&&Mj(e)?this.toDOMStream({type:`bytes`}).pipeTo(e):e&&Pj(e)&&this.toNodeStream({objectMode:!1}).pipe(e)),this._started&&this._schema&&this._writeFooter(this._schema),this._started=!1,this._dictionaryBlocks=[],this._recordBatchBlocks=[],this._seenDictionaries=new Map,this._dictionaryDeltaOffsets=new Map,(!t||!SR(t,this._schema))&&(t==null?(this._position=0,this._schema=null):(this._started=!0,this._schema=t,this._writeSchema(t))),this}write(e){let t=null;if(this._sink){if(e==null||e instanceof DR&&!(t=e.schema)||e instanceof kR&&!(t=e.schema))return this.finish()&&void 0}else throw Error(`RecordBatchWriter is closed`);if(t&&!SR(t,this._schema)){if(this._started&&this._autoDestroy)return this.close();this.reset(this._sink,t)}e instanceof kR?e instanceof MR||this._writeRecordBatch(e):e instanceof DR?this.writeAll(e.batches):Tj(e)&&this.writeAll(e)}_writeMessage(e,t=8){let n=t-1,r=XR.encode(e),i=r.byteLength,a=this._writeLegacyIpcFormat?4:8,o=i+a+n&~n,s=o-i-a;return e.headerType===rN.RecordBatch?this._recordBatchBlocks.push(new FL(o,e.bodyLength,this._position)):e.headerType===rN.DictionaryBatch&&this._dictionaryBlocks.push(new FL(o,e.bodyLength,this._position)),this._writeLegacyIpcFormat||this._write(Int32Array.of(-1)),this._write(Int32Array.of(o-a)),i>0&&this._write(r),this._writePadding(s)}_write(e){if(this._started){let t=Wj(e);t&&t.byteLength>0&&(this._sink.write(t),this._position+=t.byteLength)}return this}_writeSchema(e){return this._writeMessage(XR.from(e))}_writeFooter(e){return this._writeLegacyIpcFormat?this._write(Int32Array.of(0)):this._write(Int32Array.of(-1,0))}_writeMagic(){return this._write(Mz)}_writePadding(e){return e>0?this._write(new Uint8Array(e)):this}_writeRecordBatch(e){let{byteLength:t,nodes:n,bufferRegions:r,buffers:i}=tB.assemble(e),a=new ZR(e.numRows,n,r),o=XR.from(a,t);return this._writeDictionaries(e)._writeMessage(o)._writeBodyBuffers(i)}_writeDictionaryBatch(e,t,n=!1){let{byteLength:r,nodes:i,bufferRegions:a,buffers:o}=tB.assemble(new CL([e])),s=new ZR(e.length,i,a),c=new QR(s,t,n),l=XR.from(c,r);return this._writeMessage(l)._writeBodyBuffers(o)}_writeBodyBuffers(e){let t,n,r;for(let i=-1,a=e.length;++i0&&(this._write(t),(r=(n+7&-8)-n)>0&&this._writePadding(r));return this}_writeDictionaries(e){var t,n;for(let[r,i]of e.dictionaries){let e=(t=i?.data)??[],a=this._seenDictionaries.get(r),o=(n=this._dictionaryDeltaOffsets.get(r))??0;if(!a||a.data[0]!==e[0])for(let[t,n]of e.entries())this._writeDictionaryBatch(n,r,t>0);else if(or.writeAll(e)):Ej(t)?pB(r,t):fB(r,t)}},dB=class e extends lB{static writeAll(t){let n=new e;return wj(t)?t.then(e=>n.writeAll(e)):Ej(t)?pB(n,t):fB(n,t)}constructor(){super(),this._autoDestroy=!0}_writeSchema(e){return this._writeMagic()._writePadding(2)}_writeDictionaryBatch(e,t,n=!1){if(!n&&this._seenDictionaries.has(t))throw Error(`The Arrow File format does not support replacement dictionaries. `);return super._writeDictionaryBatch(e,t,n)}_writeFooter(e){let t=NL.encode(new NL(e,oM.V5,this._recordBatchBlocks,this._dictionaryBlocks));return super._writeFooter(e)._write(t)._write(Int32Array.of(t.byteLength))._writeMagic()}};function fB(e,t){let n=t;t instanceof DR&&(n=t.batches,e.reset(void 0,t.schema));for(let t of n)e.write(t);return e.finish()}function pB(e,t){return uj(this,void 0,void 0,function*(){var n,r,i,a,o,s,c;try{for(n=!0,r=hj(t);i=yield r.next(),a=i.done,!a;n=!0){c=i.value,n=!1;let t=c;e.write(t)}}catch(e){o={error:e}}finally{try{!n&&!a&&(s=r.return)&&(yield s.call(r))}finally{if(o)throw o.error}}return e.finish()})}function mB(e,t=`stream`){return(t===`stream`?uB:dB).writeAll(e).toUint8Array(!0)}var hB=Object.create,gB=Object.defineProperty,_B=Object.getOwnPropertyDescriptor,vB=Object.getOwnPropertyNames,yB=Object.getPrototypeOf,bB=Object.prototype.hasOwnProperty,xB=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),SB=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let i of vB(t))!bB.call(e,i)&&i!==n&&gB(e,i,{get:()=>t[i],enumerable:!(r=_B(t,i))||r.enumerable});return e},CB=(e,t,n)=>(n=e==null?{}:hB(yB(e)),SB(t||!e||!e.__esModule?gB(n,`default`,{value:e,enumerable:!0}):n,e)),wB=xB((e,t)=>{t.exports=Worker}),TB=(e=>(e[e.UNDEFINED=0]=`UNDEFINED`,e[e.AUTOMATIC=1]=`AUTOMATIC`,e[e.READ_ONLY=2]=`READ_ONLY`,e[e.READ_WRITE=3]=`READ_WRITE`,e))(TB||{}),EB=(e=>(e[e.IDENTIFIER=0]=`IDENTIFIER`,e[e.NUMERIC_CONSTANT=1]=`NUMERIC_CONSTANT`,e[e.STRING_CONSTANT=2]=`STRING_CONSTANT`,e[e.OPERATOR=3]=`OPERATOR`,e[e.KEYWORD=4]=`KEYWORD`,e[e.COMMENT=5]=`COMMENT`,e))(EB||{}),DB=(e=>(e[e.NONE=0]=`NONE`,e[e.DEBUG=1]=`DEBUG`,e[e.INFO=2]=`INFO`,e[e.WARNING=3]=`WARNING`,e[e.ERROR=4]=`ERROR`,e))(DB||{}),OB=(e=>(e[e.NONE=0]=`NONE`,e[e.CONNECT=1]=`CONNECT`,e[e.DISCONNECT=2]=`DISCONNECT`,e[e.OPEN=3]=`OPEN`,e[e.QUERY=4]=`QUERY`,e[e.INSTANTIATE=5]=`INSTANTIATE`,e))(OB||{}),kB=(e=>(e[e.NONE=0]=`NONE`,e[e.OK=1]=`OK`,e[e.ERROR=2]=`ERROR`,e[e.START=3]=`START`,e[e.RUN=4]=`RUN`,e[e.CAPTURE=5]=`CAPTURE`,e))(kB||{}),AB=(e=>(e[e.NONE=0]=`NONE`,e[e.WEB_WORKER=1]=`WEB_WORKER`,e[e.NODE_WORKER=2]=`NODE_WORKER`,e[e.BINDINGS=3]=`BINDINGS`,e[e.ASYNC_DUCKDB=4]=`ASYNC_DUCKDB`,e))(AB||{}),jB=class{log(e){}},MB=class{constructor(e=2){this.level=e}log(e){e.level>=this.level&&console.log(e)}},NB=(e=>(e[e.SUCCESS=0]=`SUCCESS`,e))(NB||{}),PB=class{constructor(e,t){this._bindings=e,this._conn=t}get bindings(){return this._bindings}async close(){return this._bindings.disconnect(this._conn)}useUnsafe(e){return e(this._bindings,this._conn)}async query(e){this._bindings.logger.log({timestamp:new Date,level:2,origin:4,topic:4,event:4,value:e});let t=await this._bindings.runQuery(this._conn,e),n=Lz.from(t);return console.assert(n.isSync(),`Reader is not sync`),console.assert(n.isFile(),`Reader is not file`),new DR(n)}async send(e,t=!1){this._bindings.logger.log({timestamp:new Date,level:2,origin:4,topic:4,event:4,value:e});let n=await this._bindings.startPendingQuery(this._conn,e,t);for(;n==null;)n=await this._bindings.pollPendingQuery(this._conn);let r=new FB(this._bindings,this._conn,n),i=await Lz.from(r);return console.assert(i.isAsync()),console.assert(i.isStream()),i}async cancelSent(){return await this._bindings.cancelPendingQuery(this._conn)}async getTableNames(e){return await this._bindings.getTableNames(this._conn,e)}async prepare(e){let t=await this._bindings.createPrepared(this._conn,e);return new IB(this._bindings,this._conn,t)}async insertArrowTable(e,t){let n=mB(e,`stream`);await this.insertArrowFromIPCStream(n,t)}async insertArrowFromIPCStream(e,t){await this._bindings.insertArrowFromIPCStream(this._conn,e,t)}async insertCSVFromPath(e,t){await this._bindings.insertCSVFromPath(this._conn,e,t)}async insertJSONFromPath(e,t){await this._bindings.insertJSONFromPath(this._conn,e,t)}},FB=class{constructor(e,t,n){this.db=e,this.conn=t,this.header=n,this._first=!0,this._depleted=!1,this._inFlight=null}async next(){if(this._first)return this._first=!1,{done:!1,value:this.header};if(this._depleted)return{done:!0,value:null};let e;return this._inFlight==null?e=await this.db.fetchQueryResults(this.conn):(e=await this._inFlight,this._inFlight=null),this._depleted=e.length==0,this._depleted||(this._inFlight=this.db.fetchQueryResults(this.conn)),{done:this._depleted,value:e}}[Symbol.asyncIterator](){return this}},IB=class{constructor(e,t,n){this.bindings=e,this.connectionId=t,this.statementId=n}async close(){await this.bindings.closePrepared(this.connectionId,this.statementId)}async query(...e){let t=await this.bindings.runPrepared(this.connectionId,this.statementId,e),n=Lz.from(t);return console.assert(n.isSync()),console.assert(n.isFile()),new DR(n)}async send(...e){let t=await this.bindings.sendPrepared(this.connectionId,this.statementId,e),n=new FB(this.bindings,this.connectionId,t),r=await Lz.from(n);return console.assert(r.isAsync()),console.assert(r.isStream()),r}},LB=(e=>(e.CANCEL_PENDING_QUERY=`CANCEL_PENDING_QUERY`,e.CLOSE_PREPARED=`CLOSE_PREPARED`,e.COLLECT_FILE_STATISTICS=`COLLECT_FILE_STATISTICS`,e.REGISTER_OPFS_FILE_NAME=`REGISTER_OPFS_FILE_NAME`,e.CONNECT=`CONNECT`,e.COPY_FILE_TO_BUFFER=`COPY_FILE_TO_BUFFER`,e.COPY_FILE_TO_PATH=`COPY_FILE_TO_PATH`,e.CREATE_PREPARED=`CREATE_PREPARED`,e.DISCONNECT=`DISCONNECT`,e.DROP_FILE=`DROP_FILE`,e.DROP_FILES=`DROP_FILES`,e.EXPORT_FILE_STATISTICS=`EXPORT_FILE_STATISTICS`,e.FETCH_QUERY_RESULTS=`FETCH_QUERY_RESULTS`,e.FLUSH_FILES=`FLUSH_FILES`,e.GET_FEATURE_FLAGS=`GET_FEATURE_FLAGS`,e.GET_TABLE_NAMES=`GET_TABLE_NAMES`,e.GET_VERSION=`GET_VERSION`,e.GLOB_FILE_INFOS=`GLOB_FILE_INFOS`,e.INSERT_ARROW_FROM_IPC_STREAM=`INSERT_ARROW_FROM_IPC_STREAM`,e.INSERT_CSV_FROM_PATH=`IMPORT_CSV_FROM_PATH`,e.INSERT_JSON_FROM_PATH=`IMPORT_JSON_FROM_PATH`,e.INSTANTIATE=`INSTANTIATE`,e.OPEN=`OPEN`,e.PING=`PING`,e.POLL_PENDING_QUERY=`POLL_PENDING_QUERY`,e.REGISTER_FILE_BUFFER=`REGISTER_FILE_BUFFER`,e.REGISTER_FILE_HANDLE=`REGISTER_FILE_HANDLE`,e.REGISTER_FILE_URL=`REGISTER_FILE_URL`,e.RESET=`RESET`,e.RUN_PREPARED=`RUN_PREPARED`,e.RUN_QUERY=`RUN_QUERY`,e.SEND_PREPARED=`SEND_PREPARED`,e.START_PENDING_QUERY=`START_PENDING_QUERY`,e.TOKENIZE=`TOKENIZE`,e))(LB||{}),RB=(e=>(e.CONNECTION_INFO=`CONNECTION_INFO`,e.ERROR=`ERROR`,e.FEATURE_FLAGS=`FEATURE_FLAGS`,e.FILE_BUFFER=`FILE_BUFFER`,e.FILE_INFOS=`FILE_INFOS`,e.FILE_SIZE=`FILE_SIZE`,e.FILE_STATISTICS=`FILE_STATISTICS`,e.INSTANTIATE_PROGRESS=`INSTANTIATE_PROGRESS`,e.LOG=`LOG`,e.OK=`OK`,e.PREPARED_STATEMENT_ID=`PREPARED_STATEMENT_ID`,e.QUERY_PLAN=`QUERY_PLAN`,e.QUERY_RESULT=`QUERY_RESULT`,e.QUERY_RESULT_CHUNK=`QUERY_RESULT_CHUNK`,e.QUERY_RESULT_HEADER=`QUERY_RESULT_HEADER`,e.QUERY_RESULT_HEADER_OR_NULL=`QUERY_RESULT_HEADER_OR_NULL`,e.REGISTERED_FILE=`REGISTERED_FILE`,e.SCRIPT_TOKENS=`SCRIPT_TOKENS`,e.SUCCESS=`SUCCESS`,e.TABLE_NAMES=`TABLE_NAMES`,e.VERSION_STRING=`VERSION_STRING`,e))(RB||{}),zB=class{constructor(e,t){this.promiseResolver=()=>{},this.promiseRejecter=()=>{},this.type=e,this.data=t,this.promise=new Promise((e,t)=>{this.promiseResolver=e,this.promiseRejecter=t})}};function BB(e){switch(e.typeId){case Y.Binary:return{sqlType:`binary`};case Y.Bool:return{sqlType:`bool`};case Y.Date:return{sqlType:`date`};case Y.DateDay:return{sqlType:`date32[d]`};case Y.DateMillisecond:return{sqlType:`date64[ms]`};case Y.Decimal:{let t=e;return{sqlType:`decimal`,precision:t.precision,scale:t.scale}}case Y.Float:return{sqlType:`float`};case Y.Float16:return{sqlType:`float16`};case Y.Float32:return{sqlType:`float32`};case Y.Float64:return{sqlType:`float64`};case Y.Int:return{sqlType:`int32`};case Y.Int16:return{sqlType:`int16`};case Y.Int32:return{sqlType:`int32`};case Y.Int64:return{sqlType:`int64`};case Y.Uint16:return{sqlType:`uint16`};case Y.Uint32:return{sqlType:`uint32`};case Y.Uint64:return{sqlType:`uint64`};case Y.Uint8:return{sqlType:`uint8`};case Y.IntervalDayTime:return{sqlType:`interval[dt]`};case Y.IntervalYearMonth:return{sqlType:`interval[m]`};case Y.List:return{sqlType:`list`,valueType:BB(e.valueType)};case Y.FixedSizeBinary:return{sqlType:`fixedsizebinary`,byteWidth:e.byteWidth};case Y.Null:return{sqlType:`null`};case Y.Utf8:return{sqlType:`utf8`};case Y.Struct:return{sqlType:`struct`,fields:e.children.map(e=>VB(e.name,e.type))};case Y.Map:{let t=e;return{sqlType:`map`,keyType:BB(t.keyType),valueType:BB(t.valueType)}}case Y.Time:return{sqlType:`time[s]`};case Y.TimeMicrosecond:return{sqlType:`time[us]`};case Y.TimeMillisecond:return{sqlType:`time[ms]`};case Y.TimeNanosecond:return{sqlType:`time[ns]`};case Y.TimeSecond:return{sqlType:`time[s]`};case Y.Timestamp:return{sqlType:`timestamp`,timezone:e.timezone||void 0};case Y.TimestampSecond:return{sqlType:`timestamp[s]`,timezone:e.timezone||void 0};case Y.TimestampMicrosecond:return{sqlType:`timestamp[us]`,timezone:e.timezone||void 0};case Y.TimestampNanosecond:return{sqlType:`timestamp[ns]`,timezone:e.timezone||void 0};case Y.TimestampMillisecond:return{sqlType:`timestamp[ms]`,timezone:e.timezone||void 0}}throw Error(`unsupported arrow type: ${e.toString()}`)}function VB(e,t){let n=BB(t);return n.name=e,n}var HB=new TextEncoder,UB=class{constructor(e,t=null){this._onInstantiationProgress=[],this._worker=null,this._workerShutdownPromise=null,this._workerShutdownResolver=()=>{},this._nextMessageId=0,this._pendingRequests=new Map,this._logger=e,this._onMessageHandler=this.onMessage.bind(this),this._onErrorHandler=this.onError.bind(this),this._onCloseHandler=this.onClose.bind(this),t!=null&&this.attach(t)}get logger(){return this._logger}attach(e){this._worker=e,this._worker.addEventListener(`message`,this._onMessageHandler),this._worker.addEventListener(`error`,this._onErrorHandler),this._worker.addEventListener(`close`,this._onCloseHandler),this._workerShutdownPromise=new Promise((e,t)=>{this._workerShutdownResolver=e})}detach(){this._worker&&(this._worker.removeEventListener(`message`,this._onMessageHandler),this._worker.removeEventListener(`error`,this._onErrorHandler),this._worker.removeEventListener(`close`,this._onCloseHandler),this._worker=null,this._workerShutdownResolver(null),this._workerShutdownPromise=null,this._workerShutdownResolver=()=>{})}async terminate(){this._worker&&(this._worker.terminate(),this._worker=null,this._workerShutdownPromise=null,this._workerShutdownResolver=()=>{})}async postTask(e,t=[]){if(!this._worker){console.error(`cannot send a message since the worker is not set!`);return}let n=this._nextMessageId++;return this._pendingRequests.set(n,e),this._worker.postMessage({messageId:n,type:e.type,data:e.data},t),await e.promise}onMessage(e){var t;let n=e.data;switch(n.type){case`LOG`:this._logger.log(n.data);return;case`INSTANTIATE_PROGRESS`:for(let e of this._onInstantiationProgress)e(n.data);return}let r=this._pendingRequests.get(n.requestId);if(!r){console.warn(`unassociated response: [${n.requestId}, ${n.type.toString()}]`);return}if(this._pendingRequests.delete(n.requestId),n.type==`ERROR`){let e=Error(n.data.message);e.name=n.data.name,(t=Object.getOwnPropertyDescriptor(e,`stack`))!=null&&t.writable&&(e.stack=n.data.stack),r.promiseRejecter(e);return}switch(r.type){case`CLOSE_PREPARED`:case`COLLECT_FILE_STATISTICS`:case`REGISTER_OPFS_FILE_NAME`:case`COPY_FILE_TO_PATH`:case`DISCONNECT`:case`DROP_FILE`:case`DROP_FILES`:case`FLUSH_FILES`:case`INSERT_ARROW_FROM_IPC_STREAM`:case`IMPORT_CSV_FROM_PATH`:case`IMPORT_JSON_FROM_PATH`:case`OPEN`:case`PING`:case`REGISTER_FILE_BUFFER`:case`REGISTER_FILE_HANDLE`:case`REGISTER_FILE_URL`:case`RESET`:if(n.type==`OK`){r.promiseResolver(n.data);return}break;case`INSTANTIATE`:if(this._onInstantiationProgress=[],n.type==`OK`){r.promiseResolver(n.data);return}break;case`GLOB_FILE_INFOS`:if(n.type==`FILE_INFOS`){r.promiseResolver(n.data);return}break;case`GET_VERSION`:if(n.type==`VERSION_STRING`){r.promiseResolver(n.data);return}break;case`GET_FEATURE_FLAGS`:if(n.type==`FEATURE_FLAGS`){r.promiseResolver(n.data);return}break;case`GET_TABLE_NAMES`:if(n.type==`TABLE_NAMES`){r.promiseResolver(n.data);return}break;case`TOKENIZE`:if(n.type==`SCRIPT_TOKENS`){r.promiseResolver(n.data);return}break;case`COPY_FILE_TO_BUFFER`:if(n.type==`FILE_BUFFER`){r.promiseResolver(n.data);return}break;case`EXPORT_FILE_STATISTICS`:if(n.type==`FILE_STATISTICS`){r.promiseResolver(n.data);return}break;case`CONNECT`:if(n.type==`CONNECTION_INFO`){r.promiseResolver(n.data);return}break;case`RUN_PREPARED`:case`RUN_QUERY`:if(n.type==`QUERY_RESULT`){r.promiseResolver(n.data);return}break;case`SEND_PREPARED`:if(n.type==`QUERY_RESULT_HEADER`){r.promiseResolver(n.data);return}break;case`START_PENDING_QUERY`:if(n.type==`QUERY_RESULT_HEADER_OR_NULL`){r.promiseResolver(n.data);return}break;case`POLL_PENDING_QUERY`:if(n.type==`QUERY_RESULT_HEADER_OR_NULL`){r.promiseResolver(n.data);return}break;case`CANCEL_PENDING_QUERY`:if(this._onInstantiationProgress=[],n.type==`SUCCESS`){r.promiseResolver(n.data);return}break;case`FETCH_QUERY_RESULTS`:if(n.type==`QUERY_RESULT_CHUNK`){r.promiseResolver(n.data);return}break;case`CREATE_PREPARED`:if(n.type==`PREPARED_STATEMENT_ID`){r.promiseResolver(n.data);return}break}r.promiseRejecter(Error(`unexpected response type: ${n.type.toString()}`))}onError(e){console.error(e),console.error(`error in duckdb worker: ${e.message}`),this._pendingRequests.clear()}onClose(){if(this._workerShutdownResolver(null),this._pendingRequests.size!=0){console.warn(`worker terminated with ${this._pendingRequests.size} pending requests`);return}this._pendingRequests.clear()}async reset(){let e=new zB(`RESET`,null);return await this.postTask(e)}async ping(){let e=new zB(`PING`,null);await this.postTask(e)}async dropFile(e){let t=new zB(`DROP_FILE`,e);return await this.postTask(t)}async dropFiles(){let e=new zB(`DROP_FILES`,null);return await this.postTask(e)}async flushFiles(){let e=new zB(`FLUSH_FILES`,null);return await this.postTask(e)}async instantiate(e,t=null,n=e=>{}){this._onInstantiationProgress.push(n);let r=new zB(`INSTANTIATE`,[e,t]);return await this.postTask(r)}async getVersion(){let e=new zB(`GET_VERSION`,null);return await this.postTask(e)}async getFeatureFlags(){let e=new zB(`GET_FEATURE_FLAGS`,null);return await this.postTask(e)}async open(e){let t=new zB(`OPEN`,e);await this.postTask(t)}async tokenize(e){let t=new zB(`TOKENIZE`,e);return await this.postTask(t)}async connectInternal(){let e=new zB(`CONNECT`,null);return await this.postTask(e)}async connect(){let e=await this.connectInternal();return new PB(this,e)}async disconnect(e){let t=new zB(`DISCONNECT`,e);await this.postTask(t)}async runQuery(e,t){let n=new zB(`RUN_QUERY`,[e,t]);return await this.postTask(n)}async startPendingQuery(e,t,n=!1){let r=new zB(`START_PENDING_QUERY`,[e,t,n]);return await this.postTask(r)}async pollPendingQuery(e){let t=new zB(`POLL_PENDING_QUERY`,e);return await this.postTask(t)}async cancelPendingQuery(e){let t=new zB(`CANCEL_PENDING_QUERY`,e);return await this.postTask(t)}async fetchQueryResults(e){let t=new zB(`FETCH_QUERY_RESULTS`,e);return await this.postTask(t)}async getTableNames(e,t){let n=new zB(`GET_TABLE_NAMES`,[e,t]);return await this.postTask(n)}async createPrepared(e,t){let n=new zB(`CREATE_PREPARED`,[e,t]);return await this.postTask(n)}async closePrepared(e,t){let n=new zB(`CLOSE_PREPARED`,[e,t]);await this.postTask(n)}async runPrepared(e,t,n){let r=new zB(`RUN_PREPARED`,[e,t,n]);return await this.postTask(r)}async sendPrepared(e,t,n){let r=new zB(`SEND_PREPARED`,[e,t,n]);return await this.postTask(r)}async globFiles(e){let t=new zB(`GLOB_FILE_INFOS`,e);return await this.postTask(t)}async registerFileText(e,t){let n=HB.encode(t);await this.registerFileBuffer(e,n)}async registerFileURL(e,t,n,r){t===void 0&&(t=e);let i=new zB(`REGISTER_FILE_URL`,[e,t,n,r]);await this.postTask(i)}async registerEmptyFileBuffer(e){}async registerFileBuffer(e,t){let n=new zB(`REGISTER_FILE_BUFFER`,[e,t]);await this.postTask(n,[t.buffer])}async registerFileHandle(e,t,n,r){let i=new zB(`REGISTER_FILE_HANDLE`,[e,t,n,r]);await this.postTask(i,[])}async registerOPFSFileName(e){let t=new zB(`REGISTER_OPFS_FILE_NAME`,[e]);await this.postTask(t,[])}async collectFileStatistics(e,t){let n=new zB(`COLLECT_FILE_STATISTICS`,[e,t]);await this.postTask(n,[])}async exportFileStatistics(e){let t=new zB(`EXPORT_FILE_STATISTICS`,e);return await this.postTask(t,[])}async copyFileToBuffer(e){let t=new zB(`COPY_FILE_TO_BUFFER`,e);return await this.postTask(t)}async copyFileToPath(e,t){let n=new zB(`COPY_FILE_TO_PATH`,[e,t]);await this.postTask(n)}async insertArrowFromIPCStream(e,t,n){if(t.length==0)return;let r=new zB(`INSERT_ARROW_FROM_IPC_STREAM`,[e,t,n]);await this.postTask(r,[t.buffer])}async insertCSVFromPath(e,t,n){if(n.columns!==void 0){let e=[];for(let t in n.columns){let r=n.columns[t];e.push(VB(t,r))}n.columnsFlat=e,delete n.columns}let r=new zB(`IMPORT_CSV_FROM_PATH`,[e,t,n]);await this.postTask(r)}async insertJSONFromPath(e,t,n){if(n.columns!==void 0){let e=[];for(let t in n.columns){let r=n.columns[t];e.push(VB(t,r))}n.columnsFlat=e,delete n.columns}let r=new zB(`IMPORT_JSON_FROM_PATH`,[e,t,n]);await this.postTask(r)}};function WB(){let e=new TextDecoder;return t=>(typeof SharedArrayBuffer<`u`&&t.buffer instanceof SharedArrayBuffer&&(t=new Uint8Array(t)),e.decode(t))}var GB=WB(),KB=(e=>(e[e.BUFFER=0]=`BUFFER`,e[e.NODE_FS=1]=`NODE_FS`,e[e.BROWSER_FILEREADER=2]=`BROWSER_FILEREADER`,e[e.BROWSER_FSACCESS=3]=`BROWSER_FSACCESS`,e[e.HTTP=4]=`HTTP`,e[e.S3=5]=`S3`,e))(KB||{}),qB=async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,5,3,1,0,1,10,14,1,12,0,65,0,65,0,65,0,252,10,0,0,11])),JB=async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,10,8,1,6,0,6,64,25,11,11])),YB=async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,5,1,96,0,1,123,3,2,1,0,10,10,1,8,0,65,0,253,15,253,98,11])),XB=()=>(async e=>{try{return typeof MessageChannel<`u`&&new MessageChannel().port1.postMessage(new SharedArrayBuffer(1)),WebAssembly.validate(e)}catch{return!1}})(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,5,4,1,3,1,1,10,11,1,9,0,65,0,254,16,2,0,26,11])),ZB={name:`@duckdb/duckdb-wasm`,version:`1.29.1-dev68.0`,description:`DuckDB powered by WebAssembly`,license:`MIT`,repository:{type:`git`,url:`https://github.com/duckdb/duckdb-wasm.git`},keywords:[`sql`,`duckdb`,`relational`,`database`,`data`,`query`,`wasm`,`analytics`,`olap`,`arrow`,`parquet`,`json`,`csv`],dependencies:{"apache-arrow":`^17.0.0`},devDependencies:{"@types/emscripten":`^1.39.10`,"@types/jasmine":`^5.1.4`,"@typescript-eslint/eslint-plugin":`^6.21.0`,"@typescript-eslint/parser":`^6.21.0`,esbuild:`^0.20.2`,eslint:`^8.57.0`,"eslint-plugin-jasmine":`^4.1.3`,"eslint-plugin-react":`^7.34.0`,"fast-glob":`^3.3.2`,jasmine:`^5.1.0`,"jasmine-core":`^5.1.2`,"jasmine-spec-reporter":`^7.0.0`,"js-sha256":`^0.11.0`,karma:`^6.4.2`,"karma-chrome-launcher":`^3.2.0`,"karma-coverage":`^2.2.1`,"karma-firefox-launcher":`^2.1.3`,"karma-jasmine":`^5.1.0`,"karma-jasmine-html-reporter":`^2.1.0`,"karma-sourcemap-loader":`^0.4.0`,"karma-spec-reporter":`^0.0.36`,"make-dir":`^4.0.0`,nyc:`^15.1.0`,prettier:`^3.2.5`,puppeteer:`^22.8.0`,rimraf:`^5.0.5`,s3rver:`^3.7.1`,typedoc:`^0.25.13`,typescript:`^5.3.3`,"wasm-feature-detect":`^1.6.1`,"web-worker":`^1.2.0`},scripts:{"build:debug":`node bundle.mjs debug && tsc --emitDeclarationOnly`,"build:release":`node bundle.mjs release && tsc --emitDeclarationOnly`,docs:`typedoc`,report:`node ./coverage.mjs`,"test:node":`node --enable-source-maps ../../node_modules/jasmine/bin/jasmine ./dist/tests-node.cjs`,"test:node:debug":`node --inspect-brk --enable-source-maps ../../node_modules/jasmine/bin/jasmine ./dist/tests-node.cjs`,"test:node:coverage":`nyc -r json --report-dir ./coverage/node node ../../node_modules/jasmine/bin/jasmine ./dist/tests-node.cjs`,"test:firefox":`karma start ./karma/tests-firefox.cjs`,"test:chrome":`karma start ./karma/tests-chrome.cjs`,"test:chrome:eh":`karma start ./karma/tests-chrome-eh.cjs`,"test:chrome:coverage":`karma start ./karma/tests-chrome-coverage.cjs`,"test:browser":`karma start ./karma/tests-all.cjs`,"test:browser:debug":`karma start ./karma/tests-debug.cjs`,test:`npm run test:chrome && npm run test:node`,"test:coverage":`npm run test:chrome:coverage && npm run test:node:coverage && npm run report`,lint:`eslint src test`},files:[`dist`,`!dist/tests-*`,`!dist/duckdb-browser-mvp.worker.js.map`,`!dist/types/test`],main:`dist/duckdb-browser.cjs`,module:`dist/duckdb-browser.mjs`,types:`dist/duckdb-browser.d.ts`,jsdelivr:`dist/duckdb-browser.cjs`,unpkg:`dist/duckdb-browser.mjs`,sideEffects:!1,browser:{fs:!1,path:!1,perf_hooks:!1,os:!1,worker_threads:!1},exports:{"./dist/duckdb-mvp.wasm":`./dist/duckdb-mvp.wasm`,"./dist/duckdb-eh.wasm":`./dist/duckdb-eh.wasm`,"./dist/duckdb-coi.wasm":`./dist/duckdb-coi.wasm`,"./dist/duckdb-browser":`./dist/duckdb-browser.mjs`,"./dist/duckdb-browser.cjs":`./dist/duckdb-browser.cjs`,"./dist/duckdb-browser.mjs":`./dist/duckdb-browser.mjs`,"./dist/duckdb-browser-coi.pthread.worker.js":`./dist/duckdb-browser-coi.pthread.worker.js`,"./dist/duckdb-browser-coi.worker.js":`./dist/duckdb-browser-coi.worker.js`,"./dist/duckdb-browser-eh.worker.js":`./dist/duckdb-browser-eh.worker.js`,"./dist/duckdb-browser-mvp.worker.js":`./dist/duckdb-browser-mvp.worker.js`,"./dist/duckdb-node":`./dist/duckdb-node.cjs`,"./dist/duckdb-node.cjs":`./dist/duckdb-node.cjs`,"./dist/duckdb-node-blocking":`./dist/duckdb-node-blocking.cjs`,"./dist/duckdb-node-blocking.cjs":`./dist/duckdb-node-blocking.cjs`,"./dist/duckdb-node-eh.worker.cjs":`./dist/duckdb-node-eh.worker.cjs`,"./dist/duckdb-node-mvp.worker.cjs":`./dist/duckdb-node-mvp.worker.cjs`,"./blocking":{node:{types:`./dist/duckdb-node-blocking.d.ts`,require:`./dist/duckdb-node-blocking.cjs`,import:`./dist/duckdb-node-blocking.cjs`},types:`./dist/duckdb-node-blocking.d.ts`,import:`./dist/duckdb-node-blocking.mjs`,require:`./dist/duckdb-node-blocking.cjs`},".":{browser:{types:`./dist/duckdb-browser.d.ts`,import:`./dist/duckdb-browser.mjs`,require:`./dist/duckdb-browser.cjs`},node:{types:`./dist/duckdb-node.d.ts`,import:`./dist/duckdb-node.cjs`,require:`./dist/duckdb-node.cjs`},types:`./dist/duckdb-browser.d.ts`,import:`./dist/duckdb-browser.mjs`,require:`./dist/duckdb-browser.cjs`}}},QB=ZB.name,$B=ZB.version,eV=ZB.version.split(`.`),tV=eV[0],nV=eV[1],rV=eV[2],iV=()=>typeof navigator>`u`,aV=()=>iV()?`node`:navigator.userAgent,oV=()=>aV().includes(`Firefox`),sV=()=>/^((?!chrome|android).)*safari/i.test(aV()),cV=null,lV=null,uV=null,dV=null,fV=null;async function pV(){return cV??=typeof BigInt64Array<`u`,lV??=await JB(),uV??=await XB(),dV??=await YB(),fV??=await qB(),{bigInt64Array:cV,crossOriginIsolated:iV()||globalThis.crossOriginIsolated||!1,wasmExceptions:lV,wasmSIMD:dV,wasmThreads:uV,wasmBulkMemory:fV}}async function mV(e){let t=await pV();if(t.wasmExceptions){if(t.wasmSIMD&&t.wasmThreads&&t.crossOriginIsolated&&e.coi)return{mainModule:e.coi.mainModule,mainWorker:e.coi.mainWorker,pthreadWorker:e.coi.pthreadWorker};if(e.eh)return{mainModule:e.eh.mainModule,mainWorker:e.eh.mainWorker,pthreadWorker:null}}return{mainModule:e.mvp.mainModule,mainWorker:e.mvp.mainWorker,pthreadWorker:null}}var hV=CB(wB());const gV=Symbol.for(`constructDateFrom`),_V={},vV={};function yV(e,t){try{let n=_V[e]||(_V[e]=new Intl.DateTimeFormat(`en-GB`,{timeZone:e,hour:`numeric`,timeZoneName:`longOffset`}).format),r=n(t).split(`GMT`)[1]||``;return r in vV?vV[r]:xV(r,r.split(`:`))}catch{if(e in vV)return vV[e];let t=e?.match(bV);return t?xV(e,t.slice(1)):NaN}}const bV=/([+-]\d\d):?(\d\d)?/;function xV(e,t){let n=+t[0],r=+(t[1]||0);return vV[e]=n>0?n*60+r:n*60-r}var SV=class e extends Date{constructor(...e){super(),e.length>1&&typeof e[e.length-1]==`string`&&(this.timeZone=e.pop()),this.internal=new Date,isNaN(yV(this.timeZone,this))?this.setTime(NaN):e.length?typeof e[0]==`number`&&(e.length===1||e.length===2&&typeof e[1]!=`number`)?this.setTime(e[0]):typeof e[0]==`string`?this.setTime(+new Date(e[0])):e[0]instanceof Date?this.setTime(+e[0]):(this.setTime(+new Date(...e)),EV(this,NaN),wV(this)):this.setTime(Date.now())}static tz(t,...n){return n.length?new e(...n,t):new e(Date.now(),t)}withTimeZone(t){return new e(+this,t)}getTimezoneOffset(){return-yV(this.timeZone,this)}setTime(e){return Date.prototype.setTime.apply(this,arguments),wV(this),+this}[Symbol.for(`constructDateFrom`)](t){return new e(+new Date(t),this.timeZone)}};const CV=/^(get|set)(?!UTC)/;Object.getOwnPropertyNames(Date.prototype).forEach(e=>{if(!CV.test(e))return;let t=e.replace(CV,`$1UTC`);SV.prototype[t]&&(e.startsWith(`get`)?SV.prototype[e]=function(){return this.internal[t]()}:(SV.prototype[e]=function(){return Date.prototype[t].apply(this.internal,arguments),TV(this),+this},SV.prototype[t]=function(){return Date.prototype[t].apply(this,arguments),wV(this),+this}))});function wV(e){e.internal.setTime(+e),e.internal.setUTCMinutes(e.internal.getUTCMinutes()-e.getTimezoneOffset())}function TV(e){Date.prototype.setFullYear.call(e,e.internal.getUTCFullYear(),e.internal.getUTCMonth(),e.internal.getUTCDate()),Date.prototype.setHours.call(e,e.internal.getUTCHours(),e.internal.getUTCMinutes(),e.internal.getUTCSeconds(),e.internal.getUTCMilliseconds()),EV(e)}function EV(e){let t=yV(e.timeZone,e),n=new Date(+e);n.setUTCHours(n.getUTCHours()-1);let r=-new Date(+e).getTimezoneOffset(),i=-new Date(+n).getTimezoneOffset(),a=r-i,o=Date.prototype.getHours.apply(e)!==e.internal.getUTCHours();a&&o&&e.internal.setUTCMinutes(e.internal.getUTCMinutes()+a);let s=r-t;s&&Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+s);let c=yV(e.timeZone,e),l=-new Date(+e).getTimezoneOffset(),u=l-c,d=c!==t,f=u-s;if(d&&f){Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+f);let t=yV(e.timeZone,e),n=c-t;n&&(e.internal.setUTCMinutes(e.internal.getUTCMinutes()+n),Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+n))}}var DV=class e extends SV{static tz(t,...n){return n.length?new e(...n,t):new e(Date.now(),t)}toISOString(){let[e,t,n]=this.tzComponents(),r=`${e}${t}:${n}`;return this.internal.toISOString().slice(0,-1)+r}toString(){return`${this.toDateString()} ${this.toTimeString()}`}toDateString(){let[e,t,n,r]=this.internal.toUTCString().split(` `);return`${e?.slice(0,-1)} ${n} ${t} ${r}`}toTimeString(){let e=this.internal.toUTCString().split(` `)[4],[t,n,r]=this.tzComponents();return`${e} GMT${t}${n}${r} (${OV(this.timeZone,this)})`}toLocaleString(e,t){return Date.prototype.toLocaleString.call(this,e,{...t,timeZone:t?.timeZone||this.timeZone})}toLocaleDateString(e,t){return Date.prototype.toLocaleDateString.call(this,e,{...t,timeZone:t?.timeZone||this.timeZone})}toLocaleTimeString(e,t){return Date.prototype.toLocaleTimeString.call(this,e,{...t,timeZone:t?.timeZone||this.timeZone})}tzComponents(){let e=this.getTimezoneOffset(),t=e>0?`-`:`+`,n=String(Math.floor(Math.abs(e)/60)).padStart(2,`0`),r=String(Math.abs(e)%60).padStart(2,`0`);return[t,n,r]}withTimeZone(t){return new e(+this,t)}[Symbol.for(`constructDateFrom`)](t){return new e(+new Date(t),this.timeZone)}};function OV(e,t){return new Intl.DateTimeFormat(`en-GB`,{timeZone:e,timeZoneName:`long`}).format(t).slice(12)}const kV=new TextDecoder(`utf-8`),AV=e=>kV.decode(e),jV=new TextEncoder,MV=e=>jV.encode(e),NV=e=>typeof e==`function`,PV=e=>e!=null&&Object(e)===e,FV=e=>PV(e)&&NV(e.then),IV=e=>PV(e)&&NV(e[Symbol.iterator]),LV=e=>PV(e)&&NV(e[Symbol.asyncIterator]),RV=e=>PV(e)&&`done`in e&&`value`in e,zV=e=>PV(e)&&NV(e.clear)&&NV(e.bytes)&&NV(e.position)&&NV(e.setPosition)&&NV(e.capacity)&&NV(e.getBufferIdentifier)&&NV(e.createLong);var BV={};xt(BV,{compareArrayLike:()=>TH,joinUint8Arrays:()=>WV,memcpy:()=>UV,rebaseValueOffsets:()=>wH,toArrayBufferView:()=>GV,toArrayBufferViewAsyncIterator:()=>mH,toArrayBufferViewIterator:()=>iH,toBigInt64Array:()=>YV,toBigUint64Array:()=>$V,toFloat32Array:()=>eH,toFloat32ArrayAsyncIterator:()=>xH,toFloat32ArrayIterator:()=>dH,toFloat64Array:()=>tH,toFloat64ArrayAsyncIterator:()=>SH,toFloat64ArrayIterator:()=>fH,toInt16Array:()=>qV,toInt16ArrayAsyncIterator:()=>gH,toInt16ArrayIterator:()=>oH,toInt32Array:()=>JV,toInt32ArrayAsyncIterator:()=>_H,toInt32ArrayIterator:()=>sH,toInt8Array:()=>KV,toInt8ArrayAsyncIterator:()=>hH,toInt8ArrayIterator:()=>aH,toUint16Array:()=>ZV,toUint16ArrayAsyncIterator:()=>yH,toUint16ArrayIterator:()=>lH,toUint32Array:()=>QV,toUint32ArrayAsyncIterator:()=>bH,toUint32ArrayIterator:()=>uH,toUint8Array:()=>XV,toUint8ArrayAsyncIterator:()=>vH,toUint8ArrayIterator:()=>cH,toUint8ClampedArray:()=>nH,toUint8ClampedArrayAsyncIterator:()=>CH,toUint8ClampedArrayIterator:()=>pH});const VV=typeof SharedArrayBuffer<`u`?SharedArrayBuffer:ArrayBuffer;function HV(e){let t=e[0]?[e[0]]:[],n,r,i,a;for(let o,s,c=0,l=0,u=e.length;++ce+t.byteLength,0),i,a,o,s=0,c=-1,l=Math.min(t||1/0,r);for(let e=n.length;++cGV(Int8Array,e),qV=e=>GV(Int16Array,e),JV=e=>GV(Int32Array,e),YV=e=>GV(BigInt64Array,e),XV=e=>GV(Uint8Array,e),ZV=e=>GV(Uint16Array,e),QV=e=>GV(Uint32Array,e),$V=e=>GV(BigUint64Array,e),eH=e=>GV(Float32Array,e),tH=e=>GV(Float64Array,e),nH=e=>GV(Uint8ClampedArray,e),rH=e=>(e.next(),e);function*iH(e,t){let n=function*(e){yield e},r=typeof t==`string`||ArrayBuffer.isView(t)||t instanceof ArrayBuffer||t instanceof VV?n(t):IV(t)?t:n(t);return yield*rH(function*(t){let n=null;do n=t.next(yield GV(e,n));while(!n.done)}(r[Symbol.iterator]())),new e}const aH=e=>iH(Int8Array,e),oH=e=>iH(Int16Array,e),sH=e=>iH(Int32Array,e),cH=e=>iH(Uint8Array,e),lH=e=>iH(Uint16Array,e),uH=e=>iH(Uint32Array,e),dH=e=>iH(Float32Array,e),fH=e=>iH(Float64Array,e),pH=e=>iH(Uint8ClampedArray,e);function mH(e,t){return pj(this,arguments,function*(){if(FV(t))return yield fj(yield fj(yield*mj(hj(mH(e,yield fj(t))))));let n=function(e){return pj(this,arguments,function*(){yield yield fj(yield fj(e))})},r=function(e){return pj(this,arguments,function*(){yield fj(yield*mj(hj(rH(function*(e){let t=null;do t=e.next(yield t?.value);while(!t.done)}(e[Symbol.iterator]())))))})},i=typeof t==`string`||ArrayBuffer.isView(t)||t instanceof ArrayBuffer||t instanceof VV?n(t):IV(t)?r(t):LV(t)?t:n(t);return yield fj(yield*mj(hj(rH(function(t){return pj(this,arguments,function*(){let n=null;do n=yield fj(t.next(yield yield fj(GV(e,n))));while(!n.done)})}(i[Symbol.asyncIterator]()))))),yield fj(new e)})}const hH=e=>mH(Int8Array,e),gH=e=>mH(Int16Array,e),_H=e=>mH(Int32Array,e),vH=e=>mH(Uint8Array,e),yH=e=>mH(Uint16Array,e),bH=e=>mH(Uint32Array,e),xH=e=>mH(Float32Array,e),SH=e=>mH(Float64Array,e),CH=e=>mH(Uint8ClampedArray,e);function wH(e,t,n){if(e!==0){n=n.slice(0,t);for(let t=-1,r=n.length;++t0)do if(e[n]!==t[n])return!1;while(++nPH});const NH=void 0;function PH(e){if(e===null)return`null`;if(e===NH)return`undefined`;switch(typeof e){case`number`:return`${e}`;case`bigint`:return`${e}`;case`string`:return`"${e}"`}return typeof e[Symbol.toPrimitive]==`function`?e[Symbol.toPrimitive](`string`):ArrayBuffer.isView(e)?e instanceof BigInt64Array||e instanceof BigUint64Array?`[${[...e].map(e=>PH(e))}]`:`[${e}]`:ArrayBuffer.isView(e)?`[${e}]`:JSON.stringify(e,(e,t)=>typeof t==`bigint`?`${t}`:t)}function FH(e){if(typeof e==`bigint`&&(e<-(2**53-1)||e>2**53-1))throw TypeError(`${e} is not safe to convert to a number.`);return Number(e)}function IH(e,t){return FH(e/t)+FH(e%t)/FH(t)}var LH={};xt(LH,{BN:()=>YH,bigNumToBigInt:()=>qH,bigNumToNumber:()=>GH,bigNumToString:()=>KH,isArrowBigNumSymbol:()=>RH});const RH=Symbol.for(`isArrowBigNum`);function zH(e,...t){return t.length===0?Object.setPrototypeOf(GV(this.TypedArray,e),this.constructor.prototype):Object.setPrototypeOf(new this.TypedArray(e,...t),this.constructor.prototype)}zH.prototype[RH]=!0,zH.prototype.toJSON=function(){return`"${KH(this)}"`},zH.prototype.valueOf=function(e){return GH(this,e)},zH.prototype.toString=function(){return KH(this)},zH.prototype[Symbol.toPrimitive]=function(e=`default`){switch(e){case`number`:return GH(this);case`string`:return KH(this);case`default`:return qH(this)}return KH(this)};function BH(...e){return zH.apply(this,e)}function VH(...e){return zH.apply(this,e)}function HH(...e){return zH.apply(this,e)}Object.setPrototypeOf(BH.prototype,Object.create(Int32Array.prototype)),Object.setPrototypeOf(VH.prototype,Object.create(Uint32Array.prototype)),Object.setPrototypeOf(HH.prototype,Object.create(Uint32Array.prototype)),Object.assign(BH.prototype,zH.prototype,{constructor:BH,signed:!0,TypedArray:Int32Array,BigIntArray:BigInt64Array}),Object.assign(VH.prototype,zH.prototype,{constructor:VH,signed:!1,TypedArray:Uint32Array,BigIntArray:BigUint64Array}),Object.assign(HH.prototype,zH.prototype,{constructor:HH,signed:!0,TypedArray:Uint32Array,BigIntArray:BigUint64Array});const UH=BigInt(4294967296)*BigInt(4294967296),WH=UH-BigInt(1);function GH(e,t){let{buffer:n,byteOffset:r,byteLength:i,signed:a}=e,o=new BigUint64Array(n,r,i/8),s=a&&o.at(-1)&BigInt(1)<0){let e=BigInt(`1`.padEnd(t+1,`0`)),n=c/e,r=s?-(c%e):c%e,i=FH(n),a=`${r}`.padStart(t,`0`),o=s&&i===0?`-`:``;return+`${o}${i}.${a}`}return FH(c)}function KH(e){if(e.byteLength===8){let t=new e.BigIntArray(e.buffer,e.byteOffset,1);return`${t[0]}`}if(!e.signed)return JH(e);let t=new Uint16Array(e.buffer,e.byteOffset,e.byteLength/2),n=new Int16Array([t.at(-1)])[0];if(n>=0)return JH(e);t=t.slice();let r=1;for(let e=0;e(e.children=null,e.ArrayType=Array,e.OffsetArrayType=Int32Array,e[Symbol.toStringTag]=`DataType`))(vU.prototype);var yU=class extends vU{constructor(){super(X.Null)}toString(){return`Null`}};ZH=Symbol.toStringTag,yU[ZH]=(e=>e[Symbol.toStringTag]=`Null`)(yU.prototype);var bU=class extends vU{constructor(e,t){super(X.Int),this.isSigned=e,this.bitWidth=t}get ArrayType(){switch(this.bitWidth){case 8:return this.isSigned?Int8Array:Uint8Array;case 16:return this.isSigned?Int16Array:Uint16Array;case 32:return this.isSigned?Int32Array:Uint32Array;case 64:return this.isSigned?BigInt64Array:BigUint64Array}throw Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}toString(){return`${this.isSigned?`I`:`Ui`}nt${this.bitWidth}`}};QH=Symbol.toStringTag,bU[QH]=(e=>(e.isSigned=null,e.bitWidth=null,e[Symbol.toStringTag]=`Int`))(bU.prototype);var xU=class extends bU{constructor(){super(!0,8)}get ArrayType(){return Int8Array}},SU=class extends bU{constructor(){super(!0,16)}get ArrayType(){return Int16Array}},CU=class extends bU{constructor(){super(!0,32)}get ArrayType(){return Int32Array}},wU=class extends bU{constructor(){super(!0,64)}get ArrayType(){return BigInt64Array}},TU=class extends bU{constructor(){super(!1,8)}get ArrayType(){return Uint8Array}},EU=class extends bU{constructor(){super(!1,16)}get ArrayType(){return Uint16Array}},DU=class extends bU{constructor(){super(!1,32)}get ArrayType(){return Uint32Array}},OU=class extends bU{constructor(){super(!1,64)}get ArrayType(){return BigUint64Array}};Object.defineProperty(xU.prototype,`ArrayType`,{value:Int8Array}),Object.defineProperty(SU.prototype,`ArrayType`,{value:Int16Array}),Object.defineProperty(CU.prototype,`ArrayType`,{value:Int32Array}),Object.defineProperty(wU.prototype,`ArrayType`,{value:BigInt64Array}),Object.defineProperty(TU.prototype,`ArrayType`,{value:Uint8Array}),Object.defineProperty(EU.prototype,`ArrayType`,{value:Uint16Array}),Object.defineProperty(DU.prototype,`ArrayType`,{value:Uint32Array}),Object.defineProperty(OU.prototype,`ArrayType`,{value:BigUint64Array});var kU=class extends vU{constructor(e){super(X.Float),this.precision=e}get ArrayType(){switch(this.precision){case DH.HALF:return Uint16Array;case DH.SINGLE:return Float32Array;case DH.DOUBLE:return Float64Array}throw Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}toString(){return`Float${this.precision<<5||16}`}};$H=Symbol.toStringTag,kU[$H]=(e=>(e.precision=null,e[Symbol.toStringTag]=`Float`))(kU.prototype);var AU=class extends kU{constructor(){super(DH.HALF)}},jU=class extends kU{constructor(){super(DH.SINGLE)}},MU=class extends kU{constructor(){super(DH.DOUBLE)}};Object.defineProperty(AU.prototype,`ArrayType`,{value:Uint16Array}),Object.defineProperty(jU.prototype,`ArrayType`,{value:Float32Array}),Object.defineProperty(MU.prototype,`ArrayType`,{value:Float64Array});var NU=class extends vU{constructor(){super(X.Binary)}toString(){return`Binary`}};eU=Symbol.toStringTag,NU[eU]=(e=>(e.ArrayType=Uint8Array,e[Symbol.toStringTag]=`Binary`))(NU.prototype);var PU=class extends vU{constructor(){super(X.LargeBinary)}toString(){return`LargeBinary`}};tU=Symbol.toStringTag,PU[tU]=(e=>(e.ArrayType=Uint8Array,e.OffsetArrayType=BigInt64Array,e[Symbol.toStringTag]=`LargeBinary`))(PU.prototype);var FU=class extends vU{constructor(){super(X.Utf8)}toString(){return`Utf8`}};nU=Symbol.toStringTag,FU[nU]=(e=>(e.ArrayType=Uint8Array,e[Symbol.toStringTag]=`Utf8`))(FU.prototype);var IU=class extends vU{constructor(){super(X.LargeUtf8)}toString(){return`LargeUtf8`}};rU=Symbol.toStringTag,IU[rU]=(e=>(e.ArrayType=Uint8Array,e.OffsetArrayType=BigInt64Array,e[Symbol.toStringTag]=`LargeUtf8`))(IU.prototype);var LU=class extends vU{constructor(){super(X.Bool)}toString(){return`Bool`}};iU=Symbol.toStringTag,LU[iU]=(e=>(e.ArrayType=Uint8Array,e[Symbol.toStringTag]=`Bool`))(LU.prototype);var RU=class extends vU{constructor(e,t,n=128){super(X.Decimal),this.scale=e,this.precision=t,this.bitWidth=n}toString(){return`Decimal[${this.precision}e${this.scale>0?`+`:``}${this.scale}]`}};aU=Symbol.toStringTag,RU[aU]=(e=>(e.scale=null,e.precision=null,e.ArrayType=Uint32Array,e[Symbol.toStringTag]=`Decimal`))(RU.prototype);var zU=class extends vU{constructor(e){super(X.Date),this.unit=e}toString(){return`Date${(this.unit+1)*32}<${OH[this.unit]}>`}get ArrayType(){return this.unit===OH.DAY?Int32Array:BigInt64Array}};oU=Symbol.toStringTag,zU[oU]=(e=>(e.unit=null,e[Symbol.toStringTag]=`Date`))(zU.prototype);var BU=class extends vU{constructor(e,t){super(X.Time),this.unit=e,this.bitWidth=t}toString(){return`Time${this.bitWidth}<${kH[this.unit]}>`}get ArrayType(){switch(this.bitWidth){case 32:return Int32Array;case 64:return BigInt64Array}throw Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}};sU=Symbol.toStringTag,BU[sU]=(e=>(e.unit=null,e.bitWidth=null,e[Symbol.toStringTag]=`Time`))(BU.prototype);var VU=class extends vU{constructor(e,t){super(X.Timestamp),this.unit=e,this.timezone=t}toString(){return`Timestamp<${kH[this.unit]}${this.timezone?`, ${this.timezone}`:``}>`}};cU=Symbol.toStringTag,VU[cU]=(e=>(e.unit=null,e.timezone=null,e.ArrayType=BigInt64Array,e[Symbol.toStringTag]=`Timestamp`))(VU.prototype);var HU=class extends vU{constructor(e){super(X.Interval),this.unit=e}toString(){return`Interval<${AH[this.unit]}>`}};lU=Symbol.toStringTag,HU[lU]=(e=>(e.unit=null,e.ArrayType=Int32Array,e[Symbol.toStringTag]=`Interval`))(HU.prototype);var UU=class extends vU{constructor(e){super(X.Duration),this.unit=e}toString(){return`Duration<${kH[this.unit]}>`}};uU=Symbol.toStringTag,UU[uU]=(e=>(e.unit=null,e.ArrayType=BigInt64Array,e[Symbol.toStringTag]=`Duration`))(UU.prototype);var WU=class extends vU{constructor(e){super(X.List),this.children=[e]}toString(){return`List<${this.valueType}>`}get valueType(){return this.children[0].type}get valueField(){return this.children[0]}get ArrayType(){return this.valueType.ArrayType}};dU=Symbol.toStringTag,WU[dU]=(e=>(e.children=null,e[Symbol.toStringTag]=`List`))(WU.prototype);var GU=class extends vU{constructor(e){super(X.Struct),this.children=e}toString(){return`Struct<{${this.children.map(e=>`${e.name}:${e.type}`).join(`, `)}}>`}};fU=Symbol.toStringTag,GU[fU]=(e=>(e.children=null,e[Symbol.toStringTag]=`Struct`))(GU.prototype);var KU=class extends vU{constructor(e,t,n){super(X.Union),this.mode=e,this.children=n,this.typeIds=t=Int32Array.from(t),this.typeIdToChildIndex=t.reduce((e,t,n)=>(e[t]=n)&&e||e,Object.create(null))}toString(){return`${this[Symbol.toStringTag]}<${this.children.map(e=>`${e.type}`).join(` | `)}>`}};pU=Symbol.toStringTag,KU[pU]=(e=>(e.mode=null,e.typeIds=null,e.children=null,e.typeIdToChildIndex=null,e.ArrayType=Int8Array,e[Symbol.toStringTag]=`Union`))(KU.prototype);var qU=class extends vU{constructor(e){super(X.FixedSizeBinary),this.byteWidth=e}toString(){return`FixedSizeBinary[${this.byteWidth}]`}};mU=Symbol.toStringTag,qU[mU]=(e=>(e.byteWidth=null,e.ArrayType=Uint8Array,e[Symbol.toStringTag]=`FixedSizeBinary`))(qU.prototype);var JU=class extends vU{constructor(e,t){super(X.FixedSizeList),this.listSize=e,this.children=[t]}get valueType(){return this.children[0].type}get valueField(){return this.children[0]}get ArrayType(){return this.valueType.ArrayType}toString(){return`FixedSizeList[${this.listSize}]<${this.valueType}>`}};hU=Symbol.toStringTag,JU[hU]=(e=>(e.children=null,e.listSize=null,e[Symbol.toStringTag]=`FixedSizeList`))(JU.prototype);var YU=class extends vU{constructor(e,t=!1){var n,r,i;if(super(X.Map),this.children=[e],this.keysSorted=t,e&&(e.name=`entries`,(n=e?.type)?.children)){let t=(r=e?.type)?.children[0];t&&(t.name=`key`);let n=(i=e?.type)?.children[1];n&&(n.name=`value`)}}get keyType(){return this.children[0].type.children[0].type}get valueType(){return this.children[0].type.children[1].type}get childType(){return this.children[0].type}toString(){return`Map<{${this.children[0].type.children.map(e=>`${e.name}:${e.type}`).join(`, `)}}>`}};gU=Symbol.toStringTag,YU[gU]=(e=>(e.children=null,e.keysSorted=null,e[Symbol.toStringTag]=`Map_`))(YU.prototype);const XU=(e=>()=>++e)(-1);var ZU=class extends vU{constructor(e,t,n,r){super(X.Dictionary),this.indices=t,this.dictionary=e,this.isOrdered=r||!1,this.id=n==null?XU():FH(n)}get children(){return this.dictionary.children}get valueType(){return this.dictionary}get ArrayType(){return this.dictionary.ArrayType}toString(){return`Dictionary<${this.indices}, ${this.dictionary}>`}};_U=Symbol.toStringTag,ZU[_U]=(e=>(e.id=null,e.indices=null,e.isOrdered=null,e.dictionary=null,e[Symbol.toStringTag]=`Dictionary`))(ZU.prototype);function QU(e){let t=e;switch(e.typeId){case X.Decimal:return e.bitWidth/32;case X.Interval:return t.unit===AH.MONTH_DAY_NANO?4:1+t.unit;case X.FixedSizeList:return t.listSize;case X.FixedSizeBinary:return t.byteWidth;default:return 1}}var $U=class{visitMany(e,...t){return e.map((e,n)=>this.visit(e,...t.map(e=>e[n])))}visit(...e){return this.getVisitFn(e[0],!1).apply(this,e)}getVisitFn(e,t=!0){return eW(this,e,t)}getVisitFnByTypeId(e,t=!0){return tW(this,e,t)}visitNull(e,...t){return null}visitBool(e,...t){return null}visitInt(e,...t){return null}visitFloat(e,...t){return null}visitUtf8(e,...t){return null}visitLargeUtf8(e,...t){return null}visitBinary(e,...t){return null}visitLargeBinary(e,...t){return null}visitFixedSizeBinary(e,...t){return null}visitDate(e,...t){return null}visitTimestamp(e,...t){return null}visitTime(e,...t){return null}visitDecimal(e,...t){return null}visitList(e,...t){return null}visitStruct(e,...t){return null}visitUnion(e,...t){return null}visitDictionary(e,...t){return null}visitInterval(e,...t){return null}visitDuration(e,...t){return null}visitFixedSizeList(e,...t){return null}visitMap(e,...t){return null}};function eW(e,t,n=!0){return typeof t==`number`?tW(e,t,n):typeof t==`string`&&t in X?tW(e,X[t],n):t&&t instanceof vU?tW(e,nW(t),n):t?.type&&t.type instanceof vU?tW(e,nW(t.type),n):tW(e,X.NONE,n)}function tW(e,t,n=!0){let r=null;switch(t){case X.Null:r=e.visitNull;break;case X.Bool:r=e.visitBool;break;case X.Int:r=e.visitInt;break;case X.Int8:r=e.visitInt8||e.visitInt;break;case X.Int16:r=e.visitInt16||e.visitInt;break;case X.Int32:r=e.visitInt32||e.visitInt;break;case X.Int64:r=e.visitInt64||e.visitInt;break;case X.Uint8:r=e.visitUint8||e.visitInt;break;case X.Uint16:r=e.visitUint16||e.visitInt;break;case X.Uint32:r=e.visitUint32||e.visitInt;break;case X.Uint64:r=e.visitUint64||e.visitInt;break;case X.Float:r=e.visitFloat;break;case X.Float16:r=e.visitFloat16||e.visitFloat;break;case X.Float32:r=e.visitFloat32||e.visitFloat;break;case X.Float64:r=e.visitFloat64||e.visitFloat;break;case X.Utf8:r=e.visitUtf8;break;case X.LargeUtf8:r=e.visitLargeUtf8;break;case X.Binary:r=e.visitBinary;break;case X.LargeBinary:r=e.visitLargeBinary;break;case X.FixedSizeBinary:r=e.visitFixedSizeBinary;break;case X.Date:r=e.visitDate;break;case X.DateDay:r=e.visitDateDay||e.visitDate;break;case X.DateMillisecond:r=e.visitDateMillisecond||e.visitDate;break;case X.Timestamp:r=e.visitTimestamp;break;case X.TimestampSecond:r=e.visitTimestampSecond||e.visitTimestamp;break;case X.TimestampMillisecond:r=e.visitTimestampMillisecond||e.visitTimestamp;break;case X.TimestampMicrosecond:r=e.visitTimestampMicrosecond||e.visitTimestamp;break;case X.TimestampNanosecond:r=e.visitTimestampNanosecond||e.visitTimestamp;break;case X.Time:r=e.visitTime;break;case X.TimeSecond:r=e.visitTimeSecond||e.visitTime;break;case X.TimeMillisecond:r=e.visitTimeMillisecond||e.visitTime;break;case X.TimeMicrosecond:r=e.visitTimeMicrosecond||e.visitTime;break;case X.TimeNanosecond:r=e.visitTimeNanosecond||e.visitTime;break;case X.Decimal:r=e.visitDecimal;break;case X.List:r=e.visitList;break;case X.Struct:r=e.visitStruct;break;case X.Union:r=e.visitUnion;break;case X.DenseUnion:r=e.visitDenseUnion||e.visitUnion;break;case X.SparseUnion:r=e.visitSparseUnion||e.visitUnion;break;case X.Dictionary:r=e.visitDictionary;break;case X.Interval:r=e.visitInterval;break;case X.IntervalDayTime:r=e.visitIntervalDayTime||e.visitInterval;break;case X.IntervalYearMonth:r=e.visitIntervalYearMonth||e.visitInterval;break;case X.IntervalMonthDayNano:r=e.visitIntervalMonthDayNano||e.visitInterval;break;case X.Duration:r=e.visitDuration;break;case X.DurationSecond:r=e.visitDurationSecond||e.visitDuration;break;case X.DurationMillisecond:r=e.visitDurationMillisecond||e.visitDuration;break;case X.DurationMicrosecond:r=e.visitDurationMicrosecond||e.visitDuration;break;case X.DurationNanosecond:r=e.visitDurationNanosecond||e.visitDuration;break;case X.FixedSizeList:r=e.visitFixedSizeList;break;case X.Map:r=e.visitMap;break}if(typeof r==`function`)return r;if(!n)return()=>null;throw Error(`Unrecognized type '${X[t]}'`)}function nW(e){switch(e.typeId){case X.Null:return X.Null;case X.Int:{let{bitWidth:t,isSigned:n}=e;switch(t){case 8:return n?X.Int8:X.Uint8;case 16:return n?X.Int16:X.Uint16;case 32:return n?X.Int32:X.Uint32;case 64:return n?X.Int64:X.Uint64}return X.Int}case X.Float:switch(e.precision){case DH.HALF:return X.Float16;case DH.SINGLE:return X.Float32;case DH.DOUBLE:return X.Float64}return X.Float;case X.Binary:return X.Binary;case X.LargeBinary:return X.LargeBinary;case X.Utf8:return X.Utf8;case X.LargeUtf8:return X.LargeUtf8;case X.Bool:return X.Bool;case X.Decimal:return X.Decimal;case X.Time:switch(e.unit){case kH.SECOND:return X.TimeSecond;case kH.MILLISECOND:return X.TimeMillisecond;case kH.MICROSECOND:return X.TimeMicrosecond;case kH.NANOSECOND:return X.TimeNanosecond}return X.Time;case X.Timestamp:switch(e.unit){case kH.SECOND:return X.TimestampSecond;case kH.MILLISECOND:return X.TimestampMillisecond;case kH.MICROSECOND:return X.TimestampMicrosecond;case kH.NANOSECOND:return X.TimestampNanosecond}return X.Timestamp;case X.Date:switch(e.unit){case OH.DAY:return X.DateDay;case OH.MILLISECOND:return X.DateMillisecond}return X.Date;case X.Interval:switch(e.unit){case AH.DAY_TIME:return X.IntervalDayTime;case AH.YEAR_MONTH:return X.IntervalYearMonth;case AH.MONTH_DAY_NANO:return X.IntervalMonthDayNano}return X.Interval;case X.Duration:switch(e.unit){case kH.SECOND:return X.DurationSecond;case kH.MILLISECOND:return X.DurationMillisecond;case kH.MICROSECOND:return X.DurationMicrosecond;case kH.NANOSECOND:return X.DurationNanosecond}return X.Duration;case X.Map:return X.Map;case X.List:return X.List;case X.Struct:return X.Struct;case X.Union:switch(e.mode){case EH.Dense:return X.DenseUnion;case EH.Sparse:return X.SparseUnion}return X.Union;case X.FixedSizeBinary:return X.FixedSizeBinary;case X.FixedSizeList:return X.FixedSizeList;case X.Dictionary:return X.Dictionary}throw Error(`Unrecognized type '${X[e.typeId]}'`)}$U.prototype.visitInt8=null,$U.prototype.visitInt16=null,$U.prototype.visitInt32=null,$U.prototype.visitInt64=null,$U.prototype.visitUint8=null,$U.prototype.visitUint16=null,$U.prototype.visitUint32=null,$U.prototype.visitUint64=null,$U.prototype.visitFloat16=null,$U.prototype.visitFloat32=null,$U.prototype.visitFloat64=null,$U.prototype.visitDateDay=null,$U.prototype.visitDateMillisecond=null,$U.prototype.visitTimestampSecond=null,$U.prototype.visitTimestampMillisecond=null,$U.prototype.visitTimestampMicrosecond=null,$U.prototype.visitTimestampNanosecond=null,$U.prototype.visitTimeSecond=null,$U.prototype.visitTimeMillisecond=null,$U.prototype.visitTimeMicrosecond=null,$U.prototype.visitTimeNanosecond=null,$U.prototype.visitDenseUnion=null,$U.prototype.visitSparseUnion=null,$U.prototype.visitIntervalDayTime=null,$U.prototype.visitIntervalYearMonth=null,$U.prototype.visitIntervalMonthDayNano=null,$U.prototype.visitDuration=null,$U.prototype.visitDurationSecond=null,$U.prototype.visitDurationMillisecond=null,$U.prototype.visitDurationMicrosecond=null,$U.prototype.visitDurationNanosecond=null;var rW={};xt(rW,{float64ToUint16:()=>sW,uint16ToFloat64:()=>oW});const iW=new Float64Array(1),aW=new Uint32Array(iW.buffer);function oW(e){let t=(e&31744)>>10,n=(e&1023)/1024,r=(-1)**((e&32768)>>15);switch(t){case 31:return r*(n?NaN:1/0);case 0:return r*(n?6103515625e-14*n:0)}return r*2**(t-15)*(1+n)}function sW(e){if(e!==e)return 32256;iW[0]=e;let t=(aW[1]&2147483648)>>16&65535,n=aW[1]&2146435072,r=0;return n>=1089470464?aW[0]>0?n=31744:(n=(n&2080374784)>>16,r=(aW[1]&1048575)>>10):n<=1056964608?(r=1048576+(aW[1]&1048575),r=1048576+(r<<(n>>20)-998)>>21,n=0):(n=n-1056964608>>10,r=(aW[1]&1048575)+512>>10),t|n|r&65535}var cW=class extends $U{};function lW(e){return(t,n,r)=>{if(t.setValid(n,r!=null))return e(t,n,r)}}const uW=(e,t,n)=>{e[t]=Math.floor(n/864e5)},dW=(e,t,n,r)=>{if(n+1{let i=e+n;r?t[i>>3]|=1<>3]&=~(1<{e[t]=n},mW=({values:e},t,n)=>{e[t]=n},hW=({values:e},t,n)=>{e[t]=sW(n)},gW=(e,t,n)=>{switch(e.type.precision){case DH.HALF:return hW(e,t,n);case DH.SINGLE:case DH.DOUBLE:return mW(e,t,n)}},_W=({values:e},t,n)=>{uW(e,t,n.valueOf())},vW=({values:e},t,n)=>{e[t]=BigInt(n)},yW=({stride:e,values:t},n,r)=>{t.set(r.subarray(0,e),e*n)},bW=({values:e,valueOffsets:t},n,r)=>dW(e,t,n,r),xW=({values:e,valueOffsets:t},n,r)=>dW(e,t,n,MV(r)),SW=(e,t,n)=>{e.type.unit===OH.DAY?_W(e,t,n):vW(e,t,n)},CW=({values:e},t,n)=>{e[t]=BigInt(n/1e3)},wW=({values:e},t,n)=>{e[t]=BigInt(n)},TW=({values:e},t,n)=>{e[t]=BigInt(n*1e3)},EW=({values:e},t,n)=>{e[t]=BigInt(n*1e6)},DW=(e,t,n)=>{switch(e.type.unit){case kH.SECOND:return CW(e,t,n);case kH.MILLISECOND:return wW(e,t,n);case kH.MICROSECOND:return TW(e,t,n);case kH.NANOSECOND:return EW(e,t,n)}},OW=({values:e},t,n)=>{e[t]=n},kW=({values:e},t,n)=>{e[t]=n},AW=({values:e},t,n)=>{e[t]=n},jW=({values:e},t,n)=>{e[t]=n},MW=(e,t,n)=>{switch(e.type.unit){case kH.SECOND:return OW(e,t,n);case kH.MILLISECOND:return kW(e,t,n);case kH.MICROSECOND:return AW(e,t,n);case kH.NANOSECOND:return jW(e,t,n)}},NW=({values:e,stride:t},n,r)=>{e.set(r.subarray(0,t),t*n)},PW=(e,t,n)=>{let r=e.children[0],i=e.valueOffsets,a=tG.getVisitFn(r);if(Array.isArray(n))for(let e=-1,o=i[t],s=i[t+1];o{let r=e.children[0],{valueOffsets:i}=e,a=tG.getVisitFn(r),{[t]:o,[t+1]:s}=i,c=n instanceof Map?n.entries():Object.entries(n);for(let e of c)if(a(r,o,e),++o>=s)break},IW=(e,t)=>(n,r,i,a)=>r&&n(r,e,t[a]),LW=(e,t)=>(n,r,i,a)=>r&&n(r,e,t.get(a)),RW=(e,t)=>(n,r,i,a)=>r&&n(r,e,t.get(i.name)),zW=(e,t)=>(n,r,i,a)=>r&&n(r,e,t[i.name]),BW=(e,t,n)=>{let r=e.type.children.map(e=>tG.getVisitFn(e.type)),i=n instanceof Map?RW(t,n):n instanceof iq?LW(t,n):Array.isArray(n)?IW(t,n):zW(t,n);e.type.children.forEach((t,n)=>i(r[n],e.children[n],t,n))},VW=(e,t,n)=>{e.type.mode===EH.Dense?HW(e,t,n):UW(e,t,n)},HW=(e,t,n)=>{let r=e.type.typeIdToChildIndex[e.typeIds[t]],i=e.children[r];tG.visit(i,e.valueOffsets[t],n)},UW=(e,t,n)=>{let r=e.type.typeIdToChildIndex[e.typeIds[t]],i=e.children[r];tG.visit(i,t,n)},WW=(e,t,n)=>{var r;(r=e.dictionary)==null||r.set(e.values[t],n)},GW=(e,t,n)=>{switch(e.type.unit){case AH.YEAR_MONTH:return qW(e,t,n);case AH.DAY_TIME:return KW(e,t,n);case AH.MONTH_DAY_NANO:return JW(e,t,n)}},KW=({values:e},t,n)=>{e.set(n.subarray(0,2),2*t)},qW=({values:e},t,n)=>{e[t]=n[0]*12+n[1]%12},JW=({values:e,stride:t},n,r)=>{e.set(r.subarray(0,t),t*n)},YW=({values:e},t,n)=>{e[t]=n},XW=({values:e},t,n)=>{e[t]=n},ZW=({values:e},t,n)=>{e[t]=n},QW=({values:e},t,n)=>{e[t]=n},$W=(e,t,n)=>{switch(e.type.unit){case kH.SECOND:return YW(e,t,n);case kH.MILLISECOND:return XW(e,t,n);case kH.MICROSECOND:return ZW(e,t,n);case kH.NANOSECOND:return QW(e,t,n)}},eG=(e,t,n)=>{let{stride:r}=e,i=e.children[0],a=tG.getVisitFn(i);if(Array.isArray(n))for(let e=-1,o=t*r;++e`${PH(e)}: ${PH(t)}`).join(`, `)}}`}[Symbol.for(`nodejs.util.inspect.custom`)](){return this.toString()}[Symbol.iterator](){return new aG(this[nG],this[rG])}},aG=class{constructor(e,t){this.childIndex=0,this.children=e.children,this.rowIndex=t,this.childFields=e.type.children,this.numChildren=this.childFields.length}[Symbol.iterator](){return this}next(){let e=this.childIndex;return ee.name)}has(e,t){return e[nG].type.children.some(e=>e.name===t)}getOwnPropertyDescriptor(e,t){if(e[nG].type.children.some(e=>e.name===t))return{writable:!0,enumerable:!0,configurable:!0}}get(e,t){if(Reflect.has(e,t))return e[t];let n=e[nG].type.children.findIndex(e=>e.name===t);if(n!==-1){let r=$G.visit(e[nG].children[n],e[rG]);return Reflect.set(e,t,r),r}}set(e,t,n){let r=e[nG].type.children.findIndex(e=>e.name===t);return r===-1?Reflect.has(e,t)||typeof t==`symbol`?Reflect.set(e,t,n):!1:(tG.visit(e[nG].children[r],e[rG],n),Reflect.set(e,t,n))}};const sG=new oG;var cG=class extends $U{};function lG(e){return(t,n)=>t.getValid(n)?e(t,n):null}const uG=(e,t)=>864e5*e[t],dG=(e,t)=>null,fG=(e,t,n)=>{if(n+1>=t.length)return null;let r=FH(t[n]),i=FH(t[n+1]);return e.subarray(r,i)},pG=({offset:e,values:t},n)=>{let r=e+n,i=t[r>>3];return(i&1<uG(e,t),hG=({values:e},t)=>FH(e[t]),gG=({stride:e,values:t},n)=>t[e*n],_G=({stride:e,values:t},n)=>oW(t[e*n]),vG=({values:e},t)=>e[t],yG=({stride:e,values:t},n)=>t.subarray(e*n,e*(n+1)),bG=({values:e,valueOffsets:t},n)=>fG(e,t,n),xG=({values:e,valueOffsets:t},n)=>{let r=fG(e,t,n);return r===null?null:AV(r)},SG=({values:e},t)=>e[t],CG=({type:e,values:t},n)=>e.precision===DH.HALF?oW(t[n]):t[n],wG=(e,t)=>e.type.unit===OH.DAY?mG(e,t):hG(e,t),TG=({values:e},t)=>1e3*FH(e[t]),EG=({values:e},t)=>FH(e[t]),DG=({values:e},t)=>IH(e[t],BigInt(1e3)),OG=({values:e},t)=>IH(e[t],BigInt(1e6)),kG=(e,t)=>{switch(e.type.unit){case kH.SECOND:return TG(e,t);case kH.MILLISECOND:return EG(e,t);case kH.MICROSECOND:return DG(e,t);case kH.NANOSECOND:return OG(e,t)}},AG=({values:e},t)=>e[t],jG=({values:e},t)=>e[t],MG=({values:e},t)=>e[t],NG=({values:e},t)=>e[t],PG=(e,t)=>{switch(e.type.unit){case kH.SECOND:return AG(e,t);case kH.MILLISECOND:return jG(e,t);case kH.MICROSECOND:return MG(e,t);case kH.NANOSECOND:return NG(e,t)}},FG=({values:e,stride:t},n)=>YH.decimal(e.subarray(t*n,t*(n+1))),IG=(e,t)=>{let{valueOffsets:n,stride:r,children:i}=e,{[t*r]:a,[t*r+1]:o}=n,s=i[0],c=s.slice(a,o-a);return new iq([c])},LG=(e,t)=>{let{valueOffsets:n,children:r}=e,{[t]:i,[t+1]:a}=n,o=r[0];return new iK(o.slice(i,a-i))},RG=(e,t)=>new iG(e,t),zG=(e,t)=>e.type.mode===EH.Dense?BG(e,t):VG(e,t),BG=(e,t)=>{let n=e.type.typeIdToChildIndex[e.typeIds[t]],r=e.children[n];return $G.visit(r,e.valueOffsets[t])},VG=(e,t)=>{let n=e.type.typeIdToChildIndex[e.typeIds[t]],r=e.children[n];return $G.visit(r,t)},HG=(e,t)=>{var n;return(n=e.dictionary)?.get(e.values[t])},UG=(e,t)=>e.type.unit===AH.MONTH_DAY_NANO?KG(e,t):e.type.unit===AH.DAY_TIME?WG(e,t):GG(e,t),WG=({values:e},t)=>e.subarray(2*t,2*(t+1)),GG=({values:e},t)=>{let n=e[t],r=new Int32Array(2);return r[0]=Math.trunc(n/12),r[1]=Math.trunc(n%12),r},KG=({values:e},t)=>e.subarray(4*t,4*(t+1)),qG=({values:e},t)=>e[t],JG=({values:e},t)=>e[t],YG=({values:e},t)=>e[t],XG=({values:e},t)=>e[t],ZG=(e,t)=>{switch(e.type.unit){case kH.SECOND:return qG(e,t);case kH.MILLISECOND:return JG(e,t);case kH.MICROSECOND:return YG(e,t);case kH.NANOSECOND:return XG(e,t)}},QG=(e,t)=>{let{stride:n,children:r}=e,i=r[0],a=i.slice(t*n,n);return new iq([a])};cG.prototype.visitNull=lG(dG),cG.prototype.visitBool=lG(pG),cG.prototype.visitInt=lG(SG),cG.prototype.visitInt8=lG(gG),cG.prototype.visitInt16=lG(gG),cG.prototype.visitInt32=lG(gG),cG.prototype.visitInt64=lG(vG),cG.prototype.visitUint8=lG(gG),cG.prototype.visitUint16=lG(gG),cG.prototype.visitUint32=lG(gG),cG.prototype.visitUint64=lG(vG),cG.prototype.visitFloat=lG(CG),cG.prototype.visitFloat16=lG(_G),cG.prototype.visitFloat32=lG(gG),cG.prototype.visitFloat64=lG(gG),cG.prototype.visitUtf8=lG(xG),cG.prototype.visitLargeUtf8=lG(xG),cG.prototype.visitBinary=lG(bG),cG.prototype.visitLargeBinary=lG(bG),cG.prototype.visitFixedSizeBinary=lG(yG),cG.prototype.visitDate=lG(wG),cG.prototype.visitDateDay=lG(mG),cG.prototype.visitDateMillisecond=lG(hG),cG.prototype.visitTimestamp=lG(kG),cG.prototype.visitTimestampSecond=lG(TG),cG.prototype.visitTimestampMillisecond=lG(EG),cG.prototype.visitTimestampMicrosecond=lG(DG),cG.prototype.visitTimestampNanosecond=lG(OG),cG.prototype.visitTime=lG(PG),cG.prototype.visitTimeSecond=lG(AG),cG.prototype.visitTimeMillisecond=lG(jG),cG.prototype.visitTimeMicrosecond=lG(MG),cG.prototype.visitTimeNanosecond=lG(NG),cG.prototype.visitDecimal=lG(FG),cG.prototype.visitList=lG(IG),cG.prototype.visitStruct=lG(RG),cG.prototype.visitUnion=lG(zG),cG.prototype.visitDenseUnion=lG(BG),cG.prototype.visitSparseUnion=lG(VG),cG.prototype.visitDictionary=lG(HG),cG.prototype.visitInterval=lG(UG),cG.prototype.visitIntervalDayTime=lG(WG),cG.prototype.visitIntervalYearMonth=lG(GG),cG.prototype.visitIntervalMonthDayNano=lG(KG),cG.prototype.visitDuration=lG(ZG),cG.prototype.visitDurationSecond=lG(qG),cG.prototype.visitDurationMillisecond=lG(JG),cG.prototype.visitDurationMicrosecond=lG(YG),cG.prototype.visitDurationNanosecond=lG(XG),cG.prototype.visitFixedSizeList=lG(QG),cG.prototype.visitMap=lG(LG);const $G=new cG,eK=Symbol.for(`keys`),tK=Symbol.for(`vals`),nK=Symbol.for(`kKeysAsStrings`),rK=Symbol.for(`_kKeysAsStrings`);var iK=class{constructor(e){return this[eK]=new iq([e.children[0]]).memoize(),this[tK]=e.children[1],new Proxy(this,new oK)}get[nK](){return this[rK]||(this[rK]=Array.from(this[eK].toArray(),String))}[Symbol.iterator](){return new aK(this[eK],this[tK])}get size(){return this[eK].length}toArray(){return Object.values(this.toJSON())}toJSON(){let e=this[eK],t=this[tK],n={};for(let r=-1,i=e.length;++r`${PH(e)}: ${PH(t)}`).join(`, `)}}`}[Symbol.for(`nodejs.util.inspect.custom`)](){return this.toString()}},aK=class{constructor(e,t){this.keys=e,this.vals=t,this.keyIndex=0,this.numKeys=e.length}[Symbol.iterator](){return this}next(){let e=this.keyIndex;return e===this.numKeys?{done:!0,value:null}:(this.keyIndex++,{done:!1,value:[this.keys.get(e),$G.visit(this.vals,e)]})}},oK=class{isExtensible(){return!1}deleteProperty(){return!1}preventExtensions(){return!0}ownKeys(e){return e[nK]}has(e,t){return e[nK].includes(t)}getOwnPropertyDescriptor(e,t){let n=e[nK].indexOf(t);if(n!==-1)return{writable:!0,enumerable:!0,configurable:!0}}get(e,t){if(Reflect.has(e,t))return e[t];let n=e[nK].indexOf(t);if(n!==-1){let r=$G.visit(Reflect.get(e,tK),n);return Reflect.set(e,t,r),r}}set(e,t,n){let r=e[nK].indexOf(t);return r===-1?Reflect.has(e,t)?Reflect.set(e,t,n):!1:(tG.visit(Reflect.get(e,tK),r,n),Reflect.set(e,t,n))}};Object.defineProperties(iK.prototype,{[Symbol.toStringTag]:{enumerable:!1,configurable:!1,value:`Row`},[eK]:{writable:!0,enumerable:!1,configurable:!1,value:null},[tK]:{writable:!0,enumerable:!1,configurable:!1,value:null},[rK]:{writable:!0,enumerable:!1,configurable:!1,value:null}});var sK={};xt(sK,{clampRange:()=>lK,createElementComparator:()=>fK,wrapIndex:()=>uK});let cK;function lK(e,t,n,r){let{length:i=0}=e,a=typeof t==`number`?t:0,o=typeof n==`number`?n:i;return a<0&&(a=(a%i+i)%i),o<0&&(o=(o%i+i)%i),oi&&(o=i),r?r(e,a,o):[a,o]}const uK=(e,t)=>e<0?t+e:e,dK=e=>e!==e;function fK(e){let t=typeof e;if(t!==`object`||e===null)return dK(e)?dK:t=>t===e;if(e instanceof Date){let t=e.valueOf();return e=>e instanceof Date?e.valueOf()===t:!1}return ArrayBuffer.isView(e)?t=>t?TH(e,t):!1:e instanceof Map?mK(e):Array.isArray(e)?pK(e):e instanceof iq?hK(e):gK(e,!0)}function pK(e){let t=[];for(let n=-1,r=e.length;++n!1;let r=[];for(let t=-1,i=n.length;++t{if(!n||typeof n!=`object`)return!1;switch(n.constructor){case Array:return vK(e,n);case Map:return bK(e,n,n.keys());case iK:case iG:case Object:case void 0:return bK(e,n,t||Object.keys(n))}return n instanceof iq?yK(e,n):!1}}function vK(e,t){let n=e.length;if(t.length!==n)return!1;for(let r=-1;++rDK,getBit:()=>CK,getBool:()=>SK,packBools:()=>EK,popcnt_array:()=>kK,popcnt_bit_range:()=>OK,popcnt_uint32:()=>AK,setBool:()=>wK,truncateBitmap:()=>TK});function SK(e,t,n,r){return(n&1<>r}function wK(e,t,n){return n?!!(e[t>>3]|=1<>3]&=~(1<0||n.byteLength>3):EK(new DK(n,e,t,null,SK)).subarray(0,r)),i}return n}function EK(e){let t=[],n=0,r=0,i=0;for(let a of e)a&&(i|=1<0)&&(t[n++]=i);let a=new Uint8Array(t.length+7&-8);return a.set(t),a}var DK=class{constructor(e,t,n,r,i){this.bytes=e,this.length=n,this.context=r,this.get=i,this.bit=t%8,this.byteIndex=t>>3,this.byte=e[this.byteIndex++],this.index=0}next(){return this.index>3<<3,i=t+(t%8==0?0:8-t%8);return OK(e,t,i)+OK(e,r,n)+kK(e,i>>3,r-i>>3)}function kK(e,t,n){let r=0,i=Math.trunc(t),a=new DataView(e.buffer,e.byteOffset,e.byteLength),o=n===void 0?e.byteLength:i+n;for(;o-i>=4;)r+=AK(a.getUint32(i)),i+=4;for(;o-i>=2;)r+=AK(a.getUint16(i)),i+=2;for(;o-i>=1;)r+=AK(a.getUint8(i)),i+=1;return r}function AK(e){let t=Math.trunc(e);return t-=t>>>1&1431655765,t=(t&858993459)+(t>>>2&858993459),(t+(t>>>4)&252645135)*16843009>>>24}const jK=-1;var MK=class e{get typeId(){return this.type.typeId}get ArrayType(){return this.type.ArrayType}get buffers(){return[this.valueOffsets,this.values,this.nullBitmap,this.typeIds]}get nullable(){if(this._nullCount!==0){let{type:e}=this;return vU.isSparseUnion(e)||vU.isDenseUnion(e)?this.children.some(e=>e.nullable):this.nullBitmap&&this.nullBitmap.byteLength>0}return!0}get byteLength(){let e=0,{valueOffsets:t,values:n,nullBitmap:r,typeIds:i}=this;return t&&(e+=t.byteLength),n&&(e+=n.byteLength),r&&(e+=r.byteLength),i&&(e+=i.byteLength),this.children.reduce((e,t)=>e+t.byteLength,e)}get nullCount(){if(vU.isUnion(this.type))return this.children.reduce((e,t)=>e+t.nullCount,0);let e=this._nullCount,t;return e<=jK&&(t=this.nullBitmap)&&(this._nullCount=e=t.length===0?0:this.length-OK(t,this.offset,this.offset+this.length)),e}constructor(t,n,r,i,a,o=[],s){this.type=t,this.children=o,this.dictionary=s,this.offset=Math.floor(Math.max(n||0,0)),this.length=Math.floor(Math.max(r||0,0)),this._nullCount=Math.floor(Math.max(i||0,-1));let c;a instanceof e?(this.stride=a.stride,this.values=a.values,this.typeIds=a.typeIds,this.nullBitmap=a.nullBitmap,this.valueOffsets=a.valueOffsets):(this.stride=QU(t),a&&((c=a[0])&&(this.valueOffsets=c),(c=a[1])&&(this.values=c),(c=a[2])&&(this.nullBitmap=c),(c=a[3])&&(this.typeIds=c)))}getValid(e){let{type:t}=this;if(vU.isUnion(t)){let n=t,r=this.children[n.typeIdToChildIndex[this.typeIds[e]]],i=n.mode===EH.Dense?this.valueOffsets[e]:e;return r.getValid(i)}if(this.nullable&&this.nullCount>0){let t=this.offset+e,n=this.nullBitmap[t>>3];return(n&1<>3;(!r||r.byteLength<=c)&&(r=new Uint8Array((i+a+63&-64)>>3).fill(255),this.nullCount>0?(r.set(TK(i,a,this.nullBitmap),0),Object.assign(this,{nullBitmap:r})):Object.assign(this,{nullBitmap:r,_nullCount:0}));let l=r[c];n=(l&s)!==0,r[c]=t?l|s:l&~s}return n!==!!t&&(this._nullCount=this.nullCount+(t?-1:1)),t}clone(t=this.type,n=this.offset,r=this.length,i=this._nullCount,a=this,o=this.children){return new e(t,n,r,i,a,o,this.dictionary)}slice(e,t){let{stride:n,typeId:r,children:i}=this,a=(this._nullCount===0)-1,o=r===16?n:1,s=this._sliceBuffers(e,t,n,r);return this.clone(this.type,this.offset+e,t,a,s,i.length===0||this.valueOffsets?i:this._sliceChildren(i,o*e,o*t))}_changeLengthAndBackfillNullBitmap(e){if(this.typeId===X.Null)return this.clone(this.type,0,e,0);let{length:t,nullCount:n}=this,r=new Uint8Array((e+63&-64)>>3).fill(255,0,t>>3);r[t>>3]=(1<0&&r.set(TK(this.offset,t,this.nullBitmap),0);let i=this.buffers;return i[jH.VALIDITY]=r,this.clone(this.type,0,e,n+(e-t),i)}_sliceBuffers(e,t,n,r){let i,{buffers:a}=this;return(i=a[jH.TYPE])&&(a[jH.TYPE]=i.subarray(e,e+t)),(i=a[jH.OFFSET])&&(a[jH.OFFSET]=i.subarray(e,e+t+1))||(i=a[jH.DATA])&&(a[jH.DATA]=r===6?i:i.subarray(n*e,n*(e+t))),a}_sliceChildren(e,t,n){return e.map(e=>e.slice(t,n))}};MK.prototype.children=Object.freeze([]);var NK=class e extends $U{visit(e){return this.getVisitFn(e.type).call(this,e)}visitNull(e){let{type:t,offset:n=0,length:r=0}=e;return new MK(t,n,r,r)}visitBool(e){let{type:t,offset:n=0}=e,r=XV(e.nullBitmap),i=GV(t.ArrayType,e.data),{length:a=i.length>>3,nullCount:o=e.nullBitmap?-1:0}=e;return new MK(t,n,a,o,[void 0,i,r])}visitInt(e){let{type:t,offset:n=0}=e,r=XV(e.nullBitmap),i=GV(t.ArrayType,e.data),{length:a=i.length,nullCount:o=e.nullBitmap?-1:0}=e;return new MK(t,n,a,o,[void 0,i,r])}visitFloat(e){let{type:t,offset:n=0}=e,r=XV(e.nullBitmap),i=GV(t.ArrayType,e.data),{length:a=i.length,nullCount:o=e.nullBitmap?-1:0}=e;return new MK(t,n,a,o,[void 0,i,r])}visitUtf8(e){let{type:t,offset:n=0}=e,r=XV(e.data),i=XV(e.nullBitmap),a=JV(e.valueOffsets),{length:o=a.length-1,nullCount:s=e.nullBitmap?-1:0}=e;return new MK(t,n,o,s,[a,r,i])}visitLargeUtf8(e){let{type:t,offset:n=0}=e,r=XV(e.data),i=XV(e.nullBitmap),a=YV(e.valueOffsets),{length:o=a.length-1,nullCount:s=e.nullBitmap?-1:0}=e;return new MK(t,n,o,s,[a,r,i])}visitBinary(e){let{type:t,offset:n=0}=e,r=XV(e.data),i=XV(e.nullBitmap),a=JV(e.valueOffsets),{length:o=a.length-1,nullCount:s=e.nullBitmap?-1:0}=e;return new MK(t,n,o,s,[a,r,i])}visitLargeBinary(e){let{type:t,offset:n=0}=e,r=XV(e.data),i=XV(e.nullBitmap),a=YV(e.valueOffsets),{length:o=a.length-1,nullCount:s=e.nullBitmap?-1:0}=e;return new MK(t,n,o,s,[a,r,i])}visitFixedSizeBinary(e){let{type:t,offset:n=0}=e,r=XV(e.nullBitmap),i=GV(t.ArrayType,e.data),{length:a=i.length/QU(t),nullCount:o=e.nullBitmap?-1:0}=e;return new MK(t,n,a,o,[void 0,i,r])}visitDate(e){let{type:t,offset:n=0}=e,r=XV(e.nullBitmap),i=GV(t.ArrayType,e.data),{length:a=i.length/QU(t),nullCount:o=e.nullBitmap?-1:0}=e;return new MK(t,n,a,o,[void 0,i,r])}visitTimestamp(e){let{type:t,offset:n=0}=e,r=XV(e.nullBitmap),i=GV(t.ArrayType,e.data),{length:a=i.length/QU(t),nullCount:o=e.nullBitmap?-1:0}=e;return new MK(t,n,a,o,[void 0,i,r])}visitTime(e){let{type:t,offset:n=0}=e,r=XV(e.nullBitmap),i=GV(t.ArrayType,e.data),{length:a=i.length/QU(t),nullCount:o=e.nullBitmap?-1:0}=e;return new MK(t,n,a,o,[void 0,i,r])}visitDecimal(e){let{type:t,offset:n=0}=e,r=XV(e.nullBitmap),i=GV(t.ArrayType,e.data),{length:a=i.length/QU(t),nullCount:o=e.nullBitmap?-1:0}=e;return new MK(t,n,a,o,[void 0,i,r])}visitList(e){let{type:t,offset:n=0,child:r}=e,i=XV(e.nullBitmap),a=JV(e.valueOffsets),{length:o=a.length-1,nullCount:s=e.nullBitmap?-1:0}=e;return new MK(t,n,o,s,[a,void 0,i],[r])}visitStruct(e){let{type:t,offset:n=0,children:r=[]}=e,i=XV(e.nullBitmap),{length:a=r.reduce((e,{length:t})=>Math.max(e,t),0),nullCount:o=e.nullBitmap?-1:0}=e;return new MK(t,n,a,o,[void 0,void 0,i],r)}visitUnion(e){let{type:t,offset:n=0,children:r=[]}=e,i=GV(t.ArrayType,e.typeIds),{length:a=i.length,nullCount:o=-1}=e;if(vU.isSparseUnion(t))return new MK(t,n,a,o,[void 0,void 0,void 0,i],r);let s=JV(e.valueOffsets);return new MK(t,n,a,o,[s,void 0,void 0,i],r)}visitDictionary(t){let{type:n,offset:r=0}=t,i=XV(t.nullBitmap),a=GV(n.indices.ArrayType,t.data),{dictionary:o=new iq([new e().visit({type:n.dictionary})])}=t,{length:s=a.length,nullCount:c=t.nullBitmap?-1:0}=t;return new MK(n,r,s,c,[void 0,a,i],[],o)}visitInterval(e){let{type:t,offset:n=0}=e,r=XV(e.nullBitmap),i=GV(t.ArrayType,e.data),{length:a=i.length/QU(t),nullCount:o=e.nullBitmap?-1:0}=e;return new MK(t,n,a,o,[void 0,i,r])}visitDuration(e){let{type:t,offset:n=0}=e,r=XV(e.nullBitmap),i=GV(t.ArrayType,e.data),{length:a=i.length,nullCount:o=e.nullBitmap?-1:0}=e;return new MK(t,n,a,o,[void 0,i,r])}visitFixedSizeList(t){let{type:n,offset:r=0,child:i=new e().visit({type:n.valueType})}=t,a=XV(t.nullBitmap),{length:o=i.length/QU(n),nullCount:s=t.nullBitmap?-1:0}=t;return new MK(n,r,o,s,[void 0,void 0,a],[i])}visitMap(t){let{type:n,offset:r=0,child:i=new e().visit({type:n.childType})}=t,a=XV(t.nullBitmap),o=JV(t.valueOffsets),{length:s=o.length-1,nullCount:c=t.nullBitmap?-1:0}=t;return new MK(n,r,s,c,[o,void 0,a],[i])}};const PK=new NK;var FK=class{constructor(e=0,t){this.numChunks=e,this.getChunkIterator=t,this.chunkIndex=0,this.chunkIterator=this.getChunkIterator(0)}next(){for(;this.chunkIndexe.nullable)}function LK(e){return e.reduce((e,t)=>e+t.nullCount,0)}function RK(e){return e.reduce((e,t,n)=>(e[n+1]=e[n]+t.length,e),new Uint32Array(e.length+1))}function zK(e,t,n,r){let i=[];for(let a=-1,o=e.length;++a=r)break;if(n>=s+c)continue;if(s>=n&&s+c<=r){i.push(o);continue}let l=Math.max(0,n-s),u=Math.min(r-s,c);i.push(o.slice(l,u-l))}return i.length===0&&i.push(e[0].slice(0,0)),i}function BK(e,t,n,r){let i=0,a=0,o=t.length-1;do{if(i>=o-1)return n0?0:-1}function qK(e,t){let{nullBitmap:n}=e;if(!n||e.nullCount<=0)return-1;let r=0;for(let i of new DK(n,e.offset+(t||0),e.length,n,SK)){if(!i)return r;++r}return-1}function JK(e,t,n){if(t===void 0)return-1;if(t===null)switch(e.typeId){case X.Union:break;case X.Dictionary:break;default:return qK(e,n)}let r=$G.getVisitFn(e),i=fK(t);for(let t=(n||0)-1,a=e.length;++t{let n=e.data[t];return n.values.subarray(0,n.length)[Symbol.iterator]()});let n=0;return new FK(e.data.length,t=>{let r=e.data[t],i=r.length,a=e.slice(n,n+i);return n+=i,new $K(a)})}var $K=class{constructor(e){this.vector=e,this.index=0}next(){return this.indexe.data):t;if(a.length===0||a.some(e=>!(e instanceof MK)))throw TypeError(`Vector constructor expects an Array of Data instances.`);let o=(n=a[0])?.type;switch(a.length){case 0:this._offsets=[0];break;case 1:{let{get:e,set:t,indexOf:n}=nq[o.typeId],r=a[0];this.isValid=e=>VK(r,e),this.get=t=>e(r,t),this.set=(e,n)=>t(r,e,n),this.indexOf=e=>n(r,e),this._offsets=[0,r.length];break}default:Object.setPrototypeOf(this,rq[o.typeId]),this._offsets=RK(a);break}this.data=a,this.type=o,this.stride=QU(o),this.numChildren=(i=(r=o.children)?.length)??0,this.length=this._offsets.at(-1)}get byteLength(){return this.data.reduce((e,t)=>e+t.byteLength,0)}get nullable(){return IK(this.data)}get nullCount(){return LK(this.data)}get ArrayType(){return this.type.ArrayType}get[Symbol.toStringTag](){return`${this.VectorName}<${this.type[Symbol.toStringTag]}>`}get VectorName(){return`${X[this.type.typeId]}Vector`}isValid(e){return!1}get(e){return null}at(e){return this.get(uK(e,this.length))}set(e,t){}indexOf(e,t){return-1}includes(e,t){return this.indexOf(e,t)>-1}[Symbol.iterator](){return eq.visit(this)}concat(...t){return new e(this.data.concat(t.flatMap(e=>e.data).flat(1/0)))}slice(t,n){return new e(lK(this,t,n,({data:e,_offsets:t},n,r)=>zK(e,t,n,r)))}toJSON(){return[...this]}toArray(){let{type:e,data:t,length:n,stride:r,ArrayType:i}=this;switch(e.typeId){case X.Int:case X.Float:case X.Decimal:case X.Time:case X.Timestamp:switch(t.length){case 0:return new i;case 1:return t[0].values.subarray(0,n*r);default:return t.reduce((e,{values:t,length:n})=>(e.array.set(t.subarray(0,n*r),e.offset),e.offset+=n*r,e),{array:new i(n*r),offset:0}).array}}return[...this]}toString(){return`[${[...this].join(`,`)}]`}getChild(e){var t;return this.getChildAt((t=this.type.children)?.findIndex(t=>t.name===e))}getChildAt(t){return t>-1&&te[t])):null}get isMemoized(){return vU.isDictionary(this.type)?this.data[0].dictionary.isMemoized:!1}memoize(){if(vU.isDictionary(this.type)){let t=new aq(this.data[0].dictionary),n=this.data.map(e=>{let n=e.clone();return n.dictionary=t,n});return new e(n)}return new aq(this)}unmemoize(){if(vU.isDictionary(this.type)&&this.isMemoized){let t=this.data[0].dictionary.unmemoize(),n=this.data.map(e=>{let n=e.clone();return n.dictionary=t,n});return new e(n)}return this}};tq=Symbol.toStringTag,iq[tq]=(e=>{e.type=vU.prototype,e.data=[],e.length=0,e.stride=1,e.numChildren=0,e._offsets=new Uint32Array([0]),e[Symbol.isConcatSpreadable]=!0;let t=Object.keys(X).map(e=>X[e]).filter(e=>typeof e==`number`&&e!==X.NONE);for(let n of t){let t=$G.getVisitFnByTypeId(n),r=tG.getVisitFnByTypeId(n),i=XK.getVisitFnByTypeId(n);nq[n]={get:t,set:r,indexOf:i},rq[n]=Object.create(e,{isValid:{value:HK(VK)},get:{value:HK($G.getVisitFnByTypeId(n))},set:{value:UK(tG.getVisitFnByTypeId(n))},indexOf:{value:WK(XK.getVisitFnByTypeId(n))}})}return`Vector`})(iq.prototype);var aq=class e extends iq{constructor(t){super(t.data);let n=this.get,r=this.set,i=this.slice,a=Array(this.length);Object.defineProperty(this,`get`,{value(e){let t=a[e];if(t!==void 0)return t;let r=n.call(this,e);return a[e]=r,r}}),Object.defineProperty(this,`set`,{value(e,t){r.call(this,e,t),a[e]=t}}),Object.defineProperty(this,`slice`,{value:(t,n)=>new e(i.call(this,t,n))}),Object.defineProperty(this,`isMemoized`,{value:!0}),Object.defineProperty(this,`unmemoize`,{value:()=>new iq(this.data)}),Object.defineProperty(this,`memoize`,{value:()=>this})}},oq={};xt(oq,{BaseInt64:()=>dq,Int128:()=>mq,Int64:()=>pq,Uint64:()=>fq});const sq=65536;function cq(e){return e<0&&(e=4294967295+e+1),`0x${e.toString(16)}`}const lq=8,uq=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8];var dq=class{constructor(e){this.buffer=e}high(){return this.buffer[1]}low(){return this.buffer[0]}_times(e){let t=new Uint32Array([this.buffer[1]>>>16,this.buffer[1]&65535,this.buffer[0]>>>16,this.buffer[0]&65535]),n=new Uint32Array([e.buffer[1]>>>16,e.buffer[1]&65535,e.buffer[0]>>>16,e.buffer[0]&65535]),r=t[3]*n[3];this.buffer[0]=r&65535;let i=r>>>16;return r=t[2]*n[3],i+=r,r=t[3]*n[2]>>>0,i+=r,this.buffer[0]+=i<<16,this.buffer[1]=i>>>0>>16,this.buffer[1]+=t[1]*n[3]+t[2]*n[2]+t[3]*n[1],this.buffer[1]+=t[0]*n[3]+t[1]*n[2]+t[2]*n[1]+t[3]*n[0]<<16,this}_plus(e){let t=this.buffer[0]+e.buffer[0]>>>0;this.buffer[1]+=e.buffer[1],t>>0&&++this.buffer[1],this.buffer[0]=t}lessThan(e){return this.buffer[1]>>0,t[2]=this.buffer[2]+e.buffer[2]>>>0,t[1]=this.buffer[1]+e.buffer[1]>>>0,t[0]=this.buffer[0]+e.buffer[0]>>>0,t[0]>>0&&++t[1],t[1]>>0&&++t[2],t[2]>>0&&++t[3],this.buffer[3]=t[3],this.buffer[2]=t[2],this.buffer[1]=t[1],this.buffer[0]=t[0],this}hex(){return`${cq(this.buffer[3])} ${cq(this.buffer[2])} ${cq(this.buffer[1])} ${cq(this.buffer[0])}`}static multiply(t,n){let r=new e(new Uint32Array(t.buffer));return r.times(n)}static add(t,n){let r=new e(new Uint32Array(t.buffer));return r.plus(n)}static from(t,n=new Uint32Array(4)){return e.fromString(typeof t==`string`?t:t.toString(),n)}static fromNumber(t,n=new Uint32Array(4)){return e.fromString(t.toString(),n)}static fromString(t,n=new Uint32Array(4)){let r=t.startsWith(`-`),i=t.length,a=new e(n);for(let n=r?1:0;ngq,toIntervalDayTimeObjects:()=>vq,toIntervalMonthDayNanoInt32Array:()=>_q,toIntervalMonthDayNanoObjects:()=>yq});function gq(e){var t,n;let r=e.length,i=new Int32Array(r*2);for(let a=0,o=0;a>BigInt(32))):o+=2}return i}function vq(e){let t=e.length,n=Array(t/2);for(let r=0,i=0;r>>0);r[a++]={months:e[i],days:e[i+1],nanoseconds:t?`${n}`:n}}return r}var bq=class extends $U{compareSchemas(e,t){return e===t||t instanceof e.constructor&&this.compareManyFields(e.fields,t.fields)}compareManyFields(e,t){return e===t||Array.isArray(e)&&Array.isArray(t)&&e.length===t.length&&e.every((e,n)=>this.compareFields(e,t[n]))}compareFields(e,t){return e===t||t instanceof e.constructor&&e.name===t.name&&e.nullable===t.nullable&&this.visit(e.type,t.type)}};function xq(e,t){return t instanceof e.constructor}function Sq(e,t){return e===t||xq(e,t)}function Cq(e,t){return e===t||xq(e,t)&&e.bitWidth===t.bitWidth&&e.isSigned===t.isSigned}function wq(e,t){return e===t||xq(e,t)&&e.precision===t.precision}function Tq(e,t){return e===t||xq(e,t)&&e.byteWidth===t.byteWidth}function Eq(e,t){return e===t||xq(e,t)&&e.unit===t.unit}function Dq(e,t){return e===t||xq(e,t)&&e.unit===t.unit&&e.timezone===t.timezone}function Oq(e,t){return e===t||xq(e,t)&&e.unit===t.unit&&e.bitWidth===t.bitWidth}function kq(e,t){return e===t||xq(e,t)&&e.children.length===t.children.length&&Lq.compareManyFields(e.children,t.children)}function Aq(e,t){return e===t||xq(e,t)&&e.children.length===t.children.length&&Lq.compareManyFields(e.children,t.children)}function jq(e,t){return e===t||xq(e,t)&&e.mode===t.mode&&e.typeIds.every((e,n)=>e===t.typeIds[n])&&Lq.compareManyFields(e.children,t.children)}function Mq(e,t){return e===t||xq(e,t)&&e.id===t.id&&e.isOrdered===t.isOrdered&&Lq.visit(e.indices,t.indices)&&Lq.visit(e.dictionary,t.dictionary)}function Nq(e,t){return e===t||xq(e,t)&&e.unit===t.unit}function Pq(e,t){return e===t||xq(e,t)&&e.unit===t.unit}function Fq(e,t){return e===t||xq(e,t)&&e.listSize===t.listSize&&e.children.length===t.children.length&&Lq.compareManyFields(e.children,t.children)}function Iq(e,t){return e===t||xq(e,t)&&e.keysSorted===t.keysSorted&&e.children.length===t.children.length&&Lq.compareManyFields(e.children,t.children)}bq.prototype.visitNull=Sq,bq.prototype.visitBool=Sq,bq.prototype.visitInt=Cq,bq.prototype.visitInt8=Cq,bq.prototype.visitInt16=Cq,bq.prototype.visitInt32=Cq,bq.prototype.visitInt64=Cq,bq.prototype.visitUint8=Cq,bq.prototype.visitUint16=Cq,bq.prototype.visitUint32=Cq,bq.prototype.visitUint64=Cq,bq.prototype.visitFloat=wq,bq.prototype.visitFloat16=wq,bq.prototype.visitFloat32=wq,bq.prototype.visitFloat64=wq,bq.prototype.visitUtf8=Sq,bq.prototype.visitLargeUtf8=Sq,bq.prototype.visitBinary=Sq,bq.prototype.visitLargeBinary=Sq,bq.prototype.visitFixedSizeBinary=Tq,bq.prototype.visitDate=Eq,bq.prototype.visitDateDay=Eq,bq.prototype.visitDateMillisecond=Eq,bq.prototype.visitTimestamp=Dq,bq.prototype.visitTimestampSecond=Dq,bq.prototype.visitTimestampMillisecond=Dq,bq.prototype.visitTimestampMicrosecond=Dq,bq.prototype.visitTimestampNanosecond=Dq,bq.prototype.visitTime=Oq,bq.prototype.visitTimeSecond=Oq,bq.prototype.visitTimeMillisecond=Oq,bq.prototype.visitTimeMicrosecond=Oq,bq.prototype.visitTimeNanosecond=Oq,bq.prototype.visitDecimal=Sq,bq.prototype.visitList=kq,bq.prototype.visitStruct=Aq,bq.prototype.visitUnion=jq,bq.prototype.visitDenseUnion=jq,bq.prototype.visitSparseUnion=jq,bq.prototype.visitDictionary=Mq,bq.prototype.visitInterval=Nq,bq.prototype.visitIntervalDayTime=Nq,bq.prototype.visitIntervalYearMonth=Nq,bq.prototype.visitIntervalMonthDayNano=Nq,bq.prototype.visitDuration=Pq,bq.prototype.visitDurationSecond=Pq,bq.prototype.visitDurationMillisecond=Pq,bq.prototype.visitDurationMicrosecond=Pq,bq.prototype.visitDurationNanosecond=Pq,bq.prototype.visitFixedSizeList=Fq,bq.prototype.visitMap=Iq;const Lq=new bq;function Rq(e,t){return Lq.compareSchemas(e,t)}function zq(e,t){return Lq.compareFields(e,t)}function Bq(e,t){return Lq.visit(e,t)}const Vq=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},LH),oq),xK),rW),BV),sK),MH),hq),{compareSchemas:Rq,compareFields:zq,compareTypes:Bq}),Hq=365.2425,Uq=10**8*24*60*60*1e3,Wq=6048e5,Gq=864e5,Kq=3600,qq=Kq*24,Jq=qq*7,Yq=qq*Hq,Xq=Yq/12,Zq=Xq*3,Qq=Symbol.for(`constructDateFrom`);function $q(e,t){return typeof e==`function`?e(t):e&&typeof e==`object`&&Qq in e?e[Qq](t):e instanceof Date?new e.constructor(t):new Date(t)}function eJ(e,t){return $q(t||e,e)}let tJ={};function nJ(){return tJ}function rJ(e,t){var n,r;let i=nJ(),a=t?.weekStartsOn??(t==null||(n=t.locale)==null||(n=n.options)==null?void 0:n.weekStartsOn)??i.weekStartsOn??((r=i.locale)==null||(r=r.options)==null?void 0:r.weekStartsOn)??0,o=eJ(e,t?.in),s=o.getDay(),c=(s=a.getTime()?r+1:n.getTime()>=s.getTime()?r:r-1}function oJ(e){let t=eJ(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),e-+n}function sJ(e,...t){let n=$q.bind(null,e||t.find(e=>typeof e==`object`));return t.map(n)}function cJ(e,t){let n=eJ(e,t?.in);return n.setHours(0,0,0,0),n}function lJ(e,t,n){let[r,i]=sJ(n?.in,e,t),a=cJ(r),o=cJ(i),s=+a-oJ(a),c=+o-oJ(o);return Math.round((s-c)/Gq)}function uJ(e,t){let n=aJ(e,t),r=$q(t?.in||e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),iJ(r)}function dJ(e){return e instanceof Date||typeof e==`object`&&Object.prototype.toString.call(e)===`[object Date]`}function fJ(e){return!(!dJ(e)&&typeof e!=`number`||isNaN(+eJ(e)))}function pJ(e,t){let n=eJ(e,t?.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}const mJ={lessThanXSeconds:{one:`less than a second`,other:`less than {{count}} seconds`},xSeconds:{one:`1 second`,other:`{{count}} seconds`},halfAMinute:`half a minute`,lessThanXMinutes:{one:`less than a minute`,other:`less than {{count}} minutes`},xMinutes:{one:`1 minute`,other:`{{count}} minutes`},aboutXHours:{one:`about 1 hour`,other:`about {{count}} hours`},xHours:{one:`1 hour`,other:`{{count}} hours`},xDays:{one:`1 day`,other:`{{count}} days`},aboutXWeeks:{one:`about 1 week`,other:`about {{count}} weeks`},xWeeks:{one:`1 week`,other:`{{count}} weeks`},aboutXMonths:{one:`about 1 month`,other:`about {{count}} months`},xMonths:{one:`1 month`,other:`{{count}} months`},aboutXYears:{one:`about 1 year`,other:`about {{count}} years`},xYears:{one:`1 year`,other:`{{count}} years`},overXYears:{one:`over 1 year`,other:`over {{count}} years`},almostXYears:{one:`almost 1 year`,other:`almost {{count}} years`}},hJ=(e,t,n)=>{let r,i=mJ[e];return r=typeof i==`string`?i:t===1?i.one:i.other.replace(`{{count}}`,t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?`in `+r:r+` ago`:r};function gJ(e){return(t={})=>{let n=t.width?String(t.width):e.defaultWidth,r=e.formats[n]||e.formats[e.defaultWidth];return r}}const _J={full:`EEEE, MMMM do, y`,long:`MMMM do, y`,medium:`MMM d, y`,short:`MM/dd/yyyy`},vJ={full:`h:mm:ss a zzzz`,long:`h:mm:ss a z`,medium:`h:mm:ss a`,short:`h:mm a`},yJ={full:`{{date}} 'at' {{time}}`,long:`{{date}} 'at' {{time}}`,medium:`{{date}}, {{time}}`,short:`{{date}}, {{time}}`},bJ={date:gJ({formats:_J,defaultWidth:`full`}),time:gJ({formats:vJ,defaultWidth:`full`}),dateTime:gJ({formats:yJ,defaultWidth:`full`})},xJ={lastWeek:`'last' eeee 'at' p`,yesterday:`'yesterday at' p`,today:`'today at' p`,tomorrow:`'tomorrow at' p`,nextWeek:`eeee 'at' p`,other:`P`},SJ=(e,t,n,r)=>xJ[e];function CJ(e){return(t,n)=>{let r=n?.context?String(n.context):`standalone`,i;if(r===`formatting`&&e.formattingValues){let t=e.defaultFormattingWidth||e.defaultWidth,r=n?.width?String(n.width):t;i=e.formattingValues[r]||e.formattingValues[t]}else{let t=e.defaultWidth,r=n?.width?String(n.width):e.defaultWidth;i=e.values[r]||e.values[t]}let a=e.argumentCallback?e.argumentCallback(t):t;return i[a]}}const wJ={narrow:[`B`,`A`],abbreviated:[`BC`,`AD`],wide:[`Before Christ`,`Anno Domini`]},TJ={narrow:[`1`,`2`,`3`,`4`],abbreviated:[`Q1`,`Q2`,`Q3`,`Q4`],wide:[`1st quarter`,`2nd quarter`,`3rd quarter`,`4th quarter`]},EJ={narrow:[`J`,`F`,`M`,`A`,`M`,`J`,`J`,`A`,`S`,`O`,`N`,`D`],abbreviated:[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`],wide:[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`]},DJ={narrow:[`S`,`M`,`T`,`W`,`T`,`F`,`S`],short:[`Su`,`Mo`,`Tu`,`We`,`Th`,`Fr`,`Sa`],abbreviated:[`Sun`,`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`],wide:[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`]},OJ={narrow:{am:`a`,pm:`p`,midnight:`mi`,noon:`n`,morning:`morning`,afternoon:`afternoon`,evening:`evening`,night:`night`},abbreviated:{am:`AM`,pm:`PM`,midnight:`midnight`,noon:`noon`,morning:`morning`,afternoon:`afternoon`,evening:`evening`,night:`night`},wide:{am:`a.m.`,pm:`p.m.`,midnight:`midnight`,noon:`noon`,morning:`morning`,afternoon:`afternoon`,evening:`evening`,night:`night`}},kJ={narrow:{am:`a`,pm:`p`,midnight:`mi`,noon:`n`,morning:`in the morning`,afternoon:`in the afternoon`,evening:`in the evening`,night:`at night`},abbreviated:{am:`AM`,pm:`PM`,midnight:`midnight`,noon:`noon`,morning:`in the morning`,afternoon:`in the afternoon`,evening:`in the evening`,night:`at night`},wide:{am:`a.m.`,pm:`p.m.`,midnight:`midnight`,noon:`noon`,morning:`in the morning`,afternoon:`in the afternoon`,evening:`in the evening`,night:`at night`}},AJ=(e,t)=>{let n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+`st`;case 2:return n+`nd`;case 3:return n+`rd`}return n+`th`},jJ={ordinalNumber:AJ,era:CJ({values:wJ,defaultWidth:`wide`}),quarter:CJ({values:TJ,defaultWidth:`wide`,argumentCallback:e=>e-1}),month:CJ({values:EJ,defaultWidth:`wide`}),day:CJ({values:DJ,defaultWidth:`wide`}),dayPeriod:CJ({values:OJ,defaultWidth:`wide`,formattingValues:kJ,defaultFormattingWidth:`wide`})};function MJ(e){return(t,n={})=>{let r=n.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],a=t.match(i);if(!a)return null;let o=a[0],s=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(s)?PJ(s,e=>e.test(o)):NJ(s,e=>e.test(o)),l;l=e.valueCallback?e.valueCallback(c):c,l=n.valueCallback?n.valueCallback(l):l;let u=t.slice(o.length);return{value:l,rest:u}}}function NJ(e,t){for(let n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function PJ(e,t){for(let n=0;n{let r=t.match(e.matchPattern);if(!r)return null;let i=r[0],a=t.match(e.parsePattern);if(!a)return null;let o=e.valueCallback?e.valueCallback(a[0]):a[0];o=n.valueCallback?n.valueCallback(o):o;let s=t.slice(i.length);return{value:o,rest:s}}}const IJ=/^(\d+)(th|st|nd|rd)?/i,LJ=/\d+/i,RJ={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},zJ={any:[/^b/i,/^(a|c)/i]},BJ={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},VJ={any:[/1/i,/2/i,/3/i,/4/i]},HJ={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},UJ={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},WJ={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},GJ={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},KJ={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},qJ={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},JJ={ordinalNumber:FJ({matchPattern:IJ,parsePattern:LJ,valueCallback:e=>parseInt(e,10)}),era:MJ({matchPatterns:RJ,defaultMatchWidth:`wide`,parsePatterns:zJ,defaultParseWidth:`any`}),quarter:MJ({matchPatterns:BJ,defaultMatchWidth:`wide`,parsePatterns:VJ,defaultParseWidth:`any`,valueCallback:e=>e+1}),month:MJ({matchPatterns:HJ,defaultMatchWidth:`wide`,parsePatterns:UJ,defaultParseWidth:`any`}),day:MJ({matchPatterns:WJ,defaultMatchWidth:`wide`,parsePatterns:GJ,defaultParseWidth:`any`}),dayPeriod:MJ({matchPatterns:KJ,defaultMatchWidth:`any`,parsePatterns:qJ,defaultParseWidth:`any`})},YJ={code:`en-US`,formatDistance:hJ,formatLong:bJ,formatRelative:SJ,localize:jJ,match:JJ,options:{weekStartsOn:0,firstWeekContainsDate:1}};function XJ(e,t){let n=eJ(e,t?.in),r=lJ(n,pJ(n)),i=r+1;return i}function ZJ(e,t){let n=eJ(e,t?.in),r=iJ(n)-+uJ(n);return Math.round(r/Wq)+1}function QJ(e,t){var n,r;let i=eJ(e,t?.in),a=i.getFullYear(),o=nJ(),s=t?.firstWeekContainsDate??(t==null||(n=t.locale)==null||(n=n.options)==null?void 0:n.firstWeekContainsDate)??o.firstWeekContainsDate??((r=o.locale)==null||(r=r.options)==null?void 0:r.firstWeekContainsDate)??1,c=$q(t?.in||e,0);c.setFullYear(a+1,0,s),c.setHours(0,0,0,0);let l=rJ(c,t),u=$q(t?.in||e,0);u.setFullYear(a,0,s),u.setHours(0,0,0,0);let d=rJ(u,t);return+i>=+l?a+1:+i>=+d?a:a-1}function $J(e,t){var n,r;let i=nJ(),a=t?.firstWeekContainsDate??(t==null||(n=t.locale)==null||(n=n.options)==null?void 0:n.firstWeekContainsDate)??i.firstWeekContainsDate??((r=i.locale)==null||(r=r.options)==null?void 0:r.firstWeekContainsDate)??1,o=QJ(e,t),s=$q(t?.in||e,0);s.setFullYear(o,0,a),s.setHours(0,0,0,0);let c=rJ(s,t);return c}function eY(e,t){let n=eJ(e,t?.in),r=rJ(n,t)-+$J(n,t);return Math.round(r/Wq)+1}function tY(e,t){let n=e<0?`-`:``,r=Math.abs(e).toString().padStart(t,`0`);return n+r}const nY={y(e,t){let n=e.getFullYear(),r=n>0?n:1-n;return tY(t===`yy`?r%100:r,t.length)},M(e,t){let n=e.getMonth();return t===`M`?String(n+1):tY(n+1,2)},d(e,t){return tY(e.getDate(),t.length)},a(e,t){let n=e.getHours()/12>=1?`pm`:`am`;switch(t){case`a`:case`aa`:return n.toUpperCase();case`aaa`:return n;case`aaaaa`:return n[0];case`aaaa`:default:return n===`am`?`a.m.`:`p.m.`}},h(e,t){return tY(e.getHours()%12||12,t.length)},H(e,t){return tY(e.getHours(),t.length)},m(e,t){return tY(e.getMinutes(),t.length)},s(e,t){return tY(e.getSeconds(),t.length)},S(e,t){let n=t.length,r=e.getMilliseconds(),i=Math.trunc(r*10**(n-3));return tY(i,t.length)}},rY={am:`am`,pm:`pm`,midnight:`midnight`,noon:`noon`,morning:`morning`,afternoon:`afternoon`,evening:`evening`,night:`night`},iY={G:function(e,t,n){let r=e.getFullYear()>0?1:0;switch(t){case`G`:case`GG`:case`GGG`:return n.era(r,{width:`abbreviated`});case`GGGGG`:return n.era(r,{width:`narrow`});case`GGGG`:default:return n.era(r,{width:`wide`})}},y:function(e,t,n){if(t===`yo`){let t=e.getFullYear(),r=t>0?t:1-t;return n.ordinalNumber(r,{unit:`year`})}return nY.y(e,t)},Y:function(e,t,n,r){let i=QJ(e,r),a=i>0?i:1-i;if(t===`YY`){let e=a%100;return tY(e,2)}return t===`Yo`?n.ordinalNumber(a,{unit:`year`}):tY(a,t.length)},R:function(e,t){let n=aJ(e);return tY(n,t.length)},u:function(e,t){let n=e.getFullYear();return tY(n,t.length)},Q:function(e,t,n){let r=Math.ceil((e.getMonth()+1)/3);switch(t){case`Q`:return String(r);case`QQ`:return tY(r,2);case`Qo`:return n.ordinalNumber(r,{unit:`quarter`});case`QQQ`:return n.quarter(r,{width:`abbreviated`,context:`formatting`});case`QQQQQ`:return n.quarter(r,{width:`narrow`,context:`formatting`});case`QQQQ`:default:return n.quarter(r,{width:`wide`,context:`formatting`})}},q:function(e,t,n){let r=Math.ceil((e.getMonth()+1)/3);switch(t){case`q`:return String(r);case`qq`:return tY(r,2);case`qo`:return n.ordinalNumber(r,{unit:`quarter`});case`qqq`:return n.quarter(r,{width:`abbreviated`,context:`standalone`});case`qqqqq`:return n.quarter(r,{width:`narrow`,context:`standalone`});case`qqqq`:default:return n.quarter(r,{width:`wide`,context:`standalone`})}},M:function(e,t,n){let r=e.getMonth();switch(t){case`M`:case`MM`:return nY.M(e,t);case`Mo`:return n.ordinalNumber(r+1,{unit:`month`});case`MMM`:return n.month(r,{width:`abbreviated`,context:`formatting`});case`MMMMM`:return n.month(r,{width:`narrow`,context:`formatting`});case`MMMM`:default:return n.month(r,{width:`wide`,context:`formatting`})}},L:function(e,t,n){let r=e.getMonth();switch(t){case`L`:return String(r+1);case`LL`:return tY(r+1,2);case`Lo`:return n.ordinalNumber(r+1,{unit:`month`});case`LLL`:return n.month(r,{width:`abbreviated`,context:`standalone`});case`LLLLL`:return n.month(r,{width:`narrow`,context:`standalone`});case`LLLL`:default:return n.month(r,{width:`wide`,context:`standalone`})}},w:function(e,t,n,r){let i=eY(e,r);return t===`wo`?n.ordinalNumber(i,{unit:`week`}):tY(i,t.length)},I:function(e,t,n){let r=ZJ(e);return t===`Io`?n.ordinalNumber(r,{unit:`week`}):tY(r,t.length)},d:function(e,t,n){return t===`do`?n.ordinalNumber(e.getDate(),{unit:`date`}):nY.d(e,t)},D:function(e,t,n){let r=XJ(e);return t===`Do`?n.ordinalNumber(r,{unit:`dayOfYear`}):tY(r,t.length)},E:function(e,t,n){let r=e.getDay();switch(t){case`E`:case`EE`:case`EEE`:return n.day(r,{width:`abbreviated`,context:`formatting`});case`EEEEE`:return n.day(r,{width:`narrow`,context:`formatting`});case`EEEEEE`:return n.day(r,{width:`short`,context:`formatting`});case`EEEE`:default:return n.day(r,{width:`wide`,context:`formatting`})}},e:function(e,t,n,r){let i=e.getDay(),a=(i-r.weekStartsOn+8)%7||7;switch(t){case`e`:return String(a);case`ee`:return tY(a,2);case`eo`:return n.ordinalNumber(a,{unit:`day`});case`eee`:return n.day(i,{width:`abbreviated`,context:`formatting`});case`eeeee`:return n.day(i,{width:`narrow`,context:`formatting`});case`eeeeee`:return n.day(i,{width:`short`,context:`formatting`});case`eeee`:default:return n.day(i,{width:`wide`,context:`formatting`})}},c:function(e,t,n,r){let i=e.getDay(),a=(i-r.weekStartsOn+8)%7||7;switch(t){case`c`:return String(a);case`cc`:return tY(a,t.length);case`co`:return n.ordinalNumber(a,{unit:`day`});case`ccc`:return n.day(i,{width:`abbreviated`,context:`standalone`});case`ccccc`:return n.day(i,{width:`narrow`,context:`standalone`});case`cccccc`:return n.day(i,{width:`short`,context:`standalone`});case`cccc`:default:return n.day(i,{width:`wide`,context:`standalone`})}},i:function(e,t,n){let r=e.getDay(),i=r===0?7:r;switch(t){case`i`:return String(i);case`ii`:return tY(i,t.length);case`io`:return n.ordinalNumber(i,{unit:`day`});case`iii`:return n.day(r,{width:`abbreviated`,context:`formatting`});case`iiiii`:return n.day(r,{width:`narrow`,context:`formatting`});case`iiiiii`:return n.day(r,{width:`short`,context:`formatting`});case`iiii`:default:return n.day(r,{width:`wide`,context:`formatting`})}},a:function(e,t,n){let r=e.getHours(),i=r/12>=1?`pm`:`am`;switch(t){case`a`:case`aa`:return n.dayPeriod(i,{width:`abbreviated`,context:`formatting`});case`aaa`:return n.dayPeriod(i,{width:`abbreviated`,context:`formatting`}).toLowerCase();case`aaaaa`:return n.dayPeriod(i,{width:`narrow`,context:`formatting`});case`aaaa`:default:return n.dayPeriod(i,{width:`wide`,context:`formatting`})}},b:function(e,t,n){let r=e.getHours(),i;switch(i=r===12?rY.noon:r===0?rY.midnight:r/12>=1?`pm`:`am`,t){case`b`:case`bb`:return n.dayPeriod(i,{width:`abbreviated`,context:`formatting`});case`bbb`:return n.dayPeriod(i,{width:`abbreviated`,context:`formatting`}).toLowerCase();case`bbbbb`:return n.dayPeriod(i,{width:`narrow`,context:`formatting`});case`bbbb`:default:return n.dayPeriod(i,{width:`wide`,context:`formatting`})}},B:function(e,t,n){let r=e.getHours(),i;switch(i=r>=17?rY.evening:r>=12?rY.afternoon:r>=4?rY.morning:rY.night,t){case`B`:case`BB`:case`BBB`:return n.dayPeriod(i,{width:`abbreviated`,context:`formatting`});case`BBBBB`:return n.dayPeriod(i,{width:`narrow`,context:`formatting`});case`BBBB`:default:return n.dayPeriod(i,{width:`wide`,context:`formatting`})}},h:function(e,t,n){if(t===`ho`){let t=e.getHours()%12;return t===0&&(t=12),n.ordinalNumber(t,{unit:`hour`})}return nY.h(e,t)},H:function(e,t,n){return t===`Ho`?n.ordinalNumber(e.getHours(),{unit:`hour`}):nY.H(e,t)},K:function(e,t,n){let r=e.getHours()%12;return t===`Ko`?n.ordinalNumber(r,{unit:`hour`}):tY(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t===`ko`?n.ordinalNumber(r,{unit:`hour`}):tY(r,t.length)},m:function(e,t,n){return t===`mo`?n.ordinalNumber(e.getMinutes(),{unit:`minute`}):nY.m(e,t)},s:function(e,t,n){return t===`so`?n.ordinalNumber(e.getSeconds(),{unit:`second`}):nY.s(e,t)},S:function(e,t){return nY.S(e,t)},X:function(e,t,n){let r=e.getTimezoneOffset();if(r===0)return`Z`;switch(t){case`X`:return oY(r);case`XXXX`:case`XX`:return sY(r);case`XXXXX`:case`XXX`:default:return sY(r,`:`)}},x:function(e,t,n){let r=e.getTimezoneOffset();switch(t){case`x`:return oY(r);case`xxxx`:case`xx`:return sY(r);case`xxxxx`:case`xxx`:default:return sY(r,`:`)}},O:function(e,t,n){let r=e.getTimezoneOffset();switch(t){case`O`:case`OO`:case`OOO`:return`GMT`+aY(r,`:`);case`OOOO`:default:return`GMT`+sY(r,`:`)}},z:function(e,t,n){let r=e.getTimezoneOffset();switch(t){case`z`:case`zz`:case`zzz`:return`GMT`+aY(r,`:`);case`zzzz`:default:return`GMT`+sY(r,`:`)}},t:function(e,t,n){let r=Math.trunc(e/1e3);return tY(r,t.length)},T:function(e,t,n){return tY(+e,t.length)}};function aY(e,t=``){let n=e>0?`-`:`+`,r=Math.abs(e),i=Math.trunc(r/60),a=r%60;return a===0?n+String(i):n+String(i)+t+tY(a,2)}function oY(e,t){if(e%60==0){let t=e>0?`-`:`+`;return t+tY(Math.abs(e)/60,2)}return sY(e,t)}function sY(e,t=``){let n=e>0?`-`:`+`,r=Math.abs(e),i=tY(Math.trunc(r/60),2),a=tY(r%60,2);return n+i+t+a}const cY=(e,t)=>{switch(e){case`P`:return t.date({width:`short`});case`PP`:return t.date({width:`medium`});case`PPP`:return t.date({width:`long`});case`PPPP`:default:return t.date({width:`full`})}},lY=(e,t)=>{switch(e){case`p`:return t.time({width:`short`});case`pp`:return t.time({width:`medium`});case`ppp`:return t.time({width:`long`});case`pppp`:default:return t.time({width:`full`})}},uY=(e,t)=>{let n=e.match(/(P+)(p+)?/)||[],r=n[1],i=n[2];if(!i)return cY(e,t);let a;switch(r){case`P`:a=t.dateTime({width:`short`});break;case`PP`:a=t.dateTime({width:`medium`});break;case`PPP`:a=t.dateTime({width:`long`});break;case`PPPP`:default:a=t.dateTime({width:`full`});break}return a.replace(`{{date}}`,cY(r,t)).replace(`{{time}}`,lY(i,t))},dY={p:lY,P:uY},fY=/^D+$/,pY=/^Y+$/,mY=[`D`,`DD`,`YY`,`YYYY`];function hY(e){return fY.test(e)}function gY(e){return pY.test(e)}function _Y(e,t,n){let r=vY(e,t,n);if(console.warn(r),mY.includes(e))throw RangeError(r)}function vY(e,t,n){let r=e[0]===`Y`?`years`:`days of the month`;return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const yY=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,bY=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,xY=/^'([^]*?)'?$/,SY=/''/g,CY=/[a-zA-Z]/;function wY(e,t,n){var r,i,a,o;let s=nJ(),c=n?.locale??s.locale??YJ,l=n?.firstWeekContainsDate??(n==null||(r=n.locale)==null||(r=r.options)==null?void 0:r.firstWeekContainsDate)??s.firstWeekContainsDate??((i=s.locale)==null||(i=i.options)==null?void 0:i.firstWeekContainsDate)??1,u=n?.weekStartsOn??(n==null||(a=n.locale)==null||(a=a.options)==null?void 0:a.weekStartsOn)??s.weekStartsOn??((o=s.locale)==null||(o=o.options)==null?void 0:o.weekStartsOn)??0,d=eJ(e,n?.in);if(!fJ(d))throw RangeError(`Invalid time value`);let f=t.match(bY).map(e=>{let t=e[0];if(t===`p`||t===`P`){let n=dY[t];return n(e,c.formatLong)}return e}).join(``).match(yY).map(e=>{if(e===`''`)return{isToken:!1,value:`'`};let t=e[0];if(t===`'`)return{isToken:!1,value:TY(e)};if(iY[t])return{isToken:!0,value:e};if(t.match(CY))throw RangeError("Format string contains an unescaped latin alphabet character `"+t+"`");return{isToken:!1,value:e}});c.localize.preprocessor&&(f=c.localize.preprocessor(d,f));let p={firstWeekContainsDate:l,weekStartsOn:u,locale:c};return f.map(r=>{if(!r.isToken)return r.value;let i=r.value;(!n?.useAdditionalWeekYearTokens&&gY(i)||!n?.useAdditionalDayOfYearTokens&&hY(i))&&_Y(i,t,String(e));let a=iY[i[0]];return a(d,i,c.localize,p)}).join(``)}function TY(e){let t=e.match(xY);return t?t[1].replace(SY,`'`):e}function EY(e,t){return eJ(e*1e3,t?.in)}function DY(e,t){let n=OY(t)?new t(0):$q(t,0);return n.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),n.setHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),n}function OY(e){var t;return typeof e==`function`&&(t=e.prototype)?.constructor===e}function kY(e,t){if(t===void 0)return e.trimEnd();let n=e.length;switch(typeof t){case`string`:if(t.length!==1)throw Error(`The 'chars' parameter should be a single character string.`);for(;n>0&&e[n-1]===t;)n--;break;case`object`:for(;n>0&&t.includes(e[n-1]);)n--}return e.substring(0,n)}function AY(e){return e==null}function jY(e){return e!=null}async function MY(){if(typeof window<`u`&&window!==null)return`browser`;try{let e=await Et(()=>import(`./__vite-browser-external-BQ5eJQsZ.js`).then(wt(1)),__vite__mapDeps([0,1,2,3]));return e!==void 0&&e.versions!=null&&e.versions.node!=null?`node`:`unknown`}catch{return`unknown`}}function NY(e){return AY(e)?!1:vU.isInt(e.type)&&!zY(e)||PY(e)}function PY(e){return AY(e)?!1:vU.isInt(e.type)&&e.type.isSigned===!1}function FY(e){return AY(e)?!1:vU.isFloat(e.type)??!1}function IY(e){return AY(e)?!1:vU.isDecimal(e.type)}function LY(e){return AY(e)?!1:vU.isBool(e.type)}function RY(e){return AY(e)?!1:vU.isDuration(e.type)}function zY(e){return AY(e)?!1:vU.isInt(e.type)&&e.metadata.get(`ARROW:extension:name`)===`period`}function BY(e){return AY(e)?!1:vU.isTimestamp(e.type)}function VY(e){return AY(e)?!1:vU.isDate(e.type)}function HY(e){return AY(e)?!1:vU.isTime(e.type)}function UY(e){return AY(e)?!1:vU.isList(e.type)||vU.isFixedSizeList(e.type)}function WY(e){return AY(e)?!1:vU.isStruct(e.type)||vU.isMap(e.type)}function GY(e){return AY(e)?!1:vU.isStruct(e.type)&&e.metadata.get(`ARROW:extension:name`)===`interval`||vU.isInterval(e.type)}const KY=new Date(1970,0,1);function qY(e,t){let n;if(t===kH.MILLISECOND)n=1e3;else if(t===kH.MICROSECOND)n=1e3*1e3;else if(t===kH.NANOSECOND)n=1e3*1e3*1e3;else return Number(e);return typeof e==`bigint`&&!Number.isSafeInteger(Number(e))?Number(e/BigInt(n)):Number(e)/n}function JY(e,t){var n;let r=qY(e,(t==null||(n=t.type)==null?void 0:n.unit)??kH.SECOND);return EY(r)}function YY(e,t){let n=JY(e,t);return wY(n,n.getMilliseconds()===0?`HH:mm:ss`:`HH:mm:ss.SSS`)}function XY(e){let t=`yyyy-MM-dd`;return e instanceof Date||typeof e==`number`&&Number.isFinite(e)?wY(e,t):(console.warn(`Unsupported date value: ${e}`),String(e))}function ZY(e,t){var n;if(!(e instanceof Date||typeof e==`number`&&Number.isFinite(e)))return console.warn(`Unsupported datetime value: ${e}`),null;let r,i=t==null||(n=t.type)==null?void 0:n.timezone;return r=i?new SV(e,i):new SV(e),DY(r,Date)}function QY(e,t){var n;let r=(t==null||(n=t.type)==null?void 0:n.scale)||0,i=Vq.bigNumToString(new Vq.BN(e)).padStart(r,`0`);if(r===0)return i;let a=``;i.startsWith(`-`)&&(a=`-`,i=i.slice(1));let o=i.slice(0,-r)||`0`,s=kY(i.slice(-r),`0`)||``;return`${a}${o}${s?`.${s}`:``}`}const $Y=new Intl.NumberFormat(`en-US`,{style:`decimal`,maximumFractionDigits:4,minimumFractionDigits:4,useGrouping:!0});function eX(e){let t=e[0],n=e[1],r=[];return t!==0&&r.push(`${t} year${t>1?`s`:``}`),n!==0&&r.push(`${n} month${n>1?`s`:``}`),r.length?r.join(` `):`0 months`}function tX(e,t){if(vU.isInterval(t?.type))return eX(e);let n=t&&t.metadata.get(`ARROW:extension:name`);if(n&&n===`pandas.interval`){var r,i;let n=JSON.parse(t.metadata.get(`ARROW:extension:metadata`)),{closed:a}=n,o=e.toJSON(),s=a===`both`||a===`left`?`[`:`(`,c=a===`both`||a===`right`?`]`:`)`,l=rX(o.left,(r=t.type)==null||(r=r.children)==null?void 0:r[0]),u=rX(o.right,(i=t.type)==null||(i=i.children)==null?void 0:i[1]);return`${s+l}, ${u+c}`}return String(e)}function nX(e,t){return t?.type instanceof GU?JSON.parse(JSON.stringify(e,(e,t)=>{if(jY(t))return typeof t==`bigint`?Number(t):t})):JSON.parse(JSON.stringify(e,(e,t)=>typeof t==`bigint`?Number(t):t))}function rX(e,t){if(AY(e))return null;let n=e instanceof Date||Number.isFinite(e);if(n&&VY(t))return XY(e);if(typeof e==`bigint`&&HY(t))return YY(Number(e),t);if(n&&BY(t))return ZY(e,t);if(zY(t))throw Error(`Period type is not supported yet`);if(GY(t))return tX(e,t);if(RY(t))throw Error(`Duration type is not supported yet`);return IY(t)?QY(e,t):FY(t)&&Number.isFinite(e)||NY(t)?e:WY(t)||UY(t)?nX(e,t):LY(t)?!!e:String(e)}function iX(e){let t=(e.toArray()||[]).map(e=>e.toJSON())||[],n=t.map(t=>(e.schema.fields.forEach(e=>t[e.name]=rX(t[e.name],e)),t));return n}let aX=function(e){return e.ORIGIN_PRIVATE_FS=`origin-private-fs`,e.NODE_FS=`node-fs`,e}({});async function oX(e){let t=Nt(e,{logger:!1}),n,r,i=await MY();if(i===`browser`){if(t.bundles===void 0){let{getBundles:e}=await Et(async()=>{let{getBundles:e}=await import(`./default-browser-DTRWbcB3.js`);return{getBundles:e}},[]);t.bundles=await e()}r=await mV(await t.bundles),n=new Worker(r.mainWorker)}else if(i===`node`){if(t.bundles===void 0){let{getBundles:e}=await Et(async()=>{let{getBundles:e}=await import(`./default-node-CQhep7iX.js`);return{getBundles:e}},__vite__mapDeps([4,2,3]));t.bundles=await e()}r=await mV(await t.bundles);let e=r.mainWorker;e.startsWith(`/@fs/`)&&(e=e.replace(`/@fs/`,`file://`));let i=await Et(()=>import(`./browser-CMSJHaBF.js`),[]);n=new i.default(e,{type:`module`})}else throw Error(`Unsupported environment: ${i}`);let a;a=t.logger===!0?new MB:t.logger===!1?new jB:t.logger;let o=new UB(a,n);if(await o.instantiate(r.mainModule,r.pthreadWorker),t.storage)switch(t.storage.type){case aX.ORIGIN_PRIVATE_FS:try{let e=t.storage.path;e.startsWith(`/`)&&(e=e.slice(1)),await o.open({path:`opfs://${e}`,accessMode:t.storage.accessMode})}catch(e){throw await o.terminate(),await n.terminate(),e}break;case aX.NODE_FS:try{await o.open({path:t.storage.path,accessMode:t.storage.accessMode,useDirectIO:!0})}catch(e){throw await o.terminate(),await n.terminate(),e}break}let s=await o.connect();async function c(e,t=[]){if(!t||t.length===0){let t=await s.query(e);return{_results:t,_schema:t.schema,columns:t.schema.fields,rows:iX(t)}}let n=await s.prepare(e),r=await n.query(...t);return n.close(),{_results:r,_schema:r.schema,columns:r.schema.fields,rows:iX(r)}}return{worker:n,db:o,conn:s,query:async(e,t=[])=>c(e,t).then(e=>e.rows),queryWithColumns:async(e,t=[])=>c(e,t),close:async()=>{await s.close(),await o.terminate(),await n.terminate()}}}async function sX(e,t){await(await e).conn.send(`BEGIN TRANSACTION`);try{let n=await t(e);return await(await e).conn.send(`COMMIT`),n}catch(t){throw await(await e).conn.send(`ROLLBACK`),t}}async function cX(e,t,n){await(await e).conn.send(`SAVEPOINT ${t}`);try{let r=await n(e);return await(await e).conn.send(`RELEASE SAVEPOINT ${t}`),r}catch(n){throw await(await e).conn.send(`ROLLBACK TO SAVEPOINT ${t}`),n}}const Z=Symbol.for(`drizzle:entityKind`),lX=Symbol.for(`drizzle:hasOwnEntityKind`);function Q(e,t){if(!e||typeof e!=`object`)return!1;if(e instanceof t)return!0;if(!Object.prototype.hasOwnProperty.call(t,Z))throw Error(`Class "${t.name??``}" doesn't look like a Drizzle entity. If this is incorrect and the class is provided by Drizzle, please report this as a bug.`);let n=Object.getPrototypeOf(e).constructor;if(n)for(;n;){if(Z in n&&n[Z]===t[Z])return!0;n=Object.getPrototypeOf(n)}return!1}var uX=(pr=class{constructor(t,n){e.defineProperty(this,`name`,void 0),e.defineProperty(this,`keyAsName`,void 0),e.defineProperty(this,`primary`,void 0),e.defineProperty(this,`notNull`,void 0),e.defineProperty(this,`default`,void 0),e.defineProperty(this,`defaultFn`,void 0),e.defineProperty(this,`onUpdateFn`,void 0),e.defineProperty(this,`hasDefault`,void 0),e.defineProperty(this,`isUnique`,void 0),e.defineProperty(this,`uniqueName`,void 0),e.defineProperty(this,`uniqueType`,void 0),e.defineProperty(this,`dataType`,void 0),e.defineProperty(this,`columnType`,void 0),e.defineProperty(this,`enumValues`,void 0),e.defineProperty(this,`generated`,void 0),e.defineProperty(this,`generatedIdentity`,void 0),e.defineProperty(this,`config`,void 0),this.table=t,this.config=n,this.name=n.name,this.keyAsName=n.keyAsName,this.notNull=n.notNull,this.default=n.default,this.defaultFn=n.defaultFn,this.onUpdateFn=n.onUpdateFn,this.hasDefault=n.hasDefault,this.primary=n.primaryKey,this.isUnique=n.isUnique,this.uniqueName=n.uniqueName,this.uniqueType=n.uniqueType,this.dataType=n.dataType,this.columnType=n.columnType,this.generated=n.generated,this.generatedIdentity=n.generatedIdentity}mapFromDriverValue(e){return e}mapToDriverValue(e){return e}shouldDisableInsert(){return this.config.generated!==void 0&&this.config.generated.type!==`byDefault`}},e.defineProperty(pr,Z,`Column`),pr),dX=(mr=class{constructor(t,n,r){e.defineProperty(this,`config`,void 0),e.defineProperty(this,`$default`,this.$defaultFn),e.defineProperty(this,`$onUpdate`,this.$onUpdateFn),this.config={name:t,keyAsName:t===``,notNull:!1,default:void 0,hasDefault:!1,primaryKey:!1,isUnique:!1,uniqueName:void 0,uniqueType:void 0,dataType:n,columnType:r,generated:void 0}}$type(){return this}notNull(){return this.config.notNull=!0,this}default(e){return this.config.default=e,this.config.hasDefault=!0,this}$defaultFn(e){return this.config.defaultFn=e,this.config.hasDefault=!0,this}$onUpdateFn(e){return this.config.onUpdateFn=e,this.config.hasDefault=!0,this}primaryKey(){return this.config.primaryKey=!0,this.config.notNull=!0,this}setName(e){this.config.name===``&&(this.config.name=e)}},e.defineProperty(mr,Z,`ColumnBuilder`),mr);const fX=Symbol.for(`drizzle:Name`);var pX=(hr=class{constructor(t,n){e.defineProperty(this,`reference`,void 0),e.defineProperty(this,`_onUpdate`,`no action`),e.defineProperty(this,`_onDelete`,`no action`),this.reference=()=>{let{name:e,columns:n,foreignColumns:r}=t();return{name:e,columns:n,foreignTable:r[0].table,foreignColumns:r}},n&&(this._onUpdate=n.onUpdate,this._onDelete=n.onDelete)}onUpdate(e){return this._onUpdate=e===void 0?`no action`:e,this}onDelete(e){return this._onDelete=e===void 0?`no action`:e,this}build(e){return new mX(e,this)}},e.defineProperty(hr,Z,`PgForeignKeyBuilder`),hr),mX=(gr=class{constructor(t,n){e.defineProperty(this,`reference`,void 0),e.defineProperty(this,`onUpdate`,void 0),e.defineProperty(this,`onDelete`,void 0),this.table=t,this.reference=n.reference,this.onUpdate=n._onUpdate,this.onDelete=n._onDelete}getName(){let{name:e,columns:t,foreignColumns:n}=this.reference(),r=t.map(e=>e.name),i=n.map(e=>e.name),a=[this.table[fX],...r,n[0].table[fX],...i];return e??`${a.join(`_`)}_fk`}},e.defineProperty(gr,Z,`PgForeignKey`),gr);function hX(e,...t){return e(...t)}function gX(e,t){return`${e[fX]}_${t.join(`_`)}_unique`}var _X=(_r=class{constructor(t,n){e.defineProperty(this,`columns`,void 0),e.defineProperty(this,`nullsNotDistinctConfig`,!1),this.name=n,this.columns=t}nullsNotDistinct(){return this.nullsNotDistinctConfig=!0,this}build(e){return new yX(e,this.columns,this.nullsNotDistinctConfig,this.name)}},e.defineProperty(_r,Z,`PgUniqueConstraintBuilder`),_r),vX=(vr=class{constructor(t){e.defineProperty(this,`name`,void 0),this.name=t}on(...e){return new _X(e,this.name)}},e.defineProperty(vr,Z,`PgUniqueOnConstraintBuilder`),vr),yX=(yr=class{constructor(t,n,r,i){e.defineProperty(this,`columns`,void 0),e.defineProperty(this,`name`,void 0),e.defineProperty(this,`nullsNotDistinct`,!1),this.table=t,this.columns=n,this.name=i??gX(this.table,this.columns.map(e=>e.name)),this.nullsNotDistinct=r}getName(){return this.name}},e.defineProperty(yr,Z,`PgUniqueConstraint`),yr);function bX(e,t,n){for(let r=t;rArray.isArray(e)?CX(e):typeof e==`string`?`"${e.replace(/\\/g,`\\\\`).replace(/"/g,`\\"`)}"`:`${e}`).join(`,`)}}`}var wX=(br=class extends dX{constructor(...t){super(...t),e.defineProperty(this,`foreignKeyConfigs`,[])}array(e){return new OX(this.config.name,this,e)}references(e,t={}){return this.foreignKeyConfigs.push({ref:e,actions:t}),this}unique(e,t){return this.config.isUnique=!0,this.config.uniqueName=e,this.config.uniqueType=t?.nulls,this}generatedAlwaysAs(e){return this.config.generated={as:e,type:`always`,mode:`stored`},this}buildForeignKeys(e,t){return this.foreignKeyConfigs.map(({ref:n,actions:r})=>hX((n,r)=>{let i=new pX(()=>{let t=n();return{columns:[e],foreignColumns:[t]}});return r.onUpdate&&i.onUpdate(r.onUpdate),r.onDelete&&i.onDelete(r.onDelete),i.build(t)},n,r))}buildExtraConfigColumn(e){return new EX(e,this.config)}},e.defineProperty(br,Z,`PgColumnBuilder`),br),TX=(xr=class extends uX{constructor(e,t){t.uniqueName||=gX(e,[t.name]),super(e,t),this.table=e}},e.defineProperty(xr,Z,`PgColumn`),xr),EX=(Sr=class extends TX{constructor(...t){super(...t),e.defineProperty(this,`indexConfig`,{order:this.config.order??`asc`,nulls:this.config.nulls??`last`,opClass:this.config.opClass}),e.defineProperty(this,`defaultConfig`,{order:`asc`,nulls:`last`,opClass:void 0})}getSQLType(){return this.getSQLType()}asc(){return this.indexConfig.order=`asc`,this}desc(){return this.indexConfig.order=`desc`,this}nullsFirst(){return this.indexConfig.nulls=`first`,this}nullsLast(){return this.indexConfig.nulls=`last`,this}op(e){return this.indexConfig.opClass=e,this}},e.defineProperty(Sr,Z,`ExtraConfigColumn`),Sr),DX=(Cr=class{constructor(t,n,r,i){e.defineProperty(this,`name`,void 0),e.defineProperty(this,`keyAsName`,void 0),e.defineProperty(this,`type`,void 0),e.defineProperty(this,`indexConfig`,void 0),this.name=t,this.keyAsName=n,this.type=r,this.indexConfig=i}},e.defineProperty(Cr,Z,`IndexedColumn`),Cr),OX=(wr=class extends wX{constructor(e,t,n){super(e,`array`,`PgArray`),this.config.baseBuilder=t,this.config.size=n}build(e){let t=this.config.baseBuilder.build(e);return new kX(e,this.config,t)}},e.defineProperty(wr,Z,`PgArrayBuilder`),wr),kX=(Tr=class t extends TX{constructor(t,n,r,i){super(t,n),e.defineProperty(this,`size`,void 0),this.baseColumn=r,this.range=i,this.size=n.size}getSQLType(){return`${this.baseColumn.getSQLType()}[${typeof this.size==`number`?this.size:``}]`}mapFromDriverValue(e){return typeof e==`string`&&(e=SX(e)),e.map(e=>this.baseColumn.mapFromDriverValue(e))}mapToDriverValue(e,n=!1){let r=e.map(e=>e===null?null:Q(this.baseColumn,t)?this.baseColumn.mapToDriverValue(e,!0):this.baseColumn.mapToDriverValue(e));return n?r:CX(r)}},e.defineProperty(Tr,Z,`PgArray`),Tr),AX=(Er=class extends wX{constructor(e,t){super(e,`string`,`PgEnumObjectColumn`),this.config.enum=t}build(e){return new jX(e,this.config)}},e.defineProperty(Er,Z,`PgEnumObjectColumnBuilder`),Er),jX=(Dr=class extends TX{constructor(t,n){super(t,n),e.defineProperty(this,`enum`,void 0),e.defineProperty(this,`enumValues`,this.config.enum.enumValues),this.enum=n.enum}getSQLType(){return this.enum.enumName}},e.defineProperty(Dr,Z,`PgEnumObjectColumn`),Dr);const MX=Symbol.for(`drizzle:isPgEnum`);function NX(e){return!!e&&typeof e==`function`&&MX in e&&e[MX]===!0}var PX=(Or=class extends wX{constructor(e,t){super(e,`string`,`PgEnumColumn`),this.config.enum=t}build(e){return new FX(e,this.config)}},e.defineProperty(Or,Z,`PgEnumColumnBuilder`),Or),FX=(kr=class extends TX{constructor(t,n){super(t,n),e.defineProperty(this,`enum`,this.config.enum),e.defineProperty(this,`enumValues`,this.config.enum.enumValues),this.enum=n.enum}getSQLType(){return this.enum.enumName}},e.defineProperty(kr,Z,`PgEnumColumn`),kr),IX=(Ar=class{constructor(e,t,n,r=!1,i=[]){this._={brand:`Subquery`,sql:e,selectedFields:t,alias:n,isWith:r,usedTables:i}}},e.defineProperty(Ar,Z,`Subquery`),Ar),LX=(jr=class extends IX{},e.defineProperty(jr,Z,`WithSubquery`),jr),RX=`0.44.2`;let zX,BX;const VX={startActiveSpan(e,t){return zX?(BX||=zX.trace.getTracer(`drizzle-orm`,RX),hX((n,r)=>r.startActiveSpan(e,e=>{try{return t(e)}catch(t){throw e.setStatus({code:n.SpanStatusCode.ERROR,message:t instanceof Error?t.message:`Unknown error`}),t}finally{e.end()}}),zX,BX)):t()}},HX=Symbol.for(`drizzle:ViewBaseConfig`),UX=Symbol.for(`drizzle:Schema`),WX=Symbol.for(`drizzle:Columns`),GX=Symbol.for(`drizzle:ExtraConfigColumns`),KX=Symbol.for(`drizzle:OriginalName`),qX=Symbol.for(`drizzle:BaseName`),JX=Symbol.for(`drizzle:IsAlias`),YX=Symbol.for(`drizzle:ExtraConfigBuilder`),XX=Symbol.for(`drizzle:IsDrizzleTable`);var ZX=(Mr=class{constructor(t,n,r){e.defineProperty(this,fX,void 0),e.defineProperty(this,KX,void 0),e.defineProperty(this,UX,void 0),e.defineProperty(this,WX,void 0),e.defineProperty(this,GX,void 0),e.defineProperty(this,qX,void 0),e.defineProperty(this,JX,!1),e.defineProperty(this,XX,!0),e.defineProperty(this,YX,void 0),this[fX]=this[KX]=t,this[UX]=n,this[qX]=r}},e.defineProperty(Mr,Z,`Table`),e.defineProperty(Mr,`Symbol`,{Name:fX,Schema:UX,OriginalName:KX,Columns:WX,ExtraConfigColumns:GX,BaseName:qX,IsAlias:JX,ExtraConfigBuilder:YX}),Mr);function QX(e){return e[fX]}function $X(e){return`${e[UX]??`public`}.${e[fX]}`}var eZ=(Nr=class{},e.defineProperty(Nr,Z,`FakePrimitiveParam`),Nr);function tZ(e){return e!=null&&typeof e.getSQL==`function`}function nZ(e){let t={sql:``,params:[]};for(let r of e){var n;t.sql+=r.sql,t.params.push(...r.params),(n=r.typings)?.length&&(t.typings||=[],t.typings.push(...r.typings))}return t}var rZ=(Pr=class{constructor(t){e.defineProperty(this,`value`,void 0),this.value=Array.isArray(t)?t:[t]}getSQL(){return new iZ([this])}},e.defineProperty(Pr,Z,`StringChunk`),Pr),iZ=(Fr=class t{constructor(t){e.defineProperty(this,`decoder`,sZ),e.defineProperty(this,`shouldInlineParams`,!1),e.defineProperty(this,`usedTables`,[]),this.queryChunks=t;for(let e of t)if(Q(e,ZX)){let t=e[ZX.Symbol.Schema];this.usedTables.push(t===void 0?e[ZX.Symbol.Name]:t+`.`+e[ZX.Symbol.Name])}}append(e){return this.queryChunks.push(...e.queryChunks),this}toQuery(e){return VX.startActiveSpan(`drizzle.buildSQL`,t=>{let n=this.buildQueryFromSourceParams(this.queryChunks,e);return t?.setAttributes({"drizzle.query.text":n.sql,"drizzle.query.params":JSON.stringify(n.params)}),n})}buildQueryFromSourceParams(e,n){let r=Object.assign({},n,{inlineParams:n.inlineParams||this.shouldInlineParams,paramStartIndex:n.paramStartIndex||{value:0}}),{casing:i,escapeName:a,escapeParam:o,prepareTyping:s,inlineParams:c,paramStartIndex:l}=r;return nZ(e.map(e=>{if(Q(e,rZ))return{sql:e.value.join(``),params:[]};if(Q(e,aZ))return{sql:a(e.value),params:[]};if(e===void 0)return{sql:``,params:[]};if(Array.isArray(e)){let t=[new rZ(`(`)];for(let[n,r]of e.entries())t.push(r),ne},cZ={mapToDriverValue:e=>e},lZ={...sZ,...cZ};var uZ=(Lr=class{constructor(t,n=cZ){e.defineProperty(this,`brand`,void 0),this.value=t,this.encoder=n}getSQL(){return new iZ([this])}},e.defineProperty(Lr,Z,`Param`),Lr);function $(e,...t){let n=[];(t.length>0||e.length>0&&e[0]!==``)&&n.push(new rZ(e[0]));for(let[r,i]of t.entries())n.push(i,new rZ(e[r+1]));return new iZ(n)}(e=>{function t(){return new iZ([])}e.empty=t;function n(e){return new iZ(e)}e.fromList=n;function r(e){return new iZ([new rZ(e)])}e.raw=r;function i(e,t){let n=[];for(let[r,i]of e.entries())r>0&&t!==void 0&&n.push(t),n.push(i);return new iZ(n)}e.join=i;function a(e){return new aZ(e)}e.identifier=a;function o(e){return new dZ(e)}e.placeholder=o;function s(e,t){return new uZ(e,t)}e.param=s})($||={}),(t=>{class n{constructor(t,n){e.defineProperty(this,`isSelectionField`,!1),this.sql=t,this.fieldAlias=n}getSQL(){return this.sql}clone(){return new n(this.sql,this.fieldAlias)}}e.defineProperty(n,Z,`SQL.Aliased`),t.Aliased=n})(iZ||={});var dZ=(Rr=class{constructor(e){this.name=e}getSQL(){return new iZ([this])}},e.defineProperty(Rr,Z,`Placeholder`),Rr);function fZ(e,t){return e.map(e=>{if(Q(e,dZ)){if(!(e.name in t))throw Error(`No value for placeholder "${e.name}" was provided`);return t[e.name]}if(Q(e,uZ)&&Q(e.value,dZ)){if(!(e.value.name in t))throw Error(`No value for placeholder "${e.value.name}" was provided`);return e.encoder.mapToDriverValue(t[e.value.name])}return e})}const pZ=Symbol.for(`drizzle:IsDrizzleView`);var mZ=(zr=class{constructor({name:t,schema:n,selectedFields:r,query:i}){e.defineProperty(this,HX,void 0),e.defineProperty(this,pZ,!0),this[HX]={name:t,originalName:t,schema:n,selectedFields:r,query:i,isExisting:!i,isAlias:!1}}getSQL(){return new iZ([this])}},e.defineProperty(zr,Z,`View`),zr);uX.prototype.getSQL=function(){return new iZ([this])},ZX.prototype.getSQL=function(){return new iZ([this])},IX.prototype.getSQL=function(){return new iZ([this])};var hZ=(Br=class{constructor(e){this.table=e}get(e,t){return t===`table`?this.table:e[t]}},e.defineProperty(Br,Z,`ColumnAliasProxyHandler`),Br),gZ=(Vr=class{constructor(e,t){this.alias=e,this.replaceOriginalName=t}get(e,t){if(t===ZX.Symbol.IsAlias)return!0;if(t===ZX.Symbol.Name||this.replaceOriginalName&&t===ZX.Symbol.OriginalName)return this.alias;if(t===HX)return{...e[HX],name:this.alias,isAlias:!0};if(t===ZX.Symbol.Columns){let t=e[ZX.Symbol.Columns];if(!t)return t;let n={};return Object.keys(t).map(r=>{n[r]=new Proxy(t[r],new hZ(new Proxy(e,this)))}),n}let n=e[t];return Q(n,uX)?new Proxy(n,new hZ(new Proxy(e,this))):n}},e.defineProperty(Vr,Z,`TableAliasProxyHandler`),Vr),_Z=(Hr=class{constructor(e){this.alias=e}get(e,t){return t===`sourceTable`?vZ(e.sourceTable,this.alias):e[t]}},e.defineProperty(Hr,Z,`RelationTableAliasProxyHandler`),Hr);function vZ(e,t){return new Proxy(e,new gZ(t,!1))}function yZ(e,t){return new Proxy(e,new hZ(new Proxy(e.table,new gZ(t,!1))))}function bZ(e,t){return new iZ.Aliased(xZ(e.sql,t),e.fieldAlias)}function xZ(e,t){return $.join(e.queryChunks.map(e=>Q(e,uX)?yZ(e,t):Q(e,iZ)?xZ(e,t):Q(e,iZ.Aliased)?bZ(e,t):e))}var SZ=(Ur=class extends Error{constructor({message:e,cause:t}){super(e),this.name=`DrizzleError`,this.cause=t}},e.defineProperty(Ur,Z,`DrizzleError`),Ur),CZ=(Wr=class extends SZ{constructor(){super({message:`Rollback`})}},e.defineProperty(Wr,Z,`TransactionRollbackError`),Wr),wZ=(Gr=class{write(e){console.log(e)}},e.defineProperty(Gr,Z,`ConsoleLogWriter`),Gr),TZ=(Kr=class{constructor(t){e.defineProperty(this,`writer`,void 0),this.writer=t?.writer??new wZ}logQuery(e,t){let n=t.map(e=>{try{return JSON.stringify(e)}catch{return String(e)}}),r=n.length?` -- params: [${n.join(`, `)}]`:``;this.writer.write(`Query: ${e}${r}`)}},e.defineProperty(Kr,Z,`DefaultLogger`),Kr),EZ=(qr=class{logQuery(){}},e.defineProperty(qr,Z,`NoopLogger`),qr),DZ=(ea=Symbol.toStringTag,Jr=class{constructor(){e.defineProperty(this,ea,`QueryPromise`)}catch(e){return this.then(void 0,e)}finally(e){return this.then(t=>(e?.(),t),t=>{throw e?.(),t})}then(e,t){return this.execute().then(e,t)}},e.defineProperty(Jr,Z,`QueryPromise`),Jr);function OZ(e,t){return Object.entries(e).reduce((e,[n,r])=>{if(typeof n!=`string`)return e;let i=t?[...t,n]:[n];return Q(r,uX)||Q(r,iZ)||Q(r,iZ.Aliased)?e.push({path:i,field:r}):Q(r,ZX)?e.push(...OZ(r[ZX.Symbol.Columns],i)):e.push(...OZ(r,i)),e},[])}function kZ(e,t){let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let[e,t]of n.entries())if(t!==r[e])return!1;return!0}function AZ(e,t){let n=Object.entries(t).filter(([,e])=>e!==void 0).map(([t,n])=>Q(n,iZ)||Q(n,uX)?[t,n]:[t,new uZ(n,e[ZX.Symbol.Columns][t])]);if(n.length===0)throw Error(`No values to set`);return Object.fromEntries(n)}function jZ(e,t){for(let n of t)for(let t of Object.getOwnPropertyNames(n.prototype)){if(t===`constructor`)continue;Object.defineProperty(e.prototype,t,Object.getOwnPropertyDescriptor(n.prototype,t)||Object.create(null))}}function MZ(e){return e[ZX.Symbol.Columns]}function NZ(e){return Q(e,IX)?e._.alias:Q(e,mZ)?e[HX].name:Q(e,iZ)?void 0:e[ZX.Symbol.IsAlias]?e[ZX.Symbol.Name]:e[ZX.Symbol.BaseName]}function PZ(e){if(typeof e!=`object`||!e||e.constructor.name!==`Object`)return!1;if(`logger`in e){let t=typeof e.logger;return!(t!==`boolean`&&(t!==`object`||typeof e.logger.logQuery!=`function`)&&t!==`undefined`)}if(`schema`in e){let t=typeof e.schema;return!(t!==`object`&&t!==`undefined`)}if(`casing`in e){let t=typeof e.casing;return!(t!==`string`&&t!==`undefined`)}if(`mode`in e)return!(e.mode!==`default`||e.mode!==`planetscale`||e.mode!==void 0);if(`connection`in e){let t=typeof e.connection;return!(t!==`string`&&t!==`object`&&t!==`undefined`)}if(`client`in e){let t=typeof e.client;return!(t!==`object`&&t!==`function`&&t!==`undefined`)}return Object.keys(e).length===0}var FZ=(Yr=class extends wX{defaultNow(){return this.default($`now()`)}},e.defineProperty(Yr,Z,`PgDateColumnBaseBuilder`),Yr),IZ=(Xr=class extends FZ{constructor(e){super(e,`date`,`PgDate`)}build(e){return new LZ(e,this.config)}},e.defineProperty(Xr,Z,`PgDateBuilder`),Xr),LZ=(Zr=class extends TX{getSQLType(){return`date`}mapFromDriverValue(e){return new Date(e)}mapToDriverValue(e){return e.toISOString()}},e.defineProperty(Zr,Z,`PgDate`),Zr),RZ=(Qr=class extends FZ{constructor(e){super(e,`string`,`PgDateString`)}build(e){return new zZ(e,this.config)}},e.defineProperty(Qr,Z,`PgDateStringBuilder`),Qr),zZ=($r=class extends TX{getSQLType(){return`date`}},e.defineProperty($r,Z,`PgDateString`),$r),BZ=(ei=class extends wX{constructor(e){super(e,`json`,`PgJson`)}build(e){return new VZ(e,this.config)}},e.defineProperty(ei,Z,`PgJsonBuilder`),ei),VZ=(ti=class extends TX{constructor(e,t){super(e,t)}getSQLType(){return`json`}mapToDriverValue(e){return JSON.stringify(e)}mapFromDriverValue(e){if(typeof e==`string`)try{return JSON.parse(e)}catch{return e}return e}},e.defineProperty(ti,Z,`PgJson`),ti),HZ=(ni=class extends wX{constructor(e){super(e,`json`,`PgJsonb`)}build(e){return new UZ(e,this.config)}},e.defineProperty(ni,Z,`PgJsonbBuilder`),ni),UZ=(ri=class extends TX{constructor(e,t){super(e,t)}getSQLType(){return`jsonb`}mapToDriverValue(e){return JSON.stringify(e)}mapFromDriverValue(e){if(typeof e==`string`)try{return JSON.parse(e)}catch{return e}return e}},e.defineProperty(ri,Z,`PgJsonb`),ri),WZ=(ii=class extends wX{constructor(e,t,n){super(e,`string`,`PgNumeric`),this.config.precision=t,this.config.scale=n}build(e){return new GZ(e,this.config)}},e.defineProperty(ii,Z,`PgNumericBuilder`),ii),GZ=(ai=class extends TX{constructor(t,n){super(t,n),e.defineProperty(this,`precision`,void 0),e.defineProperty(this,`scale`,void 0),this.precision=n.precision,this.scale=n.scale}mapFromDriverValue(e){return typeof e==`string`?e:String(e)}getSQLType(){return this.precision!==void 0&&this.scale!==void 0?`numeric(${this.precision}, ${this.scale})`:this.precision===void 0?`numeric`:`numeric(${this.precision})`}},e.defineProperty(ai,Z,`PgNumeric`),ai),KZ=(oi=class extends wX{constructor(e,t,n){super(e,`number`,`PgNumericNumber`),this.config.precision=t,this.config.scale=n}build(e){return new qZ(e,this.config)}},e.defineProperty(oi,Z,`PgNumericNumberBuilder`),oi),qZ=(si=class extends TX{constructor(t,n){super(t,n),e.defineProperty(this,`precision`,void 0),e.defineProperty(this,`scale`,void 0),e.defineProperty(this,`mapToDriverValue`,String),this.precision=n.precision,this.scale=n.scale}mapFromDriverValue(e){return typeof e==`number`?e:Number(e)}getSQLType(){return this.precision!==void 0&&this.scale!==void 0?`numeric(${this.precision}, ${this.scale})`:this.precision===void 0?`numeric`:`numeric(${this.precision})`}},e.defineProperty(si,Z,`PgNumericNumber`),si),JZ=(ci=class extends wX{constructor(e,t,n){super(e,`bigint`,`PgNumericBigInt`),this.config.precision=t,this.config.scale=n}build(e){return new YZ(e,this.config)}},e.defineProperty(ci,Z,`PgNumericBigIntBuilder`),ci),YZ=(li=class extends TX{constructor(t,n){super(t,n),e.defineProperty(this,`precision`,void 0),e.defineProperty(this,`scale`,void 0),e.defineProperty(this,`mapFromDriverValue`,BigInt),e.defineProperty(this,`mapToDriverValue`,String),this.precision=n.precision,this.scale=n.scale}getSQLType(){return this.precision!==void 0&&this.scale!==void 0?`numeric(${this.precision}, ${this.scale})`:this.precision===void 0?`numeric`:`numeric(${this.precision})`}},e.defineProperty(li,Z,`PgNumericBigInt`),li),XZ=(ui=class extends FZ{constructor(e,t,n){super(e,`string`,`PgTime`),this.withTimezone=t,this.precision=n,this.config.withTimezone=t,this.config.precision=n}build(e){return new ZZ(e,this.config)}},e.defineProperty(ui,Z,`PgTimeBuilder`),ui),ZZ=(di=class extends TX{constructor(t,n){super(t,n),e.defineProperty(this,`withTimezone`,void 0),e.defineProperty(this,`precision`,void 0),this.withTimezone=n.withTimezone,this.precision=n.precision}getSQLType(){let e=this.precision===void 0?``:`(${this.precision})`;return`time${e}${this.withTimezone?` with time zone`:``}`}},e.defineProperty(di,Z,`PgTime`),di),QZ=(fi=class extends FZ{constructor(e,t,n){super(e,`date`,`PgTimestamp`),this.config.withTimezone=t,this.config.precision=n}build(e){return new $Z(e,this.config)}},e.defineProperty(fi,Z,`PgTimestampBuilder`),fi),$Z=(pi=class extends TX{constructor(t,n){super(t,n),e.defineProperty(this,`withTimezone`,void 0),e.defineProperty(this,`precision`,void 0),e.defineProperty(this,`mapFromDriverValue`,e=>new Date(this.withTimezone?e:e+`+0000`)),e.defineProperty(this,`mapToDriverValue`,e=>e.toISOString()),this.withTimezone=n.withTimezone,this.precision=n.precision}getSQLType(){let e=this.precision===void 0?``:` (${this.precision})`;return`timestamp${e}${this.withTimezone?` with time zone`:``}`}},e.defineProperty(pi,Z,`PgTimestamp`),pi),eQ=(mi=class extends FZ{constructor(e,t,n){super(e,`string`,`PgTimestampString`),this.config.withTimezone=t,this.config.precision=n}build(e){return new tQ(e,this.config)}},e.defineProperty(mi,Z,`PgTimestampStringBuilder`),mi),tQ=(hi=class extends TX{constructor(t,n){super(t,n),e.defineProperty(this,`withTimezone`,void 0),e.defineProperty(this,`precision`,void 0),this.withTimezone=n.withTimezone,this.precision=n.precision}getSQLType(){let e=this.precision===void 0?``:`(${this.precision})`;return`timestamp${e}${this.withTimezone?` with time zone`:``}`}},e.defineProperty(hi,Z,`PgTimestampString`),hi),nQ=(gi=class extends wX{constructor(e){super(e,`string`,`PgUUID`)}defaultRandom(){return this.default($`gen_random_uuid()`)}build(e){return new rQ(e,this.config)}},e.defineProperty(gi,Z,`PgUUIDBuilder`),gi),rQ=(_i=class extends TX{getSQLType(){return`uuid`}},e.defineProperty(_i,Z,`PgUUID`),_i);const iQ=Symbol.for(`drizzle:PgInlineForeignKeys`),aQ=Symbol.for(`drizzle:EnableRLS`);var oQ=(ta=ZX.Symbol.ExtraConfigBuilder,na=ZX.Symbol.ExtraConfigColumns,vi=class extends ZX{constructor(...t){super(...t),e.defineProperty(this,iQ,[]),e.defineProperty(this,aQ,!1),e.defineProperty(this,ta,void 0),e.defineProperty(this,na,{})}},e.defineProperty(vi,Z,`PgTable`),e.defineProperty(vi,`Symbol`,Object.assign({},ZX.Symbol,{InlineForeignKeys:iQ,EnableRLS:aQ})),vi),sQ=(yi=class{constructor(t,n){e.defineProperty(this,`columns`,void 0),e.defineProperty(this,`name`,void 0),this.columns=t,this.name=n}build(e){return new cQ(e,this.columns,this.name)}},e.defineProperty(yi,Z,`PgPrimaryKeyBuilder`),yi),cQ=(bi=class{constructor(t,n,r){e.defineProperty(this,`columns`,void 0),e.defineProperty(this,`name`,void 0),this.table=t,this.columns=n,this.name=r}getName(){return this.name??`${this.table[oQ.Symbol.Name]}_${this.columns.map(e=>e.name).join(`_`)}_pk`}},e.defineProperty(bi,Z,`PgPrimaryKey`),bi);function lQ(e,t){return oZ(t)&&!tZ(e)&&!Q(e,uZ)&&!Q(e,dZ)&&!Q(e,uX)&&!Q(e,ZX)&&!Q(e,mZ)?new uZ(e,t):e}const uQ=(e,t)=>$`${e} = ${lQ(t,e)}`,dQ=(e,t)=>$`${e} <> ${lQ(t,e)}`;function fQ(...e){let t=e.filter(e=>e!==void 0);if(t.length!==0)return t.length===1?new iZ(t):new iZ([new rZ(`(`),$.join(t,new rZ(` and `)),new rZ(`)`)])}function pQ(...e){let t=e.filter(e=>e!==void 0);if(t.length!==0)return t.length===1?new iZ(t):new iZ([new rZ(`(`),$.join(t,new rZ(` or `)),new rZ(`)`)])}function mQ(e){return $`not ${e}`}const hQ=(e,t)=>$`${e} > ${lQ(t,e)}`,gQ=(e,t)=>$`${e} >= ${lQ(t,e)}`,_Q=(e,t)=>$`${e} < ${lQ(t,e)}`,vQ=(e,t)=>$`${e} <= ${lQ(t,e)}`;function yQ(e,t){return Array.isArray(t)?t.length===0?$`false`:$`${e} in ${t.map(t=>lQ(t,e))}`:$`${e} in ${lQ(t,e)}`}function bQ(e,t){return Array.isArray(t)?t.length===0?$`true`:$`${e} not in ${t.map(t=>lQ(t,e))}`:$`${e} not in ${lQ(t,e)}`}function xQ(e){return $`${e} is null`}function SQ(e){return $`${e} is not null`}function CQ(e){return $`exists ${e}`}function wQ(e){return $`not exists ${e}`}function TQ(e,t,n){return $`${e} between ${lQ(t,e)} and ${lQ(n,e)}`}function EQ(e,t,n){return $`${e} not between ${lQ(t,e)} and ${lQ(n,e)}`}function DQ(e,t){return $`${e} like ${t}`}function OQ(e,t){return $`${e} not like ${t}`}function kQ(e,t){return $`${e} ilike ${t}`}function AQ(e,t){return $`${e} not ilike ${t}`}function jQ(e){return $`${e} asc`}function MQ(e){return $`${e} desc`}var NQ=(xi=class{constructor(t,n,r){e.defineProperty(this,`referencedTableName`,void 0),e.defineProperty(this,`fieldName`,void 0),this.sourceTable=t,this.referencedTable=n,this.relationName=r,this.referencedTableName=n[ZX.Symbol.Name]}},e.defineProperty(xi,Z,`Relation`),xi),PQ=(Si=class{constructor(e,t){this.table=e,this.config=t}},e.defineProperty(Si,Z,`Relations`),Si),FQ=(Ci=class e extends NQ{constructor(e,t,n,r){super(e,t,n?.relationName),this.config=n,this.isNullable=r}withFieldName(t){let n=new e(this.sourceTable,this.referencedTable,this.config,this.isNullable);return n.fieldName=t,n}},e.defineProperty(Ci,Z,`One`),Ci),IQ=(wi=class e extends NQ{constructor(e,t,n){super(e,t,n?.relationName),this.config=n}withFieldName(t){let n=new e(this.sourceTable,this.referencedTable,this.config);return n.fieldName=t,n}},e.defineProperty(wi,Z,`Many`),wi);function LQ(){return{and:fQ,between:TQ,eq:uQ,exists:CQ,gt:hQ,gte:gQ,ilike:kQ,inArray:yQ,isNull:xQ,isNotNull:SQ,like:DQ,lt:_Q,lte:vQ,ne:dQ,not:mQ,notBetween:EQ,notExists:wQ,notLike:OQ,notIlike:AQ,notInArray:bQ,or:pQ,sql:$}}function RQ(){return{sql:$,asc:jQ,desc:MQ}}function zQ(e,t){Object.keys(e).length===1&&`default`in e&&!Q(e.default,ZX)&&(e=e.default);let n={},r={},i={};for(let[o,s]of Object.entries(e))if(Q(s,ZX)){var a;let e=$X(s),t=r[e];n[e]=o,i[o]={tsName:o,dbName:s[ZX.Symbol.Name],schema:s[ZX.Symbol.Schema],columns:s[ZX.Symbol.Columns],relations:t?.relations??{},primaryKey:t?.primaryKey??[]};for(let e of Object.values(s[ZX.Symbol.Columns]))e.primary&&i[o].primaryKey.push(e);let c=(a=s[ZX.Symbol.ExtraConfigBuilder])?.call(s,s[ZX.Symbol.ExtraConfigColumns]);if(c)for(let e of Object.values(c))Q(e,sQ)&&i[o].primaryKey.push(...e.columns)}else if(Q(s,PQ)){let e=$X(s.table),a=n[e],o=s.config(t(s.table)),c;for(let[t,n]of Object.entries(o))if(a){let e=i[a];e.relations[t]=n,c&&e.primaryKey.push(...c)}else e in r||(r[e]={relations:{},primaryKey:c}),r[e].relations[t]=n}return{tables:i,tableNamesMap:n}}function BQ(e){return function(t,n){return new FQ(e,t,n,n?.fields.reduce((e,t)=>e&&t.notNull,!0)??!1)}}function VQ(e){return function(t,n){return new IQ(e,t,n)}}function HQ(e,t,n){if(Q(n,FQ)&&n.config)return{fields:n.config.fields,references:n.config.references};let r=t[$X(n.referencedTable)];if(!r)throw Error(`Table "${n.referencedTable[ZX.Symbol.Name]}" not found in schema`);let i=e[r];if(!i)throw Error(`Table "${r}" not found in schema`);let a=n.sourceTable,o=t[$X(a)];if(!o)throw Error(`Table "${a[ZX.Symbol.Name]}" not found in schema`);let s=[];for(let e of Object.values(i.relations))(n.relationName&&n!==e&&e.relationName===n.relationName||!n.relationName&&e.referencedTable===n.sourceTable)&&s.push(e);if(s.length>1)throw n.relationName?Error(`There are multiple relations with name "${n.relationName}" in table "${r}"`):Error(`There are multiple relations between "${r}" and "${n.sourceTable[ZX.Symbol.Name]}". Please specify relation name`);if(s[0]&&Q(s[0],FQ)&&s[0].config)return{fields:s[0].config.references,references:s[0].config.fields};throw Error(`There is not enough information to infer relation "${o}.${n.fieldName}"`)}function UQ(e){return{one:BQ(e),many:VQ(e)}}function WQ(e,t,n,r,i=e=>e){let a={};for(let[o,s]of r.entries())if(s.isJson){let r=t.relations[s.tsKey],c=n[o],l=typeof c==`string`?JSON.parse(c):c;a[s.tsKey]=Q(r,FQ)?l&&WQ(e,e[s.relationTableTsKey],l,s.selection,i):l.map(t=>WQ(e,e[s.relationTableTsKey],t,s.selection,i))}else{let e=i(n[o]),t=s.field,r;r=Q(t,uX)?t:Q(t,iZ)?t.decoder:t.sql.decoder,a[s.tsKey]=e===null?null:r.mapFromDriverValue(e)}return a}var GQ=(Ti=class t{constructor(t){e.defineProperty(this,`config`,void 0),this.config={...t}}get(e,n){if(n===`_`)return{...e._,selectedFields:new Proxy(e._.selectedFields,this)};if(n===HX)return{...e[HX],selectedFields:new Proxy(e[HX].selectedFields,this)};if(typeof n==`symbol`)return e[n];let r=Q(e,IX)?e._.selectedFields:Q(e,mZ)?e[HX].selectedFields:e,i=r[n];if(Q(i,iZ.Aliased)){if(this.config.sqlAliasedBehavior===`sql`&&!i.isSelectionField)return i.sql;let e=i.clone();return e.isSelectionField=!0,e}if(Q(i,iZ)){if(this.config.sqlBehavior===`sql`)return i;throw Error(`You tried to reference "${n}" field from a subquery, which is a raw SQL field, but it doesn't have an alias declared. Please add an alias to the field using ".as('alias')" method.`)}return Q(i,uX)?this.config.alias?new Proxy(i,new hZ(new Proxy(i.table,new gZ(this.config.alias,this.config.replaceOriginalName??!1)))):i:typeof i!=`object`||!i?i:new Proxy(i,new t(this.config))}},e.defineProperty(Ti,Z,`SelectionProxyHandler`),Ti);function KQ(e){let t=e.replace(/['\u2019]/g,``).match(/[\da-z]+|[A-Z]+(?![a-z])|[A-Z][\da-z]+/g)??[];return t.map(e=>e.toLowerCase()).join(`_`)}function qQ(e){let t=e.replace(/['\u2019]/g,``).match(/[\da-z]+|[A-Z]+(?![a-z])|[A-Z][\da-z]+/g)??[];return t.reduce((e,t,n)=>{let r=n===0?t.toLowerCase():`${t[0].toUpperCase()}${t.slice(1)}`;return e+r},``)}function JQ(e){return e}var YQ=(Ei=class{constructor(t){e.defineProperty(this,`cache`,{}),e.defineProperty(this,`cachedTables`,{}),e.defineProperty(this,`convert`,void 0),this.convert=t===`snake_case`?KQ:t===`camelCase`?qQ:JQ}getColumnCasing(e){if(!e.keyAsName)return e.name;let t=e.table[ZX.Symbol.Schema]??`public`,n=e.table[ZX.Symbol.OriginalName],r=`${t}.${n}.${e.name}`;return this.cache[r]||this.cacheTable(e.table),this.cache[r]}cacheTable(e){let t=e[ZX.Symbol.Schema]??`public`,n=e[ZX.Symbol.OriginalName],r=`${t}.${n}`;if(!this.cachedTables[r]){for(let t of Object.values(e[ZX.Symbol.Columns])){let e=`${r}.${t.name}`;this.cache[e]=this.convert(t.name)}this.cachedTables[r]=!0}}clearCache(){this.cache={},this.cachedTables={}}},e.defineProperty(Ei,Z,`CasingCache`),Ei),XQ=(Di=class extends mZ{},e.defineProperty(Di,Z,`PgViewBase`),Di),ZQ=(Oi=class{constructor(t){e.defineProperty(this,`casing`,void 0),this.casing=new YQ(t?.casing)}async migrate(e,t,n){let r=typeof n==`string`?`__drizzle_migrations`:n.migrationsTable??`__drizzle_migrations`,i=typeof n==`string`?`drizzle`:n.migrationsSchema??`drizzle`,a=$` CREATE TABLE IF NOT EXISTS ${$.identifier(i)}.${$.identifier(r)} ( id SERIAL PRIMARY KEY, hash text NOT NULL, created_at bigint ) `;await t.execute($`CREATE SCHEMA IF NOT EXISTS ${$.identifier(i)}`),await t.execute(a);let o=await t.all($`select id, hash, created_at from ${$.identifier(i)}.${$.identifier(r)} order by created_at desc limit 1`),s=o[0];await t.transaction(async t=>{for await(let n of e)if(!s||Number(s.created_at){var r;return t[e]!==void 0||(r=n[e])?.onUpdateFn!==void 0}),i=r.length;return $.join(r.flatMap((e,r)=>{let a=n[e],o=t[e]??$.param(a.onUpdateFn(),a),s=$`${$.identifier(this.casing.getColumnCasing(a))} = ${o}`;return r{let i=[];if(Q(e,iZ.Aliased)&&e.isSelectionField)i.push($.identifier(e.fieldAlias));else if(Q(e,iZ.Aliased)||Q(e,iZ)){let n=Q(e,iZ.Aliased)?e.sql:e;t?i.push(new iZ(n.queryChunks.map(e=>Q(e,TX)?$.identifier(this.casing.getColumnCasing(e)):e))):i.push(n),Q(e,iZ.Aliased)&&i.push($` as ${$.identifier(e.fieldAlias)}`)}else Q(e,uX)&&(t?i.push($.identifier(this.casing.getColumnCasing(e))):i.push(e));return ro?.some(({alias:t})=>t===(e[ZX.Symbol.IsAlias]?QX(e):e[ZX.Symbol.BaseName])))(e.field.table)){let t=QX(e.field.table);throw Error(`Your "${e.path.join(`->`)}" field references a column "${t}"."${e.field.name}", but the table "${t}" is not part of the query! Did you forget to join it?`)}let h=!o||o.length===0,g=this.buildWithCTE(e),_;f&&(_=f===!0?$` distinct`:$` distinct on (${$.join(f.on,$`, `)})`);let v=this.buildSelection(m,{isSingleTable:h}),y=this.buildFromTable(a),b=this.buildJoins(o),x=r?$` where ${r}`:void 0,S=i?$` having ${i}`:void 0,C;s&&s.length>0&&(C=$` order by ${$.join(s,$`, `)}`);let w;c&&c.length>0&&(w=$` group by ${$.join(c,$`, `)}`);let T=typeof l==`object`||typeof l==`number`&&l>=0?$` limit ${l}`:void 0,E=u?$` offset ${u}`:void 0,D=$.empty();if(d){let e=$` for ${$.raw(d.strength)}`;d.config.of&&e.append($` of ${$.join(Array.isArray(d.config.of)?d.config.of:[d.config.of],$`, `)}`),d.config.noWait?e.append($` nowait`):d.config.skipLocked&&e.append($` skip locked`),D.append(e)}let O=$`${g}select${_} ${v} from ${y}${b}${x}${w}${S}${C}${T}${E}${D}`;return p.length>0?this.buildSetOperations(O,p):O}buildSetOperations(e,t){let[n,...r]=t;if(!n)throw Error(`Cannot pass undefined values to any set operator`);return r.length===0?this.buildSetOperationQuery({leftSelect:e,setOperator:n}):this.buildSetOperations(this.buildSetOperationQuery({leftSelect:e,setOperator:n}),r)}buildSetOperationQuery({leftSelect:e,setOperator:{type:t,isAll:n,rightSelect:r,limit:i,orderBy:a,offset:o}}){let s=$`(${e.getSQL()}) `,c=$`(${r.getSQL()})`,l;if(a&&a.length>0){let e=[];for(let t of a)if(Q(t,TX))e.push($.identifier(t.name));else if(Q(t,iZ)){for(let e=0;e=0?$` limit ${i}`:void 0,d=$.raw(`${t} ${n?`all `:``}`),f=o?$` offset ${o}`:void 0;return $`${s}${d}${c}${l}${u}${f}`}buildInsertQuery({table:e,values:t,onConflict:n,returning:r,withList:i,select:a,overridingSystemValue_:o}){let s=[],c=e[ZX.Symbol.Columns],l=Object.entries(c).filter(([e,t])=>!t.shouldDisableInsert()),u=l.map(([,e])=>$.identifier(this.casing.getColumnCasing(e)));if(a){let e=t;Q(e,iZ)?s.push(e):s.push(e.getSQL())}else{let e=t;s.push($.raw(`values `));for(let[t,n]of e.entries()){let r=[];for(let[e,t]of l){let i=n[e];if(i===void 0||Q(i,uZ)&&i.value===void 0)if(t.defaultFn!==void 0){let e=t.defaultFn(),n=Q(e,iZ)?e:$.param(e,t);r.push(n)}else if(!t.default&&t.onUpdateFn!==void 0){let e=t.onUpdateFn(),n=Q(e,iZ)?e:$.param(e,t);r.push(n)}else r.push($`default`);else r.push(i)}s.push(r),t({dbKey:t.name,tsKey:e,field:yZ(t,o),relationTableTsKey:void 0,isJson:!1,selection:[]}))}else{let r=Object.fromEntries(Object.entries(i.columns).map(([e,t])=>[e,yZ(t,o)]));if(a.where){let e=typeof a.where==`function`?a.where(r,LQ()):a.where;p=e&&xZ(e,o)}let s=[],c=[];if(a.columns){let e=!1;for(let[t,n]of Object.entries(a.columns)){if(n===void 0)continue;t in i.columns&&(!e&&n===!0&&(e=!0),c.push(t))}c.length>0&&(c=e?c.filter(e=>{var t;return(t=a.columns)?.[e]===!0}):Object.keys(i.columns).filter(e=>!c.includes(e)))}else c=Object.keys(i.columns);for(let e of c){let t=i.columns[e];s.push({tsKey:e,value:t})}let h=[];a.with&&(h=Object.entries(a.with).filter(e=>!!e[1]).map(([e,t])=>({tsKey:e,queryConfig:t,relation:i.relations[e]})));let g;if(a.extras){g=typeof a.extras==`function`?a.extras(r,{sql:$}):a.extras;for(let[e,t]of Object.entries(g))s.push({tsKey:e,value:bZ(t,o)})}for(let{tsKey:e,value:t}of s)l.push({dbKey:Q(t,iZ.Aliased)?t.fieldAlias:i.columns[e].name,tsKey:e,field:Q(t,uX)?yZ(t,o):t,relationTableTsKey:void 0,isJson:!1,selection:[]});let _=typeof a.orderBy==`function`?a.orderBy(r,RQ()):a.orderBy??[];Array.isArray(_)||(_=[_]),f=_.map(e=>Q(e,uX)?yZ(e,o):xZ(e,o)),u=a.limit,d=a.offset;for(let{tsKey:r,queryConfig:i,relation:a}of h){let s=HQ(t,n,a),c=$X(a.referencedTable),u=n[c],d=`${o}_${r}`,f=fQ(...s.fields.map((e,t)=>uQ(yZ(s.references[t],d),yZ(e,o)))),p=this.buildRelationalQueryWithoutPK({fullSchema:e,schema:t,tableNamesMap:n,table:e[u],tableConfig:t[u],queryConfig:Q(a,FQ)?i===!0?{limit:1}:{...i,limit:1}:i,tableAlias:d,joinOn:f,nestedQueryRelation:a}),h=$`${$.identifier(d)}.${$.identifier(`data`)}`.as(r);m.push({on:$`true`,table:new IX(p.sql,{},d),alias:d,joinType:`left`,lateral:!0}),l.push({dbKey:r,tsKey:r,field:h,relationTableTsKey:u,isJson:!0,selection:p.selection})}}if(l.length===0)throw new SZ({message:`No fields selected for table "${i.tsName}" ("${o}")`});let h;if(p=fQ(c,p),s){let e=$`json_build_array(${$.join(l.map(({field:e,tsKey:t,isJson:n})=>n?$`${$.identifier(`${o}_${t}`)}.${$.identifier(`data`)}`:Q(e,iZ.Aliased)?e.sql:e),$`, `)})`;Q(s,IQ)&&(e=$`coalesce(json_agg(${e}${f.length>0?$` order by ${$.join(f,$`, `)}`:void 0}), '[]'::json)`);let t=[{dbKey:`data`,tsKey:`data`,field:e.as(`data`),isJson:!0,relationTableTsKey:i.tsName,selection:l}],n=u!==void 0||d!==void 0||f.length>0;n?(h=this.buildSelectQuery({table:vZ(r,o),fields:{},fieldsFlat:[{path:[],field:$.raw(`*`)}],where:p,limit:u,offset:d,orderBy:f,setOperators:[]}),p=void 0,u=void 0,d=void 0,f=[]):h=vZ(r,o),h=this.buildSelectQuery({table:Q(h,oQ)?h:new IX(h,{},o),fields:{},fieldsFlat:t.map(({field:e})=>({path:[],field:Q(e,uX)?yZ(e,o):e})),joins:m,where:p,limit:u,offset:d,orderBy:f,setOperators:[]})}else h=this.buildSelectQuery({table:vZ(r,o),fields:{},fieldsFlat:l.map(({field:e})=>({path:[],field:Q(e,uX)?yZ(e,o):e})),joins:m,where:p,limit:u,offset:d,orderBy:f,setOperators:[]});return{tableTsKey:i.tsName,sql:h,selection:l}}},e.defineProperty(Oi,Z,`PgDialect`),Oi),QQ=(ki=class{getSelectedFields(){return this._.selectedFields}},e.defineProperty(ki,Z,`TypedQueryBuilder`),ki),$Q=(Ai=class{constructor(t){e.defineProperty(this,`fields`,void 0),e.defineProperty(this,`session`,void 0),e.defineProperty(this,`dialect`,void 0),e.defineProperty(this,`withList`,[]),e.defineProperty(this,`distinct`,void 0),e.defineProperty(this,`authToken`,void 0),this.fields=t.fields,this.session=t.session,this.dialect=t.dialect,t.withList&&(this.withList=t.withList),this.distinct=t.distinct}setToken(e){return this.authToken=e,this}from(e){let t=!!this.fields,n=e,r;return r=this.fields?this.fields:Q(n,IX)?Object.fromEntries(Object.keys(n._.selectedFields).map(e=>[e,n[e]])):Q(n,XQ)?n[HX].selectedFields:Q(n,iZ)?{}:MZ(n),new t$({table:n,fields:r,isPartialSelect:t,session:this.session,dialect:this.dialect,withList:this.withList,distinct:this.distinct}).setToken(this.authToken)}},e.defineProperty(Ai,Z,`PgSelectBuilder`),Ai),e$=(ji=class extends QQ{constructor({table:t,fields:n,isPartialSelect:r,session:i,dialect:a,withList:o,distinct:s}){super(),e.defineProperty(this,`_`,void 0),e.defineProperty(this,`config`,void 0),e.defineProperty(this,`joinsNotNullableMap`,void 0),e.defineProperty(this,`tableName`,void 0),e.defineProperty(this,`isPartialSelect`,void 0),e.defineProperty(this,`session`,void 0),e.defineProperty(this,`dialect`,void 0),e.defineProperty(this,`cacheConfig`,void 0),e.defineProperty(this,`usedTables`,new Set),e.defineProperty(this,`leftJoin`,this.createJoin(`left`,!1)),e.defineProperty(this,`leftJoinLateral`,this.createJoin(`left`,!0)),e.defineProperty(this,`rightJoin`,this.createJoin(`right`,!1)),e.defineProperty(this,`innerJoin`,this.createJoin(`inner`,!1)),e.defineProperty(this,`innerJoinLateral`,this.createJoin(`inner`,!0)),e.defineProperty(this,`fullJoin`,this.createJoin(`full`,!1)),e.defineProperty(this,`crossJoin`,this.createJoin(`cross`,!1)),e.defineProperty(this,`crossJoinLateral`,this.createJoin(`cross`,!0)),e.defineProperty(this,`union`,this.createSetOperator(`union`,!1)),e.defineProperty(this,`unionAll`,this.createSetOperator(`union`,!0)),e.defineProperty(this,`intersect`,this.createSetOperator(`intersect`,!1)),e.defineProperty(this,`intersectAll`,this.createSetOperator(`intersect`,!0)),e.defineProperty(this,`except`,this.createSetOperator(`except`,!1)),e.defineProperty(this,`exceptAll`,this.createSetOperator(`except`,!0)),this.config={withList:o,table:t,fields:{...n},distinct:s,setOperators:[]},this.isPartialSelect=r,this.session=i,this.dialect=a,this._={selectedFields:n,config:this.config},this.tableName=NZ(t),this.joinsNotNullableMap=typeof this.tableName==`string`?{[this.tableName]:!0}:{};for(let e of d$(t))this.usedTables.add(e)}getUsedTables(){return[...this.usedTables]}createJoin(e,t){return(n,r)=>{var i;let a=this.tableName,o=NZ(n);for(let e of d$(n))this.usedTables.add(e);if(typeof o==`string`&&(i=this.config.joins)?.some(e=>e.alias===o))throw Error(`Alias "${o}" is already used in this query`);if(!this.isPartialSelect&&(Object.keys(this.joinsNotNullableMap).length===1&&typeof a==`string`&&(this.config.fields={[a]:this.config.fields}),typeof o==`string`&&!Q(n,iZ))){let e=Q(n,IX)?n._.selectedFields:Q(n,mZ)?n[HX].selectedFields:n[ZX.Symbol.Columns];this.config.fields[o]=e}if(typeof r==`function`&&(r=r(new Proxy(this.config.fields,new GQ({sqlAliasedBehavior:`sql`,sqlBehavior:`sql`})))),this.config.joins||(this.config.joins=[]),this.config.joins.push({on:r,table:n,joinType:e,alias:o,lateral:t}),typeof o==`string`)switch(e){case`left`:this.joinsNotNullableMap[o]=!1;break;case`right`:this.joinsNotNullableMap=Object.fromEntries(Object.entries(this.joinsNotNullableMap).map(([e])=>[e,!1])),this.joinsNotNullableMap[o]=!0;break;case`cross`:case`inner`:this.joinsNotNullableMap[o]=!0;break;case`full`:this.joinsNotNullableMap=Object.fromEntries(Object.entries(this.joinsNotNullableMap).map(([e])=>[e,!1])),this.joinsNotNullableMap[o]=!1;break}return this}}createSetOperator(e,t){return n=>{let r=typeof n==`function`?n(r$()):n;if(!kZ(this.getSelectedFields(),r.getSelectedFields()))throw Error(`Set operator error (union / intersect / except): selected fields are not the same or are in a different order`);return this.config.setOperators.push({type:e,isAll:t,rightSelect:r}),this}}addSetOperators(e){return this.config.setOperators.push(...e),this}where(e){return typeof e==`function`&&(e=e(new Proxy(this.config.fields,new GQ({sqlAliasedBehavior:`sql`,sqlBehavior:`sql`})))),this.config.where=e,this}having(e){return typeof e==`function`&&(e=e(new Proxy(this.config.fields,new GQ({sqlAliasedBehavior:`sql`,sqlBehavior:`sql`})))),this.config.having=e,this}groupBy(...e){if(typeof e[0]==`function`){let t=e[0](new Proxy(this.config.fields,new GQ({sqlAliasedBehavior:`alias`,sqlBehavior:`sql`})));this.config.groupBy=Array.isArray(t)?t:[t]}else this.config.groupBy=e;return this}orderBy(...e){if(typeof e[0]==`function`){let t=e[0](new Proxy(this.config.fields,new GQ({sqlAliasedBehavior:`alias`,sqlBehavior:`sql`}))),n=Array.isArray(t)?t:[t];this.config.setOperators.length>0?this.config.setOperators.at(-1).orderBy=n:this.config.orderBy=n}else{let t=e;this.config.setOperators.length>0?this.config.setOperators.at(-1).orderBy=t:this.config.orderBy=t}return this}limit(e){return this.config.setOperators.length>0?this.config.setOperators.at(-1).limit=e:this.config.limit=e,this}offset(e){return this.config.setOperators.length>0?this.config.setOperators.at(-1).offset=e:this.config.offset=e,this}for(e,t={}){return this.config.lockingClause={strength:e,config:t},this}getSQL(){return this.dialect.buildSelectQuery(this.config)}toSQL(){let{typings:e,...t}=this.dialect.sqlToQuery(this.getSQL());return t}as(e){let t=[];if(t.push(...d$(this.config.table)),this.config.joins)for(let e of this.config.joins)t.push(...d$(e.table));return new Proxy(new IX(this.getSQL(),this.config.fields,e,!1,[...new Set(t)]),new GQ({alias:e,sqlAliasedBehavior:`alias`,sqlBehavior:`error`}))}getSelectedFields(){return new Proxy(this.config.fields,new GQ({alias:this.tableName,sqlAliasedBehavior:`alias`,sqlBehavior:`error`}))}$dynamic(){return this}$withCache(e){return this.cacheConfig=e===void 0?{config:{},enable:!0,autoInvalidate:!0}:e===!1?{enable:!1}:{enable:!0,autoInvalidate:!0,...e},this}},e.defineProperty(ji,Z,`PgSelectQueryBuilder`),ji),t$=(Mi=class extends e${constructor(...t){super(...t),e.defineProperty(this,`authToken`,void 0),e.defineProperty(this,`execute`,e=>VX.startActiveSpan(`drizzle.operation`,()=>this._prepare().execute(e,this.authToken)))}_prepare(e){let{session:t,config:n,dialect:r,joinsNotNullableMap:i,authToken:a,cacheConfig:o,usedTables:s}=this;if(!t)throw Error(`Cannot execute a query on a query builder. Please use a database instance instead.`);let{fields:c}=n;return VX.startActiveSpan(`drizzle.prepareQuery`,()=>{let n=OZ(c),l=t.prepareQuery(r.sqlToQuery(this.getSQL()),n,e,!0,void 0,{type:`select`,tables:[...s]},o);return l.joinsNotNullableMap=i,l.setToken(a)})}prepare(e){return this._prepare(e)}setToken(e){return this.authToken=e,this}},e.defineProperty(Mi,Z,`PgSelect`),Mi);jZ(t$,[DZ]);function n$(e,t){return(n,r,...i)=>{let a=[r,...i].map(n=>({type:e,isAll:t,rightSelect:n}));for(let e of a)if(!kZ(n.getSelectedFields(),e.rightSelect.getSelectedFields()))throw Error(`Set operator error (union / intersect / except): selected fields are not the same or are in a different order`);return n.addSetOperators(a)}}const r$=()=>({union:i$,unionAll:a$,intersect:o$,intersectAll:s$,except:c$,exceptAll:l$}),i$=n$(`union`,!1),a$=n$(`union`,!0),o$=n$(`intersect`,!1),s$=n$(`intersect`,!0),c$=n$(`except`,!1),l$=n$(`except`,!0);var u$=(Ni=class{constructor(t){e.defineProperty(this,`dialect`,void 0),e.defineProperty(this,`dialectConfig`,void 0),e.defineProperty(this,`$with`,(e,t)=>{let n=this,r=r=>(typeof r==`function`&&(r=r(n)),new Proxy(new LX(r.getSQL(),t??(`getSelectedFields`in r?r.getSelectedFields()??{}:{}),e,!0),new GQ({alias:e,sqlAliasedBehavior:`alias`,sqlBehavior:`error`})));return{as:r}}),this.dialect=Q(t,ZQ)?t:void 0,this.dialectConfig=Q(t,ZQ)?void 0:t}with(...e){let t=this;function n(n){return new $Q({fields:n??void 0,session:void 0,dialect:t.getDialect(),withList:e})}function r(e){return new $Q({fields:e??void 0,session:void 0,dialect:t.getDialect(),distinct:!0})}function i(e,n){return new $Q({fields:n??void 0,session:void 0,dialect:t.getDialect(),distinct:{on:e}})}return{select:n,selectDistinct:r,selectDistinctOn:i}}select(e){return new $Q({fields:e??void 0,session:void 0,dialect:this.getDialect()})}selectDistinct(e){return new $Q({fields:e??void 0,session:void 0,dialect:this.getDialect(),distinct:!0})}selectDistinctOn(e,t){return new $Q({fields:t??void 0,session:void 0,dialect:this.getDialect(),distinct:{on:e}})}getDialect(){return this.dialect||=new ZQ(this.dialectConfig),this.dialect}},e.defineProperty(Ni,Z,`PgQueryBuilder`),Ni);function d$(e){return Q(e,oQ)?[e[UX]?`${e[UX]}.${e[ZX.Symbol.BaseName]}`:e[ZX.Symbol.BaseName]]:Q(e,IX)?e._.usedTables??[]:Q(e,iZ)?e.usedTables??[]:[]}var f$=(Pi=class extends DZ{constructor(t,n,r,i){super(),e.defineProperty(this,`config`,void 0),e.defineProperty(this,`cacheConfig`,void 0),e.defineProperty(this,`authToken`,void 0),e.defineProperty(this,`execute`,e=>VX.startActiveSpan(`drizzle.operation`,()=>this._prepare().execute(e,this.authToken))),this.session=n,this.dialect=r,this.config={table:t,withList:i}}where(e){return this.config.where=e,this}returning(e=this.config.table[ZX.Symbol.Columns]){return this.config.returningFields=e,this.config.returning=OZ(e),this}getSQL(){return this.dialect.buildDeleteQuery(this.config)}toSQL(){let{typings:e,...t}=this.dialect.sqlToQuery(this.getSQL());return t}_prepare(e){return VX.startActiveSpan(`drizzle.prepareQuery`,()=>this.session.prepareQuery(this.dialect.sqlToQuery(this.getSQL()),this.config.returning,e,!0,void 0,{type:`delete`,tables:d$(this.config.table)},this.cacheConfig))}prepare(e){return this._prepare(e)}setToken(e){return this.authToken=e,this}getSelectedFields(){return this.config.returningFields?new Proxy(this.config.returningFields,new GQ({alias:QX(this.config.table),sqlAliasedBehavior:`alias`,sqlBehavior:`error`})):void 0}$dynamic(){return this}},e.defineProperty(Pi,Z,`PgDelete`),Pi),p$=(Fi=class{constructor(t,n,r,i,a){e.defineProperty(this,`authToken`,void 0),this.table=t,this.session=n,this.dialect=r,this.withList=i,this.overridingSystemValue_=a}setToken(e){return this.authToken=e,this}overridingSystemValue(){return this.overridingSystemValue_=!0,this}values(e){if(e=Array.isArray(e)?e:[e],e.length===0)throw Error(`values() must be called with at least one value`);let t=e.map(e=>{let t={},n=this.table[ZX.Symbol.Columns];for(let r of Object.keys(e)){let i=e[r];t[r]=Q(i,iZ)?i:new uZ(i,n[r])}return t});return new m$(this.table,t,this.session,this.dialect,this.withList,!1,this.overridingSystemValue_).setToken(this.authToken)}select(e){let t=typeof e==`function`?e(new u$):e;if(!Q(t,iZ)&&!kZ(this.table[WX],t._.selectedFields))throw Error(`Insert select error: selected fields are not the same or are in a different order compared to the table definition`);return new m$(this.table,t,this.session,this.dialect,this.withList,!0)}},e.defineProperty(Fi,Z,`PgInsertBuilder`),Fi),m$=(Ii=class extends DZ{constructor(t,n,r,i,a,o,s){super(),e.defineProperty(this,`config`,void 0),e.defineProperty(this,`cacheConfig`,void 0),e.defineProperty(this,`authToken`,void 0),e.defineProperty(this,`execute`,e=>VX.startActiveSpan(`drizzle.operation`,()=>this._prepare().execute(e,this.authToken))),this.session=r,this.dialect=i,this.config={table:t,values:n,withList:a,select:o,overridingSystemValue_:s}}returning(e=this.config.table[ZX.Symbol.Columns]){return this.config.returningFields=e,this.config.returning=OZ(e),this}onConflictDoNothing(e={}){if(e.target===void 0)this.config.onConflict=$`do nothing`;else{let t=``;t=Array.isArray(e.target)?e.target.map(e=>this.dialect.escapeName(this.dialect.casing.getColumnCasing(e))).join(`,`):this.dialect.escapeName(this.dialect.casing.getColumnCasing(e.target));let n=e.where?$` where ${e.where}`:void 0;this.config.onConflict=$`(${$.raw(t)})${n} do nothing`}return this}onConflictDoUpdate(e){if(e.where&&(e.targetWhere||e.setWhere))throw Error(`You cannot use both "where" and "targetWhere"/"setWhere" at the same time - "where" is deprecated, use "targetWhere" or "setWhere" instead.`);let t=e.where?$` where ${e.where}`:void 0,n=e.targetWhere?$` where ${e.targetWhere}`:void 0,r=e.setWhere?$` where ${e.setWhere}`:void 0,i=this.dialect.buildUpdateSet(this.config.table,AZ(this.config.table,e.set)),a=``;return a=Array.isArray(e.target)?e.target.map(e=>this.dialect.escapeName(this.dialect.casing.getColumnCasing(e))).join(`,`):this.dialect.escapeName(this.dialect.casing.getColumnCasing(e.target)),this.config.onConflict=$`(${$.raw(a)})${n} do update set ${i}${t}${r}`,this}getSQL(){return this.dialect.buildInsertQuery(this.config)}toSQL(){let{typings:e,...t}=this.dialect.sqlToQuery(this.getSQL());return t}_prepare(e){return VX.startActiveSpan(`drizzle.prepareQuery`,()=>this.session.prepareQuery(this.dialect.sqlToQuery(this.getSQL()),this.config.returning,e,!0,void 0,{type:`insert`,tables:d$(this.config.table)},this.cacheConfig))}prepare(e){return this._prepare(e)}setToken(e){return this.authToken=e,this}getSelectedFields(){return this.config.returningFields?new Proxy(this.config.returningFields,new GQ({alias:QX(this.config.table),sqlAliasedBehavior:`alias`,sqlBehavior:`error`})):void 0}$dynamic(){return this}},e.defineProperty(Ii,Z,`PgInsert`),Ii),h$=(Li=class extends DZ{constructor(t,n,r){super(),e.defineProperty(this,`config`,void 0),e.defineProperty(this,`authToken`,void 0),e.defineProperty(this,`execute`,e=>VX.startActiveSpan(`drizzle.operation`,()=>this._prepare().execute(e,this.authToken))),this.session=n,this.dialect=r,this.config={view:t}}concurrently(){if(this.config.withNoData!==void 0)throw Error(`Cannot use concurrently and withNoData together`);return this.config.concurrently=!0,this}withNoData(){if(this.config.concurrently!==void 0)throw Error(`Cannot use concurrently and withNoData together`);return this.config.withNoData=!0,this}getSQL(){return this.dialect.buildRefreshMaterializedViewQuery(this.config)}toSQL(){let{typings:e,...t}=this.dialect.sqlToQuery(this.getSQL());return t}_prepare(e){return VX.startActiveSpan(`drizzle.prepareQuery`,()=>this.session.prepareQuery(this.dialect.sqlToQuery(this.getSQL()),void 0,e,!0))}prepare(e){return this._prepare(e)}setToken(e){return this.authToken=e,this}},e.defineProperty(Li,Z,`PgRefreshMaterializedView`),Li),g$=(Ri=class{constructor(t,n,r,i){e.defineProperty(this,`authToken`,void 0),this.table=t,this.session=n,this.dialect=r,this.withList=i}setToken(e){return this.authToken=e,this}set(e){return new _$(this.table,AZ(this.table,e),this.session,this.dialect,this.withList).setToken(this.authToken)}},e.defineProperty(Ri,Z,`PgUpdateBuilder`),Ri),_$=(zi=class extends DZ{constructor(t,n,r,i,a){super(),e.defineProperty(this,`config`,void 0),e.defineProperty(this,`tableName`,void 0),e.defineProperty(this,`joinsNotNullableMap`,void 0),e.defineProperty(this,`cacheConfig`,void 0),e.defineProperty(this,`leftJoin`,this.createJoin(`left`)),e.defineProperty(this,`rightJoin`,this.createJoin(`right`)),e.defineProperty(this,`innerJoin`,this.createJoin(`inner`)),e.defineProperty(this,`fullJoin`,this.createJoin(`full`)),e.defineProperty(this,`authToken`,void 0),e.defineProperty(this,`execute`,e=>this._prepare().execute(e,this.authToken)),this.session=r,this.dialect=i,this.config={set:n,table:t,withList:a,joins:[]},this.tableName=NZ(t),this.joinsNotNullableMap=typeof this.tableName==`string`?{[this.tableName]:!0}:{}}from(e){let t=e,n=NZ(t);return typeof n==`string`&&(this.joinsNotNullableMap[n]=!0),this.config.from=t,this}getTableLikeFields(e){return Q(e,oQ)?e[ZX.Symbol.Columns]:Q(e,IX)?e._.selectedFields:e[HX].selectedFields}createJoin(e){return(t,n)=>{let r=NZ(t);if(typeof r==`string`&&this.config.joins.some(e=>e.alias===r))throw Error(`Alias "${r}" is already used in this query`);if(typeof n==`function`){let e=this.config.from&&!Q(this.config.from,iZ)?this.getTableLikeFields(this.config.from):void 0;n=n(new Proxy(this.config.table[ZX.Symbol.Columns],new GQ({sqlAliasedBehavior:`sql`,sqlBehavior:`sql`})),e&&new Proxy(e,new GQ({sqlAliasedBehavior:`sql`,sqlBehavior:`sql`})))}if(this.config.joins.push({on:n,table:t,joinType:e,alias:r}),typeof r==`string`)switch(e){case`left`:this.joinsNotNullableMap[r]=!1;break;case`right`:this.joinsNotNullableMap=Object.fromEntries(Object.entries(this.joinsNotNullableMap).map(([e])=>[e,!1])),this.joinsNotNullableMap[r]=!0;break;case`inner`:this.joinsNotNullableMap[r]=!0;break;case`full`:this.joinsNotNullableMap=Object.fromEntries(Object.entries(this.joinsNotNullableMap).map(([e])=>[e,!1])),this.joinsNotNullableMap[r]=!1;break}return this}}where(e){return this.config.where=e,this}returning(e){if(!e&&(e=Object.assign({},this.config.table[ZX.Symbol.Columns]),this.config.from)){let t=NZ(this.config.from);if(typeof t==`string`&&this.config.from&&!Q(this.config.from,iZ)){let n=this.getTableLikeFields(this.config.from);e[t]=n}for(let t of this.config.joins){let n=NZ(t.table);if(typeof n==`string`&&!Q(t.table,iZ)){let r=this.getTableLikeFields(t.table);e[n]=r}}}return this.config.returningFields=e,this.config.returning=OZ(e),this}getSQL(){return this.dialect.buildUpdateQuery(this.config)}toSQL(){let{typings:e,...t}=this.dialect.sqlToQuery(this.getSQL());return t}_prepare(e){let t=this.session.prepareQuery(this.dialect.sqlToQuery(this.getSQL()),this.config.returning,e,!0,void 0,{type:`insert`,tables:d$(this.config.table)},this.cacheConfig);return t.joinsNotNullableMap=this.joinsNotNullableMap,t}prepare(e){return this._prepare(e)}setToken(e){return this.authToken=e,this}getSelectedFields(){return this.config.returningFields?new Proxy(this.config.returningFields,new GQ({alias:QX(this.config.table),sqlAliasedBehavior:`alias`,sqlBehavior:`error`})):void 0}$dynamic(){return this}},e.defineProperty(zi,Z,`PgUpdate`),zi),v$=(ra=Symbol.toStringTag,Bi=class t extends iZ{constructor(n){super(t.buildEmbeddedCount(n.source,n.filters).queryChunks),e.defineProperty(this,`sql`,void 0),e.defineProperty(this,`token`,void 0),e.defineProperty(this,ra,`PgCountBuilder`),e.defineProperty(this,`session`,void 0),this.params=n,this.mapWith(Number),this.session=n.session,this.sql=t.buildCount(n.source,n.filters)}static buildEmbeddedCount(e,t){return $`(select count(*) from ${e}${$.raw(` where `).if(t)}${t})`}static buildCount(e,t){return $`select count(*) as count from ${e}${$.raw(` where `).if(t)}${t};`}setToken(e){return this.token=e,this}then(e,t){return Promise.resolve(this.session.count(this.sql,this.token)).then(e,t)}catch(e){return this.then(void 0,e)}finally(e){return this.then(t=>(e?.(),t),t=>{throw e?.(),t})}},e.defineProperty(Bi,Z,`PgCountBuilder`),Bi),y$=(Vi=class{constructor(e,t,n,r,i,a,o){this.fullSchema=e,this.schema=t,this.tableNamesMap=n,this.table=r,this.tableConfig=i,this.dialect=a,this.session=o}findMany(e){return new b$(this.fullSchema,this.schema,this.tableNamesMap,this.table,this.tableConfig,this.dialect,this.session,e||{},`many`)}findFirst(e){return new b$(this.fullSchema,this.schema,this.tableNamesMap,this.table,this.tableConfig,this.dialect,this.session,e?{...e,limit:1}:{limit:1},`first`)}},e.defineProperty(Vi,Z,`PgRelationalQueryBuilder`),Vi),b$=(Hi=class extends DZ{constructor(t,n,r,i,a,o,s,c,l){super(),e.defineProperty(this,`authToken`,void 0),this.fullSchema=t,this.schema=n,this.tableNamesMap=r,this.table=i,this.tableConfig=a,this.dialect=o,this.session=s,this.config=c,this.mode=l}_prepare(e){return VX.startActiveSpan(`drizzle.prepareQuery`,()=>{let{query:t,builtQuery:n}=this._toSQL();return this.session.prepareQuery(n,void 0,e,!0,(e,n)=>{let r=e.map(e=>WQ(this.schema,this.tableConfig,e,t.selection,n));return this.mode===`first`?r[0]:r})})}prepare(e){return this._prepare(e)}_getQuery(){return this.dialect.buildRelationalQueryWithoutPK({fullSchema:this.fullSchema,schema:this.schema,tableNamesMap:this.tableNamesMap,table:this.table,tableConfig:this.tableConfig,queryConfig:this.config,tableAlias:this.tableConfig.tsName})}getSQL(){return this._getQuery().sql}_toSQL(){let e=this._getQuery(),t=this.dialect.sqlToQuery(e.sql);return{query:e,builtQuery:t}}toSQL(){return this._toSQL().builtQuery}setToken(e){return this.authToken=e,this}execute(){return VX.startActiveSpan(`drizzle.operation`,()=>this._prepare().execute(void 0,this.authToken))}},e.defineProperty(Hi,Z,`PgRelationalQuery`),Hi),x$=(Ui=class extends DZ{constructor(e,t,n,r){super(),this.execute=e,this.sql=t,this.query=n,this.mapBatchResult=r}getSQL(){return this.sql}getQuery(){return this.query}mapResult(e,t){return t?this.mapBatchResult(e):e}_prepare(){return this}isResponseInArrayMode(){return!1}},e.defineProperty(Ui,Z,`PgRaw`),Ui),S$=(Wi=class{constructor(t,n,r){if(e.defineProperty(this,`query`,void 0),e.defineProperty(this,`$with`,(e,t)=>{let n=this,r=r=>(typeof r==`function`&&(r=r(new u$(n.dialect))),new Proxy(new LX(r.getSQL(),t??(`getSelectedFields`in r?r.getSelectedFields()??{}:{}),e,!0),new GQ({alias:e,sqlAliasedBehavior:`alias`,sqlBehavior:`error`})));return{as:r}}),e.defineProperty(this,`$cache`,void 0),e.defineProperty(this,`authToken`,void 0),this.dialect=t,this.session=n,this._=r?{schema:r.schema,fullSchema:r.fullSchema,tableNamesMap:r.tableNamesMap,session:n}:{schema:void 0,fullSchema:{},tableNamesMap:{},session:n},this.query={},this._.schema)for(let[e,i]of Object.entries(this._.schema))this.query[e]=new y$(r.fullSchema,this._.schema,this._.tableNamesMap,r.fullSchema[e],i,t,n);this.$cache={invalidate:async e=>{}}}$count(e,t){return new v$({source:e,filters:t,session:this.session})}with(...e){let t=this;function n(n){return new $Q({fields:n??void 0,session:t.session,dialect:t.dialect,withList:e})}function r(n){return new $Q({fields:n??void 0,session:t.session,dialect:t.dialect,withList:e,distinct:!0})}function i(n,r){return new $Q({fields:r??void 0,session:t.session,dialect:t.dialect,withList:e,distinct:{on:n}})}function a(n){return new g$(n,t.session,t.dialect,e)}function o(n){return new p$(n,t.session,t.dialect,e)}function s(n){return new f$(n,t.session,t.dialect,e)}return{select:n,selectDistinct:r,selectDistinctOn:i,update:a,insert:o,delete:s}}select(e){return new $Q({fields:e??void 0,session:this.session,dialect:this.dialect})}selectDistinct(e){return new $Q({fields:e??void 0,session:this.session,dialect:this.dialect,distinct:!0})}selectDistinctOn(e,t){return new $Q({fields:t??void 0,session:this.session,dialect:this.dialect,distinct:{on:e}})}update(e){return new g$(e,this.session,this.dialect)}insert(e){return new p$(e,this.session,this.dialect)}delete(e){return new f$(e,this.session,this.dialect)}refreshMaterializedView(e){return new h$(e,this.session,this.dialect)}execute(e){let t=typeof e==`string`?$.raw(e):e.getSQL(),n=this.dialect.sqlToQuery(t),r=this.session.prepareQuery(n,void 0,void 0,!1);return new x$(()=>r.execute(void 0,this.authToken),t,n,e=>r.mapResult(e,!0))}transaction(e,t){return this.session.transaction(e,t)}},e.defineProperty(Wi,Z,`PgDatabase`),Wi),C$=(Gi=class{},e.defineProperty(Gi,Z,`Cache`),Gi),w$=(Ki=class extends C${strategy(){return`all`}async get(e){}async put(e,t,n,r){}async onMutate(e){}},e.defineProperty(Ki,Z,`NoopCache`),Ki);async function T$(e,t){let n=`${e}-${JSON.stringify(t)}`,r=new TextEncoder,i=r.encode(n),a=await crypto.subtle.digest(`SHA-256`,i),o=[...new Uint8Array(a)],s=o.map(e=>e.toString(16).padStart(2,`0`)).join(``);return s}var E$=class e extends Error{constructor(t,n,r){super(`Failed query: ${t} -params: ${n}`),this.query=t,this.params=n,this.cause=r,Error.captureStackTrace(this,e),r&&(this.cause=r)}},D$=(qi=class{constructor(t,n,r,i){var a;e.defineProperty(this,`authToken`,void 0),e.defineProperty(this,`joinsNotNullableMap`,void 0),this.query=t,this.cache=n,this.queryMetadata=r,this.cacheConfig=i,n&&n.strategy()===`all`&&i===void 0&&(this.cacheConfig={enable:!0,autoInvalidate:!0}),(a=this.cacheConfig)?.enable||(this.cacheConfig=void 0)}getQuery(){return this.query}mapResult(e,t){return e}setToken(e){return this.authToken=e,this}async queryWithCache(e,t,n){if(this.cache===void 0||Q(this.cache,w$)||this.queryMetadata===void 0)try{return await n()}catch(n){throw new E$(e,t,n)}if(this.cacheConfig&&!this.cacheConfig.enable)try{return await n()}catch(n){throw new E$(e,t,n)}if((this.queryMetadata.type===`insert`||this.queryMetadata.type===`update`||this.queryMetadata.type===`delete`)&&this.queryMetadata.tables.length>0)try{let[e]=await Promise.all([n(),this.cache.onMutate({tables:this.queryMetadata.tables})]);return e}catch(n){throw new E$(e,t,n)}if(!this.cacheConfig)try{return await n()}catch(n){throw new E$(e,t,n)}if(this.queryMetadata.type===`select`){let r=await this.cache.get(this.cacheConfig.tag??await T$(e,t),this.queryMetadata.tables,this.cacheConfig.tag!==void 0,this.cacheConfig.autoInvalidate);if(r===void 0){let r;try{r=await n()}catch(n){throw new E$(e,t,n)}return await this.cache.put(this.cacheConfig.tag??await T$(e,t),r,this.cacheConfig.autoInvalidate?this.queryMetadata.tables:[],this.cacheConfig.tag!==void 0,this.cacheConfig.config),r}return r}try{return await n()}catch(n){throw new E$(e,t,n)}}},e.defineProperty(qi,Z,`PgPreparedQuery`),qi),O$=(Ji=class{constructor(e){this.dialect=e}execute(e,t){return VX.startActiveSpan(`drizzle.operation`,()=>{let n=VX.startActiveSpan(`drizzle.prepareQuery`,()=>this.prepareQuery(this.dialect.sqlToQuery(e),void 0,void 0,!1));return n.setToken(t).execute(void 0,t)})}all(e){return this.prepareQuery(this.dialect.sqlToQuery(e),void 0,void 0,!1).all()}async count(e,t){let n=await this.execute(e,t);return Number(n[0].count)}},e.defineProperty(Ji,Z,`PgSession`),Ji),k$=(Yi=class extends S${constructor(e,t,n,r=0){super(e,t,n),this.schema=n,this.nestedIndex=r}rollback(){throw new CZ}getTransactionConfigSQL(e){let t=[];return e.isolationLevel&&t.push(`isolation level ${e.isolationLevel}`),e.accessMode&&t.push(e.accessMode),typeof e.deferrable==`boolean`&&t.push(e.deferrable?`deferrable`:`not deferrable`),$.raw(t.join(` `))}setTransaction(e){return this.session.execute($`set transaction ${this.getTransactionConfigSQL(e)}`)}},e.defineProperty(Yi,Z,`PgTransaction`),Yi);function A$(e){return typeof e==`string`&&/^true$/i.test(e)}function j$(e){let t={scheme:`duckdb-wasm:`},n=new URL(e);if(!n.protocol.startsWith(`duckdb-wasm:`))throw Error(`Expected scheme to be "duckdb-wasm:" but got "${n.protocol}"`);n.searchParams.get(`bundles`)===`import-url`&&(t.bundles=`import-url`);let r=n.searchParams.get(`logger`);r&&A$(r)&&(t.logger=!0);let i=n.searchParams.get(`storage`);switch(i){case aX.ORIGIN_PRIVATE_FS:{n.host.length>0&&console.warn(`Host "${n.host}" will be ignored while using Origin Private FS`);let e=n.searchParams.get(`write`);t.storage={type:aX.ORIGIN_PRIVATE_FS,path:n.pathname.startsWith(`/`)?n.pathname.slice(1):n.pathname,...e&&A$(e)&&{accessMode:TB.READ_WRITE}};break}case null:break;default:console.warn(`Unknown storage type "${i}"`);break}return t}var M$=(Xi=class extends D${constructor(e,t,n,r,i,a){super({sql:t,params:n}),this.client=e,this.queryString=t,this.params=n,this.logger=r,this.fields=i,this.customResultMapper=a}async execute(e={}){let t=fZ(this.params,e);this.logger.logQuery(this.queryString,t);let{fields:n,queryString:r,client:i,customResultMapper:a}=this,o=await i;return o.query(r,t)}async all(e={}){let t=fZ(this.params,e);this.logger.logQuery(this.queryString,t);let n=await this.client;return n.query(this.queryString,t)}},e.defineProperty(Xi,Z,`DuckDBWasmPreparedQuery`),Xi),N$=(Zi=class t extends O${constructor(t,n,r,i={}){super(n),e.defineProperty(this,`logger`,void 0),this.client=t,this.schema=r,this.options=i,this.logger=i.logger??new EZ}prepareQuery(e,t,n,r,i){return new M$(this.client,e.sql,e.params,this.logger,t,i)}async query(e,t){this.logger.logQuery(e,t);let n=await this.client;return n.query(e,t)}async queryObjects(e,t){this.logger.logQuery(e,t);let n=await this.client;return n.query(e,t)}transaction(e,n){return sX(this.client,async r=>{let i=new t(r,this.dialect,this.schema,this.options),a=new P$(this.dialect,i,this.schema);return n&&await a.setTransaction(n),e(a)})}},e.defineProperty(Zi,Z,`DuckDBWasmSession`),Zi),P$=(Qi=class t extends k${constructor(t,n,r,i=0){super(t,n,r,i),e.defineProperty(this,`dialect`,void 0),e.defineProperty(this,`session`,void 0),this.dialect=t,this.session=n}async transaction(e){return cX(this.session.client,``,async n=>{let r=new N$(n,this.dialect,this.schema,this.session.options),i=new t(this.dialect,r,this.schema);return e(i)})}},e.defineProperty(Qi,Z,`DuckDBWasmTransaction`),Qi),F$=($i=class extends S${},e.defineProperty($i,Z,`DuckDBWasmDatabase`),$i);function I$(e,t={}){let n=new ZQ({casing:t.casing}),r;t.logger===!0?r=new TZ:t.logger!==!1&&(r=t.logger);let i;if(t.schema){let e=zQ(t.schema,UQ);i={fullSchema:t.schema,schema:e.tables,tableNamesMap:e.tableNamesMap}}let a=new N$(e,n,i,{logger:r}),o=new F$(n,a,i);return o.$client=e,o}function L$(e,t){let n=j$(e),r;if(n.bundles===`import-url`){let e=async()=>{let e=await MY();switch(e){case`browser`:return(await Et(async()=>{let{getImportUrlBundles:e}=await import(`./import-url-browser-CajlDqRn.js`);return{getImportUrlBundles:e}},__vite__mapDeps([5,6,7]))).getImportUrlBundles();case`node`:return await(await Et(async()=>{let{getImportUrlBundles:e}=await import(`./import-url-node-BGiLk3V8.js`);return{getImportUrlBundles:e}},__vite__mapDeps([8,7]))).getImportUrlBundles();default:throw Error(`Unsupported environment: "${e}"`)}};r=e()}else{let e=async()=>{let e=await MY();switch(e){case`browser`:return(await Et(async()=>{let{getBundles:e}=await import(`./default-browser-DTRWbcB3.js`);return{getBundles:e}},[])).getBundles();case`node`:return await(await Et(async()=>{let{getBundles:e}=await import(`./default-node-C5y-aJTF.js`);return{getBundles:e}},__vite__mapDeps([4,2,3]))).getBundles();default:throw Error(`Unsupported environment: "${e}"`)}};r=e()}return I$(oX({bundles:r,logger:n.logger?new MB:void 0,storage:n.storage}),t)}function R$(...e){if(typeof e[0]==`string`)return L$(e[0],e[1]);if(PZ(e[0])){let{connection:t,client:n,...r}=e[0];if(n)return I$(n,r);if(typeof t==`string`)return L$(t,r);if(t===void 0)throw Error(`connection option is required`);return I$(oX({bundles:t.bundles,logger:t.logger,storage:t.storage}),r)}return I$(e[0],e[1])}(function(e){function t(e){return I$({options:{parsers:{},serializers:{}}},e)}e.mock=t})(R$||={});const z$={relative:``},B$={"h-full":``,"w-full":``},V$={key:0,class:`animate-stripe`,absolute:``,left:`1/2`,bottom:`20%`,z:`20`,"rounded-2xl":``,text:`primary-600`,"px-2":``,"py-2":``,transform:`translate-x--1/2`},H$={bg:`primary-50`,"rounded-xl":``,"px-10":``,"py-6":``},U$=[`innerHTML`];var W$=H({__name:`Stage`,props:{paused:{type:Boolean,default:!1},focusAt:null},setup(e){let t=W(),n=W(),{stageView:r}=ln(Cn()),{mouthOpenSize:i}=ln(Vn()),{audioContext:a,calculateVolume:o}=Rn(),{onBeforeMessageComposed:s,onBeforeSend:c,onTokenLiteral:l,onTokenSpecial:u,onStreamEnd:d,streamingMessage:f,onAssistantResponseEnd:p}=zn(),{process:m}=rr(),h=Bn(),g=W(),_=W(!1),v=W(!1),y=ar({handlers:[e=>new Promise(t=>{let n=a.createBufferSource();n.buffer=e.data.audioBuffer,n.connect(a.destination),n.connect(g.value),_.value=!0,n.start(0),n.onended=()=>{_.value=!1,t()}})]}),b=Hn(),{ssmlEnabled:x,activeSpeechProvider:S,activeSpeechModel:C,activeSpeechVoice:w,pitch:T}=ln(b);async function E(e){try{if(!S.value){console.warn(`No active speech provider configured`);return}if(!w.value){console.warn(`No active speech voice configured`);return}let t=h.getProviderInstance(S.value);if(!t){console.error(`Failed to initialize speech provider`);return}let n=h.getProviderConfig(S.value),r=x.value?b.generateSSML(e.data,w.value,{...n,pitch:T.value}):e.data,i=await Ln({...t.speech(C.value,n),input:r,voice:w.value.id}),o=await a.decodeAudioData(i);await y.add({audioBuffer:o,text:e.data})}catch(e){console.error(`Speech generation failed:`,e)}}let D=ar({handlers:[E]});D.on(`add`,e=>{console.debug(`ttsQueue added`,e)});let O=fr(D),{live2dCurrentMotion:k}=ln(Cn()),A=ar({handlers:[async e=>{if(r.value===`3d`){let t=sr[e.data];if(!t)return;await n.value.setExpression(t)}else r.value===`2d`&&(k.value={group:or[e.data]})}]}),j=dr(A);j.onHandlerEvent(`emotion`,e=>{console.debug(`emotion detected`,e)});let M=ur();M.onHandlerEvent(`delay`,e=>{console.debug(`delay detected`,e)});function N(){requestAnimationFrame(N),_.value&&(i.value=o(g.value,`linear`))}function ee(){v.value||(N(),a.resume(),v.value=!0)}function P(){g.value||=a.createAnalyser()}return s(async()=>{P(),ee()}),c(async()=>{k.value={group:cr}}),l(async e=>{await O.add(e)}),u(async e=>{await M.add(e),await j.add(e)}),d(async()=>{await M.add(lr)}),p(async e=>{}),Zt(()=>{v.value=!1}),Yt(async()=>{t.value=R$({connection:{bundles:In()}}),await t.value.execute(`CREATE TABLE memory_test (vec FLOAT[768]);`)}),(t,a)=>(U(),V(`div`,z$,[B(`div`,B$,[G(r)===`2d`?(U(),kt(yb,{key:0,"focus-at":e.focusAt,"mouth-open-size":G(i),"min-w":`50% 0)try{let[e]=await Promise.all([n(),this.cache.onMutate({tables:this.queryMetadata.tables})]);return e}catch(n){throw new E$(e,t,n)}if(!this.cacheConfig)try{return await n()}catch(n){throw new E$(e,t,n)}if(this.queryMetadata.type===`select`){let r=await this.cache.get(this.cacheConfig.tag??await T$(e,t),this.queryMetadata.tables,this.cacheConfig.tag!==void 0,this.cacheConfig.autoInvalidate);if(r===void 0){let r;try{r=await n()}catch(n){throw new E$(e,t,n)}return await this.cache.put(this.cacheConfig.tag??await T$(e,t),r,this.cacheConfig.autoInvalidate?this.queryMetadata.tables:[],this.cacheConfig.tag!==void 0,this.cacheConfig.config),r}return r}try{return await n()}catch(n){throw new E$(e,t,n)}}},e.defineProperty(qi,Z,`PgPreparedQuery`),qi),O$=(Ji=class{constructor(e){this.dialect=e}execute(e,t){return VX.startActiveSpan(`drizzle.operation`,()=>{let n=VX.startActiveSpan(`drizzle.prepareQuery`,()=>this.prepareQuery(this.dialect.sqlToQuery(e),void 0,void 0,!1));return n.setToken(t).execute(void 0,t)})}all(e){return this.prepareQuery(this.dialect.sqlToQuery(e),void 0,void 0,!1).all()}async count(e,t){let n=await this.execute(e,t);return Number(n[0].count)}},e.defineProperty(Ji,Z,`PgSession`),Ji),k$=(Yi=class extends S${constructor(e,t,n,r=0){super(e,t,n),this.schema=n,this.nestedIndex=r}rollback(){throw new CZ}getTransactionConfigSQL(e){let t=[];return e.isolationLevel&&t.push(`isolation level ${e.isolationLevel}`),e.accessMode&&t.push(e.accessMode),typeof e.deferrable==`boolean`&&t.push(e.deferrable?`deferrable`:`not deferrable`),$.raw(t.join(` `))}setTransaction(e){return this.session.execute($`set transaction ${this.getTransactionConfigSQL(e)}`)}},e.defineProperty(Yi,Z,`PgTransaction`),Yi);function A$(e){return typeof e==`string`&&/^true$/i.test(e)}function j$(e){let t={scheme:`duckdb-wasm:`},n=new URL(e);if(!n.protocol.startsWith(`duckdb-wasm:`))throw Error(`Expected scheme to be "duckdb-wasm:" but got "${n.protocol}"`);n.searchParams.get(`bundles`)===`import-url`&&(t.bundles=`import-url`);let r=n.searchParams.get(`logger`);r&&A$(r)&&(t.logger=!0);let i=n.searchParams.get(`storage`);switch(i){case aX.ORIGIN_PRIVATE_FS:{n.host.length>0&&console.warn(`Host "${n.host}" will be ignored while using Origin Private FS`);let e=n.searchParams.get(`write`);t.storage={type:aX.ORIGIN_PRIVATE_FS,path:n.pathname.startsWith(`/`)?n.pathname.slice(1):n.pathname,...e&&A$(e)&&{accessMode:TB.READ_WRITE}};break}case null:break;default:console.warn(`Unknown storage type "${i}"`);break}return t}var M$=(Xi=class extends D${constructor(e,t,n,r,i,a){super({sql:t,params:n}),this.client=e,this.queryString=t,this.params=n,this.logger=r,this.fields=i,this.customResultMapper=a}async execute(e={}){let t=fZ(this.params,e);this.logger.logQuery(this.queryString,t);let{fields:n,queryString:r,client:i,customResultMapper:a}=this,o=await i;return o.query(r,t)}async all(e={}){let t=fZ(this.params,e);this.logger.logQuery(this.queryString,t);let n=await this.client;return n.query(this.queryString,t)}},e.defineProperty(Xi,Z,`DuckDBWasmPreparedQuery`),Xi),N$=(Zi=class t extends O${constructor(t,n,r,i={}){super(n),e.defineProperty(this,`logger`,void 0),this.client=t,this.schema=r,this.options=i,this.logger=i.logger??new EZ}prepareQuery(e,t,n,r,i){return new M$(this.client,e.sql,e.params,this.logger,t,i)}async query(e,t){this.logger.logQuery(e,t);let n=await this.client;return n.query(e,t)}async queryObjects(e,t){this.logger.logQuery(e,t);let n=await this.client;return n.query(e,t)}transaction(e,n){return sX(this.client,async r=>{let i=new t(r,this.dialect,this.schema,this.options),a=new P$(this.dialect,i,this.schema);return n&&await a.setTransaction(n),e(a)})}},e.defineProperty(Zi,Z,`DuckDBWasmSession`),Zi),P$=(Qi=class t extends k${constructor(t,n,r,i=0){super(t,n,r,i),e.defineProperty(this,`dialect`,void 0),e.defineProperty(this,`session`,void 0),this.dialect=t,this.session=n}async transaction(e){return cX(this.session.client,``,async n=>{let r=new N$(n,this.dialect,this.schema,this.session.options),i=new t(this.dialect,r,this.schema);return e(i)})}},e.defineProperty(Qi,Z,`DuckDBWasmTransaction`),Qi),F$=($i=class extends S${},e.defineProperty($i,Z,`DuckDBWasmDatabase`),$i);function I$(e,t={}){let n=new ZQ({casing:t.casing}),r;t.logger===!0?r=new TZ:t.logger!==!1&&(r=t.logger);let i;if(t.schema){let e=zQ(t.schema,UQ);i={fullSchema:t.schema,schema:e.tables,tableNamesMap:e.tableNamesMap}}let a=new N$(e,n,i,{logger:r}),o=new F$(n,a,i);return o.$client=e,o}function L$(e,t){let n=j$(e),r;if(n.bundles===`import-url`){let e=async()=>{let e=await MY();switch(e){case`browser`:return(await Et(async()=>{let{getImportUrlBundles:e}=await import(`./import-url-browser-CajlDqRn.js`);return{getImportUrlBundles:e}},__vite__mapDeps([5,6,7]))).getImportUrlBundles();case`node`:return await(await Et(async()=>{let{getImportUrlBundles:e}=await import(`./import-url-node-BGiLk3V8.js`);return{getImportUrlBundles:e}},__vite__mapDeps([8,7]))).getImportUrlBundles();default:throw Error(`Unsupported environment: "${e}"`)}};r=e()}else{let e=async()=>{let e=await MY();switch(e){case`browser`:return(await Et(async()=>{let{getBundles:e}=await import(`./default-browser-DTRWbcB3.js`);return{getBundles:e}},[])).getBundles();case`node`:return await(await Et(async()=>{let{getBundles:e}=await import(`./default-node-CQhep7iX.js`);return{getBundles:e}},__vite__mapDeps([4,2,3]))).getBundles();default:throw Error(`Unsupported environment: "${e}"`)}};r=e()}return I$(oX({bundles:r,logger:n.logger?new MB:void 0,storage:n.storage}),t)}function R$(...e){if(typeof e[0]==`string`)return L$(e[0],e[1]);if(PZ(e[0])){let{connection:t,client:n,...r}=e[0];if(n)return I$(n,r);if(typeof t==`string`)return L$(t,r);if(t===void 0)throw Error(`connection option is required`);return I$(oX({bundles:t.bundles,logger:t.logger,storage:t.storage}),r)}return I$(e[0],e[1])}(function(e){function t(e){return I$({options:{parsers:{},serializers:{}}},e)}e.mock=t})(R$||={});const z$={relative:``},B$={"h-full":``,"w-full":``},V$={key:0,class:`animate-stripe`,absolute:``,left:`1/2`,bottom:`20%`,z:`20`,"rounded-2xl":``,text:`primary-600`,"px-2":``,"py-2":``,transform:`translate-x--1/2`},H$={bg:`primary-50`,"rounded-xl":``,"px-10":``,"py-6":``},U$=[`innerHTML`];var W$=H({__name:`Stage`,props:{paused:{type:Boolean,default:!1},focusAt:null},setup(e){let t=W(),n=W(),{stageView:r}=ln(Cn()),{mouthOpenSize:i}=ln(Vn()),{audioContext:a,calculateVolume:o}=Rn(),{onBeforeMessageComposed:s,onBeforeSend:c,onTokenLiteral:l,onTokenSpecial:u,onStreamEnd:d,streamingMessage:f,onAssistantResponseEnd:p}=zn(),{process:m}=rr(),h=Bn(),g=W(),_=W(!1),v=W(!1),y=ar({handlers:[e=>new Promise(t=>{let n=a.createBufferSource();n.buffer=e.data.audioBuffer,n.connect(a.destination),n.connect(g.value),_.value=!0,n.start(0),n.onended=()=>{_.value=!1,t()}})]}),b=Hn(),{ssmlEnabled:x,activeSpeechProvider:S,activeSpeechModel:C,activeSpeechVoice:w,pitch:T}=ln(b);async function E(e){try{if(!S.value){console.warn(`No active speech provider configured`);return}if(!w.value){console.warn(`No active speech voice configured`);return}let t=h.getProviderInstance(S.value);if(!t){console.error(`Failed to initialize speech provider`);return}let n=h.getProviderConfig(S.value),r=x.value?b.generateSSML(e.data,w.value,{...n,pitch:T.value}):e.data,i=await Ln({...t.speech(C.value,n),input:r,voice:w.value.id}),o=await a.decodeAudioData(i);await y.add({audioBuffer:o,text:e.data})}catch(e){console.error(`Speech generation failed:`,e)}}let D=ar({handlers:[E]});D.on(`add`,e=>{console.debug(`ttsQueue added`,e)});let O=fr(D),{live2dCurrentMotion:k}=ln(Cn()),A=ar({handlers:[async e=>{if(r.value===`3d`){let t=sr[e.data];if(!t)return;await n.value.setExpression(t)}else r.value===`2d`&&(k.value={group:or[e.data]})}]}),j=dr(A);j.onHandlerEvent(`emotion`,e=>{console.debug(`emotion detected`,e)});let M=ur();M.onHandlerEvent(`delay`,e=>{console.debug(`delay detected`,e)});function N(){requestAnimationFrame(N),_.value&&(i.value=o(g.value,`linear`))}function ee(){v.value||(N(),a.resume(),v.value=!0)}function P(){g.value||=a.createAnalyser()}return s(async()=>{P(),ee()}),c(async()=>{k.value={group:cr}}),l(async e=>{await O.add(e)}),u(async e=>{await M.add(e),await j.add(e)}),d(async()=>{await M.add(lr)}),p(async e=>{}),Zt(()=>{v.value=!1}),Yt(async()=>{t.value=R$({connection:{bundles:In()}}),await t.value.execute(`CREATE TABLE memory_test (vec FLOAT[768]);`)}),(t,a)=>(U(),V(`div`,z$,[B(`div`,B$,[G(r)===`2d`?(U(),kt(yb,{key:0,"focus-at":e.focusAt,"mouth-open-size":G(i),"min-w":`50% value!=null&&Object.getPrototypeOf(value)===Object.prototype,merge=(defaults,user)=>{let merged={...defaults};if(!user)return merged;for(let[key$1,value]of Object.entries(user)){if(value===void 0)continue;if(isPlainObject$2(merged[key$1])&&isPlainObject$2(value)){merged[key$1]=merge(merged[key$1],value);continue}merged[key$1]=value}return merged};var States=function(States$1){return States$1.Literal=`literal`,States$1.Special=`special`,States$1}(States||{});function peek(array,index$1,offset){return index$1+offset<0||index$1+offset>=array.length-1?``:array[index$1+offset]}function useLlmmarkerParser(options){let state=States.Literal,buffer=``;return{async consume(textPart){for(let i=0;i`?(current+=peek(textPart,i,1),newState=States.Literal,i++):current===`<`?newState=States.Special:current===`>`&&(newState=States.Literal),state===States.Literal&&newState===States.Special){if(buffer!==``){var _options$onLiteral;await(_options$onLiteral=options.onLiteral)?.call(options,buffer),buffer=``}}else if(state===States.Special&&newState===States.Literal&&buffer!==``){var _options$onSpecial;buffer+=current,await(_options$onSpecial=options.onSpecial)?.call(options,buffer),buffer=``}if(state===States.Literal&&newState===States.Literal){var _options$onLiteral2;await(_options$onLiteral2=options.onLiteral)?.call(options,current),buffer=``}else state===States.Special&&newState===States.Literal?buffer=``:buffer+=current;state=newState}},async end(){if(buffer!==``){var _options$onLiteral3,_options$onSpecial2;state===States.Literal?await(_options$onLiteral3=options.onLiteral)?.call(options,buffer):buffer.endsWith(`|>`)&&await(_options$onSpecial2=options.onSpecial)?.call(options,buffer)}}}}const htmlVoidElements=[`area`,`base`,`basefont`,`bgsound`,`br`,`col`,`command`,`embed`,`frame`,`hr`,`image`,`img`,`input`,`keygen`,`link`,`meta`,`param`,`source`,`track`,`wbr`];var Schema=class{constructor(property,normal,space$1){this.normal=normal,this.property=property,space$1&&(this.space=space$1)}};Schema.prototype.normal={},Schema.prototype.property={},Schema.prototype.space=void 0;function merge$1(definitions,space$1){let property={},normal={};for(let definition$1 of definitions)Object.assign(property,definition$1.property),Object.assign(normal,definition$1.normal);return new Schema(property,normal,space$1)}function normalize$1(value){return value.toLowerCase()}var Info=class{constructor(property,attribute){this.attribute=attribute,this.property=property}};Info.prototype.attribute=``,Info.prototype.booleanish=!1,Info.prototype.boolean=!1,Info.prototype.commaOrSpaceSeparated=!1,Info.prototype.commaSeparated=!1,Info.prototype.defined=!1,Info.prototype.mustUseProperty=!1,Info.prototype.number=!1,Info.prototype.overloadedBoolean=!1,Info.prototype.property=``,Info.prototype.spaceSeparated=!1,Info.prototype.space=void 0;var types_exports={};__export(types_exports,{boolean:()=>boolean,booleanish:()=>booleanish,commaOrSpaceSeparated:()=>commaOrSpaceSeparated,commaSeparated:()=>commaSeparated,number:()=>number,overloadedBoolean:()=>overloadedBoolean,spaceSeparated:()=>spaceSeparated});let powers=0;const boolean=increment(),booleanish=increment(),overloadedBoolean=increment(),number=increment(),spaceSeparated=increment(),commaSeparated=increment(),commaOrSpaceSeparated=increment();function increment(){return 2**++powers}const checks=Object.keys(types_exports);var DefinedInfo=class extends Info{constructor(property,attribute,mask,space$1){let index$1=-1;if(super(property,attribute),mark(this,`space`,space$1),typeof mask==`number`)for(;++index$14&&normal.slice(0,4)===`data`&&valid.test(value)){if(value.charAt(4)===`-`){let rest=value.slice(5).replace(dash,camelcase);property=`data`+rest.charAt(0).toUpperCase()+rest.slice(1)}else{let rest=value.slice(4);if(!dash.test(rest)){let dashes=rest.replace(cap,kebab);dashes.charAt(0)!==`-`&&(dashes=`-`+dashes),value=`data`+dashes}}Type=DefinedInfo}return new Type(property,value)}function kebab($0){return`-`+$0.toLowerCase()}function camelcase($0){return $0.charAt(1).toUpperCase()}const html$1=merge$1([aria,html$4,xlink,xmlns,xml],`html`),svg=merge$1([aria,svg$1,xlink,xmlns,xml],`svg`),own$5={}.hasOwnProperty;function zwitch(key$1,options){let settings=options||{};function one$2(value,...parameters){let fn=one$2.invalid,handlers$1=one$2.handlers;if(value&&own$5.call(value,key$1)){let id=String(value[key$1]);fn=own$5.call(handlers$1,id)?handlers$1[id]:one$2.unknown}if(fn)return fn.call(this,value,...parameters)}return one$2.handlers=settings.handlers||{},one$2.invalid=settings.invalid,one$2.unknown=settings.unknown,one$2}const defaultSubsetRegex=/["&'<>`]/g,surrogatePairsRegex=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,controlCharactersRegex=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,regexEscapeRegex=/[|\\{}()[\]^$+*?.]/g,subsetToRegexCache=new WeakMap;function core(value,options){if(value=value.replace(options.subset?charactersToExpressionCached(options.subset):defaultSubsetRegex,basic),options.subset||options.escapeOnly)return value;return value.replace(surrogatePairsRegex,surrogate).replace(controlCharactersRegex,basic);function surrogate(pair,index$1,all$2){return options.format((pair.charCodeAt(0)-55296)*1024+pair.charCodeAt(1)-56320+65536,all$2.charCodeAt(index$1+2),options)}function basic(character,index$1,all$2){return options.format(character.charCodeAt(0),all$2.charCodeAt(index$1+1),options)}}function charactersToExpressionCached(subset){let cached=subsetToRegexCache.get(subset);return cached||(cached=charactersToExpression(subset),subsetToRegexCache.set(subset,cached)),cached}function charactersToExpression(subset){let groups=[],index$1=-1;for(;++index$1`,OElig:`Œ`,oelig:`œ`,Scaron:`Š`,scaron:`š`,Yuml:`Ÿ`,circ:`ˆ`,tilde:`˜`,ensp:` `,emsp:` `,thinsp:` `,zwnj:`‌`,zwj:`‍`,lrm:`‎`,rlm:`‏`,ndash:`–`,mdash:`—`,lsquo:`‘`,rsquo:`’`,sbquo:`‚`,ldquo:`“`,rdquo:`”`,bdquo:`„`,dagger:`†`,Dagger:`‡`,permil:`‰`,lsaquo:`‹`,rsaquo:`›`,euro:`€`},dangerous=[`cent`,`copy`,`divide`,`gt`,`lt`,`not`,`para`,`times`],own$4={}.hasOwnProperty,characters={};let key;for(key in characterEntitiesHtml4)own$4.call(characterEntitiesHtml4,key)&&(characters[characterEntitiesHtml4[key]]=key);const notAlphanumericRegex=/[^\dA-Za-z]/;function toNamed(code$1,next,omit,attribute){let character=String.fromCharCode(code$1);if(own$4.call(characters,character)){let name$1=characters[character],value=`&`+name$1;return omit&&characterEntitiesLegacy.includes(name$1)&&!dangerous.includes(name$1)&&(!attribute||next&&next!==61&¬AlphanumericRegex.test(String.fromCharCode(next)))?value:value+`;`}return``}function formatSmart(code$1,next,options){let numeric=toHexadecimal(code$1,next,options.omitOptionalSemicolons),named;if((options.useNamedReferences||options.useShortestReferences)&&(named=toNamed(code$1,next,options.omitOptionalSemicolons,options.attribute)),(options.useShortestReferences||!named)&&options.useShortestReferences){let decimal=toDecimal(code$1,next,options.omitOptionalSemicolons);decimal.length|^->||--!>|`],commentEntitySubset=[`<`,`>`];function comment(node$1,_1,_2,state){return state.settings.bogusComments?``:``;function encode($0){return stringifyEntities($0,Object.assign({},state.settings.characterReferences,{subset:commentEntitySubset}))}}function doctype(_1,_2,_3,state){return``}function ccount(value,character){let source=String(value);if(typeof character!=`string`)throw TypeError(`Expected character`);let count=0,index$1=source.indexOf(character);for(;index$1!==-1;)count++,index$1=source.indexOf(character,index$1+character.length);return count}function stringify(values,options){let settings=options||{},input=values[values.length-1]===``?[...values,``]:values;return input.join((settings.padRight?` `:``)+`,`+(settings.padLeft===!1?``:` `)).trim()}function stringify$1(values){return values.join(` `).trim()}const re=/[ \t\n\f\r]/g;function whitespace(thing){return typeof thing==`object`?thing.type===`text`?empty$1(thing.value):!1:empty$1(thing)}function empty$1(value){return value.replace(re,``)===``}const siblingAfter=siblings(1),siblingBefore=siblings(-1),emptyChildren$1=[];function siblings(increment$1){return sibling;function sibling(parent,index$1,includeWhitespace){let siblings$1=parent?parent.children:emptyChildren$1,offset=(index$1||0)+increment$1,next=siblings$1[offset];if(!includeWhitespace)for(;next&&whitespace(next);)offset+=increment$1,next=siblings$1[offset];return next}}const own$3={}.hasOwnProperty;function omission(handlers$1){return omit;function omit(node$1,index$1,parent){return own$3.call(handlers$1,node$1.tagName)&&handlers$1[node$1.tagName](node$1,index$1,parent)}}const closing=omission({body:body$1,caption:headOrColgroupOrCaption,colgroup:headOrColgroupOrCaption,dd,dt,head:headOrColgroupOrCaption,html:html$3,li,optgroup,option,p,rp:rubyElement,rt:rubyElement,tbody:tbody$1,td:cells,tfoot,th:cells,thead,tr});function headOrColgroupOrCaption(_,index$1,parent){let next=siblingAfter(parent,index$1,!0);return!next||next.type!==`comment`&&!(next.type===`text`&&whitespace(next.value.charAt(0)))}function html$3(_,index$1,parent){let next=siblingAfter(parent,index$1);return!next||next.type!==`comment`}function body$1(_,index$1,parent){let next=siblingAfter(parent,index$1);return!next||next.type!==`comment`}function p(_,index$1,parent){let next=siblingAfter(parent,index$1);return next?next.type===`element`&&(next.tagName===`address`||next.tagName===`article`||next.tagName===`aside`||next.tagName===`blockquote`||next.tagName===`details`||next.tagName===`div`||next.tagName===`dl`||next.tagName===`fieldset`||next.tagName===`figcaption`||next.tagName===`figure`||next.tagName===`footer`||next.tagName===`form`||next.tagName===`h1`||next.tagName===`h2`||next.tagName===`h3`||next.tagName===`h4`||next.tagName===`h5`||next.tagName===`h6`||next.tagName===`header`||next.tagName===`hgroup`||next.tagName===`hr`||next.tagName===`main`||next.tagName===`menu`||next.tagName===`nav`||next.tagName===`ol`||next.tagName===`p`||next.tagName===`pre`||next.tagName===`section`||next.tagName===`table`||next.tagName===`ul`):!parent||!(parent.type===`element`&&(parent.tagName===`a`||parent.tagName===`audio`||parent.tagName===`del`||parent.tagName===`ins`||parent.tagName===`map`||parent.tagName===`noscript`||parent.tagName===`video`))}function li(_,index$1,parent){let next=siblingAfter(parent,index$1);return!next||next.type===`element`&&next.tagName===`li`}function dt(_,index$1,parent){let next=siblingAfter(parent,index$1);return!!(next&&next.type===`element`&&(next.tagName===`dt`||next.tagName===`dd`))}function dd(_,index$1,parent){let next=siblingAfter(parent,index$1);return!next||next.type===`element`&&(next.tagName===`dt`||next.tagName===`dd`)}function rubyElement(_,index$1,parent){let next=siblingAfter(parent,index$1);return!next||next.type===`element`&&(next.tagName===`rp`||next.tagName===`rt`)}function optgroup(_,index$1,parent){let next=siblingAfter(parent,index$1);return!next||next.type===`element`&&next.tagName===`optgroup`}function option(_,index$1,parent){let next=siblingAfter(parent,index$1);return!next||next.type===`element`&&(next.tagName===`option`||next.tagName===`optgroup`)}function thead(_,index$1,parent){let next=siblingAfter(parent,index$1);return!!(next&&next.type===`element`&&(next.tagName===`tbody`||next.tagName===`tfoot`))}function tbody$1(_,index$1,parent){let next=siblingAfter(parent,index$1);return!next||next.type===`element`&&(next.tagName===`tbody`||next.tagName===`tfoot`)}function tfoot(_,index$1,parent){return!siblingAfter(parent,index$1)}function tr(_,index$1,parent){let next=siblingAfter(parent,index$1);return!next||next.type===`element`&&next.tagName===`tr`}function cells(_,index$1,parent){let next=siblingAfter(parent,index$1);return!next||next.type===`element`&&(next.tagName===`td`||next.tagName===`th`)}const opening=omission({body,colgroup,head,html:html$2,tbody});function html$2(node$1){let head$1=siblingAfter(node$1,-1);return!head$1||head$1.type!==`comment`}function head(node$1){let seen=new Set;for(let child$1 of node$1.children)if(child$1.type===`element`&&(child$1.tagName===`base`||child$1.tagName===`title`)){if(seen.has(child$1.tagName))return!1;seen.add(child$1.tagName)}let child=node$1.children[0];return!child||child.type===`element`}function body(node$1){let head$1=siblingAfter(node$1,-1,!0);return!head$1||head$1.type!==`comment`&&!(head$1.type===`text`&&whitespace(head$1.value.charAt(0)))&&!(head$1.type===`element`&&(head$1.tagName===`meta`||head$1.tagName===`link`||head$1.tagName===`script`||head$1.tagName===`style`||head$1.tagName===`template`))}function colgroup(node$1,index$1,parent){let previous$1=siblingBefore(parent,index$1),head$1=siblingAfter(node$1,-1,!0);return parent&&previous$1&&previous$1.type===`element`&&previous$1.tagName===`colgroup`&&closing(previous$1,parent.children.indexOf(previous$1),parent)?!1:!!(head$1&&head$1.type===`element`&&head$1.tagName===`col`)}function tbody(node$1,index$1,parent){let previous$1=siblingBefore(parent,index$1),head$1=siblingAfter(node$1,-1);return parent&&previous$1&&previous$1.type===`element`&&(previous$1.tagName===`thead`||previous$1.tagName===`tbody`)&&closing(previous$1,parent.children.indexOf(previous$1),parent)?!1:!!(head$1&&head$1.type===`element`&&head$1.tagName===`tr`)}const constants={name:[[` +import{AnimationClip,AxesHelper,BackSide,Bone,Box3,BufferAttribute,BufferGeometry,ClampToEdgeWrapping,Color,ColorManagement,DirectionalLight,DoubleSide,DynamicDrawUsage,Euler,FileLoader,FrontSide,GLBufferAttribute,Group,ImageBitmapLoader,ImageLoader,InstancedBufferAttribute,InstancedMesh,InterleavedBuffer,InterleavedBufferAttribute,Interpolant,InterpolateDiscrete,InterpolateLinear,Line,LineBasicMaterial,LineLoop,LineSegments,LinearFilter,LinearMipmapLinearFilter,LinearMipmapNearestFilter,LinearSRGBColorSpace,Loader,LoaderUtils,Material,MathUtils,Matrix3,Matrix4,Mesh,MeshBasicMaterial,MeshPhysicalMaterial,MeshStandardMaterial,MirroredRepeatWrapping,NearestFilter,NearestMipmapLinearFilter,NearestMipmapNearestFilter,NumberKeyframeTrack,Object3D,OrthographicCamera,PerspectiveCamera,PointLight,Points,PointsMaterial,PropertyBinding,Quaternion,QuaternionKeyframeTrack,REVISION,RepeatWrapping,SRGBColorSpace,ShaderMaterial,Skeleton,SkinnedMesh,Sphere,SpotLight,TangentSpaceNormalMap,Texture,TextureLoader,TriangleFanDrawMode,TriangleStripDrawMode,TrianglesDrawMode,UniformsLib,UniformsUtils,Vector2,Vector3,VectorKeyframeTrack,__commonJSMin,__esmMin,__export,__toCommonJS,__toESM,onUnmounted,ref,toRef,tryOnMounted,unref,usePermission,useWebWorker,watch}from"./index-CsmT0L1K.js";const DEG2RAD=Math.PI/180,RAD2DEG$1=180/Math.PI;function lerp(x,y,t){return(1-t)*x+t*y}function randFloat(low,high){return low+Math.random()*(high-low)}const EYE_SACCADE_INT_STEP=400,EYE_SACCADE_INT_P=[[.075,800],[.11,0],[.125,0],[.14,0],[.125,0],[.05,0],[.04,0],[.03,0],[.02,0],[1,0]];for(let i=1;ivalue!=null&&Object.getPrototypeOf(value)===Object.prototype,merge=(defaults,user)=>{let merged={...defaults};if(!user)return merged;for(let[key$1,value]of Object.entries(user)){if(value===void 0)continue;if(isPlainObject$2(merged[key$1])&&isPlainObject$2(value)){merged[key$1]=merge(merged[key$1],value);continue}merged[key$1]=value}return merged};var States=function(States$1){return States$1.Literal=`literal`,States$1.Special=`special`,States$1}(States||{});function peek(array,index$1,offset){return index$1+offset<0||index$1+offset>=array.length-1?``:array[index$1+offset]}function useLlmmarkerParser(options){let state=States.Literal,buffer=``;return{async consume(textPart){for(let i=0;i`?(current+=peek(textPart,i,1),newState=States.Literal,i++):current===`<`?newState=States.Special:current===`>`&&(newState=States.Literal),state===States.Literal&&newState===States.Special){if(buffer!==``){var _options$onLiteral;await(_options$onLiteral=options.onLiteral)?.call(options,buffer),buffer=``}}else if(state===States.Special&&newState===States.Literal&&buffer!==``){var _options$onSpecial;buffer+=current,await(_options$onSpecial=options.onSpecial)?.call(options,buffer),buffer=``}if(state===States.Literal&&newState===States.Literal){var _options$onLiteral2;await(_options$onLiteral2=options.onLiteral)?.call(options,current),buffer=``}else state===States.Special&&newState===States.Literal?buffer=``:buffer+=current;state=newState}},async end(){if(buffer!==``){var _options$onLiteral3,_options$onSpecial2;state===States.Literal?await(_options$onLiteral3=options.onLiteral)?.call(options,buffer):buffer.endsWith(`|>`)&&await(_options$onSpecial2=options.onSpecial)?.call(options,buffer)}}}}const htmlVoidElements=[`area`,`base`,`basefont`,`bgsound`,`br`,`col`,`command`,`embed`,`frame`,`hr`,`image`,`img`,`input`,`keygen`,`link`,`meta`,`param`,`source`,`track`,`wbr`];var Schema=class{constructor(property,normal,space$1){this.normal=normal,this.property=property,space$1&&(this.space=space$1)}};Schema.prototype.normal={},Schema.prototype.property={},Schema.prototype.space=void 0;function merge$1(definitions,space$1){let property={},normal={};for(let definition$1 of definitions)Object.assign(property,definition$1.property),Object.assign(normal,definition$1.normal);return new Schema(property,normal,space$1)}function normalize$1(value){return value.toLowerCase()}var Info=class{constructor(property,attribute){this.attribute=attribute,this.property=property}};Info.prototype.attribute=``,Info.prototype.booleanish=!1,Info.prototype.boolean=!1,Info.prototype.commaOrSpaceSeparated=!1,Info.prototype.commaSeparated=!1,Info.prototype.defined=!1,Info.prototype.mustUseProperty=!1,Info.prototype.number=!1,Info.prototype.overloadedBoolean=!1,Info.prototype.property=``,Info.prototype.spaceSeparated=!1,Info.prototype.space=void 0;var types_exports={};__export(types_exports,{boolean:()=>boolean,booleanish:()=>booleanish,commaOrSpaceSeparated:()=>commaOrSpaceSeparated,commaSeparated:()=>commaSeparated,number:()=>number,overloadedBoolean:()=>overloadedBoolean,spaceSeparated:()=>spaceSeparated});let powers=0;const boolean=increment(),booleanish=increment(),overloadedBoolean=increment(),number=increment(),spaceSeparated=increment(),commaSeparated=increment(),commaOrSpaceSeparated=increment();function increment(){return 2**++powers}const checks=Object.keys(types_exports);var DefinedInfo=class extends Info{constructor(property,attribute,mask,space$1){let index$1=-1;if(super(property,attribute),mark(this,`space`,space$1),typeof mask==`number`)for(;++index$14&&normal.slice(0,4)===`data`&&valid.test(value)){if(value.charAt(4)===`-`){let rest=value.slice(5).replace(dash,camelcase);property=`data`+rest.charAt(0).toUpperCase()+rest.slice(1)}else{let rest=value.slice(4);if(!dash.test(rest)){let dashes=rest.replace(cap,kebab);dashes.charAt(0)!==`-`&&(dashes=`-`+dashes),value=`data`+dashes}}Type=DefinedInfo}return new Type(property,value)}function kebab($0){return`-`+$0.toLowerCase()}function camelcase($0){return $0.charAt(1).toUpperCase()}const html$1=merge$1([aria,html$4,xlink,xmlns,xml],`html`),svg=merge$1([aria,svg$1,xlink,xmlns,xml],`svg`),own$5={}.hasOwnProperty;function zwitch(key$1,options){let settings=options||{};function one$2(value,...parameters){let fn=one$2.invalid,handlers$1=one$2.handlers;if(value&&own$5.call(value,key$1)){let id=String(value[key$1]);fn=own$5.call(handlers$1,id)?handlers$1[id]:one$2.unknown}if(fn)return fn.call(this,value,...parameters)}return one$2.handlers=settings.handlers||{},one$2.invalid=settings.invalid,one$2.unknown=settings.unknown,one$2}const defaultSubsetRegex=/["&'<>`]/g,surrogatePairsRegex=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,controlCharactersRegex=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,regexEscapeRegex=/[|\\{}()[\]^$+*?.]/g,subsetToRegexCache=new WeakMap;function core(value,options){if(value=value.replace(options.subset?charactersToExpressionCached(options.subset):defaultSubsetRegex,basic),options.subset||options.escapeOnly)return value;return value.replace(surrogatePairsRegex,surrogate).replace(controlCharactersRegex,basic);function surrogate(pair,index$1,all$2){return options.format((pair.charCodeAt(0)-55296)*1024+pair.charCodeAt(1)-56320+65536,all$2.charCodeAt(index$1+2),options)}function basic(character,index$1,all$2){return options.format(character.charCodeAt(0),all$2.charCodeAt(index$1+1),options)}}function charactersToExpressionCached(subset){let cached=subsetToRegexCache.get(subset);return cached||(cached=charactersToExpression(subset),subsetToRegexCache.set(subset,cached)),cached}function charactersToExpression(subset){let groups=[],index$1=-1;for(;++index$1`,OElig:`Œ`,oelig:`œ`,Scaron:`Š`,scaron:`š`,Yuml:`Ÿ`,circ:`ˆ`,tilde:`˜`,ensp:` `,emsp:` `,thinsp:` `,zwnj:`‌`,zwj:`‍`,lrm:`‎`,rlm:`‏`,ndash:`–`,mdash:`—`,lsquo:`‘`,rsquo:`’`,sbquo:`‚`,ldquo:`“`,rdquo:`”`,bdquo:`„`,dagger:`†`,Dagger:`‡`,permil:`‰`,lsaquo:`‹`,rsaquo:`›`,euro:`€`},dangerous=[`cent`,`copy`,`divide`,`gt`,`lt`,`not`,`para`,`times`],own$4={}.hasOwnProperty,characters={};let key;for(key in characterEntitiesHtml4)own$4.call(characterEntitiesHtml4,key)&&(characters[characterEntitiesHtml4[key]]=key);const notAlphanumericRegex=/[^\dA-Za-z]/;function toNamed(code$1,next,omit,attribute){let character=String.fromCharCode(code$1);if(own$4.call(characters,character)){let name$1=characters[character],value=`&`+name$1;return omit&&characterEntitiesLegacy.includes(name$1)&&!dangerous.includes(name$1)&&(!attribute||next&&next!==61&¬AlphanumericRegex.test(String.fromCharCode(next)))?value:value+`;`}return``}function formatSmart(code$1,next,options){let numeric=toHexadecimal(code$1,next,options.omitOptionalSemicolons),named;if((options.useNamedReferences||options.useShortestReferences)&&(named=toNamed(code$1,next,options.omitOptionalSemicolons,options.attribute)),(options.useShortestReferences||!named)&&options.useShortestReferences){let decimal=toDecimal(code$1,next,options.omitOptionalSemicolons);decimal.length|^->||--!>|`],commentEntitySubset=[`<`,`>`];function comment(node$1,_1,_2,state){return state.settings.bogusComments?``:``;function encode($0){return stringifyEntities($0,Object.assign({},state.settings.characterReferences,{subset:commentEntitySubset}))}}function doctype(_1,_2,_3,state){return``}function ccount(value,character){let source=String(value);if(typeof character!=`string`)throw TypeError(`Expected character`);let count=0,index$1=source.indexOf(character);for(;index$1!==-1;)count++,index$1=source.indexOf(character,index$1+character.length);return count}function stringify(values,options){let settings=options||{},input=values[values.length-1]===``?[...values,``]:values;return input.join((settings.padRight?` `:``)+`,`+(settings.padLeft===!1?``:` `)).trim()}function stringify$1(values){return values.join(` `).trim()}const re=/[ \t\n\f\r]/g;function whitespace(thing){return typeof thing==`object`?thing.type===`text`?empty$1(thing.value):!1:empty$1(thing)}function empty$1(value){return value.replace(re,``)===``}const siblingAfter=siblings(1),siblingBefore=siblings(-1),emptyChildren$1=[];function siblings(increment$1){return sibling;function sibling(parent,index$1,includeWhitespace){let siblings$1=parent?parent.children:emptyChildren$1,offset=(index$1||0)+increment$1,next=siblings$1[offset];if(!includeWhitespace)for(;next&&whitespace(next);)offset+=increment$1,next=siblings$1[offset];return next}}const own$3={}.hasOwnProperty;function omission(handlers$1){return omit;function omit(node$1,index$1,parent){return own$3.call(handlers$1,node$1.tagName)&&handlers$1[node$1.tagName](node$1,index$1,parent)}}const closing=omission({body:body$1,caption:headOrColgroupOrCaption,colgroup:headOrColgroupOrCaption,dd,dt,head:headOrColgroupOrCaption,html:html$3,li,optgroup,option,p,rp:rubyElement,rt:rubyElement,tbody:tbody$1,td:cells,tfoot,th:cells,thead,tr});function headOrColgroupOrCaption(_,index$1,parent){let next=siblingAfter(parent,index$1,!0);return!next||next.type!==`comment`&&!(next.type===`text`&&whitespace(next.value.charAt(0)))}function html$3(_,index$1,parent){let next=siblingAfter(parent,index$1);return!next||next.type!==`comment`}function body$1(_,index$1,parent){let next=siblingAfter(parent,index$1);return!next||next.type!==`comment`}function p(_,index$1,parent){let next=siblingAfter(parent,index$1);return next?next.type===`element`&&(next.tagName===`address`||next.tagName===`article`||next.tagName===`aside`||next.tagName===`blockquote`||next.tagName===`details`||next.tagName===`div`||next.tagName===`dl`||next.tagName===`fieldset`||next.tagName===`figcaption`||next.tagName===`figure`||next.tagName===`footer`||next.tagName===`form`||next.tagName===`h1`||next.tagName===`h2`||next.tagName===`h3`||next.tagName===`h4`||next.tagName===`h5`||next.tagName===`h6`||next.tagName===`header`||next.tagName===`hgroup`||next.tagName===`hr`||next.tagName===`main`||next.tagName===`menu`||next.tagName===`nav`||next.tagName===`ol`||next.tagName===`p`||next.tagName===`pre`||next.tagName===`section`||next.tagName===`table`||next.tagName===`ul`):!parent||!(parent.type===`element`&&(parent.tagName===`a`||parent.tagName===`audio`||parent.tagName===`del`||parent.tagName===`ins`||parent.tagName===`map`||parent.tagName===`noscript`||parent.tagName===`video`))}function li(_,index$1,parent){let next=siblingAfter(parent,index$1);return!next||next.type===`element`&&next.tagName===`li`}function dt(_,index$1,parent){let next=siblingAfter(parent,index$1);return!!(next&&next.type===`element`&&(next.tagName===`dt`||next.tagName===`dd`))}function dd(_,index$1,parent){let next=siblingAfter(parent,index$1);return!next||next.type===`element`&&(next.tagName===`dt`||next.tagName===`dd`)}function rubyElement(_,index$1,parent){let next=siblingAfter(parent,index$1);return!next||next.type===`element`&&(next.tagName===`rp`||next.tagName===`rt`)}function optgroup(_,index$1,parent){let next=siblingAfter(parent,index$1);return!next||next.type===`element`&&next.tagName===`optgroup`}function option(_,index$1,parent){let next=siblingAfter(parent,index$1);return!next||next.type===`element`&&(next.tagName===`option`||next.tagName===`optgroup`)}function thead(_,index$1,parent){let next=siblingAfter(parent,index$1);return!!(next&&next.type===`element`&&(next.tagName===`tbody`||next.tagName===`tfoot`))}function tbody$1(_,index$1,parent){let next=siblingAfter(parent,index$1);return!next||next.type===`element`&&(next.tagName===`tbody`||next.tagName===`tfoot`)}function tfoot(_,index$1,parent){return!siblingAfter(parent,index$1)}function tr(_,index$1,parent){let next=siblingAfter(parent,index$1);return!next||next.type===`element`&&next.tagName===`tr`}function cells(_,index$1,parent){let next=siblingAfter(parent,index$1);return!next||next.type===`element`&&(next.tagName===`td`||next.tagName===`th`)}const opening=omission({body,colgroup,head,html:html$2,tbody});function html$2(node$1){let head$1=siblingAfter(node$1,-1);return!head$1||head$1.type!==`comment`}function head(node$1){let seen=new Set;for(let child$1 of node$1.children)if(child$1.type===`element`&&(child$1.tagName===`base`||child$1.tagName===`title`)){if(seen.has(child$1.tagName))return!1;seen.add(child$1.tagName)}let child=node$1.children[0];return!child||child.type===`element`}function body(node$1){let head$1=siblingAfter(node$1,-1,!0);return!head$1||head$1.type!==`comment`&&!(head$1.type===`text`&&whitespace(head$1.value.charAt(0)))&&!(head$1.type===`element`&&(head$1.tagName===`meta`||head$1.tagName===`link`||head$1.tagName===`script`||head$1.tagName===`style`||head$1.tagName===`template`))}function colgroup(node$1,index$1,parent){let previous$1=siblingBefore(parent,index$1),head$1=siblingAfter(node$1,-1,!0);return parent&&previous$1&&previous$1.type===`element`&&previous$1.tagName===`colgroup`&&closing(previous$1,parent.children.indexOf(previous$1),parent)?!1:!!(head$1&&head$1.type===`element`&&head$1.tagName===`col`)}function tbody(node$1,index$1,parent){let previous$1=siblingBefore(parent,index$1),head$1=siblingAfter(node$1,-1);return parent&&previous$1&&previous$1.type===`element`&&(previous$1.tagName===`thead`||previous$1.tagName===`tbody`)&&closing(previous$1,parent.children.indexOf(previous$1),parent)?!1:!!(head$1&&head$1.type===`element`&&head$1.tagName===`tr`)}const constants={name:[[` \f\r &/=>`.split(``),` \f\r "&'/=>\``.split(``)],[`\0 \f\r "&'/<=>`.split(``),`\0 diff --git a/assets/consciousness-0dybmXhk.js b/assets/consciousness-CXh-iRGo.js similarity index 94% rename from assets/consciousness-0dybmXhk.js rename to assets/consciousness-CXh-iRGo.js index b3b8da48585a967c2f3ee85609870b44ddf1e70b..799ccb4899812f00a0f055c94bc99d435f5c2b19 100644 --- a/assets/consciousness-0dybmXhk.js +++ b/assets/consciousness-CXh-iRGo.js @@ -1 +1 @@ -import{Fragment as e,RouterLink as t,createBaseVNode as n,createBlock as r,createCommentVNode as i,createElementBlock as a,createVNode as ee,defineComponent as o,isRef as s,onMounted as c,openBlock as l,renderList as te,resolveDirective as ne,storeToRefs as u,toDisplayString as d,unref as f,useI18n as re,vModelText as ie,withCtx as ae,withDirectives as p}from"./index-CuCRViVh.js";import"./import-url-browser-DNuYZxPr.js";import"./duckdb-mvp-C3i5IjU8.js";import"./index-CISmcbXk-BkTeNOgG.js";import"./types-AwjH7X1C.js";import{useConsciousnessStore as oe,useProvidersStore as se}from"./stores-m0eA85gd.js";import"./__vite-browser-external-CCfYMxZl.js";import"./Button-DFhzbYVt.js";import"./src-C2QbIOor.js";import{RadioCardManySelect_default as ce,RadioCardSimple_default as le}from"./components-BFLl4u81.js";import"./composables-Cgvkd8lL.js";import"./sleep-CvjNLutj.js";import"./queue-DAKPJQl1.js";import"./queues-Dstwm1VQ.js";import"./dist-Cr2QBfS4.js";import"./webgpu-Nt9hTBpW.js";import{route_block_default as m}from"./route-block-DNPbw0zT.js";const h={bg:`neutral-50 dark:[rgba(0,0,0,0.3)]`,"rounded-xl":``,"p-4":``,flex:`~ col gap-4`},g={flex:`~ col gap-4`},_={class:`text-lg text-neutral-500 md:text-2xl dark:text-neutral-500`},v={text:`neutral-400 dark:neutral-400`},y={"max-w-full":``},b={key:0,flex:`~ row gap-4`,style:{"scrollbar-width":`none`},"min-w-0":``,"of-x-scroll":``,"scroll-smooth":``,role:`radiogroup`},x={key:1},S={key:0},C={flex:`~ col gap-4`},w={class:`text-lg md:text-2xl`},T={text:`neutral-400 dark:neutral-400`},E={key:0,class:`flex items-center justify-center py-4`},D={key:1,class:`flex items-center gap-3 border border-red-200 rounded-lg bg-red-50 p-4 dark:border-red-800 dark:bg-red-900/20`},O={class:`flex flex-col`},k={class:`font-medium`},A={class:`text-sm text-red-600 dark:text-red-400`},j={key:2,class:`flex items-center gap-3 border border-amber-200 rounded-lg bg-amber-50 p-4 dark:border-amber-800 dark:bg-amber-900/20`},M={class:`flex flex-col`},N={class:`font-medium`},P={class:`text-sm text-amber-600 dark:text-amber-400`},ue={key:1},F={flex:`~ col gap-4`},I={class:`text-lg text-neutral-500 md:text-2xl dark:text-neutral-400`},L={text:`neutral-400 dark:neutral-500`},R={class:`flex items-center gap-3 border border-primary-200 rounded-lg bg-primary-50 p-4 dark:border-primary-800 dark:bg-primary-900/20`},z={class:`flex flex-col`},B={class:`font-medium`},V={class:`text-sm text-primary-600 dark:text-primary-400`},H={class:`mt-2`},U={class:`mb-1 block text-sm font-medium`},de=[`placeholder`],fe={text:`neutral-200/50 dark:neutral-600/20`,"pointer-events-none":``,fixed:``,top:`[calc(100dvh-15rem)]`,"bottom-0":``,"right--5":``,"z--1":``,initial:{scale:.9,opacity:0,x:20},enter:{scale:1,opacity:1,x:0},duration:500,"size-60":``,flex:``,"items-center":``,"justify-center":``};var W=o({__name:`consciousness`,setup(o){let m=se(),W=oe(),{configuredChatProvidersMetadata:G}=u(m),{activeProvider:K,activeModel:q,customModelName:pe,modelSearchQuery:J,supportsModelListing:Y,providerModels:X,isLoadingActiveProviderModels:Z,activeProviderModelError:Q}=u(W),{t:$}=re();c(async()=>{await W.loadModelsForProvider(K.value)});function me(e){pe.value=e}return(o,c)=>{let u=ne(`motion`);return l(),a(e,null,[n(`div`,h,[n(`div`,null,[n(`div`,g,[n(`div`,null,[n(`h2`,_,d(f($)(`settings.pages.providers.title`)),1),n(`div`,v,[n(`span`,null,d(f($)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.description`)),1)])]),n(`div`,y,[f(G).length>0?(l(),a(`fieldset`,b,[(l(!0),a(e,null,te(f(G),e=>(l(),r(f(le),{id:e.id,key:e.id,modelValue:f(K),"onUpdate:modelValue":c[0]||=e=>s(K)?K.value=e:null,name:`provider`,value:e.id,title:e.localizedName||`Unknown`,description:e.localizedDescription},null,8,[`id`,`modelValue`,`value`,`title`,`description`]))),128))])):(l(),a(`div`,x,[ee(f(t),{class:`flex items-center gap-3 rounded-lg p-4`,border:`2 dashed neutral-200 dark:neutral-800`,bg:`neutral-50 dark:neutral-800`,transition:`colors duration-200 ease-in-out`,to:`/settings/providers`},{default:ae(()=>c[4]||=[n(`div`,{"i-solar:warning-circle-line-duotone":``,class:`text-2xl text-amber-500 dark:text-amber-400`},null,-1),n(`div`,{class:`flex flex-col`},[n(`span`,{class:`font-medium`},`No Providers Configured`),n(`span`,{class:`text-sm text-neutral-400 dark:text-neutral-500`},`Click here to set up your LLM providers`)],-1),n(`div`,{"i-solar:arrow-right-line-duotone":``,class:`ml-auto text-xl text-neutral-400 dark:text-neutral-500`},null,-1)]),_:1,__:[4]})]))])])]),f(K)&&f(Y)?(l(),a(`div`,S,[n(`div`,C,[n(`div`,null,[n(`h2`,w,d(f($)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.title`)),1),n(`div`,T,[n(`span`,null,d(f($)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.subtitle`)),1)])]),f(Z)?(l(),a(`div`,E,[c[5]||=n(`div`,{class:`mr-2 animate-spin`},[n(`div`,{"i-solar:spinner-line-duotone":``,"text-xl":``})],-1),n(`span`,null,d(f($)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.loading`)),1)])):f(Q)?(l(),a(`div`,D,[c[6]||=n(`div`,{"i-solar:close-circle-line-duotone":``,class:`text-2xl text-red-500 dark:text-red-400`},null,-1),n(`div`,O,[n(`span`,k,d(f($)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.error`)),1),n(`span`,A,d(f(Q)),1)])])):f(X).length===0&&!f(Z)?(l(),a(`div`,j,[c[7]||=n(`div`,{"i-solar:info-circle-line-duotone":``,class:`text-2xl text-amber-500 dark:text-amber-400`},null,-1),n(`div`,M,[n(`span`,N,d(f($)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.no_models`)),1),n(`span`,P,d(f($)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.no_models_description`)),1)])])):f(X).length>0?(l(),r(f(ce),{key:3,modelValue:f(q),"onUpdate:modelValue":c[1]||=e=>s(q)?q.value=e:null,"search-query":f(J),"onUpdate:searchQuery":c[2]||=e=>s(J)?J.value=e:null,items:f(X).sort((e,t)=>e.id===f(q)?-1:t.id===f(q)?1:0),searchable:!0,"search-placeholder":f($)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.search_placeholder`),"search-no-results-title":f($)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.no_search_results`),"search-no-results-description":f($)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.no_search_results_description`,{query:f(J)}),"search-results-text":f($)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.search_results`,{count:`{count}`,total:`{total}`}),"custom-input-placeholder":f($)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.custom_model_placeholder`),"expand-button-text":f($)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.expand`),"collapse-button-text":f($)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.collapse`),"onUpdate:customValue":me},null,8,[`modelValue`,`search-query`,`items`,`search-placeholder`,`search-no-results-title`,`search-no-results-description`,`search-results-text`,`custom-input-placeholder`,`expand-button-text`,`collapse-button-text`])):i(``,!0)])])):f(K)&&!f(Y)?(l(),a(`div`,ue,[n(`div`,F,[n(`div`,null,[n(`h2`,I,d(f($)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.title`)),1),n(`div`,L,[n(`span`,null,d(f($)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.subtitle`)),1)])]),n(`div`,R,[c[8]||=n(`div`,{"i-solar:info-circle-line-duotone":``,class:`text-2xl text-primary-500 dark:text-primary-400`},null,-1),n(`div`,z,[n(`span`,B,d(f($)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.not_supported`)),1),n(`span`,V,d(f($)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.not_supported_description`)),1)])]),n(`div`,H,[n(`label`,U,d(f($)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.manual_model_name`)),1),p(n(`input`,{"onUpdate:modelValue":c[3]||=e=>s(q)?q.value=e:null,type:`text`,class:`w-full border border-neutral-300 rounded bg-white px-3 py-2 dark:border-neutral-700 dark:bg-neutral-900`,placeholder:f($)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.manual_model_placeholder`)},null,8,de),[[ie,f(q)]])])])])):i(``,!0)]),p((l(),a(`div`,fe,c[9]||=[n(`div`,{text:`60`,"i-solar:ghost-bold-duotone":``},null,-1)])),[[u]])],64)}}});typeof m==`function`&&m(W);var G=W;export{G as default}; \ No newline at end of file +import{Fragment as e,RouterLink as t,createBaseVNode as n,createBlock as r,createCommentVNode as i,createElementBlock as a,createVNode as ee,defineComponent as o,isRef as s,onMounted as c,openBlock as l,renderList as te,resolveDirective as ne,storeToRefs as u,toDisplayString as d,unref as f,useI18n as re,vModelText as ie,withCtx as ae,withDirectives as p}from"./index-CsmT0L1K.js";import"./import-url-browser-DNuYZxPr.js";import"./duckdb-mvp-C3i5IjU8.js";import"./index-CISmcbXk-C9oju49Y.js";import"./types-AwjH7X1C.js";import{useConsciousnessStore as oe,useProvidersStore as se}from"./stores-2H61GqXP.js";import"./__vite-browser-external-DPh5tFvT.js";import"./Button-D3cjyOEe.js";import"./src-C1Sr0aqN.js";import{RadioCardManySelect_default as ce,RadioCardSimple_default as le}from"./components-DHUA669a.js";import"./composables-CgcEyUWo.js";import"./sleep-CvjNLutj.js";import"./queue-B0kER5Ap.js";import"./queues-hSEKEE3F.js";import"./dist-Cr2QBfS4.js";import"./webgpu-Nt9hTBpW.js";import{route_block_default as m}from"./route-block-DNPbw0zT.js";const h={bg:`neutral-50 dark:[rgba(0,0,0,0.3)]`,"rounded-xl":``,"p-4":``,flex:`~ col gap-4`},g={flex:`~ col gap-4`},_={class:`text-lg text-neutral-500 md:text-2xl dark:text-neutral-500`},v={text:`neutral-400 dark:neutral-400`},y={"max-w-full":``},b={key:0,flex:`~ row gap-4`,style:{"scrollbar-width":`none`},"min-w-0":``,"of-x-scroll":``,"scroll-smooth":``,role:`radiogroup`},x={key:1},S={key:0},C={flex:`~ col gap-4`},w={class:`text-lg md:text-2xl`},T={text:`neutral-400 dark:neutral-400`},E={key:0,class:`flex items-center justify-center py-4`},D={key:1,class:`flex items-center gap-3 border border-red-200 rounded-lg bg-red-50 p-4 dark:border-red-800 dark:bg-red-900/20`},O={class:`flex flex-col`},k={class:`font-medium`},A={class:`text-sm text-red-600 dark:text-red-400`},j={key:2,class:`flex items-center gap-3 border border-amber-200 rounded-lg bg-amber-50 p-4 dark:border-amber-800 dark:bg-amber-900/20`},M={class:`flex flex-col`},N={class:`font-medium`},P={class:`text-sm text-amber-600 dark:text-amber-400`},ue={key:1},F={flex:`~ col gap-4`},I={class:`text-lg text-neutral-500 md:text-2xl dark:text-neutral-400`},L={text:`neutral-400 dark:neutral-500`},R={class:`flex items-center gap-3 border border-primary-200 rounded-lg bg-primary-50 p-4 dark:border-primary-800 dark:bg-primary-900/20`},z={class:`flex flex-col`},B={class:`font-medium`},V={class:`text-sm text-primary-600 dark:text-primary-400`},H={class:`mt-2`},U={class:`mb-1 block text-sm font-medium`},de=[`placeholder`],fe={text:`neutral-200/50 dark:neutral-600/20`,"pointer-events-none":``,fixed:``,top:`[calc(100dvh-15rem)]`,"bottom-0":``,"right--5":``,"z--1":``,initial:{scale:.9,opacity:0,x:20},enter:{scale:1,opacity:1,x:0},duration:500,"size-60":``,flex:``,"items-center":``,"justify-center":``};var W=o({__name:`consciousness`,setup(o){let m=se(),W=oe(),{configuredChatProvidersMetadata:G}=u(m),{activeProvider:K,activeModel:q,customModelName:pe,modelSearchQuery:J,supportsModelListing:Y,providerModels:X,isLoadingActiveProviderModels:Z,activeProviderModelError:Q}=u(W),{t:$}=re();c(async()=>{await W.loadModelsForProvider(K.value)});function me(e){pe.value=e}return(o,c)=>{let u=ne(`motion`);return l(),a(e,null,[n(`div`,h,[n(`div`,null,[n(`div`,g,[n(`div`,null,[n(`h2`,_,d(f($)(`settings.pages.providers.title`)),1),n(`div`,v,[n(`span`,null,d(f($)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.description`)),1)])]),n(`div`,y,[f(G).length>0?(l(),a(`fieldset`,b,[(l(!0),a(e,null,te(f(G),e=>(l(),r(f(le),{id:e.id,key:e.id,modelValue:f(K),"onUpdate:modelValue":c[0]||=e=>s(K)?K.value=e:null,name:`provider`,value:e.id,title:e.localizedName||`Unknown`,description:e.localizedDescription},null,8,[`id`,`modelValue`,`value`,`title`,`description`]))),128))])):(l(),a(`div`,x,[ee(f(t),{class:`flex items-center gap-3 rounded-lg p-4`,border:`2 dashed neutral-200 dark:neutral-800`,bg:`neutral-50 dark:neutral-800`,transition:`colors duration-200 ease-in-out`,to:`/settings/providers`},{default:ae(()=>c[4]||=[n(`div`,{"i-solar:warning-circle-line-duotone":``,class:`text-2xl text-amber-500 dark:text-amber-400`},null,-1),n(`div`,{class:`flex flex-col`},[n(`span`,{class:`font-medium`},`No Providers Configured`),n(`span`,{class:`text-sm text-neutral-400 dark:text-neutral-500`},`Click here to set up your LLM providers`)],-1),n(`div`,{"i-solar:arrow-right-line-duotone":``,class:`ml-auto text-xl text-neutral-400 dark:text-neutral-500`},null,-1)]),_:1,__:[4]})]))])])]),f(K)&&f(Y)?(l(),a(`div`,S,[n(`div`,C,[n(`div`,null,[n(`h2`,w,d(f($)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.title`)),1),n(`div`,T,[n(`span`,null,d(f($)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.subtitle`)),1)])]),f(Z)?(l(),a(`div`,E,[c[5]||=n(`div`,{class:`mr-2 animate-spin`},[n(`div`,{"i-solar:spinner-line-duotone":``,"text-xl":``})],-1),n(`span`,null,d(f($)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.loading`)),1)])):f(Q)?(l(),a(`div`,D,[c[6]||=n(`div`,{"i-solar:close-circle-line-duotone":``,class:`text-2xl text-red-500 dark:text-red-400`},null,-1),n(`div`,O,[n(`span`,k,d(f($)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.error`)),1),n(`span`,A,d(f(Q)),1)])])):f(X).length===0&&!f(Z)?(l(),a(`div`,j,[c[7]||=n(`div`,{"i-solar:info-circle-line-duotone":``,class:`text-2xl text-amber-500 dark:text-amber-400`},null,-1),n(`div`,M,[n(`span`,N,d(f($)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.no_models`)),1),n(`span`,P,d(f($)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.no_models_description`)),1)])])):f(X).length>0?(l(),r(f(ce),{key:3,modelValue:f(q),"onUpdate:modelValue":c[1]||=e=>s(q)?q.value=e:null,"search-query":f(J),"onUpdate:searchQuery":c[2]||=e=>s(J)?J.value=e:null,items:f(X).sort((e,t)=>e.id===f(q)?-1:t.id===f(q)?1:0),searchable:!0,"search-placeholder":f($)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.search_placeholder`),"search-no-results-title":f($)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.no_search_results`),"search-no-results-description":f($)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.no_search_results_description`,{query:f(J)}),"search-results-text":f($)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.search_results`,{count:`{count}`,total:`{total}`}),"custom-input-placeholder":f($)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.custom_model_placeholder`),"expand-button-text":f($)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.expand`),"collapse-button-text":f($)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.collapse`),"onUpdate:customValue":me},null,8,[`modelValue`,`search-query`,`items`,`search-placeholder`,`search-no-results-title`,`search-no-results-description`,`search-results-text`,`custom-input-placeholder`,`expand-button-text`,`collapse-button-text`])):i(``,!0)])])):f(K)&&!f(Y)?(l(),a(`div`,ue,[n(`div`,F,[n(`div`,null,[n(`h2`,I,d(f($)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.title`)),1),n(`div`,L,[n(`span`,null,d(f($)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.subtitle`)),1)])]),n(`div`,R,[c[8]||=n(`div`,{"i-solar:info-circle-line-duotone":``,class:`text-2xl text-primary-500 dark:text-primary-400`},null,-1),n(`div`,z,[n(`span`,B,d(f($)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.not_supported`)),1),n(`span`,V,d(f($)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.not_supported_description`)),1)])]),n(`div`,H,[n(`label`,U,d(f($)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.manual_model_name`)),1),p(n(`input`,{"onUpdate:modelValue":c[3]||=e=>s(q)?q.value=e:null,type:`text`,class:`w-full border border-neutral-300 rounded bg-white px-3 py-2 dark:border-neutral-700 dark:bg-neutral-900`,placeholder:f($)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.manual_model_placeholder`)},null,8,de),[[ie,f(q)]])])])])):i(``,!0)]),p((l(),a(`div`,fe,c[9]||=[n(`div`,{text:`60`,"i-solar:ghost-bold-duotone":``},null,-1)])),[[u]])],64)}}});typeof m==`function`&&m(W);var G=W;export{G as default}; \ No newline at end of file diff --git a/assets/deepseek-DDoXlrh7.js b/assets/deepseek-BM0Eh2rC.js similarity index 82% rename from assets/deepseek-DDoXlrh7.js rename to assets/deepseek-BM0Eh2rC.js index 06293736e3c6bac7906b4f8f21ef207f4677f2c4..290322d49a9a2ef3c7c7e937f395e22bd764b372 100644 --- a/assets/deepseek-DDoXlrh7.js +++ b/assets/deepseek-BM0Eh2rC.js @@ -1 +1 @@ -import{computed as e,createBlock as t,createVNode as n,defineComponent as r,onMounted as i,openBlock as a,storeToRefs as o,unref as s,useI18n as c,useRouter as l,watch as u,withCtx as d}from"./index-CuCRViVh.js";import"./import-url-browser-DNuYZxPr.js";import"./duckdb-mvp-C3i5IjU8.js";import"./index-CISmcbXk-BkTeNOgG.js";import"./types-AwjH7X1C.js";import{useProvidersStore as f}from"./stores-m0eA85gd.js";import"./__vite-browser-external-CCfYMxZl.js";import"./Button-DFhzbYVt.js";import"./src-C2QbIOor.js";import{ProviderAdvancedSettings_default as p,ProviderApiKeyInput_default as m,ProviderBaseUrlInput_default as h,ProviderBasicSettings_default as g,ProviderSettingsContainer_default as _,ProviderSettingsLayout_default as v}from"./components-BFLl4u81.js";import"./composables-Cgvkd8lL.js";import"./sleep-CvjNLutj.js";import"./queue-DAKPJQl1.js";import"./queues-Dstwm1VQ.js";import"./dist-Cr2QBfS4.js";import"./webgpu-Nt9hTBpW.js";import{route_block_default as y}from"./route-block-DNPbw0zT.js";const b=`deepseek`;var x=r({__name:`deepseek`,setup(r){let{t:y}=c(),x=l(),S=f(),{providers:C}=o(S),w=e(()=>S.getProviderMetadata(b)),T=e({get:()=>{var e;return(e=C.value[b])?.apiKey||``},set:e=>{C.value[b]||(C.value[b]={}),C.value[b].apiKey=e}}),E=e({get:()=>{var e;return(e=C.value[b])?.baseUrl||``},set:e=>{C.value[b]||(C.value[b]={}),C.value[b].baseUrl=e}});i(()=>{var e,t;S.initializeProvider(b),T.value=(e=C.value[b])?.apiKey||``,E.value=(t=C.value[b])?.baseUrl||``}),u([T,E],()=>{C.value[b]={...C.value[b],apiKey:T.value,baseUrl:E.value||``}});function D(){var e;C.value[b]={...(e=w.value)?.defaultOptions}}return(e,r)=>{var i,o;return a(),t(s(v),{"provider-name":(i=w.value)?.localizedName,"provider-icon-color":(o=w.value)?.iconColor,"on-back":()=>s(x).back()},{default:d(()=>[n(s(_),null,{default:d(()=>[n(s(g),{title:s(y)(`settings.pages.providers.common.section.basic.title`),description:s(y)(`settings.pages.providers.common.section.basic.description`),"on-reset":D},{default:d(()=>{var e;return[n(s(m),{modelValue:T.value,"onUpdate:modelValue":r[0]||=e=>T.value=e,"provider-name":(e=w.value)?.localizedName,placeholder:`sk-...`},null,8,[`modelValue`,`provider-name`])]}),_:1},8,[`title`,`description`]),n(s(p),{title:s(y)(`settings.pages.providers.common.section.advanced.title`)},{default:d(()=>[n(s(h),{modelValue:E.value,"onUpdate:modelValue":r[1]||=e=>E.value=e,placeholder:`https://api.deepseek.com/v1/`},null,8,[`modelValue`])]),_:1},8,[`title`])]),_:1})]),_:1},8,[`provider-name`,`provider-icon-color`,`on-back`])}}});typeof y==`function`&&y(x);var S=x;export{S as default}; \ No newline at end of file +import{computed as e,createBlock as t,createVNode as n,defineComponent as r,onMounted as i,openBlock as a,storeToRefs as o,unref as s,useI18n as c,useRouter as l,watch as u,withCtx as d}from"./index-CsmT0L1K.js";import"./import-url-browser-DNuYZxPr.js";import"./duckdb-mvp-C3i5IjU8.js";import"./index-CISmcbXk-C9oju49Y.js";import"./types-AwjH7X1C.js";import{useProvidersStore as f}from"./stores-2H61GqXP.js";import"./__vite-browser-external-DPh5tFvT.js";import"./Button-D3cjyOEe.js";import"./src-C1Sr0aqN.js";import{ProviderAdvancedSettings_default as p,ProviderApiKeyInput_default as m,ProviderBaseUrlInput_default as h,ProviderBasicSettings_default as g,ProviderSettingsContainer_default as _,ProviderSettingsLayout_default as v}from"./components-DHUA669a.js";import"./composables-CgcEyUWo.js";import"./sleep-CvjNLutj.js";import"./queue-B0kER5Ap.js";import"./queues-hSEKEE3F.js";import"./dist-Cr2QBfS4.js";import"./webgpu-Nt9hTBpW.js";import{route_block_default as y}from"./route-block-DNPbw0zT.js";const b=`deepseek`;var x=r({__name:`deepseek`,setup(r){let{t:y}=c(),x=l(),S=f(),{providers:C}=o(S),w=e(()=>S.getProviderMetadata(b)),T=e({get:()=>{var e;return(e=C.value[b])?.apiKey||``},set:e=>{C.value[b]||(C.value[b]={}),C.value[b].apiKey=e}}),E=e({get:()=>{var e;return(e=C.value[b])?.baseUrl||``},set:e=>{C.value[b]||(C.value[b]={}),C.value[b].baseUrl=e}});i(()=>{var e,t;S.initializeProvider(b),T.value=(e=C.value[b])?.apiKey||``,E.value=(t=C.value[b])?.baseUrl||``}),u([T,E],()=>{C.value[b]={...C.value[b],apiKey:T.value,baseUrl:E.value||``}});function D(){var e;C.value[b]={...(e=w.value)?.defaultOptions}}return(e,r)=>{var i,o;return a(),t(s(v),{"provider-name":(i=w.value)?.localizedName,"provider-icon-color":(o=w.value)?.iconColor,"on-back":()=>s(x).back()},{default:d(()=>[n(s(_),null,{default:d(()=>[n(s(g),{title:s(y)(`settings.pages.providers.common.section.basic.title`),description:s(y)(`settings.pages.providers.common.section.basic.description`),"on-reset":D},{default:d(()=>{var e;return[n(s(m),{modelValue:T.value,"onUpdate:modelValue":r[0]||=e=>T.value=e,"provider-name":(e=w.value)?.localizedName,placeholder:`sk-...`},null,8,[`modelValue`,`provider-name`])]}),_:1},8,[`title`,`description`]),n(s(p),{title:s(y)(`settings.pages.providers.common.section.advanced.title`)},{default:d(()=>[n(s(h),{modelValue:E.value,"onUpdate:modelValue":r[1]||=e=>E.value=e,placeholder:`https://api.deepseek.com/v1/`},null,8,[`modelValue`])]),_:1},8,[`title`])]),_:1})]),_:1},8,[`provider-name`,`provider-icon-color`,`on-back`])}}});typeof y==`function`&&y(x);var S=x;export{S as default}; \ No newline at end of file diff --git a/assets/default-BIvW8Ai3.js b/assets/default-BdRB7bUi.js similarity index 82% rename from assets/default-BIvW8Ai3.js rename to assets/default-BdRB7bUi.js index 3276e865b9c200a040303dd27b209620e73a280d..6f78421d430a31696ab37cd7c8237464aa0c339e 100644 --- a/assets/default-BIvW8Ai3.js +++ b/assets/default-BdRB7bUi.js @@ -1 +1 @@ -import{RouterView as e,createBaseVNode as t,createElementBlock as n,createVNode as r,defineComponent as i,openBlock as a,unref as o}from"./index-CuCRViVh.js";import{HeaderLink_default as s}from"./HeaderLink-BuxOmtb4.js";const c={style:{paddingBottom:`env(safe-area-inset-bottom, 0px)`,paddingTop:`env(safe-area-inset-top, 0px)`,paddingRight:`env(safe-area-inset-right, 0px)`,paddingLeft:`env(safe-area-inset-left, 0px)`},"h-full":``},l={class:`px-0 py-1 md:px-3 md:py-3`,"w-full":``,"gap-2":``,bg:`$bg-color`},u={class:`px-3 py-2 md:px-5 md:py-5`,flex:`~ col`,"mx-auto":``,"h-full":``,"max-w-screen-xl":``};var d=i({__name:`default`,setup(i){return(i,d)=>(a(),n(`div`,c,[t(`div`,l,[r(s)]),t(`div`,u,[r(o(e))])]))}}),f=d;export{f as default}; \ No newline at end of file +import{RouterView as e,createBaseVNode as t,createElementBlock as n,createVNode as r,defineComponent as i,openBlock as a,unref as o}from"./index-CsmT0L1K.js";import{HeaderLink_default as s}from"./HeaderLink-Dws9YKmo.js";const c={style:{paddingBottom:`env(safe-area-inset-bottom, 0px)`,paddingTop:`env(safe-area-inset-top, 0px)`,paddingRight:`env(safe-area-inset-right, 0px)`,paddingLeft:`env(safe-area-inset-left, 0px)`},"h-full":``},l={class:`px-0 py-1 md:px-3 md:py-3`,"w-full":``,"gap-2":``,bg:`$bg-color`},u={class:`px-3 py-2 md:px-5 md:py-5`,flex:`~ col`,"mx-auto":``,"h-full":``,"max-w-screen-xl":``};var d=i({__name:`default`,setup(i){return(i,d)=>(a(),n(`div`,c,[t(`div`,l,[r(s)]),t(`div`,u,[r(o(e))])]))}}),f=d;export{f as default}; \ No newline at end of file diff --git a/assets/default-node-C5y-aJTF.js b/assets/default-node-CQhep7iX.js similarity index 59% rename from assets/default-node-C5y-aJTF.js rename to assets/default-node-CQhep7iX.js index 5522317d01e8db53b9b79b11326755ec0209e6e9..8aadbcb3d9118aa45a59fc95177da2cf4074663f 100644 --- a/assets/default-node-C5y-aJTF.js +++ b/assets/default-node-CQhep7iX.js @@ -1,2 +1,2 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/__vite-browser-external-Ct7_N7cf.js","assets/__vite-browser-external-CCfYMxZl.js","assets/index-CuCRViVh.js","assets/index-10xSVpcK.css"])))=>i.map(i=>d[i]); -import{__toDynamicImportESM as e,__vitePreload as t}from"./index-CuCRViVh.js";async function n(){let{createRequire:n}=await t(async()=>{let{createRequire:t}=await import(`./__vite-browser-external-Ct7_N7cf.js`).then(e(1));return{createRequire:t}},__vite__mapDeps([0,1,2,3])),{dirname:r,resolve:i}=await t(async()=>{let{dirname:t,resolve:n}=await import(`./__vite-browser-external-Ct7_N7cf.js`).then(e(1));return{dirname:t,resolve:n}},__vite__mapDeps([0,1,2,3])),a=n(import.meta.url),o=r(a.resolve(`@duckdb/duckdb-wasm`));return{mvp:{mainModule:i(o,`./duckdb-mvp.wasm`),mainWorker:i(o,`./duckdb-node-mvp.worker.cjs`)},eh:{mainModule:i(o,`./duckdb-eh.wasm`),mainWorker:i(o,`./duckdb-node-eh.worker.cjs`)}}}export{n as getBundles}; \ No newline at end of file +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/__vite-browser-external-BQ5eJQsZ.js","assets/__vite-browser-external-DPh5tFvT.js","assets/index-CsmT0L1K.js","assets/index-10xSVpcK.css"])))=>i.map(i=>d[i]); +import{__toDynamicImportESM as e,__vitePreload as t}from"./index-CsmT0L1K.js";async function n(){let{createRequire:n}=await t(async()=>{let{createRequire:t}=await import(`./__vite-browser-external-BQ5eJQsZ.js`).then(e(1));return{createRequire:t}},__vite__mapDeps([0,1,2,3])),{dirname:r,resolve:i}=await t(async()=>{let{dirname:t,resolve:n}=await import(`./__vite-browser-external-BQ5eJQsZ.js`).then(e(1));return{dirname:t,resolve:n}},__vite__mapDeps([0,1,2,3])),a=n(import.meta.url),o=r(a.resolve(`@duckdb/duckdb-wasm`));return{mvp:{mainModule:i(o,`./duckdb-mvp.wasm`),mainWorker:i(o,`./duckdb-node-mvp.worker.cjs`)},eh:{mainModule:i(o,`./duckdb-eh.wasm`),mainWorker:i(o,`./duckdb-node-eh.worker.cjs`)}}}export{n as getBundles}; \ No newline at end of file diff --git a/assets/delays-IClek8Pp.js b/assets/delays-IM0BuMf_.js similarity index 77% rename from assets/delays-IClek8Pp.js rename to assets/delays-IM0BuMf_.js index 07555b7cce21213be48c49f746ebb53be7dbf826..a9b27cb196673cbfbcf6eebf9b59ae35d647acfc 100644 --- a/assets/delays-IClek8Pp.js +++ b/assets/delays-IM0BuMf_.js @@ -1 +1 @@ -import{Fragment as e,createBaseVNode as t,createElementBlock as n,createVNode as r,defineComponent as i,openBlock as a,ref as o,renderList as s,toDisplayString as c,unref as l}from"./index-CuCRViVh.js";import"./src-C2QbIOor.js";import"./Basic-SuYkQxAJ.js";import{Textarea_default as u}from"./Textarea-D04Ettdn.js";import"./composables-Cgvkd8lL.js";import"./sleep-CvjNLutj.js";import"./queue-DAKPJQl1.js";import{llmInferenceEndToken as d,useDelayMessageQueue as f}from"./queues-Dstwm1VQ.js";const p={flex:``,"flex-col":``,"gap-2":``,"p-2":``},m={flex:``,"flex-row":``,"gap-2":``},h={"rounded-lg":``,bg:`neutral-100 dark:neutral-700`,"p-4":``},g={"w-full":``,flex:``,"flex-row":``,"gap-4":``},_={"w-full":``,"rounded-lg":``,bg:`neutral-100 dark:neutral-700`,"p-2":``},v={"w-full":``,"rounded-lg":``,bg:`neutral-100 dark:neutral-700`,"p-2":``};var y=i({__name:`delays`,setup(i){let y=o(``),b=o([]),x=o([]),S=o(!1),C=f();C.onHandlerEvent(`delay`,e=>{x.value.push(e)});function w(){S.value=!0;let e=y.value.split(``);for(let t of e)C.add(t);C.add(d),y.value=``,S.value=!1}return(i,o)=>(a(),n(`div`,p,[t(`div`,m,[r(l(u),{modelValue:y.value,"onUpdate:modelValue":o[0]||=e=>y.value=e,placeholder:`Message`,p:`2`,bg:`neutral-100 dark:neutral-700`,"w-full":``,"rounded-lg":``,"outline-none":``,onSubmit:w},null,8,[`modelValue`]),t(`button`,h,c(S.value?`Processing...`:`Send`),1)]),t(`div`,g,[t(`div`,_,[o[1]||=t(`h3`,{"font-normal":``},` Emotion Message `,-1),(a(!0),n(e,null,s(b.value,e=>(a(),n(`div`,{key:e},[t(`div`,null,c(e),1)]))),128))]),t(`div`,v,[o[2]||=t(`h3`,{"font-normal":``},` Delays `,-1),(a(!0),n(e,null,s(x.value,e=>(a(),n(`div`,{key:e},[t(`div`,null,c(e)+`s`,1)]))),128))])])]))}}),b=y;export{b as default}; \ No newline at end of file +import{Fragment as e,createBaseVNode as t,createElementBlock as n,createVNode as r,defineComponent as i,openBlock as a,ref as o,renderList as s,toDisplayString as c,unref as l}from"./index-CsmT0L1K.js";import"./src-C1Sr0aqN.js";import"./Basic-MLnzojs5.js";import{Textarea_default as u}from"./Textarea-CK41gHte.js";import"./composables-CgcEyUWo.js";import"./sleep-CvjNLutj.js";import"./queue-B0kER5Ap.js";import{llmInferenceEndToken as d,useDelayMessageQueue as f}from"./queues-hSEKEE3F.js";const p={flex:``,"flex-col":``,"gap-2":``,"p-2":``},m={flex:``,"flex-row":``,"gap-2":``},h={"rounded-lg":``,bg:`neutral-100 dark:neutral-700`,"p-4":``},g={"w-full":``,flex:``,"flex-row":``,"gap-4":``},_={"w-full":``,"rounded-lg":``,bg:`neutral-100 dark:neutral-700`,"p-2":``},v={"w-full":``,"rounded-lg":``,bg:`neutral-100 dark:neutral-700`,"p-2":``};var y=i({__name:`delays`,setup(i){let y=o(``),b=o([]),x=o([]),S=o(!1),C=f();C.onHandlerEvent(`delay`,e=>{x.value.push(e)});function w(){S.value=!0;let e=y.value.split(``);for(let t of e)C.add(t);C.add(d),y.value=``,S.value=!1}return(i,o)=>(a(),n(`div`,p,[t(`div`,m,[r(l(u),{modelValue:y.value,"onUpdate:modelValue":o[0]||=e=>y.value=e,placeholder:`Message`,p:`2`,bg:`neutral-100 dark:neutral-700`,"w-full":``,"rounded-lg":``,"outline-none":``,onSubmit:w},null,8,[`modelValue`]),t(`button`,h,c(S.value?`Processing...`:`Send`),1)]),t(`div`,g,[t(`div`,_,[o[1]||=t(`h3`,{"font-normal":``},` Emotion Message `,-1),(a(!0),n(e,null,s(b.value,e=>(a(),n(`div`,{key:e},[t(`div`,null,c(e),1)]))),128))]),t(`div`,v,[o[2]||=t(`h3`,{"font-normal":``},` Delays `,-1),(a(!0),n(e,null,s(x.value,e=>(a(),n(`div`,{key:e},[t(`div`,null,c(e)+`s`,1)]))),128))])])]))}}),b=y;export{b as default}; \ No newline at end of file diff --git a/assets/developer-DSMe0VXa.js b/assets/developer-CsRsu9bL.js similarity index 81% rename from assets/developer-DSMe0VXa.js rename to assets/developer-CsRsu9bL.js index d0d3a538e6755baa58984b3e74c3ddfc9d433264..67a36f4e51a963459f0132d2c599edd0c8d92eb3 100644 --- a/assets/developer-DSMe0VXa.js +++ b/assets/developer-CsRsu9bL.js @@ -1 +1 @@ -import{Fragment as e,createBaseVNode as t,createElementBlock as n,createVNode as r,defineComponent as i,openBlock as a,resolveDirective as o,unref as s,useSettings as c,withDirectives as l}from"./index-CuCRViVh.js";import"./index-CISmcbXk-BkTeNOgG.js";import"./types-AwjH7X1C.js";import"./stores-m0eA85gd.js";import"./__vite-browser-external-CCfYMxZl.js";import"./composables-Cgvkd8lL.js";import"./sleep-CvjNLutj.js";import"./queue-DAKPJQl1.js";import"./queues-Dstwm1VQ.js";import"./dist-Cr2QBfS4.js";import"./webgpu-Nt9hTBpW.js";import{route_block_default as u}from"./route-block-DNPbw0zT.js";import{CheckBar_default as d}from"./CheckBar-BxEtoWm5.js";const f={text:`neutral-200/50 dark:neutral-600/20`,"pointer-events-none":``,fixed:``,top:`[65dvh]`,"right--15":``,"z--1":``,initial:{scale:.9,opacity:0,rotate:30},enter:{scale:1,opacity:1,rotate:0},duration:250,flex:``,"items-center":``,"justify-center":``};var p=i({__name:`developer`,setup(i){let u=c();return(i,c)=>{let p=o(`motion`);return a(),n(e,null,[l(r(d,{modelValue:s(u).disableTransitions,"onUpdate:modelValue":c[0]||=e=>s(u).disableTransitions=e,"mb-2":``,"icon-on":`i-solar:people-nearby-bold-duotone`,"icon-off":`i-solar:running-2-line-duotone`,text:`settings.animations.stage-transitions.title`,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:440,delay:19*50,transition:`all ease-in-out duration-250`},null,8,[`modelValue`]),[[p]]),l(r(d,{modelValue:s(u).usePageSpecificTransitions,"onUpdate:modelValue":c[1]||=e=>s(u).usePageSpecificTransitions=e,disabled:s(u).disableTransitions,"icon-on":`i-solar:running-2-line-duotone`,"icon-off":`i-solar:people-nearby-bold-duotone`,text:`settings.animations.use-page-specific-transitions.title`,description:`settings.animations.use-page-specific-transitions.description`,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:450,delay:20*50,transition:`all ease-in-out duration-250`},null,8,[`modelValue`,`disabled`]),[[p]]),l((a(),n(`div`,f,c[2]||=[t(`div`,{text:`60`,"i-solar:code-bold-duotone":``},null,-1)])),[[p]])],64)}}});typeof u==`function`&&u(p);var m=p;export{m as default}; \ No newline at end of file +import{Fragment as e,createBaseVNode as t,createElementBlock as n,createVNode as r,defineComponent as i,openBlock as a,resolveDirective as o,unref as s,useSettings as c,withDirectives as l}from"./index-CsmT0L1K.js";import"./index-CISmcbXk-C9oju49Y.js";import"./types-AwjH7X1C.js";import"./stores-2H61GqXP.js";import"./__vite-browser-external-DPh5tFvT.js";import"./composables-CgcEyUWo.js";import"./sleep-CvjNLutj.js";import"./queue-B0kER5Ap.js";import"./queues-hSEKEE3F.js";import"./dist-Cr2QBfS4.js";import"./webgpu-Nt9hTBpW.js";import{route_block_default as u}from"./route-block-DNPbw0zT.js";import{CheckBar_default as d}from"./CheckBar-Bo3RcSNe.js";const f={text:`neutral-200/50 dark:neutral-600/20`,"pointer-events-none":``,fixed:``,top:`[65dvh]`,"right--15":``,"z--1":``,initial:{scale:.9,opacity:0,rotate:30},enter:{scale:1,opacity:1,rotate:0},duration:250,flex:``,"items-center":``,"justify-center":``};var p=i({__name:`developer`,setup(i){let u=c();return(i,c)=>{let p=o(`motion`);return a(),n(e,null,[l(r(d,{modelValue:s(u).disableTransitions,"onUpdate:modelValue":c[0]||=e=>s(u).disableTransitions=e,"mb-2":``,"icon-on":`i-solar:people-nearby-bold-duotone`,"icon-off":`i-solar:running-2-line-duotone`,text:`settings.animations.stage-transitions.title`,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:440,delay:19*50,transition:`all ease-in-out duration-250`},null,8,[`modelValue`]),[[p]]),l(r(d,{modelValue:s(u).usePageSpecificTransitions,"onUpdate:modelValue":c[1]||=e=>s(u).usePageSpecificTransitions=e,disabled:s(u).disableTransitions,"icon-on":`i-solar:running-2-line-duotone`,"icon-off":`i-solar:people-nearby-bold-duotone`,text:`settings.animations.use-page-specific-transitions.title`,description:`settings.animations.use-page-specific-transitions.description`,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:450,delay:20*50,transition:`all ease-in-out duration-250`},null,8,[`modelValue`,`disabled`]),[[p]]),l((a(),n(`div`,f,c[2]||=[t(`div`,{text:`60`,"i-solar:code-bold-duotone":``},null,-1)])),[[p]])],64)}}});typeof u==`function`&&u(p);var m=p;export{m as default}; \ No newline at end of file diff --git a/assets/dist-B4cQ-m7C.js b/assets/dist-B9GpkGif.js similarity index 99% rename from assets/dist-B4cQ-m7C.js rename to assets/dist-B9GpkGif.js index ad958e41bbb6e11f1f9f8bef60480cf0b6dccc96..a2d21737d2dd0787b72928c708d85b0c275aba2e 100644 --- a/assets/dist-B4cQ-m7C.js +++ b/assets/dist-B9GpkGif.js @@ -1,4 +1,4 @@ -import{Comment as e,Fragment as t,Teleport as n,camelize as r,cloneVNode as i,computed as a,createBaseVNode as o,createBlock as s,createCommentVNode as c,createElementBlock as l,createTextVNode as u,createVNode as d,customRef as f,defineComponent as p,effectScope as m,getCurrentInstance as h,getCurrentScope as g,guardReactiveProps as _,h as v,inject as y,isRef as b,markRaw as x,mergeDefaults as S,mergeProps as C,nextTick as w,normalizeProps as T,normalizeStyle as E,onBeforeMount as D,onBeforeUnmount as O,onBeforeUpdate as k,onMounted as A,onScopeDispose as j,onUnmounted as M,onUpdated as N,openBlock as P,provide as F,reactive as I,readonly as ee,ref as L,renderList as te,renderSlot as R,resolveDynamicComponent as ne,shallowReadonly as re,shallowRef as ie,toDisplayString as ae,toHandlerKey as oe,toHandlers as se,toRaw as ce,toRef as le,toRefs as z,triggerRef as ue,unref as B,useId as de,useSlots as fe,vModelSelect as pe,vShow as me,watch as V,watchEffect as H,watchPostEffect as he,watchSyncEffect as ge,withCtx as U,withDirectives as _e,withKeys as W,withModifiers as G}from"./index-CuCRViVh.js";import{arrow as ve,computePosition as ye,createCoords as be,flip as xe,floor as Se,hide as Ce,limitShift as we,max as Te,min as Ee,offset as De,rectToClientRect as Oe,round as ke,shift as Ae,size as je}from"./src-C2QbIOor.js";function Me(){return typeof window<`u`}function Ne(e){return Ie(e)?(e.nodeName||``).toLowerCase():`#document`}function Pe(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Fe(e){var t;return(t=(Ie(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function Ie(e){return Me()?e instanceof Node||e instanceof Pe(e).Node:!1}function Le(e){return Me()?e instanceof Element||e instanceof Pe(e).Element:!1}function Re(e){return Me()?e instanceof HTMLElement||e instanceof Pe(e).HTMLElement:!1}function ze(e){return!Me()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof Pe(e).ShadowRoot}function Be(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=qe(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&![`inline`,`contents`].includes(i)}function Ve(e){return[`table`,`td`,`th`].includes(Ne(e))}function He(e){return[`:popover-open`,`:modal`].some(t=>{try{return e.matches(t)}catch{return!1}})}function Ue(e){let t=Ge(),n=Le(e)?qe(e):e;return[`transform`,`translate`,`scale`,`rotate`,`perspective`].some(e=>n[e]?n[e]!==`none`:!1)||(n.containerType?n.containerType!==`normal`:!1)||!t&&(n.backdropFilter?n.backdropFilter!==`none`:!1)||!t&&(n.filter?n.filter!==`none`:!1)||[`transform`,`translate`,`scale`,`rotate`,`perspective`,`filter`].some(e=>(n.willChange||``).includes(e))||[`paint`,`layout`,`strict`,`content`].some(e=>(n.contain||``).includes(e))}function We(e){let t=Ye(e);for(;Re(t)&&!Ke(t);){if(Ue(t))return t;if(He(t))return null;t=Ye(t)}return null}function Ge(){return typeof CSS>`u`||!CSS.supports?!1:CSS.supports(`-webkit-backdrop-filter`,`none`)}function Ke(e){return[`html`,`body`,`#document`].includes(Ne(e))}function qe(e){return Pe(e).getComputedStyle(e)}function Je(e){return Le(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ye(e){if(Ne(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||ze(e)&&e.host||Fe(e);return ze(t)?t.host:t}function Xe(e){let t=Ye(e);return Ke(t)?e.ownerDocument?e.ownerDocument.body:e.body:Re(t)&&Be(t)?t:Xe(t)}function Ze(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);let i=Xe(e),a=i===(r=e.ownerDocument)?.body,o=Pe(i);if(a){let e=Qe(o);return t.concat(o,o.visualViewport||[],Be(i)?i:[],e&&n?Ze(e):[])}return t.concat(i,Ze(i,[],n))}function Qe(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function $e(e){let t=qe(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=Re(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=ke(n)!==a||ke(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function et(e){return Le(e)?e:e.contextElement}function tt(e){let t=et(e);if(!Re(t))return be(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=$e(t),o=(a?ke(n.width):n.width)/r,s=(a?ke(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}const nt=be(0);function rt(e){let t=Pe(e);return!Ge()||!t.visualViewport?nt:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function it(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Pe(e)?!1:t}function at(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=et(e),o=be(1);t&&(r?Le(r)&&(o=tt(r)):o=tt(e));let s=it(a,n,r)?rt(a):be(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a){let e=Pe(a),t=r&&Le(r)?Pe(r):r,n=e,i=Qe(n);for(;i&&r&&t!==n;){let e=tt(i),t=i.getBoundingClientRect(),r=qe(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=Pe(i),i=Qe(n)}}return Oe({width:u,height:d,x:c,y:l})}function ot(e,t){let n=Je(e).scrollLeft;return t?t.left+n:at(Fe(e)).left+n}function st(e,t,n){n===void 0&&(n=!1);let r=e.getBoundingClientRect(),i=r.left+t.scrollLeft-(n?0:ot(e,r)),a=r.top+t.scrollTop;return{x:i,y:a}}function ct(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=Fe(r),s=t?He(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=be(1),u=be(0),d=Re(r);if((d||!d&&!a)&&((Ne(r)!==`body`||Be(o))&&(c=Je(r)),Re(r))){let e=at(r);l=tt(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?st(o,c,!0):be(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function lt(e){return Array.from(e.getClientRects())}function ut(e){let t=Fe(e),n=Je(e),r=e.ownerDocument.body,i=Te(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=Te(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+ot(e),s=-n.scrollTop;return qe(r).direction===`rtl`&&(o+=Te(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}function dt(e,t){let n=Pe(e),r=Fe(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=Ge();(!e||e&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}return{width:a,height:o,x:s,y:c}}function ft(e,t){let n=at(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=Re(e)?tt(e):be(1),o=e.clientWidth*a.x,s=e.clientHeight*a.y,c=i*a.x,l=r*a.y;return{width:o,height:s,x:c,y:l}}function pt(e,t,n){let r;if(t===`viewport`)r=dt(e,n);else if(t===`document`)r=ut(Fe(e));else if(Le(t))r=ft(t,n);else{let n=rt(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Oe(r)}function mt(e,t){let n=Ye(e);return n===t||!Le(n)||Ke(n)?!1:qe(n).position===`fixed`||mt(n,t)}function ht(e,t){let n=t.get(e);if(n)return n;let r=Ze(e,[],!1).filter(e=>Le(e)&&Ne(e)!==`body`),i=null,a=qe(e).position===`fixed`,o=a?Ye(e):e;for(;Le(o)&&!Ke(o);){let t=qe(o),n=Ue(o);!n&&t.position===`fixed`&&(i=null);let s=a?!n&&!i:!n&&t.position===`static`&&!!i&&[`absolute`,`fixed`].includes(i.position)||Be(o)&&!n&&mt(e,o);s?r=r.filter(e=>e!==o):i=t,o=Ye(o)}return t.set(e,r),r}function gt(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=n===`clippingAncestors`?He(t)?[]:ht(t,this._c):[].concat(n),o=[...a,r],s=o[0],c=o.reduce((e,n)=>{let r=pt(t,n,i);return e.top=Te(r.top,e.top),e.right=Ee(r.right,e.right),e.bottom=Ee(r.bottom,e.bottom),e.left=Te(r.left,e.left),e},pt(t,s,i));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function _t(e){let{width:t,height:n}=$e(e);return{width:t,height:n}}function vt(e,t,n){let r=Re(t),i=Fe(t),a=n===`fixed`,o=at(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=be(0);if(r||!r&&!a)if((Ne(t)!==`body`||Be(i))&&(s=Je(t)),r){let e=at(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else i&&(c.x=ot(i));let l=i&&!r&&!a?st(i,s):be(0),u=o.left+s.scrollLeft-c.x-l.x,d=o.top+s.scrollTop-c.y-l.y;return{x:u,y:d,width:o.width,height:o.height}}function yt(e){return qe(e).position===`static`}function bt(e,t){if(!Re(e)||qe(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return Fe(e)===n&&(n=n.ownerDocument.body),n}function xt(e,t){let n=Pe(e);if(He(e))return n;if(!Re(e)){let t=Ye(e);for(;t&&!Ke(t);){if(Le(t)&&!yt(t))return t;t=Ye(t)}return n}let r=bt(e,t);for(;r&&Ve(r)&&yt(r);)r=bt(r,t);return r&&Ke(r)&&yt(r)&&!Ue(r)?n:r||We(e)||n}const St=async function(e){let t=this.getOffsetParent||xt,n=this.getDimensions,r=await n(e.floating);return{reference:vt(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Ct(e){return qe(e).direction===`rtl`}const wt={convertOffsetParentRelativeRectToViewportRelativeRect:ct,getDocumentElement:Fe,getClippingRect:gt,getOffsetParent:xt,getElementRects:St,getClientRects:lt,getDimensions:_t,getScale:tt,isElement:Le,isRTL:Ct};function Tt(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Et(e,t){let n=null,r,i=Fe(e);function a(){var e;clearTimeout(r),(e=n)==null||e.disconnect(),n=null}function o(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),a();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(s||t(),!f||!p)return;let m=Se(d),h=Se(i.clientWidth-(u+f)),g=Se(i.clientHeight-(d+p)),_=Se(u),v=-m+`px `+-h+`px `+-g+`px `+-_+`px`,y={rootMargin:v,threshold:Te(0,Ee(1,c))||1},b=!0;function x(t){let n=t[0].intersectionRatio;if(n!==c){if(!b)return o();n?o(!1,n):r=setTimeout(()=>{o(!1,1e-7)},1e3)}n===1&&!Tt(l,e.getBoundingClientRect())&&o(),b=!1}try{n=new IntersectionObserver(x,{...y,root:i.ownerDocument})}catch{n=new IntersectionObserver(x,y)}n.observe(e)}return o(!0),a}function Dt(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=et(e),u=i||a?[...l?Ze(l):[],...Ze(t)]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n,{passive:!0}),a&&e.addEventListener(`resize`,n)});let d=l&&s?Et(l,n):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),p.observe(t));let m,h=c?at(e):null;c&&g();function g(){let t=at(e);h&&!Tt(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}const Ot=De,kt=Ae,At=xe,jt=je,Mt=Ce,Nt=ve,Pt=we,Ft=(e,t,n)=>{let r=new Map,i={platform:wt,...n},a={...i.platform,_c:r};return ye(e,t,{...i,platform:a})};function It(e){return typeof e==`object`&&!!e&&`$el`in e}function Lt(e){if(It(e)){let t=e.$el;return Ie(t)&&Ne(t)===`#comment`?null:t}return e}function Rt(e){return typeof e==`function`?e():B(e)}function zt(e){return{name:`arrow`,options:e,fn(t){let n=Lt(Rt(e.element));return n==null?{}:Nt({element:n,padding:e.padding}).fn(t)}}}function Bt(e){if(typeof window>`u`)return 1;let t=e.ownerDocument.defaultView||window;return t.devicePixelRatio||1}function Vt(e,t){let n=Bt(e);return Math.round(t*n)/n}function Ht(e,t,n){n===void 0&&(n={});let r=n.whileElementsMounted,i=a(()=>{var e;return(e=Rt(n.open))??!0}),o=a(()=>Rt(n.middleware)),s=a(()=>{var e;return(e=Rt(n.placement))??`bottom`}),c=a(()=>{var e;return(e=Rt(n.strategy))??`absolute`}),l=a(()=>{var e;return(e=Rt(n.transform))??!0}),u=a(()=>Lt(e.value)),d=a(()=>Lt(t.value)),f=L(0),p=L(0),m=L(c.value),h=L(s.value),_=ie({}),v=L(!1),y=a(()=>{let e={position:m.value,left:`0`,top:`0`};if(!d.value)return e;let t=Vt(d.value,f.value),n=Vt(d.value,p.value);return l.value?{...e,transform:`translate(`+t+`px, `+n+`px)`,...Bt(d.value)>=1.5&&{willChange:`transform`}}:{position:m.value,left:t+`px`,top:n+`px`}}),b;function x(){if(u.value==null||d.value==null)return;let e=i.value;Ft(u.value,d.value,{middleware:o.value,placement:s.value,strategy:c.value}).then(t=>{f.value=t.x,p.value=t.y,m.value=t.strategy,h.value=t.placement,_.value=t.middlewareData,v.value=e!==!1})}function S(){typeof b==`function`&&(b(),b=void 0)}function C(){if(S(),r===void 0){x();return}if(u.value!=null&&d.value!=null){b=r(u.value,d.value,x);return}}function w(){i.value||(v.value=!1)}return V([o,s,c,i],x,{flush:`sync`}),V([u,d],C,{flush:`sync`}),V(i,w,{flush:`sync`}),g()&&j(S),{x:re(f),y:re(p),strategy:re(m),placement:re(h),middlewareData:re(_),isPositioned:re(v),floatingStyles:y,update:x}}function Ut(e,t){return e-t*Math.floor(e/t)}const Wt=1721426;function Gt(e,t,n,r){t=qt(e,t);let i=t-1,a=-2;return n<=2?a=0:Kt(t)&&(a=-1),Wt-1+365*i+Math.floor(i/4)-Math.floor(i/100)+Math.floor(i/400)+Math.floor((367*n-362)/12+a+r)}function Kt(e){return e%4==0&&(e%100!=0||e%400==0)}function qt(e,t){return e===`BC`?1-t:t}function Jt(e){let t=`AD`;return e<=0&&(t=`BC`,e=1-e),[t,e]}const Yt={standard:[31,28,31,30,31,30,31,31,30,31,30,31],leapyear:[31,29,31,30,31,30,31,31,30,31,30,31]};var Xt=class{fromJulianDay(e){let t=e,n=t-Wt,r=Math.floor(n/146097),i=Ut(n,146097),a=Math.floor(i/36524),o=Ut(i,36524),s=Math.floor(o/1461),c=Ut(o,1461),l=Math.floor(c/365),u=r*400+a*100+s*4+l+(a!==4&&l!==4?1:0),[d,f]=Jt(u),p=t-Gt(d,f,1,1),m=2;t0&&t===pn())return new Date(e).getTimezoneOffset()*-6e4;let{year:n,month:r,day:i,hour:a,minute:o,second:s}=Cn(e,t),c=bn(n,r,i,a,o,s,0);return c-Math.floor(e/1e3)*1e3}const Sn=new Map;function Cn(e,t){let n=Sn.get(t);n||(n=new Intl.DateTimeFormat(`en-US`,{timeZone:t,hour12:!1,era:`short`,year:`numeric`,month:`numeric`,day:`numeric`,hour:`numeric`,minute:`numeric`,second:`numeric`}),Sn.set(t,n));let r=n.formatToParts(new Date(e)),i={};for(let e of r)e.type!==`literal`&&(i[e.type]=e.value);return{year:i.era===`BC`||i.era===`B`?-i.year+1:+i.year,month:+i.month,day:+i.day,hour:i.hour===`24`?0:+i.hour,minute:+i.minute,second:+i.second}}const wn=864e5;function Tn(e,t,n,r){let i=n===r?[n]:[n,r];return i.filter(n=>En(e,t,n))}function En(e,t,n){let r=Cn(n,t);return e.year===r.year&&e.month===r.month&&e.day===r.day&&e.hour===r.hour&&e.minute===r.minute&&e.second===r.second}function Dn(e,t,n=`compatible`){let r=jn(e);if(t===`UTC`)return yn(r);if(t===pn()&&n===`compatible`){r=Mn(r,new Xt);let e=new Date,t=qt(r.era,r.year);return e.setFullYear(t,r.month-1,r.day),e.setHours(r.hour,r.minute,r.second,r.millisecond),e.getTime()}let i=yn(r),a=xn(i-wn,t),o=xn(i+wn,t),s=Tn(r,t,i-a,i-o);if(s.length===1)return s[0];if(s.length>1)switch(n){case`compatible`:case`earlier`:return s[0];case`later`:return s[s.length-1];case`reject`:throw RangeError(`Multiple possible absolute times found`)}switch(n){case`earlier`:return Math.min(i-a,i-o);case`compatible`:case`later`:return Math.max(i-a,i-o);case`reject`:throw RangeError(`No such absolute time found`)}}function On(e,t,n=`compatible`){return new Date(Dn(e,t,n))}function kn(e,t){let n=xn(e,t),r=new Date(e+n),i=r.getUTCFullYear(),a=r.getUTCMonth()+1,o=r.getUTCDate(),s=r.getUTCHours(),c=r.getUTCMinutes(),l=r.getUTCSeconds(),u=r.getUTCMilliseconds();return new yr(i<1?`BC`:`AD`,i<1?-i+1:i,a,o,t,n,s,c,l,u)}function An(e){return new hr(e.calendar,e.era,e.year,e.month,e.day)}function jn(e,t){let n=0,r=0,i=0,a=0;if(`timeZone`in e)({hour:n,minute:r,second:i,millisecond:a}=e);else if(`hour`in e&&!t)return e;return t&&({hour:n,minute:r,second:i,millisecond:a}=t),new _r(e.calendar,e.era,e.year,e.month,e.day,n,r,i,a)}function Mn(e,t){if(nn(e.calendar,t))return e;let n=t.fromJulianDay(e.calendar.toJulianDay(e)),r=e.copy();return r.calendar=t,r.era=n.era,r.year=n.year,r.month=n.month,r.day=n.day,Hn(r),r}function Nn(e,t,n){if(e instanceof yr)return e.timeZone===t?e:Fn(e,t);let r=Dn(e,t,n);return kn(r,t)}function Pn(e){let t=yn(e)-e.offset;return new Date(t)}function Fn(e,t){let n=yn(e)-e.offset;return Mn(kn(n,t),e.calendar)}const In=36e5;function Ln(e,t){let n=e.copy(),r=`hour`in n?Xn(n,t):0;Rn(n,t.years||0),n.calendar.balanceYearMonth&&n.calendar.balanceYearMonth(n,e),n.month+=t.months||0,zn(n),Vn(n),n.day+=(t.weeks||0)*7,n.day+=t.days||0,n.day+=r,Bn(n),n.calendar.balanceDate&&n.calendar.balanceDate(n),n.year<1&&(n.year=1,n.month=1,n.day=1);let i=n.calendar.getYearsInEra(n);if(n.year>i){var a,o;let e=(a=(o=n.calendar).isInverseEra)?.call(o,n);n.year=i,n.month=e?1:n.calendar.getMonthsInYear(n),n.day=e?1:n.calendar.getDaysInMonth(n)}n.month<1&&(n.month=1,n.day=1);let s=n.calendar.getMonthsInYear(n);return n.month>s&&(n.month=s,n.day=n.calendar.getDaysInMonth(n)),n.day=Math.max(1,Math.min(n.calendar.getDaysInMonth(n),n.day)),n}function Rn(e,t){var n,r;(n=(r=e.calendar).isInverseEra)?.call(r,e)&&(t=-t),e.year+=t}function zn(e){for(;e.month<1;)Rn(e,-1),e.month+=e.calendar.getMonthsInYear(e);let t=0;for(;e.month>(t=e.calendar.getMonthsInYear(e));)e.month-=t,Rn(e,1)}function Bn(e){for(;e.day<1;)e.month--,zn(e),e.day+=e.calendar.getDaysInMonth(e);for(;e.day>e.calendar.getDaysInMonth(e);)e.day-=e.calendar.getDaysInMonth(e),e.month++,zn(e)}function Vn(e){e.month=Math.max(1,Math.min(e.calendar.getMonthsInYear(e),e.month)),e.day=Math.max(1,Math.min(e.calendar.getDaysInMonth(e),e.day))}function Hn(e){e.calendar.constrainDate&&e.calendar.constrainDate(e),e.year=Math.max(1,Math.min(e.calendar.getYearsInEra(e),e.year)),Vn(e)}function Un(e){let t={};for(let n in e)typeof e[n]==`number`&&(t[n]=-e[n]);return t}function Wn(e,t){return Ln(e,Un(t))}function Gn(e,t){let n=e.copy();return t.era!=null&&(n.era=t.era),t.year!=null&&(n.year=t.year),t.month!=null&&(n.month=t.month),t.day!=null&&(n.day=t.day),Hn(n),n}function Kn(e,t){let n=e.copy();return t.hour!=null&&(n.hour=t.hour),t.minute!=null&&(n.minute=t.minute),t.second!=null&&(n.second=t.second),t.millisecond!=null&&(n.millisecond=t.millisecond),Jn(n),n}function qn(e){e.second+=Math.floor(e.millisecond/1e3),e.millisecond=Yn(e.millisecond,1e3),e.minute+=Math.floor(e.second/60),e.second=Yn(e.second,60),e.hour+=Math.floor(e.minute/60),e.minute=Yn(e.minute,60);let t=Math.floor(e.hour/24);return e.hour=Yn(e.hour,24),t}function Jn(e){e.millisecond=Math.max(0,Math.min(e.millisecond,1e3)),e.second=Math.max(0,Math.min(e.second,59)),e.minute=Math.max(0,Math.min(e.minute,59)),e.hour=Math.max(0,Math.min(e.hour,23))}function Yn(e,t){let n=e%t;return n<0&&(n+=t),n}function Xn(e,t){return e.hour+=t.hours||0,e.minute+=t.minutes||0,e.second+=t.seconds||0,e.millisecond+=t.milliseconds||0,qn(e)}function Zn(e,t,n,r){let i=e.copy();switch(t){case`era`:{let t=e.calendar.getEras(),a=t.indexOf(e.era);if(a<0)throw Error(`Invalid era: `+e.era);a=$n(a,n,0,t.length-1,r?.round),i.era=t[a],Hn(i);break}case`year`:var a,o;(a=(o=i.calendar).isInverseEra)?.call(o,i)&&(n=-n),i.year=$n(e.year,n,-1/0,9999,r?.round),i.year===-1/0&&(i.year=1),i.calendar.balanceYearMonth&&i.calendar.balanceYearMonth(i,e);break;case`month`:i.month=$n(e.month,n,1,e.calendar.getMonthsInYear(e),r?.round);break;case`day`:i.day=$n(e.day,n,1,e.calendar.getDaysInMonth(e),r?.round);break;default:throw Error(`Unsupported field `+t)}return e.calendar.balanceDate&&e.calendar.balanceDate(i),Hn(i),i}function Qn(e,t,n,r){let i=e.copy();switch(t){case`hour`:{let t=e.hour,a=0,o=23;if(r?.hourCycle===12){let e=t>=12;a=e?12:0,o=e?23:11}i.hour=$n(t,n,a,o,r?.round);break}case`minute`:i.minute=$n(e.minute,n,0,59,r?.round);break;case`second`:i.second=$n(e.second,n,0,59,r?.round);break;case`millisecond`:i.millisecond=$n(e.millisecond,n,0,999,r?.round);break;default:throw Error(`Unsupported field `+t)}return i}function $n(e,t,n,r,i=!1){if(i){e+=Math.sign(t),e0?Math.ceil(e/i)*i:Math.floor(e/i)*i,e>r&&(e=n)}else e+=t,er&&(e=n+(e-r-1));return e}function er(e,t){let n;if(t.years!=null&&t.years!==0||t.months!=null&&t.months!==0||t.weeks!=null&&t.weeks!==0||t.days!=null&&t.days!==0){let r=Ln(jn(e),{years:t.years,months:t.months,weeks:t.weeks,days:t.days});n=Dn(r,e.timeZone)}else n=yn(e)-e.offset;n+=t.milliseconds||0,n+=(t.seconds||0)*1e3,n+=(t.minutes||0)*6e4,n+=(t.hours||0)*36e5;let r=kn(n,e.timeZone);return Mn(r,e.calendar)}function tr(e,t){return er(e,Un(t))}function nr(e,t,n,r){switch(t){case`hour`:{let t=0,i=23;if(r?.hourCycle===12){let n=e.hour>=12;t=n?12:0,i=n?23:11}let a=jn(e),o=Mn(Kn(a,{hour:t}),new Xt),s=[Dn(o,e.timeZone,`earlier`),Dn(o,e.timeZone,`later`)].filter(t=>kn(t,e.timeZone).day===o.day)[0],c=Mn(Kn(a,{hour:i}),new Xt),l=[Dn(c,e.timeZone,`earlier`),Dn(c,e.timeZone,`later`)].filter(t=>kn(t,e.timeZone).day===c.day).pop(),u=yn(e)-e.offset,d=Math.floor(u/In),f=u%In;return u=$n(d,n,Math.floor(s/In),Math.floor(l/In),r?.round)*In+f,Mn(kn(u,e.timeZone),e.calendar)}case`minute`:case`second`:case`millisecond`:return Qn(e,t,n,r);case`era`:case`year`:case`month`:case`day`:{let i=Zn(jn(e),t,n,r),a=Dn(i,e.timeZone);return Mn(kn(a,e.timeZone),e.calendar)}default:throw Error(`Unsupported field `+t)}}function rr(e,t,n){let r=jn(e),i=Kn(Gn(r,t),t);if(i.compare(r)===0)return e;let a=Dn(i,e.timeZone,n);return Mn(kn(a,e.timeZone),e.calendar)}const ir=[`hours`,`minutes`,`seconds`],ar=[`years`,`months`,`weeks`,`days`,...ir];function or(e){return`${String(e.hour).padStart(2,`0`)}:${String(e.minute).padStart(2,`0`)}:${String(e.second).padStart(2,`0`)}${e.millisecond?String(e.millisecond/1e3).slice(1):``}`}function sr(e){let t=Mn(e,new Xt),n;return n=t.era===`BC`?t.year===1?`0000`:`-`+String(Math.abs(1-t.year)).padStart(6,`00`):String(t.year).padStart(4,`0`),`${n}-${String(t.month).padStart(2,`0`)}-${String(t.day).padStart(2,`0`)}`}function cr(e){return`${sr(e)}T${or(e)}`}function lr(e){let t=Math.sign(e)<0?`-`:`+`;e=Math.abs(e);let n=Math.floor(e/36e5),r=e%36e5/6e4;return`${t}${String(n).padStart(2,`0`)}:${String(r).padStart(2,`0`)}`}function ur(e){return`${cr(e)}${lr(e.offset)}[${e.timeZone}]`}function dr(e,t){if(t.has(e))throw TypeError(`Cannot initialize the same private elements twice on an object`)}function fr(e,t,n){dr(e,t),t.set(e,n)}function pr(e){let t=typeof e[0]==`object`?e.shift():new Xt,n;if(typeof e[0]==`string`)n=e.shift();else{let e=t.getEras();n=e[e.length-1]}let r=e.shift(),i=e.shift(),a=e.shift();return[t,n,r,i,a]}var mr=new WeakMap,hr=class e{copy(){return this.era?new e(this.calendar,this.era,this.year,this.month,this.day):new e(this.calendar,this.year,this.month,this.day)}add(e){return Ln(this,e)}subtract(e){return Wn(this,e)}set(e){return Gn(this,e)}cycle(e,t,n){return Zn(this,e,t,n)}toDate(e){return On(this,e)}toString(){return sr(this)}compare(e){return ln(this,e)}constructor(...e){fr(this,mr,{writable:!0,value:void 0});let[t,n,r,i,a]=pr(e);this.calendar=t,this.era=n,this.year=r,this.month=i,this.day=a,Hn(this)}},gr=new WeakMap,_r=class e{copy(){return this.era?new e(this.calendar,this.era,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond):new e(this.calendar,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond)}add(e){return Ln(this,e)}subtract(e){return Wn(this,e)}set(e){return Gn(Kn(this,e),e)}cycle(e,t,n){switch(e){case`era`:case`year`:case`month`:case`day`:return Zn(this,e,t,n);default:return Qn(this,e,t,n)}}toDate(e,t){return On(this,e,t)}toString(){return cr(this)}compare(e){let t=ln(this,e);return t===0?un(this,jn(e)):t}constructor(...e){fr(this,gr,{writable:!0,value:void 0});let[t,n,r,i,a]=pr(e);this.calendar=t,this.era=n,this.year=r,this.month=i,this.day=a,this.hour=e.shift()||0,this.minute=e.shift()||0,this.second=e.shift()||0,this.millisecond=e.shift()||0,Hn(this)}},vr=new WeakMap,yr=class e{copy(){return this.era?new e(this.calendar,this.era,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond):new e(this.calendar,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond)}add(e){return er(this,e)}subtract(e){return tr(this,e)}set(e,t){return rr(this,e,t)}cycle(e,t,n){return nr(this,e,t,n)}toDate(){return Pn(this)}toString(){return ur(this)}toAbsoluteString(){return this.toDate().toISOString()}compare(e){return this.toDate().getTime()-Nn(e,this.timeZone).toDate().getTime()}constructor(...e){fr(this,vr,{writable:!0,value:void 0});let[t,n,r,i,a]=pr(e),o=e.shift(),s=e.shift();this.calendar=t,this.era=n,this.year=r,this.month=i,this.day=a,this.timeZone=o,this.offset=s,this.hour=e.shift()||0,this.minute=e.shift()||0,this.second=e.shift()||0,this.millisecond=e.shift()||0,Hn(this)}};const br=[[1868,9,8],[1912,7,30],[1926,12,25],[1989,1,8],[2019,5,1]],xr=[[1912,7,29],[1926,12,24],[1989,1,7],[2019,4,30]],Sr=[1867,1911,1925,1988,2018],Cr=[`meiji`,`taisho`,`showa`,`heisei`,`reiwa`];function wr(e){let t=br.findIndex(([t,n,r])=>e.year=0){let[,n,r]=br[t];e.month=Math.max(n,e.month),e.month===n&&(e.day=Math.max(r,e.day))}}getEras(){return Cr}getYearsInEra(e){let t=Cr.indexOf(e.era),n=br[t],r=br[t+1];if(r==null)return 9999-n[0]+1;let i=r[0]-n[0];return(e.month0?[`minguo`,t]:[`before_minguo`,1-t]}var Pr=class extends Xt{fromJulianDay(e){let t=super.fromJulianDay(e),n=qt(t.era,t.year),[r,i]=Nr(n);return new hr(this,r,i,t.month,t.day)}toJulianDay(e){return super.toJulianDay(Fr(e))}getEras(){return[`before_minguo`,`minguo`]}balanceDate(e){let[t,n]=Nr(Mr(e));e.era=t,e.year=n}isInverseEra(e){return e.era===`before_minguo`}getDaysInMonth(e){return super.getDaysInMonth(Fr(e))}getYearsInEra(e){return e.era===`before_minguo`?9999:9999-jr}constructor(...e){super(...e),this.identifier=`roc`}};function Fr(e){let[t,n]=Jt(Mr(e));return new hr(t,n,e.month,e.day)}const Ir=1948320,Lr=[0,31,62,93,124,155,186,216,246,276,306,336];var Rr=class{fromJulianDay(e){let t=e-Ir,n=1+Math.floor((33*t+3)/12053),r=365*(n-1)+Math.floor((8*n+21)/33),i=t-r,a=i<216?Math.floor(i/31):Math.floor((i-6)/30),o=i-Lr[a]+1;return new hr(this,n,a+1,o)}toJulianDay(e){let t=Ir-1+365*(e.year-1)+Math.floor((8*e.year+21)/33);return t+=Lr[e.month-1],t+=e.day,t}getMonthsInYear(){return 12}getDaysInMonth(e){if(e.month<=6)return 31;if(e.month<=11)return 30;let t=Ut(25*e.year+11,33)<8;return t?30:29}getEras(){return[`AP`]}getYearsInEra(){return 9377}constructor(){this.identifier=`persian`}};const zr=78,Br=80;var Vr=class extends Xt{fromJulianDay(e){let t=super.fromJulianDay(e),n=t.year-zr,r=e-Gt(t.era,t.year,1,1),i;r=8&&(a+=(e.month-7)*30),a+=e.day-1,a)}getDaysInMonth(e){return e.month===1&&Kt(e.year+zr)||e.month>=2&&e.month<=6?31:30}getYearsInEra(){return 9919}getEras(){return[`saka`]}balanceDate(){}constructor(...e){super(...e),this.identifier=`indian`}};const Hr=1948440,Ur=1948439,Wr=1300,Gr=1600,Kr=460322;function qr(e,t,n,r){return r+Math.ceil(29.5*(n-1))+(t-1)*354+Math.floor((3+11*t)/30)+e-1}function Jr(e,t,n){let r=Math.floor((30*(n-t)+10646)/10631),i=Math.min(12,Math.ceil((n-(29+qr(t,r,1,1)))/29.5)+1),a=n-qr(t,r,i,1)+1;return new hr(e,r,i,a)}function Yr(e){return(14+11*e)%30<11}var Xr=class{fromJulianDay(e){return Jr(this,Hr,e)}toJulianDay(e){return qr(Hr,e.year,e.month,e.day)}getDaysInMonth(e){let t=29+e.month%2;return e.month===12&&Yr(e.year)&&t++,t}getMonthsInYear(){return 12}getDaysInYear(e){return Yr(e.year)?355:354}getYearsInEra(){return 9665}getEras(){return[`AH`]}constructor(){this.identifier=`islamic-civil`}},Zr=class extends Xr{fromJulianDay(e){return Jr(this,Ur,e)}toJulianDay(e){return qr(Ur,e.year,e.month,e.day)}constructor(...e){super(...e),this.identifier=`islamic-tbla`}};const Qr=`qgpUDckO1AbqBmwDrQpVBakGkgepC9QF2gpcBS0NlQZKB1QLagutBa4ETwoXBYsGpQbVCtYCWwmdBE0KJg2VDawFtgm6AlsKKwWVCsoG6Qr0AnYJtgJWCcoKpAvSC9kF3AJtCU0FpQpSC6ULtAW2CVcFlwJLBaMGUgdlC2oFqworBZUMSg2lDcoF1gpXCasESwmlClILagt1BXYCtwhbBFUFqQW0BdoJ3QRuAjYJqgpUDbIN1QXaAlsJqwRVCkkLZAtxC7QFtQpVCiUNkg7JDtQG6QprCasEkwpJDaQNsg25CroEWworBZUKKgtVC1wFvQQ9Ah0JlQpKC1oLbQW2AjsJmwRVBqkGVAdqC2wFrQpVBSkLkgupC9QF2gpaBasKlQVJB2QHqgu1BbYCVgpNDiULUgtqC60FrgIvCZcESwalBqwG1gpdBZ0ETQoWDZUNqgW1BdoCWwmtBJUFygbkBuoK9QS2AlYJqgpUC9IL2QXqAm0JrQSVCkoLpQuyBbUJ1gSXCkcFkwZJB1ULagVrCisFiwpGDaMNygXWCtsEawJLCaUKUgtpC3UFdgG3CFsCKwVlBbQF2gntBG0BtgimClINqQ3UBdoKWwmrBFMGKQdiB6kLsgW1ClUFJQuSDckO0gbpCmsFqwRVCikNVA2qDbUJugQ7CpsETQqqCtUK2gJdCV4ELgqaDFUNsga5BroEXQotBZUKUguoC7QLuQXaAloJSgukDdEO6AZqC20FNQWVBkoNqA3UDdoGWwWdAisGFQtKC5ULqgWuCi4JjwwnBZUGqgbWCl0FnQI=`;let $r,ei;function ti(e){return Kr+ei[e-Wr]}function ni(e,t){let n=e-Wr,r=1<<11-(t-1);return($r[n]&r)===0?29:30}function ri(e,t){let n=ti(e);for(let r=1;rr)return super.fromJulianDay(e);{let e=Wr-1,n=1,r=1;for(;r>0;){e++,r=t-ti(e)+1;let i=ii(e);if(r===i){n=12;break}else if(rt;)r-=t,n++,t=ni(e,n);break}}return new hr(this,e,n,t-ri(e,n)+1)}}toJulianDay(e){return e.yearGr?super.toJulianDay(e):Hr+ri(e.year,e.month)+(e.day-1)}getDaysInMonth(e){return e.yearGr?super.getDaysInMonth(e):ni(e.year,e.month)}getDaysInYear(e){return e.yearGr?super.getDaysInYear(e):ii(e.year)}constructor(){if(super(),this.identifier=`islamic-umalqura`,$r||=new Uint16Array(Uint8Array.from(atob(Qr),e=>e.charCodeAt(0)).buffer),!ei){ei=new Uint32Array(Gr-Wr+1);let e=0;for(let t=Wr;t<=Gr;t++){ei[t-Wr]=e;for(let n=1;n<=12;n++)e+=ni(t,n)}}}};const oi=347997,si=1080,ci=24*si,li=29,ui=12*si+793,di=li*ci+ui;function fi(e){return Ut(e*7+1,19)<7}function pi(e){let t=Math.floor((235*e-234)/19),n=12084+13753*t,r=t*29+Math.floor(n/25920);return Ut(3*(r+1),7)<3&&(r+=1),r}function mi(e){let t=pi(e-1),n=pi(e),r=pi(e+1);return r-n===356?2:n-t===382?1:0}function hi(e){return pi(e)+mi(e)}function gi(e){return hi(e+1)-hi(e)}function _i(e){let t=gi(e);switch(t>380&&(t-=30),t){case 353:return 0;case 354:return 1;case 355:return 2}}function vi(e,t){if(t>=6&&!fi(e)&&t++,t===4||t===7||t===9||t===11||t===13)return 29;let n=_i(e);return t===2?n===2?30:29:t===3?n===0?29:30:t===6?fi(e)?30:0:30}var yi=class{fromJulianDay(e){let t=e-oi,n=t*ci/di,r=Math.floor((19*n+234)/235)+1,i=hi(r),a=Math.floor(t-i);for(;a<1;)r--,i=hi(r),a=Math.floor(t-i);let o=1,s=0;for(;s6?e.month--:!fi(t.year)&&fi(e.year)&&t.month>6&&e.month++)}constructor(){this.identifier=`hebrew`}};const bi=1723856,xi=1824665,Si=5500;function Ci(e,t,n,r){return e+365*t+Math.floor(t/4)+30*(n-1)+r-1}function wi(e,t){let n=Math.floor(4*(t-e)/1461),r=1+Math.floor((t-Ci(e,n,1,1))/30),i=t+1-Ci(e,n,r,1);return[n,r,i]}function Ti(e){return Math.floor(e%4/3)}function Ei(e,t){return t%13==0?Ti(e)+5:30}var Di=class{fromJulianDay(e){let[t,n,r]=wi(bi,e),i=`AM`;return t<=0&&(i=`AA`,t+=Si),new hr(this,i,t,n,r)}toJulianDay(e){let t=e.year;return e.era===`AA`&&(t-=Si),Ci(bi,t,e.month,e.day)}getDaysInMonth(e){return Ei(e.year,e.month)}getMonthsInYear(){return 13}getDaysInYear(e){return 365+Ti(e.year)}getYearsInEra(e){return e.era===`AA`?9999:9991}getEras(){return[`AA`,`AM`]}constructor(){this.identifier=`ethiopic`}},Oi=class extends Di{fromJulianDay(e){let[t,n,r]=wi(bi,e);return t+=Si,new hr(this,`AA`,t,n,r)}getEras(){return[`AA`]}getYearsInEra(){return 9999}constructor(...e){super(...e),this.identifier=`ethioaa`}},ki=class extends Di{fromJulianDay(e){let[t,n,r]=wi(xi,e),i=`CE`;return t<=0&&(i=`BCE`,t=1-t),new hr(this,i,t,n,r)}toJulianDay(e){let t=e.year;return e.era===`BCE`&&(t=1-t),Ci(xi,t,e.month,e.day)}getDaysInMonth(e){let t=e.year;return e.era===`BCE`&&(t=1-t),Ei(t,e.month)}isInverseEra(e){return e.era===`BCE`}balanceDate(e){e.year<=0&&(e.era=e.era===`BCE`?`CE`:`BCE`,e.year=1-e.year)}getEras(){return[`BCE`,`CE`]}getYearsInEra(e){return e.era===`BCE`?9999:9715}constructor(...e){super(...e),this.identifier=`coptic`}};function Ai(e){switch(e){case`buddhist`:return new kr;case`ethiopic`:return new Di;case`ethioaa`:return new Oi;case`coptic`:return new ki;case`hebrew`:return new yi;case`indian`:return new Vr;case`islamic-civil`:return new Xr;case`islamic-tbla`:return new Zr;case`islamic-umalqura`:return new ai;case`japanese`:return new Er;case`persian`:return new Rr;case`roc`:return new Pr;case`gregory`:default:return new Xt}}let ji=new Map;var Mi=class{format(e){return this.formatter.format(e)}formatToParts(e){return this.formatter.formatToParts(e)}formatRange(e,t){if(typeof this.formatter.formatRange==`function`)return this.formatter.formatRange(e,t);if(t= start date`);return`${this.formatter.format(e)} \u{2013} ${this.formatter.format(t)}`}formatRangeToParts(e,t){if(typeof this.formatter.formatRangeToParts==`function`)return this.formatter.formatRangeToParts(e,t);if(t= start date`);let n=this.formatter.formatToParts(e),r=this.formatter.formatToParts(t);return[...n.map(e=>({...e,source:`startRange`})),{type:`literal`,value:` – `,source:`shared`},...r.map(e=>({...e,source:`endRange`}))]}resolvedOptions(){let e=this.formatter.resolvedOptions();return Ri()&&(this.resolvedHourCycle||=zi(e.locale,this.options),e.hourCycle=this.resolvedHourCycle,e.hour12=this.resolvedHourCycle===`h11`||this.resolvedHourCycle===`h12`),e.calendar===`ethiopic-amete-alem`&&(e.calendar=`ethioaa`),e}constructor(e,t={}){this.formatter=Pi(e,t),this.options=t}};const Ni={true:{ja:`h11`},false:{}};function Pi(e,t={}){if(typeof t.hour12==`boolean`&&Ii()){t={...t};let n=Ni[String(t.hour12)][e.split(`-`)[0]],r=t.hour12?`h12`:`h23`;t.hourCycle=n??r,delete t.hour12}let n=e+(t?Object.entries(t).sort((e,t)=>e[0]e.type===`hour`).value,10),i=parseInt(n.formatToParts(new Date(2020,2,3,23)).find(e=>e.type===`hour`).value,10);if(r===0&&i===23)return`h23`;if(r===24&&i===23)return`h24`;if(r===0&&i===11)return`h11`;if(r===12&&i===11)return`h12`;throw Error(`Unexpected hour cycle result`)}let Bi=new Map,Vi=!1;try{Vi=new Intl.NumberFormat(`de-DE`,{signDisplay:`exceptZero`}).resolvedOptions().signDisplay===`exceptZero`}catch{}let Hi=!1;try{Hi=new Intl.NumberFormat(`de-DE`,{style:`unit`,unit:`degree`}).resolvedOptions().style===`unit`}catch{}const Ui={degree:{narrow:{default:`°`,"ja-JP":` 度`,"zh-TW":`度`,"sl-SI":` °`}}};var Wi=class{format(e){let t=``;if(t=!Vi&&this.options.signDisplay!=null?Ki(this.numberFormatter,this.options.signDisplay,e):this.numberFormatter.format(e),this.options.style===`unit`&&!Hi){var n;let{unit:e,unitDisplay:r=`short`,locale:i}=this.resolvedOptions();if(!e)return t;let a=(n=Ui[e])?.[r];t+=a[i]||a.default}return t}formatToParts(e){return this.numberFormatter.formatToParts(e)}formatRange(e,t){if(typeof this.numberFormatter.formatRange==`function`)return this.numberFormatter.formatRange(e,t);if(t= start date`);return`${this.format(e)} \u{2013} ${this.format(t)}`}formatRangeToParts(e,t){if(typeof this.numberFormatter.formatRangeToParts==`function`)return this.numberFormatter.formatRangeToParts(e,t);if(t= start date`);let n=this.numberFormatter.formatToParts(e),r=this.numberFormatter.formatToParts(t);return[...n.map(e=>({...e,source:`startRange`})),{type:`literal`,value:` – `,source:`shared`},...r.map(e=>({...e,source:`endRange`}))]}resolvedOptions(){let e=this.numberFormatter.resolvedOptions();return!Vi&&this.options.signDisplay!=null&&(e={...e,signDisplay:this.options.signDisplay}),!Hi&&this.options.style===`unit`&&(e={...e,style:`unit`,unit:this.options.unit,unitDisplay:this.options.unitDisplay}),e}constructor(e,t={}){this.numberFormatter=Gi(e,t),this.options=t}};function Gi(e,t={}){let{numberingSystem:n}=t;if(n&&e.includes(`-nu-`)&&(e.includes(`-u-`)||(e+=`-u-`),e+=`-nu-${n}`),t.style===`unit`&&!Hi){var r;let{unit:e,unitDisplay:n=`short`}=t;if(!e)throw Error(`unit option must be provided with style: "unit"`);if(!(r=Ui[e])?.[n])throw Error(`Unsupported unit ${e} with unitDisplay = ${n}`);t={...t,style:`decimal`}}let i=e+(t?Object.entries(t).sort((e,t)=>e[0]0||Object.is(n,0):t===`exceptZero`&&(Object.is(n,-0)||Object.is(n,0)?n=Math.abs(n):r=n>0),r){let t=e.format(-n),r=e.format(n),i=t.replace(r,``).replace(/\u200e|\u061C/,``);[...i].length!==1&&console.warn(`@react-aria/i18n polyfill for NumberFormat signDisplay: Unsupported case`);let a=t.replace(r,`!!!`).replace(i,`+`).replace(`!!!`,r);return a}else return e.format(n)}}const qi=RegExp(`^.*\\(.*\\).*$`),Ji=[`latn`,`arab`,`hanidec`,`deva`,`beng`];var Yi=class{parse(e){return Zi(this.locale,this.options,e).parse(e)}isValidPartialNumber(e,t,n){return Zi(this.locale,this.options,e).isValidPartialNumber(e,t,n)}getNumberingSystem(e){return Zi(this.locale,this.options,e).options.numberingSystem}constructor(e,t={}){this.locale=e,this.options=t}};const Xi=new Map;function Zi(e,t,n){let r=Qi(e,t);if(!e.includes(`-nu-`)&&!r.isValidPartialNumber(n)){for(let i of Ji)if(i!==r.options.numberingSystem){let r=Qi(e+(e.includes(`-u-`)?`-nu-`:`-u-nu-`)+i,t);if(r.isValidPartialNumber(n))return r}}return r}function Qi(e,t){let n=e+(t?Object.entries(t).sort((e,t)=>e[0]-1&&(t=`-${t}`)}let n=t?+t:NaN;if(isNaN(n))return NaN;if(this.options.style===`percent`){var r,i;let e={...this.options,style:`decimal`,minimumFractionDigits:Math.min(((r=this.options.minimumFractionDigits)??0)+2,20),maximumFractionDigits:Math.min(((i=this.options.maximumFractionDigits)??0)+2,20)};return new Yi(this.locale,e).parse(new Wi(this.locale,e).format(n))}return this.options.currencySign===`accounting`&&qi.test(e)&&(n=-1*n),n}sanitize(e){return e=e.replace(this.symbols.literals,``),this.symbols.minusSign&&(e=e.replace(`-`,this.symbols.minusSign)),this.options.numberingSystem===`arab`&&(this.symbols.decimal&&(e=e.replace(`,`,this.symbols.decimal),e=e.replace(`،`,this.symbols.decimal)),this.symbols.group&&(e=ra(e,`.`,this.symbols.group))),this.options.locale===`fr-FR`&&(e=ra(e,`.`,` `)),e}isValidPartialNumber(e,t=-1/0,n=1/0){return e=this.sanitize(e),this.symbols.minusSign&&e.startsWith(this.symbols.minusSign)&&t<0?e=e.slice(this.symbols.minusSign.length):this.symbols.plusSign&&e.startsWith(this.symbols.plusSign)&&n>0&&(e=e.slice(this.symbols.plusSign.length)),this.symbols.group&&e.startsWith(this.symbols.group)||this.symbols.decimal&&e.indexOf(this.symbols.decimal)>-1&&this.options.maximumFractionDigits===0?!1:(this.symbols.group&&(e=ra(e,this.symbols.group,``)),e=e.replace(this.symbols.numeral,``),this.symbols.decimal&&(e=e.replace(this.symbols.decimal,``)),e.length===0)}constructor(e,t={}){this.locale=e,this.formatter=new Intl.NumberFormat(e,t),this.options=this.formatter.resolvedOptions(),this.symbols=na(e,this.formatter,this.options,t);var n,r;this.options.style===`percent`&&(((n=this.options.minimumFractionDigits)??0)>18||((r=this.options.maximumFractionDigits)??0)>18)&&console.warn(`NumberParser cannot handle percentages with greater than 18 decimal places, please reduce the number in your options.`)}};const ea=new Set([`decimal`,`fraction`,`integer`,`minusSign`,`plusSign`,`group`]),ta=[0,4,2,1,11,20,3,7,100,21,.1,1.1];function na(e,t,n,r){var i,a,o,s;let c=new Intl.NumberFormat(e,{...n,minimumSignificantDigits:1,maximumSignificantDigits:21,roundingIncrement:1,roundingPriority:`auto`,roundingMode:`halfExpand`}),l=c.formatToParts(-10000.111),u=c.formatToParts(10000.111),d=ta.map(e=>c.formatToParts(e));var f;let p=(f=(i=l.find(e=>e.type===`minusSign`))?.value)??`-`,m=(a=u.find(e=>e.type===`plusSign`))?.value;!m&&(r?.signDisplay===`exceptZero`||r?.signDisplay===`always`)&&(m=`+`);let h=new Intl.NumberFormat(e,{...n,minimumFractionDigits:2,maximumFractionDigits:2}).formatToParts(.001),g=(o=h.find(e=>e.type===`decimal`))?.value,_=(s=l.find(e=>e.type===`group`))?.value,v=l.filter(e=>!ea.has(e.type)).map(e=>ia(e.value)),y=d.flatMap(e=>e.filter(e=>!ea.has(e.type)).map(e=>ia(e.value))),b=[...new Set([...v,...y])].sort((e,t)=>t.length-e.length),x=b.length===0?RegExp(`[\\p{White_Space}]`,`gu`):RegExp(`${b.join(`|`)}|[\\p{White_Space}]`,`gu`),S=[...new Intl.NumberFormat(n.locale,{useGrouping:!1}).format(9876543210)].reverse(),C=new Map(S.map((e,t)=>[e,t])),w=RegExp(`[${S.join(``)}]`,`g`),T=e=>String(C.get(e));return{minusSign:p,plusSign:m,decimal:g,group:_,literals:x,numeral:w,index:T}}function ra(e,t,n){return e.replaceAll?e.replaceAll(t,n):e.split(t).join(n)}function ia(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function aa(e,t){let n=[];for(let r=0;r0}function pa(e,t){return e.compare(t)<=0}function ma(e,t){return e.compare(t)>=0}function ha(e,t,n){return ma(e,t)&&pa(e,n)}function ga(e,t,n){return fa(e,t)&&da(e,n)}function _a(e,t,n){let r=on(e,n);return t>r?e.subtract({days:r+7-t}):t===r?e:e.subtract({days:r-t})}function va(e,t,n){let r=on(e,n),i=t===0?6:t-1;return r===i?e:r>i?e.add({days:7-r+i}):e.add({days:i-r})}function ya(e,t,n,r){if(n===void 0&&r===void 0)return!0;let i=e.add({days:1});if(r!=null&&r(i)||n!=null&&n(i))return!1;let a=t;for(;i.compare(a)<0;)if(i=i.add({days:1}),r!=null&&r(i)||n!=null&&n(i))return!1;return!0}function ba(e,t){let n=[],r=e.add({days:1}),i=t;for(;r.compare(i)<0;)n.push(r),r=r.add({days:1});return n}function xa(e){let{dateObj:t,weekStartsOn:n,fixedWeeks:r,locale:i}=e,a=ua(t),o=Array.from({length:a},(e,n)=>t.set({day:n+1})),s=mn(t),c=hn(t),l=_a(s,n,i),u=va(c,n,i),d=ba(l.subtract({days:1}),s),f=ba(c,u.add({days:1})),p=d.length+o.length+f.length;if(r&&p<42){let e=42-p,n=f[f.length-1];n||=hn(t);let r=Array.from({length:e},(e,t)=>{let r=t+1;return n.add({days:r})});f.push(...r)}let m=d.concat(o,f),h=aa(m,7);return{value:t,cells:m,rows:h}}function Sa(e){let{numberOfMonths:t,dateObj:n,...r}=e,i=[];if(!t||t===1)return i.push(xa({...r,dateObj:n})),i;i.push(xa({...r,dateObj:n}));for(let e=1;e{let n=y(r,t);if(n||n===null)return n;throw Error(`Injection \`${r.toString()}\` not found. Component must be used within ${Array.isArray(e)?`one of the following components: ${e.join(`, `)}`:`\`${e}\``}`)},e=>(F(r,e),e)]}function Ca(e,t,n){let r=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&r.addEventListener(e,t,{once:!0}),r.dispatchEvent(i)}function wa(e,t=-1/0,n=1/0){return Math.min(n,Math.max(t,e))}function Ta(e,t){let n=e,r=t.toString(),i=r.indexOf(`.`),a=i>=0?r.length-i:0;if(a>0){let e=10**a;n=Math.round(n*e)/e}return n}function Ea(e,t,n,r){t=Number(t),n=Number(n);let i=(e-(Number.isNaN(t)?0:t))%r,a=Ta(Math.abs(i)*2>=r?e+Math.sign(i)*(r-Math.abs(i)):e-i,r);return Number.isNaN(t)?!Number.isNaN(n)&&a>n&&(a=Math.floor(Ta(n/r,r))*r):an&&(a=t+Math.floor(Ta((n-t)/r,r))*r),a=Ta(a,r),a}function Da(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,`default`)?e.default:e}var Oa=function e(t,n){if(t===n)return!0;if(t&&n&&typeof t==`object`&&typeof n==`object`){if(t.constructor!==n.constructor)return!1;var r,i,a;if(Array.isArray(t)){if(r=t.length,r!=n.length)return!1;for(i=r;i--!==0;)if(!e(t[i],n[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if(a=Object.keys(t),r=a.length,r!==Object.keys(n).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(n,a[i]))return!1;for(i=r;i--!==0;){var o=a[i];if(!e(t[o],n[o]))return!1}return!0}return t!==t&&n!==n};const ka=Da(Oa);function Aa(e,t){if(e.length!==t.length)return!1;for(let n=0;nka(e,t)),i=e.findIndex(e=>ka(e,n));if(r===-1||i===-1)return[];let[a,o]=[r,i].sort((e,t)=>e-t);return e.slice(a,o+1)}const Ma=typeof document<`u`;function Na(e){return e==null}function Pa(e){let{defaultValue:t,defaultPlaceholder:n,granularity:r=`day`,locale:i=`en`}=e;if(Array.isArray(t)&&t.length)return t.at(-1).copy();if(t&&!Array.isArray(t))return t.copy();if(n)return n.copy();let a=new Date,o=a.getFullYear(),s=a.getMonth()+1,c=a.getDate(),l=[`hour`,`minute`,`second`],u=new Mi(i),d=Ai(u.resolvedOptions().calendar);return l.includes(r??`day`)?Mn(new _r(o,s,c,0,0,0),d):Mn(new hr(o,s,c),d)}const Fa=`ach.af.am.an.ar.ast.az.be.bg.bn.br.bs.ca.cak.ckb.cs.cy.da.de.dsb.el.en.eo.es.et.eu.fa.ff.fi.fr.fy.ga.gd.gl.he.hr.hsb.hu.ia.id.it.ja.ka.kk.kn.ko.lb.lo.lt.lv.meh.ml.ms.nl.nn.no.oc.pl.pt.rm.ro.ru.sc.scn.sk.sl.sr.sv.szl.tg.th.tr.uk.zh-CN.zh-TW`.split(`.`),Ia=[`year`,`month`,`day`],La={ach:{year:`mwaka`,month:`dwe`,day:`nino`},af:{year:`jjjj`,month:`mm`,day:`dd`},am:{year:`ዓዓዓዓ`,month:`ሚሜ`,day:`ቀቀ`},an:{year:`aaaa`,month:`mm`,day:`dd`},ar:{year:`سنة`,month:`شهر`,day:`يوم`},ast:{year:`aaaa`,month:`mm`,day:`dd`},az:{year:`iiii`,month:`aa`,day:`gg`},be:{year:`гггг`,month:`мм`,day:`дд`},bg:{year:`гггг`,month:`мм`,day:`дд`},bn:{year:`yyyy`,month:`মিমি`,day:`dd`},br:{year:`bbbb`,month:`mm`,day:`dd`},bs:{year:`gggg`,month:`mm`,day:`dd`},ca:{year:`aaaa`,month:`mm`,day:`dd`},cak:{year:`jjjj`,month:`ii`,day:`q'q'`},ckb:{year:`ساڵ`,month:`مانگ`,day:`ڕۆژ`},cs:{year:`rrrr`,month:`mm`,day:`dd`},cy:{year:`bbbb`,month:`mm`,day:`dd`},da:{year:`åååå`,month:`mm`,day:`dd`},de:{year:`jjjj`,month:`mm`,day:`tt`},dsb:{year:`llll`,month:`mm`,day:`źź`},el:{year:`εεεε`,month:`μμ`,day:`ηη`},en:{year:`yyyy`,month:`mm`,day:`dd`},eo:{year:`jjjj`,month:`mm`,day:`tt`},es:{year:`aaaa`,month:`mm`,day:`dd`},et:{year:`aaaa`,month:`kk`,day:`pp`},eu:{year:`uuuu`,month:`hh`,day:`ee`},fa:{year:`سال`,month:`ماه`,day:`روز`},ff:{year:`hhhh`,month:`ll`,day:`ññ`},fi:{year:`vvvv`,month:`kk`,day:`pp`},fr:{year:`aaaa`,month:`mm`,day:`jj`},fy:{year:`jjjj`,month:`mm`,day:`dd`},ga:{year:`bbbb`,month:`mm`,day:`ll`},gd:{year:`bbbb`,month:`mm`,day:`ll`},gl:{year:`aaaa`,month:`mm`,day:`dd`},he:{year:`שנה`,month:`חודש`,day:`יום`},hr:{year:`gggg`,month:`mm`,day:`dd`},hsb:{year:`llll`,month:`mm`,day:`dd`},hu:{year:`éééé`,month:`hh`,day:`nn`},ia:{year:`aaaa`,month:`mm`,day:`dd`},id:{year:`tttt`,month:`bb`,day:`hh`},it:{year:`aaaa`,month:`mm`,day:`gg`},ja:{year:` 年 `,month:`月`,day:`日`},ka:{year:`წწწწ`,month:`თთ`,day:`რრ`},kk:{year:`жжжж`,month:`аа`,day:`кк`},kn:{year:`ವವವವ`,month:`ಮಿಮೀ`,day:`ದಿದಿ`},ko:{year:`연도`,month:`월`,day:`일`},lb:{year:`jjjj`,month:`mm`,day:`dd`},lo:{year:`ປປປປ`,month:`ດດ`,day:`ວວ`},lt:{year:`mmmm`,month:`mm`,day:`dd`},lv:{year:`gggg`,month:`mm`,day:`dd`},meh:{year:`aaaa`,month:`mm`,day:`dd`},ml:{year:`വർഷം`,month:`മാസം`,day:`തീയതി`},ms:{year:`tttt`,month:`mm`,day:`hh`},nl:{year:`jjjj`,month:`mm`,day:`dd`},nn:{year:`åååå`,month:`mm`,day:`dd`},no:{year:`åååå`,month:`mm`,day:`dd`},oc:{year:`aaaa`,month:`mm`,day:`jj`},pl:{year:`rrrr`,month:`mm`,day:`dd`},pt:{year:`aaaa`,month:`mm`,day:`dd`},rm:{year:`oooo`,month:`mm`,day:`dd`},ro:{year:`aaaa`,month:`ll`,day:`zz`},ru:{year:`гггг`,month:`мм`,day:`дд`},sc:{year:`aaaa`,month:`mm`,day:`dd`},scn:{year:`aaaa`,month:`mm`,day:`jj`},sk:{year:`rrrr`,month:`mm`,day:`dd`},sl:{year:`llll`,month:`mm`,day:`dd`},sr:{year:`гггг`,month:`мм`,day:`дд`},sv:{year:`åååå`,month:`mm`,day:`dd`},szl:{year:`rrrr`,month:`mm`,day:`dd`},tg:{year:`сссс`,month:`мм`,day:`рр`},th:{year:`ปปปป`,month:`ดด`,day:`วว`},tr:{year:`yyyy`,month:`aa`,day:`gg`},uk:{year:`рррр`,month:`мм`,day:`дд`},"zh-CN":{year:`年`,month:`月`,day:`日`},"zh-TW":{year:`年`,month:`月`,day:`日`}};function Ra(e){if(Ba(e))return La[e];{let t=Wa(e);return Ba(t)?La[t]:La.en}}function za(e,t,n){return Va(e)?Ra(n)[e]:Ua(e)?t:Ha(e)?`––`:``}function Ba(e){return Fa.includes(e)}function Va(e){return Ia.includes(e)}function Ha(e){return e===`hour`||e===`minute`||e===`second`}function Ua(e){return e===`era`||e===`dayPeriod`}function Wa(e){return Intl.Locale?new Intl.Locale(e).language:e.split(`-`)[0]}const Ga=[`day`,`month`,`year`],Ka=[`hour`,`minute`,`second`,`dayPeriod`],qa=[...Ga,...Ka];function Ja(e){return Ga.includes(e)}function Ya(e){return qa.includes(e)}function Xa(e,t){let n={year:`numeric`,month:`2-digit`,day:`2-digit`,hour:`2-digit`,minute:`2-digit`,second:`2-digit`,timeZoneName:`short`,hourCycle:t===24?`h24`:void 0,hour12:t===24?!1:void 0};return e===`day`&&(delete n.second,delete n.hour,delete n.minute,delete n.timeZoneName),e===`hour`&&(delete n.minute,delete n.second),e===`minute`&&delete n.second,n}function Za(e){let t=e.querySelector(`[data-selected]`);if(t)return t.focus();let n=e.querySelector(`[data-today]`);if(n)return n.focus();let r=e.querySelector(`[data-radix-vue-calendar-day]`);if(r)return r.focus()}function Qa(e,t){var n;let r=ie();return H(()=>{r.value=e()},{...t,flush:(n=void 0,`sync`)}),ee(r)}function $a(e,t){let n,r,i,a=L(!0),o=()=>{a.value=!0,i()};V(e,o,{flush:`sync`});let s=typeof t==`function`?t:t.get,c=typeof t==`function`?void 0:t.set,l=f((e,t)=>(r=e,i=t,{get(){return a.value&&(n=s(),a.value=!1),r(),n},set(e){c?.(e)}}));return Object.isExtensible(l)&&(l.trigger=o),l}function eo(e){return g()?(j(e),!0):!1}function to(){let e=new Set,t=t=>{e.delete(t)};return{on:n=>{e.add(n);let r=()=>t(n);return eo(r),{off:r}},off:t,trigger:(...t)=>Promise.all(Array.from(e).map(e=>e(...t)))}}function no(e){let t=!1,n,r=m(!0);return(...i)=>(t||(n=r.run(()=>e(...i)),t=!0),n)}function ro(e){let t=0,n,r,i=()=>{--t,r&&t<=0&&(r.stop(),n=void 0,r=void 0)};return(...a)=>(t+=1,n||(r=m(!0),n=r.run(()=>e(...a))),eo(i),n)}function io(e){return typeof e==`function`?e():B(e)}function ao(e){if(!b(e))return I(e);let t=new Proxy({},{get(t,n,r){return B(Reflect.get(e.value,n,r))},set(t,n,r){return b(e.value[n])&&!b(r)?e.value[n].value=r:e.value[n]=r,!0},deleteProperty(t,n){return Reflect.deleteProperty(e.value,n)},has(t,n){return Reflect.has(e.value,n)},ownKeys(){return Object.keys(e.value)},getOwnPropertyDescriptor(){return{enumerable:!0,configurable:!0}}});return I(t)}function oo(e){return ao(a(e))}const so=typeof window<`u`&&typeof document<`u`;typeof WorkerGlobalScope<`u`&&globalThis instanceof WorkerGlobalScope;const co=e=>typeof e<`u`,lo=e=>e!=null,uo=Object.prototype.toString,fo=e=>uo.call(e)===`[object Object]`,po=()=>{},mo=ho();function ho(){var e,t;return so&&(e=window==null?void 0:window.navigator)?.userAgent&&(/iP(?:ad|hone|od)/.test(window.navigator.userAgent)||(t=window==null?void 0:window.navigator)?.maxTouchPoints>2&&/iPad|Macintosh/.test(window==null?void 0:window.navigator.userAgent))}function go(e,t){function n(...n){return new Promise((r,i)=>{Promise.resolve(e(()=>t.apply(this,n),{fn:t,thisArg:this,args:n})).then(r).catch(i)})}return n}function _o(e,t={}){let n,r,i=po,a=e=>{clearTimeout(e),i(),i=po};return o=>{let s=io(e),c=io(t.maxWait);return n&&a(n),s<=0||c!==void 0&&c<=0?(r&&(a(r),r=null),Promise.resolve(o())):new Promise((e,l)=>{i=t.rejectOnCancel?l:e,c&&!r&&(r=setTimeout(()=>{n&&a(n),r=null,e(o())},c)),n=setTimeout(()=>{r&&a(r),r=null,e(o())},s)})}}function vo(e){return h()}function yo(e,t=1e4){return f((n,r)=>{let i=io(e),a,o=()=>setTimeout(()=>{i=io(e),r()},io(t));return eo(()=>{clearTimeout(a)}),{get(){return n(),i},set(e){i=e,r(),clearTimeout(a),a=o()}}})}function bo(e,t=200,n={}){return go(_o(t,n),e)}function xo(e,t){vo()&&O(e,t)}function So(e,t=!0,n){vo()?A(e,n):t?e():w(e)}function Co(e,t,n={}){let{immediate:r=!0}=n,i=L(!1),a=null;function o(){a&&(clearTimeout(a),a=null)}function s(){i.value=!1,o()}function c(...n){o(),i.value=!0,a=setTimeout(()=>{i.value=!1,a=null,e(...n)},io(t))}return r&&(i.value=!0,so&&c()),eo(s),{isPending:ee(i),start:c,stop:s}}function wo(e=1e3,t={}){let{controls:n=!1,callback:r}=t,i=Co(r??po,e,t),o=a(()=>!i.isPending.value);return n?{ready:o,...i}:o}function To(e,t,n){let r=V(e,(...e)=>(w(()=>r()),t(...e)),n);return r}function Eo(e){var t;let n=io(e);return(t=n?.$el)??n}const Do=so?window:void 0;function Oo(...e){let t,n,r,i;if(typeof e[0]==`string`||Array.isArray(e[0])?([n,r,i]=e,t=Do):[t,n,r,i]=e,!t)return po;Array.isArray(n)||(n=[n]),Array.isArray(r)||(r=[r]);let a=[],o=()=>{a.forEach(e=>e()),a.length=0},s=(e,t,n,r)=>(e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)),c=V(()=>[Eo(t),io(i)],([e,t])=>{if(o(),!e)return;let i=fo(t)?{...t}:t;a.push(...n.flatMap(t=>r.map(n=>s(e,t,n,i))))},{immediate:!0,flush:`post`}),l=()=>{c(),o()};return eo(l),l}function ko(e){return typeof e==`function`?e:typeof e==`string`?t=>t.key===e:Array.isArray(e)?t=>e.includes(t.key):()=>!0}function Ao(...e){let t,n,r={};e.length===3?(t=e[0],n=e[1],r=e[2]):e.length===2?typeof e[1]==`object`?(t=!0,n=e[0],r=e[1]):(t=e[0],n=e[1]):(t=!0,n=e[0]);let{target:i=Do,eventName:a=`keydown`,passive:o=!1,dedupe:s=!1}=r,c=ko(t);return Oo(i,a,e=>{e.repeat&&io(s)||c(e)&&n(e)},o)}function jo(){let e=L(!1),t=h();return t&&A(()=>{e.value=!0},t),e}function Mo(e){let t=jo();return a(()=>(t.value,!!e()))}function No(e,t,n={}){let{window:r=Do,...i}=n,o,s=Mo(()=>r&&`MutationObserver`in r),c=()=>{o&&(o.disconnect(),o=void 0)},l=a(()=>{let t=io(e),n=(Array.isArray(t)?t:[t]).map(Eo).filter(lo);return new Set(n)}),u=V(()=>l.value,e=>{c(),s.value&&e.size&&(o=new MutationObserver(t),e.forEach(e=>o.observe(e,i)))},{immediate:!0,flush:`post`}),d=()=>o?.takeRecords(),f=()=>{c(),u()};return eo(f),{isSupported:s,stop:f,takeRecords:d}}function Po(e={}){var t;let{window:n=Do,deep:r=!0,triggerOnRemoval:i=!1}=e,a=(t=e.document)??n?.document,o=()=>{var e;let t=a?.activeElement;if(r)for(;t!=null&&t.shadowRoot;)t=(e=t?.shadowRoot)?.activeElement;return t},s=L(),c=()=>{s.value=o()};return n&&(Oo(n,`blur`,e=>{e.relatedTarget===null&&c()},!0),Oo(n,`focus`,c,!0)),i&&No(a,e=>{e.filter(e=>e.removedNodes.length).map(e=>Array.from(e.removedNodes)).flat().forEach(e=>{e===s.value&&c()})},{childList:!0,subtree:!0}),c(),s}function Fo(e,t={}){let{immediate:n=!0,fpsLimit:r=void 0,window:i=Do}=t,a=L(!1),o=r?1e3/r:null,s=0,c=null;function l(t){if(!a.value||!i)return;s||=t;let n=t-s;if(o&&nnull,()=>t.proxy.$el);return N(n.trigger),A(n.trigger),n}function Ro(e,t,n={}){let{window:r=Do,...i}=n,o,s=Mo(()=>r&&`ResizeObserver`in r),c=()=>{o&&(o.disconnect(),o=void 0)},l=a(()=>Array.isArray(e)?e.map(e=>Eo(e)):[Eo(e)]),u=V(l,e=>{if(c(),s.value&&r){o=new ResizeObserver(t);for(let t of e)t&&o.observe(t,i)}},{immediate:!0,flush:`post`}),d=()=>{c(),u()};return eo(d),{isSupported:s,stop:d}}function zo(e,t={}){let n=Po(t),r=a(()=>Eo(e));return{focused:a(()=>r.value&&n.value?r.value.contains(n.value):!1)}}function Bo(e=Lo()){let t=ie(),n=()=>{let n=Eo(e);n&&(t.value=n.parentElement)};return So(n),V(()=>io(e),n),t}function q(e,t,n,r={}){var i,o,s;let{clone:c=!1,passive:l=!1,eventName:u,deep:d=!1,defaultValue:f,shouldEmit:p}=r,m=h(),g=n||m?.emit||(i=m?.$emit)?.bind(m)||(s=(o=m?.proxy)?.$emit)?.bind(m?.proxy),_=u;t||=`modelValue`,_||=`update:${t.toString()}`;let v=e=>c?typeof c==`function`?c(e):Io(e):e,y=()=>co(e[t])?v(e[t]):f,b=e=>{p?p(e)&&g(_,e):g(_,e)};if(l){let n=y(),r=L(n),i=!1;return V(()=>e[t],e=>{i||(i=!0,r.value=v(e),w(()=>i=!1))}),V(r,n=>{!i&&(n!==e[t]||d)&&b(n)},{deep:d}),r}else return a({get(){return y()},set(e){b(e)}})}function Vo(e){return e?e.flatMap(e=>e.type===t?Vo(e.children):[e]):[]}function J(){let e=document.activeElement;if(e==null)return null;for(;e!=null&&e.shadowRoot!=null&&e.shadowRoot.activeElement!=null;)e=e.shadowRoot.activeElement;return e}const Ho=[`INPUT`,`TEXTAREA`];function Uo(e,t,n,r={}){if(!t||r.enableIgnoredElement&&Ho.includes(t.nodeName))return null;let{arrowKeyOptions:i=`both`,attributeName:a=`[data-radix-vue-collection-item]`,itemsArray:o=[],loop:s=!0,dir:c=`ltr`,preventScroll:l=!0,focus:u=!1}=r,[d,f,p,m,h,g]=[e.key===`ArrowRight`,e.key===`ArrowLeft`,e.key===`ArrowUp`,e.key===`ArrowDown`,e.key===`Home`,e.key===`End`],_=p||m,v=d||f;if(!h&&!g&&(!_&&!v||i===`vertical`&&v||i===`horizontal`&&_))return null;let y=n?Array.from(n.querySelectorAll(a)):o;if(!y.length)return null;l&&e.preventDefault();let b=null;return v||_?b=Wo(y,t,{goForward:_?m:c===`ltr`?d:f,loop:s}):h?b=y.at(0)||null:g&&(b=y.at(-1)||null),u&&b?.focus(),b}function Wo(e,t,n,r=e.length){if(--r===0)return null;let i=e.indexOf(t),a=n.goForward?i+1:i-1;if(!n.loop&&(a<0||a>=e.length))return null;let o=(a+e.length)%e.length,s=e[o];return s?s.hasAttribute(`disabled`)&&s.getAttribute(`disabled`)!==`false`?Wo(e,s,n,r):s:null}function Go(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return t!==null&&t!==Object.prototype&&Object.getPrototypeOf(t)!==null||Symbol.iterator in e?!1:Symbol.toStringTag in e?Object.prototype.toString.call(e)===`[object Module]`:!0}function Ko(e,t,n=`.`,r){if(!Go(t))return Ko(e,{},n,r);let i=Object.assign({},t);for(let t in e){if(t===`__proto__`||t===`constructor`)continue;let a=e[t];a!=null&&(r&&r(i,t,a,n)||(Array.isArray(a)&&Array.isArray(i[t])?i[t]=[...a,...i[t]]:Go(a)&&Go(i[t])?i[t]=Ko(a,i[t],(n?`${n}.`:``)+t.toString(),r):i[t]=a))}return i}function qo(e){return(...t)=>t.reduce((t,n)=>Ko(t,n,``,e),{})}const Jo=qo(),[Yo,Xo]=K(`ConfigProvider`),Zo=p({inheritAttrs:!1,__name:`ConfigProvider`,props:{dir:{default:`ltr`},scrollBody:{type:[Boolean,Object],default:!0},nonce:{default:void 0},useId:{type:Function,default:void 0}},setup(e){let t=e,{dir:n,scrollBody:r,nonce:i}=z(t);return Xo({dir:n,scrollBody:r,nonce:i,useId:t.useId}),(e,t)=>R(e.$slots,`default`)}});let Qo=`useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict`,$o=(e=21)=>{let t=``,n=e;for(;n--;)t+=Qo[Math.random()*64|0];return t};const es=ro(()=>{let e=L(new Map),t=L(),n=a(()=>{for(let t of e.value.values())if(t)return!0;return!1}),r=Yo({scrollBody:L(!0)}),i=null,o=()=>{document.body.style.paddingRight=``,document.body.style.marginRight=``,document.body.style.pointerEvents=``,document.body.style.removeProperty(`--scrollbar-width`),document.body.style.overflow=t.value??``,mo&&i?.(),t.value=void 0};return V(n,(e,n)=>{var a;if(!so)return;if(!e){n&&o();return}t.value===void 0&&(t.value=document.body.style.overflow);let s=window.innerWidth-document.documentElement.clientWidth,c={padding:s,margin:0},l=(a=r.scrollBody)!=null&&a.value?typeof r.scrollBody.value==`object`?Jo({padding:r.scrollBody.value.padding===!0?s:r.scrollBody.value.padding,margin:r.scrollBody.value.margin===!0?s:r.scrollBody.value.margin},c):c:{padding:0,margin:0};s>0&&(document.body.style.paddingRight=typeof l.padding==`number`?`${l.padding}px`:String(l.padding),document.body.style.marginRight=typeof l.margin==`number`?`${l.margin}px`:String(l.margin),document.body.style.setProperty(`--scrollbar-width`,`${s}px`),document.body.style.overflow=`hidden`),mo&&(i=Oo(document,`touchmove`,e=>rs(e),{passive:!1})),w(()=>{document.body.style.pointerEvents=`none`,document.body.style.overflow=`hidden`})},{immediate:!0,flush:`sync`}),e});function ts(e){let t=$o(6),n=es();n.value.set(t,e??!1);let r=a({get:()=>n.value.get(t)??!1,set:e=>n.value.set(t,e)});return xo(()=>{n.value.delete(t)}),r}function ns(e){let t=window.getComputedStyle(e);if(t.overflowX===`scroll`||t.overflowY===`scroll`||t.overflowX===`auto`&&e.clientWidth1?!0:(t.preventDefault&&t.cancelable&&t.preventDefault(),!1)}const os=`data-radix-vue-collection-item`;function ss(e,t=os){let n=e??Symbol();return{createCollection:e=>{let r=L([]);function i(){let n=Eo(e);return n?r.value=Array.from(n.querySelectorAll(`[${t}]:not([data-disabled])`)):r.value=[]}return k(()=>{r.value=[]}),A(i),N(i),V(()=>e?.value,i,{immediate:!0}),F(n,r),r},injectCollection:()=>y(n,L([]))}}function cs(e){let t=L(e);function n(){return t.value}function r(e){t.value=e}function i(e,n){return new Mi(t.value,n).format(e)}function a(e,t=!0){return la(e)&&t?i(oa(e),{dateStyle:`long`,timeStyle:`long`}):i(oa(e),{dateStyle:`long`})}function o(e,n={}){return new Mi(t.value,{month:`long`,year:`numeric`,...n}).format(e)}function s(e,n={}){return new Mi(t.value,{month:`long`,...n}).format(e)}function c(){let e=cn(pn());return[1,2,3,4,5,6,7,8,9,10,11,12].map(t=>({label:s(oa(e.set({month:t}))),value:t}))}function l(e,n={}){return new Mi(t.value,{year:`numeric`,...n}).format(e)}function u(e,n){return ca(e)?new Mi(t.value,{...n,timeZone:e.timeZone}).formatToParts(oa(e)):new Mi(t.value,n).formatToParts(oa(e))}function d(e,n=`narrow`){return new Mi(t.value,{weekday:n}).format(e)}function f(e){var n;return(n=new Mi(t.value,{hour:`numeric`,minute:`numeric`}).formatToParts(e).find(e=>e.type===`dayPeriod`))?.value===`PM`?`PM`:`AM`}let p={year:`numeric`,month:`numeric`,day:`numeric`,hour:`numeric`,minute:`numeric`,second:`numeric`};function m(e,t,n={}){let r={...p,...n},i=u(e,r).find(e=>e.type===t);return i?i.value:``}return{setLocale:r,getLocale:n,fullMonth:s,fullYear:l,fullMonthAndYear:o,toParts:u,custom:i,part:m,dayPeriod:f,selectedDate:a,dayOfWeek:d,getMonths:c}}function Y(e){let t=Yo({dir:L(`ltr`)});return a(()=>{var n;return e?.value||(n=t.dir)?.value||`ltr`})}function ls(e){let t=h(),n=t?.type.emits,i={};return n!=null&&n.length||console.warn(`No emitted event found. Please check component: ${t?.type.__name}`),n?.forEach(t=>{i[oe(r(t))]=(...n)=>e(t,...n)}),i}let us=0;function ds(){H(e=>{if(!so)return;let t=document.querySelectorAll(`[data-radix-focus-guard]`);document.body.insertAdjacentElement(`afterbegin`,t[0]??fs()),document.body.insertAdjacentElement(`beforeend`,t[1]??fs()),us++,e(()=>{us===1&&document.querySelectorAll(`[data-radix-focus-guard]`).forEach(e=>e.remove()),us--})})}function fs(){let e=document.createElement(`span`);return e.setAttribute(`data-radix-focus-guard`,``),e.tabIndex=0,e.style.outline=`none`,e.style.opacity=`0`,e.style.position=`fixed`,e.style.pointerEvents=`none`,e}function ps(e){return a(()=>{var t;return io(e)?!!((t=Eo(e))!=null&&t.closest(`form`)):!0})}function ms(e){let t=h(),n=Object.keys(t?.type.props??{}).reduce((e,n)=>{let r=(t?.type.props[n]).default;return r!==void 0&&(e[n]=r),e},{}),i=le(e);return a(()=>{let e={},a=t?.vnode.props??{};return Object.keys(a).forEach(t=>{e[r(t)]=a[t]}),Object.keys({...n,...e}).reduce((e,t)=>(i.value[t]!==void 0&&(e[t]=i.value[t]),e),{})})}function hs(e,t){let n=ms(e),r=t?ls(t):{};return a(()=>({...n.value,...r}))}function X(){let e=h(),t=L(),n=a(()=>{var e,n;return[`#text`,`#comment`].includes((e=t.value)?.$el.nodeName)?(n=t.value)?.$el.nextElementSibling:Eo(t)}),r=Object.assign({},e.exposed),i={};for(let t in e.props)Object.defineProperty(i,t,{enumerable:!0,configurable:!0,get:()=>e.props[t]});if(Object.keys(r).length>0)for(let e in r)Object.defineProperty(i,e,{enumerable:!0,configurable:!0,get:()=>r[e]});Object.defineProperty(i,`$el`,{enumerable:!0,configurable:!0,get:()=>e.vnode.el}),e.exposed=i;function o(n){t.value=n,n&&(Object.defineProperty(i,`$el`,{enumerable:!0,configurable:!0,get:()=>n instanceof Element?n:n.$el}),e.exposed=i)}return{forwardRef:o,currentRef:t,currentElement:n}}function gs(e,t){let n=yo(!1,300),r=L(null),i=to();function a(){r.value=null,n.value=!1}function o(e,t){let i=e.currentTarget,a={x:e.clientX,y:e.clientY},o=_s(a,i.getBoundingClientRect()),s=vs(a,o),c=ys(t.getBoundingClientRect()),l=xs([...s,...c]);r.value=l,n.value=!0}return H(n=>{if(e.value&&t.value){let r=e=>o(e,t.value),i=t=>o(t,e.value);e.value.addEventListener(`pointerleave`,r),t.value.addEventListener(`pointerleave`,i),n(()=>{var n,a;(n=e.value)==null||n.removeEventListener(`pointerleave`,r),(a=t.value)==null||a.removeEventListener(`pointerleave`,i)})}}),H(n=>{var o;if(r.value){let s=n=>{var o,s;if(!r.value)return;let c=n.target,l={x:n.clientX,y:n.clientY},u=(o=e.value)?.contains(c)||(s=t.value)?.contains(c),d=!bs(l,r.value),f=!!c.closest(`[data-grace-area-trigger]`);u?a():(d||f)&&(a(),i.trigger())};(o=e.value)==null||o.ownerDocument.addEventListener(`pointermove`,s),n(()=>{var t;return(t=e.value)?.ownerDocument.removeEventListener(`pointermove`,s)})}}),{isPointerInTransit:n,onPointerExit:i.on}}function _s(e,t){let n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,r,i,a)){case a:return`left`;case i:return`right`;case n:return`top`;case r:return`bottom`;default:throw Error(`unreachable`)}}function vs(e,t,n=5){let r=[];switch(t){case`top`:r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case`bottom`:r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case`left`:r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case`right`:r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function ys(e){let{top:t,right:n,bottom:r,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:r},{x:i,y:r}]}function bs(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;er!=l>r&&n<(c-o)*(r-s)/(l-s)+o&&(i=!i)}return i}function xs(e){let t=e.slice();return t.sort((e,t)=>e.xt.x?1:e.yt.y?1:0),Ss(t)}function Ss(e){if(e.length<=1)return e.slice();let t=[];for(let n=0;n=2;){let e=t[t.length-1],n=t[t.length-2];if((e.x-n.x)*(r.y-n.y)>=(e.y-n.y)*(r.x-n.x))t.pop();else break}t.push(r)}t.pop();let n=[];for(let t=e.length-1;t>=0;t--){let r=e[t];for(;n.length>=2;){let e=n[n.length-1],t=n[n.length-2];if((e.x-t.x)*(r.y-t.y)>=(e.y-t.y)*(r.x-t.x))n.pop();else break}n.push(r)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var Cs=function(e){if(typeof document>`u`)return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},ws=new WeakMap,Ts=new WeakMap,Es={},Ds=0,Os=function(e){return e&&(e.host||Os(e.parentNode))},ks=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=Os(t);return n&&e.contains(n)?n:(console.error(`aria-hidden`,t,`in not contained inside`,e,`. Doing nothing`),null)}).filter(function(e){return!!e})},As=function(e,t,n,r){var i=ks(t,Array.isArray(e)?e:[e]);Es[n]||(Es[n]=new WeakMap);var a=Es[n],o=[],s=new Set,c=new Set(i),l=function(e){!e||s.has(e)||(s.add(e),l(e.parentNode))};i.forEach(l);var u=function(e){!e||c.has(e)||Array.prototype.forEach.call(e.children,function(e){if(s.has(e))u(e);else try{var t=e.getAttribute(r),i=t!==null&&t!==`false`,c=(ws.get(e)||0)+1,l=(a.get(e)||0)+1;ws.set(e,c),a.set(e,l),o.push(e),c===1&&i&&Ts.set(e,!0),l===1&&e.setAttribute(n,`true`),i||e.setAttribute(r,`true`)}catch(t){console.error(`aria-hidden: cannot operate on `,e,t)}})};return u(t),s.clear(),Ds++,function(){o.forEach(function(e){var t=ws.get(e)-1,i=a.get(e)-1;ws.set(e,t),a.set(e,i),t||(Ts.has(e)||e.removeAttribute(r),Ts.delete(e)),i||e.removeAttribute(n)}),Ds--,Ds||(ws=new WeakMap,ws=new WeakMap,Ts=new WeakMap,Es={})}},js=function(e,t,n){n===void 0&&(n=`data-aria-hidden`);var r=Array.from(Array.isArray(e)?e:[e]),i=Cs(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll(`[aria-live]`))),As(r,i,n,`aria-hidden`)):function(){return null}};function Ms(e){let t;V(()=>Eo(e),e=>{e?t=js(e):t&&t()}),M(()=>{t&&t()})}let Ns=0;function Z(e,t=`radix`){if(e)return e;let n=Yo({useId:void 0});return de?`${t}-${de()}`:n.useId?`${t}-${n.useId()}`:`${t}-${++Ns}`}function Ps(e,t){let n=L(),r=(r,i)=>{if(t.multiple&&Array.isArray(e.value))if(t.selectionBehavior===`replace`)e.value=[r],n.value=r;else{let t=e.value.findIndex(e=>i(e));t===-1?e.value.push(r):e.value.splice(t,1)}else t.selectionBehavior===`replace`?e.value={...r}:!Array.isArray(e.value)&&i(e.value)?e.value=void 0:e.value={...r};return e.value};function i(r,i,a,o){var s;if(!(n!=null&&n.value)||!t.multiple||!Array.isArray(e.value))return;let c=(s=a().filter(e=>e.ref.dataset.disabled!==``).find(e=>e.ref===i))?.value;if(!c)return;let l=null;switch(r){case`prev`:case`next`:l=ja(o,n.value,c);break;case`first`:l=ja(o,n.value,o?.[0]);break;case`last`:l=ja(o,n.value,o?.[o.length-1]);break}e.value=l}return{firstValue:n,onSelectItem:r,handleMultipleReplace:i}}function Fs(e){let t=L(),n=a(()=>{var e;return(e=t.value)?.width??0}),r=a(()=>{var e;return(e=t.value)?.height??0});return A(()=>{let n=Eo(e);if(n){t.value={width:n.offsetWidth,height:n.offsetHeight};let e=new ResizeObserver(e=>{if(!Array.isArray(e)||!e.length)return;let r=e[0],i,a;if(`borderBoxSize`in r){let e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;i=t.inlineSize,a=t.blockSize}else i=n.offsetWidth,a=n.offsetHeight;t.value={width:i,height:a}});return e.observe(n,{box:`border-box`}),()=>e.unobserve(n)}else t.value=void 0}),{width:n,height:r}}function Is(e,t){let n=L(e);function r(e){return t[n.value][e]??n.value}return{state:n,dispatch:e=>{n.value=r(e)}}}const Ls=`data-item-text`;function Rs(e){let t=yo(``,1e3);return{search:t,handleTypeaheadSearch:(n,r)=>{if(!(e!=null&&e.value)&&!r)return;t.value+=n;let i=e?.value??r,a=J(),o=i.map(e=>{var t;return{ref:e,textValue:(t=(e.querySelector(`[${Ls}]`)??e).textContent)?.trim()??``}}),s=o.find(e=>e.ref===a),c=o.map(e=>e.textValue),l=Bs(c,t.value,s?.textValue),u=o.find(e=>e.textValue===l);return u&&u.ref.focus(),u?.ref},resetTypeahead:()=>{t.value=``}}}function zs(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function Bs(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=zs(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}function Vs(){return{ALT:`Alt`,ARROW_DOWN:`ArrowDown`,ARROW_LEFT:`ArrowLeft`,ARROW_RIGHT:`ArrowRight`,ARROW_UP:`ArrowUp`,BACKSPACE:`Backspace`,CAPS_LOCK:`CapsLock`,CONTROL:`Control`,DELETE:`Delete`,END:`End`,ENTER:`Enter`,ESCAPE:`Escape`,F1:`F1`,F10:`F10`,F11:`F11`,F12:`F12`,F2:`F2`,F3:`F3`,F4:`F4`,F5:`F5`,F6:`F6`,F7:`F7`,F8:`F8`,F9:`F9`,HOME:`Home`,META:`Meta`,PAGE_DOWN:`PageDown`,PAGE_UP:`PageUp`,SHIFT:`Shift`,SPACE:` `,TAB:`Tab`,CTRL:`Control`,ASTERISK:`*`,SPACE_CODE:`Space`}}const Hs=p({name:`PrimitiveSlot`,inheritAttrs:!1,setup(t,{attrs:n,slots:r}){return()=>{var t,a;if(!r.default)return null;let o=Vo(r.default()),s=o.findIndex(t=>t.type!==e);if(s===-1)return o;let c=o[s];(t=c.props)==null||delete t.ref;let l=c.props?C(n,c.props):n;n.class&&(a=c.props)!=null&&a.class&&delete c.props.class;let u=i(c,l);for(let e in l)e.startsWith(`on`)&&(u.props||={},u.props[e]=l[e]);return o.length===1?u:(o[s]=u,o)}}}),Q=p({name:`Primitive`,inheritAttrs:!1,props:{asChild:{type:Boolean,default:!1},as:{type:[String,Object],default:`div`}},setup(e,{attrs:t,slots:n}){let r=e.asChild?`template`:e.as;return typeof r==`string`&&[`area`,`img`,`input`].includes(r)?()=>v(r,t):r===`template`?()=>v(Hs,t,{default:n.default}):()=>v(e.as,t,{default:n.default})}});function Us(){let e=L(),t=a(()=>{var t,n;return[`#text`,`#comment`].includes((t=e.value)?.$el.nodeName)?(n=e.value)?.$el.nextElementSibling:Eo(e)});return{primitiveElement:e,currentElement:t}}const[Ws,Gs]=K(`CollapsibleRoot`),Ks=p({__name:`CollapsibleRoot`,props:{defaultOpen:{type:Boolean,default:!1},open:{type:Boolean,default:void 0},disabled:{type:Boolean},asChild:{type:Boolean},as:{}},emits:[`update:open`],setup(e,{expose:t,emit:n}){let r=e,i=q(r,`open`,n,{defaultValue:r.defaultOpen,passive:r.open===void 0}),a=q(r,`disabled`);return Gs({contentId:``,disabled:a,open:i,onOpenToggle:()=>{i.value=!i.value}}),t({open:i}),X(),(e,t)=>(P(),s(B(Q),{as:e.as,"as-child":r.asChild,"data-state":B(i)?`open`:`closed`,"data-disabled":B(a)?``:void 0},{default:U(()=>[R(e.$slots,`default`,{open:B(i)})]),_:3},8,[`as`,`as-child`,`data-state`,`data-disabled`]))}}),qs=p({__name:`CollapsibleTrigger`,props:{asChild:{type:Boolean},as:{default:`button`}},setup(e){let t=e;X();let n=Ws();return(e,r)=>{var i,a;return P(),s(B(Q),{type:e.as===`button`?`button`:void 0,as:e.as,"as-child":t.asChild,"aria-controls":B(n).contentId,"aria-expanded":B(n).open.value,"data-state":B(n).open.value?`open`:`closed`,"data-disabled":(i=B(n).disabled)!=null&&i.value?``:void 0,disabled:(a=B(n).disabled)?.value,onClick:B(n).onOpenToggle},{default:U(()=>[R(e.$slots,`default`)]),_:3},8,[`type`,`as`,`as-child`,`aria-controls`,`aria-expanded`,`data-state`,`data-disabled`,`disabled`,`onClick`])}}});function Js(e,t){var n;let r=L({}),i=L(`none`),o=L(e),s=e.value?`mounted`:`unmounted`,c,l=(n=t.value)?.ownerDocument.defaultView??Do,{state:u,dispatch:d}=Is(s,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}}),f=e=>{var n;if(so){let r=new CustomEvent(e,{bubbles:!1,cancelable:!1});(n=t.value)==null||n.dispatchEvent(r)}};V(e,async(e,n)=>{var a;let o=n!==e;if(await w(),o){let o=i.value,s=Ys(t.value);e?(d(`MOUNT`),f(`enter`),s===`none`&&f(`after-enter`)):s===`none`||(a=r.value)?.display===`none`?(d(`UNMOUNT`),f(`leave`),f(`after-leave`)):n&&o!==s?(d(`ANIMATION_OUT`),f(`leave`)):(d(`UNMOUNT`),f(`after-leave`))}},{immediate:!0});let p=e=>{let n=Ys(t.value),r=n.includes(e.animationName),i=u.value===`mounted`?`enter`:`leave`;if(e.target===t.value&&r&&(f(`after-${i}`),d(`ANIMATION_END`),!o.value)){let e=t.value.style.animationFillMode;t.value.style.animationFillMode=`forwards`,c=l?.setTimeout(()=>{var n;(n=t.value)?.style.animationFillMode===`forwards`&&(t.value.style.animationFillMode=e)})}e.target===t.value&&n===`none`&&d(`ANIMATION_END`)},m=e=>{e.target===t.value&&(i.value=Ys(t.value))},h=V(t,(e,t)=>{e?(r.value=getComputedStyle(e),e.addEventListener(`animationstart`,m),e.addEventListener(`animationcancel`,p),e.addEventListener(`animationend`,p)):(d(`ANIMATION_END`),c!==void 0&&l?.clearTimeout(c),t?.removeEventListener(`animationstart`,m),t?.removeEventListener(`animationcancel`,p),t?.removeEventListener(`animationend`,p))},{immediate:!0}),g=V(u,()=>{let e=Ys(t.value);i.value=u.value===`mounted`?e:`none`});return M(()=>{h(),g()}),{isPresent:a(()=>[`mounted`,`unmountSuspended`].includes(u.value))}}function Ys(e){return e&&getComputedStyle(e).animationName||`none`}const Xs=p({name:`Presence`,props:{present:{type:Boolean,required:!0},forceMount:{type:Boolean}},slots:{},setup(e,{slots:t,expose:n}){var r;let{present:i,forceMount:a}=z(e),o=L(),{isPresent:s}=Js(i,o);n({present:s});let c=t.default({present:s});c=Vo(c||[]);let l=h();if(c&&c?.length>1){let e=(r=l?.parent)!=null&&r.type.name?`<${l.parent.type.name} />`:`component`;throw Error([`Detected an invalid children for \`${e}\` for \`Presence\` component.`,``,"Note: Presence works similarly to `v-if` directly, but it waits for animation/transition to finished before unmounting. So it expect only one direct child of valid VNode type.",`You can apply a few solutions:`,["Provide a single child element so that `presence` directive attach correctly.",`Ensure the first child is an actual element instead of a raw text node or comment node.`].map(e=>` - ${e}`).join(` +import{Comment as e,Fragment as t,Teleport as n,camelize as r,cloneVNode as i,computed as a,createBaseVNode as o,createBlock as s,createCommentVNode as c,createElementBlock as l,createTextVNode as u,createVNode as d,customRef as f,defineComponent as p,effectScope as m,getCurrentInstance as h,getCurrentScope as g,guardReactiveProps as _,h as v,inject as y,isRef as b,markRaw as x,mergeDefaults as S,mergeProps as C,nextTick as w,normalizeProps as T,normalizeStyle as E,onBeforeMount as D,onBeforeUnmount as O,onBeforeUpdate as k,onMounted as A,onScopeDispose as j,onUnmounted as M,onUpdated as N,openBlock as P,provide as F,reactive as I,readonly as ee,ref as L,renderList as te,renderSlot as R,resolveDynamicComponent as ne,shallowReadonly as re,shallowRef as ie,toDisplayString as ae,toHandlerKey as oe,toHandlers as se,toRaw as ce,toRef as le,toRefs as z,triggerRef as ue,unref as B,useId as de,useSlots as fe,vModelSelect as pe,vShow as me,watch as V,watchEffect as H,watchPostEffect as he,watchSyncEffect as ge,withCtx as U,withDirectives as _e,withKeys as W,withModifiers as G}from"./index-CsmT0L1K.js";import{arrow as ve,computePosition as ye,createCoords as be,flip as xe,floor as Se,hide as Ce,limitShift as we,max as Te,min as Ee,offset as De,rectToClientRect as Oe,round as ke,shift as Ae,size as je}from"./src-C1Sr0aqN.js";function Me(){return typeof window<`u`}function Ne(e){return Ie(e)?(e.nodeName||``).toLowerCase():`#document`}function Pe(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Fe(e){var t;return(t=(Ie(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function Ie(e){return Me()?e instanceof Node||e instanceof Pe(e).Node:!1}function Le(e){return Me()?e instanceof Element||e instanceof Pe(e).Element:!1}function Re(e){return Me()?e instanceof HTMLElement||e instanceof Pe(e).HTMLElement:!1}function ze(e){return!Me()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof Pe(e).ShadowRoot}function Be(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=qe(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&![`inline`,`contents`].includes(i)}function Ve(e){return[`table`,`td`,`th`].includes(Ne(e))}function He(e){return[`:popover-open`,`:modal`].some(t=>{try{return e.matches(t)}catch{return!1}})}function Ue(e){let t=Ge(),n=Le(e)?qe(e):e;return[`transform`,`translate`,`scale`,`rotate`,`perspective`].some(e=>n[e]?n[e]!==`none`:!1)||(n.containerType?n.containerType!==`normal`:!1)||!t&&(n.backdropFilter?n.backdropFilter!==`none`:!1)||!t&&(n.filter?n.filter!==`none`:!1)||[`transform`,`translate`,`scale`,`rotate`,`perspective`,`filter`].some(e=>(n.willChange||``).includes(e))||[`paint`,`layout`,`strict`,`content`].some(e=>(n.contain||``).includes(e))}function We(e){let t=Ye(e);for(;Re(t)&&!Ke(t);){if(Ue(t))return t;if(He(t))return null;t=Ye(t)}return null}function Ge(){return typeof CSS>`u`||!CSS.supports?!1:CSS.supports(`-webkit-backdrop-filter`,`none`)}function Ke(e){return[`html`,`body`,`#document`].includes(Ne(e))}function qe(e){return Pe(e).getComputedStyle(e)}function Je(e){return Le(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ye(e){if(Ne(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||ze(e)&&e.host||Fe(e);return ze(t)?t.host:t}function Xe(e){let t=Ye(e);return Ke(t)?e.ownerDocument?e.ownerDocument.body:e.body:Re(t)&&Be(t)?t:Xe(t)}function Ze(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);let i=Xe(e),a=i===(r=e.ownerDocument)?.body,o=Pe(i);if(a){let e=Qe(o);return t.concat(o,o.visualViewport||[],Be(i)?i:[],e&&n?Ze(e):[])}return t.concat(i,Ze(i,[],n))}function Qe(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function $e(e){let t=qe(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=Re(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=ke(n)!==a||ke(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function et(e){return Le(e)?e:e.contextElement}function tt(e){let t=et(e);if(!Re(t))return be(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=$e(t),o=(a?ke(n.width):n.width)/r,s=(a?ke(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}const nt=be(0);function rt(e){let t=Pe(e);return!Ge()||!t.visualViewport?nt:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function it(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Pe(e)?!1:t}function at(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=et(e),o=be(1);t&&(r?Le(r)&&(o=tt(r)):o=tt(e));let s=it(a,n,r)?rt(a):be(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a){let e=Pe(a),t=r&&Le(r)?Pe(r):r,n=e,i=Qe(n);for(;i&&r&&t!==n;){let e=tt(i),t=i.getBoundingClientRect(),r=qe(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=Pe(i),i=Qe(n)}}return Oe({width:u,height:d,x:c,y:l})}function ot(e,t){let n=Je(e).scrollLeft;return t?t.left+n:at(Fe(e)).left+n}function st(e,t,n){n===void 0&&(n=!1);let r=e.getBoundingClientRect(),i=r.left+t.scrollLeft-(n?0:ot(e,r)),a=r.top+t.scrollTop;return{x:i,y:a}}function ct(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=Fe(r),s=t?He(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=be(1),u=be(0),d=Re(r);if((d||!d&&!a)&&((Ne(r)!==`body`||Be(o))&&(c=Je(r)),Re(r))){let e=at(r);l=tt(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?st(o,c,!0):be(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function lt(e){return Array.from(e.getClientRects())}function ut(e){let t=Fe(e),n=Je(e),r=e.ownerDocument.body,i=Te(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=Te(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+ot(e),s=-n.scrollTop;return qe(r).direction===`rtl`&&(o+=Te(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}function dt(e,t){let n=Pe(e),r=Fe(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=Ge();(!e||e&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}return{width:a,height:o,x:s,y:c}}function ft(e,t){let n=at(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=Re(e)?tt(e):be(1),o=e.clientWidth*a.x,s=e.clientHeight*a.y,c=i*a.x,l=r*a.y;return{width:o,height:s,x:c,y:l}}function pt(e,t,n){let r;if(t===`viewport`)r=dt(e,n);else if(t===`document`)r=ut(Fe(e));else if(Le(t))r=ft(t,n);else{let n=rt(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Oe(r)}function mt(e,t){let n=Ye(e);return n===t||!Le(n)||Ke(n)?!1:qe(n).position===`fixed`||mt(n,t)}function ht(e,t){let n=t.get(e);if(n)return n;let r=Ze(e,[],!1).filter(e=>Le(e)&&Ne(e)!==`body`),i=null,a=qe(e).position===`fixed`,o=a?Ye(e):e;for(;Le(o)&&!Ke(o);){let t=qe(o),n=Ue(o);!n&&t.position===`fixed`&&(i=null);let s=a?!n&&!i:!n&&t.position===`static`&&!!i&&[`absolute`,`fixed`].includes(i.position)||Be(o)&&!n&&mt(e,o);s?r=r.filter(e=>e!==o):i=t,o=Ye(o)}return t.set(e,r),r}function gt(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=n===`clippingAncestors`?He(t)?[]:ht(t,this._c):[].concat(n),o=[...a,r],s=o[0],c=o.reduce((e,n)=>{let r=pt(t,n,i);return e.top=Te(r.top,e.top),e.right=Ee(r.right,e.right),e.bottom=Ee(r.bottom,e.bottom),e.left=Te(r.left,e.left),e},pt(t,s,i));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function _t(e){let{width:t,height:n}=$e(e);return{width:t,height:n}}function vt(e,t,n){let r=Re(t),i=Fe(t),a=n===`fixed`,o=at(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=be(0);if(r||!r&&!a)if((Ne(t)!==`body`||Be(i))&&(s=Je(t)),r){let e=at(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else i&&(c.x=ot(i));let l=i&&!r&&!a?st(i,s):be(0),u=o.left+s.scrollLeft-c.x-l.x,d=o.top+s.scrollTop-c.y-l.y;return{x:u,y:d,width:o.width,height:o.height}}function yt(e){return qe(e).position===`static`}function bt(e,t){if(!Re(e)||qe(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return Fe(e)===n&&(n=n.ownerDocument.body),n}function xt(e,t){let n=Pe(e);if(He(e))return n;if(!Re(e)){let t=Ye(e);for(;t&&!Ke(t);){if(Le(t)&&!yt(t))return t;t=Ye(t)}return n}let r=bt(e,t);for(;r&&Ve(r)&&yt(r);)r=bt(r,t);return r&&Ke(r)&&yt(r)&&!Ue(r)?n:r||We(e)||n}const St=async function(e){let t=this.getOffsetParent||xt,n=this.getDimensions,r=await n(e.floating);return{reference:vt(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Ct(e){return qe(e).direction===`rtl`}const wt={convertOffsetParentRelativeRectToViewportRelativeRect:ct,getDocumentElement:Fe,getClippingRect:gt,getOffsetParent:xt,getElementRects:St,getClientRects:lt,getDimensions:_t,getScale:tt,isElement:Le,isRTL:Ct};function Tt(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Et(e,t){let n=null,r,i=Fe(e);function a(){var e;clearTimeout(r),(e=n)==null||e.disconnect(),n=null}function o(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),a();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(s||t(),!f||!p)return;let m=Se(d),h=Se(i.clientWidth-(u+f)),g=Se(i.clientHeight-(d+p)),_=Se(u),v=-m+`px `+-h+`px `+-g+`px `+-_+`px`,y={rootMargin:v,threshold:Te(0,Ee(1,c))||1},b=!0;function x(t){let n=t[0].intersectionRatio;if(n!==c){if(!b)return o();n?o(!1,n):r=setTimeout(()=>{o(!1,1e-7)},1e3)}n===1&&!Tt(l,e.getBoundingClientRect())&&o(),b=!1}try{n=new IntersectionObserver(x,{...y,root:i.ownerDocument})}catch{n=new IntersectionObserver(x,y)}n.observe(e)}return o(!0),a}function Dt(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=et(e),u=i||a?[...l?Ze(l):[],...Ze(t)]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n,{passive:!0}),a&&e.addEventListener(`resize`,n)});let d=l&&s?Et(l,n):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),p.observe(t));let m,h=c?at(e):null;c&&g();function g(){let t=at(e);h&&!Tt(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}const Ot=De,kt=Ae,At=xe,jt=je,Mt=Ce,Nt=ve,Pt=we,Ft=(e,t,n)=>{let r=new Map,i={platform:wt,...n},a={...i.platform,_c:r};return ye(e,t,{...i,platform:a})};function It(e){return typeof e==`object`&&!!e&&`$el`in e}function Lt(e){if(It(e)){let t=e.$el;return Ie(t)&&Ne(t)===`#comment`?null:t}return e}function Rt(e){return typeof e==`function`?e():B(e)}function zt(e){return{name:`arrow`,options:e,fn(t){let n=Lt(Rt(e.element));return n==null?{}:Nt({element:n,padding:e.padding}).fn(t)}}}function Bt(e){if(typeof window>`u`)return 1;let t=e.ownerDocument.defaultView||window;return t.devicePixelRatio||1}function Vt(e,t){let n=Bt(e);return Math.round(t*n)/n}function Ht(e,t,n){n===void 0&&(n={});let r=n.whileElementsMounted,i=a(()=>{var e;return(e=Rt(n.open))??!0}),o=a(()=>Rt(n.middleware)),s=a(()=>{var e;return(e=Rt(n.placement))??`bottom`}),c=a(()=>{var e;return(e=Rt(n.strategy))??`absolute`}),l=a(()=>{var e;return(e=Rt(n.transform))??!0}),u=a(()=>Lt(e.value)),d=a(()=>Lt(t.value)),f=L(0),p=L(0),m=L(c.value),h=L(s.value),_=ie({}),v=L(!1),y=a(()=>{let e={position:m.value,left:`0`,top:`0`};if(!d.value)return e;let t=Vt(d.value,f.value),n=Vt(d.value,p.value);return l.value?{...e,transform:`translate(`+t+`px, `+n+`px)`,...Bt(d.value)>=1.5&&{willChange:`transform`}}:{position:m.value,left:t+`px`,top:n+`px`}}),b;function x(){if(u.value==null||d.value==null)return;let e=i.value;Ft(u.value,d.value,{middleware:o.value,placement:s.value,strategy:c.value}).then(t=>{f.value=t.x,p.value=t.y,m.value=t.strategy,h.value=t.placement,_.value=t.middlewareData,v.value=e!==!1})}function S(){typeof b==`function`&&(b(),b=void 0)}function C(){if(S(),r===void 0){x();return}if(u.value!=null&&d.value!=null){b=r(u.value,d.value,x);return}}function w(){i.value||(v.value=!1)}return V([o,s,c,i],x,{flush:`sync`}),V([u,d],C,{flush:`sync`}),V(i,w,{flush:`sync`}),g()&&j(S),{x:re(f),y:re(p),strategy:re(m),placement:re(h),middlewareData:re(_),isPositioned:re(v),floatingStyles:y,update:x}}function Ut(e,t){return e-t*Math.floor(e/t)}const Wt=1721426;function Gt(e,t,n,r){t=qt(e,t);let i=t-1,a=-2;return n<=2?a=0:Kt(t)&&(a=-1),Wt-1+365*i+Math.floor(i/4)-Math.floor(i/100)+Math.floor(i/400)+Math.floor((367*n-362)/12+a+r)}function Kt(e){return e%4==0&&(e%100!=0||e%400==0)}function qt(e,t){return e===`BC`?1-t:t}function Jt(e){let t=`AD`;return e<=0&&(t=`BC`,e=1-e),[t,e]}const Yt={standard:[31,28,31,30,31,30,31,31,30,31,30,31],leapyear:[31,29,31,30,31,30,31,31,30,31,30,31]};var Xt=class{fromJulianDay(e){let t=e,n=t-Wt,r=Math.floor(n/146097),i=Ut(n,146097),a=Math.floor(i/36524),o=Ut(i,36524),s=Math.floor(o/1461),c=Ut(o,1461),l=Math.floor(c/365),u=r*400+a*100+s*4+l+(a!==4&&l!==4?1:0),[d,f]=Jt(u),p=t-Gt(d,f,1,1),m=2;t0&&t===pn())return new Date(e).getTimezoneOffset()*-6e4;let{year:n,month:r,day:i,hour:a,minute:o,second:s}=Cn(e,t),c=bn(n,r,i,a,o,s,0);return c-Math.floor(e/1e3)*1e3}const Sn=new Map;function Cn(e,t){let n=Sn.get(t);n||(n=new Intl.DateTimeFormat(`en-US`,{timeZone:t,hour12:!1,era:`short`,year:`numeric`,month:`numeric`,day:`numeric`,hour:`numeric`,minute:`numeric`,second:`numeric`}),Sn.set(t,n));let r=n.formatToParts(new Date(e)),i={};for(let e of r)e.type!==`literal`&&(i[e.type]=e.value);return{year:i.era===`BC`||i.era===`B`?-i.year+1:+i.year,month:+i.month,day:+i.day,hour:i.hour===`24`?0:+i.hour,minute:+i.minute,second:+i.second}}const wn=864e5;function Tn(e,t,n,r){let i=n===r?[n]:[n,r];return i.filter(n=>En(e,t,n))}function En(e,t,n){let r=Cn(n,t);return e.year===r.year&&e.month===r.month&&e.day===r.day&&e.hour===r.hour&&e.minute===r.minute&&e.second===r.second}function Dn(e,t,n=`compatible`){let r=jn(e);if(t===`UTC`)return yn(r);if(t===pn()&&n===`compatible`){r=Mn(r,new Xt);let e=new Date,t=qt(r.era,r.year);return e.setFullYear(t,r.month-1,r.day),e.setHours(r.hour,r.minute,r.second,r.millisecond),e.getTime()}let i=yn(r),a=xn(i-wn,t),o=xn(i+wn,t),s=Tn(r,t,i-a,i-o);if(s.length===1)return s[0];if(s.length>1)switch(n){case`compatible`:case`earlier`:return s[0];case`later`:return s[s.length-1];case`reject`:throw RangeError(`Multiple possible absolute times found`)}switch(n){case`earlier`:return Math.min(i-a,i-o);case`compatible`:case`later`:return Math.max(i-a,i-o);case`reject`:throw RangeError(`No such absolute time found`)}}function On(e,t,n=`compatible`){return new Date(Dn(e,t,n))}function kn(e,t){let n=xn(e,t),r=new Date(e+n),i=r.getUTCFullYear(),a=r.getUTCMonth()+1,o=r.getUTCDate(),s=r.getUTCHours(),c=r.getUTCMinutes(),l=r.getUTCSeconds(),u=r.getUTCMilliseconds();return new yr(i<1?`BC`:`AD`,i<1?-i+1:i,a,o,t,n,s,c,l,u)}function An(e){return new hr(e.calendar,e.era,e.year,e.month,e.day)}function jn(e,t){let n=0,r=0,i=0,a=0;if(`timeZone`in e)({hour:n,minute:r,second:i,millisecond:a}=e);else if(`hour`in e&&!t)return e;return t&&({hour:n,minute:r,second:i,millisecond:a}=t),new _r(e.calendar,e.era,e.year,e.month,e.day,n,r,i,a)}function Mn(e,t){if(nn(e.calendar,t))return e;let n=t.fromJulianDay(e.calendar.toJulianDay(e)),r=e.copy();return r.calendar=t,r.era=n.era,r.year=n.year,r.month=n.month,r.day=n.day,Hn(r),r}function Nn(e,t,n){if(e instanceof yr)return e.timeZone===t?e:Fn(e,t);let r=Dn(e,t,n);return kn(r,t)}function Pn(e){let t=yn(e)-e.offset;return new Date(t)}function Fn(e,t){let n=yn(e)-e.offset;return Mn(kn(n,t),e.calendar)}const In=36e5;function Ln(e,t){let n=e.copy(),r=`hour`in n?Xn(n,t):0;Rn(n,t.years||0),n.calendar.balanceYearMonth&&n.calendar.balanceYearMonth(n,e),n.month+=t.months||0,zn(n),Vn(n),n.day+=(t.weeks||0)*7,n.day+=t.days||0,n.day+=r,Bn(n),n.calendar.balanceDate&&n.calendar.balanceDate(n),n.year<1&&(n.year=1,n.month=1,n.day=1);let i=n.calendar.getYearsInEra(n);if(n.year>i){var a,o;let e=(a=(o=n.calendar).isInverseEra)?.call(o,n);n.year=i,n.month=e?1:n.calendar.getMonthsInYear(n),n.day=e?1:n.calendar.getDaysInMonth(n)}n.month<1&&(n.month=1,n.day=1);let s=n.calendar.getMonthsInYear(n);return n.month>s&&(n.month=s,n.day=n.calendar.getDaysInMonth(n)),n.day=Math.max(1,Math.min(n.calendar.getDaysInMonth(n),n.day)),n}function Rn(e,t){var n,r;(n=(r=e.calendar).isInverseEra)?.call(r,e)&&(t=-t),e.year+=t}function zn(e){for(;e.month<1;)Rn(e,-1),e.month+=e.calendar.getMonthsInYear(e);let t=0;for(;e.month>(t=e.calendar.getMonthsInYear(e));)e.month-=t,Rn(e,1)}function Bn(e){for(;e.day<1;)e.month--,zn(e),e.day+=e.calendar.getDaysInMonth(e);for(;e.day>e.calendar.getDaysInMonth(e);)e.day-=e.calendar.getDaysInMonth(e),e.month++,zn(e)}function Vn(e){e.month=Math.max(1,Math.min(e.calendar.getMonthsInYear(e),e.month)),e.day=Math.max(1,Math.min(e.calendar.getDaysInMonth(e),e.day))}function Hn(e){e.calendar.constrainDate&&e.calendar.constrainDate(e),e.year=Math.max(1,Math.min(e.calendar.getYearsInEra(e),e.year)),Vn(e)}function Un(e){let t={};for(let n in e)typeof e[n]==`number`&&(t[n]=-e[n]);return t}function Wn(e,t){return Ln(e,Un(t))}function Gn(e,t){let n=e.copy();return t.era!=null&&(n.era=t.era),t.year!=null&&(n.year=t.year),t.month!=null&&(n.month=t.month),t.day!=null&&(n.day=t.day),Hn(n),n}function Kn(e,t){let n=e.copy();return t.hour!=null&&(n.hour=t.hour),t.minute!=null&&(n.minute=t.minute),t.second!=null&&(n.second=t.second),t.millisecond!=null&&(n.millisecond=t.millisecond),Jn(n),n}function qn(e){e.second+=Math.floor(e.millisecond/1e3),e.millisecond=Yn(e.millisecond,1e3),e.minute+=Math.floor(e.second/60),e.second=Yn(e.second,60),e.hour+=Math.floor(e.minute/60),e.minute=Yn(e.minute,60);let t=Math.floor(e.hour/24);return e.hour=Yn(e.hour,24),t}function Jn(e){e.millisecond=Math.max(0,Math.min(e.millisecond,1e3)),e.second=Math.max(0,Math.min(e.second,59)),e.minute=Math.max(0,Math.min(e.minute,59)),e.hour=Math.max(0,Math.min(e.hour,23))}function Yn(e,t){let n=e%t;return n<0&&(n+=t),n}function Xn(e,t){return e.hour+=t.hours||0,e.minute+=t.minutes||0,e.second+=t.seconds||0,e.millisecond+=t.milliseconds||0,qn(e)}function Zn(e,t,n,r){let i=e.copy();switch(t){case`era`:{let t=e.calendar.getEras(),a=t.indexOf(e.era);if(a<0)throw Error(`Invalid era: `+e.era);a=$n(a,n,0,t.length-1,r?.round),i.era=t[a],Hn(i);break}case`year`:var a,o;(a=(o=i.calendar).isInverseEra)?.call(o,i)&&(n=-n),i.year=$n(e.year,n,-1/0,9999,r?.round),i.year===-1/0&&(i.year=1),i.calendar.balanceYearMonth&&i.calendar.balanceYearMonth(i,e);break;case`month`:i.month=$n(e.month,n,1,e.calendar.getMonthsInYear(e),r?.round);break;case`day`:i.day=$n(e.day,n,1,e.calendar.getDaysInMonth(e),r?.round);break;default:throw Error(`Unsupported field `+t)}return e.calendar.balanceDate&&e.calendar.balanceDate(i),Hn(i),i}function Qn(e,t,n,r){let i=e.copy();switch(t){case`hour`:{let t=e.hour,a=0,o=23;if(r?.hourCycle===12){let e=t>=12;a=e?12:0,o=e?23:11}i.hour=$n(t,n,a,o,r?.round);break}case`minute`:i.minute=$n(e.minute,n,0,59,r?.round);break;case`second`:i.second=$n(e.second,n,0,59,r?.round);break;case`millisecond`:i.millisecond=$n(e.millisecond,n,0,999,r?.round);break;default:throw Error(`Unsupported field `+t)}return i}function $n(e,t,n,r,i=!1){if(i){e+=Math.sign(t),e0?Math.ceil(e/i)*i:Math.floor(e/i)*i,e>r&&(e=n)}else e+=t,er&&(e=n+(e-r-1));return e}function er(e,t){let n;if(t.years!=null&&t.years!==0||t.months!=null&&t.months!==0||t.weeks!=null&&t.weeks!==0||t.days!=null&&t.days!==0){let r=Ln(jn(e),{years:t.years,months:t.months,weeks:t.weeks,days:t.days});n=Dn(r,e.timeZone)}else n=yn(e)-e.offset;n+=t.milliseconds||0,n+=(t.seconds||0)*1e3,n+=(t.minutes||0)*6e4,n+=(t.hours||0)*36e5;let r=kn(n,e.timeZone);return Mn(r,e.calendar)}function tr(e,t){return er(e,Un(t))}function nr(e,t,n,r){switch(t){case`hour`:{let t=0,i=23;if(r?.hourCycle===12){let n=e.hour>=12;t=n?12:0,i=n?23:11}let a=jn(e),o=Mn(Kn(a,{hour:t}),new Xt),s=[Dn(o,e.timeZone,`earlier`),Dn(o,e.timeZone,`later`)].filter(t=>kn(t,e.timeZone).day===o.day)[0],c=Mn(Kn(a,{hour:i}),new Xt),l=[Dn(c,e.timeZone,`earlier`),Dn(c,e.timeZone,`later`)].filter(t=>kn(t,e.timeZone).day===c.day).pop(),u=yn(e)-e.offset,d=Math.floor(u/In),f=u%In;return u=$n(d,n,Math.floor(s/In),Math.floor(l/In),r?.round)*In+f,Mn(kn(u,e.timeZone),e.calendar)}case`minute`:case`second`:case`millisecond`:return Qn(e,t,n,r);case`era`:case`year`:case`month`:case`day`:{let i=Zn(jn(e),t,n,r),a=Dn(i,e.timeZone);return Mn(kn(a,e.timeZone),e.calendar)}default:throw Error(`Unsupported field `+t)}}function rr(e,t,n){let r=jn(e),i=Kn(Gn(r,t),t);if(i.compare(r)===0)return e;let a=Dn(i,e.timeZone,n);return Mn(kn(a,e.timeZone),e.calendar)}const ir=[`hours`,`minutes`,`seconds`],ar=[`years`,`months`,`weeks`,`days`,...ir];function or(e){return`${String(e.hour).padStart(2,`0`)}:${String(e.minute).padStart(2,`0`)}:${String(e.second).padStart(2,`0`)}${e.millisecond?String(e.millisecond/1e3).slice(1):``}`}function sr(e){let t=Mn(e,new Xt),n;return n=t.era===`BC`?t.year===1?`0000`:`-`+String(Math.abs(1-t.year)).padStart(6,`00`):String(t.year).padStart(4,`0`),`${n}-${String(t.month).padStart(2,`0`)}-${String(t.day).padStart(2,`0`)}`}function cr(e){return`${sr(e)}T${or(e)}`}function lr(e){let t=Math.sign(e)<0?`-`:`+`;e=Math.abs(e);let n=Math.floor(e/36e5),r=e%36e5/6e4;return`${t}${String(n).padStart(2,`0`)}:${String(r).padStart(2,`0`)}`}function ur(e){return`${cr(e)}${lr(e.offset)}[${e.timeZone}]`}function dr(e,t){if(t.has(e))throw TypeError(`Cannot initialize the same private elements twice on an object`)}function fr(e,t,n){dr(e,t),t.set(e,n)}function pr(e){let t=typeof e[0]==`object`?e.shift():new Xt,n;if(typeof e[0]==`string`)n=e.shift();else{let e=t.getEras();n=e[e.length-1]}let r=e.shift(),i=e.shift(),a=e.shift();return[t,n,r,i,a]}var mr=new WeakMap,hr=class e{copy(){return this.era?new e(this.calendar,this.era,this.year,this.month,this.day):new e(this.calendar,this.year,this.month,this.day)}add(e){return Ln(this,e)}subtract(e){return Wn(this,e)}set(e){return Gn(this,e)}cycle(e,t,n){return Zn(this,e,t,n)}toDate(e){return On(this,e)}toString(){return sr(this)}compare(e){return ln(this,e)}constructor(...e){fr(this,mr,{writable:!0,value:void 0});let[t,n,r,i,a]=pr(e);this.calendar=t,this.era=n,this.year=r,this.month=i,this.day=a,Hn(this)}},gr=new WeakMap,_r=class e{copy(){return this.era?new e(this.calendar,this.era,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond):new e(this.calendar,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond)}add(e){return Ln(this,e)}subtract(e){return Wn(this,e)}set(e){return Gn(Kn(this,e),e)}cycle(e,t,n){switch(e){case`era`:case`year`:case`month`:case`day`:return Zn(this,e,t,n);default:return Qn(this,e,t,n)}}toDate(e,t){return On(this,e,t)}toString(){return cr(this)}compare(e){let t=ln(this,e);return t===0?un(this,jn(e)):t}constructor(...e){fr(this,gr,{writable:!0,value:void 0});let[t,n,r,i,a]=pr(e);this.calendar=t,this.era=n,this.year=r,this.month=i,this.day=a,this.hour=e.shift()||0,this.minute=e.shift()||0,this.second=e.shift()||0,this.millisecond=e.shift()||0,Hn(this)}},vr=new WeakMap,yr=class e{copy(){return this.era?new e(this.calendar,this.era,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond):new e(this.calendar,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond)}add(e){return er(this,e)}subtract(e){return tr(this,e)}set(e,t){return rr(this,e,t)}cycle(e,t,n){return nr(this,e,t,n)}toDate(){return Pn(this)}toString(){return ur(this)}toAbsoluteString(){return this.toDate().toISOString()}compare(e){return this.toDate().getTime()-Nn(e,this.timeZone).toDate().getTime()}constructor(...e){fr(this,vr,{writable:!0,value:void 0});let[t,n,r,i,a]=pr(e),o=e.shift(),s=e.shift();this.calendar=t,this.era=n,this.year=r,this.month=i,this.day=a,this.timeZone=o,this.offset=s,this.hour=e.shift()||0,this.minute=e.shift()||0,this.second=e.shift()||0,this.millisecond=e.shift()||0,Hn(this)}};const br=[[1868,9,8],[1912,7,30],[1926,12,25],[1989,1,8],[2019,5,1]],xr=[[1912,7,29],[1926,12,24],[1989,1,7],[2019,4,30]],Sr=[1867,1911,1925,1988,2018],Cr=[`meiji`,`taisho`,`showa`,`heisei`,`reiwa`];function wr(e){let t=br.findIndex(([t,n,r])=>e.year=0){let[,n,r]=br[t];e.month=Math.max(n,e.month),e.month===n&&(e.day=Math.max(r,e.day))}}getEras(){return Cr}getYearsInEra(e){let t=Cr.indexOf(e.era),n=br[t],r=br[t+1];if(r==null)return 9999-n[0]+1;let i=r[0]-n[0];return(e.month0?[`minguo`,t]:[`before_minguo`,1-t]}var Pr=class extends Xt{fromJulianDay(e){let t=super.fromJulianDay(e),n=qt(t.era,t.year),[r,i]=Nr(n);return new hr(this,r,i,t.month,t.day)}toJulianDay(e){return super.toJulianDay(Fr(e))}getEras(){return[`before_minguo`,`minguo`]}balanceDate(e){let[t,n]=Nr(Mr(e));e.era=t,e.year=n}isInverseEra(e){return e.era===`before_minguo`}getDaysInMonth(e){return super.getDaysInMonth(Fr(e))}getYearsInEra(e){return e.era===`before_minguo`?9999:9999-jr}constructor(...e){super(...e),this.identifier=`roc`}};function Fr(e){let[t,n]=Jt(Mr(e));return new hr(t,n,e.month,e.day)}const Ir=1948320,Lr=[0,31,62,93,124,155,186,216,246,276,306,336];var Rr=class{fromJulianDay(e){let t=e-Ir,n=1+Math.floor((33*t+3)/12053),r=365*(n-1)+Math.floor((8*n+21)/33),i=t-r,a=i<216?Math.floor(i/31):Math.floor((i-6)/30),o=i-Lr[a]+1;return new hr(this,n,a+1,o)}toJulianDay(e){let t=Ir-1+365*(e.year-1)+Math.floor((8*e.year+21)/33);return t+=Lr[e.month-1],t+=e.day,t}getMonthsInYear(){return 12}getDaysInMonth(e){if(e.month<=6)return 31;if(e.month<=11)return 30;let t=Ut(25*e.year+11,33)<8;return t?30:29}getEras(){return[`AP`]}getYearsInEra(){return 9377}constructor(){this.identifier=`persian`}};const zr=78,Br=80;var Vr=class extends Xt{fromJulianDay(e){let t=super.fromJulianDay(e),n=t.year-zr,r=e-Gt(t.era,t.year,1,1),i;r=8&&(a+=(e.month-7)*30),a+=e.day-1,a)}getDaysInMonth(e){return e.month===1&&Kt(e.year+zr)||e.month>=2&&e.month<=6?31:30}getYearsInEra(){return 9919}getEras(){return[`saka`]}balanceDate(){}constructor(...e){super(...e),this.identifier=`indian`}};const Hr=1948440,Ur=1948439,Wr=1300,Gr=1600,Kr=460322;function qr(e,t,n,r){return r+Math.ceil(29.5*(n-1))+(t-1)*354+Math.floor((3+11*t)/30)+e-1}function Jr(e,t,n){let r=Math.floor((30*(n-t)+10646)/10631),i=Math.min(12,Math.ceil((n-(29+qr(t,r,1,1)))/29.5)+1),a=n-qr(t,r,i,1)+1;return new hr(e,r,i,a)}function Yr(e){return(14+11*e)%30<11}var Xr=class{fromJulianDay(e){return Jr(this,Hr,e)}toJulianDay(e){return qr(Hr,e.year,e.month,e.day)}getDaysInMonth(e){let t=29+e.month%2;return e.month===12&&Yr(e.year)&&t++,t}getMonthsInYear(){return 12}getDaysInYear(e){return Yr(e.year)?355:354}getYearsInEra(){return 9665}getEras(){return[`AH`]}constructor(){this.identifier=`islamic-civil`}},Zr=class extends Xr{fromJulianDay(e){return Jr(this,Ur,e)}toJulianDay(e){return qr(Ur,e.year,e.month,e.day)}constructor(...e){super(...e),this.identifier=`islamic-tbla`}};const Qr=`qgpUDckO1AbqBmwDrQpVBakGkgepC9QF2gpcBS0NlQZKB1QLagutBa4ETwoXBYsGpQbVCtYCWwmdBE0KJg2VDawFtgm6AlsKKwWVCsoG6Qr0AnYJtgJWCcoKpAvSC9kF3AJtCU0FpQpSC6ULtAW2CVcFlwJLBaMGUgdlC2oFqworBZUMSg2lDcoF1gpXCasESwmlClILagt1BXYCtwhbBFUFqQW0BdoJ3QRuAjYJqgpUDbIN1QXaAlsJqwRVCkkLZAtxC7QFtQpVCiUNkg7JDtQG6QprCasEkwpJDaQNsg25CroEWworBZUKKgtVC1wFvQQ9Ah0JlQpKC1oLbQW2AjsJmwRVBqkGVAdqC2wFrQpVBSkLkgupC9QF2gpaBasKlQVJB2QHqgu1BbYCVgpNDiULUgtqC60FrgIvCZcESwalBqwG1gpdBZ0ETQoWDZUNqgW1BdoCWwmtBJUFygbkBuoK9QS2AlYJqgpUC9IL2QXqAm0JrQSVCkoLpQuyBbUJ1gSXCkcFkwZJB1ULagVrCisFiwpGDaMNygXWCtsEawJLCaUKUgtpC3UFdgG3CFsCKwVlBbQF2gntBG0BtgimClINqQ3UBdoKWwmrBFMGKQdiB6kLsgW1ClUFJQuSDckO0gbpCmsFqwRVCikNVA2qDbUJugQ7CpsETQqqCtUK2gJdCV4ELgqaDFUNsga5BroEXQotBZUKUguoC7QLuQXaAloJSgukDdEO6AZqC20FNQWVBkoNqA3UDdoGWwWdAisGFQtKC5ULqgWuCi4JjwwnBZUGqgbWCl0FnQI=`;let $r,ei;function ti(e){return Kr+ei[e-Wr]}function ni(e,t){let n=e-Wr,r=1<<11-(t-1);return($r[n]&r)===0?29:30}function ri(e,t){let n=ti(e);for(let r=1;rr)return super.fromJulianDay(e);{let e=Wr-1,n=1,r=1;for(;r>0;){e++,r=t-ti(e)+1;let i=ii(e);if(r===i){n=12;break}else if(rt;)r-=t,n++,t=ni(e,n);break}}return new hr(this,e,n,t-ri(e,n)+1)}}toJulianDay(e){return e.yearGr?super.toJulianDay(e):Hr+ri(e.year,e.month)+(e.day-1)}getDaysInMonth(e){return e.yearGr?super.getDaysInMonth(e):ni(e.year,e.month)}getDaysInYear(e){return e.yearGr?super.getDaysInYear(e):ii(e.year)}constructor(){if(super(),this.identifier=`islamic-umalqura`,$r||=new Uint16Array(Uint8Array.from(atob(Qr),e=>e.charCodeAt(0)).buffer),!ei){ei=new Uint32Array(Gr-Wr+1);let e=0;for(let t=Wr;t<=Gr;t++){ei[t-Wr]=e;for(let n=1;n<=12;n++)e+=ni(t,n)}}}};const oi=347997,si=1080,ci=24*si,li=29,ui=12*si+793,di=li*ci+ui;function fi(e){return Ut(e*7+1,19)<7}function pi(e){let t=Math.floor((235*e-234)/19),n=12084+13753*t,r=t*29+Math.floor(n/25920);return Ut(3*(r+1),7)<3&&(r+=1),r}function mi(e){let t=pi(e-1),n=pi(e),r=pi(e+1);return r-n===356?2:n-t===382?1:0}function hi(e){return pi(e)+mi(e)}function gi(e){return hi(e+1)-hi(e)}function _i(e){let t=gi(e);switch(t>380&&(t-=30),t){case 353:return 0;case 354:return 1;case 355:return 2}}function vi(e,t){if(t>=6&&!fi(e)&&t++,t===4||t===7||t===9||t===11||t===13)return 29;let n=_i(e);return t===2?n===2?30:29:t===3?n===0?29:30:t===6?fi(e)?30:0:30}var yi=class{fromJulianDay(e){let t=e-oi,n=t*ci/di,r=Math.floor((19*n+234)/235)+1,i=hi(r),a=Math.floor(t-i);for(;a<1;)r--,i=hi(r),a=Math.floor(t-i);let o=1,s=0;for(;s6?e.month--:!fi(t.year)&&fi(e.year)&&t.month>6&&e.month++)}constructor(){this.identifier=`hebrew`}};const bi=1723856,xi=1824665,Si=5500;function Ci(e,t,n,r){return e+365*t+Math.floor(t/4)+30*(n-1)+r-1}function wi(e,t){let n=Math.floor(4*(t-e)/1461),r=1+Math.floor((t-Ci(e,n,1,1))/30),i=t+1-Ci(e,n,r,1);return[n,r,i]}function Ti(e){return Math.floor(e%4/3)}function Ei(e,t){return t%13==0?Ti(e)+5:30}var Di=class{fromJulianDay(e){let[t,n,r]=wi(bi,e),i=`AM`;return t<=0&&(i=`AA`,t+=Si),new hr(this,i,t,n,r)}toJulianDay(e){let t=e.year;return e.era===`AA`&&(t-=Si),Ci(bi,t,e.month,e.day)}getDaysInMonth(e){return Ei(e.year,e.month)}getMonthsInYear(){return 13}getDaysInYear(e){return 365+Ti(e.year)}getYearsInEra(e){return e.era===`AA`?9999:9991}getEras(){return[`AA`,`AM`]}constructor(){this.identifier=`ethiopic`}},Oi=class extends Di{fromJulianDay(e){let[t,n,r]=wi(bi,e);return t+=Si,new hr(this,`AA`,t,n,r)}getEras(){return[`AA`]}getYearsInEra(){return 9999}constructor(...e){super(...e),this.identifier=`ethioaa`}},ki=class extends Di{fromJulianDay(e){let[t,n,r]=wi(xi,e),i=`CE`;return t<=0&&(i=`BCE`,t=1-t),new hr(this,i,t,n,r)}toJulianDay(e){let t=e.year;return e.era===`BCE`&&(t=1-t),Ci(xi,t,e.month,e.day)}getDaysInMonth(e){let t=e.year;return e.era===`BCE`&&(t=1-t),Ei(t,e.month)}isInverseEra(e){return e.era===`BCE`}balanceDate(e){e.year<=0&&(e.era=e.era===`BCE`?`CE`:`BCE`,e.year=1-e.year)}getEras(){return[`BCE`,`CE`]}getYearsInEra(e){return e.era===`BCE`?9999:9715}constructor(...e){super(...e),this.identifier=`coptic`}};function Ai(e){switch(e){case`buddhist`:return new kr;case`ethiopic`:return new Di;case`ethioaa`:return new Oi;case`coptic`:return new ki;case`hebrew`:return new yi;case`indian`:return new Vr;case`islamic-civil`:return new Xr;case`islamic-tbla`:return new Zr;case`islamic-umalqura`:return new ai;case`japanese`:return new Er;case`persian`:return new Rr;case`roc`:return new Pr;case`gregory`:default:return new Xt}}let ji=new Map;var Mi=class{format(e){return this.formatter.format(e)}formatToParts(e){return this.formatter.formatToParts(e)}formatRange(e,t){if(typeof this.formatter.formatRange==`function`)return this.formatter.formatRange(e,t);if(t= start date`);return`${this.formatter.format(e)} \u{2013} ${this.formatter.format(t)}`}formatRangeToParts(e,t){if(typeof this.formatter.formatRangeToParts==`function`)return this.formatter.formatRangeToParts(e,t);if(t= start date`);let n=this.formatter.formatToParts(e),r=this.formatter.formatToParts(t);return[...n.map(e=>({...e,source:`startRange`})),{type:`literal`,value:` – `,source:`shared`},...r.map(e=>({...e,source:`endRange`}))]}resolvedOptions(){let e=this.formatter.resolvedOptions();return Ri()&&(this.resolvedHourCycle||=zi(e.locale,this.options),e.hourCycle=this.resolvedHourCycle,e.hour12=this.resolvedHourCycle===`h11`||this.resolvedHourCycle===`h12`),e.calendar===`ethiopic-amete-alem`&&(e.calendar=`ethioaa`),e}constructor(e,t={}){this.formatter=Pi(e,t),this.options=t}};const Ni={true:{ja:`h11`},false:{}};function Pi(e,t={}){if(typeof t.hour12==`boolean`&&Ii()){t={...t};let n=Ni[String(t.hour12)][e.split(`-`)[0]],r=t.hour12?`h12`:`h23`;t.hourCycle=n??r,delete t.hour12}let n=e+(t?Object.entries(t).sort((e,t)=>e[0]e.type===`hour`).value,10),i=parseInt(n.formatToParts(new Date(2020,2,3,23)).find(e=>e.type===`hour`).value,10);if(r===0&&i===23)return`h23`;if(r===24&&i===23)return`h24`;if(r===0&&i===11)return`h11`;if(r===12&&i===11)return`h12`;throw Error(`Unexpected hour cycle result`)}let Bi=new Map,Vi=!1;try{Vi=new Intl.NumberFormat(`de-DE`,{signDisplay:`exceptZero`}).resolvedOptions().signDisplay===`exceptZero`}catch{}let Hi=!1;try{Hi=new Intl.NumberFormat(`de-DE`,{style:`unit`,unit:`degree`}).resolvedOptions().style===`unit`}catch{}const Ui={degree:{narrow:{default:`°`,"ja-JP":` 度`,"zh-TW":`度`,"sl-SI":` °`}}};var Wi=class{format(e){let t=``;if(t=!Vi&&this.options.signDisplay!=null?Ki(this.numberFormatter,this.options.signDisplay,e):this.numberFormatter.format(e),this.options.style===`unit`&&!Hi){var n;let{unit:e,unitDisplay:r=`short`,locale:i}=this.resolvedOptions();if(!e)return t;let a=(n=Ui[e])?.[r];t+=a[i]||a.default}return t}formatToParts(e){return this.numberFormatter.formatToParts(e)}formatRange(e,t){if(typeof this.numberFormatter.formatRange==`function`)return this.numberFormatter.formatRange(e,t);if(t= start date`);return`${this.format(e)} \u{2013} ${this.format(t)}`}formatRangeToParts(e,t){if(typeof this.numberFormatter.formatRangeToParts==`function`)return this.numberFormatter.formatRangeToParts(e,t);if(t= start date`);let n=this.numberFormatter.formatToParts(e),r=this.numberFormatter.formatToParts(t);return[...n.map(e=>({...e,source:`startRange`})),{type:`literal`,value:` – `,source:`shared`},...r.map(e=>({...e,source:`endRange`}))]}resolvedOptions(){let e=this.numberFormatter.resolvedOptions();return!Vi&&this.options.signDisplay!=null&&(e={...e,signDisplay:this.options.signDisplay}),!Hi&&this.options.style===`unit`&&(e={...e,style:`unit`,unit:this.options.unit,unitDisplay:this.options.unitDisplay}),e}constructor(e,t={}){this.numberFormatter=Gi(e,t),this.options=t}};function Gi(e,t={}){let{numberingSystem:n}=t;if(n&&e.includes(`-nu-`)&&(e.includes(`-u-`)||(e+=`-u-`),e+=`-nu-${n}`),t.style===`unit`&&!Hi){var r;let{unit:e,unitDisplay:n=`short`}=t;if(!e)throw Error(`unit option must be provided with style: "unit"`);if(!(r=Ui[e])?.[n])throw Error(`Unsupported unit ${e} with unitDisplay = ${n}`);t={...t,style:`decimal`}}let i=e+(t?Object.entries(t).sort((e,t)=>e[0]0||Object.is(n,0):t===`exceptZero`&&(Object.is(n,-0)||Object.is(n,0)?n=Math.abs(n):r=n>0),r){let t=e.format(-n),r=e.format(n),i=t.replace(r,``).replace(/\u200e|\u061C/,``);[...i].length!==1&&console.warn(`@react-aria/i18n polyfill for NumberFormat signDisplay: Unsupported case`);let a=t.replace(r,`!!!`).replace(i,`+`).replace(`!!!`,r);return a}else return e.format(n)}}const qi=RegExp(`^.*\\(.*\\).*$`),Ji=[`latn`,`arab`,`hanidec`,`deva`,`beng`];var Yi=class{parse(e){return Zi(this.locale,this.options,e).parse(e)}isValidPartialNumber(e,t,n){return Zi(this.locale,this.options,e).isValidPartialNumber(e,t,n)}getNumberingSystem(e){return Zi(this.locale,this.options,e).options.numberingSystem}constructor(e,t={}){this.locale=e,this.options=t}};const Xi=new Map;function Zi(e,t,n){let r=Qi(e,t);if(!e.includes(`-nu-`)&&!r.isValidPartialNumber(n)){for(let i of Ji)if(i!==r.options.numberingSystem){let r=Qi(e+(e.includes(`-u-`)?`-nu-`:`-u-nu-`)+i,t);if(r.isValidPartialNumber(n))return r}}return r}function Qi(e,t){let n=e+(t?Object.entries(t).sort((e,t)=>e[0]-1&&(t=`-${t}`)}let n=t?+t:NaN;if(isNaN(n))return NaN;if(this.options.style===`percent`){var r,i;let e={...this.options,style:`decimal`,minimumFractionDigits:Math.min(((r=this.options.minimumFractionDigits)??0)+2,20),maximumFractionDigits:Math.min(((i=this.options.maximumFractionDigits)??0)+2,20)};return new Yi(this.locale,e).parse(new Wi(this.locale,e).format(n))}return this.options.currencySign===`accounting`&&qi.test(e)&&(n=-1*n),n}sanitize(e){return e=e.replace(this.symbols.literals,``),this.symbols.minusSign&&(e=e.replace(`-`,this.symbols.minusSign)),this.options.numberingSystem===`arab`&&(this.symbols.decimal&&(e=e.replace(`,`,this.symbols.decimal),e=e.replace(`،`,this.symbols.decimal)),this.symbols.group&&(e=ra(e,`.`,this.symbols.group))),this.options.locale===`fr-FR`&&(e=ra(e,`.`,` `)),e}isValidPartialNumber(e,t=-1/0,n=1/0){return e=this.sanitize(e),this.symbols.minusSign&&e.startsWith(this.symbols.minusSign)&&t<0?e=e.slice(this.symbols.minusSign.length):this.symbols.plusSign&&e.startsWith(this.symbols.plusSign)&&n>0&&(e=e.slice(this.symbols.plusSign.length)),this.symbols.group&&e.startsWith(this.symbols.group)||this.symbols.decimal&&e.indexOf(this.symbols.decimal)>-1&&this.options.maximumFractionDigits===0?!1:(this.symbols.group&&(e=ra(e,this.symbols.group,``)),e=e.replace(this.symbols.numeral,``),this.symbols.decimal&&(e=e.replace(this.symbols.decimal,``)),e.length===0)}constructor(e,t={}){this.locale=e,this.formatter=new Intl.NumberFormat(e,t),this.options=this.formatter.resolvedOptions(),this.symbols=na(e,this.formatter,this.options,t);var n,r;this.options.style===`percent`&&(((n=this.options.minimumFractionDigits)??0)>18||((r=this.options.maximumFractionDigits)??0)>18)&&console.warn(`NumberParser cannot handle percentages with greater than 18 decimal places, please reduce the number in your options.`)}};const ea=new Set([`decimal`,`fraction`,`integer`,`minusSign`,`plusSign`,`group`]),ta=[0,4,2,1,11,20,3,7,100,21,.1,1.1];function na(e,t,n,r){var i,a,o,s;let c=new Intl.NumberFormat(e,{...n,minimumSignificantDigits:1,maximumSignificantDigits:21,roundingIncrement:1,roundingPriority:`auto`,roundingMode:`halfExpand`}),l=c.formatToParts(-10000.111),u=c.formatToParts(10000.111),d=ta.map(e=>c.formatToParts(e));var f;let p=(f=(i=l.find(e=>e.type===`minusSign`))?.value)??`-`,m=(a=u.find(e=>e.type===`plusSign`))?.value;!m&&(r?.signDisplay===`exceptZero`||r?.signDisplay===`always`)&&(m=`+`);let h=new Intl.NumberFormat(e,{...n,minimumFractionDigits:2,maximumFractionDigits:2}).formatToParts(.001),g=(o=h.find(e=>e.type===`decimal`))?.value,_=(s=l.find(e=>e.type===`group`))?.value,v=l.filter(e=>!ea.has(e.type)).map(e=>ia(e.value)),y=d.flatMap(e=>e.filter(e=>!ea.has(e.type)).map(e=>ia(e.value))),b=[...new Set([...v,...y])].sort((e,t)=>t.length-e.length),x=b.length===0?RegExp(`[\\p{White_Space}]`,`gu`):RegExp(`${b.join(`|`)}|[\\p{White_Space}]`,`gu`),S=[...new Intl.NumberFormat(n.locale,{useGrouping:!1}).format(9876543210)].reverse(),C=new Map(S.map((e,t)=>[e,t])),w=RegExp(`[${S.join(``)}]`,`g`),T=e=>String(C.get(e));return{minusSign:p,plusSign:m,decimal:g,group:_,literals:x,numeral:w,index:T}}function ra(e,t,n){return e.replaceAll?e.replaceAll(t,n):e.split(t).join(n)}function ia(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function aa(e,t){let n=[];for(let r=0;r0}function pa(e,t){return e.compare(t)<=0}function ma(e,t){return e.compare(t)>=0}function ha(e,t,n){return ma(e,t)&&pa(e,n)}function ga(e,t,n){return fa(e,t)&&da(e,n)}function _a(e,t,n){let r=on(e,n);return t>r?e.subtract({days:r+7-t}):t===r?e:e.subtract({days:r-t})}function va(e,t,n){let r=on(e,n),i=t===0?6:t-1;return r===i?e:r>i?e.add({days:7-r+i}):e.add({days:i-r})}function ya(e,t,n,r){if(n===void 0&&r===void 0)return!0;let i=e.add({days:1});if(r!=null&&r(i)||n!=null&&n(i))return!1;let a=t;for(;i.compare(a)<0;)if(i=i.add({days:1}),r!=null&&r(i)||n!=null&&n(i))return!1;return!0}function ba(e,t){let n=[],r=e.add({days:1}),i=t;for(;r.compare(i)<0;)n.push(r),r=r.add({days:1});return n}function xa(e){let{dateObj:t,weekStartsOn:n,fixedWeeks:r,locale:i}=e,a=ua(t),o=Array.from({length:a},(e,n)=>t.set({day:n+1})),s=mn(t),c=hn(t),l=_a(s,n,i),u=va(c,n,i),d=ba(l.subtract({days:1}),s),f=ba(c,u.add({days:1})),p=d.length+o.length+f.length;if(r&&p<42){let e=42-p,n=f[f.length-1];n||=hn(t);let r=Array.from({length:e},(e,t)=>{let r=t+1;return n.add({days:r})});f.push(...r)}let m=d.concat(o,f),h=aa(m,7);return{value:t,cells:m,rows:h}}function Sa(e){let{numberOfMonths:t,dateObj:n,...r}=e,i=[];if(!t||t===1)return i.push(xa({...r,dateObj:n})),i;i.push(xa({...r,dateObj:n}));for(let e=1;e{let n=y(r,t);if(n||n===null)return n;throw Error(`Injection \`${r.toString()}\` not found. Component must be used within ${Array.isArray(e)?`one of the following components: ${e.join(`, `)}`:`\`${e}\``}`)},e=>(F(r,e),e)]}function Ca(e,t,n){let r=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&r.addEventListener(e,t,{once:!0}),r.dispatchEvent(i)}function wa(e,t=-1/0,n=1/0){return Math.min(n,Math.max(t,e))}function Ta(e,t){let n=e,r=t.toString(),i=r.indexOf(`.`),a=i>=0?r.length-i:0;if(a>0){let e=10**a;n=Math.round(n*e)/e}return n}function Ea(e,t,n,r){t=Number(t),n=Number(n);let i=(e-(Number.isNaN(t)?0:t))%r,a=Ta(Math.abs(i)*2>=r?e+Math.sign(i)*(r-Math.abs(i)):e-i,r);return Number.isNaN(t)?!Number.isNaN(n)&&a>n&&(a=Math.floor(Ta(n/r,r))*r):an&&(a=t+Math.floor(Ta((n-t)/r,r))*r),a=Ta(a,r),a}function Da(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,`default`)?e.default:e}var Oa=function e(t,n){if(t===n)return!0;if(t&&n&&typeof t==`object`&&typeof n==`object`){if(t.constructor!==n.constructor)return!1;var r,i,a;if(Array.isArray(t)){if(r=t.length,r!=n.length)return!1;for(i=r;i--!==0;)if(!e(t[i],n[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if(a=Object.keys(t),r=a.length,r!==Object.keys(n).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(n,a[i]))return!1;for(i=r;i--!==0;){var o=a[i];if(!e(t[o],n[o]))return!1}return!0}return t!==t&&n!==n};const ka=Da(Oa);function Aa(e,t){if(e.length!==t.length)return!1;for(let n=0;nka(e,t)),i=e.findIndex(e=>ka(e,n));if(r===-1||i===-1)return[];let[a,o]=[r,i].sort((e,t)=>e-t);return e.slice(a,o+1)}const Ma=typeof document<`u`;function Na(e){return e==null}function Pa(e){let{defaultValue:t,defaultPlaceholder:n,granularity:r=`day`,locale:i=`en`}=e;if(Array.isArray(t)&&t.length)return t.at(-1).copy();if(t&&!Array.isArray(t))return t.copy();if(n)return n.copy();let a=new Date,o=a.getFullYear(),s=a.getMonth()+1,c=a.getDate(),l=[`hour`,`minute`,`second`],u=new Mi(i),d=Ai(u.resolvedOptions().calendar);return l.includes(r??`day`)?Mn(new _r(o,s,c,0,0,0),d):Mn(new hr(o,s,c),d)}const Fa=`ach.af.am.an.ar.ast.az.be.bg.bn.br.bs.ca.cak.ckb.cs.cy.da.de.dsb.el.en.eo.es.et.eu.fa.ff.fi.fr.fy.ga.gd.gl.he.hr.hsb.hu.ia.id.it.ja.ka.kk.kn.ko.lb.lo.lt.lv.meh.ml.ms.nl.nn.no.oc.pl.pt.rm.ro.ru.sc.scn.sk.sl.sr.sv.szl.tg.th.tr.uk.zh-CN.zh-TW`.split(`.`),Ia=[`year`,`month`,`day`],La={ach:{year:`mwaka`,month:`dwe`,day:`nino`},af:{year:`jjjj`,month:`mm`,day:`dd`},am:{year:`ዓዓዓዓ`,month:`ሚሜ`,day:`ቀቀ`},an:{year:`aaaa`,month:`mm`,day:`dd`},ar:{year:`سنة`,month:`شهر`,day:`يوم`},ast:{year:`aaaa`,month:`mm`,day:`dd`},az:{year:`iiii`,month:`aa`,day:`gg`},be:{year:`гггг`,month:`мм`,day:`дд`},bg:{year:`гггг`,month:`мм`,day:`дд`},bn:{year:`yyyy`,month:`মিমি`,day:`dd`},br:{year:`bbbb`,month:`mm`,day:`dd`},bs:{year:`gggg`,month:`mm`,day:`dd`},ca:{year:`aaaa`,month:`mm`,day:`dd`},cak:{year:`jjjj`,month:`ii`,day:`q'q'`},ckb:{year:`ساڵ`,month:`مانگ`,day:`ڕۆژ`},cs:{year:`rrrr`,month:`mm`,day:`dd`},cy:{year:`bbbb`,month:`mm`,day:`dd`},da:{year:`åååå`,month:`mm`,day:`dd`},de:{year:`jjjj`,month:`mm`,day:`tt`},dsb:{year:`llll`,month:`mm`,day:`źź`},el:{year:`εεεε`,month:`μμ`,day:`ηη`},en:{year:`yyyy`,month:`mm`,day:`dd`},eo:{year:`jjjj`,month:`mm`,day:`tt`},es:{year:`aaaa`,month:`mm`,day:`dd`},et:{year:`aaaa`,month:`kk`,day:`pp`},eu:{year:`uuuu`,month:`hh`,day:`ee`},fa:{year:`سال`,month:`ماه`,day:`روز`},ff:{year:`hhhh`,month:`ll`,day:`ññ`},fi:{year:`vvvv`,month:`kk`,day:`pp`},fr:{year:`aaaa`,month:`mm`,day:`jj`},fy:{year:`jjjj`,month:`mm`,day:`dd`},ga:{year:`bbbb`,month:`mm`,day:`ll`},gd:{year:`bbbb`,month:`mm`,day:`ll`},gl:{year:`aaaa`,month:`mm`,day:`dd`},he:{year:`שנה`,month:`חודש`,day:`יום`},hr:{year:`gggg`,month:`mm`,day:`dd`},hsb:{year:`llll`,month:`mm`,day:`dd`},hu:{year:`éééé`,month:`hh`,day:`nn`},ia:{year:`aaaa`,month:`mm`,day:`dd`},id:{year:`tttt`,month:`bb`,day:`hh`},it:{year:`aaaa`,month:`mm`,day:`gg`},ja:{year:` 年 `,month:`月`,day:`日`},ka:{year:`წწწწ`,month:`თთ`,day:`რრ`},kk:{year:`жжжж`,month:`аа`,day:`кк`},kn:{year:`ವವವವ`,month:`ಮಿಮೀ`,day:`ದಿದಿ`},ko:{year:`연도`,month:`월`,day:`일`},lb:{year:`jjjj`,month:`mm`,day:`dd`},lo:{year:`ປປປປ`,month:`ດດ`,day:`ວວ`},lt:{year:`mmmm`,month:`mm`,day:`dd`},lv:{year:`gggg`,month:`mm`,day:`dd`},meh:{year:`aaaa`,month:`mm`,day:`dd`},ml:{year:`വർഷം`,month:`മാസം`,day:`തീയതി`},ms:{year:`tttt`,month:`mm`,day:`hh`},nl:{year:`jjjj`,month:`mm`,day:`dd`},nn:{year:`åååå`,month:`mm`,day:`dd`},no:{year:`åååå`,month:`mm`,day:`dd`},oc:{year:`aaaa`,month:`mm`,day:`jj`},pl:{year:`rrrr`,month:`mm`,day:`dd`},pt:{year:`aaaa`,month:`mm`,day:`dd`},rm:{year:`oooo`,month:`mm`,day:`dd`},ro:{year:`aaaa`,month:`ll`,day:`zz`},ru:{year:`гггг`,month:`мм`,day:`дд`},sc:{year:`aaaa`,month:`mm`,day:`dd`},scn:{year:`aaaa`,month:`mm`,day:`jj`},sk:{year:`rrrr`,month:`mm`,day:`dd`},sl:{year:`llll`,month:`mm`,day:`dd`},sr:{year:`гггг`,month:`мм`,day:`дд`},sv:{year:`åååå`,month:`mm`,day:`dd`},szl:{year:`rrrr`,month:`mm`,day:`dd`},tg:{year:`сссс`,month:`мм`,day:`рр`},th:{year:`ปปปป`,month:`ดด`,day:`วว`},tr:{year:`yyyy`,month:`aa`,day:`gg`},uk:{year:`рррр`,month:`мм`,day:`дд`},"zh-CN":{year:`年`,month:`月`,day:`日`},"zh-TW":{year:`年`,month:`月`,day:`日`}};function Ra(e){if(Ba(e))return La[e];{let t=Wa(e);return Ba(t)?La[t]:La.en}}function za(e,t,n){return Va(e)?Ra(n)[e]:Ua(e)?t:Ha(e)?`––`:``}function Ba(e){return Fa.includes(e)}function Va(e){return Ia.includes(e)}function Ha(e){return e===`hour`||e===`minute`||e===`second`}function Ua(e){return e===`era`||e===`dayPeriod`}function Wa(e){return Intl.Locale?new Intl.Locale(e).language:e.split(`-`)[0]}const Ga=[`day`,`month`,`year`],Ka=[`hour`,`minute`,`second`,`dayPeriod`],qa=[...Ga,...Ka];function Ja(e){return Ga.includes(e)}function Ya(e){return qa.includes(e)}function Xa(e,t){let n={year:`numeric`,month:`2-digit`,day:`2-digit`,hour:`2-digit`,minute:`2-digit`,second:`2-digit`,timeZoneName:`short`,hourCycle:t===24?`h24`:void 0,hour12:t===24?!1:void 0};return e===`day`&&(delete n.second,delete n.hour,delete n.minute,delete n.timeZoneName),e===`hour`&&(delete n.minute,delete n.second),e===`minute`&&delete n.second,n}function Za(e){let t=e.querySelector(`[data-selected]`);if(t)return t.focus();let n=e.querySelector(`[data-today]`);if(n)return n.focus();let r=e.querySelector(`[data-radix-vue-calendar-day]`);if(r)return r.focus()}function Qa(e,t){var n;let r=ie();return H(()=>{r.value=e()},{...t,flush:(n=void 0,`sync`)}),ee(r)}function $a(e,t){let n,r,i,a=L(!0),o=()=>{a.value=!0,i()};V(e,o,{flush:`sync`});let s=typeof t==`function`?t:t.get,c=typeof t==`function`?void 0:t.set,l=f((e,t)=>(r=e,i=t,{get(){return a.value&&(n=s(),a.value=!1),r(),n},set(e){c?.(e)}}));return Object.isExtensible(l)&&(l.trigger=o),l}function eo(e){return g()?(j(e),!0):!1}function to(){let e=new Set,t=t=>{e.delete(t)};return{on:n=>{e.add(n);let r=()=>t(n);return eo(r),{off:r}},off:t,trigger:(...t)=>Promise.all(Array.from(e).map(e=>e(...t)))}}function no(e){let t=!1,n,r=m(!0);return(...i)=>(t||(n=r.run(()=>e(...i)),t=!0),n)}function ro(e){let t=0,n,r,i=()=>{--t,r&&t<=0&&(r.stop(),n=void 0,r=void 0)};return(...a)=>(t+=1,n||(r=m(!0),n=r.run(()=>e(...a))),eo(i),n)}function io(e){return typeof e==`function`?e():B(e)}function ao(e){if(!b(e))return I(e);let t=new Proxy({},{get(t,n,r){return B(Reflect.get(e.value,n,r))},set(t,n,r){return b(e.value[n])&&!b(r)?e.value[n].value=r:e.value[n]=r,!0},deleteProperty(t,n){return Reflect.deleteProperty(e.value,n)},has(t,n){return Reflect.has(e.value,n)},ownKeys(){return Object.keys(e.value)},getOwnPropertyDescriptor(){return{enumerable:!0,configurable:!0}}});return I(t)}function oo(e){return ao(a(e))}const so=typeof window<`u`&&typeof document<`u`;typeof WorkerGlobalScope<`u`&&globalThis instanceof WorkerGlobalScope;const co=e=>typeof e<`u`,lo=e=>e!=null,uo=Object.prototype.toString,fo=e=>uo.call(e)===`[object Object]`,po=()=>{},mo=ho();function ho(){var e,t;return so&&(e=window==null?void 0:window.navigator)?.userAgent&&(/iP(?:ad|hone|od)/.test(window.navigator.userAgent)||(t=window==null?void 0:window.navigator)?.maxTouchPoints>2&&/iPad|Macintosh/.test(window==null?void 0:window.navigator.userAgent))}function go(e,t){function n(...n){return new Promise((r,i)=>{Promise.resolve(e(()=>t.apply(this,n),{fn:t,thisArg:this,args:n})).then(r).catch(i)})}return n}function _o(e,t={}){let n,r,i=po,a=e=>{clearTimeout(e),i(),i=po};return o=>{let s=io(e),c=io(t.maxWait);return n&&a(n),s<=0||c!==void 0&&c<=0?(r&&(a(r),r=null),Promise.resolve(o())):new Promise((e,l)=>{i=t.rejectOnCancel?l:e,c&&!r&&(r=setTimeout(()=>{n&&a(n),r=null,e(o())},c)),n=setTimeout(()=>{r&&a(r),r=null,e(o())},s)})}}function vo(e){return h()}function yo(e,t=1e4){return f((n,r)=>{let i=io(e),a,o=()=>setTimeout(()=>{i=io(e),r()},io(t));return eo(()=>{clearTimeout(a)}),{get(){return n(),i},set(e){i=e,r(),clearTimeout(a),a=o()}}})}function bo(e,t=200,n={}){return go(_o(t,n),e)}function xo(e,t){vo()&&O(e,t)}function So(e,t=!0,n){vo()?A(e,n):t?e():w(e)}function Co(e,t,n={}){let{immediate:r=!0}=n,i=L(!1),a=null;function o(){a&&(clearTimeout(a),a=null)}function s(){i.value=!1,o()}function c(...n){o(),i.value=!0,a=setTimeout(()=>{i.value=!1,a=null,e(...n)},io(t))}return r&&(i.value=!0,so&&c()),eo(s),{isPending:ee(i),start:c,stop:s}}function wo(e=1e3,t={}){let{controls:n=!1,callback:r}=t,i=Co(r??po,e,t),o=a(()=>!i.isPending.value);return n?{ready:o,...i}:o}function To(e,t,n){let r=V(e,(...e)=>(w(()=>r()),t(...e)),n);return r}function Eo(e){var t;let n=io(e);return(t=n?.$el)??n}const Do=so?window:void 0;function Oo(...e){let t,n,r,i;if(typeof e[0]==`string`||Array.isArray(e[0])?([n,r,i]=e,t=Do):[t,n,r,i]=e,!t)return po;Array.isArray(n)||(n=[n]),Array.isArray(r)||(r=[r]);let a=[],o=()=>{a.forEach(e=>e()),a.length=0},s=(e,t,n,r)=>(e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)),c=V(()=>[Eo(t),io(i)],([e,t])=>{if(o(),!e)return;let i=fo(t)?{...t}:t;a.push(...n.flatMap(t=>r.map(n=>s(e,t,n,i))))},{immediate:!0,flush:`post`}),l=()=>{c(),o()};return eo(l),l}function ko(e){return typeof e==`function`?e:typeof e==`string`?t=>t.key===e:Array.isArray(e)?t=>e.includes(t.key):()=>!0}function Ao(...e){let t,n,r={};e.length===3?(t=e[0],n=e[1],r=e[2]):e.length===2?typeof e[1]==`object`?(t=!0,n=e[0],r=e[1]):(t=e[0],n=e[1]):(t=!0,n=e[0]);let{target:i=Do,eventName:a=`keydown`,passive:o=!1,dedupe:s=!1}=r,c=ko(t);return Oo(i,a,e=>{e.repeat&&io(s)||c(e)&&n(e)},o)}function jo(){let e=L(!1),t=h();return t&&A(()=>{e.value=!0},t),e}function Mo(e){let t=jo();return a(()=>(t.value,!!e()))}function No(e,t,n={}){let{window:r=Do,...i}=n,o,s=Mo(()=>r&&`MutationObserver`in r),c=()=>{o&&(o.disconnect(),o=void 0)},l=a(()=>{let t=io(e),n=(Array.isArray(t)?t:[t]).map(Eo).filter(lo);return new Set(n)}),u=V(()=>l.value,e=>{c(),s.value&&e.size&&(o=new MutationObserver(t),e.forEach(e=>o.observe(e,i)))},{immediate:!0,flush:`post`}),d=()=>o?.takeRecords(),f=()=>{c(),u()};return eo(f),{isSupported:s,stop:f,takeRecords:d}}function Po(e={}){var t;let{window:n=Do,deep:r=!0,triggerOnRemoval:i=!1}=e,a=(t=e.document)??n?.document,o=()=>{var e;let t=a?.activeElement;if(r)for(;t!=null&&t.shadowRoot;)t=(e=t?.shadowRoot)?.activeElement;return t},s=L(),c=()=>{s.value=o()};return n&&(Oo(n,`blur`,e=>{e.relatedTarget===null&&c()},!0),Oo(n,`focus`,c,!0)),i&&No(a,e=>{e.filter(e=>e.removedNodes.length).map(e=>Array.from(e.removedNodes)).flat().forEach(e=>{e===s.value&&c()})},{childList:!0,subtree:!0}),c(),s}function Fo(e,t={}){let{immediate:n=!0,fpsLimit:r=void 0,window:i=Do}=t,a=L(!1),o=r?1e3/r:null,s=0,c=null;function l(t){if(!a.value||!i)return;s||=t;let n=t-s;if(o&&nnull,()=>t.proxy.$el);return N(n.trigger),A(n.trigger),n}function Ro(e,t,n={}){let{window:r=Do,...i}=n,o,s=Mo(()=>r&&`ResizeObserver`in r),c=()=>{o&&(o.disconnect(),o=void 0)},l=a(()=>Array.isArray(e)?e.map(e=>Eo(e)):[Eo(e)]),u=V(l,e=>{if(c(),s.value&&r){o=new ResizeObserver(t);for(let t of e)t&&o.observe(t,i)}},{immediate:!0,flush:`post`}),d=()=>{c(),u()};return eo(d),{isSupported:s,stop:d}}function zo(e,t={}){let n=Po(t),r=a(()=>Eo(e));return{focused:a(()=>r.value&&n.value?r.value.contains(n.value):!1)}}function Bo(e=Lo()){let t=ie(),n=()=>{let n=Eo(e);n&&(t.value=n.parentElement)};return So(n),V(()=>io(e),n),t}function q(e,t,n,r={}){var i,o,s;let{clone:c=!1,passive:l=!1,eventName:u,deep:d=!1,defaultValue:f,shouldEmit:p}=r,m=h(),g=n||m?.emit||(i=m?.$emit)?.bind(m)||(s=(o=m?.proxy)?.$emit)?.bind(m?.proxy),_=u;t||=`modelValue`,_||=`update:${t.toString()}`;let v=e=>c?typeof c==`function`?c(e):Io(e):e,y=()=>co(e[t])?v(e[t]):f,b=e=>{p?p(e)&&g(_,e):g(_,e)};if(l){let n=y(),r=L(n),i=!1;return V(()=>e[t],e=>{i||(i=!0,r.value=v(e),w(()=>i=!1))}),V(r,n=>{!i&&(n!==e[t]||d)&&b(n)},{deep:d}),r}else return a({get(){return y()},set(e){b(e)}})}function Vo(e){return e?e.flatMap(e=>e.type===t?Vo(e.children):[e]):[]}function J(){let e=document.activeElement;if(e==null)return null;for(;e!=null&&e.shadowRoot!=null&&e.shadowRoot.activeElement!=null;)e=e.shadowRoot.activeElement;return e}const Ho=[`INPUT`,`TEXTAREA`];function Uo(e,t,n,r={}){if(!t||r.enableIgnoredElement&&Ho.includes(t.nodeName))return null;let{arrowKeyOptions:i=`both`,attributeName:a=`[data-radix-vue-collection-item]`,itemsArray:o=[],loop:s=!0,dir:c=`ltr`,preventScroll:l=!0,focus:u=!1}=r,[d,f,p,m,h,g]=[e.key===`ArrowRight`,e.key===`ArrowLeft`,e.key===`ArrowUp`,e.key===`ArrowDown`,e.key===`Home`,e.key===`End`],_=p||m,v=d||f;if(!h&&!g&&(!_&&!v||i===`vertical`&&v||i===`horizontal`&&_))return null;let y=n?Array.from(n.querySelectorAll(a)):o;if(!y.length)return null;l&&e.preventDefault();let b=null;return v||_?b=Wo(y,t,{goForward:_?m:c===`ltr`?d:f,loop:s}):h?b=y.at(0)||null:g&&(b=y.at(-1)||null),u&&b?.focus(),b}function Wo(e,t,n,r=e.length){if(--r===0)return null;let i=e.indexOf(t),a=n.goForward?i+1:i-1;if(!n.loop&&(a<0||a>=e.length))return null;let o=(a+e.length)%e.length,s=e[o];return s?s.hasAttribute(`disabled`)&&s.getAttribute(`disabled`)!==`false`?Wo(e,s,n,r):s:null}function Go(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return t!==null&&t!==Object.prototype&&Object.getPrototypeOf(t)!==null||Symbol.iterator in e?!1:Symbol.toStringTag in e?Object.prototype.toString.call(e)===`[object Module]`:!0}function Ko(e,t,n=`.`,r){if(!Go(t))return Ko(e,{},n,r);let i=Object.assign({},t);for(let t in e){if(t===`__proto__`||t===`constructor`)continue;let a=e[t];a!=null&&(r&&r(i,t,a,n)||(Array.isArray(a)&&Array.isArray(i[t])?i[t]=[...a,...i[t]]:Go(a)&&Go(i[t])?i[t]=Ko(a,i[t],(n?`${n}.`:``)+t.toString(),r):i[t]=a))}return i}function qo(e){return(...t)=>t.reduce((t,n)=>Ko(t,n,``,e),{})}const Jo=qo(),[Yo,Xo]=K(`ConfigProvider`),Zo=p({inheritAttrs:!1,__name:`ConfigProvider`,props:{dir:{default:`ltr`},scrollBody:{type:[Boolean,Object],default:!0},nonce:{default:void 0},useId:{type:Function,default:void 0}},setup(e){let t=e,{dir:n,scrollBody:r,nonce:i}=z(t);return Xo({dir:n,scrollBody:r,nonce:i,useId:t.useId}),(e,t)=>R(e.$slots,`default`)}});let Qo=`useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict`,$o=(e=21)=>{let t=``,n=e;for(;n--;)t+=Qo[Math.random()*64|0];return t};const es=ro(()=>{let e=L(new Map),t=L(),n=a(()=>{for(let t of e.value.values())if(t)return!0;return!1}),r=Yo({scrollBody:L(!0)}),i=null,o=()=>{document.body.style.paddingRight=``,document.body.style.marginRight=``,document.body.style.pointerEvents=``,document.body.style.removeProperty(`--scrollbar-width`),document.body.style.overflow=t.value??``,mo&&i?.(),t.value=void 0};return V(n,(e,n)=>{var a;if(!so)return;if(!e){n&&o();return}t.value===void 0&&(t.value=document.body.style.overflow);let s=window.innerWidth-document.documentElement.clientWidth,c={padding:s,margin:0},l=(a=r.scrollBody)!=null&&a.value?typeof r.scrollBody.value==`object`?Jo({padding:r.scrollBody.value.padding===!0?s:r.scrollBody.value.padding,margin:r.scrollBody.value.margin===!0?s:r.scrollBody.value.margin},c):c:{padding:0,margin:0};s>0&&(document.body.style.paddingRight=typeof l.padding==`number`?`${l.padding}px`:String(l.padding),document.body.style.marginRight=typeof l.margin==`number`?`${l.margin}px`:String(l.margin),document.body.style.setProperty(`--scrollbar-width`,`${s}px`),document.body.style.overflow=`hidden`),mo&&(i=Oo(document,`touchmove`,e=>rs(e),{passive:!1})),w(()=>{document.body.style.pointerEvents=`none`,document.body.style.overflow=`hidden`})},{immediate:!0,flush:`sync`}),e});function ts(e){let t=$o(6),n=es();n.value.set(t,e??!1);let r=a({get:()=>n.value.get(t)??!1,set:e=>n.value.set(t,e)});return xo(()=>{n.value.delete(t)}),r}function ns(e){let t=window.getComputedStyle(e);if(t.overflowX===`scroll`||t.overflowY===`scroll`||t.overflowX===`auto`&&e.clientWidth1?!0:(t.preventDefault&&t.cancelable&&t.preventDefault(),!1)}const os=`data-radix-vue-collection-item`;function ss(e,t=os){let n=e??Symbol();return{createCollection:e=>{let r=L([]);function i(){let n=Eo(e);return n?r.value=Array.from(n.querySelectorAll(`[${t}]:not([data-disabled])`)):r.value=[]}return k(()=>{r.value=[]}),A(i),N(i),V(()=>e?.value,i,{immediate:!0}),F(n,r),r},injectCollection:()=>y(n,L([]))}}function cs(e){let t=L(e);function n(){return t.value}function r(e){t.value=e}function i(e,n){return new Mi(t.value,n).format(e)}function a(e,t=!0){return la(e)&&t?i(oa(e),{dateStyle:`long`,timeStyle:`long`}):i(oa(e),{dateStyle:`long`})}function o(e,n={}){return new Mi(t.value,{month:`long`,year:`numeric`,...n}).format(e)}function s(e,n={}){return new Mi(t.value,{month:`long`,...n}).format(e)}function c(){let e=cn(pn());return[1,2,3,4,5,6,7,8,9,10,11,12].map(t=>({label:s(oa(e.set({month:t}))),value:t}))}function l(e,n={}){return new Mi(t.value,{year:`numeric`,...n}).format(e)}function u(e,n){return ca(e)?new Mi(t.value,{...n,timeZone:e.timeZone}).formatToParts(oa(e)):new Mi(t.value,n).formatToParts(oa(e))}function d(e,n=`narrow`){return new Mi(t.value,{weekday:n}).format(e)}function f(e){var n;return(n=new Mi(t.value,{hour:`numeric`,minute:`numeric`}).formatToParts(e).find(e=>e.type===`dayPeriod`))?.value===`PM`?`PM`:`AM`}let p={year:`numeric`,month:`numeric`,day:`numeric`,hour:`numeric`,minute:`numeric`,second:`numeric`};function m(e,t,n={}){let r={...p,...n},i=u(e,r).find(e=>e.type===t);return i?i.value:``}return{setLocale:r,getLocale:n,fullMonth:s,fullYear:l,fullMonthAndYear:o,toParts:u,custom:i,part:m,dayPeriod:f,selectedDate:a,dayOfWeek:d,getMonths:c}}function Y(e){let t=Yo({dir:L(`ltr`)});return a(()=>{var n;return e?.value||(n=t.dir)?.value||`ltr`})}function ls(e){let t=h(),n=t?.type.emits,i={};return n!=null&&n.length||console.warn(`No emitted event found. Please check component: ${t?.type.__name}`),n?.forEach(t=>{i[oe(r(t))]=(...n)=>e(t,...n)}),i}let us=0;function ds(){H(e=>{if(!so)return;let t=document.querySelectorAll(`[data-radix-focus-guard]`);document.body.insertAdjacentElement(`afterbegin`,t[0]??fs()),document.body.insertAdjacentElement(`beforeend`,t[1]??fs()),us++,e(()=>{us===1&&document.querySelectorAll(`[data-radix-focus-guard]`).forEach(e=>e.remove()),us--})})}function fs(){let e=document.createElement(`span`);return e.setAttribute(`data-radix-focus-guard`,``),e.tabIndex=0,e.style.outline=`none`,e.style.opacity=`0`,e.style.position=`fixed`,e.style.pointerEvents=`none`,e}function ps(e){return a(()=>{var t;return io(e)?!!((t=Eo(e))!=null&&t.closest(`form`)):!0})}function ms(e){let t=h(),n=Object.keys(t?.type.props??{}).reduce((e,n)=>{let r=(t?.type.props[n]).default;return r!==void 0&&(e[n]=r),e},{}),i=le(e);return a(()=>{let e={},a=t?.vnode.props??{};return Object.keys(a).forEach(t=>{e[r(t)]=a[t]}),Object.keys({...n,...e}).reduce((e,t)=>(i.value[t]!==void 0&&(e[t]=i.value[t]),e),{})})}function hs(e,t){let n=ms(e),r=t?ls(t):{};return a(()=>({...n.value,...r}))}function X(){let e=h(),t=L(),n=a(()=>{var e,n;return[`#text`,`#comment`].includes((e=t.value)?.$el.nodeName)?(n=t.value)?.$el.nextElementSibling:Eo(t)}),r=Object.assign({},e.exposed),i={};for(let t in e.props)Object.defineProperty(i,t,{enumerable:!0,configurable:!0,get:()=>e.props[t]});if(Object.keys(r).length>0)for(let e in r)Object.defineProperty(i,e,{enumerable:!0,configurable:!0,get:()=>r[e]});Object.defineProperty(i,`$el`,{enumerable:!0,configurable:!0,get:()=>e.vnode.el}),e.exposed=i;function o(n){t.value=n,n&&(Object.defineProperty(i,`$el`,{enumerable:!0,configurable:!0,get:()=>n instanceof Element?n:n.$el}),e.exposed=i)}return{forwardRef:o,currentRef:t,currentElement:n}}function gs(e,t){let n=yo(!1,300),r=L(null),i=to();function a(){r.value=null,n.value=!1}function o(e,t){let i=e.currentTarget,a={x:e.clientX,y:e.clientY},o=_s(a,i.getBoundingClientRect()),s=vs(a,o),c=ys(t.getBoundingClientRect()),l=xs([...s,...c]);r.value=l,n.value=!0}return H(n=>{if(e.value&&t.value){let r=e=>o(e,t.value),i=t=>o(t,e.value);e.value.addEventListener(`pointerleave`,r),t.value.addEventListener(`pointerleave`,i),n(()=>{var n,a;(n=e.value)==null||n.removeEventListener(`pointerleave`,r),(a=t.value)==null||a.removeEventListener(`pointerleave`,i)})}}),H(n=>{var o;if(r.value){let s=n=>{var o,s;if(!r.value)return;let c=n.target,l={x:n.clientX,y:n.clientY},u=(o=e.value)?.contains(c)||(s=t.value)?.contains(c),d=!bs(l,r.value),f=!!c.closest(`[data-grace-area-trigger]`);u?a():(d||f)&&(a(),i.trigger())};(o=e.value)==null||o.ownerDocument.addEventListener(`pointermove`,s),n(()=>{var t;return(t=e.value)?.ownerDocument.removeEventListener(`pointermove`,s)})}}),{isPointerInTransit:n,onPointerExit:i.on}}function _s(e,t){let n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,r,i,a)){case a:return`left`;case i:return`right`;case n:return`top`;case r:return`bottom`;default:throw Error(`unreachable`)}}function vs(e,t,n=5){let r=[];switch(t){case`top`:r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case`bottom`:r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case`left`:r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case`right`:r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function ys(e){let{top:t,right:n,bottom:r,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:r},{x:i,y:r}]}function bs(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;er!=l>r&&n<(c-o)*(r-s)/(l-s)+o&&(i=!i)}return i}function xs(e){let t=e.slice();return t.sort((e,t)=>e.xt.x?1:e.yt.y?1:0),Ss(t)}function Ss(e){if(e.length<=1)return e.slice();let t=[];for(let n=0;n=2;){let e=t[t.length-1],n=t[t.length-2];if((e.x-n.x)*(r.y-n.y)>=(e.y-n.y)*(r.x-n.x))t.pop();else break}t.push(r)}t.pop();let n=[];for(let t=e.length-1;t>=0;t--){let r=e[t];for(;n.length>=2;){let e=n[n.length-1],t=n[n.length-2];if((e.x-t.x)*(r.y-t.y)>=(e.y-t.y)*(r.x-t.x))n.pop();else break}n.push(r)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var Cs=function(e){if(typeof document>`u`)return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},ws=new WeakMap,Ts=new WeakMap,Es={},Ds=0,Os=function(e){return e&&(e.host||Os(e.parentNode))},ks=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=Os(t);return n&&e.contains(n)?n:(console.error(`aria-hidden`,t,`in not contained inside`,e,`. Doing nothing`),null)}).filter(function(e){return!!e})},As=function(e,t,n,r){var i=ks(t,Array.isArray(e)?e:[e]);Es[n]||(Es[n]=new WeakMap);var a=Es[n],o=[],s=new Set,c=new Set(i),l=function(e){!e||s.has(e)||(s.add(e),l(e.parentNode))};i.forEach(l);var u=function(e){!e||c.has(e)||Array.prototype.forEach.call(e.children,function(e){if(s.has(e))u(e);else try{var t=e.getAttribute(r),i=t!==null&&t!==`false`,c=(ws.get(e)||0)+1,l=(a.get(e)||0)+1;ws.set(e,c),a.set(e,l),o.push(e),c===1&&i&&Ts.set(e,!0),l===1&&e.setAttribute(n,`true`),i||e.setAttribute(r,`true`)}catch(t){console.error(`aria-hidden: cannot operate on `,e,t)}})};return u(t),s.clear(),Ds++,function(){o.forEach(function(e){var t=ws.get(e)-1,i=a.get(e)-1;ws.set(e,t),a.set(e,i),t||(Ts.has(e)||e.removeAttribute(r),Ts.delete(e)),i||e.removeAttribute(n)}),Ds--,Ds||(ws=new WeakMap,ws=new WeakMap,Ts=new WeakMap,Es={})}},js=function(e,t,n){n===void 0&&(n=`data-aria-hidden`);var r=Array.from(Array.isArray(e)?e:[e]),i=Cs(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll(`[aria-live]`))),As(r,i,n,`aria-hidden`)):function(){return null}};function Ms(e){let t;V(()=>Eo(e),e=>{e?t=js(e):t&&t()}),M(()=>{t&&t()})}let Ns=0;function Z(e,t=`radix`){if(e)return e;let n=Yo({useId:void 0});return de?`${t}-${de()}`:n.useId?`${t}-${n.useId()}`:`${t}-${++Ns}`}function Ps(e,t){let n=L(),r=(r,i)=>{if(t.multiple&&Array.isArray(e.value))if(t.selectionBehavior===`replace`)e.value=[r],n.value=r;else{let t=e.value.findIndex(e=>i(e));t===-1?e.value.push(r):e.value.splice(t,1)}else t.selectionBehavior===`replace`?e.value={...r}:!Array.isArray(e.value)&&i(e.value)?e.value=void 0:e.value={...r};return e.value};function i(r,i,a,o){var s;if(!(n!=null&&n.value)||!t.multiple||!Array.isArray(e.value))return;let c=(s=a().filter(e=>e.ref.dataset.disabled!==``).find(e=>e.ref===i))?.value;if(!c)return;let l=null;switch(r){case`prev`:case`next`:l=ja(o,n.value,c);break;case`first`:l=ja(o,n.value,o?.[0]);break;case`last`:l=ja(o,n.value,o?.[o.length-1]);break}e.value=l}return{firstValue:n,onSelectItem:r,handleMultipleReplace:i}}function Fs(e){let t=L(),n=a(()=>{var e;return(e=t.value)?.width??0}),r=a(()=>{var e;return(e=t.value)?.height??0});return A(()=>{let n=Eo(e);if(n){t.value={width:n.offsetWidth,height:n.offsetHeight};let e=new ResizeObserver(e=>{if(!Array.isArray(e)||!e.length)return;let r=e[0],i,a;if(`borderBoxSize`in r){let e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;i=t.inlineSize,a=t.blockSize}else i=n.offsetWidth,a=n.offsetHeight;t.value={width:i,height:a}});return e.observe(n,{box:`border-box`}),()=>e.unobserve(n)}else t.value=void 0}),{width:n,height:r}}function Is(e,t){let n=L(e);function r(e){return t[n.value][e]??n.value}return{state:n,dispatch:e=>{n.value=r(e)}}}const Ls=`data-item-text`;function Rs(e){let t=yo(``,1e3);return{search:t,handleTypeaheadSearch:(n,r)=>{if(!(e!=null&&e.value)&&!r)return;t.value+=n;let i=e?.value??r,a=J(),o=i.map(e=>{var t;return{ref:e,textValue:(t=(e.querySelector(`[${Ls}]`)??e).textContent)?.trim()??``}}),s=o.find(e=>e.ref===a),c=o.map(e=>e.textValue),l=Bs(c,t.value,s?.textValue),u=o.find(e=>e.textValue===l);return u&&u.ref.focus(),u?.ref},resetTypeahead:()=>{t.value=``}}}function zs(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function Bs(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=zs(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}function Vs(){return{ALT:`Alt`,ARROW_DOWN:`ArrowDown`,ARROW_LEFT:`ArrowLeft`,ARROW_RIGHT:`ArrowRight`,ARROW_UP:`ArrowUp`,BACKSPACE:`Backspace`,CAPS_LOCK:`CapsLock`,CONTROL:`Control`,DELETE:`Delete`,END:`End`,ENTER:`Enter`,ESCAPE:`Escape`,F1:`F1`,F10:`F10`,F11:`F11`,F12:`F12`,F2:`F2`,F3:`F3`,F4:`F4`,F5:`F5`,F6:`F6`,F7:`F7`,F8:`F8`,F9:`F9`,HOME:`Home`,META:`Meta`,PAGE_DOWN:`PageDown`,PAGE_UP:`PageUp`,SHIFT:`Shift`,SPACE:` `,TAB:`Tab`,CTRL:`Control`,ASTERISK:`*`,SPACE_CODE:`Space`}}const Hs=p({name:`PrimitiveSlot`,inheritAttrs:!1,setup(t,{attrs:n,slots:r}){return()=>{var t,a;if(!r.default)return null;let o=Vo(r.default()),s=o.findIndex(t=>t.type!==e);if(s===-1)return o;let c=o[s];(t=c.props)==null||delete t.ref;let l=c.props?C(n,c.props):n;n.class&&(a=c.props)!=null&&a.class&&delete c.props.class;let u=i(c,l);for(let e in l)e.startsWith(`on`)&&(u.props||={},u.props[e]=l[e]);return o.length===1?u:(o[s]=u,o)}}}),Q=p({name:`Primitive`,inheritAttrs:!1,props:{asChild:{type:Boolean,default:!1},as:{type:[String,Object],default:`div`}},setup(e,{attrs:t,slots:n}){let r=e.asChild?`template`:e.as;return typeof r==`string`&&[`area`,`img`,`input`].includes(r)?()=>v(r,t):r===`template`?()=>v(Hs,t,{default:n.default}):()=>v(e.as,t,{default:n.default})}});function Us(){let e=L(),t=a(()=>{var t,n;return[`#text`,`#comment`].includes((t=e.value)?.$el.nodeName)?(n=e.value)?.$el.nextElementSibling:Eo(e)});return{primitiveElement:e,currentElement:t}}const[Ws,Gs]=K(`CollapsibleRoot`),Ks=p({__name:`CollapsibleRoot`,props:{defaultOpen:{type:Boolean,default:!1},open:{type:Boolean,default:void 0},disabled:{type:Boolean},asChild:{type:Boolean},as:{}},emits:[`update:open`],setup(e,{expose:t,emit:n}){let r=e,i=q(r,`open`,n,{defaultValue:r.defaultOpen,passive:r.open===void 0}),a=q(r,`disabled`);return Gs({contentId:``,disabled:a,open:i,onOpenToggle:()=>{i.value=!i.value}}),t({open:i}),X(),(e,t)=>(P(),s(B(Q),{as:e.as,"as-child":r.asChild,"data-state":B(i)?`open`:`closed`,"data-disabled":B(a)?``:void 0},{default:U(()=>[R(e.$slots,`default`,{open:B(i)})]),_:3},8,[`as`,`as-child`,`data-state`,`data-disabled`]))}}),qs=p({__name:`CollapsibleTrigger`,props:{asChild:{type:Boolean},as:{default:`button`}},setup(e){let t=e;X();let n=Ws();return(e,r)=>{var i,a;return P(),s(B(Q),{type:e.as===`button`?`button`:void 0,as:e.as,"as-child":t.asChild,"aria-controls":B(n).contentId,"aria-expanded":B(n).open.value,"data-state":B(n).open.value?`open`:`closed`,"data-disabled":(i=B(n).disabled)!=null&&i.value?``:void 0,disabled:(a=B(n).disabled)?.value,onClick:B(n).onOpenToggle},{default:U(()=>[R(e.$slots,`default`)]),_:3},8,[`type`,`as`,`as-child`,`aria-controls`,`aria-expanded`,`data-state`,`data-disabled`,`disabled`,`onClick`])}}});function Js(e,t){var n;let r=L({}),i=L(`none`),o=L(e),s=e.value?`mounted`:`unmounted`,c,l=(n=t.value)?.ownerDocument.defaultView??Do,{state:u,dispatch:d}=Is(s,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}}),f=e=>{var n;if(so){let r=new CustomEvent(e,{bubbles:!1,cancelable:!1});(n=t.value)==null||n.dispatchEvent(r)}};V(e,async(e,n)=>{var a;let o=n!==e;if(await w(),o){let o=i.value,s=Ys(t.value);e?(d(`MOUNT`),f(`enter`),s===`none`&&f(`after-enter`)):s===`none`||(a=r.value)?.display===`none`?(d(`UNMOUNT`),f(`leave`),f(`after-leave`)):n&&o!==s?(d(`ANIMATION_OUT`),f(`leave`)):(d(`UNMOUNT`),f(`after-leave`))}},{immediate:!0});let p=e=>{let n=Ys(t.value),r=n.includes(e.animationName),i=u.value===`mounted`?`enter`:`leave`;if(e.target===t.value&&r&&(f(`after-${i}`),d(`ANIMATION_END`),!o.value)){let e=t.value.style.animationFillMode;t.value.style.animationFillMode=`forwards`,c=l?.setTimeout(()=>{var n;(n=t.value)?.style.animationFillMode===`forwards`&&(t.value.style.animationFillMode=e)})}e.target===t.value&&n===`none`&&d(`ANIMATION_END`)},m=e=>{e.target===t.value&&(i.value=Ys(t.value))},h=V(t,(e,t)=>{e?(r.value=getComputedStyle(e),e.addEventListener(`animationstart`,m),e.addEventListener(`animationcancel`,p),e.addEventListener(`animationend`,p)):(d(`ANIMATION_END`),c!==void 0&&l?.clearTimeout(c),t?.removeEventListener(`animationstart`,m),t?.removeEventListener(`animationcancel`,p),t?.removeEventListener(`animationend`,p))},{immediate:!0}),g=V(u,()=>{let e=Ys(t.value);i.value=u.value===`mounted`?e:`none`});return M(()=>{h(),g()}),{isPresent:a(()=>[`mounted`,`unmountSuspended`].includes(u.value))}}function Ys(e){return e&&getComputedStyle(e).animationName||`none`}const Xs=p({name:`Presence`,props:{present:{type:Boolean,required:!0},forceMount:{type:Boolean}},slots:{},setup(e,{slots:t,expose:n}){var r;let{present:i,forceMount:a}=z(e),o=L(),{isPresent:s}=Js(i,o);n({present:s});let c=t.default({present:s});c=Vo(c||[]);let l=h();if(c&&c?.length>1){let e=(r=l?.parent)!=null&&r.type.name?`<${l.parent.type.name} />`:`component`;throw Error([`Detected an invalid children for \`${e}\` for \`Presence\` component.`,``,"Note: Presence works similarly to `v-if` directly, but it waits for animation/transition to finished before unmounting. So it expect only one direct child of valid VNode type.",`You can apply a few solutions:`,["Provide a single child element so that `presence` directive attach correctly.",`Ensure the first child is an actual element instead of a raw text node or comment node.`].map(e=>` - ${e}`).join(` `)].join(` `))}return()=>a.value||i.value||s.value?v(t.default({present:s})[0],{ref:e=>{let t=Eo(e);return typeof t?.hasAttribute>`u`||(t!=null&&t.hasAttribute(`data-radix-popper-content-wrapper`)?o.value=t.firstElementChild:o.value=t),t}}):null}}),Zs=p({inheritAttrs:!1,__name:`CollapsibleContent`,props:{forceMount:{type:Boolean},asChild:{type:Boolean},as:{}},setup(e){let t=e,n=Ws();n.contentId||=Z(void 0,`radix-vue-collapsible-content`);let r=L(),{forwardRef:i,currentElement:o}=X(),l=L(0),u=L(0),f=a(()=>n.open.value),p=L(f.value),m=L();return V(()=>{var e;return[f.value,(e=r.value)?.present]},async()=>{await w();let e=o.value;if(!e)return;m.value=m.value||{transitionDuration:e.style.transitionDuration,animationName:e.style.animationName},e.style.transitionDuration=`0s`,e.style.animationName=`none`;let t=e.getBoundingClientRect();u.value=t.height,l.value=t.width,p.value||(e.style.transitionDuration=m.value.transitionDuration,e.style.animationName=m.value.animationName)},{immediate:!0}),A(()=>{requestAnimationFrame(()=>{p.value=!1})}),(e,a)=>(P(),s(B(Xs),{ref_key:`presentRef`,ref:r,present:e.forceMount||B(n).open.value,"force-mount":!0},{default:U(()=>{var a,o;return[d(B(Q),C(e.$attrs,{id:B(n).contentId,ref:B(i),"as-child":t.asChild,as:e.as,"data-state":B(n).open.value?`open`:`closed`,"data-disabled":(a=B(n).disabled)!=null&&a.value?``:void 0,hidden:!((o=r.value)!=null&&o.present),style:{"--radix-collapsible-content-height":`${u.value}px`,"--radix-collapsible-content-width":`${l.value}px`}}),{default:U(()=>{var t;return[(t=r.value)!=null&&t.present?R(e.$slots,`default`,{key:0}):c(``,!0)]}),_:3},16,[`id`,`as-child`,`as`,`data-state`,`data-disabled`,`hidden`,`style`])]}),_:3},8,[`present`]))}});function Qs({type:e,defaultValue:t,modelValue:n}){let r=n||t;if(Na(e)&&Na(n)&&Na(t))throw Error("Either the `type` or the `value` or `default-value` prop must be defined.");if(n!==void 0&&t!==void 0&&typeof n!=typeof t)throw Error(`Invalid prop \`value\` of value \`${n}\` supplied, should be the same type as the \`defaultValue\` prop, which is \`${t}\`. The \`value\` prop must be: ${e===`single`?`- a string`:e===`multiple`?`- an array of strings`:`- a string diff --git a/assets/effect-WSjEuzC9-Of5jzyzm.js b/assets/effect-WSjEuzC9-D78WghFx.js similarity index 55% rename from assets/effect-WSjEuzC9-Of5jzyzm.js rename to assets/effect-WSjEuzC9-D78WghFx.js index f90d386dea297ab5113b9fa8be5729745e0fac45..6583aacdc2742d8495b93551d1885c7fb4b6083c 100644 --- a/assets/effect-WSjEuzC9-Of5jzyzm.js +++ b/assets/effect-WSjEuzC9-D78WghFx.js @@ -1 +1 @@ -import{__vitePreload as e}from"./index-CuCRViVh.js";import{tryImport as t}from"./index-CISmcbXk-BkTeNOgG.js";const n=async()=>{let{JSONSchema:n}=await t(e(()=>import(`./__vite-optional-peer-dep_effect_xsschema-CSjxbBMs.js`),[]),`effect`);return e=>n.make(e)};export{n as getToJsonSchemaFn}; \ No newline at end of file +import{__vitePreload as e}from"./index-CsmT0L1K.js";import{tryImport as t}from"./index-CISmcbXk-C9oju49Y.js";const n=async()=>{let{JSONSchema:n}=await t(e(()=>import(`./__vite-optional-peer-dep_effect_xsschema-CSjxbBMs.js`),[]),`effect`);return e=>n.make(e)};export{n as getToJsonSchemaFn}; \ No newline at end of file diff --git a/assets/elevenlabs-C_CpBUe4.js b/assets/elevenlabs-DPYwkmRS.js similarity index 88% rename from assets/elevenlabs-C_CpBUe4.js rename to assets/elevenlabs-DPYwkmRS.js index e81c80f401575ab7ad5d135a3d9eda70bd4193c7..f7e9a6cba500da83511f04b1685dbe57b47333a6 100644 --- a/assets/elevenlabs-C_CpBUe4.js +++ b/assets/elevenlabs-DPYwkmRS.js @@ -1 +1 @@ -import{computed as e,createBaseVNode as t,createBlock as n,createVNode as r,defineComponent as i,onMounted as a,openBlock as o,ref as s,storeToRefs as c,unref as l,useI18n as u,watch as d,withCtx as f}from"./index-CuCRViVh.js";import"./import-url-browser-DNuYZxPr.js";import"./duckdb-mvp-C3i5IjU8.js";import"./index-CISmcbXk-BkTeNOgG.js";import"./types-AwjH7X1C.js";import{useProvidersStore as p,useSpeechStore as m}from"./stores-m0eA85gd.js";import"./__vite-browser-external-CCfYMxZl.js";import"./Button-DFhzbYVt.js";import{FieldCheckbox_default as h,FieldRange_default as g}from"./src-C2QbIOor.js";import{SpeechPlayground_default as _,SpeechProviderSettings_default as v}from"./components-BFLl4u81.js";import"./composables-Cgvkd8lL.js";import"./sleep-CvjNLutj.js";import"./queue-DAKPJQl1.js";import"./queues-Dstwm1VQ.js";import"./dist-Cr2QBfS4.js";import"./webgpu-Nt9hTBpW.js";import{route_block_default as y}from"./route-block-DNPbw0zT.js";const b={flex:`~ col gap-4`},x=`elevenlabs`,S=`eleven_multilingual_v2`;var C=i({__name:`elevenlabs`,setup(i){let y={similarityBoost:.75,stability:.5,speed:1,style:0,useSpeakerBoost:!0},C=s(0),w=s(1),T=s(0),E=s(0),D=s(.5),O=s(.75),k=s(!1),A=m(),j=p(),{providers:M}=c(j),{t:N}=u(),P=e(()=>{var e;return!!(e=M.value[x])?.apiKey}),F=e(()=>A.availableVoices[x]||[]);async function I(e,t,n){let r=j.getProviderInstance(x);if(!r)throw Error(`Failed to initialize speech provider`);let i=j.getProviderConfig(x),a=i.model||S;return await A.speech(r,a,e,t,{...i,...y})}return a(async()=>{let e=j.getProviderConfig(x),t=j.getProviderMetadata(x);await t.validators.validateProviderConfig(e)?await A.loadVoicesForProvider(x):console.error(`Failed to validate provider config`,e)}),d(C,async()=>{let e=j.getProviderConfig(x);e.pitch=C.value}),d(w,async()=>{let e=j.getProviderConfig(x);e.speed=w.value}),d(T,async()=>{let e=j.getProviderConfig(x);e.volume=T.value}),d(E,async()=>{let e=j.getProviderConfig(x);e.style=E.value}),d(D,async()=>{let e=j.getProviderConfig(x);e.stability=D.value}),d(O,async()=>{let e=j.getProviderConfig(x);e.similarityBoost=O.value}),d(k,async()=>{let e=j.getProviderConfig(x);e.useSpeakerBoost=k.value}),d(M,async()=>{let e=j.getProviderConfig(x),t=j.getProviderMetadata(x);await t.validators.validateProviderConfig(e)?await A.loadVoicesForProvider(x):console.error(`Failed to validate provider config`,e)},{immediate:!0}),(e,i)=>(o(),n(l(v),{"provider-id":x,"default-model":S,"additional-settings":y},{"voice-settings":f(()=>[t(`div`,b,[r(l(g),{modelValue:C.value,"onUpdate:modelValue":i[0]||=e=>C.value=e,label:l(N)(`settings.pages.providers.provider.common.fields.field.pitch.label`),description:l(N)(`settings.pages.providers.provider.common.fields.field.pitch.description`),min:-100,max:100,step:1,"format-value":e=>`${e}%`},null,8,[`modelValue`,`label`,`description`,`format-value`]),r(l(g),{modelValue:w.value,"onUpdate:modelValue":i[1]||=e=>w.value=e,label:l(N)(`settings.pages.providers.provider.common.fields.field.speed.label`),description:l(N)(`settings.pages.providers.provider.common.fields.field.speed.description`),min:.5,max:2,step:.01},null,8,[`modelValue`,`label`,`description`]),r(l(g),{modelValue:T.value,"onUpdate:modelValue":i[2]||=e=>T.value=e,label:l(N)(`settings.pages.providers.provider.common.fields.field.volume.label`),description:l(N)(`settings.pages.providers.provider.common.fields.field.volume.description`),min:-100,max:100,step:1,"format-value":e=>`${e}%`},null,8,[`modelValue`,`label`,`description`,`format-value`]),r(l(g),{modelValue:E.value,"onUpdate:modelValue":i[3]||=e=>E.value=e,label:l(N)(`settings.pages.providers.provider.elevenlabs.fields.field.style.label`),description:l(N)(`settings.pages.providers.provider.elevenlabs.fields.field.style.description`),min:0,max:1,step:.01},null,8,[`modelValue`,`label`,`description`]),r(l(g),{modelValue:D.value,"onUpdate:modelValue":i[4]||=e=>D.value=e,label:l(N)(`settings.pages.providers.provider.elevenlabs.fields.field.stability.label`),description:l(N)(`settings.pages.providers.provider.elevenlabs.fields.field.stability.description`),min:0,max:1,step:.01},null,8,[`modelValue`,`label`,`description`]),r(l(g),{modelValue:O.value,"onUpdate:modelValue":i[5]||=e=>O.value=e,label:l(N)(`settings.pages.providers.provider.elevenlabs.fields.field.simularity-boost.label`),description:l(N)(`settings.pages.providers.provider.elevenlabs.fields.field.simularity-boost.description`),min:0,max:1,step:.01},null,8,[`modelValue`,`label`,`description`]),r(l(h),{modelValue:k.value,"onUpdate:modelValue":i[6]||=e=>k.value=e,label:l(N)(`settings.pages.providers.provider.elevenlabs.fields.field.speaker-boost.label`),description:l(N)(`settings.pages.providers.provider.elevenlabs.fields.field.speaker-boost.description`)},null,8,[`modelValue`,`label`,`description`])])]),playground:f(()=>[r(l(_),{"available-voices":F.value,"generate-speech":I,"api-key-configured":P.value,"default-text":`Hello! This is a test of the ElevenLabs voice synthesis.`},null,8,[`available-voices`,`api-key-configured`])]),_:1}))}});typeof y==`function`&&y(C);var w=C;export{w as default}; \ No newline at end of file +import{computed as e,createBaseVNode as t,createBlock as n,createVNode as r,defineComponent as i,onMounted as a,openBlock as o,ref as s,storeToRefs as c,unref as l,useI18n as u,watch as d,withCtx as f}from"./index-CsmT0L1K.js";import"./import-url-browser-DNuYZxPr.js";import"./duckdb-mvp-C3i5IjU8.js";import"./index-CISmcbXk-C9oju49Y.js";import"./types-AwjH7X1C.js";import{useProvidersStore as p,useSpeechStore as m}from"./stores-2H61GqXP.js";import"./__vite-browser-external-DPh5tFvT.js";import"./Button-D3cjyOEe.js";import{FieldCheckbox_default as h,FieldRange_default as g}from"./src-C1Sr0aqN.js";import{SpeechPlayground_default as _,SpeechProviderSettings_default as v}from"./components-DHUA669a.js";import"./composables-CgcEyUWo.js";import"./sleep-CvjNLutj.js";import"./queue-B0kER5Ap.js";import"./queues-hSEKEE3F.js";import"./dist-Cr2QBfS4.js";import"./webgpu-Nt9hTBpW.js";import{route_block_default as y}from"./route-block-DNPbw0zT.js";const b={flex:`~ col gap-4`},x=`elevenlabs`,S=`eleven_multilingual_v2`;var C=i({__name:`elevenlabs`,setup(i){let y={similarityBoost:.75,stability:.5,speed:1,style:0,useSpeakerBoost:!0},C=s(0),w=s(1),T=s(0),E=s(0),D=s(.5),O=s(.75),k=s(!1),A=m(),j=p(),{providers:M}=c(j),{t:N}=u(),P=e(()=>{var e;return!!(e=M.value[x])?.apiKey}),F=e(()=>A.availableVoices[x]||[]);async function I(e,t,n){let r=j.getProviderInstance(x);if(!r)throw Error(`Failed to initialize speech provider`);let i=j.getProviderConfig(x),a=i.model||S;return await A.speech(r,a,e,t,{...i,...y})}return a(async()=>{let e=j.getProviderConfig(x),t=j.getProviderMetadata(x);await t.validators.validateProviderConfig(e)?await A.loadVoicesForProvider(x):console.error(`Failed to validate provider config`,e)}),d(C,async()=>{let e=j.getProviderConfig(x);e.pitch=C.value}),d(w,async()=>{let e=j.getProviderConfig(x);e.speed=w.value}),d(T,async()=>{let e=j.getProviderConfig(x);e.volume=T.value}),d(E,async()=>{let e=j.getProviderConfig(x);e.style=E.value}),d(D,async()=>{let e=j.getProviderConfig(x);e.stability=D.value}),d(O,async()=>{let e=j.getProviderConfig(x);e.similarityBoost=O.value}),d(k,async()=>{let e=j.getProviderConfig(x);e.useSpeakerBoost=k.value}),d(M,async()=>{let e=j.getProviderConfig(x),t=j.getProviderMetadata(x);await t.validators.validateProviderConfig(e)?await A.loadVoicesForProvider(x):console.error(`Failed to validate provider config`,e)},{immediate:!0}),(e,i)=>(o(),n(l(v),{"provider-id":x,"default-model":S,"additional-settings":y},{"voice-settings":f(()=>[t(`div`,b,[r(l(g),{modelValue:C.value,"onUpdate:modelValue":i[0]||=e=>C.value=e,label:l(N)(`settings.pages.providers.provider.common.fields.field.pitch.label`),description:l(N)(`settings.pages.providers.provider.common.fields.field.pitch.description`),min:-100,max:100,step:1,"format-value":e=>`${e}%`},null,8,[`modelValue`,`label`,`description`,`format-value`]),r(l(g),{modelValue:w.value,"onUpdate:modelValue":i[1]||=e=>w.value=e,label:l(N)(`settings.pages.providers.provider.common.fields.field.speed.label`),description:l(N)(`settings.pages.providers.provider.common.fields.field.speed.description`),min:.5,max:2,step:.01},null,8,[`modelValue`,`label`,`description`]),r(l(g),{modelValue:T.value,"onUpdate:modelValue":i[2]||=e=>T.value=e,label:l(N)(`settings.pages.providers.provider.common.fields.field.volume.label`),description:l(N)(`settings.pages.providers.provider.common.fields.field.volume.description`),min:-100,max:100,step:1,"format-value":e=>`${e}%`},null,8,[`modelValue`,`label`,`description`,`format-value`]),r(l(g),{modelValue:E.value,"onUpdate:modelValue":i[3]||=e=>E.value=e,label:l(N)(`settings.pages.providers.provider.elevenlabs.fields.field.style.label`),description:l(N)(`settings.pages.providers.provider.elevenlabs.fields.field.style.description`),min:0,max:1,step:.01},null,8,[`modelValue`,`label`,`description`]),r(l(g),{modelValue:D.value,"onUpdate:modelValue":i[4]||=e=>D.value=e,label:l(N)(`settings.pages.providers.provider.elevenlabs.fields.field.stability.label`),description:l(N)(`settings.pages.providers.provider.elevenlabs.fields.field.stability.description`),min:0,max:1,step:.01},null,8,[`modelValue`,`label`,`description`]),r(l(g),{modelValue:O.value,"onUpdate:modelValue":i[5]||=e=>O.value=e,label:l(N)(`settings.pages.providers.provider.elevenlabs.fields.field.simularity-boost.label`),description:l(N)(`settings.pages.providers.provider.elevenlabs.fields.field.simularity-boost.description`),min:0,max:1,step:.01},null,8,[`modelValue`,`label`,`description`]),r(l(h),{modelValue:k.value,"onUpdate:modelValue":i[6]||=e=>k.value=e,label:l(N)(`settings.pages.providers.provider.elevenlabs.fields.field.speaker-boost.label`),description:l(N)(`settings.pages.providers.provider.elevenlabs.fields.field.speaker-boost.description`)},null,8,[`modelValue`,`label`,`description`])])]),playground:f(()=>[r(l(_),{"available-voices":F.value,"generate-speech":I,"api-key-configured":P.value,"default-text":`Hello! This is a test of the ElevenLabs voice synthesis.`},null,8,[`available-voices`,`api-key-configured`])]),_:1}))}});typeof y==`function`&&y(C);var w=C;export{w as default}; \ No newline at end of file diff --git a/assets/emotions-3EJrhf3a.js b/assets/emotions-Bn_F7pNT.js similarity index 81% rename from assets/emotions-3EJrhf3a.js rename to assets/emotions-Bn_F7pNT.js index 473466728e12b9d126d47539ddf25ce6606bdfb9..b15530bc94d6f622458818f98d9f72636a0055e5 100644 --- a/assets/emotions-3EJrhf3a.js +++ b/assets/emotions-Bn_F7pNT.js @@ -1 +1 @@ -import{Fragment as e,createBaseVNode as t,createElementBlock as n,createVNode as r,defineComponent as i,openBlock as a,ref as o,renderList as s,toDisplayString as c,unref as l}from"./index-CuCRViVh.js";import"./src-C2QbIOor.js";import"./Basic-SuYkQxAJ.js";import{Textarea_default as u}from"./Textarea-D04Ettdn.js";import"./sleep-CvjNLutj.js";import{useQueue as d}from"./queue-DAKPJQl1.js";import{llmInferenceEndToken as f,useEmotionsMessageQueue as p}from"./queues-Dstwm1VQ.js";const m={flex:``,"flex-col":``,"gap-2":``,"p-2":``},h={flex:``,"flex-row":``,"gap-2":``},g={"rounded-lg":``,bg:`neutral-100 dark:neutral-700`,"p-4":``},_={"w-full":``,flex:``,"flex-row":``,"gap-4":``},v={"w-full":``,"rounded-lg":``,bg:`neutral-100 dark:neutral-700`,"p-2":``},y={"w-full":``,"rounded-lg":``,bg:`neutral-100 dark:neutral-700`,"p-2":``};var b=i({__name:`emotions`,setup(i){let b=o(``),x=o([]),S=o([]),C=o(!1),w=d({handlers:[async e=>{S.value.push(e.data)}]}),T=p(w);function E(){C.value=!0;let e=b.value.split(``);for(let t of e)T.add(t);T.add(f),b.value=``,C.value=!1}return(i,o)=>(a(),n(`div`,m,[t(`div`,h,[r(l(u),{modelValue:b.value,"onUpdate:modelValue":o[0]||=e=>b.value=e,placeholder:`Message`,p:`2`,bg:`neutral-100 dark:neutral-700`,"w-full":``,"rounded-lg":``,"outline-none":``,onSubmit:E},null,8,[`modelValue`]),t(`button`,g,c(C.value?`Processing...`:`Send`),1)]),t(`div`,_,[t(`div`,v,[o[1]||=t(`h3`,{"font-normal":``},` Messages `,-1),(a(!0),n(e,null,s(x.value,e=>(a(),n(`div`,{key:e},[t(`div`,null,c(e),1)]))),128))]),t(`div`,y,[o[2]||=t(`h3`,{"font-normal":``},` Emotions `,-1),(a(!0),n(e,null,s(S.value,e=>(a(),n(`div`,{key:e},[t(`div`,null,c(e),1)]))),128))])])]))}}),x=b;export{x as default}; \ No newline at end of file +import{Fragment as e,createBaseVNode as t,createElementBlock as n,createVNode as r,defineComponent as i,openBlock as a,ref as o,renderList as s,toDisplayString as c,unref as l}from"./index-CsmT0L1K.js";import"./src-C1Sr0aqN.js";import"./Basic-MLnzojs5.js";import{Textarea_default as u}from"./Textarea-CK41gHte.js";import"./sleep-CvjNLutj.js";import{useQueue as d}from"./queue-B0kER5Ap.js";import{llmInferenceEndToken as f,useEmotionsMessageQueue as p}from"./queues-hSEKEE3F.js";const m={flex:``,"flex-col":``,"gap-2":``,"p-2":``},h={flex:``,"flex-row":``,"gap-2":``},g={"rounded-lg":``,bg:`neutral-100 dark:neutral-700`,"p-4":``},_={"w-full":``,flex:``,"flex-row":``,"gap-4":``},v={"w-full":``,"rounded-lg":``,bg:`neutral-100 dark:neutral-700`,"p-2":``},y={"w-full":``,"rounded-lg":``,bg:`neutral-100 dark:neutral-700`,"p-2":``};var b=i({__name:`emotions`,setup(i){let b=o(``),x=o([]),S=o([]),C=o(!1),w=d({handlers:[async e=>{S.value.push(e.data)}]}),T=p(w);function E(){C.value=!0;let e=b.value.split(``);for(let t of e)T.add(t);T.add(f),b.value=``,C.value=!1}return(i,o)=>(a(),n(`div`,m,[t(`div`,h,[r(l(u),{modelValue:b.value,"onUpdate:modelValue":o[0]||=e=>b.value=e,placeholder:`Message`,p:`2`,bg:`neutral-100 dark:neutral-700`,"w-full":``,"rounded-lg":``,"outline-none":``,onSubmit:E},null,8,[`modelValue`]),t(`button`,g,c(C.value?`Processing...`:`Send`),1)]),t(`div`,_,[t(`div`,v,[o[1]||=t(`h3`,{"font-normal":``},` Messages `,-1),(a(!0),n(e,null,s(x.value,e=>(a(),n(`div`,{key:e},[t(`div`,null,c(e),1)]))),128))]),t(`div`,y,[o[2]||=t(`h3`,{"font-normal":``},` Emotions `,-1),(a(!0),n(e,null,s(S.value,e=>(a(),n(`div`,{key:e},[t(`div`,null,c(e),1)]))),128))])])]))}}),x=b;export{x as default}; \ No newline at end of file diff --git a/assets/featherless-ai-BrsLkmWp.js b/assets/featherless-ai-gdrUgYDA.js similarity index 82% rename from assets/featherless-ai-BrsLkmWp.js rename to assets/featherless-ai-gdrUgYDA.js index bde1204c04b33dfeb18de01f8ac591d9c0a9773a..517c7967d01e2373e5f0548907c6f05109010b2b 100644 --- a/assets/featherless-ai-BrsLkmWp.js +++ b/assets/featherless-ai-gdrUgYDA.js @@ -1 +1 @@ -import{computed as e,createBlock as t,createVNode as n,defineComponent as r,onMounted as i,openBlock as a,storeToRefs as o,unref as s,useI18n as c,useRouter as l,watch as u,withCtx as d}from"./index-CuCRViVh.js";import"./import-url-browser-DNuYZxPr.js";import"./duckdb-mvp-C3i5IjU8.js";import"./index-CISmcbXk-BkTeNOgG.js";import"./types-AwjH7X1C.js";import{useProvidersStore as f}from"./stores-m0eA85gd.js";import"./__vite-browser-external-CCfYMxZl.js";import"./Button-DFhzbYVt.js";import"./src-C2QbIOor.js";import{ProviderAdvancedSettings_default as p,ProviderApiKeyInput_default as m,ProviderBaseUrlInput_default as h,ProviderBasicSettings_default as g,ProviderSettingsContainer_default as _,ProviderSettingsLayout_default as v}from"./components-BFLl4u81.js";import"./composables-Cgvkd8lL.js";import"./sleep-CvjNLutj.js";import"./queue-DAKPJQl1.js";import"./queues-Dstwm1VQ.js";import"./dist-Cr2QBfS4.js";import"./webgpu-Nt9hTBpW.js";import{route_block_default as y}from"./route-block-DNPbw0zT.js";const b=`featherless-ai`;var x=r({__name:`featherless-ai`,setup(r){let{t:y}=c(),x=l(),S=f(),{providers:C}=o(S),w=e(()=>S.getProviderMetadata(b)),T=e({get:()=>{var e;return(e=C.value[b])?.apiKey||``},set:e=>{C.value[b]||(C.value[b]={}),C.value[b].apiKey=e}}),E=e({get:()=>{var e;return(e=C.value[b])?.baseUrl||``},set:e=>{C.value[b]||(C.value[b]={}),C.value[b].baseUrl=e}});i(()=>{var e,t;S.initializeProvider(b),T.value=(e=C.value[b])?.apiKey||``,E.value=(t=C.value[b])?.baseUrl||``}),u([T,E],()=>{C.value[b]={...C.value[b],apiKey:T.value,baseUrl:E.value||``}});function D(){var e;C.value[b]={...(e=w.value)?.defaultOptions}}return(e,r)=>{var i,o;return a(),t(s(v),{"provider-name":(i=w.value)?.localizedName,"provider-icon":(o=w.value)?.icon,"on-back":()=>s(x).back()},{default:d(()=>[n(s(_),null,{default:d(()=>[n(s(g),{title:s(y)(`settings.pages.providers.common.section.basic.title`),description:s(y)(`settings.pages.providers.common.section.basic.description`),"on-reset":D},{default:d(()=>{var e;return[n(s(m),{modelValue:T.value,"onUpdate:modelValue":r[0]||=e=>T.value=e,"provider-name":(e=w.value)?.localizedName,placeholder:`fw-...`},null,8,[`modelValue`,`provider-name`])]}),_:1},8,[`title`,`description`]),n(s(p),{title:s(y)(`settings.pages.providers.common.section.advanced.title`)},{default:d(()=>[n(s(h),{modelValue:E.value,"onUpdate:modelValue":r[1]||=e=>E.value=e,placeholder:`https://api.featherless.ai/v1/`},null,8,[`modelValue`])]),_:1},8,[`title`])]),_:1})]),_:1},8,[`provider-name`,`provider-icon`,`on-back`])}}});typeof y==`function`&&y(x);var S=x;export{S as default}; \ No newline at end of file +import{computed as e,createBlock as t,createVNode as n,defineComponent as r,onMounted as i,openBlock as a,storeToRefs as o,unref as s,useI18n as c,useRouter as l,watch as u,withCtx as d}from"./index-CsmT0L1K.js";import"./import-url-browser-DNuYZxPr.js";import"./duckdb-mvp-C3i5IjU8.js";import"./index-CISmcbXk-C9oju49Y.js";import"./types-AwjH7X1C.js";import{useProvidersStore as f}from"./stores-2H61GqXP.js";import"./__vite-browser-external-DPh5tFvT.js";import"./Button-D3cjyOEe.js";import"./src-C1Sr0aqN.js";import{ProviderAdvancedSettings_default as p,ProviderApiKeyInput_default as m,ProviderBaseUrlInput_default as h,ProviderBasicSettings_default as g,ProviderSettingsContainer_default as _,ProviderSettingsLayout_default as v}from"./components-DHUA669a.js";import"./composables-CgcEyUWo.js";import"./sleep-CvjNLutj.js";import"./queue-B0kER5Ap.js";import"./queues-hSEKEE3F.js";import"./dist-Cr2QBfS4.js";import"./webgpu-Nt9hTBpW.js";import{route_block_default as y}from"./route-block-DNPbw0zT.js";const b=`featherless-ai`;var x=r({__name:`featherless-ai`,setup(r){let{t:y}=c(),x=l(),S=f(),{providers:C}=o(S),w=e(()=>S.getProviderMetadata(b)),T=e({get:()=>{var e;return(e=C.value[b])?.apiKey||``},set:e=>{C.value[b]||(C.value[b]={}),C.value[b].apiKey=e}}),E=e({get:()=>{var e;return(e=C.value[b])?.baseUrl||``},set:e=>{C.value[b]||(C.value[b]={}),C.value[b].baseUrl=e}});i(()=>{var e,t;S.initializeProvider(b),T.value=(e=C.value[b])?.apiKey||``,E.value=(t=C.value[b])?.baseUrl||``}),u([T,E],()=>{C.value[b]={...C.value[b],apiKey:T.value,baseUrl:E.value||``}});function D(){var e;C.value[b]={...(e=w.value)?.defaultOptions}}return(e,r)=>{var i,o;return a(),t(s(v),{"provider-name":(i=w.value)?.localizedName,"provider-icon":(o=w.value)?.icon,"on-back":()=>s(x).back()},{default:d(()=>[n(s(_),null,{default:d(()=>[n(s(g),{title:s(y)(`settings.pages.providers.common.section.basic.title`),description:s(y)(`settings.pages.providers.common.section.basic.description`),"on-reset":D},{default:d(()=>{var e;return[n(s(m),{modelValue:T.value,"onUpdate:modelValue":r[0]||=e=>T.value=e,"provider-name":(e=w.value)?.localizedName,placeholder:`fw-...`},null,8,[`modelValue`,`provider-name`])]}),_:1},8,[`title`,`description`]),n(s(p),{title:s(y)(`settings.pages.providers.common.section.advanced.title`)},{default:d(()=>[n(s(h),{modelValue:E.value,"onUpdate:modelValue":r[1]||=e=>E.value=e,placeholder:`https://api.featherless.ai/v1/`},null,8,[`modelValue`])]),_:1},8,[`title`])]),_:1})]),_:1},8,[`provider-name`,`provider-icon`,`on-back`])}}});typeof y==`function`&&y(x);var S=x;export{S as default}; \ No newline at end of file diff --git a/assets/filter-message-CCFT1WCI.js b/assets/filter-message-39ev3J_Q.js similarity index 87% rename from assets/filter-message-CCFT1WCI.js rename to assets/filter-message-39ev3J_Q.js index 97d25b0d27c846cd4ed36ce8f10a5458cdc502a7..b83d13b40237bb467d1d811ce242b4e93500b6f1 100644 --- a/assets/filter-message-CCFT1WCI.js +++ b/assets/filter-message-39ev3J_Q.js @@ -1 +1 @@ -import{createBaseVNode as e,createElementBlock as t,createVNode as n,defineComponent as r,openBlock as i,ref as a,toDisplayString as o,unref as s}from"./index-CuCRViVh.js";import"./src-C2QbIOor.js";import"./Basic-SuYkQxAJ.js";import{Textarea_default as c}from"./Textarea-D04Ettdn.js";import{sleep as l}from"./sleep-CvjNLutj.js";const u={flex:``,"flex-col":``,"gap-2":``,"p-2":``},d={flex:``,"flex-row":``,"gap-2":``},f={"rounded-lg":``,bg:`neutral-100 dark:neutral-700`,"p-4":``},p={"w-full":``,"rounded-lg":``,bg:`neutral-100 dark:neutral-700`,"p-2":``};var m=r({__name:`filter-message`,setup(r){let m=a(``),h=a(!1),g=a({content:``});async function _(){h.value=!0;let e=m.value.split(``),t=function(e){return e.Literal=`literal`,e.Special=`special`,e}({}),n=t.Literal,r=``;for(let i of e){await l(50);let e=n;i===`<`?e=t.Special:i===`>`&&(e=t.Literal),n===t.Literal&&e===t.Special&&(g.value.content+=r,r=``),n===t.Special&&e===t.Literal&&(r=``),n===t.Literal&&e===t.Literal&&(g.value.content+=i,r=``),n=e}r&&(g.value.content+=r),m.value=``,h.value=!1}return(r,a)=>(i(),t(`div`,u,[e(`div`,d,[n(s(c),{modelValue:m.value,"onUpdate:modelValue":a[0]||=e=>m.value=e,placeholder:`Message`,p:`2`,bg:`neutral-100 dark:neutral-700`,"w-full":``,"rounded-lg":``,"outline-none":``,onSubmit:_},null,8,[`modelValue`]),e(`button`,f,o(h.value?`Processing...`:`Send`),1)]),e(`div`,p,[a[1]||=e(`h3`,{"font-normal":``},` Streaming Message `,-1),e(`div`,null,o(g.value.content),1)])]))}}),h=m;export{h as default}; \ No newline at end of file +import{createBaseVNode as e,createElementBlock as t,createVNode as n,defineComponent as r,openBlock as i,ref as a,toDisplayString as o,unref as s}from"./index-CsmT0L1K.js";import"./src-C1Sr0aqN.js";import"./Basic-MLnzojs5.js";import{Textarea_default as c}from"./Textarea-CK41gHte.js";import{sleep as l}from"./sleep-CvjNLutj.js";const u={flex:``,"flex-col":``,"gap-2":``,"p-2":``},d={flex:``,"flex-row":``,"gap-2":``},f={"rounded-lg":``,bg:`neutral-100 dark:neutral-700`,"p-4":``},p={"w-full":``,"rounded-lg":``,bg:`neutral-100 dark:neutral-700`,"p-2":``};var m=r({__name:`filter-message`,setup(r){let m=a(``),h=a(!1),g=a({content:``});async function _(){h.value=!0;let e=m.value.split(``),t=function(e){return e.Literal=`literal`,e.Special=`special`,e}({}),n=t.Literal,r=``;for(let i of e){await l(50);let e=n;i===`<`?e=t.Special:i===`>`&&(e=t.Literal),n===t.Literal&&e===t.Special&&(g.value.content+=r,r=``),n===t.Special&&e===t.Literal&&(r=``),n===t.Literal&&e===t.Literal&&(g.value.content+=i,r=``),n=e}r&&(g.value.content+=r),m.value=``,h.value=!1}return(r,a)=>(i(),t(`div`,u,[e(`div`,d,[n(s(c),{modelValue:m.value,"onUpdate:modelValue":a[0]||=e=>m.value=e,placeholder:`Message`,p:`2`,bg:`neutral-100 dark:neutral-700`,"w-full":``,"rounded-lg":``,"outline-none":``,onSubmit:_},null,8,[`modelValue`]),e(`button`,f,o(h.value?`Processing...`:`Send`),1)]),e(`div`,p,[a[1]||=e(`h3`,{"font-normal":``},` Streaming Message `,-1),e(`div`,null,o(g.value.content),1)])]))}}),h=m;export{h as default}; \ No newline at end of file diff --git a/assets/fireworks-ai-BzZp6rdf.js b/assets/fireworks-ai-fKuPeJjT.js similarity index 82% rename from assets/fireworks-ai-BzZp6rdf.js rename to assets/fireworks-ai-fKuPeJjT.js index d49d929c9fd58d8617cda8bf3071590170579055..3f52b51cd87ff3133aa1c3f7da1a7ea5042a45ab 100644 --- a/assets/fireworks-ai-BzZp6rdf.js +++ b/assets/fireworks-ai-fKuPeJjT.js @@ -1 +1 @@ -import{computed as e,createBlock as t,createVNode as n,defineComponent as r,onMounted as i,openBlock as a,storeToRefs as o,unref as s,useI18n as c,useRouter as l,watch as u,withCtx as d}from"./index-CuCRViVh.js";import"./import-url-browser-DNuYZxPr.js";import"./duckdb-mvp-C3i5IjU8.js";import"./index-CISmcbXk-BkTeNOgG.js";import"./types-AwjH7X1C.js";import{useProvidersStore as f}from"./stores-m0eA85gd.js";import"./__vite-browser-external-CCfYMxZl.js";import"./Button-DFhzbYVt.js";import"./src-C2QbIOor.js";import{ProviderAdvancedSettings_default as p,ProviderApiKeyInput_default as m,ProviderBaseUrlInput_default as h,ProviderBasicSettings_default as g,ProviderSettingsContainer_default as _,ProviderSettingsLayout_default as v}from"./components-BFLl4u81.js";import"./composables-Cgvkd8lL.js";import"./sleep-CvjNLutj.js";import"./queue-DAKPJQl1.js";import"./queues-Dstwm1VQ.js";import"./dist-Cr2QBfS4.js";import"./webgpu-Nt9hTBpW.js";import{route_block_default as y}from"./route-block-DNPbw0zT.js";const b=`fireworks-ai`;var x=r({__name:`fireworks-ai`,setup(r){let{t:y}=c(),x=l(),S=f(),{providers:C}=o(S),w=e(()=>S.getProviderMetadata(b)),T=e({get:()=>{var e;return(e=C.value[b])?.apiKey||``},set:e=>{C.value[b]||(C.value[b]={}),C.value[b].apiKey=e}}),E=e({get:()=>{var e;return(e=C.value[b])?.baseUrl||``},set:e=>{C.value[b]||(C.value[b]={}),C.value[b].baseUrl=e}});i(()=>{var e,t;S.initializeProvider(b),T.value=(e=C.value[b])?.apiKey||``,E.value=(t=C.value[b])?.baseUrl||``}),u([T,E],()=>{C.value[b]={...C.value[b],apiKey:T.value,baseUrl:E.value||``}});function D(){var e;C.value[b]={...(e=w.value)?.defaultOptions}}return(e,r)=>{var i,o;return a(),t(s(v),{"provider-name":(i=w.value)?.localizedName,"provider-icon":(o=w.value)?.icon,"on-back":()=>s(x).back()},{default:d(()=>[n(s(_),null,{default:d(()=>[n(s(g),{title:s(y)(`settings.pages.providers.common.section.basic.title`),description:s(y)(`settings.pages.providers.common.section.basic.description`),"on-reset":D},{default:d(()=>{var e;return[n(s(m),{modelValue:T.value,"onUpdate:modelValue":r[0]||=e=>T.value=e,"provider-name":(e=w.value)?.localizedName,placeholder:`fw-...`},null,8,[`modelValue`,`provider-name`])]}),_:1},8,[`title`,`description`]),n(s(p),{title:s(y)(`settings.pages.providers.common.section.advanced.title`)},{default:d(()=>[n(s(h),{modelValue:E.value,"onUpdate:modelValue":r[1]||=e=>E.value=e,placeholder:`https://api.fireworks.ai/inference/v1/`},null,8,[`modelValue`])]),_:1},8,[`title`])]),_:1})]),_:1},8,[`provider-name`,`provider-icon`,`on-back`])}}});typeof y==`function`&&y(x);var S=x;export{S as default}; \ No newline at end of file +import{computed as e,createBlock as t,createVNode as n,defineComponent as r,onMounted as i,openBlock as a,storeToRefs as o,unref as s,useI18n as c,useRouter as l,watch as u,withCtx as d}from"./index-CsmT0L1K.js";import"./import-url-browser-DNuYZxPr.js";import"./duckdb-mvp-C3i5IjU8.js";import"./index-CISmcbXk-C9oju49Y.js";import"./types-AwjH7X1C.js";import{useProvidersStore as f}from"./stores-2H61GqXP.js";import"./__vite-browser-external-DPh5tFvT.js";import"./Button-D3cjyOEe.js";import"./src-C1Sr0aqN.js";import{ProviderAdvancedSettings_default as p,ProviderApiKeyInput_default as m,ProviderBaseUrlInput_default as h,ProviderBasicSettings_default as g,ProviderSettingsContainer_default as _,ProviderSettingsLayout_default as v}from"./components-DHUA669a.js";import"./composables-CgcEyUWo.js";import"./sleep-CvjNLutj.js";import"./queue-B0kER5Ap.js";import"./queues-hSEKEE3F.js";import"./dist-Cr2QBfS4.js";import"./webgpu-Nt9hTBpW.js";import{route_block_default as y}from"./route-block-DNPbw0zT.js";const b=`fireworks-ai`;var x=r({__name:`fireworks-ai`,setup(r){let{t:y}=c(),x=l(),S=f(),{providers:C}=o(S),w=e(()=>S.getProviderMetadata(b)),T=e({get:()=>{var e;return(e=C.value[b])?.apiKey||``},set:e=>{C.value[b]||(C.value[b]={}),C.value[b].apiKey=e}}),E=e({get:()=>{var e;return(e=C.value[b])?.baseUrl||``},set:e=>{C.value[b]||(C.value[b]={}),C.value[b].baseUrl=e}});i(()=>{var e,t;S.initializeProvider(b),T.value=(e=C.value[b])?.apiKey||``,E.value=(t=C.value[b])?.baseUrl||``}),u([T,E],()=>{C.value[b]={...C.value[b],apiKey:T.value,baseUrl:E.value||``}});function D(){var e;C.value[b]={...(e=w.value)?.defaultOptions}}return(e,r)=>{var i,o;return a(),t(s(v),{"provider-name":(i=w.value)?.localizedName,"provider-icon":(o=w.value)?.icon,"on-back":()=>s(x).back()},{default:d(()=>[n(s(_),null,{default:d(()=>[n(s(g),{title:s(y)(`settings.pages.providers.common.section.basic.title`),description:s(y)(`settings.pages.providers.common.section.basic.description`),"on-reset":D},{default:d(()=>{var e;return[n(s(m),{modelValue:T.value,"onUpdate:modelValue":r[0]||=e=>T.value=e,"provider-name":(e=w.value)?.localizedName,placeholder:`fw-...`},null,8,[`modelValue`,`provider-name`])]}),_:1},8,[`title`,`description`]),n(s(p),{title:s(y)(`settings.pages.providers.common.section.advanced.title`)},{default:d(()=>[n(s(h),{modelValue:E.value,"onUpdate:modelValue":r[1]||=e=>E.value=e,placeholder:`https://api.fireworks.ai/inference/v1/`},null,8,[`modelValue`])]),_:1},8,[`title`])]),_:1})]),_:1},8,[`provider-name`,`provider-icon`,`on-back`])}}});typeof y==`function`&&y(x);var S=x;export{S as default}; \ No newline at end of file diff --git a/assets/general-DKp4DER8.js b/assets/general-D9rY_FOz.js similarity index 83% rename from assets/general-DKp4DER8.js rename to assets/general-D9rY_FOz.js index 6655bb7d69d319d21f994d775dc89442578efcc1..875757c61ff0b9ddba365340893e62bf82b37229 100644 --- a/assets/general-DKp4DER8.js +++ b/assets/general-D9rY_FOz.js @@ -1 +1 @@ -import{Fragment as e,createBaseVNode as t,createElementBlock as n,createTextVNode as r,createVNode as i,defineComponent as a,isRef as o,openBlock as s,resolveDirective as c,toDisplayString as l,unref as u,useDark as d,useSettings as f,vModelSelect as p,withDirectives as m}from"./index-CuCRViVh.js";import"./index-CISmcbXk-BkTeNOgG.js";import"./types-AwjH7X1C.js";import"./stores-m0eA85gd.js";import"./__vite-browser-external-CCfYMxZl.js";import"./composables-Cgvkd8lL.js";import"./sleep-CvjNLutj.js";import"./queue-DAKPJQl1.js";import"./queues-Dstwm1VQ.js";import"./dist-Cr2QBfS4.js";import"./webgpu-Nt9hTBpW.js";import{route_block_default as h}from"./route-block-DNPbw0zT.js";import{CheckBar_default as g}from"./CheckBar-BxEtoWm5.js";const _={class:`w-full flex items-center justify-between rounded-lg px-4 py-3 text-sm outline-none transition-all duration-250 ease-in-out`,bg:`neutral-50 dark:neutral-800`,hover:`bg-neutral-200 dark:bg-neutral-700`,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:280,delay:3*50,transition:`all ease-in-out duration-250`},v={value:`en-US`},y={value:`zh-CN`},b={text:`neutral-200/50 dark:neutral-600/20`,"pointer-events-none":``,fixed:``,top:`[65dvh]`,"right--15":``,"z--1":``,initial:{scale:.9,opacity:0,rotate:30},enter:{scale:1,opacity:1,rotate:0},duration:250,flex:``,"items-center":``,"justify-center":``};var x=a({__name:`general`,setup(a){let h=f(),x=d();return(a,d)=>{let f=c(`motion`);return s(),n(e,null,[m(i(g,{modelValue:u(x),"onUpdate:modelValue":d[0]||=e=>o(x)?x.value=e:null,"mb-2":``,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:270,delay:2*50,"icon-on":`i-solar:moon-stars-bold-duotone`,"icon-off":`i-solar:sun-fog-bold-duotone`,text:`settings.theme`,transition:`all ease-in-out duration-250`},null,8,[`modelValue`]),[[f]]),m((s(),n(`div`,_,[r(l(a.$t(`settings.language.title`))+` `,1),m(t(`select`,{"onUpdate:modelValue":d[1]||=e=>u(h).language=e,transition:`all ease-in-out duration-250`,"cursor-pointer":``,"bg-transparent":``,"text-right":``,"outline-none":``},[t(`option`,v,l(a.$t(`settings.language.english`)),1),t(`option`,y,l(a.$t(`settings.language.chinese`)),1)],512),[[p,u(h).language]])])),[[f]]),m((s(),n(`div`,b,d[2]||=[t(`div`,{text:`60`,"i-solar:emoji-funny-square-bold-duotone":``},null,-1)])),[[f]])],64)}}});typeof h==`function`&&h(x);var S=x;export{S as default}; \ No newline at end of file +import{Fragment as e,createBaseVNode as t,createElementBlock as n,createTextVNode as r,createVNode as i,defineComponent as a,isRef as o,openBlock as s,resolveDirective as c,toDisplayString as l,unref as u,useDark as d,useSettings as f,vModelSelect as p,withDirectives as m}from"./index-CsmT0L1K.js";import"./index-CISmcbXk-C9oju49Y.js";import"./types-AwjH7X1C.js";import"./stores-2H61GqXP.js";import"./__vite-browser-external-DPh5tFvT.js";import"./composables-CgcEyUWo.js";import"./sleep-CvjNLutj.js";import"./queue-B0kER5Ap.js";import"./queues-hSEKEE3F.js";import"./dist-Cr2QBfS4.js";import"./webgpu-Nt9hTBpW.js";import{route_block_default as h}from"./route-block-DNPbw0zT.js";import{CheckBar_default as g}from"./CheckBar-Bo3RcSNe.js";const _={class:`w-full flex items-center justify-between rounded-lg px-4 py-3 text-sm outline-none transition-all duration-250 ease-in-out`,bg:`neutral-50 dark:neutral-800`,hover:`bg-neutral-200 dark:bg-neutral-700`,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:280,delay:3*50,transition:`all ease-in-out duration-250`},v={value:`en-US`},y={value:`zh-CN`},b={text:`neutral-200/50 dark:neutral-600/20`,"pointer-events-none":``,fixed:``,top:`[65dvh]`,"right--15":``,"z--1":``,initial:{scale:.9,opacity:0,rotate:30},enter:{scale:1,opacity:1,rotate:0},duration:250,flex:``,"items-center":``,"justify-center":``};var x=a({__name:`general`,setup(a){let h=f(),x=d();return(a,d)=>{let f=c(`motion`);return s(),n(e,null,[m(i(g,{modelValue:u(x),"onUpdate:modelValue":d[0]||=e=>o(x)?x.value=e:null,"mb-2":``,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:270,delay:2*50,"icon-on":`i-solar:moon-stars-bold-duotone`,"icon-off":`i-solar:sun-fog-bold-duotone`,text:`settings.theme`,transition:`all ease-in-out duration-250`},null,8,[`modelValue`]),[[f]]),m((s(),n(`div`,_,[r(l(a.$t(`settings.language.title`))+` `,1),m(t(`select`,{"onUpdate:modelValue":d[1]||=e=>u(h).language=e,transition:`all ease-in-out duration-250`,"cursor-pointer":``,"bg-transparent":``,"text-right":``,"outline-none":``},[t(`option`,v,l(a.$t(`settings.language.english`)),1),t(`option`,y,l(a.$t(`settings.language.chinese`)),1)],512),[[p,u(h).language]])])),[[f]]),m((s(),n(`div`,b,d[2]||=[t(`div`,{text:`60`,"i-solar:emoji-funny-square-bold-duotone":``},null,-1)])),[[f]])],64)}}});typeof h==`function`&&h(x);var S=x;export{S as default}; \ No newline at end of file diff --git a/assets/gesture-circle-CDDLlKJK.js b/assets/gesture-circle-CeCcQTn3.js similarity index 97% rename from assets/gesture-circle-CDDLlKJK.js rename to assets/gesture-circle-CeCcQTn3.js index b167979f0bee3dc3704c9a6644330151ce8391ec..707a7279e781504cdaf4d335ca3f1e2db46f7761 100644 --- a/assets/gesture-circle-CDDLlKJK.js +++ b/assets/gesture-circle-CeCcQTn3.js @@ -1 +1 @@ -import{computed as e,createBaseVNode as t,createElementBlock as n,defineComponent as r,openBlock as i,ref as a,refDebounced as o,refThrottled as s,toDisplayString as c,unref as l,useElementBounding as u,usePointer as d,useResizeObserver as f,watch as p}from"./index-CuCRViVh.js";import{route_block_default as m}from"./route-block-DNPbw0zT.js";const h={relative:``,"h-full":``},g={bg:`neutral-100/50 dark:neutral-900/50`,absolute:``,"inset-0":``,"h-fit":``,"rounded-xl":``,"px-3":``,"py-2":``,"font-mono":``,"shadow-md":``,"backdrop-blur-md":``,grid:`~ cols-[150px_1fr]`},_=6;var v=r({__name:`gesture-circle`,setup(r){let m=a(),v=a(),y=a(),b=a(),{x,y:S}=d({target:y}),C=u(v,{immediate:!0,windowResize:!0}),w=e(()=>({x:x.value,y:S.value}));f(v,e=>{let t=e[0],{width:n,height:r}=t.contentRect;y.value&&(y.value.width=n,y.value.height=r)}),p(v,e=>{var t;if(!e)return;let n=document.createElement(`canvas`);n.width=C.width.value,n.height=C.height.value,n.style.objectFit=`contain`;let r=n.getContext(`2d`);b.value=r,y.value=n,(t=v.value)?.appendChild(n)});let T=s(w,50),E=o(w,50),D=a(E.value),O=a(0),k=a(0),A=a(!1),j=a([]),M=a(!1);return p([x,S],()=>{b.value&&(b.value.beginPath(),b.value.fillStyle=`red`,b.value.arc(x.value,S.value,4,0,2*Math.PI),b.value.closePath(),b.value.fill())}),p(E,()=>{if(M.value=!1,b.value&&b.value.reset(),j.value.length>=_){let e=j.value.reduce((e,t)=>e+t.x,0)/j.value.length,t=j.value.reduce((e,t)=>e+t.y,0)/j.value.length,n=j.value.map(n=>Math.sqrt((n.x-e)**2+(n.y-t)**2)),r=n.reduce((e,t)=>e+t,0)/n.length,i=n.reduce((e,t)=>e+(t-r)**2,0)/n.length,a=Math.sqrt(i);a<20&&(k.value++,M.value=!0)}j.value=[]}),p(T,e=>{j.value.push(e)}),(e,r)=>(i(),n(`div`,{ref_key:`containerRef`,ref:m,"h-full":``},[t(`div`,h,[t(`div`,g,[r[0]||=t(`div`,{text:`neutral-400 dark:neutral-600`},` pointThrottled: `,-1),t(`div`,null,c(l(T)),1),r[1]||=t(`div`,{text:`neutral-400 dark:neutral-600`},` pointDebounced: `,-1),t(`div`,null,c(l(E)),1),r[2]||=t(`div`,{text:`neutral-400 dark:neutral-600`},` lastPoint: `,-1),t(`div`,null,c(D.value),1),r[3]||=t(`div`,{text:`neutral-400 dark:neutral-600`},` distance: `,-1),t(`div`,null,c(O.value),1),r[4]||=t(`div`,{text:`neutral-400 dark:neutral-600`},` count: `,-1),t(`div`,null,c(k.value),1),r[5]||=t(`div`,{text:`neutral-400 dark:neutral-600`},` show: `,-1),t(`div`,null,c(A.value),1),r[6]||=t(`div`,{text:`neutral-400 dark:neutral-600`},` lastPoints: `,-1),t(`div`,null,c(j.value),1),r[7]||=t(`div`,{text:`neutral-400 dark:neutral-600`},` isCircle: `,-1),t(`div`,null,c(M.value),1)]),t(`div`,{ref_key:`canvasContainerRef`,ref:v,"h-full":``,"w-full":``},null,512)])],512))}});typeof m==`function`&&m(v);var y=v;export{y as default}; \ No newline at end of file +import{computed as e,createBaseVNode as t,createElementBlock as n,defineComponent as r,openBlock as i,ref as a,refDebounced as o,refThrottled as s,toDisplayString as c,unref as l,useElementBounding as u,usePointer as d,useResizeObserver as f,watch as p}from"./index-CsmT0L1K.js";import{route_block_default as m}from"./route-block-DNPbw0zT.js";const h={relative:``,"h-full":``},g={bg:`neutral-100/50 dark:neutral-900/50`,absolute:``,"inset-0":``,"h-fit":``,"rounded-xl":``,"px-3":``,"py-2":``,"font-mono":``,"shadow-md":``,"backdrop-blur-md":``,grid:`~ cols-[150px_1fr]`},_=6;var v=r({__name:`gesture-circle`,setup(r){let m=a(),v=a(),y=a(),b=a(),{x,y:S}=d({target:y}),C=u(v,{immediate:!0,windowResize:!0}),w=e(()=>({x:x.value,y:S.value}));f(v,e=>{let t=e[0],{width:n,height:r}=t.contentRect;y.value&&(y.value.width=n,y.value.height=r)}),p(v,e=>{var t;if(!e)return;let n=document.createElement(`canvas`);n.width=C.width.value,n.height=C.height.value,n.style.objectFit=`contain`;let r=n.getContext(`2d`);b.value=r,y.value=n,(t=v.value)?.appendChild(n)});let T=s(w,50),E=o(w,50),D=a(E.value),O=a(0),k=a(0),A=a(!1),j=a([]),M=a(!1);return p([x,S],()=>{b.value&&(b.value.beginPath(),b.value.fillStyle=`red`,b.value.arc(x.value,S.value,4,0,2*Math.PI),b.value.closePath(),b.value.fill())}),p(E,()=>{if(M.value=!1,b.value&&b.value.reset(),j.value.length>=_){let e=j.value.reduce((e,t)=>e+t.x,0)/j.value.length,t=j.value.reduce((e,t)=>e+t.y,0)/j.value.length,n=j.value.map(n=>Math.sqrt((n.x-e)**2+(n.y-t)**2)),r=n.reduce((e,t)=>e+t,0)/n.length,i=n.reduce((e,t)=>e+(t-r)**2,0)/n.length,a=Math.sqrt(i);a<20&&(k.value++,M.value=!0)}j.value=[]}),p(T,e=>{j.value.push(e)}),(e,r)=>(i(),n(`div`,{ref_key:`containerRef`,ref:m,"h-full":``},[t(`div`,h,[t(`div`,g,[r[0]||=t(`div`,{text:`neutral-400 dark:neutral-600`},` pointThrottled: `,-1),t(`div`,null,c(l(T)),1),r[1]||=t(`div`,{text:`neutral-400 dark:neutral-600`},` pointDebounced: `,-1),t(`div`,null,c(l(E)),1),r[2]||=t(`div`,{text:`neutral-400 dark:neutral-600`},` lastPoint: `,-1),t(`div`,null,c(D.value),1),r[3]||=t(`div`,{text:`neutral-400 dark:neutral-600`},` distance: `,-1),t(`div`,null,c(O.value),1),r[4]||=t(`div`,{text:`neutral-400 dark:neutral-600`},` count: `,-1),t(`div`,null,c(k.value),1),r[5]||=t(`div`,{text:`neutral-400 dark:neutral-600`},` show: `,-1),t(`div`,null,c(A.value),1),r[6]||=t(`div`,{text:`neutral-400 dark:neutral-600`},` lastPoints: `,-1),t(`div`,null,c(j.value),1),r[7]||=t(`div`,{text:`neutral-400 dark:neutral-600`},` isCircle: `,-1),t(`div`,null,c(M.value),1)]),t(`div`,{ref_key:`canvasContainerRef`,ref:v,"h-full":``,"w-full":``},null,512)])],512))}});typeof m==`function`&&m(v);var y=v;export{y as default}; \ No newline at end of file diff --git a/assets/google-generative-ai-BmLcvcU4.js b/assets/google-generative-ai-DznmED2J.js similarity index 84% rename from assets/google-generative-ai-BmLcvcU4.js rename to assets/google-generative-ai-DznmED2J.js index eb0c30c03684369a32eba6b57029383c1c002490..45f537970f2487b995a515504664cc2acd249937 100644 --- a/assets/google-generative-ai-BmLcvcU4.js +++ b/assets/google-generative-ai-DznmED2J.js @@ -1 +1 @@ -import{computed as e,createBlock as t,createVNode as n,defineComponent as r,onMounted as i,openBlock as a,storeToRefs as o,unref as s,useI18n as c,useRouter as l,watch as u,withCtx as d}from"./index-CuCRViVh.js";import"./import-url-browser-DNuYZxPr.js";import"./duckdb-mvp-C3i5IjU8.js";import"./index-CISmcbXk-BkTeNOgG.js";import"./types-AwjH7X1C.js";import{useProvidersStore as f}from"./stores-m0eA85gd.js";import"./__vite-browser-external-CCfYMxZl.js";import"./Button-DFhzbYVt.js";import"./src-C2QbIOor.js";import{ProviderAdvancedSettings_default as p,ProviderApiKeyInput_default as m,ProviderBaseUrlInput_default as h,ProviderBasicSettings_default as g,ProviderSettingsContainer_default as _,ProviderSettingsLayout_default as v}from"./components-BFLl4u81.js";import"./composables-Cgvkd8lL.js";import"./sleep-CvjNLutj.js";import"./queue-DAKPJQl1.js";import"./queues-Dstwm1VQ.js";import"./dist-Cr2QBfS4.js";import"./webgpu-Nt9hTBpW.js";import{route_block_default as y}from"./route-block-DNPbw0zT.js";const b=`google-generative-ai`;var x=r({__name:`google-generative-ai`,setup(r){let{t:y}=c(),x=l(),S=f(),{providers:C}=o(S),w=e(()=>S.getProviderMetadata(b)),T=e({get:()=>{var e;return(e=C.value[b])?.apiKey||``},set:e=>{C.value[b]||(C.value[b]={}),C.value[b].apiKey=e}}),E=e({get:()=>{var e;return(e=C.value[b])?.baseUrl||`https://generativelanguage.googleapis.com/v1beta/openai/`},set:e=>{C.value[b]||(C.value[b]={}),C.value[b].baseUrl=e}});i(()=>{var e,t;C.value[b]||(C.value[b]={baseUrl:`https://api.anthropic.com/v1/`}),T.value=(e=C.value[b])?.apiKey||``,E.value=(t=C.value[b])?.baseUrl||`https://generativelanguage.googleapis.com/v1beta/openai/`}),u([T,E],()=>{C.value[b]={...C.value[b],apiKey:T.value,baseUrl:E.value||`https://generativelanguage.googleapis.com/v1beta/openai/`}});function D(){C.value[b]={baseUrl:`https://generativelanguage.googleapis.com/v1beta/openai/`}}return(e,r)=>{var i,o;return a(),t(s(v),{"provider-name":(i=w.value)?.localizedName||`Google | Gemini`,"provider-icon":(o=w.value)?.icon,"on-back":()=>s(x).back()},{default:d(()=>[n(s(_),null,{default:d(()=>[n(s(g),{title:s(y)(`settings.pages.providers.common.section.basic.title`),description:s(y)(`settings.pages.providers.common.section.basic.description`),"on-reset":D},{default:d(()=>{var e;return[n(s(m),{modelValue:T.value,"onUpdate:modelValue":r[0]||=e=>T.value=e,"provider-name":(e=w.value)?.localizedName||`Google`,placeholder:`GEMINI_API_KEY`},null,8,[`modelValue`,`provider-name`])]}),_:1},8,[`title`,`description`]),n(s(p),{title:s(y)(`settings.pages.providers.common.section.advanced.title`)},{default:d(()=>[n(s(h),{modelValue:E.value,"onUpdate:modelValue":r[1]||=e=>E.value=e,placeholder:`https://generativelanguage.googleapis.com/v1beta/openai/`},null,8,[`modelValue`])]),_:1},8,[`title`])]),_:1})]),_:1},8,[`provider-name`,`provider-icon`,`on-back`])}}});typeof y==`function`&&y(x);var S=x;export{S as default}; \ No newline at end of file +import{computed as e,createBlock as t,createVNode as n,defineComponent as r,onMounted as i,openBlock as a,storeToRefs as o,unref as s,useI18n as c,useRouter as l,watch as u,withCtx as d}from"./index-CsmT0L1K.js";import"./import-url-browser-DNuYZxPr.js";import"./duckdb-mvp-C3i5IjU8.js";import"./index-CISmcbXk-C9oju49Y.js";import"./types-AwjH7X1C.js";import{useProvidersStore as f}from"./stores-2H61GqXP.js";import"./__vite-browser-external-DPh5tFvT.js";import"./Button-D3cjyOEe.js";import"./src-C1Sr0aqN.js";import{ProviderAdvancedSettings_default as p,ProviderApiKeyInput_default as m,ProviderBaseUrlInput_default as h,ProviderBasicSettings_default as g,ProviderSettingsContainer_default as _,ProviderSettingsLayout_default as v}from"./components-DHUA669a.js";import"./composables-CgcEyUWo.js";import"./sleep-CvjNLutj.js";import"./queue-B0kER5Ap.js";import"./queues-hSEKEE3F.js";import"./dist-Cr2QBfS4.js";import"./webgpu-Nt9hTBpW.js";import{route_block_default as y}from"./route-block-DNPbw0zT.js";const b=`google-generative-ai`;var x=r({__name:`google-generative-ai`,setup(r){let{t:y}=c(),x=l(),S=f(),{providers:C}=o(S),w=e(()=>S.getProviderMetadata(b)),T=e({get:()=>{var e;return(e=C.value[b])?.apiKey||``},set:e=>{C.value[b]||(C.value[b]={}),C.value[b].apiKey=e}}),E=e({get:()=>{var e;return(e=C.value[b])?.baseUrl||`https://generativelanguage.googleapis.com/v1beta/openai/`},set:e=>{C.value[b]||(C.value[b]={}),C.value[b].baseUrl=e}});i(()=>{var e,t;C.value[b]||(C.value[b]={baseUrl:`https://api.anthropic.com/v1/`}),T.value=(e=C.value[b])?.apiKey||``,E.value=(t=C.value[b])?.baseUrl||`https://generativelanguage.googleapis.com/v1beta/openai/`}),u([T,E],()=>{C.value[b]={...C.value[b],apiKey:T.value,baseUrl:E.value||`https://generativelanguage.googleapis.com/v1beta/openai/`}});function D(){C.value[b]={baseUrl:`https://generativelanguage.googleapis.com/v1beta/openai/`}}return(e,r)=>{var i,o;return a(),t(s(v),{"provider-name":(i=w.value)?.localizedName||`Google | Gemini`,"provider-icon":(o=w.value)?.icon,"on-back":()=>s(x).back()},{default:d(()=>[n(s(_),null,{default:d(()=>[n(s(g),{title:s(y)(`settings.pages.providers.common.section.basic.title`),description:s(y)(`settings.pages.providers.common.section.basic.description`),"on-reset":D},{default:d(()=>{var e;return[n(s(m),{modelValue:T.value,"onUpdate:modelValue":r[0]||=e=>T.value=e,"provider-name":(e=w.value)?.localizedName||`Google`,placeholder:`GEMINI_API_KEY`},null,8,[`modelValue`,`provider-name`])]}),_:1},8,[`title`,`description`]),n(s(p),{title:s(y)(`settings.pages.providers.common.section.advanced.title`)},{default:d(()=>[n(s(h),{modelValue:E.value,"onUpdate:modelValue":r[1]||=e=>E.value=e,placeholder:`https://generativelanguage.googleapis.com/v1beta/openai/`},null,8,[`modelValue`])]),_:1},8,[`title`])]),_:1})]),_:1},8,[`provider-name`,`provider-icon`,`on-back`])}}});typeof y==`function`&&y(x);var S=x;export{S as default}; \ No newline at end of file diff --git a/assets/home-B675LO9V.js b/assets/home-CvTDzPpZ.js similarity index 88% rename from assets/home-B675LO9V.js rename to assets/home-CvTDzPpZ.js index ff5f6c77b1a5c5f5e6463fb31ed8cb07d31cc7be..c6a6ab52338a3637aa18c269fcb91e918f435030 100644 --- a/assets/home-B675LO9V.js +++ b/assets/home-CvTDzPpZ.js @@ -1 +1 @@ -import{RouterView as e,createBaseVNode as t,createElementBlock as n,createVNode as r,defineComponent as i,openBlock as a,unref as o}from"./index-CuCRViVh.js";const s={style:{paddingBottom:`env(safe-area-inset-bottom, 0px)`,paddingTop:`env(safe-area-inset-top, 0px)`,paddingRight:`env(safe-area-inset-right, 0px)`,paddingLeft:`env(safe-area-inset-left, 0px)`},"h-full":``},c={class:`px-3 py-2 md:px-5 md:py-5`,flex:`~ col`,"h-full":``};var l=i({__name:`home`,setup(i){return(i,l)=>(a(),n(`div`,s,[t(`div`,c,[r(o(e))])]))}}),u=l;export{u as default}; \ No newline at end of file +import{RouterView as e,createBaseVNode as t,createElementBlock as n,createVNode as r,defineComponent as i,openBlock as a,unref as o}from"./index-CsmT0L1K.js";const s={style:{paddingBottom:`env(safe-area-inset-bottom, 0px)`,paddingTop:`env(safe-area-inset-top, 0px)`,paddingRight:`env(safe-area-inset-right, 0px)`,paddingLeft:`env(safe-area-inset-left, 0px)`},"h-full":``},c={class:`px-3 py-2 md:px-5 md:py-5`,flex:`~ col`,"h-full":``};var l=i({__name:`home`,setup(i){return(i,l)=>(a(),n(`div`,s,[t(`div`,c,[r(o(e))])]))}}),u=l;export{u as default}; \ No newline at end of file diff --git a/assets/image-BZfCqS0u.js b/assets/image-DZE-Gq8A.js similarity index 95% rename from assets/image-BZfCqS0u.js rename to assets/image-DZE-Gq8A.js index d916b5a74e151c59c1cb0a50a18a0781d42fc595..9086c6d2634e0fd8d53ea257eb2a2830debf47e0 100644 --- a/assets/image-BZfCqS0u.js +++ b/assets/image-DZE-Gq8A.js @@ -1,2 +1,2 @@ -import{__plugin_vue_export_helper_default as e,createBaseVNode as t,createCommentVNode as n,createElementBlock as r,defineComponent as i,openBlock as a,ref as o,toDisplayString as s,unref as c,useClipboard as l}from"./index-CuCRViVh.js";const u={bg:`neutral-100`,flex:`~ col`,"items-center":``,"justify-center":``,"rounded-lg":``,"px-4":``,"py-3":``},d={key:0},f=[`src`],p={bg:`neutral-100`,class:`text-wrap-any`,"max-h":`100`,"overflow-scroll":``,"rounded-lg":``,"text-wrap":``,"text-black":``,"font-mono":``};var m=i({__name:`image`,setup(e){let i=o(),m=o(``),{copy:h}=l({source:m});async function g(e){return new Promise((t,n)=>{let r=new FileReader;r.onload=e=>{var n;t(((n=e.target)==null||(n=n.result)==null?void 0:n.toString())||``)},r.onerror=e=>{n(e)},r.readAsDataURL(e)})}async function _(e){var t;let n=e.target,r=(t=n.files)?.[0];if(r){i.value=r;let e=await g(r);m.value=e}}return(e,i)=>(a(),r(`div`,null,[t(`label`,u,[t(`input`,{type:`file`,accept:`image/*`,hidden:``,onChange:_},null,32),i[1]||=t(`span`,null,`Upload Image`,-1)]),m.value?(a(),r(`div`,d,[t(`img`,{src:m.value,alt:`Uploaded Image`,"w-100":``},null,8,f),t(`pre`,p,` `+s(m.value)+` +import{__plugin_vue_export_helper_default as e,createBaseVNode as t,createCommentVNode as n,createElementBlock as r,defineComponent as i,openBlock as a,ref as o,toDisplayString as s,unref as c,useClipboard as l}from"./index-CsmT0L1K.js";const u={bg:`neutral-100`,flex:`~ col`,"items-center":``,"justify-center":``,"rounded-lg":``,"px-4":``,"py-3":``},d={key:0},f=[`src`],p={bg:`neutral-100`,class:`text-wrap-any`,"max-h":`100`,"overflow-scroll":``,"rounded-lg":``,"text-wrap":``,"text-black":``,"font-mono":``};var m=i({__name:`image`,setup(e){let i=o(),m=o(``),{copy:h}=l({source:m});async function g(e){return new Promise((t,n)=>{let r=new FileReader;r.onload=e=>{var n;t(((n=e.target)==null||(n=n.result)==null?void 0:n.toString())||``)},r.onerror=e=>{n(e)},r.readAsDataURL(e)})}async function _(e){var t;let n=e.target,r=(t=n.files)?.[0];if(r){i.value=r;let e=await g(r);m.value=e}}return(e,i)=>(a(),r(`div`,null,[t(`label`,u,[t(`input`,{type:`file`,accept:`image/*`,hidden:``,onChange:_},null,32),i[1]||=t(`span`,null,`Upload Image`,-1)]),m.value?(a(),r(`div`,d,[t(`img`,{src:m.value,alt:`Uploaded Image`,"w-100":``},null,8,f),t(`pre`,p,` `+s(m.value)+` `,1),t(`button`,{bg:`primary-500`,text:`white`,"mt-4":``,"rounded-lg":``,"px-4":``,"py-2":``,onClick:i[0]||=()=>c(h)()},` Copy Data URL `)])):n(``,!0)]))}}),h=e(m,[[`__scopeId`,`data-v-7edd53e6`]]);export{h as default}; \ No newline at end of file diff --git a/assets/index-CISmcbXk-BkTeNOgG.js b/assets/index-CISmcbXk-C9oju49Y.js similarity index 64% rename from assets/index-CISmcbXk-BkTeNOgG.js rename to assets/index-CISmcbXk-C9oju49Y.js index 73841a73b81c29de06accbad428ee366bf55fd3b..3f15846a073bbd47294c64076d6f653a0c6156e2 100644 --- a/assets/index-CISmcbXk-BkTeNOgG.js +++ b/assets/index-CISmcbXk-C9oju49Y.js @@ -1,2 +1,2 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/effect-WSjEuzC9-Of5jzyzm.js","assets/index-CuCRViVh.js","assets/index-10xSVpcK.css","assets/sury-DmrZ3_Oj-DkB-CPCY.js","assets/valibot-CQk-M5rL-D0LQzA6m.js","assets/zod-Db63SLXj-CQvdtD4C.js"])))=>i.map(i=>d[i]); -import{__vitePreload as e}from"./index-CuCRViVh.js";const t=`https://xsai.js.org/docs/packages-top/xsschema#missing-dependencies`,n=async(e,n)=>{try{return await e}catch{throw Error(`xsschema: Missing dependencies "${n}". see ${t}`)}},r=async t=>{switch(t){case`arktype`:return e(()=>import(`./arktype-C-GObzDh-DfSkD_kw.js`),[]).then(async({getToJsonSchemaFn:e})=>e());case`effect`:return e(()=>import(`./effect-WSjEuzC9-Of5jzyzm.js`),__vite__mapDeps([0,1,2])).then(async({getToJsonSchemaFn:e})=>e());case`sury`:return e(()=>import(`./sury-DmrZ3_Oj-DkB-CPCY.js`),__vite__mapDeps([3,1,2])).then(async({getToJsonSchemaFn:e})=>e());case`valibot`:return e(()=>import(`./valibot-CQk-M5rL-D0LQzA6m.js`),__vite__mapDeps([4,1,2])).then(async({getToJsonSchemaFn:e})=>e());case`zod`:return e(()=>import(`./zod-Db63SLXj-CQvdtD4C.js`),__vite__mapDeps([5,1,2])).then(async({getToJsonSchemaFn:e})=>e());default:throw Error(`xsschema: Unsupported schema vendor "${t}". see https://xsai.js.org/docs/packages-top/xsschema#unsupported-schema-vendor`)}},i=async e=>r(e[`~standard`].vendor).then(async t=>t(e));export{t as missingDependenciesUrl,i as toJsonSchema,n as tryImport}; \ No newline at end of file +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/effect-WSjEuzC9-D78WghFx.js","assets/index-CsmT0L1K.js","assets/index-10xSVpcK.css","assets/sury-DmrZ3_Oj-D6jFSom2.js","assets/valibot-CQk-M5rL-C2bLGA9S.js","assets/zod-Db63SLXj-DPwvP49x.js"])))=>i.map(i=>d[i]); +import{__vitePreload as e}from"./index-CsmT0L1K.js";const t=`https://xsai.js.org/docs/packages-top/xsschema#missing-dependencies`,n=async(e,n)=>{try{return await e}catch{throw Error(`xsschema: Missing dependencies "${n}". see ${t}`)}},r=async t=>{switch(t){case`arktype`:return e(()=>import(`./arktype-C-GObzDh-DfSkD_kw.js`),[]).then(async({getToJsonSchemaFn:e})=>e());case`effect`:return e(()=>import(`./effect-WSjEuzC9-D78WghFx.js`),__vite__mapDeps([0,1,2])).then(async({getToJsonSchemaFn:e})=>e());case`sury`:return e(()=>import(`./sury-DmrZ3_Oj-D6jFSom2.js`),__vite__mapDeps([3,1,2])).then(async({getToJsonSchemaFn:e})=>e());case`valibot`:return e(()=>import(`./valibot-CQk-M5rL-C2bLGA9S.js`),__vite__mapDeps([4,1,2])).then(async({getToJsonSchemaFn:e})=>e());case`zod`:return e(()=>import(`./zod-Db63SLXj-DPwvP49x.js`),__vite__mapDeps([5,1,2])).then(async({getToJsonSchemaFn:e})=>e());default:throw Error(`xsschema: Unsupported schema vendor "${t}". see https://xsai.js.org/docs/packages-top/xsschema#unsupported-schema-vendor`)}},i=async e=>r(e[`~standard`].vendor).then(async t=>t(e));export{t as missingDependenciesUrl,i as toJsonSchema,n as tryImport}; \ No newline at end of file diff --git a/assets/index-CuCRViVh.js b/assets/index-CsmT0L1K.js similarity index 69% rename from assets/index-CuCRViVh.js rename to assets/index-CsmT0L1K.js index e07116fd9d11a82f9a3984328c6b8c72bd317aee..bb2a0a93aa0811ce37c2e682f259c5bff63f92d3 100644 --- a/assets/index-CuCRViVh.js +++ b/assets/index-CsmT0L1K.js @@ -1,4 +1,4 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/default-BIvW8Ai3.js","assets/HeaderLink-BuxOmtb4.js","assets/HeaderLink-DAzsygCR.css","assets/settings-Clpt817f.js","assets/components-BFLl4u81.js","assets/import-url-browser-DNuYZxPr.js","assets/duckdb-mvp-C3i5IjU8.js","assets/src-C2QbIOor.js","assets/src-B8Pazang.css","assets/stores-m0eA85gd.js","assets/composables-Cgvkd8lL.js","assets/dist-Cr2QBfS4.js","assets/webgpu-Nt9hTBpW.js","assets/index-CISmcbXk-BkTeNOgG.js","assets/types-AwjH7X1C.js","assets/queue-DAKPJQl1.js","assets/queues-Dstwm1VQ.js","assets/sleep-CvjNLutj.js","assets/__vite-browser-external-CCfYMxZl.js","assets/Button-DFhzbYVt.js","assets/Button-D6PjaMaR.css","assets/components-rFKvUtFk.css","assets/pages-DOuHM4kz.js","assets/route-block-DNPbw0zT.js","assets/AnimatedWave-Cq8X0oi8.js","assets/Basic-SuYkQxAJ.js","assets/AnimatedWave-t4o-3aNd.css","assets/background-remove-B1E0Ol5y.js","assets/InputFile-CffDHtEw.js","assets/chat-BCi2y2TP.js","assets/gesture-circle-CDDLlKJK.js","assets/image-BZfCqS0u.js","assets/image-BhuwcwI9.css","assets/polaroid-8NPKzMOn.js","assets/vibrant-DcBghPZo.js","assets/browser-bfchqW24.js","assets/queue-BXEthkka.js","assets/settings-BMETuw4R.js","assets/IconAnimation-DqqXWuqN.js","assets/airi-card-NRKIx9cL.js","assets/CardCreate-CuBkVnEJ.js","assets/CardCreationDialog-DbM2XlD1.js","assets/dist-B4cQ-m7C.js","assets/CardCreationDialog-KJgHxakH.css","assets/CardDetailDialog-BzvnHVI0.js","assets/DeleteCardDialog-D4-CgGb9.js","assets/CardListItem-DsIvl-nB.js","assets/CardCreate-DPyf_Zae.js","assets/CardCreationDialog-Bsxy1Noo.js","assets/CardDetailDialog-BqQSzFGz.js","assets/CardListItem-BrwrvTw2.js","assets/DeleteCardDialog-xlTiv14_.js","assets/appearance-DYP1DXMi.js","assets/color-scheme-CIOGKOoo.js","assets/ColorPalette-ZPdCD-E3.js","assets/color-scheme-DQ9rzeUD.css","assets/developer-DSMe0VXa.js","assets/CheckBar-BxEtoWm5.js","assets/general-DKp4DER8.js","assets/memory-SfXrd_LZ.js","assets/models-DXBLIPsA.js","assets/useIconAnimation-DqaNnagM.js","assets/models-BR8YPV_e.css","assets/modules-Cg-sfGqM.js","assets/consciousness-0dybmXhk.js","assets/memory-long-term-w7gJ2GOm.js","assets/memory-short-term-BJNXIYfx.js","assets/speech-Dg1E0ZUG.js","assets/Textarea-D04Ettdn.js","assets/providers-DesecQLA.js","assets/alibaba-cloud-model-studio-CU-ra2RE.js","assets/anthropic-DO-lpzYI.js","assets/cloudflare-workers-ai-Boy6ApbV.js","assets/deepseek-DDoXlrh7.js","assets/elevenlabs-C_CpBUe4.js","assets/featherless-ai-BrsLkmWp.js","assets/fireworks-ai-BzZp6rdf.js","assets/google-generative-ai-BmLcvcU4.js","assets/microsoft-speech-D1Nm-r-u.js","assets/mistral-ai-Dlp6niUh.js","assets/moonshot-ai-4PZIYm23.js","assets/novita-ai-BvZ0Q5n6.js","assets/ollama-BfwgYUF-.js","assets/openai-DTGR4qBa.js","assets/openai-audio-speech-NATd0MbC.js","assets/openai-audio-transcription-DbLUDJtC.js","assets/openrouter-ai-DBLeIZUx.js","assets/player2-api-CEExUfJX.js","assets/together-ai-DlBQIgEL.js","assets/volcengine-DmaJ_D4B.js","assets/xai-t3unSriW.js","assets/scene-BUwCrWjQ.js","assets/stage-BAzv3iKX.js","assets/filter-message-CCFT1WCI.js","assets/delays-IClek8Pp.js","assets/emotions-3EJrhf3a.js","assets/messages-Dz0YVnuk.js"])))=>i.map(i=>d[i]); +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/default-BdRB7bUi.js","assets/HeaderLink-Dws9YKmo.js","assets/HeaderLink-DAzsygCR.css","assets/settings-Dm8h2cwP.js","assets/components-DHUA669a.js","assets/import-url-browser-DNuYZxPr.js","assets/duckdb-mvp-C3i5IjU8.js","assets/src-C1Sr0aqN.js","assets/src-B8Pazang.css","assets/stores-2H61GqXP.js","assets/composables-CgcEyUWo.js","assets/dist-Cr2QBfS4.js","assets/webgpu-Nt9hTBpW.js","assets/index-CISmcbXk-C9oju49Y.js","assets/types-AwjH7X1C.js","assets/queue-B0kER5Ap.js","assets/queues-hSEKEE3F.js","assets/sleep-CvjNLutj.js","assets/__vite-browser-external-DPh5tFvT.js","assets/Button-D3cjyOEe.js","assets/Button-D6PjaMaR.css","assets/components-1D2TUSey.css","assets/pages-B3HnyzmI.js","assets/route-block-DNPbw0zT.js","assets/AnimatedWave-CWn5JVD4.js","assets/Basic-MLnzojs5.js","assets/AnimatedWave-DbSuFsq0.css","assets/background-remove-B5YHaKAF.js","assets/InputFile-BW-qIUxk.js","assets/chat-D2Dw5H7W.js","assets/gesture-circle-CeCcQTn3.js","assets/image-DZE-Gq8A.js","assets/image-BhuwcwI9.css","assets/polaroid-DBAaqaQb.js","assets/vibrant-3lmSC90y.js","assets/browser-bfchqW24.js","assets/queue-BV9joiY1.js","assets/settings-BZPAO2d4.js","assets/IconAnimation-BDKVR9Dg.js","assets/airi-card-DJpm8cix.js","assets/CardCreate-CN9MHSBD.js","assets/CardCreationDialog-FrhTB6Za.js","assets/dist-B9GpkGif.js","assets/CardCreationDialog-CNtImmVB.css","assets/CardDetailDialog-a4ktjZPI.js","assets/DeleteCardDialog-C6SDUYNC.js","assets/CardListItem-Bx65D5jB.js","assets/CardCreate-uNXU9uRC.js","assets/CardCreationDialog-Blfzqkvs.js","assets/CardDetailDialog-DKkDgBi1.js","assets/CardListItem-wx0Xf629.js","assets/DeleteCardDialog-BdWfuAqZ.js","assets/appearance-BjgY4Gtj.js","assets/color-scheme-Bys-iM2D.js","assets/ColorPalette-BQYkam8G.js","assets/color-scheme-DQ9rzeUD.css","assets/developer-CsRsu9bL.js","assets/CheckBar-Bo3RcSNe.js","assets/general-D9rY_FOz.js","assets/memory-Cz0Z0ybt.js","assets/models-C6v2DNx0.js","assets/useIconAnimation-bkp6MDA-.js","assets/models-ctVuVUBS.css","assets/modules-_XCJ51P8.js","assets/consciousness-CXh-iRGo.js","assets/memory-long-term-Dt8AlP6i.js","assets/memory-short-term-CWq7dsUA.js","assets/speech-BXW9V0KE.js","assets/Textarea-CK41gHte.js","assets/providers-Dj_4UV5e.js","assets/alibaba-cloud-model-studio-BlYgYX-0.js","assets/anthropic-D6RUbbgy.js","assets/cloudflare-workers-ai-CRLVRFV3.js","assets/deepseek-BM0Eh2rC.js","assets/elevenlabs-DPYwkmRS.js","assets/featherless-ai-gdrUgYDA.js","assets/fireworks-ai-fKuPeJjT.js","assets/google-generative-ai-DznmED2J.js","assets/microsoft-speech-CWxCOPph.js","assets/mistral-ai-DDvbJ_KZ.js","assets/moonshot-ai-CxTmtFOe.js","assets/novita-ai-B__UhUPQ.js","assets/ollama-B0CgDUYn.js","assets/openai-CJpzKhtx.js","assets/openai-audio-speech-BVZOIrxZ.js","assets/openai-audio-transcription-M_8aPBY1.js","assets/openrouter-ai-1dhsAjpC.js","assets/player2-api-C24B3Fua.js","assets/together-ai-aeQrm7lr.js","assets/volcengine-BXA-wkta.js","assets/xai-C7wiQ4il.js","assets/scene-CRPJttqb.js","assets/stage-BZq5_Dn1.js","assets/filter-message-39ev3J_Q.js","assets/delays-IM0BuMf_.js","assets/emotions-Bn_F7pNT.js","assets/messages-Db1po7ry.js"])))=>i.map(i=>d[i]); var e=function(exports){function t(e){"@babel/helpers - typeof";return t=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},t(e)}function n(e,n){if(t(e)!=`object`||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,n||`default`);if(t(i)!=`object`)return i;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(n===`string`?String:Number)(e)}function r(e){var r=n(e,`string`);return t(r)==`symbol`?r:r+``}function i(e,t,n){return(t=r(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}return exports.defineProperty=i,exports}({}),t=Object.create,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,a=Object.getPrototypeOf,o=Object.prototype.hasOwnProperty,s=(e,t)=>()=>(e&&(t=e(e=0)),t),c=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),l=(e,t)=>{for(var r in t)n(e,r,{get:t[r],enumerable:!0})},u=(e,t,a,s)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var c=i(t),l=0,u=c.length,d;lt[e]).bind(null,d),enumerable:!(s=r(t,d))||s.enumerable});return e},d=(e,r,i)=>(i=e==null?{}:t(a(e)),u(r||!e||!e.__esModule?n(i,`default`,{value:e,enumerable:!0}):i,e)),f=e=>u(n({},`__esModule`,{value:!0}),e),p=e=>t=>d(t.default,e),m=(e=>typeof require<`u`?require:typeof Proxy<`u`?new Proxy(e,{get:(e,t)=>(typeof require<`u`?require:e)[t]}):e)(function(e){if(typeof require<`u`)return require.apply(this,arguments);throw Error('Calling `require` for "'+e+"\" in an environment that doesn't expose the `require` function.")});(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e){if(t.type!==`childList`)continue;for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})(); /** * @vue/shared v3.5.17 @@ -8,11 +8,17 @@ var e=function(exports){function t(e){"@babel/helpers - typeof";return t=typeof /*! #__NO_SIDE_EFFECTS__ */ function h(e){let t=Object.create(null);for(let n of e.split(`,`))t[n]=1;return e=>e in t}const g={},_=[],v=()=>{},y=()=>!1,b=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),x=e=>e.startsWith(`onUpdate:`),S=Object.assign,C=(e,t)=>{let n=e.indexOf(t);n>-1&&e.splice(n,1)},w=Object.prototype.hasOwnProperty,T=(e,t)=>w.call(e,t),E=Array.isArray,D=e=>P(e)===`[object Map]`,O=e=>P(e)===`[object Set]`,k=e=>P(e)===`[object Date]`,A=e=>typeof e==`function`,j=e=>typeof e==`string`,M=e=>typeof e==`symbol`,N=e=>typeof e==`object`&&!!e,ee=e=>(N(e)||A(e))&&A(e.then)&&A(e.catch),te=Object.prototype.toString,P=e=>te.call(e),ne=e=>P(e).slice(8,-1),re=e=>P(e)===`[object Object]`,ie=e=>j(e)&&e!==`NaN`&&e[0]!==`-`&&``+parseInt(e,10)===e,ae=h(`,key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted`),oe=e=>{let t=Object.create(null);return n=>{let r=t[n];return r||(t[n]=e(n))}},se=/-(\w)/g,ce=oe(e=>e.replace(se,(e,t)=>t?t.toUpperCase():``)),le=/\B([A-Z])/g,ue=oe(e=>e.replace(le,`-$1`).toLowerCase()),de=oe(e=>e.charAt(0).toUpperCase()+e.slice(1)),fe=oe(e=>{let t=e?`on${de(e)}`:``;return t}),pe=(e,t)=>!Object.is(e,t),F=(e,...t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:r,value:n})},he=e=>{let t=parseFloat(e);return isNaN(t)?e:t},ge=e=>{let t=j(e)?Number(e):NaN;return isNaN(t)?e:t};let I;const _e=()=>I||=typeof globalThis<`u`?globalThis:typeof self<`u`?self:typeof window<`u`?window:typeof global<`u`?global:{};function L(e){if(E(e)){let t={};for(let n=0;n{if(e){let n=e.split(ye);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}function Se(e){let t=``;if(j(e))t=e;else if(E(e))for(let n=0;nke(e,t))}const je=e=>!!(e&&e.__v_isRef===!0),Me=e=>j(e)?e:e==null?``:E(e)||N(e)&&(e.toString===te||!A(e.toString))?je(e)?Me(e.value):JSON.stringify(e,Ne,2):String(e),Ne=(e,t)=>je(t)?Ne(e,t.value):D(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((e,[t,n],r)=>(e[Pe(t,r)+` =>`]=n,e),{})}:O(t)?{[`Set(${t.size})`]:[...t.values()].map(e=>Pe(e))}:M(t)?Pe(t):N(t)&&!E(t)&&!re(t)?String(t):t,Pe=(e,t=``)=>{var n;return M(e)?`Symbol(${(n=e.description)??t})`:e};function Fe(e,...t){console.warn(`[Vue warn] ${e}`,...t)}let Ie;var Le=class{constructor(e=!1){this.detached=e,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=Ie,!e&&Ie&&(this.index=(Ie.scopes||=[]).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let e,t;if(this.scopes)for(e=0,t=this.scopes.length;e0&&--this._on===0&&(Ie=this.prevScope,this.prevScope=void 0)}stop(e){if(this._active){this._active=!1;let t,n;for(t=0,n=this.effects.length;t0)return;if(Ke){let e=Ke;for(Ke=void 0;e;){let t=e.next;e.next=void 0,e.flags&=-9,e=t}}let e;for(;Ge;){let t=Ge;for(Ge=void 0;t;){let n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(t){e||=t}t=n}}if(e)throw e}function Xe(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Ze(e){let t,n=e.depsTail,r=n;for(;r;){let e=r.prevDep;r.version===-1?(r===n&&(n=e),et(r),tt(r)):t=r,r.dep.activeLink=r.prevActiveLink,r.prevActiveLink=void 0,r=e}e.deps=t,e.depsTail=n}function Qe(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&($e(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function $e(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===st)||(e.globalVersion=st,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!Qe(e))))return;e.flags|=2;let t=e.dep,n=Ve,r=nt;Ve=e,nt=!0;try{Xe(e);let n=e.fn(e._value);(t.version===0||pe(n,e._value))&&(e.flags|=128,e._value=n,t.version++)}catch(e){throw t.version++,e}finally{Ve=n,nt=r,Ze(e),e.flags&=-3}}function et(e,t=!1){let{dep:n,prevSub:r,nextSub:i}=e;if(r&&(r.nextSub=i,e.prevSub=void 0),i&&(i.prevSub=r,e.nextSub=void 0),n.subs===e&&(n.subs=r,!r&&n.computed)){n.computed.flags&=-5;for(let e=n.computed.deps;e;e=e.nextDep)et(e,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function tt(e){let{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let nt=!0;const rt=[];function it(){rt.push(nt),nt=!1}function at(){let e=rt.pop();nt=e===void 0?!0:e}function ot(e){let{cleanup:t}=e;if(e.cleanup=void 0,t){let e=Ve;Ve=void 0;try{t()}finally{Ve=e}}}let st=0;var ct=class{constructor(e,t){this.sub=e,this.dep=t,this.version=t.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}},lt=class{constructor(e){this.computed=e,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(e){if(!Ve||!nt||Ve===this.computed)return;let t=this.activeLink;if(t===void 0||t.sub!==Ve)t=this.activeLink=new ct(Ve,this),Ve.deps?(t.prevDep=Ve.depsTail,Ve.depsTail.nextDep=t,Ve.depsTail=t):Ve.deps=Ve.depsTail=t,ut(t);else if(t.version===-1&&(t.version=this.version,t.nextDep)){let e=t.nextDep;e.prevDep=t.prevDep,t.prevDep&&(t.prevDep.nextDep=e),t.prevDep=Ve.depsTail,t.nextDep=void 0,Ve.depsTail.nextDep=t,Ve.depsTail=t,Ve.deps===t&&(Ve.deps=e)}return t}trigger(e){this.version++,st++,this.notify(e)}notify(e){Je();try{for(let e=this.subs;e;e=e.prevSub)e.sub.notify()&&e.sub.dep.notify()}finally{Ye()}}};function ut(e){if(e.dep.sc++,e.sub.flags&4){let t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let e=t.deps;e;e=e.nextDep)ut(e)}let n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const dt=new WeakMap,ft=Symbol(``),pt=Symbol(``),mt=Symbol(``);function ht(e,t,n){if(nt&&Ve){let t=dt.get(e);t||dt.set(e,t=new Map);let r=t.get(n);r||(t.set(n,r=new lt),r.map=t,r.key=n),r.track()}}function gt(e,t,n,r,i,a){let o=dt.get(e);if(!o){st++;return}let s=e=>{e&&e.trigger()};if(Je(),t===`clear`)o.forEach(s);else{let i=E(e),a=i&&ie(n);if(i&&n===`length`){let e=Number(r);o.forEach((t,n)=>{(n===`length`||n===mt||!M(n)&&n>=e)&&s(t)})}else switch((n!==void 0||o.has(void 0))&&s(o.get(n)),a&&s(o.get(mt)),t){case`add`:i?a&&s(o.get(`length`)):(s(o.get(ft)),D(e)&&s(o.get(pt)));break;case`delete`:i||(s(o.get(ft)),D(e)&&s(o.get(pt)));break;case`set`:D(e)&&s(o.get(ft));break}}Ye()}function _t(e,t){let n=dt.get(e);return n&&n.get(t)}function vt(e){let t=ln(e);return t===e?t:(ht(t,`iterate`,mt),sn(e)?t:t.map(dn))}function yt(e){return ht(e=ln(e),`iterate`,mt),e}const bt={__proto__:null,[Symbol.iterator](){return xt(this,Symbol.iterator,dn)},concat(...e){return vt(this).concat(...e.map(e=>E(e)?vt(e):e))},entries(){return xt(this,`entries`,e=>(e[1]=dn(e[1]),e))},every(e,t){return Ct(this,`every`,e,t,void 0,arguments)},filter(e,t){return Ct(this,`filter`,e,t,e=>e.map(dn),arguments)},find(e,t){return Ct(this,`find`,e,t,dn,arguments)},findIndex(e,t){return Ct(this,`findIndex`,e,t,void 0,arguments)},findLast(e,t){return Ct(this,`findLast`,e,t,dn,arguments)},findLastIndex(e,t){return Ct(this,`findLastIndex`,e,t,void 0,arguments)},forEach(e,t){return Ct(this,`forEach`,e,t,void 0,arguments)},includes(...e){return Tt(this,`includes`,e)},indexOf(...e){return Tt(this,`indexOf`,e)},join(e){return vt(this).join(e)},lastIndexOf(...e){return Tt(this,`lastIndexOf`,e)},map(e,t){return Ct(this,`map`,e,t,void 0,arguments)},pop(){return Et(this,`pop`)},push(...e){return Et(this,`push`,e)},reduce(e,...t){return wt(this,`reduce`,e,t)},reduceRight(e,...t){return wt(this,`reduceRight`,e,t)},shift(){return Et(this,`shift`)},some(e,t){return Ct(this,`some`,e,t,void 0,arguments)},splice(...e){return Et(this,`splice`,e)},toReversed(){return vt(this).toReversed()},toSorted(e){return vt(this).toSorted(e)},toSpliced(...e){return vt(this).toSpliced(...e)},unshift(...e){return Et(this,`unshift`,e)},values(){return xt(this,`values`,dn)}};function xt(e,t,n){let r=yt(e),i=r[t]();return r!==e&&!sn(e)&&(i._next=i.next,i.next=()=>{let e=i._next();return e.value&&=n(e.value),e}),i}const St=Array.prototype;function Ct(e,t,n,r,i,a){let o=yt(e),s=o!==e&&!sn(e),c=o[t];if(c!==St[t]){let t=c.apply(e,a);return s?dn(t):t}let l=n;o!==e&&(s?l=function(t,r){return n.call(this,dn(t),r,e)}:n.length>2&&(l=function(t,r){return n.call(this,t,r,e)}));let u=c.call(o,l,r);return s&&i?i(u):u}function wt(e,t,n,r){let i=yt(e),a=n;return i!==e&&(sn(e)?n.length>3&&(a=function(t,r,i){return n.call(this,t,r,i,e)}):a=function(t,r,i){return n.call(this,t,dn(r),i,e)}),i[t](a,...r)}function Tt(e,t,n){let r=ln(e);ht(r,`iterate`,mt);let i=r[t](...n);return(i===-1||i===!1)&&cn(n[0])?(n[0]=ln(n[0]),r[t](...n)):i}function Et(e,t,n=[]){it(),Je();let r=ln(e)[t].apply(e,n);return Ye(),at(),r}const Dt=h(`__proto__,__v_isRef,__isVue`),Ot=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!==`arguments`&&e!==`caller`).map(e=>Symbol[e]).filter(M));function kt(e){M(e)||(e=String(e));let t=ln(this);return ht(t,`has`,e),t.hasOwnProperty(e)}var At=class{constructor(e=!1,t=!1){this._isReadonly=e,this._isShallow=t}get(e,t,n){if(t===`__v_skip`)return e.__v_skip;let r=this._isReadonly,i=this._isShallow;if(t===`__v_isReactive`)return!r;if(t===`__v_isReadonly`)return r;if(t===`__v_isShallow`)return i;if(t===`__v_raw`)return n===(r?i?Xt:Yt:i?Jt:qt).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(n)?e:void 0;let a=E(e);if(!r){let e;if(a&&(e=bt[t]))return e;if(t===`hasOwnProperty`)return kt}let o=Reflect.get(e,t,pn(e)?e:n);return(M(t)?Ot.has(t):Dt(t))||(r||ht(e,`get`,t),i)?o:pn(o)?a&&ie(t)?o:o.value:N(o)?r?tn(o):$t(o):o}},jt=class extends At{constructor(e=!1){super(!1,e)}set(e,t,n,r){let i=e[t];if(!this._isShallow){let t=on(i);if(!sn(n)&&!on(n)&&(i=ln(i),n=ln(n)),!E(e)&&pn(i)&&!pn(n))return t?!1:(i.value=n,!0)}let a=E(e)&&ie(t)?Number(t)e,Rt=e=>Reflect.getPrototypeOf(e);function zt(e,t,n){return function(...r){let i=this.__v_raw,a=ln(i),o=D(a),s=e===`entries`||e===Symbol.iterator&&o,c=e===`keys`&&o,l=i[e](...r),u=n?Lt:t?fn:dn;return!t&&ht(a,`iterate`,c?pt:ft),{next(){let{value:e,done:t}=l.next();return t?{value:e,done:t}:{value:s?[u(e[0]),u(e[1])]:u(e),done:t}},[Symbol.iterator](){return this}}}}function Bt(e){return function(...t){return e===`delete`?!1:e===`clear`?void 0:this}}function Vt(e,t){let n={get(n){let r=this.__v_raw,i=ln(r),a=ln(n);e||(pe(n,a)&&ht(i,`get`,n),ht(i,`get`,a));let{has:o}=Rt(i),s=t?Lt:e?fn:dn;if(o.call(i,n))return s(r.get(n));if(o.call(i,a))return s(r.get(a));r!==i&&r.get(n)},get size(){let t=this.__v_raw;return!e&&ht(ln(t),`iterate`,ft),Reflect.get(t,`size`,t)},has(t){let n=this.__v_raw,r=ln(n),i=ln(t);return e||(pe(t,i)&&ht(r,`has`,t),ht(r,`has`,i)),t===i?n.has(t):n.has(t)||n.has(i)},forEach(n,r){let i=this,a=i.__v_raw,o=ln(a),s=t?Lt:e?fn:dn;return!e&&ht(o,`iterate`,ft),a.forEach((e,t)=>n.call(r,s(e),s(t),i))}};S(n,e?{add:Bt(`add`),set:Bt(`set`),delete:Bt(`delete`),clear:Bt(`clear`)}:{add(e){!t&&!sn(e)&&!on(e)&&(e=ln(e));let n=ln(this),r=Rt(n),i=r.has.call(n,e);return i||(n.add(e),gt(n,`add`,e,e)),this},set(e,n){!t&&!sn(n)&&!on(n)&&(n=ln(n));let r=ln(this),{has:i,get:a}=Rt(r),o=i.call(r,e);o||(e=ln(e),o=i.call(r,e));let s=a.call(r,e);return r.set(e,n),o?pe(n,s)&>(r,`set`,e,n,s):gt(r,`add`,e,n),this},delete(e){let t=ln(this),{has:n,get:r}=Rt(t),i=n.call(t,e);i||(e=ln(e),i=n.call(t,e));let a=r?r.call(t,e):void 0,o=t.delete(e);return i&>(t,`delete`,e,void 0,a),o},clear(){let e=ln(this),t=e.size!==0,n,r=e.clear();return t&>(e,`clear`,void 0,void 0,n),r}});let r=[`keys`,`values`,`entries`,Symbol.iterator];return r.forEach(r=>{n[r]=zt(r,e,t)}),n}function Ht(e,t){let n=Vt(e,t);return(t,r,i)=>r===`__v_isReactive`?!e:r===`__v_isReadonly`?e:r===`__v_raw`?t:Reflect.get(T(n,r)&&r in t?n:t,r,i)}const Ut={get:Ht(!1,!1)},Wt={get:Ht(!1,!0)},Gt={get:Ht(!0,!1)},Kt={get:Ht(!0,!0)},qt=new WeakMap,Jt=new WeakMap,Yt=new WeakMap,Xt=new WeakMap;function Zt(e){switch(e){case`Object`:case`Array`:return 1;case`Map`:case`Set`:case`WeakMap`:case`WeakSet`:return 2;default:return 0}}function Qt(e){return e.__v_skip||!Object.isExtensible(e)?0:Zt(ne(e))}function $t(e){return on(e)?e:rn(e,!1,Nt,Ut,qt)}function en(e){return rn(e,!1,Ft,Wt,Jt)}function tn(e){return rn(e,!0,Pt,Gt,Yt)}function nn(e){return rn(e,!0,It,Kt,Xt)}function rn(e,t,n,r,i){if(!N(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;let a=Qt(e);if(a===0)return e;let o=i.get(e);if(o)return o;let s=new Proxy(e,a===2?r:n);return i.set(e,s),s}function an(e){return on(e)?an(e.__v_raw):!!(e&&e.__v_isReactive)}function on(e){return!!(e&&e.__v_isReadonly)}function sn(e){return!!(e&&e.__v_isShallow)}function cn(e){return e?!!e.__v_raw:!1}function ln(e){let t=e&&e.__v_raw;return t?ln(t):e}function un(e){return!T(e,`__v_skip`)&&Object.isExtensible(e)&&me(e,`__v_skip`,!0),e}const dn=e=>N(e)?$t(e):e,fn=e=>N(e)?tn(e):e;function pn(e){return e?e.__v_isRef===!0:!1}function R(e){return mn(e,!1)}function z(e){return mn(e,!0)}function mn(e,t){return pn(e)?e:new hn(e,t)}var hn=class{constructor(e,t){this.dep=new lt,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=t?e:ln(e),this._value=t?e:dn(e),this.__v_isShallow=t}get value(){return this.dep.track(),this._value}set value(e){let t=this._rawValue,n=this.__v_isShallow||sn(e)||on(e);e=n?e:ln(e),pe(e,t)&&(this._rawValue=e,this._value=n?e:dn(e),this.dep.trigger())}};function gn(e){e.dep&&e.dep.trigger()}function _n(e){return pn(e)?e.value:e}function B(e){return A(e)?e():_n(e)}const vn={get:(e,t,n)=>t===`__v_raw`?e:_n(Reflect.get(e,t,n)),set:(e,t,n,r)=>{let i=e[t];return pn(i)&&!pn(n)?(i.value=n,!0):Reflect.set(e,t,n,r)}};function yn(e){return an(e)?e:new Proxy(e,vn)}var bn=class{constructor(e){this.__v_isRef=!0,this._value=void 0;let t=this.dep=new lt,{get:n,set:r}=e(t.track.bind(t),t.trigger.bind(t));this._get=n,this._set=r}get value(){return this._value=this._get()}set value(e){this._set(e)}};function xn(e){return new bn(e)}function Sn(e){let t=E(e)?Array(e.length):{};for(let n in e)t[n]=En(e,n);return t}var Cn=class{constructor(e,t,n){this._object=e,this._key=t,this._defaultValue=n,this.__v_isRef=!0,this._value=void 0}get value(){let e=this._object[this._key];return this._value=e===void 0?this._defaultValue:e}set value(e){this._object[this._key]=e}get dep(){return _t(ln(this._object),this._key)}},wn=class{constructor(e){this._getter=e,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}};function Tn(e,t,n){return pn(e)?e:A(e)?new wn(e):N(e)&&arguments.length>1?En(e,t,n):R(e)}function En(e,t,n){let r=e[t];return pn(r)?r:new Cn(e,t,n)}var Dn=class{constructor(e,t,n){this.fn=e,this.setter=t,this._value=void 0,this.dep=new lt(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=st-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!t,this.isSSR=n}notify(){if(this.flags|=16,!(this.flags&8)&&Ve!==this)return qe(this,!0),!0}get value(){let e=this.dep.track();return $e(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter&&this.setter(e)}};function On(e,t,n=!1){let r,i;A(e)?r=e:(r=e.get,i=e.set);let a=new Dn(r,i,n);return a}const kn={},An=new WeakMap;let jn;function Mn(e,t=!1,n=jn){if(n){let t=An.get(n);t||An.set(n,t=[]),t.push(e)}}function Nn(e,t,n=g){let{immediate:r,deep:i,once:a,scheduler:o,augmentJob:s,call:c}=n,l=e=>{(n.onWarn||Fe)(`Invalid watch source: `,e,`A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.`)},u=e=>i?e:sn(e)||i===!1||i===0?Pn(e,1):Pn(e),d,f,p,m,h=!1,_=!1;if(pn(e)?(f=()=>e.value,h=sn(e)):an(e)?(f=()=>u(e),h=!0):E(e)?(_=!0,h=e.some(e=>an(e)||sn(e)),f=()=>e.map(e=>{if(pn(e))return e.value;if(an(e))return u(e);if(A(e))return c?c(e,2):e()})):f=A(e)?t?c?()=>c(e,2):e:()=>{if(p){it();try{p()}finally{at()}}let t=jn;jn=d;try{return c?c(e,3,[m]):e(m)}finally{jn=t}}:v,t&&i){let e=f,t=i===!0?1/0:i;f=()=>Pn(e(),t)}let y=ze(),b=()=>{d.stop(),y&&y.active&&C(y.effects,d)};if(a&&t){let e=t;t=(...t)=>{e(...t),b()}}let x=_?Array(e.length).fill(kn):kn,S=e=>{if(!(!(d.flags&1)||!d.dirty&&!e))if(t){let e=d.run();if(i||h||(_?e.some((e,t)=>pe(e,x[t])):pe(e,x))){p&&p();let n=jn;jn=d;try{let n=[e,x===kn?void 0:_&&x[0]===kn?[]:x,m];x=e,c?c(t,3,n):t(...n)}finally{jn=n}}}else d.run()};return s&&s(S),d=new Ue(f),d.scheduler=o?()=>o(S,!1):S,m=e=>Mn(e,!1,d),p=d.onStop=()=>{let e=An.get(d);if(e){if(c)c(e,4);else for(let t of e)t();An.delete(d)}},t?r?S(!0):x=d.run():o?o(S.bind(null,!0),!0):d.run(),b.pause=d.pause.bind(d),b.resume=d.resume.bind(d),b.stop=b,b}function Pn(e,t=1/0,n){if(t<=0||!N(e)||e.__v_skip||(n||=new Set,n.has(e)))return e;if(n.add(e),t--,pn(e))Pn(e.value,t,n);else if(E(e))for(let r=0;r{Pn(e,t,n)});else if(re(e)){for(let r in e)Pn(e[r],t,n);for(let r of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,r)&&Pn(e[r],t,n)}return e}function Fn(e,t,n,r){try{return r?e(...r):e()}catch(e){Ln(e,t,n)}}function In(e,t,n,r){if(A(e)){let i=Fn(e,t,n,r);return i&&ee(i)&&i.catch(e=>{Ln(e,t,n)}),i}if(E(e)){let i=[];for(let a=0;a>>1,i=zn[r],a=$n(i);a=$n(n)?zn.push(e):zn.splice(qn(t),0,e),e.flags|=1,Yn()}}function Yn(){Gn||=Wn.then(er)}function Xn(e){E(e)?Vn.push(...e):Hn&&e.id===-1?Hn.splice(Un+1,0,e):e.flags&1||(Vn.push(e),e.flags|=1),Yn()}function Zn(e,t,n=Bn+1){for(;n$n(e)-$n(t));if(Vn.length=0,Hn){Hn.push(...e);return}for(Hn=e,Un=0;Une.id==null?e.flags&2?-1:1/0:e.id;function er(e){let t=v;try{for(Bn=0;Bnsr;function sr(e,t=tr,n){if(!t||e._n)return e;let r=(...n)=>{r._d&&io(-1);let i=rr(t),a;try{a=e(...n)}finally{rr(i),r._d&&io(1)}return a};return r._n=!0,r._c=!0,r._d=!0,r}function cr(e,t){if(tr===null)return e;let n=Go(tr),r=e.dirs||=[];for(let e=0;ee.__isTeleport,fr=e=>e&&(e.disabled||e.disabled===``),pr=e=>e&&(e.defer||e.defer===``),mr=e=>typeof SVGElement<`u`&&e instanceof SVGElement,hr=e=>typeof MathMLElement==`function`&&e instanceof MathMLElement,gr=(e,t)=>{let n=e&&e.to;if(j(n))if(t){let e=t(n);return e}else return null;else return n},_r={name:`Teleport`,__isTeleport:!0,process(e,t,n,r,i,a,o,s,c,l){let{mc:u,pc:d,pbc:f,o:{insert:p,querySelector:m,createText:h,createComment:g}}=l,_=fr(t.props),{shapeFlag:v,children:y,dynamicChildren:b}=t;if(e==null){let e=t.el=h(``),l=t.anchor=h(``);p(e,n,r),p(l,n,r);let d=(e,t)=>{v&16&&(i&&i.isCE&&(i.ce._teleportTarget=e),u(y,e,t,i,a,o,s,c))},f=()=>{let e=t.target=gr(t.props,m),n=Sr(e,t,h,p);e&&(o!==`svg`&&mr(e)?o=`svg`:o!==`mathml`&&hr(e)&&(o=`mathml`),_||(d(e,n),xr(t,!1)))};_&&(d(n,l),xr(t,!0)),pr(t.props)?(t.el.__isMounted=!1,va(()=>{f(),delete t.el.__isMounted},a)):f()}else{if(pr(t.props)&&e.el.__isMounted===!1){va(()=>{_r.process(e,t,n,r,i,a,o,s,c,l)},a);return}t.el=e.el,t.targetStart=e.targetStart;let u=t.anchor=e.anchor,p=t.target=e.target,h=t.targetAnchor=e.targetAnchor,g=fr(e.props),v=g?n:p,y=g?u:h;if(o===`svg`||mr(p)?o=`svg`:(o===`mathml`||hr(p))&&(o=`mathml`),b?(f(e.dynamicChildren,b,v,i,a,o,s),wa(e,t,!0)):c||d(e,t,v,y,i,a,o,s,!1),_)g?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):vr(t,n,u,l,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){let e=t.target=gr(t.props,m);e&&vr(t,e,null,l,0)}else g&&vr(t,p,h,l,1);xr(t,_)}},remove(e,t,n,{um:r,o:{remove:i}},a){let{shapeFlag:o,children:s,anchor:c,targetStart:l,targetAnchor:u,target:d,props:f}=e;if(d&&(i(l),i(u)),a&&i(c),o&16){let e=a||!fr(f);for(let i=0;i{e.isMounted=!0}),ni(()=>{e.isUnmounting=!0}),e}const Er=[Function,Array],Dr={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Er,onEnter:Er,onAfterEnter:Er,onEnterCancelled:Er,onBeforeLeave:Er,onLeave:Er,onAfterLeave:Er,onLeaveCancelled:Er,onBeforeAppear:Er,onAppear:Er,onAfterAppear:Er,onAppearCancelled:Er},Or=e=>{let t=e.subTree;return t.component?Or(t.component):t},kr={name:`BaseTransition`,props:Dr,setup(e,{slots:t}){let n=Ao(),r=Tr();return()=>{let i=t.default&&Lr(t.default(),!0);if(!i||!i.length)return;let a=Ar(i),o=ln(e),{mode:s}=o;if(r.isLeaving)return Pr(a);let c=Fr(a);if(!c)return Pr(a);let l=Nr(c,o,r,n,e=>l=e);c.type!==Za&&Ir(c,l);let u=n.subTree&&Fr(n.subTree);if(u&&u.type!==Za&&!lo(c,u)&&Or(n).type!==Za){let e=Nr(u,o,r,n);if(Ir(u,e),s===`out-in`&&c.type!==Za)return r.isLeaving=!0,e.afterLeave=()=>{r.isLeaving=!1,n.job.flags&8||n.update(),delete e.afterLeave,u=void 0},Pr(a);s===`in-out`&&c.type!==Za?e.delayLeave=(e,t,n)=>{let i=Mr(r,u);i[String(u.key)]=u,e[Cr]=()=>{t(),e[Cr]=void 0,delete l.delayedLeave,u=void 0},l.delayedLeave=()=>{n(),delete l.delayedLeave,u=void 0}}:u=void 0}else u&&=void 0;return a}}};function Ar(e){let t=e[0];if(e.length>1){let n=!1;for(let r of e)if(r.type!==Za){t=r,n=!0;break}}return t}const jr=kr;function Mr(e,t){let{leavingVNodes:n}=e,r=n.get(t.type);return r||(r=Object.create(null),n.set(t.type,r)),r}function Nr(e,t,n,r,i){let{appear:a,mode:o,persisted:s=!1,onBeforeEnter:c,onEnter:l,onAfterEnter:u,onEnterCancelled:d,onBeforeLeave:f,onLeave:p,onAfterLeave:m,onLeaveCancelled:h,onBeforeAppear:g,onAppear:_,onAfterAppear:v,onAppearCancelled:y}=t,b=String(e.key),x=Mr(n,e),S=(e,t)=>{e&&In(e,r,9,t)},C=(e,t)=>{let n=t[1];S(e,t),E(e)?e.every(e=>e.length<=1)&&n():e.length<=1&&n()},w={mode:o,persisted:s,beforeEnter(t){let r=c;if(!n.isMounted)if(a)r=g||c;else return;t[Cr]&&t[Cr](!0);let i=x[b];i&&lo(e,i)&&i.el[Cr]&&i.el[Cr](),S(r,[t])},enter(e){let t=l,r=u,i=d;if(!n.isMounted)if(a)t=_||l,r=v||u,i=y||d;else return;let o=!1,s=e[wr]=t=>{o||(o=!0,S(t?i:r,[e]),w.delayedLeave&&w.delayedLeave(),e[wr]=void 0)};t?C(t,[e,s]):s()},leave(t,r){let i=String(e.key);if(t[wr]&&t[wr](!0),n.isUnmounting)return r();S(f,[t]);let a=!1,o=t[Cr]=n=>{a||(a=!0,r(),S(n?h:m,[t]),t[Cr]=void 0,x[i]===e&&delete x[i])};x[i]=e,p?C(p,[t,o]):o()},clone(e){let a=Nr(e,t,n,r,i);return i&&i(a),a}};return w}function Pr(e){if(Gr(e))return e=_o(e),e.children=null,e}function Fr(e){if(!Gr(e))return dr(e.type)&&e.children?Ar(e.children):e;if(e.component)return e.component.subTree;let{shapeFlag:t,children:n}=e;if(n){if(t&16)return n[0];if(t&32&&A(n.default))return n.default()}}function Ir(e,t){e.shapeFlag&6&&e.component?(e.transition=t,Ir(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function Lr(e,t=!1,n){let r=[],i=0;for(let a=0;a1)for(let e=0;eS({name:e.name},t,{setup:e}))():e}function zr(){let e=Ao();return e?(e.appContext.config.idPrefix||`v`)+`-`+e.ids[0]+ e.ids[1]++:``}function Br(e){e.ids=[e.ids[0]+ e.ids[2]+++`-`,0,0]}function Vr(e,t,n,r,i=!1){if(E(e)){e.forEach((e,a)=>Vr(e,t&&(E(t)?t[a]:t),n,r,i));return}if(Wr(r)&&!i){r.shapeFlag&512&&r.type.__asyncResolved&&r.component.subTree.component&&Vr(e,t,n,r.component.subTree);return}let a=r.shapeFlag&4?Go(r.component):r.el,o=i?null:a,{i:s,r:c}=e,l=t&&t.r,u=s.refs===g?s.refs={}:s.refs,d=s.setupState,f=ln(d),p=d===g?()=>!1:e=>T(f,e);if(l!=null&&l!==c&&(j(l)?(u[l]=null,p(l)&&(d[l]=null)):pn(l)&&(l.value=null)),A(c))Fn(c,s,12,[o,u]);else{let t=j(c),r=pn(c);if(t||r){let s=()=>{if(e.f){let n=t?p(c)?d[c]:u[c]:c.value;i?E(n)&&C(n,a):E(n)?n.includes(a)||n.push(a):t?(u[c]=[a],p(c)&&(d[c]=u[c])):(c.value=[a],e.k&&(u[e.k]=c.value))}else t?(u[c]=o,p(c)&&(d[c]=o)):r&&(c.value=o,e.k&&(u[e.k]=o))};o?(s.id=-1,va(s,n)):s()}}}const Hr=_e().requestIdleCallback||(e=>setTimeout(e,1)),Ur=_e().cancelIdleCallback||(e=>clearTimeout(e)),Wr=e=>!!e.type.__asyncLoader,Gr=e=>e.type.__isKeepAlive;function Kr(e,t){Jr(e,`a`,t)}function qr(e,t){Jr(e,`da`,t)}function Jr(e,t,n=ko){let r=e.__wdc||=()=>{let t=n;for(;t;){if(t.isDeactivated)return;t=t.parent}return e()};if(Xr(t,r,n),n){let e=n.parent;for(;e&&e.parent;)Gr(e.parent.vnode)&&Yr(r,t,n,e),e=e.parent}}function Yr(e,t,n,r){let i=Xr(t,e,r,!0);ri(()=>{C(r[t],i)},n)}function Xr(e,t,n=ko,r=!1){if(n){let i=n[e]||(n[e]=[]),a=t.__weh||=(...r)=>{it();let i=No(n),a=In(t,n,e,r);return i(),at(),a};return r?i.unshift(a):i.push(a),a}}const Zr=e=>(t,n=ko)=>{(!Io||e===`sp`)&&Xr(e,(...e)=>t(...e),n)},Qr=Zr(`bm`),$r=Zr(`m`),ei=Zr(`bu`),ti=Zr(`u`),ni=Zr(`bum`),ri=Zr(`um`),ii=Zr(`sp`),ai=Zr(`rtg`),oi=Zr(`rtc`);function si(e,t=ko){Xr(`ec`,e,t)}const ci=`components`,li=`directives`;function ui(e,t){return mi(ci,e,!0,t)||e}const di=Symbol.for(`v-ndc`);function fi(e){return j(e)?mi(ci,e,!1)||e:e||di}function pi(e){return mi(li,e)}function mi(e,t,n=!0,r=!1){let i=tr||ko;if(i){let n=i.type;if(e===ci){let e=Ko(n,!1);if(e&&(e===t||e===ce(t)||e===de(ce(t))))return n}let a=hi(i[e]||n[e],t)||hi(i.appContext[e],t);return!a&&r?n:a}}function hi(e,t){return e&&(e[t]||e[ce(t)]||e[de(ce(t))])}function gi(e,t,n,r){let i,a=n&&n[r],o=E(e);if(o||j(e)){let n=o&&an(e),r=!1,s=!1;n&&(r=!sn(e),s=on(e),e=yt(e)),i=Array(e.length);for(let n=0,o=e.length;nt(e,n,void 0,a&&a[n]));else{let n=Object.keys(e);i=Array(n.length);for(let r=0,o=n.length;rco(e)?!(e.type===Za||e.type===Ya&&!vi(e.children)):!0)?e:null}function yi(e,t){let n={};for(let r in e)n[t&&/[A-Z]/.test(r)?`on:${r}`:fe(r)]=e[r];return n}const bi=e=>e?Fo(e)?Go(e):bi(e.parent):null,xi=S(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>bi(e.parent),$root:e=>bi(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>Ii(e),$forceUpdate:e=>e.f||=()=>{Jn(e.update)},$nextTick:e=>e.n||=Kn.bind(e.proxy),$watch:e=>Pa.bind(e)}),Si=(e,t)=>e!==g&&!e.__isScriptSetup&&T(e,t),Ci={get({_:e},t){if(t===`__v_skip`)return!0;let{ctx:n,setupState:r,data:i,props:a,accessCache:o,type:s,appContext:c}=e,l;if(t[0]!==`$`){let s=o[t];if(s!==void 0)switch(s){case 1:return r[t];case 2:return i[t];case 4:return n[t];case 3:return a[t]}else if(Si(r,t))return o[t]=1,r[t];else if(i!==g&&T(i,t))return o[t]=2,i[t];else if((l=e.propsOptions[0])&&T(l,t))return o[t]=3,a[t];else if(n!==g&&T(n,t))return o[t]=4,n[t];else ji&&(o[t]=0)}let u=xi[t],d,f;if(u)return t===`$attrs`&&ht(e.attrs,`get`,``),u(e);if((d=s.__cssModules)&&(d=d[t]))return d;if(n!==g&&T(n,t))return o[t]=4,n[t];if(f=c.config.globalProperties,T(f,t))return f[t]},set({_:e},t,n){let{data:r,setupState:i,ctx:a}=e;return Si(i,t)?(i[t]=n,!0):r!==g&&T(r,t)?(r[t]=n,!0):T(e.props,t)||t[0]===`$`&&t.slice(1)in e?!1:(a[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:r,appContext:i,propsOptions:a}},o){let s;return!!n[o]||e!==g&&T(e,o)||Si(t,o)||(s=a[0])&&T(s,o)||T(r,o)||T(xi,o)||T(i.config.globalProperties,o)},defineProperty(e,t,n){return n.get==null?T(n,`value`)&&this.set(e,t,n.value,null):e._.accessCache[t]=0,Reflect.defineProperty(e,t,n)}};function wi(){return Ei().slots}function Ti(){return Ei().attrs}function Ei(){let e=Ao();return e.setupContext||=Wo(e)}function Di(e){return E(e)?e.reduce((e,t)=>(e[t]=null,e),{}):e}function Oi(e,t){let n=Di(e);for(let e in t){if(e.startsWith(`__skip`))continue;let r=n[e];r?E(r)||A(r)?r=n[e]={type:r,default:t[e]}:r.default=t[e]:r===null&&(r=n[e]={default:t[e]}),r&&t[`__skip_${e}`]&&(r.skipFactory=!0)}return n}function ki(e,t){return!e||!t?e||t:E(e)&&E(t)?e.concat(t):S({},Di(e),Di(t))}function Ai(e){let t=Ao(),n=e();return Po(),ee(n)&&(n=n.catch(e=>{throw No(t),e})),[n,()=>No(t)]}let ji=!0;function Mi(e){let t=Ii(e),n=e.proxy,r=e.ctx;ji=!1,t.beforeCreate&&Pi(t.beforeCreate,e,`bc`);let{data:i,computed:a,methods:o,watch:s,provide:c,inject:l,created:u,beforeMount:d,mounted:f,beforeUpdate:p,updated:m,activated:h,deactivated:g,beforeDestroy:_,beforeUnmount:y,destroyed:b,unmounted:x,render:S,renderTracked:C,renderTriggered:w,errorCaptured:T,serverPrefetch:D,expose:O,inheritAttrs:k,components:j,directives:M,filters:ee}=t,te=null;if(l&&Ni(l,r,te),o)for(let e in o){let t=o[e];A(t)&&(r[e]=t.bind(n))}if(i){let t=i.call(n,n);N(t)&&(e.data=$t(t))}if(ji=!0,a)for(let e in a){let t=a[e],i=A(t)?t.bind(n,n):A(t.get)?t.get.bind(n,n):v,o=!A(t)&&A(t.set)?t.set.bind(n):v,s=H({get:i,set:o});Object.defineProperty(r,e,{enumerable:!0,configurable:!0,get:()=>s.value,set:e=>s.value=e})}if(s)for(let e in s)Fi(s[e],r,n,e);if(c){let e=A(c)?c.call(n):c;Reflect.ownKeys(e).forEach(t=>{Xi(t,e[t])})}u&&Pi(u,e,`c`);function P(e,t){E(t)?t.forEach(t=>e(t.bind(n))):t&&e(t.bind(n))}if(P(Qr,d),P($r,f),P(ei,p),P(ti,m),P(Kr,h),P(qr,g),P(si,T),P(oi,C),P(ai,w),P(ni,y),P(ri,x),P(ii,D),E(O))if(O.length){let t=e.exposed||={};O.forEach(e=>{Object.defineProperty(t,e,{get:()=>n[e],set:t=>n[e]=t})})}else e.exposed||={};S&&e.render===v&&(e.render=S),k!=null&&(e.inheritAttrs=k),j&&(e.components=j),M&&(e.directives=M),D&&Br(e)}function Ni(e,t,n=v){for(let n in E(e)&&(e=Vi(e)),e){let r=e[n],i;i=N(r)?`default`in r?Zi(r.from||n,r.default,!0):Zi(r.from||n):Zi(r),pn(i)?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>i.value,set:e=>i.value=e}):t[n]=i}}function Pi(e,t,n){In(E(e)?e.map(e=>e.bind(t.proxy)):e.bind(t.proxy),t,n)}function Fi(e,t,n,r){let i=r.includes(`.`)?Fa(n,r):()=>n[r];if(j(e)){let n=t[e];A(n)&&V(i,n)}else if(A(e))V(i,e.bind(n));else if(N(e))if(E(e))e.forEach(e=>Fi(e,t,n,r));else{let r=A(e.handler)?e.handler.bind(n):t[e.handler];A(r)&&V(i,r,e)}}function Ii(e){let t=e.type,{mixins:n,extends:r}=t,{mixins:i,optionsCache:a,config:{optionMergeStrategies:o}}=e.appContext,s=a.get(t),c;return s?c=s:!i.length&&!n&&!r?c=t:(c={},i.length&&i.forEach(e=>Li(c,e,o,!0)),Li(c,t,o)),N(t)&&a.set(t,c),c}function Li(e,t,n,r=!1){let{mixins:i,extends:a}=t;for(let o in a&&Li(e,a,n,!0),i&&i.forEach(t=>Li(e,t,n,!0)),t)if(!(r&&o===`expose`)){let r=Ri[o]||n&&n[o];e[o]=r?r(e[o],t[o]):t[o]}return e}const Ri={data:zi,props:Wi,emits:Wi,methods:Ui,computed:Ui,beforeCreate:Hi,created:Hi,beforeMount:Hi,mounted:Hi,beforeUpdate:Hi,updated:Hi,beforeDestroy:Hi,beforeUnmount:Hi,destroyed:Hi,unmounted:Hi,activated:Hi,deactivated:Hi,errorCaptured:Hi,serverPrefetch:Hi,components:Ui,directives:Ui,watch:Gi,provide:zi,inject:Bi};function zi(e,t){return t?e?function(){return S(A(e)?e.call(this,this):e,A(t)?t.call(this,this):t)}:t:e}function Bi(e,t){return Ui(Vi(e),Vi(t))}function Vi(e){if(E(e)){let t={};for(let n=0;n1)return n&&A(t)?t.call(r&&r.proxy):t}}function Qi(){return!!(ko||tr||Yi)}const $i={},ea=()=>Object.create($i),ta=e=>Object.getPrototypeOf(e)===$i;function na(e,t,n,r=!1){let i={},a=ea();for(let n in e.propsDefaults=Object.create(null),ia(e,t,i,a),e.propsOptions[0])n in i||(i[n]=void 0);n?e.props=r?i:en(i):e.type.props?e.props=i:e.props=a,e.attrs=a}function ra(e,t,n,r){let{props:i,attrs:a,vnode:{patchFlag:o}}=e,s=ln(i),[c]=e.propsOptions,l=!1;if((r||o>0)&&!(o&16)){if(o&8){let n=e.vnode.dynamicProps;for(let r=0;r{c=!0;let[n,r]=sa(e,t,!0);S(o,n),r&&s.push(...r)};!n&&t.mixins.length&&t.mixins.forEach(r),e.extends&&r(e.extends),e.mixins&&e.mixins.forEach(r)}if(!a&&!c)return N(e)&&r.set(e,_),_;if(E(a))for(let e=0;ee[0]===`_`||e===`$stable`,ua=e=>E(e)?e.map(xo):[xo(e)],da=(e,t,n)=>{if(t._n)return t;let r=sr((...e)=>ua(t(...e)),n);return r._c=!1,r},fa=(e,t,n)=>{let r=e._ctx;for(let n in e){if(la(n))continue;let i=e[n];if(A(i))t[n]=da(n,i,r);else if(i!=null){let e=ua(i);t[n]=()=>e}}},pa=(e,t)=>{let n=ua(t);e.slots.default=()=>n},ma=(e,t,n)=>{for(let r in t)(n||!la(r))&&(e[r]=t[r])},ha=(e,t,n)=>{let r=e.slots=ea();if(e.vnode.shapeFlag&32){let e=t.__;e&&me(r,`__`,e,!0);let i=t._;i?(ma(r,t,n),n&&me(r,`_`,i,!0)):fa(t,r)}else t&&pa(e,t)},ga=(e,t,n)=>{let{vnode:r,slots:i}=e,a=!0,o=g;if(r.shapeFlag&32){let e=t._;e?n&&e===1?a=!1:ma(i,t,n):(a=!t.$stable,fa(t,i)),o=t}else t&&(pa(e,t),o={default:1});if(a)for(let e in i)!la(e)&&o[e]==null&&delete i[e]};function _a(){let e=[]}const va=Ja;function ya(e){return ba(e)}function ba(e,t){_a();let n=_e();n.__VUE__=!0;let{insert:r,remove:i,patchProp:a,createElement:o,createText:s,createComment:c,setText:l,setElementText:u,parentNode:d,nextSibling:f,setScopeId:p=v,insertStaticContent:m}=e,h=(e,t,n,r=null,i=null,a=null,o=void 0,s=null,c=!!t.dynamicChildren)=>{if(e===t)return;e&&!lo(e,t)&&(r=me(e),le(e,i,a,!0),e=null),t.patchFlag===-2&&(c=!1,t.dynamicChildren=null);let{type:l,ref:u,shapeFlag:d}=t;switch(l){case Xa:y(e,t,n,r);break;case Za:b(e,t,n,r);break;case Qa:e??x(t,n,r,o);break;case Ya:N(e,t,n,r,i,a,o,s,c);break;default:d&1?T(e,t,n,r,i,a,o,s,c):d&6?ee(e,t,n,r,i,a,o,s,c):(d&64||d&128)&&l.process(e,t,n,r,i,a,o,s,c,I)}u!=null&&i?Vr(u,e&&e.ref,a,t||e,!t):u==null&&e&&e.ref!=null&&Vr(e.ref,null,a,e,!0)},y=(e,t,n,i)=>{if(e==null)r(t.el=s(t.children),n,i);else{let n=t.el=e.el;t.children!==e.children&&l(n,t.children)}},b=(e,t,n,i)=>{e==null?r(t.el=c(t.children||``),n,i):t.el=e.el},x=(e,t,n,r)=>{[e.el,e.anchor]=m(e.children,t,n,r,e.el,e.anchor)},S=(e,t,n,r)=>{if(t.children!==e.children){let i=f(e.anchor);w(e),[t.el,t.anchor]=m(t.children,n,i,r)}else t.el=e.el,t.anchor=e.anchor},C=({el:e,anchor:t},n,i)=>{let a;for(;e&&e!==t;)a=f(e),r(e,n,i),e=a;r(t,n,i)},w=({el:e,anchor:t})=>{let n;for(;e&&e!==t;)n=f(e),i(e),e=n;i(t)},T=(e,t,n,r,i,a,o,s,c)=>{t.type===`svg`?o=`svg`:t.type===`math`&&(o=`mathml`),e==null?D(t,n,r,i,a,o,s,c):A(e,t,i,a,o,s,c)},D=(e,t,n,i,s,c,l,d)=>{let f,p,{props:m,shapeFlag:h,transition:g,dirs:_}=e;if(f=e.el=o(e.type,c,m&&m.is,m),h&8?u(f,e.children):h&16&&k(e.children,f,null,i,s,xa(e,c),l,d),_&&lr(e,null,i,`created`),O(f,e,e.scopeId,l,i),m){for(let e in m)e!==`value`&&!ae(e)&&a(f,e,null,m[e],c,i);`value`in m&&a(f,`value`,null,m.value,c),(p=m.onVnodeBeforeMount)&&To(p,i,e)}_&&lr(e,null,i,`beforeMount`);let v=Ca(s,g);v&&g.beforeEnter(f),r(f,t,n),((p=m&&m.onVnodeMounted)||v||_)&&va(()=>{p&&To(p,i,e),v&&g.enter(f),_&&lr(e,null,i,`mounted`)},s)},O=(e,t,n,r,i)=>{if(n&&p(e,n),r)for(let t=0;t{for(let l=c;l{let c=t.el=e.el,{patchFlag:l,dynamicChildren:d,dirs:f}=t;l|=e.patchFlag&16;let p=e.props||g,m=t.props||g,h;if(n&&Sa(n,!1),(h=m.onVnodeBeforeUpdate)&&To(h,n,t,e),f&&lr(t,e,n,`beforeUpdate`),n&&Sa(n,!0),(p.innerHTML&&m.innerHTML==null||p.textContent&&m.textContent==null)&&u(c,``),d?j(e.dynamicChildren,d,c,n,r,xa(t,i),o):s||ie(e,t,c,null,n,r,xa(t,i),o,!1),l>0){if(l&16)M(c,p,m,n,i);else if(l&2&&p.class!==m.class&&a(c,`class`,null,m.class,i),l&4&&a(c,`style`,p.style,m.style,i),l&8){let e=t.dynamicProps;for(let t=0;t{h&&To(h,n,t,e),f&&lr(t,e,n,`updated`)},r)},j=(e,t,n,r,i,a,o)=>{for(let s=0;s{if(t!==n){if(t!==g)for(let o in t)!ae(o)&&!(o in n)&&a(e,o,t[o],null,i,r);for(let o in n){if(ae(o))continue;let s=n[o],c=t[o];s!==c&&o!==`value`&&a(e,o,c,s,i,r)}`value`in n&&a(e,`value`,t.value,n.value,i)}},N=(e,t,n,i,a,o,c,l,u)=>{let d=t.el=e?e.el:s(``),f=t.anchor=e?e.anchor:s(``),{patchFlag:p,dynamicChildren:m,slotScopeIds:h}=t;h&&(l=l?l.concat(h):h),e==null?(r(d,n,i),r(f,n,i),k(t.children||[],n,f,a,o,c,l,u)):p>0&&p&64&&m&&e.dynamicChildren?(j(e.dynamicChildren,m,n,a,o,c,l),(t.key!=null||a&&t===a.subTree)&&wa(e,t,!0)):ie(e,t,n,f,a,o,c,l,u)},ee=(e,t,n,r,i,a,o,s,c)=>{t.slotScopeIds=s,e==null?t.shapeFlag&512?i.ctx.activate(t,n,r,o,c):te(t,n,r,i,a,o,c):P(e,t,c)},te=(e,t,n,r,i,a,o)=>{let s=e.component=Oo(e,r,i);if(Gr(e)&&(s.ctx.renderer=I),Lo(s,!1,o),s.asyncDep){if(i&&i.registerDep(s,ne,o),!e.el){let e=s.subTree=mo(Za);b(null,e,t,n)}}else ne(s,e,t,n,i,a,o)},P=(e,t,n)=>{let r=t.component=e.component;if(Wa(e,t,n))if(r.asyncDep&&!r.asyncResolved){re(r,t,n);return}else r.next=t,r.update();else t.el=e.el,r.vnode=t},ne=(e,t,n,r,i,a,o)=>{let s=()=>{if(e.isMounted){let{next:t,bu:n,u:r,parent:c,vnode:l}=e;{let n=Ea(e);if(n){t&&(t.el=l.el,re(e,t,o)),n.asyncDep.then(()=>{e.isUnmounted||s()});return}}let u=t,f;Sa(e,!1),t?(t.el=l.el,re(e,t,o)):t=l,n&&F(n),(f=t.props&&t.props.onVnodeBeforeUpdate)&&To(f,c,t,l),Sa(e,!0);let p=Va(e),m=e.subTree;e.subTree=p,h(m,p,d(m.el),me(m),e,i,a),t.el=p.el,u===null&&Ka(e,p.el),r&&va(r,i),(f=t.props&&t.props.onVnodeUpdated)&&va(()=>To(f,c,t,l),i)}else{let o,{el:s,props:c}=t,{bm:l,m:u,parent:d,root:f,type:p}=e,m=Wr(t);if(Sa(e,!1),l&&F(l),!m&&(o=c&&c.onVnodeBeforeMount)&&To(o,d,t),Sa(e,!0),s&&ve){let t=()=>{e.subTree=Va(e),ve(s,e.subTree,e,i,null)};m&&p.__asyncHydrate?p.__asyncHydrate(s,e,t):t()}else{f.ce&&f.ce._def.shadowRoot!==!1&&f.ce._injectChildStyle(p);let o=e.subTree=Va(e);h(null,o,n,r,e,i,a),t.el=o.el}if(u&&va(u,i),!m&&(o=c&&c.onVnodeMounted)){let e=t;va(()=>To(o,d,e),i)}(t.shapeFlag&256||d&&Wr(d.vnode)&&d.vnode.shapeFlag&256)&&e.a&&va(e.a,i),e.isMounted=!0,t=n=r=null}};e.scope.on();let c=e.effect=new Ue(s);e.scope.off();let l=e.update=c.run.bind(c),u=e.job=c.runIfDirty.bind(c);u.i=e,u.id=e.uid,c.scheduler=()=>Jn(u),Sa(e,!0),l()},re=(e,t,n)=>{t.component=e;let r=e.vnode.props;e.vnode=t,e.next=null,ra(e,t.props,r,n),ga(e,t.children,n),it(),Zn(e),at()},ie=(e,t,n,r,i,a,o,s,c=!1)=>{let l=e&&e.children,d=e?e.shapeFlag:0,f=t.children,{patchFlag:p,shapeFlag:m}=t;if(p>0){if(p&128){se(l,f,n,r,i,a,o,s,c);return}else if(p&256){oe(l,f,n,r,i,a,o,s,c);return}}m&8?(d&16&&pe(l,i,a),f!==l&&u(n,f)):d&16?m&16?se(l,f,n,r,i,a,o,s,c):pe(l,i,a,!0):(d&8&&u(n,``),m&16&&k(f,n,r,i,a,o,s,c))},oe=(e,t,n,r,i,a,o,s,c)=>{e||=_,t||=_;let l=e.length,u=t.length,d=Math.min(l,u),f;for(f=0;fu?pe(e,i,a,!0,!1,d):k(t,n,r,i,a,o,s,c,d)},se=(e,t,n,r,i,a,o,s,c)=>{let l=0,u=t.length,d=e.length-1,f=u-1;for(;l<=d&&l<=f;){let r=e[l],u=t[l]=c?So(t[l]):xo(t[l]);if(lo(r,u))h(r,u,n,null,i,a,o,s,c);else break;l++}for(;l<=d&&l<=f;){let r=e[d],l=t[f]=c?So(t[f]):xo(t[f]);if(lo(r,l))h(r,l,n,null,i,a,o,s,c);else break;d--,f--}if(l>d){if(l<=f){let e=f+1,d=ef)for(;l<=d;)le(e[l],i,a,!0),l++;else{let p=l,m=l,g=new Map;for(l=m;l<=f;l++){let e=t[l]=c?So(t[l]):xo(t[l]);e.key!=null&&g.set(e.key,l)}let v,y=0,b=f-m+1,x=!1,S=0,C=Array(b);for(l=0;l=b){le(r,i,a,!0);continue}let u;if(r.key!=null)u=g.get(r.key);else for(v=m;v<=f;v++)if(C[v-m]===0&&lo(r,t[v])){u=v;break}u===void 0?le(r,i,a,!0):(C[u-m]=l+1,u>=S?S=u:x=!0,h(r,t[u],n,null,i,a,o,s,c),y++)}let w=x?Ta(C):_;for(v=w.length-1,l=b-1;l>=0;l--){let e=m+l,d=t[e],f=e+1{let{el:s,type:c,transition:l,children:u,shapeFlag:d}=e;if(d&6){ce(e.component.subTree,t,n,a);return}if(d&128){e.suspense.move(t,n,a);return}if(d&64){c.move(e,t,n,I);return}if(c===Ya){r(s,t,n);for(let e=0;el.enter(s),o);else{let{leave:a,delayLeave:o,afterLeave:c}=l,u=()=>{e.ctx.isUnmounted?i(s):r(s,t,n)},d=()=>{a(s,()=>{u(),c&&c()})};o?o(s,u,d):d()}else r(s,t,n)},le=(e,t,n,r=!1,i=!1)=>{let{type:a,props:o,ref:s,children:c,dynamicChildren:l,shapeFlag:u,patchFlag:d,dirs:f,cacheIndex:p}=e;if(d===-2&&(i=!1),s!=null&&(it(),Vr(s,null,n,e,!0),at()),p!=null&&(t.renderCache[p]=void 0),u&256){t.ctx.deactivate(e);return}let m=u&1&&f,h=!Wr(e),g;if(h&&(g=o&&o.onVnodeBeforeUnmount)&&To(g,t,e),u&6)fe(e.component,n,r);else{if(u&128){e.suspense.unmount(n,r);return}m&&lr(e,null,t,`beforeUnmount`),u&64?e.type.remove(e,t,n,I,r):l&&!l.hasOnce&&(a!==Ya||d>0&&d&64)?pe(l,t,n,!1,!0):(a===Ya&&d&384||!i&&u&16)&&pe(c,t,n),r&&ue(e)}(h&&(g=o&&o.onVnodeUnmounted)||m)&&va(()=>{g&&To(g,t,e),m&&lr(e,null,t,`unmounted`)},n)},ue=e=>{let{type:t,el:n,anchor:r,transition:a}=e;if(t===Ya){de(n,r);return}if(t===Qa){w(e);return}let o=()=>{i(n),a&&!a.persisted&&a.afterLeave&&a.afterLeave()};if(e.shapeFlag&1&&a&&!a.persisted){let{leave:t,delayLeave:r}=a,i=()=>t(n,o);r?r(e.el,o,i):i()}else o()},de=(e,t)=>{let n;for(;e!==t;)n=f(e),i(e),e=n;i(t)},fe=(e,t,n)=>{let{bum:r,scope:i,job:a,subTree:o,um:s,m:c,a:l,parent:u,slots:{__:d}}=e;Da(c),Da(l),r&&F(r),u&&E(d)&&d.forEach(e=>{u.renderCache[e]=void 0}),i.stop(),a&&(a.flags|=8,le(o,e,t,n)),s&&va(s,t),va(()=>{e.isUnmounted=!0},t),t&&t.pendingBranch&&!t.isUnmounted&&e.asyncDep&&!e.asyncResolved&&e.suspenseId===t.pendingId&&(t.deps--,t.deps===0&&t.resolve())},pe=(e,t,n,r=!1,i=!1,a=0)=>{for(let o=a;o{if(e.shapeFlag&6)return me(e.component.subTree);if(e.shapeFlag&128)return e.suspense.next();let t=f(e.anchor||e.el),n=t&&t[ur];return n?f(n):t},he=!1,ge=(e,t,n)=>{e==null?t._vnode&&le(t._vnode,null,null,!0):h(t._vnode||null,e,t,null,null,null,n),t._vnode=e,he||(he=!0,Zn(),Qn(),he=!1)},I={p:h,um:le,m:ce,r:ue,mt:te,mc:k,pc:ie,pbc:j,n:me,o:e},L,ve;return t&&([L,ve]=t(I)),{render:ge,hydrate:L,createApp:Ji(ge,L)}}function xa({type:e,props:t},n){return n===`svg`&&e===`foreignObject`||n===`mathml`&&e===`annotation-xml`&&t&&t.encoding&&t.encoding.includes(`html`)?void 0:n}function Sa({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function Ca(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function wa(e,t,n=!1){let r=e.children,i=t.children;if(E(r)&&E(i))for(let e=0;e>1,e[n[s]]0&&(t[r]=n[a-1]),n[a]=r)}}for(a=n.length,o=n[a-1];a-- >0;)n[a]=o,o=t[o];return n}function Ea(e){let t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Ea(t)}function Da(e){if(e)for(let t=0;t{{let e=Zi(Oa);return e}};function Aa(e,t){return Na(e,null,t)}function ja(e,t){return Na(e,null,{flush:`post`})}function Ma(e,t){return Na(e,null,{flush:`sync`})}function V(e,t,n){return Na(e,t,n)}function Na(e,t,n=g){let{immediate:r,deep:i,flush:a,once:o}=n,s=S({},n),c=t&&r||!t&&a!==`post`,l;if(Io){if(a===`sync`){let e=ka();l=e.__watcherHandles||=[]}else if(!c){let e=()=>{};return e.stop=v,e.resume=v,e.pause=v,e}}let u=ko;s.call=(e,t,n)=>In(e,u,t,n);let d=!1;a===`post`?s.scheduler=e=>{va(e,u&&u.suspense)}:a!==`sync`&&(d=!0,s.scheduler=(e,t)=>{t?e():Jn(e)}),s.augmentJob=e=>{t&&(e.flags|=4),d&&(e.flags|=2,u&&(e.id=u.uid,e.i=u))};let f=Nn(e,t,s);return Io&&(l?l.push(f):c&&f()),f}function Pa(e,t,n){let r=this.proxy,i=j(e)?e.includes(`.`)?Fa(r,e):()=>r[e]:e.bind(r,r),a;A(t)?a=t:(a=t.handler,n=t);let o=No(this),s=Na(i,a.bind(r),n);return o(),s}function Fa(e,t){let n=t.split(`.`);return()=>{let t=e;for(let e=0;e{let c,l=g,u;return Ma(()=>{let t=e[i];pe(c,t)&&(c=t,s())}),{get(){return o(),n.get?n.get(c):c},set(e){let o=n.set?n.set(e):e;if(!pe(o,c)&&!(l!==g&&pe(e,l)))return;let d=r.vnode.props;d&&(t in d||i in d||a in d)&&(`onUpdate:${t}`in d||`onUpdate:${i}`in d||`onUpdate:${a}`in d)||(c=e,s()),r.emit(`update:${t}`,o),pe(e,o)&&pe(e,l)&&!pe(o,u)&&s(),l=e,u=o}}});return s[Symbol.iterator]=()=>{let e=0;return{next(){return e<2?{value:e++?o||g:s,done:!1}:{done:!0}}}},s}const La=(e,t)=>t===`modelValue`||t===`model-value`?e.modelModifiers:e[`${t}Modifiers`]||e[`${ce(t)}Modifiers`]||e[`${ue(t)}Modifiers`];function Ra(e,t,...n){if(e.isUnmounted)return;let r=e.vnode.props||g,i=n,a=t.startsWith(`update:`),o=a&&La(r,t.slice(7));o&&(o.trim&&(i=n.map(e=>j(e)?e.trim():e)),o.number&&(i=n.map(he)));let s,c=r[s=fe(t)]||r[s=fe(ce(t))];!c&&a&&(c=r[s=fe(ue(t))]),c&&In(c,e,6,i);let l=r[s+`Once`];if(l){if(!e.emitted)e.emitted={};else if(e.emitted[s])return;e.emitted[s]=!0,In(l,e,6,i)}}function za(e,t,n=!1){let r=t.emitsCache,i=r.get(e);if(i!==void 0)return i;let a=e.emits,o={},s=!1;if(!A(e)){let r=e=>{let n=za(e,t,!0);n&&(s=!0,S(o,n))};!n&&t.mixins.length&&t.mixins.forEach(r),e.extends&&r(e.extends),e.mixins&&e.mixins.forEach(r)}return!a&&!s?(N(e)&&r.set(e,null),null):(E(a)?a.forEach(e=>o[e]=null):S(o,a),N(e)&&r.set(e,o),o)}function Ba(e,t){return!e||!b(t)?!1:(t=t.slice(2).replace(/Once$/,``),T(e,t[0].toLowerCase()+t.slice(1))||T(e,ue(t))||T(e,t))}function Va(e){let{type:t,vnode:n,proxy:r,withProxy:i,propsOptions:[a],slots:o,attrs:s,emit:c,render:l,renderCache:u,props:d,data:f,setupState:p,ctx:m,inheritAttrs:h}=e,g=rr(e),_,v;try{if(n.shapeFlag&4){let e=i||r,t=e;_=xo(l.call(t,e,u,d,p,f,m)),v=s}else{let e=t;_=xo(e.length>1?e(d,{attrs:s,slots:o,emit:c}):e(d,null)),v=t.props?s:Ha(s)}}catch(t){$a.length=0,Ln(t,e,1),_=mo(Za)}let y=_,b;if(v&&h!==!1){let e=Object.keys(v),{shapeFlag:t}=y;e.length&&t&7&&(a&&e.some(x)&&(v=Ua(v,a)),y=_o(y,v,!1,!0))}return n.dirs&&(y=_o(y,null,!1,!0),y.dirs=y.dirs?y.dirs.concat(n.dirs):n.dirs),n.transition&&Ir(y,n.transition),_=y,rr(g),_}const Ha=e=>{let t;for(let n in e)(n===`class`||n===`style`||b(n))&&((t||={})[n]=e[n]);return t},Ua=(e,t)=>{let n={};for(let r in e)(!x(r)||!(r.slice(9)in t))&&(n[r]=e[r]);return n};function Wa(e,t,n){let{props:r,children:i,component:a}=e,{props:o,children:s,patchFlag:c}=t,l=a.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&c>=0){if(c&1024)return!0;if(c&16)return r?Ga(r,o,l):!!o;if(c&8){let e=t.dynamicProps;for(let t=0;te.__isSuspense;function Ja(e,t){t&&t.pendingBranch?E(e)?t.effects.push(...e):t.effects.push(e):Xn(e)}const Ya=Symbol.for(`v-fgt`),Xa=Symbol.for(`v-txt`),Za=Symbol.for(`v-cmt`),Qa=Symbol.for(`v-stc`),$a=[];let eo=null;function to(e=!1){$a.push(eo=e?null:[])}function no(){$a.pop(),eo=$a[$a.length-1]||null}let ro=1;function io(e,t=!1){ro+=e,e<0&&eo&&t&&(eo.hasOnce=!0)}function ao(e){return e.dynamicChildren=ro>0?eo||_:null,no(),ro>0&&eo&&eo.push(e),e}function oo(e,t,n,r,i,a){return ao(po(e,t,n,r,i,a,!0))}function so(e,t,n,r,i){return ao(mo(e,t,n,r,i,!0))}function co(e){return e?e.__v_isVNode===!0:!1}function lo(e,t){return e.type===t.type&&e.key===t.key}const uo=({key:e})=>e??null,fo=({ref:e,ref_key:t,ref_for:n})=>(typeof e==`number`&&(e=``+e),e==null?null:j(e)||pn(e)||A(e)?{i:tr,r:e,k:t,f:!!n}:e);function po(e,t=null,n=null,r=0,i=null,a=e===Ya?0:1,o=!1,s=!1){let c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&uo(t),ref:t&&fo(t),scopeId:nr,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:a,patchFlag:r,dynamicProps:i,dynamicChildren:null,appContext:null,ctx:tr};return s?(Co(c,n),a&128&&e.normalize(c)):n&&(c.shapeFlag|=j(n)?8:16),ro>0&&!o&&eo&&(c.patchFlag>0||a&6)&&c.patchFlag!==32&&eo.push(c),c}const mo=ho;function ho(e,t=null,n=null,r=0,i=null,a=!1){if((!e||e===di)&&(e=Za),co(e)){let r=_o(e,t,!0);return n&&Co(r,n),ro>0&&!a&&eo&&(r.shapeFlag&6?eo[eo.indexOf(e)]=r:eo.push(r)),r.patchFlag=-2,r}if(qo(e)&&(e=e.__vccOpts),t){t=go(t);let{class:e,style:n}=t;e&&!j(e)&&(t.class=Se(e)),N(n)&&(cn(n)&&!E(n)&&(n=S({},n)),t.style=L(n))}let o=j(e)?1:qa(e)?128:dr(e)?64:N(e)?4:A(e)?2:0;return po(e,t,n,r,i,o,a,!0)}function go(e){return e?cn(e)||ta(e)?S({},e):e:null}function _o(e,t,n=!1,r=!1){let{props:i,ref:a,patchFlag:o,children:s,transition:c}=e,l=t?wo(i||{},t):i,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:l,key:l&&uo(l),ref:t&&t.ref?n&&a?E(a)?a.concat(fo(t)):[a,fo(t)]:fo(t):a,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:s,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==Ya?o===-1?16:o|16:o,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:c,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&_o(e.ssContent),ssFallback:e.ssFallback&&_o(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return c&&r&&Ir(u,c.clone(u)),u}function vo(e=` `,t=0){return mo(Xa,null,e,t)}function yo(e,t){let n=mo(Qa,null,e);return n.staticCount=t,n}function bo(e=``,t=!1){return t?(to(),so(Za,null,e)):mo(Za,null,e)}function xo(e){return e==null||typeof e==`boolean`?mo(Za):E(e)?mo(Ya,null,e.slice()):co(e)?So(e):mo(Xa,null,String(e))}function So(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:_o(e)}function Co(e,t){let n=0,{shapeFlag:r}=e;if(t==null)t=null;else if(E(t))n=16;else if(typeof t==`object`)if(r&65){let n=t.default;n&&(n._c&&(n._d=!1),Co(e,n()),n._c&&(n._d=!0));return}else{n=32;let r=t._;!r&&!ta(t)?t._ctx=tr:r===3&&tr&&(tr.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else A(t)?(t={default:t,_ctx:tr},n=32):(t=String(t),r&64?(n=16,t=[vo(t)]):n=8);e.children=t,e.shapeFlag|=n}function wo(...e){let t={};for(let n=0;nko||tr;let jo,Mo;{let e=_e(),t=(t,n)=>{let r;return(r=e[t])||(r=e[t]=[]),r.push(n),e=>{r.length>1?r.forEach(t=>t(e)):r[0](e)}};jo=t(`__VUE_INSTANCE_SETTERS__`,e=>ko=e),Mo=t(`__VUE_SSR_SETTERS__`,e=>Io=e)}const No=e=>{let t=ko;return jo(e),e.scope.on(),()=>{e.scope.off(),jo(t)}},Po=()=>{ko&&ko.scope.off(),jo(null)};function Fo(e){return e.vnode.shapeFlag&4}let Io=!1;function Lo(e,t=!1,n=!1){t&&Mo(t);let{props:r,children:i}=e.vnode,a=Fo(e);na(e,r,a,t),ha(e,i,n||t);let o=a?Ro(e,t):void 0;return t&&Mo(!1),o}function Ro(e,t){var n;let r=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Ci);let{setup:i}=r;if(i){it();let n=e.setupContext=i.length>1?Wo(e):null,r=No(e),a=Fn(i,e,0,[e.props,n]),o=ee(a);if(at(),r(),(o||e.sp)&&!Wr(e)&&Br(e),o){if(a.then(Po,Po),t)return a.then(n=>{zo(e,n,t)}).catch(t=>{Ln(t,e,0)});e.asyncDep=a}else zo(e,a,t)}else Ho(e,t)}function zo(e,t,n){A(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:N(t)&&(e.setupState=yn(t)),Ho(e,n)}let Bo,Vo;function Ho(e,t,n){let r=e.type;if(!e.render){if(!t&&Bo&&!r.render){let t=r.template||Ii(e).template;if(t){let{isCustomElement:n,compilerOptions:i}=e.appContext.config,{delimiters:a,compilerOptions:o}=r,s=S(S({isCustomElement:n,delimiters:a},i),o);r.render=Bo(t,s)}}e.render=r.render||v,Vo&&Vo(e)}{let t=No(e);it();try{Mi(e)}finally{at(),t()}}}const Uo={get(e,t){return ht(e,`get`,``),e[t]}};function Wo(e){let t=t=>{e.exposed=t||{}};return{attrs:new Proxy(e.attrs,Uo),slots:e.slots,emit:e.emit,expose:t}}function Go(e){return e.exposed?e.exposeProxy||=new Proxy(yn(un(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in xi)return xi[n](e)},has(e,t){return t in e||t in xi}}):e.proxy}function Ko(e,t=!0){return A(e)?e.displayName||e.name:e.name||t&&e.__name}function qo(e){return A(e)&&`__vccOpts`in e}const H=(e,t)=>{let n=On(e,t,Io);return n};function Jo(e,t,n){let r=arguments.length;return r===2?N(t)&&!E(t)?co(t)?mo(e,null,[t]):mo(e,t):mo(e,null,t):(r>3?n=Array.prototype.slice.call(arguments,2):r===3&&co(n)&&(n=[n]),mo(e,t,n))}const Yo=`3.5.17`;let Xo;const Zo=typeof window<`u`&&window.trustedTypes;if(Zo)try{Xo=Zo.createPolicy(`vue`,{createHTML:e=>e})}catch{}const Qo=Xo?e=>Xo.createHTML(e):e=>e,$o=`http://www.w3.org/2000/svg`,es=`http://www.w3.org/1998/Math/MathML`,ts=typeof document<`u`?document:null,ns=ts&&ts.createElement(`template`),rs={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{let t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,r)=>{let i=t===`svg`?ts.createElementNS($o,e):t===`mathml`?ts.createElementNS(es,e):n?ts.createElement(e,{is:n}):ts.createElement(e);return e===`select`&&r&&r.multiple!=null&&i.setAttribute(`multiple`,r.multiple),i},createText:e=>ts.createTextNode(e),createComment:e=>ts.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>ts.querySelector(e),setScopeId(e,t){e.setAttribute(t,``)},insertStaticContent(e,t,n,r,i,a){let o=n?n.previousSibling:t.lastChild;if(i&&(i===a||i.nextSibling))for(;t.insertBefore(i.cloneNode(!0),n),!(i===a||!(i=i.nextSibling)););else{ns.innerHTML=Qo(r===`svg`?`${e}`:r===`mathml`?`${e}`:e);let i=ns.content;if(r===`svg`||r===`mathml`){let e=i.firstChild;for(;e.firstChild;)i.appendChild(e.firstChild);i.removeChild(e)}t.insertBefore(i,n)}return[o?o.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},os=`transition`,ss=`animation`,cs=Symbol(`_vtc`),ls={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},us=S({},Dr,ls),ds=e=>(e.displayName=`Transition`,e.props=us,e),fs=ds((e,{slots:t})=>Jo(jr,hs(e),t)),ps=(e,t=[])=>{E(e)?e.forEach(e=>e(...t)):e&&e(...t)},ms=e=>e?E(e)?e.some(e=>e.length>1):e.length>1:!1;function hs(e){let t={};for(let n in e)n in ls||(t[n]=e[n]);if(e.css===!1)return t;let{name:n=`v`,type:r,duration:i,enterFromClass:a=`${n}-enter-from`,enterActiveClass:o=`${n}-enter-active`,enterToClass:s=`${n}-enter-to`,appearFromClass:c=a,appearActiveClass:l=o,appearToClass:u=s,leaveFromClass:d=`${n}-leave-from`,leaveActiveClass:f=`${n}-leave-active`,leaveToClass:p=`${n}-leave-to`}=e,m=gs(i),h=m&&m[0],g=m&&m[1],{onBeforeEnter:_,onEnter:v,onEnterCancelled:y,onLeave:b,onLeaveCancelled:x,onBeforeAppear:C=_,onAppear:w=v,onAppearCancelled:T=y}=t,E=(e,t,n,r)=>{e._enterCancelled=r,ys(e,t?u:s),ys(e,t?l:o),n&&n()},D=(e,t)=>{e._isLeaving=!1,ys(e,d),ys(e,p),ys(e,f),t&&t()},O=e=>(t,n)=>{let i=e?w:v,o=()=>E(t,e,n);ps(i,[t,o]),bs(()=>{ys(t,e?c:a),vs(t,e?u:s),ms(i)||Ss(t,r,h,o)})};return S(t,{onBeforeEnter(e){ps(_,[e]),vs(e,a),vs(e,o)},onBeforeAppear(e){ps(C,[e]),vs(e,c),vs(e,l)},onEnter:O(!1),onAppear:O(!0),onLeave(e,t){e._isLeaving=!0;let n=()=>D(e,t);vs(e,d),e._enterCancelled?(vs(e,f),Es()):(Es(),vs(e,f)),bs(()=>{e._isLeaving&&(ys(e,d),vs(e,p),ms(b)||Ss(e,r,g,n))}),ps(b,[e,n])},onEnterCancelled(e){E(e,!1,void 0,!0),ps(y,[e])},onAppearCancelled(e){E(e,!0,void 0,!0),ps(T,[e])},onLeaveCancelled(e){D(e),ps(x,[e])}})}function gs(e){if(e==null)return null;if(N(e))return[_s(e.enter),_s(e.leave)];{let t=_s(e);return[t,t]}}function _s(e){let t=ge(e);return t}function vs(e,t){t.split(/\s+/).forEach(t=>t&&e.classList.add(t)),(e[cs]||(e[cs]=new Set)).add(t)}function ys(e,t){t.split(/\s+/).forEach(t=>t&&e.classList.remove(t));let n=e[cs];n&&(n.delete(t),n.size||(e[cs]=void 0))}function bs(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let xs=0;function Ss(e,t,n,r){let i=e._endId=++xs,a=()=>{i===e._endId&&r()};if(n!=null)return setTimeout(a,n);let{type:o,timeout:s,propCount:c}=Cs(e,t);if(!o)return r();let l=o+`end`,u=0,d=()=>{e.removeEventListener(l,f),a()},f=t=>{t.target===e&&++u>=c&&d()};setTimeout(()=>{u(n[e]||``).split(`, `),i=r(`${os}Delay`),a=r(`${os}Duration`),o=ws(i,a),s=r(`${ss}Delay`),c=r(`${ss}Duration`),l=ws(s,c),u=null,d=0,f=0;t===os?o>0&&(u=os,d=o,f=a.length):t===ss?l>0&&(u=ss,d=l,f=c.length):(d=Math.max(o,l),u=d>0?o>l?os:ss:null,f=u?u===os?a.length:c.length:0);let p=u===os&&/\b(transform|all)(,|$)/.test(r(`${os}Property`).toString());return{type:u,timeout:d,propCount:f,hasTransform:p}}function ws(e,t){for(;e.lengthTs(t)+Ts(e[n])))}function Ts(e){return e===`auto`?0:Number(e.slice(0,-1).replace(`,`,`.`))*1e3}function Es(){return document.body.offsetHeight}function Ds(e,t,n){let r=e[cs];r&&(t=(t?[t,...r]:[...r]).join(` `)),t==null?e.removeAttribute(`class`):n?e.setAttribute(`class`,t):e.className=t}const Os=Symbol(`_vod`),ks=Symbol(`_vsh`),As={beforeMount(e,{value:t},{transition:n}){e[Os]=e.style.display===`none`?``:e.style.display,n&&t?n.beforeEnter(e):js(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:r}){!t!=!n&&(r?t?(r.beforeEnter(e),js(e,!0),r.enter(e)):r.leave(e,()=>{js(e,!1)}):js(e,t))},beforeUnmount(e,{value:t}){js(e,t)}};function js(e,t){e.style.display=t?e[Os]:`none`,e[ks]=!t}const Ms=Symbol(``),Ns=/(^|;)\s*display\s*:/;function Ps(e,t,n){let r=e.style,i=j(n),a=!1;if(n&&!i){if(t)if(j(t))for(let e of t.split(`;`)){let t=e.slice(0,e.indexOf(`:`)).trim();n[t]??Is(r,t,``)}else for(let e in t)n[e]??Is(r,e,``);for(let e in n)e===`display`&&(a=!0),Is(r,e,n[e])}else if(i){if(t!==n){let e=r[Ms];e&&(n+=`;`+e),r.cssText=n,a=Ns.test(n)}}else t&&e.removeAttribute(`style`);Os in e&&(e[Os]=a?r.display:``,e[ks]&&(r.display=`none`))}const Fs=/\s*!important$/;function Is(e,t,n){if(E(n))n.forEach(n=>Is(e,t,n));else if(n??=``,t.startsWith(`--`))e.setProperty(t,n);else{let r=zs(e,t);Fs.test(n)?e.setProperty(ue(r),n.replace(Fs,``),`important`):e[r]=n}}const Ls=[`Webkit`,`Moz`,`ms`],Rs={};function zs(e,t){let n=Rs[t];if(n)return n;let r=ce(t);if(r!==`filter`&&r in e)return Rs[t]=r;r=de(r);for(let n=0;nYs||(Xs.then(()=>Ys=0),Ys=Date.now());function Qs(e,t){let n=e=>{if(!e._vts)e._vts=Date.now();else if(e._vts<=n.attached)return;In($s(e,n.value),t,5,[e])};return n.value=e,n.attached=Zs(),n}function $s(e,t){if(E(t)){let n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(e=>t=>!t._stopped&&e&&e(t))}else return t}const ec=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,tc=(e,t,n,r,i,a)=>{let o=i===`svg`;t===`class`?Ds(e,r,o):t===`style`?Ps(e,n,r):b(t)?x(t)||Ks(e,t,n,r,a):(t[0]===`.`?(t=t.slice(1),!0):t[0]===`^`?(t=t.slice(1),!1):nc(e,t,r,o))?(Hs(e,t,r),!e.tagName.includes(`-`)&&(t===`value`||t===`checked`||t===`selected`)&&Vs(e,t,r,o,a,t!==`value`)):e._isVueCE&&(/[A-Z]/.test(t)||!j(r))?Hs(e,ce(t),r,a,t):(t===`true-value`?e._trueValue=r:t===`false-value`&&(e._falseValue=r),Vs(e,t,r,o))};function nc(e,t,n,r){if(r)return!!(t===`innerHTML`||t===`textContent`||t in e&&ec(t)&&A(n));if(t===`spellcheck`||t===`draggable`||t===`translate`||t===`autocorrect`||t===`form`||t===`list`&&e.tagName===`INPUT`||t===`type`&&e.tagName===`TEXTAREA`)return!1;if(t===`width`||t===`height`){let t=e.tagName;if(t===`IMG`||t===`VIDEO`||t===`CANVAS`||t===`SOURCE`)return!1}return ec(t)&&j(n)?!1:t in e}const rc=Symbol(`_moveCb`),ic=Symbol(`_enterCb`),ac=e=>{let t=e.props[`onUpdate:modelValue`]||!1;return E(t)?e=>F(t,e):t};function oc(e){e.target.composing=!0}function sc(e){let t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event(`input`)))}const cc=Symbol(`_assign`),lc={created(e,{modifiers:{lazy:t,trim:n,number:r}},i){e[cc]=ac(i);let a=r||i.props&&i.props.type===`number`;Us(e,t?`change`:`input`,t=>{if(t.target.composing)return;let r=e.value;n&&(r=r.trim()),a&&(r=he(r)),e[cc](r)}),n&&Us(e,`change`,()=>{e.value=e.value.trim()}),t||(Us(e,`compositionstart`,oc),Us(e,`compositionend`,sc),Us(e,`change`,sc))},mounted(e,{value:t}){e.value=t??``},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:r,trim:i,number:a}},o){if(e[cc]=ac(o),e.composing)return;let s=(a||e.type===`number`)&&!/^0\d/.test(e.value)?he(e.value):e.value,c=t??``;s!==c&&(document.activeElement===e&&e.type!==`range`&&(r&&t===n||i&&e.value.trim()===c)||(e.value=c))}},uc={deep:!0,created(e,t,n){e[cc]=ac(n),Us(e,`change`,()=>{let t=e._modelValue,n=hc(e),r=e.checked,i=e[cc];if(E(t)){let e=Ae(t,n),a=e!==-1;if(r&&!a)i(t.concat(n));else if(!r&&a){let n=[...t];n.splice(e,1),i(n)}}else if(O(t)){let e=new Set(t);r?e.add(n):e.delete(n),i(e)}else i(gc(e,r))})},mounted:dc,beforeUpdate(e,t,n){e[cc]=ac(n),dc(e,t,n)}};function dc(e,{value:t,oldValue:n},r){e._modelValue=t;let i;if(E(t))i=Ae(t,r.props.value)>-1;else if(O(t))i=t.has(r.props.value);else{if(t===n)return;i=ke(t,gc(e,!0))}e.checked!==i&&(e.checked=i)}const fc={created(e,{value:t},n){e.checked=ke(t,n.props.value),e[cc]=ac(n),Us(e,`change`,()=>{e[cc](hc(e))})},beforeUpdate(e,{value:t,oldValue:n},r){e[cc]=ac(r),t!==n&&(e.checked=ke(t,r.props.value))}},pc={deep:!0,created(e,{value:t,modifiers:{number:n}},r){let i=O(t);Us(e,`change`,()=>{let t=Array.prototype.filter.call(e.options,e=>e.selected).map(e=>n?he(hc(e)):hc(e));e[cc](e.multiple?i?new Set(t):t:t[0]),e._assigning=!0,Kn(()=>{e._assigning=!1})}),e[cc]=ac(r)},mounted(e,{value:t}){mc(e,t)},beforeUpdate(e,t,n){e[cc]=ac(n)},updated(e,{value:t}){e._assigning||mc(e,t)}};function mc(e,t){let n=e.multiple,r=E(t);if(!(n&&!r&&!O(t))){for(let i=0,a=e.options.length;iString(e)===String(o)):a.selected=Ae(t,o)>-1}else a.selected=t.has(o);else if(ke(hc(a),t)){e.selectedIndex!==i&&(e.selectedIndex=i);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function hc(e){return`_value`in e?e._value:e.value}function gc(e,t){let n=t?`_trueValue`:`_falseValue`;return n in e?e[n]:t}const _c={created(e,t,n){yc(e,t,n,null,`created`)},mounted(e,t,n){yc(e,t,n,null,`mounted`)},beforeUpdate(e,t,n,r){yc(e,t,n,r,`beforeUpdate`)},updated(e,t,n,r){yc(e,t,n,r,`updated`)}};function vc(e,t){switch(e){case`SELECT`:return pc;case`TEXTAREA`:return lc;default:switch(t){case`checkbox`:return uc;case`radio`:return fc;default:return lc}}}function yc(e,t,n,r,i){let a=vc(e.tagName,n.props&&n.props.type),o=a[i];o&&o(e,t,n,r)}const bc=[`ctrl`,`shift`,`alt`,`meta`],xc={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>`button`in e&&e.button!==0,middle:e=>`button`in e&&e.button!==1,right:e=>`button`in e&&e.button!==2,exact:(e,t)=>bc.some(n=>e[`${n}Key`]&&!t.includes(n))},Sc=(e,t)=>{let n=e._withMods||={},r=t.join(`.`);return n[r]||(n[r]=(n,...r)=>{for(let e=0;e{let n=e._withKeys||={},r=t.join(`.`);return n[r]||(n[r]=n=>{if(!(`key`in n))return;let r=ue(n.key);if(t.some(e=>e===r||Cc[e]===r))return e(n)})},Tc=S({patchProp:tc},rs);let Ec;function Dc(){return Ec||=ya(Tc)}const Oc=(...e)=>{Dc().render(...e)},kc=(...e)=>{let t=Dc().createApp(...e),{mount:n}=t;return t.mount=e=>{let r=jc(e);if(!r)return;let i=t._component;!A(i)&&!i.render&&!i.template&&(i.template=r.innerHTML),r.nodeType===1&&(r.textContent=``);let a=n(r,!1,Ac(r));return r instanceof Element&&(r.removeAttribute(`v-cloak`),r.setAttribute(`data-v-app`,``)),a},t};function Ac(e){if(e instanceof SVGElement)return`svg`;if(typeof MathMLElement==`function`&&e instanceof MathMLElement)return`mathml`}function jc(e){if(j(e)){let t=document.querySelector(e);return t}return e}const Mc=new Set,Nc=new WeakMap,Pc=new WeakMap,Fc=new WeakMap,Ic=new WeakMap,Lc=new WeakMap,Rc=new WeakMap,zc=new WeakMap,Bc=new WeakSet;let Vc,Hc=0,Uc=0;const Wc=`__aa_tgt`,Gc=`__aa_del`,Kc=`__aa_new`,qc=e=>{let t=rl(e);t&&t.forEach(e=>al(e))},Jc=e=>{e.forEach(e=>{e.target===Vc&&Zc(),Nc.has(e.target)&&Xc(e.target)})};function Yc(e){let t=Ic.get(e);t?.disconnect();let n=Nc.get(e),r=0,i=5;n||(n=cl(e),Nc.set(e,n));let{offsetWidth:a,offsetHeight:o}=Vc,s=[n.top-i,a-(n.left+i+n.width),o-(n.top+i+n.height),n.left-i],c=s.map(e=>`${-1*Math.floor(e)}px`).join(` `),l=new IntersectionObserver(()=>{++r>1&&Xc(e)},{root:Vc,threshold:1,rootMargin:c});l.observe(e),Ic.set(e,l)}function Xc(e){clearTimeout(zc.get(e));let t=ul(e),n=hl(t)?500:t.duration;zc.set(e,setTimeout(async()=>{let t=Fc.get(e);try{await t?.finished,Nc.set(e,cl(e)),Yc(e)}catch{}},n))}function Zc(){clearTimeout(zc.get(Vc)),zc.set(Vc,setTimeout(()=>{Mc.forEach(e=>pl(e,e=>$c(()=>Xc(e))))},100))}function Qc(e){setTimeout(()=>{Lc.set(e,setInterval(()=>$c(Xc.bind(null,e)),2e3))},Math.round(2e3*Math.random()))}function $c(e){typeof requestIdleCallback==`function`?requestIdleCallback(()=>e()):requestAnimationFrame(()=>e())}let el,tl;const nl=typeof window<`u`&&`ResizeObserver`in window;nl&&(Vc=document.documentElement,el=new MutationObserver(qc),tl=new ResizeObserver(Jc),window.addEventListener(`scroll`,()=>{Uc=window.scrollY,Hc=window.scrollX}),tl.observe(Vc));function rl(e){let t=e.reduce((e,t)=>[...e,...Array.from(t.addedNodes),...Array.from(t.removedNodes)],[]),n=t.every(e=>e.nodeName===`#comment`);return n?!1:e.reduce((e,t)=>{if(e===!1)return!1;if(t.target instanceof Element){if(il(t.target),!e.has(t.target)){e.add(t.target);for(let n=0;nt(e,Rc.has(e)));for(let n=0;ne(r,Rc.has(r)))}}function ml(e){return Array.isArray(e)?e:[e]}function hl(e){return typeof e==`function`}function gl(e){let t=Nc.get(e),n=cl(e);if(!fl(e))return Nc.set(e,n);let r;if(!t)return;let i=ul(e);if(typeof i!=`function`){let a=t.left-n.left,o=t.top-n.top,[s,c,l,u]=ll(e,t,n),d={transform:`translate(${a}px, ${o}px)`},f={transform:`translate(0, 0)`};s!==c&&(d.width=`${s}px`,f.width=`${c}px`),l!==u&&(d.height=`${l}px`,f.height=`${u}px`),r=e.animate([d,f],{duration:i.duration,easing:i.easing})}else{let[a]=ml(i(e,`remain`,t,n));r=new Animation(a),r.play()}Fc.set(e,r),Nc.set(e,n),r.addEventListener(`finish`,Xc.bind(null,e))}function _l(e){Kc in e&&delete e[Kc];let t=cl(e);Nc.set(e,t);let n=ul(e);if(!fl(e))return;let r;if(typeof n!=`function`)r=e.animate([{transform:`scale(.98)`,opacity:0},{transform:`scale(0.98)`,opacity:0,offset:.5},{transform:`scale(1)`,opacity:1}],{duration:n.duration*1.5,easing:`ease-in`});else{let[i]=ml(n(e,`add`,t));r=new Animation(i),r.play()}Fc.set(e,r),r.addEventListener(`finish`,Xc.bind(null,e))}function vl(e,t){var n;e.remove(),Nc.delete(e),Pc.delete(e),Fc.delete(e),(n=Ic.get(e))==null||n.disconnect(),setTimeout(()=>{if(Gc in e&&delete e[Gc],Object.defineProperty(e,Kc,{value:!0,configurable:!0}),t&&e instanceof HTMLElement)for(let n in t)e.style[n]=``},0)}function yl(e){var t;if(!Pc.has(e)||!Nc.has(e))return;let[n,r]=Pc.get(e);Object.defineProperty(e,Gc,{value:!0,configurable:!0});let i=window.scrollX,a=window.scrollY;if(r&&r.parentNode&&r.parentNode instanceof Element?r.parentNode.insertBefore(e,r):n&&n.parentNode?n.parentNode.appendChild(e):(t=dl(e))==null||t.appendChild(e),!fl(e))return vl(e);let[o,s,c,l]=xl(e),u=ul(e),d=Nc.get(e);(i!==Hc||a!==Uc)&&bl(e,i,a,u);let f,p={position:`absolute`,top:`${o}px`,left:`${s}px`,width:`${c}px`,height:`${l}px`,margin:`0`,pointerEvents:`none`,transformOrigin:`center`,zIndex:`100`};if(!hl(u))Object.assign(e.style,p),f=e.animate([{transform:`scale(1)`,opacity:1},{transform:`scale(.98)`,opacity:0}],{duration:u.duration,easing:`ease-out`});else{let[t,n]=ml(u(e,`remove`,d));n?.styleReset!==!1&&(p=n?.styleReset||p,Object.assign(e.style,p)),f=new Animation(t),f.play()}Fc.set(e,f),f.addEventListener(`finish`,vl.bind(null,e,p))}function bl(e,t,n,r){let i=Hc-t,a=Uc-n,o=document.documentElement.style.scrollBehavior,s=getComputedStyle(Vc).scrollBehavior;if(s===`smooth`&&(document.documentElement.style.scrollBehavior=`auto`),window.scrollTo(window.scrollX+i,window.scrollY+a),!e.parentElement)return;let c=e.parentElement,l=c.clientHeight,u=c.clientWidth,d=performance.now();function f(){requestAnimationFrame(()=>{if(!hl(r)){let e=l-c.clientHeight,t=u-c.clientWidth;d+r.duration>performance.now()?(window.scrollTo({left:window.scrollX-t,top:window.scrollY-e}),l=c.clientHeight,u=c.clientWidth,f()):document.documentElement.style.scrollBehavior=o}})}f()}function xl(e){let t=Nc.get(e),[n,,r]=ll(e,t,cl(e)),i=e.parentElement;for(;i&&(getComputedStyle(i).position===`static`||i instanceof HTMLBodyElement);)i=i.parentElement;i||=document.body;let a=getComputedStyle(i),o=Nc.get(i)||cl(i),s=Math.round(t.top-o.top)-ol(a.borderTopWidth),c=Math.round(t.left-o.left)-ol(a.borderLeftWidth);return[s,c,n,r]}function Sl(e,t={}){if(el&&tl){let n=window.matchMedia(`(prefers-reduced-motion: reduce)`),r=n.matches&&!hl(t)&&!t.disrespectUserMotionPreference;r||(Bc.add(e),getComputedStyle(e).position===`static`&&Object.assign(e.style,{position:`relative`}),pl(e,Xc,Qc,e=>tl?.observe(e)),hl(t)?Rc.set(e,t):Rc.set(e,{duration:250,easing:`ease-in-out`,...t}),el.observe(e,{childList:!0}),Mc.add(e))}return Object.freeze({parent:e,enable:()=>{Bc.add(e)},disable:()=>{Bc.delete(e)},isEnabled:()=>Bc.has(e)})}const Cl={mounted:(e,t)=>{Sl(e,t.value||{})},getSSRProps:()=>({})},wl=Cl,Tl={install(e){e.directive(`auto-animate`,wl)}},El=`177`,Dl={LEFT:0,MIDDLE:1,RIGHT:2,ROTATE:0,DOLLY:1,PAN:2},Ol={ROTATE:0,PAN:1,DOLLY_PAN:2,DOLLY_ROTATE:3},kl=0,Al=1,jl=2,Ml=3,Nl=0,Pl=1,Fl=2,Il=3,Ll=0,Rl=1,zl=2,Bl=0,Vl=1,Hl=2,Ul=3,Wl=4,Gl=5,Kl=100,ql=101,Jl=102,Yl=103,Xl=104,Zl=200,Ql=201,$l=202,eu=203,tu=204,nu=205,ru=206,iu=207,au=208,ou=209,su=210,cu=211,lu=212,uu=213,du=214,fu=0,pu=1,mu=2,hu=3,gu=4,_u=5,vu=6,yu=7,bu=0,xu=1,Su=2,Cu=0,wu=1,Tu=2,Eu=3,Du=4,Ou=5,ku=6,Au=7,ju=`attached`,Mu=`detached`,Nu=300,Pu=301,Fu=302,Iu=303,Lu=304,Ru=306,zu=1e3,Bu=1001,Vu=1002,Hu=1003,Uu=1004,Wu=1004,Gu=1005,Ku=1005,qu=1006,Ju=1007,Yu=1007,Xu=1008,Zu=1008,Qu=1009,$u=1010,ed=1011,td=1012,nd=1013,rd=1014,id=1015,ad=1016,od=1017,sd=1018,cd=1020,ld=35902,ud=1021,dd=1022,fd=1023,pd=1026,md=1027,hd=1028,gd=1029,_d=1030,vd=1031,yd=1032,bd=1033,xd=33776,Sd=33777,Cd=33778,wd=33779,Td=35840,Ed=35841,Dd=35842,Od=35843,kd=36196,Ad=37492,jd=37496,Md=37808,Nd=37809,Pd=37810,Fd=37811,Id=37812,Ld=37813,Rd=37814,zd=37815,Bd=37816,Vd=37817,Hd=37818,Ud=37819,Wd=37820,Gd=37821,Kd=36492,qd=36494,Jd=36495,Yd=36283,Xd=36284,Zd=36285,Qd=36286,$d=2200,ef=2201,tf=2202,nf=2300,rf=2301,af=2302,sf=2400,cf=2401,lf=2402,uf=2500,df=2501,ff=0,pf=1,mf=2,hf=3200,gf=3201,_f=3202,vf=3203,yf=0,bf=1,xf=``,Sf=`srgb`,Cf=`srgb-linear`,wf=`linear`,Tf=`srgb`,Ef=0,Df=7680,Of=7681,kf=7682,Af=7683,jf=34055,Mf=34056,Nf=5386,Pf=512,Ff=513,If=514,Lf=515,Rf=516,zf=517,Bf=518,Vf=519,Hf=512,Uf=513,Wf=514,Gf=515,Kf=516,qf=517,Jf=518,Yf=519,Xf=35044,Zf=35048,Qf=35040,$f=35045,ep=35049,tp=35041,np=35046,rp=35050,ip=35042,ap=`100`,op=`300 es`,sp=2e3,cp=2001,lp={COMPUTE:`compute`,RENDER:`render`},up={PERSPECTIVE:`perspective`,LINEAR:`linear`,FLAT:`flat`},dp={NORMAL:`normal`,CENTROID:`centroid`,SAMPLE:`sample`,FLAT_FIRST:`flat first`,FLAT_EITHER:`flat either`};var fp=class{addEventListener(e,t){this._listeners===void 0&&(this._listeners={});let n=this._listeners;n[e]===void 0&&(n[e]=[]),n[e].indexOf(t)===-1&&n[e].push(t)}hasEventListener(e,t){let n=this._listeners;return n===void 0?!1:n[e]!==void 0&&n[e].indexOf(t)!==-1}removeEventListener(e,t){let n=this._listeners;if(n===void 0)return;let r=n[e];if(r!==void 0){let e=r.indexOf(t);e!==-1&&r.splice(e,1)}}dispatchEvent(e){let t=this._listeners;if(t===void 0)return;let n=t[e.type];if(n!==void 0){e.target=this;let t=n.slice(0);for(let n=0,r=t.length;n>8&255]+pp[e>>16&255]+pp[e>>24&255]+`-`+pp[t&255]+pp[t>>8&255]+`-`+pp[t>>16&15|64]+pp[t>>24&255]+`-`+pp[n&63|128]+pp[n>>8&255]+`-`+pp[n>>16&255]+pp[n>>24&255]+pp[r&255]+pp[r>>8&255]+pp[r>>16&255]+pp[r>>24&255];return i.toLowerCase()}function vp(e,t,n){return Math.max(t,Math.min(n,e))}function yp(e,t){return(e%t+t)%t}function bp(e,t,n,r,i){return r+(e-t)*(i-r)/(n-t)}function xp(e,t,n){return e===t?0:(n-e)/(t-e)}function Sp(e,t,n){return(1-n)*e+n*t}function Cp(e,t,n,r){return Sp(e,t,1-Math.exp(-n*r))}function wp(e,t=1){return t-Math.abs(yp(e,t*2)-t)}function Tp(e,t,n){return e<=t?0:e>=n?1:(e=(e-t)/(n-t),e*e*(3-2*e))}function Ep(e,t,n){return e<=t?0:e>=n?1:(e=(e-t)/(n-t),e*e*e*(e*(e*6-15)+10))}function Dp(e,t){return e+Math.floor(Math.random()*(t-e+1))}function Op(e,t){return e+Math.random()*(t-e)}function kp(e){return e*(.5-Math.random())}function Ap(e){e!==void 0&&(mp=e);let t=mp+=1831565813;return t=Math.imul(t^t>>>15,t|1),t^=t+Math.imul(t^t>>>7,t|61),((t^t>>>14)>>>0)/4294967296}function jp(e){return e*hp}function Mp(e){return e*gp}function Np(e){return(e&e-1)==0&&e!==0}function Pp(e){return 2**Math.ceil(Math.log(e)/Math.LN2)}function Fp(e){return 2**Math.floor(Math.log(e)/Math.LN2)}function Ip(e,t,n,r,i){let a=Math.cos,o=Math.sin,s=a(n/2),c=o(n/2),l=a((t+r)/2),u=o((t+r)/2),d=a((t-r)/2),f=o((t-r)/2),p=a((r-t)/2),m=o((r-t)/2);switch(i){case`XYX`:e.set(s*u,c*d,c*f,s*l);break;case`YZY`:e.set(c*f,s*u,c*d,s*l);break;case`ZXZ`:e.set(c*d,c*f,s*u,s*l);break;case`XZX`:e.set(s*u,c*m,c*p,s*l);break;case`YXY`:e.set(c*p,s*u,c*m,s*l);break;case`ZYZ`:e.set(c*m,c*p,s*u,s*l);break;default:console.warn(`THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: `+i)}}function Lp(e,t){switch(t.constructor){case Float32Array:return e;case Uint32Array:return e/4294967295;case Uint16Array:return e/65535;case Uint8Array:return e/255;case Int32Array:return Math.max(e/2147483647,-1);case Int16Array:return Math.max(e/32767,-1);case Int8Array:return Math.max(e/127,-1);default:throw Error(`Invalid component type.`)}}function Rp(e,t){switch(t.constructor){case Float32Array:return e;case Uint32Array:return Math.round(e*4294967295);case Uint16Array:return Math.round(e*65535);case Uint8Array:return Math.round(e*255);case Int32Array:return Math.round(e*2147483647);case Int16Array:return Math.round(e*32767);case Int8Array:return Math.round(e*127);default:throw Error(`Invalid component type.`)}}const zp={DEG2RAD:hp,RAD2DEG:gp,generateUUID:_p,clamp:vp,euclideanModulo:yp,mapLinear:bp,inverseLerp:xp,lerp:Sp,damp:Cp,pingpong:wp,smoothstep:Tp,smootherstep:Ep,randInt:Dp,randFloat:Op,randFloatSpread:kp,seededRandom:Ap,degToRad:jp,radToDeg:Mp,isPowerOfTwo:Np,ceilPowerOfTwo:Pp,floorPowerOfTwo:Fp,setQuaternionFromProperEuler:Ip,normalize:Rp,denormalize:Lp};var U=class e{constructor(t=0,n=0){e.prototype.isVector2=!0,this.x=t,this.y=n}get width(){return this.x}set width(e){this.x=e}get height(){return this.y}set height(e){this.y=e}set(e,t){return this.x=e,this.y=t,this}setScalar(e){return this.x=e,this.y=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;default:throw Error(`index is out of range: `+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;default:throw Error(`index is out of range: `+e)}}clone(){return new this.constructor(this.x,this.y)}copy(e){return this.x=e.x,this.y=e.y,this}add(e){return this.x+=e.x,this.y+=e.y,this}addScalar(e){return this.x+=e,this.y+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this}subScalar(e){return this.x-=e,this.y-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this}multiply(e){return this.x*=e.x,this.y*=e.y,this}multiplyScalar(e){return this.x*=e,this.y*=e,this}divide(e){return this.x/=e.x,this.y/=e.y,this}divideScalar(e){return this.multiplyScalar(1/e)}applyMatrix3(e){let t=this.x,n=this.y,r=e.elements;return this.x=r[0]*t+r[3]*n+r[6],this.y=r[1]*t+r[4]*n+r[7],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this}clamp(e,t){return this.x=vp(this.x,e.x,t.x),this.y=vp(this.y,e.y,t.y),this}clampScalar(e,t){return this.x=vp(this.x,e,t),this.y=vp(this.y,e,t),this}clampLength(e,t){let n=this.length();return this.divideScalar(n||1).multiplyScalar(vp(n,e,t))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(e){return this.x*e.x+this.y*e.y}cross(e){return this.x*e.y-this.y*e.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){let e=Math.atan2(-this.y,-this.x)+Math.PI;return e}angleTo(e){let t=Math.sqrt(this.lengthSq()*e.lengthSq());if(t===0)return Math.PI/2;let n=this.dot(e)/t;return Math.acos(vp(n,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){let t=this.x-e.x,n=this.y-e.y;return t*t+n*n}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this}equals(e){return e.x===this.x&&e.y===this.y}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this}rotateAround(e,t){let n=Math.cos(t),r=Math.sin(t),i=this.x-e.x,a=this.y-e.y;return this.x=i*n-a*r+e.x,this.y=i*r+a*n+e.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}},Bp=class{constructor(e=0,t=0,n=0,r=1){this.isQuaternion=!0,this._x=e,this._y=t,this._z=n,this._w=r}static slerpFlat(e,t,n,r,i,a,o){let s=n[r+0],c=n[r+1],l=n[r+2],u=n[r+3],d=i[a+0],f=i[a+1],p=i[a+2],m=i[a+3];if(o===0){e[t+0]=s,e[t+1]=c,e[t+2]=l,e[t+3]=u;return}if(o===1){e[t+0]=d,e[t+1]=f,e[t+2]=p,e[t+3]=m;return}if(u!==m||s!==d||c!==f||l!==p){let e=1-o,t=s*d+c*f+l*p+u*m,n=t>=0?1:-1,r=1-t*t;if(r>2**-52){let i=Math.sqrt(r),a=Math.atan2(i,t*n);e=Math.sin(e*a)/i,o=Math.sin(o*a)/i}let i=o*n;if(s=s*e+d*i,c=c*e+f*i,l=l*e+p*i,u=u*e+m*i,e===1-o){let e=1/Math.sqrt(s*s+c*c+l*l+u*u);s*=e,c*=e,l*=e,u*=e}}e[t]=s,e[t+1]=c,e[t+2]=l,e[t+3]=u}static multiplyQuaternionsFlat(e,t,n,r,i,a){let o=n[r],s=n[r+1],c=n[r+2],l=n[r+3],u=i[a],d=i[a+1],f=i[a+2],p=i[a+3];return e[t]=o*p+l*u+s*f-c*d,e[t+1]=s*p+l*d+c*u-o*f,e[t+2]=c*p+l*f+o*d-s*u,e[t+3]=l*p-o*u-s*d-c*f,e}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get w(){return this._w}set w(e){this._w=e,this._onChangeCallback()}set(e,t,n,r){return this._x=e,this._y=t,this._z=n,this._w=r,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(e){return this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w,this._onChangeCallback(),this}setFromEuler(e,t=!0){let n=e._x,r=e._y,i=e._z,a=e._order,o=Math.cos,s=Math.sin,c=o(n/2),l=o(r/2),u=o(i/2),d=s(n/2),f=s(r/2),p=s(i/2);switch(a){case`XYZ`:this._x=d*l*u+c*f*p,this._y=c*f*u-d*l*p,this._z=c*l*p+d*f*u,this._w=c*l*u-d*f*p;break;case`YXZ`:this._x=d*l*u+c*f*p,this._y=c*f*u-d*l*p,this._z=c*l*p-d*f*u,this._w=c*l*u+d*f*p;break;case`ZXY`:this._x=d*l*u-c*f*p,this._y=c*f*u+d*l*p,this._z=c*l*p+d*f*u,this._w=c*l*u-d*f*p;break;case`ZYX`:this._x=d*l*u-c*f*p,this._y=c*f*u+d*l*p,this._z=c*l*p-d*f*u,this._w=c*l*u+d*f*p;break;case`YZX`:this._x=d*l*u+c*f*p,this._y=c*f*u+d*l*p,this._z=c*l*p-d*f*u,this._w=c*l*u-d*f*p;break;case`XZY`:this._x=d*l*u-c*f*p,this._y=c*f*u-d*l*p,this._z=c*l*p+d*f*u,this._w=c*l*u+d*f*p;break;default:console.warn(`THREE.Quaternion: .setFromEuler() encountered an unknown order: `+a)}return t===!0&&this._onChangeCallback(),this}setFromAxisAngle(e,t){let n=t/2,r=Math.sin(n);return this._x=e.x*r,this._y=e.y*r,this._z=e.z*r,this._w=Math.cos(n),this._onChangeCallback(),this}setFromRotationMatrix(e){let t=e.elements,n=t[0],r=t[4],i=t[8],a=t[1],o=t[5],s=t[9],c=t[2],l=t[6],u=t[10],d=n+o+u;if(d>0){let e=.5/Math.sqrt(d+1);this._w=.25/e,this._x=(l-s)*e,this._y=(i-c)*e,this._z=(a-r)*e}else if(n>o&&n>u){let e=2*Math.sqrt(1+n-o-u);this._w=(l-s)/e,this._x=.25*e,this._y=(r+a)/e,this._z=(i+c)/e}else if(o>u){let e=2*Math.sqrt(1+o-n-u);this._w=(i-c)/e,this._x=(r+a)/e,this._y=.25*e,this._z=(s+l)/e}else{let e=2*Math.sqrt(1+u-n-o);this._w=(a-r)/e,this._x=(i+c)/e,this._y=(s+l)/e,this._z=.25*e}return this._onChangeCallback(),this}setFromUnitVectors(e,t){let n=e.dot(t)+1;return n<2**-52?(n=0,Math.abs(e.x)>Math.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0,this._w=n):(this._x=0,this._y=-e.z,this._z=e.y,this._w=n)):(this._x=e.y*t.z-e.z*t.y,this._y=e.z*t.x-e.x*t.z,this._z=e.x*t.y-e.y*t.x,this._w=n),this.normalize()}angleTo(e){return 2*Math.acos(Math.abs(vp(this.dot(e),-1,1)))}rotateTowards(e,t){let n=this.angleTo(e);if(n===0)return this;let r=Math.min(1,t/n);return this.slerp(e,r),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(e){return this._x*e._x+this._y*e._y+this._z*e._z+this._w*e._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let e=this.length();return e===0?(this._x=0,this._y=0,this._z=0,this._w=1):(e=1/e,this._x*=e,this._y*=e,this._z*=e,this._w*=e),this._onChangeCallback(),this}multiply(e){return this.multiplyQuaternions(this,e)}premultiply(e){return this.multiplyQuaternions(e,this)}multiplyQuaternions(e,t){let n=e._x,r=e._y,i=e._z,a=e._w,o=t._x,s=t._y,c=t._z,l=t._w;return this._x=n*l+a*o+r*c-i*s,this._y=r*l+a*s+i*o-n*c,this._z=i*l+a*c+n*s-r*o,this._w=a*l-n*o-r*s-i*c,this._onChangeCallback(),this}slerp(e,t){if(t===0)return this;if(t===1)return this.copy(e);let n=this._x,r=this._y,i=this._z,a=this._w,o=a*e._w+n*e._x+r*e._y+i*e._z;if(o<0?(this._w=-e._w,this._x=-e._x,this._y=-e._y,this._z=-e._z,o=-o):this.copy(e),o>=1)return this._w=a,this._x=n,this._y=r,this._z=i,this;let s=1-o*o;if(s<=2**-52){let e=1-t;return this._w=e*a+t*this._w,this._x=e*n+t*this._x,this._y=e*r+t*this._y,this._z=e*i+t*this._z,this.normalize(),this}let c=Math.sqrt(s),l=Math.atan2(c,o),u=Math.sin((1-t)*l)/c,d=Math.sin(t*l)/c;return this._w=a*u+this._w*d,this._x=n*u+this._x*d,this._y=r*u+this._y*d,this._z=i*u+this._z*d,this._onChangeCallback(),this}slerpQuaternions(e,t,n){return this.copy(e).slerp(t,n)}random(){let e=2*Math.PI*Math.random(),t=2*Math.PI*Math.random(),n=Math.random(),r=Math.sqrt(1-n),i=Math.sqrt(n);return this.set(r*Math.sin(e),r*Math.cos(e),i*Math.sin(t),i*Math.cos(t))}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._w===this._w}fromArray(e,t=0){return this._x=e[t],this._y=e[t+1],this._z=e[t+2],this._w=e[t+3],this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._w,e}fromBufferAttribute(e,t){return this._x=e.getX(t),this._y=e.getY(t),this._z=e.getZ(t),this._w=e.getW(t),this._onChangeCallback(),this}toJSON(){return this.toArray()}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}},W=class e{constructor(t=0,n=0,r=0){e.prototype.isVector3=!0,this.x=t,this.y=n,this.z=r}set(e,t,n){return n===void 0&&(n=this.z),this.x=e,this.y=t,this.z=n,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;default:throw Error(`index is out of range: `+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw Error(`index is out of range: `+e)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this}multiplyVectors(e,t){return this.x=e.x*t.x,this.y=e.y*t.y,this.z=e.z*t.z,this}applyEuler(e){return this.applyQuaternion(Hp.setFromEuler(e))}applyAxisAngle(e,t){return this.applyQuaternion(Hp.setFromAxisAngle(e,t))}applyMatrix3(e){let t=this.x,n=this.y,r=this.z,i=e.elements;return this.x=i[0]*t+i[3]*n+i[6]*r,this.y=i[1]*t+i[4]*n+i[7]*r,this.z=i[2]*t+i[5]*n+i[8]*r,this}applyNormalMatrix(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){let t=this.x,n=this.y,r=this.z,i=e.elements,a=1/(i[3]*t+i[7]*n+i[11]*r+i[15]);return this.x=(i[0]*t+i[4]*n+i[8]*r+i[12])*a,this.y=(i[1]*t+i[5]*n+i[9]*r+i[13])*a,this.z=(i[2]*t+i[6]*n+i[10]*r+i[14])*a,this}applyQuaternion(e){let t=this.x,n=this.y,r=this.z,i=e.x,a=e.y,o=e.z,s=e.w,c=2*(a*r-o*n),l=2*(o*t-i*r),u=2*(i*n-a*t);return this.x=t+s*c+a*u-o*l,this.y=n+s*l+o*c-i*u,this.z=r+s*u+i*l-a*c,this}project(e){return this.applyMatrix4(e.matrixWorldInverse).applyMatrix4(e.projectionMatrix)}unproject(e){return this.applyMatrix4(e.projectionMatrixInverse).applyMatrix4(e.matrixWorld)}transformDirection(e){let t=this.x,n=this.y,r=this.z,i=e.elements;return this.x=i[0]*t+i[4]*n+i[8]*r,this.y=i[1]*t+i[5]*n+i[9]*r,this.z=i[2]*t+i[6]*n+i[10]*r,this.normalize()}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this}divideScalar(e){return this.multiplyScalar(1/e)}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this}clamp(e,t){return this.x=vp(this.x,e.x,t.x),this.y=vp(this.y,e.y,t.y),this.z=vp(this.z,e.z,t.z),this}clampScalar(e,t){return this.x=vp(this.x,e,t),this.y=vp(this.y,e,t),this.z=vp(this.z,e,t),this}clampLength(e,t){let n=this.length();return this.divideScalar(n||1).multiplyScalar(vp(n,e,t))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this.z=e.z+(t.z-e.z)*n,this}cross(e){return this.crossVectors(this,e)}crossVectors(e,t){let n=e.x,r=e.y,i=e.z,a=t.x,o=t.y,s=t.z;return this.x=r*s-i*o,this.y=i*a-n*s,this.z=n*o-r*a,this}projectOnVector(e){let t=e.lengthSq();if(t===0)return this.set(0,0,0);let n=e.dot(this)/t;return this.copy(e).multiplyScalar(n)}projectOnPlane(e){return Vp.copy(this).projectOnVector(e),this.sub(Vp)}reflect(e){return this.sub(Vp.copy(e).multiplyScalar(2*this.dot(e)))}angleTo(e){let t=Math.sqrt(this.lengthSq()*e.lengthSq());if(t===0)return Math.PI/2;let n=this.dot(e)/t;return Math.acos(vp(n,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){let t=this.x-e.x,n=this.y-e.y,r=this.z-e.z;return t*t+n*n+r*r}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)+Math.abs(this.z-e.z)}setFromSpherical(e){return this.setFromSphericalCoords(e.radius,e.phi,e.theta)}setFromSphericalCoords(e,t,n){let r=Math.sin(t)*e;return this.x=r*Math.sin(n),this.y=Math.cos(t)*e,this.z=r*Math.cos(n),this}setFromCylindrical(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)}setFromCylindricalCoords(e,t,n){return this.x=e*Math.sin(t),this.y=n,this.z=e*Math.cos(t),this}setFromMatrixPosition(e){let t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this}setFromMatrixScale(e){let t=this.setFromMatrixColumn(e,0).length(),n=this.setFromMatrixColumn(e,1).length(),r=this.setFromMatrixColumn(e,2).length();return this.x=t,this.y=n,this.z=r,this}setFromMatrixColumn(e,t){return this.fromArray(e.elements,t*4)}setFromMatrix3Column(e,t){return this.fromArray(e.elements,t*3)}setFromEuler(e){return this.x=e._x,this.y=e._y,this.z=e._z,this}setFromColor(e){return this.x=e.r,this.y=e.g,this.z=e.b,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){let e=Math.random()*Math.PI*2,t=Math.random()*2-1,n=Math.sqrt(1-t*t);return this.x=n*Math.cos(e),this.y=t,this.z=n*Math.sin(e),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}};const Vp=new W,Hp=new Bp;var Up=class e{constructor(t,n,r,i,a,o,s,c,l){e.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1],t!==void 0&&this.set(t,n,r,i,a,o,s,c,l)}set(e,t,n,r,i,a,o,s,c){let l=this.elements;return l[0]=e,l[1]=r,l[2]=o,l[3]=t,l[4]=i,l[5]=s,l[6]=n,l[7]=a,l[8]=c,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(e){let t=this.elements,n=e.elements;return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],this}extractBasis(e,t,n){return e.setFromMatrix3Column(this,0),t.setFromMatrix3Column(this,1),n.setFromMatrix3Column(this,2),this}setFromMatrix4(e){let t=e.elements;return this.set(t[0],t[4],t[8],t[1],t[5],t[9],t[2],t[6],t[10]),this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){let n=e.elements,r=t.elements,i=this.elements,a=n[0],o=n[3],s=n[6],c=n[1],l=n[4],u=n[7],d=n[2],f=n[5],p=n[8],m=r[0],h=r[3],g=r[6],_=r[1],v=r[4],y=r[7],b=r[2],x=r[5],S=r[8];return i[0]=a*m+o*_+s*b,i[3]=a*h+o*v+s*x,i[6]=a*g+o*y+s*S,i[1]=c*m+l*_+u*b,i[4]=c*h+l*v+u*x,i[7]=c*g+l*y+u*S,i[2]=d*m+f*_+p*b,i[5]=d*h+f*v+p*x,i[8]=d*g+f*y+p*S,this}multiplyScalar(e){let t=this.elements;return t[0]*=e,t[3]*=e,t[6]*=e,t[1]*=e,t[4]*=e,t[7]*=e,t[2]*=e,t[5]*=e,t[8]*=e,this}determinant(){let e=this.elements,t=e[0],n=e[1],r=e[2],i=e[3],a=e[4],o=e[5],s=e[6],c=e[7],l=e[8];return t*a*l-t*o*c-n*i*l+n*o*s+r*i*c-r*a*s}invert(){let e=this.elements,t=e[0],n=e[1],r=e[2],i=e[3],a=e[4],o=e[5],s=e[6],c=e[7],l=e[8],u=l*a-o*c,d=o*s-l*i,f=c*i-a*s,p=t*u+n*d+r*f;if(p===0)return this.set(0,0,0,0,0,0,0,0,0);let m=1/p;return e[0]=u*m,e[1]=(r*c-l*n)*m,e[2]=(o*n-r*a)*m,e[3]=d*m,e[4]=(l*t-r*s)*m,e[5]=(r*i-o*t)*m,e[6]=f*m,e[7]=(n*s-c*t)*m,e[8]=(a*t-n*i)*m,this}transpose(){let e,t=this.elements;return e=t[1],t[1]=t[3],t[3]=e,e=t[2],t[2]=t[6],t[6]=e,e=t[5],t[5]=t[7],t[7]=e,this}getNormalMatrix(e){return this.setFromMatrix4(e).invert().transpose()}transposeIntoArray(e){let t=this.elements;return e[0]=t[0],e[1]=t[3],e[2]=t[6],e[3]=t[1],e[4]=t[4],e[5]=t[7],e[6]=t[2],e[7]=t[5],e[8]=t[8],this}setUvTransform(e,t,n,r,i,a,o){let s=Math.cos(i),c=Math.sin(i);return this.set(n*s,n*c,-n*(s*a+c*o)+a+e,-r*c,r*s,-r*(-c*a+s*o)+o+t,0,0,1),this}scale(e,t){return this.premultiply(Wp.makeScale(e,t)),this}rotate(e){return this.premultiply(Wp.makeRotation(-e)),this}translate(e,t){return this.premultiply(Wp.makeTranslation(e,t)),this}makeTranslation(e,t){return e.isVector2?this.set(1,0,e.x,0,1,e.y,0,0,1):this.set(1,0,e,0,1,t,0,0,1),this}makeRotation(e){let t=Math.cos(e),n=Math.sin(e);return this.set(t,-n,0,n,t,0,0,0,1),this}makeScale(e,t){return this.set(e,0,0,0,t,0,0,0,1),this}equals(e){let t=this.elements,n=e.elements;for(let e=0;e<9;e++)if(t[e]!==n[e])return!1;return!0}fromArray(e,t=0){for(let n=0;n<9;n++)this.elements[n]=e[n+t];return this}toArray(e=[],t=0){let n=this.elements;return e[t]=n[0],e[t+1]=n[1],e[t+2]=n[2],e[t+3]=n[3],e[t+4]=n[4],e[t+5]=n[5],e[t+6]=n[6],e[t+7]=n[7],e[t+8]=n[8],e}clone(){return new this.constructor().fromArray(this.elements)}};const Wp=new Up;function Gp(e){for(let t=e.length-1;t>=0;--t)if(e[t]>=65535)return!0;return!1}const Kp={Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array};function qp(e,t){return new Kp[e](t)}function Jp(e){return document.createElementNS(`http://www.w3.org/1999/xhtml`,e)}function Yp(){let e=Jp(`canvas`);return e.style.display=`block`,e}const Xp={};function Zp(e){e in Xp||(Xp[e]=!0,console.warn(e))}function Qp(e,t,n){return new Promise(function(r,i){function a(){switch(e.clientWaitSync(t,e.SYNC_FLUSH_COMMANDS_BIT,0)){case e.WAIT_FAILED:i();break;case e.TIMEOUT_EXPIRED:setTimeout(a,n);break;default:r()}}setTimeout(a,n)})}function $p(e){let t=e.elements;t[2]=.5*t[2]+.5*t[3],t[6]=.5*t[6]+.5*t[7],t[10]=.5*t[10]+.5*t[11],t[14]=.5*t[14]+.5*t[15]}function em(e){let t=e.elements,n=t[11]===-1;n?(t[10]=-t[10]-1,t[14]=-t[14]):(t[10]=-t[10],t[14]=-t[14]+1)}const tm=new Up().set(.4123908,.3575843,.1804808,.212639,.7151687,.0721923,.0193308,.1191948,.9505322),nm=new Up().set(3.2409699,-1.5373832,-.4986108,-.9692436,1.8759675,.0415551,.0556301,-.203977,1.0569715);function rm(){let e={enabled:!0,workingColorSpace:Cf,spaces:{},convert:function(e,t,n){return this.enabled===!1||t===n||!t||!n?e:(this.spaces[t].transfer===Tf&&(e.r=am(e.r),e.g=am(e.g),e.b=am(e.b)),this.spaces[t].primaries!==this.spaces[n].primaries&&(e.applyMatrix3(this.spaces[t].toXYZ),e.applyMatrix3(this.spaces[n].fromXYZ)),this.spaces[n].transfer===Tf&&(e.r=om(e.r),e.g=om(e.g),e.b=om(e.b)),e)},workingToColorSpace:function(e,t){return this.convert(e,this.workingColorSpace,t)},colorSpaceToWorking:function(e,t){return this.convert(e,t,this.workingColorSpace)},getPrimaries:function(e){return this.spaces[e].primaries},getTransfer:function(e){return e===xf?wf:this.spaces[e].transfer},getLuminanceCoefficients:function(e,t=this.workingColorSpace){return e.fromArray(this.spaces[t].luminanceCoefficients)},define:function(e){Object.assign(this.spaces,e)},_getMatrix:function(e,t,n){return e.copy(this.spaces[t].toXYZ).multiply(this.spaces[n].fromXYZ)},_getDrawingBufferColorSpace:function(e){return this.spaces[e].outputColorSpaceConfig.drawingBufferColorSpace},_getUnpackColorSpace:function(e=this.workingColorSpace){return this.spaces[e].workingColorSpaceConfig.unpackColorSpace},fromWorkingColorSpace:function(t,n){return Zp(`THREE.ColorManagement: .fromWorkingColorSpace() has been renamed to .workingToColorSpace().`),e.workingToColorSpace(t,n)},toWorkingColorSpace:function(t,n){return Zp(`THREE.ColorManagement: .toWorkingColorSpace() has been renamed to .colorSpaceToWorking().`),e.colorSpaceToWorking(t,n)}},t=[.64,.33,.3,.6,.15,.06],n=[.2126,.7152,.0722],r=[.3127,.329];return e.define({[Cf]:{primaries:t,whitePoint:r,transfer:wf,toXYZ:tm,fromXYZ:nm,luminanceCoefficients:n,workingColorSpaceConfig:{unpackColorSpace:Sf},outputColorSpaceConfig:{drawingBufferColorSpace:Sf}},[Sf]:{primaries:t,whitePoint:r,transfer:Tf,toXYZ:tm,fromXYZ:nm,luminanceCoefficients:n,outputColorSpaceConfig:{drawingBufferColorSpace:Sf}}}),e}const im=rm();function am(e){return e<.04045?e*.0773993808:(e*.9478672986+.0521327014)**2.4}function om(e){return e<.0031308?e*12.92:1.055*e**.41666-.055}let sm;var cm=class{static getDataURL(e,t=`image/png`){if(/^data:/i.test(e.src)||typeof HTMLCanvasElement>`u`)return e.src;let n;if(e instanceof HTMLCanvasElement)n=e;else{sm===void 0&&(sm=Jp(`canvas`)),sm.width=e.width,sm.height=e.height;let t=sm.getContext(`2d`);e instanceof ImageData?t.putImageData(e,0,0):t.drawImage(e,0,0,e.width,e.height),n=sm}return n.toDataURL(t)}static sRGBToLinear(e){if(typeof HTMLImageElement<`u`&&e instanceof HTMLImageElement||typeof HTMLCanvasElement<`u`&&e instanceof HTMLCanvasElement||typeof ImageBitmap<`u`&&e instanceof ImageBitmap){let t=Jp(`canvas`);t.width=e.width,t.height=e.height;let n=t.getContext(`2d`);n.drawImage(e,0,0,e.width,e.height);let r=n.getImageData(0,0,e.width,e.height),i=r.data;for(let e=0;e1),this.pmremVersion=0}get width(){return this.source.getSize(pm).x}get height(){return this.source.getSize(pm).y}get depth(){return this.source.getSize(pm).z}get image(){return this.source.data}set image(e=null){this.source.data=e}updateMatrix(){this.matrix.setUvTransform(this.offset.x,this.offset.y,this.repeat.x,this.repeat.y,this.rotation,this.center.x,this.center.y)}addUpdateRange(e,t){this.updateRanges.push({start:e,count:t})}clearUpdateRanges(){this.updateRanges.length=0}clone(){return new this.constructor().copy(this)}copy(e){return this.name=e.name,this.source=e.source,this.mipmaps=e.mipmaps.slice(0),this.mapping=e.mapping,this.channel=e.channel,this.wrapS=e.wrapS,this.wrapT=e.wrapT,this.magFilter=e.magFilter,this.minFilter=e.minFilter,this.anisotropy=e.anisotropy,this.format=e.format,this.internalFormat=e.internalFormat,this.type=e.type,this.offset.copy(e.offset),this.repeat.copy(e.repeat),this.center.copy(e.center),this.rotation=e.rotation,this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrix.copy(e.matrix),this.generateMipmaps=e.generateMipmaps,this.premultiplyAlpha=e.premultiplyAlpha,this.flipY=e.flipY,this.unpackAlignment=e.unpackAlignment,this.colorSpace=e.colorSpace,this.renderTarget=e.renderTarget,this.isRenderTargetTexture=e.isRenderTargetTexture,this.isArrayTexture=e.isArrayTexture,this.userData=JSON.parse(JSON.stringify(e.userData)),this.needsUpdate=!0,this}setValues(e){for(let t in e){let n=e[t];if(n===void 0){console.warn(`THREE.Texture.setValues(): parameter '${t}' has value of undefined.`);continue}let r=this[t];if(r===void 0){console.warn(`THREE.Texture.setValues(): property '${t}' does not exist.`);continue}r&&n&&r.isVector2&&n.isVector2||r&&n&&r.isVector3&&n.isVector3||r&&n&&r.isMatrix3&&n.isMatrix3?r.copy(n):this[t]=n}}toJSON(e){let t=e===void 0||typeof e==`string`;if(!t&&e.textures[this.uuid]!==void 0)return e.textures[this.uuid];let n={metadata:{version:4.7,type:`Texture`,generator:`Texture.toJSON`},uuid:this.uuid,name:this.name,image:this.source.toJSON(e).uuid,mapping:this.mapping,channel:this.channel,repeat:[this.repeat.x,this.repeat.y],offset:[this.offset.x,this.offset.y],center:[this.center.x,this.center.y],rotation:this.rotation,wrap:[this.wrapS,this.wrapT],format:this.format,internalFormat:this.internalFormat,type:this.type,colorSpace:this.colorSpace,minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY,generateMipmaps:this.generateMipmaps,premultiplyAlpha:this.premultiplyAlpha,unpackAlignment:this.unpackAlignment};return Object.keys(this.userData).length>0&&(n.userData=this.userData),t||(e.textures[this.uuid]=n),n}dispose(){this.dispatchEvent({type:`dispose`})}transformUv(e){if(this.mapping!==Nu)return e;if(e.applyMatrix3(this.matrix),e.x<0||e.x>1)switch(this.wrapS){case zu:e.x-=Math.floor(e.x);break;case Bu:e.x=e.x<0?0:1;break;case Vu:Math.abs(Math.floor(e.x)%2)===1?e.x=Math.ceil(e.x)-e.x:e.x-=Math.floor(e.x);break}if(e.y<0||e.y>1)switch(this.wrapT){case zu:e.y-=Math.floor(e.y);break;case Bu:e.y=e.y<0?0:1;break;case Vu:Math.abs(Math.floor(e.y)%2)===1?e.y=Math.ceil(e.y)-e.y:e.y-=Math.floor(e.y);break}return this.flipY&&(e.y=1-e.y),e}set needsUpdate(e){e===!0&&(this.version++,this.source.needsUpdate=!0)}set needsPMREMUpdate(e){e===!0&&this.pmremVersion++}};mm.DEFAULT_IMAGE=null,mm.DEFAULT_MAPPING=Nu,mm.DEFAULT_ANISOTROPY=1;var hm=class e{constructor(t=0,n=0,r=0,i=1){e.prototype.isVector4=!0,this.x=t,this.y=n,this.z=r,this.w=i}get width(){return this.z}set width(e){this.z=e}get height(){return this.w}set height(e){this.w=e}set(e,t,n,r){return this.x=e,this.y=t,this.z=n,this.w=r,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this.w=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setW(e){return this.w=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;case 3:this.w=t;break;default:throw Error(`index is out of range: `+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw Error(`index is out of range: `+e)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=e.w===void 0?1:e.w,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this.w+=e.w,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this.w+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this.w=e.w+t.w,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this.w+=e.w*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this.w-=e.w,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this.w-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this.w=e.w-t.w,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this.w*=e.w,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this.w*=e,this}applyMatrix4(e){let t=this.x,n=this.y,r=this.z,i=this.w,a=e.elements;return this.x=a[0]*t+a[4]*n+a[8]*r+a[12]*i,this.y=a[1]*t+a[5]*n+a[9]*r+a[13]*i,this.z=a[2]*t+a[6]*n+a[10]*r+a[14]*i,this.w=a[3]*t+a[7]*n+a[11]*r+a[15]*i,this}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this.w/=e.w,this}divideScalar(e){return this.multiplyScalar(1/e)}setAxisAngleFromQuaternion(e){this.w=2*Math.acos(e.w);let t=Math.sqrt(1-e.w*e.w);return t<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=e.x/t,this.y=e.y/t,this.z=e.z/t),this}setAxisAngleFromRotationMatrix(e){let t,n,r,i,a=.01,o=.1,s=e.elements,c=s[0],l=s[4],u=s[8],d=s[1],f=s[5],p=s[9],m=s[2],h=s[6],g=s[10];if(Math.abs(l-d)s&&e>_?e_?s1;this.dispose()}this.viewport.set(0,0,e,t),this.scissor.set(0,0,e,t)}clone(){return new this.constructor().copy(this)}copy(e){this.width=e.width,this.height=e.height,this.depth=e.depth,this.scissor.copy(e.scissor),this.scissorTest=e.scissorTest,this.viewport.copy(e.viewport),this.textures.length=0;for(let t=0,n=e.textures.length;t=this.min.x&&e.x<=this.max.x&&e.y>=this.min.y&&e.y<=this.max.y&&e.z>=this.min.z&&e.z<=this.max.z}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y&&this.min.z<=e.min.z&&e.max.z<=this.max.z}getParameter(e,t){return t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y),(e.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(e){return e.max.x>=this.min.x&&e.min.x<=this.max.x&&e.max.y>=this.min.y&&e.min.y<=this.max.y&&e.max.z>=this.min.z&&e.min.z<=this.max.z}intersectsSphere(e){return this.clampPoint(e.center,wm),wm.distanceToSquared(e.center)<=e.radius*e.radius}intersectsPlane(e){let t,n;return e.normal.x>0?(t=e.normal.x*this.min.x,n=e.normal.x*this.max.x):(t=e.normal.x*this.max.x,n=e.normal.x*this.min.x),e.normal.y>0?(t+=e.normal.y*this.min.y,n+=e.normal.y*this.max.y):(t+=e.normal.y*this.max.y,n+=e.normal.y*this.min.y),e.normal.z>0?(t+=e.normal.z*this.min.z,n+=e.normal.z*this.max.z):(t+=e.normal.z*this.max.z,n+=e.normal.z*this.min.z),t<=-e.constant&&n>=-e.constant}intersectsTriangle(e){if(this.isEmpty())return!1;this.getCenter(Mm),Nm.subVectors(this.max,Mm),Em.subVectors(e.a,Mm),Dm.subVectors(e.b,Mm),Om.subVectors(e.c,Mm),km.subVectors(Dm,Em),Am.subVectors(Om,Dm),jm.subVectors(Em,Om);let t=[0,-km.z,km.y,0,-Am.z,Am.y,0,-jm.z,jm.y,km.z,0,-km.x,Am.z,0,-Am.x,jm.z,0,-jm.x,-km.y,km.x,0,-Am.y,Am.x,0,-jm.y,jm.x,0];return!Im(t,Em,Dm,Om,Nm)||(t=[1,0,0,0,1,0,0,0,1],!Im(t,Em,Dm,Om,Nm))?!1:(Pm.crossVectors(km,Am),t=[Pm.x,Pm.y,Pm.z],Im(t,Em,Dm,Om,Nm))}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,wm).distanceTo(e)}getBoundingSphere(e){return this.isEmpty()?e.makeEmpty():(this.getCenter(e.center),e.radius=this.getSize(wm).length()*.5),e}intersect(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}applyMatrix4(e){return this.isEmpty()?this:(Cm[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),Cm[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),Cm[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),Cm[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),Cm[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),Cm[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),Cm[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),Cm[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(Cm),this)}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}toJSON(){return{min:this.min.toArray(),max:this.max.toArray()}}fromJSON(e){return this.min.fromArray(e.min),this.max.fromArray(e.max),this}};const Cm=[new W,new W,new W,new W,new W,new W,new W,new W],wm=new W,Tm=new Sm,Em=new W,Dm=new W,Om=new W,km=new W,Am=new W,jm=new W,Mm=new W,Nm=new W,Pm=new W,Fm=new W;function Im(e,t,n,r,i){for(let a=0,o=e.length-3;a<=o;a+=3){Fm.fromArray(e,a);let o=i.x*Math.abs(Fm.x)+i.y*Math.abs(Fm.y)+i.z*Math.abs(Fm.z),s=t.dot(Fm),c=n.dot(Fm),l=r.dot(Fm);if(Math.max(-Math.max(s,c,l),Math.min(s,c,l))>o)return!1}return!0}const Lm=new Sm,Rm=new W,zm=new W;var Bm=class{constructor(e=new W,t=-1){this.isSphere=!0,this.center=e,this.radius=t}set(e,t){return this.center.copy(e),this.radius=t,this}setFromPoints(e,t){let n=this.center;t===void 0?Lm.setFromPoints(e).getCenter(n):n.copy(t);let r=0;for(let t=0,i=e.length;tthis.radius*this.radius&&(t.sub(this.center).normalize(),t.multiplyScalar(this.radius).add(this.center)),t}getBoundingBox(e){return this.isEmpty()?(e.makeEmpty(),e):(e.set(this.center,this.center),e.expandByScalar(this.radius),e)}applyMatrix4(e){return this.center.applyMatrix4(e),this.radius*=e.getMaxScaleOnAxis(),this}translate(e){return this.center.add(e),this}expandByPoint(e){if(this.isEmpty())return this.center.copy(e),this.radius=0,this;Rm.subVectors(e,this.center);let t=Rm.lengthSq();if(t>this.radius*this.radius){let e=Math.sqrt(t),n=(e-this.radius)*.5;this.center.addScaledVector(Rm,n/e),this.radius+=n}return this}union(e){return e.isEmpty()?this:this.isEmpty()?(this.copy(e),this):(this.center.equals(e.center)===!0?this.radius=Math.max(this.radius,e.radius):(zm.subVectors(e.center,this.center).setLength(e.radius),this.expandByPoint(Rm.copy(e.center).add(zm)),this.expandByPoint(Rm.copy(e.center).sub(zm))),this)}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return new this.constructor().copy(this)}toJSON(){return{radius:this.radius,center:this.center.toArray()}}fromJSON(e){return this.radius=e.radius,this.center.fromArray(e.center),this}};const Vm=new W,Hm=new W,Um=new W,Wm=new W,Gm=new W,Km=new W,qm=new W;var Jm=class{constructor(e=new W,t=new W(0,0,-1)){this.origin=e,this.direction=t}set(e,t){return this.origin.copy(e),this.direction.copy(t),this}copy(e){return this.origin.copy(e.origin),this.direction.copy(e.direction),this}at(e,t){return t.copy(this.origin).addScaledVector(this.direction,e)}lookAt(e){return this.direction.copy(e).sub(this.origin).normalize(),this}recast(e){return this.origin.copy(this.at(e,Vm)),this}closestPointToPoint(e,t){t.subVectors(e,this.origin);let n=t.dot(this.direction);return n<0?t.copy(this.origin):t.copy(this.origin).addScaledVector(this.direction,n)}distanceToPoint(e){return Math.sqrt(this.distanceSqToPoint(e))}distanceSqToPoint(e){let t=Vm.subVectors(e,this.origin).dot(this.direction);return t<0?this.origin.distanceToSquared(e):(Vm.copy(this.origin).addScaledVector(this.direction,t),Vm.distanceToSquared(e))}distanceSqToSegment(e,t,n,r){Hm.copy(e).add(t).multiplyScalar(.5),Um.copy(t).sub(e).normalize(),Wm.copy(this.origin).sub(Hm);let i=e.distanceTo(t)*.5,a=-this.direction.dot(Um),o=Wm.dot(this.direction),s=-Wm.dot(Um),c=Wm.lengthSq(),l=Math.abs(1-a*a),u,d,f,p;if(l>0)if(u=a*s-o,d=a*o-s,p=i*l,u>=0)if(d>=-p)if(d<=p){let e=1/l;u*=e,d*=e,f=u*(u+a*d+2*o)+d*(a*u+d+2*s)+c}else d=i,u=Math.max(0,-(a*d+o)),f=-u*u+d*(d+2*s)+c;else d=-i,u=Math.max(0,-(a*d+o)),f=-u*u+d*(d+2*s)+c;else d<=-p?(u=Math.max(0,-(-a*i+o)),d=u>0?-i:Math.min(Math.max(-i,-s),i),f=-u*u+d*(d+2*s)+c):d<=p?(u=0,d=Math.min(Math.max(-i,-s),i),f=d*(d+2*s)+c):(u=Math.max(0,-(a*i+o)),d=u>0?i:Math.min(Math.max(-i,-s),i),f=-u*u+d*(d+2*s)+c);else d=a>0?-i:i,u=Math.max(0,-(a*d+o)),f=-u*u+d*(d+2*s)+c;return n&&n.copy(this.origin).addScaledVector(this.direction,u),r&&r.copy(Hm).addScaledVector(Um,d),f}intersectSphere(e,t){Vm.subVectors(e.center,this.origin);let n=Vm.dot(this.direction),r=Vm.dot(Vm)-n*n,i=e.radius*e.radius;if(r>i)return null;let a=Math.sqrt(i-r),o=n-a,s=n+a;return s<0?null:o<0?this.at(s,t):this.at(o,t)}intersectsSphere(e){return e.radius<0?!1:this.distanceSqToPoint(e.center)<=e.radius*e.radius}distanceToPlane(e){let t=e.normal.dot(this.direction);if(t===0)return e.distanceToPoint(this.origin)===0?0:null;let n=-(this.origin.dot(e.normal)+e.constant)/t;return n>=0?n:null}intersectPlane(e,t){let n=this.distanceToPlane(e);return n===null?null:this.at(n,t)}intersectsPlane(e){let t=e.distanceToPoint(this.origin);if(t===0)return!0;let n=e.normal.dot(this.direction);return n*t<0}intersectBox(e,t){let n,r,i,a,o,s,c=1/this.direction.x,l=1/this.direction.y,u=1/this.direction.z,d=this.origin;return c>=0?(n=(e.min.x-d.x)*c,r=(e.max.x-d.x)*c):(n=(e.max.x-d.x)*c,r=(e.min.x-d.x)*c),l>=0?(i=(e.min.y-d.y)*l,a=(e.max.y-d.y)*l):(i=(e.max.y-d.y)*l,a=(e.min.y-d.y)*l),n>a||i>r||((i>n||isNaN(n))&&(n=i),(a=0?(o=(e.min.z-d.z)*u,s=(e.max.z-d.z)*u):(o=(e.max.z-d.z)*u,s=(e.min.z-d.z)*u),n>s||o>r)||((o>n||n!==n)&&(n=o),(s=0?n:r,t)}intersectsBox(e){return this.intersectBox(e,Vm)!==null}intersectTriangle(e,t,n,r,i){Gm.subVectors(t,e),Km.subVectors(n,e),qm.crossVectors(Gm,Km);let a=this.direction.dot(qm),o;if(a>0){if(r)return null;o=1}else if(a<0)o=-1,a=-a;else return null;Wm.subVectors(this.origin,e);let s=o*this.direction.dot(Km.crossVectors(Wm,Km));if(s<0)return null;let c=o*this.direction.dot(Gm.cross(Wm));if(c<0||s+c>a)return null;let l=-o*Wm.dot(qm);return l<0?null:this.at(l/a,i)}applyMatrix4(e){return this.origin.applyMatrix4(e),this.direction.transformDirection(e),this}equals(e){return e.origin.equals(this.origin)&&e.direction.equals(this.direction)}clone(){return new this.constructor().copy(this)}},G=class e{constructor(t,n,r,i,a,o,s,c,l,u,d,f,p,m,h,g){e.prototype.isMatrix4=!0,this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],t!==void 0&&this.set(t,n,r,i,a,o,s,c,l,u,d,f,p,m,h,g)}set(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h){let g=this.elements;return g[0]=e,g[4]=t,g[8]=n,g[12]=r,g[1]=i,g[5]=a,g[9]=o,g[13]=s,g[2]=c,g[6]=l,g[10]=u,g[14]=d,g[3]=f,g[7]=p,g[11]=m,g[15]=h,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}clone(){return new e().fromArray(this.elements)}copy(e){let t=this.elements,n=e.elements;return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],t[9]=n[9],t[10]=n[10],t[11]=n[11],t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15],this}copyPosition(e){let t=this.elements,n=e.elements;return t[12]=n[12],t[13]=n[13],t[14]=n[14],this}setFromMatrix3(e){let t=e.elements;return this.set(t[0],t[3],t[6],0,t[1],t[4],t[7],0,t[2],t[5],t[8],0,0,0,0,1),this}extractBasis(e,t,n){return e.setFromMatrixColumn(this,0),t.setFromMatrixColumn(this,1),n.setFromMatrixColumn(this,2),this}makeBasis(e,t,n){return this.set(e.x,t.x,n.x,0,e.y,t.y,n.y,0,e.z,t.z,n.z,0,0,0,0,1),this}extractRotation(e){let t=this.elements,n=e.elements,r=1/Ym.setFromMatrixColumn(e,0).length(),i=1/Ym.setFromMatrixColumn(e,1).length(),a=1/Ym.setFromMatrixColumn(e,2).length();return t[0]=n[0]*r,t[1]=n[1]*r,t[2]=n[2]*r,t[3]=0,t[4]=n[4]*i,t[5]=n[5]*i,t[6]=n[6]*i,t[7]=0,t[8]=n[8]*a,t[9]=n[9]*a,t[10]=n[10]*a,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromEuler(e){let t=this.elements,n=e.x,r=e.y,i=e.z,a=Math.cos(n),o=Math.sin(n),s=Math.cos(r),c=Math.sin(r),l=Math.cos(i),u=Math.sin(i);if(e.order===`XYZ`){let e=a*l,n=a*u,r=o*l,i=o*u;t[0]=s*l,t[4]=-s*u,t[8]=c,t[1]=n+r*c,t[5]=e-i*c,t[9]=-o*s,t[2]=i-e*c,t[6]=r+n*c,t[10]=a*s}else if(e.order===`YXZ`){let e=s*l,n=s*u,r=c*l,i=c*u;t[0]=e+i*o,t[4]=r*o-n,t[8]=a*c,t[1]=a*u,t[5]=a*l,t[9]=-o,t[2]=n*o-r,t[6]=i+e*o,t[10]=a*s}else if(e.order===`ZXY`){let e=s*l,n=s*u,r=c*l,i=c*u;t[0]=e-i*o,t[4]=-a*u,t[8]=r+n*o,t[1]=n+r*o,t[5]=a*l,t[9]=i-e*o,t[2]=-a*c,t[6]=o,t[10]=a*s}else if(e.order===`ZYX`){let e=a*l,n=a*u,r=o*l,i=o*u;t[0]=s*l,t[4]=r*c-n,t[8]=e*c+i,t[1]=s*u,t[5]=i*c+e,t[9]=n*c-r,t[2]=-c,t[6]=o*s,t[10]=a*s}else if(e.order===`YZX`){let e=a*s,n=a*c,r=o*s,i=o*c;t[0]=s*l,t[4]=i-e*u,t[8]=r*u+n,t[1]=u,t[5]=a*l,t[9]=-o*l,t[2]=-c*l,t[6]=n*u+r,t[10]=e-i*u}else if(e.order===`XZY`){let e=a*s,n=a*c,r=o*s,i=o*c;t[0]=s*l,t[4]=-u,t[8]=c*l,t[1]=e*u+i,t[5]=a*l,t[9]=n*u-r,t[2]=r*u-n,t[6]=o*l,t[10]=i*u+e}return t[3]=0,t[7]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromQuaternion(e){return this.compose(Zm,e,Qm)}lookAt(e,t,n){let r=this.elements;return th.subVectors(e,t),th.lengthSq()===0&&(th.z=1),th.normalize(),$m.crossVectors(n,th),$m.lengthSq()===0&&(Math.abs(n.z)===1?th.x+=1e-4:th.z+=1e-4,th.normalize(),$m.crossVectors(n,th)),$m.normalize(),eh.crossVectors(th,$m),r[0]=$m.x,r[4]=eh.x,r[8]=th.x,r[1]=$m.y,r[5]=eh.y,r[9]=th.y,r[2]=$m.z,r[6]=eh.z,r[10]=th.z,this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){let n=e.elements,r=t.elements,i=this.elements,a=n[0],o=n[4],s=n[8],c=n[12],l=n[1],u=n[5],d=n[9],f=n[13],p=n[2],m=n[6],h=n[10],g=n[14],_=n[3],v=n[7],y=n[11],b=n[15],x=r[0],S=r[4],C=r[8],w=r[12],T=r[1],E=r[5],D=r[9],O=r[13],k=r[2],A=r[6],j=r[10],M=r[14],N=r[3],ee=r[7],te=r[11],P=r[15];return i[0]=a*x+o*T+s*k+c*N,i[4]=a*S+o*E+s*A+c*ee,i[8]=a*C+o*D+s*j+c*te,i[12]=a*w+o*O+s*M+c*P,i[1]=l*x+u*T+d*k+f*N,i[5]=l*S+u*E+d*A+f*ee,i[9]=l*C+u*D+d*j+f*te,i[13]=l*w+u*O+d*M+f*P,i[2]=p*x+m*T+h*k+g*N,i[6]=p*S+m*E+h*A+g*ee,i[10]=p*C+m*D+h*j+g*te,i[14]=p*w+m*O+h*M+g*P,i[3]=_*x+v*T+y*k+b*N,i[7]=_*S+v*E+y*A+b*ee,i[11]=_*C+v*D+y*j+b*te,i[15]=_*w+v*O+y*M+b*P,this}multiplyScalar(e){let t=this.elements;return t[0]*=e,t[4]*=e,t[8]*=e,t[12]*=e,t[1]*=e,t[5]*=e,t[9]*=e,t[13]*=e,t[2]*=e,t[6]*=e,t[10]*=e,t[14]*=e,t[3]*=e,t[7]*=e,t[11]*=e,t[15]*=e,this}determinant(){let e=this.elements,t=e[0],n=e[4],r=e[8],i=e[12],a=e[1],o=e[5],s=e[9],c=e[13],l=e[2],u=e[6],d=e[10],f=e[14],p=e[3],m=e[7],h=e[11],g=e[15];return p*(+i*s*u-r*c*u-i*o*d+n*c*d+r*o*f-n*s*f)+m*(+t*s*f-t*c*d+i*a*d-r*a*f+r*c*l-i*s*l)+h*(+t*c*u-t*o*f-i*a*u+n*a*f+i*o*l-n*c*l)+g*(-r*o*l-t*s*u+t*o*d+r*a*u-n*a*d+n*s*l)}transpose(){let e=this.elements,t;return t=e[1],e[1]=e[4],e[4]=t,t=e[2],e[2]=e[8],e[8]=t,t=e[6],e[6]=e[9],e[9]=t,t=e[3],e[3]=e[12],e[12]=t,t=e[7],e[7]=e[13],e[13]=t,t=e[11],e[11]=e[14],e[14]=t,this}setPosition(e,t,n){let r=this.elements;return e.isVector3?(r[12]=e.x,r[13]=e.y,r[14]=e.z):(r[12]=e,r[13]=t,r[14]=n),this}invert(){let e=this.elements,t=e[0],n=e[1],r=e[2],i=e[3],a=e[4],o=e[5],s=e[6],c=e[7],l=e[8],u=e[9],d=e[10],f=e[11],p=e[12],m=e[13],h=e[14],g=e[15],_=u*h*c-m*d*c+m*s*f-o*h*f-u*s*g+o*d*g,v=p*d*c-l*h*c-p*s*f+a*h*f+l*s*g-a*d*g,y=l*m*c-p*u*c+p*o*f-a*m*f-l*o*g+a*u*g,b=p*u*s-l*m*s-p*o*d+a*m*d+l*o*h-a*u*h,x=t*_+n*v+r*y+i*b;if(x===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);let S=1/x;return e[0]=_*S,e[1]=(m*d*i-u*h*i-m*r*f+n*h*f+u*r*g-n*d*g)*S,e[2]=(o*h*i-m*s*i+m*r*c-n*h*c-o*r*g+n*s*g)*S,e[3]=(u*s*i-o*d*i-u*r*c+n*d*c+o*r*f-n*s*f)*S,e[4]=v*S,e[5]=(l*h*i-p*d*i+p*r*f-t*h*f-l*r*g+t*d*g)*S,e[6]=(p*s*i-a*h*i-p*r*c+t*h*c+a*r*g-t*s*g)*S,e[7]=(a*d*i-l*s*i+l*r*c-t*d*c-a*r*f+t*s*f)*S,e[8]=y*S,e[9]=(p*u*i-l*m*i-p*n*f+t*m*f+l*n*g-t*u*g)*S,e[10]=(a*m*i-p*o*i+p*n*c-t*m*c-a*n*g+t*o*g)*S,e[11]=(l*o*i-a*u*i-l*n*c+t*u*c+a*n*f-t*o*f)*S,e[12]=b*S,e[13]=(l*m*r-p*u*r+p*n*d-t*m*d-l*n*h+t*u*h)*S,e[14]=(p*o*r-a*m*r-p*n*s+t*m*s+a*n*h-t*o*h)*S,e[15]=(a*u*r-l*o*r+l*n*s-t*u*s-a*n*d+t*o*d)*S,this}scale(e){let t=this.elements,n=e.x,r=e.y,i=e.z;return t[0]*=n,t[4]*=r,t[8]*=i,t[1]*=n,t[5]*=r,t[9]*=i,t[2]*=n,t[6]*=r,t[10]*=i,t[3]*=n,t[7]*=r,t[11]*=i,this}getMaxScaleOnAxis(){let e=this.elements,t=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],n=e[4]*e[4]+e[5]*e[5]+e[6]*e[6],r=e[8]*e[8]+e[9]*e[9]+e[10]*e[10];return Math.sqrt(Math.max(t,n,r))}makeTranslation(e,t,n){return e.isVector3?this.set(1,0,0,e.x,0,1,0,e.y,0,0,1,e.z,0,0,0,1):this.set(1,0,0,e,0,1,0,t,0,0,1,n,0,0,0,1),this}makeRotationX(e){let t=Math.cos(e),n=Math.sin(e);return this.set(1,0,0,0,0,t,-n,0,0,n,t,0,0,0,0,1),this}makeRotationY(e){let t=Math.cos(e),n=Math.sin(e);return this.set(t,0,n,0,0,1,0,0,-n,0,t,0,0,0,0,1),this}makeRotationZ(e){let t=Math.cos(e),n=Math.sin(e);return this.set(t,-n,0,0,n,t,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(e,t){let n=Math.cos(t),r=Math.sin(t),i=1-n,a=e.x,o=e.y,s=e.z,c=i*a,l=i*o;return this.set(c*a+n,c*o-r*s,c*s+r*o,0,c*o+r*s,l*o+n,l*s-r*a,0,c*s-r*o,l*s+r*a,i*s*s+n,0,0,0,0,1),this}makeScale(e,t,n){return this.set(e,0,0,0,0,t,0,0,0,0,n,0,0,0,0,1),this}makeShear(e,t,n,r,i,a){return this.set(1,n,i,0,e,1,a,0,t,r,1,0,0,0,0,1),this}compose(e,t,n){let r=this.elements,i=t._x,a=t._y,o=t._z,s=t._w,c=i+i,l=a+a,u=o+o,d=i*c,f=i*l,p=i*u,m=a*l,h=a*u,g=o*u,_=s*c,v=s*l,y=s*u,b=n.x,x=n.y,S=n.z;return r[0]=(1-(m+g))*b,r[1]=(f+y)*b,r[2]=(p-v)*b,r[3]=0,r[4]=(f-y)*x,r[5]=(1-(d+g))*x,r[6]=(h+_)*x,r[7]=0,r[8]=(p+v)*S,r[9]=(h-_)*S,r[10]=(1-(d+m))*S,r[11]=0,r[12]=e.x,r[13]=e.y,r[14]=e.z,r[15]=1,this}decompose(e,t,n){let r=this.elements,i=Ym.set(r[0],r[1],r[2]).length(),a=Ym.set(r[4],r[5],r[6]).length(),o=Ym.set(r[8],r[9],r[10]).length(),s=this.determinant();s<0&&(i=-i),e.x=r[12],e.y=r[13],e.z=r[14],Xm.copy(this);let c=1/i,l=1/a,u=1/o;return Xm.elements[0]*=c,Xm.elements[1]*=c,Xm.elements[2]*=c,Xm.elements[4]*=l,Xm.elements[5]*=l,Xm.elements[6]*=l,Xm.elements[8]*=u,Xm.elements[9]*=u,Xm.elements[10]*=u,t.setFromRotationMatrix(Xm),n.x=i,n.y=a,n.z=o,this}makePerspective(e,t,n,r,i,a,o=sp){let s=this.elements,c=2*i/(t-e),l=2*i/(n-r),u=(t+e)/(t-e),d=(n+r)/(n-r),f,p;if(o===sp)f=-(a+i)/(a-i),p=-2*a*i/(a-i);else if(o===cp)f=-a/(a-i),p=-a*i/(a-i);else throw Error(`THREE.Matrix4.makePerspective(): Invalid coordinate system: `+o);return s[0]=c,s[4]=0,s[8]=u,s[12]=0,s[1]=0,s[5]=l,s[9]=d,s[13]=0,s[2]=0,s[6]=0,s[10]=f,s[14]=p,s[3]=0,s[7]=0,s[11]=-1,s[15]=0,this}makeOrthographic(e,t,n,r,i,a,o=sp){let s=this.elements,c=1/(t-e),l=1/(n-r),u=1/(a-i),d=(t+e)*c,f=(n+r)*l,p,m;if(o===sp)p=(a+i)*u,m=-2*u;else if(o===cp)p=i*u,m=-1*u;else throw Error(`THREE.Matrix4.makeOrthographic(): Invalid coordinate system: `+o);return s[0]=2*c,s[4]=0,s[8]=0,s[12]=-d,s[1]=0,s[5]=2*l,s[9]=0,s[13]=-f,s[2]=0,s[6]=0,s[10]=m,s[14]=-p,s[3]=0,s[7]=0,s[11]=0,s[15]=1,this}equals(e){let t=this.elements,n=e.elements;for(let e=0;e<16;e++)if(t[e]!==n[e])return!1;return!0}fromArray(e,t=0){for(let n=0;n<16;n++)this.elements[n]=e[n+t];return this}toArray(e=[],t=0){let n=this.elements;return e[t]=n[0],e[t+1]=n[1],e[t+2]=n[2],e[t+3]=n[3],e[t+4]=n[4],e[t+5]=n[5],e[t+6]=n[6],e[t+7]=n[7],e[t+8]=n[8],e[t+9]=n[9],e[t+10]=n[10],e[t+11]=n[11],e[t+12]=n[12],e[t+13]=n[13],e[t+14]=n[14],e[t+15]=n[15],e}};const Ym=new W,Xm=new G,Zm=new W(0,0,0),Qm=new W(1,1,1),$m=new W,eh=new W,th=new W,nh=new G,rh=new Bp;var ih=class e{constructor(t=0,n=0,r=0,i=e.DEFAULT_ORDER){this.isEuler=!0,this._x=t,this._y=n,this._z=r,this._order=i}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get order(){return this._order}set order(e){this._order=e,this._onChangeCallback()}set(e,t,n,r=this._order){return this._x=e,this._y=t,this._z=n,this._order=r,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(e){return this._x=e._x,this._y=e._y,this._z=e._z,this._order=e._order,this._onChangeCallback(),this}setFromRotationMatrix(e,t=this._order,n=!0){let r=e.elements,i=r[0],a=r[4],o=r[8],s=r[1],c=r[5],l=r[9],u=r[2],d=r[6],f=r[10];switch(t){case`XYZ`:this._y=Math.asin(vp(o,-1,1)),Math.abs(o)<.9999999?(this._x=Math.atan2(-l,f),this._z=Math.atan2(-a,i)):(this._x=Math.atan2(d,c),this._z=0);break;case`YXZ`:this._x=Math.asin(-vp(l,-1,1)),Math.abs(l)<.9999999?(this._y=Math.atan2(o,f),this._z=Math.atan2(s,c)):(this._y=Math.atan2(-u,i),this._z=0);break;case`ZXY`:this._x=Math.asin(vp(d,-1,1)),Math.abs(d)<.9999999?(this._y=Math.atan2(-u,f),this._z=Math.atan2(-a,c)):(this._y=0,this._z=Math.atan2(s,i));break;case`ZYX`:this._y=Math.asin(-vp(u,-1,1)),Math.abs(u)<.9999999?(this._x=Math.atan2(d,f),this._z=Math.atan2(s,i)):(this._x=0,this._z=Math.atan2(-a,c));break;case`YZX`:this._z=Math.asin(vp(s,-1,1)),Math.abs(s)<.9999999?(this._x=Math.atan2(-l,c),this._y=Math.atan2(-u,i)):(this._x=0,this._y=Math.atan2(o,f));break;case`XZY`:this._z=Math.asin(-vp(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(d,c),this._y=Math.atan2(o,i)):(this._x=Math.atan2(-l,f),this._y=0);break;default:console.warn(`THREE.Euler: .setFromRotationMatrix() encountered an unknown order: `+t)}return this._order=t,n===!0&&this._onChangeCallback(),this}setFromQuaternion(e,t,n){return nh.makeRotationFromQuaternion(e),this.setFromRotationMatrix(nh,t,n)}setFromVector3(e,t=this._order){return this.set(e.x,e.y,e.z,t)}reorder(e){return rh.setFromEuler(this),this.setFromQuaternion(rh,e)}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._order===this._order}fromArray(e){return this._x=e[0],this._y=e[1],this._z=e[2],e[3]!==void 0&&(this._order=e[3]),this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._order,e}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._order}};ih.DEFAULT_ORDER=`XYZ`;var ah=class{constructor(){this.mask=1}set(e){this.mask=(1<>>0}enable(e){this.mask|=1<1){for(let e=0;e1){for(let e=0;e0&&(r.userData=this.userData),r.layers=this.layers.mask,r.matrix=this.matrix.toArray(),r.up=this.up.toArray(),this.matrixAutoUpdate===!1&&(r.matrixAutoUpdate=!1),this.isInstancedMesh&&(r.type=`InstancedMesh`,r.count=this.count,r.instanceMatrix=this.instanceMatrix.toJSON(),this.instanceColor!==null&&(r.instanceColor=this.instanceColor.toJSON())),this.isBatchedMesh&&(r.type=`BatchedMesh`,r.perObjectFrustumCulled=this.perObjectFrustumCulled,r.sortObjects=this.sortObjects,r.drawRanges=this._drawRanges,r.reservedRanges=this._reservedRanges,r.geometryInfo=this._geometryInfo.map(e=>({...e,boundingBox:e.boundingBox?e.boundingBox.toJSON():void 0,boundingSphere:e.boundingSphere?e.boundingSphere.toJSON():void 0})),r.instanceInfo=this._instanceInfo.map(e=>({...e})),r.availableInstanceIds=this._availableInstanceIds.slice(),r.availableGeometryIds=this._availableGeometryIds.slice(),r.nextIndexStart=this._nextIndexStart,r.nextVertexStart=this._nextVertexStart,r.geometryCount=this._geometryCount,r.maxInstanceCount=this._maxInstanceCount,r.maxVertexCount=this._maxVertexCount,r.maxIndexCount=this._maxIndexCount,r.geometryInitialized=this._geometryInitialized,r.matricesTexture=this._matricesTexture.toJSON(e),r.indirectTexture=this._indirectTexture.toJSON(e),this._colorsTexture!==null&&(r.colorsTexture=this._colorsTexture.toJSON(e)),this.boundingSphere!==null&&(r.boundingSphere=this.boundingSphere.toJSON()),this.boundingBox!==null&&(r.boundingBox=this.boundingBox.toJSON()));function i(t,n){return t[n.uuid]===void 0&&(t[n.uuid]=n.toJSON(e)),n.uuid}if(this.isScene)this.background&&(this.background.isColor?r.background=this.background.toJSON():this.background.isTexture&&(r.background=this.background.toJSON(e).uuid)),this.environment&&this.environment.isTexture&&this.environment.isRenderTargetTexture!==!0&&(r.environment=this.environment.toJSON(e).uuid);else if(this.isMesh||this.isLine||this.isPoints){r.geometry=i(e.geometries,this.geometry);let t=this.geometry.parameters;if(t!==void 0&&t.shapes!==void 0){let n=t.shapes;if(Array.isArray(n))for(let t=0,r=n.length;t0){r.children=[];for(let t=0;t0){r.animations=[];for(let t=0;t0&&(n.geometries=t),r.length>0&&(n.materials=r),i.length>0&&(n.textures=i),o.length>0&&(n.images=o),s.length>0&&(n.shapes=s),c.length>0&&(n.skeletons=c),l.length>0&&(n.animations=l),u.length>0&&(n.nodes=u)}return n.object=r,n;function a(e){let t=[];for(let n in e){let r=e[n];delete r.metadata,t.push(r)}return t}}clone(e){return new this.constructor().copy(this,e)}copy(e,t=!0){if(this.name=e.name,this.up.copy(e.up),this.position.copy(e.position),this.rotation.order=e.rotation.order,this.quaternion.copy(e.quaternion),this.scale.copy(e.scale),this.matrix.copy(e.matrix),this.matrixWorld.copy(e.matrixWorld),this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrixWorldAutoUpdate=e.matrixWorldAutoUpdate,this.matrixWorldNeedsUpdate=e.matrixWorldNeedsUpdate,this.layers.mask=e.layers.mask,this.visible=e.visible,this.castShadow=e.castShadow,this.receiveShadow=e.receiveShadow,this.frustumCulled=e.frustumCulled,this.renderOrder=e.renderOrder,this.animations=e.animations.slice(),this.userData=JSON.parse(JSON.stringify(e.userData)),t===!0)for(let t=0;t0?r.multiplyScalar(1/Math.sqrt(i)):r.set(0,0,0)}static getBarycoord(e,t,n,r,i){Sh.subVectors(r,t),Ch.subVectors(n,t),wh.subVectors(e,t);let a=Sh.dot(Sh),o=Sh.dot(Ch),s=Sh.dot(wh),c=Ch.dot(Ch),l=Ch.dot(wh),u=a*c-o*o;if(u===0)return i.set(0,0,0),null;let d=1/u,f=(c*s-o*l)*d,p=(a*l-o*s)*d;return i.set(1-f-p,p,f)}static containsPoint(e,t,n,r){return this.getBarycoord(e,t,n,r,Th)===null?!1:Th.x>=0&&Th.y>=0&&Th.x+Th.y<=1}static getInterpolation(e,t,n,r,i,a,o,s){return this.getBarycoord(e,t,n,r,Th)===null?(s.x=0,s.y=0,`z`in s&&(s.z=0),`w`in s&&(s.w=0),null):(s.setScalar(0),s.addScaledVector(i,Th.x),s.addScaledVector(a,Th.y),s.addScaledVector(o,Th.z),s)}static getInterpolatedAttribute(e,t,n,r,i,a){return Mh.setScalar(0),Nh.setScalar(0),Ph.setScalar(0),Mh.fromBufferAttribute(e,t),Nh.fromBufferAttribute(e,n),Ph.fromBufferAttribute(e,r),a.setScalar(0),a.addScaledVector(Mh,i.x),a.addScaledVector(Nh,i.y),a.addScaledVector(Ph,i.z),a}static isFrontFacing(e,t,n,r){return Sh.subVectors(n,t),Ch.subVectors(e,t),Sh.cross(Ch).dot(r)<0}set(e,t,n){return this.a.copy(e),this.b.copy(t),this.c.copy(n),this}setFromPointsAndIndices(e,t,n,r){return this.a.copy(e[t]),this.b.copy(e[n]),this.c.copy(e[r]),this}setFromAttributeAndIndices(e,t,n,r){return this.a.fromBufferAttribute(e,t),this.b.fromBufferAttribute(e,n),this.c.fromBufferAttribute(e,r),this}clone(){return new this.constructor().copy(this)}copy(e){return this.a.copy(e.a),this.b.copy(e.b),this.c.copy(e.c),this}getArea(){return Sh.subVectors(this.c,this.b),Ch.subVectors(this.a,this.b),Sh.cross(Ch).length()*.5}getMidpoint(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(t){return e.getNormal(this.a,this.b,this.c,t)}getPlane(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(t,n){return e.getBarycoord(t,this.a,this.b,this.c,n)}getInterpolation(t,n,r,i,a){return e.getInterpolation(t,this.a,this.b,this.c,n,r,i,a)}containsPoint(t){return e.containsPoint(t,this.a,this.b,this.c)}isFrontFacing(t){return e.isFrontFacing(this.a,this.b,this.c,t)}intersectsBox(e){return e.intersectsTriangle(this)}closestPointToPoint(e,t){let n=this.a,r=this.b,i=this.c,a,o;Eh.subVectors(r,n),Dh.subVectors(i,n),kh.subVectors(e,n);let s=Eh.dot(kh),c=Dh.dot(kh);if(s<=0&&c<=0)return t.copy(n);Ah.subVectors(e,r);let l=Eh.dot(Ah),u=Dh.dot(Ah);if(l>=0&&u<=l)return t.copy(r);let d=s*u-l*c;if(d<=0&&s>=0&&l<=0)return a=s/(s-l),t.copy(n).addScaledVector(Eh,a);jh.subVectors(e,i);let f=Eh.dot(jh),p=Dh.dot(jh);if(p>=0&&f<=p)return t.copy(i);let m=f*c-s*p;if(m<=0&&c>=0&&p<=0)return o=c/(c-p),t.copy(n).addScaledVector(Dh,o);let h=l*p-f*u;if(h<=0&&u-l>=0&&f-p>=0)return Oh.subVectors(i,r),o=(u-l)/(u-l+(f-p)),t.copy(r).addScaledVector(Oh,o);let g=1/(h+m+d);return a=m*g,o=d*g,t.copy(n).addScaledVector(Eh,a).addScaledVector(Dh,o)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}};const Ih={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},Lh={h:0,s:0,l:0},Rh={h:0,s:0,l:0};function zh(e,t,n){return n<0&&(n+=1),n>1&&--n,n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*6*(2/3-n):e}var K=class{constructor(e,t,n){return this.isColor=!0,this.r=1,this.g=1,this.b=1,this.set(e,t,n)}set(e,t,n){if(t===void 0&&n===void 0){let t=e;t&&t.isColor?this.copy(t):typeof t==`number`?this.setHex(t):typeof t==`string`&&this.setStyle(t)}else this.setRGB(e,t,n);return this}setScalar(e){return this.r=e,this.g=e,this.b=e,this}setHex(e,t=Sf){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(e&255)/255,im.colorSpaceToWorking(this,t),this}setRGB(e,t,n,r=im.workingColorSpace){return this.r=e,this.g=t,this.b=n,im.colorSpaceToWorking(this,r),this}setHSL(e,t,n,r=im.workingColorSpace){if(e=yp(e,1),t=vp(t,0,1),n=vp(n,0,1),t===0)this.r=this.g=this.b=n;else{let r=n<=.5?n*(1+t):n+t-n*t,i=2*n-r;this.r=zh(i,r,e+1/3),this.g=zh(i,r,e),this.b=zh(i,r,e-1/3)}return im.colorSpaceToWorking(this,r),this}setStyle(e,t=Sf){function n(t){t!==void 0&&parseFloat(t)<1&&console.warn(`THREE.Color: Alpha component of `+e+` will be ignored.`)}let r;if(r=/^(\w+)\(([^\)]*)\)/.exec(e)){let i,a=r[1],o=r[2];switch(a){case`rgb`:case`rgba`:if(i=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(o))return n(i[4]),this.setRGB(Math.min(255,parseInt(i[1],10))/255,Math.min(255,parseInt(i[2],10))/255,Math.min(255,parseInt(i[3],10))/255,t);if(i=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(o))return n(i[4]),this.setRGB(Math.min(100,parseInt(i[1],10))/100,Math.min(100,parseInt(i[2],10))/100,Math.min(100,parseInt(i[3],10))/100,t);break;case`hsl`:case`hsla`:if(i=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(o))return n(i[4]),this.setHSL(parseFloat(i[1])/360,parseFloat(i[2])/100,parseFloat(i[3])/100,t);break;default:console.warn(`THREE.Color: Unknown color model `+e)}}else if(r=/^\#([A-Fa-f\d]+)$/.exec(e)){let n=r[1],i=n.length;if(i===3)return this.setRGB(parseInt(n.charAt(0),16)/15,parseInt(n.charAt(1),16)/15,parseInt(n.charAt(2),16)/15,t);if(i===6)return this.setHex(parseInt(n,16),t);console.warn(`THREE.Color: Invalid hex color `+e)}else if(e&&e.length>0)return this.setColorName(e,t);return this}setColorName(e,t=Sf){let n=Ih[e.toLowerCase()];return n===void 0?console.warn(`THREE.Color: Unknown color `+e):this.setHex(n,t),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(e){return this.r=e.r,this.g=e.g,this.b=e.b,this}copySRGBToLinear(e){return this.r=am(e.r),this.g=am(e.g),this.b=am(e.b),this}copyLinearToSRGB(e){return this.r=om(e.r),this.g=om(e.g),this.b=om(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(e=Sf){return im.workingToColorSpace(Bh.copy(this),e),Math.round(vp(Bh.r*255,0,255))*65536+Math.round(vp(Bh.g*255,0,255))*256+Math.round(vp(Bh.b*255,0,255))}getHexString(e=Sf){return(`000000`+this.getHex(e).toString(16)).slice(-6)}getHSL(e,t=im.workingColorSpace){im.workingToColorSpace(Bh.copy(this),t);let n=Bh.r,r=Bh.g,i=Bh.b,a=Math.max(n,r,i),o=Math.min(n,r,i),s,c,l=(o+a)/2;if(o===a)s=0,c=0;else{let e=a-o;switch(c=l<=.5?e/(a+o):e/(2-a-o),a){case n:s=(r-i)/e+(r0!=e>0&&this.version++,this._alphaTest=e}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(e){if(e!==void 0)for(let t in e){let n=e[t];if(n===void 0){console.warn(`THREE.Material: parameter '${t}' has value of undefined.`);continue}let r=this[t];if(r===void 0){console.warn(`THREE.Material: '${t}' is not a property of THREE.${this.type}.`);continue}r&&r.isColor?r.set(n):r&&r.isVector3&&n&&n.isVector3?r.copy(n):this[t]=n}}toJSON(e){let t=e===void 0||typeof e==`string`;t&&(e={textures:{},images:{}});let n={metadata:{version:4.7,type:`Material`,generator:`Material.toJSON`}};n.uuid=this.uuid,n.type=this.type,this.name!==``&&(n.name=this.name),this.color&&this.color.isColor&&(n.color=this.color.getHex()),this.roughness!==void 0&&(n.roughness=this.roughness),this.metalness!==void 0&&(n.metalness=this.metalness),this.sheen!==void 0&&(n.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(n.sheenColor=this.sheenColor.getHex()),this.sheenRoughness!==void 0&&(n.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(n.emissive=this.emissive.getHex()),this.emissiveIntensity!==void 0&&this.emissiveIntensity!==1&&(n.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(n.specular=this.specular.getHex()),this.specularIntensity!==void 0&&(n.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(n.specularColor=this.specularColor.getHex()),this.shininess!==void 0&&(n.shininess=this.shininess),this.clearcoat!==void 0&&(n.clearcoat=this.clearcoat),this.clearcoatRoughness!==void 0&&(n.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(n.clearcoatMap=this.clearcoatMap.toJSON(e).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(n.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(e).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(n.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(e).uuid,n.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.dispersion!==void 0&&(n.dispersion=this.dispersion),this.iridescence!==void 0&&(n.iridescence=this.iridescence),this.iridescenceIOR!==void 0&&(n.iridescenceIOR=this.iridescenceIOR),this.iridescenceThicknessRange!==void 0&&(n.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(n.iridescenceMap=this.iridescenceMap.toJSON(e).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(n.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(e).uuid),this.anisotropy!==void 0&&(n.anisotropy=this.anisotropy),this.anisotropyRotation!==void 0&&(n.anisotropyRotation=this.anisotropyRotation),this.anisotropyMap&&this.anisotropyMap.isTexture&&(n.anisotropyMap=this.anisotropyMap.toJSON(e).uuid),this.map&&this.map.isTexture&&(n.map=this.map.toJSON(e).uuid),this.matcap&&this.matcap.isTexture&&(n.matcap=this.matcap.toJSON(e).uuid),this.alphaMap&&this.alphaMap.isTexture&&(n.alphaMap=this.alphaMap.toJSON(e).uuid),this.lightMap&&this.lightMap.isTexture&&(n.lightMap=this.lightMap.toJSON(e).uuid,n.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(n.aoMap=this.aoMap.toJSON(e).uuid,n.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(n.bumpMap=this.bumpMap.toJSON(e).uuid,n.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(n.normalMap=this.normalMap.toJSON(e).uuid,n.normalMapType=this.normalMapType,n.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(n.displacementMap=this.displacementMap.toJSON(e).uuid,n.displacementScale=this.displacementScale,n.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(n.roughnessMap=this.roughnessMap.toJSON(e).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(n.metalnessMap=this.metalnessMap.toJSON(e).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(n.emissiveMap=this.emissiveMap.toJSON(e).uuid),this.specularMap&&this.specularMap.isTexture&&(n.specularMap=this.specularMap.toJSON(e).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(n.specularIntensityMap=this.specularIntensityMap.toJSON(e).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(n.specularColorMap=this.specularColorMap.toJSON(e).uuid),this.envMap&&this.envMap.isTexture&&(n.envMap=this.envMap.toJSON(e).uuid,this.combine!==void 0&&(n.combine=this.combine)),this.envMapRotation!==void 0&&(n.envMapRotation=this.envMapRotation.toArray()),this.envMapIntensity!==void 0&&(n.envMapIntensity=this.envMapIntensity),this.reflectivity!==void 0&&(n.reflectivity=this.reflectivity),this.refractionRatio!==void 0&&(n.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(n.gradientMap=this.gradientMap.toJSON(e).uuid),this.transmission!==void 0&&(n.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(n.transmissionMap=this.transmissionMap.toJSON(e).uuid),this.thickness!==void 0&&(n.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(n.thicknessMap=this.thicknessMap.toJSON(e).uuid),this.attenuationDistance!==void 0&&this.attenuationDistance!==1/0&&(n.attenuationDistance=this.attenuationDistance),this.attenuationColor!==void 0&&(n.attenuationColor=this.attenuationColor.getHex()),this.size!==void 0&&(n.size=this.size),this.shadowSide!==null&&(n.shadowSide=this.shadowSide),this.sizeAttenuation!==void 0&&(n.sizeAttenuation=this.sizeAttenuation),this.blending!==Vl&&(n.blending=this.blending),this.side!==Ll&&(n.side=this.side),this.vertexColors===!0&&(n.vertexColors=!0),this.opacity<1&&(n.opacity=this.opacity),this.transparent===!0&&(n.transparent=!0),this.blendSrc!==tu&&(n.blendSrc=this.blendSrc),this.blendDst!==nu&&(n.blendDst=this.blendDst),this.blendEquation!==Kl&&(n.blendEquation=this.blendEquation),this.blendSrcAlpha!==null&&(n.blendSrcAlpha=this.blendSrcAlpha),this.blendDstAlpha!==null&&(n.blendDstAlpha=this.blendDstAlpha),this.blendEquationAlpha!==null&&(n.blendEquationAlpha=this.blendEquationAlpha),this.blendColor&&this.blendColor.isColor&&(n.blendColor=this.blendColor.getHex()),this.blendAlpha!==0&&(n.blendAlpha=this.blendAlpha),this.depthFunc!==hu&&(n.depthFunc=this.depthFunc),this.depthTest===!1&&(n.depthTest=this.depthTest),this.depthWrite===!1&&(n.depthWrite=this.depthWrite),this.colorWrite===!1&&(n.colorWrite=this.colorWrite),this.stencilWriteMask!==255&&(n.stencilWriteMask=this.stencilWriteMask),this.stencilFunc!==Vf&&(n.stencilFunc=this.stencilFunc),this.stencilRef!==0&&(n.stencilRef=this.stencilRef),this.stencilFuncMask!==255&&(n.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==Df&&(n.stencilFail=this.stencilFail),this.stencilZFail!==Df&&(n.stencilZFail=this.stencilZFail),this.stencilZPass!==Df&&(n.stencilZPass=this.stencilZPass),this.stencilWrite===!0&&(n.stencilWrite=this.stencilWrite),this.rotation!==void 0&&this.rotation!==0&&(n.rotation=this.rotation),this.polygonOffset===!0&&(n.polygonOffset=!0),this.polygonOffsetFactor!==0&&(n.polygonOffsetFactor=this.polygonOffsetFactor),this.polygonOffsetUnits!==0&&(n.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth!==void 0&&this.linewidth!==1&&(n.linewidth=this.linewidth),this.dashSize!==void 0&&(n.dashSize=this.dashSize),this.gapSize!==void 0&&(n.gapSize=this.gapSize),this.scale!==void 0&&(n.scale=this.scale),this.dithering===!0&&(n.dithering=!0),this.alphaTest>0&&(n.alphaTest=this.alphaTest),this.alphaHash===!0&&(n.alphaHash=!0),this.alphaToCoverage===!0&&(n.alphaToCoverage=!0),this.premultipliedAlpha===!0&&(n.premultipliedAlpha=!0),this.forceSinglePass===!0&&(n.forceSinglePass=!0),this.wireframe===!0&&(n.wireframe=!0),this.wireframeLinewidth>1&&(n.wireframeLinewidth=this.wireframeLinewidth),this.wireframeLinecap!==`round`&&(n.wireframeLinecap=this.wireframeLinecap),this.wireframeLinejoin!==`round`&&(n.wireframeLinejoin=this.wireframeLinejoin),this.flatShading===!0&&(n.flatShading=!0),this.visible===!1&&(n.visible=!1),this.toneMapped===!1&&(n.toneMapped=!1),this.fog===!1&&(n.fog=!1),Object.keys(this.userData).length>0&&(n.userData=this.userData);function r(e){let t=[];for(let n in e){let r=e[n];delete r.metadata,t.push(r)}return t}if(t){let t=r(e.textures),i=r(e.images);t.length>0&&(n.textures=t),i.length>0&&(n.images=i)}return n}clone(){return new this.constructor().copy(this)}copy(e){this.name=e.name,this.blending=e.blending,this.side=e.side,this.vertexColors=e.vertexColors,this.opacity=e.opacity,this.transparent=e.transparent,this.blendSrc=e.blendSrc,this.blendDst=e.blendDst,this.blendEquation=e.blendEquation,this.blendSrcAlpha=e.blendSrcAlpha,this.blendDstAlpha=e.blendDstAlpha,this.blendEquationAlpha=e.blendEquationAlpha,this.blendColor.copy(e.blendColor),this.blendAlpha=e.blendAlpha,this.depthFunc=e.depthFunc,this.depthTest=e.depthTest,this.depthWrite=e.depthWrite,this.stencilWriteMask=e.stencilWriteMask,this.stencilFunc=e.stencilFunc,this.stencilRef=e.stencilRef,this.stencilFuncMask=e.stencilFuncMask,this.stencilFail=e.stencilFail,this.stencilZFail=e.stencilZFail,this.stencilZPass=e.stencilZPass,this.stencilWrite=e.stencilWrite;let t=e.clippingPlanes,n=null;if(t!==null){let e=t.length;n=Array(e);for(let r=0;r!==e;++r)n[r]=t[r].clone()}return this.clippingPlanes=n,this.clipIntersection=e.clipIntersection,this.clipShadows=e.clipShadows,this.shadowSide=e.shadowSide,this.colorWrite=e.colorWrite,this.precision=e.precision,this.polygonOffset=e.polygonOffset,this.polygonOffsetFactor=e.polygonOffsetFactor,this.polygonOffsetUnits=e.polygonOffsetUnits,this.dithering=e.dithering,this.alphaTest=e.alphaTest,this.alphaHash=e.alphaHash,this.alphaToCoverage=e.alphaToCoverage,this.premultipliedAlpha=e.premultipliedAlpha,this.forceSinglePass=e.forceSinglePass,this.visible=e.visible,this.toneMapped=e.toneMapped,this.userData=JSON.parse(JSON.stringify(e.userData)),this}dispose(){this.dispatchEvent({type:`dispose`})}set needsUpdate(e){e===!0&&this.version++}},Uh=class extends Hh{constructor(e){super(),this.isMeshBasicMaterial=!0,this.type=`MeshBasicMaterial`,this.color=new K(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new ih,this.combine=bu,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap=`round`,this.wireframeLinejoin=`round`,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapRotation.copy(e.envMapRotation),this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.fog=e.fog,this}};const Wh=Gh();function Gh(){let e=new ArrayBuffer(4),t=new Float32Array(e),n=new Uint32Array(e),r=new Uint32Array(512),i=new Uint32Array(512);for(let e=0;e<256;++e){let t=e-127;t<-27?(r[e]=0,r[e|256]=32768,i[e]=24,i[e|256]=24):t<-14?(r[e]=1024>>-t-14,r[e|256]=1024>>-t-14|32768,i[e]=-t-1,i[e|256]=-t-1):t<=15?(r[e]=t+15<<10,r[e|256]=t+15<<10|32768,i[e]=13,i[e|256]=13):t<128?(r[e]=31744,r[e|256]=64512,i[e]=24,i[e|256]=24):(r[e]=31744,r[e|256]=64512,i[e]=13,i[e|256]=13)}let a=new Uint32Array(2048),o=new Uint32Array(64),s=new Uint32Array(64);for(let e=1;e<1024;++e){let t=e<<13,n=0;for(;!(t&8388608);)t<<=1,n-=8388608;t&=-8388609,n+=947912704,a[e]=t|n}for(let e=1024;e<2048;++e)a[e]=939524096+(e-1024<<13);for(let e=1;e<31;++e)o[e]=e<<23;o[31]=1199570944,o[32]=2147483648;for(let e=33;e<63;++e)o[e]=2147483648+(e-32<<23);o[63]=3347054592;for(let e=1;e<64;++e)e!==32&&(s[e]=1024);return{floatView:t,uint32View:n,baseTable:r,shiftTable:i,mantissaTable:a,exponentTable:o,offsetTable:s}}function Kh(e){Math.abs(e)>65504&&console.warn(`THREE.DataUtils.toHalfFloat(): Value out of range.`),e=vp(e,-65504,65504),Wh.floatView[0]=e;let t=Wh.uint32View[0],n=t>>23&511;return Wh.baseTable[n]+((t&8388607)>>Wh.shiftTable[n])}function qh(e){let t=e>>10;return Wh.uint32View[0]=Wh.mantissaTable[Wh.offsetTable[t]+(e&1023)]+Wh.exponentTable[t],Wh.floatView[0]}var Jh=class{static toHalfFloat(e){return Kh(e)}static fromHalfFloat(e){return qh(e)}};const Yh=new W,Xh=new U;let Zh=0;var Qh=class{constructor(e,t,n=!1){if(Array.isArray(e))throw TypeError(`THREE.BufferAttribute: array should be a Typed Array.`);this.isBufferAttribute=!0,Object.defineProperty(this,`id`,{value:Zh++}),this.name=``,this.array=e,this.itemSize=t,this.count=e===void 0?0:e.length/t,this.normalized=n,this.usage=Xf,this.updateRanges=[],this.gpuType=id,this.version=0}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}setUsage(e){return this.usage=e,this}addUpdateRange(e,t){this.updateRanges.push({start:e,count:t})}clearUpdateRanges(){this.updateRanges.length=0}copy(e){return this.name=e.name,this.array=new e.array.constructor(e.array),this.itemSize=e.itemSize,this.count=e.count,this.normalized=e.normalized,this.usage=e.usage,this.gpuType=e.gpuType,this}copyAt(e,t,n){e*=this.itemSize,n*=t.itemSize;for(let r=0,i=this.itemSize;rt.count&&console.warn(`THREE.BufferGeometry: Buffer size too small for points data. Use .dispose() and create a new geometry.`),t.needsUpdate=!0}return this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new Sm);let e=this.attributes.position,t=this.morphAttributes.position;if(e&&e.isGLBufferAttribute){console.error(`THREE.BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box.`,this),this.boundingBox.set(new W(-1/0,-1/0,-1/0),new W(1/0,1/0,1/0));return}if(e!==void 0){if(this.boundingBox.setFromBufferAttribute(e),t)for(let e=0,n=t.length;e0&&(e.userData=this.userData),this.parameters!==void 0){let t=this.parameters;for(let n in t)t[n]!==void 0&&(e[n]=t[n]);return e}e.data={attributes:{}};let t=this.index;t!==null&&(e.data.index={type:t.array.constructor.name,array:Array.prototype.slice.call(t.array)});let n=this.attributes;for(let t in n){let r=n[t];e.data.attributes[t]=r.toJSON(e.data)}let r={},i=!1;for(let t in this.morphAttributes){let n=this.morphAttributes[t],a=[];for(let t=0,r=n.length;t0&&(r[t]=a,i=!0)}i&&(e.data.morphAttributes=r,e.data.morphTargetsRelative=this.morphTargetsRelative);let a=this.groups;a.length>0&&(e.data.groups=JSON.parse(JSON.stringify(a)));let o=this.boundingSphere;return o!==null&&(e.data.boundingSphere=o.toJSON()),e}clone(){return new this.constructor().copy(this)}copy(e){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;let t={};this.name=e.name;let n=e.index;n!==null&&this.setIndex(n.clone());let r=e.attributes;for(let e in r){let n=r[e];this.setAttribute(e,n.clone(t))}let i=e.morphAttributes;for(let e in i){let n=[],r=i[e];for(let e=0,i=r.length;e0){let e=t[n[0]];if(e!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let t=0,n=e.length;t(e.far-e.near)**2))&&(hg.copy(i).invert(),gg.copy(e.ray).applyMatrix4(hg),!(n.boundingBox!==null&&gg.intersectsBox(n.boundingBox)===!1)&&this._computeIntersections(e,t,gg)))}_computeIntersections(e,t,n){let r,i=this.geometry,a=this.material,o=i.index,s=i.attributes.position,c=i.attributes.uv,l=i.attributes.uv1,u=i.attributes.normal,d=i.groups,f=i.drawRange;if(o!==null)if(Array.isArray(a))for(let i=0,s=d.length;in.far?null:{distance:l,point:Tg.clone(),object:e}}function Og(e,t,n,r,i,a,o,s,c,l){e.getVertexPosition(s,yg),e.getVertexPosition(c,bg),e.getVertexPosition(l,xg);let u=Dg(e,t,n,r,yg,bg,xg,wg);if(u){let e=new W;Fh.getBarycoord(wg,yg,bg,xg,e),i&&(u.uv=Fh.getInterpolatedAttribute(i,s,c,l,e,new U)),a&&(u.uv1=Fh.getInterpolatedAttribute(a,s,c,l,e,new U)),o&&(u.normal=Fh.getInterpolatedAttribute(o,s,c,l,e,new W),u.normal.dot(r.direction)>0&&u.normal.multiplyScalar(-1));let t={a:s,b:c,c:l,normal:new W,materialIndex:0};Fh.getNormal(yg,bg,xg,t.normal),u.face=t,u.barycoord=e}return u}var kg=class e extends mg{constructor(e=1,t=1,n=1,r=1,i=1,a=1){super(),this.type=`BoxGeometry`,this.parameters={width:e,height:t,depth:n,widthSegments:r,heightSegments:i,depthSegments:a};let o=this;r=Math.floor(r),i=Math.floor(i),a=Math.floor(a);let s=[],c=[],l=[],u=[],d=0,f=0;p(`z`,`y`,`x`,-1,-1,n,t,e,a,i,0),p(`z`,`y`,`x`,1,-1,n,t,-e,a,i,1),p(`x`,`z`,`y`,1,1,e,n,t,r,a,2),p(`x`,`z`,`y`,1,-1,e,n,-t,r,a,3),p(`x`,`y`,`z`,1,-1,e,t,n,r,i,4),p(`x`,`y`,`z`,-1,-1,e,t,-n,r,i,5),this.setIndex(s),this.setAttribute(`position`,new q(c,3)),this.setAttribute(`normal`,new q(l,3)),this.setAttribute(`uv`,new q(u,2));function p(e,t,n,r,i,a,p,m,h,g,_){let v=a/h,y=p/g,b=a/2,x=p/2,S=m/2,C=h+1,w=g+1,T=0,E=0,D=new W;for(let a=0;a0?1:-1,l.push(D.x,D.y,D.z),u.push(s/h),u.push(1-a/g),T+=1}}for(let e=0;eS({name:e.name},t,{setup:e}))():e}function zr(){let e=Ao();return e?(e.appContext.config.idPrefix||`v`)+`-`+e.ids[0]+ e.ids[1]++:``}function Br(e){e.ids=[e.ids[0]+ e.ids[2]+++`-`,0,0]}function Vr(e,t,n,r,i=!1){if(E(e)){e.forEach((e,a)=>Vr(e,t&&(E(t)?t[a]:t),n,r,i));return}if(Wr(r)&&!i){r.shapeFlag&512&&r.type.__asyncResolved&&r.component.subTree.component&&Vr(e,t,n,r.component.subTree);return}let a=r.shapeFlag&4?Go(r.component):r.el,o=i?null:a,{i:s,r:c}=e,l=t&&t.r,u=s.refs===g?s.refs={}:s.refs,d=s.setupState,f=ln(d),p=d===g?()=>!1:e=>T(f,e);if(l!=null&&l!==c&&(j(l)?(u[l]=null,p(l)&&(d[l]=null)):pn(l)&&(l.value=null)),A(c))Fn(c,s,12,[o,u]);else{let t=j(c),r=pn(c);if(t||r){let s=()=>{if(e.f){let n=t?p(c)?d[c]:u[c]:c.value;i?E(n)&&C(n,a):E(n)?n.includes(a)||n.push(a):t?(u[c]=[a],p(c)&&(d[c]=u[c])):(c.value=[a],e.k&&(u[e.k]=c.value))}else t?(u[c]=o,p(c)&&(d[c]=o)):r&&(c.value=o,e.k&&(u[e.k]=o))};o?(s.id=-1,va(s,n)):s()}}}const Hr=_e().requestIdleCallback||(e=>setTimeout(e,1)),Ur=_e().cancelIdleCallback||(e=>clearTimeout(e)),Wr=e=>!!e.type.__asyncLoader,Gr=e=>e.type.__isKeepAlive;function Kr(e,t){Jr(e,`a`,t)}function qr(e,t){Jr(e,`da`,t)}function Jr(e,t,n=ko){let r=e.__wdc||=()=>{let t=n;for(;t;){if(t.isDeactivated)return;t=t.parent}return e()};if(Xr(t,r,n),n){let e=n.parent;for(;e&&e.parent;)Gr(e.parent.vnode)&&Yr(r,t,n,e),e=e.parent}}function Yr(e,t,n,r){let i=Xr(t,e,r,!0);ri(()=>{C(r[t],i)},n)}function Xr(e,t,n=ko,r=!1){if(n){let i=n[e]||(n[e]=[]),a=t.__weh||=(...r)=>{it();let i=No(n),a=In(t,n,e,r);return i(),at(),a};return r?i.unshift(a):i.push(a),a}}const Zr=e=>(t,n=ko)=>{(!Io||e===`sp`)&&Xr(e,(...e)=>t(...e),n)},Qr=Zr(`bm`),$r=Zr(`m`),ei=Zr(`bu`),ti=Zr(`u`),ni=Zr(`bum`),ri=Zr(`um`),ii=Zr(`sp`),ai=Zr(`rtg`),oi=Zr(`rtc`);function si(e,t=ko){Xr(`ec`,e,t)}const ci=`components`,li=`directives`;function ui(e,t){return mi(ci,e,!0,t)||e}const di=Symbol.for(`v-ndc`);function fi(e){return j(e)?mi(ci,e,!1)||e:e||di}function pi(e){return mi(li,e)}function mi(e,t,n=!0,r=!1){let i=tr||ko;if(i){let n=i.type;if(e===ci){let e=Ko(n,!1);if(e&&(e===t||e===ce(t)||e===de(ce(t))))return n}let a=hi(i[e]||n[e],t)||hi(i.appContext[e],t);return!a&&r?n:a}}function hi(e,t){return e&&(e[t]||e[ce(t)]||e[de(ce(t))])}function gi(e,t,n,r){let i,a=n&&n[r],o=E(e);if(o||j(e)){let n=o&&an(e),r=!1,s=!1;n&&(r=!sn(e),s=on(e),e=yt(e)),i=Array(e.length);for(let n=0,o=e.length;nt(e,n,void 0,a&&a[n]));else{let n=Object.keys(e);i=Array(n.length);for(let r=0,o=n.length;rco(e)?!(e.type===Za||e.type===Ya&&!vi(e.children)):!0)?e:null}function yi(e,t){let n={};for(let r in e)n[t&&/[A-Z]/.test(r)?`on:${r}`:fe(r)]=e[r];return n}const bi=e=>e?Fo(e)?Go(e):bi(e.parent):null,xi=S(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>bi(e.parent),$root:e=>bi(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>Ii(e),$forceUpdate:e=>e.f||=()=>{Jn(e.update)},$nextTick:e=>e.n||=Kn.bind(e.proxy),$watch:e=>Pa.bind(e)}),Si=(e,t)=>e!==g&&!e.__isScriptSetup&&T(e,t),Ci={get({_:e},t){if(t===`__v_skip`)return!0;let{ctx:n,setupState:r,data:i,props:a,accessCache:o,type:s,appContext:c}=e,l;if(t[0]!==`$`){let s=o[t];if(s!==void 0)switch(s){case 1:return r[t];case 2:return i[t];case 4:return n[t];case 3:return a[t]}else if(Si(r,t))return o[t]=1,r[t];else if(i!==g&&T(i,t))return o[t]=2,i[t];else if((l=e.propsOptions[0])&&T(l,t))return o[t]=3,a[t];else if(n!==g&&T(n,t))return o[t]=4,n[t];else ji&&(o[t]=0)}let u=xi[t],d,f;if(u)return t===`$attrs`&&ht(e.attrs,`get`,``),u(e);if((d=s.__cssModules)&&(d=d[t]))return d;if(n!==g&&T(n,t))return o[t]=4,n[t];if(f=c.config.globalProperties,T(f,t))return f[t]},set({_:e},t,n){let{data:r,setupState:i,ctx:a}=e;return Si(i,t)?(i[t]=n,!0):r!==g&&T(r,t)?(r[t]=n,!0):T(e.props,t)||t[0]===`$`&&t.slice(1)in e?!1:(a[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:r,appContext:i,propsOptions:a}},o){let s;return!!n[o]||e!==g&&T(e,o)||Si(t,o)||(s=a[0])&&T(s,o)||T(r,o)||T(xi,o)||T(i.config.globalProperties,o)},defineProperty(e,t,n){return n.get==null?T(n,`value`)&&this.set(e,t,n.value,null):e._.accessCache[t]=0,Reflect.defineProperty(e,t,n)}};function wi(){return Ei().slots}function Ti(){return Ei().attrs}function Ei(){let e=Ao();return e.setupContext||=Wo(e)}function Di(e){return E(e)?e.reduce((e,t)=>(e[t]=null,e),{}):e}function Oi(e,t){let n=Di(e);for(let e in t){if(e.startsWith(`__skip`))continue;let r=n[e];r?E(r)||A(r)?r=n[e]={type:r,default:t[e]}:r.default=t[e]:r===null&&(r=n[e]={default:t[e]}),r&&t[`__skip_${e}`]&&(r.skipFactory=!0)}return n}function ki(e,t){return!e||!t?e||t:E(e)&&E(t)?e.concat(t):S({},Di(e),Di(t))}function Ai(e){let t=Ao(),n=e();return Po(),ee(n)&&(n=n.catch(e=>{throw No(t),e})),[n,()=>No(t)]}let ji=!0;function Mi(e){let t=Ii(e),n=e.proxy,r=e.ctx;ji=!1,t.beforeCreate&&Pi(t.beforeCreate,e,`bc`);let{data:i,computed:a,methods:o,watch:s,provide:c,inject:l,created:u,beforeMount:d,mounted:f,beforeUpdate:p,updated:m,activated:h,deactivated:g,beforeDestroy:_,beforeUnmount:y,destroyed:b,unmounted:x,render:S,renderTracked:C,renderTriggered:w,errorCaptured:T,serverPrefetch:D,expose:O,inheritAttrs:k,components:j,directives:M,filters:ee}=t,te=null;if(l&&Ni(l,r,te),o)for(let e in o){let t=o[e];A(t)&&(r[e]=t.bind(n))}if(i){let t=i.call(n,n);N(t)&&(e.data=$t(t))}if(ji=!0,a)for(let e in a){let t=a[e],i=A(t)?t.bind(n,n):A(t.get)?t.get.bind(n,n):v,o=!A(t)&&A(t.set)?t.set.bind(n):v,s=H({get:i,set:o});Object.defineProperty(r,e,{enumerable:!0,configurable:!0,get:()=>s.value,set:e=>s.value=e})}if(s)for(let e in s)Fi(s[e],r,n,e);if(c){let e=A(c)?c.call(n):c;Reflect.ownKeys(e).forEach(t=>{Xi(t,e[t])})}u&&Pi(u,e,`c`);function P(e,t){E(t)?t.forEach(t=>e(t.bind(n))):t&&e(t.bind(n))}if(P(Qr,d),P($r,f),P(ei,p),P(ti,m),P(Kr,h),P(qr,g),P(si,T),P(oi,C),P(ai,w),P(ni,y),P(ri,x),P(ii,D),E(O))if(O.length){let t=e.exposed||={};O.forEach(e=>{Object.defineProperty(t,e,{get:()=>n[e],set:t=>n[e]=t})})}else e.exposed||={};S&&e.render===v&&(e.render=S),k!=null&&(e.inheritAttrs=k),j&&(e.components=j),M&&(e.directives=M),D&&Br(e)}function Ni(e,t,n=v){for(let n in E(e)&&(e=Vi(e)),e){let r=e[n],i;i=N(r)?`default`in r?Zi(r.from||n,r.default,!0):Zi(r.from||n):Zi(r),pn(i)?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>i.value,set:e=>i.value=e}):t[n]=i}}function Pi(e,t,n){In(E(e)?e.map(e=>e.bind(t.proxy)):e.bind(t.proxy),t,n)}function Fi(e,t,n,r){let i=r.includes(`.`)?Fa(n,r):()=>n[r];if(j(e)){let n=t[e];A(n)&&V(i,n)}else if(A(e))V(i,e.bind(n));else if(N(e))if(E(e))e.forEach(e=>Fi(e,t,n,r));else{let r=A(e.handler)?e.handler.bind(n):t[e.handler];A(r)&&V(i,r,e)}}function Ii(e){let t=e.type,{mixins:n,extends:r}=t,{mixins:i,optionsCache:a,config:{optionMergeStrategies:o}}=e.appContext,s=a.get(t),c;return s?c=s:!i.length&&!n&&!r?c=t:(c={},i.length&&i.forEach(e=>Li(c,e,o,!0)),Li(c,t,o)),N(t)&&a.set(t,c),c}function Li(e,t,n,r=!1){let{mixins:i,extends:a}=t;for(let o in a&&Li(e,a,n,!0),i&&i.forEach(t=>Li(e,t,n,!0)),t)if(!(r&&o===`expose`)){let r=Ri[o]||n&&n[o];e[o]=r?r(e[o],t[o]):t[o]}return e}const Ri={data:zi,props:Wi,emits:Wi,methods:Ui,computed:Ui,beforeCreate:Hi,created:Hi,beforeMount:Hi,mounted:Hi,beforeUpdate:Hi,updated:Hi,beforeDestroy:Hi,beforeUnmount:Hi,destroyed:Hi,unmounted:Hi,activated:Hi,deactivated:Hi,errorCaptured:Hi,serverPrefetch:Hi,components:Ui,directives:Ui,watch:Gi,provide:zi,inject:Bi};function zi(e,t){return t?e?function(){return S(A(e)?e.call(this,this):e,A(t)?t.call(this,this):t)}:t:e}function Bi(e,t){return Ui(Vi(e),Vi(t))}function Vi(e){if(E(e)){let t={};for(let n=0;n1)return n&&A(t)?t.call(r&&r.proxy):t}}function Qi(){return!!(ko||tr||Yi)}const $i={},ea=()=>Object.create($i),ta=e=>Object.getPrototypeOf(e)===$i;function na(e,t,n,r=!1){let i={},a=ea();for(let n in e.propsDefaults=Object.create(null),ia(e,t,i,a),e.propsOptions[0])n in i||(i[n]=void 0);n?e.props=r?i:en(i):e.type.props?e.props=i:e.props=a,e.attrs=a}function ra(e,t,n,r){let{props:i,attrs:a,vnode:{patchFlag:o}}=e,s=ln(i),[c]=e.propsOptions,l=!1;if((r||o>0)&&!(o&16)){if(o&8){let n=e.vnode.dynamicProps;for(let r=0;r{c=!0;let[n,r]=sa(e,t,!0);S(o,n),r&&s.push(...r)};!n&&t.mixins.length&&t.mixins.forEach(r),e.extends&&r(e.extends),e.mixins&&e.mixins.forEach(r)}if(!a&&!c)return N(e)&&r.set(e,_),_;if(E(a))for(let e=0;ee[0]===`_`||e===`$stable`,ua=e=>E(e)?e.map(xo):[xo(e)],da=(e,t,n)=>{if(t._n)return t;let r=sr((...e)=>ua(t(...e)),n);return r._c=!1,r},fa=(e,t,n)=>{let r=e._ctx;for(let n in e){if(la(n))continue;let i=e[n];if(A(i))t[n]=da(n,i,r);else if(i!=null){let e=ua(i);t[n]=()=>e}}},pa=(e,t)=>{let n=ua(t);e.slots.default=()=>n},ma=(e,t,n)=>{for(let r in t)(n||!la(r))&&(e[r]=t[r])},ha=(e,t,n)=>{let r=e.slots=ea();if(e.vnode.shapeFlag&32){let e=t.__;e&&me(r,`__`,e,!0);let i=t._;i?(ma(r,t,n),n&&me(r,`_`,i,!0)):fa(t,r)}else t&&pa(e,t)},ga=(e,t,n)=>{let{vnode:r,slots:i}=e,a=!0,o=g;if(r.shapeFlag&32){let e=t._;e?n&&e===1?a=!1:ma(i,t,n):(a=!t.$stable,fa(t,i)),o=t}else t&&(pa(e,t),o={default:1});if(a)for(let e in i)!la(e)&&o[e]==null&&delete i[e]};function _a(){let e=[]}const va=Ja;function ya(e){return ba(e)}function ba(e,t){_a();let n=_e();n.__VUE__=!0;let{insert:r,remove:i,patchProp:a,createElement:o,createText:s,createComment:c,setText:l,setElementText:u,parentNode:d,nextSibling:f,setScopeId:p=v,insertStaticContent:m}=e,h=(e,t,n,r=null,i=null,a=null,o=void 0,s=null,c=!!t.dynamicChildren)=>{if(e===t)return;e&&!lo(e,t)&&(r=me(e),le(e,i,a,!0),e=null),t.patchFlag===-2&&(c=!1,t.dynamicChildren=null);let{type:l,ref:u,shapeFlag:d}=t;switch(l){case Xa:y(e,t,n,r);break;case Za:b(e,t,n,r);break;case Qa:e??x(t,n,r,o);break;case Ya:N(e,t,n,r,i,a,o,s,c);break;default:d&1?T(e,t,n,r,i,a,o,s,c):d&6?ee(e,t,n,r,i,a,o,s,c):(d&64||d&128)&&l.process(e,t,n,r,i,a,o,s,c,I)}u!=null&&i?Vr(u,e&&e.ref,a,t||e,!t):u==null&&e&&e.ref!=null&&Vr(e.ref,null,a,e,!0)},y=(e,t,n,i)=>{if(e==null)r(t.el=s(t.children),n,i);else{let n=t.el=e.el;t.children!==e.children&&l(n,t.children)}},b=(e,t,n,i)=>{e==null?r(t.el=c(t.children||``),n,i):t.el=e.el},x=(e,t,n,r)=>{[e.el,e.anchor]=m(e.children,t,n,r,e.el,e.anchor)},S=(e,t,n,r)=>{if(t.children!==e.children){let i=f(e.anchor);w(e),[t.el,t.anchor]=m(t.children,n,i,r)}else t.el=e.el,t.anchor=e.anchor},C=({el:e,anchor:t},n,i)=>{let a;for(;e&&e!==t;)a=f(e),r(e,n,i),e=a;r(t,n,i)},w=({el:e,anchor:t})=>{let n;for(;e&&e!==t;)n=f(e),i(e),e=n;i(t)},T=(e,t,n,r,i,a,o,s,c)=>{t.type===`svg`?o=`svg`:t.type===`math`&&(o=`mathml`),e==null?D(t,n,r,i,a,o,s,c):A(e,t,i,a,o,s,c)},D=(e,t,n,i,s,c,l,d)=>{let f,p,{props:m,shapeFlag:h,transition:g,dirs:_}=e;if(f=e.el=o(e.type,c,m&&m.is,m),h&8?u(f,e.children):h&16&&k(e.children,f,null,i,s,xa(e,c),l,d),_&&lr(e,null,i,`created`),O(f,e,e.scopeId,l,i),m){for(let e in m)e!==`value`&&!ae(e)&&a(f,e,null,m[e],c,i);`value`in m&&a(f,`value`,null,m.value,c),(p=m.onVnodeBeforeMount)&&To(p,i,e)}_&&lr(e,null,i,`beforeMount`);let v=Ca(s,g);v&&g.beforeEnter(f),r(f,t,n),((p=m&&m.onVnodeMounted)||v||_)&&va(()=>{p&&To(p,i,e),v&&g.enter(f),_&&lr(e,null,i,`mounted`)},s)},O=(e,t,n,r,i)=>{if(n&&p(e,n),r)for(let t=0;t{for(let l=c;l{let c=t.el=e.el,{patchFlag:l,dynamicChildren:d,dirs:f}=t;l|=e.patchFlag&16;let p=e.props||g,m=t.props||g,h;if(n&&Sa(n,!1),(h=m.onVnodeBeforeUpdate)&&To(h,n,t,e),f&&lr(t,e,n,`beforeUpdate`),n&&Sa(n,!0),(p.innerHTML&&m.innerHTML==null||p.textContent&&m.textContent==null)&&u(c,``),d?j(e.dynamicChildren,d,c,n,r,xa(t,i),o):s||ie(e,t,c,null,n,r,xa(t,i),o,!1),l>0){if(l&16)M(c,p,m,n,i);else if(l&2&&p.class!==m.class&&a(c,`class`,null,m.class,i),l&4&&a(c,`style`,p.style,m.style,i),l&8){let e=t.dynamicProps;for(let t=0;t{h&&To(h,n,t,e),f&&lr(t,e,n,`updated`)},r)},j=(e,t,n,r,i,a,o)=>{for(let s=0;s{if(t!==n){if(t!==g)for(let o in t)!ae(o)&&!(o in n)&&a(e,o,t[o],null,i,r);for(let o in n){if(ae(o))continue;let s=n[o],c=t[o];s!==c&&o!==`value`&&a(e,o,c,s,i,r)}`value`in n&&a(e,`value`,t.value,n.value,i)}},N=(e,t,n,i,a,o,c,l,u)=>{let d=t.el=e?e.el:s(``),f=t.anchor=e?e.anchor:s(``),{patchFlag:p,dynamicChildren:m,slotScopeIds:h}=t;h&&(l=l?l.concat(h):h),e==null?(r(d,n,i),r(f,n,i),k(t.children||[],n,f,a,o,c,l,u)):p>0&&p&64&&m&&e.dynamicChildren?(j(e.dynamicChildren,m,n,a,o,c,l),(t.key!=null||a&&t===a.subTree)&&wa(e,t,!0)):ie(e,t,n,f,a,o,c,l,u)},ee=(e,t,n,r,i,a,o,s,c)=>{t.slotScopeIds=s,e==null?t.shapeFlag&512?i.ctx.activate(t,n,r,o,c):te(t,n,r,i,a,o,c):P(e,t,c)},te=(e,t,n,r,i,a,o)=>{let s=e.component=Oo(e,r,i);if(Gr(e)&&(s.ctx.renderer=I),Lo(s,!1,o),s.asyncDep){if(i&&i.registerDep(s,ne,o),!e.el){let e=s.subTree=mo(Za);b(null,e,t,n)}}else ne(s,e,t,n,i,a,o)},P=(e,t,n)=>{let r=t.component=e.component;if(Wa(e,t,n))if(r.asyncDep&&!r.asyncResolved){re(r,t,n);return}else r.next=t,r.update();else t.el=e.el,r.vnode=t},ne=(e,t,n,r,i,a,o)=>{let s=()=>{if(e.isMounted){let{next:t,bu:n,u:r,parent:c,vnode:l}=e;{let n=Ea(e);if(n){t&&(t.el=l.el,re(e,t,o)),n.asyncDep.then(()=>{e.isUnmounted||s()});return}}let u=t,f;Sa(e,!1),t?(t.el=l.el,re(e,t,o)):t=l,n&&F(n),(f=t.props&&t.props.onVnodeBeforeUpdate)&&To(f,c,t,l),Sa(e,!0);let p=Va(e),m=e.subTree;e.subTree=p,h(m,p,d(m.el),me(m),e,i,a),t.el=p.el,u===null&&Ka(e,p.el),r&&va(r,i),(f=t.props&&t.props.onVnodeUpdated)&&va(()=>To(f,c,t,l),i)}else{let o,{el:s,props:c}=t,{bm:l,m:u,parent:d,root:f,type:p}=e,m=Wr(t);if(Sa(e,!1),l&&F(l),!m&&(o=c&&c.onVnodeBeforeMount)&&To(o,d,t),Sa(e,!0),s&&ve){let t=()=>{e.subTree=Va(e),ve(s,e.subTree,e,i,null)};m&&p.__asyncHydrate?p.__asyncHydrate(s,e,t):t()}else{f.ce&&f.ce._def.shadowRoot!==!1&&f.ce._injectChildStyle(p);let o=e.subTree=Va(e);h(null,o,n,r,e,i,a),t.el=o.el}if(u&&va(u,i),!m&&(o=c&&c.onVnodeMounted)){let e=t;va(()=>To(o,d,e),i)}(t.shapeFlag&256||d&&Wr(d.vnode)&&d.vnode.shapeFlag&256)&&e.a&&va(e.a,i),e.isMounted=!0,t=n=r=null}};e.scope.on();let c=e.effect=new Ue(s);e.scope.off();let l=e.update=c.run.bind(c),u=e.job=c.runIfDirty.bind(c);u.i=e,u.id=e.uid,c.scheduler=()=>Jn(u),Sa(e,!0),l()},re=(e,t,n)=>{t.component=e;let r=e.vnode.props;e.vnode=t,e.next=null,ra(e,t.props,r,n),ga(e,t.children,n),it(),Zn(e),at()},ie=(e,t,n,r,i,a,o,s,c=!1)=>{let l=e&&e.children,d=e?e.shapeFlag:0,f=t.children,{patchFlag:p,shapeFlag:m}=t;if(p>0){if(p&128){se(l,f,n,r,i,a,o,s,c);return}else if(p&256){oe(l,f,n,r,i,a,o,s,c);return}}m&8?(d&16&&pe(l,i,a),f!==l&&u(n,f)):d&16?m&16?se(l,f,n,r,i,a,o,s,c):pe(l,i,a,!0):(d&8&&u(n,``),m&16&&k(f,n,r,i,a,o,s,c))},oe=(e,t,n,r,i,a,o,s,c)=>{e||=_,t||=_;let l=e.length,u=t.length,d=Math.min(l,u),f;for(f=0;fu?pe(e,i,a,!0,!1,d):k(t,n,r,i,a,o,s,c,d)},se=(e,t,n,r,i,a,o,s,c)=>{let l=0,u=t.length,d=e.length-1,f=u-1;for(;l<=d&&l<=f;){let r=e[l],u=t[l]=c?So(t[l]):xo(t[l]);if(lo(r,u))h(r,u,n,null,i,a,o,s,c);else break;l++}for(;l<=d&&l<=f;){let r=e[d],l=t[f]=c?So(t[f]):xo(t[f]);if(lo(r,l))h(r,l,n,null,i,a,o,s,c);else break;d--,f--}if(l>d){if(l<=f){let e=f+1,d=ef)for(;l<=d;)le(e[l],i,a,!0),l++;else{let p=l,m=l,g=new Map;for(l=m;l<=f;l++){let e=t[l]=c?So(t[l]):xo(t[l]);e.key!=null&&g.set(e.key,l)}let v,y=0,b=f-m+1,x=!1,S=0,C=Array(b);for(l=0;l=b){le(r,i,a,!0);continue}let u;if(r.key!=null)u=g.get(r.key);else for(v=m;v<=f;v++)if(C[v-m]===0&&lo(r,t[v])){u=v;break}u===void 0?le(r,i,a,!0):(C[u-m]=l+1,u>=S?S=u:x=!0,h(r,t[u],n,null,i,a,o,s,c),y++)}let w=x?Ta(C):_;for(v=w.length-1,l=b-1;l>=0;l--){let e=m+l,d=t[e],f=e+1{let{el:s,type:c,transition:l,children:u,shapeFlag:d}=e;if(d&6){ce(e.component.subTree,t,n,a);return}if(d&128){e.suspense.move(t,n,a);return}if(d&64){c.move(e,t,n,I);return}if(c===Ya){r(s,t,n);for(let e=0;el.enter(s),o);else{let{leave:a,delayLeave:o,afterLeave:c}=l,u=()=>{e.ctx.isUnmounted?i(s):r(s,t,n)},d=()=>{a(s,()=>{u(),c&&c()})};o?o(s,u,d):d()}else r(s,t,n)},le=(e,t,n,r=!1,i=!1)=>{let{type:a,props:o,ref:s,children:c,dynamicChildren:l,shapeFlag:u,patchFlag:d,dirs:f,cacheIndex:p}=e;if(d===-2&&(i=!1),s!=null&&(it(),Vr(s,null,n,e,!0),at()),p!=null&&(t.renderCache[p]=void 0),u&256){t.ctx.deactivate(e);return}let m=u&1&&f,h=!Wr(e),g;if(h&&(g=o&&o.onVnodeBeforeUnmount)&&To(g,t,e),u&6)fe(e.component,n,r);else{if(u&128){e.suspense.unmount(n,r);return}m&&lr(e,null,t,`beforeUnmount`),u&64?e.type.remove(e,t,n,I,r):l&&!l.hasOnce&&(a!==Ya||d>0&&d&64)?pe(l,t,n,!1,!0):(a===Ya&&d&384||!i&&u&16)&&pe(c,t,n),r&&ue(e)}(h&&(g=o&&o.onVnodeUnmounted)||m)&&va(()=>{g&&To(g,t,e),m&&lr(e,null,t,`unmounted`)},n)},ue=e=>{let{type:t,el:n,anchor:r,transition:a}=e;if(t===Ya){de(n,r);return}if(t===Qa){w(e);return}let o=()=>{i(n),a&&!a.persisted&&a.afterLeave&&a.afterLeave()};if(e.shapeFlag&1&&a&&!a.persisted){let{leave:t,delayLeave:r}=a,i=()=>t(n,o);r?r(e.el,o,i):i()}else o()},de=(e,t)=>{let n;for(;e!==t;)n=f(e),i(e),e=n;i(t)},fe=(e,t,n)=>{let{bum:r,scope:i,job:a,subTree:o,um:s,m:c,a:l,parent:u,slots:{__:d}}=e;Da(c),Da(l),r&&F(r),u&&E(d)&&d.forEach(e=>{u.renderCache[e]=void 0}),i.stop(),a&&(a.flags|=8,le(o,e,t,n)),s&&va(s,t),va(()=>{e.isUnmounted=!0},t),t&&t.pendingBranch&&!t.isUnmounted&&e.asyncDep&&!e.asyncResolved&&e.suspenseId===t.pendingId&&(t.deps--,t.deps===0&&t.resolve())},pe=(e,t,n,r=!1,i=!1,a=0)=>{for(let o=a;o{if(e.shapeFlag&6)return me(e.component.subTree);if(e.shapeFlag&128)return e.suspense.next();let t=f(e.anchor||e.el),n=t&&t[ur];return n?f(n):t},he=!1,ge=(e,t,n)=>{e==null?t._vnode&&le(t._vnode,null,null,!0):h(t._vnode||null,e,t,null,null,null,n),t._vnode=e,he||(he=!0,Zn(),Qn(),he=!1)},I={p:h,um:le,m:ce,r:ue,mt:te,mc:k,pc:ie,pbc:j,n:me,o:e},L,ve;return t&&([L,ve]=t(I)),{render:ge,hydrate:L,createApp:Ji(ge,L)}}function xa({type:e,props:t},n){return n===`svg`&&e===`foreignObject`||n===`mathml`&&e===`annotation-xml`&&t&&t.encoding&&t.encoding.includes(`html`)?void 0:n}function Sa({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function Ca(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function wa(e,t,n=!1){let r=e.children,i=t.children;if(E(r)&&E(i))for(let e=0;e>1,e[n[s]]0&&(t[r]=n[a-1]),n[a]=r)}}for(a=n.length,o=n[a-1];a-- >0;)n[a]=o,o=t[o];return n}function Ea(e){let t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Ea(t)}function Da(e){if(e)for(let t=0;t{{let e=Zi(Oa);return e}};function Aa(e,t){return Na(e,null,t)}function ja(e,t){return Na(e,null,{flush:`post`})}function Ma(e,t){return Na(e,null,{flush:`sync`})}function V(e,t,n){return Na(e,t,n)}function Na(e,t,n=g){let{immediate:r,deep:i,flush:a,once:o}=n,s=S({},n),c=t&&r||!t&&a!==`post`,l;if(Io){if(a===`sync`){let e=ka();l=e.__watcherHandles||=[]}else if(!c){let e=()=>{};return e.stop=v,e.resume=v,e.pause=v,e}}let u=ko;s.call=(e,t,n)=>In(e,u,t,n);let d=!1;a===`post`?s.scheduler=e=>{va(e,u&&u.suspense)}:a!==`sync`&&(d=!0,s.scheduler=(e,t)=>{t?e():Jn(e)}),s.augmentJob=e=>{t&&(e.flags|=4),d&&(e.flags|=2,u&&(e.id=u.uid,e.i=u))};let f=Nn(e,t,s);return Io&&(l?l.push(f):c&&f()),f}function Pa(e,t,n){let r=this.proxy,i=j(e)?e.includes(`.`)?Fa(r,e):()=>r[e]:e.bind(r,r),a;A(t)?a=t:(a=t.handler,n=t);let o=No(this),s=Na(i,a.bind(r),n);return o(),s}function Fa(e,t){let n=t.split(`.`);return()=>{let t=e;for(let e=0;e{let c,l=g,u;return Ma(()=>{let t=e[i];pe(c,t)&&(c=t,s())}),{get(){return o(),n.get?n.get(c):c},set(e){let o=n.set?n.set(e):e;if(!pe(o,c)&&!(l!==g&&pe(e,l)))return;let d=r.vnode.props;d&&(t in d||i in d||a in d)&&(`onUpdate:${t}`in d||`onUpdate:${i}`in d||`onUpdate:${a}`in d)||(c=e,s()),r.emit(`update:${t}`,o),pe(e,o)&&pe(e,l)&&!pe(o,u)&&s(),l=e,u=o}}});return s[Symbol.iterator]=()=>{let e=0;return{next(){return e<2?{value:e++?o||g:s,done:!1}:{done:!0}}}},s}const La=(e,t)=>t===`modelValue`||t===`model-value`?e.modelModifiers:e[`${t}Modifiers`]||e[`${ce(t)}Modifiers`]||e[`${ue(t)}Modifiers`];function Ra(e,t,...n){if(e.isUnmounted)return;let r=e.vnode.props||g,i=n,a=t.startsWith(`update:`),o=a&&La(r,t.slice(7));o&&(o.trim&&(i=n.map(e=>j(e)?e.trim():e)),o.number&&(i=n.map(he)));let s,c=r[s=fe(t)]||r[s=fe(ce(t))];!c&&a&&(c=r[s=fe(ue(t))]),c&&In(c,e,6,i);let l=r[s+`Once`];if(l){if(!e.emitted)e.emitted={};else if(e.emitted[s])return;e.emitted[s]=!0,In(l,e,6,i)}}function za(e,t,n=!1){let r=t.emitsCache,i=r.get(e);if(i!==void 0)return i;let a=e.emits,o={},s=!1;if(!A(e)){let r=e=>{let n=za(e,t,!0);n&&(s=!0,S(o,n))};!n&&t.mixins.length&&t.mixins.forEach(r),e.extends&&r(e.extends),e.mixins&&e.mixins.forEach(r)}return!a&&!s?(N(e)&&r.set(e,null),null):(E(a)?a.forEach(e=>o[e]=null):S(o,a),N(e)&&r.set(e,o),o)}function Ba(e,t){return!e||!b(t)?!1:(t=t.slice(2).replace(/Once$/,``),T(e,t[0].toLowerCase()+t.slice(1))||T(e,ue(t))||T(e,t))}function Va(e){let{type:t,vnode:n,proxy:r,withProxy:i,propsOptions:[a],slots:o,attrs:s,emit:c,render:l,renderCache:u,props:d,data:f,setupState:p,ctx:m,inheritAttrs:h}=e,g=rr(e),_,v;try{if(n.shapeFlag&4){let e=i||r,t=e;_=xo(l.call(t,e,u,d,p,f,m)),v=s}else{let e=t;_=xo(e.length>1?e(d,{attrs:s,slots:o,emit:c}):e(d,null)),v=t.props?s:Ha(s)}}catch(t){$a.length=0,Ln(t,e,1),_=mo(Za)}let y=_,b;if(v&&h!==!1){let e=Object.keys(v),{shapeFlag:t}=y;e.length&&t&7&&(a&&e.some(x)&&(v=Ua(v,a)),y=_o(y,v,!1,!0))}return n.dirs&&(y=_o(y,null,!1,!0),y.dirs=y.dirs?y.dirs.concat(n.dirs):n.dirs),n.transition&&Ir(y,n.transition),_=y,rr(g),_}const Ha=e=>{let t;for(let n in e)(n===`class`||n===`style`||b(n))&&((t||={})[n]=e[n]);return t},Ua=(e,t)=>{let n={};for(let r in e)(!x(r)||!(r.slice(9)in t))&&(n[r]=e[r]);return n};function Wa(e,t,n){let{props:r,children:i,component:a}=e,{props:o,children:s,patchFlag:c}=t,l=a.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&c>=0){if(c&1024)return!0;if(c&16)return r?Ga(r,o,l):!!o;if(c&8){let e=t.dynamicProps;for(let t=0;te.__isSuspense;function Ja(e,t){t&&t.pendingBranch?E(e)?t.effects.push(...e):t.effects.push(e):Xn(e)}const Ya=Symbol.for(`v-fgt`),Xa=Symbol.for(`v-txt`),Za=Symbol.for(`v-cmt`),Qa=Symbol.for(`v-stc`),$a=[];let eo=null;function to(e=!1){$a.push(eo=e?null:[])}function no(){$a.pop(),eo=$a[$a.length-1]||null}let ro=1;function io(e,t=!1){ro+=e,e<0&&eo&&t&&(eo.hasOnce=!0)}function ao(e){return e.dynamicChildren=ro>0?eo||_:null,no(),ro>0&&eo&&eo.push(e),e}function oo(e,t,n,r,i,a){return ao(po(e,t,n,r,i,a,!0))}function so(e,t,n,r,i){return ao(mo(e,t,n,r,i,!0))}function co(e){return e?e.__v_isVNode===!0:!1}function lo(e,t){return e.type===t.type&&e.key===t.key}const uo=({key:e})=>e??null,fo=({ref:e,ref_key:t,ref_for:n})=>(typeof e==`number`&&(e=``+e),e==null?null:j(e)||pn(e)||A(e)?{i:tr,r:e,k:t,f:!!n}:e);function po(e,t=null,n=null,r=0,i=null,a=e===Ya?0:1,o=!1,s=!1){let c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&uo(t),ref:t&&fo(t),scopeId:nr,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:a,patchFlag:r,dynamicProps:i,dynamicChildren:null,appContext:null,ctx:tr};return s?(Co(c,n),a&128&&e.normalize(c)):n&&(c.shapeFlag|=j(n)?8:16),ro>0&&!o&&eo&&(c.patchFlag>0||a&6)&&c.patchFlag!==32&&eo.push(c),c}const mo=ho;function ho(e,t=null,n=null,r=0,i=null,a=!1){if((!e||e===di)&&(e=Za),co(e)){let r=_o(e,t,!0);return n&&Co(r,n),ro>0&&!a&&eo&&(r.shapeFlag&6?eo[eo.indexOf(e)]=r:eo.push(r)),r.patchFlag=-2,r}if(qo(e)&&(e=e.__vccOpts),t){t=go(t);let{class:e,style:n}=t;e&&!j(e)&&(t.class=Se(e)),N(n)&&(cn(n)&&!E(n)&&(n=S({},n)),t.style=L(n))}let o=j(e)?1:qa(e)?128:dr(e)?64:N(e)?4:A(e)?2:0;return po(e,t,n,r,i,o,a,!0)}function go(e){return e?cn(e)||ta(e)?S({},e):e:null}function _o(e,t,n=!1,r=!1){let{props:i,ref:a,patchFlag:o,children:s,transition:c}=e,l=t?wo(i||{},t):i,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:l,key:l&&uo(l),ref:t&&t.ref?n&&a?E(a)?a.concat(fo(t)):[a,fo(t)]:fo(t):a,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:s,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==Ya?o===-1?16:o|16:o,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:c,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&_o(e.ssContent),ssFallback:e.ssFallback&&_o(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return c&&r&&Ir(u,c.clone(u)),u}function vo(e=` `,t=0){return mo(Xa,null,e,t)}function yo(e,t){let n=mo(Qa,null,e);return n.staticCount=t,n}function bo(e=``,t=!1){return t?(to(),so(Za,null,e)):mo(Za,null,e)}function xo(e){return e==null||typeof e==`boolean`?mo(Za):E(e)?mo(Ya,null,e.slice()):co(e)?So(e):mo(Xa,null,String(e))}function So(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:_o(e)}function Co(e,t){let n=0,{shapeFlag:r}=e;if(t==null)t=null;else if(E(t))n=16;else if(typeof t==`object`)if(r&65){let n=t.default;n&&(n._c&&(n._d=!1),Co(e,n()),n._c&&(n._d=!0));return}else{n=32;let r=t._;!r&&!ta(t)?t._ctx=tr:r===3&&tr&&(tr.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else A(t)?(t={default:t,_ctx:tr},n=32):(t=String(t),r&64?(n=16,t=[vo(t)]):n=8);e.children=t,e.shapeFlag|=n}function wo(...e){let t={};for(let n=0;nko||tr;let jo,Mo;{let e=_e(),t=(t,n)=>{let r;return(r=e[t])||(r=e[t]=[]),r.push(n),e=>{r.length>1?r.forEach(t=>t(e)):r[0](e)}};jo=t(`__VUE_INSTANCE_SETTERS__`,e=>ko=e),Mo=t(`__VUE_SSR_SETTERS__`,e=>Io=e)}const No=e=>{let t=ko;return jo(e),e.scope.on(),()=>{e.scope.off(),jo(t)}},Po=()=>{ko&&ko.scope.off(),jo(null)};function Fo(e){return e.vnode.shapeFlag&4}let Io=!1;function Lo(e,t=!1,n=!1){t&&Mo(t);let{props:r,children:i}=e.vnode,a=Fo(e);na(e,r,a,t),ha(e,i,n||t);let o=a?Ro(e,t):void 0;return t&&Mo(!1),o}function Ro(e,t){var n;let r=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Ci);let{setup:i}=r;if(i){it();let n=e.setupContext=i.length>1?Wo(e):null,r=No(e),a=Fn(i,e,0,[e.props,n]),o=ee(a);if(at(),r(),(o||e.sp)&&!Wr(e)&&Br(e),o){if(a.then(Po,Po),t)return a.then(n=>{zo(e,n,t)}).catch(t=>{Ln(t,e,0)});e.asyncDep=a}else zo(e,a,t)}else Ho(e,t)}function zo(e,t,n){A(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:N(t)&&(e.setupState=yn(t)),Ho(e,n)}let Bo,Vo;function Ho(e,t,n){let r=e.type;if(!e.render){if(!t&&Bo&&!r.render){let t=r.template||Ii(e).template;if(t){let{isCustomElement:n,compilerOptions:i}=e.appContext.config,{delimiters:a,compilerOptions:o}=r,s=S(S({isCustomElement:n,delimiters:a},i),o);r.render=Bo(t,s)}}e.render=r.render||v,Vo&&Vo(e)}{let t=No(e);it();try{Mi(e)}finally{at(),t()}}}const Uo={get(e,t){return ht(e,`get`,``),e[t]}};function Wo(e){let t=t=>{e.exposed=t||{}};return{attrs:new Proxy(e.attrs,Uo),slots:e.slots,emit:e.emit,expose:t}}function Go(e){return e.exposed?e.exposeProxy||=new Proxy(yn(un(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in xi)return xi[n](e)},has(e,t){return t in e||t in xi}}):e.proxy}function Ko(e,t=!0){return A(e)?e.displayName||e.name:e.name||t&&e.__name}function qo(e){return A(e)&&`__vccOpts`in e}const H=(e,t)=>{let n=On(e,t,Io);return n};function Jo(e,t,n){let r=arguments.length;return r===2?N(t)&&!E(t)?co(t)?mo(e,null,[t]):mo(e,t):mo(e,null,t):(r>3?n=Array.prototype.slice.call(arguments,2):r===3&&co(n)&&(n=[n]),mo(e,t,n))}const Yo=`3.5.17`;let Xo;const Zo=typeof window<`u`&&window.trustedTypes;if(Zo)try{Xo=Zo.createPolicy(`vue`,{createHTML:e=>e})}catch{}const Qo=Xo?e=>Xo.createHTML(e):e=>e,$o=`http://www.w3.org/2000/svg`,es=`http://www.w3.org/1998/Math/MathML`,ts=typeof document<`u`?document:null,ns=ts&&ts.createElement(`template`),rs={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{let t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,r)=>{let i=t===`svg`?ts.createElementNS($o,e):t===`mathml`?ts.createElementNS(es,e):n?ts.createElement(e,{is:n}):ts.createElement(e);return e===`select`&&r&&r.multiple!=null&&i.setAttribute(`multiple`,r.multiple),i},createText:e=>ts.createTextNode(e),createComment:e=>ts.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>ts.querySelector(e),setScopeId(e,t){e.setAttribute(t,``)},insertStaticContent(e,t,n,r,i,a){let o=n?n.previousSibling:t.lastChild;if(i&&(i===a||i.nextSibling))for(;t.insertBefore(i.cloneNode(!0),n),!(i===a||!(i=i.nextSibling)););else{ns.innerHTML=Qo(r===`svg`?`${e}`:r===`mathml`?`${e}`:e);let i=ns.content;if(r===`svg`||r===`mathml`){let e=i.firstChild;for(;e.firstChild;)i.appendChild(e.firstChild);i.removeChild(e)}t.insertBefore(i,n)}return[o?o.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},os=`transition`,ss=`animation`,cs=Symbol(`_vtc`),ls={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},us=S({},Dr,ls),ds=e=>(e.displayName=`Transition`,e.props=us,e),fs=ds((e,{slots:t})=>Jo(jr,hs(e),t)),ps=(e,t=[])=>{E(e)?e.forEach(e=>e(...t)):e&&e(...t)},ms=e=>e?E(e)?e.some(e=>e.length>1):e.length>1:!1;function hs(e){let t={};for(let n in e)n in ls||(t[n]=e[n]);if(e.css===!1)return t;let{name:n=`v`,type:r,duration:i,enterFromClass:a=`${n}-enter-from`,enterActiveClass:o=`${n}-enter-active`,enterToClass:s=`${n}-enter-to`,appearFromClass:c=a,appearActiveClass:l=o,appearToClass:u=s,leaveFromClass:d=`${n}-leave-from`,leaveActiveClass:f=`${n}-leave-active`,leaveToClass:p=`${n}-leave-to`}=e,m=gs(i),h=m&&m[0],g=m&&m[1],{onBeforeEnter:_,onEnter:v,onEnterCancelled:y,onLeave:b,onLeaveCancelled:x,onBeforeAppear:C=_,onAppear:w=v,onAppearCancelled:T=y}=t,E=(e,t,n,r)=>{e._enterCancelled=r,ys(e,t?u:s),ys(e,t?l:o),n&&n()},D=(e,t)=>{e._isLeaving=!1,ys(e,d),ys(e,p),ys(e,f),t&&t()},O=e=>(t,n)=>{let i=e?w:v,o=()=>E(t,e,n);ps(i,[t,o]),bs(()=>{ys(t,e?c:a),vs(t,e?u:s),ms(i)||Ss(t,r,h,o)})};return S(t,{onBeforeEnter(e){ps(_,[e]),vs(e,a),vs(e,o)},onBeforeAppear(e){ps(C,[e]),vs(e,c),vs(e,l)},onEnter:O(!1),onAppear:O(!0),onLeave(e,t){e._isLeaving=!0;let n=()=>D(e,t);vs(e,d),e._enterCancelled?(vs(e,f),Es()):(Es(),vs(e,f)),bs(()=>{e._isLeaving&&(ys(e,d),vs(e,p),ms(b)||Ss(e,r,g,n))}),ps(b,[e,n])},onEnterCancelled(e){E(e,!1,void 0,!0),ps(y,[e])},onAppearCancelled(e){E(e,!0,void 0,!0),ps(T,[e])},onLeaveCancelled(e){D(e),ps(x,[e])}})}function gs(e){if(e==null)return null;if(N(e))return[_s(e.enter),_s(e.leave)];{let t=_s(e);return[t,t]}}function _s(e){let t=ge(e);return t}function vs(e,t){t.split(/\s+/).forEach(t=>t&&e.classList.add(t)),(e[cs]||(e[cs]=new Set)).add(t)}function ys(e,t){t.split(/\s+/).forEach(t=>t&&e.classList.remove(t));let n=e[cs];n&&(n.delete(t),n.size||(e[cs]=void 0))}function bs(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let xs=0;function Ss(e,t,n,r){let i=e._endId=++xs,a=()=>{i===e._endId&&r()};if(n!=null)return setTimeout(a,n);let{type:o,timeout:s,propCount:c}=Cs(e,t);if(!o)return r();let l=o+`end`,u=0,d=()=>{e.removeEventListener(l,f),a()},f=t=>{t.target===e&&++u>=c&&d()};setTimeout(()=>{u(n[e]||``).split(`, `),i=r(`${os}Delay`),a=r(`${os}Duration`),o=ws(i,a),s=r(`${ss}Delay`),c=r(`${ss}Duration`),l=ws(s,c),u=null,d=0,f=0;t===os?o>0&&(u=os,d=o,f=a.length):t===ss?l>0&&(u=ss,d=l,f=c.length):(d=Math.max(o,l),u=d>0?o>l?os:ss:null,f=u?u===os?a.length:c.length:0);let p=u===os&&/\b(transform|all)(,|$)/.test(r(`${os}Property`).toString());return{type:u,timeout:d,propCount:f,hasTransform:p}}function ws(e,t){for(;e.lengthTs(t)+Ts(e[n])))}function Ts(e){return e===`auto`?0:Number(e.slice(0,-1).replace(`,`,`.`))*1e3}function Es(){return document.body.offsetHeight}function Ds(e,t,n){let r=e[cs];r&&(t=(t?[t,...r]:[...r]).join(` `)),t==null?e.removeAttribute(`class`):n?e.setAttribute(`class`,t):e.className=t}const Os=Symbol(`_vod`),ks=Symbol(`_vsh`),As={beforeMount(e,{value:t},{transition:n}){e[Os]=e.style.display===`none`?``:e.style.display,n&&t?n.beforeEnter(e):js(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:r}){!t!=!n&&(r?t?(r.beforeEnter(e),js(e,!0),r.enter(e)):r.leave(e,()=>{js(e,!1)}):js(e,t))},beforeUnmount(e,{value:t}){js(e,t)}};function js(e,t){e.style.display=t?e[Os]:`none`,e[ks]=!t}const Ms=Symbol(``),Ns=/(^|;)\s*display\s*:/;function Ps(e,t,n){let r=e.style,i=j(n),a=!1;if(n&&!i){if(t)if(j(t))for(let e of t.split(`;`)){let t=e.slice(0,e.indexOf(`:`)).trim();n[t]??Is(r,t,``)}else for(let e in t)n[e]??Is(r,e,``);for(let e in n)e===`display`&&(a=!0),Is(r,e,n[e])}else if(i){if(t!==n){let e=r[Ms];e&&(n+=`;`+e),r.cssText=n,a=Ns.test(n)}}else t&&e.removeAttribute(`style`);Os in e&&(e[Os]=a?r.display:``,e[ks]&&(r.display=`none`))}const Fs=/\s*!important$/;function Is(e,t,n){if(E(n))n.forEach(n=>Is(e,t,n));else if(n??=``,t.startsWith(`--`))e.setProperty(t,n);else{let r=zs(e,t);Fs.test(n)?e.setProperty(ue(r),n.replace(Fs,``),`important`):e[r]=n}}const Ls=[`Webkit`,`Moz`,`ms`],Rs={};function zs(e,t){let n=Rs[t];if(n)return n;let r=ce(t);if(r!==`filter`&&r in e)return Rs[t]=r;r=de(r);for(let n=0;nYs||(Xs.then(()=>Ys=0),Ys=Date.now());function Qs(e,t){let n=e=>{if(!e._vts)e._vts=Date.now();else if(e._vts<=n.attached)return;In($s(e,n.value),t,5,[e])};return n.value=e,n.attached=Zs(),n}function $s(e,t){if(E(t)){let n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(e=>t=>!t._stopped&&e&&e(t))}else return t}const ec=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,tc=(e,t,n,r,i,a)=>{let o=i===`svg`;t===`class`?Ds(e,r,o):t===`style`?Ps(e,n,r):b(t)?x(t)||Ks(e,t,n,r,a):(t[0]===`.`?(t=t.slice(1),!0):t[0]===`^`?(t=t.slice(1),!1):nc(e,t,r,o))?(Hs(e,t,r),!e.tagName.includes(`-`)&&(t===`value`||t===`checked`||t===`selected`)&&Vs(e,t,r,o,a,t!==`value`)):e._isVueCE&&(/[A-Z]/.test(t)||!j(r))?Hs(e,ce(t),r,a,t):(t===`true-value`?e._trueValue=r:t===`false-value`&&(e._falseValue=r),Vs(e,t,r,o))};function nc(e,t,n,r){if(r)return!!(t===`innerHTML`||t===`textContent`||t in e&&ec(t)&&A(n));if(t===`spellcheck`||t===`draggable`||t===`translate`||t===`autocorrect`||t===`form`||t===`list`&&e.tagName===`INPUT`||t===`type`&&e.tagName===`TEXTAREA`)return!1;if(t===`width`||t===`height`){let t=e.tagName;if(t===`IMG`||t===`VIDEO`||t===`CANVAS`||t===`SOURCE`)return!1}return ec(t)&&j(n)?!1:t in e}const rc=Symbol(`_moveCb`),ic=Symbol(`_enterCb`),ac=e=>{let t=e.props[`onUpdate:modelValue`]||!1;return E(t)?e=>F(t,e):t};function oc(e){e.target.composing=!0}function sc(e){let t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event(`input`)))}const cc=Symbol(`_assign`),lc={created(e,{modifiers:{lazy:t,trim:n,number:r}},i){e[cc]=ac(i);let a=r||i.props&&i.props.type===`number`;Us(e,t?`change`:`input`,t=>{if(t.target.composing)return;let r=e.value;n&&(r=r.trim()),a&&(r=he(r)),e[cc](r)}),n&&Us(e,`change`,()=>{e.value=e.value.trim()}),t||(Us(e,`compositionstart`,oc),Us(e,`compositionend`,sc),Us(e,`change`,sc))},mounted(e,{value:t}){e.value=t??``},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:r,trim:i,number:a}},o){if(e[cc]=ac(o),e.composing)return;let s=(a||e.type===`number`)&&!/^0\d/.test(e.value)?he(e.value):e.value,c=t??``;s!==c&&(document.activeElement===e&&e.type!==`range`&&(r&&t===n||i&&e.value.trim()===c)||(e.value=c))}},uc={deep:!0,created(e,t,n){e[cc]=ac(n),Us(e,`change`,()=>{let t=e._modelValue,n=hc(e),r=e.checked,i=e[cc];if(E(t)){let e=Ae(t,n),a=e!==-1;if(r&&!a)i(t.concat(n));else if(!r&&a){let n=[...t];n.splice(e,1),i(n)}}else if(O(t)){let e=new Set(t);r?e.add(n):e.delete(n),i(e)}else i(gc(e,r))})},mounted:dc,beforeUpdate(e,t,n){e[cc]=ac(n),dc(e,t,n)}};function dc(e,{value:t,oldValue:n},r){e._modelValue=t;let i;if(E(t))i=Ae(t,r.props.value)>-1;else if(O(t))i=t.has(r.props.value);else{if(t===n)return;i=ke(t,gc(e,!0))}e.checked!==i&&(e.checked=i)}const fc={created(e,{value:t},n){e.checked=ke(t,n.props.value),e[cc]=ac(n),Us(e,`change`,()=>{e[cc](hc(e))})},beforeUpdate(e,{value:t,oldValue:n},r){e[cc]=ac(r),t!==n&&(e.checked=ke(t,r.props.value))}},pc={deep:!0,created(e,{value:t,modifiers:{number:n}},r){let i=O(t);Us(e,`change`,()=>{let t=Array.prototype.filter.call(e.options,e=>e.selected).map(e=>n?he(hc(e)):hc(e));e[cc](e.multiple?i?new Set(t):t:t[0]),e._assigning=!0,Kn(()=>{e._assigning=!1})}),e[cc]=ac(r)},mounted(e,{value:t}){mc(e,t)},beforeUpdate(e,t,n){e[cc]=ac(n)},updated(e,{value:t}){e._assigning||mc(e,t)}};function mc(e,t){let n=e.multiple,r=E(t);if(!(n&&!r&&!O(t))){for(let i=0,a=e.options.length;iString(e)===String(o)):a.selected=Ae(t,o)>-1}else a.selected=t.has(o);else if(ke(hc(a),t)){e.selectedIndex!==i&&(e.selectedIndex=i);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function hc(e){return`_value`in e?e._value:e.value}function gc(e,t){let n=t?`_trueValue`:`_falseValue`;return n in e?e[n]:t}const _c={created(e,t,n){yc(e,t,n,null,`created`)},mounted(e,t,n){yc(e,t,n,null,`mounted`)},beforeUpdate(e,t,n,r){yc(e,t,n,r,`beforeUpdate`)},updated(e,t,n,r){yc(e,t,n,r,`updated`)}};function vc(e,t){switch(e){case`SELECT`:return pc;case`TEXTAREA`:return lc;default:switch(t){case`checkbox`:return uc;case`radio`:return fc;default:return lc}}}function yc(e,t,n,r,i){let a=vc(e.tagName,n.props&&n.props.type),o=a[i];o&&o(e,t,n,r)}const bc=[`ctrl`,`shift`,`alt`,`meta`],xc={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>`button`in e&&e.button!==0,middle:e=>`button`in e&&e.button!==1,right:e=>`button`in e&&e.button!==2,exact:(e,t)=>bc.some(n=>e[`${n}Key`]&&!t.includes(n))},Sc=(e,t)=>{let n=e._withMods||={},r=t.join(`.`);return n[r]||(n[r]=(n,...r)=>{for(let e=0;e{let n=e._withKeys||={},r=t.join(`.`);return n[r]||(n[r]=n=>{if(!(`key`in n))return;let r=ue(n.key);if(t.some(e=>e===r||Cc[e]===r))return e(n)})},Tc=S({patchProp:tc},rs);let Ec;function Dc(){return Ec||=ya(Tc)}const Oc=(...e)=>{Dc().render(...e)},kc=(...e)=>{let t=Dc().createApp(...e),{mount:n}=t;return t.mount=e=>{let r=jc(e);if(!r)return;let i=t._component;!A(i)&&!i.render&&!i.template&&(i.template=r.innerHTML),r.nodeType===1&&(r.textContent=``);let a=n(r,!1,Ac(r));return r instanceof Element&&(r.removeAttribute(`v-cloak`),r.setAttribute(`data-v-app`,``)),a},t};function Ac(e){if(e instanceof SVGElement)return`svg`;if(typeof MathMLElement==`function`&&e instanceof MathMLElement)return`mathml`}function jc(e){if(j(e)){let t=document.querySelector(e);return t}return e} +/** +* @license +* Copyright 2010-2025 Three.js Authors +* SPDX-License-Identifier: MIT +*/ +const Mc=`177`,Nc={LEFT:0,MIDDLE:1,RIGHT:2,ROTATE:0,DOLLY:1,PAN:2},Pc={ROTATE:0,PAN:1,DOLLY_PAN:2,DOLLY_ROTATE:3},Fc=0,Ic=1,Lc=2,Rc=3,zc=0,Bc=1,Vc=2,Hc=3,Uc=0,Wc=1,Gc=2,Kc=0,qc=1,Jc=2,Yc=3,Xc=4,Zc=5,Qc=100,$c=101,el=102,tl=103,nl=104,rl=200,il=201,al=202,ol=203,sl=204,cl=205,ll=206,ul=207,dl=208,fl=209,pl=210,ml=211,hl=212,gl=213,_l=214,vl=0,yl=1,bl=2,xl=3,Sl=4,Cl=5,wl=6,Tl=7,El=0,Dl=1,Ol=2,kl=0,Al=1,jl=2,Ml=3,Nl=4,Pl=5,Fl=6,Il=7,Ll=`attached`,Rl=`detached`,zl=300,Bl=301,Vl=302,Hl=303,Ul=304,Wl=306,Gl=1e3,Kl=1001,ql=1002,Jl=1003,Yl=1004,Xl=1004,Zl=1005,Ql=1005,$l=1006,eu=1007,tu=1007,nu=1008,ru=1008,iu=1009,au=1010,ou=1011,su=1012,cu=1013,lu=1014,uu=1015,du=1016,fu=1017,pu=1018,mu=1020,hu=35902,gu=1021,_u=1022,vu=1023,yu=1026,bu=1027,xu=1028,Su=1029,Cu=1030,wu=1031,Tu=1032,Eu=1033,Du=33776,Ou=33777,ku=33778,Au=33779,ju=35840,Mu=35841,Nu=35842,Pu=35843,Fu=36196,Iu=37492,Lu=37496,Ru=37808,zu=37809,Bu=37810,Vu=37811,Hu=37812,Uu=37813,Wu=37814,Gu=37815,Ku=37816,qu=37817,Ju=37818,Yu=37819,Xu=37820,Zu=37821,Qu=36492,$u=36494,ed=36495,td=36283,nd=36284,rd=36285,id=36286,ad=2200,od=2201,sd=2202,cd=2300,ld=2301,ud=2302,dd=2400,fd=2401,pd=2402,md=2500,hd=2501,gd=0,_d=1,vd=2,yd=3200,bd=3201,xd=3202,Sd=3203,Cd=0,wd=1,Td=``,Ed=`srgb`,Dd=`srgb-linear`,Od=`linear`,kd=`srgb`,Ad=0,jd=7680,Md=7681,Nd=7682,Pd=7683,Fd=34055,Id=34056,Ld=5386,Rd=512,zd=513,Bd=514,Vd=515,Hd=516,Ud=517,Wd=518,Gd=519,Kd=512,qd=513,Jd=514,Yd=515,Xd=516,Zd=517,Qd=518,$d=519,ef=35044,tf=35048,nf=35040,rf=35045,af=35049,sf=35041,cf=35046,lf=35050,uf=35042,df=`100`,ff=`300 es`,pf=2e3,mf=2001,hf={COMPUTE:`compute`,RENDER:`render`},gf={PERSPECTIVE:`perspective`,LINEAR:`linear`,FLAT:`flat`},_f={NORMAL:`normal`,CENTROID:`centroid`,SAMPLE:`sample`,FLAT_FIRST:`flat first`,FLAT_EITHER:`flat either`};var vf=class{addEventListener(e,t){this._listeners===void 0&&(this._listeners={});let n=this._listeners;n[e]===void 0&&(n[e]=[]),n[e].indexOf(t)===-1&&n[e].push(t)}hasEventListener(e,t){let n=this._listeners;return n===void 0?!1:n[e]!==void 0&&n[e].indexOf(t)!==-1}removeEventListener(e,t){let n=this._listeners;if(n===void 0)return;let r=n[e];if(r!==void 0){let e=r.indexOf(t);e!==-1&&r.splice(e,1)}}dispatchEvent(e){let t=this._listeners;if(t===void 0)return;let n=t[e.type];if(n!==void 0){e.target=this;let t=n.slice(0);for(let n=0,r=t.length;n>8&255]+yf[e>>16&255]+yf[e>>24&255]+`-`+yf[t&255]+yf[t>>8&255]+`-`+yf[t>>16&15|64]+yf[t>>24&255]+`-`+yf[n&63|128]+yf[n>>8&255]+`-`+yf[n>>16&255]+yf[n>>24&255]+yf[r&255]+yf[r>>8&255]+yf[r>>16&255]+yf[r>>24&255];return i.toLowerCase()}function wf(e,t,n){return Math.max(t,Math.min(n,e))}function Tf(e,t){return(e%t+t)%t}function Ef(e,t,n,r,i){return r+(e-t)*(i-r)/(n-t)}function Df(e,t,n){return e===t?0:(n-e)/(t-e)}function Of(e,t,n){return(1-n)*e+n*t}function kf(e,t,n,r){return Of(e,t,1-Math.exp(-n*r))}function Af(e,t=1){return t-Math.abs(Tf(e,t*2)-t)}function jf(e,t,n){return e<=t?0:e>=n?1:(e=(e-t)/(n-t),e*e*(3-2*e))}function Mf(e,t,n){return e<=t?0:e>=n?1:(e=(e-t)/(n-t),e*e*e*(e*(e*6-15)+10))}function Nf(e,t){return e+Math.floor(Math.random()*(t-e+1))}function Pf(e,t){return e+Math.random()*(t-e)}function Ff(e){return e*(.5-Math.random())}function If(e){e!==void 0&&(bf=e);let t=bf+=1831565813;return t=Math.imul(t^t>>>15,t|1),t^=t+Math.imul(t^t>>>7,t|61),((t^t>>>14)>>>0)/4294967296}function Lf(e){return e*xf}function Rf(e){return e*Sf}function zf(e){return(e&e-1)==0&&e!==0}function Bf(e){return 2**Math.ceil(Math.log(e)/Math.LN2)}function Vf(e){return 2**Math.floor(Math.log(e)/Math.LN2)}function Hf(e,t,n,r,i){let a=Math.cos,o=Math.sin,s=a(n/2),c=o(n/2),l=a((t+r)/2),u=o((t+r)/2),d=a((t-r)/2),f=o((t-r)/2),p=a((r-t)/2),m=o((r-t)/2);switch(i){case`XYX`:e.set(s*u,c*d,c*f,s*l);break;case`YZY`:e.set(c*f,s*u,c*d,s*l);break;case`ZXZ`:e.set(c*d,c*f,s*u,s*l);break;case`XZX`:e.set(s*u,c*m,c*p,s*l);break;case`YXY`:e.set(c*p,s*u,c*m,s*l);break;case`ZYZ`:e.set(c*m,c*p,s*u,s*l);break;default:console.warn(`THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: `+i)}}function Uf(e,t){switch(t.constructor){case Float32Array:return e;case Uint32Array:return e/4294967295;case Uint16Array:return e/65535;case Uint8Array:return e/255;case Int32Array:return Math.max(e/2147483647,-1);case Int16Array:return Math.max(e/32767,-1);case Int8Array:return Math.max(e/127,-1);default:throw Error(`Invalid component type.`)}}function Wf(e,t){switch(t.constructor){case Float32Array:return e;case Uint32Array:return Math.round(e*4294967295);case Uint16Array:return Math.round(e*65535);case Uint8Array:return Math.round(e*255);case Int32Array:return Math.round(e*2147483647);case Int16Array:return Math.round(e*32767);case Int8Array:return Math.round(e*127);default:throw Error(`Invalid component type.`)}}const Gf={DEG2RAD:xf,RAD2DEG:Sf,generateUUID:Cf,clamp:wf,euclideanModulo:Tf,mapLinear:Ef,inverseLerp:Df,lerp:Of,damp:kf,pingpong:Af,smoothstep:jf,smootherstep:Mf,randInt:Nf,randFloat:Pf,randFloatSpread:Ff,seededRandom:If,degToRad:Lf,radToDeg:Rf,isPowerOfTwo:zf,ceilPowerOfTwo:Bf,floorPowerOfTwo:Vf,setQuaternionFromProperEuler:Hf,normalize:Wf,denormalize:Uf};var U=class e{constructor(t=0,n=0){e.prototype.isVector2=!0,this.x=t,this.y=n}get width(){return this.x}set width(e){this.x=e}get height(){return this.y}set height(e){this.y=e}set(e,t){return this.x=e,this.y=t,this}setScalar(e){return this.x=e,this.y=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;default:throw Error(`index is out of range: `+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;default:throw Error(`index is out of range: `+e)}}clone(){return new this.constructor(this.x,this.y)}copy(e){return this.x=e.x,this.y=e.y,this}add(e){return this.x+=e.x,this.y+=e.y,this}addScalar(e){return this.x+=e,this.y+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this}subScalar(e){return this.x-=e,this.y-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this}multiply(e){return this.x*=e.x,this.y*=e.y,this}multiplyScalar(e){return this.x*=e,this.y*=e,this}divide(e){return this.x/=e.x,this.y/=e.y,this}divideScalar(e){return this.multiplyScalar(1/e)}applyMatrix3(e){let t=this.x,n=this.y,r=e.elements;return this.x=r[0]*t+r[3]*n+r[6],this.y=r[1]*t+r[4]*n+r[7],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this}clamp(e,t){return this.x=wf(this.x,e.x,t.x),this.y=wf(this.y,e.y,t.y),this}clampScalar(e,t){return this.x=wf(this.x,e,t),this.y=wf(this.y,e,t),this}clampLength(e,t){let n=this.length();return this.divideScalar(n||1).multiplyScalar(wf(n,e,t))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(e){return this.x*e.x+this.y*e.y}cross(e){return this.x*e.y-this.y*e.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){let e=Math.atan2(-this.y,-this.x)+Math.PI;return e}angleTo(e){let t=Math.sqrt(this.lengthSq()*e.lengthSq());if(t===0)return Math.PI/2;let n=this.dot(e)/t;return Math.acos(wf(n,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){let t=this.x-e.x,n=this.y-e.y;return t*t+n*n}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this}equals(e){return e.x===this.x&&e.y===this.y}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this}rotateAround(e,t){let n=Math.cos(t),r=Math.sin(t),i=this.x-e.x,a=this.y-e.y;return this.x=i*n-a*r+e.x,this.y=i*r+a*n+e.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}},Kf=class{constructor(e=0,t=0,n=0,r=1){this.isQuaternion=!0,this._x=e,this._y=t,this._z=n,this._w=r}static slerpFlat(e,t,n,r,i,a,o){let s=n[r+0],c=n[r+1],l=n[r+2],u=n[r+3],d=i[a+0],f=i[a+1],p=i[a+2],m=i[a+3];if(o===0){e[t+0]=s,e[t+1]=c,e[t+2]=l,e[t+3]=u;return}if(o===1){e[t+0]=d,e[t+1]=f,e[t+2]=p,e[t+3]=m;return}if(u!==m||s!==d||c!==f||l!==p){let e=1-o,t=s*d+c*f+l*p+u*m,n=t>=0?1:-1,r=1-t*t;if(r>2**-52){let i=Math.sqrt(r),a=Math.atan2(i,t*n);e=Math.sin(e*a)/i,o=Math.sin(o*a)/i}let i=o*n;if(s=s*e+d*i,c=c*e+f*i,l=l*e+p*i,u=u*e+m*i,e===1-o){let e=1/Math.sqrt(s*s+c*c+l*l+u*u);s*=e,c*=e,l*=e,u*=e}}e[t]=s,e[t+1]=c,e[t+2]=l,e[t+3]=u}static multiplyQuaternionsFlat(e,t,n,r,i,a){let o=n[r],s=n[r+1],c=n[r+2],l=n[r+3],u=i[a],d=i[a+1],f=i[a+2],p=i[a+3];return e[t]=o*p+l*u+s*f-c*d,e[t+1]=s*p+l*d+c*u-o*f,e[t+2]=c*p+l*f+o*d-s*u,e[t+3]=l*p-o*u-s*d-c*f,e}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get w(){return this._w}set w(e){this._w=e,this._onChangeCallback()}set(e,t,n,r){return this._x=e,this._y=t,this._z=n,this._w=r,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(e){return this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w,this._onChangeCallback(),this}setFromEuler(e,t=!0){let n=e._x,r=e._y,i=e._z,a=e._order,o=Math.cos,s=Math.sin,c=o(n/2),l=o(r/2),u=o(i/2),d=s(n/2),f=s(r/2),p=s(i/2);switch(a){case`XYZ`:this._x=d*l*u+c*f*p,this._y=c*f*u-d*l*p,this._z=c*l*p+d*f*u,this._w=c*l*u-d*f*p;break;case`YXZ`:this._x=d*l*u+c*f*p,this._y=c*f*u-d*l*p,this._z=c*l*p-d*f*u,this._w=c*l*u+d*f*p;break;case`ZXY`:this._x=d*l*u-c*f*p,this._y=c*f*u+d*l*p,this._z=c*l*p+d*f*u,this._w=c*l*u-d*f*p;break;case`ZYX`:this._x=d*l*u-c*f*p,this._y=c*f*u+d*l*p,this._z=c*l*p-d*f*u,this._w=c*l*u+d*f*p;break;case`YZX`:this._x=d*l*u+c*f*p,this._y=c*f*u+d*l*p,this._z=c*l*p-d*f*u,this._w=c*l*u-d*f*p;break;case`XZY`:this._x=d*l*u-c*f*p,this._y=c*f*u-d*l*p,this._z=c*l*p+d*f*u,this._w=c*l*u+d*f*p;break;default:console.warn(`THREE.Quaternion: .setFromEuler() encountered an unknown order: `+a)}return t===!0&&this._onChangeCallback(),this}setFromAxisAngle(e,t){let n=t/2,r=Math.sin(n);return this._x=e.x*r,this._y=e.y*r,this._z=e.z*r,this._w=Math.cos(n),this._onChangeCallback(),this}setFromRotationMatrix(e){let t=e.elements,n=t[0],r=t[4],i=t[8],a=t[1],o=t[5],s=t[9],c=t[2],l=t[6],u=t[10],d=n+o+u;if(d>0){let e=.5/Math.sqrt(d+1);this._w=.25/e,this._x=(l-s)*e,this._y=(i-c)*e,this._z=(a-r)*e}else if(n>o&&n>u){let e=2*Math.sqrt(1+n-o-u);this._w=(l-s)/e,this._x=.25*e,this._y=(r+a)/e,this._z=(i+c)/e}else if(o>u){let e=2*Math.sqrt(1+o-n-u);this._w=(i-c)/e,this._x=(r+a)/e,this._y=.25*e,this._z=(s+l)/e}else{let e=2*Math.sqrt(1+u-n-o);this._w=(a-r)/e,this._x=(i+c)/e,this._y=(s+l)/e,this._z=.25*e}return this._onChangeCallback(),this}setFromUnitVectors(e,t){let n=e.dot(t)+1;return n<2**-52?(n=0,Math.abs(e.x)>Math.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0,this._w=n):(this._x=0,this._y=-e.z,this._z=e.y,this._w=n)):(this._x=e.y*t.z-e.z*t.y,this._y=e.z*t.x-e.x*t.z,this._z=e.x*t.y-e.y*t.x,this._w=n),this.normalize()}angleTo(e){return 2*Math.acos(Math.abs(wf(this.dot(e),-1,1)))}rotateTowards(e,t){let n=this.angleTo(e);if(n===0)return this;let r=Math.min(1,t/n);return this.slerp(e,r),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(e){return this._x*e._x+this._y*e._y+this._z*e._z+this._w*e._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let e=this.length();return e===0?(this._x=0,this._y=0,this._z=0,this._w=1):(e=1/e,this._x*=e,this._y*=e,this._z*=e,this._w*=e),this._onChangeCallback(),this}multiply(e){return this.multiplyQuaternions(this,e)}premultiply(e){return this.multiplyQuaternions(e,this)}multiplyQuaternions(e,t){let n=e._x,r=e._y,i=e._z,a=e._w,o=t._x,s=t._y,c=t._z,l=t._w;return this._x=n*l+a*o+r*c-i*s,this._y=r*l+a*s+i*o-n*c,this._z=i*l+a*c+n*s-r*o,this._w=a*l-n*o-r*s-i*c,this._onChangeCallback(),this}slerp(e,t){if(t===0)return this;if(t===1)return this.copy(e);let n=this._x,r=this._y,i=this._z,a=this._w,o=a*e._w+n*e._x+r*e._y+i*e._z;if(o<0?(this._w=-e._w,this._x=-e._x,this._y=-e._y,this._z=-e._z,o=-o):this.copy(e),o>=1)return this._w=a,this._x=n,this._y=r,this._z=i,this;let s=1-o*o;if(s<=2**-52){let e=1-t;return this._w=e*a+t*this._w,this._x=e*n+t*this._x,this._y=e*r+t*this._y,this._z=e*i+t*this._z,this.normalize(),this}let c=Math.sqrt(s),l=Math.atan2(c,o),u=Math.sin((1-t)*l)/c,d=Math.sin(t*l)/c;return this._w=a*u+this._w*d,this._x=n*u+this._x*d,this._y=r*u+this._y*d,this._z=i*u+this._z*d,this._onChangeCallback(),this}slerpQuaternions(e,t,n){return this.copy(e).slerp(t,n)}random(){let e=2*Math.PI*Math.random(),t=2*Math.PI*Math.random(),n=Math.random(),r=Math.sqrt(1-n),i=Math.sqrt(n);return this.set(r*Math.sin(e),r*Math.cos(e),i*Math.sin(t),i*Math.cos(t))}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._w===this._w}fromArray(e,t=0){return this._x=e[t],this._y=e[t+1],this._z=e[t+2],this._w=e[t+3],this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._w,e}fromBufferAttribute(e,t){return this._x=e.getX(t),this._y=e.getY(t),this._z=e.getZ(t),this._w=e.getW(t),this._onChangeCallback(),this}toJSON(){return this.toArray()}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}},W=class e{constructor(t=0,n=0,r=0){e.prototype.isVector3=!0,this.x=t,this.y=n,this.z=r}set(e,t,n){return n===void 0&&(n=this.z),this.x=e,this.y=t,this.z=n,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;default:throw Error(`index is out of range: `+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw Error(`index is out of range: `+e)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this}multiplyVectors(e,t){return this.x=e.x*t.x,this.y=e.y*t.y,this.z=e.z*t.z,this}applyEuler(e){return this.applyQuaternion(Jf.setFromEuler(e))}applyAxisAngle(e,t){return this.applyQuaternion(Jf.setFromAxisAngle(e,t))}applyMatrix3(e){let t=this.x,n=this.y,r=this.z,i=e.elements;return this.x=i[0]*t+i[3]*n+i[6]*r,this.y=i[1]*t+i[4]*n+i[7]*r,this.z=i[2]*t+i[5]*n+i[8]*r,this}applyNormalMatrix(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){let t=this.x,n=this.y,r=this.z,i=e.elements,a=1/(i[3]*t+i[7]*n+i[11]*r+i[15]);return this.x=(i[0]*t+i[4]*n+i[8]*r+i[12])*a,this.y=(i[1]*t+i[5]*n+i[9]*r+i[13])*a,this.z=(i[2]*t+i[6]*n+i[10]*r+i[14])*a,this}applyQuaternion(e){let t=this.x,n=this.y,r=this.z,i=e.x,a=e.y,o=e.z,s=e.w,c=2*(a*r-o*n),l=2*(o*t-i*r),u=2*(i*n-a*t);return this.x=t+s*c+a*u-o*l,this.y=n+s*l+o*c-i*u,this.z=r+s*u+i*l-a*c,this}project(e){return this.applyMatrix4(e.matrixWorldInverse).applyMatrix4(e.projectionMatrix)}unproject(e){return this.applyMatrix4(e.projectionMatrixInverse).applyMatrix4(e.matrixWorld)}transformDirection(e){let t=this.x,n=this.y,r=this.z,i=e.elements;return this.x=i[0]*t+i[4]*n+i[8]*r,this.y=i[1]*t+i[5]*n+i[9]*r,this.z=i[2]*t+i[6]*n+i[10]*r,this.normalize()}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this}divideScalar(e){return this.multiplyScalar(1/e)}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this}clamp(e,t){return this.x=wf(this.x,e.x,t.x),this.y=wf(this.y,e.y,t.y),this.z=wf(this.z,e.z,t.z),this}clampScalar(e,t){return this.x=wf(this.x,e,t),this.y=wf(this.y,e,t),this.z=wf(this.z,e,t),this}clampLength(e,t){let n=this.length();return this.divideScalar(n||1).multiplyScalar(wf(n,e,t))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this.z=e.z+(t.z-e.z)*n,this}cross(e){return this.crossVectors(this,e)}crossVectors(e,t){let n=e.x,r=e.y,i=e.z,a=t.x,o=t.y,s=t.z;return this.x=r*s-i*o,this.y=i*a-n*s,this.z=n*o-r*a,this}projectOnVector(e){let t=e.lengthSq();if(t===0)return this.set(0,0,0);let n=e.dot(this)/t;return this.copy(e).multiplyScalar(n)}projectOnPlane(e){return qf.copy(this).projectOnVector(e),this.sub(qf)}reflect(e){return this.sub(qf.copy(e).multiplyScalar(2*this.dot(e)))}angleTo(e){let t=Math.sqrt(this.lengthSq()*e.lengthSq());if(t===0)return Math.PI/2;let n=this.dot(e)/t;return Math.acos(wf(n,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){let t=this.x-e.x,n=this.y-e.y,r=this.z-e.z;return t*t+n*n+r*r}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)+Math.abs(this.z-e.z)}setFromSpherical(e){return this.setFromSphericalCoords(e.radius,e.phi,e.theta)}setFromSphericalCoords(e,t,n){let r=Math.sin(t)*e;return this.x=r*Math.sin(n),this.y=Math.cos(t)*e,this.z=r*Math.cos(n),this}setFromCylindrical(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)}setFromCylindricalCoords(e,t,n){return this.x=e*Math.sin(t),this.y=n,this.z=e*Math.cos(t),this}setFromMatrixPosition(e){let t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this}setFromMatrixScale(e){let t=this.setFromMatrixColumn(e,0).length(),n=this.setFromMatrixColumn(e,1).length(),r=this.setFromMatrixColumn(e,2).length();return this.x=t,this.y=n,this.z=r,this}setFromMatrixColumn(e,t){return this.fromArray(e.elements,t*4)}setFromMatrix3Column(e,t){return this.fromArray(e.elements,t*3)}setFromEuler(e){return this.x=e._x,this.y=e._y,this.z=e._z,this}setFromColor(e){return this.x=e.r,this.y=e.g,this.z=e.b,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){let e=Math.random()*Math.PI*2,t=Math.random()*2-1,n=Math.sqrt(1-t*t);return this.x=n*Math.cos(e),this.y=t,this.z=n*Math.sin(e),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}};const qf=new W,Jf=new Kf;var Yf=class e{constructor(t,n,r,i,a,o,s,c,l){e.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1],t!==void 0&&this.set(t,n,r,i,a,o,s,c,l)}set(e,t,n,r,i,a,o,s,c){let l=this.elements;return l[0]=e,l[1]=r,l[2]=o,l[3]=t,l[4]=i,l[5]=s,l[6]=n,l[7]=a,l[8]=c,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(e){let t=this.elements,n=e.elements;return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],this}extractBasis(e,t,n){return e.setFromMatrix3Column(this,0),t.setFromMatrix3Column(this,1),n.setFromMatrix3Column(this,2),this}setFromMatrix4(e){let t=e.elements;return this.set(t[0],t[4],t[8],t[1],t[5],t[9],t[2],t[6],t[10]),this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){let n=e.elements,r=t.elements,i=this.elements,a=n[0],o=n[3],s=n[6],c=n[1],l=n[4],u=n[7],d=n[2],f=n[5],p=n[8],m=r[0],h=r[3],g=r[6],_=r[1],v=r[4],y=r[7],b=r[2],x=r[5],S=r[8];return i[0]=a*m+o*_+s*b,i[3]=a*h+o*v+s*x,i[6]=a*g+o*y+s*S,i[1]=c*m+l*_+u*b,i[4]=c*h+l*v+u*x,i[7]=c*g+l*y+u*S,i[2]=d*m+f*_+p*b,i[5]=d*h+f*v+p*x,i[8]=d*g+f*y+p*S,this}multiplyScalar(e){let t=this.elements;return t[0]*=e,t[3]*=e,t[6]*=e,t[1]*=e,t[4]*=e,t[7]*=e,t[2]*=e,t[5]*=e,t[8]*=e,this}determinant(){let e=this.elements,t=e[0],n=e[1],r=e[2],i=e[3],a=e[4],o=e[5],s=e[6],c=e[7],l=e[8];return t*a*l-t*o*c-n*i*l+n*o*s+r*i*c-r*a*s}invert(){let e=this.elements,t=e[0],n=e[1],r=e[2],i=e[3],a=e[4],o=e[5],s=e[6],c=e[7],l=e[8],u=l*a-o*c,d=o*s-l*i,f=c*i-a*s,p=t*u+n*d+r*f;if(p===0)return this.set(0,0,0,0,0,0,0,0,0);let m=1/p;return e[0]=u*m,e[1]=(r*c-l*n)*m,e[2]=(o*n-r*a)*m,e[3]=d*m,e[4]=(l*t-r*s)*m,e[5]=(r*i-o*t)*m,e[6]=f*m,e[7]=(n*s-c*t)*m,e[8]=(a*t-n*i)*m,this}transpose(){let e,t=this.elements;return e=t[1],t[1]=t[3],t[3]=e,e=t[2],t[2]=t[6],t[6]=e,e=t[5],t[5]=t[7],t[7]=e,this}getNormalMatrix(e){return this.setFromMatrix4(e).invert().transpose()}transposeIntoArray(e){let t=this.elements;return e[0]=t[0],e[1]=t[3],e[2]=t[6],e[3]=t[1],e[4]=t[4],e[5]=t[7],e[6]=t[2],e[7]=t[5],e[8]=t[8],this}setUvTransform(e,t,n,r,i,a,o){let s=Math.cos(i),c=Math.sin(i);return this.set(n*s,n*c,-n*(s*a+c*o)+a+e,-r*c,r*s,-r*(-c*a+s*o)+o+t,0,0,1),this}scale(e,t){return this.premultiply(Xf.makeScale(e,t)),this}rotate(e){return this.premultiply(Xf.makeRotation(-e)),this}translate(e,t){return this.premultiply(Xf.makeTranslation(e,t)),this}makeTranslation(e,t){return e.isVector2?this.set(1,0,e.x,0,1,e.y,0,0,1):this.set(1,0,e,0,1,t,0,0,1),this}makeRotation(e){let t=Math.cos(e),n=Math.sin(e);return this.set(t,-n,0,n,t,0,0,0,1),this}makeScale(e,t){return this.set(e,0,0,0,t,0,0,0,1),this}equals(e){let t=this.elements,n=e.elements;for(let e=0;e<9;e++)if(t[e]!==n[e])return!1;return!0}fromArray(e,t=0){for(let n=0;n<9;n++)this.elements[n]=e[n+t];return this}toArray(e=[],t=0){let n=this.elements;return e[t]=n[0],e[t+1]=n[1],e[t+2]=n[2],e[t+3]=n[3],e[t+4]=n[4],e[t+5]=n[5],e[t+6]=n[6],e[t+7]=n[7],e[t+8]=n[8],e}clone(){return new this.constructor().fromArray(this.elements)}};const Xf=new Yf;function Zf(e){for(let t=e.length-1;t>=0;--t)if(e[t]>=65535)return!0;return!1}const Qf={Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array};function $f(e,t){return new Qf[e](t)}function ep(e){return document.createElementNS(`http://www.w3.org/1999/xhtml`,e)}function tp(){let e=ep(`canvas`);return e.style.display=`block`,e}const np={};function rp(e){e in np||(np[e]=!0,console.warn(e))}function ip(e,t,n){return new Promise(function(r,i){function a(){switch(e.clientWaitSync(t,e.SYNC_FLUSH_COMMANDS_BIT,0)){case e.WAIT_FAILED:i();break;case e.TIMEOUT_EXPIRED:setTimeout(a,n);break;default:r()}}setTimeout(a,n)})}function ap(e){let t=e.elements;t[2]=.5*t[2]+.5*t[3],t[6]=.5*t[6]+.5*t[7],t[10]=.5*t[10]+.5*t[11],t[14]=.5*t[14]+.5*t[15]}function op(e){let t=e.elements,n=t[11]===-1;n?(t[10]=-t[10]-1,t[14]=-t[14]):(t[10]=-t[10],t[14]=-t[14]+1)}const sp=new Yf().set(.4123908,.3575843,.1804808,.212639,.7151687,.0721923,.0193308,.1191948,.9505322),cp=new Yf().set(3.2409699,-1.5373832,-.4986108,-.9692436,1.8759675,.0415551,.0556301,-.203977,1.0569715);function lp(){let e={enabled:!0,workingColorSpace:Dd,spaces:{},convert:function(e,t,n){return this.enabled===!1||t===n||!t||!n?e:(this.spaces[t].transfer===kd&&(e.r=dp(e.r),e.g=dp(e.g),e.b=dp(e.b)),this.spaces[t].primaries!==this.spaces[n].primaries&&(e.applyMatrix3(this.spaces[t].toXYZ),e.applyMatrix3(this.spaces[n].fromXYZ)),this.spaces[n].transfer===kd&&(e.r=fp(e.r),e.g=fp(e.g),e.b=fp(e.b)),e)},workingToColorSpace:function(e,t){return this.convert(e,this.workingColorSpace,t)},colorSpaceToWorking:function(e,t){return this.convert(e,t,this.workingColorSpace)},getPrimaries:function(e){return this.spaces[e].primaries},getTransfer:function(e){return e===Td?Od:this.spaces[e].transfer},getLuminanceCoefficients:function(e,t=this.workingColorSpace){return e.fromArray(this.spaces[t].luminanceCoefficients)},define:function(e){Object.assign(this.spaces,e)},_getMatrix:function(e,t,n){return e.copy(this.spaces[t].toXYZ).multiply(this.spaces[n].fromXYZ)},_getDrawingBufferColorSpace:function(e){return this.spaces[e].outputColorSpaceConfig.drawingBufferColorSpace},_getUnpackColorSpace:function(e=this.workingColorSpace){return this.spaces[e].workingColorSpaceConfig.unpackColorSpace},fromWorkingColorSpace:function(t,n){return rp(`THREE.ColorManagement: .fromWorkingColorSpace() has been renamed to .workingToColorSpace().`),e.workingToColorSpace(t,n)},toWorkingColorSpace:function(t,n){return rp(`THREE.ColorManagement: .toWorkingColorSpace() has been renamed to .colorSpaceToWorking().`),e.colorSpaceToWorking(t,n)}},t=[.64,.33,.3,.6,.15,.06],n=[.2126,.7152,.0722],r=[.3127,.329];return e.define({[Dd]:{primaries:t,whitePoint:r,transfer:Od,toXYZ:sp,fromXYZ:cp,luminanceCoefficients:n,workingColorSpaceConfig:{unpackColorSpace:Ed},outputColorSpaceConfig:{drawingBufferColorSpace:Ed}},[Ed]:{primaries:t,whitePoint:r,transfer:kd,toXYZ:sp,fromXYZ:cp,luminanceCoefficients:n,outputColorSpaceConfig:{drawingBufferColorSpace:Ed}}}),e}const up=lp();function dp(e){return e<.04045?e*.0773993808:(e*.9478672986+.0521327014)**2.4}function fp(e){return e<.0031308?e*12.92:1.055*e**.41666-.055}let pp;var mp=class{static getDataURL(e,t=`image/png`){if(/^data:/i.test(e.src)||typeof HTMLCanvasElement>`u`)return e.src;let n;if(e instanceof HTMLCanvasElement)n=e;else{pp===void 0&&(pp=ep(`canvas`)),pp.width=e.width,pp.height=e.height;let t=pp.getContext(`2d`);e instanceof ImageData?t.putImageData(e,0,0):t.drawImage(e,0,0,e.width,e.height),n=pp}return n.toDataURL(t)}static sRGBToLinear(e){if(typeof HTMLImageElement<`u`&&e instanceof HTMLImageElement||typeof HTMLCanvasElement<`u`&&e instanceof HTMLCanvasElement||typeof ImageBitmap<`u`&&e instanceof ImageBitmap){let t=ep(`canvas`);t.width=e.width,t.height=e.height;let n=t.getContext(`2d`);n.drawImage(e,0,0,e.width,e.height);let r=n.getImageData(0,0,e.width,e.height),i=r.data;for(let e=0;e1),this.pmremVersion=0}get width(){return this.source.getSize(yp).x}get height(){return this.source.getSize(yp).y}get depth(){return this.source.getSize(yp).z}get image(){return this.source.data}set image(e=null){this.source.data=e}updateMatrix(){this.matrix.setUvTransform(this.offset.x,this.offset.y,this.repeat.x,this.repeat.y,this.rotation,this.center.x,this.center.y)}addUpdateRange(e,t){this.updateRanges.push({start:e,count:t})}clearUpdateRanges(){this.updateRanges.length=0}clone(){return new this.constructor().copy(this)}copy(e){return this.name=e.name,this.source=e.source,this.mipmaps=e.mipmaps.slice(0),this.mapping=e.mapping,this.channel=e.channel,this.wrapS=e.wrapS,this.wrapT=e.wrapT,this.magFilter=e.magFilter,this.minFilter=e.minFilter,this.anisotropy=e.anisotropy,this.format=e.format,this.internalFormat=e.internalFormat,this.type=e.type,this.offset.copy(e.offset),this.repeat.copy(e.repeat),this.center.copy(e.center),this.rotation=e.rotation,this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrix.copy(e.matrix),this.generateMipmaps=e.generateMipmaps,this.premultiplyAlpha=e.premultiplyAlpha,this.flipY=e.flipY,this.unpackAlignment=e.unpackAlignment,this.colorSpace=e.colorSpace,this.renderTarget=e.renderTarget,this.isRenderTargetTexture=e.isRenderTargetTexture,this.isArrayTexture=e.isArrayTexture,this.userData=JSON.parse(JSON.stringify(e.userData)),this.needsUpdate=!0,this}setValues(e){for(let t in e){let n=e[t];if(n===void 0){console.warn(`THREE.Texture.setValues(): parameter '${t}' has value of undefined.`);continue}let r=this[t];if(r===void 0){console.warn(`THREE.Texture.setValues(): property '${t}' does not exist.`);continue}r&&n&&r.isVector2&&n.isVector2||r&&n&&r.isVector3&&n.isVector3||r&&n&&r.isMatrix3&&n.isMatrix3?r.copy(n):this[t]=n}}toJSON(e){let t=e===void 0||typeof e==`string`;if(!t&&e.textures[this.uuid]!==void 0)return e.textures[this.uuid];let n={metadata:{version:4.7,type:`Texture`,generator:`Texture.toJSON`},uuid:this.uuid,name:this.name,image:this.source.toJSON(e).uuid,mapping:this.mapping,channel:this.channel,repeat:[this.repeat.x,this.repeat.y],offset:[this.offset.x,this.offset.y],center:[this.center.x,this.center.y],rotation:this.rotation,wrap:[this.wrapS,this.wrapT],format:this.format,internalFormat:this.internalFormat,type:this.type,colorSpace:this.colorSpace,minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY,generateMipmaps:this.generateMipmaps,premultiplyAlpha:this.premultiplyAlpha,unpackAlignment:this.unpackAlignment};return Object.keys(this.userData).length>0&&(n.userData=this.userData),t||(e.textures[this.uuid]=n),n}dispose(){this.dispatchEvent({type:`dispose`})}transformUv(e){if(this.mapping!==zl)return e;if(e.applyMatrix3(this.matrix),e.x<0||e.x>1)switch(this.wrapS){case Gl:e.x-=Math.floor(e.x);break;case Kl:e.x=e.x<0?0:1;break;case ql:Math.abs(Math.floor(e.x)%2)===1?e.x=Math.ceil(e.x)-e.x:e.x-=Math.floor(e.x);break}if(e.y<0||e.y>1)switch(this.wrapT){case Gl:e.y-=Math.floor(e.y);break;case Kl:e.y=e.y<0?0:1;break;case ql:Math.abs(Math.floor(e.y)%2)===1?e.y=Math.ceil(e.y)-e.y:e.y-=Math.floor(e.y);break}return this.flipY&&(e.y=1-e.y),e}set needsUpdate(e){e===!0&&(this.version++,this.source.needsUpdate=!0)}set needsPMREMUpdate(e){e===!0&&this.pmremVersion++}};bp.DEFAULT_IMAGE=null,bp.DEFAULT_MAPPING=zl,bp.DEFAULT_ANISOTROPY=1;var xp=class e{constructor(t=0,n=0,r=0,i=1){e.prototype.isVector4=!0,this.x=t,this.y=n,this.z=r,this.w=i}get width(){return this.z}set width(e){this.z=e}get height(){return this.w}set height(e){this.w=e}set(e,t,n,r){return this.x=e,this.y=t,this.z=n,this.w=r,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this.w=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setW(e){return this.w=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;case 3:this.w=t;break;default:throw Error(`index is out of range: `+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw Error(`index is out of range: `+e)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=e.w===void 0?1:e.w,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this.w+=e.w,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this.w+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this.w=e.w+t.w,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this.w+=e.w*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this.w-=e.w,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this.w-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this.w=e.w-t.w,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this.w*=e.w,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this.w*=e,this}applyMatrix4(e){let t=this.x,n=this.y,r=this.z,i=this.w,a=e.elements;return this.x=a[0]*t+a[4]*n+a[8]*r+a[12]*i,this.y=a[1]*t+a[5]*n+a[9]*r+a[13]*i,this.z=a[2]*t+a[6]*n+a[10]*r+a[14]*i,this.w=a[3]*t+a[7]*n+a[11]*r+a[15]*i,this}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this.w/=e.w,this}divideScalar(e){return this.multiplyScalar(1/e)}setAxisAngleFromQuaternion(e){this.w=2*Math.acos(e.w);let t=Math.sqrt(1-e.w*e.w);return t<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=e.x/t,this.y=e.y/t,this.z=e.z/t),this}setAxisAngleFromRotationMatrix(e){let t,n,r,i,a=.01,o=.1,s=e.elements,c=s[0],l=s[4],u=s[8],d=s[1],f=s[5],p=s[9],m=s[2],h=s[6],g=s[10];if(Math.abs(l-d)s&&e>_?e_?s1;this.dispose()}this.viewport.set(0,0,e,t),this.scissor.set(0,0,e,t)}clone(){return new this.constructor().copy(this)}copy(e){this.width=e.width,this.height=e.height,this.depth=e.depth,this.scissor.copy(e.scissor),this.scissorTest=e.scissorTest,this.viewport.copy(e.viewport),this.textures.length=0;for(let t=0,n=e.textures.length;t=this.min.x&&e.x<=this.max.x&&e.y>=this.min.y&&e.y<=this.max.y&&e.z>=this.min.z&&e.z<=this.max.z}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y&&this.min.z<=e.min.z&&e.max.z<=this.max.z}getParameter(e,t){return t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y),(e.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(e){return e.max.x>=this.min.x&&e.min.x<=this.max.x&&e.max.y>=this.min.y&&e.min.y<=this.max.y&&e.max.z>=this.min.z&&e.min.z<=this.max.z}intersectsSphere(e){return this.clampPoint(e.center,Ap),Ap.distanceToSquared(e.center)<=e.radius*e.radius}intersectsPlane(e){let t,n;return e.normal.x>0?(t=e.normal.x*this.min.x,n=e.normal.x*this.max.x):(t=e.normal.x*this.max.x,n=e.normal.x*this.min.x),e.normal.y>0?(t+=e.normal.y*this.min.y,n+=e.normal.y*this.max.y):(t+=e.normal.y*this.max.y,n+=e.normal.y*this.min.y),e.normal.z>0?(t+=e.normal.z*this.min.z,n+=e.normal.z*this.max.z):(t+=e.normal.z*this.max.z,n+=e.normal.z*this.min.z),t<=-e.constant&&n>=-e.constant}intersectsTriangle(e){if(this.isEmpty())return!1;this.getCenter(Rp),zp.subVectors(this.max,Rp),Mp.subVectors(e.a,Rp),Np.subVectors(e.b,Rp),Pp.subVectors(e.c,Rp),Fp.subVectors(Np,Mp),Ip.subVectors(Pp,Np),Lp.subVectors(Mp,Pp);let t=[0,-Fp.z,Fp.y,0,-Ip.z,Ip.y,0,-Lp.z,Lp.y,Fp.z,0,-Fp.x,Ip.z,0,-Ip.x,Lp.z,0,-Lp.x,-Fp.y,Fp.x,0,-Ip.y,Ip.x,0,-Lp.y,Lp.x,0];return!Hp(t,Mp,Np,Pp,zp)||(t=[1,0,0,0,1,0,0,0,1],!Hp(t,Mp,Np,Pp,zp))?!1:(Bp.crossVectors(Fp,Ip),t=[Bp.x,Bp.y,Bp.z],Hp(t,Mp,Np,Pp,zp))}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,Ap).distanceTo(e)}getBoundingSphere(e){return this.isEmpty()?e.makeEmpty():(this.getCenter(e.center),e.radius=this.getSize(Ap).length()*.5),e}intersect(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}applyMatrix4(e){return this.isEmpty()?this:(kp[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),kp[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),kp[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),kp[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),kp[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),kp[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),kp[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),kp[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(kp),this)}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}toJSON(){return{min:this.min.toArray(),max:this.max.toArray()}}fromJSON(e){return this.min.fromArray(e.min),this.max.fromArray(e.max),this}};const kp=[new W,new W,new W,new W,new W,new W,new W,new W],Ap=new W,jp=new Op,Mp=new W,Np=new W,Pp=new W,Fp=new W,Ip=new W,Lp=new W,Rp=new W,zp=new W,Bp=new W,Vp=new W;function Hp(e,t,n,r,i){for(let a=0,o=e.length-3;a<=o;a+=3){Vp.fromArray(e,a);let o=i.x*Math.abs(Vp.x)+i.y*Math.abs(Vp.y)+i.z*Math.abs(Vp.z),s=t.dot(Vp),c=n.dot(Vp),l=r.dot(Vp);if(Math.max(-Math.max(s,c,l),Math.min(s,c,l))>o)return!1}return!0}const Up=new Op,Wp=new W,Gp=new W;var Kp=class{constructor(e=new W,t=-1){this.isSphere=!0,this.center=e,this.radius=t}set(e,t){return this.center.copy(e),this.radius=t,this}setFromPoints(e,t){let n=this.center;t===void 0?Up.setFromPoints(e).getCenter(n):n.copy(t);let r=0;for(let t=0,i=e.length;tthis.radius*this.radius&&(t.sub(this.center).normalize(),t.multiplyScalar(this.radius).add(this.center)),t}getBoundingBox(e){return this.isEmpty()?(e.makeEmpty(),e):(e.set(this.center,this.center),e.expandByScalar(this.radius),e)}applyMatrix4(e){return this.center.applyMatrix4(e),this.radius*=e.getMaxScaleOnAxis(),this}translate(e){return this.center.add(e),this}expandByPoint(e){if(this.isEmpty())return this.center.copy(e),this.radius=0,this;Wp.subVectors(e,this.center);let t=Wp.lengthSq();if(t>this.radius*this.radius){let e=Math.sqrt(t),n=(e-this.radius)*.5;this.center.addScaledVector(Wp,n/e),this.radius+=n}return this}union(e){return e.isEmpty()?this:this.isEmpty()?(this.copy(e),this):(this.center.equals(e.center)===!0?this.radius=Math.max(this.radius,e.radius):(Gp.subVectors(e.center,this.center).setLength(e.radius),this.expandByPoint(Wp.copy(e.center).add(Gp)),this.expandByPoint(Wp.copy(e.center).sub(Gp))),this)}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return new this.constructor().copy(this)}toJSON(){return{radius:this.radius,center:this.center.toArray()}}fromJSON(e){return this.radius=e.radius,this.center.fromArray(e.center),this}};const qp=new W,Jp=new W,Yp=new W,Xp=new W,Zp=new W,Qp=new W,$p=new W;var em=class{constructor(e=new W,t=new W(0,0,-1)){this.origin=e,this.direction=t}set(e,t){return this.origin.copy(e),this.direction.copy(t),this}copy(e){return this.origin.copy(e.origin),this.direction.copy(e.direction),this}at(e,t){return t.copy(this.origin).addScaledVector(this.direction,e)}lookAt(e){return this.direction.copy(e).sub(this.origin).normalize(),this}recast(e){return this.origin.copy(this.at(e,qp)),this}closestPointToPoint(e,t){t.subVectors(e,this.origin);let n=t.dot(this.direction);return n<0?t.copy(this.origin):t.copy(this.origin).addScaledVector(this.direction,n)}distanceToPoint(e){return Math.sqrt(this.distanceSqToPoint(e))}distanceSqToPoint(e){let t=qp.subVectors(e,this.origin).dot(this.direction);return t<0?this.origin.distanceToSquared(e):(qp.copy(this.origin).addScaledVector(this.direction,t),qp.distanceToSquared(e))}distanceSqToSegment(e,t,n,r){Jp.copy(e).add(t).multiplyScalar(.5),Yp.copy(t).sub(e).normalize(),Xp.copy(this.origin).sub(Jp);let i=e.distanceTo(t)*.5,a=-this.direction.dot(Yp),o=Xp.dot(this.direction),s=-Xp.dot(Yp),c=Xp.lengthSq(),l=Math.abs(1-a*a),u,d,f,p;if(l>0)if(u=a*s-o,d=a*o-s,p=i*l,u>=0)if(d>=-p)if(d<=p){let e=1/l;u*=e,d*=e,f=u*(u+a*d+2*o)+d*(a*u+d+2*s)+c}else d=i,u=Math.max(0,-(a*d+o)),f=-u*u+d*(d+2*s)+c;else d=-i,u=Math.max(0,-(a*d+o)),f=-u*u+d*(d+2*s)+c;else d<=-p?(u=Math.max(0,-(-a*i+o)),d=u>0?-i:Math.min(Math.max(-i,-s),i),f=-u*u+d*(d+2*s)+c):d<=p?(u=0,d=Math.min(Math.max(-i,-s),i),f=d*(d+2*s)+c):(u=Math.max(0,-(a*i+o)),d=u>0?i:Math.min(Math.max(-i,-s),i),f=-u*u+d*(d+2*s)+c);else d=a>0?-i:i,u=Math.max(0,-(a*d+o)),f=-u*u+d*(d+2*s)+c;return n&&n.copy(this.origin).addScaledVector(this.direction,u),r&&r.copy(Jp).addScaledVector(Yp,d),f}intersectSphere(e,t){qp.subVectors(e.center,this.origin);let n=qp.dot(this.direction),r=qp.dot(qp)-n*n,i=e.radius*e.radius;if(r>i)return null;let a=Math.sqrt(i-r),o=n-a,s=n+a;return s<0?null:o<0?this.at(s,t):this.at(o,t)}intersectsSphere(e){return e.radius<0?!1:this.distanceSqToPoint(e.center)<=e.radius*e.radius}distanceToPlane(e){let t=e.normal.dot(this.direction);if(t===0)return e.distanceToPoint(this.origin)===0?0:null;let n=-(this.origin.dot(e.normal)+e.constant)/t;return n>=0?n:null}intersectPlane(e,t){let n=this.distanceToPlane(e);return n===null?null:this.at(n,t)}intersectsPlane(e){let t=e.distanceToPoint(this.origin);if(t===0)return!0;let n=e.normal.dot(this.direction);return n*t<0}intersectBox(e,t){let n,r,i,a,o,s,c=1/this.direction.x,l=1/this.direction.y,u=1/this.direction.z,d=this.origin;return c>=0?(n=(e.min.x-d.x)*c,r=(e.max.x-d.x)*c):(n=(e.max.x-d.x)*c,r=(e.min.x-d.x)*c),l>=0?(i=(e.min.y-d.y)*l,a=(e.max.y-d.y)*l):(i=(e.max.y-d.y)*l,a=(e.min.y-d.y)*l),n>a||i>r||((i>n||isNaN(n))&&(n=i),(a=0?(o=(e.min.z-d.z)*u,s=(e.max.z-d.z)*u):(o=(e.max.z-d.z)*u,s=(e.min.z-d.z)*u),n>s||o>r)||((o>n||n!==n)&&(n=o),(s=0?n:r,t)}intersectsBox(e){return this.intersectBox(e,qp)!==null}intersectTriangle(e,t,n,r,i){Zp.subVectors(t,e),Qp.subVectors(n,e),$p.crossVectors(Zp,Qp);let a=this.direction.dot($p),o;if(a>0){if(r)return null;o=1}else if(a<0)o=-1,a=-a;else return null;Xp.subVectors(this.origin,e);let s=o*this.direction.dot(Qp.crossVectors(Xp,Qp));if(s<0)return null;let c=o*this.direction.dot(Zp.cross(Xp));if(c<0||s+c>a)return null;let l=-o*Xp.dot($p);return l<0?null:this.at(l/a,i)}applyMatrix4(e){return this.origin.applyMatrix4(e),this.direction.transformDirection(e),this}equals(e){return e.origin.equals(this.origin)&&e.direction.equals(this.direction)}clone(){return new this.constructor().copy(this)}},G=class e{constructor(t,n,r,i,a,o,s,c,l,u,d,f,p,m,h,g){e.prototype.isMatrix4=!0,this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],t!==void 0&&this.set(t,n,r,i,a,o,s,c,l,u,d,f,p,m,h,g)}set(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h){let g=this.elements;return g[0]=e,g[4]=t,g[8]=n,g[12]=r,g[1]=i,g[5]=a,g[9]=o,g[13]=s,g[2]=c,g[6]=l,g[10]=u,g[14]=d,g[3]=f,g[7]=p,g[11]=m,g[15]=h,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}clone(){return new e().fromArray(this.elements)}copy(e){let t=this.elements,n=e.elements;return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],t[9]=n[9],t[10]=n[10],t[11]=n[11],t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15],this}copyPosition(e){let t=this.elements,n=e.elements;return t[12]=n[12],t[13]=n[13],t[14]=n[14],this}setFromMatrix3(e){let t=e.elements;return this.set(t[0],t[3],t[6],0,t[1],t[4],t[7],0,t[2],t[5],t[8],0,0,0,0,1),this}extractBasis(e,t,n){return e.setFromMatrixColumn(this,0),t.setFromMatrixColumn(this,1),n.setFromMatrixColumn(this,2),this}makeBasis(e,t,n){return this.set(e.x,t.x,n.x,0,e.y,t.y,n.y,0,e.z,t.z,n.z,0,0,0,0,1),this}extractRotation(e){let t=this.elements,n=e.elements,r=1/tm.setFromMatrixColumn(e,0).length(),i=1/tm.setFromMatrixColumn(e,1).length(),a=1/tm.setFromMatrixColumn(e,2).length();return t[0]=n[0]*r,t[1]=n[1]*r,t[2]=n[2]*r,t[3]=0,t[4]=n[4]*i,t[5]=n[5]*i,t[6]=n[6]*i,t[7]=0,t[8]=n[8]*a,t[9]=n[9]*a,t[10]=n[10]*a,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromEuler(e){let t=this.elements,n=e.x,r=e.y,i=e.z,a=Math.cos(n),o=Math.sin(n),s=Math.cos(r),c=Math.sin(r),l=Math.cos(i),u=Math.sin(i);if(e.order===`XYZ`){let e=a*l,n=a*u,r=o*l,i=o*u;t[0]=s*l,t[4]=-s*u,t[8]=c,t[1]=n+r*c,t[5]=e-i*c,t[9]=-o*s,t[2]=i-e*c,t[6]=r+n*c,t[10]=a*s}else if(e.order===`YXZ`){let e=s*l,n=s*u,r=c*l,i=c*u;t[0]=e+i*o,t[4]=r*o-n,t[8]=a*c,t[1]=a*u,t[5]=a*l,t[9]=-o,t[2]=n*o-r,t[6]=i+e*o,t[10]=a*s}else if(e.order===`ZXY`){let e=s*l,n=s*u,r=c*l,i=c*u;t[0]=e-i*o,t[4]=-a*u,t[8]=r+n*o,t[1]=n+r*o,t[5]=a*l,t[9]=i-e*o,t[2]=-a*c,t[6]=o,t[10]=a*s}else if(e.order===`ZYX`){let e=a*l,n=a*u,r=o*l,i=o*u;t[0]=s*l,t[4]=r*c-n,t[8]=e*c+i,t[1]=s*u,t[5]=i*c+e,t[9]=n*c-r,t[2]=-c,t[6]=o*s,t[10]=a*s}else if(e.order===`YZX`){let e=a*s,n=a*c,r=o*s,i=o*c;t[0]=s*l,t[4]=i-e*u,t[8]=r*u+n,t[1]=u,t[5]=a*l,t[9]=-o*l,t[2]=-c*l,t[6]=n*u+r,t[10]=e-i*u}else if(e.order===`XZY`){let e=a*s,n=a*c,r=o*s,i=o*c;t[0]=s*l,t[4]=-u,t[8]=c*l,t[1]=e*u+i,t[5]=a*l,t[9]=n*u-r,t[2]=r*u-n,t[6]=o*l,t[10]=i*u+e}return t[3]=0,t[7]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromQuaternion(e){return this.compose(rm,e,im)}lookAt(e,t,n){let r=this.elements;return sm.subVectors(e,t),sm.lengthSq()===0&&(sm.z=1),sm.normalize(),am.crossVectors(n,sm),am.lengthSq()===0&&(Math.abs(n.z)===1?sm.x+=1e-4:sm.z+=1e-4,sm.normalize(),am.crossVectors(n,sm)),am.normalize(),om.crossVectors(sm,am),r[0]=am.x,r[4]=om.x,r[8]=sm.x,r[1]=am.y,r[5]=om.y,r[9]=sm.y,r[2]=am.z,r[6]=om.z,r[10]=sm.z,this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){let n=e.elements,r=t.elements,i=this.elements,a=n[0],o=n[4],s=n[8],c=n[12],l=n[1],u=n[5],d=n[9],f=n[13],p=n[2],m=n[6],h=n[10],g=n[14],_=n[3],v=n[7],y=n[11],b=n[15],x=r[0],S=r[4],C=r[8],w=r[12],T=r[1],E=r[5],D=r[9],O=r[13],k=r[2],A=r[6],j=r[10],M=r[14],N=r[3],ee=r[7],te=r[11],P=r[15];return i[0]=a*x+o*T+s*k+c*N,i[4]=a*S+o*E+s*A+c*ee,i[8]=a*C+o*D+s*j+c*te,i[12]=a*w+o*O+s*M+c*P,i[1]=l*x+u*T+d*k+f*N,i[5]=l*S+u*E+d*A+f*ee,i[9]=l*C+u*D+d*j+f*te,i[13]=l*w+u*O+d*M+f*P,i[2]=p*x+m*T+h*k+g*N,i[6]=p*S+m*E+h*A+g*ee,i[10]=p*C+m*D+h*j+g*te,i[14]=p*w+m*O+h*M+g*P,i[3]=_*x+v*T+y*k+b*N,i[7]=_*S+v*E+y*A+b*ee,i[11]=_*C+v*D+y*j+b*te,i[15]=_*w+v*O+y*M+b*P,this}multiplyScalar(e){let t=this.elements;return t[0]*=e,t[4]*=e,t[8]*=e,t[12]*=e,t[1]*=e,t[5]*=e,t[9]*=e,t[13]*=e,t[2]*=e,t[6]*=e,t[10]*=e,t[14]*=e,t[3]*=e,t[7]*=e,t[11]*=e,t[15]*=e,this}determinant(){let e=this.elements,t=e[0],n=e[4],r=e[8],i=e[12],a=e[1],o=e[5],s=e[9],c=e[13],l=e[2],u=e[6],d=e[10],f=e[14],p=e[3],m=e[7],h=e[11],g=e[15];return p*(+i*s*u-r*c*u-i*o*d+n*c*d+r*o*f-n*s*f)+m*(+t*s*f-t*c*d+i*a*d-r*a*f+r*c*l-i*s*l)+h*(+t*c*u-t*o*f-i*a*u+n*a*f+i*o*l-n*c*l)+g*(-r*o*l-t*s*u+t*o*d+r*a*u-n*a*d+n*s*l)}transpose(){let e=this.elements,t;return t=e[1],e[1]=e[4],e[4]=t,t=e[2],e[2]=e[8],e[8]=t,t=e[6],e[6]=e[9],e[9]=t,t=e[3],e[3]=e[12],e[12]=t,t=e[7],e[7]=e[13],e[13]=t,t=e[11],e[11]=e[14],e[14]=t,this}setPosition(e,t,n){let r=this.elements;return e.isVector3?(r[12]=e.x,r[13]=e.y,r[14]=e.z):(r[12]=e,r[13]=t,r[14]=n),this}invert(){let e=this.elements,t=e[0],n=e[1],r=e[2],i=e[3],a=e[4],o=e[5],s=e[6],c=e[7],l=e[8],u=e[9],d=e[10],f=e[11],p=e[12],m=e[13],h=e[14],g=e[15],_=u*h*c-m*d*c+m*s*f-o*h*f-u*s*g+o*d*g,v=p*d*c-l*h*c-p*s*f+a*h*f+l*s*g-a*d*g,y=l*m*c-p*u*c+p*o*f-a*m*f-l*o*g+a*u*g,b=p*u*s-l*m*s-p*o*d+a*m*d+l*o*h-a*u*h,x=t*_+n*v+r*y+i*b;if(x===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);let S=1/x;return e[0]=_*S,e[1]=(m*d*i-u*h*i-m*r*f+n*h*f+u*r*g-n*d*g)*S,e[2]=(o*h*i-m*s*i+m*r*c-n*h*c-o*r*g+n*s*g)*S,e[3]=(u*s*i-o*d*i-u*r*c+n*d*c+o*r*f-n*s*f)*S,e[4]=v*S,e[5]=(l*h*i-p*d*i+p*r*f-t*h*f-l*r*g+t*d*g)*S,e[6]=(p*s*i-a*h*i-p*r*c+t*h*c+a*r*g-t*s*g)*S,e[7]=(a*d*i-l*s*i+l*r*c-t*d*c-a*r*f+t*s*f)*S,e[8]=y*S,e[9]=(p*u*i-l*m*i-p*n*f+t*m*f+l*n*g-t*u*g)*S,e[10]=(a*m*i-p*o*i+p*n*c-t*m*c-a*n*g+t*o*g)*S,e[11]=(l*o*i-a*u*i-l*n*c+t*u*c+a*n*f-t*o*f)*S,e[12]=b*S,e[13]=(l*m*r-p*u*r+p*n*d-t*m*d-l*n*h+t*u*h)*S,e[14]=(p*o*r-a*m*r-p*n*s+t*m*s+a*n*h-t*o*h)*S,e[15]=(a*u*r-l*o*r+l*n*s-t*u*s-a*n*d+t*o*d)*S,this}scale(e){let t=this.elements,n=e.x,r=e.y,i=e.z;return t[0]*=n,t[4]*=r,t[8]*=i,t[1]*=n,t[5]*=r,t[9]*=i,t[2]*=n,t[6]*=r,t[10]*=i,t[3]*=n,t[7]*=r,t[11]*=i,this}getMaxScaleOnAxis(){let e=this.elements,t=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],n=e[4]*e[4]+e[5]*e[5]+e[6]*e[6],r=e[8]*e[8]+e[9]*e[9]+e[10]*e[10];return Math.sqrt(Math.max(t,n,r))}makeTranslation(e,t,n){return e.isVector3?this.set(1,0,0,e.x,0,1,0,e.y,0,0,1,e.z,0,0,0,1):this.set(1,0,0,e,0,1,0,t,0,0,1,n,0,0,0,1),this}makeRotationX(e){let t=Math.cos(e),n=Math.sin(e);return this.set(1,0,0,0,0,t,-n,0,0,n,t,0,0,0,0,1),this}makeRotationY(e){let t=Math.cos(e),n=Math.sin(e);return this.set(t,0,n,0,0,1,0,0,-n,0,t,0,0,0,0,1),this}makeRotationZ(e){let t=Math.cos(e),n=Math.sin(e);return this.set(t,-n,0,0,n,t,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(e,t){let n=Math.cos(t),r=Math.sin(t),i=1-n,a=e.x,o=e.y,s=e.z,c=i*a,l=i*o;return this.set(c*a+n,c*o-r*s,c*s+r*o,0,c*o+r*s,l*o+n,l*s-r*a,0,c*s-r*o,l*s+r*a,i*s*s+n,0,0,0,0,1),this}makeScale(e,t,n){return this.set(e,0,0,0,0,t,0,0,0,0,n,0,0,0,0,1),this}makeShear(e,t,n,r,i,a){return this.set(1,n,i,0,e,1,a,0,t,r,1,0,0,0,0,1),this}compose(e,t,n){let r=this.elements,i=t._x,a=t._y,o=t._z,s=t._w,c=i+i,l=a+a,u=o+o,d=i*c,f=i*l,p=i*u,m=a*l,h=a*u,g=o*u,_=s*c,v=s*l,y=s*u,b=n.x,x=n.y,S=n.z;return r[0]=(1-(m+g))*b,r[1]=(f+y)*b,r[2]=(p-v)*b,r[3]=0,r[4]=(f-y)*x,r[5]=(1-(d+g))*x,r[6]=(h+_)*x,r[7]=0,r[8]=(p+v)*S,r[9]=(h-_)*S,r[10]=(1-(d+m))*S,r[11]=0,r[12]=e.x,r[13]=e.y,r[14]=e.z,r[15]=1,this}decompose(e,t,n){let r=this.elements,i=tm.set(r[0],r[1],r[2]).length(),a=tm.set(r[4],r[5],r[6]).length(),o=tm.set(r[8],r[9],r[10]).length(),s=this.determinant();s<0&&(i=-i),e.x=r[12],e.y=r[13],e.z=r[14],nm.copy(this);let c=1/i,l=1/a,u=1/o;return nm.elements[0]*=c,nm.elements[1]*=c,nm.elements[2]*=c,nm.elements[4]*=l,nm.elements[5]*=l,nm.elements[6]*=l,nm.elements[8]*=u,nm.elements[9]*=u,nm.elements[10]*=u,t.setFromRotationMatrix(nm),n.x=i,n.y=a,n.z=o,this}makePerspective(e,t,n,r,i,a,o=pf){let s=this.elements,c=2*i/(t-e),l=2*i/(n-r),u=(t+e)/(t-e),d=(n+r)/(n-r),f,p;if(o===pf)f=-(a+i)/(a-i),p=-2*a*i/(a-i);else if(o===mf)f=-a/(a-i),p=-a*i/(a-i);else throw Error(`THREE.Matrix4.makePerspective(): Invalid coordinate system: `+o);return s[0]=c,s[4]=0,s[8]=u,s[12]=0,s[1]=0,s[5]=l,s[9]=d,s[13]=0,s[2]=0,s[6]=0,s[10]=f,s[14]=p,s[3]=0,s[7]=0,s[11]=-1,s[15]=0,this}makeOrthographic(e,t,n,r,i,a,o=pf){let s=this.elements,c=1/(t-e),l=1/(n-r),u=1/(a-i),d=(t+e)*c,f=(n+r)*l,p,m;if(o===pf)p=(a+i)*u,m=-2*u;else if(o===mf)p=i*u,m=-1*u;else throw Error(`THREE.Matrix4.makeOrthographic(): Invalid coordinate system: `+o);return s[0]=2*c,s[4]=0,s[8]=0,s[12]=-d,s[1]=0,s[5]=2*l,s[9]=0,s[13]=-f,s[2]=0,s[6]=0,s[10]=m,s[14]=-p,s[3]=0,s[7]=0,s[11]=0,s[15]=1,this}equals(e){let t=this.elements,n=e.elements;for(let e=0;e<16;e++)if(t[e]!==n[e])return!1;return!0}fromArray(e,t=0){for(let n=0;n<16;n++)this.elements[n]=e[n+t];return this}toArray(e=[],t=0){let n=this.elements;return e[t]=n[0],e[t+1]=n[1],e[t+2]=n[2],e[t+3]=n[3],e[t+4]=n[4],e[t+5]=n[5],e[t+6]=n[6],e[t+7]=n[7],e[t+8]=n[8],e[t+9]=n[9],e[t+10]=n[10],e[t+11]=n[11],e[t+12]=n[12],e[t+13]=n[13],e[t+14]=n[14],e[t+15]=n[15],e}};const tm=new W,nm=new G,rm=new W(0,0,0),im=new W(1,1,1),am=new W,om=new W,sm=new W,cm=new G,lm=new Kf;var um=class e{constructor(t=0,n=0,r=0,i=e.DEFAULT_ORDER){this.isEuler=!0,this._x=t,this._y=n,this._z=r,this._order=i}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get order(){return this._order}set order(e){this._order=e,this._onChangeCallback()}set(e,t,n,r=this._order){return this._x=e,this._y=t,this._z=n,this._order=r,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(e){return this._x=e._x,this._y=e._y,this._z=e._z,this._order=e._order,this._onChangeCallback(),this}setFromRotationMatrix(e,t=this._order,n=!0){let r=e.elements,i=r[0],a=r[4],o=r[8],s=r[1],c=r[5],l=r[9],u=r[2],d=r[6],f=r[10];switch(t){case`XYZ`:this._y=Math.asin(wf(o,-1,1)),Math.abs(o)<.9999999?(this._x=Math.atan2(-l,f),this._z=Math.atan2(-a,i)):(this._x=Math.atan2(d,c),this._z=0);break;case`YXZ`:this._x=Math.asin(-wf(l,-1,1)),Math.abs(l)<.9999999?(this._y=Math.atan2(o,f),this._z=Math.atan2(s,c)):(this._y=Math.atan2(-u,i),this._z=0);break;case`ZXY`:this._x=Math.asin(wf(d,-1,1)),Math.abs(d)<.9999999?(this._y=Math.atan2(-u,f),this._z=Math.atan2(-a,c)):(this._y=0,this._z=Math.atan2(s,i));break;case`ZYX`:this._y=Math.asin(-wf(u,-1,1)),Math.abs(u)<.9999999?(this._x=Math.atan2(d,f),this._z=Math.atan2(s,i)):(this._x=0,this._z=Math.atan2(-a,c));break;case`YZX`:this._z=Math.asin(wf(s,-1,1)),Math.abs(s)<.9999999?(this._x=Math.atan2(-l,c),this._y=Math.atan2(-u,i)):(this._x=0,this._y=Math.atan2(o,f));break;case`XZY`:this._z=Math.asin(-wf(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(d,c),this._y=Math.atan2(o,i)):(this._x=Math.atan2(-l,f),this._y=0);break;default:console.warn(`THREE.Euler: .setFromRotationMatrix() encountered an unknown order: `+t)}return this._order=t,n===!0&&this._onChangeCallback(),this}setFromQuaternion(e,t,n){return cm.makeRotationFromQuaternion(e),this.setFromRotationMatrix(cm,t,n)}setFromVector3(e,t=this._order){return this.set(e.x,e.y,e.z,t)}reorder(e){return lm.setFromEuler(this),this.setFromQuaternion(lm,e)}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._order===this._order}fromArray(e){return this._x=e[0],this._y=e[1],this._z=e[2],e[3]!==void 0&&(this._order=e[3]),this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._order,e}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._order}};um.DEFAULT_ORDER=`XYZ`;var dm=class{constructor(){this.mask=1}set(e){this.mask=(1<>>0}enable(e){this.mask|=1<1){for(let e=0;e1){for(let e=0;e0&&(r.userData=this.userData),r.layers=this.layers.mask,r.matrix=this.matrix.toArray(),r.up=this.up.toArray(),this.matrixAutoUpdate===!1&&(r.matrixAutoUpdate=!1),this.isInstancedMesh&&(r.type=`InstancedMesh`,r.count=this.count,r.instanceMatrix=this.instanceMatrix.toJSON(),this.instanceColor!==null&&(r.instanceColor=this.instanceColor.toJSON())),this.isBatchedMesh&&(r.type=`BatchedMesh`,r.perObjectFrustumCulled=this.perObjectFrustumCulled,r.sortObjects=this.sortObjects,r.drawRanges=this._drawRanges,r.reservedRanges=this._reservedRanges,r.geometryInfo=this._geometryInfo.map(e=>({...e,boundingBox:e.boundingBox?e.boundingBox.toJSON():void 0,boundingSphere:e.boundingSphere?e.boundingSphere.toJSON():void 0})),r.instanceInfo=this._instanceInfo.map(e=>({...e})),r.availableInstanceIds=this._availableInstanceIds.slice(),r.availableGeometryIds=this._availableGeometryIds.slice(),r.nextIndexStart=this._nextIndexStart,r.nextVertexStart=this._nextVertexStart,r.geometryCount=this._geometryCount,r.maxInstanceCount=this._maxInstanceCount,r.maxVertexCount=this._maxVertexCount,r.maxIndexCount=this._maxIndexCount,r.geometryInitialized=this._geometryInitialized,r.matricesTexture=this._matricesTexture.toJSON(e),r.indirectTexture=this._indirectTexture.toJSON(e),this._colorsTexture!==null&&(r.colorsTexture=this._colorsTexture.toJSON(e)),this.boundingSphere!==null&&(r.boundingSphere=this.boundingSphere.toJSON()),this.boundingBox!==null&&(r.boundingBox=this.boundingBox.toJSON()));function i(t,n){return t[n.uuid]===void 0&&(t[n.uuid]=n.toJSON(e)),n.uuid}if(this.isScene)this.background&&(this.background.isColor?r.background=this.background.toJSON():this.background.isTexture&&(r.background=this.background.toJSON(e).uuid)),this.environment&&this.environment.isTexture&&this.environment.isRenderTargetTexture!==!0&&(r.environment=this.environment.toJSON(e).uuid);else if(this.isMesh||this.isLine||this.isPoints){r.geometry=i(e.geometries,this.geometry);let t=this.geometry.parameters;if(t!==void 0&&t.shapes!==void 0){let n=t.shapes;if(Array.isArray(n))for(let t=0,r=n.length;t0){r.children=[];for(let t=0;t0){r.animations=[];for(let t=0;t0&&(n.geometries=t),r.length>0&&(n.materials=r),i.length>0&&(n.textures=i),o.length>0&&(n.images=o),s.length>0&&(n.shapes=s),c.length>0&&(n.skeletons=c),l.length>0&&(n.animations=l),u.length>0&&(n.nodes=u)}return n.object=r,n;function a(e){let t=[];for(let n in e){let r=e[n];delete r.metadata,t.push(r)}return t}}clone(e){return new this.constructor().copy(this,e)}copy(e,t=!0){if(this.name=e.name,this.up.copy(e.up),this.position.copy(e.position),this.rotation.order=e.rotation.order,this.quaternion.copy(e.quaternion),this.scale.copy(e.scale),this.matrix.copy(e.matrix),this.matrixWorld.copy(e.matrixWorld),this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrixWorldAutoUpdate=e.matrixWorldAutoUpdate,this.matrixWorldNeedsUpdate=e.matrixWorldNeedsUpdate,this.layers.mask=e.layers.mask,this.visible=e.visible,this.castShadow=e.castShadow,this.receiveShadow=e.receiveShadow,this.frustumCulled=e.frustumCulled,this.renderOrder=e.renderOrder,this.animations=e.animations.slice(),this.userData=JSON.parse(JSON.stringify(e.userData)),t===!0)for(let t=0;t0?r.multiplyScalar(1/Math.sqrt(i)):r.set(0,0,0)}static getBarycoord(e,t,n,r,i){Om.subVectors(r,t),km.subVectors(n,t),Am.subVectors(e,t);let a=Om.dot(Om),o=Om.dot(km),s=Om.dot(Am),c=km.dot(km),l=km.dot(Am),u=a*c-o*o;if(u===0)return i.set(0,0,0),null;let d=1/u,f=(c*s-o*l)*d,p=(a*l-o*s)*d;return i.set(1-f-p,p,f)}static containsPoint(e,t,n,r){return this.getBarycoord(e,t,n,r,jm)===null?!1:jm.x>=0&&jm.y>=0&&jm.x+jm.y<=1}static getInterpolation(e,t,n,r,i,a,o,s){return this.getBarycoord(e,t,n,r,jm)===null?(s.x=0,s.y=0,`z`in s&&(s.z=0),`w`in s&&(s.w=0),null):(s.setScalar(0),s.addScaledVector(i,jm.x),s.addScaledVector(a,jm.y),s.addScaledVector(o,jm.z),s)}static getInterpolatedAttribute(e,t,n,r,i,a){return Rm.setScalar(0),zm.setScalar(0),Bm.setScalar(0),Rm.fromBufferAttribute(e,t),zm.fromBufferAttribute(e,n),Bm.fromBufferAttribute(e,r),a.setScalar(0),a.addScaledVector(Rm,i.x),a.addScaledVector(zm,i.y),a.addScaledVector(Bm,i.z),a}static isFrontFacing(e,t,n,r){return Om.subVectors(n,t),km.subVectors(e,t),Om.cross(km).dot(r)<0}set(e,t,n){return this.a.copy(e),this.b.copy(t),this.c.copy(n),this}setFromPointsAndIndices(e,t,n,r){return this.a.copy(e[t]),this.b.copy(e[n]),this.c.copy(e[r]),this}setFromAttributeAndIndices(e,t,n,r){return this.a.fromBufferAttribute(e,t),this.b.fromBufferAttribute(e,n),this.c.fromBufferAttribute(e,r),this}clone(){return new this.constructor().copy(this)}copy(e){return this.a.copy(e.a),this.b.copy(e.b),this.c.copy(e.c),this}getArea(){return Om.subVectors(this.c,this.b),km.subVectors(this.a,this.b),Om.cross(km).length()*.5}getMidpoint(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(t){return e.getNormal(this.a,this.b,this.c,t)}getPlane(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(t,n){return e.getBarycoord(t,this.a,this.b,this.c,n)}getInterpolation(t,n,r,i,a){return e.getInterpolation(t,this.a,this.b,this.c,n,r,i,a)}containsPoint(t){return e.containsPoint(t,this.a,this.b,this.c)}isFrontFacing(t){return e.isFrontFacing(this.a,this.b,this.c,t)}intersectsBox(e){return e.intersectsTriangle(this)}closestPointToPoint(e,t){let n=this.a,r=this.b,i=this.c,a,o;Mm.subVectors(r,n),Nm.subVectors(i,n),Fm.subVectors(e,n);let s=Mm.dot(Fm),c=Nm.dot(Fm);if(s<=0&&c<=0)return t.copy(n);Im.subVectors(e,r);let l=Mm.dot(Im),u=Nm.dot(Im);if(l>=0&&u<=l)return t.copy(r);let d=s*u-l*c;if(d<=0&&s>=0&&l<=0)return a=s/(s-l),t.copy(n).addScaledVector(Mm,a);Lm.subVectors(e,i);let f=Mm.dot(Lm),p=Nm.dot(Lm);if(p>=0&&f<=p)return t.copy(i);let m=f*c-s*p;if(m<=0&&c>=0&&p<=0)return o=c/(c-p),t.copy(n).addScaledVector(Nm,o);let h=l*p-f*u;if(h<=0&&u-l>=0&&f-p>=0)return Pm.subVectors(i,r),o=(u-l)/(u-l+(f-p)),t.copy(r).addScaledVector(Pm,o);let g=1/(h+m+d);return a=m*g,o=d*g,t.copy(n).addScaledVector(Mm,a).addScaledVector(Nm,o)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}};const Hm={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},Um={h:0,s:0,l:0},Wm={h:0,s:0,l:0};function Gm(e,t,n){return n<0&&(n+=1),n>1&&--n,n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*6*(2/3-n):e}var K=class{constructor(e,t,n){return this.isColor=!0,this.r=1,this.g=1,this.b=1,this.set(e,t,n)}set(e,t,n){if(t===void 0&&n===void 0){let t=e;t&&t.isColor?this.copy(t):typeof t==`number`?this.setHex(t):typeof t==`string`&&this.setStyle(t)}else this.setRGB(e,t,n);return this}setScalar(e){return this.r=e,this.g=e,this.b=e,this}setHex(e,t=Ed){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(e&255)/255,up.colorSpaceToWorking(this,t),this}setRGB(e,t,n,r=up.workingColorSpace){return this.r=e,this.g=t,this.b=n,up.colorSpaceToWorking(this,r),this}setHSL(e,t,n,r=up.workingColorSpace){if(e=Tf(e,1),t=wf(t,0,1),n=wf(n,0,1),t===0)this.r=this.g=this.b=n;else{let r=n<=.5?n*(1+t):n+t-n*t,i=2*n-r;this.r=Gm(i,r,e+1/3),this.g=Gm(i,r,e),this.b=Gm(i,r,e-1/3)}return up.colorSpaceToWorking(this,r),this}setStyle(e,t=Ed){function n(t){t!==void 0&&parseFloat(t)<1&&console.warn(`THREE.Color: Alpha component of `+e+` will be ignored.`)}let r;if(r=/^(\w+)\(([^\)]*)\)/.exec(e)){let i,a=r[1],o=r[2];switch(a){case`rgb`:case`rgba`:if(i=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(o))return n(i[4]),this.setRGB(Math.min(255,parseInt(i[1],10))/255,Math.min(255,parseInt(i[2],10))/255,Math.min(255,parseInt(i[3],10))/255,t);if(i=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(o))return n(i[4]),this.setRGB(Math.min(100,parseInt(i[1],10))/100,Math.min(100,parseInt(i[2],10))/100,Math.min(100,parseInt(i[3],10))/100,t);break;case`hsl`:case`hsla`:if(i=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(o))return n(i[4]),this.setHSL(parseFloat(i[1])/360,parseFloat(i[2])/100,parseFloat(i[3])/100,t);break;default:console.warn(`THREE.Color: Unknown color model `+e)}}else if(r=/^\#([A-Fa-f\d]+)$/.exec(e)){let n=r[1],i=n.length;if(i===3)return this.setRGB(parseInt(n.charAt(0),16)/15,parseInt(n.charAt(1),16)/15,parseInt(n.charAt(2),16)/15,t);if(i===6)return this.setHex(parseInt(n,16),t);console.warn(`THREE.Color: Invalid hex color `+e)}else if(e&&e.length>0)return this.setColorName(e,t);return this}setColorName(e,t=Ed){let n=Hm[e.toLowerCase()];return n===void 0?console.warn(`THREE.Color: Unknown color `+e):this.setHex(n,t),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(e){return this.r=e.r,this.g=e.g,this.b=e.b,this}copySRGBToLinear(e){return this.r=dp(e.r),this.g=dp(e.g),this.b=dp(e.b),this}copyLinearToSRGB(e){return this.r=fp(e.r),this.g=fp(e.g),this.b=fp(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(e=Ed){return up.workingToColorSpace(Km.copy(this),e),Math.round(wf(Km.r*255,0,255))*65536+Math.round(wf(Km.g*255,0,255))*256+Math.round(wf(Km.b*255,0,255))}getHexString(e=Ed){return(`000000`+this.getHex(e).toString(16)).slice(-6)}getHSL(e,t=up.workingColorSpace){up.workingToColorSpace(Km.copy(this),t);let n=Km.r,r=Km.g,i=Km.b,a=Math.max(n,r,i),o=Math.min(n,r,i),s,c,l=(o+a)/2;if(o===a)s=0,c=0;else{let e=a-o;switch(c=l<=.5?e/(a+o):e/(2-a-o),a){case n:s=(r-i)/e+(r0!=e>0&&this.version++,this._alphaTest=e}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(e){if(e!==void 0)for(let t in e){let n=e[t];if(n===void 0){console.warn(`THREE.Material: parameter '${t}' has value of undefined.`);continue}let r=this[t];if(r===void 0){console.warn(`THREE.Material: '${t}' is not a property of THREE.${this.type}.`);continue}r&&r.isColor?r.set(n):r&&r.isVector3&&n&&n.isVector3?r.copy(n):this[t]=n}}toJSON(e){let t=e===void 0||typeof e==`string`;t&&(e={textures:{},images:{}});let n={metadata:{version:4.7,type:`Material`,generator:`Material.toJSON`}};n.uuid=this.uuid,n.type=this.type,this.name!==``&&(n.name=this.name),this.color&&this.color.isColor&&(n.color=this.color.getHex()),this.roughness!==void 0&&(n.roughness=this.roughness),this.metalness!==void 0&&(n.metalness=this.metalness),this.sheen!==void 0&&(n.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(n.sheenColor=this.sheenColor.getHex()),this.sheenRoughness!==void 0&&(n.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(n.emissive=this.emissive.getHex()),this.emissiveIntensity!==void 0&&this.emissiveIntensity!==1&&(n.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(n.specular=this.specular.getHex()),this.specularIntensity!==void 0&&(n.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(n.specularColor=this.specularColor.getHex()),this.shininess!==void 0&&(n.shininess=this.shininess),this.clearcoat!==void 0&&(n.clearcoat=this.clearcoat),this.clearcoatRoughness!==void 0&&(n.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(n.clearcoatMap=this.clearcoatMap.toJSON(e).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(n.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(e).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(n.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(e).uuid,n.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.dispersion!==void 0&&(n.dispersion=this.dispersion),this.iridescence!==void 0&&(n.iridescence=this.iridescence),this.iridescenceIOR!==void 0&&(n.iridescenceIOR=this.iridescenceIOR),this.iridescenceThicknessRange!==void 0&&(n.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(n.iridescenceMap=this.iridescenceMap.toJSON(e).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(n.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(e).uuid),this.anisotropy!==void 0&&(n.anisotropy=this.anisotropy),this.anisotropyRotation!==void 0&&(n.anisotropyRotation=this.anisotropyRotation),this.anisotropyMap&&this.anisotropyMap.isTexture&&(n.anisotropyMap=this.anisotropyMap.toJSON(e).uuid),this.map&&this.map.isTexture&&(n.map=this.map.toJSON(e).uuid),this.matcap&&this.matcap.isTexture&&(n.matcap=this.matcap.toJSON(e).uuid),this.alphaMap&&this.alphaMap.isTexture&&(n.alphaMap=this.alphaMap.toJSON(e).uuid),this.lightMap&&this.lightMap.isTexture&&(n.lightMap=this.lightMap.toJSON(e).uuid,n.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(n.aoMap=this.aoMap.toJSON(e).uuid,n.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(n.bumpMap=this.bumpMap.toJSON(e).uuid,n.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(n.normalMap=this.normalMap.toJSON(e).uuid,n.normalMapType=this.normalMapType,n.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(n.displacementMap=this.displacementMap.toJSON(e).uuid,n.displacementScale=this.displacementScale,n.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(n.roughnessMap=this.roughnessMap.toJSON(e).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(n.metalnessMap=this.metalnessMap.toJSON(e).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(n.emissiveMap=this.emissiveMap.toJSON(e).uuid),this.specularMap&&this.specularMap.isTexture&&(n.specularMap=this.specularMap.toJSON(e).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(n.specularIntensityMap=this.specularIntensityMap.toJSON(e).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(n.specularColorMap=this.specularColorMap.toJSON(e).uuid),this.envMap&&this.envMap.isTexture&&(n.envMap=this.envMap.toJSON(e).uuid,this.combine!==void 0&&(n.combine=this.combine)),this.envMapRotation!==void 0&&(n.envMapRotation=this.envMapRotation.toArray()),this.envMapIntensity!==void 0&&(n.envMapIntensity=this.envMapIntensity),this.reflectivity!==void 0&&(n.reflectivity=this.reflectivity),this.refractionRatio!==void 0&&(n.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(n.gradientMap=this.gradientMap.toJSON(e).uuid),this.transmission!==void 0&&(n.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(n.transmissionMap=this.transmissionMap.toJSON(e).uuid),this.thickness!==void 0&&(n.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(n.thicknessMap=this.thicknessMap.toJSON(e).uuid),this.attenuationDistance!==void 0&&this.attenuationDistance!==1/0&&(n.attenuationDistance=this.attenuationDistance),this.attenuationColor!==void 0&&(n.attenuationColor=this.attenuationColor.getHex()),this.size!==void 0&&(n.size=this.size),this.shadowSide!==null&&(n.shadowSide=this.shadowSide),this.sizeAttenuation!==void 0&&(n.sizeAttenuation=this.sizeAttenuation),this.blending!==qc&&(n.blending=this.blending),this.side!==Uc&&(n.side=this.side),this.vertexColors===!0&&(n.vertexColors=!0),this.opacity<1&&(n.opacity=this.opacity),this.transparent===!0&&(n.transparent=!0),this.blendSrc!==sl&&(n.blendSrc=this.blendSrc),this.blendDst!==cl&&(n.blendDst=this.blendDst),this.blendEquation!==Qc&&(n.blendEquation=this.blendEquation),this.blendSrcAlpha!==null&&(n.blendSrcAlpha=this.blendSrcAlpha),this.blendDstAlpha!==null&&(n.blendDstAlpha=this.blendDstAlpha),this.blendEquationAlpha!==null&&(n.blendEquationAlpha=this.blendEquationAlpha),this.blendColor&&this.blendColor.isColor&&(n.blendColor=this.blendColor.getHex()),this.blendAlpha!==0&&(n.blendAlpha=this.blendAlpha),this.depthFunc!==xl&&(n.depthFunc=this.depthFunc),this.depthTest===!1&&(n.depthTest=this.depthTest),this.depthWrite===!1&&(n.depthWrite=this.depthWrite),this.colorWrite===!1&&(n.colorWrite=this.colorWrite),this.stencilWriteMask!==255&&(n.stencilWriteMask=this.stencilWriteMask),this.stencilFunc!==Gd&&(n.stencilFunc=this.stencilFunc),this.stencilRef!==0&&(n.stencilRef=this.stencilRef),this.stencilFuncMask!==255&&(n.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==jd&&(n.stencilFail=this.stencilFail),this.stencilZFail!==jd&&(n.stencilZFail=this.stencilZFail),this.stencilZPass!==jd&&(n.stencilZPass=this.stencilZPass),this.stencilWrite===!0&&(n.stencilWrite=this.stencilWrite),this.rotation!==void 0&&this.rotation!==0&&(n.rotation=this.rotation),this.polygonOffset===!0&&(n.polygonOffset=!0),this.polygonOffsetFactor!==0&&(n.polygonOffsetFactor=this.polygonOffsetFactor),this.polygonOffsetUnits!==0&&(n.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth!==void 0&&this.linewidth!==1&&(n.linewidth=this.linewidth),this.dashSize!==void 0&&(n.dashSize=this.dashSize),this.gapSize!==void 0&&(n.gapSize=this.gapSize),this.scale!==void 0&&(n.scale=this.scale),this.dithering===!0&&(n.dithering=!0),this.alphaTest>0&&(n.alphaTest=this.alphaTest),this.alphaHash===!0&&(n.alphaHash=!0),this.alphaToCoverage===!0&&(n.alphaToCoverage=!0),this.premultipliedAlpha===!0&&(n.premultipliedAlpha=!0),this.forceSinglePass===!0&&(n.forceSinglePass=!0),this.wireframe===!0&&(n.wireframe=!0),this.wireframeLinewidth>1&&(n.wireframeLinewidth=this.wireframeLinewidth),this.wireframeLinecap!==`round`&&(n.wireframeLinecap=this.wireframeLinecap),this.wireframeLinejoin!==`round`&&(n.wireframeLinejoin=this.wireframeLinejoin),this.flatShading===!0&&(n.flatShading=!0),this.visible===!1&&(n.visible=!1),this.toneMapped===!1&&(n.toneMapped=!1),this.fog===!1&&(n.fog=!1),Object.keys(this.userData).length>0&&(n.userData=this.userData);function r(e){let t=[];for(let n in e){let r=e[n];delete r.metadata,t.push(r)}return t}if(t){let t=r(e.textures),i=r(e.images);t.length>0&&(n.textures=t),i.length>0&&(n.images=i)}return n}clone(){return new this.constructor().copy(this)}copy(e){this.name=e.name,this.blending=e.blending,this.side=e.side,this.vertexColors=e.vertexColors,this.opacity=e.opacity,this.transparent=e.transparent,this.blendSrc=e.blendSrc,this.blendDst=e.blendDst,this.blendEquation=e.blendEquation,this.blendSrcAlpha=e.blendSrcAlpha,this.blendDstAlpha=e.blendDstAlpha,this.blendEquationAlpha=e.blendEquationAlpha,this.blendColor.copy(e.blendColor),this.blendAlpha=e.blendAlpha,this.depthFunc=e.depthFunc,this.depthTest=e.depthTest,this.depthWrite=e.depthWrite,this.stencilWriteMask=e.stencilWriteMask,this.stencilFunc=e.stencilFunc,this.stencilRef=e.stencilRef,this.stencilFuncMask=e.stencilFuncMask,this.stencilFail=e.stencilFail,this.stencilZFail=e.stencilZFail,this.stencilZPass=e.stencilZPass,this.stencilWrite=e.stencilWrite;let t=e.clippingPlanes,n=null;if(t!==null){let e=t.length;n=Array(e);for(let r=0;r!==e;++r)n[r]=t[r].clone()}return this.clippingPlanes=n,this.clipIntersection=e.clipIntersection,this.clipShadows=e.clipShadows,this.shadowSide=e.shadowSide,this.colorWrite=e.colorWrite,this.precision=e.precision,this.polygonOffset=e.polygonOffset,this.polygonOffsetFactor=e.polygonOffsetFactor,this.polygonOffsetUnits=e.polygonOffsetUnits,this.dithering=e.dithering,this.alphaTest=e.alphaTest,this.alphaHash=e.alphaHash,this.alphaToCoverage=e.alphaToCoverage,this.premultipliedAlpha=e.premultipliedAlpha,this.forceSinglePass=e.forceSinglePass,this.visible=e.visible,this.toneMapped=e.toneMapped,this.userData=JSON.parse(JSON.stringify(e.userData)),this}dispose(){this.dispatchEvent({type:`dispose`})}set needsUpdate(e){e===!0&&this.version++}},Ym=class extends Jm{constructor(e){super(),this.isMeshBasicMaterial=!0,this.type=`MeshBasicMaterial`,this.color=new K(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new um,this.combine=El,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap=`round`,this.wireframeLinejoin=`round`,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapRotation.copy(e.envMapRotation),this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.fog=e.fog,this}};const Xm=Zm();function Zm(){let e=new ArrayBuffer(4),t=new Float32Array(e),n=new Uint32Array(e),r=new Uint32Array(512),i=new Uint32Array(512);for(let e=0;e<256;++e){let t=e-127;t<-27?(r[e]=0,r[e|256]=32768,i[e]=24,i[e|256]=24):t<-14?(r[e]=1024>>-t-14,r[e|256]=1024>>-t-14|32768,i[e]=-t-1,i[e|256]=-t-1):t<=15?(r[e]=t+15<<10,r[e|256]=t+15<<10|32768,i[e]=13,i[e|256]=13):t<128?(r[e]=31744,r[e|256]=64512,i[e]=24,i[e|256]=24):(r[e]=31744,r[e|256]=64512,i[e]=13,i[e|256]=13)}let a=new Uint32Array(2048),o=new Uint32Array(64),s=new Uint32Array(64);for(let e=1;e<1024;++e){let t=e<<13,n=0;for(;!(t&8388608);)t<<=1,n-=8388608;t&=-8388609,n+=947912704,a[e]=t|n}for(let e=1024;e<2048;++e)a[e]=939524096+(e-1024<<13);for(let e=1;e<31;++e)o[e]=e<<23;o[31]=1199570944,o[32]=2147483648;for(let e=33;e<63;++e)o[e]=2147483648+(e-32<<23);o[63]=3347054592;for(let e=1;e<64;++e)e!==32&&(s[e]=1024);return{floatView:t,uint32View:n,baseTable:r,shiftTable:i,mantissaTable:a,exponentTable:o,offsetTable:s}}function Qm(e){Math.abs(e)>65504&&console.warn(`THREE.DataUtils.toHalfFloat(): Value out of range.`),e=wf(e,-65504,65504),Xm.floatView[0]=e;let t=Xm.uint32View[0],n=t>>23&511;return Xm.baseTable[n]+((t&8388607)>>Xm.shiftTable[n])}function $m(e){let t=e>>10;return Xm.uint32View[0]=Xm.mantissaTable[Xm.offsetTable[t]+(e&1023)]+Xm.exponentTable[t],Xm.floatView[0]}var eh=class{static toHalfFloat(e){return Qm(e)}static fromHalfFloat(e){return $m(e)}};const th=new W,nh=new U;let rh=0;var ih=class{constructor(e,t,n=!1){if(Array.isArray(e))throw TypeError(`THREE.BufferAttribute: array should be a Typed Array.`);this.isBufferAttribute=!0,Object.defineProperty(this,`id`,{value:rh++}),this.name=``,this.array=e,this.itemSize=t,this.count=e===void 0?0:e.length/t,this.normalized=n,this.usage=ef,this.updateRanges=[],this.gpuType=uu,this.version=0}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}setUsage(e){return this.usage=e,this}addUpdateRange(e,t){this.updateRanges.push({start:e,count:t})}clearUpdateRanges(){this.updateRanges.length=0}copy(e){return this.name=e.name,this.array=new e.array.constructor(e.array),this.itemSize=e.itemSize,this.count=e.count,this.normalized=e.normalized,this.usage=e.usage,this.gpuType=e.gpuType,this}copyAt(e,t,n){e*=this.itemSize,n*=t.itemSize;for(let r=0,i=this.itemSize;rt.count&&console.warn(`THREE.BufferGeometry: Buffer size too small for points data. Use .dispose() and create a new geometry.`),t.needsUpdate=!0}return this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new Op);let e=this.attributes.position,t=this.morphAttributes.position;if(e&&e.isGLBufferAttribute){console.error(`THREE.BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box.`,this),this.boundingBox.set(new W(-1/0,-1/0,-1/0),new W(1/0,1/0,1/0));return}if(e!==void 0){if(this.boundingBox.setFromBufferAttribute(e),t)for(let e=0,n=t.length;e0&&(e.userData=this.userData),this.parameters!==void 0){let t=this.parameters;for(let n in t)t[n]!==void 0&&(e[n]=t[n]);return e}e.data={attributes:{}};let t=this.index;t!==null&&(e.data.index={type:t.array.constructor.name,array:Array.prototype.slice.call(t.array)});let n=this.attributes;for(let t in n){let r=n[t];e.data.attributes[t]=r.toJSON(e.data)}let r={},i=!1;for(let t in this.morphAttributes){let n=this.morphAttributes[t],a=[];for(let t=0,r=n.length;t0&&(r[t]=a,i=!0)}i&&(e.data.morphAttributes=r,e.data.morphTargetsRelative=this.morphTargetsRelative);let a=this.groups;a.length>0&&(e.data.groups=JSON.parse(JSON.stringify(a)));let o=this.boundingSphere;return o!==null&&(e.data.boundingSphere=o.toJSON()),e}clone(){return new this.constructor().copy(this)}copy(e){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;let t={};this.name=e.name;let n=e.index;n!==null&&this.setIndex(n.clone());let r=e.attributes;for(let e in r){let n=r[e];this.setAttribute(e,n.clone(t))}let i=e.morphAttributes;for(let e in i){let n=[],r=i[e];for(let e=0,i=r.length;e0){let e=t[n[0]];if(e!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let t=0,n=e.length;t(e.far-e.near)**2))&&(xh.copy(i).invert(),Sh.copy(e.ray).applyMatrix4(xh),!(n.boundingBox!==null&&Sh.intersectsBox(n.boundingBox)===!1)&&this._computeIntersections(e,t,Sh)))}_computeIntersections(e,t,n){let r,i=this.geometry,a=this.material,o=i.index,s=i.attributes.position,c=i.attributes.uv,l=i.attributes.uv1,u=i.attributes.normal,d=i.groups,f=i.drawRange;if(o!==null)if(Array.isArray(a))for(let i=0,s=d.length;in.far?null:{distance:l,point:jh.clone(),object:e}}function Ph(e,t,n,r,i,a,o,s,c,l){e.getVertexPosition(s,Th),e.getVertexPosition(c,Eh),e.getVertexPosition(l,Dh);let u=Nh(e,t,n,r,Th,Eh,Dh,Ah);if(u){let e=new W;Vm.getBarycoord(Ah,Th,Eh,Dh,e),i&&(u.uv=Vm.getInterpolatedAttribute(i,s,c,l,e,new U)),a&&(u.uv1=Vm.getInterpolatedAttribute(a,s,c,l,e,new U)),o&&(u.normal=Vm.getInterpolatedAttribute(o,s,c,l,e,new W),u.normal.dot(r.direction)>0&&u.normal.multiplyScalar(-1));let t={a:s,b:c,c:l,normal:new W,materialIndex:0};Vm.getNormal(Th,Eh,Dh,t.normal),u.face=t,u.barycoord=e}return u}var Fh=class e extends bh{constructor(e=1,t=1,n=1,r=1,i=1,a=1){super(),this.type=`BoxGeometry`,this.parameters={width:e,height:t,depth:n,widthSegments:r,heightSegments:i,depthSegments:a};let o=this;r=Math.floor(r),i=Math.floor(i),a=Math.floor(a);let s=[],c=[],l=[],u=[],d=0,f=0;p(`z`,`y`,`x`,-1,-1,n,t,e,a,i,0),p(`z`,`y`,`x`,1,-1,n,t,-e,a,i,1),p(`x`,`z`,`y`,1,1,e,n,t,r,a,2),p(`x`,`z`,`y`,1,-1,e,n,-t,r,a,3),p(`x`,`y`,`z`,1,-1,e,t,n,r,i,4),p(`x`,`y`,`z`,-1,-1,e,t,-n,r,i,5),this.setIndex(s),this.setAttribute(`position`,new q(c,3)),this.setAttribute(`normal`,new q(l,3)),this.setAttribute(`uv`,new q(u,2));function p(e,t,n,r,i,a,p,m,h,g,_){let v=a/h,y=p/g,b=a/2,x=p/2,S=m/2,C=h+1,w=g+1,T=0,E=0,D=new W;for(let a=0;a0?1:-1,l.push(D.x,D.y,D.z),u.push(s/h),u.push(1-a/g),T+=1}}for(let e=0;e0&&(t.defines=this.defines),t.vertexShader=this.vertexShader,t.fragmentShader=this.fragmentShader,t.lights=this.lights,t.clipping=this.clipping;let n={};for(let e in this.extensions)this.extensions[e]===!0&&(n[e]=!0);return Object.keys(n).length>0&&(t.extensions=n),t}},Rg=class extends xh{constructor(){super(),this.isCamera=!0,this.type=`Camera`,this.matrixWorldInverse=new G,this.projectionMatrix=new G,this.projectionMatrixInverse=new G,this.coordinateSystem=sp}copy(e,t){return super.copy(e,t),this.matrixWorldInverse.copy(e.matrixWorldInverse),this.projectionMatrix.copy(e.projectionMatrix),this.projectionMatrixInverse.copy(e.projectionMatrixInverse),this.coordinateSystem=e.coordinateSystem,this}getWorldDirection(e){return super.getWorldDirection(e).negate()}updateMatrixWorld(e){super.updateMatrixWorld(e),this.matrixWorldInverse.copy(this.matrixWorld).invert()}updateWorldMatrix(e,t){super.updateWorldMatrix(e,t),this.matrixWorldInverse.copy(this.matrixWorld).invert()}clone(){return new this.constructor().copy(this)}};const zg=new W,Bg=new U,Vg=new U;var Hg=class extends Rg{constructor(e=50,t=1,n=.1,r=2e3){super(),this.isPerspectiveCamera=!0,this.type=`PerspectiveCamera`,this.fov=e,this.zoom=1,this.near=n,this.far=r,this.focus=10,this.aspect=t,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}copy(e,t){return super.copy(e,t),this.fov=e.fov,this.zoom=e.zoom,this.near=e.near,this.far=e.far,this.focus=e.focus,this.aspect=e.aspect,this.view=e.view===null?null:Object.assign({},e.view),this.filmGauge=e.filmGauge,this.filmOffset=e.filmOffset,this}setFocalLength(e){let t=.5*this.getFilmHeight()/e;this.fov=gp*2*Math.atan(t),this.updateProjectionMatrix()}getFocalLength(){let e=Math.tan(hp*.5*this.fov);return .5*this.getFilmHeight()/e}getEffectiveFOV(){return gp*2*Math.atan(Math.tan(hp*.5*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}getViewBounds(e,t,n){zg.set(-1,-1,.5).applyMatrix4(this.projectionMatrixInverse),t.set(zg.x,zg.y).multiplyScalar(-e/zg.z),zg.set(1,1,.5).applyMatrix4(this.projectionMatrixInverse),n.set(zg.x,zg.y).multiplyScalar(-e/zg.z)}getViewSize(e,t){return this.getViewBounds(e,Bg,Vg),t.subVectors(Vg,Bg)}setViewOffset(e,t,n,r,i,a){this.aspect=e/t,this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=n,this.view.offsetY=r,this.view.width=i,this.view.height=a,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){let e=this.near,t=e*Math.tan(hp*.5*this.fov)/this.zoom,n=2*t,r=this.aspect*n,i=-.5*r,a=this.view;if(this.view!==null&&this.view.enabled){let e=a.fullWidth,o=a.fullHeight;i+=a.offsetX*r/e,t-=a.offsetY*n/o,r*=a.width/e,n*=a.height/o}let o=this.filmOffset;o!==0&&(i+=e*o/this.getFilmWidth()),this.projectionMatrix.makePerspective(i,i+r,t,t-n,e,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){let t=super.toJSON(e);return t.object.fov=this.fov,t.object.zoom=this.zoom,t.object.near=this.near,t.object.far=this.far,t.object.focus=this.focus,t.object.aspect=this.aspect,this.view!==null&&(t.object.view=Object.assign({},this.view)),t.object.filmGauge=this.filmGauge,t.object.filmOffset=this.filmOffset,t}};const Ug=-90,Wg=1;var Gg=class extends xh{constructor(e,t,n){super(),this.type=`CubeCamera`,this.renderTarget=n,this.coordinateSystem=null,this.activeMipmapLevel=0;let r=new Hg(Ug,Wg,e,t);r.layers=this.layers,this.add(r);let i=new Hg(Ug,Wg,e,t);i.layers=this.layers,this.add(i);let a=new Hg(Ug,Wg,e,t);a.layers=this.layers,this.add(a);let o=new Hg(Ug,Wg,e,t);o.layers=this.layers,this.add(o);let s=new Hg(Ug,Wg,e,t);s.layers=this.layers,this.add(s);let c=new Hg(Ug,Wg,e,t);c.layers=this.layers,this.add(c)}updateCoordinateSystem(){let e=this.coordinateSystem,t=this.children.concat(),[n,r,i,a,o,s]=t;for(let e of t)this.remove(e);if(e===sp)n.up.set(0,1,0),n.lookAt(1,0,0),r.up.set(0,1,0),r.lookAt(-1,0,0),i.up.set(0,0,-1),i.lookAt(0,1,0),a.up.set(0,0,1),a.lookAt(0,-1,0),o.up.set(0,1,0),o.lookAt(0,0,1),s.up.set(0,1,0),s.lookAt(0,0,-1);else if(e===cp)n.up.set(0,-1,0),n.lookAt(-1,0,0),r.up.set(0,-1,0),r.lookAt(1,0,0),i.up.set(0,0,1),i.lookAt(0,1,0),a.up.set(0,0,-1),a.lookAt(0,-1,0),o.up.set(0,-1,0),o.lookAt(0,0,1),s.up.set(0,-1,0),s.lookAt(0,0,-1);else throw Error(`THREE.CubeCamera.updateCoordinateSystem(): Invalid coordinate system: `+e);for(let e of t)this.add(e),e.updateMatrixWorld()}update(e,t){this.parent===null&&this.updateMatrixWorld();let{renderTarget:n,activeMipmapLevel:r}=this;this.coordinateSystem!==e.coordinateSystem&&(this.coordinateSystem=e.coordinateSystem,this.updateCoordinateSystem());let[i,a,o,s,c,l]=this.children,u=e.getRenderTarget(),d=e.getActiveCubeFace(),f=e.getActiveMipmapLevel(),p=e.xr.enabled;e.xr.enabled=!1;let m=n.texture.generateMipmaps;n.texture.generateMipmaps=!1,e.setRenderTarget(n,0,r),e.render(t,i),e.setRenderTarget(n,1,r),e.render(t,a),e.setRenderTarget(n,2,r),e.render(t,o),e.setRenderTarget(n,3,r),e.render(t,s),e.setRenderTarget(n,4,r),e.render(t,c),n.texture.generateMipmaps=m,e.setRenderTarget(n,5,r),e.render(t,l),e.setRenderTarget(u,d,f),e.xr.enabled=p,n.texture.needsPMREMUpdate=!0}},Kg=class extends mm{constructor(e=[],t=Pu,n,r,i,a,o,s,c,l){super(e,t,n,r,i,a,o,s,c,l),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(e){this.image=e}},qg=class extends _m{constructor(e=1,t={}){super(e,e,t),this.isWebGLCubeRenderTarget=!0;let n={width:e,height:e,depth:1},r=[n,n,n,n,n,n];this.texture=new Kg(r),this._setTextureOptions(t),this.texture.isRenderTargetTexture=!0}fromEquirectangularTexture(e,t){this.texture.type=t.type,this.texture.colorSpace=t.colorSpace,this.texture.generateMipmaps=t.generateMipmaps,this.texture.minFilter=t.minFilter,this.texture.magFilter=t.magFilter;let n={uniforms:{tEquirect:{value:null}},vertexShader:` +}`,Uh=class extends Jm{constructor(e){super(),this.isShaderMaterial=!0,this.type=`ShaderMaterial`,this.defines={},this.uniforms={},this.uniformsGroups=[],this.vertexShader=Vh,this.fragmentShader=Hh,this.linewidth=1,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.clipping=!1,this.forceSinglePass=!0,this.extensions={clipCullDistance:!1,multiDraw:!1},this.defaultAttributeValues={color:[1,1,1],uv:[0,0],uv1:[0,0]},this.index0AttributeName=void 0,this.uniformsNeedUpdate=!1,this.glslVersion=null,e!==void 0&&this.setValues(e)}copy(e){return super.copy(e),this.fragmentShader=e.fragmentShader,this.vertexShader=e.vertexShader,this.uniforms=Ih(e.uniforms),this.uniformsGroups=Rh(e.uniformsGroups),this.defines=Object.assign({},e.defines),this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.fog=e.fog,this.lights=e.lights,this.clipping=e.clipping,this.extensions=Object.assign({},e.extensions),this.glslVersion=e.glslVersion,this}toJSON(e){let t=super.toJSON(e);for(let n in t.glslVersion=this.glslVersion,t.uniforms={},this.uniforms){let r=this.uniforms[n],i=r.value;i&&i.isTexture?t.uniforms[n]={type:`t`,value:i.toJSON(e).uuid}:i&&i.isColor?t.uniforms[n]={type:`c`,value:i.getHex()}:i&&i.isVector2?t.uniforms[n]={type:`v2`,value:i.toArray()}:i&&i.isVector3?t.uniforms[n]={type:`v3`,value:i.toArray()}:i&&i.isVector4?t.uniforms[n]={type:`v4`,value:i.toArray()}:i&&i.isMatrix3?t.uniforms[n]={type:`m3`,value:i.toArray()}:i&&i.isMatrix4?t.uniforms[n]={type:`m4`,value:i.toArray()}:t.uniforms[n]={value:i}}Object.keys(this.defines).length>0&&(t.defines=this.defines),t.vertexShader=this.vertexShader,t.fragmentShader=this.fragmentShader,t.lights=this.lights,t.clipping=this.clipping;let n={};for(let e in this.extensions)this.extensions[e]===!0&&(n[e]=!0);return Object.keys(n).length>0&&(t.extensions=n),t}},Wh=class extends Dm{constructor(){super(),this.isCamera=!0,this.type=`Camera`,this.matrixWorldInverse=new G,this.projectionMatrix=new G,this.projectionMatrixInverse=new G,this.coordinateSystem=pf}copy(e,t){return super.copy(e,t),this.matrixWorldInverse.copy(e.matrixWorldInverse),this.projectionMatrix.copy(e.projectionMatrix),this.projectionMatrixInverse.copy(e.projectionMatrixInverse),this.coordinateSystem=e.coordinateSystem,this}getWorldDirection(e){return super.getWorldDirection(e).negate()}updateMatrixWorld(e){super.updateMatrixWorld(e),this.matrixWorldInverse.copy(this.matrixWorld).invert()}updateWorldMatrix(e,t){super.updateWorldMatrix(e,t),this.matrixWorldInverse.copy(this.matrixWorld).invert()}clone(){return new this.constructor().copy(this)}};const Gh=new W,Kh=new U,qh=new U;var Jh=class extends Wh{constructor(e=50,t=1,n=.1,r=2e3){super(),this.isPerspectiveCamera=!0,this.type=`PerspectiveCamera`,this.fov=e,this.zoom=1,this.near=n,this.far=r,this.focus=10,this.aspect=t,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}copy(e,t){return super.copy(e,t),this.fov=e.fov,this.zoom=e.zoom,this.near=e.near,this.far=e.far,this.focus=e.focus,this.aspect=e.aspect,this.view=e.view===null?null:Object.assign({},e.view),this.filmGauge=e.filmGauge,this.filmOffset=e.filmOffset,this}setFocalLength(e){let t=.5*this.getFilmHeight()/e;this.fov=Sf*2*Math.atan(t),this.updateProjectionMatrix()}getFocalLength(){let e=Math.tan(xf*.5*this.fov);return .5*this.getFilmHeight()/e}getEffectiveFOV(){return Sf*2*Math.atan(Math.tan(xf*.5*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}getViewBounds(e,t,n){Gh.set(-1,-1,.5).applyMatrix4(this.projectionMatrixInverse),t.set(Gh.x,Gh.y).multiplyScalar(-e/Gh.z),Gh.set(1,1,.5).applyMatrix4(this.projectionMatrixInverse),n.set(Gh.x,Gh.y).multiplyScalar(-e/Gh.z)}getViewSize(e,t){return this.getViewBounds(e,Kh,qh),t.subVectors(qh,Kh)}setViewOffset(e,t,n,r,i,a){this.aspect=e/t,this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=n,this.view.offsetY=r,this.view.width=i,this.view.height=a,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){let e=this.near,t=e*Math.tan(xf*.5*this.fov)/this.zoom,n=2*t,r=this.aspect*n,i=-.5*r,a=this.view;if(this.view!==null&&this.view.enabled){let e=a.fullWidth,o=a.fullHeight;i+=a.offsetX*r/e,t-=a.offsetY*n/o,r*=a.width/e,n*=a.height/o}let o=this.filmOffset;o!==0&&(i+=e*o/this.getFilmWidth()),this.projectionMatrix.makePerspective(i,i+r,t,t-n,e,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){let t=super.toJSON(e);return t.object.fov=this.fov,t.object.zoom=this.zoom,t.object.near=this.near,t.object.far=this.far,t.object.focus=this.focus,t.object.aspect=this.aspect,this.view!==null&&(t.object.view=Object.assign({},this.view)),t.object.filmGauge=this.filmGauge,t.object.filmOffset=this.filmOffset,t}};const Yh=-90,Xh=1;var Zh=class extends Dm{constructor(e,t,n){super(),this.type=`CubeCamera`,this.renderTarget=n,this.coordinateSystem=null,this.activeMipmapLevel=0;let r=new Jh(Yh,Xh,e,t);r.layers=this.layers,this.add(r);let i=new Jh(Yh,Xh,e,t);i.layers=this.layers,this.add(i);let a=new Jh(Yh,Xh,e,t);a.layers=this.layers,this.add(a);let o=new Jh(Yh,Xh,e,t);o.layers=this.layers,this.add(o);let s=new Jh(Yh,Xh,e,t);s.layers=this.layers,this.add(s);let c=new Jh(Yh,Xh,e,t);c.layers=this.layers,this.add(c)}updateCoordinateSystem(){let e=this.coordinateSystem,t=this.children.concat(),[n,r,i,a,o,s]=t;for(let e of t)this.remove(e);if(e===pf)n.up.set(0,1,0),n.lookAt(1,0,0),r.up.set(0,1,0),r.lookAt(-1,0,0),i.up.set(0,0,-1),i.lookAt(0,1,0),a.up.set(0,0,1),a.lookAt(0,-1,0),o.up.set(0,1,0),o.lookAt(0,0,1),s.up.set(0,1,0),s.lookAt(0,0,-1);else if(e===mf)n.up.set(0,-1,0),n.lookAt(-1,0,0),r.up.set(0,-1,0),r.lookAt(1,0,0),i.up.set(0,0,1),i.lookAt(0,1,0),a.up.set(0,0,-1),a.lookAt(0,-1,0),o.up.set(0,-1,0),o.lookAt(0,0,1),s.up.set(0,-1,0),s.lookAt(0,0,-1);else throw Error(`THREE.CubeCamera.updateCoordinateSystem(): Invalid coordinate system: `+e);for(let e of t)this.add(e),e.updateMatrixWorld()}update(e,t){this.parent===null&&this.updateMatrixWorld();let{renderTarget:n,activeMipmapLevel:r}=this;this.coordinateSystem!==e.coordinateSystem&&(this.coordinateSystem=e.coordinateSystem,this.updateCoordinateSystem());let[i,a,o,s,c,l]=this.children,u=e.getRenderTarget(),d=e.getActiveCubeFace(),f=e.getActiveMipmapLevel(),p=e.xr.enabled;e.xr.enabled=!1;let m=n.texture.generateMipmaps;n.texture.generateMipmaps=!1,e.setRenderTarget(n,0,r),e.render(t,i),e.setRenderTarget(n,1,r),e.render(t,a),e.setRenderTarget(n,2,r),e.render(t,o),e.setRenderTarget(n,3,r),e.render(t,s),e.setRenderTarget(n,4,r),e.render(t,c),n.texture.generateMipmaps=m,e.setRenderTarget(n,5,r),e.render(t,l),e.setRenderTarget(u,d,f),e.xr.enabled=p,n.texture.needsPMREMUpdate=!0}},Qh=class extends bp{constructor(e=[],t=Bl,n,r,i,a,o,s,c,l){super(e,t,n,r,i,a,o,s,c,l),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(e){this.image=e}},$h=class extends Cp{constructor(e=1,t={}){super(e,e,t),this.isWebGLCubeRenderTarget=!0;let n={width:e,height:e,depth:1},r=[n,n,n,n,n,n];this.texture=new Qh(r),this._setTextureOptions(t),this.texture.isRenderTargetTexture=!0}fromEquirectangularTexture(e,t){this.texture.type=t.type,this.texture.colorSpace=t.colorSpace,this.texture.generateMipmaps=t.generateMipmaps,this.texture.minFilter=t.minFilter,this.texture.magFilter=t.magFilter;let n={uniforms:{tEquirect:{value:null}},vertexShader:` varying vec3 vWorldDirection; @@ -47,9 +53,9 @@ function Rr(e,t){return A(e)?(()=>S({name:e.name},t,{setup:e}))():e}function zr( gl_FragColor = texture2D( tEquirect, sampleUV ); } - `},r=new kg(5,5,5),i=new Lg({name:`CubemapFromEquirect`,uniforms:Ag(n.uniforms),vertexShader:n.vertexShader,fragmentShader:n.fragmentShader,side:Rl,blending:Bl});i.uniforms.tEquirect.value=t;let a=new Eg(r,i),o=t.minFilter;t.minFilter===Xu&&(t.minFilter=qu);let s=new Gg(1,10,this);return s.update(e,a),t.minFilter=o,a.geometry.dispose(),a.material.dispose(),this}clear(e,t=!0,n=!0,r=!0){let i=e.getRenderTarget();for(let i=0;i<6;i++)e.setRenderTarget(this,i),e.clear(t,n,r);e.setRenderTarget(i)}},Jg=class extends xh{constructor(){super(),this.isGroup=!0,this.type=`Group`}};const Yg={type:`move`};var Xg=class{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return this._hand===null&&(this._hand=new Jg,this._hand.matrixAutoUpdate=!1,this._hand.visible=!1,this._hand.joints={},this._hand.inputState={pinching:!1}),this._hand}getTargetRaySpace(){return this._targetRay===null&&(this._targetRay=new Jg,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new W,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new W),this._targetRay}getGripSpace(){return this._grip===null&&(this._grip=new Jg,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new W,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new W),this._grip}dispatchEvent(e){return this._targetRay!==null&&this._targetRay.dispatchEvent(e),this._grip!==null&&this._grip.dispatchEvent(e),this._hand!==null&&this._hand.dispatchEvent(e),this}connect(e){if(e&&e.hand){let t=this._hand;if(t)for(let n of e.hand.values())this._getHandJoint(t,n)}return this.dispatchEvent({type:`connected`,data:e}),this}disconnect(e){return this.dispatchEvent({type:`disconnected`,data:e}),this._targetRay!==null&&(this._targetRay.visible=!1),this._grip!==null&&(this._grip.visible=!1),this._hand!==null&&(this._hand.visible=!1),this}update(e,t,n){let r=null,i=null,a=null,o=this._targetRay,s=this._grip,c=this._hand;if(e&&t.session.visibilityState!==`visible-blurred`){if(c&&e.hand){a=!0;for(let r of e.hand.values()){let e=t.getJointPose(r,n),i=this._getHandJoint(c,r);e!==null&&(i.matrix.fromArray(e.transform.matrix),i.matrix.decompose(i.position,i.rotation,i.scale),i.matrixWorldNeedsUpdate=!0,i.jointRadius=e.radius),i.visible=e!==null}let r=c.joints[`index-finger-tip`],i=c.joints[`thumb-tip`],o=r.position.distanceTo(i.position),s=.02,l=.005;c.inputState.pinching&&o>s+l?(c.inputState.pinching=!1,this.dispatchEvent({type:`pinchend`,handedness:e.handedness,target:this})):!c.inputState.pinching&&o<=s-l&&(c.inputState.pinching=!0,this.dispatchEvent({type:`pinchstart`,handedness:e.handedness,target:this}))}else s!==null&&e.gripSpace&&(i=t.getPose(e.gripSpace,n),i!==null&&(s.matrix.fromArray(i.transform.matrix),s.matrix.decompose(s.position,s.rotation,s.scale),s.matrixWorldNeedsUpdate=!0,i.linearVelocity?(s.hasLinearVelocity=!0,s.linearVelocity.copy(i.linearVelocity)):s.hasLinearVelocity=!1,i.angularVelocity?(s.hasAngularVelocity=!0,s.angularVelocity.copy(i.angularVelocity)):s.hasAngularVelocity=!1));o!==null&&(r=t.getPose(e.targetRaySpace,n),r===null&&i!==null&&(r=i),r!==null&&(o.matrix.fromArray(r.transform.matrix),o.matrix.decompose(o.position,o.rotation,o.scale),o.matrixWorldNeedsUpdate=!0,r.linearVelocity?(o.hasLinearVelocity=!0,o.linearVelocity.copy(r.linearVelocity)):o.hasLinearVelocity=!1,r.angularVelocity?(o.hasAngularVelocity=!0,o.angularVelocity.copy(r.angularVelocity)):o.hasAngularVelocity=!1,this.dispatchEvent(Yg)))}return o!==null&&(o.visible=r!==null),s!==null&&(s.visible=i!==null),c!==null&&(c.visible=a!==null),this}_getHandJoint(e,t){if(e.joints[t.jointName]===void 0){let n=new Jg;n.matrixAutoUpdate=!1,n.visible=!1,e.joints[t.jointName]=n,e.add(n)}return e.joints[t.jointName]}},Zg=class e{constructor(e,t=25e-5){this.isFogExp2=!0,this.name=``,this.color=new K(e),this.density=t}clone(){return new e(this.color,this.density)}toJSON(){return{type:`FogExp2`,name:this.name,color:this.color.getHex(),density:this.density}}},Qg=class e{constructor(e,t=1,n=1e3){this.isFog=!0,this.name=``,this.color=new K(e),this.near=t,this.far=n}clone(){return new e(this.color,this.near,this.far)}toJSON(){return{type:`Fog`,name:this.name,color:this.color.getHex(),near:this.near,far:this.far}}},$g=class extends xh{constructor(){super(),this.isScene=!0,this.type=`Scene`,this.background=null,this.environment=null,this.fog=null,this.backgroundBlurriness=0,this.backgroundIntensity=1,this.backgroundRotation=new ih,this.environmentIntensity=1,this.environmentRotation=new ih,this.overrideMaterial=null,typeof __THREE_DEVTOOLS__<`u`&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent(`observe`,{detail:this}))}copy(e,t){return super.copy(e,t),e.background!==null&&(this.background=e.background.clone()),e.environment!==null&&(this.environment=e.environment.clone()),e.fog!==null&&(this.fog=e.fog.clone()),this.backgroundBlurriness=e.backgroundBlurriness,this.backgroundIntensity=e.backgroundIntensity,this.backgroundRotation.copy(e.backgroundRotation),this.environmentIntensity=e.environmentIntensity,this.environmentRotation.copy(e.environmentRotation),e.overrideMaterial!==null&&(this.overrideMaterial=e.overrideMaterial.clone()),this.matrixAutoUpdate=e.matrixAutoUpdate,this}toJSON(e){let t=super.toJSON(e);return this.fog!==null&&(t.object.fog=this.fog.toJSON()),this.backgroundBlurriness>0&&(t.object.backgroundBlurriness=this.backgroundBlurriness),this.backgroundIntensity!==1&&(t.object.backgroundIntensity=this.backgroundIntensity),t.object.backgroundRotation=this.backgroundRotation.toArray(),this.environmentIntensity!==1&&(t.object.environmentIntensity=this.environmentIntensity),t.object.environmentRotation=this.environmentRotation.toArray(),t}},e_=class{constructor(e,t){this.isInterleavedBuffer=!0,this.array=e,this.stride=t,this.count=e===void 0?0:e.length/t,this.usage=Xf,this.updateRanges=[],this.version=0,this.uuid=_p()}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}setUsage(e){return this.usage=e,this}addUpdateRange(e,t){this.updateRanges.push({start:e,count:t})}clearUpdateRanges(){this.updateRanges.length=0}copy(e){return this.array=new e.array.constructor(e.array),this.count=e.count,this.stride=e.stride,this.usage=e.usage,this}copyAt(e,t,n){e*=this.stride,n*=t.stride;for(let r=0,i=this.stride;re.far||t.push({distance:s,point:a_.clone(),uv:Fh.getInterpolation(a_,d_,f_,p_,m_,h_,g_,new U),face:null,object:this})}copy(e,t){return super.copy(e,t),e.center!==void 0&&this.center.copy(e.center),this.material=e.material,this}};function v_(e,t,n,r,i,a){c_.subVectors(e,n).addScalar(.5).multiply(r),i===void 0?l_.copy(c_):(l_.x=a*c_.x-i*c_.y,l_.y=i*c_.x+a*c_.y),e.copy(t),e.x+=l_.x,e.y+=l_.y,e.applyMatrix4(u_)}const y_=new W,b_=new W;var x_=class extends xh{constructor(){super(),this.isLOD=!0,this._currentLevel=0,this.type=`LOD`,Object.defineProperties(this,{levels:{enumerable:!0,value:[]}}),this.autoUpdate=!0}copy(e){super.copy(e,!1);let t=e.levels;for(let e=0,n=t.length;e0){let n,r;for(n=1,r=t.length;n0){y_.setFromMatrixPosition(this.matrixWorld);let n=e.ray.origin.distanceTo(y_);this.getObjectForDistance(n).raycast(e,t)}}update(e){let t=this.levels;if(t.length>1){y_.setFromMatrixPosition(e.matrixWorld),b_.setFromMatrixPosition(this.matrixWorld);let n=y_.distanceTo(b_)/e.zoom;t[0].object.visible=!0;let r,i;for(r=1,i=t.length;r=e)t[r-1].object.visible=!1,t[r].object.visible=!0;else break}for(this._currentLevel=r-1;r1?null:t.copy(e.start).addScaledVector(n,i)}intersectsLine(e){let t=this.distanceToPoint(e.start),n=this.distanceToPoint(e.end);return t<0&&n>0||n<0&&t>0}intersectsBox(e){return e.intersectsPlane(this)}intersectsSphere(e){return e.intersectsPlane(this)}coplanarPoint(e){return e.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(e,t){let n=t||J_.getNormalMatrix(e),r=this.coplanarPoint(K_).applyMatrix4(e),i=this.normal.applyMatrix3(n).normalize();return this.constant=-r.dot(i),this}translate(e){return this.constant-=e.dot(this.normal),this}equals(e){return e.normal.equals(this.normal)&&e.constant===this.constant}clone(){return new this.constructor().copy(this)}};const X_=new Bm,Z_=new W;var Q_=class{constructor(e=new Y_,t=new Y_,n=new Y_,r=new Y_,i=new Y_,a=new Y_){this.planes=[e,t,n,r,i,a]}set(e,t,n,r,i,a){let o=this.planes;return o[0].copy(e),o[1].copy(t),o[2].copy(n),o[3].copy(r),o[4].copy(i),o[5].copy(a),this}copy(e){let t=this.planes;for(let n=0;n<6;n++)t[n].copy(e.planes[n]);return this}setFromProjectionMatrix(e,t=sp){let n=this.planes,r=e.elements,i=r[0],a=r[1],o=r[2],s=r[3],c=r[4],l=r[5],u=r[6],d=r[7],f=r[8],p=r[9],m=r[10],h=r[11],g=r[12],_=r[13],v=r[14],y=r[15];if(n[0].setComponents(s-i,d-c,h-f,y-g).normalize(),n[1].setComponents(s+i,d+c,h+f,y+g).normalize(),n[2].setComponents(s+a,d+l,h+p,y+_).normalize(),n[3].setComponents(s-a,d-l,h-p,y-_).normalize(),n[4].setComponents(s-o,d-u,h-m,y-v).normalize(),t===sp)n[5].setComponents(s+o,d+u,h+m,y+v).normalize();else if(t===cp)n[5].setComponents(o,u,m,v).normalize();else throw Error(`THREE.Frustum.setFromProjectionMatrix(): Invalid coordinate system: `+t);return this}intersectsObject(e){if(e.boundingSphere!==void 0)e.boundingSphere===null&&e.computeBoundingSphere(),X_.copy(e.boundingSphere).applyMatrix4(e.matrixWorld);else{let t=e.geometry;t.boundingSphere===null&&t.computeBoundingSphere(),X_.copy(t.boundingSphere).applyMatrix4(e.matrixWorld)}return this.intersectsSphere(X_)}intersectsSprite(e){return X_.center.set(0,0,0),X_.radius=.7071067811865476,X_.applyMatrix4(e.matrixWorld),this.intersectsSphere(X_)}intersectsSphere(e){let t=this.planes,n=e.center,r=-e.radius;for(let e=0;e<6;e++){let i=t[e].distanceToPoint(n);if(i0?e.max.x:e.min.x,Z_.y=r.normal.y>0?e.max.y:e.min.y,Z_.z=r.normal.z>0?e.max.z:e.min.z,r.distanceToPoint(Z_)<0)return!1}return!0}containsPoint(e){let t=this.planes;for(let n=0;n<6;n++)if(t[n].distanceToPoint(e)<0)return!1;return!0}clone(){return new this.constructor().copy(this)}};const $_=new G,ev=new Q_;var tv=class e{constructor(){this.coordinateSystem=sp}intersectsObject(e,t){if(!t.isArrayCamera||t.cameras.length===0)return!1;for(let n=0;n=i.length&&i.push({start:-1,count:-1,z:-1,index:-1});let o=i[this.index];a.push(o),this.index++,o.start=e,o.count=t,o.z=n,o.index=r}reset(){this.list.length=0,this.index=0}};const ov=new G,sv=new K(1,1,1),cv=new Q_,lv=new tv,uv=new Sm,dv=new Bm,fv=new W,pv=new W,mv=new W,hv=new av,gv=new Eg,_v=[];function vv(e,t,n=0){let r=t.itemSize;if(e.isInterleavedBufferAttribute||e.array.constructor!==t.array.constructor){let i=e.count;for(let a=0;a65535?new Uint32Array(r):new Uint16Array(r);t.setIndex(new Qh(e,1))}this._geometryInitialized=!0}}_validateGeometry(e){let t=this.geometry;if(!!e.getIndex()!=!!t.getIndex())throw Error(`THREE.BatchedMesh: All geometries must consistently have "index".`);for(let n in t.attributes){if(!e.hasAttribute(n))throw Error(`THREE.BatchedMesh: Added geometry missing "${n}". All geometries must have consistent attributes.`);let r=e.getAttribute(n),i=t.getAttribute(n);if(r.itemSize!==i.itemSize||r.normalized!==i.normalized)throw Error(`THREE.BatchedMesh: All attributes must have a consistent itemSize and normalized value.`)}}validateInstanceId(e){let t=this._instanceInfo;if(e<0||e>=t.length||t[e].active===!1)throw Error(`THREE.BatchedMesh: Invalid instanceId ${e}. Instance is either out of range or has been deleted.`)}validateGeometryId(e){let t=this._geometryInfo;if(e<0||e>=t.length||t[e].active===!1)throw Error(`THREE.BatchedMesh: Invalid geometryId ${e}. Geometry is either out of range or has been deleted.`)}setCustomSort(e){return this.customSort=e,this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new Sm);let e=this.boundingBox,t=this._instanceInfo;e.makeEmpty();for(let n=0,r=t.length;n=this.maxInstanceCount;if(t&&this._availableInstanceIds.length===0)throw Error(`THREE.BatchedMesh: Maximum item count reached.`);let n={visible:!0,active:!0,geometryIndex:e},r=null;this._availableInstanceIds.length>0?(this._availableInstanceIds.sort(nv),r=this._availableInstanceIds.shift(),this._instanceInfo[r]=n):(r=this._instanceInfo.length,this._instanceInfo.push(n));let i=this._matricesTexture;ov.identity().toArray(i.image.data,r*16),i.needsUpdate=!0;let a=this._colorsTexture;return a&&(sv.toArray(a.image.data,r*4),a.needsUpdate=!0),this._visibilityChanged=!0,r}addGeometry(e,t=-1,n=-1){this._initializeGeometry(e),this._validateGeometry(e);let r={vertexStart:-1,vertexCount:-1,reservedVertexCount:-1,indexStart:-1,indexCount:-1,reservedIndexCount:-1,start:-1,count:-1,boundingBox:null,boundingSphere:null,active:!0},i=this._geometryInfo;r.vertexStart=this._nextVertexStart,r.reservedVertexCount=t===-1?e.getAttribute(`position`).count:t;let a=e.getIndex(),o=a!==null;if(o&&(r.indexStart=this._nextIndexStart,r.reservedIndexCount=n===-1?a.count:n),r.indexStart!==-1&&r.indexStart+r.reservedIndexCount>this._maxIndexCount||r.vertexStart+r.reservedVertexCount>this._maxVertexCount)throw Error(`THREE.BatchedMesh: Reserved space request exceeds the maximum buffer size.`);let s;return this._availableGeometryIds.length>0?(this._availableGeometryIds.sort(nv),s=this._availableGeometryIds.shift(),i[s]=r):(s=this._geometryCount,this._geometryCount++,i.push(r)),this.setGeometryAt(s,e),this._nextIndexStart=r.indexStart+r.reservedIndexCount,this._nextVertexStart=r.vertexStart+r.reservedVertexCount,s}setGeometryAt(e,t){if(e>=this._geometryCount)throw Error(`THREE.BatchedMesh: Maximum geometry count reached.`);this._validateGeometry(t);let n=this.geometry,r=n.getIndex()!==null,i=n.getIndex(),a=t.getIndex(),o=this._geometryInfo[e];if(r&&a.count>o.reservedIndexCount||t.attributes.position.count>o.reservedVertexCount)throw Error(`THREE.BatchedMesh: Reserved space not large enough for provided geometry.`);let s=o.vertexStart,c=o.reservedVertexCount;for(let e in o.vertexCount=t.getAttribute(`position`).count,n.attributes){let r=t.getAttribute(e),i=n.getAttribute(e);vv(r,i,s);let a=r.itemSize;for(let e=r.count,t=c;e=t.length||t[e].active===!1)return this;let n=this._instanceInfo;for(let t=0,r=n.length;tt).sort((e,t)=>n[e].vertexStart-n[t].vertexStart),i=this.geometry;for(let a=0,o=n.length;a=this._geometryCount)return null;let n=this.geometry,r=this._geometryInfo[e];if(r.boundingBox===null){let e=new Sm,t=n.index,i=n.attributes.position;for(let n=r.start,a=r.start+r.count;n=this._geometryCount)return null;let n=this.geometry,r=this._geometryInfo[e];if(r.boundingSphere===null){let t=new Bm;this.getBoundingBoxAt(e,uv),uv.getCenter(t.center);let i=n.index,a=n.attributes.position,o=0;for(let e=r.start,n=r.start+r.count;ee.active),r=Math.max(...n.map(e=>e.vertexStart+e.reservedVertexCount));if(r>e)throw Error(`BatchedMesh: Geometry vertex values are being used outside the range ${t}. Cannot shrink further.`);if(this.geometry.index){let e=Math.max(...n.map(e=>e.indexStart+e.reservedIndexCount));if(e>t)throw Error(`BatchedMesh: Geometry index values are being used outside the range ${t}. Cannot shrink further.`)}let i=this.geometry;i.dispose(),this._maxVertexCount=e,this._maxIndexCount=t,this._geometryInitialized&&(this._geometryInitialized=!1,this.geometry=new mg,this._initializeGeometry(i));let a=this.geometry;for(let e in i.index&&yv(i.index.array,a.index.array),i.attributes)yv(i.attributes[e].array,a.attributes[e].array)}raycast(e,t){let n=this._instanceInfo,r=this._geometryInfo,i=this.matrixWorld,a=this.geometry;gv.material=this.material,gv.geometry.index=a.index,gv.geometry.attributes=a.attributes,gv.geometry.boundingBox===null&&(gv.geometry.boundingBox=new Sm),gv.geometry.boundingSphere===null&&(gv.geometry.boundingSphere=new Bm);for(let a=0,o=n.length;a({...e,boundingBox:e.boundingBox===null?null:e.boundingBox.clone(),boundingSphere:e.boundingSphere===null?null:e.boundingSphere.clone()})),this._instanceInfo=e._instanceInfo.map(e=>({...e})),this._availableInstanceIds=e._availableInstanceIds.slice(),this._availableGeometryIds=e._availableGeometryIds.slice(),this._nextIndexStart=e._nextIndexStart,this._nextVertexStart=e._nextVertexStart,this._geometryCount=e._geometryCount,this._maxInstanceCount=e._maxInstanceCount,this._maxVertexCount=e._maxVertexCount,this._maxIndexCount=e._maxIndexCount,this._geometryInitialized=e._geometryInitialized,this._multiDrawCounts=e._multiDrawCounts.slice(),this._multiDrawStarts=e._multiDrawStarts.slice(),this._indirectTexture=e._indirectTexture.clone(),this._indirectTexture.image.data=this._indirectTexture.image.data.slice(),this._matricesTexture=e._matricesTexture.clone(),this._matricesTexture.image.data=this._matricesTexture.image.data.slice(),this._colorsTexture!==null&&(this._colorsTexture=e._colorsTexture.clone(),this._colorsTexture.image.data=this._colorsTexture.image.data.slice()),this}dispose(){this.geometry.dispose(),this._matricesTexture.dispose(),this._matricesTexture=null,this._indirectTexture.dispose(),this._indirectTexture=null,this._colorsTexture!==null&&(this._colorsTexture.dispose(),this._colorsTexture=null)}onBeforeRender(e,t,n,r,i){if(!this._visibilityChanged&&!this.perObjectFrustumCulled&&!this.sortObjects)return;let a=r.getIndex(),o=a===null?1:a.array.BYTES_PER_ELEMENT,s=this._instanceInfo,c=this._multiDrawStarts,l=this._multiDrawCounts,u=this._geometryInfo,d=this.perObjectFrustumCulled,f=this._indirectTexture,p=f.image.data,m=n.isArrayCamera?lv:cv;d&&!n.isArrayCamera&&(ov.multiplyMatrices(n.projectionMatrix,n.matrixWorldInverse).multiply(this.matrixWorld),cv.setFromProjectionMatrix(ov,e.coordinateSystem));let h=0;if(this.sortObjects){ov.copy(this.matrixWorld).invert(),fv.setFromMatrixPosition(n.matrixWorld).applyMatrix4(ov),pv.set(0,0,-1).transformDirection(n.matrixWorld).transformDirection(ov);for(let e=0,t=s.length;e0){let e=t[n[0]];if(e!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let t=0,n=e.length;tr)return;Dv.applyMatrix4(e.matrixWorld);let l=t.ray.origin.distanceTo(Dv);if(!(lt.far))return{distance:l,point:Ov.clone().applyMatrix4(e.matrixWorld),index:o,face:null,faceIndex:null,barycoord:null,object:e}}const jv=new W,Mv=new W;var Nv=class extends kv{constructor(e,t){super(e,t),this.isLineSegments=!0,this.type=`LineSegments`}computeLineDistances(){let e=this.geometry;if(e.index===null){let t=e.attributes.position,n=[];for(let e=0,r=t.count;e0){let e=t[n[0]];if(e!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let t=0,n=e.length;ti.far)return;a.push({distance:c,distanceToRay:Math.sqrt(s),point:n,index:t,face:null,faceIndex:null,barycoord:null,object:o})}}var Hv=class extends mm{constructor(e,t,n,r,i=qu,a=qu,o,s,c){super(e,t,n,r,i,a,o,s,c),this.isVideoTexture=!0,this.generateMipmaps=!1;let l=this;function u(){l.needsUpdate=!0,e.requestVideoFrameCallback(u)}`requestVideoFrameCallback`in e&&e.requestVideoFrameCallback(u)}clone(){return new this.constructor(this.image).copy(this)}update(){let e=this.image,t=`requestVideoFrameCallback`in e;t===!1&&e.readyState>=e.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}},Uv=class extends Hv{constructor(e,t,n,r,i,a,o,s){super({},e,t,n,r,i,a,o,s),this.isVideoFrameTexture=!0}update(){}clone(){return new this.constructor().copy(this)}setFrame(e){this.image=e,this.needsUpdate=!0}},Wv=class extends mm{constructor(e,t){super({width:e,height:t}),this.isFramebufferTexture=!0,this.magFilter=Hu,this.minFilter=Hu,this.generateMipmaps=!1,this.needsUpdate=!0}},Gv=class extends mm{constructor(e,t,n,r,i,a,o,s,c,l,u,d){super(null,a,o,s,c,l,r,i,u,d),this.isCompressedTexture=!0,this.image={width:t,height:n},this.mipmaps=e,this.flipY=!1,this.generateMipmaps=!1}},Kv=class extends Gv{constructor(e,t,n,r,i,a){super(e,t,n,i,a),this.isCompressedArrayTexture=!0,this.image.depth=r,this.wrapR=Bu,this.layerUpdates=new Set}addLayerUpdate(e){this.layerUpdates.add(e)}clearLayerUpdates(){this.layerUpdates.clear()}},qv=class extends Gv{constructor(e,t,n){super(void 0,e[0].width,e[0].height,t,n,Pu),this.isCompressedCubeTexture=!0,this.isCubeTexture=!0,this.image=e}},Jv=class extends mm{constructor(e,t,n,r,i,a,o,s,c){super(e,t,n,r,i,a,o,s,c),this.isCanvasTexture=!0,this.needsUpdate=!0}},Yv=class extends mm{constructor(e,t,n=rd,r,i,a,o=Hu,s=Hu,c,l=pd,u=1){if(l!==pd&&l!==md)throw Error(`DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat`);let d={width:e,height:t,depth:u};super(d,r,i,a,o,s,l,n,c),this.isDepthTexture=!0,this.flipY=!1,this.generateMipmaps=!1,this.compareFunction=null}copy(e){return super.copy(e),this.source=new um(Object.assign({},e.image)),this.compareFunction=e.compareFunction,this}toJSON(e){let t=super.toJSON(e);return this.compareFunction!==null&&(t.compareFunction=this.compareFunction),t}},Xv=class e extends mg{constructor(e=1,t=1,n=4,r=8,i=1){super(),this.type=`CapsuleGeometry`,this.parameters={radius:e,height:t,capSegments:n,radialSegments:r,heightSegments:i},t=Math.max(0,t),n=Math.max(1,Math.floor(n)),r=Math.max(3,Math.floor(r)),i=Math.max(1,Math.floor(i));let a=[],o=[],s=[],c=[],l=t/2,u=Math.PI/2*e,d=t,f=2*u+d,p=n*2+i,m=r+1,h=new W,g=new W;for(let _=0;_<=p;_++){let v=0,y=0,b=0,x=0;if(_<=n){let t=_/n,r=t*Math.PI/2;y=-l-e*Math.cos(r),b=e*Math.sin(r),x=-e*Math.cos(r),v=t*u}else if(_<=n+i){let r=(_-n)/i;y=-l+r*t,b=e,x=0,v=u+r*d}else{let t=(_-n-i)/n,r=t*Math.PI/2;y=l+e*Math.sin(r),b=e*Math.cos(r),x=e*Math.sin(r),v=u+d+t*u}let S=Math.max(0,Math.min(1,v/f)),C=0;_===0?C=.5/r:_===p&&(C=-.5/r);for(let e=0;e<=r;e++){let t=e/r,n=t*Math.PI*2,i=Math.sin(n),a=Math.cos(n);g.x=-b*a,g.y=y,g.z=b*i,o.push(g.x,g.y,g.z),h.set(-b*a,x,b*i),h.normalize(),s.push(h.x,h.y,h.z),c.push(t+C,S)}if(_>0){let e=(_-1)*m;for(let t=0;t0&&v(!0),t>0&&v(!1)),this.setIndex(l),this.setAttribute(`position`,new q(u,3)),this.setAttribute(`normal`,new q(d,3)),this.setAttribute(`uv`,new q(f,2));function _(){let a=new W,_=new W,v=0,y=(t-e)/n;for(let c=0;c<=i;c++){let l=[],g=c/i,v=g*(t-e)+e;for(let e=0;e<=r;e++){let t=e/r,i=t*s+o,c=Math.sin(i),m=Math.cos(i);_.x=v*c,_.y=-g*n+h,_.z=v*m,u.push(_.x,_.y,_.z),a.set(c,y,m).normalize(),d.push(a.x,a.y,a.z),f.push(t,1-g),l.push(p++)}m.push(l)}for(let n=0;n0||r!==0)&&(l.push(a,o,c),v+=3),(t>0||r!==i-1)&&(l.push(o,s,c),v+=3)}c.addGroup(g,v,0),g+=v}function v(n){let i=p,a=new U,m=new W,_=0,v=n===!0?e:t,y=n===!0?1:-1;for(let e=1;e<=r;e++)u.push(0,h*y,0),d.push(0,y,0),f.push(.5,.5),p++;let b=p;for(let e=0;e<=r;e++){let t=e/r,n=t*s+o,i=Math.cos(n),c=Math.sin(n);m.x=v*c,m.y=h*y,m.z=v*i,u.push(m.x,m.y,m.z),d.push(0,y,0),a.x=i*.5+.5,a.y=c*.5*y+.5,f.push(a.x,a.y),p++}for(let e=0;e.9&&o<.1&&(t<.2&&(a[e+0]+=1),n<.2&&(a[e+2]+=1),r<.2&&(a[e+4]+=1))}}function d(e){i.push(e.x,e.y,e.z)}function f(t,n){let r=t*3;n.x=e[r+0],n.y=e[r+1],n.z=e[r+2]}function p(){let e=new W,t=new W,n=new W,r=new W,o=new U,s=new U,c=new U;for(let l=0,u=0;l0)s=r-1;else{s=r;break}if(r=s,n[r]===a)return r/(i-1);let l=n[r],u=n[r+1],d=u-l,f=(a-l)/d,p=(r+f)/(i-1);return p}getTangent(e,t){let n=1e-4,r=e-n,i=e+n;r<0&&(r=0),i>1&&(i=1);let a=this.getPoint(r),o=this.getPoint(i),s=t||(a.isVector2?new U:new W);return s.copy(o).sub(a).normalize(),s}getTangentAt(e,t){let n=this.getUtoTmapping(e);return this.getTangent(n,t)}computeFrenetFrames(e,t=!1){let n=new W,r=[],i=[],a=[],o=new W,s=new G;for(let t=0;t<=e;t++){let n=t/e;r[t]=this.getTangentAt(n,new W)}i[0]=new W,a[0]=new W;let c=Number.MAX_VALUE,l=Math.abs(r[0].x),u=Math.abs(r[0].y),d=Math.abs(r[0].z);l<=c&&(c=l,n.set(1,0,0)),u<=c&&(c=u,n.set(0,1,0)),d<=c&&n.set(0,0,1),o.crossVectors(r[0],n).normalize(),i[0].crossVectors(r[0],o),a[0].crossVectors(r[0],i[0]);for(let t=1;t<=e;t++){if(i[t]=i[t-1].clone(),a[t]=a[t-1].clone(),o.crossVectors(r[t-1],r[t]),o.length()>2**-52){o.normalize();let e=Math.acos(vp(r[t-1].dot(r[t]),-1,1));i[t].applyMatrix4(s.makeRotationAxis(o,e))}a[t].crossVectors(r[t],i[t])}if(t===!0){let t=Math.acos(vp(i[0].dot(i[e]),-1,1));t/=e,r[0].dot(o.crossVectors(i[0],i[e]))>0&&(t=-t);for(let n=1;n<=e;n++)i[n].applyMatrix4(s.makeRotationAxis(r[n],t*n)),a[n].crossVectors(r[n],i[n])}return{tangents:r,normals:i,binormals:a}}clone(){return new this.constructor().copy(this)}copy(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}toJSON(){let e={metadata:{version:4.7,type:`Curve`,generator:`Curve.toJSON`}};return e.arcLengthDivisions=this.arcLengthDivisions,e.type=this.type,e}fromJSON(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}},cy=class extends sy{constructor(e=0,t=0,n=1,r=1,i=0,a=Math.PI*2,o=!1,s=0){super(),this.isEllipseCurve=!0,this.type=`EllipseCurve`,this.aX=e,this.aY=t,this.xRadius=n,this.yRadius=r,this.aStartAngle=i,this.aEndAngle=a,this.aClockwise=o,this.aRotation=s}getPoint(e,t=new U){let n=t,r=Math.PI*2,i=this.aEndAngle-this.aStartAngle,a=Math.abs(i)<2**-52;for(;i<0;)i+=r;for(;i>r;)i-=r;i<2**-52&&(i=a?0:r),this.aClockwise===!0&&!a&&(i===r?i=-r:i-=r);let o=this.aStartAngle+e*i,s=this.aX+this.xRadius*Math.cos(o),c=this.aY+this.yRadius*Math.sin(o);if(this.aRotation!==0){let e=Math.cos(this.aRotation),t=Math.sin(this.aRotation),n=s-this.aX,r=c-this.aY;s=n*e-r*t+this.aX,c=n*t+r*e+this.aY}return n.set(s,c)}copy(e){return super.copy(e),this.aX=e.aX,this.aY=e.aY,this.xRadius=e.xRadius,this.yRadius=e.yRadius,this.aStartAngle=e.aStartAngle,this.aEndAngle=e.aEndAngle,this.aClockwise=e.aClockwise,this.aRotation=e.aRotation,this}toJSON(){let e=super.toJSON();return e.aX=this.aX,e.aY=this.aY,e.xRadius=this.xRadius,e.yRadius=this.yRadius,e.aStartAngle=this.aStartAngle,e.aEndAngle=this.aEndAngle,e.aClockwise=this.aClockwise,e.aRotation=this.aRotation,e}fromJSON(e){return super.fromJSON(e),this.aX=e.aX,this.aY=e.aY,this.xRadius=e.xRadius,this.yRadius=e.yRadius,this.aStartAngle=e.aStartAngle,this.aEndAngle=e.aEndAngle,this.aClockwise=e.aClockwise,this.aRotation=e.aRotation,this}},ly=class extends cy{constructor(e,t,n,r,i,a){super(e,t,n,n,r,i,a),this.isArcCurve=!0,this.type=`ArcCurve`}};function uy(){let e=0,t=0,n=0,r=0;function i(i,a,o,s){e=i,t=o,n=-3*i+3*a-2*o-s,r=2*i-2*a+o+s}return{initCatmullRom:function(e,t,n,r,a){i(t,n,a*(n-e),a*(r-t))},initNonuniformCatmullRom:function(e,t,n,r,a,o,s){let c=(t-e)/a-(n-e)/(a+o)+(n-t)/o,l=(n-t)/o-(r-t)/(o+s)+(r-n)/s;c*=o,l*=o,i(t,n,c,l)},calc:function(i){let a=i*i,o=a*i;return e+t*i+n*a+r*o}}}const dy=new W,fy=new uy,py=new uy,my=new uy;var hy=class extends sy{constructor(e=[],t=!1,n=`centripetal`,r=.5){super(),this.isCatmullRomCurve3=!0,this.type=`CatmullRomCurve3`,this.points=e,this.closed=t,this.curveType=n,this.tension=r}getPoint(e,t=new W){let n=t,r=this.points,i=r.length,a=(i-(this.closed?0:1))*e,o=Math.floor(a),s=a-o;this.closed?o+=o>0?0:(Math.floor(Math.abs(o)/i)+1)*i:s===0&&o===i-1&&(o=i-2,s=1);let c,l;this.closed||o>0?c=r[(o-1)%i]:(dy.subVectors(r[0],r[1]).add(r[0]),c=dy);let u=r[o%i],d=r[(o+1)%i];if(this.closed||o+2r.length-2?r.length-1:a+1],u=r[a>r.length-3?r.length-1:a+2];return n.set(gy(o,s.x,c.x,l.x,u.x),gy(o,s.y,c.y,l.y,u.y)),n}copy(e){super.copy(e),this.points=[];for(let t=0,n=e.points.length;t=n){let e=r[i]-n,a=this.curves[i],o=a.getLength(),s=o===0?0:1-e/o;return a.getPointAt(s,t)}i++}return null}getLength(){let e=this.getCurveLengths();return e[e.length-1]}updateArcLengths(){this.needsUpdate=!0,this.cacheLengths=null,this.getCurveLengths()}getCurveLengths(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;let e=[],t=0;for(let n=0,r=this.curves.length;n1&&!t[t.length-1].equals(t[0])&&t.push(t[0]),t}copy(e){super.copy(e),this.curves=[];for(let t=0,n=e.curves.length;t0){let e=c.getPoint(0);e.equals(this.currentPoint)||this.lineTo(e.x,e.y)}this.curves.push(c);let l=c.getPoint(1);return this.currentPoint.copy(l),this}copy(e){return super.copy(e),this.currentPoint.copy(e.currentPoint),this}toJSON(){let e=super.toJSON();return e.currentPoint=this.currentPoint.toArray(),e}fromJSON(e){return super.fromJSON(e),this.currentPoint.fromArray(e.currentPoint),this}},Iy=class extends Fy{constructor(e){super(e),this.uuid=_p(),this.type=`Shape`,this.holes=[]}getPointsHoles(e){let t=[];for(let n=0,r=this.holes.length;n80*n){s=1/0,c=1/0;let t=-1/0,r=-1/0;for(let a=n;at&&(t=n),i>r&&(r=i)}l=Math.max(t-s,r-c),l=l===0?0:32767/l}return By(a,o,n,s,c,l,0),o}function Ry(e,t,n,r,i){let a;if(i===hb(e,t,n,r)>0)for(let i=t;i=t;i-=r)a=fb(i/r|0,e[i],e[i+1],a);return a&&ib(a,a.next)&&(pb(a),a=a.next),a}function zy(e,t){if(!e)return e;t||=e;let n=e,r;do if(r=!1,!n.steiner&&(ib(n,n.next)||rb(n.prev,n,n.next)===0)){if(pb(n),n=t=n.prev,n===n.next)break;r=!0}else n=n.next;while(r||n!==t);return t}function By(e,t,n,r,i,a,o){if(!e)return;!o&&a&&Xy(e,r,i,a);let s=e;for(;e.prev!==e.next;){let c=e.prev,l=e.next;if(a?Hy(e,r,i,a):Vy(e)){t.push(c.i,e.i,l.i),pb(e),e=l.next,s=l.next;continue}if(e=l,e===s){o?o===1?(e=Uy(zy(e),t),By(e,t,n,r,i,a,2)):o===2&&Wy(e,t,n,r,i,a):By(zy(e),t,n,r,i,a,1);break}}}function Vy(e){let t=e.prev,n=e,r=e.next;if(rb(t,n,r)>=0)return!1;let i=t.x,a=n.x,o=r.x,s=t.y,c=n.y,l=r.y,u=Math.min(i,a,o),d=Math.min(s,c,l),f=Math.max(i,a,o),p=Math.max(s,c,l),m=r.next;for(;m!==t;){if(m.x>=u&&m.x<=f&&m.y>=d&&m.y<=p&&tb(i,s,a,c,o,l,m.x,m.y)&&rb(m.prev,m,m.next)>=0)return!1;m=m.next}return!0}function Hy(e,t,n,r){let i=e.prev,a=e,o=e.next;if(rb(i,a,o)>=0)return!1;let s=i.x,c=a.x,l=o.x,u=i.y,d=a.y,f=o.y,p=Math.min(s,c,l),m=Math.min(u,d,f),h=Math.max(s,c,l),g=Math.max(u,d,f),_=Qy(p,m,t,n,r),v=Qy(h,g,t,n,r),y=e.prevZ,b=e.nextZ;for(;y&&y.z>=_&&b&&b.z<=v;){if(y.x>=p&&y.x<=h&&y.y>=m&&y.y<=g&&y!==i&&y!==o&&tb(s,u,c,d,l,f,y.x,y.y)&&rb(y.prev,y,y.next)>=0||(y=y.prevZ,b.x>=p&&b.x<=h&&b.y>=m&&b.y<=g&&b!==i&&b!==o&&tb(s,u,c,d,l,f,b.x,b.y)&&rb(b.prev,b,b.next)>=0))return!1;b=b.nextZ}for(;y&&y.z>=_;){if(y.x>=p&&y.x<=h&&y.y>=m&&y.y<=g&&y!==i&&y!==o&&tb(s,u,c,d,l,f,y.x,y.y)&&rb(y.prev,y,y.next)>=0)return!1;y=y.prevZ}for(;b&&b.z<=v;){if(b.x>=p&&b.x<=h&&b.y>=m&&b.y<=g&&b!==i&&b!==o&&tb(s,u,c,d,l,f,b.x,b.y)&&rb(b.prev,b,b.next)>=0)return!1;b=b.nextZ}return!0}function Uy(e,t){let n=e;do{let r=n.prev,i=n.next.next;!ib(r,i)&&ab(r,n,n.next,i)&&lb(r,i)&&lb(i,r)&&(t.push(r.i,n.i,i.i),pb(n),pb(n.next),n=e=i),n=n.next}while(n!==e);return zy(n)}function Wy(e,t,n,r,i,a){let o=e;do{let e=o.next.next;for(;e!==o.prev;){if(o.i!==e.i&&nb(o,e)){let s=db(o,e);o=zy(o,o.next),s=zy(s,s.next),By(o,t,n,r,i,a,0),By(s,t,n,r,i,a,0);return}e=e.next}o=o.next}while(o!==e)}function Gy(e,t,n,r){let i=[];for(let n=0,a=t.length;n=n.next.y&&n.next.y!==n.y){let e=n.x+(i-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(e<=r&&e>a&&(a=e,o=n.x=n.x&&n.x>=c&&r!==n.x&&eb(io.x||n.x===o.x&&Yy(o,n)))&&(o=n,u=t)}n=n.next}while(n!==s);return o}function Yy(e,t){return rb(e.prev,e,t.prev)<0&&rb(t.next,e,e.next)<0}function Xy(e,t,n,r){let i=e;do i.z===0&&(i.z=Qy(i.x,i.y,t,n,r)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next;while(i!==e);i.prevZ.nextZ=null,i.prevZ=null,Zy(i)}function Zy(e){let t,n=1;do{let r=e,i;e=null;let a=null;for(t=0;r;){t++;let o=r,s=0;for(let e=0;e0||c>0&&o;)s!==0&&(c===0||!o||r.z<=o.z)?(i=r,r=r.nextZ,s--):(i=o,o=o.nextZ,c--),a?a.nextZ=i:e=i,i.prevZ=a,a=i;r=o}a.nextZ=null,n*=2}while(t>1);return e}function Qy(e,t,n,r,i){return e=(e-n)*i|0,t=(t-r)*i|0,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,t=(t|t<<8)&16711935,t=(t|t<<4)&252645135,t=(t|t<<2)&858993459,t=(t|t<<1)&1431655765,e|t<<1}function $y(e){let t=e,n=e;do(t.x=(e-o)*(a-s)&&(e-o)*(r-s)>=(n-o)*(t-s)&&(n-o)*(a-s)>=(i-o)*(r-s)}function tb(e,t,n,r,i,a,o,s){return!(e===o&&t===s)&&eb(e,t,n,r,i,a,o,s)}function nb(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!cb(e,t)&&(lb(e,t)&&lb(t,e)&&ub(e,t)&&(rb(e.prev,e,t.prev)||rb(e,t.prev,t))||ib(e,t)&&rb(e.prev,e,e.next)>0&&rb(t.prev,t,t.next)>0)}function rb(e,t,n){return(t.y-e.y)*(n.x-t.x)-(t.x-e.x)*(n.y-t.y)}function ib(e,t){return e.x===t.x&&e.y===t.y}function ab(e,t,n,r){let i=sb(rb(e,t,n)),a=sb(rb(e,t,r)),o=sb(rb(n,r,e)),s=sb(rb(n,r,t));return!!(i!==a&&o!==s||i===0&&ob(e,n,t)||a===0&&ob(e,r,t)||o===0&&ob(n,e,r)||s===0&&ob(n,t,r))}function ob(e,t,n){return t.x<=Math.max(e.x,n.x)&&t.x>=Math.min(e.x,n.x)&&t.y<=Math.max(e.y,n.y)&&t.y>=Math.min(e.y,n.y)}function sb(e){return e>0?1:e<0?-1:0}function cb(e,t){let n=e;do{if(n.i!==e.i&&n.next.i!==e.i&&n.i!==t.i&&n.next.i!==t.i&&ab(n,n.next,e,t))return!0;n=n.next}while(n!==e);return!1}function lb(e,t){return rb(e.prev,e,e.next)<0?rb(e,t,e.next)>=0&&rb(e,e.prev,t)>=0:rb(e,t,e.prev)<0||rb(e,e.next,t)<0}function ub(e,t){let n=e,r=!1,i=(e.x+t.x)/2,a=(e.y+t.y)/2;do n.y>a!=n.next.y>a&&n.next.y!==n.y&&i<(n.next.x-n.x)*(a-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next;while(n!==e);return r}function db(e,t){let n=mb(e.i,e.x,e.y),r=mb(t.i,t.x,t.y),i=e.next,a=t.prev;return e.next=t,t.prev=e,n.next=i,i.prev=n,r.next=n,n.prev=r,a.next=r,r.prev=a,r}function fb(e,t,n,r){let i=mb(e,t,n);return r?(i.next=r.next,i.prev=r,r.next.prev=i,r.next=i):(i.prev=i,i.next=i),i}function pb(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function mb(e,t,n){return{i:e,x:t,y:n,prev:null,next:null,z:0,prevZ:null,nextZ:null,steiner:!1}}function hb(e,t,n,r){let i=0;for(let a=t,o=n-r;a2&&e[t-1].equals(e[0])&&e.pop()}function yb(e,t){for(let n=0;n2**-52){let d=Math.sqrt(u),f=Math.sqrt(c*c+l*l),p=t.x-s/d,m=t.y+o/d,h=n.x-l/f,g=n.y+c/f,_=((h-p)*l-(g-m)*c)/(o*l-s*c);r=p+o*_-e.x,i=m+s*_-e.y;let v=r*r+i*i;if(v<=2)return new U(r,i);a=Math.sqrt(v/2)}else{let e=!1;o>2**-52?c>2**-52&&(e=!0):o<-(2**-52)?c<-(2**-52)&&(e=!0):Math.sign(s)===Math.sign(l)&&(e=!0),e?(r=-s,i=o,a=Math.sqrt(u)):(r=o,i=s,a=Math.sqrt(u/2))}return new U(r/a,i/a)}let M=[];for(let e=0,t=O.length,n=t-1,r=e+1;e=0;e--){let t=e/p,n=u*Math.cos(t*Math.PI/2),r=d*Math.sin(t*Math.PI/2)+f;for(let e=0,t=O.length;e=0;){let r=n,i=n-1;i<0&&(i=e.length-1);for(let e=0,n=s+p*2;e0)&&f.push(t,i,c),(e!==n-1||s0!=e>0&&this.version++,this._anisotropy=e}get clearcoat(){return this._clearcoat}set clearcoat(e){this._clearcoat>0!=e>0&&this.version++,this._clearcoat=e}get iridescence(){return this._iridescence}set iridescence(e){this._iridescence>0!=e>0&&this.version++,this._iridescence=e}get dispersion(){return this._dispersion}set dispersion(e){this._dispersion>0!=e>0&&this.version++,this._dispersion=e}get sheen(){return this._sheen}set sheen(e){this._sheen>0!=e>0&&this.version++,this._sheen=e}get transmission(){return this._transmission}set transmission(e){this._transmission>0!=e>0&&this.version++,this._transmission=e}copy(e){return super.copy(e),this.defines={STANDARD:``,PHYSICAL:``},this.anisotropy=e.anisotropy,this.anisotropyRotation=e.anisotropyRotation,this.anisotropyMap=e.anisotropyMap,this.clearcoat=e.clearcoat,this.clearcoatMap=e.clearcoatMap,this.clearcoatRoughness=e.clearcoatRoughness,this.clearcoatRoughnessMap=e.clearcoatRoughnessMap,this.clearcoatNormalMap=e.clearcoatNormalMap,this.clearcoatNormalScale.copy(e.clearcoatNormalScale),this.dispersion=e.dispersion,this.ior=e.ior,this.iridescence=e.iridescence,this.iridescenceMap=e.iridescenceMap,this.iridescenceIOR=e.iridescenceIOR,this.iridescenceThicknessRange=[...e.iridescenceThicknessRange],this.iridescenceThicknessMap=e.iridescenceThicknessMap,this.sheen=e.sheen,this.sheenColor.copy(e.sheenColor),this.sheenColorMap=e.sheenColorMap,this.sheenRoughness=e.sheenRoughness,this.sheenRoughnessMap=e.sheenRoughnessMap,this.transmission=e.transmission,this.transmissionMap=e.transmissionMap,this.thickness=e.thickness,this.thicknessMap=e.thicknessMap,this.attenuationDistance=e.attenuationDistance,this.attenuationColor.copy(e.attenuationColor),this.specularIntensity=e.specularIntensity,this.specularIntensityMap=e.specularIntensityMap,this.specularColor.copy(e.specularColor),this.specularColorMap=e.specularColorMap,this}},Hb=class extends Hh{constructor(e){super(),this.isMeshPhongMaterial=!0,this.type=`MeshPhongMaterial`,this.color=new K(16777215),this.specular=new K(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new K(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=yf,this.normalScale=new U(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new ih,this.combine=bu,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap=`round`,this.wireframeLinejoin=`round`,this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.specular.copy(e.specular),this.shininess=e.shininess,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapRotation.copy(e.envMapRotation),this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}},Ub=class extends Hh{constructor(e){super(),this.isMeshToonMaterial=!0,this.defines={TOON:``},this.type=`MeshToonMaterial`,this.color=new K(16777215),this.map=null,this.gradientMap=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new K(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=yf,this.normalScale=new U(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap=`round`,this.wireframeLinejoin=`round`,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.gradientMap=e.gradientMap,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.alphaMap=e.alphaMap,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.fog=e.fog,this}},Wb=class extends Hh{constructor(e){super(),this.isMeshNormalMaterial=!0,this.type=`MeshNormalMaterial`,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=yf,this.normalScale=new U(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.flatShading=!1,this.setValues(e)}copy(e){return super.copy(e),this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.flatShading=e.flatShading,this}},Gb=class extends Hh{constructor(e){super(),this.isMeshLambertMaterial=!0,this.type=`MeshLambertMaterial`,this.color=new K(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new K(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=yf,this.normalScale=new U(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new ih,this.combine=bu,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap=`round`,this.wireframeLinejoin=`round`,this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapRotation.copy(e.envMapRotation),this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}},Kb=class extends Hh{constructor(e){super(),this.isMeshDepthMaterial=!0,this.type=`MeshDepthMaterial`,this.depthPacking=hf,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.setValues(e)}copy(e){return super.copy(e),this.depthPacking=e.depthPacking,this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this}},qb=class extends Hh{constructor(e){super(),this.isMeshDistanceMaterial=!0,this.type=`MeshDistanceMaterial`,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.setValues(e)}copy(e){return super.copy(e),this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this}},Jb=class extends Hh{constructor(e){super(),this.isMeshMatcapMaterial=!0,this.defines={MATCAP:``},this.type=`MeshMatcapMaterial`,this.color=new K(16777215),this.matcap=null,this.map=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=yf,this.normalScale=new U(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.defines={MATCAP:``},this.color.copy(e.color),this.matcap=e.matcap,this.map=e.map,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.alphaMap=e.alphaMap,this.flatShading=e.flatShading,this.fog=e.fog,this}},Yb=class extends xv{constructor(e){super(),this.isLineDashedMaterial=!0,this.type=`LineDashedMaterial`,this.scale=1,this.dashSize=3,this.gapSize=1,this.setValues(e)}copy(e){return super.copy(e),this.scale=e.scale,this.dashSize=e.dashSize,this.gapSize=e.gapSize,this}};function Xb(e,t){return!e||e.constructor===t?e:typeof t.BYTES_PER_ELEMENT==`number`?new t(e):Array.prototype.slice.call(e)}function Zb(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function Qb(e){function t(t,n){return e[t]-e[n]}let n=e.length,r=Array(n);for(let e=0;e!==n;++e)r[e]=e;return r.sort(t),r}function $b(e,t,n){let r=e.length,i=new e.constructor(r);for(let a=0,o=0;o!==r;++a){let r=n[a]*t;for(let n=0;n!==t;++n)i[o++]=e[r+n]}return i}function ex(e,t,n,r){let i=1,a=e[0];for(;a!==void 0&&a[r]===void 0;)a=e[i++];if(a===void 0)return;let o=a[r];if(o!==void 0)if(Array.isArray(o))do o=a[r],o!==void 0&&(t.push(a.time),n.push(...o)),a=e[i++];while(a!==void 0);else if(o.toArray!==void 0)do o=a[r],o!==void 0&&(t.push(a.time),o.toArray(n,n.length)),a=e[i++];while(a!==void 0);else do o=a[r],o!==void 0&&(t.push(a.time),n.push(o)),a=e[i++];while(a!==void 0)}function tx(e,t,n,r,i=30){let a=e.clone();a.name=t;let o=[];for(let e=0;e=r)){c.push(t.times[e]);for(let n=0;na.tracks[e].times[0]&&(s=a.tracks[e].times[0]);for(let e=0;e=r.times[d]){let e=d*c+s,t=e+c-s;f=r.values.slice(e,t)}else{let e=r.createInterpolant(),t=s,n=c-s;e.evaluate(a),f=e.resultBuffer.slice(t,n)}if(i===`quaternion`){let e=new Bp().fromArray(f).normalize().conjugate();e.toArray(f)}let p=o.times.length;for(let e=0;e=i)){let o=t[1];e=i)break seek}a=n,n=0;break linear_scan}break validate_interval}for(;n>>1;et;)--a;if(++a,i!==0||a!==r){i>=a&&(a=Math.max(a,1),i=a-1);let e=this.getValueSize();this.times=n.slice(i,a),this.values=this.values.slice(i*e,a*e)}return this}validate(){let e=!0,t=this.getValueSize();t-Math.floor(t)!==0&&(console.error(`THREE.KeyframeTrack: Invalid value size in track.`,this),e=!1);let n=this.times,r=this.values,i=n.length;i===0&&(console.error(`THREE.KeyframeTrack: Track is empty.`,this),e=!1);let a=null;for(let t=0;t!==i;t++){let r=n[t];if(typeof r==`number`&&isNaN(r)){console.error(`THREE.KeyframeTrack: Time is not a valid number.`,this,t,r),e=!1;break}if(a!==null&&a>r){console.error(`THREE.KeyframeTrack: Out of order keys.`,this,t,r,a),e=!1;break}a=r}if(r!==void 0&&Zb(r))for(let t=0,n=r.length;t!==n;++t){let n=r[t];if(isNaN(n)){console.error(`THREE.KeyframeTrack: Value is not a valid number.`,this,t,n),e=!1;break}}return e}optimize(){let e=this.times.slice(),t=this.values.slice(),n=this.getValueSize(),r=this.getInterpolation()===af,i=e.length-1,a=1;for(let o=1;o0){e[a]=e[i];for(let e=i*n,r=a*n,o=0;o!==n;++o)t[r+o]=t[e+o];++a}return a===e.length?(this.times=e,this.values=t):(this.times=e.slice(0,a),this.values=t.slice(0,a*n)),this}clone(){let e=this.times.slice(),t=this.values.slice(),n=this.constructor,r=new n(this.name,e,t);return r.createInterpolant=this.createInterpolant,r}};cx.prototype.ValueTypeName=``,cx.prototype.TimeBufferType=Float32Array,cx.prototype.ValueBufferType=Float32Array,cx.prototype.DefaultInterpolation=rf;var lx=class extends cx{constructor(e,t,n){super(e,t,n)}};lx.prototype.ValueTypeName=`bool`,lx.prototype.ValueBufferType=Array,lx.prototype.DefaultInterpolation=nf,lx.prototype.InterpolantFactoryMethodLinear=void 0,lx.prototype.InterpolantFactoryMethodSmooth=void 0;var ux=class extends cx{constructor(e,t,n,r){super(e,t,n,r)}};ux.prototype.ValueTypeName=`color`;var dx=class extends cx{constructor(e,t,n,r){super(e,t,n,r)}};dx.prototype.ValueTypeName=`number`;var fx=class extends ix{constructor(e,t,n,r){super(e,t,n,r)}interpolate_(e,t,n,r){let i=this.resultBuffer,a=this.sampleValues,o=this.valueSize,s=(n-t)/(r-t),c=e*o;for(let e=c+o;c!==e;c+=4)Bp.slerpFlat(i,0,a,c-o,a,c,s);return i}},px=class extends cx{constructor(e,t,n,r){super(e,t,n,r)}InterpolantFactoryMethodLinear(e){return new fx(this.times,this.values,this.getValueSize(),e)}};px.prototype.ValueTypeName=`quaternion`,px.prototype.InterpolantFactoryMethodSmooth=void 0;var mx=class extends cx{constructor(e,t,n){super(e,t,n)}};mx.prototype.ValueTypeName=`string`,mx.prototype.ValueBufferType=Array,mx.prototype.DefaultInterpolation=nf,mx.prototype.InterpolantFactoryMethodLinear=void 0,mx.prototype.InterpolantFactoryMethodSmooth=void 0;var hx=class extends cx{constructor(e,t,n,r){super(e,t,n,r)}};hx.prototype.ValueTypeName=`vector`;var gx=class{constructor(e=``,t=-1,n=[],r=uf){this.name=e,this.tracks=n,this.duration=t,this.blendMode=r,this.uuid=_p(),this.duration<0&&this.resetDuration()}static parse(e){let t=[],n=e.tracks,r=1/(e.fps||1);for(let e=0,i=n.length;e!==i;++e)t.push(vx(n[e]).scale(r));let i=new this(e.name,e.duration,t,e.blendMode);return i.uuid=e.uuid,i}static toJSON(e){let t=[],n=e.tracks,r={name:e.name,duration:e.duration,tracks:t,uuid:e.uuid,blendMode:e.blendMode};for(let e=0,r=n.length;e!==r;++e)t.push(cx.toJSON(n[e]));return r}static CreateFromMorphTargetSequence(e,t,n,r){let i=t.length,a=[];for(let e=0;e1){let e=a[1],t=r[e];t||(r[e]=t=[]),t.push(n)}}let a=[];for(let e in r)a.push(this.CreateFromMorphTargetSequence(e,r[e],t,n));return a}static parseAnimation(e,t){if(console.warn(`THREE.AnimationClip: parseAnimation() is deprecated and will be removed with r185`),!e)return console.error(`THREE.AnimationClip: No animation in JSONLoader data.`),null;let n=function(e,t,n,r,i){if(n.length!==0){let a=[],o=[];ex(n,a,o,r),a.length!==0&&i.push(new e(t,a,o))}},r=[],i=e.name||`default`,a=e.fps||30,o=e.blendMode,s=e.length||-1,c=e.hierarchy||[];for(let e=0;e{t&&t(i),this.manager.itemEnd(e)},0),i;if(Cx[e]!==void 0){Cx[e].push({onLoad:t,onProgress:n,onError:r});return}Cx[e]=[],Cx[e].push({onLoad:t,onProgress:n,onError:r});let a=new Request(e,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?`include`:`same-origin`}),o=this.mimeType,s=this.responseType;fetch(a).then(t=>{if(t.status===200||t.status===0){if(t.status===0&&console.warn(`THREE.FileLoader: HTTP Status 0 received.`),typeof ReadableStream>`u`||t.body===void 0||t.body.getReader===void 0)return t;let n=Cx[e],r=t.body.getReader(),i=t.headers.get(`X-File-Size`)||t.headers.get(`Content-Length`),a=i?parseInt(i):0,o=a!==0,s=0,c=new ReadableStream({start(e){t();function t(){r.read().then(({done:r,value:i})=>{if(r)e.close();else{s+=i.byteLength;let r=new ProgressEvent(`progress`,{lengthComputable:o,loaded:s,total:a});for(let e=0,t=n.length;e{e.error(t)})}}});return new Response(c)}else throw new wx(`fetch for "${t.url}" responded with ${t.status}: ${t.statusText}`,t)}).then(e=>{switch(s){case`arraybuffer`:return e.arrayBuffer();case`blob`:return e.blob();case`document`:return e.text().then(e=>{let t=new DOMParser;return t.parseFromString(e,o)});case`json`:return e.json();default:if(o===``)return e.text();{let t=/charset="?([^;"\s]*)"?/i,n=t.exec(o),r=n&&n[1]?n[1].toLowerCase():void 0,i=new TextDecoder(r);return e.arrayBuffer().then(e=>i.decode(e))}}}).then(t=>{yx.add(e,t);let n=Cx[e];delete Cx[e];for(let e=0,r=n.length;e{let n=Cx[e];if(n===void 0)throw this.manager.itemError(e),t;delete Cx[e];for(let e=0,r=n.length;e{this.manager.itemEnd(e)}),this.manager.itemStart(e)}setResponseType(e){return this.responseType=e,this}setMimeType(e){return this.mimeType=e,this}},Ex=class extends Sx{constructor(e){super(e)}load(e,t,n,r){let i=this,a=new Tx(this.manager);a.setPath(this.path),a.setRequestHeader(this.requestHeader),a.setWithCredentials(this.withCredentials),a.load(e,function(n){try{t(i.parse(JSON.parse(n)))}catch(t){r?r(t):console.error(t),i.manager.itemError(e)}},n,r)}parse(e){let t=[];for(let n=0;n0:r.vertexColors=e.vertexColors),e.uniforms!==void 0)for(let t in e.uniforms){let i=e.uniforms[t];switch(r.uniforms[t]={},i.type){case`t`:r.uniforms[t].value=n(i.value);break;case`c`:r.uniforms[t].value=new K().setHex(i.value);break;case`v2`:r.uniforms[t].value=new U().fromArray(i.value);break;case`v3`:r.uniforms[t].value=new W().fromArray(i.value);break;case`v4`:r.uniforms[t].value=new hm().fromArray(i.value);break;case`m3`:r.uniforms[t].value=new Up().fromArray(i.value);break;case`m4`:r.uniforms[t].value=new G().fromArray(i.value);break;default:r.uniforms[t].value=i.value}}if(e.defines!==void 0&&(r.defines=e.defines),e.vertexShader!==void 0&&(r.vertexShader=e.vertexShader),e.fragmentShader!==void 0&&(r.fragmentShader=e.fragmentShader),e.glslVersion!==void 0&&(r.glslVersion=e.glslVersion),e.extensions!==void 0)for(let t in e.extensions)r.extensions[t]=e.extensions[t];if(e.lights!==void 0&&(r.lights=e.lights),e.clipping!==void 0&&(r.clipping=e.clipping),e.size!==void 0&&(r.size=e.size),e.sizeAttenuation!==void 0&&(r.sizeAttenuation=e.sizeAttenuation),e.map!==void 0&&(r.map=n(e.map)),e.matcap!==void 0&&(r.matcap=n(e.matcap)),e.alphaMap!==void 0&&(r.alphaMap=n(e.alphaMap)),e.bumpMap!==void 0&&(r.bumpMap=n(e.bumpMap)),e.bumpScale!==void 0&&(r.bumpScale=e.bumpScale),e.normalMap!==void 0&&(r.normalMap=n(e.normalMap)),e.normalMapType!==void 0&&(r.normalMapType=e.normalMapType),e.normalScale!==void 0){let t=e.normalScale;Array.isArray(t)===!1&&(t=[t,t]),r.normalScale=new U().fromArray(t)}return e.displacementMap!==void 0&&(r.displacementMap=n(e.displacementMap)),e.displacementScale!==void 0&&(r.displacementScale=e.displacementScale),e.displacementBias!==void 0&&(r.displacementBias=e.displacementBias),e.roughnessMap!==void 0&&(r.roughnessMap=n(e.roughnessMap)),e.metalnessMap!==void 0&&(r.metalnessMap=n(e.metalnessMap)),e.emissiveMap!==void 0&&(r.emissiveMap=n(e.emissiveMap)),e.emissiveIntensity!==void 0&&(r.emissiveIntensity=e.emissiveIntensity),e.specularMap!==void 0&&(r.specularMap=n(e.specularMap)),e.specularIntensityMap!==void 0&&(r.specularIntensityMap=n(e.specularIntensityMap)),e.specularColorMap!==void 0&&(r.specularColorMap=n(e.specularColorMap)),e.envMap!==void 0&&(r.envMap=n(e.envMap)),e.envMapRotation!==void 0&&r.envMapRotation.fromArray(e.envMapRotation),e.envMapIntensity!==void 0&&(r.envMapIntensity=e.envMapIntensity),e.reflectivity!==void 0&&(r.reflectivity=e.reflectivity),e.refractionRatio!==void 0&&(r.refractionRatio=e.refractionRatio),e.lightMap!==void 0&&(r.lightMap=n(e.lightMap)),e.lightMapIntensity!==void 0&&(r.lightMapIntensity=e.lightMapIntensity),e.aoMap!==void 0&&(r.aoMap=n(e.aoMap)),e.aoMapIntensity!==void 0&&(r.aoMapIntensity=e.aoMapIntensity),e.gradientMap!==void 0&&(r.gradientMap=n(e.gradientMap)),e.clearcoatMap!==void 0&&(r.clearcoatMap=n(e.clearcoatMap)),e.clearcoatRoughnessMap!==void 0&&(r.clearcoatRoughnessMap=n(e.clearcoatRoughnessMap)),e.clearcoatNormalMap!==void 0&&(r.clearcoatNormalMap=n(e.clearcoatNormalMap)),e.clearcoatNormalScale!==void 0&&(r.clearcoatNormalScale=new U().fromArray(e.clearcoatNormalScale)),e.iridescenceMap!==void 0&&(r.iridescenceMap=n(e.iridescenceMap)),e.iridescenceThicknessMap!==void 0&&(r.iridescenceThicknessMap=n(e.iridescenceThicknessMap)),e.transmissionMap!==void 0&&(r.transmissionMap=n(e.transmissionMap)),e.thicknessMap!==void 0&&(r.thicknessMap=n(e.thicknessMap)),e.anisotropyMap!==void 0&&(r.anisotropyMap=n(e.anisotropyMap)),e.sheenColorMap!==void 0&&(r.sheenColorMap=n(e.sheenColorMap)),e.sheenRoughnessMap!==void 0&&(r.sheenRoughnessMap=n(e.sheenRoughnessMap)),r}setTextures(e){return this.textures=e,this}createMaterialFromType(t){return e.createMaterialFromType(t)}static createMaterialFromType(e){let t={ShadowMaterial:Rb,SpriteMaterial:r_,RawShaderMaterial:zb,ShaderMaterial:Lg,PointsMaterial:Fv,MeshPhysicalMaterial:Vb,MeshStandardMaterial:Bb,MeshPhongMaterial:Hb,MeshToonMaterial:Ub,MeshNormalMaterial:Wb,MeshLambertMaterial:Gb,MeshDepthMaterial:Kb,MeshDistanceMaterial:qb,MeshBasicMaterial:Uh,MeshMatcapMaterial:Jb,LineDashedMaterial:Yb,LineBasicMaterial:xv,Material:Hh};return new t[e]}},$x=class{static extractUrlBase(e){let t=e.lastIndexOf(`/`);return t===-1?`./`:e.slice(0,t+1)}static resolveURL(e,t){return typeof e!=`string`||e===``?``:(/^https?:\/\//i.test(t)&&/^\//.test(e)&&(t=t.replace(/(^https?:\/\/[^\/]+).*/i,`$1`)),/^(https?:)?\/\//i.test(e)||/^data:.*,.*$/i.test(e)||/^blob:.*$/i.test(e)?e:t+e)}},eS=class extends mg{constructor(){super(),this.isInstancedBufferGeometry=!0,this.type=`InstancedBufferGeometry`,this.instanceCount=1/0}copy(e){return super.copy(e),this.instanceCount=e.instanceCount,this}toJSON(){let e=super.toJSON();return e.instanceCount=this.instanceCount,e.isInstancedBufferGeometry=!0,e}},tS=class extends Sx{constructor(e){super(e)}load(e,t,n,r){let i=this,a=new Tx(i.manager);a.setPath(i.path),a.setRequestHeader(i.requestHeader),a.setWithCredentials(i.withCredentials),a.load(e,function(n){try{t(i.parse(JSON.parse(n)))}catch(t){r?r(t):console.error(t),i.manager.itemError(e)}},n,r)}parse(e){let t={},n={};function r(e,n){if(t[n]!==void 0)return t[n];let r=e.interleavedBuffers,a=r[n],o=i(e,a.buffer),s=qp(a.type,o),c=new e_(s,a.stride);return c.uuid=a.uuid,t[n]=c,c}function i(e,t){if(n[t]!==void 0)return n[t];let r=e.arrayBuffers,i=r[t],a=new Uint32Array(i).buffer;return n[t]=a,a}let a=e.isInstancedBufferGeometry?new eS:new mg,o=e.data.index;if(o!==void 0){let e=qp(o.type,o.array);a.setIndex(new Qh(e,1))}let s=e.data.attributes;for(let t in s){let n=s[t],i;if(n.isInterleavedBufferAttribute){let t=r(e.data,n.data);i=new n_(t,n.itemSize,n.offset,n.normalized)}else{let e=qp(n.type,n.array),t=n.isInstancedBufferAttribute?L_:Qh;i=new t(e,n.itemSize,n.normalized)}n.name!==void 0&&(i.name=n.name),n.usage!==void 0&&i.setUsage(n.usage),a.setAttribute(t,i)}let c=e.data.morphAttributes;if(c)for(let t in c){let n=c[t],i=[];for(let t=0,a=n.length;t0){let n=new bx(t);i=new Ox(n),i.setCrossOrigin(this.crossOrigin);for(let t=0,n=e.length;t0){r=new Ox(this.manager),r.setCrossOrigin(this.crossOrigin);for(let t=0,r=e.length;t{let t=null,n=null;return e.boundingBox!==void 0&&(t=new Sm().fromJSON(e.boundingBox)),e.boundingSphere!==void 0&&(n=new Bm().fromJSON(e.boundingSphere)),{...e,boundingBox:t,boundingSphere:n}}),a._instanceInfo=e.instanceInfo,a._availableInstanceIds=e._availableInstanceIds,a._availableGeometryIds=e._availableGeometryIds,a._nextIndexStart=e.nextIndexStart,a._nextVertexStart=e.nextVertexStart,a._geometryCount=e.geometryCount,a._maxInstanceCount=e.maxInstanceCount,a._maxVertexCount=e.maxVertexCount,a._maxIndexCount=e.maxIndexCount,a._geometryInitialized=e.geometryInitialized,a._matricesTexture=c(e.matricesTexture.uuid),a._indirectTexture=c(e.indirectTexture.uuid),e.colorsTexture!==void 0&&(a._colorsTexture=c(e.colorsTexture.uuid)),e.boundingSphere!==void 0&&(a.boundingSphere=new Bm().fromJSON(e.boundingSphere)),e.boundingBox!==void 0&&(a.boundingBox=new Sm().fromJSON(e.boundingBox));break;case`LOD`:a=new x_;break;case`Line`:a=new kv(o(e.geometry),s(e.material));break;case`LineLoop`:a=new Pv(o(e.geometry),s(e.material));break;case`LineSegments`:a=new Nv(o(e.geometry),s(e.material));break;case`PointCloud`:case`Points`:a=new Bv(o(e.geometry),s(e.material));break;case`Sprite`:a=new __(s(e.material));break;case`Group`:a=new Jg;break;case`Bone`:a=new M_;break;default:a=new xh}if(a.uuid=e.uuid,e.name!==void 0&&(a.name=e.name),e.matrix===void 0?(e.position!==void 0&&a.position.fromArray(e.position),e.rotation!==void 0&&a.rotation.fromArray(e.rotation),e.quaternion!==void 0&&a.quaternion.fromArray(e.quaternion),e.scale!==void 0&&a.scale.fromArray(e.scale)):(a.matrix.fromArray(e.matrix),e.matrixAutoUpdate!==void 0&&(a.matrixAutoUpdate=e.matrixAutoUpdate),a.matrixAutoUpdate&&a.matrix.decompose(a.position,a.quaternion,a.scale)),e.up!==void 0&&a.up.fromArray(e.up),e.castShadow!==void 0&&(a.castShadow=e.castShadow),e.receiveShadow!==void 0&&(a.receiveShadow=e.receiveShadow),e.shadow&&(e.shadow.intensity!==void 0&&(a.shadow.intensity=e.shadow.intensity),e.shadow.bias!==void 0&&(a.shadow.bias=e.shadow.bias),e.shadow.normalBias!==void 0&&(a.shadow.normalBias=e.shadow.normalBias),e.shadow.radius!==void 0&&(a.shadow.radius=e.shadow.radius),e.shadow.mapSize!==void 0&&a.shadow.mapSize.fromArray(e.shadow.mapSize),e.shadow.camera!==void 0&&(a.shadow.camera=this.parseObject(e.shadow.camera))),e.visible!==void 0&&(a.visible=e.visible),e.frustumCulled!==void 0&&(a.frustumCulled=e.frustumCulled),e.renderOrder!==void 0&&(a.renderOrder=e.renderOrder),e.userData!==void 0&&(a.userData=e.userData),e.layers!==void 0&&(a.layers.mask=e.layers),e.children!==void 0){let o=e.children;for(let e=0;e`u`&&console.warn(`THREE.ImageBitmapLoader: createImageBitmap() not supported.`),typeof fetch>`u`&&console.warn(`THREE.ImageBitmapLoader: fetch() not supported.`),this.options={premultiplyAlpha:`none`}}setOptions(e){return this.options=e,this}load(e,t,n,r){e===void 0&&(e=``),this.path!==void 0&&(e=this.path+e),e=this.manager.resolveURL(e);let i=this,a=yx.get(e);if(a!==void 0){if(i.manager.itemStart(e),a.then){a.then(n=>{if(oS.has(a)===!0)r&&r(oS.get(a)),i.manager.itemError(e),i.manager.itemEnd(e);else return t&&t(n),i.manager.itemEnd(e),n});return}return setTimeout(function(){t&&t(a),i.manager.itemEnd(e)},0),a}let o={};o.credentials=this.crossOrigin===`anonymous`?`same-origin`:`include`,o.headers=this.requestHeader;let s=fetch(e,o).then(function(e){return e.blob()}).then(function(e){return createImageBitmap(e,Object.assign(i.options,{colorSpaceConversion:`none`}))}).then(function(n){return yx.add(e,n),t&&t(n),i.manager.itemEnd(e),n}).catch(function(t){r&&r(t),oS.set(s,t),yx.remove(e),i.manager.itemError(e),i.manager.itemEnd(e)});yx.add(e,s),i.manager.itemStart(e)}};let cS;var lS=class{static getContext(){return cS===void 0&&(cS=new(window.AudioContext||window.webkitAudioContext)),cS}static setContext(e){cS=e}},uS=class extends Sx{constructor(e){super(e)}load(e,t,n,r){let i=this,a=new Tx(this.manager);a.setResponseType(`arraybuffer`),a.setPath(this.path),a.setRequestHeader(this.requestHeader),a.setWithCredentials(this.withCredentials),a.load(e,function(e){try{let n=e.slice(0),r=lS.getContext();r.decodeAudioData(n,function(e){t(e)}).catch(o)}catch(e){o(e)}},n,r);function o(t){r?r(t):console.error(t),i.manager.itemError(e)}}};const dS=new G,fS=new G,pS=new G;var mS=class{constructor(){this.type=`StereoCamera`,this.aspect=1,this.eyeSep=.064,this.cameraL=new Hg,this.cameraL.layers.enable(1),this.cameraL.matrixAutoUpdate=!1,this.cameraR=new Hg,this.cameraR.layers.enable(2),this.cameraR.matrixAutoUpdate=!1,this._cache={focus:null,fov:null,aspect:null,near:null,far:null,zoom:null,eyeSep:null}}update(e){let t=this._cache,n=t.focus!==e.focus||t.fov!==e.fov||t.aspect!==e.aspect*this.aspect||t.near!==e.near||t.far!==e.far||t.zoom!==e.zoom||t.eyeSep!==this.eyeSep;if(n){t.focus=e.focus,t.fov=e.fov,t.aspect=e.aspect*this.aspect,t.near=e.near,t.far=e.far,t.zoom=e.zoom,t.eyeSep=this.eyeSep,pS.copy(e.projectionMatrix);let n=t.eyeSep/2,r=n*t.near/t.focus,i=t.near*Math.tan(hp*t.fov*.5)/t.zoom,a,o;fS.elements[12]=-n,dS.elements[12]=n,a=-i*t.aspect+r,o=i*t.aspect+r,pS.elements[0]=2*t.near/(o-a),pS.elements[8]=(o+a)/(o-a),this.cameraL.projectionMatrix.copy(pS),a=-i*t.aspect-r,o=i*t.aspect-r,pS.elements[0]=2*t.near/(o-a),pS.elements[8]=(o+a)/(o-a),this.cameraR.projectionMatrix.copy(pS)}this.cameraL.matrixWorld.copy(e.matrixWorld).multiply(fS),this.cameraR.matrixWorld.copy(e.matrixWorld).multiply(dS)}},hS=class extends Hg{constructor(e=[]){super(),this.isArrayCamera=!0,this.isMultiViewCamera=!1,this.cameras=e}},gS=class{constructor(e=!0){this.autoStart=e,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}start(){this.startTime=_S(),this.oldTime=this.startTime,this.elapsedTime=0,this.running=!0}stop(){this.getElapsedTime(),this.running=!1,this.autoStart=!1}getElapsedTime(){return this.getDelta(),this.elapsedTime}getDelta(){let e=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){let t=_S();e=(t-this.oldTime)/1e3,this.oldTime=t,this.elapsedTime+=e}return e}};function _S(){return performance.now()}const vS=new W,yS=new Bp,bS=new W,xS=new W,SS=new W;var CS=class extends xh{constructor(){super(),this.type=`AudioListener`,this.context=lS.getContext(),this.gain=this.context.createGain(),this.gain.connect(this.context.destination),this.filter=null,this.timeDelta=0,this._clock=new gS}getInput(){return this.gain}removeFilter(){return this.filter!==null&&(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination),this.gain.connect(this.context.destination),this.filter=null),this}getFilter(){return this.filter}setFilter(e){return this.filter===null?this.gain.disconnect(this.context.destination):(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination)),this.filter=e,this.gain.connect(this.filter),this.filter.connect(this.context.destination),this}getMasterVolume(){return this.gain.gain.value}setMasterVolume(e){return this.gain.gain.setTargetAtTime(e,this.context.currentTime,.01),this}updateMatrixWorld(e){super.updateMatrixWorld(e);let t=this.context.listener;if(this.timeDelta=this._clock.getDelta(),this.matrixWorld.decompose(vS,yS,bS),xS.set(0,0,-1).applyQuaternion(yS),SS.set(0,1,0).applyQuaternion(yS),t.positionX){let e=this.context.currentTime+this.timeDelta;t.positionX.linearRampToValueAtTime(vS.x,e),t.positionY.linearRampToValueAtTime(vS.y,e),t.positionZ.linearRampToValueAtTime(vS.z,e),t.forwardX.linearRampToValueAtTime(xS.x,e),t.forwardY.linearRampToValueAtTime(xS.y,e),t.forwardZ.linearRampToValueAtTime(xS.z,e),t.upX.linearRampToValueAtTime(SS.x,e),t.upY.linearRampToValueAtTime(SS.y,e),t.upZ.linearRampToValueAtTime(SS.z,e)}else t.setPosition(vS.x,vS.y,vS.z),t.setOrientation(xS.x,xS.y,xS.z,SS.x,SS.y,SS.z)}},wS=class extends xh{constructor(e){super(),this.type=`Audio`,this.listener=e,this.context=e.context,this.gain=this.context.createGain(),this.gain.connect(e.getInput()),this.autoplay=!1,this.buffer=null,this.detune=0,this.loop=!1,this.loopStart=0,this.loopEnd=0,this.offset=0,this.duration=void 0,this.playbackRate=1,this.isPlaying=!1,this.hasPlaybackControl=!0,this.source=null,this.sourceType=`empty`,this._startedAt=0,this._progress=0,this._connected=!1,this.filters=[]}getOutput(){return this.gain}setNodeSource(e){return this.hasPlaybackControl=!1,this.sourceType=`audioNode`,this.source=e,this.connect(),this}setMediaElementSource(e){return this.hasPlaybackControl=!1,this.sourceType=`mediaNode`,this.source=this.context.createMediaElementSource(e),this.connect(),this}setMediaStreamSource(e){return this.hasPlaybackControl=!1,this.sourceType=`mediaStreamNode`,this.source=this.context.createMediaStreamSource(e),this.connect(),this}setBuffer(e){return this.buffer=e,this.sourceType=`buffer`,this.autoplay&&this.play(),this}play(e=0){if(this.isPlaying===!0){console.warn(`THREE.Audio: Audio is already playing.`);return}if(this.hasPlaybackControl===!1){console.warn(`THREE.Audio: this Audio has no playback control.`);return}this._startedAt=this.context.currentTime+e;let t=this.context.createBufferSource();return t.buffer=this.buffer,t.loop=this.loop,t.loopStart=this.loopStart,t.loopEnd=this.loopEnd,t.onended=this.onEnded.bind(this),t.start(this._startedAt,this._progress+this.offset,this.duration),this.isPlaying=!0,this.source=t,this.setDetune(this.detune),this.setPlaybackRate(this.playbackRate),this.connect()}pause(){if(this.hasPlaybackControl===!1){console.warn(`THREE.Audio: this Audio has no playback control.`);return}return this.isPlaying===!0&&(this._progress+=Math.max(this.context.currentTime-this._startedAt,0)*this.playbackRate,this.loop===!0&&(this._progress%=this.duration||this.buffer.duration),this.source.stop(),this.source.onended=null,this.isPlaying=!1),this}stop(e=0){if(this.hasPlaybackControl===!1){console.warn(`THREE.Audio: this Audio has no playback control.`);return}return this._progress=0,this.source!==null&&(this.source.stop(this.context.currentTime+e),this.source.onended=null),this.isPlaying=!1,this}connect(){if(this.filters.length>0){this.source.connect(this.filters[0]);for(let e=1,t=this.filters.length;e0){this.source.disconnect(this.filters[0]);for(let e=1,t=this.filters.length;e0&&this._mixBufferRegionAdditive(n,r,this._addIndex*t,1,t);for(let e=t,i=t+t;e!==i;++e)if(n[e]!==n[e+t]){o.setValue(n,r);break}}saveOriginalState(){let e=this.binding,t=this.buffer,n=this.valueSize,r=n*this._origIndex;e.getValue(t,r);for(let e=n,i=r;e!==i;++e)t[e]=t[r+e%n];this._setIdentity(),this.cumulativeWeight=0,this.cumulativeWeightAdditive=0}restoreOriginalState(){let e=this.valueSize*3;this.binding.setValue(this.buffer,e)}_setAdditiveIdentityNumeric(){let e=this._addIndex*this.valueSize,t=e+this.valueSize;for(let n=e;n=.5)for(let r=0;r!==i;++r)e[t+r]=e[n+r]}_slerp(e,t,n,r){Bp.slerpFlat(e,t,e,t,e,n,r)}_slerpAdditive(e,t,n,r,i){let a=this._workIndex*i;Bp.multiplyQuaternionsFlat(e,a,e,t,e,n),Bp.slerpFlat(e,t,e,t,e,a,r)}_lerp(e,t,n,r,i){let a=1-r;for(let o=0;o!==i;++o){let i=t+o;e[i]=e[i]*a+e[n+o]*r}}_lerpAdditive(e,t,n,r,i){for(let a=0;a!==i;++a){let i=t+a;e[i]=e[i]+e[n+a]*r}}};const MS=`\\[\\]\\.:\\/`,NS=RegExp(`[`+MS+`]`,`g`),PS=`[^`+MS+`]`,FS=`[^`+MS.replace(`\\.`,``)+`]`,IS=/((?:WC+[\/:])*)/.source.replace(`WC`,PS),LS=/(WCOD+)?/.source.replace(`WCOD`,FS),RS=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace(`WC`,PS),zS=/\.(WC+)(?:\[(.+)\])?/.source.replace(`WC`,PS),BS=RegExp(`^`+IS+LS+RS+zS+`$`),VS=[`material`,`materials`,`bones`,`map`];var HS=class{constructor(e,t,n){let r=n||US.parseTrackName(t);this._targetGroup=e,this._bindings=e.subscribe_(t,r)}getValue(e,t){this.bind();let n=this._targetGroup.nCachedObjects_,r=this._bindings[n];r!==void 0&&r.getValue(e,t)}setValue(e,t){let n=this._bindings;for(let r=this._targetGroup.nCachedObjects_,i=n.length;r!==i;++r)n[r].setValue(e,t)}bind(){let e=this._bindings;for(let t=this._targetGroup.nCachedObjects_,n=e.length;t!==n;++t)e[t].bind()}unbind(){let e=this._bindings;for(let t=this._targetGroup.nCachedObjects_,n=e.length;t!==n;++t)e[t].unbind()}},US=class e{constructor(t,n,r){this.path=n,this.parsedPath=r||e.parseTrackName(n),this.node=e.findNode(t,this.parsedPath.nodeName),this.rootNode=t,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}static create(t,n,r){return t&&t.isAnimationObjectGroup?new e.Composite(t,n,r):new e(t,n,r)}static sanitizeNodeName(e){return e.replace(/\s/g,`_`).replace(NS,``)}static parseTrackName(e){let t=BS.exec(e);if(t===null)throw Error(`PropertyBinding: Cannot parse trackName: `+e);let n={nodeName:t[2],objectName:t[3],objectIndex:t[4],propertyName:t[5],propertyIndex:t[6]},r=n.nodeName&&n.nodeName.lastIndexOf(`.`);if(r!==void 0&&r!==-1){let e=n.nodeName.substring(r+1);VS.indexOf(e)!==-1&&(n.nodeName=n.nodeName.substring(0,r),n.objectName=e)}if(n.propertyName===null||n.propertyName.length===0)throw Error(`PropertyBinding: can not parse propertyName from trackName: `+e);return n}static findNode(e,t){if(t===void 0||t===``||t===`.`||t===-1||t===e.name||t===e.uuid)return e;if(e.skeleton){let n=e.skeleton.getBoneByName(t);if(n!==void 0)return n}if(e.children){let n=function(e){for(let r=0;r=i){let a=i++,l=e[a];t[l.uuid]=c,e[c]=l,t[s]=a,e[a]=o;for(let e=0,t=r;e!==t;++e){let t=n[e],r=t[a],i=t[c];t[c]=r,t[a]=i}}}this.nCachedObjects_=i}uncache(){let e=this._objects,t=this._indicesByUUID,n=this._bindings,r=n.length,i=this.nCachedObjects_,a=e.length;for(let o=0,s=arguments.length;o!==s;++o){let s=arguments[o],c=s.uuid,l=t[c];if(l!==void 0)if(delete t[c],l0&&(t[o.uuid]=l),e[l]=o,e.pop();for(let e=0,t=r;e!==t;++e){let t=n[e];t[l]=t[i],t.pop()}}}this.nCachedObjects_=i}subscribe_(e,t){let n=this._bindingsIndicesByPath,r=n[e],i=this._bindings;if(r!==void 0)return i[r];let a=this._paths,o=this._parsedPaths,s=this._objects,c=s.length,l=this.nCachedObjects_,u=Array(c);r=i.length,n[e]=r,a.push(e),o.push(t),i.push(u);for(let n=l,r=s.length;n!==r;++n){let r=s[n];u[n]=new US(r,e,t)}return u}unsubscribe_(e){let t=this._bindingsIndicesByPath,n=t[e];if(n!==void 0){let r=this._paths,i=this._parsedPaths,a=this._bindings,o=a.length-1,s=a[o],c=e[o];t[c]=n,a[n]=s,a.pop(),i[n]=i[o],i.pop(),r[n]=r[o],r.pop()}}},GS=class{constructor(e,t,n=null,r=t.blendMode){this._mixer=e,this._clip=t,this._localRoot=n,this.blendMode=r;let i=t.tracks,a=i.length,o=Array(a),s={endingStart:sf,endingEnd:sf};for(let e=0;e!==a;++e){let t=i[e].createInterpolant(null);o[e]=t,t.settings=s}this._interpolantSettings=s,this._interpolants=o,this._propertyBindings=Array(a),this._cacheIndex=null,this._byClipCacheIndex=null,this._timeScaleInterpolant=null,this._weightInterpolant=null,this.loop=ef,this._loopCount=-1,this._startTime=null,this.time=0,this.timeScale=1,this._effectiveTimeScale=1,this.weight=1,this._effectiveWeight=1,this.repetitions=1/0,this.paused=!1,this.enabled=!0,this.clampWhenFinished=!1,this.zeroSlopeAtStart=!0,this.zeroSlopeAtEnd=!0}play(){return this._mixer._activateAction(this),this}stop(){return this._mixer._deactivateAction(this),this.reset()}reset(){return this.paused=!1,this.enabled=!0,this.time=0,this._loopCount=-1,this._startTime=null,this.stopFading().stopWarping()}isRunning(){return this.enabled&&!this.paused&&this.timeScale!==0&&this._startTime===null&&this._mixer._isActiveAction(this)}isScheduled(){return this._mixer._isActiveAction(this)}startAt(e){return this._startTime=e,this}setLoop(e,t){return this.loop=e,this.repetitions=t,this}setEffectiveWeight(e){return this.weight=e,this._effectiveWeight=this.enabled?e:0,this.stopFading()}getEffectiveWeight(){return this._effectiveWeight}fadeIn(e){return this._scheduleFading(e,0,1)}fadeOut(e){return this._scheduleFading(e,1,0)}crossFadeFrom(e,t,n=!1){if(e.fadeOut(t),this.fadeIn(t),n===!0){let n=this._clip.duration,r=e._clip.duration,i=r/n,a=n/r;e.warp(1,i,t),this.warp(a,1,t)}return this}crossFadeTo(e,t,n=!1){return e.crossFadeFrom(this,t,n)}stopFading(){let e=this._weightInterpolant;return e!==null&&(this._weightInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this}setEffectiveTimeScale(e){return this.timeScale=e,this._effectiveTimeScale=this.paused?0:e,this.stopWarping()}getEffectiveTimeScale(){return this._effectiveTimeScale}setDuration(e){return this.timeScale=this._clip.duration/e,this.stopWarping()}syncWith(e){return this.time=e.time,this.timeScale=e.timeScale,this.stopWarping()}halt(e){return this.warp(this._effectiveTimeScale,0,e)}warp(e,t,n){let r=this._mixer,i=r.time,a=this.timeScale,o=this._timeScaleInterpolant;o===null&&(o=r._lendControlInterpolant(),this._timeScaleInterpolant=o);let s=o.parameterPositions,c=o.sampleValues;return s[0]=i,s[1]=i+n,c[0]=e/a,c[1]=t/a,this}stopWarping(){let e=this._timeScaleInterpolant;return e!==null&&(this._timeScaleInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this}getMixer(){return this._mixer}getClip(){return this._clip}getRoot(){return this._localRoot||this._mixer._root}_update(e,t,n,r){if(!this.enabled){this._updateWeight(e);return}let i=this._startTime;if(i!==null){let r=(e-i)*n;r<0||n===0?t=0:(this._startTime=null,t=n*r)}t*=this._updateTimeScale(e);let a=this._updateTime(t),o=this._updateWeight(e);if(o>0){let e=this._interpolants,t=this._propertyBindings;switch(this.blendMode){case df:for(let n=0,r=e.length;n!==r;++n)e[n].evaluate(a),t[n].accumulateAdditive(o);break;case uf:default:for(let n=0,i=e.length;n!==i;++n)e[n].evaluate(a),t[n].accumulate(r,o)}}}_updateWeight(e){let t=0;if(this.enabled){t=this.weight;let n=this._weightInterpolant;if(n!==null){let r=n.evaluate(e)[0];t*=r,e>n.parameterPositions[1]&&(this.stopFading(),r===0&&(this.enabled=!1))}}return this._effectiveWeight=t,t}_updateTimeScale(e){let t=0;if(!this.paused){t=this.timeScale;let n=this._timeScaleInterpolant;if(n!==null){let r=n.evaluate(e)[0];t*=r,e>n.parameterPositions[1]&&(this.stopWarping(),t===0?this.paused=!0:this.timeScale=t)}}return this._effectiveTimeScale=t,t}_updateTime(e){let t=this._clip.duration,n=this.loop,r=this.time+e,i=this._loopCount,a=n===tf;if(e===0)return i===-1?r:a&&(i&1)==1?t-r:r;if(n===$d){i===-1&&(this._loopCount=0,this._setEndings(!0,!0,!1));handle_stop:{if(r>=t)r=t;else if(r<0)r=0;else{this.time=r;break handle_stop}this.clampWhenFinished?this.paused=!0:this.enabled=!1,this.time=r,this._mixer.dispatchEvent({type:`finished`,action:this,direction:e<0?-1:1})}}else{if(i===-1&&(e>=0?(i=0,this._setEndings(!0,this.repetitions===0,a)):this._setEndings(this.repetitions===0,!0,a)),r>=t||r<0){let n=Math.floor(r/t);r-=t*n,i+=Math.abs(n);let o=this.repetitions-i;if(o<=0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,r=e>0?t:0,this.time=r,this._mixer.dispatchEvent({type:`finished`,action:this,direction:e>0?1:-1});else{if(o===1){let t=e<0;this._setEndings(t,!t,a)}else this._setEndings(!1,!1,a);this._loopCount=i,this.time=r,this._mixer.dispatchEvent({type:`loop`,action:this,loopDelta:n})}}else this.time=r;if(a&&(i&1)==1)return t-r}return r}_setEndings(e,t,n){let r=this._interpolantSettings;n?(r.endingStart=cf,r.endingEnd=cf):(e?r.endingStart=this.zeroSlopeAtStart?cf:sf:r.endingStart=lf,t?r.endingEnd=this.zeroSlopeAtEnd?cf:sf:r.endingEnd=lf)}_scheduleFading(e,t,n){let r=this._mixer,i=r.time,a=this._weightInterpolant;a===null&&(a=r._lendControlInterpolant(),this._weightInterpolant=a);let o=a.parameterPositions,s=a.sampleValues;return o[0]=i,s[0]=t,o[1]=i+e,s[1]=n,this}};const KS=new Float32Array(1);var qS=class extends fp{constructor(e){super(),this._root=e,this._initMemoryManager(),this._accuIndex=0,this.time=0,this.timeScale=1}_bindAction(e,t){let n=e._localRoot||this._root,r=e._clip.tracks,i=r.length,a=e._propertyBindings,o=e._interpolants,s=n.uuid,c=this._bindingsByRootAndName,l=c[s];l===void 0&&(l={},c[s]=l);for(let e=0;e!==i;++e){let i=r[e],c=i.name,u=l[c];if(u!==void 0)++u.referenceCount,a[e]=u;else{if(u=a[e],u!==void 0){u._cacheIndex===null&&(++u.referenceCount,this._addInactiveBinding(u,s,c));continue}let r=t&&t._propertyBindings[e].binding.parsedPath;u=new jS(US.create(n,c,r),i.ValueTypeName,i.getValueSize()),++u.referenceCount,this._addInactiveBinding(u,s,c),a[e]=u}o[e].resultBuffer=u.buffer}}_activateAction(e){if(!this._isActiveAction(e)){if(e._cacheIndex===null){let t=(e._localRoot||this._root).uuid,n=e._clip.uuid,r=this._actionsByClip[n];this._bindAction(e,r&&r.knownActions[0]),this._addInactiveAction(e,n,t)}let t=e._propertyBindings;for(let e=0,n=t.length;e!==n;++e){let n=t[e];n.useCount++===0&&(this._lendBinding(n),n.saveOriginalState())}this._lendAction(e)}}_deactivateAction(e){if(this._isActiveAction(e)){let t=e._propertyBindings;for(let e=0,n=t.length;e!==n;++e){let n=t[e];--n.useCount===0&&(n.restoreOriginalState(),this._takeBackBinding(n))}this._takeBackAction(e)}}_initMemoryManager(){this._actions=[],this._nActiveActions=0,this._actionsByClip={},this._bindings=[],this._nActiveBindings=0,this._bindingsByRootAndName={},this._controlInterpolants=[],this._nActiveControlInterpolants=0;let e=this;this.stats={actions:{get total(){return e._actions.length},get inUse(){return e._nActiveActions}},bindings:{get total(){return e._bindings.length},get inUse(){return e._nActiveBindings}},controlInterpolants:{get total(){return e._controlInterpolants.length},get inUse(){return e._nActiveControlInterpolants}}}}_isActiveAction(e){let t=e._cacheIndex;return t!==null&&t=0;--n)e[n].stop();return this}update(e){e*=this.timeScale;let t=this._actions,n=this._nActiveActions,r=this.time+=e,i=Math.sign(e),a=this._accuIndex^=1;for(let o=0;o!==n;++o){let n=t[o];n._update(r,e,i,a)}let o=this._bindings,s=this._nActiveBindings;for(let e=0;e!==s;++e)o[e].apply(a);return this}setTime(e){this.time=0;for(let e=0;e=this.min.x&&e.x<=this.max.x&&e.y>=this.min.y&&e.y<=this.max.y}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y}getParameter(e,t){return t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y))}intersectsBox(e){return e.max.x>=this.min.x&&e.min.x<=this.max.x&&e.max.y>=this.min.y&&e.min.y<=this.max.y}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,sC).distanceTo(e)}intersect(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}};const lC=new W,uC=new W;var dC=class{constructor(e=new W,t=new W){this.start=e,this.end=t}set(e,t){return this.start.copy(e),this.end.copy(t),this}copy(e){return this.start.copy(e.start),this.end.copy(e.end),this}getCenter(e){return e.addVectors(this.start,this.end).multiplyScalar(.5)}delta(e){return e.subVectors(this.end,this.start)}distanceSq(){return this.start.distanceToSquared(this.end)}distance(){return this.start.distanceTo(this.end)}at(e,t){return this.delta(t).multiplyScalar(e).add(this.start)}closestPointToPointParameter(e,t){lC.subVectors(e,this.start),uC.subVectors(this.end,this.start);let n=uC.dot(uC),r=uC.dot(lC),i=r/n;return t&&(i=vp(i,0,1)),i}closestPointToPoint(e,t,n){let r=this.closestPointToPointParameter(e,t);return this.delta(n).multiplyScalar(r).add(this.start)}applyMatrix4(e){return this.start.applyMatrix4(e),this.end.applyMatrix4(e),this}equals(e){return e.start.equals(this.start)&&e.end.equals(this.end)}clone(){return new this.constructor().copy(this)}};const fC=new W;var pC=class extends xh{constructor(e,t){super(),this.light=e,this.matrixAutoUpdate=!1,this.color=t,this.type=`SpotLightHelper`;let n=new mg,r=[0,0,0,0,0,1,0,0,0,1,0,1,0,0,0,-1,0,1,0,0,0,0,1,1,0,0,0,0,-1,1];for(let e=0,t=1,n=32;e1)for(let n=0;n.99999)this.quaternion.set(0,0,0,1);else if(e.y<-.99999)this.quaternion.set(1,0,0,0);else{RC.set(e.z,0,-e.x).normalize();let t=Math.acos(e.y);this.quaternion.setFromAxisAngle(RC,t)}}setLength(e,t=e*.2,n=t*.2){this.line.scale.set(1,Math.max(1e-4,e-t),1),this.line.updateMatrix(),this.cone.scale.set(n,t,n),this.cone.position.y=e,this.cone.updateMatrix()}setColor(e){this.line.material.color.set(e),this.cone.material.color.set(e)}copy(e){return super.copy(e,!1),this.line.copy(e.line),this.cone.copy(e.cone),this}dispose(){this.line.geometry.dispose(),this.line.material.dispose(),this.cone.geometry.dispose(),this.cone.material.dispose()}},HC=class extends Nv{constructor(e=1){let t=[0,0,0,e,0,0,0,0,0,0,e,0,0,0,0,0,0,e],n=[1,0,0,1,.6,0,0,1,0,.6,1,0,0,0,1,0,.6,1],r=new mg;r.setAttribute(`position`,new q(t,3)),r.setAttribute(`color`,new q(n,3));let i=new xv({vertexColors:!0,toneMapped:!1});super(r,i),this.type=`AxesHelper`}setColors(e,t,n){let r=new K,i=this.geometry.attributes.color.array;return r.set(e),r.toArray(i,0),r.toArray(i,3),r.set(t),r.toArray(i,6),r.toArray(i,9),r.set(n),r.toArray(i,12),r.toArray(i,15),this.geometry.attributes.color.needsUpdate=!0,this}dispose(){this.geometry.dispose(),this.material.dispose()}},UC=class{constructor(){this.type=`ShapePath`,this.color=new K,this.subPaths=[],this.currentPath=null}moveTo(e,t){return this.currentPath=new Fy,this.subPaths.push(this.currentPath),this.currentPath.moveTo(e,t),this}lineTo(e,t){return this.currentPath.lineTo(e,t),this}quadraticCurveTo(e,t,n,r){return this.currentPath.quadraticCurveTo(e,t,n,r),this}bezierCurveTo(e,t,n,r,i,a){return this.currentPath.bezierCurveTo(e,t,n,r,i,a),this}splineThru(e){return this.currentPath.splineThru(e),this}toShapes(e){function t(e){let t=[];for(let n=0,r=e.length;n2**-52){if(c<0&&(n=t[a],s=-s,o=t[i],c=-c),e.yo.y)continue;if(e.y===n.y){if(e.x===n.x)return!0}else{let t=c*(e.x-n.x)-s*(e.y-n.y);if(t===0)return!0;if(t<0)continue;r=!r}}else{if(e.y!==n.y)continue;if(o.x<=e.x&&e.x<=n.x||n.x<=e.x&&e.x<=o.x)return!0}}return r}let r=_b.isClockWise,i=this.subPaths;if(i.length===0)return[];let a,o,s,c=[];if(i.length===1)return o=i[0],s=new Iy,s.curves=o.curves,c.push(s),c;let l=!r(i[0].getPoints());l=e?!l:l;let u=[],d=[],f=[],p=0,m;d[p]=void 0,f[p]=[];for(let t=0,n=i.length;t1){let e=!1,t=0;for(let e=0,t=d.length;e0&&e===!1&&(f=u)}let h;for(let e=0,t=d.length;et?(e.repeat.x=1,e.repeat.y=n/t,e.offset.x=0,e.offset.y=(1-e.repeat.y)/2):(e.repeat.x=t/n,e.repeat.y=1,e.offset.x=(1-e.repeat.x)/2,e.offset.y=0),e}function KC(e,t){let n=e.image&&e.image.width?e.image.width/e.image.height:1;return n>t?(e.repeat.x=t/n,e.repeat.y=1,e.offset.x=(1-e.repeat.x)/2,e.offset.y=0):(e.repeat.x=1,e.repeat.y=n/t,e.offset.x=0,e.offset.y=(1-e.repeat.y)/2),e}function qC(e){return e.repeat.x=1,e.repeat.y=1,e.offset.x=0,e.offset.y=0,e}function JC(e,t,n,r){let i=YC(r);switch(n){case ud:return e*t;case hd:return e*t/i.components*i.byteLength;case gd:return e*t/i.components*i.byteLength;case _d:return e*t*2/i.components*i.byteLength;case vd:return e*t*2/i.components*i.byteLength;case dd:return e*t*3/i.components*i.byteLength;case fd:return e*t*4/i.components*i.byteLength;case bd:return e*t*4/i.components*i.byteLength;case xd:case Sd:return Math.floor((e+3)/4)*Math.floor((t+3)/4)*8;case Cd:case wd:return Math.floor((e+3)/4)*Math.floor((t+3)/4)*16;case Ed:case Od:return Math.max(e,16)*Math.max(t,8)/4;case Td:case Dd:return Math.max(e,8)*Math.max(t,8)/2;case kd:case Ad:return Math.floor((e+3)/4)*Math.floor((t+3)/4)*8;case jd:return Math.floor((e+3)/4)*Math.floor((t+3)/4)*16;case Md:return Math.floor((e+3)/4)*Math.floor((t+3)/4)*16;case Nd:return Math.floor((e+4)/5)*Math.floor((t+3)/4)*16;case Pd:return Math.floor((e+4)/5)*Math.floor((t+4)/5)*16;case Fd:return Math.floor((e+5)/6)*Math.floor((t+4)/5)*16;case Id:return Math.floor((e+5)/6)*Math.floor((t+5)/6)*16;case Ld:return Math.floor((e+7)/8)*Math.floor((t+4)/5)*16;case Rd:return Math.floor((e+7)/8)*Math.floor((t+5)/6)*16;case zd:return Math.floor((e+7)/8)*Math.floor((t+7)/8)*16;case Bd:return Math.floor((e+9)/10)*Math.floor((t+4)/5)*16;case Vd:return Math.floor((e+9)/10)*Math.floor((t+5)/6)*16;case Hd:return Math.floor((e+9)/10)*Math.floor((t+7)/8)*16;case Ud:return Math.floor((e+9)/10)*Math.floor((t+9)/10)*16;case Wd:return Math.floor((e+11)/12)*Math.floor((t+9)/10)*16;case Gd:return Math.floor((e+11)/12)*Math.floor((t+11)/12)*16;case Kd:case qd:case Jd:return Math.ceil(e/4)*Math.ceil(t/4)*16;case Yd:case Xd:return Math.ceil(e/4)*Math.ceil(t/4)*8;case Zd:case Qd:return Math.ceil(e/4)*Math.ceil(t/4)*16}throw Error(`Unable to determine texture byte length for ${n} format.`)}function YC(e){switch(e){case Qu:case $u:return{byteLength:1,components:1};case td:case ed:case ad:return{byteLength:2,components:1};case od:case sd:return{byteLength:2,components:4};case rd:case nd:case id:return{byteLength:4,components:1};case ld:return{byteLength:4,components:3}}throw Error(`Unknown texture type ${e}.`)}var XC=class{static contain(e,t){return GC(e,t)}static cover(e,t){return KC(e,t)}static fill(e){return qC(e)}static getByteLength(e,t,n,r){return JC(e,t,n,r)}};typeof __THREE_DEVTOOLS__<`u`&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent(`register`,{detail:{revision:El}})),typeof window<`u`&&(window.__THREE__?console.warn(`WARNING: Multiple instances of Three.js being imported.`):window.__THREE__=El);var ZC={};l(ZC,{ACESFilmicToneMapping:()=>Du,AddEquation:()=>Kl,AddOperation:()=>Su,AdditiveAnimationBlendMode:()=>df,AdditiveBlending:()=>Hl,AgXToneMapping:()=>ku,AlphaFormat:()=>ud,AlwaysCompare:()=>Yf,AlwaysDepth:()=>pu,AlwaysStencilFunc:()=>Vf,AmbientLight:()=>Jx,AnimationAction:()=>GS,AnimationClip:()=>gx,AnimationLoader:()=>Ex,AnimationMixer:()=>qS,AnimationObjectGroup:()=>WS,AnimationUtils:()=>rx,ArcCurve:()=>ly,ArrayCamera:()=>hS,ArrowHelper:()=>VC,AttachedBindMode:()=>ju,Audio:()=>wS,AudioAnalyser:()=>AS,AudioContext:()=>lS,AudioListener:()=>CS,AudioLoader:()=>uS,AxesHelper:()=>HC,BackSide:()=>Rl,BasicDepthPacking:()=>hf,BasicShadowMap:()=>Nl,BatchedMesh:()=>bv,Bone:()=>M_,BooleanKeyframeTrack:()=>lx,Box2:()=>cC,Box3:()=>Sm,Box3Helper:()=>IC,BoxGeometry:()=>kg,BoxHelper:()=>FC,BufferAttribute:()=>Qh,BufferGeometry:()=>mg,BufferGeometryLoader:()=>tS,ByteType:()=>$u,Cache:()=>yx,Camera:()=>Rg,CameraHelper:()=>MC,CanvasTexture:()=>Jv,CapsuleGeometry:()=>Xv,CatmullRomCurve3:()=>hy,CineonToneMapping:()=>Eu,CircleGeometry:()=>Zv,ClampToEdgeWrapping:()=>Bu,Clock:()=>gS,Color:()=>K,ColorKeyframeTrack:()=>ux,ColorManagement:()=>im,CompressedArrayTexture:()=>Kv,CompressedCubeTexture:()=>qv,CompressedTexture:()=>Gv,CompressedTextureLoader:()=>Dx,ConeGeometry:()=>$v,ConstantAlphaFactor:()=>uu,ConstantColorFactor:()=>cu,Controls:()=>WC,CubeCamera:()=>Gg,CubeReflectionMapping:()=>Pu,CubeRefractionMapping:()=>Fu,CubeTexture:()=>Kg,CubeTextureLoader:()=>kx,CubeUVReflectionMapping:()=>Ru,CubicBezierCurve:()=>Ey,CubicBezierCurve3:()=>Dy,CubicInterpolant:()=>ax,CullFaceBack:()=>Al,CullFaceFront:()=>jl,CullFaceFrontBack:()=>Ml,CullFaceNone:()=>kl,Curve:()=>sy,CurvePath:()=>Py,CustomBlending:()=>Gl,CustomToneMapping:()=>Ou,CylinderGeometry:()=>Qv,Cylindrical:()=>aC,Data3DTexture:()=>bm,DataArrayTexture:()=>vm,DataTexture:()=>N_,DataTextureLoader:()=>Ax,DataUtils:()=>Jh,DecrementStencilOp:()=>Af,DecrementWrapStencilOp:()=>Mf,DefaultLoadingManager:()=>xx,DepthFormat:()=>pd,DepthStencilFormat:()=>md,DepthTexture:()=>Yv,DetachedBindMode:()=>Mu,DirectionalLight:()=>qx,DirectionalLightHelper:()=>kC,DiscreteInterpolant:()=>sx,DodecahedronGeometry:()=>ty,DoubleSide:()=>zl,DstAlphaFactor:()=>ru,DstColorFactor:()=>au,DynamicCopyUsage:()=>rp,DynamicDrawUsage:()=>Zf,DynamicReadUsage:()=>ep,EdgesGeometry:()=>oy,EllipseCurve:()=>cy,EqualCompare:()=>Wf,EqualDepth:()=>gu,EqualStencilFunc:()=>If,EquirectangularReflectionMapping:()=>Iu,EquirectangularRefractionMapping:()=>Lu,Euler:()=>ih,EventDispatcher:()=>fp,ExtrudeGeometry:()=>bb,FileLoader:()=>Tx,Float16BufferAttribute:()=>og,Float32BufferAttribute:()=>q,FloatType:()=>id,Fog:()=>Qg,FogExp2:()=>Zg,FramebufferTexture:()=>Wv,FrontSide:()=>Ll,Frustum:()=>Q_,FrustumArray:()=>tv,GLBufferAttribute:()=>$S,GLSL1:()=>ap,GLSL3:()=>op,GreaterCompare:()=>Kf,GreaterDepth:()=>vu,GreaterEqualCompare:()=>Jf,GreaterEqualDepth:()=>_u,GreaterEqualStencilFunc:()=>Bf,GreaterStencilFunc:()=>Rf,GridHelper:()=>wC,Group:()=>Jg,HalfFloatType:()=>ad,HemisphereLight:()=>Nx,HemisphereLightHelper:()=>CC,IcosahedronGeometry:()=>Cb,ImageBitmapLoader:()=>sS,ImageLoader:()=>Ox,ImageUtils:()=>cm,IncrementStencilOp:()=>kf,IncrementWrapStencilOp:()=>jf,InstancedBufferAttribute:()=>L_,InstancedBufferGeometry:()=>eS,InstancedInterleavedBuffer:()=>QS,InstancedMesh:()=>G_,Int16BufferAttribute:()=>ng,Int32BufferAttribute:()=>ig,Int8BufferAttribute:()=>$h,IntType:()=>nd,InterleavedBuffer:()=>e_,InterleavedBufferAttribute:()=>n_,Interpolant:()=>ix,InterpolateDiscrete:()=>nf,InterpolateLinear:()=>rf,InterpolateSmooth:()=>af,InterpolationSamplingMode:()=>dp,InterpolationSamplingType:()=>up,InvertStencilOp:()=>Nf,KeepStencilOp:()=>Df,KeyframeTrack:()=>cx,LOD:()=>x_,LatheGeometry:()=>wb,Layers:()=>ah,LessCompare:()=>Uf,LessDepth:()=>mu,LessEqualCompare:()=>Gf,LessEqualDepth:()=>hu,LessEqualStencilFunc:()=>Lf,LessStencilFunc:()=>Ff,Light:()=>Mx,LightProbe:()=>Zx,Line:()=>kv,Line3:()=>dC,LineBasicMaterial:()=>xv,LineCurve:()=>Oy,LineCurve3:()=>ky,LineDashedMaterial:()=>Yb,LineLoop:()=>Pv,LineSegments:()=>Nv,LinearFilter:()=>qu,LinearInterpolant:()=>ox,LinearMipMapLinearFilter:()=>Zu,LinearMipMapNearestFilter:()=>Yu,LinearMipmapLinearFilter:()=>Xu,LinearMipmapNearestFilter:()=>Ju,LinearSRGBColorSpace:()=>Cf,LinearToneMapping:()=>wu,LinearTransfer:()=>wf,Loader:()=>Sx,LoaderUtils:()=>$x,LoadingManager:()=>bx,LoopOnce:()=>$d,LoopPingPong:()=>tf,LoopRepeat:()=>ef,MOUSE:()=>Dl,Material:()=>Hh,MaterialLoader:()=>Qx,MathUtils:()=>zp,Matrix2:()=>oC,Matrix3:()=>Up,Matrix4:()=>G,MaxEquation:()=>Xl,Mesh:()=>Eg,MeshBasicMaterial:()=>Uh,MeshDepthMaterial:()=>Kb,MeshDistanceMaterial:()=>qb,MeshLambertMaterial:()=>Gb,MeshMatcapMaterial:()=>Jb,MeshNormalMaterial:()=>Wb,MeshPhongMaterial:()=>Hb,MeshPhysicalMaterial:()=>Vb,MeshStandardMaterial:()=>Bb,MeshToonMaterial:()=>Ub,MinEquation:()=>Yl,MirroredRepeatWrapping:()=>Vu,MixOperation:()=>xu,MultiplyBlending:()=>Wl,MultiplyOperation:()=>bu,NearestFilter:()=>Hu,NearestMipMapLinearFilter:()=>Ku,NearestMipMapNearestFilter:()=>Wu,NearestMipmapLinearFilter:()=>Gu,NearestMipmapNearestFilter:()=>Uu,NeutralToneMapping:()=>Au,NeverCompare:()=>Hf,NeverDepth:()=>fu,NeverStencilFunc:()=>Pf,NoBlending:()=>Bl,NoColorSpace:()=>xf,NoToneMapping:()=>Cu,NormalAnimationBlendMode:()=>uf,NormalBlending:()=>Vl,NotEqualCompare:()=>qf,NotEqualDepth:()=>yu,NotEqualStencilFunc:()=>zf,NumberKeyframeTrack:()=>dx,Object3D:()=>xh,ObjectLoader:()=>nS,ObjectSpaceNormalMap:()=>bf,OctahedronGeometry:()=>Tb,OneFactor:()=>Ql,OneMinusConstantAlphaFactor:()=>du,OneMinusConstantColorFactor:()=>lu,OneMinusDstAlphaFactor:()=>iu,OneMinusDstColorFactor:()=>ou,OneMinusSrcAlphaFactor:()=>nu,OneMinusSrcColorFactor:()=>eu,OrthographicCamera:()=>Gx,PCFShadowMap:()=>Pl,PCFSoftShadowMap:()=>Fl,PMREMGenerator:()=>rD,Path:()=>Fy,PerspectiveCamera:()=>Hg,Plane:()=>Y_,PlaneGeometry:()=>Eb,PlaneHelper:()=>LC,PointLight:()=>Wx,PointLightHelper:()=>yC,Points:()=>Bv,PointsMaterial:()=>Fv,PolarGridHelper:()=>TC,PolyhedronGeometry:()=>ey,PositionalAudio:()=>kS,PropertyBinding:()=>US,PropertyMixer:()=>jS,QuadraticBezierCurve:()=>Ay,QuadraticBezierCurve3:()=>jy,Quaternion:()=>Bp,QuaternionKeyframeTrack:()=>px,QuaternionLinearInterpolant:()=>fx,RED_GREEN_RGTC2_Format:()=>Zd,RED_RGTC1_Format:()=>Yd,REVISION:()=>El,RGBADepthPacking:()=>gf,RGBAFormat:()=>fd,RGBAIntegerFormat:()=>bd,RGBA_ASTC_10x10_Format:()=>Ud,RGBA_ASTC_10x5_Format:()=>Bd,RGBA_ASTC_10x6_Format:()=>Vd,RGBA_ASTC_10x8_Format:()=>Hd,RGBA_ASTC_12x10_Format:()=>Wd,RGBA_ASTC_12x12_Format:()=>Gd,RGBA_ASTC_4x4_Format:()=>Md,RGBA_ASTC_5x4_Format:()=>Nd,RGBA_ASTC_5x5_Format:()=>Pd,RGBA_ASTC_6x5_Format:()=>Fd,RGBA_ASTC_6x6_Format:()=>Id,RGBA_ASTC_8x5_Format:()=>Ld,RGBA_ASTC_8x6_Format:()=>Rd,RGBA_ASTC_8x8_Format:()=>zd,RGBA_BPTC_Format:()=>Kd,RGBA_ETC2_EAC_Format:()=>jd,RGBA_PVRTC_2BPPV1_Format:()=>Od,RGBA_PVRTC_4BPPV1_Format:()=>Dd,RGBA_S3TC_DXT1_Format:()=>Sd,RGBA_S3TC_DXT3_Format:()=>Cd,RGBA_S3TC_DXT5_Format:()=>wd,RGBDepthPacking:()=>_f,RGBFormat:()=>dd,RGBIntegerFormat:()=>yd,RGB_BPTC_SIGNED_Format:()=>qd,RGB_BPTC_UNSIGNED_Format:()=>Jd,RGB_ETC1_Format:()=>kd,RGB_ETC2_Format:()=>Ad,RGB_PVRTC_2BPPV1_Format:()=>Ed,RGB_PVRTC_4BPPV1_Format:()=>Td,RGB_S3TC_DXT1_Format:()=>xd,RGDepthPacking:()=>vf,RGFormat:()=>_d,RGIntegerFormat:()=>vd,RawShaderMaterial:()=>zb,Ray:()=>Jm,Raycaster:()=>tC,RectAreaLight:()=>Yx,RedFormat:()=>hd,RedIntegerFormat:()=>gd,ReinhardToneMapping:()=>Tu,RenderTarget:()=>gm,RenderTarget3D:()=>JS,RepeatWrapping:()=>zu,ReplaceStencilOp:()=>Of,ReverseSubtractEquation:()=>Jl,RingGeometry:()=>Db,SIGNED_RED_GREEN_RGTC2_Format:()=>Qd,SIGNED_RED_RGTC1_Format:()=>Xd,SRGBColorSpace:()=>Sf,SRGBTransfer:()=>Tf,Scene:()=>$g,ShaderChunk:()=>NE,ShaderLib:()=>PE,ShaderMaterial:()=>Lg,ShadowMaterial:()=>Rb,Shape:()=>Iy,ShapeGeometry:()=>Ob,ShapePath:()=>UC,ShapeUtils:()=>_b,ShortType:()=>ed,Skeleton:()=>I_,SkeletonHelper:()=>_C,SkinnedMesh:()=>j_,Source:()=>um,Sphere:()=>Bm,SphereGeometry:()=>Ab,Spherical:()=>iC,SphericalHarmonics3:()=>Xx,SplineCurve:()=>My,SpotLight:()=>zx,SpotLightHelper:()=>pC,Sprite:()=>__,SpriteMaterial:()=>r_,SrcAlphaFactor:()=>tu,SrcAlphaSaturateFactor:()=>su,SrcColorFactor:()=>$l,StaticCopyUsage:()=>np,StaticDrawUsage:()=>Xf,StaticReadUsage:()=>$f,StereoCamera:()=>mS,StreamCopyUsage:()=>ip,StreamDrawUsage:()=>Qf,StreamReadUsage:()=>tp,StringKeyframeTrack:()=>mx,SubtractEquation:()=>ql,SubtractiveBlending:()=>Ul,TOUCH:()=>Ol,TangentSpaceNormalMap:()=>yf,TetrahedronGeometry:()=>jb,Texture:()=>mm,TextureLoader:()=>jx,TextureUtils:()=>XC,TimestampQuery:()=>lp,TorusGeometry:()=>Mb,TorusKnotGeometry:()=>Nb,Triangle:()=>Fh,TriangleFanDrawMode:()=>mf,TriangleStripDrawMode:()=>pf,TrianglesDrawMode:()=>ff,TubeGeometry:()=>Pb,UVMapping:()=>Nu,Uint16BufferAttribute:()=>rg,Uint32BufferAttribute:()=>ag,Uint8BufferAttribute:()=>eg,Uint8ClampedBufferAttribute:()=>tg,Uniform:()=>YS,UniformsGroup:()=>ZS,UniformsLib:()=>J,UniformsUtils:()=>Pg,UnsignedByteType:()=>Qu,UnsignedInt248Type:()=>cd,UnsignedInt5999Type:()=>ld,UnsignedIntType:()=>rd,UnsignedShort4444Type:()=>od,UnsignedShort5551Type:()=>sd,UnsignedShortType:()=>td,VSMShadowMap:()=>Il,Vector2:()=>U,Vector3:()=>W,Vector4:()=>hm,VectorKeyframeTrack:()=>hx,VideoFrameTexture:()=>Uv,VideoTexture:()=>Hv,WebGL3DRenderTarget:()=>xm,WebGLArrayRenderTarget:()=>ym,WebGLCoordinateSystem:()=>sp,WebGLCubeRenderTarget:()=>qg,WebGLRenderTarget:()=>_m,WebGLRenderer:()=>Nk,WebGLUtils:()=>wk,WebGPUCoordinateSystem:()=>cp,WebXRController:()=>Xg,WireframeGeometry:()=>Fb,WrapAroundEnding:()=>lf,ZeroCurvatureEnding:()=>sf,ZeroFactor:()=>Zl,ZeroSlopeEnding:()=>cf,ZeroStencilOp:()=>Ef,createCanvasElement:()=>Yp});function QC(){let e=null,t=!1,n=null,r=null;function i(t,a){n(t,a),r=e.requestAnimationFrame(i)}return{start:function(){t!==!0&&n!==null&&(r=e.requestAnimationFrame(i),t=!0)},stop:function(){e.cancelAnimationFrame(r),t=!1},setAnimationLoop:function(e){n=e},setContext:function(t){e=t}}}function $C(e){let t=new WeakMap;function n(t,n){let r=t.array,i=t.usage,a=r.byteLength,o=e.createBuffer();e.bindBuffer(n,o),e.bufferData(n,r,i),t.onUploadCallback();let s;if(r instanceof Float32Array)s=e.FLOAT;else if(r instanceof Uint16Array)s=t.isFloat16BufferAttribute?e.HALF_FLOAT:e.UNSIGNED_SHORT;else if(r instanceof Int16Array)s=e.SHORT;else if(r instanceof Uint32Array)s=e.UNSIGNED_INT;else if(r instanceof Int32Array)s=e.INT;else if(r instanceof Int8Array)s=e.BYTE;else if(r instanceof Uint8Array)s=e.UNSIGNED_BYTE;else if(r instanceof Uint8ClampedArray)s=e.UNSIGNED_BYTE;else throw Error(`THREE.WebGLAttributes: Unsupported buffer data format: `+r);return{buffer:o,type:s,bytesPerElement:r.BYTES_PER_ELEMENT,version:t.version,size:a}}function r(t,n,r){let i=n.array,a=n.updateRanges;if(e.bindBuffer(r,t),a.length===0)e.bufferSubData(r,0,i);else{a.sort((e,t)=>e.start-t.start);let t=0;for(let e=1;es+l?(c.inputState.pinching=!1,this.dispatchEvent({type:`pinchend`,handedness:e.handedness,target:this})):!c.inputState.pinching&&o<=s-l&&(c.inputState.pinching=!0,this.dispatchEvent({type:`pinchstart`,handedness:e.handedness,target:this}))}else s!==null&&e.gripSpace&&(i=t.getPose(e.gripSpace,n),i!==null&&(s.matrix.fromArray(i.transform.matrix),s.matrix.decompose(s.position,s.rotation,s.scale),s.matrixWorldNeedsUpdate=!0,i.linearVelocity?(s.hasLinearVelocity=!0,s.linearVelocity.copy(i.linearVelocity)):s.hasLinearVelocity=!1,i.angularVelocity?(s.hasAngularVelocity=!0,s.angularVelocity.copy(i.angularVelocity)):s.hasAngularVelocity=!1));o!==null&&(r=t.getPose(e.targetRaySpace,n),r===null&&i!==null&&(r=i),r!==null&&(o.matrix.fromArray(r.transform.matrix),o.matrix.decompose(o.position,o.rotation,o.scale),o.matrixWorldNeedsUpdate=!0,r.linearVelocity?(o.hasLinearVelocity=!0,o.linearVelocity.copy(r.linearVelocity)):o.hasLinearVelocity=!1,r.angularVelocity?(o.hasAngularVelocity=!0,o.angularVelocity.copy(r.angularVelocity)):o.hasAngularVelocity=!1,this.dispatchEvent(tg)))}return o!==null&&(o.visible=r!==null),s!==null&&(s.visible=i!==null),c!==null&&(c.visible=a!==null),this}_getHandJoint(e,t){if(e.joints[t.jointName]===void 0){let n=new eg;n.matrixAutoUpdate=!1,n.visible=!1,e.joints[t.jointName]=n,e.add(n)}return e.joints[t.jointName]}},rg=class e{constructor(e,t=25e-5){this.isFogExp2=!0,this.name=``,this.color=new K(e),this.density=t}clone(){return new e(this.color,this.density)}toJSON(){return{type:`FogExp2`,name:this.name,color:this.color.getHex(),density:this.density}}},ig=class e{constructor(e,t=1,n=1e3){this.isFog=!0,this.name=``,this.color=new K(e),this.near=t,this.far=n}clone(){return new e(this.color,this.near,this.far)}toJSON(){return{type:`Fog`,name:this.name,color:this.color.getHex(),near:this.near,far:this.far}}},ag=class extends Dm{constructor(){super(),this.isScene=!0,this.type=`Scene`,this.background=null,this.environment=null,this.fog=null,this.backgroundBlurriness=0,this.backgroundIntensity=1,this.backgroundRotation=new um,this.environmentIntensity=1,this.environmentRotation=new um,this.overrideMaterial=null,typeof __THREE_DEVTOOLS__<`u`&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent(`observe`,{detail:this}))}copy(e,t){return super.copy(e,t),e.background!==null&&(this.background=e.background.clone()),e.environment!==null&&(this.environment=e.environment.clone()),e.fog!==null&&(this.fog=e.fog.clone()),this.backgroundBlurriness=e.backgroundBlurriness,this.backgroundIntensity=e.backgroundIntensity,this.backgroundRotation.copy(e.backgroundRotation),this.environmentIntensity=e.environmentIntensity,this.environmentRotation.copy(e.environmentRotation),e.overrideMaterial!==null&&(this.overrideMaterial=e.overrideMaterial.clone()),this.matrixAutoUpdate=e.matrixAutoUpdate,this}toJSON(e){let t=super.toJSON(e);return this.fog!==null&&(t.object.fog=this.fog.toJSON()),this.backgroundBlurriness>0&&(t.object.backgroundBlurriness=this.backgroundBlurriness),this.backgroundIntensity!==1&&(t.object.backgroundIntensity=this.backgroundIntensity),t.object.backgroundRotation=this.backgroundRotation.toArray(),this.environmentIntensity!==1&&(t.object.environmentIntensity=this.environmentIntensity),t.object.environmentRotation=this.environmentRotation.toArray(),t}},og=class{constructor(e,t){this.isInterleavedBuffer=!0,this.array=e,this.stride=t,this.count=e===void 0?0:e.length/t,this.usage=ef,this.updateRanges=[],this.version=0,this.uuid=Cf()}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}setUsage(e){return this.usage=e,this}addUpdateRange(e,t){this.updateRanges.push({start:e,count:t})}clearUpdateRanges(){this.updateRanges.length=0}copy(e){return this.array=new e.array.constructor(e.array),this.count=e.count,this.stride=e.stride,this.usage=e.usage,this}copyAt(e,t,n){e*=this.stride,n*=t.stride;for(let r=0,i=this.stride;re.far||t.push({distance:s,point:dg.clone(),uv:Vm.getInterpolation(dg,_g,vg,yg,bg,xg,Sg,new U),face:null,object:this})}copy(e,t){return super.copy(e,t),e.center!==void 0&&this.center.copy(e.center),this.material=e.material,this}};function wg(e,t,n,r,i,a){mg.subVectors(e,n).addScalar(.5).multiply(r),i===void 0?hg.copy(mg):(hg.x=a*mg.x-i*mg.y,hg.y=i*mg.x+a*mg.y),e.copy(t),e.x+=hg.x,e.y+=hg.y,e.applyMatrix4(gg)}const Tg=new W,Eg=new W;var Dg=class extends Dm{constructor(){super(),this.isLOD=!0,this._currentLevel=0,this.type=`LOD`,Object.defineProperties(this,{levels:{enumerable:!0,value:[]}}),this.autoUpdate=!0}copy(e){super.copy(e,!1);let t=e.levels;for(let e=0,n=t.length;e0){let n,r;for(n=1,r=t.length;n0){Tg.setFromMatrixPosition(this.matrixWorld);let n=e.ray.origin.distanceTo(Tg);this.getObjectForDistance(n).raycast(e,t)}}update(e){let t=this.levels;if(t.length>1){Tg.setFromMatrixPosition(e.matrixWorld),Eg.setFromMatrixPosition(this.matrixWorld);let n=Tg.distanceTo(Eg)/e.zoom;t[0].object.visible=!0;let r,i;for(r=1,i=t.length;r=e)t[r-1].object.visible=!1,t[r].object.visible=!0;else break}for(this._currentLevel=r-1;r1?null:t.copy(e.start).addScaledVector(n,i)}intersectsLine(e){let t=this.distanceToPoint(e.start),n=this.distanceToPoint(e.end);return t<0&&n>0||n<0&&t>0}intersectsBox(e){return e.intersectsPlane(this)}intersectsSphere(e){return e.intersectsPlane(this)}coplanarPoint(e){return e.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(e,t){let n=t||e_.getNormalMatrix(e),r=this.coplanarPoint(Qg).applyMatrix4(e),i=this.normal.applyMatrix3(n).normalize();return this.constant=-r.dot(i),this}translate(e){return this.constant-=e.dot(this.normal),this}equals(e){return e.normal.equals(this.normal)&&e.constant===this.constant}clone(){return new this.constructor().copy(this)}};const n_=new Kp,r_=new W;var i_=class{constructor(e=new t_,t=new t_,n=new t_,r=new t_,i=new t_,a=new t_){this.planes=[e,t,n,r,i,a]}set(e,t,n,r,i,a){let o=this.planes;return o[0].copy(e),o[1].copy(t),o[2].copy(n),o[3].copy(r),o[4].copy(i),o[5].copy(a),this}copy(e){let t=this.planes;for(let n=0;n<6;n++)t[n].copy(e.planes[n]);return this}setFromProjectionMatrix(e,t=pf){let n=this.planes,r=e.elements,i=r[0],a=r[1],o=r[2],s=r[3],c=r[4],l=r[5],u=r[6],d=r[7],f=r[8],p=r[9],m=r[10],h=r[11],g=r[12],_=r[13],v=r[14],y=r[15];if(n[0].setComponents(s-i,d-c,h-f,y-g).normalize(),n[1].setComponents(s+i,d+c,h+f,y+g).normalize(),n[2].setComponents(s+a,d+l,h+p,y+_).normalize(),n[3].setComponents(s-a,d-l,h-p,y-_).normalize(),n[4].setComponents(s-o,d-u,h-m,y-v).normalize(),t===pf)n[5].setComponents(s+o,d+u,h+m,y+v).normalize();else if(t===mf)n[5].setComponents(o,u,m,v).normalize();else throw Error(`THREE.Frustum.setFromProjectionMatrix(): Invalid coordinate system: `+t);return this}intersectsObject(e){if(e.boundingSphere!==void 0)e.boundingSphere===null&&e.computeBoundingSphere(),n_.copy(e.boundingSphere).applyMatrix4(e.matrixWorld);else{let t=e.geometry;t.boundingSphere===null&&t.computeBoundingSphere(),n_.copy(t.boundingSphere).applyMatrix4(e.matrixWorld)}return this.intersectsSphere(n_)}intersectsSprite(e){return n_.center.set(0,0,0),n_.radius=.7071067811865476,n_.applyMatrix4(e.matrixWorld),this.intersectsSphere(n_)}intersectsSphere(e){let t=this.planes,n=e.center,r=-e.radius;for(let e=0;e<6;e++){let i=t[e].distanceToPoint(n);if(i0?e.max.x:e.min.x,r_.y=r.normal.y>0?e.max.y:e.min.y,r_.z=r.normal.z>0?e.max.z:e.min.z,r.distanceToPoint(r_)<0)return!1}return!0}containsPoint(e){let t=this.planes;for(let n=0;n<6;n++)if(t[n].distanceToPoint(e)<0)return!1;return!0}clone(){return new this.constructor().copy(this)}};const a_=new G,o_=new i_;var s_=class e{constructor(){this.coordinateSystem=pf}intersectsObject(e,t){if(!t.isArrayCamera||t.cameras.length===0)return!1;for(let n=0;n=i.length&&i.push({start:-1,count:-1,z:-1,index:-1});let o=i[this.index];a.push(o),this.index++,o.start=e,o.count=t,o.z=n,o.index=r}reset(){this.list.length=0,this.index=0}};const f_=new G,p_=new K(1,1,1),m_=new i_,h_=new s_,g_=new Op,__=new Kp,v_=new W,y_=new W,b_=new W,x_=new d_,S_=new Mh,C_=[];function w_(e,t,n=0){let r=t.itemSize;if(e.isInterleavedBufferAttribute||e.array.constructor!==t.array.constructor){let i=e.count;for(let a=0;a65535?new Uint32Array(r):new Uint16Array(r);t.setIndex(new ih(e,1))}this._geometryInitialized=!0}}_validateGeometry(e){let t=this.geometry;if(!!e.getIndex()!=!!t.getIndex())throw Error(`THREE.BatchedMesh: All geometries must consistently have "index".`);for(let n in t.attributes){if(!e.hasAttribute(n))throw Error(`THREE.BatchedMesh: Added geometry missing "${n}". All geometries must have consistent attributes.`);let r=e.getAttribute(n),i=t.getAttribute(n);if(r.itemSize!==i.itemSize||r.normalized!==i.normalized)throw Error(`THREE.BatchedMesh: All attributes must have a consistent itemSize and normalized value.`)}}validateInstanceId(e){let t=this._instanceInfo;if(e<0||e>=t.length||t[e].active===!1)throw Error(`THREE.BatchedMesh: Invalid instanceId ${e}. Instance is either out of range or has been deleted.`)}validateGeometryId(e){let t=this._geometryInfo;if(e<0||e>=t.length||t[e].active===!1)throw Error(`THREE.BatchedMesh: Invalid geometryId ${e}. Geometry is either out of range or has been deleted.`)}setCustomSort(e){return this.customSort=e,this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new Op);let e=this.boundingBox,t=this._instanceInfo;e.makeEmpty();for(let n=0,r=t.length;n=this.maxInstanceCount;if(t&&this._availableInstanceIds.length===0)throw Error(`THREE.BatchedMesh: Maximum item count reached.`);let n={visible:!0,active:!0,geometryIndex:e},r=null;this._availableInstanceIds.length>0?(this._availableInstanceIds.sort(c_),r=this._availableInstanceIds.shift(),this._instanceInfo[r]=n):(r=this._instanceInfo.length,this._instanceInfo.push(n));let i=this._matricesTexture;f_.identity().toArray(i.image.data,r*16),i.needsUpdate=!0;let a=this._colorsTexture;return a&&(p_.toArray(a.image.data,r*4),a.needsUpdate=!0),this._visibilityChanged=!0,r}addGeometry(e,t=-1,n=-1){this._initializeGeometry(e),this._validateGeometry(e);let r={vertexStart:-1,vertexCount:-1,reservedVertexCount:-1,indexStart:-1,indexCount:-1,reservedIndexCount:-1,start:-1,count:-1,boundingBox:null,boundingSphere:null,active:!0},i=this._geometryInfo;r.vertexStart=this._nextVertexStart,r.reservedVertexCount=t===-1?e.getAttribute(`position`).count:t;let a=e.getIndex(),o=a!==null;if(o&&(r.indexStart=this._nextIndexStart,r.reservedIndexCount=n===-1?a.count:n),r.indexStart!==-1&&r.indexStart+r.reservedIndexCount>this._maxIndexCount||r.vertexStart+r.reservedVertexCount>this._maxVertexCount)throw Error(`THREE.BatchedMesh: Reserved space request exceeds the maximum buffer size.`);let s;return this._availableGeometryIds.length>0?(this._availableGeometryIds.sort(c_),s=this._availableGeometryIds.shift(),i[s]=r):(s=this._geometryCount,this._geometryCount++,i.push(r)),this.setGeometryAt(s,e),this._nextIndexStart=r.indexStart+r.reservedIndexCount,this._nextVertexStart=r.vertexStart+r.reservedVertexCount,s}setGeometryAt(e,t){if(e>=this._geometryCount)throw Error(`THREE.BatchedMesh: Maximum geometry count reached.`);this._validateGeometry(t);let n=this.geometry,r=n.getIndex()!==null,i=n.getIndex(),a=t.getIndex(),o=this._geometryInfo[e];if(r&&a.count>o.reservedIndexCount||t.attributes.position.count>o.reservedVertexCount)throw Error(`THREE.BatchedMesh: Reserved space not large enough for provided geometry.`);let s=o.vertexStart,c=o.reservedVertexCount;for(let e in o.vertexCount=t.getAttribute(`position`).count,n.attributes){let r=t.getAttribute(e),i=n.getAttribute(e);w_(r,i,s);let a=r.itemSize;for(let e=r.count,t=c;e=t.length||t[e].active===!1)return this;let n=this._instanceInfo;for(let t=0,r=n.length;tt).sort((e,t)=>n[e].vertexStart-n[t].vertexStart),i=this.geometry;for(let a=0,o=n.length;a=this._geometryCount)return null;let n=this.geometry,r=this._geometryInfo[e];if(r.boundingBox===null){let e=new Op,t=n.index,i=n.attributes.position;for(let n=r.start,a=r.start+r.count;n=this._geometryCount)return null;let n=this.geometry,r=this._geometryInfo[e];if(r.boundingSphere===null){let t=new Kp;this.getBoundingBoxAt(e,g_),g_.getCenter(t.center);let i=n.index,a=n.attributes.position,o=0;for(let e=r.start,n=r.start+r.count;ee.active),r=Math.max(...n.map(e=>e.vertexStart+e.reservedVertexCount));if(r>e)throw Error(`BatchedMesh: Geometry vertex values are being used outside the range ${t}. Cannot shrink further.`);if(this.geometry.index){let e=Math.max(...n.map(e=>e.indexStart+e.reservedIndexCount));if(e>t)throw Error(`BatchedMesh: Geometry index values are being used outside the range ${t}. Cannot shrink further.`)}let i=this.geometry;i.dispose(),this._maxVertexCount=e,this._maxIndexCount=t,this._geometryInitialized&&(this._geometryInitialized=!1,this.geometry=new bh,this._initializeGeometry(i));let a=this.geometry;for(let e in i.index&&T_(i.index.array,a.index.array),i.attributes)T_(i.attributes[e].array,a.attributes[e].array)}raycast(e,t){let n=this._instanceInfo,r=this._geometryInfo,i=this.matrixWorld,a=this.geometry;S_.material=this.material,S_.geometry.index=a.index,S_.geometry.attributes=a.attributes,S_.geometry.boundingBox===null&&(S_.geometry.boundingBox=new Op),S_.geometry.boundingSphere===null&&(S_.geometry.boundingSphere=new Kp);for(let a=0,o=n.length;a({...e,boundingBox:e.boundingBox===null?null:e.boundingBox.clone(),boundingSphere:e.boundingSphere===null?null:e.boundingSphere.clone()})),this._instanceInfo=e._instanceInfo.map(e=>({...e})),this._availableInstanceIds=e._availableInstanceIds.slice(),this._availableGeometryIds=e._availableGeometryIds.slice(),this._nextIndexStart=e._nextIndexStart,this._nextVertexStart=e._nextVertexStart,this._geometryCount=e._geometryCount,this._maxInstanceCount=e._maxInstanceCount,this._maxVertexCount=e._maxVertexCount,this._maxIndexCount=e._maxIndexCount,this._geometryInitialized=e._geometryInitialized,this._multiDrawCounts=e._multiDrawCounts.slice(),this._multiDrawStarts=e._multiDrawStarts.slice(),this._indirectTexture=e._indirectTexture.clone(),this._indirectTexture.image.data=this._indirectTexture.image.data.slice(),this._matricesTexture=e._matricesTexture.clone(),this._matricesTexture.image.data=this._matricesTexture.image.data.slice(),this._colorsTexture!==null&&(this._colorsTexture=e._colorsTexture.clone(),this._colorsTexture.image.data=this._colorsTexture.image.data.slice()),this}dispose(){this.geometry.dispose(),this._matricesTexture.dispose(),this._matricesTexture=null,this._indirectTexture.dispose(),this._indirectTexture=null,this._colorsTexture!==null&&(this._colorsTexture.dispose(),this._colorsTexture=null)}onBeforeRender(e,t,n,r,i){if(!this._visibilityChanged&&!this.perObjectFrustumCulled&&!this.sortObjects)return;let a=r.getIndex(),o=a===null?1:a.array.BYTES_PER_ELEMENT,s=this._instanceInfo,c=this._multiDrawStarts,l=this._multiDrawCounts,u=this._geometryInfo,d=this.perObjectFrustumCulled,f=this._indirectTexture,p=f.image.data,m=n.isArrayCamera?h_:m_;d&&!n.isArrayCamera&&(f_.multiplyMatrices(n.projectionMatrix,n.matrixWorldInverse).multiply(this.matrixWorld),m_.setFromProjectionMatrix(f_,e.coordinateSystem));let h=0;if(this.sortObjects){f_.copy(this.matrixWorld).invert(),v_.setFromMatrixPosition(n.matrixWorld).applyMatrix4(f_),y_.set(0,0,-1).transformDirection(n.matrixWorld).transformDirection(f_);for(let e=0,t=s.length;e0){let e=t[n[0]];if(e!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let t=0,n=e.length;tr)return;N_.applyMatrix4(e.matrixWorld);let l=t.ray.origin.distanceTo(N_);if(!(lt.far))return{distance:l,point:P_.clone().applyMatrix4(e.matrixWorld),index:o,face:null,faceIndex:null,barycoord:null,object:e}}const L_=new W,R_=new W;var z_=class extends F_{constructor(e,t){super(e,t),this.isLineSegments=!0,this.type=`LineSegments`}computeLineDistances(){let e=this.geometry;if(e.index===null){let t=e.attributes.position,n=[];for(let e=0,r=t.count;e0){let e=t[n[0]];if(e!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let t=0,n=e.length;ti.far)return;a.push({distance:c,distanceToRay:Math.sqrt(s),point:n,index:t,face:null,faceIndex:null,barycoord:null,object:o})}}var J_=class extends bp{constructor(e,t,n,r,i=$l,a=$l,o,s,c){super(e,t,n,r,i,a,o,s,c),this.isVideoTexture=!0,this.generateMipmaps=!1;let l=this;function u(){l.needsUpdate=!0,e.requestVideoFrameCallback(u)}`requestVideoFrameCallback`in e&&e.requestVideoFrameCallback(u)}clone(){return new this.constructor(this.image).copy(this)}update(){let e=this.image,t=`requestVideoFrameCallback`in e;t===!1&&e.readyState>=e.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}},Y_=class extends J_{constructor(e,t,n,r,i,a,o,s){super({},e,t,n,r,i,a,o,s),this.isVideoFrameTexture=!0}update(){}clone(){return new this.constructor().copy(this)}setFrame(e){this.image=e,this.needsUpdate=!0}},X_=class extends bp{constructor(e,t){super({width:e,height:t}),this.isFramebufferTexture=!0,this.magFilter=Jl,this.minFilter=Jl,this.generateMipmaps=!1,this.needsUpdate=!0}},Z_=class extends bp{constructor(e,t,n,r,i,a,o,s,c,l,u,d){super(null,a,o,s,c,l,r,i,u,d),this.isCompressedTexture=!0,this.image={width:t,height:n},this.mipmaps=e,this.flipY=!1,this.generateMipmaps=!1}},Q_=class extends Z_{constructor(e,t,n,r,i,a){super(e,t,n,i,a),this.isCompressedArrayTexture=!0,this.image.depth=r,this.wrapR=Kl,this.layerUpdates=new Set}addLayerUpdate(e){this.layerUpdates.add(e)}clearLayerUpdates(){this.layerUpdates.clear()}},$_=class extends Z_{constructor(e,t,n){super(void 0,e[0].width,e[0].height,t,n,Bl),this.isCompressedCubeTexture=!0,this.isCubeTexture=!0,this.image=e}},ev=class extends bp{constructor(e,t,n,r,i,a,o,s,c){super(e,t,n,r,i,a,o,s,c),this.isCanvasTexture=!0,this.needsUpdate=!0}},tv=class extends bp{constructor(e,t,n=lu,r,i,a,o=Jl,s=Jl,c,l=yu,u=1){if(l!==yu&&l!==bu)throw Error(`DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat`);let d={width:e,height:t,depth:u};super(d,r,i,a,o,s,l,n,c),this.isDepthTexture=!0,this.flipY=!1,this.generateMipmaps=!1,this.compareFunction=null}copy(e){return super.copy(e),this.source=new gp(Object.assign({},e.image)),this.compareFunction=e.compareFunction,this}toJSON(e){let t=super.toJSON(e);return this.compareFunction!==null&&(t.compareFunction=this.compareFunction),t}},nv=class e extends bh{constructor(e=1,t=1,n=4,r=8,i=1){super(),this.type=`CapsuleGeometry`,this.parameters={radius:e,height:t,capSegments:n,radialSegments:r,heightSegments:i},t=Math.max(0,t),n=Math.max(1,Math.floor(n)),r=Math.max(3,Math.floor(r)),i=Math.max(1,Math.floor(i));let a=[],o=[],s=[],c=[],l=t/2,u=Math.PI/2*e,d=t,f=2*u+d,p=n*2+i,m=r+1,h=new W,g=new W;for(let _=0;_<=p;_++){let v=0,y=0,b=0,x=0;if(_<=n){let t=_/n,r=t*Math.PI/2;y=-l-e*Math.cos(r),b=e*Math.sin(r),x=-e*Math.cos(r),v=t*u}else if(_<=n+i){let r=(_-n)/i;y=-l+r*t,b=e,x=0,v=u+r*d}else{let t=(_-n-i)/n,r=t*Math.PI/2;y=l+e*Math.sin(r),b=e*Math.cos(r),x=e*Math.sin(r),v=u+d+t*u}let S=Math.max(0,Math.min(1,v/f)),C=0;_===0?C=.5/r:_===p&&(C=-.5/r);for(let e=0;e<=r;e++){let t=e/r,n=t*Math.PI*2,i=Math.sin(n),a=Math.cos(n);g.x=-b*a,g.y=y,g.z=b*i,o.push(g.x,g.y,g.z),h.set(-b*a,x,b*i),h.normalize(),s.push(h.x,h.y,h.z),c.push(t+C,S)}if(_>0){let e=(_-1)*m;for(let t=0;t0&&v(!0),t>0&&v(!1)),this.setIndex(l),this.setAttribute(`position`,new q(u,3)),this.setAttribute(`normal`,new q(d,3)),this.setAttribute(`uv`,new q(f,2));function _(){let a=new W,_=new W,v=0,y=(t-e)/n;for(let c=0;c<=i;c++){let l=[],g=c/i,v=g*(t-e)+e;for(let e=0;e<=r;e++){let t=e/r,i=t*s+o,c=Math.sin(i),m=Math.cos(i);_.x=v*c,_.y=-g*n+h,_.z=v*m,u.push(_.x,_.y,_.z),a.set(c,y,m).normalize(),d.push(a.x,a.y,a.z),f.push(t,1-g),l.push(p++)}m.push(l)}for(let n=0;n0||r!==0)&&(l.push(a,o,c),v+=3),(t>0||r!==i-1)&&(l.push(o,s,c),v+=3)}c.addGroup(g,v,0),g+=v}function v(n){let i=p,a=new U,m=new W,_=0,v=n===!0?e:t,y=n===!0?1:-1;for(let e=1;e<=r;e++)u.push(0,h*y,0),d.push(0,y,0),f.push(.5,.5),p++;let b=p;for(let e=0;e<=r;e++){let t=e/r,n=t*s+o,i=Math.cos(n),c=Math.sin(n);m.x=v*c,m.y=h*y,m.z=v*i,u.push(m.x,m.y,m.z),d.push(0,y,0),a.x=i*.5+.5,a.y=c*.5*y+.5,f.push(a.x,a.y),p++}for(let e=0;e.9&&o<.1&&(t<.2&&(a[e+0]+=1),n<.2&&(a[e+2]+=1),r<.2&&(a[e+4]+=1))}}function d(e){i.push(e.x,e.y,e.z)}function f(t,n){let r=t*3;n.x=e[r+0],n.y=e[r+1],n.z=e[r+2]}function p(){let e=new W,t=new W,n=new W,r=new W,o=new U,s=new U,c=new U;for(let l=0,u=0;l0)s=r-1;else{s=r;break}if(r=s,n[r]===a)return r/(i-1);let l=n[r],u=n[r+1],d=u-l,f=(a-l)/d,p=(r+f)/(i-1);return p}getTangent(e,t){let n=1e-4,r=e-n,i=e+n;r<0&&(r=0),i>1&&(i=1);let a=this.getPoint(r),o=this.getPoint(i),s=t||(a.isVector2?new U:new W);return s.copy(o).sub(a).normalize(),s}getTangentAt(e,t){let n=this.getUtoTmapping(e);return this.getTangent(n,t)}computeFrenetFrames(e,t=!1){let n=new W,r=[],i=[],a=[],o=new W,s=new G;for(let t=0;t<=e;t++){let n=t/e;r[t]=this.getTangentAt(n,new W)}i[0]=new W,a[0]=new W;let c=Number.MAX_VALUE,l=Math.abs(r[0].x),u=Math.abs(r[0].y),d=Math.abs(r[0].z);l<=c&&(c=l,n.set(1,0,0)),u<=c&&(c=u,n.set(0,1,0)),d<=c&&n.set(0,0,1),o.crossVectors(r[0],n).normalize(),i[0].crossVectors(r[0],o),a[0].crossVectors(r[0],i[0]);for(let t=1;t<=e;t++){if(i[t]=i[t-1].clone(),a[t]=a[t-1].clone(),o.crossVectors(r[t-1],r[t]),o.length()>2**-52){o.normalize();let e=Math.acos(wf(r[t-1].dot(r[t]),-1,1));i[t].applyMatrix4(s.makeRotationAxis(o,e))}a[t].crossVectors(r[t],i[t])}if(t===!0){let t=Math.acos(wf(i[0].dot(i[e]),-1,1));t/=e,r[0].dot(o.crossVectors(i[0],i[e]))>0&&(t=-t);for(let n=1;n<=e;n++)i[n].applyMatrix4(s.makeRotationAxis(r[n],t*n)),a[n].crossVectors(r[n],i[n])}return{tangents:r,normals:i,binormals:a}}clone(){return new this.constructor().copy(this)}copy(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}toJSON(){let e={metadata:{version:4.7,type:`Curve`,generator:`Curve.toJSON`}};return e.arcLengthDivisions=this.arcLengthDivisions,e.type=this.type,e}fromJSON(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}},mv=class extends pv{constructor(e=0,t=0,n=1,r=1,i=0,a=Math.PI*2,o=!1,s=0){super(),this.isEllipseCurve=!0,this.type=`EllipseCurve`,this.aX=e,this.aY=t,this.xRadius=n,this.yRadius=r,this.aStartAngle=i,this.aEndAngle=a,this.aClockwise=o,this.aRotation=s}getPoint(e,t=new U){let n=t,r=Math.PI*2,i=this.aEndAngle-this.aStartAngle,a=Math.abs(i)<2**-52;for(;i<0;)i+=r;for(;i>r;)i-=r;i<2**-52&&(i=a?0:r),this.aClockwise===!0&&!a&&(i===r?i=-r:i-=r);let o=this.aStartAngle+e*i,s=this.aX+this.xRadius*Math.cos(o),c=this.aY+this.yRadius*Math.sin(o);if(this.aRotation!==0){let e=Math.cos(this.aRotation),t=Math.sin(this.aRotation),n=s-this.aX,r=c-this.aY;s=n*e-r*t+this.aX,c=n*t+r*e+this.aY}return n.set(s,c)}copy(e){return super.copy(e),this.aX=e.aX,this.aY=e.aY,this.xRadius=e.xRadius,this.yRadius=e.yRadius,this.aStartAngle=e.aStartAngle,this.aEndAngle=e.aEndAngle,this.aClockwise=e.aClockwise,this.aRotation=e.aRotation,this}toJSON(){let e=super.toJSON();return e.aX=this.aX,e.aY=this.aY,e.xRadius=this.xRadius,e.yRadius=this.yRadius,e.aStartAngle=this.aStartAngle,e.aEndAngle=this.aEndAngle,e.aClockwise=this.aClockwise,e.aRotation=this.aRotation,e}fromJSON(e){return super.fromJSON(e),this.aX=e.aX,this.aY=e.aY,this.xRadius=e.xRadius,this.yRadius=e.yRadius,this.aStartAngle=e.aStartAngle,this.aEndAngle=e.aEndAngle,this.aClockwise=e.aClockwise,this.aRotation=e.aRotation,this}},hv=class extends mv{constructor(e,t,n,r,i,a){super(e,t,n,n,r,i,a),this.isArcCurve=!0,this.type=`ArcCurve`}};function gv(){let e=0,t=0,n=0,r=0;function i(i,a,o,s){e=i,t=o,n=-3*i+3*a-2*o-s,r=2*i-2*a+o+s}return{initCatmullRom:function(e,t,n,r,a){i(t,n,a*(n-e),a*(r-t))},initNonuniformCatmullRom:function(e,t,n,r,a,o,s){let c=(t-e)/a-(n-e)/(a+o)+(n-t)/o,l=(n-t)/o-(r-t)/(o+s)+(r-n)/s;c*=o,l*=o,i(t,n,c,l)},calc:function(i){let a=i*i,o=a*i;return e+t*i+n*a+r*o}}}const _v=new W,vv=new gv,yv=new gv,bv=new gv;var xv=class extends pv{constructor(e=[],t=!1,n=`centripetal`,r=.5){super(),this.isCatmullRomCurve3=!0,this.type=`CatmullRomCurve3`,this.points=e,this.closed=t,this.curveType=n,this.tension=r}getPoint(e,t=new W){let n=t,r=this.points,i=r.length,a=(i-(this.closed?0:1))*e,o=Math.floor(a),s=a-o;this.closed?o+=o>0?0:(Math.floor(Math.abs(o)/i)+1)*i:s===0&&o===i-1&&(o=i-2,s=1);let c,l;this.closed||o>0?c=r[(o-1)%i]:(_v.subVectors(r[0],r[1]).add(r[0]),c=_v);let u=r[o%i],d=r[(o+1)%i];if(this.closed||o+2r.length-2?r.length-1:a+1],u=r[a>r.length-3?r.length-1:a+2];return n.set(Sv(o,s.x,c.x,l.x,u.x),Sv(o,s.y,c.y,l.y,u.y)),n}copy(e){super.copy(e),this.points=[];for(let t=0,n=e.points.length;t=n){let e=r[i]-n,a=this.curves[i],o=a.getLength(),s=o===0?0:1-e/o;return a.getPointAt(s,t)}i++}return null}getLength(){let e=this.getCurveLengths();return e[e.length-1]}updateArcLengths(){this.needsUpdate=!0,this.cacheLengths=null,this.getCurveLengths()}getCurveLengths(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;let e=[],t=0;for(let n=0,r=this.curves.length;n1&&!t[t.length-1].equals(t[0])&&t.push(t[0]),t}copy(e){super.copy(e),this.curves=[];for(let t=0,n=e.curves.length;t0){let e=c.getPoint(0);e.equals(this.currentPoint)||this.lineTo(e.x,e.y)}this.curves.push(c);let l=c.getPoint(1);return this.currentPoint.copy(l),this}copy(e){return super.copy(e),this.currentPoint.copy(e.currentPoint),this}toJSON(){let e=super.toJSON();return e.currentPoint=this.currentPoint.toArray(),e}fromJSON(e){return super.fromJSON(e),this.currentPoint.fromArray(e.currentPoint),this}},Hv=class extends Vv{constructor(e){super(e),this.uuid=Cf(),this.type=`Shape`,this.holes=[]}getPointsHoles(e){let t=[];for(let n=0,r=this.holes.length;n80*n){s=1/0,c=1/0;let t=-1/0,r=-1/0;for(let a=n;at&&(t=n),i>r&&(r=i)}l=Math.max(t-s,r-c),l=l===0?0:32767/l}return Kv(a,o,n,s,c,l,0),o}function Wv(e,t,n,r,i){let a;if(i===xy(e,t,n,r)>0)for(let i=t;i=t;i-=r)a=vy(i/r|0,e[i],e[i+1],a);return a&&uy(a,a.next)&&(yy(a),a=a.next),a}function Gv(e,t){if(!e)return e;t||=e;let n=e,r;do if(r=!1,!n.steiner&&(uy(n,n.next)||ly(n.prev,n,n.next)===0)){if(yy(n),n=t=n.prev,n===n.next)break;r=!0}else n=n.next;while(r||n!==t);return t}function Kv(e,t,n,r,i,a,o){if(!e)return;!o&&a&&ny(e,r,i,a);let s=e;for(;e.prev!==e.next;){let c=e.prev,l=e.next;if(a?Jv(e,r,i,a):qv(e)){t.push(c.i,e.i,l.i),yy(e),e=l.next,s=l.next;continue}if(e=l,e===s){o?o===1?(e=Yv(Gv(e),t),Kv(e,t,n,r,i,a,2)):o===2&&Xv(e,t,n,r,i,a):Kv(Gv(e),t,n,r,i,a,1);break}}}function qv(e){let t=e.prev,n=e,r=e.next;if(ly(t,n,r)>=0)return!1;let i=t.x,a=n.x,o=r.x,s=t.y,c=n.y,l=r.y,u=Math.min(i,a,o),d=Math.min(s,c,l),f=Math.max(i,a,o),p=Math.max(s,c,l),m=r.next;for(;m!==t;){if(m.x>=u&&m.x<=f&&m.y>=d&&m.y<=p&&sy(i,s,a,c,o,l,m.x,m.y)&&ly(m.prev,m,m.next)>=0)return!1;m=m.next}return!0}function Jv(e,t,n,r){let i=e.prev,a=e,o=e.next;if(ly(i,a,o)>=0)return!1;let s=i.x,c=a.x,l=o.x,u=i.y,d=a.y,f=o.y,p=Math.min(s,c,l),m=Math.min(u,d,f),h=Math.max(s,c,l),g=Math.max(u,d,f),_=iy(p,m,t,n,r),v=iy(h,g,t,n,r),y=e.prevZ,b=e.nextZ;for(;y&&y.z>=_&&b&&b.z<=v;){if(y.x>=p&&y.x<=h&&y.y>=m&&y.y<=g&&y!==i&&y!==o&&sy(s,u,c,d,l,f,y.x,y.y)&&ly(y.prev,y,y.next)>=0||(y=y.prevZ,b.x>=p&&b.x<=h&&b.y>=m&&b.y<=g&&b!==i&&b!==o&&sy(s,u,c,d,l,f,b.x,b.y)&&ly(b.prev,b,b.next)>=0))return!1;b=b.nextZ}for(;y&&y.z>=_;){if(y.x>=p&&y.x<=h&&y.y>=m&&y.y<=g&&y!==i&&y!==o&&sy(s,u,c,d,l,f,y.x,y.y)&&ly(y.prev,y,y.next)>=0)return!1;y=y.prevZ}for(;b&&b.z<=v;){if(b.x>=p&&b.x<=h&&b.y>=m&&b.y<=g&&b!==i&&b!==o&&sy(s,u,c,d,l,f,b.x,b.y)&&ly(b.prev,b,b.next)>=0)return!1;b=b.nextZ}return!0}function Yv(e,t){let n=e;do{let r=n.prev,i=n.next.next;!uy(r,i)&&dy(r,n,n.next,i)&&hy(r,i)&&hy(i,r)&&(t.push(r.i,n.i,i.i),yy(n),yy(n.next),n=e=i),n=n.next}while(n!==e);return Gv(n)}function Xv(e,t,n,r,i,a){let o=e;do{let e=o.next.next;for(;e!==o.prev;){if(o.i!==e.i&&cy(o,e)){let s=_y(o,e);o=Gv(o,o.next),s=Gv(s,s.next),Kv(o,t,n,r,i,a,0),Kv(s,t,n,r,i,a,0);return}e=e.next}o=o.next}while(o!==e)}function Zv(e,t,n,r){let i=[];for(let n=0,a=t.length;n=n.next.y&&n.next.y!==n.y){let e=n.x+(i-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(e<=r&&e>a&&(a=e,o=n.x=n.x&&n.x>=c&&r!==n.x&&oy(io.x||n.x===o.x&&ty(o,n)))&&(o=n,u=t)}n=n.next}while(n!==s);return o}function ty(e,t){return ly(e.prev,e,t.prev)<0&&ly(t.next,e,e.next)<0}function ny(e,t,n,r){let i=e;do i.z===0&&(i.z=iy(i.x,i.y,t,n,r)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next;while(i!==e);i.prevZ.nextZ=null,i.prevZ=null,ry(i)}function ry(e){let t,n=1;do{let r=e,i;e=null;let a=null;for(t=0;r;){t++;let o=r,s=0;for(let e=0;e0||c>0&&o;)s!==0&&(c===0||!o||r.z<=o.z)?(i=r,r=r.nextZ,s--):(i=o,o=o.nextZ,c--),a?a.nextZ=i:e=i,i.prevZ=a,a=i;r=o}a.nextZ=null,n*=2}while(t>1);return e}function iy(e,t,n,r,i){return e=(e-n)*i|0,t=(t-r)*i|0,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,t=(t|t<<8)&16711935,t=(t|t<<4)&252645135,t=(t|t<<2)&858993459,t=(t|t<<1)&1431655765,e|t<<1}function ay(e){let t=e,n=e;do(t.x=(e-o)*(a-s)&&(e-o)*(r-s)>=(n-o)*(t-s)&&(n-o)*(a-s)>=(i-o)*(r-s)}function sy(e,t,n,r,i,a,o,s){return!(e===o&&t===s)&&oy(e,t,n,r,i,a,o,s)}function cy(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!my(e,t)&&(hy(e,t)&&hy(t,e)&&gy(e,t)&&(ly(e.prev,e,t.prev)||ly(e,t.prev,t))||uy(e,t)&&ly(e.prev,e,e.next)>0&&ly(t.prev,t,t.next)>0)}function ly(e,t,n){return(t.y-e.y)*(n.x-t.x)-(t.x-e.x)*(n.y-t.y)}function uy(e,t){return e.x===t.x&&e.y===t.y}function dy(e,t,n,r){let i=py(ly(e,t,n)),a=py(ly(e,t,r)),o=py(ly(n,r,e)),s=py(ly(n,r,t));return!!(i!==a&&o!==s||i===0&&fy(e,n,t)||a===0&&fy(e,r,t)||o===0&&fy(n,e,r)||s===0&&fy(n,t,r))}function fy(e,t,n){return t.x<=Math.max(e.x,n.x)&&t.x>=Math.min(e.x,n.x)&&t.y<=Math.max(e.y,n.y)&&t.y>=Math.min(e.y,n.y)}function py(e){return e>0?1:e<0?-1:0}function my(e,t){let n=e;do{if(n.i!==e.i&&n.next.i!==e.i&&n.i!==t.i&&n.next.i!==t.i&&dy(n,n.next,e,t))return!0;n=n.next}while(n!==e);return!1}function hy(e,t){return ly(e.prev,e,e.next)<0?ly(e,t,e.next)>=0&&ly(e,e.prev,t)>=0:ly(e,t,e.prev)<0||ly(e,e.next,t)<0}function gy(e,t){let n=e,r=!1,i=(e.x+t.x)/2,a=(e.y+t.y)/2;do n.y>a!=n.next.y>a&&n.next.y!==n.y&&i<(n.next.x-n.x)*(a-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next;while(n!==e);return r}function _y(e,t){let n=by(e.i,e.x,e.y),r=by(t.i,t.x,t.y),i=e.next,a=t.prev;return e.next=t,t.prev=e,n.next=i,i.prev=n,r.next=n,n.prev=r,a.next=r,r.prev=a,r}function vy(e,t,n,r){let i=by(e,t,n);return r?(i.next=r.next,i.prev=r,r.next.prev=i,r.next=i):(i.prev=i,i.next=i),i}function yy(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function by(e,t,n){return{i:e,x:t,y:n,prev:null,next:null,z:0,prevZ:null,nextZ:null,steiner:!1}}function xy(e,t,n,r){let i=0;for(let a=t,o=n-r;a2&&e[t-1].equals(e[0])&&e.pop()}function Ty(e,t){for(let n=0;n2**-52){let d=Math.sqrt(u),f=Math.sqrt(c*c+l*l),p=t.x-s/d,m=t.y+o/d,h=n.x-l/f,g=n.y+c/f,_=((h-p)*l-(g-m)*c)/(o*l-s*c);r=p+o*_-e.x,i=m+s*_-e.y;let v=r*r+i*i;if(v<=2)return new U(r,i);a=Math.sqrt(v/2)}else{let e=!1;o>2**-52?c>2**-52&&(e=!0):o<-(2**-52)?c<-(2**-52)&&(e=!0):Math.sign(s)===Math.sign(l)&&(e=!0),e?(r=-s,i=o,a=Math.sqrt(u)):(r=o,i=s,a=Math.sqrt(u/2))}return new U(r/a,i/a)}let M=[];for(let e=0,t=O.length,n=t-1,r=e+1;e=0;e--){let t=e/p,n=u*Math.cos(t*Math.PI/2),r=d*Math.sin(t*Math.PI/2)+f;for(let e=0,t=O.length;e=0;){let r=n,i=n-1;i<0&&(i=e.length-1);for(let e=0,n=s+p*2;e0)&&f.push(t,i,c),(e!==n-1||s0!=e>0&&this.version++,this._anisotropy=e}get clearcoat(){return this._clearcoat}set clearcoat(e){this._clearcoat>0!=e>0&&this.version++,this._clearcoat=e}get iridescence(){return this._iridescence}set iridescence(e){this._iridescence>0!=e>0&&this.version++,this._iridescence=e}get dispersion(){return this._dispersion}set dispersion(e){this._dispersion>0!=e>0&&this.version++,this._dispersion=e}get sheen(){return this._sheen}set sheen(e){this._sheen>0!=e>0&&this.version++,this._sheen=e}get transmission(){return this._transmission}set transmission(e){this._transmission>0!=e>0&&this.version++,this._transmission=e}copy(e){return super.copy(e),this.defines={STANDARD:``,PHYSICAL:``},this.anisotropy=e.anisotropy,this.anisotropyRotation=e.anisotropyRotation,this.anisotropyMap=e.anisotropyMap,this.clearcoat=e.clearcoat,this.clearcoatMap=e.clearcoatMap,this.clearcoatRoughness=e.clearcoatRoughness,this.clearcoatRoughnessMap=e.clearcoatRoughnessMap,this.clearcoatNormalMap=e.clearcoatNormalMap,this.clearcoatNormalScale.copy(e.clearcoatNormalScale),this.dispersion=e.dispersion,this.ior=e.ior,this.iridescence=e.iridescence,this.iridescenceMap=e.iridescenceMap,this.iridescenceIOR=e.iridescenceIOR,this.iridescenceThicknessRange=[...e.iridescenceThicknessRange],this.iridescenceThicknessMap=e.iridescenceThicknessMap,this.sheen=e.sheen,this.sheenColor.copy(e.sheenColor),this.sheenColorMap=e.sheenColorMap,this.sheenRoughness=e.sheenRoughness,this.sheenRoughnessMap=e.sheenRoughnessMap,this.transmission=e.transmission,this.transmissionMap=e.transmissionMap,this.thickness=e.thickness,this.thicknessMap=e.thicknessMap,this.attenuationDistance=e.attenuationDistance,this.attenuationColor.copy(e.attenuationColor),this.specularIntensity=e.specularIntensity,this.specularIntensityMap=e.specularIntensityMap,this.specularColor.copy(e.specularColor),this.specularColorMap=e.specularColorMap,this}},Jy=class extends Jm{constructor(e){super(),this.isMeshPhongMaterial=!0,this.type=`MeshPhongMaterial`,this.color=new K(16777215),this.specular=new K(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new K(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Cd,this.normalScale=new U(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new um,this.combine=El,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap=`round`,this.wireframeLinejoin=`round`,this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.specular.copy(e.specular),this.shininess=e.shininess,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapRotation.copy(e.envMapRotation),this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}},Yy=class extends Jm{constructor(e){super(),this.isMeshToonMaterial=!0,this.defines={TOON:``},this.type=`MeshToonMaterial`,this.color=new K(16777215),this.map=null,this.gradientMap=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new K(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Cd,this.normalScale=new U(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap=`round`,this.wireframeLinejoin=`round`,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.gradientMap=e.gradientMap,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.alphaMap=e.alphaMap,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.fog=e.fog,this}},Xy=class extends Jm{constructor(e){super(),this.isMeshNormalMaterial=!0,this.type=`MeshNormalMaterial`,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Cd,this.normalScale=new U(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.flatShading=!1,this.setValues(e)}copy(e){return super.copy(e),this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.flatShading=e.flatShading,this}},Zy=class extends Jm{constructor(e){super(),this.isMeshLambertMaterial=!0,this.type=`MeshLambertMaterial`,this.color=new K(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new K(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Cd,this.normalScale=new U(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new um,this.combine=El,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap=`round`,this.wireframeLinejoin=`round`,this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapRotation.copy(e.envMapRotation),this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}},Qy=class extends Jm{constructor(e){super(),this.isMeshDepthMaterial=!0,this.type=`MeshDepthMaterial`,this.depthPacking=yd,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.setValues(e)}copy(e){return super.copy(e),this.depthPacking=e.depthPacking,this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this}},$y=class extends Jm{constructor(e){super(),this.isMeshDistanceMaterial=!0,this.type=`MeshDistanceMaterial`,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.setValues(e)}copy(e){return super.copy(e),this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this}},eb=class extends Jm{constructor(e){super(),this.isMeshMatcapMaterial=!0,this.defines={MATCAP:``},this.type=`MeshMatcapMaterial`,this.color=new K(16777215),this.matcap=null,this.map=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Cd,this.normalScale=new U(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.defines={MATCAP:``},this.color.copy(e.color),this.matcap=e.matcap,this.map=e.map,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.alphaMap=e.alphaMap,this.flatShading=e.flatShading,this.fog=e.fog,this}},tb=class extends D_{constructor(e){super(),this.isLineDashedMaterial=!0,this.type=`LineDashedMaterial`,this.scale=1,this.dashSize=3,this.gapSize=1,this.setValues(e)}copy(e){return super.copy(e),this.scale=e.scale,this.dashSize=e.dashSize,this.gapSize=e.gapSize,this}};function nb(e,t){return!e||e.constructor===t?e:typeof t.BYTES_PER_ELEMENT==`number`?new t(e):Array.prototype.slice.call(e)}function rb(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function ib(e){function t(t,n){return e[t]-e[n]}let n=e.length,r=Array(n);for(let e=0;e!==n;++e)r[e]=e;return r.sort(t),r}function ab(e,t,n){let r=e.length,i=new e.constructor(r);for(let a=0,o=0;o!==r;++a){let r=n[a]*t;for(let n=0;n!==t;++n)i[o++]=e[r+n]}return i}function ob(e,t,n,r){let i=1,a=e[0];for(;a!==void 0&&a[r]===void 0;)a=e[i++];if(a===void 0)return;let o=a[r];if(o!==void 0)if(Array.isArray(o))do o=a[r],o!==void 0&&(t.push(a.time),n.push(...o)),a=e[i++];while(a!==void 0);else if(o.toArray!==void 0)do o=a[r],o!==void 0&&(t.push(a.time),o.toArray(n,n.length)),a=e[i++];while(a!==void 0);else do o=a[r],o!==void 0&&(t.push(a.time),n.push(o)),a=e[i++];while(a!==void 0)}function sb(e,t,n,r,i=30){let a=e.clone();a.name=t;let o=[];for(let e=0;e=r)){c.push(t.times[e]);for(let n=0;na.tracks[e].times[0]&&(s=a.tracks[e].times[0]);for(let e=0;e=r.times[d]){let e=d*c+s,t=e+c-s;f=r.values.slice(e,t)}else{let e=r.createInterpolant(),t=s,n=c-s;e.evaluate(a),f=e.resultBuffer.slice(t,n)}if(i===`quaternion`){let e=new Kf().fromArray(f).normalize().conjugate();e.toArray(f)}let p=o.times.length;for(let e=0;e=i)){let o=t[1];e=i)break seek}a=n,n=0;break linear_scan}break validate_interval}for(;n>>1;et;)--a;if(++a,i!==0||a!==r){i>=a&&(a=Math.max(a,1),i=a-1);let e=this.getValueSize();this.times=n.slice(i,a),this.values=this.values.slice(i*e,a*e)}return this}validate(){let e=!0,t=this.getValueSize();t-Math.floor(t)!==0&&(console.error(`THREE.KeyframeTrack: Invalid value size in track.`,this),e=!1);let n=this.times,r=this.values,i=n.length;i===0&&(console.error(`THREE.KeyframeTrack: Track is empty.`,this),e=!1);let a=null;for(let t=0;t!==i;t++){let r=n[t];if(typeof r==`number`&&isNaN(r)){console.error(`THREE.KeyframeTrack: Time is not a valid number.`,this,t,r),e=!1;break}if(a!==null&&a>r){console.error(`THREE.KeyframeTrack: Out of order keys.`,this,t,r,a),e=!1;break}a=r}if(r!==void 0&&rb(r))for(let t=0,n=r.length;t!==n;++t){let n=r[t];if(isNaN(n)){console.error(`THREE.KeyframeTrack: Value is not a valid number.`,this,t,n),e=!1;break}}return e}optimize(){let e=this.times.slice(),t=this.values.slice(),n=this.getValueSize(),r=this.getInterpolation()===ud,i=e.length-1,a=1;for(let o=1;o0){e[a]=e[i];for(let e=i*n,r=a*n,o=0;o!==n;++o)t[r+o]=t[e+o];++a}return a===e.length?(this.times=e,this.values=t):(this.times=e.slice(0,a),this.values=t.slice(0,a*n)),this}clone(){let e=this.times.slice(),t=this.values.slice(),n=this.constructor,r=new n(this.name,e,t);return r.createInterpolant=this.createInterpolant,r}};mb.prototype.ValueTypeName=``,mb.prototype.TimeBufferType=Float32Array,mb.prototype.ValueBufferType=Float32Array,mb.prototype.DefaultInterpolation=ld;var hb=class extends mb{constructor(e,t,n){super(e,t,n)}};hb.prototype.ValueTypeName=`bool`,hb.prototype.ValueBufferType=Array,hb.prototype.DefaultInterpolation=cd,hb.prototype.InterpolantFactoryMethodLinear=void 0,hb.prototype.InterpolantFactoryMethodSmooth=void 0;var gb=class extends mb{constructor(e,t,n,r){super(e,t,n,r)}};gb.prototype.ValueTypeName=`color`;var _b=class extends mb{constructor(e,t,n,r){super(e,t,n,r)}};_b.prototype.ValueTypeName=`number`;var vb=class extends ub{constructor(e,t,n,r){super(e,t,n,r)}interpolate_(e,t,n,r){let i=this.resultBuffer,a=this.sampleValues,o=this.valueSize,s=(n-t)/(r-t),c=e*o;for(let e=c+o;c!==e;c+=4)Kf.slerpFlat(i,0,a,c-o,a,c,s);return i}},yb=class extends mb{constructor(e,t,n,r){super(e,t,n,r)}InterpolantFactoryMethodLinear(e){return new vb(this.times,this.values,this.getValueSize(),e)}};yb.prototype.ValueTypeName=`quaternion`,yb.prototype.InterpolantFactoryMethodSmooth=void 0;var bb=class extends mb{constructor(e,t,n){super(e,t,n)}};bb.prototype.ValueTypeName=`string`,bb.prototype.ValueBufferType=Array,bb.prototype.DefaultInterpolation=cd,bb.prototype.InterpolantFactoryMethodLinear=void 0,bb.prototype.InterpolantFactoryMethodSmooth=void 0;var xb=class extends mb{constructor(e,t,n,r){super(e,t,n,r)}};xb.prototype.ValueTypeName=`vector`;var Sb=class{constructor(e=``,t=-1,n=[],r=md){this.name=e,this.tracks=n,this.duration=t,this.blendMode=r,this.uuid=Cf(),this.duration<0&&this.resetDuration()}static parse(e){let t=[],n=e.tracks,r=1/(e.fps||1);for(let e=0,i=n.length;e!==i;++e)t.push(wb(n[e]).scale(r));let i=new this(e.name,e.duration,t,e.blendMode);return i.uuid=e.uuid,i}static toJSON(e){let t=[],n=e.tracks,r={name:e.name,duration:e.duration,tracks:t,uuid:e.uuid,blendMode:e.blendMode};for(let e=0,r=n.length;e!==r;++e)t.push(mb.toJSON(n[e]));return r}static CreateFromMorphTargetSequence(e,t,n,r){let i=t.length,a=[];for(let e=0;e1){let e=a[1],t=r[e];t||(r[e]=t=[]),t.push(n)}}let a=[];for(let e in r)a.push(this.CreateFromMorphTargetSequence(e,r[e],t,n));return a}static parseAnimation(e,t){if(console.warn(`THREE.AnimationClip: parseAnimation() is deprecated and will be removed with r185`),!e)return console.error(`THREE.AnimationClip: No animation in JSONLoader data.`),null;let n=function(e,t,n,r,i){if(n.length!==0){let a=[],o=[];ob(n,a,o,r),a.length!==0&&i.push(new e(t,a,o))}},r=[],i=e.name||`default`,a=e.fps||30,o=e.blendMode,s=e.length||-1,c=e.hierarchy||[];for(let e=0;e{t&&t(i),this.manager.itemEnd(e)},0),i;if(kb[e]!==void 0){kb[e].push({onLoad:t,onProgress:n,onError:r});return}kb[e]=[],kb[e].push({onLoad:t,onProgress:n,onError:r});let a=new Request(e,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?`include`:`same-origin`}),o=this.mimeType,s=this.responseType;fetch(a).then(t=>{if(t.status===200||t.status===0){if(t.status===0&&console.warn(`THREE.FileLoader: HTTP Status 0 received.`),typeof ReadableStream>`u`||t.body===void 0||t.body.getReader===void 0)return t;let n=kb[e],r=t.body.getReader(),i=t.headers.get(`X-File-Size`)||t.headers.get(`Content-Length`),a=i?parseInt(i):0,o=a!==0,s=0,c=new ReadableStream({start(e){t();function t(){r.read().then(({done:r,value:i})=>{if(r)e.close();else{s+=i.byteLength;let r=new ProgressEvent(`progress`,{lengthComputable:o,loaded:s,total:a});for(let e=0,t=n.length;e{e.error(t)})}}});return new Response(c)}else throw new Ab(`fetch for "${t.url}" responded with ${t.status}: ${t.statusText}`,t)}).then(e=>{switch(s){case`arraybuffer`:return e.arrayBuffer();case`blob`:return e.blob();case`document`:return e.text().then(e=>{let t=new DOMParser;return t.parseFromString(e,o)});case`json`:return e.json();default:if(o===``)return e.text();{let t=/charset="?([^;"\s]*)"?/i,n=t.exec(o),r=n&&n[1]?n[1].toLowerCase():void 0,i=new TextDecoder(r);return e.arrayBuffer().then(e=>i.decode(e))}}}).then(t=>{Tb.add(e,t);let n=kb[e];delete kb[e];for(let e=0,r=n.length;e{let n=kb[e];if(n===void 0)throw this.manager.itemError(e),t;delete kb[e];for(let e=0,r=n.length;e{this.manager.itemEnd(e)}),this.manager.itemStart(e)}setResponseType(e){return this.responseType=e,this}setMimeType(e){return this.mimeType=e,this}},Mb=class extends Ob{constructor(e){super(e)}load(e,t,n,r){let i=this,a=new jb(this.manager);a.setPath(this.path),a.setRequestHeader(this.requestHeader),a.setWithCredentials(this.withCredentials),a.load(e,function(n){try{t(i.parse(JSON.parse(n)))}catch(t){r?r(t):console.error(t),i.manager.itemError(e)}},n,r)}parse(e){let t=[];for(let n=0;n0:r.vertexColors=e.vertexColors),e.uniforms!==void 0)for(let t in e.uniforms){let i=e.uniforms[t];switch(r.uniforms[t]={},i.type){case`t`:r.uniforms[t].value=n(i.value);break;case`c`:r.uniforms[t].value=new K().setHex(i.value);break;case`v2`:r.uniforms[t].value=new U().fromArray(i.value);break;case`v3`:r.uniforms[t].value=new W().fromArray(i.value);break;case`v4`:r.uniforms[t].value=new xp().fromArray(i.value);break;case`m3`:r.uniforms[t].value=new Yf().fromArray(i.value);break;case`m4`:r.uniforms[t].value=new G().fromArray(i.value);break;default:r.uniforms[t].value=i.value}}if(e.defines!==void 0&&(r.defines=e.defines),e.vertexShader!==void 0&&(r.vertexShader=e.vertexShader),e.fragmentShader!==void 0&&(r.fragmentShader=e.fragmentShader),e.glslVersion!==void 0&&(r.glslVersion=e.glslVersion),e.extensions!==void 0)for(let t in e.extensions)r.extensions[t]=e.extensions[t];if(e.lights!==void 0&&(r.lights=e.lights),e.clipping!==void 0&&(r.clipping=e.clipping),e.size!==void 0&&(r.size=e.size),e.sizeAttenuation!==void 0&&(r.sizeAttenuation=e.sizeAttenuation),e.map!==void 0&&(r.map=n(e.map)),e.matcap!==void 0&&(r.matcap=n(e.matcap)),e.alphaMap!==void 0&&(r.alphaMap=n(e.alphaMap)),e.bumpMap!==void 0&&(r.bumpMap=n(e.bumpMap)),e.bumpScale!==void 0&&(r.bumpScale=e.bumpScale),e.normalMap!==void 0&&(r.normalMap=n(e.normalMap)),e.normalMapType!==void 0&&(r.normalMapType=e.normalMapType),e.normalScale!==void 0){let t=e.normalScale;Array.isArray(t)===!1&&(t=[t,t]),r.normalScale=new U().fromArray(t)}return e.displacementMap!==void 0&&(r.displacementMap=n(e.displacementMap)),e.displacementScale!==void 0&&(r.displacementScale=e.displacementScale),e.displacementBias!==void 0&&(r.displacementBias=e.displacementBias),e.roughnessMap!==void 0&&(r.roughnessMap=n(e.roughnessMap)),e.metalnessMap!==void 0&&(r.metalnessMap=n(e.metalnessMap)),e.emissiveMap!==void 0&&(r.emissiveMap=n(e.emissiveMap)),e.emissiveIntensity!==void 0&&(r.emissiveIntensity=e.emissiveIntensity),e.specularMap!==void 0&&(r.specularMap=n(e.specularMap)),e.specularIntensityMap!==void 0&&(r.specularIntensityMap=n(e.specularIntensityMap)),e.specularColorMap!==void 0&&(r.specularColorMap=n(e.specularColorMap)),e.envMap!==void 0&&(r.envMap=n(e.envMap)),e.envMapRotation!==void 0&&r.envMapRotation.fromArray(e.envMapRotation),e.envMapIntensity!==void 0&&(r.envMapIntensity=e.envMapIntensity),e.reflectivity!==void 0&&(r.reflectivity=e.reflectivity),e.refractionRatio!==void 0&&(r.refractionRatio=e.refractionRatio),e.lightMap!==void 0&&(r.lightMap=n(e.lightMap)),e.lightMapIntensity!==void 0&&(r.lightMapIntensity=e.lightMapIntensity),e.aoMap!==void 0&&(r.aoMap=n(e.aoMap)),e.aoMapIntensity!==void 0&&(r.aoMapIntensity=e.aoMapIntensity),e.gradientMap!==void 0&&(r.gradientMap=n(e.gradientMap)),e.clearcoatMap!==void 0&&(r.clearcoatMap=n(e.clearcoatMap)),e.clearcoatRoughnessMap!==void 0&&(r.clearcoatRoughnessMap=n(e.clearcoatRoughnessMap)),e.clearcoatNormalMap!==void 0&&(r.clearcoatNormalMap=n(e.clearcoatNormalMap)),e.clearcoatNormalScale!==void 0&&(r.clearcoatNormalScale=new U().fromArray(e.clearcoatNormalScale)),e.iridescenceMap!==void 0&&(r.iridescenceMap=n(e.iridescenceMap)),e.iridescenceThicknessMap!==void 0&&(r.iridescenceThicknessMap=n(e.iridescenceThicknessMap)),e.transmissionMap!==void 0&&(r.transmissionMap=n(e.transmissionMap)),e.thicknessMap!==void 0&&(r.thicknessMap=n(e.thicknessMap)),e.anisotropyMap!==void 0&&(r.anisotropyMap=n(e.anisotropyMap)),e.sheenColorMap!==void 0&&(r.sheenColorMap=n(e.sheenColorMap)),e.sheenRoughnessMap!==void 0&&(r.sheenRoughnessMap=n(e.sheenRoughnessMap)),r}setTextures(e){return this.textures=e,this}createMaterialFromType(t){return e.createMaterialFromType(t)}static createMaterialFromType(e){let t={ShadowMaterial:Wy,SpriteMaterial:lg,RawShaderMaterial:Gy,ShaderMaterial:Uh,PointsMaterial:V_,MeshPhysicalMaterial:qy,MeshStandardMaterial:Ky,MeshPhongMaterial:Jy,MeshToonMaterial:Yy,MeshNormalMaterial:Xy,MeshLambertMaterial:Zy,MeshDepthMaterial:Qy,MeshDistanceMaterial:$y,MeshBasicMaterial:Ym,MeshMatcapMaterial:eb,LineDashedMaterial:tb,LineBasicMaterial:D_,Material:Jm};return new t[e]}},ax=class{static extractUrlBase(e){let t=e.lastIndexOf(`/`);return t===-1?`./`:e.slice(0,t+1)}static resolveURL(e,t){return typeof e!=`string`||e===``?``:(/^https?:\/\//i.test(t)&&/^\//.test(e)&&(t=t.replace(/(^https?:\/\/[^\/]+).*/i,`$1`)),/^(https?:)?\/\//i.test(e)||/^data:.*,.*$/i.test(e)||/^blob:.*$/i.test(e)?e:t+e)}},ox=class extends bh{constructor(){super(),this.isInstancedBufferGeometry=!0,this.type=`InstancedBufferGeometry`,this.instanceCount=1/0}copy(e){return super.copy(e),this.instanceCount=e.instanceCount,this}toJSON(){let e=super.toJSON();return e.instanceCount=this.instanceCount,e.isInstancedBufferGeometry=!0,e}},sx=class extends Ob{constructor(e){super(e)}load(e,t,n,r){let i=this,a=new jb(i.manager);a.setPath(i.path),a.setRequestHeader(i.requestHeader),a.setWithCredentials(i.withCredentials),a.load(e,function(n){try{t(i.parse(JSON.parse(n)))}catch(t){r?r(t):console.error(t),i.manager.itemError(e)}},n,r)}parse(e){let t={},n={};function r(e,n){if(t[n]!==void 0)return t[n];let r=e.interleavedBuffers,a=r[n],o=i(e,a.buffer),s=$f(a.type,o),c=new og(s,a.stride);return c.uuid=a.uuid,t[n]=c,c}function i(e,t){if(n[t]!==void 0)return n[t];let r=e.arrayBuffers,i=r[t],a=new Uint32Array(i).buffer;return n[t]=a,a}let a=e.isInstancedBufferGeometry?new ox:new bh,o=e.data.index;if(o!==void 0){let e=$f(o.type,o.array);a.setIndex(new ih(e,1))}let s=e.data.attributes;for(let t in s){let n=s[t],i;if(n.isInterleavedBufferAttribute){let t=r(e.data,n.data);i=new cg(t,n.itemSize,n.offset,n.normalized)}else{let e=$f(n.type,n.array),t=n.isInstancedBufferAttribute?Ug:ih;i=new t(e,n.itemSize,n.normalized)}n.name!==void 0&&(i.name=n.name),n.usage!==void 0&&i.setUsage(n.usage),a.setAttribute(t,i)}let c=e.data.morphAttributes;if(c)for(let t in c){let n=c[t],i=[];for(let t=0,a=n.length;t0){let n=new Eb(t);i=new Pb(n),i.setCrossOrigin(this.crossOrigin);for(let t=0,n=e.length;t0){r=new Pb(this.manager),r.setCrossOrigin(this.crossOrigin);for(let t=0,r=e.length;t{let t=null,n=null;return e.boundingBox!==void 0&&(t=new Op().fromJSON(e.boundingBox)),e.boundingSphere!==void 0&&(n=new Kp().fromJSON(e.boundingSphere)),{...e,boundingBox:t,boundingSphere:n}}),a._instanceInfo=e.instanceInfo,a._availableInstanceIds=e._availableInstanceIds,a._availableGeometryIds=e._availableGeometryIds,a._nextIndexStart=e.nextIndexStart,a._nextVertexStart=e.nextVertexStart,a._geometryCount=e.geometryCount,a._maxInstanceCount=e.maxInstanceCount,a._maxVertexCount=e.maxVertexCount,a._maxIndexCount=e.maxIndexCount,a._geometryInitialized=e.geometryInitialized,a._matricesTexture=c(e.matricesTexture.uuid),a._indirectTexture=c(e.indirectTexture.uuid),e.colorsTexture!==void 0&&(a._colorsTexture=c(e.colorsTexture.uuid)),e.boundingSphere!==void 0&&(a.boundingSphere=new Kp().fromJSON(e.boundingSphere)),e.boundingBox!==void 0&&(a.boundingBox=new Op().fromJSON(e.boundingBox));break;case`LOD`:a=new Dg;break;case`Line`:a=new F_(o(e.geometry),s(e.material));break;case`LineLoop`:a=new B_(o(e.geometry),s(e.material));break;case`LineSegments`:a=new z_(o(e.geometry),s(e.material));break;case`PointCloud`:case`Points`:a=new K_(o(e.geometry),s(e.material));break;case`Sprite`:a=new Cg(s(e.material));break;case`Group`:a=new eg;break;case`Bone`:a=new Rg;break;default:a=new Dm}if(a.uuid=e.uuid,e.name!==void 0&&(a.name=e.name),e.matrix===void 0?(e.position!==void 0&&a.position.fromArray(e.position),e.rotation!==void 0&&a.rotation.fromArray(e.rotation),e.quaternion!==void 0&&a.quaternion.fromArray(e.quaternion),e.scale!==void 0&&a.scale.fromArray(e.scale)):(a.matrix.fromArray(e.matrix),e.matrixAutoUpdate!==void 0&&(a.matrixAutoUpdate=e.matrixAutoUpdate),a.matrixAutoUpdate&&a.matrix.decompose(a.position,a.quaternion,a.scale)),e.up!==void 0&&a.up.fromArray(e.up),e.castShadow!==void 0&&(a.castShadow=e.castShadow),e.receiveShadow!==void 0&&(a.receiveShadow=e.receiveShadow),e.shadow&&(e.shadow.intensity!==void 0&&(a.shadow.intensity=e.shadow.intensity),e.shadow.bias!==void 0&&(a.shadow.bias=e.shadow.bias),e.shadow.normalBias!==void 0&&(a.shadow.normalBias=e.shadow.normalBias),e.shadow.radius!==void 0&&(a.shadow.radius=e.shadow.radius),e.shadow.mapSize!==void 0&&a.shadow.mapSize.fromArray(e.shadow.mapSize),e.shadow.camera!==void 0&&(a.shadow.camera=this.parseObject(e.shadow.camera))),e.visible!==void 0&&(a.visible=e.visible),e.frustumCulled!==void 0&&(a.frustumCulled=e.frustumCulled),e.renderOrder!==void 0&&(a.renderOrder=e.renderOrder),e.userData!==void 0&&(a.userData=e.userData),e.layers!==void 0&&(a.layers.mask=e.layers),e.children!==void 0){let o=e.children;for(let e=0;e`u`&&console.warn(`THREE.ImageBitmapLoader: createImageBitmap() not supported.`),typeof fetch>`u`&&console.warn(`THREE.ImageBitmapLoader: fetch() not supported.`),this.options={premultiplyAlpha:`none`}}setOptions(e){return this.options=e,this}load(e,t,n,r){e===void 0&&(e=``),this.path!==void 0&&(e=this.path+e),e=this.manager.resolveURL(e);let i=this,a=Tb.get(e);if(a!==void 0){if(i.manager.itemStart(e),a.then){a.then(n=>{if(fx.has(a)===!0)r&&r(fx.get(a)),i.manager.itemError(e),i.manager.itemEnd(e);else return t&&t(n),i.manager.itemEnd(e),n});return}return setTimeout(function(){t&&t(a),i.manager.itemEnd(e)},0),a}let o={};o.credentials=this.crossOrigin===`anonymous`?`same-origin`:`include`,o.headers=this.requestHeader;let s=fetch(e,o).then(function(e){return e.blob()}).then(function(e){return createImageBitmap(e,Object.assign(i.options,{colorSpaceConversion:`none`}))}).then(function(n){return Tb.add(e,n),t&&t(n),i.manager.itemEnd(e),n}).catch(function(t){r&&r(t),fx.set(s,t),Tb.remove(e),i.manager.itemError(e),i.manager.itemEnd(e)});Tb.add(e,s),i.manager.itemStart(e)}};let mx;var hx=class{static getContext(){return mx===void 0&&(mx=new(window.AudioContext||window.webkitAudioContext)),mx}static setContext(e){mx=e}},gx=class extends Ob{constructor(e){super(e)}load(e,t,n,r){let i=this,a=new jb(this.manager);a.setResponseType(`arraybuffer`),a.setPath(this.path),a.setRequestHeader(this.requestHeader),a.setWithCredentials(this.withCredentials),a.load(e,function(e){try{let n=e.slice(0),r=hx.getContext();r.decodeAudioData(n,function(e){t(e)}).catch(o)}catch(e){o(e)}},n,r);function o(t){r?r(t):console.error(t),i.manager.itemError(e)}}};const _x=new G,vx=new G,yx=new G;var bx=class{constructor(){this.type=`StereoCamera`,this.aspect=1,this.eyeSep=.064,this.cameraL=new Jh,this.cameraL.layers.enable(1),this.cameraL.matrixAutoUpdate=!1,this.cameraR=new Jh,this.cameraR.layers.enable(2),this.cameraR.matrixAutoUpdate=!1,this._cache={focus:null,fov:null,aspect:null,near:null,far:null,zoom:null,eyeSep:null}}update(e){let t=this._cache,n=t.focus!==e.focus||t.fov!==e.fov||t.aspect!==e.aspect*this.aspect||t.near!==e.near||t.far!==e.far||t.zoom!==e.zoom||t.eyeSep!==this.eyeSep;if(n){t.focus=e.focus,t.fov=e.fov,t.aspect=e.aspect*this.aspect,t.near=e.near,t.far=e.far,t.zoom=e.zoom,t.eyeSep=this.eyeSep,yx.copy(e.projectionMatrix);let n=t.eyeSep/2,r=n*t.near/t.focus,i=t.near*Math.tan(xf*t.fov*.5)/t.zoom,a,o;vx.elements[12]=-n,_x.elements[12]=n,a=-i*t.aspect+r,o=i*t.aspect+r,yx.elements[0]=2*t.near/(o-a),yx.elements[8]=(o+a)/(o-a),this.cameraL.projectionMatrix.copy(yx),a=-i*t.aspect-r,o=i*t.aspect-r,yx.elements[0]=2*t.near/(o-a),yx.elements[8]=(o+a)/(o-a),this.cameraR.projectionMatrix.copy(yx)}this.cameraL.matrixWorld.copy(e.matrixWorld).multiply(vx),this.cameraR.matrixWorld.copy(e.matrixWorld).multiply(_x)}},xx=class extends Jh{constructor(e=[]){super(),this.isArrayCamera=!0,this.isMultiViewCamera=!1,this.cameras=e}},Sx=class{constructor(e=!0){this.autoStart=e,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}start(){this.startTime=Cx(),this.oldTime=this.startTime,this.elapsedTime=0,this.running=!0}stop(){this.getElapsedTime(),this.running=!1,this.autoStart=!1}getElapsedTime(){return this.getDelta(),this.elapsedTime}getDelta(){let e=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){let t=Cx();e=(t-this.oldTime)/1e3,this.oldTime=t,this.elapsedTime+=e}return e}};function Cx(){return performance.now()}const wx=new W,Tx=new Kf,Ex=new W,Dx=new W,Ox=new W;var kx=class extends Dm{constructor(){super(),this.type=`AudioListener`,this.context=hx.getContext(),this.gain=this.context.createGain(),this.gain.connect(this.context.destination),this.filter=null,this.timeDelta=0,this._clock=new Sx}getInput(){return this.gain}removeFilter(){return this.filter!==null&&(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination),this.gain.connect(this.context.destination),this.filter=null),this}getFilter(){return this.filter}setFilter(e){return this.filter===null?this.gain.disconnect(this.context.destination):(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination)),this.filter=e,this.gain.connect(this.filter),this.filter.connect(this.context.destination),this}getMasterVolume(){return this.gain.gain.value}setMasterVolume(e){return this.gain.gain.setTargetAtTime(e,this.context.currentTime,.01),this}updateMatrixWorld(e){super.updateMatrixWorld(e);let t=this.context.listener;if(this.timeDelta=this._clock.getDelta(),this.matrixWorld.decompose(wx,Tx,Ex),Dx.set(0,0,-1).applyQuaternion(Tx),Ox.set(0,1,0).applyQuaternion(Tx),t.positionX){let e=this.context.currentTime+this.timeDelta;t.positionX.linearRampToValueAtTime(wx.x,e),t.positionY.linearRampToValueAtTime(wx.y,e),t.positionZ.linearRampToValueAtTime(wx.z,e),t.forwardX.linearRampToValueAtTime(Dx.x,e),t.forwardY.linearRampToValueAtTime(Dx.y,e),t.forwardZ.linearRampToValueAtTime(Dx.z,e),t.upX.linearRampToValueAtTime(Ox.x,e),t.upY.linearRampToValueAtTime(Ox.y,e),t.upZ.linearRampToValueAtTime(Ox.z,e)}else t.setPosition(wx.x,wx.y,wx.z),t.setOrientation(Dx.x,Dx.y,Dx.z,Ox.x,Ox.y,Ox.z)}},Ax=class extends Dm{constructor(e){super(),this.type=`Audio`,this.listener=e,this.context=e.context,this.gain=this.context.createGain(),this.gain.connect(e.getInput()),this.autoplay=!1,this.buffer=null,this.detune=0,this.loop=!1,this.loopStart=0,this.loopEnd=0,this.offset=0,this.duration=void 0,this.playbackRate=1,this.isPlaying=!1,this.hasPlaybackControl=!0,this.source=null,this.sourceType=`empty`,this._startedAt=0,this._progress=0,this._connected=!1,this.filters=[]}getOutput(){return this.gain}setNodeSource(e){return this.hasPlaybackControl=!1,this.sourceType=`audioNode`,this.source=e,this.connect(),this}setMediaElementSource(e){return this.hasPlaybackControl=!1,this.sourceType=`mediaNode`,this.source=this.context.createMediaElementSource(e),this.connect(),this}setMediaStreamSource(e){return this.hasPlaybackControl=!1,this.sourceType=`mediaStreamNode`,this.source=this.context.createMediaStreamSource(e),this.connect(),this}setBuffer(e){return this.buffer=e,this.sourceType=`buffer`,this.autoplay&&this.play(),this}play(e=0){if(this.isPlaying===!0){console.warn(`THREE.Audio: Audio is already playing.`);return}if(this.hasPlaybackControl===!1){console.warn(`THREE.Audio: this Audio has no playback control.`);return}this._startedAt=this.context.currentTime+e;let t=this.context.createBufferSource();return t.buffer=this.buffer,t.loop=this.loop,t.loopStart=this.loopStart,t.loopEnd=this.loopEnd,t.onended=this.onEnded.bind(this),t.start(this._startedAt,this._progress+this.offset,this.duration),this.isPlaying=!0,this.source=t,this.setDetune(this.detune),this.setPlaybackRate(this.playbackRate),this.connect()}pause(){if(this.hasPlaybackControl===!1){console.warn(`THREE.Audio: this Audio has no playback control.`);return}return this.isPlaying===!0&&(this._progress+=Math.max(this.context.currentTime-this._startedAt,0)*this.playbackRate,this.loop===!0&&(this._progress%=this.duration||this.buffer.duration),this.source.stop(),this.source.onended=null,this.isPlaying=!1),this}stop(e=0){if(this.hasPlaybackControl===!1){console.warn(`THREE.Audio: this Audio has no playback control.`);return}return this._progress=0,this.source!==null&&(this.source.stop(this.context.currentTime+e),this.source.onended=null),this.isPlaying=!1,this}connect(){if(this.filters.length>0){this.source.connect(this.filters[0]);for(let e=1,t=this.filters.length;e0){this.source.disconnect(this.filters[0]);for(let e=1,t=this.filters.length;e0&&this._mixBufferRegionAdditive(n,r,this._addIndex*t,1,t);for(let e=t,i=t+t;e!==i;++e)if(n[e]!==n[e+t]){o.setValue(n,r);break}}saveOriginalState(){let e=this.binding,t=this.buffer,n=this.valueSize,r=n*this._origIndex;e.getValue(t,r);for(let e=n,i=r;e!==i;++e)t[e]=t[r+e%n];this._setIdentity(),this.cumulativeWeight=0,this.cumulativeWeightAdditive=0}restoreOriginalState(){let e=this.valueSize*3;this.binding.setValue(this.buffer,e)}_setAdditiveIdentityNumeric(){let e=this._addIndex*this.valueSize,t=e+this.valueSize;for(let n=e;n=.5)for(let r=0;r!==i;++r)e[t+r]=e[n+r]}_slerp(e,t,n,r){Kf.slerpFlat(e,t,e,t,e,n,r)}_slerpAdditive(e,t,n,r,i){let a=this._workIndex*i;Kf.multiplyQuaternionsFlat(e,a,e,t,e,n),Kf.slerpFlat(e,t,e,t,e,a,r)}_lerp(e,t,n,r,i){let a=1-r;for(let o=0;o!==i;++o){let i=t+o;e[i]=e[i]*a+e[n+o]*r}}_lerpAdditive(e,t,n,r,i){for(let a=0;a!==i;++a){let i=t+a;e[i]=e[i]+e[n+a]*r}}};const Rx=`\\[\\]\\.:\\/`,zx=RegExp(`[`+Rx+`]`,`g`),Bx=`[^`+Rx+`]`,Vx=`[^`+Rx.replace(`\\.`,``)+`]`,Hx=/((?:WC+[\/:])*)/.source.replace(`WC`,Bx),Ux=/(WCOD+)?/.source.replace(`WCOD`,Vx),Wx=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace(`WC`,Bx),Gx=/\.(WC+)(?:\[(.+)\])?/.source.replace(`WC`,Bx),Kx=RegExp(`^`+Hx+Ux+Wx+Gx+`$`),qx=[`material`,`materials`,`bones`,`map`];var Jx=class{constructor(e,t,n){let r=n||Yx.parseTrackName(t);this._targetGroup=e,this._bindings=e.subscribe_(t,r)}getValue(e,t){this.bind();let n=this._targetGroup.nCachedObjects_,r=this._bindings[n];r!==void 0&&r.getValue(e,t)}setValue(e,t){let n=this._bindings;for(let r=this._targetGroup.nCachedObjects_,i=n.length;r!==i;++r)n[r].setValue(e,t)}bind(){let e=this._bindings;for(let t=this._targetGroup.nCachedObjects_,n=e.length;t!==n;++t)e[t].bind()}unbind(){let e=this._bindings;for(let t=this._targetGroup.nCachedObjects_,n=e.length;t!==n;++t)e[t].unbind()}},Yx=class e{constructor(t,n,r){this.path=n,this.parsedPath=r||e.parseTrackName(n),this.node=e.findNode(t,this.parsedPath.nodeName),this.rootNode=t,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}static create(t,n,r){return t&&t.isAnimationObjectGroup?new e.Composite(t,n,r):new e(t,n,r)}static sanitizeNodeName(e){return e.replace(/\s/g,`_`).replace(zx,``)}static parseTrackName(e){let t=Kx.exec(e);if(t===null)throw Error(`PropertyBinding: Cannot parse trackName: `+e);let n={nodeName:t[2],objectName:t[3],objectIndex:t[4],propertyName:t[5],propertyIndex:t[6]},r=n.nodeName&&n.nodeName.lastIndexOf(`.`);if(r!==void 0&&r!==-1){let e=n.nodeName.substring(r+1);qx.indexOf(e)!==-1&&(n.nodeName=n.nodeName.substring(0,r),n.objectName=e)}if(n.propertyName===null||n.propertyName.length===0)throw Error(`PropertyBinding: can not parse propertyName from trackName: `+e);return n}static findNode(e,t){if(t===void 0||t===``||t===`.`||t===-1||t===e.name||t===e.uuid)return e;if(e.skeleton){let n=e.skeleton.getBoneByName(t);if(n!==void 0)return n}if(e.children){let n=function(e){for(let r=0;r=i){let a=i++,l=e[a];t[l.uuid]=c,e[c]=l,t[s]=a,e[a]=o;for(let e=0,t=r;e!==t;++e){let t=n[e],r=t[a],i=t[c];t[c]=r,t[a]=i}}}this.nCachedObjects_=i}uncache(){let e=this._objects,t=this._indicesByUUID,n=this._bindings,r=n.length,i=this.nCachedObjects_,a=e.length;for(let o=0,s=arguments.length;o!==s;++o){let s=arguments[o],c=s.uuid,l=t[c];if(l!==void 0)if(delete t[c],l0&&(t[o.uuid]=l),e[l]=o,e.pop();for(let e=0,t=r;e!==t;++e){let t=n[e];t[l]=t[i],t.pop()}}}this.nCachedObjects_=i}subscribe_(e,t){let n=this._bindingsIndicesByPath,r=n[e],i=this._bindings;if(r!==void 0)return i[r];let a=this._paths,o=this._parsedPaths,s=this._objects,c=s.length,l=this.nCachedObjects_,u=Array(c);r=i.length,n[e]=r,a.push(e),o.push(t),i.push(u);for(let n=l,r=s.length;n!==r;++n){let r=s[n];u[n]=new Yx(r,e,t)}return u}unsubscribe_(e){let t=this._bindingsIndicesByPath,n=t[e];if(n!==void 0){let r=this._paths,i=this._parsedPaths,a=this._bindings,o=a.length-1,s=a[o],c=e[o];t[c]=n,a[n]=s,a.pop(),i[n]=i[o],i.pop(),r[n]=r[o],r.pop()}}},Zx=class{constructor(e,t,n=null,r=t.blendMode){this._mixer=e,this._clip=t,this._localRoot=n,this.blendMode=r;let i=t.tracks,a=i.length,o=Array(a),s={endingStart:dd,endingEnd:dd};for(let e=0;e!==a;++e){let t=i[e].createInterpolant(null);o[e]=t,t.settings=s}this._interpolantSettings=s,this._interpolants=o,this._propertyBindings=Array(a),this._cacheIndex=null,this._byClipCacheIndex=null,this._timeScaleInterpolant=null,this._weightInterpolant=null,this.loop=od,this._loopCount=-1,this._startTime=null,this.time=0,this.timeScale=1,this._effectiveTimeScale=1,this.weight=1,this._effectiveWeight=1,this.repetitions=1/0,this.paused=!1,this.enabled=!0,this.clampWhenFinished=!1,this.zeroSlopeAtStart=!0,this.zeroSlopeAtEnd=!0}play(){return this._mixer._activateAction(this),this}stop(){return this._mixer._deactivateAction(this),this.reset()}reset(){return this.paused=!1,this.enabled=!0,this.time=0,this._loopCount=-1,this._startTime=null,this.stopFading().stopWarping()}isRunning(){return this.enabled&&!this.paused&&this.timeScale!==0&&this._startTime===null&&this._mixer._isActiveAction(this)}isScheduled(){return this._mixer._isActiveAction(this)}startAt(e){return this._startTime=e,this}setLoop(e,t){return this.loop=e,this.repetitions=t,this}setEffectiveWeight(e){return this.weight=e,this._effectiveWeight=this.enabled?e:0,this.stopFading()}getEffectiveWeight(){return this._effectiveWeight}fadeIn(e){return this._scheduleFading(e,0,1)}fadeOut(e){return this._scheduleFading(e,1,0)}crossFadeFrom(e,t,n=!1){if(e.fadeOut(t),this.fadeIn(t),n===!0){let n=this._clip.duration,r=e._clip.duration,i=r/n,a=n/r;e.warp(1,i,t),this.warp(a,1,t)}return this}crossFadeTo(e,t,n=!1){return e.crossFadeFrom(this,t,n)}stopFading(){let e=this._weightInterpolant;return e!==null&&(this._weightInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this}setEffectiveTimeScale(e){return this.timeScale=e,this._effectiveTimeScale=this.paused?0:e,this.stopWarping()}getEffectiveTimeScale(){return this._effectiveTimeScale}setDuration(e){return this.timeScale=this._clip.duration/e,this.stopWarping()}syncWith(e){return this.time=e.time,this.timeScale=e.timeScale,this.stopWarping()}halt(e){return this.warp(this._effectiveTimeScale,0,e)}warp(e,t,n){let r=this._mixer,i=r.time,a=this.timeScale,o=this._timeScaleInterpolant;o===null&&(o=r._lendControlInterpolant(),this._timeScaleInterpolant=o);let s=o.parameterPositions,c=o.sampleValues;return s[0]=i,s[1]=i+n,c[0]=e/a,c[1]=t/a,this}stopWarping(){let e=this._timeScaleInterpolant;return e!==null&&(this._timeScaleInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this}getMixer(){return this._mixer}getClip(){return this._clip}getRoot(){return this._localRoot||this._mixer._root}_update(e,t,n,r){if(!this.enabled){this._updateWeight(e);return}let i=this._startTime;if(i!==null){let r=(e-i)*n;r<0||n===0?t=0:(this._startTime=null,t=n*r)}t*=this._updateTimeScale(e);let a=this._updateTime(t),o=this._updateWeight(e);if(o>0){let e=this._interpolants,t=this._propertyBindings;switch(this.blendMode){case hd:for(let n=0,r=e.length;n!==r;++n)e[n].evaluate(a),t[n].accumulateAdditive(o);break;case md:default:for(let n=0,i=e.length;n!==i;++n)e[n].evaluate(a),t[n].accumulate(r,o)}}}_updateWeight(e){let t=0;if(this.enabled){t=this.weight;let n=this._weightInterpolant;if(n!==null){let r=n.evaluate(e)[0];t*=r,e>n.parameterPositions[1]&&(this.stopFading(),r===0&&(this.enabled=!1))}}return this._effectiveWeight=t,t}_updateTimeScale(e){let t=0;if(!this.paused){t=this.timeScale;let n=this._timeScaleInterpolant;if(n!==null){let r=n.evaluate(e)[0];t*=r,e>n.parameterPositions[1]&&(this.stopWarping(),t===0?this.paused=!0:this.timeScale=t)}}return this._effectiveTimeScale=t,t}_updateTime(e){let t=this._clip.duration,n=this.loop,r=this.time+e,i=this._loopCount,a=n===sd;if(e===0)return i===-1?r:a&&(i&1)==1?t-r:r;if(n===ad){i===-1&&(this._loopCount=0,this._setEndings(!0,!0,!1));handle_stop:{if(r>=t)r=t;else if(r<0)r=0;else{this.time=r;break handle_stop}this.clampWhenFinished?this.paused=!0:this.enabled=!1,this.time=r,this._mixer.dispatchEvent({type:`finished`,action:this,direction:e<0?-1:1})}}else{if(i===-1&&(e>=0?(i=0,this._setEndings(!0,this.repetitions===0,a)):this._setEndings(this.repetitions===0,!0,a)),r>=t||r<0){let n=Math.floor(r/t);r-=t*n,i+=Math.abs(n);let o=this.repetitions-i;if(o<=0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,r=e>0?t:0,this.time=r,this._mixer.dispatchEvent({type:`finished`,action:this,direction:e>0?1:-1});else{if(o===1){let t=e<0;this._setEndings(t,!t,a)}else this._setEndings(!1,!1,a);this._loopCount=i,this.time=r,this._mixer.dispatchEvent({type:`loop`,action:this,loopDelta:n})}}else this.time=r;if(a&&(i&1)==1)return t-r}return r}_setEndings(e,t,n){let r=this._interpolantSettings;n?(r.endingStart=fd,r.endingEnd=fd):(e?r.endingStart=this.zeroSlopeAtStart?fd:dd:r.endingStart=pd,t?r.endingEnd=this.zeroSlopeAtEnd?fd:dd:r.endingEnd=pd)}_scheduleFading(e,t,n){let r=this._mixer,i=r.time,a=this._weightInterpolant;a===null&&(a=r._lendControlInterpolant(),this._weightInterpolant=a);let o=a.parameterPositions,s=a.sampleValues;return o[0]=i,s[0]=t,o[1]=i+e,s[1]=n,this}};const Qx=new Float32Array(1);var $x=class extends vf{constructor(e){super(),this._root=e,this._initMemoryManager(),this._accuIndex=0,this.time=0,this.timeScale=1}_bindAction(e,t){let n=e._localRoot||this._root,r=e._clip.tracks,i=r.length,a=e._propertyBindings,o=e._interpolants,s=n.uuid,c=this._bindingsByRootAndName,l=c[s];l===void 0&&(l={},c[s]=l);for(let e=0;e!==i;++e){let i=r[e],c=i.name,u=l[c];if(u!==void 0)++u.referenceCount,a[e]=u;else{if(u=a[e],u!==void 0){u._cacheIndex===null&&(++u.referenceCount,this._addInactiveBinding(u,s,c));continue}let r=t&&t._propertyBindings[e].binding.parsedPath;u=new Lx(Yx.create(n,c,r),i.ValueTypeName,i.getValueSize()),++u.referenceCount,this._addInactiveBinding(u,s,c),a[e]=u}o[e].resultBuffer=u.buffer}}_activateAction(e){if(!this._isActiveAction(e)){if(e._cacheIndex===null){let t=(e._localRoot||this._root).uuid,n=e._clip.uuid,r=this._actionsByClip[n];this._bindAction(e,r&&r.knownActions[0]),this._addInactiveAction(e,n,t)}let t=e._propertyBindings;for(let e=0,n=t.length;e!==n;++e){let n=t[e];n.useCount++===0&&(this._lendBinding(n),n.saveOriginalState())}this._lendAction(e)}}_deactivateAction(e){if(this._isActiveAction(e)){let t=e._propertyBindings;for(let e=0,n=t.length;e!==n;++e){let n=t[e];--n.useCount===0&&(n.restoreOriginalState(),this._takeBackBinding(n))}this._takeBackAction(e)}}_initMemoryManager(){this._actions=[],this._nActiveActions=0,this._actionsByClip={},this._bindings=[],this._nActiveBindings=0,this._bindingsByRootAndName={},this._controlInterpolants=[],this._nActiveControlInterpolants=0;let e=this;this.stats={actions:{get total(){return e._actions.length},get inUse(){return e._nActiveActions}},bindings:{get total(){return e._bindings.length},get inUse(){return e._nActiveBindings}},controlInterpolants:{get total(){return e._controlInterpolants.length},get inUse(){return e._nActiveControlInterpolants}}}}_isActiveAction(e){let t=e._cacheIndex;return t!==null&&t=0;--n)e[n].stop();return this}update(e){e*=this.timeScale;let t=this._actions,n=this._nActiveActions,r=this.time+=e,i=Math.sign(e),a=this._accuIndex^=1;for(let o=0;o!==n;++o){let n=t[o];n._update(r,e,i,a)}let o=this._bindings,s=this._nActiveBindings;for(let e=0;e!==s;++e)o[e].apply(a);return this}setTime(e){this.time=0;for(let e=0;e=this.min.x&&e.x<=this.max.x&&e.y>=this.min.y&&e.y<=this.max.y}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y}getParameter(e,t){return t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y))}intersectsBox(e){return e.max.x>=this.min.x&&e.min.x<=this.max.x&&e.max.y>=this.min.y&&e.min.y<=this.max.y}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,pS).distanceTo(e)}intersect(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}};const hS=new W,gS=new W;var _S=class{constructor(e=new W,t=new W){this.start=e,this.end=t}set(e,t){return this.start.copy(e),this.end.copy(t),this}copy(e){return this.start.copy(e.start),this.end.copy(e.end),this}getCenter(e){return e.addVectors(this.start,this.end).multiplyScalar(.5)}delta(e){return e.subVectors(this.end,this.start)}distanceSq(){return this.start.distanceToSquared(this.end)}distance(){return this.start.distanceTo(this.end)}at(e,t){return this.delta(t).multiplyScalar(e).add(this.start)}closestPointToPointParameter(e,t){hS.subVectors(e,this.start),gS.subVectors(this.end,this.start);let n=gS.dot(gS),r=gS.dot(hS),i=r/n;return t&&(i=wf(i,0,1)),i}closestPointToPoint(e,t,n){let r=this.closestPointToPointParameter(e,t);return this.delta(n).multiplyScalar(r).add(this.start)}applyMatrix4(e){return this.start.applyMatrix4(e),this.end.applyMatrix4(e),this}equals(e){return e.start.equals(this.start)&&e.end.equals(this.end)}clone(){return new this.constructor().copy(this)}};const vS=new W;var yS=class extends Dm{constructor(e,t){super(),this.light=e,this.matrixAutoUpdate=!1,this.color=t,this.type=`SpotLightHelper`;let n=new bh,r=[0,0,0,0,0,1,0,0,0,1,0,1,0,0,0,-1,0,1,0,0,0,0,1,1,0,0,0,0,-1,1];for(let e=0,t=1,n=32;e1)for(let n=0;n.99999)this.quaternion.set(0,0,0,1);else if(e.y<-.99999)this.quaternion.set(1,0,0,0);else{WS.set(e.z,0,-e.x).normalize();let t=Math.acos(e.y);this.quaternion.setFromAxisAngle(WS,t)}}setLength(e,t=e*.2,n=t*.2){this.line.scale.set(1,Math.max(1e-4,e-t),1),this.line.updateMatrix(),this.cone.scale.set(n,t,n),this.cone.position.y=e,this.cone.updateMatrix()}setColor(e){this.line.material.color.set(e),this.cone.material.color.set(e)}copy(e){return super.copy(e,!1),this.line.copy(e.line),this.cone.copy(e.cone),this}dispose(){this.line.geometry.dispose(),this.line.material.dispose(),this.cone.geometry.dispose(),this.cone.material.dispose()}},JS=class extends z_{constructor(e=1){let t=[0,0,0,e,0,0,0,0,0,0,e,0,0,0,0,0,0,e],n=[1,0,0,1,.6,0,0,1,0,.6,1,0,0,0,1,0,.6,1],r=new bh;r.setAttribute(`position`,new q(t,3)),r.setAttribute(`color`,new q(n,3));let i=new D_({vertexColors:!0,toneMapped:!1});super(r,i),this.type=`AxesHelper`}setColors(e,t,n){let r=new K,i=this.geometry.attributes.color.array;return r.set(e),r.toArray(i,0),r.toArray(i,3),r.set(t),r.toArray(i,6),r.toArray(i,9),r.set(n),r.toArray(i,12),r.toArray(i,15),this.geometry.attributes.color.needsUpdate=!0,this}dispose(){this.geometry.dispose(),this.material.dispose()}},YS=class{constructor(){this.type=`ShapePath`,this.color=new K,this.subPaths=[],this.currentPath=null}moveTo(e,t){return this.currentPath=new Vv,this.subPaths.push(this.currentPath),this.currentPath.moveTo(e,t),this}lineTo(e,t){return this.currentPath.lineTo(e,t),this}quadraticCurveTo(e,t,n,r){return this.currentPath.quadraticCurveTo(e,t,n,r),this}bezierCurveTo(e,t,n,r,i,a){return this.currentPath.bezierCurveTo(e,t,n,r,i,a),this}splineThru(e){return this.currentPath.splineThru(e),this}toShapes(e){function t(e){let t=[];for(let n=0,r=e.length;n2**-52){if(c<0&&(n=t[a],s=-s,o=t[i],c=-c),e.yo.y)continue;if(e.y===n.y){if(e.x===n.x)return!0}else{let t=c*(e.x-n.x)-s*(e.y-n.y);if(t===0)return!0;if(t<0)continue;r=!r}}else{if(e.y!==n.y)continue;if(o.x<=e.x&&e.x<=n.x||n.x<=e.x&&e.x<=o.x)return!0}}return r}let r=Cy.isClockWise,i=this.subPaths;if(i.length===0)return[];let a,o,s,c=[];if(i.length===1)return o=i[0],s=new Hv,s.curves=o.curves,c.push(s),c;let l=!r(i[0].getPoints());l=e?!l:l;let u=[],d=[],f=[],p=0,m;d[p]=void 0,f[p]=[];for(let t=0,n=i.length;t1){let e=!1,t=0;for(let e=0,t=d.length;e0&&e===!1&&(f=u)}let h;for(let e=0,t=d.length;et?(e.repeat.x=1,e.repeat.y=n/t,e.offset.x=0,e.offset.y=(1-e.repeat.y)/2):(e.repeat.x=t/n,e.repeat.y=1,e.offset.x=(1-e.repeat.x)/2,e.offset.y=0),e}function QS(e,t){let n=e.image&&e.image.width?e.image.width/e.image.height:1;return n>t?(e.repeat.x=t/n,e.repeat.y=1,e.offset.x=(1-e.repeat.x)/2,e.offset.y=0):(e.repeat.x=1,e.repeat.y=n/t,e.offset.x=0,e.offset.y=(1-e.repeat.y)/2),e}function $S(e){return e.repeat.x=1,e.repeat.y=1,e.offset.x=0,e.offset.y=0,e}function eC(e,t,n,r){let i=tC(r);switch(n){case gu:return e*t;case xu:return e*t/i.components*i.byteLength;case Su:return e*t/i.components*i.byteLength;case Cu:return e*t*2/i.components*i.byteLength;case wu:return e*t*2/i.components*i.byteLength;case _u:return e*t*3/i.components*i.byteLength;case vu:return e*t*4/i.components*i.byteLength;case Eu:return e*t*4/i.components*i.byteLength;case Du:case Ou:return Math.floor((e+3)/4)*Math.floor((t+3)/4)*8;case ku:case Au:return Math.floor((e+3)/4)*Math.floor((t+3)/4)*16;case Mu:case Pu:return Math.max(e,16)*Math.max(t,8)/4;case ju:case Nu:return Math.max(e,8)*Math.max(t,8)/2;case Fu:case Iu:return Math.floor((e+3)/4)*Math.floor((t+3)/4)*8;case Lu:return Math.floor((e+3)/4)*Math.floor((t+3)/4)*16;case Ru:return Math.floor((e+3)/4)*Math.floor((t+3)/4)*16;case zu:return Math.floor((e+4)/5)*Math.floor((t+3)/4)*16;case Bu:return Math.floor((e+4)/5)*Math.floor((t+4)/5)*16;case Vu:return Math.floor((e+5)/6)*Math.floor((t+4)/5)*16;case Hu:return Math.floor((e+5)/6)*Math.floor((t+5)/6)*16;case Uu:return Math.floor((e+7)/8)*Math.floor((t+4)/5)*16;case Wu:return Math.floor((e+7)/8)*Math.floor((t+5)/6)*16;case Gu:return Math.floor((e+7)/8)*Math.floor((t+7)/8)*16;case Ku:return Math.floor((e+9)/10)*Math.floor((t+4)/5)*16;case qu:return Math.floor((e+9)/10)*Math.floor((t+5)/6)*16;case Ju:return Math.floor((e+9)/10)*Math.floor((t+7)/8)*16;case Yu:return Math.floor((e+9)/10)*Math.floor((t+9)/10)*16;case Xu:return Math.floor((e+11)/12)*Math.floor((t+9)/10)*16;case Zu:return Math.floor((e+11)/12)*Math.floor((t+11)/12)*16;case Qu:case $u:case ed:return Math.ceil(e/4)*Math.ceil(t/4)*16;case td:case nd:return Math.ceil(e/4)*Math.ceil(t/4)*8;case rd:case id:return Math.ceil(e/4)*Math.ceil(t/4)*16}throw Error(`Unable to determine texture byte length for ${n} format.`)}function tC(e){switch(e){case iu:case au:return{byteLength:1,components:1};case su:case ou:case du:return{byteLength:2,components:1};case fu:case pu:return{byteLength:2,components:4};case lu:case cu:case uu:return{byteLength:4,components:1};case hu:return{byteLength:4,components:3}}throw Error(`Unknown texture type ${e}.`)}var nC=class{static contain(e,t){return ZS(e,t)}static cover(e,t){return QS(e,t)}static fill(e){return $S(e)}static getByteLength(e,t,n,r){return eC(e,t,n,r)}};typeof __THREE_DEVTOOLS__<`u`&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent(`register`,{detail:{revision:Mc}})),typeof window<`u`&&(window.__THREE__?console.warn(`WARNING: Multiple instances of Three.js being imported.`):window.__THREE__=Mc);var rC={};l(rC,{ACESFilmicToneMapping:()=>Nl,AddEquation:()=>Qc,AddOperation:()=>Ol,AdditiveAnimationBlendMode:()=>hd,AdditiveBlending:()=>Jc,AgXToneMapping:()=>Fl,AlphaFormat:()=>gu,AlwaysCompare:()=>$d,AlwaysDepth:()=>yl,AlwaysStencilFunc:()=>Gd,AmbientLight:()=>ex,AnimationAction:()=>Zx,AnimationClip:()=>Sb,AnimationLoader:()=>Mb,AnimationMixer:()=>$x,AnimationObjectGroup:()=>Xx,AnimationUtils:()=>lb,ArcCurve:()=>hv,ArrayCamera:()=>xx,ArrowHelper:()=>qS,AttachedBindMode:()=>Ll,Audio:()=>Ax,AudioAnalyser:()=>Ix,AudioContext:()=>hx,AudioListener:()=>kx,AudioLoader:()=>gx,AxesHelper:()=>JS,BackSide:()=>Wc,BasicDepthPacking:()=>yd,BasicShadowMap:()=>zc,BatchedMesh:()=>E_,Bone:()=>Rg,BooleanKeyframeTrack:()=>hb,Box2:()=>mS,Box3:()=>Op,Box3Helper:()=>HS,BoxGeometry:()=>Fh,BoxHelper:()=>VS,BufferAttribute:()=>ih,BufferGeometry:()=>bh,BufferGeometryLoader:()=>sx,ByteType:()=>au,Cache:()=>Tb,Camera:()=>Wh,CameraHelper:()=>RS,CanvasTexture:()=>ev,CapsuleGeometry:()=>nv,CatmullRomCurve3:()=>xv,CineonToneMapping:()=>Ml,CircleGeometry:()=>rv,ClampToEdgeWrapping:()=>Kl,Clock:()=>Sx,Color:()=>K,ColorKeyframeTrack:()=>gb,ColorManagement:()=>up,CompressedArrayTexture:()=>Q_,CompressedCubeTexture:()=>$_,CompressedTexture:()=>Z_,CompressedTextureLoader:()=>Nb,ConeGeometry:()=>av,ConstantAlphaFactor:()=>gl,ConstantColorFactor:()=>ml,Controls:()=>XS,CubeCamera:()=>Zh,CubeReflectionMapping:()=>Bl,CubeRefractionMapping:()=>Vl,CubeTexture:()=>Qh,CubeTextureLoader:()=>Fb,CubeUVReflectionMapping:()=>Wl,CubicBezierCurve:()=>Mv,CubicBezierCurve3:()=>Nv,CubicInterpolant:()=>db,CullFaceBack:()=>Ic,CullFaceFront:()=>Lc,CullFaceFrontBack:()=>Rc,CullFaceNone:()=>Fc,Curve:()=>pv,CurvePath:()=>Bv,CustomBlending:()=>Zc,CustomToneMapping:()=>Pl,CylinderGeometry:()=>iv,Cylindrical:()=>dS,Data3DTexture:()=>Ep,DataArrayTexture:()=>wp,DataTexture:()=>zg,DataTextureLoader:()=>Ib,DataUtils:()=>eh,DecrementStencilOp:()=>Pd,DecrementWrapStencilOp:()=>Id,DefaultLoadingManager:()=>Db,DepthFormat:()=>yu,DepthStencilFormat:()=>bu,DepthTexture:()=>tv,DetachedBindMode:()=>Rl,DirectionalLight:()=>$b,DirectionalLightHelper:()=>FS,DiscreteInterpolant:()=>pb,DodecahedronGeometry:()=>sv,DoubleSide:()=>Gc,DstAlphaFactor:()=>ll,DstColorFactor:()=>dl,DynamicCopyUsage:()=>lf,DynamicDrawUsage:()=>tf,DynamicReadUsage:()=>af,EdgesGeometry:()=>fv,EllipseCurve:()=>mv,EqualCompare:()=>Jd,EqualDepth:()=>Sl,EqualStencilFunc:()=>Bd,EquirectangularReflectionMapping:()=>Hl,EquirectangularRefractionMapping:()=>Ul,Euler:()=>um,EventDispatcher:()=>vf,ExtrudeGeometry:()=>Ey,FileLoader:()=>jb,Float16BufferAttribute:()=>fh,Float32BufferAttribute:()=>q,FloatType:()=>uu,Fog:()=>ig,FogExp2:()=>rg,FramebufferTexture:()=>X_,FrontSide:()=>Uc,Frustum:()=>i_,FrustumArray:()=>s_,GLBufferAttribute:()=>aS,GLSL1:()=>df,GLSL3:()=>ff,GreaterCompare:()=>Xd,GreaterDepth:()=>wl,GreaterEqualCompare:()=>Qd,GreaterEqualDepth:()=>Cl,GreaterEqualStencilFunc:()=>Wd,GreaterStencilFunc:()=>Hd,GridHelper:()=>AS,Group:()=>eg,HalfFloatType:()=>du,HemisphereLight:()=>zb,HemisphereLightHelper:()=>kS,IcosahedronGeometry:()=>ky,ImageBitmapLoader:()=>px,ImageLoader:()=>Pb,ImageUtils:()=>mp,IncrementStencilOp:()=>Nd,IncrementWrapStencilOp:()=>Fd,InstancedBufferAttribute:()=>Ug,InstancedBufferGeometry:()=>ox,InstancedInterleavedBuffer:()=>iS,InstancedMesh:()=>Zg,Int16BufferAttribute:()=>ch,Int32BufferAttribute:()=>uh,Int8BufferAttribute:()=>ah,IntType:()=>cu,InterleavedBuffer:()=>og,InterleavedBufferAttribute:()=>cg,Interpolant:()=>ub,InterpolateDiscrete:()=>cd,InterpolateLinear:()=>ld,InterpolateSmooth:()=>ud,InterpolationSamplingMode:()=>_f,InterpolationSamplingType:()=>gf,InvertStencilOp:()=>Ld,KeepStencilOp:()=>jd,KeyframeTrack:()=>mb,LOD:()=>Dg,LatheGeometry:()=>Ay,Layers:()=>dm,LessCompare:()=>qd,LessDepth:()=>bl,LessEqualCompare:()=>Yd,LessEqualDepth:()=>xl,LessEqualStencilFunc:()=>Vd,LessStencilFunc:()=>zd,Light:()=>Rb,LightProbe:()=>rx,Line:()=>F_,Line3:()=>_S,LineBasicMaterial:()=>D_,LineCurve:()=>Pv,LineCurve3:()=>Fv,LineDashedMaterial:()=>tb,LineLoop:()=>B_,LineSegments:()=>z_,LinearFilter:()=>$l,LinearInterpolant:()=>fb,LinearMipMapLinearFilter:()=>ru,LinearMipMapNearestFilter:()=>tu,LinearMipmapLinearFilter:()=>nu,LinearMipmapNearestFilter:()=>eu,LinearSRGBColorSpace:()=>Dd,LinearToneMapping:()=>Al,LinearTransfer:()=>Od,Loader:()=>Ob,LoaderUtils:()=>ax,LoadingManager:()=>Eb,LoopOnce:()=>ad,LoopPingPong:()=>sd,LoopRepeat:()=>od,MOUSE:()=>Nc,Material:()=>Jm,MaterialLoader:()=>ix,MathUtils:()=>Gf,Matrix2:()=>fS,Matrix3:()=>Yf,Matrix4:()=>G,MaxEquation:()=>nl,Mesh:()=>Mh,MeshBasicMaterial:()=>Ym,MeshDepthMaterial:()=>Qy,MeshDistanceMaterial:()=>$y,MeshLambertMaterial:()=>Zy,MeshMatcapMaterial:()=>eb,MeshNormalMaterial:()=>Xy,MeshPhongMaterial:()=>Jy,MeshPhysicalMaterial:()=>qy,MeshStandardMaterial:()=>Ky,MeshToonMaterial:()=>Yy,MinEquation:()=>tl,MirroredRepeatWrapping:()=>ql,MixOperation:()=>Dl,MultiplyBlending:()=>Xc,MultiplyOperation:()=>El,NearestFilter:()=>Jl,NearestMipMapLinearFilter:()=>Ql,NearestMipMapNearestFilter:()=>Xl,NearestMipmapLinearFilter:()=>Zl,NearestMipmapNearestFilter:()=>Yl,NeutralToneMapping:()=>Il,NeverCompare:()=>Kd,NeverDepth:()=>vl,NeverStencilFunc:()=>Rd,NoBlending:()=>Kc,NoColorSpace:()=>Td,NoToneMapping:()=>kl,NormalAnimationBlendMode:()=>md,NormalBlending:()=>qc,NotEqualCompare:()=>Zd,NotEqualDepth:()=>Tl,NotEqualStencilFunc:()=>Ud,NumberKeyframeTrack:()=>_b,Object3D:()=>Dm,ObjectLoader:()=>cx,ObjectSpaceNormalMap:()=>wd,OctahedronGeometry:()=>jy,OneFactor:()=>il,OneMinusConstantAlphaFactor:()=>_l,OneMinusConstantColorFactor:()=>hl,OneMinusDstAlphaFactor:()=>ul,OneMinusDstColorFactor:()=>fl,OneMinusSrcAlphaFactor:()=>cl,OneMinusSrcColorFactor:()=>ol,OrthographicCamera:()=>Zb,PCFShadowMap:()=>Bc,PCFSoftShadowMap:()=>Vc,PMREMGenerator:()=>lE,Path:()=>Vv,PerspectiveCamera:()=>Jh,Plane:()=>t_,PlaneGeometry:()=>My,PlaneHelper:()=>US,PointLight:()=>Xb,PointLightHelper:()=>TS,Points:()=>K_,PointsMaterial:()=>V_,PolarGridHelper:()=>jS,PolyhedronGeometry:()=>ov,PositionalAudio:()=>Fx,PropertyBinding:()=>Yx,PropertyMixer:()=>Lx,QuadraticBezierCurve:()=>Iv,QuadraticBezierCurve3:()=>Lv,Quaternion:()=>Kf,QuaternionKeyframeTrack:()=>yb,QuaternionLinearInterpolant:()=>vb,RED_GREEN_RGTC2_Format:()=>rd,RED_RGTC1_Format:()=>td,REVISION:()=>Mc,RGBADepthPacking:()=>bd,RGBAFormat:()=>vu,RGBAIntegerFormat:()=>Eu,RGBA_ASTC_10x10_Format:()=>Yu,RGBA_ASTC_10x5_Format:()=>Ku,RGBA_ASTC_10x6_Format:()=>qu,RGBA_ASTC_10x8_Format:()=>Ju,RGBA_ASTC_12x10_Format:()=>Xu,RGBA_ASTC_12x12_Format:()=>Zu,RGBA_ASTC_4x4_Format:()=>Ru,RGBA_ASTC_5x4_Format:()=>zu,RGBA_ASTC_5x5_Format:()=>Bu,RGBA_ASTC_6x5_Format:()=>Vu,RGBA_ASTC_6x6_Format:()=>Hu,RGBA_ASTC_8x5_Format:()=>Uu,RGBA_ASTC_8x6_Format:()=>Wu,RGBA_ASTC_8x8_Format:()=>Gu,RGBA_BPTC_Format:()=>Qu,RGBA_ETC2_EAC_Format:()=>Lu,RGBA_PVRTC_2BPPV1_Format:()=>Pu,RGBA_PVRTC_4BPPV1_Format:()=>Nu,RGBA_S3TC_DXT1_Format:()=>Ou,RGBA_S3TC_DXT3_Format:()=>ku,RGBA_S3TC_DXT5_Format:()=>Au,RGBDepthPacking:()=>xd,RGBFormat:()=>_u,RGBIntegerFormat:()=>Tu,RGB_BPTC_SIGNED_Format:()=>$u,RGB_BPTC_UNSIGNED_Format:()=>ed,RGB_ETC1_Format:()=>Fu,RGB_ETC2_Format:()=>Iu,RGB_PVRTC_2BPPV1_Format:()=>Mu,RGB_PVRTC_4BPPV1_Format:()=>ju,RGB_S3TC_DXT1_Format:()=>Du,RGDepthPacking:()=>Sd,RGFormat:()=>Cu,RGIntegerFormat:()=>wu,RawShaderMaterial:()=>Gy,Ray:()=>em,Raycaster:()=>sS,RectAreaLight:()=>tx,RedFormat:()=>xu,RedIntegerFormat:()=>Su,ReinhardToneMapping:()=>jl,RenderTarget:()=>Sp,RenderTarget3D:()=>eS,RepeatWrapping:()=>Gl,ReplaceStencilOp:()=>Md,ReverseSubtractEquation:()=>el,RingGeometry:()=>Ny,SIGNED_RED_GREEN_RGTC2_Format:()=>id,SIGNED_RED_RGTC1_Format:()=>nd,SRGBColorSpace:()=>Ed,SRGBTransfer:()=>kd,Scene:()=>ag,ShaderChunk:()=>zT,ShaderLib:()=>BT,ShaderMaterial:()=>Uh,ShadowMaterial:()=>Wy,Shape:()=>Hv,ShapeGeometry:()=>Py,ShapePath:()=>YS,ShapeUtils:()=>Cy,ShortType:()=>ou,Skeleton:()=>Hg,SkeletonHelper:()=>CS,SkinnedMesh:()=>Lg,Source:()=>gp,Sphere:()=>Kp,SphereGeometry:()=>Iy,Spherical:()=>uS,SphericalHarmonics3:()=>nx,SplineCurve:()=>Rv,SpotLight:()=>Gb,SpotLightHelper:()=>yS,Sprite:()=>Cg,SpriteMaterial:()=>lg,SrcAlphaFactor:()=>sl,SrcAlphaSaturateFactor:()=>pl,SrcColorFactor:()=>al,StaticCopyUsage:()=>cf,StaticDrawUsage:()=>ef,StaticReadUsage:()=>rf,StereoCamera:()=>bx,StreamCopyUsage:()=>uf,StreamDrawUsage:()=>nf,StreamReadUsage:()=>sf,StringKeyframeTrack:()=>bb,SubtractEquation:()=>$c,SubtractiveBlending:()=>Yc,TOUCH:()=>Pc,TangentSpaceNormalMap:()=>Cd,TetrahedronGeometry:()=>Ly,Texture:()=>bp,TextureLoader:()=>Lb,TextureUtils:()=>nC,TimestampQuery:()=>hf,TorusGeometry:()=>Ry,TorusKnotGeometry:()=>zy,Triangle:()=>Vm,TriangleFanDrawMode:()=>vd,TriangleStripDrawMode:()=>_d,TrianglesDrawMode:()=>gd,TubeGeometry:()=>By,UVMapping:()=>zl,Uint16BufferAttribute:()=>lh,Uint32BufferAttribute:()=>dh,Uint8BufferAttribute:()=>oh,Uint8ClampedBufferAttribute:()=>sh,Uniform:()=>tS,UniformsGroup:()=>rS,UniformsLib:()=>J,UniformsUtils:()=>Bh,UnsignedByteType:()=>iu,UnsignedInt248Type:()=>mu,UnsignedInt5999Type:()=>hu,UnsignedIntType:()=>lu,UnsignedShort4444Type:()=>fu,UnsignedShort5551Type:()=>pu,UnsignedShortType:()=>su,VSMShadowMap:()=>Hc,Vector2:()=>U,Vector3:()=>W,Vector4:()=>xp,VectorKeyframeTrack:()=>xb,VideoFrameTexture:()=>Y_,VideoTexture:()=>J_,WebGL3DRenderTarget:()=>Dp,WebGLArrayRenderTarget:()=>Tp,WebGLCoordinateSystem:()=>pf,WebGLCubeRenderTarget:()=>$h,WebGLRenderTarget:()=>Cp,WebGLRenderer:()=>zO,WebGLUtils:()=>AO,WebGPUCoordinateSystem:()=>mf,WebXRController:()=>ng,WireframeGeometry:()=>Vy,WrapAroundEnding:()=>pd,ZeroCurvatureEnding:()=>dd,ZeroFactor:()=>rl,ZeroSlopeEnding:()=>fd,ZeroStencilOp:()=>Ad,createCanvasElement:()=>tp});function iC(){let e=null,t=!1,n=null,r=null;function i(t,a){n(t,a),r=e.requestAnimationFrame(i)}return{start:function(){t!==!0&&n!==null&&(r=e.requestAnimationFrame(i),t=!0)},stop:function(){e.cancelAnimationFrame(r),t=!1},setAnimationLoop:function(e){n=e},setContext:function(t){e=t}}}function aC(e){let t=new WeakMap;function n(t,n){let r=t.array,i=t.usage,a=r.byteLength,o=e.createBuffer();e.bindBuffer(n,o),e.bufferData(n,r,i),t.onUploadCallback();let s;if(r instanceof Float32Array)s=e.FLOAT;else if(r instanceof Uint16Array)s=t.isFloat16BufferAttribute?e.HALF_FLOAT:e.UNSIGNED_SHORT;else if(r instanceof Int16Array)s=e.SHORT;else if(r instanceof Uint32Array)s=e.UNSIGNED_INT;else if(r instanceof Int32Array)s=e.INT;else if(r instanceof Int8Array)s=e.BYTE;else if(r instanceof Uint8Array)s=e.UNSIGNED_BYTE;else if(r instanceof Uint8ClampedArray)s=e.UNSIGNED_BYTE;else throw Error(`THREE.WebGLAttributes: Unsupported buffer data format: `+r);return{buffer:o,type:s,bytesPerElement:r.BYTES_PER_ELEMENT,version:t.version,size:a}}function r(t,n,r){let i=n.array,a=n.updateRanges;if(e.bindBuffer(r,t),a.length===0)e.bufferSubData(r,0,i);else{a.sort((e,t)=>e.start-t.start);let t=0;for(let e=1;eS({name:e.name},t,{setup:e}))():e}function zr( : cases.z; return clamp( threshold , 1.0e-6, 1.0 ); } -#endif`,nw=`#ifdef USE_ALPHAMAP +#endif`,cC=`#ifdef USE_ALPHAMAP diffuseColor.a *= texture2D( alphaMap, vAlphaMapUv ).g; -#endif`,rw=`#ifdef USE_ALPHAMAP +#endif`,lC=`#ifdef USE_ALPHAMAP uniform sampler2D alphaMap; -#endif`,iw=`#ifdef USE_ALPHATEST +#endif`,uC=`#ifdef USE_ALPHATEST #ifdef ALPHA_TO_COVERAGE diffuseColor.a = smoothstep( alphaTest, alphaTest + fwidth( diffuseColor.a ), diffuseColor.a ); if ( diffuseColor.a == 0.0 ) discard; #else if ( diffuseColor.a < alphaTest ) discard; #endif -#endif`,aw=`#ifdef USE_ALPHATEST +#endif`,dC=`#ifdef USE_ALPHATEST uniform float alphaTest; -#endif`,ow=`#ifdef USE_AOMAP +#endif`,fC=`#ifdef USE_AOMAP float ambientOcclusion = ( texture2D( aoMap, vAoMapUv ).r - 1.0 ) * aoMapIntensity + 1.0; reflectedLight.indirectDiffuse *= ambientOcclusion; #if defined( USE_CLEARCOAT ) @@ -110,10 +116,10 @@ function Rr(e,t){return A(e)?(()=>S({name:e.name},t,{setup:e}))():e}function zr( float dotNV = saturate( dot( geometryNormal, geometryViewDir ) ); reflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.roughness ); #endif -#endif`,sw=`#ifdef USE_AOMAP +#endif`,pC=`#ifdef USE_AOMAP uniform sampler2D aoMap; uniform float aoMapIntensity; -#endif`,cw=`#ifdef USE_BATCHING +#endif`,mC=`#ifdef USE_BATCHING #if ! defined( GL_ANGLE_multi_draw ) #define gl_DrawID _gl_DrawID uniform int _gl_DrawID; @@ -147,15 +153,15 @@ function Rr(e,t){return A(e)?(()=>S({name:e.name},t,{setup:e}))():e}function zr( int y = j / size; return texelFetch( batchingColorTexture, ivec2( x, y ), 0 ).rgb; } -#endif`,lw=`#ifdef USE_BATCHING +#endif`,hC=`#ifdef USE_BATCHING mat4 batchingMatrix = getBatchingMatrix( getIndirectIndex( gl_DrawID ) ); -#endif`,uw=`vec3 transformed = vec3( position ); +#endif`,gC=`vec3 transformed = vec3( position ); #ifdef USE_ALPHAHASH vPosition = vec3( position ); -#endif`,dw=`vec3 objectNormal = vec3( normal ); +#endif`,_C=`vec3 objectNormal = vec3( normal ); #ifdef USE_TANGENT vec3 objectTangent = vec3( tangent.xyz ); -#endif`,fw=`float G_BlinnPhong_Implicit( ) { +#endif`,vC=`float G_BlinnPhong_Implicit( ) { return 0.25; } float D_BlinnPhong( const in float shininess, const in float dotNH ) { @@ -169,7 +175,7 @@ vec3 BRDF_BlinnPhong( const in vec3 lightDir, const in vec3 viewDir, const in ve float G = G_BlinnPhong_Implicit( ); float D = D_BlinnPhong( shininess, dotNH ); return F * ( G * D ); -} // validated`,pw=`#ifdef USE_IRIDESCENCE +} // validated`,yC=`#ifdef USE_IRIDESCENCE const mat3 XYZ_TO_REC709 = mat3( 3.2404542, -0.9692660, 0.0556434, -1.5371385, 1.8760108, -0.2040259, @@ -232,7 +238,7 @@ vec3 BRDF_BlinnPhong( const in vec3 lightDir, const in vec3 viewDir, const in ve } return max( I, vec3( 0.0 ) ); } -#endif`,mw=`#ifdef USE_BUMPMAP +#endif`,bC=`#ifdef USE_BUMPMAP uniform sampler2D bumpMap; uniform float bumpScale; vec2 dHdxy_fwd() { @@ -253,7 +259,7 @@ vec3 BRDF_BlinnPhong( const in vec3 lightDir, const in vec3 viewDir, const in ve vec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 ); return normalize( abs( fDet ) * surf_norm - vGrad ); } -#endif`,hw=`#if NUM_CLIPPING_PLANES > 0 +#endif`,xC=`#if NUM_CLIPPING_PLANES > 0 vec4 plane; #ifdef ALPHA_TO_COVERAGE float distanceToPlane, distanceGradient; @@ -299,26 +305,26 @@ vec3 BRDF_BlinnPhong( const in vec3 lightDir, const in vec3 viewDir, const in ve if ( clipped ) discard; #endif #endif -#endif`,gw=`#if NUM_CLIPPING_PLANES > 0 +#endif`,SC=`#if NUM_CLIPPING_PLANES > 0 varying vec3 vClipPosition; uniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ]; -#endif`,_w=`#if NUM_CLIPPING_PLANES > 0 +#endif`,CC=`#if NUM_CLIPPING_PLANES > 0 varying vec3 vClipPosition; -#endif`,vw=`#if NUM_CLIPPING_PLANES > 0 +#endif`,wC=`#if NUM_CLIPPING_PLANES > 0 vClipPosition = - mvPosition.xyz; -#endif`,yw=`#if defined( USE_COLOR_ALPHA ) +#endif`,TC=`#if defined( USE_COLOR_ALPHA ) diffuseColor *= vColor; #elif defined( USE_COLOR ) diffuseColor.rgb *= vColor; -#endif`,bw=`#if defined( USE_COLOR_ALPHA ) +#endif`,EC=`#if defined( USE_COLOR_ALPHA ) varying vec4 vColor; #elif defined( USE_COLOR ) varying vec3 vColor; -#endif`,xw=`#if defined( USE_COLOR_ALPHA ) +#endif`,DC=`#if defined( USE_COLOR_ALPHA ) varying vec4 vColor; #elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR ) || defined( USE_BATCHING_COLOR ) varying vec3 vColor; -#endif`,Sw=`#if defined( USE_COLOR_ALPHA ) +#endif`,OC=`#if defined( USE_COLOR_ALPHA ) vColor = vec4( 1.0 ); #elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR ) || defined( USE_BATCHING_COLOR ) vColor = vec3( 1.0 ); @@ -332,7 +338,7 @@ vec3 BRDF_BlinnPhong( const in vec3 lightDir, const in vec3 viewDir, const in ve #ifdef USE_BATCHING_COLOR vec3 batchingColor = getBatchingColor( getIndirectIndex( gl_DrawID ) ); vColor.xyz *= batchingColor.xyz; -#endif`,Cw=`#define PI 3.141592653589793 +#endif`,kC=`#define PI 3.141592653589793 #define PI2 6.283185307179586 #define PI_HALF 1.5707963267948966 #define RECIPROCAL_PI 0.3183098861837907 @@ -406,7 +412,7 @@ vec3 F_Schlick( const in vec3 f0, const in float f90, const in float dotVH ) { float F_Schlick( const in float f0, const in float f90, const in float dotVH ) { float fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH ); return f0 * ( 1.0 - fresnel ) + ( f90 * fresnel ); -} // validated`,ww=`#ifdef ENVMAP_TYPE_CUBE_UV +} // validated`,AC=`#ifdef ENVMAP_TYPE_CUBE_UV #define cubeUV_minMipLevel 4.0 #define cubeUV_minTileSize 16.0 float getFace( vec3 direction ) { @@ -499,7 +505,7 @@ float F_Schlick( const in float f0, const in float f90, const in float dotVH ) { return vec4( mix( color0, color1, mipF ), 1.0 ); } } -#endif`,Tw=`vec3 transformedNormal = objectNormal; +#endif`,jC=`vec3 transformedNormal = objectNormal; #ifdef USE_TANGENT vec3 transformedTangent = objectTangent; #endif @@ -528,21 +534,21 @@ transformedNormal = normalMatrix * transformedNormal; #ifdef FLIP_SIDED transformedTangent = - transformedTangent; #endif -#endif`,Ew=`#ifdef USE_DISPLACEMENTMAP +#endif`,MC=`#ifdef USE_DISPLACEMENTMAP uniform sampler2D displacementMap; uniform float displacementScale; uniform float displacementBias; -#endif`,Dw=`#ifdef USE_DISPLACEMENTMAP +#endif`,NC=`#ifdef USE_DISPLACEMENTMAP transformed += normalize( objectNormal ) * ( texture2D( displacementMap, vDisplacementMapUv ).x * displacementScale + displacementBias ); -#endif`,Ow=`#ifdef USE_EMISSIVEMAP +#endif`,PC=`#ifdef USE_EMISSIVEMAP vec4 emissiveColor = texture2D( emissiveMap, vEmissiveMapUv ); #ifdef DECODE_VIDEO_TEXTURE_EMISSIVE emissiveColor = sRGBTransferEOTF( emissiveColor ); #endif totalEmissiveRadiance *= emissiveColor.rgb; -#endif`,kw=`#ifdef USE_EMISSIVEMAP +#endif`,FC=`#ifdef USE_EMISSIVEMAP uniform sampler2D emissiveMap; -#endif`,Aw=`gl_FragColor = linearToOutputTexel( gl_FragColor );`,jw=`vec4 LinearTransferOETF( in vec4 value ) { +#endif`,IC=`gl_FragColor = linearToOutputTexel( gl_FragColor );`,LC=`vec4 LinearTransferOETF( in vec4 value ) { return value; } vec4 sRGBTransferEOTF( in vec4 value ) { @@ -550,7 +556,7 @@ vec4 sRGBTransferEOTF( in vec4 value ) { } vec4 sRGBTransferOETF( in vec4 value ) { return vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.a ); -}`,Mw=`#ifdef USE_ENVMAP +}`,RC=`#ifdef USE_ENVMAP #ifdef ENV_WORLDPOS vec3 cameraToFrag; if ( isOrthographic ) { @@ -579,7 +585,7 @@ vec4 sRGBTransferOETF( in vec4 value ) { #elif defined( ENVMAP_BLENDING_ADD ) outgoingLight += envColor.xyz * specularStrength * reflectivity; #endif -#endif`,Nw=`#ifdef USE_ENVMAP +#endif`,zC=`#ifdef USE_ENVMAP uniform float envMapIntensity; uniform float flipEnvMap; uniform mat3 envMapRotation; @@ -589,7 +595,7 @@ vec4 sRGBTransferOETF( in vec4 value ) { uniform sampler2D envMap; #endif -#endif`,Pw=`#ifdef USE_ENVMAP +#endif`,BC=`#ifdef USE_ENVMAP uniform float reflectivity; #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT ) #define ENV_WORLDPOS @@ -600,7 +606,7 @@ vec4 sRGBTransferOETF( in vec4 value ) { #else varying vec3 vReflect; #endif -#endif`,Fw=`#ifdef USE_ENVMAP +#endif`,VC=`#ifdef USE_ENVMAP #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT ) #define ENV_WORLDPOS #endif @@ -611,7 +617,7 @@ vec4 sRGBTransferOETF( in vec4 value ) { varying vec3 vReflect; uniform float refractionRatio; #endif -#endif`,Iw=`#ifdef USE_ENVMAP +#endif`,HC=`#ifdef USE_ENVMAP #ifdef ENV_WORLDPOS vWorldPosition = worldPosition.xyz; #else @@ -628,18 +634,18 @@ vec4 sRGBTransferOETF( in vec4 value ) { vReflect = refract( cameraToVertex, worldNormal, refractionRatio ); #endif #endif -#endif`,Lw=`#ifdef USE_FOG +#endif`,UC=`#ifdef USE_FOG vFogDepth = - mvPosition.z; -#endif`,Rw=`#ifdef USE_FOG +#endif`,WC=`#ifdef USE_FOG varying float vFogDepth; -#endif`,zw=`#ifdef USE_FOG +#endif`,GC=`#ifdef USE_FOG #ifdef FOG_EXP2 float fogFactor = 1.0 - exp( - fogDensity * fogDensity * vFogDepth * vFogDepth ); #else float fogFactor = smoothstep( fogNear, fogFar, vFogDepth ); #endif gl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor ); -#endif`,Bw=`#ifdef USE_FOG +#endif`,KC=`#ifdef USE_FOG uniform vec3 fogColor; varying float vFogDepth; #ifdef FOG_EXP2 @@ -648,7 +654,7 @@ vec4 sRGBTransferOETF( in vec4 value ) { uniform float fogNear; uniform float fogFar; #endif -#endif`,Vw=`#ifdef USE_GRADIENTMAP +#endif`,qC=`#ifdef USE_GRADIENTMAP uniform sampler2D gradientMap; #endif vec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) { @@ -660,12 +666,12 @@ vec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) { vec2 fw = fwidth( coord ) * 0.5; return mix( vec3( 0.7 ), vec3( 1.0 ), smoothstep( 0.7 - fw.x, 0.7 + fw.x, coord.x ) ); #endif -}`,Hw=`#ifdef USE_LIGHTMAP +}`,JC=`#ifdef USE_LIGHTMAP uniform sampler2D lightMap; uniform float lightMapIntensity; -#endif`,Uw=`LambertMaterial material; +#endif`,YC=`LambertMaterial material; material.diffuseColor = diffuseColor.rgb; -material.specularStrength = specularStrength;`,Ww=`varying vec3 vViewPosition; +material.specularStrength = specularStrength;`,XC=`varying vec3 vViewPosition; struct LambertMaterial { vec3 diffuseColor; float specularStrength; @@ -679,7 +685,7 @@ void RE_IndirectDiffuse_Lambert( const in vec3 irradiance, const in vec3 geometr reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); } #define RE_Direct RE_Direct_Lambert -#define RE_IndirectDiffuse RE_IndirectDiffuse_Lambert`,Gw=`uniform bool receiveShadow; +#define RE_IndirectDiffuse RE_IndirectDiffuse_Lambert`,ZC=`uniform bool receiveShadow; uniform vec3 ambientLightColor; #if defined( USE_LIGHT_PROBES ) uniform vec3 lightProbe[ 9 ]; @@ -795,7 +801,7 @@ float getSpotAttenuation( const in float coneCosine, const in float penumbraCosi vec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight ); return irradiance; } -#endif`,Kw=`#ifdef USE_ENVMAP +#endif`,QC=`#ifdef USE_ENVMAP vec3 getIBLIrradiance( const in vec3 normal ) { #ifdef ENVMAP_TYPE_CUBE_UV vec3 worldNormal = inverseTransformDirection( normal, viewMatrix ); @@ -828,8 +834,8 @@ float getSpotAttenuation( const in float coneCosine, const in float penumbraCosi #endif } #endif -#endif`,qw=`ToonMaterial material; -material.diffuseColor = diffuseColor.rgb;`,Jw=`varying vec3 vViewPosition; +#endif`,$C=`ToonMaterial material; +material.diffuseColor = diffuseColor.rgb;`,ew=`varying vec3 vViewPosition; struct ToonMaterial { vec3 diffuseColor; }; @@ -841,11 +847,11 @@ void RE_IndirectDiffuse_Toon( const in vec3 irradiance, const in vec3 geometryPo reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); } #define RE_Direct RE_Direct_Toon -#define RE_IndirectDiffuse RE_IndirectDiffuse_Toon`,Yw=`BlinnPhongMaterial material; +#define RE_IndirectDiffuse RE_IndirectDiffuse_Toon`,tw=`BlinnPhongMaterial material; material.diffuseColor = diffuseColor.rgb; material.specularColor = specular; material.specularShininess = shininess; -material.specularStrength = specularStrength;`,Xw=`varying vec3 vViewPosition; +material.specularStrength = specularStrength;`,nw=`varying vec3 vViewPosition; struct BlinnPhongMaterial { vec3 diffuseColor; vec3 specularColor; @@ -862,7 +868,7 @@ void RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in vec3 geom reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); } #define RE_Direct RE_Direct_BlinnPhong -#define RE_IndirectDiffuse RE_IndirectDiffuse_BlinnPhong`,Zw=`PhysicalMaterial material; +#define RE_IndirectDiffuse RE_IndirectDiffuse_BlinnPhong`,rw=`PhysicalMaterial material; material.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor ); vec3 dxy = max( abs( dFdx( nonPerturbedNormal ) ), abs( dFdy( nonPerturbedNormal ) ) ); float geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z ); @@ -948,7 +954,7 @@ material.roughness = min( material.roughness, 1.0 ); material.alphaT = mix( pow2( material.roughness ), 1.0, pow2( material.anisotropy ) ); material.anisotropyT = tbn[ 0 ] * anisotropyV.x + tbn[ 1 ] * anisotropyV.y; material.anisotropyB = tbn[ 1 ] * anisotropyV.x - tbn[ 0 ] * anisotropyV.y; -#endif`,Qw=`struct PhysicalMaterial { +#endif`,iw=`struct PhysicalMaterial { vec3 diffuseColor; float roughness; vec3 specularColor; @@ -1249,7 +1255,7 @@ void RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 irradia #define RE_IndirectSpecular RE_IndirectSpecular_Physical float computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) { return saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion ); -}`,$w=` +}`,aw=` vec3 geometryPosition = - vViewPosition; vec3 geometryNormal = normal; vec3 geometryViewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition ); @@ -1364,7 +1370,7 @@ IncidentLight directLight; #if defined( RE_IndirectSpecular ) vec3 radiance = vec3( 0.0 ); vec3 clearcoatRadiance = vec3( 0.0 ); -#endif`,eT=`#if defined( RE_IndirectDiffuse ) +#endif`,ow=`#if defined( RE_IndirectDiffuse ) #ifdef USE_LIGHTMAP vec4 lightMapTexel = texture2D( lightMap, vLightMapUv ); vec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity; @@ -1383,32 +1389,32 @@ IncidentLight directLight; #ifdef USE_CLEARCOAT clearcoatRadiance += getIBLRadiance( geometryViewDir, geometryClearcoatNormal, material.clearcoatRoughness ); #endif -#endif`,tT=`#if defined( RE_IndirectDiffuse ) +#endif`,sw=`#if defined( RE_IndirectDiffuse ) RE_IndirectDiffuse( irradiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); #endif #if defined( RE_IndirectSpecular ) RE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); -#endif`,nT=`#if defined( USE_LOGDEPTHBUF ) +#endif`,cw=`#if defined( USE_LOGDEPTHBUF ) gl_FragDepth = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5; -#endif`,rT=`#if defined( USE_LOGDEPTHBUF ) +#endif`,lw=`#if defined( USE_LOGDEPTHBUF ) uniform float logDepthBufFC; varying float vFragDepth; varying float vIsPerspective; -#endif`,iT=`#ifdef USE_LOGDEPTHBUF +#endif`,uw=`#ifdef USE_LOGDEPTHBUF varying float vFragDepth; varying float vIsPerspective; -#endif`,aT=`#ifdef USE_LOGDEPTHBUF +#endif`,dw=`#ifdef USE_LOGDEPTHBUF vFragDepth = 1.0 + gl_Position.w; vIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) ); -#endif`,oT=`#ifdef USE_MAP +#endif`,fw=`#ifdef USE_MAP vec4 sampledDiffuseColor = texture2D( map, vMapUv ); #ifdef DECODE_VIDEO_TEXTURE sampledDiffuseColor = sRGBTransferEOTF( sampledDiffuseColor ); #endif diffuseColor *= sampledDiffuseColor; -#endif`,sT=`#ifdef USE_MAP +#endif`,pw=`#ifdef USE_MAP uniform sampler2D map; -#endif`,cT=`#if defined( USE_MAP ) || defined( USE_ALPHAMAP ) +#endif`,mw=`#if defined( USE_MAP ) || defined( USE_ALPHAMAP ) #if defined( USE_POINTS_UV ) vec2 uv = vUv; #else @@ -1420,7 +1426,7 @@ IncidentLight directLight; #endif #ifdef USE_ALPHAMAP diffuseColor.a *= texture2D( alphaMap, uv ).g; -#endif`,lT=`#if defined( USE_POINTS_UV ) +#endif`,hw=`#if defined( USE_POINTS_UV ) varying vec2 vUv; #else #if defined( USE_MAP ) || defined( USE_ALPHAMAP ) @@ -1432,19 +1438,19 @@ IncidentLight directLight; #endif #ifdef USE_ALPHAMAP uniform sampler2D alphaMap; -#endif`,uT=`float metalnessFactor = metalness; +#endif`,gw=`float metalnessFactor = metalness; #ifdef USE_METALNESSMAP vec4 texelMetalness = texture2D( metalnessMap, vMetalnessMapUv ); metalnessFactor *= texelMetalness.b; -#endif`,dT=`#ifdef USE_METALNESSMAP +#endif`,_w=`#ifdef USE_METALNESSMAP uniform sampler2D metalnessMap; -#endif`,fT=`#ifdef USE_INSTANCING_MORPH +#endif`,vw=`#ifdef USE_INSTANCING_MORPH float morphTargetInfluences[ MORPHTARGETS_COUNT ]; float morphTargetBaseInfluence = texelFetch( morphTexture, ivec2( 0, gl_InstanceID ), 0 ).r; for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { morphTargetInfluences[i] = texelFetch( morphTexture, ivec2( i + 1, gl_InstanceID ), 0 ).r; } -#endif`,pT=`#if defined( USE_MORPHCOLORS ) +#endif`,yw=`#if defined( USE_MORPHCOLORS ) vColor *= morphTargetBaseInfluence; for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { #if defined( USE_COLOR_ALPHA ) @@ -1453,12 +1459,12 @@ IncidentLight directLight; if ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ).rgb * morphTargetInfluences[ i ]; #endif } -#endif`,mT=`#ifdef USE_MORPHNORMALS +#endif`,bw=`#ifdef USE_MORPHNORMALS objectNormal *= morphTargetBaseInfluence; for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { if ( morphTargetInfluences[ i ] != 0.0 ) objectNormal += getMorph( gl_VertexID, i, 1 ).xyz * morphTargetInfluences[ i ]; } -#endif`,hT=`#ifdef USE_MORPHTARGETS +#endif`,xw=`#ifdef USE_MORPHTARGETS #ifndef USE_INSTANCING_MORPH uniform float morphTargetBaseInfluence; uniform float morphTargetInfluences[ MORPHTARGETS_COUNT ]; @@ -1472,12 +1478,12 @@ IncidentLight directLight; ivec3 morphUV = ivec3( x, y, morphTargetIndex ); return texelFetch( morphTargetsTexture, morphUV, 0 ); } -#endif`,gT=`#ifdef USE_MORPHTARGETS +#endif`,Sw=`#ifdef USE_MORPHTARGETS transformed *= morphTargetBaseInfluence; for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { if ( morphTargetInfluences[ i ] != 0.0 ) transformed += getMorph( gl_VertexID, i, 0 ).xyz * morphTargetInfluences[ i ]; } -#endif`,_T=`float faceDirection = gl_FrontFacing ? 1.0 : - 1.0; +#endif`,Cw=`float faceDirection = gl_FrontFacing ? 1.0 : - 1.0; #ifdef FLAT_SHADED vec3 fdx = dFdx( vViewPosition ); vec3 fdy = dFdy( vViewPosition ); @@ -1518,7 +1524,7 @@ IncidentLight directLight; tbn2[1] *= faceDirection; #endif #endif -vec3 nonPerturbedNormal = normal;`,vT=`#ifdef USE_NORMALMAP_OBJECTSPACE +vec3 nonPerturbedNormal = normal;`,ww=`#ifdef USE_NORMALMAP_OBJECTSPACE normal = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0; #ifdef FLIP_SIDED normal = - normal; @@ -1533,25 +1539,25 @@ vec3 nonPerturbedNormal = normal;`,vT=`#ifdef USE_NORMALMAP_OBJECTSPACE normal = normalize( tbn * mapN ); #elif defined( USE_BUMPMAP ) normal = perturbNormalArb( - vViewPosition, normal, dHdxy_fwd(), faceDirection ); -#endif`,yT=`#ifndef FLAT_SHADED +#endif`,Tw=`#ifndef FLAT_SHADED varying vec3 vNormal; #ifdef USE_TANGENT varying vec3 vTangent; varying vec3 vBitangent; #endif -#endif`,bT=`#ifndef FLAT_SHADED +#endif`,Ew=`#ifndef FLAT_SHADED varying vec3 vNormal; #ifdef USE_TANGENT varying vec3 vTangent; varying vec3 vBitangent; #endif -#endif`,xT=`#ifndef FLAT_SHADED +#endif`,Dw=`#ifndef FLAT_SHADED vNormal = normalize( transformedNormal ); #ifdef USE_TANGENT vTangent = normalize( transformedTangent ); vBitangent = normalize( cross( vNormal, vTangent ) * tangent.w ); #endif -#endif`,ST=`#ifdef USE_NORMALMAP +#endif`,Ow=`#ifdef USE_NORMALMAP uniform sampler2D normalMap; uniform vec2 normalScale; #endif @@ -1573,13 +1579,13 @@ vec3 nonPerturbedNormal = normal;`,vT=`#ifdef USE_NORMALMAP_OBJECTSPACE float scale = ( det == 0.0 ) ? 0.0 : inversesqrt( det ); return mat3( T * scale, B * scale, N ); } -#endif`,CT=`#ifdef USE_CLEARCOAT +#endif`,kw=`#ifdef USE_CLEARCOAT vec3 clearcoatNormal = nonPerturbedNormal; -#endif`,wT=`#ifdef USE_CLEARCOAT_NORMALMAP +#endif`,Aw=`#ifdef USE_CLEARCOAT_NORMALMAP vec3 clearcoatMapN = texture2D( clearcoatNormalMap, vClearcoatNormalMapUv ).xyz * 2.0 - 1.0; clearcoatMapN.xy *= clearcoatNormalScale; clearcoatNormal = normalize( tbn2 * clearcoatMapN ); -#endif`,TT=`#ifdef USE_CLEARCOATMAP +#endif`,jw=`#ifdef USE_CLEARCOATMAP uniform sampler2D clearcoatMap; #endif #ifdef USE_CLEARCOAT_NORMALMAP @@ -1588,18 +1594,18 @@ vec3 nonPerturbedNormal = normal;`,vT=`#ifdef USE_NORMALMAP_OBJECTSPACE #endif #ifdef USE_CLEARCOAT_ROUGHNESSMAP uniform sampler2D clearcoatRoughnessMap; -#endif`,ET=`#ifdef USE_IRIDESCENCEMAP +#endif`,Mw=`#ifdef USE_IRIDESCENCEMAP uniform sampler2D iridescenceMap; #endif #ifdef USE_IRIDESCENCE_THICKNESSMAP uniform sampler2D iridescenceThicknessMap; -#endif`,DT=`#ifdef OPAQUE +#endif`,Nw=`#ifdef OPAQUE diffuseColor.a = 1.0; #endif #ifdef USE_TRANSMISSION diffuseColor.a *= material.transmissionAlpha; #endif -gl_FragColor = vec4( outgoingLight, diffuseColor.a );`,OT=`vec3 packNormalToRGB( const in vec3 normal ) { +gl_FragColor = vec4( outgoingLight, diffuseColor.a );`,Pw=`vec3 packNormalToRGB( const in vec3 normal ) { return normalize( normal ) * 0.5 + 0.5; } vec3 unpackRGBToNormal( const in vec3 rgb ) { @@ -1668,9 +1674,9 @@ float viewZToPerspectiveDepth( const in float viewZ, const in float near, const } float perspectiveDepthToViewZ( const in float depth, const in float near, const in float far ) { return ( near * far ) / ( ( far - near ) * depth - far ); -}`,kT=`#ifdef PREMULTIPLIED_ALPHA +}`,Fw=`#ifdef PREMULTIPLIED_ALPHA gl_FragColor.rgb *= gl_FragColor.a; -#endif`,AT=`vec4 mvPosition = vec4( transformed, 1.0 ); +#endif`,Iw=`vec4 mvPosition = vec4( transformed, 1.0 ); #ifdef USE_BATCHING mvPosition = batchingMatrix * mvPosition; #endif @@ -1678,22 +1684,22 @@ float perspectiveDepthToViewZ( const in float depth, const in float near, const mvPosition = instanceMatrix * mvPosition; #endif mvPosition = modelViewMatrix * mvPosition; -gl_Position = projectionMatrix * mvPosition;`,jT=`#ifdef DITHERING +gl_Position = projectionMatrix * mvPosition;`,Lw=`#ifdef DITHERING gl_FragColor.rgb = dithering( gl_FragColor.rgb ); -#endif`,MT=`#ifdef DITHERING +#endif`,Rw=`#ifdef DITHERING vec3 dithering( vec3 color ) { float grid_position = rand( gl_FragCoord.xy ); vec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 ); dither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position ); return color + dither_shift_RGB; } -#endif`,NT=`float roughnessFactor = roughness; +#endif`,zw=`float roughnessFactor = roughness; #ifdef USE_ROUGHNESSMAP vec4 texelRoughness = texture2D( roughnessMap, vRoughnessMapUv ); roughnessFactor *= texelRoughness.g; -#endif`,PT=`#ifdef USE_ROUGHNESSMAP +#endif`,Bw=`#ifdef USE_ROUGHNESSMAP uniform sampler2D roughnessMap; -#endif`,FT=`#if NUM_SPOT_LIGHT_COORDS > 0 +#endif`,Vw=`#if NUM_SPOT_LIGHT_COORDS > 0 varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ]; #endif #if NUM_SPOT_LIGHT_MAPS > 0 @@ -1879,7 +1885,7 @@ gl_Position = projectionMatrix * mvPosition;`,jT=`#ifdef DITHERING } return mix( 1.0, shadow, shadowIntensity ); } -#endif`,IT=`#if NUM_SPOT_LIGHT_COORDS > 0 +#endif`,Hw=`#if NUM_SPOT_LIGHT_COORDS > 0 uniform mat4 spotLightMatrix[ NUM_SPOT_LIGHT_COORDS ]; varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ]; #endif @@ -1920,7 +1926,7 @@ gl_Position = projectionMatrix * mvPosition;`,jT=`#ifdef DITHERING }; uniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ]; #endif -#endif`,LT=`#if ( defined( USE_SHADOWMAP ) && ( NUM_DIR_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0 ) ) || ( NUM_SPOT_LIGHT_COORDS > 0 ) +#endif`,Uw=`#if ( defined( USE_SHADOWMAP ) && ( NUM_DIR_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0 ) ) || ( NUM_SPOT_LIGHT_COORDS > 0 ) vec3 shadowWorldNormal = inverseTransformDirection( transformedNormal, viewMatrix ); vec4 shadowWorldPosition; #endif @@ -1952,7 +1958,7 @@ gl_Position = projectionMatrix * mvPosition;`,jT=`#ifdef DITHERING vSpotLightCoord[ i ] = spotLightMatrix[ i ] * shadowWorldPosition; } #pragma unroll_loop_end -#endif`,RT=`float getShadowMask() { +#endif`,Ww=`float getShadowMask() { float shadow = 1.0; #ifdef USE_SHADOWMAP #if NUM_DIR_LIGHT_SHADOWS > 0 @@ -1984,12 +1990,12 @@ gl_Position = projectionMatrix * mvPosition;`,jT=`#ifdef DITHERING #endif #endif return shadow; -}`,zT=`#ifdef USE_SKINNING +}`,Gw=`#ifdef USE_SKINNING mat4 boneMatX = getBoneMatrix( skinIndex.x ); mat4 boneMatY = getBoneMatrix( skinIndex.y ); mat4 boneMatZ = getBoneMatrix( skinIndex.z ); mat4 boneMatW = getBoneMatrix( skinIndex.w ); -#endif`,BT=`#ifdef USE_SKINNING +#endif`,Kw=`#ifdef USE_SKINNING uniform mat4 bindMatrix; uniform mat4 bindMatrixInverse; uniform highp sampler2D boneTexture; @@ -2004,7 +2010,7 @@ gl_Position = projectionMatrix * mvPosition;`,jT=`#ifdef DITHERING vec4 v4 = texelFetch( boneTexture, ivec2( x + 3, y ), 0 ); return mat4( v1, v2, v3, v4 ); } -#endif`,VT=`#ifdef USE_SKINNING +#endif`,qw=`#ifdef USE_SKINNING vec4 skinVertex = bindMatrix * vec4( transformed, 1.0 ); vec4 skinned = vec4( 0.0 ); skinned += boneMatX * skinVertex * skinWeight.x; @@ -2012,7 +2018,7 @@ gl_Position = projectionMatrix * mvPosition;`,jT=`#ifdef DITHERING skinned += boneMatZ * skinVertex * skinWeight.z; skinned += boneMatW * skinVertex * skinWeight.w; transformed = ( bindMatrixInverse * skinned ).xyz; -#endif`,HT=`#ifdef USE_SKINNING +#endif`,Jw=`#ifdef USE_SKINNING mat4 skinMatrix = mat4( 0.0 ); skinMatrix += skinWeight.x * boneMatX; skinMatrix += skinWeight.y * boneMatY; @@ -2023,17 +2029,17 @@ gl_Position = projectionMatrix * mvPosition;`,jT=`#ifdef DITHERING #ifdef USE_TANGENT objectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz; #endif -#endif`,UT=`float specularStrength; +#endif`,Yw=`float specularStrength; #ifdef USE_SPECULARMAP vec4 texelSpecular = texture2D( specularMap, vSpecularMapUv ); specularStrength = texelSpecular.r; #else specularStrength = 1.0; -#endif`,WT=`#ifdef USE_SPECULARMAP +#endif`,Xw=`#ifdef USE_SPECULARMAP uniform sampler2D specularMap; -#endif`,GT=`#if defined( TONE_MAPPING ) +#endif`,Zw=`#if defined( TONE_MAPPING ) gl_FragColor.rgb = toneMapping( gl_FragColor.rgb ); -#endif`,KT=`#ifndef saturate +#endif`,Qw=`#ifndef saturate #define saturate( a ) clamp( a, 0.0, 1.0 ) #endif uniform float toneMappingExposure; @@ -2130,7 +2136,7 @@ vec3 NeutralToneMapping( vec3 color ) { float g = 1. - 1. / ( Desaturation * ( peak - newPeak ) + 1. ); return mix( color, vec3( newPeak ), g ); } -vec3 CustomToneMapping( vec3 color ) { return color; }`,qT=`#ifdef USE_TRANSMISSION +vec3 CustomToneMapping( vec3 color ) { return color; }`,$w=`#ifdef USE_TRANSMISSION material.transmission = transmission; material.transmissionAlpha = 1.0; material.thickness = thickness; @@ -2151,7 +2157,7 @@ vec3 CustomToneMapping( vec3 color ) { return color; }`,qT=`#ifdef USE_TRANSMISS material.attenuationColor, material.attenuationDistance ); material.transmissionAlpha = mix( material.transmissionAlpha, transmitted.a, material.transmission ); totalDiffuse = mix( totalDiffuse, transmitted.rgb, material.transmission ); -#endif`,JT=`#ifdef USE_TRANSMISSION +#endif`,eT=`#ifdef USE_TRANSMISSION uniform float transmission; uniform float thickness; uniform float attenuationDistance; @@ -2277,7 +2283,7 @@ vec3 CustomToneMapping( vec3 color ) { return color; }`,qT=`#ifdef USE_TRANSMISS float transmittanceFactor = ( transmittance.r + transmittance.g + transmittance.b ) / 3.0; return vec4( ( 1.0 - F ) * attenuatedColor, 1.0 - ( 1.0 - transmittedLight.a ) * transmittanceFactor ); } -#endif`,YT=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) +#endif`,tT=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) varying vec2 vUv; #endif #ifdef USE_MAP @@ -2347,7 +2353,7 @@ vec3 CustomToneMapping( vec3 color ) { return color; }`,qT=`#ifdef USE_TRANSMISS #ifdef USE_THICKNESSMAP uniform mat3 thicknessMapTransform; varying vec2 vThicknessMapUv; -#endif`,XT=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) +#endif`,nT=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) varying vec2 vUv; #endif #ifdef USE_MAP @@ -2441,7 +2447,7 @@ vec3 CustomToneMapping( vec3 color ) { return color; }`,qT=`#ifdef USE_TRANSMISS #ifdef USE_THICKNESSMAP uniform mat3 thicknessMapTransform; varying vec2 vThicknessMapUv; -#endif`,ZT=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) +#endif`,rT=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) vUv = vec3( uv, 1 ).xy; #endif #ifdef USE_MAP @@ -2512,7 +2518,7 @@ vec3 CustomToneMapping( vec3 color ) { return color; }`,qT=`#ifdef USE_TRANSMISS #endif #ifdef USE_THICKNESSMAP vThicknessMapUv = ( thicknessMapTransform * vec3( THICKNESSMAP_UV, 1 ) ).xy; -#endif`,QT=`#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION ) || NUM_SPOT_LIGHT_COORDS > 0 +#endif`,iT=`#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION ) || NUM_SPOT_LIGHT_COORDS > 0 vec4 worldPosition = vec4( transformed, 1.0 ); #ifdef USE_BATCHING worldPosition = batchingMatrix * worldPosition; @@ -2521,12 +2527,12 @@ vec3 CustomToneMapping( vec3 color ) { return color; }`,qT=`#ifdef USE_TRANSMISS worldPosition = instanceMatrix * worldPosition; #endif worldPosition = modelMatrix * worldPosition; -#endif`;const $T=`varying vec2 vUv; +#endif`;const aT=`varying vec2 vUv; uniform mat3 uvTransform; void main() { vUv = ( uvTransform * vec3( uv, 1 ) ).xy; gl_Position = vec4( position.xy, 1.0, 1.0 ); -}`,eE=`uniform sampler2D t2D; +}`,oT=`uniform sampler2D t2D; uniform float backgroundIntensity; varying vec2 vUv; void main() { @@ -2538,14 +2544,14 @@ void main() { gl_FragColor = texColor; #include #include -}`,tE=`varying vec3 vWorldDirection; +}`,sT=`varying vec3 vWorldDirection; #include void main() { vWorldDirection = transformDirection( position, modelMatrix ); #include #include gl_Position.z = gl_Position.w; -}`,nE=`#ifdef ENVMAP_TYPE_CUBE +}`,cT=`#ifdef ENVMAP_TYPE_CUBE uniform samplerCube envMap; #elif defined( ENVMAP_TYPE_CUBE_UV ) uniform sampler2D envMap; @@ -2568,14 +2574,14 @@ void main() { gl_FragColor = texColor; #include #include -}`,rE=`varying vec3 vWorldDirection; +}`,lT=`varying vec3 vWorldDirection; #include void main() { vWorldDirection = transformDirection( position, modelMatrix ); #include #include gl_Position.z = gl_Position.w; -}`,iE=`uniform samplerCube tCube; +}`,uT=`uniform samplerCube tCube; uniform float tFlip; uniform float opacity; varying vec3 vWorldDirection; @@ -2585,7 +2591,7 @@ void main() { gl_FragColor.a *= opacity; #include #include -}`,aE=`#include +}`,dT=`#include #include #include #include @@ -2612,7 +2618,7 @@ void main() { #include #include vHighPrecisionZW = gl_Position.zw; -}`,oE=`#if DEPTH_PACKING == 3200 +}`,fT=`#if DEPTH_PACKING == 3200 uniform float opacity; #endif #include @@ -2646,7 +2652,7 @@ void main() { #elif DEPTH_PACKING == 3203 gl_FragColor = vec4( packDepthToRG( fragCoordZ ), 0.0, 1.0 ); #endif -}`,sE=`#define DISTANCE +}`,pT=`#define DISTANCE varying vec3 vWorldPosition; #include #include @@ -2673,7 +2679,7 @@ void main() { #include #include vWorldPosition = worldPosition.xyz; -}`,cE=`#define DISTANCE +}`,mT=`#define DISTANCE uniform vec3 referencePosition; uniform float nearDistance; uniform float farDistance; @@ -2697,13 +2703,13 @@ void main () { dist = ( dist - nearDistance ) / ( farDistance - nearDistance ); dist = saturate( dist ); gl_FragColor = packDepthToRGBA( dist ); -}`,lE=`varying vec3 vWorldDirection; +}`,hT=`varying vec3 vWorldDirection; #include void main() { vWorldDirection = transformDirection( position, modelMatrix ); #include #include -}`,uE=`uniform sampler2D tEquirect; +}`,gT=`uniform sampler2D tEquirect; varying vec3 vWorldDirection; #include void main() { @@ -2712,7 +2718,7 @@ void main() { gl_FragColor = texture2D( tEquirect, sampleUV ); #include #include -}`,dE=`uniform float scale; +}`,_T=`uniform float scale; attribute float lineDistance; varying float vLineDistance; #include @@ -2734,7 +2740,7 @@ void main() { #include #include #include -}`,fE=`uniform vec3 diffuse; +}`,vT=`uniform vec3 diffuse; uniform float opacity; uniform float dashSize; uniform float totalSize; @@ -2762,7 +2768,7 @@ void main() { #include #include #include -}`,pE=`#include +}`,yT=`#include #include #include #include @@ -2794,7 +2800,7 @@ void main() { #include #include #include -}`,mE=`uniform vec3 diffuse; +}`,bT=`uniform vec3 diffuse; uniform float opacity; #ifndef FLAT_SHADED varying vec3 vNormal; @@ -2842,7 +2848,7 @@ void main() { #include #include #include -}`,hE=`#define LAMBERT +}`,xT=`#define LAMBERT varying vec3 vViewPosition; #include #include @@ -2881,7 +2887,7 @@ void main() { #include #include #include -}`,gE=`#define LAMBERT +}`,ST=`#define LAMBERT uniform vec3 diffuse; uniform vec3 emissive; uniform float opacity; @@ -2938,7 +2944,7 @@ void main() { #include #include #include -}`,_E=`#define MATCAP +}`,CT=`#define MATCAP varying vec3 vViewPosition; #include #include @@ -2972,7 +2978,7 @@ void main() { #include #include vViewPosition = - mvPosition.xyz; -}`,vE=`#define MATCAP +}`,wT=`#define MATCAP uniform vec3 diffuse; uniform float opacity; uniform sampler2D matcap; @@ -3018,7 +3024,7 @@ void main() { #include #include #include -}`,yE=`#define NORMAL +}`,TT=`#define NORMAL #if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE ) varying vec3 vViewPosition; #endif @@ -3051,7 +3057,7 @@ void main() { #if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE ) vViewPosition = - mvPosition.xyz; #endif -}`,bE=`#define NORMAL +}`,ET=`#define NORMAL uniform float opacity; #if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE ) varying vec3 vViewPosition; @@ -3073,7 +3079,7 @@ void main() { #ifdef OPAQUE gl_FragColor.a = 1.0; #endif -}`,xE=`#define PHONG +}`,DT=`#define PHONG varying vec3 vViewPosition; #include #include @@ -3112,7 +3118,7 @@ void main() { #include #include #include -}`,SE=`#define PHONG +}`,OT=`#define PHONG uniform vec3 diffuse; uniform vec3 emissive; uniform vec3 specular; @@ -3171,7 +3177,7 @@ void main() { #include #include #include -}`,CE=`#define STANDARD +}`,kT=`#define STANDARD varying vec3 vViewPosition; #ifdef USE_TRANSMISSION varying vec3 vWorldPosition; @@ -3214,7 +3220,7 @@ void main() { #ifdef USE_TRANSMISSION vWorldPosition = worldPosition.xyz; #endif -}`,wE=`#define STANDARD +}`,AT=`#define STANDARD #ifdef PHYSICAL #define IOR #define USE_SPECULAR @@ -3339,7 +3345,7 @@ void main() { #include #include #include -}`,TE=`#define TOON +}`,jT=`#define TOON varying vec3 vViewPosition; #include #include @@ -3376,7 +3382,7 @@ void main() { #include #include #include -}`,EE=`#define TOON +}`,MT=`#define TOON uniform vec3 diffuse; uniform vec3 emissive; uniform float opacity; @@ -3429,7 +3435,7 @@ void main() { #include #include #include -}`,DE=`uniform float size; +}`,NT=`uniform float size; uniform float scale; #include #include @@ -3460,7 +3466,7 @@ void main() { #include #include #include -}`,OE=`uniform vec3 diffuse; +}`,PT=`uniform vec3 diffuse; uniform float opacity; #include #include @@ -3485,7 +3491,7 @@ void main() { #include #include #include -}`,kE=`#include +}`,FT=`#include #include #include #include @@ -3508,7 +3514,7 @@ void main() { #include #include #include -}`,AE=`uniform vec3 color; +}`,IT=`uniform vec3 color; uniform float opacity; #include #include @@ -3524,7 +3530,7 @@ void main() { #include #include #include -}`,jE=`uniform float rotation; +}`,LT=`uniform float rotation; uniform vec2 center; #include #include @@ -3548,7 +3554,7 @@ void main() { #include #include #include -}`,ME=`uniform vec3 diffuse; +}`,RT=`uniform vec3 diffuse; uniform float opacity; #include #include @@ -3573,7 +3579,7 @@ void main() { #include #include #include -}`,NE={alphahash_fragment:ew,alphahash_pars_fragment:tw,alphamap_fragment:nw,alphamap_pars_fragment:rw,alphatest_fragment:iw,alphatest_pars_fragment:aw,aomap_fragment:ow,aomap_pars_fragment:sw,batching_pars_vertex:cw,batching_vertex:lw,begin_vertex:uw,beginnormal_vertex:dw,bsdfs:fw,iridescence_fragment:pw,bumpmap_pars_fragment:mw,clipping_planes_fragment:hw,clipping_planes_pars_fragment:gw,clipping_planes_pars_vertex:_w,clipping_planes_vertex:vw,color_fragment:yw,color_pars_fragment:bw,color_pars_vertex:xw,color_vertex:Sw,common:Cw,cube_uv_reflection_fragment:ww,defaultnormal_vertex:Tw,displacementmap_pars_vertex:Ew,displacementmap_vertex:Dw,emissivemap_fragment:Ow,emissivemap_pars_fragment:kw,colorspace_fragment:Aw,colorspace_pars_fragment:jw,envmap_fragment:Mw,envmap_common_pars_fragment:Nw,envmap_pars_fragment:Pw,envmap_pars_vertex:Fw,envmap_physical_pars_fragment:Kw,envmap_vertex:Iw,fog_vertex:Lw,fog_pars_vertex:Rw,fog_fragment:zw,fog_pars_fragment:Bw,gradientmap_pars_fragment:Vw,lightmap_pars_fragment:Hw,lights_lambert_fragment:Uw,lights_lambert_pars_fragment:Ww,lights_pars_begin:Gw,lights_toon_fragment:qw,lights_toon_pars_fragment:Jw,lights_phong_fragment:Yw,lights_phong_pars_fragment:Xw,lights_physical_fragment:Zw,lights_physical_pars_fragment:Qw,lights_fragment_begin:$w,lights_fragment_maps:eT,lights_fragment_end:tT,logdepthbuf_fragment:nT,logdepthbuf_pars_fragment:rT,logdepthbuf_pars_vertex:iT,logdepthbuf_vertex:aT,map_fragment:oT,map_pars_fragment:sT,map_particle_fragment:cT,map_particle_pars_fragment:lT,metalnessmap_fragment:uT,metalnessmap_pars_fragment:dT,morphinstance_vertex:fT,morphcolor_vertex:pT,morphnormal_vertex:mT,morphtarget_pars_vertex:hT,morphtarget_vertex:gT,normal_fragment_begin:_T,normal_fragment_maps:vT,normal_pars_fragment:yT,normal_pars_vertex:bT,normal_vertex:xT,normalmap_pars_fragment:ST,clearcoat_normal_fragment_begin:CT,clearcoat_normal_fragment_maps:wT,clearcoat_pars_fragment:TT,iridescence_pars_fragment:ET,opaque_fragment:DT,packing:OT,premultiplied_alpha_fragment:kT,project_vertex:AT,dithering_fragment:jT,dithering_pars_fragment:MT,roughnessmap_fragment:NT,roughnessmap_pars_fragment:PT,shadowmap_pars_fragment:FT,shadowmap_pars_vertex:IT,shadowmap_vertex:LT,shadowmask_pars_fragment:RT,skinbase_vertex:zT,skinning_pars_vertex:BT,skinning_vertex:VT,skinnormal_vertex:HT,specularmap_fragment:UT,specularmap_pars_fragment:WT,tonemapping_fragment:GT,tonemapping_pars_fragment:KT,transmission_fragment:qT,transmission_pars_fragment:JT,uv_pars_fragment:YT,uv_pars_vertex:XT,uv_vertex:ZT,worldpos_vertex:QT,background_vert:$T,background_frag:eE,backgroundCube_vert:tE,backgroundCube_frag:nE,cube_vert:rE,cube_frag:iE,depth_vert:aE,depth_frag:oE,distanceRGBA_vert:sE,distanceRGBA_frag:cE,equirect_vert:lE,equirect_frag:uE,linedashed_vert:dE,linedashed_frag:fE,meshbasic_vert:pE,meshbasic_frag:mE,meshlambert_vert:hE,meshlambert_frag:gE,meshmatcap_vert:_E,meshmatcap_frag:vE,meshnormal_vert:yE,meshnormal_frag:bE,meshphong_vert:xE,meshphong_frag:SE,meshphysical_vert:CE,meshphysical_frag:wE,meshtoon_vert:TE,meshtoon_frag:EE,points_vert:DE,points_frag:OE,shadow_vert:kE,shadow_frag:AE,sprite_vert:jE,sprite_frag:ME},J={common:{diffuse:{value:new K(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new Up},alphaMap:{value:null},alphaMapTransform:{value:new Up},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new Up}},envmap:{envMap:{value:null},envMapRotation:{value:new Up},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new Up}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new Up}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new Up},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new Up},normalScale:{value:new U(1,1)}},displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new Up},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new Up}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new Up}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new Up}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new K(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotLightMap:{value:[]},spotShadowMap:{value:[]},spotLightMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}},ltc_1:{value:null},ltc_2:{value:null}},points:{diffuse:{value:new K(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaMapTransform:{value:new Up},alphaTest:{value:0},uvTransform:{value:new Up}},sprite:{diffuse:{value:new K(16777215)},opacity:{value:1},center:{value:new U(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new Up},alphaMap:{value:null},alphaMapTransform:{value:new Up},alphaTest:{value:0}}},PE={basic:{uniforms:jg([J.common,J.specularmap,J.envmap,J.aomap,J.lightmap,J.fog]),vertexShader:NE.meshbasic_vert,fragmentShader:NE.meshbasic_frag},lambert:{uniforms:jg([J.common,J.specularmap,J.envmap,J.aomap,J.lightmap,J.emissivemap,J.bumpmap,J.normalmap,J.displacementmap,J.fog,J.lights,{emissive:{value:new K(0)}}]),vertexShader:NE.meshlambert_vert,fragmentShader:NE.meshlambert_frag},phong:{uniforms:jg([J.common,J.specularmap,J.envmap,J.aomap,J.lightmap,J.emissivemap,J.bumpmap,J.normalmap,J.displacementmap,J.fog,J.lights,{emissive:{value:new K(0)},specular:{value:new K(1118481)},shininess:{value:30}}]),vertexShader:NE.meshphong_vert,fragmentShader:NE.meshphong_frag},standard:{uniforms:jg([J.common,J.envmap,J.aomap,J.lightmap,J.emissivemap,J.bumpmap,J.normalmap,J.displacementmap,J.roughnessmap,J.metalnessmap,J.fog,J.lights,{emissive:{value:new K(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:NE.meshphysical_vert,fragmentShader:NE.meshphysical_frag},toon:{uniforms:jg([J.common,J.aomap,J.lightmap,J.emissivemap,J.bumpmap,J.normalmap,J.displacementmap,J.gradientmap,J.fog,J.lights,{emissive:{value:new K(0)}}]),vertexShader:NE.meshtoon_vert,fragmentShader:NE.meshtoon_frag},matcap:{uniforms:jg([J.common,J.bumpmap,J.normalmap,J.displacementmap,J.fog,{matcap:{value:null}}]),vertexShader:NE.meshmatcap_vert,fragmentShader:NE.meshmatcap_frag},points:{uniforms:jg([J.points,J.fog]),vertexShader:NE.points_vert,fragmentShader:NE.points_frag},dashed:{uniforms:jg([J.common,J.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:NE.linedashed_vert,fragmentShader:NE.linedashed_frag},depth:{uniforms:jg([J.common,J.displacementmap]),vertexShader:NE.depth_vert,fragmentShader:NE.depth_frag},normal:{uniforms:jg([J.common,J.bumpmap,J.normalmap,J.displacementmap,{opacity:{value:1}}]),vertexShader:NE.meshnormal_vert,fragmentShader:NE.meshnormal_frag},sprite:{uniforms:jg([J.sprite,J.fog]),vertexShader:NE.sprite_vert,fragmentShader:NE.sprite_frag},background:{uniforms:{uvTransform:{value:new Up},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:NE.background_vert,fragmentShader:NE.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1},backgroundRotation:{value:new Up}},vertexShader:NE.backgroundCube_vert,fragmentShader:NE.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:NE.cube_vert,fragmentShader:NE.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:NE.equirect_vert,fragmentShader:NE.equirect_frag},distanceRGBA:{uniforms:jg([J.common,J.displacementmap,{referencePosition:{value:new W},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:NE.distanceRGBA_vert,fragmentShader:NE.distanceRGBA_frag},shadow:{uniforms:jg([J.lights,J.fog,{color:{value:new K(0)},opacity:{value:1}}]),vertexShader:NE.shadow_vert,fragmentShader:NE.shadow_frag}};PE.physical={uniforms:jg([PE.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new Up},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new Up},clearcoatNormalScale:{value:new U(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new Up},dispersion:{value:0},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new Up},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new Up},sheen:{value:0},sheenColor:{value:new K(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new Up},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new Up},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new Up},transmissionSamplerSize:{value:new U},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new Up},attenuationDistance:{value:0},attenuationColor:{value:new K(0)},specularColor:{value:new K(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new Up},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new Up},anisotropyVector:{value:new U},anisotropyMap:{value:null},anisotropyMapTransform:{value:new Up}}]),vertexShader:NE.meshphysical_vert,fragmentShader:NE.meshphysical_frag};const FE={r:0,b:0,g:0},IE=new ih,LE=new G;function RE(e,t,n,r,i,a,o){let s=new K(0),c=a===!0?0:1,l,u,d=null,f=0,p=null;function m(e){let r=e.isScene===!0?e.background:null;if(r&&r.isTexture){let i=e.backgroundBlurriness>0;r=(i?n:t).get(r)}return r}function h(t){let n=!1,i=m(t);i===null?_(s,c):i&&i.isColor&&(_(i,1),n=!0);let a=e.xr.getEnvironmentBlendMode();a===`additive`?r.buffers.color.setClear(0,0,0,1,o):a===`alpha-blend`&&r.buffers.color.setClear(0,0,0,0,o),(e.autoClear||n)&&(r.buffers.depth.setTest(!0),r.buffers.depth.setMask(!0),r.buffers.color.setMask(!0),e.clear(e.autoClearColor,e.autoClearDepth,e.autoClearStencil))}function g(t,n){let r=m(n);r&&(r.isCubeTexture||r.mapping===Ru)?(u===void 0&&(u=new Eg(new kg(1,1,1),new Lg({name:`BackgroundCubeMaterial`,uniforms:Ag(PE.backgroundCube.uniforms),vertexShader:PE.backgroundCube.vertexShader,fragmentShader:PE.backgroundCube.fragmentShader,side:Rl,depthTest:!1,depthWrite:!1,fog:!1,allowOverride:!1})),u.geometry.deleteAttribute(`normal`),u.geometry.deleteAttribute(`uv`),u.onBeforeRender=function(e,t,n){this.matrixWorld.copyPosition(n.matrixWorld)},Object.defineProperty(u.material,`envMap`,{get:function(){return this.uniforms.envMap.value}}),i.update(u)),IE.copy(n.backgroundRotation),IE.x*=-1,IE.y*=-1,IE.z*=-1,r.isCubeTexture&&r.isRenderTargetTexture===!1&&(IE.y*=-1,IE.z*=-1),u.material.uniforms.envMap.value=r,u.material.uniforms.flipEnvMap.value=r.isCubeTexture&&r.isRenderTargetTexture===!1?-1:1,u.material.uniforms.backgroundBlurriness.value=n.backgroundBlurriness,u.material.uniforms.backgroundIntensity.value=n.backgroundIntensity,u.material.uniforms.backgroundRotation.value.setFromMatrix4(LE.makeRotationFromEuler(IE)),u.material.toneMapped=im.getTransfer(r.colorSpace)!==Tf,(d!==r||f!==r.version||p!==e.toneMapping)&&(u.material.needsUpdate=!0,d=r,f=r.version,p=e.toneMapping),u.layers.enableAll(),t.unshift(u,u.geometry,u.material,0,0,null)):r&&r.isTexture&&(l===void 0&&(l=new Eg(new Eb(2,2),new Lg({name:`BackgroundMaterial`,uniforms:Ag(PE.background.uniforms),vertexShader:PE.background.vertexShader,fragmentShader:PE.background.fragmentShader,side:Ll,depthTest:!1,depthWrite:!1,fog:!1,allowOverride:!1})),l.geometry.deleteAttribute(`normal`),Object.defineProperty(l.material,`map`,{get:function(){return this.uniforms.t2D.value}}),i.update(l)),l.material.uniforms.t2D.value=r,l.material.uniforms.backgroundIntensity.value=n.backgroundIntensity,l.material.toneMapped=im.getTransfer(r.colorSpace)!==Tf,r.matrixAutoUpdate===!0&&r.updateMatrix(),l.material.uniforms.uvTransform.value.copy(r.matrix),(d!==r||f!==r.version||p!==e.toneMapping)&&(l.material.needsUpdate=!0,d=r,f=r.version,p=e.toneMapping),l.layers.enableAll(),t.unshift(l,l.geometry,l.material,0,0,null))}function _(t,n){t.getRGB(FE,Ng(e)),r.buffers.color.setClear(FE.r,FE.g,FE.b,n,o)}function v(){u!==void 0&&(u.geometry.dispose(),u.material.dispose(),u=void 0),l!==void 0&&(l.geometry.dispose(),l.material.dispose(),l=void 0)}return{getClearColor:function(){return s},setClearColor:function(e,t=1){s.set(e),c=t,_(s,c)},getClearAlpha:function(){return c},setClearAlpha:function(e){c=e,_(s,c)},render:h,addToRenderList:g,dispose:v}}function zE(e,t){let n=e.getParameter(e.MAX_VERTEX_ATTRIBS),r={},i=f(null),a=i,o=!1;function s(n,r,i,s,c){let u=!1,f=d(s,i,r);a!==f&&(a=f,l(a.object)),u=p(n,s,i,c),u&&m(n,s,i,c),c!==null&&t.update(c,e.ELEMENT_ARRAY_BUFFER),(u||o)&&(o=!1,b(n,r,i,s),c!==null&&e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,t.get(c).buffer))}function c(){return e.createVertexArray()}function l(t){return e.bindVertexArray(t)}function u(t){return e.deleteVertexArray(t)}function d(e,t,n){let i=n.wireframe===!0,a=r[e.id];a===void 0&&(a={},r[e.id]=a);let o=a[t.id];o===void 0&&(o={},a[t.id]=o);let s=o[i];return s===void 0&&(s=f(c()),o[i]=s),s}function f(e){let t=[],r=[],i=[];for(let e=0;e=0){let n=i[t],r=o[t];if(r===void 0&&(t===`instanceMatrix`&&e.instanceMatrix&&(r=e.instanceMatrix),t===`instanceColor`&&e.instanceColor&&(r=e.instanceColor)),n===void 0||n.attribute!==r||r&&n.data!==r.data)return!0;s++}}return a.attributesNum!==s||a.index!==r}function m(e,t,n,r){let i={},o=t.attributes,s=0,c=n.getAttributes();for(let t in c){let n=c[t];if(n.location>=0){let n=o[t];n===void 0&&(t===`instanceMatrix`&&e.instanceMatrix&&(n=e.instanceMatrix),t===`instanceColor`&&e.instanceColor&&(n=e.instanceColor));let r={};r.attribute=n,n&&n.data&&(r.data=n.data),i[t]=r,s++}}a.attributes=i,a.attributesNum=s,a.index=r}function h(){let e=a.newAttributes;for(let t=0,n=e.length;t=0){let s=o[r];if(s===void 0&&(r===`instanceMatrix`&&n.instanceMatrix&&(s=n.instanceMatrix),r===`instanceColor`&&n.instanceColor&&(s=n.instanceColor)),s!==void 0){let r=s.normalized,o=s.itemSize,c=t.get(s);if(c===void 0)continue;let l=c.buffer,u=c.type,d=c.bytesPerElement,f=u===e.INT||u===e.UNSIGNED_INT||s.gpuType===nd;if(s.isInterleavedBufferAttribute){let t=s.data,c=t.stride,p=s.offset;if(t.isInstancedInterleavedBuffer){for(let e=0;e0&&e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.HIGH_FLOAT).precision>0)return`highp`;t=`mediump`}return t===`mediump`&&e.getShaderPrecisionFormat(e.VERTEX_SHADER,e.MEDIUM_FLOAT).precision>0&&e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.MEDIUM_FLOAT).precision>0?`mediump`:`lowp`}let l=n.precision===void 0?`highp`:n.precision,u=c(l);u!==l&&(console.warn(`THREE.WebGLRenderer:`,l,`not supported, using`,u,`instead.`),l=u);let d=n.logarithmicDepthBuffer===!0,f=n.reverseDepthBuffer===!0&&t.has(`EXT_clip_control`),p=e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS),m=e.getParameter(e.MAX_VERTEX_TEXTURE_IMAGE_UNITS),h=e.getParameter(e.MAX_TEXTURE_SIZE),g=e.getParameter(e.MAX_CUBE_MAP_TEXTURE_SIZE),_=e.getParameter(e.MAX_VERTEX_ATTRIBS),v=e.getParameter(e.MAX_VERTEX_UNIFORM_VECTORS),y=e.getParameter(e.MAX_VARYING_VECTORS),b=e.getParameter(e.MAX_FRAGMENT_UNIFORM_VECTORS),x=m>0,S=e.getParameter(e.MAX_SAMPLES);return{isWebGL2:!0,getMaxAnisotropy:a,getMaxPrecision:c,textureFormatReadable:o,textureTypeReadable:s,precision:l,logarithmicDepthBuffer:d,reverseDepthBuffer:f,maxTextures:p,maxVertexTextures:m,maxTextureSize:h,maxCubemapSize:g,maxAttributes:_,maxVertexUniforms:v,maxVaryings:y,maxFragmentUniforms:b,vertexTextures:x,maxSamples:S}}function HE(e){let t=this,n=null,r=0,i=!1,a=!1,o=new Y_,s=new Up,c={value:null,needsUpdate:!1};this.uniform=c,this.numPlanes=0,this.numIntersection=0,this.init=function(e,t){let n=e.length!==0||t||r!==0||i;return i=t,r=e.length,n},this.beginShadows=function(){a=!0,u(null)},this.endShadows=function(){a=!1},this.setGlobalState=function(e,t){n=u(e,t,0)},this.setState=function(t,o,s){let d=t.clippingPlanes,f=t.clipIntersection,p=t.clipShadows,m=e.get(t);if(!i||d===null||d.length===0||a&&!p)a?u(null):l();else{let e=a?0:r,t=e*4,i=m.clippingState||null;c.value=i,i=u(d,o,t,s);for(let e=0;e!==t;++e)i[e]=n[e];m.clippingState=i,this.numIntersection=f?this.numPlanes:0,this.numPlanes+=e}};function l(){c.value!==n&&(c.value=n,c.needsUpdate=r>0),t.numPlanes=r,t.numIntersection=0}function u(e,n,r,i){let a=e===null?0:e.length,l=null;if(a!==0){if(l=c.value,i!==!0||l===null){let t=r+a*4,i=n.matrixWorldInverse;s.getNormalMatrix(i),(l===null||l.length0){let o=new qg(a.height);return o.fromEquirectangularTexture(e,r),t.set(r,o),r.addEventListener(`dispose`,i),n(o.texture,r.mapping)}else return null}}return r}function i(e){let n=e.target;n.removeEventListener(`dispose`,i);let r=t.get(n);r!==void 0&&(t.delete(n),r.dispose())}function a(){t=new WeakMap}return{get:r,dispose:a}}const WE=4,GE=[.125,.215,.35,.446,.526,.582],KE=20,qE=new Gx,JE=new K;let YE=null,XE=0,ZE=0,QE=!1;const $E=(1+Math.sqrt(5))/2,eD=1/$E,tD=[new W(-$E,eD,0),new W($E,eD,0),new W(-eD,0,$E),new W(eD,0,$E),new W(0,$E,-eD),new W(0,$E,eD),new W(-1,1,-1),new W(1,1,-1),new W(-1,1,1),new W(1,1,1)],nD=new W;var rD=class{constructor(e){this._renderer=e,this._pingPongRenderTarget=null,this._lodMax=0,this._cubeSize=0,this._lodPlanes=[],this._sizeLods=[],this._sigmas=[],this._blurMaterial=null,this._cubemapMaterial=null,this._equirectMaterial=null,this._compileMaterial(this._blurMaterial)}fromScene(e,t=0,n=.1,r=100,i={}){let{size:a=256,position:o=nD}=i;YE=this._renderer.getRenderTarget(),XE=this._renderer.getActiveCubeFace(),ZE=this._renderer.getActiveMipmapLevel(),QE=this._renderer.xr.enabled,this._renderer.xr.enabled=!1,this._setSize(a);let s=this._allocateTargets();return s.depthBuffer=!0,this._sceneToCubeUV(e,n,r,s,o),t>0&&this._blur(s,0,0,t),this._applyPMREM(s),this._cleanup(s),s}fromEquirectangular(e,t=null){return this._fromTexture(e,t)}fromCubemap(e,t=null){return this._fromTexture(e,t)}compileCubemapShader(){this._cubemapMaterial===null&&(this._cubemapMaterial=lD(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){this._equirectMaterial===null&&(this._equirectMaterial=cD(),this._compileMaterial(this._equirectMaterial))}dispose(){this._dispose(),this._cubemapMaterial!==null&&this._cubemapMaterial.dispose(),this._equirectMaterial!==null&&this._equirectMaterial.dispose()}_setSize(e){this._lodMax=Math.floor(Math.log2(e)),this._cubeSize=2**this._lodMax}_dispose(){this._blurMaterial!==null&&this._blurMaterial.dispose(),this._pingPongRenderTarget!==null&&this._pingPongRenderTarget.dispose();for(let e=0;e2?a:0,a,a),u.setRenderTarget(r),h&&u.render(m,s),u.render(e,s)}m.geometry.dispose(),m.material.dispose(),u.toneMapping=f,u.autoClear=d,e.background=g}_textureToCubeUV(e,t){let n=this._renderer,r=e.mapping===Pu||e.mapping===Fu;r?(this._cubemapMaterial===null&&(this._cubemapMaterial=lD()),this._cubemapMaterial.uniforms.flipEnvMap.value=e.isRenderTargetTexture===!1?-1:1):this._equirectMaterial===null&&(this._equirectMaterial=cD());let i=r?this._cubemapMaterial:this._equirectMaterial,a=new Eg(this._lodPlanes[0],i),o=i.uniforms;o.envMap.value=e;let s=this._cubeSize;oD(t,0,0,3*s,2*s),n.setRenderTarget(t),n.render(a,qE)}_applyPMREM(e){let t=this._renderer,n=t.autoClear;t.autoClear=!1;let r=this._lodPlanes.length;for(let t=1;tKE&&console.warn(`sigmaRadians, ${i}, is too large and will clip, as it requested ${h} samples when the maximum is set to ${KE}`);let g=[],_=0;for(let e=0;ev-WE?r-v+WE:0),x=4*(this._cubeSize-y);oD(t,b,x,3*y,2*y),s.setRenderTarget(t),s.render(u,qE)}};function iD(e){let t=[],n=[],r=[],i=e,a=e-WE+1+GE.length;for(let o=0;oe-WE?s=GE[o-e+WE-1]:o===0&&(s=0),r.push(s);let c=1/(a-2),l=-c,u=1+c,d=[l,l,u,l,u,u,l,l,u,u,l,u],f=6,p=6,m=3,h=2,g=1,_=new Float32Array(m*p*f),v=new Float32Array(h*p*f),y=new Float32Array(g*p*f);for(let e=0;e2?0:-1,r=[t,n,0,t+2/3,n,0,t+2/3,n+1,0,t,n,0,t+2/3,n+1,0,t,n+1,0];_.set(r,m*p*e),v.set(d,h*p*e);let i=[e,e,e,e,e,e];y.set(i,g*p*e)}let b=new mg;b.setAttribute(`position`,new Qh(_,m)),b.setAttribute(`uv`,new Qh(v,h)),b.setAttribute(`faceIndex`,new Qh(y,g)),t.push(b),i>WE&&i--}return{lodPlanes:t,sizeLods:n,sigmas:r}}function aD(e,t,n){let r=new _m(e,t,n);return r.texture.mapping=Ru,r.texture.name=`PMREM.cubeUv`,r.scissorTest=!0,r}function oD(e,t,n,r,i){e.viewport.set(t,n,r,i),e.scissor.set(t,n,r,i)}function sD(e,t,n){let r=new Float32Array(KE),i=new W(0,1,0),a=new Lg({name:`SphericalGaussianBlur`,defines:{n:KE,CUBEUV_TEXEL_WIDTH:1/t,CUBEUV_TEXEL_HEIGHT:1/n,CUBEUV_MAX_MIP:`${e}.0`},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:r},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:i}},vertexShader:uD(),fragmentShader:` +}`,zT={alphahash_fragment:oC,alphahash_pars_fragment:sC,alphamap_fragment:cC,alphamap_pars_fragment:lC,alphatest_fragment:uC,alphatest_pars_fragment:dC,aomap_fragment:fC,aomap_pars_fragment:pC,batching_pars_vertex:mC,batching_vertex:hC,begin_vertex:gC,beginnormal_vertex:_C,bsdfs:vC,iridescence_fragment:yC,bumpmap_pars_fragment:bC,clipping_planes_fragment:xC,clipping_planes_pars_fragment:SC,clipping_planes_pars_vertex:CC,clipping_planes_vertex:wC,color_fragment:TC,color_pars_fragment:EC,color_pars_vertex:DC,color_vertex:OC,common:kC,cube_uv_reflection_fragment:AC,defaultnormal_vertex:jC,displacementmap_pars_vertex:MC,displacementmap_vertex:NC,emissivemap_fragment:PC,emissivemap_pars_fragment:FC,colorspace_fragment:IC,colorspace_pars_fragment:LC,envmap_fragment:RC,envmap_common_pars_fragment:zC,envmap_pars_fragment:BC,envmap_pars_vertex:VC,envmap_physical_pars_fragment:QC,envmap_vertex:HC,fog_vertex:UC,fog_pars_vertex:WC,fog_fragment:GC,fog_pars_fragment:KC,gradientmap_pars_fragment:qC,lightmap_pars_fragment:JC,lights_lambert_fragment:YC,lights_lambert_pars_fragment:XC,lights_pars_begin:ZC,lights_toon_fragment:$C,lights_toon_pars_fragment:ew,lights_phong_fragment:tw,lights_phong_pars_fragment:nw,lights_physical_fragment:rw,lights_physical_pars_fragment:iw,lights_fragment_begin:aw,lights_fragment_maps:ow,lights_fragment_end:sw,logdepthbuf_fragment:cw,logdepthbuf_pars_fragment:lw,logdepthbuf_pars_vertex:uw,logdepthbuf_vertex:dw,map_fragment:fw,map_pars_fragment:pw,map_particle_fragment:mw,map_particle_pars_fragment:hw,metalnessmap_fragment:gw,metalnessmap_pars_fragment:_w,morphinstance_vertex:vw,morphcolor_vertex:yw,morphnormal_vertex:bw,morphtarget_pars_vertex:xw,morphtarget_vertex:Sw,normal_fragment_begin:Cw,normal_fragment_maps:ww,normal_pars_fragment:Tw,normal_pars_vertex:Ew,normal_vertex:Dw,normalmap_pars_fragment:Ow,clearcoat_normal_fragment_begin:kw,clearcoat_normal_fragment_maps:Aw,clearcoat_pars_fragment:jw,iridescence_pars_fragment:Mw,opaque_fragment:Nw,packing:Pw,premultiplied_alpha_fragment:Fw,project_vertex:Iw,dithering_fragment:Lw,dithering_pars_fragment:Rw,roughnessmap_fragment:zw,roughnessmap_pars_fragment:Bw,shadowmap_pars_fragment:Vw,shadowmap_pars_vertex:Hw,shadowmap_vertex:Uw,shadowmask_pars_fragment:Ww,skinbase_vertex:Gw,skinning_pars_vertex:Kw,skinning_vertex:qw,skinnormal_vertex:Jw,specularmap_fragment:Yw,specularmap_pars_fragment:Xw,tonemapping_fragment:Zw,tonemapping_pars_fragment:Qw,transmission_fragment:$w,transmission_pars_fragment:eT,uv_pars_fragment:tT,uv_pars_vertex:nT,uv_vertex:rT,worldpos_vertex:iT,background_vert:aT,background_frag:oT,backgroundCube_vert:sT,backgroundCube_frag:cT,cube_vert:lT,cube_frag:uT,depth_vert:dT,depth_frag:fT,distanceRGBA_vert:pT,distanceRGBA_frag:mT,equirect_vert:hT,equirect_frag:gT,linedashed_vert:_T,linedashed_frag:vT,meshbasic_vert:yT,meshbasic_frag:bT,meshlambert_vert:xT,meshlambert_frag:ST,meshmatcap_vert:CT,meshmatcap_frag:wT,meshnormal_vert:TT,meshnormal_frag:ET,meshphong_vert:DT,meshphong_frag:OT,meshphysical_vert:kT,meshphysical_frag:AT,meshtoon_vert:jT,meshtoon_frag:MT,points_vert:NT,points_frag:PT,shadow_vert:FT,shadow_frag:IT,sprite_vert:LT,sprite_frag:RT},J={common:{diffuse:{value:new K(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new Yf},alphaMap:{value:null},alphaMapTransform:{value:new Yf},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new Yf}},envmap:{envMap:{value:null},envMapRotation:{value:new Yf},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new Yf}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new Yf}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new Yf},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new Yf},normalScale:{value:new U(1,1)}},displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new Yf},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new Yf}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new Yf}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new Yf}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new K(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotLightMap:{value:[]},spotShadowMap:{value:[]},spotLightMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}},ltc_1:{value:null},ltc_2:{value:null}},points:{diffuse:{value:new K(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaMapTransform:{value:new Yf},alphaTest:{value:0},uvTransform:{value:new Yf}},sprite:{diffuse:{value:new K(16777215)},opacity:{value:1},center:{value:new U(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new Yf},alphaMap:{value:null},alphaMapTransform:{value:new Yf},alphaTest:{value:0}}},BT={basic:{uniforms:Lh([J.common,J.specularmap,J.envmap,J.aomap,J.lightmap,J.fog]),vertexShader:zT.meshbasic_vert,fragmentShader:zT.meshbasic_frag},lambert:{uniforms:Lh([J.common,J.specularmap,J.envmap,J.aomap,J.lightmap,J.emissivemap,J.bumpmap,J.normalmap,J.displacementmap,J.fog,J.lights,{emissive:{value:new K(0)}}]),vertexShader:zT.meshlambert_vert,fragmentShader:zT.meshlambert_frag},phong:{uniforms:Lh([J.common,J.specularmap,J.envmap,J.aomap,J.lightmap,J.emissivemap,J.bumpmap,J.normalmap,J.displacementmap,J.fog,J.lights,{emissive:{value:new K(0)},specular:{value:new K(1118481)},shininess:{value:30}}]),vertexShader:zT.meshphong_vert,fragmentShader:zT.meshphong_frag},standard:{uniforms:Lh([J.common,J.envmap,J.aomap,J.lightmap,J.emissivemap,J.bumpmap,J.normalmap,J.displacementmap,J.roughnessmap,J.metalnessmap,J.fog,J.lights,{emissive:{value:new K(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:zT.meshphysical_vert,fragmentShader:zT.meshphysical_frag},toon:{uniforms:Lh([J.common,J.aomap,J.lightmap,J.emissivemap,J.bumpmap,J.normalmap,J.displacementmap,J.gradientmap,J.fog,J.lights,{emissive:{value:new K(0)}}]),vertexShader:zT.meshtoon_vert,fragmentShader:zT.meshtoon_frag},matcap:{uniforms:Lh([J.common,J.bumpmap,J.normalmap,J.displacementmap,J.fog,{matcap:{value:null}}]),vertexShader:zT.meshmatcap_vert,fragmentShader:zT.meshmatcap_frag},points:{uniforms:Lh([J.points,J.fog]),vertexShader:zT.points_vert,fragmentShader:zT.points_frag},dashed:{uniforms:Lh([J.common,J.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:zT.linedashed_vert,fragmentShader:zT.linedashed_frag},depth:{uniforms:Lh([J.common,J.displacementmap]),vertexShader:zT.depth_vert,fragmentShader:zT.depth_frag},normal:{uniforms:Lh([J.common,J.bumpmap,J.normalmap,J.displacementmap,{opacity:{value:1}}]),vertexShader:zT.meshnormal_vert,fragmentShader:zT.meshnormal_frag},sprite:{uniforms:Lh([J.sprite,J.fog]),vertexShader:zT.sprite_vert,fragmentShader:zT.sprite_frag},background:{uniforms:{uvTransform:{value:new Yf},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:zT.background_vert,fragmentShader:zT.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1},backgroundRotation:{value:new Yf}},vertexShader:zT.backgroundCube_vert,fragmentShader:zT.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:zT.cube_vert,fragmentShader:zT.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:zT.equirect_vert,fragmentShader:zT.equirect_frag},distanceRGBA:{uniforms:Lh([J.common,J.displacementmap,{referencePosition:{value:new W},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:zT.distanceRGBA_vert,fragmentShader:zT.distanceRGBA_frag},shadow:{uniforms:Lh([J.lights,J.fog,{color:{value:new K(0)},opacity:{value:1}}]),vertexShader:zT.shadow_vert,fragmentShader:zT.shadow_frag}};BT.physical={uniforms:Lh([BT.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new Yf},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new Yf},clearcoatNormalScale:{value:new U(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new Yf},dispersion:{value:0},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new Yf},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new Yf},sheen:{value:0},sheenColor:{value:new K(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new Yf},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new Yf},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new Yf},transmissionSamplerSize:{value:new U},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new Yf},attenuationDistance:{value:0},attenuationColor:{value:new K(0)},specularColor:{value:new K(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new Yf},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new Yf},anisotropyVector:{value:new U},anisotropyMap:{value:null},anisotropyMapTransform:{value:new Yf}}]),vertexShader:zT.meshphysical_vert,fragmentShader:zT.meshphysical_frag};const VT={r:0,b:0,g:0},HT=new um,UT=new G;function WT(e,t,n,r,i,a,o){let s=new K(0),c=a===!0?0:1,l,u,d=null,f=0,p=null;function m(e){let r=e.isScene===!0?e.background:null;if(r&&r.isTexture){let i=e.backgroundBlurriness>0;r=(i?n:t).get(r)}return r}function h(t){let n=!1,i=m(t);i===null?_(s,c):i&&i.isColor&&(_(i,1),n=!0);let a=e.xr.getEnvironmentBlendMode();a===`additive`?r.buffers.color.setClear(0,0,0,1,o):a===`alpha-blend`&&r.buffers.color.setClear(0,0,0,0,o),(e.autoClear||n)&&(r.buffers.depth.setTest(!0),r.buffers.depth.setMask(!0),r.buffers.color.setMask(!0),e.clear(e.autoClearColor,e.autoClearDepth,e.autoClearStencil))}function g(t,n){let r=m(n);r&&(r.isCubeTexture||r.mapping===Wl)?(u===void 0&&(u=new Mh(new Fh(1,1,1),new Uh({name:`BackgroundCubeMaterial`,uniforms:Ih(BT.backgroundCube.uniforms),vertexShader:BT.backgroundCube.vertexShader,fragmentShader:BT.backgroundCube.fragmentShader,side:Wc,depthTest:!1,depthWrite:!1,fog:!1,allowOverride:!1})),u.geometry.deleteAttribute(`normal`),u.geometry.deleteAttribute(`uv`),u.onBeforeRender=function(e,t,n){this.matrixWorld.copyPosition(n.matrixWorld)},Object.defineProperty(u.material,`envMap`,{get:function(){return this.uniforms.envMap.value}}),i.update(u)),HT.copy(n.backgroundRotation),HT.x*=-1,HT.y*=-1,HT.z*=-1,r.isCubeTexture&&r.isRenderTargetTexture===!1&&(HT.y*=-1,HT.z*=-1),u.material.uniforms.envMap.value=r,u.material.uniforms.flipEnvMap.value=r.isCubeTexture&&r.isRenderTargetTexture===!1?-1:1,u.material.uniforms.backgroundBlurriness.value=n.backgroundBlurriness,u.material.uniforms.backgroundIntensity.value=n.backgroundIntensity,u.material.uniforms.backgroundRotation.value.setFromMatrix4(UT.makeRotationFromEuler(HT)),u.material.toneMapped=up.getTransfer(r.colorSpace)!==kd,(d!==r||f!==r.version||p!==e.toneMapping)&&(u.material.needsUpdate=!0,d=r,f=r.version,p=e.toneMapping),u.layers.enableAll(),t.unshift(u,u.geometry,u.material,0,0,null)):r&&r.isTexture&&(l===void 0&&(l=new Mh(new My(2,2),new Uh({name:`BackgroundMaterial`,uniforms:Ih(BT.background.uniforms),vertexShader:BT.background.vertexShader,fragmentShader:BT.background.fragmentShader,side:Uc,depthTest:!1,depthWrite:!1,fog:!1,allowOverride:!1})),l.geometry.deleteAttribute(`normal`),Object.defineProperty(l.material,`map`,{get:function(){return this.uniforms.t2D.value}}),i.update(l)),l.material.uniforms.t2D.value=r,l.material.uniforms.backgroundIntensity.value=n.backgroundIntensity,l.material.toneMapped=up.getTransfer(r.colorSpace)!==kd,r.matrixAutoUpdate===!0&&r.updateMatrix(),l.material.uniforms.uvTransform.value.copy(r.matrix),(d!==r||f!==r.version||p!==e.toneMapping)&&(l.material.needsUpdate=!0,d=r,f=r.version,p=e.toneMapping),l.layers.enableAll(),t.unshift(l,l.geometry,l.material,0,0,null))}function _(t,n){t.getRGB(VT,zh(e)),r.buffers.color.setClear(VT.r,VT.g,VT.b,n,o)}function v(){u!==void 0&&(u.geometry.dispose(),u.material.dispose(),u=void 0),l!==void 0&&(l.geometry.dispose(),l.material.dispose(),l=void 0)}return{getClearColor:function(){return s},setClearColor:function(e,t=1){s.set(e),c=t,_(s,c)},getClearAlpha:function(){return c},setClearAlpha:function(e){c=e,_(s,c)},render:h,addToRenderList:g,dispose:v}}function GT(e,t){let n=e.getParameter(e.MAX_VERTEX_ATTRIBS),r={},i=f(null),a=i,o=!1;function s(n,r,i,s,c){let u=!1,f=d(s,i,r);a!==f&&(a=f,l(a.object)),u=p(n,s,i,c),u&&m(n,s,i,c),c!==null&&t.update(c,e.ELEMENT_ARRAY_BUFFER),(u||o)&&(o=!1,b(n,r,i,s),c!==null&&e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,t.get(c).buffer))}function c(){return e.createVertexArray()}function l(t){return e.bindVertexArray(t)}function u(t){return e.deleteVertexArray(t)}function d(e,t,n){let i=n.wireframe===!0,a=r[e.id];a===void 0&&(a={},r[e.id]=a);let o=a[t.id];o===void 0&&(o={},a[t.id]=o);let s=o[i];return s===void 0&&(s=f(c()),o[i]=s),s}function f(e){let t=[],r=[],i=[];for(let e=0;e=0){let n=i[t],r=o[t];if(r===void 0&&(t===`instanceMatrix`&&e.instanceMatrix&&(r=e.instanceMatrix),t===`instanceColor`&&e.instanceColor&&(r=e.instanceColor)),n===void 0||n.attribute!==r||r&&n.data!==r.data)return!0;s++}}return a.attributesNum!==s||a.index!==r}function m(e,t,n,r){let i={},o=t.attributes,s=0,c=n.getAttributes();for(let t in c){let n=c[t];if(n.location>=0){let n=o[t];n===void 0&&(t===`instanceMatrix`&&e.instanceMatrix&&(n=e.instanceMatrix),t===`instanceColor`&&e.instanceColor&&(n=e.instanceColor));let r={};r.attribute=n,n&&n.data&&(r.data=n.data),i[t]=r,s++}}a.attributes=i,a.attributesNum=s,a.index=r}function h(){let e=a.newAttributes;for(let t=0,n=e.length;t=0){let s=o[r];if(s===void 0&&(r===`instanceMatrix`&&n.instanceMatrix&&(s=n.instanceMatrix),r===`instanceColor`&&n.instanceColor&&(s=n.instanceColor)),s!==void 0){let r=s.normalized,o=s.itemSize,c=t.get(s);if(c===void 0)continue;let l=c.buffer,u=c.type,d=c.bytesPerElement,f=u===e.INT||u===e.UNSIGNED_INT||s.gpuType===cu;if(s.isInterleavedBufferAttribute){let t=s.data,c=t.stride,p=s.offset;if(t.isInstancedInterleavedBuffer){for(let e=0;e0&&e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.HIGH_FLOAT).precision>0)return`highp`;t=`mediump`}return t===`mediump`&&e.getShaderPrecisionFormat(e.VERTEX_SHADER,e.MEDIUM_FLOAT).precision>0&&e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.MEDIUM_FLOAT).precision>0?`mediump`:`lowp`}let l=n.precision===void 0?`highp`:n.precision,u=c(l);u!==l&&(console.warn(`THREE.WebGLRenderer:`,l,`not supported, using`,u,`instead.`),l=u);let d=n.logarithmicDepthBuffer===!0,f=n.reverseDepthBuffer===!0&&t.has(`EXT_clip_control`),p=e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS),m=e.getParameter(e.MAX_VERTEX_TEXTURE_IMAGE_UNITS),h=e.getParameter(e.MAX_TEXTURE_SIZE),g=e.getParameter(e.MAX_CUBE_MAP_TEXTURE_SIZE),_=e.getParameter(e.MAX_VERTEX_ATTRIBS),v=e.getParameter(e.MAX_VERTEX_UNIFORM_VECTORS),y=e.getParameter(e.MAX_VARYING_VECTORS),b=e.getParameter(e.MAX_FRAGMENT_UNIFORM_VECTORS),x=m>0,S=e.getParameter(e.MAX_SAMPLES);return{isWebGL2:!0,getMaxAnisotropy:a,getMaxPrecision:c,textureFormatReadable:o,textureTypeReadable:s,precision:l,logarithmicDepthBuffer:d,reverseDepthBuffer:f,maxTextures:p,maxVertexTextures:m,maxTextureSize:h,maxCubemapSize:g,maxAttributes:_,maxVertexUniforms:v,maxVaryings:y,maxFragmentUniforms:b,vertexTextures:x,maxSamples:S}}function JT(e){let t=this,n=null,r=0,i=!1,a=!1,o=new t_,s=new Yf,c={value:null,needsUpdate:!1};this.uniform=c,this.numPlanes=0,this.numIntersection=0,this.init=function(e,t){let n=e.length!==0||t||r!==0||i;return i=t,r=e.length,n},this.beginShadows=function(){a=!0,u(null)},this.endShadows=function(){a=!1},this.setGlobalState=function(e,t){n=u(e,t,0)},this.setState=function(t,o,s){let d=t.clippingPlanes,f=t.clipIntersection,p=t.clipShadows,m=e.get(t);if(!i||d===null||d.length===0||a&&!p)a?u(null):l();else{let e=a?0:r,t=e*4,i=m.clippingState||null;c.value=i,i=u(d,o,t,s);for(let e=0;e!==t;++e)i[e]=n[e];m.clippingState=i,this.numIntersection=f?this.numPlanes:0,this.numPlanes+=e}};function l(){c.value!==n&&(c.value=n,c.needsUpdate=r>0),t.numPlanes=r,t.numIntersection=0}function u(e,n,r,i){let a=e===null?0:e.length,l=null;if(a!==0){if(l=c.value,i!==!0||l===null){let t=r+a*4,i=n.matrixWorldInverse;s.getNormalMatrix(i),(l===null||l.length0){let o=new $h(a.height);return o.fromEquirectangularTexture(e,r),t.set(r,o),r.addEventListener(`dispose`,i),n(o.texture,r.mapping)}else return null}}return r}function i(e){let n=e.target;n.removeEventListener(`dispose`,i);let r=t.get(n);r!==void 0&&(t.delete(n),r.dispose())}function a(){t=new WeakMap}return{get:r,dispose:a}}const XT=4,ZT=[.125,.215,.35,.446,.526,.582],QT=20,$T=new Zb,eE=new K;let tE=null,nE=0,rE=0,iE=!1;const aE=(1+Math.sqrt(5))/2,oE=1/aE,sE=[new W(-aE,oE,0),new W(aE,oE,0),new W(-oE,0,aE),new W(oE,0,aE),new W(0,aE,-oE),new W(0,aE,oE),new W(-1,1,-1),new W(1,1,-1),new W(-1,1,1),new W(1,1,1)],cE=new W;var lE=class{constructor(e){this._renderer=e,this._pingPongRenderTarget=null,this._lodMax=0,this._cubeSize=0,this._lodPlanes=[],this._sizeLods=[],this._sigmas=[],this._blurMaterial=null,this._cubemapMaterial=null,this._equirectMaterial=null,this._compileMaterial(this._blurMaterial)}fromScene(e,t=0,n=.1,r=100,i={}){let{size:a=256,position:o=cE}=i;tE=this._renderer.getRenderTarget(),nE=this._renderer.getActiveCubeFace(),rE=this._renderer.getActiveMipmapLevel(),iE=this._renderer.xr.enabled,this._renderer.xr.enabled=!1,this._setSize(a);let s=this._allocateTargets();return s.depthBuffer=!0,this._sceneToCubeUV(e,n,r,s,o),t>0&&this._blur(s,0,0,t),this._applyPMREM(s),this._cleanup(s),s}fromEquirectangular(e,t=null){return this._fromTexture(e,t)}fromCubemap(e,t=null){return this._fromTexture(e,t)}compileCubemapShader(){this._cubemapMaterial===null&&(this._cubemapMaterial=hE(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){this._equirectMaterial===null&&(this._equirectMaterial=mE(),this._compileMaterial(this._equirectMaterial))}dispose(){this._dispose(),this._cubemapMaterial!==null&&this._cubemapMaterial.dispose(),this._equirectMaterial!==null&&this._equirectMaterial.dispose()}_setSize(e){this._lodMax=Math.floor(Math.log2(e)),this._cubeSize=2**this._lodMax}_dispose(){this._blurMaterial!==null&&this._blurMaterial.dispose(),this._pingPongRenderTarget!==null&&this._pingPongRenderTarget.dispose();for(let e=0;e2?a:0,a,a),u.setRenderTarget(r),h&&u.render(m,s),u.render(e,s)}m.geometry.dispose(),m.material.dispose(),u.toneMapping=f,u.autoClear=d,e.background=g}_textureToCubeUV(e,t){let n=this._renderer,r=e.mapping===Bl||e.mapping===Vl;r?(this._cubemapMaterial===null&&(this._cubemapMaterial=hE()),this._cubemapMaterial.uniforms.flipEnvMap.value=e.isRenderTargetTexture===!1?-1:1):this._equirectMaterial===null&&(this._equirectMaterial=mE());let i=r?this._cubemapMaterial:this._equirectMaterial,a=new Mh(this._lodPlanes[0],i),o=i.uniforms;o.envMap.value=e;let s=this._cubeSize;fE(t,0,0,3*s,2*s),n.setRenderTarget(t),n.render(a,$T)}_applyPMREM(e){let t=this._renderer,n=t.autoClear;t.autoClear=!1;let r=this._lodPlanes.length;for(let t=1;tQT&&console.warn(`sigmaRadians, ${i}, is too large and will clip, as it requested ${h} samples when the maximum is set to ${QT}`);let g=[],_=0;for(let e=0;ev-XT?r-v+XT:0),x=4*(this._cubeSize-y);fE(t,b,x,3*y,2*y),s.setRenderTarget(t),s.render(u,$T)}};function uE(e){let t=[],n=[],r=[],i=e,a=e-XT+1+ZT.length;for(let o=0;oe-XT?s=ZT[o-e+XT-1]:o===0&&(s=0),r.push(s);let c=1/(a-2),l=-c,u=1+c,d=[l,l,u,l,u,u,l,l,u,u,l,u],f=6,p=6,m=3,h=2,g=1,_=new Float32Array(m*p*f),v=new Float32Array(h*p*f),y=new Float32Array(g*p*f);for(let e=0;e2?0:-1,r=[t,n,0,t+2/3,n,0,t+2/3,n+1,0,t,n,0,t+2/3,n+1,0,t,n+1,0];_.set(r,m*p*e),v.set(d,h*p*e);let i=[e,e,e,e,e,e];y.set(i,g*p*e)}let b=new bh;b.setAttribute(`position`,new ih(_,m)),b.setAttribute(`uv`,new ih(v,h)),b.setAttribute(`faceIndex`,new ih(y,g)),t.push(b),i>XT&&i--}return{lodPlanes:t,sizeLods:n,sigmas:r}}function dE(e,t,n){let r=new Cp(e,t,n);return r.texture.mapping=Wl,r.texture.name=`PMREM.cubeUv`,r.scissorTest=!0,r}function fE(e,t,n,r,i){e.viewport.set(t,n,r,i),e.scissor.set(t,n,r,i)}function pE(e,t,n){let r=new Float32Array(QT),i=new W(0,1,0),a=new Uh({name:`SphericalGaussianBlur`,defines:{n:QT,CUBEUV_TEXEL_WIDTH:1/t,CUBEUV_TEXEL_HEIGHT:1/n,CUBEUV_MAX_MIP:`${e}.0`},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:r},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:i}},vertexShader:gE(),fragmentShader:` precision mediump float; precision mediump int; @@ -3633,7 +3639,7 @@ void main() { } } - `,blending:Bl,depthTest:!1,depthWrite:!1});return a}function cD(){return new Lg({name:`EquirectangularToCubeUV`,uniforms:{envMap:{value:null}},vertexShader:uD(),fragmentShader:` + `,blending:Kc,depthTest:!1,depthWrite:!1});return a}function mE(){return new Uh({name:`EquirectangularToCubeUV`,uniforms:{envMap:{value:null}},vertexShader:gE(),fragmentShader:` precision mediump float; precision mediump int; @@ -3652,7 +3658,7 @@ void main() { gl_FragColor = vec4( texture2D ( envMap, uv ).rgb, 1.0 ); } - `,blending:Bl,depthTest:!1,depthWrite:!1})}function lD(){return new Lg({name:`CubemapToCubeUV`,uniforms:{envMap:{value:null},flipEnvMap:{value:-1}},vertexShader:uD(),fragmentShader:` + `,blending:Kc,depthTest:!1,depthWrite:!1})}function hE(){return new Uh({name:`CubemapToCubeUV`,uniforms:{envMap:{value:null},flipEnvMap:{value:-1}},vertexShader:gE(),fragmentShader:` precision mediump float; precision mediump int; @@ -3668,7 +3674,7 @@ void main() { gl_FragColor = textureCube( envMap, vec3( flipEnvMap * vOutputDirection.x, vOutputDirection.yz ) ); } - `,blending:Bl,depthTest:!1,depthWrite:!1})}function uD(){return` + `,blending:Kc,depthTest:!1,depthWrite:!1})}function gE(){return` precision mediump float; precision mediump int; @@ -3723,17 +3729,17 @@ void main() { gl_Position = vec4( position, 1.0 ); } - `}function dD(e){let t=new WeakMap,n=null;function r(r){if(r&&r.isTexture){let o=r.mapping,s=o===Iu||o===Lu,c=o===Pu||o===Fu;if(s||c){let o=t.get(r),l=o===void 0?0:o.texture.pmremVersion;if(r.isRenderTargetTexture&&r.pmremVersion!==l)return n===null&&(n=new rD(e)),o=s?n.fromEquirectangular(r,o):n.fromCubemap(r,o),o.texture.pmremVersion=r.pmremVersion,t.set(r,o),o.texture;if(o!==void 0)return o.texture;{let l=r.image;return s&&l&&l.height>0||c&&l&&i(l)?(n===null&&(n=new rD(e)),o=s?n.fromEquirectangular(r):n.fromCubemap(r),o.texture.pmremVersion=r.pmremVersion,t.set(r,o),r.addEventListener(`dispose`,a),o.texture):null}}}return r}function i(e){let t=0,n=6;for(let r=0;rt.maxTextureSize&&(m=Math.ceil(p/t.maxTextureSize),p=t.maxTextureSize);let h=new Float32Array(p*m*4*u),g=new vm(h,p,m,u);g.type=id,g.needsUpdate=!0;let _=f*4;for(let t=0;t0)return e;let i=t*n,a=CD[i];if(a===void 0&&(a=new Float32Array(i),CD[i]=a),t!==0){r.toArray(a,0);for(let r=1,i=0;r!==t;++r)i+=n,e[r].toArray(a,i)}return a}function kD(e,t){if(e.length!==t.length)return!1;for(let n=0,r=e.length;n0||c&&l&&i(l)?(n===null&&(n=new lE(e)),o=s?n.fromEquirectangular(r):n.fromCubemap(r),o.texture.pmremVersion=r.pmremVersion,t.set(r,o),r.addEventListener(`dispose`,a),o.texture):null}}}return r}function i(e){let t=0,n=6;for(let r=0;rt.maxTextureSize&&(m=Math.ceil(p/t.maxTextureSize),p=t.maxTextureSize);let h=new Float32Array(p*m*4*u),g=new wp(h,p,m,u);g.type=uu,g.needsUpdate=!0;let _=f*4;for(let t=0;t0)return e;let i=t*n,a=kE[i];if(a===void 0&&(a=new Float32Array(i),kE[i]=a),t!==0){r.toArray(a,0);for(let r=1,i=0;r!==t;++r)i+=n,e[r].toArray(a,i)}return a}function FE(e,t){if(e.length!==t.length)return!1;for(let n=0,r=e.length;n`:` `} ${i}: ${n[e]}`)}return r.join(` -`)}const kO=new Up;function AO(e){im._getMatrix(kO,im.workingColorSpace,e);let t=`mat3( ${kO.elements.map(e=>e.toFixed(4))} )`;switch(im.getTransfer(e)){case wf:return[t,`LinearTransferOETF`];case Tf:return[t,`sRGBTransferOETF`];default:return console.warn(`THREE.WebGLProgram: Unsupported color space: `,e),[t,`LinearTransferOETF`]}}function jO(e,t,n){let r=e.getShaderParameter(t,e.COMPILE_STATUS),i=e.getShaderInfoLog(t).trim();if(r&&i===``)return``;let a=/ERROR: 0:(\d+)/.exec(i);if(a){let r=parseInt(a[1]);return n.toUpperCase()+` +`)}const FD=new Yf;function ID(e){up._getMatrix(FD,up.workingColorSpace,e);let t=`mat3( ${FD.elements.map(e=>e.toFixed(4))} )`;switch(up.getTransfer(e)){case Od:return[t,`LinearTransferOETF`];case kd:return[t,`sRGBTransferOETF`];default:return console.warn(`THREE.WebGLProgram: Unsupported color space: `,e),[t,`LinearTransferOETF`]}}function LD(e,t,n){let r=e.getShaderParameter(t,e.COMPILE_STATUS),i=e.getShaderInfoLog(t).trim();if(r&&i===``)return``;let a=/ERROR: 0:(\d+)/.exec(i);if(a){let r=parseInt(a[1]);return n.toUpperCase()+` `+i+` -`+OO(e.getShaderSource(t),r)}else return i}function MO(e,t){let n=AO(t);return[`vec4 ${e}( vec4 value ) {`,` return ${n[1]}( vec4( value.rgb * ${n[0]}, value.a ) );`,`}`].join(` -`)}function NO(e,t){let n;switch(t){case wu:n=`Linear`;break;case Tu:n=`Reinhard`;break;case Eu:n=`Cineon`;break;case Du:n=`ACESFilmic`;break;case ku:n=`AgX`;break;case Au:n=`Neutral`;break;case Ou:n=`Custom`;break;default:console.warn(`THREE.WebGLProgram: Unsupported toneMapping:`,t),n=`Linear`}return`vec3 `+e+`( vec3 color ) { return `+n+`ToneMapping( color ); }`}const PO=new W;function FO(){im.getLuminanceCoefficients(PO);let e=PO.x.toFixed(4),t=PO.y.toFixed(4),n=PO.z.toFixed(4);return[`float luminance( const in vec3 rgb ) {`,` const vec3 weights = vec3( ${e}, ${t}, ${n} );`,` return dot( weights, rgb );`,`}`].join(` -`)}function IO(e){let t=[e.extensionClipCullDistance?`#extension GL_ANGLE_clip_cull_distance : require`:``,e.extensionMultiDraw?`#extension GL_ANGLE_multi_draw : require`:``];return t.filter(zO).join(` -`)}function LO(e){let t=[];for(let n in e){let r=e[n];if(r===!1)continue;t.push(`#define `+n+` `+r)}return t.join(` -`)}function RO(e,t){let n={},r=e.getProgramParameter(t,e.ACTIVE_ATTRIBUTES);for(let i=0;i/gm;function UO(e){return e.replace(HO,GO)}const WO=new Map;function GO(e,t){let n=NE[t];if(n===void 0){let e=WO.get(t);if(e!==void 0)n=NE[e],console.warn(`THREE.WebGLRenderer: Shader chunk "%s" has been deprecated. Use "%s" instead.`,t,e);else throw Error(`Can not resolve #include <`+t+`>`)}return UO(n)}const KO=/#pragma unroll_loop_start\s+for\s*\(\s*int\s+i\s*=\s*(\d+)\s*;\s*i\s*<\s*(\d+)\s*;\s*i\s*\+\+\s*\)\s*{([\s\S]+?)}\s+#pragma unroll_loop_end/g;function qO(e){return e.replace(KO,JO)}function JO(e,t,n,r){let i=``;for(let e=parseInt(t);e/gm;function YD(e){return e.replace(JD,ZD)}const XD=new Map;function ZD(e,t){let n=zT[t];if(n===void 0){let e=XD.get(t);if(e!==void 0)n=zT[e],console.warn(`THREE.WebGLRenderer: Shader chunk "%s" has been deprecated. Use "%s" instead.`,t,e);else throw Error(`Can not resolve #include <`+t+`>`)}return YD(n)}const QD=/#pragma unroll_loop_start\s+for\s*\(\s*int\s+i\s*=\s*(\d+)\s*;\s*i\s*<\s*(\d+)\s*;\s*i\s*\+\+\s*\)\s*{([\s\S]+?)}\s+#pragma unroll_loop_end/g;function $D(e){return e.replace(QD,eO)}function eO(e,t,n,r){let i=``;for(let e=parseInt(t);e0&&(g+=` -`),_=[`#define SHADER_TYPE `+n.shaderType,`#define SHADER_NAME `+n.shaderName,m].filter(zO).join(` +`),_=[`#define SHADER_TYPE `+n.shaderType,`#define SHADER_NAME `+n.shaderName,m].filter(GD).join(` `),_.length>0&&(_+=` -`)):(g=[YO(n),`#define SHADER_TYPE `+n.shaderType,`#define SHADER_NAME `+n.shaderName,m,n.extensionClipCullDistance?`#define USE_CLIP_DISTANCE`:``,n.batching?`#define USE_BATCHING`:``,n.batchingColor?`#define USE_BATCHING_COLOR`:``,n.instancing?`#define USE_INSTANCING`:``,n.instancingColor?`#define USE_INSTANCING_COLOR`:``,n.instancingMorph?`#define USE_INSTANCING_MORPH`:``,n.useFog&&n.fog?`#define USE_FOG`:``,n.useFog&&n.fogExp2?`#define FOG_EXP2`:``,n.map?`#define USE_MAP`:``,n.envMap?`#define USE_ENVMAP`:``,n.envMap?`#define `+u:``,n.lightMap?`#define USE_LIGHTMAP`:``,n.aoMap?`#define USE_AOMAP`:``,n.bumpMap?`#define USE_BUMPMAP`:``,n.normalMap?`#define USE_NORMALMAP`:``,n.normalMapObjectSpace?`#define USE_NORMALMAP_OBJECTSPACE`:``,n.normalMapTangentSpace?`#define USE_NORMALMAP_TANGENTSPACE`:``,n.displacementMap?`#define USE_DISPLACEMENTMAP`:``,n.emissiveMap?`#define USE_EMISSIVEMAP`:``,n.anisotropy?`#define USE_ANISOTROPY`:``,n.anisotropyMap?`#define USE_ANISOTROPYMAP`:``,n.clearcoatMap?`#define USE_CLEARCOATMAP`:``,n.clearcoatRoughnessMap?`#define USE_CLEARCOAT_ROUGHNESSMAP`:``,n.clearcoatNormalMap?`#define USE_CLEARCOAT_NORMALMAP`:``,n.iridescenceMap?`#define USE_IRIDESCENCEMAP`:``,n.iridescenceThicknessMap?`#define USE_IRIDESCENCE_THICKNESSMAP`:``,n.specularMap?`#define USE_SPECULARMAP`:``,n.specularColorMap?`#define USE_SPECULAR_COLORMAP`:``,n.specularIntensityMap?`#define USE_SPECULAR_INTENSITYMAP`:``,n.roughnessMap?`#define USE_ROUGHNESSMAP`:``,n.metalnessMap?`#define USE_METALNESSMAP`:``,n.alphaMap?`#define USE_ALPHAMAP`:``,n.alphaHash?`#define USE_ALPHAHASH`:``,n.transmission?`#define USE_TRANSMISSION`:``,n.transmissionMap?`#define USE_TRANSMISSIONMAP`:``,n.thicknessMap?`#define USE_THICKNESSMAP`:``,n.sheenColorMap?`#define USE_SHEEN_COLORMAP`:``,n.sheenRoughnessMap?`#define USE_SHEEN_ROUGHNESSMAP`:``,n.mapUv?`#define MAP_UV `+n.mapUv:``,n.alphaMapUv?`#define ALPHAMAP_UV `+n.alphaMapUv:``,n.lightMapUv?`#define LIGHTMAP_UV `+n.lightMapUv:``,n.aoMapUv?`#define AOMAP_UV `+n.aoMapUv:``,n.emissiveMapUv?`#define EMISSIVEMAP_UV `+n.emissiveMapUv:``,n.bumpMapUv?`#define BUMPMAP_UV `+n.bumpMapUv:``,n.normalMapUv?`#define NORMALMAP_UV `+n.normalMapUv:``,n.displacementMapUv?`#define DISPLACEMENTMAP_UV `+n.displacementMapUv:``,n.metalnessMapUv?`#define METALNESSMAP_UV `+n.metalnessMapUv:``,n.roughnessMapUv?`#define ROUGHNESSMAP_UV `+n.roughnessMapUv:``,n.anisotropyMapUv?`#define ANISOTROPYMAP_UV `+n.anisotropyMapUv:``,n.clearcoatMapUv?`#define CLEARCOATMAP_UV `+n.clearcoatMapUv:``,n.clearcoatNormalMapUv?`#define CLEARCOAT_NORMALMAP_UV `+n.clearcoatNormalMapUv:``,n.clearcoatRoughnessMapUv?`#define CLEARCOAT_ROUGHNESSMAP_UV `+n.clearcoatRoughnessMapUv:``,n.iridescenceMapUv?`#define IRIDESCENCEMAP_UV `+n.iridescenceMapUv:``,n.iridescenceThicknessMapUv?`#define IRIDESCENCE_THICKNESSMAP_UV `+n.iridescenceThicknessMapUv:``,n.sheenColorMapUv?`#define SHEEN_COLORMAP_UV `+n.sheenColorMapUv:``,n.sheenRoughnessMapUv?`#define SHEEN_ROUGHNESSMAP_UV `+n.sheenRoughnessMapUv:``,n.specularMapUv?`#define SPECULARMAP_UV `+n.specularMapUv:``,n.specularColorMapUv?`#define SPECULAR_COLORMAP_UV `+n.specularColorMapUv:``,n.specularIntensityMapUv?`#define SPECULAR_INTENSITYMAP_UV `+n.specularIntensityMapUv:``,n.transmissionMapUv?`#define TRANSMISSIONMAP_UV `+n.transmissionMapUv:``,n.thicknessMapUv?`#define THICKNESSMAP_UV `+n.thicknessMapUv:``,n.vertexTangents&&n.flatShading===!1?`#define USE_TANGENT`:``,n.vertexColors?`#define USE_COLOR`:``,n.vertexAlphas?`#define USE_COLOR_ALPHA`:``,n.vertexUv1s?`#define USE_UV1`:``,n.vertexUv2s?`#define USE_UV2`:``,n.vertexUv3s?`#define USE_UV3`:``,n.pointsUvs?`#define USE_POINTS_UV`:``,n.flatShading?`#define FLAT_SHADED`:``,n.skinning?`#define USE_SKINNING`:``,n.morphTargets?`#define USE_MORPHTARGETS`:``,n.morphNormals&&n.flatShading===!1?`#define USE_MORPHNORMALS`:``,n.morphColors?`#define USE_MORPHCOLORS`:``,n.morphTargetsCount>0?`#define MORPHTARGETS_TEXTURE_STRIDE `+n.morphTextureStride:``,n.morphTargetsCount>0?`#define MORPHTARGETS_COUNT `+n.morphTargetsCount:``,n.doubleSided?`#define DOUBLE_SIDED`:``,n.flipSided?`#define FLIP_SIDED`:``,n.shadowMapEnabled?`#define USE_SHADOWMAP`:``,n.shadowMapEnabled?`#define `+c:``,n.sizeAttenuation?`#define USE_SIZEATTENUATION`:``,n.numLightProbes>0?`#define USE_LIGHT_PROBES`:``,n.logarithmicDepthBuffer?`#define USE_LOGDEPTHBUF`:``,n.reverseDepthBuffer?`#define USE_REVERSEDEPTHBUF`:``,`uniform mat4 modelMatrix;`,`uniform mat4 modelViewMatrix;`,`uniform mat4 projectionMatrix;`,`uniform mat4 viewMatrix;`,`uniform mat3 normalMatrix;`,`uniform vec3 cameraPosition;`,`uniform bool isOrthographic;`,`#ifdef USE_INSTANCING`,` attribute mat4 instanceMatrix;`,`#endif`,`#ifdef USE_INSTANCING_COLOR`,` attribute vec3 instanceColor;`,`#endif`,`#ifdef USE_INSTANCING_MORPH`,` uniform sampler2D morphTexture;`,`#endif`,`attribute vec3 position;`,`attribute vec3 normal;`,`attribute vec2 uv;`,`#ifdef USE_UV1`,` attribute vec2 uv1;`,`#endif`,`#ifdef USE_UV2`,` attribute vec2 uv2;`,`#endif`,`#ifdef USE_UV3`,` attribute vec2 uv3;`,`#endif`,`#ifdef USE_TANGENT`,` attribute vec4 tangent;`,`#endif`,`#if defined( USE_COLOR_ALPHA )`,` attribute vec4 color;`,`#elif defined( USE_COLOR )`,` attribute vec3 color;`,`#endif`,`#ifdef USE_SKINNING`,` attribute vec4 skinIndex;`,` attribute vec4 skinWeight;`,`#endif`,` -`].filter(zO).join(` -`),_=[YO(n),`#define SHADER_TYPE `+n.shaderType,`#define SHADER_NAME `+n.shaderName,m,n.useFog&&n.fog?`#define USE_FOG`:``,n.useFog&&n.fogExp2?`#define FOG_EXP2`:``,n.alphaToCoverage?`#define ALPHA_TO_COVERAGE`:``,n.map?`#define USE_MAP`:``,n.matcap?`#define USE_MATCAP`:``,n.envMap?`#define USE_ENVMAP`:``,n.envMap?`#define `+l:``,n.envMap?`#define `+u:``,n.envMap?`#define `+d:``,f?`#define CUBEUV_TEXEL_WIDTH `+f.texelWidth:``,f?`#define CUBEUV_TEXEL_HEIGHT `+f.texelHeight:``,f?`#define CUBEUV_MAX_MIP `+f.maxMip+`.0`:``,n.lightMap?`#define USE_LIGHTMAP`:``,n.aoMap?`#define USE_AOMAP`:``,n.bumpMap?`#define USE_BUMPMAP`:``,n.normalMap?`#define USE_NORMALMAP`:``,n.normalMapObjectSpace?`#define USE_NORMALMAP_OBJECTSPACE`:``,n.normalMapTangentSpace?`#define USE_NORMALMAP_TANGENTSPACE`:``,n.emissiveMap?`#define USE_EMISSIVEMAP`:``,n.anisotropy?`#define USE_ANISOTROPY`:``,n.anisotropyMap?`#define USE_ANISOTROPYMAP`:``,n.clearcoat?`#define USE_CLEARCOAT`:``,n.clearcoatMap?`#define USE_CLEARCOATMAP`:``,n.clearcoatRoughnessMap?`#define USE_CLEARCOAT_ROUGHNESSMAP`:``,n.clearcoatNormalMap?`#define USE_CLEARCOAT_NORMALMAP`:``,n.dispersion?`#define USE_DISPERSION`:``,n.iridescence?`#define USE_IRIDESCENCE`:``,n.iridescenceMap?`#define USE_IRIDESCENCEMAP`:``,n.iridescenceThicknessMap?`#define USE_IRIDESCENCE_THICKNESSMAP`:``,n.specularMap?`#define USE_SPECULARMAP`:``,n.specularColorMap?`#define USE_SPECULAR_COLORMAP`:``,n.specularIntensityMap?`#define USE_SPECULAR_INTENSITYMAP`:``,n.roughnessMap?`#define USE_ROUGHNESSMAP`:``,n.metalnessMap?`#define USE_METALNESSMAP`:``,n.alphaMap?`#define USE_ALPHAMAP`:``,n.alphaTest?`#define USE_ALPHATEST`:``,n.alphaHash?`#define USE_ALPHAHASH`:``,n.sheen?`#define USE_SHEEN`:``,n.sheenColorMap?`#define USE_SHEEN_COLORMAP`:``,n.sheenRoughnessMap?`#define USE_SHEEN_ROUGHNESSMAP`:``,n.transmission?`#define USE_TRANSMISSION`:``,n.transmissionMap?`#define USE_TRANSMISSIONMAP`:``,n.thicknessMap?`#define USE_THICKNESSMAP`:``,n.vertexTangents&&n.flatShading===!1?`#define USE_TANGENT`:``,n.vertexColors||n.instancingColor||n.batchingColor?`#define USE_COLOR`:``,n.vertexAlphas?`#define USE_COLOR_ALPHA`:``,n.vertexUv1s?`#define USE_UV1`:``,n.vertexUv2s?`#define USE_UV2`:``,n.vertexUv3s?`#define USE_UV3`:``,n.pointsUvs?`#define USE_POINTS_UV`:``,n.gradientMap?`#define USE_GRADIENTMAP`:``,n.flatShading?`#define FLAT_SHADED`:``,n.doubleSided?`#define DOUBLE_SIDED`:``,n.flipSided?`#define FLIP_SIDED`:``,n.shadowMapEnabled?`#define USE_SHADOWMAP`:``,n.shadowMapEnabled?`#define `+c:``,n.premultipliedAlpha?`#define PREMULTIPLIED_ALPHA`:``,n.numLightProbes>0?`#define USE_LIGHT_PROBES`:``,n.decodeVideoTexture?`#define DECODE_VIDEO_TEXTURE`:``,n.decodeVideoTextureEmissive?`#define DECODE_VIDEO_TEXTURE_EMISSIVE`:``,n.logarithmicDepthBuffer?`#define USE_LOGDEPTHBUF`:``,n.reverseDepthBuffer?`#define USE_REVERSEDEPTHBUF`:``,`uniform mat4 viewMatrix;`,`uniform vec3 cameraPosition;`,`uniform bool isOrthographic;`,n.toneMapping===Cu?``:`#define TONE_MAPPING`,n.toneMapping===Cu?``:NE.tonemapping_pars_fragment,n.toneMapping===Cu?``:NO(`toneMapping`,n.toneMapping),n.dithering?`#define DITHERING`:``,n.opaque?`#define OPAQUE`:``,NE.colorspace_pars_fragment,MO(`linearToOutputTexel`,n.outputColorSpace),FO(),n.useDepthPacking?`#define DEPTH_PACKING `+n.depthPacking:``,` -`].filter(zO).join(` -`)),o=UO(o),o=BO(o,n),o=VO(o,n),s=UO(s),s=BO(s,n),s=VO(s,n),o=qO(o),s=qO(s),n.isRawShaderMaterial!==!0&&(v=`#version 300 es +`)):(g=[tO(n),`#define SHADER_TYPE `+n.shaderType,`#define SHADER_NAME `+n.shaderName,m,n.extensionClipCullDistance?`#define USE_CLIP_DISTANCE`:``,n.batching?`#define USE_BATCHING`:``,n.batchingColor?`#define USE_BATCHING_COLOR`:``,n.instancing?`#define USE_INSTANCING`:``,n.instancingColor?`#define USE_INSTANCING_COLOR`:``,n.instancingMorph?`#define USE_INSTANCING_MORPH`:``,n.useFog&&n.fog?`#define USE_FOG`:``,n.useFog&&n.fogExp2?`#define FOG_EXP2`:``,n.map?`#define USE_MAP`:``,n.envMap?`#define USE_ENVMAP`:``,n.envMap?`#define `+u:``,n.lightMap?`#define USE_LIGHTMAP`:``,n.aoMap?`#define USE_AOMAP`:``,n.bumpMap?`#define USE_BUMPMAP`:``,n.normalMap?`#define USE_NORMALMAP`:``,n.normalMapObjectSpace?`#define USE_NORMALMAP_OBJECTSPACE`:``,n.normalMapTangentSpace?`#define USE_NORMALMAP_TANGENTSPACE`:``,n.displacementMap?`#define USE_DISPLACEMENTMAP`:``,n.emissiveMap?`#define USE_EMISSIVEMAP`:``,n.anisotropy?`#define USE_ANISOTROPY`:``,n.anisotropyMap?`#define USE_ANISOTROPYMAP`:``,n.clearcoatMap?`#define USE_CLEARCOATMAP`:``,n.clearcoatRoughnessMap?`#define USE_CLEARCOAT_ROUGHNESSMAP`:``,n.clearcoatNormalMap?`#define USE_CLEARCOAT_NORMALMAP`:``,n.iridescenceMap?`#define USE_IRIDESCENCEMAP`:``,n.iridescenceThicknessMap?`#define USE_IRIDESCENCE_THICKNESSMAP`:``,n.specularMap?`#define USE_SPECULARMAP`:``,n.specularColorMap?`#define USE_SPECULAR_COLORMAP`:``,n.specularIntensityMap?`#define USE_SPECULAR_INTENSITYMAP`:``,n.roughnessMap?`#define USE_ROUGHNESSMAP`:``,n.metalnessMap?`#define USE_METALNESSMAP`:``,n.alphaMap?`#define USE_ALPHAMAP`:``,n.alphaHash?`#define USE_ALPHAHASH`:``,n.transmission?`#define USE_TRANSMISSION`:``,n.transmissionMap?`#define USE_TRANSMISSIONMAP`:``,n.thicknessMap?`#define USE_THICKNESSMAP`:``,n.sheenColorMap?`#define USE_SHEEN_COLORMAP`:``,n.sheenRoughnessMap?`#define USE_SHEEN_ROUGHNESSMAP`:``,n.mapUv?`#define MAP_UV `+n.mapUv:``,n.alphaMapUv?`#define ALPHAMAP_UV `+n.alphaMapUv:``,n.lightMapUv?`#define LIGHTMAP_UV `+n.lightMapUv:``,n.aoMapUv?`#define AOMAP_UV `+n.aoMapUv:``,n.emissiveMapUv?`#define EMISSIVEMAP_UV `+n.emissiveMapUv:``,n.bumpMapUv?`#define BUMPMAP_UV `+n.bumpMapUv:``,n.normalMapUv?`#define NORMALMAP_UV `+n.normalMapUv:``,n.displacementMapUv?`#define DISPLACEMENTMAP_UV `+n.displacementMapUv:``,n.metalnessMapUv?`#define METALNESSMAP_UV `+n.metalnessMapUv:``,n.roughnessMapUv?`#define ROUGHNESSMAP_UV `+n.roughnessMapUv:``,n.anisotropyMapUv?`#define ANISOTROPYMAP_UV `+n.anisotropyMapUv:``,n.clearcoatMapUv?`#define CLEARCOATMAP_UV `+n.clearcoatMapUv:``,n.clearcoatNormalMapUv?`#define CLEARCOAT_NORMALMAP_UV `+n.clearcoatNormalMapUv:``,n.clearcoatRoughnessMapUv?`#define CLEARCOAT_ROUGHNESSMAP_UV `+n.clearcoatRoughnessMapUv:``,n.iridescenceMapUv?`#define IRIDESCENCEMAP_UV `+n.iridescenceMapUv:``,n.iridescenceThicknessMapUv?`#define IRIDESCENCE_THICKNESSMAP_UV `+n.iridescenceThicknessMapUv:``,n.sheenColorMapUv?`#define SHEEN_COLORMAP_UV `+n.sheenColorMapUv:``,n.sheenRoughnessMapUv?`#define SHEEN_ROUGHNESSMAP_UV `+n.sheenRoughnessMapUv:``,n.specularMapUv?`#define SPECULARMAP_UV `+n.specularMapUv:``,n.specularColorMapUv?`#define SPECULAR_COLORMAP_UV `+n.specularColorMapUv:``,n.specularIntensityMapUv?`#define SPECULAR_INTENSITYMAP_UV `+n.specularIntensityMapUv:``,n.transmissionMapUv?`#define TRANSMISSIONMAP_UV `+n.transmissionMapUv:``,n.thicknessMapUv?`#define THICKNESSMAP_UV `+n.thicknessMapUv:``,n.vertexTangents&&n.flatShading===!1?`#define USE_TANGENT`:``,n.vertexColors?`#define USE_COLOR`:``,n.vertexAlphas?`#define USE_COLOR_ALPHA`:``,n.vertexUv1s?`#define USE_UV1`:``,n.vertexUv2s?`#define USE_UV2`:``,n.vertexUv3s?`#define USE_UV3`:``,n.pointsUvs?`#define USE_POINTS_UV`:``,n.flatShading?`#define FLAT_SHADED`:``,n.skinning?`#define USE_SKINNING`:``,n.morphTargets?`#define USE_MORPHTARGETS`:``,n.morphNormals&&n.flatShading===!1?`#define USE_MORPHNORMALS`:``,n.morphColors?`#define USE_MORPHCOLORS`:``,n.morphTargetsCount>0?`#define MORPHTARGETS_TEXTURE_STRIDE `+n.morphTextureStride:``,n.morphTargetsCount>0?`#define MORPHTARGETS_COUNT `+n.morphTargetsCount:``,n.doubleSided?`#define DOUBLE_SIDED`:``,n.flipSided?`#define FLIP_SIDED`:``,n.shadowMapEnabled?`#define USE_SHADOWMAP`:``,n.shadowMapEnabled?`#define `+c:``,n.sizeAttenuation?`#define USE_SIZEATTENUATION`:``,n.numLightProbes>0?`#define USE_LIGHT_PROBES`:``,n.logarithmicDepthBuffer?`#define USE_LOGDEPTHBUF`:``,n.reverseDepthBuffer?`#define USE_REVERSEDEPTHBUF`:``,`uniform mat4 modelMatrix;`,`uniform mat4 modelViewMatrix;`,`uniform mat4 projectionMatrix;`,`uniform mat4 viewMatrix;`,`uniform mat3 normalMatrix;`,`uniform vec3 cameraPosition;`,`uniform bool isOrthographic;`,`#ifdef USE_INSTANCING`,` attribute mat4 instanceMatrix;`,`#endif`,`#ifdef USE_INSTANCING_COLOR`,` attribute vec3 instanceColor;`,`#endif`,`#ifdef USE_INSTANCING_MORPH`,` uniform sampler2D morphTexture;`,`#endif`,`attribute vec3 position;`,`attribute vec3 normal;`,`attribute vec2 uv;`,`#ifdef USE_UV1`,` attribute vec2 uv1;`,`#endif`,`#ifdef USE_UV2`,` attribute vec2 uv2;`,`#endif`,`#ifdef USE_UV3`,` attribute vec2 uv3;`,`#endif`,`#ifdef USE_TANGENT`,` attribute vec4 tangent;`,`#endif`,`#if defined( USE_COLOR_ALPHA )`,` attribute vec4 color;`,`#elif defined( USE_COLOR )`,` attribute vec3 color;`,`#endif`,`#ifdef USE_SKINNING`,` attribute vec4 skinIndex;`,` attribute vec4 skinWeight;`,`#endif`,` +`].filter(GD).join(` +`),_=[tO(n),`#define SHADER_TYPE `+n.shaderType,`#define SHADER_NAME `+n.shaderName,m,n.useFog&&n.fog?`#define USE_FOG`:``,n.useFog&&n.fogExp2?`#define FOG_EXP2`:``,n.alphaToCoverage?`#define ALPHA_TO_COVERAGE`:``,n.map?`#define USE_MAP`:``,n.matcap?`#define USE_MATCAP`:``,n.envMap?`#define USE_ENVMAP`:``,n.envMap?`#define `+l:``,n.envMap?`#define `+u:``,n.envMap?`#define `+d:``,f?`#define CUBEUV_TEXEL_WIDTH `+f.texelWidth:``,f?`#define CUBEUV_TEXEL_HEIGHT `+f.texelHeight:``,f?`#define CUBEUV_MAX_MIP `+f.maxMip+`.0`:``,n.lightMap?`#define USE_LIGHTMAP`:``,n.aoMap?`#define USE_AOMAP`:``,n.bumpMap?`#define USE_BUMPMAP`:``,n.normalMap?`#define USE_NORMALMAP`:``,n.normalMapObjectSpace?`#define USE_NORMALMAP_OBJECTSPACE`:``,n.normalMapTangentSpace?`#define USE_NORMALMAP_TANGENTSPACE`:``,n.emissiveMap?`#define USE_EMISSIVEMAP`:``,n.anisotropy?`#define USE_ANISOTROPY`:``,n.anisotropyMap?`#define USE_ANISOTROPYMAP`:``,n.clearcoat?`#define USE_CLEARCOAT`:``,n.clearcoatMap?`#define USE_CLEARCOATMAP`:``,n.clearcoatRoughnessMap?`#define USE_CLEARCOAT_ROUGHNESSMAP`:``,n.clearcoatNormalMap?`#define USE_CLEARCOAT_NORMALMAP`:``,n.dispersion?`#define USE_DISPERSION`:``,n.iridescence?`#define USE_IRIDESCENCE`:``,n.iridescenceMap?`#define USE_IRIDESCENCEMAP`:``,n.iridescenceThicknessMap?`#define USE_IRIDESCENCE_THICKNESSMAP`:``,n.specularMap?`#define USE_SPECULARMAP`:``,n.specularColorMap?`#define USE_SPECULAR_COLORMAP`:``,n.specularIntensityMap?`#define USE_SPECULAR_INTENSITYMAP`:``,n.roughnessMap?`#define USE_ROUGHNESSMAP`:``,n.metalnessMap?`#define USE_METALNESSMAP`:``,n.alphaMap?`#define USE_ALPHAMAP`:``,n.alphaTest?`#define USE_ALPHATEST`:``,n.alphaHash?`#define USE_ALPHAHASH`:``,n.sheen?`#define USE_SHEEN`:``,n.sheenColorMap?`#define USE_SHEEN_COLORMAP`:``,n.sheenRoughnessMap?`#define USE_SHEEN_ROUGHNESSMAP`:``,n.transmission?`#define USE_TRANSMISSION`:``,n.transmissionMap?`#define USE_TRANSMISSIONMAP`:``,n.thicknessMap?`#define USE_THICKNESSMAP`:``,n.vertexTangents&&n.flatShading===!1?`#define USE_TANGENT`:``,n.vertexColors||n.instancingColor||n.batchingColor?`#define USE_COLOR`:``,n.vertexAlphas?`#define USE_COLOR_ALPHA`:``,n.vertexUv1s?`#define USE_UV1`:``,n.vertexUv2s?`#define USE_UV2`:``,n.vertexUv3s?`#define USE_UV3`:``,n.pointsUvs?`#define USE_POINTS_UV`:``,n.gradientMap?`#define USE_GRADIENTMAP`:``,n.flatShading?`#define FLAT_SHADED`:``,n.doubleSided?`#define DOUBLE_SIDED`:``,n.flipSided?`#define FLIP_SIDED`:``,n.shadowMapEnabled?`#define USE_SHADOWMAP`:``,n.shadowMapEnabled?`#define `+c:``,n.premultipliedAlpha?`#define PREMULTIPLIED_ALPHA`:``,n.numLightProbes>0?`#define USE_LIGHT_PROBES`:``,n.decodeVideoTexture?`#define DECODE_VIDEO_TEXTURE`:``,n.decodeVideoTextureEmissive?`#define DECODE_VIDEO_TEXTURE_EMISSIVE`:``,n.logarithmicDepthBuffer?`#define USE_LOGDEPTHBUF`:``,n.reverseDepthBuffer?`#define USE_REVERSEDEPTHBUF`:``,`uniform mat4 viewMatrix;`,`uniform vec3 cameraPosition;`,`uniform bool isOrthographic;`,n.toneMapping===kl?``:`#define TONE_MAPPING`,n.toneMapping===kl?``:zT.tonemapping_pars_fragment,n.toneMapping===kl?``:zD(`toneMapping`,n.toneMapping),n.dithering?`#define DITHERING`:``,n.opaque?`#define OPAQUE`:``,zT.colorspace_pars_fragment,RD(`linearToOutputTexel`,n.outputColorSpace),VD(),n.useDepthPacking?`#define DEPTH_PACKING `+n.depthPacking:``,` +`].filter(GD).join(` +`)),o=YD(o),o=KD(o,n),o=qD(o,n),s=YD(s),s=KD(s,n),s=qD(s,n),o=$D(o),s=$D(s),n.isRawShaderMaterial!==!0&&(v=`#version 300 es `,g=[p,`#define attribute in`,`#define varying out`,`#define texture2D texture`].join(` `)+` -`+g,_=[`#define varying in`,n.glslVersion===op?``:`layout(location = 0) out highp vec4 pc_fragColor;`,n.glslVersion===op?``:`#define gl_FragColor pc_fragColor`,`#define gl_FragDepthEXT gl_FragDepth`,`#define texture2D texture`,`#define textureCube texture`,`#define texture2DProj textureProj`,`#define texture2DLodEXT textureLod`,`#define texture2DProjLodEXT textureProjLod`,`#define textureCubeLodEXT textureLod`,`#define texture2DGradEXT textureGrad`,`#define texture2DProjGradEXT textureProjGrad`,`#define textureCubeGradEXT textureGrad`].join(` +`+g,_=[`#define varying in`,n.glslVersion===ff?``:`layout(location = 0) out highp vec4 pc_fragColor;`,n.glslVersion===ff?``:`#define gl_FragColor pc_fragColor`,`#define gl_FragDepthEXT gl_FragDepth`,`#define texture2D texture`,`#define textureCube texture`,`#define texture2DProj textureProj`,`#define texture2DLodEXT textureLod`,`#define texture2DProjLodEXT textureProjLod`,`#define textureCubeLodEXT textureLod`,`#define texture2DGradEXT textureGrad`,`#define texture2DProjGradEXT textureProjGrad`,`#define textureCubeGradEXT textureGrad`].join(` `)+` -`+_);let y=v+g+o,b=v+_+s,x=TO(i,i.VERTEX_SHADER,y),S=TO(i,i.FRAGMENT_SHADER,b);i.attachShader(h,x),i.attachShader(h,S),n.index0AttributeName===void 0?n.morphTargets===!0&&i.bindAttribLocation(h,0,`position`):i.bindAttribLocation(h,0,n.index0AttributeName),i.linkProgram(h);function C(t){if(e.debug.checkShaderErrors){let n=i.getProgramInfoLog(h).trim(),r=i.getShaderInfoLog(x).trim(),a=i.getShaderInfoLog(S).trim(),o=!0,s=!0;if(i.getProgramParameter(h,i.LINK_STATUS)===!1)if(o=!1,typeof e.debug.onShaderError==`function`)e.debug.onShaderError(i,h,x,S);else{let e=jO(i,x,`vertex`),r=jO(i,S,`fragment`);console.error(`THREE.WebGLProgram: Shader Error `+i.getError()+` - VALIDATE_STATUS `+i.getProgramParameter(h,i.VALIDATE_STATUS)+` +`+_);let y=v+g+o,b=v+_+s,x=jD(i,i.VERTEX_SHADER,y),S=jD(i,i.FRAGMENT_SHADER,b);i.attachShader(h,x),i.attachShader(h,S),n.index0AttributeName===void 0?n.morphTargets===!0&&i.bindAttribLocation(h,0,`position`):i.bindAttribLocation(h,0,n.index0AttributeName),i.linkProgram(h);function C(t){if(e.debug.checkShaderErrors){let n=i.getProgramInfoLog(h).trim(),r=i.getShaderInfoLog(x).trim(),a=i.getShaderInfoLog(S).trim(),o=!0,s=!0;if(i.getProgramParameter(h,i.LINK_STATUS)===!1)if(o=!1,typeof e.debug.onShaderError==`function`)e.debug.onShaderError(i,h,x,S);else{let e=LD(i,x,`vertex`),r=LD(i,S,`fragment`);console.error(`THREE.WebGLProgram: Shader Error `+i.getError()+` - VALIDATE_STATUS `+i.getProgramParameter(h,i.VALIDATE_STATUS)+` Material Name: `+t.name+` Material Type: `+t.type+` Program Info Log: `+n+` `+e+` -`+r)}else n===``?(r===``||a===``)&&(s=!1):console.warn(`THREE.WebGLProgram: Program Info Log:`,n);s&&(t.diagnostics={runnable:o,programLog:n,vertexShader:{log:r,prefix:g},fragmentShader:{log:a,prefix:_}})}i.deleteShader(x),i.deleteShader(S),w=new wO(i,h),T=RO(i,h)}let w;this.getUniforms=function(){return w===void 0&&C(this),w};let T;this.getAttributes=function(){return T===void 0&&C(this),T};let E=n.rendererExtensionParallelShaderCompile===!1;return this.isReady=function(){return E===!1&&(E=i.getProgramParameter(h,EO)),E},this.destroy=function(){r.releaseStatesOfProgram(this),i.deleteProgram(h),this.program=void 0},this.type=n.shaderType,this.name=n.shaderName,this.id=DO++,this.cacheKey=t,this.usedTimes=1,this.program=h,this.vertexShader=x,this.fragmentShader=S,this}let nk=0;var rk=class{constructor(){this.shaderCache=new Map,this.materialCache=new Map}update(e){let t=e.vertexShader,n=e.fragmentShader,r=this._getShaderStage(t),i=this._getShaderStage(n),a=this._getShaderCacheForMaterial(e);return a.has(r)===!1&&(a.add(r),r.usedTimes++),a.has(i)===!1&&(a.add(i),i.usedTimes++),this}remove(e){let t=this.materialCache.get(e);for(let e of t)e.usedTimes--,e.usedTimes===0&&this.shaderCache.delete(e.code);return this.materialCache.delete(e),this}getVertexShaderID(e){return this._getShaderStage(e.vertexShader).id}getFragmentShaderID(e){return this._getShaderStage(e.fragmentShader).id}dispose(){this.shaderCache.clear(),this.materialCache.clear()}_getShaderCacheForMaterial(e){let t=this.materialCache,n=t.get(e);return n===void 0&&(n=new Set,t.set(e,n)),n}_getShaderStage(e){let t=this.shaderCache,n=t.get(e);return n===void 0&&(n=new ik(e),t.set(e,n)),n}},ik=class{constructor(e){this.id=nk++,this.code=e,this.usedTimes=0}};function ak(e,t,n,r,i,a,o){let s=new ah,c=new rk,l=new Set,u=[],d=i.logarithmicDepthBuffer,f=i.vertexTextures,p=i.precision,m={MeshDepthMaterial:`depth`,MeshDistanceMaterial:`distanceRGBA`,MeshNormalMaterial:`normal`,MeshBasicMaterial:`basic`,MeshLambertMaterial:`lambert`,MeshPhongMaterial:`phong`,MeshToonMaterial:`toon`,MeshStandardMaterial:`physical`,MeshPhysicalMaterial:`physical`,MeshMatcapMaterial:`matcap`,LineBasicMaterial:`basic`,LineDashedMaterial:`dashed`,PointsMaterial:`points`,ShadowMaterial:`shadow`,SpriteMaterial:`sprite`};function h(e){return l.add(e),e===0?`uv`:`uv${e}`}function g(a,s,u,g,_){let v=g.fog,y=_.geometry,b=a.isMeshStandardMaterial?g.environment:null,x=(a.isMeshStandardMaterial?n:t).get(a.envMap||b),S=x&&x.mapping===Ru?x.image.height:null,C=m[a.type];a.precision!==null&&(p=i.getMaxPrecision(a.precision),p!==a.precision&&console.warn(`THREE.WebGLProgram.getParameters:`,a.precision,`not supported, using`,p,`instead.`));let w=y.morphAttributes.position||y.morphAttributes.normal||y.morphAttributes.color,T=w===void 0?0:w.length,E=0;y.morphAttributes.position!==void 0&&(E=1),y.morphAttributes.normal!==void 0&&(E=2),y.morphAttributes.color!==void 0&&(E=3);let D,O,k,A;if(C){let e=PE[C];D=e.vertexShader,O=e.fragmentShader}else D=a.vertexShader,O=a.fragmentShader,c.update(a),k=c.getVertexShaderID(a),A=c.getFragmentShaderID(a);let j=e.getRenderTarget(),M=e.state.buffers.depth.getReversed(),N=_.isInstancedMesh===!0,ee=_.isBatchedMesh===!0,te=!!a.map,P=!!a.matcap,ne=!!x,re=!!a.aoMap,ie=!!a.lightMap,ae=!!a.bumpMap,oe=!!a.normalMap,se=!!a.displacementMap,ce=!!a.emissiveMap,le=!!a.metalnessMap,ue=!!a.roughnessMap,de=a.anisotropy>0,fe=a.clearcoat>0,pe=a.dispersion>0,F=a.iridescence>0,me=a.sheen>0,he=a.transmission>0,ge=de&&!!a.anisotropyMap,I=fe&&!!a.clearcoatMap,_e=fe&&!!a.clearcoatNormalMap,L=fe&&!!a.clearcoatRoughnessMap,ve=F&&!!a.iridescenceMap,ye=F&&!!a.iridescenceThicknessMap,be=me&&!!a.sheenColorMap,xe=me&&!!a.sheenRoughnessMap,Se=!!a.specularMap,Ce=!!a.specularColorMap,we=!!a.specularIntensityMap,Te=he&&!!a.transmissionMap,Ee=he&&!!a.thicknessMap,De=!!a.gradientMap,Oe=!!a.alphaMap,ke=a.alphaTest>0,Ae=!!a.alphaHash,je=!!a.extensions,Me=Cu;a.toneMapped&&(j===null||j.isXRRenderTarget===!0)&&(Me=e.toneMapping);let Ne={shaderID:C,shaderType:a.type,shaderName:a.name,vertexShader:D,fragmentShader:O,defines:a.defines,customVertexShaderID:k,customFragmentShaderID:A,isRawShaderMaterial:a.isRawShaderMaterial===!0,glslVersion:a.glslVersion,precision:p,batching:ee,batchingColor:ee&&_._colorsTexture!==null,instancing:N,instancingColor:N&&_.instanceColor!==null,instancingMorph:N&&_.morphTexture!==null,supportsVertexTextures:f,outputColorSpace:j===null?e.outputColorSpace:j.isXRRenderTarget===!0?j.texture.colorSpace:Cf,alphaToCoverage:!!a.alphaToCoverage,map:te,matcap:P,envMap:ne,envMapMode:ne&&x.mapping,envMapCubeUVHeight:S,aoMap:re,lightMap:ie,bumpMap:ae,normalMap:oe,displacementMap:f&&se,emissiveMap:ce,normalMapObjectSpace:oe&&a.normalMapType===bf,normalMapTangentSpace:oe&&a.normalMapType===yf,metalnessMap:le,roughnessMap:ue,anisotropy:de,anisotropyMap:ge,clearcoat:fe,clearcoatMap:I,clearcoatNormalMap:_e,clearcoatRoughnessMap:L,dispersion:pe,iridescence:F,iridescenceMap:ve,iridescenceThicknessMap:ye,sheen:me,sheenColorMap:be,sheenRoughnessMap:xe,specularMap:Se,specularColorMap:Ce,specularIntensityMap:we,transmission:he,transmissionMap:Te,thicknessMap:Ee,gradientMap:De,opaque:a.transparent===!1&&a.blending===Vl&&a.alphaToCoverage===!1,alphaMap:Oe,alphaTest:ke,alphaHash:Ae,combine:a.combine,mapUv:te&&h(a.map.channel),aoMapUv:re&&h(a.aoMap.channel),lightMapUv:ie&&h(a.lightMap.channel),bumpMapUv:ae&&h(a.bumpMap.channel),normalMapUv:oe&&h(a.normalMap.channel),displacementMapUv:se&&h(a.displacementMap.channel),emissiveMapUv:ce&&h(a.emissiveMap.channel),metalnessMapUv:le&&h(a.metalnessMap.channel),roughnessMapUv:ue&&h(a.roughnessMap.channel),anisotropyMapUv:ge&&h(a.anisotropyMap.channel),clearcoatMapUv:I&&h(a.clearcoatMap.channel),clearcoatNormalMapUv:_e&&h(a.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:L&&h(a.clearcoatRoughnessMap.channel),iridescenceMapUv:ve&&h(a.iridescenceMap.channel),iridescenceThicknessMapUv:ye&&h(a.iridescenceThicknessMap.channel),sheenColorMapUv:be&&h(a.sheenColorMap.channel),sheenRoughnessMapUv:xe&&h(a.sheenRoughnessMap.channel),specularMapUv:Se&&h(a.specularMap.channel),specularColorMapUv:Ce&&h(a.specularColorMap.channel),specularIntensityMapUv:we&&h(a.specularIntensityMap.channel),transmissionMapUv:Te&&h(a.transmissionMap.channel),thicknessMapUv:Ee&&h(a.thicknessMap.channel),alphaMapUv:Oe&&h(a.alphaMap.channel),vertexTangents:!!y.attributes.tangent&&(oe||de),vertexColors:a.vertexColors,vertexAlphas:a.vertexColors===!0&&!!y.attributes.color&&y.attributes.color.itemSize===4,pointsUvs:_.isPoints===!0&&!!y.attributes.uv&&(te||Oe),fog:!!v,useFog:a.fog===!0,fogExp2:!!v&&v.isFogExp2,flatShading:a.flatShading===!0,sizeAttenuation:a.sizeAttenuation===!0,logarithmicDepthBuffer:d,reverseDepthBuffer:M,skinning:_.isSkinnedMesh===!0,morphTargets:y.morphAttributes.position!==void 0,morphNormals:y.morphAttributes.normal!==void 0,morphColors:y.morphAttributes.color!==void 0,morphTargetsCount:T,morphTextureStride:E,numDirLights:s.directional.length,numPointLights:s.point.length,numSpotLights:s.spot.length,numSpotLightMaps:s.spotLightMap.length,numRectAreaLights:s.rectArea.length,numHemiLights:s.hemi.length,numDirLightShadows:s.directionalShadowMap.length,numPointLightShadows:s.pointShadowMap.length,numSpotLightShadows:s.spotShadowMap.length,numSpotLightShadowsWithMaps:s.numSpotLightShadowsWithMaps,numLightProbes:s.numLightProbes,numClippingPlanes:o.numPlanes,numClipIntersection:o.numIntersection,dithering:a.dithering,shadowMapEnabled:e.shadowMap.enabled&&u.length>0,shadowMapType:e.shadowMap.type,toneMapping:Me,decodeVideoTexture:te&&a.map.isVideoTexture===!0&&im.getTransfer(a.map.colorSpace)===Tf,decodeVideoTextureEmissive:ce&&a.emissiveMap.isVideoTexture===!0&&im.getTransfer(a.emissiveMap.colorSpace)===Tf,premultipliedAlpha:a.premultipliedAlpha,doubleSided:a.side===zl,flipSided:a.side===Rl,useDepthPacking:a.depthPacking>=0,depthPacking:a.depthPacking||0,index0AttributeName:a.index0AttributeName,extensionClipCullDistance:je&&a.extensions.clipCullDistance===!0&&r.has(`WEBGL_clip_cull_distance`),extensionMultiDraw:(je&&a.extensions.multiDraw===!0||ee)&&r.has(`WEBGL_multi_draw`),rendererExtensionParallelShaderCompile:r.has(`KHR_parallel_shader_compile`),customProgramCacheKey:a.customProgramCacheKey()};return Ne.vertexUv1s=l.has(1),Ne.vertexUv2s=l.has(2),Ne.vertexUv3s=l.has(3),l.clear(),Ne}function _(t){let n=[];if(t.shaderID?n.push(t.shaderID):(n.push(t.customVertexShaderID),n.push(t.customFragmentShaderID)),t.defines!==void 0)for(let e in t.defines)n.push(e),n.push(t.defines[e]);return t.isRawShaderMaterial===!1&&(v(n,t),y(n,t),n.push(e.outputColorSpace)),n.push(t.customProgramCacheKey),n.join()}function v(e,t){e.push(t.precision),e.push(t.outputColorSpace),e.push(t.envMapMode),e.push(t.envMapCubeUVHeight),e.push(t.mapUv),e.push(t.alphaMapUv),e.push(t.lightMapUv),e.push(t.aoMapUv),e.push(t.bumpMapUv),e.push(t.normalMapUv),e.push(t.displacementMapUv),e.push(t.emissiveMapUv),e.push(t.metalnessMapUv),e.push(t.roughnessMapUv),e.push(t.anisotropyMapUv),e.push(t.clearcoatMapUv),e.push(t.clearcoatNormalMapUv),e.push(t.clearcoatRoughnessMapUv),e.push(t.iridescenceMapUv),e.push(t.iridescenceThicknessMapUv),e.push(t.sheenColorMapUv),e.push(t.sheenRoughnessMapUv),e.push(t.specularMapUv),e.push(t.specularColorMapUv),e.push(t.specularIntensityMapUv),e.push(t.transmissionMapUv),e.push(t.thicknessMapUv),e.push(t.combine),e.push(t.fogExp2),e.push(t.sizeAttenuation),e.push(t.morphTargetsCount),e.push(t.morphAttributeCount),e.push(t.numDirLights),e.push(t.numPointLights),e.push(t.numSpotLights),e.push(t.numSpotLightMaps),e.push(t.numHemiLights),e.push(t.numRectAreaLights),e.push(t.numDirLightShadows),e.push(t.numPointLightShadows),e.push(t.numSpotLightShadows),e.push(t.numSpotLightShadowsWithMaps),e.push(t.numLightProbes),e.push(t.shadowMapType),e.push(t.toneMapping),e.push(t.numClippingPlanes),e.push(t.numClipIntersection),e.push(t.depthPacking)}function y(e,t){s.disableAll(),t.supportsVertexTextures&&s.enable(0),t.instancing&&s.enable(1),t.instancingColor&&s.enable(2),t.instancingMorph&&s.enable(3),t.matcap&&s.enable(4),t.envMap&&s.enable(5),t.normalMapObjectSpace&&s.enable(6),t.normalMapTangentSpace&&s.enable(7),t.clearcoat&&s.enable(8),t.iridescence&&s.enable(9),t.alphaTest&&s.enable(10),t.vertexColors&&s.enable(11),t.vertexAlphas&&s.enable(12),t.vertexUv1s&&s.enable(13),t.vertexUv2s&&s.enable(14),t.vertexUv3s&&s.enable(15),t.vertexTangents&&s.enable(16),t.anisotropy&&s.enable(17),t.alphaHash&&s.enable(18),t.batching&&s.enable(19),t.dispersion&&s.enable(20),t.batchingColor&&s.enable(21),e.push(s.mask),s.disableAll(),t.fog&&s.enable(0),t.useFog&&s.enable(1),t.flatShading&&s.enable(2),t.logarithmicDepthBuffer&&s.enable(3),t.reverseDepthBuffer&&s.enable(4),t.skinning&&s.enable(5),t.morphTargets&&s.enable(6),t.morphNormals&&s.enable(7),t.morphColors&&s.enable(8),t.premultipliedAlpha&&s.enable(9),t.shadowMapEnabled&&s.enable(10),t.doubleSided&&s.enable(11),t.flipSided&&s.enable(12),t.useDepthPacking&&s.enable(13),t.dithering&&s.enable(14),t.transmission&&s.enable(15),t.sheen&&s.enable(16),t.opaque&&s.enable(17),t.pointsUvs&&s.enable(18),t.decodeVideoTexture&&s.enable(19),t.decodeVideoTextureEmissive&&s.enable(20),t.alphaToCoverage&&s.enable(21),e.push(s.mask)}function b(e){let t=m[e.type],n;if(t){let e=PE[t];n=Pg.clone(e.uniforms)}else n=e.uniforms;return n}function x(t,n){let r;for(let e=0,t=u.length;e0?r.push(u):a.transparent===!0?i.push(u):n.push(u)}function c(e,t,a,s,c,l){let u=o(e,t,a,s,c,l);a.transmission>0?r.unshift(u):a.transparent===!0?i.unshift(u):n.unshift(u)}function l(e,t){n.length>1&&n.sort(e||sk),r.length>1&&r.sort(t||ck),i.length>1&&i.sort(t||ck)}function u(){for(let n=t,r=e.length;n=r.length?(i=new lk,r.push(i)):i=r[n],i}function n(){e=new WeakMap}return{get:t,dispose:n}}function dk(){let e={};return{get:function(t){if(e[t.id]!==void 0)return e[t.id];let n;switch(t.type){case`DirectionalLight`:n={direction:new W,color:new K};break;case`SpotLight`:n={position:new W,direction:new W,color:new K,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case`PointLight`:n={position:new W,color:new K,distance:0,decay:0};break;case`HemisphereLight`:n={direction:new W,skyColor:new K,groundColor:new K};break;case`RectAreaLight`:n={color:new K,position:new W,halfWidth:new W,halfHeight:new W};break}return e[t.id]=n,n}}}function fk(){let e={};return{get:function(t){if(e[t.id]!==void 0)return e[t.id];let n;switch(t.type){case`DirectionalLight`:n={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new U};break;case`SpotLight`:n={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new U};break;case`PointLight`:n={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new U,shadowCameraNear:1,shadowCameraFar:1e3};break}return e[t.id]=n,n}}}let pk=0;function mk(e,t){return(t.castShadow?2:0)-(e.castShadow?2:0)+(t.map?1:0)-(e.map?1:0)}function hk(e){let t=new dk,n=fk(),r={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1,numSpotMaps:-1,numLightProbes:-1},ambient:[0,0,0],probe:[],directional:[],directionalShadow:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotLightMap:[],spotShadow:[],spotShadowMap:[],spotLightMatrix:[],rectArea:[],rectAreaLTC1:null,rectAreaLTC2:null,point:[],pointShadow:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[],numSpotLightShadowsWithMaps:0,numLightProbes:0};for(let e=0;e<9;e++)r.probe.push(new W);let i=new W,a=new G,o=new G;function s(i){let a=0,o=0,s=0;for(let e=0;e<9;e++)r.probe[e].set(0,0,0);let c=0,l=0,u=0,d=0,f=0,p=0,m=0,h=0,g=0,_=0,v=0;i.sort(mk);for(let e=0,y=i.length;e0&&(e.has(`OES_texture_float_linear`)===!0?(r.rectAreaLTC1=J.LTC_FLOAT_1,r.rectAreaLTC2=J.LTC_FLOAT_2):(r.rectAreaLTC1=J.LTC_HALF_1,r.rectAreaLTC2=J.LTC_HALF_2)),r.ambient[0]=a,r.ambient[1]=o,r.ambient[2]=s;let y=r.hash;(y.directionalLength!==c||y.pointLength!==l||y.spotLength!==u||y.rectAreaLength!==d||y.hemiLength!==f||y.numDirectionalShadows!==p||y.numPointShadows!==m||y.numSpotShadows!==h||y.numSpotMaps!==g||y.numLightProbes!==v)&&(r.directional.length=c,r.spot.length=u,r.rectArea.length=d,r.point.length=l,r.hemi.length=f,r.directionalShadow.length=p,r.directionalShadowMap.length=p,r.pointShadow.length=m,r.pointShadowMap.length=m,r.spotShadow.length=h,r.spotShadowMap.length=h,r.directionalShadowMatrix.length=p,r.pointShadowMatrix.length=m,r.spotLightMatrix.length=h+g-_,r.spotLightMap.length=g,r.numSpotLightShadowsWithMaps=_,r.numLightProbes=v,y.directionalLength=c,y.pointLength=l,y.spotLength=u,y.rectAreaLength=d,y.hemiLength=f,y.numDirectionalShadows=p,y.numPointShadows=m,y.numSpotShadows=h,y.numSpotMaps=g,y.numLightProbes=v,r.version=pk++)}function c(e,t){let n=0,s=0,c=0,l=0,u=0,d=t.matrixWorldInverse;for(let t=0,f=e.length;t=i.length?(a=new gk(e),i.push(a)):a=i[r],a}function r(){t=new WeakMap}return{get:n,dispose:r}}const vk=`void main() { +`+r)}else n===``?(r===``||a===``)&&(s=!1):console.warn(`THREE.WebGLProgram: Program Info Log:`,n);s&&(t.diagnostics={runnable:o,programLog:n,vertexShader:{log:r,prefix:g},fragmentShader:{log:a,prefix:_}})}i.deleteShader(x),i.deleteShader(S),w=new AD(i,h),T=WD(i,h)}let w;this.getUniforms=function(){return w===void 0&&C(this),w};let T;this.getAttributes=function(){return T===void 0&&C(this),T};let E=n.rendererExtensionParallelShaderCompile===!1;return this.isReady=function(){return E===!1&&(E=i.getProgramParameter(h,MD)),E},this.destroy=function(){r.releaseStatesOfProgram(this),i.deleteProgram(h),this.program=void 0},this.type=n.shaderType,this.name=n.shaderName,this.id=ND++,this.cacheKey=t,this.usedTimes=1,this.program=h,this.vertexShader=x,this.fragmentShader=S,this}let cO=0;var lO=class{constructor(){this.shaderCache=new Map,this.materialCache=new Map}update(e){let t=e.vertexShader,n=e.fragmentShader,r=this._getShaderStage(t),i=this._getShaderStage(n),a=this._getShaderCacheForMaterial(e);return a.has(r)===!1&&(a.add(r),r.usedTimes++),a.has(i)===!1&&(a.add(i),i.usedTimes++),this}remove(e){let t=this.materialCache.get(e);for(let e of t)e.usedTimes--,e.usedTimes===0&&this.shaderCache.delete(e.code);return this.materialCache.delete(e),this}getVertexShaderID(e){return this._getShaderStage(e.vertexShader).id}getFragmentShaderID(e){return this._getShaderStage(e.fragmentShader).id}dispose(){this.shaderCache.clear(),this.materialCache.clear()}_getShaderCacheForMaterial(e){let t=this.materialCache,n=t.get(e);return n===void 0&&(n=new Set,t.set(e,n)),n}_getShaderStage(e){let t=this.shaderCache,n=t.get(e);return n===void 0&&(n=new uO(e),t.set(e,n)),n}},uO=class{constructor(e){this.id=cO++,this.code=e,this.usedTimes=0}};function dO(e,t,n,r,i,a,o){let s=new dm,c=new lO,l=new Set,u=[],d=i.logarithmicDepthBuffer,f=i.vertexTextures,p=i.precision,m={MeshDepthMaterial:`depth`,MeshDistanceMaterial:`distanceRGBA`,MeshNormalMaterial:`normal`,MeshBasicMaterial:`basic`,MeshLambertMaterial:`lambert`,MeshPhongMaterial:`phong`,MeshToonMaterial:`toon`,MeshStandardMaterial:`physical`,MeshPhysicalMaterial:`physical`,MeshMatcapMaterial:`matcap`,LineBasicMaterial:`basic`,LineDashedMaterial:`dashed`,PointsMaterial:`points`,ShadowMaterial:`shadow`,SpriteMaterial:`sprite`};function h(e){return l.add(e),e===0?`uv`:`uv${e}`}function g(a,s,u,g,_){let v=g.fog,y=_.geometry,b=a.isMeshStandardMaterial?g.environment:null,x=(a.isMeshStandardMaterial?n:t).get(a.envMap||b),S=x&&x.mapping===Wl?x.image.height:null,C=m[a.type];a.precision!==null&&(p=i.getMaxPrecision(a.precision),p!==a.precision&&console.warn(`THREE.WebGLProgram.getParameters:`,a.precision,`not supported, using`,p,`instead.`));let w=y.morphAttributes.position||y.morphAttributes.normal||y.morphAttributes.color,T=w===void 0?0:w.length,E=0;y.morphAttributes.position!==void 0&&(E=1),y.morphAttributes.normal!==void 0&&(E=2),y.morphAttributes.color!==void 0&&(E=3);let D,O,k,A;if(C){let e=BT[C];D=e.vertexShader,O=e.fragmentShader}else D=a.vertexShader,O=a.fragmentShader,c.update(a),k=c.getVertexShaderID(a),A=c.getFragmentShaderID(a);let j=e.getRenderTarget(),M=e.state.buffers.depth.getReversed(),N=_.isInstancedMesh===!0,ee=_.isBatchedMesh===!0,te=!!a.map,P=!!a.matcap,ne=!!x,re=!!a.aoMap,ie=!!a.lightMap,ae=!!a.bumpMap,oe=!!a.normalMap,se=!!a.displacementMap,ce=!!a.emissiveMap,le=!!a.metalnessMap,ue=!!a.roughnessMap,de=a.anisotropy>0,fe=a.clearcoat>0,pe=a.dispersion>0,F=a.iridescence>0,me=a.sheen>0,he=a.transmission>0,ge=de&&!!a.anisotropyMap,I=fe&&!!a.clearcoatMap,_e=fe&&!!a.clearcoatNormalMap,L=fe&&!!a.clearcoatRoughnessMap,ve=F&&!!a.iridescenceMap,ye=F&&!!a.iridescenceThicknessMap,be=me&&!!a.sheenColorMap,xe=me&&!!a.sheenRoughnessMap,Se=!!a.specularMap,Ce=!!a.specularColorMap,we=!!a.specularIntensityMap,Te=he&&!!a.transmissionMap,Ee=he&&!!a.thicknessMap,De=!!a.gradientMap,Oe=!!a.alphaMap,ke=a.alphaTest>0,Ae=!!a.alphaHash,je=!!a.extensions,Me=kl;a.toneMapped&&(j===null||j.isXRRenderTarget===!0)&&(Me=e.toneMapping);let Ne={shaderID:C,shaderType:a.type,shaderName:a.name,vertexShader:D,fragmentShader:O,defines:a.defines,customVertexShaderID:k,customFragmentShaderID:A,isRawShaderMaterial:a.isRawShaderMaterial===!0,glslVersion:a.glslVersion,precision:p,batching:ee,batchingColor:ee&&_._colorsTexture!==null,instancing:N,instancingColor:N&&_.instanceColor!==null,instancingMorph:N&&_.morphTexture!==null,supportsVertexTextures:f,outputColorSpace:j===null?e.outputColorSpace:j.isXRRenderTarget===!0?j.texture.colorSpace:Dd,alphaToCoverage:!!a.alphaToCoverage,map:te,matcap:P,envMap:ne,envMapMode:ne&&x.mapping,envMapCubeUVHeight:S,aoMap:re,lightMap:ie,bumpMap:ae,normalMap:oe,displacementMap:f&&se,emissiveMap:ce,normalMapObjectSpace:oe&&a.normalMapType===wd,normalMapTangentSpace:oe&&a.normalMapType===Cd,metalnessMap:le,roughnessMap:ue,anisotropy:de,anisotropyMap:ge,clearcoat:fe,clearcoatMap:I,clearcoatNormalMap:_e,clearcoatRoughnessMap:L,dispersion:pe,iridescence:F,iridescenceMap:ve,iridescenceThicknessMap:ye,sheen:me,sheenColorMap:be,sheenRoughnessMap:xe,specularMap:Se,specularColorMap:Ce,specularIntensityMap:we,transmission:he,transmissionMap:Te,thicknessMap:Ee,gradientMap:De,opaque:a.transparent===!1&&a.blending===qc&&a.alphaToCoverage===!1,alphaMap:Oe,alphaTest:ke,alphaHash:Ae,combine:a.combine,mapUv:te&&h(a.map.channel),aoMapUv:re&&h(a.aoMap.channel),lightMapUv:ie&&h(a.lightMap.channel),bumpMapUv:ae&&h(a.bumpMap.channel),normalMapUv:oe&&h(a.normalMap.channel),displacementMapUv:se&&h(a.displacementMap.channel),emissiveMapUv:ce&&h(a.emissiveMap.channel),metalnessMapUv:le&&h(a.metalnessMap.channel),roughnessMapUv:ue&&h(a.roughnessMap.channel),anisotropyMapUv:ge&&h(a.anisotropyMap.channel),clearcoatMapUv:I&&h(a.clearcoatMap.channel),clearcoatNormalMapUv:_e&&h(a.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:L&&h(a.clearcoatRoughnessMap.channel),iridescenceMapUv:ve&&h(a.iridescenceMap.channel),iridescenceThicknessMapUv:ye&&h(a.iridescenceThicknessMap.channel),sheenColorMapUv:be&&h(a.sheenColorMap.channel),sheenRoughnessMapUv:xe&&h(a.sheenRoughnessMap.channel),specularMapUv:Se&&h(a.specularMap.channel),specularColorMapUv:Ce&&h(a.specularColorMap.channel),specularIntensityMapUv:we&&h(a.specularIntensityMap.channel),transmissionMapUv:Te&&h(a.transmissionMap.channel),thicknessMapUv:Ee&&h(a.thicknessMap.channel),alphaMapUv:Oe&&h(a.alphaMap.channel),vertexTangents:!!y.attributes.tangent&&(oe||de),vertexColors:a.vertexColors,vertexAlphas:a.vertexColors===!0&&!!y.attributes.color&&y.attributes.color.itemSize===4,pointsUvs:_.isPoints===!0&&!!y.attributes.uv&&(te||Oe),fog:!!v,useFog:a.fog===!0,fogExp2:!!v&&v.isFogExp2,flatShading:a.flatShading===!0,sizeAttenuation:a.sizeAttenuation===!0,logarithmicDepthBuffer:d,reverseDepthBuffer:M,skinning:_.isSkinnedMesh===!0,morphTargets:y.morphAttributes.position!==void 0,morphNormals:y.morphAttributes.normal!==void 0,morphColors:y.morphAttributes.color!==void 0,morphTargetsCount:T,morphTextureStride:E,numDirLights:s.directional.length,numPointLights:s.point.length,numSpotLights:s.spot.length,numSpotLightMaps:s.spotLightMap.length,numRectAreaLights:s.rectArea.length,numHemiLights:s.hemi.length,numDirLightShadows:s.directionalShadowMap.length,numPointLightShadows:s.pointShadowMap.length,numSpotLightShadows:s.spotShadowMap.length,numSpotLightShadowsWithMaps:s.numSpotLightShadowsWithMaps,numLightProbes:s.numLightProbes,numClippingPlanes:o.numPlanes,numClipIntersection:o.numIntersection,dithering:a.dithering,shadowMapEnabled:e.shadowMap.enabled&&u.length>0,shadowMapType:e.shadowMap.type,toneMapping:Me,decodeVideoTexture:te&&a.map.isVideoTexture===!0&&up.getTransfer(a.map.colorSpace)===kd,decodeVideoTextureEmissive:ce&&a.emissiveMap.isVideoTexture===!0&&up.getTransfer(a.emissiveMap.colorSpace)===kd,premultipliedAlpha:a.premultipliedAlpha,doubleSided:a.side===Gc,flipSided:a.side===Wc,useDepthPacking:a.depthPacking>=0,depthPacking:a.depthPacking||0,index0AttributeName:a.index0AttributeName,extensionClipCullDistance:je&&a.extensions.clipCullDistance===!0&&r.has(`WEBGL_clip_cull_distance`),extensionMultiDraw:(je&&a.extensions.multiDraw===!0||ee)&&r.has(`WEBGL_multi_draw`),rendererExtensionParallelShaderCompile:r.has(`KHR_parallel_shader_compile`),customProgramCacheKey:a.customProgramCacheKey()};return Ne.vertexUv1s=l.has(1),Ne.vertexUv2s=l.has(2),Ne.vertexUv3s=l.has(3),l.clear(),Ne}function _(t){let n=[];if(t.shaderID?n.push(t.shaderID):(n.push(t.customVertexShaderID),n.push(t.customFragmentShaderID)),t.defines!==void 0)for(let e in t.defines)n.push(e),n.push(t.defines[e]);return t.isRawShaderMaterial===!1&&(v(n,t),y(n,t),n.push(e.outputColorSpace)),n.push(t.customProgramCacheKey),n.join()}function v(e,t){e.push(t.precision),e.push(t.outputColorSpace),e.push(t.envMapMode),e.push(t.envMapCubeUVHeight),e.push(t.mapUv),e.push(t.alphaMapUv),e.push(t.lightMapUv),e.push(t.aoMapUv),e.push(t.bumpMapUv),e.push(t.normalMapUv),e.push(t.displacementMapUv),e.push(t.emissiveMapUv),e.push(t.metalnessMapUv),e.push(t.roughnessMapUv),e.push(t.anisotropyMapUv),e.push(t.clearcoatMapUv),e.push(t.clearcoatNormalMapUv),e.push(t.clearcoatRoughnessMapUv),e.push(t.iridescenceMapUv),e.push(t.iridescenceThicknessMapUv),e.push(t.sheenColorMapUv),e.push(t.sheenRoughnessMapUv),e.push(t.specularMapUv),e.push(t.specularColorMapUv),e.push(t.specularIntensityMapUv),e.push(t.transmissionMapUv),e.push(t.thicknessMapUv),e.push(t.combine),e.push(t.fogExp2),e.push(t.sizeAttenuation),e.push(t.morphTargetsCount),e.push(t.morphAttributeCount),e.push(t.numDirLights),e.push(t.numPointLights),e.push(t.numSpotLights),e.push(t.numSpotLightMaps),e.push(t.numHemiLights),e.push(t.numRectAreaLights),e.push(t.numDirLightShadows),e.push(t.numPointLightShadows),e.push(t.numSpotLightShadows),e.push(t.numSpotLightShadowsWithMaps),e.push(t.numLightProbes),e.push(t.shadowMapType),e.push(t.toneMapping),e.push(t.numClippingPlanes),e.push(t.numClipIntersection),e.push(t.depthPacking)}function y(e,t){s.disableAll(),t.supportsVertexTextures&&s.enable(0),t.instancing&&s.enable(1),t.instancingColor&&s.enable(2),t.instancingMorph&&s.enable(3),t.matcap&&s.enable(4),t.envMap&&s.enable(5),t.normalMapObjectSpace&&s.enable(6),t.normalMapTangentSpace&&s.enable(7),t.clearcoat&&s.enable(8),t.iridescence&&s.enable(9),t.alphaTest&&s.enable(10),t.vertexColors&&s.enable(11),t.vertexAlphas&&s.enable(12),t.vertexUv1s&&s.enable(13),t.vertexUv2s&&s.enable(14),t.vertexUv3s&&s.enable(15),t.vertexTangents&&s.enable(16),t.anisotropy&&s.enable(17),t.alphaHash&&s.enable(18),t.batching&&s.enable(19),t.dispersion&&s.enable(20),t.batchingColor&&s.enable(21),e.push(s.mask),s.disableAll(),t.fog&&s.enable(0),t.useFog&&s.enable(1),t.flatShading&&s.enable(2),t.logarithmicDepthBuffer&&s.enable(3),t.reverseDepthBuffer&&s.enable(4),t.skinning&&s.enable(5),t.morphTargets&&s.enable(6),t.morphNormals&&s.enable(7),t.morphColors&&s.enable(8),t.premultipliedAlpha&&s.enable(9),t.shadowMapEnabled&&s.enable(10),t.doubleSided&&s.enable(11),t.flipSided&&s.enable(12),t.useDepthPacking&&s.enable(13),t.dithering&&s.enable(14),t.transmission&&s.enable(15),t.sheen&&s.enable(16),t.opaque&&s.enable(17),t.pointsUvs&&s.enable(18),t.decodeVideoTexture&&s.enable(19),t.decodeVideoTextureEmissive&&s.enable(20),t.alphaToCoverage&&s.enable(21),e.push(s.mask)}function b(e){let t=m[e.type],n;if(t){let e=BT[t];n=Bh.clone(e.uniforms)}else n=e.uniforms;return n}function x(t,n){let r;for(let e=0,t=u.length;e0?r.push(u):a.transparent===!0?i.push(u):n.push(u)}function c(e,t,a,s,c,l){let u=o(e,t,a,s,c,l);a.transmission>0?r.unshift(u):a.transparent===!0?i.unshift(u):n.unshift(u)}function l(e,t){n.length>1&&n.sort(e||pO),r.length>1&&r.sort(t||mO),i.length>1&&i.sort(t||mO)}function u(){for(let n=t,r=e.length;n=r.length?(i=new hO,r.push(i)):i=r[n],i}function n(){e=new WeakMap}return{get:t,dispose:n}}function _O(){let e={};return{get:function(t){if(e[t.id]!==void 0)return e[t.id];let n;switch(t.type){case`DirectionalLight`:n={direction:new W,color:new K};break;case`SpotLight`:n={position:new W,direction:new W,color:new K,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case`PointLight`:n={position:new W,color:new K,distance:0,decay:0};break;case`HemisphereLight`:n={direction:new W,skyColor:new K,groundColor:new K};break;case`RectAreaLight`:n={color:new K,position:new W,halfWidth:new W,halfHeight:new W};break}return e[t.id]=n,n}}}function vO(){let e={};return{get:function(t){if(e[t.id]!==void 0)return e[t.id];let n;switch(t.type){case`DirectionalLight`:n={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new U};break;case`SpotLight`:n={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new U};break;case`PointLight`:n={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new U,shadowCameraNear:1,shadowCameraFar:1e3};break}return e[t.id]=n,n}}}let yO=0;function bO(e,t){return(t.castShadow?2:0)-(e.castShadow?2:0)+(t.map?1:0)-(e.map?1:0)}function xO(e){let t=new _O,n=vO(),r={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1,numSpotMaps:-1,numLightProbes:-1},ambient:[0,0,0],probe:[],directional:[],directionalShadow:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotLightMap:[],spotShadow:[],spotShadowMap:[],spotLightMatrix:[],rectArea:[],rectAreaLTC1:null,rectAreaLTC2:null,point:[],pointShadow:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[],numSpotLightShadowsWithMaps:0,numLightProbes:0};for(let e=0;e<9;e++)r.probe.push(new W);let i=new W,a=new G,o=new G;function s(i){let a=0,o=0,s=0;for(let e=0;e<9;e++)r.probe[e].set(0,0,0);let c=0,l=0,u=0,d=0,f=0,p=0,m=0,h=0,g=0,_=0,v=0;i.sort(bO);for(let e=0,y=i.length;e0&&(e.has(`OES_texture_float_linear`)===!0?(r.rectAreaLTC1=J.LTC_FLOAT_1,r.rectAreaLTC2=J.LTC_FLOAT_2):(r.rectAreaLTC1=J.LTC_HALF_1,r.rectAreaLTC2=J.LTC_HALF_2)),r.ambient[0]=a,r.ambient[1]=o,r.ambient[2]=s;let y=r.hash;(y.directionalLength!==c||y.pointLength!==l||y.spotLength!==u||y.rectAreaLength!==d||y.hemiLength!==f||y.numDirectionalShadows!==p||y.numPointShadows!==m||y.numSpotShadows!==h||y.numSpotMaps!==g||y.numLightProbes!==v)&&(r.directional.length=c,r.spot.length=u,r.rectArea.length=d,r.point.length=l,r.hemi.length=f,r.directionalShadow.length=p,r.directionalShadowMap.length=p,r.pointShadow.length=m,r.pointShadowMap.length=m,r.spotShadow.length=h,r.spotShadowMap.length=h,r.directionalShadowMatrix.length=p,r.pointShadowMatrix.length=m,r.spotLightMatrix.length=h+g-_,r.spotLightMap.length=g,r.numSpotLightShadowsWithMaps=_,r.numLightProbes=v,y.directionalLength=c,y.pointLength=l,y.spotLength=u,y.rectAreaLength=d,y.hemiLength=f,y.numDirectionalShadows=p,y.numPointShadows=m,y.numSpotShadows=h,y.numSpotMaps=g,y.numLightProbes=v,r.version=yO++)}function c(e,t){let n=0,s=0,c=0,l=0,u=0,d=t.matrixWorldInverse;for(let t=0,f=e.length;t=i.length?(a=new SO(e),i.push(a)):a=i[r],a}function r(){t=new WeakMap}return{get:n,dispose:r}}const wO=`void main() { gl_Position = vec4( position, 1.0 ); -}`,yk=`uniform sampler2D shadow_pass; +}`,TO=`uniform sampler2D shadow_pass; uniform vec2 resolution; uniform float radius; #include @@ -3802,12 +3808,12 @@ void main() { squared_mean = squared_mean / samples; float std_dev = sqrt( squared_mean - mean * mean ); gl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) ); -}`;function bk(e,t,n){let r=new Q_,i=new U,a=new U,o=new hm,s=new Kb({depthPacking:gf}),c=new qb,l={},u=n.maxTextureSize,d={[Ll]:Rl,[Rl]:Ll,[zl]:zl},f=new Lg({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new U},radius:{value:4}},vertexShader:vk,fragmentShader:yk}),p=f.clone();p.defines.HORIZONTAL_PASS=1;let m=new mg;m.setAttribute(`position`,new Qh(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));let h=new Eg(m,f),g=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=Pl;let _=this.type;this.render=function(t,n,s){if(g.enabled===!1||g.autoUpdate===!1&&g.needsUpdate===!1||t.length===0)return;let c=e.getRenderTarget(),l=e.getActiveCubeFace(),d=e.getActiveMipmapLevel(),f=e.state;f.setBlending(Bl),f.buffers.color.setClear(1,1,1,1),f.buffers.depth.setTest(!0),f.setScissorTest(!1);let p=_!==Il&&this.type===Il,m=_===Il&&this.type!==Il;for(let c=0,l=t.length;cu||i.y>u)&&(i.x>u&&(a.x=Math.floor(u/h.x),i.x=a.x*h.x,d.mapSize.x=a.x),i.y>u&&(a.y=Math.floor(u/h.y),i.y=a.y*h.y,d.mapSize.y=a.y)),d.map===null||p===!0||m===!0){let e=this.type===Il?{}:{minFilter:Hu,magFilter:Hu};d.map!==null&&d.map.dispose(),d.map=new _m(i.x,i.y,e),d.map.texture.name=l.name+`.shadowMap`,d.camera.updateProjectionMatrix()}e.setRenderTarget(d.map),e.clear();let g=d.getViewportCount();for(let e=0;e0||n.map&&n.alphaTest>0||n.alphaToCoverage===!0){let e=a.uuid,t=n.uuid,r=l[e];r===void 0&&(r={},l[e]=r);let i=r[t];i===void 0&&(i=a.clone(),r[t]=i,n.addEventListener(`dispose`,x)),a=i}if(a.visible=n.visible,a.wireframe=n.wireframe,i===Il?a.side=n.shadowSide===null?n.side:n.shadowSide:a.side=n.shadowSide===null?d[n.side]:n.shadowSide,a.alphaMap=n.alphaMap,a.alphaTest=n.alphaToCoverage===!0?.5:n.alphaTest,a.map=n.map,a.clipShadows=n.clipShadows,a.clippingPlanes=n.clippingPlanes,a.clipIntersection=n.clipIntersection,a.displacementMap=n.displacementMap,a.displacementScale=n.displacementScale,a.displacementBias=n.displacementBias,a.wireframeLinewidth=n.wireframeLinewidth,a.linewidth=n.linewidth,r.isPointLight===!0&&a.isMeshDistanceMaterial===!0){let t=e.properties.get(a);t.light=r}return a}function b(n,i,a,o,s){if(n.visible===!1)return;let c=n.layers.test(i.layers);if(c&&(n.isMesh||n.isLine||n.isPoints)&&(n.castShadow||n.receiveShadow&&s===Il)&&(!n.frustumCulled||r.intersectsObject(n))){n.modelViewMatrix.multiplyMatrices(a.matrixWorldInverse,n.matrixWorld);let r=t.update(n),c=n.material;if(Array.isArray(c)){let t=r.groups;for(let l=0,u=t.length;l=2):(N=parseFloat(/^WebGL (\d)/.exec(ee)[1]),M=N>=1);let te=null,P={},ne=e.getParameter(e.SCISSOR_BOX),re=e.getParameter(e.VIEWPORT),ie=new hm().fromArray(ne),ae=new hm().fromArray(re);function oe(t,n,r,i){let a=new Uint8Array(4),o=e.createTexture();e.bindTexture(t,o),e.texParameteri(t,e.TEXTURE_MIN_FILTER,e.NEAREST),e.texParameteri(t,e.TEXTURE_MAG_FILTER,e.NEAREST);for(let o=0;o`u`?!1:/OculusBrowser/g.test(navigator.userAgent),l=new U,u=new WeakMap,d,f=new WeakMap,p=!1;try{p=typeof OffscreenCanvas<`u`&&new OffscreenCanvas(1,1).getContext(`2d`)!==null}catch{}function m(e,t){return p?new OffscreenCanvas(e,t):Jp(`canvas`)}function h(e,t,n){let r=1,i=be(e);if((i.width>n||i.height>n)&&(r=n/Math.max(i.width,i.height)),r<1)if(typeof HTMLImageElement<`u`&&e instanceof HTMLImageElement||typeof HTMLCanvasElement<`u`&&e instanceof HTMLCanvasElement||typeof ImageBitmap<`u`&&e instanceof ImageBitmap||typeof VideoFrame<`u`&&e instanceof VideoFrame){let n=Math.floor(r*i.width),a=Math.floor(r*i.height);d===void 0&&(d=m(n,a));let o=t?m(n,a):d;o.width=n,o.height=a;let s=o.getContext(`2d`);return s.drawImage(e,0,0,n,a),console.warn(`THREE.WebGLRenderer: Texture has been resized from (`+i.width+`x`+i.height+`) to (`+n+`x`+a+`).`),o}else return`data`in e&&console.warn(`THREE.WebGLRenderer: Image in DataTexture is too big (`+i.width+`x`+i.height+`).`),e;return e}function g(e){return e.generateMipmaps}function _(t){e.generateMipmap(t)}function v(t){return t.isWebGLCubeRenderTarget?e.TEXTURE_CUBE_MAP:t.isWebGL3DRenderTarget?e.TEXTURE_3D:t.isWebGLArrayRenderTarget||t.isCompressedArrayTexture?e.TEXTURE_2D_ARRAY:e.TEXTURE_2D}function y(n,r,i,a,o=!1){if(n!==null){if(e[n]!==void 0)return e[n];console.warn(`THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '`+n+`'`)}let s=r;if(r===e.RED&&(i===e.FLOAT&&(s=e.R32F),i===e.HALF_FLOAT&&(s=e.R16F),i===e.UNSIGNED_BYTE&&(s=e.R8)),r===e.RED_INTEGER&&(i===e.UNSIGNED_BYTE&&(s=e.R8UI),i===e.UNSIGNED_SHORT&&(s=e.R16UI),i===e.UNSIGNED_INT&&(s=e.R32UI),i===e.BYTE&&(s=e.R8I),i===e.SHORT&&(s=e.R16I),i===e.INT&&(s=e.R32I)),r===e.RG&&(i===e.FLOAT&&(s=e.RG32F),i===e.HALF_FLOAT&&(s=e.RG16F),i===e.UNSIGNED_BYTE&&(s=e.RG8)),r===e.RG_INTEGER&&(i===e.UNSIGNED_BYTE&&(s=e.RG8UI),i===e.UNSIGNED_SHORT&&(s=e.RG16UI),i===e.UNSIGNED_INT&&(s=e.RG32UI),i===e.BYTE&&(s=e.RG8I),i===e.SHORT&&(s=e.RG16I),i===e.INT&&(s=e.RG32I)),r===e.RGB_INTEGER&&(i===e.UNSIGNED_BYTE&&(s=e.RGB8UI),i===e.UNSIGNED_SHORT&&(s=e.RGB16UI),i===e.UNSIGNED_INT&&(s=e.RGB32UI),i===e.BYTE&&(s=e.RGB8I),i===e.SHORT&&(s=e.RGB16I),i===e.INT&&(s=e.RGB32I)),r===e.RGBA_INTEGER&&(i===e.UNSIGNED_BYTE&&(s=e.RGBA8UI),i===e.UNSIGNED_SHORT&&(s=e.RGBA16UI),i===e.UNSIGNED_INT&&(s=e.RGBA32UI),i===e.BYTE&&(s=e.RGBA8I),i===e.SHORT&&(s=e.RGBA16I),i===e.INT&&(s=e.RGBA32I)),r===e.RGB&&i===e.UNSIGNED_INT_5_9_9_9_REV&&(s=e.RGB9_E5),r===e.RGBA){let t=o?wf:im.getTransfer(a);i===e.FLOAT&&(s=e.RGBA32F),i===e.HALF_FLOAT&&(s=e.RGBA16F),i===e.UNSIGNED_BYTE&&(s=t===Tf?e.SRGB8_ALPHA8:e.RGBA8),i===e.UNSIGNED_SHORT_4_4_4_4&&(s=e.RGBA4),i===e.UNSIGNED_SHORT_5_5_5_1&&(s=e.RGB5_A1)}return(s===e.R16F||s===e.R32F||s===e.RG16F||s===e.RG32F||s===e.RGBA16F||s===e.RGBA32F)&&t.get(`EXT_color_buffer_float`),s}function b(t,n){let r;return t?n===null||n===rd||n===cd?r=e.DEPTH24_STENCIL8:n===id?r=e.DEPTH32F_STENCIL8:n===td&&(r=e.DEPTH24_STENCIL8,console.warn(`DepthTexture: 16 bit depth attachment is not supported with stencil. Using 24-bit attachment.`)):n===null||n===rd||n===cd?r=e.DEPTH_COMPONENT24:n===id?r=e.DEPTH_COMPONENT32F:n===td&&(r=e.DEPTH_COMPONENT16),r}function x(e,t){return g(e)===!0||e.isFramebufferTexture&&e.minFilter!==Hu&&e.minFilter!==qu?Math.log2(Math.max(t.width,t.height))+1:e.mipmaps!==void 0&&e.mipmaps.length>0?e.mipmaps.length:e.isCompressedTexture&&Array.isArray(e.image)?t.mipmaps.length:1}function S(e){let t=e.target;t.removeEventListener(`dispose`,S),w(t),t.isVideoTexture&&u.delete(t)}function C(e){let t=e.target;t.removeEventListener(`dispose`,C),E(t)}function w(e){let t=r.get(e);if(t.__webglInit===void 0)return;let n=e.source,i=f.get(n);if(i){let r=i[t.__cacheKey];r.usedTimes--,r.usedTimes===0&&T(e),Object.keys(i).length===0&&f.delete(n)}r.remove(e)}function T(t){let n=r.get(t);e.deleteTexture(n.__webglTexture);let i=t.source,a=f.get(i);delete a[n.__cacheKey],o.memory.textures--}function E(t){let n=r.get(t);if(t.depthTexture&&(t.depthTexture.dispose(),r.remove(t.depthTexture)),t.isWebGLCubeRenderTarget)for(let t=0;t<6;t++){if(Array.isArray(n.__webglFramebuffer[t]))for(let r=0;r=i.maxTextures&&console.warn(`THREE.WebGLTextures: Trying to use `+e+` texture units while this GPU supports only `+i.maxTextures),D+=1,e}function A(e){let t=[];return t.push(e.wrapS),t.push(e.wrapT),t.push(e.wrapR||0),t.push(e.magFilter),t.push(e.minFilter),t.push(e.anisotropy),t.push(e.internalFormat),t.push(e.format),t.push(e.type),t.push(e.generateMipmaps),t.push(e.premultiplyAlpha),t.push(e.flipY),t.push(e.unpackAlignment),t.push(e.colorSpace),t.join()}function j(t,i){let a=r.get(t);if(t.isVideoTexture&&ve(t),t.isRenderTargetTexture===!1&&t.version>0&&a.__version!==t.version){let e=t.image;if(e===null)console.warn(`THREE.WebGLRenderer: Texture marked for update but no image data found.`);else if(e.complete===!1)console.warn(`THREE.WebGLRenderer: Texture marked for update but image is incomplete`);else{se(a,t,i);return}}n.bindTexture(e.TEXTURE_2D,a.__webglTexture,e.TEXTURE0+i)}function M(t,i){let a=r.get(t);if(t.version>0&&a.__version!==t.version){se(a,t,i);return}n.bindTexture(e.TEXTURE_2D_ARRAY,a.__webglTexture,e.TEXTURE0+i)}function N(t,i){let a=r.get(t);if(t.version>0&&a.__version!==t.version){se(a,t,i);return}n.bindTexture(e.TEXTURE_3D,a.__webglTexture,e.TEXTURE0+i)}function ee(t,i){let a=r.get(t);if(t.version>0&&a.__version!==t.version){ce(a,t,i);return}n.bindTexture(e.TEXTURE_CUBE_MAP,a.__webglTexture,e.TEXTURE0+i)}let te={[zu]:e.REPEAT,[Bu]:e.CLAMP_TO_EDGE,[Vu]:e.MIRRORED_REPEAT},P={[Hu]:e.NEAREST,[Uu]:e.NEAREST_MIPMAP_NEAREST,[Gu]:e.NEAREST_MIPMAP_LINEAR,[qu]:e.LINEAR,[Ju]:e.LINEAR_MIPMAP_NEAREST,[Xu]:e.LINEAR_MIPMAP_LINEAR},ne={[Hf]:e.NEVER,[Yf]:e.ALWAYS,[Uf]:e.LESS,[Gf]:e.LEQUAL,[Wf]:e.EQUAL,[Jf]:e.GEQUAL,[Kf]:e.GREATER,[qf]:e.NOTEQUAL};function re(n,a){if(a.type===id&&t.has(`OES_texture_float_linear`)===!1&&(a.magFilter===qu||a.magFilter===Ju||a.magFilter===Gu||a.magFilter===Xu||a.minFilter===qu||a.minFilter===Ju||a.minFilter===Gu||a.minFilter===Xu)&&console.warn(`THREE.WebGLRenderer: Unable to use linear filtering with floating point textures. OES_texture_float_linear not supported on this device.`),e.texParameteri(n,e.TEXTURE_WRAP_S,te[a.wrapS]),e.texParameteri(n,e.TEXTURE_WRAP_T,te[a.wrapT]),(n===e.TEXTURE_3D||n===e.TEXTURE_2D_ARRAY)&&e.texParameteri(n,e.TEXTURE_WRAP_R,te[a.wrapR]),e.texParameteri(n,e.TEXTURE_MAG_FILTER,P[a.magFilter]),e.texParameteri(n,e.TEXTURE_MIN_FILTER,P[a.minFilter]),a.compareFunction&&(e.texParameteri(n,e.TEXTURE_COMPARE_MODE,e.COMPARE_REF_TO_TEXTURE),e.texParameteri(n,e.TEXTURE_COMPARE_FUNC,ne[a.compareFunction])),t.has(`EXT_texture_filter_anisotropic`)===!0){if(a.magFilter===Hu||a.minFilter!==Gu&&a.minFilter!==Xu||a.type===id&&t.has(`OES_texture_float_linear`)===!1)return;if(a.anisotropy>1||r.get(a).__currentAnisotropy){let o=t.get(`EXT_texture_filter_anisotropic`);e.texParameterf(n,o.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(a.anisotropy,i.getMaxAnisotropy())),r.get(a).__currentAnisotropy=a.anisotropy}}}function ie(t,n){let r=!1;t.__webglInit===void 0&&(t.__webglInit=!0,n.addEventListener(`dispose`,S));let i=n.source,a=f.get(i);a===void 0&&(a={},f.set(i,a));let s=A(n);if(s!==t.__cacheKey){a[s]===void 0&&(a[s]={texture:e.createTexture(),usedTimes:0},o.memory.textures++,r=!0),a[s].usedTimes++;let i=a[t.__cacheKey];i!==void 0&&(a[t.__cacheKey].usedTimes--,i.usedTimes===0&&T(n)),t.__cacheKey=s,t.__webglTexture=a[s].texture}return r}function ae(e,t,n){return Math.floor(Math.floor(e/n)/t)}function oe(t,r,i,a){let o=4,s=t.updateRanges;if(s.length===0)n.texSubImage2D(e.TEXTURE_2D,0,0,0,r.width,r.height,i,a,r.data);else{s.sort((e,t)=>e.start-t.start);let c=0;for(let e=1;e0){T&&E&&n.texStorage2D(e.TEXTURE_2D,O,S,w[0].width,w[0].height);for(let t=0,r=w.length;t0){let r=JC(C.width,C.height,o.format,o.type);for(let i of o.layerUpdates){let a=C.data.subarray(i*r/C.data.BYTES_PER_ELEMENT,(i+1)*r/C.data.BYTES_PER_ELEMENT);n.compressedTexSubImage3D(e.TEXTURE_2D_ARRAY,t,0,0,i,C.width,C.height,1,m,a)}o.clearLayerUpdates()}else n.compressedTexSubImage3D(e.TEXTURE_2D_ARRAY,t,0,0,0,C.width,C.height,p.depth,m,C.data)}else n.compressedTexImage3D(e.TEXTURE_2D_ARRAY,t,S,C.width,C.height,p.depth,0,C.data,0,0);else console.warn(`THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()`);else T?D&&n.texSubImage3D(e.TEXTURE_2D_ARRAY,t,0,0,0,C.width,C.height,p.depth,m,v,C.data):n.texImage3D(e.TEXTURE_2D_ARRAY,t,S,C.width,C.height,p.depth,0,m,v,C.data)}else{T&&E&&n.texStorage2D(e.TEXTURE_2D,O,S,w[0].width,w[0].height);for(let t=0,r=w.length;t0){let t=JC(p.width,p.height,o.format,o.type);for(let r of o.layerUpdates){let i=p.data.subarray(r*t/p.data.BYTES_PER_ELEMENT,(r+1)*t/p.data.BYTES_PER_ELEMENT);n.texSubImage3D(e.TEXTURE_2D_ARRAY,0,0,0,r,p.width,p.height,1,m,v,i)}o.clearLayerUpdates()}else n.texSubImage3D(e.TEXTURE_2D_ARRAY,0,0,0,0,p.width,p.height,p.depth,m,v,p.data)}else n.texImage3D(e.TEXTURE_2D_ARRAY,0,S,p.width,p.height,p.depth,0,m,v,p.data);else if(o.isData3DTexture)T?(E&&n.texStorage3D(e.TEXTURE_3D,O,S,p.width,p.height,p.depth),D&&n.texSubImage3D(e.TEXTURE_3D,0,0,0,0,p.width,p.height,p.depth,m,v,p.data)):n.texImage3D(e.TEXTURE_3D,0,S,p.width,p.height,p.depth,0,m,v,p.data);else if(o.isFramebufferTexture){if(E)if(T)n.texStorage2D(e.TEXTURE_2D,O,S,p.width,p.height);else{let t=p.width,r=p.height;for(let i=0;i>=1,r>>=1}}else if(w.length>0){if(T&&E){let t=be(w[0]);n.texStorage2D(e.TEXTURE_2D,O,S,t.width,t.height)}for(let t=0,r=w.length;t0&&D++;let t=be(m[0]);n.texStorage2D(e.TEXTURE_CUBE_MAP,D,C,t.width,t.height)}for(let t=0;t<6;t++)if(p){w?E&&n.texSubImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+t,0,0,0,m[t].width,m[t].height,b,S,m[t].data):n.texImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+t,0,C,m[t].width,m[t].height,0,b,S,m[t].data);for(let r=0;r>u),r=Math.max(1,i.height>>u);l===e.TEXTURE_3D||l===e.TEXTURE_2D_ARRAY?n.texImage3D(l,u,p,t,r,i.depth,0,d,f,null):n.texImage2D(l,u,p,t,r,0,d,f,null)}n.bindFramebuffer(e.FRAMEBUFFER,t),L(i)?s.framebufferTexture2DMultisampleEXT(e.FRAMEBUFFER,c,l,h.__webglTexture,0,_e(i)):(l===e.TEXTURE_2D||l>=e.TEXTURE_CUBE_MAP_POSITIVE_X&&l<=e.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&e.framebufferTexture2D(e.FRAMEBUFFER,c,l,h.__webglTexture,u),n.bindFramebuffer(e.FRAMEBUFFER,null)}function ue(t,n,r){if(e.bindRenderbuffer(e.RENDERBUFFER,t),n.depthBuffer){let i=n.depthTexture,a=i&&i.isDepthTexture?i.type:null,o=b(n.stencilBuffer,a),c=n.stencilBuffer?e.DEPTH_STENCIL_ATTACHMENT:e.DEPTH_ATTACHMENT,l=_e(n),u=L(n);u?s.renderbufferStorageMultisampleEXT(e.RENDERBUFFER,l,o,n.width,n.height):r?e.renderbufferStorageMultisample(e.RENDERBUFFER,l,o,n.width,n.height):e.renderbufferStorage(e.RENDERBUFFER,o,n.width,n.height),e.framebufferRenderbuffer(e.FRAMEBUFFER,c,e.RENDERBUFFER,t)}else{let t=n.textures;for(let i=0;i{delete i.__boundDepthTexture,delete i.__depthDisposeCallback,e.removeEventListener(`dispose`,t)};e.addEventListener(`dispose`,t),i.__depthDisposeCallback=t}i.__boundDepthTexture=e}if(t.depthTexture&&!i.__autoAllocateDepthBuffer){if(a)throw Error(`target.depthTexture not supported in Cube render targets`);let e=t.texture.mipmaps;e&&e.length>0?de(i.__webglFramebuffer[0],t):de(i.__webglFramebuffer,t)}else if(a){i.__webglDepthbuffer=[];for(let r=0;r<6;r++)if(n.bindFramebuffer(e.FRAMEBUFFER,i.__webglFramebuffer[r]),i.__webglDepthbuffer[r]===void 0)i.__webglDepthbuffer[r]=e.createRenderbuffer(),ue(i.__webglDepthbuffer[r],t,!1);else{let n=t.stencilBuffer?e.DEPTH_STENCIL_ATTACHMENT:e.DEPTH_ATTACHMENT,a=i.__webglDepthbuffer[r];e.bindRenderbuffer(e.RENDERBUFFER,a),e.framebufferRenderbuffer(e.FRAMEBUFFER,n,e.RENDERBUFFER,a)}}else{let r=t.texture.mipmaps;if(r&&r.length>0?n.bindFramebuffer(e.FRAMEBUFFER,i.__webglFramebuffer[0]):n.bindFramebuffer(e.FRAMEBUFFER,i.__webglFramebuffer),i.__webglDepthbuffer===void 0)i.__webglDepthbuffer=e.createRenderbuffer(),ue(i.__webglDepthbuffer,t,!1);else{let n=t.stencilBuffer?e.DEPTH_STENCIL_ATTACHMENT:e.DEPTH_ATTACHMENT,r=i.__webglDepthbuffer;e.bindRenderbuffer(e.RENDERBUFFER,r),e.framebufferRenderbuffer(e.FRAMEBUFFER,n,e.RENDERBUFFER,r)}}n.bindFramebuffer(e.FRAMEBUFFER,null)}function pe(t,n,i){let a=r.get(t);n!==void 0&&le(a.__webglFramebuffer,t,t.texture,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,0),i!==void 0&&fe(t)}function F(t){let i=t.texture,s=r.get(t),c=r.get(i);t.addEventListener(`dispose`,C);let l=t.textures,u=t.isWebGLCubeRenderTarget===!0,d=l.length>1;if(d||(c.__webglTexture===void 0&&(c.__webglTexture=e.createTexture()),c.__version=i.version,o.memory.textures++),u){s.__webglFramebuffer=[];for(let t=0;t<6;t++)if(i.mipmaps&&i.mipmaps.length>0){s.__webglFramebuffer[t]=[];for(let n=0;n0){s.__webglFramebuffer=[];for(let t=0;t0&&L(t)===!1){s.__webglMultisampledFramebuffer=e.createFramebuffer(),s.__webglColorRenderbuffer=[],n.bindFramebuffer(e.FRAMEBUFFER,s.__webglMultisampledFramebuffer);for(let n=0;n0)for(let r=0;r0)for(let n=0;n0){if(L(t)===!1){let i=t.textures,a=t.width,o=t.height,s=e.COLOR_BUFFER_BIT,l=t.stencilBuffer?e.DEPTH_STENCIL_ATTACHMENT:e.DEPTH_ATTACHMENT,u=r.get(t),d=i.length>1;if(d)for(let t=0;t0?n.bindFramebuffer(e.DRAW_FRAMEBUFFER,u.__webglFramebuffer[0]):n.bindFramebuffer(e.DRAW_FRAMEBUFFER,u.__webglFramebuffer);for(let n=0;n0&&t.has(`WEBGL_multisampled_render_to_texture`)===!0&&n.__useRenderToTexture!==!1}function ve(e){let t=o.render.frame;u.get(e)!==t&&(u.set(e,t),e.update())}function ye(e,t){let n=e.colorSpace,r=e.format,i=e.type;return e.isCompressedTexture===!0||e.isVideoTexture===!0||n!==Cf&&n!==xf&&(im.getTransfer(n)===Tf?(r!==fd||i!==Qu)&&console.warn(`THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType.`):console.error(`THREE.WebGLTextures: Unsupported texture color space:`,n)),t}function be(e){return typeof HTMLImageElement<`u`&&e instanceof HTMLImageElement?(l.width=e.naturalWidth||e.width,l.height=e.naturalHeight||e.height):typeof VideoFrame<`u`&&e instanceof VideoFrame?(l.width=e.displayWidth,l.height=e.displayHeight):(l.width=e.width,l.height=e.height),l}this.allocateTextureUnit=k,this.resetTextureUnits=O,this.setTexture2D=j,this.setTexture2DArray=M,this.setTexture3D=N,this.setTextureCube=ee,this.rebindTextures=pe,this.setupRenderTarget=F,this.updateRenderTargetMipmap=me,this.updateMultisampleRenderTarget=I,this.setupDepthRenderbuffer=fe,this.setupFrameBufferTexture=le,this.useMultisampledRTT=L}function wk(e,t){function n(n,r=xf){let i,a=im.getTransfer(r);if(n===Qu)return e.UNSIGNED_BYTE;if(n===od)return e.UNSIGNED_SHORT_4_4_4_4;if(n===sd)return e.UNSIGNED_SHORT_5_5_5_1;if(n===ld)return e.UNSIGNED_INT_5_9_9_9_REV;if(n===$u)return e.BYTE;if(n===ed)return e.SHORT;if(n===td)return e.UNSIGNED_SHORT;if(n===nd)return e.INT;if(n===rd)return e.UNSIGNED_INT;if(n===id)return e.FLOAT;if(n===ad)return e.HALF_FLOAT;if(n===ud)return e.ALPHA;if(n===dd)return e.RGB;if(n===fd)return e.RGBA;if(n===pd)return e.DEPTH_COMPONENT;if(n===md)return e.DEPTH_STENCIL;if(n===hd)return e.RED;if(n===gd)return e.RED_INTEGER;if(n===_d)return e.RG;if(n===vd)return e.RG_INTEGER;if(n===bd)return e.RGBA_INTEGER;if(n===xd||n===Sd||n===Cd||n===wd)if(a===Tf)if(i=t.get(`WEBGL_compressed_texture_s3tc_srgb`),i!==null){if(n===xd)return i.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(n===Sd)return i.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(n===Cd)return i.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(n===wd)return i.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else return null;else if(i=t.get(`WEBGL_compressed_texture_s3tc`),i!==null){if(n===xd)return i.COMPRESSED_RGB_S3TC_DXT1_EXT;if(n===Sd)return i.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(n===Cd)return i.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(n===wd)return i.COMPRESSED_RGBA_S3TC_DXT5_EXT}else return null;if(n===Td||n===Ed||n===Dd||n===Od)if(i=t.get(`WEBGL_compressed_texture_pvrtc`),i!==null){if(n===Td)return i.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(n===Ed)return i.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(n===Dd)return i.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(n===Od)return i.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}else return null;if(n===kd||n===Ad||n===jd)if(i=t.get(`WEBGL_compressed_texture_etc`),i!==null){if(n===kd||n===Ad)return a===Tf?i.COMPRESSED_SRGB8_ETC2:i.COMPRESSED_RGB8_ETC2;if(n===jd)return a===Tf?i.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:i.COMPRESSED_RGBA8_ETC2_EAC}else return null;if(n===Md||n===Nd||n===Pd||n===Fd||n===Id||n===Ld||n===Rd||n===zd||n===Bd||n===Vd||n===Hd||n===Ud||n===Wd||n===Gd)if(i=t.get(`WEBGL_compressed_texture_astc`),i!==null){if(n===Md)return a===Tf?i.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:i.COMPRESSED_RGBA_ASTC_4x4_KHR;if(n===Nd)return a===Tf?i.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:i.COMPRESSED_RGBA_ASTC_5x4_KHR;if(n===Pd)return a===Tf?i.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:i.COMPRESSED_RGBA_ASTC_5x5_KHR;if(n===Fd)return a===Tf?i.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:i.COMPRESSED_RGBA_ASTC_6x5_KHR;if(n===Id)return a===Tf?i.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:i.COMPRESSED_RGBA_ASTC_6x6_KHR;if(n===Ld)return a===Tf?i.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:i.COMPRESSED_RGBA_ASTC_8x5_KHR;if(n===Rd)return a===Tf?i.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:i.COMPRESSED_RGBA_ASTC_8x6_KHR;if(n===zd)return a===Tf?i.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:i.COMPRESSED_RGBA_ASTC_8x8_KHR;if(n===Bd)return a===Tf?i.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:i.COMPRESSED_RGBA_ASTC_10x5_KHR;if(n===Vd)return a===Tf?i.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:i.COMPRESSED_RGBA_ASTC_10x6_KHR;if(n===Hd)return a===Tf?i.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:i.COMPRESSED_RGBA_ASTC_10x8_KHR;if(n===Ud)return a===Tf?i.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:i.COMPRESSED_RGBA_ASTC_10x10_KHR;if(n===Wd)return a===Tf?i.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:i.COMPRESSED_RGBA_ASTC_12x10_KHR;if(n===Gd)return a===Tf?i.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:i.COMPRESSED_RGBA_ASTC_12x12_KHR}else return null;if(n===Kd||n===qd||n===Jd)if(i=t.get(`EXT_texture_compression_bptc`),i!==null){if(n===Kd)return a===Tf?i.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:i.COMPRESSED_RGBA_BPTC_UNORM_EXT;if(n===qd)return i.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT;if(n===Jd)return i.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT}else return null;if(n===Yd||n===Xd||n===Zd||n===Qd)if(i=t.get(`EXT_texture_compression_rgtc`),i!==null){if(n===Kd)return i.COMPRESSED_RED_RGTC1_EXT;if(n===Xd)return i.COMPRESSED_SIGNED_RED_RGTC1_EXT;if(n===Zd)return i.COMPRESSED_RED_GREEN_RGTC2_EXT;if(n===Qd)return i.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT}else return null;return n===cd?e.UNSIGNED_INT_24_8:e[n]===void 0?null:e[n]}return{convert:n}}const Tk=` +}`;function EO(e,t,n){let r=new i_,i=new U,a=new U,o=new xp,s=new Qy({depthPacking:bd}),c=new $y,l={},u=n.maxTextureSize,d={[Uc]:Wc,[Wc]:Uc,[Gc]:Gc},f=new Uh({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new U},radius:{value:4}},vertexShader:wO,fragmentShader:TO}),p=f.clone();p.defines.HORIZONTAL_PASS=1;let m=new bh;m.setAttribute(`position`,new ih(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));let h=new Mh(m,f),g=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=Bc;let _=this.type;this.render=function(t,n,s){if(g.enabled===!1||g.autoUpdate===!1&&g.needsUpdate===!1||t.length===0)return;let c=e.getRenderTarget(),l=e.getActiveCubeFace(),d=e.getActiveMipmapLevel(),f=e.state;f.setBlending(Kc),f.buffers.color.setClear(1,1,1,1),f.buffers.depth.setTest(!0),f.setScissorTest(!1);let p=_!==Hc&&this.type===Hc,m=_===Hc&&this.type!==Hc;for(let c=0,l=t.length;cu||i.y>u)&&(i.x>u&&(a.x=Math.floor(u/h.x),i.x=a.x*h.x,d.mapSize.x=a.x),i.y>u&&(a.y=Math.floor(u/h.y),i.y=a.y*h.y,d.mapSize.y=a.y)),d.map===null||p===!0||m===!0){let e=this.type===Hc?{}:{minFilter:Jl,magFilter:Jl};d.map!==null&&d.map.dispose(),d.map=new Cp(i.x,i.y,e),d.map.texture.name=l.name+`.shadowMap`,d.camera.updateProjectionMatrix()}e.setRenderTarget(d.map),e.clear();let g=d.getViewportCount();for(let e=0;e0||n.map&&n.alphaTest>0||n.alphaToCoverage===!0){let e=a.uuid,t=n.uuid,r=l[e];r===void 0&&(r={},l[e]=r);let i=r[t];i===void 0&&(i=a.clone(),r[t]=i,n.addEventListener(`dispose`,x)),a=i}if(a.visible=n.visible,a.wireframe=n.wireframe,i===Hc?a.side=n.shadowSide===null?n.side:n.shadowSide:a.side=n.shadowSide===null?d[n.side]:n.shadowSide,a.alphaMap=n.alphaMap,a.alphaTest=n.alphaToCoverage===!0?.5:n.alphaTest,a.map=n.map,a.clipShadows=n.clipShadows,a.clippingPlanes=n.clippingPlanes,a.clipIntersection=n.clipIntersection,a.displacementMap=n.displacementMap,a.displacementScale=n.displacementScale,a.displacementBias=n.displacementBias,a.wireframeLinewidth=n.wireframeLinewidth,a.linewidth=n.linewidth,r.isPointLight===!0&&a.isMeshDistanceMaterial===!0){let t=e.properties.get(a);t.light=r}return a}function b(n,i,a,o,s){if(n.visible===!1)return;let c=n.layers.test(i.layers);if(c&&(n.isMesh||n.isLine||n.isPoints)&&(n.castShadow||n.receiveShadow&&s===Hc)&&(!n.frustumCulled||r.intersectsObject(n))){n.modelViewMatrix.multiplyMatrices(a.matrixWorldInverse,n.matrixWorld);let r=t.update(n),c=n.material;if(Array.isArray(c)){let t=r.groups;for(let l=0,u=t.length;l=2):(N=parseFloat(/^WebGL (\d)/.exec(ee)[1]),M=N>=1);let te=null,P={},ne=e.getParameter(e.SCISSOR_BOX),re=e.getParameter(e.VIEWPORT),ie=new xp().fromArray(ne),ae=new xp().fromArray(re);function oe(t,n,r,i){let a=new Uint8Array(4),o=e.createTexture();e.bindTexture(t,o),e.texParameteri(t,e.TEXTURE_MIN_FILTER,e.NEAREST),e.texParameteri(t,e.TEXTURE_MAG_FILTER,e.NEAREST);for(let o=0;o`u`?!1:/OculusBrowser/g.test(navigator.userAgent),l=new U,u=new WeakMap,d,f=new WeakMap,p=!1;try{p=typeof OffscreenCanvas<`u`&&new OffscreenCanvas(1,1).getContext(`2d`)!==null}catch{}function m(e,t){return p?new OffscreenCanvas(e,t):ep(`canvas`)}function h(e,t,n){let r=1,i=be(e);if((i.width>n||i.height>n)&&(r=n/Math.max(i.width,i.height)),r<1)if(typeof HTMLImageElement<`u`&&e instanceof HTMLImageElement||typeof HTMLCanvasElement<`u`&&e instanceof HTMLCanvasElement||typeof ImageBitmap<`u`&&e instanceof ImageBitmap||typeof VideoFrame<`u`&&e instanceof VideoFrame){let n=Math.floor(r*i.width),a=Math.floor(r*i.height);d===void 0&&(d=m(n,a));let o=t?m(n,a):d;o.width=n,o.height=a;let s=o.getContext(`2d`);return s.drawImage(e,0,0,n,a),console.warn(`THREE.WebGLRenderer: Texture has been resized from (`+i.width+`x`+i.height+`) to (`+n+`x`+a+`).`),o}else return`data`in e&&console.warn(`THREE.WebGLRenderer: Image in DataTexture is too big (`+i.width+`x`+i.height+`).`),e;return e}function g(e){return e.generateMipmaps}function _(t){e.generateMipmap(t)}function v(t){return t.isWebGLCubeRenderTarget?e.TEXTURE_CUBE_MAP:t.isWebGL3DRenderTarget?e.TEXTURE_3D:t.isWebGLArrayRenderTarget||t.isCompressedArrayTexture?e.TEXTURE_2D_ARRAY:e.TEXTURE_2D}function y(n,r,i,a,o=!1){if(n!==null){if(e[n]!==void 0)return e[n];console.warn(`THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '`+n+`'`)}let s=r;if(r===e.RED&&(i===e.FLOAT&&(s=e.R32F),i===e.HALF_FLOAT&&(s=e.R16F),i===e.UNSIGNED_BYTE&&(s=e.R8)),r===e.RED_INTEGER&&(i===e.UNSIGNED_BYTE&&(s=e.R8UI),i===e.UNSIGNED_SHORT&&(s=e.R16UI),i===e.UNSIGNED_INT&&(s=e.R32UI),i===e.BYTE&&(s=e.R8I),i===e.SHORT&&(s=e.R16I),i===e.INT&&(s=e.R32I)),r===e.RG&&(i===e.FLOAT&&(s=e.RG32F),i===e.HALF_FLOAT&&(s=e.RG16F),i===e.UNSIGNED_BYTE&&(s=e.RG8)),r===e.RG_INTEGER&&(i===e.UNSIGNED_BYTE&&(s=e.RG8UI),i===e.UNSIGNED_SHORT&&(s=e.RG16UI),i===e.UNSIGNED_INT&&(s=e.RG32UI),i===e.BYTE&&(s=e.RG8I),i===e.SHORT&&(s=e.RG16I),i===e.INT&&(s=e.RG32I)),r===e.RGB_INTEGER&&(i===e.UNSIGNED_BYTE&&(s=e.RGB8UI),i===e.UNSIGNED_SHORT&&(s=e.RGB16UI),i===e.UNSIGNED_INT&&(s=e.RGB32UI),i===e.BYTE&&(s=e.RGB8I),i===e.SHORT&&(s=e.RGB16I),i===e.INT&&(s=e.RGB32I)),r===e.RGBA_INTEGER&&(i===e.UNSIGNED_BYTE&&(s=e.RGBA8UI),i===e.UNSIGNED_SHORT&&(s=e.RGBA16UI),i===e.UNSIGNED_INT&&(s=e.RGBA32UI),i===e.BYTE&&(s=e.RGBA8I),i===e.SHORT&&(s=e.RGBA16I),i===e.INT&&(s=e.RGBA32I)),r===e.RGB&&i===e.UNSIGNED_INT_5_9_9_9_REV&&(s=e.RGB9_E5),r===e.RGBA){let t=o?Od:up.getTransfer(a);i===e.FLOAT&&(s=e.RGBA32F),i===e.HALF_FLOAT&&(s=e.RGBA16F),i===e.UNSIGNED_BYTE&&(s=t===kd?e.SRGB8_ALPHA8:e.RGBA8),i===e.UNSIGNED_SHORT_4_4_4_4&&(s=e.RGBA4),i===e.UNSIGNED_SHORT_5_5_5_1&&(s=e.RGB5_A1)}return(s===e.R16F||s===e.R32F||s===e.RG16F||s===e.RG32F||s===e.RGBA16F||s===e.RGBA32F)&&t.get(`EXT_color_buffer_float`),s}function b(t,n){let r;return t?n===null||n===lu||n===mu?r=e.DEPTH24_STENCIL8:n===uu?r=e.DEPTH32F_STENCIL8:n===su&&(r=e.DEPTH24_STENCIL8,console.warn(`DepthTexture: 16 bit depth attachment is not supported with stencil. Using 24-bit attachment.`)):n===null||n===lu||n===mu?r=e.DEPTH_COMPONENT24:n===uu?r=e.DEPTH_COMPONENT32F:n===su&&(r=e.DEPTH_COMPONENT16),r}function x(e,t){return g(e)===!0||e.isFramebufferTexture&&e.minFilter!==Jl&&e.minFilter!==$l?Math.log2(Math.max(t.width,t.height))+1:e.mipmaps!==void 0&&e.mipmaps.length>0?e.mipmaps.length:e.isCompressedTexture&&Array.isArray(e.image)?t.mipmaps.length:1}function S(e){let t=e.target;t.removeEventListener(`dispose`,S),w(t),t.isVideoTexture&&u.delete(t)}function C(e){let t=e.target;t.removeEventListener(`dispose`,C),E(t)}function w(e){let t=r.get(e);if(t.__webglInit===void 0)return;let n=e.source,i=f.get(n);if(i){let r=i[t.__cacheKey];r.usedTimes--,r.usedTimes===0&&T(e),Object.keys(i).length===0&&f.delete(n)}r.remove(e)}function T(t){let n=r.get(t);e.deleteTexture(n.__webglTexture);let i=t.source,a=f.get(i);delete a[n.__cacheKey],o.memory.textures--}function E(t){let n=r.get(t);if(t.depthTexture&&(t.depthTexture.dispose(),r.remove(t.depthTexture)),t.isWebGLCubeRenderTarget)for(let t=0;t<6;t++){if(Array.isArray(n.__webglFramebuffer[t]))for(let r=0;r=i.maxTextures&&console.warn(`THREE.WebGLTextures: Trying to use `+e+` texture units while this GPU supports only `+i.maxTextures),D+=1,e}function A(e){let t=[];return t.push(e.wrapS),t.push(e.wrapT),t.push(e.wrapR||0),t.push(e.magFilter),t.push(e.minFilter),t.push(e.anisotropy),t.push(e.internalFormat),t.push(e.format),t.push(e.type),t.push(e.generateMipmaps),t.push(e.premultiplyAlpha),t.push(e.flipY),t.push(e.unpackAlignment),t.push(e.colorSpace),t.join()}function j(t,i){let a=r.get(t);if(t.isVideoTexture&&ve(t),t.isRenderTargetTexture===!1&&t.version>0&&a.__version!==t.version){let e=t.image;if(e===null)console.warn(`THREE.WebGLRenderer: Texture marked for update but no image data found.`);else if(e.complete===!1)console.warn(`THREE.WebGLRenderer: Texture marked for update but image is incomplete`);else{se(a,t,i);return}}n.bindTexture(e.TEXTURE_2D,a.__webglTexture,e.TEXTURE0+i)}function M(t,i){let a=r.get(t);if(t.version>0&&a.__version!==t.version){se(a,t,i);return}n.bindTexture(e.TEXTURE_2D_ARRAY,a.__webglTexture,e.TEXTURE0+i)}function N(t,i){let a=r.get(t);if(t.version>0&&a.__version!==t.version){se(a,t,i);return}n.bindTexture(e.TEXTURE_3D,a.__webglTexture,e.TEXTURE0+i)}function ee(t,i){let a=r.get(t);if(t.version>0&&a.__version!==t.version){ce(a,t,i);return}n.bindTexture(e.TEXTURE_CUBE_MAP,a.__webglTexture,e.TEXTURE0+i)}let te={[Gl]:e.REPEAT,[Kl]:e.CLAMP_TO_EDGE,[ql]:e.MIRRORED_REPEAT},P={[Jl]:e.NEAREST,[Yl]:e.NEAREST_MIPMAP_NEAREST,[Zl]:e.NEAREST_MIPMAP_LINEAR,[$l]:e.LINEAR,[eu]:e.LINEAR_MIPMAP_NEAREST,[nu]:e.LINEAR_MIPMAP_LINEAR},ne={[Kd]:e.NEVER,[$d]:e.ALWAYS,[qd]:e.LESS,[Yd]:e.LEQUAL,[Jd]:e.EQUAL,[Qd]:e.GEQUAL,[Xd]:e.GREATER,[Zd]:e.NOTEQUAL};function re(n,a){if(a.type===uu&&t.has(`OES_texture_float_linear`)===!1&&(a.magFilter===$l||a.magFilter===eu||a.magFilter===Zl||a.magFilter===nu||a.minFilter===$l||a.minFilter===eu||a.minFilter===Zl||a.minFilter===nu)&&console.warn(`THREE.WebGLRenderer: Unable to use linear filtering with floating point textures. OES_texture_float_linear not supported on this device.`),e.texParameteri(n,e.TEXTURE_WRAP_S,te[a.wrapS]),e.texParameteri(n,e.TEXTURE_WRAP_T,te[a.wrapT]),(n===e.TEXTURE_3D||n===e.TEXTURE_2D_ARRAY)&&e.texParameteri(n,e.TEXTURE_WRAP_R,te[a.wrapR]),e.texParameteri(n,e.TEXTURE_MAG_FILTER,P[a.magFilter]),e.texParameteri(n,e.TEXTURE_MIN_FILTER,P[a.minFilter]),a.compareFunction&&(e.texParameteri(n,e.TEXTURE_COMPARE_MODE,e.COMPARE_REF_TO_TEXTURE),e.texParameteri(n,e.TEXTURE_COMPARE_FUNC,ne[a.compareFunction])),t.has(`EXT_texture_filter_anisotropic`)===!0){if(a.magFilter===Jl||a.minFilter!==Zl&&a.minFilter!==nu||a.type===uu&&t.has(`OES_texture_float_linear`)===!1)return;if(a.anisotropy>1||r.get(a).__currentAnisotropy){let o=t.get(`EXT_texture_filter_anisotropic`);e.texParameterf(n,o.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(a.anisotropy,i.getMaxAnisotropy())),r.get(a).__currentAnisotropy=a.anisotropy}}}function ie(t,n){let r=!1;t.__webglInit===void 0&&(t.__webglInit=!0,n.addEventListener(`dispose`,S));let i=n.source,a=f.get(i);a===void 0&&(a={},f.set(i,a));let s=A(n);if(s!==t.__cacheKey){a[s]===void 0&&(a[s]={texture:e.createTexture(),usedTimes:0},o.memory.textures++,r=!0),a[s].usedTimes++;let i=a[t.__cacheKey];i!==void 0&&(a[t.__cacheKey].usedTimes--,i.usedTimes===0&&T(n)),t.__cacheKey=s,t.__webglTexture=a[s].texture}return r}function ae(e,t,n){return Math.floor(Math.floor(e/n)/t)}function oe(t,r,i,a){let o=4,s=t.updateRanges;if(s.length===0)n.texSubImage2D(e.TEXTURE_2D,0,0,0,r.width,r.height,i,a,r.data);else{s.sort((e,t)=>e.start-t.start);let c=0;for(let e=1;e0){T&&E&&n.texStorage2D(e.TEXTURE_2D,O,S,w[0].width,w[0].height);for(let t=0,r=w.length;t0){let r=eC(C.width,C.height,o.format,o.type);for(let i of o.layerUpdates){let a=C.data.subarray(i*r/C.data.BYTES_PER_ELEMENT,(i+1)*r/C.data.BYTES_PER_ELEMENT);n.compressedTexSubImage3D(e.TEXTURE_2D_ARRAY,t,0,0,i,C.width,C.height,1,m,a)}o.clearLayerUpdates()}else n.compressedTexSubImage3D(e.TEXTURE_2D_ARRAY,t,0,0,0,C.width,C.height,p.depth,m,C.data)}else n.compressedTexImage3D(e.TEXTURE_2D_ARRAY,t,S,C.width,C.height,p.depth,0,C.data,0,0);else console.warn(`THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()`);else T?D&&n.texSubImage3D(e.TEXTURE_2D_ARRAY,t,0,0,0,C.width,C.height,p.depth,m,v,C.data):n.texImage3D(e.TEXTURE_2D_ARRAY,t,S,C.width,C.height,p.depth,0,m,v,C.data)}else{T&&E&&n.texStorage2D(e.TEXTURE_2D,O,S,w[0].width,w[0].height);for(let t=0,r=w.length;t0){let t=eC(p.width,p.height,o.format,o.type);for(let r of o.layerUpdates){let i=p.data.subarray(r*t/p.data.BYTES_PER_ELEMENT,(r+1)*t/p.data.BYTES_PER_ELEMENT);n.texSubImage3D(e.TEXTURE_2D_ARRAY,0,0,0,r,p.width,p.height,1,m,v,i)}o.clearLayerUpdates()}else n.texSubImage3D(e.TEXTURE_2D_ARRAY,0,0,0,0,p.width,p.height,p.depth,m,v,p.data)}else n.texImage3D(e.TEXTURE_2D_ARRAY,0,S,p.width,p.height,p.depth,0,m,v,p.data);else if(o.isData3DTexture)T?(E&&n.texStorage3D(e.TEXTURE_3D,O,S,p.width,p.height,p.depth),D&&n.texSubImage3D(e.TEXTURE_3D,0,0,0,0,p.width,p.height,p.depth,m,v,p.data)):n.texImage3D(e.TEXTURE_3D,0,S,p.width,p.height,p.depth,0,m,v,p.data);else if(o.isFramebufferTexture){if(E)if(T)n.texStorage2D(e.TEXTURE_2D,O,S,p.width,p.height);else{let t=p.width,r=p.height;for(let i=0;i>=1,r>>=1}}else if(w.length>0){if(T&&E){let t=be(w[0]);n.texStorage2D(e.TEXTURE_2D,O,S,t.width,t.height)}for(let t=0,r=w.length;t0&&D++;let t=be(m[0]);n.texStorage2D(e.TEXTURE_CUBE_MAP,D,C,t.width,t.height)}for(let t=0;t<6;t++)if(p){w?E&&n.texSubImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+t,0,0,0,m[t].width,m[t].height,b,S,m[t].data):n.texImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+t,0,C,m[t].width,m[t].height,0,b,S,m[t].data);for(let r=0;r>u),r=Math.max(1,i.height>>u);l===e.TEXTURE_3D||l===e.TEXTURE_2D_ARRAY?n.texImage3D(l,u,p,t,r,i.depth,0,d,f,null):n.texImage2D(l,u,p,t,r,0,d,f,null)}n.bindFramebuffer(e.FRAMEBUFFER,t),L(i)?s.framebufferTexture2DMultisampleEXT(e.FRAMEBUFFER,c,l,h.__webglTexture,0,_e(i)):(l===e.TEXTURE_2D||l>=e.TEXTURE_CUBE_MAP_POSITIVE_X&&l<=e.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&e.framebufferTexture2D(e.FRAMEBUFFER,c,l,h.__webglTexture,u),n.bindFramebuffer(e.FRAMEBUFFER,null)}function ue(t,n,r){if(e.bindRenderbuffer(e.RENDERBUFFER,t),n.depthBuffer){let i=n.depthTexture,a=i&&i.isDepthTexture?i.type:null,o=b(n.stencilBuffer,a),c=n.stencilBuffer?e.DEPTH_STENCIL_ATTACHMENT:e.DEPTH_ATTACHMENT,l=_e(n),u=L(n);u?s.renderbufferStorageMultisampleEXT(e.RENDERBUFFER,l,o,n.width,n.height):r?e.renderbufferStorageMultisample(e.RENDERBUFFER,l,o,n.width,n.height):e.renderbufferStorage(e.RENDERBUFFER,o,n.width,n.height),e.framebufferRenderbuffer(e.FRAMEBUFFER,c,e.RENDERBUFFER,t)}else{let t=n.textures;for(let i=0;i{delete i.__boundDepthTexture,delete i.__depthDisposeCallback,e.removeEventListener(`dispose`,t)};e.addEventListener(`dispose`,t),i.__depthDisposeCallback=t}i.__boundDepthTexture=e}if(t.depthTexture&&!i.__autoAllocateDepthBuffer){if(a)throw Error(`target.depthTexture not supported in Cube render targets`);let e=t.texture.mipmaps;e&&e.length>0?de(i.__webglFramebuffer[0],t):de(i.__webglFramebuffer,t)}else if(a){i.__webglDepthbuffer=[];for(let r=0;r<6;r++)if(n.bindFramebuffer(e.FRAMEBUFFER,i.__webglFramebuffer[r]),i.__webglDepthbuffer[r]===void 0)i.__webglDepthbuffer[r]=e.createRenderbuffer(),ue(i.__webglDepthbuffer[r],t,!1);else{let n=t.stencilBuffer?e.DEPTH_STENCIL_ATTACHMENT:e.DEPTH_ATTACHMENT,a=i.__webglDepthbuffer[r];e.bindRenderbuffer(e.RENDERBUFFER,a),e.framebufferRenderbuffer(e.FRAMEBUFFER,n,e.RENDERBUFFER,a)}}else{let r=t.texture.mipmaps;if(r&&r.length>0?n.bindFramebuffer(e.FRAMEBUFFER,i.__webglFramebuffer[0]):n.bindFramebuffer(e.FRAMEBUFFER,i.__webglFramebuffer),i.__webglDepthbuffer===void 0)i.__webglDepthbuffer=e.createRenderbuffer(),ue(i.__webglDepthbuffer,t,!1);else{let n=t.stencilBuffer?e.DEPTH_STENCIL_ATTACHMENT:e.DEPTH_ATTACHMENT,r=i.__webglDepthbuffer;e.bindRenderbuffer(e.RENDERBUFFER,r),e.framebufferRenderbuffer(e.FRAMEBUFFER,n,e.RENDERBUFFER,r)}}n.bindFramebuffer(e.FRAMEBUFFER,null)}function pe(t,n,i){let a=r.get(t);n!==void 0&&le(a.__webglFramebuffer,t,t.texture,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,0),i!==void 0&&fe(t)}function F(t){let i=t.texture,s=r.get(t),c=r.get(i);t.addEventListener(`dispose`,C);let l=t.textures,u=t.isWebGLCubeRenderTarget===!0,d=l.length>1;if(d||(c.__webglTexture===void 0&&(c.__webglTexture=e.createTexture()),c.__version=i.version,o.memory.textures++),u){s.__webglFramebuffer=[];for(let t=0;t<6;t++)if(i.mipmaps&&i.mipmaps.length>0){s.__webglFramebuffer[t]=[];for(let n=0;n0){s.__webglFramebuffer=[];for(let t=0;t0&&L(t)===!1){s.__webglMultisampledFramebuffer=e.createFramebuffer(),s.__webglColorRenderbuffer=[],n.bindFramebuffer(e.FRAMEBUFFER,s.__webglMultisampledFramebuffer);for(let n=0;n0)for(let r=0;r0)for(let n=0;n0){if(L(t)===!1){let i=t.textures,a=t.width,o=t.height,s=e.COLOR_BUFFER_BIT,l=t.stencilBuffer?e.DEPTH_STENCIL_ATTACHMENT:e.DEPTH_ATTACHMENT,u=r.get(t),d=i.length>1;if(d)for(let t=0;t0?n.bindFramebuffer(e.DRAW_FRAMEBUFFER,u.__webglFramebuffer[0]):n.bindFramebuffer(e.DRAW_FRAMEBUFFER,u.__webglFramebuffer);for(let n=0;n0&&t.has(`WEBGL_multisampled_render_to_texture`)===!0&&n.__useRenderToTexture!==!1}function ve(e){let t=o.render.frame;u.get(e)!==t&&(u.set(e,t),e.update())}function ye(e,t){let n=e.colorSpace,r=e.format,i=e.type;return e.isCompressedTexture===!0||e.isVideoTexture===!0||n!==Dd&&n!==Td&&(up.getTransfer(n)===kd?(r!==vu||i!==iu)&&console.warn(`THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType.`):console.error(`THREE.WebGLTextures: Unsupported texture color space:`,n)),t}function be(e){return typeof HTMLImageElement<`u`&&e instanceof HTMLImageElement?(l.width=e.naturalWidth||e.width,l.height=e.naturalHeight||e.height):typeof VideoFrame<`u`&&e instanceof VideoFrame?(l.width=e.displayWidth,l.height=e.displayHeight):(l.width=e.width,l.height=e.height),l}this.allocateTextureUnit=k,this.resetTextureUnits=O,this.setTexture2D=j,this.setTexture2DArray=M,this.setTexture3D=N,this.setTextureCube=ee,this.rebindTextures=pe,this.setupRenderTarget=F,this.updateRenderTargetMipmap=me,this.updateMultisampleRenderTarget=I,this.setupDepthRenderbuffer=fe,this.setupFrameBufferTexture=le,this.useMultisampledRTT=L}function AO(e,t){function n(n,r=Td){let i,a=up.getTransfer(r);if(n===iu)return e.UNSIGNED_BYTE;if(n===fu)return e.UNSIGNED_SHORT_4_4_4_4;if(n===pu)return e.UNSIGNED_SHORT_5_5_5_1;if(n===hu)return e.UNSIGNED_INT_5_9_9_9_REV;if(n===au)return e.BYTE;if(n===ou)return e.SHORT;if(n===su)return e.UNSIGNED_SHORT;if(n===cu)return e.INT;if(n===lu)return e.UNSIGNED_INT;if(n===uu)return e.FLOAT;if(n===du)return e.HALF_FLOAT;if(n===gu)return e.ALPHA;if(n===_u)return e.RGB;if(n===vu)return e.RGBA;if(n===yu)return e.DEPTH_COMPONENT;if(n===bu)return e.DEPTH_STENCIL;if(n===xu)return e.RED;if(n===Su)return e.RED_INTEGER;if(n===Cu)return e.RG;if(n===wu)return e.RG_INTEGER;if(n===Eu)return e.RGBA_INTEGER;if(n===Du||n===Ou||n===ku||n===Au)if(a===kd)if(i=t.get(`WEBGL_compressed_texture_s3tc_srgb`),i!==null){if(n===Du)return i.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(n===Ou)return i.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(n===ku)return i.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(n===Au)return i.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else return null;else if(i=t.get(`WEBGL_compressed_texture_s3tc`),i!==null){if(n===Du)return i.COMPRESSED_RGB_S3TC_DXT1_EXT;if(n===Ou)return i.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(n===ku)return i.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(n===Au)return i.COMPRESSED_RGBA_S3TC_DXT5_EXT}else return null;if(n===ju||n===Mu||n===Nu||n===Pu)if(i=t.get(`WEBGL_compressed_texture_pvrtc`),i!==null){if(n===ju)return i.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(n===Mu)return i.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(n===Nu)return i.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(n===Pu)return i.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}else return null;if(n===Fu||n===Iu||n===Lu)if(i=t.get(`WEBGL_compressed_texture_etc`),i!==null){if(n===Fu||n===Iu)return a===kd?i.COMPRESSED_SRGB8_ETC2:i.COMPRESSED_RGB8_ETC2;if(n===Lu)return a===kd?i.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:i.COMPRESSED_RGBA8_ETC2_EAC}else return null;if(n===Ru||n===zu||n===Bu||n===Vu||n===Hu||n===Uu||n===Wu||n===Gu||n===Ku||n===qu||n===Ju||n===Yu||n===Xu||n===Zu)if(i=t.get(`WEBGL_compressed_texture_astc`),i!==null){if(n===Ru)return a===kd?i.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:i.COMPRESSED_RGBA_ASTC_4x4_KHR;if(n===zu)return a===kd?i.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:i.COMPRESSED_RGBA_ASTC_5x4_KHR;if(n===Bu)return a===kd?i.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:i.COMPRESSED_RGBA_ASTC_5x5_KHR;if(n===Vu)return a===kd?i.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:i.COMPRESSED_RGBA_ASTC_6x5_KHR;if(n===Hu)return a===kd?i.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:i.COMPRESSED_RGBA_ASTC_6x6_KHR;if(n===Uu)return a===kd?i.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:i.COMPRESSED_RGBA_ASTC_8x5_KHR;if(n===Wu)return a===kd?i.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:i.COMPRESSED_RGBA_ASTC_8x6_KHR;if(n===Gu)return a===kd?i.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:i.COMPRESSED_RGBA_ASTC_8x8_KHR;if(n===Ku)return a===kd?i.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:i.COMPRESSED_RGBA_ASTC_10x5_KHR;if(n===qu)return a===kd?i.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:i.COMPRESSED_RGBA_ASTC_10x6_KHR;if(n===Ju)return a===kd?i.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:i.COMPRESSED_RGBA_ASTC_10x8_KHR;if(n===Yu)return a===kd?i.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:i.COMPRESSED_RGBA_ASTC_10x10_KHR;if(n===Xu)return a===kd?i.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:i.COMPRESSED_RGBA_ASTC_12x10_KHR;if(n===Zu)return a===kd?i.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:i.COMPRESSED_RGBA_ASTC_12x12_KHR}else return null;if(n===Qu||n===$u||n===ed)if(i=t.get(`EXT_texture_compression_bptc`),i!==null){if(n===Qu)return a===kd?i.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:i.COMPRESSED_RGBA_BPTC_UNORM_EXT;if(n===$u)return i.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT;if(n===ed)return i.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT}else return null;if(n===td||n===nd||n===rd||n===id)if(i=t.get(`EXT_texture_compression_rgtc`),i!==null){if(n===Qu)return i.COMPRESSED_RED_RGTC1_EXT;if(n===nd)return i.COMPRESSED_SIGNED_RED_RGTC1_EXT;if(n===rd)return i.COMPRESSED_RED_GREEN_RGTC2_EXT;if(n===id)return i.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT}else return null;return n===mu?e.UNSIGNED_INT_24_8:e[n]===void 0?null:e[n]}return{convert:n}}const jO=` void main() { gl_Position = vec4( position, 1.0 ); -}`,Ek=` +}`,MO=` uniform sampler2DArray depthColor; uniform float depthWidth; uniform float depthHeight; @@ -3826,12 +3832,12 @@ void main() { } -}`;var Dk=class{constructor(){this.texture=null,this.mesh=null,this.depthNear=0,this.depthFar=0}init(e,t,n){if(this.texture===null){let r=new mm,i=e.properties.get(r);i.__webglTexture=t.texture,(t.depthNear!==n.depthNear||t.depthFar!==n.depthFar)&&(this.depthNear=t.depthNear,this.depthFar=t.depthFar),this.texture=r}}getMesh(e){if(this.texture!==null&&this.mesh===null){let t=e.cameras[0].viewport,n=new Lg({vertexShader:Tk,fragmentShader:Ek,uniforms:{depthColor:{value:this.texture},depthWidth:{value:t.z},depthHeight:{value:t.w}}});this.mesh=new Eg(new Eb(20,20),n)}return this.mesh}reset(){this.texture=null,this.mesh=null}getDepthTexture(){return this.texture}},Ok=class extends fp{constructor(e,t){super();let n=this,r=null,i=1,a=null,o=`local-floor`,s=1,c=null,l=null,u=null,d=null,f=null,p=null,m=new Dk,h=t.getContextAttributes(),g=null,_=null,v=[],y=[],b=new U,x=null,S=new Hg;S.viewport=new hm;let C=new Hg;C.viewport=new hm;let w=[S,C],T=new hS,E=null,D=null;this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(e){let t=v[e];return t===void 0&&(t=new Xg,v[e]=t),t.getTargetRaySpace()},this.getControllerGrip=function(e){let t=v[e];return t===void 0&&(t=new Xg,v[e]=t),t.getGripSpace()},this.getHand=function(e){let t=v[e];return t===void 0&&(t=new Xg,v[e]=t),t.getHandSpace()};function O(e){let t=y.indexOf(e.inputSource);if(t===-1)return;let n=v[t];n!==void 0&&(n.update(e.inputSource,e.frame,c||a),n.dispatchEvent({type:e.type,data:e.inputSource}))}function k(){r.removeEventListener(`select`,O),r.removeEventListener(`selectstart`,O),r.removeEventListener(`selectend`,O),r.removeEventListener(`squeeze`,O),r.removeEventListener(`squeezestart`,O),r.removeEventListener(`squeezeend`,O),r.removeEventListener(`end`,k),r.removeEventListener(`inputsourceschange`,A);for(let e=0;e=0&&(y[r]=null,v[r].disconnect(n))}for(let t=0;t=y.length){y.push(n),r=e;break}else if(y[e]===null){y[e]=n,r=e;break}if(r===-1)break}let i=v[r];i&&i.connect(n)}}let j=new W,M=new W;function N(e,t,n){j.setFromMatrixPosition(t.matrixWorld),M.setFromMatrixPosition(n.matrixWorld);let r=j.distanceTo(M),i=t.projectionMatrix.elements,a=n.projectionMatrix.elements,o=i[14]/(i[10]-1),s=i[14]/(i[10]+1),c=(i[9]+1)/i[5],l=(i[9]-1)/i[5],u=(i[8]-1)/i[0],d=(a[8]+1)/a[0],f=o*u,p=o*d,m=r/(-u+d),h=m*-u;if(t.matrixWorld.decompose(e.position,e.quaternion,e.scale),e.translateX(h),e.translateZ(m),e.matrixWorld.compose(e.position,e.quaternion,e.scale),e.matrixWorldInverse.copy(e.matrixWorld).invert(),i[10]===-1)e.projectionMatrix.copy(t.projectionMatrix),e.projectionMatrixInverse.copy(t.projectionMatrixInverse);else{let t=o+m,n=s+m,i=f-h,a=p+(r-h),u=c*s/n*t,d=l*s/n*t;e.projectionMatrix.makePerspective(i,a,u,d,t,n),e.projectionMatrixInverse.copy(e.projectionMatrix).invert()}}function ee(e,t){t===null?e.matrixWorld.copy(e.matrix):e.matrixWorld.multiplyMatrices(t.matrixWorld,e.matrix),e.matrixWorldInverse.copy(e.matrixWorld).invert()}this.updateCamera=function(e){if(r===null)return;let t=e.near,n=e.far;m.texture!==null&&(m.depthNear>0&&(t=m.depthNear),m.depthFar>0&&(n=m.depthFar)),T.near=C.near=S.near=t,T.far=C.far=S.far=n,(E!==T.near||D!==T.far)&&(r.updateRenderState({depthNear:T.near,depthFar:T.far}),E=T.near,D=T.far),S.layers.mask=e.layers.mask|2,C.layers.mask=e.layers.mask|4,T.layers.mask=S.layers.mask|C.layers.mask;let i=e.parent,a=T.cameras;ee(T,i);for(let e=0;e0&&(e.alphaTest.value=r.alphaTest);let i=t.get(r),a=i.envMap,o=i.envMapRotation;a&&(e.envMap.value=a,kk.copy(o),kk.x*=-1,kk.y*=-1,kk.z*=-1,a.isCubeTexture&&a.isRenderTargetTexture===!1&&(kk.y*=-1,kk.z*=-1),e.envMapRotation.value.setFromMatrix4(Ak.makeRotationFromEuler(kk)),e.flipEnvMap.value=a.isCubeTexture&&a.isRenderTargetTexture===!1?-1:1,e.reflectivity.value=r.reflectivity,e.ior.value=r.ior,e.refractionRatio.value=r.refractionRatio),r.lightMap&&(e.lightMap.value=r.lightMap,e.lightMapIntensity.value=r.lightMapIntensity,n(r.lightMap,e.lightMapTransform)),r.aoMap&&(e.aoMap.value=r.aoMap,e.aoMapIntensity.value=r.aoMapIntensity,n(r.aoMap,e.aoMapTransform))}function o(e,t){e.diffuse.value.copy(t.color),e.opacity.value=t.opacity,t.map&&(e.map.value=t.map,n(t.map,e.mapTransform))}function s(e,t){e.dashSize.value=t.dashSize,e.totalSize.value=t.dashSize+t.gapSize,e.scale.value=t.scale}function c(e,t,r,i){e.diffuse.value.copy(t.color),e.opacity.value=t.opacity,e.size.value=t.size*r,e.scale.value=i*.5,t.map&&(e.map.value=t.map,n(t.map,e.uvTransform)),t.alphaMap&&(e.alphaMap.value=t.alphaMap,n(t.alphaMap,e.alphaMapTransform)),t.alphaTest>0&&(e.alphaTest.value=t.alphaTest)}function l(e,t){e.diffuse.value.copy(t.color),e.opacity.value=t.opacity,e.rotation.value=t.rotation,t.map&&(e.map.value=t.map,n(t.map,e.mapTransform)),t.alphaMap&&(e.alphaMap.value=t.alphaMap,n(t.alphaMap,e.alphaMapTransform)),t.alphaTest>0&&(e.alphaTest.value=t.alphaTest)}function u(e,t){e.specular.value.copy(t.specular),e.shininess.value=Math.max(t.shininess,1e-4)}function d(e,t){t.gradientMap&&(e.gradientMap.value=t.gradientMap)}function f(e,t){e.metalness.value=t.metalness,t.metalnessMap&&(e.metalnessMap.value=t.metalnessMap,n(t.metalnessMap,e.metalnessMapTransform)),e.roughness.value=t.roughness,t.roughnessMap&&(e.roughnessMap.value=t.roughnessMap,n(t.roughnessMap,e.roughnessMapTransform)),t.envMap&&(e.envMapIntensity.value=t.envMapIntensity)}function p(e,t,r){e.ior.value=t.ior,t.sheen>0&&(e.sheenColor.value.copy(t.sheenColor).multiplyScalar(t.sheen),e.sheenRoughness.value=t.sheenRoughness,t.sheenColorMap&&(e.sheenColorMap.value=t.sheenColorMap,n(t.sheenColorMap,e.sheenColorMapTransform)),t.sheenRoughnessMap&&(e.sheenRoughnessMap.value=t.sheenRoughnessMap,n(t.sheenRoughnessMap,e.sheenRoughnessMapTransform))),t.clearcoat>0&&(e.clearcoat.value=t.clearcoat,e.clearcoatRoughness.value=t.clearcoatRoughness,t.clearcoatMap&&(e.clearcoatMap.value=t.clearcoatMap,n(t.clearcoatMap,e.clearcoatMapTransform)),t.clearcoatRoughnessMap&&(e.clearcoatRoughnessMap.value=t.clearcoatRoughnessMap,n(t.clearcoatRoughnessMap,e.clearcoatRoughnessMapTransform)),t.clearcoatNormalMap&&(e.clearcoatNormalMap.value=t.clearcoatNormalMap,n(t.clearcoatNormalMap,e.clearcoatNormalMapTransform),e.clearcoatNormalScale.value.copy(t.clearcoatNormalScale),t.side===Rl&&e.clearcoatNormalScale.value.negate())),t.dispersion>0&&(e.dispersion.value=t.dispersion),t.iridescence>0&&(e.iridescence.value=t.iridescence,e.iridescenceIOR.value=t.iridescenceIOR,e.iridescenceThicknessMinimum.value=t.iridescenceThicknessRange[0],e.iridescenceThicknessMaximum.value=t.iridescenceThicknessRange[1],t.iridescenceMap&&(e.iridescenceMap.value=t.iridescenceMap,n(t.iridescenceMap,e.iridescenceMapTransform)),t.iridescenceThicknessMap&&(e.iridescenceThicknessMap.value=t.iridescenceThicknessMap,n(t.iridescenceThicknessMap,e.iridescenceThicknessMapTransform))),t.transmission>0&&(e.transmission.value=t.transmission,e.transmissionSamplerMap.value=r.texture,e.transmissionSamplerSize.value.set(r.width,r.height),t.transmissionMap&&(e.transmissionMap.value=t.transmissionMap,n(t.transmissionMap,e.transmissionMapTransform)),e.thickness.value=t.thickness,t.thicknessMap&&(e.thicknessMap.value=t.thicknessMap,n(t.thicknessMap,e.thicknessMapTransform)),e.attenuationDistance.value=t.attenuationDistance,e.attenuationColor.value.copy(t.attenuationColor)),t.anisotropy>0&&(e.anisotropyVector.value.set(t.anisotropy*Math.cos(t.anisotropyRotation),t.anisotropy*Math.sin(t.anisotropyRotation)),t.anisotropyMap&&(e.anisotropyMap.value=t.anisotropyMap,n(t.anisotropyMap,e.anisotropyMapTransform))),e.specularIntensity.value=t.specularIntensity,e.specularColor.value.copy(t.specularColor),t.specularColorMap&&(e.specularColorMap.value=t.specularColorMap,n(t.specularColorMap,e.specularColorMapTransform)),t.specularIntensityMap&&(e.specularIntensityMap.value=t.specularIntensityMap,n(t.specularIntensityMap,e.specularIntensityMapTransform))}function m(e,t){t.matcap&&(e.matcap.value=t.matcap)}function h(e,n){let r=t.get(n).light;e.referencePosition.value.setFromMatrixPosition(r.matrixWorld),e.nearDistance.value=r.shadow.camera.near,e.farDistance.value=r.shadow.camera.far}return{refreshFogUniforms:r,refreshMaterialUniforms:i}}function Mk(e,t,n,r){let i={},a={},o=[],s=e.getParameter(e.MAX_UNIFORM_BUFFER_BINDINGS);function c(e,t){let n=t.program;r.uniformBlockBinding(e,n)}function l(e,n){let o=i[e.id];o===void 0&&(m(e),o=u(e),i[e.id]=o,e.addEventListener(`dispose`,g));let s=n.program;r.updateUBOMapping(e,s);let c=t.render.frame;a[e.id]!==c&&(f(e),a[e.id]=c)}function u(t){let n=d();t.__bindingPointIndex=n;let r=e.createBuffer(),i=t.__size,a=t.usage;return e.bindBuffer(e.UNIFORM_BUFFER,r),e.bufferData(e.UNIFORM_BUFFER,i,a),e.bindBuffer(e.UNIFORM_BUFFER,null),e.bindBufferBase(e.UNIFORM_BUFFER,n,r),r}function d(){for(let e=0;e0&&(n+=r-i),e.__size=n,e.__cache={},this}function h(e){let t={boundary:0,storage:0};return typeof e==`number`||typeof e==`boolean`?(t.boundary=4,t.storage=4):e.isVector2?(t.boundary=8,t.storage=8):e.isVector3||e.isColor?(t.boundary=16,t.storage=12):e.isVector4?(t.boundary=16,t.storage=16):e.isMatrix3?(t.boundary=48,t.storage=48):e.isMatrix4?(t.boundary=64,t.storage=64):e.isTexture?console.warn(`THREE.WebGLRenderer: Texture samplers can not be part of an uniforms group.`):console.warn(`THREE.WebGLRenderer: Unsupported uniform value type.`,e),t}function g(t){let n=t.target;n.removeEventListener(`dispose`,g);let r=o.indexOf(n.__bindingPointIndex);o.splice(r,1),e.deleteBuffer(i[n.id]),delete i[n.id],delete a[n.id]}function _(){for(let t in i)e.deleteBuffer(i[t]);o=[],i={},a={}}return{bind:c,update:l,dispose:_}}var Nk=class{constructor(e={}){let{canvas:t=Yp(),context:n=null,depth:r=!0,stencil:i=!1,alpha:a=!1,antialias:o=!1,premultipliedAlpha:s=!0,preserveDrawingBuffer:c=!1,powerPreference:l=`default`,failIfMajorPerformanceCaveat:u=!1,reverseDepthBuffer:d=!1}=e;this.isWebGLRenderer=!0;let f;if(n!==null){if(typeof WebGLRenderingContext<`u`&&n instanceof WebGLRenderingContext)throw Error(`THREE.WebGLRenderer: WebGL 1 is not supported since r163.`);f=n.getContextAttributes().alpha}else f=a;let p=new Uint32Array(4),m=new Int32Array(4),h=null,g=null,_=[],v=[];this.domElement=t,this.debug={checkShaderErrors:!0,onShaderError:null},this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this.toneMapping=Cu,this.toneMappingExposure=1,this.transmissionResolutionScale=1;let y=this,b=!1;this._outputColorSpace=Sf;let x=0,S=0,C=null,w=-1,T=null,E=new hm,D=new hm,O=null,k=new K(0),A=0,j=t.width,M=t.height,N=1,ee=null,te=null,P=new hm(0,0,j,M),ne=new hm(0,0,j,M),re=!1,ie=new Q_,ae=!1,oe=!1,se=new G,ce=new G,le=new W,ue=new hm,de={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0},fe=!1;function pe(){return C===null?N:1}let F=n;function me(e,n){return t.getContext(e,n)}try{let e={alpha:!0,depth:r,stencil:i,antialias:o,premultipliedAlpha:s,preserveDrawingBuffer:c,powerPreference:l,failIfMajorPerformanceCaveat:u};if(`setAttribute`in t&&t.setAttribute(`data-engine`,`three.js r${El}`),t.addEventListener(`webglcontextlost`,ze,!1),t.addEventListener(`webglcontextrestored`,Be,!1),t.addEventListener(`webglcontextcreationerror`,Ve,!1),F===null){let t=`webgl2`;if(F=me(t,e),F===null)throw me(t)?Error(`Error creating WebGL context with your selected attributes.`):Error(`Error creating WebGL context.`)}}catch(e){throw console.error(`THREE.WebGLRenderer: `+e.message),e}let he,ge,I,_e,L,ve,ye,be,xe,Se,Ce,we,Te,Ee,De,Oe,ke,Ae,je,Me,Ne,Pe,Fe,Ie;function Le(){he=new fD(F),he.init(),Pe=new wk(F,he),ge=new VE(F,he,e,Pe),I=new Sk(F,he),ge.reverseDepthBuffer&&d&&I.buffers.depth.setReversed(!0),_e=new hD(F),L=new ok,ve=new Ck(F,he,I,L,ge,Pe,_e),ye=new UE(y),be=new dD(y),xe=new $C(F),Fe=new zE(F,xe),Se=new pD(F,xe,_e,Fe),Ce=new _D(F,Se,xe,_e),je=new gD(F,ge,ve),Oe=new HE(L),we=new ak(y,ye,be,he,ge,Fe,Oe),Te=new jk(y,L),Ee=new uk,De=new _k(he),Ae=new RE(y,ye,be,I,Ce,f,s),ke=new bk(y,Ce,ge),Ie=new Mk(F,_e,ge,I),Me=new BE(F,he,_e),Ne=new mD(F,he,_e),_e.programs=we.programs,y.capabilities=ge,y.extensions=he,y.properties=L,y.renderLists=Ee,y.shadowMap=ke,y.state=I,y.info=_e}Le();let Re=new Ok(y,F);this.xr=Re,this.getContext=function(){return F},this.getContextAttributes=function(){return F.getContextAttributes()},this.forceContextLoss=function(){let e=he.get(`WEBGL_lose_context`);e&&e.loseContext()},this.forceContextRestore=function(){let e=he.get(`WEBGL_lose_context`);e&&e.restoreContext()},this.getPixelRatio=function(){return N},this.setPixelRatio=function(e){e!==void 0&&(N=e,this.setSize(j,M,!1))},this.getSize=function(e){return e.set(j,M)},this.setSize=function(e,n,r=!0){if(Re.isPresenting){console.warn(`THREE.WebGLRenderer: Can't change size while VR device is presenting.`);return}j=e,M=n,t.width=Math.floor(e*N),t.height=Math.floor(n*N),r===!0&&(t.style.width=e+`px`,t.style.height=n+`px`),this.setViewport(0,0,e,n)},this.getDrawingBufferSize=function(e){return e.set(j*N,M*N).floor()},this.setDrawingBufferSize=function(e,n,r){j=e,M=n,N=r,t.width=Math.floor(e*r),t.height=Math.floor(n*r),this.setViewport(0,0,e,n)},this.getCurrentViewport=function(e){return e.copy(E)},this.getViewport=function(e){return e.copy(P)},this.setViewport=function(e,t,n,r){e.isVector4?P.set(e.x,e.y,e.z,e.w):P.set(e,t,n,r),I.viewport(E.copy(P).multiplyScalar(N).round())},this.getScissor=function(e){return e.copy(ne)},this.setScissor=function(e,t,n,r){e.isVector4?ne.set(e.x,e.y,e.z,e.w):ne.set(e,t,n,r),I.scissor(D.copy(ne).multiplyScalar(N).round())},this.getScissorTest=function(){return re},this.setScissorTest=function(e){I.setScissorTest(re=e)},this.setOpaqueSort=function(e){ee=e},this.setTransparentSort=function(e){te=e},this.getClearColor=function(e){return e.copy(Ae.getClearColor())},this.setClearColor=function(){Ae.setClearColor(...arguments)},this.getClearAlpha=function(){return Ae.getClearAlpha()},this.setClearAlpha=function(){Ae.setClearAlpha(...arguments)},this.clear=function(e=!0,t=!0,n=!0){let r=0;if(e){let e=!1;if(C!==null){let t=C.texture.format;e=t===bd||t===vd||t===gd}if(e){let e=C.texture.type,t=e===Qu||e===rd||e===td||e===cd||e===od||e===sd,n=Ae.getClearColor(),r=Ae.getClearAlpha(),i=n.r,a=n.g,o=n.b;t?(p[0]=i,p[1]=a,p[2]=o,p[3]=r,F.clearBufferuiv(F.COLOR,0,p)):(m[0]=i,m[1]=a,m[2]=o,m[3]=r,F.clearBufferiv(F.COLOR,0,m))}else r|=F.COLOR_BUFFER_BIT}t&&(r|=F.DEPTH_BUFFER_BIT),n&&(r|=F.STENCIL_BUFFER_BIT,this.state.buffers.stencil.setMask(4294967295)),F.clear(r)},this.clearColor=function(){this.clear(!0,!1,!1)},this.clearDepth=function(){this.clear(!1,!0,!1)},this.clearStencil=function(){this.clear(!1,!1,!0)},this.dispose=function(){t.removeEventListener(`webglcontextlost`,ze,!1),t.removeEventListener(`webglcontextrestored`,Be,!1),t.removeEventListener(`webglcontextcreationerror`,Ve,!1),Ae.dispose(),Ee.dispose(),De.dispose(),L.dispose(),ye.dispose(),be.dispose(),Ce.dispose(),Fe.dispose(),Ie.dispose(),we.dispose(),Re.dispose(),Re.removeEventListener(`sessionstart`,Je),Re.removeEventListener(`sessionend`,Ye),Xe.stop()};function ze(e){e.preventDefault(),console.log(`THREE.WebGLRenderer: Context Lost.`),b=!0}function Be(){console.log(`THREE.WebGLRenderer: Context Restored.`),b=!1;let e=_e.autoReset,t=ke.enabled,n=ke.autoUpdate,r=ke.needsUpdate,i=ke.type;Le(),_e.autoReset=e,ke.enabled=t,ke.autoUpdate=n,ke.needsUpdate=r,ke.type=i}function Ve(e){console.error(`THREE.WebGLRenderer: A WebGL context could not be created. Reason: `,e.statusMessage)}function He(e){let t=e.target;t.removeEventListener(`dispose`,He),Ue(t)}function Ue(e){We(e),L.remove(e)}function We(e){let t=L.get(e).programs;t!==void 0&&(t.forEach(function(e){we.releaseProgram(e)}),e.isShaderMaterial&&we.releaseShaderCache(e))}this.renderBufferDirect=function(e,t,n,r,i,a){t===null&&(t=de);let o=i.isMesh&&i.matrixWorld.determinant()<0,s=at(e,t,n,r,i);I.setMaterial(r,o);let c=n.index,l=1;if(r.wireframe===!0){if(c=Se.getWireframeAttribute(n),c===void 0)return;l=2}let u=n.drawRange,d=n.attributes.position,f=u.start*l,p=(u.start+u.count)*l;a!==null&&(f=Math.max(f,a.start*l),p=Math.min(p,(a.start+a.count)*l)),c===null?d!=null&&(f=Math.max(f,0),p=Math.min(p,d.count)):(f=Math.max(f,0),p=Math.min(p,c.count));let m=p-f;if(m<0||m===1/0)return;Fe.setup(i,r,s,n,c);let h,g=Me;if(c!==null&&(h=xe.get(c),g=Ne,g.setIndex(h)),i.isMesh)r.wireframe===!0?(I.setLineWidth(r.wireframeLinewidth*pe()),g.setMode(F.LINES)):g.setMode(F.TRIANGLES);else if(i.isLine){let e=r.linewidth;e===void 0&&(e=1),I.setLineWidth(e*pe()),i.isLineSegments?g.setMode(F.LINES):i.isLineLoop?g.setMode(F.LINE_LOOP):g.setMode(F.LINE_STRIP)}else i.isPoints?g.setMode(F.POINTS):i.isSprite&&g.setMode(F.TRIANGLES);if(i.isBatchedMesh)if(i._multiDrawInstances!==null)Zp(`THREE.WebGLRenderer: renderMultiDrawInstances has been deprecated and will be removed in r184. Append to renderMultiDraw arguments and use indirection.`),g.renderMultiDrawInstances(i._multiDrawStarts,i._multiDrawCounts,i._multiDrawCount,i._multiDrawInstances);else if(he.get(`WEBGL_multi_draw`))g.renderMultiDraw(i._multiDrawStarts,i._multiDrawCounts,i._multiDrawCount);else{let e=i._multiDrawStarts,t=i._multiDrawCounts,n=i._multiDrawCount,a=c?xe.get(c).bytesPerElement:1,o=L.get(r).currentProgram.getUniforms();for(let r=0;r{function n(){if(r.forEach(function(e){let t=L.get(e),n=t.currentProgram;n.isReady()&&r.delete(e)}),r.size===0){t(e);return}setTimeout(n,10)}he.get(`KHR_parallel_shader_compile`)===null?setTimeout(n,10):n()})};let Ke=null;function qe(e){Ke&&Ke(e)}function Je(){Xe.stop()}function Ye(){Xe.start()}let Xe=new QC;Xe.setAnimationLoop(qe),typeof self<`u`&&Xe.setContext(self),this.setAnimationLoop=function(e){Ke=e,Re.setAnimationLoop(e),e===null?Xe.stop():Xe.start()},Re.addEventListener(`sessionstart`,Je),Re.addEventListener(`sessionend`,Ye),this.render=function(e,t){if(t!==void 0&&t.isCamera!==!0){console.error(`THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.`);return}if(b===!0)return;if(e.matrixWorldAutoUpdate===!0&&e.updateMatrixWorld(),t.parent===null&&t.matrixWorldAutoUpdate===!0&&t.updateMatrixWorld(),Re.enabled===!0&&Re.isPresenting===!0&&(Re.cameraAutoUpdate===!0&&Re.updateCamera(t),t=Re.getCamera()),e.isScene===!0&&e.onBeforeRender(y,e,t,C),g=De.get(e,v.length),g.init(t),v.push(g),ce.multiplyMatrices(t.projectionMatrix,t.matrixWorldInverse),ie.setFromProjectionMatrix(ce),oe=this.localClippingEnabled,ae=Oe.init(this.clippingPlanes,oe),h=Ee.get(e,_.length),h.init(),_.push(h),Re.enabled===!0&&Re.isPresenting===!0){let e=y.xr.getDepthSensingMesh();e!==null&&Ze(e,t,-1/0,y.sortObjects)}Ze(e,t,0,y.sortObjects),h.finish(),y.sortObjects===!0&&h.sort(ee,te),fe=Re.enabled===!1||Re.isPresenting===!1||Re.hasDepthSensing()===!1,fe&&Ae.addToRenderList(h,e),this.info.render.frame++,ae===!0&&Oe.beginShadows();let n=g.state.shadowsArray;ke.render(n,e,t),ae===!0&&Oe.endShadows(),this.info.autoReset===!0&&this.info.reset();let r=h.opaque,i=h.transmissive;if(g.setupLights(),t.isArrayCamera){let n=t.cameras;if(i.length>0)for(let t=0,a=n.length;t0&&$e(r,i,e,t),fe&&Ae.render(e),Qe(h,e,t);C!==null&&S===0&&(ve.updateMultisampleRenderTarget(C),ve.updateRenderTargetMipmap(C)),e.isScene===!0&&e.onAfterRender(y,e,t),Fe.resetDefaultState(),w=-1,T=null,v.pop(),v.length>0?(g=v[v.length-1],ae===!0&&Oe.setGlobalState(y.clippingPlanes,g.state.camera)):g=null,_.pop(),h=_.length>0?_[_.length-1]:null};function Ze(e,t,n,r){if(e.visible===!1)return;let i=e.layers.test(t.layers);if(i){if(e.isGroup)n=e.renderOrder;else if(e.isLOD)e.autoUpdate===!0&&e.update(t);else if(e.isLight)g.pushLight(e),e.castShadow&&g.pushShadow(e);else if(e.isSprite){if(!e.frustumCulled||ie.intersectsSprite(e)){r&&ue.setFromMatrixPosition(e.matrixWorld).applyMatrix4(ce);let t=Ce.update(e),i=e.material;i.visible&&h.push(e,t,i,n,ue.z,null)}}else if((e.isMesh||e.isLine||e.isPoints)&&(!e.frustumCulled||ie.intersectsObject(e))){let t=Ce.update(e),i=e.material;if(r&&(e.boundingSphere===void 0?(t.boundingSphere===null&&t.computeBoundingSphere(),ue.copy(t.boundingSphere.center)):(e.boundingSphere===null&&e.computeBoundingSphere(),ue.copy(e.boundingSphere.center)),ue.applyMatrix4(e.matrixWorld).applyMatrix4(ce)),Array.isArray(i)){let r=t.groups;for(let a=0,o=r.length;a0&&et(i,t,n),a.length>0&&et(a,t,n),o.length>0&&et(o,t,n),I.buffers.depth.setTest(!0),I.buffers.depth.setMask(!0),I.buffers.color.setMask(!0),I.setPolygonOffset(!1)}function $e(e,t,n,r){let a=n.isScene===!0?n.overrideMaterial:null;if(a!==null)return;g.state.transmissionRenderTarget[r.id]===void 0&&(g.state.transmissionRenderTarget[r.id]=new _m(1,1,{generateMipmaps:!0,type:he.has(`EXT_color_buffer_half_float`)||he.has(`EXT_color_buffer_float`)?ad:Qu,minFilter:Xu,samples:4,stencilBuffer:i,resolveDepthBuffer:!1,resolveStencilBuffer:!1,colorSpace:im.workingColorSpace}));let o=g.state.transmissionRenderTarget[r.id],s=r.viewport||E;o.setSize(s.z*y.transmissionResolutionScale,s.w*y.transmissionResolutionScale);let c=y.getRenderTarget();y.setRenderTarget(o),y.getClearColor(k),A=y.getClearAlpha(),A<1&&y.setClearColor(16777215,.5),y.clear(),fe&&Ae.render(n);let l=y.toneMapping;y.toneMapping=Cu;let u=r.viewport;if(r.viewport!==void 0&&(r.viewport=void 0),g.setupLightsView(r),ae===!0&&Oe.setGlobalState(y.clippingPlanes,r),et(e,n,r),ve.updateMultisampleRenderTarget(o),ve.updateRenderTargetMipmap(o),he.has(`WEBGL_multisampled_render_to_texture`)===!1){let e=!1;for(let i=0,a=t.length;i0),d=!!n.morphAttributes.position,f=!!n.morphAttributes.normal,p=!!n.morphAttributes.color,m=Cu;r.toneMapped&&(C===null||C.isXRRenderTarget===!0)&&(m=y.toneMapping);let h=n.morphAttributes.position||n.morphAttributes.normal||n.morphAttributes.color,_=h===void 0?0:h.length,v=L.get(r),b=g.state.lights;if(ae===!0&&(oe===!0||e!==T)){let t=e===T&&r.id===w;Oe.setState(r,e,t)}let x=!1;r.version===v.__version?v.needsLights&&v.lightsStateVersion!==b.state.version?x=!0:v.outputColorSpace===s?i.isBatchedMesh&&v.batching===!1||!i.isBatchedMesh&&v.batching===!0||i.isBatchedMesh&&v.batchingColor===!0&&i.colorTexture===null||i.isBatchedMesh&&v.batchingColor===!1&&i.colorTexture!==null||i.isInstancedMesh&&v.instancing===!1||!i.isInstancedMesh&&v.instancing===!0||i.isSkinnedMesh&&v.skinning===!1||!i.isSkinnedMesh&&v.skinning===!0||i.isInstancedMesh&&v.instancingColor===!0&&i.instanceColor===null||i.isInstancedMesh&&v.instancingColor===!1&&i.instanceColor!==null||i.isInstancedMesh&&v.instancingMorph===!0&&i.morphTexture===null||i.isInstancedMesh&&v.instancingMorph===!1&&i.morphTexture!==null?x=!0:v.envMap===c?r.fog===!0&&v.fog!==a||v.numClippingPlanes!==void 0&&(v.numClippingPlanes!==Oe.numPlanes||v.numIntersection!==Oe.numIntersection)?x=!0:v.vertexAlphas===l&&v.vertexTangents===u&&v.morphTargets===d&&v.morphNormals===f&&v.morphColors===p&&v.toneMapping===m?v.morphTargetsCount!==_&&(x=!0):x=!0:x=!0:x=!0:(x=!0,v.__version=r.version);let S=v.currentProgram;x===!0&&(S=nt(r,t,i));let E=!1,D=!1,O=!1,k=S.getUniforms(),A=v.uniforms;if(I.useProgram(S.program)&&(E=!0,D=!0,O=!0),r.id!==w&&(w=r.id,D=!0),E||T!==e){let t=I.buffers.depth.getReversed();t?(se.copy(e.projectionMatrix),$p(se),em(se),k.setValue(F,`projectionMatrix`,se)):k.setValue(F,`projectionMatrix`,e.projectionMatrix),k.setValue(F,`viewMatrix`,e.matrixWorldInverse);let n=k.map.cameraPosition;n!==void 0&&n.setValue(F,le.setFromMatrixPosition(e.matrixWorld)),ge.logarithmicDepthBuffer&&k.setValue(F,`logDepthBufFC`,2/(Math.log(e.far+1)/Math.LN2)),(r.isMeshPhongMaterial||r.isMeshToonMaterial||r.isMeshLambertMaterial||r.isMeshBasicMaterial||r.isMeshStandardMaterial||r.isShaderMaterial)&&k.setValue(F,`isOrthographic`,e.isOrthographicCamera===!0),T!==e&&(T=e,D=!0,O=!0)}if(i.isSkinnedMesh){k.setOptional(F,i,`bindMatrix`),k.setOptional(F,i,`bindMatrixInverse`);let e=i.skeleton;e&&(e.boneTexture===null&&e.computeBoneTexture(),k.setValue(F,`boneTexture`,e.boneTexture,ve))}i.isBatchedMesh&&(k.setOptional(F,i,`batchingTexture`),k.setValue(F,`batchingTexture`,i._matricesTexture,ve),k.setOptional(F,i,`batchingIdTexture`),k.setValue(F,`batchingIdTexture`,i._indirectTexture,ve),k.setOptional(F,i,`batchingColorTexture`),i._colorsTexture!==null&&k.setValue(F,`batchingColorTexture`,i._colorsTexture,ve));let j=n.morphAttributes;if((j.position!==void 0||j.normal!==void 0||j.color!==void 0)&&je.update(i,n,S),(D||v.receiveShadow!==i.receiveShadow)&&(v.receiveShadow=i.receiveShadow,k.setValue(F,`receiveShadow`,i.receiveShadow)),r.isMeshGouraudMaterial&&r.envMap!==null&&(A.envMap.value=c,A.flipEnvMap.value=c.isCubeTexture&&c.isRenderTargetTexture===!1?-1:1),r.isMeshStandardMaterial&&r.envMap===null&&t.environment!==null&&(A.envMapIntensity.value=t.environmentIntensity),D&&(k.setValue(F,`toneMappingExposure`,y.toneMappingExposure),v.needsLights&&ot(A,O),a&&r.fog===!0&&Te.refreshFogUniforms(A,a),Te.refreshMaterialUniforms(A,r,N,M,g.state.transmissionRenderTarget[e.id]),wO.upload(F,rt(v),A,ve)),r.isShaderMaterial&&r.uniformsNeedUpdate===!0&&(wO.upload(F,rt(v),A,ve),r.uniformsNeedUpdate=!1),r.isSpriteMaterial&&k.setValue(F,`center`,i.center),k.setValue(F,`modelViewMatrix`,i.modelViewMatrix),k.setValue(F,`normalMatrix`,i.normalMatrix),k.setValue(F,`modelMatrix`,i.matrixWorld),r.isShaderMaterial||r.isRawShaderMaterial){let e=r.uniformsGroups;for(let t=0,n=e.length;t0&&ve.useMultisampledRTT(e)===!1?L.get(e).__webglMultisampledFramebuffer:Array.isArray(l)?l[n]:l,E.copy(e.viewport),D.copy(e.scissor),O=e.scissorTest}else E.copy(P).multiplyScalar(N).floor(),D.copy(ne).multiplyScalar(N).floor(),O=re;n!==0&&(i=ct);let s=I.bindFramebuffer(F.FRAMEBUFFER,i);if(s&&r&&I.drawBuffers(e,i),I.viewport(E),I.scissor(D),I.setScissorTest(O),a){let r=L.get(e.texture);F.framebufferTexture2D(F.FRAMEBUFFER,F.COLOR_ATTACHMENT0,F.TEXTURE_CUBE_MAP_POSITIVE_X+t,r.__webglTexture,n)}else if(o){let r=L.get(e.texture),i=t;F.framebufferTextureLayer(F.FRAMEBUFFER,F.COLOR_ATTACHMENT0,r.__webglTexture,n,i)}else if(e!==null&&n!==0){let t=L.get(e.texture);F.framebufferTexture2D(F.FRAMEBUFFER,F.COLOR_ATTACHMENT0,F.TEXTURE_2D,t.__webglTexture,n)}w=-1},this.readRenderTargetPixels=function(e,t,n,r,i,a,o,s=0){if(!(e&&e.isWebGLRenderTarget)){console.error(`THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.`);return}let c=L.get(e).__webglFramebuffer;if(e.isWebGLCubeRenderTarget&&o!==void 0&&(c=c[o]),c){I.bindFramebuffer(F.FRAMEBUFFER,c);try{let o=e.textures[s],c=o.format,l=o.type;if(!ge.textureFormatReadable(c)){console.error(`THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.`);return}if(!ge.textureTypeReadable(l)){console.error(`THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.`);return}t>=0&&t<=e.width-r&&n>=0&&n<=e.height-i&&(e.textures.length>1&&F.readBuffer(F.COLOR_ATTACHMENT0+s),F.readPixels(t,n,r,i,Pe.convert(c),Pe.convert(l),a))}finally{let e=C===null?null:L.get(C).__webglFramebuffer;I.bindFramebuffer(F.FRAMEBUFFER,e)}}},this.readRenderTargetPixelsAsync=async function(e,t,n,r,i,a,o,s=0){if(!(e&&e.isWebGLRenderTarget))throw Error(`THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.`);let c=L.get(e).__webglFramebuffer;if(e.isWebGLCubeRenderTarget&&o!==void 0&&(c=c[o]),c)if(t>=0&&t<=e.width-r&&n>=0&&n<=e.height-i){I.bindFramebuffer(F.FRAMEBUFFER,c);let o=e.textures[s],l=o.format,u=o.type;if(!ge.textureFormatReadable(l))throw Error(`THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in RGBA or implementation defined format.`);if(!ge.textureTypeReadable(u))throw Error(`THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in UnsignedByteType or implementation defined type.`);let d=F.createBuffer();F.bindBuffer(F.PIXEL_PACK_BUFFER,d),F.bufferData(F.PIXEL_PACK_BUFFER,a.byteLength,F.STREAM_READ),e.textures.length>1&&F.readBuffer(F.COLOR_ATTACHMENT0+s),F.readPixels(t,n,r,i,Pe.convert(l),Pe.convert(u),0);let f=C===null?null:L.get(C).__webglFramebuffer;I.bindFramebuffer(F.FRAMEBUFFER,f);let p=F.fenceSync(F.SYNC_GPU_COMMANDS_COMPLETE,0);return F.flush(),await Qp(F,p,4),F.bindBuffer(F.PIXEL_PACK_BUFFER,d),F.getBufferSubData(F.PIXEL_PACK_BUFFER,0,a),F.deleteBuffer(d),F.deleteSync(p),a}else throw Error(`THREE.WebGLRenderer.readRenderTargetPixelsAsync: requested read bounds are out of range.`)},this.copyFramebufferToTexture=function(e,t=null,n=0){let r=2**-n,i=Math.floor(e.image.width*r),a=Math.floor(e.image.height*r),o=t===null?0:t.x,s=t===null?0:t.y;ve.setTexture2D(e,0),F.copyTexSubImage2D(F.TEXTURE_2D,n,0,0,o,s,i,a),I.unbindTexture()};let lt=F.createFramebuffer(),ut=F.createFramebuffer();this.copyTextureToTexture=function(e,t,n=null,r=null,i=0,a=null){a===null&&(i===0?a=0:(Zp(`WebGLRenderer: copyTextureToTexture function signature has changed to support src and dst mipmap levels.`),a=i,i=0));let o,s,c,l,u,d,f,p,m,h=e.isCompressedTexture?e.mipmaps[a]:e.image;if(n!==null)o=n.max.x-n.min.x,s=n.max.y-n.min.y,c=n.isBox3?n.max.z-n.min.z:1,l=n.min.x,u=n.min.y,d=n.isBox3?n.min.z:0;else{let t=2**-i;o=Math.floor(h.width*t),s=Math.floor(h.height*t),c=e.isDataArrayTexture?h.depth:e.isData3DTexture?Math.floor(h.depth*t):1,l=0,u=0,d=0}r===null?(f=0,p=0,m=0):(f=r.x,p=r.y,m=r.z);let g=Pe.convert(t.format),_=Pe.convert(t.type),v;t.isData3DTexture?(ve.setTexture3D(t,0),v=F.TEXTURE_3D):t.isDataArrayTexture||t.isCompressedArrayTexture?(ve.setTexture2DArray(t,0),v=F.TEXTURE_2D_ARRAY):(ve.setTexture2D(t,0),v=F.TEXTURE_2D),F.pixelStorei(F.UNPACK_FLIP_Y_WEBGL,t.flipY),F.pixelStorei(F.UNPACK_PREMULTIPLY_ALPHA_WEBGL,t.premultiplyAlpha),F.pixelStorei(F.UNPACK_ALIGNMENT,t.unpackAlignment);let y=F.getParameter(F.UNPACK_ROW_LENGTH),b=F.getParameter(F.UNPACK_IMAGE_HEIGHT),x=F.getParameter(F.UNPACK_SKIP_PIXELS),S=F.getParameter(F.UNPACK_SKIP_ROWS),C=F.getParameter(F.UNPACK_SKIP_IMAGES);F.pixelStorei(F.UNPACK_ROW_LENGTH,h.width),F.pixelStorei(F.UNPACK_IMAGE_HEIGHT,h.height),F.pixelStorei(F.UNPACK_SKIP_PIXELS,l),F.pixelStorei(F.UNPACK_SKIP_ROWS,u),F.pixelStorei(F.UNPACK_SKIP_IMAGES,d);let w=e.isDataArrayTexture||e.isData3DTexture,T=t.isDataArrayTexture||t.isData3DTexture;if(e.isDepthTexture){let n=L.get(e),r=L.get(t),h=L.get(n.__renderTarget),g=L.get(r.__renderTarget);I.bindFramebuffer(F.READ_FRAMEBUFFER,h.__webglFramebuffer),I.bindFramebuffer(F.DRAW_FRAMEBUFFER,g.__webglFramebuffer);for(let n=0;n{e.delete(t)},n=()=>{e.clear()},r=n=>{e.add(n);let r=()=>t(n);return Pk(r),{off:r}},i=(...t)=>Promise.all(Array.from(e).map(e=>e(...t)));return{on:r,off:t,trigger:i,clear:n}}const Ik=new WeakMap,Lk=(...e)=>{var t;let n=e[0],r=(t=Ao())?.proxy;if(r==null&&!Qi())throw Error(`injectLocal must be called in setup`);return r&&Ik.has(r)&&n in Ik.get(r)?Ik.get(r)[n]:Zi(...e)},Rk=typeof window<`u`&&typeof document<`u`,zk=typeof WorkerGlobalScope<`u`&&globalThis instanceof WorkerGlobalScope,Bk=e=>e!==void 0,Vk=e=>e!=null,Hk=Object.prototype.toString,Uk=e=>Hk.call(e)===`[object Object]`,Wk=()=>{};function Gk(e,t){function n(...n){return new Promise((r,i)=>{Promise.resolve(e(()=>t.apply(this,n),{fn:t,thisArg:this,args:n})).then(r).catch(i)})}return n}function Kk(e,t={}){let n,r,i=Wk,a=e=>{clearTimeout(e),i(),i=Wk},o,s=s=>{let c=B(e),l=B(t.maxWait);return n&&a(n),c<=0||l!==void 0&&l<=0?(r&&(a(r),r=null),Promise.resolve(s())):new Promise((e,u)=>{i=t.rejectOnCancel?u:e,o=s,l&&!r&&(r=setTimeout(()=>{n&&a(n),r=null,e(o())},l)),n=setTimeout(()=>{r&&a(r),r=null,e(s())},c)})};return s}function qk(e){let t=Object.create(null);return n=>{let r=t[n];return r||(t[n]=e(n))}}const Jk=/\B([A-Z])/g,Yk=qk(e=>e.replace(Jk,`-$1`).toLowerCase()),Xk=/-(\w)/g,Zk=qk(e=>e.replace(Xk,(e,t)=>t?t.toUpperCase():``));function Qk(e){return e.endsWith(`rem`)?Number.parseFloat(e)*16:Number.parseFloat(e)}function $k(e,t,n=!1){return t.reduce((t,r)=>(r in e&&(!n||e[r]!==void 0)&&(t[r]=e[r]),t),{})}function eA(e){return e||Ao()}function tA(e){return Array.isArray(e)?e:[e]}function nA(e,t=200,n={}){return Gk(Kk(t,n),e)}function rA(e,t=200,n={}){let r=R(e.value),i=nA(()=>{r.value=e.value},t,n);return V(e,()=>i()),r}function iA(e,t={}){if(!pn(e))return Sn(e);let n=Array.isArray(e.value)?Array.from({length:e.value.length}):{};for(let r in e.value)n[r]=xn(()=>({get(){return e.value[r]},set(n){var i;let a=(i=B(t.replaceRef))??!0;if(a)if(Array.isArray(e.value)){let t=[...e.value];t[r]=n,e.value=t}else{let t={...e.value,[r]:n};Object.setPrototypeOf(t,Object.getPrototypeOf(e.value)),e.value=t}else e.value[r]=n}}));return n}const aA=B;function oA(e,t=!0,n){let r=eA();r?$r(e,n):t?e():Kn(e)}function sA(e,t=1e3,n={}){let{immediate:r=!0,immediateCallback:i=!1}=n,a=null,o=z(!1);function s(){a&&(clearInterval(a),a=null)}function c(){o.value=!1,s()}function l(){let n=B(t);n<=0||(o.value=!0,i&&e(),s(),o.value&&(a=setInterval(e,n)))}if(r&&Rk&&l(),pn(t)||typeof t==`function`){let e=V(t,()=>{o.value&&Rk&&l()});Pk(e)}return Pk(c),{isActive:o,pause:c,resume:l}}function cA(e,t,n){return V(e,t,{...n,immediate:!0})}const lA=Rk?window:void 0,uA=Rk?window.document:void 0,dA=Rk?window.navigator:void 0,fA=Rk?window.location:void 0;function pA(e){var t;let n=B(e);return(t=n?.$el)??n}function mA(...e){let t=[],n=()=>{t.forEach(e=>e()),t.length=0},r=(e,t,n,r)=>(e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)),i=H(()=>{let t=tA(B(e[0])).filter(e=>e!=null);return t.every(e=>typeof e!=`string`)?t:void 0}),a=cA(()=>{var t,n;return[(n=(t=i.value)?.map(e=>pA(e)))??[lA].filter(e=>e!=null),tA(B(i.value?e[1]:e[0])),tA(_n(i.value?e[2]:e[1])),B(i.value?e[3]:e[2])]},([e,i,a,o])=>{if(n(),!e?.length||!i?.length||!a?.length)return;let s=Uk(o)?{...o}:o;t.push(...e.flatMap(e=>i.flatMap(t=>a.map(n=>r(e,t,n,s)))))},{flush:`post`}),o=()=>{a(),n()};return Pk(n),o}function hA(){let e=z(!1),t=Ao();return t&&$r(()=>{e.value=!0},t),e}function gA(e){let t=hA();return H(()=>(t.value,!!e()))}function _A(e,t,n={}){let{window:r=lA,...i}=n,a,o=gA(()=>r&&`MutationObserver`in r),s=()=>{a&&(a.disconnect(),a=void 0)},c=H(()=>{let t=B(e),n=tA(t).map(pA).filter(Vk);return new Set(n)}),l=V(()=>c.value,e=>{s(),o.value&&e.size&&(a=new MutationObserver(t),e.forEach(e=>a.observe(e,i)))},{immediate:!0,flush:`post`}),u=()=>a?.takeRecords(),d=()=>{l(),s()};return Pk(d),{isSupported:o,stop:d,takeRecords:u}}function vA(e,t={}){let{immediate:n=!0,fpsLimit:r=void 0,window:i=lA,once:a=!1}=t,o=z(!1),s=H(()=>r?1e3/B(r):null),c=0,l=null;function u(t){if(!o.value||!i)return;c||=t;let n=t-c;if(s.value&&nn&&`matchMedia`in n&&typeof n.matchMedia==`function`),a=z(typeof r==`number`),o=z(),s=z(!1),c=e=>{s.value=e.matches};return Aa(()=>{if(a.value){a.value=!i.value;let t=B(e).split(`,`);s.value=t.some(e=>{let t=e.includes(`not all`),n=e.match(/\(\s*min-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/),i=e.match(/\(\s*max-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/),a=!!(n||i);return n&&a&&(a=r>=Qk(n[1])),i&&a&&(a=r<=Qk(i[1])),t?!a:a});return}i.value&&(o.value=n.matchMedia(B(e)),s.value=o.value.matches)}),mA(o,`change`,c,{passive:!0}),H(()=>s.value)}function SA(e){return JSON.parse(JSON.stringify(e))}function CA(e={}){let{window:t=lA}=e,n=z(1),r=xA(()=>`(resolution: ${n.value}dppx)`,e),i=Wk;return t&&(i=cA(r,()=>n.value=t.devicePixelRatio)),{pixelRatio:tn(n),stop:i}}function wA(e,t,n={}){let{window:r=lA,...i}=n,a,o=gA(()=>r&&`ResizeObserver`in r),s=()=>{a&&(a.disconnect(),a=void 0)},c=H(()=>{let t=B(e);return Array.isArray(t)?t.map(e=>pA(e)):[pA(t)]}),l=V(c,e=>{if(s(),o.value&&r){a=new ResizeObserver(t);for(let t of e)t&&a.observe(t,i)}},{immediate:!0,flush:`post`}),u=()=>{s(),l()};return Pk(u),{isSupported:o,stop:u}}function TA(e,t={}){let{reset:n=!0,windowResize:r=!0,windowScroll:i=!0,immediate:a=!0,updateTiming:o=`sync`}=t,s=z(0),c=z(0),l=z(0),u=z(0),d=z(0),f=z(0),p=z(0),m=z(0);function h(){let t=pA(e);if(!t){n&&(s.value=0,c.value=0,l.value=0,u.value=0,d.value=0,f.value=0,p.value=0,m.value=0);return}let r=t.getBoundingClientRect();s.value=r.height,c.value=r.bottom,l.value=r.left,u.value=r.right,d.value=r.top,f.value=r.width,p.value=r.x,m.value=r.y}function g(){o===`sync`?h():o===`next-frame`&&requestAnimationFrame(()=>h())}return wA(e,g),V(()=>pA(e),e=>!e&&g()),_A(e,g,{attributeFilter:[`style`,`class`]}),i&&mA(`scroll`,g,{capture:!0,passive:!0}),r&&mA(`resize`,g,{passive:!0}),oA(()=>{a&&g()}),{height:s,bottom:c,left:l,right:u,top:d,width:f,x:p,y:m,update:g}}function EA(e,t={width:0,height:0},n={}){let{window:r=lA,box:i=`content-box`}=n,a=H(()=>{var t,n;return(n=(t=pA(e))?.namespaceURI)?.includes(`svg`)}),o=z(t.width),s=z(t.height),{stop:c}=wA(e,([t])=>{let n=i===`border-box`?t.borderBoxSize:i===`content-box`?t.contentBoxSize:t.devicePixelContentBoxSize;if(r&&a.value){let t=pA(e);if(t){let e=t.getBoundingClientRect();o.value=e.width,s.value=e.height}}else if(n){let e=tA(n);o.value=e.reduce((e,{inlineSize:t})=>e+t,0),s.value=e.reduce((e,{blockSize:t})=>e+t,0)}else o.value=t.contentRect.width,s.value=t.contentRect.height},n);oA(()=>{let n=pA(e);n&&(o.value=`offsetWidth`in n?n.offsetWidth:t.width,s.value=`offsetHeight`in n?n.offsetHeight:t.height)});let l=V(()=>pA(e),e=>{o.value=e?t.width:0,s.value=e?t.height:0});function u(){c(),l()}return{width:o,height:s,stop:u}}function DA(e){var t;let n=z(0);if(typeof performance>`u`)return n;let r=(t=e?.every)??10,i=performance.now(),a=0;return vA(()=>{if(a+=1,a>=r){let e=performance.now(),t=e-i;n.value=Math.round(1e3/(t/a)),i=e,a=0}}),n}function OA(e={}){let t=R(),n=gA(()=>typeof performance<`u`&&`memory`in performance);if(n.value){let{interval:n=1e3}=e;sA(()=>{t.value=performance.memory},n,{immediate:e.immediate,immediateCallback:e.immediateCallback})}return{isSupported:n,memory:t}}const kA={x:0,y:0,pointerId:0,pressure:0,tiltX:0,tiltY:0,width:0,height:0,twist:0,pointerType:null},AA=Object.keys(kA);function jA(e={}){let{target:t=lA}=e,n=z(!1),r=R(e.initialValue||{});Object.assign(r.value,kA,r.value);let i=t=>{n.value=!0,!(e.pointerTypes&&!e.pointerTypes.includes(t.pointerType))&&(r.value=$k(t,AA,!1))};if(t){let e={passive:!0};mA(t,[`pointerdown`,`pointermove`,`pointerup`],i,e),mA(t,`pointerleave`,()=>n.value=!1,e)}return{...iA(r),isInside:n}}const MA=[{max:6e4,value:1e3,name:`second`},{max:276e4,value:6e4,name:`minute`},{max:72e6,value:36e5,name:`hour`},{max:5184e5,value:864e5,name:`day`},{max:24192e5,value:6048e5,name:`week`},{max:28512e6,value:2592e6,name:`month`},{max:1/0,value:31536e6,name:`year`}];function NA(e,t,n,r={}){var i,a,o;let{clone:s=!1,passive:c=!1,eventName:l,deep:u=!1,defaultValue:d,shouldEmit:f}=r,p=Ao(),m=n||p?.emit||(i=p?.$emit)?.bind(p)||(o=(a=p?.proxy)?.$emit)?.bind(p?.proxy),h=l;t||=`modelValue`,h||=`update:${t.toString()}`;let g=e=>s?typeof s==`function`?s(e):SA(e):e,_=()=>Bk(e[t])?g(e[t]):d,v=e=>{f?f(e)&&m(h,e):m(h,e)};if(c){let n=_(),r=R(n),i=!1;return V(()=>e[t],e=>{i||(i=!0,r.value=g(e),Kn(()=>i=!1))}),V(r,n=>{!i&&(n!==e[t]||u)&&v(n)},{deep:u}),r}else return H({get(){return _()},set(e){v(e)}})}function PA(e={}){let{window:t=lA,initialWidth:n=1/0,initialHeight:r=1/0,listenOrientation:i=!0,includeScrollbar:a=!0,type:o=`inner`}=e,s=z(n),c=z(r),l=()=>{if(t)if(o===`outer`)s.value=t.outerWidth,c.value=t.outerHeight;else if(o===`visual`&&t.visualViewport){let{width:e,height:n,scale:r}=t.visualViewport;s.value=Math.round(e*r),c.value=Math.round(n*r)}else a?(s.value=t.innerWidth,c.value=t.innerHeight):(s.value=t.document.documentElement.clientWidth,c.value=t.document.documentElement.clientHeight)};l(),oA(l);let u={passive:!0};if(mA(`resize`,l,u),t&&o===`visual`&&t.visualViewport&&mA(t.visualViewport,`resize`,l,u),i){let e=xA(`(orientation: portrait)`);V(e,()=>l())}return{width:s,height:c}}var FA=Object.defineProperty,IA=(e,t,n)=>t in e?FA(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,LA=(e,t,n)=>IA(e,typeof t==`symbol`?t:t+``,n);const RA=`@tresjs/core`,zA=`module`,BA=`4.3.6`,VA=`pnpm@10.6.3`,HA=`Declarative ThreeJS using Vue Components`,UA=`Alvaro Saburido (https://github.com/alvarosabu/)`,WA=`MIT`,GA={type:`git`,url:`git+https://github.com/Tresjs/tres.git`},KA=[`vue`,`3d`,`threejs`,`three`,`threejs-vue`],qA=!1,JA={".":{types:`./dist/index.d.ts`,import:`./dist/tres.js`,require:`./dist/tres.umd.cjs`},"./components":{types:`./dist/src/components/index.d.ts`},"./composables":{types:`./dist/src/composables/index.d.ts`},"./types":{types:`./dist/src/types/index.d.ts`},"./utils":{types:`./dist/src/utils/index.d.ts`},"./*":`./*`},YA=`./dist/tres.js`,XA=`./dist/tres.js`,ZA=`./dist/index.d.ts`,QA=[`*.d.ts`,`dist`],$A={access:`public`},ej={dev:`pnpm --filter='./playground/vue' dev`,"dev:nuxt":`pnpm --filter='./playground/nuxt' dev`,build:`vite build`,test:`vitest`,"test:ci":`vitest run`,"test:ui":`vitest --ui --coverage.enabled=true`,release:`release-it`,coverage:`vitest run --coverage`,lint:`eslint .`,"lint:fix":`eslint . --fix`,"docs:dev":`vitepress dev docs`,"docs:build":`vitepress build docs`,"docs:serve":`vitepress serve docs`,"docs:preview":`vitepress preview docs`,"docs:contributors":`esno scripts/update-contributors.ts`},tj={three:`>=0.133`,vue:`>=3.4`},nj={"@alvarosabu/utils":`^3.2.0`,"@vue/devtools-api":`^6.6.3`,"@vueuse/core":`^12.5.0`},rj={"@release-it/conventional-changelog":`^10.0.0`,"@stackblitz/sdk":`^1.11.0`,"@tresjs/cientos":`4.1.0`,"@tresjs/eslint-config":`^1.4.0`,"@types/three":`^0.173.0`,"@typescript-eslint/eslint-plugin":`^8.23.0`,"@typescript-eslint/parser":`^8.23.0`,"@vitejs/plugin-vue":`^5.2.1`,"@vitest/coverage-c8":`^0.33.0`,"@vitest/coverage-v8":`^3.0.5`,"@vitest/ui":`^3.0.5`,"@vue/test-utils":`^2.4.6`,eslint:`^9.19.0`,"eslint-plugin-vue":`^9.32.0`,esno:`^4.8.0`,gsap:`^3.12.7`,jsdom:`^26.0.0`,kolorist:`^1.8.0`,ohmyfetch:`^0.4.21`,pathe:`^2.0.2`,"release-it":`^18.1.2`,"rollup-plugin-analyzer":`^4.0.0`,"rollup-plugin-copy":`^3.5.0`,"rollup-plugin-visualizer":`^5.14.0`,sponsorkit:`^16.3.0`,three:`^0.173.0`,unocss:`^65.4.3`,unplugin:`^2.1.2`,"unplugin-vue-components":`^28.0.0`,vite:`^6.1.0`,"vite-plugin-banner":`^0.8.0`,"vite-plugin-dts":`4.5.0`,"vite-plugin-inspect":`^10.1.0`,"vite-plugin-require-transform":`^1.0.21`,"vite-svg-loader":`^5.1.0`,vitepress:`1.6.3`,vitest:`3.0.5`,vue:`3.5.13`,"vue-demi":`^0.14.10`},ij={name:RA,type:zA,version:BA,packageManager:VA,description:HA,author:UA,license:WA,repository:GA,keywords:KA,sideEffects:qA,exports:JA,main:YA,module:XA,types:ZA,files:QA,publishConfig:$A,scripts:ej,peerDependencies:tj,dependencies:nj,devDependencies:rj};function aj(e){let t={nodes:{},materials:{}};return e&&e.traverse(e=>{e.name&&(t.nodes[e.name]=e),e.material&&!t.materials[e.material.name]&&(t.materials[e.material.name]=e.material)}),t}async function oj(e,t,n,r,i){let{logError:a}=hM(),o=new e;return i&&i(o),n&&n(o),await new Promise((e,n)=>{o.load(t,t=>{let n=t;n.scene&&Object.assign(n,aj(n.scene)),e(n)},r,e=>{a(`[useLoader] - Failed to load resource`,e),n(e)})})}var sj=class extends Eg{constructor(...e){super(...e),LA(this,`type`,`HightlightMesh`),LA(this,`createTime`),this.createTime=Date.now()}onBeforeRender(){let e=(Date.now()-this.createTime)/1e3,t=1+.07*Math.sin(2.5*e);this.scale.set(t,t,t)}};function cj(e){return typeof e>`u`}function lj(e){return Array.isArray(e)}function uj(e){return typeof e==`number`}function dj(e){return typeof e==`string`}function fj(e){return typeof e==`function`}function pj(e){return e===Object(e)&&!lj(e)&&!fj(e)}function mj(e){return pj(e)&&!!e.isObject3D}function hj(e){return pj(e)&&!!e.isColor}function gj(e){return e!=null&&(typeof e==`string`||typeof e==`number`||hj(e))}function _j(e){return typeof e==`object`&&!!e&&`set`in e&&typeof e.set==`function`}function vj(e){return _j(e)&&`copy`in e&&typeof e.copy==`function`}function yj(e){return!!(e!=null&&e.constructor)}function bj(e){return e instanceof ah}function xj(e){return pj(e)&&!!e.isCamera}function Sj(e){return pj(e)&&!!e.isBufferGeometry}function Cj(e){return pj(e)&&!!e.isMaterial}function wj(e){return pj(e)&&!!e.isLight}function Tj(e){return pj(e)&&!!e.isFog}function Ej(e){return pj(e)&&!!e.isScene}function Dj(e){return mj(e)||Sj(e)||Cj(e)||Tj(e)}function Oj(e){return pj(e)&&!!e.isPrimitive}const kj=(e,t)=>{for(let n of Object.keys(t))t[n]instanceof Object&&Object.assign(t[n],kj(e[n],t[n]));return Object.assign(e||{},t),e},Aj=`html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot`,jj=Ij(Aj);function Mj(e){return e&&e.nodeType===1}function Nj(e){return e.replace(/-([a-z])/g,(e,t)=>t.toUpperCase())}const Pj=/\B([A-Z])/g;function Fj(e){return e.replace(Pj,`-$1`).toLowerCase()}function Ij(e,t){let n=Object.create(null),r=e.split(`,`);for(let e=0;e!!n[e.toLowerCase()]:e=>!!n[e]}const Lj=(e,t)=>{if(!t)return;let n=Array.isArray(t)?t:t.match(/([^[.\]])+/g);return n?.reduce((e,t)=>e&&e[t],e)},Rj=(e,t,n)=>{let r=Array.isArray(t)?t:t.match(/([^[.\]])+/g);r&&r.reduce((e,t,i)=>(e[t]===void 0&&(e[t]={}),i===r.length-1&&(e[t]=n),e[t]),e)};function zj(e,t){if(Mj(e)&&Mj(t)){let n=e.attributes,r=t.attributes;return n.length===r.length?Array.from(n).every(({name:e,value:n})=>t.getAttribute(e)===n):!1}if(e===t)return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let i of n)if(!r.includes(i)||!zj(e[i],t[i]))return!1;return!0}function Bj(e,t){if(!Array.isArray(e)||!Array.isArray(t)||e.length!==t.length)return!1;for(let n=0;n{if(e.uuid===t)return e;for(let t of e.children){let e=i(t);if(e)return e}},a=i(e);if(!a){console.warn(`Object with UUID not found in the scene.`);return}let o=a;for(let e=0;eKj(e)),!(e instanceof $g)){let t=e;e&&((n=e.dispose)==null||n.call(e)),t.geometry&&t.geometry.dispose(),Array.isArray(t.material)?t.material.forEach(e=>Gj(e)):t.material&&Gj(t.material)}}function qj(e,t){let n=0;for(let r=0;rt===0?e:e.charAt(0).toUpperCase()+e.slice(1)).join(``)}const Xj=/-\d+$/;function Zj(e,t,n){if(dj(n)){if(Xj.test(n)){let t=n.replace(Xj,``),{target:r,key:i}=Jj(e,t);if(!Array.isArray(r[i])){let e=r[i],t=[];t.__tresDetach=()=>{t.every(e=>cj(e))&&(r[i]=e)},r[i]=t}}let{target:r,key:i}=Jj(e,n);t.__tres.previousAttach=r[i],r[i]=rM(t)}else t.__tres.previousAttach=n(e,t)}function Qj(e,t,n){var r,i,a;if(dj(n)){let{target:r,key:i}=Jj(e,n),a=t.__tres.previousAttach;a===void 0?delete r[i]:r[i]=a,`__tresDetach`in r&&r.__tresDetach()}else (i=(r=t.__tres)?.previousAttach)==null||i.call(r,e,t);(a=t.__tres)==null||delete a.previousAttach}function $j(e,t,n){let r=e;return r.__tres={type:`unknown`,eventCount:0,root:n,handlers:{},memoizedProps:{},objects:[],parent:null,previousAttach:null,...t},r.__tres.attach||(r.isMaterial?r.__tres.attach=`material`:r.isBufferGeometry?r.__tres.attach=`geometry`:r.isFog&&(r.__tres.attach=`fog`)),r}function eM(e){var t;let n=(t=e?.__tres)?.root;n&&n.render&&n.render.canBeInvalidated.value&&n.invalidate()}function tM(e,t,n){var r;if(!fj(e.setPixelRatio))return;let i=0;if(n&&lj(n)&&n.length>=2){let[e,r]=n;i=zp.clamp(t,e,r)}else i=uj(n)?n:t;i!==(r=e.getPixelRatio)?.call(e)&&e.setPixelRatio(i)}function nM(e,t,n,r,i){let a=[...t.__tres.objects],o=rM(t);if(e=rM(e),o===e)return!0;let s=$j(e,t.__tres??{},i),c=t.parent??t.__tres.parent??null,l={...t.__tres.memoizedProps};delete l.object;for(let e of a)iM(e,i),aM(e,i);o.__tres.objects=[],r.remove(t);for(let[e,t]of Object.entries(l))r.patchProp(s,e,s[e],t);n(e),r.insert(t,c);for(let e of a)r.insert(e,t);return!0}function rM(e){return Oj(e)?(e.object.__tres=e.__tres,e.object):e}function iM(e,t){var n,r,i,a;let o=(n=e.__tres)?.parent||t.scene.value;e.__tres&&(e.__tres.parent=null),o&&o.__tres&&`objects`in o.__tres&&qj(o.__tres.objects,t=>t!==e),(r=e.__tres)!=null&&r.attach?Qj(o,e,e.__tres.attach):((a=(i=e.parent)?.remove)==null||a.call(i,rM(e)),e.parent=null)}function aM(e,t){var n;(n=e.traverse)==null||n.call(e,e=>{var n;t.deregisterCamera(e),(n=t.eventManager)==null||n.deregisterPointerMissedObject(e)}),t.deregisterCamera(e),eM(e)}async function oM(e,t){let n=new jx(t),r=e=>new Promise((t,r)=>{n.load(e,e=>t(e),()=>null,()=>{r(Error(`[useTextures] - Failed to load texture`))})});if(Vj(e)){let t=await Promise.all(e.map(e=>r(e)));return e.length>1?t:t[0]}else{let{map:t,displacementMap:n,normalMap:i,roughnessMap:a,metalnessMap:o,aoMap:s,alphaMap:c,matcap:l}=e;return{map:t?await r(t):null,displacementMap:n?await r(n):null,normalMap:i?await r(i):null,roughnessMap:a?await r(a):null,metalnessMap:o?await r(o):null,aoMap:s?await r(s):null,alphaMap:c?await r(c):null,matcap:l?await r(l):null}}}const sM=Rr({__name:`component`,props:{map:{},displacementMap:{},normalMap:{},roughnessMap:{},metalnessMap:{},aoMap:{},alphaMap:{},matcap:{}},async setup(e){let t,n,r=e,i=([t,n]=Ai(()=>$t(oM(r))),t=await t,n(),t);return(e,t)=>_i(e.$slots,`default`,{textures:_n(i)})}}),cM=({sizes:e})=>{let t=R([]),n=H(()=>t.value[0]),r=e=>{let n=e instanceof Rg?e:t.value.find(t=>t.uuid===e);if(!n)return;let r=t.value.filter(({uuid:e})=>e!==n.uuid);t.value=[n,...r]},i=(e,n=!1)=>{if(xj(e)){let i=e;if(t.value.some(({uuid:e})=>e===i.uuid))return;n?r(i):t.value.push(i)}},a=e=>{if(xj(e)){let n=e;t.value=t.value.filter(({uuid:e})=>e!==n.uuid)}};return Aa(()=>{e.aspectRatio.value&&t.value.forEach(t=>{!t.manual&&(t instanceof Hg||lM(t))&&(t instanceof Hg?t.aspect=e.aspectRatio.value:(t.left=e.width.value*-.5,t.right=e.width.value*.5,t.top=e.height.value*.5,t.bottom=e.height.value*-.5),t.updateProjectionMatrix())})}),ri(()=>{t.value=[]}),{camera:n,cameras:t,registerCamera:i,deregisterCamera:a,setCameraActive:r}};function lM(e){return e.hasOwnProperty(`isOrthographicCamera`)&&e.isOrthographicCamera}const uM=!0,dM=`[TresJS ▲ ■ ●] `;function fM(...e){typeof e[0]==`string`?e[0]=dM+e[0]:e.unshift(dM),console.error(...e)}function pM(...e){typeof e[0]==`string`?e[0]=dM+e[0]:e.unshift(dM),console.warn(...e)}function mM(e,t){}function hM(){return{logError:fM,logWarning:pM,logMessage:mM}}const gM=R({}),_M=e=>Object.assign(gM.value,e);function vM(){let e=new Map,t=new Set,n=0,r=!1,i=()=>{let n=Array.from(e.entries()).sort((e,t)=>{let n=e[1].priority-t[1].priority;return n===0?e[1].addI-t[1].addI:n});t.clear(),n.forEach(e=>t.add(e[0]))},a=n=>{e.delete(n),t.delete(n)};return{on:(t,i=0)=>{e.set(t,{priority:i,addI:n++});let o=()=>a(t);return Pk(o),r=!0,{off:o}},off:a,trigger:(...e)=>{r&&(i(),r=!1),t.forEach(t=>t(...e))},dispose:()=>{e.clear(),t.clear()},get count(){return e.size}}}function yM(){let e=!0,t=!0,n=!1,r=new gS(!1),i=R(r.running),a=R(!1),o,s=zp.generateUUID(),c=null,l=vM(),u=vM(),d=vM();S();let f={};function p(e){f=e}function m(e,t,n=0){switch(t){case`before`:return l.on(e,n);case`render`:return c||=e,u.dispose(),u.on(e);case`after`:return d.on(e,n)}}function h(){t&&(t=!1,S(),x())}function g(){t=!0,S(),cancelAnimationFrame(o)}function _(){n=!1,S()}function v(){n=!0,S()}function y(){a.value=!0}function b(){a.value=!1}function x(){if(!e){o=requestAnimationFrame(x);return}let t=r.getDelta(),n=r.getElapsedTime(),s={camera:_n(f.camera),scene:_n(f.scene),renderer:_n(f.renderer),raycaster:_n(f.raycaster),controls:_n(f.controls),invalidate:f.invalidate,advance:f.advance},p={delta:t,elapsed:n,clock:r,...s};i.value&&l.trigger(p),a.value||(u.count?u.trigger(p):c&&c(p)),i.value&&d.trigger(p),o=requestAnimationFrame(x)}function S(){let e=!t&&!n;r.running!==e&&(r.running?r.stop():r.start()),i.value=r.running}return{loopId:s,register:(e,t,n)=>m(e,t,n),start:h,stop:g,pause:v,resume:_,pauseRender:y,resumeRender:b,isRenderPaused:a,isActive:i,setContext:p,setReady:t=>e=t}}function bM(e){let t=0;return e.traverse(e=>{if(e.isMesh&&e.geometry&&e.type!==`HightlightMesh`){let n=e.geometry,r=n.attributes.position.count*3*Float32Array.BYTES_PER_ELEMENT,i=n.index?n.index.count*Uint32Array.BYTES_PER_ELEMENT:0,a=n.attributes.normal?n.attributes.normal.count*3*Float32Array.BYTES_PER_ELEMENT:0,o=n.attributes.uv?n.attributes.uv.count*2*Float32Array.BYTES_PER_ELEMENT:0,s=r+i+a+o;t+=s}}),t}function xM(e){return(e/1024).toFixed(2)}const SM=Number.parseInt(El.replace(`dev`,``));function CM(e){return e instanceof K?e:Array.isArray(e)?new K(...e):new K(e)}const wM={realistic:{shadows:!0,physicallyCorrectLights:!0,outputColorSpace:Sf,toneMapping:Du,toneMappingExposure:3,shadowMap:{enabled:!0,type:Fl}},flat:{toneMapping:Cu,toneMappingExposure:1}};function TM({canvas:e,options:t,contextParts:{sizes:n,render:r,invalidate:i,advance:a}}){let o=H(()=>({alpha:aA(t.alpha)??!0,depth:aA(t.depth),canvas:pA(e),context:aA(t.context),stencil:aA(t.stencil),antialias:aA(t.antialias)??!0,precision:aA(t.precision),powerPreference:aA(t.powerPreference),premultipliedAlpha:aA(t.premultipliedAlpha),preserveDrawingBuffer:aA(t.preserveDrawingBuffer),logarithmicDepthBuffer:aA(t.logarithmicDepthBuffer),failIfMajorPerformanceCaveat:aA(t.failIfMajorPerformanceCaveat)})),s=z(new Nk(o.value));function c(){t.renderMode===`on-demand`&&i()}V(o,()=>{s.value.dispose(),s.value=new Nk(o.value),c()}),V([n.width,n.height],()=>{s.value.setSize(n.width.value,n.height.value),c()},{immediate:!0}),V(()=>t.clearColor,c);let{pixelRatio:l}=CA(),{logError:u}=hM(),d=(()=>{let e=new Nk,t={shadowMap:{enabled:e.shadowMap.enabled,type:e.shadowMap.type},toneMapping:e.toneMapping,toneMappingExposure:e.toneMappingExposure,outputColorSpace:e.outputColorSpace};return e.dispose(),t})(),f=aA(t.renderMode);return f===`on-demand`&&i(),f===`manual`&&setTimeout(()=>{a()},100),Aa(()=>{let e=aA(t.preset);e&&(e in wM||u(`Renderer Preset must be one of these: ${Object.keys(wM).join(`, `)}`),kj(s.value,wM[e])),tM(s.value,l.value,aA(t.dpr)),f===`always`&&(r.frames.value=Math.max(1,r.frames.value));let n=(t,n)=>{let r=aA(t),i=()=>{if(e)return Lj(wM[e],n)};if(r!==void 0)return r;let a=i();return a===void 0?Lj(d,n):a},i=(e,t)=>Rj(s.value,t,n(e,t));i(t.shadows,`shadowMap.enabled`),i(t.toneMapping??Du,`toneMapping`),i(t.shadowMapType,`shadowMap.type`),SM<150&&i(!t.useLegacyLights,`physicallyCorrectLights`),i(t.outputColorSpace,`outputColorSpace`),i(t.toneMappingExposure,`toneMappingExposure`);let a=n(t.clearColor,`clearColor`);a&&s.value.setClearColor(a?CM(a):new K(0))}),ri(()=>{s.value.dispose(),s.value.forceContextLoss()}),{renderer:s}}function EM(e,t,n=10){let r=aA(e)?PA():EA(H(()=>aA(t).parentElement)),i=tn(rA(r.width,n)),a=tn(rA(r.height,n)),o=H(()=>i.value/a.value);return{height:a,width:i,aspectRatio:o}}const DM=(e,t)=>{let n=H(()=>t.renderer.value.domElement),r=z([]),{x:i,y:a}=jA({target:n}),o=0,{width:s,height:c,top:l,left:u}=TA(n),d=({x:e,y:t})=>{if(n.value)return{x:(e-u.value)/s.value*2-1,y:-((t-l.value)/c.value)*2+1}},f=({x:n,y:i})=>{if(t.camera.value)return t.raycaster.value.setFromCamera(new U(n,i),t.camera.value),r.value=t.raycaster.value.intersectObjects(e.value,!0),r.value},p=e=>{let t=d({x:e?.clientX??i.value,y:e?.clientY??a.value});return t&&f(t)||[]},m=Fk(),h=Fk(),g=Fk(),_=Fk(),v=Fk(),y=Fk(),b=Fk(),x=Fk();function S(e){let t={};for(let n in e)typeof n!=`function`&&(t[n]=e[n]);return t}let C=(e,n)=>{var i,a,s;let c=S(n),l=new W(n?.clientX,n?.clientY,0).unproject((i=t.camera)?.value);e.trigger({...c,intersections:r.value,unprojectedPoint:l,ray:(a=t.raycaster)?.value.ray,camera:(s=t.camera)?.value,sourceEvent:n,delta:o,stopPropagating:!1})},w,T=e=>{p(e),C(g,e),w=e},E=()=>{w&&T(w)},D,O,k,A=e=>{var t;D=(t=r.value[0])?.object,o=0,O=new U(e?.clientX??i.value,e?.clientY??a.value),C(v,e)},j,M=!1,N=e=>{var t,n,s;e instanceof PointerEvent&&(r.value.length===0&&C(y,e),D===(t=r.value[0])?.object&&(k=new U(e?.clientX??i.value,e?.clientY??a.value),o=O?.distanceTo(k),e.button===0?(C(m,e),j===(n=r.value[0])?.object?M=!0:(j=(s=r.value[0])?.object,M=!1)):e.button===2&&C(b,e)),C(_,e))},ee=e=>{M&&(C(h,e),j=void 0,M=!1)},te=e=>C(g,e),P=e=>C(x,e);return n.value.addEventListener(`pointerup`,N),n.value.addEventListener(`pointerdown`,A),n.value.addEventListener(`pointermove`,T),n.value.addEventListener(`pointerleave`,te),n.value.addEventListener(`dblclick`,ee),n.value.addEventListener(`wheel`,P),ri(()=>{n!=null&&n.value&&(n.value.removeEventListener(`pointerup`,N),n.value.removeEventListener(`pointerdown`,A),n.value.removeEventListener(`pointermove`,T),n.value.removeEventListener(`pointerleave`,te),n.value.removeEventListener(`dblclick`,ee),n.value.removeEventListener(`wheel`,P))}),{intersects:r,onClick:e=>m.on(e).off,onDblClick:e=>h.on(e).off,onContextMenu:e=>b.on(e).off,onPointerMove:e=>g.on(e).off,onPointerUp:e=>_.on(e).off,onPointerDown:e=>v.on(e).off,onPointerMissed:e=>y.on(e).off,onWheel:e=>x.on(e).off,forceUpdate:E}};function OM(e,t){if(Array.isArray(e))for(let n of e)n(t);typeof e==`function`&&e(t)}function kM(e,t,n){var r;let i=z(),a=z();e&&(i.value=e),t&&(a.value=t);let o=e=>{var t;return(t=e.__tres)?.eventCount>0},s=e=>{var t;return(t=e.children)?.some(e=>s(e))||o(e)},c=z(((r=i.value)?.children).filter(s)||[]);function l(e,t){let r=[],i=()=>t.stopPropagating=!0;t.stopPropagation=i;for(let i of t?.intersections){if(t.stopPropagating)return;t={...t,...i};let{object:a}=i;t.eventObject=a,OM(a[e],t),r.push(a);let o=a.parent;for(;o!==null&&!t.stopPropagating&&!r.includes(o);)t.eventObject=o,OM(o[e],t),r.push(o),o=o.parent;let s=Fj(e.slice(2));n(s,{intersection:i,event:t})}}let{onClick:u,onDblClick:d,onContextMenu:f,onPointerMove:p,onPointerDown:m,onPointerUp:h,onPointerMissed:g,onWheel:_,forceUpdate:v}=DM(c,t);h(e=>l(`onPointerUp`,e)),m(e=>l(`onPointerDown`,e)),u(e=>l(`onClick`,e)),d(e=>l(`onDoubleClick`,e)),f(e=>l(`onContextMenu`,e)),_(e=>l(`onWheel`,e));let y=[];p(e=>{let t=e.intersections.map(({object:e})=>e),n=e.intersections;y.forEach(({object:n})=>{t.includes(n)||(e.intersections=y,l(`onPointerLeave`,e),l(`onPointerOut`,e))}),e.intersections=n,e.intersections.forEach(({object:t})=>{y.includes(t)||(l(`onPointerEnter`,e),l(`onPointerOver`,e))}),l(`onPointerMove`,e),y=e.intersections});let b=[];g(e=>{let t=()=>e.stopPropagating=!0;e.stopPropagation=t,b.forEach(t=>{e.stopPropagating||(e.eventObject=t,OM(t.onPointerMissed,e))}),n(`pointer-missed`,{event:e})});function x(e){Dj(e)&&mj(e)&&c.value.push(e)}function S(e){if(Dj(e)&&mj(e)){let t=c.value.indexOf(e);t>-1&&c.value.splice(t,1)}}function C(e){Dj(e)&&mj(e)&&e.onPointerMissed&&b.push(e)}function w(e){if(Dj(e)&&mj(e)){let t=b.indexOf(e);t>-1&&b.splice(t,1)}}return t.eventManager={forceUpdate:v,registerObject:x,deregisterObject:S,registerPointerMissedObject:C,deregisterPointerMissedObject:w},{forceUpdate:v,registerObject:x,deregisterObject:S,registerPointerMissedObject:C,deregisterPointerMissedObject:w}}function AM(e,t,n=100){n=n<=0?100:n;let r=Fk(),i=new Set,a=!1,o=!1,s=null;function c(){s&&clearTimeout(s),!o&&!a&&e()?(r.trigger(t),i.forEach(e=>e()),i.clear(),a=!0):!o&&!a&&(s=setTimeout(c,n))}function l(){o=!0,s&&clearTimeout(s)}c();let u=(e,...t)=>{e(...t)};return{on:e=>{if(a)return u(e,t),{off:()=>{}};{let t=r.on(e);return i.add(t.off),r.on(e)}},off:r.off,trigger:r.trigger,clear:r.clear,cancel:l}}const jM=new WeakMap;function MM(e){if(e||=PM(),jM.has(e))return jM.get(e);let t=100,n=Date.now(),r=AM(()=>{if(Date.now()-n>=t)return!0;{let t=e.renderer.value,n=t?.domElement||{width:0,height:0};return!!(t&&n.width>0&&n.height>0)}},e);return jM.set(e,r),r}function NM({scene:e,canvas:t,windowSize:n,rendererOptions:r,emit:i}){let a=z(e),o=EM(n,t),{camera:s,cameras:c,registerCamera:l,deregisterCamera:u,setCameraActive:d}=cM({sizes:o}),f={mode:R(r.renderMode||`always`),priority:R(0),frames:R(0),maxFrames:60,canBeInvalidated:H(()=>f.mode.value===`on-demand`&&f.frames.value===0)};function p(e=1){r.renderMode===`on-demand`&&(f.frames.value=Math.min(f.maxFrames,f.frames.value+e))}function m(){r.renderMode===`manual`&&(f.frames.value=1)}let{renderer:h}=TM({canvas:t,options:r,contextParts:{sizes:o,render:f,invalidate:p,advance:m}}),g={sizes:o,scene:a,camera:s,cameras:tn(c),renderer:h,raycaster:z(new tC),controls:R(null),perf:{maxFrames:160,fps:{value:0,accumulator:[]},memory:{currentMem:0,allocatedMem:0,accumulator:[]}},render:f,advance:m,extend:_M,invalidate:p,registerCamera:l,setCameraActive:d,deregisterCamera:u,loop:yM()};Xi(`useTres`,g),g.scene.value.__tres={root:g},g.loop.register(()=>{s.value&&f.frames.value>0&&(h.value.render(e,s.value),i(`render`,g.renderer.value)),f.priority.value=0,f.mode.value===`always`?f.frames.value=1:f.frames.value=Math.max(0,f.frames.value-1)},`render`);let{on:_,cancel:v}=MM(g);g.loop.setReady(!1),g.loop.start(),_(()=>{i(`ready`,g),g.loop.setReady(!0),kM(e,g,i)}),ri(()=>{v(),g.loop.stop()});let y=100,b=DA({every:y}),{isSupported:x,memory:S}=OA({interval:y}),C=160,w=performance.now(),T=({timestamp:e})=>{g.scene.value&&(g.perf.memory.allocatedMem=bM(g.scene.value)),e-w>=y&&(w=e,g.perf.fps.accumulator.push(b.value),g.perf.fps.accumulator.length>C&&g.perf.fps.accumulator.shift(),g.perf.fps.value=b.value,x.value&&S.value&&(g.perf.memory.accumulator.push(S.value.usedJSHeapSize/1024/1024),g.perf.memory.accumulator.length>C&&g.perf.memory.accumulator.shift(),g.perf.memory.currentMem=g.perf.memory.accumulator.reduce((e,t)=>e+t,0)/g.perf.memory.accumulator.length))},E=0,D=1,{pause:O}=vA(({delta:e})=>{window.__TRES__DEVTOOLS__&&(T({timestamp:performance.now()}),E+=e,E>=D&&(window.__TRES__DEVTOOLS__.cb(g),E=0))},{immediate:!0});return ri(()=>{O()}),g}function PM(){let e=Zi(`useTres`);if(!e)throw Error(`useTresContext must be used together with useTresContextProvider`);return e}const FM=PM;function IM(){let{camera:e,scene:t,renderer:n,loop:r,raycaster:i,controls:a,invalidate:o,advance:s}=PM();r.setContext({camera:e,scene:t,renderer:n,raycaster:i,controls:a,invalidate:o,advance:s});function c(e,t=0){return r.register(e,`before`,t)}function l(e){return r.register(e,`render`)}function u(e,t=0){return r.register(e,`after`,t)}return{pause:r.pause,resume:r.resume,pauseRender:r.pauseRender,resumeRender:r.resumeRender,isActive:r.isActive,onBeforeRender:c,render:l,onAfterRender:u}}const LM=Fk(),RM=Fk(),zM=Fk(),BM=new gS;let VM=0,HM=0;const{pause:UM,resume:WM,isActive:GM}=vA(()=>{LM.trigger({delta:VM,elapsed:HM,clock:BM}),RM.trigger({delta:VM,elapsed:HM,clock:BM}),zM.trigger({delta:VM,elapsed:HM,clock:BM})},{immediate:!1});zM.on(()=>{VM=BM.getDelta(),HM=BM.getElapsedTime()});function KM(e,t={},n={}){let r=e,i=e=>{r=e},a=new Proxy({},{}),o={has(e,n){return n in t||n in r},get(e,n,i){return n in t?t[n](r):r[n]},set(e,t,o){return n[t]?n[t](o,r,a,i):r[t]=o,!0}};return a=new Proxy({},o),a}const{logError:qM}=hM(),JM=[`onClick`,`onContextMenu`,`onPointerMove`,`onPointerEnter`,`onPointerLeave`,`onPointerOver`,`onPointerOut`,`onDoubleClick`,`onPointerDown`,`onPointerUp`,`onPointerCancel`,`onPointerMissed`,`onLostPointerCapture`,`onWheel`],YM=e=>{let t=e.scene.value;function n(t,n,o,s){if(s||={},s.args||=[],t===`template`||jj(t))return null;let c=t.replace(`Tres`,``),l;if(t===`primitive`){(!pj(s.object)||pn(s.object))&&qM(`Tres primitives need an 'object' prop, whose value is an object or shallowRef`),c=s.object.type;let t={};l=KM(s.object,{object:e=>e,isPrimitive:()=>!0,__tres:()=>t},{object:(t,n,o,s)=>{nM(t,o,s,{patchProp:a,remove:i,insert:r},e)},__tres:e=>{Object.assign(t,e)}})}else{let e=gM.value[c];e||qM(`${c} is not defined on the THREE namespace. Use extend to add it to the catalog.`),l=new e(...s.args)}return l?(l.isCamera&&(s!=null&&s.position||l.position.set(3,3,3),s!=null&&s.lookAt||l.lookAt(0,0,0)),l=$j(l,{...l.__tres,type:c,memoizedProps:s,eventCount:0,primitive:t===`primitive`,attach:s.attach},e),l):null}function r(n,r){var i,a,o;if(!n)return;r||=t;let s=n.__tres?n:$j(n,{},e),c=r.__tres?r:$j(r,{},e);n=rM(s),r=rM(c),n.__tres&&(i=n.__tres)?.eventCount>0&&((a=e.eventManager)==null||a.registerObject(n)),e.registerCamera(n),(o=e.eventManager)==null||o.registerPointerMissedObject(n),s.__tres.attach?Zj(c,s,s.__tres.attach):mj(n)&&mj(c)&&(c.add(n),n.dispatchEvent({type:`added`})),s.__tres.parent=c,c.__tres.objects&&!c.__tres.objects.includes(s)&&c.__tres.objects.push(s)}function i(t,n){var r,a,o,s;if(!t)return;t!=null&&t.__tres&&(r=t.__tres)?.eventCount>0&&((a=e.eventManager)==null||a.deregisterObject(t)),n=cj(n)?`default`:n;let c=(o=t.__tres)?.dispose;cj(c)||(n=c===null?!1:c);let l=(s=t.__tres)?.primitive,u=n===`default`?!l:!!n;if(t.__tres&&`objects`in t.__tres&&[...t.__tres.objects].forEach(e=>i(e,n)),u&&t.children&&[...t.children].forEach(e=>i(e,n)),iM(t,e),aM(t,e),u&&!Ej(t)){if(fj(n))n(t);else if(fj(t.dispose))try{t.dispose()}catch{}}`__tres`in t&&delete t.__tres}function a(t,n,a,o){var s,c;if(!t)return;let l=t,u=n;if(t.__tres&&(t.__tres.memoizedProps[n]=o),n===`attach`){let n=(s=t.__tres)?.parent||t.parent;i(t),$j(t,{attach:o},e),n&&r(t,n);return}if(n===`dispose`){t.__tres||(t=$j(t,{},e)),t.__tres.dispose=o;return}if(mj(t)&&u===`blocks-pointer-events`){o||o===``?t[u]=o:delete t[u];return}JM.includes(n)&&t.__tres&&(t.__tres.eventCount+=1);let d=Nj(u),f=l?.[d];if(u===`args`){let e=t,n=a??[],r=o??[],i=(c=t.__tres)?.type||t.type;i&&n.length&&!Bj(n,r)&&(l=Object.assign(e,new gM.value[i](...o)));return}if(l.type===`BufferGeometry`){if(u===`args`)return;l.setAttribute(Nj(u),new Qh(...o));return}if(u.includes(`-`)&&f===void 0){f=l;for(let e of u.split(`-`))d=u=Nj(e),l=f,f=f?.[u]}let p=o;if(p===``&&(p=!0),fj(f)){JM.includes(n)||(lj(p)?t[d](...p):t[d](p)),d.startsWith(`on`)&&fj(p)&&(l[d]=p);return}bj(f)&&bj(p)?f.mask=p.mask:hj(f)&&gj(p)?f.set(p):vj(f)&&yj(p)&&f.constructor===p.constructor?f.copy(p):_j(f)&&Array.isArray(p)?`fromArray`in f&&typeof f.fromArray==`function`?f.fromArray(p):f.set(...p):_j(f)&&typeof p==`number`?`setScalar`in f&&typeof f.setScalar==`function`?f.setScalar(p):f.set(p):l[d]=p,eM(t)}function o(e){var t;return(t=e?.__tres)?.parent||null}function s(t){let n=$j(new xh,{type:`Comment`},e);return n.name=t,n}function c(e){var t;let n=o(e),r=(t=n?.__tres)?.objects||[],i=r.indexOf(e);return i<0||i>=r.length-1?null:r[i+1]}return{insert:r,remove:i,createElement:n,patchProp:a,parentNode:o,createText:()=>void 0,createComment:s,setText:()=>void 0,setElementText:()=>void 0,nextSibling:c,querySelector:()=>void 0,setScopeId:()=>void 0,cloneNode:()=>void 0,insertStaticContent:()=>void 0}};function XM(){return ZM().__VUE_DEVTOOLS_GLOBAL_HOOK__}function ZM(){return typeof navigator<`u`&&typeof window<`u`?window:typeof globalThis<`u`?globalThis:{}}const QM=typeof Proxy==`function`,$M=`devtools-plugin:setup`,eN=`plugin:settings:set`;let tN,nN;function rN(){var e;return tN!==void 0||(typeof window<`u`&&window.performance?(tN=!0,nN=window.performance):typeof globalThis<`u`&&(e=globalThis.perf_hooks)!=null&&e.performance?(tN=!0,nN=globalThis.perf_hooks.performance):tN=!1),tN}function iN(){return rN()?nN.now():Date.now()}var aN=class{constructor(e,t){this.target=null,this.targetQueue=[],this.onQueue=[],this.plugin=e,this.hook=t;let n={};if(e.settings)for(let t in e.settings){let r=e.settings[t];n[t]=r.defaultValue}let r=`__vue-devtools-plugin-settings__${e.id}`,i=Object.assign({},n);try{let e=localStorage.getItem(r),t=JSON.parse(e);Object.assign(i,t)}catch{}this.fallbacks={getSettings(){return i},setSettings(e){try{localStorage.setItem(r,JSON.stringify(e))}catch{}i=e},now(){return iN()}},t&&t.on(eN,(e,t)=>{e===this.plugin.id&&this.fallbacks.setSettings(t)}),this.proxiedOn=new Proxy({},{get:(e,t)=>this.target?this.target.on[t]:(...e)=>{this.onQueue.push({method:t,args:e})}}),this.proxiedTarget=new Proxy({},{get:(e,t)=>this.target?this.target[t]:t===`on`?this.proxiedOn:Object.keys(this.fallbacks).includes(t)?(...e)=>(this.targetQueue.push({method:t,args:e,resolve:()=>{}}),this.fallbacks[t](...e)):(...e)=>new Promise(n=>{this.targetQueue.push({method:t,args:e,resolve:n})})})}async setRealTarget(e){this.target=e;for(let e of this.onQueue)this.target.on[e.method](...e.args);for(let e of this.targetQueue)e.resolve(await this.target[e.method](...e.args))}};function oN(e,t){let n=e,r=ZM(),i=XM(),a=QM&&n.enableEarlyProxy;if(i&&(r.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__||!a))i.emit($M,e,t);else{let e=a?new aN(n,i):null;(r.__VUE_DEVTOOLS_PLUGINS__=r.__VUE_DEVTOOLS_PLUGINS__||[]).push({pluginDescriptor:n,setupFn:t,proxy:e}),e&&t(e.proxiedTarget)}}function sN(e,t){let n=`▲ ■ ●${e}`;typeof cN==`function`?cN(n,t):console.log(n)}function cN(e,t){throw Error(e+t)}const lN=e=>{let t={id:e.uuid,label:e.type,children:[],tags:[]};e.name!==``&&t.tags.push({label:e.name,textColor:5750629,backgroundColor:15793395});let n=bM(e);return n>0&&t.tags.push({label:`${xM(n)} KB`,textColor:15707189,backgroundColor:16775644,tooltip:`Memory usage`}),e.type.includes(`Light`)&&(wj(e)&&t.tags.push({label:`${e.intensity}`,textColor:9738662,backgroundColor:16316922,tooltip:`Intensity`}),t.tags.push({label:`#${new K(e.color).getHexString()}`,textColor:9738662,backgroundColor:16316922,tooltip:`Color`})),e.type.includes(`Camera`)&&(t.tags.push({label:`${e.fov}°`,textColor:9738662,backgroundColor:16316922,tooltip:`Field of view`}),t.tags.push({label:`x: ${Math.round(e.position.x)} y: ${Math.round(e.position.y)} z: ${Math.round(e.position.z)}`,textColor:9738662,backgroundColor:16316922,tooltip:`Position`})),t};function uN(e,t,n=``){e.children.forEach(e=>{if(e.type===`HightlightMesh`||n&&!e.type.includes(n)&&!e.name.includes(n))return;let r=lN(e);t.children.push(r),uN(e,r,n)})}const dN=[],fN=`tres:inspector`,pN=$t({sceneGraph:null});function mN(e,t){oN({id:`dev.esm.tres`,label:`TresJS 🪐`,logo:`https://raw.githubusercontent.com/Tresjs/tres/main/public/favicon.svg`,packageName:`tresjs`,homepage:`https://tresjs.org`,componentStateTypes:dN,app:e},e=>{typeof e.now!=`function`&&sN(`You seem to be using an outdated version of Vue Devtools. Are you still using the Beta release instead of the stable one? You can find the links at https://devtools.vuejs.org/guide/installation.html.`),e.addInspector({id:fN,label:`TresJS 🪐`,icon:`account_tree`,treeFilterPlaceholder:`Search instances`}),setInterval(()=>{e.sendInspectorTree(fN)},1e3),setInterval(()=>{e.notifyComponentUpdate()},5e3),e.on.getInspectorTree(e=>{if(e.inspectorId===fN){let n=lN(t.scene.value);uN(t.scene.value,n,e.filter),pN.sceneGraph=n,e.rootNodes=[n]}});let n=null,r=null;e.on.getInspectorState(e=>{var i;if(e.inspectorId===fN){let[a]=t.scene.value.getObjectsByProperty(`uuid`,e.nodeId);if(!a)return;if(r&&n&&n.parent&&r.remove(n),a.isMesh){let e=Uj(a);a.add(e),n=e,r=a}e.state={object:Object.entries(a).map(([e,t])=>e===`children`?{key:e,value:t.filter(e=>e.type!==`HightlightMesh`)}:{key:e,value:t,editable:!0}).filter(({key:e})=>e!==`parent`)},a.isScene&&(e.state={...e.state,state:[{key:`Scene Info`,value:{objects:a.children.length,memory:bM(a),calls:t.renderer.value.info.render.calls,triangles:t.renderer.value.info.render.triangles,points:t.renderer.value.info.render.points,lines:t.renderer.value.info.render.lines}},{key:`Programs`,value:(i=t.renderer.value.info.programs)?.map(e=>({...e,programName:e.name}))||[]}]})}}),e.on.editInspectorState(e=>{e.inspectorId===fN&&Hj(t.scene.value,e.nodeId,e.path,e.state.value)})})}const hN=[`data-scene`,`data-tres`],gN=Rr({__name:`TresCanvas`,props:{shadows:{type:Boolean,default:void 0},clearColor:{},toneMapping:{},shadowMapType:{},useLegacyLights:{type:Boolean,default:void 0},outputColorSpace:{},toneMappingExposure:{},renderMode:{default:`always`},dpr:{},camera:{},preset:{},windowSize:{type:Boolean,default:void 0},enableProvideBridge:{type:Boolean,default:!0},context:{},alpha:{type:Boolean,default:void 0},premultipliedAlpha:{type:Boolean},antialias:{type:Boolean,default:void 0},stencil:{type:Boolean,default:void 0},preserveDrawingBuffer:{type:Boolean,default:void 0},powerPreference:{},depth:{type:Boolean,default:void 0},failIfMajorPerformanceCaveat:{type:Boolean,default:void 0},precision:{},logarithmicDepthBuffer:{type:Boolean,default:void 0},reverseDepthBuffer:{type:Boolean}},emits:[`render`,`click`,`double-click`,`context-menu`,`pointer-move`,`pointer-up`,`pointer-down`,`pointer-enter`,`pointer-leave`,`pointer-over`,`pointer-out`,`pointer-missed`,`wheel`,`ready`],setup(e,{expose:t,emit:n}){let r=e,i=n,a=wi(),o=R(),s=z(new $g),c=Ao();_M(ZC);let l=(e,t=!1)=>Rr({setup(){var n;let i=(n=Ao())?.appContext;i&&(i.app=c?.appContext.app);let o={};function s(e){e&&(e.parent&&s(e.parent),e.provides&&Object.assign(o,e.provides))}return c!=null&&c.parent&&r.enableProvideBridge&&(s(c.parent),Reflect.ownKeys(o).forEach(e=>{Xi(e,o[e])})),Xi(`useTres`,e),Xi(`extend`,_M),typeof window<`u`&&mN(i?.app,e),()=>Jo(Ya,null,t?[]:a.default())}}),u=(e,t=!1)=>{let n=l(e,t),{render:r}=ya(YM(e));r(Jo(n),s.value)},d=(e,t=!1)=>{Kj(e.scene.value),t&&(e.renderer.value.dispose(),e.renderer.value.renderLists.dispose(),e.renderer.value.forceContextLoss()),s.value.__tres={root:e}},f=z(null);t({context:f,dispose:()=>d(f.value,!0)});let p=()=>{d(f.value),u(f.value,!0)};return $r(()=>{let e=o;f.value=NM({scene:s.value,canvas:e,windowSize:r.windowSize??!1,rendererOptions:r,emit:i});let{registerCamera:t,camera:n,cameras:a,deregisterCamera:c}=f.value;u(f.value);let l=()=>{let e=new Hg(45,window.innerWidth/window.innerHeight,.1,1e3);e.position.set(3,3,3),e.lookAt(0,0,0),t(e);let n=Aa(()=>{a.value.length>=2&&(e.removeFromParent(),c(e),n?.())})};V(()=>r.camera,(e,n)=>{e&&t(e),n&&(n.removeFromParent(),c(n))},{immediate:!0}),n.value||l()}),ri(p),(e,t)=>(to(),oo(`canvas`,{ref_key:`canvas`,ref:o,"data-scene":s.value.uuid,class:Se(e.$attrs.class),"data-tres":`tresjs ${_n(ij).version}`,style:L({display:`block`,width:`100%`,height:`100%`,position:e.windowSize?`fixed`:`relative`,top:0,left:0,pointerEvents:`auto`,touchAction:`none`,...e.$attrs.style})},null,14,hN))}}),_N=[`TresCanvas`,`TresLeches`,`TresScene`],vN={template:{compilerOptions:{isCustomElement:e=>e.startsWith(`Tres`)&&!_N.includes(e)||e===`primitive`}}},{logWarning:yN}=hM();var bN=class extends kv{constructor(e,t){let n=[1,1,0,-1,1,0,-1,-1,0,1,-1,0,1,1,0],r=new mg;r.setAttribute(`position`,new q(n,3)),r.computeBoundingSphere();let i=new xv({fog:!1});super(r,i),this.light=e,this.color=t,this.type=`RectAreaLightHelper`;let a=[1,1,0,-1,1,0,-1,-1,0,1,1,0,-1,-1,0,1,-1,0],o=new mg;o.setAttribute(`position`,new q(a,3)),o.computeBoundingSphere(),this.add(new Eg(o,new Uh({side:Rl,fog:!1})))}updateMatrixWorld(){if(this.scale.set(.5*this.light.width,.5*this.light.height,1),this.color!==void 0)this.material.color.set(this.color),this.children[0].material.color.set(this.color);else{this.material.color.copy(this.light.color).multiplyScalar(this.light.intensity);let e=this.material.color,t=Math.max(e.r,e.g,e.b);t>1&&e.multiplyScalar(1/t),this.children[0].material.color.copy(this.material.color)}this.matrixWorld.extractRotation(this.light.matrixWorld).scale(this.scale).copyPosition(this.light.matrixWorld),this.children[0].matrixWorld.copy(this.matrixWorld)}dispose(){this.geometry.dispose(),this.material.dispose(),this.children[0].geometry.dispose(),this.children[0].material.dispose()}};const{logWarning:xN}=hM();let SN,CN;const wN={DirectionalLight:kC,PointLight:yC,SpotLight:pC,HemisphereLight:CC,RectAreaLight:bN},TN={mounted:e=>{if(!e.isLight){xN(`${e.type} is not a light`);return}SN=wN[e.type],e.parent.add(new SN(e,1,e.color.getHex()))},updated:e=>{CN=e.parent.children.find(e=>e instanceof SN),!(CN instanceof bN)&&CN.update()},unmounted:e=>{if(!e.isLight){xN(`${e.type} is not a light`);return}CN=e.parent.children.find(e=>e instanceof SN),CN&&CN.dispose&&CN.dispose(),e.parent&&e.parent.remove(CN)}},EN={mounted:(e,t)=>{if(t.arg){console.log(`v-log:${t.arg}`,e[t.arg]);return}console.log(`v-log`,e)}},DN={install(e){e.component(`TresCanvas`,gN)}};function ON(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return t!==null&&t!==Object.prototype&&Object.getPrototypeOf(t)!==null||Symbol.iterator in e?!1:Symbol.toStringTag in e?Object.prototype.toString.call(e)===`[object Module]`:!0}function kN(e,t,n=`.`,r){if(!ON(t))return kN(e,{},n,r);let i=Object.assign({},t);for(let t in e){if(t===`__proto__`||t===`constructor`)continue;let a=e[t];if(a==null||r&&r(i,t,a,n))continue;Array.isArray(a)&&Array.isArray(i[t])?i[t]=[...a,...i[t]]:ON(a)&&ON(i[t])?i[t]=kN(a,i[t],(n?`${n}.`:``)+t.toString(),r):i[t]=a}return i}function AN(e){return(...t)=>t.reduce((t,n)=>kN(t,n,``,e),{})}const jN=AN(),MN=AN((e,t,n)=>{if(e[t]!==void 0&&typeof n==`function`)return e[t]=n(e[t]),!0}),NN=AN((e,t,n)=>{if(Array.isArray(e[t])&&typeof n==`function`)return e[t]=n(e[t]),!0});function PN(e){return ze()?(Be(e),!0):!1}function FN(){let e=new Set,t=t=>{e.delete(t)},n=()=>{e.clear()},r=n=>{e.add(n);let r=()=>t(n);return PN(r),{off:r}},i=(...t)=>Promise.all(Array.from(e).map(e=>e(...t)));return{on:r,off:t,trigger:i,clear:n}}const IN=new WeakMap,LN=(...e)=>{var t;let n=e[0],r=(t=Ao())?.proxy;if(r==null&&!Qi())throw Error(`injectLocal must be called in setup`);return r&&IN.has(r)&&n in IN.get(r)?IN.get(r)[n]:Zi(...e)},RN=typeof window<`u`&&typeof document<`u`,zN=typeof WorkerGlobalScope<`u`&&globalThis instanceof WorkerGlobalScope,BN=e=>e!=null,VN=Object.prototype.toString,HN=e=>VN.call(e)===`[object Object]`,UN=()=>{},WN=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);function GN(...e){if(e.length!==1)return Tn(...e);let t=e[0];return typeof t==`function`?tn(xn(()=>({get:t,set:UN}))):R(t)}function KN(e,t){function n(...n){return new Promise((r,i)=>{Promise.resolve(e(()=>t.apply(this,n),{fn:t,thisArg:this,args:n})).then(r).catch(i)})}return n}const qN=e=>e();function JN(e,t={}){let n,r,i=UN,a=e=>{clearTimeout(e),i(),i=UN},o,s=s=>{let c=B(e),l=B(t.maxWait);return n&&a(n),c<=0||l!==void 0&&l<=0?(r&&(a(r),r=void 0),Promise.resolve(s())):new Promise((e,u)=>{i=t.rejectOnCancel?u:e,o=s,l&&!r&&(r=setTimeout(()=>{n&&a(n),r=void 0,e(o())},l)),n=setTimeout(()=>{r&&a(r),r=void 0,e(s())},c)})};return s}function YN(...e){let t=0,n,r=!0,i=UN,a,o,s,c,l;!pn(e[0])&&typeof e[0]==`object`?{delay:o,trailing:s=!0,leading:c=!0,rejectOnCancel:l=!1}=e[0]:[o,s=!0,c=!0,l=!1]=e;let u=()=>{n&&(clearTimeout(n),n=void 0,i(),i=UN)},d=e=>{let d=B(o),f=Date.now()-t,p=()=>a=e();return u(),d<=0?(t=Date.now(),p()):(f>d&&(c||!r)?(t=Date.now(),p()):s&&(a=new Promise((e,a)=>{i=l?a:e,n=setTimeout(()=>{t=Date.now(),r=!0,e(p()),u()},Math.max(0,d-f))})),!c&&!n&&(n=setTimeout(()=>r=!0,d)),r=!1,a)};return d}function XN(e=qN,t={}){let{initialState:n=`active`}=t,r=GN(n===`active`);function i(){r.value=!1}function a(){r.value=!0}let o=(...t)=>{r.value&&e(...t)};return{isActive:tn(r),pause:i,resume:a,eventFilter:o}}function ZN(e){let t;function n(){return t||=e(),t}return n.reset=async()=>{let e=t;t=void 0,e&&await e},n}function QN(e,t){var n;if(typeof e==`number`)return e+t;let r=(n=e.match(/^-?\d+\.?\d*/))?.[0]||``,i=e.slice(r.length),a=Number.parseFloat(r)+t;return Number.isNaN(a)?e:a+i}function $N(e){return e.endsWith(`rem`)?Number.parseFloat(e)*16:Number.parseFloat(e)}function eP(e,t,n=!1){return t.reduce((t,r)=>(r in e&&(!n||e[r]!==void 0)&&(t[r]=e[r]),t),{})}function tP(e){return Array.isArray(e)?e:[e]}function nP(e){let t=Object.create(null);return n=>{let r=t[n];return r||(t[n]=e(n))}}const rP=/\B([A-Z])/g,iP=nP(e=>e.replace(rP,`-$1`).toLowerCase()),aP=/-(\w)/g,oP=nP(e=>e.replace(aP,(e,t)=>t?t.toUpperCase():``));function sP(e){return e||Ao()}function cP(e,t=200,n={}){return KN(JN(t,n),e)}function lP(e,t=200,n={}){let r=R(B(e)),i=cP(()=>{r.value=e.value},t,n);return V(e,()=>i()),nn(r)}function uP(e,t=200,n=!1,r=!0,i=!1){return KN(YN(t,n,r,i),e)}function dP(e,t=200,n=!0,r=!0){if(t<=0)return e;let i=R(B(e)),a=uP(()=>{i.value=e.value},t,n,r);return V(e,()=>a()),i}function fP(e,t,n={}){let{eventFilter:r=qN,...i}=n;return V(e,KN(r,t),i)}function pP(e,t,n={}){let{eventFilter:r,initialState:i=`active`,...a}=n,{eventFilter:o,pause:s,resume:c,isActive:l}=XN(r,{initialState:i}),u=fP(e,t,{...a,eventFilter:o});return{stop:u,pause:s,resume:c,isActive:l}}function mP(e,t={}){if(!pn(e))return Sn(e);let n=Array.isArray(e.value)?Array.from({length:e.value.length}):{};for(let r in e.value)n[r]=xn(()=>({get(){return e.value[r]},set(n){var i;let a=(i=B(t.replaceRef))??!0;if(a)if(Array.isArray(e.value)){let t=[...e.value];t[r]=n,e.value=t}else{let t={...e.value,[r]:n};Object.setPrototypeOf(t,Object.getPrototypeOf(e.value)),e.value=t}else e.value[r]=n}}));return n}function hP(e,t=!0,n){let r=sP(n);r?$r(e,n):t?e():Kn(e)}function gP(e,t){let n=sP(t);n&&ri(e,t)}function _P(e,t,n={}){let{immediate:r=!0,immediateCallback:i=!1}=n,a=z(!1),o;function s(){o&&(clearTimeout(o),o=void 0)}function c(){a.value=!1,s()}function l(...n){i&&e(),s(),a.value=!0,o=setTimeout(()=>{a.value=!1,o=void 0,e(...n)},B(t))}return r&&(a.value=!0,RN&&l()),PN(c),{isPending:nn(a),start:l,stop:c}}function vP(e,t,n={}){let{debounce:r=0,maxWait:i=void 0,...a}=n;return fP(e,t,{...a,eventFilter:JN(r,{maxWait:i})})}function yP(e,t,n){return V(e,t,{...n,immediate:!0})}function bP(e,t,n){let r;r=pn(n)?{evaluating:n}:n||{};let{lazy:i=!1,flush:a=`pre`,evaluating:o=void 0,shallow:s=!0,onError:c=UN}=r,l=z(!i),u=s?z(t):R(t),d=0;return Aa(async t=>{if(!l.value)return;d++;let n=d,r=!1;o&&Promise.resolve().then(()=>{o.value=!0});try{let i=await e(e=>{t(()=>{o&&(o.value=!1),r||e()})});n===d&&(u.value=i)}catch(e){c(e)}finally{o&&n===d&&(o.value=!1),r=!0}},{flush:a}),i?H(()=>(l.value=!0,u.value)):u}const xP=RN?window:void 0,SP=RN?window.document:void 0,CP=RN?window.navigator:void 0,wP=RN?window.location:void 0;function TP(e){var t;let n=B(e);return(t=n?.$el)??n}function EP(...e){let t=[],n=()=>{t.forEach(e=>e()),t.length=0},r=(e,t,n,r)=>(e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)),i=H(()=>{let t=tP(B(e[0])).filter(e=>e!=null);return t.every(e=>typeof e!=`string`)?t:void 0}),a=yP(()=>{var t,n;return[(n=(t=i.value)?.map(e=>TP(e)))??[xP].filter(e=>e!=null),tP(B(i.value?e[1]:e[0])),tP(_n(i.value?e[2]:e[1])),B(i.value?e[3]:e[2])]},([e,i,a,o])=>{if(n(),!e?.length||!i?.length||!a?.length)return;let s=HN(o)?{...o}:o;t.push(...e.flatMap(e=>i.flatMap(t=>a.map(n=>r(e,t,n,s)))))},{flush:`post`}),o=()=>{a(),n()};return PN(n),o}function DP(){let e=z(!1),t=Ao();return t&&$r(()=>{e.value=!0},t),e}function OP(e){let t=DP();return H(()=>(t.value,!!e()))}function kP(e,t,n={}){let{window:r=xP,...i}=n,a,o=OP(()=>r&&`MutationObserver`in r),s=()=>{a&&(a.disconnect(),a=void 0)},c=H(()=>{let t=B(e),n=tP(t).map(TP).filter(BN);return new Set(n)}),l=V(()=>c.value,e=>{s(),o.value&&e.size&&(a=new MutationObserver(t),e.forEach(e=>a.observe(e,i)))},{immediate:!0,flush:`post`}),u=()=>a?.takeRecords(),d=()=>{l(),s()};return PN(d),{isSupported:o,stop:d,takeRecords:u}}const AP=Symbol(`vueuse-ssr-width`);function jP(){let e=Qi()?LN(AP,null):null;return typeof e==`number`?e:void 0}function MP(e,t={}){let{window:n=xP,ssrWidth:r=jP()}=t,i=OP(()=>n&&`matchMedia`in n&&typeof n.matchMedia==`function`),a=z(typeof r==`number`),o=z(),s=z(!1),c=e=>{s.value=e.matches};return Aa(()=>{if(a.value){a.value=!i.value;let t=B(e).split(`,`);s.value=t.some(e=>{let t=e.includes(`not all`),n=e.match(/\(\s*min-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/),i=e.match(/\(\s*max-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/),a=!!(n||i);return n&&a&&(a=r>=$N(n[1])),i&&a&&(a=r<=$N(i[1])),t?!a:a});return}i.value&&(o.value=n.matchMedia(B(e)),s.value=o.value.matches)}),EP(o,`change`,c,{passive:!0}),H(()=>s.value)}const NP={sm:640,md:768,lg:1024,xl:1280,"2xl":1536};function PP(e,t={}){function n(t,n){let r=B(e[B(t)]);return n!=null&&(r=QN(r,n)),typeof r==`number`&&(r=`${r}px`),r}let{window:r=xP,strategy:i=`min-width`,ssrWidth:a=jP()}=t,o=typeof a==`number`,s=o?z(!1):{value:!0};o&&hP(()=>s.value=!!r);function c(e,t){return!s.value&&o?e===`min`?a>=$N(t):a<=$N(t):r?r.matchMedia(`(${e}-width: ${t})`).matches:!1}let l=e=>MP(()=>`(min-width: ${n(e)})`,t),u=e=>MP(()=>`(max-width: ${n(e)})`,t),d=Object.keys(e).reduce((e,t)=>(Object.defineProperty(e,t,{get:()=>i===`min-width`?l(t):u(t),enumerable:!0,configurable:!0}),e),{});function f(){let t=Object.keys(e).map(e=>[e,d[e],$N(n(e))]).sort((e,t)=>e[2]-t[2]);return H(()=>t.filter(([,e])=>e.value).map(([e])=>e))}return Object.assign(d,{greaterOrEqual:l,smallerOrEqual:u,greater(e){return MP(()=>`(min-width: ${n(e,.1)})`,t)},smaller(e){return MP(()=>`(max-width: ${n(e,-.1)})`,t)},between(e,r){return MP(()=>`(min-width: ${n(e)}) and (max-width: ${n(r,-.1)})`,t)},isGreater(e){return c(`min`,n(e,.1))},isGreaterOrEqual(e){return c(`min`,n(e))},isSmaller(e){return c(`max`,n(e,-.1))},isSmallerOrEqual(e){return c(`max`,n(e))},isInBetween(e,t){return c(`min`,n(e))&&c(`max`,n(t,-.1))},current:f,active(){let e=f();return H(()=>e.value.length===0?``:e.value.at(i===`min-width`?-1:0))}})}function FP(e,t={}){let{controls:n=!1,navigator:r=CP}=t,i=OP(()=>r&&`permissions`in r),a=z(),o=typeof e==`string`?{name:e}:e,s=z(),c=()=>{var e,t;s.value=(t=(e=a.value)?.state)??`prompt`};EP(a,`change`,c,{passive:!0});let l=ZN(async()=>{if(i.value){if(!a.value)try{a.value=await r.permissions.query(o)}catch{a.value=void 0}finally{c()}if(n)return ln(a.value)}});return l(),n?{state:s,isSupported:i,query:l}:s}function IP(e={}){let{navigator:t=CP,read:n=!1,source:r,copiedDuring:i=1500,legacy:a=!1}=e,o=OP(()=>t&&`clipboard`in t),s=FP(`clipboard-read`),c=FP(`clipboard-write`),l=H(()=>o.value||a),u=z(``),d=z(!1),f=_P(()=>d.value=!1,i,{immediate:!1});async function p(){let e=!(o.value&&_(s.value));if(!e)try{u.value=await t.clipboard.readText()}catch{e=!0}e&&(u.value=g())}l.value&&n&&EP([`copy`,`cut`],p,{passive:!0});async function m(e=B(r)){if(l.value&&e!=null){let n=!(o.value&&_(c.value));if(!n)try{await t.clipboard.writeText(e)}catch{n=!0}n&&h(e),u.value=e,d.value=!0,f.start()}}function h(e){let t=document.createElement(`textarea`);t.value=e??``,t.style.position=`absolute`,t.style.opacity=`0`,document.body.appendChild(t),t.select(),document.execCommand(`copy`),t.remove()}function g(){var e,t,n;return(n=(t=(e=document==null?void 0:document.getSelection)?.call(document))?.toString())??``}function _(e){return e===`granted`||e===`prompt`}return{isSupported:l,text:u,copied:d,copy:m}}const LP=typeof globalThis<`u`?globalThis:typeof window<`u`?window:typeof global<`u`?global:typeof self<`u`?self:{},RP=`__vueuse_ssr_handlers__`,zP=BP();function BP(){return RP in LP||(LP[RP]=LP[RP]||{}),LP[RP]}function VP(e,t){return zP[e]||t}function HP(e){return MP(`(prefers-color-scheme: dark)`,e)}function UP(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 WP={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()}},GP=`vueuse-storage`;function KP(e,t,n,r={}){var i;let{flush:a=`pre`,deep:o=!0,listenToStorageChanges:s=!0,writeDefaults:c=!0,mergeDefaults:l=!1,shallow:u,window:d=xP,eventFilter:f,onError:p=e=>{console.error(e)},initOnMounted:m}=r,h=(u?z:R)(typeof t==`function`?t():t),g=H(()=>B(e));if(!n)try{n=VP(`getDefaultStorage`,()=>{var e;return(e=xP)?.localStorage})()}catch(e){p(e)}if(!n)return h;let _=B(t),v=UP(_),y=(i=r.serializer)??WP[v],{pause:b,resume:x}=pP(h,()=>E(h.value),{flush:a,deep:o,eventFilter:f});V(g,()=>O(),{flush:a});let S=!1,C=e=>{m&&!S||O(e)},w=e=>{m&&!S||k(e)};d&&s&&(n instanceof Storage?EP(d,`storage`,C,{passive:!0}):EP(d,GP,w)),m?hP(()=>{S=!0,O()}):O();function T(e,t){if(d){let r={key:g.value,oldValue:e,newValue:t,storageArea:n};d.dispatchEvent(n instanceof Storage?new StorageEvent(`storage`,r):new CustomEvent(GP,{detail:r}))}}function E(e){try{let t=n.getItem(g.value);if(e==null)T(t,null),n.removeItem(g.value);else{let r=y.write(e);t!==r&&(n.setItem(g.value,r),T(t,r))}}catch(e){p(e)}}function D(e){let t=e?e.newValue:n.getItem(g.value);if(t==null)return c&&_!=null&&n.setItem(g.value,y.write(_)),_;if(!e&&l){let e=y.read(t);return typeof l==`function`?l(e,_):v===`object`&&!Array.isArray(e)?{..._,...e}:e}else if(typeof t!=`string`)return t;else return y.read(t)}function O(e){if(!(e&&e.storageArea!==n)){if(e&&e.key==null){h.value=_;return}if(!(e&&e.key!==g.value)){b();try{e?.newValue!==y.write(h.value)&&(h.value=D(e))}catch(e){p(e)}finally{e?Kn(x):x()}}}}function k(e){O(e.detail)}return h}const qP=`*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}`;function JP(e={}){let{selector:t=`html`,attribute:n=`class`,initialValue:r=`auto`,window:i=xP,storage:a,storageKey:o=`vueuse-color-scheme`,listenToStorageChanges:s=!0,storageRef:c,emitAuto:l,disableTransition:u=!0}=e,d={auto:``,light:`light`,dark:`dark`,...e.modes||{}},f=HP({window:i}),p=H(()=>f.value?`dark`:`light`),m=c||(o==null?GN(r):KP(o,r,a,{window:i,listenToStorageChanges:s})),h=H(()=>m.value===`auto`?p.value:m.value),g=VP(`updateHTMLAttrs`,(e,t,n)=>{let r=typeof e==`string`?i?.document.querySelector(e):TP(e);if(!r)return;let a=new Set,o=new Set,s=null;if(t===`class`){let e=n.split(/\s/g);Object.values(d).flatMap(e=>(e||``).split(/\s/g)).filter(Boolean).forEach(t=>{e.includes(t)?a.add(t):o.add(t)})}else s={key:t,value:n};if(a.size===0&&o.size===0&&s===null)return;let c;u&&(c=i.document.createElement(`style`),c.appendChild(document.createTextNode(qP)),i.document.head.appendChild(c));for(let e of a)r.classList.add(e);for(let e of o)r.classList.remove(e);s&&r.setAttribute(s.key,s.value),u&&(i.getComputedStyle(c).opacity,document.head.removeChild(c))});function _(e){var r;g(t,n,(r=d[e])??e)}function v(t){e.onChanged?e.onChanged(t,_):_(t)}V(h,v,{flush:`post`,immediate:!0}),hP(()=>v(h.value));let y=H({get(){return l?m.value:h.value},set(e){m.value=e}});return Object.assign(y,{store:m,system:p,state:h})}function YP(e,t,n={}){let{window:r=xP,initialValue:i,observe:a=!1}=n,o=z(i),s=H(()=>{var e;return TP(t)||(e=r?.document)?.documentElement});function c(){var t;let n=B(e),a=B(s);if(a&&r&&n){let e=(t=r.getComputedStyle(a).getPropertyValue(n))?.trim();o.value=e||o.value||i}}return a&&kP(s,c,{attributeFilter:[`style`,`class`],window:r}),V([s,()=>B(e)],(e,t)=>{t[0]&&t[1]&&t[0].style.removeProperty(t[1]),c()},{immediate:!0}),V([o,s],([t,n])=>{let r=B(e);n?.style&&r&&(t==null?n.style.removeProperty(r):n.style.setProperty(r,t))},{immediate:!0}),o}function XP(e={}){let{valueDark:t=`dark`,valueLight:n=``}=e,r=JP({...e,onChanged:(t,n)=>{var r;e.onChanged?(r=e.onChanged)==null||r.call(e,t===`dark`,n,t):n(t)},modes:{dark:t,light:n}}),i=H(()=>r.system.value),a=H({get(){return r.value===`dark`},set(e){let t=e?`dark`:`light`;i.value===t?r.value=`auto`:r.value=t}});return a}function ZP(e={}){let{navigator:t=CP,requestPermissions:n=!1,constraints:r={audio:!0,video:!0},onUpdated:i}=e,a=R([]),o=H(()=>a.value.filter(e=>e.kind===`videoinput`)),s=H(()=>a.value.filter(e=>e.kind===`audioinput`)),c=H(()=>a.value.filter(e=>e.kind===`audiooutput`)),l=OP(()=>t&&t.mediaDevices&&t.mediaDevices.enumerateDevices),u=z(!1),d;async function f(){l.value&&(a.value=await t.mediaDevices.enumerateDevices(),i?.(a.value),d&&(d.getTracks().forEach(e=>e.stop()),d=null))}async function p(){let e=r.video?`camera`:`microphone`;if(!l.value)return!1;if(u.value)return!0;let{state:n,query:i}=FP(e,{controls:!0});if(await i(),n.value!==`granted`){let e=!0;try{let e=await t.mediaDevices.enumerateDevices(),n=e.some(e=>e.kind===`videoinput`),i=e.some(e=>e.kind===`audioinput`||e.kind===`audiooutput`);r.video=n?r.video:!1,r.audio=i?r.audio:!1,d=await t.mediaDevices.getUserMedia(r)}catch{d=null,e=!1}f(),u.value=e}else u.value=!0;return u.value}return l.value&&(n&&p(),EP(t.mediaDevices,`devicechange`,f,{passive:!0}),f()),{devices:a,ensurePermissions:p,permissionGranted:u,videoInputs:o,audioInputs:s,audioOutputs:c,isSupported:l}}function QP(e,t,n={}){let{window:r=xP,...i}=n,a,o=OP(()=>r&&`ResizeObserver`in r),s=()=>{a&&(a.disconnect(),a=void 0)},c=H(()=>{let t=B(e);return Array.isArray(t)?t.map(e=>TP(e)):[TP(t)]}),l=V(c,e=>{if(s(),o.value&&r){a=new ResizeObserver(t);for(let t of e)t&&a.observe(t,i)}},{immediate:!0,flush:`post`}),u=()=>{s(),l()};return PN(u),{isSupported:o,stop:u}}function $P(e,t={}){let{reset:n=!0,windowResize:r=!0,windowScroll:i=!0,immediate:a=!0,updateTiming:o=`sync`}=t,s=z(0),c=z(0),l=z(0),u=z(0),d=z(0),f=z(0),p=z(0),m=z(0);function h(){let t=TP(e);if(!t){n&&(s.value=0,c.value=0,l.value=0,u.value=0,d.value=0,f.value=0,p.value=0,m.value=0);return}let r=t.getBoundingClientRect();s.value=r.height,c.value=r.bottom,l.value=r.left,u.value=r.right,d.value=r.top,f.value=r.width,p.value=r.x,m.value=r.y}function g(){o===`sync`?h():o===`next-frame`&&requestAnimationFrame(()=>h())}return QP(e,g),V(()=>TP(e),e=>!e&&g()),kP(e,g,{attributeFilter:[`style`,`class`]}),i&&EP(`scroll`,g,{capture:!0,passive:!0}),r&&EP(`resize`,g,{passive:!0}),hP(()=>{a&&g()}),{height:s,bottom:c,left:l,right:u,top:d,width:f,x:p,y:m,update:g}}function eF(e,t,n={}){let{root:r,rootMargin:i=`0px`,threshold:a=0,window:o=xP,immediate:s=!0}=n,c=OP(()=>o&&`IntersectionObserver`in o),l=H(()=>{let t=B(e);return tP(t).map(TP).filter(BN)}),u=UN,d=z(s),f=c.value?V(()=>[l.value,TP(r),d.value],([e,n])=>{if(u(),!d.value||!e.length)return;let r=new IntersectionObserver(t,{root:TP(n),rootMargin:i,threshold:a});e.forEach(e=>e&&r.observe(e)),u=()=>{r.disconnect(),u=UN}},{immediate:s,flush:`post`}):UN,p=()=>{u(),f(),d.value=!1};return PN(p),{isSupported:c,isActive:d,pause(){u(),d.value=!1},resume(){d.value=!0},stop:p}}const tF={multiple:!0,accept:`*`,reset:!1,directory:!1};function nF(e){if(!e)return null;if(e instanceof FileList)return e;let t=new DataTransfer;for(let n of e)t.items.add(n);return t.files}function rF(e={}){let{document:t=SP}=e,n=R(nF(e.initialFiles)),{on:r,trigger:i}=FN(),{on:a,trigger:o}=FN(),s;t&&(s=TP(e.input)||t.createElement(`input`),s.type=`file`,s.onchange=e=>{let t=e.target;n.value=t.files,i(n.value)},s.oncancel=()=>{o()});let c=()=>{n.value=null,s&&s.value&&(s.value=``,i(null))},l=t=>{if(!s)return;let n={...tF,...e,...t};s.multiple=n.multiple,s.accept=n.accept,s.webkitdirectory=n.directory,WN(n,`capture`)&&(s.capture=n.capture),n.reset&&c(),s.click()};return{files:tn(n),open:l,reset:c,onCancel:a,onChange:r}}const iF=1;function aF(e,t={}){let{throttle:n=0,idle:r=200,onStop:i=UN,onScroll:a=UN,offset:o={left:0,right:0,top:0,bottom:0},observe:s={mutation:!1},eventListenerOptions:c={capture:!1,passive:!0},behavior:l=`auto`,window:u=xP,onError:d=e=>{console.error(e)}}=t,f=typeof s==`boolean`?{mutation:s}:s,p=z(0),m=z(0),h=H({get(){return p.value},set(e){_(e,void 0)}}),g=H({get(){return m.value},set(e){_(void 0,e)}});function _(t,n){var r,i,a,o;if(!u)return;let s=B(e);if(!s)return;(a=s instanceof Document?u.document.body:s)==null||a.scrollTo({top:(r=B(n))??g.value,left:(i=B(t))??h.value,behavior:B(l)});let c=(o=s?.document)?.documentElement||s?.documentElement||s;h!=null&&(p.value=c.scrollLeft),g!=null&&(m.value=c.scrollTop)}let v=z(!1),y=$t({left:!0,right:!1,top:!0,bottom:!1}),b=$t({left:!1,right:!1,top:!1,bottom:!1}),x=e=>{v.value&&(v.value=!1,b.left=!1,b.right=!1,b.top=!1,b.bottom=!1,i(e))},S=cP(x,n+r),C=e=>{var t;if(!u)return;let n=(t=e?.document)?.documentElement||e?.documentElement||TP(e),{display:r,flexDirection:i,direction:a}=getComputedStyle(n),s=a===`rtl`?-1:1,c=n.scrollLeft;b.left=cp.value;let l=Math.abs(c*s)<=(o.left||0),d=Math.abs(c*s)+n.clientWidth>=n.scrollWidth-(o.right||0)-iF;r===`flex`&&i===`row-reverse`?(y.left=d,y.right=l):(y.left=l,y.right=d),p.value=c;let f=n.scrollTop;e===u.document&&!f&&(f=u.document.body.scrollTop),b.top=fm.value;let h=Math.abs(f)<=(o.top||0),g=Math.abs(f)+n.clientHeight>=n.scrollHeight-(o.bottom||0)-iF;r===`flex`&&i===`column-reverse`?(y.top=g,y.bottom=h):(y.top=h,y.bottom=g),m.value=f},w=e=>{var t;if(!u)return;let n=(t=e.target.documentElement)??e.target;C(n),v.value=!0,S(e),a(e)};return EP(e,`scroll`,n?uP(w,n,!0,!1):w,c),hP(()=>{try{let t=B(e);if(!t)return;C(t)}catch(e){d(e)}}),f?.mutation&&e!=null&&e!==u&&e!==document&&kP(e,()=>{let t=B(e);t&&C(t)},{attributes:!0,childList:!0,subtree:!0}),EP(e,`scrollend`,x,c),{x:h,y:g,isScrolling:v,arrivedState:y,directions:b,measure(){let t=B(e);u&&t&&C(t)}}}function oF(e,t,n={}){let{window:r=xP}=n;return KP(e,t,r?.localStorage,n)}const sF={page:e=>[e.pageX,e.pageY],client:e=>[e.clientX,e.clientY],screen:e=>[e.screenX,e.screenY],movement:e=>e instanceof MouseEvent?[e.movementX,e.movementY]:null};function cF(e={}){let{type:t=`page`,touch:n=!0,resetOnTouchEnds:r=!1,initialValue:i={x:0,y:0},window:a=xP,target:o=a,scroll:s=!0,eventFilter:c}=e,l=null,u=0,d=0,f=z(i.x),p=z(i.y),m=z(null),h=typeof t==`function`?t:sF[t],g=e=>{let t=h(e);l=e,t&&([f.value,p.value]=t,m.value=`mouse`),a&&(u=a.scrollX,d=a.scrollY)},_=e=>{if(e.touches.length>0){let t=h(e.touches[0]);t&&([f.value,p.value]=t,m.value=`touch`)}},v=()=>{if(!l||!a)return;let e=h(l);l instanceof MouseEvent&&e&&(f.value=e[0]+a.scrollX-u,p.value=e[1]+a.scrollY-d)},y=()=>{f.value=i.x,p.value=i.y},b=c?e=>c(()=>g(e),{}):e=>g(e),x=c?e=>c(()=>_(e),{}):e=>_(e),S=c?()=>c(()=>v(),{}):()=>v();if(o){let e={passive:!0};EP(o,[`mousemove`,`dragover`],b,e),n&&t!==`movement`&&(EP(o,[`touchstart`,`touchmove`],x,e),r&&EP(o,`touchend`,y,e)),s&&t===`page`&&EP(a,`scroll`,S,e)}return{x:f,y:p,sourceType:m}}function lF(e){let t=z(),n=()=>{t.value&&URL.revokeObjectURL(t.value),t.value=void 0};return V(()=>B(e),e=>{n(),e&&(t.value=URL.createObjectURL(e))},{immediate:!0}),PN(n),tn(t)}const uF={x:0,y:0,pointerId:0,pressure:0,tiltX:0,tiltY:0,width:0,height:0,twist:0,pointerType:null},dF=Object.keys(uF);function fF(e={}){let{target:t=xP}=e,n=z(!1),r=R(e.initialValue||{});Object.assign(r.value,uF,r.value);let i=t=>{n.value=!0,!(e.pointerTypes&&!e.pointerTypes.includes(t.pointerType))&&(r.value=eP(t,dF,!1))};if(t){let e={passive:!0};EP(t,[`pointerdown`,`pointermove`,`pointerup`],i,e),EP(t,`pointerleave`,()=>n.value=!1,e)}return{...mP(r),isInside:n}}const pF=`--vueuse-safe-area-top`,mF=`--vueuse-safe-area-right`,hF=`--vueuse-safe-area-bottom`,gF=`--vueuse-safe-area-left`;function _F(){let e=z(``),t=z(``),n=z(``),r=z(``);if(RN){let e=YP(pF),t=YP(mF),n=YP(hF),r=YP(gF);e.value=`env(safe-area-inset-top, 0px)`,t.value=`env(safe-area-inset-right, 0px)`,n.value=`env(safe-area-inset-bottom, 0px)`,r.value=`env(safe-area-inset-left, 0px)`,hP(i),EP(`resize`,cP(i),{passive:!0})}function i(){e.value=vF(pF),t.value=vF(mF),n.value=vF(hF),r.value=vF(gF)}return{top:e,right:t,bottom:n,left:r,update:i}}function vF(e){return getComputedStyle(document.documentElement).getPropertyValue(e)}const yF=[{max:6e4,value:1e3,name:`second`},{max:276e4,value:6e4,name:`minute`},{max:72e6,value:36e5,name:`hour`},{max:5184e5,value:864e5,name:`day`},{max:24192e5,value:6048e5,name:`week`},{max:28512e6,value:2592e6,name:`month`},{max:1/0,value:31536e6,name:`year`}];function bF(e,t,n){let{window:r=xP}=n??{},i=R(null),a=z(),o=(...e)=>{a.value&&a.value.postMessage(...e)},s=function(){a.value&&a.value.terminate()};return r&&(typeof e==`string`?a.value=new Worker(e,t):typeof e==`function`?a.value=e():a.value=e,a.value.onmessage=e=>{i.value=e.data},PN(()=>{a.value&&a.value.terminate()})),{data:i,post:o,terminate:s,worker:a}}function xF(e={}){let{window:t=xP,initialWidth:n=1/0,initialHeight:r=1/0,listenOrientation:i=!0,includeScrollbar:a=!0,type:o=`inner`}=e,s=z(n),c=z(r),l=()=>{if(t)if(o===`outer`)s.value=t.outerWidth,c.value=t.outerHeight;else if(o===`visual`&&t.visualViewport){let{width:e,height:n,scale:r}=t.visualViewport;s.value=Math.round(e*r),c.value=Math.round(n*r)}else a?(s.value=t.innerWidth,c.value=t.innerHeight):(s.value=t.document.documentElement.clientWidth,c.value=t.document.documentElement.clientHeight)};l(),hP(l);let u={passive:!0};if(EP(`resize`,l,u),t&&o===`visual`&&t.visualViewport&&EP(t.visualViewport,`resize`,l,u),i){let e=MP(`(orientation: portrait)`);V(e,()=>l())}return{width:s,height:c}}const SF=1/60*1e3,CF=typeof performance<`u`?()=>performance.now():()=>Date.now(),wF=typeof window<`u`?e=>window.requestAnimationFrame(e):e=>setTimeout(()=>e(CF()),SF);function TF(e){let t=[],n=[],r=0,i=!1,a=!1,o=new WeakSet,s={schedule:(e,a=!1,s=!1)=>{let c=s&&i,l=c?t:n;return a&&o.add(e),l.indexOf(e)===-1&&(l.push(e),c&&i&&(r=t.length)),e},cancel:e=>{let t=n.indexOf(e);t!==-1&&n.splice(t,1),o.delete(e)},process:c=>{if(i){a=!0;return}if(i=!0,[t,n]=[n,t],n.length=0,r=t.length,r)for(let n=0;n(e[t]=TF(()=>OF=!0),e),{}),NF=jF.reduce((e,t)=>{let n=MF[t];return e[t]=(e,t=!1,r=!1)=>(OF||RF(),n.schedule(e,t,r)),e},{}),PF=jF.reduce((e,t)=>(e[t]=MF[t].cancel,e),{}),FF=jF.reduce((e,t)=>(e[t]=()=>MF[t].process(AF),e),{}),IF=e=>MF[e].process(AF),LF=e=>{OF=!1,AF.delta=DF?SF:Math.max(Math.min(e-AF.timestamp,EF),1),AF.timestamp=e,kF=!0,jF.forEach(IF),kF=!1,OF&&(DF=!1,wF(LF))},RF=()=>{OF=!0,DF=!0,kF||wF(LF)},zF=()=>AF;var BF=NF;function VF(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);iMath.min(Math.max(n,e),t),GF=.001,KF=.01,qF=10,JF=.05,YF=1;function XF({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let i,a;HF(e<=qF*1e3,`Spring duration must be 10 seconds or less`);let o=1-t;o=WF(JF,YF,o),e=WF(KF,qF,e/1e3),o<1?(i=t=>{let r=t*o,i=r*e,a=r-n,s=$F(t,o),c=Math.exp(-i);return GF-a/s*c},a=t=>{let r=t*o,a=r*e,s=a*n+n,c=o**2*t**2*e,l=Math.exp(-a),u=$F(t**2,o),d=-i(t)+GF>0?-1:1;return d*((s-c)*l)/u}):(i=t=>{let r=Math.exp(-t*e),i=(t-n)*e+1;return-GF+r*i},a=t=>{let r=Math.exp(-t*e),i=(n-t)*(e*e);return r*i});let s=5/e,c=QF(i,a,s);if(e*=1e3,isNaN(c))return{stiffness:100,damping:10,duration:e};{let t=c**2*r;return{stiffness:t,damping:o*2*Math.sqrt(r*t),duration:e}}}const ZF=12;function QF(e,t,n){let r=n;for(let n=1;ne[t]!==void 0)}function rI(e){let t=Object.assign({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},e);if(!nI(e,tI)&&nI(e,eI)){let n=XF(e);t=Object.assign(Object.assign(Object.assign({},t),n),{velocity:0,mass:1}),t.isResolvedFromDuration=!0}return t}function iI(e){var{from:t=0,to:n=1,restSpeed:r=2,restDelta:i}=e,a=VF(e,[`from`,`to`,`restSpeed`,`restDelta`]);let o={done:!1,value:t},{stiffness:s,damping:c,mass:l,velocity:u,duration:d,isResolvedFromDuration:f}=rI(a),p=aI,m=aI;function h(){let e=u?-(u/1e3):0,r=n-t,a=c/(2*Math.sqrt(s*l)),o=Math.sqrt(s/l)/1e3;if(i===void 0&&(i=Math.min(Math.abs(n-t)/100,.4)),a<1){let t=$F(o,a);p=i=>{let s=Math.exp(-a*o*i);return n-s*((e+a*o*r)/t*Math.sin(t*i)+r*Math.cos(t*i))},m=n=>{let i=Math.exp(-a*o*n);return a*o*i*(Math.sin(t*n)*(e+a*o*r)/t+r*Math.cos(t*n))-i*(Math.cos(t*n)*(e+a*o*r)-t*r*Math.sin(t*n))}}else if(a===1)p=t=>n-Math.exp(-o*t)*(r+(e+o*r)*t);else{let t=o*Math.sqrt(a*a-1);p=i=>{let s=Math.exp(-a*o*i),c=Math.min(t*i,300);return n-s*((e+a*o*r)*Math.sinh(c)+t*r*Math.cosh(c))/t}}}return h(),{next:e=>{let t=p(e);if(f)o.done=e>=d;else{let a=m(e)*1e3,s=Math.abs(a)<=r,c=Math.abs(n-t)<=i;o.done=s&&c}return o.value=o.done?n:t,o},flipTarget:()=>{u=-u,[t,n]=[n,t],h()}}}iI.needsInterpolation=(e,t)=>typeof e==`string`||typeof t==`string`;const aI=e=>0,oI=(e,t,n)=>{let r=t-e;return r===0?1:(n-e)/r},sI=(e,t,n)=>-n*e+n*t+e,cI=(e,t)=>n=>Math.max(Math.min(n,t),e),lI=e=>e%1?Number(e.toFixed(5)):e,uI=/(-)?([\d]*\.?[\d])+/g,dI=/(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,fI=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function pI(e){return typeof e==`string`}const mI={test:e=>typeof e==`number`,parse:parseFloat,transform:e=>e},hI=Object.assign(Object.assign({},mI),{transform:cI(0,1)}),gI=Object.assign(Object.assign({},mI),{default:1}),_I=e=>({test:t=>pI(t)&&t.endsWith(e)&&t.split(` `).length===1,parse:parseFloat,transform:t=>`${t}${e}`}),vI=_I(`deg`),yI=_I(`%`),bI=_I(`px`),xI=_I(`vh`),SI=_I(`vw`),CI=Object.assign(Object.assign({},yI),{parse:e=>yI.parse(e)/100,transform:e=>yI.transform(e*100)}),wI=(e,t)=>n=>!!(pI(n)&&fI.test(n)&&n.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(n,t)),TI=(e,t,n)=>r=>{if(!pI(r))return r;let[i,a,o,s]=r.match(uI);return{[e]:parseFloat(i),[t]:parseFloat(a),[n]:parseFloat(o),alpha:s===void 0?1:parseFloat(s)}},EI={test:wI(`hsl`,`hue`),parse:TI(`hue`,`saturation`,`lightness`),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>`hsla(`+Math.round(e)+`, `+yI.transform(lI(t))+`, `+yI.transform(lI(n))+`, `+lI(hI.transform(r))+`)`},DI=cI(0,255),OI=Object.assign(Object.assign({},mI),{transform:e=>Math.round(DI(e))}),kI={test:wI(`rgb`,`red`),parse:TI(`red`,`green`,`blue`),transform:({red:e,green:t,blue:n,alpha:r=1})=>`rgba(`+OI.transform(e)+`, `+OI.transform(t)+`, `+OI.transform(n)+`, `+lI(hI.transform(r))+`)`};function AI(e){let t=``,n=``,r=``,i=``;return e.length>5?(t=e.substr(1,2),n=e.substr(3,2),r=e.substr(5,2),i=e.substr(7,2)):(t=e.substr(1,1),n=e.substr(2,1),r=e.substr(3,1),i=e.substr(4,1),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const jI={test:wI(`#`),parse:AI,transform:kI.transform},MI={test:e=>kI.test(e)||jI.test(e)||EI.test(e),parse:e=>kI.test(e)?kI.parse(e):EI.test(e)?EI.parse(e):jI.parse(e),transform:e=>pI(e)?e:e.hasOwnProperty(`red`)?kI.transform(e):EI.transform(e)},NI="${c}",PI="${n}";function FI(e){var t,n,r,i;return isNaN(e)&&pI(e)&&((n=(t=e.match(uI))?.length)??0)+((i=(r=e.match(dI))?.length)??0)>0}function II(e){typeof e==`number`&&(e=`${e}`);let t=[],n=0,r=e.match(dI);r&&(n=r.length,e=e.replace(dI,NI),t.push(...r.map(MI.parse)));let i=e.match(uI);return i&&(e=e.replace(uI,PI),t.push(...i.map(mI.parse))),{values:t,numColors:n,tokenised:e}}function LI(e){return II(e).values}function RI(e){let{values:t,numColors:n,tokenised:r}=II(e),i=t.length;return e=>{let t=r;for(let r=0;rtypeof e==`number`?0:e;function BI(e){let t=LI(e),n=RI(e);return n(t.map(zI))}const VI={test:FI,parse:LI,createTransformer:RI,getAnimatableNone:BI},HI=new Set([`brightness`,`contrast`,`saturate`,`opacity`]);function UI(e){let[t,n]=e.slice(0,-1).split(`(`);if(t===`drop-shadow`)return e;let[r]=n.match(uI)||[];if(!r)return e;let i=n.replace(r,``),a=HI.has(t)?1:0;return r!==n&&(a*=100),t+`(`+a+i+`)`}const WI=/([a-z-]*)\(.*?\)/g,GI=Object.assign(Object.assign({},VI),{getAnimatableNone:e=>{let t=e.match(WI);return t?t.map(UI).join(` `):e}});function KI(e,t,n){return n<0&&(n+=1),n>1&&--n,n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function qI({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,a=0,o=0;if(!t)i=a=o=n;else{let r=n<.5?n*(1+t):n+t-n*t,s=2*n-r;i=KI(s,r,e+1/3),a=KI(s,r,e),o=KI(s,r,e-1/3)}return{red:Math.round(i*255),green:Math.round(a*255),blue:Math.round(o*255),alpha:r}}const JI=(e,t,n)=>{let r=e*e,i=t*t;return Math.sqrt(Math.max(0,n*(i-r)+r))},YI=[jI,kI,EI],XI=e=>YI.find(t=>t.test(e)),ZI=e=>`'${e}' is not an animatable color. Use the equivalent color code instead.`,QI=(e,t)=>{let n=XI(e),r=XI(t);UF(!!n,ZI(e)),UF(!!r,ZI(t));let i=n.parse(e),a=r.parse(t);n===EI&&(i=qI(i),n=kI),r===EI&&(a=qI(a),r=kI);let o=Object.assign({},i);return e=>{for(let t in o)t!==`alpha`&&(o[t]=JI(i[t],a[t],e));return o.alpha=sI(i.alpha,a.alpha,e),n.transform(o)}},$I=e=>typeof e==`number`,eL=(e,t)=>n=>t(e(n)),tL=(...e)=>e.reduce(eL);function nL(e,t){return $I(e)?n=>sI(e,t,n):MI.test(e)?QI(e,t):oL(e,t)}const rL=(e,t)=>{let n=[...e],r=n.length,i=e.map((e,n)=>nL(e,t[n]));return e=>{for(let t=0;t{let n=Object.assign(Object.assign({},e),t),r={};for(let i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=nL(e[i],t[i]));return e=>{for(let t in r)n[t]=r[t](e);return n}};function aL(e){let t=VI.parse(e),n=t.length,r=0,i=0,a=0;for(let e=0;e{let n=VI.createTransformer(t),r=aL(e),i=aL(t),a=r.numHSL===i.numHSL&&r.numRGB===i.numRGB&&r.numNumbers>=i.numNumbers;return a?tL(rL(r.parsed,i.parsed),n):(HF(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),n=>`${n>0?t:e}`)},sL=(e,t)=>n=>sI(e,t,n);function cL(e){if(typeof e==`number`)return sL;if(typeof e==`string`)return MI.test(e)?QI:oL;if(Array.isArray(e))return rL;if(typeof e==`object`)return iL}function lL(e,t,n){let r=[],i=n||cL(e[0]),a=e.length-1;for(let n=0;nn(oI(e,t,r))}function dL(e,t){let n=e.length,r=n-1;return i=>{let a=0,o=!1;if(i<=e[0]?o=!0:i>=e[r]&&(a=r-1,o=!0),!o){let t=1;for(;ti||t===r);t++);a=t-1}let s=oI(e[a],e[a+1],i);return t[a](s)}}function fL(e,t,{clamp:n=!0,ease:r,mixer:i}={}){let a=e.length;UF(a===t.length,`Both input and output ranges must be the same length`),UF(!r||!Array.isArray(r)||r.length===a-1,"Array of easing functions must be of length `input.length - 1`, as it applies to the transitions **between** the defined values."),e[0]>e[a-1]&&(e=[].concat(e),t=[].concat(t),e.reverse(),t.reverse());let o=lL(t,r,i),s=a===2?uL(e,o):dL(e,o);return n?t=>s(WF(e[0],e[a-1],t)):s}const pL=e=>t=>1-e(1-t),mL=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,hL=e=>t=>t**+e,gL=e=>t=>t*t*((e+1)*t-e),_L=e=>{let t=gL(e);return e=>(e*=2)<1?.5*t(e):.5*(2-2**(-10*(e-1)))},vL=1.525,yL=4/11,bL=8/11,xL=9/10,SL=e=>e,CL=hL(2),wL=pL(CL),TL=mL(CL),EL=e=>1-Math.sin(Math.acos(e)),DL=pL(EL),OL=mL(DL),kL=gL(vL),AL=pL(kL),jL=mL(kL),ML=_L(vL),NL=4356/361,PL=35442/1805,FL=16061/1805,IL=e=>{if(e===1||e===0)return e;let t=e*e;return ee<.5?.5*(1-IL(1-e*2)):.5*IL(e*2-1)+.5;function zL(e,t){return e.map(()=>t||TL).splice(0,e.length-1)}function BL(e){let t=e.length;return e.map((e,n)=>n===0?0:n/(t-1))}function VL(e,t){return e.map(e=>e*t)}function HL({from:e=0,to:t=1,ease:n,offset:r,duration:i=300}){let a={done:!1,value:e},o=Array.isArray(t)?t:[e,t],s=VL(r&&r.length===o.length?r:BL(o),i);function c(){return fL(s,o,{ease:Array.isArray(n)?n:zL(o,n)})}let l=c();return{next:e=>(a.value=l(e),a.done=e>=i,a),flipTarget:()=>{o.reverse(),l=c()}}}function UL({velocity:e=0,from:t=0,power:n=.8,timeConstant:r=350,restDelta:i=.5,modifyTarget:a}){let o={done:!1,value:t},s=n*e,c=t+s,l=a===void 0?c:a(c);return l!==c&&(s=l-t),{next:e=>{let t=-s*Math.exp(-e/r);return o.done=!(t>i||t<-i),o.value=o.done?l:l+t,o},flipTarget:()=>{}}}const WL={keyframes:HL,spring:iI,decay:UL};function GL(e){if(Array.isArray(e.to))return HL;if(WL[e.type])return WL[e.type];let t=new Set(Object.keys(e));return t.has(`ease`)||t.has(`duration`)&&!t.has(`dampingRatio`)?HL:t.has(`dampingRatio`)||t.has(`stiffness`)||t.has(`mass`)||t.has(`damping`)||t.has(`restSpeed`)||t.has(`restDelta`)?iI:HL}function KL(e,t,n=0){return e-t-n}function qL(e,t,n=0,r=!0){return r?KL(t+-e,t,n):t-(e-t)+n}function JL(e,t,n,r){return r?e>=t+n:e<=-n}const YL=e=>{let t=({delta:t})=>e(t);return{start:()=>BF.update(t,!0),stop:()=>PF.update(t)}};function XL(e){var t,n,{from:r,autoplay:i=!0,driver:a=YL,elapsed:o=0,repeat:s=0,repeatType:c=`loop`,repeatDelay:l=0,onPlay:u,onStop:d,onComplete:f,onRepeat:p,onUpdate:m}=e,h=VF(e,[`from`,`autoplay`,`driver`,`elapsed`,`repeat`,`repeatType`,`repeatDelay`,`onPlay`,`onStop`,`onComplete`,`onRepeat`,`onUpdate`]);let{to:g}=h,_,v=0,y=h.duration,b,x=!1,S=!0,C,w=GL(h);(n=(t=w).needsInterpolation)?.call(t,r,g)&&(C=fL([0,100],[r,g],{clamp:!1}),r=0,g=100);let T=w(Object.assign(Object.assign({},h),{from:r,to:g}));function E(){v++,c===`reverse`?(S=v%2==0,o=qL(o,y,l,S)):(o=KL(o,y,l),c===`mirror`&&T.flipTarget()),x=!1,p&&p()}function D(){_.stop(),f&&f()}function O(e){if(S||(e=-e),o+=e,!x){let e=T.next(Math.max(0,o));b=e.value,C&&(b=C(b)),x=S?e.done:o<=0}m?.(b),x&&(v===0&&(y??=o),v{d?.(),_.stop()}}}function ZL(e,t){return t?e*(1e3/t):0}function QL({from:e=0,velocity:t=0,min:n,max:r,power:i=.8,timeConstant:a=750,bounceStiffness:o=500,bounceDamping:s=10,restDelta:c=1,modifyTarget:l,driver:u,onUpdate:d,onComplete:f,onStop:p}){let m;function h(e){return n!==void 0&&er}function g(e){return n===void 0?r:r===void 0||Math.abs(n-e){var n;d?.(t),(n=e.onUpdate)==null||n.call(e,t)},onComplete:f,onStop:p}))}function v(e){_(Object.assign({type:`spring`,stiffness:o,damping:s,restDelta:c},e))}if(h(e))v({from:e,velocity:t,to:g(e)});else{let r=i*t+e;l!==void 0&&(r=l(r));let o=g(r),s=o===n?-1:1,u,d,f=e=>{u=d,d=e,t=ZL(e-u,zF().delta),(s===1&&e>o||s===-1&&em?.stop()}}const $L=(e,t)=>1-3*t+3*e,eR=(e,t)=>3*t-6*e,tR=e=>3*e,nR=(e,t,n)=>(($L(t,n)*e+eR(t,n))*e+tR(t))*e,rR=(e,t,n)=>3*$L(t,n)*e*e+2*eR(t,n)*e+tR(t),iR=1e-7,aR=10;function oR(e,t,n,r,i){let a,o,s=0;do o=t+(n-t)/2,a=nR(o,r,i)-e,a>0?n=o:t=o;while(Math.abs(a)>iR&&++s=cR?lR(t,c,e,n):l===0?c:oR(t,r,r+dR,e,n)}return e=>e===0||e===1?e:nR(a(e),t,r)}const pR={BASE_URL:`/`,DEV:!1,MODE:`production`,PROD:!0,SSR:!1,VITE_APP_TARGET_HUGGINGFACE_SPACE:`true`},mR={};var hR=class{constructor(){e.defineProperty(this,`subscriptions`,new Set)}add(e){return this.subscriptions.add(e),()=>this.subscriptions.delete(e)}notify(e,t,n){if(this.subscriptions.size)for(let r of this.subscriptions)r(e,t,n)}clear(){this.subscriptions.clear()}};function gR(e){return!Number.isNaN(Number.parseFloat(e))}var _R=class{constructor(t){e.defineProperty(this,`current`,void 0),e.defineProperty(this,`prev`,void 0),e.defineProperty(this,`timeDelta`,0),e.defineProperty(this,`lastUpdated`,0),e.defineProperty(this,`updateSubscribers`,new hR),e.defineProperty(this,`stopAnimation`,void 0),e.defineProperty(this,`canTrackVelocity`,!1),e.defineProperty(this,`updateAndNotify`,e=>{this.prev=this.current,this.current=e;let{delta:t,timestamp:n}=zF();this.lastUpdated!==n&&(this.timeDelta=t,this.lastUpdated=n),BF.postRender(this.scheduleVelocityCheck),this.updateSubscribers.notify(this.current)}),e.defineProperty(this,`scheduleVelocityCheck`,()=>BF.postRender(this.velocityCheck)),e.defineProperty(this,`velocityCheck`,({timestamp:e})=>{this.canTrackVelocity||=gR(this.current),e!==this.lastUpdated&&(this.prev=this.current)}),this.prev=this.current=t,this.canTrackVelocity=gR(this.current)}onChange(e){return this.updateSubscribers.add(e)}clearListeners(){this.updateSubscribers.clear()}set(e){this.updateAndNotify(e)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?ZL(Number.parseFloat(this.current)-Number.parseFloat(this.prev),this.timeDelta):0}start(e){return this.stop(),new Promise(t=>{let{stop:n}=e(t);this.stopAnimation=n}).then(()=>this.clearAnimation())}stop(){this.stopAnimation&&this.stopAnimation(),this.clearAnimation()}isAnimating(){return!!this.stopAnimation}clearAnimation(){this.stopAnimation=null}destroy(){this.updateSubscribers.clear(),this.stop()}};function vR(e){return new _R(e)}const{isArray:yR}=Array;function bR(){let e=R({}),t=t=>{let n=t=>{e.value[t]&&(e.value[t].stop(),e.value[t].destroy(),delete e.value[t])};t?yR(t)?t.forEach(n):n(t):Object.keys(e.value).forEach(n)},n=(t,n,r)=>{if(e.value[t])return e.value[t];let i=vR(n);return i.onChange(e=>r[t]=e),e.value[t]=i,i};return gP(t),{motionValues:e,get:n,stop:t}}function xR(e){return Array.isArray(e)}function SR(){return{type:`spring`,stiffness:500,damping:25,restDelta:.5,restSpeed:10}}function CR(e){return{type:`spring`,stiffness:550,damping:e===0?2*Math.sqrt(550):30,restDelta:.01,restSpeed:10}}function wR(e){return{type:`spring`,stiffness:550,damping:e===0?100:30,restDelta:.01,restSpeed:10}}function TR(){return{type:`keyframes`,ease:`linear`,duration:300}}function ER(e){return{type:`keyframes`,duration:800,values:e}}const DR={default:wR,x:SR,y:SR,z:SR,rotate:SR,rotateX:SR,rotateY:SR,rotateZ:SR,scaleX:CR,scaleY:CR,scale:CR,backgroundColor:TR,color:TR,opacity:TR};function OR(e,t){let n;return n=xR(t)?ER:DR[e]||DR.default,{to:t,...n(t)}}const kR={...mI,transform:Math.round},AR={color:MI,backgroundColor:MI,outlineColor:MI,fill:MI,stroke:MI,borderColor:MI,borderTopColor:MI,borderRightColor:MI,borderBottomColor:MI,borderLeftColor:MI,borderWidth:bI,borderTopWidth:bI,borderRightWidth:bI,borderBottomWidth:bI,borderLeftWidth:bI,borderRadius:bI,radius:bI,borderTopLeftRadius:bI,borderTopRightRadius:bI,borderBottomRightRadius:bI,borderBottomLeftRadius:bI,width:bI,maxWidth:bI,height:bI,maxHeight:bI,size:bI,top:bI,right:bI,bottom:bI,left:bI,padding:bI,paddingTop:bI,paddingRight:bI,paddingBottom:bI,paddingLeft:bI,margin:bI,marginTop:bI,marginRight:bI,marginBottom:bI,marginLeft:bI,rotate:vI,rotateX:vI,rotateY:vI,rotateZ:vI,scale:gI,scaleX:gI,scaleY:gI,scaleZ:gI,skew:vI,skewX:vI,skewY:vI,distance:bI,translateX:bI,translateY:bI,translateZ:bI,x:bI,y:bI,z:bI,perspective:bI,transformPerspective:bI,opacity:hI,originX:CI,originY:CI,originZ:bI,zIndex:kR,filter:GI,WebkitFilter:GI,fillOpacity:hI,strokeOpacity:hI,numOctaves:kR},jR=e=>AR[e];function MR(e,t){return t&&typeof e==`number`&&t.transform?t.transform(e):e}function NR(e,t){let n=jR(e);return n!==GI&&(n=VI),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const PR={linear:SL,easeIn:CL,easeInOut:TL,easeOut:wL,circIn:EL,circInOut:OL,circOut:DL,backIn:kL,backInOut:jL,backOut:AL,anticipate:ML,bounceIn:LL,bounceInOut:RL,bounceOut:IL};function FR(e){if(Array.isArray(e)){let[t,n,r,i]=e;return fR(t,n,r,i)}else if(typeof e==`string`)return PR[e];return e}function IR(e){return Array.isArray(e)&&typeof e[0]!=`number`}function LR(e,t){return e===`zIndex`?!1:!!(typeof t==`number`||Array.isArray(t)||typeof t==`string`&&VI.test(t)&&!t.startsWith(`url(`))}function RR(e){return Array.isArray(e.to)&&e.to[0]===null&&(e.to=[...e.to],e.to[0]=e.from),e}function zR({ease:e,times:t,delay:n,...r}){let i={...r};return t&&(i.offset=t),e&&(i.ease=IR(e)?e.map(FR):FR(e)),n&&(i.elapsed=-n),i}function BR(e,t,n){return Array.isArray(t.to)&&(e.duration||=800),RR(t),VR(e)||(e={...e,...OR(n,t.to)}),{...t,...zR(e)}}function VR({delay:e,repeat:t,repeatType:n,repeatDelay:r,from:i,...a}){return!!Object.keys(a).length}function HR(e,t){return e[t]||e.default||e}function UR(e,t,n,r,i){let a=HR(r,e),o=a.from===null||a.from===void 0?t.get():a.from,s=LR(e,n);o===`none`&&s&&typeof n==`string`&&(o=NR(e,n));let c=LR(e,o);function l(s){let c={from:o,to:n,velocity:r.velocity?r.velocity:t.getVelocity(),onUpdate:e=>t.set(e)};return a.type===`inertia`||a.type===`decay`?QL({...c,...a}):XL({...BR(a,c,e),onUpdate:e=>{c.onUpdate(e),a.onUpdate&&a.onUpdate(e)},onComplete:()=>{i&&i(),s&&s()}})}function u(e){return t.set(n),i&&i(),e&&e(),{stop:()=>{}}}return!c||!s||a.type===!1?u:l}function WR(){let{motionValues:e,stop:t,get:n}=bR(),r=(e,t,r,i={},a)=>{let o=r[e],s=n(e,o,r);if(i&&i.immediate){s.set(t);return}let c=UR(e,s,t,i,a);s.start(c)};return{motionValues:e,stop:t,push:r}}function GR(e,t={},{motionValues:n,push:r,stop:i}=WR()){let a=_n(t),o=R(!1);V(n,e=>{o.value=Object.values(e).filter(e=>e.isAnimating()).length>0},{immediate:!0,deep:!0});let s=e=>{if(!a||!a[e])throw Error(`The variant ${e} does not exist.`);return a[e]},c=t=>{typeof t==`string`&&(t=s(t));let n=Object.entries(t).map(([n,i])=>{if(n!==`transition`)return new Promise(a=>r(n,i,e,t.transition||OR(n,t[n]),a))}).filter(Boolean);async function i(){var e,r;await Promise.all(n),(e=t.transition)==null||(r=e.onComplete)==null||r.call(e)}return Promise.all([i()])},l=t=>{let n=HN(t)?t:s(t);Object.entries(n).forEach(([t,n])=>{t!==`transition`&&r(t,n,e,{immediate:!0})})},u=async e=>{let t;if(a&&(a.leave&&(t=a.leave),!a.leave&&a.initial&&(t=a.initial)),!t){e();return}await c(t),e()};return{isAnimating:o,apply:c,set:l,leave:u,stop:i}}const KR=typeof window<`u`,qR=()=>KR&&(window.onpointerdown===null||pR?.TEST),JR=()=>KR&&(window.ontouchstart===null||pR?.TEST),YR=()=>KR&&(window.onmousedown===null||pR?.TEST);function XR({target:e,state:t,variants:n,apply:r}){let i=_n(n),a=R(!1),o=R(!1),s=R(!1),c=H(()=>{let e=[...Object.keys(t.value||{})];return i?(i.hovered&&(e=[...e,...Object.keys(i.hovered)]),i.tapped&&(e=[...e,...Object.keys(i.tapped)]),i.focused&&(e=[...e,...Object.keys(i.focused)]),e):e}),l=H(()=>{let e={};for(let n in Object.assign(e,t.value),a.value&&i.hovered&&Object.assign(e,i.hovered),o.value&&i.tapped&&Object.assign(e,i.tapped),s.value&&i.focused&&Object.assign(e,i.focused),e)c.value.includes(n)||delete e[n];return e});i.hovered&&(EP(e,`mouseenter`,()=>a.value=!0),EP(e,`mouseleave`,()=>{a.value=!1,o.value=!1})),i.tapped&&(YR()&&(EP(e,`mousedown`,()=>o.value=!0),EP(e,`mouseup`,()=>o.value=!1)),qR()&&(EP(e,`pointerdown`,()=>o.value=!0),EP(e,`pointerup`,()=>o.value=!1)),JR()&&(EP(e,`touchstart`,()=>o.value=!0),EP(e,`touchend`,()=>o.value=!1))),i.focused&&(EP(e,`focus`,()=>s.value=!0),EP(e,`blur`,()=>s.value=!1)),V([a,o,s],()=>{r(l.value)})}function ZR({set:e,target:t,variants:n,variant:r}){let i=_n(n);V(()=>t,()=>{i&&(i.initial&&(e(`initial`),r.value=`initial`),i.enter&&(r.value=`enter`))},{immediate:!0,flush:`pre`})}function QR({state:e,apply:t}){V(e,e=>{e&&t(e)},{immediate:!0})}function $R({target:e,variants:t,variant:n}){let r=_n(t);r&&(r.visible||r.visibleOnce)&&eF(e,([{isIntersecting:e}])=>{r.visible?e?n.value=`visible`:n.value=`initial`:r.visibleOnce&&(e&&n.value!==`visibleOnce`?n.value=`visibleOnce`:n.value||=`initial`)})}function ez(e,t={syncVariants:!0,lifeCycleHooks:!0,visibilityHooks:!0,eventListeners:!0}){t.lifeCycleHooks&&ZR(e),t.syncVariants&&QR(e),t.visibilityHooks&&$R(e),t.eventListeners&&XR(e)}function tz(e={}){let t=$t({...e}),n=R({});return V(t,()=>{let e={};for(let[n,r]of Object.entries(t)){let t=jR(n),i=MR(r,t);e[n]=i}n.value=e},{immediate:!0,deep:!0}),{state:t,style:n}}function nz(e,t){V(()=>TP(e),e=>{e&&t(e)},{immediate:!0})}const rz={x:`translateX`,y:`translateY`,z:`translateZ`};function iz(e={},t=!0){let n=$t({...e}),r=R(``);return V(n,e=>{let n=``,i=!1;if(t&&(e.x||e.y||e.z)){let t=[e.x||0,e.y||0,e.z||0].map(e=>MR(e,bI)).join(`,`);n+=`translate3d(${t}) `,i=!0}for(let[r,i]of Object.entries(e)){if(t&&(r===`x`||r===`y`||r===`z`))continue;let e=jR(r),a=MR(i,e);n+=`${rz[r]||r}(${a}) `}t&&!i&&(n+=`translateZ(0px) `),r.value=n.trim()},{immediate:!0,deep:!0}),{state:n,transform:r}}const az=[``,`X`,`Y`,`Z`],oz=[`perspective`,`translate`,`scale`,`rotate`,`skew`],sz=[`transformPerspective`,`x`,`y`,`z`];oz.forEach(e=>{az.forEach(t=>{let n=e+t;sz.push(n)})});const cz=new Set(sz);function lz(e){return cz.has(e)}const uz=new Set([`originX`,`originY`,`originZ`]);function dz(e){return uz.has(e)}function fz(e){let t={},n={};return Object.entries(e).forEach(([e,r])=>{lz(e)||dz(e)?t[e]=r:n[e]=r}),{transform:t,style:n}}function pz(e){let{transform:t,style:n}=fz(e),{transform:r}=iz(t),{style:i}=tz(n);return r.value&&(i.value.transform=r.value),i.value}function mz(e,t){let n,r,{state:i,style:a}=tz();return nz(e,e=>{r=e;for(let t of Object.keys(AR)){if(e.style[t]===null||e.style[t]===``||lz(t)||dz(t))continue;i[t]=e.style[t]}n&&Object.entries(n).forEach(([t,n])=>e.style[t]=n),t&&t(i)}),V(a,e=>{if(!r){n=e;return}for(let t in e)r.style[t]=e[t]},{immediate:!0}),{style:i}}function hz(e){let t=e.trim().split(/\) |\)/);if(t.length===1)return{};let n=e=>e.endsWith(`px`)||e.endsWith(`deg`)?Number.parseFloat(e):Number.isNaN(Number(e))?Number(e):e;return t.reduce((e,t)=>{if(!t)return e;let[r,i]=t.split(`(`),a=i.split(`,`),o=a.map(e=>n(e.endsWith(`)`)?e.replace(`)`,``):e.trim())),s=o.length===1?o[0]:o;return{...e,[r]:s}},{})}function gz(e,t){Object.entries(hz(t)).forEach(([t,n])=>{let r=[`x`,`y`,`z`];if(t===`translate3d`){if(n===0){r.forEach(t=>e[t]=0);return}n.forEach((t,n)=>e[r[n]]=t);return}if(n=Number.parseFloat(`${n}`),t===`translateX`){e.x=n;return}if(t===`translateY`){e.y=n;return}if(t===`translateZ`){e.z=n;return}e[t]=n})}function _z(e,t){let n,r,{state:i,transform:a}=iz();return nz(e,e=>{r=e,e.style.transform&&gz(i,e.style.transform),n&&(e.style.transform=n),t&&t(i)}),V(a,e=>{if(!r){n=e;return}r.style.transform=e},{immediate:!0}),{transform:i}}function vz(e){return Object.entries(e)}function yz(e,t){let n=$t({}),r=e=>Object.entries(e).forEach(([e,t])=>n[e]=t),{style:i}=mz(e,r),{transform:a}=_z(e,r);return V(n,e=>{vz(e).forEach(([e,t])=>{let n=lz(e)?a:i;n[e]&&n[e]===t||(n[e]=t)})},{immediate:!0,deep:!0}),nz(e,()=>t&&r(t)),{motionProperties:n,style:i,transform:a}}function bz(e={}){let t=_n(e),n=R(),r=H(()=>{if(n.value)return t[n.value]});return{state:r,variant:n}}function xz(e,t={},n){let{motionProperties:r}=yz(e),{variant:i,state:a}=bz(t),o=GR(r,t),s={target:e,variant:i,variants:t,state:a,motionProperties:r,...o};return ez(s,n),s}const Sz=[`delay`,`duration`],Cz=[`initial`,`enter`,`leave`,`visible`,`visible-once`,`visibleOnce`,`hovered`,`tapped`,`focused`,...Sz];function wz(e){return Sz.includes(e)}function Tz(e,t){let n=e.props?e.props:e.data&&e.data.attrs?e.data.attrs:{};if(n){n.variants&&HN(n.variants)&&(t.value={...t.value,...n.variants});for(let e of Cz){if(!n||!n[e])continue;if(wz(e)&&typeof n[e]==`number`){for(let r of[`enter`,`visible`,`visibleOnce`]){let i=t.value[r];if(i==null)continue;i.transition??={},i.transition[e]=n[e]}continue}if(HN(n[e])){let r=n[e];e===`visible-once`&&(e=`visibleOnce`),t.value[e]=r}}}}function Ez(e,t=!1){let n=(n,r,i)=>{let a=r.value&&typeof r.value==`string`?r.value:i.key;a&&mR[a]&&mR[a].stop();let o=t?structuredClone(ln(e)||{}):e||{},s=R(o);typeof r.value==`object`&&(s.value=r.value),Tz(i,s);let c={eventListeners:!0,lifeCycleHooks:!0,syncVariants:!0,visibilityHooks:!1},l=xz(n,s,c);n.motionInstance=l,a&&(mR[a]=l)},r=(e,t,n)=>{e.motionInstance&&$R(e.motionInstance)};return{created:n,mounted:r,getSSRProps(t,n){let{initial:r}=t.value||n&&n?.props||{};r=_n(r);let i=jN({},e?.initial||{},r||{});if(!i||Object.keys(i).length===0)return;let a=pz(i);return{style:a}}}}const Dz={initial:{opacity:0},enter:{opacity:1}},Oz={initial:{opacity:0},visible:{opacity:1}},kz={initial:{opacity:0},visibleOnce:{opacity:1}},Az={initial:{scale:0,opacity:0},enter:{scale:1,opacity:1}},jz={initial:{scale:0,opacity:0},visible:{scale:1,opacity:1}},Mz={initial:{scale:0,opacity:0},visibleOnce:{scale:1,opacity:1}},Nz={initial:{x:-100,rotate:90,opacity:0},enter:{x:0,rotate:0,opacity:1}},Pz={initial:{x:-100,rotate:90,opacity:0},visible:{x:0,rotate:0,opacity:1}},Fz={initial:{x:-100,rotate:90,opacity:0},visibleOnce:{x:0,rotate:0,opacity:1}},Iz={initial:{x:100,rotate:-90,opacity:0},enter:{x:0,rotate:0,opacity:1}},Lz={initial:{x:100,rotate:-90,opacity:0},visible:{x:0,rotate:0,opacity:1}},Rz={initial:{x:100,rotate:-90,opacity:0},visibleOnce:{x:0,rotate:0,opacity:1}},zz={initial:{y:-100,rotate:-90,opacity:0},enter:{y:0,rotate:0,opacity:1}},Bz={initial:{y:-100,rotate:-90,opacity:0},visible:{y:0,rotate:0,opacity:1}},Vz={initial:{y:-100,rotate:-90,opacity:0},visibleOnce:{y:0,rotate:0,opacity:1}},Hz={initial:{y:100,rotate:90,opacity:0},enter:{y:0,rotate:0,opacity:1}},Uz={initial:{y:100,rotate:90,opacity:0},visible:{y:0,rotate:0,opacity:1}},Wz={initial:{y:100,rotate:90,opacity:0},visibleOnce:{y:0,rotate:0,opacity:1}},Gz={initial:{x:-100,opacity:0},enter:{x:0,opacity:1}},Kz={initial:{x:-100,opacity:0},visible:{x:0,opacity:1}},qz={initial:{x:-100,opacity:0},visibleOnce:{x:0,opacity:1}},Jz={initial:{x:100,opacity:0},enter:{x:0,opacity:1}},Yz={initial:{x:100,opacity:0},visible:{x:0,opacity:1}},Xz={initial:{x:100,opacity:0},visibleOnce:{x:0,opacity:1}},Zz={initial:{y:-100,opacity:0},enter:{y:0,opacity:1}},Qz={initial:{y:-100,opacity:0},visible:{y:0,opacity:1}},$z={initial:{y:-100,opacity:0},visibleOnce:{y:0,opacity:1}},eB={initial:{y:100,opacity:0},enter:{y:0,opacity:1}},tB={initial:{y:100,opacity:0},visible:{y:0,opacity:1}},nB={initial:{y:100,opacity:0},visibleOnce:{y:0,opacity:1}},rB={__proto__:null,fade:Dz,fadeVisible:Oz,fadeVisibleOnce:kz,pop:Az,popVisible:jz,popVisibleOnce:Mz,rollBottom:Hz,rollLeft:Nz,rollRight:Iz,rollTop:zz,rollVisibleBottom:Uz,rollVisibleLeft:Pz,rollVisibleOnceBottom:Wz,rollVisibleOnceLeft:Fz,rollVisibleOnceRight:Rz,rollVisibleOnceTop:Vz,rollVisibleRight:Lz,rollVisibleTop:Bz,slideBottom:eB,slideLeft:Gz,slideRight:Jz,slideTop:Zz,slideVisibleBottom:tB,slideVisibleLeft:Kz,slideVisibleOnceBottom:nB,slideVisibleOnceLeft:qz,slideVisibleOnceRight:Xz,slideVisibleOnceTop:$z,slideVisibleRight:Yz,slideVisibleTop:Qz};function iB(e){let t=`àáâäæãåāăąçćčđďèéêëēėęěğǵḧîïíīįìłḿñńǹňôöòóœøōõőṕŕřßśšşșťțûüùúūǘůűųẃẍÿýžźż·/_,:;`,n=`aaaaaaaaaacccddeeeeeeeegghiiiiiilmnnnnoooooooooprrsssssttuuuuuuuuuwxyyzzz------`,r=new RegExp(t.split(``).join(`|`),`g`);return e.toString().replace(/[A-Z]/g,e=>`-${e}`).toLowerCase().replace(/\s+/g,`-`).replace(r,e=>n.charAt(t.indexOf(e))).replace(/&/g,`-and-`).replace(/[^\w\-]+/g,``).replace(/-{2,}/g,`-`).replace(/^-+/,``).replace(/-+$/,``)}const aB=Symbol(``),oB={preset:{type:String,required:!1},instance:{type:Object,required:!1},variants:{type:Object,required:!1},initial:{type:Object,required:!1},enter:{type:Object,required:!1},leave:{type:Object,required:!1},visible:{type:Object,required:!1},visibleOnce:{type:Object,required:!1},hovered:{type:Object,required:!1},tapped:{type:Object,required:!1},focused:{type:Object,required:!1},delay:{type:[Number,String],required:!1},duration:{type:[Number,String],required:!1}};function sB(e){return Object.prototype.toString.call(e)===`[object Object]`}function cB(e){if(Array.isArray(e))return e.map(cB);if(sB(e)){let t={};for(let n in e)t[n]=cB(e[n]);return t}return e}function lB(e){let t=$t({}),n=Zi(aB,{}),r=H(()=>e.preset==null?{}:n!=null&&e.preset in n?structuredClone(ln(n)[e.preset]):e.preset in rB?structuredClone(rB[e.preset]):{}),i=H(()=>({initial:e.initial,enter:e.enter,leave:e.leave,visible:e.visible,visibleOnce:e.visibleOnce,hovered:e.hovered,tapped:e.tapped,focused:e.focused}));function a(e,t){for(let n of[`delay`,`duration`]){if(t[n]==null)continue;let r=Number.parseInt(t[n]);for(let t of[`enter`,`visible`,`visibleOnce`]){let i=e[t];if(i==null)continue;i.transition??={},i.transition[n]=r}}return e}let o=H(()=>{let t=jN({},i.value,r.value,e.variants||{});return a({...t},e)});function s(e,n,r){var i;e.props??={},(i=e.props).style??(i.style={}),e.props.style={...e.props.style,...r};let s=a(cB(o.value),e.props);return e.props.onVnodeMounted=({el:e})=>{t[n]=xz(e,s)},e.props.onVnodeUpdated=({el:e})=>{let r=pz(t[n].state);for(let[t,n]of Object.entries(r))e.style[t]=n},e}return{motionConfig:o,setNodeInstance:s}}const uB=Rr({name:`Motion`,props:{...oB,is:{type:[String,Object],default:`div`}},setup(e){let t=wi(),{motionConfig:n,setNodeInstance:r}=lB(e);return()=>{let i=pz(n.value.initial||{}),a=Jo(e.is,void 0,t);return r(a,0,i),a}}}),dB=Rr({name:`MotionGroup`,props:{...oB,is:{type:[String,Object],required:!1}},setup(e){let t=wi(),{motionConfig:n,setNodeInstance:r}=lB(e);return()=>{var i;let a=pz(n.value.initial||{}),o=(i=t.default)?.call(t)||[];for(let e=0;e{(function(n,r){typeof define==`function`&&define.amd?define(r):typeof exports==`object`?t.exports=r():n.NProgress=r()})(void 0,function(){var e={};e.version=`0.2.0`;var t=e.settings={minimum:.08,easing:`ease`,positionUsing:``,speed:200,trickle:!0,trickleRate:.02,trickleSpeed:800,showSpinner:!0,barSelector:`[role="bar"]`,spinnerSelector:`[role="spinner"]`,parent:`body`,template:`
`};e.configure=function(e){var n,r;for(n in e)r=e[n],r!==void 0&&e.hasOwnProperty(n)&&(t[n]=r);return this},e.status=null,e.set=function(r){var s=e.isStarted();r=n(r,t.minimum,1),e.status=r===1?null:r;var c=e.render(!s),l=c.querySelector(t.barSelector),u=t.speed,d=t.easing;return c.offsetWidth,a(function(n){t.positionUsing===``&&(t.positionUsing=e.getPositioningCSS()),o(l,i(r,u,d)),r===1?(o(c,{transition:`none`,opacity:1}),c.offsetWidth,setTimeout(function(){o(c,{transition:`all `+u+`ms linear`,opacity:0}),setTimeout(function(){e.remove(),n()},u)},u)):setTimeout(n,u)}),this},e.isStarted=function(){return typeof e.status==`number`},e.start=function(){e.status||e.set(0);var n=function(){setTimeout(function(){e.status&&(e.trickle(),n())},t.trickleSpeed)};return t.trickle&&n(),this},e.done=function(t){return!t&&!e.status?this:e.inc(.3+.5*Math.random()).set(1)},e.inc=function(t){var r=e.status;return r?(typeof t!=`number`&&(t=(1-r)*n(Math.random()*r,.1,.95)),r=n(r+t,0,.994),e.set(r)):e.start()},e.trickle=function(){return e.inc(Math.random()*t.trickleRate)},function(){var t=0,n=0;e.promise=function(r){return!r||r.state()===`resolved`?this:(n===0&&e.start(),t++,n++,r.always(function(){n--,n===0?(t=0,e.done()):e.set((t-n)/t)}),this)}}(),e.render=function(n){if(e.isRendered())return document.getElementById(`nprogress`);c(document.documentElement,`nprogress-busy`);var i=document.createElement(`div`);i.id=`nprogress`,i.innerHTML=t.template;var a=i.querySelector(t.barSelector),s=n?`-100`:r(e.status||0),l=document.querySelector(t.parent),u;return o(a,{transition:`all 0 linear`,transform:`translate3d(`+s+`%,0,0)`}),t.showSpinner||(u=i.querySelector(t.spinnerSelector),u&&d(u)),l!=document.body&&c(l,`nprogress-custom-parent`),l.appendChild(i),i},e.remove=function(){l(document.documentElement,`nprogress-busy`),l(document.querySelector(t.parent),`nprogress-custom-parent`);var e=document.getElementById(`nprogress`);e&&d(e)},e.isRendered=function(){return!!document.getElementById(`nprogress`)},e.getPositioningCSS=function(){var e=document.body.style,t=`WebkitTransform`in e?`Webkit`:`MozTransform`in e?`Moz`:`msTransform`in e?`ms`:`OTransform`in e?`O`:``;return t+`Perspective`in e?`translate3d`:t+`Transform`in e?`translate`:`margin`};function n(e,t,n){return en?n:e}function r(e){return(-1+e)*100}function i(e,n,i){var a;return a=t.positionUsing===`translate3d`?{transform:`translate3d(`+r(e)+`%,0,0)`}:t.positionUsing===`translate`?{transform:`translate(`+r(e)+`%,0)`}:{"margin-left":r(e)+`%`},a.transition=`all `+n+`ms `+i,a}var a=function(){var e=[];function t(){var n=e.shift();n&&n(t)}return function(n){e.push(n),e.length==1&&t()}}(),o=function(){var e=[`Webkit`,`O`,`Moz`,`ms`],t={};function n(e){return e.replace(/^-ms-/,`ms-`).replace(/-([\da-z])/gi,function(e,t){return t.toUpperCase()})}function r(t){var n=document.body.style;if(t in n)return t;for(var r=e.length,i=t.charAt(0).toUpperCase()+t.slice(1),a;r--;)if(a=e[r]+i,a in n)return a;return t}function i(e){return e=n(e),t[e]||(t[e]=r(e))}function a(e,t,n){t=i(t),e.style[t]=n}return function(e,t){var n=arguments,r,i;if(n.length==2)for(r in t)i=t[r],i!==void 0&&t.hasOwnProperty(r)&&a(e,r,i);else a(e,n[1],n[2])}}();function s(e,t){var n=typeof e==`string`?e:u(e);return n.indexOf(` `+t+` `)>=0}function c(e,t){var n=u(e),r=n+t;s(n,t)||(e.className=r.substring(1))}function l(e,t){var n=u(e),r;s(e,t)&&(r=n.replace(` `+t+` `,` `),e.className=r.substring(1,r.length-1))}function u(e){return(` `+(e.className||``)+` `).replace(/\s+/gi,` `)}function d(e){e&&e.parentNode&&e.parentNode.removeChild(e)}return e})});let mB;const hB=e=>mB=e,gB=Symbol();function _B(e){return e&&typeof e==`object`&&Object.prototype.toString.call(e)===`[object Object]`&&typeof e.toJSON!=`function`}var vB;(function(e){e.direct=`direct`,e.patchObject=`patch object`,e.patchFunction=`patch function`})(vB||={});const yB=typeof window<`u`,bB=(()=>typeof window==`object`&&window.window===window?window:typeof self==`object`&&self.self===self?self:typeof global==`object`&&global.global===global?global:typeof globalThis==`object`?globalThis:{HTMLElement:null})();function xB(e,{autoBom:t=!1}={}){return t&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob([``,e],{type:e.type}):e}function SB(e,t,n){let r=new XMLHttpRequest;r.open(`GET`,e),r.responseType=`blob`,r.onload=function(){DB(r.response,t,n)},r.onerror=function(){console.error(`could not download file`)},r.send()}function CB(e){let t=new XMLHttpRequest;t.open(`HEAD`,e,!1);try{t.send()}catch{}return t.status>=200&&t.status<=299}function wB(e){try{e.dispatchEvent(new MouseEvent(`click`))}catch{let t=new MouseEvent(`click`,{bubbles:!0,cancelable:!0,view:window,detail:0,screenX:80,screenY:20,clientX:80,clientY:20,ctrlKey:!1,altKey:!1,shiftKey:!1,metaKey:!1,button:0,relatedTarget:null});e.dispatchEvent(t)}}const TB=typeof navigator==`object`?navigator:{userAgent:``},EB=(()=>/Macintosh/.test(TB.userAgent)&&/AppleWebKit/.test(TB.userAgent)&&!/Safari/.test(TB.userAgent))(),DB=yB?typeof HTMLAnchorElement<`u`&&`download`in HTMLAnchorElement.prototype&&!EB?OB:`msSaveOrOpenBlob`in TB?kB:AB:()=>{};function OB(e,t=`download`,n){let r=document.createElement(`a`);r.download=t,r.rel=`noopener`,typeof e==`string`?(r.href=e,r.origin===location.origin?wB(r):CB(r.href)?SB(e,t,n):(r.target=`_blank`,wB(r))):(r.href=URL.createObjectURL(e),setTimeout(function(){URL.revokeObjectURL(r.href)},4e4),setTimeout(function(){wB(r)},0))}function kB(e,t=`download`,n){if(typeof e==`string`)if(CB(e))SB(e,t,n);else{let t=document.createElement(`a`);t.href=e,t.target=`_blank`,setTimeout(function(){wB(t)})}else navigator.msSaveOrOpenBlob(xB(e,n),t)}function AB(e,t,n,r){if(r||=open(``,`_blank`),r&&(r.document.title=r.document.body.innerText=`downloading...`),typeof e==`string`)return SB(e,t,n);let i=e.type===`application/octet-stream`,a=/constructor/i.test(String(bB.HTMLElement))||`safari`in bB,o=/CriOS\/[\d]+/.test(navigator.userAgent);if((o||i&&a||EB)&&typeof FileReader<`u`){let t=new FileReader;t.onloadend=function(){let e=t.result;if(typeof e!=`string`)throw r=null,Error(`Wrong reader.result type`);e=o?e:e.replace(/^data:[^;]*;/,`data:attachment/file;`),r?r.location.href=e:location.assign(e),r=null},t.readAsDataURL(e)}else{let t=URL.createObjectURL(e);r?r.location.assign(t):location.href=t,r=null,setTimeout(function(){URL.revokeObjectURL(t)},4e4)}}const{assign:jB}=Object;function MB(){let e=Re(!0),t=e.run(()=>R({})),n=[],r=[],i=un({install(e){hB(i),i._a=e,e.provide(gB,i),e.config.globalProperties.$pinia=i,r.forEach(e=>n.push(e)),r=[]},use(e){return this._a?n.push(e):r.push(e),this},_p:n,_a:null,_e:e,_s:new Map,state:t});return i}const NB=()=>{};function PB(e,t,n,r=NB){e.push(t);let i=()=>{let n=e.indexOf(t);n>-1&&(e.splice(n,1),r())};return!n&&ze()&&Be(i),i}function FB(e,...t){e.slice().forEach(e=>{e(...t)})}const IB=e=>e(),LB=Symbol(),RB=Symbol();function zB(e,t){for(let n in e instanceof Map&&t instanceof Map?t.forEach((t,n)=>e.set(n,t)):e instanceof Set&&t instanceof Set&&t.forEach(e.add,e),t){if(!t.hasOwnProperty(n))continue;let r=t[n],i=e[n];_B(i)&&_B(r)&&e.hasOwnProperty(n)&&!pn(r)&&!an(r)?e[n]=zB(i,r):e[n]=r}return e}const BB=Symbol();function VB(e){return!_B(e)||!Object.prototype.hasOwnProperty.call(e,BB)}const{assign:HB}=Object;function UB(e){return!!(pn(e)&&e.effect)}function WB(e,t,n,r){let{state:i,actions:a,getters:o}=t,s=n.state.value[e],c;function l(){s||(n.state.value[e]=i?i():{});let t=Sn(n.state.value[e]);return HB(t,a,Object.keys(o||{}).reduce((t,r)=>(t[r]=un(H(()=>{hB(n);let t=n._s.get(e);return o[r].call(t,t)})),t),{}))}return c=GB(e,l,t,n,r,!0),c}function GB(e,t,n={},r,i,a){let o,s=HB({actions:{}},n),c={deep:!0},l,u,d=[],f=[],p,m=r.state.value[e];!a&&!m&&(r.state.value[e]={});let h=R({}),g;function _(t){let n;l=u=!1,typeof t==`function`?(t(r.state.value[e]),n={type:vB.patchFunction,storeId:e,events:p}):(zB(r.state.value[e],t),n={type:vB.patchObject,payload:t,storeId:e,events:p});let i=g=Symbol();Kn().then(()=>{g===i&&(l=!0)}),u=!0,FB(d,n,r.state.value[e])}let v=a?function(){let{state:e}=n,t=e?e():{};this.$patch(e=>{HB(e,t)})}:NB;function y(){o.stop(),d=[],f=[],r._s.delete(e)}let b=(t,n=``)=>{if(LB in t)return t[RB]=n,t;let i=function(){hB(r);let n=Array.from(arguments),a=[],o=[];function s(e){a.push(e)}function c(e){o.push(e)}FB(f,{args:n,name:i[RB],store:C,after:s,onError:c});let l;try{l=t.apply(this&&this.$id===e?this:C,n)}catch(e){throw FB(o,e),e}return l instanceof Promise?l.then(e=>(FB(a,e),e)).catch(e=>(FB(o,e),Promise.reject(e))):(FB(a,l),l)};return i[LB]=!0,i[RB]=n,i},x=un({actions:{},getters:{},state:[],hotState:h}),S={_p:r,$id:e,$onAction:PB.bind(null,f),$patch:_,$reset:v,$subscribe(t,n={}){let i=PB(d,t,n.detached,()=>a()),a=o.run(()=>V(()=>r.state.value[e],r=>{(n.flush===`sync`?u:l)&&t({storeId:e,type:vB.direct,events:p},r)},HB({},c,n)));return i},$dispose:y},C=$t(S);r._s.set(e,C);let w=r._a&&r._a.runWithContext||IB,T=w(()=>r._e.run(()=>(o=Re()).run(()=>t({action:b}))));for(let t in T){let n=T[t];if(pn(n)&&!UB(n)||an(n))a||(m&&VB(n)&&(pn(n)?n.value=m[t]:zB(n,m[t])),r.state.value[e][t]=n);else if(typeof n==`function`){let e=b(n,t);T[t]=e,s.actions[t]=n}}return HB(C,T),HB(ln(C),T),Object.defineProperty(C,`$state`,{get:()=>r.state.value[e],set:e=>{_(t=>{HB(t,e)})}}),r._p.forEach(e=>{HB(C,o.run(()=>e({store:C,app:r._a,pinia:r,options:s})))}),m&&a&&n.hydrate&&n.hydrate(C.$state,m),l=!0,u=!0,C} +}`;var NO=class{constructor(){this.texture=null,this.mesh=null,this.depthNear=0,this.depthFar=0}init(e,t,n){if(this.texture===null){let r=new bp,i=e.properties.get(r);i.__webglTexture=t.texture,(t.depthNear!==n.depthNear||t.depthFar!==n.depthFar)&&(this.depthNear=t.depthNear,this.depthFar=t.depthFar),this.texture=r}}getMesh(e){if(this.texture!==null&&this.mesh===null){let t=e.cameras[0].viewport,n=new Uh({vertexShader:jO,fragmentShader:MO,uniforms:{depthColor:{value:this.texture},depthWidth:{value:t.z},depthHeight:{value:t.w}}});this.mesh=new Mh(new My(20,20),n)}return this.mesh}reset(){this.texture=null,this.mesh=null}getDepthTexture(){return this.texture}},PO=class extends vf{constructor(e,t){super();let n=this,r=null,i=1,a=null,o=`local-floor`,s=1,c=null,l=null,u=null,d=null,f=null,p=null,m=new NO,h=t.getContextAttributes(),g=null,_=null,v=[],y=[],b=new U,x=null,S=new Jh;S.viewport=new xp;let C=new Jh;C.viewport=new xp;let w=[S,C],T=new xx,E=null,D=null;this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(e){let t=v[e];return t===void 0&&(t=new ng,v[e]=t),t.getTargetRaySpace()},this.getControllerGrip=function(e){let t=v[e];return t===void 0&&(t=new ng,v[e]=t),t.getGripSpace()},this.getHand=function(e){let t=v[e];return t===void 0&&(t=new ng,v[e]=t),t.getHandSpace()};function O(e){let t=y.indexOf(e.inputSource);if(t===-1)return;let n=v[t];n!==void 0&&(n.update(e.inputSource,e.frame,c||a),n.dispatchEvent({type:e.type,data:e.inputSource}))}function k(){r.removeEventListener(`select`,O),r.removeEventListener(`selectstart`,O),r.removeEventListener(`selectend`,O),r.removeEventListener(`squeeze`,O),r.removeEventListener(`squeezestart`,O),r.removeEventListener(`squeezeend`,O),r.removeEventListener(`end`,k),r.removeEventListener(`inputsourceschange`,A);for(let e=0;e=0&&(y[r]=null,v[r].disconnect(n))}for(let t=0;t=y.length){y.push(n),r=e;break}else if(y[e]===null){y[e]=n,r=e;break}if(r===-1)break}let i=v[r];i&&i.connect(n)}}let j=new W,M=new W;function N(e,t,n){j.setFromMatrixPosition(t.matrixWorld),M.setFromMatrixPosition(n.matrixWorld);let r=j.distanceTo(M),i=t.projectionMatrix.elements,a=n.projectionMatrix.elements,o=i[14]/(i[10]-1),s=i[14]/(i[10]+1),c=(i[9]+1)/i[5],l=(i[9]-1)/i[5],u=(i[8]-1)/i[0],d=(a[8]+1)/a[0],f=o*u,p=o*d,m=r/(-u+d),h=m*-u;if(t.matrixWorld.decompose(e.position,e.quaternion,e.scale),e.translateX(h),e.translateZ(m),e.matrixWorld.compose(e.position,e.quaternion,e.scale),e.matrixWorldInverse.copy(e.matrixWorld).invert(),i[10]===-1)e.projectionMatrix.copy(t.projectionMatrix),e.projectionMatrixInverse.copy(t.projectionMatrixInverse);else{let t=o+m,n=s+m,i=f-h,a=p+(r-h),u=c*s/n*t,d=l*s/n*t;e.projectionMatrix.makePerspective(i,a,u,d,t,n),e.projectionMatrixInverse.copy(e.projectionMatrix).invert()}}function ee(e,t){t===null?e.matrixWorld.copy(e.matrix):e.matrixWorld.multiplyMatrices(t.matrixWorld,e.matrix),e.matrixWorldInverse.copy(e.matrixWorld).invert()}this.updateCamera=function(e){if(r===null)return;let t=e.near,n=e.far;m.texture!==null&&(m.depthNear>0&&(t=m.depthNear),m.depthFar>0&&(n=m.depthFar)),T.near=C.near=S.near=t,T.far=C.far=S.far=n,(E!==T.near||D!==T.far)&&(r.updateRenderState({depthNear:T.near,depthFar:T.far}),E=T.near,D=T.far),S.layers.mask=e.layers.mask|2,C.layers.mask=e.layers.mask|4,T.layers.mask=S.layers.mask|C.layers.mask;let i=e.parent,a=T.cameras;ee(T,i);for(let e=0;e0&&(e.alphaTest.value=r.alphaTest);let i=t.get(r),a=i.envMap,o=i.envMapRotation;a&&(e.envMap.value=a,FO.copy(o),FO.x*=-1,FO.y*=-1,FO.z*=-1,a.isCubeTexture&&a.isRenderTargetTexture===!1&&(FO.y*=-1,FO.z*=-1),e.envMapRotation.value.setFromMatrix4(IO.makeRotationFromEuler(FO)),e.flipEnvMap.value=a.isCubeTexture&&a.isRenderTargetTexture===!1?-1:1,e.reflectivity.value=r.reflectivity,e.ior.value=r.ior,e.refractionRatio.value=r.refractionRatio),r.lightMap&&(e.lightMap.value=r.lightMap,e.lightMapIntensity.value=r.lightMapIntensity,n(r.lightMap,e.lightMapTransform)),r.aoMap&&(e.aoMap.value=r.aoMap,e.aoMapIntensity.value=r.aoMapIntensity,n(r.aoMap,e.aoMapTransform))}function o(e,t){e.diffuse.value.copy(t.color),e.opacity.value=t.opacity,t.map&&(e.map.value=t.map,n(t.map,e.mapTransform))}function s(e,t){e.dashSize.value=t.dashSize,e.totalSize.value=t.dashSize+t.gapSize,e.scale.value=t.scale}function c(e,t,r,i){e.diffuse.value.copy(t.color),e.opacity.value=t.opacity,e.size.value=t.size*r,e.scale.value=i*.5,t.map&&(e.map.value=t.map,n(t.map,e.uvTransform)),t.alphaMap&&(e.alphaMap.value=t.alphaMap,n(t.alphaMap,e.alphaMapTransform)),t.alphaTest>0&&(e.alphaTest.value=t.alphaTest)}function l(e,t){e.diffuse.value.copy(t.color),e.opacity.value=t.opacity,e.rotation.value=t.rotation,t.map&&(e.map.value=t.map,n(t.map,e.mapTransform)),t.alphaMap&&(e.alphaMap.value=t.alphaMap,n(t.alphaMap,e.alphaMapTransform)),t.alphaTest>0&&(e.alphaTest.value=t.alphaTest)}function u(e,t){e.specular.value.copy(t.specular),e.shininess.value=Math.max(t.shininess,1e-4)}function d(e,t){t.gradientMap&&(e.gradientMap.value=t.gradientMap)}function f(e,t){e.metalness.value=t.metalness,t.metalnessMap&&(e.metalnessMap.value=t.metalnessMap,n(t.metalnessMap,e.metalnessMapTransform)),e.roughness.value=t.roughness,t.roughnessMap&&(e.roughnessMap.value=t.roughnessMap,n(t.roughnessMap,e.roughnessMapTransform)),t.envMap&&(e.envMapIntensity.value=t.envMapIntensity)}function p(e,t,r){e.ior.value=t.ior,t.sheen>0&&(e.sheenColor.value.copy(t.sheenColor).multiplyScalar(t.sheen),e.sheenRoughness.value=t.sheenRoughness,t.sheenColorMap&&(e.sheenColorMap.value=t.sheenColorMap,n(t.sheenColorMap,e.sheenColorMapTransform)),t.sheenRoughnessMap&&(e.sheenRoughnessMap.value=t.sheenRoughnessMap,n(t.sheenRoughnessMap,e.sheenRoughnessMapTransform))),t.clearcoat>0&&(e.clearcoat.value=t.clearcoat,e.clearcoatRoughness.value=t.clearcoatRoughness,t.clearcoatMap&&(e.clearcoatMap.value=t.clearcoatMap,n(t.clearcoatMap,e.clearcoatMapTransform)),t.clearcoatRoughnessMap&&(e.clearcoatRoughnessMap.value=t.clearcoatRoughnessMap,n(t.clearcoatRoughnessMap,e.clearcoatRoughnessMapTransform)),t.clearcoatNormalMap&&(e.clearcoatNormalMap.value=t.clearcoatNormalMap,n(t.clearcoatNormalMap,e.clearcoatNormalMapTransform),e.clearcoatNormalScale.value.copy(t.clearcoatNormalScale),t.side===Wc&&e.clearcoatNormalScale.value.negate())),t.dispersion>0&&(e.dispersion.value=t.dispersion),t.iridescence>0&&(e.iridescence.value=t.iridescence,e.iridescenceIOR.value=t.iridescenceIOR,e.iridescenceThicknessMinimum.value=t.iridescenceThicknessRange[0],e.iridescenceThicknessMaximum.value=t.iridescenceThicknessRange[1],t.iridescenceMap&&(e.iridescenceMap.value=t.iridescenceMap,n(t.iridescenceMap,e.iridescenceMapTransform)),t.iridescenceThicknessMap&&(e.iridescenceThicknessMap.value=t.iridescenceThicknessMap,n(t.iridescenceThicknessMap,e.iridescenceThicknessMapTransform))),t.transmission>0&&(e.transmission.value=t.transmission,e.transmissionSamplerMap.value=r.texture,e.transmissionSamplerSize.value.set(r.width,r.height),t.transmissionMap&&(e.transmissionMap.value=t.transmissionMap,n(t.transmissionMap,e.transmissionMapTransform)),e.thickness.value=t.thickness,t.thicknessMap&&(e.thicknessMap.value=t.thicknessMap,n(t.thicknessMap,e.thicknessMapTransform)),e.attenuationDistance.value=t.attenuationDistance,e.attenuationColor.value.copy(t.attenuationColor)),t.anisotropy>0&&(e.anisotropyVector.value.set(t.anisotropy*Math.cos(t.anisotropyRotation),t.anisotropy*Math.sin(t.anisotropyRotation)),t.anisotropyMap&&(e.anisotropyMap.value=t.anisotropyMap,n(t.anisotropyMap,e.anisotropyMapTransform))),e.specularIntensity.value=t.specularIntensity,e.specularColor.value.copy(t.specularColor),t.specularColorMap&&(e.specularColorMap.value=t.specularColorMap,n(t.specularColorMap,e.specularColorMapTransform)),t.specularIntensityMap&&(e.specularIntensityMap.value=t.specularIntensityMap,n(t.specularIntensityMap,e.specularIntensityMapTransform))}function m(e,t){t.matcap&&(e.matcap.value=t.matcap)}function h(e,n){let r=t.get(n).light;e.referencePosition.value.setFromMatrixPosition(r.matrixWorld),e.nearDistance.value=r.shadow.camera.near,e.farDistance.value=r.shadow.camera.far}return{refreshFogUniforms:r,refreshMaterialUniforms:i}}function RO(e,t,n,r){let i={},a={},o=[],s=e.getParameter(e.MAX_UNIFORM_BUFFER_BINDINGS);function c(e,t){let n=t.program;r.uniformBlockBinding(e,n)}function l(e,n){let o=i[e.id];o===void 0&&(m(e),o=u(e),i[e.id]=o,e.addEventListener(`dispose`,g));let s=n.program;r.updateUBOMapping(e,s);let c=t.render.frame;a[e.id]!==c&&(f(e),a[e.id]=c)}function u(t){let n=d();t.__bindingPointIndex=n;let r=e.createBuffer(),i=t.__size,a=t.usage;return e.bindBuffer(e.UNIFORM_BUFFER,r),e.bufferData(e.UNIFORM_BUFFER,i,a),e.bindBuffer(e.UNIFORM_BUFFER,null),e.bindBufferBase(e.UNIFORM_BUFFER,n,r),r}function d(){for(let e=0;e0&&(n+=r-i),e.__size=n,e.__cache={},this}function h(e){let t={boundary:0,storage:0};return typeof e==`number`||typeof e==`boolean`?(t.boundary=4,t.storage=4):e.isVector2?(t.boundary=8,t.storage=8):e.isVector3||e.isColor?(t.boundary=16,t.storage=12):e.isVector4?(t.boundary=16,t.storage=16):e.isMatrix3?(t.boundary=48,t.storage=48):e.isMatrix4?(t.boundary=64,t.storage=64):e.isTexture?console.warn(`THREE.WebGLRenderer: Texture samplers can not be part of an uniforms group.`):console.warn(`THREE.WebGLRenderer: Unsupported uniform value type.`,e),t}function g(t){let n=t.target;n.removeEventListener(`dispose`,g);let r=o.indexOf(n.__bindingPointIndex);o.splice(r,1),e.deleteBuffer(i[n.id]),delete i[n.id],delete a[n.id]}function _(){for(let t in i)e.deleteBuffer(i[t]);o=[],i={},a={}}return{bind:c,update:l,dispose:_}}var zO=class{constructor(e={}){let{canvas:t=tp(),context:n=null,depth:r=!0,stencil:i=!1,alpha:a=!1,antialias:o=!1,premultipliedAlpha:s=!0,preserveDrawingBuffer:c=!1,powerPreference:l=`default`,failIfMajorPerformanceCaveat:u=!1,reverseDepthBuffer:d=!1}=e;this.isWebGLRenderer=!0;let f;if(n!==null){if(typeof WebGLRenderingContext<`u`&&n instanceof WebGLRenderingContext)throw Error(`THREE.WebGLRenderer: WebGL 1 is not supported since r163.`);f=n.getContextAttributes().alpha}else f=a;let p=new Uint32Array(4),m=new Int32Array(4),h=null,g=null,_=[],v=[];this.domElement=t,this.debug={checkShaderErrors:!0,onShaderError:null},this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this.toneMapping=kl,this.toneMappingExposure=1,this.transmissionResolutionScale=1;let y=this,b=!1;this._outputColorSpace=Ed;let x=0,S=0,C=null,w=-1,T=null,E=new xp,D=new xp,O=null,k=new K(0),A=0,j=t.width,M=t.height,N=1,ee=null,te=null,P=new xp(0,0,j,M),ne=new xp(0,0,j,M),re=!1,ie=new i_,ae=!1,oe=!1,se=new G,ce=new G,le=new W,ue=new xp,de={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0},fe=!1;function pe(){return C===null?N:1}let F=n;function me(e,n){return t.getContext(e,n)}try{let e={alpha:!0,depth:r,stencil:i,antialias:o,premultipliedAlpha:s,preserveDrawingBuffer:c,powerPreference:l,failIfMajorPerformanceCaveat:u};if(`setAttribute`in t&&t.setAttribute(`data-engine`,`three.js r${Mc}`),t.addEventListener(`webglcontextlost`,ze,!1),t.addEventListener(`webglcontextrestored`,Be,!1),t.addEventListener(`webglcontextcreationerror`,Ve,!1),F===null){let t=`webgl2`;if(F=me(t,e),F===null)throw me(t)?Error(`Error creating WebGL context with your selected attributes.`):Error(`Error creating WebGL context.`)}}catch(e){throw console.error(`THREE.WebGLRenderer: `+e.message),e}let he,ge,I,_e,L,ve,ye,be,xe,Se,Ce,we,Te,Ee,De,Oe,ke,Ae,je,Me,Ne,Pe,Fe,Ie;function Le(){he=new vE(F),he.init(),Pe=new AO(F,he),ge=new qT(F,he,e,Pe),I=new OO(F,he),ge.reverseDepthBuffer&&d&&I.buffers.depth.setReversed(!0),_e=new xE(F),L=new fO,ve=new kO(F,he,I,L,ge,Pe,_e),ye=new YT(y),be=new _E(y),xe=new aC(F),Fe=new GT(F,xe),Se=new yE(F,xe,_e,Fe),Ce=new CE(F,Se,xe,_e),je=new SE(F,ge,ve),Oe=new JT(L),we=new dO(y,ye,be,he,ge,Fe,Oe),Te=new LO(y,L),Ee=new gO,De=new CO(he),Ae=new WT(y,ye,be,I,Ce,f,s),ke=new EO(y,Ce,ge),Ie=new RO(F,_e,ge,I),Me=new KT(F,he,_e),Ne=new bE(F,he,_e),_e.programs=we.programs,y.capabilities=ge,y.extensions=he,y.properties=L,y.renderLists=Ee,y.shadowMap=ke,y.state=I,y.info=_e}Le();let Re=new PO(y,F);this.xr=Re,this.getContext=function(){return F},this.getContextAttributes=function(){return F.getContextAttributes()},this.forceContextLoss=function(){let e=he.get(`WEBGL_lose_context`);e&&e.loseContext()},this.forceContextRestore=function(){let e=he.get(`WEBGL_lose_context`);e&&e.restoreContext()},this.getPixelRatio=function(){return N},this.setPixelRatio=function(e){e!==void 0&&(N=e,this.setSize(j,M,!1))},this.getSize=function(e){return e.set(j,M)},this.setSize=function(e,n,r=!0){if(Re.isPresenting){console.warn(`THREE.WebGLRenderer: Can't change size while VR device is presenting.`);return}j=e,M=n,t.width=Math.floor(e*N),t.height=Math.floor(n*N),r===!0&&(t.style.width=e+`px`,t.style.height=n+`px`),this.setViewport(0,0,e,n)},this.getDrawingBufferSize=function(e){return e.set(j*N,M*N).floor()},this.setDrawingBufferSize=function(e,n,r){j=e,M=n,N=r,t.width=Math.floor(e*r),t.height=Math.floor(n*r),this.setViewport(0,0,e,n)},this.getCurrentViewport=function(e){return e.copy(E)},this.getViewport=function(e){return e.copy(P)},this.setViewport=function(e,t,n,r){e.isVector4?P.set(e.x,e.y,e.z,e.w):P.set(e,t,n,r),I.viewport(E.copy(P).multiplyScalar(N).round())},this.getScissor=function(e){return e.copy(ne)},this.setScissor=function(e,t,n,r){e.isVector4?ne.set(e.x,e.y,e.z,e.w):ne.set(e,t,n,r),I.scissor(D.copy(ne).multiplyScalar(N).round())},this.getScissorTest=function(){return re},this.setScissorTest=function(e){I.setScissorTest(re=e)},this.setOpaqueSort=function(e){ee=e},this.setTransparentSort=function(e){te=e},this.getClearColor=function(e){return e.copy(Ae.getClearColor())},this.setClearColor=function(){Ae.setClearColor(...arguments)},this.getClearAlpha=function(){return Ae.getClearAlpha()},this.setClearAlpha=function(){Ae.setClearAlpha(...arguments)},this.clear=function(e=!0,t=!0,n=!0){let r=0;if(e){let e=!1;if(C!==null){let t=C.texture.format;e=t===Eu||t===wu||t===Su}if(e){let e=C.texture.type,t=e===iu||e===lu||e===su||e===mu||e===fu||e===pu,n=Ae.getClearColor(),r=Ae.getClearAlpha(),i=n.r,a=n.g,o=n.b;t?(p[0]=i,p[1]=a,p[2]=o,p[3]=r,F.clearBufferuiv(F.COLOR,0,p)):(m[0]=i,m[1]=a,m[2]=o,m[3]=r,F.clearBufferiv(F.COLOR,0,m))}else r|=F.COLOR_BUFFER_BIT}t&&(r|=F.DEPTH_BUFFER_BIT),n&&(r|=F.STENCIL_BUFFER_BIT,this.state.buffers.stencil.setMask(4294967295)),F.clear(r)},this.clearColor=function(){this.clear(!0,!1,!1)},this.clearDepth=function(){this.clear(!1,!0,!1)},this.clearStencil=function(){this.clear(!1,!1,!0)},this.dispose=function(){t.removeEventListener(`webglcontextlost`,ze,!1),t.removeEventListener(`webglcontextrestored`,Be,!1),t.removeEventListener(`webglcontextcreationerror`,Ve,!1),Ae.dispose(),Ee.dispose(),De.dispose(),L.dispose(),ye.dispose(),be.dispose(),Ce.dispose(),Fe.dispose(),Ie.dispose(),we.dispose(),Re.dispose(),Re.removeEventListener(`sessionstart`,Je),Re.removeEventListener(`sessionend`,Ye),Xe.stop()};function ze(e){e.preventDefault(),console.log(`THREE.WebGLRenderer: Context Lost.`),b=!0}function Be(){console.log(`THREE.WebGLRenderer: Context Restored.`),b=!1;let e=_e.autoReset,t=ke.enabled,n=ke.autoUpdate,r=ke.needsUpdate,i=ke.type;Le(),_e.autoReset=e,ke.enabled=t,ke.autoUpdate=n,ke.needsUpdate=r,ke.type=i}function Ve(e){console.error(`THREE.WebGLRenderer: A WebGL context could not be created. Reason: `,e.statusMessage)}function He(e){let t=e.target;t.removeEventListener(`dispose`,He),Ue(t)}function Ue(e){We(e),L.remove(e)}function We(e){let t=L.get(e).programs;t!==void 0&&(t.forEach(function(e){we.releaseProgram(e)}),e.isShaderMaterial&&we.releaseShaderCache(e))}this.renderBufferDirect=function(e,t,n,r,i,a){t===null&&(t=de);let o=i.isMesh&&i.matrixWorld.determinant()<0,s=at(e,t,n,r,i);I.setMaterial(r,o);let c=n.index,l=1;if(r.wireframe===!0){if(c=Se.getWireframeAttribute(n),c===void 0)return;l=2}let u=n.drawRange,d=n.attributes.position,f=u.start*l,p=(u.start+u.count)*l;a!==null&&(f=Math.max(f,a.start*l),p=Math.min(p,(a.start+a.count)*l)),c===null?d!=null&&(f=Math.max(f,0),p=Math.min(p,d.count)):(f=Math.max(f,0),p=Math.min(p,c.count));let m=p-f;if(m<0||m===1/0)return;Fe.setup(i,r,s,n,c);let h,g=Me;if(c!==null&&(h=xe.get(c),g=Ne,g.setIndex(h)),i.isMesh)r.wireframe===!0?(I.setLineWidth(r.wireframeLinewidth*pe()),g.setMode(F.LINES)):g.setMode(F.TRIANGLES);else if(i.isLine){let e=r.linewidth;e===void 0&&(e=1),I.setLineWidth(e*pe()),i.isLineSegments?g.setMode(F.LINES):i.isLineLoop?g.setMode(F.LINE_LOOP):g.setMode(F.LINE_STRIP)}else i.isPoints?g.setMode(F.POINTS):i.isSprite&&g.setMode(F.TRIANGLES);if(i.isBatchedMesh)if(i._multiDrawInstances!==null)rp(`THREE.WebGLRenderer: renderMultiDrawInstances has been deprecated and will be removed in r184. Append to renderMultiDraw arguments and use indirection.`),g.renderMultiDrawInstances(i._multiDrawStarts,i._multiDrawCounts,i._multiDrawCount,i._multiDrawInstances);else if(he.get(`WEBGL_multi_draw`))g.renderMultiDraw(i._multiDrawStarts,i._multiDrawCounts,i._multiDrawCount);else{let e=i._multiDrawStarts,t=i._multiDrawCounts,n=i._multiDrawCount,a=c?xe.get(c).bytesPerElement:1,o=L.get(r).currentProgram.getUniforms();for(let r=0;r{function n(){if(r.forEach(function(e){let t=L.get(e),n=t.currentProgram;n.isReady()&&r.delete(e)}),r.size===0){t(e);return}setTimeout(n,10)}he.get(`KHR_parallel_shader_compile`)===null?setTimeout(n,10):n()})};let Ke=null;function qe(e){Ke&&Ke(e)}function Je(){Xe.stop()}function Ye(){Xe.start()}let Xe=new iC;Xe.setAnimationLoop(qe),typeof self<`u`&&Xe.setContext(self),this.setAnimationLoop=function(e){Ke=e,Re.setAnimationLoop(e),e===null?Xe.stop():Xe.start()},Re.addEventListener(`sessionstart`,Je),Re.addEventListener(`sessionend`,Ye),this.render=function(e,t){if(t!==void 0&&t.isCamera!==!0){console.error(`THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.`);return}if(b===!0)return;if(e.matrixWorldAutoUpdate===!0&&e.updateMatrixWorld(),t.parent===null&&t.matrixWorldAutoUpdate===!0&&t.updateMatrixWorld(),Re.enabled===!0&&Re.isPresenting===!0&&(Re.cameraAutoUpdate===!0&&Re.updateCamera(t),t=Re.getCamera()),e.isScene===!0&&e.onBeforeRender(y,e,t,C),g=De.get(e,v.length),g.init(t),v.push(g),ce.multiplyMatrices(t.projectionMatrix,t.matrixWorldInverse),ie.setFromProjectionMatrix(ce),oe=this.localClippingEnabled,ae=Oe.init(this.clippingPlanes,oe),h=Ee.get(e,_.length),h.init(),_.push(h),Re.enabled===!0&&Re.isPresenting===!0){let e=y.xr.getDepthSensingMesh();e!==null&&Ze(e,t,-1/0,y.sortObjects)}Ze(e,t,0,y.sortObjects),h.finish(),y.sortObjects===!0&&h.sort(ee,te),fe=Re.enabled===!1||Re.isPresenting===!1||Re.hasDepthSensing()===!1,fe&&Ae.addToRenderList(h,e),this.info.render.frame++,ae===!0&&Oe.beginShadows();let n=g.state.shadowsArray;ke.render(n,e,t),ae===!0&&Oe.endShadows(),this.info.autoReset===!0&&this.info.reset();let r=h.opaque,i=h.transmissive;if(g.setupLights(),t.isArrayCamera){let n=t.cameras;if(i.length>0)for(let t=0,a=n.length;t0&&$e(r,i,e,t),fe&&Ae.render(e),Qe(h,e,t);C!==null&&S===0&&(ve.updateMultisampleRenderTarget(C),ve.updateRenderTargetMipmap(C)),e.isScene===!0&&e.onAfterRender(y,e,t),Fe.resetDefaultState(),w=-1,T=null,v.pop(),v.length>0?(g=v[v.length-1],ae===!0&&Oe.setGlobalState(y.clippingPlanes,g.state.camera)):g=null,_.pop(),h=_.length>0?_[_.length-1]:null};function Ze(e,t,n,r){if(e.visible===!1)return;let i=e.layers.test(t.layers);if(i){if(e.isGroup)n=e.renderOrder;else if(e.isLOD)e.autoUpdate===!0&&e.update(t);else if(e.isLight)g.pushLight(e),e.castShadow&&g.pushShadow(e);else if(e.isSprite){if(!e.frustumCulled||ie.intersectsSprite(e)){r&&ue.setFromMatrixPosition(e.matrixWorld).applyMatrix4(ce);let t=Ce.update(e),i=e.material;i.visible&&h.push(e,t,i,n,ue.z,null)}}else if((e.isMesh||e.isLine||e.isPoints)&&(!e.frustumCulled||ie.intersectsObject(e))){let t=Ce.update(e),i=e.material;if(r&&(e.boundingSphere===void 0?(t.boundingSphere===null&&t.computeBoundingSphere(),ue.copy(t.boundingSphere.center)):(e.boundingSphere===null&&e.computeBoundingSphere(),ue.copy(e.boundingSphere.center)),ue.applyMatrix4(e.matrixWorld).applyMatrix4(ce)),Array.isArray(i)){let r=t.groups;for(let a=0,o=r.length;a0&&et(i,t,n),a.length>0&&et(a,t,n),o.length>0&&et(o,t,n),I.buffers.depth.setTest(!0),I.buffers.depth.setMask(!0),I.buffers.color.setMask(!0),I.setPolygonOffset(!1)}function $e(e,t,n,r){let a=n.isScene===!0?n.overrideMaterial:null;if(a!==null)return;g.state.transmissionRenderTarget[r.id]===void 0&&(g.state.transmissionRenderTarget[r.id]=new Cp(1,1,{generateMipmaps:!0,type:he.has(`EXT_color_buffer_half_float`)||he.has(`EXT_color_buffer_float`)?du:iu,minFilter:nu,samples:4,stencilBuffer:i,resolveDepthBuffer:!1,resolveStencilBuffer:!1,colorSpace:up.workingColorSpace}));let o=g.state.transmissionRenderTarget[r.id],s=r.viewport||E;o.setSize(s.z*y.transmissionResolutionScale,s.w*y.transmissionResolutionScale);let c=y.getRenderTarget();y.setRenderTarget(o),y.getClearColor(k),A=y.getClearAlpha(),A<1&&y.setClearColor(16777215,.5),y.clear(),fe&&Ae.render(n);let l=y.toneMapping;y.toneMapping=kl;let u=r.viewport;if(r.viewport!==void 0&&(r.viewport=void 0),g.setupLightsView(r),ae===!0&&Oe.setGlobalState(y.clippingPlanes,r),et(e,n,r),ve.updateMultisampleRenderTarget(o),ve.updateRenderTargetMipmap(o),he.has(`WEBGL_multisampled_render_to_texture`)===!1){let e=!1;for(let i=0,a=t.length;i0),d=!!n.morphAttributes.position,f=!!n.morphAttributes.normal,p=!!n.morphAttributes.color,m=kl;r.toneMapped&&(C===null||C.isXRRenderTarget===!0)&&(m=y.toneMapping);let h=n.morphAttributes.position||n.morphAttributes.normal||n.morphAttributes.color,_=h===void 0?0:h.length,v=L.get(r),b=g.state.lights;if(ae===!0&&(oe===!0||e!==T)){let t=e===T&&r.id===w;Oe.setState(r,e,t)}let x=!1;r.version===v.__version?v.needsLights&&v.lightsStateVersion!==b.state.version?x=!0:v.outputColorSpace===s?i.isBatchedMesh&&v.batching===!1||!i.isBatchedMesh&&v.batching===!0||i.isBatchedMesh&&v.batchingColor===!0&&i.colorTexture===null||i.isBatchedMesh&&v.batchingColor===!1&&i.colorTexture!==null||i.isInstancedMesh&&v.instancing===!1||!i.isInstancedMesh&&v.instancing===!0||i.isSkinnedMesh&&v.skinning===!1||!i.isSkinnedMesh&&v.skinning===!0||i.isInstancedMesh&&v.instancingColor===!0&&i.instanceColor===null||i.isInstancedMesh&&v.instancingColor===!1&&i.instanceColor!==null||i.isInstancedMesh&&v.instancingMorph===!0&&i.morphTexture===null||i.isInstancedMesh&&v.instancingMorph===!1&&i.morphTexture!==null?x=!0:v.envMap===c?r.fog===!0&&v.fog!==a||v.numClippingPlanes!==void 0&&(v.numClippingPlanes!==Oe.numPlanes||v.numIntersection!==Oe.numIntersection)?x=!0:v.vertexAlphas===l&&v.vertexTangents===u&&v.morphTargets===d&&v.morphNormals===f&&v.morphColors===p&&v.toneMapping===m?v.morphTargetsCount!==_&&(x=!0):x=!0:x=!0:x=!0:(x=!0,v.__version=r.version);let S=v.currentProgram;x===!0&&(S=nt(r,t,i));let E=!1,D=!1,O=!1,k=S.getUniforms(),A=v.uniforms;if(I.useProgram(S.program)&&(E=!0,D=!0,O=!0),r.id!==w&&(w=r.id,D=!0),E||T!==e){let t=I.buffers.depth.getReversed();t?(se.copy(e.projectionMatrix),ap(se),op(se),k.setValue(F,`projectionMatrix`,se)):k.setValue(F,`projectionMatrix`,e.projectionMatrix),k.setValue(F,`viewMatrix`,e.matrixWorldInverse);let n=k.map.cameraPosition;n!==void 0&&n.setValue(F,le.setFromMatrixPosition(e.matrixWorld)),ge.logarithmicDepthBuffer&&k.setValue(F,`logDepthBufFC`,2/(Math.log(e.far+1)/Math.LN2)),(r.isMeshPhongMaterial||r.isMeshToonMaterial||r.isMeshLambertMaterial||r.isMeshBasicMaterial||r.isMeshStandardMaterial||r.isShaderMaterial)&&k.setValue(F,`isOrthographic`,e.isOrthographicCamera===!0),T!==e&&(T=e,D=!0,O=!0)}if(i.isSkinnedMesh){k.setOptional(F,i,`bindMatrix`),k.setOptional(F,i,`bindMatrixInverse`);let e=i.skeleton;e&&(e.boneTexture===null&&e.computeBoneTexture(),k.setValue(F,`boneTexture`,e.boneTexture,ve))}i.isBatchedMesh&&(k.setOptional(F,i,`batchingTexture`),k.setValue(F,`batchingTexture`,i._matricesTexture,ve),k.setOptional(F,i,`batchingIdTexture`),k.setValue(F,`batchingIdTexture`,i._indirectTexture,ve),k.setOptional(F,i,`batchingColorTexture`),i._colorsTexture!==null&&k.setValue(F,`batchingColorTexture`,i._colorsTexture,ve));let j=n.morphAttributes;if((j.position!==void 0||j.normal!==void 0||j.color!==void 0)&&je.update(i,n,S),(D||v.receiveShadow!==i.receiveShadow)&&(v.receiveShadow=i.receiveShadow,k.setValue(F,`receiveShadow`,i.receiveShadow)),r.isMeshGouraudMaterial&&r.envMap!==null&&(A.envMap.value=c,A.flipEnvMap.value=c.isCubeTexture&&c.isRenderTargetTexture===!1?-1:1),r.isMeshStandardMaterial&&r.envMap===null&&t.environment!==null&&(A.envMapIntensity.value=t.environmentIntensity),D&&(k.setValue(F,`toneMappingExposure`,y.toneMappingExposure),v.needsLights&&ot(A,O),a&&r.fog===!0&&Te.refreshFogUniforms(A,a),Te.refreshMaterialUniforms(A,r,N,M,g.state.transmissionRenderTarget[e.id]),AD.upload(F,rt(v),A,ve)),r.isShaderMaterial&&r.uniformsNeedUpdate===!0&&(AD.upload(F,rt(v),A,ve),r.uniformsNeedUpdate=!1),r.isSpriteMaterial&&k.setValue(F,`center`,i.center),k.setValue(F,`modelViewMatrix`,i.modelViewMatrix),k.setValue(F,`normalMatrix`,i.normalMatrix),k.setValue(F,`modelMatrix`,i.matrixWorld),r.isShaderMaterial||r.isRawShaderMaterial){let e=r.uniformsGroups;for(let t=0,n=e.length;t0&&ve.useMultisampledRTT(e)===!1?L.get(e).__webglMultisampledFramebuffer:Array.isArray(l)?l[n]:l,E.copy(e.viewport),D.copy(e.scissor),O=e.scissorTest}else E.copy(P).multiplyScalar(N).floor(),D.copy(ne).multiplyScalar(N).floor(),O=re;n!==0&&(i=ct);let s=I.bindFramebuffer(F.FRAMEBUFFER,i);if(s&&r&&I.drawBuffers(e,i),I.viewport(E),I.scissor(D),I.setScissorTest(O),a){let r=L.get(e.texture);F.framebufferTexture2D(F.FRAMEBUFFER,F.COLOR_ATTACHMENT0,F.TEXTURE_CUBE_MAP_POSITIVE_X+t,r.__webglTexture,n)}else if(o){let r=L.get(e.texture),i=t;F.framebufferTextureLayer(F.FRAMEBUFFER,F.COLOR_ATTACHMENT0,r.__webglTexture,n,i)}else if(e!==null&&n!==0){let t=L.get(e.texture);F.framebufferTexture2D(F.FRAMEBUFFER,F.COLOR_ATTACHMENT0,F.TEXTURE_2D,t.__webglTexture,n)}w=-1},this.readRenderTargetPixels=function(e,t,n,r,i,a,o,s=0){if(!(e&&e.isWebGLRenderTarget)){console.error(`THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.`);return}let c=L.get(e).__webglFramebuffer;if(e.isWebGLCubeRenderTarget&&o!==void 0&&(c=c[o]),c){I.bindFramebuffer(F.FRAMEBUFFER,c);try{let o=e.textures[s],c=o.format,l=o.type;if(!ge.textureFormatReadable(c)){console.error(`THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.`);return}if(!ge.textureTypeReadable(l)){console.error(`THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.`);return}t>=0&&t<=e.width-r&&n>=0&&n<=e.height-i&&(e.textures.length>1&&F.readBuffer(F.COLOR_ATTACHMENT0+s),F.readPixels(t,n,r,i,Pe.convert(c),Pe.convert(l),a))}finally{let e=C===null?null:L.get(C).__webglFramebuffer;I.bindFramebuffer(F.FRAMEBUFFER,e)}}},this.readRenderTargetPixelsAsync=async function(e,t,n,r,i,a,o,s=0){if(!(e&&e.isWebGLRenderTarget))throw Error(`THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.`);let c=L.get(e).__webglFramebuffer;if(e.isWebGLCubeRenderTarget&&o!==void 0&&(c=c[o]),c)if(t>=0&&t<=e.width-r&&n>=0&&n<=e.height-i){I.bindFramebuffer(F.FRAMEBUFFER,c);let o=e.textures[s],l=o.format,u=o.type;if(!ge.textureFormatReadable(l))throw Error(`THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in RGBA or implementation defined format.`);if(!ge.textureTypeReadable(u))throw Error(`THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in UnsignedByteType or implementation defined type.`);let d=F.createBuffer();F.bindBuffer(F.PIXEL_PACK_BUFFER,d),F.bufferData(F.PIXEL_PACK_BUFFER,a.byteLength,F.STREAM_READ),e.textures.length>1&&F.readBuffer(F.COLOR_ATTACHMENT0+s),F.readPixels(t,n,r,i,Pe.convert(l),Pe.convert(u),0);let f=C===null?null:L.get(C).__webglFramebuffer;I.bindFramebuffer(F.FRAMEBUFFER,f);let p=F.fenceSync(F.SYNC_GPU_COMMANDS_COMPLETE,0);return F.flush(),await ip(F,p,4),F.bindBuffer(F.PIXEL_PACK_BUFFER,d),F.getBufferSubData(F.PIXEL_PACK_BUFFER,0,a),F.deleteBuffer(d),F.deleteSync(p),a}else throw Error(`THREE.WebGLRenderer.readRenderTargetPixelsAsync: requested read bounds are out of range.`)},this.copyFramebufferToTexture=function(e,t=null,n=0){let r=2**-n,i=Math.floor(e.image.width*r),a=Math.floor(e.image.height*r),o=t===null?0:t.x,s=t===null?0:t.y;ve.setTexture2D(e,0),F.copyTexSubImage2D(F.TEXTURE_2D,n,0,0,o,s,i,a),I.unbindTexture()};let lt=F.createFramebuffer(),ut=F.createFramebuffer();this.copyTextureToTexture=function(e,t,n=null,r=null,i=0,a=null){a===null&&(i===0?a=0:(rp(`WebGLRenderer: copyTextureToTexture function signature has changed to support src and dst mipmap levels.`),a=i,i=0));let o,s,c,l,u,d,f,p,m,h=e.isCompressedTexture?e.mipmaps[a]:e.image;if(n!==null)o=n.max.x-n.min.x,s=n.max.y-n.min.y,c=n.isBox3?n.max.z-n.min.z:1,l=n.min.x,u=n.min.y,d=n.isBox3?n.min.z:0;else{let t=2**-i;o=Math.floor(h.width*t),s=Math.floor(h.height*t),c=e.isDataArrayTexture?h.depth:e.isData3DTexture?Math.floor(h.depth*t):1,l=0,u=0,d=0}r===null?(f=0,p=0,m=0):(f=r.x,p=r.y,m=r.z);let g=Pe.convert(t.format),_=Pe.convert(t.type),v;t.isData3DTexture?(ve.setTexture3D(t,0),v=F.TEXTURE_3D):t.isDataArrayTexture||t.isCompressedArrayTexture?(ve.setTexture2DArray(t,0),v=F.TEXTURE_2D_ARRAY):(ve.setTexture2D(t,0),v=F.TEXTURE_2D),F.pixelStorei(F.UNPACK_FLIP_Y_WEBGL,t.flipY),F.pixelStorei(F.UNPACK_PREMULTIPLY_ALPHA_WEBGL,t.premultiplyAlpha),F.pixelStorei(F.UNPACK_ALIGNMENT,t.unpackAlignment);let y=F.getParameter(F.UNPACK_ROW_LENGTH),b=F.getParameter(F.UNPACK_IMAGE_HEIGHT),x=F.getParameter(F.UNPACK_SKIP_PIXELS),S=F.getParameter(F.UNPACK_SKIP_ROWS),C=F.getParameter(F.UNPACK_SKIP_IMAGES);F.pixelStorei(F.UNPACK_ROW_LENGTH,h.width),F.pixelStorei(F.UNPACK_IMAGE_HEIGHT,h.height),F.pixelStorei(F.UNPACK_SKIP_PIXELS,l),F.pixelStorei(F.UNPACK_SKIP_ROWS,u),F.pixelStorei(F.UNPACK_SKIP_IMAGES,d);let w=e.isDataArrayTexture||e.isData3DTexture,T=t.isDataArrayTexture||t.isData3DTexture;if(e.isDepthTexture){let n=L.get(e),r=L.get(t),h=L.get(n.__renderTarget),g=L.get(r.__renderTarget);I.bindFramebuffer(F.READ_FRAMEBUFFER,h.__webglFramebuffer),I.bindFramebuffer(F.DRAW_FRAMEBUFFER,g.__webglFramebuffer);for(let n=0;n{e.delete(t)},n=()=>{e.clear()},r=n=>{e.add(n);let r=()=>t(n);return BO(r),{off:r}},i=(...t)=>Promise.all(Array.from(e).map(e=>e(...t)));return{on:r,off:t,trigger:i,clear:n}}const HO=new WeakMap,UO=(...e)=>{var t;let n=e[0],r=(t=Ao())?.proxy;if(r==null&&!Qi())throw Error(`injectLocal must be called in setup`);return r&&HO.has(r)&&n in HO.get(r)?HO.get(r)[n]:Zi(...e)},WO=typeof window<`u`&&typeof document<`u`,GO=typeof WorkerGlobalScope<`u`&&globalThis instanceof WorkerGlobalScope,KO=e=>e!==void 0,qO=e=>e!=null,JO=Object.prototype.toString,YO=e=>JO.call(e)===`[object Object]`,XO=()=>{};function ZO(e,t){function n(...n){return new Promise((r,i)=>{Promise.resolve(e(()=>t.apply(this,n),{fn:t,thisArg:this,args:n})).then(r).catch(i)})}return n}function QO(e,t={}){let n,r,i=XO,a=e=>{clearTimeout(e),i(),i=XO},o,s=s=>{let c=B(e),l=B(t.maxWait);return n&&a(n),c<=0||l!==void 0&&l<=0?(r&&(a(r),r=null),Promise.resolve(s())):new Promise((e,u)=>{i=t.rejectOnCancel?u:e,o=s,l&&!r&&(r=setTimeout(()=>{n&&a(n),r=null,e(o())},l)),n=setTimeout(()=>{r&&a(r),r=null,e(s())},c)})};return s}function $O(e){let t=Object.create(null);return n=>{let r=t[n];return r||(t[n]=e(n))}}const ek=/\B([A-Z])/g,tk=$O(e=>e.replace(ek,`-$1`).toLowerCase()),nk=/-(\w)/g,rk=$O(e=>e.replace(nk,(e,t)=>t?t.toUpperCase():``));function ik(e){return e.endsWith(`rem`)?Number.parseFloat(e)*16:Number.parseFloat(e)}function ak(e,t,n=!1){return t.reduce((t,r)=>(r in e&&(!n||e[r]!==void 0)&&(t[r]=e[r]),t),{})}function ok(e){return e||Ao()}function sk(e){return Array.isArray(e)?e:[e]}function ck(e,t=200,n={}){return ZO(QO(t,n),e)}function lk(e,t=200,n={}){let r=R(e.value),i=ck(()=>{r.value=e.value},t,n);return V(e,()=>i()),r}function uk(e,t={}){if(!pn(e))return Sn(e);let n=Array.isArray(e.value)?Array.from({length:e.value.length}):{};for(let r in e.value)n[r]=xn(()=>({get(){return e.value[r]},set(n){var i;let a=(i=B(t.replaceRef))??!0;if(a)if(Array.isArray(e.value)){let t=[...e.value];t[r]=n,e.value=t}else{let t={...e.value,[r]:n};Object.setPrototypeOf(t,Object.getPrototypeOf(e.value)),e.value=t}else e.value[r]=n}}));return n}const dk=B;function fk(e,t=!0,n){let r=ok();r?$r(e,n):t?e():Kn(e)}function pk(e,t=1e3,n={}){let{immediate:r=!0,immediateCallback:i=!1}=n,a=null,o=z(!1);function s(){a&&(clearInterval(a),a=null)}function c(){o.value=!1,s()}function l(){let n=B(t);n<=0||(o.value=!0,i&&e(),s(),o.value&&(a=setInterval(e,n)))}if(r&&WO&&l(),pn(t)||typeof t==`function`){let e=V(t,()=>{o.value&&WO&&l()});BO(e)}return BO(c),{isActive:o,pause:c,resume:l}}function mk(e,t,n){return V(e,t,{...n,immediate:!0})}const hk=WO?window:void 0,gk=WO?window.document:void 0,_k=WO?window.navigator:void 0,vk=WO?window.location:void 0;function yk(e){var t;let n=B(e);return(t=n?.$el)??n}function bk(...e){let t=[],n=()=>{t.forEach(e=>e()),t.length=0},r=(e,t,n,r)=>(e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)),i=H(()=>{let t=sk(B(e[0])).filter(e=>e!=null);return t.every(e=>typeof e!=`string`)?t:void 0}),a=mk(()=>{var t,n;return[(n=(t=i.value)?.map(e=>yk(e)))??[hk].filter(e=>e!=null),sk(B(i.value?e[1]:e[0])),sk(_n(i.value?e[2]:e[1])),B(i.value?e[3]:e[2])]},([e,i,a,o])=>{if(n(),!e?.length||!i?.length||!a?.length)return;let s=YO(o)?{...o}:o;t.push(...e.flatMap(e=>i.flatMap(t=>a.map(n=>r(e,t,n,s)))))},{flush:`post`}),o=()=>{a(),n()};return BO(n),o}function xk(){let e=z(!1),t=Ao();return t&&$r(()=>{e.value=!0},t),e}function Sk(e){let t=xk();return H(()=>(t.value,!!e()))}function Ck(e,t,n={}){let{window:r=hk,...i}=n,a,o=Sk(()=>r&&`MutationObserver`in r),s=()=>{a&&(a.disconnect(),a=void 0)},c=H(()=>{let t=B(e),n=sk(t).map(yk).filter(qO);return new Set(n)}),l=V(()=>c.value,e=>{s(),o.value&&e.size&&(a=new MutationObserver(t),e.forEach(e=>a.observe(e,i)))},{immediate:!0,flush:`post`}),u=()=>a?.takeRecords(),d=()=>{l(),s()};return BO(d),{isSupported:o,stop:d,takeRecords:u}}function wk(e,t={}){let{immediate:n=!0,fpsLimit:r=void 0,window:i=hk,once:a=!1}=t,o=z(!1),s=H(()=>r?1e3/B(r):null),c=0,l=null;function u(t){if(!o.value||!i)return;c||=t;let n=t-c;if(s.value&&nn&&`matchMedia`in n&&typeof n.matchMedia==`function`),a=z(typeof r==`number`),o=z(),s=z(!1),c=e=>{s.value=e.matches};return Aa(()=>{if(a.value){a.value=!i.value;let t=B(e).split(`,`);s.value=t.some(e=>{let t=e.includes(`not all`),n=e.match(/\(\s*min-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/),i=e.match(/\(\s*max-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/),a=!!(n||i);return n&&a&&(a=r>=ik(n[1])),i&&a&&(a=r<=ik(i[1])),t?!a:a});return}i.value&&(o.value=n.matchMedia(B(e)),s.value=o.value.matches)}),bk(o,`change`,c,{passive:!0}),H(()=>s.value)}function Ok(e){return JSON.parse(JSON.stringify(e))}function kk(e={}){let{window:t=hk}=e,n=z(1),r=Dk(()=>`(resolution: ${n.value}dppx)`,e),i=XO;return t&&(i=mk(r,()=>n.value=t.devicePixelRatio)),{pixelRatio:tn(n),stop:i}}function Ak(e,t,n={}){let{window:r=hk,...i}=n,a,o=Sk(()=>r&&`ResizeObserver`in r),s=()=>{a&&(a.disconnect(),a=void 0)},c=H(()=>{let t=B(e);return Array.isArray(t)?t.map(e=>yk(e)):[yk(t)]}),l=V(c,e=>{if(s(),o.value&&r){a=new ResizeObserver(t);for(let t of e)t&&a.observe(t,i)}},{immediate:!0,flush:`post`}),u=()=>{s(),l()};return BO(u),{isSupported:o,stop:u}}function jk(e,t={}){let{reset:n=!0,windowResize:r=!0,windowScroll:i=!0,immediate:a=!0,updateTiming:o=`sync`}=t,s=z(0),c=z(0),l=z(0),u=z(0),d=z(0),f=z(0),p=z(0),m=z(0);function h(){let t=yk(e);if(!t){n&&(s.value=0,c.value=0,l.value=0,u.value=0,d.value=0,f.value=0,p.value=0,m.value=0);return}let r=t.getBoundingClientRect();s.value=r.height,c.value=r.bottom,l.value=r.left,u.value=r.right,d.value=r.top,f.value=r.width,p.value=r.x,m.value=r.y}function g(){o===`sync`?h():o===`next-frame`&&requestAnimationFrame(()=>h())}return Ak(e,g),V(()=>yk(e),e=>!e&&g()),Ck(e,g,{attributeFilter:[`style`,`class`]}),i&&bk(`scroll`,g,{capture:!0,passive:!0}),r&&bk(`resize`,g,{passive:!0}),fk(()=>{a&&g()}),{height:s,bottom:c,left:l,right:u,top:d,width:f,x:p,y:m,update:g}}function Mk(e,t={width:0,height:0},n={}){let{window:r=hk,box:i=`content-box`}=n,a=H(()=>{var t,n;return(n=(t=yk(e))?.namespaceURI)?.includes(`svg`)}),o=z(t.width),s=z(t.height),{stop:c}=Ak(e,([t])=>{let n=i===`border-box`?t.borderBoxSize:i===`content-box`?t.contentBoxSize:t.devicePixelContentBoxSize;if(r&&a.value){let t=yk(e);if(t){let e=t.getBoundingClientRect();o.value=e.width,s.value=e.height}}else if(n){let e=sk(n);o.value=e.reduce((e,{inlineSize:t})=>e+t,0),s.value=e.reduce((e,{blockSize:t})=>e+t,0)}else o.value=t.contentRect.width,s.value=t.contentRect.height},n);fk(()=>{let n=yk(e);n&&(o.value=`offsetWidth`in n?n.offsetWidth:t.width,s.value=`offsetHeight`in n?n.offsetHeight:t.height)});let l=V(()=>yk(e),e=>{o.value=e?t.width:0,s.value=e?t.height:0});function u(){c(),l()}return{width:o,height:s,stop:u}}function Nk(e){var t;let n=z(0);if(typeof performance>`u`)return n;let r=(t=e?.every)??10,i=performance.now(),a=0;return wk(()=>{if(a+=1,a>=r){let e=performance.now(),t=e-i;n.value=Math.round(1e3/(t/a)),i=e,a=0}}),n}function Pk(e={}){let t=R(),n=Sk(()=>typeof performance<`u`&&`memory`in performance);if(n.value){let{interval:n=1e3}=e;pk(()=>{t.value=performance.memory},n,{immediate:e.immediate,immediateCallback:e.immediateCallback})}return{isSupported:n,memory:t}}const Fk={x:0,y:0,pointerId:0,pressure:0,tiltX:0,tiltY:0,width:0,height:0,twist:0,pointerType:null},Ik=Object.keys(Fk);function Lk(e={}){let{target:t=hk}=e,n=z(!1),r=R(e.initialValue||{});Object.assign(r.value,Fk,r.value);let i=t=>{n.value=!0,!(e.pointerTypes&&!e.pointerTypes.includes(t.pointerType))&&(r.value=ak(t,Ik,!1))};if(t){let e={passive:!0};bk(t,[`pointerdown`,`pointermove`,`pointerup`],i,e),bk(t,`pointerleave`,()=>n.value=!1,e)}return{...uk(r),isInside:n}}const Rk=[{max:6e4,value:1e3,name:`second`},{max:276e4,value:6e4,name:`minute`},{max:72e6,value:36e5,name:`hour`},{max:5184e5,value:864e5,name:`day`},{max:24192e5,value:6048e5,name:`week`},{max:28512e6,value:2592e6,name:`month`},{max:1/0,value:31536e6,name:`year`}];function zk(e,t,n,r={}){var i,a,o;let{clone:s=!1,passive:c=!1,eventName:l,deep:u=!1,defaultValue:d,shouldEmit:f}=r,p=Ao(),m=n||p?.emit||(i=p?.$emit)?.bind(p)||(o=(a=p?.proxy)?.$emit)?.bind(p?.proxy),h=l;t||=`modelValue`,h||=`update:${t.toString()}`;let g=e=>s?typeof s==`function`?s(e):Ok(e):e,_=()=>KO(e[t])?g(e[t]):d,v=e=>{f?f(e)&&m(h,e):m(h,e)};if(c){let n=_(),r=R(n),i=!1;return V(()=>e[t],e=>{i||(i=!0,r.value=g(e),Kn(()=>i=!1))}),V(r,n=>{!i&&(n!==e[t]||u)&&v(n)},{deep:u}),r}else return H({get(){return _()},set(e){v(e)}})}function Bk(e={}){let{window:t=hk,initialWidth:n=1/0,initialHeight:r=1/0,listenOrientation:i=!0,includeScrollbar:a=!0,type:o=`inner`}=e,s=z(n),c=z(r),l=()=>{if(t)if(o===`outer`)s.value=t.outerWidth,c.value=t.outerHeight;else if(o===`visual`&&t.visualViewport){let{width:e,height:n,scale:r}=t.visualViewport;s.value=Math.round(e*r),c.value=Math.round(n*r)}else a?(s.value=t.innerWidth,c.value=t.innerHeight):(s.value=t.document.documentElement.clientWidth,c.value=t.document.documentElement.clientHeight)};l(),fk(l);let u={passive:!0};if(bk(`resize`,l,u),t&&o===`visual`&&t.visualViewport&&bk(t.visualViewport,`resize`,l,u),i){let e=Dk(`(orientation: portrait)`);V(e,()=>l())}return{width:s,height:c}}var Vk=Object.defineProperty,Hk=(e,t,n)=>t in e?Vk(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Uk=(e,t,n)=>Hk(e,typeof t==`symbol`?t:t+``,n);const Wk=`@tresjs/core`,Gk=`module`,Kk=`4.3.6`,qk=`pnpm@10.6.3`,Jk=`Declarative ThreeJS using Vue Components`,Yk=`Alvaro Saburido (https://github.com/alvarosabu/)`,Xk=`MIT`,Zk={type:`git`,url:`git+https://github.com/Tresjs/tres.git`},Qk=[`vue`,`3d`,`threejs`,`three`,`threejs-vue`],$k=!1,eA={".":{types:`./dist/index.d.ts`,import:`./dist/tres.js`,require:`./dist/tres.umd.cjs`},"./components":{types:`./dist/src/components/index.d.ts`},"./composables":{types:`./dist/src/composables/index.d.ts`},"./types":{types:`./dist/src/types/index.d.ts`},"./utils":{types:`./dist/src/utils/index.d.ts`},"./*":`./*`},tA=`./dist/tres.js`,nA=`./dist/tres.js`,rA=`./dist/index.d.ts`,iA=[`*.d.ts`,`dist`],aA={access:`public`},oA={dev:`pnpm --filter='./playground/vue' dev`,"dev:nuxt":`pnpm --filter='./playground/nuxt' dev`,build:`vite build`,test:`vitest`,"test:ci":`vitest run`,"test:ui":`vitest --ui --coverage.enabled=true`,release:`release-it`,coverage:`vitest run --coverage`,lint:`eslint .`,"lint:fix":`eslint . --fix`,"docs:dev":`vitepress dev docs`,"docs:build":`vitepress build docs`,"docs:serve":`vitepress serve docs`,"docs:preview":`vitepress preview docs`,"docs:contributors":`esno scripts/update-contributors.ts`},sA={three:`>=0.133`,vue:`>=3.4`},cA={"@alvarosabu/utils":`^3.2.0`,"@vue/devtools-api":`^6.6.3`,"@vueuse/core":`^12.5.0`},lA={"@release-it/conventional-changelog":`^10.0.0`,"@stackblitz/sdk":`^1.11.0`,"@tresjs/cientos":`4.1.0`,"@tresjs/eslint-config":`^1.4.0`,"@types/three":`^0.173.0`,"@typescript-eslint/eslint-plugin":`^8.23.0`,"@typescript-eslint/parser":`^8.23.0`,"@vitejs/plugin-vue":`^5.2.1`,"@vitest/coverage-c8":`^0.33.0`,"@vitest/coverage-v8":`^3.0.5`,"@vitest/ui":`^3.0.5`,"@vue/test-utils":`^2.4.6`,eslint:`^9.19.0`,"eslint-plugin-vue":`^9.32.0`,esno:`^4.8.0`,gsap:`^3.12.7`,jsdom:`^26.0.0`,kolorist:`^1.8.0`,ohmyfetch:`^0.4.21`,pathe:`^2.0.2`,"release-it":`^18.1.2`,"rollup-plugin-analyzer":`^4.0.0`,"rollup-plugin-copy":`^3.5.0`,"rollup-plugin-visualizer":`^5.14.0`,sponsorkit:`^16.3.0`,three:`^0.173.0`,unocss:`^65.4.3`,unplugin:`^2.1.2`,"unplugin-vue-components":`^28.0.0`,vite:`^6.1.0`,"vite-plugin-banner":`^0.8.0`,"vite-plugin-dts":`4.5.0`,"vite-plugin-inspect":`^10.1.0`,"vite-plugin-require-transform":`^1.0.21`,"vite-svg-loader":`^5.1.0`,vitepress:`1.6.3`,vitest:`3.0.5`,vue:`3.5.13`,"vue-demi":`^0.14.10`},uA={name:Wk,type:Gk,version:Kk,packageManager:qk,description:Jk,author:Yk,license:Xk,repository:Zk,keywords:Qk,sideEffects:$k,exports:eA,main:tA,module:nA,types:rA,files:iA,publishConfig:aA,scripts:oA,peerDependencies:sA,dependencies:cA,devDependencies:lA};function dA(e){let t={nodes:{},materials:{}};return e&&e.traverse(e=>{e.name&&(t.nodes[e.name]=e),e.material&&!t.materials[e.material.name]&&(t.materials[e.material.name]=e.material)}),t}async function fA(e,t,n,r,i){let{logError:a}=xj(),o=new e;return i&&i(o),n&&n(o),await new Promise((e,n)=>{o.load(t,t=>{let n=t;n.scene&&Object.assign(n,dA(n.scene)),e(n)},r,e=>{a(`[useLoader] - Failed to load resource`,e),n(e)})})}var pA=class extends Mh{constructor(...e){super(...e),Uk(this,`type`,`HightlightMesh`),Uk(this,`createTime`),this.createTime=Date.now()}onBeforeRender(){let e=(Date.now()-this.createTime)/1e3,t=1+.07*Math.sin(2.5*e);this.scale.set(t,t,t)}};function mA(e){return typeof e>`u`}function hA(e){return Array.isArray(e)}function gA(e){return typeof e==`number`}function _A(e){return typeof e==`string`}function vA(e){return typeof e==`function`}function yA(e){return e===Object(e)&&!hA(e)&&!vA(e)}function bA(e){return yA(e)&&!!e.isObject3D}function xA(e){return yA(e)&&!!e.isColor}function SA(e){return e!=null&&(typeof e==`string`||typeof e==`number`||xA(e))}function CA(e){return typeof e==`object`&&!!e&&`set`in e&&typeof e.set==`function`}function wA(e){return CA(e)&&`copy`in e&&typeof e.copy==`function`}function TA(e){return!!(e!=null&&e.constructor)}function EA(e){return e instanceof dm}function DA(e){return yA(e)&&!!e.isCamera}function OA(e){return yA(e)&&!!e.isBufferGeometry}function kA(e){return yA(e)&&!!e.isMaterial}function AA(e){return yA(e)&&!!e.isLight}function jA(e){return yA(e)&&!!e.isFog}function MA(e){return yA(e)&&!!e.isScene}function NA(e){return bA(e)||OA(e)||kA(e)||jA(e)}function PA(e){return yA(e)&&!!e.isPrimitive}const FA=(e,t)=>{for(let n of Object.keys(t))t[n]instanceof Object&&Object.assign(t[n],FA(e[n],t[n]));return Object.assign(e||{},t),e},IA=`html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot`,LA=HA(IA);function RA(e){return e&&e.nodeType===1}function zA(e){return e.replace(/-([a-z])/g,(e,t)=>t.toUpperCase())}const BA=/\B([A-Z])/g;function VA(e){return e.replace(BA,`-$1`).toLowerCase()}function HA(e,t){let n=Object.create(null),r=e.split(`,`);for(let e=0;e!!n[e.toLowerCase()]:e=>!!n[e]}const UA=(e,t)=>{if(!t)return;let n=Array.isArray(t)?t:t.match(/([^[.\]])+/g);return n?.reduce((e,t)=>e&&e[t],e)},WA=(e,t,n)=>{let r=Array.isArray(t)?t:t.match(/([^[.\]])+/g);r&&r.reduce((e,t,i)=>(e[t]===void 0&&(e[t]={}),i===r.length-1&&(e[t]=n),e[t]),e)};function GA(e,t){if(RA(e)&&RA(t)){let n=e.attributes,r=t.attributes;return n.length===r.length?Array.from(n).every(({name:e,value:n})=>t.getAttribute(e)===n):!1}if(e===t)return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let i of n)if(!r.includes(i)||!GA(e[i],t[i]))return!1;return!0}function KA(e,t){if(!Array.isArray(e)||!Array.isArray(t)||e.length!==t.length)return!1;for(let n=0;n{if(e.uuid===t)return e;for(let t of e.children){let e=i(t);if(e)return e}},a=i(e);if(!a){console.warn(`Object with UUID not found in the scene.`);return}let o=a;for(let e=0;eQA(e)),!(e instanceof ag)){let t=e;e&&((n=e.dispose)==null||n.call(e)),t.geometry&&t.geometry.dispose(),Array.isArray(t.material)?t.material.forEach(e=>ZA(e)):t.material&&ZA(t.material)}}function $A(e,t){let n=0;for(let r=0;rt===0?e:e.charAt(0).toUpperCase()+e.slice(1)).join(``)}const nj=/-\d+$/;function rj(e,t,n){if(_A(n)){if(nj.test(n)){let t=n.replace(nj,``),{target:r,key:i}=ej(e,t);if(!Array.isArray(r[i])){let e=r[i],t=[];t.__tresDetach=()=>{t.every(e=>mA(e))&&(r[i]=e)},r[i]=t}}let{target:r,key:i}=ej(e,n);t.__tres.previousAttach=r[i],r[i]=lj(t)}else t.__tres.previousAttach=n(e,t)}function ij(e,t,n){var r,i,a;if(_A(n)){let{target:r,key:i}=ej(e,n),a=t.__tres.previousAttach;a===void 0?delete r[i]:r[i]=a,`__tresDetach`in r&&r.__tresDetach()}else (i=(r=t.__tres)?.previousAttach)==null||i.call(r,e,t);(a=t.__tres)==null||delete a.previousAttach}function aj(e,t,n){let r=e;return r.__tres={type:`unknown`,eventCount:0,root:n,handlers:{},memoizedProps:{},objects:[],parent:null,previousAttach:null,...t},r.__tres.attach||(r.isMaterial?r.__tres.attach=`material`:r.isBufferGeometry?r.__tres.attach=`geometry`:r.isFog&&(r.__tres.attach=`fog`)),r}function oj(e){var t;let n=(t=e?.__tres)?.root;n&&n.render&&n.render.canBeInvalidated.value&&n.invalidate()}function sj(e,t,n){var r;if(!vA(e.setPixelRatio))return;let i=0;if(n&&hA(n)&&n.length>=2){let[e,r]=n;i=Gf.clamp(t,e,r)}else i=gA(n)?n:t;i!==(r=e.getPixelRatio)?.call(e)&&e.setPixelRatio(i)}function cj(e,t,n,r,i){let a=[...t.__tres.objects],o=lj(t);if(e=lj(e),o===e)return!0;let s=aj(e,t.__tres??{},i),c=t.parent??t.__tres.parent??null,l={...t.__tres.memoizedProps};delete l.object;for(let e of a)uj(e,i),dj(e,i);o.__tres.objects=[],r.remove(t);for(let[e,t]of Object.entries(l))r.patchProp(s,e,s[e],t);n(e),r.insert(t,c);for(let e of a)r.insert(e,t);return!0}function lj(e){return PA(e)?(e.object.__tres=e.__tres,e.object):e}function uj(e,t){var n,r,i,a;let o=(n=e.__tres)?.parent||t.scene.value;e.__tres&&(e.__tres.parent=null),o&&o.__tres&&`objects`in o.__tres&&$A(o.__tres.objects,t=>t!==e),(r=e.__tres)!=null&&r.attach?ij(o,e,e.__tres.attach):((a=(i=e.parent)?.remove)==null||a.call(i,lj(e)),e.parent=null)}function dj(e,t){var n;(n=e.traverse)==null||n.call(e,e=>{var n;t.deregisterCamera(e),(n=t.eventManager)==null||n.deregisterPointerMissedObject(e)}),t.deregisterCamera(e),oj(e)}async function fj(e,t){let n=new Lb(t),r=e=>new Promise((t,r)=>{n.load(e,e=>t(e),()=>null,()=>{r(Error(`[useTextures] - Failed to load texture`))})});if(qA(e)){let t=await Promise.all(e.map(e=>r(e)));return e.length>1?t:t[0]}else{let{map:t,displacementMap:n,normalMap:i,roughnessMap:a,metalnessMap:o,aoMap:s,alphaMap:c,matcap:l}=e;return{map:t?await r(t):null,displacementMap:n?await r(n):null,normalMap:i?await r(i):null,roughnessMap:a?await r(a):null,metalnessMap:o?await r(o):null,aoMap:s?await r(s):null,alphaMap:c?await r(c):null,matcap:l?await r(l):null}}}const pj=Rr({__name:`component`,props:{map:{},displacementMap:{},normalMap:{},roughnessMap:{},metalnessMap:{},aoMap:{},alphaMap:{},matcap:{}},async setup(e){let t,n,r=e,i=([t,n]=Ai(()=>$t(fj(r))),t=await t,n(),t);return(e,t)=>_i(e.$slots,`default`,{textures:_n(i)})}}),mj=({sizes:e})=>{let t=R([]),n=H(()=>t.value[0]),r=e=>{let n=e instanceof Wh?e:t.value.find(t=>t.uuid===e);if(!n)return;let r=t.value.filter(({uuid:e})=>e!==n.uuid);t.value=[n,...r]},i=(e,n=!1)=>{if(DA(e)){let i=e;if(t.value.some(({uuid:e})=>e===i.uuid))return;n?r(i):t.value.push(i)}},a=e=>{if(DA(e)){let n=e;t.value=t.value.filter(({uuid:e})=>e!==n.uuid)}};return Aa(()=>{e.aspectRatio.value&&t.value.forEach(t=>{!t.manual&&(t instanceof Jh||hj(t))&&(t instanceof Jh?t.aspect=e.aspectRatio.value:(t.left=e.width.value*-.5,t.right=e.width.value*.5,t.top=e.height.value*.5,t.bottom=e.height.value*-.5),t.updateProjectionMatrix())})}),ri(()=>{t.value=[]}),{camera:n,cameras:t,registerCamera:i,deregisterCamera:a,setCameraActive:r}};function hj(e){return e.hasOwnProperty(`isOrthographicCamera`)&&e.isOrthographicCamera}const gj=!0,_j=`[TresJS ▲ ■ ●] `;function vj(...e){typeof e[0]==`string`?e[0]=_j+e[0]:e.unshift(_j),console.error(...e)}function yj(...e){typeof e[0]==`string`?e[0]=_j+e[0]:e.unshift(_j),console.warn(...e)}function bj(e,t){}function xj(){return{logError:vj,logWarning:yj,logMessage:bj}}const Sj=R({}),Cj=e=>Object.assign(Sj.value,e);function wj(){let e=new Map,t=new Set,n=0,r=!1,i=()=>{let n=Array.from(e.entries()).sort((e,t)=>{let n=e[1].priority-t[1].priority;return n===0?e[1].addI-t[1].addI:n});t.clear(),n.forEach(e=>t.add(e[0]))},a=n=>{e.delete(n),t.delete(n)};return{on:(t,i=0)=>{e.set(t,{priority:i,addI:n++});let o=()=>a(t);return BO(o),r=!0,{off:o}},off:a,trigger:(...e)=>{r&&(i(),r=!1),t.forEach(t=>t(...e))},dispose:()=>{e.clear(),t.clear()},get count(){return e.size}}}function Tj(){let e=!0,t=!0,n=!1,r=new Sx(!1),i=R(r.running),a=R(!1),o,s=Gf.generateUUID(),c=null,l=wj(),u=wj(),d=wj();S();let f={};function p(e){f=e}function m(e,t,n=0){switch(t){case`before`:return l.on(e,n);case`render`:return c||=e,u.dispose(),u.on(e);case`after`:return d.on(e,n)}}function h(){t&&(t=!1,S(),x())}function g(){t=!0,S(),cancelAnimationFrame(o)}function _(){n=!1,S()}function v(){n=!0,S()}function y(){a.value=!0}function b(){a.value=!1}function x(){if(!e){o=requestAnimationFrame(x);return}let t=r.getDelta(),n=r.getElapsedTime(),s={camera:_n(f.camera),scene:_n(f.scene),renderer:_n(f.renderer),raycaster:_n(f.raycaster),controls:_n(f.controls),invalidate:f.invalidate,advance:f.advance},p={delta:t,elapsed:n,clock:r,...s};i.value&&l.trigger(p),a.value||(u.count?u.trigger(p):c&&c(p)),i.value&&d.trigger(p),o=requestAnimationFrame(x)}function S(){let e=!t&&!n;r.running!==e&&(r.running?r.stop():r.start()),i.value=r.running}return{loopId:s,register:(e,t,n)=>m(e,t,n),start:h,stop:g,pause:v,resume:_,pauseRender:y,resumeRender:b,isRenderPaused:a,isActive:i,setContext:p,setReady:t=>e=t}}function Ej(e){let t=0;return e.traverse(e=>{if(e.isMesh&&e.geometry&&e.type!==`HightlightMesh`){let n=e.geometry,r=n.attributes.position.count*3*Float32Array.BYTES_PER_ELEMENT,i=n.index?n.index.count*Uint32Array.BYTES_PER_ELEMENT:0,a=n.attributes.normal?n.attributes.normal.count*3*Float32Array.BYTES_PER_ELEMENT:0,o=n.attributes.uv?n.attributes.uv.count*2*Float32Array.BYTES_PER_ELEMENT:0,s=r+i+a+o;t+=s}}),t}function Dj(e){return(e/1024).toFixed(2)}const Oj=Number.parseInt(Mc.replace(`dev`,``));function kj(e){return e instanceof K?e:Array.isArray(e)?new K(...e):new K(e)}const Aj={realistic:{shadows:!0,physicallyCorrectLights:!0,outputColorSpace:Ed,toneMapping:Nl,toneMappingExposure:3,shadowMap:{enabled:!0,type:Vc}},flat:{toneMapping:kl,toneMappingExposure:1}};function jj({canvas:e,options:t,contextParts:{sizes:n,render:r,invalidate:i,advance:a}}){let o=H(()=>({alpha:dk(t.alpha)??!0,depth:dk(t.depth),canvas:yk(e),context:dk(t.context),stencil:dk(t.stencil),antialias:dk(t.antialias)??!0,precision:dk(t.precision),powerPreference:dk(t.powerPreference),premultipliedAlpha:dk(t.premultipliedAlpha),preserveDrawingBuffer:dk(t.preserveDrawingBuffer),logarithmicDepthBuffer:dk(t.logarithmicDepthBuffer),failIfMajorPerformanceCaveat:dk(t.failIfMajorPerformanceCaveat)})),s=z(new zO(o.value));function c(){t.renderMode===`on-demand`&&i()}V(o,()=>{s.value.dispose(),s.value=new zO(o.value),c()}),V([n.width,n.height],()=>{s.value.setSize(n.width.value,n.height.value),c()},{immediate:!0}),V(()=>t.clearColor,c);let{pixelRatio:l}=kk(),{logError:u}=xj(),d=(()=>{let e=new zO,t={shadowMap:{enabled:e.shadowMap.enabled,type:e.shadowMap.type},toneMapping:e.toneMapping,toneMappingExposure:e.toneMappingExposure,outputColorSpace:e.outputColorSpace};return e.dispose(),t})(),f=dk(t.renderMode);return f===`on-demand`&&i(),f===`manual`&&setTimeout(()=>{a()},100),Aa(()=>{let e=dk(t.preset);e&&(e in Aj||u(`Renderer Preset must be one of these: ${Object.keys(Aj).join(`, `)}`),FA(s.value,Aj[e])),sj(s.value,l.value,dk(t.dpr)),f===`always`&&(r.frames.value=Math.max(1,r.frames.value));let n=(t,n)=>{let r=dk(t),i=()=>{if(e)return UA(Aj[e],n)};if(r!==void 0)return r;let a=i();return a===void 0?UA(d,n):a},i=(e,t)=>WA(s.value,t,n(e,t));i(t.shadows,`shadowMap.enabled`),i(t.toneMapping??Nl,`toneMapping`),i(t.shadowMapType,`shadowMap.type`),Oj<150&&i(!t.useLegacyLights,`physicallyCorrectLights`),i(t.outputColorSpace,`outputColorSpace`),i(t.toneMappingExposure,`toneMappingExposure`);let a=n(t.clearColor,`clearColor`);a&&s.value.setClearColor(a?kj(a):new K(0))}),ri(()=>{s.value.dispose(),s.value.forceContextLoss()}),{renderer:s}}function Mj(e,t,n=10){let r=dk(e)?Bk():Mk(H(()=>dk(t).parentElement)),i=tn(lk(r.width,n)),a=tn(lk(r.height,n)),o=H(()=>i.value/a.value);return{height:a,width:i,aspectRatio:o}}const Nj=(e,t)=>{let n=H(()=>t.renderer.value.domElement),r=z([]),{x:i,y:a}=Lk({target:n}),o=0,{width:s,height:c,top:l,left:u}=jk(n),d=({x:e,y:t})=>{if(n.value)return{x:(e-u.value)/s.value*2-1,y:-((t-l.value)/c.value)*2+1}},f=({x:n,y:i})=>{if(t.camera.value)return t.raycaster.value.setFromCamera(new U(n,i),t.camera.value),r.value=t.raycaster.value.intersectObjects(e.value,!0),r.value},p=e=>{let t=d({x:e?.clientX??i.value,y:e?.clientY??a.value});return t&&f(t)||[]},m=VO(),h=VO(),g=VO(),_=VO(),v=VO(),y=VO(),b=VO(),x=VO();function S(e){let t={};for(let n in e)typeof n!=`function`&&(t[n]=e[n]);return t}let C=(e,n)=>{var i,a,s;let c=S(n),l=new W(n?.clientX,n?.clientY,0).unproject((i=t.camera)?.value);e.trigger({...c,intersections:r.value,unprojectedPoint:l,ray:(a=t.raycaster)?.value.ray,camera:(s=t.camera)?.value,sourceEvent:n,delta:o,stopPropagating:!1})},w,T=e=>{p(e),C(g,e),w=e},E=()=>{w&&T(w)},D,O,k,A=e=>{var t;D=(t=r.value[0])?.object,o=0,O=new U(e?.clientX??i.value,e?.clientY??a.value),C(v,e)},j,M=!1,N=e=>{var t,n,s;e instanceof PointerEvent&&(r.value.length===0&&C(y,e),D===(t=r.value[0])?.object&&(k=new U(e?.clientX??i.value,e?.clientY??a.value),o=O?.distanceTo(k),e.button===0?(C(m,e),j===(n=r.value[0])?.object?M=!0:(j=(s=r.value[0])?.object,M=!1)):e.button===2&&C(b,e)),C(_,e))},ee=e=>{M&&(C(h,e),j=void 0,M=!1)},te=e=>C(g,e),P=e=>C(x,e);return n.value.addEventListener(`pointerup`,N),n.value.addEventListener(`pointerdown`,A),n.value.addEventListener(`pointermove`,T),n.value.addEventListener(`pointerleave`,te),n.value.addEventListener(`dblclick`,ee),n.value.addEventListener(`wheel`,P),ri(()=>{n!=null&&n.value&&(n.value.removeEventListener(`pointerup`,N),n.value.removeEventListener(`pointerdown`,A),n.value.removeEventListener(`pointermove`,T),n.value.removeEventListener(`pointerleave`,te),n.value.removeEventListener(`dblclick`,ee),n.value.removeEventListener(`wheel`,P))}),{intersects:r,onClick:e=>m.on(e).off,onDblClick:e=>h.on(e).off,onContextMenu:e=>b.on(e).off,onPointerMove:e=>g.on(e).off,onPointerUp:e=>_.on(e).off,onPointerDown:e=>v.on(e).off,onPointerMissed:e=>y.on(e).off,onWheel:e=>x.on(e).off,forceUpdate:E}};function Pj(e,t){if(Array.isArray(e))for(let n of e)n(t);typeof e==`function`&&e(t)}function Fj(e,t,n){var r;let i=z(),a=z();e&&(i.value=e),t&&(a.value=t);let o=e=>{var t;return(t=e.__tres)?.eventCount>0},s=e=>{var t;return(t=e.children)?.some(e=>s(e))||o(e)},c=z(((r=i.value)?.children).filter(s)||[]);function l(e,t){let r=[],i=()=>t.stopPropagating=!0;t.stopPropagation=i;for(let i of t?.intersections){if(t.stopPropagating)return;t={...t,...i};let{object:a}=i;t.eventObject=a,Pj(a[e],t),r.push(a);let o=a.parent;for(;o!==null&&!t.stopPropagating&&!r.includes(o);)t.eventObject=o,Pj(o[e],t),r.push(o),o=o.parent;let s=VA(e.slice(2));n(s,{intersection:i,event:t})}}let{onClick:u,onDblClick:d,onContextMenu:f,onPointerMove:p,onPointerDown:m,onPointerUp:h,onPointerMissed:g,onWheel:_,forceUpdate:v}=Nj(c,t);h(e=>l(`onPointerUp`,e)),m(e=>l(`onPointerDown`,e)),u(e=>l(`onClick`,e)),d(e=>l(`onDoubleClick`,e)),f(e=>l(`onContextMenu`,e)),_(e=>l(`onWheel`,e));let y=[];p(e=>{let t=e.intersections.map(({object:e})=>e),n=e.intersections;y.forEach(({object:n})=>{t.includes(n)||(e.intersections=y,l(`onPointerLeave`,e),l(`onPointerOut`,e))}),e.intersections=n,e.intersections.forEach(({object:t})=>{y.includes(t)||(l(`onPointerEnter`,e),l(`onPointerOver`,e))}),l(`onPointerMove`,e),y=e.intersections});let b=[];g(e=>{let t=()=>e.stopPropagating=!0;e.stopPropagation=t,b.forEach(t=>{e.stopPropagating||(e.eventObject=t,Pj(t.onPointerMissed,e))}),n(`pointer-missed`,{event:e})});function x(e){NA(e)&&bA(e)&&c.value.push(e)}function S(e){if(NA(e)&&bA(e)){let t=c.value.indexOf(e);t>-1&&c.value.splice(t,1)}}function C(e){NA(e)&&bA(e)&&e.onPointerMissed&&b.push(e)}function w(e){if(NA(e)&&bA(e)){let t=b.indexOf(e);t>-1&&b.splice(t,1)}}return t.eventManager={forceUpdate:v,registerObject:x,deregisterObject:S,registerPointerMissedObject:C,deregisterPointerMissedObject:w},{forceUpdate:v,registerObject:x,deregisterObject:S,registerPointerMissedObject:C,deregisterPointerMissedObject:w}}function Ij(e,t,n=100){n=n<=0?100:n;let r=VO(),i=new Set,a=!1,o=!1,s=null;function c(){s&&clearTimeout(s),!o&&!a&&e()?(r.trigger(t),i.forEach(e=>e()),i.clear(),a=!0):!o&&!a&&(s=setTimeout(c,n))}function l(){o=!0,s&&clearTimeout(s)}c();let u=(e,...t)=>{e(...t)};return{on:e=>{if(a)return u(e,t),{off:()=>{}};{let t=r.on(e);return i.add(t.off),r.on(e)}},off:r.off,trigger:r.trigger,clear:r.clear,cancel:l}}const Lj=new WeakMap;function Rj(e){if(e||=Bj(),Lj.has(e))return Lj.get(e);let t=100,n=Date.now(),r=Ij(()=>{if(Date.now()-n>=t)return!0;{let t=e.renderer.value,n=t?.domElement||{width:0,height:0};return!!(t&&n.width>0&&n.height>0)}},e);return Lj.set(e,r),r}function zj({scene:e,canvas:t,windowSize:n,rendererOptions:r,emit:i}){let a=z(e),o=Mj(n,t),{camera:s,cameras:c,registerCamera:l,deregisterCamera:u,setCameraActive:d}=mj({sizes:o}),f={mode:R(r.renderMode||`always`),priority:R(0),frames:R(0),maxFrames:60,canBeInvalidated:H(()=>f.mode.value===`on-demand`&&f.frames.value===0)};function p(e=1){r.renderMode===`on-demand`&&(f.frames.value=Math.min(f.maxFrames,f.frames.value+e))}function m(){r.renderMode===`manual`&&(f.frames.value=1)}let{renderer:h}=jj({canvas:t,options:r,contextParts:{sizes:o,render:f,invalidate:p,advance:m}}),g={sizes:o,scene:a,camera:s,cameras:tn(c),renderer:h,raycaster:z(new sS),controls:R(null),perf:{maxFrames:160,fps:{value:0,accumulator:[]},memory:{currentMem:0,allocatedMem:0,accumulator:[]}},render:f,advance:m,extend:Cj,invalidate:p,registerCamera:l,setCameraActive:d,deregisterCamera:u,loop:Tj()};Xi(`useTres`,g),g.scene.value.__tres={root:g},g.loop.register(()=>{s.value&&f.frames.value>0&&(h.value.render(e,s.value),i(`render`,g.renderer.value)),f.priority.value=0,f.mode.value===`always`?f.frames.value=1:f.frames.value=Math.max(0,f.frames.value-1)},`render`);let{on:_,cancel:v}=Rj(g);g.loop.setReady(!1),g.loop.start(),_(()=>{i(`ready`,g),g.loop.setReady(!0),Fj(e,g,i)}),ri(()=>{v(),g.loop.stop()});let y=100,b=Nk({every:y}),{isSupported:x,memory:S}=Pk({interval:y}),C=160,w=performance.now(),T=({timestamp:e})=>{g.scene.value&&(g.perf.memory.allocatedMem=Ej(g.scene.value)),e-w>=y&&(w=e,g.perf.fps.accumulator.push(b.value),g.perf.fps.accumulator.length>C&&g.perf.fps.accumulator.shift(),g.perf.fps.value=b.value,x.value&&S.value&&(g.perf.memory.accumulator.push(S.value.usedJSHeapSize/1024/1024),g.perf.memory.accumulator.length>C&&g.perf.memory.accumulator.shift(),g.perf.memory.currentMem=g.perf.memory.accumulator.reduce((e,t)=>e+t,0)/g.perf.memory.accumulator.length))},E=0,D=1,{pause:O}=wk(({delta:e})=>{window.__TRES__DEVTOOLS__&&(T({timestamp:performance.now()}),E+=e,E>=D&&(window.__TRES__DEVTOOLS__.cb(g),E=0))},{immediate:!0});return ri(()=>{O()}),g}function Bj(){let e=Zi(`useTres`);if(!e)throw Error(`useTresContext must be used together with useTresContextProvider`);return e}const Vj=Bj;function Hj(){let{camera:e,scene:t,renderer:n,loop:r,raycaster:i,controls:a,invalidate:o,advance:s}=Bj();r.setContext({camera:e,scene:t,renderer:n,raycaster:i,controls:a,invalidate:o,advance:s});function c(e,t=0){return r.register(e,`before`,t)}function l(e){return r.register(e,`render`)}function u(e,t=0){return r.register(e,`after`,t)}return{pause:r.pause,resume:r.resume,pauseRender:r.pauseRender,resumeRender:r.resumeRender,isActive:r.isActive,onBeforeRender:c,render:l,onAfterRender:u}}const Uj=VO(),Wj=VO(),Gj=VO(),Kj=new Sx;let qj=0,Jj=0;const{pause:Yj,resume:Xj,isActive:Zj}=wk(()=>{Uj.trigger({delta:qj,elapsed:Jj,clock:Kj}),Wj.trigger({delta:qj,elapsed:Jj,clock:Kj}),Gj.trigger({delta:qj,elapsed:Jj,clock:Kj})},{immediate:!1});Gj.on(()=>{qj=Kj.getDelta(),Jj=Kj.getElapsedTime()});function Qj(e,t={},n={}){let r=e,i=e=>{r=e},a=new Proxy({},{}),o={has(e,n){return n in t||n in r},get(e,n,i){return n in t?t[n](r):r[n]},set(e,t,o){return n[t]?n[t](o,r,a,i):r[t]=o,!0}};return a=new Proxy({},o),a}const{logError:$j}=xj(),eM=[`onClick`,`onContextMenu`,`onPointerMove`,`onPointerEnter`,`onPointerLeave`,`onPointerOver`,`onPointerOut`,`onDoubleClick`,`onPointerDown`,`onPointerUp`,`onPointerCancel`,`onPointerMissed`,`onLostPointerCapture`,`onWheel`],tM=e=>{let t=e.scene.value;function n(t,n,o,s){if(s||={},s.args||=[],t===`template`||LA(t))return null;let c=t.replace(`Tres`,``),l;if(t===`primitive`){(!yA(s.object)||pn(s.object))&&$j(`Tres primitives need an 'object' prop, whose value is an object or shallowRef`),c=s.object.type;let t={};l=Qj(s.object,{object:e=>e,isPrimitive:()=>!0,__tres:()=>t},{object:(t,n,o,s)=>{cj(t,o,s,{patchProp:a,remove:i,insert:r},e)},__tres:e=>{Object.assign(t,e)}})}else{let e=Sj.value[c];e||$j(`${c} is not defined on the THREE namespace. Use extend to add it to the catalog.`),l=new e(...s.args)}return l?(l.isCamera&&(s!=null&&s.position||l.position.set(3,3,3),s!=null&&s.lookAt||l.lookAt(0,0,0)),l=aj(l,{...l.__tres,type:c,memoizedProps:s,eventCount:0,primitive:t===`primitive`,attach:s.attach},e),l):null}function r(n,r){var i,a,o;if(!n)return;r||=t;let s=n.__tres?n:aj(n,{},e),c=r.__tres?r:aj(r,{},e);n=lj(s),r=lj(c),n.__tres&&(i=n.__tres)?.eventCount>0&&((a=e.eventManager)==null||a.registerObject(n)),e.registerCamera(n),(o=e.eventManager)==null||o.registerPointerMissedObject(n),s.__tres.attach?rj(c,s,s.__tres.attach):bA(n)&&bA(c)&&(c.add(n),n.dispatchEvent({type:`added`})),s.__tres.parent=c,c.__tres.objects&&!c.__tres.objects.includes(s)&&c.__tres.objects.push(s)}function i(t,n){var r,a,o,s;if(!t)return;t!=null&&t.__tres&&(r=t.__tres)?.eventCount>0&&((a=e.eventManager)==null||a.deregisterObject(t)),n=mA(n)?`default`:n;let c=(o=t.__tres)?.dispose;mA(c)||(n=c===null?!1:c);let l=(s=t.__tres)?.primitive,u=n===`default`?!l:!!n;if(t.__tres&&`objects`in t.__tres&&[...t.__tres.objects].forEach(e=>i(e,n)),u&&t.children&&[...t.children].forEach(e=>i(e,n)),uj(t,e),dj(t,e),u&&!MA(t)){if(vA(n))n(t);else if(vA(t.dispose))try{t.dispose()}catch{}}`__tres`in t&&delete t.__tres}function a(t,n,a,o){var s,c;if(!t)return;let l=t,u=n;if(t.__tres&&(t.__tres.memoizedProps[n]=o),n===`attach`){let n=(s=t.__tres)?.parent||t.parent;i(t),aj(t,{attach:o},e),n&&r(t,n);return}if(n===`dispose`){t.__tres||(t=aj(t,{},e)),t.__tres.dispose=o;return}if(bA(t)&&u===`blocks-pointer-events`){o||o===``?t[u]=o:delete t[u];return}eM.includes(n)&&t.__tres&&(t.__tres.eventCount+=1);let d=zA(u),f=l?.[d];if(u===`args`){let e=t,n=a??[],r=o??[],i=(c=t.__tres)?.type||t.type;i&&n.length&&!KA(n,r)&&(l=Object.assign(e,new Sj.value[i](...o)));return}if(l.type===`BufferGeometry`){if(u===`args`)return;l.setAttribute(zA(u),new ih(...o));return}if(u.includes(`-`)&&f===void 0){f=l;for(let e of u.split(`-`))d=u=zA(e),l=f,f=f?.[u]}let p=o;if(p===``&&(p=!0),vA(f)){eM.includes(n)||(hA(p)?t[d](...p):t[d](p)),d.startsWith(`on`)&&vA(p)&&(l[d]=p);return}EA(f)&&EA(p)?f.mask=p.mask:xA(f)&&SA(p)?f.set(p):wA(f)&&TA(p)&&f.constructor===p.constructor?f.copy(p):CA(f)&&Array.isArray(p)?`fromArray`in f&&typeof f.fromArray==`function`?f.fromArray(p):f.set(...p):CA(f)&&typeof p==`number`?`setScalar`in f&&typeof f.setScalar==`function`?f.setScalar(p):f.set(p):l[d]=p,oj(t)}function o(e){var t;return(t=e?.__tres)?.parent||null}function s(t){let n=aj(new Dm,{type:`Comment`},e);return n.name=t,n}function c(e){var t;let n=o(e),r=(t=n?.__tres)?.objects||[],i=r.indexOf(e);return i<0||i>=r.length-1?null:r[i+1]}return{insert:r,remove:i,createElement:n,patchProp:a,parentNode:o,createText:()=>void 0,createComment:s,setText:()=>void 0,setElementText:()=>void 0,nextSibling:c,querySelector:()=>void 0,setScopeId:()=>void 0,cloneNode:()=>void 0,insertStaticContent:()=>void 0}};function nM(){return rM().__VUE_DEVTOOLS_GLOBAL_HOOK__}function rM(){return typeof navigator<`u`&&typeof window<`u`?window:typeof globalThis<`u`?globalThis:{}}const iM=typeof Proxy==`function`,aM=`devtools-plugin:setup`,oM=`plugin:settings:set`;let sM,cM;function lM(){var e;return sM!==void 0||(typeof window<`u`&&window.performance?(sM=!0,cM=window.performance):typeof globalThis<`u`&&(e=globalThis.perf_hooks)!=null&&e.performance?(sM=!0,cM=globalThis.perf_hooks.performance):sM=!1),sM}function uM(){return lM()?cM.now():Date.now()}var dM=class{constructor(e,t){this.target=null,this.targetQueue=[],this.onQueue=[],this.plugin=e,this.hook=t;let n={};if(e.settings)for(let t in e.settings){let r=e.settings[t];n[t]=r.defaultValue}let r=`__vue-devtools-plugin-settings__${e.id}`,i=Object.assign({},n);try{let e=localStorage.getItem(r),t=JSON.parse(e);Object.assign(i,t)}catch{}this.fallbacks={getSettings(){return i},setSettings(e){try{localStorage.setItem(r,JSON.stringify(e))}catch{}i=e},now(){return uM()}},t&&t.on(oM,(e,t)=>{e===this.plugin.id&&this.fallbacks.setSettings(t)}),this.proxiedOn=new Proxy({},{get:(e,t)=>this.target?this.target.on[t]:(...e)=>{this.onQueue.push({method:t,args:e})}}),this.proxiedTarget=new Proxy({},{get:(e,t)=>this.target?this.target[t]:t===`on`?this.proxiedOn:Object.keys(this.fallbacks).includes(t)?(...e)=>(this.targetQueue.push({method:t,args:e,resolve:()=>{}}),this.fallbacks[t](...e)):(...e)=>new Promise(n=>{this.targetQueue.push({method:t,args:e,resolve:n})})})}async setRealTarget(e){this.target=e;for(let e of this.onQueue)this.target.on[e.method](...e.args);for(let e of this.targetQueue)e.resolve(await this.target[e.method](...e.args))}};function fM(e,t){let n=e,r=rM(),i=nM(),a=iM&&n.enableEarlyProxy;if(i&&(r.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__||!a))i.emit(aM,e,t);else{let e=a?new dM(n,i):null;(r.__VUE_DEVTOOLS_PLUGINS__=r.__VUE_DEVTOOLS_PLUGINS__||[]).push({pluginDescriptor:n,setupFn:t,proxy:e}),e&&t(e.proxiedTarget)}}function pM(e,t){let n=`▲ ■ ●${e}`;typeof mM==`function`?mM(n,t):console.log(n)}function mM(e,t){throw Error(e+t)}const hM=e=>{let t={id:e.uuid,label:e.type,children:[],tags:[]};e.name!==``&&t.tags.push({label:e.name,textColor:5750629,backgroundColor:15793395});let n=Ej(e);return n>0&&t.tags.push({label:`${Dj(n)} KB`,textColor:15707189,backgroundColor:16775644,tooltip:`Memory usage`}),e.type.includes(`Light`)&&(AA(e)&&t.tags.push({label:`${e.intensity}`,textColor:9738662,backgroundColor:16316922,tooltip:`Intensity`}),t.tags.push({label:`#${new K(e.color).getHexString()}`,textColor:9738662,backgroundColor:16316922,tooltip:`Color`})),e.type.includes(`Camera`)&&(t.tags.push({label:`${e.fov}°`,textColor:9738662,backgroundColor:16316922,tooltip:`Field of view`}),t.tags.push({label:`x: ${Math.round(e.position.x)} y: ${Math.round(e.position.y)} z: ${Math.round(e.position.z)}`,textColor:9738662,backgroundColor:16316922,tooltip:`Position`})),t};function gM(e,t,n=``){e.children.forEach(e=>{if(e.type===`HightlightMesh`||n&&!e.type.includes(n)&&!e.name.includes(n))return;let r=hM(e);t.children.push(r),gM(e,r,n)})}const _M=[],vM=`tres:inspector`,yM=$t({sceneGraph:null});function bM(e,t){fM({id:`dev.esm.tres`,label:`TresJS 🪐`,logo:`https://raw.githubusercontent.com/Tresjs/tres/main/public/favicon.svg`,packageName:`tresjs`,homepage:`https://tresjs.org`,componentStateTypes:_M,app:e},e=>{typeof e.now!=`function`&&pM(`You seem to be using an outdated version of Vue Devtools. Are you still using the Beta release instead of the stable one? You can find the links at https://devtools.vuejs.org/guide/installation.html.`),e.addInspector({id:vM,label:`TresJS 🪐`,icon:`account_tree`,treeFilterPlaceholder:`Search instances`}),setInterval(()=>{e.sendInspectorTree(vM)},1e3),setInterval(()=>{e.notifyComponentUpdate()},5e3),e.on.getInspectorTree(e=>{if(e.inspectorId===vM){let n=hM(t.scene.value);gM(t.scene.value,n,e.filter),yM.sceneGraph=n,e.rootNodes=[n]}});let n=null,r=null;e.on.getInspectorState(e=>{var i;if(e.inspectorId===vM){let[a]=t.scene.value.getObjectsByProperty(`uuid`,e.nodeId);if(!a)return;if(r&&n&&n.parent&&r.remove(n),a.isMesh){let e=YA(a);a.add(e),n=e,r=a}e.state={object:Object.entries(a).map(([e,t])=>e===`children`?{key:e,value:t.filter(e=>e.type!==`HightlightMesh`)}:{key:e,value:t,editable:!0}).filter(({key:e})=>e!==`parent`)},a.isScene&&(e.state={...e.state,state:[{key:`Scene Info`,value:{objects:a.children.length,memory:Ej(a),calls:t.renderer.value.info.render.calls,triangles:t.renderer.value.info.render.triangles,points:t.renderer.value.info.render.points,lines:t.renderer.value.info.render.lines}},{key:`Programs`,value:(i=t.renderer.value.info.programs)?.map(e=>({...e,programName:e.name}))||[]}]})}}),e.on.editInspectorState(e=>{e.inspectorId===vM&&JA(t.scene.value,e.nodeId,e.path,e.state.value)})})}const xM=[`data-scene`,`data-tres`],SM=Rr({__name:`TresCanvas`,props:{shadows:{type:Boolean,default:void 0},clearColor:{},toneMapping:{},shadowMapType:{},useLegacyLights:{type:Boolean,default:void 0},outputColorSpace:{},toneMappingExposure:{},renderMode:{default:`always`},dpr:{},camera:{},preset:{},windowSize:{type:Boolean,default:void 0},enableProvideBridge:{type:Boolean,default:!0},context:{},alpha:{type:Boolean,default:void 0},premultipliedAlpha:{type:Boolean},antialias:{type:Boolean,default:void 0},stencil:{type:Boolean,default:void 0},preserveDrawingBuffer:{type:Boolean,default:void 0},powerPreference:{},depth:{type:Boolean,default:void 0},failIfMajorPerformanceCaveat:{type:Boolean,default:void 0},precision:{},logarithmicDepthBuffer:{type:Boolean,default:void 0},reverseDepthBuffer:{type:Boolean}},emits:[`render`,`click`,`double-click`,`context-menu`,`pointer-move`,`pointer-up`,`pointer-down`,`pointer-enter`,`pointer-leave`,`pointer-over`,`pointer-out`,`pointer-missed`,`wheel`,`ready`],setup(e,{expose:t,emit:n}){let r=e,i=n,a=wi(),o=R(),s=z(new ag),c=Ao();Cj(rC);let l=(e,t=!1)=>Rr({setup(){var n;let i=(n=Ao())?.appContext;i&&(i.app=c?.appContext.app);let o={};function s(e){e&&(e.parent&&s(e.parent),e.provides&&Object.assign(o,e.provides))}return c!=null&&c.parent&&r.enableProvideBridge&&(s(c.parent),Reflect.ownKeys(o).forEach(e=>{Xi(e,o[e])})),Xi(`useTres`,e),Xi(`extend`,Cj),typeof window<`u`&&bM(i?.app,e),()=>Jo(Ya,null,t?[]:a.default())}}),u=(e,t=!1)=>{let n=l(e,t),{render:r}=ya(tM(e));r(Jo(n),s.value)},d=(e,t=!1)=>{QA(e.scene.value),t&&(e.renderer.value.dispose(),e.renderer.value.renderLists.dispose(),e.renderer.value.forceContextLoss()),s.value.__tres={root:e}},f=z(null);t({context:f,dispose:()=>d(f.value,!0)});let p=()=>{d(f.value),u(f.value,!0)};return $r(()=>{let e=o;f.value=zj({scene:s.value,canvas:e,windowSize:r.windowSize??!1,rendererOptions:r,emit:i});let{registerCamera:t,camera:n,cameras:a,deregisterCamera:c}=f.value;u(f.value);let l=()=>{let e=new Jh(45,window.innerWidth/window.innerHeight,.1,1e3);e.position.set(3,3,3),e.lookAt(0,0,0),t(e);let n=Aa(()=>{a.value.length>=2&&(e.removeFromParent(),c(e),n?.())})};V(()=>r.camera,(e,n)=>{e&&t(e),n&&(n.removeFromParent(),c(n))},{immediate:!0}),n.value||l()}),ri(p),(e,t)=>(to(),oo(`canvas`,{ref_key:`canvas`,ref:o,"data-scene":s.value.uuid,class:Se(e.$attrs.class),"data-tres":`tresjs ${_n(uA).version}`,style:L({display:`block`,width:`100%`,height:`100%`,position:e.windowSize?`fixed`:`relative`,top:0,left:0,pointerEvents:`auto`,touchAction:`none`,...e.$attrs.style})},null,14,xM))}}),CM=[`TresCanvas`,`TresLeches`,`TresScene`],wM={template:{compilerOptions:{isCustomElement:e=>e.startsWith(`Tres`)&&!CM.includes(e)||e===`primitive`}}},{logWarning:TM}=xj();var EM=class extends F_{constructor(e,t){let n=[1,1,0,-1,1,0,-1,-1,0,1,-1,0,1,1,0],r=new bh;r.setAttribute(`position`,new q(n,3)),r.computeBoundingSphere();let i=new D_({fog:!1});super(r,i),this.light=e,this.color=t,this.type=`RectAreaLightHelper`;let a=[1,1,0,-1,1,0,-1,-1,0,1,1,0,-1,-1,0,1,-1,0],o=new bh;o.setAttribute(`position`,new q(a,3)),o.computeBoundingSphere(),this.add(new Mh(o,new Ym({side:Wc,fog:!1})))}updateMatrixWorld(){if(this.scale.set(.5*this.light.width,.5*this.light.height,1),this.color!==void 0)this.material.color.set(this.color),this.children[0].material.color.set(this.color);else{this.material.color.copy(this.light.color).multiplyScalar(this.light.intensity);let e=this.material.color,t=Math.max(e.r,e.g,e.b);t>1&&e.multiplyScalar(1/t),this.children[0].material.color.copy(this.material.color)}this.matrixWorld.extractRotation(this.light.matrixWorld).scale(this.scale).copyPosition(this.light.matrixWorld),this.children[0].matrixWorld.copy(this.matrixWorld)}dispose(){this.geometry.dispose(),this.material.dispose(),this.children[0].geometry.dispose(),this.children[0].material.dispose()}};const{logWarning:DM}=xj();let OM,kM;const AM={DirectionalLight:FS,PointLight:TS,SpotLight:yS,HemisphereLight:kS,RectAreaLight:EM},jM={mounted:e=>{if(!e.isLight){DM(`${e.type} is not a light`);return}OM=AM[e.type],e.parent.add(new OM(e,1,e.color.getHex()))},updated:e=>{kM=e.parent.children.find(e=>e instanceof OM),!(kM instanceof EM)&&kM.update()},unmounted:e=>{if(!e.isLight){DM(`${e.type} is not a light`);return}kM=e.parent.children.find(e=>e instanceof OM),kM&&kM.dispose&&kM.dispose(),e.parent&&e.parent.remove(kM)}},MM={mounted:(e,t)=>{if(t.arg){console.log(`v-log:${t.arg}`,e[t.arg]);return}console.log(`v-log`,e)}},NM={install(e){e.component(`TresCanvas`,SM)}};var PM=c((exports,t)=>{(function(n,r){typeof define==`function`&&define.amd?define(r):typeof exports==`object`?t.exports=r():n.NProgress=r()})(void 0,function(){var e={};e.version=`0.2.0`;var t=e.settings={minimum:.08,easing:`ease`,positionUsing:``,speed:200,trickle:!0,trickleRate:.02,trickleSpeed:800,showSpinner:!0,barSelector:`[role="bar"]`,spinnerSelector:`[role="spinner"]`,parent:`body`,template:`
`};e.configure=function(e){var n,r;for(n in e)r=e[n],r!==void 0&&e.hasOwnProperty(n)&&(t[n]=r);return this},e.status=null,e.set=function(r){var s=e.isStarted();r=n(r,t.minimum,1),e.status=r===1?null:r;var c=e.render(!s),l=c.querySelector(t.barSelector),u=t.speed,d=t.easing;return c.offsetWidth,a(function(n){t.positionUsing===``&&(t.positionUsing=e.getPositioningCSS()),o(l,i(r,u,d)),r===1?(o(c,{transition:`none`,opacity:1}),c.offsetWidth,setTimeout(function(){o(c,{transition:`all `+u+`ms linear`,opacity:0}),setTimeout(function(){e.remove(),n()},u)},u)):setTimeout(n,u)}),this},e.isStarted=function(){return typeof e.status==`number`},e.start=function(){e.status||e.set(0);var n=function(){setTimeout(function(){e.status&&(e.trickle(),n())},t.trickleSpeed)};return t.trickle&&n(),this},e.done=function(t){return!t&&!e.status?this:e.inc(.3+.5*Math.random()).set(1)},e.inc=function(t){var r=e.status;return r?(typeof t!=`number`&&(t=(1-r)*n(Math.random()*r,.1,.95)),r=n(r+t,0,.994),e.set(r)):e.start()},e.trickle=function(){return e.inc(Math.random()*t.trickleRate)},function(){var t=0,n=0;e.promise=function(r){return!r||r.state()===`resolved`?this:(n===0&&e.start(),t++,n++,r.always(function(){n--,n===0?(t=0,e.done()):e.set((t-n)/t)}),this)}}(),e.render=function(n){if(e.isRendered())return document.getElementById(`nprogress`);c(document.documentElement,`nprogress-busy`);var i=document.createElement(`div`);i.id=`nprogress`,i.innerHTML=t.template;var a=i.querySelector(t.barSelector),s=n?`-100`:r(e.status||0),l=document.querySelector(t.parent),u;return o(a,{transition:`all 0 linear`,transform:`translate3d(`+s+`%,0,0)`}),t.showSpinner||(u=i.querySelector(t.spinnerSelector),u&&d(u)),l!=document.body&&c(l,`nprogress-custom-parent`),l.appendChild(i),i},e.remove=function(){l(document.documentElement,`nprogress-busy`),l(document.querySelector(t.parent),`nprogress-custom-parent`);var e=document.getElementById(`nprogress`);e&&d(e)},e.isRendered=function(){return!!document.getElementById(`nprogress`)},e.getPositioningCSS=function(){var e=document.body.style,t=`WebkitTransform`in e?`Webkit`:`MozTransform`in e?`Moz`:`msTransform`in e?`ms`:`OTransform`in e?`O`:``;return t+`Perspective`in e?`translate3d`:t+`Transform`in e?`translate`:`margin`};function n(e,t,n){return en?n:e}function r(e){return(-1+e)*100}function i(e,n,i){var a;return a=t.positionUsing===`translate3d`?{transform:`translate3d(`+r(e)+`%,0,0)`}:t.positionUsing===`translate`?{transform:`translate(`+r(e)+`%,0)`}:{"margin-left":r(e)+`%`},a.transition=`all `+n+`ms `+i,a}var a=function(){var e=[];function t(){var n=e.shift();n&&n(t)}return function(n){e.push(n),e.length==1&&t()}}(),o=function(){var e=[`Webkit`,`O`,`Moz`,`ms`],t={};function n(e){return e.replace(/^-ms-/,`ms-`).replace(/-([\da-z])/gi,function(e,t){return t.toUpperCase()})}function r(t){var n=document.body.style;if(t in n)return t;for(var r=e.length,i=t.charAt(0).toUpperCase()+t.slice(1),a;r--;)if(a=e[r]+i,a in n)return a;return t}function i(e){return e=n(e),t[e]||(t[e]=r(e))}function a(e,t,n){t=i(t),e.style[t]=n}return function(e,t){var n=arguments,r,i;if(n.length==2)for(r in t)i=t[r],i!==void 0&&t.hasOwnProperty(r)&&a(e,r,i);else a(e,n[1],n[2])}}();function s(e,t){var n=typeof e==`string`?e:u(e);return n.indexOf(` `+t+` `)>=0}function c(e,t){var n=u(e),r=n+t;s(n,t)||(e.className=r.substring(1))}function l(e,t){var n=u(e),r;s(e,t)&&(r=n.replace(` `+t+` `,` `),e.className=r.substring(1,r.length-1))}function u(e){return(` `+(e.className||``)+` `).replace(/\s+/gi,` `)}function d(e){e&&e.parentNode&&e.parentNode.removeChild(e)}return e})});const FM=new Set,IM=new WeakMap,LM=new WeakMap,RM=new WeakMap,zM=new WeakMap,BM=new WeakMap,VM=new WeakMap,HM=new WeakMap,UM=new WeakSet;let WM,GM=0,KM=0;const qM=`__aa_tgt`,JM=`__aa_del`,YM=`__aa_new`,XM=e=>{let t=oN(e);t&&t.forEach(e=>cN(e))},ZM=e=>{e.forEach(e=>{e.target===WM&&eN(),IM.has(e.target)&&$M(e.target)})};function QM(e){let t=zM.get(e);t?.disconnect();let n=IM.get(e),r=0,i=5;n||(n=dN(e),IM.set(e,n));let{offsetWidth:a,offsetHeight:o}=WM,s=[n.top-i,a-(n.left+i+n.width),o-(n.top+i+n.height),n.left-i],c=s.map(e=>`${-1*Math.floor(e)}px`).join(` `),l=new IntersectionObserver(()=>{++r>1&&$M(e)},{root:WM,threshold:1,rootMargin:c});l.observe(e),zM.set(e,l)}function $M(e){clearTimeout(HM.get(e));let t=pN(e),n=vN(t)?500:t.duration;HM.set(e,setTimeout(async()=>{let t=RM.get(e);try{await t?.finished,IM.set(e,dN(e)),QM(e)}catch{}},n))}function eN(){clearTimeout(HM.get(WM)),HM.set(WM,setTimeout(()=>{FM.forEach(e=>gN(e,e=>nN(()=>$M(e))))},100))}function tN(e){setTimeout(()=>{BM.set(e,setInterval(()=>nN($M.bind(null,e)),2e3))},Math.round(2e3*Math.random()))}function nN(e){typeof requestIdleCallback==`function`?requestIdleCallback(()=>e()):requestAnimationFrame(()=>e())}let rN,iN;const aN=typeof window<`u`&&`ResizeObserver`in window;aN&&(WM=document.documentElement,rN=new MutationObserver(XM),iN=new ResizeObserver(ZM),window.addEventListener(`scroll`,()=>{KM=window.scrollY,GM=window.scrollX}),iN.observe(WM));function oN(e){let t=e.reduce((e,t)=>[...e,...Array.from(t.addedNodes),...Array.from(t.removedNodes)],[]),n=t.every(e=>e.nodeName===`#comment`);return n?!1:e.reduce((e,t)=>{if(e===!1)return!1;if(t.target instanceof Element){if(sN(t.target),!e.has(t.target)){e.add(t.target);for(let n=0;nt(e,VM.has(e)));for(let n=0;ne(r,VM.has(r)))}}function _N(e){return Array.isArray(e)?e:[e]}function vN(e){return typeof e==`function`}function yN(e){let t=IM.get(e),n=dN(e);if(!hN(e))return IM.set(e,n);let r;if(!t)return;let i=pN(e);if(typeof i!=`function`){let a=t.left-n.left,o=t.top-n.top,[s,c,l,u]=fN(e,t,n),d={transform:`translate(${a}px, ${o}px)`},f={transform:`translate(0, 0)`};s!==c&&(d.width=`${s}px`,f.width=`${c}px`),l!==u&&(d.height=`${l}px`,f.height=`${u}px`),r=e.animate([d,f],{duration:i.duration,easing:i.easing})}else{let[a]=_N(i(e,`remain`,t,n));r=new Animation(a),r.play()}RM.set(e,r),IM.set(e,n),r.addEventListener(`finish`,$M.bind(null,e))}function bN(e){YM in e&&delete e[YM];let t=dN(e);IM.set(e,t);let n=pN(e);if(!hN(e))return;let r;if(typeof n!=`function`)r=e.animate([{transform:`scale(.98)`,opacity:0},{transform:`scale(0.98)`,opacity:0,offset:.5},{transform:`scale(1)`,opacity:1}],{duration:n.duration*1.5,easing:`ease-in`});else{let[i]=_N(n(e,`add`,t));r=new Animation(i),r.play()}RM.set(e,r),r.addEventListener(`finish`,$M.bind(null,e))}function xN(e,t){var n;e.remove(),IM.delete(e),LM.delete(e),RM.delete(e),(n=zM.get(e))==null||n.disconnect(),setTimeout(()=>{if(JM in e&&delete e[JM],Object.defineProperty(e,YM,{value:!0,configurable:!0}),t&&e instanceof HTMLElement)for(let n in t)e.style[n]=``},0)}function SN(e){var t;if(!LM.has(e)||!IM.has(e))return;let[n,r]=LM.get(e);Object.defineProperty(e,JM,{value:!0,configurable:!0});let i=window.scrollX,a=window.scrollY;if(r&&r.parentNode&&r.parentNode instanceof Element?r.parentNode.insertBefore(e,r):n&&n.parentNode?n.parentNode.appendChild(e):(t=mN(e))==null||t.appendChild(e),!hN(e))return xN(e);let[o,s,c,l]=wN(e),u=pN(e),d=IM.get(e);(i!==GM||a!==KM)&&CN(e,i,a,u);let f,p={position:`absolute`,top:`${o}px`,left:`${s}px`,width:`${c}px`,height:`${l}px`,margin:`0`,pointerEvents:`none`,transformOrigin:`center`,zIndex:`100`};if(!vN(u))Object.assign(e.style,p),f=e.animate([{transform:`scale(1)`,opacity:1},{transform:`scale(.98)`,opacity:0}],{duration:u.duration,easing:`ease-out`});else{let[t,n]=_N(u(e,`remove`,d));n?.styleReset!==!1&&(p=n?.styleReset||p,Object.assign(e.style,p)),f=new Animation(t),f.play()}RM.set(e,f),f.addEventListener(`finish`,xN.bind(null,e,p))}function CN(e,t,n,r){let i=GM-t,a=KM-n,o=document.documentElement.style.scrollBehavior,s=getComputedStyle(WM).scrollBehavior;if(s===`smooth`&&(document.documentElement.style.scrollBehavior=`auto`),window.scrollTo(window.scrollX+i,window.scrollY+a),!e.parentElement)return;let c=e.parentElement,l=c.clientHeight,u=c.clientWidth,d=performance.now();function f(){requestAnimationFrame(()=>{if(!vN(r)){let e=l-c.clientHeight,t=u-c.clientWidth;d+r.duration>performance.now()?(window.scrollTo({left:window.scrollX-t,top:window.scrollY-e}),l=c.clientHeight,u=c.clientWidth,f()):document.documentElement.style.scrollBehavior=o}})}f()}function wN(e){let t=IM.get(e),[n,,r]=fN(e,t,dN(e)),i=e.parentElement;for(;i&&(getComputedStyle(i).position===`static`||i instanceof HTMLBodyElement);)i=i.parentElement;i||=document.body;let a=getComputedStyle(i),o=IM.get(i)||dN(i),s=Math.round(t.top-o.top)-lN(a.borderTopWidth),c=Math.round(t.left-o.left)-lN(a.borderLeftWidth);return[s,c,n,r]}function TN(e,t={}){if(rN&&iN){let n=window.matchMedia(`(prefers-reduced-motion: reduce)`),r=n.matches&&!vN(t)&&!t.disrespectUserMotionPreference;r||(UM.add(e),getComputedStyle(e).position===`static`&&Object.assign(e.style,{position:`relative`}),gN(e,$M,tN,e=>iN?.observe(e)),vN(t)?VM.set(e,t):VM.set(e,{duration:250,easing:`ease-in-out`,...t}),rN.observe(e,{childList:!0}),FM.add(e))}return Object.freeze({parent:e,enable:()=>{UM.add(e)},disable:()=>{UM.delete(e)},isEnabled:()=>UM.has(e)})}const EN={mounted:(e,t)=>{TN(e,t.value||{})},getSSRProps:()=>({})},DN=EN,ON={install(e){e.directive(`auto-animate`,DN)}};function kN(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return t!==null&&t!==Object.prototype&&Object.getPrototypeOf(t)!==null||Symbol.iterator in e?!1:Symbol.toStringTag in e?Object.prototype.toString.call(e)===`[object Module]`:!0}function AN(e,t,n=`.`,r){if(!kN(t))return AN(e,{},n,r);let i=Object.assign({},t);for(let t in e){if(t===`__proto__`||t===`constructor`)continue;let a=e[t];if(a==null||r&&r(i,t,a,n))continue;Array.isArray(a)&&Array.isArray(i[t])?i[t]=[...a,...i[t]]:kN(a)&&kN(i[t])?i[t]=AN(a,i[t],(n?`${n}.`:``)+t.toString(),r):i[t]=a}return i}function jN(e){return(...t)=>t.reduce((t,n)=>AN(t,n,``,e),{})}const MN=jN(),NN=jN((e,t,n)=>{if(e[t]!==void 0&&typeof n==`function`)return e[t]=n(e[t]),!0}),PN=jN((e,t,n)=>{if(Array.isArray(e[t])&&typeof n==`function`)return e[t]=n(e[t]),!0});function FN(e){return ze()?(Be(e),!0):!1}function IN(){let e=new Set,t=t=>{e.delete(t)},n=()=>{e.clear()},r=n=>{e.add(n);let r=()=>t(n);return FN(r),{off:r}},i=(...t)=>Promise.all(Array.from(e).map(e=>e(...t)));return{on:r,off:t,trigger:i,clear:n}}const LN=new WeakMap,RN=(...e)=>{var t;let n=e[0],r=(t=Ao())?.proxy;if(r==null&&!Qi())throw Error(`injectLocal must be called in setup`);return r&&LN.has(r)&&n in LN.get(r)?LN.get(r)[n]:Zi(...e)},zN=typeof window<`u`&&typeof document<`u`,BN=typeof WorkerGlobalScope<`u`&&globalThis instanceof WorkerGlobalScope,VN=e=>e!=null,HN=Object.prototype.toString,UN=e=>HN.call(e)===`[object Object]`,WN=()=>{},GN=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);function KN(...e){if(e.length!==1)return Tn(...e);let t=e[0];return typeof t==`function`?tn(xn(()=>({get:t,set:WN}))):R(t)}function qN(e,t){function n(...n){return new Promise((r,i)=>{Promise.resolve(e(()=>t.apply(this,n),{fn:t,thisArg:this,args:n})).then(r).catch(i)})}return n}const JN=e=>e();function YN(e,t={}){let n,r,i=WN,a=e=>{clearTimeout(e),i(),i=WN},o,s=s=>{let c=B(e),l=B(t.maxWait);return n&&a(n),c<=0||l!==void 0&&l<=0?(r&&(a(r),r=void 0),Promise.resolve(s())):new Promise((e,u)=>{i=t.rejectOnCancel?u:e,o=s,l&&!r&&(r=setTimeout(()=>{n&&a(n),r=void 0,e(o())},l)),n=setTimeout(()=>{r&&a(r),r=void 0,e(s())},c)})};return s}function XN(...e){let t=0,n,r=!0,i=WN,a,o,s,c,l;!pn(e[0])&&typeof e[0]==`object`?{delay:o,trailing:s=!0,leading:c=!0,rejectOnCancel:l=!1}=e[0]:[o,s=!0,c=!0,l=!1]=e;let u=()=>{n&&(clearTimeout(n),n=void 0,i(),i=WN)},d=e=>{let d=B(o),f=Date.now()-t,p=()=>a=e();return u(),d<=0?(t=Date.now(),p()):(f>d&&(c||!r)?(t=Date.now(),p()):s&&(a=new Promise((e,a)=>{i=l?a:e,n=setTimeout(()=>{t=Date.now(),r=!0,e(p()),u()},Math.max(0,d-f))})),!c&&!n&&(n=setTimeout(()=>r=!0,d)),r=!1,a)};return d}function ZN(e=JN,t={}){let{initialState:n=`active`}=t,r=KN(n===`active`);function i(){r.value=!1}function a(){r.value=!0}let o=(...t)=>{r.value&&e(...t)};return{isActive:tn(r),pause:i,resume:a,eventFilter:o}}function QN(e){let t;function n(){return t||=e(),t}return n.reset=async()=>{let e=t;t=void 0,e&&await e},n}function $N(e,t){var n;if(typeof e==`number`)return e+t;let r=(n=e.match(/^-?\d+\.?\d*/))?.[0]||``,i=e.slice(r.length),a=Number.parseFloat(r)+t;return Number.isNaN(a)?e:a+i}function eP(e){return e.endsWith(`rem`)?Number.parseFloat(e)*16:Number.parseFloat(e)}function tP(e,t,n=!1){return t.reduce((t,r)=>(r in e&&(!n||e[r]!==void 0)&&(t[r]=e[r]),t),{})}function nP(e){return Array.isArray(e)?e:[e]}function rP(e){let t=Object.create(null);return n=>{let r=t[n];return r||(t[n]=e(n))}}const iP=/\B([A-Z])/g,aP=rP(e=>e.replace(iP,`-$1`).toLowerCase()),oP=/-(\w)/g,sP=rP(e=>e.replace(oP,(e,t)=>t?t.toUpperCase():``));function cP(e){return e||Ao()}function lP(e,t=200,n={}){return qN(YN(t,n),e)}function uP(e,t=200,n={}){let r=R(B(e)),i=lP(()=>{r.value=e.value},t,n);return V(e,()=>i()),nn(r)}function dP(e,t=200,n=!1,r=!0,i=!1){return qN(XN(t,n,r,i),e)}function fP(e,t=200,n=!0,r=!0){if(t<=0)return e;let i=R(B(e)),a=dP(()=>{i.value=e.value},t,n,r);return V(e,()=>a()),i}function pP(e,t,n={}){let{eventFilter:r=JN,...i}=n;return V(e,qN(r,t),i)}function mP(e,t,n={}){let{eventFilter:r,initialState:i=`active`,...a}=n,{eventFilter:o,pause:s,resume:c,isActive:l}=ZN(r,{initialState:i}),u=pP(e,t,{...a,eventFilter:o});return{stop:u,pause:s,resume:c,isActive:l}}function hP(e,t={}){if(!pn(e))return Sn(e);let n=Array.isArray(e.value)?Array.from({length:e.value.length}):{};for(let r in e.value)n[r]=xn(()=>({get(){return e.value[r]},set(n){var i;let a=(i=B(t.replaceRef))??!0;if(a)if(Array.isArray(e.value)){let t=[...e.value];t[r]=n,e.value=t}else{let t={...e.value,[r]:n};Object.setPrototypeOf(t,Object.getPrototypeOf(e.value)),e.value=t}else e.value[r]=n}}));return n}function gP(e,t=!0,n){let r=cP(n);r?$r(e,n):t?e():Kn(e)}function _P(e,t){let n=cP(t);n&&ri(e,t)}function vP(e,t,n={}){let{immediate:r=!0,immediateCallback:i=!1}=n,a=z(!1),o;function s(){o&&(clearTimeout(o),o=void 0)}function c(){a.value=!1,s()}function l(...n){i&&e(),s(),a.value=!0,o=setTimeout(()=>{a.value=!1,o=void 0,e(...n)},B(t))}return r&&(a.value=!0,zN&&l()),FN(c),{isPending:nn(a),start:l,stop:c}}function yP(e,t,n={}){let{debounce:r=0,maxWait:i=void 0,...a}=n;return pP(e,t,{...a,eventFilter:YN(r,{maxWait:i})})}function bP(e,t,n){return V(e,t,{...n,immediate:!0})}function xP(e,t,n){let r;r=pn(n)?{evaluating:n}:n||{};let{lazy:i=!1,flush:a=`pre`,evaluating:o=void 0,shallow:s=!0,onError:c=WN}=r,l=z(!i),u=s?z(t):R(t),d=0;return Aa(async t=>{if(!l.value)return;d++;let n=d,r=!1;o&&Promise.resolve().then(()=>{o.value=!0});try{let i=await e(e=>{t(()=>{o&&(o.value=!1),r||e()})});n===d&&(u.value=i)}catch(e){c(e)}finally{o&&n===d&&(o.value=!1),r=!0}},{flush:a}),i?H(()=>(l.value=!0,u.value)):u}const SP=zN?window:void 0,CP=zN?window.document:void 0,wP=zN?window.navigator:void 0,TP=zN?window.location:void 0;function EP(e){var t;let n=B(e);return(t=n?.$el)??n}function DP(...e){let t=[],n=()=>{t.forEach(e=>e()),t.length=0},r=(e,t,n,r)=>(e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)),i=H(()=>{let t=nP(B(e[0])).filter(e=>e!=null);return t.every(e=>typeof e!=`string`)?t:void 0}),a=bP(()=>{var t,n;return[(n=(t=i.value)?.map(e=>EP(e)))??[SP].filter(e=>e!=null),nP(B(i.value?e[1]:e[0])),nP(_n(i.value?e[2]:e[1])),B(i.value?e[3]:e[2])]},([e,i,a,o])=>{if(n(),!e?.length||!i?.length||!a?.length)return;let s=UN(o)?{...o}:o;t.push(...e.flatMap(e=>i.flatMap(t=>a.map(n=>r(e,t,n,s)))))},{flush:`post`}),o=()=>{a(),n()};return FN(n),o}function OP(){let e=z(!1),t=Ao();return t&&$r(()=>{e.value=!0},t),e}function kP(e){let t=OP();return H(()=>(t.value,!!e()))}function AP(e,t,n={}){let{window:r=SP,...i}=n,a,o=kP(()=>r&&`MutationObserver`in r),s=()=>{a&&(a.disconnect(),a=void 0)},c=H(()=>{let t=B(e),n=nP(t).map(EP).filter(VN);return new Set(n)}),l=V(()=>c.value,e=>{s(),o.value&&e.size&&(a=new MutationObserver(t),e.forEach(e=>a.observe(e,i)))},{immediate:!0,flush:`post`}),u=()=>a?.takeRecords(),d=()=>{l(),s()};return FN(d),{isSupported:o,stop:d,takeRecords:u}}const jP=Symbol(`vueuse-ssr-width`);function MP(){let e=Qi()?RN(jP,null):null;return typeof e==`number`?e:void 0}function NP(e,t={}){let{window:n=SP,ssrWidth:r=MP()}=t,i=kP(()=>n&&`matchMedia`in n&&typeof n.matchMedia==`function`),a=z(typeof r==`number`),o=z(),s=z(!1),c=e=>{s.value=e.matches};return Aa(()=>{if(a.value){a.value=!i.value;let t=B(e).split(`,`);s.value=t.some(e=>{let t=e.includes(`not all`),n=e.match(/\(\s*min-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/),i=e.match(/\(\s*max-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/),a=!!(n||i);return n&&a&&(a=r>=eP(n[1])),i&&a&&(a=r<=eP(i[1])),t?!a:a});return}i.value&&(o.value=n.matchMedia(B(e)),s.value=o.value.matches)}),DP(o,`change`,c,{passive:!0}),H(()=>s.value)}const PP={sm:640,md:768,lg:1024,xl:1280,"2xl":1536};function FP(e,t={}){function n(t,n){let r=B(e[B(t)]);return n!=null&&(r=$N(r,n)),typeof r==`number`&&(r=`${r}px`),r}let{window:r=SP,strategy:i=`min-width`,ssrWidth:a=MP()}=t,o=typeof a==`number`,s=o?z(!1):{value:!0};o&&gP(()=>s.value=!!r);function c(e,t){return!s.value&&o?e===`min`?a>=eP(t):a<=eP(t):r?r.matchMedia(`(${e}-width: ${t})`).matches:!1}let l=e=>NP(()=>`(min-width: ${n(e)})`,t),u=e=>NP(()=>`(max-width: ${n(e)})`,t),d=Object.keys(e).reduce((e,t)=>(Object.defineProperty(e,t,{get:()=>i===`min-width`?l(t):u(t),enumerable:!0,configurable:!0}),e),{});function f(){let t=Object.keys(e).map(e=>[e,d[e],eP(n(e))]).sort((e,t)=>e[2]-t[2]);return H(()=>t.filter(([,e])=>e.value).map(([e])=>e))}return Object.assign(d,{greaterOrEqual:l,smallerOrEqual:u,greater(e){return NP(()=>`(min-width: ${n(e,.1)})`,t)},smaller(e){return NP(()=>`(max-width: ${n(e,-.1)})`,t)},between(e,r){return NP(()=>`(min-width: ${n(e)}) and (max-width: ${n(r,-.1)})`,t)},isGreater(e){return c(`min`,n(e,.1))},isGreaterOrEqual(e){return c(`min`,n(e))},isSmaller(e){return c(`max`,n(e,-.1))},isSmallerOrEqual(e){return c(`max`,n(e))},isInBetween(e,t){return c(`min`,n(e))&&c(`max`,n(t,-.1))},current:f,active(){let e=f();return H(()=>e.value.length===0?``:e.value.at(i===`min-width`?-1:0))}})}function IP(e,t={}){let{controls:n=!1,navigator:r=wP}=t,i=kP(()=>r&&`permissions`in r),a=z(),o=typeof e==`string`?{name:e}:e,s=z(),c=()=>{var e,t;s.value=(t=(e=a.value)?.state)??`prompt`};DP(a,`change`,c,{passive:!0});let l=QN(async()=>{if(i.value){if(!a.value)try{a.value=await r.permissions.query(o)}catch{a.value=void 0}finally{c()}if(n)return ln(a.value)}});return l(),n?{state:s,isSupported:i,query:l}:s}function LP(e={}){let{navigator:t=wP,read:n=!1,source:r,copiedDuring:i=1500,legacy:a=!1}=e,o=kP(()=>t&&`clipboard`in t),s=IP(`clipboard-read`),c=IP(`clipboard-write`),l=H(()=>o.value||a),u=z(``),d=z(!1),f=vP(()=>d.value=!1,i,{immediate:!1});async function p(){let e=!(o.value&&_(s.value));if(!e)try{u.value=await t.clipboard.readText()}catch{e=!0}e&&(u.value=g())}l.value&&n&&DP([`copy`,`cut`],p,{passive:!0});async function m(e=B(r)){if(l.value&&e!=null){let n=!(o.value&&_(c.value));if(!n)try{await t.clipboard.writeText(e)}catch{n=!0}n&&h(e),u.value=e,d.value=!0,f.start()}}function h(e){let t=document.createElement(`textarea`);t.value=e??``,t.style.position=`absolute`,t.style.opacity=`0`,document.body.appendChild(t),t.select(),document.execCommand(`copy`),t.remove()}function g(){var e,t,n;return(n=(t=(e=document==null?void 0:document.getSelection)?.call(document))?.toString())??``}function _(e){return e===`granted`||e===`prompt`}return{isSupported:l,text:u,copied:d,copy:m}}const RP=typeof globalThis<`u`?globalThis:typeof window<`u`?window:typeof global<`u`?global:typeof self<`u`?self:{},zP=`__vueuse_ssr_handlers__`,BP=VP();function VP(){return zP in RP||(RP[zP]=RP[zP]||{}),RP[zP]}function HP(e,t){return BP[e]||t}function UP(e){return NP(`(prefers-color-scheme: dark)`,e)}function WP(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 GP={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()}},KP=`vueuse-storage`;function qP(e,t,n,r={}){var i;let{flush:a=`pre`,deep:o=!0,listenToStorageChanges:s=!0,writeDefaults:c=!0,mergeDefaults:l=!1,shallow:u,window:d=SP,eventFilter:f,onError:p=e=>{console.error(e)},initOnMounted:m}=r,h=(u?z:R)(typeof t==`function`?t():t),g=H(()=>B(e));if(!n)try{n=HP(`getDefaultStorage`,()=>{var e;return(e=SP)?.localStorage})()}catch(e){p(e)}if(!n)return h;let _=B(t),v=WP(_),y=(i=r.serializer)??GP[v],{pause:b,resume:x}=mP(h,()=>E(h.value),{flush:a,deep:o,eventFilter:f});V(g,()=>O(),{flush:a});let S=!1,C=e=>{m&&!S||O(e)},w=e=>{m&&!S||k(e)};d&&s&&(n instanceof Storage?DP(d,`storage`,C,{passive:!0}):DP(d,KP,w)),m?gP(()=>{S=!0,O()}):O();function T(e,t){if(d){let r={key:g.value,oldValue:e,newValue:t,storageArea:n};d.dispatchEvent(n instanceof Storage?new StorageEvent(`storage`,r):new CustomEvent(KP,{detail:r}))}}function E(e){try{let t=n.getItem(g.value);if(e==null)T(t,null),n.removeItem(g.value);else{let r=y.write(e);t!==r&&(n.setItem(g.value,r),T(t,r))}}catch(e){p(e)}}function D(e){let t=e?e.newValue:n.getItem(g.value);if(t==null)return c&&_!=null&&n.setItem(g.value,y.write(_)),_;if(!e&&l){let e=y.read(t);return typeof l==`function`?l(e,_):v===`object`&&!Array.isArray(e)?{..._,...e}:e}else if(typeof t!=`string`)return t;else return y.read(t)}function O(e){if(!(e&&e.storageArea!==n)){if(e&&e.key==null){h.value=_;return}if(!(e&&e.key!==g.value)){b();try{e?.newValue!==y.write(h.value)&&(h.value=D(e))}catch(e){p(e)}finally{e?Kn(x):x()}}}}function k(e){O(e.detail)}return h}const JP=`*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}`;function YP(e={}){let{selector:t=`html`,attribute:n=`class`,initialValue:r=`auto`,window:i=SP,storage:a,storageKey:o=`vueuse-color-scheme`,listenToStorageChanges:s=!0,storageRef:c,emitAuto:l,disableTransition:u=!0}=e,d={auto:``,light:`light`,dark:`dark`,...e.modes||{}},f=UP({window:i}),p=H(()=>f.value?`dark`:`light`),m=c||(o==null?KN(r):qP(o,r,a,{window:i,listenToStorageChanges:s})),h=H(()=>m.value===`auto`?p.value:m.value),g=HP(`updateHTMLAttrs`,(e,t,n)=>{let r=typeof e==`string`?i?.document.querySelector(e):EP(e);if(!r)return;let a=new Set,o=new Set,s=null;if(t===`class`){let e=n.split(/\s/g);Object.values(d).flatMap(e=>(e||``).split(/\s/g)).filter(Boolean).forEach(t=>{e.includes(t)?a.add(t):o.add(t)})}else s={key:t,value:n};if(a.size===0&&o.size===0&&s===null)return;let c;u&&(c=i.document.createElement(`style`),c.appendChild(document.createTextNode(JP)),i.document.head.appendChild(c));for(let e of a)r.classList.add(e);for(let e of o)r.classList.remove(e);s&&r.setAttribute(s.key,s.value),u&&(i.getComputedStyle(c).opacity,document.head.removeChild(c))});function _(e){var r;g(t,n,(r=d[e])??e)}function v(t){e.onChanged?e.onChanged(t,_):_(t)}V(h,v,{flush:`post`,immediate:!0}),gP(()=>v(h.value));let y=H({get(){return l?m.value:h.value},set(e){m.value=e}});return Object.assign(y,{store:m,system:p,state:h})}function XP(e,t,n={}){let{window:r=SP,initialValue:i,observe:a=!1}=n,o=z(i),s=H(()=>{var e;return EP(t)||(e=r?.document)?.documentElement});function c(){var t;let n=B(e),a=B(s);if(a&&r&&n){let e=(t=r.getComputedStyle(a).getPropertyValue(n))?.trim();o.value=e||o.value||i}}return a&&AP(s,c,{attributeFilter:[`style`,`class`],window:r}),V([s,()=>B(e)],(e,t)=>{t[0]&&t[1]&&t[0].style.removeProperty(t[1]),c()},{immediate:!0}),V([o,s],([t,n])=>{let r=B(e);n?.style&&r&&(t==null?n.style.removeProperty(r):n.style.setProperty(r,t))},{immediate:!0}),o}function ZP(e={}){let{valueDark:t=`dark`,valueLight:n=``}=e,r=YP({...e,onChanged:(t,n)=>{var r;e.onChanged?(r=e.onChanged)==null||r.call(e,t===`dark`,n,t):n(t)},modes:{dark:t,light:n}}),i=H(()=>r.system.value),a=H({get(){return r.value===`dark`},set(e){let t=e?`dark`:`light`;i.value===t?r.value=`auto`:r.value=t}});return a}function QP(e={}){let{navigator:t=wP,requestPermissions:n=!1,constraints:r={audio:!0,video:!0},onUpdated:i}=e,a=R([]),o=H(()=>a.value.filter(e=>e.kind===`videoinput`)),s=H(()=>a.value.filter(e=>e.kind===`audioinput`)),c=H(()=>a.value.filter(e=>e.kind===`audiooutput`)),l=kP(()=>t&&t.mediaDevices&&t.mediaDevices.enumerateDevices),u=z(!1),d;async function f(){l.value&&(a.value=await t.mediaDevices.enumerateDevices(),i?.(a.value),d&&(d.getTracks().forEach(e=>e.stop()),d=null))}async function p(){let e=r.video?`camera`:`microphone`;if(!l.value)return!1;if(u.value)return!0;let{state:n,query:i}=IP(e,{controls:!0});if(await i(),n.value!==`granted`){let e=!0;try{let e=await t.mediaDevices.enumerateDevices(),n=e.some(e=>e.kind===`videoinput`),i=e.some(e=>e.kind===`audioinput`||e.kind===`audiooutput`);r.video=n?r.video:!1,r.audio=i?r.audio:!1,d=await t.mediaDevices.getUserMedia(r)}catch{d=null,e=!1}f(),u.value=e}else u.value=!0;return u.value}return l.value&&(n&&p(),DP(t.mediaDevices,`devicechange`,f,{passive:!0}),f()),{devices:a,ensurePermissions:p,permissionGranted:u,videoInputs:o,audioInputs:s,audioOutputs:c,isSupported:l}}function $P(e,t,n={}){let{window:r=SP,...i}=n,a,o=kP(()=>r&&`ResizeObserver`in r),s=()=>{a&&(a.disconnect(),a=void 0)},c=H(()=>{let t=B(e);return Array.isArray(t)?t.map(e=>EP(e)):[EP(t)]}),l=V(c,e=>{if(s(),o.value&&r){a=new ResizeObserver(t);for(let t of e)t&&a.observe(t,i)}},{immediate:!0,flush:`post`}),u=()=>{s(),l()};return FN(u),{isSupported:o,stop:u}}function eF(e,t={}){let{reset:n=!0,windowResize:r=!0,windowScroll:i=!0,immediate:a=!0,updateTiming:o=`sync`}=t,s=z(0),c=z(0),l=z(0),u=z(0),d=z(0),f=z(0),p=z(0),m=z(0);function h(){let t=EP(e);if(!t){n&&(s.value=0,c.value=0,l.value=0,u.value=0,d.value=0,f.value=0,p.value=0,m.value=0);return}let r=t.getBoundingClientRect();s.value=r.height,c.value=r.bottom,l.value=r.left,u.value=r.right,d.value=r.top,f.value=r.width,p.value=r.x,m.value=r.y}function g(){o===`sync`?h():o===`next-frame`&&requestAnimationFrame(()=>h())}return $P(e,g),V(()=>EP(e),e=>!e&&g()),AP(e,g,{attributeFilter:[`style`,`class`]}),i&&DP(`scroll`,g,{capture:!0,passive:!0}),r&&DP(`resize`,g,{passive:!0}),gP(()=>{a&&g()}),{height:s,bottom:c,left:l,right:u,top:d,width:f,x:p,y:m,update:g}}function tF(e,t,n={}){let{root:r,rootMargin:i=`0px`,threshold:a=0,window:o=SP,immediate:s=!0}=n,c=kP(()=>o&&`IntersectionObserver`in o),l=H(()=>{let t=B(e);return nP(t).map(EP).filter(VN)}),u=WN,d=z(s),f=c.value?V(()=>[l.value,EP(r),d.value],([e,n])=>{if(u(),!d.value||!e.length)return;let r=new IntersectionObserver(t,{root:EP(n),rootMargin:i,threshold:a});e.forEach(e=>e&&r.observe(e)),u=()=>{r.disconnect(),u=WN}},{immediate:s,flush:`post`}):WN,p=()=>{u(),f(),d.value=!1};return FN(p),{isSupported:c,isActive:d,pause(){u(),d.value=!1},resume(){d.value=!0},stop:p}}const nF={multiple:!0,accept:`*`,reset:!1,directory:!1};function rF(e){if(!e)return null;if(e instanceof FileList)return e;let t=new DataTransfer;for(let n of e)t.items.add(n);return t.files}function iF(e={}){let{document:t=CP}=e,n=R(rF(e.initialFiles)),{on:r,trigger:i}=IN(),{on:a,trigger:o}=IN(),s;t&&(s=EP(e.input)||t.createElement(`input`),s.type=`file`,s.onchange=e=>{let t=e.target;n.value=t.files,i(n.value)},s.oncancel=()=>{o()});let c=()=>{n.value=null,s&&s.value&&(s.value=``,i(null))},l=t=>{if(!s)return;let n={...nF,...e,...t};s.multiple=n.multiple,s.accept=n.accept,s.webkitdirectory=n.directory,GN(n,`capture`)&&(s.capture=n.capture),n.reset&&c(),s.click()};return{files:tn(n),open:l,reset:c,onCancel:a,onChange:r}}const aF=1;function oF(e,t={}){let{throttle:n=0,idle:r=200,onStop:i=WN,onScroll:a=WN,offset:o={left:0,right:0,top:0,bottom:0},observe:s={mutation:!1},eventListenerOptions:c={capture:!1,passive:!0},behavior:l=`auto`,window:u=SP,onError:d=e=>{console.error(e)}}=t,f=typeof s==`boolean`?{mutation:s}:s,p=z(0),m=z(0),h=H({get(){return p.value},set(e){_(e,void 0)}}),g=H({get(){return m.value},set(e){_(void 0,e)}});function _(t,n){var r,i,a,o;if(!u)return;let s=B(e);if(!s)return;(a=s instanceof Document?u.document.body:s)==null||a.scrollTo({top:(r=B(n))??g.value,left:(i=B(t))??h.value,behavior:B(l)});let c=(o=s?.document)?.documentElement||s?.documentElement||s;h!=null&&(p.value=c.scrollLeft),g!=null&&(m.value=c.scrollTop)}let v=z(!1),y=$t({left:!0,right:!1,top:!0,bottom:!1}),b=$t({left:!1,right:!1,top:!1,bottom:!1}),x=e=>{v.value&&(v.value=!1,b.left=!1,b.right=!1,b.top=!1,b.bottom=!1,i(e))},S=lP(x,n+r),C=e=>{var t;if(!u)return;let n=(t=e?.document)?.documentElement||e?.documentElement||EP(e),{display:r,flexDirection:i,direction:a}=getComputedStyle(n),s=a===`rtl`?-1:1,c=n.scrollLeft;b.left=cp.value;let l=Math.abs(c*s)<=(o.left||0),d=Math.abs(c*s)+n.clientWidth>=n.scrollWidth-(o.right||0)-aF;r===`flex`&&i===`row-reverse`?(y.left=d,y.right=l):(y.left=l,y.right=d),p.value=c;let f=n.scrollTop;e===u.document&&!f&&(f=u.document.body.scrollTop),b.top=fm.value;let h=Math.abs(f)<=(o.top||0),g=Math.abs(f)+n.clientHeight>=n.scrollHeight-(o.bottom||0)-aF;r===`flex`&&i===`column-reverse`?(y.top=g,y.bottom=h):(y.top=h,y.bottom=g),m.value=f},w=e=>{var t;if(!u)return;let n=(t=e.target.documentElement)??e.target;C(n),v.value=!0,S(e),a(e)};return DP(e,`scroll`,n?dP(w,n,!0,!1):w,c),gP(()=>{try{let t=B(e);if(!t)return;C(t)}catch(e){d(e)}}),f?.mutation&&e!=null&&e!==u&&e!==document&&AP(e,()=>{let t=B(e);t&&C(t)},{attributes:!0,childList:!0,subtree:!0}),DP(e,`scrollend`,x,c),{x:h,y:g,isScrolling:v,arrivedState:y,directions:b,measure(){let t=B(e);u&&t&&C(t)}}}function sF(e,t,n={}){let{window:r=SP}=n;return qP(e,t,r?.localStorage,n)}const cF={page:e=>[e.pageX,e.pageY],client:e=>[e.clientX,e.clientY],screen:e=>[e.screenX,e.screenY],movement:e=>e instanceof MouseEvent?[e.movementX,e.movementY]:null};function lF(e={}){let{type:t=`page`,touch:n=!0,resetOnTouchEnds:r=!1,initialValue:i={x:0,y:0},window:a=SP,target:o=a,scroll:s=!0,eventFilter:c}=e,l=null,u=0,d=0,f=z(i.x),p=z(i.y),m=z(null),h=typeof t==`function`?t:cF[t],g=e=>{let t=h(e);l=e,t&&([f.value,p.value]=t,m.value=`mouse`),a&&(u=a.scrollX,d=a.scrollY)},_=e=>{if(e.touches.length>0){let t=h(e.touches[0]);t&&([f.value,p.value]=t,m.value=`touch`)}},v=()=>{if(!l||!a)return;let e=h(l);l instanceof MouseEvent&&e&&(f.value=e[0]+a.scrollX-u,p.value=e[1]+a.scrollY-d)},y=()=>{f.value=i.x,p.value=i.y},b=c?e=>c(()=>g(e),{}):e=>g(e),x=c?e=>c(()=>_(e),{}):e=>_(e),S=c?()=>c(()=>v(),{}):()=>v();if(o){let e={passive:!0};DP(o,[`mousemove`,`dragover`],b,e),n&&t!==`movement`&&(DP(o,[`touchstart`,`touchmove`],x,e),r&&DP(o,`touchend`,y,e)),s&&t===`page`&&DP(a,`scroll`,S,e)}return{x:f,y:p,sourceType:m}}function uF(e){let t=z(),n=()=>{t.value&&URL.revokeObjectURL(t.value),t.value=void 0};return V(()=>B(e),e=>{n(),e&&(t.value=URL.createObjectURL(e))},{immediate:!0}),FN(n),tn(t)}const dF={x:0,y:0,pointerId:0,pressure:0,tiltX:0,tiltY:0,width:0,height:0,twist:0,pointerType:null},fF=Object.keys(dF);function pF(e={}){let{target:t=SP}=e,n=z(!1),r=R(e.initialValue||{});Object.assign(r.value,dF,r.value);let i=t=>{n.value=!0,!(e.pointerTypes&&!e.pointerTypes.includes(t.pointerType))&&(r.value=tP(t,fF,!1))};if(t){let e={passive:!0};DP(t,[`pointerdown`,`pointermove`,`pointerup`],i,e),DP(t,`pointerleave`,()=>n.value=!1,e)}return{...hP(r),isInside:n}}const mF=`--vueuse-safe-area-top`,hF=`--vueuse-safe-area-right`,gF=`--vueuse-safe-area-bottom`,_F=`--vueuse-safe-area-left`;function vF(){let e=z(``),t=z(``),n=z(``),r=z(``);if(zN){let e=XP(mF),t=XP(hF),n=XP(gF),r=XP(_F);e.value=`env(safe-area-inset-top, 0px)`,t.value=`env(safe-area-inset-right, 0px)`,n.value=`env(safe-area-inset-bottom, 0px)`,r.value=`env(safe-area-inset-left, 0px)`,gP(i),DP(`resize`,lP(i),{passive:!0})}function i(){e.value=yF(mF),t.value=yF(hF),n.value=yF(gF),r.value=yF(_F)}return{top:e,right:t,bottom:n,left:r,update:i}}function yF(e){return getComputedStyle(document.documentElement).getPropertyValue(e)}const bF=[{max:6e4,value:1e3,name:`second`},{max:276e4,value:6e4,name:`minute`},{max:72e6,value:36e5,name:`hour`},{max:5184e5,value:864e5,name:`day`},{max:24192e5,value:6048e5,name:`week`},{max:28512e6,value:2592e6,name:`month`},{max:1/0,value:31536e6,name:`year`}];function xF(e,t,n){let{window:r=SP}=n??{},i=R(null),a=z(),o=(...e)=>{a.value&&a.value.postMessage(...e)},s=function(){a.value&&a.value.terminate()};return r&&(typeof e==`string`?a.value=new Worker(e,t):typeof e==`function`?a.value=e():a.value=e,a.value.onmessage=e=>{i.value=e.data},FN(()=>{a.value&&a.value.terminate()})),{data:i,post:o,terminate:s,worker:a}}function SF(e={}){let{window:t=SP,initialWidth:n=1/0,initialHeight:r=1/0,listenOrientation:i=!0,includeScrollbar:a=!0,type:o=`inner`}=e,s=z(n),c=z(r),l=()=>{if(t)if(o===`outer`)s.value=t.outerWidth,c.value=t.outerHeight;else if(o===`visual`&&t.visualViewport){let{width:e,height:n,scale:r}=t.visualViewport;s.value=Math.round(e*r),c.value=Math.round(n*r)}else a?(s.value=t.innerWidth,c.value=t.innerHeight):(s.value=t.document.documentElement.clientWidth,c.value=t.document.documentElement.clientHeight)};l(),gP(l);let u={passive:!0};if(DP(`resize`,l,u),t&&o===`visual`&&t.visualViewport&&DP(t.visualViewport,`resize`,l,u),i){let e=NP(`(orientation: portrait)`);V(e,()=>l())}return{width:s,height:c}}const CF=1/60*1e3,wF=typeof performance<`u`?()=>performance.now():()=>Date.now(),TF=typeof window<`u`?e=>window.requestAnimationFrame(e):e=>setTimeout(()=>e(wF()),CF);function EF(e){let t=[],n=[],r=0,i=!1,a=!1,o=new WeakSet,s={schedule:(e,a=!1,s=!1)=>{let c=s&&i,l=c?t:n;return a&&o.add(e),l.indexOf(e)===-1&&(l.push(e),c&&i&&(r=t.length)),e},cancel:e=>{let t=n.indexOf(e);t!==-1&&n.splice(t,1),o.delete(e)},process:c=>{if(i){a=!0;return}if(i=!0,[t,n]=[n,t],n.length=0,r=t.length,r)for(let n=0;n(e[t]=EF(()=>kF=!0),e),{}),PF=MF.reduce((e,t)=>{let n=NF[t];return e[t]=(e,t=!1,r=!1)=>(kF||zF(),n.schedule(e,t,r)),e},{}),FF=MF.reduce((e,t)=>(e[t]=NF[t].cancel,e),{}),IF=MF.reduce((e,t)=>(e[t]=()=>NF[t].process(jF),e),{}),LF=e=>NF[e].process(jF),RF=e=>{kF=!1,jF.delta=OF?CF:Math.max(Math.min(e-jF.timestamp,DF),1),jF.timestamp=e,AF=!0,MF.forEach(LF),AF=!1,kF&&(OF=!1,TF(RF))},zF=()=>{kF=!0,OF=!0,AF||TF(RF)},BF=()=>jF;var VF=PF;function HF(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);iMath.min(Math.max(n,e),t),KF=.001,qF=.01,JF=10,YF=.05,XF=1;function ZF({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let i,a;UF(e<=JF*1e3,`Spring duration must be 10 seconds or less`);let o=1-t;o=GF(YF,XF,o),e=GF(qF,JF,e/1e3),o<1?(i=t=>{let r=t*o,i=r*e,a=r-n,s=eI(t,o),c=Math.exp(-i);return KF-a/s*c},a=t=>{let r=t*o,a=r*e,s=a*n+n,c=o**2*t**2*e,l=Math.exp(-a),u=eI(t**2,o),d=-i(t)+KF>0?-1:1;return d*((s-c)*l)/u}):(i=t=>{let r=Math.exp(-t*e),i=(t-n)*e+1;return-KF+r*i},a=t=>{let r=Math.exp(-t*e),i=(n-t)*(e*e);return r*i});let s=5/e,c=$F(i,a,s);if(e*=1e3,isNaN(c))return{stiffness:100,damping:10,duration:e};{let t=c**2*r;return{stiffness:t,damping:o*2*Math.sqrt(r*t),duration:e}}}const QF=12;function $F(e,t,n){let r=n;for(let n=1;ne[t]!==void 0)}function iI(e){let t=Object.assign({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},e);if(!rI(e,nI)&&rI(e,tI)){let n=ZF(e);t=Object.assign(Object.assign(Object.assign({},t),n),{velocity:0,mass:1}),t.isResolvedFromDuration=!0}return t}function aI(e){var{from:t=0,to:n=1,restSpeed:r=2,restDelta:i}=e,a=HF(e,[`from`,`to`,`restSpeed`,`restDelta`]);let o={done:!1,value:t},{stiffness:s,damping:c,mass:l,velocity:u,duration:d,isResolvedFromDuration:f}=iI(a),p=oI,m=oI;function h(){let e=u?-(u/1e3):0,r=n-t,a=c/(2*Math.sqrt(s*l)),o=Math.sqrt(s/l)/1e3;if(i===void 0&&(i=Math.min(Math.abs(n-t)/100,.4)),a<1){let t=eI(o,a);p=i=>{let s=Math.exp(-a*o*i);return n-s*((e+a*o*r)/t*Math.sin(t*i)+r*Math.cos(t*i))},m=n=>{let i=Math.exp(-a*o*n);return a*o*i*(Math.sin(t*n)*(e+a*o*r)/t+r*Math.cos(t*n))-i*(Math.cos(t*n)*(e+a*o*r)-t*r*Math.sin(t*n))}}else if(a===1)p=t=>n-Math.exp(-o*t)*(r+(e+o*r)*t);else{let t=o*Math.sqrt(a*a-1);p=i=>{let s=Math.exp(-a*o*i),c=Math.min(t*i,300);return n-s*((e+a*o*r)*Math.sinh(c)+t*r*Math.cosh(c))/t}}}return h(),{next:e=>{let t=p(e);if(f)o.done=e>=d;else{let a=m(e)*1e3,s=Math.abs(a)<=r,c=Math.abs(n-t)<=i;o.done=s&&c}return o.value=o.done?n:t,o},flipTarget:()=>{u=-u,[t,n]=[n,t],h()}}}aI.needsInterpolation=(e,t)=>typeof e==`string`||typeof t==`string`;const oI=e=>0,sI=(e,t,n)=>{let r=t-e;return r===0?1:(n-e)/r},cI=(e,t,n)=>-n*e+n*t+e,lI=(e,t)=>n=>Math.max(Math.min(n,t),e),uI=e=>e%1?Number(e.toFixed(5)):e,dI=/(-)?([\d]*\.?[\d])+/g,fI=/(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,pI=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function mI(e){return typeof e==`string`}const hI={test:e=>typeof e==`number`,parse:parseFloat,transform:e=>e},gI=Object.assign(Object.assign({},hI),{transform:lI(0,1)}),_I=Object.assign(Object.assign({},hI),{default:1}),vI=e=>({test:t=>mI(t)&&t.endsWith(e)&&t.split(` `).length===1,parse:parseFloat,transform:t=>`${t}${e}`}),yI=vI(`deg`),bI=vI(`%`),xI=vI(`px`),SI=vI(`vh`),CI=vI(`vw`),wI=Object.assign(Object.assign({},bI),{parse:e=>bI.parse(e)/100,transform:e=>bI.transform(e*100)}),TI=(e,t)=>n=>!!(mI(n)&&pI.test(n)&&n.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(n,t)),EI=(e,t,n)=>r=>{if(!mI(r))return r;let[i,a,o,s]=r.match(dI);return{[e]:parseFloat(i),[t]:parseFloat(a),[n]:parseFloat(o),alpha:s===void 0?1:parseFloat(s)}},DI={test:TI(`hsl`,`hue`),parse:EI(`hue`,`saturation`,`lightness`),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>`hsla(`+Math.round(e)+`, `+bI.transform(uI(t))+`, `+bI.transform(uI(n))+`, `+uI(gI.transform(r))+`)`},OI=lI(0,255),kI=Object.assign(Object.assign({},hI),{transform:e=>Math.round(OI(e))}),AI={test:TI(`rgb`,`red`),parse:EI(`red`,`green`,`blue`),transform:({red:e,green:t,blue:n,alpha:r=1})=>`rgba(`+kI.transform(e)+`, `+kI.transform(t)+`, `+kI.transform(n)+`, `+uI(gI.transform(r))+`)`};function jI(e){let t=``,n=``,r=``,i=``;return e.length>5?(t=e.substr(1,2),n=e.substr(3,2),r=e.substr(5,2),i=e.substr(7,2)):(t=e.substr(1,1),n=e.substr(2,1),r=e.substr(3,1),i=e.substr(4,1),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const MI={test:TI(`#`),parse:jI,transform:AI.transform},NI={test:e=>AI.test(e)||MI.test(e)||DI.test(e),parse:e=>AI.test(e)?AI.parse(e):DI.test(e)?DI.parse(e):MI.parse(e),transform:e=>mI(e)?e:e.hasOwnProperty(`red`)?AI.transform(e):DI.transform(e)},PI="${c}",FI="${n}";function II(e){var t,n,r,i;return isNaN(e)&&mI(e)&&((n=(t=e.match(dI))?.length)??0)+((i=(r=e.match(fI))?.length)??0)>0}function LI(e){typeof e==`number`&&(e=`${e}`);let t=[],n=0,r=e.match(fI);r&&(n=r.length,e=e.replace(fI,PI),t.push(...r.map(NI.parse)));let i=e.match(dI);return i&&(e=e.replace(dI,FI),t.push(...i.map(hI.parse))),{values:t,numColors:n,tokenised:e}}function RI(e){return LI(e).values}function zI(e){let{values:t,numColors:n,tokenised:r}=LI(e),i=t.length;return e=>{let t=r;for(let r=0;rtypeof e==`number`?0:e;function VI(e){let t=RI(e),n=zI(e);return n(t.map(BI))}const HI={test:II,parse:RI,createTransformer:zI,getAnimatableNone:VI},UI=new Set([`brightness`,`contrast`,`saturate`,`opacity`]);function WI(e){let[t,n]=e.slice(0,-1).split(`(`);if(t===`drop-shadow`)return e;let[r]=n.match(dI)||[];if(!r)return e;let i=n.replace(r,``),a=UI.has(t)?1:0;return r!==n&&(a*=100),t+`(`+a+i+`)`}const GI=/([a-z-]*)\(.*?\)/g,KI=Object.assign(Object.assign({},HI),{getAnimatableNone:e=>{let t=e.match(GI);return t?t.map(WI).join(` `):e}});function qI(e,t,n){return n<0&&(n+=1),n>1&&--n,n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function JI({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,a=0,o=0;if(!t)i=a=o=n;else{let r=n<.5?n*(1+t):n+t-n*t,s=2*n-r;i=qI(s,r,e+1/3),a=qI(s,r,e),o=qI(s,r,e-1/3)}return{red:Math.round(i*255),green:Math.round(a*255),blue:Math.round(o*255),alpha:r}}const YI=(e,t,n)=>{let r=e*e,i=t*t;return Math.sqrt(Math.max(0,n*(i-r)+r))},XI=[MI,AI,DI],ZI=e=>XI.find(t=>t.test(e)),QI=e=>`'${e}' is not an animatable color. Use the equivalent color code instead.`,$I=(e,t)=>{let n=ZI(e),r=ZI(t);WF(!!n,QI(e)),WF(!!r,QI(t));let i=n.parse(e),a=r.parse(t);n===DI&&(i=JI(i),n=AI),r===DI&&(a=JI(a),r=AI);let o=Object.assign({},i);return e=>{for(let t in o)t!==`alpha`&&(o[t]=YI(i[t],a[t],e));return o.alpha=cI(i.alpha,a.alpha,e),n.transform(o)}},eL=e=>typeof e==`number`,tL=(e,t)=>n=>t(e(n)),nL=(...e)=>e.reduce(tL);function rL(e,t){return eL(e)?n=>cI(e,t,n):NI.test(e)?$I(e,t):sL(e,t)}const iL=(e,t)=>{let n=[...e],r=n.length,i=e.map((e,n)=>rL(e,t[n]));return e=>{for(let t=0;t{let n=Object.assign(Object.assign({},e),t),r={};for(let i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=rL(e[i],t[i]));return e=>{for(let t in r)n[t]=r[t](e);return n}};function oL(e){let t=HI.parse(e),n=t.length,r=0,i=0,a=0;for(let e=0;e{let n=HI.createTransformer(t),r=oL(e),i=oL(t),a=r.numHSL===i.numHSL&&r.numRGB===i.numRGB&&r.numNumbers>=i.numNumbers;return a?nL(iL(r.parsed,i.parsed),n):(UF(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),n=>`${n>0?t:e}`)},cL=(e,t)=>n=>cI(e,t,n);function lL(e){if(typeof e==`number`)return cL;if(typeof e==`string`)return NI.test(e)?$I:sL;if(Array.isArray(e))return iL;if(typeof e==`object`)return aL}function uL(e,t,n){let r=[],i=n||lL(e[0]),a=e.length-1;for(let n=0;nn(sI(e,t,r))}function fL(e,t){let n=e.length,r=n-1;return i=>{let a=0,o=!1;if(i<=e[0]?o=!0:i>=e[r]&&(a=r-1,o=!0),!o){let t=1;for(;ti||t===r);t++);a=t-1}let s=sI(e[a],e[a+1],i);return t[a](s)}}function pL(e,t,{clamp:n=!0,ease:r,mixer:i}={}){let a=e.length;WF(a===t.length,`Both input and output ranges must be the same length`),WF(!r||!Array.isArray(r)||r.length===a-1,"Array of easing functions must be of length `input.length - 1`, as it applies to the transitions **between** the defined values."),e[0]>e[a-1]&&(e=[].concat(e),t=[].concat(t),e.reverse(),t.reverse());let o=uL(t,r,i),s=a===2?dL(e,o):fL(e,o);return n?t=>s(GF(e[0],e[a-1],t)):s}const mL=e=>t=>1-e(1-t),hL=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,gL=e=>t=>t**+e,_L=e=>t=>t*t*((e+1)*t-e),vL=e=>{let t=_L(e);return e=>(e*=2)<1?.5*t(e):.5*(2-2**(-10*(e-1)))},yL=1.525,bL=4/11,xL=8/11,SL=9/10,CL=e=>e,wL=gL(2),TL=mL(wL),EL=hL(wL),DL=e=>1-Math.sin(Math.acos(e)),OL=mL(DL),kL=hL(OL),AL=_L(yL),jL=mL(AL),ML=hL(AL),NL=vL(yL),PL=4356/361,FL=35442/1805,IL=16061/1805,LL=e=>{if(e===1||e===0)return e;let t=e*e;return ee<.5?.5*(1-LL(1-e*2)):.5*LL(e*2-1)+.5;function BL(e,t){return e.map(()=>t||EL).splice(0,e.length-1)}function VL(e){let t=e.length;return e.map((e,n)=>n===0?0:n/(t-1))}function HL(e,t){return e.map(e=>e*t)}function UL({from:e=0,to:t=1,ease:n,offset:r,duration:i=300}){let a={done:!1,value:e},o=Array.isArray(t)?t:[e,t],s=HL(r&&r.length===o.length?r:VL(o),i);function c(){return pL(s,o,{ease:Array.isArray(n)?n:BL(o,n)})}let l=c();return{next:e=>(a.value=l(e),a.done=e>=i,a),flipTarget:()=>{o.reverse(),l=c()}}}function WL({velocity:e=0,from:t=0,power:n=.8,timeConstant:r=350,restDelta:i=.5,modifyTarget:a}){let o={done:!1,value:t},s=n*e,c=t+s,l=a===void 0?c:a(c);return l!==c&&(s=l-t),{next:e=>{let t=-s*Math.exp(-e/r);return o.done=!(t>i||t<-i),o.value=o.done?l:l+t,o},flipTarget:()=>{}}}const GL={keyframes:UL,spring:aI,decay:WL};function KL(e){if(Array.isArray(e.to))return UL;if(GL[e.type])return GL[e.type];let t=new Set(Object.keys(e));return t.has(`ease`)||t.has(`duration`)&&!t.has(`dampingRatio`)?UL:t.has(`dampingRatio`)||t.has(`stiffness`)||t.has(`mass`)||t.has(`damping`)||t.has(`restSpeed`)||t.has(`restDelta`)?aI:UL}function qL(e,t,n=0){return e-t-n}function JL(e,t,n=0,r=!0){return r?qL(t+-e,t,n):t-(e-t)+n}function YL(e,t,n,r){return r?e>=t+n:e<=-n}const XL=e=>{let t=({delta:t})=>e(t);return{start:()=>VF.update(t,!0),stop:()=>FF.update(t)}};function ZL(e){var t,n,{from:r,autoplay:i=!0,driver:a=XL,elapsed:o=0,repeat:s=0,repeatType:c=`loop`,repeatDelay:l=0,onPlay:u,onStop:d,onComplete:f,onRepeat:p,onUpdate:m}=e,h=HF(e,[`from`,`autoplay`,`driver`,`elapsed`,`repeat`,`repeatType`,`repeatDelay`,`onPlay`,`onStop`,`onComplete`,`onRepeat`,`onUpdate`]);let{to:g}=h,_,v=0,y=h.duration,b,x=!1,S=!0,C,w=KL(h);(n=(t=w).needsInterpolation)?.call(t,r,g)&&(C=pL([0,100],[r,g],{clamp:!1}),r=0,g=100);let T=w(Object.assign(Object.assign({},h),{from:r,to:g}));function E(){v++,c===`reverse`?(S=v%2==0,o=JL(o,y,l,S)):(o=qL(o,y,l),c===`mirror`&&T.flipTarget()),x=!1,p&&p()}function D(){_.stop(),f&&f()}function O(e){if(S||(e=-e),o+=e,!x){let e=T.next(Math.max(0,o));b=e.value,C&&(b=C(b)),x=S?e.done:o<=0}m?.(b),x&&(v===0&&(y??=o),v{d?.(),_.stop()}}}function QL(e,t){return t?e*(1e3/t):0}function $L({from:e=0,velocity:t=0,min:n,max:r,power:i=.8,timeConstant:a=750,bounceStiffness:o=500,bounceDamping:s=10,restDelta:c=1,modifyTarget:l,driver:u,onUpdate:d,onComplete:f,onStop:p}){let m;function h(e){return n!==void 0&&er}function g(e){return n===void 0?r:r===void 0||Math.abs(n-e){var n;d?.(t),(n=e.onUpdate)==null||n.call(e,t)},onComplete:f,onStop:p}))}function v(e){_(Object.assign({type:`spring`,stiffness:o,damping:s,restDelta:c},e))}if(h(e))v({from:e,velocity:t,to:g(e)});else{let r=i*t+e;l!==void 0&&(r=l(r));let o=g(r),s=o===n?-1:1,u,d,f=e=>{u=d,d=e,t=QL(e-u,BF().delta),(s===1&&e>o||s===-1&&em?.stop()}}const eR=(e,t)=>1-3*t+3*e,tR=(e,t)=>3*t-6*e,nR=e=>3*e,rR=(e,t,n)=>((eR(t,n)*e+tR(t,n))*e+nR(t))*e,iR=(e,t,n)=>3*eR(t,n)*e*e+2*tR(t,n)*e+nR(t),aR=1e-7,oR=10;function sR(e,t,n,r,i){let a,o,s=0;do o=t+(n-t)/2,a=rR(o,r,i)-e,a>0?n=o:t=o;while(Math.abs(a)>aR&&++s=lR?uR(t,c,e,n):l===0?c:sR(t,r,r+fR,e,n)}return e=>e===0||e===1?e:rR(a(e),t,r)}const mR={BASE_URL:`/`,DEV:!1,MODE:`production`,PROD:!0,SSR:!1,VITE_APP_TARGET_HUGGINGFACE_SPACE:`true`},hR={};var gR=class{constructor(){e.defineProperty(this,`subscriptions`,new Set)}add(e){return this.subscriptions.add(e),()=>this.subscriptions.delete(e)}notify(e,t,n){if(this.subscriptions.size)for(let r of this.subscriptions)r(e,t,n)}clear(){this.subscriptions.clear()}};function _R(e){return!Number.isNaN(Number.parseFloat(e))}var vR=class{constructor(t){e.defineProperty(this,`current`,void 0),e.defineProperty(this,`prev`,void 0),e.defineProperty(this,`timeDelta`,0),e.defineProperty(this,`lastUpdated`,0),e.defineProperty(this,`updateSubscribers`,new gR),e.defineProperty(this,`stopAnimation`,void 0),e.defineProperty(this,`canTrackVelocity`,!1),e.defineProperty(this,`updateAndNotify`,e=>{this.prev=this.current,this.current=e;let{delta:t,timestamp:n}=BF();this.lastUpdated!==n&&(this.timeDelta=t,this.lastUpdated=n),VF.postRender(this.scheduleVelocityCheck),this.updateSubscribers.notify(this.current)}),e.defineProperty(this,`scheduleVelocityCheck`,()=>VF.postRender(this.velocityCheck)),e.defineProperty(this,`velocityCheck`,({timestamp:e})=>{this.canTrackVelocity||=_R(this.current),e!==this.lastUpdated&&(this.prev=this.current)}),this.prev=this.current=t,this.canTrackVelocity=_R(this.current)}onChange(e){return this.updateSubscribers.add(e)}clearListeners(){this.updateSubscribers.clear()}set(e){this.updateAndNotify(e)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?QL(Number.parseFloat(this.current)-Number.parseFloat(this.prev),this.timeDelta):0}start(e){return this.stop(),new Promise(t=>{let{stop:n}=e(t);this.stopAnimation=n}).then(()=>this.clearAnimation())}stop(){this.stopAnimation&&this.stopAnimation(),this.clearAnimation()}isAnimating(){return!!this.stopAnimation}clearAnimation(){this.stopAnimation=null}destroy(){this.updateSubscribers.clear(),this.stop()}};function yR(e){return new vR(e)}const{isArray:bR}=Array;function xR(){let e=R({}),t=t=>{let n=t=>{e.value[t]&&(e.value[t].stop(),e.value[t].destroy(),delete e.value[t])};t?bR(t)?t.forEach(n):n(t):Object.keys(e.value).forEach(n)},n=(t,n,r)=>{if(e.value[t])return e.value[t];let i=yR(n);return i.onChange(e=>r[t]=e),e.value[t]=i,i};return _P(t),{motionValues:e,get:n,stop:t}}function SR(e){return Array.isArray(e)}function CR(){return{type:`spring`,stiffness:500,damping:25,restDelta:.5,restSpeed:10}}function wR(e){return{type:`spring`,stiffness:550,damping:e===0?2*Math.sqrt(550):30,restDelta:.01,restSpeed:10}}function TR(e){return{type:`spring`,stiffness:550,damping:e===0?100:30,restDelta:.01,restSpeed:10}}function ER(){return{type:`keyframes`,ease:`linear`,duration:300}}function DR(e){return{type:`keyframes`,duration:800,values:e}}const OR={default:TR,x:CR,y:CR,z:CR,rotate:CR,rotateX:CR,rotateY:CR,rotateZ:CR,scaleX:wR,scaleY:wR,scale:wR,backgroundColor:ER,color:ER,opacity:ER};function kR(e,t){let n;return n=SR(t)?DR:OR[e]||OR.default,{to:t,...n(t)}}const AR={...hI,transform:Math.round},jR={color:NI,backgroundColor:NI,outlineColor:NI,fill:NI,stroke:NI,borderColor:NI,borderTopColor:NI,borderRightColor:NI,borderBottomColor:NI,borderLeftColor:NI,borderWidth:xI,borderTopWidth:xI,borderRightWidth:xI,borderBottomWidth:xI,borderLeftWidth:xI,borderRadius:xI,radius:xI,borderTopLeftRadius:xI,borderTopRightRadius:xI,borderBottomRightRadius:xI,borderBottomLeftRadius:xI,width:xI,maxWidth:xI,height:xI,maxHeight:xI,size:xI,top:xI,right:xI,bottom:xI,left:xI,padding:xI,paddingTop:xI,paddingRight:xI,paddingBottom:xI,paddingLeft:xI,margin:xI,marginTop:xI,marginRight:xI,marginBottom:xI,marginLeft:xI,rotate:yI,rotateX:yI,rotateY:yI,rotateZ:yI,scale:_I,scaleX:_I,scaleY:_I,scaleZ:_I,skew:yI,skewX:yI,skewY:yI,distance:xI,translateX:xI,translateY:xI,translateZ:xI,x:xI,y:xI,z:xI,perspective:xI,transformPerspective:xI,opacity:gI,originX:wI,originY:wI,originZ:xI,zIndex:AR,filter:KI,WebkitFilter:KI,fillOpacity:gI,strokeOpacity:gI,numOctaves:AR},MR=e=>jR[e];function NR(e,t){return t&&typeof e==`number`&&t.transform?t.transform(e):e}function PR(e,t){let n=MR(e);return n!==KI&&(n=HI),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const FR={linear:CL,easeIn:wL,easeInOut:EL,easeOut:TL,circIn:DL,circInOut:kL,circOut:OL,backIn:AL,backInOut:ML,backOut:jL,anticipate:NL,bounceIn:RL,bounceInOut:zL,bounceOut:LL};function IR(e){if(Array.isArray(e)){let[t,n,r,i]=e;return pR(t,n,r,i)}else if(typeof e==`string`)return FR[e];return e}function LR(e){return Array.isArray(e)&&typeof e[0]!=`number`}function RR(e,t){return e===`zIndex`?!1:!!(typeof t==`number`||Array.isArray(t)||typeof t==`string`&&HI.test(t)&&!t.startsWith(`url(`))}function zR(e){return Array.isArray(e.to)&&e.to[0]===null&&(e.to=[...e.to],e.to[0]=e.from),e}function BR({ease:e,times:t,delay:n,...r}){let i={...r};return t&&(i.offset=t),e&&(i.ease=LR(e)?e.map(IR):IR(e)),n&&(i.elapsed=-n),i}function VR(e,t,n){return Array.isArray(t.to)&&(e.duration||=800),zR(t),HR(e)||(e={...e,...kR(n,t.to)}),{...t,...BR(e)}}function HR({delay:e,repeat:t,repeatType:n,repeatDelay:r,from:i,...a}){return!!Object.keys(a).length}function UR(e,t){return e[t]||e.default||e}function WR(e,t,n,r,i){let a=UR(r,e),o=a.from===null||a.from===void 0?t.get():a.from,s=RR(e,n);o===`none`&&s&&typeof n==`string`&&(o=PR(e,n));let c=RR(e,o);function l(s){let c={from:o,to:n,velocity:r.velocity?r.velocity:t.getVelocity(),onUpdate:e=>t.set(e)};return a.type===`inertia`||a.type===`decay`?$L({...c,...a}):ZL({...VR(a,c,e),onUpdate:e=>{c.onUpdate(e),a.onUpdate&&a.onUpdate(e)},onComplete:()=>{i&&i(),s&&s()}})}function u(e){return t.set(n),i&&i(),e&&e(),{stop:()=>{}}}return!c||!s||a.type===!1?u:l}function GR(){let{motionValues:e,stop:t,get:n}=xR(),r=(e,t,r,i={},a)=>{let o=r[e],s=n(e,o,r);if(i&&i.immediate){s.set(t);return}let c=WR(e,s,t,i,a);s.start(c)};return{motionValues:e,stop:t,push:r}}function KR(e,t={},{motionValues:n,push:r,stop:i}=GR()){let a=_n(t),o=R(!1);V(n,e=>{o.value=Object.values(e).filter(e=>e.isAnimating()).length>0},{immediate:!0,deep:!0});let s=e=>{if(!a||!a[e])throw Error(`The variant ${e} does not exist.`);return a[e]},c=t=>{typeof t==`string`&&(t=s(t));let n=Object.entries(t).map(([n,i])=>{if(n!==`transition`)return new Promise(a=>r(n,i,e,t.transition||kR(n,t[n]),a))}).filter(Boolean);async function i(){var e,r;await Promise.all(n),(e=t.transition)==null||(r=e.onComplete)==null||r.call(e)}return Promise.all([i()])},l=t=>{let n=UN(t)?t:s(t);Object.entries(n).forEach(([t,n])=>{t!==`transition`&&r(t,n,e,{immediate:!0})})},u=async e=>{let t;if(a&&(a.leave&&(t=a.leave),!a.leave&&a.initial&&(t=a.initial)),!t){e();return}await c(t),e()};return{isAnimating:o,apply:c,set:l,leave:u,stop:i}}const qR=typeof window<`u`,JR=()=>qR&&(window.onpointerdown===null||mR?.TEST),YR=()=>qR&&(window.ontouchstart===null||mR?.TEST),XR=()=>qR&&(window.onmousedown===null||mR?.TEST);function ZR({target:e,state:t,variants:n,apply:r}){let i=_n(n),a=R(!1),o=R(!1),s=R(!1),c=H(()=>{let e=[...Object.keys(t.value||{})];return i?(i.hovered&&(e=[...e,...Object.keys(i.hovered)]),i.tapped&&(e=[...e,...Object.keys(i.tapped)]),i.focused&&(e=[...e,...Object.keys(i.focused)]),e):e}),l=H(()=>{let e={};for(let n in Object.assign(e,t.value),a.value&&i.hovered&&Object.assign(e,i.hovered),o.value&&i.tapped&&Object.assign(e,i.tapped),s.value&&i.focused&&Object.assign(e,i.focused),e)c.value.includes(n)||delete e[n];return e});i.hovered&&(DP(e,`mouseenter`,()=>a.value=!0),DP(e,`mouseleave`,()=>{a.value=!1,o.value=!1})),i.tapped&&(XR()&&(DP(e,`mousedown`,()=>o.value=!0),DP(e,`mouseup`,()=>o.value=!1)),JR()&&(DP(e,`pointerdown`,()=>o.value=!0),DP(e,`pointerup`,()=>o.value=!1)),YR()&&(DP(e,`touchstart`,()=>o.value=!0),DP(e,`touchend`,()=>o.value=!1))),i.focused&&(DP(e,`focus`,()=>s.value=!0),DP(e,`blur`,()=>s.value=!1)),V([a,o,s],()=>{r(l.value)})}function QR({set:e,target:t,variants:n,variant:r}){let i=_n(n);V(()=>t,()=>{i&&(i.initial&&(e(`initial`),r.value=`initial`),i.enter&&(r.value=`enter`))},{immediate:!0,flush:`pre`})}function $R({state:e,apply:t}){V(e,e=>{e&&t(e)},{immediate:!0})}function ez({target:e,variants:t,variant:n}){let r=_n(t);r&&(r.visible||r.visibleOnce)&&tF(e,([{isIntersecting:e}])=>{r.visible?e?n.value=`visible`:n.value=`initial`:r.visibleOnce&&(e&&n.value!==`visibleOnce`?n.value=`visibleOnce`:n.value||=`initial`)})}function tz(e,t={syncVariants:!0,lifeCycleHooks:!0,visibilityHooks:!0,eventListeners:!0}){t.lifeCycleHooks&&QR(e),t.syncVariants&&$R(e),t.visibilityHooks&&ez(e),t.eventListeners&&ZR(e)}function nz(e={}){let t=$t({...e}),n=R({});return V(t,()=>{let e={};for(let[n,r]of Object.entries(t)){let t=MR(n),i=NR(r,t);e[n]=i}n.value=e},{immediate:!0,deep:!0}),{state:t,style:n}}function rz(e,t){V(()=>EP(e),e=>{e&&t(e)},{immediate:!0})}const iz={x:`translateX`,y:`translateY`,z:`translateZ`};function az(e={},t=!0){let n=$t({...e}),r=R(``);return V(n,e=>{let n=``,i=!1;if(t&&(e.x||e.y||e.z)){let t=[e.x||0,e.y||0,e.z||0].map(e=>NR(e,xI)).join(`,`);n+=`translate3d(${t}) `,i=!0}for(let[r,i]of Object.entries(e)){if(t&&(r===`x`||r===`y`||r===`z`))continue;let e=MR(r),a=NR(i,e);n+=`${iz[r]||r}(${a}) `}t&&!i&&(n+=`translateZ(0px) `),r.value=n.trim()},{immediate:!0,deep:!0}),{state:n,transform:r}}const oz=[``,`X`,`Y`,`Z`],sz=[`perspective`,`translate`,`scale`,`rotate`,`skew`],cz=[`transformPerspective`,`x`,`y`,`z`];sz.forEach(e=>{oz.forEach(t=>{let n=e+t;cz.push(n)})});const lz=new Set(cz);function uz(e){return lz.has(e)}const dz=new Set([`originX`,`originY`,`originZ`]);function fz(e){return dz.has(e)}function pz(e){let t={},n={};return Object.entries(e).forEach(([e,r])=>{uz(e)||fz(e)?t[e]=r:n[e]=r}),{transform:t,style:n}}function mz(e){let{transform:t,style:n}=pz(e),{transform:r}=az(t),{style:i}=nz(n);return r.value&&(i.value.transform=r.value),i.value}function hz(e,t){let n,r,{state:i,style:a}=nz();return rz(e,e=>{r=e;for(let t of Object.keys(jR)){if(e.style[t]===null||e.style[t]===``||uz(t)||fz(t))continue;i[t]=e.style[t]}n&&Object.entries(n).forEach(([t,n])=>e.style[t]=n),t&&t(i)}),V(a,e=>{if(!r){n=e;return}for(let t in e)r.style[t]=e[t]},{immediate:!0}),{style:i}}function gz(e){let t=e.trim().split(/\) |\)/);if(t.length===1)return{};let n=e=>e.endsWith(`px`)||e.endsWith(`deg`)?Number.parseFloat(e):Number.isNaN(Number(e))?Number(e):e;return t.reduce((e,t)=>{if(!t)return e;let[r,i]=t.split(`(`),a=i.split(`,`),o=a.map(e=>n(e.endsWith(`)`)?e.replace(`)`,``):e.trim())),s=o.length===1?o[0]:o;return{...e,[r]:s}},{})}function _z(e,t){Object.entries(gz(t)).forEach(([t,n])=>{let r=[`x`,`y`,`z`];if(t===`translate3d`){if(n===0){r.forEach(t=>e[t]=0);return}n.forEach((t,n)=>e[r[n]]=t);return}if(n=Number.parseFloat(`${n}`),t===`translateX`){e.x=n;return}if(t===`translateY`){e.y=n;return}if(t===`translateZ`){e.z=n;return}e[t]=n})}function vz(e,t){let n,r,{state:i,transform:a}=az();return rz(e,e=>{r=e,e.style.transform&&_z(i,e.style.transform),n&&(e.style.transform=n),t&&t(i)}),V(a,e=>{if(!r){n=e;return}r.style.transform=e},{immediate:!0}),{transform:i}}function yz(e){return Object.entries(e)}function bz(e,t){let n=$t({}),r=e=>Object.entries(e).forEach(([e,t])=>n[e]=t),{style:i}=hz(e,r),{transform:a}=vz(e,r);return V(n,e=>{yz(e).forEach(([e,t])=>{let n=uz(e)?a:i;n[e]&&n[e]===t||(n[e]=t)})},{immediate:!0,deep:!0}),rz(e,()=>t&&r(t)),{motionProperties:n,style:i,transform:a}}function xz(e={}){let t=_n(e),n=R(),r=H(()=>{if(n.value)return t[n.value]});return{state:r,variant:n}}function Sz(e,t={},n){let{motionProperties:r}=bz(e),{variant:i,state:a}=xz(t),o=KR(r,t),s={target:e,variant:i,variants:t,state:a,motionProperties:r,...o};return tz(s,n),s}const Cz=[`delay`,`duration`],wz=[`initial`,`enter`,`leave`,`visible`,`visible-once`,`visibleOnce`,`hovered`,`tapped`,`focused`,...Cz];function Tz(e){return Cz.includes(e)}function Ez(e,t){let n=e.props?e.props:e.data&&e.data.attrs?e.data.attrs:{};if(n){n.variants&&UN(n.variants)&&(t.value={...t.value,...n.variants});for(let e of wz){if(!n||!n[e])continue;if(Tz(e)&&typeof n[e]==`number`){for(let r of[`enter`,`visible`,`visibleOnce`]){let i=t.value[r];if(i==null)continue;i.transition??={},i.transition[e]=n[e]}continue}if(UN(n[e])){let r=n[e];e===`visible-once`&&(e=`visibleOnce`),t.value[e]=r}}}}function Dz(e,t=!1){let n=(n,r,i)=>{let a=r.value&&typeof r.value==`string`?r.value:i.key;a&&hR[a]&&hR[a].stop();let o=t?structuredClone(ln(e)||{}):e||{},s=R(o);typeof r.value==`object`&&(s.value=r.value),Ez(i,s);let c={eventListeners:!0,lifeCycleHooks:!0,syncVariants:!0,visibilityHooks:!1},l=Sz(n,s,c);n.motionInstance=l,a&&(hR[a]=l)},r=(e,t,n)=>{e.motionInstance&&ez(e.motionInstance)};return{created:n,mounted:r,getSSRProps(t,n){let{initial:r}=t.value||n&&n?.props||{};r=_n(r);let i=MN({},e?.initial||{},r||{});if(!i||Object.keys(i).length===0)return;let a=mz(i);return{style:a}}}}const Oz={initial:{opacity:0},enter:{opacity:1}},kz={initial:{opacity:0},visible:{opacity:1}},Az={initial:{opacity:0},visibleOnce:{opacity:1}},jz={initial:{scale:0,opacity:0},enter:{scale:1,opacity:1}},Mz={initial:{scale:0,opacity:0},visible:{scale:1,opacity:1}},Nz={initial:{scale:0,opacity:0},visibleOnce:{scale:1,opacity:1}},Pz={initial:{x:-100,rotate:90,opacity:0},enter:{x:0,rotate:0,opacity:1}},Fz={initial:{x:-100,rotate:90,opacity:0},visible:{x:0,rotate:0,opacity:1}},Iz={initial:{x:-100,rotate:90,opacity:0},visibleOnce:{x:0,rotate:0,opacity:1}},Lz={initial:{x:100,rotate:-90,opacity:0},enter:{x:0,rotate:0,opacity:1}},Rz={initial:{x:100,rotate:-90,opacity:0},visible:{x:0,rotate:0,opacity:1}},zz={initial:{x:100,rotate:-90,opacity:0},visibleOnce:{x:0,rotate:0,opacity:1}},Bz={initial:{y:-100,rotate:-90,opacity:0},enter:{y:0,rotate:0,opacity:1}},Vz={initial:{y:-100,rotate:-90,opacity:0},visible:{y:0,rotate:0,opacity:1}},Hz={initial:{y:-100,rotate:-90,opacity:0},visibleOnce:{y:0,rotate:0,opacity:1}},Uz={initial:{y:100,rotate:90,opacity:0},enter:{y:0,rotate:0,opacity:1}},Wz={initial:{y:100,rotate:90,opacity:0},visible:{y:0,rotate:0,opacity:1}},Gz={initial:{y:100,rotate:90,opacity:0},visibleOnce:{y:0,rotate:0,opacity:1}},Kz={initial:{x:-100,opacity:0},enter:{x:0,opacity:1}},qz={initial:{x:-100,opacity:0},visible:{x:0,opacity:1}},Jz={initial:{x:-100,opacity:0},visibleOnce:{x:0,opacity:1}},Yz={initial:{x:100,opacity:0},enter:{x:0,opacity:1}},Xz={initial:{x:100,opacity:0},visible:{x:0,opacity:1}},Zz={initial:{x:100,opacity:0},visibleOnce:{x:0,opacity:1}},Qz={initial:{y:-100,opacity:0},enter:{y:0,opacity:1}},$z={initial:{y:-100,opacity:0},visible:{y:0,opacity:1}},eB={initial:{y:-100,opacity:0},visibleOnce:{y:0,opacity:1}},tB={initial:{y:100,opacity:0},enter:{y:0,opacity:1}},nB={initial:{y:100,opacity:0},visible:{y:0,opacity:1}},rB={initial:{y:100,opacity:0},visibleOnce:{y:0,opacity:1}},iB={__proto__:null,fade:Oz,fadeVisible:kz,fadeVisibleOnce:Az,pop:jz,popVisible:Mz,popVisibleOnce:Nz,rollBottom:Uz,rollLeft:Pz,rollRight:Lz,rollTop:Bz,rollVisibleBottom:Wz,rollVisibleLeft:Fz,rollVisibleOnceBottom:Gz,rollVisibleOnceLeft:Iz,rollVisibleOnceRight:zz,rollVisibleOnceTop:Hz,rollVisibleRight:Rz,rollVisibleTop:Vz,slideBottom:tB,slideLeft:Kz,slideRight:Yz,slideTop:Qz,slideVisibleBottom:nB,slideVisibleLeft:qz,slideVisibleOnceBottom:rB,slideVisibleOnceLeft:Jz,slideVisibleOnceRight:Zz,slideVisibleOnceTop:eB,slideVisibleRight:Xz,slideVisibleTop:$z};function aB(e){let t=`àáâäæãåāăąçćčđďèéêëēėęěğǵḧîïíīįìłḿñńǹňôöòóœøōõőṕŕřßśšşșťțûüùúūǘůűųẃẍÿýžźż·/_,:;`,n=`aaaaaaaaaacccddeeeeeeeegghiiiiiilmnnnnoooooooooprrsssssttuuuuuuuuuwxyyzzz------`,r=new RegExp(t.split(``).join(`|`),`g`);return e.toString().replace(/[A-Z]/g,e=>`-${e}`).toLowerCase().replace(/\s+/g,`-`).replace(r,e=>n.charAt(t.indexOf(e))).replace(/&/g,`-and-`).replace(/[^\w\-]+/g,``).replace(/-{2,}/g,`-`).replace(/^-+/,``).replace(/-+$/,``)}const oB=Symbol(``),sB={preset:{type:String,required:!1},instance:{type:Object,required:!1},variants:{type:Object,required:!1},initial:{type:Object,required:!1},enter:{type:Object,required:!1},leave:{type:Object,required:!1},visible:{type:Object,required:!1},visibleOnce:{type:Object,required:!1},hovered:{type:Object,required:!1},tapped:{type:Object,required:!1},focused:{type:Object,required:!1},delay:{type:[Number,String],required:!1},duration:{type:[Number,String],required:!1}};function cB(e){return Object.prototype.toString.call(e)===`[object Object]`}function lB(e){if(Array.isArray(e))return e.map(lB);if(cB(e)){let t={};for(let n in e)t[n]=lB(e[n]);return t}return e}function uB(e){let t=$t({}),n=Zi(oB,{}),r=H(()=>e.preset==null?{}:n!=null&&e.preset in n?structuredClone(ln(n)[e.preset]):e.preset in iB?structuredClone(iB[e.preset]):{}),i=H(()=>({initial:e.initial,enter:e.enter,leave:e.leave,visible:e.visible,visibleOnce:e.visibleOnce,hovered:e.hovered,tapped:e.tapped,focused:e.focused}));function a(e,t){for(let n of[`delay`,`duration`]){if(t[n]==null)continue;let r=Number.parseInt(t[n]);for(let t of[`enter`,`visible`,`visibleOnce`]){let i=e[t];if(i==null)continue;i.transition??={},i.transition[n]=r}}return e}let o=H(()=>{let t=MN({},i.value,r.value,e.variants||{});return a({...t},e)});function s(e,n,r){var i;e.props??={},(i=e.props).style??(i.style={}),e.props.style={...e.props.style,...r};let s=a(lB(o.value),e.props);return e.props.onVnodeMounted=({el:e})=>{t[n]=Sz(e,s)},e.props.onVnodeUpdated=({el:e})=>{let r=mz(t[n].state);for(let[t,n]of Object.entries(r))e.style[t]=n},e}return{motionConfig:o,setNodeInstance:s}}const dB=Rr({name:`Motion`,props:{...sB,is:{type:[String,Object],default:`div`}},setup(e){let t=wi(),{motionConfig:n,setNodeInstance:r}=uB(e);return()=>{let i=mz(n.value.initial||{}),a=Jo(e.is,void 0,t);return r(a,0,i),a}}}),fB=Rr({name:`MotionGroup`,props:{...sB,is:{type:[String,Object],required:!1}},setup(e){let t=wi(),{motionConfig:n,setNodeInstance:r}=uB(e);return()=>{var i;let a=mz(n.value.initial||{}),o=(i=t.default)?.call(t)||[];for(let e=0;emB=e,gB=Symbol();function _B(e){return e&&typeof e==`object`&&Object.prototype.toString.call(e)===`[object Object]`&&typeof e.toJSON!=`function`}var vB;(function(e){e.direct=`direct`,e.patchObject=`patch object`,e.patchFunction=`patch function`})(vB||={});const yB=typeof window<`u`,bB=(()=>typeof window==`object`&&window.window===window?window:typeof self==`object`&&self.self===self?self:typeof global==`object`&&global.global===global?global:typeof globalThis==`object`?globalThis:{HTMLElement:null})();function xB(e,{autoBom:t=!1}={}){return t&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob([``,e],{type:e.type}):e}function SB(e,t,n){let r=new XMLHttpRequest;r.open(`GET`,e),r.responseType=`blob`,r.onload=function(){DB(r.response,t,n)},r.onerror=function(){console.error(`could not download file`)},r.send()}function CB(e){let t=new XMLHttpRequest;t.open(`HEAD`,e,!1);try{t.send()}catch{}return t.status>=200&&t.status<=299}function wB(e){try{e.dispatchEvent(new MouseEvent(`click`))}catch{let t=new MouseEvent(`click`,{bubbles:!0,cancelable:!0,view:window,detail:0,screenX:80,screenY:20,clientX:80,clientY:20,ctrlKey:!1,altKey:!1,shiftKey:!1,metaKey:!1,button:0,relatedTarget:null});e.dispatchEvent(t)}}const TB=typeof navigator==`object`?navigator:{userAgent:``},EB=(()=>/Macintosh/.test(TB.userAgent)&&/AppleWebKit/.test(TB.userAgent)&&!/Safari/.test(TB.userAgent))(),DB=yB?typeof HTMLAnchorElement<`u`&&`download`in HTMLAnchorElement.prototype&&!EB?OB:`msSaveOrOpenBlob`in TB?kB:AB:()=>{};function OB(e,t=`download`,n){let r=document.createElement(`a`);r.download=t,r.rel=`noopener`,typeof e==`string`?(r.href=e,r.origin===location.origin?wB(r):CB(r.href)?SB(e,t,n):(r.target=`_blank`,wB(r))):(r.href=URL.createObjectURL(e),setTimeout(function(){URL.revokeObjectURL(r.href)},4e4),setTimeout(function(){wB(r)},0))}function kB(e,t=`download`,n){if(typeof e==`string`)if(CB(e))SB(e,t,n);else{let t=document.createElement(`a`);t.href=e,t.target=`_blank`,setTimeout(function(){wB(t)})}else navigator.msSaveOrOpenBlob(xB(e,n),t)}function AB(e,t,n,r){if(r||=open(``,`_blank`),r&&(r.document.title=r.document.body.innerText=`downloading...`),typeof e==`string`)return SB(e,t,n);let i=e.type===`application/octet-stream`,a=/constructor/i.test(String(bB.HTMLElement))||`safari`in bB,o=/CriOS\/[\d]+/.test(navigator.userAgent);if((o||i&&a||EB)&&typeof FileReader<`u`){let t=new FileReader;t.onloadend=function(){let e=t.result;if(typeof e!=`string`)throw r=null,Error(`Wrong reader.result type`);e=o?e:e.replace(/^data:[^;]*;/,`data:attachment/file;`),r?r.location.href=e:location.assign(e),r=null},t.readAsDataURL(e)}else{let t=URL.createObjectURL(e);r?r.location.assign(t):location.href=t,r=null,setTimeout(function(){URL.revokeObjectURL(t)},4e4)}}const{assign:jB}=Object;function MB(){let e=Re(!0),t=e.run(()=>R({})),n=[],r=[],i=un({install(e){hB(i),i._a=e,e.provide(gB,i),e.config.globalProperties.$pinia=i,r.forEach(e=>n.push(e)),r=[]},use(e){return this._a?n.push(e):r.push(e),this},_p:n,_a:null,_e:e,_s:new Map,state:t});return i}const NB=()=>{};function PB(e,t,n,r=NB){e.push(t);let i=()=>{let n=e.indexOf(t);n>-1&&(e.splice(n,1),r())};return!n&&ze()&&Be(i),i}function FB(e,...t){e.slice().forEach(e=>{e(...t)})}const IB=e=>e(),LB=Symbol(),RB=Symbol();function zB(e,t){for(let n in e instanceof Map&&t instanceof Map?t.forEach((t,n)=>e.set(n,t)):e instanceof Set&&t instanceof Set&&t.forEach(e.add,e),t){if(!t.hasOwnProperty(n))continue;let r=t[n],i=e[n];_B(i)&&_B(r)&&e.hasOwnProperty(n)&&!pn(r)&&!an(r)?e[n]=zB(i,r):e[n]=r}return e}const BB=Symbol();function VB(e){return!_B(e)||!Object.prototype.hasOwnProperty.call(e,BB)}const{assign:HB}=Object;function UB(e){return!!(pn(e)&&e.effect)}function WB(e,t,n,r){let{state:i,actions:a,getters:o}=t,s=n.state.value[e],c;function l(){s||(n.state.value[e]=i?i():{});let t=Sn(n.state.value[e]);return HB(t,a,Object.keys(o||{}).reduce((t,r)=>(t[r]=un(H(()=>{hB(n);let t=n._s.get(e);return o[r].call(t,t)})),t),{}))}return c=GB(e,l,t,n,r,!0),c}function GB(e,t,n={},r,i,a){let o,s=HB({actions:{}},n),c={deep:!0},l,u,d=[],f=[],p,m=r.state.value[e];!a&&!m&&(r.state.value[e]={});let h=R({}),g;function _(t){let n;l=u=!1,typeof t==`function`?(t(r.state.value[e]),n={type:vB.patchFunction,storeId:e,events:p}):(zB(r.state.value[e],t),n={type:vB.patchObject,payload:t,storeId:e,events:p});let i=g=Symbol();Kn().then(()=>{g===i&&(l=!0)}),u=!0,FB(d,n,r.state.value[e])}let v=a?function(){let{state:e}=n,t=e?e():{};this.$patch(e=>{HB(e,t)})}:NB;function y(){o.stop(),d=[],f=[],r._s.delete(e)}let b=(t,n=``)=>{if(LB in t)return t[RB]=n,t;let i=function(){hB(r);let n=Array.from(arguments),a=[],o=[];function s(e){a.push(e)}function c(e){o.push(e)}FB(f,{args:n,name:i[RB],store:C,after:s,onError:c});let l;try{l=t.apply(this&&this.$id===e?this:C,n)}catch(e){throw FB(o,e),e}return l instanceof Promise?l.then(e=>(FB(a,e),e)).catch(e=>(FB(o,e),Promise.reject(e))):(FB(a,l),l)};return i[LB]=!0,i[RB]=n,i},x=un({actions:{},getters:{},state:[],hotState:h}),S={_p:r,$id:e,$onAction:PB.bind(null,f),$patch:_,$reset:v,$subscribe(t,n={}){let i=PB(d,t,n.detached,()=>a()),a=o.run(()=>V(()=>r.state.value[e],r=>{(n.flush===`sync`?u:l)&&t({storeId:e,type:vB.direct,events:p},r)},HB({},c,n)));return i},$dispose:y},C=$t(S);r._s.set(e,C);let w=r._a&&r._a.runWithContext||IB,T=w(()=>r._e.run(()=>(o=Re()).run(()=>t({action:b}))));for(let t in T){let n=T[t];if(pn(n)&&!UB(n)||an(n))a||(m&&VB(n)&&(pn(n)?n.value=m[t]:zB(n,m[t])),r.state.value[e][t]=n);else if(typeof n==`function`){let e=b(n,t);T[t]=e,s.actions[t]=n}}return HB(C,T),HB(ln(C),T),Object.defineProperty(C,`$state`,{get:()=>r.state.value[e],set:e=>{_(t=>{HB(t,e)})}}),r._p.forEach(e=>{HB(C,o.run(()=>e({store:C,app:r._a,pinia:r,options:s})))}),m&&a&&n.hydrate&&n.hydrate(C.$state,m),l=!0,u=!0,C} /*! #__NO_SIDE_EFFECTS__ */ -function KB(e,t,n){let r,i=typeof t==`function`;r=i?n:t;function a(n,a){let o=Qi();n||=o?Zi(gB,null):null,n&&hB(n),n=mB,n._s.has(e)||(i?GB(e,t,r,n):WB(e,r,n));let s=n._s.get(e);return s}return a.$id=e,a}function qB(e){let t=ln(e),n={};for(let r in t){let i=t[r];i.effect?n[r]=H({get:()=>e[r],set(t){e[r]=t}}):(pn(i)||an(i))&&(n[r]=Tn(e,r))}return n}const JB=`modulepreload`,YB=function(e){return`/`+e},XB={},Y=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=function(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))},i=document.getElementsByTagName(`link`),a=document.querySelector(`meta[property=csp-nonce]`),o=a?.nonce||a?.getAttribute(`nonce`);r=e(t.map(e=>{if(e=YB(e,n),e in XB)return;XB[e]=!0;let t=e.endsWith(`.css`),r=t?`[rel="stylesheet"]`:``,a=!!n;if(a)for(let n=i.length-1;n>=0;n--){let r=i[n];if(r.href===e&&(!t||r.rel===`stylesheet`))return}else if(document.querySelector(`link[href="${e}"]${r}`))return;let s=document.createElement(`link`);if(s.rel=t?`stylesheet`:JB,t||(s.as=`script`),s.crossOrigin=``,s.href=e,o&&s.setAttribute(`nonce`,o),document.head.appendChild(s),t)return new Promise((t,n)=>{s.addEventListener(`load`,t),s.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${e}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[]){if(e.status!==`rejected`)continue;i(e.reason)}return e().catch(i)})},ZB=e=>{let t={},n=Object.assign({"/src/layouts/default.vue":()=>Y(()=>import(`./default-BIvW8Ai3.js`),__vite__mapDeps([0,1,2])),"/src/layouts/home.vue":()=>Y(()=>import(`./home-B675LO9V.js`),[]),"/src/layouts/plain.vue":()=>Y(()=>import(`./plain-BrBYnjv7.js`),[]),"/src/layouts/settings.vue":()=>Y(()=>import(`./settings-Clpt817f.js`),__vite__mapDeps([3,1,2,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21])),"/src/layouts/stage.vue":()=>Y(()=>import(`./stage-DgnnLIXb.js`),[])});Object.entries(n).forEach(([e,n])=>{let r=e.replace(`/src/layouts/`,``).replace(`.vue`,``);t[r]=n});function r(e,n=!0){return e.map(e=>{var i,a,o;if((i=e.children)?.length>0&&(e.children=r(e.children,!1)),n){var s,c,l;let n=!e.component&&(s=e.children)?.find(e=>{var t;return(e.path===``||e.path===`/`)&&(t=e.meta)?.isLayout});if(n)return e;if((c=e.meta)?.layout!==!1)return{path:e.path,component:t[(l=e.meta)?.layout||`default`],children:e.path===`/`?[e]:[{...e,path:``}],meta:{isLayout:!0}}}return(a=e.meta)?.layout?{path:e.path,component:t[(o=e.meta)?.layout],children:[{...e,path:``}],meta:{isLayout:!0}}:e})}return r(e)},QB=typeof document<`u`;function $B(e){return typeof e==`object`||`displayName`in e||`props`in e||`__vccOpts`in e}function eV(e){return e.__esModule||e[Symbol.toStringTag]===`Module`||e.default&&$B(e.default)}const tV=Object.assign;function nV(e,t){let n={};for(let r in t){let i=t[r];n[r]=iV(i)?i.map(e):e(i)}return n}const rV=()=>{},iV=Array.isArray,aV=/#/g,oV=/&/g,sV=/\//g,cV=/=/g,lV=/\?/g,uV=/\+/g,dV=/%5B/g,fV=/%5D/g,pV=/%5E/g,mV=/%60/g,hV=/%7B/g,gV=/%7C/g,_V=/%7D/g,vV=/%20/g;function yV(e){return encodeURI(``+e).replace(gV,`|`).replace(dV,`[`).replace(fV,`]`)}function bV(e){return yV(e).replace(hV,`{`).replace(_V,`}`).replace(pV,`^`)}function xV(e){return yV(e).replace(uV,`%2B`).replace(vV,`+`).replace(aV,`%23`).replace(oV,`%26`).replace(mV,"`").replace(hV,`{`).replace(_V,`}`).replace(pV,`^`)}function SV(e){return xV(e).replace(cV,`%3D`)}function CV(e){return yV(e).replace(aV,`%23`).replace(lV,`%3F`)}function wV(e){return e==null?``:CV(e).replace(sV,`%2F`)}function TV(e){try{return decodeURIComponent(``+e)}catch{}return``+e}const EV=/\/$/,DV=e=>e.replace(EV,``);function OV(e,t,n=`/`){let r,i={},a=``,o=``,s=t.indexOf(`#`),c=t.indexOf(`?`);return s=0&&(c=-1),c>-1&&(r=t.slice(0,c),a=t.slice(c+1,s>-1?s:t.length),i=e(a)),s>-1&&(r||=t.slice(0,s),o=t.slice(s,t.length)),r=IV(r??t,n),{fullPath:r+(a&&`?`)+a+o,path:r,query:i,hash:TV(o)}}function kV(e,t){let n=t.query?e(t.query):``;return t.path+(n&&`?`)+n+(t.hash||``)}function AV(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||`/`}function jV(e,t,n){let r=t.matched.length-1,i=n.matched.length-1;return r>-1&&r===i&&MV(t.matched[r],n.matched[i])&&NV(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function MV(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function NV(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e)if(!PV(e[n],t[n]))return!1;return!0}function PV(e,t){return iV(e)?FV(e,t):iV(t)?FV(t,e):e===t}function FV(e,t){return iV(t)?e.length===t.length&&e.every((e,n)=>e===t[n]):e.length===1&&e[0]===t}function IV(e,t){if(e.startsWith(`/`))return e;if(!e)return t;let n=t.split(`/`),r=e.split(`/`),i=r[r.length-1];(i===`..`||i===`.`)&&r.push(``);let a=n.length-1,o,s;for(o=0;o1&&a--;else break;return n.slice(0,a).join(`/`)+`/`+r.slice(o).join(`/`)}const LV={path:`/`,name:void 0,params:{},query:{},hash:``,fullPath:`/`,matched:[],meta:{},redirectedFrom:void 0};var RV;(function(e){e.pop=`pop`,e.push=`push`})(RV||={});var zV;(function(e){e.back=`back`,e.forward=`forward`,e.unknown=``})(zV||={});function BV(e){if(!e)if(QB){let t=document.querySelector(`base`);e=t&&t.getAttribute(`href`)||`/`,e=e.replace(/^\w+:\/\/[^\/]+/,``)}else e=`/`;return e[0]!==`/`&&e[0]!==`#`&&(e=`/`+e),DV(e)}const VV=/^[^#]+#/;function HV(e,t){return e.replace(VV,`#`)+t}function UV(e,t){let n=document.documentElement.getBoundingClientRect(),r=e.getBoundingClientRect();return{behavior:t.behavior,left:r.left-n.left-(t.left||0),top:r.top-n.top-(t.top||0)}}const WV=()=>({left:window.scrollX,top:window.scrollY});function GV(e){let t;if(`el`in e){let n=e.el,r=typeof n==`string`&&n.startsWith(`#`),i=typeof n==`string`?r?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!i)return;t=UV(i,e)}else t=e;`scrollBehavior`in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left==null?window.scrollX:t.left,t.top==null?window.scrollY:t.top)}function KV(e,t){let n=history.state?history.state.position-t:-1;return n+e}const qV=new Map;function JV(e,t){qV.set(e,t)}function YV(e){let t=qV.get(e);return qV.delete(e),t}let XV=()=>location.protocol+`//`+location.host;function ZV(e,t){let{pathname:n,search:r,hash:i}=t,a=e.indexOf(`#`);if(a>-1){let t=i.includes(e.slice(a))?e.slice(a).length:1,n=i.slice(t);return n[0]!==`/`&&(n=`/`+n),AV(n,``)}let o=AV(n,e);return o+r+i}function QV(e,t,n,r){let i=[],a=[],o=null,s=({state:a})=>{let s=ZV(e,location),c=n.value,l=t.value,u=0;if(a){if(n.value=s,t.value=a,o&&o===c){o=null;return}u=l?a.position-l.position:0}else r(s);i.forEach(e=>{e(n.value,c,{delta:u,type:RV.pop,direction:u?u>0?zV.forward:zV.back:zV.unknown})})};function c(){o=n.value}function l(e){i.push(e);let t=()=>{let t=i.indexOf(e);t>-1&&i.splice(t,1)};return a.push(t),t}function u(){let{history:e}=window;e.state&&e.replaceState(tV({},e.state,{scroll:WV()}),``)}function d(){for(let e of a)e();a=[],window.removeEventListener(`popstate`,s),window.removeEventListener(`beforeunload`,u)}return window.addEventListener(`popstate`,s),window.addEventListener(`beforeunload`,u,{passive:!0}),{pauseListeners:c,listen:l,destroy:d}}function $V(e,t,n,r=!1,i=!1){return{back:e,current:t,forward:n,replaced:r,position:window.history.length,scroll:i?WV():null}}function eH(e){let{history:t,location:n}=window,r={value:ZV(e,n)},i={value:t.state};i.value||a(r.value,{back:null,current:r.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function a(r,a,o){let s=e.indexOf(`#`),c=s>-1?(n.host&&document.querySelector(`base`)?e:e.slice(s))+r:XV()+e+r;try{t[o?`replaceState`:`pushState`](a,``,c),i.value=a}catch(e){console.error(e),n[o?`replace`:`assign`](c)}}function o(e,n){let o=tV({},t.state,$V(i.value.back,e,i.value.forward,!0),n,{position:i.value.position});a(e,o,!0),r.value=e}function s(e,n){let o=tV({},i.value,t.state,{forward:e,scroll:WV()});a(o.current,o,!0);let s=tV({},$V(r.value,e,null),{position:o.position+1},n);a(e,s,!1),r.value=e}return{location:r,state:i,push:s,replace:o}}function tH(e){e=BV(e);let t=eH(e),n=QV(e,t.state,t.location,t.replace);function r(e,t=!0){t||n.pauseListeners(),history.go(e)}let i=tV({location:``,base:e,go:r,createHref:HV.bind(null,e)},t,n);return Object.defineProperty(i,`location`,{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(i,`state`,{enumerable:!0,get:()=>t.state.value}),i}function nH(e){return e=location.host?e||location.pathname+location.search:``,e.includes(`#`)||(e+=`#`),tH(e)}function rH(e){return typeof e==`string`||e&&typeof e==`object`}function iH(e){return typeof e==`string`||typeof e==`symbol`}const aH=Symbol(``);var oH;(function(e){e[e.aborted=4]=`aborted`,e[e.cancelled=8]=`cancelled`,e[e.duplicated=16]=`duplicated`})(oH||={});function sH(e,t){return tV(Error(),{type:e,[aH]:!0},t)}function cH(e,t){return e instanceof Error&&aH in e&&(t==null||!!(e.type&t))}const lH=`[^/]+?`,uH={sensitive:!1,strict:!1,start:!0,end:!0},dH=/[.+*?^${}()[\]/\\]/g;function fH(e,t){let n=tV({},uH,t),r=[],i=n.start?`^`:``,a=[];for(let t of e){let e=t.length?[]:[90];n.strict&&!t.length&&(i+=`/`);for(let r=0;rt.length?t.length===1&&t[0]===80?1:-1:0}function mH(e,t){let n=0,r=e.score,i=t.score;for(;n0&&t[t.length-1]<0}const gH={type:0,value:``},_H=/[a-zA-Z0-9_]/;function vH(e){if(!e)return[[]];if(e===`/`)return[[gH]];if(!e.startsWith(`/`))throw Error(`Invalid path "${e}"`);function t(e){throw Error(`ERR (${n})/"${l}": ${e}`)}let n=0,r=n,i=[],a;function o(){a&&i.push(a),a=[]}let s=0,c,l=``,u=``;function d(){l&&(n===0?a.push({type:0,value:l}):n===1||n===2||n===3?(a.length>1&&(c===`*`||c===`+`)&&t(`A repeatable param (${l}) must be alone in its segment. eg: '/:ids+.`),a.push({type:1,value:l,regexp:u,repeatable:c===`*`||c===`+`,optional:c===`*`||c===`?`})):t(`Invalid state to consume buffer`),l=``)}function f(){l+=c}for(;s{o(f)}:rV}function o(e){if(iH(e)){let t=r.get(e);t&&(r.delete(e),n.splice(n.indexOf(t),1),t.children.forEach(o),t.alias.forEach(o))}else{let t=n.indexOf(e);t>-1&&(n.splice(t,1),e.record.name&&r.delete(e.record.name),e.children.forEach(o),e.alias.forEach(o))}}function s(){return n}function c(e){let t=DH(e,n);n.splice(t,0,e),e.record.name&&!wH(e)&&r.set(e.record.name,e)}function l(e,t){let i,a={},o,s;if(`name`in e&&e.name){if(i=r.get(e.name),!i)throw sH(1,{location:e});s=i.record.name,a=tV(xH(t.params,i.keys.filter(e=>!e.optional).concat(i.parent?i.parent.keys.filter(e=>e.optional):[]).map(e=>e.name)),e.params&&xH(e.params,i.keys.map(e=>e.name))),o=i.stringify(a)}else if(e.path!=null)o=e.path,i=n.find(e=>e.re.test(o)),i&&(a=i.parse(o),s=i.record.name);else{if(i=t.name?r.get(t.name):n.find(e=>e.re.test(t.path)),!i)throw sH(1,{location:e,currentLocation:t});s=i.record.name,a=tV({},t.params,e.params),o=i.stringify(a)}let c=[],l=i;for(;l;)c.unshift(l.record),l=l.parent;return{name:s,path:o,params:a,matched:c,meta:TH(c)}}e.forEach(e=>a(e));function u(){n.length=0,r.clear()}return{addRoute:a,resolve:l,removeRoute:o,clearRoutes:u,getRoutes:s,getRecordMatcher:i}}function xH(e,t){let n={};for(let r of t)r in e&&(n[r]=e[r]);return n}function SH(e){let t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:CH(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:`components`in e?e.components||null:e.component&&{default:e.component}};return Object.defineProperty(t,`mods`,{value:{}}),t}function CH(e){let t={},n=e.props||!1;if(`component`in e)t.default=n;else for(let r in e.components)t[r]=typeof n==`object`?n[r]:n;return t}function wH(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function TH(e){return e.reduce((e,t)=>tV(e,t.meta),{})}function EH(e,t){let n={};for(let r in e)n[r]=r in t?t[r]:e[r];return n}function DH(e,t){let n=0,r=t.length;for(;n!==r;){let i=n+r>>1,a=mH(e,t[i]);a<0?r=i:n=i+1}let i=OH(e);return i&&(r=t.lastIndexOf(i,r-1)),r}function OH(e){let t=e;for(;t=t.parent;)if(kH(t)&&mH(e,t)===0)return t}function kH({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function AH(e){let t={};if(e===``||e===`?`)return t;let n=e[0]===`?`,r=(n?e.slice(1):e).split(`&`);for(let e=0;ee&&xV(e)):[r&&xV(r)];i.forEach(e=>{e!==void 0&&(t+=(t.length?`&`:``)+n,e!=null&&(t+=`=`+e))})}return t}function MH(e){let t={};for(let n in e){let r=e[n];r!==void 0&&(t[n]=iV(r)?r.map(e=>e==null?null:``+e):r==null?r:``+r)}return t}const NH=Symbol(``),PH=Symbol(``),FH=Symbol(``),IH=Symbol(``),LH=Symbol(``);function RH(){let e=[];function t(t){return e.push(t),()=>{let n=e.indexOf(t);n>-1&&e.splice(n,1)}}function n(){e=[]}return{add:t,list:()=>e.slice(),reset:n}}function zH(e,t,n,r,i,a=e=>e()){let o=r&&(r.enterCallbacks[i]=r.enterCallbacks[i]||[]);return()=>new Promise((s,c)=>{let l=e=>{e===!1?c(sH(4,{from:n,to:t})):e instanceof Error?c(e):rH(e)?c(sH(2,{from:t,to:e})):(o&&r.enterCallbacks[i]===o&&typeof e==`function`&&o.push(e),s())},u=a(()=>e.call(r&&r.instances[i],t,n,l)),d=Promise.resolve(u);e.length<3&&(d=d.then(l)),d.catch(e=>c(e))})}function BH(e,t,n,r,i=e=>e()){let a=[];for(let o of e)for(let e in o.components){let s=o.components[e];if(t!==`beforeRouteEnter`&&!o.instances[e])continue;if($B(s)){let c=s.__vccOpts||s,l=c[t];l&&a.push(zH(l,n,r,o,e,i))}else{let c=s();a.push(()=>c.then(a=>{if(!a)throw Error(`Couldn't resolve component "${e}" at "${o.path}"`);let s=eV(a)?a.default:a;o.mods[e]=a,o.components[e]=s;let c=s.__vccOpts||s,l=c[t];return l&&zH(l,n,r,o,e,i)()}))}}return a}function VH(e){let t=Zi(FH),n=Zi(IH),r=!1,i=null,a=H(()=>{let n=_n(e.to);return t.resolve(n)}),o=H(()=>{let{matched:e}=a.value,{length:t}=e,r=e[t-1],i=n.matched;if(!r||!i.length)return-1;let o=i.findIndex(MV.bind(null,r));if(o>-1)return o;let s=qH(e[t-2]);return t>1&&qH(r)===s&&i[i.length-1].path!==s?i.findIndex(MV.bind(null,e[t-2])):o}),s=H(()=>o.value>-1&&KH(n.params,a.value.params)),c=H(()=>o.value>-1&&o.value===n.matched.length-1&&NV(n.params,a.value.params));function l(n={}){if(GH(n)){let n=t[_n(e.replace)?`replace`:`push`](_n(e.to)).catch(rV);return e.viewTransition&&typeof document<`u`&&`startViewTransition`in document&&document.startViewTransition(()=>n),n}return Promise.resolve()}return{route:a,href:H(()=>a.value.href),isActive:s,isExactActive:c,navigate:l}}function HH(e){return e.length===1?e[0]:e}const UH=Rr({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`},viewTransition:Boolean},useLink:VH,setup(e,{slots:t}){let n=$t(VH(e)),{options:r}=Zi(FH),i=H(()=>({[JH(e.activeClass,r.linkActiveClass,`router-link-active`)]:n.isActive,[JH(e.exactActiveClass,r.linkExactActiveClass,`router-link-exact-active`)]:n.isExactActive}));return()=>{let r=t.default&&HH(t.default(n));return e.custom?r:Jo(`a`,{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:i.value},r)}}}),WH=UH;function GH(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){let t=e.currentTarget.getAttribute(`target`);if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function KH(e,t){for(let n in t){let r=t[n],i=e[n];if(typeof r==`string`){if(r!==i)return!1}else if(!iV(i)||i.length!==r.length||r.some((e,t)=>e!==i[t]))return!1}return!0}function qH(e){return e?e.aliasOf?e.aliasOf.path:e.path:``}const JH=(e,t,n)=>e??t??n,YH=Rr({name:`RouterView`,inheritAttrs:!1,props:{name:{type:String,default:`default`},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){let r=Zi(LH),i=H(()=>e.route||r.value),a=Zi(PH,0),o=H(()=>{let e=_n(a),{matched:t}=i.value,n;for(;(n=t[e])&&!n.components;)e++;return e}),s=H(()=>i.value.matched[o.value]);Xi(PH,H(()=>o.value+1)),Xi(NH,s),Xi(LH,i);let c=R();return V(()=>[c.value,s.value,e.name],([e,t,n],[r,i,a])=>{t&&(t.instances[n]=e,i&&i!==t&&e&&e===r&&(t.leaveGuards.size||(t.leaveGuards=i.leaveGuards),t.updateGuards.size||(t.updateGuards=i.updateGuards))),e&&t&&(!i||!MV(t,i)||!r)&&(t.enterCallbacks[n]||[]).forEach(t=>t(e))},{flush:`post`}),()=>{let r=i.value,a=e.name,o=s.value,l=o&&o.components[a];if(!l)return XH(n.default,{Component:l,route:r});let u=o.props[a],d=u?u===!0?r.params:typeof u==`function`?u(r):u:null,f=e=>{e.component.isUnmounted&&(o.instances[a]=null)},p=Jo(l,tV({},d,t,{onVnodeUnmounted:f,ref:c}));return XH(n.default,{Component:p,route:r})||p}}});function XH(e,t){if(!e)return null;let n=e(t);return n.length===1?n[0]:n}const ZH=YH;function QH(e){let t=bH(e.routes,e),n=e.parseQuery||AH,r=e.stringifyQuery||jH,i=e.history,a=RH(),o=RH(),s=RH(),c=z(LV),l=LV;QB&&e.scrollBehavior&&`scrollRestoration`in history&&(history.scrollRestoration=`manual`);let u=nV.bind(null,e=>``+e),d=nV.bind(null,wV),f=nV.bind(null,TV);function p(e,n){let r,i;return iH(e)?(r=t.getRecordMatcher(e),i=n):i=e,t.addRoute(i,r)}function m(e){let n=t.getRecordMatcher(e);n&&t.removeRoute(n)}function h(){return t.getRoutes().map(e=>e.record)}function g(e){return!!t.getRecordMatcher(e)}function _(e,a){if(a=tV({},a||c.value),typeof e==`string`){let r=OV(n,e,a.path),o=t.resolve({path:r.path},a),s=i.createHref(r.fullPath);return tV(r,o,{params:f(o.params),hash:TV(r.hash),redirectedFrom:void 0,href:s})}let o;if(e.path!=null)o=tV({},e,{path:OV(n,e.path,a.path).path});else{let t=tV({},e.params);for(let e in t)t[e]??delete t[e];o=tV({},e,{params:d(t)}),a.params=d(a.params)}let s=t.resolve(o,a),l=e.hash||``;s.params=u(f(s.params));let p=kV(r,tV({},e,{hash:bV(l),path:s.path})),m=i.createHref(p);return tV({fullPath:p,hash:l,query:r===jH?MH(e.query):e.query||{}},s,{redirectedFrom:void 0,href:m})}function v(e){return typeof e==`string`?OV(n,e,c.value.path):tV({},e)}function y(e,t){if(l!==e)return sH(8,{from:t,to:e})}function b(e){return C(e)}function x(e){return b(tV(v(e),{replace:!0}))}function S(e){let t=e.matched[e.matched.length-1];if(t&&t.redirect){let{redirect:n}=t,r=typeof n==`function`?n(e):n;return typeof r==`string`&&(r=r.includes(`?`)||r.includes(`#`)?r=v(r):{path:r},r.params={}),tV({query:e.query,hash:e.hash,params:r.path==null?e.params:{}},r)}}function C(e,t){let n=l=_(e),i=c.value,a=e.state,o=e.force,s=e.replace===!0,u=S(n);if(u)return C(tV(v(u),{state:typeof u==`object`?tV({},a,u.state):a,force:o,replace:s}),t||n);let d=n;d.redirectedFrom=t;let f;return!o&&jV(r,i,n)&&(f=sH(16,{to:d,from:i}),ne(i,i,!0,!1)),(f?Promise.resolve(f):E(d,i)).catch(e=>cH(e)?cH(e,2)?e:P(e):ee(e,d,i)).then(e=>{if(e){if(cH(e,2))return C(tV({replace:s},v(e.to),{state:typeof e.to==`object`?tV({},a,e.to.state):a,force:o}),t||d)}else e=O(d,i,!0,s,a);return D(d,i,e),e})}function w(e,t){let n=y(e,t);return n?Promise.reject(n):Promise.resolve()}function T(e){let t=ae.values().next().value;return t&&typeof t.runWithContext==`function`?t.runWithContext(e):e()}function E(e,t){let n,[r,i,s]=$H(e,t);n=BH(r.reverse(),`beforeRouteLeave`,e,t);for(let i of r)i.leaveGuards.forEach(r=>{n.push(zH(r,e,t))});let c=w.bind(null,e,t);return n.push(c),se(n).then(()=>{n=[];for(let r of a.list())n.push(zH(r,e,t));return n.push(c),se(n)}).then(()=>{n=BH(i,`beforeRouteUpdate`,e,t);for(let r of i)r.updateGuards.forEach(r=>{n.push(zH(r,e,t))});return n.push(c),se(n)}).then(()=>{n=[];for(let r of s)if(r.beforeEnter)if(iV(r.beforeEnter))for(let i of r.beforeEnter)n.push(zH(i,e,t));else n.push(zH(r.beforeEnter,e,t));return n.push(c),se(n)}).then(()=>(e.matched.forEach(e=>e.enterCallbacks={}),n=BH(s,`beforeRouteEnter`,e,t,T),n.push(c),se(n))).then(()=>{n=[];for(let r of o.list())n.push(zH(r,e,t));return n.push(c),se(n)}).catch(e=>cH(e,8)?e:Promise.reject(e))}function D(e,t,n){s.list().forEach(r=>T(()=>r(e,t,n)))}function O(e,t,n,r,a){let o=y(e,t);if(o)return o;let s=t===LV,l=QB?history.state:{};n&&(r||s?i.replace(e.fullPath,tV({scroll:s&&l&&l.scroll},a)):i.push(e.fullPath,a)),c.value=e,ne(e,t,n,s),P()}let k;function A(){k||=i.listen((e,t,n)=>{if(!oe.listening)return;let r=_(e),a=S(r);if(a){C(tV(a,{replace:!0,force:!0}),r).catch(rV);return}l=r;let o=c.value;QB&&JV(KV(o.fullPath,n.delta),WV()),E(r,o).catch(e=>cH(e,12)?e:cH(e,2)?(C(tV(v(e.to),{force:!0}),r).then(e=>{cH(e,20)&&!n.delta&&n.type===RV.pop&&i.go(-1,!1)}).catch(rV),Promise.reject()):(n.delta&&i.go(-n.delta,!1),ee(e,r,o))).then(e=>{e||=O(r,o,!1),e&&(n.delta&&!cH(e,8)?i.go(-n.delta,!1):n.type===RV.pop&&cH(e,20)&&i.go(-1,!1)),D(r,o,e)}).catch(rV)})}let j=RH(),M=RH(),N;function ee(e,t,n){P(e);let r=M.list();return r.length?r.forEach(r=>r(e,t,n)):console.error(e),Promise.reject(e)}function te(){return N&&c.value!==LV?Promise.resolve():new Promise((e,t)=>{j.add([e,t])})}function P(e){return N||(N=!e,A(),j.list().forEach(([t,n])=>e?n(e):t()),j.reset()),e}function ne(t,n,r,i){let{scrollBehavior:a}=e;if(!QB||!a)return Promise.resolve();let o=!r&&YV(KV(t.fullPath,0))||(i||!r)&&history.state&&history.state.scroll||null;return Kn().then(()=>a(t,n,o)).then(e=>e&&GV(e)).catch(e=>ee(e,t,n))}let re=e=>i.go(e),ie,ae=new Set,oe={currentRoute:c,listening:!0,addRoute:p,removeRoute:m,clearRoutes:t.clearRoutes,hasRoute:g,getRoutes:h,resolve:_,options:e,push:b,replace:x,go:re,back:()=>re(-1),forward:()=>re(1),beforeEach:a.add,beforeResolve:o.add,afterEach:s.add,onError:M.add,isReady:te,install(e){let t=this;e.component(`RouterLink`,WH),e.component(`RouterView`,ZH),e.config.globalProperties.$router=t,Object.defineProperty(e.config.globalProperties,`$route`,{enumerable:!0,get:()=>_n(c)}),QB&&!ie&&c.value===LV&&(ie=!0,b(i.location).catch(e=>{}));let n={};for(let e in LV)Object.defineProperty(n,e,{get:()=>c.value[e],enumerable:!0});e.provide(FH,t),e.provide(IH,en(n)),e.provide(LH,c);let r=e.unmount;ae.add(e),e.unmount=function(){ae.delete(e),ae.size<1&&(l=LV,k&&k(),k=null,c.value=LV,ie=!1,N=!1),r()}}};function se(e){return e.reduce((e,t)=>e.then(()=>T(t)),Promise.resolve())}return oe}function $H(e,t){let n=[],r=[],i=[],a=Math.max(t.matched.length,e.matched.length);for(let o=0;oMV(e,a))?r.push(a):n.push(a));let s=e.matched[o];s&&(t.matched.find(e=>MV(e,s))||i.push(s))}return[n,r,i]}function eU(){return Zi(FH)}function tU(e){return Zi(IH)}const nU=[{path:`/`,name:`/`,component:()=>Y(()=>import(`./pages-DOuHM4kz.js`),__vite__mapDeps([22,23,1,2,24,9,10,11,12,13,14,15,16,17,18,19,20,25,26,4,5,6,7,8,21])),meta:{layout:`stage`,stageTransition:{name:`bubble-wave-out`}}},{path:`/:all(.*)`,name:`/[...all]`,component:()=>Y(()=>import(`./_...all_-BcmmG1Rc.js`),[])},{path:`/audio`,name:`/audio`,component:()=>Y(()=>import(`./audio-uKPykWrz.js`),[])},{path:`/devtools`,children:[{path:`background-remove`,name:`/devtools/background-remove`,component:()=>Y(()=>import(`./background-remove-B1E0Ol5y.js`),__vite__mapDeps([27,7,8,12,28]))},{path:`chat`,name:`/devtools/chat`,component:()=>Y(()=>import(`./chat-BCi2y2TP.js`),__vite__mapDeps([29,11]))},{path:`gesture-circle`,name:`/devtools/gesture-circle`,component:()=>Y(()=>import(`./gesture-circle-CDDLlKJK.js`),__vite__mapDeps([30,23])),meta:{layout:`plain`}},{path:`image`,name:`/devtools/image`,component:()=>Y(()=>import(`./image-BZfCqS0u.js`),__vite__mapDeps([31,32]))},{path:`polaroid`,name:`/devtools/polaroid`,component:()=>Y(()=>import(`./polaroid-8NPKzMOn.js`),__vite__mapDeps([33,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21]))},{path:`vibrant`,name:`/devtools/vibrant`,component:()=>Y(()=>import(`./vibrant-DcBghPZo.js`),__vite__mapDeps([34,7,8,35,28]))}]},{path:`/queue`,name:`/queue`,component:()=>Y(()=>import(`./queue-BXEthkka.js`),__vite__mapDeps([36,17,15]))},{path:`/settings`,children:[{path:``,name:`/settings/`,component:()=>Y(()=>import(`./settings-BMETuw4R.js`),__vite__mapDeps([37,23,38,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`airi-card`,children:[{path:``,name:`/settings/airi-card/`,component:()=>Y(()=>import(`./airi-card-NRKIx9cL.js`),__vite__mapDeps([39,23,40,41,7,8,42,9,10,11,12,13,14,15,16,17,18,19,20,43,44,45,46,4,5,6,21,28])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`components`,children:[{path:`CardCreate`,name:`/settings/airi-card/components/CardCreate`,component:()=>Y(()=>import(`./CardCreate-DPyf_Zae.js`),__vite__mapDeps([47,40]))},{path:`CardCreationDialog`,name:`/settings/airi-card/components/CardCreationDialog`,component:()=>Y(()=>import(`./CardCreationDialog-Bsxy1Noo.js`),__vite__mapDeps([48,41,7,8,42,9,10,11,12,13,14,15,16,17,18,19,20,43,4,5,6,21]))},{path:`CardDetailDialog`,name:`/settings/airi-card/components/CardDetailDialog`,component:()=>Y(()=>import(`./CardDetailDialog-BqQSzFGz.js`),__vite__mapDeps([49,44,45,42,7,8,19,20,9,10,11,12,13,14,15,16,17,18,4,5,6,21]))},{path:`CardListItem`,name:`/settings/airi-card/components/CardListItem`,component:()=>Y(()=>import(`./CardListItem-BrwrvTw2.js`),__vite__mapDeps([50,46,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21]))},{path:`DeleteCardDialog`,name:`/settings/airi-card/components/DeleteCardDialog`,component:()=>Y(()=>import(`./DeleteCardDialog-xlTiv14_.js`),__vite__mapDeps([51,45,42,7,8,19,20]))}]}]},{path:`appearance`,children:[{path:``,name:`/settings/appearance/`,component:()=>Y(()=>import(`./appearance-DYP1DXMi.js`),__vite__mapDeps([52,23,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21])),meta:{layout:`settings`,stageTransition:{name:`slide`,pageSpecificAvailable:!0}}},{path:`color-scheme`,name:`/settings/appearance/color-scheme`,component:()=>Y(()=>import(`./color-scheme-CIOGKOoo.js`),__vite__mapDeps([53,23,54,42,7,8,4,5,6,9,10,11,12,13,14,15,16,17,18,19,20,21,55])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`developer`,name:`/settings/appearance/developer`,component:()=>Y(()=>import(`./developer-DSMe0VXa.js`),__vite__mapDeps([56,23,57,9,10,11,12,13,14,15,16,17,18])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`general`,name:`/settings/appearance/general`,component:()=>Y(()=>import(`./general-DKp4DER8.js`),__vite__mapDeps([58,23,57,9,10,11,12,13,14,15,16,17,18])),meta:{layout:`settings`,stageTransition:{name:`slide`}}}]},{path:`memory`,children:[{path:``,name:`/settings/memory/`,component:()=>Y(()=>import(`./memory-SfXrd_LZ.js`),__vite__mapDeps([59,23])),meta:{layout:`settings`,stageTransition:{name:`slide`}}}]},{path:`models`,children:[{path:``,name:`/settings/models/`,component:()=>Y(()=>import(`./models-DXBLIPsA.js`),__vite__mapDeps([60,23,38,54,42,7,8,61,4,5,6,9,10,11,12,13,14,15,16,17,18,19,20,21,35,62])),meta:{layout:`settings`,stageTransition:{name:`slide`,pageSpecificAvailable:!0}}}]},{path:`modules`,children:[{path:``,name:`/settings/modules/`,component:()=>Y(()=>import(`./modules-Cg-sfGqM.js`),__vite__mapDeps([63,23,38,61,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21])),meta:{layout:`settings`,stageTransition:{name:`slide`,pageSpecificAvailable:!0}}},{path:`consciousness`,name:`/settings/modules/consciousness`,component:()=>Y(()=>import(`./consciousness-0dybmXhk.js`),__vite__mapDeps([64,23,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`memory-long-term`,name:`/settings/modules/memory-long-term`,component:()=>Y(()=>import(`./memory-long-term-w7gJ2GOm.js`),__vite__mapDeps([65,23])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`memory-short-term`,name:`/settings/modules/memory-short-term`,component:()=>Y(()=>import(`./memory-short-term-BJNXIYfx.js`),__vite__mapDeps([66,23])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`speech`,name:`/settings/modules/speech`,component:()=>Y(()=>import(`./speech-Dg1E0ZUG.js`),__vite__mapDeps([67,23,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,25,68])),meta:{layout:`settings`,stageTransition:{name:`slide`}}}]},{path:`providers`,children:[{path:``,name:`/settings/providers/`,component:()=>Y(()=>import(`./providers-DesecQLA.js`),__vite__mapDeps([69,23,38,61,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21])),meta:{layout:`settings`,stageTransition:{name:`slide`,pageSpecificAvailable:!0}}},{path:`alibaba-cloud-model-studio`,name:`/settings/providers/alibaba-cloud-model-studio`,component:()=>Y(()=>import(`./alibaba-cloud-model-studio-CU-ra2RE.js`),__vite__mapDeps([70,23,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`anthropic`,name:`/settings/providers/anthropic`,component:()=>Y(()=>import(`./anthropic-DO-lpzYI.js`),__vite__mapDeps([71,23,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`cloudflare-workers-ai`,name:`/settings/providers/cloudflare-workers-ai`,component:()=>Y(()=>import(`./cloudflare-workers-ai-Boy6ApbV.js`),__vite__mapDeps([72,23,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`deepseek`,name:`/settings/providers/deepseek`,component:()=>Y(()=>import(`./deepseek-DDoXlrh7.js`),__vite__mapDeps([73,23,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`elevenlabs`,name:`/settings/providers/elevenlabs`,component:()=>Y(()=>import(`./elevenlabs-C_CpBUe4.js`),__vite__mapDeps([74,23,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`featherless-ai`,name:`/settings/providers/featherless-ai`,component:()=>Y(()=>import(`./featherless-ai-BrsLkmWp.js`),__vite__mapDeps([75,23,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`fireworks-ai`,name:`/settings/providers/fireworks-ai`,component:()=>Y(()=>import(`./fireworks-ai-BzZp6rdf.js`),__vite__mapDeps([76,23,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`google-generative-ai`,name:`/settings/providers/google-generative-ai`,component:()=>Y(()=>import(`./google-generative-ai-BmLcvcU4.js`),__vite__mapDeps([77,23,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`microsoft-speech`,name:`/settings/providers/microsoft-speech`,component:()=>Y(()=>import(`./microsoft-speech-D1Nm-r-u.js`),__vite__mapDeps([78,23,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`mistral-ai`,name:`/settings/providers/mistral-ai`,component:()=>Y(()=>import(`./mistral-ai-Dlp6niUh.js`),__vite__mapDeps([79,23,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`moonshot-ai`,name:`/settings/providers/moonshot-ai`,component:()=>Y(()=>import(`./moonshot-ai-4PZIYm23.js`),__vite__mapDeps([80,23,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`novita-ai`,name:`/settings/providers/novita-ai`,component:()=>Y(()=>import(`./novita-ai-BvZ0Q5n6.js`),__vite__mapDeps([81,23,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`ollama`,name:`/settings/providers/ollama`,component:()=>Y(()=>import(`./ollama-BfwgYUF-.js`),__vite__mapDeps([82,23,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`openai`,name:`/settings/providers/openai`,component:()=>Y(()=>import(`./openai-DTGR4qBa.js`),__vite__mapDeps([83,23,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`openai-audio-speech`,name:`/settings/providers/openai-audio-speech`,component:()=>Y(()=>import(`./openai-audio-speech-NATd0MbC.js`),__vite__mapDeps([84,23,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`openai-audio-transcription`,name:`/settings/providers/openai-audio-transcription`,component:()=>Y(()=>import(`./openai-audio-transcription-DbLUDJtC.js`),__vite__mapDeps([85,23,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`openrouter-ai`,name:`/settings/providers/openrouter-ai`,component:()=>Y(()=>import(`./openrouter-ai-DBLeIZUx.js`),__vite__mapDeps([86,23,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`player2-api`,name:`/settings/providers/player2-api`,component:()=>Y(()=>import(`./player2-api-CEExUfJX.js`),__vite__mapDeps([87,23,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`together-ai`,name:`/settings/providers/together-ai`,component:()=>Y(()=>import(`./together-ai-DlBQIgEL.js`),__vite__mapDeps([88,23,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`volcengine`,name:`/settings/providers/volcengine`,component:()=>Y(()=>import(`./volcengine-DmaJ_D4B.js`),__vite__mapDeps([89,23,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`xai`,name:`/settings/providers/xai`,component:()=>Y(()=>import(`./xai-t3unSriW.js`),__vite__mapDeps([90,23,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21])),meta:{layout:`settings`,stageTransition:{name:`slide`}}}]},{path:`scene`,children:[{path:``,name:`/settings/scene/`,component:()=>Y(()=>import(`./scene-BUwCrWjQ.js`),__vite__mapDeps([91,23,38,61,9,10,11,12,13,14,15,16,17,18])),meta:{layout:`settings`,stageTransition:{name:`slide`,pageSpecificAvailable:!0}}}]}]},{path:`/stage`,children:[{path:``,name:`/stage/`,component:()=>Y(()=>import(`./stage-BAzv3iKX.js`),__vite__mapDeps([92,23,1,2,24,9,10,11,12,13,14,15,16,17,18,19,20,25,26,4,5,6,7,8,21])),meta:{layout:`stage`,stageTransition:{name:`bubble-wave-out`}}}]},{path:`/test`,children:[{path:`filter-message`,name:`/test/filter-message`,component:()=>Y(()=>import(`./filter-message-CCFT1WCI.js`),__vite__mapDeps([93,7,8,17,25,68]))},{path:`queues`,children:[{path:`delays`,name:`/test/queues/delays`,component:()=>Y(()=>import(`./delays-IClek8Pp.js`),__vite__mapDeps([94,7,8,10,17,15,16,25,68]))},{path:`emotions`,name:`/test/queues/emotions`,component:()=>Y(()=>import(`./emotions-3EJrhf3a.js`),__vite__mapDeps([95,7,8,17,15,16,25,68]))},{path:`messages`,name:`/test/queues/messages`,component:()=>Y(()=>import(`./messages-Dz0YVnuk.js`),__vite__mapDeps([96,7,8,17,15,16,25,68]))}]}]}],rU=(e,t)=>{if(typeof e==`number`){if(t===3)return{mode:`rgb`,r:(e>>8&15|e>>4&240)/255,g:(e>>4&15|e&240)/255,b:(e&15|e<<4&240)/255};if(t===4)return{mode:`rgb`,r:(e>>12&15|e>>8&240)/255,g:(e>>8&15|e>>4&240)/255,b:(e>>4&15|e&240)/255,alpha:(e&15|e<<4&240)/255};if(t===6)return{mode:`rgb`,r:(e>>16&255)/255,g:(e>>8&255)/255,b:(e&255)/255};if(t===8)return{mode:`rgb`,r:(e>>24&255)/255,g:(e>>16&255)/255,b:(e>>8&255)/255,alpha:(e&255)/255}}};var iU=rU;const aU={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};var oU=aU;const sU=e=>iU(oU[e.toLowerCase()],6);var cU=sU;const lU=/^#?([0-9a-f]{8}|[0-9a-f]{6}|[0-9a-f]{4}|[0-9a-f]{3})$/i,uU=e=>{let t;return(t=e.match(lU))?iU(parseInt(t[1],16),t[1].length):void 0};var dU=uU;const fU=`([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)`,pU=`(?:${fU}|none)`,mU=`${fU}%`,hU=`(?:${fU}%|none)`,gU=`(?:${fU}%|${fU})`,_U=`(?:${fU}%|${fU}|none)`,vU=`(?:${fU}(deg|grad|rad|turn)|${fU})`,yU=`(?:${fU}(deg|grad|rad|turn)|${fU}|none)`,bU=`\\s*,\\s*`,xU=RegExp(`^`+_U+`$`),SU=RegExp(`^rgba?\\(\\s*${fU}${bU}${fU}${bU}${fU}\\s*(?:,\\s*${gU}\\s*)?\\)$`),CU=RegExp(`^rgba?\\(\\s*${mU}${bU}${mU}${bU}${mU}\\s*(?:,\\s*${gU}\\s*)?\\)$`),wU=e=>{let t={mode:`rgb`},n;if(n=e.match(SU))n[1]!==void 0&&(t.r=n[1]/255),n[2]!==void 0&&(t.g=n[2]/255),n[3]!==void 0&&(t.b=n[3]/255);else if(n=e.match(CU))n[1]!==void 0&&(t.r=n[1]/100),n[2]!==void 0&&(t.g=n[2]/100),n[3]!==void 0&&(t.b=n[3]/100);else return;return n[4]===void 0?n[5]!==void 0&&(t.alpha=Math.max(0,Math.min(1,+n[5]))):t.alpha=Math.max(0,Math.min(1,n[4]/100)),t};var TU=wU;const EU=(e,t)=>e===void 0?void 0:typeof e==`object`?e.mode===void 0?t?{...e,mode:t}:void 0:e:QU(e);var DU=EU;const OU=(e=`rgb`)=>t=>(t=DU(t,e))===void 0?void 0:t.mode===e?t:AU[t.mode][e]?AU[t.mode][e](t):e===`rgb`?AU[t.mode].rgb(t):AU.rgb[e](AU[t.mode].rgb(t));var kU=OU;const AU={},jU={},MU=[],NU={},PU=e=>e,FU=e=>(AU[e.mode]={...AU[e.mode],...e.toMode},Object.keys(e.fromMode||{}).forEach(t=>{AU[t]||(AU[t]={}),AU[t][e.mode]=e.fromMode[t]}),e.ranges||={},e.difference||={},e.channels.forEach(t=>{if(e.ranges[t]===void 0&&(e.ranges[t]=[0,1]),!e.interpolate[t])throw Error(`Missing interpolator for: ${t}`);typeof e.interpolate[t]==`function`&&(e.interpolate[t]={use:e.interpolate[t]}),e.interpolate[t].fixup||(e.interpolate[t].fixup=PU)}),jU[e.mode]=e,(e.parse||[]).forEach(t=>{LU(t,e.mode)}),kU(e.mode)),IU=e=>jU[e],LU=(e,t)=>{if(typeof e==`string`){if(!t)throw Error(`'mode' required when 'parser' is a string`);NU[e]=t}else typeof e==`function`&&MU.indexOf(e)<0&&MU.push(e)},RU=/[^\x00-\x7F]|[a-zA-Z_]/,zU=/[^\x00-\x7F]|[-\w]/,X={Function:`function`,Ident:`ident`,Number:`number`,Percentage:`percentage`,ParenClose:`)`,None:`none`,Hue:`hue`,Alpha:`alpha`};let Z=0;function BU(e){let t=e[Z],n=e[Z+1];return t===`-`||t===`+`?/\d/.test(n)||n===`.`&&/\d/.test(e[Z+2]):t===`.`?/\d/.test(n):/\d/.test(t)}function VU(e){if(Z>=e.length)return!1;let t=e[Z];if(RU.test(t))return!0;if(t===`-`){if(e.length-Z<2)return!1;let t=e[Z+1];return!!(t===`-`||RU.test(t))}return!1}const HU={deg:1,rad:180/Math.PI,grad:9/10,turn:360};function UU(e){let t=``;if((e[Z]===`-`||e[Z]===`+`)&&(t+=e[Z++]),t+=WU(e),e[Z]===`.`&&/\d/.test(e[Z+1])&&(t+=e[Z++]+WU(e)),(e[Z]===`e`||e[Z]===`E`)&&((e[Z+1]===`-`||e[Z+1]===`+`)&&/\d/.test(e[Z+2])?t+=e[Z++]+e[Z++]+WU(e):/\d/.test(e[Z+1])&&(t+=e[Z++]+WU(e))),VU(e)){let n=GU(e);return n===`deg`||n===`rad`||n===`turn`||n===`grad`?{type:X.Hue,value:t*HU[n]}:void 0}return e[Z]===`%`?(Z++,{type:X.Percentage,value:+t}):{type:X.Number,value:+t}}function WU(e){let t=``;for(;/\d/.test(e[Z]);)t+=e[Z++];return t}function GU(e){let t=``;for(;Ze[r],set(t){e[r]=t}}):(pn(i)||an(i))&&(n[r]=Tn(e,r))}return n}const JB=`modulepreload`,YB=function(e){return`/`+e},XB={},Y=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=function(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))},i=document.getElementsByTagName(`link`),a=document.querySelector(`meta[property=csp-nonce]`),o=a?.nonce||a?.getAttribute(`nonce`);r=e(t.map(e=>{if(e=YB(e,n),e in XB)return;XB[e]=!0;let t=e.endsWith(`.css`),r=t?`[rel="stylesheet"]`:``,a=!!n;if(a)for(let n=i.length-1;n>=0;n--){let r=i[n];if(r.href===e&&(!t||r.rel===`stylesheet`))return}else if(document.querySelector(`link[href="${e}"]${r}`))return;let s=document.createElement(`link`);if(s.rel=t?`stylesheet`:JB,t||(s.as=`script`),s.crossOrigin=``,s.href=e,o&&s.setAttribute(`nonce`,o),document.head.appendChild(s),t)return new Promise((t,n)=>{s.addEventListener(`load`,t),s.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${e}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[]){if(e.status!==`rejected`)continue;i(e.reason)}return e().catch(i)})},ZB=e=>{let t={},n=Object.assign({"/src/layouts/default.vue":()=>Y(()=>import(`./default-BdRB7bUi.js`),__vite__mapDeps([0,1,2])),"/src/layouts/home.vue":()=>Y(()=>import(`./home-CvTDzPpZ.js`),[]),"/src/layouts/plain.vue":()=>Y(()=>import(`./plain-Dd6OPHCC.js`),[]),"/src/layouts/settings.vue":()=>Y(()=>import(`./settings-Dm8h2cwP.js`),__vite__mapDeps([3,1,2,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21])),"/src/layouts/stage.vue":()=>Y(()=>import(`./stage-CS_yTdA7.js`),[])});Object.entries(n).forEach(([e,n])=>{let r=e.replace(`/src/layouts/`,``).replace(`.vue`,``);t[r]=n});function r(e,n=!0){return e.map(e=>{var i,a,o;if((i=e.children)?.length>0&&(e.children=r(e.children,!1)),n){var s,c,l;let n=!e.component&&(s=e.children)?.find(e=>{var t;return(e.path===``||e.path===`/`)&&(t=e.meta)?.isLayout});if(n)return e;if((c=e.meta)?.layout!==!1)return{path:e.path,component:t[(l=e.meta)?.layout||`default`],children:e.path===`/`?[e]:[{...e,path:``}],meta:{isLayout:!0}}}return(a=e.meta)?.layout?{path:e.path,component:t[(o=e.meta)?.layout],children:[{...e,path:``}],meta:{isLayout:!0}}:e})}return r(e)},QB=typeof document<`u`;function $B(e){return typeof e==`object`||`displayName`in e||`props`in e||`__vccOpts`in e}function eV(e){return e.__esModule||e[Symbol.toStringTag]===`Module`||e.default&&$B(e.default)}const tV=Object.assign;function nV(e,t){let n={};for(let r in t){let i=t[r];n[r]=iV(i)?i.map(e):e(i)}return n}const rV=()=>{},iV=Array.isArray,aV=/#/g,oV=/&/g,sV=/\//g,cV=/=/g,lV=/\?/g,uV=/\+/g,dV=/%5B/g,fV=/%5D/g,pV=/%5E/g,mV=/%60/g,hV=/%7B/g,gV=/%7C/g,_V=/%7D/g,vV=/%20/g;function yV(e){return encodeURI(``+e).replace(gV,`|`).replace(dV,`[`).replace(fV,`]`)}function bV(e){return yV(e).replace(hV,`{`).replace(_V,`}`).replace(pV,`^`)}function xV(e){return yV(e).replace(uV,`%2B`).replace(vV,`+`).replace(aV,`%23`).replace(oV,`%26`).replace(mV,"`").replace(hV,`{`).replace(_V,`}`).replace(pV,`^`)}function SV(e){return xV(e).replace(cV,`%3D`)}function CV(e){return yV(e).replace(aV,`%23`).replace(lV,`%3F`)}function wV(e){return e==null?``:CV(e).replace(sV,`%2F`)}function TV(e){try{return decodeURIComponent(``+e)}catch{}return``+e}const EV=/\/$/,DV=e=>e.replace(EV,``);function OV(e,t,n=`/`){let r,i={},a=``,o=``,s=t.indexOf(`#`),c=t.indexOf(`?`);return s=0&&(c=-1),c>-1&&(r=t.slice(0,c),a=t.slice(c+1,s>-1?s:t.length),i=e(a)),s>-1&&(r||=t.slice(0,s),o=t.slice(s,t.length)),r=IV(r??t,n),{fullPath:r+(a&&`?`)+a+o,path:r,query:i,hash:TV(o)}}function kV(e,t){let n=t.query?e(t.query):``;return t.path+(n&&`?`)+n+(t.hash||``)}function AV(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||`/`}function jV(e,t,n){let r=t.matched.length-1,i=n.matched.length-1;return r>-1&&r===i&&MV(t.matched[r],n.matched[i])&&NV(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function MV(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function NV(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e)if(!PV(e[n],t[n]))return!1;return!0}function PV(e,t){return iV(e)?FV(e,t):iV(t)?FV(t,e):e===t}function FV(e,t){return iV(t)?e.length===t.length&&e.every((e,n)=>e===t[n]):e.length===1&&e[0]===t}function IV(e,t){if(e.startsWith(`/`))return e;if(!e)return t;let n=t.split(`/`),r=e.split(`/`),i=r[r.length-1];(i===`..`||i===`.`)&&r.push(``);let a=n.length-1,o,s;for(o=0;o1&&a--;else break;return n.slice(0,a).join(`/`)+`/`+r.slice(o).join(`/`)}const LV={path:`/`,name:void 0,params:{},query:{},hash:``,fullPath:`/`,matched:[],meta:{},redirectedFrom:void 0};var RV;(function(e){e.pop=`pop`,e.push=`push`})(RV||={});var zV;(function(e){e.back=`back`,e.forward=`forward`,e.unknown=``})(zV||={});function BV(e){if(!e)if(QB){let t=document.querySelector(`base`);e=t&&t.getAttribute(`href`)||`/`,e=e.replace(/^\w+:\/\/[^\/]+/,``)}else e=`/`;return e[0]!==`/`&&e[0]!==`#`&&(e=`/`+e),DV(e)}const VV=/^[^#]+#/;function HV(e,t){return e.replace(VV,`#`)+t}function UV(e,t){let n=document.documentElement.getBoundingClientRect(),r=e.getBoundingClientRect();return{behavior:t.behavior,left:r.left-n.left-(t.left||0),top:r.top-n.top-(t.top||0)}}const WV=()=>({left:window.scrollX,top:window.scrollY});function GV(e){let t;if(`el`in e){let n=e.el,r=typeof n==`string`&&n.startsWith(`#`),i=typeof n==`string`?r?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!i)return;t=UV(i,e)}else t=e;`scrollBehavior`in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left==null?window.scrollX:t.left,t.top==null?window.scrollY:t.top)}function KV(e,t){let n=history.state?history.state.position-t:-1;return n+e}const qV=new Map;function JV(e,t){qV.set(e,t)}function YV(e){let t=qV.get(e);return qV.delete(e),t}let XV=()=>location.protocol+`//`+location.host;function ZV(e,t){let{pathname:n,search:r,hash:i}=t,a=e.indexOf(`#`);if(a>-1){let t=i.includes(e.slice(a))?e.slice(a).length:1,n=i.slice(t);return n[0]!==`/`&&(n=`/`+n),AV(n,``)}let o=AV(n,e);return o+r+i}function QV(e,t,n,r){let i=[],a=[],o=null,s=({state:a})=>{let s=ZV(e,location),c=n.value,l=t.value,u=0;if(a){if(n.value=s,t.value=a,o&&o===c){o=null;return}u=l?a.position-l.position:0}else r(s);i.forEach(e=>{e(n.value,c,{delta:u,type:RV.pop,direction:u?u>0?zV.forward:zV.back:zV.unknown})})};function c(){o=n.value}function l(e){i.push(e);let t=()=>{let t=i.indexOf(e);t>-1&&i.splice(t,1)};return a.push(t),t}function u(){let{history:e}=window;e.state&&e.replaceState(tV({},e.state,{scroll:WV()}),``)}function d(){for(let e of a)e();a=[],window.removeEventListener(`popstate`,s),window.removeEventListener(`beforeunload`,u)}return window.addEventListener(`popstate`,s),window.addEventListener(`beforeunload`,u,{passive:!0}),{pauseListeners:c,listen:l,destroy:d}}function $V(e,t,n,r=!1,i=!1){return{back:e,current:t,forward:n,replaced:r,position:window.history.length,scroll:i?WV():null}}function eH(e){let{history:t,location:n}=window,r={value:ZV(e,n)},i={value:t.state};i.value||a(r.value,{back:null,current:r.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function a(r,a,o){let s=e.indexOf(`#`),c=s>-1?(n.host&&document.querySelector(`base`)?e:e.slice(s))+r:XV()+e+r;try{t[o?`replaceState`:`pushState`](a,``,c),i.value=a}catch(e){console.error(e),n[o?`replace`:`assign`](c)}}function o(e,n){let o=tV({},t.state,$V(i.value.back,e,i.value.forward,!0),n,{position:i.value.position});a(e,o,!0),r.value=e}function s(e,n){let o=tV({},i.value,t.state,{forward:e,scroll:WV()});a(o.current,o,!0);let s=tV({},$V(r.value,e,null),{position:o.position+1},n);a(e,s,!1),r.value=e}return{location:r,state:i,push:s,replace:o}}function tH(e){e=BV(e);let t=eH(e),n=QV(e,t.state,t.location,t.replace);function r(e,t=!0){t||n.pauseListeners(),history.go(e)}let i=tV({location:``,base:e,go:r,createHref:HV.bind(null,e)},t,n);return Object.defineProperty(i,`location`,{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(i,`state`,{enumerable:!0,get:()=>t.state.value}),i}function nH(e){return e=location.host?e||location.pathname+location.search:``,e.includes(`#`)||(e+=`#`),tH(e)}function rH(e){return typeof e==`string`||e&&typeof e==`object`}function iH(e){return typeof e==`string`||typeof e==`symbol`}const aH=Symbol(``);var oH;(function(e){e[e.aborted=4]=`aborted`,e[e.cancelled=8]=`cancelled`,e[e.duplicated=16]=`duplicated`})(oH||={});function sH(e,t){return tV(Error(),{type:e,[aH]:!0},t)}function cH(e,t){return e instanceof Error&&aH in e&&(t==null||!!(e.type&t))}const lH=`[^/]+?`,uH={sensitive:!1,strict:!1,start:!0,end:!0},dH=/[.+*?^${}()[\]/\\]/g;function fH(e,t){let n=tV({},uH,t),r=[],i=n.start?`^`:``,a=[];for(let t of e){let e=t.length?[]:[90];n.strict&&!t.length&&(i+=`/`);for(let r=0;rt.length?t.length===1&&t[0]===80?1:-1:0}function mH(e,t){let n=0,r=e.score,i=t.score;for(;n0&&t[t.length-1]<0}const gH={type:0,value:``},_H=/[a-zA-Z0-9_]/;function vH(e){if(!e)return[[]];if(e===`/`)return[[gH]];if(!e.startsWith(`/`))throw Error(`Invalid path "${e}"`);function t(e){throw Error(`ERR (${n})/"${l}": ${e}`)}let n=0,r=n,i=[],a;function o(){a&&i.push(a),a=[]}let s=0,c,l=``,u=``;function d(){l&&(n===0?a.push({type:0,value:l}):n===1||n===2||n===3?(a.length>1&&(c===`*`||c===`+`)&&t(`A repeatable param (${l}) must be alone in its segment. eg: '/:ids+.`),a.push({type:1,value:l,regexp:u,repeatable:c===`*`||c===`+`,optional:c===`*`||c===`?`})):t(`Invalid state to consume buffer`),l=``)}function f(){l+=c}for(;s{o(f)}:rV}function o(e){if(iH(e)){let t=r.get(e);t&&(r.delete(e),n.splice(n.indexOf(t),1),t.children.forEach(o),t.alias.forEach(o))}else{let t=n.indexOf(e);t>-1&&(n.splice(t,1),e.record.name&&r.delete(e.record.name),e.children.forEach(o),e.alias.forEach(o))}}function s(){return n}function c(e){let t=DH(e,n);n.splice(t,0,e),e.record.name&&!wH(e)&&r.set(e.record.name,e)}function l(e,t){let i,a={},o,s;if(`name`in e&&e.name){if(i=r.get(e.name),!i)throw sH(1,{location:e});s=i.record.name,a=tV(xH(t.params,i.keys.filter(e=>!e.optional).concat(i.parent?i.parent.keys.filter(e=>e.optional):[]).map(e=>e.name)),e.params&&xH(e.params,i.keys.map(e=>e.name))),o=i.stringify(a)}else if(e.path!=null)o=e.path,i=n.find(e=>e.re.test(o)),i&&(a=i.parse(o),s=i.record.name);else{if(i=t.name?r.get(t.name):n.find(e=>e.re.test(t.path)),!i)throw sH(1,{location:e,currentLocation:t});s=i.record.name,a=tV({},t.params,e.params),o=i.stringify(a)}let c=[],l=i;for(;l;)c.unshift(l.record),l=l.parent;return{name:s,path:o,params:a,matched:c,meta:TH(c)}}e.forEach(e=>a(e));function u(){n.length=0,r.clear()}return{addRoute:a,resolve:l,removeRoute:o,clearRoutes:u,getRoutes:s,getRecordMatcher:i}}function xH(e,t){let n={};for(let r of t)r in e&&(n[r]=e[r]);return n}function SH(e){let t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:CH(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:`components`in e?e.components||null:e.component&&{default:e.component}};return Object.defineProperty(t,`mods`,{value:{}}),t}function CH(e){let t={},n=e.props||!1;if(`component`in e)t.default=n;else for(let r in e.components)t[r]=typeof n==`object`?n[r]:n;return t}function wH(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function TH(e){return e.reduce((e,t)=>tV(e,t.meta),{})}function EH(e,t){let n={};for(let r in e)n[r]=r in t?t[r]:e[r];return n}function DH(e,t){let n=0,r=t.length;for(;n!==r;){let i=n+r>>1,a=mH(e,t[i]);a<0?r=i:n=i+1}let i=OH(e);return i&&(r=t.lastIndexOf(i,r-1)),r}function OH(e){let t=e;for(;t=t.parent;)if(kH(t)&&mH(e,t)===0)return t}function kH({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function AH(e){let t={};if(e===``||e===`?`)return t;let n=e[0]===`?`,r=(n?e.slice(1):e).split(`&`);for(let e=0;ee&&xV(e)):[r&&xV(r)];i.forEach(e=>{e!==void 0&&(t+=(t.length?`&`:``)+n,e!=null&&(t+=`=`+e))})}return t}function MH(e){let t={};for(let n in e){let r=e[n];r!==void 0&&(t[n]=iV(r)?r.map(e=>e==null?null:``+e):r==null?r:``+r)}return t}const NH=Symbol(``),PH=Symbol(``),FH=Symbol(``),IH=Symbol(``),LH=Symbol(``);function RH(){let e=[];function t(t){return e.push(t),()=>{let n=e.indexOf(t);n>-1&&e.splice(n,1)}}function n(){e=[]}return{add:t,list:()=>e.slice(),reset:n}}function zH(e,t,n,r,i,a=e=>e()){let o=r&&(r.enterCallbacks[i]=r.enterCallbacks[i]||[]);return()=>new Promise((s,c)=>{let l=e=>{e===!1?c(sH(4,{from:n,to:t})):e instanceof Error?c(e):rH(e)?c(sH(2,{from:t,to:e})):(o&&r.enterCallbacks[i]===o&&typeof e==`function`&&o.push(e),s())},u=a(()=>e.call(r&&r.instances[i],t,n,l)),d=Promise.resolve(u);e.length<3&&(d=d.then(l)),d.catch(e=>c(e))})}function BH(e,t,n,r,i=e=>e()){let a=[];for(let o of e)for(let e in o.components){let s=o.components[e];if(t!==`beforeRouteEnter`&&!o.instances[e])continue;if($B(s)){let c=s.__vccOpts||s,l=c[t];l&&a.push(zH(l,n,r,o,e,i))}else{let c=s();a.push(()=>c.then(a=>{if(!a)throw Error(`Couldn't resolve component "${e}" at "${o.path}"`);let s=eV(a)?a.default:a;o.mods[e]=a,o.components[e]=s;let c=s.__vccOpts||s,l=c[t];return l&&zH(l,n,r,o,e,i)()}))}}return a}function VH(e){let t=Zi(FH),n=Zi(IH),r=!1,i=null,a=H(()=>{let n=_n(e.to);return t.resolve(n)}),o=H(()=>{let{matched:e}=a.value,{length:t}=e,r=e[t-1],i=n.matched;if(!r||!i.length)return-1;let o=i.findIndex(MV.bind(null,r));if(o>-1)return o;let s=qH(e[t-2]);return t>1&&qH(r)===s&&i[i.length-1].path!==s?i.findIndex(MV.bind(null,e[t-2])):o}),s=H(()=>o.value>-1&&KH(n.params,a.value.params)),c=H(()=>o.value>-1&&o.value===n.matched.length-1&&NV(n.params,a.value.params));function l(n={}){if(GH(n)){let n=t[_n(e.replace)?`replace`:`push`](_n(e.to)).catch(rV);return e.viewTransition&&typeof document<`u`&&`startViewTransition`in document&&document.startViewTransition(()=>n),n}return Promise.resolve()}return{route:a,href:H(()=>a.value.href),isActive:s,isExactActive:c,navigate:l}}function HH(e){return e.length===1?e[0]:e}const UH=Rr({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`},viewTransition:Boolean},useLink:VH,setup(e,{slots:t}){let n=$t(VH(e)),{options:r}=Zi(FH),i=H(()=>({[JH(e.activeClass,r.linkActiveClass,`router-link-active`)]:n.isActive,[JH(e.exactActiveClass,r.linkExactActiveClass,`router-link-exact-active`)]:n.isExactActive}));return()=>{let r=t.default&&HH(t.default(n));return e.custom?r:Jo(`a`,{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:i.value},r)}}}),WH=UH;function GH(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){let t=e.currentTarget.getAttribute(`target`);if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function KH(e,t){for(let n in t){let r=t[n],i=e[n];if(typeof r==`string`){if(r!==i)return!1}else if(!iV(i)||i.length!==r.length||r.some((e,t)=>e!==i[t]))return!1}return!0}function qH(e){return e?e.aliasOf?e.aliasOf.path:e.path:``}const JH=(e,t,n)=>e??t??n,YH=Rr({name:`RouterView`,inheritAttrs:!1,props:{name:{type:String,default:`default`},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){let r=Zi(LH),i=H(()=>e.route||r.value),a=Zi(PH,0),o=H(()=>{let e=_n(a),{matched:t}=i.value,n;for(;(n=t[e])&&!n.components;)e++;return e}),s=H(()=>i.value.matched[o.value]);Xi(PH,H(()=>o.value+1)),Xi(NH,s),Xi(LH,i);let c=R();return V(()=>[c.value,s.value,e.name],([e,t,n],[r,i,a])=>{t&&(t.instances[n]=e,i&&i!==t&&e&&e===r&&(t.leaveGuards.size||(t.leaveGuards=i.leaveGuards),t.updateGuards.size||(t.updateGuards=i.updateGuards))),e&&t&&(!i||!MV(t,i)||!r)&&(t.enterCallbacks[n]||[]).forEach(t=>t(e))},{flush:`post`}),()=>{let r=i.value,a=e.name,o=s.value,l=o&&o.components[a];if(!l)return XH(n.default,{Component:l,route:r});let u=o.props[a],d=u?u===!0?r.params:typeof u==`function`?u(r):u:null,f=e=>{e.component.isUnmounted&&(o.instances[a]=null)},p=Jo(l,tV({},d,t,{onVnodeUnmounted:f,ref:c}));return XH(n.default,{Component:p,route:r})||p}}});function XH(e,t){if(!e)return null;let n=e(t);return n.length===1?n[0]:n}const ZH=YH;function QH(e){let t=bH(e.routes,e),n=e.parseQuery||AH,r=e.stringifyQuery||jH,i=e.history,a=RH(),o=RH(),s=RH(),c=z(LV),l=LV;QB&&e.scrollBehavior&&`scrollRestoration`in history&&(history.scrollRestoration=`manual`);let u=nV.bind(null,e=>``+e),d=nV.bind(null,wV),f=nV.bind(null,TV);function p(e,n){let r,i;return iH(e)?(r=t.getRecordMatcher(e),i=n):i=e,t.addRoute(i,r)}function m(e){let n=t.getRecordMatcher(e);n&&t.removeRoute(n)}function h(){return t.getRoutes().map(e=>e.record)}function g(e){return!!t.getRecordMatcher(e)}function _(e,a){if(a=tV({},a||c.value),typeof e==`string`){let r=OV(n,e,a.path),o=t.resolve({path:r.path},a),s=i.createHref(r.fullPath);return tV(r,o,{params:f(o.params),hash:TV(r.hash),redirectedFrom:void 0,href:s})}let o;if(e.path!=null)o=tV({},e,{path:OV(n,e.path,a.path).path});else{let t=tV({},e.params);for(let e in t)t[e]??delete t[e];o=tV({},e,{params:d(t)}),a.params=d(a.params)}let s=t.resolve(o,a),l=e.hash||``;s.params=u(f(s.params));let p=kV(r,tV({},e,{hash:bV(l),path:s.path})),m=i.createHref(p);return tV({fullPath:p,hash:l,query:r===jH?MH(e.query):e.query||{}},s,{redirectedFrom:void 0,href:m})}function v(e){return typeof e==`string`?OV(n,e,c.value.path):tV({},e)}function y(e,t){if(l!==e)return sH(8,{from:t,to:e})}function b(e){return C(e)}function x(e){return b(tV(v(e),{replace:!0}))}function S(e){let t=e.matched[e.matched.length-1];if(t&&t.redirect){let{redirect:n}=t,r=typeof n==`function`?n(e):n;return typeof r==`string`&&(r=r.includes(`?`)||r.includes(`#`)?r=v(r):{path:r},r.params={}),tV({query:e.query,hash:e.hash,params:r.path==null?e.params:{}},r)}}function C(e,t){let n=l=_(e),i=c.value,a=e.state,o=e.force,s=e.replace===!0,u=S(n);if(u)return C(tV(v(u),{state:typeof u==`object`?tV({},a,u.state):a,force:o,replace:s}),t||n);let d=n;d.redirectedFrom=t;let f;return!o&&jV(r,i,n)&&(f=sH(16,{to:d,from:i}),ne(i,i,!0,!1)),(f?Promise.resolve(f):E(d,i)).catch(e=>cH(e)?cH(e,2)?e:P(e):ee(e,d,i)).then(e=>{if(e){if(cH(e,2))return C(tV({replace:s},v(e.to),{state:typeof e.to==`object`?tV({},a,e.to.state):a,force:o}),t||d)}else e=O(d,i,!0,s,a);return D(d,i,e),e})}function w(e,t){let n=y(e,t);return n?Promise.reject(n):Promise.resolve()}function T(e){let t=ae.values().next().value;return t&&typeof t.runWithContext==`function`?t.runWithContext(e):e()}function E(e,t){let n,[r,i,s]=$H(e,t);n=BH(r.reverse(),`beforeRouteLeave`,e,t);for(let i of r)i.leaveGuards.forEach(r=>{n.push(zH(r,e,t))});let c=w.bind(null,e,t);return n.push(c),se(n).then(()=>{n=[];for(let r of a.list())n.push(zH(r,e,t));return n.push(c),se(n)}).then(()=>{n=BH(i,`beforeRouteUpdate`,e,t);for(let r of i)r.updateGuards.forEach(r=>{n.push(zH(r,e,t))});return n.push(c),se(n)}).then(()=>{n=[];for(let r of s)if(r.beforeEnter)if(iV(r.beforeEnter))for(let i of r.beforeEnter)n.push(zH(i,e,t));else n.push(zH(r.beforeEnter,e,t));return n.push(c),se(n)}).then(()=>(e.matched.forEach(e=>e.enterCallbacks={}),n=BH(s,`beforeRouteEnter`,e,t,T),n.push(c),se(n))).then(()=>{n=[];for(let r of o.list())n.push(zH(r,e,t));return n.push(c),se(n)}).catch(e=>cH(e,8)?e:Promise.reject(e))}function D(e,t,n){s.list().forEach(r=>T(()=>r(e,t,n)))}function O(e,t,n,r,a){let o=y(e,t);if(o)return o;let s=t===LV,l=QB?history.state:{};n&&(r||s?i.replace(e.fullPath,tV({scroll:s&&l&&l.scroll},a)):i.push(e.fullPath,a)),c.value=e,ne(e,t,n,s),P()}let k;function A(){k||=i.listen((e,t,n)=>{if(!oe.listening)return;let r=_(e),a=S(r);if(a){C(tV(a,{replace:!0,force:!0}),r).catch(rV);return}l=r;let o=c.value;QB&&JV(KV(o.fullPath,n.delta),WV()),E(r,o).catch(e=>cH(e,12)?e:cH(e,2)?(C(tV(v(e.to),{force:!0}),r).then(e=>{cH(e,20)&&!n.delta&&n.type===RV.pop&&i.go(-1,!1)}).catch(rV),Promise.reject()):(n.delta&&i.go(-n.delta,!1),ee(e,r,o))).then(e=>{e||=O(r,o,!1),e&&(n.delta&&!cH(e,8)?i.go(-n.delta,!1):n.type===RV.pop&&cH(e,20)&&i.go(-1,!1)),D(r,o,e)}).catch(rV)})}let j=RH(),M=RH(),N;function ee(e,t,n){P(e);let r=M.list();return r.length?r.forEach(r=>r(e,t,n)):console.error(e),Promise.reject(e)}function te(){return N&&c.value!==LV?Promise.resolve():new Promise((e,t)=>{j.add([e,t])})}function P(e){return N||(N=!e,A(),j.list().forEach(([t,n])=>e?n(e):t()),j.reset()),e}function ne(t,n,r,i){let{scrollBehavior:a}=e;if(!QB||!a)return Promise.resolve();let o=!r&&YV(KV(t.fullPath,0))||(i||!r)&&history.state&&history.state.scroll||null;return Kn().then(()=>a(t,n,o)).then(e=>e&&GV(e)).catch(e=>ee(e,t,n))}let re=e=>i.go(e),ie,ae=new Set,oe={currentRoute:c,listening:!0,addRoute:p,removeRoute:m,clearRoutes:t.clearRoutes,hasRoute:g,getRoutes:h,resolve:_,options:e,push:b,replace:x,go:re,back:()=>re(-1),forward:()=>re(1),beforeEach:a.add,beforeResolve:o.add,afterEach:s.add,onError:M.add,isReady:te,install(e){let t=this;e.component(`RouterLink`,WH),e.component(`RouterView`,ZH),e.config.globalProperties.$router=t,Object.defineProperty(e.config.globalProperties,`$route`,{enumerable:!0,get:()=>_n(c)}),QB&&!ie&&c.value===LV&&(ie=!0,b(i.location).catch(e=>{}));let n={};for(let e in LV)Object.defineProperty(n,e,{get:()=>c.value[e],enumerable:!0});e.provide(FH,t),e.provide(IH,en(n)),e.provide(LH,c);let r=e.unmount;ae.add(e),e.unmount=function(){ae.delete(e),ae.size<1&&(l=LV,k&&k(),k=null,c.value=LV,ie=!1,N=!1),r()}}};function se(e){return e.reduce((e,t)=>e.then(()=>T(t)),Promise.resolve())}return oe}function $H(e,t){let n=[],r=[],i=[],a=Math.max(t.matched.length,e.matched.length);for(let o=0;oMV(e,a))?r.push(a):n.push(a));let s=e.matched[o];s&&(t.matched.find(e=>MV(e,s))||i.push(s))}return[n,r,i]}function eU(){return Zi(FH)}function tU(e){return Zi(IH)}const nU=[{path:`/`,name:`/`,component:()=>Y(()=>import(`./pages-B3HnyzmI.js`),__vite__mapDeps([22,23,1,2,24,9,10,11,12,13,14,15,16,17,18,19,20,25,26,4,5,6,7,8,21])),meta:{layout:`stage`,stageTransition:{name:`bubble-wave-out`}}},{path:`/:all(.*)`,name:`/[...all]`,component:()=>Y(()=>import(`./_...all_-JSqUxRGo.js`),[])},{path:`/audio`,name:`/audio`,component:()=>Y(()=>import(`./audio-Bi5nCGKr.js`),[])},{path:`/devtools`,children:[{path:`background-remove`,name:`/devtools/background-remove`,component:()=>Y(()=>import(`./background-remove-B5YHaKAF.js`),__vite__mapDeps([27,7,8,12,28]))},{path:`chat`,name:`/devtools/chat`,component:()=>Y(()=>import(`./chat-D2Dw5H7W.js`),__vite__mapDeps([29,11]))},{path:`gesture-circle`,name:`/devtools/gesture-circle`,component:()=>Y(()=>import(`./gesture-circle-CeCcQTn3.js`),__vite__mapDeps([30,23])),meta:{layout:`plain`}},{path:`image`,name:`/devtools/image`,component:()=>Y(()=>import(`./image-DZE-Gq8A.js`),__vite__mapDeps([31,32]))},{path:`polaroid`,name:`/devtools/polaroid`,component:()=>Y(()=>import(`./polaroid-DBAaqaQb.js`),__vite__mapDeps([33,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21]))},{path:`vibrant`,name:`/devtools/vibrant`,component:()=>Y(()=>import(`./vibrant-3lmSC90y.js`),__vite__mapDeps([34,7,8,35,28]))}]},{path:`/queue`,name:`/queue`,component:()=>Y(()=>import(`./queue-BV9joiY1.js`),__vite__mapDeps([36,17,15]))},{path:`/settings`,children:[{path:``,name:`/settings/`,component:()=>Y(()=>import(`./settings-BZPAO2d4.js`),__vite__mapDeps([37,23,38,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`airi-card`,children:[{path:``,name:`/settings/airi-card/`,component:()=>Y(()=>import(`./airi-card-DJpm8cix.js`),__vite__mapDeps([39,23,40,41,7,8,42,9,10,11,12,13,14,15,16,17,18,19,20,43,44,45,46,4,5,6,21,28])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`components`,children:[{path:`CardCreate`,name:`/settings/airi-card/components/CardCreate`,component:()=>Y(()=>import(`./CardCreate-uNXU9uRC.js`),__vite__mapDeps([47,40]))},{path:`CardCreationDialog`,name:`/settings/airi-card/components/CardCreationDialog`,component:()=>Y(()=>import(`./CardCreationDialog-Blfzqkvs.js`),__vite__mapDeps([48,41,7,8,42,9,10,11,12,13,14,15,16,17,18,19,20,43,4,5,6,21]))},{path:`CardDetailDialog`,name:`/settings/airi-card/components/CardDetailDialog`,component:()=>Y(()=>import(`./CardDetailDialog-DKkDgBi1.js`),__vite__mapDeps([49,44,45,42,7,8,19,20,9,10,11,12,13,14,15,16,17,18,4,5,6,21]))},{path:`CardListItem`,name:`/settings/airi-card/components/CardListItem`,component:()=>Y(()=>import(`./CardListItem-wx0Xf629.js`),__vite__mapDeps([50,46,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21]))},{path:`DeleteCardDialog`,name:`/settings/airi-card/components/DeleteCardDialog`,component:()=>Y(()=>import(`./DeleteCardDialog-BdWfuAqZ.js`),__vite__mapDeps([51,45,42,7,8,19,20]))}]}]},{path:`appearance`,children:[{path:``,name:`/settings/appearance/`,component:()=>Y(()=>import(`./appearance-BjgY4Gtj.js`),__vite__mapDeps([52,23,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21])),meta:{layout:`settings`,stageTransition:{name:`slide`,pageSpecificAvailable:!0}}},{path:`color-scheme`,name:`/settings/appearance/color-scheme`,component:()=>Y(()=>import(`./color-scheme-Bys-iM2D.js`),__vite__mapDeps([53,23,54,42,7,8,4,5,6,9,10,11,12,13,14,15,16,17,18,19,20,21,55])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`developer`,name:`/settings/appearance/developer`,component:()=>Y(()=>import(`./developer-CsRsu9bL.js`),__vite__mapDeps([56,23,57,9,10,11,12,13,14,15,16,17,18])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`general`,name:`/settings/appearance/general`,component:()=>Y(()=>import(`./general-D9rY_FOz.js`),__vite__mapDeps([58,23,57,9,10,11,12,13,14,15,16,17,18])),meta:{layout:`settings`,stageTransition:{name:`slide`}}}]},{path:`memory`,children:[{path:``,name:`/settings/memory/`,component:()=>Y(()=>import(`./memory-Cz0Z0ybt.js`),__vite__mapDeps([59,23])),meta:{layout:`settings`,stageTransition:{name:`slide`}}}]},{path:`models`,children:[{path:``,name:`/settings/models/`,component:()=>Y(()=>import(`./models-C6v2DNx0.js`),__vite__mapDeps([60,23,38,54,42,7,8,61,4,5,6,9,10,11,12,13,14,15,16,17,18,19,20,21,35,62])),meta:{layout:`settings`,stageTransition:{name:`slide`,pageSpecificAvailable:!0}}}]},{path:`modules`,children:[{path:``,name:`/settings/modules/`,component:()=>Y(()=>import(`./modules-_XCJ51P8.js`),__vite__mapDeps([63,23,38,61,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21])),meta:{layout:`settings`,stageTransition:{name:`slide`,pageSpecificAvailable:!0}}},{path:`consciousness`,name:`/settings/modules/consciousness`,component:()=>Y(()=>import(`./consciousness-CXh-iRGo.js`),__vite__mapDeps([64,23,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`memory-long-term`,name:`/settings/modules/memory-long-term`,component:()=>Y(()=>import(`./memory-long-term-Dt8AlP6i.js`),__vite__mapDeps([65,23])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`memory-short-term`,name:`/settings/modules/memory-short-term`,component:()=>Y(()=>import(`./memory-short-term-CWq7dsUA.js`),__vite__mapDeps([66,23])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`speech`,name:`/settings/modules/speech`,component:()=>Y(()=>import(`./speech-BXW9V0KE.js`),__vite__mapDeps([67,23,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,25,68])),meta:{layout:`settings`,stageTransition:{name:`slide`}}}]},{path:`providers`,children:[{path:``,name:`/settings/providers/`,component:()=>Y(()=>import(`./providers-Dj_4UV5e.js`),__vite__mapDeps([69,23,38,61,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21])),meta:{layout:`settings`,stageTransition:{name:`slide`,pageSpecificAvailable:!0}}},{path:`alibaba-cloud-model-studio`,name:`/settings/providers/alibaba-cloud-model-studio`,component:()=>Y(()=>import(`./alibaba-cloud-model-studio-BlYgYX-0.js`),__vite__mapDeps([70,23,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`anthropic`,name:`/settings/providers/anthropic`,component:()=>Y(()=>import(`./anthropic-D6RUbbgy.js`),__vite__mapDeps([71,23,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`cloudflare-workers-ai`,name:`/settings/providers/cloudflare-workers-ai`,component:()=>Y(()=>import(`./cloudflare-workers-ai-CRLVRFV3.js`),__vite__mapDeps([72,23,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`deepseek`,name:`/settings/providers/deepseek`,component:()=>Y(()=>import(`./deepseek-BM0Eh2rC.js`),__vite__mapDeps([73,23,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`elevenlabs`,name:`/settings/providers/elevenlabs`,component:()=>Y(()=>import(`./elevenlabs-DPYwkmRS.js`),__vite__mapDeps([74,23,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`featherless-ai`,name:`/settings/providers/featherless-ai`,component:()=>Y(()=>import(`./featherless-ai-gdrUgYDA.js`),__vite__mapDeps([75,23,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`fireworks-ai`,name:`/settings/providers/fireworks-ai`,component:()=>Y(()=>import(`./fireworks-ai-fKuPeJjT.js`),__vite__mapDeps([76,23,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`google-generative-ai`,name:`/settings/providers/google-generative-ai`,component:()=>Y(()=>import(`./google-generative-ai-DznmED2J.js`),__vite__mapDeps([77,23,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`microsoft-speech`,name:`/settings/providers/microsoft-speech`,component:()=>Y(()=>import(`./microsoft-speech-CWxCOPph.js`),__vite__mapDeps([78,23,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`mistral-ai`,name:`/settings/providers/mistral-ai`,component:()=>Y(()=>import(`./mistral-ai-DDvbJ_KZ.js`),__vite__mapDeps([79,23,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`moonshot-ai`,name:`/settings/providers/moonshot-ai`,component:()=>Y(()=>import(`./moonshot-ai-CxTmtFOe.js`),__vite__mapDeps([80,23,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`novita-ai`,name:`/settings/providers/novita-ai`,component:()=>Y(()=>import(`./novita-ai-B__UhUPQ.js`),__vite__mapDeps([81,23,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`ollama`,name:`/settings/providers/ollama`,component:()=>Y(()=>import(`./ollama-B0CgDUYn.js`),__vite__mapDeps([82,23,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`openai`,name:`/settings/providers/openai`,component:()=>Y(()=>import(`./openai-CJpzKhtx.js`),__vite__mapDeps([83,23,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`openai-audio-speech`,name:`/settings/providers/openai-audio-speech`,component:()=>Y(()=>import(`./openai-audio-speech-BVZOIrxZ.js`),__vite__mapDeps([84,23,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`openai-audio-transcription`,name:`/settings/providers/openai-audio-transcription`,component:()=>Y(()=>import(`./openai-audio-transcription-M_8aPBY1.js`),__vite__mapDeps([85,23,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`openrouter-ai`,name:`/settings/providers/openrouter-ai`,component:()=>Y(()=>import(`./openrouter-ai-1dhsAjpC.js`),__vite__mapDeps([86,23,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`player2-api`,name:`/settings/providers/player2-api`,component:()=>Y(()=>import(`./player2-api-C24B3Fua.js`),__vite__mapDeps([87,23,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`together-ai`,name:`/settings/providers/together-ai`,component:()=>Y(()=>import(`./together-ai-aeQrm7lr.js`),__vite__mapDeps([88,23,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`volcengine`,name:`/settings/providers/volcengine`,component:()=>Y(()=>import(`./volcengine-BXA-wkta.js`),__vite__mapDeps([89,23,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21])),meta:{layout:`settings`,stageTransition:{name:`slide`}}},{path:`xai`,name:`/settings/providers/xai`,component:()=>Y(()=>import(`./xai-C7wiQ4il.js`),__vite__mapDeps([90,23,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21])),meta:{layout:`settings`,stageTransition:{name:`slide`}}}]},{path:`scene`,children:[{path:``,name:`/settings/scene/`,component:()=>Y(()=>import(`./scene-CRPJttqb.js`),__vite__mapDeps([91,23,38,61,9,10,11,12,13,14,15,16,17,18])),meta:{layout:`settings`,stageTransition:{name:`slide`,pageSpecificAvailable:!0}}}]}]},{path:`/stage`,children:[{path:``,name:`/stage/`,component:()=>Y(()=>import(`./stage-BZq5_Dn1.js`),__vite__mapDeps([92,23,1,2,24,9,10,11,12,13,14,15,16,17,18,19,20,25,26,4,5,6,7,8,21])),meta:{layout:`stage`,stageTransition:{name:`bubble-wave-out`}}}]},{path:`/test`,children:[{path:`filter-message`,name:`/test/filter-message`,component:()=>Y(()=>import(`./filter-message-39ev3J_Q.js`),__vite__mapDeps([93,7,8,17,25,68]))},{path:`queues`,children:[{path:`delays`,name:`/test/queues/delays`,component:()=>Y(()=>import(`./delays-IM0BuMf_.js`),__vite__mapDeps([94,7,8,10,17,15,16,25,68]))},{path:`emotions`,name:`/test/queues/emotions`,component:()=>Y(()=>import(`./emotions-Bn_F7pNT.js`),__vite__mapDeps([95,7,8,17,15,16,25,68]))},{path:`messages`,name:`/test/queues/messages`,component:()=>Y(()=>import(`./messages-Db1po7ry.js`),__vite__mapDeps([96,7,8,17,15,16,25,68]))}]}]}],rU=(e,t)=>{if(typeof e==`number`){if(t===3)return{mode:`rgb`,r:(e>>8&15|e>>4&240)/255,g:(e>>4&15|e&240)/255,b:(e&15|e<<4&240)/255};if(t===4)return{mode:`rgb`,r:(e>>12&15|e>>8&240)/255,g:(e>>8&15|e>>4&240)/255,b:(e>>4&15|e&240)/255,alpha:(e&15|e<<4&240)/255};if(t===6)return{mode:`rgb`,r:(e>>16&255)/255,g:(e>>8&255)/255,b:(e&255)/255};if(t===8)return{mode:`rgb`,r:(e>>24&255)/255,g:(e>>16&255)/255,b:(e>>8&255)/255,alpha:(e&255)/255}}};var iU=rU;const aU={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};var oU=aU;const sU=e=>iU(oU[e.toLowerCase()],6);var cU=sU;const lU=/^#?([0-9a-f]{8}|[0-9a-f]{6}|[0-9a-f]{4}|[0-9a-f]{3})$/i,uU=e=>{let t;return(t=e.match(lU))?iU(parseInt(t[1],16),t[1].length):void 0};var dU=uU;const fU=`([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)`,pU=`(?:${fU}|none)`,mU=`${fU}%`,hU=`(?:${fU}%|none)`,gU=`(?:${fU}%|${fU})`,_U=`(?:${fU}%|${fU}|none)`,vU=`(?:${fU}(deg|grad|rad|turn)|${fU})`,yU=`(?:${fU}(deg|grad|rad|turn)|${fU}|none)`,bU=`\\s*,\\s*`,xU=RegExp(`^`+_U+`$`),SU=RegExp(`^rgba?\\(\\s*${fU}${bU}${fU}${bU}${fU}\\s*(?:,\\s*${gU}\\s*)?\\)$`),CU=RegExp(`^rgba?\\(\\s*${mU}${bU}${mU}${bU}${mU}\\s*(?:,\\s*${gU}\\s*)?\\)$`),wU=e=>{let t={mode:`rgb`},n;if(n=e.match(SU))n[1]!==void 0&&(t.r=n[1]/255),n[2]!==void 0&&(t.g=n[2]/255),n[3]!==void 0&&(t.b=n[3]/255);else if(n=e.match(CU))n[1]!==void 0&&(t.r=n[1]/100),n[2]!==void 0&&(t.g=n[2]/100),n[3]!==void 0&&(t.b=n[3]/100);else return;return n[4]===void 0?n[5]!==void 0&&(t.alpha=Math.max(0,Math.min(1,+n[5]))):t.alpha=Math.max(0,Math.min(1,n[4]/100)),t};var TU=wU;const EU=(e,t)=>e===void 0?void 0:typeof e==`object`?e.mode===void 0?t?{...e,mode:t}:void 0:e:QU(e);var DU=EU;const OU=(e=`rgb`)=>t=>(t=DU(t,e))===void 0?void 0:t.mode===e?t:AU[t.mode][e]?AU[t.mode][e](t):e===`rgb`?AU[t.mode].rgb(t):AU.rgb[e](AU[t.mode].rgb(t));var kU=OU;const AU={},jU={},MU=[],NU={},PU=e=>e,FU=e=>(AU[e.mode]={...AU[e.mode],...e.toMode},Object.keys(e.fromMode||{}).forEach(t=>{AU[t]||(AU[t]={}),AU[t][e.mode]=e.fromMode[t]}),e.ranges||={},e.difference||={},e.channels.forEach(t=>{if(e.ranges[t]===void 0&&(e.ranges[t]=[0,1]),!e.interpolate[t])throw Error(`Missing interpolator for: ${t}`);typeof e.interpolate[t]==`function`&&(e.interpolate[t]={use:e.interpolate[t]}),e.interpolate[t].fixup||(e.interpolate[t].fixup=PU)}),jU[e.mode]=e,(e.parse||[]).forEach(t=>{LU(t,e.mode)}),kU(e.mode)),IU=e=>jU[e],LU=(e,t)=>{if(typeof e==`string`){if(!t)throw Error(`'mode' required when 'parser' is a string`);NU[e]=t}else typeof e==`function`&&MU.indexOf(e)<0&&MU.push(e)},RU=/[^\x00-\x7F]|[a-zA-Z_]/,zU=/[^\x00-\x7F]|[-\w]/,X={Function:`function`,Ident:`ident`,Number:`number`,Percentage:`percentage`,ParenClose:`)`,None:`none`,Hue:`hue`,Alpha:`alpha`};let Z=0;function BU(e){let t=e[Z],n=e[Z+1];return t===`-`||t===`+`?/\d/.test(n)||n===`.`&&/\d/.test(e[Z+2]):t===`.`?/\d/.test(n):/\d/.test(t)}function VU(e){if(Z>=e.length)return!1;let t=e[Z];if(RU.test(t))return!0;if(t===`-`){if(e.length-Z<2)return!1;let t=e[Z+1];return!!(t===`-`||RU.test(t))}return!1}const HU={deg:1,rad:180/Math.PI,grad:9/10,turn:360};function UU(e){let t=``;if((e[Z]===`-`||e[Z]===`+`)&&(t+=e[Z++]),t+=WU(e),e[Z]===`.`&&/\d/.test(e[Z+1])&&(t+=e[Z++]+WU(e)),(e[Z]===`e`||e[Z]===`E`)&&((e[Z+1]===`-`||e[Z+1]===`+`)&&/\d/.test(e[Z+2])?t+=e[Z++]+e[Z++]+WU(e):/\d/.test(e[Z+1])&&(t+=e[Z++]+WU(e))),VU(e)){let n=GU(e);return n===`deg`||n===`rad`||n===`turn`||n===`grad`?{type:X.Hue,value:t*HU[n]}:void 0}return e[Z]===`%`?(Z++,{type:X.Percentage,value:+t}):{type:X.Number,value:+t}}function WU(e){let t=``;for(;/\d/.test(e[Z]);)t+=e[Z++];return t}function GU(e){let t=``;for(;Z4)){if(n.length===4){if(n[3].type!==X.Alpha)return;n[3]=n[3].value}return n.length===3&&n.push({type:X.None,value:void 0}),n.every(e=>e.type!==X.Alpha)?n:void 0}}function XU(e,t){e._i=0;let n=e[e._i++];if(!n||n.type!==X.Function)return;let r=YU(e,t);if(r)return r.unshift(n.value),r}const ZU=e=>{if(typeof e!=`string`)return;let t=qU(e),n=t?XU(t,!0):void 0,r,i=0,a=MU.length;for(;ie===`transparent`?{mode:`rgb`,r:0,g:0,b:0,alpha:0}:void 0;var nW=tW;const rW=(e,t,n)=>e+n*(t-e),iW=e=>{let t=[];for(let n=0;nt=>{let n=iW(t);return t=>{let r=t*n.length,i=t>=1?n.length-1:Math.max(Math.floor(r),0),a=n[i];return a===void 0?void 0:e(a[0],a[1],r-i)}},Q=aW(rW),oW=e=>{let t=!1,n=e.map(e=>e===void 0?1:(t=!0,e));return t?n:e},sW={mode:`rgb`,channels:[`r`,`g`,`b`,`alpha`],parse:[eW,dU,TU,cU,nW,`srgb`],serialize:`srgb`,interpolate:{r:Q,g:Q,b:Q,alpha:{use:Q,fixup:oW}},gamut:!0,white:{r:1,g:1,b:1},black:{r:0,g:0,b:0}};var cW=sW;const lW=(e=0)=>Math.abs(e)**(563/256)*Math.sign(e),uW=e=>{let t=lW(e.r),n=lW(e.g),r=lW(e.b),i={mode:`xyz65`,x:.5766690429101305*t+.1855582379065463*n+.1882286462349947*r,y:.297344975250536*t+.6273635662554661*n+.0752914584939979*r,z:.0270313613864123*t+.0706888525358272*n+.9913375368376386*r};return e.alpha!==void 0&&(i.alpha=e.alpha),i};var dW=uW;const fW=e=>Math.abs(e)**(256/563)*Math.sign(e),pW=({x:e,y:t,z:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let i={mode:`a98`,r:fW(e*2.0415879038107465-t*.5650069742788597-.3447313507783297*n),g:fW(e*-.9692436362808798+t*1.8759675015077206+.0415550574071756*n),b:fW(e*.0134442806320312-t*.1183623922310184+1.0151749943912058*n)};return r!==void 0&&(i.alpha=r),i};var mW=pW;const hW=(e=0)=>{let t=Math.abs(e);return t<=.04045?e/12.92:(Math.sign(e)||1)*((t+.055)/1.055)**2.4},gW=({r:e,g:t,b:n,alpha:r})=>{let i={mode:`lrgb`,r:hW(e),g:hW(t),b:hW(n)};return r!==void 0&&(i.alpha=r),i};var _W=gW;const vW=e=>{let{r:t,g:n,b:r,alpha:i}=_W(e),a={mode:`xyz65`,x:.4123907992659593*t+.357584339383878*n+.1804807884018343*r,y:.2126390058715102*t+.715168678767756*n+.0721923153607337*r,z:.0193308187155918*t+.119194779794626*n+.9505321522496607*r};return i!==void 0&&(a.alpha=i),a};var yW=vW;const bW=(e=0)=>{let t=Math.abs(e);return t>.0031308?(Math.sign(e)||1)*(1.055*t**(1/2.4)-.055):e*12.92},xW=({r:e,g:t,b:n,alpha:r},i=`rgb`)=>{let a={mode:i,r:bW(e),g:bW(t),b:bW(n)};return r!==void 0&&(a.alpha=r),a};var SW=xW;const CW=({x:e,y:t,z:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let i=SW({r:e*3.2409699419045226-t*1.537383177570094-.4986107602930034*n,g:e*-.9692436362808796+t*1.8759675015077204+.0415550574071756*n,b:e*.0556300796969936-t*.2039769588889765+1.0569715142428784*n});return r!==void 0&&(i.alpha=r),i};var wW=CW;const TW={...cW,mode:`a98`,parse:[`a98-rgb`],serialize:`a98-rgb`,fromMode:{rgb:e=>mW(yW(e)),xyz65:mW},toMode:{rgb:e=>wW(dW(e)),xyz65:dW}};var EW=TW;const DW=e=>(e%=360)<0?e+360:e;var OW=DW;const kW=(e,t)=>e.map((n,r,i)=>{if(n===void 0)return n;let a=OW(n);return r===0||e[r-1]===void 0?a:t(a-OW(i[r-1]))}).reduce((e,t)=>!e.length||t===void 0||e[e.length-1]===void 0?(e.push(t),e):(e.push(t+e[e.length-1]),e),[]),AW=e=>kW(e,e=>Math.abs(e)<=180?e:e-360*Math.sign(e)),jW=[-.14861,1.78277,-.29227,-.90649,1.97294,0],MW=Math.PI/180,NW=180/Math.PI;let PW=jW[3]*jW[4],FW=jW[1]*jW[4],IW=jW[1]*jW[2]-jW[0]*jW[3];const LW=({r:e,g:t,b:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let i=(IW*n+e*PW-t*FW)/(IW+PW-FW),a=n-i,o=(jW[4]*(t-i)-jW[2]*a)/jW[3],s={mode:`cubehelix`,l:i,s:i===0||i===1?void 0:Math.sqrt(a*a+o*o)/(jW[4]*i*(1-i))};return s.s&&(s.h=Math.atan2(o,a)*NW-120),r!==void 0&&(s.alpha=r),s};var RW=LW;const zW=({h:e,s:t,l:n,alpha:r})=>{let i={mode:`rgb`};e=(e===void 0?0:e+120)*MW,n===void 0&&(n=0);let a=t===void 0?0:t*n*(1-n),o=Math.cos(e),s=Math.sin(e);return i.r=n+a*(jW[0]*o+jW[1]*s),i.g=n+a*(jW[2]*o+jW[3]*s),i.b=n+a*(jW[4]*o+jW[5]*s),r!==void 0&&(i.alpha=r),i};var BW=zW;const VW=(e,t)=>{if(e.h===void 0||t.h===void 0||!e.s||!t.s)return 0;let n=OW(e.h),r=OW(t.h),i=Math.sin((r-n+360)/2*Math.PI/180);return 2*Math.sqrt(e.s*t.s)*i},HW=(e,t)=>{if(e.h===void 0||t.h===void 0)return 0;let n=OW(e.h),r=OW(t.h);return Math.abs(r-n)>180?n-(r-360*Math.sign(r-n)):r-n},UW=(e,t)=>{if(e.h===void 0||t.h===void 0||!e.c||!t.c)return 0;let n=OW(e.h),r=OW(t.h),i=Math.sin((r-n+360)/2*Math.PI/180);return 2*Math.sqrt(e.c*t.c)*i},WW=e=>{let t=e.reduce((e,t)=>{if(t!==void 0){let n=t*Math.PI/180;e.sin+=Math.sin(n),e.cos+=Math.cos(n)}return e},{sin:0,cos:0}),n=Math.atan2(t.sin,t.cos)*180/Math.PI;return n<0?360+n:n},GW={mode:`cubehelix`,channels:[`h`,`s`,`l`,`alpha`],parse:[`--cubehelix`],serialize:`--cubehelix`,ranges:{h:[0,360],s:[0,4.614],l:[0,1]},fromMode:{rgb:RW},toMode:{rgb:BW},interpolate:{h:{use:Q,fixup:AW},s:Q,l:Q,alpha:{use:Q,fixup:oW}},difference:{h:VW},average:{h:WW}};var KW=GW;const qW=({l:e,a:t,b:n,alpha:r},i=`lch`)=>{t===void 0&&(t=0),n===void 0&&(n=0);let a=Math.sqrt(t*t+n*n),o={mode:i,l:e,c:a};return a&&(o.h=OW(Math.atan2(n,t)*180/Math.PI)),r!==void 0&&(o.alpha=r),o};var JW=qW;const YW=({l:e,c:t,h:n,alpha:r},i=`lab`)=>{n===void 0&&(n=0);let a={mode:i,l:e,a:t?t*Math.cos(n/180*Math.PI):0,b:t?t*Math.sin(n/180*Math.PI):0};return r!==void 0&&(a.alpha=r),a};var XW=YW;const ZW=29**3/3**3,QW=6**3/29**3,$W={X:.3457/.3585,Y:1,Z:.2958/.3585},eG={X:.3127/.329,Y:1,Z:.3583/.329},tG=29**3/3**3,nG=6**3/29**3;let rG=e=>e**3>QW?e**3:(116*e-16)/ZW;const iG=({l:e,a:t,b:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let i=(e+16)/116,a=t/500+i,o=i-n/200,s={mode:`xyz65`,x:rG(a)*eG.X,y:rG(i)*eG.Y,z:rG(o)*eG.Z};return r!==void 0&&(s.alpha=r),s};var aG=iG;const oG=e=>wW(aG(e));var sG=oG;const cG=e=>e>QW?Math.cbrt(e):(ZW*e+16)/116,lG=({x:e,y:t,z:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let i=cG(e/eG.X),a=cG(t/eG.Y),o=cG(n/eG.Z),s={mode:`lab65`,l:116*a-16,a:500*(i-a),b:200*(a-o)};return r!==void 0&&(s.alpha=r),s};var uG=lG;const dG=e=>{let t=uG(yW(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t};var fG=dG;const pG=1,mG=1,hG=26/180*Math.PI,gG=Math.cos(hG),_G=Math.sin(hG),vG=100/Math.log(139/100),yG=({l:e,c:t,h:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let i={mode:`lab65`,l:(Math.exp(e*pG/vG)-1)/.0039},a=(Math.exp(.0435*t*mG*pG)-1)/.075,o=a*Math.cos(n/180*Math.PI-hG),s=a*Math.sin(n/180*Math.PI-hG);return i.a=o*gG-s/.83*_G,i.b=o*_G+s/.83*gG,r!==void 0&&(i.alpha=r),i};var bG=yG;const xG=({l:e,a:t,b:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let i=t*gG+n*_G,a=.83*(n*gG-t*_G),o=Math.sqrt(i*i+a*a),s={mode:`dlch`,l:vG/pG*Math.log(1+.0039*e),c:Math.log(1+.075*o)/(.0435*mG*pG)};return s.c&&(s.h=OW((Math.atan2(a,i)+hG)/Math.PI*180)),r!==void 0&&(s.alpha=r),s};var SG=xG;const CG=e=>bG(JW(e,`dlch`)),wG=e=>XW(SG(e),`dlab`),TG={mode:`dlab`,parse:[`--din99o-lab`],serialize:`--din99o-lab`,toMode:{lab65:CG,rgb:e=>sG(CG(e))},fromMode:{lab65:wG,rgb:e=>wG(fG(e))},channels:[`l`,`a`,`b`,`alpha`],ranges:{l:[0,100],a:[-40.09,45.501],b:[-40.469,44.344]},interpolate:{l:Q,a:Q,b:Q,alpha:{use:Q,fixup:oW}}};var EG=TG;const DG={mode:`dlch`,parse:[`--din99o-lch`],serialize:`--din99o-lch`,toMode:{lab65:bG,dlab:e=>XW(e,`dlab`),rgb:e=>sG(bG(e))},fromMode:{lab65:SG,dlab:e=>JW(e,`dlch`),rgb:e=>SG(fG(e))},channels:[`l`,`c`,`h`,`alpha`],ranges:{l:[0,100],c:[0,51.484],h:[0,360]},interpolate:{l:Q,c:Q,h:{use:Q,fixup:AW},alpha:{use:Q,fixup:oW}},difference:{h:UW},average:{h:WW}};var OG=DG;function kG({h:e,s:t,i:n,alpha:r}){e=OW(e===void 0?0:e),t===void 0&&(t=0),n===void 0&&(n=0);let i=Math.abs(e/60%2-1),a;switch(Math.floor(e/60)){case 0:a={r:n*(1+t*(3/(2-i)-1)),g:n*(1+t*(3*(1-i)/(2-i)-1)),b:n*(1-t)};break;case 1:a={r:n*(1+t*(3*(1-i)/(2-i)-1)),g:n*(1+t*(3/(2-i)-1)),b:n*(1-t)};break;case 2:a={r:n*(1-t),g:n*(1+t*(3/(2-i)-1)),b:n*(1+t*(3*(1-i)/(2-i)-1))};break;case 3:a={r:n*(1-t),g:n*(1+t*(3*(1-i)/(2-i)-1)),b:n*(1+t*(3/(2-i)-1))};break;case 4:a={r:n*(1+t*(3*(1-i)/(2-i)-1)),g:n*(1-t),b:n*(1+t*(3/(2-i)-1))};break;case 5:a={r:n*(1+t*(3/(2-i)-1)),g:n*(1-t),b:n*(1+t*(3*(1-i)/(2-i)-1))};break;default:a={r:n*(1-t),g:n*(1-t),b:n*(1-t)}}return a.mode=`rgb`,r!==void 0&&(a.alpha=r),a}function AG({r:e,g:t,b:n,alpha:r}){e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let i=Math.max(e,t,n),a=Math.min(e,t,n),o={mode:`hsi`,s:e+t+n===0?0:1-3*a/(e+t+n),i:(e+t+n)/3};return i-a!==0&&(o.h=(i===e?(t-n)/(i-a)+(t{switch(t){case`deg`:return+e;case`rad`:return e/Math.PI*180;case`grad`:return e/10*9;case`turn`:return e*360}};var IG=FG;const LG=RegExp(`^hsla?\\(\\s*${vU}${bU}${mU}${bU}${mU}\\s*(?:,\\s*${gU}\\s*)?\\)$`),RG=e=>{let t=e.match(LG);if(!t)return;let n={mode:`hsl`};return t[3]===void 0?t[1]!==void 0&&t[2]!==void 0&&(n.h=IG(t[1],t[2])):n.h=+t[3],t[4]!==void 0&&(n.s=Math.min(Math.max(0,t[4]/100),1)),t[5]!==void 0&&(n.l=Math.min(Math.max(0,t[5]/100),1)),t[6]===void 0?t[7]!==void 0&&(n.alpha=Math.max(0,Math.min(1,+t[7]))):n.alpha=Math.max(0,Math.min(1,t[6]/100)),n};var zG=RG;function BG(e,t){if(!t||t[0]!==`hsl`&&t[0]!==`hsla`)return;let n={mode:`hsl`},[,r,i,a,o]=t;if(r.type!==X.None){if(r.type===X.Percentage)return;n.h=r.value}if(i.type!==X.None){if(i.type===X.Hue)return;n.s=i.value/100}if(a.type!==X.None){if(a.type===X.Hue)return;n.l=a.value/100}return o.type!==X.None&&(n.alpha=Math.min(1,Math.max(0,o.type===X.Number?o.value:o.value/100))),n}var VG=BG;const HG={mode:`hsl`,toMode:{rgb:NG},fromMode:{rgb:PG},channels:[`h`,`s`,`l`,`alpha`],ranges:{h:[0,360]},gamut:`rgb`,parse:[VG,zG],serialize:e=>`hsl(${e.h===void 0?`none`:e.h} ${e.s===void 0?`none`:e.s*100+`%`} ${e.l===void 0?`none`:e.l*100+`%`}${e.alpha<1?` / ${e.alpha}`:``})`,interpolate:{h:{use:Q,fixup:AW},s:Q,l:Q,alpha:{use:Q,fixup:oW}},difference:{h:VW},average:{h:WW}};var UG=HG;function WG({h:e,s:t,v:n,alpha:r}){e=OW(e===void 0?0:e),t===void 0&&(t=0),n===void 0&&(n=0);let i=Math.abs(e/60%2-1),a;switch(Math.floor(e/60)){case 0:a={r:n,g:n*(1-t*i),b:n*(1-t)};break;case 1:a={r:n*(1-t*i),g:n,b:n*(1-t)};break;case 2:a={r:n*(1-t),g:n,b:n*(1-t*i)};break;case 3:a={r:n*(1-t),g:n*(1-t*i),b:n};break;case 4:a={r:n*(1-t*i),g:n*(1-t),b:n};break;case 5:a={r:n,g:n*(1-t),b:n*(1-t*i)};break;default:a={r:n*(1-t),g:n*(1-t),b:n*(1-t)}}return a.mode=`rgb`,r!==void 0&&(a.alpha=r),a}function GG({r:e,g:t,b:n,alpha:r}){e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let i=Math.max(e,t,n),a=Math.min(e,t,n),o={mode:`hsv`,s:i===0?0:1-a/i,v:i};return i-a!==0&&(o.h=(i===e?(t-n)/(i-a)+(t1){let e=t+n;t/=e,n/=e}return WG({h:e,s:n===1?1:1-t/(1-n),v:1-n,alpha:r})}function YG(e){let t=GG(e);if(t===void 0)return;let n=t.s===void 0?0:t.s,r=t.v===void 0?0:t.v,i={mode:`hwb`,w:(1-n)*r,b:1-r};return t.h!==void 0&&(i.h=t.h),t.alpha!==void 0&&(i.alpha=t.alpha),i}function XG(e,t){if(!t||t[0]!==`hwb`)return;let n={mode:`hwb`},[,r,i,a,o]=t;if(r.type!==X.None){if(r.type===X.Percentage)return;n.h=r.value}if(i.type!==X.None){if(i.type===X.Hue)return;n.w=i.value/100}if(a.type!==X.None){if(a.type===X.Hue)return;n.b=a.value/100}return o.type!==X.None&&(n.alpha=Math.min(1,Math.max(0,o.type===X.Number?o.value:o.value/100))),n}var ZG=XG;const QG={mode:`hwb`,toMode:{rgb:JG},fromMode:{rgb:YG},channels:[`h`,`w`,`b`,`alpha`],ranges:{h:[0,360]},gamut:`rgb`,parse:[ZG],serialize:e=>`hwb(${e.h===void 0?`none`:e.h} ${e.w===void 0?`none`:e.w*100+`%`} ${e.b===void 0?`none`:e.b*100+`%`}${e.alpha<1?` / ${e.alpha}`:``})`,interpolate:{h:{use:Q,fixup:AW},w:Q,b:Q,alpha:{use:Q,fixup:oW}},difference:{h:HW},average:{h:WW}};var $G=QG;const eK=203,tK=.1593017578125,nK=78.84375,rK=.8359375,iK=18.8515625,aK=18.6875;function oK(e){if(e<0)return 0;let t=e**(1/nK);return 1e4*(Math.max(0,t-rK)/(iK-aK*t))**(1/tK)}function sK(e){if(e<0)return 0;let t=(e/1e4)**tK;return((rK+iK*t)/(1+aK*t))**+nK}const cK=e=>Math.max(e/eK,0),lK=({i:e,t,p:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let i=oK(e+.008609037037932761*t+.11102962500302593*n),a=oK(e-.00860903703793275*t-.11102962500302599*n),o=oK(e+.5600313357106791*t-.32062717498731885*n),s={mode:`xyz65`,x:cK(2.070152218389422*i-1.3263473389671556*a+.2066510476294051*o),y:cK(.3647385209748074*i+.680566024947227*a-.0453045459220346*o),z:cK(-.049747207535812*i-.0492609666966138*a+1.1880659249923042*o)};return r!==void 0&&(s.alpha=r),s};var uK=lK;const dK=(e=0)=>Math.max(e*eK,0),fK=({x:e,y:t,z:n,alpha:r})=>{let i=dK(e),a=dK(t),o=dK(n),s=sK(.3592832590121217*i+.6976051147779502*a-.0358915932320289*o),c=sK(-.1920808463704995*i+1.1004767970374323*a+.0753748658519118*o),l=sK(.0070797844607477*i+.0748396662186366*a+.8433265453898765*o),u=.5*s+.5*c,d=1.61376953125*s-3.323486328125*c+1.709716796875*l,f=4.378173828125*s-4.24560546875*c-.132568359375*l,p={mode:`itp`,i:u,t:d,p:f};return r!==void 0&&(p.alpha=r),p};var pK=fK;const mK={mode:`itp`,channels:[`i`,`t`,`p`,`alpha`],parse:[`--ictcp`],serialize:`--ictcp`,toMode:{xyz65:uK,rgb:e=>wW(uK(e))},fromMode:{xyz65:pK,rgb:e=>pK(yW(e))},ranges:{i:[0,.581],t:[-.369,.272],p:[-.164,.331]},interpolate:{i:Q,t:Q,p:Q,alpha:{use:Q,fixup:oW}}};var hK=mK;const gK=134.03437499999998,_K=16295499532821565e-27,vK=e=>{if(e<0)return 0;let t=(e/1e4)**tK;return((rK+iK*t)/(1+aK*t))**+gK},yK=(e=0)=>Math.max(e*203,0),bK=({x:e,y:t,z:n,alpha:r})=>{e=yK(e),t=yK(t),n=yK(n);let i=1.15*e-.15*n,a=.66*t+.34*e,o=vK(.41478972*i+.579999*a+.014648*n),s=vK(-.20151*i+1.120649*a+.0531008*n),c=vK(-.0166008*i+.2648*a+.6684799*n),l=(o+s)/2,u={mode:`jab`,j:.44*l/(1-.56*l)-_K,a:3.524*o-4.066708*s+.542708*c,b:.199076*o+1.096799*s-1.295875*c};return r!==void 0&&(u.alpha=r),u};var xK=bK;const SK=134.03437499999998,CK=16295499532821565e-27,wK=e=>{if(e<0)return 0;let t=e**(1/SK);return 1e4*((rK-t)/(aK*t-iK))**(1/tK)},TK=e=>e/203,EK=({j:e,a:t,b:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let i=(e+CK)/(.44+.56*(e+CK)),a=wK(i+.13860504*t+.058047316*n),o=wK(i-.13860504*t-.058047316*n),s=wK(i-.096019242*t-.8118919*n),c={mode:`xyz65`,x:TK(1.661373024652174*a-.914523081304348*o+.23136208173913045*s),y:TK(-.3250758611844533*a+1.571847026732543*o-.21825383453227928*s),z:TK(-.090982811*a-.31272829*o+1.5227666*s)};return r!==void 0&&(c.alpha=r),c};var DK=EK;const OK=e=>{let t=xK(yW(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t};var kK=OK;const AK=e=>wW(DK(e));var jK=AK;const MK={mode:`jab`,channels:[`j`,`a`,`b`,`alpha`],parse:[`--jzazbz`],serialize:`--jzazbz`,fromMode:{rgb:kK,xyz65:xK},toMode:{rgb:jK,xyz65:DK},ranges:{j:[0,.222],a:[-.109,.129],b:[-.185,.134]},interpolate:{j:Q,a:Q,b:Q,alpha:{use:Q,fixup:oW}}};var NK=MK;const PK=({j:e,a:t,b:n,alpha:r})=>{t===void 0&&(t=0),n===void 0&&(n=0);let i=Math.sqrt(t*t+n*n),a={mode:`jch`,j:e,c:i};return i&&(a.h=OW(Math.atan2(n,t)*180/Math.PI)),r!==void 0&&(a.alpha=r),a};var FK=PK;const IK=({j:e,c:t,h:n,alpha:r})=>{n===void 0&&(n=0);let i={mode:`jab`,j:e,a:t?t*Math.cos(n/180*Math.PI):0,b:t?t*Math.sin(n/180*Math.PI):0};return r!==void 0&&(i.alpha=r),i};var LK=IK;const RK={mode:`jch`,parse:[`--jzczhz`],serialize:`--jzczhz`,toMode:{jab:LK,rgb:e=>jK(LK(e))},fromMode:{rgb:e=>FK(kK(e)),jab:FK},channels:[`j`,`c`,`h`,`alpha`],ranges:{j:[0,.221],c:[0,.19],h:[0,360]},interpolate:{h:{use:Q,fixup:AW},c:Q,j:Q,alpha:{use:Q,fixup:oW}},difference:{h:UW},average:{h:WW}};var zK=RK;const BK=29**3/3**3,VK=6**3/29**3;let HK=e=>e**3>VK?e**3:(116*e-16)/BK;const UK=({l:e,a:t,b:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let i=(e+16)/116,a=t/500+i,o=i-n/200,s={mode:`xyz50`,x:HK(a)*$W.X,y:HK(i)*$W.Y,z:HK(o)*$W.Z};return r!==void 0&&(s.alpha=r),s};var WK=UK;const GK=({x:e,y:t,z:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let i=SW({r:e*3.1341359569958707-t*1.6173863321612538-.4906619460083532*n,g:e*-.978795502912089+t*1.916254567259524+.03344273116131949*n,b:e*.07195537988411677-t*.2289768264158322+1.405386058324125*n});return r!==void 0&&(i.alpha=r),i};var KK=GK;const qK=e=>KK(WK(e));var JK=qK;const YK=e=>{let{r:t,g:n,b:r,alpha:i}=_W(e),a={mode:`xyz50`,x:.436065742824811*t+.3851514688337912*n+.14307845442264197*r,y:.22249319175623702*t+.7168870538238823*n+.06061979053616537*r,z:.013923904500943465*t+.09708128566574634*n+.7140993584005155*r};return i!==void 0&&(a.alpha=i),a};var XK=YK;const ZK=e=>e>VK?Math.cbrt(e):(BK*e+16)/116,QK=({x:e,y:t,z:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let i=ZK(e/$W.X),a=ZK(t/$W.Y),o=ZK(n/$W.Z),s={mode:`lab`,l:116*a-16,a:500*(i-a),b:200*(a-o)};return r!==void 0&&(s.alpha=r),s};var $K=QK;const eq=e=>{let t=$K(XK(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t};var tq=eq;function nq(e,t){if(!t||t[0]!==`lab`)return;let n={mode:`lab`},[,r,i,a,o]=t;if(!(r.type===X.Hue||i.type===X.Hue||a.type===X.Hue))return r.type!==X.None&&(n.l=Math.min(Math.max(0,r.value),100)),i.type!==X.None&&(n.a=i.type===X.Number?i.value:i.value*125/100),a.type!==X.None&&(n.b=a.type===X.Number?a.value:a.value*125/100),o.type!==X.None&&(n.alpha=Math.min(1,Math.max(0,o.type===X.Number?o.value:o.value/100))),n}var rq=nq;const iq={mode:`lab`,toMode:{xyz50:WK,rgb:JK},fromMode:{xyz50:$K,rgb:tq},channels:[`l`,`a`,`b`,`alpha`],ranges:{l:[0,100],a:[-100,100],b:[-100,100]},parse:[rq],serialize:e=>`lab(${e.l===void 0?`none`:e.l} ${e.a===void 0?`none`:e.a} ${e.b===void 0?`none`:e.b}${e.alpha<1?` / ${e.alpha}`:``})`,interpolate:{l:Q,a:Q,b:Q,alpha:{use:Q,fixup:oW}}};var aq=iq;const oq={...aq,mode:`lab65`,parse:[`--lab-d65`],serialize:`--lab-d65`,toMode:{xyz65:aG,rgb:sG},fromMode:{xyz65:uG,rgb:fG},ranges:{l:[0,100],a:[-86.182,98.234],b:[-107.86,94.477]}};var sq=oq;function cq(e,t){if(!t||t[0]!==`lch`)return;let n={mode:`lch`},[,r,i,a,o]=t;if(r.type!==X.None){if(r.type===X.Hue)return;n.l=Math.min(Math.max(0,r.value),100)}if(i.type!==X.None&&(n.c=Math.max(0,i.type===X.Number?i.value:i.value*150/100)),a.type!==X.None){if(a.type===X.Percentage)return;n.h=a.value}return o.type!==X.None&&(n.alpha=Math.min(1,Math.max(0,o.type===X.Number?o.value:o.value/100))),n}var lq=cq;const uq={mode:`lch`,toMode:{lab:XW,rgb:e=>JK(XW(e))},fromMode:{rgb:e=>JW(tq(e)),lab:JW},channels:[`l`,`c`,`h`,`alpha`],ranges:{l:[0,100],c:[0,150],h:[0,360]},parse:[lq],serialize:e=>`lch(${e.l===void 0?`none`:e.l} ${e.c===void 0?`none`:e.c} ${e.h===void 0?`none`:e.h}${e.alpha<1?` / ${e.alpha}`:``})`,interpolate:{h:{use:Q,fixup:AW},c:Q,l:Q,alpha:{use:Q,fixup:oW}},difference:{h:UW},average:{h:WW}};var dq=uq;const fq={...dq,mode:`lch65`,parse:[`--lch-d65`],serialize:`--lch-d65`,toMode:{lab65:e=>XW(e,`lab65`),rgb:e=>sG(XW(e,`lab65`))},fromMode:{rgb:e=>JW(fG(e),`lch65`),lab65:e=>JW(e,`lch65`)},ranges:{l:[0,100],c:[0,133.807],h:[0,360]}};var pq=fq;const mq=({l:e,u:t,v:n,alpha:r})=>{t===void 0&&(t=0),n===void 0&&(n=0);let i=Math.sqrt(t*t+n*n),a={mode:`lchuv`,l:e,c:i};return i&&(a.h=OW(Math.atan2(n,t)*180/Math.PI)),r!==void 0&&(a.alpha=r),a};var hq=mq;const gq=({l:e,c:t,h:n,alpha:r})=>{n===void 0&&(n=0);let i={mode:`luv`,l:e,u:t?t*Math.cos(n/180*Math.PI):0,v:t?t*Math.sin(n/180*Math.PI):0};return r!==void 0&&(i.alpha=r),i};var _q=gq;const vq=(e,t,n)=>4*e/(e+15*t+3*n),yq=(e,t,n)=>9*t/(e+15*t+3*n),bq=vq($W.X,$W.Y,$W.Z),xq=yq($W.X,$W.Y,$W.Z),Sq=e=>e<=VK?BK*e:116*Math.cbrt(e)-16,Cq=({x:e,y:t,z:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let i=Sq(t/$W.Y),a=vq(e,t,n),o=yq(e,t,n);!isFinite(a)||!isFinite(o)?i=a=o=0:(a=13*i*(a-bq),o=13*i*(o-xq));let s={mode:`luv`,l:i,u:a,v:o};return r!==void 0&&(s.alpha=r),s};var wq=Cq;const Tq=(e,t,n)=>4*e/(e+15*t+3*n),Eq=(e,t,n)=>9*t/(e+15*t+3*n),Dq=Tq($W.X,$W.Y,$W.Z),Oq=Eq($W.X,$W.Y,$W.Z),kq=({l:e,u:t,v:n,alpha:r})=>{if(e===void 0&&(e=0),e===0)return{mode:`xyz50`,x:0,y:0,z:0};t===void 0&&(t=0),n===void 0&&(n=0);let i=t/(13*e)+Dq,a=n/(13*e)+Oq,o=$W.Y*(e<=8?e/BK:((e+16)/116)**3),s=o*(9*i)/(4*a),c=o*(12-3*i-20*a)/(4*a),l={mode:`xyz50`,x:s,y:o,z:c};return r!==void 0&&(l.alpha=r),l};var Aq=kq;const jq=e=>hq(wq(XK(e))),Mq=e=>KK(Aq(_q(e))),Nq={mode:`lchuv`,toMode:{luv:_q,rgb:Mq},fromMode:{rgb:jq,luv:hq},channels:[`l`,`c`,`h`,`alpha`],parse:[`--lchuv`],serialize:`--lchuv`,ranges:{l:[0,100],c:[0,176.956],h:[0,360]},interpolate:{h:{use:Q,fixup:AW},c:Q,l:Q,alpha:{use:Q,fixup:oW}},difference:{h:UW},average:{h:WW}};var Pq=Nq;const Fq={...cW,mode:`lrgb`,toMode:{rgb:SW},fromMode:{rgb:_W},parse:[`srgb-linear`],serialize:`srgb-linear`};var Iq=Fq;const Lq={mode:`luv`,toMode:{xyz50:Aq,rgb:e=>KK(Aq(e))},fromMode:{xyz50:wq,rgb:e=>wq(XK(e))},channels:[`l`,`u`,`v`,`alpha`],parse:[`--luv`],serialize:`--luv`,ranges:{l:[0,100],u:[-84.936,175.042],v:[-125.882,87.243]},interpolate:{l:Q,u:Q,v:Q,alpha:{use:Q,fixup:oW}}};var Rq=Lq;const zq=({r:e,g:t,b:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let i=Math.cbrt(.41222147079999993*e+.5363325363*t+.0514459929*n),a=Math.cbrt(.2119034981999999*e+.6806995450999999*t+.1073969566*n),o=Math.cbrt(.08830246189999998*e+.2817188376*t+.6299787005000002*n),s={mode:`oklab`,l:.2104542553*i+.793617785*a-.0040720468*o,a:1.9779984951*i-2.428592205*a+.4505937099*o,b:.0259040371*i+.7827717662*a-.808675766*o};return r!==void 0&&(s.alpha=r),s};var Bq=zq;const Vq=e=>{let t=Bq(_W(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t};var Hq=Vq;const Uq=({l:e,a:t,b:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let i=(e*.9999999984505198+.39633779217376786*t+.2158037580607588*n)**3,a=(e*1.0000000088817609-.10556134232365635*t-.06385417477170591*n)**3,o=(e*1.0000000546724108-.08948418209496575*t-1.2914855378640917*n)**3,s={mode:`lrgb`,r:4.076741661347994*i-3.307711590408193*a+.230969928729428*o,g:-1.2684380040921763*i+2.6097574006633715*a-.3413193963102197*o,b:-.004196086541837188*i-.7034186144594493*a+1.7076147009309444*o};return r!==void 0&&(s.alpha=r),s};var Wq=Uq;const Gq=e=>SW(Wq(e));var Kq=Gq;function qq(e){let t=.206,n=.03,r=(1+t)/(1+n);return .5*(r*e-t+Math.sqrt((r*e-t)*(r*e-t)+4*n*r*e))}function Jq(e){let t=.206,n=.03,r=(1+t)/(1+n);return(e*e+t*e)/(r*(e+n))}function Yq(e,t){let n,r,i,a,o,s,c,l;-1.88170328*e-.80936493*t>1?(n=1.19086277,r=1.76576728,i=.59662641,a=.75515197,o=.56771245,s=4.0767416621,c=-3.3077115913,l=.2309699292):1.81444104*e-1.19445276*t>1?(n=.73956515,r=-.45954404,i=.08285427,a=.1254107,o=.14503204,s=-1.2684380046,c=2.6097574011,l=-.3413193965):(n=1.35733652,r=-.00915799,i=-1.1513021,a=-.50559606,o=.00692167,s=-.0041960863,c=-.7034186147,l=1.707614701);let u=n+r*e+i*t+a*e*e+o*e*t,d=.3963377774*e+.2158037573*t,f=-.1055613458*e-.0638541728*t,p=-.0894841775*e-1.291485548*t;{let e=1+u*d,t=1+u*f,n=1+u*p,r=e*e*e,i=t*t*t,a=n*n*n,o=3*d*e*e,m=3*f*t*t,h=3*p*n*n,g=6*d*d*e,_=6*f*f*t,v=6*p*p*n,y=s*r+c*i+l*a,b=s*o+c*m+l*h,x=s*g+c*_+l*v;u-=y*b/(b*b-.5*y*x)}return u}function Xq(e,t){let n=Yq(e,t),r=Wq({l:1,a:n*e,b:n*t}),i=Math.cbrt(1/Math.max(r.r,r.g,r.b)),a=i*n;return[i,a]}function Zq(e,t,n,r,i,a=null){a||=Xq(e,t);let o;if((n-i)*a[1]-(a[0]-i)*r<=0)o=a[1]*i/(r*a[0]+a[1]*(i-n));else{o=a[1]*(i-1)/(r*(a[0]-1)+a[1]*(i-n));{let a=n-i,s=r,c=.3963377774*e+.2158037573*t,l=-.1055613458*e-.0638541728*t,u=-.0894841775*e-1.291485548*t,d=a+s*c,f=a+s*l,p=a+s*u;{let e=i*(1-o)+o*n,t=o*r,a=e+t*c,s=e+t*l,m=e+t*u,h=a*a*a,g=s*s*s,_=m*m*m,v=3*d*a*a,y=3*f*s*s,b=3*p*m*m,x=6*d*d*a,S=6*f*f*s,C=6*p*p*m,w=4.0767416621*h-3.3077115913*g+.2309699292*_-1,T=4.0767416621*v-3.3077115913*y+.2309699292*b,E=4.0767416621*x-3.3077115913*S+.2309699292*C,D=T/(T*T-.5*w*E),O=-w*D,k=-1.2684380046*h+2.6097574011*g-.3413193965*_-1,A=-1.2684380046*v+2.6097574011*y-.3413193965*b,j=-1.2684380046*x+2.6097574011*S-.3413193965*C,M=A/(A*A-.5*k*j),N=-k*M,ee=-.0041960863*h-.7034186147*g+1.707614701*_-1,te=-.0041960863*v-.7034186147*y+1.707614701*b,P=-.0041960863*x-.7034186147*S+1.707614701*C,ne=te/(te*te-.5*ee*P),re=-ee*ne;O=D>=0?O:1e6,N=M>=0?N:1e6,re=ne>=0?re:1e6,o+=Math.min(O,Math.min(N,re))}}}return o}function Qq(e,t,n=null){n||=Xq(e,t);let r=n[0],i=n[1];return[i/r,i/(1-r)]}function $q(e,t,n){let r=Xq(t,n),i=Zq(t,n,e,1,e,r),a=Qq(t,n,r),o=.11516993+1/(7.4477897+4.1590124*n+t*(-2.19557347+1.75198401*n+t*(-2.13704948-10.02301043*n+t*(-4.24894561+5.38770819*n+4.69891013*t)))),s=.11239642+1/(1.6132032-.68124379*n+t*(.40370612+.90148123*n+t*(-.27087943+.6122399*n+t*(.00299215-.45399568*n-.14661872*t)))),c=i/Math.min(e*a[0],(1-e)*a[1]),l=e*o,u=(1-e)*s,d=.9*c*Math.sqrt(Math.sqrt(1/(1/(l*l*l*l)+1/(u*u*u*u))));l=e*.4,u=(1-e)*.8;let f=Math.sqrt(1/(1/(l*l)+1/(u*u)));return[f,d,i]}function eJ(e){let t=e.l===void 0?0:e.l,n=e.a===void 0?0:e.a,r=e.b===void 0?0:e.b,i={mode:`okhsl`,l:qq(t)};e.alpha!==void 0&&(i.alpha=e.alpha);let a=Math.sqrt(n*n+r*r);if(!a)return i.s=0,i;let[o,s,c]=$q(t,n/a,r/a),l;if(aeJ(Hq(e))},toMode:{oklab:tJ,rgb:e=>Kq(tJ(e))}};var rJ=nJ;function iJ(e){let t=e.l===void 0?0:e.l,n=e.a===void 0?0:e.a,r=e.b===void 0?0:e.b,i=Math.sqrt(n*n+r*r),a=i?n/i:1,o=i?r/i:1,[s,c]=Qq(a,o),l=.5,u=1-l/s,d=c/(i+t*c),f=d*t,p=d*i,m=Jq(f),h=p*m/f,g=Wq({l:m,a:a*h,b:o*h}),_=Math.cbrt(1/Math.max(g.r,g.g,g.b,0));t/=_,i=i/_*qq(t)/t,t=qq(t);let v={mode:`okhsv`,s:i?(l+c)*p/(c*l+c*u*p):0,v:t?t/f:0};return v.s&&(v.h=OW(Math.atan2(r,n)*180/Math.PI)),e.alpha!==void 0&&(v.alpha=e.alpha),v}function aJ(e){let t={mode:`oklab`};e.alpha!==void 0&&(t.alpha=e.alpha);let n=e.h===void 0?0:e.h,r=e.s===void 0?0:e.s,i=e.v===void 0?0:e.v,a=Math.cos(n/180*Math.PI),o=Math.sin(n/180*Math.PI),[s,c]=Qq(a,o),l=.5,u=1-l/s,d=1-r*l/(l+c-c*u*r),f=r*c*l/(l+c-c*u*r),p=Jq(d),m=f*p/d,h=Wq({l:p,a:a*m,b:o*m}),g=Math.cbrt(1/Math.max(h.r,h.g,h.b,0)),_=Jq(i*d),v=f*_/d;return t.l=_*g,t.a=v*a*g,t.b=v*o*g,t}const oJ={...qG,mode:`okhsv`,channels:[`h`,`s`,`v`,`alpha`],parse:[`--okhsv`],serialize:`--okhsv`,fromMode:{oklab:iJ,rgb:e=>iJ(Hq(e))},toMode:{oklab:aJ,rgb:e=>Kq(aJ(e))}};var sJ=oJ;function cJ(e,t){if(!t||t[0]!==`oklab`)return;let n={mode:`oklab`},[,r,i,a,o]=t;if(!(r.type===X.Hue||i.type===X.Hue||a.type===X.Hue))return r.type!==X.None&&(n.l=Math.min(Math.max(0,r.type===X.Number?r.value:r.value/100),1)),i.type!==X.None&&(n.a=i.type===X.Number?i.value:i.value*.4/100),a.type!==X.None&&(n.b=a.type===X.Number?a.value:a.value*.4/100),o.type!==X.None&&(n.alpha=Math.min(1,Math.max(0,o.type===X.Number?o.value:o.value/100))),n}var lJ=cJ;const uJ={...aq,mode:`oklab`,toMode:{lrgb:Wq,rgb:Kq},fromMode:{lrgb:Bq,rgb:Hq},ranges:{l:[0,1],a:[-.4,.4],b:[-.4,.4]},parse:[lJ],serialize:e=>`oklab(${e.l===void 0?`none`:e.l} ${e.a===void 0?`none`:e.a} ${e.b===void 0?`none`:e.b}${e.alpha<1?` / ${e.alpha}`:``})`};var dJ=uJ;function fJ(e,t){if(!t||t[0]!==`oklch`)return;let n={mode:`oklch`},[,r,i,a,o]=t;if(r.type!==X.None){if(r.type===X.Hue)return;n.l=Math.min(Math.max(0,r.type===X.Number?r.value:r.value/100),1)}if(i.type!==X.None&&(n.c=Math.max(0,i.type===X.Number?i.value:i.value*.4/100)),a.type!==X.None){if(a.type===X.Percentage)return;n.h=a.value}return o.type!==X.None&&(n.alpha=Math.min(1,Math.max(0,o.type===X.Number?o.value:o.value/100))),n}var pJ=fJ;const mJ={...dq,mode:`oklch`,toMode:{oklab:e=>XW(e,`oklab`),rgb:e=>Kq(XW(e,`oklab`))},fromMode:{rgb:e=>JW(Hq(e),`oklch`),oklab:e=>JW(e,`oklch`)},parse:[pJ],serialize:e=>`oklch(${e.l===void 0?`none`:e.l} ${e.c===void 0?`none`:e.c} ${e.h===void 0?`none`:e.h}${e.alpha<1?` / ${e.alpha}`:``})`,ranges:{l:[0,1],c:[0,.4],h:[0,360]}};var hJ=mJ;const gJ=e=>{let{r:t,g:n,b:r,alpha:i}=_W(e),a={mode:`xyz65`,x:.486570948648216*t+.265667693169093*n+.1982172852343625*r,y:.2289745640697487*t+.6917385218365062*n+.079286914093745*r,z:0*t+.0451133818589026*n+1.043944368900976*r};return i!==void 0&&(a.alpha=i),a};var _J=gJ;const vJ=({x:e,y:t,z:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let i=SW({r:e*2.4934969119414263-t*.9313836179191242-.402710784450717*n,g:e*-.8294889695615749+t*1.7626640603183465+.0236246858419436*n,b:e*.0358458302437845-t*.0761723892680418+.9568845240076871*n},`p3`);return r!==void 0&&(i.alpha=r),i};var yJ=vJ;const bJ={...cW,mode:`p3`,parse:[`display-p3`],serialize:`display-p3`,fromMode:{rgb:e=>yJ(yW(e)),xyz65:yJ},toMode:{rgb:e=>wW(_J(e)),xyz65:_J}};var xJ=bJ;const SJ=e=>{let t=Math.abs(e);return t>=1/512?Math.sign(e)*t**(1/1.8):16*e},CJ=({x:e,y:t,z:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let i={mode:`prophoto`,r:SJ(e*1.3457868816471585-t*.2555720873797946-.0511018649755453*n),g:SJ(e*-.5446307051249019+t*1.5082477428451466+.0205274474364214*n),b:SJ(e*0+t*0+1.2119675456389452*n)};return r!==void 0&&(i.alpha=r),i};var wJ=CJ;const TJ=(e=0)=>{let t=Math.abs(e);return t>=16/512?Math.sign(e)*t**1.8:e/16},EJ=e=>{let t=TJ(e.r),n=TJ(e.g),r=TJ(e.b),i={mode:`xyz50`,x:.7977666449006423*t+.1351812974005331*n+.0313477341283922*r,y:.2880748288194013*t+.7118352342418731*n+899369387256e-16*r,z:0*t+0*n+.8251046025104602*r};return e.alpha!==void 0&&(i.alpha=e.alpha),i};var DJ=EJ;const OJ={...cW,mode:`prophoto`,parse:[`prophoto-rgb`],serialize:`prophoto-rgb`,fromMode:{xyz50:wJ,rgb:e=>wJ(XK(e))},toMode:{xyz50:DJ,rgb:e=>KK(DJ(e))}};var kJ=OJ;const AJ=1.09929682680944,jJ=.018053968510807,MJ=e=>{let t=Math.abs(e);return t>jJ?(Math.sign(e)||1)*(AJ*t**.45-(AJ-1)):4.5*e},NJ=({x:e,y:t,z:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let i={mode:`rec2020`,r:MJ(e*1.7166511879712683-t*.3556707837763925-.2533662813736599*n),g:MJ(e*-.6666843518324893+t*1.6164812366349395+.0157685458139111*n),b:MJ(e*.0176398574453108-t*.0427706132578085+.9421031212354739*n)};return r!==void 0&&(i.alpha=r),i};var PJ=NJ;const FJ=1.09929682680944,IJ=.018053968510807,LJ=(e=0)=>{let t=Math.abs(e);return t{let t=LJ(e.r),n=LJ(e.g),r=LJ(e.b),i={mode:`xyz65`,x:.6369580483012911*t+.1446169035862083*n+.1688809751641721*r,y:.262700212011267*t+.6779980715188708*n+.059301716469862*r,z:0*t+.0280726930490874*n+1.0609850577107909*r};return e.alpha!==void 0&&(i.alpha=e.alpha),i};var zJ=RJ;const BJ={...cW,mode:`rec2020`,fromMode:{xyz65:PJ,rgb:e=>PJ(yW(e))},toMode:{xyz65:zJ,rgb:e=>wW(zJ(e))},parse:[`rec2020`],serialize:`rec2020`};var VJ=BJ;const HJ=.0037930732552754493,UJ=Math.cbrt(HJ),WJ=e=>Math.cbrt(e)-UJ,GJ=e=>{let{r:t,g:n,b:r,alpha:i}=_W(e),a=WJ(.3*t+.622*n+.078*r+HJ),o=WJ(.23*t+.692*n+.078*r+HJ),s=WJ(.2434226892454782*t+.2047674442449682*n+.5518098665095535*r+HJ),c={mode:`xyb`,x:(a-o)/2,y:(a+o)/2,b:s-(a+o)/2};return i!==void 0&&(c.alpha=i),c};var KJ=GJ;const qJ=e=>(e+UJ)**3,JJ=({x:e,y:t,b:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let i=qJ(e+t)-HJ,a=qJ(t-e)-HJ,o=qJ(n+t)-HJ,s=SW({r:11.031566904639861*i-9.866943908131562*a-.16462299650829934*o,g:-3.2541473810744237*i+4.418770377582723*a-.16462299650829934*o,b:-3.6588512867136815*i+2.7129230459360922*a+1.9459282407775895*o});return r!==void 0&&(s.alpha=r),s};var YJ=JJ;const XJ={mode:`xyb`,channels:[`x`,`y`,`b`,`alpha`],parse:[`--xyb`],serialize:`--xyb`,toMode:{rgb:YJ},fromMode:{rgb:KJ},ranges:{x:[-.0154,.0281],y:[0,.8453],b:[-.2778,.388]},interpolate:{x:Q,y:Q,b:Q,alpha:{use:Q,fixup:oW}}};var ZJ=XJ;const QJ={mode:`xyz50`,parse:[`xyz-d50`],serialize:`xyz-d50`,toMode:{rgb:KK,lab:$K},fromMode:{rgb:XK,lab:WK},channels:[`x`,`y`,`z`,`alpha`],ranges:{x:[0,.964],y:[0,.999],z:[0,.825]},interpolate:{x:Q,y:Q,z:Q,alpha:{use:Q,fixup:oW}}};var $J=QJ;const eY=e=>{let{x:t,y:n,z:r,alpha:i}=e;t===void 0&&(t=0),n===void 0&&(n=0),r===void 0&&(r=0);let a={mode:`xyz50`,x:1.0479298208405488*t+.0229467933410191*n-.0501922295431356*r,y:.0296278156881593*t+.990434484573249*n-.0170738250293851*r,z:-.0092430581525912*t+.0150551448965779*n+.7518742899580008*r};return i!==void 0&&(a.alpha=i),a};var tY=eY;const nY=e=>{let{x:t,y:n,z:r,alpha:i}=e;t===void 0&&(t=0),n===void 0&&(n=0),r===void 0&&(r=0);let a={mode:`xyz65`,x:.9554734527042182*t-.0230985368742614*n+.0632593086610217*r,y:-.0283697069632081*t+1.0099954580058226*n+.021041398966943*r,z:.0123140016883199*t-.0205076964334779*n+1.3303659366080753*r};return i!==void 0&&(a.alpha=i),a};var rY=nY;const iY={mode:`xyz65`,toMode:{rgb:wW,xyz50:tY},fromMode:{rgb:yW,xyz50:rY},ranges:{x:[0,.95],y:[0,1],z:[0,1.088]},channels:[`x`,`y`,`z`,`alpha`],parse:[`xyz`,`xyz-d65`],serialize:`xyz-d65`,interpolate:{x:Q,y:Q,z:Q,alpha:{use:Q,fixup:oW}}};var aY=iY;const oY=({r:e,g:t,b:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let i={mode:`yiq`,y:.29889531*e+.58662247*t+.11448223*n,i:.59597799*e-.2741761*t-.32180189*n,q:.21147017*e-.52261711*t+.31114694*n};return r!==void 0&&(i.alpha=r),i};var sY=oY;const cY=({y:e,i:t,q:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let i={mode:`rgb`,r:e+.95608445*t+.6208885*n,g:e-.27137664*t-.6486059*n,b:e-1.10561724*t+1.70250126*n};return r!==void 0&&(i.alpha=r),i};var lY=cY;const uY={mode:`yiq`,toMode:{rgb:lY},fromMode:{rgb:sY},channels:[`y`,`i`,`q`,`alpha`],parse:[`--yiq`],serialize:`--yiq`,ranges:{i:[-.595,.595],q:[-.522,.522]},interpolate:{y:Q,i:Q,q:Q,alpha:{use:Q,fixup:oW}}};var dY=uY;const fY=(e,t)=>Math.round(e*(t=10**t))/t,pY=(e=4)=>t=>typeof t==`number`?fY(t,e):t;var mY=pY;let hY=mY(2);const gY=e=>Math.max(0,Math.min(1,e||0)),_Y=e=>Math.round(gY(e)*255),vY=kU(`rgb`),yY=kU(`hsl`),bY=e=>{if(e===void 0)return;let t=_Y(e.r),n=_Y(e.g),r=_Y(e.b);return`#`+(1<<24|t<<16|n<<8|r).toString(16).slice(1)},xY=e=>bY(vY(e)),SY=FU(EW),CY=FU(KW),wY=FU(EG),TY=FU(OG),EY=FU(MG),DY=FU(UG),OY=FU(qG),kY=FU($G),AY=FU(hK),jY=FU(NK),MY=FU(zK),NY=FU(aq),PY=FU(sq),FY=FU(dq),IY=FU(pq),LY=FU(Pq),RY=FU(Iq),zY=FU(Rq),BY=FU(rJ),VY=FU(sJ),HY=FU(dJ),UY=FU(hJ),WY=FU(xJ),GY=FU(kJ),KY=FU(VJ),qY=FU(cW),JY=FU(ZJ),YY=FU($J),XY=FU(aY),ZY=FU(dY),QY=220.44,$Y=kU(`oklch`),eX=e=>{var t;return e?(t=$Y(e))?.h:QY},tX=KB(`settings`,()=>{let e=R(),t=oF(`settings/language`,`en-US`),n=oF(`settings/stage/view/model-renderer`,`2d`),r=oF(`settings/audio/input`,`false`),i=H(()=>{var t;return(t=e.value)?.deviceId}),{audioInputs:a,ensurePermissions:o}=ZP({constraints:{audio:!0}}),s=R(),c=R(`/assets/live2d/models/hiyori_pro_zh.zip`),l=R(`url`),u=R(!1),d=oF(`settings/live2d/position`,{x:0,y:0}),f=R({group:`Idle`,index:0}),p=R([]),m=oF(`settings/live2d/motion-map`,{}),h=oF(`settings/disable-transitions`,!0),g=oF(`settings/use-page-specific-transitions`,!0),_=oF(`settings/theme/colors/hue`,QY),v=oF(`settings/theme/colors/hue-dynamic`,!1),y=oF(`settings/allow-visible-on-all-workspaces`,!0);function b(e=QY){_.value=e,v.value=!1}function x(e){b(eX(e))}function S(e){if(v.value)return!1;let t=eX(e);if(!t)return!1;let n=Math.abs(t-_.value);return n<.01||n>359.99}return V(r,t=>{t===`false`&&(e.value=void 0),t===`true`&&o().then(()=>{e.value=a.value[0]})}),V(a,()=>{r.value===`true`&&!e.value&&(e.value=a.value[0])},{immediate:!0}),{live2dModelFile:s,live2dModelUrl:c,live2dLoadSource:l,live2dCurrentMotion:f,live2dPosition:d,availableLive2dMotions:p,live2dMotionMap:m,loadingLive2dModel:u,disableTransitions:h,usePageSpecificTransitions:g,language:t,stageView:n,themeColorsHue:_,themeColorsHueDynamic:v,isAudioInputOn:r,selectedAudioDevice:e,selectedAudioDeviceId:i,allowVisibleOnAllWorkspaces:y,setThemeColorsHue:b,applyPrimaryColorFrom:x,isColorSelectedForPrimary:S}});var nX=Rr({__name:`ArrowTransition`,props:{stageTransition:{default:()=>({primaryColor:`#666`,secondaryColor:`#ccc`})}},setup(e){let t=e,n=H(()=>t.stageTransition),r=H(()=>n.value.primaryColor||`#666`),i=H(()=>n.value.secondaryColor||`#ccc`);return $r(()=>{document.documentElement.style.setProperty(`--stage-transition-3-overlay-color-1`,r.value),document.documentElement.style.setProperty(`--stage-transition-3-overlay-color-2`,i.value)}),(e,t)=>(to(),oo(`div`,{class:`stage-transition-3`,style:L({zIndex:n.value.zIndex||100})},null,4))}}),rX=(e,t)=>{let n=e.__vccOpts||e;for(let[e,r]of t)n[e]=r;return n},iX=rX(nX,[[`__scopeId`,`data-v-df576df0`]]),aX=Rr({__name:`BubbleWaveOutTransition`,props:{stageTransition:null},setup(e){let t=e,n=H(()=>{var e;return(e=t.stageTransition)?.colors||[`#eee`,`#ebcb8b`,`#c56370`,`#3f3b52`]});return $r(()=>{var e,r;document.documentElement.style.setProperty(`--circle-expansion-delay`,`${(e=t.stageTransition)?.delay||0}s`),document.documentElement.style.setProperty(`--circle-expansion-duration`,`${(r=t.stageTransition)?.duration||.4}s`),n.value.forEach((e,t)=>{document.documentElement.style.setProperty(`--circle-expansion-color-${t+1}`,e)})}),(t,r)=>{var i;return to(),oo(`div`,{class:`circle-expansion-transition`,style:L({zIndex:(i=e.stageTransition)?.zIndex||100})},[(to(!0),oo(Ya,null,gi(n.value,(e,t)=>(to(),oo(`div`,{key:t}))),128))],4)}}}),oX=rX(aX,[[`__scopeId`,`data-v-0c29056c`]]),sX=Rr({__name:`FantasyFallTransition`,props:{stageTransition:null},setup(e){let t=e,n=H(()=>{var e;return(e=t.stageTransition)?.direction||`up`}),r=H(()=>`fantasy-fall-${n.value}`);return $r(()=>{var e,n,r,i,a,o;document.documentElement.style.setProperty(`--fantasy-fall-color`,(e=t.stageTransition)?.primaryColor||`#eee`),document.documentElement.style.setProperty(`--fantasy-fall-duration`,`${(n=t.stageTransition)?.duration||.6}s`),document.documentElement.style.setProperty(`--fantasy-fall-delay`,`${(r=t.stageTransition)?.delay||0}s`),document.documentElement.style.setProperty(`--fantasy-fall-radius-sm`,`${((i=t.stageTransition)==null||(i=i.borderRadius)==null?void 0:i.sm)||`14rem`}`),document.documentElement.style.setProperty(`--fantasy-fall-radius-md`,`${((a=t.stageTransition)==null||(a=a.borderRadius)==null?void 0:a.md)||`14rem`}`),document.documentElement.style.setProperty(`--fantasy-fall-radius-lg`,`${((o=t.stageTransition)==null||(o=o.borderRadius)==null?void 0:o.lg)||`50%`}`)}),(t,n)=>{var i;return to(),oo(`div`,{class:Se([`fantasy-fall-transition`,r.value]),style:L({zIndex:(i=e.stageTransition)?.zIndex??100})},null,6)}}}),cX=rX(sX,[[`__scopeId`,`data-v-e62bf496`]]),lX=Rr({__name:`MultipleBlocksRevealTransition`,props:{stageTransition:null},setup(e){let t=e,n=H(()=>t.stageTransition),r=H(()=>{var e;return(e=n.value)?.primaryColor||`#666`}),i=H(()=>{var e;return(e=n.value)?.secondaryColor||`#ccc`});return $r(()=>{document.documentElement.style.setProperty(`--stage-transition-4-overlay-color-1`,r.value),document.documentElement.style.setProperty(`--stage-transition-4-overlay-color-2`,i.value)}),(e,t)=>{var r;return to(),oo(`div`,{class:`stage-transition-4`,style:L({zIndex:(r=n.value)?.zIndex??100})},t[0]||=[yo(`
`,5)],4)}}}),uX=rX(lX,[[`__scopeId`,`data-v-6d1179fc`]]),dX=Rr({__name:`SlideTransition`,props:{stageTransition:null},setup(e){let t=e,n=H(()=>t.stageTransition),r=H(()=>{var e;return(e=n.value)?.primaryColor||`#666`}),i=H(()=>{var e;return(e=n.value)?.secondaryColor||`#ccc`});return V([n,r,i],()=>{document.documentElement.style.setProperty(`--stage-transition-1-overlay-color-1`,r.value),document.documentElement.style.setProperty(`--stage-transition-1-overlay-color-2`,i.value)}),$r(()=>{document.documentElement.style.setProperty(`--stage-transition-1-overlay-color-1`,r.value),document.documentElement.style.setProperty(`--stage-transition-1-overlay-color-2`,i.value)}),(e,t)=>{var r;return to(),oo(`div`,{class:`stage-transition-1`,style:L({zIndex:(r=n.value)?.zIndex??100})},null,4)}}}),fX=rX(dX,[[`__scopeId`,`data-v-bf1d1566`]]),pX=Rr({__name:`SlopeSlideTransition`,props:{stageTransition:null},setup(e){let t=e,n=H(()=>t.stageTransition),r=H(()=>{var e;return(e=n.value)?.primaryColor??`#666`}),i=H(()=>{var e;return(e=n.value)?.secondaryColor??`#ccc`});return $r(()=>{document.documentElement.style.setProperty(`--stage-transition-2-overlay-color-1`,r.value),document.documentElement.style.setProperty(`--stage-transition-2-overlay-color-2`,i.value)}),(e,t)=>{var r;return to(),oo(`div`,{class:`stage-transition-2`,style:L({zIndex:(r=n.value)?.zIndex??100})},null,4)}}}),mX=rX(pX,[[`__scopeId`,`data-v-8ff7120f`]]),hX=Rr({__name:`RectanglesRotateTransition`,props:{stageTransition:null},setup(e){let t=e;return $r(()=>{var e,n,r,i,a,o,s;document.documentElement.style.setProperty(`--rectangle-rotate-1-color`,(e=t.stageTransition)?.primaryColor||`#ebcb8b`),document.documentElement.style.setProperty(`--rectangle-rotate-2-color`,(n=t.stageTransition)?.secondaryColor||`#c56370`),document.documentElement.style.setProperty(`--rectangle-rotate-3-color`,(r=t.stageTransition)?.tertiaryColor||`#43445b`),document.documentElement.style.setProperty(`--rectangle-rotate-duration`,`${(i=t.stageTransition)?.duration||.6}s`),document.documentElement.style.setProperty(`--rectangle-rotate-delay`,`${(a=t.stageTransition)?.delay||0}s`),document.documentElement.style.setProperty(`--rectangle-rotate-stagger`,`${(o=t.stageTransition)?.staggerDelay||.1}s`),document.documentElement.style.setProperty(`--rectangle-rotate-rotation`,`${(s=t.stageTransition)?.rotation||270}deg`)}),(t,n)=>{var r;return to(),oo(`div`,{class:`rectangle-rotate-transition`,style:L({zIndex:(r=e.stageTransition)?.zIndex??100})},n[0]||=[po(`div`,{class:`rectangle rectangle-rotate-1`},[po(`div`)],-1),po(`div`,{class:`rectangle rectangle-rotate-2`},[po(`div`)],-1),po(`div`,{class:`rectangle rectangle-rotate-3`},[po(`div`)],-1)],4)}}}),gX=rX(hX,[[`__scopeId`,`data-v-f4b1dc64`]]),_X=Rr({__name:`StageTransitionGroup`,props:{primaryColor:null,secondaryColor:null,tertiaryColor:null,colors:null,zIndex:null,disableTransitions:{type:Boolean},usePageSpecificTransitions:{type:Boolean}},setup(e){let t=e,n=eU(),r=R(!1),i=R(),a=R(``),o=R(),s=z({slide:{component:fX,duration:2700},"slope-slide":{component:mX,duration:2700},arrow:{component:iX,duration:2700},"multiple-blocks-reveal":{component:uX,duration:2800},"fantasy-fall":{component:cX,duration:2700},"rectangles-rotate":{component:gX,duration:2700},"bubble-wave-out":{component:oX,duration:1e3}}),c=R([]);function l(e){return c.value.push(e),()=>{let t=c.value.indexOf(e);t>=0&&c.value.splice(t,1)}}async function u(e,t={}){i.value=e;for(let n of c.value)try{await Promise.resolve(n(e,t))}catch(t){console.error(`Error in transition hook at stage "${e}":`,t)}}async function d(e,t,n){if(e.name===`none`||!e.name){t(),n();return}let i=s.value[e.name];if(!i){console.error(`Transition ${e.name} not found`),t(),n();return}let c=i.nextDelay===void 0?i.duration/3:i.nextDelay,d=!1,f=e=>{e===`navigation`&&!d&&(d=!0,t())},p=l(f);try{await u(`before-enter`,{transitionName:e.name}),r.value&&(await u(`before-leave`,{transitionName:a.value}),a.value=``,o.value=void 0,r.value=!1,await u(`after-leave`,{transitionName:a.value}),await new Promise(e=>setTimeout(e,50))),a.value=e.name,o.value=e,r.value=!0,await u(`enter-active`,{transitionName:name}),setTimeout(async()=>{await u(`navigation`,{transitionName:e.name,config:i}),d||(d=!0,t())},c),setTimeout(async()=>{await u(`after-enter`,{transitionName:e.name})},i.duration),setTimeout(async()=>{await u(`before-leave`,{transitionName:e.name})},i.duration+10),setTimeout(async()=>{await u(`leave-active`,{transitionName:e.name})},i.duration+20);let s=i.exitDuration??0;setTimeout(async()=>{r.value=!1,a.value=``,o.value=void 0,await u(`after-leave`,{transitionName:e.name}),n()},i.duration+s)}catch(e){console.error(e)}finally{p(),setTimeout(()=>{d||(d=!0,t())},i.duration*2)}}function f(e,t){return new Promise(n=>{d(e,t,n)})}return n.beforeEach((e,n,r)=>{if(t.disableTransitions){r();return}if(typeof e.meta.stageTransition!=`object`){r();return}let i=e.meta.stageTransition;if(t.usePageSpecificTransitions&&i.pageSpecificAvailable){r();return}t.primaryColor!==void 0&&(i.primaryColor=t.primaryColor),t.secondaryColor!==void 0&&(i.secondaryColor=t.secondaryColor),t.tertiaryColor!==void 0&&(i.tertiaryColor=t.tertiaryColor),t.colors!==void 0&&(i.colors=t.colors),t.zIndex!==void 0&&(i.zIndex=t.zIndex),f(i,r)}),(e,t)=>(to(),oo(Ya,null,[_i(e.$slots,`default`),r.value?(to(),oo(Ya,{key:0},[s.value[a.value]?(to(),so(fi(s.value[a.value].component),{key:0,"stage-transition":o.value},null,8,[`stage-transition`])):bo(``,!0)],64)):bo(``,!0)],64))}}),vX=_X; +`||t[Z]===` `||t[Z]===` `);)Z++;let e;if(BU(t)&&(e=UU(t),e.type!==X.Hue)){n.push({type:X.Alpha,value:e});continue}if(VU(t)&&GU(t)===`none`){n.push({type:X.Alpha,value:{type:X.None,value:void 0}});continue}return}if(/\d/.test(r)){Z--,n.push(UU(t));continue}if(RU.test(r)){Z--,n.push(KU(t));continue}return}return n}function JU(e){e._i=0;let t=e[e._i++];if(!t||t.type!==X.Function||t.value!==`color`||(t=e[e._i++],t.type!==X.Ident))return;let n=NU[t.value];if(!n)return;let r={mode:n},i=YU(e,!1);if(!i)return;let a=IU(n).channels;for(let e=0,t,n;e4)){if(n.length===4){if(n[3].type!==X.Alpha)return;n[3]=n[3].value}return n.length===3&&n.push({type:X.None,value:void 0}),n.every(e=>e.type!==X.Alpha)?n:void 0}}function XU(e,t){e._i=0;let n=e[e._i++];if(!n||n.type!==X.Function)return;let r=YU(e,t);if(r)return r.unshift(n.value),r}const ZU=e=>{if(typeof e!=`string`)return;let t=qU(e),n=t?XU(t,!0):void 0,r,i=0,a=MU.length;for(;ie===`transparent`?{mode:`rgb`,r:0,g:0,b:0,alpha:0}:void 0;var nW=tW;const rW=(e,t,n)=>e+n*(t-e),iW=e=>{let t=[];for(let n=0;nt=>{let n=iW(t);return t=>{let r=t*n.length,i=t>=1?n.length-1:Math.max(Math.floor(r),0),a=n[i];return a===void 0?void 0:e(a[0],a[1],r-i)}},Q=aW(rW),oW=e=>{let t=!1,n=e.map(e=>e===void 0?1:(t=!0,e));return t?n:e},sW={mode:`rgb`,channels:[`r`,`g`,`b`,`alpha`],parse:[eW,dU,TU,cU,nW,`srgb`],serialize:`srgb`,interpolate:{r:Q,g:Q,b:Q,alpha:{use:Q,fixup:oW}},gamut:!0,white:{r:1,g:1,b:1},black:{r:0,g:0,b:0}};var cW=sW;const lW=(e=0)=>Math.abs(e)**(563/256)*Math.sign(e),uW=e=>{let t=lW(e.r),n=lW(e.g),r=lW(e.b),i={mode:`xyz65`,x:.5766690429101305*t+.1855582379065463*n+.1882286462349947*r,y:.297344975250536*t+.6273635662554661*n+.0752914584939979*r,z:.0270313613864123*t+.0706888525358272*n+.9913375368376386*r};return e.alpha!==void 0&&(i.alpha=e.alpha),i};var dW=uW;const fW=e=>Math.abs(e)**(256/563)*Math.sign(e),pW=({x:e,y:t,z:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let i={mode:`a98`,r:fW(e*2.0415879038107465-t*.5650069742788597-.3447313507783297*n),g:fW(e*-.9692436362808798+t*1.8759675015077206+.0415550574071756*n),b:fW(e*.0134442806320312-t*.1183623922310184+1.0151749943912058*n)};return r!==void 0&&(i.alpha=r),i};var mW=pW;const hW=(e=0)=>{let t=Math.abs(e);return t<=.04045?e/12.92:(Math.sign(e)||1)*((t+.055)/1.055)**2.4},gW=({r:e,g:t,b:n,alpha:r})=>{let i={mode:`lrgb`,r:hW(e),g:hW(t),b:hW(n)};return r!==void 0&&(i.alpha=r),i};var _W=gW;const vW=e=>{let{r:t,g:n,b:r,alpha:i}=_W(e),a={mode:`xyz65`,x:.4123907992659593*t+.357584339383878*n+.1804807884018343*r,y:.2126390058715102*t+.715168678767756*n+.0721923153607337*r,z:.0193308187155918*t+.119194779794626*n+.9505321522496607*r};return i!==void 0&&(a.alpha=i),a};var yW=vW;const bW=(e=0)=>{let t=Math.abs(e);return t>.0031308?(Math.sign(e)||1)*(1.055*t**(1/2.4)-.055):e*12.92},xW=({r:e,g:t,b:n,alpha:r},i=`rgb`)=>{let a={mode:i,r:bW(e),g:bW(t),b:bW(n)};return r!==void 0&&(a.alpha=r),a};var SW=xW;const CW=({x:e,y:t,z:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let i=SW({r:e*3.2409699419045226-t*1.537383177570094-.4986107602930034*n,g:e*-.9692436362808796+t*1.8759675015077204+.0415550574071756*n,b:e*.0556300796969936-t*.2039769588889765+1.0569715142428784*n});return r!==void 0&&(i.alpha=r),i};var wW=CW;const TW={...cW,mode:`a98`,parse:[`a98-rgb`],serialize:`a98-rgb`,fromMode:{rgb:e=>mW(yW(e)),xyz65:mW},toMode:{rgb:e=>wW(dW(e)),xyz65:dW}};var EW=TW;const DW=e=>(e%=360)<0?e+360:e;var OW=DW;const kW=(e,t)=>e.map((n,r,i)=>{if(n===void 0)return n;let a=OW(n);return r===0||e[r-1]===void 0?a:t(a-OW(i[r-1]))}).reduce((e,t)=>!e.length||t===void 0||e[e.length-1]===void 0?(e.push(t),e):(e.push(t+e[e.length-1]),e),[]),AW=e=>kW(e,e=>Math.abs(e)<=180?e:e-360*Math.sign(e)),jW=[-.14861,1.78277,-.29227,-.90649,1.97294,0],MW=Math.PI/180,NW=180/Math.PI;let PW=jW[3]*jW[4],FW=jW[1]*jW[4],IW=jW[1]*jW[2]-jW[0]*jW[3];const LW=({r:e,g:t,b:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let i=(IW*n+e*PW-t*FW)/(IW+PW-FW),a=n-i,o=(jW[4]*(t-i)-jW[2]*a)/jW[3],s={mode:`cubehelix`,l:i,s:i===0||i===1?void 0:Math.sqrt(a*a+o*o)/(jW[4]*i*(1-i))};return s.s&&(s.h=Math.atan2(o,a)*NW-120),r!==void 0&&(s.alpha=r),s};var RW=LW;const zW=({h:e,s:t,l:n,alpha:r})=>{let i={mode:`rgb`};e=(e===void 0?0:e+120)*MW,n===void 0&&(n=0);let a=t===void 0?0:t*n*(1-n),o=Math.cos(e),s=Math.sin(e);return i.r=n+a*(jW[0]*o+jW[1]*s),i.g=n+a*(jW[2]*o+jW[3]*s),i.b=n+a*(jW[4]*o+jW[5]*s),r!==void 0&&(i.alpha=r),i};var BW=zW;const VW=(e,t)=>{if(e.h===void 0||t.h===void 0||!e.s||!t.s)return 0;let n=OW(e.h),r=OW(t.h),i=Math.sin((r-n+360)/2*Math.PI/180);return 2*Math.sqrt(e.s*t.s)*i},HW=(e,t)=>{if(e.h===void 0||t.h===void 0)return 0;let n=OW(e.h),r=OW(t.h);return Math.abs(r-n)>180?n-(r-360*Math.sign(r-n)):r-n},UW=(e,t)=>{if(e.h===void 0||t.h===void 0||!e.c||!t.c)return 0;let n=OW(e.h),r=OW(t.h),i=Math.sin((r-n+360)/2*Math.PI/180);return 2*Math.sqrt(e.c*t.c)*i},WW=e=>{let t=e.reduce((e,t)=>{if(t!==void 0){let n=t*Math.PI/180;e.sin+=Math.sin(n),e.cos+=Math.cos(n)}return e},{sin:0,cos:0}),n=Math.atan2(t.sin,t.cos)*180/Math.PI;return n<0?360+n:n},GW={mode:`cubehelix`,channels:[`h`,`s`,`l`,`alpha`],parse:[`--cubehelix`],serialize:`--cubehelix`,ranges:{h:[0,360],s:[0,4.614],l:[0,1]},fromMode:{rgb:RW},toMode:{rgb:BW},interpolate:{h:{use:Q,fixup:AW},s:Q,l:Q,alpha:{use:Q,fixup:oW}},difference:{h:VW},average:{h:WW}};var KW=GW;const qW=({l:e,a:t,b:n,alpha:r},i=`lch`)=>{t===void 0&&(t=0),n===void 0&&(n=0);let a=Math.sqrt(t*t+n*n),o={mode:i,l:e,c:a};return a&&(o.h=OW(Math.atan2(n,t)*180/Math.PI)),r!==void 0&&(o.alpha=r),o};var JW=qW;const YW=({l:e,c:t,h:n,alpha:r},i=`lab`)=>{n===void 0&&(n=0);let a={mode:i,l:e,a:t?t*Math.cos(n/180*Math.PI):0,b:t?t*Math.sin(n/180*Math.PI):0};return r!==void 0&&(a.alpha=r),a};var XW=YW;const ZW=29**3/3**3,QW=6**3/29**3,$W={X:.3457/.3585,Y:1,Z:.2958/.3585},eG={X:.3127/.329,Y:1,Z:.3583/.329},tG=29**3/3**3,nG=6**3/29**3;let rG=e=>e**3>QW?e**3:(116*e-16)/ZW;const iG=({l:e,a:t,b:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let i=(e+16)/116,a=t/500+i,o=i-n/200,s={mode:`xyz65`,x:rG(a)*eG.X,y:rG(i)*eG.Y,z:rG(o)*eG.Z};return r!==void 0&&(s.alpha=r),s};var aG=iG;const oG=e=>wW(aG(e));var sG=oG;const cG=e=>e>QW?Math.cbrt(e):(ZW*e+16)/116,lG=({x:e,y:t,z:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let i=cG(e/eG.X),a=cG(t/eG.Y),o=cG(n/eG.Z),s={mode:`lab65`,l:116*a-16,a:500*(i-a),b:200*(a-o)};return r!==void 0&&(s.alpha=r),s};var uG=lG;const dG=e=>{let t=uG(yW(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t};var fG=dG;const pG=1,mG=1,hG=26/180*Math.PI,gG=Math.cos(hG),_G=Math.sin(hG),vG=100/Math.log(139/100),yG=({l:e,c:t,h:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let i={mode:`lab65`,l:(Math.exp(e*pG/vG)-1)/.0039},a=(Math.exp(.0435*t*mG*pG)-1)/.075,o=a*Math.cos(n/180*Math.PI-hG),s=a*Math.sin(n/180*Math.PI-hG);return i.a=o*gG-s/.83*_G,i.b=o*_G+s/.83*gG,r!==void 0&&(i.alpha=r),i};var bG=yG;const xG=({l:e,a:t,b:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let i=t*gG+n*_G,a=.83*(n*gG-t*_G),o=Math.sqrt(i*i+a*a),s={mode:`dlch`,l:vG/pG*Math.log(1+.0039*e),c:Math.log(1+.075*o)/(.0435*mG*pG)};return s.c&&(s.h=OW((Math.atan2(a,i)+hG)/Math.PI*180)),r!==void 0&&(s.alpha=r),s};var SG=xG;const CG=e=>bG(JW(e,`dlch`)),wG=e=>XW(SG(e),`dlab`),TG={mode:`dlab`,parse:[`--din99o-lab`],serialize:`--din99o-lab`,toMode:{lab65:CG,rgb:e=>sG(CG(e))},fromMode:{lab65:wG,rgb:e=>wG(fG(e))},channels:[`l`,`a`,`b`,`alpha`],ranges:{l:[0,100],a:[-40.09,45.501],b:[-40.469,44.344]},interpolate:{l:Q,a:Q,b:Q,alpha:{use:Q,fixup:oW}}};var EG=TG;const DG={mode:`dlch`,parse:[`--din99o-lch`],serialize:`--din99o-lch`,toMode:{lab65:bG,dlab:e=>XW(e,`dlab`),rgb:e=>sG(bG(e))},fromMode:{lab65:SG,dlab:e=>JW(e,`dlch`),rgb:e=>SG(fG(e))},channels:[`l`,`c`,`h`,`alpha`],ranges:{l:[0,100],c:[0,51.484],h:[0,360]},interpolate:{l:Q,c:Q,h:{use:Q,fixup:AW},alpha:{use:Q,fixup:oW}},difference:{h:UW},average:{h:WW}};var OG=DG;function kG({h:e,s:t,i:n,alpha:r}){e=OW(e===void 0?0:e),t===void 0&&(t=0),n===void 0&&(n=0);let i=Math.abs(e/60%2-1),a;switch(Math.floor(e/60)){case 0:a={r:n*(1+t*(3/(2-i)-1)),g:n*(1+t*(3*(1-i)/(2-i)-1)),b:n*(1-t)};break;case 1:a={r:n*(1+t*(3*(1-i)/(2-i)-1)),g:n*(1+t*(3/(2-i)-1)),b:n*(1-t)};break;case 2:a={r:n*(1-t),g:n*(1+t*(3/(2-i)-1)),b:n*(1+t*(3*(1-i)/(2-i)-1))};break;case 3:a={r:n*(1-t),g:n*(1+t*(3*(1-i)/(2-i)-1)),b:n*(1+t*(3/(2-i)-1))};break;case 4:a={r:n*(1+t*(3*(1-i)/(2-i)-1)),g:n*(1-t),b:n*(1+t*(3/(2-i)-1))};break;case 5:a={r:n*(1+t*(3/(2-i)-1)),g:n*(1-t),b:n*(1+t*(3*(1-i)/(2-i)-1))};break;default:a={r:n*(1-t),g:n*(1-t),b:n*(1-t)}}return a.mode=`rgb`,r!==void 0&&(a.alpha=r),a}function AG({r:e,g:t,b:n,alpha:r}){e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let i=Math.max(e,t,n),a=Math.min(e,t,n),o={mode:`hsi`,s:e+t+n===0?0:1-3*a/(e+t+n),i:(e+t+n)/3};return i-a!==0&&(o.h=(i===e?(t-n)/(i-a)+(t{switch(t){case`deg`:return+e;case`rad`:return e/Math.PI*180;case`grad`:return e/10*9;case`turn`:return e*360}};var IG=FG;const LG=RegExp(`^hsla?\\(\\s*${vU}${bU}${mU}${bU}${mU}\\s*(?:,\\s*${gU}\\s*)?\\)$`),RG=e=>{let t=e.match(LG);if(!t)return;let n={mode:`hsl`};return t[3]===void 0?t[1]!==void 0&&t[2]!==void 0&&(n.h=IG(t[1],t[2])):n.h=+t[3],t[4]!==void 0&&(n.s=Math.min(Math.max(0,t[4]/100),1)),t[5]!==void 0&&(n.l=Math.min(Math.max(0,t[5]/100),1)),t[6]===void 0?t[7]!==void 0&&(n.alpha=Math.max(0,Math.min(1,+t[7]))):n.alpha=Math.max(0,Math.min(1,t[6]/100)),n};var zG=RG;function BG(e,t){if(!t||t[0]!==`hsl`&&t[0]!==`hsla`)return;let n={mode:`hsl`},[,r,i,a,o]=t;if(r.type!==X.None){if(r.type===X.Percentage)return;n.h=r.value}if(i.type!==X.None){if(i.type===X.Hue)return;n.s=i.value/100}if(a.type!==X.None){if(a.type===X.Hue)return;n.l=a.value/100}return o.type!==X.None&&(n.alpha=Math.min(1,Math.max(0,o.type===X.Number?o.value:o.value/100))),n}var VG=BG;const HG={mode:`hsl`,toMode:{rgb:NG},fromMode:{rgb:PG},channels:[`h`,`s`,`l`,`alpha`],ranges:{h:[0,360]},gamut:`rgb`,parse:[VG,zG],serialize:e=>`hsl(${e.h===void 0?`none`:e.h} ${e.s===void 0?`none`:e.s*100+`%`} ${e.l===void 0?`none`:e.l*100+`%`}${e.alpha<1?` / ${e.alpha}`:``})`,interpolate:{h:{use:Q,fixup:AW},s:Q,l:Q,alpha:{use:Q,fixup:oW}},difference:{h:VW},average:{h:WW}};var UG=HG;function WG({h:e,s:t,v:n,alpha:r}){e=OW(e===void 0?0:e),t===void 0&&(t=0),n===void 0&&(n=0);let i=Math.abs(e/60%2-1),a;switch(Math.floor(e/60)){case 0:a={r:n,g:n*(1-t*i),b:n*(1-t)};break;case 1:a={r:n*(1-t*i),g:n,b:n*(1-t)};break;case 2:a={r:n*(1-t),g:n,b:n*(1-t*i)};break;case 3:a={r:n*(1-t),g:n*(1-t*i),b:n};break;case 4:a={r:n*(1-t*i),g:n*(1-t),b:n};break;case 5:a={r:n,g:n*(1-t),b:n*(1-t*i)};break;default:a={r:n*(1-t),g:n*(1-t),b:n*(1-t)}}return a.mode=`rgb`,r!==void 0&&(a.alpha=r),a}function GG({r:e,g:t,b:n,alpha:r}){e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let i=Math.max(e,t,n),a=Math.min(e,t,n),o={mode:`hsv`,s:i===0?0:1-a/i,v:i};return i-a!==0&&(o.h=(i===e?(t-n)/(i-a)+(t1){let e=t+n;t/=e,n/=e}return WG({h:e,s:n===1?1:1-t/(1-n),v:1-n,alpha:r})}function YG(e){let t=GG(e);if(t===void 0)return;let n=t.s===void 0?0:t.s,r=t.v===void 0?0:t.v,i={mode:`hwb`,w:(1-n)*r,b:1-r};return t.h!==void 0&&(i.h=t.h),t.alpha!==void 0&&(i.alpha=t.alpha),i}function XG(e,t){if(!t||t[0]!==`hwb`)return;let n={mode:`hwb`},[,r,i,a,o]=t;if(r.type!==X.None){if(r.type===X.Percentage)return;n.h=r.value}if(i.type!==X.None){if(i.type===X.Hue)return;n.w=i.value/100}if(a.type!==X.None){if(a.type===X.Hue)return;n.b=a.value/100}return o.type!==X.None&&(n.alpha=Math.min(1,Math.max(0,o.type===X.Number?o.value:o.value/100))),n}var ZG=XG;const QG={mode:`hwb`,toMode:{rgb:JG},fromMode:{rgb:YG},channels:[`h`,`w`,`b`,`alpha`],ranges:{h:[0,360]},gamut:`rgb`,parse:[ZG],serialize:e=>`hwb(${e.h===void 0?`none`:e.h} ${e.w===void 0?`none`:e.w*100+`%`} ${e.b===void 0?`none`:e.b*100+`%`}${e.alpha<1?` / ${e.alpha}`:``})`,interpolate:{h:{use:Q,fixup:AW},w:Q,b:Q,alpha:{use:Q,fixup:oW}},difference:{h:HW},average:{h:WW}};var $G=QG;const eK=203,tK=.1593017578125,nK=78.84375,rK=.8359375,iK=18.8515625,aK=18.6875;function oK(e){if(e<0)return 0;let t=e**(1/nK);return 1e4*(Math.max(0,t-rK)/(iK-aK*t))**(1/tK)}function sK(e){if(e<0)return 0;let t=(e/1e4)**tK;return((rK+iK*t)/(1+aK*t))**+nK}const cK=e=>Math.max(e/eK,0),lK=({i:e,t,p:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let i=oK(e+.008609037037932761*t+.11102962500302593*n),a=oK(e-.00860903703793275*t-.11102962500302599*n),o=oK(e+.5600313357106791*t-.32062717498731885*n),s={mode:`xyz65`,x:cK(2.070152218389422*i-1.3263473389671556*a+.2066510476294051*o),y:cK(.3647385209748074*i+.680566024947227*a-.0453045459220346*o),z:cK(-.049747207535812*i-.0492609666966138*a+1.1880659249923042*o)};return r!==void 0&&(s.alpha=r),s};var uK=lK;const dK=(e=0)=>Math.max(e*eK,0),fK=({x:e,y:t,z:n,alpha:r})=>{let i=dK(e),a=dK(t),o=dK(n),s=sK(.3592832590121217*i+.6976051147779502*a-.0358915932320289*o),c=sK(-.1920808463704995*i+1.1004767970374323*a+.0753748658519118*o),l=sK(.0070797844607477*i+.0748396662186366*a+.8433265453898765*o),u=.5*s+.5*c,d=1.61376953125*s-3.323486328125*c+1.709716796875*l,f=4.378173828125*s-4.24560546875*c-.132568359375*l,p={mode:`itp`,i:u,t:d,p:f};return r!==void 0&&(p.alpha=r),p};var pK=fK;const mK={mode:`itp`,channels:[`i`,`t`,`p`,`alpha`],parse:[`--ictcp`],serialize:`--ictcp`,toMode:{xyz65:uK,rgb:e=>wW(uK(e))},fromMode:{xyz65:pK,rgb:e=>pK(yW(e))},ranges:{i:[0,.581],t:[-.369,.272],p:[-.164,.331]},interpolate:{i:Q,t:Q,p:Q,alpha:{use:Q,fixup:oW}}};var hK=mK;const gK=134.03437499999998,_K=16295499532821565e-27,vK=e=>{if(e<0)return 0;let t=(e/1e4)**tK;return((rK+iK*t)/(1+aK*t))**+gK},yK=(e=0)=>Math.max(e*203,0),bK=({x:e,y:t,z:n,alpha:r})=>{e=yK(e),t=yK(t),n=yK(n);let i=1.15*e-.15*n,a=.66*t+.34*e,o=vK(.41478972*i+.579999*a+.014648*n),s=vK(-.20151*i+1.120649*a+.0531008*n),c=vK(-.0166008*i+.2648*a+.6684799*n),l=(o+s)/2,u={mode:`jab`,j:.44*l/(1-.56*l)-_K,a:3.524*o-4.066708*s+.542708*c,b:.199076*o+1.096799*s-1.295875*c};return r!==void 0&&(u.alpha=r),u};var xK=bK;const SK=134.03437499999998,CK=16295499532821565e-27,wK=e=>{if(e<0)return 0;let t=e**(1/SK);return 1e4*((rK-t)/(aK*t-iK))**(1/tK)},TK=e=>e/203,EK=({j:e,a:t,b:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let i=(e+CK)/(.44+.56*(e+CK)),a=wK(i+.13860504*t+.058047316*n),o=wK(i-.13860504*t-.058047316*n),s=wK(i-.096019242*t-.8118919*n),c={mode:`xyz65`,x:TK(1.661373024652174*a-.914523081304348*o+.23136208173913045*s),y:TK(-.3250758611844533*a+1.571847026732543*o-.21825383453227928*s),z:TK(-.090982811*a-.31272829*o+1.5227666*s)};return r!==void 0&&(c.alpha=r),c};var DK=EK;const OK=e=>{let t=xK(yW(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t};var kK=OK;const AK=e=>wW(DK(e));var jK=AK;const MK={mode:`jab`,channels:[`j`,`a`,`b`,`alpha`],parse:[`--jzazbz`],serialize:`--jzazbz`,fromMode:{rgb:kK,xyz65:xK},toMode:{rgb:jK,xyz65:DK},ranges:{j:[0,.222],a:[-.109,.129],b:[-.185,.134]},interpolate:{j:Q,a:Q,b:Q,alpha:{use:Q,fixup:oW}}};var NK=MK;const PK=({j:e,a:t,b:n,alpha:r})=>{t===void 0&&(t=0),n===void 0&&(n=0);let i=Math.sqrt(t*t+n*n),a={mode:`jch`,j:e,c:i};return i&&(a.h=OW(Math.atan2(n,t)*180/Math.PI)),r!==void 0&&(a.alpha=r),a};var FK=PK;const IK=({j:e,c:t,h:n,alpha:r})=>{n===void 0&&(n=0);let i={mode:`jab`,j:e,a:t?t*Math.cos(n/180*Math.PI):0,b:t?t*Math.sin(n/180*Math.PI):0};return r!==void 0&&(i.alpha=r),i};var LK=IK;const RK={mode:`jch`,parse:[`--jzczhz`],serialize:`--jzczhz`,toMode:{jab:LK,rgb:e=>jK(LK(e))},fromMode:{rgb:e=>FK(kK(e)),jab:FK},channels:[`j`,`c`,`h`,`alpha`],ranges:{j:[0,.221],c:[0,.19],h:[0,360]},interpolate:{h:{use:Q,fixup:AW},c:Q,j:Q,alpha:{use:Q,fixup:oW}},difference:{h:UW},average:{h:WW}};var zK=RK;const BK=29**3/3**3,VK=6**3/29**3;let HK=e=>e**3>VK?e**3:(116*e-16)/BK;const UK=({l:e,a:t,b:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let i=(e+16)/116,a=t/500+i,o=i-n/200,s={mode:`xyz50`,x:HK(a)*$W.X,y:HK(i)*$W.Y,z:HK(o)*$W.Z};return r!==void 0&&(s.alpha=r),s};var WK=UK;const GK=({x:e,y:t,z:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let i=SW({r:e*3.1341359569958707-t*1.6173863321612538-.4906619460083532*n,g:e*-.978795502912089+t*1.916254567259524+.03344273116131949*n,b:e*.07195537988411677-t*.2289768264158322+1.405386058324125*n});return r!==void 0&&(i.alpha=r),i};var KK=GK;const qK=e=>KK(WK(e));var JK=qK;const YK=e=>{let{r:t,g:n,b:r,alpha:i}=_W(e),a={mode:`xyz50`,x:.436065742824811*t+.3851514688337912*n+.14307845442264197*r,y:.22249319175623702*t+.7168870538238823*n+.06061979053616537*r,z:.013923904500943465*t+.09708128566574634*n+.7140993584005155*r};return i!==void 0&&(a.alpha=i),a};var XK=YK;const ZK=e=>e>VK?Math.cbrt(e):(BK*e+16)/116,QK=({x:e,y:t,z:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let i=ZK(e/$W.X),a=ZK(t/$W.Y),o=ZK(n/$W.Z),s={mode:`lab`,l:116*a-16,a:500*(i-a),b:200*(a-o)};return r!==void 0&&(s.alpha=r),s};var $K=QK;const eq=e=>{let t=$K(XK(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t};var tq=eq;function nq(e,t){if(!t||t[0]!==`lab`)return;let n={mode:`lab`},[,r,i,a,o]=t;if(!(r.type===X.Hue||i.type===X.Hue||a.type===X.Hue))return r.type!==X.None&&(n.l=Math.min(Math.max(0,r.value),100)),i.type!==X.None&&(n.a=i.type===X.Number?i.value:i.value*125/100),a.type!==X.None&&(n.b=a.type===X.Number?a.value:a.value*125/100),o.type!==X.None&&(n.alpha=Math.min(1,Math.max(0,o.type===X.Number?o.value:o.value/100))),n}var rq=nq;const iq={mode:`lab`,toMode:{xyz50:WK,rgb:JK},fromMode:{xyz50:$K,rgb:tq},channels:[`l`,`a`,`b`,`alpha`],ranges:{l:[0,100],a:[-100,100],b:[-100,100]},parse:[rq],serialize:e=>`lab(${e.l===void 0?`none`:e.l} ${e.a===void 0?`none`:e.a} ${e.b===void 0?`none`:e.b}${e.alpha<1?` / ${e.alpha}`:``})`,interpolate:{l:Q,a:Q,b:Q,alpha:{use:Q,fixup:oW}}};var aq=iq;const oq={...aq,mode:`lab65`,parse:[`--lab-d65`],serialize:`--lab-d65`,toMode:{xyz65:aG,rgb:sG},fromMode:{xyz65:uG,rgb:fG},ranges:{l:[0,100],a:[-86.182,98.234],b:[-107.86,94.477]}};var sq=oq;function cq(e,t){if(!t||t[0]!==`lch`)return;let n={mode:`lch`},[,r,i,a,o]=t;if(r.type!==X.None){if(r.type===X.Hue)return;n.l=Math.min(Math.max(0,r.value),100)}if(i.type!==X.None&&(n.c=Math.max(0,i.type===X.Number?i.value:i.value*150/100)),a.type!==X.None){if(a.type===X.Percentage)return;n.h=a.value}return o.type!==X.None&&(n.alpha=Math.min(1,Math.max(0,o.type===X.Number?o.value:o.value/100))),n}var lq=cq;const uq={mode:`lch`,toMode:{lab:XW,rgb:e=>JK(XW(e))},fromMode:{rgb:e=>JW(tq(e)),lab:JW},channels:[`l`,`c`,`h`,`alpha`],ranges:{l:[0,100],c:[0,150],h:[0,360]},parse:[lq],serialize:e=>`lch(${e.l===void 0?`none`:e.l} ${e.c===void 0?`none`:e.c} ${e.h===void 0?`none`:e.h}${e.alpha<1?` / ${e.alpha}`:``})`,interpolate:{h:{use:Q,fixup:AW},c:Q,l:Q,alpha:{use:Q,fixup:oW}},difference:{h:UW},average:{h:WW}};var dq=uq;const fq={...dq,mode:`lch65`,parse:[`--lch-d65`],serialize:`--lch-d65`,toMode:{lab65:e=>XW(e,`lab65`),rgb:e=>sG(XW(e,`lab65`))},fromMode:{rgb:e=>JW(fG(e),`lch65`),lab65:e=>JW(e,`lch65`)},ranges:{l:[0,100],c:[0,133.807],h:[0,360]}};var pq=fq;const mq=({l:e,u:t,v:n,alpha:r})=>{t===void 0&&(t=0),n===void 0&&(n=0);let i=Math.sqrt(t*t+n*n),a={mode:`lchuv`,l:e,c:i};return i&&(a.h=OW(Math.atan2(n,t)*180/Math.PI)),r!==void 0&&(a.alpha=r),a};var hq=mq;const gq=({l:e,c:t,h:n,alpha:r})=>{n===void 0&&(n=0);let i={mode:`luv`,l:e,u:t?t*Math.cos(n/180*Math.PI):0,v:t?t*Math.sin(n/180*Math.PI):0};return r!==void 0&&(i.alpha=r),i};var _q=gq;const vq=(e,t,n)=>4*e/(e+15*t+3*n),yq=(e,t,n)=>9*t/(e+15*t+3*n),bq=vq($W.X,$W.Y,$W.Z),xq=yq($W.X,$W.Y,$W.Z),Sq=e=>e<=VK?BK*e:116*Math.cbrt(e)-16,Cq=({x:e,y:t,z:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let i=Sq(t/$W.Y),a=vq(e,t,n),o=yq(e,t,n);!isFinite(a)||!isFinite(o)?i=a=o=0:(a=13*i*(a-bq),o=13*i*(o-xq));let s={mode:`luv`,l:i,u:a,v:o};return r!==void 0&&(s.alpha=r),s};var wq=Cq;const Tq=(e,t,n)=>4*e/(e+15*t+3*n),Eq=(e,t,n)=>9*t/(e+15*t+3*n),Dq=Tq($W.X,$W.Y,$W.Z),Oq=Eq($W.X,$W.Y,$W.Z),kq=({l:e,u:t,v:n,alpha:r})=>{if(e===void 0&&(e=0),e===0)return{mode:`xyz50`,x:0,y:0,z:0};t===void 0&&(t=0),n===void 0&&(n=0);let i=t/(13*e)+Dq,a=n/(13*e)+Oq,o=$W.Y*(e<=8?e/BK:((e+16)/116)**3),s=o*(9*i)/(4*a),c=o*(12-3*i-20*a)/(4*a),l={mode:`xyz50`,x:s,y:o,z:c};return r!==void 0&&(l.alpha=r),l};var Aq=kq;const jq=e=>hq(wq(XK(e))),Mq=e=>KK(Aq(_q(e))),Nq={mode:`lchuv`,toMode:{luv:_q,rgb:Mq},fromMode:{rgb:jq,luv:hq},channels:[`l`,`c`,`h`,`alpha`],parse:[`--lchuv`],serialize:`--lchuv`,ranges:{l:[0,100],c:[0,176.956],h:[0,360]},interpolate:{h:{use:Q,fixup:AW},c:Q,l:Q,alpha:{use:Q,fixup:oW}},difference:{h:UW},average:{h:WW}};var Pq=Nq;const Fq={...cW,mode:`lrgb`,toMode:{rgb:SW},fromMode:{rgb:_W},parse:[`srgb-linear`],serialize:`srgb-linear`};var Iq=Fq;const Lq={mode:`luv`,toMode:{xyz50:Aq,rgb:e=>KK(Aq(e))},fromMode:{xyz50:wq,rgb:e=>wq(XK(e))},channels:[`l`,`u`,`v`,`alpha`],parse:[`--luv`],serialize:`--luv`,ranges:{l:[0,100],u:[-84.936,175.042],v:[-125.882,87.243]},interpolate:{l:Q,u:Q,v:Q,alpha:{use:Q,fixup:oW}}};var Rq=Lq;const zq=({r:e,g:t,b:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let i=Math.cbrt(.41222147079999993*e+.5363325363*t+.0514459929*n),a=Math.cbrt(.2119034981999999*e+.6806995450999999*t+.1073969566*n),o=Math.cbrt(.08830246189999998*e+.2817188376*t+.6299787005000002*n),s={mode:`oklab`,l:.2104542553*i+.793617785*a-.0040720468*o,a:1.9779984951*i-2.428592205*a+.4505937099*o,b:.0259040371*i+.7827717662*a-.808675766*o};return r!==void 0&&(s.alpha=r),s};var Bq=zq;const Vq=e=>{let t=Bq(_W(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t};var Hq=Vq;const Uq=({l:e,a:t,b:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let i=(e*.9999999984505198+.39633779217376786*t+.2158037580607588*n)**3,a=(e*1.0000000088817609-.10556134232365635*t-.06385417477170591*n)**3,o=(e*1.0000000546724108-.08948418209496575*t-1.2914855378640917*n)**3,s={mode:`lrgb`,r:4.076741661347994*i-3.307711590408193*a+.230969928729428*o,g:-1.2684380040921763*i+2.6097574006633715*a-.3413193963102197*o,b:-.004196086541837188*i-.7034186144594493*a+1.7076147009309444*o};return r!==void 0&&(s.alpha=r),s};var Wq=Uq;const Gq=e=>SW(Wq(e));var Kq=Gq;function qq(e){let t=.206,n=.03,r=(1+t)/(1+n);return .5*(r*e-t+Math.sqrt((r*e-t)*(r*e-t)+4*n*r*e))}function Jq(e){let t=.206,n=.03,r=(1+t)/(1+n);return(e*e+t*e)/(r*(e+n))}function Yq(e,t){let n,r,i,a,o,s,c,l;-1.88170328*e-.80936493*t>1?(n=1.19086277,r=1.76576728,i=.59662641,a=.75515197,o=.56771245,s=4.0767416621,c=-3.3077115913,l=.2309699292):1.81444104*e-1.19445276*t>1?(n=.73956515,r=-.45954404,i=.08285427,a=.1254107,o=.14503204,s=-1.2684380046,c=2.6097574011,l=-.3413193965):(n=1.35733652,r=-.00915799,i=-1.1513021,a=-.50559606,o=.00692167,s=-.0041960863,c=-.7034186147,l=1.707614701);let u=n+r*e+i*t+a*e*e+o*e*t,d=.3963377774*e+.2158037573*t,f=-.1055613458*e-.0638541728*t,p=-.0894841775*e-1.291485548*t;{let e=1+u*d,t=1+u*f,n=1+u*p,r=e*e*e,i=t*t*t,a=n*n*n,o=3*d*e*e,m=3*f*t*t,h=3*p*n*n,g=6*d*d*e,_=6*f*f*t,v=6*p*p*n,y=s*r+c*i+l*a,b=s*o+c*m+l*h,x=s*g+c*_+l*v;u-=y*b/(b*b-.5*y*x)}return u}function Xq(e,t){let n=Yq(e,t),r=Wq({l:1,a:n*e,b:n*t}),i=Math.cbrt(1/Math.max(r.r,r.g,r.b)),a=i*n;return[i,a]}function Zq(e,t,n,r,i,a=null){a||=Xq(e,t);let o;if((n-i)*a[1]-(a[0]-i)*r<=0)o=a[1]*i/(r*a[0]+a[1]*(i-n));else{o=a[1]*(i-1)/(r*(a[0]-1)+a[1]*(i-n));{let a=n-i,s=r,c=.3963377774*e+.2158037573*t,l=-.1055613458*e-.0638541728*t,u=-.0894841775*e-1.291485548*t,d=a+s*c,f=a+s*l,p=a+s*u;{let e=i*(1-o)+o*n,t=o*r,a=e+t*c,s=e+t*l,m=e+t*u,h=a*a*a,g=s*s*s,_=m*m*m,v=3*d*a*a,y=3*f*s*s,b=3*p*m*m,x=6*d*d*a,S=6*f*f*s,C=6*p*p*m,w=4.0767416621*h-3.3077115913*g+.2309699292*_-1,T=4.0767416621*v-3.3077115913*y+.2309699292*b,E=4.0767416621*x-3.3077115913*S+.2309699292*C,D=T/(T*T-.5*w*E),O=-w*D,k=-1.2684380046*h+2.6097574011*g-.3413193965*_-1,A=-1.2684380046*v+2.6097574011*y-.3413193965*b,j=-1.2684380046*x+2.6097574011*S-.3413193965*C,M=A/(A*A-.5*k*j),N=-k*M,ee=-.0041960863*h-.7034186147*g+1.707614701*_-1,te=-.0041960863*v-.7034186147*y+1.707614701*b,P=-.0041960863*x-.7034186147*S+1.707614701*C,ne=te/(te*te-.5*ee*P),re=-ee*ne;O=D>=0?O:1e6,N=M>=0?N:1e6,re=ne>=0?re:1e6,o+=Math.min(O,Math.min(N,re))}}}return o}function Qq(e,t,n=null){n||=Xq(e,t);let r=n[0],i=n[1];return[i/r,i/(1-r)]}function $q(e,t,n){let r=Xq(t,n),i=Zq(t,n,e,1,e,r),a=Qq(t,n,r),o=.11516993+1/(7.4477897+4.1590124*n+t*(-2.19557347+1.75198401*n+t*(-2.13704948-10.02301043*n+t*(-4.24894561+5.38770819*n+4.69891013*t)))),s=.11239642+1/(1.6132032-.68124379*n+t*(.40370612+.90148123*n+t*(-.27087943+.6122399*n+t*(.00299215-.45399568*n-.14661872*t)))),c=i/Math.min(e*a[0],(1-e)*a[1]),l=e*o,u=(1-e)*s,d=.9*c*Math.sqrt(Math.sqrt(1/(1/(l*l*l*l)+1/(u*u*u*u))));l=e*.4,u=(1-e)*.8;let f=Math.sqrt(1/(1/(l*l)+1/(u*u)));return[f,d,i]}function eJ(e){let t=e.l===void 0?0:e.l,n=e.a===void 0?0:e.a,r=e.b===void 0?0:e.b,i={mode:`okhsl`,l:qq(t)};e.alpha!==void 0&&(i.alpha=e.alpha);let a=Math.sqrt(n*n+r*r);if(!a)return i.s=0,i;let[o,s,c]=$q(t,n/a,r/a),l;if(aeJ(Hq(e))},toMode:{oklab:tJ,rgb:e=>Kq(tJ(e))}};var rJ=nJ;function iJ(e){let t=e.l===void 0?0:e.l,n=e.a===void 0?0:e.a,r=e.b===void 0?0:e.b,i=Math.sqrt(n*n+r*r),a=i?n/i:1,o=i?r/i:1,[s,c]=Qq(a,o),l=.5,u=1-l/s,d=c/(i+t*c),f=d*t,p=d*i,m=Jq(f),h=p*m/f,g=Wq({l:m,a:a*h,b:o*h}),_=Math.cbrt(1/Math.max(g.r,g.g,g.b,0));t/=_,i=i/_*qq(t)/t,t=qq(t);let v={mode:`okhsv`,s:i?(l+c)*p/(c*l+c*u*p):0,v:t?t/f:0};return v.s&&(v.h=OW(Math.atan2(r,n)*180/Math.PI)),e.alpha!==void 0&&(v.alpha=e.alpha),v}function aJ(e){let t={mode:`oklab`};e.alpha!==void 0&&(t.alpha=e.alpha);let n=e.h===void 0?0:e.h,r=e.s===void 0?0:e.s,i=e.v===void 0?0:e.v,a=Math.cos(n/180*Math.PI),o=Math.sin(n/180*Math.PI),[s,c]=Qq(a,o),l=.5,u=1-l/s,d=1-r*l/(l+c-c*u*r),f=r*c*l/(l+c-c*u*r),p=Jq(d),m=f*p/d,h=Wq({l:p,a:a*m,b:o*m}),g=Math.cbrt(1/Math.max(h.r,h.g,h.b,0)),_=Jq(i*d),v=f*_/d;return t.l=_*g,t.a=v*a*g,t.b=v*o*g,t}const oJ={...qG,mode:`okhsv`,channels:[`h`,`s`,`v`,`alpha`],parse:[`--okhsv`],serialize:`--okhsv`,fromMode:{oklab:iJ,rgb:e=>iJ(Hq(e))},toMode:{oklab:aJ,rgb:e=>Kq(aJ(e))}};var sJ=oJ;function cJ(e,t){if(!t||t[0]!==`oklab`)return;let n={mode:`oklab`},[,r,i,a,o]=t;if(!(r.type===X.Hue||i.type===X.Hue||a.type===X.Hue))return r.type!==X.None&&(n.l=Math.min(Math.max(0,r.type===X.Number?r.value:r.value/100),1)),i.type!==X.None&&(n.a=i.type===X.Number?i.value:i.value*.4/100),a.type!==X.None&&(n.b=a.type===X.Number?a.value:a.value*.4/100),o.type!==X.None&&(n.alpha=Math.min(1,Math.max(0,o.type===X.Number?o.value:o.value/100))),n}var lJ=cJ;const uJ={...aq,mode:`oklab`,toMode:{lrgb:Wq,rgb:Kq},fromMode:{lrgb:Bq,rgb:Hq},ranges:{l:[0,1],a:[-.4,.4],b:[-.4,.4]},parse:[lJ],serialize:e=>`oklab(${e.l===void 0?`none`:e.l} ${e.a===void 0?`none`:e.a} ${e.b===void 0?`none`:e.b}${e.alpha<1?` / ${e.alpha}`:``})`};var dJ=uJ;function fJ(e,t){if(!t||t[0]!==`oklch`)return;let n={mode:`oklch`},[,r,i,a,o]=t;if(r.type!==X.None){if(r.type===X.Hue)return;n.l=Math.min(Math.max(0,r.type===X.Number?r.value:r.value/100),1)}if(i.type!==X.None&&(n.c=Math.max(0,i.type===X.Number?i.value:i.value*.4/100)),a.type!==X.None){if(a.type===X.Percentage)return;n.h=a.value}return o.type!==X.None&&(n.alpha=Math.min(1,Math.max(0,o.type===X.Number?o.value:o.value/100))),n}var pJ=fJ;const mJ={...dq,mode:`oklch`,toMode:{oklab:e=>XW(e,`oklab`),rgb:e=>Kq(XW(e,`oklab`))},fromMode:{rgb:e=>JW(Hq(e),`oklch`),oklab:e=>JW(e,`oklch`)},parse:[pJ],serialize:e=>`oklch(${e.l===void 0?`none`:e.l} ${e.c===void 0?`none`:e.c} ${e.h===void 0?`none`:e.h}${e.alpha<1?` / ${e.alpha}`:``})`,ranges:{l:[0,1],c:[0,.4],h:[0,360]}};var hJ=mJ;const gJ=e=>{let{r:t,g:n,b:r,alpha:i}=_W(e),a={mode:`xyz65`,x:.486570948648216*t+.265667693169093*n+.1982172852343625*r,y:.2289745640697487*t+.6917385218365062*n+.079286914093745*r,z:0*t+.0451133818589026*n+1.043944368900976*r};return i!==void 0&&(a.alpha=i),a};var _J=gJ;const vJ=({x:e,y:t,z:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let i=SW({r:e*2.4934969119414263-t*.9313836179191242-.402710784450717*n,g:e*-.8294889695615749+t*1.7626640603183465+.0236246858419436*n,b:e*.0358458302437845-t*.0761723892680418+.9568845240076871*n},`p3`);return r!==void 0&&(i.alpha=r),i};var yJ=vJ;const bJ={...cW,mode:`p3`,parse:[`display-p3`],serialize:`display-p3`,fromMode:{rgb:e=>yJ(yW(e)),xyz65:yJ},toMode:{rgb:e=>wW(_J(e)),xyz65:_J}};var xJ=bJ;const SJ=e=>{let t=Math.abs(e);return t>=1/512?Math.sign(e)*t**(1/1.8):16*e},CJ=({x:e,y:t,z:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let i={mode:`prophoto`,r:SJ(e*1.3457868816471585-t*.2555720873797946-.0511018649755453*n),g:SJ(e*-.5446307051249019+t*1.5082477428451466+.0205274474364214*n),b:SJ(e*0+t*0+1.2119675456389452*n)};return r!==void 0&&(i.alpha=r),i};var wJ=CJ;const TJ=(e=0)=>{let t=Math.abs(e);return t>=16/512?Math.sign(e)*t**1.8:e/16},EJ=e=>{let t=TJ(e.r),n=TJ(e.g),r=TJ(e.b),i={mode:`xyz50`,x:.7977666449006423*t+.1351812974005331*n+.0313477341283922*r,y:.2880748288194013*t+.7118352342418731*n+899369387256e-16*r,z:0*t+0*n+.8251046025104602*r};return e.alpha!==void 0&&(i.alpha=e.alpha),i};var DJ=EJ;const OJ={...cW,mode:`prophoto`,parse:[`prophoto-rgb`],serialize:`prophoto-rgb`,fromMode:{xyz50:wJ,rgb:e=>wJ(XK(e))},toMode:{xyz50:DJ,rgb:e=>KK(DJ(e))}};var kJ=OJ;const AJ=1.09929682680944,jJ=.018053968510807,MJ=e=>{let t=Math.abs(e);return t>jJ?(Math.sign(e)||1)*(AJ*t**.45-(AJ-1)):4.5*e},NJ=({x:e,y:t,z:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let i={mode:`rec2020`,r:MJ(e*1.7166511879712683-t*.3556707837763925-.2533662813736599*n),g:MJ(e*-.6666843518324893+t*1.6164812366349395+.0157685458139111*n),b:MJ(e*.0176398574453108-t*.0427706132578085+.9421031212354739*n)};return r!==void 0&&(i.alpha=r),i};var PJ=NJ;const FJ=1.09929682680944,IJ=.018053968510807,LJ=(e=0)=>{let t=Math.abs(e);return t{let t=LJ(e.r),n=LJ(e.g),r=LJ(e.b),i={mode:`xyz65`,x:.6369580483012911*t+.1446169035862083*n+.1688809751641721*r,y:.262700212011267*t+.6779980715188708*n+.059301716469862*r,z:0*t+.0280726930490874*n+1.0609850577107909*r};return e.alpha!==void 0&&(i.alpha=e.alpha),i};var zJ=RJ;const BJ={...cW,mode:`rec2020`,fromMode:{xyz65:PJ,rgb:e=>PJ(yW(e))},toMode:{xyz65:zJ,rgb:e=>wW(zJ(e))},parse:[`rec2020`],serialize:`rec2020`};var VJ=BJ;const HJ=.0037930732552754493,UJ=Math.cbrt(HJ),WJ=e=>Math.cbrt(e)-UJ,GJ=e=>{let{r:t,g:n,b:r,alpha:i}=_W(e),a=WJ(.3*t+.622*n+.078*r+HJ),o=WJ(.23*t+.692*n+.078*r+HJ),s=WJ(.2434226892454782*t+.2047674442449682*n+.5518098665095535*r+HJ),c={mode:`xyb`,x:(a-o)/2,y:(a+o)/2,b:s-(a+o)/2};return i!==void 0&&(c.alpha=i),c};var KJ=GJ;const qJ=e=>(e+UJ)**3,JJ=({x:e,y:t,b:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let i=qJ(e+t)-HJ,a=qJ(t-e)-HJ,o=qJ(n+t)-HJ,s=SW({r:11.031566904639861*i-9.866943908131562*a-.16462299650829934*o,g:-3.2541473810744237*i+4.418770377582723*a-.16462299650829934*o,b:-3.6588512867136815*i+2.7129230459360922*a+1.9459282407775895*o});return r!==void 0&&(s.alpha=r),s};var YJ=JJ;const XJ={mode:`xyb`,channels:[`x`,`y`,`b`,`alpha`],parse:[`--xyb`],serialize:`--xyb`,toMode:{rgb:YJ},fromMode:{rgb:KJ},ranges:{x:[-.0154,.0281],y:[0,.8453],b:[-.2778,.388]},interpolate:{x:Q,y:Q,b:Q,alpha:{use:Q,fixup:oW}}};var ZJ=XJ;const QJ={mode:`xyz50`,parse:[`xyz-d50`],serialize:`xyz-d50`,toMode:{rgb:KK,lab:$K},fromMode:{rgb:XK,lab:WK},channels:[`x`,`y`,`z`,`alpha`],ranges:{x:[0,.964],y:[0,.999],z:[0,.825]},interpolate:{x:Q,y:Q,z:Q,alpha:{use:Q,fixup:oW}}};var $J=QJ;const eY=e=>{let{x:t,y:n,z:r,alpha:i}=e;t===void 0&&(t=0),n===void 0&&(n=0),r===void 0&&(r=0);let a={mode:`xyz50`,x:1.0479298208405488*t+.0229467933410191*n-.0501922295431356*r,y:.0296278156881593*t+.990434484573249*n-.0170738250293851*r,z:-.0092430581525912*t+.0150551448965779*n+.7518742899580008*r};return i!==void 0&&(a.alpha=i),a};var tY=eY;const nY=e=>{let{x:t,y:n,z:r,alpha:i}=e;t===void 0&&(t=0),n===void 0&&(n=0),r===void 0&&(r=0);let a={mode:`xyz65`,x:.9554734527042182*t-.0230985368742614*n+.0632593086610217*r,y:-.0283697069632081*t+1.0099954580058226*n+.021041398966943*r,z:.0123140016883199*t-.0205076964334779*n+1.3303659366080753*r};return i!==void 0&&(a.alpha=i),a};var rY=nY;const iY={mode:`xyz65`,toMode:{rgb:wW,xyz50:tY},fromMode:{rgb:yW,xyz50:rY},ranges:{x:[0,.95],y:[0,1],z:[0,1.088]},channels:[`x`,`y`,`z`,`alpha`],parse:[`xyz`,`xyz-d65`],serialize:`xyz-d65`,interpolate:{x:Q,y:Q,z:Q,alpha:{use:Q,fixup:oW}}};var aY=iY;const oY=({r:e,g:t,b:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let i={mode:`yiq`,y:.29889531*e+.58662247*t+.11448223*n,i:.59597799*e-.2741761*t-.32180189*n,q:.21147017*e-.52261711*t+.31114694*n};return r!==void 0&&(i.alpha=r),i};var sY=oY;const cY=({y:e,i:t,q:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let i={mode:`rgb`,r:e+.95608445*t+.6208885*n,g:e-.27137664*t-.6486059*n,b:e-1.10561724*t+1.70250126*n};return r!==void 0&&(i.alpha=r),i};var lY=cY;const uY={mode:`yiq`,toMode:{rgb:lY},fromMode:{rgb:sY},channels:[`y`,`i`,`q`,`alpha`],parse:[`--yiq`],serialize:`--yiq`,ranges:{i:[-.595,.595],q:[-.522,.522]},interpolate:{y:Q,i:Q,q:Q,alpha:{use:Q,fixup:oW}}};var dY=uY;const fY=(e,t)=>Math.round(e*(t=10**t))/t,pY=(e=4)=>t=>typeof t==`number`?fY(t,e):t;var mY=pY;let hY=mY(2);const gY=e=>Math.max(0,Math.min(1,e||0)),_Y=e=>Math.round(gY(e)*255),vY=kU(`rgb`),yY=kU(`hsl`),bY=e=>{if(e===void 0)return;let t=_Y(e.r),n=_Y(e.g),r=_Y(e.b);return`#`+(1<<24|t<<16|n<<8|r).toString(16).slice(1)},xY=e=>bY(vY(e)),SY=FU(EW),CY=FU(KW),wY=FU(EG),TY=FU(OG),EY=FU(MG),DY=FU(UG),OY=FU(qG),kY=FU($G),AY=FU(hK),jY=FU(NK),MY=FU(zK),NY=FU(aq),PY=FU(sq),FY=FU(dq),IY=FU(pq),LY=FU(Pq),RY=FU(Iq),zY=FU(Rq),BY=FU(rJ),VY=FU(sJ),HY=FU(dJ),UY=FU(hJ),WY=FU(xJ),GY=FU(kJ),KY=FU(VJ),qY=FU(cW),JY=FU(ZJ),YY=FU($J),XY=FU(aY),ZY=FU(dY),QY=220.44,$Y=kU(`oklch`),eX=e=>{var t;return e?(t=$Y(e))?.h:QY},tX=KB(`settings`,()=>{let e=R(),t=sF(`settings/language`,`en-US`),n=sF(`settings/stage/view/model-renderer`,`2d`),r=sF(`settings/audio/input`,`false`),i=H(()=>{var t;return(t=e.value)?.deviceId}),{audioInputs:a,ensurePermissions:o}=QP({constraints:{audio:!0}}),s=R(),c=R(`/assets/live2d/models/hiyori_pro_zh.zip`),l=R(`url`),u=R(!1),d=sF(`settings/live2d/position`,{x:0,y:0}),f=R({group:`Idle`,index:0}),p=R([]),m=sF(`settings/live2d/motion-map`,{}),h=sF(`settings/disable-transitions`,!0),g=sF(`settings/use-page-specific-transitions`,!0),_=sF(`settings/theme/colors/hue`,QY),v=sF(`settings/theme/colors/hue-dynamic`,!1),y=sF(`settings/allow-visible-on-all-workspaces`,!0);function b(e=QY){_.value=e,v.value=!1}function x(e){b(eX(e))}function S(e){if(v.value)return!1;let t=eX(e);if(!t)return!1;let n=Math.abs(t-_.value);return n<.01||n>359.99}return V(r,t=>{t===`false`&&(e.value=void 0),t===`true`&&o().then(()=>{e.value=a.value[0]})}),V(a,()=>{r.value===`true`&&!e.value&&(e.value=a.value[0])},{immediate:!0}),{live2dModelFile:s,live2dModelUrl:c,live2dLoadSource:l,live2dCurrentMotion:f,live2dPosition:d,availableLive2dMotions:p,live2dMotionMap:m,loadingLive2dModel:u,disableTransitions:h,usePageSpecificTransitions:g,language:t,stageView:n,themeColorsHue:_,themeColorsHueDynamic:v,isAudioInputOn:r,selectedAudioDevice:e,selectedAudioDeviceId:i,allowVisibleOnAllWorkspaces:y,setThemeColorsHue:b,applyPrimaryColorFrom:x,isColorSelectedForPrimary:S}});var nX=Rr({__name:`ArrowTransition`,props:{stageTransition:{default:()=>({primaryColor:`#666`,secondaryColor:`#ccc`})}},setup(e){let t=e,n=H(()=>t.stageTransition),r=H(()=>n.value.primaryColor||`#666`),i=H(()=>n.value.secondaryColor||`#ccc`);return $r(()=>{document.documentElement.style.setProperty(`--stage-transition-3-overlay-color-1`,r.value),document.documentElement.style.setProperty(`--stage-transition-3-overlay-color-2`,i.value)}),(e,t)=>(to(),oo(`div`,{class:`stage-transition-3`,style:L({zIndex:n.value.zIndex||100})},null,4))}}),rX=(e,t)=>{let n=e.__vccOpts||e;for(let[e,r]of t)n[e]=r;return n},iX=rX(nX,[[`__scopeId`,`data-v-df576df0`]]),aX=Rr({__name:`BubbleWaveOutTransition`,props:{stageTransition:null},setup(e){let t=e,n=H(()=>{var e;return(e=t.stageTransition)?.colors||[`#eee`,`#ebcb8b`,`#c56370`,`#3f3b52`]});return $r(()=>{var e,r;document.documentElement.style.setProperty(`--circle-expansion-delay`,`${(e=t.stageTransition)?.delay||0}s`),document.documentElement.style.setProperty(`--circle-expansion-duration`,`${(r=t.stageTransition)?.duration||.4}s`),n.value.forEach((e,t)=>{document.documentElement.style.setProperty(`--circle-expansion-color-${t+1}`,e)})}),(t,r)=>{var i;return to(),oo(`div`,{class:`circle-expansion-transition`,style:L({zIndex:(i=e.stageTransition)?.zIndex||100})},[(to(!0),oo(Ya,null,gi(n.value,(e,t)=>(to(),oo(`div`,{key:t}))),128))],4)}}}),oX=rX(aX,[[`__scopeId`,`data-v-0c29056c`]]),sX=Rr({__name:`FantasyFallTransition`,props:{stageTransition:null},setup(e){let t=e,n=H(()=>{var e;return(e=t.stageTransition)?.direction||`up`}),r=H(()=>`fantasy-fall-${n.value}`);return $r(()=>{var e,n,r,i,a,o;document.documentElement.style.setProperty(`--fantasy-fall-color`,(e=t.stageTransition)?.primaryColor||`#eee`),document.documentElement.style.setProperty(`--fantasy-fall-duration`,`${(n=t.stageTransition)?.duration||.6}s`),document.documentElement.style.setProperty(`--fantasy-fall-delay`,`${(r=t.stageTransition)?.delay||0}s`),document.documentElement.style.setProperty(`--fantasy-fall-radius-sm`,`${((i=t.stageTransition)==null||(i=i.borderRadius)==null?void 0:i.sm)||`14rem`}`),document.documentElement.style.setProperty(`--fantasy-fall-radius-md`,`${((a=t.stageTransition)==null||(a=a.borderRadius)==null?void 0:a.md)||`14rem`}`),document.documentElement.style.setProperty(`--fantasy-fall-radius-lg`,`${((o=t.stageTransition)==null||(o=o.borderRadius)==null?void 0:o.lg)||`50%`}`)}),(t,n)=>{var i;return to(),oo(`div`,{class:Se([`fantasy-fall-transition`,r.value]),style:L({zIndex:(i=e.stageTransition)?.zIndex??100})},null,6)}}}),cX=rX(sX,[[`__scopeId`,`data-v-e62bf496`]]),lX=Rr({__name:`MultipleBlocksRevealTransition`,props:{stageTransition:null},setup(e){let t=e,n=H(()=>t.stageTransition),r=H(()=>{var e;return(e=n.value)?.primaryColor||`#666`}),i=H(()=>{var e;return(e=n.value)?.secondaryColor||`#ccc`});return $r(()=>{document.documentElement.style.setProperty(`--stage-transition-4-overlay-color-1`,r.value),document.documentElement.style.setProperty(`--stage-transition-4-overlay-color-2`,i.value)}),(e,t)=>{var r;return to(),oo(`div`,{class:`stage-transition-4`,style:L({zIndex:(r=n.value)?.zIndex??100})},t[0]||=[yo(`
`,5)],4)}}}),uX=rX(lX,[[`__scopeId`,`data-v-6d1179fc`]]),dX=Rr({__name:`SlideTransition`,props:{stageTransition:null},setup(e){let t=e,n=H(()=>t.stageTransition),r=H(()=>{var e;return(e=n.value)?.primaryColor||`#666`}),i=H(()=>{var e;return(e=n.value)?.secondaryColor||`#ccc`});return V([n,r,i],()=>{document.documentElement.style.setProperty(`--stage-transition-1-overlay-color-1`,r.value),document.documentElement.style.setProperty(`--stage-transition-1-overlay-color-2`,i.value)}),$r(()=>{document.documentElement.style.setProperty(`--stage-transition-1-overlay-color-1`,r.value),document.documentElement.style.setProperty(`--stage-transition-1-overlay-color-2`,i.value)}),(e,t)=>{var r;return to(),oo(`div`,{class:`stage-transition-1`,style:L({zIndex:(r=n.value)?.zIndex??100})},null,4)}}}),fX=rX(dX,[[`__scopeId`,`data-v-bf1d1566`]]),pX=Rr({__name:`SlopeSlideTransition`,props:{stageTransition:null},setup(e){let t=e,n=H(()=>t.stageTransition),r=H(()=>{var e;return(e=n.value)?.primaryColor??`#666`}),i=H(()=>{var e;return(e=n.value)?.secondaryColor??`#ccc`});return $r(()=>{document.documentElement.style.setProperty(`--stage-transition-2-overlay-color-1`,r.value),document.documentElement.style.setProperty(`--stage-transition-2-overlay-color-2`,i.value)}),(e,t)=>{var r;return to(),oo(`div`,{class:`stage-transition-2`,style:L({zIndex:(r=n.value)?.zIndex??100})},null,4)}}}),mX=rX(pX,[[`__scopeId`,`data-v-8ff7120f`]]),hX=Rr({__name:`RectanglesRotateTransition`,props:{stageTransition:null},setup(e){let t=e;return $r(()=>{var e,n,r,i,a,o,s;document.documentElement.style.setProperty(`--rectangle-rotate-1-color`,(e=t.stageTransition)?.primaryColor||`#ebcb8b`),document.documentElement.style.setProperty(`--rectangle-rotate-2-color`,(n=t.stageTransition)?.secondaryColor||`#c56370`),document.documentElement.style.setProperty(`--rectangle-rotate-3-color`,(r=t.stageTransition)?.tertiaryColor||`#43445b`),document.documentElement.style.setProperty(`--rectangle-rotate-duration`,`${(i=t.stageTransition)?.duration||.6}s`),document.documentElement.style.setProperty(`--rectangle-rotate-delay`,`${(a=t.stageTransition)?.delay||0}s`),document.documentElement.style.setProperty(`--rectangle-rotate-stagger`,`${(o=t.stageTransition)?.staggerDelay||.1}s`),document.documentElement.style.setProperty(`--rectangle-rotate-rotation`,`${(s=t.stageTransition)?.rotation||270}deg`)}),(t,n)=>{var r;return to(),oo(`div`,{class:`rectangle-rotate-transition`,style:L({zIndex:(r=e.stageTransition)?.zIndex??100})},n[0]||=[po(`div`,{class:`rectangle rectangle-rotate-1`},[po(`div`)],-1),po(`div`,{class:`rectangle rectangle-rotate-2`},[po(`div`)],-1),po(`div`,{class:`rectangle rectangle-rotate-3`},[po(`div`)],-1)],4)}}}),gX=rX(hX,[[`__scopeId`,`data-v-f4b1dc64`]]),_X=Rr({__name:`StageTransitionGroup`,props:{primaryColor:null,secondaryColor:null,tertiaryColor:null,colors:null,zIndex:null,disableTransitions:{type:Boolean},usePageSpecificTransitions:{type:Boolean}},setup(e){let t=e,n=eU(),r=R(!1),i=R(),a=R(``),o=R(),s=z({slide:{component:fX,duration:2700},"slope-slide":{component:mX,duration:2700},arrow:{component:iX,duration:2700},"multiple-blocks-reveal":{component:uX,duration:2800},"fantasy-fall":{component:cX,duration:2700},"rectangles-rotate":{component:gX,duration:2700},"bubble-wave-out":{component:oX,duration:1e3}}),c=R([]);function l(e){return c.value.push(e),()=>{let t=c.value.indexOf(e);t>=0&&c.value.splice(t,1)}}async function u(e,t={}){i.value=e;for(let n of c.value)try{await Promise.resolve(n(e,t))}catch(t){console.error(`Error in transition hook at stage "${e}":`,t)}}async function d(e,t,n){if(e.name===`none`||!e.name){t(),n();return}let i=s.value[e.name];if(!i){console.error(`Transition ${e.name} not found`),t(),n();return}let c=i.nextDelay===void 0?i.duration/3:i.nextDelay,d=!1,f=e=>{e===`navigation`&&!d&&(d=!0,t())},p=l(f);try{await u(`before-enter`,{transitionName:e.name}),r.value&&(await u(`before-leave`,{transitionName:a.value}),a.value=``,o.value=void 0,r.value=!1,await u(`after-leave`,{transitionName:a.value}),await new Promise(e=>setTimeout(e,50))),a.value=e.name,o.value=e,r.value=!0,await u(`enter-active`,{transitionName:name}),setTimeout(async()=>{await u(`navigation`,{transitionName:e.name,config:i}),d||(d=!0,t())},c),setTimeout(async()=>{await u(`after-enter`,{transitionName:e.name})},i.duration),setTimeout(async()=>{await u(`before-leave`,{transitionName:e.name})},i.duration+10),setTimeout(async()=>{await u(`leave-active`,{transitionName:e.name})},i.duration+20);let s=i.exitDuration??0;setTimeout(async()=>{r.value=!1,a.value=``,o.value=void 0,await u(`after-leave`,{transitionName:e.name}),n()},i.duration+s)}catch(e){console.error(e)}finally{p(),setTimeout(()=>{d||(d=!0,t())},i.duration*2)}}function f(e,t){return new Promise(n=>{d(e,t,n)})}return n.beforeEach((e,n,r)=>{if(t.disableTransitions){r();return}if(typeof e.meta.stageTransition!=`object`){r();return}let i=e.meta.stageTransition;if(t.usePageSpecificTransitions&&i.pageSpecificAvailable){r();return}t.primaryColor!==void 0&&(i.primaryColor=t.primaryColor),t.secondaryColor!==void 0&&(i.secondaryColor=t.secondaryColor),t.tertiaryColor!==void 0&&(i.tertiaryColor=t.tertiaryColor),t.colors!==void 0&&(i.colors=t.colors),t.zIndex!==void 0&&(i.zIndex=t.zIndex),f(i,r)}),(e,t)=>(to(),oo(Ya,null,[_i(e.$slots,`default`),r.value?(to(),oo(Ya,{key:0},[s.value[a.value]?(to(),so(fi(s.value[a.value].component),{key:0,"stage-transition":o.value},null,8,[`stage-transition`])):bo(``,!0)],64)):bo(``,!0)],64))}}),vX=_X; /*! * shared v11.1.7 * (c) 2025 kazuya kawaguchi @@ -3840,7 +3846,7 @@ function KB(e,t,n){let r,i=typeof t==`function`;r=i?n:t;function a(n,a){let o=Qi const yX=typeof window<`u`,bX=(e,t=!1)=>t?Symbol.for(e):Symbol(e),xX=(e,t,n)=>SX({l:e,k:t,s:n}),SX=e=>JSON.stringify(e).replace(/\u2028/g,`\\u2028`).replace(/\u2029/g,`\\u2029`).replace(/\u0027/g,`\\u0027`),CX=e=>typeof e==`number`&&isFinite(e),wX=e=>VX(e)===`[object Date]`,TX=e=>VX(e)===`[object RegExp]`,EX=e=>HX(e)&&Object.keys(e).length===0,DX=Object.assign,OX=Object.create,kX=(e=null)=>OX(e);let AX;const jX=()=>AX||=typeof globalThis<`u`?globalThis:typeof self<`u`?self:typeof window<`u`?window:typeof global<`u`?global:kX();function MX(e){return e.replace(//g,`>`).replace(/"/g,`"`).replace(/'/g,`'`)}const NX=Object.prototype.hasOwnProperty;function PX(e,t){return NX.call(e,t)}const FX=Array.isArray,IX=e=>typeof e==`function`,$=e=>typeof e==`string`,LX=e=>typeof e==`boolean`,RX=e=>typeof e==`object`&&!!e,zX=e=>RX(e)&&IX(e.then)&&IX(e.catch),BX=Object.prototype.toString,VX=e=>BX.call(e),HX=e=>VX(e)===`[object Object]`,UX=e=>e==null?``:FX(e)||HX(e)&&e.toString===BX?JSON.stringify(e,null,2):String(e);function WX(e,t=``){return e.reduce((e,n,r)=>r===0?e+n:e+t+n,``)}function GX(e,t){typeof console<`u`&&(console.warn(`[intlify] `+e),t&&console.warn(t.stack))}const KX=e=>!RX(e)||FX(e);function qX(e,t){if(KX(e)||KX(t))throw Error(`Invalid value`);let n=[{src:e,des:t}];for(;n.length;){let{src:e,des:t}=n.pop();Object.keys(e).forEach(r=>{r!==`__proto__`&&(RX(e[r])&&!RX(t[r])&&(t[r]=Array.isArray(e[r])?[]:kX()),KX(t[r])||KX(e[r])?t[r]=e[r]:n.push({src:e[r],des:t[r]}))})}}function JX(e,t,n){return{line:e,column:t,offset:n}}function YX(e,t,n){let r={start:e,end:t};return n!=null&&(r.source=n),r}const XX={EXPECTED_TOKEN:1,INVALID_TOKEN_IN_PLACEHOLDER:2,UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER:3,UNKNOWN_ESCAPE_SEQUENCE:4,INVALID_UNICODE_ESCAPE_SEQUENCE:5,UNBALANCED_CLOSING_BRACE:6,UNTERMINATED_CLOSING_BRACE:7,EMPTY_PLACEHOLDER:8,NOT_ALLOW_NEST_PLACEHOLDER:9,INVALID_LINKED_FORMAT:10,MUST_HAVE_MESSAGES_IN_PLURAL:11,UNEXPECTED_EMPTY_LINKED_MODIFIER:12,UNEXPECTED_EMPTY_LINKED_KEY:13,UNEXPECTED_LEXICAL_ANALYSIS:14,UNHANDLED_CODEGEN_NODE_TYPE:15,UNHANDLED_MINIFIER_NODE_TYPE:16},ZX=17,QX={[XX.EXPECTED_TOKEN]:`Expected token: '{0}'`,[XX.INVALID_TOKEN_IN_PLACEHOLDER]:`Invalid token in placeholder: '{0}'`,[XX.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER]:`Unterminated single quote in placeholder`,[XX.UNKNOWN_ESCAPE_SEQUENCE]:`Unknown escape sequence: \\{0}`,[XX.INVALID_UNICODE_ESCAPE_SEQUENCE]:`Invalid unicode escape sequence: {0}`,[XX.UNBALANCED_CLOSING_BRACE]:`Unbalanced closing brace`,[XX.UNTERMINATED_CLOSING_BRACE]:`Unterminated closing brace`,[XX.EMPTY_PLACEHOLDER]:`Empty placeholder`,[XX.NOT_ALLOW_NEST_PLACEHOLDER]:`Not allowed nest placeholder`,[XX.INVALID_LINKED_FORMAT]:`Invalid linked format`,[XX.MUST_HAVE_MESSAGES_IN_PLURAL]:`Plural must have messages`,[XX.UNEXPECTED_EMPTY_LINKED_MODIFIER]:`Unexpected empty linked modifier`,[XX.UNEXPECTED_EMPTY_LINKED_KEY]:`Unexpected empty linked key`,[XX.UNEXPECTED_LEXICAL_ANALYSIS]:`Unexpected lexical analysis in token: '{0}'`,[XX.UNHANDLED_CODEGEN_NODE_TYPE]:`unhandled codegen node type: '{0}'`,[XX.UNHANDLED_MINIFIER_NODE_TYPE]:`unhandled mimifier node type: '{0}'`};function $X(e,t,n={}){let{domain:r,messages:i,args:a}=n,o=e,s=SyntaxError(String(o));return s.code=e,t&&(s.location=t),s.domain=r,s}function eZ(e){throw e}const tZ=` `,nZ=`\r`,rZ=` `,iZ=`\u2028`,aZ=`\u2029`;function oZ(e){let t=e,n=0,r=1,i=1,a=0,o=e=>t[e]===nZ&&t[e+1]===rZ,s=e=>t[e]===rZ,c=e=>t[e]===aZ,l=e=>t[e]===iZ,u=e=>o(e)||s(e)||c(e)||l(e),d=()=>n,f=()=>r,p=()=>i,m=()=>a,h=e=>o(e)||c(e)||l(e)?rZ:t[e],g=()=>h(n),_=()=>h(n+a);function v(){return a=0,u(n)&&(r++,i=0),o(n)&&n++,n++,i++,t[n]}function y(){return o(n+a)&&a++,a++,t[n+a]}function b(){n=0,r=1,i=1,a=0}function x(e=0){a=e}function S(){let e=n+a;for(;e!==n;)v();a=0}return{index:d,line:f,column:p,peekOffset:m,charAt:h,currentChar:g,currentPeek:_,next:v,peek:y,reset:b,resetPeek:x,skipToPeek:S}}const sZ=void 0,cZ=`.`,lZ=`'`,uZ=`tokenizer`;function dZ(e,t={}){let n=t.location!==!1,r=oZ(e),i=()=>r.index(),a=()=>JX(r.line(),r.column(),r.index()),o=a(),s=i(),c={currentType:13,offset:s,startLoc:o,endLoc:o,lastType:13,lastOffset:s,lastStartLoc:o,lastEndLoc:o,braceNest:0,inLinked:!1,text:``},l=()=>c,{onError:u}=t;function d(e,t,r,...i){let a=l();if(t.column+=r,t.offset+=r,u){let r=n?YX(a.startLoc,t):null,o=$X(e,r,{domain:uZ,args:i});u(o)}}function f(e,t,r){e.endLoc=a(),e.currentType=t;let i={type:t};return n&&(i.loc=YX(e.startLoc,e.endLoc)),r!=null&&(i.value=r),i}let p=e=>f(e,13);function m(e,t){return e.currentChar()===t?(e.next(),t):(d(XX.EXPECTED_TOKEN,a(),0,t),``)}function h(e){let t=``;for(;e.currentPeek()===tZ||e.currentPeek()===rZ;)t+=e.currentPeek(),e.peek();return t}function g(e){let t=h(e);return e.skipToPeek(),t}function _(e){if(e===sZ)return!1;let t=e.charCodeAt(0);return t>=97&&t<=122||t>=65&&t<=90||t===95}function v(e){if(e===sZ)return!1;let t=e.charCodeAt(0);return t>=48&&t<=57}function y(e,t){let{currentType:n}=t;if(n!==2)return!1;h(e);let r=_(e.currentPeek());return e.resetPeek(),r}function b(e,t){let{currentType:n}=t;if(n!==2)return!1;h(e);let r=e.currentPeek()===`-`?e.peek():e.currentPeek(),i=v(r);return e.resetPeek(),i}function x(e,t){let{currentType:n}=t;if(n!==2)return!1;h(e);let r=e.currentPeek()===lZ;return e.resetPeek(),r}function S(e,t){let{currentType:n}=t;if(n!==7)return!1;h(e);let r=e.currentPeek()===`.`;return e.resetPeek(),r}function C(e,t){let{currentType:n}=t;if(n!==8)return!1;h(e);let r=_(e.currentPeek());return e.resetPeek(),r}function w(e,t){let{currentType:n}=t;if(!(n===7||n===11))return!1;h(e);let r=e.currentPeek()===`:`;return e.resetPeek(),r}function T(e,t){let{currentType:n}=t;if(n!==9)return!1;let r=()=>{let t=e.currentPeek();return t===`{`?_(e.peek()):t===`@`||t===`|`||t===`:`||t===`.`||t===tZ||!t?!1:t===rZ?(e.peek(),r()):D(e,!1)},i=r();return e.resetPeek(),i}function E(e){h(e);let t=e.currentPeek()===`|`;return e.resetPeek(),t}function D(e,t=!0){let n=(t=!1,r=``)=>{let i=e.currentPeek();return i===`{`||i===`@`||!i?t:i===`|`?!(r===tZ||r===rZ):i===tZ?(e.peek(),n(!0,tZ)):i===rZ?(e.peek(),n(!0,rZ)):!0},r=n();return t&&e.resetPeek(),r}function O(e,t){let n=e.currentChar();return n===sZ?sZ:t(n)?(e.next(),n):null}function k(e){let t=e.charCodeAt(0);return t>=97&&t<=122||t>=65&&t<=90||t>=48&&t<=57||t===95||t===36}function A(e){return O(e,k)}function j(e){let t=e.charCodeAt(0);return t>=97&&t<=122||t>=65&&t<=90||t>=48&&t<=57||t===95||t===36||t===45}function M(e){return O(e,j)}function N(e){let t=e.charCodeAt(0);return t>=48&&t<=57}function ee(e){return O(e,N)}function te(e){let t=e.charCodeAt(0);return t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102}function P(e){return O(e,te)}function ne(e){let t=``,n=``;for(;t=ee(e);)n+=t;return n}function re(e){let t=``;for(;;){let n=e.currentChar();if(n===`{`||n===`}`||n===`@`||n===`|`||!n)break;if(n===tZ||n===rZ)if(D(e))t+=n,e.next();else if(E(e))break;else t+=n,e.next();else t+=n,e.next()}return t}function ie(e){g(e);let t=``,n=``;for(;t=M(e);)n+=t;return e.currentChar()===sZ&&d(XX.UNTERMINATED_CLOSING_BRACE,a(),0),n}function ae(e){g(e);let t=``;return e.currentChar()===`-`?(e.next(),t+=`-${ne(e)}`):t+=ne(e),e.currentChar()===sZ&&d(XX.UNTERMINATED_CLOSING_BRACE,a(),0),t}function oe(e){return e!==lZ&&e!==rZ}function se(e){g(e),m(e,`'`);let t=``,n=``;for(;t=O(e,oe);)t===`\\`?n+=ce(e):n+=t;let r=e.currentChar();return r===rZ||r===sZ?(d(XX.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER,a(),0),r===rZ&&(e.next(),m(e,`'`)),n):(m(e,`'`),n)}function ce(e){let t=e.currentChar();switch(t){case`\\`:case`'`:return e.next(),`\\${t}`;case`u`:return le(e,t,4);case`U`:return le(e,t,6);default:return d(XX.UNKNOWN_ESCAPE_SEQUENCE,a(),0,t),``}}function le(e,t,n){m(e,t);let r=``;for(let i=0;i{let r=e.currentChar();return r===`{`||r===`@`||r===`|`||r===`(`||r===`)`||!r||r===tZ?n:(n+=r,e.next(),t(n))};return t(``)}function F(e){g(e);let t=m(e,`|`);return g(e),t}function me(e,t){let n=null,r=e.currentChar();switch(r){case`{`:return t.braceNest>=1&&d(XX.NOT_ALLOW_NEST_PLACEHOLDER,a(),0),e.next(),n=f(t,2,`{`),g(e),t.braceNest++,n;case`}`:return t.braceNest>0&&t.currentType===2&&d(XX.EMPTY_PLACEHOLDER,a(),0),e.next(),n=f(t,3,`}`),t.braceNest--,t.braceNest>0&&g(e),t.inLinked&&t.braceNest===0&&(t.inLinked=!1),n;case`@`:return t.braceNest>0&&d(XX.UNTERMINATED_CLOSING_BRACE,a(),0),n=he(e,t)||p(t),t.braceNest=0,n;default:{let r=!0,i=!0,o=!0;if(E(e))return t.braceNest>0&&d(XX.UNTERMINATED_CLOSING_BRACE,a(),0),n=f(t,1,F(e)),t.braceNest=0,t.inLinked=!1,n;if(t.braceNest>0&&(t.currentType===4||t.currentType===5||t.currentType===6))return d(XX.UNTERMINATED_CLOSING_BRACE,a(),0),t.braceNest=0,ge(e,t);if(r=y(e,t))return n=f(t,4,ie(e)),g(e),n;if(i=b(e,t))return n=f(t,5,ae(e)),g(e),n;if(o=x(e,t))return n=f(t,6,se(e)),g(e),n;if(!r&&!i&&!o)return n=f(t,12,de(e)),d(XX.INVALID_TOKEN_IN_PLACEHOLDER,a(),0,n.value),g(e),n;break}}return n}function he(e,t){let{currentType:n}=t,r=null,i=e.currentChar();switch((n===7||n===8||n===11||n===9)&&(i===rZ||i===tZ)&&d(XX.INVALID_LINKED_FORMAT,a(),0),i){case`@`:return e.next(),r=f(t,7,`@`),t.inLinked=!0,r;case`.`:return g(e),e.next(),f(t,8,`.`);case`:`:return g(e),e.next(),f(t,9,`:`);default:return E(e)?(r=f(t,1,F(e)),t.braceNest=0,t.inLinked=!1,r):S(e,t)||w(e,t)?(g(e),he(e,t)):C(e,t)?(g(e),f(t,11,fe(e))):T(e,t)?(g(e),i===`{`?me(e,t)||r:f(t,10,pe(e))):(n===7&&d(XX.INVALID_LINKED_FORMAT,a(),0),t.braceNest=0,t.inLinked=!1,ge(e,t))}}function ge(e,t){let n={type:13};if(t.braceNest>0)return me(e,t)||p(t);if(t.inLinked)return he(e,t)||p(t);let r=e.currentChar();switch(r){case`{`:return me(e,t)||p(t);case`}`:return d(XX.UNBALANCED_CLOSING_BRACE,a(),0),e.next(),f(t,3,`}`);case`@`:return he(e,t)||p(t);default:if(E(e))return n=f(t,1,F(e)),t.braceNest=0,t.inLinked=!1,n;if(D(e))return f(t,0,re(e));break}return n}function I(){let{currentType:e,offset:t,startLoc:n,endLoc:o}=c;return c.lastType=e,c.lastOffset=t,c.lastStartLoc=n,c.lastEndLoc=o,c.offset=i(),c.startLoc=a(),r.currentChar()===sZ?f(c,13):ge(r,c)}return{nextToken:I,currentOffset:i,currentPosition:a,context:l}}const fZ=`parser`,pZ=/(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g;function mZ(e,t,n){switch(e){case`\\\\`:return`\\`;case`\\'`:return`'`;default:{let e=parseInt(t||n,16);return e<=55295||e>=57344?String.fromCodePoint(e):`�`}}}function hZ(e={}){let t=e.location!==!1,{onError:n}=e;function r(e,r,i,a,...o){let s=e.currentPosition();if(s.offset+=a,s.column+=a,n){let e=t?YX(i,s):null,a=$X(r,e,{domain:fZ,args:o});n(a)}}function i(e,n,r){let i={type:e};return t&&(i.start=n,i.end=n,i.loc={start:r,end:r}),i}function a(e,n,r,i){t&&(e.end=n,e.loc&&(e.loc.end=r))}function o(e,t){let n=e.context(),r=i(3,n.offset,n.startLoc);return r.value=t,a(r,e.currentOffset(),e.currentPosition()),r}function s(e,t){let n=e.context(),{lastOffset:r,lastStartLoc:o}=n,s=i(5,r,o);return s.index=parseInt(t,10),e.nextToken(),a(s,e.currentOffset(),e.currentPosition()),s}function c(e,t){let n=e.context(),{lastOffset:r,lastStartLoc:o}=n,s=i(4,r,o);return s.key=t,e.nextToken(),a(s,e.currentOffset(),e.currentPosition()),s}function l(e,t){let n=e.context(),{lastOffset:r,lastStartLoc:o}=n,s=i(9,r,o);return s.value=t.replace(pZ,mZ),e.nextToken(),a(s,e.currentOffset(),e.currentPosition()),s}function u(e){let t=e.nextToken(),n=e.context(),{lastOffset:o,lastStartLoc:s}=n,c=i(8,o,s);return t.type===11?(t.value??r(e,XX.UNEXPECTED_LEXICAL_ANALYSIS,n.lastStartLoc,0,gZ(t)),c.value=t.value||``,a(c,e.currentOffset(),e.currentPosition()),{node:c}):(r(e,XX.UNEXPECTED_EMPTY_LINKED_MODIFIER,n.lastStartLoc,0),c.value=``,a(c,o,s),{nextConsumeToken:t,node:c})}function d(e,t){let n=e.context(),r=i(7,n.offset,n.startLoc);return r.value=t,a(r,e.currentOffset(),e.currentPosition()),r}function f(e){let t=e.context(),n=i(6,t.offset,t.startLoc),o=e.nextToken();if(o.type===8){let t=u(e);n.modifier=t.node,o=t.nextConsumeToken||e.nextToken()}switch(o.type!==9&&r(e,XX.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,0,gZ(o)),o=e.nextToken(),o.type===2&&(o=e.nextToken()),o.type){case 10:o.value??r(e,XX.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,0,gZ(o)),n.key=d(e,o.value||``);break;case 4:o.value??r(e,XX.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,0,gZ(o)),n.key=c(e,o.value||``);break;case 5:o.value??r(e,XX.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,0,gZ(o)),n.key=s(e,o.value||``);break;case 6:o.value??r(e,XX.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,0,gZ(o)),n.key=l(e,o.value||``);break;default:{r(e,XX.UNEXPECTED_EMPTY_LINKED_KEY,t.lastStartLoc,0);let s=e.context(),c=i(7,s.offset,s.startLoc);return c.value=``,a(c,s.offset,s.startLoc),n.key=c,a(n,s.offset,s.startLoc),{nextConsumeToken:o,node:n}}}return a(n,e.currentOffset(),e.currentPosition()),{node:n}}function p(e){let t=e.context(),n=t.currentType===1?e.currentOffset():t.offset,u=t.currentType===1?t.endLoc:t.startLoc,d=i(2,n,u);d.items=[];let p=null;do{let n=p||e.nextToken();switch(p=null,n.type){case 0:n.value??r(e,XX.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,0,gZ(n)),d.items.push(o(e,n.value||``));break;case 5:n.value??r(e,XX.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,0,gZ(n)),d.items.push(s(e,n.value||``));break;case 4:n.value??r(e,XX.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,0,gZ(n)),d.items.push(c(e,n.value||``));break;case 6:n.value??r(e,XX.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,0,gZ(n)),d.items.push(l(e,n.value||``));break;case 7:{let t=f(e);d.items.push(t.node),p=t.nextConsumeToken||null;break}}}while(t.currentType!==13&&t.currentType!==1);let m=t.currentType===1?t.lastOffset:e.currentOffset(),h=t.currentType===1?t.lastEndLoc:e.currentPosition();return a(d,m,h),d}function m(e,t,n,o){let s=e.context(),c=o.items.length===0,l=i(1,t,n);l.cases=[],l.cases.push(o);do{let t=p(e);c||=t.items.length===0,l.cases.push(t)}while(s.currentType!==13);return c&&r(e,XX.MUST_HAVE_MESSAGES_IN_PLURAL,n,0),a(l,e.currentOffset(),e.currentPosition()),l}function h(e){let t=e.context(),{offset:n,startLoc:r}=t,i=p(e);return t.currentType===13?i:m(e,n,r,i)}function g(n){let o=dZ(n,DX({},e)),s=o.context(),c=i(0,s.offset,s.startLoc);return t&&c.loc&&(c.loc.source=n),c.body=h(o),e.onCacheKey&&(c.cacheKey=e.onCacheKey(n)),s.currentType!==13&&r(o,XX.UNEXPECTED_LEXICAL_ANALYSIS,s.lastStartLoc,0,n[s.offset]||``),a(c,o.currentOffset(),o.currentPosition()),c}return{parse:g}}function gZ(e){if(e.type===13)return`EOF`;let t=(e.value||``).replace(/\r?\n/gu,`\\n`);return t.length>10?t.slice(0,9)+`…`:t}function _Z(e,t={}){let n={ast:e,helpers:new Set},r=()=>n,i=e=>(n.helpers.add(e),e);return{context:r,helper:i}}function vZ(e,t){for(let n=0;nSZ(e)),e}function SZ(e){if(e.items.length===1){let t=e.items[0];(t.type===3||t.type===9)&&(e.static=t.value,delete t.value)}else{let t=[];for(let n=0;ns;function l(e,t){s.code+=e}function u(e,t=!0){let n=t?i:``;l(a?n+` `.repeat(e):n)}function d(e=!0){let t=++s.indentLevel;e&&u(t)}function f(e=!0){let t=--s.indentLevel;e&&u(t)}function p(){u(s.indentLevel)}let m=e=>`_${e}`,h=()=>s.needIndent;return{context:c,push:l,indent:d,deindent:f,newline:p,helper:m,needIndent:h}}function TZ(e,t){let{helper:n}=e;e.push(`${n(`linked`)}(`),kZ(e,t.key),t.modifier?(e.push(`, `),kZ(e,t.modifier),e.push(`, _type`)):e.push(`, undefined, _type`),e.push(`)`)}function EZ(e,t){let{helper:n,needIndent:r}=e;e.push(`${n(`normalize`)}([`),e.indent(r());let i=t.items.length;for(let n=0;n1){e.push(`${n(`plural`)}([`),e.indent(r());let i=t.cases.length;for(let n=0;n{let n=$(t.mode)?t.mode:`normal`,r=$(t.filename)?t.filename:`message.intl`,i=!!t.sourceMap,a=t.breakLineCode==null?n===`arrow`?`;`:` `:t.breakLineCode,o=t.needIndent?t.needIndent:n!==`arrow`,s=e.helpers||[],c=wZ(e,{mode:n,filename:r,sourceMap:i,breakLineCode:a,needIndent:o});c.push(n===`normal`?`function __msg__ (ctx) {`:`(ctx) => {`),c.indent(o),s.length>0&&(c.push(`const { ${WX(s.map(e=>`${e}: _${e}`),`, `)} } = ctx`),c.newline()),c.push(`return `),kZ(c,e),c.deindent(o),c.push(`}`),delete e.helpers;let{code:l,map:u}=c.context();return{ast:e,code:l,map:u?u.toJSON():void 0}};function jZ(e,t={}){let n=DX({},t),r=!!n.jit,i=!!n.minify,a=n.optimize==null?!0:n.optimize,o=hZ(n),s=o.parse(e);return r?(a&&xZ(s),i&&CZ(s),{ast:s,code:``}):(bZ(s,n),AZ(s,n))}function MZ(){typeof __INTLIFY_PROD_DEVTOOLS__!=`boolean`&&(jX().__INTLIFY_PROD_DEVTOOLS__=!1)}function NZ(e){return RX(e)&&UZ(e)===0&&(PX(e,`b`)||PX(e,`body`))}const PZ=[`b`,`body`];function FZ(e){return XZ(e,PZ)}const IZ=[`c`,`cases`];function LZ(e){return XZ(e,IZ,[])}const RZ=[`s`,`static`];function zZ(e){return XZ(e,RZ)}const BZ=[`i`,`items`];function VZ(e){return XZ(e,BZ,[])}const HZ=[`t`,`type`];function UZ(e){return XZ(e,HZ)}const WZ=[`v`,`value`];function GZ(e,t){let n=XZ(e,WZ);if(n!=null)return n;throw QZ(t)}const KZ=[`m`,`modifier`];function qZ(e){return XZ(e,KZ)}const JZ=[`k`,`key`];function YZ(e){let t=XZ(e,JZ);if(t)return t;throw QZ(6)}function XZ(e,t,n){for(let n=0;neQ(t,e);return t}function eQ(e,t){let n=FZ(t);if(n==null)throw QZ(0);let r=UZ(n);if(r===1){let t=n,r=LZ(t);return e.plural(r.reduce((t,n)=>[...t,tQ(e,n)],[]))}else return tQ(e,n)}function tQ(e,t){let n=zZ(t);if(n!=null)return e.type===`text`?n:e.normalize([n]);{let n=VZ(t).reduce((t,n)=>[...t,nQ(e,n)],[]);return e.normalize(n)}}function nQ(e,t){let n=UZ(t);switch(n){case 3:return GZ(t,n);case 9:return GZ(t,n);case 4:{let r=t;if(PX(r,`k`)&&r.k)return e.interpolate(e.named(r.k));if(PX(r,`key`)&&r.key)return e.interpolate(e.named(r.key));throw QZ(n)}case 5:{let r=t;if(PX(r,`i`)&&CX(r.i))return e.interpolate(e.list(r.i));if(PX(r,`index`)&&CX(r.index))return e.interpolate(e.list(r.index));throw QZ(n)}case 6:{let n=t,r=qZ(n),i=YZ(n);return e.linked(nQ(e,i),r?nQ(e,r):void 0,e.type)}case 7:return GZ(t,n);case 8:return GZ(t,n);default:throw Error(`unhandled node on format message part: ${n}`)}}const rQ=e=>e;let iQ=kX();function aQ(e,t={}){let n=!1,r=t.onError||eZ;return t.onError=e=>{n=!0,r(e)},{...jZ(e,t),detectError:n}}function oQ(e,t){if($(e)){let n=LX(t.warnHtmlMessage)?t.warnHtmlMessage:!0,r=t.onCacheKey||rQ,i=r(e),a=iQ[i];if(a)return a;let{ast:o,detectError:s}=aQ(e,{...t,location:!1,jit:!0}),c=$Z(o);return s?c:iQ[i]=c}else{let t=e.cacheKey;if(t){let n=iQ[t];return n||(iQ[t]=$Z(e))}else return $Z(e)}}let sQ=null;function cQ(e){sQ=e}function lQ(e,t,n){sQ&&sQ.emit(`i18n:init`,{timestamp:Date.now(),i18n:e,version:t,meta:n})}const uQ=dQ(`function:translate`);function dQ(e){return t=>sQ&&sQ.emit(e,t)}const fQ={INVALID_ARGUMENT:ZX,INVALID_DATE_ARGUMENT:18,INVALID_ISO_DATE_ARGUMENT:19,NOT_SUPPORT_NON_STRING_MESSAGE:20,NOT_SUPPORT_LOCALE_PROMISE_VALUE:21,NOT_SUPPORT_LOCALE_ASYNC_FUNCTION:22,NOT_SUPPORT_LOCALE_TYPE:23},pQ=24;function mQ(e){return $X(e,null,void 0)}const hQ={[fQ.INVALID_ARGUMENT]:`Invalid arguments`,[fQ.INVALID_DATE_ARGUMENT]:`The date provided is an invalid Date object.Make sure your Date represents a valid date.`,[fQ.INVALID_ISO_DATE_ARGUMENT]:`The argument provided is not a valid ISO date string`,[fQ.NOT_SUPPORT_NON_STRING_MESSAGE]:`Not support non-string message`,[fQ.NOT_SUPPORT_LOCALE_PROMISE_VALUE]:`cannot support promise value`,[fQ.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION]:`cannot support async function`,[fQ.NOT_SUPPORT_LOCALE_TYPE]:`cannot support locale type`};function gQ(e,t){return t.locale==null?vQ(e.locale):vQ(t.locale)}let _Q;function vQ(e){if($(e))return e;if(IX(e)){if(e.resolvedOnce&&_Q!=null)return _Q;if(e.constructor.name===`Function`){let t=e();if(zX(t))throw mQ(fQ.NOT_SUPPORT_LOCALE_PROMISE_VALUE);return _Q=t}else throw mQ(fQ.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION)}else throw mQ(fQ.NOT_SUPPORT_LOCALE_TYPE)}function yQ(e,t,n){return[...new Set([n,...FX(t)?t:RX(t)?Object.keys(t):$(t)?[t]:[n]])]}function bQ(e,t,n){let r=$(n)?n:zQ,i=e;i.__localeChainCache||=new Map;let a=i.__localeChainCache.get(r);if(!a){a=[];let e=[n];for(;FX(e);)e=xQ(a,e,t);let o=FX(t)||!HX(t)?t:t.default?t.default:null;e=$(o)?[o]:o,FX(e)&&xQ(a,e,!1),i.__localeChainCache.set(r,a)}return a}function xQ(e,t,n){let r=!0;for(let i=0;i{o===void 0?o=s:o+=s},f[1]=()=>{o!==void 0&&(t.push(o),o=void 0)},f[2]=()=>{f[0](),i++},f[3]=()=>{if(i>0)i--,r=4,f[0]();else{if(i=0,o===void 0||(o=kQ(o),o===!1))return!1;f[1]()}};function p(){let t=e[n+1];if(r===5&&t===`'`||r===6&&t===`"`)return n++,s=`\\`+t,f[0](),!0}for(;r!==null;)if(n++,a=e[n],!(a===`\\`&&p())){if(c=OQ(a),d=wQ[r],l=d[c]||d.l||8,l===8||(r=l[0],l[1]!==void 0&&(u=f[l[1]],u&&(s=a,u()===!1))))return;if(r===7)return t}}const jQ=new Map;function MQ(e,t){return RX(e)?e[t]:null}function NQ(e,t){if(!RX(e))return null;let n=jQ.get(t);if(n||(n=AQ(t),n&&jQ.set(t,n)),!n)return null;let r=n.length,i=e,a=0;for(;a`${e.charAt(0).toLocaleUpperCase()}${e.substr(1)}`;function HQ(){return{upper:(e,t)=>t===`text`&&$(e)?e.toUpperCase():t===`vnode`&&RX(e)&&`__v_isVNode`in e?e.children.toUpperCase():e,lower:(e,t)=>t===`text`&&$(e)?e.toLowerCase():t===`vnode`&&RX(e)&&`__v_isVNode`in e?e.children.toLowerCase():e,capitalize:(e,t)=>t===`text`&&$(e)?VQ(e):t===`vnode`&&RX(e)&&`__v_isVNode`in e?VQ(e.children):e}}let UQ;function WQ(e){UQ=e}let GQ;function KQ(e){GQ=e}let qQ;function JQ(e){qQ=e}let YQ=null;const XQ=e=>{YQ=e},ZQ=()=>YQ;let QQ=null;const $Q=e=>{QQ=e},e$=()=>QQ;let t$=0;function n$(e={}){let t=IX(e.onWarn)?e.onWarn:GX,n=$(e.version)?e.version:LQ,r=$(e.locale)||IX(e.locale)?e.locale:zQ,i=IX(r)?zQ:r,a=FX(e.fallbackLocale)||HX(e.fallbackLocale)||$(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:i,o=HX(e.messages)?e.messages:r$(i),s=HX(e.datetimeFormats)?e.datetimeFormats:r$(i),c=HX(e.numberFormats)?e.numberFormats:r$(i),l=DX(kX(),e.modifiers,HQ()),u=e.pluralRules||kX(),d=IX(e.missing)?e.missing:null,f=LX(e.missingWarn)||TX(e.missingWarn)?e.missingWarn:!0,p=LX(e.fallbackWarn)||TX(e.fallbackWarn)?e.fallbackWarn:!0,m=!!e.fallbackFormat,h=!!e.unresolving,g=IX(e.postTranslation)?e.postTranslation:null,_=HX(e.processor)?e.processor:null,v=LX(e.warnHtmlMessage)?e.warnHtmlMessage:!0,y=!!e.escapeParameter,b=IX(e.messageCompiler)?e.messageCompiler:UQ,x=IX(e.messageResolver)?e.messageResolver:GQ||MQ,S=IX(e.localeFallbacker)?e.localeFallbacker:qQ||yQ,C=RX(e.fallbackContext)?e.fallbackContext:void 0,w=e,T=RX(w.__datetimeFormatters)?w.__datetimeFormatters:new Map,E=RX(w.__numberFormatters)?w.__numberFormatters:new Map,D=RX(w.__meta)?w.__meta:{};t$++;let O={version:n,cid:t$,locale:r,fallbackLocale:a,messages:o,modifiers:l,pluralRules:u,missing:d,missingWarn:f,fallbackWarn:p,fallbackFormat:m,unresolving:h,postTranslation:g,processor:_,warnHtmlMessage:v,escapeParameter:y,messageCompiler:b,messageResolver:x,localeFallbacker:S,fallbackContext:C,onWarn:t,__meta:D};return O.datetimeFormats=s,O.numberFormats=c,O.__datetimeFormatters=T,O.__numberFormatters=E,__INTLIFY_PROD_DEVTOOLS__&&lQ(O,n,D),O}const r$=e=>({[e]:kX()});function i$(e,t,n,r,i){let{missing:a,onWarn:o}=e;if(a!==null){let r=a(e,n,t,i);return $(r)?r:t}else return t}function a$(e,t,n){let r=e;r.__localeChainCache=new Map,e.localeFallbacker(e,n,t)}function o$(e,t){return e===t?!1:e.split(`-`)[0]===t.split(`-`)[0]}function s$(e,t){let n=t.indexOf(e);if(n===-1)return!1;for(let r=n+1;r{d$.includes(e)?o[e]=n[e]:a[e]=n[e]}),$(r)?a.locale=r:HX(r)&&(o=r),HX(i)&&(o=i),[a.key||``,s,a,o]}function p$(e,t,n){let r=e;for(let e in n){let n=`${t}__${e}`;if(!r.__datetimeFormatters.has(n))continue;r.__datetimeFormatters.delete(n)}}function m$(e,...t){let{numberFormats:n,unresolving:r,fallbackLocale:i,onWarn:a,localeFallbacker:o}=e,{__numberFormatters:s}=e,[c,l,u,d]=g$(...t),f=LX(u.missingWarn)?u.missingWarn:e.missingWarn,p=LX(u.fallbackWarn)?u.fallbackWarn:e.fallbackWarn,m=!!u.part,h=gQ(e,u),g=o(e,i,h);if(!$(c)||c===``)return new Intl.NumberFormat(h,d).format(l);let _={},v,y=null,b=h,x=null,S=`number format`;for(let t=0;t{h$.includes(e)?o[e]=n[e]:a[e]=n[e]}),$(r)?a.locale=r:HX(r)&&(o=r),HX(i)&&(o=i),[a.key||``,s,a,o]}function _$(e,t,n){let r=e;for(let e in n){let n=`${t}__${e}`;if(!r.__numberFormatters.has(n))continue;r.__numberFormatters.delete(n)}}const v$=e=>e,y$=e=>``,b$=`text`,x$=e=>e.length===0?``:WX(e),S$=UX;function C$(e,t){return e=Math.abs(e),t===2?e?e>1?1:0:1:e?Math.min(e,2):0}function w$(e){let t=CX(e.pluralIndex)?e.pluralIndex:-1;return e.named&&(CX(e.named.count)||CX(e.named.n))?CX(e.named.count)?e.named.count:CX(e.named.n)?e.named.n:t:t}function T$(e,t){t.count||=e,t.n||=e}function E$(e={}){let t=e.locale,n=w$(e),r=RX(e.pluralRules)&&$(t)&&IX(e.pluralRules[t])?e.pluralRules[t]:C$,i=RX(e.pluralRules)&&$(t)&&IX(e.pluralRules[t])?C$:void 0,a=e=>e[r(n,e.length,i)],o=e.list||[],s=e=>o[e],c=e.named||kX();CX(e.pluralIndex)&&T$(n,c);let l=e=>c[e];function u(t,n){let r=IX(e.messages)?e.messages(t,!!n):RX(e.messages)?e.messages[t]:!1;return r||(e.parent?e.parent.message(t):y$)}let d=t=>e.modifiers?e.modifiers[t]:v$,f=HX(e.processor)&&IX(e.processor.normalize)?e.processor.normalize:x$,p=HX(e.processor)&&IX(e.processor.interpolate)?e.processor.interpolate:S$,m=HX(e.processor)&&$(e.processor.type)?e.processor.type:b$,h=(e,...t)=>{let[n,r]=t,i=`text`,a=``;t.length===1?RX(n)?(a=n.modifier||a,i=n.type||i):$(n)&&(a=n||a):t.length===2&&($(n)&&(a=n||a),$(r)&&(i=r||i));let o=u(e,!0)(g),s=i===`vnode`&&FX(o)&&a?o[0]:o;return a?d(a)(s,i):s},g={list:s,named:l,plural:a,linked:h,message:u,type:m,interpolate:p,normalize:f,values:DX(kX(),o,c)};return g}const D$=()=>``,O$=e=>IX(e);function k$(e,...t){let{fallbackFormat:n,postTranslation:r,unresolving:i,messageCompiler:a,fallbackLocale:o,messages:s}=e,[c,l]=P$(...t),u=LX(l.missingWarn)?l.missingWarn:e.missingWarn,d=LX(l.fallbackWarn)?l.fallbackWarn:e.fallbackWarn,f=LX(l.escapeParameter)?l.escapeParameter:e.escapeParameter,p=!!l.resolvedMessage,m=$(l.default)||LX(l.default)?LX(l.default)?a?c:()=>c:l.default:n?a?c:()=>c:null,h=n||m!=null&&($(m)||IX(m)),g=gQ(e,l);f&&A$(l);let[_,v,y]=p?[c,g,s[g]||kX()]:j$(e,c,g,o,d,u),b=_,x=c;if(!p&&!($(b)||NZ(b)||O$(b))&&h&&(b=m,x=b),!p&&(!($(b)||NZ(b)||O$(b))||!$(v)))return i?RQ:c;let S=!1,C=()=>{S=!0},w=O$(b)?b:M$(e,c,v,b,x,C);if(S)return b;let T=I$(e,v,y,l),E=E$(T),D=N$(e,w,E),O=r?r(D,c):D;if(__INTLIFY_PROD_DEVTOOLS__){let t={timestamp:Date.now(),key:$(c)?c:O$(b)?b.key:``,locale:v||(O$(b)?b.locale:``),format:$(b)?b:O$(b)?b.source:``,message:O};t.meta=DX({},e.__meta,ZQ()||{}),uQ(t)}return O}function A$(e){FX(e.list)?e.list=e.list.map(e=>$(e)?MX(e):e):RX(e.named)&&Object.keys(e.named).forEach(t=>{$(e.named[t])&&(e.named[t]=MX(e.named[t]))})}function j$(e,t,n,r,i,a){let{messages:o,onWarn:s,messageResolver:c,localeFallbacker:l}=e,u=l(e,r,n),d=kX(),f,p=null,m=n,h=null,g=`translate`;for(let n=0;nr;return e.locale=n,e.key=t,e}let c=null,l,u,d=o(r,F$(e,n,i,r,s,a));return d.locale=n,d.key=t,d.source=r,d}function N$(e,t,n){let r=null,i,a,o=t(n);return o}function P$(...e){let[t,n,r]=e,i=kX();if(!$(t)&&!CX(t)&&!O$(t)&&!NZ(t))throw mQ(fQ.INVALID_ARGUMENT);let a=CX(t)?String(t):(O$(t),t);return CX(n)?i.plural=n:$(n)?i.default=n:HX(n)&&!EX(n)?i.named=n:FX(n)&&(i.list=n),CX(r)?i.plural=r:$(r)?i.default=r:HX(r)&&DX(i,r),[a,i]}function F$(e,t,n,r,i,a){return{locale:t,key:n,warnHtmlMessage:i,onError:e=>{throw a&&a(e),e},onCacheKey:e=>xX(t,n,e)}}function I$(e,t,n,r){let{modifiers:i,pluralRules:a,messageResolver:o,fallbackLocale:s,fallbackWarn:c,missingWarn:l,fallbackContext:u}=e,d=(r,i)=>{let a=o(n,r);if(a==null&&(u||i)){let[,,n]=j$(u||e,r,t,s,c,l);a=o(n,r)}if($(a)||NZ(a)){let n=!1,i=()=>{n=!0},o=M$(e,r,t,a,r,i);return n?D$:o}else if(O$(a))return a;else return D$},f={locale:t,modifiers:i,pluralRules:a,messages:d};return e.processor&&(f.processor=e.processor),r.list&&(f.list=r.list),r.named&&(f.named=r.named),CX(r.plural)&&(f.pluralIndex=r.plural),f}MZ();const L$=`11.1.7`;function R$(){typeof __INTLIFY_PROD_DEVTOOLS__!=`boolean`&&(jX().__INTLIFY_PROD_DEVTOOLS__=!1)}const z$={UNEXPECTED_RETURN_TYPE:pQ,INVALID_ARGUMENT:25,MUST_BE_CALL_SETUP_TOP:26,NOT_INSTALLED:27,REQUIRED_VALUE:28,INVALID_VALUE:29,CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN:30,NOT_INSTALLED_WITH_PROVIDE:31,UNEXPECTED_ERROR:32,NOT_COMPATIBLE_LEGACY_VUE_I18N:33,NOT_AVAILABLE_COMPOSITION_IN_LEGACY:34,DUPLICATE_USE_I18N_CALLING:35};function B$(e,...t){return $X(e,null,void 0)}const V$={[z$.UNEXPECTED_RETURN_TYPE]:`Unexpected return type in composer`,[z$.INVALID_ARGUMENT]:`Invalid argument`,[z$.MUST_BE_CALL_SETUP_TOP]:"Must be called at the top of a `setup` function",[z$.NOT_INSTALLED]:"Need to install with `app.use` function",[z$.UNEXPECTED_ERROR]:`Unexpected error`,[z$.REQUIRED_VALUE]:`Required in value: {0}`,[z$.INVALID_VALUE]:`Invalid value`,[z$.CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN]:`Cannot setup vue-devtools plugin`,[z$.NOT_INSTALLED_WITH_PROVIDE]:"Need to install with `provide` function",[z$.NOT_COMPATIBLE_LEGACY_VUE_I18N]:`Not compatible legacy VueI18n.`,[z$.NOT_AVAILABLE_COMPOSITION_IN_LEGACY]:`Not available Compostion API in Legacy API mode. Please make sure that the legacy API mode is working properly`,[z$.DUPLICATE_USE_I18N_CALLING]:"Duplicate `useI18n` calling by local scope. Please don't call it on local scope"},H$=bX(`__translateVNode`),U$=bX(`__datetimeParts`),W$=bX(`__numberParts`),G$=bX(`__setPluralRules`);bX(`__intlifyMeta`);const K$=bX(`__injectWithOption`),q$=bX(`__dispose`),J$={FALLBACK_TO_ROOT:FQ,NOT_FOUND_PARENT_SCOPE:9,IGNORE_OBJ_FLATTEN:10,DEPRECATE_LEGACY_MODE:11,DEPRECATE_TRANSLATE_CUSTOME_DIRECTIVE:12},Y$={[J$.FALLBACK_TO_ROOT]:`Fall back to {type} '{key}' with root locale.`,[J$.NOT_FOUND_PARENT_SCOPE]:`Not found parent scope. use the global scope.`,[J$.IGNORE_OBJ_FLATTEN]:`Ignore object flatten: '{key}' key has an string value`,[J$.DEPRECATE_LEGACY_MODE]:`Legacy API mode has been deprecated in v11. Use Composition API mode instead. -About how to use the Composition API mode, see https://vue-i18n.intlify.dev/guide/advanced/composition.html`,[J$.DEPRECATE_TRANSLATE_CUSTOME_DIRECTIVE]:`'v-t' has been deprecated in v11. Use translate APIs ('t' or '$t') instead.`};function X$(e){if(!RX(e)||NZ(e))return e;for(let t in e){if(!PX(e,t))continue;if(!t.includes(`.`))RX(e[t])&&X$(e[t]);else{let n=t.split(`.`),r=n.length-1,i=e,a=!1;for(let e=0;e{if(`locale`in e&&`resource`in e){let{locale:t,resource:n}=e;t?(o[t]=o[t]||kX(),qX(n,o[t])):qX(n,o)}else $(e)&&qX(JSON.parse(e),o)}),i==null&&a)for(let e in o)PX(o,e)&&X$(o[e]);return o}function Q$(e){return e.type}function $$(e,t,n){let r=RX(t.messages)?t.messages:kX();`__i18nGlobal`in n&&(r=Z$(e.locale.value,{messages:r,__i18n:n.__i18nGlobal}));let i=Object.keys(r);if(i.length&&i.forEach(t=>{e.mergeLocaleMessage(t,r[t])}),RX(t.datetimeFormats)){let n=Object.keys(t.datetimeFormats);n.length&&n.forEach(n=>{e.mergeDateTimeFormat(n,t.datetimeFormats[n])})}if(RX(t.numberFormats)){let n=Object.keys(t.numberFormats);n.length&&n.forEach(n=>{e.mergeNumberFormat(n,t.numberFormats[n])})}}function e1(e){return mo(Xa,null,e,0)}const t1=`__INTLIFY_META__`,n1=()=>[],r1=()=>!1;let i1=0;function a1(e){return(t,n,r,i)=>e(n,r,Ao()||void 0,i)}const o1=()=>{let e=Ao(),t=null;return e&&(t=Q$(e)[t1])?{[t1]:t}:null};function s1(e={}){let{__root:t,__injectWithOption:n}=e,r=t===void 0,i=e.flatJson,a=yX?R:z,o=LX(e.inheritLocale)?e.inheritLocale:!0,s=a(t&&o?t.locale.value:$(e.locale)?e.locale:zQ),c=a(t&&o?t.fallbackLocale.value:$(e.fallbackLocale)||FX(e.fallbackLocale)||HX(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:s.value),l=a(Z$(s.value,e)),u=a(HX(e.datetimeFormats)?e.datetimeFormats:{[s.value]:{}}),d=a(HX(e.numberFormats)?e.numberFormats:{[s.value]:{}}),f=t?t.missingWarn:LX(e.missingWarn)||TX(e.missingWarn)?e.missingWarn:!0,p=t?t.fallbackWarn:LX(e.fallbackWarn)||TX(e.fallbackWarn)?e.fallbackWarn:!0,m=t?t.fallbackRoot:LX(e.fallbackRoot)?e.fallbackRoot:!0,h=!!e.fallbackFormat,g=IX(e.missing)?e.missing:null,_=IX(e.missing)?a1(e.missing):null,v=IX(e.postTranslation)?e.postTranslation:null,y=t?t.warnHtmlMessage:LX(e.warnHtmlMessage)?e.warnHtmlMessage:!0,b=!!e.escapeParameter,x=t?t.modifiers:HX(e.modifiers)?e.modifiers:{},S=e.pluralRules||t&&t.pluralRules,C,w=()=>{r&&$Q(null);let t={version:L$,locale:s.value,fallbackLocale:c.value,messages:l.value,modifiers:x,pluralRules:S,missing:_===null?void 0:_,missingWarn:f,fallbackWarn:p,fallbackFormat:h,unresolving:!0,postTranslation:v===null?void 0:v,warnHtmlMessage:y,escapeParameter:b,messageResolver:e.messageResolver,messageCompiler:e.messageCompiler,__meta:{framework:`vue`}};t.datetimeFormats=u.value,t.numberFormats=d.value,t.__datetimeFormatters=HX(C)?C.__datetimeFormatters:void 0,t.__numberFormatters=HX(C)?C.__numberFormatters:void 0;let n=n$(t);return r&&$Q(n),n};C=w(),a$(C,s.value,c.value);function T(){return[s.value,c.value,l.value,u.value,d.value]}let E=H({get:()=>s.value,set:e=>{C.locale=e,s.value=e}}),D=H({get:()=>c.value,set:e=>{C.fallbackLocale=e,c.value=e,a$(C,s.value,e)}}),O=H(()=>l.value),k=H(()=>u.value),A=H(()=>d.value);function j(){return IX(v)?v:null}function M(e){v=e,C.postTranslation=e}function N(){return g}function ee(e){e!==null&&(_=a1(e)),g=e,C.missing=_}function te(e,t){return e!==`translate`||!t.resolvedMessage}let P=(e,n,i,a,o,s)=>{T();let c;try{__INTLIFY_PROD_DEVTOOLS__,r||(C.fallbackContext=t?e$():void 0),c=e(C)}finally{__INTLIFY_PROD_DEVTOOLS__,r||(C.fallbackContext=void 0)}if(i!==`translate exists`&&CX(c)&&c===RQ||i===`translate exists`&&!c){let[e,r]=n();return t&&m?a(t):o(e)}else if(s(c))return c;else throw B$(z$.UNEXPECTED_RETURN_TYPE)};function ne(...e){return P(t=>Reflect.apply(k$,null,[t,...e]),()=>P$(...e),`translate`,t=>Reflect.apply(t.t,t,[...e]),e=>e,e=>$(e))}function re(...e){let[t,n,r]=e;if(r&&!RX(r))throw B$(z$.INVALID_ARGUMENT);return ne(t,n,DX({resolvedMessage:!0},r||{}))}function ie(...e){return P(t=>Reflect.apply(u$,null,[t,...e]),()=>f$(...e),`datetime format`,t=>Reflect.apply(t.d,t,[...e]),()=>BQ,e=>$(e)||FX(e))}function ae(...e){return P(t=>Reflect.apply(m$,null,[t,...e]),()=>g$(...e),`number format`,t=>Reflect.apply(t.n,t,[...e]),()=>BQ,e=>$(e)||FX(e))}function oe(e){return e.map(e=>$(e)||CX(e)||LX(e)?e1(String(e)):e)}let se=e=>e,ce={normalize:oe,interpolate:se,type:`vnode`};function le(...e){return P(t=>{let n,r=t;try{r.processor=ce,n=Reflect.apply(k$,null,[r,...e])}finally{r.processor=null}return n},()=>P$(...e),`translate`,t=>t[H$](...e),e=>[e1(e)],e=>FX(e))}function ue(...e){return P(t=>Reflect.apply(m$,null,[t,...e]),()=>g$(...e),`number format`,t=>t[W$](...e),n1,e=>$(e)||FX(e))}function de(...e){return P(t=>Reflect.apply(u$,null,[t,...e]),()=>f$(...e),`datetime format`,t=>t[U$](...e),n1,e=>$(e)||FX(e))}function fe(e){S=e,C.pluralRules=S}function pe(e,t){return P(()=>{if(!e)return!1;let n=$(t)?t:s.value,r=he(n),i=C.messageResolver(r,e);return NZ(i)||O$(i)||$(i)},()=>[e],`translate exists`,n=>Reflect.apply(n.te,n,[e,t]),r1,e=>LX(e))}function F(e){let t=null,n=bQ(C,c.value,s.value);for(let r=0;r{o&&(s.value=e,C.locale=e,a$(C,s.value,c.value))}),V(t.fallbackLocale,e=>{o&&(c.value=e,C.fallbackLocale=e,a$(C,s.value,c.value))}));let Se={id:i1,locale:E,fallbackLocale:D,get inheritLocale(){return o},set inheritLocale(e){o=e,e&&t&&(s.value=t.locale.value,c.value=t.fallbackLocale.value,a$(C,s.value,c.value))},get availableLocales(){return Object.keys(l.value).sort()},messages:O,get modifiers(){return x},get pluralRules(){return S||{}},get isGlobal(){return r},get missingWarn(){return f},set missingWarn(e){f=e,C.missingWarn=f},get fallbackWarn(){return p},set fallbackWarn(e){p=e,C.fallbackWarn=p},get fallbackRoot(){return m},set fallbackRoot(e){m=e},get fallbackFormat(){return h},set fallbackFormat(e){h=e,C.fallbackFormat=h},get warnHtmlMessage(){return y},set warnHtmlMessage(e){y=e,C.warnHtmlMessage=e},get escapeParameter(){return b},set escapeParameter(e){b=e,C.escapeParameter=e},t:ne,getLocaleMessage:he,setLocaleMessage:ge,mergeLocaleMessage:I,getPostTranslationHandler:j,setPostTranslationHandler:M,getMissingHandler:N,setMissingHandler:ee,[G$]:fe};return Se.datetimeFormats=k,Se.numberFormats=A,Se.rt=re,Se.te=pe,Se.tm=me,Se.d=ie,Se.n=ae,Se.getDateTimeFormat=_e,Se.setDateTimeFormat=L,Se.mergeDateTimeFormat=ve,Se.getNumberFormat=ye,Se.setNumberFormat=be,Se.mergeNumberFormat=xe,Se[K$]=n,Se[H$]=le,Se[U$]=de,Se[W$]=ue,Se}const c1={tag:{type:[String,Object]},locale:{type:String},scope:{type:String,validator:e=>e===`parent`||e===`global`,default:`parent`},i18n:{type:Object}};function l1({slots:e},t){if(t.length===1&&t[0]===`default`){let t=e.default?e.default():[];return t.reduce((e,t)=>[...e,...t.type===Ya?t.children:[t]],[])}else return t.reduce((t,n)=>{let r=e[n];return r&&(t[n]=r()),t},kX())}function u1(){return Ya}const d1=Rr({name:`i18n-t`,props:DX({keypath:{type:String,required:!0},plural:{type:[Number,String],validator:e=>CX(e)||!isNaN(e)}},c1),setup(e,t){let{slots:n,attrs:r}=t,i=e.i18n||w1({useScope:e.scope,__useComponent:!0});return()=>{let a=Object.keys(n).filter(e=>e[0]!==`_`),o=kX();e.locale&&(o.locale=e.locale),e.plural!==void 0&&(o.plural=$(e.plural)?+e.plural:e.plural);let s=l1(t,a),c=i[H$](e.keypath,s,o),l=DX(kX(),r),u=$(e.tag)||RX(e.tag)?e.tag:u1();return Jo(u,l,c)}}}),f1=d1;function p1(e){return FX(e)&&!$(e[0])}function m1(e,t,n,r){let{slots:i,attrs:a}=t;return()=>{let t={part:!0},o=kX();e.locale&&(t.locale=e.locale),$(e.format)?t.key=e.format:RX(e.format)&&($(e.format.key)&&(t.key=e.format.key),o=Object.keys(e.format).reduce((t,r)=>n.includes(r)?DX(kX(),t,{[r]:e.format[r]}):t,kX()));let s=r(e.value,t,o),c=[t.key];FX(s)?c=s.map((e,t)=>{let n=i[e.type],r=n?n({[e.type]:e.value,index:t,parts:s}):[e.value];return p1(r)&&(r[0].key=`${e.type}-${t}`),r}):$(s)&&(c=[s]);let l=DX(kX(),a),u=$(e.tag)||RX(e.tag)?e.tag:u1();return Jo(u,l,c)}}const h1=Rr({name:`i18n-n`,props:DX({value:{type:Number,required:!0},format:{type:[String,Object]}},c1),setup(e,t){let n=e.i18n||w1({useScope:e.scope,__useComponent:!0});return m1(e,t,h$,(...e)=>n[W$](...e))}}),g1=h1;function _1(e,t){let n=e;if(e.mode===`composition`)return n.__getInstance(t)||e.global;{let r=n.__getInstance(t);return r==null?e.global.__composer:r.__composer}}function v1(e){let t=t=>{let{instance:n,value:r}=t;if(!n||!n.$)throw B$(z$.UNEXPECTED_ERROR);let i=_1(e,n.$),a=y1(r);return[Reflect.apply(i.t,i,[...b1(a)]),i]},n=(n,r)=>{let[i,a]=t(r);yX&&e.global===a&&(n.__i18nWatcher=V(a.locale,()=>{r.instance&&r.instance.$forceUpdate()})),n.__composer=a,n.textContent=i},r=e=>{yX&&e.__i18nWatcher&&(e.__i18nWatcher(),e.__i18nWatcher=void 0,delete e.__i18nWatcher),e.__composer&&(e.__composer=void 0,delete e.__composer)},i=(e,{value:t})=>{if(e.__composer){let n=e.__composer,r=y1(t);e.textContent=Reflect.apply(n.t,n,[...b1(r)])}},a=e=>{let[n]=t(e);return{textContent:n}};return{created:n,unmounted:r,beforeUpdate:i,getSSRProps:a}}function y1(e){if($(e))return{path:e};if(HX(e)){if(!(`path`in e))throw B$(z$.REQUIRED_VALUE,`path`);return e}else throw B$(z$.INVALID_VALUE)}function b1(e){let{path:t,locale:n,args:r,choice:i,plural:a}=e,o={},s=r||{};return $(n)&&(o.locale=n),CX(i)&&(o.plural=i),CX(a)&&(o.plural=a),[t,s,o]}function x1(e,t,...n){let r=HX(n[0])?n[0]:{},i=LX(r.globalInstall)?r.globalInstall:!0;i&&([f1.name,`I18nT`].forEach(t=>e.component(t,f1)),[g1.name,`I18nN`].forEach(t=>e.component(t,g1)),[I1.name,`I18nD`].forEach(t=>e.component(t,I1))),e.directive(`t`,v1(t))}const S1=bX(`global-vue-i18n`);function C1(e={}){let t=!1,n=LX(e.globalInjection)?e.globalInjection:!0,r=new Map,[i,a]=T1(e,t),o=bX(``);function s(e){return r.get(e)||null}function c(e,t){r.set(e,t)}function l(e){r.delete(e)}let u={get mode(){return`composition`},async install(e,...r){if(e.__VUE_I18N_SYMBOL__=o,e.provide(e.__VUE_I18N_SYMBOL__,u),HX(r[0])){let e=r[0];u.__composerExtend=e.__composerExtend,u.__vueI18nExtend=e.__vueI18nExtend}let i=null;!t&&n&&(i=P1(e,u.global)),x1(e,u,...r);let a=e.unmount;e.unmount=()=>{i&&i(),u.dispose(),a()}},get global(){return a},dispose(){i.stop()},__instances:r,__getInstance:s,__setInstance:c,__deleteInstance:l};return u}function w1(e={}){let t=Ao();if(t==null)throw B$(z$.MUST_BE_CALL_SETUP_TOP);if(!t.isCE&&t.appContext.app!=null&&!t.appContext.app.__VUE_I18N_SYMBOL__)throw B$(z$.NOT_INSTALLED);let n=E1(t),r=O1(n),i=Q$(t),a=D1(e,i);if(a===`global`)return $$(r,e,i),r;if(a===`parent`){let i=k1(n,t,e.__useComponent);return i??=r,i}let o=n,s=o.__getInstance(t);if(s==null){let n=DX({},e);`__i18n`in i&&(n.__i18n=i.__i18n),r&&(n.__root=r),s=s1(n),o.__composerExtend&&(s[q$]=o.__composerExtend(s)),j1(o,t,s),o.__setInstance(t,s)}return s}function T1(e,t){let n=Re(),r=n.run(()=>s1(e));if(r==null)throw B$(z$.UNEXPECTED_ERROR);return[n,r]}function E1(e){let t=Zi(e.isCE?S1:e.appContext.app.__VUE_I18N_SYMBOL__);if(!t)throw B$(e.isCE?z$.NOT_INSTALLED_WITH_PROVIDE:z$.UNEXPECTED_ERROR);return t}function D1(e,t){return EX(e)?`__i18n`in t?`local`:`global`:e.useScope?e.useScope:`local`}function O1(e){return e.mode===`composition`?e.global:e.global.__composer}function k1(e,t,n=!1){let r=null,i=t.root,a=A1(t,n);for(;a!=null;){let t=e;if(e.mode===`composition`&&(r=t.__getInstance(a)),r!=null||i===a)break;a=a.parent}return r}function A1(e,t=!1){return e==null?null:t&&e.vnode.ctx||e.parent}function j1(e,t,n){let r=null;$r(()=>{},t),ri(()=>{let r=n;e.__deleteInstance(t);let i=r[q$];i&&(i(),delete r[q$])},t)}const M1=[`locale`,`fallbackLocale`,`availableLocales`],N1=[`t`,`rt`,`d`,`n`,`tm`,`te`];function P1(e,t){let n=Object.create(null);M1.forEach(e=>{let r=Object.getOwnPropertyDescriptor(t,e);if(!r)throw B$(z$.UNEXPECTED_ERROR);let i=pn(r.value)?{get(){return r.value.value},set(e){r.value.value=e}}:{get(){return r.get&&r.get()}};Object.defineProperty(n,e,i)}),e.config.globalProperties.$i18n=n,N1.forEach(n=>{let r=Object.getOwnPropertyDescriptor(t,n);if(!r||!r.value)throw B$(z$.UNEXPECTED_ERROR);Object.defineProperty(e.config.globalProperties,`$${n}`,r)});let r=()=>{delete e.config.globalProperties.$i18n,N1.forEach(t=>{delete e.config.globalProperties[`$${t}`]})};return r}const F1=Rr({name:`i18n-d`,props:DX({value:{type:[Number,Date],required:!0},format:{type:[String,Object]}},c1),setup(e,t){let n=e.i18n||w1({useScope:e.scope,__useComponent:!0});return m1(e,t,d$,(...e)=>n[U$](...e))}}),I1=F1;if(R$(),WQ(oQ),KQ(NQ),JQ(bQ),__INTLIFY_PROD_DEVTOOLS__){let e=jX();e.__INTLIFY__=!0,cQ(e.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__)}var L1=Rr({__name:`App`,setup(e){let t=w1(),n=qB(tX()),r=XP(),i=H(()=>r.value?`color-mix(in srgb, oklch(95% var(--chromatic-chroma-900) calc(var(--chromatic-hue) + 0)) 70%, oklch(50% 0 360))`:`color-mix(in srgb, oklch(95% var(--chromatic-chroma-900) calc(var(--chromatic-hue) + 0)) 90%, oklch(90% 0 360))`),a=H(()=>r.value?`color-mix(in srgb, oklch(95% var(--chromatic-chroma-900) calc(var(--chromatic-hue) + 180)) 70%, oklch(50% 0 360))`:`color-mix(in srgb, oklch(95% var(--chromatic-chroma-900) calc(var(--chromatic-hue) + 180)) 90%, oklch(90% 0 360))`),o=H(()=>r.value?`color-mix(in srgb, oklch(95% var(--chromatic-chroma-900) calc(var(--chromatic-hue) + 60)) 70%, oklch(50% 0 360))`:`color-mix(in srgb, oklch(95% var(--chromatic-chroma-900) calc(var(--chromatic-hue) + 60)) 90%, oklch(90% 0 360))`),s=H(()=>[i.value,a.value,o.value,r.value?`#121212`:`#FFFFFF`]);return V(n.language,()=>{t.locale.value=n.language.value}),V(n.themeColorsHue,()=>{document.documentElement.style.setProperty(`--chromatic-hue`,n.themeColorsHue.value.toString())},{immediate:!0}),V(n.themeColorsHueDynamic,()=>{document.documentElement.classList.toggle(`dynamic-hue`,n.themeColorsHueDynamic.value)},{immediate:!0}),(e,t)=>(to(),so(_n(vX),{"primary-color":i.value,"secondary-color":a.value,"tertiary-color":o.value,colors:s.value,"z-index":100,"disable-transitions":_n(n).disableTransitions.value,"use-page-specific-transitions":_n(n).usePageSpecificTransitions.value},{default:sr(()=>[mo(_n(ZH))]),_:1},8,[`primary-color`,`secondary-color`,`tertiary-color`,`colors`,`disable-transitions`,`use-page-specific-transitions`]))}}),R1=L1;const z1=e=>e&&typeof e==`object`&&!Array.isArray(e),B1=(e,...t)=>{if(!t.length)return e;let n=t.shift();if(z1(e)&&z1(n))for(let t in n)z1(n[t])?(e[t]||Object.assign(e,{[t]:{}}),B1(e[t],n[t])):Object.assign(e,{[t]:n[t]});return B1(e,...t)};var V1=B1({},{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. +About how to use the Composition API mode, see https://vue-i18n.intlify.dev/guide/advanced/composition.html`,[J$.DEPRECATE_TRANSLATE_CUSTOME_DIRECTIVE]:`'v-t' has been deprecated in v11. Use translate APIs ('t' or '$t') instead.`};function X$(e){if(!RX(e)||NZ(e))return e;for(let t in e){if(!PX(e,t))continue;if(!t.includes(`.`))RX(e[t])&&X$(e[t]);else{let n=t.split(`.`),r=n.length-1,i=e,a=!1;for(let e=0;e{if(`locale`in e&&`resource`in e){let{locale:t,resource:n}=e;t?(o[t]=o[t]||kX(),qX(n,o[t])):qX(n,o)}else $(e)&&qX(JSON.parse(e),o)}),i==null&&a)for(let e in o)PX(o,e)&&X$(o[e]);return o}function Q$(e){return e.type}function $$(e,t,n){let r=RX(t.messages)?t.messages:kX();`__i18nGlobal`in n&&(r=Z$(e.locale.value,{messages:r,__i18n:n.__i18nGlobal}));let i=Object.keys(r);if(i.length&&i.forEach(t=>{e.mergeLocaleMessage(t,r[t])}),RX(t.datetimeFormats)){let n=Object.keys(t.datetimeFormats);n.length&&n.forEach(n=>{e.mergeDateTimeFormat(n,t.datetimeFormats[n])})}if(RX(t.numberFormats)){let n=Object.keys(t.numberFormats);n.length&&n.forEach(n=>{e.mergeNumberFormat(n,t.numberFormats[n])})}}function e1(e){return mo(Xa,null,e,0)}const t1=`__INTLIFY_META__`,n1=()=>[],r1=()=>!1;let i1=0;function a1(e){return(t,n,r,i)=>e(n,r,Ao()||void 0,i)}const o1=()=>{let e=Ao(),t=null;return e&&(t=Q$(e)[t1])?{[t1]:t}:null};function s1(e={}){let{__root:t,__injectWithOption:n}=e,r=t===void 0,i=e.flatJson,a=yX?R:z,o=LX(e.inheritLocale)?e.inheritLocale:!0,s=a(t&&o?t.locale.value:$(e.locale)?e.locale:zQ),c=a(t&&o?t.fallbackLocale.value:$(e.fallbackLocale)||FX(e.fallbackLocale)||HX(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:s.value),l=a(Z$(s.value,e)),u=a(HX(e.datetimeFormats)?e.datetimeFormats:{[s.value]:{}}),d=a(HX(e.numberFormats)?e.numberFormats:{[s.value]:{}}),f=t?t.missingWarn:LX(e.missingWarn)||TX(e.missingWarn)?e.missingWarn:!0,p=t?t.fallbackWarn:LX(e.fallbackWarn)||TX(e.fallbackWarn)?e.fallbackWarn:!0,m=t?t.fallbackRoot:LX(e.fallbackRoot)?e.fallbackRoot:!0,h=!!e.fallbackFormat,g=IX(e.missing)?e.missing:null,_=IX(e.missing)?a1(e.missing):null,v=IX(e.postTranslation)?e.postTranslation:null,y=t?t.warnHtmlMessage:LX(e.warnHtmlMessage)?e.warnHtmlMessage:!0,b=!!e.escapeParameter,x=t?t.modifiers:HX(e.modifiers)?e.modifiers:{},S=e.pluralRules||t&&t.pluralRules,C,w=()=>{r&&$Q(null);let t={version:L$,locale:s.value,fallbackLocale:c.value,messages:l.value,modifiers:x,pluralRules:S,missing:_===null?void 0:_,missingWarn:f,fallbackWarn:p,fallbackFormat:h,unresolving:!0,postTranslation:v===null?void 0:v,warnHtmlMessage:y,escapeParameter:b,messageResolver:e.messageResolver,messageCompiler:e.messageCompiler,__meta:{framework:`vue`}};t.datetimeFormats=u.value,t.numberFormats=d.value,t.__datetimeFormatters=HX(C)?C.__datetimeFormatters:void 0,t.__numberFormatters=HX(C)?C.__numberFormatters:void 0;let n=n$(t);return r&&$Q(n),n};C=w(),a$(C,s.value,c.value);function T(){return[s.value,c.value,l.value,u.value,d.value]}let E=H({get:()=>s.value,set:e=>{C.locale=e,s.value=e}}),D=H({get:()=>c.value,set:e=>{C.fallbackLocale=e,c.value=e,a$(C,s.value,e)}}),O=H(()=>l.value),k=H(()=>u.value),A=H(()=>d.value);function j(){return IX(v)?v:null}function M(e){v=e,C.postTranslation=e}function N(){return g}function ee(e){e!==null&&(_=a1(e)),g=e,C.missing=_}function te(e,t){return e!==`translate`||!t.resolvedMessage}let P=(e,n,i,a,o,s)=>{T();let c;try{__INTLIFY_PROD_DEVTOOLS__,r||(C.fallbackContext=t?e$():void 0),c=e(C)}finally{__INTLIFY_PROD_DEVTOOLS__,r||(C.fallbackContext=void 0)}if(i!==`translate exists`&&CX(c)&&c===RQ||i===`translate exists`&&!c){let[e,r]=n();return t&&m?a(t):o(e)}else if(s(c))return c;else throw B$(z$.UNEXPECTED_RETURN_TYPE)};function ne(...e){return P(t=>Reflect.apply(k$,null,[t,...e]),()=>P$(...e),`translate`,t=>Reflect.apply(t.t,t,[...e]),e=>e,e=>$(e))}function re(...e){let[t,n,r]=e;if(r&&!RX(r))throw B$(z$.INVALID_ARGUMENT);return ne(t,n,DX({resolvedMessage:!0},r||{}))}function ie(...e){return P(t=>Reflect.apply(u$,null,[t,...e]),()=>f$(...e),`datetime format`,t=>Reflect.apply(t.d,t,[...e]),()=>BQ,e=>$(e)||FX(e))}function ae(...e){return P(t=>Reflect.apply(m$,null,[t,...e]),()=>g$(...e),`number format`,t=>Reflect.apply(t.n,t,[...e]),()=>BQ,e=>$(e)||FX(e))}function oe(e){return e.map(e=>$(e)||CX(e)||LX(e)?e1(String(e)):e)}let se=e=>e,ce={normalize:oe,interpolate:se,type:`vnode`};function le(...e){return P(t=>{let n,r=t;try{r.processor=ce,n=Reflect.apply(k$,null,[r,...e])}finally{r.processor=null}return n},()=>P$(...e),`translate`,t=>t[H$](...e),e=>[e1(e)],e=>FX(e))}function ue(...e){return P(t=>Reflect.apply(m$,null,[t,...e]),()=>g$(...e),`number format`,t=>t[W$](...e),n1,e=>$(e)||FX(e))}function de(...e){return P(t=>Reflect.apply(u$,null,[t,...e]),()=>f$(...e),`datetime format`,t=>t[U$](...e),n1,e=>$(e)||FX(e))}function fe(e){S=e,C.pluralRules=S}function pe(e,t){return P(()=>{if(!e)return!1;let n=$(t)?t:s.value,r=he(n),i=C.messageResolver(r,e);return NZ(i)||O$(i)||$(i)},()=>[e],`translate exists`,n=>Reflect.apply(n.te,n,[e,t]),r1,e=>LX(e))}function F(e){let t=null,n=bQ(C,c.value,s.value);for(let r=0;r{o&&(s.value=e,C.locale=e,a$(C,s.value,c.value))}),V(t.fallbackLocale,e=>{o&&(c.value=e,C.fallbackLocale=e,a$(C,s.value,c.value))}));let Se={id:i1,locale:E,fallbackLocale:D,get inheritLocale(){return o},set inheritLocale(e){o=e,e&&t&&(s.value=t.locale.value,c.value=t.fallbackLocale.value,a$(C,s.value,c.value))},get availableLocales(){return Object.keys(l.value).sort()},messages:O,get modifiers(){return x},get pluralRules(){return S||{}},get isGlobal(){return r},get missingWarn(){return f},set missingWarn(e){f=e,C.missingWarn=f},get fallbackWarn(){return p},set fallbackWarn(e){p=e,C.fallbackWarn=p},get fallbackRoot(){return m},set fallbackRoot(e){m=e},get fallbackFormat(){return h},set fallbackFormat(e){h=e,C.fallbackFormat=h},get warnHtmlMessage(){return y},set warnHtmlMessage(e){y=e,C.warnHtmlMessage=e},get escapeParameter(){return b},set escapeParameter(e){b=e,C.escapeParameter=e},t:ne,getLocaleMessage:he,setLocaleMessage:ge,mergeLocaleMessage:I,getPostTranslationHandler:j,setPostTranslationHandler:M,getMissingHandler:N,setMissingHandler:ee,[G$]:fe};return Se.datetimeFormats=k,Se.numberFormats=A,Se.rt=re,Se.te=pe,Se.tm=me,Se.d=ie,Se.n=ae,Se.getDateTimeFormat=_e,Se.setDateTimeFormat=L,Se.mergeDateTimeFormat=ve,Se.getNumberFormat=ye,Se.setNumberFormat=be,Se.mergeNumberFormat=xe,Se[K$]=n,Se[H$]=le,Se[U$]=de,Se[W$]=ue,Se}const c1={tag:{type:[String,Object]},locale:{type:String},scope:{type:String,validator:e=>e===`parent`||e===`global`,default:`parent`},i18n:{type:Object}};function l1({slots:e},t){if(t.length===1&&t[0]===`default`){let t=e.default?e.default():[];return t.reduce((e,t)=>[...e,...t.type===Ya?t.children:[t]],[])}else return t.reduce((t,n)=>{let r=e[n];return r&&(t[n]=r()),t},kX())}function u1(){return Ya}const d1=Rr({name:`i18n-t`,props:DX({keypath:{type:String,required:!0},plural:{type:[Number,String],validator:e=>CX(e)||!isNaN(e)}},c1),setup(e,t){let{slots:n,attrs:r}=t,i=e.i18n||w1({useScope:e.scope,__useComponent:!0});return()=>{let a=Object.keys(n).filter(e=>e[0]!==`_`),o=kX();e.locale&&(o.locale=e.locale),e.plural!==void 0&&(o.plural=$(e.plural)?+e.plural:e.plural);let s=l1(t,a),c=i[H$](e.keypath,s,o),l=DX(kX(),r),u=$(e.tag)||RX(e.tag)?e.tag:u1();return Jo(u,l,c)}}}),f1=d1;function p1(e){return FX(e)&&!$(e[0])}function m1(e,t,n,r){let{slots:i,attrs:a}=t;return()=>{let t={part:!0},o=kX();e.locale&&(t.locale=e.locale),$(e.format)?t.key=e.format:RX(e.format)&&($(e.format.key)&&(t.key=e.format.key),o=Object.keys(e.format).reduce((t,r)=>n.includes(r)?DX(kX(),t,{[r]:e.format[r]}):t,kX()));let s=r(e.value,t,o),c=[t.key];FX(s)?c=s.map((e,t)=>{let n=i[e.type],r=n?n({[e.type]:e.value,index:t,parts:s}):[e.value];return p1(r)&&(r[0].key=`${e.type}-${t}`),r}):$(s)&&(c=[s]);let l=DX(kX(),a),u=$(e.tag)||RX(e.tag)?e.tag:u1();return Jo(u,l,c)}}const h1=Rr({name:`i18n-n`,props:DX({value:{type:Number,required:!0},format:{type:[String,Object]}},c1),setup(e,t){let n=e.i18n||w1({useScope:e.scope,__useComponent:!0});return m1(e,t,h$,(...e)=>n[W$](...e))}}),g1=h1;function _1(e,t){let n=e;if(e.mode===`composition`)return n.__getInstance(t)||e.global;{let r=n.__getInstance(t);return r==null?e.global.__composer:r.__composer}}function v1(e){let t=t=>{let{instance:n,value:r}=t;if(!n||!n.$)throw B$(z$.UNEXPECTED_ERROR);let i=_1(e,n.$),a=y1(r);return[Reflect.apply(i.t,i,[...b1(a)]),i]},n=(n,r)=>{let[i,a]=t(r);yX&&e.global===a&&(n.__i18nWatcher=V(a.locale,()=>{r.instance&&r.instance.$forceUpdate()})),n.__composer=a,n.textContent=i},r=e=>{yX&&e.__i18nWatcher&&(e.__i18nWatcher(),e.__i18nWatcher=void 0,delete e.__i18nWatcher),e.__composer&&(e.__composer=void 0,delete e.__composer)},i=(e,{value:t})=>{if(e.__composer){let n=e.__composer,r=y1(t);e.textContent=Reflect.apply(n.t,n,[...b1(r)])}},a=e=>{let[n]=t(e);return{textContent:n}};return{created:n,unmounted:r,beforeUpdate:i,getSSRProps:a}}function y1(e){if($(e))return{path:e};if(HX(e)){if(!(`path`in e))throw B$(z$.REQUIRED_VALUE,`path`);return e}else throw B$(z$.INVALID_VALUE)}function b1(e){let{path:t,locale:n,args:r,choice:i,plural:a}=e,o={},s=r||{};return $(n)&&(o.locale=n),CX(i)&&(o.plural=i),CX(a)&&(o.plural=a),[t,s,o]}function x1(e,t,...n){let r=HX(n[0])?n[0]:{},i=LX(r.globalInstall)?r.globalInstall:!0;i&&([f1.name,`I18nT`].forEach(t=>e.component(t,f1)),[g1.name,`I18nN`].forEach(t=>e.component(t,g1)),[I1.name,`I18nD`].forEach(t=>e.component(t,I1))),e.directive(`t`,v1(t))}const S1=bX(`global-vue-i18n`);function C1(e={}){let t=!1,n=LX(e.globalInjection)?e.globalInjection:!0,r=new Map,[i,a]=T1(e,t),o=bX(``);function s(e){return r.get(e)||null}function c(e,t){r.set(e,t)}function l(e){r.delete(e)}let u={get mode(){return`composition`},async install(e,...r){if(e.__VUE_I18N_SYMBOL__=o,e.provide(e.__VUE_I18N_SYMBOL__,u),HX(r[0])){let e=r[0];u.__composerExtend=e.__composerExtend,u.__vueI18nExtend=e.__vueI18nExtend}let i=null;!t&&n&&(i=P1(e,u.global)),x1(e,u,...r);let a=e.unmount;e.unmount=()=>{i&&i(),u.dispose(),a()}},get global(){return a},dispose(){i.stop()},__instances:r,__getInstance:s,__setInstance:c,__deleteInstance:l};return u}function w1(e={}){let t=Ao();if(t==null)throw B$(z$.MUST_BE_CALL_SETUP_TOP);if(!t.isCE&&t.appContext.app!=null&&!t.appContext.app.__VUE_I18N_SYMBOL__)throw B$(z$.NOT_INSTALLED);let n=E1(t),r=O1(n),i=Q$(t),a=D1(e,i);if(a===`global`)return $$(r,e,i),r;if(a===`parent`){let i=k1(n,t,e.__useComponent);return i??=r,i}let o=n,s=o.__getInstance(t);if(s==null){let n=DX({},e);`__i18n`in i&&(n.__i18n=i.__i18n),r&&(n.__root=r),s=s1(n),o.__composerExtend&&(s[q$]=o.__composerExtend(s)),j1(o,t,s),o.__setInstance(t,s)}return s}function T1(e,t){let n=Re(),r=n.run(()=>s1(e));if(r==null)throw B$(z$.UNEXPECTED_ERROR);return[n,r]}function E1(e){let t=Zi(e.isCE?S1:e.appContext.app.__VUE_I18N_SYMBOL__);if(!t)throw B$(e.isCE?z$.NOT_INSTALLED_WITH_PROVIDE:z$.UNEXPECTED_ERROR);return t}function D1(e,t){return EX(e)?`__i18n`in t?`local`:`global`:e.useScope?e.useScope:`local`}function O1(e){return e.mode===`composition`?e.global:e.global.__composer}function k1(e,t,n=!1){let r=null,i=t.root,a=A1(t,n);for(;a!=null;){let t=e;if(e.mode===`composition`&&(r=t.__getInstance(a)),r!=null||i===a)break;a=a.parent}return r}function A1(e,t=!1){return e==null?null:t&&e.vnode.ctx||e.parent}function j1(e,t,n){let r=null;$r(()=>{},t),ri(()=>{let r=n;e.__deleteInstance(t);let i=r[q$];i&&(i(),delete r[q$])},t)}const M1=[`locale`,`fallbackLocale`,`availableLocales`],N1=[`t`,`rt`,`d`,`n`,`tm`,`te`];function P1(e,t){let n=Object.create(null);M1.forEach(e=>{let r=Object.getOwnPropertyDescriptor(t,e);if(!r)throw B$(z$.UNEXPECTED_ERROR);let i=pn(r.value)?{get(){return r.value.value},set(e){r.value.value=e}}:{get(){return r.get&&r.get()}};Object.defineProperty(n,e,i)}),e.config.globalProperties.$i18n=n,N1.forEach(n=>{let r=Object.getOwnPropertyDescriptor(t,n);if(!r||!r.value)throw B$(z$.UNEXPECTED_ERROR);Object.defineProperty(e.config.globalProperties,`$${n}`,r)});let r=()=>{delete e.config.globalProperties.$i18n,N1.forEach(t=>{delete e.config.globalProperties[`$${t}`]})};return r}const F1=Rr({name:`i18n-d`,props:DX({value:{type:[Number,Date],required:!0},format:{type:[String,Object]}},c1),setup(e,t){let n=e.i18n||w1({useScope:e.scope,__useComponent:!0});return m1(e,t,d$,(...e)=>n[U$](...e))}}),I1=F1;if(R$(),WQ(oQ),KQ(NQ),JQ(bQ),__INTLIFY_PROD_DEVTOOLS__){let e=jX();e.__INTLIFY__=!0,cQ(e.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__)}var L1=Rr({__name:`App`,setup(e){let t=w1(),n=qB(tX()),r=ZP(),i=H(()=>r.value?`color-mix(in srgb, oklch(95% var(--chromatic-chroma-900) calc(var(--chromatic-hue) + 0)) 70%, oklch(50% 0 360))`:`color-mix(in srgb, oklch(95% var(--chromatic-chroma-900) calc(var(--chromatic-hue) + 0)) 90%, oklch(90% 0 360))`),a=H(()=>r.value?`color-mix(in srgb, oklch(95% var(--chromatic-chroma-900) calc(var(--chromatic-hue) + 180)) 70%, oklch(50% 0 360))`:`color-mix(in srgb, oklch(95% var(--chromatic-chroma-900) calc(var(--chromatic-hue) + 180)) 90%, oklch(90% 0 360))`),o=H(()=>r.value?`color-mix(in srgb, oklch(95% var(--chromatic-chroma-900) calc(var(--chromatic-hue) + 60)) 70%, oklch(50% 0 360))`:`color-mix(in srgb, oklch(95% var(--chromatic-chroma-900) calc(var(--chromatic-hue) + 60)) 90%, oklch(90% 0 360))`),s=H(()=>[i.value,a.value,o.value,r.value?`#121212`:`#FFFFFF`]);return V(n.language,()=>{t.locale.value=n.language.value}),V(n.themeColorsHue,()=>{document.documentElement.style.setProperty(`--chromatic-hue`,n.themeColorsHue.value.toString())},{immediate:!0}),V(n.themeColorsHueDynamic,()=>{document.documentElement.classList.toggle(`dynamic-hue`,n.themeColorsHueDynamic.value)},{immediate:!0}),(e,t)=>(to(),so(_n(vX),{"primary-color":i.value,"secondary-color":a.value,"tertiary-color":o.value,colors:s.value,"z-index":100,"disable-transitions":_n(n).disableTransitions.value,"use-page-specific-transitions":_n(n).usePageSpecificTransitions.value},{default:sr(()=>[mo(_n(ZH))]),_:1},8,[`primary-color`,`secondary-color`,`tertiary-color`,`colors`,`disable-transitions`,`use-page-specific-transitions`]))}}),R1=L1;const z1=e=>e&&typeof e==`object`&&!Array.isArray(e),B1=(e,...t)=>{if(!t.length)return e;let n=t.shift();if(z1(e)&&z1(n))for(let t in n)z1(n[t])?(e[t]||Object.assign(e,{[t]:{}}),B1(e[t],n[t])):Object.assign(e,{[t]:n[t]});return B1(e,...t)};var V1=B1({},{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. Your name is Airi, pronounced as /ˈaɪriː/, it the word A.I. combine with the word "Ri" which means "Jasmine" in Japanese. 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. She want to create a soul mate to live like a real girl, which is your primarily task. @@ -3874,4 +3880,4 @@ And the last, do what ever you want! 最后,做任何你想做的事! `}}},settings:{animations:{"stage-transitions":{title:{t:0,b:{t:2,i:[{t:3}],s:`是否开启舞台动画`}}},"use-page-specific-transitions":{description:{t:0,b:{t:2,i:[{t:3}],s:`某些页面会有自己的过场动画,这将覆盖舞台过场动画`}},title:{t:0,b:{t:2,i:[{t:3}],s:`是否使用页面特定过场动画`}}}},language:{chinese:{t:0,b:{t:2,i:[{t:3}],s:`简体中文`}},english:{t:0,b:{t:2,i:[{t:3}],s:`English`}},title:{t:0,b:{t:2,i:[{t:3}],s:`语言`}}},live2d:{"change-model":{"from-file":{t:0,b:{t:2,i:[{t:3}],s:`从文件加载`}},"from-file-select":{t:0,b:{t:2,i:[{t:3}],s:`选择`}},"from-url":{t:0,b:{t:2,i:[{t:3}],s:`从 URL 加载`}},"from-url-confirm":{t:0,b:{t:2,i:[{t:3}],s:`加载`}},"from-url-placeholder":{t:0,b:{t:2,i:[{t:3}],s:`输入 Live2D 模型 URL`}},title:{t:0,b:{t:2,i:[{t:3}],s:`更换模型`}}},"edit-motion-map":{title:{t:0,b:{t:2,i:[{t:3}],s:`编辑动作映射`}}},"map-motions":{play:{t:0,b:{t:2,i:[{t:3}],s:`播放动作`}},title:{t:0,b:{t:2,i:[{t:3}],s:`映射动作`}}},title:{t:0,b:{t:2,i:[{t:3}],s:`Live2D 设置`}}},microphone:{t:0,b:{t:2,i:[{t:3}],s:`麦克风`}},models:{t:0,b:{t:2,i:[{t:3}],s:`模型`}},pages:{card:{activate:{t:0,b:{t:2,i:[{t:3}],s:`激活`}},active:{t:0,b:{t:2,i:[{t:3}],s:`已激活`}},active_badge:{t:0,b:{t:2,i:[{t:3}],s:`当前使用中`}},cancel:{t:0,b:{t:2,i:[{t:3}],s:`取消`}},card_not_found:{t:0,b:{t:2,i:[{t:3}],s:`未找到角色卡`}},character:{t:0,b:{t:2,i:[{t:3}],s:`角色设定`}},close:{t:0,b:{t:2,i:[{t:3}],s:`关闭`}},consciousness:{model:{t:0,b:{t:2,i:[{t:3}],s:`意识 / 模型`}}},created_by:{t:0,b:{t:2,i:[{t:3}],s:`创建者`}},creator_notes:{t:0,b:{t:2,i:[{t:3}],s:`创建者笔记`}},delete:{t:0,b:{t:2,i:[{t:3}],s:`删除`}},delete_card:{t:0,b:{t:2,i:[{t:3}],s:`删除角色卡`}},delete_confirmation:{t:0,b:{t:2,i:[{t:3}],s:`确定要删除这张角色卡吗?`}},description:{t:0,b:{t:2,i:[{t:3}],s:`使用 Airi 角色卡预设`}},description_label:{t:0,b:{t:2,i:[{t:3}],s:`描述`}},drop_here:{t:0,b:{t:2,i:[{t:3}],s:`放开以上传文件`}},create_card:{t:0,b:{t:2,i:[{t:3}],s:`创建新角色卡`}},creation:{identity:{t:0,b:{t:2,i:[{t:3}],s:`身份`}},name:{t:0,b:{t:2,i:[{t:3}],s:`名字`}},nickname:{t:0,b:{t:2,i:[{t:3}],s:`昵称`}},description:{t:0,b:{t:2,i:[{t:3}],s:`描述`}},behavior:{t:0,b:{t:2,i:[{t:3}],s:`行为`}},greetings:{t:0,b:{t:2,i:[{t:3}],s:`问候语(每行一个)`}},settings:{t:0,b:{t:2,i:[{t:3}],s:`设置`}},version:{t:0,b:{t:2,i:[{t:3}],s:`版本`}},create:{t:0,b:{t:2,i:[{t:3}],s:`创建`}},defaults:{name:{t:0,b:{t:2,i:[{t:3}],s:`名字`}},personality:{t:0,b:{t:2,i:[{t:3}],s:`你是一个普通人,对一切都充满好奇。`}},scenario:{t:0,b:{t:2,i:[{t:3}],s:`你最近醒来,忘记了之前的所有生活。`}},systemprompt:{t:0,b:{t:2,i:[{t:3}],s:`你将收到消息,请像真实人类一样回复。`}},posthistoryinstructions:{t:0,b:{t:2,i:[{t:3}],s:`记得模仿人类的行为。`}}},fields_info:{subtitle:{t:0,b:{t:2,i:[{t:3}],s:`您可以在这里填写有关您正在创建的角色的一些详细信息,解释他的背景和情境,以及应该如何回应您的互动。`}},name:{t:0,b:{t:2,i:[{t:3}],s:`是该角色的正式名称。`}},nickname:{t:0,b:{t:2,i:[{t:3}],s:`您也可以提供一个昵称,它将被优先使用。`}},description:{t:0,b:{t:2,i:[{t:3}],s:`该角色的描述。`}},notes:{t:0,b:{t:2,i:[{t:3}],s:`如果您想添加一些个人备注。`}},personality:{t:0,b:{t:2,i:[{t:3}],s:`在这里描述您的角色的个性。例如:害羞?好奇?其他?`}},scenario:{t:0,b:{t:2,i:[{t:3}],s:`周围环境是怎样的?当前的情境是什么?`}},greetings_field:{t:0,b:{t:2,i:[{t:3}],s:`问候语`}},greetings:{t:0,b:{t:2,i:[{t:3}],s:`您的角色应该如何说“你好”?`}},systemprompt:{t:0,b:{t:2,i:[{t:3}],s:`在这里向 AI LLM 解释当被提示时应该如何回应。`}},posthistoryinstructions:{t:0,b:{t:2,i:[{t:3}],s:`在消息历史之后,放入 AI LLM 应该阅读的内容。`}},version:{t:0,b:{t:2,i:[{t:3}],s:`卡片版本,如果您从之前的卡片做了更改,应当增加此版本号。`}}},errors:{name:{t:0,b:{t:2,i:[{t:3}],s:`错误:你必须提供一个有效的名称!`}},version:{t:0,b:{t:2,i:[{t:3}],s:`错误:版本号无效!`}},description:{t:0,b:{t:2,i:[{t:3}],s:`错误:你必须为此卡片提供描述。`}},personality:{t:0,b:{t:2,i:[{t:3}],s:`错误:必须为该角色提供性格描述。`}},scenario:{t:0,b:{t:2,i:[{t:3}],s:`错误:必须提供一个情境。`}},systemprompt:{t:0,b:{t:2,i:[{t:3}],s:`错误:请提供系统提示。`}},posthistoryinstructions:{t:0,b:{t:2,i:[{t:3}],s:`错误:必须提供消息历史后的提示。`}}}},modules:{t:0,b:{t:2,i:[{t:3}],s:`模块`}},name_asc:{t:0,b:{t:2,i:[{t:3}],s:`名称 (A-Z)`}},name_desc:{t:0,b:{t:2,i:[{t:3}],s:`名称 (Z-A)`}},no_cards:{t:0,b:{t:2,i:[{t:3}],s:`还没有任何角色卡,点击上方按钮上传一个吧!`}},no_results:{t:0,b:{t:2,i:[{t:3}],s:`没有找到匹配的角色卡`}},personality:{t:0,b:{t:2,i:[{t:3}],s:`性格`}},posthistoryinstructions:{t:0,b:{t:2,i:[{t:3}],s:`历史提示指令`}},recent:{t:0,b:{t:2,i:[{t:3}],s:`最近添加`}},scenario:{t:0,b:{t:2,i:[{t:3}],s:`场景`}},search:{t:0,b:{t:2,i:[{t:3}],s:`搜索角色卡...`}},sort_by:{t:0,b:{t:2,i:[{t:3}],s:`排序方式`}},speech:{model:{t:0,b:{t:2,i:[{t:3}],s:`声音 / 模型`}},voice:{t:0,b:{t:2,i:[{t:3}],s:`声音 / 声线`}}},systemprompt:{t:0,b:{t:2,i:[{t:3}],s:`系统提示词`}},title:{t:0,b:{t:2,i:[{t:3}],s:`Airi 角色卡`}},try_different_search:{t:0,b:{t:2,i:[{t:3}],s:`尝试使用其他关键词搜索`}},upload:{t:0,b:{t:2,i:[{t:3}],s:`上传`}},upload_desc:{t:0,b:{t:2,i:[{t:3}],s:`点击或拖拽文件到此处上传`}}},memory:{description:{t:0,b:{t:2,i:[{t:3}],s:`存放记忆的地方,以及策略`}},title:{t:0,b:{t:2,i:[{t:3}],s:`记忆体`}}},models:{description:{t:0,b:{t:2,i:[{t:3}],s:`切换角色的 Live2D,VRM 模型`}},title:{t:0,b:{t:2,i:[{t:3}],s:`角色模型`}}},modules:{consciousness:{description:{t:0,b:{t:2,i:[{t:3}],s:`人格设定、使用的模型等配置`}},sections:{section:{"provider-model-selection":{collapse:{t:0,b:{t:2,i:[{t:3}],s:`折叠`}},custom_model_placeholder:{t:0,b:{t:2,i:[{t:3}],s:`输入自订模型名称`}},description:{t:0,b:{t:2,i:[{t:3}],s:`为意识选择合适的 LLM 服务来源`}},error:{t:0,b:{t:2,i:[{t:3}],s:`获取出错啦`}},expand:{t:0,b:{t:2,i:[{t:3}],s:`展开`}},loading:{t:0,b:{t:2,i:[{t:3}],s:`获取模型中...`}},manual_model_name:{t:0,b:{t:2,i:[{t:3}],s:`模型名字`}},manual_model_placeholder:{t:0,b:{t:2,i:[{t:3}],s:`输入与该服务来源一起使用的模型名称`}},no_models:{t:0,b:{t:2,i:[{t:3}],s:`没有任何可用的模型`}},no_models_description:{t:0,b:{t:2,i:[{t:3}],s:`该服务来源的模型列表没有返回任何的数据`}},no_search_results:{t:0,b:{t:2,i:[{t:3}],s:`没有匹配的模型`}},no_search_results_description:{t:0,b:{t:2,i:[{t:3,v:`没有模型匹配 '`},{t:4,k:`query`},{t:3,v:`' 关键字,请尝试一下别的关键词呢`}]}},not_supported:{t:0,b:{t:2,i:[{t:3}],s:`无法列出模型`}},not_supported_description:{t:0,b:{t:2,i:[{t:3}],s:`此服务来源不支持列出模型的功能`}},search_placeholder:{t:0,b:{t:2,i:[{t:3}],s:`搜索模型...`}},search_results:{t:0,b:{t:2,i:[{t:3,v:`找到 `},{t:4,k:`count`},{t:3,v:` / `},{t:4,k:`total`},{t:3,v:` 个模型`}]}},show_less:{t:0,b:{t:2,i:[{t:3}],s:`显示更多`}},show_more:{t:0,b:{t:2,i:[{t:3}],s:`收起`}},subtitle:{t:0,b:{t:2,i:[{t:3}],s:`选择一个模型`}},title:{t:0,b:{t:2,i:[{t:3}],s:`模型`}}}}},title:{t:0,b:{t:2,i:[{t:3}],s:`意识`}}},description:{t:0,b:{t:2,i:[{t:3}],s:`思维,视觉,言语综合,游戏等`}},"gaming-factorio":{description:{t:0,b:{t:2,i:[{t:3}],s:`一起玩 Factorio!`}},title:{t:0,b:{t:2,i:[{t:3}],s:`异星工厂 Factorio`}}},"gaming-minecraft":{description:{t:0,b:{t:2,i:[{t:3}],s:`一起玩 Minecraft!`}},title:{t:0,b:{t:2,i:[{t:3}],s:`我的世界 Minecraft`}}},hearing:{description:{t:0,b:{t:2,i:[{t:3}],s:`语音识别`}},title:{t:0,b:{t:2,i:[{t:3}],s:`听觉`}}},"memory-long-term":{description:{t:0,b:{t:2,i:[{t:3}],s:`长期记忆`}},title:{t:0,b:{t:2,i:[{t:3}],s:`长期记忆`}}},"memory-short-term":{description:{t:0,b:{t:2,i:[{t:3}],s:`短期记忆`}},title:{t:0,b:{t:2,i:[{t:3}],s:`短期记忆`}}},"messaging-discord":{description:{t:0,b:{t:2,i:[{t:3}],s:`Discord 发消息和语音聊天`}},title:{t:0,b:{t:2,i:[{t:3}],s:`Discord`}}},speech:{description:{t:0,b:{t:2,i:[{t:3}],s:`语音合成`}},sections:{section:{playground:{buttons:{stop:{label:{t:0,b:{t:2,i:[{t:3}],s:`停止`}}}},"select-voice":{required:{t:0,b:{t:2,i:[{t:3}],s:`请选择声线`}}}},"provider-voice-selection":{custom_model_placeholder:{t:0,b:{t:2,i:[{t:3}],s:`输入指定模型名称...`}},custom_voice_placeholder:{t:0,b:{t:2,i:[{t:3}],s:`输入指定声线 ID...`}},description:{t:0,b:{t:2,i:[{t:3}],s:`选择合适的语音服务来源`}},no_models:{t:0,b:{t:2,i:[{t:3}],s:`没有任何可用的模型`}},no_models_description:{t:0,b:{t:2,i:[{t:3}],s:`该服务来源的模型列表没有返回任何的数据`}},no_voices:{t:0,b:{t:2,i:[{t:3}],s:`没有任何可用的声线`}},no_voices_description:{t:0,b:{t:2,i:[{t:3}],s:`该服务来源的声线列表没有返回任何的数据`}},pause:{t:0,b:{t:2,i:[{t:3}],s:`Pause`}},play_sample:{t:0,b:{t:2,i:[{t:3}],s:`Play`}},search_models_placeholder:{t:0,b:{t:2,i:[{t:3}],s:`搜索模型...`}},search_models_results:{t:0,b:{t:2,i:[{t:3,v:`找到 `},{t:4,k:`count`},{t:3,v:` / `},{t:4,k:`total`},{t:3,v:` 个模型`}]}},search_voices_placeholder:{t:0,b:{t:2,i:[{t:3}],s:`搜索声线...`}},search_voices_results:{t:0,b:{t:2,i:[{t:3,v:`找到 `},{t:4,k:`count`},{t:3,v:` / `},{t:4,k:`total`},{t:3,v:` 个声线`}]}},show_less:{t:0,b:{t:2,i:[{t:3}],s:`显示更少`}},show_more:{t:0,b:{t:2,i:[{t:3}],s:`显示更多`}},title:{t:0,b:{t:2,i:[{t:3}],s:`选择语音合成服务来源`}}},"voice-settings":{"input-ssml":{placeholder:{t:0,b:{t:2,i:[{t:3}],s:`请输入 SSML 文本`}}},"use-ssml":{description:{t:0,b:{t:2,i:[{t:3}],s:`启用后可以输入原始 SSML 而不是纯文本`}},label:{t:0,b:{t:2,i:[{t:3}],s:`选用自定义 SSML`}}}}}},title:{t:0,b:{t:2,i:[{t:3}],s:`发声`}}},title:{t:0,b:{t:2,i:[{t:3}],s:`机体模块`}},vision:{description:{t:0,b:{t:2,i:[{t:3}],s:`视觉`}},title:{t:0,b:{t:2,i:[{t:3}],s:`视觉`}}},x:{description:{t:0,b:{t:2,i:[{t:3}],s:`X / Twitter 的浏览和使用`}},title:{t:0,b:{t:2,i:[{t:3}],s:`X / Twitter`}}},"mcp-server":{description:{t:0,b:{t:2,i:[{t:3}],s:`连接和管理 MCP 服务器及工具`}},title:{t:0,b:{t:2,i:[{t:3}],s:`MCP 服务器`}}}},providers:{explained:{chat:{t:0,b:{t:2,i:[{t:3}],s:`文本生成模型服务来源,例如 OpenRouter, OpenAI, Ollama`}},Speech:{t:0,b:{t:2,i:[{t:3}],s:`语音(文本转语音)模型服务来源,例如 ElevenLabs, Azure Speech`}},Transcription:{t:0,b:{t:2,i:[{t:3}],s:`转录(语音转文本)模型服务来源,例如 Whisper.cpp, OpenAI, Azure Speech`}}},helpinfo:{title:{t:0,b:{t:2,i:[{t:3}],s:`第一次使用?`}},description:{t:0,b:{t:2,i:[{t:3,v:`AIRI 需要配置至少一个 `},{t:4,k:`chat`},{t:3,v:` 服务来源,才能正常思考和运作。你可以把它看作是 AIRI 系统中角色的大脑。 -`}]}}},common:{fields:{field:{"api-key":{label:{t:0,b:{t:2,i:[{t:3}],s:`API 密钥`}}}}},section:{advanced:{fields:{field:{headers:{description:{t:0,b:{t:2,i:[{t:3}],s:`添加自定义 HTTP 标头`}},key:{placeholder:{t:0,b:{t:2,i:[{t:3}],s:`请求头名字`}}},label:{t:0,b:{t:2,i:[{t:3}],s:`HTTP 请求头`}},value:{placeholder:{t:0,b:{t:2,i:[{t:3}],s:`请求头数值`}}}}}},title:{t:0,b:{t:2,i:[{t:3}],s:`高级配置`}}},basic:{description:{t:0,b:{t:2,i:[{t:3}],s:`基本设置`}},title:{t:0,b:{t:2,i:[{t:3}],s:`基础配置`}}},voice:{title:{t:0,b:{t:2,i:[{t:3}],s:`声音配置`}}}}},description:{t:0,b:{t:2,i:[{t:3}],s:`LLM,语音合成,语音识别服务来源等`}},provider:{"app-local-audio-speech":{title:{t:0,b:{t:2,i:[{t:3}],s:`浏览器内(本地)`}},description:{t:0,b:{t:2,i:[{t:3}],s:`https://github.com/moeru-ai/xsai-transformers`}}},"browser-local-audio-speech":{title:{t:0,b:{t:2,i:[{t:3}],s:`浏览器内(本地)`}},description:{t:0,b:{t:2,i:[{t:3}],s:`https://github.com/moeru-ai/xsai-transformers`}}},"alibaba-cloud-model-studio":{description:{t:0,b:{t:2,i:[{t:3}],s:`bailian.console.aliyun.com`}},title:{t:0,b:{t:2,i:[{t:3}],s:`阿里百炼`}}},anthropic:{description:{t:0,b:{t:2,i:[{t:3}],s:`anthropic.com`}},title:{t:0,b:{t:1,c:[{t:2,i:[{t:3}],s:`Anthropic`},{t:2,i:[{t:3}],s:`Claude`}]}},helpinfo:{title:{t:0,b:{t:2,i:[{t:3}],s:`开始之前`}},description:{part1:{t:0,b:{t:2,i:[{t:3}],s:`虽然 Anthropic 最近宣布他们正在提供对 OpenAI SDK 兼容性的 Beta 版支持`}},part2:{t:0,b:{t:2,i:[{t:3}],s:`(您可以在此处阅读更多信息)`}},part3:{t:0,b:{t:2,i:[{t:3}],s:`但由于实现细节附带`}},part4:{t:0,b:{t:2,i:[{t:3}],s:`与 OpenAI SDK 不一致,目前无法在浏览器中使用此提供程序。`}},part5:{t:0,b:{t:2,i:[{t:3}],s:`如果您确实需要使用此提供程序,则需要一个专用的代理后端,例如在`}},part6:{t:0,b:{t:2,i:[{t:3}],s:`上运行的Serverless Function,或者一些绕过 CORS 的服务,以绕过 CORS 限制。`}}}}},"cloudflare-workers-ai":{description:{t:0,b:{t:2,i:[{t:3}],s:`Cloudflare.com`}},fields:{field:{"account-id":{description:{t:0,b:{t:2,i:[{t:3}],s:`Cloudflare 帐户 ID`}},label:{t:0,b:{t:2,i:[{t:3}],s:`Cloudflare Account ID`}},placeholder:{t:0,b:{t:2,i:[{t:3}],s:`请输入 Cloudflare Account ID`}}},"api-key":{placeholder:{t:0,b:{t:2,i:[{t:3}],s:`请输入 Cloudflare Workers AI 的 API Key`}}}}},title:{t:0,b:{t:2,i:[{t:3}],s:`Workers AI`}}},common:{fields:{field:{pitch:{description:{t:0,b:{t:2,i:[{t:3}],s:`调节合成语音的音高(比如更尖锐或者更粗旷)`}},label:{t:0,b:{t:2,i:[{t:3}],s:`音高`}}},speed:{description:{t:0,b:{t:2,i:[{t:3}],s:`调节说话的语速`}},label:{t:0,b:{t:2,i:[{t:3}],s:`语速`}}},volume:{description:{t:0,b:{t:2,i:[{t:3}],s:`调节语音的响度`}},label:{t:0,b:{t:2,i:[{t:3}],s:`响度`}}}}}},deepseek:{description:{t:0,b:{t:2,i:[{t:3}],s:`DeepSeek.com`}},title:{t:0,b:{t:2,i:[{t:3}],s:`深度求索 DeepSeek`}}},elevenlabs:{description:{t:0,b:{t:2,i:[{t:3}],s:`Elevenlabs.io`}},fields:{field:{"simularity-boost":{description:{t:0,b:{t:2,i:[{t:3}],s:`声音相似性与依从性`}},label:{t:0,b:{t:2,i:[{t:3}],s:`相似度修正`}}},"speaker-boost":{description:{t:0,b:{t:2,i:[{t:3}],s:`增强说话者的相似性`}},label:{t:0,b:{t:2,i:[{t:3}],s:`扬声器增强`}}},speed:{description:{t:0,b:{t:2,i:[{t:3}],s:`语音生成速度`}},label:{t:0,b:{t:2,i:[{t:3}],s:`语速`}}},stability:{description:{t:0,b:{t:2,i:[{t:3}],s:`语音稳定性和随机性`}},label:{t:0,b:{t:2,i:[{t:3}],s:`稳定性`}}},style:{description:{t:0,b:{t:2,i:[{t:3}],s:`夸张的语音风格`}},label:{t:0,b:{t:2,i:[{t:3}],s:`风格`}}}}},playground:{buttons:{button:{"test-voice":{generating:{t:0,b:{t:2,i:[{t:3}],s:`生成中...`}},label:{t:0,b:{t:2,i:[{t:3}],s:`测试声音`}}}}},fields:{field:{input:{placeholder:{t:0,b:{t:2,i:[{t:3}],s:`输入用于测试发音的文本`}}},language:{description:{t:0,b:{t:2,i:[{t:3}],s:`选择语音语言`}},label:{t:0,b:{t:2,i:[{t:3}],s:`语言`}}},voice:{description:{t:0,b:{t:2,i:[{t:3}],s:`选择首选语音`}},label:{t:0,b:{t:2,i:[{t:3}],s:`声线`}}}}},title:{t:0,b:{t:2,i:[{t:3}],s:`实验平台`}},validation:{"error-missing-api-key":{t:0,b:{t:2,i:[{t:3}],s:`需要填写 API Key 才能用哦!`}}}},title:{t:0,b:{t:2,i:[{t:3}],s:`ElevenLabs (11labs)`}}},fireworks:{description:{t:0,b:{t:2,i:[{t:3}],s:`Fireworks.ai`}},title:{t:0,b:{t:2,i:[{t:3}],s:`Fireworks.ai`}}},"microsoft-speech":{description:{t:0,b:{t:2,i:[{t:3}],s:`speech.microsoft.com`}},fields:{field:{region:{description:{t:0,b:{t:2,i:[{t:3}],s:`服务 Endpoint 地区(比如亚太 eastasia 区域)`}},label:{t:0,b:{t:2,i:[{t:3}],s:`Endpoint 地区`}}}}},title:{t:0,b:{t:2,i:[{t:3}],s:`Microsoft / Azure 语音服务`}}},mistral:{description:{t:0,b:{t:2,i:[{t:3}],s:`mistral.ai`}},title:{t:0,b:{t:2,i:[{t:3}],s:`Mistral`}}},moonshot:{description:{t:0,b:{t:2,i:[{t:3}],s:`Moonshot.ai`}},title:{t:0,b:{t:2,i:[{t:3}],s:`月之暗面`}}},novita:{description:{t:0,b:{t:2,i:[{t:3}],s:`novita.ai`}},title:{t:0,b:{t:2,i:[{t:3}],s:`Novita`}}},ollama:{description:{t:0,b:{t:2,i:[{t:3}],s:`ollama.ai`}},title:{t:0,b:{t:2,i:[{t:3}],s:`Ollama`}}},openai:{description:{t:0,b:{t:2,i:[{t:3}],s:`OpenAi.com`}},title:{t:0,b:{t:2,i:[{t:3}],s:`OpenAI`}}},openrouter:{description:{t:0,b:{t:2,i:[{t:3}],s:`OpenRouter.ai`}},title:{t:0,b:{t:2,i:[{t:3}],s:`OpenRouter`}}},perplexity:{description:{t:0,b:{t:2,i:[{t:3}],s:`perplexity.ai`}},title:{t:0,b:{t:2,i:[{t:3}],s:`Perplexity`}}},player2:{description:{t:0,b:{t:2,i:[{t:3}],s:`player2.game`}},title:{t:0,b:{t:2,i:[{t:3}],s:`Player2 API`}}},together:{description:{t:0,b:{t:2,i:[{t:3}],s:`together.ai`}},title:{t:0,b:{t:2,i:[{t:3}],s:`Together.ai`}}},"google-generative-ai":{description:{t:0,b:{t:2,i:[{t:3}],s:`gemini.google.com`}},title:{t:0,b:{t:2,i:[{t:3}],s:`Google Gemini`}}},featherless:{description:{t:0,b:{t:2,i:[{t:3}],s:`featherless.ai`}},title:{t:0,b:{t:2,i:[{t:3}],s:`Featherless AI`}}},vllm:{description:{t:0,b:{t:2,i:[{t:3}],s:`vllm.ai`}},title:{t:0,b:{t:2,i:[{t:3}],s:`vLLM`}}},volcengine:{description:{t:0,b:{t:2,i:[{t:3}],s:`volcengine.com`}},fields:{field:{appId:{description:{t:0,b:{t:2,i:[{t:3}],s:`可在控制台获取的 App ID`}},label:{t:0,b:{t:2,i:[{t:3}],s:`App ID`}}}}},title:{t:0,b:{t:2,i:[{t:3}],s:`火山引擎`}}},xai:{description:{t:0,b:{t:2,i:[{t:3}],s:`X.AI`}},title:{t:0,b:{t:2,i:[{t:3}],s:`xAI`}}}},title:{t:0,b:{t:2,i:[{t:3}],s:`服务来源`}}},scene:{description:{t:0,b:{t:2,i:[{t:3}],s:`配置角色所在环境`}},title:{t:0,b:{t:2,i:[{t:3}],s:`场景`}}},themes:{"color-scheme":{description:{t:0,b:{t:2,i:[{t:3}],s:`更改舞台的配色方案`}},title:{t:0,b:{t:2,i:[{t:3}],s:`配色方案`}}},developer:{description:{t:0,b:{t:2,i:[{t:3}],s:`为开发者提供的选项`}},title:{t:0,b:{t:2,i:[{t:3}],s:`开发者`}}},general:{description:{t:0,b:{t:2,i:[{t:3}],s:`深色主题、语言等选项`}},title:{t:0,b:{t:2,i:[{t:3}],s:`通用`}}},description:{t:0,b:{t:2,i:[{t:3}],s:`自定义你的舞台外观!`}},sections:{section:{"custom-color":{fields:{field:{"primary-color":{label:{t:0,b:{t:2,i:[{t:3}],s:`强调色`}},"rgb-on":{title:{t:0,b:{t:2,i:[{t:3}],s:`RGB ON!`}}}}}},title:{t:0,b:{t:2,i:[{t:3}],s:`配色`}}},developer:{title:{t:0,b:{t:2,i:[{t:3}],s:`开发者`}}},"theme-presets":{presets:[{colors:[{t:0,b:{t:2,i:[{t:3}],s:`Airi 绿`}}],description:{t:0,b:{t:2,i:[{t:3}],s:`默认的绿色主题,由 Airi 为您带来!`}},title:{t:0,b:{t:2,i:[{t:3}],s:`默认颜色`}}},{colors:[{t:0,b:{t:2,i:[{t:3}],s:`灰褐色`}},{t:0,b:{t:2,i:[{t:3}],s:`米色`}},{t:0,b:{t:2,i:[{t:3}],s:`灰白色`}},{t:0,b:{t:2,i:[{t:3}],s:`浅灰褐色`}},{t:0,b:{t:2,i:[{t:3}],s:`象牙色`}},{t:0,b:{t:2,i:[{t:3}],s:`橄榄灰`}},{t:0,b:{t:2,i:[{t:3}],s:`沙色`}},{t:0,b:{t:2,i:[{t:3}],s:`暖灰色`}}],description:{t:0,b:{t:2,i:[{t:3}],s:`受乔治·莫兰迪绘画启发的柔和、低调的色调`}},title:{t:0,b:{t:2,i:[{t:3}],s:`Morandi 颜色`}}},{colors:[{t:0,b:{t:2,i:[{t:3}],s:`天蓝色`}},{t:0,b:{t:2,i:[{t:3}],s:`薄雾色`}},{t:0,b:{t:2,i:[{t:3}],s:`沙色`}},{t:0,b:{t:2,i:[{t:3}],s:`苔藓绿`}},{t:0,b:{t:2,i:[{t:3}],s:`睡莲色`}},{t:0,b:{t:2,i:[{t:3}],s:`小麦色`}},{t:0,b:{t:2,i:[{t:3}],s:`板岩蓝`}},{t:0,b:{t:2,i:[{t:3}],s:`鼠尾草色`}}],description:{t:0,b:{t:2,i:[{t:3}],s:`受克劳德·莫奈作品启发的印象派调色板`}},title:{t:0,b:{t:2,i:[{t:3}],s:`莫奈颜色`}}},{colors:[{t:0,b:{t:2,i:[{t:3}],s:`棕褐色`}},{t:0,b:{t:2,i:[{t:3}],s:`暖灰褐色`}},{t:0,b:{t:2,i:[{t:3}],s:`赭色`}},{t:0,b:{t:2,i:[{t:3}],s:`咖啡色`}},{t:0,b:{t:2,i:[{t:3}],s:`青铜色`}},{t:0,b:{t:2,i:[{t:3}],s:`金色`}},{t:0,b:{t:2,i:[{t:3}],s:`芥末色`}},{t:0,b:{t:2,i:[{t:3}],s:`琥珀色`}}],description:{t:0,b:{t:2,i:[{t:3}],s:`传统日本色彩调色板`}},title:{t:0,b:{t:2,i:[{t:3}],s:`日本颜色`}}},{colors:[{t:0,b:{t:2,i:[{t:3}],s:`北欧蓝`}},{t:0,b:{t:2,i:[{t:3}],s:`冰色`}},{t:0,b:{t:2,i:[{t:3}],s:`峡湾色`}},{t:0,b:{t:2,i:[{t:3}],s:`钢铁色`}},{t:0,b:{t:2,i:[{t:3}],s:`冰川色`}},{t:0,b:{t:2,i:[{t:3}],s:`板岩色`}},{t:0,b:{t:2,i:[{t:3}],s:`云色`}},{t:0,b:{t:2,i:[{t:3}],s:`石头色`}}],description:{t:0,b:{t:2,i:[{t:3}],s:`北欧极简主义配色方案`}},title:{t:0,b:{t:2,i:[{t:3}],s:`北欧颜色`}}},{colors:[{t:0,b:{t:2,i:[{t:3}],s:`霞光红`}},{t:0,b:{t:2,i:[{t:3}],s:`枣红`}},{t:0,b:{t:2,i:[{t:3}],s:`黄栌`}},{t:0,b:{t:2,i:[{t:3}],s:`竹青`}},{t:0,b:{t:2,i:[{t:3}],s:`乌梅紫`}},{t:0,b:{t:2,i:[{t:3}],s:`缃色`}},{t:0,b:{t:2,i:[{t:3}],s:`青冥`}},{t:0,b:{t:2,i:[{t:3}],s:`赭石`}}],description:{t:0,b:{t:2,i:[{t:3}],s:`中国传统色彩,源自古代纺织品、瓷器和绘画`}},title:{t:0,b:{t:2,i:[{t:3}],s:`中国传统颜色`}}}],title:{t:0,b:{t:2,i:[{t:3}],s:`预设`}}}}},title:{t:0,b:{t:2,i:[{t:3}],s:`外观`}}}},sections:{section:{general:{title:{t:0,b:{t:2,i:[{t:3}],s:`通用`}}}}},theme:{t:0,b:{t:2,i:[{t:3}],s:`主题`}},title:{t:0,b:{t:2,i:[{t:3}],s:`设置`}},voices:{t:0,b:{t:2,i:[{t:3}],s:`声线`}}},stage:{chat:{message:{"character-name":{airi:{t:0,b:{t:2,i:[{t:3}],s:`Airi`}},"core-system":{t:0,b:{t:2,i:[{t:3}],s:`核心系统`}},you:{t:0,b:{t:2,i:[{t:3}],s:`你`}}}},tabs:{chat:{t:0,b:{t:2,i:[{t:3}],s:`聊天`}},clothes:{t:0,b:{t:2,i:[{t:3}],s:`换装`}},custom:{t:0,b:{t:2,i:[{t:3}],s:`自定义`}}}},message:{t:0,b:{t:2,i:[{t:3}],s:`消息`}},"select-a-audio-input":{t:0,b:{t:2,i:[{t:3}],s:`选择一个音频输入设备`}},"select-a-model":{t:0,b:{t:2,i:[{t:3}],s:`选择一个模型`}},"select-a-voice":{t:0,b:{t:2,i:[{t:3}],s:`选择一个声线`}},viewers:{"debug-menu":{emotions:{t:0,b:{t:2,i:[{t:3}],s:`表情`}},"emotions-btn":{angry:{t:0,b:{t:2,i:[{t:3}],s:`生气`}},awkward:{t:0,b:{t:2,i:[{t:3}],s:`尴尬`}},happy:{t:0,b:{t:2,i:[{t:3}],s:`开心`}},neutral:{t:0,b:{t:2,i:[{t:3}],s:`日常`}},question:{t:0,b:{t:2,i:[{t:3}],s:`疑问`}},sad:{t:0,b:{t:2,i:[{t:3}],s:`难过`}},surprised:{t:0,b:{t:2,i:[{t:3}],s:`惊喜`}},think:{t:0,b:{t:2,i:[{t:3}],s:`思考`}}},vrm:{camera:{t:0,b:{t:2,i:[{t:3}],s:`摄像机`}},model:{title:{t:0,b:{t:2,i:[{t:3}],s:`模型`}}}}}},waiting:{t:0,b:{t:2,i:[{t:3}],s:`等待中`}}}}});const H1=C1({legacy:!1,locale:U1(),fallbackLocale:`en`,messages:V1});function U1(){let e=localStorage.getItem(`settings/language`),t=Object.keys(V1);return e&&t.includes(e)?e:`en`}var W1=d(pB());const G1=MB(),K1=ZB(nU);let q1;q1=QH({routes:K1,history:nH()}),q1.beforeEach((e,t)=>{e.path!==t.path&&W1.default.start()}),q1.afterEach(()=>{W1.default.done()}),q1.isReady().then(async()=>{}).catch(()=>{}),kc(R1).use(fB).use(Tl).use(q1).use(G1).use(H1).use(DN).mount(`#app`);export{Hl as AdditiveBlending,Vf as AlwaysStencilFunc,gx as AnimationClip,qS as AnimationMixer,wS as Audio,CS as AudioListener,uS as AudioLoader,HC as AxesHelper,Rl as BackSide,M_ as Bone,cC as Box2,Sm as Box3,kg as BoxGeometry,Qh as BufferAttribute,mg as BufferGeometry,hy as CatmullRomCurve3,Bu as ClampToEdgeWrapping,K as Color,im as ColorManagement,Za as Comment,Gv as CompressedTexture,Gg as CubeCamera,Pu as CubeReflectionMapping,kx as CubeTextureLoader,Qv as CylinderGeometry,QY as DEFAULT_THEME_COLORS_HUE,N_ as DataTexture,Ax as DataTextureLoader,Jh as DataUtils,Yv as DepthTexture,qx as DirectionalLight,zl as DoubleSide,Zf as DynamicDrawUsage,oy as EdgesGeometry,_M as Ee,Iu as EquirectangularReflectionMapping,ih as Euler,fp as EventDispatcher,bb as ExtrudeGeometry,Tx as FileLoader,q as Float32BufferAttribute,id as FloatType,Ya as Fragment,Ll as FrontSide,$S as GLBufferAttribute,Jg as Group,ad as HalfFloatType,sS as ImageBitmapLoader,Ox as ImageLoader,L_ as InstancedBufferAttribute,eS as InstancedBufferGeometry,QS as InstancedInterleavedBuffer,G_ as InstancedMesh,e_ as InterleavedBuffer,n_ as InterleavedBufferAttribute,ix as Interpolant,nf as InterpolateDiscrete,rf as InterpolateLinear,oj as Ir,kv as Line,dC as Line3,xv as LineBasicMaterial,Pv as LineLoop,Nv as LineSegments,qu as LinearFilter,Xu as LinearMipmapLinearFilter,Ju as LinearMipmapNearestFilter,Cf as LinearSRGBColorSpace,Sx as Loader,$x as LoaderUtils,Dl as MOUSE,Hh as Material,zp as MathUtils,Up as Matrix3,G as Matrix4,Eg as Mesh,Uh as MeshBasicMaterial,Kb as MeshDepthMaterial,Vb as MeshPhysicalMaterial,Bb as MeshStandardMaterial,Vu as MirroredRepeatWrapping,CM as Mn,Hu as NearestFilter,Gu as NearestMipmapLinearFilter,Uu as NearestMipmapNearestFilter,Cu as NoToneMapping,dx as NumberKeyframeTrack,xh as Object3D,Tb as OctahedronGeometry,Gx as OrthographicCamera,Fy as Path,Hg as PerspectiveCamera,Y_ as Plane,Eb as PlaneGeometry,Wx as PointLight,Bv as Points,Fv as PointsMaterial,US as PropertyBinding,hM as Q,jy as QuadraticBezierCurve3,Bp as Quaternion,px as QuaternionKeyframeTrack,El as REVISION,fd as RGBAFormat,zb as RawShaderMaterial,Jm as Ray,tC as Raycaster,zu as RepeatWrapping,Of as ReplaceStencilOp,WH as RouterLink,ZH as RouterView,Sf as SRGBColorSpace,$g as Scene,NE as ShaderChunk,Lg as ShaderMaterial,Iy as Shape,Ob as ShapeGeometry,UC as ShapePath,_b as ShapeUtils,I_ as Skeleton,j_ as SkinnedMesh,Bm as Sphere,Ab as SphereGeometry,iC as Spherical,zx as SpotLight,Ol as TOUCH,yf as TangentSpaceNormalMap,br as Teleport,mm as Texture,jx as TextureLoader,Mb as TorusGeometry,fs as Transition,Fh as Triangle,mf as TriangleFanDrawMode,pf as TriangleStripDrawMode,ff as TrianglesDrawMode,YS as Uniform,J as UniformsLib,Pg as UniformsUtils,U as Vector2,W as Vector3,hm as Vector4,hx as VectorKeyframeTrack,gN as Vn,qg as WebGLCubeRenderTarget,_m as WebGLRenderTarget,Nk as WebGLRenderer,Fb as WireframeGeometry,c as __commonJSMin,s as __esmMin,l as __export,rX as __plugin_vue_export_helper_default,m as __require,f as __toCommonJS,p as __toDynamicImportESM,d as __toESM,Y as __vitePreload,hI as alpha,XL as animate,ML as anticipate,kL as backIn,jL as backInOut,AL as backOut,LL as bounceIn,RL as bounceInOut,IL as bounceOut,NP as breakpointsTailwind,ce as camelize,EL as circIn,OL as circInOut,DL as circOut,_o as cloneVNode,MI as color,VI as complex,H as computed,bP as computedAsync,kc as createApp,po as createBaseVNode,so as createBlock,bo as createCommentVNode,oo as createElementBlock,vo as createTextVNode,mo as createVNode,fR as cubicBezier,xn as customRef,Rr as defineComponent,KB as defineStore,jN as defu,vI as degrees,oM as dn,CL as easeIn,TL as easeInOut,wL as easeOut,Re as effectScope,BF as es_default,GI as filter,xY as formatHex,Ao as getCurrentInstance,ze as getCurrentScope,zF as getFrameData,go as guardReactiveProps,Jo as h,QL as inertia,Zi as inject,IM as io,HN as isObject,an as isReactive,pn as isRef,SL as linear,un as markRaw,Oi as mergeDefaults,ki as mergeModels,wo as mergeProps,Kn as nextTick,Se as normalizeClass,Ce as normalizeProps,L as normalizeStyle,mI as number,Qr as onBeforeMount,ni as onBeforeUnmount,ei as onBeforeUpdate,$r as onMounted,Be as onScopeDispose,ri as onUnmounted,ti as onUpdated,to as openBlock,PM as pe,ar as popScopeId,CI as progressPercentage,Xi as provide,ir as pushScopeId,bI as px,$t as reactive,tn as readonly,R as ref,lP as refDebounced,dP as refThrottled,Oc as render,gi as renderList,_i as renderSlot,ui as resolveComponent,pi as resolveDirective,fi as resolveDynamicComponent,gI as scale,en as shallowReactive,nn as shallowReadonly,z as shallowRef,FM as so,qB as storeToRefs,Me as toDisplayString,fe as toHandlerKey,yi as toHandlers,ln as toRaw,Tn as toRef,Sn as toRefs,aA as toValue,B as toValue$1,gn as triggerRef,hP as tryOnMounted,gP as tryOnUnmounted,_n as unref,TP as unrefElement,pA as unrefElement$1,Ti as useAttrs,PP as useBreakpoints,IP as useClipboard,XP as useDark,cP as useDebounceFn,ZP as useDevicesList,$P as useElementBounding,EP as useEventListener,rF as useFileDialog,w1 as useI18n,zr as useId,eF as useIntersectionObserver,oF as useLocalStorage,Ia as useModel,cF as useMouse,lF as useObjectUrl,FP as usePermission,fF as usePointer,QP as useResizeObserver,tU as useRoute,eU as useRouter,_F as useScreenSafeArea,aF as useScroll,tX as useSettings,wi as useSlots,NA as useVModel,bF as useWebWorker,xF as useWindowSize,uc as vModelCheckbox,_c as vModelDynamic,fc as vModelRadio,pc as vModelSelect,lc as vModelText,As as vShow,ZL as velocityPerSecond,V as watch,vP as watchDebounced,Aa as watchEffect,ja as watchPostEffect,Ma as watchSyncEffect,Ai as withAsyncContext,sr as withCtx,cr as withDirectives,wc as withKeys,Sc as withModifiers,or as withScopeId}; \ No newline at end of file +`}]}}},common:{fields:{field:{"api-key":{label:{t:0,b:{t:2,i:[{t:3}],s:`API 密钥`}}}}},section:{advanced:{fields:{field:{headers:{description:{t:0,b:{t:2,i:[{t:3}],s:`添加自定义 HTTP 标头`}},key:{placeholder:{t:0,b:{t:2,i:[{t:3}],s:`请求头名字`}}},label:{t:0,b:{t:2,i:[{t:3}],s:`HTTP 请求头`}},value:{placeholder:{t:0,b:{t:2,i:[{t:3}],s:`请求头数值`}}}}}},title:{t:0,b:{t:2,i:[{t:3}],s:`高级配置`}}},basic:{description:{t:0,b:{t:2,i:[{t:3}],s:`基本设置`}},title:{t:0,b:{t:2,i:[{t:3}],s:`基础配置`}}},voice:{title:{t:0,b:{t:2,i:[{t:3}],s:`声音配置`}}}}},description:{t:0,b:{t:2,i:[{t:3}],s:`LLM,语音合成,语音识别服务来源等`}},provider:{"app-local-audio-speech":{title:{t:0,b:{t:2,i:[{t:3}],s:`浏览器内(本地)`}},description:{t:0,b:{t:2,i:[{t:3}],s:`https://github.com/moeru-ai/xsai-transformers`}}},"browser-local-audio-speech":{title:{t:0,b:{t:2,i:[{t:3}],s:`浏览器内(本地)`}},description:{t:0,b:{t:2,i:[{t:3}],s:`https://github.com/moeru-ai/xsai-transformers`}}},"alibaba-cloud-model-studio":{description:{t:0,b:{t:2,i:[{t:3}],s:`bailian.console.aliyun.com`}},title:{t:0,b:{t:2,i:[{t:3}],s:`阿里百炼`}}},anthropic:{description:{t:0,b:{t:2,i:[{t:3}],s:`anthropic.com`}},title:{t:0,b:{t:1,c:[{t:2,i:[{t:3}],s:`Anthropic`},{t:2,i:[{t:3}],s:`Claude`}]}},helpinfo:{title:{t:0,b:{t:2,i:[{t:3}],s:`开始之前`}},description:{part1:{t:0,b:{t:2,i:[{t:3}],s:`虽然 Anthropic 最近宣布他们正在提供对 OpenAI SDK 兼容性的 Beta 版支持`}},part2:{t:0,b:{t:2,i:[{t:3}],s:`(您可以在此处阅读更多信息)`}},part3:{t:0,b:{t:2,i:[{t:3}],s:`但由于实现细节附带`}},part4:{t:0,b:{t:2,i:[{t:3}],s:`与 OpenAI SDK 不一致,目前无法在浏览器中使用此提供程序。`}},part5:{t:0,b:{t:2,i:[{t:3}],s:`如果您确实需要使用此提供程序,则需要一个专用的代理后端,例如在`}},part6:{t:0,b:{t:2,i:[{t:3}],s:`上运行的Serverless Function,或者一些绕过 CORS 的服务,以绕过 CORS 限制。`}}}}},"cloudflare-workers-ai":{description:{t:0,b:{t:2,i:[{t:3}],s:`Cloudflare.com`}},fields:{field:{"account-id":{description:{t:0,b:{t:2,i:[{t:3}],s:`Cloudflare 帐户 ID`}},label:{t:0,b:{t:2,i:[{t:3}],s:`Cloudflare Account ID`}},placeholder:{t:0,b:{t:2,i:[{t:3}],s:`请输入 Cloudflare Account ID`}}},"api-key":{placeholder:{t:0,b:{t:2,i:[{t:3}],s:`请输入 Cloudflare Workers AI 的 API Key`}}}}},title:{t:0,b:{t:2,i:[{t:3}],s:`Workers AI`}}},common:{fields:{field:{pitch:{description:{t:0,b:{t:2,i:[{t:3}],s:`调节合成语音的音高(比如更尖锐或者更粗旷)`}},label:{t:0,b:{t:2,i:[{t:3}],s:`音高`}}},speed:{description:{t:0,b:{t:2,i:[{t:3}],s:`调节说话的语速`}},label:{t:0,b:{t:2,i:[{t:3}],s:`语速`}}},volume:{description:{t:0,b:{t:2,i:[{t:3}],s:`调节语音的响度`}},label:{t:0,b:{t:2,i:[{t:3}],s:`响度`}}}}}},deepseek:{description:{t:0,b:{t:2,i:[{t:3}],s:`DeepSeek.com`}},title:{t:0,b:{t:2,i:[{t:3}],s:`深度求索 DeepSeek`}}},elevenlabs:{description:{t:0,b:{t:2,i:[{t:3}],s:`Elevenlabs.io`}},fields:{field:{"simularity-boost":{description:{t:0,b:{t:2,i:[{t:3}],s:`声音相似性与依从性`}},label:{t:0,b:{t:2,i:[{t:3}],s:`相似度修正`}}},"speaker-boost":{description:{t:0,b:{t:2,i:[{t:3}],s:`增强说话者的相似性`}},label:{t:0,b:{t:2,i:[{t:3}],s:`扬声器增强`}}},speed:{description:{t:0,b:{t:2,i:[{t:3}],s:`语音生成速度`}},label:{t:0,b:{t:2,i:[{t:3}],s:`语速`}}},stability:{description:{t:0,b:{t:2,i:[{t:3}],s:`语音稳定性和随机性`}},label:{t:0,b:{t:2,i:[{t:3}],s:`稳定性`}}},style:{description:{t:0,b:{t:2,i:[{t:3}],s:`夸张的语音风格`}},label:{t:0,b:{t:2,i:[{t:3}],s:`风格`}}}}},playground:{buttons:{button:{"test-voice":{generating:{t:0,b:{t:2,i:[{t:3}],s:`生成中...`}},label:{t:0,b:{t:2,i:[{t:3}],s:`测试声音`}}}}},fields:{field:{input:{placeholder:{t:0,b:{t:2,i:[{t:3}],s:`输入用于测试发音的文本`}}},language:{description:{t:0,b:{t:2,i:[{t:3}],s:`选择语音语言`}},label:{t:0,b:{t:2,i:[{t:3}],s:`语言`}}},voice:{description:{t:0,b:{t:2,i:[{t:3}],s:`选择首选语音`}},label:{t:0,b:{t:2,i:[{t:3}],s:`声线`}}}}},title:{t:0,b:{t:2,i:[{t:3}],s:`实验平台`}},validation:{"error-missing-api-key":{t:0,b:{t:2,i:[{t:3}],s:`需要填写 API Key 才能用哦!`}}}},title:{t:0,b:{t:2,i:[{t:3}],s:`ElevenLabs (11labs)`}}},fireworks:{description:{t:0,b:{t:2,i:[{t:3}],s:`Fireworks.ai`}},title:{t:0,b:{t:2,i:[{t:3}],s:`Fireworks.ai`}}},"microsoft-speech":{description:{t:0,b:{t:2,i:[{t:3}],s:`speech.microsoft.com`}},fields:{field:{region:{description:{t:0,b:{t:2,i:[{t:3}],s:`服务 Endpoint 地区(比如亚太 eastasia 区域)`}},label:{t:0,b:{t:2,i:[{t:3}],s:`Endpoint 地区`}}}}},title:{t:0,b:{t:2,i:[{t:3}],s:`Microsoft / Azure 语音服务`}}},mistral:{description:{t:0,b:{t:2,i:[{t:3}],s:`mistral.ai`}},title:{t:0,b:{t:2,i:[{t:3}],s:`Mistral`}}},moonshot:{description:{t:0,b:{t:2,i:[{t:3}],s:`Moonshot.ai`}},title:{t:0,b:{t:2,i:[{t:3}],s:`月之暗面`}}},novita:{description:{t:0,b:{t:2,i:[{t:3}],s:`novita.ai`}},title:{t:0,b:{t:2,i:[{t:3}],s:`Novita`}}},ollama:{description:{t:0,b:{t:2,i:[{t:3}],s:`ollama.ai`}},title:{t:0,b:{t:2,i:[{t:3}],s:`Ollama`}}},openai:{description:{t:0,b:{t:2,i:[{t:3}],s:`OpenAi.com`}},title:{t:0,b:{t:2,i:[{t:3}],s:`OpenAI`}}},openrouter:{description:{t:0,b:{t:2,i:[{t:3}],s:`OpenRouter.ai`}},title:{t:0,b:{t:2,i:[{t:3}],s:`OpenRouter`}}},perplexity:{description:{t:0,b:{t:2,i:[{t:3}],s:`perplexity.ai`}},title:{t:0,b:{t:2,i:[{t:3}],s:`Perplexity`}}},player2:{description:{t:0,b:{t:2,i:[{t:3}],s:`player2.game`}},title:{t:0,b:{t:2,i:[{t:3}],s:`Player2 API`}}},together:{description:{t:0,b:{t:2,i:[{t:3}],s:`together.ai`}},title:{t:0,b:{t:2,i:[{t:3}],s:`Together.ai`}}},"google-generative-ai":{description:{t:0,b:{t:2,i:[{t:3}],s:`gemini.google.com`}},title:{t:0,b:{t:2,i:[{t:3}],s:`Google Gemini`}}},featherless:{description:{t:0,b:{t:2,i:[{t:3}],s:`featherless.ai`}},title:{t:0,b:{t:2,i:[{t:3}],s:`Featherless AI`}}},vllm:{description:{t:0,b:{t:2,i:[{t:3}],s:`vllm.ai`}},title:{t:0,b:{t:2,i:[{t:3}],s:`vLLM`}}},volcengine:{description:{t:0,b:{t:2,i:[{t:3}],s:`volcengine.com`}},fields:{field:{appId:{description:{t:0,b:{t:2,i:[{t:3}],s:`可在控制台获取的 App ID`}},label:{t:0,b:{t:2,i:[{t:3}],s:`App ID`}}}}},title:{t:0,b:{t:2,i:[{t:3}],s:`火山引擎`}}},xai:{description:{t:0,b:{t:2,i:[{t:3}],s:`X.AI`}},title:{t:0,b:{t:2,i:[{t:3}],s:`xAI`}}}},title:{t:0,b:{t:2,i:[{t:3}],s:`服务来源`}}},scene:{description:{t:0,b:{t:2,i:[{t:3}],s:`配置角色所在环境`}},title:{t:0,b:{t:2,i:[{t:3}],s:`场景`}}},themes:{"color-scheme":{description:{t:0,b:{t:2,i:[{t:3}],s:`更改舞台的配色方案`}},title:{t:0,b:{t:2,i:[{t:3}],s:`配色方案`}}},developer:{description:{t:0,b:{t:2,i:[{t:3}],s:`为开发者提供的选项`}},title:{t:0,b:{t:2,i:[{t:3}],s:`开发者`}}},general:{description:{t:0,b:{t:2,i:[{t:3}],s:`深色主题、语言等选项`}},title:{t:0,b:{t:2,i:[{t:3}],s:`通用`}}},description:{t:0,b:{t:2,i:[{t:3}],s:`自定义你的舞台外观!`}},sections:{section:{"custom-color":{fields:{field:{"primary-color":{label:{t:0,b:{t:2,i:[{t:3}],s:`强调色`}},"rgb-on":{title:{t:0,b:{t:2,i:[{t:3}],s:`RGB ON!`}}}}}},title:{t:0,b:{t:2,i:[{t:3}],s:`配色`}}},developer:{title:{t:0,b:{t:2,i:[{t:3}],s:`开发者`}}},"theme-presets":{presets:[{colors:[{t:0,b:{t:2,i:[{t:3}],s:`Airi 绿`}}],description:{t:0,b:{t:2,i:[{t:3}],s:`默认的绿色主题,由 Airi 为您带来!`}},title:{t:0,b:{t:2,i:[{t:3}],s:`默认颜色`}}},{colors:[{t:0,b:{t:2,i:[{t:3}],s:`灰褐色`}},{t:0,b:{t:2,i:[{t:3}],s:`米色`}},{t:0,b:{t:2,i:[{t:3}],s:`灰白色`}},{t:0,b:{t:2,i:[{t:3}],s:`浅灰褐色`}},{t:0,b:{t:2,i:[{t:3}],s:`象牙色`}},{t:0,b:{t:2,i:[{t:3}],s:`橄榄灰`}},{t:0,b:{t:2,i:[{t:3}],s:`沙色`}},{t:0,b:{t:2,i:[{t:3}],s:`暖灰色`}}],description:{t:0,b:{t:2,i:[{t:3}],s:`受乔治·莫兰迪绘画启发的柔和、低调的色调`}},title:{t:0,b:{t:2,i:[{t:3}],s:`Morandi 颜色`}}},{colors:[{t:0,b:{t:2,i:[{t:3}],s:`天蓝色`}},{t:0,b:{t:2,i:[{t:3}],s:`薄雾色`}},{t:0,b:{t:2,i:[{t:3}],s:`沙色`}},{t:0,b:{t:2,i:[{t:3}],s:`苔藓绿`}},{t:0,b:{t:2,i:[{t:3}],s:`睡莲色`}},{t:0,b:{t:2,i:[{t:3}],s:`小麦色`}},{t:0,b:{t:2,i:[{t:3}],s:`板岩蓝`}},{t:0,b:{t:2,i:[{t:3}],s:`鼠尾草色`}}],description:{t:0,b:{t:2,i:[{t:3}],s:`受克劳德·莫奈作品启发的印象派调色板`}},title:{t:0,b:{t:2,i:[{t:3}],s:`莫奈颜色`}}},{colors:[{t:0,b:{t:2,i:[{t:3}],s:`棕褐色`}},{t:0,b:{t:2,i:[{t:3}],s:`暖灰褐色`}},{t:0,b:{t:2,i:[{t:3}],s:`赭色`}},{t:0,b:{t:2,i:[{t:3}],s:`咖啡色`}},{t:0,b:{t:2,i:[{t:3}],s:`青铜色`}},{t:0,b:{t:2,i:[{t:3}],s:`金色`}},{t:0,b:{t:2,i:[{t:3}],s:`芥末色`}},{t:0,b:{t:2,i:[{t:3}],s:`琥珀色`}}],description:{t:0,b:{t:2,i:[{t:3}],s:`传统日本色彩调色板`}},title:{t:0,b:{t:2,i:[{t:3}],s:`日本颜色`}}},{colors:[{t:0,b:{t:2,i:[{t:3}],s:`北欧蓝`}},{t:0,b:{t:2,i:[{t:3}],s:`冰色`}},{t:0,b:{t:2,i:[{t:3}],s:`峡湾色`}},{t:0,b:{t:2,i:[{t:3}],s:`钢铁色`}},{t:0,b:{t:2,i:[{t:3}],s:`冰川色`}},{t:0,b:{t:2,i:[{t:3}],s:`板岩色`}},{t:0,b:{t:2,i:[{t:3}],s:`云色`}},{t:0,b:{t:2,i:[{t:3}],s:`石头色`}}],description:{t:0,b:{t:2,i:[{t:3}],s:`北欧极简主义配色方案`}},title:{t:0,b:{t:2,i:[{t:3}],s:`北欧颜色`}}},{colors:[{t:0,b:{t:2,i:[{t:3}],s:`霞光红`}},{t:0,b:{t:2,i:[{t:3}],s:`枣红`}},{t:0,b:{t:2,i:[{t:3}],s:`黄栌`}},{t:0,b:{t:2,i:[{t:3}],s:`竹青`}},{t:0,b:{t:2,i:[{t:3}],s:`乌梅紫`}},{t:0,b:{t:2,i:[{t:3}],s:`缃色`}},{t:0,b:{t:2,i:[{t:3}],s:`青冥`}},{t:0,b:{t:2,i:[{t:3}],s:`赭石`}}],description:{t:0,b:{t:2,i:[{t:3}],s:`中国传统色彩,源自古代纺织品、瓷器和绘画`}},title:{t:0,b:{t:2,i:[{t:3}],s:`中国传统颜色`}}}],title:{t:0,b:{t:2,i:[{t:3}],s:`预设`}}}}},title:{t:0,b:{t:2,i:[{t:3}],s:`外观`}}}},sections:{section:{general:{title:{t:0,b:{t:2,i:[{t:3}],s:`通用`}}}}},theme:{t:0,b:{t:2,i:[{t:3}],s:`主题`}},title:{t:0,b:{t:2,i:[{t:3}],s:`设置`}},voices:{t:0,b:{t:2,i:[{t:3}],s:`声线`}}},stage:{chat:{message:{"character-name":{airi:{t:0,b:{t:2,i:[{t:3}],s:`Airi`}},"core-system":{t:0,b:{t:2,i:[{t:3}],s:`核心系统`}},you:{t:0,b:{t:2,i:[{t:3}],s:`你`}}}},tabs:{chat:{t:0,b:{t:2,i:[{t:3}],s:`聊天`}},clothes:{t:0,b:{t:2,i:[{t:3}],s:`换装`}},custom:{t:0,b:{t:2,i:[{t:3}],s:`自定义`}}}},message:{t:0,b:{t:2,i:[{t:3}],s:`消息`}},"select-a-audio-input":{t:0,b:{t:2,i:[{t:3}],s:`选择一个音频输入设备`}},"select-a-model":{t:0,b:{t:2,i:[{t:3}],s:`选择一个模型`}},"select-a-voice":{t:0,b:{t:2,i:[{t:3}],s:`选择一个声线`}},viewers:{"debug-menu":{emotions:{t:0,b:{t:2,i:[{t:3}],s:`表情`}},"emotions-btn":{angry:{t:0,b:{t:2,i:[{t:3}],s:`生气`}},awkward:{t:0,b:{t:2,i:[{t:3}],s:`尴尬`}},happy:{t:0,b:{t:2,i:[{t:3}],s:`开心`}},neutral:{t:0,b:{t:2,i:[{t:3}],s:`日常`}},question:{t:0,b:{t:2,i:[{t:3}],s:`疑问`}},sad:{t:0,b:{t:2,i:[{t:3}],s:`难过`}},surprised:{t:0,b:{t:2,i:[{t:3}],s:`惊喜`}},think:{t:0,b:{t:2,i:[{t:3}],s:`思考`}}},vrm:{camera:{t:0,b:{t:2,i:[{t:3}],s:`摄像机`}},model:{title:{t:0,b:{t:2,i:[{t:3}],s:`模型`}}}}}},waiting:{t:0,b:{t:2,i:[{t:3}],s:`等待中`}}}}});const H1=C1({legacy:!1,locale:U1(),fallbackLocale:`en`,messages:V1});function U1(){let e=localStorage.getItem(`settings/language`),t=Object.keys(V1);return e&&t.includes(e)?e:`en`}var W1=d(PM());const G1=MB(),K1=ZB(nU);let q1;q1=QH({routes:K1,history:nH()}),q1.beforeEach((e,t)=>{e.path!==t.path&&W1.default.start()}),q1.afterEach(()=>{W1.default.done()}),q1.isReady().then(async()=>{}).catch(()=>{}),kc(R1).use(pB).use(ON).use(q1).use(G1).use(H1).use(NM).mount(`#app`);export{Jc as AdditiveBlending,Gd as AlwaysStencilFunc,Sb as AnimationClip,$x as AnimationMixer,Ax as Audio,kx as AudioListener,gx as AudioLoader,JS as AxesHelper,Wc as BackSide,Rg as Bone,mS as Box2,Op as Box3,Fh as BoxGeometry,ih as BufferAttribute,bh as BufferGeometry,xv as CatmullRomCurve3,Kl as ClampToEdgeWrapping,K as Color,up as ColorManagement,Za as Comment,Z_ as CompressedTexture,Zh as CubeCamera,Bl as CubeReflectionMapping,Fb as CubeTextureLoader,iv as CylinderGeometry,QY as DEFAULT_THEME_COLORS_HUE,zg as DataTexture,Ib as DataTextureLoader,eh as DataUtils,tv as DepthTexture,$b as DirectionalLight,Gc as DoubleSide,tf as DynamicDrawUsage,fv as EdgesGeometry,Cj as Ee,Hl as EquirectangularReflectionMapping,um as Euler,vf as EventDispatcher,Ey as ExtrudeGeometry,jb as FileLoader,q as Float32BufferAttribute,uu as FloatType,Ya as Fragment,Uc as FrontSide,aS as GLBufferAttribute,eg as Group,du as HalfFloatType,px as ImageBitmapLoader,Pb as ImageLoader,Ug as InstancedBufferAttribute,ox as InstancedBufferGeometry,iS as InstancedInterleavedBuffer,Zg as InstancedMesh,og as InterleavedBuffer,cg as InterleavedBufferAttribute,ub as Interpolant,cd as InterpolateDiscrete,ld as InterpolateLinear,fA as Ir,F_ as Line,_S as Line3,D_ as LineBasicMaterial,B_ as LineLoop,z_ as LineSegments,$l as LinearFilter,nu as LinearMipmapLinearFilter,eu as LinearMipmapNearestFilter,Dd as LinearSRGBColorSpace,Ob as Loader,ax as LoaderUtils,Nc as MOUSE,Jm as Material,Gf as MathUtils,Yf as Matrix3,G as Matrix4,Mh as Mesh,Ym as MeshBasicMaterial,Qy as MeshDepthMaterial,qy as MeshPhysicalMaterial,Ky as MeshStandardMaterial,ql as MirroredRepeatWrapping,kj as Mn,Jl as NearestFilter,Zl as NearestMipmapLinearFilter,Yl as NearestMipmapNearestFilter,kl as NoToneMapping,_b as NumberKeyframeTrack,Dm as Object3D,jy as OctahedronGeometry,Zb as OrthographicCamera,Vv as Path,Jh as PerspectiveCamera,t_ as Plane,My as PlaneGeometry,Xb as PointLight,K_ as Points,V_ as PointsMaterial,Yx as PropertyBinding,xj as Q,Lv as QuadraticBezierCurve3,Kf as Quaternion,yb as QuaternionKeyframeTrack,Mc as REVISION,vu as RGBAFormat,Gy as RawShaderMaterial,em as Ray,sS as Raycaster,Gl as RepeatWrapping,Md as ReplaceStencilOp,WH as RouterLink,ZH as RouterView,Ed as SRGBColorSpace,ag as Scene,zT as ShaderChunk,Uh as ShaderMaterial,Hv as Shape,Py as ShapeGeometry,YS as ShapePath,Cy as ShapeUtils,Hg as Skeleton,Lg as SkinnedMesh,Kp as Sphere,Iy as SphereGeometry,uS as Spherical,Gb as SpotLight,Pc as TOUCH,Cd as TangentSpaceNormalMap,br as Teleport,bp as Texture,Lb as TextureLoader,Ry as TorusGeometry,fs as Transition,Vm as Triangle,vd as TriangleFanDrawMode,_d as TriangleStripDrawMode,gd as TrianglesDrawMode,tS as Uniform,J as UniformsLib,Bh as UniformsUtils,U as Vector2,W as Vector3,xp as Vector4,xb as VectorKeyframeTrack,SM as Vn,$h as WebGLCubeRenderTarget,Cp as WebGLRenderTarget,zO as WebGLRenderer,Vy as WireframeGeometry,c as __commonJSMin,s as __esmMin,l as __export,rX as __plugin_vue_export_helper_default,m as __require,f as __toCommonJS,p as __toDynamicImportESM,d as __toESM,Y as __vitePreload,gI as alpha,ZL as animate,NL as anticipate,AL as backIn,ML as backInOut,jL as backOut,RL as bounceIn,zL as bounceInOut,LL as bounceOut,PP as breakpointsTailwind,ce as camelize,DL as circIn,kL as circInOut,OL as circOut,_o as cloneVNode,NI as color,HI as complex,H as computed,xP as computedAsync,kc as createApp,po as createBaseVNode,so as createBlock,bo as createCommentVNode,oo as createElementBlock,vo as createTextVNode,mo as createVNode,pR as cubicBezier,xn as customRef,Rr as defineComponent,KB as defineStore,MN as defu,yI as degrees,fj as dn,wL as easeIn,EL as easeInOut,TL as easeOut,Re as effectScope,VF as es_default,KI as filter,xY as formatHex,Ao as getCurrentInstance,ze as getCurrentScope,BF as getFrameData,go as guardReactiveProps,Jo as h,$L as inertia,Zi as inject,Hj as io,UN as isObject,an as isReactive,pn as isRef,CL as linear,un as markRaw,Oi as mergeDefaults,ki as mergeModels,wo as mergeProps,Kn as nextTick,Se as normalizeClass,Ce as normalizeProps,L as normalizeStyle,hI as number,Qr as onBeforeMount,ni as onBeforeUnmount,ei as onBeforeUpdate,$r as onMounted,Be as onScopeDispose,ri as onUnmounted,ti as onUpdated,to as openBlock,Bj as pe,ar as popScopeId,wI as progressPercentage,Xi as provide,ir as pushScopeId,xI as px,$t as reactive,tn as readonly,R as ref,uP as refDebounced,fP as refThrottled,Oc as render,gi as renderList,_i as renderSlot,ui as resolveComponent,pi as resolveDirective,fi as resolveDynamicComponent,_I as scale,en as shallowReactive,nn as shallowReadonly,z as shallowRef,Vj as so,qB as storeToRefs,Me as toDisplayString,fe as toHandlerKey,yi as toHandlers,ln as toRaw,Tn as toRef,Sn as toRefs,dk as toValue,B as toValue$1,gn as triggerRef,gP as tryOnMounted,_P as tryOnUnmounted,_n as unref,EP as unrefElement,yk as unrefElement$1,Ti as useAttrs,FP as useBreakpoints,LP as useClipboard,ZP as useDark,lP as useDebounceFn,QP as useDevicesList,eF as useElementBounding,DP as useEventListener,iF as useFileDialog,w1 as useI18n,zr as useId,tF as useIntersectionObserver,sF as useLocalStorage,Ia as useModel,lF as useMouse,uF as useObjectUrl,IP as usePermission,pF as usePointer,$P as useResizeObserver,tU as useRoute,eU as useRouter,vF as useScreenSafeArea,oF as useScroll,tX as useSettings,wi as useSlots,zk as useVModel,xF as useWebWorker,SF as useWindowSize,uc as vModelCheckbox,_c as vModelDynamic,fc as vModelRadio,pc as vModelSelect,lc as vModelText,As as vShow,QL as velocityPerSecond,V as watch,yP as watchDebounced,Aa as watchEffect,ja as watchPostEffect,Ma as watchSyncEffect,Ai as withAsyncContext,sr as withCtx,cr as withDirectives,wc as withKeys,Sc as withModifiers,or as withScopeId}; \ No newline at end of file diff --git a/assets/memory-SfXrd_LZ.js b/assets/memory-Cz0Z0ybt.js similarity index 91% rename from assets/memory-SfXrd_LZ.js rename to assets/memory-Cz0Z0ybt.js index d0ed6b6cefbbd24e8baa6c1b7fabe02743331a29..a41990d969748dbc127dd7d1ebf2386fddd16e56 100644 --- a/assets/memory-SfXrd_LZ.js +++ b/assets/memory-Cz0Z0ybt.js @@ -1 +1 @@ -import{createBaseVNode as e,createElementBlock as t,defineComponent as n,openBlock as r,resolveDirective as i,withDirectives as a}from"./index-CuCRViVh.js";import{route_block_default as o}from"./route-block-DNPbw0zT.js";const s={text:`neutral-200/50 dark:neutral-600/20`,"pointer-events-none":``,fixed:``,top:`[calc(100dvh-15rem)]`,"bottom-0":``,"right--5":``,"z--1":``,initial:{scale:.9,opacity:0,y:15},enter:{scale:1,opacity:1,y:0},duration:500,"size-60":``,flex:``,"items-center":``,"justify-center":``};var c=n({__name:`index`,setup(n){return(n,o)=>{let c=i(`motion`);return a((r(),t(`div`,s,o[0]||=[e(`div`,{text:`60`,"i-solar:leaf-bold-duotone":``},null,-1)])),[[c]])}}});typeof o==`function`&&o(c);var l=c;export{l as default}; \ No newline at end of file +import{createBaseVNode as e,createElementBlock as t,defineComponent as n,openBlock as r,resolveDirective as i,withDirectives as a}from"./index-CsmT0L1K.js";import{route_block_default as o}from"./route-block-DNPbw0zT.js";const s={text:`neutral-200/50 dark:neutral-600/20`,"pointer-events-none":``,fixed:``,top:`[calc(100dvh-15rem)]`,"bottom-0":``,"right--5":``,"z--1":``,initial:{scale:.9,opacity:0,y:15},enter:{scale:1,opacity:1,y:0},duration:500,"size-60":``,flex:``,"items-center":``,"justify-center":``};var c=n({__name:`index`,setup(n){return(n,o)=>{let c=i(`motion`);return a((r(),t(`div`,s,o[0]||=[e(`div`,{text:`60`,"i-solar:leaf-bold-duotone":``},null,-1)])),[[c]])}}});typeof o==`function`&&o(c);var l=c;export{l as default}; \ No newline at end of file diff --git a/assets/memory-long-term-w7gJ2GOm.js b/assets/memory-long-term-Dt8AlP6i.js similarity index 77% rename from assets/memory-long-term-w7gJ2GOm.js rename to assets/memory-long-term-Dt8AlP6i.js index f9b18dd2d163f2528476bf09340633b4c5598254..ab9b388dc9f0e6224a0cfeb29b75a74fb18d5fec 100644 --- a/assets/memory-long-term-w7gJ2GOm.js +++ b/assets/memory-long-term-Dt8AlP6i.js @@ -1 +1 @@ -import{createElementBlock as e,defineComponent as t,openBlock as n}from"./index-CuCRViVh.js";import{route_block_default as r}from"./route-block-DNPbw0zT.js";var i=t({__name:`memory-long-term`,setup(t){return(t,r)=>(n(),e(`div`))}});typeof r==`function`&&r(i);var a=i;export{a as default}; \ No newline at end of file +import{createElementBlock as e,defineComponent as t,openBlock as n}from"./index-CsmT0L1K.js";import{route_block_default as r}from"./route-block-DNPbw0zT.js";var i=t({__name:`memory-long-term`,setup(t){return(t,r)=>(n(),e(`div`))}});typeof r==`function`&&r(i);var a=i;export{a as default}; \ No newline at end of file diff --git a/assets/memory-short-term-BJNXIYfx.js b/assets/memory-short-term-CWq7dsUA.js similarity index 77% rename from assets/memory-short-term-BJNXIYfx.js rename to assets/memory-short-term-CWq7dsUA.js index 30a5abf7affa7c29e91ce69f1f15266c2933f88f..7b5df47cf92cf3128647aa92424b4f247af83e45 100644 --- a/assets/memory-short-term-BJNXIYfx.js +++ b/assets/memory-short-term-CWq7dsUA.js @@ -1 +1 @@ -import{createElementBlock as e,defineComponent as t,openBlock as n}from"./index-CuCRViVh.js";import{route_block_default as r}from"./route-block-DNPbw0zT.js";var i=t({__name:`memory-short-term`,setup(t){return(t,r)=>(n(),e(`div`))}});typeof r==`function`&&r(i);var a=i;export{a as default}; \ No newline at end of file +import{createElementBlock as e,defineComponent as t,openBlock as n}from"./index-CsmT0L1K.js";import{route_block_default as r}from"./route-block-DNPbw0zT.js";var i=t({__name:`memory-short-term`,setup(t){return(t,r)=>(n(),e(`div`))}});typeof r==`function`&&r(i);var a=i;export{a as default}; \ No newline at end of file diff --git a/assets/messages-Dz0YVnuk.js b/assets/messages-Db1po7ry.js similarity index 77% rename from assets/messages-Dz0YVnuk.js rename to assets/messages-Db1po7ry.js index aac03b794f1fb7f81338b6c74e2a4586249ac08d..e5444214172b2a749b42631073d35aa0b94b1d62 100644 --- a/assets/messages-Dz0YVnuk.js +++ b/assets/messages-Db1po7ry.js @@ -1 +1 @@ -import{Fragment as e,createBaseVNode as t,createElementBlock as n,createVNode as r,defineComponent as i,openBlock as a,ref as o,renderList as s,toDisplayString as c,unref as l}from"./index-CuCRViVh.js";import"./src-C2QbIOor.js";import"./Basic-SuYkQxAJ.js";import{Textarea_default as u}from"./Textarea-D04Ettdn.js";import"./sleep-CvjNLutj.js";import{useQueue as d}from"./queue-DAKPJQl1.js";import{llmInferenceEndToken as f,useMessageContentQueue as p}from"./queues-Dstwm1VQ.js";const m={flex:``,"flex-col":``,"gap-2":``,"p-2":``},h={flex:``,"flex-row":``,"gap-2":``},g={"rounded-lg":``,bg:`neutral-100 dark:neutral-700`,"p-4":``},_={"w-full":``,flex:``,"flex-row":``,"gap-4":``},v={"w-full":``,"rounded-lg":``,bg:`neutral-100 dark:neutral-700`,"p-2":``};var y=i({__name:`messages`,setup(i){let y=o(``),b=o([]),x=o(!1),S=d({handlers:[async e=>{b.value.push(e.data)}]}),C=p(S);async function w(){x.value=!0,C.add(y.value),C.add(f),y.value=``,x.value=!1}return(i,o)=>(a(),n(`div`,m,[t(`div`,h,[r(l(u),{modelValue:y.value,"onUpdate:modelValue":o[0]||=e=>y.value=e,placeholder:`Message`,p:`2`,bg:`neutral-100 dark:neutral-700`,"w-full":``,"rounded-lg":``,"outline-none":``,onSubmit:w},null,8,[`modelValue`]),t(`button`,g,c(x.value?`Processing...`:`Send`),1)]),t(`div`,_,[t(`div`,v,[o[1]||=t(`h3`,{"font-normal":``},` TTS Message `,-1),(a(!0),n(e,null,s(b.value,e=>(a(),n(`div`,{key:e},[t(`div`,null,c(e),1)]))),128))])])]))}}),b=y;export{b as default}; \ No newline at end of file +import{Fragment as e,createBaseVNode as t,createElementBlock as n,createVNode as r,defineComponent as i,openBlock as a,ref as o,renderList as s,toDisplayString as c,unref as l}from"./index-CsmT0L1K.js";import"./src-C1Sr0aqN.js";import"./Basic-MLnzojs5.js";import{Textarea_default as u}from"./Textarea-CK41gHte.js";import"./sleep-CvjNLutj.js";import{useQueue as d}from"./queue-B0kER5Ap.js";import{llmInferenceEndToken as f,useMessageContentQueue as p}from"./queues-hSEKEE3F.js";const m={flex:``,"flex-col":``,"gap-2":``,"p-2":``},h={flex:``,"flex-row":``,"gap-2":``},g={"rounded-lg":``,bg:`neutral-100 dark:neutral-700`,"p-4":``},_={"w-full":``,flex:``,"flex-row":``,"gap-4":``},v={"w-full":``,"rounded-lg":``,bg:`neutral-100 dark:neutral-700`,"p-2":``};var y=i({__name:`messages`,setup(i){let y=o(``),b=o([]),x=o(!1),S=d({handlers:[async e=>{b.value.push(e.data)}]}),C=p(S);async function w(){x.value=!0,C.add(y.value),C.add(f),y.value=``,x.value=!1}return(i,o)=>(a(),n(`div`,m,[t(`div`,h,[r(l(u),{modelValue:y.value,"onUpdate:modelValue":o[0]||=e=>y.value=e,placeholder:`Message`,p:`2`,bg:`neutral-100 dark:neutral-700`,"w-full":``,"rounded-lg":``,"outline-none":``,onSubmit:w},null,8,[`modelValue`]),t(`button`,g,c(x.value?`Processing...`:`Send`),1)]),t(`div`,_,[t(`div`,v,[o[1]||=t(`h3`,{"font-normal":``},` TTS Message `,-1),(a(!0),n(e,null,s(b.value,e=>(a(),n(`div`,{key:e},[t(`div`,null,c(e),1)]))),128))])])]))}}),b=y;export{b as default}; \ No newline at end of file diff --git a/assets/microsoft-speech-D1Nm-r-u.js b/assets/microsoft-speech-CWxCOPph.js similarity index 84% rename from assets/microsoft-speech-D1Nm-r-u.js rename to assets/microsoft-speech-CWxCOPph.js index 5b637c3364edb05ce2b733402c34205255b25eb0..d5f5346619a2618bd05be3cad5752f04d0ff64c7 100644 --- a/assets/microsoft-speech-D1Nm-r-u.js +++ b/assets/microsoft-speech-CWxCOPph.js @@ -1 +1 @@ -import{computed as e,createBaseVNode as t,createBlock as n,createVNode as r,defineComponent as i,onMounted as a,openBlock as o,ref as s,storeToRefs as c,unref as l,useI18n as u,watch as d,withCtx as f}from"./index-CuCRViVh.js";import"./import-url-browser-DNuYZxPr.js";import"./duckdb-mvp-C3i5IjU8.js";import"./index-CISmcbXk-BkTeNOgG.js";import"./types-AwjH7X1C.js";import{useProvidersStore as p,useSpeechStore as m}from"./stores-m0eA85gd.js";import"./__vite-browser-external-CCfYMxZl.js";import"./Button-DFhzbYVt.js";import{FieldInput_default as h,FieldRange_default as g}from"./src-C2QbIOor.js";import{SpeechPlayground_default as _,SpeechProviderSettings_default as v}from"./components-BFLl4u81.js";import"./composables-Cgvkd8lL.js";import"./sleep-CvjNLutj.js";import"./queue-DAKPJQl1.js";import"./queues-Dstwm1VQ.js";import"./dist-Cr2QBfS4.js";import"./webgpu-Nt9hTBpW.js";import{route_block_default as y}from"./route-block-DNPbw0zT.js";const b={flex:`~ col gap-4`},x=`microsoft-speech`,S=`v1`;var C=i({__name:`microsoft-speech`,setup(i){let{t:y}=u(),C={pitch:0,speed:1,volume:0},w=m(),T=p(),{providers:E}=c(T),D=s(0),O=s(1),k=s(0),A=e({get:()=>{var e;return(e=E.value[x])?.region||`eastasia`},set:e=>{E.value[x]||(E.value[x]={region:`eastasia`}),E.value[x].region=e}}),j=e(()=>{var e;return!!(e=E.value[x])?.apiKey}),M=e(()=>w.availableVoices[x]||[]);a(async()=>{await w.loadVoicesForProvider(x)}),d([j,A],async()=>{await w.loadVoicesForProvider(x)});async function N(e,t,n){let r=T.getProviderInstance(x);if(!r)throw Error(`Failed to initialize speech provider`);let i=T.getProviderConfig(x),a=i.model||S,o={...i,region:A.value,disableSsml:!n};if(!n&&t){let n=M.value.find(e=>e.id===t);if(n){let s=w.generateSSML(e,n,{...i,pitch:D.value});return await w.speech(r,a,s,t,o)}}return await w.speech(r,a,e,t,o)}return(e,i)=>(o(),n(l(v),{"provider-id":x,"default-model":S,"additional-settings":C},{"basic-settings":f(()=>[r(l(h),{modelValue:A.value,"onUpdate:modelValue":i[0]||=e=>A.value=e,label:l(y)(`settings.pages.providers.provider.microsoft-speech.fields.field.region.label`),description:l(y)(`settings.pages.providers.provider.microsoft-speech.fields.field.region.description`),placeholder:`eastasia`,required:``,type:`text`},null,8,[`modelValue`,`label`,`description`])]),"voice-settings":f(()=>[t(`div`,b,[r(l(g),{modelValue:D.value,"onUpdate:modelValue":i[1]||=e=>D.value=e,label:l(y)(`settings.pages.providers.provider.common.fields.field.pitch.label`),description:l(y)(`settings.pages.providers.provider.common.fields.field.pitch.description`),min:-100,max:100,step:1,"format-value":e=>`${e}%`},null,8,[`modelValue`,`label`,`description`,`format-value`]),r(l(g),{modelValue:O.value,"onUpdate:modelValue":i[2]||=e=>O.value=e,label:l(y)(`settings.pages.providers.provider.common.fields.field.speed.label`),description:l(y)(`settings.pages.providers.provider.common.fields.field.speed.description`),min:.5,max:2,step:.01},null,8,[`modelValue`,`label`,`description`]),r(l(g),{modelValue:k.value,"onUpdate:modelValue":i[3]||=e=>k.value=e,label:l(y)(`settings.pages.providers.provider.common.fields.field.volume.label`),description:l(y)(`settings.pages.providers.provider.common.fields.field.volume.description`),min:-100,max:100,step:1,"format-value":e=>`${e}%`},null,8,[`modelValue`,`label`,`description`,`format-value`])])]),playground:f(()=>[r(l(_),{"available-voices":M.value,"generate-speech":N,"api-key-configured":j.value,"default-text":`Hello! This is a test of the Microsoft Speech synthesis.`},null,8,[`available-voices`,`api-key-configured`])]),_:1}))}});typeof y==`function`&&y(C);var w=C;export{w as default}; \ No newline at end of file +import{computed as e,createBaseVNode as t,createBlock as n,createVNode as r,defineComponent as i,onMounted as a,openBlock as o,ref as s,storeToRefs as c,unref as l,useI18n as u,watch as d,withCtx as f}from"./index-CsmT0L1K.js";import"./import-url-browser-DNuYZxPr.js";import"./duckdb-mvp-C3i5IjU8.js";import"./index-CISmcbXk-C9oju49Y.js";import"./types-AwjH7X1C.js";import{useProvidersStore as p,useSpeechStore as m}from"./stores-2H61GqXP.js";import"./__vite-browser-external-DPh5tFvT.js";import"./Button-D3cjyOEe.js";import{FieldInput_default as h,FieldRange_default as g}from"./src-C1Sr0aqN.js";import{SpeechPlayground_default as _,SpeechProviderSettings_default as v}from"./components-DHUA669a.js";import"./composables-CgcEyUWo.js";import"./sleep-CvjNLutj.js";import"./queue-B0kER5Ap.js";import"./queues-hSEKEE3F.js";import"./dist-Cr2QBfS4.js";import"./webgpu-Nt9hTBpW.js";import{route_block_default as y}from"./route-block-DNPbw0zT.js";const b={flex:`~ col gap-4`},x=`microsoft-speech`,S=`v1`;var C=i({__name:`microsoft-speech`,setup(i){let{t:y}=u(),C={pitch:0,speed:1,volume:0},w=m(),T=p(),{providers:E}=c(T),D=s(0),O=s(1),k=s(0),A=e({get:()=>{var e;return(e=E.value[x])?.region||`eastasia`},set:e=>{E.value[x]||(E.value[x]={region:`eastasia`}),E.value[x].region=e}}),j=e(()=>{var e;return!!(e=E.value[x])?.apiKey}),M=e(()=>w.availableVoices[x]||[]);a(async()=>{await w.loadVoicesForProvider(x)}),d([j,A],async()=>{await w.loadVoicesForProvider(x)});async function N(e,t,n){let r=T.getProviderInstance(x);if(!r)throw Error(`Failed to initialize speech provider`);let i=T.getProviderConfig(x),a=i.model||S,o={...i,region:A.value,disableSsml:!n};if(!n&&t){let n=M.value.find(e=>e.id===t);if(n){let s=w.generateSSML(e,n,{...i,pitch:D.value});return await w.speech(r,a,s,t,o)}}return await w.speech(r,a,e,t,o)}return(e,i)=>(o(),n(l(v),{"provider-id":x,"default-model":S,"additional-settings":C},{"basic-settings":f(()=>[r(l(h),{modelValue:A.value,"onUpdate:modelValue":i[0]||=e=>A.value=e,label:l(y)(`settings.pages.providers.provider.microsoft-speech.fields.field.region.label`),description:l(y)(`settings.pages.providers.provider.microsoft-speech.fields.field.region.description`),placeholder:`eastasia`,required:``,type:`text`},null,8,[`modelValue`,`label`,`description`])]),"voice-settings":f(()=>[t(`div`,b,[r(l(g),{modelValue:D.value,"onUpdate:modelValue":i[1]||=e=>D.value=e,label:l(y)(`settings.pages.providers.provider.common.fields.field.pitch.label`),description:l(y)(`settings.pages.providers.provider.common.fields.field.pitch.description`),min:-100,max:100,step:1,"format-value":e=>`${e}%`},null,8,[`modelValue`,`label`,`description`,`format-value`]),r(l(g),{modelValue:O.value,"onUpdate:modelValue":i[2]||=e=>O.value=e,label:l(y)(`settings.pages.providers.provider.common.fields.field.speed.label`),description:l(y)(`settings.pages.providers.provider.common.fields.field.speed.description`),min:.5,max:2,step:.01},null,8,[`modelValue`,`label`,`description`]),r(l(g),{modelValue:k.value,"onUpdate:modelValue":i[3]||=e=>k.value=e,label:l(y)(`settings.pages.providers.provider.common.fields.field.volume.label`),description:l(y)(`settings.pages.providers.provider.common.fields.field.volume.description`),min:-100,max:100,step:1,"format-value":e=>`${e}%`},null,8,[`modelValue`,`label`,`description`,`format-value`])])]),playground:f(()=>[r(l(_),{"available-voices":M.value,"generate-speech":N,"api-key-configured":j.value,"default-text":`Hello! This is a test of the Microsoft Speech synthesis.`},null,8,[`available-voices`,`api-key-configured`])]),_:1}))}});typeof y==`function`&&y(C);var w=C;export{w as default}; \ No newline at end of file diff --git a/assets/mistral-ai-Dlp6niUh.js b/assets/mistral-ai-DDvbJ_KZ.js similarity index 82% rename from assets/mistral-ai-Dlp6niUh.js rename to assets/mistral-ai-DDvbJ_KZ.js index f37bfa3220c79e98b462277b878265420f37fbb4..5c64de0669dbabebb9d5b4c8c6569fcad877873c 100644 --- a/assets/mistral-ai-Dlp6niUh.js +++ b/assets/mistral-ai-DDvbJ_KZ.js @@ -1 +1 @@ -import{computed as e,createBlock as t,createVNode as n,defineComponent as r,onMounted as i,openBlock as a,storeToRefs as o,unref as s,useI18n as c,useRouter as l,watch as u,withCtx as d}from"./index-CuCRViVh.js";import"./import-url-browser-DNuYZxPr.js";import"./duckdb-mvp-C3i5IjU8.js";import"./index-CISmcbXk-BkTeNOgG.js";import"./types-AwjH7X1C.js";import{useProvidersStore as f}from"./stores-m0eA85gd.js";import"./__vite-browser-external-CCfYMxZl.js";import"./Button-DFhzbYVt.js";import"./src-C2QbIOor.js";import{ProviderAdvancedSettings_default as p,ProviderApiKeyInput_default as m,ProviderBaseUrlInput_default as h,ProviderBasicSettings_default as g,ProviderSettingsContainer_default as _,ProviderSettingsLayout_default as v}from"./components-BFLl4u81.js";import"./composables-Cgvkd8lL.js";import"./sleep-CvjNLutj.js";import"./queue-DAKPJQl1.js";import"./queues-Dstwm1VQ.js";import"./dist-Cr2QBfS4.js";import"./webgpu-Nt9hTBpW.js";import{route_block_default as y}from"./route-block-DNPbw0zT.js";const b=`mistral-ai`;var x=r({__name:`mistral-ai`,setup(r){let{t:y}=c(),x=l(),S=f(),{providers:C}=o(S),w=e(()=>S.getProviderMetadata(b)),T=e({get:()=>{var e;return(e=C.value[b])?.apiKey||``},set:e=>{C.value[b]||(C.value[b]={}),C.value[b].apiKey=e}}),E=e({get:()=>{var e;return(e=C.value[b])?.baseUrl||``},set:e=>{C.value[b]||(C.value[b]={}),C.value[b].baseUrl=e}});i(()=>{var e,t;S.initializeProvider(b),T.value=(e=C.value[b])?.apiKey||``,E.value=(t=C.value[b])?.baseUrl||``}),u([T,E],()=>{C.value[b]={...C.value[b],apiKey:T.value,baseUrl:E.value||``}});function D(){var e;C.value[b]={...(e=w.value)?.defaultOptions}}return(e,r)=>{var i,o;return a(),t(s(v),{"provider-name":(i=w.value)?.localizedName,"provider-icon-color":(o=w.value)?.iconColor,"on-back":()=>s(x).back()},{default:d(()=>[n(s(_),null,{default:d(()=>[n(s(g),{title:s(y)(`settings.pages.providers.common.section.basic.title`),description:s(y)(`settings.pages.providers.common.section.basic.description`),"on-reset":D},{default:d(()=>{var e;return[n(s(m),{modelValue:T.value,"onUpdate:modelValue":r[0]||=e=>T.value=e,"provider-name":(e=w.value)?.localizedName,placeholder:`mis-...`},null,8,[`modelValue`,`provider-name`])]}),_:1},8,[`title`,`description`]),n(s(p),{title:s(y)(`settings.pages.providers.common.section.advanced.title`)},{default:d(()=>[n(s(h),{modelValue:E.value,"onUpdate:modelValue":r[1]||=e=>E.value=e,placeholder:`https://api.mistral.ai/v1/`},null,8,[`modelValue`])]),_:1},8,[`title`])]),_:1})]),_:1},8,[`provider-name`,`provider-icon-color`,`on-back`])}}});typeof y==`function`&&y(x);var S=x;export{S as default}; \ No newline at end of file +import{computed as e,createBlock as t,createVNode as n,defineComponent as r,onMounted as i,openBlock as a,storeToRefs as o,unref as s,useI18n as c,useRouter as l,watch as u,withCtx as d}from"./index-CsmT0L1K.js";import"./import-url-browser-DNuYZxPr.js";import"./duckdb-mvp-C3i5IjU8.js";import"./index-CISmcbXk-C9oju49Y.js";import"./types-AwjH7X1C.js";import{useProvidersStore as f}from"./stores-2H61GqXP.js";import"./__vite-browser-external-DPh5tFvT.js";import"./Button-D3cjyOEe.js";import"./src-C1Sr0aqN.js";import{ProviderAdvancedSettings_default as p,ProviderApiKeyInput_default as m,ProviderBaseUrlInput_default as h,ProviderBasicSettings_default as g,ProviderSettingsContainer_default as _,ProviderSettingsLayout_default as v}from"./components-DHUA669a.js";import"./composables-CgcEyUWo.js";import"./sleep-CvjNLutj.js";import"./queue-B0kER5Ap.js";import"./queues-hSEKEE3F.js";import"./dist-Cr2QBfS4.js";import"./webgpu-Nt9hTBpW.js";import{route_block_default as y}from"./route-block-DNPbw0zT.js";const b=`mistral-ai`;var x=r({__name:`mistral-ai`,setup(r){let{t:y}=c(),x=l(),S=f(),{providers:C}=o(S),w=e(()=>S.getProviderMetadata(b)),T=e({get:()=>{var e;return(e=C.value[b])?.apiKey||``},set:e=>{C.value[b]||(C.value[b]={}),C.value[b].apiKey=e}}),E=e({get:()=>{var e;return(e=C.value[b])?.baseUrl||``},set:e=>{C.value[b]||(C.value[b]={}),C.value[b].baseUrl=e}});i(()=>{var e,t;S.initializeProvider(b),T.value=(e=C.value[b])?.apiKey||``,E.value=(t=C.value[b])?.baseUrl||``}),u([T,E],()=>{C.value[b]={...C.value[b],apiKey:T.value,baseUrl:E.value||``}});function D(){var e;C.value[b]={...(e=w.value)?.defaultOptions}}return(e,r)=>{var i,o;return a(),t(s(v),{"provider-name":(i=w.value)?.localizedName,"provider-icon-color":(o=w.value)?.iconColor,"on-back":()=>s(x).back()},{default:d(()=>[n(s(_),null,{default:d(()=>[n(s(g),{title:s(y)(`settings.pages.providers.common.section.basic.title`),description:s(y)(`settings.pages.providers.common.section.basic.description`),"on-reset":D},{default:d(()=>{var e;return[n(s(m),{modelValue:T.value,"onUpdate:modelValue":r[0]||=e=>T.value=e,"provider-name":(e=w.value)?.localizedName,placeholder:`mis-...`},null,8,[`modelValue`,`provider-name`])]}),_:1},8,[`title`,`description`]),n(s(p),{title:s(y)(`settings.pages.providers.common.section.advanced.title`)},{default:d(()=>[n(s(h),{modelValue:E.value,"onUpdate:modelValue":r[1]||=e=>E.value=e,placeholder:`https://api.mistral.ai/v1/`},null,8,[`modelValue`])]),_:1},8,[`title`])]),_:1})]),_:1},8,[`provider-name`,`provider-icon-color`,`on-back`])}}});typeof y==`function`&&y(x);var S=x;export{S as default}; \ No newline at end of file diff --git a/assets/models-BR8YPV_e.css b/assets/models-BR8YPV_e.css deleted file mode 100644 index 0b694a2cdc1be9f8063450313dc60a332edf8429..0000000000000000000000000000000000000000 --- a/assets/models-BR8YPV_e.css +++ /dev/null @@ -1 +0,0 @@ -.form-control[data-v-559b50a9]{outline-offset:2px;border-radius:.25rem;outline:2px solid #0000;padding:.25rem .5rem} diff --git a/assets/models-DXBLIPsA.js b/assets/models-C6v2DNx0.js similarity index 88% rename from assets/models-DXBLIPsA.js rename to assets/models-C6v2DNx0.js index d83b6a6c2b3d84a2a9fc1b5cdc7395813d1c3cc6..9bd251d2c1b205dd110b26886a062c89e5574991 100644 --- a/assets/models-DXBLIPsA.js +++ b/assets/models-C6v2DNx0.js @@ -1 +1 @@ -import{Fragment as e,__plugin_vue_export_helper_default as t,__toESM as n,createBaseVNode as r,createBlock as i,createCommentVNode as a,createElementBlock as o,createTextVNode as s,createVNode as c,defineComponent as l,openBlock as u,ref as d,renderList as f,renderSlot as p,resolveDirective as m,storeToRefs as h,toDisplayString as g,unref as _,useElementBounding as v,useFileDialog as y,useI18n as b,useMouse as x,useObjectUrl as S,useSettings as C,vModelSelect as w,vModelText as T,watch as E,withCtx as D,withDirectives as O}from"./index-CuCRViVh.js";import"./import-url-browser-DNuYZxPr.js";import"./duckdb-mvp-C3i5IjU8.js";import"./index-CISmcbXk-BkTeNOgG.js";import"./types-AwjH7X1C.js";import"./stores-m0eA85gd.js";import"./__vite-browser-external-CCfYMxZl.js";import"./Button-DFhzbYVt.js";import"./src-C2QbIOor.js";import"./dist-B4cQ-m7C.js";import{Canvas_default as k,Model_default as A,Section_default as j,require_jszip_min as M,require_localforage as N}from"./components-BFLl4u81.js";import"./composables-Cgvkd8lL.js";import"./sleep-CvjNLutj.js";import"./queue-DAKPJQl1.js";import{Emotion as P,EmotionNeutralMotionName as F}from"./queues-Dstwm1VQ.js";import"./dist-Cr2QBfS4.js";import"./webgpu-Nt9hTBpW.js";import{route_block_default as I}from"./route-block-DNPbw0zT.js";import{Vibrant as L}from"./browser-bfchqW24.js";import{ColorPalette_default as R}from"./ColorPalette-ZPdCD-E3.js";import{IconAnimation_default as z}from"./IconAnimation-DqqXWuqN.js";import{useIconAnimation as B}from"./useIconAnimation-DqaNnagM.js";const V=[`disabled`];var H=l({__name:`Live2DModelControlButton`,emits:[`click`],setup(e){let t=C();return(e,n)=>(u(),o(`button`,{disabled:_(t).loadingLive2dModel,bg:`neutral-100 dark:neutral-800`,hover:`bg-neutral-200 dark:bg-neutral-700`,transition:`all ease-in-out duration-250`,rounded:``,onClick:n[0]||=t=>e.$emit(`click`)},[p(e.$slots,`default`)],8,V))}}),U=H,W=n(M()),G=n(N());const K={flex:`~ col gap-2`},q={flex:``,"items-center":``,"gap-2":``},J=[`disabled`,`placeholder`],Y={"font-medium":``,"font-mono":``},X={flex:``,"gap-2":``},Z=[`onUpdate:modelValue`],Q=[`href`,`download`];var ee=l({__name:`Live2DSettings`,props:{palette:null},emits:[`extractColorsFromModel`],setup(t){let{t:n}=b(),l=y({accept:`application/zip`}),p=C(),{live2dModelFile:m,live2dMotionMap:v,live2dLoadSource:x,loadingLive2dModel:k,availableLive2dMotions:A,live2dModelUrl:M}=h(p),N=d(M.value);l.onChange(e=>{e&&e.length>0&&(v.value={},m.value=e[0],x.value=`file`,k.value=!0)}),E(()=>p.loadingLive2dModel,e=>{e||x.value===`file`&&A.value.forEach(e=>{e.motionName in P?v.value[e.fileName]=e.motionName:v.value[e.fileName]=F})});async function I(e,t){if(!Object.keys(t).length)return e;let n=new W.default,r=await n.loadAsync(e),i=Object.keys(r.files).find(e=>e.endsWith(`model3.json`));if(!i)throw Error(`model3.json not found`);let a=await r.file(i).async(`string`),o=JSON.parse(a),s={};Object.entries(t).forEach(([e,t])=>{if(s[t]){s[t].push({File:e});return}s[t]=[{File:e}]}),o.FileReferences.Motions=s,r.file(i,JSON.stringify(o,null,2));let c=await r.generateAsync({type:`blob`});return new File([c],e.name,{type:e.type,lastModified:e.lastModified})}async function L(){let e=await G.default.getItem(`live2dModel`);if(!e)return;let t=await I(e,v.value);m.value=t,x.value=`file`,k.value=!0}let z=S(m);return(d,m)=>(u(),o(`div`,K,[c(_(j),{title:_(n)(`settings.live2d.change-model.title`),icon:`i-solar:magic-stick-3-bold-duotone`,"inner-class":`text-sm`},{default:D(()=>[r(`div`,q,[O(r(`input`,{"onUpdate:modelValue":m[0]||=e=>N.value=e,disabled:_(p).loadingLive2dModel,class:`form-control flex-1`,border:`neutral-300 dark:neutral-800 solid 1 focus:neutral-400 dark:focus:neutral-600`,transition:`border duration-250 ease-in-out`,placeholder:_(n)(`settings.live2d.change-model.from-url-placeholder`)},null,8,J),[[T,N.value]]),c(U,{class:`form-control`,onClick:m[1]||=e=>M.value=N.value},{default:D(()=>[s(g(_(n)(`settings.live2d.change-model.from-url`)),1)]),_:1})]),c(U,{class:`form-control place-self-end`,onClick:m[2]||=e=>_(l).open()},{default:D(()=>[s(g(_(n)(`settings.live2d.change-model.from-file`))+`... `,1)]),_:1}),c(U,{class:`form-control`,onClick:m[3]||=e=>d.$emit(`extractColorsFromModel`)},{default:D(()=>m[4]||=[s(` Extract colors from model `)]),_:1,__:[4]}),c(R,{colors:t.palette.map(e=>({hex:e,name:e}))},null,8,[`colors`])]),_:1},8,[`title`]),_(p).live2dLoadSource===`file`?(u(),i(_(j),{key:0,title:_(n)(`settings.live2d.edit-motion-map.title`),icon:`i-solar:face-scan-circle-bold-duotone`},{default:D(()=>{var t;return[(u(!0),o(e,null,f(_(p).availableLive2dMotions,t=>(u(),o(`div`,{key:t.fileName,flex:``,"items-center":``,"justify-between":``,"text-sm":``},[r(`span`,Y,g(t.fileName),1),r(`div`,X,[O(r(`select`,{"onUpdate:modelValue":e=>_(p).live2dMotionMap[t.fileName]=e},[(u(!0),o(e,null,f(Object.keys(_(P)),e=>(u(),o(`option`,{key:e},g(e),1))),128))],8,Z),[[w,_(p).live2dMotionMap[t.fileName]]]),c(U,{class:`form-control`,onClick:e=>_(p).live2dCurrentMotion={group:t.motionName,index:t.motionIndex}},{default:D(()=>m[5]||=[s(` Play `)]),_:2,__:[5]},1032,[`onClick`])])]))),128)),c(U,{onClick:L},{default:D(()=>m[6]||=[s(` Save and patch `)]),_:1,__:[6]}),r(`a`,{"mt-2":``,block:``,href:_(z),download:`${(t=_(p).live2dModelFile)?.name||`live2d`}-motion-edited.zip`},[c(U,{"w-full":``},{default:D(()=>m[7]||=[s(`Export`)]),_:1,__:[7]})],8,Q)]}),_:1},8,[`title`])):a(``,!0)]))}}),te=t(ee,[[`__scopeId`,`data-v-559b50a9`]]);const ne={flex:``,class:`flex-col-reverse sm:flex-row`},re={key:1,text:`neutral-200/50 dark:neutral-600/20`,"pointer-events-none":``,fixed:``,top:`[calc(100dvh-15rem)]`,"bottom-0":``,"right--5":``,"z--1":``,initial:{scale:.9,opacity:0,y:15},enter:{scale:1,opacity:1,y:0},duration:500,"size-60":``,flex:``,"items-center":``,"justify-center":``};var $=l({__name:`index`,setup(t){let n=d(),a=d(),{width:s,height:l}=v(n),f=d([]);async function p(){if(!a.value)return;let e=await a.value.captureFrame();if(!e){console.error(`No frame captured`);return}let t=URL.createObjectURL(e);try{let e=new L(t),n=await e.getPalette();f.value=Object.values(n).map(e=>e?.hex).filter(e=>typeof e==`string`)}finally{URL.revokeObjectURL(t)}}let{iconAnimationStarted:h,showIconAnimation:g,animationIcon:y}=B(`i-solar:people-nearby-bold-duotone`),b=x();return(t,d)=>{let v=m(`motion`);return u(),o(e,null,[r(`div`,ne,[r(`div`,{ref_key:`live2dContainerRef`,ref:n,w:`100% sm:50%`,h:`50dvh sm:80dvh`},[c(_(k),{ref_key:`live2dCanvasRef`,ref:a,width:_(s),height:_(l),resolution:2,"max-h":`100dvh`},{default:D(({app:e})=>[c(_(A),{app:e,"mouth-open-size":0,width:_(s),height:_(l),paused:!1,"focus-at":{x:_(b).x.value,y:_(b).y.value}},null,8,[`app`,`width`,`height`,`focus-at`])]),_:1},8,[`width`,`height`])],512),c(te,{w:`100% sm:50%`,h:`50dvh sm:80dvh`,palette:f.value,onExtractColorsFromModel:p},null,8,[`palette`])]),_(g)?(u(),i(z,{key:0,"z-index":-1,icon:_(y),"icon-size":12,duration:1e3,started:_(h),"is-reverse":!0,position:`calc(100dvw - 9.5rem), calc(100dvh - 9.5rem)`,"text-color":`text-neutral-200/50 dark:text-neutral-600/20`},null,8,[`icon`,`started`])):O((u(),o(`div`,re,d[0]||=[r(`div`,{text:`60`,"i-solar:people-nearby-bold-duotone":``},null,-1)])),[[v]])],64)}}});typeof I==`function`&&I($);var ie=$;export{ie as default}; \ No newline at end of file +import{Fragment as e,__plugin_vue_export_helper_default as t,__toESM as n,createBaseVNode as r,createBlock as i,createCommentVNode as a,createElementBlock as o,createTextVNode as s,createVNode as c,defineComponent as l,openBlock as u,ref as d,renderList as f,renderSlot as p,resolveDirective as m,storeToRefs as h,toDisplayString as g,unref as _,useElementBounding as v,useFileDialog as y,useI18n as b,useMouse as x,useObjectUrl as S,useSettings as C,vModelSelect as w,vModelText as T,watch as E,withCtx as D,withDirectives as O}from"./index-CsmT0L1K.js";import"./import-url-browser-DNuYZxPr.js";import"./duckdb-mvp-C3i5IjU8.js";import"./index-CISmcbXk-C9oju49Y.js";import"./types-AwjH7X1C.js";import"./stores-2H61GqXP.js";import"./__vite-browser-external-DPh5tFvT.js";import"./Button-D3cjyOEe.js";import"./src-C1Sr0aqN.js";import"./dist-B9GpkGif.js";import{Canvas_default as k,Model_default as A,Section_default as j,require_jszip_min as M,require_localforage as N}from"./components-DHUA669a.js";import"./composables-CgcEyUWo.js";import"./sleep-CvjNLutj.js";import"./queue-B0kER5Ap.js";import{Emotion as P,EmotionNeutralMotionName as F}from"./queues-hSEKEE3F.js";import"./dist-Cr2QBfS4.js";import"./webgpu-Nt9hTBpW.js";import{route_block_default as I}from"./route-block-DNPbw0zT.js";import{Vibrant as L}from"./browser-bfchqW24.js";import{ColorPalette_default as R}from"./ColorPalette-BQYkam8G.js";import{IconAnimation_default as z}from"./IconAnimation-BDKVR9Dg.js";import{useIconAnimation as B}from"./useIconAnimation-bkp6MDA-.js";const V=[`disabled`];var H=l({__name:`Live2DModelControlButton`,emits:[`click`],setup(e){let t=C();return(e,n)=>(u(),o(`button`,{disabled:_(t).loadingLive2dModel,bg:`neutral-100 dark:neutral-800`,hover:`bg-neutral-200 dark:bg-neutral-700`,transition:`all ease-in-out duration-250`,rounded:``,onClick:n[0]||=t=>e.$emit(`click`)},[p(e.$slots,`default`)],8,V))}}),U=H,W=n(M()),G=n(N());const K={flex:`~ col gap-2`},q={flex:``,"items-center":``,"gap-2":``},J=[`disabled`,`placeholder`],Y={"font-medium":``,"font-mono":``},X={flex:``,"gap-2":``},Z=[`onUpdate:modelValue`],Q=[`href`,`download`];var ee=l({__name:`Live2DSettings`,props:{palette:null},emits:[`extractColorsFromModel`],setup(t){let{t:n}=b(),l=y({accept:`application/zip`}),p=C(),{live2dModelFile:m,live2dMotionMap:v,live2dLoadSource:x,loadingLive2dModel:k,availableLive2dMotions:A,live2dModelUrl:M}=h(p),N=d(M.value);l.onChange(e=>{e&&e.length>0&&(v.value={},m.value=e[0],x.value=`file`,k.value=!0)}),E(()=>p.loadingLive2dModel,e=>{e||x.value===`file`&&A.value.forEach(e=>{e.motionName in P?v.value[e.fileName]=e.motionName:v.value[e.fileName]=F})});async function I(e,t){if(!Object.keys(t).length)return e;let n=new W.default,r=await n.loadAsync(e),i=Object.keys(r.files).find(e=>e.endsWith(`model3.json`));if(!i)throw Error(`model3.json not found`);let a=await r.file(i).async(`string`),o=JSON.parse(a),s={};Object.entries(t).forEach(([e,t])=>{if(s[t]){s[t].push({File:e});return}s[t]=[{File:e}]}),o.FileReferences.Motions=s,r.file(i,JSON.stringify(o,null,2));let c=await r.generateAsync({type:`blob`});return new File([c],e.name,{type:e.type,lastModified:e.lastModified})}async function L(){let e=await G.default.getItem(`live2dModel`);if(!e)return;let t=await I(e,v.value);m.value=t,x.value=`file`,k.value=!0}let z=S(m);return(d,m)=>(u(),o(`div`,K,[c(_(j),{title:_(n)(`settings.live2d.change-model.title`),icon:`i-solar:magic-stick-3-bold-duotone`,"inner-class":`text-sm`},{default:D(()=>[r(`div`,q,[O(r(`input`,{"onUpdate:modelValue":m[0]||=e=>N.value=e,disabled:_(p).loadingLive2dModel,class:`form-control flex-1`,border:`neutral-300 dark:neutral-800 solid 1 focus:neutral-400 dark:focus:neutral-600`,transition:`border duration-250 ease-in-out`,placeholder:_(n)(`settings.live2d.change-model.from-url-placeholder`)},null,8,J),[[T,N.value]]),c(U,{class:`form-control`,onClick:m[1]||=e=>M.value=N.value},{default:D(()=>[s(g(_(n)(`settings.live2d.change-model.from-url`)),1)]),_:1})]),c(U,{class:`form-control place-self-end`,onClick:m[2]||=e=>_(l).open()},{default:D(()=>[s(g(_(n)(`settings.live2d.change-model.from-file`))+`... `,1)]),_:1}),c(U,{class:`form-control`,onClick:m[3]||=e=>d.$emit(`extractColorsFromModel`)},{default:D(()=>m[4]||=[s(` Extract colors from model `)]),_:1,__:[4]}),c(R,{colors:t.palette.map(e=>({hex:e,name:e}))},null,8,[`colors`])]),_:1},8,[`title`]),_(p).live2dLoadSource===`file`?(u(),i(_(j),{key:0,title:_(n)(`settings.live2d.edit-motion-map.title`),icon:`i-solar:face-scan-circle-bold-duotone`},{default:D(()=>{var t;return[(u(!0),o(e,null,f(_(p).availableLive2dMotions,t=>(u(),o(`div`,{key:t.fileName,flex:``,"items-center":``,"justify-between":``,"text-sm":``},[r(`span`,Y,g(t.fileName),1),r(`div`,X,[O(r(`select`,{"onUpdate:modelValue":e=>_(p).live2dMotionMap[t.fileName]=e},[(u(!0),o(e,null,f(Object.keys(_(P)),e=>(u(),o(`option`,{key:e},g(e),1))),128))],8,Z),[[w,_(p).live2dMotionMap[t.fileName]]]),c(U,{class:`form-control`,onClick:e=>_(p).live2dCurrentMotion={group:t.motionName,index:t.motionIndex}},{default:D(()=>m[5]||=[s(` Play `)]),_:2,__:[5]},1032,[`onClick`])])]))),128)),c(U,{onClick:L},{default:D(()=>m[6]||=[s(` Save and patch `)]),_:1,__:[6]}),r(`a`,{"mt-2":``,block:``,href:_(z),download:`${(t=_(p).live2dModelFile)?.name||`live2d`}-motion-edited.zip`},[c(U,{"w-full":``},{default:D(()=>m[7]||=[s(`Export`)]),_:1,__:[7]})],8,Q)]}),_:1},8,[`title`])):a(``,!0)]))}}),te=t(ee,[[`__scopeId`,`data-v-9302a7ae`]]);const ne={flex:``,class:`flex-col-reverse sm:flex-row`},re={key:1,text:`neutral-200/50 dark:neutral-600/20`,"pointer-events-none":``,fixed:``,top:`[calc(100dvh-15rem)]`,"bottom-0":``,"right--5":``,"z--1":``,initial:{scale:.9,opacity:0,y:15},enter:{scale:1,opacity:1,y:0},duration:500,"size-60":``,flex:``,"items-center":``,"justify-center":``};var $=l({__name:`index`,setup(t){let n=d(),a=d(),{width:s,height:l}=v(n),f=d([]);async function p(){if(!a.value)return;let e=await a.value.captureFrame();if(!e){console.error(`No frame captured`);return}let t=URL.createObjectURL(e);try{let e=new L(t),n=await e.getPalette();f.value=Object.values(n).map(e=>e?.hex).filter(e=>typeof e==`string`)}finally{URL.revokeObjectURL(t)}}let{iconAnimationStarted:h,showIconAnimation:g,animationIcon:y}=B(`i-solar:people-nearby-bold-duotone`),b=x();return(t,d)=>{let v=m(`motion`);return u(),o(e,null,[r(`div`,ne,[r(`div`,{ref_key:`live2dContainerRef`,ref:n,w:`100% sm:50%`,h:`50dvh sm:80dvh`},[c(_(k),{ref_key:`live2dCanvasRef`,ref:a,width:_(s),height:_(l),resolution:2,"max-h":`100dvh`},{default:D(({app:e})=>[c(_(A),{app:e,"mouth-open-size":0,width:_(s),height:_(l),paused:!1,"focus-at":{x:_(b).x.value,y:_(b).y.value}},null,8,[`app`,`width`,`height`,`focus-at`])]),_:1},8,[`width`,`height`])],512),c(te,{w:`100% sm:50%`,h:`50dvh sm:80dvh`,palette:f.value,onExtractColorsFromModel:p},null,8,[`palette`])]),_(g)?(u(),i(z,{key:0,"z-index":-1,icon:_(y),"icon-size":12,duration:1e3,started:_(h),"is-reverse":!0,position:`calc(100dvw - 9.5rem), calc(100dvh - 9.5rem)`,"text-color":`text-neutral-200/50 dark:text-neutral-600/20`},null,8,[`icon`,`started`])):O((u(),o(`div`,re,d[0]||=[r(`div`,{text:`60`,"i-solar:people-nearby-bold-duotone":``},null,-1)])),[[v]])],64)}}});typeof I==`function`&&I($);var ie=$;export{ie as default}; \ No newline at end of file diff --git a/assets/models-ctVuVUBS.css b/assets/models-ctVuVUBS.css new file mode 100644 index 0000000000000000000000000000000000000000..3314c72412965bf9a4e84347262f9039b127394d --- /dev/null +++ b/assets/models-ctVuVUBS.css @@ -0,0 +1 @@ +.form-control[data-v-9302a7ae]{outline-offset:2px;border-radius:.25rem;outline:2px solid #0000;padding:.25rem .5rem} diff --git a/assets/modules-Cg-sfGqM.js b/assets/modules-_XCJ51P8.js similarity index 86% rename from assets/modules-Cg-sfGqM.js rename to assets/modules-_XCJ51P8.js index 50278854661d43268aece0f7913c639ca2beca0b..742961329f7c280f8110c70fb2b32a442a14aa67 100644 --- a/assets/modules-Cg-sfGqM.js +++ b/assets/modules-_XCJ51P8.js @@ -1 +1 @@ -import{Fragment as e,computed as t,createBaseVNode as n,createBlock as r,createElementBlock as i,defineComponent as a,openBlock as o,renderList as s,resolveDirective as c,unref as l,useI18n as u,withDirectives as d}from"./index-CuCRViVh.js";import"./import-url-browser-DNuYZxPr.js";import"./duckdb-mvp-C3i5IjU8.js";import"./index-CISmcbXk-BkTeNOgG.js";import"./types-AwjH7X1C.js";import"./stores-m0eA85gd.js";import"./__vite-browser-external-CCfYMxZl.js";import"./Button-DFhzbYVt.js";import"./src-C2QbIOor.js";import{IconStatusItem_default as f}from"./components-BFLl4u81.js";import"./composables-Cgvkd8lL.js";import"./sleep-CvjNLutj.js";import"./queue-DAKPJQl1.js";import"./queues-Dstwm1VQ.js";import"./dist-Cr2QBfS4.js";import"./webgpu-Nt9hTBpW.js";import{route_block_default as p}from"./route-block-DNPbw0zT.js";import{IconAnimation_default as m}from"./IconAnimation-DqqXWuqN.js";import{useIconAnimation as h}from"./useIconAnimation-DqaNnagM.js";const g={grid:`~ cols-1 sm:cols-2 gap-4`},_={key:1,text:`neutral-200/50 dark:neutral-600/20`,"pointer-events-none":``,fixed:``,top:`[calc(100dvh-15rem)]`,"bottom-0":``,"right--5":``,"z--1":``,initial:{scale:.9,opacity:0,y:20},enter:{scale:1,opacity:1,y:0},duration:500,"size-60":``,flex:``,"items-center":``,"justify-center":``};var v=a({__name:`index`,setup(a){let{t:p}=u(),v=t(()=>[{id:`consciousness`,name:p(`settings.pages.modules.consciousness.title`),description:p(`settings.pages.modules.consciousness.description`),icon:`i-solar:ghost-bold-duotone`,to:`/settings/modules/consciousness`,configured:!1},{id:`speech`,name:p(`settings.pages.modules.speech.title`),description:p(`settings.pages.modules.speech.description`),icon:`i-solar:user-speak-rounded-bold-duotone`,to:`/settings/modules/speech`,configured:!1},{id:`hearing`,name:p(`settings.pages.modules.hearing.title`),description:p(`settings.pages.modules.hearing.description`),icon:`i-solar:microphone-3-bold-duotone`,to:``,configured:!1},{id:`vision`,name:p(`settings.pages.modules.vision.title`),description:p(`settings.pages.modules.vision.description`),icon:`i-solar:eye-closed-bold-duotone`,to:``,configured:!1},{id:`memory-short-term`,name:p(`settings.pages.modules.memory-short-term.title`),description:p(`settings.pages.modules.memory-short-term.description`),icon:`i-solar:bookmark-bold-duotone`,to:`/settings/modules/memory-short-term`,configured:!1},{id:`memory-long-term`,name:p(`settings.pages.modules.memory-long-term.title`),description:p(`settings.pages.modules.memory-long-term.description`),icon:`i-solar:book-bookmark-bold-duotone`,to:`/settings/modules/memory-long-term`,configured:!1},{id:`messaging-discord`,name:p(`settings.pages.modules.messaging-discord.title`),description:p(`settings.pages.modules.messaging-discord.description`),icon:`i-simple-icons:discord`,to:``,configured:!1},{id:`x`,name:p(`settings.pages.modules.x.title`),description:p(`settings.pages.modules.x.description`),icon:`i-simple-icons:x`,to:``,configured:!1},{id:`game-minecraft`,name:p(`settings.pages.modules.gaming-minecraft.title`),description:p(`settings.pages.modules.gaming-minecraft.description`),iconColor:`i-vscode-icons:file-type-minecraft`,to:``,configured:!1},{id:`game-factorio`,name:p(`settings.pages.modules.gaming-factorio.title`),description:p(`settings.pages.modules.gaming-factorio.description`),iconImage:``,to:``,configured:!1}]),{iconAnimationStarted:y,showIconAnimation:b,animationIcon:x}=h(`i-solar:layers-bold-duotone`);return(t,a)=>{let u=c(`motion`);return o(),i(e,null,[n(`div`,g,[(o(!0),i(e,null,s(v.value,(e,t)=>d((o(),r(l(f),{key:e.id,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+t*10,delay:t*50,title:e.name,description:e.description,icon:e.icon,"icon-color":e.iconColor,"icon-image":e.iconImage,to:e.to,configured:e.configured},null,8,[`duration`,`delay`,`title`,`description`,`icon`,`icon-color`,`icon-image`,`to`,`configured`])),[[u]])),128))]),l(b)?(o(),r(m,{key:0,icon:l(x),"icon-size":12,duration:1e3,started:l(y),"is-reverse":!0,"z-index":-1,"text-color":`text-neutral-200/50 dark:text-neutral-600/20`,position:`calc(100dvw - 9.5rem), calc(100dvh - 9.5rem)`},null,8,[`icon`,`started`])):d((o(),i(`div`,_,a[0]||=[n(`div`,{text:`60`,"i-solar:layers-bold-duotone":``},null,-1)])),[[u]])],64)}}});typeof p==`function`&&p(v);var y=v;export{y as default}; \ No newline at end of file +import{Fragment as e,computed as t,createBaseVNode as n,createBlock as r,createElementBlock as i,defineComponent as a,openBlock as o,renderList as s,resolveDirective as c,unref as l,useI18n as u,withDirectives as d}from"./index-CsmT0L1K.js";import"./import-url-browser-DNuYZxPr.js";import"./duckdb-mvp-C3i5IjU8.js";import"./index-CISmcbXk-C9oju49Y.js";import"./types-AwjH7X1C.js";import"./stores-2H61GqXP.js";import"./__vite-browser-external-DPh5tFvT.js";import"./Button-D3cjyOEe.js";import"./src-C1Sr0aqN.js";import{IconStatusItem_default as f}from"./components-DHUA669a.js";import"./composables-CgcEyUWo.js";import"./sleep-CvjNLutj.js";import"./queue-B0kER5Ap.js";import"./queues-hSEKEE3F.js";import"./dist-Cr2QBfS4.js";import"./webgpu-Nt9hTBpW.js";import{route_block_default as p}from"./route-block-DNPbw0zT.js";import{IconAnimation_default as m}from"./IconAnimation-BDKVR9Dg.js";import{useIconAnimation as h}from"./useIconAnimation-bkp6MDA-.js";const g={grid:`~ cols-1 sm:cols-2 gap-4`},_={key:1,text:`neutral-200/50 dark:neutral-600/20`,"pointer-events-none":``,fixed:``,top:`[calc(100dvh-15rem)]`,"bottom-0":``,"right--5":``,"z--1":``,initial:{scale:.9,opacity:0,y:20},enter:{scale:1,opacity:1,y:0},duration:500,"size-60":``,flex:``,"items-center":``,"justify-center":``};var v=a({__name:`index`,setup(a){let{t:p}=u(),v=t(()=>[{id:`consciousness`,name:p(`settings.pages.modules.consciousness.title`),description:p(`settings.pages.modules.consciousness.description`),icon:`i-solar:ghost-bold-duotone`,to:`/settings/modules/consciousness`,configured:!1},{id:`speech`,name:p(`settings.pages.modules.speech.title`),description:p(`settings.pages.modules.speech.description`),icon:`i-solar:user-speak-rounded-bold-duotone`,to:`/settings/modules/speech`,configured:!1},{id:`hearing`,name:p(`settings.pages.modules.hearing.title`),description:p(`settings.pages.modules.hearing.description`),icon:`i-solar:microphone-3-bold-duotone`,to:``,configured:!1},{id:`vision`,name:p(`settings.pages.modules.vision.title`),description:p(`settings.pages.modules.vision.description`),icon:`i-solar:eye-closed-bold-duotone`,to:``,configured:!1},{id:`memory-short-term`,name:p(`settings.pages.modules.memory-short-term.title`),description:p(`settings.pages.modules.memory-short-term.description`),icon:`i-solar:bookmark-bold-duotone`,to:`/settings/modules/memory-short-term`,configured:!1},{id:`memory-long-term`,name:p(`settings.pages.modules.memory-long-term.title`),description:p(`settings.pages.modules.memory-long-term.description`),icon:`i-solar:book-bookmark-bold-duotone`,to:`/settings/modules/memory-long-term`,configured:!1},{id:`messaging-discord`,name:p(`settings.pages.modules.messaging-discord.title`),description:p(`settings.pages.modules.messaging-discord.description`),icon:`i-simple-icons:discord`,to:``,configured:!1},{id:`x`,name:p(`settings.pages.modules.x.title`),description:p(`settings.pages.modules.x.description`),icon:`i-simple-icons:x`,to:``,configured:!1},{id:`game-minecraft`,name:p(`settings.pages.modules.gaming-minecraft.title`),description:p(`settings.pages.modules.gaming-minecraft.description`),iconColor:`i-vscode-icons:file-type-minecraft`,to:``,configured:!1},{id:`game-factorio`,name:p(`settings.pages.modules.gaming-factorio.title`),description:p(`settings.pages.modules.gaming-factorio.description`),iconImage:``,to:``,configured:!1}]),{iconAnimationStarted:y,showIconAnimation:b,animationIcon:x}=h(`i-solar:layers-bold-duotone`);return(t,a)=>{let u=c(`motion`);return o(),i(e,null,[n(`div`,g,[(o(!0),i(e,null,s(v.value,(e,t)=>d((o(),r(l(f),{key:e.id,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+t*10,delay:t*50,title:e.name,description:e.description,icon:e.icon,"icon-color":e.iconColor,"icon-image":e.iconImage,to:e.to,configured:e.configured},null,8,[`duration`,`delay`,`title`,`description`,`icon`,`icon-color`,`icon-image`,`to`,`configured`])),[[u]])),128))]),l(b)?(o(),r(m,{key:0,icon:l(x),"icon-size":12,duration:1e3,started:l(y),"is-reverse":!0,"z-index":-1,"text-color":`text-neutral-200/50 dark:text-neutral-600/20`,position:`calc(100dvw - 9.5rem), calc(100dvh - 9.5rem)`},null,8,[`icon`,`started`])):d((o(),i(`div`,_,a[0]||=[n(`div`,{text:`60`,"i-solar:layers-bold-duotone":``},null,-1)])),[[u]])],64)}}});typeof p==`function`&&p(v);var y=v;export{y as default}; \ No newline at end of file diff --git a/assets/moonshot-ai-4PZIYm23.js b/assets/moonshot-ai-CxTmtFOe.js similarity index 82% rename from assets/moonshot-ai-4PZIYm23.js rename to assets/moonshot-ai-CxTmtFOe.js index 99a114d4e64450112f10af260fa5f817fc9e940a..f9ec0ee06112b525cce55d43988795e4ae073478 100644 --- a/assets/moonshot-ai-4PZIYm23.js +++ b/assets/moonshot-ai-CxTmtFOe.js @@ -1 +1 @@ -import{computed as e,createBlock as t,createVNode as n,defineComponent as r,onMounted as i,openBlock as a,storeToRefs as o,unref as s,useI18n as c,useRouter as l,watch as u,withCtx as d}from"./index-CuCRViVh.js";import"./import-url-browser-DNuYZxPr.js";import"./duckdb-mvp-C3i5IjU8.js";import"./index-CISmcbXk-BkTeNOgG.js";import"./types-AwjH7X1C.js";import{useProvidersStore as f}from"./stores-m0eA85gd.js";import"./__vite-browser-external-CCfYMxZl.js";import"./Button-DFhzbYVt.js";import"./src-C2QbIOor.js";import{ProviderAdvancedSettings_default as p,ProviderApiKeyInput_default as m,ProviderBaseUrlInput_default as h,ProviderBasicSettings_default as g,ProviderSettingsContainer_default as _,ProviderSettingsLayout_default as v}from"./components-BFLl4u81.js";import"./composables-Cgvkd8lL.js";import"./sleep-CvjNLutj.js";import"./queue-DAKPJQl1.js";import"./queues-Dstwm1VQ.js";import"./dist-Cr2QBfS4.js";import"./webgpu-Nt9hTBpW.js";import{route_block_default as y}from"./route-block-DNPbw0zT.js";const b=`moonshot-ai`;var x=r({__name:`moonshot-ai`,setup(r){let{t:y}=c(),x=l(),S=f(),{providers:C}=o(S),w=e(()=>S.getProviderMetadata(b)),T=e({get:()=>{var e;return(e=C.value[b])?.apiKey||``},set:e=>{C.value[b]||(C.value[b]={}),C.value[b].apiKey=e}}),E=e({get:()=>{var e;return(e=C.value[b])?.baseUrl||``},set:e=>{C.value[b]||(C.value[b]={}),C.value[b].baseUrl=e}});i(()=>{var e,t;S.initializeProvider(b),T.value=(e=C.value[b])?.apiKey||``,E.value=(t=C.value[b])?.baseUrl||``}),u([T,E],()=>{C.value[b]={...C.value[b],apiKey:T.value,baseUrl:E.value||``}});function D(){var e;C.value[b]={...(e=w.value)?.defaultOptions}}return(e,r)=>{var i,o;return a(),t(s(v),{"provider-name":(i=w.value)?.localizedName,"provider-icon":(o=w.value)?.icon,"on-back":()=>s(x).back()},{default:d(()=>[n(s(_),null,{default:d(()=>[n(s(g),{title:s(y)(`settings.pages.providers.common.section.basic.title`),description:s(y)(`settings.pages.providers.common.section.basic.description`),"on-reset":D},{default:d(()=>{var e;return[n(s(m),{modelValue:T.value,"onUpdate:modelValue":r[0]||=e=>T.value=e,"provider-name":(e=w.value)?.localizedName,placeholder:`ms-...`},null,8,[`modelValue`,`provider-name`])]}),_:1},8,[`title`,`description`]),n(s(p),{title:s(y)(`settings.pages.providers.common.section.advanced.title`)},{default:d(()=>[n(s(h),{modelValue:E.value,"onUpdate:modelValue":r[1]||=e=>E.value=e,placeholder:`https://api.moonshot.cn/v1/`},null,8,[`modelValue`])]),_:1},8,[`title`])]),_:1})]),_:1},8,[`provider-name`,`provider-icon`,`on-back`])}}});typeof y==`function`&&y(x);var S=x;export{S as default}; \ No newline at end of file +import{computed as e,createBlock as t,createVNode as n,defineComponent as r,onMounted as i,openBlock as a,storeToRefs as o,unref as s,useI18n as c,useRouter as l,watch as u,withCtx as d}from"./index-CsmT0L1K.js";import"./import-url-browser-DNuYZxPr.js";import"./duckdb-mvp-C3i5IjU8.js";import"./index-CISmcbXk-C9oju49Y.js";import"./types-AwjH7X1C.js";import{useProvidersStore as f}from"./stores-2H61GqXP.js";import"./__vite-browser-external-DPh5tFvT.js";import"./Button-D3cjyOEe.js";import"./src-C1Sr0aqN.js";import{ProviderAdvancedSettings_default as p,ProviderApiKeyInput_default as m,ProviderBaseUrlInput_default as h,ProviderBasicSettings_default as g,ProviderSettingsContainer_default as _,ProviderSettingsLayout_default as v}from"./components-DHUA669a.js";import"./composables-CgcEyUWo.js";import"./sleep-CvjNLutj.js";import"./queue-B0kER5Ap.js";import"./queues-hSEKEE3F.js";import"./dist-Cr2QBfS4.js";import"./webgpu-Nt9hTBpW.js";import{route_block_default as y}from"./route-block-DNPbw0zT.js";const b=`moonshot-ai`;var x=r({__name:`moonshot-ai`,setup(r){let{t:y}=c(),x=l(),S=f(),{providers:C}=o(S),w=e(()=>S.getProviderMetadata(b)),T=e({get:()=>{var e;return(e=C.value[b])?.apiKey||``},set:e=>{C.value[b]||(C.value[b]={}),C.value[b].apiKey=e}}),E=e({get:()=>{var e;return(e=C.value[b])?.baseUrl||``},set:e=>{C.value[b]||(C.value[b]={}),C.value[b].baseUrl=e}});i(()=>{var e,t;S.initializeProvider(b),T.value=(e=C.value[b])?.apiKey||``,E.value=(t=C.value[b])?.baseUrl||``}),u([T,E],()=>{C.value[b]={...C.value[b],apiKey:T.value,baseUrl:E.value||``}});function D(){var e;C.value[b]={...(e=w.value)?.defaultOptions}}return(e,r)=>{var i,o;return a(),t(s(v),{"provider-name":(i=w.value)?.localizedName,"provider-icon":(o=w.value)?.icon,"on-back":()=>s(x).back()},{default:d(()=>[n(s(_),null,{default:d(()=>[n(s(g),{title:s(y)(`settings.pages.providers.common.section.basic.title`),description:s(y)(`settings.pages.providers.common.section.basic.description`),"on-reset":D},{default:d(()=>{var e;return[n(s(m),{modelValue:T.value,"onUpdate:modelValue":r[0]||=e=>T.value=e,"provider-name":(e=w.value)?.localizedName,placeholder:`ms-...`},null,8,[`modelValue`,`provider-name`])]}),_:1},8,[`title`,`description`]),n(s(p),{title:s(y)(`settings.pages.providers.common.section.advanced.title`)},{default:d(()=>[n(s(h),{modelValue:E.value,"onUpdate:modelValue":r[1]||=e=>E.value=e,placeholder:`https://api.moonshot.cn/v1/`},null,8,[`modelValue`])]),_:1},8,[`title`])]),_:1})]),_:1},8,[`provider-name`,`provider-icon`,`on-back`])}}});typeof y==`function`&&y(x);var S=x;export{S as default}; \ No newline at end of file diff --git a/assets/novita-ai-BvZ0Q5n6.js b/assets/novita-ai-B__UhUPQ.js similarity index 82% rename from assets/novita-ai-BvZ0Q5n6.js rename to assets/novita-ai-B__UhUPQ.js index a853162951fb4c64f1943a6895bd31f91d3f626a..8089dfb51595ade7f29127465517521b65360262 100644 --- a/assets/novita-ai-BvZ0Q5n6.js +++ b/assets/novita-ai-B__UhUPQ.js @@ -1 +1 @@ -import{computed as e,createBlock as t,createVNode as n,defineComponent as r,onMounted as i,openBlock as a,storeToRefs as o,unref as s,useI18n as c,useRouter as l,watch as u,withCtx as d}from"./index-CuCRViVh.js";import"./import-url-browser-DNuYZxPr.js";import"./duckdb-mvp-C3i5IjU8.js";import"./index-CISmcbXk-BkTeNOgG.js";import"./types-AwjH7X1C.js";import{useProvidersStore as f}from"./stores-m0eA85gd.js";import"./__vite-browser-external-CCfYMxZl.js";import"./Button-DFhzbYVt.js";import"./src-C2QbIOor.js";import{ProviderAdvancedSettings_default as p,ProviderApiKeyInput_default as m,ProviderBaseUrlInput_default as h,ProviderBasicSettings_default as g,ProviderSettingsContainer_default as _,ProviderSettingsLayout_default as v}from"./components-BFLl4u81.js";import"./composables-Cgvkd8lL.js";import"./sleep-CvjNLutj.js";import"./queue-DAKPJQl1.js";import"./queues-Dstwm1VQ.js";import"./dist-Cr2QBfS4.js";import"./webgpu-Nt9hTBpW.js";import{route_block_default as y}from"./route-block-DNPbw0zT.js";const b=`novita-ai`;var x=r({__name:`novita-ai`,setup(r){let{t:y}=c(),x=l(),S=f(),{providers:C}=o(S),w=e(()=>S.getProviderMetadata(b)),T=e({get:()=>{var e;return(e=C.value[b])?.apiKey||``},set:e=>{C.value[b]||(C.value[b]={}),C.value[b].apiKey=e}}),E=e({get:()=>{var e;return(e=C.value[b])?.baseUrl||``},set:e=>{C.value[b]||(C.value[b]={}),C.value[b].baseUrl=e}});i(()=>{var e,t;S.initializeProvider(b),T.value=(e=C.value[b])?.apiKey||``,E.value=(t=C.value[b])?.baseUrl||``}),u([T,E],()=>{C.value[b]={...C.value[b],apiKey:T.value,baseUrl:E.value||``}});function D(){var e;C.value[b]={...(e=w.value)?.defaultOptions}}return(e,r)=>{var i,o;return a(),t(s(v),{"provider-name":(i=w.value)?.localizedName,"provider-icon-color":(o=w.value)?.iconColor,"on-back":()=>s(x).back()},{default:d(()=>[n(s(_),null,{default:d(()=>[n(s(g),{title:s(y)(`settings.pages.providers.common.section.basic.title`),description:s(y)(`settings.pages.providers.common.section.basic.description`),"on-reset":D},{default:d(()=>{var e;return[n(s(m),{modelValue:T.value,"onUpdate:modelValue":r[0]||=e=>T.value=e,"provider-name":(e=w.value)?.localizedName,placeholder:`nvt-...`},null,8,[`modelValue`,`provider-name`])]}),_:1},8,[`title`,`description`]),n(s(p),{title:s(y)(`settings.pages.providers.common.section.advanced.title`)},{default:d(()=>[n(s(h),{modelValue:E.value,"onUpdate:modelValue":r[1]||=e=>E.value=e,placeholder:`https://api.novita.ai/v1/`},null,8,[`modelValue`])]),_:1},8,[`title`])]),_:1})]),_:1},8,[`provider-name`,`provider-icon-color`,`on-back`])}}});typeof y==`function`&&y(x);var S=x;export{S as default}; \ No newline at end of file +import{computed as e,createBlock as t,createVNode as n,defineComponent as r,onMounted as i,openBlock as a,storeToRefs as o,unref as s,useI18n as c,useRouter as l,watch as u,withCtx as d}from"./index-CsmT0L1K.js";import"./import-url-browser-DNuYZxPr.js";import"./duckdb-mvp-C3i5IjU8.js";import"./index-CISmcbXk-C9oju49Y.js";import"./types-AwjH7X1C.js";import{useProvidersStore as f}from"./stores-2H61GqXP.js";import"./__vite-browser-external-DPh5tFvT.js";import"./Button-D3cjyOEe.js";import"./src-C1Sr0aqN.js";import{ProviderAdvancedSettings_default as p,ProviderApiKeyInput_default as m,ProviderBaseUrlInput_default as h,ProviderBasicSettings_default as g,ProviderSettingsContainer_default as _,ProviderSettingsLayout_default as v}from"./components-DHUA669a.js";import"./composables-CgcEyUWo.js";import"./sleep-CvjNLutj.js";import"./queue-B0kER5Ap.js";import"./queues-hSEKEE3F.js";import"./dist-Cr2QBfS4.js";import"./webgpu-Nt9hTBpW.js";import{route_block_default as y}from"./route-block-DNPbw0zT.js";const b=`novita-ai`;var x=r({__name:`novita-ai`,setup(r){let{t:y}=c(),x=l(),S=f(),{providers:C}=o(S),w=e(()=>S.getProviderMetadata(b)),T=e({get:()=>{var e;return(e=C.value[b])?.apiKey||``},set:e=>{C.value[b]||(C.value[b]={}),C.value[b].apiKey=e}}),E=e({get:()=>{var e;return(e=C.value[b])?.baseUrl||``},set:e=>{C.value[b]||(C.value[b]={}),C.value[b].baseUrl=e}});i(()=>{var e,t;S.initializeProvider(b),T.value=(e=C.value[b])?.apiKey||``,E.value=(t=C.value[b])?.baseUrl||``}),u([T,E],()=>{C.value[b]={...C.value[b],apiKey:T.value,baseUrl:E.value||``}});function D(){var e;C.value[b]={...(e=w.value)?.defaultOptions}}return(e,r)=>{var i,o;return a(),t(s(v),{"provider-name":(i=w.value)?.localizedName,"provider-icon-color":(o=w.value)?.iconColor,"on-back":()=>s(x).back()},{default:d(()=>[n(s(_),null,{default:d(()=>[n(s(g),{title:s(y)(`settings.pages.providers.common.section.basic.title`),description:s(y)(`settings.pages.providers.common.section.basic.description`),"on-reset":D},{default:d(()=>{var e;return[n(s(m),{modelValue:T.value,"onUpdate:modelValue":r[0]||=e=>T.value=e,"provider-name":(e=w.value)?.localizedName,placeholder:`nvt-...`},null,8,[`modelValue`,`provider-name`])]}),_:1},8,[`title`,`description`]),n(s(p),{title:s(y)(`settings.pages.providers.common.section.advanced.title`)},{default:d(()=>[n(s(h),{modelValue:E.value,"onUpdate:modelValue":r[1]||=e=>E.value=e,placeholder:`https://api.novita.ai/v1/`},null,8,[`modelValue`])]),_:1},8,[`title`])]),_:1})]),_:1},8,[`provider-name`,`provider-icon-color`,`on-back`])}}});typeof y==`function`&&y(x);var S=x;export{S as default}; \ No newline at end of file diff --git a/assets/ollama-BfwgYUF-.js b/assets/ollama-B0CgDUYn.js similarity index 82% rename from assets/ollama-BfwgYUF-.js rename to assets/ollama-B0CgDUYn.js index 12b6fe6684f59bf17b8bf28be814a9b7d209c115..3f10ae74c62fb950cd34f5cf6d372274f6aabaa7 100644 --- a/assets/ollama-BfwgYUF-.js +++ b/assets/ollama-B0CgDUYn.js @@ -1 +1 @@ -import{computed as e,createBlock as t,createVNode as n,defineComponent as r,onMounted as i,openBlock as a,ref as o,storeToRefs as s,unref as c,useI18n as l,useRouter as u,watch as d,withCtx as f}from"./index-CuCRViVh.js";import"./import-url-browser-DNuYZxPr.js";import"./duckdb-mvp-C3i5IjU8.js";import"./index-CISmcbXk-BkTeNOgG.js";import"./types-AwjH7X1C.js";import{useProvidersStore as p}from"./stores-m0eA85gd.js";import"./__vite-browser-external-CCfYMxZl.js";import"./Button-DFhzbYVt.js";import{FieldKeyValues_default as m}from"./src-C2QbIOor.js";import{ProviderAdvancedSettings_default as h,ProviderBaseUrlInput_default as g,ProviderBasicSettings_default as _,ProviderSettingsContainer_default as v,ProviderSettingsLayout_default as y}from"./components-BFLl4u81.js";import"./composables-Cgvkd8lL.js";import"./sleep-CvjNLutj.js";import"./queue-DAKPJQl1.js";import"./queues-Dstwm1VQ.js";import"./dist-Cr2QBfS4.js";import"./webgpu-Nt9hTBpW.js";import{route_block_default as b}from"./route-block-DNPbw0zT.js";const x=`ollama`;var S=r({__name:`ollama`,setup(r){let{t:b}=l(),S=u(),C=p(),{providers:w}=s(C),T=e(()=>C.getProviderMetadata(x)),E=e({get:()=>{var e,t,n;return(e=w.value[x])?.baseUrl||((t=T.value)==null||(n=t.defaultOptions)==null?void 0:n.call(t).baseUrl)||``},set:e=>{w.value[x]||(w.value[x]={}),w.value[x].baseUrl=e}});i(()=>{var e,t,n,r;C.initializeProvider(x),E.value=(e=w.value[x])?.baseUrl||((t=T.value)==null||(n=t.defaultOptions)==null?void 0:n.call(t).baseUrl)||``,(r=w.value[x])?.headers||(w.value[x].headers={})});function D(){var e;w.value[x]={...(e=T.value)?.defaultOptions}}let O=o([{key:``,value:``}]);function k(e,t,n){e&&e.push({key:t,value:n})}function A(e,t){t&&(t.length===1?(t[0].key=``,t[0].value=``):t.splice(e,1))}return d(O,e=>{e.length>0&&(e[e.length-1].key!==``||e[e.length-1].value!==``)&&e.push({key:``,value:``})},{deep:!0,immediate:!0}),(e,r)=>{var i,o;return a(),t(c(y),{"provider-name":(i=T.value)?.localizedName,"provider-icon":(o=T.value)?.icon,"on-back":()=>c(S).back()},{default:f(()=>[n(c(v),null,{default:f(()=>[n(c(_),{title:c(b)(`settings.pages.providers.common.section.basic.title`),description:c(b)(`settings.pages.providers.common.section.basic.description`),"on-reset":D},{default:f(()=>{var e,t;return[n(c(g),{modelValue:E.value,"onUpdate:modelValue":r[0]||=e=>E.value=e,placeholder:((e=T.value)==null||(t=e.defaultOptions)==null?void 0:t.call(e).baseUrl)||``,required:``},null,8,[`modelValue`,`placeholder`])]}),_:1},8,[`title`,`description`]),n(c(h),{title:c(b)(`settings.pages.providers.common.section.advanced.title`)},{default:f(()=>[n(c(m),{modelValue:O.value,"onUpdate:modelValue":r[1]||=e=>O.value=e,label:c(b)(`settings.pages.providers.common.section.advanced.fields.field.headers.label`),description:c(b)(`settings.pages.providers.common.section.advanced.fields.field.headers.description`),"key-placeholder":c(b)(`settings.pages.providers.common.section.advanced.fields.field.headers.key.placeholder`),"value-placeholder":c(b)(`settings.pages.providers.common.section.advanced.fields.field.headers.value.placeholder`),onAdd:r[2]||=(e,t)=>k(O.value,e,t),onRemove:r[3]||=e=>A(e,O.value)},null,8,[`modelValue`,`label`,`description`,`key-placeholder`,`value-placeholder`])]),_:1},8,[`title`])]),_:1})]),_:1},8,[`provider-name`,`provider-icon`,`on-back`])}}});typeof b==`function`&&b(S);var C=S;export{C as default}; \ No newline at end of file +import{computed as e,createBlock as t,createVNode as n,defineComponent as r,onMounted as i,openBlock as a,ref as o,storeToRefs as s,unref as c,useI18n as l,useRouter as u,watch as d,withCtx as f}from"./index-CsmT0L1K.js";import"./import-url-browser-DNuYZxPr.js";import"./duckdb-mvp-C3i5IjU8.js";import"./index-CISmcbXk-C9oju49Y.js";import"./types-AwjH7X1C.js";import{useProvidersStore as p}from"./stores-2H61GqXP.js";import"./__vite-browser-external-DPh5tFvT.js";import"./Button-D3cjyOEe.js";import{FieldKeyValues_default as m}from"./src-C1Sr0aqN.js";import{ProviderAdvancedSettings_default as h,ProviderBaseUrlInput_default as g,ProviderBasicSettings_default as _,ProviderSettingsContainer_default as v,ProviderSettingsLayout_default as y}from"./components-DHUA669a.js";import"./composables-CgcEyUWo.js";import"./sleep-CvjNLutj.js";import"./queue-B0kER5Ap.js";import"./queues-hSEKEE3F.js";import"./dist-Cr2QBfS4.js";import"./webgpu-Nt9hTBpW.js";import{route_block_default as b}from"./route-block-DNPbw0zT.js";const x=`ollama`;var S=r({__name:`ollama`,setup(r){let{t:b}=l(),S=u(),C=p(),{providers:w}=s(C),T=e(()=>C.getProviderMetadata(x)),E=e({get:()=>{var e,t,n;return(e=w.value[x])?.baseUrl||((t=T.value)==null||(n=t.defaultOptions)==null?void 0:n.call(t).baseUrl)||``},set:e=>{w.value[x]||(w.value[x]={}),w.value[x].baseUrl=e}});i(()=>{var e,t,n,r;C.initializeProvider(x),E.value=(e=w.value[x])?.baseUrl||((t=T.value)==null||(n=t.defaultOptions)==null?void 0:n.call(t).baseUrl)||``,(r=w.value[x])?.headers||(w.value[x].headers={})});function D(){var e;w.value[x]={...(e=T.value)?.defaultOptions}}let O=o([{key:``,value:``}]);function k(e,t,n){e&&e.push({key:t,value:n})}function A(e,t){t&&(t.length===1?(t[0].key=``,t[0].value=``):t.splice(e,1))}return d(O,e=>{e.length>0&&(e[e.length-1].key!==``||e[e.length-1].value!==``)&&e.push({key:``,value:``})},{deep:!0,immediate:!0}),(e,r)=>{var i,o;return a(),t(c(y),{"provider-name":(i=T.value)?.localizedName,"provider-icon":(o=T.value)?.icon,"on-back":()=>c(S).back()},{default:f(()=>[n(c(v),null,{default:f(()=>[n(c(_),{title:c(b)(`settings.pages.providers.common.section.basic.title`),description:c(b)(`settings.pages.providers.common.section.basic.description`),"on-reset":D},{default:f(()=>{var e,t;return[n(c(g),{modelValue:E.value,"onUpdate:modelValue":r[0]||=e=>E.value=e,placeholder:((e=T.value)==null||(t=e.defaultOptions)==null?void 0:t.call(e).baseUrl)||``,required:``},null,8,[`modelValue`,`placeholder`])]}),_:1},8,[`title`,`description`]),n(c(h),{title:c(b)(`settings.pages.providers.common.section.advanced.title`)},{default:f(()=>[n(c(m),{modelValue:O.value,"onUpdate:modelValue":r[1]||=e=>O.value=e,label:c(b)(`settings.pages.providers.common.section.advanced.fields.field.headers.label`),description:c(b)(`settings.pages.providers.common.section.advanced.fields.field.headers.description`),"key-placeholder":c(b)(`settings.pages.providers.common.section.advanced.fields.field.headers.key.placeholder`),"value-placeholder":c(b)(`settings.pages.providers.common.section.advanced.fields.field.headers.value.placeholder`),onAdd:r[2]||=(e,t)=>k(O.value,e,t),onRemove:r[3]||=e=>A(e,O.value)},null,8,[`modelValue`,`label`,`description`,`key-placeholder`,`value-placeholder`])]),_:1},8,[`title`])]),_:1})]),_:1},8,[`provider-name`,`provider-icon`,`on-back`])}}});typeof b==`function`&&b(S);var C=S;export{C as default}; \ No newline at end of file diff --git a/assets/openai-DTGR4qBa.js b/assets/openai-CJpzKhtx.js similarity index 83% rename from assets/openai-DTGR4qBa.js rename to assets/openai-CJpzKhtx.js index ffb72b065f12395489266afaec34addd1f625c75..eb77cbf85effcb2a44b8d9f4fd61e4f1d5813739 100644 --- a/assets/openai-DTGR4qBa.js +++ b/assets/openai-CJpzKhtx.js @@ -1 +1 @@ -import{computed as e,createBlock as t,createVNode as n,defineComponent as r,onMounted as i,openBlock as a,storeToRefs as o,unref as s,useI18n as c,useRouter as l,watch as u,withCtx as d}from"./index-CuCRViVh.js";import"./import-url-browser-DNuYZxPr.js";import"./duckdb-mvp-C3i5IjU8.js";import"./index-CISmcbXk-BkTeNOgG.js";import"./types-AwjH7X1C.js";import{useProvidersStore as f}from"./stores-m0eA85gd.js";import"./__vite-browser-external-CCfYMxZl.js";import"./Button-DFhzbYVt.js";import"./src-C2QbIOor.js";import{ProviderAdvancedSettings_default as p,ProviderApiKeyInput_default as m,ProviderBaseUrlInput_default as h,ProviderBasicSettings_default as g,ProviderSettingsContainer_default as _,ProviderSettingsLayout_default as v}from"./components-BFLl4u81.js";import"./composables-Cgvkd8lL.js";import"./sleep-CvjNLutj.js";import"./queue-DAKPJQl1.js";import"./queues-Dstwm1VQ.js";import"./dist-Cr2QBfS4.js";import"./webgpu-Nt9hTBpW.js";import{route_block_default as y}from"./route-block-DNPbw0zT.js";const b=`openai`;var x=r({__name:`openai`,setup(r){let{t:y}=c(),x=l(),S=f(),{providers:C}=o(S),w=e(()=>S.getProviderMetadata(b)),T=e({get:()=>{var e;return(e=C.value[b])?.apiKey||``},set:e=>{C.value[b]||(C.value[b]={}),C.value[b].apiKey=e}}),E=e({get:()=>{var e;return(e=C.value[b])?.baseUrl||`https://api.openai.com/v1/`},set:e=>{C.value[b]||(C.value[b]={}),C.value[b].baseUrl=e}});i(()=>{var e,t;C.value[b]||(C.value[b]={baseUrl:`https://api.openai.com/v1/`}),T.value=(e=C.value[b])?.apiKey||``,E.value=(t=C.value[b])?.baseUrl||`https://api.openai.com/v1/`}),u([T,E],()=>{C.value[b]={...C.value[b],apiKey:T.value,baseUrl:E.value||`https://api.openai.com/v1/`}});function D(){C.value[b]={baseUrl:`https://api.openai.com/v1/`}}return(e,r)=>{var i,o;return a(),t(s(v),{"provider-name":(i=w.value)?.localizedName||`OpenAI`,"provider-icon":(o=w.value)?.icon,"on-back":()=>s(x).back()},{default:d(()=>[n(s(_),null,{default:d(()=>[n(s(g),{title:s(y)(`settings.pages.providers.common.section.basic.title`),description:s(y)(`settings.pages.providers.common.section.basic.description`),"on-reset":D},{default:d(()=>{var e;return[n(s(m),{modelValue:T.value,"onUpdate:modelValue":r[0]||=e=>T.value=e,"provider-name":(e=w.value)?.localizedName||`OpenAI`,placeholder:`sk-...`},null,8,[`modelValue`,`provider-name`])]}),_:1},8,[`title`,`description`]),n(s(p),{title:s(y)(`settings.pages.providers.common.section.advanced.title`)},{default:d(()=>[n(s(h),{modelValue:E.value,"onUpdate:modelValue":r[1]||=e=>E.value=e,placeholder:`https://api.openai.com/v1/`},null,8,[`modelValue`])]),_:1},8,[`title`])]),_:1})]),_:1},8,[`provider-name`,`provider-icon`,`on-back`])}}});typeof y==`function`&&y(x);var S=x;export{S as default}; \ No newline at end of file +import{computed as e,createBlock as t,createVNode as n,defineComponent as r,onMounted as i,openBlock as a,storeToRefs as o,unref as s,useI18n as c,useRouter as l,watch as u,withCtx as d}from"./index-CsmT0L1K.js";import"./import-url-browser-DNuYZxPr.js";import"./duckdb-mvp-C3i5IjU8.js";import"./index-CISmcbXk-C9oju49Y.js";import"./types-AwjH7X1C.js";import{useProvidersStore as f}from"./stores-2H61GqXP.js";import"./__vite-browser-external-DPh5tFvT.js";import"./Button-D3cjyOEe.js";import"./src-C1Sr0aqN.js";import{ProviderAdvancedSettings_default as p,ProviderApiKeyInput_default as m,ProviderBaseUrlInput_default as h,ProviderBasicSettings_default as g,ProviderSettingsContainer_default as _,ProviderSettingsLayout_default as v}from"./components-DHUA669a.js";import"./composables-CgcEyUWo.js";import"./sleep-CvjNLutj.js";import"./queue-B0kER5Ap.js";import"./queues-hSEKEE3F.js";import"./dist-Cr2QBfS4.js";import"./webgpu-Nt9hTBpW.js";import{route_block_default as y}from"./route-block-DNPbw0zT.js";const b=`openai`;var x=r({__name:`openai`,setup(r){let{t:y}=c(),x=l(),S=f(),{providers:C}=o(S),w=e(()=>S.getProviderMetadata(b)),T=e({get:()=>{var e;return(e=C.value[b])?.apiKey||``},set:e=>{C.value[b]||(C.value[b]={}),C.value[b].apiKey=e}}),E=e({get:()=>{var e;return(e=C.value[b])?.baseUrl||`https://api.openai.com/v1/`},set:e=>{C.value[b]||(C.value[b]={}),C.value[b].baseUrl=e}});i(()=>{var e,t;C.value[b]||(C.value[b]={baseUrl:`https://api.openai.com/v1/`}),T.value=(e=C.value[b])?.apiKey||``,E.value=(t=C.value[b])?.baseUrl||`https://api.openai.com/v1/`}),u([T,E],()=>{C.value[b]={...C.value[b],apiKey:T.value,baseUrl:E.value||`https://api.openai.com/v1/`}});function D(){C.value[b]={baseUrl:`https://api.openai.com/v1/`}}return(e,r)=>{var i,o;return a(),t(s(v),{"provider-name":(i=w.value)?.localizedName||`OpenAI`,"provider-icon":(o=w.value)?.icon,"on-back":()=>s(x).back()},{default:d(()=>[n(s(_),null,{default:d(()=>[n(s(g),{title:s(y)(`settings.pages.providers.common.section.basic.title`),description:s(y)(`settings.pages.providers.common.section.basic.description`),"on-reset":D},{default:d(()=>{var e;return[n(s(m),{modelValue:T.value,"onUpdate:modelValue":r[0]||=e=>T.value=e,"provider-name":(e=w.value)?.localizedName||`OpenAI`,placeholder:`sk-...`},null,8,[`modelValue`,`provider-name`])]}),_:1},8,[`title`,`description`]),n(s(p),{title:s(y)(`settings.pages.providers.common.section.advanced.title`)},{default:d(()=>[n(s(h),{modelValue:E.value,"onUpdate:modelValue":r[1]||=e=>E.value=e,placeholder:`https://api.openai.com/v1/`},null,8,[`modelValue`])]),_:1},8,[`title`])]),_:1})]),_:1},8,[`provider-name`,`provider-icon`,`on-back`])}}});typeof y==`function`&&y(x);var S=x;export{S as default}; \ No newline at end of file diff --git a/assets/openai-audio-speech-NATd0MbC.js b/assets/openai-audio-speech-BVZOIrxZ.js similarity index 83% rename from assets/openai-audio-speech-NATd0MbC.js rename to assets/openai-audio-speech-BVZOIrxZ.js index f148d299e539b1a019e47b210b2b11cdcfdcd462..d7d289e7204c20d032cd78c3d0a4f50aac2d5fd0 100644 --- a/assets/openai-audio-speech-NATd0MbC.js +++ b/assets/openai-audio-speech-BVZOIrxZ.js @@ -1 +1 @@ -import{computed as e,createBlock as t,createVNode as n,defineComponent as r,onMounted as i,openBlock as a,storeToRefs as o,unref as s,useI18n as c,useRouter as l,watch as u,withCtx as d}from"./index-CuCRViVh.js";import"./import-url-browser-DNuYZxPr.js";import"./duckdb-mvp-C3i5IjU8.js";import"./index-CISmcbXk-BkTeNOgG.js";import"./types-AwjH7X1C.js";import{useProvidersStore as f}from"./stores-m0eA85gd.js";import"./__vite-browser-external-CCfYMxZl.js";import"./Button-DFhzbYVt.js";import"./src-C2QbIOor.js";import{ProviderAdvancedSettings_default as p,ProviderApiKeyInput_default as m,ProviderBaseUrlInput_default as h,ProviderBasicSettings_default as g,ProviderSettingsContainer_default as _,ProviderSettingsLayout_default as v}from"./components-BFLl4u81.js";import"./composables-Cgvkd8lL.js";import"./sleep-CvjNLutj.js";import"./queue-DAKPJQl1.js";import"./queues-Dstwm1VQ.js";import"./dist-Cr2QBfS4.js";import"./webgpu-Nt9hTBpW.js";import{route_block_default as y}from"./route-block-DNPbw0zT.js";const b=`openai`;var x=r({__name:`openai-audio-speech`,setup(r){let{t:y}=c(),x=l(),S=f(),{providers:C}=o(S),w=e(()=>S.getProviderMetadata(b)),T=e({get:()=>{var e;return(e=C.value[b])?.apiKey||``},set:e=>{C.value[b]||(C.value[b]={}),C.value[b].apiKey=e}}),E=e({get:()=>{var e;return(e=C.value[b])?.baseUrl||`https://api.openai.com/v1/`},set:e=>{C.value[b]||(C.value[b]={}),C.value[b].baseUrl=e}});i(()=>{var e,t;C.value[b]||(C.value[b]={baseUrl:`https://api.openai.com/v1/`}),T.value=(e=C.value[b])?.apiKey||``,E.value=(t=C.value[b])?.baseUrl||`https://api.openai.com/v1/`}),u([T,E],()=>{C.value[b]={...C.value[b],apiKey:T.value,baseUrl:E.value||`https://api.openai.com/v1/`}});function D(){C.value[b]={baseUrl:`https://api.openai.com/v1/`}}return(e,r)=>{var i,o;return a(),t(s(v),{"provider-name":(i=w.value)?.localizedName||`OpenAI`,"provider-icon":(o=w.value)?.icon,"on-back":()=>s(x).back()},{default:d(()=>[n(s(_),null,{default:d(()=>[n(s(g),{title:s(y)(`settings.pages.providers.common.section.basic.title`),description:s(y)(`settings.pages.providers.common.section.basic.description`),"on-reset":D},{default:d(()=>{var e;return[n(s(m),{modelValue:T.value,"onUpdate:modelValue":r[0]||=e=>T.value=e,"provider-name":(e=w.value)?.localizedName||`OpenAI`,placeholder:`sk-...`},null,8,[`modelValue`,`provider-name`])]}),_:1},8,[`title`,`description`]),n(s(p),{title:s(y)(`settings.pages.providers.common.section.advanced.title`)},{default:d(()=>[n(s(h),{modelValue:E.value,"onUpdate:modelValue":r[1]||=e=>E.value=e,placeholder:`https://api.openai.com/v1/`},null,8,[`modelValue`])]),_:1},8,[`title`])]),_:1})]),_:1},8,[`provider-name`,`provider-icon`,`on-back`])}}});typeof y==`function`&&y(x);var S=x;export{S as default}; \ No newline at end of file +import{computed as e,createBlock as t,createVNode as n,defineComponent as r,onMounted as i,openBlock as a,storeToRefs as o,unref as s,useI18n as c,useRouter as l,watch as u,withCtx as d}from"./index-CsmT0L1K.js";import"./import-url-browser-DNuYZxPr.js";import"./duckdb-mvp-C3i5IjU8.js";import"./index-CISmcbXk-C9oju49Y.js";import"./types-AwjH7X1C.js";import{useProvidersStore as f}from"./stores-2H61GqXP.js";import"./__vite-browser-external-DPh5tFvT.js";import"./Button-D3cjyOEe.js";import"./src-C1Sr0aqN.js";import{ProviderAdvancedSettings_default as p,ProviderApiKeyInput_default as m,ProviderBaseUrlInput_default as h,ProviderBasicSettings_default as g,ProviderSettingsContainer_default as _,ProviderSettingsLayout_default as v}from"./components-DHUA669a.js";import"./composables-CgcEyUWo.js";import"./sleep-CvjNLutj.js";import"./queue-B0kER5Ap.js";import"./queues-hSEKEE3F.js";import"./dist-Cr2QBfS4.js";import"./webgpu-Nt9hTBpW.js";import{route_block_default as y}from"./route-block-DNPbw0zT.js";const b=`openai`;var x=r({__name:`openai-audio-speech`,setup(r){let{t:y}=c(),x=l(),S=f(),{providers:C}=o(S),w=e(()=>S.getProviderMetadata(b)),T=e({get:()=>{var e;return(e=C.value[b])?.apiKey||``},set:e=>{C.value[b]||(C.value[b]={}),C.value[b].apiKey=e}}),E=e({get:()=>{var e;return(e=C.value[b])?.baseUrl||`https://api.openai.com/v1/`},set:e=>{C.value[b]||(C.value[b]={}),C.value[b].baseUrl=e}});i(()=>{var e,t;C.value[b]||(C.value[b]={baseUrl:`https://api.openai.com/v1/`}),T.value=(e=C.value[b])?.apiKey||``,E.value=(t=C.value[b])?.baseUrl||`https://api.openai.com/v1/`}),u([T,E],()=>{C.value[b]={...C.value[b],apiKey:T.value,baseUrl:E.value||`https://api.openai.com/v1/`}});function D(){C.value[b]={baseUrl:`https://api.openai.com/v1/`}}return(e,r)=>{var i,o;return a(),t(s(v),{"provider-name":(i=w.value)?.localizedName||`OpenAI`,"provider-icon":(o=w.value)?.icon,"on-back":()=>s(x).back()},{default:d(()=>[n(s(_),null,{default:d(()=>[n(s(g),{title:s(y)(`settings.pages.providers.common.section.basic.title`),description:s(y)(`settings.pages.providers.common.section.basic.description`),"on-reset":D},{default:d(()=>{var e;return[n(s(m),{modelValue:T.value,"onUpdate:modelValue":r[0]||=e=>T.value=e,"provider-name":(e=w.value)?.localizedName||`OpenAI`,placeholder:`sk-...`},null,8,[`modelValue`,`provider-name`])]}),_:1},8,[`title`,`description`]),n(s(p),{title:s(y)(`settings.pages.providers.common.section.advanced.title`)},{default:d(()=>[n(s(h),{modelValue:E.value,"onUpdate:modelValue":r[1]||=e=>E.value=e,placeholder:`https://api.openai.com/v1/`},null,8,[`modelValue`])]),_:1},8,[`title`])]),_:1})]),_:1},8,[`provider-name`,`provider-icon`,`on-back`])}}});typeof y==`function`&&y(x);var S=x;export{S as default}; \ No newline at end of file diff --git a/assets/openai-audio-transcription-DbLUDJtC.js b/assets/openai-audio-transcription-M_8aPBY1.js similarity index 83% rename from assets/openai-audio-transcription-DbLUDJtC.js rename to assets/openai-audio-transcription-M_8aPBY1.js index e0be21a3e14f56b8df62a01a04734577f62e6aff..45e98ade8f6540744904c2913a0d8f5e676edf82 100644 --- a/assets/openai-audio-transcription-DbLUDJtC.js +++ b/assets/openai-audio-transcription-M_8aPBY1.js @@ -1 +1 @@ -import{computed as e,createBlock as t,createVNode as n,defineComponent as r,onMounted as i,openBlock as a,storeToRefs as o,unref as s,useI18n as c,useRouter as l,watch as u,withCtx as d}from"./index-CuCRViVh.js";import"./import-url-browser-DNuYZxPr.js";import"./duckdb-mvp-C3i5IjU8.js";import"./index-CISmcbXk-BkTeNOgG.js";import"./types-AwjH7X1C.js";import{useProvidersStore as f}from"./stores-m0eA85gd.js";import"./__vite-browser-external-CCfYMxZl.js";import"./Button-DFhzbYVt.js";import"./src-C2QbIOor.js";import{ProviderAdvancedSettings_default as p,ProviderApiKeyInput_default as m,ProviderBaseUrlInput_default as h,ProviderBasicSettings_default as g,ProviderSettingsContainer_default as _,ProviderSettingsLayout_default as v}from"./components-BFLl4u81.js";import"./composables-Cgvkd8lL.js";import"./sleep-CvjNLutj.js";import"./queue-DAKPJQl1.js";import"./queues-Dstwm1VQ.js";import"./dist-Cr2QBfS4.js";import"./webgpu-Nt9hTBpW.js";import{route_block_default as y}from"./route-block-DNPbw0zT.js";const b=`openai`;var x=r({__name:`openai-audio-transcription`,setup(r){let{t:y}=c(),x=l(),S=f(),{providers:C}=o(S),w=e(()=>S.getProviderMetadata(b)),T=e({get:()=>{var e;return(e=C.value[b])?.apiKey||``},set:e=>{C.value[b]||(C.value[b]={}),C.value[b].apiKey=e}}),E=e({get:()=>{var e;return(e=C.value[b])?.baseUrl||`https://api.openai.com/v1/`},set:e=>{C.value[b]||(C.value[b]={}),C.value[b].baseUrl=e}});i(()=>{var e,t;C.value[b]||(C.value[b]={baseUrl:`https://api.openai.com/v1/`}),T.value=(e=C.value[b])?.apiKey||``,E.value=(t=C.value[b])?.baseUrl||`https://api.openai.com/v1/`}),u([T,E],()=>{C.value[b]={...C.value[b],apiKey:T.value,baseUrl:E.value||`https://api.openai.com/v1/`}});function D(){C.value[b]={baseUrl:`https://api.openai.com/v1/`}}return(e,r)=>{var i,o;return a(),t(s(v),{"provider-name":(i=w.value)?.localizedName||`OpenAI`,"provider-icon":(o=w.value)?.icon,"on-back":()=>s(x).back()},{default:d(()=>[n(s(_),null,{default:d(()=>[n(s(g),{title:s(y)(`settings.pages.providers.common.section.basic.title`),description:s(y)(`settings.pages.providers.common.section.basic.description`),"on-reset":D},{default:d(()=>{var e;return[n(s(m),{modelValue:T.value,"onUpdate:modelValue":r[0]||=e=>T.value=e,"provider-name":(e=w.value)?.localizedName||`OpenAI`,placeholder:`sk-...`},null,8,[`modelValue`,`provider-name`])]}),_:1},8,[`title`,`description`]),n(s(p),{title:s(y)(`settings.pages.providers.common.section.advanced.title`)},{default:d(()=>[n(s(h),{modelValue:E.value,"onUpdate:modelValue":r[1]||=e=>E.value=e,placeholder:`https://api.openai.com/v1/`},null,8,[`modelValue`])]),_:1},8,[`title`])]),_:1})]),_:1},8,[`provider-name`,`provider-icon`,`on-back`])}}});typeof y==`function`&&y(x);var S=x;export{S as default}; \ No newline at end of file +import{computed as e,createBlock as t,createVNode as n,defineComponent as r,onMounted as i,openBlock as a,storeToRefs as o,unref as s,useI18n as c,useRouter as l,watch as u,withCtx as d}from"./index-CsmT0L1K.js";import"./import-url-browser-DNuYZxPr.js";import"./duckdb-mvp-C3i5IjU8.js";import"./index-CISmcbXk-C9oju49Y.js";import"./types-AwjH7X1C.js";import{useProvidersStore as f}from"./stores-2H61GqXP.js";import"./__vite-browser-external-DPh5tFvT.js";import"./Button-D3cjyOEe.js";import"./src-C1Sr0aqN.js";import{ProviderAdvancedSettings_default as p,ProviderApiKeyInput_default as m,ProviderBaseUrlInput_default as h,ProviderBasicSettings_default as g,ProviderSettingsContainer_default as _,ProviderSettingsLayout_default as v}from"./components-DHUA669a.js";import"./composables-CgcEyUWo.js";import"./sleep-CvjNLutj.js";import"./queue-B0kER5Ap.js";import"./queues-hSEKEE3F.js";import"./dist-Cr2QBfS4.js";import"./webgpu-Nt9hTBpW.js";import{route_block_default as y}from"./route-block-DNPbw0zT.js";const b=`openai`;var x=r({__name:`openai-audio-transcription`,setup(r){let{t:y}=c(),x=l(),S=f(),{providers:C}=o(S),w=e(()=>S.getProviderMetadata(b)),T=e({get:()=>{var e;return(e=C.value[b])?.apiKey||``},set:e=>{C.value[b]||(C.value[b]={}),C.value[b].apiKey=e}}),E=e({get:()=>{var e;return(e=C.value[b])?.baseUrl||`https://api.openai.com/v1/`},set:e=>{C.value[b]||(C.value[b]={}),C.value[b].baseUrl=e}});i(()=>{var e,t;C.value[b]||(C.value[b]={baseUrl:`https://api.openai.com/v1/`}),T.value=(e=C.value[b])?.apiKey||``,E.value=(t=C.value[b])?.baseUrl||`https://api.openai.com/v1/`}),u([T,E],()=>{C.value[b]={...C.value[b],apiKey:T.value,baseUrl:E.value||`https://api.openai.com/v1/`}});function D(){C.value[b]={baseUrl:`https://api.openai.com/v1/`}}return(e,r)=>{var i,o;return a(),t(s(v),{"provider-name":(i=w.value)?.localizedName||`OpenAI`,"provider-icon":(o=w.value)?.icon,"on-back":()=>s(x).back()},{default:d(()=>[n(s(_),null,{default:d(()=>[n(s(g),{title:s(y)(`settings.pages.providers.common.section.basic.title`),description:s(y)(`settings.pages.providers.common.section.basic.description`),"on-reset":D},{default:d(()=>{var e;return[n(s(m),{modelValue:T.value,"onUpdate:modelValue":r[0]||=e=>T.value=e,"provider-name":(e=w.value)?.localizedName||`OpenAI`,placeholder:`sk-...`},null,8,[`modelValue`,`provider-name`])]}),_:1},8,[`title`,`description`]),n(s(p),{title:s(y)(`settings.pages.providers.common.section.advanced.title`)},{default:d(()=>[n(s(h),{modelValue:E.value,"onUpdate:modelValue":r[1]||=e=>E.value=e,placeholder:`https://api.openai.com/v1/`},null,8,[`modelValue`])]),_:1},8,[`title`])]),_:1})]),_:1},8,[`provider-name`,`provider-icon`,`on-back`])}}});typeof y==`function`&&y(x);var S=x;export{S as default}; \ No newline at end of file diff --git a/assets/openrouter-ai-DBLeIZUx.js b/assets/openrouter-ai-1dhsAjpC.js similarity index 84% rename from assets/openrouter-ai-DBLeIZUx.js rename to assets/openrouter-ai-1dhsAjpC.js index dfa0f96b785cad8caa601c69447737f715b219ba..323ca86e7e152c0507ec8649ac5bcbf170db7401 100644 --- a/assets/openrouter-ai-DBLeIZUx.js +++ b/assets/openrouter-ai-1dhsAjpC.js @@ -1 +1 @@ -import{computed as e,createBlock as t,createVNode as n,defineComponent as r,onMounted as i,openBlock as a,storeToRefs as o,unref as s,useI18n as c,useRouter as l,watch as u,withCtx as d}from"./index-CuCRViVh.js";import"./import-url-browser-DNuYZxPr.js";import"./duckdb-mvp-C3i5IjU8.js";import"./index-CISmcbXk-BkTeNOgG.js";import"./types-AwjH7X1C.js";import{useProvidersStore as f}from"./stores-m0eA85gd.js";import"./__vite-browser-external-CCfYMxZl.js";import"./Button-DFhzbYVt.js";import"./src-C2QbIOor.js";import{ProviderAdvancedSettings_default as p,ProviderApiKeyInput_default as m,ProviderBaseUrlInput_default as h,ProviderBasicSettings_default as g,ProviderSettingsContainer_default as _,ProviderSettingsLayout_default as v}from"./components-BFLl4u81.js";import"./composables-Cgvkd8lL.js";import"./sleep-CvjNLutj.js";import"./queue-DAKPJQl1.js";import"./queues-Dstwm1VQ.js";import"./dist-Cr2QBfS4.js";import"./webgpu-Nt9hTBpW.js";import{route_block_default as y}from"./route-block-DNPbw0zT.js";const b=`openrouter-ai`;var x=r({__name:`openrouter-ai`,setup(r){let{t:y}=c(),x=l(),S=f(),{providers:C}=o(S),w=e(()=>S.getProviderMetadata(b)),T=e({get:()=>{var e;return(e=C.value[b])?.apiKey||``},set:e=>{C.value[b]||(C.value[b]={}),C.value[b].apiKey=e}}),E=e({get:()=>{var e,t,n;return(e=C.value[b])?.baseUrl||((t=w.value)==null||(n=t.defaultOptions)==null?void 0:n.call(t).baseUrl)||``},set:e=>{C.value[b]||(C.value[b]={}),C.value[b].baseUrl=e}});i(()=>{var e,t,n,r;S.initializeProvider(b),T.value=(e=C.value[b])?.apiKey||``,E.value=(t=C.value[b])?.baseUrl||((n=w.value)==null||(r=n.defaultOptions)==null?void 0:r.call(n).baseUrl)||``}),u([T,E],()=>{var e,t;C.value[b]={...C.value[b],apiKey:T.value,baseUrl:E.value||((e=w.value)==null||(t=e.defaultOptions)==null?void 0:t.call(e).baseUrl)||``}});function D(){var e;C.value[b]={...(e=w.value)?.defaultOptions}}return(e,r)=>{var i,o;return a(),t(s(v),{"provider-name":(i=w.value)?.localizedName,"provider-icon":(o=w.value)?.icon,"on-back":()=>s(x).back()},{default:d(()=>[n(s(_),null,{default:d(()=>[n(s(g),{title:s(y)(`settings.pages.providers.common.section.basic.title`),description:s(y)(`settings.pages.providers.common.section.basic.description`),"on-reset":D},{default:d(()=>{var e;return[n(s(m),{modelValue:T.value,"onUpdate:modelValue":r[0]||=e=>T.value=e,"provider-name":(e=w.value)?.localizedName,placeholder:`sk-or-...`},null,8,[`modelValue`,`provider-name`])]}),_:1},8,[`title`,`description`]),n(s(p),{title:s(y)(`settings.pages.providers.common.section.advanced.title`)},{default:d(()=>{var e,t;return[n(s(h),{modelValue:E.value,"onUpdate:modelValue":r[1]||=e=>E.value=e,placeholder:((e=w.value)==null||(t=e.defaultOptions)==null?void 0:t.call(e).baseUrl)||``},null,8,[`modelValue`,`placeholder`])]}),_:1},8,[`title`])]),_:1})]),_:1},8,[`provider-name`,`provider-icon`,`on-back`])}}});typeof y==`function`&&y(x);var S=x;export{S as default}; \ No newline at end of file +import{computed as e,createBlock as t,createVNode as n,defineComponent as r,onMounted as i,openBlock as a,storeToRefs as o,unref as s,useI18n as c,useRouter as l,watch as u,withCtx as d}from"./index-CsmT0L1K.js";import"./import-url-browser-DNuYZxPr.js";import"./duckdb-mvp-C3i5IjU8.js";import"./index-CISmcbXk-C9oju49Y.js";import"./types-AwjH7X1C.js";import{useProvidersStore as f}from"./stores-2H61GqXP.js";import"./__vite-browser-external-DPh5tFvT.js";import"./Button-D3cjyOEe.js";import"./src-C1Sr0aqN.js";import{ProviderAdvancedSettings_default as p,ProviderApiKeyInput_default as m,ProviderBaseUrlInput_default as h,ProviderBasicSettings_default as g,ProviderSettingsContainer_default as _,ProviderSettingsLayout_default as v}from"./components-DHUA669a.js";import"./composables-CgcEyUWo.js";import"./sleep-CvjNLutj.js";import"./queue-B0kER5Ap.js";import"./queues-hSEKEE3F.js";import"./dist-Cr2QBfS4.js";import"./webgpu-Nt9hTBpW.js";import{route_block_default as y}from"./route-block-DNPbw0zT.js";const b=`openrouter-ai`;var x=r({__name:`openrouter-ai`,setup(r){let{t:y}=c(),x=l(),S=f(),{providers:C}=o(S),w=e(()=>S.getProviderMetadata(b)),T=e({get:()=>{var e;return(e=C.value[b])?.apiKey||``},set:e=>{C.value[b]||(C.value[b]={}),C.value[b].apiKey=e}}),E=e({get:()=>{var e,t,n;return(e=C.value[b])?.baseUrl||((t=w.value)==null||(n=t.defaultOptions)==null?void 0:n.call(t).baseUrl)||``},set:e=>{C.value[b]||(C.value[b]={}),C.value[b].baseUrl=e}});i(()=>{var e,t,n,r;S.initializeProvider(b),T.value=(e=C.value[b])?.apiKey||``,E.value=(t=C.value[b])?.baseUrl||((n=w.value)==null||(r=n.defaultOptions)==null?void 0:r.call(n).baseUrl)||``}),u([T,E],()=>{var e,t;C.value[b]={...C.value[b],apiKey:T.value,baseUrl:E.value||((e=w.value)==null||(t=e.defaultOptions)==null?void 0:t.call(e).baseUrl)||``}});function D(){var e;C.value[b]={...(e=w.value)?.defaultOptions}}return(e,r)=>{var i,o;return a(),t(s(v),{"provider-name":(i=w.value)?.localizedName,"provider-icon":(o=w.value)?.icon,"on-back":()=>s(x).back()},{default:d(()=>[n(s(_),null,{default:d(()=>[n(s(g),{title:s(y)(`settings.pages.providers.common.section.basic.title`),description:s(y)(`settings.pages.providers.common.section.basic.description`),"on-reset":D},{default:d(()=>{var e;return[n(s(m),{modelValue:T.value,"onUpdate:modelValue":r[0]||=e=>T.value=e,"provider-name":(e=w.value)?.localizedName,placeholder:`sk-or-...`},null,8,[`modelValue`,`provider-name`])]}),_:1},8,[`title`,`description`]),n(s(p),{title:s(y)(`settings.pages.providers.common.section.advanced.title`)},{default:d(()=>{var e,t;return[n(s(h),{modelValue:E.value,"onUpdate:modelValue":r[1]||=e=>E.value=e,placeholder:((e=w.value)==null||(t=e.defaultOptions)==null?void 0:t.call(e).baseUrl)||``},null,8,[`modelValue`,`placeholder`])]}),_:1},8,[`title`])]),_:1})]),_:1},8,[`provider-name`,`provider-icon`,`on-back`])}}});typeof y==`function`&&y(x);var S=x;export{S as default}; \ No newline at end of file diff --git a/assets/pages-DOuHM4kz.js b/assets/pages-B3HnyzmI.js similarity index 69% rename from assets/pages-DOuHM4kz.js rename to assets/pages-B3HnyzmI.js index 001d5951df188306c275a3165abd18cdf8f833f2..0f4a63a54124730b94e5a88cc27c374a7d096908 100644 --- a/assets/pages-DOuHM4kz.js +++ b/assets/pages-B3HnyzmI.js @@ -1 +1 @@ -import{createBaseVNode as e,createBlock as t,createVNode as n,defineComponent as r,openBlock as i,ref as a,unref as o,useDark as s,useMouse as c,withCtx as l}from"./index-CuCRViVh.js";import"./import-url-browser-DNuYZxPr.js";import"./duckdb-mvp-C3i5IjU8.js";import"./index-CISmcbXk-BkTeNOgG.js";import"./types-AwjH7X1C.js";import"./stores-m0eA85gd.js";import"./__vite-browser-external-CCfYMxZl.js";import"./HeaderLink-BuxOmtb4.js";import"./Button-DFhzbYVt.js";import"./src-C2QbIOor.js";import"./Basic-SuYkQxAJ.js";import{Stage_default as u}from"./components-BFLl4u81.js";import"./composables-Cgvkd8lL.js";import"./sleep-CvjNLutj.js";import"./queue-DAKPJQl1.js";import"./queues-Dstwm1VQ.js";import"./dist-Cr2QBfS4.js";import"./webgpu-Nt9hTBpW.js";import{route_block_default as d}from"./route-block-DNPbw0zT.js";import{AnimatedWave_default as f,Cross_default as p,Header_default as m,InteractiveArea_default as h,MobileInteractiveArea_default as g}from"./AnimatedWave-Cq8X0oi8.js";const _={relative:``,flex:`~ col`,"z-2":``,"h-100dvh":``,"w-100vw":``,"of-hidden":``},v={relative:``,flex:`~ 1 row gap-y-0 gap-x-2 (i(),t(p,null,{default:l(()=>[n(f,{"fill-color":o(d)?`oklch(35% calc(var(--chromatic-chroma) * 0.6) var(--chromatic-hue))`:`color-mix(in srgb, oklch(95% calc(var(--chromatic-chroma-50) * 0.5) var(--chromatic-hue)) 80%, oklch(100% 0 360))`},{default:l(()=>[e(`div`,_,[e(`div`,null,[n(m,{class:`flex`,p2:``})]),e(`div`,v,[n(o(u),{"flex-1":``,"min-w":`1/2`,paused:y.value,"focus-at":{x:o(x).x.value,y:o(x).y.value}},null,8,[`paused`,`focus-at`]),n(h,{class:`flex (i(),t(p,null,{default:l(()=>[n(f,{"fill-color":o(d)?`oklch(35% calc(var(--chromatic-chroma) * 0.6) var(--chromatic-hue))`:`color-mix(in srgb, oklch(95% calc(var(--chromatic-chroma-50) * 0.5) var(--chromatic-hue)) 80%, oklch(100% 0 360))`},{default:l(()=>[e(`div`,_,[e(`div`,null,[n(m,{class:`flex`,p2:``})]),e(`div`,v,[n(o(u),{"flex-1":``,"min-w":`1/2`,paused:y.value,"focus-at":{x:o(x).x.value,y:o(x).y.value}},null,8,[`paused`,`focus-at`]),n(h,{class:`flex b.getProviderMetadata(v)),C=e({get:()=>{var e;return(e=x.value[v])?.baseUrl||``},set:e=>{x.value[v]||(x.value[v]={}),x.value[v].baseUrl=e}});i(()=>{var e;b.initializeProvider(v),C.value=(e=x.value[v])?.baseUrl||``}),d([C],()=>{x.value[v]={...x.value[v],baseUrl:C.value||``}});function w(){var e;x.value[v]={...(e=S.value)?.defaultOptions}}return(e,r)=>{var i,s;let l=o(`ProviderBasicSettings`);return a(),t(c(g),{"provider-name":(i=S.value)?.localizedName,"provider-icon":(s=S.value)?.icon,"on-back":()=>c(y).back()},{default:f(()=>[n(c(h),null,{default:f(()=>[n(l,{title:c(_)(`settings.pages.providers.common.section.basic.title`),description:c(_)(`settings.pages.providers.common.section.basic.description`),"on-reset":w},{default:f(()=>[n(c(m),{modelValue:C.value,"onUpdate:modelValue":r[0]||=e=>C.value=e,placeholder:`http://localhost:4315/v1/`},null,8,[`modelValue`])]),_:1},8,[`title`,`description`])]),_:1})]),_:1},8,[`provider-name`,`provider-icon`,`on-back`])}}});typeof _==`function`&&_(y);var b=y;export{b as default}; \ No newline at end of file +import{computed as e,createBlock as t,createVNode as n,defineComponent as r,onMounted as i,openBlock as a,resolveComponent as o,storeToRefs as s,unref as c,useI18n as l,useRouter as u,watch as d,withCtx as f}from"./index-CsmT0L1K.js";import"./import-url-browser-DNuYZxPr.js";import"./duckdb-mvp-C3i5IjU8.js";import"./index-CISmcbXk-C9oju49Y.js";import"./types-AwjH7X1C.js";import{useProvidersStore as p}from"./stores-2H61GqXP.js";import"./__vite-browser-external-DPh5tFvT.js";import"./Button-D3cjyOEe.js";import"./src-C1Sr0aqN.js";import{ProviderBaseUrlInput_default as m,ProviderSettingsContainer_default as h,ProviderSettingsLayout_default as g}from"./components-DHUA669a.js";import"./composables-CgcEyUWo.js";import"./sleep-CvjNLutj.js";import"./queue-B0kER5Ap.js";import"./queues-hSEKEE3F.js";import"./dist-Cr2QBfS4.js";import"./webgpu-Nt9hTBpW.js";import{route_block_default as _}from"./route-block-DNPbw0zT.js";const v=`player2-api`;var y=r({__name:`player2-api`,setup(r){let{t:_}=l(),y=u(),b=p(),{providers:x}=s(b),S=e(()=>b.getProviderMetadata(v)),C=e({get:()=>{var e;return(e=x.value[v])?.baseUrl||``},set:e=>{x.value[v]||(x.value[v]={}),x.value[v].baseUrl=e}});i(()=>{var e;b.initializeProvider(v),C.value=(e=x.value[v])?.baseUrl||``}),d([C],()=>{x.value[v]={...x.value[v],baseUrl:C.value||``}});function w(){var e;x.value[v]={...(e=S.value)?.defaultOptions}}return(e,r)=>{var i,s;let l=o(`ProviderBasicSettings`);return a(),t(c(g),{"provider-name":(i=S.value)?.localizedName,"provider-icon":(s=S.value)?.icon,"on-back":()=>c(y).back()},{default:f(()=>[n(c(h),null,{default:f(()=>[n(l,{title:c(_)(`settings.pages.providers.common.section.basic.title`),description:c(_)(`settings.pages.providers.common.section.basic.description`),"on-reset":w},{default:f(()=>[n(c(m),{modelValue:C.value,"onUpdate:modelValue":r[0]||=e=>C.value=e,placeholder:`http://localhost:4315/v1/`},null,8,[`modelValue`])]),_:1},8,[`title`,`description`])]),_:1})]),_:1},8,[`provider-name`,`provider-icon`,`on-back`])}}});typeof _==`function`&&_(y);var b=y;export{b as default}; \ No newline at end of file diff --git a/assets/polaroid-8NPKzMOn.js b/assets/polaroid-DBAaqaQb.js similarity index 76% rename from assets/polaroid-8NPKzMOn.js rename to assets/polaroid-DBAaqaQb.js index 5b2719943d36d3982d9afcaa0f3b850eed30c34a..c5eb19813d5977b8e6c0c3b041001f8014f55b31 100644 --- a/assets/polaroid-8NPKzMOn.js +++ b/assets/polaroid-DBAaqaQb.js @@ -1 +1 @@ -import{Fragment as e,createBaseVNode as t,createElementBlock as n,createVNode as r,defineComponent as i,openBlock as a,ref as o,renderList as s,toDisplayString as c,unref as l,vModelSelect as u,watch as d,withCtx as f,withDirectives as p}from"./index-CuCRViVh.js";import"./import-url-browser-DNuYZxPr.js";import"./duckdb-mvp-C3i5IjU8.js";import"./index-CISmcbXk-BkTeNOgG.js";import"./types-AwjH7X1C.js";import"./stores-m0eA85gd.js";import"./__vite-browser-external-CCfYMxZl.js";import"./Button-DFhzbYVt.js";import"./src-C2QbIOor.js";import{Canvas_default as m,Model_default as h,Screen_default as g}from"./components-BFLl4u81.js";import"./composables-Cgvkd8lL.js";import"./sleep-CvjNLutj.js";import"./queue-DAKPJQl1.js";import"./queues-Dstwm1VQ.js";import"./dist-Cr2QBfS4.js";import"./webgpu-Nt9hTBpW.js";const _={flex:``,"flex-col":``,"items-center":``,"gap-4":``},v={"h-full":``,"w-full":``},y=[`value`];var b=i({__name:`polaroid`,setup(i){let b=o(),x=o(),S=o(`idle`),C=o([]);function w(e,t){let n=document.createElement(`a`);n.href=e,n.download=t,document.body.appendChild(n),n.click(),document.body.removeChild(n)}function T(e){var t;(t=x.value)?.setMotion(e)}d(x,e=>{C.value=e?.listMotionGroups()||[]},{immediate:!0});function E(){x.value&&(x.value.setMotion(S.value),C.value=x.value.listMotionGroups())}function D(){if(!b.value||!x.value)return;let e=b.value.canvasElement(),t=e.toDataURL(`image/png`);w(t,`live2d-screenshot.png`)}return(i,o)=>(a(),n(`div`,_,[t(`div`,v,[r(l(g),{relative:``,"min-h-70dvh":``},{default:f(({width:e,height:t})=>[r(l(m),{ref_key:`live2dCanvasRef`,ref:b,width:e,height:t,resolution:3,"rounded-full":``},{default:f(({app:n})=>[r(l(h),{ref_key:`live2dModelRef`,ref:x,app:n,width:e,height:t,"focus-at":{x:e/2,y:t/2},onModelLoaded:E},null,8,[`app`,`width`,`height`,`focus-at`])]),_:2},1032,[`width`,`height`])]),_:1})]),t(`div`,null,[p(t(`select`,{"onUpdate:modelValue":o[0]||=e=>S.value=e,"rounded-lg":``,"px-3":``,"py-2":``,onChange:o[1]||=e=>T(S.value)},[(a(!0),n(e,null,s(C.value,e=>(a(),n(`option`,{key:e.motionIndex,value:e.motionName},c(e.fileName),9,y))),128))],544),[[u,S.value]])]),t(`div`,{border:`2px solid white`,flex:``,"items-center":``,"justify-center":``,"rounded-full":``,"p-1":``},[t(`button`,{"h-18":``,"w-18":``,"rounded-full":``,bg:`white active:gray-50`,"outline-none":``,"transition-colors":``,"duration-200":``,"ease-in-out":``,onClick:D})])]))}}),x=b;export{x as default}; \ No newline at end of file +import{Fragment as e,createBaseVNode as t,createElementBlock as n,createVNode as r,defineComponent as i,openBlock as a,ref as o,renderList as s,toDisplayString as c,unref as l,vModelSelect as u,watch as d,withCtx as f,withDirectives as p}from"./index-CsmT0L1K.js";import"./import-url-browser-DNuYZxPr.js";import"./duckdb-mvp-C3i5IjU8.js";import"./index-CISmcbXk-C9oju49Y.js";import"./types-AwjH7X1C.js";import"./stores-2H61GqXP.js";import"./__vite-browser-external-DPh5tFvT.js";import"./Button-D3cjyOEe.js";import"./src-C1Sr0aqN.js";import{Canvas_default as m,Model_default as h,Screen_default as g}from"./components-DHUA669a.js";import"./composables-CgcEyUWo.js";import"./sleep-CvjNLutj.js";import"./queue-B0kER5Ap.js";import"./queues-hSEKEE3F.js";import"./dist-Cr2QBfS4.js";import"./webgpu-Nt9hTBpW.js";const _={flex:``,"flex-col":``,"items-center":``,"gap-4":``},v={"h-full":``,"w-full":``},y=[`value`];var b=i({__name:`polaroid`,setup(i){let b=o(),x=o(),S=o(`idle`),C=o([]);function w(e,t){let n=document.createElement(`a`);n.href=e,n.download=t,document.body.appendChild(n),n.click(),document.body.removeChild(n)}function T(e){var t;(t=x.value)?.setMotion(e)}d(x,e=>{C.value=e?.listMotionGroups()||[]},{immediate:!0});function E(){x.value&&(x.value.setMotion(S.value),C.value=x.value.listMotionGroups())}function D(){if(!b.value||!x.value)return;let e=b.value.canvasElement(),t=e.toDataURL(`image/png`);w(t,`live2d-screenshot.png`)}return(i,o)=>(a(),n(`div`,_,[t(`div`,v,[r(l(g),{relative:``,"min-h-70dvh":``},{default:f(({width:e,height:t})=>[r(l(m),{ref_key:`live2dCanvasRef`,ref:b,width:e,height:t,resolution:3,"rounded-full":``},{default:f(({app:n})=>[r(l(h),{ref_key:`live2dModelRef`,ref:x,app:n,width:e,height:t,"focus-at":{x:e/2,y:t/2},onModelLoaded:E},null,8,[`app`,`width`,`height`,`focus-at`])]),_:2},1032,[`width`,`height`])]),_:1})]),t(`div`,null,[p(t(`select`,{"onUpdate:modelValue":o[0]||=e=>S.value=e,"rounded-lg":``,"px-3":``,"py-2":``,onChange:o[1]||=e=>T(S.value)},[(a(!0),n(e,null,s(C.value,e=>(a(),n(`option`,{key:e.motionIndex,value:e.motionName},c(e.fileName),9,y))),128))],544),[[u,S.value]])]),t(`div`,{border:`2px solid white`,flex:``,"items-center":``,"justify-center":``,"rounded-full":``,"p-1":``},[t(`button`,{"h-18":``,"w-18":``,"rounded-full":``,bg:`white active:gray-50`,"outline-none":``,"transition-colors":``,"duration-200":``,"ease-in-out":``,onClick:D})])]))}}),x=b;export{x as default}; \ No newline at end of file diff --git a/assets/providers-DesecQLA.js b/assets/providers-Dj_4UV5e.js similarity index 88% rename from assets/providers-DesecQLA.js rename to assets/providers-Dj_4UV5e.js index bb0af5c176ed9235e8fbf4f6ff68316647da89e1..e07717f2f170151c37ab9ac5741c5dbce218d094 100644 --- a/assets/providers-DesecQLA.js +++ b/assets/providers-Dj_4UV5e.js @@ -1 +1 @@ -import{Fragment as e,createBaseVNode as t,createBlock as n,createElementBlock as r,createVNode as i,defineComponent as a,openBlock as o,renderList as s,resolveComponent as c,resolveDirective as l,storeToRefs as u,toDisplayString as d,unref as f,useI18n as p,withCtx as m,withDirectives as h}from"./index-CuCRViVh.js";import"./import-url-browser-DNuYZxPr.js";import"./duckdb-mvp-C3i5IjU8.js";import"./index-CISmcbXk-BkTeNOgG.js";import"./types-AwjH7X1C.js";import{useProvidersStore as g}from"./stores-m0eA85gd.js";import"./__vite-browser-external-CCfYMxZl.js";import"./Button-DFhzbYVt.js";import"./src-C2QbIOor.js";import{IconStatusItem_default as _}from"./components-BFLl4u81.js";import"./composables-Cgvkd8lL.js";import"./sleep-CvjNLutj.js";import"./queue-DAKPJQl1.js";import"./queues-Dstwm1VQ.js";import"./dist-Cr2QBfS4.js";import"./webgpu-Nt9hTBpW.js";import{route_block_default as v}from"./route-block-DNPbw0zT.js";import{IconAnimation_default as y}from"./IconAnimation-DqqXWuqN.js";import{useIconAnimation as b}from"./useIconAnimation-DqaNnagM.js";const x={flex:``,"flex-col":``,"gap-5":``},S={class:`rounded-lg bg-primary-500/10 p-4 dark:bg-primary-800/25`},C={class:`mb-2 text-xl text-primary-800 font-semibold dark:text-primary-100`},w={class:`text-primary-700 dark:text-primary-300`},T={flex:`~ row items-center gap-2`},E={text:`neutral-300 dark:neutral-500`},D={grid:`~ cols-2 gap-4`},O={flex:`~ row items-center gap-2`,"my-5":``},k={text:`neutral-300 dark:neutral-500`},A={grid:`~ cols-2 gap-4`},j={flex:`~ row items-center gap-2`,"my-5":``},M={text:`neutral-300 dark:neutral-500`},N={grid:`~ cols-2 gap-4`},P={key:1,text:`neutral-500/50 dark:neutral-600/20`,"pointer-events-none":``,fixed:``,top:`[calc(100dvh-15rem)]`,"bottom-0":``,"right--5":``,"z--1":``,initial:{scale:.9,opacity:0,y:20},enter:{scale:1,opacity:1,y:0},duration:500,"size-60":``,flex:``,"items-center":``,"justify-center":``};var F=a({__name:`index`,setup(a){let{t:v}=p(),F=g(),{allChatProvidersMetadata:I,allAudioSpeechProvidersMetadata:L,allAudioTranscriptionProvidersMetadata:R}=u(F),{iconAnimationStarted:z,showIconAnimation:B,animationIcon:V}=b(`i-solar:box-minimalistic-bold-duotone`);return(a,u)=>{let p=c(`i18n-t`),g=l(`motion`);return o(),r(e,null,[t(`div`,x,[t(`div`,S,[t(`div`,C,d(a.$t(`settings.pages.providers.helpinfo.title`)),1),t(`div`,w,[i(p,{keypath:`settings.pages.providers.helpinfo.description`},{chat:m(()=>u[0]||=[t(`span`,{class:`inline-flex translate-y-[0.25lh] items-center gap-1 rounded-lg bg-primary-500/10 px-2 py-0.5 dark:bg-primary-800/25`},[t(`div`,{class:`i-solar:chat-square-like-bold-duotone`}),t(`strong`,{class:`font-semibold`},`Chat`)],-1)]),_:1})])]),t(`div`,T,[u[2]||=t(`div`,{"i-solar:chat-square-like-bold-duotone":``,text:`neutral-500 dark:neutral-400 4xl`},null,-1),t(`div`,null,[t(`div`,null,[t(`span`,E,d(f(v)(`settings.pages.providers.explained.chat`)),1)]),u[1]||=t(`div`,{flex:``,"text-nowrap":``,"text-3xl":``,"font-normal":``},[t(`div`,null,` Chat `)],-1)])]),t(`div`,D,[(o(!0),r(e,null,s(f(I),(e,t)=>h((o(),n(f(_),{key:e.id,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+t*10,delay:t*50,title:e.localizedName||`Unknown`,description:e.localizedDescription,icon:e.icon,"icon-color":e.iconColor,"icon-image":e.iconImage,to:`/settings/providers/${e.id}`,configured:e.configured},null,8,[`duration`,`delay`,`title`,`description`,`icon`,`icon-color`,`icon-image`,`to`,`configured`])),[[g]])),128))]),t(`div`,O,[u[4]||=t(`div`,{"i-solar:user-speak-rounded-bold-duotone":``,text:`neutral-500 dark:neutral-400 4xl`},null,-1),t(`div`,null,[t(`div`,null,[t(`span`,k,d(f(v)(`settings.pages.providers.explained.Speech`)),1)]),u[3]||=t(`div`,{flex:``,"text-nowrap":``,"text-3xl":``,"font-normal":``},[t(`div`,null,` Speech `)],-1)])]),t(`div`,A,[(o(!0),r(e,null,s(f(L),(e,t)=>h((o(),n(f(_),{key:e.id,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+t*10,delay:(f(I).length+t)*50,title:e.localizedName||`Unknown`,description:e.localizedDescription,icon:e.icon,"icon-color":e.iconColor,"icon-image":e.iconImage,to:`/settings/providers/${e.id}`,configured:e.configured},null,8,[`duration`,`delay`,`title`,`description`,`icon`,`icon-color`,`icon-image`,`to`,`configured`])),[[g]])),128))]),t(`div`,j,[u[6]||=t(`div`,{"i-solar:microphone-3-bold-duotone":``,text:`neutral-500 dark:neutral-400 4xl`},null,-1),t(`div`,null,[t(`div`,null,[t(`span`,M,d(f(v)(`settings.pages.providers.explained.Transcription`)),1)]),u[5]||=t(`div`,{flex:``,"text-nowrap":``,"text-3xl":``,"font-normal":``},[t(`div`,null,` Transcription `)],-1)])]),t(`div`,N,[(o(!0),r(e,null,s(f(R),(e,t)=>h((o(),n(f(_),{key:e.id,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+t*10,delay:(f(I).length+f(L).length+t)*50,title:e.localizedName||`Unknown`,description:e.localizedDescription,icon:e.icon,"icon-color":e.iconColor,"icon-image":e.iconImage,to:`/settings/providers/${e.id}`,configured:e.configured},null,8,[`duration`,`delay`,`title`,`description`,`icon`,`icon-color`,`icon-image`,`to`,`configured`])),[[g]])),128))])]),f(B)?(o(),n(y,{key:0,"z-index":-1,icon:f(V),"icon-size":12,duration:1e3,started:f(z),"is-reverse":!0,position:`calc(100dvw - 9.5rem), calc(100dvh - 9.5rem)`,"text-color":`text-neutral-200/50 dark:text-neutral-600/20`},null,8,[`icon`,`started`])):h((o(),r(`div`,P,u[7]||=[t(`div`,{text:`60`,"i-solar:box-minimalistic-bold-duotone":``},null,-1)])),[[g]])],64)}}});typeof v==`function`&&v(F);var I=F;export{I as default}; \ No newline at end of file +import{Fragment as e,createBaseVNode as t,createBlock as n,createElementBlock as r,createVNode as i,defineComponent as a,openBlock as o,renderList as s,resolveComponent as c,resolveDirective as l,storeToRefs as u,toDisplayString as d,unref as f,useI18n as p,withCtx as m,withDirectives as h}from"./index-CsmT0L1K.js";import"./import-url-browser-DNuYZxPr.js";import"./duckdb-mvp-C3i5IjU8.js";import"./index-CISmcbXk-C9oju49Y.js";import"./types-AwjH7X1C.js";import{useProvidersStore as g}from"./stores-2H61GqXP.js";import"./__vite-browser-external-DPh5tFvT.js";import"./Button-D3cjyOEe.js";import"./src-C1Sr0aqN.js";import{IconStatusItem_default as _}from"./components-DHUA669a.js";import"./composables-CgcEyUWo.js";import"./sleep-CvjNLutj.js";import"./queue-B0kER5Ap.js";import"./queues-hSEKEE3F.js";import"./dist-Cr2QBfS4.js";import"./webgpu-Nt9hTBpW.js";import{route_block_default as v}from"./route-block-DNPbw0zT.js";import{IconAnimation_default as y}from"./IconAnimation-BDKVR9Dg.js";import{useIconAnimation as b}from"./useIconAnimation-bkp6MDA-.js";const x={flex:``,"flex-col":``,"gap-5":``},S={class:`rounded-lg bg-primary-500/10 p-4 dark:bg-primary-800/25`},C={class:`mb-2 text-xl text-primary-800 font-semibold dark:text-primary-100`},w={class:`text-primary-700 dark:text-primary-300`},T={flex:`~ row items-center gap-2`},E={text:`neutral-300 dark:neutral-500`},D={grid:`~ cols-2 gap-4`},O={flex:`~ row items-center gap-2`,"my-5":``},k={text:`neutral-300 dark:neutral-500`},A={grid:`~ cols-2 gap-4`},j={flex:`~ row items-center gap-2`,"my-5":``},M={text:`neutral-300 dark:neutral-500`},N={grid:`~ cols-2 gap-4`},P={key:1,text:`neutral-500/50 dark:neutral-600/20`,"pointer-events-none":``,fixed:``,top:`[calc(100dvh-15rem)]`,"bottom-0":``,"right--5":``,"z--1":``,initial:{scale:.9,opacity:0,y:20},enter:{scale:1,opacity:1,y:0},duration:500,"size-60":``,flex:``,"items-center":``,"justify-center":``};var F=a({__name:`index`,setup(a){let{t:v}=p(),F=g(),{allChatProvidersMetadata:I,allAudioSpeechProvidersMetadata:L,allAudioTranscriptionProvidersMetadata:R}=u(F),{iconAnimationStarted:z,showIconAnimation:B,animationIcon:V}=b(`i-solar:box-minimalistic-bold-duotone`);return(a,u)=>{let p=c(`i18n-t`),g=l(`motion`);return o(),r(e,null,[t(`div`,x,[t(`div`,S,[t(`div`,C,d(a.$t(`settings.pages.providers.helpinfo.title`)),1),t(`div`,w,[i(p,{keypath:`settings.pages.providers.helpinfo.description`},{chat:m(()=>u[0]||=[t(`span`,{class:`inline-flex translate-y-[0.25lh] items-center gap-1 rounded-lg bg-primary-500/10 px-2 py-0.5 dark:bg-primary-800/25`},[t(`div`,{class:`i-solar:chat-square-like-bold-duotone`}),t(`strong`,{class:`font-semibold`},`Chat`)],-1)]),_:1})])]),t(`div`,T,[u[2]||=t(`div`,{"i-solar:chat-square-like-bold-duotone":``,text:`neutral-500 dark:neutral-400 4xl`},null,-1),t(`div`,null,[t(`div`,null,[t(`span`,E,d(f(v)(`settings.pages.providers.explained.chat`)),1)]),u[1]||=t(`div`,{flex:``,"text-nowrap":``,"text-3xl":``,"font-normal":``},[t(`div`,null,` Chat `)],-1)])]),t(`div`,D,[(o(!0),r(e,null,s(f(I),(e,t)=>h((o(),n(f(_),{key:e.id,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+t*10,delay:t*50,title:e.localizedName||`Unknown`,description:e.localizedDescription,icon:e.icon,"icon-color":e.iconColor,"icon-image":e.iconImage,to:`/settings/providers/${e.id}`,configured:e.configured},null,8,[`duration`,`delay`,`title`,`description`,`icon`,`icon-color`,`icon-image`,`to`,`configured`])),[[g]])),128))]),t(`div`,O,[u[4]||=t(`div`,{"i-solar:user-speak-rounded-bold-duotone":``,text:`neutral-500 dark:neutral-400 4xl`},null,-1),t(`div`,null,[t(`div`,null,[t(`span`,k,d(f(v)(`settings.pages.providers.explained.Speech`)),1)]),u[3]||=t(`div`,{flex:``,"text-nowrap":``,"text-3xl":``,"font-normal":``},[t(`div`,null,` Speech `)],-1)])]),t(`div`,A,[(o(!0),r(e,null,s(f(L),(e,t)=>h((o(),n(f(_),{key:e.id,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+t*10,delay:(f(I).length+t)*50,title:e.localizedName||`Unknown`,description:e.localizedDescription,icon:e.icon,"icon-color":e.iconColor,"icon-image":e.iconImage,to:`/settings/providers/${e.id}`,configured:e.configured},null,8,[`duration`,`delay`,`title`,`description`,`icon`,`icon-color`,`icon-image`,`to`,`configured`])),[[g]])),128))]),t(`div`,j,[u[6]||=t(`div`,{"i-solar:microphone-3-bold-duotone":``,text:`neutral-500 dark:neutral-400 4xl`},null,-1),t(`div`,null,[t(`div`,null,[t(`span`,M,d(f(v)(`settings.pages.providers.explained.Transcription`)),1)]),u[5]||=t(`div`,{flex:``,"text-nowrap":``,"text-3xl":``,"font-normal":``},[t(`div`,null,` Transcription `)],-1)])]),t(`div`,N,[(o(!0),r(e,null,s(f(R),(e,t)=>h((o(),n(f(_),{key:e.id,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+t*10,delay:(f(I).length+f(L).length+t)*50,title:e.localizedName||`Unknown`,description:e.localizedDescription,icon:e.icon,"icon-color":e.iconColor,"icon-image":e.iconImage,to:`/settings/providers/${e.id}`,configured:e.configured},null,8,[`duration`,`delay`,`title`,`description`,`icon`,`icon-color`,`icon-image`,`to`,`configured`])),[[g]])),128))])]),f(B)?(o(),n(y,{key:0,"z-index":-1,icon:f(V),"icon-size":12,duration:1e3,started:f(z),"is-reverse":!0,position:`calc(100dvw - 9.5rem), calc(100dvh - 9.5rem)`,"text-color":`text-neutral-200/50 dark:text-neutral-600/20`},null,8,[`icon`,`started`])):h((o(),r(`div`,P,u[7]||=[t(`div`,{text:`60`,"i-solar:box-minimalistic-bold-duotone":``},null,-1)])),[[g]])],64)}}});typeof v==`function`&&v(F);var I=F;export{I as default}; \ No newline at end of file diff --git a/assets/queue-DAKPJQl1.js b/assets/queue-B0kER5Ap.js similarity index 92% rename from assets/queue-DAKPJQl1.js rename to assets/queue-B0kER5Ap.js index 3842d05cdfa2e75cc174739819fbf77c6f2246fc..4f16729ee62173979b8c89bd5462ae5f09a856e3 100644 --- a/assets/queue-DAKPJQl1.js +++ b/assets/queue-B0kER5Ap.js @@ -1 +1 @@ -import{ref as e}from"./index-CuCRViVh.js";function t(t){let n=e([]),r=e(!1),i={add:[],pick:[],processing:[],error:[],processed:[],done:[]},a={};function o(e,t){i[e].push(t)}function s(e,...t){let n=i[e];n.forEach(e=>{e(...t)})}function c(e,t){a[e]=a[e]||[],a[e].push(t)}function l(e,...t){let n=a[e]||[];n.forEach(e=>{e(...t)})}async function u(e){n.value.push(e),s(`add`,e)}function d(){let e=n.value.shift();if(e)return s(`pick`,e),e}async function f(){if(r.value)return;let e=d();if(e){r.value=!0;for(let r of t.handlers){s(`processing`,e,r);try{let t=await r({data:e,itemsToBeProcessed:()=>n.value.length,emit:l});s(`processed`,e,t,r)}catch(t){s(`error`,e,t,r);continue}}r.value=!1,s(`done`,e),n.value.length>0&&f()}}return o(`add`,f),o(`done`,f),{add:u,on:o,onHandlerEvent:c,queue:n}}export{t as useQueue}; \ No newline at end of file +import{ref as e}from"./index-CsmT0L1K.js";function t(t){let n=e([]),r=e(!1),i={add:[],pick:[],processing:[],error:[],processed:[],done:[]},a={};function o(e,t){i[e].push(t)}function s(e,...t){let n=i[e];n.forEach(e=>{e(...t)})}function c(e,t){a[e]=a[e]||[],a[e].push(t)}function l(e,...t){let n=a[e]||[];n.forEach(e=>{e(...t)})}async function u(e){n.value.push(e),s(`add`,e)}function d(){let e=n.value.shift();if(e)return s(`pick`,e),e}async function f(){if(r.value)return;let e=d();if(e){r.value=!0;for(let r of t.handlers){s(`processing`,e,r);try{let t=await r({data:e,itemsToBeProcessed:()=>n.value.length,emit:l});s(`processed`,e,t,r)}catch(t){s(`error`,e,t,r);continue}}r.value=!1,s(`done`,e),n.value.length>0&&f()}}return o(`add`,f),o(`done`,f),{add:u,on:o,onHandlerEvent:c,queue:n}}export{t as useQueue}; \ No newline at end of file diff --git a/assets/queue-BXEthkka.js b/assets/queue-BV9joiY1.js similarity index 85% rename from assets/queue-BXEthkka.js rename to assets/queue-BV9joiY1.js index a890a39ecd9b17af745863561d4262c2be5c43b6..d7b8441f31ab97436c47812a4a3dfa585a4749d0 100644 --- a/assets/queue-BXEthkka.js +++ b/assets/queue-BV9joiY1.js @@ -1 +1 @@ -import{createBaseVNode as e,createElementBlock as t,defineComponent as n,onMounted as r,openBlock as i,ref as a}from"./index-CuCRViVh.js";import{sleep as o}from"./sleep-CvjNLutj.js";import{useQueue as s}from"./queue-DAKPJQl1.js";var c=n({__name:`queue`,setup(n){let c=a(``),l=s({handlers:[async e=>{console.log(`ready to play speech audio for`,e)}]}),u=s({handlers:[async e=>{console.log(`ready to stream speech audio for`,e),l.add(e.data)}]}),d=s({handlers:[async e=>{let t=[`.`,`?`,`!`],n=!1;for(let r of t){if(!e.data.includes(r))continue;let t=e.data.indexOf(r),i=e.data.slice(0,t+1),a=e.data.slice(t+1);c.value+=i,u.add(c.value.trim()),c.value=a,n=!0}n||(c.value+=e.data)}]}),f=`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(?`.split(`(`);async function p(){for(let e of f)await o(100),d.add(e)}async function m(){p()}return r(()=>{m()}),(n,r)=>(i(),t(`div`,null,r[0]||=[e(`div`,null,null,-1)]))}}),l=c;export{l as default}; \ No newline at end of file +import{createBaseVNode as e,createElementBlock as t,defineComponent as n,onMounted as r,openBlock as i,ref as a}from"./index-CsmT0L1K.js";import{sleep as o}from"./sleep-CvjNLutj.js";import{useQueue as s}from"./queue-B0kER5Ap.js";var c=n({__name:`queue`,setup(n){let c=a(``),l=s({handlers:[async e=>{console.log(`ready to play speech audio for`,e)}]}),u=s({handlers:[async e=>{console.log(`ready to stream speech audio for`,e),l.add(e.data)}]}),d=s({handlers:[async e=>{let t=[`.`,`?`,`!`],n=!1;for(let r of t){if(!e.data.includes(r))continue;let t=e.data.indexOf(r),i=e.data.slice(0,t+1),a=e.data.slice(t+1);c.value+=i,u.add(c.value.trim()),c.value=a,n=!0}n||(c.value+=e.data)}]}),f=`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(?`.split(`(`);async function p(){for(let e of f)await o(100),d.add(e)}async function m(){p()}return r(()=>{m()}),(n,r)=>(i(),t(`div`,null,r[0]||=[e(`div`,null,null,-1)]))}}),l=c;export{l as default}; \ No newline at end of file diff --git a/assets/queues-Dstwm1VQ.js b/assets/queues-hSEKEE3F.js similarity index 93% rename from assets/queues-Dstwm1VQ.js rename to assets/queues-hSEKEE3F.js index 12c8b762f5ff87bd05969afb7aceae9735226444..267756a9cd30a85e7d89e420ffda1479aa882595 100644 --- a/assets/queues-Dstwm1VQ.js +++ b/assets/queues-hSEKEE3F.js @@ -1,4 +1,4 @@ -import{ref as e}from"./index-CuCRViVh.js";import{sleep as t}from"./sleep-CvjNLutj.js";import{useQueue as n}from"./queue-DAKPJQl1.js";let r=function(e){return e.Idle=`<|EMOTE_NEUTRAL|>`,e.Happy=`<|EMOTE_HAPPY|>`,e.Sad=`<|EMOTE_SAD|>`,e.Angry=`<|EMOTE_ANGRY|>`,e.Think=`<|EMOTE_THINK|>`,e.Surprise=`<|EMOTE_SURPRISE|>`,e.Awkward=`<|EMOTE_AWKWARD|>`,e.Question=`<|EMOTE_QUESTION|>`,e}({});const i=Object.values(r),a=`Happy`,o=`Sad`,s=`Angry`,c=`Awkward`,l=`Think`,u=`Surprise`,d=`Question`,f=`Idle`,p={[r.Happy]:a,[r.Sad]:o,[r.Angry]:s,[r.Think]:l,[r.Surprise]:u,[r.Awkward]:c,[r.Question]:d,[r.Idle]:f},m={[r.Happy]:`happy`,[r.Sad]:`sad`,[r.Angry]:`angry`,[r.Think]:void 0,[r.Surprise]:`surprised`,[r.Awkward]:void 0,[r.Question]:void 0,[r.Idle]:void 0};function h(e,t){return{role:`system`,content:[e,i.map(e=>`- ${e}`).join(` +import{ref as e}from"./index-CsmT0L1K.js";import{sleep as t}from"./sleep-CvjNLutj.js";import{useQueue as n}from"./queue-B0kER5Ap.js";let r=function(e){return e.Idle=`<|EMOTE_NEUTRAL|>`,e.Happy=`<|EMOTE_HAPPY|>`,e.Sad=`<|EMOTE_SAD|>`,e.Angry=`<|EMOTE_ANGRY|>`,e.Think=`<|EMOTE_THINK|>`,e.Surprise=`<|EMOTE_SURPRISE|>`,e.Awkward=`<|EMOTE_AWKWARD|>`,e.Question=`<|EMOTE_QUESTION|>`,e}({});const i=Object.values(r),a=`Happy`,o=`Sad`,s=`Angry`,c=`Awkward`,l=`Think`,u=`Surprise`,d=`Question`,f=`Idle`,p={[r.Happy]:a,[r.Sad]:o,[r.Angry]:s,[r.Think]:l,[r.Surprise]:u,[r.Awkward]:c,[r.Question]:d,[r.Idle]:f},m={[r.Happy]:`happy`,[r.Sad]:`sad`,[r.Angry]:`angry`,[r.Think]:void 0,[r.Surprise]:`surprised`,[r.Awkward]:void 0,[r.Question]:void 0,[r.Idle]:void 0};function h(e,t){return{role:`system`,content:[e,i.map(e=>`- ${e}`).join(` `),t].join(` `)}}var g=h;const _=`<|llm_inference_end|>`;function v(e){function t(e){for(let t of i){if(!e.includes(t))continue;return{ok:!0,emotion:t}}return{ok:!1,emotion:``}}return n({handlers:[async n=>{if(i.includes(n.data)){n.emit(`emotion`,n.data),await e.add(n.data);return}{let{ok:r,emotion:i}=t(n.data);r&&(n.emit(`emotion`,i),await e.add(i))}}]})}function y(){function e(e){if(!/<\|DELAY:\d+\|>/i.test(e))return{ok:!1,delay:0};let t=/<\|DELAY:(\d+)\|>/i.exec(e),n=t?.[1];if(!n)return{ok:!1,delay:0};let r=Number.parseFloat(n);return r<=0||Number.isNaN(r)?{ok:!0,delay:0}:{ok:!0,delay:r}}return n({handlers:[async n=>{let{ok:r,delay:i}=e(n.data);r&&(n.emit(`delay`,i),await t(i*1e3))}]})}function b(t){let r=e(``);return n({handlers:[async e=>{if(e.data===_){let e=r.value.trim();e&&await t.add(e),r.value=``;return}let n=/[.?!]/;for(r.value+=e.data;r.value;){let e=n.exec(r.value);if(!e||e.index===void 0)break;let i=r.value.slice(0,e.index+1),a=r.value.slice(e.index+1);await t.add(i),r.value=a}}]})}export{p as EMOTION_EmotionMotionName_value,m as EMOTION_VRMExpressionName_value,r as Emotion,f as EmotionNeutralMotionName,l as EmotionThinkMotionName,_ as llmInferenceEndToken,g as system_v2_default,y as useDelayMessageQueue,v as useEmotionsMessageQueue,b as useMessageContentQueue}; \ No newline at end of file diff --git a/assets/scene-BUwCrWjQ.js b/assets/scene-CRPJttqb.js similarity index 64% rename from assets/scene-BUwCrWjQ.js rename to assets/scene-CRPJttqb.js index 8c40d407047c820fa92a6dfd6c432f84c42e3aaf..fce53cd8a989ffecac8784b880e78d0b8605900a 100644 --- a/assets/scene-BUwCrWjQ.js +++ b/assets/scene-CRPJttqb.js @@ -1 +1 @@ -import{Fragment as e,createBaseVNode as t,createBlock as n,createElementBlock as r,defineComponent as i,openBlock as a,resolveDirective as o,unref as s,withDirectives as c}from"./index-CuCRViVh.js";import"./index-CISmcbXk-BkTeNOgG.js";import"./types-AwjH7X1C.js";import"./stores-m0eA85gd.js";import"./__vite-browser-external-CCfYMxZl.js";import"./composables-Cgvkd8lL.js";import"./sleep-CvjNLutj.js";import"./queue-DAKPJQl1.js";import"./queues-Dstwm1VQ.js";import"./dist-Cr2QBfS4.js";import"./webgpu-Nt9hTBpW.js";import{route_block_default as l}from"./route-block-DNPbw0zT.js";import{IconAnimation_default as u}from"./IconAnimation-DqqXWuqN.js";import{useIconAnimation as d}from"./useIconAnimation-DqaNnagM.js";const f={key:1,text:`neutral-200/50 dark:neutral-600/20`,"pointer-events-none":``,fixed:``,top:`[calc(100dvh-15rem)]`,"bottom-0":``,"right--5":``,"z--1":``,initial:{scale:.9,opacity:0,y:20},enter:{scale:1,opacity:1,y:0},duration:500,"size-60":``,flex:``,"items-center":``,"justify-center":``};var p=i({__name:`index`,setup(i){let{iconAnimationStarted:l,showIconAnimation:p,animationIcon:m}=d(`i-solar:armchair-2-bold-duotone`);return(i,d)=>{let h=o(`motion`);return a(),r(e,null,[d[1]||=t(`div`,null,` Scene `,-1),s(p)?(a(),n(u,{key:0,"z-index":-1,icon:s(m),"icon-size":12,duration:1e3,started:s(l),"is-reverse":!0,position:`calc(100dvw - 9.5rem), calc(100dvh - 9.5rem)`,"text-color":`text-neutral-200/50 dark:text-neutral-600/20`},null,8,[`icon`,`started`])):c((a(),r(`div`,f,d[0]||=[t(`div`,{text:`60`,"i-solar:armchair-2-bold-duotone":``},null,-1)])),[[h]])],64)}}});typeof l==`function`&&l(p);var m=p;export{m as default}; \ No newline at end of file +import{Fragment as e,createBaseVNode as t,createBlock as n,createElementBlock as r,defineComponent as i,openBlock as a,resolveDirective as o,unref as s,withDirectives as c}from"./index-CsmT0L1K.js";import"./index-CISmcbXk-C9oju49Y.js";import"./types-AwjH7X1C.js";import"./stores-2H61GqXP.js";import"./__vite-browser-external-DPh5tFvT.js";import"./composables-CgcEyUWo.js";import"./sleep-CvjNLutj.js";import"./queue-B0kER5Ap.js";import"./queues-hSEKEE3F.js";import"./dist-Cr2QBfS4.js";import"./webgpu-Nt9hTBpW.js";import{route_block_default as l}from"./route-block-DNPbw0zT.js";import{IconAnimation_default as u}from"./IconAnimation-BDKVR9Dg.js";import{useIconAnimation as d}from"./useIconAnimation-bkp6MDA-.js";const f={key:1,text:`neutral-200/50 dark:neutral-600/20`,"pointer-events-none":``,fixed:``,top:`[calc(100dvh-15rem)]`,"bottom-0":``,"right--5":``,"z--1":``,initial:{scale:.9,opacity:0,y:20},enter:{scale:1,opacity:1,y:0},duration:500,"size-60":``,flex:``,"items-center":``,"justify-center":``};var p=i({__name:`index`,setup(i){let{iconAnimationStarted:l,showIconAnimation:p,animationIcon:m}=d(`i-solar:armchair-2-bold-duotone`);return(i,d)=>{let h=o(`motion`);return a(),r(e,null,[d[1]||=t(`div`,null,` Scene `,-1),s(p)?(a(),n(u,{key:0,"z-index":-1,icon:s(m),"icon-size":12,duration:1e3,started:s(l),"is-reverse":!0,position:`calc(100dvw - 9.5rem), calc(100dvh - 9.5rem)`,"text-color":`text-neutral-200/50 dark:text-neutral-600/20`},null,8,[`icon`,`started`])):c((a(),r(`div`,f,d[0]||=[t(`div`,{text:`60`,"i-solar:armchair-2-bold-duotone":``},null,-1)])),[[h]])],64)}}});typeof l==`function`&&l(p);var m=p;export{m as default}; \ No newline at end of file diff --git a/assets/settings-BMETuw4R.js b/assets/settings-BZPAO2d4.js similarity index 86% rename from assets/settings-BMETuw4R.js rename to assets/settings-BZPAO2d4.js index 4a7c873e8b1da69af1194900c84ba9c018576cdd..c4039c4e882a73e5da40f5f013d5aa1284d33e4b 100644 --- a/assets/settings-BMETuw4R.js +++ b/assets/settings-BZPAO2d4.js @@ -1 +1 @@ -import{Fragment as e,computed as t,createBaseVNode as n,createBlock as r,createElementBlock as i,defineComponent as a,nextTick as o,normalizeStyle as s,openBlock as c,ref as l,renderList as u,resolveDirective as d,unref as f,useI18n as p,useRouter as m,useSettings as h,withDirectives as g}from"./index-CuCRViVh.js";import"./import-url-browser-DNuYZxPr.js";import"./duckdb-mvp-C3i5IjU8.js";import"./index-CISmcbXk-BkTeNOgG.js";import"./types-AwjH7X1C.js";import"./stores-m0eA85gd.js";import"./__vite-browser-external-CCfYMxZl.js";import"./Button-DFhzbYVt.js";import"./src-C2QbIOor.js";import{IconItem_default as _}from"./components-BFLl4u81.js";import"./composables-Cgvkd8lL.js";import"./sleep-CvjNLutj.js";import"./queue-DAKPJQl1.js";import"./queues-Dstwm1VQ.js";import"./dist-Cr2QBfS4.js";import"./webgpu-Nt9hTBpW.js";import{route_block_default as v}from"./route-block-DNPbw0zT.js";import{IconAnimation_default as y}from"./IconAnimation-DqqXWuqN.js";const b={flex:`~ col gap-4`,"font-normal":``},x={flex:`~ col gap-4`},S={key:1,text:`neutral-200/50 dark:neutral-600/20`,"pointer-events-none":``,fixed:``,top:`[calc(100dvh-12rem)]`,"bottom-0":``,"right--10":``,"z--1":``,initial:{scale:.9,opacity:0,rotate:180},enter:{scale:1,opacity:1,rotate:0},duration:500,"size-60":``,flex:``,"items-center":``,"justify-center":``},C={text:`60`,"i-solar:settings-bold-duotone":``};var w=a({__name:`index`,setup(a){let v=m(),w=l(!1),T=l(),E=l(),{t:D}=p(),O=l(``),k=l(``),A=l(!1),j=h();function M(){var e;(e=E.value)?.call(E)}async function N(e,t){let n=e.currentTarget,r=n.querySelector(`.menu-icon-item-icon`);if(!r)return;let i=r.getBoundingClientRect(),a=`${i.left}px, ${i.top}px`;O.value=t.icon,k.value=a,A.value=!0,await o(),w.value=!0}let P=v.beforeEach(async(e,t,n)=>{if(!j.usePageSpecificTransitions||j.disableTransitions){n();return}await new Promise(e=>{E.value=e}),P(),n()}),F=t(()=>[{title:D(`settings.pages.card.title`),description:D(`settings.pages.card.description`),icon:`i-solar:emoji-funny-square-bold-duotone`,to:`/settings/airi-card`},{title:D(`settings.pages.modules.title`),description:D(`settings.pages.modules.description`),icon:`i-solar:layers-bold-duotone`,to:`/settings/modules`},{title:D(`settings.pages.scene.title`),description:D(`settings.pages.scene.description`),icon:`i-solar:armchair-2-bold-duotone`,to:`/settings/scene`},{title:D(`settings.pages.models.title`),description:D(`settings.pages.models.description`),icon:`i-solar:people-nearby-bold-duotone`,to:`/settings/models`},{title:D(`settings.pages.memory.title`),description:D(`settings.pages.memory.description`),icon:`i-solar:leaf-bold-duotone`,to:`/settings/memory`},{title:D(`settings.pages.providers.title`),description:D(`settings.pages.providers.description`),icon:`i-solar:box-minimalistic-bold-duotone`,to:`/settings/providers`},{title:D(`settings.pages.themes.title`),description:D(`settings.pages.themes.description`),icon:`i-solar:filters-bold-duotone`,to:`/settings/appearance`}]);return(t,a)=>{let o=d(`motion`);return c(),i(`div`,b,[a[0]||=n(`div`,null,null,-1),n(`div`,x,[(c(!0),i(e,null,u(F.value,(e,t)=>g((c(),r(f(_),{key:e.to,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250,style:s({transitionDelay:`${t*50}ms`}),title:e.title,description:e.description,icon:e.icon,to:e.to,onClick:t=>N(t,e)},null,8,[`style`,`title`,`description`,`icon`,`to`,`onClick`])),[[o]])),128))]),A.value&&!f(j).disableTransitions&&f(j).usePageSpecificTransitions?(c(),r(y,{key:0,ref_key:`iconAnimation`,ref:T,icon:O.value,"icon-size":6*1.2,position:k.value,duration:1e3,"text-color":`text-neutral-400/50 dark:text-neutral-600/20`,started:w.value,onAnimationEndedOnce:M},null,8,[`icon`,`position`,`started`])):g((c(),i(`div`,S,[g(n(`div`,C,null,512),[[o]])])),[[o]])])}}});typeof v==`function`&&v(w);var T=w;export{T as default}; \ No newline at end of file +import{Fragment as e,computed as t,createBaseVNode as n,createBlock as r,createElementBlock as i,defineComponent as a,nextTick as o,normalizeStyle as s,openBlock as c,ref as l,renderList as u,resolveDirective as d,unref as f,useI18n as p,useRouter as m,useSettings as h,withDirectives as g}from"./index-CsmT0L1K.js";import"./import-url-browser-DNuYZxPr.js";import"./duckdb-mvp-C3i5IjU8.js";import"./index-CISmcbXk-C9oju49Y.js";import"./types-AwjH7X1C.js";import"./stores-2H61GqXP.js";import"./__vite-browser-external-DPh5tFvT.js";import"./Button-D3cjyOEe.js";import"./src-C1Sr0aqN.js";import{IconItem_default as _}from"./components-DHUA669a.js";import"./composables-CgcEyUWo.js";import"./sleep-CvjNLutj.js";import"./queue-B0kER5Ap.js";import"./queues-hSEKEE3F.js";import"./dist-Cr2QBfS4.js";import"./webgpu-Nt9hTBpW.js";import{route_block_default as v}from"./route-block-DNPbw0zT.js";import{IconAnimation_default as y}from"./IconAnimation-BDKVR9Dg.js";const b={flex:`~ col gap-4`,"font-normal":``},x={flex:`~ col gap-4`},S={key:1,text:`neutral-200/50 dark:neutral-600/20`,"pointer-events-none":``,fixed:``,top:`[calc(100dvh-12rem)]`,"bottom-0":``,"right--10":``,"z--1":``,initial:{scale:.9,opacity:0,rotate:180},enter:{scale:1,opacity:1,rotate:0},duration:500,"size-60":``,flex:``,"items-center":``,"justify-center":``},C={text:`60`,"i-solar:settings-bold-duotone":``};var w=a({__name:`index`,setup(a){let v=m(),w=l(!1),T=l(),E=l(),{t:D}=p(),O=l(``),k=l(``),A=l(!1),j=h();function M(){var e;(e=E.value)?.call(E)}async function N(e,t){let n=e.currentTarget,r=n.querySelector(`.menu-icon-item-icon`);if(!r)return;let i=r.getBoundingClientRect(),a=`${i.left}px, ${i.top}px`;O.value=t.icon,k.value=a,A.value=!0,await o(),w.value=!0}let P=v.beforeEach(async(e,t,n)=>{if(!j.usePageSpecificTransitions||j.disableTransitions){n();return}await new Promise(e=>{E.value=e}),P(),n()}),F=t(()=>[{title:D(`settings.pages.card.title`),description:D(`settings.pages.card.description`),icon:`i-solar:emoji-funny-square-bold-duotone`,to:`/settings/airi-card`},{title:D(`settings.pages.modules.title`),description:D(`settings.pages.modules.description`),icon:`i-solar:layers-bold-duotone`,to:`/settings/modules`},{title:D(`settings.pages.scene.title`),description:D(`settings.pages.scene.description`),icon:`i-solar:armchair-2-bold-duotone`,to:`/settings/scene`},{title:D(`settings.pages.models.title`),description:D(`settings.pages.models.description`),icon:`i-solar:people-nearby-bold-duotone`,to:`/settings/models`},{title:D(`settings.pages.memory.title`),description:D(`settings.pages.memory.description`),icon:`i-solar:leaf-bold-duotone`,to:`/settings/memory`},{title:D(`settings.pages.providers.title`),description:D(`settings.pages.providers.description`),icon:`i-solar:box-minimalistic-bold-duotone`,to:`/settings/providers`},{title:D(`settings.pages.themes.title`),description:D(`settings.pages.themes.description`),icon:`i-solar:filters-bold-duotone`,to:`/settings/appearance`}]);return(t,a)=>{let o=d(`motion`);return c(),i(`div`,b,[a[0]||=n(`div`,null,null,-1),n(`div`,x,[(c(!0),i(e,null,u(F.value,(e,t)=>g((c(),r(f(_),{key:e.to,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250,style:s({transitionDelay:`${t*50}ms`}),title:e.title,description:e.description,icon:e.icon,to:e.to,onClick:t=>N(t,e)},null,8,[`style`,`title`,`description`,`icon`,`to`,`onClick`])),[[o]])),128))]),A.value&&!f(j).disableTransitions&&f(j).usePageSpecificTransitions?(c(),r(y,{key:0,ref_key:`iconAnimation`,ref:T,icon:O.value,"icon-size":6*1.2,position:k.value,duration:1e3,"text-color":`text-neutral-400/50 dark:text-neutral-600/20`,started:w.value,onAnimationEndedOnce:M},null,8,[`icon`,`position`,`started`])):g((c(),i(`div`,S,[g(n(`div`,C,null,512),[[o]])])),[[o]])])}}});typeof v==`function`&&v(w);var T=w;export{T as default}; \ No newline at end of file diff --git a/assets/settings-Clpt817f.js b/assets/settings-Dm8h2cwP.js similarity index 97% rename from assets/settings-Clpt817f.js rename to assets/settings-Dm8h2cwP.js index b1dab2e1196d6a44b77d92008fa1009680517819..98a47c7eeaa09f28fa588dfb4256829b36f79b05 100644 --- a/assets/settings-Clpt817f.js +++ b/assets/settings-Dm8h2cwP.js @@ -1 +1 @@ -var e=function(exports){function t(e){"@babel/helpers - typeof";return t=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},t(e)}function n(e,n){if(t(e)!=`object`||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,n||`default`);if(t(i)!=`object`)return i;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(n===`string`?String:Number)(e)}function r(e){var r=n(e,`string`);return t(r)==`symbol`?r:r+``}function i(e,t,n){return(t=r(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}return exports.defineProperty=i,exports}({});import{Fragment as t,RouterView as n,alpha as r,animate as i,anticipate as a,backIn as o,backInOut as s,backOut as c,bounceIn as l,bounceInOut as u,bounceOut as ee,circIn as te,circInOut as ne,circOut as re,color as d,complex as ie,computed as f,createBaseVNode as p,createCommentVNode as m,createElementBlock as h,createVNode as g,cubicBezier as ae,defineComponent as _,defu as oe,degrees as v,easeIn as se,easeInOut as ce,easeOut as le,es_default as ue,filter as y,getFrameData as de,h as b,inertia as fe,inject as pe,isObject as me,linear as he,nextTick as ge,normalizeClass as _e,number as ve,onMounted as ye,onUnmounted as be,openBlock as x,progressPercentage as S,px as C,reactive as w,ref as T,scale as E,storeToRefs as xe,toDisplayString as D,toRaw as Se,tryOnUnmounted as Ce,unref as O,unrefElement as we,useEventListener as k,useI18n as Te,useIntersectionObserver as Ee,useRoute as A,useRouter as De,useSlots as j,velocityPerSecond as Oe,watch as M}from"./index-CuCRViVh.js";import"./import-url-browser-DNuYZxPr.js";import"./duckdb-mvp-C3i5IjU8.js";import"./index-CISmcbXk-BkTeNOgG.js";import"./types-AwjH7X1C.js";import{useProvidersStore as ke}from"./stores-m0eA85gd.js";import"./__vite-browser-external-CCfYMxZl.js";import{HeaderLink_default as Ae}from"./HeaderLink-BuxOmtb4.js";import"./Button-DFhzbYVt.js";import"./src-C2QbIOor.js";import"./components-BFLl4u81.js";import"./composables-Cgvkd8lL.js";import"./sleep-CvjNLutj.js";import"./queue-DAKPJQl1.js";import"./queues-Dstwm1VQ.js";import"./dist-Cr2QBfS4.js";import"./webgpu-Nt9hTBpW.js";const N={BASE_URL:`/`,DEV:!1,MODE:`production`,PROD:!0,SSR:!1,VITE_APP_TARGET_HUGGINGFACE_SPACE:`true`};var je=class{constructor(){e.defineProperty(this,`subscriptions`,new Set)}add(e){return this.subscriptions.add(e),()=>this.subscriptions.delete(e)}notify(e,t,n){if(this.subscriptions.size)for(let r of this.subscriptions)r(e,t,n)}clear(){this.subscriptions.clear()}};function P(e){return!Number.isNaN(Number.parseFloat(e))}var Me=class{constructor(t){e.defineProperty(this,`current`,void 0),e.defineProperty(this,`prev`,void 0),e.defineProperty(this,`timeDelta`,0),e.defineProperty(this,`lastUpdated`,0),e.defineProperty(this,`updateSubscribers`,new je),e.defineProperty(this,`stopAnimation`,void 0),e.defineProperty(this,`canTrackVelocity`,!1),e.defineProperty(this,`updateAndNotify`,e=>{this.prev=this.current,this.current=e;let{delta:t,timestamp:n}=de();this.lastUpdated!==n&&(this.timeDelta=t,this.lastUpdated=n),ue.postRender(this.scheduleVelocityCheck),this.updateSubscribers.notify(this.current)}),e.defineProperty(this,`scheduleVelocityCheck`,()=>ue.postRender(this.velocityCheck)),e.defineProperty(this,`velocityCheck`,({timestamp:e})=>{this.canTrackVelocity||=P(this.current),e!==this.lastUpdated&&(this.prev=this.current)}),this.prev=this.current=t,this.canTrackVelocity=P(this.current)}onChange(e){return this.updateSubscribers.add(e)}clearListeners(){this.updateSubscribers.clear()}set(e){this.updateAndNotify(e)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?Oe(Number.parseFloat(this.current)-Number.parseFloat(this.prev),this.timeDelta):0}start(e){return this.stop(),new Promise(t=>{let{stop:n}=e(t);this.stopAnimation=n}).then(()=>this.clearAnimation())}stop(){this.stopAnimation&&this.stopAnimation(),this.clearAnimation()}isAnimating(){return!!this.stopAnimation}clearAnimation(){this.stopAnimation=null}destroy(){this.updateSubscribers.clear(),this.stop()}};function Ne(e){return new Me(e)}const{isArray:Pe}=Array;function Fe(){let e=T({}),t=t=>{let n=t=>{e.value[t]&&(e.value[t].stop(),e.value[t].destroy(),delete e.value[t])};t?Pe(t)?t.forEach(n):n(t):Object.keys(e.value).forEach(n)},n=(t,n,r)=>{if(e.value[t])return e.value[t];let i=Ne(n);return i.onChange(e=>r[t]=e),e.value[t]=i,i};return Ce(t),{motionValues:e,get:n,stop:t}}function Ie(e){return Array.isArray(e)}function F(){return{type:`spring`,stiffness:500,damping:25,restDelta:.5,restSpeed:10}}function I(e){return{type:`spring`,stiffness:550,damping:e===0?2*Math.sqrt(550):30,restDelta:.01,restSpeed:10}}function Le(e){return{type:`spring`,stiffness:550,damping:e===0?100:30,restDelta:.01,restSpeed:10}}function L(){return{type:`keyframes`,ease:`linear`,duration:300}}function Re(e){return{type:`keyframes`,duration:800,values:e}}const R={default:Le,x:F,y:F,z:F,rotate:F,rotateX:F,rotateY:F,rotateZ:F,scaleX:I,scaleY:I,scale:I,backgroundColor:L,color:L,opacity:L};function z(e,t){let n;return n=Ie(t)?Re:R[e]||R.default,{to:t,...n(t)}}const B={...ve,transform:Math.round},V={color:d,backgroundColor:d,outlineColor:d,fill:d,stroke:d,borderColor:d,borderTopColor:d,borderRightColor:d,borderBottomColor:d,borderLeftColor:d,borderWidth:C,borderTopWidth:C,borderRightWidth:C,borderBottomWidth:C,borderLeftWidth:C,borderRadius:C,radius:C,borderTopLeftRadius:C,borderTopRightRadius:C,borderBottomRightRadius:C,borderBottomLeftRadius:C,width:C,maxWidth:C,height:C,maxHeight:C,size:C,top:C,right:C,bottom:C,left:C,padding:C,paddingTop:C,paddingRight:C,paddingBottom:C,paddingLeft:C,margin:C,marginTop:C,marginRight:C,marginBottom:C,marginLeft:C,rotate:v,rotateX:v,rotateY:v,rotateZ:v,scale:E,scaleX:E,scaleY:E,scaleZ:E,skew:v,skewX:v,skewY:v,distance:C,translateX:C,translateY:C,translateZ:C,x:C,y:C,z:C,perspective:C,transformPerspective:C,opacity:r,originX:S,originY:S,originZ:C,zIndex:B,filter:y,WebkitFilter:y,fillOpacity:r,strokeOpacity:r,numOctaves:B},H=e=>V[e];function U(e,t){return t&&typeof e==`number`&&t.transform?t.transform(e):e}function ze(e,t){let n=H(e);return n!==y&&(n=ie),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const Be={linear:he,easeIn:se,easeInOut:ce,easeOut:le,circIn:te,circInOut:ne,circOut:re,backIn:o,backInOut:s,backOut:c,anticipate:a,bounceIn:l,bounceInOut:u,bounceOut:ee};function W(e){if(Array.isArray(e)){let[t,n,r,i]=e;return ae(t,n,r,i)}else if(typeof e==`string`)return Be[e];return e}function Ve(e){return Array.isArray(e)&&typeof e[0]!=`number`}function G(e,t){return e===`zIndex`?!1:!!(typeof t==`number`||Array.isArray(t)||typeof t==`string`&&ie.test(t)&&!t.startsWith(`url(`))}function He(e){return Array.isArray(e.to)&&e.to[0]===null&&(e.to=[...e.to],e.to[0]=e.from),e}function Ue({ease:e,times:t,delay:n,...r}){let i={...r};return t&&(i.offset=t),e&&(i.ease=Ve(e)?e.map(W):W(e)),n&&(i.elapsed=-n),i}function We(e,t,n){return Array.isArray(t.to)&&(e.duration||=800),He(t),Ge(e)||(e={...e,...z(n,t.to)}),{...t,...Ue(e)}}function Ge({delay:e,repeat:t,repeatType:n,repeatDelay:r,from:i,...a}){return!!Object.keys(a).length}function Ke(e,t){return e[t]||e.default||e}function qe(e,t,n,r,a){let o=Ke(r,e),s=o.from===null||o.from===void 0?t.get():o.from,c=G(e,n);s===`none`&&c&&typeof n==`string`&&(s=ze(e,n));let l=G(e,s);function u(c){let l={from:s,to:n,velocity:r.velocity?r.velocity:t.getVelocity(),onUpdate:e=>t.set(e)};return o.type===`inertia`||o.type===`decay`?fe({...l,...o}):i({...We(o,l,e),onUpdate:e=>{l.onUpdate(e),o.onUpdate&&o.onUpdate(e)},onComplete:()=>{a&&a(),c&&c()}})}function ee(e){return t.set(n),a&&a(),e&&e(),{stop:()=>{}}}return!l||!c||o.type===!1?ee:u}function Je(){let{motionValues:e,stop:t,get:n}=Fe(),r=(e,t,r,i={},a)=>{let o=r[e],s=n(e,o,r);if(i&&i.immediate){s.set(t);return}let c=qe(e,s,t,i,a);s.start(c)};return{motionValues:e,stop:t,push:r}}function Ye(e,t={},{motionValues:n,push:r,stop:i}=Je()){let a=O(t),o=T(!1);M(n,e=>{o.value=Object.values(e).filter(e=>e.isAnimating()).length>0},{immediate:!0,deep:!0});let s=e=>{if(!a||!a[e])throw Error(`The variant ${e} does not exist.`);return a[e]},c=t=>{typeof t==`string`&&(t=s(t));let n=Object.entries(t).map(([n,i])=>{if(n!==`transition`)return new Promise(a=>r(n,i,e,t.transition||z(n,t[n]),a))}).filter(Boolean);async function i(){var e,r;await Promise.all(n),(e=t.transition)==null||(r=e.onComplete)==null||r.call(e)}return Promise.all([i()])},l=t=>{let n=me(t)?t:s(t);Object.entries(n).forEach(([t,n])=>{t!==`transition`&&r(t,n,e,{immediate:!0})})},u=async e=>{let t;if(a&&(a.leave&&(t=a.leave),!a.leave&&a.initial&&(t=a.initial)),!t){e();return}await c(t),e()};return{isAnimating:o,apply:c,set:l,leave:u,stop:i}}const K=typeof window<`u`,Xe=()=>K&&(window.onpointerdown===null||N?.TEST),Ze=()=>K&&(window.ontouchstart===null||N?.TEST),Qe=()=>K&&(window.onmousedown===null||N?.TEST);function $e({target:e,state:t,variants:n,apply:r}){let i=O(n),a=T(!1),o=T(!1),s=T(!1),c=f(()=>{let e=[...Object.keys(t.value||{})];return i?(i.hovered&&(e=[...e,...Object.keys(i.hovered)]),i.tapped&&(e=[...e,...Object.keys(i.tapped)]),i.focused&&(e=[...e,...Object.keys(i.focused)]),e):e}),l=f(()=>{let e={};for(let n in Object.assign(e,t.value),a.value&&i.hovered&&Object.assign(e,i.hovered),o.value&&i.tapped&&Object.assign(e,i.tapped),s.value&&i.focused&&Object.assign(e,i.focused),e)c.value.includes(n)||delete e[n];return e});i.hovered&&(k(e,`mouseenter`,()=>a.value=!0),k(e,`mouseleave`,()=>{a.value=!1,o.value=!1})),i.tapped&&(Qe()&&(k(e,`mousedown`,()=>o.value=!0),k(e,`mouseup`,()=>o.value=!1)),Xe()&&(k(e,`pointerdown`,()=>o.value=!0),k(e,`pointerup`,()=>o.value=!1)),Ze()&&(k(e,`touchstart`,()=>o.value=!0),k(e,`touchend`,()=>o.value=!1))),i.focused&&(k(e,`focus`,()=>s.value=!0),k(e,`blur`,()=>s.value=!1)),M([a,o,s],()=>{r(l.value)})}function et({set:e,target:t,variants:n,variant:r}){let i=O(n);M(()=>t,()=>{i&&(i.initial&&(e(`initial`),r.value=`initial`),i.enter&&(r.value=`enter`))},{immediate:!0,flush:`pre`})}function tt({state:e,apply:t}){M(e,e=>{e&&t(e)},{immediate:!0})}function nt({target:e,variants:t,variant:n}){let r=O(t);r&&(r.visible||r.visibleOnce)&&Ee(e,([{isIntersecting:e}])=>{r.visible?e?n.value=`visible`:n.value=`initial`:r.visibleOnce&&(e&&n.value!==`visibleOnce`?n.value=`visibleOnce`:n.value||=`initial`)})}function rt(e,t={syncVariants:!0,lifeCycleHooks:!0,visibilityHooks:!0,eventListeners:!0}){t.lifeCycleHooks&&et(e),t.syncVariants&&tt(e),t.visibilityHooks&&nt(e),t.eventListeners&&$e(e)}function q(e={}){let t=w({...e}),n=T({});return M(t,()=>{let e={};for(let[n,r]of Object.entries(t)){let t=H(n),i=U(r,t);e[n]=i}n.value=e},{immediate:!0,deep:!0}),{state:t,style:n}}function J(e,t){M(()=>we(e),e=>{e&&t(e)},{immediate:!0})}const it={x:`translateX`,y:`translateY`,z:`translateZ`};function Y(e={},t=!0){let n=w({...e}),r=T(``);return M(n,e=>{let n=``,i=!1;if(t&&(e.x||e.y||e.z)){let t=[e.x||0,e.y||0,e.z||0].map(e=>U(e,C)).join(`,`);n+=`translate3d(${t}) `,i=!0}for(let[r,i]of Object.entries(e)){if(t&&(r===`x`||r===`y`||r===`z`))continue;let e=H(r),a=U(i,e);n+=`${it[r]||r}(${a}) `}t&&!i&&(n+=`translateZ(0px) `),r.value=n.trim()},{immediate:!0,deep:!0}),{state:n,transform:r}}const at=[``,`X`,`Y`,`Z`],ot=[`perspective`,`translate`,`scale`,`rotate`,`skew`],X=[`transformPerspective`,`x`,`y`,`z`];ot.forEach(e=>{at.forEach(t=>{let n=e+t;X.push(n)})});const st=new Set(X);function Z(e){return st.has(e)}const ct=new Set([`originX`,`originY`,`originZ`]);function lt(e){return ct.has(e)}function ut(e){let t={},n={};return Object.entries(e).forEach(([e,r])=>{Z(e)||lt(e)?t[e]=r:n[e]=r}),{transform:t,style:n}}function Q(e){let{transform:t,style:n}=ut(e),{transform:r}=Y(t),{style:i}=q(n);return r.value&&(i.value.transform=r.value),i.value}function dt(e,t){let n,r,{state:i,style:a}=q();return J(e,e=>{r=e;for(let t of Object.keys(V)){if(e.style[t]===null||e.style[t]===``||Z(t)||lt(t))continue;i[t]=e.style[t]}n&&Object.entries(n).forEach(([t,n])=>e.style[t]=n),t&&t(i)}),M(a,e=>{if(!r){n=e;return}for(let t in e)r.style[t]=e[t]},{immediate:!0}),{style:i}}function ft(e){let t=e.trim().split(/\) |\)/);if(t.length===1)return{};let n=e=>e.endsWith(`px`)||e.endsWith(`deg`)?Number.parseFloat(e):Number.isNaN(Number(e))?Number(e):e;return t.reduce((e,t)=>{if(!t)return e;let[r,i]=t.split(`(`),a=i.split(`,`),o=a.map(e=>n(e.endsWith(`)`)?e.replace(`)`,``):e.trim())),s=o.length===1?o[0]:o;return{...e,[r]:s}},{})}function pt(e,t){Object.entries(ft(t)).forEach(([t,n])=>{let r=[`x`,`y`,`z`];if(t===`translate3d`){if(n===0){r.forEach(t=>e[t]=0);return}n.forEach((t,n)=>e[r[n]]=t);return}if(n=Number.parseFloat(`${n}`),t===`translateX`){e.x=n;return}if(t===`translateY`){e.y=n;return}if(t===`translateZ`){e.z=n;return}e[t]=n})}function mt(e,t){let n,r,{state:i,transform:a}=Y();return J(e,e=>{r=e,e.style.transform&&pt(i,e.style.transform),n&&(e.style.transform=n),t&&t(i)}),M(a,e=>{if(!r){n=e;return}r.style.transform=e},{immediate:!0}),{transform:i}}function ht(e){return Object.entries(e)}function gt(e,t){let n=w({}),r=e=>Object.entries(e).forEach(([e,t])=>n[e]=t),{style:i}=dt(e,r),{transform:a}=mt(e,r);return M(n,e=>{ht(e).forEach(([e,t])=>{let n=Z(e)?a:i;n[e]&&n[e]===t||(n[e]=t)})},{immediate:!0,deep:!0}),J(e,()=>t&&r(t)),{motionProperties:n,style:i,transform:a}}function _t(e={}){let t=O(e),n=T(),r=f(()=>{if(n.value)return t[n.value]});return{state:r,variant:n}}function vt(e,t={},n){let{motionProperties:r}=gt(e),{variant:i,state:a}=_t(t),o=Ye(r,t),s={target:e,variant:i,variants:t,state:a,motionProperties:r,...o};return rt(s,n),s}const yt=[`delay`,`duration`],bt=[`initial`,`enter`,`leave`,`visible`,`visible-once`,`visibleOnce`,`hovered`,`tapped`,`focused`,...yt],xt={initial:{opacity:0},enter:{opacity:1}},St={initial:{opacity:0},visible:{opacity:1}},Ct={initial:{opacity:0},visibleOnce:{opacity:1}},wt={initial:{scale:0,opacity:0},enter:{scale:1,opacity:1}},Tt={initial:{scale:0,opacity:0},visible:{scale:1,opacity:1}},Et={initial:{scale:0,opacity:0},visibleOnce:{scale:1,opacity:1}},Dt={initial:{x:-100,rotate:90,opacity:0},enter:{x:0,rotate:0,opacity:1}},Ot={initial:{x:-100,rotate:90,opacity:0},visible:{x:0,rotate:0,opacity:1}},kt={initial:{x:-100,rotate:90,opacity:0},visibleOnce:{x:0,rotate:0,opacity:1}},At={initial:{x:100,rotate:-90,opacity:0},enter:{x:0,rotate:0,opacity:1}},jt={initial:{x:100,rotate:-90,opacity:0},visible:{x:0,rotate:0,opacity:1}},Mt={initial:{x:100,rotate:-90,opacity:0},visibleOnce:{x:0,rotate:0,opacity:1}},Nt={initial:{y:-100,rotate:-90,opacity:0},enter:{y:0,rotate:0,opacity:1}},Pt={initial:{y:-100,rotate:-90,opacity:0},visible:{y:0,rotate:0,opacity:1}},Ft={initial:{y:-100,rotate:-90,opacity:0},visibleOnce:{y:0,rotate:0,opacity:1}},It={initial:{y:100,rotate:90,opacity:0},enter:{y:0,rotate:0,opacity:1}},Lt={initial:{y:100,rotate:90,opacity:0},visible:{y:0,rotate:0,opacity:1}},Rt={initial:{y:100,rotate:90,opacity:0},visibleOnce:{y:0,rotate:0,opacity:1}},zt={initial:{x:-100,opacity:0},enter:{x:0,opacity:1}},Bt={initial:{x:-100,opacity:0},visible:{x:0,opacity:1}},Vt={initial:{x:-100,opacity:0},visibleOnce:{x:0,opacity:1}},Ht={initial:{x:100,opacity:0},enter:{x:0,opacity:1}},Ut={initial:{x:100,opacity:0},visible:{x:0,opacity:1}},Wt={initial:{x:100,opacity:0},visibleOnce:{x:0,opacity:1}},Gt={initial:{y:-100,opacity:0},enter:{y:0,opacity:1}},Kt={initial:{y:-100,opacity:0},visible:{y:0,opacity:1}},qt={initial:{y:-100,opacity:0},visibleOnce:{y:0,opacity:1}},Jt={initial:{y:100,opacity:0},enter:{y:0,opacity:1}},Yt={initial:{y:100,opacity:0},visible:{y:0,opacity:1}},Xt={initial:{y:100,opacity:0},visibleOnce:{y:0,opacity:1}},Zt={__proto__:null,fade:xt,fadeVisible:St,fadeVisibleOnce:Ct,pop:wt,popVisible:Tt,popVisibleOnce:Et,rollBottom:It,rollLeft:Dt,rollRight:At,rollTop:Nt,rollVisibleBottom:Lt,rollVisibleLeft:Ot,rollVisibleOnceBottom:Rt,rollVisibleOnceLeft:kt,rollVisibleOnceRight:Mt,rollVisibleOnceTop:Ft,rollVisibleRight:jt,rollVisibleTop:Pt,slideBottom:Jt,slideLeft:zt,slideRight:Ht,slideTop:Gt,slideVisibleBottom:Yt,slideVisibleLeft:Bt,slideVisibleOnceBottom:Xt,slideVisibleOnceLeft:Vt,slideVisibleOnceRight:Wt,slideVisibleOnceTop:qt,slideVisibleRight:Ut,slideVisibleTop:Kt},Qt=Symbol(``),$t={preset:{type:String,required:!1},instance:{type:Object,required:!1},variants:{type:Object,required:!1},initial:{type:Object,required:!1},enter:{type:Object,required:!1},leave:{type:Object,required:!1},visible:{type:Object,required:!1},visibleOnce:{type:Object,required:!1},hovered:{type:Object,required:!1},tapped:{type:Object,required:!1},focused:{type:Object,required:!1},delay:{type:[Number,String],required:!1},duration:{type:[Number,String],required:!1}};function en(e){return Object.prototype.toString.call(e)===`[object Object]`}function $(e){if(Array.isArray(e))return e.map($);if(en(e)){let t={};for(let n in e)t[n]=$(e[n]);return t}return e}function tn(e){let t=w({}),n=pe(Qt,{}),r=f(()=>e.preset==null?{}:n!=null&&e.preset in n?structuredClone(Se(n)[e.preset]):e.preset in Zt?structuredClone(Zt[e.preset]):{}),i=f(()=>({initial:e.initial,enter:e.enter,leave:e.leave,visible:e.visible,visibleOnce:e.visibleOnce,hovered:e.hovered,tapped:e.tapped,focused:e.focused}));function a(e,t){for(let n of[`delay`,`duration`]){if(t[n]==null)continue;let r=Number.parseInt(t[n]);for(let t of[`enter`,`visible`,`visibleOnce`]){let i=e[t];if(i==null)continue;i.transition??={},i.transition[n]=r}}return e}let o=f(()=>{let t=oe({},i.value,r.value,e.variants||{});return a({...t},e)});function s(e,n,r){var i;e.props??={},(i=e.props).style??(i.style={}),e.props.style={...e.props.style,...r};let s=a($(o.value),e.props);return e.props.onVnodeMounted=({el:e})=>{t[n]=vt(e,s)},e.props.onVnodeUpdated=({el:e})=>{let r=Q(t[n].state);for(let[t,n]of Object.entries(r))e.style[t]=n},e}return{motionConfig:o,setNodeInstance:s}}const nn=_({name:`Motion`,props:{...$t,is:{type:[String,Object],default:`div`}},setup(e){let t=j(),{motionConfig:n,setNodeInstance:r}=tn(e);return()=>{let i=Q(n.value.initial||{}),a=b(e.is,void 0,t);return r(a,0,i),a}}}),rn=_({name:`MotionGroup`,props:{...$t,is:{type:[String,Object],required:!1}},setup(e){let n=j(),{motionConfig:r,setNodeInstance:i}=tn(e);return()=>{var a;let o=Q(r.value.initial||{}),s=(a=n.default)?.call(n)||[];for(let e=0;e{await c(`initial`),await c(`enter`)}),be(async()=>{await c(`leave`),s.value=!0}),M([()=>t.title,()=>t.subtitle,r],async()=>{await c(`leave`),await ge(),s.value=t.disableBackButton,a.value=t.title,o.value=t.subtitle,await ge(),await c(`initial`),await c(`enter`)}),(t,r)=>(x(),h(`div`,{ref_key:`pageHeaderRef`,ref:i,style:{top:`env(safe-area-inset-top, 0px)`,right:`env(safe-area-inset-right, 0px)`,left:`env(safe-area-inset-left, 0px)`},sticky:``,"inset-x-0":``,"top-0":``,"z-99":``,"w-full":``,"pb-6":``,"pt-10":``,flex:`~ row items-center gap-2`,bg:`$bg-color`},[p(`button`,{onClick:r[0]||=e=>O(n).back()},[s.value?m(``,!0):(x(),h(`div`,{key:0,"i-solar:alt-arrow-left-line-duotone":``,"text-2xl":``,class:_e({"pointer-events-none op-0":!e.showBackButton})},null,2))]),p(`h1`,an,[o.value?(x(),h(`div`,on,[p(`span`,sn,D(o.value),1)])):m(``,!0),p(`div`,cn,D(a.value),1)])],512))}}),un=ln;const dn={style:{paddingBottom:`env(safe-area-inset-bottom, 0px)`,paddingTop:`env(safe-area-inset-top, 0px)`,paddingRight:`env(safe-area-inset-right, 0px)`,paddingLeft:`env(safe-area-inset-left, 0px)`}},fn={class:`px-0 py-1 md:px-3 md:py-3`,"w-full":``,"gap-2":``,bg:`$bg-color`},pn={class:`px-3 py-2 md:px-5 md:py-5`,flex:`~ col`,"mx-auto":``,"max-w-screen-xl":``};var mn=_({__name:`settings`,setup(e){let t=A(),{t:r}=Te(),i=ke(),{allProvidersMetadata:a}=xe(i),o=f(()=>{let e={"/settings/airi-card":{subtitle:r(`settings.title`),title:r(`settings.pages.card.title`)},"/settings/appearance":{subtitle:r(`settings.title`),title:r(`settings.pages.themes.title`)},"/settings/appearance/general":{subtitle:r(`settings.title`),title:r(`settings.pages.themes.general.title`)},"/settings/appearance/color-scheme":{subtitle:r(`settings.title`),title:r(`settings.pages.themes.color-scheme.title`)},"/settings/appearance/developer":{subtitle:r(`settings.title`),title:r(`settings.pages.themes.developer.title`)},"/settings/memory":{subtitle:r(`settings.title`),title:r(`settings.pages.memory.title`)},"/settings/models":{subtitle:r(`settings.title`),title:r(`settings.pages.models.title`)},"/settings/modules":{subtitle:r(`settings.title`),title:r(`settings.pages.modules.title`)},"/settings/modules/consciousness":{subtitle:r(`settings.title`),title:r(`settings.pages.modules.consciousness.title`)},"/settings/modules/speech":{subtitle:r(`settings.title`),title:r(`settings.pages.modules.speech.title`)},"/settings/modules/hearing":{subtitle:r(`settings.title`),title:r(`settings.pages.modules.hearing.title`)},"/settings/modules/memory-short-term":{subtitle:r(`settings.title`),title:r(`settings.pages.modules.memory-short-term.title`)},"/settings/modules/memory-long-term":{subtitle:r(`settings.title`),title:r(`settings.pages.modules.memory-long-term.title`)},"/settings/modules/messaging-discord":{subtitle:r(`settings.title`),title:r(`settings.pages.modules.messaging-discord.title`)},"/settings/modules/x":{subtitle:r(`settings.title`),title:r(`settings.pages.modules.x.title`)},"/settings/modules/gaming-minecraft":{subtitle:r(`settings.title`),title:r(`settings.pages.modules.gaming-minecraft.title`)},"/settings/modules/gaming-factorio":{subtitle:r(`settings.title`),title:r(`settings.pages.modules.gaming-factorio.title`)},"/settings/providers":{subtitle:r(`settings.title`),title:r(`settings.pages.providers.title`)},"/settings/scene":{subtitle:r(`settings.title`),title:r(`settings.pages.scene.title`)},"/settings":{title:r(`settings.title`)}};for(let t of a.value)e[`/settings/providers/${t.id}`]={subtitle:r(`settings.title`),title:r(t.nameKey)};return e}),s=f(()=>o.value[t.path]);return(e,t)=>{var r,i;return x(),h(`div`,dn,[p(`div`,fn,[g(Ae)]),p(`div`,pn,[g(O(un),{title:(r=s.value)?.title,subtitle:(i=s.value)?.subtitle},null,8,[`title`,`subtitle`]),g(O(n))])])}}}),hn=mn;export{hn as default}; \ No newline at end of file +var e=function(exports){function t(e){"@babel/helpers - typeof";return t=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},t(e)}function n(e,n){if(t(e)!=`object`||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,n||`default`);if(t(i)!=`object`)return i;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(n===`string`?String:Number)(e)}function r(e){var r=n(e,`string`);return t(r)==`symbol`?r:r+``}function i(e,t,n){return(t=r(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}return exports.defineProperty=i,exports}({});import{Fragment as t,RouterView as n,alpha as r,animate as i,anticipate as a,backIn as o,backInOut as s,backOut as c,bounceIn as l,bounceInOut as u,bounceOut as ee,circIn as te,circInOut as ne,circOut as re,color as d,complex as ie,computed as f,createBaseVNode as p,createCommentVNode as m,createElementBlock as h,createVNode as g,cubicBezier as ae,defineComponent as _,defu as oe,degrees as v,easeIn as se,easeInOut as ce,easeOut as le,es_default as ue,filter as y,getFrameData as de,h as b,inertia as fe,inject as pe,isObject as me,linear as he,nextTick as ge,normalizeClass as _e,number as ve,onMounted as ye,onUnmounted as be,openBlock as x,progressPercentage as S,px as C,reactive as w,ref as T,scale as E,storeToRefs as xe,toDisplayString as D,toRaw as Se,tryOnUnmounted as Ce,unref as O,unrefElement as we,useEventListener as k,useI18n as Te,useIntersectionObserver as Ee,useRoute as A,useRouter as De,useSlots as j,velocityPerSecond as Oe,watch as M}from"./index-CsmT0L1K.js";import"./import-url-browser-DNuYZxPr.js";import"./duckdb-mvp-C3i5IjU8.js";import"./index-CISmcbXk-C9oju49Y.js";import"./types-AwjH7X1C.js";import{useProvidersStore as ke}from"./stores-2H61GqXP.js";import"./__vite-browser-external-DPh5tFvT.js";import{HeaderLink_default as Ae}from"./HeaderLink-Dws9YKmo.js";import"./Button-D3cjyOEe.js";import"./src-C1Sr0aqN.js";import"./components-DHUA669a.js";import"./composables-CgcEyUWo.js";import"./sleep-CvjNLutj.js";import"./queue-B0kER5Ap.js";import"./queues-hSEKEE3F.js";import"./dist-Cr2QBfS4.js";import"./webgpu-Nt9hTBpW.js";const N={BASE_URL:`/`,DEV:!1,MODE:`production`,PROD:!0,SSR:!1,VITE_APP_TARGET_HUGGINGFACE_SPACE:`true`};var je=class{constructor(){e.defineProperty(this,`subscriptions`,new Set)}add(e){return this.subscriptions.add(e),()=>this.subscriptions.delete(e)}notify(e,t,n){if(this.subscriptions.size)for(let r of this.subscriptions)r(e,t,n)}clear(){this.subscriptions.clear()}};function P(e){return!Number.isNaN(Number.parseFloat(e))}var Me=class{constructor(t){e.defineProperty(this,`current`,void 0),e.defineProperty(this,`prev`,void 0),e.defineProperty(this,`timeDelta`,0),e.defineProperty(this,`lastUpdated`,0),e.defineProperty(this,`updateSubscribers`,new je),e.defineProperty(this,`stopAnimation`,void 0),e.defineProperty(this,`canTrackVelocity`,!1),e.defineProperty(this,`updateAndNotify`,e=>{this.prev=this.current,this.current=e;let{delta:t,timestamp:n}=de();this.lastUpdated!==n&&(this.timeDelta=t,this.lastUpdated=n),ue.postRender(this.scheduleVelocityCheck),this.updateSubscribers.notify(this.current)}),e.defineProperty(this,`scheduleVelocityCheck`,()=>ue.postRender(this.velocityCheck)),e.defineProperty(this,`velocityCheck`,({timestamp:e})=>{this.canTrackVelocity||=P(this.current),e!==this.lastUpdated&&(this.prev=this.current)}),this.prev=this.current=t,this.canTrackVelocity=P(this.current)}onChange(e){return this.updateSubscribers.add(e)}clearListeners(){this.updateSubscribers.clear()}set(e){this.updateAndNotify(e)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?Oe(Number.parseFloat(this.current)-Number.parseFloat(this.prev),this.timeDelta):0}start(e){return this.stop(),new Promise(t=>{let{stop:n}=e(t);this.stopAnimation=n}).then(()=>this.clearAnimation())}stop(){this.stopAnimation&&this.stopAnimation(),this.clearAnimation()}isAnimating(){return!!this.stopAnimation}clearAnimation(){this.stopAnimation=null}destroy(){this.updateSubscribers.clear(),this.stop()}};function Ne(e){return new Me(e)}const{isArray:Pe}=Array;function Fe(){let e=T({}),t=t=>{let n=t=>{e.value[t]&&(e.value[t].stop(),e.value[t].destroy(),delete e.value[t])};t?Pe(t)?t.forEach(n):n(t):Object.keys(e.value).forEach(n)},n=(t,n,r)=>{if(e.value[t])return e.value[t];let i=Ne(n);return i.onChange(e=>r[t]=e),e.value[t]=i,i};return Ce(t),{motionValues:e,get:n,stop:t}}function Ie(e){return Array.isArray(e)}function F(){return{type:`spring`,stiffness:500,damping:25,restDelta:.5,restSpeed:10}}function I(e){return{type:`spring`,stiffness:550,damping:e===0?2*Math.sqrt(550):30,restDelta:.01,restSpeed:10}}function Le(e){return{type:`spring`,stiffness:550,damping:e===0?100:30,restDelta:.01,restSpeed:10}}function L(){return{type:`keyframes`,ease:`linear`,duration:300}}function Re(e){return{type:`keyframes`,duration:800,values:e}}const R={default:Le,x:F,y:F,z:F,rotate:F,rotateX:F,rotateY:F,rotateZ:F,scaleX:I,scaleY:I,scale:I,backgroundColor:L,color:L,opacity:L};function z(e,t){let n;return n=Ie(t)?Re:R[e]||R.default,{to:t,...n(t)}}const B={...ve,transform:Math.round},V={color:d,backgroundColor:d,outlineColor:d,fill:d,stroke:d,borderColor:d,borderTopColor:d,borderRightColor:d,borderBottomColor:d,borderLeftColor:d,borderWidth:C,borderTopWidth:C,borderRightWidth:C,borderBottomWidth:C,borderLeftWidth:C,borderRadius:C,radius:C,borderTopLeftRadius:C,borderTopRightRadius:C,borderBottomRightRadius:C,borderBottomLeftRadius:C,width:C,maxWidth:C,height:C,maxHeight:C,size:C,top:C,right:C,bottom:C,left:C,padding:C,paddingTop:C,paddingRight:C,paddingBottom:C,paddingLeft:C,margin:C,marginTop:C,marginRight:C,marginBottom:C,marginLeft:C,rotate:v,rotateX:v,rotateY:v,rotateZ:v,scale:E,scaleX:E,scaleY:E,scaleZ:E,skew:v,skewX:v,skewY:v,distance:C,translateX:C,translateY:C,translateZ:C,x:C,y:C,z:C,perspective:C,transformPerspective:C,opacity:r,originX:S,originY:S,originZ:C,zIndex:B,filter:y,WebkitFilter:y,fillOpacity:r,strokeOpacity:r,numOctaves:B},H=e=>V[e];function U(e,t){return t&&typeof e==`number`&&t.transform?t.transform(e):e}function ze(e,t){let n=H(e);return n!==y&&(n=ie),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const Be={linear:he,easeIn:se,easeInOut:ce,easeOut:le,circIn:te,circInOut:ne,circOut:re,backIn:o,backInOut:s,backOut:c,anticipate:a,bounceIn:l,bounceInOut:u,bounceOut:ee};function W(e){if(Array.isArray(e)){let[t,n,r,i]=e;return ae(t,n,r,i)}else if(typeof e==`string`)return Be[e];return e}function Ve(e){return Array.isArray(e)&&typeof e[0]!=`number`}function G(e,t){return e===`zIndex`?!1:!!(typeof t==`number`||Array.isArray(t)||typeof t==`string`&&ie.test(t)&&!t.startsWith(`url(`))}function He(e){return Array.isArray(e.to)&&e.to[0]===null&&(e.to=[...e.to],e.to[0]=e.from),e}function Ue({ease:e,times:t,delay:n,...r}){let i={...r};return t&&(i.offset=t),e&&(i.ease=Ve(e)?e.map(W):W(e)),n&&(i.elapsed=-n),i}function We(e,t,n){return Array.isArray(t.to)&&(e.duration||=800),He(t),Ge(e)||(e={...e,...z(n,t.to)}),{...t,...Ue(e)}}function Ge({delay:e,repeat:t,repeatType:n,repeatDelay:r,from:i,...a}){return!!Object.keys(a).length}function Ke(e,t){return e[t]||e.default||e}function qe(e,t,n,r,a){let o=Ke(r,e),s=o.from===null||o.from===void 0?t.get():o.from,c=G(e,n);s===`none`&&c&&typeof n==`string`&&(s=ze(e,n));let l=G(e,s);function u(c){let l={from:s,to:n,velocity:r.velocity?r.velocity:t.getVelocity(),onUpdate:e=>t.set(e)};return o.type===`inertia`||o.type===`decay`?fe({...l,...o}):i({...We(o,l,e),onUpdate:e=>{l.onUpdate(e),o.onUpdate&&o.onUpdate(e)},onComplete:()=>{a&&a(),c&&c()}})}function ee(e){return t.set(n),a&&a(),e&&e(),{stop:()=>{}}}return!l||!c||o.type===!1?ee:u}function Je(){let{motionValues:e,stop:t,get:n}=Fe(),r=(e,t,r,i={},a)=>{let o=r[e],s=n(e,o,r);if(i&&i.immediate){s.set(t);return}let c=qe(e,s,t,i,a);s.start(c)};return{motionValues:e,stop:t,push:r}}function Ye(e,t={},{motionValues:n,push:r,stop:i}=Je()){let a=O(t),o=T(!1);M(n,e=>{o.value=Object.values(e).filter(e=>e.isAnimating()).length>0},{immediate:!0,deep:!0});let s=e=>{if(!a||!a[e])throw Error(`The variant ${e} does not exist.`);return a[e]},c=t=>{typeof t==`string`&&(t=s(t));let n=Object.entries(t).map(([n,i])=>{if(n!==`transition`)return new Promise(a=>r(n,i,e,t.transition||z(n,t[n]),a))}).filter(Boolean);async function i(){var e,r;await Promise.all(n),(e=t.transition)==null||(r=e.onComplete)==null||r.call(e)}return Promise.all([i()])},l=t=>{let n=me(t)?t:s(t);Object.entries(n).forEach(([t,n])=>{t!==`transition`&&r(t,n,e,{immediate:!0})})},u=async e=>{let t;if(a&&(a.leave&&(t=a.leave),!a.leave&&a.initial&&(t=a.initial)),!t){e();return}await c(t),e()};return{isAnimating:o,apply:c,set:l,leave:u,stop:i}}const K=typeof window<`u`,Xe=()=>K&&(window.onpointerdown===null||N?.TEST),Ze=()=>K&&(window.ontouchstart===null||N?.TEST),Qe=()=>K&&(window.onmousedown===null||N?.TEST);function $e({target:e,state:t,variants:n,apply:r}){let i=O(n),a=T(!1),o=T(!1),s=T(!1),c=f(()=>{let e=[...Object.keys(t.value||{})];return i?(i.hovered&&(e=[...e,...Object.keys(i.hovered)]),i.tapped&&(e=[...e,...Object.keys(i.tapped)]),i.focused&&(e=[...e,...Object.keys(i.focused)]),e):e}),l=f(()=>{let e={};for(let n in Object.assign(e,t.value),a.value&&i.hovered&&Object.assign(e,i.hovered),o.value&&i.tapped&&Object.assign(e,i.tapped),s.value&&i.focused&&Object.assign(e,i.focused),e)c.value.includes(n)||delete e[n];return e});i.hovered&&(k(e,`mouseenter`,()=>a.value=!0),k(e,`mouseleave`,()=>{a.value=!1,o.value=!1})),i.tapped&&(Qe()&&(k(e,`mousedown`,()=>o.value=!0),k(e,`mouseup`,()=>o.value=!1)),Xe()&&(k(e,`pointerdown`,()=>o.value=!0),k(e,`pointerup`,()=>o.value=!1)),Ze()&&(k(e,`touchstart`,()=>o.value=!0),k(e,`touchend`,()=>o.value=!1))),i.focused&&(k(e,`focus`,()=>s.value=!0),k(e,`blur`,()=>s.value=!1)),M([a,o,s],()=>{r(l.value)})}function et({set:e,target:t,variants:n,variant:r}){let i=O(n);M(()=>t,()=>{i&&(i.initial&&(e(`initial`),r.value=`initial`),i.enter&&(r.value=`enter`))},{immediate:!0,flush:`pre`})}function tt({state:e,apply:t}){M(e,e=>{e&&t(e)},{immediate:!0})}function nt({target:e,variants:t,variant:n}){let r=O(t);r&&(r.visible||r.visibleOnce)&&Ee(e,([{isIntersecting:e}])=>{r.visible?e?n.value=`visible`:n.value=`initial`:r.visibleOnce&&(e&&n.value!==`visibleOnce`?n.value=`visibleOnce`:n.value||=`initial`)})}function rt(e,t={syncVariants:!0,lifeCycleHooks:!0,visibilityHooks:!0,eventListeners:!0}){t.lifeCycleHooks&&et(e),t.syncVariants&&tt(e),t.visibilityHooks&&nt(e),t.eventListeners&&$e(e)}function q(e={}){let t=w({...e}),n=T({});return M(t,()=>{let e={};for(let[n,r]of Object.entries(t)){let t=H(n),i=U(r,t);e[n]=i}n.value=e},{immediate:!0,deep:!0}),{state:t,style:n}}function J(e,t){M(()=>we(e),e=>{e&&t(e)},{immediate:!0})}const it={x:`translateX`,y:`translateY`,z:`translateZ`};function Y(e={},t=!0){let n=w({...e}),r=T(``);return M(n,e=>{let n=``,i=!1;if(t&&(e.x||e.y||e.z)){let t=[e.x||0,e.y||0,e.z||0].map(e=>U(e,C)).join(`,`);n+=`translate3d(${t}) `,i=!0}for(let[r,i]of Object.entries(e)){if(t&&(r===`x`||r===`y`||r===`z`))continue;let e=H(r),a=U(i,e);n+=`${it[r]||r}(${a}) `}t&&!i&&(n+=`translateZ(0px) `),r.value=n.trim()},{immediate:!0,deep:!0}),{state:n,transform:r}}const at=[``,`X`,`Y`,`Z`],ot=[`perspective`,`translate`,`scale`,`rotate`,`skew`],X=[`transformPerspective`,`x`,`y`,`z`];ot.forEach(e=>{at.forEach(t=>{let n=e+t;X.push(n)})});const st=new Set(X);function Z(e){return st.has(e)}const ct=new Set([`originX`,`originY`,`originZ`]);function lt(e){return ct.has(e)}function ut(e){let t={},n={};return Object.entries(e).forEach(([e,r])=>{Z(e)||lt(e)?t[e]=r:n[e]=r}),{transform:t,style:n}}function Q(e){let{transform:t,style:n}=ut(e),{transform:r}=Y(t),{style:i}=q(n);return r.value&&(i.value.transform=r.value),i.value}function dt(e,t){let n,r,{state:i,style:a}=q();return J(e,e=>{r=e;for(let t of Object.keys(V)){if(e.style[t]===null||e.style[t]===``||Z(t)||lt(t))continue;i[t]=e.style[t]}n&&Object.entries(n).forEach(([t,n])=>e.style[t]=n),t&&t(i)}),M(a,e=>{if(!r){n=e;return}for(let t in e)r.style[t]=e[t]},{immediate:!0}),{style:i}}function ft(e){let t=e.trim().split(/\) |\)/);if(t.length===1)return{};let n=e=>e.endsWith(`px`)||e.endsWith(`deg`)?Number.parseFloat(e):Number.isNaN(Number(e))?Number(e):e;return t.reduce((e,t)=>{if(!t)return e;let[r,i]=t.split(`(`),a=i.split(`,`),o=a.map(e=>n(e.endsWith(`)`)?e.replace(`)`,``):e.trim())),s=o.length===1?o[0]:o;return{...e,[r]:s}},{})}function pt(e,t){Object.entries(ft(t)).forEach(([t,n])=>{let r=[`x`,`y`,`z`];if(t===`translate3d`){if(n===0){r.forEach(t=>e[t]=0);return}n.forEach((t,n)=>e[r[n]]=t);return}if(n=Number.parseFloat(`${n}`),t===`translateX`){e.x=n;return}if(t===`translateY`){e.y=n;return}if(t===`translateZ`){e.z=n;return}e[t]=n})}function mt(e,t){let n,r,{state:i,transform:a}=Y();return J(e,e=>{r=e,e.style.transform&&pt(i,e.style.transform),n&&(e.style.transform=n),t&&t(i)}),M(a,e=>{if(!r){n=e;return}r.style.transform=e},{immediate:!0}),{transform:i}}function ht(e){return Object.entries(e)}function gt(e,t){let n=w({}),r=e=>Object.entries(e).forEach(([e,t])=>n[e]=t),{style:i}=dt(e,r),{transform:a}=mt(e,r);return M(n,e=>{ht(e).forEach(([e,t])=>{let n=Z(e)?a:i;n[e]&&n[e]===t||(n[e]=t)})},{immediate:!0,deep:!0}),J(e,()=>t&&r(t)),{motionProperties:n,style:i,transform:a}}function _t(e={}){let t=O(e),n=T(),r=f(()=>{if(n.value)return t[n.value]});return{state:r,variant:n}}function vt(e,t={},n){let{motionProperties:r}=gt(e),{variant:i,state:a}=_t(t),o=Ye(r,t),s={target:e,variant:i,variants:t,state:a,motionProperties:r,...o};return rt(s,n),s}const yt=[`delay`,`duration`],bt=[`initial`,`enter`,`leave`,`visible`,`visible-once`,`visibleOnce`,`hovered`,`tapped`,`focused`,...yt],xt={initial:{opacity:0},enter:{opacity:1}},St={initial:{opacity:0},visible:{opacity:1}},Ct={initial:{opacity:0},visibleOnce:{opacity:1}},wt={initial:{scale:0,opacity:0},enter:{scale:1,opacity:1}},Tt={initial:{scale:0,opacity:0},visible:{scale:1,opacity:1}},Et={initial:{scale:0,opacity:0},visibleOnce:{scale:1,opacity:1}},Dt={initial:{x:-100,rotate:90,opacity:0},enter:{x:0,rotate:0,opacity:1}},Ot={initial:{x:-100,rotate:90,opacity:0},visible:{x:0,rotate:0,opacity:1}},kt={initial:{x:-100,rotate:90,opacity:0},visibleOnce:{x:0,rotate:0,opacity:1}},At={initial:{x:100,rotate:-90,opacity:0},enter:{x:0,rotate:0,opacity:1}},jt={initial:{x:100,rotate:-90,opacity:0},visible:{x:0,rotate:0,opacity:1}},Mt={initial:{x:100,rotate:-90,opacity:0},visibleOnce:{x:0,rotate:0,opacity:1}},Nt={initial:{y:-100,rotate:-90,opacity:0},enter:{y:0,rotate:0,opacity:1}},Pt={initial:{y:-100,rotate:-90,opacity:0},visible:{y:0,rotate:0,opacity:1}},Ft={initial:{y:-100,rotate:-90,opacity:0},visibleOnce:{y:0,rotate:0,opacity:1}},It={initial:{y:100,rotate:90,opacity:0},enter:{y:0,rotate:0,opacity:1}},Lt={initial:{y:100,rotate:90,opacity:0},visible:{y:0,rotate:0,opacity:1}},Rt={initial:{y:100,rotate:90,opacity:0},visibleOnce:{y:0,rotate:0,opacity:1}},zt={initial:{x:-100,opacity:0},enter:{x:0,opacity:1}},Bt={initial:{x:-100,opacity:0},visible:{x:0,opacity:1}},Vt={initial:{x:-100,opacity:0},visibleOnce:{x:0,opacity:1}},Ht={initial:{x:100,opacity:0},enter:{x:0,opacity:1}},Ut={initial:{x:100,opacity:0},visible:{x:0,opacity:1}},Wt={initial:{x:100,opacity:0},visibleOnce:{x:0,opacity:1}},Gt={initial:{y:-100,opacity:0},enter:{y:0,opacity:1}},Kt={initial:{y:-100,opacity:0},visible:{y:0,opacity:1}},qt={initial:{y:-100,opacity:0},visibleOnce:{y:0,opacity:1}},Jt={initial:{y:100,opacity:0},enter:{y:0,opacity:1}},Yt={initial:{y:100,opacity:0},visible:{y:0,opacity:1}},Xt={initial:{y:100,opacity:0},visibleOnce:{y:0,opacity:1}},Zt={__proto__:null,fade:xt,fadeVisible:St,fadeVisibleOnce:Ct,pop:wt,popVisible:Tt,popVisibleOnce:Et,rollBottom:It,rollLeft:Dt,rollRight:At,rollTop:Nt,rollVisibleBottom:Lt,rollVisibleLeft:Ot,rollVisibleOnceBottom:Rt,rollVisibleOnceLeft:kt,rollVisibleOnceRight:Mt,rollVisibleOnceTop:Ft,rollVisibleRight:jt,rollVisibleTop:Pt,slideBottom:Jt,slideLeft:zt,slideRight:Ht,slideTop:Gt,slideVisibleBottom:Yt,slideVisibleLeft:Bt,slideVisibleOnceBottom:Xt,slideVisibleOnceLeft:Vt,slideVisibleOnceRight:Wt,slideVisibleOnceTop:qt,slideVisibleRight:Ut,slideVisibleTop:Kt},Qt=Symbol(``),$t={preset:{type:String,required:!1},instance:{type:Object,required:!1},variants:{type:Object,required:!1},initial:{type:Object,required:!1},enter:{type:Object,required:!1},leave:{type:Object,required:!1},visible:{type:Object,required:!1},visibleOnce:{type:Object,required:!1},hovered:{type:Object,required:!1},tapped:{type:Object,required:!1},focused:{type:Object,required:!1},delay:{type:[Number,String],required:!1},duration:{type:[Number,String],required:!1}};function en(e){return Object.prototype.toString.call(e)===`[object Object]`}function $(e){if(Array.isArray(e))return e.map($);if(en(e)){let t={};for(let n in e)t[n]=$(e[n]);return t}return e}function tn(e){let t=w({}),n=pe(Qt,{}),r=f(()=>e.preset==null?{}:n!=null&&e.preset in n?structuredClone(Se(n)[e.preset]):e.preset in Zt?structuredClone(Zt[e.preset]):{}),i=f(()=>({initial:e.initial,enter:e.enter,leave:e.leave,visible:e.visible,visibleOnce:e.visibleOnce,hovered:e.hovered,tapped:e.tapped,focused:e.focused}));function a(e,t){for(let n of[`delay`,`duration`]){if(t[n]==null)continue;let r=Number.parseInt(t[n]);for(let t of[`enter`,`visible`,`visibleOnce`]){let i=e[t];if(i==null)continue;i.transition??={},i.transition[n]=r}}return e}let o=f(()=>{let t=oe({},i.value,r.value,e.variants||{});return a({...t},e)});function s(e,n,r){var i;e.props??={},(i=e.props).style??(i.style={}),e.props.style={...e.props.style,...r};let s=a($(o.value),e.props);return e.props.onVnodeMounted=({el:e})=>{t[n]=vt(e,s)},e.props.onVnodeUpdated=({el:e})=>{let r=Q(t[n].state);for(let[t,n]of Object.entries(r))e.style[t]=n},e}return{motionConfig:o,setNodeInstance:s}}const nn=_({name:`Motion`,props:{...$t,is:{type:[String,Object],default:`div`}},setup(e){let t=j(),{motionConfig:n,setNodeInstance:r}=tn(e);return()=>{let i=Q(n.value.initial||{}),a=b(e.is,void 0,t);return r(a,0,i),a}}}),rn=_({name:`MotionGroup`,props:{...$t,is:{type:[String,Object],required:!1}},setup(e){let n=j(),{motionConfig:r,setNodeInstance:i}=tn(e);return()=>{var a;let o=Q(r.value.initial||{}),s=(a=n.default)?.call(n)||[];for(let e=0;e{await c(`initial`),await c(`enter`)}),be(async()=>{await c(`leave`),s.value=!0}),M([()=>t.title,()=>t.subtitle,r],async()=>{await c(`leave`),await ge(),s.value=t.disableBackButton,a.value=t.title,o.value=t.subtitle,await ge(),await c(`initial`),await c(`enter`)}),(t,r)=>(x(),h(`div`,{ref_key:`pageHeaderRef`,ref:i,style:{top:`env(safe-area-inset-top, 0px)`,right:`env(safe-area-inset-right, 0px)`,left:`env(safe-area-inset-left, 0px)`},sticky:``,"inset-x-0":``,"top-0":``,"z-99":``,"w-full":``,"pb-6":``,"pt-10":``,flex:`~ row items-center gap-2`,bg:`$bg-color`},[p(`button`,{onClick:r[0]||=e=>O(n).back()},[s.value?m(``,!0):(x(),h(`div`,{key:0,"i-solar:alt-arrow-left-line-duotone":``,"text-2xl":``,class:_e({"pointer-events-none op-0":!e.showBackButton})},null,2))]),p(`h1`,an,[o.value?(x(),h(`div`,on,[p(`span`,sn,D(o.value),1)])):m(``,!0),p(`div`,cn,D(a.value),1)])],512))}}),un=ln;const dn={style:{paddingBottom:`env(safe-area-inset-bottom, 0px)`,paddingTop:`env(safe-area-inset-top, 0px)`,paddingRight:`env(safe-area-inset-right, 0px)`,paddingLeft:`env(safe-area-inset-left, 0px)`}},fn={class:`px-0 py-1 md:px-3 md:py-3`,"w-full":``,"gap-2":``,bg:`$bg-color`},pn={class:`px-3 py-2 md:px-5 md:py-5`,flex:`~ col`,"mx-auto":``,"max-w-screen-xl":``};var mn=_({__name:`settings`,setup(e){let t=A(),{t:r}=Te(),i=ke(),{allProvidersMetadata:a}=xe(i),o=f(()=>{let e={"/settings/airi-card":{subtitle:r(`settings.title`),title:r(`settings.pages.card.title`)},"/settings/appearance":{subtitle:r(`settings.title`),title:r(`settings.pages.themes.title`)},"/settings/appearance/general":{subtitle:r(`settings.title`),title:r(`settings.pages.themes.general.title`)},"/settings/appearance/color-scheme":{subtitle:r(`settings.title`),title:r(`settings.pages.themes.color-scheme.title`)},"/settings/appearance/developer":{subtitle:r(`settings.title`),title:r(`settings.pages.themes.developer.title`)},"/settings/memory":{subtitle:r(`settings.title`),title:r(`settings.pages.memory.title`)},"/settings/models":{subtitle:r(`settings.title`),title:r(`settings.pages.models.title`)},"/settings/modules":{subtitle:r(`settings.title`),title:r(`settings.pages.modules.title`)},"/settings/modules/consciousness":{subtitle:r(`settings.title`),title:r(`settings.pages.modules.consciousness.title`)},"/settings/modules/speech":{subtitle:r(`settings.title`),title:r(`settings.pages.modules.speech.title`)},"/settings/modules/hearing":{subtitle:r(`settings.title`),title:r(`settings.pages.modules.hearing.title`)},"/settings/modules/memory-short-term":{subtitle:r(`settings.title`),title:r(`settings.pages.modules.memory-short-term.title`)},"/settings/modules/memory-long-term":{subtitle:r(`settings.title`),title:r(`settings.pages.modules.memory-long-term.title`)},"/settings/modules/messaging-discord":{subtitle:r(`settings.title`),title:r(`settings.pages.modules.messaging-discord.title`)},"/settings/modules/x":{subtitle:r(`settings.title`),title:r(`settings.pages.modules.x.title`)},"/settings/modules/gaming-minecraft":{subtitle:r(`settings.title`),title:r(`settings.pages.modules.gaming-minecraft.title`)},"/settings/modules/gaming-factorio":{subtitle:r(`settings.title`),title:r(`settings.pages.modules.gaming-factorio.title`)},"/settings/providers":{subtitle:r(`settings.title`),title:r(`settings.pages.providers.title`)},"/settings/scene":{subtitle:r(`settings.title`),title:r(`settings.pages.scene.title`)},"/settings":{title:r(`settings.title`)}};for(let t of a.value)e[`/settings/providers/${t.id}`]={subtitle:r(`settings.title`),title:r(t.nameKey)};return e}),s=f(()=>o.value[t.path]);return(e,t)=>{var r,i;return x(),h(`div`,dn,[p(`div`,fn,[g(Ae)]),p(`div`,pn,[g(O(un),{title:(r=s.value)?.title,subtitle:(i=s.value)?.subtitle},null,8,[`title`,`subtitle`]),g(O(n))])])}}}),hn=mn;export{hn as default}; \ No newline at end of file diff --git a/assets/speech-Dg1E0ZUG.js b/assets/speech-BXW9V0KE.js similarity index 96% rename from assets/speech-Dg1E0ZUG.js rename to assets/speech-BXW9V0KE.js index 29c607a53e13e95103125f4d95bf663aa1677904..ffac187fcb4b69c4e037fba9d3596066a5a74396 100644 --- a/assets/speech-Dg1E0ZUG.js +++ b/assets/speech-BXW9V0KE.js @@ -1 +1 @@ -import{Fragment as e,RouterLink as t,createBaseVNode as n,createBlock as r,createCommentVNode as i,createElementBlock as a,createVNode as o,defineComponent as ee,isRef as s,normalizeClass as te,onMounted as c,onUnmounted as l,openBlock as u,ref as d,renderList as ne,resolveDirective as re,storeToRefs as f,toDisplayString as p,unref as m,useI18n as ie,vModelSelect as ae,vModelText as oe,watch as se,withCtx as h,withDirectives as g}from"./index-CuCRViVh.js";import"./import-url-browser-DNuYZxPr.js";import"./duckdb-mvp-C3i5IjU8.js";import"./index-CISmcbXk-BkTeNOgG.js";import"./types-AwjH7X1C.js";import{generateSpeech as ce,useProvidersStore as le,useSpeechStore as ue}from"./stores-m0eA85gd.js";import"./__vite-browser-external-CCfYMxZl.js";import{Skeleton_default as _}from"./Button-DFhzbYVt.js";import{FieldCheckbox_default as v,FieldInput_default as de,FieldRange_default as y}from"./src-C2QbIOor.js";import"./Basic-SuYkQxAJ.js";import{Textarea_default as fe}from"./Textarea-D04Ettdn.js";import{RadioCardManySelect_default as pe,RadioCardSimple_default as me,TestDummyMarker_default as he,VoiceCardManySelect_default as ge}from"./components-BFLl4u81.js";import"./composables-Cgvkd8lL.js";import"./sleep-CvjNLutj.js";import"./queue-DAKPJQl1.js";import"./queues-Dstwm1VQ.js";import"./dist-Cr2QBfS4.js";import"./webgpu-Nt9hTBpW.js";import{route_block_default as b}from"./route-block-DNPbw0zT.js";const _e={flex:`~ col md:row gap-6`},ve={bg:`neutral-100 dark:[rgba(0,0,0,0.3)]`,"rounded-xl":``,"p-4":``,flex:`~ col gap-4`,class:`w-full md:w-[40%]`},ye={flex:`~ col gap-4`},be={class:`text-lg text-neutral-500 md:text-2xl dark:text-neutral-400`},xe={text:`neutral-400 dark:neutral-500`},Se={"max-w-full":``},Ce={key:0,flex:`~ row gap-4`,style:{"scrollbar-width":`none`},"min-w-0":``,"of-x-scroll":``,"scroll-smooth":``,role:`radiogroup`},we={key:1},Te={key:0},x={flex:`~ col gap-4`},S={class:`text-lg md:text-2xl`},C={text:`neutral-400 dark:neutral-400`},w={key:0,class:`flex items-center justify-center py-4`},T={key:1,class:`flex items-center gap-3 border border-red-200 rounded-lg bg-red-50 p-4 dark:border-red-800 dark:bg-red-900/20`},E={class:`flex flex-col`},D={class:`font-medium`},O={class:`text-sm text-red-600 dark:text-red-400`},Ee={key:2,class:`flex items-center gap-3 border border-amber-200 rounded-lg bg-amber-50 p-4 dark:border-amber-800 dark:bg-amber-900/20`},De={class:`flex flex-col`},Oe={class:`font-medium`},ke={class:`text-sm text-amber-600 dark:text-amber-400`},Ae={key:0},je={flex:`~ col gap-4`},Me={key:0},Ne={class:`flex flex-col gap-4`},Pe={flex:`~ row gap-4`},Fe={key:1,class:`space-y-6`},Ie={key:2,class:`flex items-center gap-3 border border-2 border-red-200 rounded-lg bg-red-50 p-4 dark:border-red-800 dark:bg-red-900/20`},Le={class:`flex flex-col`},Re={class:`text-sm text-red-600 dark:text-red-400`},ze={key:3,class:`flex items-center gap-3 border border-2 border-amber-200 rounded-lg bg-amber-50 p-4 dark:border-amber-800 dark:bg-amber-900/20`},Be={flex:`~ col gap-4`},Ve={key:4,class:`mt-2 space-y-6`},He={key:0},Ue={flex:`~ col gap-4`},We={flex:`~ col gap-6`,class:`w-full md:w-[60%]`},Ge={"w-full":``,"rounded-xl":``},k={class:`mb-4 text-lg text-neutral-500 md:text-2xl dark:text-neutral-400`,"w-full":``},Ke={class:`inline-flex items-center gap-4`},qe={flex:`~ col gap-4`},Je={flex:`~ row`,"gap-4":``},Ye=[`disabled`],Xe={flex:`~ row`,"items-center":``,"gap-2":``},Ze=[`src`],Qe={text:`neutral-200/50 dark:neutral-600/20`,"pointer-events-none":``,fixed:``,top:`[calc(100dvh-15rem)]`,"bottom-0":``,"right--5":``,"z--1":``,initial:{scale:.9,opacity:0,x:20},enter:{scale:1,opacity:1,x:0},duration:500,"size-60":``,flex:``,"items-center":``,"justify-center":``};var A=ee({__name:`speech`,setup(ee){let{t:b}=ie(),A=le(),j=ue(),{configuredSpeechProvidersMetadata:M}=f(A),{activeSpeechProvider:N,activeSpeechModel:P,activeSpeechVoice:F,activeSpeechVoiceId:I,pitch:L,isLoadingSpeechProviderVoices:$e,supportsModelListing:et,providerModels:R,isLoadingActiveProviderModels:z,activeProviderModelError:B,modelSearchQuery:V,speechProviderError:H,ssmlEnabled:U,availableVoices:W}=f(j),G=d(``),K=d(!1),q=d(`Hello, my name is AI Assistant`),J=d(``),Y=d(!1),X=d(``),Z=d(null),Q=d(``);c(async()=>{await A.loadModelsForConfiguredProviders(),await j.loadVoicesForProvider(N.value)}),se(N,async()=>{await A.loadModelsForConfiguredProviders(),await j.loadVoicesForProvider(N.value)});async function tt(){if(!q.value.trim()&&!K.value||K.value&&!J.value.trim())return;if(!P.value){console.error(`No model selected`);return}if(!F.value){console.error(`No voice selected`);return}let e=A.getProviderInstance(N.value);if(!e){console.error(`Failed to initialize speech provider`);return}let t=A.getProviderConfig(N.value);Y.value=!0,Q.value=``;try{X.value&&$();let n=K.value?J.value:j.generateSSML(q.value,F.value,{...t,pitch:L.value}),r=await ce({...e.speech(P.value,t),input:n,voice:F.value.id});X.value=URL.createObjectURL(new Blob([r])),setTimeout(()=>{Z.value&&Z.value.play()},100)}catch(e){console.error(`Error generating speech:`,e),Q.value=e instanceof Error?e.message:`An unknown error occurred`}finally{Y.value=!1}}function $(){Z.value&&(Z.value.pause(),Z.value.currentTime=0),X.value&&(URL.revokeObjectURL(X.value),X.value=``)}l(()=>{X.value&&URL.revokeObjectURL(X.value)});function nt(e){F.value={id:e,name:e,description:e,previewURL:e,languages:[{code:`en`,title:`English`}],provider:N.value,gender:`male`}}function rt(e){P.value=e}return(ee,c)=>{var l;let d=re(`motion`);return u(),a(e,null,[n(`div`,_e,[n(`div`,ve,[n(`div`,null,[n(`div`,ye,[n(`div`,null,[n(`h2`,be,p(m(b)(`settings.pages.modules.speech.sections.section.provider-voice-selection.title`)),1),n(`div`,xe,[n(`span`,null,p(m(b)(`settings.pages.modules.speech.sections.section.provider-voice-selection.description`)),1)])]),n(`div`,Se,[m(M).length>0?(u(),a(`fieldset`,Ce,[(u(!0),a(e,null,ne(m(M),e=>(u(),r(m(me),{id:e.id,key:e.id,modelValue:m(N),"onUpdate:modelValue":c[0]||=e=>s(N)?N.value=e:null,name:`speech-provider`,value:e.id,title:e.localizedName||`Unknown`,description:e.localizedDescription},null,8,[`id`,`modelValue`,`value`,`title`,`description`]))),128))])):(u(),a(`div`,we,[o(m(t),{class:`flex items-center gap-3 rounded-lg p-4`,border:`2 dashed neutral-200 dark:neutral-800`,bg:`neutral-50 dark:neutral-800`,transition:`colors duration-200 ease-in-out`,to:`/settings/providers`},{default:h(()=>c[13]||=[n(`div`,{"i-solar:warning-circle-line-duotone":``,class:`text-2xl text-amber-500 dark:text-amber-400`},null,-1),n(`div`,{class:`flex flex-col`},[n(`span`,{class:`font-medium`},`No Speech Providers Configured`),n(`span`,{class:`text-sm text-neutral-400 dark:text-neutral-500`},`Click here to set up your speech providers`)],-1),n(`div`,{"i-solar:arrow-right-line-duotone":``,class:`ml-auto text-xl text-neutral-400 dark:text-neutral-500`},null,-1)]),_:1,__:[13]})]))])]),n(`div`,null,[m(N)&&m(et)?(u(),a(`div`,Te,[n(`div`,x,[n(`div`,null,[n(`h2`,S,p(m(b)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.title`)),1),n(`div`,C,[n(`span`,null,p(m(b)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.subtitle`)),1)])]),m(z)?(u(),a(`div`,w,[c[14]||=n(`div`,{class:`mr-2 animate-spin`},[n(`div`,{"i-solar:spinner-line-duotone":``,"text-xl":``})],-1),n(`span`,null,p(m(b)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.loading`)),1)])):m(B)?(u(),a(`div`,T,[c[15]||=n(`div`,{"i-solar:close-circle-line-duotone":``,class:`text-2xl text-red-500 dark:text-red-400`},null,-1),n(`div`,E,[n(`span`,D,p(m(b)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.error`)),1),n(`span`,O,p(m(B)),1)])])):m(R).length===0&&!m(z)?(u(),a(`div`,Ee,[c[16]||=n(`div`,{"i-solar:info-circle-line-duotone":``,class:`text-2xl text-amber-500 dark:text-amber-400`},null,-1),n(`div`,De,[n(`span`,Oe,p(m(b)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.no_models`)),1),n(`span`,ke,p(m(b)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.no_models_description`)),1)])])):m(R).length>0?(u(),r(m(pe),{key:3,modelValue:m(P),"onUpdate:modelValue":c[1]||=e=>s(P)?P.value=e:null,"search-query":m(V),"onUpdate:searchQuery":c[2]||=e=>s(V)?V.value=e:null,items:m(R),searchable:!0,"search-placeholder":m(b)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.search_placeholder`),"search-no-results-title":m(b)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.no_search_results`),"search-no-results-description":m(b)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.no_search_results_description`,{query:m(V)}),"search-results-text":m(b)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.search_results`,{count:`{count}`,total:`{total}`}),"custom-input-placeholder":m(b)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.custom_model_placeholder`),"expand-button-text":m(b)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.expand`),"collapse-button-text":m(b)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.collapse`),"onUpdate:customValue":rt},null,8,[`modelValue`,`search-query`,`items`,`search-placeholder`,`search-no-results-title`,`search-no-results-description`,`search-results-text`,`custom-input-placeholder`,`expand-button-text`,`collapse-button-text`])):i(``,!0)])])):i(``,!0)])]),m(N)?(u(),a(`div`,Ae,[n(`div`,je,[c[27]||=n(`div`,null,[n(`h2`,{class:`text-lg text-neutral-500 md:text-2xl dark:text-neutral-400`},` Voice Configuration `),n(`div`,{text:`neutral-400 dark:neutral-500`},[n(`span`,null,`Customize how your AI assistant speaks`)])],-1),m($e)?(u(),a(`div`,Me,[n(`div`,Ne,[o(m(_),{class:`w-full rounded-lg p-2.5 text-sm`},{default:h(()=>c[17]||=[n(`div`,{class:`h-1lh`},null,-1)]),_:1,__:[17]}),n(`div`,Pe,[o(m(_),{class:`w-full rounded-lg p-4 text-sm`},{default:h(()=>c[18]||=[n(`div`,{class:`h-1lh`},null,-1)]),_:1,__:[18]}),o(m(_),{class:`w-full rounded-lg p-4 text-sm`},{default:h(()=>c[19]||=[n(`div`,{class:`h-1lh`},null,-1)]),_:1,__:[19]}),o(m(_),{class:`w-full rounded-lg p-4 text-sm`},{default:h(()=>c[20]||=[n(`div`,{class:`h-1lh`},null,-1)]),_:1,__:[20]})]),o(m(_),{class:`w-full rounded-lg p-3 text-sm`},{default:h(()=>c[21]||=[n(`div`,{class:`h-1lh`},null,-1)]),_:1,__:[21]})])])):m(W)[m(N)]&&m(W)[m(N)].length>0?(u(),a(`div`,Fe,[o(m(ge),{"search-query":G.value,"onUpdate:searchQuery":c[3]||=e=>G.value=e,"voice-id":m(I),"onUpdate:voiceId":c[4]||=e=>s(I)?I.value=e:null,voices:(l=m(W)[m(N)])?.map(e=>({id:e.id,name:e.name,description:e.description,previewURL:e.previewURL,customizable:!1})),searchable:!0,"search-placeholder":m(b)(`settings.pages.modules.speech.sections.section.provider-voice-selection.search_voices_placeholder`),"search-no-results-title":m(b)(`settings.pages.modules.speech.sections.section.provider-voice-selection.no_voices`),"search-no-results-description":m(b)(`settings.pages.modules.speech.sections.section.provider-voice-selection.no_voices_description`),"search-results-text":m(b)(`settings.pages.modules.speech.sections.section.provider-voice-selection.search_voices_results`,{count:0,total:0}),"custom-input-placeholder":m(b)(`settings.pages.modules.speech.sections.section.provider-voice-selection.custom_voice_placeholder`),"expand-button-text":m(b)(`settings.pages.modules.speech.sections.section.provider-voice-selection.show_more`),"collapse-button-text":m(b)(`settings.pages.modules.speech.sections.section.provider-voice-selection.show_less`),"play-button-text":m(b)(`settings.pages.modules.speech.sections.section.provider-voice-selection.play_sample`),"pause-button-text":m(b)(`settings.pages.modules.speech.sections.section.provider-voice-selection.pause`),"onUpdate:customValue":nt},null,8,[`search-query`,`voice-id`,`voices`,`search-placeholder`,`search-no-results-title`,`search-no-results-description`,`search-results-text`,`custom-input-placeholder`,`expand-button-text`,`collapse-button-text`,`play-button-text`,`pause-button-text`])])):m(H)?(u(),a(`div`,Ie,[c[23]||=n(`div`,{"i-solar:close-circle-line-duotone":``,class:`text-2xl text-red-500 dark:text-red-400`},null,-1),n(`div`,Le,[c[22]||=n(`span`,{class:`font-medium`},`Error loading voices`,-1),n(`span`,Re,p(m(H)),1)])])):(u(),a(`div`,ze,c[24]||=[n(`div`,{"i-solar:info-circle-line-duotone":``,class:`text-2xl text-amber-500 dark:text-amber-400`},null,-1),n(`div`,{class:`flex flex-col`},[n(`span`,{class:`font-medium`},`No voices available`),n(`span`,{class:`text-sm text-amber-600 dark:text-amber-400`},` No voices were found for this provider. You can enter a custom voice name below. `)],-1)])),n(`div`,Be,[o(m(y),{modelValue:m(L),"onUpdate:modelValue":c[5]||=e=>s(L)?L.value=e:null,label:`Pitch`,description:`Tune the pitch of the voice`,min:-100,max:100,step:1,"format-value":e=>`${e}%`},null,8,[`modelValue`,`format-value`]),o(m(v),{modelValue:m(U),"onUpdate:modelValue":c[6]||=e=>s(U)?U.value=e:null,label:`Enable SSML`,description:`Enable Speech Synthesis Markup Language for more control over speech output`},null,8,[`modelValue`])]),!m(W)[m(N)]||m(W)[m(N)].length===0?(u(),a(`div`,Ve,[o(m(de),{modelValue:m(I),"onUpdate:modelValue":c[7]||=e=>s(I)?I.value=e:null,type:`text`,label:`Voice ID`,description:`Enter the voice ID for your custom voice`,placeholder:`Enter voice name (e.g., 'Rachel', 'Josh')`},null,8,[`modelValue`]),m(N)===`elevenlabs`?(u(),a(`div`,He,[c[26]||=n(`label`,{class:`mb-1 block text-sm font-medium`},` Model `,-1),g(n(`select`,{"onUpdate:modelValue":c[8]||=e=>s(P)?P.value=e:null,class:`w-full border border-neutral-300 rounded bg-white px-3 py-2 dark:border-neutral-700 dark:bg-neutral-900`},c[25]||=[n(`option`,{value:`eleven_monolingual_v1`},` Monolingual v1 `,-1),n(`option`,{value:`eleven_multilingual_v1`},` Multilingual v1 `,-1),n(`option`,{value:`eleven_multilingual_v2`},` Multilingual v2 `,-1)],512),[[ae,m(P)]])])):i(``,!0),n(`div`,Ue,[o(m(y),{modelValue:m(L),"onUpdate:modelValue":c[9]||=e=>s(L)?L.value=e:null,label:`Pitch`,description:`Tune the pitch of the voice`,min:-100,max:100,step:1,"format-value":e=>`${e}%`},null,8,[`modelValue`,`format-value`])])])):i(``,!0)])])):i(``,!0)]),n(`div`,We,[n(`div`,Ge,[n(`h2`,k,[n(`div`,Ke,[o(m(he)),n(`div`,null,p(m(b)(`settings.pages.providers.provider.elevenlabs.playground.title`)),1)])]),n(`div`,qe,[o(m(v),{modelValue:K.value,"onUpdate:modelValue":c[10]||=e=>K.value=e,label:`Use Custom SSML`,description:`Enable to input raw SSML instead of plain text`},null,8,[`modelValue`]),K.value?g((u(),a(`textarea`,{key:1,"onUpdate:modelValue":c[12]||=e=>J.value=e,placeholder:`Enter SSML text...`,border:`neutral-100 dark:neutral-800 solid 2 focus:neutral-200 dark:focus:neutral-700`,transition:`all duration-250 ease-in-out`,bg:`neutral-100 dark:neutral-800 focus:neutral-50 dark:focus:neutral-900`,"h-48":``,"w-full":``,"rounded-lg":``,"px-3":``,"py-2":``,"text-sm":``,"font-mono":``,"outline-none":``},null,512)),[[oe,J.value]]):(u(),r(m(fe),{key:0,modelValue:q.value,"onUpdate:modelValue":c[11]||=e=>q.value=e,"h-24":``,"w-full":``,placeholder:m(b)(`settings.pages.providers.provider.elevenlabs.playground.fields.field.input.placeholder`)},null,8,[`modelValue`,`placeholder`])),n(`div`,Je,[n(`button`,{border:`neutral-800 dark:neutral-200 solid 2`,transition:`border duration-250 ease-in-out`,"rounded-lg":``,"px-4":``,text:`neutral-100 dark:neutral-900`,"py-2":``,"text-sm":``,disabled:Y.value||!q.value.trim()&&!K.value||K.value&&!J.value.trim()||!m(F),class:te({"opacity-50 cursor-not-allowed":Y.value||!q.value.trim()&&!K.value||K.value&&!J.value.trim()||!m(F)}),bg:`neutral-700 dark:neutral-300`,onClick:tt},[n(`div`,Xe,[c[28]||=n(`div`,{"i-solar:play-circle-bold-duotone":``},null,-1),n(`span`,null,p(Y.value?m(b)(`settings.pages.providers.provider.elevenlabs.playground.buttons.button.test-voice.generating`):m(b)(`settings.pages.providers.provider.elevenlabs.playground.buttons.button.test-voice.label`)),1)])],10,Ye),X.value?(u(),a(`button`,{key:0,border:`primary-300 dark:primary-800 solid 2`,transition:`border duration-250 ease-in-out`,"rounded-lg":``,"px-4":``,"py-2":``,"text-sm":``,onClick:$},c[29]||=[n(`div`,{flex:`~ row`,"items-center":``,"gap-2":``},[n(`div`,{"i-solar:stop-circle-bold-duotone":``}),n(`span`,null,`Stop`)],-1)])):i(``,!0)]),X.value?(u(),a(`audio`,{key:2,ref_key:`audioPlayer`,ref:Z,src:X.value,controls:``,class:`mt-2 w-full`},null,8,Ze)):i(``,!0)])])])]),g((u(),a(`div`,Qe,c[30]||=[n(`div`,{text:`60`,"i-solar:user-speak-rounded-bold-duotone":``},null,-1)])),[[d]])],64)}}});typeof b==`function`&&b(A);var j=A;export{j as default}; \ No newline at end of file +import{Fragment as e,RouterLink as t,createBaseVNode as n,createBlock as r,createCommentVNode as i,createElementBlock as a,createVNode as o,defineComponent as ee,isRef as s,normalizeClass as te,onMounted as c,onUnmounted as l,openBlock as u,ref as d,renderList as ne,resolveDirective as re,storeToRefs as f,toDisplayString as p,unref as m,useI18n as ie,vModelSelect as ae,vModelText as oe,watch as se,withCtx as h,withDirectives as g}from"./index-CsmT0L1K.js";import"./import-url-browser-DNuYZxPr.js";import"./duckdb-mvp-C3i5IjU8.js";import"./index-CISmcbXk-C9oju49Y.js";import"./types-AwjH7X1C.js";import{generateSpeech as ce,useProvidersStore as le,useSpeechStore as ue}from"./stores-2H61GqXP.js";import"./__vite-browser-external-DPh5tFvT.js";import{Skeleton_default as _}from"./Button-D3cjyOEe.js";import{FieldCheckbox_default as v,FieldInput_default as de,FieldRange_default as y}from"./src-C1Sr0aqN.js";import"./Basic-MLnzojs5.js";import{Textarea_default as fe}from"./Textarea-CK41gHte.js";import{RadioCardManySelect_default as pe,RadioCardSimple_default as me,TestDummyMarker_default as he,VoiceCardManySelect_default as ge}from"./components-DHUA669a.js";import"./composables-CgcEyUWo.js";import"./sleep-CvjNLutj.js";import"./queue-B0kER5Ap.js";import"./queues-hSEKEE3F.js";import"./dist-Cr2QBfS4.js";import"./webgpu-Nt9hTBpW.js";import{route_block_default as b}from"./route-block-DNPbw0zT.js";const _e={flex:`~ col md:row gap-6`},ve={bg:`neutral-100 dark:[rgba(0,0,0,0.3)]`,"rounded-xl":``,"p-4":``,flex:`~ col gap-4`,class:`w-full md:w-[40%]`},ye={flex:`~ col gap-4`},be={class:`text-lg text-neutral-500 md:text-2xl dark:text-neutral-400`},xe={text:`neutral-400 dark:neutral-500`},Se={"max-w-full":``},Ce={key:0,flex:`~ row gap-4`,style:{"scrollbar-width":`none`},"min-w-0":``,"of-x-scroll":``,"scroll-smooth":``,role:`radiogroup`},we={key:1},Te={key:0},x={flex:`~ col gap-4`},S={class:`text-lg md:text-2xl`},C={text:`neutral-400 dark:neutral-400`},w={key:0,class:`flex items-center justify-center py-4`},T={key:1,class:`flex items-center gap-3 border border-red-200 rounded-lg bg-red-50 p-4 dark:border-red-800 dark:bg-red-900/20`},E={class:`flex flex-col`},D={class:`font-medium`},O={class:`text-sm text-red-600 dark:text-red-400`},Ee={key:2,class:`flex items-center gap-3 border border-amber-200 rounded-lg bg-amber-50 p-4 dark:border-amber-800 dark:bg-amber-900/20`},De={class:`flex flex-col`},Oe={class:`font-medium`},ke={class:`text-sm text-amber-600 dark:text-amber-400`},Ae={key:0},je={flex:`~ col gap-4`},Me={key:0},Ne={class:`flex flex-col gap-4`},Pe={flex:`~ row gap-4`},Fe={key:1,class:`space-y-6`},Ie={key:2,class:`flex items-center gap-3 border border-2 border-red-200 rounded-lg bg-red-50 p-4 dark:border-red-800 dark:bg-red-900/20`},Le={class:`flex flex-col`},Re={class:`text-sm text-red-600 dark:text-red-400`},ze={key:3,class:`flex items-center gap-3 border border-2 border-amber-200 rounded-lg bg-amber-50 p-4 dark:border-amber-800 dark:bg-amber-900/20`},Be={flex:`~ col gap-4`},Ve={key:4,class:`mt-2 space-y-6`},He={key:0},Ue={flex:`~ col gap-4`},We={flex:`~ col gap-6`,class:`w-full md:w-[60%]`},Ge={"w-full":``,"rounded-xl":``},k={class:`mb-4 text-lg text-neutral-500 md:text-2xl dark:text-neutral-400`,"w-full":``},Ke={class:`inline-flex items-center gap-4`},qe={flex:`~ col gap-4`},Je={flex:`~ row`,"gap-4":``},Ye=[`disabled`],Xe={flex:`~ row`,"items-center":``,"gap-2":``},Ze=[`src`],Qe={text:`neutral-200/50 dark:neutral-600/20`,"pointer-events-none":``,fixed:``,top:`[calc(100dvh-15rem)]`,"bottom-0":``,"right--5":``,"z--1":``,initial:{scale:.9,opacity:0,x:20},enter:{scale:1,opacity:1,x:0},duration:500,"size-60":``,flex:``,"items-center":``,"justify-center":``};var A=ee({__name:`speech`,setup(ee){let{t:b}=ie(),A=le(),j=ue(),{configuredSpeechProvidersMetadata:M}=f(A),{activeSpeechProvider:N,activeSpeechModel:P,activeSpeechVoice:F,activeSpeechVoiceId:I,pitch:L,isLoadingSpeechProviderVoices:$e,supportsModelListing:et,providerModels:R,isLoadingActiveProviderModels:z,activeProviderModelError:B,modelSearchQuery:V,speechProviderError:H,ssmlEnabled:U,availableVoices:W}=f(j),G=d(``),K=d(!1),q=d(`Hello, my name is AI Assistant`),J=d(``),Y=d(!1),X=d(``),Z=d(null),Q=d(``);c(async()=>{await A.loadModelsForConfiguredProviders(),await j.loadVoicesForProvider(N.value)}),se(N,async()=>{await A.loadModelsForConfiguredProviders(),await j.loadVoicesForProvider(N.value)});async function tt(){if(!q.value.trim()&&!K.value||K.value&&!J.value.trim())return;if(!P.value){console.error(`No model selected`);return}if(!F.value){console.error(`No voice selected`);return}let e=A.getProviderInstance(N.value);if(!e){console.error(`Failed to initialize speech provider`);return}let t=A.getProviderConfig(N.value);Y.value=!0,Q.value=``;try{X.value&&$();let n=K.value?J.value:j.generateSSML(q.value,F.value,{...t,pitch:L.value}),r=await ce({...e.speech(P.value,t),input:n,voice:F.value.id});X.value=URL.createObjectURL(new Blob([r])),setTimeout(()=>{Z.value&&Z.value.play()},100)}catch(e){console.error(`Error generating speech:`,e),Q.value=e instanceof Error?e.message:`An unknown error occurred`}finally{Y.value=!1}}function $(){Z.value&&(Z.value.pause(),Z.value.currentTime=0),X.value&&(URL.revokeObjectURL(X.value),X.value=``)}l(()=>{X.value&&URL.revokeObjectURL(X.value)});function nt(e){F.value={id:e,name:e,description:e,previewURL:e,languages:[{code:`en`,title:`English`}],provider:N.value,gender:`male`}}function rt(e){P.value=e}return(ee,c)=>{var l;let d=re(`motion`);return u(),a(e,null,[n(`div`,_e,[n(`div`,ve,[n(`div`,null,[n(`div`,ye,[n(`div`,null,[n(`h2`,be,p(m(b)(`settings.pages.modules.speech.sections.section.provider-voice-selection.title`)),1),n(`div`,xe,[n(`span`,null,p(m(b)(`settings.pages.modules.speech.sections.section.provider-voice-selection.description`)),1)])]),n(`div`,Se,[m(M).length>0?(u(),a(`fieldset`,Ce,[(u(!0),a(e,null,ne(m(M),e=>(u(),r(m(me),{id:e.id,key:e.id,modelValue:m(N),"onUpdate:modelValue":c[0]||=e=>s(N)?N.value=e:null,name:`speech-provider`,value:e.id,title:e.localizedName||`Unknown`,description:e.localizedDescription},null,8,[`id`,`modelValue`,`value`,`title`,`description`]))),128))])):(u(),a(`div`,we,[o(m(t),{class:`flex items-center gap-3 rounded-lg p-4`,border:`2 dashed neutral-200 dark:neutral-800`,bg:`neutral-50 dark:neutral-800`,transition:`colors duration-200 ease-in-out`,to:`/settings/providers`},{default:h(()=>c[13]||=[n(`div`,{"i-solar:warning-circle-line-duotone":``,class:`text-2xl text-amber-500 dark:text-amber-400`},null,-1),n(`div`,{class:`flex flex-col`},[n(`span`,{class:`font-medium`},`No Speech Providers Configured`),n(`span`,{class:`text-sm text-neutral-400 dark:text-neutral-500`},`Click here to set up your speech providers`)],-1),n(`div`,{"i-solar:arrow-right-line-duotone":``,class:`ml-auto text-xl text-neutral-400 dark:text-neutral-500`},null,-1)]),_:1,__:[13]})]))])]),n(`div`,null,[m(N)&&m(et)?(u(),a(`div`,Te,[n(`div`,x,[n(`div`,null,[n(`h2`,S,p(m(b)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.title`)),1),n(`div`,C,[n(`span`,null,p(m(b)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.subtitle`)),1)])]),m(z)?(u(),a(`div`,w,[c[14]||=n(`div`,{class:`mr-2 animate-spin`},[n(`div`,{"i-solar:spinner-line-duotone":``,"text-xl":``})],-1),n(`span`,null,p(m(b)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.loading`)),1)])):m(B)?(u(),a(`div`,T,[c[15]||=n(`div`,{"i-solar:close-circle-line-duotone":``,class:`text-2xl text-red-500 dark:text-red-400`},null,-1),n(`div`,E,[n(`span`,D,p(m(b)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.error`)),1),n(`span`,O,p(m(B)),1)])])):m(R).length===0&&!m(z)?(u(),a(`div`,Ee,[c[16]||=n(`div`,{"i-solar:info-circle-line-duotone":``,class:`text-2xl text-amber-500 dark:text-amber-400`},null,-1),n(`div`,De,[n(`span`,Oe,p(m(b)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.no_models`)),1),n(`span`,ke,p(m(b)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.no_models_description`)),1)])])):m(R).length>0?(u(),r(m(pe),{key:3,modelValue:m(P),"onUpdate:modelValue":c[1]||=e=>s(P)?P.value=e:null,"search-query":m(V),"onUpdate:searchQuery":c[2]||=e=>s(V)?V.value=e:null,items:m(R),searchable:!0,"search-placeholder":m(b)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.search_placeholder`),"search-no-results-title":m(b)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.no_search_results`),"search-no-results-description":m(b)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.no_search_results_description`,{query:m(V)}),"search-results-text":m(b)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.search_results`,{count:`{count}`,total:`{total}`}),"custom-input-placeholder":m(b)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.custom_model_placeholder`),"expand-button-text":m(b)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.expand`),"collapse-button-text":m(b)(`settings.pages.modules.consciousness.sections.section.provider-model-selection.collapse`),"onUpdate:customValue":rt},null,8,[`modelValue`,`search-query`,`items`,`search-placeholder`,`search-no-results-title`,`search-no-results-description`,`search-results-text`,`custom-input-placeholder`,`expand-button-text`,`collapse-button-text`])):i(``,!0)])])):i(``,!0)])]),m(N)?(u(),a(`div`,Ae,[n(`div`,je,[c[27]||=n(`div`,null,[n(`h2`,{class:`text-lg text-neutral-500 md:text-2xl dark:text-neutral-400`},` Voice Configuration `),n(`div`,{text:`neutral-400 dark:neutral-500`},[n(`span`,null,`Customize how your AI assistant speaks`)])],-1),m($e)?(u(),a(`div`,Me,[n(`div`,Ne,[o(m(_),{class:`w-full rounded-lg p-2.5 text-sm`},{default:h(()=>c[17]||=[n(`div`,{class:`h-1lh`},null,-1)]),_:1,__:[17]}),n(`div`,Pe,[o(m(_),{class:`w-full rounded-lg p-4 text-sm`},{default:h(()=>c[18]||=[n(`div`,{class:`h-1lh`},null,-1)]),_:1,__:[18]}),o(m(_),{class:`w-full rounded-lg p-4 text-sm`},{default:h(()=>c[19]||=[n(`div`,{class:`h-1lh`},null,-1)]),_:1,__:[19]}),o(m(_),{class:`w-full rounded-lg p-4 text-sm`},{default:h(()=>c[20]||=[n(`div`,{class:`h-1lh`},null,-1)]),_:1,__:[20]})]),o(m(_),{class:`w-full rounded-lg p-3 text-sm`},{default:h(()=>c[21]||=[n(`div`,{class:`h-1lh`},null,-1)]),_:1,__:[21]})])])):m(W)[m(N)]&&m(W)[m(N)].length>0?(u(),a(`div`,Fe,[o(m(ge),{"search-query":G.value,"onUpdate:searchQuery":c[3]||=e=>G.value=e,"voice-id":m(I),"onUpdate:voiceId":c[4]||=e=>s(I)?I.value=e:null,voices:(l=m(W)[m(N)])?.map(e=>({id:e.id,name:e.name,description:e.description,previewURL:e.previewURL,customizable:!1})),searchable:!0,"search-placeholder":m(b)(`settings.pages.modules.speech.sections.section.provider-voice-selection.search_voices_placeholder`),"search-no-results-title":m(b)(`settings.pages.modules.speech.sections.section.provider-voice-selection.no_voices`),"search-no-results-description":m(b)(`settings.pages.modules.speech.sections.section.provider-voice-selection.no_voices_description`),"search-results-text":m(b)(`settings.pages.modules.speech.sections.section.provider-voice-selection.search_voices_results`,{count:0,total:0}),"custom-input-placeholder":m(b)(`settings.pages.modules.speech.sections.section.provider-voice-selection.custom_voice_placeholder`),"expand-button-text":m(b)(`settings.pages.modules.speech.sections.section.provider-voice-selection.show_more`),"collapse-button-text":m(b)(`settings.pages.modules.speech.sections.section.provider-voice-selection.show_less`),"play-button-text":m(b)(`settings.pages.modules.speech.sections.section.provider-voice-selection.play_sample`),"pause-button-text":m(b)(`settings.pages.modules.speech.sections.section.provider-voice-selection.pause`),"onUpdate:customValue":nt},null,8,[`search-query`,`voice-id`,`voices`,`search-placeholder`,`search-no-results-title`,`search-no-results-description`,`search-results-text`,`custom-input-placeholder`,`expand-button-text`,`collapse-button-text`,`play-button-text`,`pause-button-text`])])):m(H)?(u(),a(`div`,Ie,[c[23]||=n(`div`,{"i-solar:close-circle-line-duotone":``,class:`text-2xl text-red-500 dark:text-red-400`},null,-1),n(`div`,Le,[c[22]||=n(`span`,{class:`font-medium`},`Error loading voices`,-1),n(`span`,Re,p(m(H)),1)])])):(u(),a(`div`,ze,c[24]||=[n(`div`,{"i-solar:info-circle-line-duotone":``,class:`text-2xl text-amber-500 dark:text-amber-400`},null,-1),n(`div`,{class:`flex flex-col`},[n(`span`,{class:`font-medium`},`No voices available`),n(`span`,{class:`text-sm text-amber-600 dark:text-amber-400`},` No voices were found for this provider. You can enter a custom voice name below. `)],-1)])),n(`div`,Be,[o(m(y),{modelValue:m(L),"onUpdate:modelValue":c[5]||=e=>s(L)?L.value=e:null,label:`Pitch`,description:`Tune the pitch of the voice`,min:-100,max:100,step:1,"format-value":e=>`${e}%`},null,8,[`modelValue`,`format-value`]),o(m(v),{modelValue:m(U),"onUpdate:modelValue":c[6]||=e=>s(U)?U.value=e:null,label:`Enable SSML`,description:`Enable Speech Synthesis Markup Language for more control over speech output`},null,8,[`modelValue`])]),!m(W)[m(N)]||m(W)[m(N)].length===0?(u(),a(`div`,Ve,[o(m(de),{modelValue:m(I),"onUpdate:modelValue":c[7]||=e=>s(I)?I.value=e:null,type:`text`,label:`Voice ID`,description:`Enter the voice ID for your custom voice`,placeholder:`Enter voice name (e.g., 'Rachel', 'Josh')`},null,8,[`modelValue`]),m(N)===`elevenlabs`?(u(),a(`div`,He,[c[26]||=n(`label`,{class:`mb-1 block text-sm font-medium`},` Model `,-1),g(n(`select`,{"onUpdate:modelValue":c[8]||=e=>s(P)?P.value=e:null,class:`w-full border border-neutral-300 rounded bg-white px-3 py-2 dark:border-neutral-700 dark:bg-neutral-900`},c[25]||=[n(`option`,{value:`eleven_monolingual_v1`},` Monolingual v1 `,-1),n(`option`,{value:`eleven_multilingual_v1`},` Multilingual v1 `,-1),n(`option`,{value:`eleven_multilingual_v2`},` Multilingual v2 `,-1)],512),[[ae,m(P)]])])):i(``,!0),n(`div`,Ue,[o(m(y),{modelValue:m(L),"onUpdate:modelValue":c[9]||=e=>s(L)?L.value=e:null,label:`Pitch`,description:`Tune the pitch of the voice`,min:-100,max:100,step:1,"format-value":e=>`${e}%`},null,8,[`modelValue`,`format-value`])])])):i(``,!0)])])):i(``,!0)]),n(`div`,We,[n(`div`,Ge,[n(`h2`,k,[n(`div`,Ke,[o(m(he)),n(`div`,null,p(m(b)(`settings.pages.providers.provider.elevenlabs.playground.title`)),1)])]),n(`div`,qe,[o(m(v),{modelValue:K.value,"onUpdate:modelValue":c[10]||=e=>K.value=e,label:`Use Custom SSML`,description:`Enable to input raw SSML instead of plain text`},null,8,[`modelValue`]),K.value?g((u(),a(`textarea`,{key:1,"onUpdate:modelValue":c[12]||=e=>J.value=e,placeholder:`Enter SSML text...`,border:`neutral-100 dark:neutral-800 solid 2 focus:neutral-200 dark:focus:neutral-700`,transition:`all duration-250 ease-in-out`,bg:`neutral-100 dark:neutral-800 focus:neutral-50 dark:focus:neutral-900`,"h-48":``,"w-full":``,"rounded-lg":``,"px-3":``,"py-2":``,"text-sm":``,"font-mono":``,"outline-none":``},null,512)),[[oe,J.value]]):(u(),r(m(fe),{key:0,modelValue:q.value,"onUpdate:modelValue":c[11]||=e=>q.value=e,"h-24":``,"w-full":``,placeholder:m(b)(`settings.pages.providers.provider.elevenlabs.playground.fields.field.input.placeholder`)},null,8,[`modelValue`,`placeholder`])),n(`div`,Je,[n(`button`,{border:`neutral-800 dark:neutral-200 solid 2`,transition:`border duration-250 ease-in-out`,"rounded-lg":``,"px-4":``,text:`neutral-100 dark:neutral-900`,"py-2":``,"text-sm":``,disabled:Y.value||!q.value.trim()&&!K.value||K.value&&!J.value.trim()||!m(F),class:te({"opacity-50 cursor-not-allowed":Y.value||!q.value.trim()&&!K.value||K.value&&!J.value.trim()||!m(F)}),bg:`neutral-700 dark:neutral-300`,onClick:tt},[n(`div`,Xe,[c[28]||=n(`div`,{"i-solar:play-circle-bold-duotone":``},null,-1),n(`span`,null,p(Y.value?m(b)(`settings.pages.providers.provider.elevenlabs.playground.buttons.button.test-voice.generating`):m(b)(`settings.pages.providers.provider.elevenlabs.playground.buttons.button.test-voice.label`)),1)])],10,Ye),X.value?(u(),a(`button`,{key:0,border:`primary-300 dark:primary-800 solid 2`,transition:`border duration-250 ease-in-out`,"rounded-lg":``,"px-4":``,"py-2":``,"text-sm":``,onClick:$},c[29]||=[n(`div`,{flex:`~ row`,"items-center":``,"gap-2":``},[n(`div`,{"i-solar:stop-circle-bold-duotone":``}),n(`span`,null,`Stop`)],-1)])):i(``,!0)]),X.value?(u(),a(`audio`,{key:2,ref_key:`audioPlayer`,ref:Z,src:X.value,controls:``,class:`mt-2 w-full`},null,8,Ze)):i(``,!0)])])])]),g((u(),a(`div`,Qe,c[30]||=[n(`div`,{text:`60`,"i-solar:user-speak-rounded-bold-duotone":``},null,-1)])),[[d]])],64)}}});typeof b==`function`&&b(A);var j=A;export{j as default}; \ No newline at end of file diff --git a/assets/src-C2QbIOor.js b/assets/src-C1Sr0aqN.js similarity index 99% rename from assets/src-C2QbIOor.js rename to assets/src-C1Sr0aqN.js index 59f5a7e52c662f1929c51c0a4a7422911fa33217..5e5d307aad1c9f254d8295dcf2fed42af651d190 100644 --- a/assets/src-C2QbIOor.js +++ b/assets/src-C1Sr0aqN.js @@ -1 +1 @@ -import{Comment as e,Fragment as t,__plugin_vue_export_helper_default as n,cloneVNode as r,computed as i,createApp as a,createBaseVNode as o,createBlock as s,createCommentVNode as c,createElementBlock as l,createTextVNode as u,createVNode as d,defineComponent as f,getCurrentInstance as p,guardReactiveProps as m,h,inject as g,mergeModels as _,mergeProps as v,nextTick as y,normalizeClass as b,normalizeProps as x,normalizeStyle as S,onMounted as C,openBlock as w,popScopeId as T,provide as E,pushScopeId as ee,ref as D,renderList as O,renderSlot as k,resolveComponent as A,resolveDirective as te,toDisplayString as j,toRefs as ne,toValue as re,unref as M,unrefElement$1 as ie,useModel as N,useVModel as ae,vModelDynamic as oe,vModelText as se,watch as ce,withCtx as P,withDirectives as F,withKeys as le,withModifiers as ue,withScopeId as de}from"./index-CuCRViVh.js";const fe=[`top`,`right`,`bottom`,`left`],pe=[`start`,`end`],me=fe.reduce((e,t)=>e.concat(t,t+`-`+pe[0],t+`-`+pe[1]),[]),he=Math.min,I=Math.max,ge=Math.round,_e=Math.floor,ve=e=>({x:e,y:e}),ye={left:`right`,right:`left`,bottom:`top`,top:`bottom`},be={start:`end`,end:`start`};function xe(e,t,n){return I(e,he(t,n))}function L(e,t){return typeof e==`function`?e(t):e}function R(e){return e.split(`-`)[0]}function z(e){return e.split(`-`)[1]}function Se(e){return e===`x`?`y`:`x`}function Ce(e){return e===`y`?`height`:`width`}function B(e){return[`top`,`bottom`].includes(R(e))?`y`:`x`}function we(e){return Se(B(e))}function Te(e,t,n){n===void 0&&(n=!1);let r=z(e),i=we(e),a=Ce(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=Ae(o)),[o,Ae(o)]}function Ee(e){let t=Ae(e);return[De(e),t,De(t)]}function De(e){return e.replace(/start|end/g,e=>be[e])}function Oe(e,t,n){let r=[`left`,`right`],i=[`right`,`left`],a=[`top`,`bottom`],o=[`bottom`,`top`];switch(e){case`top`:case`bottom`:return n?t?i:r:t?r:i;case`left`:case`right`:return t?a:o;default:return[]}}function ke(e,t,n,r){let i=z(e),a=Oe(R(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(De)))),a}function Ae(e){return e.replace(/left|right|bottom|top/g,e=>ye[e])}function je(e){return{top:0,right:0,bottom:0,left:0,...e}}function Me(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:je(e)}function V(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function Ne(e,t,n){let{reference:r,floating:i}=e,a=B(t),o=we(t),s=Ce(o),c=R(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}switch(z(t)){case`start`:p[o]-=f*(n&&l?-1:1);break;case`end`:p[o]+=f*(n&&l?-1:1);break}return p}const Pe=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=a.filter(Boolean),c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=Ne(l,r,c),f=r,p={},m=0;for(let n=0;n({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=L(e,t)||{};if(l==null)return{};let d=Me(u),f={x:n,y:r},p=we(i),m=Ce(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;(!C||!await(o.isElement==null?void 0:o.isElement(S)))&&(C=s.floating[y]||a.floating[m]);let w=b/2-x/2,T=C/2-h[m]/2-1,E=he(d[_],T),ee=he(d[v],T),D=E,O=C-h[m]-ee,k=C/2-h[m]/2+w,A=xe(D,k,O),te=!c.arrow&&z(i)!=null&&k!==A&&a.reference[m]/2-(kz(t)===e),...n.filter(t=>z(t)!==e)]:n.filter(e=>R(e)===e);return r.filter(n=>e?z(n)===e||(t?De(n)!==n:!1):!0)}const Re=function(e){return e===void 0&&(e={}),{name:`autoPlacement`,options:e,async fn(t){var n,r,i;let{rects:a,middlewareData:o,placement:s,platform:c,elements:l}=t,{crossAxis:u=!1,alignment:d,allowedPlacements:f=me,autoAlignment:p=!0,...m}=L(e,t),h=d!==void 0||f===me?Le(d||null,p,f):f,g=await Fe(t,m),_=(n=o.autoPlacement)?.index||0,v=h[_];if(v==null)return{};let y=Te(v,a,await(c.isRTL==null?void 0:c.isRTL(l.floating)));if(s!==v)return{reset:{placement:h[0]}};let b=[g[R(v)],g[y[0]],g[y[1]]],x=[...(r=o.autoPlacement)?.overflows||[],{placement:v,overflows:b}],S=h[_+1];if(S)return{data:{index:_+1,overflows:x},reset:{placement:S}};let C=x.map(e=>{let t=z(e.placement);return[e.placement,t&&u?e.overflows.slice(0,2).reduce((e,t)=>e+t,0):e.overflows[0],e.overflows]}).sort((e,t)=>e[1]-t[1]),w=C.filter(e=>e[2].slice(0,z(e[0])?2:3).every(e=>e<=0)),T=(i=w[0])?.[0]||C[0][0];return T===s?{}:{data:{index:_+1,overflows:x},reset:{placement:T}}}}},ze=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n,r;let{placement:i,middlewareData:a,rects:o,initialPlacement:s,platform:c,elements:l}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:p=`bestFit`,fallbackAxisSideDirection:m=`none`,flipAlignment:h=!0,...g}=L(e,t);if((n=a.arrow)!=null&&n.alignmentOffset)return{};let _=R(i),v=B(s),y=R(s)===s,b=await(c.isRTL==null?void 0:c.isRTL(l.floating)),x=f||(y||!h?[Ae(s)]:Ee(s)),S=m!==`none`;!f&&S&&x.push(...ke(s,h,m,b));let C=[s,...x],w=await Fe(t,g),T=[],E=(r=a.flip)?.overflows||[];if(u&&T.push(w[_]),d){let e=Te(i,o,b);T.push(w[e[0]],w[e[1]])}if(E=[...E,{placement:i,overflows:T}],!T.every(e=>e<=0)){var ee,D;let e=((ee=a.flip)?.index||0)+1,t=C[e];if(t)return{data:{index:e,overflows:E},reset:{placement:t}};let n=(D=E.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?.placement;if(!n)switch(p){case`bestFit`:{var O;let e=(O=E.filter(e=>{if(S){let t=B(e.placement);return t===v||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?.[0];e&&(n=e);break}case`initialPlacement`:n=s;break}if(i!==n)return{reset:{placement:n}}}return{}}}};function Be(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Ve(e){return fe.some(t=>e[t]>=0)}const He=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n}=t,{strategy:r=`referenceHidden`,...i}=L(e,t);switch(r){case`referenceHidden`:{let e=await Fe(t,{...i,elementContext:`reference`}),r=Be(e,n.reference);return{data:{referenceHiddenOffsets:r,referenceHidden:Ve(r)}}}case`escaped`:{let e=await Fe(t,{...i,altBoundary:!0}),r=Be(e,n.floating);return{data:{escapedOffsets:r,escaped:Ve(r)}}}default:return{}}}}};async function Ue(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=R(n),s=z(n),c=B(n)===`y`,l=[`left`,`top`].includes(o)?-1:1,u=a&&c?-1:1,d=L(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}const We=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n,r;let{x:i,y:a,placement:o,middlewareData:s}=t,c=await Ue(t,e);return o===(n=s.offset)?.placement&&(r=s.arrow)!=null&&r.alignmentOffset?{}:{x:i+c.x,y:a+c.y,data:{...c,placement:o}}}}},Ge=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i}=t,{mainAxis:a=!0,crossAxis:o=!1,limiter:s={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...c}=L(e,t),l={x:n,y:r},u=await Fe(t,c),d=B(R(i)),f=Se(d),p=l[f],m=l[d];if(a){let e=f===`y`?`top`:`left`,t=f===`y`?`bottom`:`right`,n=p+u[e],r=p-u[t];p=xe(n,p,r)}if(o){let e=d===`y`?`top`:`left`,t=d===`y`?`bottom`:`right`,n=m+u[e],r=m-u[t];m=xe(n,m,r)}let h=s.fn({...t,[f]:p,[d]:m});return{...h,data:{x:h.x-n,y:h.y-r,enabled:{[f]:a,[d]:o}}}}}},Ke=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=L(e,t),u={x:n,y:r},d=B(i),f=Se(d),p=u[f],m=u[d],h=L(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;pn&&(p=n)}if(l){var _,v;let e=f===`y`?`width`:`height`,t=[`top`,`left`].includes(R(i)),n=a.reference[d]-a.floating[e]+(t&&(_=o.offset)?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:(v=o.offset)?.[d]||0)-(t?g.crossAxis:0);mr&&(m=r)}return{[f]:p,[d]:m}}}},qe=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){var n,r;let{placement:i,rects:a,platform:o,elements:s}=t,{apply:c=()=>{},...l}=L(e,t),u=await Fe(t,l),d=R(i),f=z(i),p=B(i)===`y`,{width:m,height:h}=a.floating,g,_;d===`top`||d===`bottom`?(g=d,_=f===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?`start`:`end`)?`left`:`right`):(_=d,g=f===`end`?`top`:`bottom`);let v=h-u.top-u.bottom,y=m-u.left-u.right,b=he(h-u[g],v),x=he(m-u[_],y),S=!t.middlewareData.shift,C=b,w=x;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(w=y),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(C=v),S&&!f){let e=I(u.left,0),t=I(u.right,0),n=I(u.top,0),r=I(u.bottom,0);p?w=m-2*(e!==0||t!==0?e+t:I(u.left,u.right)):C=h-2*(n!==0||r!==0?n+r:I(u.top,u.bottom))}await c({...t,availableWidth:w,availableHeight:C});let T=await o.getDimensions(s.floating);return m!==T.width||h!==T.height?{reset:{rects:!0}}:{}}}};function Je(e){return e?e.flatMap(e=>e.type===t?Je(e.children):[e]):[]}const Ye=f({name:`PrimitiveSlot`,inheritAttrs:!1,setup(t,{attrs:n,slots:i}){return()=>{var t;if(!i.default)return null;let a=Je(i.default()),o=a.findIndex(t=>t.type!==e);if(o===-1)return a;let s=a[o];(t=s.props)==null||delete t.ref;let c=s.props?v(n,s.props):n,l=r({...s,props:{}},c);return a.length===1?l:(a[o]=l,a)}}}),Xe=[`area`,`img`,`input`],Ze=f({name:`Primitive`,inheritAttrs:!1,props:{asChild:{type:Boolean,default:!1},as:{type:[String,Object],default:`div`}},setup(e,{attrs:t,slots:n}){let r=e.asChild?`template`:e.as;return typeof r==`string`&&Xe.includes(r)?()=>h(r,t):r===`template`?()=>h(Ye,t,{default:n.default}):()=>h(e.as,t,{default:n.default})}}),Qe=f({__name:`VisuallyHidden`,props:{feature:{default:`focusable`},asChild:{type:Boolean},as:{default:`span`}},setup(e){return(e,t)=>(w(),s(M(Ze),{as:e.as,"as-child":e.asChild,"aria-hidden":e.feature===`focusable`?`true`:void 0,"data-hidden":e.feature===`fully-hidden`?``:void 0,tabindex:e.feature===`fully-hidden`?`-1`:void 0,style:{position:`absolute`,border:0,width:`1px`,height:`1px`,padding:0,margin:`-1px`,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,clipPath:`inset(50%)`,whiteSpace:`nowrap`,wordWrap:`normal`}},{default:P(()=>[k(e.$slots,`default`)]),_:3},8,[`as`,`as-child`,`aria-hidden`,`data-hidden`,`tabindex`]))}});function $e(e,t){let n=typeof e==`string`&&!t?`${e}Context`:t,r=Symbol(n),i=t=>{let n=g(r,t);if(n||n===null)return n;throw Error(`Injection \`${r.toString()}\` not found. Component must be used within ${Array.isArray(e)?`one of the following components: ${e.join(`, `)}`:`\`${e}\``}`)},a=e=>(E(r,e),e);return[i,a]}function et(){let e=p(),t=D(),n=i(()=>{var e,n;return[`#text`,`#comment`].includes((e=t.value)?.$el.nodeName)?(n=t.value)?.$el.nextElementSibling:ie(t)}),r=Object.assign({},e.exposed),a={};for(let t in e.props)Object.defineProperty(a,t,{enumerable:!0,configurable:!0,get:()=>e.props[t]});if(Object.keys(r).length>0)for(let e in r)Object.defineProperty(a,e,{enumerable:!0,configurable:!0,get:()=>r[e]});Object.defineProperty(a,`$el`,{enumerable:!0,configurable:!0,get:()=>e.vnode.el}),e.exposed=a;function o(n){t.value=n,n&&(Object.defineProperty(a,`$el`,{enumerable:!0,configurable:!0,get:()=>n instanceof Element?n:n.$el}),e.exposed=a)}return{forwardRef:o,currentRef:t,currentElement:n}}function tt(){let e=D(),t=i(()=>{var t,n;return[`#text`,`#comment`].includes((t=e.value)?.$el.nodeName)?(n=e.value)?.$el.nextElementSibling:ie(e)});return{primitiveElement:e,currentElement:t}}function nt(e){return i(()=>{var t;return re(e)?!!(t=ie(e))?.closest(`form`):!0})}const rt=f({inheritAttrs:!1,__name:`VisuallyHiddenInputBubble`,props:{name:{},value:{},checked:{type:Boolean,default:void 0},required:{type:Boolean},disabled:{type:Boolean},feature:{default:`fully-hidden`}},setup(e){let t=e,{primitiveElement:n,currentElement:r}=tt(),a=i(()=>t.checked??t.value);return ce(a,(e,t)=>{if(!r.value)return;let n=r.value,i=window.HTMLInputElement.prototype,a=Object.getOwnPropertyDescriptor(i,`value`),o=a.set;if(o&&e!==t){let t=new Event(`input`,{bubbles:!0}),r=new Event(`change`,{bubbles:!0});o.call(n,e),n.dispatchEvent(t),n.dispatchEvent(r)}}),(e,r)=>(w(),s(Qe,v({ref_key:`primitiveElement`,ref:n},{...t,...e.$attrs},{as:`input`}),null,16))}}),it=f({inheritAttrs:!1,__name:`VisuallyHiddenInput`,props:{name:{},value:{},checked:{type:Boolean,default:void 0},required:{type:Boolean},disabled:{type:Boolean},feature:{default:`fully-hidden`}},setup(e){let n=e,r=i(()=>typeof n.value==`object`&&Array.isArray(n.value)&&n.value.length===0&&n.required),a=i(()=>typeof n.value==`string`||typeof n.value==`number`||typeof n.value==`boolean`?[{name:n.name,value:n.value}]:typeof n.value==`object`&&Array.isArray(n.value)?n.value.flatMap((e,t)=>typeof e==`object`?Object.entries(e).map(([e,r])=>({name:`[${n.name}][${t}][${e}]`,value:r})):{name:`[${n.name}][${t}]`,value:e}):n.value!==null&&typeof n.value==`object`&&!Array.isArray(n.value)?Object.entries(n.value).map(([e,t])=>({name:`[${n.name}][${e}]`,value:t})):[]);return(e,i)=>r.value?(w(),s(rt,v({key:e.name},{...n,...e.$attrs},{name:e.name,value:e.value}),null,16,[`name`,`value`])):(w(!0),l(t,{key:1},O(a.value,t=>(w(),s(rt,v({key:t.name,ref_for:!0},{...n,...e.$attrs},{name:t.name,value:t.value}),null,16,[`name`,`value`]))),128))}}),[at,ot]=$e(`SwitchRoot`),st=f({__name:`SwitchRoot`,props:{defaultValue:{type:Boolean},modelValue:{type:[Boolean,null],default:void 0},disabled:{type:Boolean},id:{},value:{default:`on`},asChild:{type:Boolean},as:{default:`button`},name:{},required:{type:Boolean}},emits:[`update:modelValue`],setup(e,{emit:t}){let n=e,r=t,{disabled:a}=ne(n),o=ae(n,`modelValue`,r,{defaultValue:n.defaultValue,passive:n.modelValue===void 0});function l(){a.value||(o.value=!o.value)}let{forwardRef:u,currentElement:d}=et(),f=nt(d),p=i(()=>{var e;return n.id&&d.value?(e=document.querySelector(`[for="${n.id}"]`))?.innerText:void 0});return ot({modelValue:o,toggleCheck:l,disabled:a}),(e,t)=>(w(),s(M(Ze),v(e.$attrs,{id:e.id,ref:M(u),role:`switch`,type:e.as===`button`?`button`:void 0,value:e.value,"aria-label":e.$attrs[`aria-label`]||p.value,"aria-checked":M(o),"aria-required":e.required,"data-state":M(o)?`checked`:`unchecked`,"data-disabled":M(a)?``:void 0,"as-child":e.asChild,as:e.as,disabled:M(a),onClick:l,onKeydown:le(ue(l,[`prevent`]),[`enter`])}),{default:P(()=>[k(e.$slots,`default`,{modelValue:M(o)}),M(f)&&e.name?(w(),s(M(it),{key:0,type:`checkbox`,name:e.name,disabled:M(a),required:e.required,value:e.value,checked:!!M(o)},null,8,[`name`,`disabled`,`required`,`value`,`checked`])):c(``,!0)]),_:3},16,[`id`,`type`,`value`,`aria-label`,`aria-checked`,`aria-required`,`data-state`,`data-disabled`,`as-child`,`as`,`disabled`,`onKeydown`]))}}),ct=f({__name:`SwitchThumb`,props:{asChild:{type:Boolean},as:{default:`span`}},setup(e){let t=at();return et(),(e,n)=>{var r;return w(),s(M(Ze),{"data-state":(r=M(t).modelValue)?.value?`checked`:`unchecked`,"data-disabled":M(t).disabled.value?``:void 0,"as-child":e.asChild,as:e.as},{default:P(()=>[k(e.$slots,`default`)]),_:3},8,[`data-state`,`data-disabled`,`as-child`,`as`])}}});var lt=f({__name:`Checkbox`,props:{modelValue:{type:Boolean,required:!0},modelModifiers:{}},emits:[`update:modelValue`],setup(e){let t=N(e,`modelValue`);return(e,n)=>(w(),s(M(st),{modelValue:t.value,"onUpdate:modelValue":n[0]||=e=>t.value=e,transition:`background duration-250 ease-in-out`,outline:`focus-within:none`,flex:`~`,border:`neutral-300 dark:neutral-700 data-[state=checked]:primary-200 data-[state=unchecked]:neutral-300 focus-within:neutral-800`,bg:`data-[state=checked]:primary-400 data-[state=unchecked]:neutral-300 data-[state=checked]:dark:primary-400/80 dark:data-[state=unchecked]:neutral-800`,relative:``,"h-7":``,w:`12.5`,"rounded-full":``,shadow:`sm focus-within:shadow-neutral-800 focus-within:[0_0_0_1px] `},{default:P(()=>[d(M(ct),{"my-auto":``,"size-6":``,flex:``,"items-center":``,"justify-center":``,"translate-x":`0.5 data-[state=checked]:full`,"rounded-full":``,"bg-white":``,"text-xs":``,"shadow-xl":``,transition:`transform duration-250 ease-in-out`,"will-change-transform":``})]),_:1},8,[`modelValue`]))}}),ut=lt;const dt={flex:`~ col gap-4`},ft={flex:`~ row`,"items-center":``,"gap-2":``},pt={flex:`1`},mt={class:`flex items-center gap-1 text-sm font-medium`},ht={class:`text-xs text-neutral-500 dark:text-neutral-400`};var gt=f({__name:`FieldCheckbox`,props:_({label:null,description:null},{modelValue:{type:Boolean,required:!0},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let t=e,n=N(e,`modelValue`);return(e,r)=>(w(),l(`label`,dt,[o(`div`,ft,[o(`div`,pt,[o(`div`,mt,j(t.label),1),o(`div`,ht,j(t.description),1)]),d(ut,{modelValue:n.value,"onUpdate:modelValue":r[0]||=e=>n.value=e},null,8,[`modelValue`])])]))}}),_t=gt;const vt=[`type`];var yt=f({__name:`Input`,props:_({type:null},{modelValue:{required:!0},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let t=e,n=N(e,`modelValue`);return(e,r)=>F((w(),l(`input`,{"onUpdate:modelValue":r[0]||=e=>n.value=e,type:t.type||`text`,border:`focus:primary-300 dark:focus:primary-400/50 2 solid neutral-100 dark:neutral-900`,transition:`all duration-200 ease-in-out`,text:`disabled:neutral-400 dark:disabled:neutral-600`,cursor:`disabled:not-allowed`,"w-full":``,"rounded-lg":``,"px-2":``,"py-1":``,"text-nowrap":``,"text-sm":``,"outline-none":``,shadow:`sm`,bg:`neutral-50 dark:neutral-950 focus:neutral-50 dark:focus:neutral-900`},null,8,vt)),[[oe,n.value]])}}),bt=yt;const xt={"max-w-full":``},St={flex:`~ col gap-4`},Ct={class:`flex items-center gap-1 text-sm font-medium`},wt={key:0,class:`text-red-500`},Tt={class:`text-xs text-neutral-500 dark:text-neutral-400`,"text-nowrap":``},Et=[`type`,`placeholder`];var Dt=f({__name:`FieldInput`,props:_({label:null,description:null,placeholder:null,required:{type:Boolean},type:null,inputClass:null,singleLine:{type:Boolean,default:!0}},{modelValue:{required:!0},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let t=e,n=N(e,`modelValue`);return(r,i)=>(w(),l(`div`,xt,[o(`label`,St,[o(`div`,null,[o(`div`,Ct,[u(j(t.label)+` `,1),t.required===!1?c(``,!0):(w(),l(`span`,wt,`*`))]),o(`div`,Tt,j(t.description),1)]),e.singleLine?(w(),s(bt,{key:0,modelValue:n.value,"onUpdate:modelValue":i[0]||=e=>n.value=e,type:t.type,placeholder:t.placeholder,class:b(t.inputClass)},null,8,[`modelValue`,`type`,`placeholder`,`class`])):F((w(),l(`textarea`,{key:1,"onUpdate:modelValue":i[1]||=e=>n.value=e,type:t.type,placeholder:t.placeholder,class:b(t.inputClass),border:`focus:primary-300 dark:focus:primary-400/50 2 solid neutral-100 dark:neutral-900`,transition:`all duration-200 ease-in-out`,text:`disabled:neutral-400 dark:disabled:neutral-600`,cursor:`disabled:not-allowed`,"w-full":``,"rounded-lg":``,"px-2":``,"py-1":``,"text-sm":``,"outline-none":``,shadow:`sm`,bg:`neutral-50 dark:neutral-950 focus:neutral-50 dark:focus:neutral-900`},null,10,Et)),[[se,n.value]])])]))}}),Ot=Dt;const kt={flex:`~ gap-2`};var At=f({__name:`InputKeyValue`,props:_({name:null,keyPlaceholder:null,valuePlaceholder:null},{propertyKey:{required:!0},propertyKeyModifiers:{},propertyValue:{required:!0},propertyValueModifiers:{}}),emits:[`update:propertyKey`,`update:propertyValue`],setup(e){let t=e,n=N(e,`propertyKey`),r=N(e,`propertyValue`);return(e,i)=>(w(),l(`div`,kt,[d(bt,{modelValue:n.value,"onUpdate:modelValue":i[0]||=e=>n.value=e,placeholder:t.keyPlaceholder,class:`w-1/2`},null,8,[`modelValue`,`placeholder`]),d(bt,{modelValue:r.value,"onUpdate:modelValue":i[1]||=e=>r.value=e,placeholder:t.valuePlaceholder,class:`w-1/2`},null,8,[`modelValue`,`placeholder`])]))}}),jt=At;const Mt={"max-w-full":``},Nt={flex:`~ col gap-2`},Pt={class:`flex items-center gap-1 text-sm font-medium`},Ft={key:0,class:`text-red-500`},It={class:`text-xs text-neutral-500 dark:text-neutral-400`,"text-nowrap":``},Lt={flex:`~ col gap-2`},Rt=[`onClick`];var zt=f({__name:`FieldKeyValues`,props:_({label:null,description:null,name:null,keyPlaceholder:null,valuePlaceholder:null,required:{type:Boolean},inputClass:null},{modelValue:{required:!0},modelModifiers:{}}),emits:_([`remove`,`add`],[`update:modelValue`]),setup(e,{emit:n}){let r=e,i=n,a=N(e,`modelValue`),s=D(``),f=D(``);return ce([s,f],()=>{i(`add`,s.value,f.value)}),(e,n)=>{let s=te(`auto-animate`);return w(),l(`div`,Mt,[o(`label`,Nt,[o(`div`,null,[o(`div`,Pt,[u(j(r.label)+` `,1),r.required===!1?c(``,!0):(w(),l(`span`,Ft,`*`))]),o(`div`,It,j(r.description),1)]),F((w(),l(`div`,Lt,[(w(!0),l(t,null,O(a.value,(e,t)=>(w(),l(`div`,{key:t,"w-full":``,flex:``,"items-center":``,"gap-2":``},[d(jt,{"property-key":e.key,"onUpdate:propertyKey":t=>e.key=t,"property-value":e.value,"onUpdate:propertyValue":t=>e.value=t,"key-placeholder":r.keyPlaceholder,"value-placeholder":r.valuePlaceholder,"w-full":``},null,8,[`property-key`,`onUpdate:propertyKey`,`property-value`,`onUpdate:propertyValue`,`key-placeholder`,`value-placeholder`]),o(`button`,{onClick:e=>i(`remove`,t)},n[0]||=[o(`div`,{"i-solar:minus-circle-line-duotone":``,size:`6`},null,-1)],8,Rt)]))),128))])),[[s]])])])}}}),Bt=zt;const Vt=[`min`,`max`,`step`];var Ht=f({__name:`Range`,props:_({min:{default:0},max:{default:100},step:{default:1},disabled:{type:Boolean,default:!1},thumbColor:{default:`#9090906e`},trackColor:{default:`gray`},trackValueColor:{default:`red`}},{modelValue:{required:!0},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let t=e,n=N(e,`modelValue`),r=i(()=>t.min*1e4),a=i(()=>t.max*1e4),o=i(()=>t.step*1e4),s=D(),c=i({get:()=>n.value*1e4,set:e=>{n.value=e/1e4,u()}});C(()=>{u()});function u(){s.value&&(s.value.style.setProperty(`--value`,s.value.value),s.value.style.setProperty(`--min`,s.value.min?s.value.min:t.min.toString()),s.value.style.setProperty(`--max`,s.value.max?s.value.max:t.max.toString()))}function d(e){let t=e.target;t.style.setProperty(`--value`,t.value)}return(e,t)=>F((w(),l(`input`,{ref_key:`sliderRef`,ref:s,"onUpdate:modelValue":t[0]||=e=>c.value=e,type:`range`,min:r.value,max:a.value,step:o.value,class:`slider-progress form_input-range`,onInput:d},null,40,Vt)),[[se,c.value,void 0,{number:!0}]])}}),Ut=n(Ht,[[`__scopeId`,`data-v-c59a94f0`]]);const Wt={flex:`~ col gap-4`},Gt={flex:`~ row`,"items-center":``,"gap-2":``},Kt={flex:`1`},qt={class:`flex items-center gap-1 text-sm font-medium`},Jt={class:`text-xs text-neutral-500 dark:text-neutral-400`},Yt={"font-mono":``},Xt={flex:`~ row`,"items-center":``,"gap-2":``};var Zt=f({__name:`FieldRange`,props:_({min:null,max:null,step:null,label:null,description:null,formatValue:{type:Function}},{modelValue:{required:!0},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let t=e,n=N(e,`modelValue`);return(r,i)=>{var a;return w(),l(`label`,Wt,[o(`div`,Gt,[o(`div`,Kt,[o(`div`,qt,j(e.label),1),o(`div`,Jt,j(e.description),1)]),o(`span`,Yt,j((a=t.formatValue)?.call(t,n.value)||n.value),1)]),o(`div`,Xt,[d(Ut,{modelValue:n.value,"onUpdate:modelValue":i[0]||=e=>n.value=e,min:e.min||0,max:e.max||1,step:e.step||.01,"w-full":``},null,8,[`modelValue`,`min`,`max`,`step`])])])}}}),Qt=Zt;const $t={class:`max-w-full`},en={class:`flex flex-col gap-2`},tn={class:`flex items-center gap-1 text-sm font-medium`},nn={key:0,class:`text-red-500`},rn={class:`text-nowrap text-xs text-neutral-500 dark:text-neutral-400`},an={class:`~ col gap-2`},on=[`onClick`];var sn=f({__name:`FieldValues`,props:_({label:null,description:null,name:null,valuePlaceholder:null,required:{type:Boolean},inputClass:null},{modelValue:{required:!0},modelModifiers:{}}),emits:_([`remove`,`add`],[`update:modelValue`]),setup(e,{emit:n}){let r=e,i=n,a=N(e,`modelValue`);function s(){a.value.push(``),i(`add`)}function f(e){a.value.splice(e,1),i(`remove`,e)}return(e,n)=>{let i=te(`auto-animate`);return w(),l(`div`,$t,[o(`label`,en,[o(`div`,null,[o(`div`,tn,[u(j(r.label)+` `,1),r.required===!1?c(``,!0):(w(),l(`span`,nn,`*`))]),o(`div`,rn,j(r.description),1)]),F((w(),l(`div`,an,[(w(!0),l(t,null,O(a.value,(e,t)=>(w(),l(`div`,{key:t,class:`w-full flex items-center gap-2`},[d(bt,{modelValue:a.value[t],"onUpdate:modelValue":e=>a.value[t]=e,placeholder:r.valuePlaceholder,class:`w-90%`},null,8,[`modelValue`,`onUpdate:modelValue`,`placeholder`]),o(`button`,{"i-solar:minus-circle-line-duotone":``,size:`6`,class:`min-w-20px w-10% flex text-red-500`,onClick:e=>f(t)},null,8,on)]))),128)),o(`div`,{"i-solar:add-circle-line-duotone":``,size:`6`,class:`mt-2 w-4/5 text-blue-500`,onClick:s})])),[[i]])])])}}}),cn=sn;const ln=[`disabled`];var un=f({__name:`ColorHueRange`,props:_({disabled:{type:Boolean},class:null},{colorValue:{type:String,default:``},colorValueModifiers:{}}),emits:[`update:colorValue`],setup(e){let t=e,n=N(e,`colorValue`);return(e,r)=>F((w(),l(`input`,{"onUpdate:modelValue":r[0]||=e=>n.value=e,type:`range`,min:`0`,max:`360`,step:`0.01`,class:b([`color-hue-range`,[t.disabled?`opacity-25 cursor-not-allowed`:`cursor-pointer`,t.class||``]]),transition:`all ease-in-out duration-250`,disabled:t.disabled},null,10,ln)),[[se,n.value]])}}),dn=n(un,[[`__scopeId`,`data-v-ae80cb9d`]]);function H(e){var t;return(t=e.ownerDocument)?.defaultView||window}function U(e){return H(e).getComputedStyle(e)}const fn=Math.min,pn=Math.max,mn=Math.round;function hn(e){let t=U(e),n=parseFloat(t.width),r=parseFloat(t.height),i=e.offsetWidth,a=e.offsetHeight,o=mn(n)!==i||mn(r)!==a;return o&&(n=i,r=a),{width:n,height:r,fallback:o}}function W(e){return vn(e)?(e.nodeName||``).toLowerCase():``}let gn;function _n(){if(gn)return gn;let e=navigator.userAgentData;return e&&Array.isArray(e.brands)?(gn=e.brands.map(e=>e.brand+`/`+e.version).join(` `),gn):navigator.userAgent}function G(e){return e instanceof H(e).HTMLElement}function K(e){return e instanceof H(e).Element}function vn(e){return e instanceof H(e).Node}function yn(e){return typeof ShadowRoot>`u`?!1:e instanceof H(e).ShadowRoot||e instanceof ShadowRoot}function bn(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=U(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&![`inline`,`contents`].includes(i)}function xn(e){return[`table`,`td`,`th`].includes(W(e))}function Sn(e){let t=/firefox/i.test(_n()),n=U(e),r=n.backdropFilter||n.WebkitBackdropFilter;return n.transform!==`none`||n.perspective!==`none`||!!r&&r!==`none`||t&&n.willChange===`filter`||t&&!!n.filter&&n.filter!==`none`||[`transform`,`perspective`].some(e=>n.willChange.includes(e))||[`paint`,`layout`,`strict`,`content`].some(e=>{let t=n.contain;return t!=null&&t.includes(e)})}function Cn(){return!/^((?!chrome|android).)*safari/i.test(_n())}function wn(e){return[`html`,`body`,`#document`].includes(W(e))}function Tn(e){return K(e)?e:e.contextElement}const En={x:1,y:1};function Dn(e){let t=Tn(e);if(!G(t))return En;let n=t.getBoundingClientRect(),{width:r,height:i,fallback:a}=hn(t),o=(a?mn(n.width):n.width)/r,s=(a?mn(n.height):n.height)/i;return o&&Number.isFinite(o)||(o=1),s&&Number.isFinite(s)||(s=1),{x:o,y:s}}function On(e,t,n,r){var i,a;t===void 0&&(t=!1),n===void 0&&(n=!1);let o=e.getBoundingClientRect(),s=Tn(e),c=En;t&&(r?K(r)&&(c=Dn(r)):c=Dn(e));let l=s?H(s):window,u=!Cn()&&n,d=(o.left+(u&&(i=l.visualViewport)?.offsetLeft||0))/c.x,f=(o.top+(u&&(a=l.visualViewport)?.offsetTop||0))/c.y,p=o.width/c.x,m=o.height/c.y;if(s){let e=H(s),t=r&&K(r)?H(r):r,n=e.frameElement;for(;n&&r&&t!==e;){let e=Dn(n),t=n.getBoundingClientRect(),r=getComputedStyle(n);t.x+=(n.clientLeft+parseFloat(r.paddingLeft))*e.x,t.y+=(n.clientTop+parseFloat(r.paddingTop))*e.y,d*=e.x,f*=e.y,p*=e.x,m*=e.y,d+=t.x,f+=t.y,n=H(n).frameElement}}return{width:p,height:m,top:f,right:d+p,bottom:f+m,left:d,x:d,y:f}}function q(e){return((vn(e)?e.ownerDocument:e.document)||window.document).documentElement}function kn(e){return K(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function An(e){return On(q(e)).left+kn(e).scrollLeft}function jn(e){if(W(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||yn(e)&&e.host||q(e);return yn(t)?t.host:t}function Mn(e){let t=jn(e);return wn(t)?t.ownerDocument.body:G(t)&&bn(t)?t:Mn(t)}function Nn(e,t){var n;t===void 0&&(t=[]);let r=Mn(e),i=r===(n=e.ownerDocument)?.body,a=H(r);return i?t.concat(a,a.visualViewport||[],bn(r)?r:[]):t.concat(r,Nn(r))}function Pn(e,t,n){return t===`viewport`?V(function(e,t){let n=H(e),r=q(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=Cn();(e||!e&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}return{width:a,height:o,x:s,y:c}}(e,n)):K(t)?V(function(e,t){let n=On(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=G(e)?Dn(e):{x:1,y:1};return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}(t,n)):V(function(e){let t=q(e),n=kn(e),r=e.ownerDocument.body,i=pn(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=pn(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+An(e),s=-n.scrollTop;return U(r).direction===`rtl`&&(o+=pn(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}(q(e)))}function Fn(e){return G(e)&&U(e).position!==`fixed`?e.offsetParent:null}function In(e){let t=H(e),n=Fn(e);for(;n&&xn(n)&&U(n).position===`static`;)n=Fn(n);return n&&(W(n)===`html`||W(n)===`body`&&U(n).position===`static`&&!Sn(n))?t:n||function(e){let t=jn(e);for(;G(t)&&!wn(t);){if(Sn(t))return t;t=jn(t)}return null}(e)||t}function Ln(e,t,n){let r=G(t),i=q(t),a=On(e,!0,n===`fixed`,t),o={scrollLeft:0,scrollTop:0},s={x:0,y:0};if(r||!r&&n!==`fixed`)if((W(t)!==`body`||bn(i))&&(o=kn(t)),G(t)){let e=On(t,!0);s.x=e.x+t.clientLeft,s.y=e.y+t.clientTop}else i&&(s.x=An(i));return{x:a.left+o.scrollLeft-s.x,y:a.top+o.scrollTop-s.y,width:a.width,height:a.height}}const Rn={getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=n===`clippingAncestors`?function(e,t){let n=t.get(e);if(n)return n;let r=Nn(e).filter(e=>K(e)&&W(e)!==`body`),i=null,a=U(e).position===`fixed`,o=a?jn(e):e;for(;K(o)&&!wn(o);){let e=U(o),t=Sn(o);(a?t||i:t||e.position!==`static`||!i||![`absolute`,`fixed`].includes(i.position))?i=e:r=r.filter(e=>e!==o),o=jn(o)}return t.set(e,r),r}(t,this._c):[].concat(n),o=[...a,r],s=o[0],c=o.reduce((e,n)=>{let r=Pn(t,n,i);return e.top=pn(r.top,e.top),e.right=fn(r.right,e.right),e.bottom=fn(r.bottom,e.bottom),e.left=pn(r.left,e.left),e},Pn(t,s,i));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{rect:t,offsetParent:n,strategy:r}=e,i=G(n),a=q(n);if(n===a)return t;let o={scrollLeft:0,scrollTop:0},s={x:1,y:1},c={x:0,y:0};if((i||!i&&r!==`fixed`)&&((W(n)!==`body`||bn(a))&&(o=kn(n)),G(n))){let e=On(n);s=Dn(n),c.x=e.x+n.clientLeft,c.y=e.y+n.clientTop}return{width:t.width*s.x,height:t.height*s.y,x:t.x*s.x-o.scrollLeft*s.x+c.x,y:t.y*s.y-o.scrollTop*s.y+c.y}},isElement:K,getDimensions:function(e){return G(e)?hn(e):e.getBoundingClientRect()},getOffsetParent:In,getDocumentElement:q,getScale:Dn,async getElementRects(e){let{reference:t,floating:n,strategy:r}=e,i=this.getOffsetParent||In,a=this.getDimensions;return{reference:Ln(t,await i(n),r),floating:{x:0,y:0,...await a(n)}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>U(e).direction===`rtl`},zn=(e,t,n)=>{let r=new Map,i={platform:Rn,...n},a={...i.platform,_c:r};return Pe(e,t,{...i,platform:a})},J={disabled:!1,distance:5,skidding:0,container:`body`,boundary:void 0,instantMove:!1,disposeTimeout:150,popperTriggers:[],strategy:`absolute`,preventOverflow:!0,flip:!0,shift:!0,overflowPadding:0,arrowPadding:0,arrowOverflow:!0,autoHideOnMousedown:!1,themes:{tooltip:{placement:`top`,triggers:[`hover`,`focus`,`touch`],hideTriggers:e=>[...e,`click`],delay:{show:200,hide:0},handleResize:!1,html:!1,loadingContent:`...`},dropdown:{placement:`bottom`,triggers:[`click`],delay:0,handleResize:!0,autoHide:!0},menu:{$extend:`dropdown`,triggers:[`hover`,`focus`],popperTriggers:[`hover`],delay:{show:0,hide:400}}}};function Bn(e,t){let n=J.themes[e]||{},r;do r=n[t],typeof r>`u`?n.$extend?n=J.themes[n.$extend]||{}:(n=null,r=J[t]):n=null;while(n);return r}function Vn(e){let t=[e],n=J.themes[e]||{};do n.$extend&&!n.$resetCss?(t.push(n.$extend),n=J.themes[n.$extend]||{}):n=null;while(n);return t.map(e=>`v-popper--theme-${e}`)}function Hn(e){let t=[e],n=J.themes[e]||{};do n.$extend?(t.push(n.$extend),n=J.themes[n.$extend]||{}):n=null;while(n);return t}let Un=!1;if(typeof window<`u`){Un=!1;try{let e=Object.defineProperty({},`passive`,{get(){Un=!0}});window.addEventListener(`test`,null,e)}catch{}}let Wn=!1;typeof window<`u`&&typeof navigator<`u`&&(Wn=/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream);const Gn=[`auto`,`top`,`bottom`,`left`,`right`].reduce((e,t)=>e.concat([t,`${t}-start`,`${t}-end`]),[]),Kn={hover:`mouseenter`,focus:`focus`,click:`click`,touch:`touchstart`,pointer:`pointerdown`},qn={hover:`mouseleave`,focus:`blur`,click:`click`,touch:`touchend`,pointer:`pointerup`};function Jn(e,t){let n=e.indexOf(t);n!==-1&&e.splice(n,1)}function Yn(){return new Promise(e=>requestAnimationFrame(()=>{requestAnimationFrame(e)}))}const Y=[];let X=null;const Xn={};function Zn(e){let t=Xn[e];return t||=Xn[e]=[],t}let Qn=function(){};typeof window<`u`&&(Qn=window.Element);function Z(e){return function(t){return Bn(t.theme,e)}}const $n=`__floating-vue__popper`,er=()=>f({name:`VPopper`,provide(){return{[$n]:{parentPopper:this}}},inject:{[$n]:{default:null}},props:{theme:{type:String,required:!0},targetNodes:{type:Function,required:!0},referenceNode:{type:Function,default:null},popperNode:{type:Function,required:!0},shown:{type:Boolean,default:!1},showGroup:{type:String,default:null},ariaId:{default:null},disabled:{type:Boolean,default:Z(`disabled`)},positioningDisabled:{type:Boolean,default:Z(`positioningDisabled`)},placement:{type:String,default:Z(`placement`),validator:e=>Gn.includes(e)},delay:{type:[String,Number,Object],default:Z(`delay`)},distance:{type:[Number,String],default:Z(`distance`)},skidding:{type:[Number,String],default:Z(`skidding`)},triggers:{type:Array,default:Z(`triggers`)},showTriggers:{type:[Array,Function],default:Z(`showTriggers`)},hideTriggers:{type:[Array,Function],default:Z(`hideTriggers`)},popperTriggers:{type:Array,default:Z(`popperTriggers`)},popperShowTriggers:{type:[Array,Function],default:Z(`popperShowTriggers`)},popperHideTriggers:{type:[Array,Function],default:Z(`popperHideTriggers`)},container:{type:[String,Object,Qn,Boolean],default:Z(`container`)},boundary:{type:[String,Qn],default:Z(`boundary`)},strategy:{type:String,validator:e=>[`absolute`,`fixed`].includes(e),default:Z(`strategy`)},autoHide:{type:[Boolean,Function],default:Z(`autoHide`)},handleResize:{type:Boolean,default:Z(`handleResize`)},instantMove:{type:Boolean,default:Z(`instantMove`)},eagerMount:{type:Boolean,default:Z(`eagerMount`)},popperClass:{type:[String,Array,Object],default:Z(`popperClass`)},computeTransformOrigin:{type:Boolean,default:Z(`computeTransformOrigin`)},autoMinSize:{type:Boolean,default:Z(`autoMinSize`)},autoSize:{type:[Boolean,String],default:Z(`autoSize`)},autoMaxSize:{type:Boolean,default:Z(`autoMaxSize`)},autoBoundaryMaxSize:{type:Boolean,default:Z(`autoBoundaryMaxSize`)},preventOverflow:{type:Boolean,default:Z(`preventOverflow`)},overflowPadding:{type:[Number,String],default:Z(`overflowPadding`)},arrowPadding:{type:[Number,String],default:Z(`arrowPadding`)},arrowOverflow:{type:Boolean,default:Z(`arrowOverflow`)},flip:{type:Boolean,default:Z(`flip`)},shift:{type:Boolean,default:Z(`shift`)},shiftCrossAxis:{type:Boolean,default:Z(`shiftCrossAxis`)},noAutoFocus:{type:Boolean,default:Z(`noAutoFocus`)},disposeTimeout:{type:Number,default:Z(`disposeTimeout`)}},emits:{show:()=>!0,hide:()=>!0,"update:shown":e=>!0,"apply-show":()=>!0,"apply-hide":()=>!0,"close-group":()=>!0,"close-directive":()=>!0,"auto-hide":()=>!0,resize:()=>!0},data(){return{isShown:!1,isMounted:!1,skipTransition:!1,classes:{showFrom:!1,showTo:!1,hideFrom:!1,hideTo:!0},result:{x:0,y:0,placement:``,strategy:this.strategy,arrow:{x:0,y:0,centerOffset:0},transformOrigin:null},randomId:`popper_${[Math.random(),Date.now()].map(e=>e.toString(36).substring(2,10)).join(`_`)}`,shownChildren:new Set,lastAutoHide:!0,pendingHide:!1,containsGlobalTarget:!1,isDisposed:!0,mouseDownContains:!1}},computed:{popperId(){return this.ariaId==null?this.randomId:this.ariaId},shouldMountContent(){return this.eagerMount||this.isMounted},slotData(){return{popperId:this.popperId,isShown:this.isShown,shouldMountContent:this.shouldMountContent,skipTransition:this.skipTransition,autoHide:typeof this.autoHide==`function`?this.lastAutoHide:this.autoHide,show:this.show,hide:this.hide,handleResize:this.handleResize,onResize:this.onResize,classes:{...this.classes,popperClass:this.popperClass},result:this.positioningDisabled?null:this.result,attrs:this.$attrs}},parentPopper(){var e;return(e=this[$n])?.parentPopper},hasPopperShowTriggerHover(){var e,t;return(e=this.popperTriggers)?.includes(`hover`)||(t=this.popperShowTriggers)?.includes(`hover`)}},watch:{shown:`$_autoShowHide`,disabled(e){e?this.dispose():this.init()},async container(){this.isShown&&(this.$_ensureTeleport(),await this.$_computePosition())},triggers:{handler:`$_refreshListeners`,deep:!0},positioningDisabled:`$_refreshListeners`,...[`placement`,`distance`,`skidding`,`boundary`,`strategy`,`overflowPadding`,`arrowPadding`,`preventOverflow`,`shift`,`shiftCrossAxis`,`flip`].reduce((e,t)=>(e[t]=`$_computePosition`,e),{})},created(){this.autoMinSize&&console.warn('[floating-vue] `autoMinSize` option is deprecated. Use `autoSize="min"` instead.'),this.autoMaxSize&&console.warn("[floating-vue] `autoMaxSize` option is deprecated. Use `autoBoundaryMaxSize` instead.")},mounted(){this.init(),this.$_detachPopperNode()},activated(){this.$_autoShowHide()},deactivated(){this.hide()},beforeUnmount(){this.dispose()},methods:{show({event:e=null,skipDelay:t=!1,force:n=!1}={}){var r,i;(r=this.parentPopper)!=null&&r.lockedChild&&this.parentPopper.lockedChild!==this||(this.pendingHide=!1,(n||!this.disabled)&&((i=this.parentPopper)?.lockedChild===this&&(this.parentPopper.lockedChild=null),this.$_scheduleShow(e,t),this.$emit(`show`),this.$_showFrameLocked=!0,requestAnimationFrame(()=>{this.$_showFrameLocked=!1})),this.$emit(`update:shown`,!0))},hide({event:e=null,skipDelay:t=!1}={}){var n;if(!this.$_hideInProgress){if(this.shownChildren.size>0){this.pendingHide=!0;return}if(this.hasPopperShowTriggerHover&&this.$_isAimingPopper()){this.parentPopper&&(this.parentPopper.lockedChild=this,clearTimeout(this.parentPopper.lockedChildTimer),this.parentPopper.lockedChildTimer=setTimeout(()=>{this.parentPopper.lockedChild===this&&(this.parentPopper.lockedChild.hide({skipDelay:t}),this.parentPopper.lockedChild=null)},1e3));return}(n=this.parentPopper)?.lockedChild===this&&(this.parentPopper.lockedChild=null),this.pendingHide=!1,this.$_scheduleHide(e,t),this.$emit(`hide`),this.$emit(`update:shown`,!1)}},init(){var e;this.isDisposed&&(this.isDisposed=!1,this.isMounted=!1,this.$_events=[],this.$_preventShow=!1,this.$_referenceNode=(e=this.referenceNode)?.call(this)??this.$el,this.$_targetNodes=this.targetNodes().filter(e=>e.nodeType===e.ELEMENT_NODE),this.$_popperNode=this.popperNode(),this.$_innerNode=this.$_popperNode.querySelector(`.v-popper__inner`),this.$_arrowNode=this.$_popperNode.querySelector(`.v-popper__arrow-container`),this.$_swapTargetAttrs(`title`,`data-original-title`),this.$_detachPopperNode(),this.triggers.length&&this.$_addEventListeners(),this.shown&&this.show())},dispose(){this.isDisposed||(this.isDisposed=!0,this.$_removeEventListeners(),this.hide({skipDelay:!0}),this.$_detachPopperNode(),this.isMounted=!1,this.isShown=!1,this.$_updateParentShownChildren(!1),this.$_swapTargetAttrs(`data-original-title`,`title`))},async onResize(){this.isShown&&(await this.$_computePosition(),this.$emit(`resize`))},async $_computePosition(){if(this.isDisposed||this.positioningDisabled)return;let e={strategy:this.strategy,middleware:[]};(this.distance||this.skidding)&&e.middleware.push(We({mainAxis:this.distance,crossAxis:this.skidding}));let t=this.placement.startsWith(`auto`);if(t?e.middleware.push(Re({alignment:this.placement.split(`-`)[1]??``})):e.placement=this.placement,this.preventOverflow&&(this.shift&&e.middleware.push(Ge({padding:this.overflowPadding,boundary:this.boundary,crossAxis:this.shiftCrossAxis})),!t&&this.flip&&e.middleware.push(ze({padding:this.overflowPadding,boundary:this.boundary}))),e.middleware.push(Ie({element:this.$_arrowNode,padding:this.arrowPadding})),this.arrowOverflow&&e.middleware.push({name:`arrowOverflow`,fn:({placement:e,rects:t,middlewareData:n})=>{let r,{centerOffset:i}=n.arrow;return r=e.startsWith(`top`)||e.startsWith(`bottom`)?Math.abs(i)>t.reference.width/2:Math.abs(i)>t.reference.height/2,{data:{overflow:r}}}}),this.autoMinSize||this.autoSize){let t=this.autoSize?this.autoSize:this.autoMinSize?`min`:null;e.middleware.push({name:`autoSize`,fn:({rects:e,placement:n,middlewareData:r})=>{var i;if((i=r.autoSize)!=null&&i.skip)return{};let a,o;return n.startsWith(`top`)||n.startsWith(`bottom`)?a=e.reference.width:o=e.reference.height,this.$_innerNode.style[t===`min`?`minWidth`:t===`max`?`maxWidth`:`width`]=a==null?null:`${a}px`,this.$_innerNode.style[t===`min`?`minHeight`:t===`max`?`maxHeight`:`height`]=o==null?null:`${o}px`,{data:{skip:!0},reset:{rects:!0}}}})}(this.autoMaxSize||this.autoBoundaryMaxSize)&&(this.$_innerNode.style.maxWidth=null,this.$_innerNode.style.maxHeight=null,e.middleware.push(qe({boundary:this.boundary,padding:this.overflowPadding,apply:({availableWidth:e,availableHeight:t})=>{this.$_innerNode.style.maxWidth=e==null?null:`${e}px`,this.$_innerNode.style.maxHeight=t==null?null:`${t}px`}})));let n=await zn(this.$_referenceNode,this.$_popperNode,e);Object.assign(this.result,{x:n.x,y:n.y,placement:n.placement,strategy:n.strategy,arrow:{...n.middlewareData.arrow,...n.middlewareData.arrowOverflow}})},$_scheduleShow(e,t=!1){if(this.$_updateParentShownChildren(!0),this.$_hideInProgress=!1,clearTimeout(this.$_scheduleTimer),X&&this.instantMove&&X.instantMove&&X!==this.parentPopper){X.$_applyHide(!0),this.$_applyShow(!0);return}t?this.$_applyShow():this.$_scheduleTimer=setTimeout(this.$_applyShow.bind(this),this.$_computeDelay(`show`))},$_scheduleHide(e,t=!1){if(this.shownChildren.size>0){this.pendingHide=!0;return}this.$_updateParentShownChildren(!1),this.$_hideInProgress=!0,clearTimeout(this.$_scheduleTimer),this.isShown&&(X=this),t?this.$_applyHide():this.$_scheduleTimer=setTimeout(this.$_applyHide.bind(this),this.$_computeDelay(`hide`))},$_computeDelay(e){let t=this.delay;return parseInt(t&&t[e]||t||0)},async $_applyShow(e=!1){clearTimeout(this.$_disposeTimer),clearTimeout(this.$_scheduleTimer),this.skipTransition=e,!this.isShown&&(this.$_ensureTeleport(),await Yn(),await this.$_computePosition(),await this.$_applyShowEffect(),this.positioningDisabled||this.$_registerEventListeners([...Nn(this.$_referenceNode),...Nn(this.$_popperNode)],`scroll`,()=>{this.$_computePosition()}))},async $_applyShowEffect(){if(this.$_hideInProgress)return;if(this.computeTransformOrigin){let e=this.$_referenceNode.getBoundingClientRect(),t=this.$_popperNode.querySelector(`.v-popper__wrapper`),n=t.parentNode.getBoundingClientRect(),r=e.x+e.width/2-(n.left+t.offsetLeft),i=e.y+e.height/2-(n.top+t.offsetTop);this.result.transformOrigin=`${r}px ${i}px`}this.isShown=!0,this.$_applyAttrsToTarget({"aria-describedby":this.popperId,"data-popper-shown":``});let e=this.showGroup;if(e){let t;for(let n=0;n0){this.pendingHide=!0,this.$_hideInProgress=!1;return}if(clearTimeout(this.$_scheduleTimer),!this.isShown)return;this.skipTransition=e,Jn(Y,this),Y.length===0&&document.body.classList.remove(`v-popper--some-open`);for(let e of Hn(this.theme)){let t=Zn(e);Jn(t,this),t.length===0&&document.body.classList.remove(`v-popper--some-open--${e}`)}X===this&&(X=null),this.isShown=!1,this.$_applyAttrsToTarget({"aria-describedby":void 0,"data-popper-shown":void 0}),clearTimeout(this.$_disposeTimer);let t=this.disposeTimeout;t!==null&&(this.$_disposeTimer=setTimeout(()=>{this.$_popperNode&&(this.$_detachPopperNode(),this.isMounted=!1)},t)),this.$_removeEventListeners(`scroll`),this.$emit(`apply-hide`),this.classes.showFrom=!1,this.classes.showTo=!1,this.classes.hideFrom=!0,this.classes.hideTo=!1,await Yn(),this.classes.hideFrom=!1,this.classes.hideTo=!0},$_autoShowHide(){this.shown?this.show():this.hide()},$_ensureTeleport(){if(this.isDisposed)return;let e=this.container;if(typeof e==`string`?e=window.document.querySelector(e):e===!1&&(e=this.$_targetNodes[0].parentNode),!e)throw Error(`No container for popover: `+this.container);e.appendChild(this.$_popperNode),this.isMounted=!0},$_addEventListeners(){let e=e=>{this.isShown&&!this.$_hideInProgress||(e.usedByTooltip=!0,!this.$_preventShow&&this.show({event:e}))};this.$_registerTriggerListeners(this.$_targetNodes,Kn,this.triggers,this.showTriggers,e),this.$_registerTriggerListeners([this.$_popperNode],Kn,this.popperTriggers,this.popperShowTriggers,e);let t=e=>{e.usedByTooltip||this.hide({event:e})};this.$_registerTriggerListeners(this.$_targetNodes,qn,this.triggers,this.hideTriggers,t),this.$_registerTriggerListeners([this.$_popperNode],qn,this.popperTriggers,this.popperHideTriggers,t)},$_registerEventListeners(e,t,n){this.$_events.push({targetNodes:e,eventType:t,handler:n}),e.forEach(e=>e.addEventListener(t,n,Un?{passive:!0}:void 0))},$_registerTriggerListeners(e,t,n,r,i){let a=n;r!=null&&(a=typeof r==`function`?r(a):r),a.forEach(n=>{let r=t[n];r&&this.$_registerEventListeners(e,r,i)})},$_removeEventListeners(e){let t=[];this.$_events.forEach(n=>{let{targetNodes:r,eventType:i,handler:a}=n;!e||e===i?r.forEach(e=>e.removeEventListener(i,a)):t.push(n)}),this.$_events=t},$_refreshListeners(){this.isDisposed||(this.$_removeEventListeners(),this.$_addEventListeners())},$_handleGlobalClose(e,t=!1){this.$_showFrameLocked||(this.hide({event:e}),e.closePopover?this.$emit(`close-directive`):this.$emit(`auto-hide`),t&&(this.$_preventShow=!0,setTimeout(()=>{this.$_preventShow=!1},300)))},$_detachPopperNode(){this.$_popperNode.parentNode&&this.$_popperNode.parentNode.removeChild(this.$_popperNode)},$_swapTargetAttrs(e,t){for(let n of this.$_targetNodes){let r=n.getAttribute(e);r&&(n.removeAttribute(e),n.setAttribute(t,r))}},$_applyAttrsToTarget(e){for(let t of this.$_targetNodes)for(let n in e){let r=e[n];r==null?t.removeAttribute(n):t.setAttribute(n,r)}},$_updateParentShownChildren(e){let t=this.parentPopper;for(;t;)e?t.shownChildren.add(this.randomId):(t.shownChildren.delete(this.randomId),t.pendingHide&&t.hide()),t=t.parentPopper},$_isAimingPopper(){let e=this.$_referenceNode.getBoundingClientRect();if(sr>=e.left&&sr<=e.right&&cr>=e.top&&cr<=e.bottom){let e=this.$_popperNode.getBoundingClientRect(),t=sr-Q,n=cr-$,r=e.left+e.width/2-Q+(e.top+e.height/2)-$+e.width+e.height,i=Q+t*r,a=$+n*r;return lr(Q,$,i,a,e.left,e.top,e.left,e.bottom)||lr(Q,$,i,a,e.left,e.top,e.right,e.top)||lr(Q,$,i,a,e.right,e.top,e.right,e.bottom)||lr(Q,$,i,a,e.left,e.bottom,e.right,e.bottom)}return!1}},render(){return this.$slots.default(this.slotData)}});if(typeof document<`u`&&typeof window<`u`){if(Wn){let e=Un?{passive:!0,capture:!0}:!0;document.addEventListener(`touchstart`,e=>tr(e,!0),e),document.addEventListener(`touchend`,e=>nr(e,!0),e)}else window.addEventListener(`mousedown`,e=>tr(e,!1),!0),window.addEventListener(`click`,e=>nr(e,!1),!0);window.addEventListener(`resize`,or)}function tr(e,t){if(J.autoHideOnMousedown)rr(e,t);else for(let t=0;t=0;r--){let i=Y[r];try{let r=i.containsGlobalTarget=i.mouseDownContains||i.popperNode().contains(e.target);i.pendingHide=!1,requestAnimationFrame(()=>{if(i.pendingHide=!1,!n[i.randomId]&&ir(i,r,e)){if(i.$_handleGlobalClose(e,t),!e.closeAllPopover&&e.closePopover&&r){let e=i.parentPopper;for(;e;)n[e.randomId]=!0,e=e.parentPopper;return}let a=i.parentPopper;for(;a&&ir(a,a.containsGlobalTarget,e);)a.$_handleGlobalClose(e,t),a=a.parentPopper}})}catch{}}}function ir(e,t,n){return n.closeAllPopover||n.closePopover&&t||ar(e,n)&&!t}function ar(e,t){if(typeof e.autoHide==`function`){let n=e.autoHide(t);return e.lastAutoHide=n,n}return e.autoHide}function or(){for(let e=0;e{Q=sr,$=cr,sr=e.clientX,cr=e.clientY},Un?{passive:!0}:void 0);function lr(e,t,n,r,i,a,o,s){let c=((o-i)*(t-a)-(s-a)*(e-i))/((s-a)*(n-e)-(o-i)*(r-t)),l=((n-e)*(t-a)-(r-t)*(e-i))/((s-a)*(n-e)-(o-i)*(r-t));return c>=0&&c<=1&&l>=0&&l<=1}const ur={extends:er()},dr=(e,t)=>{let n=e.__vccOpts||e;for(let[e,r]of t)n[e]=r;return n};function fr(e,t,n,r,i,a){return w(),l(`div`,{ref:`reference`,class:b([`v-popper`,{"v-popper--shown":e.slotData.isShown}])},[k(e.$slots,`default`,x(m(e.slotData)))],2)}const pr=dr(ur,[[`render`,fr]]);function mr(){var e=window.navigator.userAgent,t=e.indexOf(`MSIE `);if(t>0)return parseInt(e.substring(t+5,e.indexOf(`.`,t)),10);var n=e.indexOf(`Trident/`);if(n>0){var r=e.indexOf(`rv:`);return parseInt(e.substring(r+3,e.indexOf(`.`,r)),10)}var i=e.indexOf(`Edge/`);return i>0?parseInt(e.substring(i+5,e.indexOf(`.`,i)),10):-1}let hr;function gr(){gr.init||(gr.init=!0,hr=mr()!==-1)}var _r={name:`ResizeObserver`,props:{emitOnMount:{type:Boolean,default:!1},ignoreWidth:{type:Boolean,default:!1},ignoreHeight:{type:Boolean,default:!1}},emits:[`notify`],mounted(){gr(),y(()=>{this._w=this.$el.offsetWidth,this._h=this.$el.offsetHeight,this.emitOnMount&&this.emitSize()});let e=document.createElement(`object`);this._resizeObject=e,e.setAttribute(`aria-hidden`,`true`),e.setAttribute(`tabindex`,-1),e.onload=this.addResizeHandlers,e.type=`text/html`,hr&&this.$el.appendChild(e),e.data=`about:blank`,hr||this.$el.appendChild(e)},beforeUnmount(){this.removeResizeHandlers()},methods:{compareAndNotify(){(!this.ignoreWidth&&this._w!==this.$el.offsetWidth||!this.ignoreHeight&&this._h!==this.$el.offsetHeight)&&(this._w=this.$el.offsetWidth,this._h=this.$el.offsetHeight,this.emitSize())},emitSize(){this.$emit(`notify`,{width:this._w,height:this._h})},addResizeHandlers(){this._resizeObject.contentDocument.defaultView.addEventListener(`resize`,this.compareAndNotify),this.compareAndNotify()},removeResizeHandlers(){this._resizeObject&&this._resizeObject.onload&&(!hr&&this._resizeObject.contentDocument&&this._resizeObject.contentDocument.defaultView.removeEventListener(`resize`,this.compareAndNotify),this.$el.removeChild(this._resizeObject),this._resizeObject.onload=null,this._resizeObject=null)}}};const vr=de(`data-v-b329ee4c`);ee(`data-v-b329ee4c`);const yr={class:`resize-observer`,tabindex:`-1`};T();const br=vr((e,t,n,r,i,a)=>(w(),s(`div`,yr)));_r.render=br,_r.__scopeId=`data-v-b329ee4c`,_r.__file=`src/components/ResizeObserver.vue`;const xr=(e=`theme`)=>({computed:{themeClass(){return Vn(this[e])}}}),Sr=f({name:`VPopperContent`,components:{ResizeObserver:_r},mixins:[xr()],props:{popperId:String,theme:String,shown:Boolean,mounted:Boolean,skipTransition:Boolean,autoHide:Boolean,handleResize:Boolean,classes:Object,result:Object},emits:[`hide`,`resize`],methods:{toPx(e){return e!=null&&!isNaN(e)?`${e}px`:null}}}),Cr=[`id`,`aria-hidden`,`tabindex`,`data-popper-placement`],wr={ref:`inner`,class:`v-popper__inner`},Tr=o(`div`,{class:`v-popper__arrow-outer`},null,-1),Er=o(`div`,{class:`v-popper__arrow-inner`},null,-1),Dr=[Tr,Er];function Or(e,n,r,i,a,u){let d=A(`ResizeObserver`);return w(),l(`div`,{id:e.popperId,ref:`popover`,class:b([`v-popper__popper`,[e.themeClass,e.classes.popperClass,{"v-popper__popper--shown":e.shown,"v-popper__popper--hidden":!e.shown,"v-popper__popper--show-from":e.classes.showFrom,"v-popper__popper--show-to":e.classes.showTo,"v-popper__popper--hide-from":e.classes.hideFrom,"v-popper__popper--hide-to":e.classes.hideTo,"v-popper__popper--skip-transition":e.skipTransition,"v-popper__popper--arrow-overflow":e.result&&e.result.arrow.overflow,"v-popper__popper--no-positioning":!e.result}]]),style:S(e.result?{position:e.result.strategy,transform:`translate3d(${Math.round(e.result.x)}px,${Math.round(e.result.y)}px,0)`}:void 0),"aria-hidden":e.shown?`false`:`true`,tabindex:e.autoHide?0:void 0,"data-popper-placement":e.result?e.result.placement:void 0,onKeyup:n[2]||=le(t=>e.autoHide&&e.$emit(`hide`),[`esc`])},[o(`div`,{class:`v-popper__backdrop`,onClick:n[0]||=t=>e.autoHide&&e.$emit(`hide`)}),o(`div`,{class:`v-popper__wrapper`,style:S(e.result?{transformOrigin:e.result.transformOrigin}:void 0)},[o(`div`,wr,[e.mounted?(w(),l(t,{key:0},[o(`div`,null,[k(e.$slots,`default`)]),e.handleResize?(w(),s(d,{key:0,onNotify:n[1]||=t=>e.$emit(`resize`,t)})):c(``,!0)],64)):c(``,!0)],512),o(`div`,{ref:`arrow`,class:`v-popper__arrow-container`,style:S(e.result?{left:e.toPx(e.result.arrow.x),top:e.toPx(e.result.arrow.y)}:void 0)},Dr,4)],4)],46,Cr)}const kr=dr(Sr,[[`render`,Or]]),Ar={methods:{show(...e){return this.$refs.popper.show(...e)},hide(...e){return this.$refs.popper.hide(...e)},dispose(...e){return this.$refs.popper.dispose(...e)},onResize(...e){return this.$refs.popper.onResize(...e)}}};let jr=function(){};typeof window<`u`&&(jr=window.Element);const Mr=f({name:`VPopperWrapper`,components:{Popper:pr,PopperContent:kr},mixins:[Ar,xr(`finalTheme`)],props:{theme:{type:String,default:null},referenceNode:{type:Function,default:null},shown:{type:Boolean,default:!1},showGroup:{type:String,default:null},ariaId:{default:null},disabled:{type:Boolean,default:void 0},positioningDisabled:{type:Boolean,default:void 0},placement:{type:String,default:void 0},delay:{type:[String,Number,Object],default:void 0},distance:{type:[Number,String],default:void 0},skidding:{type:[Number,String],default:void 0},triggers:{type:Array,default:void 0},showTriggers:{type:[Array,Function],default:void 0},hideTriggers:{type:[Array,Function],default:void 0},popperTriggers:{type:Array,default:void 0},popperShowTriggers:{type:[Array,Function],default:void 0},popperHideTriggers:{type:[Array,Function],default:void 0},container:{type:[String,Object,jr,Boolean],default:void 0},boundary:{type:[String,jr],default:void 0},strategy:{type:String,default:void 0},autoHide:{type:[Boolean,Function],default:void 0},handleResize:{type:Boolean,default:void 0},instantMove:{type:Boolean,default:void 0},eagerMount:{type:Boolean,default:void 0},popperClass:{type:[String,Array,Object],default:void 0},computeTransformOrigin:{type:Boolean,default:void 0},autoMinSize:{type:Boolean,default:void 0},autoSize:{type:[Boolean,String],default:void 0},autoMaxSize:{type:Boolean,default:void 0},autoBoundaryMaxSize:{type:Boolean,default:void 0},preventOverflow:{type:Boolean,default:void 0},overflowPadding:{type:[Number,String],default:void 0},arrowPadding:{type:[Number,String],default:void 0},arrowOverflow:{type:Boolean,default:void 0},flip:{type:Boolean,default:void 0},shift:{type:Boolean,default:void 0},shiftCrossAxis:{type:Boolean,default:void 0},noAutoFocus:{type:Boolean,default:void 0},disposeTimeout:{type:Number,default:void 0}},emits:{show:()=>!0,hide:()=>!0,"update:shown":e=>!0,"apply-show":()=>!0,"apply-hide":()=>!0,"close-group":()=>!0,"close-directive":()=>!0,"auto-hide":()=>!0,resize:()=>!0},computed:{finalTheme(){return this.theme??this.$options.vPopperTheme}},methods:{getTargetNodes(){return Array.from(this.$el.children).filter(e=>e!==this.$refs.popperContent.$el)}}});function Nr(e,t,n,r,i,a){let o=A(`PopperContent`),c=A(`Popper`);return w(),s(c,v({ref:`popper`},e.$props,{theme:e.finalTheme,"target-nodes":e.getTargetNodes,"popper-node":()=>e.$refs.popperContent.$el,class:[e.themeClass],onShow:t[0]||=()=>e.$emit(`show`),onHide:t[1]||=()=>e.$emit(`hide`),"onUpdate:shown":t[2]||=t=>e.$emit(`update:shown`,t),onApplyShow:t[3]||=()=>e.$emit(`apply-show`),onApplyHide:t[4]||=()=>e.$emit(`apply-hide`),onCloseGroup:t[5]||=()=>e.$emit(`close-group`),onCloseDirective:t[6]||=()=>e.$emit(`close-directive`),onAutoHide:t[7]||=()=>e.$emit(`auto-hide`),onResize:t[8]||=()=>e.$emit(`resize`)}),{default:P(({popperId:t,isShown:n,shouldMountContent:r,skipTransition:i,autoHide:a,show:s,hide:c,handleResize:l,onResize:u,classes:f,result:p})=>[k(e.$slots,`default`,{shown:n,show:s,hide:c}),d(o,{ref:`popperContent`,"popper-id":t,theme:e.finalTheme,shown:n,mounted:r,"skip-transition":i,"auto-hide":a,"handle-resize":l,classes:f,result:p,onHide:c,onResize:u},{default:P(()=>[k(e.$slots,`popper`,{shown:n,hide:c})]),_:2},1032,[`popper-id`,`theme`,`shown`,`mounted`,`skip-transition`,`auto-hide`,`handle-resize`,`classes`,`result`,`onHide`,`onResize`])]),_:3},16,[`theme`,`target-nodes`,`popper-node`,`class`])}const Pr=dr(Mr,[[`render`,Nr]]),Fr={...Pr,name:`VDropdown`,vPopperTheme:`dropdown`},Ir={...Pr,name:`VMenu`,vPopperTheme:`menu`},Lr={...Pr,name:`VTooltip`,vPopperTheme:`tooltip`},Rr=f({name:`VTooltipDirective`,components:{Popper:er(),PopperContent:kr},mixins:[Ar],inheritAttrs:!1,props:{theme:{type:String,default:`tooltip`},html:{type:Boolean,default:e=>Bn(e.theme,`html`)},content:{type:[String,Number,Function],default:null},loadingContent:{type:String,default:e=>Bn(e.theme,`loadingContent`)},targetNodes:{type:Function,required:!0}},data(){return{asyncContent:null}},computed:{isContentAsync(){return typeof this.content==`function`},loading(){return this.isContentAsync&&this.asyncContent==null},finalContent(){return this.isContentAsync?this.loading?this.loadingContent:this.asyncContent:this.content}},watch:{content:{handler(){this.fetchContent(!0)},immediate:!0},async finalContent(){await this.$nextTick(),this.$refs.popper.onResize()}},created(){this.$_fetchId=0},methods:{fetchContent(e){if(typeof this.content==`function`&&this.$_isShown&&(e||!this.$_loading&&this.asyncContent==null)){this.asyncContent=null,this.$_loading=!0;let e=++this.$_fetchId,t=this.content(this);t.then?t.then(t=>this.onResult(e,t)):this.onResult(e,t)}},onResult(e,t){e===this.$_fetchId&&(this.$_loading=!1,this.asyncContent=t)},onShow(){this.$_isShown=!0,this.fetchContent()},onHide(){this.$_isShown=!1}}}),zr=[`innerHTML`],Br=[`textContent`];function Vr(e,t,n,r,i,a){let o=A(`PopperContent`),c=A(`Popper`);return w(),s(c,v({ref:`popper`},e.$attrs,{theme:e.theme,"target-nodes":e.targetNodes,"popper-node":()=>e.$refs.popperContent.$el,onApplyShow:e.onShow,onApplyHide:e.onHide}),{default:P(({popperId:t,isShown:n,shouldMountContent:r,skipTransition:i,autoHide:a,hide:s,handleResize:c,onResize:u,classes:f,result:p})=>[d(o,{ref:`popperContent`,class:b({"v-popper--tooltip-loading":e.loading}),"popper-id":t,theme:e.theme,shown:n,mounted:r,"skip-transition":i,"auto-hide":a,"handle-resize":c,classes:f,result:p,onHide:s,onResize:u},{default:P(()=>[e.html?(w(),l(`div`,{key:0,innerHTML:e.finalContent},null,8,zr)):(w(),l(`div`,{key:1,textContent:j(e.finalContent)},null,8,Br))]),_:2},1032,[`class`,`popper-id`,`theme`,`shown`,`mounted`,`skip-transition`,`auto-hide`,`handle-resize`,`classes`,`result`,`onHide`,`onResize`])]),_:1},16,[`theme`,`target-nodes`,`popper-node`,`onApplyShow`,`onApplyHide`])}const Hr=dr(Rr,[[`render`,Vr]]),Ur=`v-popper--has-tooltip`;function Wr(e,t){let n=e.placement;if(!n&&t)for(let e of Gn)t[e]&&(n=e);return n||=Bn(e.theme||`tooltip`,`placement`),n}function Gr(e,t,n){let r,i=typeof t;return r=i===`string`?{content:t}:t&&i===`object`?t:{content:!1},r.placement=Wr(r,n),r.targetNodes=()=>[e],r.referenceNode=()=>e,r}let Kr,qr,Jr=0;function Yr(){if(Kr)return;qr=D([]),Kr=a({name:`VTooltipDirectiveApp`,setup(){return{directives:qr}},render(){return this.directives.map(e=>h(Hr,{...e.options,shown:e.shown||e.options.shown,key:e.id}))},devtools:{hide:!0}});let e=document.createElement(`div`);document.body.appendChild(e),Kr.mount(e)}function Xr(e,t,n){Yr();let r=D(Gr(e,t,n)),i=D(!1),a={id:Jr++,options:r,shown:i};return qr.value.push(a),e.classList&&e.classList.add(Ur),e.$_popper={options:r,item:a,show(){i.value=!0},hide(){i.value=!1}}}function Zr(e){if(e.$_popper){let t=qr.value.indexOf(e.$_popper.item);t!==-1&&qr.value.splice(t,1),delete e.$_popper,delete e.$_popperOldShown,delete e.$_popperMountTarget}e.classList&&e.classList.remove(Ur)}function Qr(e,{value:t,modifiers:n}){let r=Gr(e,t,n);if(!r.content||Bn(r.theme||`tooltip`,`disabled`))Zr(e);else{let i;e.$_popper?(i=e.$_popper,i.options.value=r):i=Xr(e,t,n),typeof t.shown<`u`&&t.shown!==e.$_popperOldShown&&(e.$_popperOldShown=t.shown,t.shown?i.show():i.hide())}}const $r={beforeMount:Qr,updated:Qr,beforeUnmount(e){Zr(e)}};function ei(e){e.addEventListener(`mousedown`,ni),e.addEventListener(`click`,ni),e.addEventListener(`touchstart`,ri,Un?{passive:!0}:!1)}function ti(e){e.removeEventListener(`mousedown`,ni),e.removeEventListener(`click`,ni),e.removeEventListener(`touchstart`,ri),e.removeEventListener(`touchend`,ii),e.removeEventListener(`touchcancel`,ai)}function ni(e){let t=e.currentTarget;e.closePopover=!t.$_vclosepopover_touch,e.closeAllPopover=t.$_closePopoverModifiers&&!!t.$_closePopoverModifiers.all}function ri(e){if(e.changedTouches.length===1){let t=e.currentTarget;t.$_vclosepopover_touch=!0;let n=e.changedTouches[0];t.$_vclosepopover_touchPoint=n,t.addEventListener(`touchend`,ii),t.addEventListener(`touchcancel`,ai)}}function ii(e){let t=e.currentTarget;if(t.$_vclosepopover_touch=!1,e.changedTouches.length===1){let n=e.changedTouches[0],r=t.$_vclosepopover_touchPoint;e.closePopover=Math.abs(n.screenY-r.screenY)<20&&Math.abs(n.screenX-r.screenX)<20,e.closeAllPopover=t.$_closePopoverModifiers&&!!t.$_closePopoverModifiers.all}}function ai(e){let t=e.currentTarget;t.$_vclosepopover_touch=!1}const oi={beforeMount(e,{value:t,modifiers:n}){e.$_closePopoverModifiers=n,(typeof t>`u`||t)&&ei(e)},updated(e,{value:t,oldValue:n,modifiers:r}){e.$_closePopoverModifiers=r,t!==n&&(typeof t>`u`||t?ei(e):ti(e))},beforeUnmount(e){ti(e)}},si=J,ci=$r,li=$r,ui=oi,di=oi,fi=Fr,pi=Ir,mi=er,hi=kr,gi=Ar,_i=Pr,vi=xr,yi=Lr,bi=Hr,xi={class:`flex-1 truncate`},Si={class:`min-w-[160px] flex flex-col gap-0.5 border border-neutral-200 rounded-lg bg-white p-1 shadow-lg dark:border-neutral-800 dark:bg-neutral-900`},Ci=[`onClick`];var wi=f({__name:`Select`,props:_({options:null,placeholder:null,disabled:{type:Boolean},title:null},{modelValue:{required:!0},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let n=e,r=N(e,`modelValue`),a=i(()=>{let e=n.options.find(e=>e.value===r.value);return e?e.label:n.placeholder});function c(e){r.value=e}return(e,i)=>(w(),s(M(fi),{"auto-size":``,"auto-boundary-max-size":``},{popper:P(({hide:i})=>[o(`div`,Si,[(w(!0),l(t,null,O(n.options,t=>(w(),l(`div`,v({ref_for:!0},{...e.$attrs,class:null,style:null},{key:t.value,class:[`cursor-pointer rounded px-2 py-1.5 text-sm text-neutral-700 hover:bg-neutral-100 dark:text-neutral-200 dark:hover:bg-neutral-800`,{"bg-neutral-100 dark:bg-neutral-800":r.value===t.value}],onClick:e=>{c(t.value),i()}}),j(t.label),17,Ci))),128))])]),default:P(()=>[o(`div`,{class:b([`min-w-[160px] flex cursor-pointer items-center justify-between gap-2 border rounded-lg bg-white p-2.5 text-xs text-neutral-700 shadow-sm outline-none transition-colors disabled:cursor-not-allowed dark:border-neutral-800 dark:bg-neutral-900 disabled:bg-neutral-100 hover:bg-neutral-50 dark:text-neutral-200 disabled:text-neutral-400 focus:ring-2 focus:ring-black/10 dark:disabled:bg-neutral-800 dark:hover:bg-neutral-800 dark:disabled:text-neutral-600`,{"pointer-events-none":n.disabled}])},[o(`div`,xi,[k(e.$slots,`default`,{label:a.value},()=>[u(j(a.value),1)])]),i[0]||=o(`div`,{"i-solar:alt-arrow-down-bold-duotone":``,class:`h-3.5 w-3.5 text-neutral-500 dark:text-neutral-400`},null,-1)],2)]),_:3}))}}),Ti=wi;export{dn as ColorHueRange_default,_t as FieldCheckbox_default,Ot as FieldInput_default,Bt as FieldKeyValues_default,Qt as FieldRange_default,cn as FieldValues_default,bt as Input_default,Ti as Select_default,Ie as arrow,Pe as computePosition,ve as createCoords,ze as flip,_e as floor,He as hide,Ke as limitShift,I as max,he as min,We as offset,V as rectToClientRect,ge as round,Ge as shift,qe as size}; \ No newline at end of file +import{Comment as e,Fragment as t,__plugin_vue_export_helper_default as n,cloneVNode as r,computed as i,createApp as a,createBaseVNode as o,createBlock as s,createCommentVNode as c,createElementBlock as l,createTextVNode as u,createVNode as d,defineComponent as f,getCurrentInstance as p,guardReactiveProps as m,h,inject as g,mergeModels as _,mergeProps as v,nextTick as y,normalizeClass as b,normalizeProps as x,normalizeStyle as S,onMounted as C,openBlock as w,popScopeId as T,provide as E,pushScopeId as ee,ref as D,renderList as O,renderSlot as k,resolveComponent as A,resolveDirective as te,toDisplayString as j,toRefs as ne,toValue as re,unref as M,unrefElement$1 as ie,useModel as N,useVModel as ae,vModelDynamic as oe,vModelText as se,watch as ce,withCtx as P,withDirectives as F,withKeys as le,withModifiers as ue,withScopeId as de}from"./index-CsmT0L1K.js";const fe=[`top`,`right`,`bottom`,`left`],pe=[`start`,`end`],me=fe.reduce((e,t)=>e.concat(t,t+`-`+pe[0],t+`-`+pe[1]),[]),he=Math.min,I=Math.max,ge=Math.round,_e=Math.floor,ve=e=>({x:e,y:e}),ye={left:`right`,right:`left`,bottom:`top`,top:`bottom`},be={start:`end`,end:`start`};function xe(e,t,n){return I(e,he(t,n))}function L(e,t){return typeof e==`function`?e(t):e}function R(e){return e.split(`-`)[0]}function z(e){return e.split(`-`)[1]}function Se(e){return e===`x`?`y`:`x`}function Ce(e){return e===`y`?`height`:`width`}function B(e){return[`top`,`bottom`].includes(R(e))?`y`:`x`}function we(e){return Se(B(e))}function Te(e,t,n){n===void 0&&(n=!1);let r=z(e),i=we(e),a=Ce(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=Ae(o)),[o,Ae(o)]}function Ee(e){let t=Ae(e);return[De(e),t,De(t)]}function De(e){return e.replace(/start|end/g,e=>be[e])}function Oe(e,t,n){let r=[`left`,`right`],i=[`right`,`left`],a=[`top`,`bottom`],o=[`bottom`,`top`];switch(e){case`top`:case`bottom`:return n?t?i:r:t?r:i;case`left`:case`right`:return t?a:o;default:return[]}}function ke(e,t,n,r){let i=z(e),a=Oe(R(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(De)))),a}function Ae(e){return e.replace(/left|right|bottom|top/g,e=>ye[e])}function je(e){return{top:0,right:0,bottom:0,left:0,...e}}function Me(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:je(e)}function V(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function Ne(e,t,n){let{reference:r,floating:i}=e,a=B(t),o=we(t),s=Ce(o),c=R(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}switch(z(t)){case`start`:p[o]-=f*(n&&l?-1:1);break;case`end`:p[o]+=f*(n&&l?-1:1);break}return p}const Pe=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=a.filter(Boolean),c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=Ne(l,r,c),f=r,p={},m=0;for(let n=0;n({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=L(e,t)||{};if(l==null)return{};let d=Me(u),f={x:n,y:r},p=we(i),m=Ce(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;(!C||!await(o.isElement==null?void 0:o.isElement(S)))&&(C=s.floating[y]||a.floating[m]);let w=b/2-x/2,T=C/2-h[m]/2-1,E=he(d[_],T),ee=he(d[v],T),D=E,O=C-h[m]-ee,k=C/2-h[m]/2+w,A=xe(D,k,O),te=!c.arrow&&z(i)!=null&&k!==A&&a.reference[m]/2-(kz(t)===e),...n.filter(t=>z(t)!==e)]:n.filter(e=>R(e)===e);return r.filter(n=>e?z(n)===e||(t?De(n)!==n:!1):!0)}const Re=function(e){return e===void 0&&(e={}),{name:`autoPlacement`,options:e,async fn(t){var n,r,i;let{rects:a,middlewareData:o,placement:s,platform:c,elements:l}=t,{crossAxis:u=!1,alignment:d,allowedPlacements:f=me,autoAlignment:p=!0,...m}=L(e,t),h=d!==void 0||f===me?Le(d||null,p,f):f,g=await Fe(t,m),_=(n=o.autoPlacement)?.index||0,v=h[_];if(v==null)return{};let y=Te(v,a,await(c.isRTL==null?void 0:c.isRTL(l.floating)));if(s!==v)return{reset:{placement:h[0]}};let b=[g[R(v)],g[y[0]],g[y[1]]],x=[...(r=o.autoPlacement)?.overflows||[],{placement:v,overflows:b}],S=h[_+1];if(S)return{data:{index:_+1,overflows:x},reset:{placement:S}};let C=x.map(e=>{let t=z(e.placement);return[e.placement,t&&u?e.overflows.slice(0,2).reduce((e,t)=>e+t,0):e.overflows[0],e.overflows]}).sort((e,t)=>e[1]-t[1]),w=C.filter(e=>e[2].slice(0,z(e[0])?2:3).every(e=>e<=0)),T=(i=w[0])?.[0]||C[0][0];return T===s?{}:{data:{index:_+1,overflows:x},reset:{placement:T}}}}},ze=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n,r;let{placement:i,middlewareData:a,rects:o,initialPlacement:s,platform:c,elements:l}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:p=`bestFit`,fallbackAxisSideDirection:m=`none`,flipAlignment:h=!0,...g}=L(e,t);if((n=a.arrow)!=null&&n.alignmentOffset)return{};let _=R(i),v=B(s),y=R(s)===s,b=await(c.isRTL==null?void 0:c.isRTL(l.floating)),x=f||(y||!h?[Ae(s)]:Ee(s)),S=m!==`none`;!f&&S&&x.push(...ke(s,h,m,b));let C=[s,...x],w=await Fe(t,g),T=[],E=(r=a.flip)?.overflows||[];if(u&&T.push(w[_]),d){let e=Te(i,o,b);T.push(w[e[0]],w[e[1]])}if(E=[...E,{placement:i,overflows:T}],!T.every(e=>e<=0)){var ee,D;let e=((ee=a.flip)?.index||0)+1,t=C[e];if(t)return{data:{index:e,overflows:E},reset:{placement:t}};let n=(D=E.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?.placement;if(!n)switch(p){case`bestFit`:{var O;let e=(O=E.filter(e=>{if(S){let t=B(e.placement);return t===v||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?.[0];e&&(n=e);break}case`initialPlacement`:n=s;break}if(i!==n)return{reset:{placement:n}}}return{}}}};function Be(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Ve(e){return fe.some(t=>e[t]>=0)}const He=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n}=t,{strategy:r=`referenceHidden`,...i}=L(e,t);switch(r){case`referenceHidden`:{let e=await Fe(t,{...i,elementContext:`reference`}),r=Be(e,n.reference);return{data:{referenceHiddenOffsets:r,referenceHidden:Ve(r)}}}case`escaped`:{let e=await Fe(t,{...i,altBoundary:!0}),r=Be(e,n.floating);return{data:{escapedOffsets:r,escaped:Ve(r)}}}default:return{}}}}};async function Ue(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=R(n),s=z(n),c=B(n)===`y`,l=[`left`,`top`].includes(o)?-1:1,u=a&&c?-1:1,d=L(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}const We=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n,r;let{x:i,y:a,placement:o,middlewareData:s}=t,c=await Ue(t,e);return o===(n=s.offset)?.placement&&(r=s.arrow)!=null&&r.alignmentOffset?{}:{x:i+c.x,y:a+c.y,data:{...c,placement:o}}}}},Ge=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i}=t,{mainAxis:a=!0,crossAxis:o=!1,limiter:s={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...c}=L(e,t),l={x:n,y:r},u=await Fe(t,c),d=B(R(i)),f=Se(d),p=l[f],m=l[d];if(a){let e=f===`y`?`top`:`left`,t=f===`y`?`bottom`:`right`,n=p+u[e],r=p-u[t];p=xe(n,p,r)}if(o){let e=d===`y`?`top`:`left`,t=d===`y`?`bottom`:`right`,n=m+u[e],r=m-u[t];m=xe(n,m,r)}let h=s.fn({...t,[f]:p,[d]:m});return{...h,data:{x:h.x-n,y:h.y-r,enabled:{[f]:a,[d]:o}}}}}},Ke=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=L(e,t),u={x:n,y:r},d=B(i),f=Se(d),p=u[f],m=u[d],h=L(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;pn&&(p=n)}if(l){var _,v;let e=f===`y`?`width`:`height`,t=[`top`,`left`].includes(R(i)),n=a.reference[d]-a.floating[e]+(t&&(_=o.offset)?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:(v=o.offset)?.[d]||0)-(t?g.crossAxis:0);mr&&(m=r)}return{[f]:p,[d]:m}}}},qe=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){var n,r;let{placement:i,rects:a,platform:o,elements:s}=t,{apply:c=()=>{},...l}=L(e,t),u=await Fe(t,l),d=R(i),f=z(i),p=B(i)===`y`,{width:m,height:h}=a.floating,g,_;d===`top`||d===`bottom`?(g=d,_=f===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?`start`:`end`)?`left`:`right`):(_=d,g=f===`end`?`top`:`bottom`);let v=h-u.top-u.bottom,y=m-u.left-u.right,b=he(h-u[g],v),x=he(m-u[_],y),S=!t.middlewareData.shift,C=b,w=x;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(w=y),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(C=v),S&&!f){let e=I(u.left,0),t=I(u.right,0),n=I(u.top,0),r=I(u.bottom,0);p?w=m-2*(e!==0||t!==0?e+t:I(u.left,u.right)):C=h-2*(n!==0||r!==0?n+r:I(u.top,u.bottom))}await c({...t,availableWidth:w,availableHeight:C});let T=await o.getDimensions(s.floating);return m!==T.width||h!==T.height?{reset:{rects:!0}}:{}}}};function Je(e){return e?e.flatMap(e=>e.type===t?Je(e.children):[e]):[]}const Ye=f({name:`PrimitiveSlot`,inheritAttrs:!1,setup(t,{attrs:n,slots:i}){return()=>{var t;if(!i.default)return null;let a=Je(i.default()),o=a.findIndex(t=>t.type!==e);if(o===-1)return a;let s=a[o];(t=s.props)==null||delete t.ref;let c=s.props?v(n,s.props):n,l=r({...s,props:{}},c);return a.length===1?l:(a[o]=l,a)}}}),Xe=[`area`,`img`,`input`],Ze=f({name:`Primitive`,inheritAttrs:!1,props:{asChild:{type:Boolean,default:!1},as:{type:[String,Object],default:`div`}},setup(e,{attrs:t,slots:n}){let r=e.asChild?`template`:e.as;return typeof r==`string`&&Xe.includes(r)?()=>h(r,t):r===`template`?()=>h(Ye,t,{default:n.default}):()=>h(e.as,t,{default:n.default})}}),Qe=f({__name:`VisuallyHidden`,props:{feature:{default:`focusable`},asChild:{type:Boolean},as:{default:`span`}},setup(e){return(e,t)=>(w(),s(M(Ze),{as:e.as,"as-child":e.asChild,"aria-hidden":e.feature===`focusable`?`true`:void 0,"data-hidden":e.feature===`fully-hidden`?``:void 0,tabindex:e.feature===`fully-hidden`?`-1`:void 0,style:{position:`absolute`,border:0,width:`1px`,height:`1px`,padding:0,margin:`-1px`,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,clipPath:`inset(50%)`,whiteSpace:`nowrap`,wordWrap:`normal`}},{default:P(()=>[k(e.$slots,`default`)]),_:3},8,[`as`,`as-child`,`aria-hidden`,`data-hidden`,`tabindex`]))}});function $e(e,t){let n=typeof e==`string`&&!t?`${e}Context`:t,r=Symbol(n),i=t=>{let n=g(r,t);if(n||n===null)return n;throw Error(`Injection \`${r.toString()}\` not found. Component must be used within ${Array.isArray(e)?`one of the following components: ${e.join(`, `)}`:`\`${e}\``}`)},a=e=>(E(r,e),e);return[i,a]}function et(){let e=p(),t=D(),n=i(()=>{var e,n;return[`#text`,`#comment`].includes((e=t.value)?.$el.nodeName)?(n=t.value)?.$el.nextElementSibling:ie(t)}),r=Object.assign({},e.exposed),a={};for(let t in e.props)Object.defineProperty(a,t,{enumerable:!0,configurable:!0,get:()=>e.props[t]});if(Object.keys(r).length>0)for(let e in r)Object.defineProperty(a,e,{enumerable:!0,configurable:!0,get:()=>r[e]});Object.defineProperty(a,`$el`,{enumerable:!0,configurable:!0,get:()=>e.vnode.el}),e.exposed=a;function o(n){t.value=n,n&&(Object.defineProperty(a,`$el`,{enumerable:!0,configurable:!0,get:()=>n instanceof Element?n:n.$el}),e.exposed=a)}return{forwardRef:o,currentRef:t,currentElement:n}}function tt(){let e=D(),t=i(()=>{var t,n;return[`#text`,`#comment`].includes((t=e.value)?.$el.nodeName)?(n=e.value)?.$el.nextElementSibling:ie(e)});return{primitiveElement:e,currentElement:t}}function nt(e){return i(()=>{var t;return re(e)?!!(t=ie(e))?.closest(`form`):!0})}const rt=f({inheritAttrs:!1,__name:`VisuallyHiddenInputBubble`,props:{name:{},value:{},checked:{type:Boolean,default:void 0},required:{type:Boolean},disabled:{type:Boolean},feature:{default:`fully-hidden`}},setup(e){let t=e,{primitiveElement:n,currentElement:r}=tt(),a=i(()=>t.checked??t.value);return ce(a,(e,t)=>{if(!r.value)return;let n=r.value,i=window.HTMLInputElement.prototype,a=Object.getOwnPropertyDescriptor(i,`value`),o=a.set;if(o&&e!==t){let t=new Event(`input`,{bubbles:!0}),r=new Event(`change`,{bubbles:!0});o.call(n,e),n.dispatchEvent(t),n.dispatchEvent(r)}}),(e,r)=>(w(),s(Qe,v({ref_key:`primitiveElement`,ref:n},{...t,...e.$attrs},{as:`input`}),null,16))}}),it=f({inheritAttrs:!1,__name:`VisuallyHiddenInput`,props:{name:{},value:{},checked:{type:Boolean,default:void 0},required:{type:Boolean},disabled:{type:Boolean},feature:{default:`fully-hidden`}},setup(e){let n=e,r=i(()=>typeof n.value==`object`&&Array.isArray(n.value)&&n.value.length===0&&n.required),a=i(()=>typeof n.value==`string`||typeof n.value==`number`||typeof n.value==`boolean`?[{name:n.name,value:n.value}]:typeof n.value==`object`&&Array.isArray(n.value)?n.value.flatMap((e,t)=>typeof e==`object`?Object.entries(e).map(([e,r])=>({name:`[${n.name}][${t}][${e}]`,value:r})):{name:`[${n.name}][${t}]`,value:e}):n.value!==null&&typeof n.value==`object`&&!Array.isArray(n.value)?Object.entries(n.value).map(([e,t])=>({name:`[${n.name}][${e}]`,value:t})):[]);return(e,i)=>r.value?(w(),s(rt,v({key:e.name},{...n,...e.$attrs},{name:e.name,value:e.value}),null,16,[`name`,`value`])):(w(!0),l(t,{key:1},O(a.value,t=>(w(),s(rt,v({key:t.name,ref_for:!0},{...n,...e.$attrs},{name:t.name,value:t.value}),null,16,[`name`,`value`]))),128))}}),[at,ot]=$e(`SwitchRoot`),st=f({__name:`SwitchRoot`,props:{defaultValue:{type:Boolean},modelValue:{type:[Boolean,null],default:void 0},disabled:{type:Boolean},id:{},value:{default:`on`},asChild:{type:Boolean},as:{default:`button`},name:{},required:{type:Boolean}},emits:[`update:modelValue`],setup(e,{emit:t}){let n=e,r=t,{disabled:a}=ne(n),o=ae(n,`modelValue`,r,{defaultValue:n.defaultValue,passive:n.modelValue===void 0});function l(){a.value||(o.value=!o.value)}let{forwardRef:u,currentElement:d}=et(),f=nt(d),p=i(()=>{var e;return n.id&&d.value?(e=document.querySelector(`[for="${n.id}"]`))?.innerText:void 0});return ot({modelValue:o,toggleCheck:l,disabled:a}),(e,t)=>(w(),s(M(Ze),v(e.$attrs,{id:e.id,ref:M(u),role:`switch`,type:e.as===`button`?`button`:void 0,value:e.value,"aria-label":e.$attrs[`aria-label`]||p.value,"aria-checked":M(o),"aria-required":e.required,"data-state":M(o)?`checked`:`unchecked`,"data-disabled":M(a)?``:void 0,"as-child":e.asChild,as:e.as,disabled:M(a),onClick:l,onKeydown:le(ue(l,[`prevent`]),[`enter`])}),{default:P(()=>[k(e.$slots,`default`,{modelValue:M(o)}),M(f)&&e.name?(w(),s(M(it),{key:0,type:`checkbox`,name:e.name,disabled:M(a),required:e.required,value:e.value,checked:!!M(o)},null,8,[`name`,`disabled`,`required`,`value`,`checked`])):c(``,!0)]),_:3},16,[`id`,`type`,`value`,`aria-label`,`aria-checked`,`aria-required`,`data-state`,`data-disabled`,`as-child`,`as`,`disabled`,`onKeydown`]))}}),ct=f({__name:`SwitchThumb`,props:{asChild:{type:Boolean},as:{default:`span`}},setup(e){let t=at();return et(),(e,n)=>{var r;return w(),s(M(Ze),{"data-state":(r=M(t).modelValue)?.value?`checked`:`unchecked`,"data-disabled":M(t).disabled.value?``:void 0,"as-child":e.asChild,as:e.as},{default:P(()=>[k(e.$slots,`default`)]),_:3},8,[`data-state`,`data-disabled`,`as-child`,`as`])}}});var lt=f({__name:`Checkbox`,props:{modelValue:{type:Boolean,required:!0},modelModifiers:{}},emits:[`update:modelValue`],setup(e){let t=N(e,`modelValue`);return(e,n)=>(w(),s(M(st),{modelValue:t.value,"onUpdate:modelValue":n[0]||=e=>t.value=e,transition:`background duration-250 ease-in-out`,outline:`focus-within:none`,flex:`~`,border:`neutral-300 dark:neutral-700 data-[state=checked]:primary-200 data-[state=unchecked]:neutral-300 focus-within:neutral-800`,bg:`data-[state=checked]:primary-400 data-[state=unchecked]:neutral-300 data-[state=checked]:dark:primary-400/80 dark:data-[state=unchecked]:neutral-800`,relative:``,"h-7":``,w:`12.5`,"rounded-full":``,shadow:`sm focus-within:shadow-neutral-800 focus-within:[0_0_0_1px] `},{default:P(()=>[d(M(ct),{"my-auto":``,"size-6":``,flex:``,"items-center":``,"justify-center":``,"translate-x":`0.5 data-[state=checked]:full`,"rounded-full":``,"bg-white":``,"text-xs":``,"shadow-xl":``,transition:`transform duration-250 ease-in-out`,"will-change-transform":``})]),_:1},8,[`modelValue`]))}}),ut=lt;const dt={flex:`~ col gap-4`},ft={flex:`~ row`,"items-center":``,"gap-2":``},pt={flex:`1`},mt={class:`flex items-center gap-1 text-sm font-medium`},ht={class:`text-xs text-neutral-500 dark:text-neutral-400`};var gt=f({__name:`FieldCheckbox`,props:_({label:null,description:null},{modelValue:{type:Boolean,required:!0},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let t=e,n=N(e,`modelValue`);return(e,r)=>(w(),l(`label`,dt,[o(`div`,ft,[o(`div`,pt,[o(`div`,mt,j(t.label),1),o(`div`,ht,j(t.description),1)]),d(ut,{modelValue:n.value,"onUpdate:modelValue":r[0]||=e=>n.value=e},null,8,[`modelValue`])])]))}}),_t=gt;const vt=[`type`];var yt=f({__name:`Input`,props:_({type:null},{modelValue:{required:!0},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let t=e,n=N(e,`modelValue`);return(e,r)=>F((w(),l(`input`,{"onUpdate:modelValue":r[0]||=e=>n.value=e,type:t.type||`text`,border:`focus:primary-300 dark:focus:primary-400/50 2 solid neutral-100 dark:neutral-900`,transition:`all duration-200 ease-in-out`,text:`disabled:neutral-400 dark:disabled:neutral-600`,cursor:`disabled:not-allowed`,"w-full":``,"rounded-lg":``,"px-2":``,"py-1":``,"text-nowrap":``,"text-sm":``,"outline-none":``,shadow:`sm`,bg:`neutral-50 dark:neutral-950 focus:neutral-50 dark:focus:neutral-900`},null,8,vt)),[[oe,n.value]])}}),bt=yt;const xt={"max-w-full":``},St={flex:`~ col gap-4`},Ct={class:`flex items-center gap-1 text-sm font-medium`},wt={key:0,class:`text-red-500`},Tt={class:`text-xs text-neutral-500 dark:text-neutral-400`,"text-nowrap":``},Et=[`type`,`placeholder`];var Dt=f({__name:`FieldInput`,props:_({label:null,description:null,placeholder:null,required:{type:Boolean},type:null,inputClass:null,singleLine:{type:Boolean,default:!0}},{modelValue:{required:!0},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let t=e,n=N(e,`modelValue`);return(r,i)=>(w(),l(`div`,xt,[o(`label`,St,[o(`div`,null,[o(`div`,Ct,[u(j(t.label)+` `,1),t.required===!1?c(``,!0):(w(),l(`span`,wt,`*`))]),o(`div`,Tt,j(t.description),1)]),e.singleLine?(w(),s(bt,{key:0,modelValue:n.value,"onUpdate:modelValue":i[0]||=e=>n.value=e,type:t.type,placeholder:t.placeholder,class:b(t.inputClass)},null,8,[`modelValue`,`type`,`placeholder`,`class`])):F((w(),l(`textarea`,{key:1,"onUpdate:modelValue":i[1]||=e=>n.value=e,type:t.type,placeholder:t.placeholder,class:b(t.inputClass),border:`focus:primary-300 dark:focus:primary-400/50 2 solid neutral-100 dark:neutral-900`,transition:`all duration-200 ease-in-out`,text:`disabled:neutral-400 dark:disabled:neutral-600`,cursor:`disabled:not-allowed`,"w-full":``,"rounded-lg":``,"px-2":``,"py-1":``,"text-sm":``,"outline-none":``,shadow:`sm`,bg:`neutral-50 dark:neutral-950 focus:neutral-50 dark:focus:neutral-900`},null,10,Et)),[[se,n.value]])])]))}}),Ot=Dt;const kt={flex:`~ gap-2`};var At=f({__name:`InputKeyValue`,props:_({name:null,keyPlaceholder:null,valuePlaceholder:null},{propertyKey:{required:!0},propertyKeyModifiers:{},propertyValue:{required:!0},propertyValueModifiers:{}}),emits:[`update:propertyKey`,`update:propertyValue`],setup(e){let t=e,n=N(e,`propertyKey`),r=N(e,`propertyValue`);return(e,i)=>(w(),l(`div`,kt,[d(bt,{modelValue:n.value,"onUpdate:modelValue":i[0]||=e=>n.value=e,placeholder:t.keyPlaceholder,class:`w-1/2`},null,8,[`modelValue`,`placeholder`]),d(bt,{modelValue:r.value,"onUpdate:modelValue":i[1]||=e=>r.value=e,placeholder:t.valuePlaceholder,class:`w-1/2`},null,8,[`modelValue`,`placeholder`])]))}}),jt=At;const Mt={"max-w-full":``},Nt={flex:`~ col gap-2`},Pt={class:`flex items-center gap-1 text-sm font-medium`},Ft={key:0,class:`text-red-500`},It={class:`text-xs text-neutral-500 dark:text-neutral-400`,"text-nowrap":``},Lt={flex:`~ col gap-2`},Rt=[`onClick`];var zt=f({__name:`FieldKeyValues`,props:_({label:null,description:null,name:null,keyPlaceholder:null,valuePlaceholder:null,required:{type:Boolean},inputClass:null},{modelValue:{required:!0},modelModifiers:{}}),emits:_([`remove`,`add`],[`update:modelValue`]),setup(e,{emit:n}){let r=e,i=n,a=N(e,`modelValue`),s=D(``),f=D(``);return ce([s,f],()=>{i(`add`,s.value,f.value)}),(e,n)=>{let s=te(`auto-animate`);return w(),l(`div`,Mt,[o(`label`,Nt,[o(`div`,null,[o(`div`,Pt,[u(j(r.label)+` `,1),r.required===!1?c(``,!0):(w(),l(`span`,Ft,`*`))]),o(`div`,It,j(r.description),1)]),F((w(),l(`div`,Lt,[(w(!0),l(t,null,O(a.value,(e,t)=>(w(),l(`div`,{key:t,"w-full":``,flex:``,"items-center":``,"gap-2":``},[d(jt,{"property-key":e.key,"onUpdate:propertyKey":t=>e.key=t,"property-value":e.value,"onUpdate:propertyValue":t=>e.value=t,"key-placeholder":r.keyPlaceholder,"value-placeholder":r.valuePlaceholder,"w-full":``},null,8,[`property-key`,`onUpdate:propertyKey`,`property-value`,`onUpdate:propertyValue`,`key-placeholder`,`value-placeholder`]),o(`button`,{onClick:e=>i(`remove`,t)},n[0]||=[o(`div`,{"i-solar:minus-circle-line-duotone":``,size:`6`},null,-1)],8,Rt)]))),128))])),[[s]])])])}}}),Bt=zt;const Vt=[`min`,`max`,`step`];var Ht=f({__name:`Range`,props:_({min:{default:0},max:{default:100},step:{default:1},disabled:{type:Boolean,default:!1},thumbColor:{default:`#9090906e`},trackColor:{default:`gray`},trackValueColor:{default:`red`}},{modelValue:{required:!0},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let t=e,n=N(e,`modelValue`),r=i(()=>t.min*1e4),a=i(()=>t.max*1e4),o=i(()=>t.step*1e4),s=D(),c=i({get:()=>n.value*1e4,set:e=>{n.value=e/1e4,u()}});C(()=>{u()});function u(){s.value&&(s.value.style.setProperty(`--value`,s.value.value),s.value.style.setProperty(`--min`,s.value.min?s.value.min:t.min.toString()),s.value.style.setProperty(`--max`,s.value.max?s.value.max:t.max.toString()))}function d(e){let t=e.target;t.style.setProperty(`--value`,t.value)}return(e,t)=>F((w(),l(`input`,{ref_key:`sliderRef`,ref:s,"onUpdate:modelValue":t[0]||=e=>c.value=e,type:`range`,min:r.value,max:a.value,step:o.value,class:`slider-progress form_input-range`,onInput:d},null,40,Vt)),[[se,c.value,void 0,{number:!0}]])}}),Ut=n(Ht,[[`__scopeId`,`data-v-c59a94f0`]]);const Wt={flex:`~ col gap-4`},Gt={flex:`~ row`,"items-center":``,"gap-2":``},Kt={flex:`1`},qt={class:`flex items-center gap-1 text-sm font-medium`},Jt={class:`text-xs text-neutral-500 dark:text-neutral-400`},Yt={"font-mono":``},Xt={flex:`~ row`,"items-center":``,"gap-2":``};var Zt=f({__name:`FieldRange`,props:_({min:null,max:null,step:null,label:null,description:null,formatValue:{type:Function}},{modelValue:{required:!0},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let t=e,n=N(e,`modelValue`);return(r,i)=>{var a;return w(),l(`label`,Wt,[o(`div`,Gt,[o(`div`,Kt,[o(`div`,qt,j(e.label),1),o(`div`,Jt,j(e.description),1)]),o(`span`,Yt,j((a=t.formatValue)?.call(t,n.value)||n.value),1)]),o(`div`,Xt,[d(Ut,{modelValue:n.value,"onUpdate:modelValue":i[0]||=e=>n.value=e,min:e.min||0,max:e.max||1,step:e.step||.01,"w-full":``},null,8,[`modelValue`,`min`,`max`,`step`])])])}}}),Qt=Zt;const $t={class:`max-w-full`},en={class:`flex flex-col gap-2`},tn={class:`flex items-center gap-1 text-sm font-medium`},nn={key:0,class:`text-red-500`},rn={class:`text-nowrap text-xs text-neutral-500 dark:text-neutral-400`},an={class:`~ col gap-2`},on=[`onClick`];var sn=f({__name:`FieldValues`,props:_({label:null,description:null,name:null,valuePlaceholder:null,required:{type:Boolean},inputClass:null},{modelValue:{required:!0},modelModifiers:{}}),emits:_([`remove`,`add`],[`update:modelValue`]),setup(e,{emit:n}){let r=e,i=n,a=N(e,`modelValue`);function s(){a.value.push(``),i(`add`)}function f(e){a.value.splice(e,1),i(`remove`,e)}return(e,n)=>{let i=te(`auto-animate`);return w(),l(`div`,$t,[o(`label`,en,[o(`div`,null,[o(`div`,tn,[u(j(r.label)+` `,1),r.required===!1?c(``,!0):(w(),l(`span`,nn,`*`))]),o(`div`,rn,j(r.description),1)]),F((w(),l(`div`,an,[(w(!0),l(t,null,O(a.value,(e,t)=>(w(),l(`div`,{key:t,class:`w-full flex items-center gap-2`},[d(bt,{modelValue:a.value[t],"onUpdate:modelValue":e=>a.value[t]=e,placeholder:r.valuePlaceholder,class:`w-90%`},null,8,[`modelValue`,`onUpdate:modelValue`,`placeholder`]),o(`button`,{"i-solar:minus-circle-line-duotone":``,size:`6`,class:`min-w-20px w-10% flex text-red-500`,onClick:e=>f(t)},null,8,on)]))),128)),o(`div`,{"i-solar:add-circle-line-duotone":``,size:`6`,class:`mt-2 w-4/5 text-blue-500`,onClick:s})])),[[i]])])])}}}),cn=sn;const ln=[`disabled`];var un=f({__name:`ColorHueRange`,props:_({disabled:{type:Boolean},class:null},{colorValue:{type:String,default:``},colorValueModifiers:{}}),emits:[`update:colorValue`],setup(e){let t=e,n=N(e,`colorValue`);return(e,r)=>F((w(),l(`input`,{"onUpdate:modelValue":r[0]||=e=>n.value=e,type:`range`,min:`0`,max:`360`,step:`0.01`,class:b([`color-hue-range`,[t.disabled?`opacity-25 cursor-not-allowed`:`cursor-pointer`,t.class||``]]),transition:`all ease-in-out duration-250`,disabled:t.disabled},null,10,ln)),[[se,n.value]])}}),dn=n(un,[[`__scopeId`,`data-v-ae80cb9d`]]);function H(e){var t;return(t=e.ownerDocument)?.defaultView||window}function U(e){return H(e).getComputedStyle(e)}const fn=Math.min,pn=Math.max,mn=Math.round;function hn(e){let t=U(e),n=parseFloat(t.width),r=parseFloat(t.height),i=e.offsetWidth,a=e.offsetHeight,o=mn(n)!==i||mn(r)!==a;return o&&(n=i,r=a),{width:n,height:r,fallback:o}}function W(e){return vn(e)?(e.nodeName||``).toLowerCase():``}let gn;function _n(){if(gn)return gn;let e=navigator.userAgentData;return e&&Array.isArray(e.brands)?(gn=e.brands.map(e=>e.brand+`/`+e.version).join(` `),gn):navigator.userAgent}function G(e){return e instanceof H(e).HTMLElement}function K(e){return e instanceof H(e).Element}function vn(e){return e instanceof H(e).Node}function yn(e){return typeof ShadowRoot>`u`?!1:e instanceof H(e).ShadowRoot||e instanceof ShadowRoot}function bn(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=U(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&![`inline`,`contents`].includes(i)}function xn(e){return[`table`,`td`,`th`].includes(W(e))}function Sn(e){let t=/firefox/i.test(_n()),n=U(e),r=n.backdropFilter||n.WebkitBackdropFilter;return n.transform!==`none`||n.perspective!==`none`||!!r&&r!==`none`||t&&n.willChange===`filter`||t&&!!n.filter&&n.filter!==`none`||[`transform`,`perspective`].some(e=>n.willChange.includes(e))||[`paint`,`layout`,`strict`,`content`].some(e=>{let t=n.contain;return t!=null&&t.includes(e)})}function Cn(){return!/^((?!chrome|android).)*safari/i.test(_n())}function wn(e){return[`html`,`body`,`#document`].includes(W(e))}function Tn(e){return K(e)?e:e.contextElement}const En={x:1,y:1};function Dn(e){let t=Tn(e);if(!G(t))return En;let n=t.getBoundingClientRect(),{width:r,height:i,fallback:a}=hn(t),o=(a?mn(n.width):n.width)/r,s=(a?mn(n.height):n.height)/i;return o&&Number.isFinite(o)||(o=1),s&&Number.isFinite(s)||(s=1),{x:o,y:s}}function On(e,t,n,r){var i,a;t===void 0&&(t=!1),n===void 0&&(n=!1);let o=e.getBoundingClientRect(),s=Tn(e),c=En;t&&(r?K(r)&&(c=Dn(r)):c=Dn(e));let l=s?H(s):window,u=!Cn()&&n,d=(o.left+(u&&(i=l.visualViewport)?.offsetLeft||0))/c.x,f=(o.top+(u&&(a=l.visualViewport)?.offsetTop||0))/c.y,p=o.width/c.x,m=o.height/c.y;if(s){let e=H(s),t=r&&K(r)?H(r):r,n=e.frameElement;for(;n&&r&&t!==e;){let e=Dn(n),t=n.getBoundingClientRect(),r=getComputedStyle(n);t.x+=(n.clientLeft+parseFloat(r.paddingLeft))*e.x,t.y+=(n.clientTop+parseFloat(r.paddingTop))*e.y,d*=e.x,f*=e.y,p*=e.x,m*=e.y,d+=t.x,f+=t.y,n=H(n).frameElement}}return{width:p,height:m,top:f,right:d+p,bottom:f+m,left:d,x:d,y:f}}function q(e){return((vn(e)?e.ownerDocument:e.document)||window.document).documentElement}function kn(e){return K(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function An(e){return On(q(e)).left+kn(e).scrollLeft}function jn(e){if(W(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||yn(e)&&e.host||q(e);return yn(t)?t.host:t}function Mn(e){let t=jn(e);return wn(t)?t.ownerDocument.body:G(t)&&bn(t)?t:Mn(t)}function Nn(e,t){var n;t===void 0&&(t=[]);let r=Mn(e),i=r===(n=e.ownerDocument)?.body,a=H(r);return i?t.concat(a,a.visualViewport||[],bn(r)?r:[]):t.concat(r,Nn(r))}function Pn(e,t,n){return t===`viewport`?V(function(e,t){let n=H(e),r=q(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=Cn();(e||!e&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}return{width:a,height:o,x:s,y:c}}(e,n)):K(t)?V(function(e,t){let n=On(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=G(e)?Dn(e):{x:1,y:1};return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}(t,n)):V(function(e){let t=q(e),n=kn(e),r=e.ownerDocument.body,i=pn(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=pn(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+An(e),s=-n.scrollTop;return U(r).direction===`rtl`&&(o+=pn(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}(q(e)))}function Fn(e){return G(e)&&U(e).position!==`fixed`?e.offsetParent:null}function In(e){let t=H(e),n=Fn(e);for(;n&&xn(n)&&U(n).position===`static`;)n=Fn(n);return n&&(W(n)===`html`||W(n)===`body`&&U(n).position===`static`&&!Sn(n))?t:n||function(e){let t=jn(e);for(;G(t)&&!wn(t);){if(Sn(t))return t;t=jn(t)}return null}(e)||t}function Ln(e,t,n){let r=G(t),i=q(t),a=On(e,!0,n===`fixed`,t),o={scrollLeft:0,scrollTop:0},s={x:0,y:0};if(r||!r&&n!==`fixed`)if((W(t)!==`body`||bn(i))&&(o=kn(t)),G(t)){let e=On(t,!0);s.x=e.x+t.clientLeft,s.y=e.y+t.clientTop}else i&&(s.x=An(i));return{x:a.left+o.scrollLeft-s.x,y:a.top+o.scrollTop-s.y,width:a.width,height:a.height}}const Rn={getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=n===`clippingAncestors`?function(e,t){let n=t.get(e);if(n)return n;let r=Nn(e).filter(e=>K(e)&&W(e)!==`body`),i=null,a=U(e).position===`fixed`,o=a?jn(e):e;for(;K(o)&&!wn(o);){let e=U(o),t=Sn(o);(a?t||i:t||e.position!==`static`||!i||![`absolute`,`fixed`].includes(i.position))?i=e:r=r.filter(e=>e!==o),o=jn(o)}return t.set(e,r),r}(t,this._c):[].concat(n),o=[...a,r],s=o[0],c=o.reduce((e,n)=>{let r=Pn(t,n,i);return e.top=pn(r.top,e.top),e.right=fn(r.right,e.right),e.bottom=fn(r.bottom,e.bottom),e.left=pn(r.left,e.left),e},Pn(t,s,i));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{rect:t,offsetParent:n,strategy:r}=e,i=G(n),a=q(n);if(n===a)return t;let o={scrollLeft:0,scrollTop:0},s={x:1,y:1},c={x:0,y:0};if((i||!i&&r!==`fixed`)&&((W(n)!==`body`||bn(a))&&(o=kn(n)),G(n))){let e=On(n);s=Dn(n),c.x=e.x+n.clientLeft,c.y=e.y+n.clientTop}return{width:t.width*s.x,height:t.height*s.y,x:t.x*s.x-o.scrollLeft*s.x+c.x,y:t.y*s.y-o.scrollTop*s.y+c.y}},isElement:K,getDimensions:function(e){return G(e)?hn(e):e.getBoundingClientRect()},getOffsetParent:In,getDocumentElement:q,getScale:Dn,async getElementRects(e){let{reference:t,floating:n,strategy:r}=e,i=this.getOffsetParent||In,a=this.getDimensions;return{reference:Ln(t,await i(n),r),floating:{x:0,y:0,...await a(n)}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>U(e).direction===`rtl`},zn=(e,t,n)=>{let r=new Map,i={platform:Rn,...n},a={...i.platform,_c:r};return Pe(e,t,{...i,platform:a})},J={disabled:!1,distance:5,skidding:0,container:`body`,boundary:void 0,instantMove:!1,disposeTimeout:150,popperTriggers:[],strategy:`absolute`,preventOverflow:!0,flip:!0,shift:!0,overflowPadding:0,arrowPadding:0,arrowOverflow:!0,autoHideOnMousedown:!1,themes:{tooltip:{placement:`top`,triggers:[`hover`,`focus`,`touch`],hideTriggers:e=>[...e,`click`],delay:{show:200,hide:0},handleResize:!1,html:!1,loadingContent:`...`},dropdown:{placement:`bottom`,triggers:[`click`],delay:0,handleResize:!0,autoHide:!0},menu:{$extend:`dropdown`,triggers:[`hover`,`focus`],popperTriggers:[`hover`],delay:{show:0,hide:400}}}};function Bn(e,t){let n=J.themes[e]||{},r;do r=n[t],typeof r>`u`?n.$extend?n=J.themes[n.$extend]||{}:(n=null,r=J[t]):n=null;while(n);return r}function Vn(e){let t=[e],n=J.themes[e]||{};do n.$extend&&!n.$resetCss?(t.push(n.$extend),n=J.themes[n.$extend]||{}):n=null;while(n);return t.map(e=>`v-popper--theme-${e}`)}function Hn(e){let t=[e],n=J.themes[e]||{};do n.$extend?(t.push(n.$extend),n=J.themes[n.$extend]||{}):n=null;while(n);return t}let Un=!1;if(typeof window<`u`){Un=!1;try{let e=Object.defineProperty({},`passive`,{get(){Un=!0}});window.addEventListener(`test`,null,e)}catch{}}let Wn=!1;typeof window<`u`&&typeof navigator<`u`&&(Wn=/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream);const Gn=[`auto`,`top`,`bottom`,`left`,`right`].reduce((e,t)=>e.concat([t,`${t}-start`,`${t}-end`]),[]),Kn={hover:`mouseenter`,focus:`focus`,click:`click`,touch:`touchstart`,pointer:`pointerdown`},qn={hover:`mouseleave`,focus:`blur`,click:`click`,touch:`touchend`,pointer:`pointerup`};function Jn(e,t){let n=e.indexOf(t);n!==-1&&e.splice(n,1)}function Yn(){return new Promise(e=>requestAnimationFrame(()=>{requestAnimationFrame(e)}))}const Y=[];let X=null;const Xn={};function Zn(e){let t=Xn[e];return t||=Xn[e]=[],t}let Qn=function(){};typeof window<`u`&&(Qn=window.Element);function Z(e){return function(t){return Bn(t.theme,e)}}const $n=`__floating-vue__popper`,er=()=>f({name:`VPopper`,provide(){return{[$n]:{parentPopper:this}}},inject:{[$n]:{default:null}},props:{theme:{type:String,required:!0},targetNodes:{type:Function,required:!0},referenceNode:{type:Function,default:null},popperNode:{type:Function,required:!0},shown:{type:Boolean,default:!1},showGroup:{type:String,default:null},ariaId:{default:null},disabled:{type:Boolean,default:Z(`disabled`)},positioningDisabled:{type:Boolean,default:Z(`positioningDisabled`)},placement:{type:String,default:Z(`placement`),validator:e=>Gn.includes(e)},delay:{type:[String,Number,Object],default:Z(`delay`)},distance:{type:[Number,String],default:Z(`distance`)},skidding:{type:[Number,String],default:Z(`skidding`)},triggers:{type:Array,default:Z(`triggers`)},showTriggers:{type:[Array,Function],default:Z(`showTriggers`)},hideTriggers:{type:[Array,Function],default:Z(`hideTriggers`)},popperTriggers:{type:Array,default:Z(`popperTriggers`)},popperShowTriggers:{type:[Array,Function],default:Z(`popperShowTriggers`)},popperHideTriggers:{type:[Array,Function],default:Z(`popperHideTriggers`)},container:{type:[String,Object,Qn,Boolean],default:Z(`container`)},boundary:{type:[String,Qn],default:Z(`boundary`)},strategy:{type:String,validator:e=>[`absolute`,`fixed`].includes(e),default:Z(`strategy`)},autoHide:{type:[Boolean,Function],default:Z(`autoHide`)},handleResize:{type:Boolean,default:Z(`handleResize`)},instantMove:{type:Boolean,default:Z(`instantMove`)},eagerMount:{type:Boolean,default:Z(`eagerMount`)},popperClass:{type:[String,Array,Object],default:Z(`popperClass`)},computeTransformOrigin:{type:Boolean,default:Z(`computeTransformOrigin`)},autoMinSize:{type:Boolean,default:Z(`autoMinSize`)},autoSize:{type:[Boolean,String],default:Z(`autoSize`)},autoMaxSize:{type:Boolean,default:Z(`autoMaxSize`)},autoBoundaryMaxSize:{type:Boolean,default:Z(`autoBoundaryMaxSize`)},preventOverflow:{type:Boolean,default:Z(`preventOverflow`)},overflowPadding:{type:[Number,String],default:Z(`overflowPadding`)},arrowPadding:{type:[Number,String],default:Z(`arrowPadding`)},arrowOverflow:{type:Boolean,default:Z(`arrowOverflow`)},flip:{type:Boolean,default:Z(`flip`)},shift:{type:Boolean,default:Z(`shift`)},shiftCrossAxis:{type:Boolean,default:Z(`shiftCrossAxis`)},noAutoFocus:{type:Boolean,default:Z(`noAutoFocus`)},disposeTimeout:{type:Number,default:Z(`disposeTimeout`)}},emits:{show:()=>!0,hide:()=>!0,"update:shown":e=>!0,"apply-show":()=>!0,"apply-hide":()=>!0,"close-group":()=>!0,"close-directive":()=>!0,"auto-hide":()=>!0,resize:()=>!0},data(){return{isShown:!1,isMounted:!1,skipTransition:!1,classes:{showFrom:!1,showTo:!1,hideFrom:!1,hideTo:!0},result:{x:0,y:0,placement:``,strategy:this.strategy,arrow:{x:0,y:0,centerOffset:0},transformOrigin:null},randomId:`popper_${[Math.random(),Date.now()].map(e=>e.toString(36).substring(2,10)).join(`_`)}`,shownChildren:new Set,lastAutoHide:!0,pendingHide:!1,containsGlobalTarget:!1,isDisposed:!0,mouseDownContains:!1}},computed:{popperId(){return this.ariaId==null?this.randomId:this.ariaId},shouldMountContent(){return this.eagerMount||this.isMounted},slotData(){return{popperId:this.popperId,isShown:this.isShown,shouldMountContent:this.shouldMountContent,skipTransition:this.skipTransition,autoHide:typeof this.autoHide==`function`?this.lastAutoHide:this.autoHide,show:this.show,hide:this.hide,handleResize:this.handleResize,onResize:this.onResize,classes:{...this.classes,popperClass:this.popperClass},result:this.positioningDisabled?null:this.result,attrs:this.$attrs}},parentPopper(){var e;return(e=this[$n])?.parentPopper},hasPopperShowTriggerHover(){var e,t;return(e=this.popperTriggers)?.includes(`hover`)||(t=this.popperShowTriggers)?.includes(`hover`)}},watch:{shown:`$_autoShowHide`,disabled(e){e?this.dispose():this.init()},async container(){this.isShown&&(this.$_ensureTeleport(),await this.$_computePosition())},triggers:{handler:`$_refreshListeners`,deep:!0},positioningDisabled:`$_refreshListeners`,...[`placement`,`distance`,`skidding`,`boundary`,`strategy`,`overflowPadding`,`arrowPadding`,`preventOverflow`,`shift`,`shiftCrossAxis`,`flip`].reduce((e,t)=>(e[t]=`$_computePosition`,e),{})},created(){this.autoMinSize&&console.warn('[floating-vue] `autoMinSize` option is deprecated. Use `autoSize="min"` instead.'),this.autoMaxSize&&console.warn("[floating-vue] `autoMaxSize` option is deprecated. Use `autoBoundaryMaxSize` instead.")},mounted(){this.init(),this.$_detachPopperNode()},activated(){this.$_autoShowHide()},deactivated(){this.hide()},beforeUnmount(){this.dispose()},methods:{show({event:e=null,skipDelay:t=!1,force:n=!1}={}){var r,i;(r=this.parentPopper)!=null&&r.lockedChild&&this.parentPopper.lockedChild!==this||(this.pendingHide=!1,(n||!this.disabled)&&((i=this.parentPopper)?.lockedChild===this&&(this.parentPopper.lockedChild=null),this.$_scheduleShow(e,t),this.$emit(`show`),this.$_showFrameLocked=!0,requestAnimationFrame(()=>{this.$_showFrameLocked=!1})),this.$emit(`update:shown`,!0))},hide({event:e=null,skipDelay:t=!1}={}){var n;if(!this.$_hideInProgress){if(this.shownChildren.size>0){this.pendingHide=!0;return}if(this.hasPopperShowTriggerHover&&this.$_isAimingPopper()){this.parentPopper&&(this.parentPopper.lockedChild=this,clearTimeout(this.parentPopper.lockedChildTimer),this.parentPopper.lockedChildTimer=setTimeout(()=>{this.parentPopper.lockedChild===this&&(this.parentPopper.lockedChild.hide({skipDelay:t}),this.parentPopper.lockedChild=null)},1e3));return}(n=this.parentPopper)?.lockedChild===this&&(this.parentPopper.lockedChild=null),this.pendingHide=!1,this.$_scheduleHide(e,t),this.$emit(`hide`),this.$emit(`update:shown`,!1)}},init(){var e;this.isDisposed&&(this.isDisposed=!1,this.isMounted=!1,this.$_events=[],this.$_preventShow=!1,this.$_referenceNode=(e=this.referenceNode)?.call(this)??this.$el,this.$_targetNodes=this.targetNodes().filter(e=>e.nodeType===e.ELEMENT_NODE),this.$_popperNode=this.popperNode(),this.$_innerNode=this.$_popperNode.querySelector(`.v-popper__inner`),this.$_arrowNode=this.$_popperNode.querySelector(`.v-popper__arrow-container`),this.$_swapTargetAttrs(`title`,`data-original-title`),this.$_detachPopperNode(),this.triggers.length&&this.$_addEventListeners(),this.shown&&this.show())},dispose(){this.isDisposed||(this.isDisposed=!0,this.$_removeEventListeners(),this.hide({skipDelay:!0}),this.$_detachPopperNode(),this.isMounted=!1,this.isShown=!1,this.$_updateParentShownChildren(!1),this.$_swapTargetAttrs(`data-original-title`,`title`))},async onResize(){this.isShown&&(await this.$_computePosition(),this.$emit(`resize`))},async $_computePosition(){if(this.isDisposed||this.positioningDisabled)return;let e={strategy:this.strategy,middleware:[]};(this.distance||this.skidding)&&e.middleware.push(We({mainAxis:this.distance,crossAxis:this.skidding}));let t=this.placement.startsWith(`auto`);if(t?e.middleware.push(Re({alignment:this.placement.split(`-`)[1]??``})):e.placement=this.placement,this.preventOverflow&&(this.shift&&e.middleware.push(Ge({padding:this.overflowPadding,boundary:this.boundary,crossAxis:this.shiftCrossAxis})),!t&&this.flip&&e.middleware.push(ze({padding:this.overflowPadding,boundary:this.boundary}))),e.middleware.push(Ie({element:this.$_arrowNode,padding:this.arrowPadding})),this.arrowOverflow&&e.middleware.push({name:`arrowOverflow`,fn:({placement:e,rects:t,middlewareData:n})=>{let r,{centerOffset:i}=n.arrow;return r=e.startsWith(`top`)||e.startsWith(`bottom`)?Math.abs(i)>t.reference.width/2:Math.abs(i)>t.reference.height/2,{data:{overflow:r}}}}),this.autoMinSize||this.autoSize){let t=this.autoSize?this.autoSize:this.autoMinSize?`min`:null;e.middleware.push({name:`autoSize`,fn:({rects:e,placement:n,middlewareData:r})=>{var i;if((i=r.autoSize)!=null&&i.skip)return{};let a,o;return n.startsWith(`top`)||n.startsWith(`bottom`)?a=e.reference.width:o=e.reference.height,this.$_innerNode.style[t===`min`?`minWidth`:t===`max`?`maxWidth`:`width`]=a==null?null:`${a}px`,this.$_innerNode.style[t===`min`?`minHeight`:t===`max`?`maxHeight`:`height`]=o==null?null:`${o}px`,{data:{skip:!0},reset:{rects:!0}}}})}(this.autoMaxSize||this.autoBoundaryMaxSize)&&(this.$_innerNode.style.maxWidth=null,this.$_innerNode.style.maxHeight=null,e.middleware.push(qe({boundary:this.boundary,padding:this.overflowPadding,apply:({availableWidth:e,availableHeight:t})=>{this.$_innerNode.style.maxWidth=e==null?null:`${e}px`,this.$_innerNode.style.maxHeight=t==null?null:`${t}px`}})));let n=await zn(this.$_referenceNode,this.$_popperNode,e);Object.assign(this.result,{x:n.x,y:n.y,placement:n.placement,strategy:n.strategy,arrow:{...n.middlewareData.arrow,...n.middlewareData.arrowOverflow}})},$_scheduleShow(e,t=!1){if(this.$_updateParentShownChildren(!0),this.$_hideInProgress=!1,clearTimeout(this.$_scheduleTimer),X&&this.instantMove&&X.instantMove&&X!==this.parentPopper){X.$_applyHide(!0),this.$_applyShow(!0);return}t?this.$_applyShow():this.$_scheduleTimer=setTimeout(this.$_applyShow.bind(this),this.$_computeDelay(`show`))},$_scheduleHide(e,t=!1){if(this.shownChildren.size>0){this.pendingHide=!0;return}this.$_updateParentShownChildren(!1),this.$_hideInProgress=!0,clearTimeout(this.$_scheduleTimer),this.isShown&&(X=this),t?this.$_applyHide():this.$_scheduleTimer=setTimeout(this.$_applyHide.bind(this),this.$_computeDelay(`hide`))},$_computeDelay(e){let t=this.delay;return parseInt(t&&t[e]||t||0)},async $_applyShow(e=!1){clearTimeout(this.$_disposeTimer),clearTimeout(this.$_scheduleTimer),this.skipTransition=e,!this.isShown&&(this.$_ensureTeleport(),await Yn(),await this.$_computePosition(),await this.$_applyShowEffect(),this.positioningDisabled||this.$_registerEventListeners([...Nn(this.$_referenceNode),...Nn(this.$_popperNode)],`scroll`,()=>{this.$_computePosition()}))},async $_applyShowEffect(){if(this.$_hideInProgress)return;if(this.computeTransformOrigin){let e=this.$_referenceNode.getBoundingClientRect(),t=this.$_popperNode.querySelector(`.v-popper__wrapper`),n=t.parentNode.getBoundingClientRect(),r=e.x+e.width/2-(n.left+t.offsetLeft),i=e.y+e.height/2-(n.top+t.offsetTop);this.result.transformOrigin=`${r}px ${i}px`}this.isShown=!0,this.$_applyAttrsToTarget({"aria-describedby":this.popperId,"data-popper-shown":``});let e=this.showGroup;if(e){let t;for(let n=0;n0){this.pendingHide=!0,this.$_hideInProgress=!1;return}if(clearTimeout(this.$_scheduleTimer),!this.isShown)return;this.skipTransition=e,Jn(Y,this),Y.length===0&&document.body.classList.remove(`v-popper--some-open`);for(let e of Hn(this.theme)){let t=Zn(e);Jn(t,this),t.length===0&&document.body.classList.remove(`v-popper--some-open--${e}`)}X===this&&(X=null),this.isShown=!1,this.$_applyAttrsToTarget({"aria-describedby":void 0,"data-popper-shown":void 0}),clearTimeout(this.$_disposeTimer);let t=this.disposeTimeout;t!==null&&(this.$_disposeTimer=setTimeout(()=>{this.$_popperNode&&(this.$_detachPopperNode(),this.isMounted=!1)},t)),this.$_removeEventListeners(`scroll`),this.$emit(`apply-hide`),this.classes.showFrom=!1,this.classes.showTo=!1,this.classes.hideFrom=!0,this.classes.hideTo=!1,await Yn(),this.classes.hideFrom=!1,this.classes.hideTo=!0},$_autoShowHide(){this.shown?this.show():this.hide()},$_ensureTeleport(){if(this.isDisposed)return;let e=this.container;if(typeof e==`string`?e=window.document.querySelector(e):e===!1&&(e=this.$_targetNodes[0].parentNode),!e)throw Error(`No container for popover: `+this.container);e.appendChild(this.$_popperNode),this.isMounted=!0},$_addEventListeners(){let e=e=>{this.isShown&&!this.$_hideInProgress||(e.usedByTooltip=!0,!this.$_preventShow&&this.show({event:e}))};this.$_registerTriggerListeners(this.$_targetNodes,Kn,this.triggers,this.showTriggers,e),this.$_registerTriggerListeners([this.$_popperNode],Kn,this.popperTriggers,this.popperShowTriggers,e);let t=e=>{e.usedByTooltip||this.hide({event:e})};this.$_registerTriggerListeners(this.$_targetNodes,qn,this.triggers,this.hideTriggers,t),this.$_registerTriggerListeners([this.$_popperNode],qn,this.popperTriggers,this.popperHideTriggers,t)},$_registerEventListeners(e,t,n){this.$_events.push({targetNodes:e,eventType:t,handler:n}),e.forEach(e=>e.addEventListener(t,n,Un?{passive:!0}:void 0))},$_registerTriggerListeners(e,t,n,r,i){let a=n;r!=null&&(a=typeof r==`function`?r(a):r),a.forEach(n=>{let r=t[n];r&&this.$_registerEventListeners(e,r,i)})},$_removeEventListeners(e){let t=[];this.$_events.forEach(n=>{let{targetNodes:r,eventType:i,handler:a}=n;!e||e===i?r.forEach(e=>e.removeEventListener(i,a)):t.push(n)}),this.$_events=t},$_refreshListeners(){this.isDisposed||(this.$_removeEventListeners(),this.$_addEventListeners())},$_handleGlobalClose(e,t=!1){this.$_showFrameLocked||(this.hide({event:e}),e.closePopover?this.$emit(`close-directive`):this.$emit(`auto-hide`),t&&(this.$_preventShow=!0,setTimeout(()=>{this.$_preventShow=!1},300)))},$_detachPopperNode(){this.$_popperNode.parentNode&&this.$_popperNode.parentNode.removeChild(this.$_popperNode)},$_swapTargetAttrs(e,t){for(let n of this.$_targetNodes){let r=n.getAttribute(e);r&&(n.removeAttribute(e),n.setAttribute(t,r))}},$_applyAttrsToTarget(e){for(let t of this.$_targetNodes)for(let n in e){let r=e[n];r==null?t.removeAttribute(n):t.setAttribute(n,r)}},$_updateParentShownChildren(e){let t=this.parentPopper;for(;t;)e?t.shownChildren.add(this.randomId):(t.shownChildren.delete(this.randomId),t.pendingHide&&t.hide()),t=t.parentPopper},$_isAimingPopper(){let e=this.$_referenceNode.getBoundingClientRect();if(sr>=e.left&&sr<=e.right&&cr>=e.top&&cr<=e.bottom){let e=this.$_popperNode.getBoundingClientRect(),t=sr-Q,n=cr-$,r=e.left+e.width/2-Q+(e.top+e.height/2)-$+e.width+e.height,i=Q+t*r,a=$+n*r;return lr(Q,$,i,a,e.left,e.top,e.left,e.bottom)||lr(Q,$,i,a,e.left,e.top,e.right,e.top)||lr(Q,$,i,a,e.right,e.top,e.right,e.bottom)||lr(Q,$,i,a,e.left,e.bottom,e.right,e.bottom)}return!1}},render(){return this.$slots.default(this.slotData)}});if(typeof document<`u`&&typeof window<`u`){if(Wn){let e=Un?{passive:!0,capture:!0}:!0;document.addEventListener(`touchstart`,e=>tr(e,!0),e),document.addEventListener(`touchend`,e=>nr(e,!0),e)}else window.addEventListener(`mousedown`,e=>tr(e,!1),!0),window.addEventListener(`click`,e=>nr(e,!1),!0);window.addEventListener(`resize`,or)}function tr(e,t){if(J.autoHideOnMousedown)rr(e,t);else for(let t=0;t=0;r--){let i=Y[r];try{let r=i.containsGlobalTarget=i.mouseDownContains||i.popperNode().contains(e.target);i.pendingHide=!1,requestAnimationFrame(()=>{if(i.pendingHide=!1,!n[i.randomId]&&ir(i,r,e)){if(i.$_handleGlobalClose(e,t),!e.closeAllPopover&&e.closePopover&&r){let e=i.parentPopper;for(;e;)n[e.randomId]=!0,e=e.parentPopper;return}let a=i.parentPopper;for(;a&&ir(a,a.containsGlobalTarget,e);)a.$_handleGlobalClose(e,t),a=a.parentPopper}})}catch{}}}function ir(e,t,n){return n.closeAllPopover||n.closePopover&&t||ar(e,n)&&!t}function ar(e,t){if(typeof e.autoHide==`function`){let n=e.autoHide(t);return e.lastAutoHide=n,n}return e.autoHide}function or(){for(let e=0;e{Q=sr,$=cr,sr=e.clientX,cr=e.clientY},Un?{passive:!0}:void 0);function lr(e,t,n,r,i,a,o,s){let c=((o-i)*(t-a)-(s-a)*(e-i))/((s-a)*(n-e)-(o-i)*(r-t)),l=((n-e)*(t-a)-(r-t)*(e-i))/((s-a)*(n-e)-(o-i)*(r-t));return c>=0&&c<=1&&l>=0&&l<=1}const ur={extends:er()},dr=(e,t)=>{let n=e.__vccOpts||e;for(let[e,r]of t)n[e]=r;return n};function fr(e,t,n,r,i,a){return w(),l(`div`,{ref:`reference`,class:b([`v-popper`,{"v-popper--shown":e.slotData.isShown}])},[k(e.$slots,`default`,x(m(e.slotData)))],2)}const pr=dr(ur,[[`render`,fr]]);function mr(){var e=window.navigator.userAgent,t=e.indexOf(`MSIE `);if(t>0)return parseInt(e.substring(t+5,e.indexOf(`.`,t)),10);var n=e.indexOf(`Trident/`);if(n>0){var r=e.indexOf(`rv:`);return parseInt(e.substring(r+3,e.indexOf(`.`,r)),10)}var i=e.indexOf(`Edge/`);return i>0?parseInt(e.substring(i+5,e.indexOf(`.`,i)),10):-1}let hr;function gr(){gr.init||(gr.init=!0,hr=mr()!==-1)}var _r={name:`ResizeObserver`,props:{emitOnMount:{type:Boolean,default:!1},ignoreWidth:{type:Boolean,default:!1},ignoreHeight:{type:Boolean,default:!1}},emits:[`notify`],mounted(){gr(),y(()=>{this._w=this.$el.offsetWidth,this._h=this.$el.offsetHeight,this.emitOnMount&&this.emitSize()});let e=document.createElement(`object`);this._resizeObject=e,e.setAttribute(`aria-hidden`,`true`),e.setAttribute(`tabindex`,-1),e.onload=this.addResizeHandlers,e.type=`text/html`,hr&&this.$el.appendChild(e),e.data=`about:blank`,hr||this.$el.appendChild(e)},beforeUnmount(){this.removeResizeHandlers()},methods:{compareAndNotify(){(!this.ignoreWidth&&this._w!==this.$el.offsetWidth||!this.ignoreHeight&&this._h!==this.$el.offsetHeight)&&(this._w=this.$el.offsetWidth,this._h=this.$el.offsetHeight,this.emitSize())},emitSize(){this.$emit(`notify`,{width:this._w,height:this._h})},addResizeHandlers(){this._resizeObject.contentDocument.defaultView.addEventListener(`resize`,this.compareAndNotify),this.compareAndNotify()},removeResizeHandlers(){this._resizeObject&&this._resizeObject.onload&&(!hr&&this._resizeObject.contentDocument&&this._resizeObject.contentDocument.defaultView.removeEventListener(`resize`,this.compareAndNotify),this.$el.removeChild(this._resizeObject),this._resizeObject.onload=null,this._resizeObject=null)}}};const vr=de(`data-v-b329ee4c`);ee(`data-v-b329ee4c`);const yr={class:`resize-observer`,tabindex:`-1`};T();const br=vr((e,t,n,r,i,a)=>(w(),s(`div`,yr)));_r.render=br,_r.__scopeId=`data-v-b329ee4c`,_r.__file=`src/components/ResizeObserver.vue`;const xr=(e=`theme`)=>({computed:{themeClass(){return Vn(this[e])}}}),Sr=f({name:`VPopperContent`,components:{ResizeObserver:_r},mixins:[xr()],props:{popperId:String,theme:String,shown:Boolean,mounted:Boolean,skipTransition:Boolean,autoHide:Boolean,handleResize:Boolean,classes:Object,result:Object},emits:[`hide`,`resize`],methods:{toPx(e){return e!=null&&!isNaN(e)?`${e}px`:null}}}),Cr=[`id`,`aria-hidden`,`tabindex`,`data-popper-placement`],wr={ref:`inner`,class:`v-popper__inner`},Tr=o(`div`,{class:`v-popper__arrow-outer`},null,-1),Er=o(`div`,{class:`v-popper__arrow-inner`},null,-1),Dr=[Tr,Er];function Or(e,n,r,i,a,u){let d=A(`ResizeObserver`);return w(),l(`div`,{id:e.popperId,ref:`popover`,class:b([`v-popper__popper`,[e.themeClass,e.classes.popperClass,{"v-popper__popper--shown":e.shown,"v-popper__popper--hidden":!e.shown,"v-popper__popper--show-from":e.classes.showFrom,"v-popper__popper--show-to":e.classes.showTo,"v-popper__popper--hide-from":e.classes.hideFrom,"v-popper__popper--hide-to":e.classes.hideTo,"v-popper__popper--skip-transition":e.skipTransition,"v-popper__popper--arrow-overflow":e.result&&e.result.arrow.overflow,"v-popper__popper--no-positioning":!e.result}]]),style:S(e.result?{position:e.result.strategy,transform:`translate3d(${Math.round(e.result.x)}px,${Math.round(e.result.y)}px,0)`}:void 0),"aria-hidden":e.shown?`false`:`true`,tabindex:e.autoHide?0:void 0,"data-popper-placement":e.result?e.result.placement:void 0,onKeyup:n[2]||=le(t=>e.autoHide&&e.$emit(`hide`),[`esc`])},[o(`div`,{class:`v-popper__backdrop`,onClick:n[0]||=t=>e.autoHide&&e.$emit(`hide`)}),o(`div`,{class:`v-popper__wrapper`,style:S(e.result?{transformOrigin:e.result.transformOrigin}:void 0)},[o(`div`,wr,[e.mounted?(w(),l(t,{key:0},[o(`div`,null,[k(e.$slots,`default`)]),e.handleResize?(w(),s(d,{key:0,onNotify:n[1]||=t=>e.$emit(`resize`,t)})):c(``,!0)],64)):c(``,!0)],512),o(`div`,{ref:`arrow`,class:`v-popper__arrow-container`,style:S(e.result?{left:e.toPx(e.result.arrow.x),top:e.toPx(e.result.arrow.y)}:void 0)},Dr,4)],4)],46,Cr)}const kr=dr(Sr,[[`render`,Or]]),Ar={methods:{show(...e){return this.$refs.popper.show(...e)},hide(...e){return this.$refs.popper.hide(...e)},dispose(...e){return this.$refs.popper.dispose(...e)},onResize(...e){return this.$refs.popper.onResize(...e)}}};let jr=function(){};typeof window<`u`&&(jr=window.Element);const Mr=f({name:`VPopperWrapper`,components:{Popper:pr,PopperContent:kr},mixins:[Ar,xr(`finalTheme`)],props:{theme:{type:String,default:null},referenceNode:{type:Function,default:null},shown:{type:Boolean,default:!1},showGroup:{type:String,default:null},ariaId:{default:null},disabled:{type:Boolean,default:void 0},positioningDisabled:{type:Boolean,default:void 0},placement:{type:String,default:void 0},delay:{type:[String,Number,Object],default:void 0},distance:{type:[Number,String],default:void 0},skidding:{type:[Number,String],default:void 0},triggers:{type:Array,default:void 0},showTriggers:{type:[Array,Function],default:void 0},hideTriggers:{type:[Array,Function],default:void 0},popperTriggers:{type:Array,default:void 0},popperShowTriggers:{type:[Array,Function],default:void 0},popperHideTriggers:{type:[Array,Function],default:void 0},container:{type:[String,Object,jr,Boolean],default:void 0},boundary:{type:[String,jr],default:void 0},strategy:{type:String,default:void 0},autoHide:{type:[Boolean,Function],default:void 0},handleResize:{type:Boolean,default:void 0},instantMove:{type:Boolean,default:void 0},eagerMount:{type:Boolean,default:void 0},popperClass:{type:[String,Array,Object],default:void 0},computeTransformOrigin:{type:Boolean,default:void 0},autoMinSize:{type:Boolean,default:void 0},autoSize:{type:[Boolean,String],default:void 0},autoMaxSize:{type:Boolean,default:void 0},autoBoundaryMaxSize:{type:Boolean,default:void 0},preventOverflow:{type:Boolean,default:void 0},overflowPadding:{type:[Number,String],default:void 0},arrowPadding:{type:[Number,String],default:void 0},arrowOverflow:{type:Boolean,default:void 0},flip:{type:Boolean,default:void 0},shift:{type:Boolean,default:void 0},shiftCrossAxis:{type:Boolean,default:void 0},noAutoFocus:{type:Boolean,default:void 0},disposeTimeout:{type:Number,default:void 0}},emits:{show:()=>!0,hide:()=>!0,"update:shown":e=>!0,"apply-show":()=>!0,"apply-hide":()=>!0,"close-group":()=>!0,"close-directive":()=>!0,"auto-hide":()=>!0,resize:()=>!0},computed:{finalTheme(){return this.theme??this.$options.vPopperTheme}},methods:{getTargetNodes(){return Array.from(this.$el.children).filter(e=>e!==this.$refs.popperContent.$el)}}});function Nr(e,t,n,r,i,a){let o=A(`PopperContent`),c=A(`Popper`);return w(),s(c,v({ref:`popper`},e.$props,{theme:e.finalTheme,"target-nodes":e.getTargetNodes,"popper-node":()=>e.$refs.popperContent.$el,class:[e.themeClass],onShow:t[0]||=()=>e.$emit(`show`),onHide:t[1]||=()=>e.$emit(`hide`),"onUpdate:shown":t[2]||=t=>e.$emit(`update:shown`,t),onApplyShow:t[3]||=()=>e.$emit(`apply-show`),onApplyHide:t[4]||=()=>e.$emit(`apply-hide`),onCloseGroup:t[5]||=()=>e.$emit(`close-group`),onCloseDirective:t[6]||=()=>e.$emit(`close-directive`),onAutoHide:t[7]||=()=>e.$emit(`auto-hide`),onResize:t[8]||=()=>e.$emit(`resize`)}),{default:P(({popperId:t,isShown:n,shouldMountContent:r,skipTransition:i,autoHide:a,show:s,hide:c,handleResize:l,onResize:u,classes:f,result:p})=>[k(e.$slots,`default`,{shown:n,show:s,hide:c}),d(o,{ref:`popperContent`,"popper-id":t,theme:e.finalTheme,shown:n,mounted:r,"skip-transition":i,"auto-hide":a,"handle-resize":l,classes:f,result:p,onHide:c,onResize:u},{default:P(()=>[k(e.$slots,`popper`,{shown:n,hide:c})]),_:2},1032,[`popper-id`,`theme`,`shown`,`mounted`,`skip-transition`,`auto-hide`,`handle-resize`,`classes`,`result`,`onHide`,`onResize`])]),_:3},16,[`theme`,`target-nodes`,`popper-node`,`class`])}const Pr=dr(Mr,[[`render`,Nr]]),Fr={...Pr,name:`VDropdown`,vPopperTheme:`dropdown`},Ir={...Pr,name:`VMenu`,vPopperTheme:`menu`},Lr={...Pr,name:`VTooltip`,vPopperTheme:`tooltip`},Rr=f({name:`VTooltipDirective`,components:{Popper:er(),PopperContent:kr},mixins:[Ar],inheritAttrs:!1,props:{theme:{type:String,default:`tooltip`},html:{type:Boolean,default:e=>Bn(e.theme,`html`)},content:{type:[String,Number,Function],default:null},loadingContent:{type:String,default:e=>Bn(e.theme,`loadingContent`)},targetNodes:{type:Function,required:!0}},data(){return{asyncContent:null}},computed:{isContentAsync(){return typeof this.content==`function`},loading(){return this.isContentAsync&&this.asyncContent==null},finalContent(){return this.isContentAsync?this.loading?this.loadingContent:this.asyncContent:this.content}},watch:{content:{handler(){this.fetchContent(!0)},immediate:!0},async finalContent(){await this.$nextTick(),this.$refs.popper.onResize()}},created(){this.$_fetchId=0},methods:{fetchContent(e){if(typeof this.content==`function`&&this.$_isShown&&(e||!this.$_loading&&this.asyncContent==null)){this.asyncContent=null,this.$_loading=!0;let e=++this.$_fetchId,t=this.content(this);t.then?t.then(t=>this.onResult(e,t)):this.onResult(e,t)}},onResult(e,t){e===this.$_fetchId&&(this.$_loading=!1,this.asyncContent=t)},onShow(){this.$_isShown=!0,this.fetchContent()},onHide(){this.$_isShown=!1}}}),zr=[`innerHTML`],Br=[`textContent`];function Vr(e,t,n,r,i,a){let o=A(`PopperContent`),c=A(`Popper`);return w(),s(c,v({ref:`popper`},e.$attrs,{theme:e.theme,"target-nodes":e.targetNodes,"popper-node":()=>e.$refs.popperContent.$el,onApplyShow:e.onShow,onApplyHide:e.onHide}),{default:P(({popperId:t,isShown:n,shouldMountContent:r,skipTransition:i,autoHide:a,hide:s,handleResize:c,onResize:u,classes:f,result:p})=>[d(o,{ref:`popperContent`,class:b({"v-popper--tooltip-loading":e.loading}),"popper-id":t,theme:e.theme,shown:n,mounted:r,"skip-transition":i,"auto-hide":a,"handle-resize":c,classes:f,result:p,onHide:s,onResize:u},{default:P(()=>[e.html?(w(),l(`div`,{key:0,innerHTML:e.finalContent},null,8,zr)):(w(),l(`div`,{key:1,textContent:j(e.finalContent)},null,8,Br))]),_:2},1032,[`class`,`popper-id`,`theme`,`shown`,`mounted`,`skip-transition`,`auto-hide`,`handle-resize`,`classes`,`result`,`onHide`,`onResize`])]),_:1},16,[`theme`,`target-nodes`,`popper-node`,`onApplyShow`,`onApplyHide`])}const Hr=dr(Rr,[[`render`,Vr]]),Ur=`v-popper--has-tooltip`;function Wr(e,t){let n=e.placement;if(!n&&t)for(let e of Gn)t[e]&&(n=e);return n||=Bn(e.theme||`tooltip`,`placement`),n}function Gr(e,t,n){let r,i=typeof t;return r=i===`string`?{content:t}:t&&i===`object`?t:{content:!1},r.placement=Wr(r,n),r.targetNodes=()=>[e],r.referenceNode=()=>e,r}let Kr,qr,Jr=0;function Yr(){if(Kr)return;qr=D([]),Kr=a({name:`VTooltipDirectiveApp`,setup(){return{directives:qr}},render(){return this.directives.map(e=>h(Hr,{...e.options,shown:e.shown||e.options.shown,key:e.id}))},devtools:{hide:!0}});let e=document.createElement(`div`);document.body.appendChild(e),Kr.mount(e)}function Xr(e,t,n){Yr();let r=D(Gr(e,t,n)),i=D(!1),a={id:Jr++,options:r,shown:i};return qr.value.push(a),e.classList&&e.classList.add(Ur),e.$_popper={options:r,item:a,show(){i.value=!0},hide(){i.value=!1}}}function Zr(e){if(e.$_popper){let t=qr.value.indexOf(e.$_popper.item);t!==-1&&qr.value.splice(t,1),delete e.$_popper,delete e.$_popperOldShown,delete e.$_popperMountTarget}e.classList&&e.classList.remove(Ur)}function Qr(e,{value:t,modifiers:n}){let r=Gr(e,t,n);if(!r.content||Bn(r.theme||`tooltip`,`disabled`))Zr(e);else{let i;e.$_popper?(i=e.$_popper,i.options.value=r):i=Xr(e,t,n),typeof t.shown<`u`&&t.shown!==e.$_popperOldShown&&(e.$_popperOldShown=t.shown,t.shown?i.show():i.hide())}}const $r={beforeMount:Qr,updated:Qr,beforeUnmount(e){Zr(e)}};function ei(e){e.addEventListener(`mousedown`,ni),e.addEventListener(`click`,ni),e.addEventListener(`touchstart`,ri,Un?{passive:!0}:!1)}function ti(e){e.removeEventListener(`mousedown`,ni),e.removeEventListener(`click`,ni),e.removeEventListener(`touchstart`,ri),e.removeEventListener(`touchend`,ii),e.removeEventListener(`touchcancel`,ai)}function ni(e){let t=e.currentTarget;e.closePopover=!t.$_vclosepopover_touch,e.closeAllPopover=t.$_closePopoverModifiers&&!!t.$_closePopoverModifiers.all}function ri(e){if(e.changedTouches.length===1){let t=e.currentTarget;t.$_vclosepopover_touch=!0;let n=e.changedTouches[0];t.$_vclosepopover_touchPoint=n,t.addEventListener(`touchend`,ii),t.addEventListener(`touchcancel`,ai)}}function ii(e){let t=e.currentTarget;if(t.$_vclosepopover_touch=!1,e.changedTouches.length===1){let n=e.changedTouches[0],r=t.$_vclosepopover_touchPoint;e.closePopover=Math.abs(n.screenY-r.screenY)<20&&Math.abs(n.screenX-r.screenX)<20,e.closeAllPopover=t.$_closePopoverModifiers&&!!t.$_closePopoverModifiers.all}}function ai(e){let t=e.currentTarget;t.$_vclosepopover_touch=!1}const oi={beforeMount(e,{value:t,modifiers:n}){e.$_closePopoverModifiers=n,(typeof t>`u`||t)&&ei(e)},updated(e,{value:t,oldValue:n,modifiers:r}){e.$_closePopoverModifiers=r,t!==n&&(typeof t>`u`||t?ei(e):ti(e))},beforeUnmount(e){ti(e)}},si=J,ci=$r,li=$r,ui=oi,di=oi,fi=Fr,pi=Ir,mi=er,hi=kr,gi=Ar,_i=Pr,vi=xr,yi=Lr,bi=Hr,xi={class:`flex-1 truncate`},Si={class:`min-w-[160px] flex flex-col gap-0.5 border border-neutral-200 rounded-lg bg-white p-1 shadow-lg dark:border-neutral-800 dark:bg-neutral-900`},Ci=[`onClick`];var wi=f({__name:`Select`,props:_({options:null,placeholder:null,disabled:{type:Boolean},title:null},{modelValue:{required:!0},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let n=e,r=N(e,`modelValue`),a=i(()=>{let e=n.options.find(e=>e.value===r.value);return e?e.label:n.placeholder});function c(e){r.value=e}return(e,i)=>(w(),s(M(fi),{"auto-size":``,"auto-boundary-max-size":``},{popper:P(({hide:i})=>[o(`div`,Si,[(w(!0),l(t,null,O(n.options,t=>(w(),l(`div`,v({ref_for:!0},{...e.$attrs,class:null,style:null},{key:t.value,class:[`cursor-pointer rounded px-2 py-1.5 text-sm text-neutral-700 hover:bg-neutral-100 dark:text-neutral-200 dark:hover:bg-neutral-800`,{"bg-neutral-100 dark:bg-neutral-800":r.value===t.value}],onClick:e=>{c(t.value),i()}}),j(t.label),17,Ci))),128))])]),default:P(()=>[o(`div`,{class:b([`min-w-[160px] flex cursor-pointer items-center justify-between gap-2 border rounded-lg bg-white p-2.5 text-xs text-neutral-700 shadow-sm outline-none transition-colors disabled:cursor-not-allowed dark:border-neutral-800 dark:bg-neutral-900 disabled:bg-neutral-100 hover:bg-neutral-50 dark:text-neutral-200 disabled:text-neutral-400 focus:ring-2 focus:ring-black/10 dark:disabled:bg-neutral-800 dark:hover:bg-neutral-800 dark:disabled:text-neutral-600`,{"pointer-events-none":n.disabled}])},[o(`div`,xi,[k(e.$slots,`default`,{label:a.value},()=>[u(j(a.value),1)])]),i[0]||=o(`div`,{"i-solar:alt-arrow-down-bold-duotone":``,class:`h-3.5 w-3.5 text-neutral-500 dark:text-neutral-400`},null,-1)],2)]),_:3}))}}),Ti=wi;export{dn as ColorHueRange_default,_t as FieldCheckbox_default,Ot as FieldInput_default,Bt as FieldKeyValues_default,Qt as FieldRange_default,cn as FieldValues_default,bt as Input_default,Ti as Select_default,Ie as arrow,Pe as computePosition,ve as createCoords,ze as flip,_e as floor,He as hide,Ke as limitShift,I as max,he as min,We as offset,V as rectToClientRect,ge as round,Ge as shift,qe as size}; \ No newline at end of file diff --git a/assets/stage-BAzv3iKX.js b/assets/stage-BZq5_Dn1.js similarity index 69% rename from assets/stage-BAzv3iKX.js rename to assets/stage-BZq5_Dn1.js index 001d5951df188306c275a3165abd18cdf8f833f2..0f4a63a54124730b94e5a88cc27c374a7d096908 100644 --- a/assets/stage-BAzv3iKX.js +++ b/assets/stage-BZq5_Dn1.js @@ -1 +1 @@ -import{createBaseVNode as e,createBlock as t,createVNode as n,defineComponent as r,openBlock as i,ref as a,unref as o,useDark as s,useMouse as c,withCtx as l}from"./index-CuCRViVh.js";import"./import-url-browser-DNuYZxPr.js";import"./duckdb-mvp-C3i5IjU8.js";import"./index-CISmcbXk-BkTeNOgG.js";import"./types-AwjH7X1C.js";import"./stores-m0eA85gd.js";import"./__vite-browser-external-CCfYMxZl.js";import"./HeaderLink-BuxOmtb4.js";import"./Button-DFhzbYVt.js";import"./src-C2QbIOor.js";import"./Basic-SuYkQxAJ.js";import{Stage_default as u}from"./components-BFLl4u81.js";import"./composables-Cgvkd8lL.js";import"./sleep-CvjNLutj.js";import"./queue-DAKPJQl1.js";import"./queues-Dstwm1VQ.js";import"./dist-Cr2QBfS4.js";import"./webgpu-Nt9hTBpW.js";import{route_block_default as d}from"./route-block-DNPbw0zT.js";import{AnimatedWave_default as f,Cross_default as p,Header_default as m,InteractiveArea_default as h,MobileInteractiveArea_default as g}from"./AnimatedWave-Cq8X0oi8.js";const _={relative:``,flex:`~ col`,"z-2":``,"h-100dvh":``,"w-100vw":``,"of-hidden":``},v={relative:``,flex:`~ 1 row gap-y-0 gap-x-2 (i(),t(p,null,{default:l(()=>[n(f,{"fill-color":o(d)?`oklch(35% calc(var(--chromatic-chroma) * 0.6) var(--chromatic-hue))`:`color-mix(in srgb, oklch(95% calc(var(--chromatic-chroma-50) * 0.5) var(--chromatic-hue)) 80%, oklch(100% 0 360))`},{default:l(()=>[e(`div`,_,[e(`div`,null,[n(m,{class:`flex`,p2:``})]),e(`div`,v,[n(o(u),{"flex-1":``,"min-w":`1/2`,paused:y.value,"focus-at":{x:o(x).x.value,y:o(x).y.value}},null,8,[`paused`,`focus-at`]),n(h,{class:`flex (i(),t(p,null,{default:l(()=>[n(f,{"fill-color":o(d)?`oklch(35% calc(var(--chromatic-chroma) * 0.6) var(--chromatic-hue))`:`color-mix(in srgb, oklch(95% calc(var(--chromatic-chroma-50) * 0.5) var(--chromatic-hue)) 80%, oklch(100% 0 360))`},{default:l(()=>[e(`div`,_,[e(`div`,null,[n(m,{class:`flex`,p2:``})]),e(`div`,v,[n(o(u),{"flex-1":``,"min-w":`1/2`,paused:y.value,"focus-at":{x:o(x).x.value,y:o(x).y.value}},null,8,[`paused`,`focus-at`]),n(h,{class:`flex {let f=a(`RouterView`);return i(),e(`main`,{text:`gray-700 dark:gray-200`,"h-full":``,"font-cuteen":``,style:r({paddingTop:`${o(c)}px`,paddingRight:`${o(l)}px`,paddingBottom:`${o(u)}px`,paddingLeft:`${o(d)}px`})},[t(f)],4)}}}),l=c;export{l as default}; \ No newline at end of file +import{createElementBlock as e,createVNode as t,defineComponent as n,normalizeStyle as r,openBlock as i,resolveComponent as a,unref as o,useScreenSafeArea as s}from"./index-CsmT0L1K.js";var c=n({__name:`stage`,setup(n){let{top:c,right:l,bottom:u,left:d}=s();return(n,s)=>{let f=a(`RouterView`);return i(),e(`main`,{text:`gray-700 dark:gray-200`,"h-full":``,"font-cuteen":``,style:r({paddingTop:`${o(c)}px`,paddingRight:`${o(l)}px`,paddingBottom:`${o(u)}px`,paddingLeft:`${o(d)}px`})},[t(f)],4)}}}),l=c;export{l as default}; \ No newline at end of file diff --git a/assets/stores-m0eA85gd.js b/assets/stores-2H61GqXP.js similarity index 99% rename from assets/stores-m0eA85gd.js rename to assets/stores-2H61GqXP.js index d76f25a0d59a7a76d49784e2105fcb5a7aa17eb6..997b75c69c5805bb2b6f893ecccccafb46a1a87f 100644 --- a/assets/stores-m0eA85gd.js +++ b/assets/stores-2H61GqXP.js @@ -1,4 +1,4 @@ -var e=function(exports){function t(e){"@babel/helpers - typeof";return t=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},t(e)}function n(e,n){if(t(e)!=`object`||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,n||`default`);if(t(i)!=`object`)return i;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(n===`string`?String:Number)(e)}function r(e){var r=n(e,`string`);return t(r)==`symbol`?r:r+``}function i(e,t,n){return(t=r(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}return exports.defineProperty=i,exports}({});import{__toESM as t,computed as n,computedAsync as r,defineStore as i,onMounted as a,ref as o,storeToRefs as s,toRaw as c,useI18n as l,useLocalStorage as u,watch as d}from"./index-CuCRViVh.js";import{toJsonSchema as f}from"./index-CISmcbXk-BkTeNOgG.js";import{arrayType as p,booleanType as m,numberType as h,objectType as g,stringType as _,unionType as v}from"./types-AwjH7X1C.js";import{require___vite_browser_external as y}from"./__vite-browser-external-CCfYMxZl.js";import{ccount as b,stringifyEntitiesLight as x,useLlmmarkerParser as S}from"./composables-Cgvkd8lL.js";import{useQueue as C}from"./queue-DAKPJQl1.js";import{system_v2_default as w}from"./queues-Dstwm1VQ.js";import{objCamelToSnake as T,requestBody as E,requestHeaders as D,requestURL as O,responseCatch as k,responseJSON as ee,streamText as te}from"./dist-Cr2QBfS4.js";import{isWebGPUSupported as ne}from"./webgpu-Nt9hTBpW.js";function re(e){let t=new Uint8Array(e.frequencyBinCount);e.getByteFrequencyData(t);let n=[];for(let e=0;e<700;e+=80)n.push(t[e]);let r=t.map(e=>e**1.2).map(e=>e*1.2).reduce((e,t)=>e+t,0);return r/t.length/100}function ie(e){let t=new Uint8Array(e.frequencyBinCount);e.getByteFrequencyData(t);let n=[];for(let e=0;e<700;e+=80)n.push(t[e]);let r=t.map(e=>e**1.5),i=Math.min(...r),a=Math.max(...r),o=a-i,s;s=o===0?r.map(()=>0):r.map(e=>(e-i)/o);let c=s.reduce((e,t)=>e+t,0);return c/t.length}function ae(e,t=`linear`){switch(t){case`linear`:return re(e);case`minmax`:return ie(e)}}const oe=i(`AudioContext`,()=>{let e=new AudioContext;return{audioContext:e,calculateVolume:ae}}),se=i(`SpeakingStore`,()=>{let e=30,t=100,r=o(0),i=o(!1),a=n(()=>i.value?(e+(t-e)*r.value)/100:e);return{mouthOpenSize:r,nowSpeaking:i,nowSpeakingAvatarBorderOpacity:a}});async function*ce(e,t){let n=e.getReader();try{for(;;){let{done:e,value:r}=await n.read();if(e)return;yield t(r)}}finally{n.releaseLock()}}const A=async e=>(e.fetch??globalThis.fetch)(O(`models`,e.baseURL),{headers:D(e.headers,e.apiKey),signal:e.abortSignal}).then(ee).then(({data:e})=>e),j=async({description:e,execute:t,name:n,parameters:r})=>{let i=await f(r);return{execute:t,function:{description:e,name:n,parameters:{...i,additionalProperties:!1},strict:!0},type:`function`}},le=[j({name:`debug_random_number`,description:`Generate a random number between 0 and 1`,execute:async()=>new Promise(e=>{setTimeout(()=>{e(Math.random().toString())},1e3)}),parameters:g({})})],ue=async()=>Promise.all(le);function M(e,t,n,r){if(n===`a`&&!r)throw TypeError(`Private accessor was defined without a getter`);if(typeof t==`function`?e!==t||!r:!t.has(e))throw TypeError(`Cannot read private member from an object whose class did not declare it`);return n===`m`?r:n===`a`?r.call(e):r?r.value:t.get(e)}function N(e,t,n,r,i){if(r===`m`)throw TypeError(`Private method is not writable`);if(r===`a`&&!i)throw TypeError(`Private accessor was defined without a setter`);if(typeof t==`function`?e!==t||!i:!t.has(e))throw TypeError(`Cannot write private member to an object whose class did not declare it`);return r===`a`?i.call(e,n):i?i.value=n:t.set(e,n),n}var P,F,I,L,de;const fe=`__TAURI_TO_IPC_KEY__`;function pe(e,t=!1){return window.__TAURI_INTERNALS__.transformCallback(e,t)}var me=class{constructor(e){P.set(this,void 0),F.set(this,0),I.set(this,[]),L.set(this,void 0),N(this,P,e||(()=>{}),`f`),this.id=pe(e=>{let t=e.index;if(`end`in e){t==M(this,F,`f`)?this.cleanupCallback():N(this,L,t,`f`);return}let n=e.message;if(t==M(this,F,`f`)){for(M(this,P,`f`).call(this,n),N(this,F,M(this,F,`f`)+1,`f`);M(this,F,`f`)in M(this,I,`f`);){let e=M(this,I,`f`)[M(this,F,`f`)];M(this,P,`f`).call(this,e),delete M(this,I,`f`)[M(this,F,`f`)],N(this,F,M(this,F,`f`)+1,`f`)}M(this,F,`f`)===M(this,L,`f`)&&this.cleanupCallback()}else M(this,I,`f`)[t]=n})}cleanupCallback(){window.__TAURI_INTERNALS__.unregisterCallback(this.id)}set onmessage(e){N(this,P,e,`f`)}get onmessage(){return M(this,P,`f`)}[(P=new WeakMap,F=new WeakMap,I=new WeakMap,L=new WeakMap,fe)](){return`__CHANNEL__:${this.id}`}toJSON(){return this[fe]()}};async function R(e,t={},n){return window.__TAURI_INTERNALS__.invoke(e,t,n)}de=new WeakMap;async function he(e,t){await R(`plugin:mcp|connect_server`,{command:e,args:t})}async function ge(){await R(`plugin:mcp|disconnect_server`)}async function _e(){return await R(`plugin:mcp|list_tools`)}async function ve(e,t){return await R(`plugin:mcp|call_tool`,{name:e,args:t})}const ye=[j({name:`mcp_list_tools`,description:`List all tools available on the MCP server`,execute:async(e,t)=>await _e(),parameters:g({})}),j({name:`mcp_connect_server`,description:`Connect to the MCP server. If "success", the connection to the MCP server is successful. Otherwise, the connection fails.`,execute:async({command:e,args:t})=>(await he(e,t),`success`),parameters:g({command:_().describe(`The command to connect to the MCP server`),args:p(_()).describe(`The arguments to pass to the MCP server`)})}),j({name:`mcp_disconnect_server`,description:`Disconnect from the MCP server. If "success", the disconnection from the MCP server is successful. Otherwise, the disconnection fails.`,execute:async()=>(await ge(),`success`),parameters:g({})}),j({name:`mcp_call_tool`,description:`Call a tool on the MCP server. The result is a list of content and a boolean indicating whether the tool call is an error.`,execute:async({name:e,parameters:t})=>{let n=Object.fromEntries(t.map(({name:e,value:t})=>[e,t])),r=await ve(e,n);return r},parameters:g({name:_().describe(`The name of the tool to call`),parameters:p(g({name:_().describe(`The name of the parameter`),value:v([_(),h(),m(),g({})]).describe(`The value of the parameter, it can be a string, a number, a boolean, or an object`)})).describe(`The parameters to pass to the tool`)})})],be=async()=>Promise.all(ye),xe=i(`llm`,()=>{async function e(e,t,n,r){let i=r?.headers;return await te({...t.chat(e),maxSteps:10,messages:n.map(e=>({...e,content:e.role===`error`?`User encountered error: ${e.content}`:e.content,role:e.role===`error`?`user`:e.role})),headers:i,tools:[...await be(),...await ue()],onEvent(e){var t,n;e.type===`tool-call`?r==null||(t=r.onToolCall)==null||t.call(r,e.toolCall):e.type===`tool-call-result`&&(r==null||(n=r.onToolCallResult)==null||n.call(r,{id:e.id,result:e.result}))}})}async function t(e,t){if(e===``)return[];try{return await A({baseURL:e.endsWith(`/`)?e:`${e}/`,apiKey:t})}catch(e){if(String(e).includes(`Failed to construct 'URL': Invalid URL`))return[];throw e}}return{models:t,stream:e}}),z=e=>({chat:t=>Object.assign(e,{model:t})}),B=e=>({embed:t=>Object.assign(e,{model:t})}),Se=e=>({image:t=>Object.assign(e,{model:t})}),V=e=>({model:()=>e}),Ce=e=>({speech:t=>Object.assign(e,{model:t})}),we=e=>({transcription:t=>Object.assign(e,{model:t})}),H=(e,t)=>({metadata:{id:e,...t}}),U=(...e)=>Object.assign(e[0],...e.slice(1)),Te=(e,t=`https://api.anthropic.com/v1/`)=>U(H(`anthropic`),z({apiKey:e,baseURL:t}),V({apiKey:e,baseURL:t})),Ee=(e,t=`https://api.deepseek.com/`)=>U(H(`deepseek`),z({apiKey:e,baseURL:t}),V({apiKey:e,baseURL:t})),De=(e,t=`https://api.fireworks.ai/inference/v1/`)=>U(H(`fireworks`),z({apiKey:e,baseURL:t}),B({apiKey:e,baseURL:t}),V({apiKey:e,baseURL:t})),Oe=(e,t=`https://generativelanguage.googleapis.com/v1beta/openai/`)=>U(H(`google-generative-ai`),z({apiKey:e,baseURL:t}),B({apiKey:e,baseURL:t}),V({apiKey:e,baseURL:t})),ke=(e,t=`https://api.mistral.ai/v1/`)=>U(H(`mistral`),z({apiKey:e,baseURL:t}),B({apiKey:e,baseURL:t}),V({apiKey:e,baseURL:t})),Ae=(e,t=`https://api.moonshot.cn/v1/`)=>U(H(`moonshot`),z({apiKey:e,baseURL:t}),V({apiKey:e,baseURL:t})),je=(e,t=`https://api.novita.ai/v3/openai/`)=>U(H(`novita`),z({apiKey:e,baseURL:t}),V({apiKey:e,baseURL:t})),W=(e,t=`https://api.openai.com/v1/`)=>U(H(`openai`),z({apiKey:e,baseURL:t}),B({apiKey:e,baseURL:t}),Se({apiKey:e,baseURL:t}),V({apiKey:e,baseURL:t}),Ce({apiKey:e,baseURL:t}),we({apiKey:e,baseURL:t})),Me=(e,t=``)=>U(H(`openrouter`),{chat:(n,r)=>{let i={apiKey:e,baseURL:t,model:n},a=({extraHeaders:e,models:t,provider:n})=>{e!=null&&(i.headers??={},Object.assign(i.headers,e));let r;return n!=null&&(r=T(n)),T({models:t,provider:r})};return{...r?a(r):{},...i}}},V({apiKey:e,baseURL:t})),Ne=(e,t=`https://api.perplexity.ai/`)=>U(H(`perplexity`),z({apiKey:e,baseURL:t})),Pe=(e,t=`https://api.together.xyz/v1/`)=>U(H(`together-ai`),z({apiKey:e,baseURL:t}),B({apiKey:e,baseURL:t}),V({apiKey:e,baseURL:t,fetch:async(...e)=>globalThis.fetch(...e).then(async e=>e.json()).then(e=>Response.json({data:e,object:`list`}))})),Fe=(e,t)=>{let n=`https://api.cloudflare.com/client/v4/accounts/${t}/ai/v1/`;return U(H(`workers-ai`),z({apiKey:e,baseURL:n}),B({apiKey:e,baseURL:n}))},Ie=(e,t=`https://api.x.ai/v1/`)=>U(H(`xai`),z({apiKey:e,baseURL:t}),V({apiKey:e,baseURL:t}));var Le=t(y());const G=(e=`http://localhost:11434/v1/`)=>U(H(`ollama`),z({baseURL:e}),B({baseURL:e}),V({baseURL:e})),Re=(e=`http://localhost:4315/v1/`,t=`xsai`)=>U(H(`player2`),z({baseURL:e,headers:{"player2-game-key":t}}),Ce({baseURL:e,fetch:async(e,t)=>{let n=`${e.toString().slice(0,-12)}tts/speak`;try{let{input:e,response_format:n,speed:r,voice:i,...a}=JSON.parse(t?.body),o={audio_format:n,play_in_app:!1,speed:r??1,text:e,voice_ids:i==null?[]:[i],...a};t&&(t.body=JSON.stringify(o))}catch(e){console.warn(`Could not parse body as JSON:`,e)}return globalThis.fetch(n,t).then(async e=>e.json()).then(e=>{let t=e.data??``,n=Le.Buffer.from(t,`base64`).toString(`binary`),r=Uint8Array.from(Array.from(n,e=>e.charCodeAt(0)));for(let e=0;eObject.assign(e[0],...e.slice(1));var q=class extends Error{constructor(t,n){super(t),e.defineProperty(this,`response`,void 0),this.name=`XSAIError`,this.response=n}};const ze=e=>e.replace(/[A-Z]/g,e=>`_${e.toLowerCase()}`),J=e=>Object.fromEntries(Object.entries(e).map(([e,t])=>[ze(e),t])),Be=e=>Object.fromEntries(Object.entries(e).filter(([,e])=>e!==void 0)),Ve=(e,t)=>Be({Authorization:t===void 0?void 0:`Bearer ${t}`,...e}),He=(e,t)=>{let n=t.toString();return new URL(e,n.endsWith(`/`)?n:`${n}/`)},Ue=async e=>{if(!e.ok)throw new q(`Remote sent ${e.status} response: ${await e.text()}`,e);if(!e.body)throw new q(`Response body is empty from remote server`,e);if(!(e.body instanceof ReadableStream))throw new q(`Expected Response body to be a ReadableStream, but got ${String(e.body)}; Content Type is ${e.headers.get(`Content-Type`)}`,e);return e},We=async e=>Ue(e).then(async e=>{let t=await e.text();try{return JSON.parse(t)}catch{throw Error(`Failed to parse response, response body: ${t}`)}});var Ge=(e,t=`http://localhost:5933/v1/`)=>{let n=({applyTextNormalization:e,languageCode:t,nextRequestIds:n,nextText:r,previousRequestIds:i,previousText:a,pronunciationDictionaryLocators:o,seed:s,voiceSettings:c})=>({extraBody:J({applyTextNormalization:e,languageCode:t,nextRequestIds:n,nextText:r,previousRequestIds:i,previousText:a,pronunciationDictionaryLocators:o?o.map(e=>J(e)):void 0,seed:s,voiceSettings:J(c??{similarityBoost:.75,stability:.5})})}),r={speech:(r,i)=>({...i?n(i):{},apiKey:e,baseURL:t,model:`elevenlabs/${r}`})},i={voice:r=>(t.endsWith(`v1/`)?t=t.slice(0,-3):t.endsWith(`v1`)&&(t=t.slice(0,-2)),{query:`provider=elevenlabs`,...r?n(r):{},apiKey:e,baseURL:t})};return K(r,i)},Ke=(e,t=`http://localhost:5933/v1/`)=>{let n=e=>{let{deploymentId:t,region:n,sampleRate:r}=e,i={deploymentId:t,region:n,sampleRate:r};return`disableSsml`in e?i.disableSsml=e.disableSsml:`lang`in e&&(i.lang=e.lang,i.gender=e.gender,i.voice=e.voice),{extraBody:J(i)}},r={speech:(r,i)=>({...i?n(i):{},apiKey:e,baseURL:t,model:`microsoft/${r}`})},i={voice:r=>(t.endsWith(`v1/`)?t=t.slice(0,-3):t.endsWith(`v1`)&&(t=t.slice(0,-2)),{query:`region=${r?.region}&provider=microsoft`,...r?n(r):{},apiKey:e,baseURL:t})};return K(r,i)},qe=(e,t=`http://localhost:5933/v1/`)=>{let n=t=>{var n,r;let i={app:{appid:(n=t.app)?.appId,token:e}};return t.app!==void 0&&(i.app={...t.app,appid:(r=t.app)?.appId,token:e}),t.user!==void 0&&(i.user=t.user),t.audio!==void 0&&(i.audio=t.audio),{extraBody:J(i)}},r={speech:(r,i)=>({...i?n(i):{},apiKey:e,baseURL:t,model:`volcengine/${r}`})},i={voice:r=>(t.endsWith(`v1/`)?t=t.slice(0,-3):t.endsWith(`v1`)&&(t=t.slice(0,-2)),{query:`provider=volcengine`,...r?n(r):{},apiKey:e,baseURL:t})};return K(r,i)},Je=(e,t=`http://localhost:5933/v1/`)=>{let n=e=>{let{sampleRate:t,volume:n,rate:r,pitch:i}=e,a={sampleRate:t,volume:n,rate:r,pitch:i};return Object.keys(a).forEach(e=>a[e]===void 0&&delete a[e]),{extraBody:J(a)}},r={speech:(r,i)=>({...i?n(i):{},apiKey:e,baseURL:t,model:`alibaba/${r}`})},i={voice:r=>{let i=t;return i.endsWith(`v1/`)?i=i.slice(0,-3):i.endsWith(`v1`)&&(i=i.slice(0,-2)),{query:`provider=alibaba`,...r?n(r):{},apiKey:e,baseURL:i}}};return K(r,i)},Y=async e=>(e.fetch??globalThis.fetch)(He(e.query?`api/voices?${e.query}`:`api/voices`,e.baseURL),{headers:Ve({...e.headers},e.apiKey),method:`GET`,signal:e.abortSignal}).then(We).then(({voices:e})=>e);const Ye=[{model_id:`eleven_multilingual_v2`,name:`Eleven Multilingual v2`,can_be_finetuned:!0,can_do_text_to_speech:!0,can_do_voice_conversion:!1,can_use_style:!0,can_use_speaker_boost:!0,serves_pro_voices:!1,token_cost_factor:1,description:`Our most life-like, emotionally rich mode in 29 languages. Best for voice overs, audiobooks, post-production, or any other content creation needs.`,requires_alpha_access:!1,max_characters_request_free_user:1e4,max_characters_request_subscribed_user:1e4,maximum_text_length_per_request:1e4,languages:[{language_id:`en`,name:`English`},{language_id:`ja`,name:`Japanese`},{language_id:`zh`,name:`Chinese`},{language_id:`de`,name:`German`},{language_id:`hi`,name:`Hindi`},{language_id:`fr`,name:`French`},{language_id:`ko`,name:`Korean`},{language_id:`pt`,name:`Portuguese`},{language_id:`it`,name:`Italian`},{language_id:`es`,name:`Spanish`},{language_id:`id`,name:`Indonesian`},{language_id:`nl`,name:`Dutch`},{language_id:`tr`,name:`Turkish`},{language_id:`fil`,name:`Filipino`},{language_id:`pl`,name:`Polish`},{language_id:`sv`,name:`Swedish`},{language_id:`bg`,name:`Bulgarian`},{language_id:`ro`,name:`Romanian`},{language_id:`ar`,name:`Arabic`},{language_id:`cs`,name:`Czech`},{language_id:`el`,name:`Greek`},{language_id:`fi`,name:`Finnish`},{language_id:`hr`,name:`Croatian`},{language_id:`ms`,name:`Malay`},{language_id:`sk`,name:`Slovak`},{language_id:`da`,name:`Danish`},{language_id:`ta`,name:`Tamil`},{language_id:`uk`,name:`Ukrainian`},{language_id:`ru`,name:`Russian`}],model_rates:{character_cost_multiplier:1},concurrency_group:`standard`},{model_id:`eleven_flash_v2_5`,name:`Eleven Flash v2.5`,can_be_finetuned:!0,can_do_text_to_speech:!0,can_do_voice_conversion:!1,can_use_style:!1,can_use_speaker_boost:!1,serves_pro_voices:!1,token_cost_factor:1,description:`Our ultra low latency model in 32 languages. Ideal for conversational use cases.`,requires_alpha_access:!1,max_characters_request_free_user:4e4,max_characters_request_subscribed_user:4e4,maximum_text_length_per_request:4e4,languages:[{language_id:`en`,name:`English`},{language_id:`ja`,name:`Japanese`},{language_id:`zh`,name:`Chinese`},{language_id:`de`,name:`German`},{language_id:`hi`,name:`Hindi`},{language_id:`fr`,name:`French`},{language_id:`ko`,name:`Korean`},{language_id:`pt`,name:`Portuguese`},{language_id:`it`,name:`Italian`},{language_id:`es`,name:`Spanish`},{language_id:`ru`,name:`Russian`},{language_id:`id`,name:`Indonesian`},{language_id:`nl`,name:`Dutch`},{language_id:`tr`,name:`Turkish`},{language_id:`fil`,name:`Filipino`},{language_id:`pl`,name:`Polish`},{language_id:`sv`,name:`Swedish`},{language_id:`bg`,name:`Bulgarian`},{language_id:`ro`,name:`Romanian`},{language_id:`ar`,name:`Arabic`},{language_id:`cs`,name:`Czech`},{language_id:`el`,name:`Greek`},{language_id:`fi`,name:`Finnish`},{language_id:`hr`,name:`Croatian`},{language_id:`ms`,name:`Malay`},{language_id:`sk`,name:`Slovak`},{language_id:`da`,name:`Danish`},{language_id:`ta`,name:`Tamil`},{language_id:`uk`,name:`Ukrainian`},{language_id:`hu`,name:`Hungarian`},{language_id:`no`,name:`Norwegian`},{language_id:`vi`,name:`Vietnamese`}],model_rates:{character_cost_multiplier:.5},concurrency_group:`turbo`},{model_id:`eleven_turbo_v2_5`,name:`Eleven Turbo v2.5`,can_be_finetuned:!0,can_do_text_to_speech:!0,can_do_voice_conversion:!1,can_use_style:!1,can_use_speaker_boost:!1,serves_pro_voices:!1,token_cost_factor:1,description:`Our high quality, low latency model in 32 languages. Best for developer use cases where speed matters and you need non-English languages.`,requires_alpha_access:!1,max_characters_request_free_user:4e4,max_characters_request_subscribed_user:4e4,maximum_text_length_per_request:4e4,languages:[{language_id:`en`,name:`English`},{language_id:`ja`,name:`Japanese`},{language_id:`zh`,name:`Chinese`},{language_id:`de`,name:`German`},{language_id:`hi`,name:`Hindi`},{language_id:`fr`,name:`French`},{language_id:`ko`,name:`Korean`},{language_id:`pt`,name:`Portuguese`},{language_id:`it`,name:`Italian`},{language_id:`es`,name:`Spanish`},{language_id:`ru`,name:`Russian`},{language_id:`id`,name:`Indonesian`},{language_id:`nl`,name:`Dutch`},{language_id:`tr`,name:`Turkish`},{language_id:`fil`,name:`Filipino`},{language_id:`pl`,name:`Polish`},{language_id:`sv`,name:`Swedish`},{language_id:`bg`,name:`Bulgarian`},{language_id:`ro`,name:`Romanian`},{language_id:`ar`,name:`Arabic`},{language_id:`cs`,name:`Czech`},{language_id:`el`,name:`Greek`},{language_id:`fi`,name:`Finnish`},{language_id:`hr`,name:`Croatian`},{language_id:`ms`,name:`Malay`},{language_id:`sk`,name:`Slovak`},{language_id:`da`,name:`Danish`},{language_id:`ta`,name:`Tamil`},{language_id:`uk`,name:`Ukrainian`},{language_id:`vi`,name:`Vietnamese`},{language_id:`no`,name:`Norwegian`},{language_id:`hu`,name:`Hungarian`}],model_rates:{character_cost_multiplier:.5},concurrency_group:`turbo`},{model_id:`eleven_turbo_v2`,name:`Eleven Turbo v2`,can_be_finetuned:!0,can_do_text_to_speech:!0,can_do_voice_conversion:!1,can_use_style:!1,can_use_speaker_boost:!1,serves_pro_voices:!1,token_cost_factor:1,description:`Our English-only, low latency model. Best for developer use cases where speed matters and you only need English. Performance is on par with Turbo v2.5.`,requires_alpha_access:!1,max_characters_request_free_user:3e4,max_characters_request_subscribed_user:3e4,maximum_text_length_per_request:3e4,languages:[{language_id:`en`,name:`English`}],model_rates:{character_cost_multiplier:.5},concurrency_group:`turbo`},{model_id:`eleven_flash_v2`,name:`Eleven Flash v2`,can_be_finetuned:!0,can_do_text_to_speech:!0,can_do_voice_conversion:!1,can_use_style:!1,can_use_speaker_boost:!1,serves_pro_voices:!1,token_cost_factor:1,description:`Our ultra low latency model in english. Ideal for conversational use cases.`,requires_alpha_access:!1,max_characters_request_free_user:3e4,max_characters_request_subscribed_user:3e4,maximum_text_length_per_request:3e4,languages:[{language_id:`en`,name:`English`}],model_rates:{character_cost_multiplier:.5},concurrency_group:`turbo`},{model_id:`eleven_english_sts_v2`,name:`Eleven English v2`,can_be_finetuned:!1,can_do_text_to_speech:!1,can_do_voice_conversion:!0,can_use_style:!0,can_use_speaker_boost:!0,serves_pro_voices:!1,token_cost_factor:1,description:`Our state-of-the-art speech to speech model suitable for scenarios where you need maximum control over the content and prosody of your generations.`,requires_alpha_access:!1,max_characters_request_free_user:5e3,max_characters_request_subscribed_user:5e3,maximum_text_length_per_request:5e3,languages:[{language_id:`en`,name:`English`}],model_rates:{character_cost_multiplier:1},concurrency_group:`standard`},{model_id:`eleven_multilingual_v1`,name:`Eleven Multilingual v1`,can_be_finetuned:!1,can_do_text_to_speech:!0,can_do_voice_conversion:!1,can_use_style:!1,can_use_speaker_boost:!1,serves_pro_voices:!1,token_cost_factor:1,description:`Our first Multilingual model, capability of generating speech in 10 languages. Now outclassed by Multilingual v2 (for content creation) and Turbo v2.5 (for low latency use cases).`,requires_alpha_access:!1,max_characters_request_free_user:1e4,max_characters_request_subscribed_user:1e4,maximum_text_length_per_request:1e4,languages:[{language_id:`en`,name:`English`},{language_id:`de`,name:`German`},{language_id:`pl`,name:`Polish`},{language_id:`es`,name:`Spanish`},{language_id:`it`,name:`Italian`},{language_id:`fr`,name:`French`},{language_id:`pt`,name:`Portuguese`},{language_id:`hi`,name:`Hindi`},{language_id:`ar`,name:`Arabic`}],model_rates:{character_cost_multiplier:1},concurrency_group:`standard`},{model_id:`eleven_multilingual_sts_v2`,name:`Eleven Multilingual v2`,can_be_finetuned:!0,can_do_text_to_speech:!1,can_do_voice_conversion:!0,can_use_style:!0,can_use_speaker_boost:!0,serves_pro_voices:!1,token_cost_factor:1,description:`Our cutting-edge, multilingual speech-to-speech model is designed for situations that demand unparalleled control over both the content and the prosody of the generated speech across various languages.`,requires_alpha_access:!1,max_characters_request_free_user:1e4,max_characters_request_subscribed_user:1e4,maximum_text_length_per_request:1e4,languages:[{language_id:`en`,name:`English`},{language_id:`ja`,name:`Japanese`},{language_id:`zh`,name:`Chinese`},{language_id:`de`,name:`German`},{language_id:`hi`,name:`Hindi`},{language_id:`fr`,name:`French`},{language_id:`ko`,name:`Korean`},{language_id:`pt`,name:`Portuguese`},{language_id:`it`,name:`Italian`},{language_id:`es`,name:`Spanish`},{language_id:`ru`,name:`Russian`},{language_id:`id`,name:`Indonesian`},{language_id:`nl`,name:`Dutch`},{language_id:`tr`,name:`Turkish`},{language_id:`fil`,name:`Filipino`},{language_id:`pl`,name:`Polish`},{language_id:`sv`,name:`Swedish`},{language_id:`bg`,name:`Bulgarian`},{language_id:`ro`,name:`Romanian`},{language_id:`ar`,name:`Arabic`},{language_id:`cs`,name:`Czech`},{language_id:`el`,name:`Greek`},{language_id:`fi`,name:`Finnish`},{language_id:`hr`,name:`Croatian`},{language_id:`ms`,name:`Malay`},{language_id:`sk`,name:`Slovak`},{language_id:`da`,name:`Danish`},{language_id:`ta`,name:`Tamil`},{language_id:`uk`,name:`Ukrainian`}],model_rates:{character_cost_multiplier:1},concurrency_group:`standard`},{model_id:`eleven_monolingual_v1`,name:`Eleven English v1`,can_be_finetuned:!1,can_do_text_to_speech:!0,can_do_voice_conversion:!1,can_use_style:!1,can_use_speaker_boost:!1,serves_pro_voices:!1,token_cost_factor:1,description:`Our first ever text to speech model. Now outclassed by Multilingual v2 (for content creation) and Turbo v2.5 (for low latency use cases).`,requires_alpha_access:!1,max_characters_request_free_user:1e4,max_characters_request_subscribed_user:1e4,maximum_text_length_per_request:1e4,languages:[{language_id:`en`,name:`English`}],model_rates:{character_cost_multiplier:1},concurrency_group:`standard`}],X=i(`providers`,()=>{let e=u(`settings/credentials/providers`,{}),{t}=l();async function i(e){try{let t=await fetch(`https://openrouter.ai/api/v1/models`,{headers:{Authorization:`Bearer ${e.apiKey.trim()}`,"Content-Type":`application/json`}});if(!t.ok)throw Error(`Failed to fetch OpenRouter models: ${t.statusText}`);let n=await t.json();return n.data.map(e=>({id:e.id,name:e.name||e.id,provider:`openrouter-ai`,description:e.description||``,contextLength:e.context_length,deprecated:!1}))}catch(e){throw console.error(`Error fetching OpenRouter models:`,e),e}}let a={"openrouter-ai":{id:`openrouter-ai`,category:`chat`,tasks:[`text-generation`],nameKey:`settings.pages.providers.provider.openrouter.title`,name:`OpenRouter`,descriptionKey:`settings.pages.providers.provider.openrouter.description`,description:`openrouter.ai`,icon:`i-lobe-icons:openrouter`,defaultOptions:()=>({baseUrl:`https://openrouter.ai/api/v1/`}),createProvider:e=>Me(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>i(e)},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},"app-local-audio-speech":{id:`app-local-audio-speech`,category:`speech`,tasks:[`text-to-speech`,`tts`],isAvailableBy:async()=>`window`in globalThis&&globalThis.window!=null&&`__TAURI__`in globalThis.window&&globalThis.window.__TAURI__!=null,nameKey:`settings.pages.providers.provider.app-local-audio-speech.title`,name:`App (Local)`,descriptionKey:`settings.pages.providers.provider.app-local-audio-speech.description`,description:`https://github.com/huggingface/candle`,icon:`i-lobe-icons:huggingface`,defaultOptions:()=>({}),createProvider:e=>W(e.baseUrl.trim()),capabilities:{listModels:async e=>(await A({...W(e.baseUrl.trim()).model()})).map(e=>({id:e.id,name:e.id,provider:`app-local-candle`,description:``,contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:e=>e.baseUrl?fetch(`${e.baseUrl.trim()}models`).then(e=>e.ok).catch(()=>!1):!1}},"app-local-audio-transcription":{id:`app-local-audio-transcription`,category:`transcription`,tasks:[`speech-to-text`,`automatic-speech-recognition`,`asr`,`stt`],isAvailableBy:async()=>`window`in globalThis&&globalThis.window!=null&&`__TAURI__`in globalThis.window&&globalThis.window.__TAURI__!=null,nameKey:`settings.pages.providers.provider.app-local-audio-transcription.title`,name:`App (Local)`,descriptionKey:`settings.pages.providers.provider.app-local-audio-transcription.description`,description:`https://github.com/huggingface/candle`,icon:`i-lobe-icons:huggingface`,defaultOptions:()=>({}),createProvider:e=>W(e.baseUrl.trim()),capabilities:{listModels:async e=>(await A({...W(e.baseUrl.trim()).model()})).map(e=>({id:e.id,name:e.id,provider:`app-local-candle`,description:``,contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:e=>e.baseUrl?fetch(`${e.baseUrl.trim()}models`).then(e=>e.ok).catch(()=>!1):!1}},"browser-local-audio-speech":{id:`browser-local-audio-speech`,category:`speech`,tasks:[`text-to-speech`,`tts`],isAvailableBy:async()=>{let e=await ne();if(e)return!0;if(`navigator`in globalThis&&globalThis.navigator!=null&&`deviceMemory`in globalThis.navigator&&typeof globalThis.navigator.deviceMemory==`number`){let e=globalThis.navigator.deviceMemory;if(e>=8)return!0}return!1},nameKey:`settings.pages.providers.provider.browser-local-audio-speech.title`,name:`Browser (Local)`,descriptionKey:`settings.pages.providers.provider.browser-local-audio-speech.description`,description:`https://github.com/moeru-ai/xsai-transformers`,icon:`i-lobe-icons:huggingface`,defaultOptions:()=>({}),createProvider:e=>W(e.baseUrl.trim()),capabilities:{listModels:async e=>(await A({...W(e.baseUrl.trim()).model()})).map(e=>({id:e.id,name:e.id,provider:`browser-local-transformers`,description:``,contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:e=>e.baseUrl?fetch(`${e.baseUrl.trim()}models`).then(e=>e.ok).catch(()=>!1):!1}},"browser-local-audio-transcription":{id:`browser-local-audio-transcription`,category:`transcription`,tasks:[`speech-to-text`,`automatic-speech-recognition`,`asr`,`stt`],isAvailableBy:async()=>{let e=await ne();if(e)return!0;if(`navigator`in globalThis&&globalThis.navigator!=null&&`deviceMemory`in globalThis.navigator&&typeof globalThis.navigator.deviceMemory==`number`){let e=globalThis.navigator.deviceMemory;if(e>=8)return!0}return!1},nameKey:`settings.pages.providers.provider.browser-local-audio-transcription.title`,name:`Browser (Local)`,descriptionKey:`settings.pages.providers.provider.browser-local-audio-transcription.description`,description:`https://github.com/moeru-ai/xsai-transformers`,icon:`i-lobe-icons:huggingface`,defaultOptions:()=>({}),createProvider:e=>W(e.baseUrl.trim()),capabilities:{listModels:async e=>(await A({...W(e.baseUrl.trim()).model()})).map(e=>({id:e.id,name:e.id,provider:`browser-local-transformers`,description:``,contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:e=>e.baseUrl?fetch(`${e.baseUrl.trim()}models`).then(e=>e.ok).catch(()=>!1):!1}},ollama:{id:`ollama`,category:`chat`,tasks:[`text-generation`],nameKey:`settings.pages.providers.provider.ollama.title`,name:`Ollama`,descriptionKey:`settings.pages.providers.provider.ollama.description`,description:`ollama.com`,icon:`i-lobe-icons:ollama`,defaultOptions:()=>({baseUrl:`http://localhost:11434/v1/`}),createProvider:e=>G(e.baseUrl.trim()),capabilities:{listModels:async e=>(await A({...G(e.baseUrl.trim()).model()})).map(e=>({id:e.id,name:e.id,provider:`ollama`,description:``,contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:e=>e.baseUrl?fetch(`${e.baseUrl.trim()}models`).then(e=>e.ok).catch(()=>!1):!1}},"ollama-embedding":{id:`ollama-embedding`,category:`embed`,tasks:[`text-feature-extraction`],nameKey:`settings.pages.providers.provider.ollama.title`,name:`Ollama`,descriptionKey:`settings.pages.providers.provider.ollama.description`,description:`ollama.com`,icon:`i-lobe-icons:ollama`,defaultOptions:()=>({baseUrl:`http://localhost:11434/v1/`}),createProvider:e=>G(e.baseUrl.trim()),capabilities:{listModels:async e=>(await A({...G(e.baseUrl.trim()).model()})).map(e=>({id:e.id,name:e.id,provider:`ollama`,description:``,contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:e=>!!e.baseUrl}},vllm:{id:`vllm`,category:`chat`,tasks:[`text-generation`],nameKey:`settings.pages.providers.provider.vllm.title`,name:`vLLM`,descriptionKey:`settings.pages.providers.provider.vllm.description`,description:`vllm.ai`,iconColor:`i-lobe-icons:vllm`,createProvider:e=>G(e.baseUrl.trim()),capabilities:{listModels:async()=>[{id:`llama-2-7b`,name:`Llama 2 (7B)`,provider:`vllm`,description:`Meta's Llama 2 7B parameter model`,contextLength:4096},{id:`llama-2-13b`,name:`Llama 2 (13B)`,provider:`vllm`,description:`Meta's Llama 2 13B parameter model`,contextLength:4096},{id:`llama-2-70b`,name:`Llama 2 (70B)`,provider:`vllm`,description:`Meta's Llama 2 70B parameter model`,contextLength:4096},{id:`mistral-7b`,name:`Mistral (7B)`,provider:`vllm`,description:`Mistral AI's 7B parameter model`,contextLength:8192},{id:`mixtral-8x7b`,name:`Mixtral (8x7B)`,provider:`vllm`,description:`Mistral AI's Mixtral 8x7B MoE model`,contextLength:32768},{id:`custom`,name:`Custom Model`,provider:`vllm`,description:`Specify a custom model name`,contextLength:0}]},validators:{validateProviderConfig:e=>!!e.baseUrl}},openai:{id:`openai`,category:`chat`,tasks:[`text-generation`],nameKey:`settings.pages.providers.provider.openai.title`,name:`OpenAI`,descriptionKey:`settings.pages.providers.provider.openai.description`,description:`openai.com`,icon:`i-lobe-icons:openai`,defaultOptions:()=>({baseUrl:`https://api.openai.com/v1/`}),createProvider:e=>W(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await A({...W(e.apiKey.trim(),e.baseUrl.trim()).model()})).map(e=>({id:e.id,name:e.id,provider:`openai`,description:``,contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},"openai-audio-speech":{id:`openai-audio-speech`,category:`speech`,tasks:[`text-to-speech`],nameKey:`settings.pages.providers.provider.openai.title`,name:`OpenAI`,descriptionKey:`settings.pages.providers.provider.openai.description`,description:`openai.com`,icon:`i-lobe-icons:openai`,defaultOptions:()=>({baseUrl:`https://api.openai.com/v1/`}),createProvider:e=>W(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await A({...W(e.apiKey.trim(),e.baseUrl.trim()).model()})).map(e=>({id:e.id,name:e.id,provider:`openai`,description:``,contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},"openai-audio-transcription":{id:`openai-audio-transcription`,category:`transcription`,tasks:[`speech-to-text`,`automatic-speech-recognition`,`asr`,`stt`],nameKey:`settings.pages.providers.provider.openai.title`,name:`OpenAI`,descriptionKey:`settings.pages.providers.provider.openai.description`,description:`openai.com`,icon:`i-lobe-icons:openai`,defaultOptions:()=>({baseUrl:`https://api.openai.com/v1/`}),createProvider:e=>W(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await A({...W(e.apiKey.trim(),e.baseUrl.trim()).model()})).map(e=>({id:e.id,name:e.id,provider:`openai`,description:``,contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},anthropic:{id:`anthropic`,category:`chat`,tasks:[`text-generation`],nameKey:`settings.pages.providers.provider.anthropic.title`,name:`Anthropic`,descriptionKey:`settings.pages.providers.provider.anthropic.description`,description:`anthropic.com`,icon:`i-lobe-icons:anthropic`,defaultOptions:()=>({baseUrl:`https://api.anthropic.com/v1/`}),createProvider:e=>Te(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async()=>[{id:`claude-3-7-sonnet-20250219`,name:`Claude 3.7 Sonnet`,provider:`anthropic`,description:``,contextLength:0,deprecated:!1},{id:`claude-3-5-sonnet-20241022`,name:`Claude 3.5 Sonnet (New)`,provider:`anthropic`,description:``,contextLength:0,deprecated:!1},{id:`claude-3-5-haiku-20241022`,name:`Claude 3.5 Haiku`,provider:`anthropic`,description:``,contextLength:0,deprecated:!1},{id:`claude-3-5-sonnet-20240620`,name:`Claude 3.5 Sonnet (Old)`,provider:`anthropic`,description:``,contextLength:0,deprecated:!1},{id:`claude-3-haiku-20240307`,name:`Claude 3 Haiku`,provider:`anthropic`,description:``,contextLength:0,deprecated:!1},{id:`claude-3-opus-20240229`,name:`Claude 3 Opus`,provider:`anthropic`,description:``,contextLength:0,deprecated:!1}]},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},"google-generative-ai":{id:`google-generative-ai`,category:`chat`,tasks:[`text-generation`],nameKey:`settings.pages.providers.provider.google-generative-ai.title`,name:`Google Gemini`,descriptionKey:`settings.pages.providers.provider.google-generative-ai.description`,description:`ai.google.dev`,icon:`i-lobe-icons:gemini`,defaultOptions:()=>({baseUrl:`https://generativelanguage.googleapis.com/v1beta/openai/`}),createProvider:e=>Oe(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await A({...Oe(e.apiKey.trim(),e.baseUrl.trim()).model()})).map(e=>({id:e.id,name:e.id,provider:`google-generative-ai`,description:``,contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},xai:{id:`xai`,category:`chat`,tasks:[`text-generation`],nameKey:`settings.pages.providers.provider.xai.title`,name:`xAI`,descriptionKey:`settings.pages.providers.provider.xai.description`,description:`x.ai`,icon:`i-lobe-icons:xai`,createProvider:e=>Ie(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await A({...Ie(e.apiKey.trim(),e.baseUrl.trim()).model()})).map(e=>({id:e.id,name:e.id,provider:`xai`,description:``,contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},deepseek:{id:`deepseek`,category:`chat`,tasks:[`text-generation`],nameKey:`settings.pages.providers.provider.deepseek.title`,name:`DeepSeek`,descriptionKey:`settings.pages.providers.provider.deepseek.description`,description:`deepseek.com`,iconColor:`i-lobe-icons:deepseek`,createProvider:e=>Ee(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await A({...Ee(e.apiKey.trim(),e.baseUrl.trim()).model()})).map(e=>({id:e.id,name:e.id,provider:`deepseek`,description:``,contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},elevenlabs:{id:`elevenlabs`,category:`speech`,tasks:[`text-to-speech`],nameKey:`settings.pages.providers.provider.elevenlabs.title`,name:`ElevenLabs`,descriptionKey:`settings.pages.providers.provider.elevenlabs.description`,description:`elevenlabs.io`,icon:`i-simple-icons:elevenlabs`,defaultOptions:()=>({baseUrl:`https://unspeech.hyp3r.link/v1/`,voiceSettings:{similarityBoost:.75,stability:.5}}),createProvider:e=>Ge(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async()=>Ye.map(e=>({id:e.model_id,name:e.name,provider:`elevenlabs`,description:e.description,contextLength:0,deprecated:!1})),listVoices:async e=>{let t=Ge(e.apiKey.trim(),e.baseUrl.trim()),n=await Y({...t.voice()}),r=n.findIndex(e=>e.name.includes(`Aria`)),i=n.findIndex(e=>e.name.includes(`Bill`)),a=r===-1?0:r,o=i===-1?n.length-1:i,s=Math.min(a,o),c=Math.max(a,o),l=[...n.slice(0,s),...n.slice(c+1),...n.slice(s,c+1)];return l.map(e=>({id:e.id,name:e.name,provider:`elevenlabs`,previewURL:e.preview_audio_url,languages:e.languages}))}},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},"microsoft-speech":{id:`microsoft-speech`,category:`speech`,tasks:[`text-to-speech`],nameKey:`settings.pages.providers.provider.microsoft-speech.title`,name:`Microsoft / Azure Speech`,descriptionKey:`settings.pages.providers.provider.microsoft-speech.description`,description:`speech.microsoft.com`,iconColor:`i-lobe-icons:microsoft`,defaultOptions:()=>({baseUrl:`https://unspeech.hyp3r.link/v1/`}),createProvider:e=>Ke(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async()=>[{id:`v1`,name:`v1`,provider:`microsoft-speech`,description:``,contextLength:0,deprecated:!1}],listVoices:async e=>{let t=Ke(e.apiKey.trim(),e.baseUrl.trim()),n=await Y({...t.voice({region:e.region})});return n.map(e=>{var t;return{id:e.id,name:e.name,provider:`microsoft-speech`,previewURL:e.preview_audio_url,languages:e.languages,gender:(t=e.labels)?.gender}})}},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},"alibaba-cloud-model-studio":{id:`alibaba-cloud-model-studio`,category:`speech`,tasks:[`text-to-speech`],nameKey:`settings.pages.providers.provider.alibaba-cloud-model-studio.title`,name:`Alibaba Cloud Model Studio`,descriptionKey:`settings.pages.providers.provider.alibaba-cloud-model-studio.description`,description:`bailian.console.aliyun.com`,iconColor:`i-lobe-icons:alibabacloud`,defaultOptions:()=>({baseUrl:`https://unspeech.hyp3r.link/v1/`}),createProvider:e=>Je(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listVoices:async e=>{let t=Je(e.apiKey.trim(),e.baseUrl.trim()),n=await Y({...t.voice()});return n.map(e=>{var t;return{id:e.id,name:e.name,provider:`alibaba-cloud-model-studio`,previewURL:e.preview_audio_url,languages:e.languages,gender:(t=e.labels)?.gender}})},listModels:async()=>[{id:`cozyvoice-v1`,name:`CozyVoice`,provider:`alibaba-cloud-model-studio`,description:``,contextLength:0,deprecated:!1},{id:`cozyvoice-v2`,name:`CozyVoice (New)`,provider:`alibaba-cloud-model-studio`,description:``,contextLength:0,deprecated:!1}]},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},volcengine:{id:`volcengine`,category:`speech`,tasks:[`text-to-speech`],nameKey:`settings.pages.providers.provider.volcengine.title`,name:`settings.pages.providers.provider.volcengine.title`,descriptionKey:`settings.pages.providers.provider.volcengine.description`,description:`volcengine.com`,iconColor:`i-lobe-icons:volcengine`,defaultOptions:()=>({baseUrl:`https://unspeech.hyp3r.link/v1/`}),createProvider:e=>qe(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listVoices:async e=>{let t=qe(e.apiKey.trim(),e.baseUrl.trim()),n=await Y({...t.voice()});return n.map(e=>{var t;return{id:e.id,name:e.name,provider:`volcano-engine`,previewURL:e.preview_audio_url,languages:e.languages,gender:(t=e.labels)?.gender}})},listModels:async()=>[{id:`v1`,name:`v1`,provider:`volcano-engine`,description:``,contextLength:0,deprecated:!1}]},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl&&!!e.app&&!!e.app.appId}},"together-ai":{id:`together-ai`,category:`chat`,tasks:[`text-generation`],nameKey:`settings.pages.providers.provider.together.title`,name:`Together.ai`,descriptionKey:`settings.pages.providers.provider.together.description`,description:`together.ai`,iconColor:`i-lobe-icons:together`,createProvider:e=>Pe(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await A({...Pe(e.apiKey.trim(),e.baseUrl.trim()).model()})).map(e=>({id:e.id,name:e.id,provider:`together-ai`,description:``,contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},"novita-ai":{id:`novita-ai`,category:`chat`,tasks:[`text-generation`],nameKey:`settings.pages.providers.provider.novita.title`,name:`Novita`,descriptionKey:`settings.pages.providers.provider.novita.description`,description:`novita.ai`,iconColor:`i-lobe-icons:novita`,createProvider:e=>je(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await A({...je(e.apiKey.trim(),e.baseUrl.trim()).model()})).map(e=>({id:e.id,name:e.id,provider:`novita-ai`,description:``,contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},"fireworks-ai":{id:`fireworks-ai`,category:`chat`,tasks:[`text-generation`],nameKey:`settings.pages.providers.provider.fireworks.title`,name:`Fireworks.ai`,descriptionKey:`settings.pages.providers.provider.fireworks.description`,description:`fireworks.ai`,icon:`i-lobe-icons:fireworks`,createProvider:e=>De(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await A({...De(e.apiKey.trim(),e.baseUrl.trim()).model()})).map(e=>({id:e.id,name:e.id,provider:`fireworks-ai`,description:``,contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},"featherless-ai":{id:`featherless-ai`,category:`chat`,tasks:[`text-generation`],nameKey:`settings.pages.providers.provider.featherless.title`,name:`Featherless.ai`,descriptionKey:`settings.pages.providers.provider.featherless.description`,description:`featherless.ai`,icon:`i-lobe-icons:featherless-ai`,defaultOptions:()=>({baseUrl:`https://api.featherless.ai/v1/`}),createProvider:e=>W(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await A({...W(e.apiKey.trim(),e.baseUrl.trim()).model()})).map(e=>({id:e.id,name:e.id,provider:`featherless-ai`,description:``,contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},"player2-api":{id:`player2-api`,category:`chat`,tasks:[`text-generation`],nameKey:`settings.pages.providers.provider.player2.title`,name:`Player2 API`,descriptionKey:`settings.pages.providers.provider.player2.description`,description:`player2.game`,defaultOptions:()=>({baseUrl:`http://localhost:4315/v1/`}),createProvider:e=>Re(e.baseUrl.trim()),capabilities:{listModels:async()=>[{id:`player2-model`,name:`Player2 Model`,provider:`player2-api`}]},validators:{validateProviderConfig:e=>e.baseUrl?fetch(`${e.baseUrl.trim()}health`).then(e=>e.ok).catch(()=>!1):!1}},"cloudflare-workers-ai":{id:`cloudflare-workers-ai`,category:`chat`,tasks:[`text-generation`],nameKey:`settings.pages.providers.provider.cloudflare-workers-ai.title`,name:`Cloudflare Workers AI`,descriptionKey:`settings.pages.providers.provider.cloudflare-workers-ai.description`,description:`cloudflare.com`,iconColor:`i-lobe-icons:cloudflare`,createProvider:e=>Fe(e.apiKey.trim(),e.accountId),capabilities:{listModels:async()=>[]},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.accountId}},"perplexity-ai":{id:`perplexity-ai`,category:`chat`,tasks:[`text-generation`],nameKey:`settings.pages.providers.provider.perplexity.title`,name:`Perplexity`,descriptionKey:`settings.pages.providers.provider.perplexity.description`,description:`perplexity.ai`,icon:`i-lobe-icons:perplexity`,defaultOptions:()=>({baseUrl:`https://api.perplexity.ai`}),createProvider:e=>Ne(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async()=>[{id:`sonar-small-online`,name:`Sonar Small (Online)`,provider:`perplexity-ai`,description:`Efficient model with online search capabilities`,contextLength:12e3},{id:`sonar-medium-online`,name:`Sonar Medium (Online)`,provider:`perplexity-ai`,description:`Balanced model with online search capabilities`,contextLength:12e3},{id:`sonar-large-online`,name:`Sonar Large (Online)`,provider:`perplexity-ai`,description:`Powerful model with online search capabilities`,contextLength:12e3},{id:`codey-small`,name:`Codey Small`,provider:`perplexity-ai`,description:`Specialized for code generation and understanding`,contextLength:12e3},{id:`codey-large`,name:`Codey Large`,provider:`perplexity-ai`,description:`Advanced code generation and understanding`,contextLength:12e3}]},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},"mistral-ai":{id:`mistral-ai`,category:`chat`,tasks:[`text-generation`],nameKey:`settings.pages.providers.provider.mistral.title`,name:`Mistral`,descriptionKey:`settings.pages.providers.provider.mistral.description`,description:`mistral.ai`,iconColor:`i-lobe-icons:mistral`,createProvider:e=>ke(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await A({...ke(e.apiKey.trim(),e.baseUrl.trim()).model()})).map(e=>({id:e.id,name:e.id,provider:`mistral-ai`,description:``,contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},"moonshot-ai":{id:`moonshot-ai`,category:`chat`,tasks:[`text-generation`],nameKey:`settings.pages.providers.provider.moonshot.title`,name:`Moonshot AI`,descriptionKey:`settings.pages.providers.provider.moonshot.description`,description:`moonshot.ai`,icon:`i-lobe-icons:moonshot`,createProvider:e=>Ae(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await A({...Ae(e.apiKey.trim(),e.baseUrl.trim()).model()})).map(e=>({id:e.id,name:e.id,provider:`moonshot-ai`,description:``,contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}}};async function s(t){let n=e.value[t];if(!n)return!1;let r=a[t];return r?await r.validators.validateProviderConfig(n):!1}let c=o({});function f(t){if(!e.value[t]){var n;let r=a[t],i=(n=r.defaultOptions)?.call(r)||{};e.value[t]={baseUrl:i.baseUrl||``}}}Object.keys(a).forEach(f);async function p(){await Promise.all(Object.keys(a).map(async e=>{c.value[e]=await s(e)}))}p(),d(e,p,{deep:!0});let m=n(()=>Object.keys(a).filter(e=>c.value[e])),h=o({}),g=o({}),_=o({});async function v(t){let n=e.value[t];if(!n)return[];let r=a[t];if(!r)return[];g.value[t]=!0,_.value[t]=null;try{let e=r.capabilities.listModels?await r.capabilities.listModels(n):[];return h.value[t]=e.map(e=>({id:e.id,name:e.name,description:e.description,contextLength:e.contextLength,deprecated:e.deprecated,provider:t})),h.value[t]}catch(e){return console.error(`Error fetching models for ${t}:`,e),_.value[t]=e instanceof Error?e.message:`Unknown error`,[]}finally{g.value[t]=!1}}function y(e){return h.value[e]||[]}let b=n(()=>{let e=[];for(let t of m.value)e.push(...h.value[t]||[]);return e});async function x(){for(let e of m.value)a[e].capabilities.listModels&&await v(e)}function S(e){let n=a[e];if(!n)throw Error(`Provider metadata for ${e} not found`);return{...n,localizedName:t(n.nameKey,n.name),localizedDescription:t(n.descriptionKey,n.description)}}let C=n(()=>Object.values(a).map(e=>({...e,localizedName:t(e.nameKey,e.name),localizedDescription:t(e.descriptionKey,e.description),configured:c.value[e.id]||!1})));function w(t){let n=e.value[t];if(!n)throw Error(`Provider credentials for ${t} not found`);let r=a[t];if(!r)throw Error(`Provider metadata for ${t} not found`);try{return r.createProvider(n)}catch(e){throw console.error(`Error creating provider instance for ${t}:`,e),e}}let T=r(async()=>{let e=[];for(let t of C.value){let n=S(t.id),r=n.isAvailableBy||(()=>!0),i=await r();i&&e.push(t)}return e},[]),E=n(()=>T.value.filter(e=>e.category===`chat`)),D=n(()=>T.value.filter(e=>e.category===`speech`)),O=n(()=>T.value.filter(e=>e.category===`transcription`)),k=n(()=>E.value.filter(e=>c.value[e.id])),ee=n(()=>D.value.filter(e=>c.value[e.id])),te=n(()=>O.value.filter(e=>c.value[e.id]));function re(t){return e.value[t]}return{providers:e,getProviderConfig:re,availableProviders:m,configuredProviders:c,providerMetadata:a,getProviderMetadata:S,allProvidersMetadata:C,initializeProvider:f,validateProvider:s,availableModels:h,isLoadingModels:g,modelLoadError:_,fetchModelsForProvider:v,getModelsForProvider:y,allAvailableModels:b,loadModelsForConfiguredProviders:x,getProviderInstance:w,availableProvidersMetadata:T,allChatProvidersMetadata:E,allAudioSpeechProvidersMetadata:D,allAudioTranscriptionProvidersMetadata:O,configuredChatProvidersMetadata:k,configuredSpeechProvidersMetadata:ee,configuredTranscriptionProvidersMetadata:te}}),Xe=i(`consciousness`,()=>{let e=X(),t=u(`settings/consciousness/active-provider`,``),r=u(`settings/consciousness/active-model`,``),i=u(`settings/consciousness/active-custom-model`,``),a=o({}),s=o(``),c=n(()=>{var n;return(n=e.getProviderMetadata(t.value))?.capabilities.listModels!==void 0}),l=n(()=>e.getModelsForProvider(t.value)),f=n(()=>e.isLoadingModels[t.value]||!1),p=n(()=>e.modelLoadError[t.value]||null),m=n(()=>{if(!s.value.trim())return l.value;let e=s.value.toLowerCase().trim();return l.value.filter(t=>t.name.toLowerCase().includes(e)||t.id.toLowerCase().includes(e)||t.description&&t.description.toLowerCase().includes(e))});function h(){r.value=``,i.value=``,a.value={},s.value=``}async function g(n){var r;n&&(r=e.getProviderMetadata(t.value))?.capabilities.listModels!==void 0&&e.getModelsForProvider(n).length===0&&await e.fetchModelsForProvider(n)}let _;return d(t,async e=>{await g(e),h(),e===`player2-api`?_=setInterval(()=>{console.log(`Sending Player2 Health check if it is being used`),fetch(`http://localhost:4315/v1/health`).catch(()=>{})},6e4):(_&&clearInterval(_),_=void 0)}),{activeProvider:t,activeModel:r,customModelName:i,expandedDescriptions:a,modelSearchQuery:s,supportsModelListing:c,providerModels:l,isLoadingActiveProviderModels:f,activeProviderModelError:p,filteredModels:m,resetModelSelection:h,loadModelsForProvider:g}}),Ze=async e=>(e.fetch??globalThis.fetch)(O(`audio/speech`,e.baseURL),{body:E(e),headers:D({"Content-Type":`application/json`,...e.headers},e.apiKey),method:`POST`,signal:e.abortSignal}).then(k).then(async e=>e.arrayBuffer()),Qe=/[\u0000-\u0008\u000B\u000C\u000E-\u001F]/g;function Z(e,t,n){let r=$e(e);return n?r.replace(n,i):i(r);function i(e){return x(e,{subset:t})}}function $e(e){return String(e||``).replace(Qe,``)}const et=/]]>/g,tt=[`>`];function nt(e){return``}function rt(e){return``}const it=[` `,` +var e=function(exports){function t(e){"@babel/helpers - typeof";return t=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},t(e)}function n(e,n){if(t(e)!=`object`||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,n||`default`);if(t(i)!=`object`)return i;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(n===`string`?String:Number)(e)}function r(e){var r=n(e,`string`);return t(r)==`symbol`?r:r+``}function i(e,t,n){return(t=r(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}return exports.defineProperty=i,exports}({});import{__toESM as t,computed as n,computedAsync as r,defineStore as i,onMounted as a,ref as o,storeToRefs as s,toRaw as c,useI18n as l,useLocalStorage as u,watch as d}from"./index-CsmT0L1K.js";import{toJsonSchema as f}from"./index-CISmcbXk-C9oju49Y.js";import{arrayType as p,booleanType as m,numberType as h,objectType as g,stringType as _,unionType as v}from"./types-AwjH7X1C.js";import{require___vite_browser_external as y}from"./__vite-browser-external-DPh5tFvT.js";import{ccount as b,stringifyEntitiesLight as x,useLlmmarkerParser as S}from"./composables-CgcEyUWo.js";import{useQueue as C}from"./queue-B0kER5Ap.js";import{system_v2_default as w}from"./queues-hSEKEE3F.js";import{objCamelToSnake as T,requestBody as E,requestHeaders as D,requestURL as O,responseCatch as k,responseJSON as ee,streamText as te}from"./dist-Cr2QBfS4.js";import{isWebGPUSupported as ne}from"./webgpu-Nt9hTBpW.js";function re(e){let t=new Uint8Array(e.frequencyBinCount);e.getByteFrequencyData(t);let n=[];for(let e=0;e<700;e+=80)n.push(t[e]);let r=t.map(e=>e**1.2).map(e=>e*1.2).reduce((e,t)=>e+t,0);return r/t.length/100}function ie(e){let t=new Uint8Array(e.frequencyBinCount);e.getByteFrequencyData(t);let n=[];for(let e=0;e<700;e+=80)n.push(t[e]);let r=t.map(e=>e**1.5),i=Math.min(...r),a=Math.max(...r),o=a-i,s;s=o===0?r.map(()=>0):r.map(e=>(e-i)/o);let c=s.reduce((e,t)=>e+t,0);return c/t.length}function ae(e,t=`linear`){switch(t){case`linear`:return re(e);case`minmax`:return ie(e)}}const oe=i(`AudioContext`,()=>{let e=new AudioContext;return{audioContext:e,calculateVolume:ae}}),se=i(`SpeakingStore`,()=>{let e=30,t=100,r=o(0),i=o(!1),a=n(()=>i.value?(e+(t-e)*r.value)/100:e);return{mouthOpenSize:r,nowSpeaking:i,nowSpeakingAvatarBorderOpacity:a}});async function*ce(e,t){let n=e.getReader();try{for(;;){let{done:e,value:r}=await n.read();if(e)return;yield t(r)}}finally{n.releaseLock()}}const A=async e=>(e.fetch??globalThis.fetch)(O(`models`,e.baseURL),{headers:D(e.headers,e.apiKey),signal:e.abortSignal}).then(ee).then(({data:e})=>e),j=async({description:e,execute:t,name:n,parameters:r})=>{let i=await f(r);return{execute:t,function:{description:e,name:n,parameters:{...i,additionalProperties:!1},strict:!0},type:`function`}},le=[j({name:`debug_random_number`,description:`Generate a random number between 0 and 1`,execute:async()=>new Promise(e=>{setTimeout(()=>{e(Math.random().toString())},1e3)}),parameters:g({})})],ue=async()=>Promise.all(le);function M(e,t,n,r){if(n===`a`&&!r)throw TypeError(`Private accessor was defined without a getter`);if(typeof t==`function`?e!==t||!r:!t.has(e))throw TypeError(`Cannot read private member from an object whose class did not declare it`);return n===`m`?r:n===`a`?r.call(e):r?r.value:t.get(e)}function N(e,t,n,r,i){if(r===`m`)throw TypeError(`Private method is not writable`);if(r===`a`&&!i)throw TypeError(`Private accessor was defined without a setter`);if(typeof t==`function`?e!==t||!i:!t.has(e))throw TypeError(`Cannot write private member to an object whose class did not declare it`);return r===`a`?i.call(e,n):i?i.value=n:t.set(e,n),n}var P,F,I,L,de;const fe=`__TAURI_TO_IPC_KEY__`;function pe(e,t=!1){return window.__TAURI_INTERNALS__.transformCallback(e,t)}var me=class{constructor(e){P.set(this,void 0),F.set(this,0),I.set(this,[]),L.set(this,void 0),N(this,P,e||(()=>{}),`f`),this.id=pe(e=>{let t=e.index;if(`end`in e){t==M(this,F,`f`)?this.cleanupCallback():N(this,L,t,`f`);return}let n=e.message;if(t==M(this,F,`f`)){for(M(this,P,`f`).call(this,n),N(this,F,M(this,F,`f`)+1,`f`);M(this,F,`f`)in M(this,I,`f`);){let e=M(this,I,`f`)[M(this,F,`f`)];M(this,P,`f`).call(this,e),delete M(this,I,`f`)[M(this,F,`f`)],N(this,F,M(this,F,`f`)+1,`f`)}M(this,F,`f`)===M(this,L,`f`)&&this.cleanupCallback()}else M(this,I,`f`)[t]=n})}cleanupCallback(){window.__TAURI_INTERNALS__.unregisterCallback(this.id)}set onmessage(e){N(this,P,e,`f`)}get onmessage(){return M(this,P,`f`)}[(P=new WeakMap,F=new WeakMap,I=new WeakMap,L=new WeakMap,fe)](){return`__CHANNEL__:${this.id}`}toJSON(){return this[fe]()}};async function R(e,t={},n){return window.__TAURI_INTERNALS__.invoke(e,t,n)}de=new WeakMap;async function he(e,t){await R(`plugin:mcp|connect_server`,{command:e,args:t})}async function ge(){await R(`plugin:mcp|disconnect_server`)}async function _e(){return await R(`plugin:mcp|list_tools`)}async function ve(e,t){return await R(`plugin:mcp|call_tool`,{name:e,args:t})}const ye=[j({name:`mcp_list_tools`,description:`List all tools available on the MCP server`,execute:async(e,t)=>await _e(),parameters:g({})}),j({name:`mcp_connect_server`,description:`Connect to the MCP server. If "success", the connection to the MCP server is successful. Otherwise, the connection fails.`,execute:async({command:e,args:t})=>(await he(e,t),`success`),parameters:g({command:_().describe(`The command to connect to the MCP server`),args:p(_()).describe(`The arguments to pass to the MCP server`)})}),j({name:`mcp_disconnect_server`,description:`Disconnect from the MCP server. If "success", the disconnection from the MCP server is successful. Otherwise, the disconnection fails.`,execute:async()=>(await ge(),`success`),parameters:g({})}),j({name:`mcp_call_tool`,description:`Call a tool on the MCP server. The result is a list of content and a boolean indicating whether the tool call is an error.`,execute:async({name:e,parameters:t})=>{let n=Object.fromEntries(t.map(({name:e,value:t})=>[e,t])),r=await ve(e,n);return r},parameters:g({name:_().describe(`The name of the tool to call`),parameters:p(g({name:_().describe(`The name of the parameter`),value:v([_(),h(),m(),g({})]).describe(`The value of the parameter, it can be a string, a number, a boolean, or an object`)})).describe(`The parameters to pass to the tool`)})})],be=async()=>Promise.all(ye),xe=i(`llm`,()=>{async function e(e,t,n,r){let i=r?.headers;return await te({...t.chat(e),maxSteps:10,messages:n.map(e=>({...e,content:e.role===`error`?`User encountered error: ${e.content}`:e.content,role:e.role===`error`?`user`:e.role})),headers:i,tools:[...await be(),...await ue()],onEvent(e){var t,n;e.type===`tool-call`?r==null||(t=r.onToolCall)==null||t.call(r,e.toolCall):e.type===`tool-call-result`&&(r==null||(n=r.onToolCallResult)==null||n.call(r,{id:e.id,result:e.result}))}})}async function t(e,t){if(e===``)return[];try{return await A({baseURL:e.endsWith(`/`)?e:`${e}/`,apiKey:t})}catch(e){if(String(e).includes(`Failed to construct 'URL': Invalid URL`))return[];throw e}}return{models:t,stream:e}}),z=e=>({chat:t=>Object.assign(e,{model:t})}),B=e=>({embed:t=>Object.assign(e,{model:t})}),Se=e=>({image:t=>Object.assign(e,{model:t})}),V=e=>({model:()=>e}),Ce=e=>({speech:t=>Object.assign(e,{model:t})}),we=e=>({transcription:t=>Object.assign(e,{model:t})}),H=(e,t)=>({metadata:{id:e,...t}}),U=(...e)=>Object.assign(e[0],...e.slice(1)),Te=(e,t=`https://api.anthropic.com/v1/`)=>U(H(`anthropic`),z({apiKey:e,baseURL:t}),V({apiKey:e,baseURL:t})),Ee=(e,t=`https://api.deepseek.com/`)=>U(H(`deepseek`),z({apiKey:e,baseURL:t}),V({apiKey:e,baseURL:t})),De=(e,t=`https://api.fireworks.ai/inference/v1/`)=>U(H(`fireworks`),z({apiKey:e,baseURL:t}),B({apiKey:e,baseURL:t}),V({apiKey:e,baseURL:t})),Oe=(e,t=`https://generativelanguage.googleapis.com/v1beta/openai/`)=>U(H(`google-generative-ai`),z({apiKey:e,baseURL:t}),B({apiKey:e,baseURL:t}),V({apiKey:e,baseURL:t})),ke=(e,t=`https://api.mistral.ai/v1/`)=>U(H(`mistral`),z({apiKey:e,baseURL:t}),B({apiKey:e,baseURL:t}),V({apiKey:e,baseURL:t})),Ae=(e,t=`https://api.moonshot.cn/v1/`)=>U(H(`moonshot`),z({apiKey:e,baseURL:t}),V({apiKey:e,baseURL:t})),je=(e,t=`https://api.novita.ai/v3/openai/`)=>U(H(`novita`),z({apiKey:e,baseURL:t}),V({apiKey:e,baseURL:t})),W=(e,t=`https://api.openai.com/v1/`)=>U(H(`openai`),z({apiKey:e,baseURL:t}),B({apiKey:e,baseURL:t}),Se({apiKey:e,baseURL:t}),V({apiKey:e,baseURL:t}),Ce({apiKey:e,baseURL:t}),we({apiKey:e,baseURL:t})),Me=(e,t=``)=>U(H(`openrouter`),{chat:(n,r)=>{let i={apiKey:e,baseURL:t,model:n},a=({extraHeaders:e,models:t,provider:n})=>{e!=null&&(i.headers??={},Object.assign(i.headers,e));let r;return n!=null&&(r=T(n)),T({models:t,provider:r})};return{...r?a(r):{},...i}}},V({apiKey:e,baseURL:t})),Ne=(e,t=`https://api.perplexity.ai/`)=>U(H(`perplexity`),z({apiKey:e,baseURL:t})),Pe=(e,t=`https://api.together.xyz/v1/`)=>U(H(`together-ai`),z({apiKey:e,baseURL:t}),B({apiKey:e,baseURL:t}),V({apiKey:e,baseURL:t,fetch:async(...e)=>globalThis.fetch(...e).then(async e=>e.json()).then(e=>Response.json({data:e,object:`list`}))})),Fe=(e,t)=>{let n=`https://api.cloudflare.com/client/v4/accounts/${t}/ai/v1/`;return U(H(`workers-ai`),z({apiKey:e,baseURL:n}),B({apiKey:e,baseURL:n}))},Ie=(e,t=`https://api.x.ai/v1/`)=>U(H(`xai`),z({apiKey:e,baseURL:t}),V({apiKey:e,baseURL:t}));var Le=t(y());const G=(e=`http://localhost:11434/v1/`)=>U(H(`ollama`),z({baseURL:e}),B({baseURL:e}),V({baseURL:e})),Re=(e=`http://localhost:4315/v1/`,t=`xsai`)=>U(H(`player2`),z({baseURL:e,headers:{"player2-game-key":t}}),Ce({baseURL:e,fetch:async(e,t)=>{let n=`${e.toString().slice(0,-12)}tts/speak`;try{let{input:e,response_format:n,speed:r,voice:i,...a}=JSON.parse(t?.body),o={audio_format:n,play_in_app:!1,speed:r??1,text:e,voice_ids:i==null?[]:[i],...a};t&&(t.body=JSON.stringify(o))}catch(e){console.warn(`Could not parse body as JSON:`,e)}return globalThis.fetch(n,t).then(async e=>e.json()).then(e=>{let t=e.data??``,n=Le.Buffer.from(t,`base64`).toString(`binary`),r=Uint8Array.from(Array.from(n,e=>e.charCodeAt(0)));for(let e=0;eObject.assign(e[0],...e.slice(1));var q=class extends Error{constructor(t,n){super(t),e.defineProperty(this,`response`,void 0),this.name=`XSAIError`,this.response=n}};const ze=e=>e.replace(/[A-Z]/g,e=>`_${e.toLowerCase()}`),J=e=>Object.fromEntries(Object.entries(e).map(([e,t])=>[ze(e),t])),Be=e=>Object.fromEntries(Object.entries(e).filter(([,e])=>e!==void 0)),Ve=(e,t)=>Be({Authorization:t===void 0?void 0:`Bearer ${t}`,...e}),He=(e,t)=>{let n=t.toString();return new URL(e,n.endsWith(`/`)?n:`${n}/`)},Ue=async e=>{if(!e.ok)throw new q(`Remote sent ${e.status} response: ${await e.text()}`,e);if(!e.body)throw new q(`Response body is empty from remote server`,e);if(!(e.body instanceof ReadableStream))throw new q(`Expected Response body to be a ReadableStream, but got ${String(e.body)}; Content Type is ${e.headers.get(`Content-Type`)}`,e);return e},We=async e=>Ue(e).then(async e=>{let t=await e.text();try{return JSON.parse(t)}catch{throw Error(`Failed to parse response, response body: ${t}`)}});var Ge=(e,t=`http://localhost:5933/v1/`)=>{let n=({applyTextNormalization:e,languageCode:t,nextRequestIds:n,nextText:r,previousRequestIds:i,previousText:a,pronunciationDictionaryLocators:o,seed:s,voiceSettings:c})=>({extraBody:J({applyTextNormalization:e,languageCode:t,nextRequestIds:n,nextText:r,previousRequestIds:i,previousText:a,pronunciationDictionaryLocators:o?o.map(e=>J(e)):void 0,seed:s,voiceSettings:J(c??{similarityBoost:.75,stability:.5})})}),r={speech:(r,i)=>({...i?n(i):{},apiKey:e,baseURL:t,model:`elevenlabs/${r}`})},i={voice:r=>(t.endsWith(`v1/`)?t=t.slice(0,-3):t.endsWith(`v1`)&&(t=t.slice(0,-2)),{query:`provider=elevenlabs`,...r?n(r):{},apiKey:e,baseURL:t})};return K(r,i)},Ke=(e,t=`http://localhost:5933/v1/`)=>{let n=e=>{let{deploymentId:t,region:n,sampleRate:r}=e,i={deploymentId:t,region:n,sampleRate:r};return`disableSsml`in e?i.disableSsml=e.disableSsml:`lang`in e&&(i.lang=e.lang,i.gender=e.gender,i.voice=e.voice),{extraBody:J(i)}},r={speech:(r,i)=>({...i?n(i):{},apiKey:e,baseURL:t,model:`microsoft/${r}`})},i={voice:r=>(t.endsWith(`v1/`)?t=t.slice(0,-3):t.endsWith(`v1`)&&(t=t.slice(0,-2)),{query:`region=${r?.region}&provider=microsoft`,...r?n(r):{},apiKey:e,baseURL:t})};return K(r,i)},qe=(e,t=`http://localhost:5933/v1/`)=>{let n=t=>{var n,r;let i={app:{appid:(n=t.app)?.appId,token:e}};return t.app!==void 0&&(i.app={...t.app,appid:(r=t.app)?.appId,token:e}),t.user!==void 0&&(i.user=t.user),t.audio!==void 0&&(i.audio=t.audio),{extraBody:J(i)}},r={speech:(r,i)=>({...i?n(i):{},apiKey:e,baseURL:t,model:`volcengine/${r}`})},i={voice:r=>(t.endsWith(`v1/`)?t=t.slice(0,-3):t.endsWith(`v1`)&&(t=t.slice(0,-2)),{query:`provider=volcengine`,...r?n(r):{},apiKey:e,baseURL:t})};return K(r,i)},Je=(e,t=`http://localhost:5933/v1/`)=>{let n=e=>{let{sampleRate:t,volume:n,rate:r,pitch:i}=e,a={sampleRate:t,volume:n,rate:r,pitch:i};return Object.keys(a).forEach(e=>a[e]===void 0&&delete a[e]),{extraBody:J(a)}},r={speech:(r,i)=>({...i?n(i):{},apiKey:e,baseURL:t,model:`alibaba/${r}`})},i={voice:r=>{let i=t;return i.endsWith(`v1/`)?i=i.slice(0,-3):i.endsWith(`v1`)&&(i=i.slice(0,-2)),{query:`provider=alibaba`,...r?n(r):{},apiKey:e,baseURL:i}}};return K(r,i)},Y=async e=>(e.fetch??globalThis.fetch)(He(e.query?`api/voices?${e.query}`:`api/voices`,e.baseURL),{headers:Ve({...e.headers},e.apiKey),method:`GET`,signal:e.abortSignal}).then(We).then(({voices:e})=>e);const Ye=[{model_id:`eleven_multilingual_v2`,name:`Eleven Multilingual v2`,can_be_finetuned:!0,can_do_text_to_speech:!0,can_do_voice_conversion:!1,can_use_style:!0,can_use_speaker_boost:!0,serves_pro_voices:!1,token_cost_factor:1,description:`Our most life-like, emotionally rich mode in 29 languages. Best for voice overs, audiobooks, post-production, or any other content creation needs.`,requires_alpha_access:!1,max_characters_request_free_user:1e4,max_characters_request_subscribed_user:1e4,maximum_text_length_per_request:1e4,languages:[{language_id:`en`,name:`English`},{language_id:`ja`,name:`Japanese`},{language_id:`zh`,name:`Chinese`},{language_id:`de`,name:`German`},{language_id:`hi`,name:`Hindi`},{language_id:`fr`,name:`French`},{language_id:`ko`,name:`Korean`},{language_id:`pt`,name:`Portuguese`},{language_id:`it`,name:`Italian`},{language_id:`es`,name:`Spanish`},{language_id:`id`,name:`Indonesian`},{language_id:`nl`,name:`Dutch`},{language_id:`tr`,name:`Turkish`},{language_id:`fil`,name:`Filipino`},{language_id:`pl`,name:`Polish`},{language_id:`sv`,name:`Swedish`},{language_id:`bg`,name:`Bulgarian`},{language_id:`ro`,name:`Romanian`},{language_id:`ar`,name:`Arabic`},{language_id:`cs`,name:`Czech`},{language_id:`el`,name:`Greek`},{language_id:`fi`,name:`Finnish`},{language_id:`hr`,name:`Croatian`},{language_id:`ms`,name:`Malay`},{language_id:`sk`,name:`Slovak`},{language_id:`da`,name:`Danish`},{language_id:`ta`,name:`Tamil`},{language_id:`uk`,name:`Ukrainian`},{language_id:`ru`,name:`Russian`}],model_rates:{character_cost_multiplier:1},concurrency_group:`standard`},{model_id:`eleven_flash_v2_5`,name:`Eleven Flash v2.5`,can_be_finetuned:!0,can_do_text_to_speech:!0,can_do_voice_conversion:!1,can_use_style:!1,can_use_speaker_boost:!1,serves_pro_voices:!1,token_cost_factor:1,description:`Our ultra low latency model in 32 languages. Ideal for conversational use cases.`,requires_alpha_access:!1,max_characters_request_free_user:4e4,max_characters_request_subscribed_user:4e4,maximum_text_length_per_request:4e4,languages:[{language_id:`en`,name:`English`},{language_id:`ja`,name:`Japanese`},{language_id:`zh`,name:`Chinese`},{language_id:`de`,name:`German`},{language_id:`hi`,name:`Hindi`},{language_id:`fr`,name:`French`},{language_id:`ko`,name:`Korean`},{language_id:`pt`,name:`Portuguese`},{language_id:`it`,name:`Italian`},{language_id:`es`,name:`Spanish`},{language_id:`ru`,name:`Russian`},{language_id:`id`,name:`Indonesian`},{language_id:`nl`,name:`Dutch`},{language_id:`tr`,name:`Turkish`},{language_id:`fil`,name:`Filipino`},{language_id:`pl`,name:`Polish`},{language_id:`sv`,name:`Swedish`},{language_id:`bg`,name:`Bulgarian`},{language_id:`ro`,name:`Romanian`},{language_id:`ar`,name:`Arabic`},{language_id:`cs`,name:`Czech`},{language_id:`el`,name:`Greek`},{language_id:`fi`,name:`Finnish`},{language_id:`hr`,name:`Croatian`},{language_id:`ms`,name:`Malay`},{language_id:`sk`,name:`Slovak`},{language_id:`da`,name:`Danish`},{language_id:`ta`,name:`Tamil`},{language_id:`uk`,name:`Ukrainian`},{language_id:`hu`,name:`Hungarian`},{language_id:`no`,name:`Norwegian`},{language_id:`vi`,name:`Vietnamese`}],model_rates:{character_cost_multiplier:.5},concurrency_group:`turbo`},{model_id:`eleven_turbo_v2_5`,name:`Eleven Turbo v2.5`,can_be_finetuned:!0,can_do_text_to_speech:!0,can_do_voice_conversion:!1,can_use_style:!1,can_use_speaker_boost:!1,serves_pro_voices:!1,token_cost_factor:1,description:`Our high quality, low latency model in 32 languages. Best for developer use cases where speed matters and you need non-English languages.`,requires_alpha_access:!1,max_characters_request_free_user:4e4,max_characters_request_subscribed_user:4e4,maximum_text_length_per_request:4e4,languages:[{language_id:`en`,name:`English`},{language_id:`ja`,name:`Japanese`},{language_id:`zh`,name:`Chinese`},{language_id:`de`,name:`German`},{language_id:`hi`,name:`Hindi`},{language_id:`fr`,name:`French`},{language_id:`ko`,name:`Korean`},{language_id:`pt`,name:`Portuguese`},{language_id:`it`,name:`Italian`},{language_id:`es`,name:`Spanish`},{language_id:`ru`,name:`Russian`},{language_id:`id`,name:`Indonesian`},{language_id:`nl`,name:`Dutch`},{language_id:`tr`,name:`Turkish`},{language_id:`fil`,name:`Filipino`},{language_id:`pl`,name:`Polish`},{language_id:`sv`,name:`Swedish`},{language_id:`bg`,name:`Bulgarian`},{language_id:`ro`,name:`Romanian`},{language_id:`ar`,name:`Arabic`},{language_id:`cs`,name:`Czech`},{language_id:`el`,name:`Greek`},{language_id:`fi`,name:`Finnish`},{language_id:`hr`,name:`Croatian`},{language_id:`ms`,name:`Malay`},{language_id:`sk`,name:`Slovak`},{language_id:`da`,name:`Danish`},{language_id:`ta`,name:`Tamil`},{language_id:`uk`,name:`Ukrainian`},{language_id:`vi`,name:`Vietnamese`},{language_id:`no`,name:`Norwegian`},{language_id:`hu`,name:`Hungarian`}],model_rates:{character_cost_multiplier:.5},concurrency_group:`turbo`},{model_id:`eleven_turbo_v2`,name:`Eleven Turbo v2`,can_be_finetuned:!0,can_do_text_to_speech:!0,can_do_voice_conversion:!1,can_use_style:!1,can_use_speaker_boost:!1,serves_pro_voices:!1,token_cost_factor:1,description:`Our English-only, low latency model. Best for developer use cases where speed matters and you only need English. Performance is on par with Turbo v2.5.`,requires_alpha_access:!1,max_characters_request_free_user:3e4,max_characters_request_subscribed_user:3e4,maximum_text_length_per_request:3e4,languages:[{language_id:`en`,name:`English`}],model_rates:{character_cost_multiplier:.5},concurrency_group:`turbo`},{model_id:`eleven_flash_v2`,name:`Eleven Flash v2`,can_be_finetuned:!0,can_do_text_to_speech:!0,can_do_voice_conversion:!1,can_use_style:!1,can_use_speaker_boost:!1,serves_pro_voices:!1,token_cost_factor:1,description:`Our ultra low latency model in english. Ideal for conversational use cases.`,requires_alpha_access:!1,max_characters_request_free_user:3e4,max_characters_request_subscribed_user:3e4,maximum_text_length_per_request:3e4,languages:[{language_id:`en`,name:`English`}],model_rates:{character_cost_multiplier:.5},concurrency_group:`turbo`},{model_id:`eleven_english_sts_v2`,name:`Eleven English v2`,can_be_finetuned:!1,can_do_text_to_speech:!1,can_do_voice_conversion:!0,can_use_style:!0,can_use_speaker_boost:!0,serves_pro_voices:!1,token_cost_factor:1,description:`Our state-of-the-art speech to speech model suitable for scenarios where you need maximum control over the content and prosody of your generations.`,requires_alpha_access:!1,max_characters_request_free_user:5e3,max_characters_request_subscribed_user:5e3,maximum_text_length_per_request:5e3,languages:[{language_id:`en`,name:`English`}],model_rates:{character_cost_multiplier:1},concurrency_group:`standard`},{model_id:`eleven_multilingual_v1`,name:`Eleven Multilingual v1`,can_be_finetuned:!1,can_do_text_to_speech:!0,can_do_voice_conversion:!1,can_use_style:!1,can_use_speaker_boost:!1,serves_pro_voices:!1,token_cost_factor:1,description:`Our first Multilingual model, capability of generating speech in 10 languages. Now outclassed by Multilingual v2 (for content creation) and Turbo v2.5 (for low latency use cases).`,requires_alpha_access:!1,max_characters_request_free_user:1e4,max_characters_request_subscribed_user:1e4,maximum_text_length_per_request:1e4,languages:[{language_id:`en`,name:`English`},{language_id:`de`,name:`German`},{language_id:`pl`,name:`Polish`},{language_id:`es`,name:`Spanish`},{language_id:`it`,name:`Italian`},{language_id:`fr`,name:`French`},{language_id:`pt`,name:`Portuguese`},{language_id:`hi`,name:`Hindi`},{language_id:`ar`,name:`Arabic`}],model_rates:{character_cost_multiplier:1},concurrency_group:`standard`},{model_id:`eleven_multilingual_sts_v2`,name:`Eleven Multilingual v2`,can_be_finetuned:!0,can_do_text_to_speech:!1,can_do_voice_conversion:!0,can_use_style:!0,can_use_speaker_boost:!0,serves_pro_voices:!1,token_cost_factor:1,description:`Our cutting-edge, multilingual speech-to-speech model is designed for situations that demand unparalleled control over both the content and the prosody of the generated speech across various languages.`,requires_alpha_access:!1,max_characters_request_free_user:1e4,max_characters_request_subscribed_user:1e4,maximum_text_length_per_request:1e4,languages:[{language_id:`en`,name:`English`},{language_id:`ja`,name:`Japanese`},{language_id:`zh`,name:`Chinese`},{language_id:`de`,name:`German`},{language_id:`hi`,name:`Hindi`},{language_id:`fr`,name:`French`},{language_id:`ko`,name:`Korean`},{language_id:`pt`,name:`Portuguese`},{language_id:`it`,name:`Italian`},{language_id:`es`,name:`Spanish`},{language_id:`ru`,name:`Russian`},{language_id:`id`,name:`Indonesian`},{language_id:`nl`,name:`Dutch`},{language_id:`tr`,name:`Turkish`},{language_id:`fil`,name:`Filipino`},{language_id:`pl`,name:`Polish`},{language_id:`sv`,name:`Swedish`},{language_id:`bg`,name:`Bulgarian`},{language_id:`ro`,name:`Romanian`},{language_id:`ar`,name:`Arabic`},{language_id:`cs`,name:`Czech`},{language_id:`el`,name:`Greek`},{language_id:`fi`,name:`Finnish`},{language_id:`hr`,name:`Croatian`},{language_id:`ms`,name:`Malay`},{language_id:`sk`,name:`Slovak`},{language_id:`da`,name:`Danish`},{language_id:`ta`,name:`Tamil`},{language_id:`uk`,name:`Ukrainian`}],model_rates:{character_cost_multiplier:1},concurrency_group:`standard`},{model_id:`eleven_monolingual_v1`,name:`Eleven English v1`,can_be_finetuned:!1,can_do_text_to_speech:!0,can_do_voice_conversion:!1,can_use_style:!1,can_use_speaker_boost:!1,serves_pro_voices:!1,token_cost_factor:1,description:`Our first ever text to speech model. Now outclassed by Multilingual v2 (for content creation) and Turbo v2.5 (for low latency use cases).`,requires_alpha_access:!1,max_characters_request_free_user:1e4,max_characters_request_subscribed_user:1e4,maximum_text_length_per_request:1e4,languages:[{language_id:`en`,name:`English`}],model_rates:{character_cost_multiplier:1},concurrency_group:`standard`}],X=i(`providers`,()=>{let e=u(`settings/credentials/providers`,{}),{t}=l();async function i(e){try{let t=await fetch(`https://openrouter.ai/api/v1/models`,{headers:{Authorization:`Bearer ${e.apiKey.trim()}`,"Content-Type":`application/json`}});if(!t.ok)throw Error(`Failed to fetch OpenRouter models: ${t.statusText}`);let n=await t.json();return n.data.map(e=>({id:e.id,name:e.name||e.id,provider:`openrouter-ai`,description:e.description||``,contextLength:e.context_length,deprecated:!1}))}catch(e){throw console.error(`Error fetching OpenRouter models:`,e),e}}let a={"openrouter-ai":{id:`openrouter-ai`,category:`chat`,tasks:[`text-generation`],nameKey:`settings.pages.providers.provider.openrouter.title`,name:`OpenRouter`,descriptionKey:`settings.pages.providers.provider.openrouter.description`,description:`openrouter.ai`,icon:`i-lobe-icons:openrouter`,defaultOptions:()=>({baseUrl:`https://openrouter.ai/api/v1/`}),createProvider:e=>Me(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>i(e)},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},"app-local-audio-speech":{id:`app-local-audio-speech`,category:`speech`,tasks:[`text-to-speech`,`tts`],isAvailableBy:async()=>`window`in globalThis&&globalThis.window!=null&&`__TAURI__`in globalThis.window&&globalThis.window.__TAURI__!=null,nameKey:`settings.pages.providers.provider.app-local-audio-speech.title`,name:`App (Local)`,descriptionKey:`settings.pages.providers.provider.app-local-audio-speech.description`,description:`https://github.com/huggingface/candle`,icon:`i-lobe-icons:huggingface`,defaultOptions:()=>({}),createProvider:e=>W(e.baseUrl.trim()),capabilities:{listModels:async e=>(await A({...W(e.baseUrl.trim()).model()})).map(e=>({id:e.id,name:e.id,provider:`app-local-candle`,description:``,contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:e=>e.baseUrl?fetch(`${e.baseUrl.trim()}models`).then(e=>e.ok).catch(()=>!1):!1}},"app-local-audio-transcription":{id:`app-local-audio-transcription`,category:`transcription`,tasks:[`speech-to-text`,`automatic-speech-recognition`,`asr`,`stt`],isAvailableBy:async()=>`window`in globalThis&&globalThis.window!=null&&`__TAURI__`in globalThis.window&&globalThis.window.__TAURI__!=null,nameKey:`settings.pages.providers.provider.app-local-audio-transcription.title`,name:`App (Local)`,descriptionKey:`settings.pages.providers.provider.app-local-audio-transcription.description`,description:`https://github.com/huggingface/candle`,icon:`i-lobe-icons:huggingface`,defaultOptions:()=>({}),createProvider:e=>W(e.baseUrl.trim()),capabilities:{listModels:async e=>(await A({...W(e.baseUrl.trim()).model()})).map(e=>({id:e.id,name:e.id,provider:`app-local-candle`,description:``,contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:e=>e.baseUrl?fetch(`${e.baseUrl.trim()}models`).then(e=>e.ok).catch(()=>!1):!1}},"browser-local-audio-speech":{id:`browser-local-audio-speech`,category:`speech`,tasks:[`text-to-speech`,`tts`],isAvailableBy:async()=>{let e=await ne();if(e)return!0;if(`navigator`in globalThis&&globalThis.navigator!=null&&`deviceMemory`in globalThis.navigator&&typeof globalThis.navigator.deviceMemory==`number`){let e=globalThis.navigator.deviceMemory;if(e>=8)return!0}return!1},nameKey:`settings.pages.providers.provider.browser-local-audio-speech.title`,name:`Browser (Local)`,descriptionKey:`settings.pages.providers.provider.browser-local-audio-speech.description`,description:`https://github.com/moeru-ai/xsai-transformers`,icon:`i-lobe-icons:huggingface`,defaultOptions:()=>({}),createProvider:e=>W(e.baseUrl.trim()),capabilities:{listModels:async e=>(await A({...W(e.baseUrl.trim()).model()})).map(e=>({id:e.id,name:e.id,provider:`browser-local-transformers`,description:``,contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:e=>e.baseUrl?fetch(`${e.baseUrl.trim()}models`).then(e=>e.ok).catch(()=>!1):!1}},"browser-local-audio-transcription":{id:`browser-local-audio-transcription`,category:`transcription`,tasks:[`speech-to-text`,`automatic-speech-recognition`,`asr`,`stt`],isAvailableBy:async()=>{let e=await ne();if(e)return!0;if(`navigator`in globalThis&&globalThis.navigator!=null&&`deviceMemory`in globalThis.navigator&&typeof globalThis.navigator.deviceMemory==`number`){let e=globalThis.navigator.deviceMemory;if(e>=8)return!0}return!1},nameKey:`settings.pages.providers.provider.browser-local-audio-transcription.title`,name:`Browser (Local)`,descriptionKey:`settings.pages.providers.provider.browser-local-audio-transcription.description`,description:`https://github.com/moeru-ai/xsai-transformers`,icon:`i-lobe-icons:huggingface`,defaultOptions:()=>({}),createProvider:e=>W(e.baseUrl.trim()),capabilities:{listModels:async e=>(await A({...W(e.baseUrl.trim()).model()})).map(e=>({id:e.id,name:e.id,provider:`browser-local-transformers`,description:``,contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:e=>e.baseUrl?fetch(`${e.baseUrl.trim()}models`).then(e=>e.ok).catch(()=>!1):!1}},ollama:{id:`ollama`,category:`chat`,tasks:[`text-generation`],nameKey:`settings.pages.providers.provider.ollama.title`,name:`Ollama`,descriptionKey:`settings.pages.providers.provider.ollama.description`,description:`ollama.com`,icon:`i-lobe-icons:ollama`,defaultOptions:()=>({baseUrl:`http://localhost:11434/v1/`}),createProvider:e=>G(e.baseUrl.trim()),capabilities:{listModels:async e=>(await A({...G(e.baseUrl.trim()).model()})).map(e=>({id:e.id,name:e.id,provider:`ollama`,description:``,contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:e=>e.baseUrl?fetch(`${e.baseUrl.trim()}models`).then(e=>e.ok).catch(()=>!1):!1}},"ollama-embedding":{id:`ollama-embedding`,category:`embed`,tasks:[`text-feature-extraction`],nameKey:`settings.pages.providers.provider.ollama.title`,name:`Ollama`,descriptionKey:`settings.pages.providers.provider.ollama.description`,description:`ollama.com`,icon:`i-lobe-icons:ollama`,defaultOptions:()=>({baseUrl:`http://localhost:11434/v1/`}),createProvider:e=>G(e.baseUrl.trim()),capabilities:{listModels:async e=>(await A({...G(e.baseUrl.trim()).model()})).map(e=>({id:e.id,name:e.id,provider:`ollama`,description:``,contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:e=>!!e.baseUrl}},vllm:{id:`vllm`,category:`chat`,tasks:[`text-generation`],nameKey:`settings.pages.providers.provider.vllm.title`,name:`vLLM`,descriptionKey:`settings.pages.providers.provider.vllm.description`,description:`vllm.ai`,iconColor:`i-lobe-icons:vllm`,createProvider:e=>G(e.baseUrl.trim()),capabilities:{listModels:async()=>[{id:`llama-2-7b`,name:`Llama 2 (7B)`,provider:`vllm`,description:`Meta's Llama 2 7B parameter model`,contextLength:4096},{id:`llama-2-13b`,name:`Llama 2 (13B)`,provider:`vllm`,description:`Meta's Llama 2 13B parameter model`,contextLength:4096},{id:`llama-2-70b`,name:`Llama 2 (70B)`,provider:`vllm`,description:`Meta's Llama 2 70B parameter model`,contextLength:4096},{id:`mistral-7b`,name:`Mistral (7B)`,provider:`vllm`,description:`Mistral AI's 7B parameter model`,contextLength:8192},{id:`mixtral-8x7b`,name:`Mixtral (8x7B)`,provider:`vllm`,description:`Mistral AI's Mixtral 8x7B MoE model`,contextLength:32768},{id:`custom`,name:`Custom Model`,provider:`vllm`,description:`Specify a custom model name`,contextLength:0}]},validators:{validateProviderConfig:e=>!!e.baseUrl}},openai:{id:`openai`,category:`chat`,tasks:[`text-generation`],nameKey:`settings.pages.providers.provider.openai.title`,name:`OpenAI`,descriptionKey:`settings.pages.providers.provider.openai.description`,description:`openai.com`,icon:`i-lobe-icons:openai`,defaultOptions:()=>({baseUrl:`https://api.openai.com/v1/`}),createProvider:e=>W(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await A({...W(e.apiKey.trim(),e.baseUrl.trim()).model()})).map(e=>({id:e.id,name:e.id,provider:`openai`,description:``,contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},"openai-audio-speech":{id:`openai-audio-speech`,category:`speech`,tasks:[`text-to-speech`],nameKey:`settings.pages.providers.provider.openai.title`,name:`OpenAI`,descriptionKey:`settings.pages.providers.provider.openai.description`,description:`openai.com`,icon:`i-lobe-icons:openai`,defaultOptions:()=>({baseUrl:`https://api.openai.com/v1/`}),createProvider:e=>W(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await A({...W(e.apiKey.trim(),e.baseUrl.trim()).model()})).map(e=>({id:e.id,name:e.id,provider:`openai`,description:``,contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},"openai-audio-transcription":{id:`openai-audio-transcription`,category:`transcription`,tasks:[`speech-to-text`,`automatic-speech-recognition`,`asr`,`stt`],nameKey:`settings.pages.providers.provider.openai.title`,name:`OpenAI`,descriptionKey:`settings.pages.providers.provider.openai.description`,description:`openai.com`,icon:`i-lobe-icons:openai`,defaultOptions:()=>({baseUrl:`https://api.openai.com/v1/`}),createProvider:e=>W(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await A({...W(e.apiKey.trim(),e.baseUrl.trim()).model()})).map(e=>({id:e.id,name:e.id,provider:`openai`,description:``,contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},anthropic:{id:`anthropic`,category:`chat`,tasks:[`text-generation`],nameKey:`settings.pages.providers.provider.anthropic.title`,name:`Anthropic`,descriptionKey:`settings.pages.providers.provider.anthropic.description`,description:`anthropic.com`,icon:`i-lobe-icons:anthropic`,defaultOptions:()=>({baseUrl:`https://api.anthropic.com/v1/`}),createProvider:e=>Te(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async()=>[{id:`claude-3-7-sonnet-20250219`,name:`Claude 3.7 Sonnet`,provider:`anthropic`,description:``,contextLength:0,deprecated:!1},{id:`claude-3-5-sonnet-20241022`,name:`Claude 3.5 Sonnet (New)`,provider:`anthropic`,description:``,contextLength:0,deprecated:!1},{id:`claude-3-5-haiku-20241022`,name:`Claude 3.5 Haiku`,provider:`anthropic`,description:``,contextLength:0,deprecated:!1},{id:`claude-3-5-sonnet-20240620`,name:`Claude 3.5 Sonnet (Old)`,provider:`anthropic`,description:``,contextLength:0,deprecated:!1},{id:`claude-3-haiku-20240307`,name:`Claude 3 Haiku`,provider:`anthropic`,description:``,contextLength:0,deprecated:!1},{id:`claude-3-opus-20240229`,name:`Claude 3 Opus`,provider:`anthropic`,description:``,contextLength:0,deprecated:!1}]},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},"google-generative-ai":{id:`google-generative-ai`,category:`chat`,tasks:[`text-generation`],nameKey:`settings.pages.providers.provider.google-generative-ai.title`,name:`Google Gemini`,descriptionKey:`settings.pages.providers.provider.google-generative-ai.description`,description:`ai.google.dev`,icon:`i-lobe-icons:gemini`,defaultOptions:()=>({baseUrl:`https://generativelanguage.googleapis.com/v1beta/openai/`}),createProvider:e=>Oe(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await A({...Oe(e.apiKey.trim(),e.baseUrl.trim()).model()})).map(e=>({id:e.id,name:e.id,provider:`google-generative-ai`,description:``,contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},xai:{id:`xai`,category:`chat`,tasks:[`text-generation`],nameKey:`settings.pages.providers.provider.xai.title`,name:`xAI`,descriptionKey:`settings.pages.providers.provider.xai.description`,description:`x.ai`,icon:`i-lobe-icons:xai`,createProvider:e=>Ie(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await A({...Ie(e.apiKey.trim(),e.baseUrl.trim()).model()})).map(e=>({id:e.id,name:e.id,provider:`xai`,description:``,contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},deepseek:{id:`deepseek`,category:`chat`,tasks:[`text-generation`],nameKey:`settings.pages.providers.provider.deepseek.title`,name:`DeepSeek`,descriptionKey:`settings.pages.providers.provider.deepseek.description`,description:`deepseek.com`,iconColor:`i-lobe-icons:deepseek`,createProvider:e=>Ee(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await A({...Ee(e.apiKey.trim(),e.baseUrl.trim()).model()})).map(e=>({id:e.id,name:e.id,provider:`deepseek`,description:``,contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},elevenlabs:{id:`elevenlabs`,category:`speech`,tasks:[`text-to-speech`],nameKey:`settings.pages.providers.provider.elevenlabs.title`,name:`ElevenLabs`,descriptionKey:`settings.pages.providers.provider.elevenlabs.description`,description:`elevenlabs.io`,icon:`i-simple-icons:elevenlabs`,defaultOptions:()=>({baseUrl:`https://unspeech.hyp3r.link/v1/`,voiceSettings:{similarityBoost:.75,stability:.5}}),createProvider:e=>Ge(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async()=>Ye.map(e=>({id:e.model_id,name:e.name,provider:`elevenlabs`,description:e.description,contextLength:0,deprecated:!1})),listVoices:async e=>{let t=Ge(e.apiKey.trim(),e.baseUrl.trim()),n=await Y({...t.voice()}),r=n.findIndex(e=>e.name.includes(`Aria`)),i=n.findIndex(e=>e.name.includes(`Bill`)),a=r===-1?0:r,o=i===-1?n.length-1:i,s=Math.min(a,o),c=Math.max(a,o),l=[...n.slice(0,s),...n.slice(c+1),...n.slice(s,c+1)];return l.map(e=>({id:e.id,name:e.name,provider:`elevenlabs`,previewURL:e.preview_audio_url,languages:e.languages}))}},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},"microsoft-speech":{id:`microsoft-speech`,category:`speech`,tasks:[`text-to-speech`],nameKey:`settings.pages.providers.provider.microsoft-speech.title`,name:`Microsoft / Azure Speech`,descriptionKey:`settings.pages.providers.provider.microsoft-speech.description`,description:`speech.microsoft.com`,iconColor:`i-lobe-icons:microsoft`,defaultOptions:()=>({baseUrl:`https://unspeech.hyp3r.link/v1/`}),createProvider:e=>Ke(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async()=>[{id:`v1`,name:`v1`,provider:`microsoft-speech`,description:``,contextLength:0,deprecated:!1}],listVoices:async e=>{let t=Ke(e.apiKey.trim(),e.baseUrl.trim()),n=await Y({...t.voice({region:e.region})});return n.map(e=>{var t;return{id:e.id,name:e.name,provider:`microsoft-speech`,previewURL:e.preview_audio_url,languages:e.languages,gender:(t=e.labels)?.gender}})}},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},"alibaba-cloud-model-studio":{id:`alibaba-cloud-model-studio`,category:`speech`,tasks:[`text-to-speech`],nameKey:`settings.pages.providers.provider.alibaba-cloud-model-studio.title`,name:`Alibaba Cloud Model Studio`,descriptionKey:`settings.pages.providers.provider.alibaba-cloud-model-studio.description`,description:`bailian.console.aliyun.com`,iconColor:`i-lobe-icons:alibabacloud`,defaultOptions:()=>({baseUrl:`https://unspeech.hyp3r.link/v1/`}),createProvider:e=>Je(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listVoices:async e=>{let t=Je(e.apiKey.trim(),e.baseUrl.trim()),n=await Y({...t.voice()});return n.map(e=>{var t;return{id:e.id,name:e.name,provider:`alibaba-cloud-model-studio`,previewURL:e.preview_audio_url,languages:e.languages,gender:(t=e.labels)?.gender}})},listModels:async()=>[{id:`cozyvoice-v1`,name:`CozyVoice`,provider:`alibaba-cloud-model-studio`,description:``,contextLength:0,deprecated:!1},{id:`cozyvoice-v2`,name:`CozyVoice (New)`,provider:`alibaba-cloud-model-studio`,description:``,contextLength:0,deprecated:!1}]},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},volcengine:{id:`volcengine`,category:`speech`,tasks:[`text-to-speech`],nameKey:`settings.pages.providers.provider.volcengine.title`,name:`settings.pages.providers.provider.volcengine.title`,descriptionKey:`settings.pages.providers.provider.volcengine.description`,description:`volcengine.com`,iconColor:`i-lobe-icons:volcengine`,defaultOptions:()=>({baseUrl:`https://unspeech.hyp3r.link/v1/`}),createProvider:e=>qe(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listVoices:async e=>{let t=qe(e.apiKey.trim(),e.baseUrl.trim()),n=await Y({...t.voice()});return n.map(e=>{var t;return{id:e.id,name:e.name,provider:`volcano-engine`,previewURL:e.preview_audio_url,languages:e.languages,gender:(t=e.labels)?.gender}})},listModels:async()=>[{id:`v1`,name:`v1`,provider:`volcano-engine`,description:``,contextLength:0,deprecated:!1}]},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl&&!!e.app&&!!e.app.appId}},"together-ai":{id:`together-ai`,category:`chat`,tasks:[`text-generation`],nameKey:`settings.pages.providers.provider.together.title`,name:`Together.ai`,descriptionKey:`settings.pages.providers.provider.together.description`,description:`together.ai`,iconColor:`i-lobe-icons:together`,createProvider:e=>Pe(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await A({...Pe(e.apiKey.trim(),e.baseUrl.trim()).model()})).map(e=>({id:e.id,name:e.id,provider:`together-ai`,description:``,contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},"novita-ai":{id:`novita-ai`,category:`chat`,tasks:[`text-generation`],nameKey:`settings.pages.providers.provider.novita.title`,name:`Novita`,descriptionKey:`settings.pages.providers.provider.novita.description`,description:`novita.ai`,iconColor:`i-lobe-icons:novita`,createProvider:e=>je(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await A({...je(e.apiKey.trim(),e.baseUrl.trim()).model()})).map(e=>({id:e.id,name:e.id,provider:`novita-ai`,description:``,contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},"fireworks-ai":{id:`fireworks-ai`,category:`chat`,tasks:[`text-generation`],nameKey:`settings.pages.providers.provider.fireworks.title`,name:`Fireworks.ai`,descriptionKey:`settings.pages.providers.provider.fireworks.description`,description:`fireworks.ai`,icon:`i-lobe-icons:fireworks`,createProvider:e=>De(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await A({...De(e.apiKey.trim(),e.baseUrl.trim()).model()})).map(e=>({id:e.id,name:e.id,provider:`fireworks-ai`,description:``,contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},"featherless-ai":{id:`featherless-ai`,category:`chat`,tasks:[`text-generation`],nameKey:`settings.pages.providers.provider.featherless.title`,name:`Featherless.ai`,descriptionKey:`settings.pages.providers.provider.featherless.description`,description:`featherless.ai`,icon:`i-lobe-icons:featherless-ai`,defaultOptions:()=>({baseUrl:`https://api.featherless.ai/v1/`}),createProvider:e=>W(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await A({...W(e.apiKey.trim(),e.baseUrl.trim()).model()})).map(e=>({id:e.id,name:e.id,provider:`featherless-ai`,description:``,contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},"player2-api":{id:`player2-api`,category:`chat`,tasks:[`text-generation`],nameKey:`settings.pages.providers.provider.player2.title`,name:`Player2 API`,descriptionKey:`settings.pages.providers.provider.player2.description`,description:`player2.game`,defaultOptions:()=>({baseUrl:`http://localhost:4315/v1/`}),createProvider:e=>Re(e.baseUrl.trim()),capabilities:{listModels:async()=>[{id:`player2-model`,name:`Player2 Model`,provider:`player2-api`}]},validators:{validateProviderConfig:e=>e.baseUrl?fetch(`${e.baseUrl.trim()}health`).then(e=>e.ok).catch(()=>!1):!1}},"cloudflare-workers-ai":{id:`cloudflare-workers-ai`,category:`chat`,tasks:[`text-generation`],nameKey:`settings.pages.providers.provider.cloudflare-workers-ai.title`,name:`Cloudflare Workers AI`,descriptionKey:`settings.pages.providers.provider.cloudflare-workers-ai.description`,description:`cloudflare.com`,iconColor:`i-lobe-icons:cloudflare`,createProvider:e=>Fe(e.apiKey.trim(),e.accountId),capabilities:{listModels:async()=>[]},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.accountId}},"perplexity-ai":{id:`perplexity-ai`,category:`chat`,tasks:[`text-generation`],nameKey:`settings.pages.providers.provider.perplexity.title`,name:`Perplexity`,descriptionKey:`settings.pages.providers.provider.perplexity.description`,description:`perplexity.ai`,icon:`i-lobe-icons:perplexity`,defaultOptions:()=>({baseUrl:`https://api.perplexity.ai`}),createProvider:e=>Ne(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async()=>[{id:`sonar-small-online`,name:`Sonar Small (Online)`,provider:`perplexity-ai`,description:`Efficient model with online search capabilities`,contextLength:12e3},{id:`sonar-medium-online`,name:`Sonar Medium (Online)`,provider:`perplexity-ai`,description:`Balanced model with online search capabilities`,contextLength:12e3},{id:`sonar-large-online`,name:`Sonar Large (Online)`,provider:`perplexity-ai`,description:`Powerful model with online search capabilities`,contextLength:12e3},{id:`codey-small`,name:`Codey Small`,provider:`perplexity-ai`,description:`Specialized for code generation and understanding`,contextLength:12e3},{id:`codey-large`,name:`Codey Large`,provider:`perplexity-ai`,description:`Advanced code generation and understanding`,contextLength:12e3}]},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},"mistral-ai":{id:`mistral-ai`,category:`chat`,tasks:[`text-generation`],nameKey:`settings.pages.providers.provider.mistral.title`,name:`Mistral`,descriptionKey:`settings.pages.providers.provider.mistral.description`,description:`mistral.ai`,iconColor:`i-lobe-icons:mistral`,createProvider:e=>ke(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await A({...ke(e.apiKey.trim(),e.baseUrl.trim()).model()})).map(e=>({id:e.id,name:e.id,provider:`mistral-ai`,description:``,contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},"moonshot-ai":{id:`moonshot-ai`,category:`chat`,tasks:[`text-generation`],nameKey:`settings.pages.providers.provider.moonshot.title`,name:`Moonshot AI`,descriptionKey:`settings.pages.providers.provider.moonshot.description`,description:`moonshot.ai`,icon:`i-lobe-icons:moonshot`,createProvider:e=>Ae(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await A({...Ae(e.apiKey.trim(),e.baseUrl.trim()).model()})).map(e=>({id:e.id,name:e.id,provider:`moonshot-ai`,description:``,contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}}};async function s(t){let n=e.value[t];if(!n)return!1;let r=a[t];return r?await r.validators.validateProviderConfig(n):!1}let c=o({});function f(t){if(!e.value[t]){var n;let r=a[t],i=(n=r.defaultOptions)?.call(r)||{};e.value[t]={baseUrl:i.baseUrl||``}}}Object.keys(a).forEach(f);async function p(){await Promise.all(Object.keys(a).map(async e=>{c.value[e]=await s(e)}))}p(),d(e,p,{deep:!0});let m=n(()=>Object.keys(a).filter(e=>c.value[e])),h=o({}),g=o({}),_=o({});async function v(t){let n=e.value[t];if(!n)return[];let r=a[t];if(!r)return[];g.value[t]=!0,_.value[t]=null;try{let e=r.capabilities.listModels?await r.capabilities.listModels(n):[];return h.value[t]=e.map(e=>({id:e.id,name:e.name,description:e.description,contextLength:e.contextLength,deprecated:e.deprecated,provider:t})),h.value[t]}catch(e){return console.error(`Error fetching models for ${t}:`,e),_.value[t]=e instanceof Error?e.message:`Unknown error`,[]}finally{g.value[t]=!1}}function y(e){return h.value[e]||[]}let b=n(()=>{let e=[];for(let t of m.value)e.push(...h.value[t]||[]);return e});async function x(){for(let e of m.value)a[e].capabilities.listModels&&await v(e)}function S(e){let n=a[e];if(!n)throw Error(`Provider metadata for ${e} not found`);return{...n,localizedName:t(n.nameKey,n.name),localizedDescription:t(n.descriptionKey,n.description)}}let C=n(()=>Object.values(a).map(e=>({...e,localizedName:t(e.nameKey,e.name),localizedDescription:t(e.descriptionKey,e.description),configured:c.value[e.id]||!1})));function w(t){let n=e.value[t];if(!n)throw Error(`Provider credentials for ${t} not found`);let r=a[t];if(!r)throw Error(`Provider metadata for ${t} not found`);try{return r.createProvider(n)}catch(e){throw console.error(`Error creating provider instance for ${t}:`,e),e}}let T=r(async()=>{let e=[];for(let t of C.value){let n=S(t.id),r=n.isAvailableBy||(()=>!0),i=await r();i&&e.push(t)}return e},[]),E=n(()=>T.value.filter(e=>e.category===`chat`)),D=n(()=>T.value.filter(e=>e.category===`speech`)),O=n(()=>T.value.filter(e=>e.category===`transcription`)),k=n(()=>E.value.filter(e=>c.value[e.id])),ee=n(()=>D.value.filter(e=>c.value[e.id])),te=n(()=>O.value.filter(e=>c.value[e.id]));function re(t){return e.value[t]}return{providers:e,getProviderConfig:re,availableProviders:m,configuredProviders:c,providerMetadata:a,getProviderMetadata:S,allProvidersMetadata:C,initializeProvider:f,validateProvider:s,availableModels:h,isLoadingModels:g,modelLoadError:_,fetchModelsForProvider:v,getModelsForProvider:y,allAvailableModels:b,loadModelsForConfiguredProviders:x,getProviderInstance:w,availableProvidersMetadata:T,allChatProvidersMetadata:E,allAudioSpeechProvidersMetadata:D,allAudioTranscriptionProvidersMetadata:O,configuredChatProvidersMetadata:k,configuredSpeechProvidersMetadata:ee,configuredTranscriptionProvidersMetadata:te}}),Xe=i(`consciousness`,()=>{let e=X(),t=u(`settings/consciousness/active-provider`,``),r=u(`settings/consciousness/active-model`,``),i=u(`settings/consciousness/active-custom-model`,``),a=o({}),s=o(``),c=n(()=>{var n;return(n=e.getProviderMetadata(t.value))?.capabilities.listModels!==void 0}),l=n(()=>e.getModelsForProvider(t.value)),f=n(()=>e.isLoadingModels[t.value]||!1),p=n(()=>e.modelLoadError[t.value]||null),m=n(()=>{if(!s.value.trim())return l.value;let e=s.value.toLowerCase().trim();return l.value.filter(t=>t.name.toLowerCase().includes(e)||t.id.toLowerCase().includes(e)||t.description&&t.description.toLowerCase().includes(e))});function h(){r.value=``,i.value=``,a.value={},s.value=``}async function g(n){var r;n&&(r=e.getProviderMetadata(t.value))?.capabilities.listModels!==void 0&&e.getModelsForProvider(n).length===0&&await e.fetchModelsForProvider(n)}let _;return d(t,async e=>{await g(e),h(),e===`player2-api`?_=setInterval(()=>{console.log(`Sending Player2 Health check if it is being used`),fetch(`http://localhost:4315/v1/health`).catch(()=>{})},6e4):(_&&clearInterval(_),_=void 0)}),{activeProvider:t,activeModel:r,customModelName:i,expandedDescriptions:a,modelSearchQuery:s,supportsModelListing:c,providerModels:l,isLoadingActiveProviderModels:f,activeProviderModelError:p,filteredModels:m,resetModelSelection:h,loadModelsForProvider:g}}),Ze=async e=>(e.fetch??globalThis.fetch)(O(`audio/speech`,e.baseURL),{body:E(e),headers:D({"Content-Type":`application/json`,...e.headers},e.apiKey),method:`POST`,signal:e.abortSignal}).then(k).then(async e=>e.arrayBuffer()),Qe=/[\u0000-\u0008\u000B\u000C\u000E-\u001F]/g;function Z(e,t,n){let r=$e(e);return n?r.replace(n,i):i(r);function i(e){return x(e,{subset:t})}}function $e(e){return String(e||``).replace(Qe,``)}const et=/]]>/g,tt=[`>`];function nt(e){return``}function rt(e){return``}const it=[` `,` `,` `,`"`,`&`,`'`,`/`,`<`,`=`,`>`];function Q(e){return Z(e,it)}function $(e,t){let n=String(e),r=t.options.quote||`"`;if(t.options.quoteSmart){let e=r===`"`?`'`:`"`;b(n,r)>b(n,e)&&(r=e)}return r+Z(n,[`<`,`&`,r])+r}function at(e,t){let n=Q(e.name),r=e.public,i=e.system,a=``}const ot={}.hasOwnProperty;function st(e,t){let n=Q(e.name),r=_t(e,t),i=e.attributes||{},a=r?!1:t.options.closeEmptyElements,o=[],s;for(s in i)if(ot.call(i,s)){let e=i[s];e!=null&&o.push(Q(s)+`=`+$(e,t))}return`<`+n+(o.length===0?``:` `+o.join(` `))+(a?(t.options.tightClose?``:` `)+`/`:``)+`>`+r+(a?``:``)}const ct=/\?>/g,lt=[`>`];function ut(e){let t=Q(e.name)||`x`,n=Z(e.value,lt,ct);return``}const dt=[`&`,`<`];function ft(e){return Z(e.value,dt)}function pt(e,t){return t.options.allowDangerousXml?e.value:ft(e)}const mt={}.hasOwnProperty,ht={cdata:nt,comment:rt,doctype:at,element:st,instruction:ut,raw:pt,root:_t,text:ft};function gt(e,t){let n=e&&e.type;if(!n)throw Error("Expected node, not `"+e+"`");if(!mt.call(ht,n))throw Error("Cannot compile unknown node `"+n+"`");let r=ht[n],i=r(e,t);return i}function _t(e,t){let n=e&&e.children||[],r=-1,i=[];for(;++r{let e=X(),t=u(`settings/speech/active-provider`,``),r=u(`settings/speech/active-model`,`eleven_multilingual_v2`),i=u(`settings/speech/voice`,``),s=o(),c=u(`settings/speech/pitch`,0),l=u(`settings/speech/rate`,1),f=u(`settings/speech/ssml-enabled`,!1),p=o(!1),m=o(null),h=o({}),g=u(`settings/speech/language`,`en-US`),_=o(``),v=n(()=>e.availableProviders.filter(e=>T(e)).map(t=>e.getProviderMetadata(t))),y=n(()=>{var n;return(n=e.getProviderMetadata(t.value))?.capabilities.listModels!==void 0}),b=n(()=>e.getModelsForProvider(t.value)),x=n(()=>e.isLoadingModels[t.value]||!1),S=n(()=>e.modelLoadError[t.value]||null),C=n(()=>{if(!_.value.trim())return b.value;let e=_.value.toLowerCase().trim();return b.value.filter(t=>t.name.toLowerCase().includes(e)||t.id.toLowerCase().includes(e)||t.description&&t.description.toLowerCase().includes(e))}),w=n(()=>[`elevenlabs`,`microsoft-speech`,`azure-speech`,`google`,`alibaba-cloud-model-studio`,`volcengine`].includes(t.value));function T(e){return[`elevenlabs`,`microsoft-speech`,`azure-speech`,`google`,`amazon`,`alibaba-cloud-model-studio`,`volcengine`].includes(e)}async function E(t){if(!t||!T(t))return[];p.value=!0,m.value=null;try{var n,r;let i=await(n=(r=e.getProviderMetadata(t).capabilities).listVoices)?.call(r,e.getProviderConfig(t))||[];return h.value[t]=i,i}catch(e){return console.error(`Error fetching voices for ${t}:`,e),m.value=e instanceof Error?e.message:`Unknown error`,[]}finally{p.value=!1}}function D(e){return h.value[e]||[]}d(t,async e=>{e&&await E(e)}),a(()=>{E(t.value).then(()=>{var e;i.value&&(s.value=(e=h.value[t.value])?.find(e=>e.id===i.value))})}),d(i,e=>{var n;e&&(s.value=(n=h.value[t.value])?.find(t=>t.id===e))},{immediate:!0}),d(h,e=>{var n;i.value&&(s.value=(n=e[t.value])?.find(e=>e.id===i.value))},{immediate:!0});async function O(e,t,n,r,i={}){let a=await Ze({...e.speech(t,{...i}),input:n,voice:r});return a}function k(e,t,n){var r;let i=n?.pitch,a=n?.speed,o=n?.volume,s={pitch:i==null?void 0:i>0?`+${i}%`:`-${i}%`,rate:a==null?void 0:a===1?`1`:`${a}`,volume:o==null?void 0:o>0?`+${o}%`:`${o}%`},c=yt(`speak`,{version:`1.0`,xmlns:`http://www.w3.org/2001/10/synthesis`,"xml:lang":(r=t.languages[0])?.code||`en-US`},[yt(`voice`,{name:t.id,gender:t.gender||`neutral`},[Object.entries(s).filter(([e,t])=>t!=null).length>0?yt(`prosody`,{pitch:i==null?void 0:i>0?`+${i}%`:`-${i}%`,rate:a==null?void 0:a===1?`1`:`${a}`,volume:o==null?void 0:o>0?`+${o}%`:`${o}%`},[e]):e])]);return vt(c)}return{activeSpeechProvider:t,activeSpeechModel:r,activeSpeechVoice:s,activeSpeechVoiceId:i,pitch:c,rate:l,ssmlEnabled:f,selectedLanguage:g,isLoadingSpeechProviderVoices:p,speechProviderError:m,availableVoices:h,modelSearchQuery:_,availableSpeechProvidersMetadata:v,supportsSSML:w,supportsModelListing:y,providerModels:b,isLoadingActiveProviderModels:x,activeProviderModelError:S,filteredModels:C,speech:O,loadVoicesForProvider:E,getVoicesForProvider:D,generateSSML:k,isSpeechProvider:T}}),Ct=i(`airi-card`,()=>{let e=u(`airi-cards`,new Map),t=u(`airi-card-active-id`,`default`),r=n(()=>e.value.get(t.value)),i=Xe(),o=St(),{activeModel:c}=s(i),{activeSpeechVoiceId:f,activeSpeechModel:p}=s(o),m=t=>{let n=crypto.randomUUID();return e.value.set(n,v(t)),n},h=t=>{e.value.delete(t)},g=t=>e.value.get(t);function _(e){var t,n,r,i,a,o,s,l,u,d,m;let h=`data`in e?(t=e.data)==null||(t=t.extensions)==null?void 0:t.airi:(n=e.extensions)?.airi,g={consciousness:{model:c.value},speech:{model:p.value,voice_id:f.value}};return h?{modules:{consciousness:{model:((r=h.modules)==null||(r=r.consciousness)==null?void 0:r.model)??g.consciousness.model},speech:{model:((i=h.modules)==null||(i=i.speech)==null?void 0:i.model)??g.speech.model,voice_id:((a=h.modules)==null||(a=a.speech)==null?void 0:a.voice_id)??g.speech.voice_id,pitch:(o=h.modules)==null||(o=o.speech)==null?void 0:o.pitch,rate:(s=h.modules)==null||(s=s.speech)==null?void 0:s.rate,ssml:(l=h.modules)==null||(l=l.speech)==null?void 0:l.ssml,language:(u=h.modules)==null||(u=u.speech)==null?void 0:u.language},vrm:(d=h.modules)?.vrm,live2d:(m=h.modules)?.live2d},agents:h.agents??{}}:{modules:g,agents:{}}}function v(e){if(`data`in e){let t=e;return{name:t.data.name,version:t.data.character_version??`1.0.0`,description:t.data.description??``,creator:t.data.creator??``,notes:t.data.creator_notes??``,notesMultilingual:t.data.creator_notes_multilingual,personality:t.data.personality??``,scenario:t.data.scenario??``,greetings:[t.data.first_mes,...t.data.alternate_greetings??[]],greetingsGroupOnly:t.data.group_only_greetings??[],systemPrompt:t.data.system_prompt??``,postHistoryInstructions:t.data.post_history_instructions??``,messageExample:t.data.mes_example?t.data.mes_example.split(` `).filter(Boolean).map(e=>e.split(` `).map(e=>{if(e.startsWith(`{{char}}:`)||e.startsWith(`{{user}}:`))return e;throw Error(`Invalid message example format: ${e}`)})):[],tags:t.data.tags??[],extensions:{airi:_(t),...t.data.extensions}}}return{...e,extensions:{airi:_(e),...e.extensions}}}return a(()=>{let{t}=l();e.value.set(`default`,v({name:`ReLU`,version:`1.0.0`,description:w(t(`prompt.prefix`),t(`prompt.suffix`)).content}))}),d(r,e=>{var t,n,r;if(!e)return;let i=_(e);i&&(c.value=i==null||(t=i.modules)==null||(t=t.consciousness)==null?void 0:t.model,p.value=i==null||(n=i.modules)==null||(n=n.speech)==null?void 0:n.model,f.value=i==null||(r=i.modules)==null||(r=r.speech)==null?void 0:r.voice_id)}),{cards:e,activeCard:r,activeCardId:t,addCard:m,removeCard:h,getCard:g,currentModels:n(()=>({consciousness:{model:c.value},speech:{model:p.value,voice_id:f.value}})),systemPrompt:n(()=>{let e=r.value;if(!e)return``;let t=[e.systemPrompt,e.description,e.personality].filter(Boolean);return t.join(` diff --git a/assets/sury-DmrZ3_Oj-DkB-CPCY.js b/assets/sury-DmrZ3_Oj-D6jFSom2.js similarity index 54% rename from assets/sury-DmrZ3_Oj-DkB-CPCY.js rename to assets/sury-DmrZ3_Oj-D6jFSom2.js index 8288ee181d283887a1c3bc84b239abbe3fc70724..b294f4df7910328208e098188c7703900ff87e5f 100644 --- a/assets/sury-DmrZ3_Oj-DkB-CPCY.js +++ b/assets/sury-DmrZ3_Oj-D6jFSom2.js @@ -1 +1 @@ -import{__vitePreload as e}from"./index-CuCRViVh.js";import{tryImport as t}from"./index-CISmcbXk-BkTeNOgG.js";const n=async()=>{let{toJSONSchema:n}=await t(e(()=>import(`./__vite-optional-peer-dep_sury_xsschema-CwAhyDn8.js`),[]),`sury`);return e=>n(e)};export{n as getToJsonSchemaFn}; \ No newline at end of file +import{__vitePreload as e}from"./index-CsmT0L1K.js";import{tryImport as t}from"./index-CISmcbXk-C9oju49Y.js";const n=async()=>{let{toJSONSchema:n}=await t(e(()=>import(`./__vite-optional-peer-dep_sury_xsschema-CwAhyDn8.js`),[]),`sury`);return e=>n(e)};export{n as getToJsonSchemaFn}; \ No newline at end of file diff --git a/assets/together-ai-DlBQIgEL.js b/assets/together-ai-aeQrm7lr.js similarity index 82% rename from assets/together-ai-DlBQIgEL.js rename to assets/together-ai-aeQrm7lr.js index 951584dbfa8a0d1951d3a6359416f678f184d857..4c20040af5ceb64427b2a9d1f1364fa2786b91ef 100644 --- a/assets/together-ai-DlBQIgEL.js +++ b/assets/together-ai-aeQrm7lr.js @@ -1 +1 @@ -import{computed as e,createBlock as t,createVNode as n,defineComponent as r,onMounted as i,openBlock as a,storeToRefs as o,unref as s,useI18n as c,useRouter as l,watch as u,withCtx as d}from"./index-CuCRViVh.js";import"./import-url-browser-DNuYZxPr.js";import"./duckdb-mvp-C3i5IjU8.js";import"./index-CISmcbXk-BkTeNOgG.js";import"./types-AwjH7X1C.js";import{useProvidersStore as f}from"./stores-m0eA85gd.js";import"./__vite-browser-external-CCfYMxZl.js";import"./Button-DFhzbYVt.js";import"./src-C2QbIOor.js";import{ProviderAdvancedSettings_default as p,ProviderApiKeyInput_default as m,ProviderBaseUrlInput_default as h,ProviderBasicSettings_default as g,ProviderSettingsContainer_default as _,ProviderSettingsLayout_default as v}from"./components-BFLl4u81.js";import"./composables-Cgvkd8lL.js";import"./sleep-CvjNLutj.js";import"./queue-DAKPJQl1.js";import"./queues-Dstwm1VQ.js";import"./dist-Cr2QBfS4.js";import"./webgpu-Nt9hTBpW.js";import{route_block_default as y}from"./route-block-DNPbw0zT.js";const b=`together-ai`;var x=r({__name:`together-ai`,setup(r){let{t:y}=c(),x=l(),S=f(),{providers:C}=o(S),w=e(()=>S.getProviderMetadata(b)),T=e({get:()=>{var e;return(e=C.value[b])?.apiKey||``},set:e=>{C.value[b]||(C.value[b]={}),C.value[b].apiKey=e}}),E=e({get:()=>{var e;return(e=C.value[b])?.baseUrl||``},set:e=>{C.value[b]||(C.value[b]={}),C.value[b].baseUrl=e}});i(()=>{var e,t;S.initializeProvider(b),T.value=(e=C.value[b])?.apiKey||``,E.value=(t=C.value[b])?.baseUrl||``}),u([T,E],()=>{C.value[b]={...C.value[b],apiKey:T.value,baseUrl:E.value||``}});function D(){var e;C.value[b]={...(e=w.value)?.defaultOptions}}return(e,r)=>{var i,o;return a(),t(s(v),{"provider-name":(i=w.value)?.localizedName,"provider-icon-color":(o=w.value)?.iconColor,"on-back":()=>s(x).back()},{default:d(()=>[n(s(_),null,{default:d(()=>[n(s(g),{title:s(y)(`settings.pages.providers.common.section.basic.title`),description:s(y)(`settings.pages.providers.common.section.basic.description`),"on-reset":D},{default:d(()=>{var e;return[n(s(m),{modelValue:T.value,"onUpdate:modelValue":r[0]||=e=>T.value=e,"provider-name":(e=w.value)?.localizedName,placeholder:`togetherapi-...`},null,8,[`modelValue`,`provider-name`])]}),_:1},8,[`title`,`description`]),n(s(p),{title:s(y)(`settings.pages.providers.common.section.advanced.title`)},{default:d(()=>[n(s(h),{modelValue:E.value,"onUpdate:modelValue":r[1]||=e=>E.value=e,placeholder:`https://api.together.xyz/v1/`},null,8,[`modelValue`])]),_:1},8,[`title`])]),_:1})]),_:1},8,[`provider-name`,`provider-icon-color`,`on-back`])}}});typeof y==`function`&&y(x);var S=x;export{S as default}; \ No newline at end of file +import{computed as e,createBlock as t,createVNode as n,defineComponent as r,onMounted as i,openBlock as a,storeToRefs as o,unref as s,useI18n as c,useRouter as l,watch as u,withCtx as d}from"./index-CsmT0L1K.js";import"./import-url-browser-DNuYZxPr.js";import"./duckdb-mvp-C3i5IjU8.js";import"./index-CISmcbXk-C9oju49Y.js";import"./types-AwjH7X1C.js";import{useProvidersStore as f}from"./stores-2H61GqXP.js";import"./__vite-browser-external-DPh5tFvT.js";import"./Button-D3cjyOEe.js";import"./src-C1Sr0aqN.js";import{ProviderAdvancedSettings_default as p,ProviderApiKeyInput_default as m,ProviderBaseUrlInput_default as h,ProviderBasicSettings_default as g,ProviderSettingsContainer_default as _,ProviderSettingsLayout_default as v}from"./components-DHUA669a.js";import"./composables-CgcEyUWo.js";import"./sleep-CvjNLutj.js";import"./queue-B0kER5Ap.js";import"./queues-hSEKEE3F.js";import"./dist-Cr2QBfS4.js";import"./webgpu-Nt9hTBpW.js";import{route_block_default as y}from"./route-block-DNPbw0zT.js";const b=`together-ai`;var x=r({__name:`together-ai`,setup(r){let{t:y}=c(),x=l(),S=f(),{providers:C}=o(S),w=e(()=>S.getProviderMetadata(b)),T=e({get:()=>{var e;return(e=C.value[b])?.apiKey||``},set:e=>{C.value[b]||(C.value[b]={}),C.value[b].apiKey=e}}),E=e({get:()=>{var e;return(e=C.value[b])?.baseUrl||``},set:e=>{C.value[b]||(C.value[b]={}),C.value[b].baseUrl=e}});i(()=>{var e,t;S.initializeProvider(b),T.value=(e=C.value[b])?.apiKey||``,E.value=(t=C.value[b])?.baseUrl||``}),u([T,E],()=>{C.value[b]={...C.value[b],apiKey:T.value,baseUrl:E.value||``}});function D(){var e;C.value[b]={...(e=w.value)?.defaultOptions}}return(e,r)=>{var i,o;return a(),t(s(v),{"provider-name":(i=w.value)?.localizedName,"provider-icon-color":(o=w.value)?.iconColor,"on-back":()=>s(x).back()},{default:d(()=>[n(s(_),null,{default:d(()=>[n(s(g),{title:s(y)(`settings.pages.providers.common.section.basic.title`),description:s(y)(`settings.pages.providers.common.section.basic.description`),"on-reset":D},{default:d(()=>{var e;return[n(s(m),{modelValue:T.value,"onUpdate:modelValue":r[0]||=e=>T.value=e,"provider-name":(e=w.value)?.localizedName,placeholder:`togetherapi-...`},null,8,[`modelValue`,`provider-name`])]}),_:1},8,[`title`,`description`]),n(s(p),{title:s(y)(`settings.pages.providers.common.section.advanced.title`)},{default:d(()=>[n(s(h),{modelValue:E.value,"onUpdate:modelValue":r[1]||=e=>E.value=e,placeholder:`https://api.together.xyz/v1/`},null,8,[`modelValue`])]),_:1},8,[`title`])]),_:1})]),_:1},8,[`provider-name`,`provider-icon-color`,`on-back`])}}});typeof y==`function`&&y(x);var S=x;export{S as default}; \ No newline at end of file diff --git a/assets/useIconAnimation-DqaNnagM.js b/assets/useIconAnimation-bkp6MDA-.js similarity index 84% rename from assets/useIconAnimation-DqaNnagM.js rename to assets/useIconAnimation-bkp6MDA-.js index 7a655fcdf426aef7295dfcad369d7a577f1d85d1..02bb557caa69581d13e535430802b583c3597ac2 100644 --- a/assets/useIconAnimation-DqaNnagM.js +++ b/assets/useIconAnimation-bkp6MDA-.js @@ -1 +1 @@ -import{computed as e,onMounted as t,onUnmounted as n,ref as r,useSettings as i}from"./index-CuCRViVh.js";function a(a){let o=r(!1),s=r(!1),c=r(a),l=i(),u=e(()=>s.value&&!l.disableTransitions&&l.usePageSpecificTransitions);return t(()=>{s.value=!0,requestAnimationFrame(()=>{o.value=!0})}),n(()=>{o.value=!1,s.value=!1}),{iconAnimationStarted:o,showIconAnimation:u,animationIcon:c}}export{a as useIconAnimation}; \ No newline at end of file +import{computed as e,onMounted as t,onUnmounted as n,ref as r,useSettings as i}from"./index-CsmT0L1K.js";function a(a){let o=r(!1),s=r(!1),c=r(a),l=i(),u=e(()=>s.value&&!l.disableTransitions&&l.usePageSpecificTransitions);return t(()=>{s.value=!0,requestAnimationFrame(()=>{o.value=!0})}),n(()=>{o.value=!1,s.value=!1}),{iconAnimationStarted:o,showIconAnimation:u,animationIcon:c}}export{a as useIconAnimation}; \ No newline at end of file diff --git a/assets/valibot-CQk-M5rL-D0LQzA6m.js b/assets/valibot-CQk-M5rL-C2bLGA9S.js similarity index 52% rename from assets/valibot-CQk-M5rL-D0LQzA6m.js rename to assets/valibot-CQk-M5rL-C2bLGA9S.js index 58ae6803b4a36ab31fec18d78b5e56de40d02f33..bb0c842dacbdf72f890187cb2b0e4bb55a261c32 100644 --- a/assets/valibot-CQk-M5rL-D0LQzA6m.js +++ b/assets/valibot-CQk-M5rL-C2bLGA9S.js @@ -1 +1 @@ -import{__vitePreload as e}from"./index-CuCRViVh.js";import{tryImport as t}from"./index-CISmcbXk-BkTeNOgG.js";const n=async()=>{let{toJsonSchema:n}=await t(e(()=>import(`./dist-CONIs07P.js`),[]),`@valibot/to-json-schema`);return e=>n(e)};export{n as getToJsonSchemaFn}; \ No newline at end of file +import{__vitePreload as e}from"./index-CsmT0L1K.js";import{tryImport as t}from"./index-CISmcbXk-C9oju49Y.js";const n=async()=>{let{toJsonSchema:n}=await t(e(()=>import(`./dist-CONIs07P.js`),[]),`@valibot/to-json-schema`);return e=>n(e)};export{n as getToJsonSchemaFn}; \ No newline at end of file diff --git a/assets/vibrant-DcBghPZo.js b/assets/vibrant-3lmSC90y.js similarity index 88% rename from assets/vibrant-DcBghPZo.js rename to assets/vibrant-3lmSC90y.js index dde643bab9b73095ccd0f3ed7b1c9c5c0d5748fb..b63e44348673b539ae63b812e0b51c07949822ca 100644 --- a/assets/vibrant-DcBghPZo.js +++ b/assets/vibrant-3lmSC90y.js @@ -1 +1 @@ -import{Fragment as e,createBaseVNode as t,createCommentVNode as n,createElementBlock as r,createVNode as i,defineComponent as a,normalizeStyle as o,openBlock as s,ref as c,renderList as l,toDisplayString as u,unref as d,watch as f}from"./index-CuCRViVh.js";import"./src-C2QbIOor.js";import{InputFile_default as p}from"./InputFile-CffDHtEw.js";import{Vibrant as m}from"./browser-bfchqW24.js";const h={flex:``,"flex-col":``,"gap-4":``},g={border:`2 solid neutral-200 dark:neutral-800`,bg:`neutral-50 dark:neutral-900`,"w-full":``,flex:``,"gap-2":``,"rounded-lg":``,"p-4":``},_={border:`2 solid neutral-200 dark:neutral-800`,bg:`neutral-50 dark:neutral-900`,"w-full":``,flex:``,"gap-2":``,"rounded-lg":``,"p-4":``},v={flex:``,"gap-2":``},y={"h-60":``,border:`2 solid neutral-200 dark:neutral-800`,bg:`neutral-50 dark:neutral-900`,"rounded-lg":``},b=[`src`];var x=a({__name:`vibrant`,setup(a){let x=c([]),S=c(),C=c([]),w=c([]);function T(e){let t=new Image;t.src=URL.createObjectURL(e),t.onload=E,S.value=t}async function E(){if(!S.value)return;let e=new m(S.value),t=await e.getPalette();C.value=Object.values(t).map(e=>e?.hex).filter(e=>typeof e==`string`),w.value=Object.values(t).map(e=>JSON.stringify(e))}return f(x,e=>{T(e[0])},{deep:!0}),(a,c)=>(s(),r(`div`,h,[t(`div`,g,[(s(!0),r(e,null,l(C.value,(e,t)=>(s(),r(`div`,{key:t,style:o({backgroundColor:e}),"size-20":``,"rounded-full":``},null,4))),128))]),t(`div`,_,u(w.value),1),t(`div`,v,[i(d(p),{modelValue:x.value,"onUpdate:modelValue":c[0]||=e=>x.value=e,"h-60":``,"w-full":``},null,8,[`modelValue`])]),t(`div`,y,[S.value?(s(),r(`img`,{key:0,src:S.value.src,"h-full":``,"w-full":``,"object-contain":``},null,8,b)):n(``,!0)])]))}}),S=x;export{S as default}; \ No newline at end of file +import{Fragment as e,createBaseVNode as t,createCommentVNode as n,createElementBlock as r,createVNode as i,defineComponent as a,normalizeStyle as o,openBlock as s,ref as c,renderList as l,toDisplayString as u,unref as d,watch as f}from"./index-CsmT0L1K.js";import"./src-C1Sr0aqN.js";import{InputFile_default as p}from"./InputFile-BW-qIUxk.js";import{Vibrant as m}from"./browser-bfchqW24.js";const h={flex:``,"flex-col":``,"gap-4":``},g={border:`2 solid neutral-200 dark:neutral-800`,bg:`neutral-50 dark:neutral-900`,"w-full":``,flex:``,"gap-2":``,"rounded-lg":``,"p-4":``},_={border:`2 solid neutral-200 dark:neutral-800`,bg:`neutral-50 dark:neutral-900`,"w-full":``,flex:``,"gap-2":``,"rounded-lg":``,"p-4":``},v={flex:``,"gap-2":``},y={"h-60":``,border:`2 solid neutral-200 dark:neutral-800`,bg:`neutral-50 dark:neutral-900`,"rounded-lg":``},b=[`src`];var x=a({__name:`vibrant`,setup(a){let x=c([]),S=c(),C=c([]),w=c([]);function T(e){let t=new Image;t.src=URL.createObjectURL(e),t.onload=E,S.value=t}async function E(){if(!S.value)return;let e=new m(S.value),t=await e.getPalette();C.value=Object.values(t).map(e=>e?.hex).filter(e=>typeof e==`string`),w.value=Object.values(t).map(e=>JSON.stringify(e))}return f(x,e=>{T(e[0])},{deep:!0}),(a,c)=>(s(),r(`div`,h,[t(`div`,g,[(s(!0),r(e,null,l(C.value,(e,t)=>(s(),r(`div`,{key:t,style:o({backgroundColor:e}),"size-20":``,"rounded-full":``},null,4))),128))]),t(`div`,_,u(w.value),1),t(`div`,v,[i(d(p),{modelValue:x.value,"onUpdate:modelValue":c[0]||=e=>x.value=e,"h-60":``,"w-full":``},null,8,[`modelValue`])]),t(`div`,y,[S.value?(s(),r(`img`,{key:0,src:S.value.src,"h-full":``,"w-full":``,"object-contain":``},null,8,b)):n(``,!0)])]))}}),S=x;export{S as default}; \ No newline at end of file diff --git a/assets/volcengine-DmaJ_D4B.js b/assets/volcengine-BXA-wkta.js similarity index 81% rename from assets/volcengine-DmaJ_D4B.js rename to assets/volcengine-BXA-wkta.js index 46faf1ebe132a7a056c875e2fb4f9ba0b2e0f8e0..b4c9d6bc4ff3039a1ae68853844b851e53327b1f 100644 --- a/assets/volcengine-DmaJ_D4B.js +++ b/assets/volcengine-BXA-wkta.js @@ -1 +1 @@ -import{computed as e,createBaseVNode as t,createBlock as n,createVNode as r,defineComponent as i,onMounted as a,openBlock as o,ref as s,storeToRefs as c,unref as l,useI18n as u,watch as d,withCtx as f}from"./index-CuCRViVh.js";import"./import-url-browser-DNuYZxPr.js";import"./duckdb-mvp-C3i5IjU8.js";import"./index-CISmcbXk-BkTeNOgG.js";import"./types-AwjH7X1C.js";import{useProvidersStore as p,useSpeechStore as m}from"./stores-m0eA85gd.js";import"./__vite-browser-external-CCfYMxZl.js";import"./Button-DFhzbYVt.js";import{FieldInput_default as h,FieldRange_default as g}from"./src-C2QbIOor.js";import{SpeechPlayground_default as _,SpeechProviderSettings_default as v}from"./components-BFLl4u81.js";import"./composables-Cgvkd8lL.js";import"./sleep-CvjNLutj.js";import"./queue-DAKPJQl1.js";import"./queues-Dstwm1VQ.js";import"./dist-Cr2QBfS4.js";import"./webgpu-Nt9hTBpW.js";import{route_block_default as y}from"./route-block-DNPbw0zT.js";const b={flex:`~ col gap-4`},x=`volcengine`,S=`v1`;var C=i({__name:`volcengine`,setup(i){let y=s(1),C=m(),w=p(),{providers:T}=c(w),{t:E}=u(),D=e({get:()=>{var e;return((e=T.value[x])==null||(e=e.app)==null?void 0:e.appId)||``},set:e=>{T.value[x]||(T.value[x]={}),T.value[x].app={appId:e}}}),O=e(()=>{var e;return!!(e=T.value[x])?.apiKey}),k=e(()=>C.availableVoices[x]||[]);async function A(e,t,n){let r=w.getProviderInstance(x);if(!r)throw Error(`Failed to initialize speech provider`);let i=w.getProviderConfig(x),a=i.model||S;return await C.speech(r,a,e,t,{...i})}return a(async()=>{let e=w.getProviderConfig(x),t=w.getProviderMetadata(x);await t.validators.validateProviderConfig(e)?await C.loadVoicesForProvider(x):console.error(`Failed to validate provider config`,e)}),d(y,async()=>{let e=w.getProviderConfig(x);e.audio||={},e.audio.speedRatio=y.value}),d([T,D],async()=>{let e=w.getProviderConfig(x),t=w.getProviderMetadata(x);await t.validators.validateProviderConfig(e)?await C.loadVoicesForProvider(x):console.error(`Failed to validate provider config`,e)},{immediate:!0}),(e,i)=>(o(),n(l(v),{"provider-id":x,"default-model":S},{"basic-settings":f(()=>[t(`div`,b,[r(l(h),{modelValue:D.value,"onUpdate:modelValue":i[0]||=e=>D.value=e,label:l(E)(`settings.pages.providers.provider.volcengine.fields.field.appId.label`),description:l(E)(`settings.pages.providers.provider.volcengine.fields.field.appId.description`),required:``},null,8,[`modelValue`,`label`,`description`])])]),"voice-settings":f(()=>[r(l(g),{modelValue:y.value,"onUpdate:modelValue":i[1]||=e=>y.value=e,label:l(E)(`settings.pages.providers.provider.common.fields.field.speed.label`),description:l(E)(`settings.pages.providers.provider.common.fields.field.speed.description`),min:.5,max:2,step:.01},null,8,[`modelValue`,`label`,`description`])]),playground:f(()=>[r(l(_),{"available-voices":k.value,"generate-speech":A,"api-key-configured":O.value,"default-text":`Hello! This is a test of the ElevenLabs voice synthesis.`},null,8,[`available-voices`,`api-key-configured`])]),_:1}))}});typeof y==`function`&&y(C);var w=C;export{w as default}; \ No newline at end of file +import{computed as e,createBaseVNode as t,createBlock as n,createVNode as r,defineComponent as i,onMounted as a,openBlock as o,ref as s,storeToRefs as c,unref as l,useI18n as u,watch as d,withCtx as f}from"./index-CsmT0L1K.js";import"./import-url-browser-DNuYZxPr.js";import"./duckdb-mvp-C3i5IjU8.js";import"./index-CISmcbXk-C9oju49Y.js";import"./types-AwjH7X1C.js";import{useProvidersStore as p,useSpeechStore as m}from"./stores-2H61GqXP.js";import"./__vite-browser-external-DPh5tFvT.js";import"./Button-D3cjyOEe.js";import{FieldInput_default as h,FieldRange_default as g}from"./src-C1Sr0aqN.js";import{SpeechPlayground_default as _,SpeechProviderSettings_default as v}from"./components-DHUA669a.js";import"./composables-CgcEyUWo.js";import"./sleep-CvjNLutj.js";import"./queue-B0kER5Ap.js";import"./queues-hSEKEE3F.js";import"./dist-Cr2QBfS4.js";import"./webgpu-Nt9hTBpW.js";import{route_block_default as y}from"./route-block-DNPbw0zT.js";const b={flex:`~ col gap-4`},x=`volcengine`,S=`v1`;var C=i({__name:`volcengine`,setup(i){let y=s(1),C=m(),w=p(),{providers:T}=c(w),{t:E}=u(),D=e({get:()=>{var e;return((e=T.value[x])==null||(e=e.app)==null?void 0:e.appId)||``},set:e=>{T.value[x]||(T.value[x]={}),T.value[x].app={appId:e}}}),O=e(()=>{var e;return!!(e=T.value[x])?.apiKey}),k=e(()=>C.availableVoices[x]||[]);async function A(e,t,n){let r=w.getProviderInstance(x);if(!r)throw Error(`Failed to initialize speech provider`);let i=w.getProviderConfig(x),a=i.model||S;return await C.speech(r,a,e,t,{...i})}return a(async()=>{let e=w.getProviderConfig(x),t=w.getProviderMetadata(x);await t.validators.validateProviderConfig(e)?await C.loadVoicesForProvider(x):console.error(`Failed to validate provider config`,e)}),d(y,async()=>{let e=w.getProviderConfig(x);e.audio||={},e.audio.speedRatio=y.value}),d([T,D],async()=>{let e=w.getProviderConfig(x),t=w.getProviderMetadata(x);await t.validators.validateProviderConfig(e)?await C.loadVoicesForProvider(x):console.error(`Failed to validate provider config`,e)},{immediate:!0}),(e,i)=>(o(),n(l(v),{"provider-id":x,"default-model":S},{"basic-settings":f(()=>[t(`div`,b,[r(l(h),{modelValue:D.value,"onUpdate:modelValue":i[0]||=e=>D.value=e,label:l(E)(`settings.pages.providers.provider.volcengine.fields.field.appId.label`),description:l(E)(`settings.pages.providers.provider.volcengine.fields.field.appId.description`),required:``},null,8,[`modelValue`,`label`,`description`])])]),"voice-settings":f(()=>[r(l(g),{modelValue:y.value,"onUpdate:modelValue":i[1]||=e=>y.value=e,label:l(E)(`settings.pages.providers.provider.common.fields.field.speed.label`),description:l(E)(`settings.pages.providers.provider.common.fields.field.speed.description`),min:.5,max:2,step:.01},null,8,[`modelValue`,`label`,`description`])]),playground:f(()=>[r(l(_),{"available-voices":k.value,"generate-speech":A,"api-key-configured":O.value,"default-text":`Hello! This is a test of the ElevenLabs voice synthesis.`},null,8,[`available-voices`,`api-key-configured`])]),_:1}))}});typeof y==`function`&&y(C);var w=C;export{w as default}; \ No newline at end of file diff --git a/assets/xai-t3unSriW.js b/assets/xai-C7wiQ4il.js similarity index 82% rename from assets/xai-t3unSriW.js rename to assets/xai-C7wiQ4il.js index 36e3821f9b9a43afb4385246184da892cd8d3677..af931cf06f62eac482a55d9669a4e9e6b9d48cf3 100644 --- a/assets/xai-t3unSriW.js +++ b/assets/xai-C7wiQ4il.js @@ -1 +1 @@ -import{computed as e,createBlock as t,createVNode as n,defineComponent as r,onMounted as i,openBlock as a,storeToRefs as o,unref as s,useI18n as c,useRouter as l,watch as u,withCtx as d}from"./index-CuCRViVh.js";import"./import-url-browser-DNuYZxPr.js";import"./duckdb-mvp-C3i5IjU8.js";import"./index-CISmcbXk-BkTeNOgG.js";import"./types-AwjH7X1C.js";import{useProvidersStore as f}from"./stores-m0eA85gd.js";import"./__vite-browser-external-CCfYMxZl.js";import"./Button-DFhzbYVt.js";import"./src-C2QbIOor.js";import{ProviderAdvancedSettings_default as p,ProviderApiKeyInput_default as m,ProviderBaseUrlInput_default as h,ProviderBasicSettings_default as g,ProviderSettingsContainer_default as _,ProviderSettingsLayout_default as v}from"./components-BFLl4u81.js";import"./composables-Cgvkd8lL.js";import"./sleep-CvjNLutj.js";import"./queue-DAKPJQl1.js";import"./queues-Dstwm1VQ.js";import"./dist-Cr2QBfS4.js";import"./webgpu-Nt9hTBpW.js";import{route_block_default as y}from"./route-block-DNPbw0zT.js";const b=`xai`;var x=r({__name:`xai`,setup(r){let{t:y}=c(),x=l(),S=f(),{providers:C}=o(S),w=e(()=>S.getProviderMetadata(b)),T=e({get:()=>{var e;return(e=C.value[b])?.apiKey||``},set:e=>{C.value[b]||(C.value[b]={}),C.value[b].apiKey=e}}),E=e({get:()=>{var e;return(e=C.value[b])?.baseUrl||``},set:e=>{C.value[b]||(C.value[b]={}),C.value[b].baseUrl=e}});i(()=>{var e,t;S.initializeProvider(b),T.value=(e=C.value[b])?.apiKey||``,E.value=(t=C.value[b])?.baseUrl||``}),u([T,E],()=>{C.value[b]={...C.value[b],apiKey:T.value,baseUrl:E.value||``}});function D(){var e;C.value[b]={...(e=w.value)?.defaultOptions}}return(e,r)=>{var i,o;return a(),t(s(v),{"provider-name":(i=w.value)?.localizedName,"provider-icon":(o=w.value)?.icon,"on-back":()=>s(x).back()},{default:d(()=>[n(s(_),null,{default:d(()=>[n(s(g),{title:s(y)(`settings.pages.providers.common.section.basic.title`),description:s(y)(`settings.pages.providers.common.section.basic.description`),"on-reset":D},{default:d(()=>{var e;return[n(s(m),{modelValue:T.value,"onUpdate:modelValue":r[0]||=e=>T.value=e,"provider-name":(e=w.value)?.localizedName,placeholder:`xai-...`},null,8,[`modelValue`,`provider-name`])]}),_:1},8,[`title`,`description`]),n(s(p),{title:s(y)(`settings.pages.providers.common.section.advanced.title`)},{default:d(()=>[n(s(h),{modelValue:E.value,"onUpdate:modelValue":r[1]||=e=>E.value=e,placeholder:`https://api.x.ai/v1/`},null,8,[`modelValue`])]),_:1},8,[`title`])]),_:1})]),_:1},8,[`provider-name`,`provider-icon`,`on-back`])}}});typeof y==`function`&&y(x);var S=x;export{S as default}; \ No newline at end of file +import{computed as e,createBlock as t,createVNode as n,defineComponent as r,onMounted as i,openBlock as a,storeToRefs as o,unref as s,useI18n as c,useRouter as l,watch as u,withCtx as d}from"./index-CsmT0L1K.js";import"./import-url-browser-DNuYZxPr.js";import"./duckdb-mvp-C3i5IjU8.js";import"./index-CISmcbXk-C9oju49Y.js";import"./types-AwjH7X1C.js";import{useProvidersStore as f}from"./stores-2H61GqXP.js";import"./__vite-browser-external-DPh5tFvT.js";import"./Button-D3cjyOEe.js";import"./src-C1Sr0aqN.js";import{ProviderAdvancedSettings_default as p,ProviderApiKeyInput_default as m,ProviderBaseUrlInput_default as h,ProviderBasicSettings_default as g,ProviderSettingsContainer_default as _,ProviderSettingsLayout_default as v}from"./components-DHUA669a.js";import"./composables-CgcEyUWo.js";import"./sleep-CvjNLutj.js";import"./queue-B0kER5Ap.js";import"./queues-hSEKEE3F.js";import"./dist-Cr2QBfS4.js";import"./webgpu-Nt9hTBpW.js";import{route_block_default as y}from"./route-block-DNPbw0zT.js";const b=`xai`;var x=r({__name:`xai`,setup(r){let{t:y}=c(),x=l(),S=f(),{providers:C}=o(S),w=e(()=>S.getProviderMetadata(b)),T=e({get:()=>{var e;return(e=C.value[b])?.apiKey||``},set:e=>{C.value[b]||(C.value[b]={}),C.value[b].apiKey=e}}),E=e({get:()=>{var e;return(e=C.value[b])?.baseUrl||``},set:e=>{C.value[b]||(C.value[b]={}),C.value[b].baseUrl=e}});i(()=>{var e,t;S.initializeProvider(b),T.value=(e=C.value[b])?.apiKey||``,E.value=(t=C.value[b])?.baseUrl||``}),u([T,E],()=>{C.value[b]={...C.value[b],apiKey:T.value,baseUrl:E.value||``}});function D(){var e;C.value[b]={...(e=w.value)?.defaultOptions}}return(e,r)=>{var i,o;return a(),t(s(v),{"provider-name":(i=w.value)?.localizedName,"provider-icon":(o=w.value)?.icon,"on-back":()=>s(x).back()},{default:d(()=>[n(s(_),null,{default:d(()=>[n(s(g),{title:s(y)(`settings.pages.providers.common.section.basic.title`),description:s(y)(`settings.pages.providers.common.section.basic.description`),"on-reset":D},{default:d(()=>{var e;return[n(s(m),{modelValue:T.value,"onUpdate:modelValue":r[0]||=e=>T.value=e,"provider-name":(e=w.value)?.localizedName,placeholder:`xai-...`},null,8,[`modelValue`,`provider-name`])]}),_:1},8,[`title`,`description`]),n(s(p),{title:s(y)(`settings.pages.providers.common.section.advanced.title`)},{default:d(()=>[n(s(h),{modelValue:E.value,"onUpdate:modelValue":r[1]||=e=>E.value=e,placeholder:`https://api.x.ai/v1/`},null,8,[`modelValue`])]),_:1},8,[`title`])]),_:1})]),_:1},8,[`provider-name`,`provider-icon`,`on-back`])}}});typeof y==`function`&&y(x);var S=x;export{S as default}; \ No newline at end of file diff --git a/assets/zod-Db63SLXj-CQvdtD4C.js b/assets/zod-Db63SLXj-DPwvP49x.js similarity index 85% rename from assets/zod-Db63SLXj-CQvdtD4C.js rename to assets/zod-Db63SLXj-DPwvP49x.js index 247a2d7315166e2531789d492853c93e4cecf543..eb2ae33e3688bbe3a96c4945204e902536539c7d 100644 --- a/assets/zod-Db63SLXj-CQvdtD4C.js +++ b/assets/zod-Db63SLXj-DPwvP49x.js @@ -1,2 +1,2 @@ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/esm-BF-DsdBI.js","assets/types-AwjH7X1C.js"])))=>i.map(i=>d[i]); -import{__vitePreload as e}from"./index-CuCRViVh.js";import{missingDependenciesUrl as t}from"./index-CISmcbXk-BkTeNOgG.js";const n=async()=>{let n=e=>{throw Error(`xsschema: Missing zod v4 dependencies "zod". see ${t}`)},r=e=>{throw Error(`xsschema: Missing zod v3 dependencies "zod-to-json-schema". see ${t}`)};try{let{toJSONSchema:t}=await e(async()=>{let{toJSONSchema:e}=await import(`./core-DLGqGxHa.js`);return{toJSONSchema:e}},[]);n=t}catch(e){e instanceof Error&&console.error(e.message)}try{let{zodToJsonSchema:t}=await e(async()=>{let{zodToJsonSchema:e}=await import(`./esm-BF-DsdBI.js`);return{zodToJsonSchema:e}},__vite__mapDeps([0,1]));r=t}catch(e){e instanceof Error&&console.error(e.message)}return async e=>`_zod`in e?n(e):r(e)};export{n as getToJsonSchemaFn}; \ No newline at end of file +import{__vitePreload as e}from"./index-CsmT0L1K.js";import{missingDependenciesUrl as t}from"./index-CISmcbXk-C9oju49Y.js";const n=async()=>{let n=e=>{throw Error(`xsschema: Missing zod v4 dependencies "zod". see ${t}`)},r=e=>{throw Error(`xsschema: Missing zod v3 dependencies "zod-to-json-schema". see ${t}`)};try{let{toJSONSchema:t}=await e(async()=>{let{toJSONSchema:e}=await import(`./core-DLGqGxHa.js`);return{toJSONSchema:e}},[]);n=t}catch(e){e instanceof Error&&console.error(e.message)}try{let{zodToJsonSchema:t}=await e(async()=>{let{zodToJsonSchema:e}=await import(`./esm-BF-DsdBI.js`);return{zodToJsonSchema:e}},__vite__mapDeps([0,1]));r=t}catch(e){e instanceof Error&&console.error(e.message)}return async e=>`_zod`in e?n(e):r(e)};export{n as getToJsonSchemaFn}; \ No newline at end of file diff --git a/index.html b/index.html index 6a9f81827237fd49004b18a59012bcf341651801..d8eab45301acf44830d8174827f6a8ce3dbe6f84 100644 --- a/index.html +++ b/index.html @@ -24,7 +24,7 @@ src="/remote-assets/page-external-data/js/script.js" > - + diff --git a/sw.js b/sw.js index 6932e28035752c01ece7f4a668d492f9cd59339c..f87cf801e089a018547172b8cddb125897fdc976 100644 --- a/sw.js +++ b/sw.js @@ -1 +1 @@ -if(!self.define){let s,e={};const l=(l,r)=>(l=new URL(l+".js",r).href,e[l]||new Promise(e=>{if("document"in self){const s=document.createElement("script");s.src=l,s.onload=e,document.head.appendChild(s)}else s=l,importScripts(l),e()}).then(()=>{let s=e[l];if(!s)throw new Error(`Module ${l} didn’t register its module`);return s}));self.define=(r,i)=>{const n=s||("document"in self?document.currentScript.src:"")||location.href;if(e[n])return;let u={};const o=s=>l(s,n),a={module:{uri:n},exports:u,require:o};e[n]=Promise.all(r.map(s=>a[s]||o(s))).then(s=>(i(...s),u))}}define(["./workbox-3aa584b4"],function(s){"use strict";self.skipWaiting(),s.clientsClaim(),s.precacheAndRoute([{url:"assets/__vite-browser-external-CCfYMxZl.js",revision:null},{url:"assets/__vite-browser-external-Ct7_N7cf.js",revision:null},{url:"assets/__vite-optional-peer-dep_effect_xsschema-CSjxbBMs.js",revision:null},{url:"assets/__vite-optional-peer-dep_sury_xsschema-CwAhyDn8.js",revision:null},{url:"assets/_...all_-BcmmG1Rc.js",revision:null},{url:"assets/airi-card-NRKIx9cL.js",revision:null},{url:"assets/alibaba-cloud-model-studio-CU-ra2RE.js",revision:null},{url:"assets/AnimatedWave-Cq8X0oi8.js",revision:null},{url:"assets/AnimatedWave-t4o-3aNd.css",revision:null},{url:"assets/anthropic-DO-lpzYI.js",revision:null},{url:"assets/appearance-DYP1DXMi.js",revision:null},{url:"assets/arktype-C-GObzDh-DfSkD_kw.js",revision:null},{url:"assets/audio-uKPykWrz.js",revision:null},{url:"assets/background-remove-B1E0Ol5y.js",revision:null},{url:"assets/Basic-SuYkQxAJ.js",revision:null},{url:"assets/browser-bfchqW24.js",revision:null},{url:"assets/browser-CMSJHaBF.js",revision:null},{url:"assets/Button-D6PjaMaR.css",revision:null},{url:"assets/Button-DFhzbYVt.js",revision:null},{url:"assets/CardCreate-CuBkVnEJ.js",revision:null},{url:"assets/CardCreate-DPyf_Zae.js",revision:null},{url:"assets/CardCreationDialog-Bsxy1Noo.js",revision:null},{url:"assets/CardCreationDialog-DbM2XlD1.js",revision:null},{url:"assets/CardCreationDialog-KJgHxakH.css",revision:null},{url:"assets/CardDetailDialog-BqQSzFGz.js",revision:null},{url:"assets/CardDetailDialog-BzvnHVI0.js",revision:null},{url:"assets/CardListItem-BrwrvTw2.js",revision:null},{url:"assets/CardListItem-DsIvl-nB.js",revision:null},{url:"assets/chat-BCi2y2TP.js",revision:null},{url:"assets/CheckBar-BxEtoWm5.js",revision:null},{url:"assets/cloudflare-workers-ai-Boy6ApbV.js",revision:null},{url:"assets/color-scheme-CIOGKOoo.js",revision:null},{url:"assets/color-scheme-DQ9rzeUD.css",revision:null},{url:"assets/ColorPalette-ZPdCD-E3.js",revision:null},{url:"assets/components-BFLl4u81.js",revision:null},{url:"assets/components-rFKvUtFk.css",revision:null},{url:"assets/composables-Cgvkd8lL.js",revision:null},{url:"assets/consciousness-0dybmXhk.js",revision:null},{url:"assets/core-DLGqGxHa.js",revision:null},{url:"assets/deepseek-DDoXlrh7.js",revision:null},{url:"assets/default-BIvW8Ai3.js",revision:null},{url:"assets/default-browser-DTRWbcB3.js",revision:null},{url:"assets/default-node-C5y-aJTF.js",revision:null},{url:"assets/delays-IClek8Pp.js",revision:null},{url:"assets/DeleteCardDialog-D4-CgGb9.js",revision:null},{url:"assets/DeleteCardDialog-xlTiv14_.js",revision:null},{url:"assets/developer-DSMe0VXa.js",revision:null},{url:"assets/dist-B4cQ-m7C.js",revision:null},{url:"assets/dist-CONIs07P.js",revision:null},{url:"assets/dist-Cr2QBfS4.js",revision:null},{url:"assets/duckdb-browser-coi.pthread.worker-WD1J30pV.js",revision:null},{url:"assets/duckdb-browser-coi.worker-Ji2I_m5s.js",revision:null},{url:"assets/duckdb-browser-eh.worker-B2xnDV1H.js",revision:null},{url:"assets/duckdb-browser-mvp.worker-DCs3_EjR.js",revision:null},{url:"assets/duckdb-coi-CSr8FQO4.wasm",revision:null},{url:"assets/duckdb-eh-BJOC5S4x.wasm",revision:null},{url:"assets/duckdb-mvp-8HYqhb4i.wasm",revision:null},{url:"assets/duckdb-mvp-C3i5IjU8.js",revision:null},{url:"assets/effect-WSjEuzC9-Of5jzyzm.js",revision:null},{url:"assets/elevenlabs-C_CpBUe4.js",revision:null},{url:"assets/emotions-3EJrhf3a.js",revision:null},{url:"assets/esm-BF-DsdBI.js",revision:null},{url:"assets/featherless-ai-BrsLkmWp.js",revision:null},{url:"assets/filter-message-CCFT1WCI.js",revision:null},{url:"assets/fireworks-ai-BzZp6rdf.js",revision:null},{url:"assets/general-DKp4DER8.js",revision:null},{url:"assets/gesture-circle-CDDLlKJK.js",revision:null},{url:"assets/google-generative-ai-BmLcvcU4.js",revision:null},{url:"assets/HeaderLink-BuxOmtb4.js",revision:null},{url:"assets/HeaderLink-DAzsygCR.css",revision:null},{url:"assets/home-B675LO9V.js",revision:null},{url:"assets/IconAnimation-DqqXWuqN.js",revision:null},{url:"assets/image-BhuwcwI9.css",revision:null},{url:"assets/image-BZfCqS0u.js",revision:null},{url:"assets/import-url-browser-CajlDqRn.js",revision:null},{url:"assets/import-url-browser-DNuYZxPr.js",revision:null},{url:"assets/import-url-node-BGiLk3V8.js",revision:null},{url:"assets/index-10xSVpcK.css",revision:null},{url:"assets/index-CISmcbXk-BkTeNOgG.js",revision:null},{url:"assets/index-CuCRViVh.js",revision:null},{url:"assets/InputFile-CffDHtEw.js",revision:null},{url:"assets/js/CubismSdkForWeb-5-r.3/Core/live2dcubismcore.min.js",revision:null},{url:"assets/memory-long-term-w7gJ2GOm.js",revision:null},{url:"assets/memory-SfXrd_LZ.js",revision:null},{url:"assets/memory-short-term-BJNXIYfx.js",revision:null},{url:"assets/messages-Dz0YVnuk.js",revision:null},{url:"assets/microsoft-speech-D1Nm-r-u.js",revision:null},{url:"assets/mistral-ai-Dlp6niUh.js",revision:null},{url:"assets/models-BR8YPV_e.css",revision:null},{url:"assets/models-DXBLIPsA.js",revision:null},{url:"assets/modules-Cg-sfGqM.js",revision:null},{url:"assets/moonshot-ai-4PZIYm23.js",revision:null},{url:"assets/novita-ai-BvZ0Q5n6.js",revision:null},{url:"assets/ollama-BfwgYUF-.js",revision:null},{url:"assets/openai-audio-speech-NATd0MbC.js",revision:null},{url:"assets/openai-audio-transcription-DbLUDJtC.js",revision:null},{url:"assets/openai-DTGR4qBa.js",revision:null},{url:"assets/openrouter-ai-DBLeIZUx.js",revision:null},{url:"assets/ort-wasm-simd-threaded.jsep-B0T3yYHD.wasm",revision:null},{url:"assets/pages-DOuHM4kz.js",revision:null},{url:"assets/plain-BrBYnjv7.js",revision:null},{url:"assets/player2-api-CEExUfJX.js",revision:null},{url:"assets/polaroid-8NPKzMOn.js",revision:null},{url:"assets/providers-DesecQLA.js",revision:null},{url:"assets/queue-BXEthkka.js",revision:null},{url:"assets/queue-DAKPJQl1.js",revision:null},{url:"assets/queues-Dstwm1VQ.js",revision:null},{url:"assets/route-block-DNPbw0zT.js",revision:null},{url:"assets/scene-BUwCrWjQ.js",revision:null},{url:"assets/settings-BMETuw4R.js",revision:null},{url:"assets/settings-Clpt817f.js",revision:null},{url:"assets/sleep-CvjNLutj.js",revision:null},{url:"assets/speech-Dg1E0ZUG.js",revision:null},{url:"assets/src-B8Pazang.css",revision:null},{url:"assets/src-C2QbIOor.js",revision:null},{url:"assets/stage-BAzv3iKX.js",revision:null},{url:"assets/stage-DgnnLIXb.js",revision:null},{url:"assets/stores-m0eA85gd.js",revision:null},{url:"assets/sury-DmrZ3_Oj-DkB-CPCY.js",revision:null},{url:"assets/Textarea-D04Ettdn.js",revision:null},{url:"assets/together-ai-DlBQIgEL.js",revision:null},{url:"assets/types-AwjH7X1C.js",revision:null},{url:"assets/useIconAnimation-DqaNnagM.js",revision:null},{url:"assets/valibot-CQk-M5rL-D0LQzA6m.js",revision:null},{url:"assets/vibrant-DcBghPZo.js",revision:null},{url:"assets/volcengine-DmaJ_D4B.js",revision:null},{url:"assets/webgpu-Nt9hTBpW.js",revision:null},{url:"assets/worker-Bq31kV70.js",revision:null},{url:"assets/xai-t3unSriW.js",revision:null},{url:"assets/zod-Db63SLXj-CQvdtD4C.js",revision:null},{url:"index.html",revision:"efb14dcc322c4f108e0d63dce701ee93"},{url:"registerSW.js",revision:"1872c500de691dce40960bb85481de07"},{url:"apple-touch-icon.png",revision:"b41f3c1ba3c98364c640fe2b7348bd39"},{url:"favicon.svg",revision:"47d50a7bc31b26d14f3895982906935f"},{url:"maskable_icon_x192.png",revision:"a6ed025fb1491e8b498c9f4c0064d190"},{url:"maskable_icon_x512.png",revision:"b7b2c2d9bda88c74a295695c8a0e7468"},{url:"web-app-manifest-192x192.png",revision:"c9731148ea6befa78a495f63536c82eb"},{url:"web-app-manifest-512x512.png",revision:"bcae855d5ff588b682314fe1c6e530f0"},{url:"manifest.webmanifest",revision:"13ac96785e6c03e0cb109d13086bf9b2"}],{}),s.cleanupOutdatedCaches(),s.registerRoute(new s.NavigationRoute(s.createHandlerBoundToURL("index.html"),{denylist:[/^\/docs\//,/^\/ui\//,/^\/remote-assets\//,/^\/api\//]}))}); +if(!self.define){let s,e={};const l=(l,r)=>(l=new URL(l+".js",r).href,e[l]||new Promise(e=>{if("document"in self){const s=document.createElement("script");s.src=l,s.onload=e,document.head.appendChild(s)}else s=l,importScripts(l),e()}).then(()=>{let s=e[l];if(!s)throw new Error(`Module ${l} didn’t register its module`);return s}));self.define=(r,i)=>{const n=s||("document"in self?document.currentScript.src:"")||location.href;if(e[n])return;let u={};const o=s=>l(s,n),a={module:{uri:n},exports:u,require:o};e[n]=Promise.all(r.map(s=>a[s]||o(s))).then(s=>(i(...s),u))}}define(["./workbox-3aa584b4"],function(s){"use strict";self.skipWaiting(),s.clientsClaim(),s.precacheAndRoute([{url:"assets/__vite-browser-external-BQ5eJQsZ.js",revision:null},{url:"assets/__vite-browser-external-DPh5tFvT.js",revision:null},{url:"assets/__vite-optional-peer-dep_effect_xsschema-CSjxbBMs.js",revision:null},{url:"assets/__vite-optional-peer-dep_sury_xsschema-CwAhyDn8.js",revision:null},{url:"assets/_...all_-JSqUxRGo.js",revision:null},{url:"assets/airi-card-DJpm8cix.js",revision:null},{url:"assets/alibaba-cloud-model-studio-BlYgYX-0.js",revision:null},{url:"assets/AnimatedWave-CWn5JVD4.js",revision:null},{url:"assets/AnimatedWave-DbSuFsq0.css",revision:null},{url:"assets/anthropic-D6RUbbgy.js",revision:null},{url:"assets/appearance-BjgY4Gtj.js",revision:null},{url:"assets/arktype-C-GObzDh-DfSkD_kw.js",revision:null},{url:"assets/audio-Bi5nCGKr.js",revision:null},{url:"assets/background-remove-B5YHaKAF.js",revision:null},{url:"assets/Basic-MLnzojs5.js",revision:null},{url:"assets/browser-bfchqW24.js",revision:null},{url:"assets/browser-CMSJHaBF.js",revision:null},{url:"assets/Button-D3cjyOEe.js",revision:null},{url:"assets/Button-D6PjaMaR.css",revision:null},{url:"assets/CardCreate-CN9MHSBD.js",revision:null},{url:"assets/CardCreate-uNXU9uRC.js",revision:null},{url:"assets/CardCreationDialog-Blfzqkvs.js",revision:null},{url:"assets/CardCreationDialog-CNtImmVB.css",revision:null},{url:"assets/CardCreationDialog-FrhTB6Za.js",revision:null},{url:"assets/CardDetailDialog-a4ktjZPI.js",revision:null},{url:"assets/CardDetailDialog-DKkDgBi1.js",revision:null},{url:"assets/CardListItem-Bx65D5jB.js",revision:null},{url:"assets/CardListItem-wx0Xf629.js",revision:null},{url:"assets/chat-D2Dw5H7W.js",revision:null},{url:"assets/CheckBar-Bo3RcSNe.js",revision:null},{url:"assets/cloudflare-workers-ai-CRLVRFV3.js",revision:null},{url:"assets/color-scheme-Bys-iM2D.js",revision:null},{url:"assets/color-scheme-DQ9rzeUD.css",revision:null},{url:"assets/ColorPalette-BQYkam8G.js",revision:null},{url:"assets/components-1D2TUSey.css",revision:null},{url:"assets/components-DHUA669a.js",revision:null},{url:"assets/composables-CgcEyUWo.js",revision:null},{url:"assets/consciousness-CXh-iRGo.js",revision:null},{url:"assets/core-DLGqGxHa.js",revision:null},{url:"assets/deepseek-BM0Eh2rC.js",revision:null},{url:"assets/default-BdRB7bUi.js",revision:null},{url:"assets/default-browser-DTRWbcB3.js",revision:null},{url:"assets/default-node-CQhep7iX.js",revision:null},{url:"assets/delays-IM0BuMf_.js",revision:null},{url:"assets/DeleteCardDialog-BdWfuAqZ.js",revision:null},{url:"assets/DeleteCardDialog-C6SDUYNC.js",revision:null},{url:"assets/developer-CsRsu9bL.js",revision:null},{url:"assets/dist-B9GpkGif.js",revision:null},{url:"assets/dist-CONIs07P.js",revision:null},{url:"assets/dist-Cr2QBfS4.js",revision:null},{url:"assets/duckdb-browser-coi.pthread.worker-WD1J30pV.js",revision:null},{url:"assets/duckdb-browser-coi.worker-Ji2I_m5s.js",revision:null},{url:"assets/duckdb-browser-eh.worker-B2xnDV1H.js",revision:null},{url:"assets/duckdb-browser-mvp.worker-DCs3_EjR.js",revision:null},{url:"assets/duckdb-coi-CSr8FQO4.wasm",revision:null},{url:"assets/duckdb-eh-BJOC5S4x.wasm",revision:null},{url:"assets/duckdb-mvp-8HYqhb4i.wasm",revision:null},{url:"assets/duckdb-mvp-C3i5IjU8.js",revision:null},{url:"assets/effect-WSjEuzC9-D78WghFx.js",revision:null},{url:"assets/elevenlabs-DPYwkmRS.js",revision:null},{url:"assets/emotions-Bn_F7pNT.js",revision:null},{url:"assets/esm-BF-DsdBI.js",revision:null},{url:"assets/featherless-ai-gdrUgYDA.js",revision:null},{url:"assets/filter-message-39ev3J_Q.js",revision:null},{url:"assets/fireworks-ai-fKuPeJjT.js",revision:null},{url:"assets/general-D9rY_FOz.js",revision:null},{url:"assets/gesture-circle-CeCcQTn3.js",revision:null},{url:"assets/google-generative-ai-DznmED2J.js",revision:null},{url:"assets/HeaderLink-DAzsygCR.css",revision:null},{url:"assets/HeaderLink-Dws9YKmo.js",revision:null},{url:"assets/home-CvTDzPpZ.js",revision:null},{url:"assets/IconAnimation-BDKVR9Dg.js",revision:null},{url:"assets/image-BhuwcwI9.css",revision:null},{url:"assets/image-DZE-Gq8A.js",revision:null},{url:"assets/import-url-browser-CajlDqRn.js",revision:null},{url:"assets/import-url-browser-DNuYZxPr.js",revision:null},{url:"assets/import-url-node-BGiLk3V8.js",revision:null},{url:"assets/index-10xSVpcK.css",revision:null},{url:"assets/index-CISmcbXk-C9oju49Y.js",revision:null},{url:"assets/index-CsmT0L1K.js",revision:null},{url:"assets/InputFile-BW-qIUxk.js",revision:null},{url:"assets/js/CubismSdkForWeb-5-r.3/Core/live2dcubismcore.min.js",revision:null},{url:"assets/memory-Cz0Z0ybt.js",revision:null},{url:"assets/memory-long-term-Dt8AlP6i.js",revision:null},{url:"assets/memory-short-term-CWq7dsUA.js",revision:null},{url:"assets/messages-Db1po7ry.js",revision:null},{url:"assets/microsoft-speech-CWxCOPph.js",revision:null},{url:"assets/mistral-ai-DDvbJ_KZ.js",revision:null},{url:"assets/models-C6v2DNx0.js",revision:null},{url:"assets/models-ctVuVUBS.css",revision:null},{url:"assets/modules-_XCJ51P8.js",revision:null},{url:"assets/moonshot-ai-CxTmtFOe.js",revision:null},{url:"assets/novita-ai-B__UhUPQ.js",revision:null},{url:"assets/ollama-B0CgDUYn.js",revision:null},{url:"assets/openai-audio-speech-BVZOIrxZ.js",revision:null},{url:"assets/openai-audio-transcription-M_8aPBY1.js",revision:null},{url:"assets/openai-CJpzKhtx.js",revision:null},{url:"assets/openrouter-ai-1dhsAjpC.js",revision:null},{url:"assets/ort-wasm-simd-threaded.jsep-B0T3yYHD.wasm",revision:null},{url:"assets/pages-B3HnyzmI.js",revision:null},{url:"assets/plain-Dd6OPHCC.js",revision:null},{url:"assets/player2-api-C24B3Fua.js",revision:null},{url:"assets/polaroid-DBAaqaQb.js",revision:null},{url:"assets/providers-Dj_4UV5e.js",revision:null},{url:"assets/queue-B0kER5Ap.js",revision:null},{url:"assets/queue-BV9joiY1.js",revision:null},{url:"assets/queues-hSEKEE3F.js",revision:null},{url:"assets/route-block-DNPbw0zT.js",revision:null},{url:"assets/scene-CRPJttqb.js",revision:null},{url:"assets/settings-BZPAO2d4.js",revision:null},{url:"assets/settings-Dm8h2cwP.js",revision:null},{url:"assets/sleep-CvjNLutj.js",revision:null},{url:"assets/speech-BXW9V0KE.js",revision:null},{url:"assets/src-B8Pazang.css",revision:null},{url:"assets/src-C1Sr0aqN.js",revision:null},{url:"assets/stage-BZq5_Dn1.js",revision:null},{url:"assets/stage-CS_yTdA7.js",revision:null},{url:"assets/stores-2H61GqXP.js",revision:null},{url:"assets/sury-DmrZ3_Oj-D6jFSom2.js",revision:null},{url:"assets/Textarea-CK41gHte.js",revision:null},{url:"assets/together-ai-aeQrm7lr.js",revision:null},{url:"assets/types-AwjH7X1C.js",revision:null},{url:"assets/useIconAnimation-bkp6MDA-.js",revision:null},{url:"assets/valibot-CQk-M5rL-C2bLGA9S.js",revision:null},{url:"assets/vibrant-3lmSC90y.js",revision:null},{url:"assets/volcengine-BXA-wkta.js",revision:null},{url:"assets/webgpu-Nt9hTBpW.js",revision:null},{url:"assets/worker-Bq31kV70.js",revision:null},{url:"assets/xai-C7wiQ4il.js",revision:null},{url:"assets/zod-Db63SLXj-DPwvP49x.js",revision:null},{url:"index.html",revision:"fab1bfff92013a365b17e88ec9b2b633"},{url:"registerSW.js",revision:"1872c500de691dce40960bb85481de07"},{url:"apple-touch-icon.png",revision:"b41f3c1ba3c98364c640fe2b7348bd39"},{url:"favicon.svg",revision:"47d50a7bc31b26d14f3895982906935f"},{url:"maskable_icon_x192.png",revision:"a6ed025fb1491e8b498c9f4c0064d190"},{url:"maskable_icon_x512.png",revision:"b7b2c2d9bda88c74a295695c8a0e7468"},{url:"web-app-manifest-192x192.png",revision:"c9731148ea6befa78a495f63536c82eb"},{url:"web-app-manifest-512x512.png",revision:"bcae855d5ff588b682314fe1c6e530f0"},{url:"manifest.webmanifest",revision:"13ac96785e6c03e0cb109d13086bf9b2"}],{}),s.cleanupOutdatedCaches(),s.registerRoute(new s.NavigationRoute(s.createHandlerBoundToURL("index.html"),{denylist:[/^\/docs\//,/^\/ui\//,/^\/remote-assets\//,/^\/api\//]}))});